opencode-swarm 7.146.5 → 7.147.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/cli/{ast-diff-wbjcazfx.js → ast-diff-ekd9v10f.js} +3 -3
  2. package/dist/cli/{config-doctor-28e6h9ex.js → config-doctor-8nskdpgd.js} +2 -2
  3. package/dist/cli/{core-n57ssze0.js → core-9rt6kbk1.js} +2 -2
  4. package/dist/cli/{curation-policy-g353f457.js → curation-policy-9d7jx7cg.js} +4 -4
  5. package/dist/cli/{curator-drift-r50x1rac.js → curator-drift-fv4rttf4.js} +2 -2
  6. package/dist/cli/curator-llm-factory-8xdxbmnz.js +64 -0
  7. package/dist/cli/{curator-e6p9vysv.js → curator-xvymjgan.js} +32 -32
  8. package/dist/cli/{dispatch-ndxbsk98.js → dispatch-w0rzasz3.js} +2 -2
  9. package/dist/cli/{evidence-summary-service-b2xp0m26.js → evidence-summary-service-k7a2s8f8.js} +11 -11
  10. package/dist/cli/{gate-evidence-fmbx6hp1.js → gate-evidence-bbpvx28c.js} +6 -6
  11. package/dist/cli/guardrail-explain-qz2hfyb2.js +65 -0
  12. package/dist/cli/{guardrail-log-1bbg0vx4.js → guardrail-log-6098jxes.js} +4 -4
  13. package/dist/cli/guardrail-reset-2bcccwmx.js +90 -0
  14. package/dist/cli/{hive-promoter-trew6apr.js → hive-promoter-9xzf0r98.js} +32 -32
  15. package/dist/cli/{index-0pya01vw.js → index-014mntpw.js} +6 -6
  16. package/dist/cli/{index-ktpj357z.js → index-1k41c7kt.js} +2 -2
  17. package/dist/cli/{index-p3k155dv.js → index-1xvxd02x.js} +1 -1
  18. package/dist/cli/{index-hn0hvgtt.js → index-2qapn7fk.js} +1 -1
  19. package/dist/cli/{index-w8pgjr75.js → index-4cgee5vh.js} +1 -1
  20. package/dist/cli/{index-cp8jp4cv.js → index-59q7jma6.js} +6 -6
  21. package/dist/cli/{index-zqmzn9hk.js → index-5qfp2kt4.js} +6 -6
  22. package/dist/cli/{index-p4ar0k0n.js → index-6cxb7ng4.js} +4 -4
  23. package/dist/cli/{index-gqx0rq53.js → index-7tvbvecm.js} +1 -1
  24. package/dist/cli/{index-npw2xm46.js → index-8861hfbt.js} +32316 -30496
  25. package/dist/cli/{index-vjkfhqef.js → index-8k9hw17k.js} +4 -4
  26. package/dist/cli/{index-cpzra8my.js → index-9b50bt13.js} +2 -2
  27. package/dist/cli/{index-52460nma.js → index-aahyrzmm.js} +2 -2
  28. package/dist/cli/{index-tp5ytzzg.js → index-avcqq7xc.js} +1 -1
  29. package/dist/cli/{index-hw1yghpg.js → index-axcvb5kf.js} +1 -1
  30. package/dist/cli/{index-7sy3aa9m.js → index-b43rt5ph.js} +3 -3
  31. package/dist/cli/{index-aybph866.js → index-b7qzwv3t.js} +3 -3
  32. package/dist/cli/{index-hcb25p12.js → index-b834mas0.js} +2 -2
  33. package/dist/cli/{index-ymyv4d36.js → index-b99vp668.js} +34 -34
  34. package/dist/cli/{index-8py21zn6.js → index-bp5n93w5.js} +1 -1
  35. package/dist/cli/{index-d3t7q4b8.js → index-by1f9ghd.js} +1 -1
  36. package/dist/cli/{index-rpy0bent.js → index-d3bdr78h.js} +2 -2
  37. package/dist/cli/{index-e1pxav9g.js → index-fxvgaeq4.js} +1 -1
  38. package/dist/cli/{index-z9yhhk6q.js → index-g8wwj0sz.js} +1 -1
  39. package/dist/cli/{index-7pggq9ys.js → index-gkhx2vkh.js} +1 -1
  40. package/dist/cli/{index-53asfj0j.js → index-kbp4xssa.js} +4 -4
  41. package/dist/cli/{index-fymrwjak.js → index-n5wzwz8x.js} +8 -5
  42. package/dist/cli/{index-abtrcs16.js → index-nj6rmyeh.js} +1 -1
  43. package/dist/cli/{index-3p4wgm0d.js → index-pgvx3rkq.js} +1 -1
  44. package/dist/cli/index-q7sjgr1y.js +52 -0
  45. package/dist/cli/{index-fjhc8mk2.js → index-q85xv7t6.js} +10 -2
  46. package/dist/cli/{index-rqgnad5w.js → index-qy5yz7fn.js} +10 -4
  47. package/dist/cli/{index-zj6t9zgx.js → index-r3mvsbtq.js} +8 -1
  48. package/dist/cli/{index-ddpkwdcb.js → index-r9wnyq0v.js} +1 -1
  49. package/dist/cli/{index-55g08cg2.js → index-t4xa2yss.js} +5 -5
  50. package/dist/cli/{index-cyxdm0v3.js → index-vpzvmp21.js} +2 -2
  51. package/dist/cli/{index-f75qjtn5.js → index-zwc96x0a.js} +1 -1
  52. package/dist/cli/index.js +32 -32
  53. package/dist/cli/{knowledge-escalator-dyrrftth.js → knowledge-escalator-300p0bvr.js} +11 -11
  54. package/dist/cli/{knowledge-events-hqrwgn29.js → knowledge-events-5ncg5xv1.js} +9 -9
  55. package/dist/cli/{knowledge-link-jkx8xjxp.js → knowledge-link-stzsjagk.js} +3 -3
  56. package/dist/cli/{knowledge-store-fn7whe2j.js → knowledge-store-mn75hsww.js} +4 -4
  57. package/dist/cli/{knowledge-validator-6zb1j8c4.js → knowledge-validator-763r7qpn.js} +6 -6
  58. package/dist/cli/{pending-delegations-k2yqg1sj.js → pending-delegations-k4x00mqc.js} +3 -3
  59. package/dist/cli/{pr-subscriptions-js5v2xr6.js → pr-subscriptions-x2mqc3f1.js} +3 -3
  60. package/dist/cli/{runner-q7d22d1w.js → runner-26bc3x73.js} +5 -5
  61. package/dist/cli/{runtime-x10qb3z1.js → runtime-wjwbpp9j.js} +2 -2
  62. package/dist/cli/{scan-cursor-m04qgx82.js → scan-cursor-b7kyjefy.js} +5 -5
  63. package/dist/cli/{schema-40w13gdv.js → schema-zjhwka27.js} +1 -1
  64. package/dist/cli/{scope-persistence-fz2r889v.js → scope-persistence-aa7gkgz0.js} +7 -7
  65. package/dist/cli/{skill-generator-413k36q9.js → skill-generator-nsa7ay0c.js} +14 -13
  66. package/dist/cli/{workspace-snapshot-kznz5e13.js → workspace-snapshot-nq25j94x.js} +2 -2
  67. package/dist/cli/{worktree-collision-ownership-xj0bsg92.js → worktree-collision-ownership-q2gswg16.js} +4 -4
  68. package/dist/cli/{worktree-isolation-50afhbga.js → worktree-isolation-3pw7nwnh.js} +32 -32
  69. package/dist/cli/{worktree-provisioning-owner-72cyddz5.js → worktree-provisioning-owner-cve95q4f.js} +3 -3
  70. package/dist/commands/guardrail-reset.d.ts +2 -0
  71. package/dist/commands/registry.d.ts +16 -3
  72. package/dist/config/schema.d.ts +2 -0
  73. package/dist/failures/action-circuit.d.ts +69 -0
  74. package/dist/failures/action-identity.d.ts +33 -0
  75. package/dist/failures/invocation-failure.d.ts +77 -0
  76. package/dist/full-auto/oversight.d.ts +21 -0
  77. package/dist/full-auto/policy.d.ts +22 -0
  78. package/dist/full-auto/recovery.d.ts +43 -0
  79. package/dist/full-auto/severe-result.d.ts +86 -0
  80. package/dist/full-auto/state.d.ts +18 -0
  81. package/dist/hooks/full-auto-intercept.d.ts +1 -1
  82. package/dist/hooks/gate-denial-tracker.d.ts +1 -1
  83. package/dist/hooks/guardrails/nontransient-circuit.d.ts +19 -5
  84. package/dist/index.js +2827 -2803
  85. package/dist/lang/symbol-visibility.d.ts +13 -0
  86. package/dist/learning/admission.d.ts +1 -1
  87. package/dist/models/model-override-state.d.ts +47 -0
  88. package/dist/models/task-model-routing.d.ts +71 -0
  89. package/dist/services/diagnose-service.d.ts +2 -2
  90. package/dist/tools/dispatch-lanes.d.ts +8 -0
  91. package/dist/tools/repo-graph/builder.d.ts +19 -0
  92. package/dist/tools/repo-graph/ontology.d.ts +23 -0
  93. package/dist/tools/repo-graph/types.d.ts +34 -6
  94. package/dist/utils/model-dispatch-fallback.d.ts +31 -10
  95. package/dist/utils/timeout.d.ts +18 -4
  96. package/package.json +1 -1
  97. package/dist/cli/curator-llm-factory-bzvv3grb.js +0 -64
  98. package/dist/cli/guardrail-explain-g1nqbz0j.js +0 -65
  99. package/dist/cli/index-wx8zdh4a.js +0 -24
@@ -0,0 +1,69 @@
1
+ export interface ActionCircuitEntry {
2
+ sessionID: string;
3
+ invocationID: number;
4
+ actionDigest: string;
5
+ circuitKind: string;
6
+ count: number;
7
+ hardStop: boolean;
8
+ generationToken: number;
9
+ lastSignalDigest: string | null;
10
+ firstSeenAt: number;
11
+ updatedAt: number;
12
+ expiresAt: number;
13
+ }
14
+ export interface ActionCircuitResetRecord {
15
+ sessionID: string;
16
+ invocationID: number;
17
+ actionDigest: string;
18
+ reason: 'success' | 'external' | 'invocation' | 'session';
19
+ actor: string | null;
20
+ at: number;
21
+ }
22
+ export declare function armActionCircuitAttempt(sessionID: string, invocationID: number, actionDigest: string): number;
23
+ export declare function noteActionCircuitFailure(input: {
24
+ sessionID: string;
25
+ invocationID: number;
26
+ actionDigest: string;
27
+ circuitKind: string;
28
+ signal: string;
29
+ hardStopThreshold: number;
30
+ now?: number;
31
+ generationToken?: number;
32
+ }): {
33
+ entry: ActionCircuitEntry | null;
34
+ enteredHardStop: boolean;
35
+ ignoredLateEvent: boolean;
36
+ };
37
+ export declare function clearActionCircuit(sessionID: string, invocationID: number, actionDigest: string, options?: {
38
+ reason?: 'success' | 'external' | 'invocation' | 'session';
39
+ actor?: string | null;
40
+ now?: number;
41
+ }): void;
42
+ export declare function resetActionCircuitExternally(input: {
43
+ sessionID: string;
44
+ invocationID: number;
45
+ actionDigest: string;
46
+ actor?: string | null;
47
+ now?: number;
48
+ }): void;
49
+ export declare function clearInvocationActionCircuits(sessionID: string, invocationID: number, now?: number): void;
50
+ export declare function clearSessionActionCircuits(sessionID: string, now?: number): void;
51
+ export declare function getBlockingActionCircuit(sessionID: string, invocationID: number, actionDigest: string): ActionCircuitEntry | null;
52
+ export declare function listBlockingActionCircuitsForInvocation(sessionID: string, invocationID: number): ActionCircuitEntry[];
53
+ export declare function peekActionCircuitCount(sessionID: string, invocationID: number, actionDigest: string, circuitKind: string): number;
54
+ export declare function expireActionCircuit(sessionID: string, invocationID: number, actionDigest: string, circuitKind: string): void;
55
+ export declare function clearAllActionCircuits(): void;
56
+ export declare const _test_exports: {
57
+ ACTION_CIRCUIT_TTL_MS: number;
58
+ MAX_TRACKED_ACTION_CIRCUITS: number;
59
+ size: () => number;
60
+ getGenerationToken: (sessionID: string, invocationID: number, actionDigest: string) => number;
61
+ getResetAudit: () => {
62
+ sessionID: string;
63
+ invocationID: number;
64
+ actionDigest: string;
65
+ reason: "success" | "external" | "invocation" | "session";
66
+ actor: string | null;
67
+ at: number;
68
+ }[];
69
+ };
@@ -0,0 +1,33 @@
1
+ type PresenceMarker = 'missing' | 'empty' | 'value';
2
+ type BackgroundMarker = PresenceMarker | 'invalid';
3
+ export interface ActionIdentityV1 {
4
+ version: 1;
5
+ tool: string;
6
+ role: string;
7
+ swarm: string | null;
8
+ taskId: string | null;
9
+ taskMarker: PresenceMarker;
10
+ phase: string | null;
11
+ phaseMarker: PresenceMarker;
12
+ parentSessionDigest: string | null;
13
+ parentSessionMarker: PresenceMarker;
14
+ parentInvocation: string | null;
15
+ parentInvocationMarker: PresenceMarker;
16
+ dispatchGeneration: string | null;
17
+ dispatchGenerationMarker: PresenceMarker;
18
+ mode: string | null;
19
+ modeMarker: PresenceMarker;
20
+ background: boolean | null;
21
+ backgroundMarker: BackgroundMarker;
22
+ scopeDigest: string | null;
23
+ scopeMarker: PresenceMarker;
24
+ additionalDigest: string;
25
+ digest: string;
26
+ pattern: string;
27
+ }
28
+ export interface ActionIdentityInput {
29
+ tool: string;
30
+ args?: unknown;
31
+ }
32
+ export declare function createActionIdentity(input: ActionIdentityInput): ActionIdentityV1;
33
+ export {};
@@ -0,0 +1,77 @@
1
+ import type { ActionIdentityInput, ActionIdentityV1 } from './action-identity.js';
2
+ export type InvocationFailureSource = 'provider' | 'shell' | 'filesystem' | 'git' | 'policy' | 'validation' | 'cancellation' | 'deadline';
3
+ export type InvocationFailureRetryClass = 'retry_same' | 'retry_fallback' | 'repair_then_retry' | 'operator_action' | 'do_not_retry';
4
+ export type InvocationFailureRisk = 'low' | 'medium' | 'high';
5
+ export interface InvocationFailureEvidence {
6
+ display: string;
7
+ statusCode?: number;
8
+ exitCode?: number;
9
+ code?: string;
10
+ signal?: string;
11
+ }
12
+ export interface InvocationFailureRecordV1 {
13
+ version: 1;
14
+ source: InvocationFailureSource;
15
+ category: string;
16
+ retryClass: InvocationFailureRetryClass;
17
+ risk: InvocationFailureRisk;
18
+ action: ActionIdentityV1 | null;
19
+ evidence: InvocationFailureEvidence;
20
+ occurredAt: string;
21
+ }
22
+ export interface ToolFailureClassificationInput {
23
+ tool: string;
24
+ args?: unknown;
25
+ output: string;
26
+ error?: unknown;
27
+ metadata?: unknown;
28
+ correlation?: {
29
+ sandboxWrapped?: boolean;
30
+ originalCommand?: string;
31
+ };
32
+ }
33
+ export declare function sanitizeFailureEvidenceDisplay(value: string): string;
34
+ declare function isNeutralExitOne(command: string): boolean;
35
+ export declare function classifyProviderFailure(error: unknown, action?: ActionIdentityInput): InvocationFailureRecordV1;
36
+ export declare function isRetryableProviderFailure(record: InvocationFailureRecordV1): boolean;
37
+ export declare function classifyToolInvocationFailure(input: ToolFailureClassificationInput): InvocationFailureRecordV1 | null;
38
+ export declare function createFilesystemFailure(input: {
39
+ reason: 'busy_lock' | 'permission' | 'read_only' | 'no_space' | 'path_containment' | 'not_found' | 'unknown';
40
+ display: string;
41
+ code?: string;
42
+ idempotent?: boolean;
43
+ action?: ActionIdentityInput;
44
+ }): InvocationFailureRecordV1;
45
+ export declare function createGitFailure(input: {
46
+ reason: 'conflict' | 'rebase' | 'dirty_primary' | 'lock_busy' | 'timeout' | 'command_unavailable' | 'corrupt_repository';
47
+ display: string;
48
+ code?: string;
49
+ idempotent?: boolean;
50
+ action?: ActionIdentityInput;
51
+ }): InvocationFailureRecordV1;
52
+ export declare function createPolicyFailure(input: {
53
+ reason: 'gate_denial' | 'containment' | 'destructive';
54
+ display: string;
55
+ code?: string;
56
+ action?: ActionIdentityInput;
57
+ }): InvocationFailureRecordV1;
58
+ export declare function createValidationFailure(input: {
59
+ display: string;
60
+ code?: string;
61
+ action?: ActionIdentityInput;
62
+ }): InvocationFailureRecordV1;
63
+ export declare function createCancellationFailure(input: {
64
+ display: string;
65
+ action?: ActionIdentityInput;
66
+ }): InvocationFailureRecordV1;
67
+ export declare function createDeadlineFailure(input: {
68
+ display: string;
69
+ code?: string;
70
+ idempotent?: boolean;
71
+ action?: ActionIdentityInput;
72
+ }): InvocationFailureRecordV1;
73
+ export declare const _test_exports: {
74
+ isNeutralExitOne: typeof isNeutralExitOne;
75
+ sanitizeFailureEvidenceDisplay: typeof sanitizeFailureEvidenceDisplay;
76
+ };
77
+ export {};
@@ -1,3 +1,5 @@
1
+ import { sleep } from '../utils/bun-compat';
2
+ import { teardownEphemeralSession } from '../utils/ephemeral-session-teardown';
1
3
  import { type ParsedCriticResponse } from './critic-response-parser';
2
4
  export interface FullAutoCriticResult extends ParsedCriticResponse {
3
5
  }
@@ -48,6 +50,10 @@ export interface DispatchFullAutoOversightInput {
48
50
  max_dispatch_retries?: number;
49
51
  /** Override for max consecutive dispatch failures (default from schema: 3). */
50
52
  max_consecutive_dispatch_failures?: number;
53
+ /** Total wall-clock deadline across create, prompt, backoff, parse, and cleanup. */
54
+ total_timeout_ms?: number;
55
+ /** Cleanup sub-budget for ephemeral-session teardown. */
56
+ cleanup_timeout_ms?: number;
51
57
  };
52
58
  }
53
59
  export declare function parseFullAutoCriticResponse(rawResponse: string): FullAutoCriticResult;
@@ -89,4 +95,19 @@ export declare function dispatchFullAutoOversight(input: DispatchFullAutoOversig
89
95
  */
90
96
  export declare const _internals: {
91
97
  resetSequence: () => void;
98
+ now: () => number;
99
+ sleep: typeof sleep;
100
+ setTimer: typeof setTimeout;
101
+ clearTimer: typeof clearTimeout;
102
+ teardownEphemeralSession: typeof teardownEphemeralSession;
92
103
  };
104
+ export declare function probeFullAutoOversightHealth(input: {
105
+ directory: string;
106
+ sessionID: string;
107
+ totalTimeoutMs?: number;
108
+ cleanupTimeoutMs?: number;
109
+ }): Promise<{
110
+ healthy: boolean;
111
+ attempts: number;
112
+ reason: string;
113
+ }>;
@@ -41,6 +41,7 @@ export interface FullAutoClassifierInput {
41
41
  sessionID: string;
42
42
  agentName?: string;
43
43
  normalizedAgentName?: string;
44
+ generatedAgentNames?: string[];
44
45
  toolName: string;
45
46
  args: Record<string, unknown> | undefined;
46
47
  directory: string;
@@ -51,6 +52,27 @@ export interface FullAutoClassifierInput {
51
52
  planSummary?: string;
52
53
  changedFiles?: string[];
53
54
  fullAutoConfig: FullAutoPolicyConfig | undefined;
55
+ pluginConfig?: {
56
+ memory?: {
57
+ enabled?: boolean;
58
+ };
59
+ external_skills?: {
60
+ curation_enabled?: boolean;
61
+ };
62
+ council?: {
63
+ enabled?: boolean;
64
+ general?: {
65
+ enabled?: boolean;
66
+ };
67
+ };
68
+ turbo?: unknown;
69
+ skills?: {
70
+ enabled?: boolean;
71
+ };
72
+ tool_filter?: {
73
+ overrides?: Record<string, string[]>;
74
+ };
75
+ };
54
76
  }
55
77
  export declare function isReadOnlyTool(toolName: string): boolean;
56
78
  export declare function isWriteLikeTool(toolName: string): boolean;
@@ -0,0 +1,43 @@
1
+ import type { FullAutoRunState } from './state';
2
+ declare const VALID_MODES: readonly ["assisted", "supervised", "strict"];
3
+ export type FullAutoMode = (typeof VALID_MODES)[number];
4
+ export type ParsedFullAutoCommand = {
5
+ kind: 'status';
6
+ } | {
7
+ kind: 'enable';
8
+ mode?: FullAutoMode;
9
+ } | {
10
+ kind: 'disable';
11
+ } | {
12
+ kind: 'retry_oversight';
13
+ } | {
14
+ kind: 'resume';
15
+ } | {
16
+ kind: 'abort';
17
+ } | {
18
+ kind: 'toggle';
19
+ } | {
20
+ kind: 'invalid';
21
+ message: string;
22
+ };
23
+ type RecoveryBlockerEvaluator = (input: {
24
+ directory: string;
25
+ sessionID: string;
26
+ }) => string[];
27
+ export declare function isFullAutoMode(value: string): value is FullAutoMode;
28
+ export declare function parseFullAutoCommandArgs(args: string[], options?: {
29
+ allowToggle?: boolean;
30
+ }): ParsedFullAutoCommand;
31
+ export declare function isInfrastructurePauseReason(reason: string | undefined): boolean;
32
+ export declare function canRetryOversight(state: FullAutoRunState | undefined): state is FullAutoRunState;
33
+ export declare function canResumeFromProbe(state: FullAutoRunState | undefined, now?: number): state is FullAutoRunState;
34
+ export declare function registerFullAutoRecoveryBlockerEvaluator(evaluator: RecoveryBlockerEvaluator): void;
35
+ export declare function getFullAutoRecoveryBlockers(input: {
36
+ directory: string;
37
+ sessionID: string;
38
+ }): string[];
39
+ export declare function isAllowedPausedSwarmCommand(command: string, args: string[], status: 'paused' | 'terminated'): boolean;
40
+ export declare const _internals: {
41
+ resetRecoveryBlockerEvaluator: () => void;
42
+ };
43
+ export {};
@@ -0,0 +1,86 @@
1
+ import { getModifiedFilesForTask } from '../state';
2
+ export type FullAutoSevereCategory = 'external_instructions' | 'out_of_scope_files' | 'protected_state_mutation';
3
+ export interface FullAutoSevereEnvelopeV1 {
4
+ version: 1;
5
+ kind: 'full_auto_severe';
6
+ parent_session_id: string;
7
+ parent_call_id: string;
8
+ run_generation: number;
9
+ correlation_nonce: string;
10
+ category: FullAutoSevereCategory;
11
+ path_digests?: string[];
12
+ path_count?: number;
13
+ evidence_event_ids?: string[];
14
+ }
15
+ export interface RegisteredSevereEvent {
16
+ id: string;
17
+ sessionID: string;
18
+ category: string;
19
+ callID?: string;
20
+ generation?: number;
21
+ pathDigests?: string[];
22
+ recordedAt: number;
23
+ }
24
+ type PendingCorrelation = {
25
+ sessionID: string;
26
+ callID: string;
27
+ generation: number;
28
+ subagent: string;
29
+ createdAt: number;
30
+ nonce: string;
31
+ };
32
+ type ChildSessionBinding = {
33
+ childSessionID: string;
34
+ parentSessionID: string;
35
+ parentCallID: string;
36
+ generation: number;
37
+ createdAt: number;
38
+ };
39
+ declare function digestPath(filePath: string): string;
40
+ export declare function registerFullAutoSevereCorrelation(input: {
41
+ sessionID: string;
42
+ callID: string;
43
+ generation: number;
44
+ subagent: string;
45
+ }): {
46
+ nonce: string;
47
+ instruction: string;
48
+ };
49
+ export declare function clearFullAutoSevereCorrelation(sessionID: string, callID: string): void;
50
+ export declare function clearFullAutoSevereSession(sessionID: string): void;
51
+ export declare function bindFullAutoSevereChildSession(input: {
52
+ childSessionID: string;
53
+ parentSessionID: string;
54
+ parentCallID: string;
55
+ generation: number;
56
+ }): void;
57
+ export declare function recordFullAutoSevereEvidenceEvent(input: {
58
+ sessionID: string;
59
+ category: string;
60
+ callID?: string;
61
+ generation?: number;
62
+ paths?: string[];
63
+ childSessionID?: string;
64
+ }): string;
65
+ export declare function extractFullAutoSevereEnvelope(text: string): FullAutoSevereEnvelopeV1 | null;
66
+ export declare function validateFullAutoSevereEnvelope(input: {
67
+ envelope: FullAutoSevereEnvelopeV1 | null;
68
+ sessionID: string;
69
+ callID: string;
70
+ generation: number;
71
+ declaredScope?: string[] | null;
72
+ currentTaskID?: string | null;
73
+ session?: Parameters<typeof getModifiedFilesForTask>[0];
74
+ projectDirectory: string;
75
+ }): {
76
+ accepted: boolean;
77
+ category?: FullAutoSevereCategory;
78
+ reason: string;
79
+ };
80
+ export declare const _internals: {
81
+ pendingCorrelations: Map<string, PendingCorrelation>;
82
+ evidenceEvents: Map<string, RegisteredSevereEvent>;
83
+ childBindings: Map<string, ChildSessionBinding>;
84
+ digestPath: typeof digestPath;
85
+ };
86
+ export {};
@@ -19,6 +19,8 @@ export interface FullAutoRunState {
19
19
  status: FullAutoStatus;
20
20
  sessionID: string;
21
21
  mode: 'assisted' | 'supervised' | 'strict';
22
+ runGeneration?: number;
23
+ pauseGeneration?: number;
22
24
  planID?: string;
23
25
  currentPhase?: number;
24
26
  currentTaskID?: string;
@@ -50,6 +52,14 @@ export interface FullAutoRunState {
50
52
  phase?: number;
51
53
  escalatedAt: string;
52
54
  };
55
+ lastRecoveryProbe?: {
56
+ pauseGeneration: number;
57
+ checkedAt: string;
58
+ expiresAt: string;
59
+ attempts: number;
60
+ outcome: 'healthy' | 'unhealthy';
61
+ reason: string;
62
+ };
53
63
  }
54
64
  export interface FullAutoPersistedState {
55
65
  version: 2;
@@ -155,6 +165,14 @@ export declare function recordFullAutoEscalation(directory: string, sessionID: s
155
165
  deadlockCount: number;
156
166
  phase?: number;
157
167
  }): FullAutoRunState | undefined;
168
+ export declare function recordFullAutoRecoveryProbe(directory: string, sessionID: string, probe: {
169
+ pauseGeneration: number;
170
+ checkedAt: string;
171
+ expiresAt: string;
172
+ attempts: number;
173
+ outcome: 'healthy' | 'unhealthy';
174
+ reason: string;
175
+ }): FullAutoRunState | undefined;
158
176
  export interface DenialLimitDecision {
159
177
  pause: boolean;
160
178
  reason?: string;
@@ -53,7 +53,7 @@ export declare function injectVerdictIntoMessages(messages: MessageWithParts[],
53
53
  * This function encapsulates the critic invocation and event writing flow.
54
54
  * The critic response is awaited before writing the event to events.jsonl.
55
55
  */
56
- export declare function dispatchCriticAndWriteEvent(directory: string, architectOutput: string, criticContext: string, criticModel: string, escalationType: 'phase_completion' | 'question', interactionCount: number, deadlockCount: number, oversightAgentName: string, sessionID?: string, maxDispatchRetries?: number, maxConsecutiveDispatchFailures?: number): Promise<CriticDispatchResult>;
56
+ export declare function dispatchCriticAndWriteEvent(directory: string, architectOutput: string, criticContext: string, criticModel: string, escalationType: 'phase_completion' | 'question', interactionCount: number, deadlockCount: number, oversightAgentName: string, sessionID?: string, maxDispatchRetries?: number, maxConsecutiveDispatchFailures?: number, totalTimeoutMs?: number): Promise<CriticDispatchResult>;
57
57
  /**
58
58
  * Creates the full-auto intercept hook factory.
59
59
  *
@@ -163,7 +163,7 @@ export declare function resetGateDenialStreaks(sessionID: string, tool: string,
163
163
  */
164
164
  export declare function clearGateDenialStreaks(): void;
165
165
  export declare const _test_exports: {
166
- readonly MAX_TRACKED_DENIAL_STREAKS: 500;
166
+ readonly MAX_TRACKED_DENIAL_STREAKS: number;
167
167
  readonly GATE_DENIAL_TTL_MS: number;
168
168
  readonly MAX_CODE_LENGTH: 64;
169
169
  readonly MAX_DISCRIMINATOR_LENGTH: 64;
@@ -29,12 +29,24 @@ type ToolAfterOutput = {
29
29
  [key: string]: unknown;
30
30
  };
31
31
  declare function isNeutralExitOne(command: string): boolean;
32
- declare function classifyFatalSignal(signal: string, sandboxWrapped: boolean): NonTransientErrorCategory | null;
33
32
  export declare function classifyToolOutcome(input: ToolAfterInput, output: ToolAfterOutput, correlation?: PendingToolExecution): ToolOutcome;
34
- export declare function recordNonTransientFailure(sessionID: string, category: NonTransientErrorCategory, signal: string): NonTransientCircuitState | null;
35
- export declare function clearNonTransientCircuit(sessionID: string): void;
33
+ type ActionContext = {
34
+ tool: string;
35
+ args?: unknown;
36
+ /**
37
+ * A synchronous failure can occur after toolBefore armed an attempt but before
38
+ * the host can return its result. Re-arm that exact attempt only at this
39
+ * trusted call site; toolAfter results must remain unable to revive a stale
40
+ * generation.
41
+ */
42
+ armAttempt?: boolean;
43
+ };
44
+ declare function isAllowedRecoverySwarmCommand(args: unknown): boolean;
45
+ declare function isRecoveryAllowedTool(tool: string, args: unknown): boolean;
46
+ export declare function recordNonTransientFailure(sessionID: string, category: NonTransientErrorCategory, signal: string, context?: ActionContext): NonTransientCircuitState | null;
47
+ export declare function clearNonTransientCircuit(sessionID: string, context?: ActionContext): void;
36
48
  export declare function nonTransientHardStopMessage(circuit: NonTransientCircuitState): string;
37
- export declare function assertNonTransientCircuitAllowsTool(sessionID: string): void;
49
+ export declare function assertNonTransientCircuitAllowsTool(sessionID: string, context?: ActionContext): void;
38
50
  export declare function rememberToolExecution(sessionID: string, callID: string, tool: string, originalCommand: string): void;
39
51
  export declare function isToolExecutionCurrent(sessionID: string, execution: PendingToolExecution): boolean;
40
52
  export declare function markToolExecutionSandboxWrapped(sessionID: string, callID: string): void;
@@ -42,6 +54,8 @@ export declare function takeToolExecution(sessionID: string, callID: string): Pe
42
54
  export declare function forgetToolExecution(sessionID: string, callID: string): void;
43
55
  export declare const _test_exports: {
44
56
  isNeutralExitOne: typeof isNeutralExitOne;
45
- classifyFatalSignal: typeof classifyFatalSignal;
57
+ classifyFatalSignal: (signal: string, sandboxWrapped: boolean, tool?: string) => NonTransientErrorCategory | null;
58
+ isAllowedRecoverySwarmCommand: typeof isAllowedRecoverySwarmCommand;
59
+ isRecoveryAllowedTool: typeof isRecoveryAllowedTool;
46
60
  };
47
61
  export {};