@tricknowtech/context 0.2.0 → 0.3.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 +25 -1
- package/dist/{chunk-6GB2SN2L.js → chunk-BLEGQVXA.js} +228 -102
- package/dist/cli.cjs +287 -154
- package/dist/cli.js +16 -5
- package/dist/index.cjs +260 -137
- package/dist/index.d.cts +49 -8
- package/dist/index.d.ts +49 -8
- package/dist/index.js +1 -1
- package/package.json +11 -3
package/dist/cli.js
CHANGED
|
@@ -24,9 +24,10 @@ import {
|
|
|
24
24
|
scanFiles,
|
|
25
25
|
storeDir,
|
|
26
26
|
summarize,
|
|
27
|
+
templateContextFor,
|
|
27
28
|
userClaudeDir,
|
|
28
29
|
validateHandoff
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-BLEGQVXA.js";
|
|
30
31
|
|
|
31
32
|
// src/commands.ts
|
|
32
33
|
import { execFileSync } from "child_process";
|
|
@@ -53,7 +54,7 @@ function requireProject() {
|
|
|
53
54
|
return { root, cfg };
|
|
54
55
|
}
|
|
55
56
|
function templateContext(root) {
|
|
56
|
-
return
|
|
57
|
+
return templateContextFor(root);
|
|
57
58
|
}
|
|
58
59
|
function effectiveTiers(cfg) {
|
|
59
60
|
const tiers = cfg.tiers.filter((t) => LOCAL_TIERS.includes(t));
|
|
@@ -89,7 +90,7 @@ function cmdPush(opts = {}) {
|
|
|
89
90
|
if ("code" in found) return found;
|
|
90
91
|
const { root, cfg } = found;
|
|
91
92
|
const { tiers, refused } = effectiveTiers(cfg);
|
|
92
|
-
const { files, skippedTracked } = collect(root, cfg, tiers);
|
|
93
|
+
const { files, skippedTracked, assistants } = collect(root, cfg, tiers);
|
|
93
94
|
const lines = [];
|
|
94
95
|
if (refused.length > 0) {
|
|
95
96
|
lines.push(
|
|
@@ -134,6 +135,9 @@ function cmdPush(opts = {}) {
|
|
|
134
135
|
const t = totals[tier];
|
|
135
136
|
if (t.count > 0) lines.push(` ${tier.padEnd(11)} ${String(t.count).padStart(4)} files ${formatBytes(t.bytes)}`);
|
|
136
137
|
}
|
|
138
|
+
if (assistants.length > 0) {
|
|
139
|
+
lines.push("", `Assistants: ${assistants.map((a) => a.name).join(", ")}`);
|
|
140
|
+
}
|
|
137
141
|
if (skippedTracked.length > 0) {
|
|
138
142
|
lines.push("", `${skippedTracked.length} project files skipped \u2014 git already tracks them.`);
|
|
139
143
|
}
|
|
@@ -251,6 +255,12 @@ function cmdDoctor() {
|
|
|
251
255
|
const store = new LocalStore(root);
|
|
252
256
|
const manifest = store.readManifest();
|
|
253
257
|
check(Boolean(manifest), "pushed at least once", manifest ? `${manifest.entries.length} files` : "never \u2014 run `ctx push`");
|
|
258
|
+
const detected = collect(root, cfg, ["core"]).assistants;
|
|
259
|
+
check(
|
|
260
|
+
detected.length > 0,
|
|
261
|
+
"assistants detected",
|
|
262
|
+
detected.length > 0 ? detected.map((a) => a.name).join(", ") : "none \u2014 no known assistant config found"
|
|
263
|
+
);
|
|
254
264
|
check(
|
|
255
265
|
fs.existsSync(path.join(root, SLASH_COMMAND_PATH)),
|
|
256
266
|
"/context slash command",
|
|
@@ -297,7 +307,7 @@ function cmdStatus() {
|
|
|
297
307
|
const store = new LocalStore(root);
|
|
298
308
|
const manifest = store.readManifest();
|
|
299
309
|
const { tiers } = effectiveTiers(cfg);
|
|
300
|
-
const { files, skippedTracked } = collect(root, cfg, tiers);
|
|
310
|
+
const { files, skippedTracked, assistants } = collect(root, cfg, tiers);
|
|
301
311
|
const rawHandoff = store.readHandoff();
|
|
302
312
|
const hv = rawHandoff ? validateHandoff(rawHandoff) : null;
|
|
303
313
|
const handoffLabel = !rawHandoff ? "none \u2014 run `/context push` to record where you left off" : hv?.ok ? `${handoffAge(hv.handoff)}` : "malformed (will be ignored)";
|
|
@@ -306,6 +316,7 @@ function cmdStatus() {
|
|
|
306
316
|
`Store ${path.relative(root, storeDir(root))}/`,
|
|
307
317
|
`Tiers ${cfg.tiers.join(", ")}`,
|
|
308
318
|
`Handoff ${handoffLabel}`,
|
|
319
|
+
`Tools ${assistants.length > 0 ? assistants.map((a) => a.name).join(", ") : "none detected"}`,
|
|
309
320
|
`Remotes ${Object.keys(cfg.remotes).length > 0 ? Object.keys(cfg.remotes).join(", ") : "none (local only)"}`,
|
|
310
321
|
""
|
|
311
322
|
];
|
|
@@ -347,7 +358,7 @@ function cmdStatus() {
|
|
|
347
358
|
}
|
|
348
359
|
|
|
349
360
|
// src/cli.ts
|
|
350
|
-
var VERSION = "0.
|
|
361
|
+
var VERSION = "0.3.0";
|
|
351
362
|
var USAGE = `tricknowtech context-sync \u2014 carry a project's LLM context between machines
|
|
352
363
|
|
|
353
364
|
Usage
|