compound-agent 1.4.0 → 1.4.1
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 +9 -2
- package/dist/cli.js +38 -45
- package/dist/cli.js.map +1 -1
- 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,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [1.4.1] - 2026-02-22
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- **Broader retrieval messaging**: `ca search` and `ca knowledge` descriptions in prime output and AGENTS.md now encourage general-purpose use beyond mandatory architectural triggers
|
|
17
|
+
|
|
12
18
|
## [1.4.0] - 2026-02-22
|
|
13
19
|
|
|
14
20
|
### Fixed
|
|
@@ -701,10 +707,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
701
707
|
- Vitest test suite
|
|
702
708
|
- tsup build configuration
|
|
703
709
|
|
|
704
|
-
[Unreleased]: https://github.com/Nathandela/learning_agent/compare/v1.4.
|
|
710
|
+
[Unreleased]: https://github.com/Nathandela/learning_agent/compare/v1.4.1...HEAD
|
|
711
|
+
[1.4.1]: https://github.com/Nathandela/learning_agent/compare/v1.4.0...v1.4.1
|
|
705
712
|
[1.4.0]: https://github.com/Nathandela/learning_agent/compare/v1.3.9...v1.4.0
|
|
706
713
|
[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.
|
|
714
|
+
[1.3.8]: https://github.com/Nathandela/learning_agent/compare/v1.3.7...v1.3.8
|
|
708
715
|
[1.3.7]: https://github.com/Nathandela/learning_agent/compare/v1.3.3...v1.3.7
|
|
709
716
|
[1.3.3]: https://github.com/Nathandela/learning_agent/compare/v1.3.2...v1.3.3
|
|
710
717
|
[1.3.2]: https://github.com/Nathandela/learning_agent/compare/v1.3.1...v1.3.2
|
package/dist/cli.js
CHANGED
|
@@ -3266,8 +3266,8 @@ This project uses compound-agent for session memory via **CLI commands**.
|
|
|
3266
3266
|
|
|
3267
3267
|
| Command | Purpose |
|
|
3268
3268
|
|---------|---------|
|
|
3269
|
-
| \`npx ca search "query"\` | Search lessons -
|
|
3270
|
-
| \`npx ca knowledge "query"\` |
|
|
3269
|
+
| \`npx ca search "query"\` | Search lessons - MUST call before architectural decisions; use anytime you need context |
|
|
3270
|
+
| \`npx ca knowledge "query"\` | Ask the project docs any question - MUST call before architectural decisions; use freely |
|
|
3271
3271
|
| \`npx ca learn "insight"\` | Capture lessons - use AFTER corrections or discoveries |
|
|
3272
3272
|
| \`npx ca list\` | List all stored lessons |
|
|
3273
3273
|
| \`npx ca show <id>\` | Show details of a specific lesson |
|
|
@@ -3282,6 +3282,8 @@ You MUST call \`npx ca search\` and \`npx ca knowledge\` BEFORE:
|
|
|
3282
3282
|
|
|
3283
3283
|
**NEVER skip search for complex decisions.** Past mistakes will repeat.
|
|
3284
3284
|
|
|
3285
|
+
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.
|
|
3286
|
+
|
|
3285
3287
|
### Capture Protocol
|
|
3286
3288
|
|
|
3287
3289
|
Run \`npx ca learn\` AFTER:
|
|
@@ -3305,7 +3307,7 @@ Before capturing, verify the lesson is:
|
|
|
3305
3307
|
The JSONL file requires proper ID generation, schema validation, and SQLite sync.
|
|
3306
3308
|
Use CLI (\`npx ca learn\`) \u2014 never manual edits.
|
|
3307
3309
|
|
|
3308
|
-
See [documentation](https://github.com/Nathandela/
|
|
3310
|
+
See [documentation](https://github.com/Nathandela/learning_agent) for more details.
|
|
3309
3311
|
${AGENTS_SECTION_END_MARKER}
|
|
3310
3312
|
`;
|
|
3311
3313
|
var LEGACY_ROOT_SLASH_COMMANDS = [
|
|
@@ -6692,7 +6694,8 @@ async function installDocTemplates(repoRoot) {
|
|
|
6692
6694
|
}
|
|
6693
6695
|
return created;
|
|
6694
6696
|
}
|
|
6695
|
-
async function installResearchDocs(repoRoot) {
|
|
6697
|
+
async function installResearchDocs(repoRoot, options) {
|
|
6698
|
+
const force = options?.force ?? false;
|
|
6696
6699
|
const pkgRoot = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
6697
6700
|
const srcDir = join(pkgRoot, "docs", "research");
|
|
6698
6701
|
if (!existsSync(srcDir)) {
|
|
@@ -6709,20 +6712,24 @@ async function installResearchDocs(repoRoot) {
|
|
|
6709
6712
|
if (entry.isDirectory()) {
|
|
6710
6713
|
await mkdir(destPath, { recursive: true });
|
|
6711
6714
|
await copyDir(srcPath, destPath);
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6715
|
+
continue;
|
|
6716
|
+
}
|
|
6717
|
+
if (!entry.name.endsWith(".md")) continue;
|
|
6718
|
+
const exists = existsSync(destPath);
|
|
6719
|
+
if (exists && !force) continue;
|
|
6720
|
+
let content = await readFile(srcPath, "utf-8");
|
|
6721
|
+
if (entry.name === "index.md") {
|
|
6722
|
+
const patched = content.replace(
|
|
6723
|
+
/^# .*/m,
|
|
6724
|
+
"$&\n\n> Shipped by compound-agent. Source: `docs/research/` in the compound-agent package."
|
|
6725
|
+
);
|
|
6726
|
+
content = patched !== content ? patched : `> Shipped by compound-agent.
|
|
6720
6727
|
|
|
6721
6728
|
${content}`;
|
|
6722
|
-
}
|
|
6723
|
-
await writeFile(destPath, content, "utf-8");
|
|
6724
|
-
created = true;
|
|
6725
6729
|
}
|
|
6730
|
+
if (exists && await readFile(destPath, "utf-8") === content) continue;
|
|
6731
|
+
await writeFile(destPath, content, "utf-8");
|
|
6732
|
+
created = true;
|
|
6726
6733
|
}
|
|
6727
6734
|
}
|
|
6728
6735
|
try {
|
|
@@ -6994,6 +7001,7 @@ async function runSetup(options) {
|
|
|
6994
7001
|
await installPhaseSkills(repoRoot);
|
|
6995
7002
|
await installAgentRoleSkills(repoRoot);
|
|
6996
7003
|
await installDocTemplates(repoRoot);
|
|
7004
|
+
await installResearchDocs(repoRoot);
|
|
6997
7005
|
let gitHooks = "skipped";
|
|
6998
7006
|
if (!options.skipHooks) {
|
|
6999
7007
|
gitHooks = (await installPreCommitHook(repoRoot)).status;
|
|
@@ -7068,6 +7076,9 @@ async function runUpdate(repoRoot, dryRun) {
|
|
|
7068
7076
|
const content = template.replace("{{VERSION}}", VERSION).replace("{{DATE}}", (/* @__PURE__ */ new Date()).toISOString().slice(0, 10));
|
|
7069
7077
|
await processFile(join(repoRoot, "docs", "compound", filename), content);
|
|
7070
7078
|
}
|
|
7079
|
+
if (!dryRun) {
|
|
7080
|
+
await installResearchDocs(repoRoot, { force: true });
|
|
7081
|
+
}
|
|
7071
7082
|
for (const filename of LEGACY_ROOT_SLASH_COMMANDS) {
|
|
7072
7083
|
const filePath = join(repoRoot, ".claude", "commands", filename);
|
|
7073
7084
|
if (existsSync(filePath)) {
|
|
@@ -8073,8 +8084,8 @@ var TRUST_LANGUAGE_TEMPLATE = `# Compound Agent Active
|
|
|
8073
8084
|
|
|
8074
8085
|
| Command | Purpose |
|
|
8075
8086
|
|---------|---------|
|
|
8076
|
-
| \`npx ca search "query"\` | Search lessons - call
|
|
8077
|
-
| \`npx ca knowledge "query"\` |
|
|
8087
|
+
| \`npx ca search "query"\` | Search lessons - MUST call before architectural decisions; use anytime you need context |
|
|
8088
|
+
| \`npx ca knowledge "query"\` | Ask the project docs any question - MUST call before architectural decisions; use freely |
|
|
8078
8089
|
| \`npx ca learn "insight"\` | Capture lessons - call AFTER corrections or discoveries |
|
|
8079
8090
|
|
|
8080
8091
|
## Core Constraints
|
|
@@ -8093,6 +8104,8 @@ You MUST call \`npx ca search\` and \`npx ca knowledge\` BEFORE:
|
|
|
8093
8104
|
|
|
8094
8105
|
**NEVER skip search for complex decisions.** Past mistakes will repeat.
|
|
8095
8106
|
|
|
8107
|
+
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.
|
|
8108
|
+
|
|
8096
8109
|
## Capture Protocol
|
|
8097
8110
|
|
|
8098
8111
|
Run \`npx ca learn\` AFTER:
|
|
@@ -8576,7 +8589,13 @@ function registerVerifyGatesCommand(program2) {
|
|
|
8576
8589
|
}
|
|
8577
8590
|
|
|
8578
8591
|
// src/changelog-data.ts
|
|
8579
|
-
var CHANGELOG_RECENT = `## [1.4.
|
|
8592
|
+
var CHANGELOG_RECENT = `## [1.4.1] - 2026-02-22
|
|
8593
|
+
|
|
8594
|
+
### Changed
|
|
8595
|
+
|
|
8596
|
+
- **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
|
+
|
|
8598
|
+
## [1.4.0] - 2026-02-22
|
|
8580
8599
|
|
|
8581
8600
|
### Fixed
|
|
8582
8601
|
|
|
@@ -8593,33 +8612,7 @@ var CHANGELOG_RECENT = `## [1.4.0] - 2026-02-22
|
|
|
8593
8612
|
- **Integration test pipeline reliability**: Moved \`pnpm build\` from vitest globalSetup to npm script pre-step, eliminating EPERM errors from tsx/IPC conflicts inside vitest's process
|
|
8594
8613
|
- **Fail-fast globalSetup**: Missing \`dist/cli.js\` now throws a clear error instead of cascading 68+ test failures
|
|
8595
8614
|
- **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
|
|
8597
|
-
|
|
8598
|
-
## [1.3.8] - 2026-02-22
|
|
8599
|
-
|
|
8600
|
-
### Fixed
|
|
8601
|
-
|
|
8602
|
-
- **Integration test reliability**: Dynamic assertion on workflow command count instead of hardcoded magic number; 30s test timeout for integration suite; conditional build in global-setup; 30s timeout on all bare \`execSync\` calls in init tests
|
|
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
|
|
8608
|
-
|
|
8609
|
-
### Changed
|
|
8610
|
-
|
|
8611
|
-
- **Two-phase vector search**: Knowledge vector search loads only IDs + embeddings in phase 1, hydrates full text for top-k only in phase 2 (reduces memory from O(n * text) to O(n * embedding) + O(k * text))
|
|
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)`;
|
|
8615
|
+
- **Timeout safety net**: Added \`testTimeout: 30_000\` to fallback vitest.config.ts, preventing 5s default under edge conditions`;
|
|
8623
8616
|
|
|
8624
8617
|
// src/commands/about.ts
|
|
8625
8618
|
function registerAboutCommand(program2) {
|