opencode-swarm 7.125.3 → 7.125.5
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/.opencode/skills/swarm-pr-feedback/SKILL.md +15 -0
- package/.opencode/skills/swarm-pr-review/SKILL.md +34 -0
- package/dist/cli/{config-doctor-rm1m07gz.js → config-doctor-akxywx0c.js} +2 -2
- package/dist/cli/{curation-policy-7pgdjt5w.js → curation-policy-62w2pwfz.js} +2 -2
- package/dist/cli/{curator-llm-factory-yq5vf298.js → curator-llm-factory-av2tcfy9.js} +12 -12
- package/dist/cli/{curator-arwm18td.js → curator-mhhvx2pw.js} +12 -12
- package/dist/cli/{guardrail-explain-mscq3veq.js → guardrail-explain-kqx2bczn.js} +13 -13
- package/dist/cli/{guardrail-log-6a2zxvtx.js → guardrail-log-222xyxfp.js} +3 -3
- package/dist/cli/{hive-promoter-q79naynh.js → hive-promoter-6mhnhrbx.js} +12 -12
- package/dist/cli/{index-7p6jkkat.js → index-0cdq55k0.js} +14 -14
- package/dist/cli/{index-vdfewvn5.js → index-0f45t7xy.js} +5 -5
- package/dist/cli/{index-45mvd5q7.js → index-1012f47p.js} +4 -4
- package/dist/cli/{index-rp5msv7n.js → index-1htanqp1.js} +1 -1
- package/dist/cli/{index-emzes7sj.js → index-4b1e5m0d.js} +2 -2
- package/dist/cli/{index-ambnwnmt.js → index-74xejn4v.js} +1 -1
- package/dist/cli/{index-x8entmky.js → index-ccfkfrew.js} +2 -2
- package/dist/cli/{index-xezv6tdw.js → index-dezgmvtw.js} +1 -1
- package/dist/cli/{index-8tjbq2ej.js → index-e315gwc9.js} +1 -1
- package/dist/cli/{index-fm4zfxnr.js → index-gbnpz7rh.js} +1 -1
- package/dist/cli/{index-01n43w2p.js → index-gd5w3ef8.js} +3 -3
- package/dist/cli/{index-pk099nqv.js → index-jt7hnr7q.js} +1 -1
- package/dist/cli/{index-4ycq2mrp.js → index-qzkcy22e.js} +1 -1
- package/dist/cli/{index-414r47r7.js → index-r1gdkn2d.js} +4 -0
- package/dist/cli/{index-m5e00g9s.js → index-s6hskqg6.js} +231 -98
- package/dist/cli/{index-sa3dgpmc.js → index-yq4s3q43.js} +2 -2
- package/dist/cli/index.js +12 -12
- package/dist/cli/{knowledge-escalator-gr8qd7kz.js → knowledge-escalator-h3hg7ek7.js} +3 -3
- package/dist/cli/{knowledge-events-q83g3f8z.js → knowledge-events-jtr66wxz.js} +1 -1
- package/dist/cli/{knowledge-store-qq3w5yt8.js → knowledge-store-69ttjjjs.js} +1 -1
- package/dist/cli/{knowledge-validator-7jhq8yam.js → knowledge-validator-yn06rh13.js} +4 -4
- package/dist/cli/{scan-cursor-fa5sy36q.js → scan-cursor-r0w2p5gz.js} +2 -2
- package/dist/cli/{schema-bw68my66.js → schema-69z8w1ka.js} +1 -1
- package/dist/cli/{skill-generator-ffc1agyw.js → skill-generator-a7xfyddq.js} +5 -5
- package/dist/commands/abort-pr-workflow.d.ts +17 -0
- package/dist/commands/registry.d.ts +8 -0
- package/dist/hooks/delegation-gate.d.ts +35 -0
- package/dist/hooks/pr-workflow-gate.d.ts +32 -0
- package/dist/hooks/pr-workflow-response-gate.d.ts +48 -0
- package/dist/hooks/shell-write-detect.d.ts +1 -1
- package/dist/index.js +100 -84
- package/dist/session/snapshot-writer.d.ts +9 -0
- package/dist/state.d.ts +15 -0
- package/dist/tools/abort-pr-workflow.d.ts +5 -0
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/manifest.d.ts +1 -0
- package/dist/tools/tool-metadata.d.ts +4 -0
- package/dist/turbo/lean/reviewer.d.ts +2 -1
- package/dist/turbo/lean/runner.d.ts +2 -1
- package/dist/utils/model-dispatch-fallback.d.ts +71 -0
- package/dist/utils/provider-error-classification.d.ts +52 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
authorizeCuration
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-1htanqp1.js";
|
|
5
5
|
import {
|
|
6
6
|
findNearDuplicate,
|
|
7
7
|
inferTags,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveSwarmKnowledgePath,
|
|
10
10
|
resolveSwarmRejectedPath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-1012f47p.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveKnowledgeStoreDir
|
|
15
15
|
} from "./index-q27bajqb.js";
|
package/dist/cli/index.js
CHANGED
|
@@ -7,34 +7,34 @@ import {
|
|
|
7
7
|
getPluginLockFilePaths,
|
|
8
8
|
package_default,
|
|
9
9
|
resolveCommand
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
10
|
+
} from "./index-s6hskqg6.js";
|
|
11
|
+
import"./index-dezgmvtw.js";
|
|
12
|
+
import"./index-jt7hnr7q.js";
|
|
13
13
|
import"./index-kk1scggc.js";
|
|
14
14
|
import"./index-4905hd2m.js";
|
|
15
15
|
import"./index-134d35c1.js";
|
|
16
16
|
import"./index-6n2jpz7x.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
17
|
+
import"./index-gd5w3ef8.js";
|
|
18
|
+
import"./index-0f45t7xy.js";
|
|
19
|
+
import"./index-e315gwc9.js";
|
|
20
20
|
import"./index-vxv732ex.js";
|
|
21
21
|
import"./index-c8s9a3zh.js";
|
|
22
22
|
import"./index-9ss2m4rs.js";
|
|
23
23
|
import"./index-23zsx7dm.js";
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
24
|
+
import"./index-yq4s3q43.js";
|
|
25
|
+
import"./index-1htanqp1.js";
|
|
26
26
|
import"./index-rtry5xyf.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
27
|
+
import"./index-1012f47p.js";
|
|
28
|
+
import"./index-gbnpz7rh.js";
|
|
29
29
|
import"./index-ae75rja9.js";
|
|
30
30
|
import"./index-q27bajqb.js";
|
|
31
|
-
import"./index-
|
|
31
|
+
import"./index-74xejn4v.js";
|
|
32
32
|
import"./index-k5jrywpr.js";
|
|
33
33
|
import"./index-n832052r.js";
|
|
34
34
|
import {
|
|
35
35
|
DEFAULT_AGENT_CONFIGS,
|
|
36
36
|
init_constants
|
|
37
|
-
} from "./index-
|
|
37
|
+
} from "./index-r1gdkn2d.js";
|
|
38
38
|
import"./index-bk5tah7q.js";
|
|
39
39
|
import"./index-8fwhhayc.js";
|
|
40
40
|
import"./index-q1exe2b3.js";
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
maybeEscalateOnViolation,
|
|
9
9
|
maybeQuarantineOnContradiction,
|
|
10
10
|
readRecentEscalations
|
|
11
|
-
} from "./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
11
|
+
} from "./index-0f45t7xy.js";
|
|
12
|
+
import"./index-1012f47p.js";
|
|
13
|
+
import"./index-gbnpz7rh.js";
|
|
14
14
|
import"./index-ae75rja9.js";
|
|
15
15
|
import"./index-q27bajqb.js";
|
|
16
16
|
import"./index-bk5tah7q.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
resolveKnowledgeCounterBaselinePath,
|
|
27
27
|
resolveKnowledgeEventsPath,
|
|
28
28
|
resolveLegacyApplicationLogPath
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-gbnpz7rh.js";
|
|
30
30
|
import"./index-ae75rja9.js";
|
|
31
31
|
import"./index-q27bajqb.js";
|
|
32
32
|
import"./index-zgwm4ryv.js";
|
|
@@ -23,11 +23,11 @@ import {
|
|
|
23
23
|
validateLesson,
|
|
24
24
|
validateSkillCandidatePath,
|
|
25
25
|
validateSkillPath
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
26
|
+
} from "./index-yq4s3q43.js";
|
|
27
|
+
import"./index-1htanqp1.js";
|
|
28
28
|
import"./index-rtry5xyf.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
import"./index-1012f47p.js";
|
|
30
|
+
import"./index-gbnpz7rh.js";
|
|
31
31
|
import"./index-ae75rja9.js";
|
|
32
32
|
import"./index-q27bajqb.js";
|
|
33
33
|
import"./index-bk5tah7q.js";
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
alreadyCuratedThisGeneration,
|
|
5
5
|
claimNextScanBatch,
|
|
6
6
|
getScanStatus
|
|
7
|
-
} from "./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
} from "./index-e315gwc9.js";
|
|
8
|
+
import"./index-1012f47p.js";
|
|
9
9
|
import"./index-ae75rja9.js";
|
|
10
10
|
import"./index-q27bajqb.js";
|
|
11
11
|
import"./index-bk5tah7q.js";
|
|
@@ -33,12 +33,12 @@ import {
|
|
|
33
33
|
sanitizeSlug,
|
|
34
34
|
selectCandidateEntries,
|
|
35
35
|
writeEvalStub
|
|
36
|
-
} from "./index-
|
|
37
|
-
import"./index-
|
|
38
|
-
import"./index-
|
|
36
|
+
} from "./index-gd5w3ef8.js";
|
|
37
|
+
import"./index-yq4s3q43.js";
|
|
38
|
+
import"./index-1htanqp1.js";
|
|
39
39
|
import"./index-rtry5xyf.js";
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
40
|
+
import"./index-1012f47p.js";
|
|
41
|
+
import"./index-gbnpz7rh.js";
|
|
42
42
|
import"./index-ae75rja9.js";
|
|
43
43
|
import"./index-q27bajqb.js";
|
|
44
44
|
import"./index-bk5tah7q.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handle /swarm abort-pr-workflow command.
|
|
3
|
+
*
|
|
4
|
+
* Human-only escape hatch for an unrecoverable PR_REVIEW / PR_FEEDBACK
|
|
5
|
+
* mechanical gate. When the architect cannot reach `complete_pr_workflow`
|
|
6
|
+
* (compound `git fetch && git checkout` rejected as read-only shell syntax,
|
|
7
|
+
* missing PR ref, model confusion, suspended wake budget, …), the user runs
|
|
8
|
+
* this to clear the durable gate and stop the auto-resume loop without
|
|
9
|
+
* depending on the trapped model.
|
|
10
|
+
*
|
|
11
|
+
* The command is `toolPolicy: 'restricted'` — the agent cannot run it via
|
|
12
|
+
* `swarm_command`; the agent must instead call the `abort_pr_workflow` tool
|
|
13
|
+
* (or ask the user to run this command). Both paths funnel into
|
|
14
|
+
* `abortPrWorkflow`, which is fail-closed on armed publication and on
|
|
15
|
+
* in-flight lanes.
|
|
16
|
+
*/
|
|
17
|
+
export declare function handleAbortPrWorkflowCommand(directory: string, args: string[], sessionID: string): Promise<string>;
|
|
@@ -513,6 +513,14 @@ export declare const COMMAND_REGISTRY: {
|
|
|
513
513
|
readonly category: "agent";
|
|
514
514
|
readonly toolPolicy: "none";
|
|
515
515
|
};
|
|
516
|
+
readonly 'abort-pr-workflow': {
|
|
517
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
518
|
+
readonly description: "Clear a stuck PR_REVIEW/PR_FEEDBACK mechanical gate and stop the auto-resume loop [mode] [reason]";
|
|
519
|
+
readonly args: "[PR_REVIEW|PR_FEEDBACK] [reason...]";
|
|
520
|
+
readonly details: "Human-only escape hatch for an unrecoverable PR_REVIEW or PR_FEEDBACK mechanical gate. When the architect cannot reach complete_pr_workflow — for example a compound `git fetch && git checkout` was rejected as read-only shell syntax, the PR head cannot be fetched, or the working tree is on the wrong branch — running this clears the durable gate state for the current session and stops the auto-resume loop without depending on the trapped model. The agent itself cannot run this command; it must call the abort_pr_workflow tool (or ask you to run this command). Both paths funnel into the same fail-closed abortPrWorkflow hook, which refuses while the workflow is armed for publication or while PR workflow lanes are still in flight. An audit event is appended to .swarm/events.jsonl.";
|
|
521
|
+
readonly category: "utility";
|
|
522
|
+
readonly toolPolicy: "restricted";
|
|
523
|
+
};
|
|
516
524
|
readonly 'pr-review': {
|
|
517
525
|
readonly handler: (ctx: CommandContext) => CommandResult;
|
|
518
526
|
readonly description: "Launch deep PR review with multi-lane analysis [url] [--council]";
|
|
@@ -189,8 +189,42 @@ export declare function extractSpecRequirementBodyById(specText: string, id: str
|
|
|
189
189
|
* fold is symmetric (both sides go through this one function), so it can only
|
|
190
190
|
* REDUCE false-blocks — it never opens a bypass, since covered/uncovered still
|
|
191
191
|
* differ by whole words, not punctuation.
|
|
192
|
+
*
|
|
193
|
+
* Issue #1896: encoding tolerance. Canonicalizes Unicode via NFC first (so a
|
|
194
|
+
* decomposed accent vs its composed form compare equal — same text, different
|
|
195
|
+
* byte encoding), and folds the section sign `§` (U+00A7) — and the common
|
|
196
|
+
* Latin-1 mojibake `§` a non-UTF-8 web save produces — to the spaced word token
|
|
197
|
+
* " section " so `§4.2`, `§ 4.2`, `§ 4.2`, and `section 4.2` all compare equal.
|
|
198
|
+
* Both additions are symmetric and information-preserving, so they can only
|
|
199
|
+
* reduce false-blocks. A literal `??` (U+003F run, from a save that DESTROYED the
|
|
200
|
+
* `§`) is NOT recoverable here — the coverage-miss diagnostic surfaces it instead.
|
|
192
201
|
*/
|
|
193
202
|
export declare function normalizeAcceptanceText(s: string): string;
|
|
203
|
+
/**
|
|
204
|
+
* Issue #1896: bounded, diagnostic description of WHY an ACCEPTANCE text failed
|
|
205
|
+
* to cover a requirement body. The coverage check is a SUBSTRING match
|
|
206
|
+
* (`acceptance.includes(body)`), so "first divergence" is defined against the
|
|
207
|
+
* best-aligning window: the longest prefix of the normalized expected body that
|
|
208
|
+
* still appears as a substring of the normalized acceptance. `divergenceOffset`
|
|
209
|
+
* is the length of that matched prefix; the snippets show the expected text at
|
|
210
|
+
* the break and the acceptance text where the match ran out. All scans and
|
|
211
|
+
* snippets are capped so this stays O(1)-bounded on large spec bodies. When the
|
|
212
|
+
* raw (pre-normalization) text carries mojibake markers (a `??` run, U+FFFD, or a
|
|
213
|
+
* Latin-1 `Â`-prefixed byte), a corruption hint is attached — this is the signal
|
|
214
|
+
* that unblocks the destroyed-`§`-as-`??` case the diagnostic exists for.
|
|
215
|
+
*/
|
|
216
|
+
export interface CoverageMissDiagnostic {
|
|
217
|
+
expectedSnippet: string;
|
|
218
|
+
foundSnippet: string;
|
|
219
|
+
divergenceOffset: number;
|
|
220
|
+
corruptionHint?: string;
|
|
221
|
+
}
|
|
222
|
+
export declare function describeCoverageMiss(params: {
|
|
223
|
+
rawExpectedBody: string;
|
|
224
|
+
rawAcceptanceText: string;
|
|
225
|
+
normalizedExpected: string;
|
|
226
|
+
normalizedAcceptance: string;
|
|
227
|
+
}): CoverageMissDiagnostic;
|
|
194
228
|
/**
|
|
195
229
|
* FR-001/FR-002/FR-005/SC-001/SC-002/SC-006 (issue #1687): mechanical coverage
|
|
196
230
|
* check that the ACCEPTANCE text CONTAINS the verbatim requirement body for each
|
|
@@ -213,6 +247,7 @@ export declare function checkAcceptanceCoversFrRefs(params: {
|
|
|
213
247
|
}): {
|
|
214
248
|
covered: boolean;
|
|
215
249
|
missingId?: string;
|
|
250
|
+
diagnostic?: CoverageMissDiagnostic;
|
|
216
251
|
};
|
|
217
252
|
interface MessageInfo {
|
|
218
253
|
role: string;
|
|
@@ -118,6 +118,38 @@ export declare function activatePrWorkflow(directory: string, sessionID: string,
|
|
|
118
118
|
}): Promise<PrWorkflowGateState>;
|
|
119
119
|
export declare function readPrWorkflowGateState(directory: string, sessionID: string): Promise<PrWorkflowGateState | null>;
|
|
120
120
|
export declare function clearPrWorkflowGateState(directory: string, sessionID: string, expectedRevision?: number): Promise<void>;
|
|
121
|
+
/**
|
|
122
|
+
* Abort an active PR workflow gate without reaching terminal completion.
|
|
123
|
+
*
|
|
124
|
+
* This is the escape hatch for the deadlock where `/swarm pr-review` activates
|
|
125
|
+
* a PR_REVIEW gate without binding a PR head and the architect cannot reach
|
|
126
|
+
* `completePrWorkflow` (compound `git fetch && git checkout` rejected by the
|
|
127
|
+
* read-only shell classifier, missing PR ref, model confusion, etc.). Without
|
|
128
|
+
* this path the durable gate is permanent for the session and the response
|
|
129
|
+
* gate's auto-resume loop runs unbounded.
|
|
130
|
+
*
|
|
131
|
+
* Fail-closed semantics, checked in order:
|
|
132
|
+
* 1. Authorization: operates on the raw caller `sessionID` only. A lane or
|
|
133
|
+
* child session whose ID has no gate record throws "no active gate" —
|
|
134
|
+
* lanes must not abort the controller's gate.
|
|
135
|
+
* 2. Mode match when `expectedMode` is supplied.
|
|
136
|
+
* 3. Refuses while `prFeedbackReadyToPublish` is set — clearing an armed
|
|
137
|
+
* gate would drop the immutable-commit binding and leave a half-published
|
|
138
|
+
* commit. The tool gate refuses armed abort too (defense in depth).
|
|
139
|
+
* 4. Refuses while open `swarm-pr-*` delegations exist, matching
|
|
140
|
+
* `completePrWorkflow` — aborting mid-flight would orphan running lanes.
|
|
141
|
+
*
|
|
142
|
+
* Records a non-fatal audit event into the existing `.swarm/events.jsonl`
|
|
143
|
+
* (no new ledger file), then delegates to `clearPrWorkflowGateState`.
|
|
144
|
+
*/
|
|
145
|
+
export declare function abortPrWorkflow(directory: string, sessionID: string, options?: {
|
|
146
|
+
expectedMode?: PrWorkflowMode;
|
|
147
|
+
reason?: string;
|
|
148
|
+
}): Promise<{
|
|
149
|
+
mode: PrWorkflowMode;
|
|
150
|
+
prHeadSha?: string;
|
|
151
|
+
openLanes: number;
|
|
152
|
+
}>;
|
|
121
153
|
/** Bind an active PR workflow to one immutable PR head. */
|
|
122
154
|
export declare function bindPrWorkflowHead(directory: string, sessionID: string, prHeadSha: string): Promise<PrWorkflowGateState>;
|
|
123
155
|
/** Bind an active PR_REVIEW workflow to one immutable merge-base scope. */
|
|
@@ -1,15 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maximum number of consecutive unproductive auto-resumes per gated session
|
|
3
|
+
* before the response gate suspends further wakes. "Unproductive" means the
|
|
4
|
+
* durable gate's `revision` did not advance between wakes — i.e. no
|
|
5
|
+
* state-mutating controller tool (dispatch_lanes_async,
|
|
6
|
+
* write_pr_review_trigger_eval, complete_pr_workflow, recordPrReview*,
|
|
7
|
+
* bindPrReviewBase, …) made durable progress. A healthy review bumps
|
|
8
|
+
* `revision` on every successful state-mutating controller call, so the
|
|
9
|
+
* consecutive counter resets on progress and never exhausts the budget.
|
|
10
|
+
* Read-only tools (collect_lane_results polling, grep, read) intentionally do
|
|
11
|
+
* NOT bump `revision` — an architect that only polls without ever dispatching
|
|
12
|
+
* new lanes or recording trigger evaluations IS making progress on the
|
|
13
|
+
* runtime's bookkeeping but is not advancing the durable gate, so the budget
|
|
14
|
+
* treats long polling-only stretches conservatively. Only a genuinely stuck
|
|
15
|
+
* session holds `revision` constant across many idle cycles.
|
|
16
|
+
*/
|
|
17
|
+
export declare const DEFAULT_MAX_CONSECUTIVE_UNPRODUCTIVE_WAKES = 5;
|
|
18
|
+
/**
|
|
19
|
+
* Cooldown applied ONLY between consecutive unproductive wakes. The first
|
|
20
|
+
* wake after progress is never throttled, so a review that is actively
|
|
21
|
+
* bumping `revision` never waits.
|
|
22
|
+
*/
|
|
23
|
+
export declare const DEFAULT_WAKE_COOLDOWN_MS = 30000;
|
|
24
|
+
/**
|
|
25
|
+
* Bounded FIFO map of tracked wake budgets. Invariant 8 (session/global
|
|
26
|
+
* state): module-level state must have an explicit eviction strategy.
|
|
27
|
+
*/
|
|
28
|
+
export declare const MAX_TRACKED_WAKE_SESSIONS = 200;
|
|
1
29
|
interface PrWorkflowResponseGateClient {
|
|
2
30
|
session?: unknown;
|
|
3
31
|
}
|
|
32
|
+
interface WakeBudget {
|
|
33
|
+
consecutiveUnproductive: number;
|
|
34
|
+
lastWakeAt: number;
|
|
35
|
+
lastSeenRevision?: number;
|
|
36
|
+
suspended: boolean;
|
|
37
|
+
}
|
|
4
38
|
/**
|
|
5
39
|
* Prevent an architect from bypassing PR obligations by simply emitting text.
|
|
6
40
|
* The text-complete hook replaces every architect-session text part while the
|
|
7
41
|
* durable gate exists; session.idle then mechanically resumes that session.
|
|
42
|
+
*
|
|
43
|
+
* The resume loop is bounded (see DEFAULT_MAX_CONSECUTIVE_UNPRODUCTIVE_WAKES)
|
|
44
|
+
* so a session that cannot make progress suspends instead of spinning
|
|
45
|
+
* forever. `textComplete` keeps rewriting text after suspension so the
|
|
46
|
+
* user-visible surface always names the recovery path.
|
|
8
47
|
*/
|
|
9
48
|
export declare function createPrWorkflowResponseGate(options: {
|
|
10
49
|
directory: string;
|
|
11
50
|
client?: PrWorkflowResponseGateClient;
|
|
12
51
|
wakeTimeoutMs?: number;
|
|
52
|
+
maxConsecutiveUnproductiveWakes?: number;
|
|
53
|
+
wakeCooldownMs?: number;
|
|
13
54
|
}): {
|
|
14
55
|
event: (input: {
|
|
15
56
|
event: unknown;
|
|
@@ -19,5 +60,12 @@ export declare function createPrWorkflowResponseGate(options: {
|
|
|
19
60
|
}, output: {
|
|
20
61
|
text: string;
|
|
21
62
|
}) => Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Test/inspection seam: returns a snapshot of the wake budget for the
|
|
65
|
+
* given session. Production code does not call this; it exists so
|
|
66
|
+
* tests can assert the consecutive counter and suspended flag
|
|
67
|
+
* without relying on `promptAsync` call counts alone.
|
|
68
|
+
*/
|
|
69
|
+
_inspectWakeBudget: (sessionID: string) => WakeBudget | undefined;
|
|
22
70
|
};
|
|
23
71
|
export {};
|
|
@@ -70,7 +70,7 @@ export declare function detectInteractiveSession(command: string, shell: 'posix'
|
|
|
70
70
|
* - Redirection operators: >, >>, >|, <<, <<- (here-docs)
|
|
71
71
|
* - Write-effect builtins: cp, mv, install, ln, truncate, dd (of=)
|
|
72
72
|
* - In-place editors: sed -i, perl -i, awk -i
|
|
73
|
-
* - Interpreter eval: python -c
|
|
73
|
+
* - Interpreter eval: python -c, node -e, bun -e, ruby -e, perl -e, php -r
|
|
74
74
|
* - Network downloaders: curl -o, wget -O, scp
|
|
75
75
|
* - Archive extraction: tar -x, unzip, gunzip
|
|
76
76
|
* - Git destructive: git checkout --, git restore, git reset --hard, git clean -fd
|