@astrosheep/keiyaku 4.6.3 → 4.6.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.
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-akuma/SKILL.md +47 -11
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-akuma/references/automation.md +2 -2
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-babysit/SKILL.md +1 -1
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-bind/SKILL.md +8 -9
- package/build/integrations/marketplace/plugins/keiyaku/skills/keiyaku-workflow/SKILL.md +37 -25
- package/build/src/akuma/akuma-observe.d.ts +18 -15
- package/build/src/akuma/akuma-observe.js +75 -16
- package/build/src/akuma/akuma-wait.d.ts +4 -3
- package/build/src/akuma/akuma-wait.js +75 -53
- package/build/src/akuma/akuma.d.ts +6 -4
- package/build/src/akuma/akuma.js +4 -0
- package/build/src/akuma/call-initial-tell.d.ts +2 -2
- package/build/src/akuma/call-initial-tell.js +1 -1
- package/build/src/akuma/call-request.d.ts +2 -2
- package/build/src/akuma/heart/index.d.ts +7 -2
- package/build/src/akuma/heart/index.js +50 -5
- package/build/src/akuma/heart/tells.d.ts +33 -2
- package/build/src/akuma/heart/tells.js +24 -18
- package/build/src/akuma/heart/timeline.d.ts +23 -1
- package/build/src/akuma/heart/timeline.js +28 -21
- package/build/src/akuma/projection.d.ts +10 -10
- package/build/src/akuma/providers/pi/index.js +72 -39
- package/build/src/akuma/selection-observation.d.ts +20 -20
- package/build/src/akuma-body.js +1 -0
- package/build/src/alias/index.d.ts +0 -1
- package/build/src/alias/index.js +0 -4
- package/build/src/body/amend.d.ts +0 -4
- package/build/src/body/amend.js +0 -3
- package/build/src/body/region.d.ts +0 -1
- package/build/src/body/region.js +0 -3
- package/build/src/body/verification.d.ts +0 -1
- package/build/src/cli/commands/akuma-grammar.js +23 -66
- package/build/src/cli/commands/akuma.js +17 -30
- package/build/src/cli/commands/contract-grammar.d.ts +14 -1
- package/build/src/cli/commands/contract-grammar.js +54 -21
- package/build/src/cli/commands/contract-help.d.ts +9 -8
- package/build/src/cli/commands/contract-help.js +14 -7
- package/build/src/cli/commands/contract.js +57 -117
- package/build/src/cli/commands/install.d.ts +5 -5
- package/build/src/cli/commands/install.js +1 -4
- package/build/src/cli/commands/task-grammar.js +10 -66
- package/build/src/cli/commands/task.d.ts +0 -1
- package/build/src/cli/commands/task.js +34 -53
- package/build/src/cli/coordinates.d.ts +1 -2
- package/build/src/cli/coordinates.js +1 -4
- package/build/src/cli/parse.d.ts +2 -3
- package/build/src/cli/parse.js +24 -66
- package/build/src/cli/render/akuma.d.ts +3 -16
- package/build/src/cli/render/akuma.js +1 -13
- package/build/src/cli/render/audit.js +1 -1
- package/build/src/cli/render/contract.js +34 -32
- package/build/src/cli/render/kanshi-akuma.d.ts +8 -2
- package/build/src/cli/render/kanshi-akuma.js +14 -7
- package/build/src/cli/render/kanshi.d.ts +3 -1
- package/build/src/cli/render/kanshi.js +44 -32
- package/build/src/cli/render/receipt.js +6 -1
- package/build/src/cli/render/task.d.ts +1 -1
- package/build/src/cli/render/task.js +3 -27
- package/build/src/cli/render/terminal.d.ts +6 -2
- package/build/src/cli/render/terminal.js +8 -2
- package/build/src/cli/runtime.js +3 -16
- package/build/src/cli/scan.d.ts +26 -0
- package/build/src/cli/scan.js +82 -0
- package/build/src/cli/streams.d.ts +5 -0
- package/build/src/cli/streams.js +11 -0
- package/build/src/contract-worktree.js +38 -21
- package/build/src/core/facts/codec.d.ts +1 -2
- package/build/src/core/facts/codec.js +5 -11
- package/build/src/core/facts/types.d.ts +16 -2
- package/build/src/core/facts/types.js +15 -0
- package/build/src/core/verbs/abandon.js +3 -9
- package/build/src/core/verbs/amend.js +2 -9
- package/build/src/core/verbs/arc.js +6 -13
- package/build/src/core/verbs/attestation.js +2 -9
- package/build/src/core/verbs/bind.js +2 -9
- package/build/src/core/verbs/deliver.js +2 -9
- package/build/src/core/verbs/placement.d.ts +1 -1
- package/build/src/core/verbs/placement.js +2 -9
- package/build/src/core/verbs/reintegrate.d.ts +1 -1
- package/build/src/core/verbs/reintegrate.js +2 -9
- package/build/src/dispatch/index.d.ts +2 -2
- package/build/src/dispatch/index.js +33 -11
- package/build/src/git/hooks.d.ts +2 -4
- package/build/src/git/hooks.js +0 -12
- package/build/src/git/integration.d.ts +5 -3
- package/build/src/git/integration.js +36 -25
- package/build/src/git/nuke.js +4 -4
- package/build/src/git/observe.d.ts +4 -4
- package/build/src/git/observe.js +5 -5
- package/build/src/git/process.d.ts +1 -4
- package/build/src/git/process.js +1 -11
- package/build/src/git/read-observation.js +1 -1
- package/build/src/git/reconcile.d.ts +1 -1
- package/build/src/git/reconcile.js +15 -13
- package/build/src/git/repository.d.ts +2 -6
- package/build/src/git/repository.js +18 -31
- package/build/src/git/scratch.d.ts +6 -6
- package/build/src/git/scratch.js +110 -46
- package/build/src/git/target-placement.d.ts +5 -5
- package/build/src/git/target-placement.js +18 -33
- package/build/src/git/tender.d.ts +6 -2
- package/build/src/git/tender.js +19 -12
- package/build/src/git/terminal-reconcile.js +24 -13
- package/build/src/git/terminal-seal.d.ts +2 -5
- package/build/src/git/terminal-seal.js +5 -3
- package/build/src/git/workspace.d.ts +17 -13
- package/build/src/git/workspace.js +58 -41
- package/build/src/kanshi/index.d.ts +2 -2
- package/build/src/kanshi/index.js +1 -1
- package/build/src/kanshi/read.d.ts +8 -1
- package/build/src/kanshi/read.js +72 -7
- package/build/src/kanshi/report.d.ts +12 -0
- package/build/src/library/akuma-creation.d.ts +4 -4
- package/build/src/library/bind.d.ts +1 -63
- package/build/src/library/bind.js +3 -9
- package/build/src/library/contract-creation.js +2 -30
- package/build/src/library/contract-execution.d.ts +0 -1
- package/build/src/library/contract-execution.js +9 -34
- package/build/src/library/contract-operations.d.ts +5 -1
- package/build/src/library/contract-operations.js +7 -3
- package/build/src/library/contract-types.d.ts +1 -1
- package/build/src/library/delivery.d.ts +91 -93
- package/build/src/library/delivery.js +2 -1
- package/build/src/library/input.d.ts +0 -2
- package/build/src/library/input.js +0 -4
- package/build/src/library/invocation.d.ts +0 -1
- package/build/src/library/invocation.js +3 -25
- package/build/src/library/outcome.d.ts +651 -602
- package/build/src/library/outcome.js +4 -4
- package/build/src/library/reconcile.d.ts +6 -0
- package/build/src/library/reconcile.js +31 -1
- package/build/src/library/repo.d.ts +0 -1
- package/build/src/library/selection.d.ts +1 -10
- package/build/src/library/selection.js +14 -15
- package/build/src/protocol/abandon.d.ts +1 -1
- package/build/src/protocol/abandon.js +3 -10
- package/build/src/protocol/amend.js +2 -5
- package/build/src/protocol/arc.d.ts +1 -1
- package/build/src/protocol/arc.js +2 -9
- package/build/src/protocol/attempt.d.ts +3 -20
- package/build/src/protocol/attempt.js +6 -5
- package/build/src/protocol/audit.d.ts +1 -0
- package/build/src/protocol/audit.js +10 -11
- package/build/src/protocol/completion.d.ts +129 -55
- package/build/src/protocol/completion.js +62 -73
- package/build/src/protocol/deliver.d.ts +7 -5
- package/build/src/protocol/deliver.js +74 -44
- package/build/src/protocol/execution-observation.d.ts +2 -4
- package/build/src/protocol/execution-observation.js +3 -7
- package/build/src/protocol/intent.d.ts +1 -1
- package/build/src/protocol/intent.js +1 -0
- package/build/src/protocol/operations.d.ts +24 -12
- package/build/src/protocol/operations.js +36 -15
- package/build/src/protocol/placement.d.ts +2 -1
- package/build/src/protocol/placement.js +21 -5
- package/build/src/protocol/progress.d.ts +1 -1
- package/build/src/protocol/read/status.js +58 -41
- package/build/src/protocol/reintegrate.d.ts +1 -1
- package/build/src/protocol/reintegrate.js +10 -19
- package/build/src/protocol/review.d.ts +3 -28
- package/build/src/protocol/review.js +10 -37
- package/build/src/protocol/run.d.ts +19 -7
- package/build/src/protocol/run.js +19 -9
- package/build/src/runtime/proc/windows-launch.exe +0 -0
- package/build/src/settlement/holder.d.ts +2 -4
- package/build/src/settlement/holder.js +3 -6
- package/build/src/task/board.d.ts +6 -0
- package/build/src/task/board.js +30 -1
- package/build/src/task/catalog.js +1 -4
- package/build/src/task/compose.d.ts +0 -1
- package/build/src/task/compose.js +0 -1
- package/build/src/task/context.d.ts +0 -1
- package/build/src/task/context.js +0 -3
- package/build/src/task/created-observation.d.ts +5 -1
- package/build/src/task/created-observation.js +12 -5
- package/build/src/task/index.d.ts +1 -1
- package/build/src/task/index.js +7 -6
- package/build/src/task/input.d.ts +0 -6
- package/build/src/task/input.js +2 -14
- package/build/src/task/mutation.d.ts +3 -4
- package/build/src/task/mutation.js +11 -39
- package/build/src/task/operations.d.ts +2 -7
- package/build/src/task/operations.js +37 -49
- package/build/src/task/query.d.ts +0 -1
- package/build/src/task/query.js +1 -4
- package/build/src/task/store.d.ts +0 -2
- package/build/src/task/store.js +27 -11
- package/build/src/verification/declaration.js +3 -2
- package/build/src/verification/execution.d.ts +3 -2
- package/build/src/verification/execution.js +10 -6
- package/build/src/workspace-place.d.ts +0 -1
- package/build/src/workspace-place.js +0 -11
- package/package.json +7 -3
|
@@ -28,7 +28,7 @@ function argvFor(declaration) {
|
|
|
28
28
|
return [declaration.executor, ...args];
|
|
29
29
|
}
|
|
30
30
|
function processDiagnostic(declaration, index, outcome) {
|
|
31
|
-
if (outcome.code === 0
|
|
31
|
+
if (outcome.code === 0) {
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
34
34
|
return [
|
|
@@ -118,7 +118,7 @@ async function materializeScratch(input) {
|
|
|
118
118
|
observe(input, { kind: "phase", phase: "materialize", state: "started" });
|
|
119
119
|
try {
|
|
120
120
|
input.signal?.throwIfAborted();
|
|
121
|
-
const scratch = await input.materializeScratchCandidate(input.repository, input.candidate);
|
|
121
|
+
const scratch = await input.materializeScratchCandidate(input.repository, input.candidate, input.contractId);
|
|
122
122
|
observe(input, { kind: "phase", phase: "materialize", state: "finished", cwd: scratch.cwd, outcome: "ok" });
|
|
123
123
|
return scratch;
|
|
124
124
|
}
|
|
@@ -174,7 +174,7 @@ async function runScratch(input, scratch) {
|
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
async function retireScratch(input, scratch, destroy) {
|
|
177
|
+
async function retireScratch(input, scratch, destroy, outcome) {
|
|
178
178
|
observe(input, { kind: "phase", phase: "cleanup", cwd: scratch.cwd, state: "started" });
|
|
179
179
|
let cleanup;
|
|
180
180
|
if (destroy !== undefined) {
|
|
@@ -190,13 +190,14 @@ async function retireScratch(input, scratch, destroy) {
|
|
|
190
190
|
if (result.kind === "failed")
|
|
191
191
|
cleanup = { phase: "destroy", name: result.name, detail: result.failure };
|
|
192
192
|
}
|
|
193
|
-
const
|
|
193
|
+
const retain = outcome.kind === "terminal" ? outcome.verdict === "unsatisfied" : outcome.kind !== "cancelled";
|
|
194
|
+
const leak = await scratch.dispose(retain);
|
|
194
195
|
observe(input, {
|
|
195
196
|
kind: "phase",
|
|
196
197
|
phase: "cleanup",
|
|
197
198
|
cwd: scratch.cwd,
|
|
198
199
|
state: "finished",
|
|
199
|
-
outcome:
|
|
200
|
+
outcome: cleanup !== undefined ? "failed" : retain ? "retained" : leak !== null ? "failed" : "ok",
|
|
200
201
|
});
|
|
201
202
|
return {
|
|
202
203
|
...(cleanup === undefined ? {} : { cleanup }),
|
|
@@ -209,5 +210,8 @@ export async function executeVerification(input) {
|
|
|
209
210
|
if ("outcome" in materialized)
|
|
210
211
|
return materialized;
|
|
211
212
|
const prepared = await runScratch(input, materialized);
|
|
212
|
-
return {
|
|
213
|
+
return {
|
|
214
|
+
outcome: prepared.outcome,
|
|
215
|
+
...(await retireScratch(input, materialized, prepared.destroy, prepared.outcome)),
|
|
216
|
+
};
|
|
213
217
|
}
|
|
@@ -34,7 +34,6 @@ export type PlaceAuthorityFence = Readonly<{
|
|
|
34
34
|
}>;
|
|
35
35
|
export declare function placeRegisterPath(repository: GitRepository): string;
|
|
36
36
|
export declare function place(value: string): Place;
|
|
37
|
-
export declare function nextPlace(current?: Place): Place;
|
|
38
37
|
export declare function canonicalPlaceRegister(register: PlaceRegister): string;
|
|
39
38
|
export declare function decodePlaceRegister(path: string, bytes: string): PlaceRegister;
|
|
40
39
|
export declare function emptyPlaceRegister(): PlaceRegister;
|
|
@@ -221,17 +221,6 @@ export function place(value) {
|
|
|
221
221
|
throw new TypeError(`Place is not canonical: ${value}`);
|
|
222
222
|
return value;
|
|
223
223
|
}
|
|
224
|
-
export function nextPlace(current) {
|
|
225
|
-
if (current === undefined)
|
|
226
|
-
return place(CONTRACT_PLACES[0]);
|
|
227
|
-
const parsed = parsedPlace(current);
|
|
228
|
-
if (parsed === undefined)
|
|
229
|
-
throw new TypeError(`Place is not canonical: ${current}`);
|
|
230
|
-
const index = PLACE_INDEX.get(parsed.base);
|
|
231
|
-
return index + 1 < CONTRACT_PLACES.length
|
|
232
|
-
? composePlace(CONTRACT_PLACES[index + 1], parsed.generation)
|
|
233
|
-
: composePlace(CONTRACT_PLACES[0], parsed.generation + 1n);
|
|
234
|
-
}
|
|
235
224
|
export function canonicalPlaceRegister(register) {
|
|
236
225
|
const appointments = Object.fromEntries(register.appointments
|
|
237
226
|
.slice()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrosheep/keiyaku",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.6",
|
|
4
4
|
"workspaces": [
|
|
5
5
|
"plugins/*"
|
|
6
6
|
],
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"bin": {
|
|
23
|
-
"keiyaku": "build/src/cli/index.js"
|
|
23
|
+
"keiyaku": "build/src/cli/index.js",
|
|
24
|
+
"kei": "build/src/cli/index.js"
|
|
24
25
|
},
|
|
25
26
|
"type": "module",
|
|
26
27
|
"engines": {
|
|
@@ -55,7 +56,11 @@
|
|
|
55
56
|
"test:compile": "node scripts/compile-tests.mjs",
|
|
56
57
|
"test:e2e:built": "node scripts/run-tests.mjs tests/packaged-cli.e2e.ts tests/cli-akuma-packaged.e2e.ts"
|
|
57
58
|
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"@earendil-works/pi-coding-agent": "*"
|
|
61
|
+
},
|
|
58
62
|
"devDependencies": {
|
|
63
|
+
"@earendil-works/pi-coding-agent": "^1.0.0",
|
|
59
64
|
"@types/cross-spawn": "^6.0.6",
|
|
60
65
|
"@types/node": "^25.0.0",
|
|
61
66
|
"@typescript-eslint/parser": "^8.66.0",
|
|
@@ -70,7 +75,6 @@
|
|
|
70
75
|
"@anthropic-ai/claude-agent-sdk": "^0.3.226",
|
|
71
76
|
"@astrosheep/keiyaku-plugin-square": "0.1.7",
|
|
72
77
|
"@astrosheep/square": "^0.3.63",
|
|
73
|
-
"@earendil-works/pi-coding-agent": "^1.0.0",
|
|
74
78
|
"@opencode-ai/sdk": "1.18.3",
|
|
75
79
|
"cross-spawn": "^7.0.6",
|
|
76
80
|
"diff": "^8.0.4",
|