@loucompanion/forge-bridge 0.1.3-dev.f66395c3ac21 → 0.1.3-dev.fbe15023cdfe

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 (150) hide show
  1. package/README.md +78 -0
  2. package/dist/bridge/bridge.base.d.ts +6 -1
  3. package/dist/bridge/bridge.service.d.ts +60 -3
  4. package/dist/bridge/bridge.service.js +970 -24
  5. package/dist/bridge/bridge.types.d.ts +172 -1
  6. package/dist/cleanup/cleanup.service.d.ts +13 -2
  7. package/dist/cleanup/cleanup.service.js +435 -3
  8. package/dist/cleanup/cleanup.types.d.ts +10 -0
  9. package/dist/cleanup/index.d.ts +1 -1
  10. package/dist/cleanup/index.js +1 -1
  11. package/dist/cleanup/internals.d.ts +2 -2
  12. package/dist/cleanup/internals.js +1 -1
  13. package/dist/cli/cli.help.d.ts +2 -0
  14. package/dist/cli/cli.help.js +217 -0
  15. package/dist/cli/cli.service.d.ts +42 -2
  16. package/dist/cli/cli.service.js +356 -205
  17. package/dist/cli/local-config.d.ts +6 -0
  18. package/dist/cli/local-config.js +47 -3
  19. package/dist/runtime/attempt-node-runtime-launcher.d.ts +17 -0
  20. package/dist/runtime/attempt-node-runtime-launcher.js +101 -0
  21. package/dist/runtime/attempt-process-supervisor-registry.d.ts +20 -0
  22. package/dist/runtime/attempt-process-supervisor-registry.js +64 -0
  23. package/dist/runtime/attempt-process-supervisor.d.ts +86 -0
  24. package/dist/runtime/attempt-process-supervisor.js +350 -0
  25. package/dist/runtime/generated-output-reset.d.ts +10 -0
  26. package/dist/runtime/generated-output-reset.js +103 -0
  27. package/dist/runtime/host-listener-inspector.d.ts +44 -0
  28. package/dist/runtime/host-listener-inspector.js +324 -0
  29. package/dist/runtime/host-port-broker.d.ts +76 -0
  30. package/dist/runtime/host-port-broker.js +333 -0
  31. package/dist/runtime/host-runtime-contract.d.ts +47 -0
  32. package/dist/runtime/host-runtime-contract.js +700 -0
  33. package/dist/runtime/host-runtime-lease.d.ts +133 -0
  34. package/dist/runtime/host-runtime-lease.js +1460 -0
  35. package/dist/runtime/host-runtime-promotion.d.ts +23 -0
  36. package/dist/runtime/host-runtime-promotion.js +159 -0
  37. package/dist/runtime/node-host-runtime-adapter.d.ts +51 -0
  38. package/dist/runtime/node-host-runtime-adapter.js +268 -0
  39. package/dist/runtime/playwright-host-runtime-adapter.d.ts +20 -0
  40. package/dist/runtime/playwright-host-runtime-adapter.js +220 -0
  41. package/dist/runtime/runtime-isolation-lease.d.ts +67 -0
  42. package/dist/runtime/runtime-isolation-lease.js +158 -0
  43. package/dist/sandbox/command-runner.d.ts +4 -0
  44. package/dist/sandbox/command-runner.js +47 -0
  45. package/dist/sandbox/contract.d.ts +5 -0
  46. package/dist/sandbox/contract.js +276 -0
  47. package/dist/sandbox/event-budget.d.ts +11 -0
  48. package/dist/sandbox/event-budget.js +27 -0
  49. package/dist/sandbox/image-policy.d.ts +35 -0
  50. package/dist/sandbox/image-policy.js +247 -0
  51. package/dist/sandbox/index.d.ts +5 -0
  52. package/dist/sandbox/index.js +5 -0
  53. package/dist/sandbox/lease-watchdog.d.ts +18 -0
  54. package/dist/sandbox/lease-watchdog.js +67 -0
  55. package/dist/sandbox/preflight.d.ts +54 -0
  56. package/dist/sandbox/preflight.js +335 -0
  57. package/dist/sandbox/process.d.ts +20 -0
  58. package/dist/sandbox/process.js +209 -0
  59. package/dist/sandbox/provider-auth/codex.d.ts +26 -0
  60. package/dist/sandbox/provider-auth/codex.js +212 -0
  61. package/dist/sandbox/repository-lock.d.ts +5 -0
  62. package/dist/sandbox/repository-lock.js +119 -0
  63. package/dist/sandbox/runtime.d.ts +297 -0
  64. package/dist/sandbox/runtime.js +2338 -0
  65. package/dist/sandbox/sandbox.types.d.ts +86 -0
  66. package/dist/sandbox/sandbox.types.js +1 -0
  67. package/dist/sandbox/smoke.d.ts +76 -0
  68. package/dist/sandbox/smoke.js +380 -0
  69. package/dist/sandbox/worker-supervisor.d.ts +13 -0
  70. package/dist/sandbox/worker-supervisor.js +36 -0
  71. package/dist/sandbox/worker.d.ts +1 -0
  72. package/dist/sandbox/worker.js +225 -0
  73. package/dist/sandbox/workspace.service.d.ts +13 -0
  74. package/dist/sandbox/workspace.service.js +72 -0
  75. package/dist/session/managed-attempt-tools.d.ts +12 -0
  76. package/dist/session/managed-attempt-tools.js +561 -0
  77. package/dist/session/phase-completion.artifacts.d.ts +10 -0
  78. package/dist/session/phase-completion.artifacts.js +627 -0
  79. package/dist/session/phase-completion.d.ts +43 -42
  80. package/dist/session/phase-completion.helpers.d.ts +112 -0
  81. package/dist/session/phase-completion.helpers.js +684 -0
  82. package/dist/session/phase-completion.js +114 -3007
  83. package/dist/session/phase-completion.prompts.d.ts +14 -0
  84. package/dist/session/phase-completion.prompts.js +234 -0
  85. package/dist/session/phase-completion.runtime.d.ts +47 -0
  86. package/dist/session/phase-completion.runtime.js +731 -0
  87. package/dist/session/phase-completion.schemas.d.ts +3 -0
  88. package/dist/session/phase-completion.schemas.js +812 -0
  89. package/dist/session/phase-completion.validation.d.ts +37 -0
  90. package/dist/session/phase-completion.validation.js +828 -0
  91. package/dist/session/provider-cli/ci-repair-readiness.d.ts +8 -0
  92. package/dist/session/provider-cli/ci-repair-readiness.js +90 -0
  93. package/dist/session/provider-cli/provider-cli.artifacts.d.ts +93 -0
  94. package/dist/session/provider-cli/provider-cli.artifacts.js +778 -0
  95. package/dist/session/provider-cli/provider-cli.base.d.ts +1 -0
  96. package/dist/session/provider-cli/provider-cli.deterministic-payloads.d.ts +12 -0
  97. package/dist/session/provider-cli/provider-cli.deterministic-payloads.js +279 -0
  98. package/dist/session/provider-cli/provider-cli.deterministic.d.ts +14 -0
  99. package/dist/session/provider-cli/provider-cli.deterministic.js +375 -0
  100. package/dist/session/provider-cli/provider-cli.process.d.ts +48 -0
  101. package/dist/session/provider-cli/provider-cli.process.js +474 -0
  102. package/dist/session/provider-cli/provider-cli.prompts.d.ts +47 -0
  103. package/dist/session/provider-cli/provider-cli.prompts.js +595 -0
  104. package/dist/session/provider-cli/provider-cli.qa-sidecars.d.ts +11 -0
  105. package/dist/session/provider-cli/provider-cli.qa-sidecars.js +66 -0
  106. package/dist/session/provider-cli/provider-cli.runtime.d.ts +9 -0
  107. package/dist/session/provider-cli/provider-cli.runtime.js +41 -0
  108. package/dist/session/provider-cli/provider-cli.service.d.ts +22 -53
  109. package/dist/session/provider-cli/provider-cli.service.js +587 -2530
  110. package/dist/session/provider-cli/provider-cli.types.d.ts +6 -0
  111. package/dist/session/provider-cli/provider-output-state.d.ts +22 -0
  112. package/dist/session/provider-cli/provider-output-state.js +473 -0
  113. package/dist/session/session-redaction.d.ts +3 -0
  114. package/dist/session/session-redaction.js +23 -0
  115. package/dist/session/session.base.d.ts +6 -1
  116. package/dist/session/session.service.d.ts +8 -2
  117. package/dist/session/session.service.js +463 -58
  118. package/dist/session/session.types.d.ts +177 -1
  119. package/dist/session/session.types.js +352 -3
  120. package/dist/shared/path/path.js +3 -1
  121. package/dist/shared/process/host-process-recovery.d.ts +12 -0
  122. package/dist/shared/process/host-process-recovery.js +78 -0
  123. package/dist/shared/process/host-process-supervisor.d.ts +57 -0
  124. package/dist/shared/process/host-process-supervisor.js +282 -0
  125. package/dist/shared/process/process.d.ts +1 -0
  126. package/dist/shared/process/process.js +1 -0
  127. package/dist/shared/process/windows-launch.d.ts +8 -0
  128. package/dist/shared/process/windows-launch.js +41 -0
  129. package/dist/shared/provider-capabilities.d.ts +1 -0
  130. package/dist/shared/provider-capabilities.js +3 -0
  131. package/dist/shared/redaction/redaction.js +10 -3
  132. package/dist/version.d.ts +1 -1
  133. package/dist/version.js +1 -1
  134. package/dist/worktree/artifact-injector.d.ts +3 -2
  135. package/dist/worktree/artifact-injector.js +82 -10
  136. package/dist/worktree/dependency-warmer.d.ts +21 -1
  137. package/dist/worktree/dependency-warmer.js +138 -5
  138. package/dist/worktree/index.d.ts +1 -0
  139. package/dist/worktree/index.js +1 -0
  140. package/dist/worktree/prior-phase-artifact-hydrator.d.ts +2 -0
  141. package/dist/worktree/prior-phase-artifact-hydrator.js +136 -0
  142. package/dist/worktree/worktree-paths.d.ts +4 -0
  143. package/dist/worktree/worktree-paths.js +30 -0
  144. package/dist/worktree/worktree.base.d.ts +3 -0
  145. package/dist/worktree/worktree.service.d.ts +9 -3
  146. package/dist/worktree/worktree.service.js +100 -52
  147. package/dist/worktree/worktree.types.d.ts +3 -1
  148. package/package.json +6 -3
  149. package/runtime/windows-job-supervisor.ps1 +356 -0
  150. package/runtime/windows-listener-owner.ps1 +33 -0
@@ -1,5 +1,5 @@
1
1
  export interface RunOnceDispatchPacket {
2
- readonly schemaVersion: 1;
2
+ readonly schemaVersion: 1 | 2;
3
3
  readonly userId: string;
4
4
  readonly workItem: DispatchWorkItem;
5
5
  readonly repo: DispatchRepo;
@@ -7,24 +7,82 @@ export interface RunOnceDispatchPacket {
7
7
  readonly session: DispatchSession;
8
8
  readonly lease: DispatchLease;
9
9
  readonly execution: DispatchExecution;
10
+ readonly runtimeIntent: DispatchRuntimeIntent;
10
11
  readonly serverLocal: DispatchServerLocalConfig;
12
+ readonly sandbox?: DispatchSandboxContext | null;
11
13
  readonly pullRequest?: DispatchPullRequestContext | null;
12
14
  readonly apiKeySecretGrant?: ApiKeySecretGrant | null;
15
+ readonly apiKeySecretGrantHandle?: ApiKeySecretGrantHandle | null;
13
16
  readonly artifacts: readonly DispatchResolvedArtifact[];
17
+ readonly priorPhaseArtifacts?: readonly DispatchPriorPhaseArtifact[];
14
18
  readonly warmPathOverrides?: readonly string[];
15
19
  readonly qaBrowser?: DispatchQaBrowserContext | null;
20
+ readonly qaScope?: DispatchQaScope | null;
16
21
  readonly qaRework?: DispatchQaReworkContext | null;
17
22
  readonly architectRevision?: DispatchArchitectRevisionContext | null;
23
+ readonly architectDependencies?: DispatchArchitectDependencyContext | null;
18
24
  readonly storyDevelop?: DispatchStoryDevelopContext | null;
19
25
  readonly storyQa?: DispatchStoryQaContext | null;
26
+ readonly designerRefs?: DispatchDesignerRefHandoffContext | null;
20
27
  readonly draft?: DispatchDraftPrompt | null;
21
28
  }
29
+ export interface DispatchRuntimeIntent {
30
+ readonly executionClass: "analysis_only" | "managed_runtime";
31
+ readonly applicationRuntimeRequired: boolean;
32
+ }
33
+ export interface DispatchSandboxContext {
34
+ readonly dispatchAttemptId: string;
35
+ readonly executionLeaseId: string;
36
+ readonly runnerInstanceId: string;
37
+ readonly executionMode: "host" | "docker";
38
+ readonly executionPolicy: "host_allowed" | "sandbox_preferred" | "sandbox_required";
39
+ readonly networkPolicy: DispatchSandboxNetworkPolicy;
40
+ readonly requestedResources: DispatchSandboxResourceRequest;
41
+ readonly runtime?: string | null;
42
+ readonly sandboxConfigCommitSha?: string | null;
43
+ readonly inputCommitSha?: string | null;
44
+ readonly contractDigest?: string | null;
45
+ readonly imageDigest?: string | null;
46
+ readonly publicationMode: "bridge_push" | "shared_filesystem";
47
+ readonly publishGrantHandle?: DispatchPublishGrantHandle | null;
48
+ }
49
+ export interface DispatchPublishGrantHandle {
50
+ readonly grantId: string;
51
+ readonly branch: string;
52
+ readonly expiresAt: string;
53
+ }
54
+ export interface DispatchSandboxResourceRequest {
55
+ readonly sandboxSlots: number;
56
+ readonly cpuMillis: number;
57
+ readonly workerMemoryLimitBytes: number;
58
+ readonly serviceMemoryLimitBytes: number;
59
+ readonly runtimeOverheadBytes: number;
60
+ readonly memoryBytes: number;
61
+ readonly workspaceBytes: number;
62
+ readonly pids: number;
63
+ readonly buildSlots: number;
64
+ }
65
+ export interface DispatchSandboxNetworkPolicy {
66
+ readonly mode: "offline" | "public_allowlist" | "open_public";
67
+ readonly allowedHosts: readonly string[];
68
+ }
22
69
  export interface DispatchDraftPrompt {
23
70
  readonly kind: string;
24
71
  readonly systemPrompt: string;
25
72
  readonly userPrompt: string;
26
73
  readonly projectName?: string | null;
27
74
  readonly repoName?: string | null;
75
+ readonly attachments?: readonly DispatchDraftAttachment[];
76
+ }
77
+ export interface DispatchDraftAttachment {
78
+ readonly index: number;
79
+ readonly fileName: string;
80
+ readonly contentType: string;
81
+ readonly kind: string;
82
+ readonly byteCount: number;
83
+ readonly summary: string;
84
+ readonly textContent?: string | null;
85
+ readonly contentBase64?: string | null;
28
86
  }
29
87
  export interface DispatchQaBrowserContext {
30
88
  readonly required: boolean;
@@ -32,11 +90,27 @@ export interface DispatchQaBrowserContext {
32
90
  readonly artifactsPath: string;
33
91
  readonly missingTargetReason?: string | null;
34
92
  }
93
+ export interface DispatchQaScope {
94
+ readonly schema_version: number;
95
+ readonly surface: readonly string[];
96
+ readonly required_evidence: readonly string[];
97
+ readonly not_applicable: readonly string[];
98
+ readonly browser_required: boolean;
99
+ readonly api_required: boolean;
100
+ readonly source?: string | null;
101
+ readonly authority?: string | null;
102
+ readonly confidence?: string | null;
103
+ readonly confirmed_by_user?: boolean | null;
104
+ readonly locked?: boolean | null;
105
+ readonly derived_from?: Readonly<Record<string, unknown>> | null;
106
+ readonly rationale?: string | null;
107
+ }
35
108
  export interface DispatchQaAppLaunchTarget {
36
109
  readonly url?: string | null;
37
110
  readonly command?: string | null;
38
111
  readonly working_directory?: string | null;
39
112
  readonly ready_url?: string | null;
113
+ readonly managed_runtime_port?: string | null;
40
114
  readonly routes: readonly string[];
41
115
  readonly notes?: string | null;
42
116
  }
@@ -53,6 +127,22 @@ export interface DispatchArchitectRevisionContext {
53
127
  readonly priorContentHash: string;
54
128
  readonly feedback: string;
55
129
  }
130
+ export interface DispatchArchitectDependencyContext {
131
+ readonly baseBranch: string;
132
+ readonly prerequisites: readonly DispatchArchitectDependencyItemContext[];
133
+ }
134
+ export interface DispatchArchitectDependencyItemContext {
135
+ readonly storyId: string;
136
+ readonly title: string;
137
+ readonly scheduleIndex?: number | null;
138
+ readonly waveIndex?: number | null;
139
+ readonly featureScheduleIndex?: number | null;
140
+ readonly expectedOutput?: string | null;
141
+ readonly handoffSummary?: string | null;
142
+ readonly dependencyReason?: string | null;
143
+ readonly pullRequestNumber?: number | null;
144
+ readonly targetBranch: string;
145
+ }
56
146
  export interface DispatchStoryDevelopContext {
57
147
  readonly storyWorkItemId: string;
58
148
  readonly planId: string;
@@ -109,6 +199,55 @@ export interface DispatchStoryQaDependencyContext {
109
199
  readonly fromWorkItemId: string;
110
200
  readonly toWorkItemId: string;
111
201
  }
202
+ export interface DispatchPriorPhaseArtifact {
203
+ readonly workItemId: string;
204
+ readonly artifactId: string;
205
+ readonly cycleRunId: string;
206
+ readonly phase: "implementation" | "self_review" | "validation";
207
+ readonly status: string;
208
+ readonly producedAt: string;
209
+ readonly sourcePath: string;
210
+ readonly verdictJson: string;
211
+ readonly report: string;
212
+ readonly verdictContentHash: string;
213
+ readonly reportContentHash: string;
214
+ }
215
+ export interface DispatchDesignerRefHandoffContext {
216
+ readonly schemaVersion: number;
217
+ readonly kind: string;
218
+ readonly ownerType: string;
219
+ readonly ownerId: string;
220
+ readonly projectId: string;
221
+ readonly repoId: string;
222
+ readonly title: string;
223
+ readonly refs: readonly DispatchDesignerRefAttachment[];
224
+ }
225
+ export interface DispatchDesignerRefAttachment {
226
+ readonly ref: DispatchDesignerRef;
227
+ readonly reason: string;
228
+ readonly required: boolean;
229
+ readonly source: string;
230
+ readonly lineageKind: string;
231
+ readonly inheritedFromItemType?: string | null;
232
+ readonly inheritedFromItemId?: string | null;
233
+ readonly inheritedFromDesignerRefId?: string | null;
234
+ readonly addedByLane: string;
235
+ readonly sortOrder: number;
236
+ readonly createdAt: string;
237
+ }
238
+ export interface DispatchDesignerRef {
239
+ readonly id: string;
240
+ readonly projectId: string;
241
+ readonly repoId: string;
242
+ readonly refKey: string;
243
+ readonly kind: string;
244
+ readonly path: string;
245
+ readonly anchor?: string | null;
246
+ readonly title: string;
247
+ readonly contentHash: string;
248
+ readonly commitSha: string;
249
+ readonly createdAt: string;
250
+ }
112
251
  export interface DispatchPullRequestContext {
113
252
  readonly number: number;
114
253
  readonly provider: string;
@@ -198,6 +337,11 @@ export interface ApiKeySecretGrant {
198
337
  readonly secret: string;
199
338
  readonly expiresAt: string;
200
339
  }
340
+ export interface ApiKeySecretGrantHandle {
341
+ readonly grantId: string;
342
+ readonly provider: string;
343
+ readonly expiresAt: string;
344
+ }
201
345
  export interface DispatchServerLocalConfig {
202
346
  readonly repoRoot: string;
203
347
  readonly cleanupWorktrees: boolean;
@@ -247,4 +391,36 @@ export interface RunnerEventLine {
247
391
  readonly event: RunnerDispatchEvent;
248
392
  }
249
393
  export declare function parseRunOnceDispatchPacket(value: unknown): RunOnceDispatchPacket;
394
+ export interface HostRuntimeReadinessProbeRequest {
395
+ readonly requestId: string;
396
+ readonly fencingToken: string;
397
+ readonly userId: string;
398
+ readonly projectId: string;
399
+ readonly repoId: string;
400
+ readonly runnerId: string;
401
+ readonly runnerInstanceId: string;
402
+ readonly attempt: number;
403
+ readonly repoName: string;
404
+ readonly remoteUrl: string;
405
+ readonly defaultBranch: string;
406
+ readonly cloneOnDemand: boolean;
407
+ readonly runnerRepoLocalPath: string;
408
+ readonly revision: string;
409
+ readonly expiresAt: string;
410
+ readonly repoRoot: string;
411
+ readonly cleanupWorktrees: boolean;
412
+ }
413
+ export interface HostRuntimeReadinessProbeResult {
414
+ readonly status: "parallel_ready" | "serialized" | "failed";
415
+ readonly runtimeContractFingerprint?: string | null;
416
+ readonly runtimeContractSource?: string | null;
417
+ readonly reasonCode?: string | null;
418
+ readonly reasonMessage?: string | null;
419
+ readonly qaAppLaunchTarget?: HostRuntimeReadinessQaLaunchTarget | null;
420
+ readonly checkedAt: string;
421
+ }
422
+ export interface HostRuntimeReadinessQaLaunchTarget {
423
+ readonly managedRuntimePort: string;
424
+ readonly routes: readonly string[];
425
+ }
250
426
  export declare function failureResult(summary: string, events?: readonly RunnerDispatchEvent[]): RunOnceResultPacket;