@shrkcrft/context-planner 0.1.0-alpha.20 → 0.1.0-alpha.22
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-context.d.ts","sourceRoot":"","sources":["../../src/planner/plan-context.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,YAAY,EAMlB,MAAM,2BAA2B,CAAC;AAInC,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,+DAA+D;IAC/D,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,mBAAmB,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"plan-context.d.ts","sourceRoot":"","sources":["../../src/planner/plan-context.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,YAAY,EAMlB,MAAM,2BAA2B,CAAC;AAInC,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,+DAA+D;IAC/D,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,mBAAmB,GAAG,YAAY,CAuHtE"}
|
|
@@ -30,6 +30,13 @@ export function planContext(options) {
|
|
|
30
30
|
...(options.hintedFiles ? { hintedFiles: options.hintedFiles } : {}),
|
|
31
31
|
...(options.hintedPackages ? { hintedPackages: options.hintedPackages } : {}),
|
|
32
32
|
});
|
|
33
|
+
// The graph exists but nothing scored: the pack would be silently empty.
|
|
34
|
+
// Tell the caller WHY (almost always a too-short / all-stop-word task, a
|
|
35
|
+
// typo, or a stale index) instead of returning a blank result with no hint.
|
|
36
|
+
if (scored.length === 0) {
|
|
37
|
+
diagnostics.push('no indexed file matched this task — it may be too short or all stop-words. ' +
|
|
38
|
+
'Try a more specific task, pass --hint-file/--hint-package, or refresh with `shrk graph index`.');
|
|
39
|
+
}
|
|
33
40
|
// 2. Estimate tokens (deterministic, BPE-ish approximation).
|
|
34
41
|
const ranked = scored
|
|
35
42
|
.slice(0, maxFiles * 3) // start with a generous pre-pool before budget pruning
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shrkcrft/context-planner",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.22",
|
|
4
4
|
"description": "SharkCraft context planner: deterministic, token-budgeted context packs for AI coding agents. Combines code graph, rule-graph, and intent classification to pick the minimal relevant file set for a task.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SharkCraft contributors",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@shrkcrft/core": "^0.1.0-alpha.
|
|
47
|
-
"@shrkcrft/graph": "^0.1.0-alpha.
|
|
48
|
-
"@shrkcrft/rule-graph": "^0.1.0-alpha.
|
|
46
|
+
"@shrkcrft/core": "^0.1.0-alpha.22",
|
|
47
|
+
"@shrkcrft/graph": "^0.1.0-alpha.22",
|
|
48
|
+
"@shrkcrft/rule-graph": "^0.1.0-alpha.22"
|
|
49
49
|
},
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|