@cassiomc1/forgeloop 1.13.0 → 1.14.0

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 (211) hide show
  1. package/AGENT_COMPATIBILITY.md +8 -0
  2. package/DOCS_INDEX.md +35 -3
  3. package/ENG/nodejs-backend-development-eng.md +2 -2
  4. package/ENG/sec-code-eng.md +7 -7
  5. package/EXECUTION_STATE.md +12 -0
  6. package/LOOP_ENGINEERING.md +28 -2
  7. package/ORCHESTRATOR_INTEGRATION.md +9 -5
  8. package/PROTOCOL_INTEGRATION.md +55 -2
  9. package/README.md +40 -25
  10. package/TERMINOLOGY.md +2 -0
  11. package/THREAT_MODEL.md +140 -1
  12. package/completions/_forgeloop +19 -1
  13. package/completions/forgeloop.bash +37 -1
  14. package/completions/forgeloop.fish +123 -1
  15. package/docs/ADVISORY_CONTEXT.md +25 -0
  16. package/docs/AGENT_BROWSER_ADAPTER.md +81 -0
  17. package/docs/AGENT_BROWSER_VERIFICATION.md +6 -0
  18. package/docs/AGENT_PROTOCOL_SUMMARY.md +27 -2
  19. package/docs/AGENT_SKILL.md +66 -0
  20. package/docs/ARTIFACT_REFERENCE.md +123 -0
  21. package/docs/AUDIT_UX.md +46 -0
  22. package/docs/BROWSER_VERIFICATION.md +136 -0
  23. package/docs/CLI_REFERENCE.md +366 -6
  24. package/docs/CODE_ATTESTATION.md +2 -2
  25. package/docs/DOCUMENTATION_GUIDE.md +32 -11
  26. package/docs/JEV_BENCHMARKS.md +31 -0
  27. package/docs/MODEL_ROUTING.md +37 -0
  28. package/docs/OPENSRC_ADAPTER.md +241 -0
  29. package/docs/PACKAGE_CONTENTS.md +35 -8
  30. package/docs/PROVIDERS.md +126 -0
  31. package/docs/PROVIDER_ARCHITECTURE.md +199 -0
  32. package/docs/RECIPES.md +9 -0
  33. package/docs/RELEASE_CHECKLIST.md +38 -5
  34. package/docs/SECURITY_REVIEW.md +71 -0
  35. package/docs/SEMANTIC_DECISION_PLANE.md +71 -0
  36. package/docs/TEST_INTELLIGENCE.md +29 -0
  37. package/docs/TEST_PRUNING.md +14 -0
  38. package/docs/TROUBLESHOOTING.md +198 -1
  39. package/docs/UNIVERSAL_INTEGRATION.md +31 -0
  40. package/docs/assets/diagrams/forgeloop-code-attestation-flow.html +2 -2
  41. package/docs/assets/diagrams/forgeloop-code-attestation-flow.receipt.json +5 -5
  42. package/docs/assets/diagrams/forgeloop-code-attestation-flow.svg +1 -1
  43. package/docs/assets/diagrams/forgeloop-engineering-flow.html +39 -26
  44. package/docs/assets/diagrams/forgeloop-engineering-flow.receipt.json +6 -6
  45. package/docs/assets/diagrams/forgeloop-engineering-flow.svg +26 -26
  46. package/docs/assets/diagrams/forgeloop-verification-trust-flow.html +2 -1
  47. package/docs/assets/diagrams/forgeloop-verification-trust-flow.receipt.json +5 -5
  48. package/docs/assets/diagrams/forgeloop-verification-trust-flow.svg +1 -1
  49. package/docs/diagrams/README.md +13 -9
  50. package/docs/diagrams/forgeloop-code-attestation-flow.workflow.json +1 -1
  51. package/docs/diagrams/forgeloop-engineering-flow.workflow.json +24 -19
  52. package/docs/diagrams/forgeloop-verification-trust-flow.workflow.json +1 -0
  53. package/docs/diagrams/reviews/forgeloop-code-attestation-flow.review.json +4 -4
  54. package/docs/diagrams/reviews/forgeloop-engineering-flow.review.json +4 -4
  55. package/docs/diagrams/reviews/forgeloop-verification-trust-flow.review.json +4 -4
  56. package/docs/documentation-manifest.json +750 -5
  57. package/docs/protocol-requirements.json +24 -0
  58. package/package.json +30 -3
  59. package/schemas/config.schema.json +14 -0
  60. package/schemas/context-plan.schema.json +18 -0
  61. package/schemas/semantic-decision.schema.json +46 -0
  62. package/schemas/test-utility.schema.json +44 -0
  63. package/scripts/CI_VALIDATORS.md +6 -6
  64. package/scripts/benchmark-jev.mjs +5 -0
  65. package/scripts/benchmark-test-intelligence.mjs +4 -0
  66. package/scripts/generate-agent-protocol-summary.mjs +4 -1
  67. package/scripts/generate-forgeloop-skill.mjs +133 -0
  68. package/scripts/jev-smoke.mjs +19 -0
  69. package/skills/forgeloop/README.md +9 -0
  70. package/skills/forgeloop/SKILL.md +77 -0
  71. package/skills/forgeloop/references/lifecycle.md +9 -0
  72. package/skills/forgeloop/references/recovery.md +7 -0
  73. package/skills/forgeloop/references/verification.md +7 -0
  74. package/src/adapters/agent-browser/assertions.js +47 -0
  75. package/src/adapters/agent-browser/commands.js +54 -0
  76. package/src/adapters/agent-browser/index.js +3 -0
  77. package/src/adapters/agent-browser/locator.js +40 -0
  78. package/src/adapters/agent-browser/process.js +215 -0
  79. package/src/adapters/agent-browser/provider.js +313 -0
  80. package/src/adapters/emulated-services/constants.js +24 -0
  81. package/src/adapters/emulated-services/index.js +7 -0
  82. package/src/adapters/emulated-services/process.js +162 -0
  83. package/src/adapters/emulated-services/provider.js +282 -0
  84. package/src/adapters/opensrc/normalize.js +90 -0
  85. package/src/adapters/opensrc/process.js +248 -0
  86. package/src/adapters/opensrc/provider.js +338 -0
  87. package/src/adapters/opensrc/search.js +264 -0
  88. package/src/adapters/typesafe/client.js +28 -0
  89. package/src/adapters/typesafe/engine.js +63 -0
  90. package/src/adapters/typesafe/normalize.js +41 -0
  91. package/src/cli.js +108 -0
  92. package/src/commands/checkpoint-revalidate.js +176 -0
  93. package/src/commands/context-plan.js +38 -0
  94. package/src/commands/contract-create.js +264 -0
  95. package/src/commands/contract-revise.js +236 -0
  96. package/src/commands/decision-show.js +14 -0
  97. package/src/commands/decision-status.js +22 -0
  98. package/src/commands/discover.js +41 -0
  99. package/src/commands/doctor.js +15 -0
  100. package/src/commands/gate-record.js +205 -0
  101. package/src/commands/gate-revalidate.js +137 -0
  102. package/src/commands/model-route.js +32 -0
  103. package/src/commands/route.js +146 -18
  104. package/src/commands/semantic-plan.js +17 -0
  105. package/src/commands/task-abandon.js +224 -0
  106. package/src/commands/task-migrate-contract-bootstrap-repair.js +288 -0
  107. package/src/commands/task-repair-contract-bootstrap.js +263 -0
  108. package/src/commands/test-inventory.js +5 -0
  109. package/src/commands/test-prune-plan.js +5 -0
  110. package/src/commands/test-prune-probe.js +5 -0
  111. package/src/commands/test-utility.js +5 -0
  112. package/src/commands/validate-protocol.js +10 -1
  113. package/src/core/artifact-registry.js +24 -0
  114. package/src/core/audit-ux.js +514 -0
  115. package/src/core/browser-verification/constants.js +149 -0
  116. package/src/core/browser-verification/normalize.js +254 -0
  117. package/src/core/browser-verification/provider.js +519 -0
  118. package/src/core/browser-verification/service.js +115 -0
  119. package/src/core/checkpoint-revalidation.js +319 -0
  120. package/src/core/cli-command-definitions.js +241 -0
  121. package/src/core/command-executors.js +110 -0
  122. package/src/core/command-input.js +115 -43
  123. package/src/core/completion-artifacts.js +14 -5
  124. package/src/core/completion.js +4 -6
  125. package/src/core/config.js +3 -0
  126. package/src/core/context-compiler/budget.js +9 -0
  127. package/src/core/context-compiler/candidates.js +39 -0
  128. package/src/core/context-compiler/compiler.js +63 -0
  129. package/src/core/context-compiler/fingerprint.js +11 -0
  130. package/src/core/context-compiler/policy.js +13 -0
  131. package/src/core/context-compiler/result.js +23 -0
  132. package/src/core/contract-bootstrap-recovery.js +655 -0
  133. package/src/core/contract-revision.js +210 -0
  134. package/src/core/decision/artifact.js +69 -0
  135. package/src/core/decision/benchmarks.js +103 -0
  136. package/src/core/decision/cache.js +27 -0
  137. package/src/core/decision/constants.js +58 -0
  138. package/src/core/decision/cutover.js +34 -0
  139. package/src/core/decision/engine.js +22 -0
  140. package/src/core/decision/errors.js +68 -0
  141. package/src/core/decision/events.js +101 -0
  142. package/src/core/decision/freshness.js +19 -0
  143. package/src/core/decision/normalizers/index.js +115 -0
  144. package/src/core/decision/policy.js +18 -0
  145. package/src/core/decision/projection.js +16 -0
  146. package/src/core/decision/question-registry.js +201 -0
  147. package/src/core/decision/request.js +26 -0
  148. package/src/core/decision/resolver.js +130 -0
  149. package/src/core/decision/result.js +58 -0
  150. package/src/core/decision/service.js +156 -0
  151. package/src/core/decision/state-builder.js +65 -0
  152. package/src/core/decision/task-bindings.js +30 -0
  153. package/src/core/decision/test-provider.js +32 -0
  154. package/src/core/decision/thresholds.js +15 -0
  155. package/src/core/error-codes.js +278 -0
  156. package/src/core/events.js +226 -57
  157. package/src/core/evidence-readiness.js +9 -0
  158. package/src/core/execution-prerequisites.js +14 -0
  159. package/src/core/execution-profile.js +63 -38
  160. package/src/core/gate-provenance.js +124 -0
  161. package/src/core/integration-invocation-policy.js +27 -4
  162. package/src/core/integration-resources.js +86 -61
  163. package/src/core/model-router/constants.js +10 -0
  164. package/src/core/model-router/policy.js +103 -0
  165. package/src/core/model-router/router.js +37 -0
  166. package/src/core/next-action-model.js +58 -0
  167. package/src/core/next-action-phases.js +130 -42
  168. package/src/core/next-action-refresh.js +43 -9
  169. package/src/core/next-action-review-phase.js +7 -2
  170. package/src/core/next-action.js +35 -7
  171. package/src/core/phase.js +128 -10
  172. package/src/core/preflight-consistency.js +23 -9
  173. package/src/core/preflight-loaders.js +37 -5
  174. package/src/core/protocol-info.js +65 -0
  175. package/src/core/protocol.js +20 -0
  176. package/src/core/reconcile-closure.js +128 -52
  177. package/src/core/recovery-history.js +1 -0
  178. package/src/core/resumability.js +154 -44
  179. package/src/core/route-artifact.js +15 -1
  180. package/src/core/router.js +67 -1
  181. package/src/core/runtime-context.js +118 -61
  182. package/src/core/schema-validation.js +3 -0
  183. package/src/core/security-review/constants.js +64 -0
  184. package/src/core/security-review/normalize.js +245 -0
  185. package/src/core/security-review/provider.js +204 -0
  186. package/src/core/security-review/service.js +134 -0
  187. package/src/core/semantic-planning/constants.js +19 -0
  188. package/src/core/semantic-planning/projection.js +94 -0
  189. package/src/core/semantic-planning/service.js +15 -0
  190. package/src/core/sources.js +37 -0
  191. package/src/core/task-claim-state.js +201 -1
  192. package/src/core/task-conflict-inspection.js +31 -5
  193. package/src/core/task-paths.js +13 -0
  194. package/src/core/task-recovery.js +1 -0
  195. package/src/core/templates.js +3 -0
  196. package/src/core/test-intelligence/benchmarks.js +68 -0
  197. package/src/core/test-intelligence/inventory.js +73 -0
  198. package/src/core/test-intelligence/prune.js +90 -0
  199. package/src/core/test-intelligence/semantic-state.js +15 -0
  200. package/src/core/test-intelligence/service.js +40 -0
  201. package/src/core/test-intelligence/utility.js +50 -0
  202. package/src/core/trace.js +11 -7
  203. package/src/core/transaction.js +1 -0
  204. package/src/integration.d.ts +492 -0
  205. package/src/integration.js +54 -0
  206. package/src/providers/README.md +47 -0
  207. package/src/providers/capabilities.js +46 -0
  208. package/src/providers/errors.js +15 -0
  209. package/src/providers/index.js +29 -0
  210. package/src/providers/json-snapshot.js +105 -0
  211. package/src/providers/registry.js +152 -0
@@ -39,6 +39,249 @@ export interface RepositorySearchRequest {
39
39
  assetPath?: string;
40
40
  }
41
41
 
42
+ export type ForgeLoopBrowserVerificationStepKind = "NAVIGATE" | "CLICK" | "FILL" | "PRESS" | "WAIT_FOR";
43
+ export type ForgeLoopBrowserVerificationAssertionKind =
44
+ | "VISIBLE" | "HIDDEN" | "TEXT_CONTAINS" | "TEXT_EQUALS" | "VALUE_EQUALS"
45
+ | "ATTRIBUTE_EQUALS" | "URL_IS" | "URL_PREFIX" | "TITLE_EQUALS";
46
+ export type ForgeLoopBrowserVerificationStatus = "PASS" | "FAIL" | "BLOCKED";
47
+ export type ForgeLoopBrowserVerificationCapturePolicy = "NEVER" | "ON_FAILURE" | "ALWAYS";
48
+ export interface ForgeLoopBrowserVerificationLocator {
49
+ kind: "ROLE" | "LABEL" | "TEXT" | "CSS";
50
+ value: string;
51
+ }
52
+ export interface ForgeLoopBrowserVerificationStep {
53
+ id: string;
54
+ kind: ForgeLoopBrowserVerificationStepKind;
55
+ url?: string;
56
+ locator?: ForgeLoopBrowserVerificationLocator;
57
+ text?: string;
58
+ key?: string;
59
+ condition?: string;
60
+ expected?: string;
61
+ }
62
+ export interface ForgeLoopBrowserVerificationAssertion {
63
+ id: string;
64
+ kind: ForgeLoopBrowserVerificationAssertionKind;
65
+ locator?: ForgeLoopBrowserVerificationLocator;
66
+ attribute?: string;
67
+ expected?: string;
68
+ }
69
+ export interface ForgeLoopBrowserVerificationRequest {
70
+ taskId: string;
71
+ target: string;
72
+ verificationId: string;
73
+ requirement: string;
74
+ startUrl: string;
75
+ allowedOrigins: readonly string[];
76
+ viewport?: { width: number; height: number };
77
+ steps: readonly ForgeLoopBrowserVerificationStep[];
78
+ assertions: readonly ForgeLoopBrowserVerificationAssertion[];
79
+ capture?: { screenshot: ForgeLoopBrowserVerificationCapturePolicy };
80
+ timeoutMs?: number;
81
+ }
82
+ export interface ForgeLoopBrowserVerificationProvider {
83
+ id: string;
84
+ version?: string;
85
+ verify(input: ForgeLoopBrowserVerificationProviderInput): Promise<unknown> | unknown;
86
+ }
87
+ export interface ForgeLoopBrowserVerificationProviderInput extends ForgeLoopBrowserVerificationRequest {
88
+ signal: AbortSignal;
89
+ timeoutMs: number;
90
+ }
91
+ export interface ForgeLoopBrowserVerificationProviderFactoryInput {
92
+ signal: AbortSignal;
93
+ timeoutMs: number;
94
+ request: ForgeLoopBrowserVerificationRequest;
95
+ }
96
+ export type ForgeLoopBrowserVerificationProviderFactory = (input: ForgeLoopBrowserVerificationProviderFactoryInput) => ForgeLoopBrowserVerificationProvider | Promise<ForgeLoopBrowserVerificationProvider>;
97
+ export interface ForgeLoopBrowserVerificationArtifact {
98
+ kind: "SCREENSHOT";
99
+ mimeType: "image/png" | "image/jpeg";
100
+ byteLength: number;
101
+ sha256: string;
102
+ ref: string;
103
+ }
104
+ export interface ForgeLoopBrowserVerificationResult {
105
+ taskId: string;
106
+ verificationId: string;
107
+ requirement: string;
108
+ target: string;
109
+ provider: { id: string; version?: string };
110
+ status: ForgeLoopBrowserVerificationStatus;
111
+ assertions: readonly { id: string; status: ForgeLoopBrowserVerificationStatus; actual?: string; snapshot?: string; message?: string }[];
112
+ diagnostics: readonly string[];
113
+ finalUrl: string;
114
+ navigations: readonly { url: string; kind: "NAVIGATE" | "REDIRECT" }[];
115
+ snapshots: readonly { kind: "ACCESSIBILITY"; text: string }[];
116
+ artifacts: readonly ForgeLoopBrowserVerificationArtifact[];
117
+ authority: "OBSERVATION";
118
+ evidenceAuthority: "NONE";
119
+ actionability: "NON_EXECUTABLE";
120
+ lifecycleAuthority: false;
121
+ completionAuthority: false;
122
+ persisted: false;
123
+ trustRole: "NON_EVIDENCE_BROWSER_VERIFICATION";
124
+ evidenceRequiresForgeLoopValidation: true;
125
+ }
126
+
127
+ export declare function runBrowserVerification(options: {
128
+ target?: string;
129
+ projectPath?: string;
130
+ taskId: string;
131
+ providerName: string;
132
+ verificationId: string;
133
+ requirement: string;
134
+ startUrl: string;
135
+ allowedOrigins: readonly string[];
136
+ steps: readonly ForgeLoopBrowserVerificationStep[];
137
+ assertions: readonly ForgeLoopBrowserVerificationAssertion[];
138
+ viewport?: { width: number; height: number };
139
+ capture?: { screenshot: ForgeLoopBrowserVerificationCapturePolicy };
140
+ timeoutMs?: number;
141
+ runtimeContext?: { browserVerificationProviders?: object | Map<string, ForgeLoopBrowserVerificationProvider | ForgeLoopBrowserVerificationProviderFactory> };
142
+ }): Promise<ForgeLoopBrowserVerificationResult>;
143
+ export declare const BROWSER_VERIFICATION_ASSERTION_KINDS: readonly ForgeLoopBrowserVerificationAssertionKind[];
144
+ export declare const BROWSER_VERIFICATION_ASSERTION_STATUSES: readonly ForgeLoopBrowserVerificationStatus[];
145
+ export declare const BROWSER_VERIFICATION_CAPTURE_POLICIES: readonly ForgeLoopBrowserVerificationCapturePolicy[];
146
+ export declare const BROWSER_VERIFICATION_LIMITS: Readonly<Record<string, number>>;
147
+ export declare const BROWSER_VERIFICATION_LOCATOR_KINDS: readonly ForgeLoopBrowserVerificationLocator["kind"][];
148
+ export declare const BROWSER_VERIFICATION_PROVIDER_ID_PATTERN: RegExp;
149
+ export declare const BROWSER_VERIFICATION_STEP_KINDS: readonly ForgeLoopBrowserVerificationStepKind[];
150
+ export declare const BROWSER_VERIFICATION_TRUST: Readonly<Record<string, unknown>>;
151
+ export declare const BROWSER_VERIFICATION_WAIT_CONDITIONS: readonly string[];
152
+ export declare function normalizeBrowserVerificationRequestOptions(input?: Record<string, unknown>): Record<string, unknown>;
153
+ export declare function assertBrowserVerificationProvider(provider: unknown): ForgeLoopBrowserVerificationProvider;
154
+ export declare function assertBrowserVerificationProviderIdentity(provider: unknown, expectedId: string): ForgeLoopBrowserVerificationProvider;
155
+ export declare function assertBrowserVerificationProviderRegistration(provider: unknown, expectedId: string): ForgeLoopBrowserVerificationProvider;
156
+ export declare function createBrowserVerificationProviderRegistry(
157
+ providers?: Record<string, ForgeLoopBrowserVerificationProvider | ForgeLoopBrowserVerificationProviderFactory>
158
+ | Map<string, ForgeLoopBrowserVerificationProvider | ForgeLoopBrowserVerificationProviderFactory>,
159
+ ): Readonly<Record<string, ForgeLoopBrowserVerificationProvider | ForgeLoopBrowserVerificationProviderFactory>>;
160
+ export declare function normalizeBrowserVerificationRequest(input: Record<string, unknown>): ForgeLoopBrowserVerificationRequest;
161
+ export declare function resolveBrowserVerificationProvider(
162
+ providers: Record<string, ForgeLoopBrowserVerificationProvider | ForgeLoopBrowserVerificationProviderFactory>
163
+ | Map<string, ForgeLoopBrowserVerificationProvider | ForgeLoopBrowserVerificationProviderFactory>
164
+ | undefined,
165
+ name: string,
166
+ input?: Partial<ForgeLoopBrowserVerificationProviderFactoryInput>,
167
+ ): Promise<ForgeLoopBrowserVerificationProvider>;
168
+ export declare function normalizeBrowserVerificationResult(raw: unknown, options: {
169
+ provider: ForgeLoopBrowserVerificationProvider;
170
+ verificationId: string;
171
+ taskId: string;
172
+ requirement: string;
173
+ target: string;
174
+ expectedAssertions: readonly ForgeLoopBrowserVerificationAssertion[];
175
+ allowedOrigins: readonly string[];
176
+ }): ForgeLoopBrowserVerificationResult;
177
+
178
+ export type ForgeLoopSecurityReviewScope = "FULL" | "CHANGED" | "SELECTED";
179
+ export type ForgeLoopSecurityReviewSeverity = "INFO" | "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
180
+ export type ForgeLoopSecurityReviewConfidence = "LOW" | "MEDIUM" | "HIGH";
181
+ export type ForgeLoopSecurityReviewCategory =
182
+ | "DEPENDENCY" | "SECRETS" | "INJECTION" | "AUTHENTICATION" | "AUTHORIZATION"
183
+ | "CRYPTOGRAPHY" | "CONFIGURATION" | "NETWORK" | "FILESYSTEM" | "SUPPLY_CHAIN"
184
+ | "UNSAFE_EXECUTION" | "OTHER";
185
+ export interface ForgeLoopSecurityReviewRevision {
186
+ base?: string;
187
+ head?: string;
188
+ }
189
+ export interface ForgeLoopSecurityReviewRequest {
190
+ projectPath: string;
191
+ taskId: string;
192
+ reviewId: string;
193
+ scope: ForgeLoopSecurityReviewScope;
194
+ paths?: readonly string[];
195
+ categories?: readonly ForgeLoopSecurityReviewCategory[];
196
+ requirements?: readonly string[];
197
+ revision?: ForgeLoopSecurityReviewRevision;
198
+ timeoutMs?: number;
199
+ }
200
+ export interface ForgeLoopSecurityReviewProvider {
201
+ id: string;
202
+ version?: string;
203
+ review(input: ForgeLoopSecurityReviewProviderInput): Promise<unknown> | unknown;
204
+ }
205
+ export interface ForgeLoopSecurityReviewProviderInput extends ForgeLoopSecurityReviewRequest {
206
+ signal: AbortSignal;
207
+ timeoutMs: number;
208
+ }
209
+ export interface ForgeLoopSecurityReviewProviderFactoryInput {
210
+ signal: AbortSignal;
211
+ timeoutMs: number;
212
+ request: ForgeLoopSecurityReviewRequest;
213
+ }
214
+ export type ForgeLoopSecurityReviewProviderFactory = (input: ForgeLoopSecurityReviewProviderFactoryInput) => ForgeLoopSecurityReviewProvider | Promise<ForgeLoopSecurityReviewProvider>;
215
+ export interface ForgeLoopSecurityReviewFinding {
216
+ id: string;
217
+ category: ForgeLoopSecurityReviewCategory;
218
+ severity: ForgeLoopSecurityReviewSeverity;
219
+ title: string;
220
+ summary: string;
221
+ path?: string;
222
+ line?: number;
223
+ ruleId?: string;
224
+ confidence?: ForgeLoopSecurityReviewConfidence;
225
+ }
226
+ export interface ForgeLoopSecurityReviewSummary {
227
+ total: number;
228
+ bySeverity: Readonly<Record<ForgeLoopSecurityReviewSeverity, number>>;
229
+ byCategory: Readonly<Record<ForgeLoopSecurityReviewCategory, number>>;
230
+ }
231
+ export interface ForgeLoopSecurityReviewResult {
232
+ taskId: string;
233
+ reviewId: string;
234
+ scope: ForgeLoopSecurityReviewScope;
235
+ requestedPaths: readonly string[];
236
+ provider: { id: string; version?: string };
237
+ findings: readonly ForgeLoopSecurityReviewFinding[];
238
+ summary: ForgeLoopSecurityReviewSummary;
239
+ diagnostics: readonly string[];
240
+ durationMs?: number;
241
+ authority: "OBSERVATION";
242
+ evidenceAuthority: "NONE";
243
+ actionability: "NON_EXECUTABLE";
244
+ lifecycleAuthority: false;
245
+ completionAuthority: false;
246
+ persisted: false;
247
+ trustRole: "NON_EVIDENCE_SECURITY_REVIEW";
248
+ evidenceRequiresForgeLoopValidation: true;
249
+ }
250
+ export declare function runSecurityReview(options: ForgeLoopSecurityReviewRequest & {
251
+ providerName: string;
252
+ signal?: AbortSignal;
253
+ runtimeContext?: { securityReviewProviders?: object | Map<string, ForgeLoopSecurityReviewProvider | ForgeLoopSecurityReviewProviderFactory> };
254
+ }): Promise<ForgeLoopSecurityReviewResult>;
255
+ export declare const SECURITY_REVIEW_CATEGORIES: readonly ForgeLoopSecurityReviewCategory[];
256
+ export declare const SECURITY_REVIEW_CONFIDENCE: readonly ForgeLoopSecurityReviewConfidence[];
257
+ export declare const SECURITY_REVIEW_LIMITS: Readonly<Record<string, number>>;
258
+ export declare const SECURITY_REVIEW_PROVIDER_ID_PATTERN: RegExp;
259
+ export declare const SECURITY_REVIEW_SCOPES: readonly ForgeLoopSecurityReviewScope[];
260
+ export declare const SECURITY_REVIEW_SEVERITIES: readonly ForgeLoopSecurityReviewSeverity[];
261
+ export declare const SECURITY_REVIEW_TRUST: Readonly<Record<string, unknown>>;
262
+ export declare function assertSecurityReviewProvider(provider: unknown): ForgeLoopSecurityReviewProvider;
263
+ export declare function assertSecurityReviewProviderIdentity(provider: unknown, options?: { expectedId?: string }): { id: string; version?: string };
264
+ export declare function assertSecurityReviewProviderRegistration(provider: unknown, expectedId: string): ForgeLoopSecurityReviewProvider;
265
+ export declare function createSecurityReviewProviderRegistry(
266
+ providers?: Record<string, ForgeLoopSecurityReviewProvider | ForgeLoopSecurityReviewProviderFactory>
267
+ | Map<string, ForgeLoopSecurityReviewProvider | ForgeLoopSecurityReviewProviderFactory>,
268
+ ): Readonly<Record<string, ForgeLoopSecurityReviewProvider | ForgeLoopSecurityReviewProviderFactory>>;
269
+ export declare function normalizeSecurityReviewRequest(input: Record<string, unknown>): ForgeLoopSecurityReviewRequest;
270
+ export declare function resolveSecurityReviewProvider(
271
+ providers: Record<string, ForgeLoopSecurityReviewProvider | ForgeLoopSecurityReviewProviderFactory>
272
+ | Map<string, ForgeLoopSecurityReviewProvider | ForgeLoopSecurityReviewProviderFactory>
273
+ | undefined,
274
+ name: string,
275
+ input?: Partial<ForgeLoopSecurityReviewProviderFactoryInput>,
276
+ ): Promise<ForgeLoopSecurityReviewProvider>;
277
+ export declare function normalizeSecurityReviewResult(raw: unknown, options: {
278
+ provider: ForgeLoopSecurityReviewProvider;
279
+ taskId: string;
280
+ reviewId: string;
281
+ scope: ForgeLoopSecurityReviewScope;
282
+ requestedPaths?: readonly string[];
283
+ }): ForgeLoopSecurityReviewResult;
284
+
42
285
  export interface RepositorySearchSubmatch {
43
286
  start: number;
44
287
  end: number;
@@ -144,6 +387,8 @@ export interface ForgeLoopContext {
144
387
  usageProvider?: ForgeLoopUsageProvider;
145
388
  structuralQualityProviders?: Readonly<Record<string, ForgeLoopStructuralQualityProvider | ForgeLoopStructuralQualityProviderFactory>>;
146
389
  advisoryContextProviders?: Readonly<Record<string, ForgeLoopAdvisoryContextProvider | ForgeLoopAdvisoryContextProviderFactory>>;
390
+ browserVerificationProviders?: Readonly<Record<string, ForgeLoopBrowserVerificationProvider | ForgeLoopBrowserVerificationProviderFactory>> | Map<string, ForgeLoopBrowserVerificationProvider | ForgeLoopBrowserVerificationProviderFactory>;
391
+ securityReviewProviders?: Readonly<Record<string, ForgeLoopSecurityReviewProvider | ForgeLoopSecurityReviewProviderFactory>> | Map<string, ForgeLoopSecurityReviewProvider | ForgeLoopSecurityReviewProviderFactory>;
147
392
  }
148
393
 
149
394
  export interface ForgeLoopAdvisoryContextItem {
@@ -198,6 +443,74 @@ export interface ForgeLoopRipwireProviderOptions {
198
443
  expectedVersion: string;
199
444
  }
200
445
 
446
+ /** Options for the optional, host-injected OpenSrc advisory adapter. */
447
+ export interface ForgeLoopOpenSrcProviderOptions {
448
+ /** Absolute OpenSrc executable path selected by the host; ForgeLoop does not discover it. */
449
+ executablePath: string;
450
+ /** Exact version string qualified by the host and checked lazily at recall time. */
451
+ expectedVersion: string;
452
+ /** Absolute dedicated OpenSrc cache root passed through OPENSRC_HOME; must stay outside the project. */
453
+ cacheRoot: string;
454
+ /** Explicit allowlist of external package/repository specs eligible for advisory recall. */
455
+ sources: readonly string[];
456
+ }
457
+
458
+ /** Options for the optional, host-injected Agent Browser verification adapter. */
459
+ export interface ForgeLoopAgentBrowserProviderOptions {
460
+ /** Absolute host-selected Agent Browser executable; ForgeLoop never discovers or installs it. */
461
+ executablePath: string;
462
+ /** Optional exact version token checked lazily at invocation time. */
463
+ expectedVersion?: string;
464
+ /** Optional absolute host-selected browser executable. It is never request-controlled. */
465
+ browserExecutablePath?: string;
466
+ }
467
+
468
+ /** Options for the optional, host-injected Vercel Emulated Services adapter. */
469
+ export interface ForgeLoopEmulatedServicesProviderOptions {
470
+ /** Absolute host-selected executable; ForgeLoop never discovers or installs it. */
471
+ executablePath: string;
472
+ /** Exact supported version. Defaults to 0.11.2. */
473
+ expectedVersion?: "0.11.2";
474
+ /** Optional absolute host-owned temporary root, outside the target project. */
475
+ tempRoot?: string;
476
+ /** Optional absolute target root used to enforce temporary-state separation. */
477
+ targetRoot?: string;
478
+ }
479
+
480
+ export interface ForgeLoopEmulatedServicesStartRequest {
481
+ services: readonly string[];
482
+ basePort?: number;
483
+ seedPath?: string;
484
+ timeoutMs?: number;
485
+ signal?: AbortSignal;
486
+ }
487
+
488
+ export interface ForgeLoopEmulatedServicesObservation {
489
+ provider: { id: "emulated-services"; version: "0.11.2" };
490
+ services: readonly { id: string; endpoint: string }[];
491
+ status: "READY";
492
+ diagnostics: readonly string[];
493
+ authority: "OBSERVATION";
494
+ evidenceAuthority: "NONE";
495
+ lifecycleAuthority: false;
496
+ completionAuthority: false;
497
+ persisted: false;
498
+ cleanup: { status: "COMPLETED" };
499
+ }
500
+
501
+ export interface ForgeLoopEmulatedServicesProvider {
502
+ id: "emulated-services";
503
+ version: "0.11.2";
504
+ start(input: ForgeLoopEmulatedServicesStartRequest): Promise<ForgeLoopEmulatedServicesObservation>;
505
+ }
506
+
507
+ export declare function createAgentBrowserVerificationProvider(
508
+ options: ForgeLoopAgentBrowserProviderOptions,
509
+ ): ForgeLoopBrowserVerificationProvider;
510
+ export declare function createEmulatedServicesProvider(
511
+ options: ForgeLoopEmulatedServicesProviderOptions,
512
+ ): ForgeLoopEmulatedServicesProvider;
513
+
201
514
  export interface ForgeLoopNormalizedAdvisoryContextResult {
202
515
  provider: {
203
516
  id: string;
@@ -320,14 +633,178 @@ export declare function buildExecutionProfileContext(input: {
320
633
  runtimeContext?: Record<string, unknown>;
321
634
  }): Promise<ForgeLoopExecutionProfileContext>;
322
635
 
636
+ export type ForgeLoopAuditUxCategory =
637
+ | "LIFECYCLE" | "CONTRACT" | "ROUTING" | "GATE" | "CHECK" | "DIAGNOSTIC"
638
+ | "ACTION" | "APPROVAL" | "OWNERSHIP" | "COMPLETION" | "RECOVERY" | "INTEGRITY";
639
+ export interface ForgeLoopAuditUxTimelineItem {
640
+ id: string;
641
+ sequence: number;
642
+ timestamp: string | null;
643
+ timestampQuality: "authoritative" | "unknown";
644
+ kind: string;
645
+ phase: string | null;
646
+ phaseQuality?: string;
647
+ status: string | null;
648
+ title: string;
649
+ summary: string;
650
+ category: ForgeLoopAuditUxCategory;
651
+ }
652
+ export interface ForgeLoopAuditUxCheckAttempt {
653
+ sequence: number | null;
654
+ timestamp: string | null;
655
+ status: string;
656
+ exitCode: number | null;
657
+ requirement: string | null;
658
+ verificationCycle: number | null;
659
+ provenance: string | null;
660
+ executionMode: string | null;
661
+ }
662
+ export interface ForgeLoopAuditUxCheck {
663
+ id: string;
664
+ requirement: string | null;
665
+ attemptCount: number;
666
+ failedAttempts: number;
667
+ currentResult: string | null;
668
+ attempts: readonly ForgeLoopAuditUxCheckAttempt[];
669
+ }
670
+ export interface ForgeLoopAuditUxOwnership {
671
+ claimState: string | null;
672
+ ownershipValid: boolean;
673
+ mutationAllowed: boolean;
674
+ recoveryStatus: string | null;
675
+ historicalWriteClaims: readonly string[];
676
+ effectiveWriteClaims: readonly string[];
677
+ reasonCodes: readonly string[];
678
+ }
679
+ export interface ForgeLoopAuditUxVerification {
680
+ checks: readonly ForgeLoopAuditUxCheck[];
681
+ checkCount: number;
682
+ totalAttempts: number;
683
+ failedAttempts: number;
684
+ coverage: readonly { requirement: string | null; status: string }[];
685
+ }
686
+ export interface ForgeLoopAuditUxCompletion {
687
+ state: "COMPLETE" | "INCOMPLETE";
688
+ valid: boolean;
689
+ requirementsSatisfied: boolean;
690
+ claimsReleased: boolean;
691
+ publicationStatus: string | null;
692
+ productionReadiness: string | null;
693
+ reasonCodes: readonly string[];
694
+ coverage: readonly { requirement: string | null; status: string }[];
695
+ }
696
+ export interface ForgeLoopAuditUxDiagnosticSummary {
697
+ legacyDiagnosisCount: number;
698
+ cases: readonly {
699
+ sequence: number;
700
+ timestamp: string | null;
701
+ verificationCycle: number | null;
702
+ diagnosticRevision: number | null;
703
+ failureClass: string | null;
704
+ informationGain: string | null;
705
+ }[];
706
+ caseCount: number;
707
+ interventionCount: number;
708
+ dispositionCount: number;
709
+ invalidRevisionCount: number;
710
+ }
711
+ export interface ForgeLoopAuditUxActions {
712
+ total: number;
713
+ byState: Readonly<Record<string, number>>;
714
+ byCapability: Readonly<Record<string, number>>;
715
+ required: number;
716
+ ambiguous: number;
717
+ failed: number;
718
+ verified: number;
719
+ trustedSatisfied: number;
720
+ untrustedRequired: number;
721
+ repeatedIdempotencyAttempts: number;
722
+ reconciliationCount: number;
723
+ eventCount: number;
724
+ bounded: boolean;
725
+ }
726
+ export interface ForgeLoopAuditUxResult {
727
+ schemaVersion: 1;
728
+ protocolVersion: number;
729
+ taskId: string | null;
730
+ readOnly: true;
731
+ authority: {
732
+ readOnly: true;
733
+ lifecycleAuthority: false;
734
+ evidenceAuthority: false;
735
+ completionAuthority: false;
736
+ mutationAuthority: false;
737
+ externalExecution: false;
738
+ };
739
+ health: {
740
+ phase: string | null;
741
+ protocolValid: boolean;
742
+ auditStatus: string;
743
+ reportVerdict: string | null;
744
+ completionStatus: string;
745
+ ownershipValid: boolean;
746
+ claimState: string | null;
747
+ mutationAllowed: boolean;
748
+ recoveryStatus: string | null;
749
+ currentNextAction: string | null;
750
+ historyQuality: string | null;
751
+ traceIntegrity: boolean;
752
+ reasonCodes: readonly string[];
753
+ };
754
+ lifecycle: {
755
+ phase: string | null;
756
+ status: string | null;
757
+ revision: number | null;
758
+ verificationCycle: number | null;
759
+ nextAction: string | null;
760
+ terminal: boolean;
761
+ };
762
+ timeline: {
763
+ items: readonly ForgeLoopAuditUxTimelineItem[];
764
+ totalAvailable: number;
765
+ truncated: boolean;
766
+ cursor: {
767
+ beforeSequence: number | null;
768
+ afterSequence: number | null;
769
+ nextBeforeSequence: number | null;
770
+ nextAfterSequence: number | null;
771
+ };
772
+ };
773
+ verification: ForgeLoopAuditUxVerification;
774
+ ownership: ForgeLoopAuditUxOwnership;
775
+ diagnostics: ForgeLoopAuditUxDiagnosticSummary;
776
+ completion: ForgeLoopAuditUxCompletion;
777
+ integrity: { valid: boolean; auditStatus: string; traceValid: boolean; historyValid: boolean; reasonCodes: readonly string[] };
778
+ history: { quality: string | null; totalEventCount: number; returnedEventCount: number; truncated: boolean };
779
+ actions: ForgeLoopAuditUxActions;
780
+ approvals: readonly {
781
+ approvalId: string;
782
+ actionId: string | null;
783
+ status: string;
784
+ decision: string | null;
785
+ requestedAt: string | null;
786
+ resolvedAt: string | null;
787
+ authorityKind: string | null;
788
+ }[];
789
+ recovery: { active: boolean; status: string | null; events: readonly { sequence: number; timestamp: string | null; kind: string | null }[] };
790
+ links: { status: "task/status"; ownership: "task/ownership"; contract: "task/contract"; auditView: "task/audit-view" };
791
+ }
792
+
323
793
  export declare const FORGELOOP_INTEGRATION_API_VERSION: number;
324
794
  export declare const FORGELOOP_INTEGRATION_RUNTIME_VERSION: number;
325
795
  export declare const CLI_COMMAND_DEFINITIONS: Readonly<Record<string, ForgeLoopCommandDefinition>>;
326
796
  export declare const INTEGRATION_LIMITS: Readonly<Record<string, number>>;
797
+ export declare const AUDIT_UX_CATEGORIES: readonly ForgeLoopAuditUxCategory[];
798
+ export declare const AUDIT_UX_LIMITS: Readonly<Record<string, number>>;
799
+ export declare const AUDIT_UX_SCHEMA_VERSION: 1;
327
800
  export declare const INTEGRATION_RISK_CLASSES: Readonly<Record<string, ForgeLoopRiskClass>>;
328
801
  export declare const INTEGRATION_RESOURCE_DEFINITIONS: Readonly<Record<string, { scope: string; description: string }>>;
329
802
  export declare const VERIFICATION_EXECUTION_POLICY_MODES: readonly string[];
330
803
  export declare const VERIFICATION_ISOLATION_MODES: readonly string[];
804
+ export declare const EMULATED_SERVICES_ID: "emulated-services";
805
+ export declare const EMULATED_SERVICES_SUPPORTED_VERSION: "0.11.2";
806
+ export declare const EMULATED_SERVICES_PROCESS_LIMITS: Readonly<Record<string, number>>;
807
+ export declare const EMULATED_SERVICES_ERROR_CODES: Readonly<Record<string, string>>;
331
808
 
332
809
  export declare function getForgeLoopPackageVersion(): string;
333
810
  export declare function defaultCommandInputValues(): ForgeLoopCommandInput;
@@ -345,6 +822,18 @@ export declare function executeForgeLoopCommand<T = unknown>(input: {
345
822
  }): Promise<ForgeLoopCommandEnvelope<T>>;
346
823
  export declare function getForgeLoopCapabilities(input?: { packageVersion?: string | null }): Record<string, unknown>;
347
824
  export declare function classifyForgeLoopInvocation(command: string, input?: ForgeLoopCommandInput): ForgeLoopInvocationClassification;
825
+ export declare function readForgeLoopIntegrationResource(
826
+ uri: "task/audit-view",
827
+ input: {
828
+ projectPath?: string;
829
+ packageRoot?: string;
830
+ taskId: string;
831
+ limit?: number;
832
+ beforeSequence?: number;
833
+ afterSequence?: number;
834
+ categories?: readonly ForgeLoopAuditUxCategory[];
835
+ },
836
+ ): Promise<{ uri: "task/audit-view"; taskId: string; data: ForgeLoopAuditUxResult }>;
348
837
  export declare function readForgeLoopIntegrationResource(uri: string, input?: Record<string, unknown>): Promise<Record<string, unknown>>;
349
838
  export declare function resolveForgeLoopProjectRoot(projectPath?: string, input?: { cwd?: string }): Promise<string>;
350
839
  export declare function searchRepository(request: RepositorySearchRequest & { repoRoot: string }): Promise<RepositorySearchResult>;
@@ -370,6 +859,9 @@ export declare function recallAdvisoryContext(input: {
370
859
  export declare function createRipwireAdvisoryContextProvider(
371
860
  options: ForgeLoopRipwireProviderOptions,
372
861
  ): ForgeLoopAdvisoryContextProvider;
862
+ export declare function createOpenSrcAdvisoryContextProvider(
863
+ options: ForgeLoopOpenSrcProviderOptions,
864
+ ): ForgeLoopAdvisoryContextProvider;
373
865
  export declare const ADVISORY_CONTEXT_LIMITS: Readonly<Record<string, number>>;
374
866
  export declare const ADVISORY_CONTEXT_TRUST: Readonly<Record<string, unknown>>;
375
867
  export declare function normalizeAdvisoryRecallOptions(input?: Partial<ForgeLoopAdvisoryRecallOptions>): ForgeLoopAdvisoryRecallOptions;
@@ -12,6 +12,7 @@ import {
12
12
  import { readForgeLoopIntegrationResource, INTEGRATION_RESOURCE_DEFINITIONS } from "./core/integration-resources.js";
13
13
  import { resolveForgeLoopProjectRoot } from "./core/project-root.js";
14
14
  import { INTEGRATION_LIMITS } from "./core/integration-limits.js";
15
+ import { AUDIT_UX_CATEGORIES, AUDIT_UX_LIMITS, AUDIT_UX_SCHEMA_VERSION } from "./core/audit-ux.js";
15
16
  import { readFileSync } from "node:fs";
16
17
  import path from "node:path";
17
18
  import { fileURLToPath } from "node:url";
@@ -40,6 +41,9 @@ export {
40
41
  readForgeLoopIntegrationResource,
41
42
  resolveForgeLoopProjectRoot,
42
43
  INTEGRATION_LIMITS,
44
+ AUDIT_UX_CATEGORIES,
45
+ AUDIT_UX_LIMITS,
46
+ AUDIT_UX_SCHEMA_VERSION,
43
47
  INTEGRATION_RISK_CLASSES,
44
48
  INTEGRATION_RESOURCE_DEFINITIONS,
45
49
  CLI_COMMAND_DEFINITIONS,
@@ -102,7 +106,57 @@ export {
102
106
  VERIFICATION_ISOLATION_MODES,
103
107
  } from "./core/verification-execution.js";
104
108
  export { recallAdvisoryContext } from "./core/advisory-context/service.js";
109
+ export { runBrowserVerification } from "./core/browser-verification/service.js";
110
+ export {
111
+ BROWSER_VERIFICATION_ASSERTION_KINDS,
112
+ BROWSER_VERIFICATION_ASSERTION_STATUSES,
113
+ BROWSER_VERIFICATION_CAPTURE_POLICIES,
114
+ BROWSER_VERIFICATION_LIMITS,
115
+ BROWSER_VERIFICATION_LOCATOR_KINDS,
116
+ BROWSER_VERIFICATION_STEP_KINDS,
117
+ BROWSER_VERIFICATION_TRUST,
118
+ BROWSER_VERIFICATION_WAIT_CONDITIONS,
119
+ normalizeBrowserVerificationRequestOptions,
120
+ } from "./core/browser-verification/constants.js";
121
+ export {
122
+ assertBrowserVerificationProvider,
123
+ assertBrowserVerificationProviderIdentity,
124
+ assertBrowserVerificationProviderRegistration,
125
+ BROWSER_VERIFICATION_PROVIDER_ID_PATTERN,
126
+ createBrowserVerificationProviderRegistry,
127
+ normalizeBrowserVerificationRequest,
128
+ resolveBrowserVerificationProvider,
129
+ } from "./core/browser-verification/provider.js";
130
+ export { normalizeBrowserVerificationResult } from "./core/browser-verification/normalize.js";
131
+ export { runSecurityReview } from "./core/security-review/service.js";
132
+ export {
133
+ SECURITY_REVIEW_CATEGORIES,
134
+ SECURITY_REVIEW_CONFIDENCE,
135
+ SECURITY_REVIEW_LIMITS,
136
+ SECURITY_REVIEW_SCOPES,
137
+ SECURITY_REVIEW_SEVERITIES,
138
+ SECURITY_REVIEW_TRUST,
139
+ } from "./core/security-review/constants.js";
140
+ export {
141
+ SECURITY_REVIEW_PROVIDER_ID_PATTERN,
142
+ assertSecurityReviewProvider,
143
+ assertSecurityReviewProviderIdentity,
144
+ assertSecurityReviewProviderRegistration,
145
+ createSecurityReviewProviderRegistry,
146
+ normalizeSecurityReviewRequest,
147
+ resolveSecurityReviewProvider,
148
+ } from "./core/security-review/provider.js";
149
+ export { normalizeSecurityReviewResult } from "./core/security-review/normalize.js";
105
150
  export { createRipwireAdvisoryContextProvider } from "./adapters/ripwire/provider.js";
151
+ export { createOpenSrcAdvisoryContextProvider } from "./adapters/opensrc/provider.js";
152
+ export { createAgentBrowserVerificationProvider } from "./adapters/agent-browser/provider.js";
153
+ export {
154
+ createEmulatedServicesProvider,
155
+ EMULATED_SERVICES_ERROR_CODES,
156
+ EMULATED_SERVICES_ID,
157
+ EMULATED_SERVICES_PROCESS_LIMITS,
158
+ EMULATED_SERVICES_SUPPORTED_VERSION,
159
+ } from "./adapters/emulated-services/index.js";
106
160
  export {
107
161
  ADVISORY_CONTEXT_LIMITS,
108
162
  ADVISORY_CONTEXT_TRUST,
@@ -0,0 +1,47 @@
1
+ # Experimental internal provider modules
2
+
3
+ `index.js` is an internal module entry point, not a supported package subpath.
4
+ `@cassiomc1/forgeloop/providers` is deliberately not exported. The public,
5
+ provider-neutral capability vocabulary is advertised by `protocol-info`; the
6
+ generic registry remains experimental and internal. See
7
+ [`../../docs/PROVIDER_ARCHITECTURE.md`](../../docs/PROVIDER_ARCHITECTURE.md),
8
+ [`../../docs/PROVIDERS.md`](../../docs/PROVIDERS.md), and
9
+ [`../../PROTOCOL_INTEGRATION.md`](../../PROTOCOL_INTEGRATION.md).
10
+
11
+ `createProviderRegistry({ providers })` accepts a plain object map from ID to
12
+ provider or lazy factory. Object keys are already unique in JavaScript; there
13
+ is no duplicate-registration contract. Providers implement `id`, `kind`, optional
14
+ `version` and `operation(input, context)`. Factories receive the same frozen
15
+ `context` as operations: `{ signal, timeoutMs, providerId }`.
16
+
17
+ The default deadline is 10,000 ms; `timeoutMs` must be an integer from 1 through
18
+ 300,000. Each byte limit defaults to 262,144 bytes and must be an integer from 1
19
+ through 4,194,304. Undefined options use defaults; null and coercible values do
20
+ not. Input normalization precedes the shared factory/validation/operation/result
21
+ deadline. Checkpoints reject results after elapsed synchronous work, but JavaScript
22
+ running on the same event loop cannot be preempted by a timer.
23
+
24
+ Timeout rejects the invocation and aborts its context. Cancellation is cooperative:
25
+ providers owning subprocesses, browsers, requests or other resources must listen
26
+ to `signal` and clean them up. Late factory resolution never starts an operation.
27
+ This registry is not a sandbox for hostile executable code. Async providers must
28
+ return native promises; arbitrary thenables are not supported. JavaScript itself
29
+ assimilates values returned by async functions before the registry can inspect them.
30
+
31
+ Input and output are detached, deeply frozen JSON snapshots. Output requires a
32
+ plain object root; input permits any JSON root. Accessors, proxies, custom
33
+ prototypes, symbols, non-enumerable properties, functions, undefined, non-finite
34
+ numbers, cycles and sparse or extended arrays are rejected without invoking
35
+ payload getters or serialization hooks. Serialization is byte-budgeted with a
36
+ maximum depth of 64 and 100,000 visited values. Shared acyclic references are
37
+ copied as ordinary JSON. Provider-owned originals are not frozen or returned.
38
+
39
+ Reserved authority keys set to true are rejected recursively, and top-level
40
+ `status: COMPLETE` is forbidden. These checks never turn other output into evidence
41
+ or authority. All factory/operation exceptions normalize to
42
+ `E_PROVIDER_EXECUTION_FAILED`, even if they carry ForgeLoop-shaped codes or were
43
+ constructed with `providerError`; validation and timeout errors are generated
44
+ outside that call boundary. Error messages do not reproduce provider payloads.
45
+
46
+ No installation, subprocess launch, protocol mutation or persistence occurs here.
47
+ Existing advisory and verification boundaries remain unchanged.