compound-agent 1.4.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -2
- package/dist/cli.js +47 -49
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [1.4.2] - 2026-02-23
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- **Banner audio crash on headless Linux**: Async `ENOENT` error from missing `aplay` no longer crashes `ca setup --update`
|
|
17
|
+
- **PowerShell path injection on Windows**: Temp paths containing apostrophes no longer break or inject commands in `banner-audio.ts`
|
|
18
|
+
- **Banner audio test coverage**: Rewrote tests with proper mock isolation (`vi.spyOn` + file-scope `vi.mock`), covering async ENOENT, sync throw, stop() idempotency, and normal exit cleanup
|
|
19
|
+
|
|
20
|
+
## [1.4.1] - 2026-02-22
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- **Broader retrieval messaging**: `ca search` and `ca knowledge` descriptions in prime output and AGENTS.md now encourage general-purpose use beyond mandatory architectural triggers
|
|
25
|
+
|
|
12
26
|
## [1.4.0] - 2026-02-22
|
|
13
27
|
|
|
14
28
|
### Fixed
|
|
@@ -701,10 +715,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
701
715
|
- Vitest test suite
|
|
702
716
|
- tsup build configuration
|
|
703
717
|
|
|
704
|
-
[Unreleased]: https://github.com/Nathandela/learning_agent/compare/v1.4.
|
|
718
|
+
[Unreleased]: https://github.com/Nathandela/learning_agent/compare/v1.4.1...HEAD
|
|
719
|
+
[1.4.1]: https://github.com/Nathandela/learning_agent/compare/v1.4.0...v1.4.1
|
|
705
720
|
[1.4.0]: https://github.com/Nathandela/learning_agent/compare/v1.3.9...v1.4.0
|
|
706
721
|
[1.3.9]: https://github.com/Nathandela/learning_agent/compare/v1.3.8...v1.3.9
|
|
707
|
-
[1.3.8]: https://github.com/Nathandela/learning_agent/compare/v1.3.
|
|
722
|
+
[1.3.8]: https://github.com/Nathandela/learning_agent/compare/v1.3.7...v1.3.8
|
|
708
723
|
[1.3.7]: https://github.com/Nathandela/learning_agent/compare/v1.3.3...v1.3.7
|
|
709
724
|
[1.3.3]: https://github.com/Nathandela/learning_agent/compare/v1.3.2...v1.3.3
|
|
710
725
|
[1.3.2]: https://github.com/Nathandela/learning_agent/compare/v1.3.1...v1.3.2
|
package/dist/cli.js
CHANGED
|
@@ -1957,7 +1957,7 @@ function spawnPlayer(filePath) {
|
|
|
1957
1957
|
case "win32":
|
|
1958
1958
|
return spawn("powershell", [
|
|
1959
1959
|
"-c",
|
|
1960
|
-
`(New-Object Media.SoundPlayer
|
|
1960
|
+
`(New-Object Media.SoundPlayer "${filePath.replace(/"/g, '`"')}").PlaySync()`
|
|
1961
1961
|
], { stdio: "ignore", detached: true });
|
|
1962
1962
|
default:
|
|
1963
1963
|
return null;
|
|
@@ -1990,6 +1990,12 @@ function playBannerAudio() {
|
|
|
1990
1990
|
} catch {
|
|
1991
1991
|
}
|
|
1992
1992
|
};
|
|
1993
|
+
proc.on("error", () => {
|
|
1994
|
+
try {
|
|
1995
|
+
unlinkSync(tmpPath);
|
|
1996
|
+
} catch {
|
|
1997
|
+
}
|
|
1998
|
+
});
|
|
1993
1999
|
proc.on("exit", () => {
|
|
1994
2000
|
try {
|
|
1995
2001
|
unlinkSync(tmpPath);
|
|
@@ -3266,8 +3272,8 @@ This project uses compound-agent for session memory via **CLI commands**.
|
|
|
3266
3272
|
|
|
3267
3273
|
| Command | Purpose |
|
|
3268
3274
|
|---------|---------|
|
|
3269
|
-
| \`npx ca search "query"\` | Search lessons -
|
|
3270
|
-
| \`npx ca knowledge "query"\` |
|
|
3275
|
+
| \`npx ca search "query"\` | Search lessons - MUST call before architectural decisions; use anytime you need context |
|
|
3276
|
+
| \`npx ca knowledge "query"\` | Ask the project docs any question - MUST call before architectural decisions; use freely |
|
|
3271
3277
|
| \`npx ca learn "insight"\` | Capture lessons - use AFTER corrections or discoveries |
|
|
3272
3278
|
| \`npx ca list\` | List all stored lessons |
|
|
3273
3279
|
| \`npx ca show <id>\` | Show details of a specific lesson |
|
|
@@ -3282,6 +3288,8 @@ You MUST call \`npx ca search\` and \`npx ca knowledge\` BEFORE:
|
|
|
3282
3288
|
|
|
3283
3289
|
**NEVER skip search for complex decisions.** Past mistakes will repeat.
|
|
3284
3290
|
|
|
3291
|
+
Beyond mandatory triggers, use these commands freely \u2014 they are lightweight queries, not heavyweight operations. Uncertain about a pattern? \`ca search\`. Need a detail from the docs? \`ca knowledge\`. The cost of an unnecessary search is near-zero; the cost of a missed one can be hours.
|
|
3292
|
+
|
|
3285
3293
|
### Capture Protocol
|
|
3286
3294
|
|
|
3287
3295
|
Run \`npx ca learn\` AFTER:
|
|
@@ -3305,7 +3313,7 @@ Before capturing, verify the lesson is:
|
|
|
3305
3313
|
The JSONL file requires proper ID generation, schema validation, and SQLite sync.
|
|
3306
3314
|
Use CLI (\`npx ca learn\`) \u2014 never manual edits.
|
|
3307
3315
|
|
|
3308
|
-
See [documentation](https://github.com/Nathandela/
|
|
3316
|
+
See [documentation](https://github.com/Nathandela/learning_agent) for more details.
|
|
3309
3317
|
${AGENTS_SECTION_END_MARKER}
|
|
3310
3318
|
`;
|
|
3311
3319
|
var LEGACY_ROOT_SLASH_COMMANDS = [
|
|
@@ -6692,7 +6700,8 @@ async function installDocTemplates(repoRoot) {
|
|
|
6692
6700
|
}
|
|
6693
6701
|
return created;
|
|
6694
6702
|
}
|
|
6695
|
-
async function installResearchDocs(repoRoot) {
|
|
6703
|
+
async function installResearchDocs(repoRoot, options) {
|
|
6704
|
+
const force = options?.force ?? false;
|
|
6696
6705
|
const pkgRoot = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
6697
6706
|
const srcDir = join(pkgRoot, "docs", "research");
|
|
6698
6707
|
if (!existsSync(srcDir)) {
|
|
@@ -6709,20 +6718,24 @@ async function installResearchDocs(repoRoot) {
|
|
|
6709
6718
|
if (entry.isDirectory()) {
|
|
6710
6719
|
await mkdir(destPath, { recursive: true });
|
|
6711
6720
|
await copyDir(srcPath, destPath);
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6721
|
+
continue;
|
|
6722
|
+
}
|
|
6723
|
+
if (!entry.name.endsWith(".md")) continue;
|
|
6724
|
+
const exists = existsSync(destPath);
|
|
6725
|
+
if (exists && !force) continue;
|
|
6726
|
+
let content = await readFile(srcPath, "utf-8");
|
|
6727
|
+
if (entry.name === "index.md") {
|
|
6728
|
+
const patched = content.replace(
|
|
6729
|
+
/^# .*/m,
|
|
6730
|
+
"$&\n\n> Shipped by compound-agent. Source: `docs/research/` in the compound-agent package."
|
|
6731
|
+
);
|
|
6732
|
+
content = patched !== content ? patched : `> Shipped by compound-agent.
|
|
6720
6733
|
|
|
6721
6734
|
${content}`;
|
|
6722
|
-
}
|
|
6723
|
-
await writeFile(destPath, content, "utf-8");
|
|
6724
|
-
created = true;
|
|
6725
6735
|
}
|
|
6736
|
+
if (exists && await readFile(destPath, "utf-8") === content) continue;
|
|
6737
|
+
await writeFile(destPath, content, "utf-8");
|
|
6738
|
+
created = true;
|
|
6726
6739
|
}
|
|
6727
6740
|
}
|
|
6728
6741
|
try {
|
|
@@ -6994,6 +7007,7 @@ async function runSetup(options) {
|
|
|
6994
7007
|
await installPhaseSkills(repoRoot);
|
|
6995
7008
|
await installAgentRoleSkills(repoRoot);
|
|
6996
7009
|
await installDocTemplates(repoRoot);
|
|
7010
|
+
await installResearchDocs(repoRoot);
|
|
6997
7011
|
let gitHooks = "skipped";
|
|
6998
7012
|
if (!options.skipHooks) {
|
|
6999
7013
|
gitHooks = (await installPreCommitHook(repoRoot)).status;
|
|
@@ -7068,6 +7082,9 @@ async function runUpdate(repoRoot, dryRun) {
|
|
|
7068
7082
|
const content = template.replace("{{VERSION}}", VERSION).replace("{{DATE}}", (/* @__PURE__ */ new Date()).toISOString().slice(0, 10));
|
|
7069
7083
|
await processFile(join(repoRoot, "docs", "compound", filename), content);
|
|
7070
7084
|
}
|
|
7085
|
+
if (!dryRun) {
|
|
7086
|
+
await installResearchDocs(repoRoot, { force: true });
|
|
7087
|
+
}
|
|
7071
7088
|
for (const filename of LEGACY_ROOT_SLASH_COMMANDS) {
|
|
7072
7089
|
const filePath = join(repoRoot, ".claude", "commands", filename);
|
|
7073
7090
|
if (existsSync(filePath)) {
|
|
@@ -8073,8 +8090,8 @@ var TRUST_LANGUAGE_TEMPLATE = `# Compound Agent Active
|
|
|
8073
8090
|
|
|
8074
8091
|
| Command | Purpose |
|
|
8075
8092
|
|---------|---------|
|
|
8076
|
-
| \`npx ca search "query"\` | Search lessons - call
|
|
8077
|
-
| \`npx ca knowledge "query"\` |
|
|
8093
|
+
| \`npx ca search "query"\` | Search lessons - MUST call before architectural decisions; use anytime you need context |
|
|
8094
|
+
| \`npx ca knowledge "query"\` | Ask the project docs any question - MUST call before architectural decisions; use freely |
|
|
8078
8095
|
| \`npx ca learn "insight"\` | Capture lessons - call AFTER corrections or discoveries |
|
|
8079
8096
|
|
|
8080
8097
|
## Core Constraints
|
|
@@ -8093,6 +8110,8 @@ You MUST call \`npx ca search\` and \`npx ca knowledge\` BEFORE:
|
|
|
8093
8110
|
|
|
8094
8111
|
**NEVER skip search for complex decisions.** Past mistakes will repeat.
|
|
8095
8112
|
|
|
8113
|
+
Beyond mandatory triggers, use these commands freely \u2014 they are lightweight queries, not heavyweight operations. Uncertain about a pattern? \`ca search\`. Need a detail from the docs? \`ca knowledge\`. The cost of an unnecessary search is near-zero; the cost of a missed one can be hours.
|
|
8114
|
+
|
|
8096
8115
|
## Capture Protocol
|
|
8097
8116
|
|
|
8098
8117
|
Run \`npx ca learn\` AFTER:
|
|
@@ -8576,50 +8595,29 @@ function registerVerifyGatesCommand(program2) {
|
|
|
8576
8595
|
}
|
|
8577
8596
|
|
|
8578
8597
|
// src/changelog-data.ts
|
|
8579
|
-
var CHANGELOG_RECENT = `## [1.4.
|
|
8598
|
+
var CHANGELOG_RECENT = `## [1.4.2] - 2026-02-23
|
|
8580
8599
|
|
|
8581
8600
|
### Fixed
|
|
8582
8601
|
|
|
8583
|
-
- **
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8587
|
-
- **Version consolidation**: Roll-up release of v1.3.7\u2013v1.3.9 production readiness fixes (test pipeline hardening, data integrity, two-phase vector search, FTS5 sanitization)
|
|
8602
|
+
- **Banner audio crash on headless Linux**: Async \`ENOENT\` error from missing \`aplay\` no longer crashes \`ca setup --update\`
|
|
8603
|
+
- **PowerShell path injection on Windows**: Temp paths containing apostrophes no longer break or inject commands in \`banner-audio.ts\`
|
|
8604
|
+
- **Banner audio test coverage**: Rewrote tests with proper mock isolation (\`vi.spyOn\` + file-scope \`vi.mock\`), covering async ENOENT, sync throw, stop() idempotency, and normal exit cleanup
|
|
8588
8605
|
|
|
8589
|
-
## [1.
|
|
8606
|
+
## [1.4.1] - 2026-02-22
|
|
8590
8607
|
|
|
8591
|
-
###
|
|
8608
|
+
### Changed
|
|
8592
8609
|
|
|
8593
|
-
- **
|
|
8594
|
-
- **Fail-fast globalSetup**: Missing \`dist/cli.js\` now throws a clear error instead of cascading 68+ test failures
|
|
8595
|
-
- **Integration pool isolation**: Changed from \`threads\` to \`forks\` for integration tests \u2014 proper process isolation for subprocess-spawning tests
|
|
8596
|
-
- **Timeout safety net**: Added \`testTimeout: 30_000\` to fallback vitest.config.ts, preventing 5s default under edge conditions
|
|
8610
|
+
- **Broader retrieval messaging**: \`ca search\` and \`ca knowledge\` descriptions in prime output and AGENTS.md now encourage general-purpose use beyond mandatory architectural triggers
|
|
8597
8611
|
|
|
8598
|
-
## [1.
|
|
8612
|
+
## [1.4.0] - 2026-02-22
|
|
8599
8613
|
|
|
8600
8614
|
### Fixed
|
|
8601
8615
|
|
|
8602
|
-
- **
|
|
8603
|
-
- **Data integrity**: Indexing pipeline wraps delete/upsert/hash-set in a single transaction for atomic file re-indexing
|
|
8604
|
-
- **FTS5 sanitization**: Extended regex to strip parentheses, colons, and braces in addition to existing special chars
|
|
8605
|
-
- **Safe JSON.parse**: \`rowToMemoryItem\` now uses \`safeJsonParse\` with fallbacks instead of bare \`JSON.parse\`
|
|
8606
|
-
- **ENOENT on schema migration**: \`unlinkSync\` in lessons DB wrapped in try/catch (matches knowledge DB pattern)
|
|
8607
|
-
- **Worktree hook support**: \`getGitHooksDir\` resolves \`.git\` file (\`gitdir:\` reference) in worktrees
|
|
8616
|
+
- **Plugin manifest**: Corrected repository URL from \`compound_agent\` to \`learning_agent\`
|
|
8608
8617
|
|
|
8609
8618
|
### Changed
|
|
8610
8619
|
|
|
8611
|
-
- **
|
|
8612
|
-
- **Deduplicated FTS5 search**: \`searchKeyword\` and \`searchKeywordScored\` share a single \`executeFtsQuery\` helper
|
|
8613
|
-
- **Removed redundant COUNT pre-checks**: FTS5 naturally returns empty on empty tables
|
|
8614
|
-
- **Extracted chunk count helpers**: \`getChunkCount\` / \`getChunkCountByFilePath\` replace raw SQL in \`knowledge.ts\` and \`indexing.ts\`
|
|
8615
|
-
- **Immutable extension sets**: \`SUPPORTED_EXTENSIONS\` typed as \`ReadonlySet\`; new \`CODE_EXTENSIONS\` constant replaces hardcoded array in chunking
|
|
8616
|
-
- **\`test:all\` builds first**: Script now runs \`pnpm build\` before model download and test run
|
|
8617
|
-
- **Test describe label**: Fixed misleading \`'when stop_hook_active is false'\` to match actual test condition
|
|
8618
|
-
|
|
8619
|
-
### Added
|
|
8620
|
-
|
|
8621
|
-
- \`filesErrored\` field in \`IndexResult\` to track file read failures during indexing
|
|
8622
|
-
- \`tsx\` added to devDependencies (was used but not declared)`;
|
|
8620
|
+
- **Version consolidation**: Roll-up release of v1.3.7\u2013v1.3.9 production readiness fixes (test pipeline hardening, data integrity, two-phase vector search, FTS5 sanitization)`;
|
|
8623
8621
|
|
|
8624
8622
|
// src/commands/about.ts
|
|
8625
8623
|
function registerAboutCommand(program2) {
|