@cluesmith/codev 3.3.1 → 3.3.3
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/dashboard-dist/assets/{index-D3XaKpZW.js → index-CUIjS_Vb.js} +41 -41
- package/dashboard-dist/assets/index-CUIjS_Vb.js.map +1 -0
- package/dashboard-dist/assets/index-DnYLy5C_.css +32 -0
- package/dashboard-dist/index.html +2 -2
- package/dist/agent-farm/cli.d.ts.map +1 -1
- package/dist/agent-farm/cli.js +52 -1
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/inbox.d.ts.map +1 -1
- package/dist/agent-farm/commands/inbox.js +67 -10
- package/dist/agent-farm/commands/inbox.js.map +1 -1
- package/dist/agent-farm/commands/interrupt.d.ts +4 -1
- package/dist/agent-farm/commands/interrupt.d.ts.map +1 -1
- package/dist/agent-farm/commands/interrupt.js +6 -3
- package/dist/agent-farm/commands/interrupt.js.map +1 -1
- package/dist/agent-farm/commands/reset/constants.d.ts +118 -0
- package/dist/agent-farm/commands/reset/constants.d.ts.map +1 -1
- package/dist/agent-farm/commands/reset/constants.js +118 -0
- package/dist/agent-farm/commands/reset/constants.js.map +1 -1
- package/dist/agent-farm/commands/reset/context.d.ts +18 -0
- package/dist/agent-farm/commands/reset/context.d.ts.map +1 -1
- package/dist/agent-farm/commands/reset/context.js +41 -0
- package/dist/agent-farm/commands/reset/context.js.map +1 -1
- package/dist/agent-farm/commands/reset/receipt.d.ts.map +1 -1
- package/dist/agent-farm/commands/reset/receipt.js +16 -5
- package/dist/agent-farm/commands/reset/receipt.js.map +1 -1
- package/dist/agent-farm/commands/reset/reorient.d.ts +1 -1
- package/dist/agent-farm/commands/reset/reorient.d.ts.map +1 -1
- package/dist/agent-farm/commands/reset/reorient.js +8 -1
- package/dist/agent-farm/commands/reset/reorient.js.map +1 -1
- package/dist/agent-farm/commands/reset/self.d.ts +335 -0
- package/dist/agent-farm/commands/reset/self.d.ts.map +1 -0
- package/dist/agent-farm/commands/reset/self.js +636 -0
- package/dist/agent-farm/commands/reset/self.js.map +1 -0
- package/dist/agent-farm/commands/reset.d.ts +4 -1
- package/dist/agent-farm/commands/reset.d.ts.map +1 -1
- package/dist/agent-farm/commands/reset.js +29 -21
- package/dist/agent-farm/commands/reset.js.map +1 -1
- package/dist/agent-farm/commands/self-refresh.d.ts +60 -0
- package/dist/agent-farm/commands/self-refresh.d.ts.map +1 -0
- package/dist/agent-farm/commands/self-refresh.js +506 -0
- package/dist/agent-farm/commands/self-refresh.js.map +1 -0
- package/dist/agent-farm/commands/send.d.ts +28 -0
- package/dist/agent-farm/commands/send.d.ts.map +1 -1
- package/dist/agent-farm/commands/send.js +90 -7
- package/dist/agent-farm/commands/send.js.map +1 -1
- package/dist/agent-farm/commands/spawn.d.ts +7 -0
- package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn.js +13 -1
- package/dist/agent-farm/commands/spawn.js.map +1 -1
- package/dist/agent-farm/db/index.d.ts +3 -1
- package/dist/agent-farm/db/index.d.ts.map +1 -1
- package/dist/agent-farm/db/index.js +8 -443
- package/dist/agent-farm/db/index.js.map +1 -1
- package/dist/agent-farm/db/mailbox.d.ts +47 -7
- package/dist/agent-farm/db/mailbox.d.ts.map +1 -1
- package/dist/agent-farm/db/mailbox.js +56 -12
- package/dist/agent-farm/db/mailbox.js.map +1 -1
- package/dist/agent-farm/db/migrations.d.ts +57 -0
- package/dist/agent-farm/db/migrations.d.ts.map +1 -0
- package/dist/agent-farm/db/migrations.js +530 -0
- package/dist/agent-farm/db/migrations.js.map +1 -0
- package/dist/agent-farm/db/schema.d.ts +1 -1
- package/dist/agent-farm/db/schema.d.ts.map +1 -1
- package/dist/agent-farm/db/schema.js +1 -0
- package/dist/agent-farm/db/schema.js.map +1 -1
- package/dist/agent-farm/db/types.d.ts +22 -0
- package/dist/agent-farm/db/types.d.ts.map +1 -1
- package/dist/agent-farm/db/types.js.map +1 -1
- package/dist/agent-farm/lib/tower-client.d.ts +12 -0
- package/dist/agent-farm/lib/tower-client.d.ts.map +1 -1
- package/dist/agent-farm/lib/tower-client.js +12 -0
- package/dist/agent-farm/lib/tower-client.js.map +1 -1
- package/dist/agent-farm/lib/tunnel-client.d.ts.map +1 -1
- package/dist/agent-farm/lib/tunnel-client.js +43 -14
- package/dist/agent-farm/lib/tunnel-client.js.map +1 -1
- package/dist/agent-farm/servers/cron-delivery.d.ts +7 -1
- package/dist/agent-farm/servers/cron-delivery.d.ts.map +1 -1
- package/dist/agent-farm/servers/cron-delivery.js +2 -1
- package/dist/agent-farm/servers/cron-delivery.js.map +1 -1
- package/dist/agent-farm/servers/gate-profiles.d.ts +21 -0
- package/dist/agent-farm/servers/gate-profiles.d.ts.map +1 -1
- package/dist/agent-farm/servers/gate-profiles.js +36 -4
- package/dist/agent-farm/servers/gate-profiles.js.map +1 -1
- package/dist/agent-farm/servers/mailbox-delivery.d.ts +218 -15
- package/dist/agent-farm/servers/mailbox-delivery.d.ts.map +1 -1
- package/dist/agent-farm/servers/mailbox-delivery.js +259 -27
- package/dist/agent-farm/servers/mailbox-delivery.js.map +1 -1
- package/dist/agent-farm/servers/mailbox-wiring.d.ts +66 -11
- package/dist/agent-farm/servers/mailbox-wiring.d.ts.map +1 -1
- package/dist/agent-farm/servers/mailbox-wiring.js +202 -48
- package/dist/agent-farm/servers/mailbox-wiring.js.map +1 -1
- package/dist/agent-farm/servers/message-write.d.ts +58 -18
- package/dist/agent-farm/servers/message-write.d.ts.map +1 -1
- package/dist/agent-farm/servers/message-write.js +73 -28
- package/dist/agent-farm/servers/message-write.js.map +1 -1
- package/dist/agent-farm/servers/render-gate.d.ts +37 -1
- package/dist/agent-farm/servers/render-gate.d.ts.map +1 -1
- package/dist/agent-farm/servers/render-gate.js +71 -12
- package/dist/agent-farm/servers/render-gate.js.map +1 -1
- package/dist/agent-farm/servers/session-submit.d.ts +220 -27
- package/dist/agent-farm/servers/session-submit.d.ts.map +1 -1
- package/dist/agent-farm/servers/session-submit.js +333 -42
- package/dist/agent-farm/servers/session-submit.js.map +1 -1
- package/dist/agent-farm/servers/tower-cron.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-cron.js +3 -2
- package/dist/agent-farm/servers/tower-cron.js.map +1 -1
- package/dist/agent-farm/servers/tower-instances.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-instances.js +11 -3
- package/dist/agent-farm/servers/tower-instances.js.map +1 -1
- package/dist/agent-farm/servers/tower-routes.d.ts +32 -0
- package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-routes.js +245 -36
- package/dist/agent-farm/servers/tower-routes.js.map +1 -1
- package/dist/agent-farm/servers/tower-server.js +15 -2
- package/dist/agent-farm/servers/tower-server.js.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.d.ts +21 -0
- package/dist/agent-farm/servers/tower-terminals.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.js +53 -5
- package/dist/agent-farm/servers/tower-terminals.js.map +1 -1
- package/dist/agent-farm/servers/tower-tunnel.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-tunnel.js +14 -0
- package/dist/agent-farm/servers/tower-tunnel.js.map +1 -1
- package/dist/agent-farm/servers/tower-utils.d.ts +35 -0
- package/dist/agent-farm/servers/tower-utils.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-utils.js +39 -0
- package/dist/agent-farm/servers/tower-utils.js.map +1 -1
- package/dist/agent-farm/servers/tower-websocket.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-websocket.js +8 -1
- package/dist/agent-farm/servers/tower-websocket.js.map +1 -1
- package/dist/agent-farm/types.d.ts +36 -1
- package/dist/agent-farm/types.d.ts.map +1 -1
- package/dist/agent-farm/utils/message-format.d.ts +136 -4
- package/dist/agent-farm/utils/message-format.d.ts.map +1 -1
- package/dist/agent-farm/utils/message-format.js +212 -22
- package/dist/agent-farm/utils/message-format.js.map +1 -1
- package/dist/agent-farm/utils/server-utils.d.ts +8 -2
- package/dist/agent-farm/utils/server-utils.d.ts.map +1 -1
- package/dist/agent-farm/utils/server-utils.js +19 -2
- package/dist/agent-farm/utils/server-utils.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +3 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/doctor.js +2 -2
- package/dist/commands/generate-image.d.ts +20 -1
- package/dist/commands/generate-image.d.ts.map +1 -1
- package/dist/commands/generate-image.js +188 -1
- package/dist/commands/generate-image.js.map +1 -1
- package/dist/commands/porch/context-refresh.d.ts +181 -0
- package/dist/commands/porch/context-refresh.d.ts.map +1 -0
- package/dist/commands/porch/context-refresh.js +270 -0
- package/dist/commands/porch/context-refresh.js.map +1 -0
- package/dist/commands/porch/index.d.ts +6 -0
- package/dist/commands/porch/index.d.ts.map +1 -1
- package/dist/commands/porch/index.js +46 -0
- package/dist/commands/porch/index.js.map +1 -1
- package/dist/commands/porch/next.d.ts +0 -9
- package/dist/commands/porch/next.d.ts.map +1 -1
- package/dist/commands/porch/next.js +133 -4
- package/dist/commands/porch/next.js.map +1 -1
- package/dist/commands/porch/prompts.d.ts.map +1 -1
- package/dist/commands/porch/prompts.js +18 -2
- package/dist/commands/porch/prompts.js.map +1 -1
- package/dist/commands/porch/protocol.d.ts.map +1 -1
- package/dist/commands/porch/protocol.js +102 -0
- package/dist/commands/porch/protocol.js.map +1 -1
- package/dist/commands/porch/types.d.ts +61 -0
- package/dist/commands/porch/types.d.ts.map +1 -1
- package/dist/lib/forge-contracts.d.ts +66 -5
- package/dist/lib/forge-contracts.d.ts.map +1 -1
- package/dist/lib/forge-contracts.js.map +1 -1
- package/dist/lib/forge.d.ts +1 -1
- package/dist/lib/forge.d.ts.map +1 -1
- package/dist/lib/forge.js +33 -11
- package/dist/lib/forge.js.map +1 -1
- package/dist/lib/self-refresh-invocation.d.ts +60 -0
- package/dist/lib/self-refresh-invocation.d.ts.map +1 -0
- package/dist/lib/self-refresh-invocation.js +64 -0
- package/dist/lib/self-refresh-invocation.js.map +1 -0
- package/dist/lib/test-env.d.ts +50 -0
- package/dist/lib/test-env.d.ts.map +1 -1
- package/dist/lib/test-env.js +76 -0
- package/dist/lib/test-env.js.map +1 -1
- package/dist/terminal/pty-manager.d.ts +10 -1
- package/dist/terminal/pty-manager.d.ts.map +1 -1
- package/dist/terminal/pty-manager.js +38 -9
- package/dist/terminal/pty-manager.js.map +1 -1
- package/dist/terminal/pty-session.d.ts +52 -4
- package/dist/terminal/pty-session.d.ts.map +1 -1
- package/dist/terminal/pty-session.js +157 -18
- package/dist/terminal/pty-session.js.map +1 -1
- package/dist/terminal/shellper-client.d.ts +73 -0
- package/dist/terminal/shellper-client.d.ts.map +1 -1
- package/dist/terminal/shellper-client.js +151 -0
- package/dist/terminal/shellper-client.js.map +1 -1
- package/dist/terminal/shellper-main.js +20 -3
- package/dist/terminal/shellper-main.js.map +1 -1
- package/dist/terminal/shellper-process.d.ts +2 -0
- package/dist/terminal/shellper-process.d.ts.map +1 -1
- package/dist/terminal/shellper-process.js +17 -1
- package/dist/terminal/shellper-process.js.map +1 -1
- package/dist/terminal/shellper-protocol.d.ts +28 -0
- package/dist/terminal/shellper-protocol.d.ts.map +1 -1
- package/dist/terminal/shellper-protocol.js.map +1 -1
- package/package.json +4 -4
- package/scripts/forge/gitea/_lib.sh +214 -0
- package/scripts/forge/gitea/issue-comment.sh +8 -1
- package/scripts/forge/gitea/issue-view.sh +95 -4
- package/scripts/forge/gitea/pr-create.sh +155 -0
- package/scripts/forge/gitea/pr-exists.sh +32 -4
- package/scripts/forge/gitea/pr-list.sh +40 -31
- package/scripts/forge/gitea/pr-view.sh +65 -4
- package/scripts/forge/gitea/recently-merged.sh +91 -21
- package/scripts/forge/gitea/user-identity.sh +30 -1
- package/scripts/forge/github/issue-view.sh +5 -2
- package/scripts/forge/github/pr-create.sh +47 -0
- package/scripts/forge/github/pr-search.sh +3 -1
- package/scripts/forge/gitlab/issue-view.sh +24 -4
- package/scripts/forge/gitlab/pr-create.sh +53 -0
- package/scripts/forge/gitlab/pr-search.sh +3 -1
- package/scripts/forge/linear/issue-view.sh +13 -2
- package/skeleton/.claude/skills/arch-save/SKILL.md +8 -2
- package/skeleton/.claude/skills/builder-refresh/SKILL.md +138 -0
- package/skeleton/.claude/skills/generate-image/SKILL.md +22 -1
- package/skeleton/.codex/skills/arch-save/SKILL.md +8 -2
- package/skeleton/.codex/skills/builder-refresh/SKILL.md +138 -0
- package/skeleton/.codex/skills/generate-image/SKILL.md +22 -1
- package/skeleton/protocol-schema.json +17 -0
- package/skeleton/protocols/air/prompts/pr.md +6 -1
- package/skeleton/protocols/air/protocol.json +1 -1
- package/skeleton/protocols/aspir/prompts/review.md +6 -1
- package/skeleton/protocols/aspir/protocol.json +5 -1
- package/skeleton/protocols/bugfix/prompts/pr.md +6 -1
- package/skeleton/protocols/bugfix/protocol.json +1 -1
- package/skeleton/protocols/bugfix/protocol.md +2 -1
- package/skeleton/protocols/experiment/protocol.json +1 -1
- package/skeleton/protocols/maintain/prompts/review.md +6 -1
- package/skeleton/protocols/maintain/protocol.json +1 -1
- package/skeleton/protocols/pir/prompts/review.md +10 -7
- package/skeleton/protocols/pir/protocol.json +1 -1
- package/skeleton/protocols/protocol-schema.json +17 -0
- package/skeleton/protocols/research/protocol.json +1 -1
- package/skeleton/protocols/spike/protocol.json +1 -1
- package/skeleton/protocols/spir/prompts/review.md +6 -1
- package/skeleton/protocols/spir/protocol.json +5 -1
- package/skeleton/resources/commands/agent-farm.md +1 -1
- package/templates/tower.html +16 -1
- package/dashboard-dist/assets/index-BZRTEMtH.css +0 -32
- package/dashboard-dist/assets/index-D3XaKpZW.js.map +0 -1
|
@@ -59,6 +59,43 @@ export interface CheckOverride {
|
|
|
59
59
|
}
|
|
60
60
|
/** Map of check name → override, from .codev/config.json `porch.checks` */
|
|
61
61
|
export type CheckOverrides = Record<string, CheckOverride>;
|
|
62
|
+
/**
|
|
63
|
+
* Context-refresh boundaries a protocol declares (Spec 1470).
|
|
64
|
+
*
|
|
65
|
+
* A "boundary" is a moment porch already transitions the state machine, at which
|
|
66
|
+
* a builder's context can be refreshed without losing anything: the artifacts,
|
|
67
|
+
* `status.yaml`, the thread narrative and git carry the durable state, so a
|
|
68
|
+
* refreshed builder re-orients from disk rather than from memory.
|
|
69
|
+
*
|
|
70
|
+
* Keyed by porch's OWN transition points rather than by protocol-shaped literal
|
|
71
|
+
* names (`after-spec`, `before-review`). A literal name has to be mapped onto a
|
|
72
|
+
* real transition somewhere, and that mapping is exactly what goes stale when a
|
|
73
|
+
* protocol changes shape — leaving a boundary that can be declared but never
|
|
74
|
+
* fires. Naming the transition directly removes the translation layer.
|
|
75
|
+
*
|
|
76
|
+
* Absent key means no refreshes, which is the default for every protocol that
|
|
77
|
+
* does not opt in.
|
|
78
|
+
*/
|
|
79
|
+
export interface ContextRefreshConfig {
|
|
80
|
+
/**
|
|
81
|
+
* Protocol phase ids to refresh on ENTRY to.
|
|
82
|
+
*
|
|
83
|
+
* Entry, not exit: the spec requires the refresh to happen after the gate
|
|
84
|
+
* outcome and the phase transition are durable in `status.yaml`, so a
|
|
85
|
+
* refreshed builder cannot mistake "waiting at a gate" for "approved".
|
|
86
|
+
*/
|
|
87
|
+
on_enter?: string[];
|
|
88
|
+
/**
|
|
89
|
+
* Refresh when advancing from one plan phase to the NEXT one.
|
|
90
|
+
*
|
|
91
|
+
* "Advance between", not "enter each": entering the `implement` phase IS
|
|
92
|
+
* entering the first plan phase, so a per-plan-phase boundary that fired on
|
|
93
|
+
* entry would fire twice in a row at that moment. Defining it as advancement
|
|
94
|
+
* excludes the first plan phase by construction rather than by a dedup rule
|
|
95
|
+
* somebody has to remember.
|
|
96
|
+
*/
|
|
97
|
+
on_plan_phase_advance?: boolean;
|
|
98
|
+
}
|
|
62
99
|
/**
|
|
63
100
|
* Protocol definition (loaded from protocol.json)
|
|
64
101
|
*/
|
|
@@ -69,6 +106,7 @@ export interface Protocol {
|
|
|
69
106
|
phases: ProtocolPhase[];
|
|
70
107
|
checks?: Record<string, CheckDef>;
|
|
71
108
|
phase_completion?: Record<string, string>;
|
|
109
|
+
context_refresh?: ContextRefreshConfig;
|
|
72
110
|
}
|
|
73
111
|
/**
|
|
74
112
|
* Gate status
|
|
@@ -161,6 +199,29 @@ export interface ProjectState {
|
|
|
161
199
|
* pre-date this field stay parseable.
|
|
162
200
|
*/
|
|
163
201
|
pr_ready_for_human?: boolean;
|
|
202
|
+
/**
|
|
203
|
+
* Context-refresh boundaries already consumed for this project (Spec 1470).
|
|
204
|
+
*
|
|
205
|
+
* Appended in the SAME state write as the transition that triggered the
|
|
206
|
+
* boundary, which is what makes at-most-once a property of the control flow
|
|
207
|
+
* rather than a guard. A refresh is destructive (`/clear` has no undo) and
|
|
208
|
+
* porch transitions can loop — #1408 reset every plan phase to `pending` —
|
|
209
|
+
* so "already refreshed here" must be a recorded fact, never inferred from
|
|
210
|
+
* phase or iteration.
|
|
211
|
+
*
|
|
212
|
+
* `acknowledged_at` is set by PORCH (never by the builder, which is forbidden
|
|
213
|
+
* from writing this file) on the first normal-path `porch next` after the
|
|
214
|
+
* boundary. A boundary recorded but never acknowledged means the builder did
|
|
215
|
+
* not come back — the unattended-stall signal, which cannot be derived from
|
|
216
|
+
* `updated_at` because the normal task-emission path writes no state at all.
|
|
217
|
+
*
|
|
218
|
+
* Optional so status files predating this field stay parseable.
|
|
219
|
+
*/
|
|
220
|
+
context_refreshes?: Array<{
|
|
221
|
+
boundary: string;
|
|
222
|
+
at: string;
|
|
223
|
+
acknowledged_at?: string;
|
|
224
|
+
}>;
|
|
164
225
|
started_at: string;
|
|
165
226
|
updated_at: string;
|
|
166
227
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/commands/porch/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IAC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CAAC;IACF;;;;;;;;;;;OAWG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;;;;;;;;;;;;;;OAiBG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC;QACxB,QAAQ,EAAE,MAAM,CAAC;QACjB,EAAE,EAAE,MAAM,CAAC;QACX,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC,CAAC;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAMD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,OAAO,GAAG,cAAc,GAAG,UAAU,GAAG,OAAO,CAAC;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,oFAAoF;IACpF,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IAEpB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,yCAAyC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAMD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -24,6 +24,46 @@ export interface IssueViewResult {
|
|
|
24
24
|
* forge-neutral (a forge script that doesn't emit it degrades gracefully).
|
|
25
25
|
*/
|
|
26
26
|
url?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Login/handle of the user who opened the issue, when the forge concept
|
|
29
|
+
* supplies it: GitHub `author.login`, GitLab `author.username`, Gitea
|
|
30
|
+
* `user.login`, Linear `creator.displayName`. Optional so the contract
|
|
31
|
+
* stays forge-neutral — a forge/script that omits it degrades gracefully
|
|
32
|
+
* (the consumer drops the "opened by" attribution).
|
|
33
|
+
*/
|
|
34
|
+
author?: {
|
|
35
|
+
login: string;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* ISO 8601 creation timestamp, when the forge concept supplies it. Optional
|
|
39
|
+
* for forge-neutral degradation, same as `url`.
|
|
40
|
+
*/
|
|
41
|
+
createdAt?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Assignee logins/handles, when the forge concept supplies them: absent when
|
|
44
|
+
* the forge doesn't expose them, empty when the issue is unassigned. Optional
|
|
45
|
+
* per the forge-neutral degradation contract.
|
|
46
|
+
*/
|
|
47
|
+
assignees?: Array<{
|
|
48
|
+
login: string;
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* Issue labels, when the forge concept supplies them: absent when the forge
|
|
52
|
+
* doesn't expose labels, empty when the issue has none. Optional per the
|
|
53
|
+
* forge-neutral degradation contract.
|
|
54
|
+
*/
|
|
55
|
+
labels?: Array<{
|
|
56
|
+
name: string;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* The issue's milestone, when set. GitHub emits a literal `null` when the
|
|
60
|
+
* issue has no milestone (hence `| null`, not merely optional); consumers
|
|
61
|
+
* guard on `milestone?.title`, so both absent and null render nothing.
|
|
62
|
+
* Optional/nullable per the forge-neutral degradation contract.
|
|
63
|
+
*/
|
|
64
|
+
milestone?: {
|
|
65
|
+
title: string;
|
|
66
|
+
} | null;
|
|
27
67
|
comments: Array<{
|
|
28
68
|
body: string;
|
|
29
69
|
createdAt: string;
|
|
@@ -74,13 +114,17 @@ export interface PrListItem {
|
|
|
74
114
|
login: string;
|
|
75
115
|
};
|
|
76
116
|
/**
|
|
77
|
-
* Logins of users requested as reviewers.
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
* Consumed by the VSCode PR
|
|
117
|
+
* Logins of users requested as reviewers. Every preset populates it for real:
|
|
118
|
+
* GitHub flattens gh's reviewer objects to logins, GitLab maps glab's
|
|
119
|
+
* `.reviewers[].username`, and Gitea maps the REST `requested_reviewers[]`
|
|
120
|
+
* (team reviewers carry no login and are dropped). Consumed by the VSCode PR
|
|
121
|
+
* sidebar to bucket "review-requested" PRs.
|
|
81
122
|
*/
|
|
82
123
|
reviewRequests: string[];
|
|
83
|
-
/**
|
|
124
|
+
/**
|
|
125
|
+
* Whether the PR is a draft. Every preset reports it for real — GitLab from
|
|
126
|
+
* the merge request's `draft`/WIP flag, Gitea from the REST `draft` flag.
|
|
127
|
+
*/
|
|
84
128
|
isDraft: boolean;
|
|
85
129
|
}
|
|
86
130
|
/** Output of the `pr-list` concept command. */
|
|
@@ -127,6 +171,23 @@ export interface PrViewResult {
|
|
|
127
171
|
additions: number;
|
|
128
172
|
deletions: number;
|
|
129
173
|
}
|
|
174
|
+
/**
|
|
175
|
+
* Output of the `pr-create` concept command.
|
|
176
|
+
*
|
|
177
|
+
* Inputs are environment variables, like every other concept:
|
|
178
|
+
* `CODEV_PR_TITLE` (required), `CODEV_PR_BODY` (required — set it to `''` for
|
|
179
|
+
* an empty body; an *absent* one is rejected rather than silently posting a
|
|
180
|
+
* bodyless PR), and the optional `CODEV_PR_BASE`, `CODEV_PR_HEAD`,
|
|
181
|
+
* `CODEV_PR_REPO`, `CODEV_PR_DRAFT`. The gitea script also reads the optional
|
|
182
|
+
* `CODEV_PR_LOGIN` (tea's `--login`, for multi-login hosts). A failed creation
|
|
183
|
+
* exits non-zero rather than emitting JSON.
|
|
184
|
+
*/
|
|
185
|
+
export interface PrCreateResult {
|
|
186
|
+
/** The created PR's number (`iid` on GitLab, `index` on Gitea). */
|
|
187
|
+
number: number;
|
|
188
|
+
/** The created PR's **browser/web** URL — never an API endpoint. */
|
|
189
|
+
url: string;
|
|
190
|
+
}
|
|
130
191
|
/** Output of the `pr-diff` concept command: raw diff text, not JSON. */
|
|
131
192
|
/** Output of the `pr-merge` concept command: exit code only, no JSON. */
|
|
132
193
|
/** Output of the `user-identity` concept command: plain string (username). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forge-contracts.d.ts","sourceRoot":"","sources":["../../src/lib/forge-contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,kDAAkD;AAClD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,KAAK,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KAC3B,CAAC,CAAC;CACJ;AAED,kDAAkD;AAClD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,kDAAkD;AAClD,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;;;;GAYG;;
|
|
1
|
+
{"version":3,"file":"forge-contracts.js","sourceRoot":"","sources":["../../src/lib/forge-contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;;AAuLH,wEAAwE;AACxE,uDAAuD;AAEvD,yEAAyE;AACzE,8DAA8D;AAE9D,gFAAgF;AAChF,2BAA2B;AAC3B,gFAAgF;AAEhF,8EAA8E;AAC9E,+CAA+C;AAE/C,2EAA2E;AAC3E,mEAAmE;AACnE,8CAA8C;AAE9C,8EAA8E;AAC9E,0EAA0E;AAC1E,yCAAyC;AAEzC,gFAAgF;AAChF,gBAAgB;AAChB,gFAAgF;AAEhF,mEAAmE;AACnE,6DAA6D"}
|
package/dist/lib/forge.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export interface ConceptResolution {
|
|
|
39
39
|
executable: string | null;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
* Resolve
|
|
42
|
+
* Resolve every known concept with its source and executable.
|
|
43
43
|
* Used by `codev doctor` for full concept reporting.
|
|
44
44
|
*/
|
|
45
45
|
export declare function resolveAllConcepts(forgeConfig?: ForgeConfig | null): ConceptResolution[];
|
package/dist/lib/forge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forge.d.ts","sourceRoot":"","sources":["../../src/lib/forge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AA8BH,oGAAoG;AACpG,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhF,2CAA2C;AAC3C,MAAM,WAAW,mBAAmB;IAClC,+CAA+C;IAC/C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,6FAA6F;IAC7F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yEAAyE;IACzE,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC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BAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,GAC/B,MAAM,GAAG,IAAI,CAgBf;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,WAAW,CAAC,EAAE,WAAW,GAAG,IAAI,GAC/B,OAAO,CAGT;AAMD;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,MAAM,EACf,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAuBzB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,OAAO,CAAC,EAAE,mBAAmB,GAC5B,OAAO,GAAG,IAAI,CAyBhB;AAoDD;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,EAAE,CAE3C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAEhE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,WAAW,GACvB;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,IAAI,GAAG,UAAU,GAAG,iBAAiB,GAAG,eAAe,GAAG,UAAU,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,CA2BtH"}
|
package/dist/lib/forge.js
CHANGED
|
@@ -36,7 +36,7 @@ const DEFAULT_MAX_BUFFER = 10 * 1024 * 1024;
|
|
|
36
36
|
const KNOWN_CONCEPTS = [
|
|
37
37
|
'issue-view', 'pr-list', 'issue-list', 'issue-search', 'issue-comment', 'pr-exists',
|
|
38
38
|
'recently-closed', 'recently-merged', 'user-identity', 'team-activity',
|
|
39
|
-
'on-it-timestamps', 'pr-merge', 'pr-search', 'pr-view', 'pr-diff',
|
|
39
|
+
'on-it-timestamps', 'pr-create', 'pr-merge', 'pr-search', 'pr-view', 'pr-diff',
|
|
40
40
|
'auth-status', 'repo-archive',
|
|
41
41
|
];
|
|
42
42
|
// =============================================================================
|
|
@@ -94,6 +94,10 @@ function getProviderPresets() {
|
|
|
94
94
|
github: getDefaultCommands(),
|
|
95
95
|
gitlab: buildPresetFromScripts('gitlab', ['team-activity', 'on-it-timestamps']),
|
|
96
96
|
gitea: buildPresetFromScripts('gitea', ['team-activity', 'on-it-timestamps', 'pr-search', 'pr-diff']),
|
|
97
|
+
// Linear is a hybrid forge (spec 719): it owns *issues*, while every PR
|
|
98
|
+
// concept — pr-create included — deliberately falls through to the github
|
|
99
|
+
// default. Disabling pr-create here would leave Linear the one provider
|
|
100
|
+
// that can merge a PR but not open one.
|
|
97
101
|
linear: buildPresetFromScripts('linear', ['team-activity', 'on-it-timestamps']),
|
|
98
102
|
};
|
|
99
103
|
return _providerPresets;
|
|
@@ -103,7 +107,7 @@ export function getKnownProviders() {
|
|
|
103
107
|
return Object.keys(getProviderPresets());
|
|
104
108
|
}
|
|
105
109
|
/**
|
|
106
|
-
* Resolve
|
|
110
|
+
* Resolve every known concept with its source and executable.
|
|
107
111
|
* Used by `codev doctor` for full concept reporting.
|
|
108
112
|
*/
|
|
109
113
|
export function resolveAllConcepts(forgeConfig) {
|
|
@@ -141,12 +145,22 @@ export function resolveAllConcepts(forgeConfig) {
|
|
|
141
145
|
*
|
|
142
146
|
* For inline commands: handles `if [ ... ]; then cmd ...` patterns and pipes.
|
|
143
147
|
*/
|
|
148
|
+
/** Shell builtins and keywords that are never the executable a concept needs on PATH. */
|
|
149
|
+
const SHELL_BUILTINS = ['if', 'then', 'else', 'fi', 'test', '[', '[[', 'set', 'export', 'readonly', 'local', 'shift', ':', '.', 'source'];
|
|
144
150
|
function extractExecutable(command) {
|
|
145
151
|
const trimmed = command.trim();
|
|
146
152
|
// Script path: read and extract the underlying tool
|
|
147
153
|
if (trimmed.endsWith('.sh') && existsSync(trimmed)) {
|
|
148
154
|
try {
|
|
149
155
|
const content = readFileSync(trimmed, 'utf-8');
|
|
156
|
+
// An explicit `# forge-executable: <tool>` declaration wins. The heuristic
|
|
157
|
+
// below reads the first substantive line, which is wrong for any script
|
|
158
|
+
// that opens with `set -e` or an input guard — it would tell `codev
|
|
159
|
+
// doctor` to look for `set` or `echo` instead of `gh`/`tea`/`glab`, and a
|
|
160
|
+
// missing forge CLI would go unreported (#1455).
|
|
161
|
+
const declared = content.match(/^#\s*forge-executable:\s*(\S+)/m);
|
|
162
|
+
if (declared)
|
|
163
|
+
return declared[1];
|
|
150
164
|
// Look for `exec <tool>` or first non-comment, non-shebang, non-blank line
|
|
151
165
|
for (const line of content.split('\n')) {
|
|
152
166
|
const l = line.trim();
|
|
@@ -155,9 +169,12 @@ function extractExecutable(command) {
|
|
|
155
169
|
const execMatch = l.match(/^exec\s+(\S+)/);
|
|
156
170
|
if (execMatch)
|
|
157
171
|
return execMatch[1];
|
|
158
|
-
// First substantive command
|
|
172
|
+
// First substantive command. Shell builtins are skipped, not returned:
|
|
173
|
+
// a script opening with `set -e` would otherwise report `set` as its
|
|
174
|
+
// executable, and `codev doctor` would then warn that `set` is missing
|
|
175
|
+
// instead of checking for the real CLI (#1455).
|
|
159
176
|
const token = l.split(/\s+/)[0];
|
|
160
|
-
if (token && !
|
|
177
|
+
if (token && !SHELL_BUILTINS.includes(token)) {
|
|
161
178
|
return token;
|
|
162
179
|
}
|
|
163
180
|
}
|
|
@@ -172,13 +189,18 @@ function extractExecutable(command) {
|
|
|
172
189
|
const thenMatch = trimmed.match(/then\s+(\S+)/);
|
|
173
190
|
if (thenMatch)
|
|
174
191
|
return thenMatch[1];
|
|
175
|
-
//
|
|
176
|
-
|
|
177
|
-
//
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
192
|
+
// First substantive segment of a pipe/sequence. Builtins are *skipped*, not
|
|
193
|
+
// returned as null: `doctor` treats a null executable as "nothing to check"
|
|
194
|
+
// (doctor.ts, `execInstalled`), so bailing at the first builtin would report
|
|
195
|
+
// `. env.sh; gh issue view "$1"` as healthy without ever checking for `gh` —
|
|
196
|
+
// the silent success #1455 is about, inside the reporter for it. This mirrors
|
|
197
|
+
// the script-file branch above, which also scans past builtins to the real CLI.
|
|
198
|
+
for (const segment of trimmed.split(/[|;]/)) {
|
|
199
|
+
const token = segment.trim().split(/\s+/)[0];
|
|
200
|
+
if (token && !SHELL_BUILTINS.includes(token))
|
|
201
|
+
return token;
|
|
202
|
+
}
|
|
203
|
+
return null;
|
|
182
204
|
}
|
|
183
205
|
// =============================================================================
|
|
184
206
|
// Configuration loading
|
package/dist/lib/forge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forge.js","sourceRoot":"","sources":["../../src/lib/forge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,IAAI,eAAe,EAAE,MAAM,aAAa,CAAC;AAE5D,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;AAElC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC;;;;GAIG;AACH,SAAS,iBAAiB,CAAC,QAAgB,EAAE,OAAe;I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AC,CAAC,OAAO,IAAI,kBAAkB,EAAE,CAAC,EAAE,CAAC;YAC9C,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,YAAY,OAAO,gCAAgC,EAAE,CAAC,CAAC;QACrH,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,OAAO,iBAAiB,OAAO,EAAE,EAAE,CAAC,CAAC;QAClG,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ONE place that spells out how to invoke `afx self-refresh` (Spec 1470).
|
|
3
|
+
*
|
|
4
|
+
* ## Why this module exists
|
|
5
|
+
*
|
|
6
|
+
* `--boundary` is not cosmetic: it binds the challenge to the boundary it was
|
|
7
|
+
* issued at, so a challenge left behind by an aborted refresh cannot be used to
|
|
8
|
+
* clear a builder at a LATER boundary, against a save describing work that has
|
|
9
|
+
* since moved on. Any instruction that omits the flag silently disables that
|
|
10
|
+
* guard for whoever follows it.
|
|
11
|
+
*
|
|
12
|
+
* That has already happened twice on this feature, in two different places, and
|
|
13
|
+
* the second was fixed one commit after the first:
|
|
14
|
+
*
|
|
15
|
+
* 1. porch's refresh task text printed `afx self-refresh --begin` with no
|
|
16
|
+
* boundary — so the guard was inert in production from the moment it
|
|
17
|
+
* shipped.
|
|
18
|
+
* 2. the CLI's own `--begin` output printed a bare `afx self-refresh` as the
|
|
19
|
+
* follow-up — so anyone following the command's own instruction dropped the
|
|
20
|
+
* guard.
|
|
21
|
+
*
|
|
22
|
+
* Two call sites, two identical omissions. A third was about to appear in the
|
|
23
|
+
* builder-refresh skill. The generalisation is that **when a guard depends on a
|
|
24
|
+
* flag, every place that tells a human or an agent how to invoke the command is
|
|
25
|
+
* part of that guard** — so the emission belongs in one function rather than
|
|
26
|
+
* being retyped wherever it is needed.
|
|
27
|
+
*
|
|
28
|
+
* ## What this does NOT solve, and how that is handled
|
|
29
|
+
*
|
|
30
|
+
* The skill is Markdown and cannot import anything. Rather than adding a third
|
|
31
|
+
* hand-written copy, the skill **defers**: it tells the builder to run the exact
|
|
32
|
+
* commands porch's refresh task supplied, instead of restating them.
|
|
33
|
+
* `spec-1470-reentry-frame.test.ts` asserts the skill contains NO hand-written
|
|
34
|
+
* invocation at all — stricter than checking each one carries the flag, and it
|
|
35
|
+
* fails on the first line someone adds rather than on the first mistake.
|
|
36
|
+
* Deferring beats duplicating-and-checking: a copy that is merely checked still
|
|
37
|
+
* has to be kept correct in two places.
|
|
38
|
+
*
|
|
39
|
+
* Lives in `src/lib/` because both callers already depend on it and neither
|
|
40
|
+
* depends on the other in this direction: the established import direction is
|
|
41
|
+
* agent-farm → porch, so putting a shared helper in agent-farm and importing it
|
|
42
|
+
* from porch would reverse it.
|
|
43
|
+
*/
|
|
44
|
+
export interface SelfRefreshInvocation {
|
|
45
|
+
/** Step 1: mint the challenge and print what to save. */
|
|
46
|
+
begin: string;
|
|
47
|
+
/** Step 2: verify the save, then clear and re-orient. */
|
|
48
|
+
execute: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Build both halves of the handshake, carrying the boundary through.
|
|
52
|
+
*
|
|
53
|
+
* A missing `boundary` is a legitimate case — a builder refreshing outside a
|
|
54
|
+
* porch task has no boundary to bind — and produces the flagless form. What must
|
|
55
|
+
* never happen is a boundary being KNOWN and dropped from the instruction, which
|
|
56
|
+
* is exactly what a hand-typed command in a second file does the moment someone
|
|
57
|
+
* edits one and not the other.
|
|
58
|
+
*/
|
|
59
|
+
export declare function selfRefreshInvocation(boundary?: string): SelfRefreshInvocation;
|
|
60
|
+
//# sourceMappingURL=self-refresh-invocation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"self-refresh-invocation.d.ts","sourceRoot":"","sources":["../../src/lib/self-refresh-invocation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAOH,MAAM,WAAW,qBAAqB;IACpC,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,qBAAqB,CAM9E"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ONE place that spells out how to invoke `afx self-refresh` (Spec 1470).
|
|
3
|
+
*
|
|
4
|
+
* ## Why this module exists
|
|
5
|
+
*
|
|
6
|
+
* `--boundary` is not cosmetic: it binds the challenge to the boundary it was
|
|
7
|
+
* issued at, so a challenge left behind by an aborted refresh cannot be used to
|
|
8
|
+
* clear a builder at a LATER boundary, against a save describing work that has
|
|
9
|
+
* since moved on. Any instruction that omits the flag silently disables that
|
|
10
|
+
* guard for whoever follows it.
|
|
11
|
+
*
|
|
12
|
+
* That has already happened twice on this feature, in two different places, and
|
|
13
|
+
* the second was fixed one commit after the first:
|
|
14
|
+
*
|
|
15
|
+
* 1. porch's refresh task text printed `afx self-refresh --begin` with no
|
|
16
|
+
* boundary — so the guard was inert in production from the moment it
|
|
17
|
+
* shipped.
|
|
18
|
+
* 2. the CLI's own `--begin` output printed a bare `afx self-refresh` as the
|
|
19
|
+
* follow-up — so anyone following the command's own instruction dropped the
|
|
20
|
+
* guard.
|
|
21
|
+
*
|
|
22
|
+
* Two call sites, two identical omissions. A third was about to appear in the
|
|
23
|
+
* builder-refresh skill. The generalisation is that **when a guard depends on a
|
|
24
|
+
* flag, every place that tells a human or an agent how to invoke the command is
|
|
25
|
+
* part of that guard** — so the emission belongs in one function rather than
|
|
26
|
+
* being retyped wherever it is needed.
|
|
27
|
+
*
|
|
28
|
+
* ## What this does NOT solve, and how that is handled
|
|
29
|
+
*
|
|
30
|
+
* The skill is Markdown and cannot import anything. Rather than adding a third
|
|
31
|
+
* hand-written copy, the skill **defers**: it tells the builder to run the exact
|
|
32
|
+
* commands porch's refresh task supplied, instead of restating them.
|
|
33
|
+
* `spec-1470-reentry-frame.test.ts` asserts the skill contains NO hand-written
|
|
34
|
+
* invocation at all — stricter than checking each one carries the flag, and it
|
|
35
|
+
* fails on the first line someone adds rather than on the first mistake.
|
|
36
|
+
* Deferring beats duplicating-and-checking: a copy that is merely checked still
|
|
37
|
+
* has to be kept correct in two places.
|
|
38
|
+
*
|
|
39
|
+
* Lives in `src/lib/` because both callers already depend on it and neither
|
|
40
|
+
* depends on the other in this direction: the established import direction is
|
|
41
|
+
* agent-farm → porch, so putting a shared helper in agent-farm and importing it
|
|
42
|
+
* from porch would reverse it.
|
|
43
|
+
*/
|
|
44
|
+
/** Shell-quote a boundary id for safe inclusion in a printed command. */
|
|
45
|
+
function quote(value) {
|
|
46
|
+
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Build both halves of the handshake, carrying the boundary through.
|
|
50
|
+
*
|
|
51
|
+
* A missing `boundary` is a legitimate case — a builder refreshing outside a
|
|
52
|
+
* porch task has no boundary to bind — and produces the flagless form. What must
|
|
53
|
+
* never happen is a boundary being KNOWN and dropped from the instruction, which
|
|
54
|
+
* is exactly what a hand-typed command in a second file does the moment someone
|
|
55
|
+
* edits one and not the other.
|
|
56
|
+
*/
|
|
57
|
+
export function selfRefreshInvocation(boundary) {
|
|
58
|
+
const suffix = boundary ? ` --boundary ${quote(boundary)}` : '';
|
|
59
|
+
return {
|
|
60
|
+
begin: `afx self-refresh --begin${suffix}`,
|
|
61
|
+
execute: `afx self-refresh${suffix}`,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=self-refresh-invocation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"self-refresh-invocation.js","sourceRoot":"","sources":["../../src/lib/self-refresh-invocation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,yEAAyE;AACzE,SAAS,KAAK,CAAC,KAAa;IAC1B,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC;AAC7C,CAAC;AASD;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CAAC,QAAiB;IACrD,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,eAAe,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAChE,OAAO;QACL,KAAK,EAAE,2BAA2B,MAAM,EAAE;QAC1C,OAAO,EAAE,mBAAmB,MAAM,EAAE;KACrC,CAAC;AACJ,CAAC"}
|
package/dist/lib/test-env.d.ts
CHANGED
|
@@ -71,4 +71,54 @@ export declare function realAgyOptIn(): boolean;
|
|
|
71
71
|
* `agy-integration.e2e.test.ts` short-circuits on the opt-in before resolving.
|
|
72
72
|
*/
|
|
73
73
|
export declare function assertAgyLaneAllowedUnderTest(): void;
|
|
74
|
+
/**
|
|
75
|
+
* True when cloud-mutating side effects must be refused because we are running
|
|
76
|
+
* under a test (#1515).
|
|
77
|
+
*
|
|
78
|
+
* "Cloud-mutating" means the two irreversible halves of tunnel disconnect:
|
|
79
|
+
* the server-side deregister of the tower ID, and the deletion of the local
|
|
80
|
+
* cloud credentials. Both act on whatever `~/.agent-farm/cloud-config.json`
|
|
81
|
+
* happens to be visible — which, before the agent-farm dir became isolatable,
|
|
82
|
+
* was the developer's real one.
|
|
83
|
+
*
|
|
84
|
+
* `NODE_ENV` is checked alongside `VITEST` because the tower-test helpers set
|
|
85
|
+
* `NODE_ENV=test` explicitly on the Towers they spawn, and `VITEST` is checked
|
|
86
|
+
* alongside `NODE_ENV` because children inherit it through `{ ...process.env }`
|
|
87
|
+
* even when a suite forgets to set `NODE_ENV`. Either marker is enough.
|
|
88
|
+
*
|
|
89
|
+
* `isUnderTestRunner()` above deliberately refuses generic markers, because a
|
|
90
|
+
* false positive there makes a real consultation *throw*. The trade here runs
|
|
91
|
+
* the other way, so `NODE_ENV` earns its place: a false positive costs a user
|
|
92
|
+
* running Tower with `NODE_ENV=test` a 403 that names the override, while a
|
|
93
|
+
* false negative deregisters their Tower and drops the tunnel until they
|
|
94
|
+
* notice. Loud and recoverable beats silent and destructive.
|
|
95
|
+
*/
|
|
96
|
+
export declare function isUnderTest(): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Explicit opt-in for a test that genuinely means to exercise the cloud
|
|
99
|
+
* disconnect path — necessarily one that owns a fake cloud config in an
|
|
100
|
+
* isolated `CODEV_AGENT_FARM_DIR`. Unset by default, so no suite can deregister
|
|
101
|
+
* a real Tower by omission.
|
|
102
|
+
*/
|
|
103
|
+
export declare function cloudMutationOptIn(): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* True when a cloud-mutating operation should be refused right now.
|
|
106
|
+
*/
|
|
107
|
+
export declare function cloudMutationBlocked(): boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Guard the *client* half of #1515: refuse to drive tunnel connect/disconnect
|
|
110
|
+
* against the **default** Tower port from under a test runner.
|
|
111
|
+
*
|
|
112
|
+
* The server-side guard cannot cover this case. A developer's real Tower on
|
|
113
|
+
* :4100 runs with neither `VITEST` nor `NODE_ENV=test`, so it will happily
|
|
114
|
+
* serve a disconnect — and `vitest-e2e-setup.ts` hands every loopback `fetch`
|
|
115
|
+
* the real `~/.agent-farm/local-key`, so such a request arrives fully
|
|
116
|
+
* authenticated. That is how a suite run deregistered a live Tower and left its
|
|
117
|
+
* tunnel down for hours.
|
|
118
|
+
*
|
|
119
|
+
* Scoped as narrowly as it can be: only the two mutating subpaths, only on the
|
|
120
|
+
* default port. A test that spawns its own Tower talks to an ephemeral port and
|
|
121
|
+
* is unaffected; `/api/tunnel/status` is a read and stays allowed.
|
|
122
|
+
*/
|
|
123
|
+
export declare function assertTunnelMutationAllowedUnderTest(path: string, targetsDefaultTowerPort: boolean): void;
|
|
74
124
|
//# sourceMappingURL=test-env.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-env.d.ts","sourceRoot":"","sources":["../../src/lib/test-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAGtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CAYpD"}
|
|
1
|
+
{"version":3,"file":"test-env.d.ts","sourceRoot":"","sources":["../../src/lib/test-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAGtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CAYpD;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAG5C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAKD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oCAAoC,CAClD,IAAI,EAAE,MAAM,EACZ,uBAAuB,EAAE,OAAO,GAC/B,IAAI,CAgBN"}
|