harnery 0.4.0 → 0.6.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/dist/commander.d.ts +10 -0
- package/dist/commander.d.ts.map +1 -1
- package/dist/commander.js +2 -0
- package/dist/commands/agents.d.ts.map +1 -1
- package/dist/commands/agents.js +43 -29
- package/dist/commands/browse-ai.js +1 -1
- package/dist/commands/browse.d.ts.map +1 -1
- package/dist/commands/browse.js +41 -9
- package/dist/commands/completion.d.ts.map +1 -1
- package/dist/commands/completion.js +48 -10
- package/dist/commands/cookies.js +1 -1
- package/dist/commands/decision.d.ts +4 -0
- package/dist/commands/decision.d.ts.map +1 -0
- package/dist/commands/decision.js +354 -0
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +5 -1
- package/dist/commands/fetch.js +1 -1
- package/dist/core/agents/events/consume.d.ts +25 -2
- package/dist/core/agents/events/consume.d.ts.map +1 -1
- package/dist/core/agents/events/consume.js +55 -7
- package/dist/core/agents/events/emit.d.ts +2 -1
- package/dist/core/agents/events/emit.d.ts.map +1 -1
- package/dist/core/agents/events/emit.js +2 -1
- package/dist/core/agents/rules/claim-conflict.d.ts.map +1 -1
- package/dist/core/agents/rules/claim-conflict.js +10 -2
- package/dist/core/agents/state/scratch.d.ts +1 -1
- package/dist/core/agents/state/scratch.js +2 -2
- package/dist/core/hooks/cli.js +4 -10
- package/dist/core/hooks/effects/index.d.ts.map +1 -1
- package/dist/core/hooks/effects/index.js +2 -1
- package/dist/core/hooks/guard-path.d.ts +29 -0
- package/dist/core/hooks/guard-path.d.ts.map +1 -0
- package/dist/core/hooks/guard-path.js +38 -0
- package/dist/lib/agent-browser/client.js +1 -1
- package/dist/lib/browser/client.d.ts +14 -0
- package/dist/lib/browser/client.d.ts.map +1 -1
- package/dist/lib/browser/client.js +20 -0
- package/dist/lib/browser/index.d.ts +1 -0
- package/dist/lib/browser/index.d.ts.map +1 -1
- package/dist/lib/browser/runts.d.ts +44 -0
- package/dist/lib/browser/runts.d.ts.map +1 -0
- package/dist/lib/browser/runts.js +193 -0
- package/dist/lib/completion/bash.d.ts +15 -0
- package/dist/lib/completion/bash.d.ts.map +1 -1
- package/dist/lib/completion/bash.js +35 -0
- package/dist/lib/completion/fish.d.ts +10 -0
- package/dist/lib/completion/fish.d.ts.map +1 -1
- package/dist/lib/completion/fish.js +21 -0
- package/dist/lib/completion/index.d.ts +4 -3
- package/dist/lib/completion/index.d.ts.map +1 -1
- package/dist/lib/completion/index.js +4 -3
- package/dist/lib/completion/resolve.d.ts +52 -0
- package/dist/lib/completion/resolve.d.ts.map +1 -0
- package/dist/lib/completion/resolve.js +171 -0
- package/dist/lib/completion/walk.js +1 -1
- package/dist/lib/completion/zsh.d.ts +8 -0
- package/dist/lib/completion/zsh.d.ts.map +1 -1
- package/dist/lib/completion/zsh.js +33 -0
- package/dist/lib/cookies/client.d.ts +1 -1
- package/dist/lib/cookies/client.d.ts.map +1 -1
- package/dist/lib/cookies/client.js +1 -1
- package/dist/lib/decision/index.d.ts +212 -0
- package/dist/lib/decision/index.d.ts.map +1 -0
- package/dist/lib/decision/index.js +523 -0
- package/dist/lib/docs-lint.d.ts +1 -0
- package/dist/lib/docs-lint.d.ts.map +1 -1
- package/dist/lib/docs-lint.js +55 -0
- package/dist/lib/tunnel/gate.js +1 -1
- package/package.json +3 -1
- package/src/commander.ts +12 -0
- package/src/commands/agents.ts +47 -26
- package/src/commands/browse-ai.ts +1 -1
- package/src/commands/browse.ts +63 -8
- package/src/commands/completion.ts +62 -9
- package/src/commands/cookies.ts +1 -1
- package/src/commands/decision.ts +438 -0
- package/src/commands/docs.ts +5 -1
- package/src/commands/fetch.ts +1 -1
- package/src/core/agents/events/consume.ts +65 -7
- package/src/core/agents/events/emit.ts +2 -1
- package/src/core/agents/rules/claim-conflict.ts +10 -2
- package/src/core/agents/state/scratch.ts +2 -2
- package/src/core/config.ts +1 -1
- package/src/core/hooks/cli.ts +4 -8
- package/src/core/hooks/effects/index.ts +2 -1
- package/src/core/hooks/guard-path.ts +34 -0
- package/src/lib/agent-browser/client.ts +1 -1
- package/src/lib/browser/client.ts +28 -0
- package/src/lib/browser/index.ts +4 -0
- package/src/lib/browser/runts.ts +218 -0
- package/src/lib/completion/bash.ts +36 -0
- package/src/lib/completion/fish.ts +22 -0
- package/src/lib/completion/index.ts +12 -3
- package/src/lib/completion/resolve.ts +210 -0
- package/src/lib/completion/walk.ts +1 -1
- package/src/lib/completion/zsh.ts +34 -0
- package/src/lib/cookies/client.ts +2 -2
- package/src/lib/decision/index.ts +685 -0
- package/src/lib/docs-lint.ts +49 -0
- package/src/lib/tunnel/gate.ts +1 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime completion resolver — the authoritative, in-process answer to
|
|
3
|
+
* "what should I suggest at this cursor position?".
|
|
4
|
+
*
|
|
5
|
+
* The static bash/zsh/fish generators bake the whole command tree into shell
|
|
6
|
+
* case-tables, which go stale the moment a command/flag is added (the script
|
|
7
|
+
* must be regenerated + reinstalled). The DYNAMIC completion path instead
|
|
8
|
+
* installs a thin, tree-independent shim that, on every <Tab>, hands the live
|
|
9
|
+
* command line back to the binary and calls THIS function. Because the binary
|
|
10
|
+
* always knows its own current command tree, a dynamic shim never goes stale —
|
|
11
|
+
* install once, ever.
|
|
12
|
+
*
|
|
13
|
+
* This mirrors the path-walking the static bash driver does, but in one place
|
|
14
|
+
* and in TypeScript, so all three shells share identical behavior. It is
|
|
15
|
+
* deliberately decoupled from Commander internals via the CommandSpec tree
|
|
16
|
+
* (walkProgram), exactly like the static generators.
|
|
17
|
+
*/
|
|
18
|
+
import type { Command } from "commander";
|
|
19
|
+
import { type CompletionContextLookup } from "./walk.js";
|
|
20
|
+
/** Bitmask of post-processing hints for the shell shim (Cobra-style). */
|
|
21
|
+
export declare const Directive: {
|
|
22
|
+
/** Use the returned candidates as completion values. */
|
|
23
|
+
readonly Default: 0;
|
|
24
|
+
/** No candidates apply here — the shell should fall back to file completion. */
|
|
25
|
+
readonly File: 1;
|
|
26
|
+
};
|
|
27
|
+
export interface Candidate {
|
|
28
|
+
value: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface CompletionResult {
|
|
32
|
+
candidates: Candidate[];
|
|
33
|
+
directive: number;
|
|
34
|
+
}
|
|
35
|
+
/** Provider runner injected by the host CLI (same contract as `__complete`). */
|
|
36
|
+
export type CompletionProviderRunner = (provider: string, partial: string) => Promise<string[]>;
|
|
37
|
+
/**
|
|
38
|
+
* Compute completion candidates for `words` with the cursor at `cword`.
|
|
39
|
+
* `words[0]` is the bin name; `words[cword]` is the (possibly empty) token
|
|
40
|
+
* being completed. The shell shim does the final prefix-filtering against that
|
|
41
|
+
* token, so this returns the full candidate set for the slot.
|
|
42
|
+
*/
|
|
43
|
+
export declare function resolveCompletions(program: Command, words: string[], cword: number, lookup: CompletionContextLookup, runProvider: CompletionProviderRunner): Promise<CompletionResult>;
|
|
44
|
+
/** Sentinel prefix for the trailing directive line in the wire protocol. */
|
|
45
|
+
export declare const DIRECTIVE_PREFIX = "\u001F:";
|
|
46
|
+
/**
|
|
47
|
+
* Serialize a result for the shell shim: one `value\tdescription` line per
|
|
48
|
+
* candidate, then a final `\x1f:<directive>` line. The \x1f (unit separator)
|
|
49
|
+
* prefix makes the directive line unambiguous against real candidate values.
|
|
50
|
+
*/
|
|
51
|
+
export declare function encodeResult(result: CompletionResult): string;
|
|
52
|
+
//# sourceMappingURL=resolve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../src/lib/completion/resolve.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAoB,KAAK,uBAAuB,EAAe,MAAM,WAAW,CAAC;AAExF,yEAAyE;AACzE,eAAO,MAAM,SAAS;IACpB,wDAAwD;;IAExD,gFAAgF;;CAExE,CAAC;AAEX,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,gFAAgF;AAChF,MAAM,MAAM,wBAAwB,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AAiGhG;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,MAAM,EAAE,EACf,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,uBAAuB,EAC/B,WAAW,EAAE,wBAAwB,GACpC,OAAO,CAAC,gBAAgB,CAAC,CA4C3B;AAED,4EAA4E;AAC5E,eAAO,MAAM,gBAAgB,YAAU,CAAC;AAExC;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAM7D"}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime completion resolver — the authoritative, in-process answer to
|
|
3
|
+
* "what should I suggest at this cursor position?".
|
|
4
|
+
*
|
|
5
|
+
* The static bash/zsh/fish generators bake the whole command tree into shell
|
|
6
|
+
* case-tables, which go stale the moment a command/flag is added (the script
|
|
7
|
+
* must be regenerated + reinstalled). The DYNAMIC completion path instead
|
|
8
|
+
* installs a thin, tree-independent shim that, on every <Tab>, hands the live
|
|
9
|
+
* command line back to the binary and calls THIS function. Because the binary
|
|
10
|
+
* always knows its own current command tree, a dynamic shim never goes stale —
|
|
11
|
+
* install once, ever.
|
|
12
|
+
*
|
|
13
|
+
* This mirrors the path-walking the static bash driver does, but in one place
|
|
14
|
+
* and in TypeScript, so all three shells share identical behavior. It is
|
|
15
|
+
* deliberately decoupled from Commander internals via the CommandSpec tree
|
|
16
|
+
* (walkProgram), exactly like the static generators.
|
|
17
|
+
*/
|
|
18
|
+
import { walkProgram } from "./walk.js";
|
|
19
|
+
/** Bitmask of post-processing hints for the shell shim (Cobra-style). */
|
|
20
|
+
export const Directive = {
|
|
21
|
+
/** Use the returned candidates as completion values. */
|
|
22
|
+
Default: 0,
|
|
23
|
+
/** No candidates apply here — the shell should fall back to file completion. */
|
|
24
|
+
File: 1,
|
|
25
|
+
};
|
|
26
|
+
function buildTables(root) {
|
|
27
|
+
const subcommandsByPath = new Map();
|
|
28
|
+
const optionsByPath = new Map();
|
|
29
|
+
const positionalsByPath = new Map();
|
|
30
|
+
const walk = (s) => {
|
|
31
|
+
subcommandsByPath.set(s.path, s.subcommands);
|
|
32
|
+
optionsByPath.set(s.path, s.options);
|
|
33
|
+
positionalsByPath.set(s.path, s.positionals);
|
|
34
|
+
for (const sub of s.subcommands)
|
|
35
|
+
walk(sub);
|
|
36
|
+
};
|
|
37
|
+
walk(root);
|
|
38
|
+
return { subcommandsByPath, optionsByPath, positionalsByPath };
|
|
39
|
+
}
|
|
40
|
+
function optionAt(tables, path, flag) {
|
|
41
|
+
const opts = tables.optionsByPath.get(path) ?? [];
|
|
42
|
+
return opts.find((o) => o.long === flag || o.short === flag);
|
|
43
|
+
}
|
|
44
|
+
function isKnownSubcommand(tables, path, name) {
|
|
45
|
+
return (tables.subcommandsByPath.get(path) ?? []).some((c) => c.name === name);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Walk the words before the cursor to determine the current command path,
|
|
49
|
+
* skipping options and the values they consume (mirrors the static driver).
|
|
50
|
+
* Returns the resolved command path ("" = root).
|
|
51
|
+
*/
|
|
52
|
+
function resolvePath(tables, words, cword) {
|
|
53
|
+
let path = "";
|
|
54
|
+
let i = 1; // words[0] is the bin name
|
|
55
|
+
while (i < cword) {
|
|
56
|
+
const w = words[i] ?? "";
|
|
57
|
+
if (w.startsWith("-")) {
|
|
58
|
+
const opt = optionAt(tables, path, w);
|
|
59
|
+
if (opt?.takesValue)
|
|
60
|
+
i += 1; // skip the option's value
|
|
61
|
+
}
|
|
62
|
+
else if (isKnownSubcommand(tables, path, w)) {
|
|
63
|
+
path = path ? `${path} ${w}` : w;
|
|
64
|
+
}
|
|
65
|
+
i += 1;
|
|
66
|
+
}
|
|
67
|
+
return path;
|
|
68
|
+
}
|
|
69
|
+
/** Count positional args consumed at the resolved path (non-option, non-subcommand words). */
|
|
70
|
+
function positionalIndex(tables, words, cword) {
|
|
71
|
+
let seen = "";
|
|
72
|
+
let after = 0;
|
|
73
|
+
let j = 1;
|
|
74
|
+
while (j < cword) {
|
|
75
|
+
const w = words[j] ?? "";
|
|
76
|
+
if (w.startsWith("-")) {
|
|
77
|
+
const opt = optionAt(tables, seen, w);
|
|
78
|
+
if (opt?.takesValue)
|
|
79
|
+
j += 1;
|
|
80
|
+
}
|
|
81
|
+
else if (isKnownSubcommand(tables, seen, w)) {
|
|
82
|
+
seen = seen ? `${seen} ${w}` : w;
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
after += 1;
|
|
86
|
+
}
|
|
87
|
+
j += 1;
|
|
88
|
+
}
|
|
89
|
+
return after;
|
|
90
|
+
}
|
|
91
|
+
/** Resolve the value source (enum / dynamic-provider / file) for a value slot. */
|
|
92
|
+
async function valueCandidates(source, partial, runProvider) {
|
|
93
|
+
if (source.dynamicProvider) {
|
|
94
|
+
try {
|
|
95
|
+
const values = await runProvider(source.dynamicProvider, partial);
|
|
96
|
+
return { candidates: values.map((value) => ({ value })), directive: Directive.Default };
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
return { candidates: [], directive: Directive.File };
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if (source.valueChoices && source.valueChoices.length > 0) {
|
|
103
|
+
return {
|
|
104
|
+
candidates: source.valueChoices.map((value) => ({ value })),
|
|
105
|
+
directive: Directive.Default,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
// A value is expected but we have nothing to suggest → let the shell try files.
|
|
109
|
+
return { candidates: [], directive: Directive.File };
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Compute completion candidates for `words` with the cursor at `cword`.
|
|
113
|
+
* `words[0]` is the bin name; `words[cword]` is the (possibly empty) token
|
|
114
|
+
* being completed. The shell shim does the final prefix-filtering against that
|
|
115
|
+
* token, so this returns the full candidate set for the slot.
|
|
116
|
+
*/
|
|
117
|
+
export async function resolveCompletions(program, words, cword, lookup, runProvider) {
|
|
118
|
+
const tables = buildTables(walkProgram(program, lookup));
|
|
119
|
+
const path = resolvePath(tables, words, cword);
|
|
120
|
+
const cur = words[cword] ?? "";
|
|
121
|
+
const prev = cword > 0 ? (words[cword - 1] ?? "") : "";
|
|
122
|
+
// Case 1: previous word is an option that takes a value → complete the value.
|
|
123
|
+
if (prev.startsWith("-")) {
|
|
124
|
+
const opt = optionAt(tables, path, prev);
|
|
125
|
+
if (opt?.takesValue)
|
|
126
|
+
return valueCandidates(opt, cur, runProvider);
|
|
127
|
+
}
|
|
128
|
+
// Case 2: completing an option name (cur starts with "-").
|
|
129
|
+
if (cur.startsWith("-")) {
|
|
130
|
+
const opts = tables.optionsByPath.get(path) ?? [];
|
|
131
|
+
const candidates = [];
|
|
132
|
+
for (const o of opts) {
|
|
133
|
+
if (o.long)
|
|
134
|
+
candidates.push({ value: o.long, description: o.description });
|
|
135
|
+
if (o.short)
|
|
136
|
+
candidates.push({ value: o.short, description: o.description });
|
|
137
|
+
}
|
|
138
|
+
return { candidates, directive: Directive.Default };
|
|
139
|
+
}
|
|
140
|
+
// Case 3: subcommands available at this path → suggest them.
|
|
141
|
+
const subs = tables.subcommandsByPath.get(path) ?? [];
|
|
142
|
+
if (subs.length > 0) {
|
|
143
|
+
return {
|
|
144
|
+
candidates: subs.map((c) => ({ value: c.name, description: c.description })),
|
|
145
|
+
directive: Directive.Default,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
// Case 4: positional value slot.
|
|
149
|
+
const positionals = tables.positionalsByPath.get(path) ?? [];
|
|
150
|
+
const idx = positionalIndex(tables, words, cword);
|
|
151
|
+
const pos = positionals[idx] ??
|
|
152
|
+
(positionals[positionals.length - 1]?.variadic
|
|
153
|
+
? positionals[positionals.length - 1]
|
|
154
|
+
: undefined);
|
|
155
|
+
if (pos)
|
|
156
|
+
return valueCandidates(pos, cur, runProvider);
|
|
157
|
+
// Nothing structured to suggest → file completion.
|
|
158
|
+
return { candidates: [], directive: Directive.File };
|
|
159
|
+
}
|
|
160
|
+
/** Sentinel prefix for the trailing directive line in the wire protocol. */
|
|
161
|
+
export const DIRECTIVE_PREFIX = "\x1f:";
|
|
162
|
+
/**
|
|
163
|
+
* Serialize a result for the shell shim: one `value\tdescription` line per
|
|
164
|
+
* candidate, then a final `\x1f:<directive>` line. The \x1f (unit separator)
|
|
165
|
+
* prefix makes the directive line unambiguous against real candidate values.
|
|
166
|
+
*/
|
|
167
|
+
export function encodeResult(result) {
|
|
168
|
+
const lines = result.candidates.map((c) => c.description ? `${c.value}\t${c.description}` : c.value);
|
|
169
|
+
lines.push(`${DIRECTIVE_PREFIX}${result.directive}`);
|
|
170
|
+
return `${lines.join("\n")}\n`;
|
|
171
|
+
}
|
|
@@ -18,7 +18,7 @@ function walkCommand(cmd, parentPath, isRoot, lookup) {
|
|
|
18
18
|
// The root program represents `harn` itself; its path stays empty so that
|
|
19
19
|
// top-level subcommands have paths like "anthropic", not "harn anthropic".
|
|
20
20
|
// The shell driver walks COMP_WORDS[1..], so it's already operating in
|
|
21
|
-
// post-`harn` space and shouldn't see
|
|
21
|
+
// post-`harn` space and shouldn't see the host bin name in its lookup keys.
|
|
22
22
|
const path = isRoot ? "" : parentPath ? `${parentPath} ${name}` : name;
|
|
23
23
|
const subcommands = cmd.commands
|
|
24
24
|
.filter((c) => !isHidden(c))
|
|
@@ -10,4 +10,12 @@
|
|
|
10
10
|
*/
|
|
11
11
|
import type { CommandSpec } from "./walk.js";
|
|
12
12
|
export declare function generateZsh(root: CommandSpec, binName: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* DYNAMIC zsh completion: a thin, tree-independent shim that calls
|
|
15
|
+
* `<bin> __complete-line` on every <Tab> (see bash.ts generateBashDynamic for
|
|
16
|
+
* the rationale). Candidate lines are `value\tdescription`; the shim converts
|
|
17
|
+
* the tab to `:` so `_describe` renders descriptions. The trailing `\x1f:<n>`
|
|
18
|
+
* line carries the directive (bit 0 = file fallback → `_files`).
|
|
19
|
+
*/
|
|
20
|
+
export declare function generateZshDynamic(binName: string): string;
|
|
13
21
|
//# sourceMappingURL=zsh.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zsh.d.ts","sourceRoot":"","sources":["../../../src/lib/completion/zsh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAA8B,MAAM,WAAW,CAAC;AAwBzE,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAsGtE"}
|
|
1
|
+
{"version":3,"file":"zsh.d.ts","sourceRoot":"","sources":["../../../src/lib/completion/zsh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,WAAW,EAA8B,MAAM,WAAW,CAAC;AAwBzE,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAsGtE;AAOD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAyB1D"}
|
|
@@ -129,6 +129,39 @@ function truncate(s, n) {
|
|
|
129
129
|
return "";
|
|
130
130
|
return s.length > n ? `${s.slice(0, n - 1)}…` : s;
|
|
131
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* DYNAMIC zsh completion: a thin, tree-independent shim that calls
|
|
134
|
+
* `<bin> __complete-line` on every <Tab> (see bash.ts generateBashDynamic for
|
|
135
|
+
* the rationale). Candidate lines are `value\tdescription`; the shim converts
|
|
136
|
+
* the tab to `:` so `_describe` renders descriptions. The trailing `\x1f:<n>`
|
|
137
|
+
* line carries the directive (bit 0 = file fallback → `_files`).
|
|
138
|
+
*/
|
|
139
|
+
export function generateZshDynamic(binName) {
|
|
140
|
+
const fn = fnPrefix(binName);
|
|
141
|
+
return `#compdef ${binName}
|
|
142
|
+
# ${binName} zsh completion (dynamic; install once, never stale). Do not edit.
|
|
143
|
+
${fn}() {
|
|
144
|
+
emulate -L zsh
|
|
145
|
+
local line directive=0
|
|
146
|
+
local -a raw display
|
|
147
|
+
raw=( "\${(@f)$(${binName} __complete-line $((CURRENT-1)) -- "\${words[@]}" 2>/dev/null)}" )
|
|
148
|
+
for line in $raw; do
|
|
149
|
+
[ -z "$line" ] && continue
|
|
150
|
+
if [[ "$line" == $'\\x1f:'* ]]; then
|
|
151
|
+
directive="\${line#$'\\x1f:'}"
|
|
152
|
+
else
|
|
153
|
+
display+=( "\${line//$'\\t'/:}" )
|
|
154
|
+
fi
|
|
155
|
+
done
|
|
156
|
+
if (( directive & 1 )); then
|
|
157
|
+
_files
|
|
158
|
+
return
|
|
159
|
+
fi
|
|
160
|
+
_describe -t values 'completions' display
|
|
161
|
+
}
|
|
162
|
+
compdef ${fn} ${binName}
|
|
163
|
+
`;
|
|
164
|
+
}
|
|
132
165
|
/**
|
|
133
166
|
* The driver walks `$words` to determine the current command path, then
|
|
134
167
|
* dispatches to subcommand / option / value completion. `fn` is the
|
|
@@ -37,7 +37,7 @@ export interface CookieStore {
|
|
|
37
37
|
export interface CookieJarOptions {
|
|
38
38
|
/** Absolute path to the JSON store. Caller must provide. */
|
|
39
39
|
path: string;
|
|
40
|
-
/** `exportedFrom` tag stamped on every save. Defaults to `"
|
|
40
|
+
/** `exportedFrom` tag stamped on every save. Defaults to `"harn-cookies"`. */
|
|
41
41
|
source?: string;
|
|
42
42
|
}
|
|
43
43
|
export interface InfoResult {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/lib/cookies/client.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AAEH,4EAA4E;AAC5E,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACjD;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC/B,4DAA4D;IAC5D,IAAI,EAAE,MAAM,CAAC;IACb,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/lib/cookies/client.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AAEH,4EAA4E;AAC5E,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,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 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decision docket: a persistent queue of decisions an agent would otherwise
|
|
3
|
+
* route to a human, plus the lifecycle that carries each one from filing to a
|
|
4
|
+
* reviewed, graduated resolution.
|
|
5
|
+
*
|
|
6
|
+
* State layout (mirrors councils):
|
|
7
|
+
* - `.harnery/decisions/<id>.json` — one manifest per decision
|
|
8
|
+
* - `.harnery/decisions/<id>/` — long-form bodies (brief, options,
|
|
9
|
+
* evidence write-up) as markdown
|
|
10
|
+
* - `.harnery/decisions/archive/` — graduated / terminal decisions move here
|
|
11
|
+
*
|
|
12
|
+
* This module is the engine only. It stores `tier` (0/1/2) and `stakes` as
|
|
13
|
+
* opaque typed fields; what those *mean* — which decisions belong to which
|
|
14
|
+
* tier — is host policy, applied by the filing agent, never encoded here. That
|
|
15
|
+
* keeps the docket generic across host projects.
|
|
16
|
+
*
|
|
17
|
+
* Every function takes `coordRoot` explicitly (the council pattern) so the
|
|
18
|
+
* state machine is trivially testable against a tmpdir. The command layer
|
|
19
|
+
* resolves the root once via `monorepoRoot()` and threads it down.
|
|
20
|
+
*
|
|
21
|
+
* Concurrency: one file per decision (no shared index to contend on) + atomic
|
|
22
|
+
* temp→rename writes. `claim` is last-writer-wins — deliberating the same
|
|
23
|
+
* decision twice wastes tokens, not correctness.
|
|
24
|
+
*/
|
|
25
|
+
export declare const DECISION_SCHEMA_VERSION: 1;
|
|
26
|
+
/** Tier of human-involvement. Meaning is host policy; the engine only stores it. */
|
|
27
|
+
export declare const DECISION_TIERS: readonly [0, 1, 2];
|
|
28
|
+
export type DecisionTier = (typeof DECISION_TIERS)[number];
|
|
29
|
+
export declare const DECISION_STAKES: readonly ["small", "medium", "high"];
|
|
30
|
+
export type DecisionStakes = (typeof DECISION_STAKES)[number];
|
|
31
|
+
export declare const DECISION_STATUSES: readonly ["filed", "triaged", "deliberating", "resolved", "enacted", "reviewed", "archived", "superseded", "wontfix"];
|
|
32
|
+
export type DecisionStatus = (typeof DECISION_STATUSES)[number];
|
|
33
|
+
export declare const REVIEW_VERDICTS: readonly ["ratified", "overridden", "wrong-tier-high", "wrong-tier-low"];
|
|
34
|
+
export type ReviewVerdict = (typeof REVIEW_VERDICTS)[number];
|
|
35
|
+
export declare const TERMINAL_STATUSES: readonly DecisionStatus[];
|
|
36
|
+
/**
|
|
37
|
+
* Legal status transitions. `superseded` is reachable from any non-terminal
|
|
38
|
+
* state (a decision can be obsoleted at any point); `wontfix` closes an
|
|
39
|
+
* un-deliberated decision. `deliberating → triaged` allows the sweeper to
|
|
40
|
+
* re-triage a decision's tier on first touch (the self-triage safeguard).
|
|
41
|
+
*/
|
|
42
|
+
export declare const LEGAL_TRANSITIONS: Record<DecisionStatus, readonly DecisionStatus[]>;
|
|
43
|
+
export interface DecisionResolution {
|
|
44
|
+
recommendation: string;
|
|
45
|
+
confidence?: string;
|
|
46
|
+
reversal_cost?: string;
|
|
47
|
+
/** What would make this resolution wrong (the pre-mortem). */
|
|
48
|
+
wrong_if?: string;
|
|
49
|
+
/** When this should be revisited (a trigger, not a date). */
|
|
50
|
+
revisit_when?: string;
|
|
51
|
+
/** Citations: queries run, files read, costs computed. Required (≥1). */
|
|
52
|
+
evidence: string[];
|
|
53
|
+
resolved_by: string;
|
|
54
|
+
resolved_at: string;
|
|
55
|
+
}
|
|
56
|
+
export interface DecisionReview {
|
|
57
|
+
verdict: ReviewVerdict;
|
|
58
|
+
note?: string;
|
|
59
|
+
reviewed_at: string;
|
|
60
|
+
}
|
|
61
|
+
export interface DecisionManifest {
|
|
62
|
+
schema_version: typeof DECISION_SCHEMA_VERSION;
|
|
63
|
+
decision_id: string;
|
|
64
|
+
status: DecisionStatus;
|
|
65
|
+
/** Provisional at file time; the sweeper may re-check on claim. */
|
|
66
|
+
tier: DecisionTier;
|
|
67
|
+
stakes: DecisionStakes;
|
|
68
|
+
question: string;
|
|
69
|
+
context?: string;
|
|
70
|
+
/** What the filer proceeded with under always-proceed (tier 0/1), or null. */
|
|
71
|
+
default_taken?: string | null;
|
|
72
|
+
/** Agent name (e.g. "agent-Quill"), for display. */
|
|
73
|
+
filed_by?: string;
|
|
74
|
+
/** Filer instance_id. */
|
|
75
|
+
filed_by_id?: string;
|
|
76
|
+
filed_at: string;
|
|
77
|
+
/** Deliberator (agent instance_id or a sweeper session), or null. */
|
|
78
|
+
claimed_by?: string | null;
|
|
79
|
+
/** Set when escalated to a council. */
|
|
80
|
+
council_id?: string | null;
|
|
81
|
+
resolution?: DecisionResolution | null;
|
|
82
|
+
review?: DecisionReview | null;
|
|
83
|
+
/** Where the resolved output graduated (e.g. "docs/decisions.md#…"), or null. */
|
|
84
|
+
graduated_to?: string | null;
|
|
85
|
+
/** Set when superseded by another decision. */
|
|
86
|
+
superseded_by?: string | null;
|
|
87
|
+
/** Reason recorded on wontfix. */
|
|
88
|
+
wontfix_reason?: string | null;
|
|
89
|
+
updated_at?: string;
|
|
90
|
+
[extra: string]: unknown;
|
|
91
|
+
}
|
|
92
|
+
export interface DecisionOpResult {
|
|
93
|
+
ok: boolean;
|
|
94
|
+
reason?: string;
|
|
95
|
+
manifest?: DecisionManifest;
|
|
96
|
+
}
|
|
97
|
+
export declare function isTier(n: unknown): n is DecisionTier;
|
|
98
|
+
export declare function isStakes(s: unknown): s is DecisionStakes;
|
|
99
|
+
export declare function isStatus(s: unknown): s is DecisionStatus;
|
|
100
|
+
export declare function isVerdict(v: unknown): v is ReviewVerdict;
|
|
101
|
+
export declare function isTerminal(status: DecisionStatus): boolean;
|
|
102
|
+
export declare function canTransition(from: DecisionStatus, to: DecisionStatus): boolean;
|
|
103
|
+
export declare function decisionsDir(coordRoot: string): string;
|
|
104
|
+
export declare function archiveDir(coordRoot: string): string;
|
|
105
|
+
export declare function manifestPath(coordRoot: string, id: string): string;
|
|
106
|
+
export declare function archivedManifestPath(coordRoot: string, id: string): string;
|
|
107
|
+
export declare function decisionBodyDir(coordRoot: string, id: string): string;
|
|
108
|
+
/**
|
|
109
|
+
* Kebab-case slug from question text: first 5 words, lowercased,
|
|
110
|
+
* non-alphanumerics stripped. Local (not imported from council) so the module
|
|
111
|
+
* stays standalone.
|
|
112
|
+
*/
|
|
113
|
+
export declare function deriveSlug(question: string): string;
|
|
114
|
+
/**
|
|
115
|
+
* Build a decision_id: `<slug>-<YYYY-MM-DD>-<4hex>`. The hex suffix is
|
|
116
|
+
* crypto-random (not a hash of the question) so two decisions sharing a
|
|
117
|
+
* slug + date don't collide.
|
|
118
|
+
*/
|
|
119
|
+
export declare function buildDecisionId(question: string, now?: Date): string;
|
|
120
|
+
/**
|
|
121
|
+
* Read a manifest by id, checking the active dir then the archive. Returns null
|
|
122
|
+
* if absent or unparseable. Throws on an unsupported schema_version (fail loud
|
|
123
|
+
* on a real-but-incompatible manifest, the way councils do).
|
|
124
|
+
*/
|
|
125
|
+
export declare function readManifest(coordRoot: string, id: string): DecisionManifest | null;
|
|
126
|
+
export declare function writeManifest(coordRoot: string, manifest: DecisionManifest): void;
|
|
127
|
+
export interface FileDecisionInput {
|
|
128
|
+
question: string;
|
|
129
|
+
tier: DecisionTier;
|
|
130
|
+
stakes: DecisionStakes;
|
|
131
|
+
context?: string;
|
|
132
|
+
defaultTaken?: string;
|
|
133
|
+
filedBy?: string;
|
|
134
|
+
filedById?: string;
|
|
135
|
+
/** Long-form brief written to `<id>/brief.md`. */
|
|
136
|
+
brief?: string;
|
|
137
|
+
now?: Date;
|
|
138
|
+
}
|
|
139
|
+
export declare function fileDecision(coordRoot: string, input: FileDecisionInput): DecisionOpResult;
|
|
140
|
+
export declare function triageDecision(coordRoot: string, id: string, opts: {
|
|
141
|
+
tier?: DecisionTier;
|
|
142
|
+
stakes?: DecisionStakes;
|
|
143
|
+
}): DecisionOpResult;
|
|
144
|
+
export declare function claimDecision(coordRoot: string, id: string, owner: string): DecisionOpResult;
|
|
145
|
+
export declare function escalateToCouncil(coordRoot: string, id: string, councilId: string): DecisionOpResult;
|
|
146
|
+
/**
|
|
147
|
+
* Resolve a decision. Evidence is required (≥1 citation): a resolution with no
|
|
148
|
+
* cited evidence is structurally incomplete and bounced here — the same guard
|
|
149
|
+
* the sweeper enforces.
|
|
150
|
+
*/
|
|
151
|
+
export declare function resolveDecision(coordRoot: string, id: string, resolution: Omit<DecisionResolution, "resolved_at"> & {
|
|
152
|
+
resolved_at?: string;
|
|
153
|
+
}): DecisionOpResult;
|
|
154
|
+
export declare function enactDecision(coordRoot: string, id: string): DecisionOpResult;
|
|
155
|
+
export declare function reviewDecision(coordRoot: string, id: string, opts: {
|
|
156
|
+
verdict: ReviewVerdict;
|
|
157
|
+
note?: string;
|
|
158
|
+
}): DecisionOpResult;
|
|
159
|
+
export declare function supersedeDecision(coordRoot: string, id: string, bySupersedingId?: string): DecisionOpResult;
|
|
160
|
+
export declare function wontfixDecision(coordRoot: string, id: string, reason?: string): DecisionOpResult;
|
|
161
|
+
/**
|
|
162
|
+
* Archive a decision (terminal). Records where its output graduated, then moves
|
|
163
|
+
* manifest + body dir into `archive/`. Idempotent-ish: safe to re-run.
|
|
164
|
+
*/
|
|
165
|
+
export declare function archiveDecision(coordRoot: string, id: string, graduatedTo?: string): DecisionOpResult;
|
|
166
|
+
/**
|
|
167
|
+
* Reopen an archived decision back to `reviewed` — the inverse of `archive`,
|
|
168
|
+
* and the one sanctioned way out of the (otherwise terminal) archived state.
|
|
169
|
+
* Since `archived` has no legal outgoing transition, this deliberately bypasses
|
|
170
|
+
* the `transition` guard, the same way `archive` does its file moves outside it.
|
|
171
|
+
* Moves the manifest + body dir back from `archive/` into the active dir and
|
|
172
|
+
* clears `graduated_to` (a re-archive sets it fresh). Only `archived` decisions
|
|
173
|
+
* reopen; `superseded`/`wontfix` stay terminal.
|
|
174
|
+
*
|
|
175
|
+
* Ordering is write-active-then-remove-archived so an interrupted call leaves
|
|
176
|
+
* the decision reopened (active copy wins in `readManifest`) rather than lost.
|
|
177
|
+
*/
|
|
178
|
+
export declare function reopenDecision(coordRoot: string, id: string): DecisionOpResult;
|
|
179
|
+
export interface ListFilter {
|
|
180
|
+
status?: DecisionStatus;
|
|
181
|
+
tier?: DecisionTier;
|
|
182
|
+
stakes?: DecisionStakes;
|
|
183
|
+
/** Only non-terminal decisions (the live queue). */
|
|
184
|
+
openOnly?: boolean;
|
|
185
|
+
/** Include the archive dir in the scan (default: active only). */
|
|
186
|
+
includeArchived?: boolean;
|
|
187
|
+
}
|
|
188
|
+
export declare function listDecisions(coordRoot: string, filter?: ListFilter): DecisionManifest[];
|
|
189
|
+
export interface DecisionDetail {
|
|
190
|
+
manifest: DecisionManifest;
|
|
191
|
+
bodies: {
|
|
192
|
+
name: string;
|
|
193
|
+
content: string;
|
|
194
|
+
}[];
|
|
195
|
+
archived: boolean;
|
|
196
|
+
}
|
|
197
|
+
export declare function showDecision(coordRoot: string, id: string): DecisionDetail | null;
|
|
198
|
+
export interface SearchHit {
|
|
199
|
+
manifest: DecisionManifest;
|
|
200
|
+
/** A short surrounding snippet of the first match. */
|
|
201
|
+
snippet: string;
|
|
202
|
+
/** Where the match landed. */
|
|
203
|
+
where: "question" | "context" | "resolution" | "body";
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Case-insensitive substring search over manifests + bodies. Deliberately
|
|
207
|
+
* dumb: precedent recall depends on the host's decision skill running this before
|
|
208
|
+
* filing, not on ranking sophistication. Includes the archive (precedent
|
|
209
|
+
* lives there).
|
|
210
|
+
*/
|
|
211
|
+
export declare function searchDecisions(coordRoot: string, query: string): SearchHit[];
|
|
212
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/decision/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAgBH,eAAO,MAAM,uBAAuB,EAAG,CAAU,CAAC;AAElD,oFAAoF;AACpF,eAAO,MAAM,cAAc,oBAAqB,CAAC;AACjD,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC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