@ordewell/core 0.5.5 → 0.5.6

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.
Files changed (53) hide show
  1. package/dist/IFileSystem-BkPX7mLD.d.mts +76 -0
  2. package/dist/IFileSystem-C0l-4MGT.d.ts +76 -0
  3. package/dist/{ModeResolver-D3XO0fT9.d.ts → ModeResolver--16lh7dS.d.mts} +1 -1
  4. package/dist/{ModeResolver-D-SUFRNF.d.mts → ModeResolver-CjpG5Wli.d.ts} +1 -1
  5. package/dist/Task-Dyxp67s2.d.mts +2086 -0
  6. package/dist/Task-Dyxp67s2.d.ts +2086 -0
  7. package/dist/{chunk-T2S5O36I.mjs → chunk-C44UWIAD.mjs} +6 -6
  8. package/dist/chunk-C44UWIAD.mjs.map +1 -0
  9. package/dist/{chunk-HD2FWPRV.mjs → chunk-EDGUFCIR.mjs} +6 -1
  10. package/dist/chunk-EDGUFCIR.mjs.map +1 -0
  11. package/dist/{chunk-UUBGVCGJ.mjs → chunk-JBEFAJ2W.mjs} +2 -2
  12. package/dist/{chunk-KLN7ELXO.mjs → chunk-ROVYWEBI.mjs} +1560 -1269
  13. package/dist/chunk-ROVYWEBI.mjs.map +1 -0
  14. package/dist/index.d.mts +1414 -785
  15. package/dist/index.d.ts +1414 -785
  16. package/dist/index.js +7008 -4389
  17. package/dist/index.js.map +1 -1
  18. package/dist/index.mjs +6075 -3767
  19. package/dist/index.mjs.map +1 -1
  20. package/dist/order-labels.d.mts +3 -1
  21. package/dist/order-labels.d.ts +3 -1
  22. package/dist/{parsing-CDtRSxBY.d.mts → parsing-DPEpAszP.d.mts} +2 -2
  23. package/dist/{parsing-BTP4bwkk.d.ts → parsing-EcmCsF1y.d.ts} +2 -2
  24. package/dist/parsing.d.mts +5 -3
  25. package/dist/parsing.d.ts +5 -3
  26. package/dist/parsing.js.map +1 -1
  27. package/dist/parsing.mjs +2 -2
  28. package/dist/{plan-utils-pE4TBwxl.d.mts → plan-utils-BAvW3hvl.d.mts} +212 -43
  29. package/dist/{plan-utils-BFaPo-IT.d.ts → plan-utils-BMyEiDKv.d.ts} +212 -43
  30. package/dist/plan-utils.d.mts +5 -4
  31. package/dist/plan-utils.d.ts +5 -4
  32. package/dist/plan-utils.js +351 -64
  33. package/dist/plan-utils.js.map +1 -1
  34. package/dist/plan-utils.mjs +11 -5
  35. package/dist/testing.d.mts +54 -4
  36. package/dist/testing.d.ts +54 -4
  37. package/dist/testing.js +93 -2
  38. package/dist/testing.js.map +1 -1
  39. package/dist/testing.mjs +91 -2
  40. package/dist/testing.mjs.map +1 -1
  41. package/package.json +2 -1
  42. package/skills/grilling/SKILL.md +6 -16
  43. package/skills/improve-codebase-architecture/SKILL.md +1 -1
  44. package/dist/ApprovalPolicy-BVhGdECT.d.mts +0 -79
  45. package/dist/ApprovalPolicy-BVhGdECT.d.ts +0 -79
  46. package/dist/ITerminalRunner-BV9Rd2o9.d.ts +0 -563
  47. package/dist/ITerminalRunner-C77ZNZS9.d.mts +0 -563
  48. package/dist/Task-Vl5Zq_D-.d.mts +0 -825
  49. package/dist/Task-Vl5Zq_D-.d.ts +0 -825
  50. package/dist/chunk-HD2FWPRV.mjs.map +0 -1
  51. package/dist/chunk-KLN7ELXO.mjs.map +0 -1
  52. package/dist/chunk-T2S5O36I.mjs.map +0 -1
  53. /package/dist/{chunk-UUBGVCGJ.mjs.map → chunk-JBEFAJ2W.mjs.map} +0 -0
@@ -0,0 +1,76 @@
1
+ import { I as IApproval } from './Task-Dyxp67s2.mjs';
2
+
3
+ interface ToolOutcome {
4
+ success: boolean;
5
+ output: string;
6
+ truncated: boolean;
7
+ }
8
+ interface ReadFileOpts {
9
+ maxBytes?: number;
10
+ offset?: number;
11
+ limit?: number;
12
+ }
13
+ /**
14
+ * `content` returns matching lines, `files` only the paths that matched, and
15
+ * `count` a per-file tally. Cheap models otherwise grep and then read whole
16
+ * files to answer "which files touch this", burning rounds against the budget.
17
+ */
18
+ type GrepOutputMode = 'content' | 'files' | 'count';
19
+ interface GrepOptions {
20
+ /** File glob filter, e.g. `*.ts`. */
21
+ include?: string;
22
+ /** Search root. Relative to the workspace unless approved as external. */
23
+ path?: string;
24
+ outputMode?: GrepOutputMode;
25
+ /** Lines of context around each match (`content` mode only). */
26
+ contextBefore?: number;
27
+ contextAfter?: number;
28
+ /** Treat the pattern as a literal string rather than a regex. */
29
+ literal?: boolean;
30
+ caseInsensitive?: boolean;
31
+ /** Global cap on returned rows. Defaults to {@link GREP_DEFAULT_HEAD_LIMIT}. */
32
+ headLimit?: number;
33
+ }
34
+ interface GlobOptions {
35
+ /** Search root. Relative to the workspace unless approved as external. */
36
+ path?: string;
37
+ headLimit?: number;
38
+ }
39
+ interface FindSymbolOptions {
40
+ /** Language id or file extension, e.g. `typescript` or `.go`. Narrows the keyword set. */
41
+ language?: string;
42
+ /** Search root. Relative to the workspace unless approved as external. */
43
+ path?: string;
44
+ }
45
+ /** Global row cap for grep. A per-file cap is not a budget — see PoolFileSystem. */
46
+ declare const GREP_DEFAULT_HEAD_LIMIT = 100;
47
+ /**
48
+ * Directories that are never interesting to a planner and would otherwise eat
49
+ * the result budget. Applied by every search entry point, not just `glob` —
50
+ * `dist/` and `.ordewell/` are frequently not gitignored.
51
+ */
52
+ declare const SEARCH_EXCLUSIONS: string[];
53
+ interface IFileSystem {
54
+ readFile(path: string, opts?: ReadFileOpts): Promise<ToolOutcome>;
55
+ readFiles(paths: string[]): Promise<ToolOutcome>;
56
+ glob(pattern: string, opts?: GlobOptions): Promise<ToolOutcome>;
57
+ grep(pattern: string, opts?: GrepOptions): Promise<ToolOutcome>;
58
+ listDir(path: string, depth?: number): Promise<ToolOutcome>;
59
+ /**
60
+ * `signal` stops the planning turn this command belongs to: adapters kill
61
+ * the spawned child rather than let it run out its own timeout. The other
62
+ * tools here are short enough that the loop's between-call abort check is
63
+ * indistinguishable from cancelling them mid-flight; a `bash` call is not.
64
+ */
65
+ bash(command: string, signal?: AbortSignal): Promise<ToolOutcome>;
66
+ /** Definition-first lookup for one symbol. See `symbolPatterns.ts`. */
67
+ findSymbol(symbol: string, opts?: FindSymbolOptions): Promise<ToolOutcome>;
68
+ getWorkspaceRoot(): string;
69
+ /**
70
+ * Inject the human-approval channel for out-of-envelope access. Optional so
71
+ * test doubles stay small; every adapter extending `BaseFileSystem` has it.
72
+ */
73
+ setApproval?(approval: IApproval): void;
74
+ }
75
+
76
+ export { type FindSymbolOptions as F, GREP_DEFAULT_HEAD_LIMIT as G, type IFileSystem as I, type ReadFileOpts as R, SEARCH_EXCLUSIONS as S, type ToolOutcome as T, type GlobOptions as a, type GrepOptions as b, type GrepOutputMode as c };
@@ -0,0 +1,76 @@
1
+ import { I as IApproval } from './Task-Dyxp67s2.js';
2
+
3
+ interface ToolOutcome {
4
+ success: boolean;
5
+ output: string;
6
+ truncated: boolean;
7
+ }
8
+ interface ReadFileOpts {
9
+ maxBytes?: number;
10
+ offset?: number;
11
+ limit?: number;
12
+ }
13
+ /**
14
+ * `content` returns matching lines, `files` only the paths that matched, and
15
+ * `count` a per-file tally. Cheap models otherwise grep and then read whole
16
+ * files to answer "which files touch this", burning rounds against the budget.
17
+ */
18
+ type GrepOutputMode = 'content' | 'files' | 'count';
19
+ interface GrepOptions {
20
+ /** File glob filter, e.g. `*.ts`. */
21
+ include?: string;
22
+ /** Search root. Relative to the workspace unless approved as external. */
23
+ path?: string;
24
+ outputMode?: GrepOutputMode;
25
+ /** Lines of context around each match (`content` mode only). */
26
+ contextBefore?: number;
27
+ contextAfter?: number;
28
+ /** Treat the pattern as a literal string rather than a regex. */
29
+ literal?: boolean;
30
+ caseInsensitive?: boolean;
31
+ /** Global cap on returned rows. Defaults to {@link GREP_DEFAULT_HEAD_LIMIT}. */
32
+ headLimit?: number;
33
+ }
34
+ interface GlobOptions {
35
+ /** Search root. Relative to the workspace unless approved as external. */
36
+ path?: string;
37
+ headLimit?: number;
38
+ }
39
+ interface FindSymbolOptions {
40
+ /** Language id or file extension, e.g. `typescript` or `.go`. Narrows the keyword set. */
41
+ language?: string;
42
+ /** Search root. Relative to the workspace unless approved as external. */
43
+ path?: string;
44
+ }
45
+ /** Global row cap for grep. A per-file cap is not a budget — see PoolFileSystem. */
46
+ declare const GREP_DEFAULT_HEAD_LIMIT = 100;
47
+ /**
48
+ * Directories that are never interesting to a planner and would otherwise eat
49
+ * the result budget. Applied by every search entry point, not just `glob` —
50
+ * `dist/` and `.ordewell/` are frequently not gitignored.
51
+ */
52
+ declare const SEARCH_EXCLUSIONS: string[];
53
+ interface IFileSystem {
54
+ readFile(path: string, opts?: ReadFileOpts): Promise<ToolOutcome>;
55
+ readFiles(paths: string[]): Promise<ToolOutcome>;
56
+ glob(pattern: string, opts?: GlobOptions): Promise<ToolOutcome>;
57
+ grep(pattern: string, opts?: GrepOptions): Promise<ToolOutcome>;
58
+ listDir(path: string, depth?: number): Promise<ToolOutcome>;
59
+ /**
60
+ * `signal` stops the planning turn this command belongs to: adapters kill
61
+ * the spawned child rather than let it run out its own timeout. The other
62
+ * tools here are short enough that the loop's between-call abort check is
63
+ * indistinguishable from cancelling them mid-flight; a `bash` call is not.
64
+ */
65
+ bash(command: string, signal?: AbortSignal): Promise<ToolOutcome>;
66
+ /** Definition-first lookup for one symbol. See `symbolPatterns.ts`. */
67
+ findSymbol(symbol: string, opts?: FindSymbolOptions): Promise<ToolOutcome>;
68
+ getWorkspaceRoot(): string;
69
+ /**
70
+ * Inject the human-approval channel for out-of-envelope access. Optional so
71
+ * test doubles stay small; every adapter extending `BaseFileSystem` has it.
72
+ */
73
+ setApproval?(approval: IApproval): void;
74
+ }
75
+
76
+ export { type FindSymbolOptions as F, GREP_DEFAULT_HEAD_LIMIT as G, type IFileSystem as I, type ReadFileOpts as R, SEARCH_EXCLUSIONS as S, type ToolOutcome as T, type GlobOptions as a, type GrepOptions as b, type GrepOutputMode as c };
@@ -1,4 +1,4 @@
1
- import { H as RunnerId } from './Task-Vl5Zq_D-.js';
1
+ import { aG as RunnerId } from './Task-Dyxp67s2.mjs';
2
2
 
3
3
  interface RunnerModeInfo {
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import { H as RunnerId } from './Task-Vl5Zq_D-.mjs';
1
+ import { aG as RunnerId } from './Task-Dyxp67s2.js';
2
2
 
3
3
  interface RunnerModeInfo {
4
4
  id: string;