context-doctor 0.32.0 → 0.34.0
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/README.md +84 -694
- package/dist/autoclear.js +4 -1
- package/dist/autopilot.d.ts +20 -6
- package/dist/autopilot.js +105 -7
- package/dist/cachekey.d.ts +25 -0
- package/dist/cachekey.js +73 -0
- package/dist/cacheplan.d.ts +29 -9
- package/dist/cacheplan.js +110 -29
- package/dist/ci.js +9 -1
- package/dist/cli.js +359 -247
- package/dist/clihelp.d.ts +24 -0
- package/dist/clihelp.js +116 -0
- package/dist/codexroute.d.ts +46 -0
- package/dist/codexroute.js +122 -0
- package/dist/coldresume.d.ts +62 -0
- package/dist/coldresume.js +85 -6
- package/dist/compactquality.d.ts +3 -1
- package/dist/compactquality.js +15 -4
- package/dist/compactwindow.d.ts +31 -5
- package/dist/compactwindow.js +80 -25
- package/dist/diff.js +24 -2
- package/dist/doctor.d.ts +8 -2
- package/dist/doctor.js +138 -35
- package/dist/hook.js +23 -4
- package/dist/install.d.ts +35 -0
- package/dist/install.js +280 -48
- package/dist/invocation.d.ts +18 -0
- package/dist/invocation.js +49 -0
- package/dist/ledger.d.ts +2 -0
- package/dist/mcp.d.ts +5 -2
- package/dist/mcp.js +93 -299
- package/dist/mcpclient.js +45 -0
- package/dist/mcpschema.d.ts +1 -1
- package/dist/mcpschema.js +11 -8
- package/dist/optimize.d.ts +2 -0
- package/dist/optimize.js +2 -0
- package/dist/overhead.d.ts +12 -1
- package/dist/overhead.js +31 -7
- package/dist/preferences.d.ts +1 -1
- package/dist/preferences.js +5 -5
- package/dist/proxy.d.ts +14 -1
- package/dist/proxy.js +45 -4
- package/dist/savings.d.ts +17 -1
- package/dist/savings.js +12 -13
- package/dist/session.d.ts +15 -0
- package/dist/session.js +43 -0
- package/dist/subagentpay.d.ts +1 -1
- package/dist/subagentpay.js +3 -2
- package/package.json +5 -8
- package/skills/context-doctor/SKILL.md +3 -3
package/dist/ci.js
CHANGED
|
@@ -89,7 +89,15 @@ function isFile(p) {
|
|
|
89
89
|
}
|
|
90
90
|
export function ciReport(opts = {}) {
|
|
91
91
|
const cwd = opts.cwd ?? process.cwd();
|
|
92
|
-
|
|
92
|
+
// Outside a repository `git ls-files` lists nothing, which used to read as
|
|
93
|
+
// "No agent memory files" with exit 0: a CI step in the wrong directory
|
|
94
|
+
// passed every pull request. It is an error, said as one.
|
|
95
|
+
const root = git(["rev-parse", "--show-toplevel"], cwd)?.trim();
|
|
96
|
+
if (!root) {
|
|
97
|
+
throw new Error(git(["--version"], cwd) === undefined
|
|
98
|
+
? "ci needs git, and git is not installed or not on PATH."
|
|
99
|
+
: `ci compares memory files in a git repository, and ${cwd} is not inside one. Run it from the repository's checkout.`);
|
|
100
|
+
}
|
|
93
101
|
// A base git cannot resolve (a typo, or a shallow clone that never fetched
|
|
94
102
|
// it) would read as an empty tree: every file "new", and a failure that
|
|
95
103
|
// blames the PR for the whole memory set. Stop and say so instead.
|