feat: v1.1.0 release - session ID tracking, async hooks, new skills

- Add session ID to session filenames (Issue #62)
- Add getSessionIdShort() helper for unique per-session tracking
- Add async hooks documentation with example
- Create iterative-retrieval skill for progressive context refinement
- Add continuous-learning-v2 skill with instinct-based learning
- Add ecc.tools ecosystem section to README
- Update skills list in README

All 67 tests passing.
This commit is contained in:
Affaan Mustafa
2026-01-25 18:21:27 -08:00
parent 5670fcd34f
commit 5c63fa9006
19 changed files with 2058 additions and 5 deletions

View File

@@ -14,6 +14,7 @@ const {
getSessionsDir,
getDateString,
getTimeString,
getSessionIdShort,
ensureDir,
readFile,
writeFile,
@@ -24,7 +25,9 @@ const {
async function main() {
const sessionsDir = getSessionsDir();
const today = getDateString();
const sessionFile = path.join(sessionsDir, `${today}-session.tmp`);
const shortId = getSessionIdShort();
// Include session ID in filename for unique per-session tracking
const sessionFile = path.join(sessionsDir, `${today}-${shortId}-session.tmp`);
ensureDir(sessionsDir);

View File

@@ -27,7 +27,8 @@ async function main() {
ensureDir(learnedDir);
// Check for recent session files (last 7 days)
const recentSessions = findFiles(sessionsDir, '*.tmp', { maxAge: 7 });
// Match both old format (YYYY-MM-DD-session.tmp) and new format (YYYY-MM-DD-shortid-session.tmp)
const recentSessions = findFiles(sessionsDir, '*-session.tmp', { maxAge: 7 });
if (recentSessions.length > 0) {
const latest = recentSessions[0];

View File

@@ -79,6 +79,19 @@ function getTimeString() {
return `${hours}:${minutes}`;
}
/**
* Get short session ID from CLAUDE_SESSION_ID environment variable
* Returns the last 8 characters for uniqueness with brevity
* @param {string} fallback - Fallback value if no session ID (default: 'default')
*/
function getSessionIdShort(fallback = 'default') {
const sessionId = process.env.CLAUDE_SESSION_ID;
if (!sessionId || sessionId.length === 0) {
return fallback;
}
return sessionId.slice(-8);
}
/**
* Get current datetime in YYYY-MM-DD HH:MM:SS format
*/
@@ -360,6 +373,7 @@ module.exports = {
getDateString,
getTimeString,
getDateTimeString,
getSessionIdShort,
// File operations
findFiles,