opencode-swarm 7.155.0 → 7.157.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 (91) hide show
  1. package/dist/background/workspace-snapshot.d.ts +28 -0
  2. package/dist/cli/{coder-settlement-2kdtysrg.js → coder-settlement-dz2x352d.js} +9 -9
  3. package/dist/cli/{config-doctor-s6p9aqfv.js → config-doctor-4jxf9w9e.js} +3 -3
  4. package/dist/cli/{core-ev2ebc4v.js → core-xf2f087t.js} +2 -2
  5. package/dist/cli/{curation-policy-jabphe51.js → curation-policy-72qx868r.js} +4 -4
  6. package/dist/cli/{curator-llm-factory-kd8v16jj.js → curator-llm-factory-7mfvey3x.js} +31 -31
  7. package/dist/cli/{curator-adp0dsv4.js → curator-pjjw3ja4.js} +31 -31
  8. package/dist/cli/{dispatch-w0rzasz3.js → dispatch-7r46tfr9.js} +10 -8
  9. package/dist/cli/{evidence-summary-service-kpjpd86j.js → evidence-summary-service-5ffkbs50.js} +12 -12
  10. package/dist/cli/{gate-evidence-etbcms2v.js → gate-evidence-ne9rbdtb.js} +5 -5
  11. package/dist/cli/guardrail-explain-b9vr4ta3.js +67 -0
  12. package/dist/cli/{guardrail-log-614g1pta.js → guardrail-log-hrt36jz5.js} +5 -5
  13. package/dist/cli/{guardrail-reset-0wdj53cp.js → guardrail-reset-pggm9hx4.js} +31 -31
  14. package/dist/cli/{hashing-mjwn6j4y.js → hashing-r4hbav6j.js} +1 -1
  15. package/dist/cli/{hive-promoter-b1wv52fs.js → hive-promoter-7vxm11sm.js} +31 -31
  16. package/dist/cli/{index-caqe8x14.js → index-12e2hztp.js} +1 -1
  17. package/dist/cli/{index-rb4t72we.js → index-1dzy1j4v.js} +2 -2
  18. package/dist/cli/{index-79qymsxf.js → index-2e60kmzg.js} +1 -1
  19. package/dist/cli/{index-vnn7qq8c.js → index-3f7hqtgg.js} +62 -1
  20. package/dist/cli/{index-qzqpq75z.js → index-3qpr16k2.js} +52 -33
  21. package/dist/cli/{index-qj9jrjvr.js → index-3vqdt1sx.js} +5 -5
  22. package/dist/cli/{index-c590qxts.js → index-4kd1nqd2.js} +8 -3
  23. package/dist/cli/{index-34wn2ztk.js → index-4w20thrc.js} +22 -4
  24. package/dist/cli/{index-26cvxrym.js → index-61nkp124.js} +2 -2
  25. package/dist/cli/{index-6bqqzfbe.js → index-6sbx96v6.js} +2 -2
  26. package/dist/cli/{index-zvp68qx6.js → index-79k7p589.js} +1 -1
  27. package/dist/cli/{index-ketfp4rv.js → index-8n602qc2.js} +4 -4
  28. package/dist/cli/{index-fjcm6wwf.js → index-91ybfvy2.js} +1 -1
  29. package/dist/cli/{index-wwv3cbv1.js → index-93ymj3j5.js} +5 -5
  30. package/dist/cli/{index-myt57pht.js → index-9r7gp6cp.js} +5 -1
  31. package/dist/cli/{index-85p1850w.js → index-b5xm177r.js} +1 -1
  32. package/dist/cli/{index-0q8kywcf.js → index-dwkrdpz2.js} +1 -1
  33. package/dist/cli/{index-veajr5x7.js → index-ebratyzr.js} +1 -1
  34. package/dist/cli/{index-kgdbtwfm.js → index-g0j2hnse.js} +5 -5
  35. package/dist/cli/{index-2gfe61qp.js → index-gk6wpq41.js} +5259 -1394
  36. package/dist/cli/{index-aqg7c1z9.js → index-gpf3cjre.js} +1 -1
  37. package/dist/cli/{index-ctsct3hy.js → index-j3egsxa1.js} +6 -6
  38. package/dist/cli/{index-xn23xnnk.js → index-n6ayyadp.js} +4 -4
  39. package/dist/cli/{index-t3xqpece.js → index-n7gv8m7v.js} +4 -4
  40. package/dist/cli/{index-mm7ase9k.js → index-nd22bsnt.js} +6 -2
  41. package/dist/cli/{index-c9nabqzd.js → index-ngn6jmad.js} +2 -2
  42. package/dist/cli/{index-xdy28ngt.js → index-nwkr6tvv.js} +17 -1
  43. package/dist/cli/{index-spbxf9vn.js → index-p0by16z8.js} +2 -2
  44. package/dist/cli/{index-dw2q720x.js → index-q94gt4n9.js} +3 -3
  45. package/dist/cli/{index-kyc2c7hq.js → index-t0kxka8n.js} +2 -2
  46. package/dist/cli/{index-e90g4dsw.js → index-tvtvhjh0.js} +4 -4
  47. package/dist/cli/{index-y8552snf.js → index-txdagbh7.js} +6 -1
  48. package/dist/cli/{index-egnpzfe3.js → index-vbqssmbs.js} +6 -6
  49. package/dist/cli/{index-ew6fykvv.js → index-xe6zbfps.js} +1 -1
  50. package/dist/cli/{index-x9tbe9v7.js → index-zq7pw6qg.js} +2 -2
  51. package/dist/cli/index.js +31 -31
  52. package/dist/cli/{knowledge-escalator-z09aqvfe.js → knowledge-escalator-d65mctqy.js} +10 -10
  53. package/dist/cli/{knowledge-events-03f1rwm8.js → knowledge-events-6aet71sp.js} +8 -8
  54. package/dist/cli/{knowledge-link-4frk38w8.js → knowledge-link-z9cchqdj.js} +3 -3
  55. package/dist/cli/{knowledge-store-sn28k13f.js → knowledge-store-vvgxbakx.js} +4 -4
  56. package/dist/cli/{knowledge-validator-rwrt3yja.js → knowledge-validator-4fb6pbpn.js} +6 -6
  57. package/dist/cli/{model-preflight-b95w8wxy.js → model-preflight-cv9kvw8h.js} +1 -1
  58. package/dist/cli/{pending-delegations-qe16vfrj.js → pending-delegations-f52jtanf.js} +1 -1
  59. package/dist/cli/{pr-subscriptions-00evnffe.js → pr-subscriptions-76vg2xya.js} +2 -2
  60. package/dist/cli/{runner-k1rkbjm8.js → runner-eagt6gf8.js} +5 -5
  61. package/dist/cli/{scan-cursor-h3mfzjc9.js → scan-cursor-q3530gc8.js} +5 -5
  62. package/dist/cli/{schema-c37h5xw4.js → schema-5zc62306.js} +6 -2
  63. package/dist/cli/{scope-persistence-35z42pj5.js → scope-persistence-fzqf115q.js} +7 -7
  64. package/dist/cli/{skill-generator-60px2mvb.js → skill-generator-kh1z90tm.js} +12 -12
  65. package/dist/cli/{workspace-snapshot-8269e1p9.js → workspace-snapshot-yq0tc49d.js} +9 -1
  66. package/dist/cli/{worktree-collision-ownership-2pc20ypq.js → worktree-collision-ownership-2qxjtxt6.js} +3 -3
  67. package/dist/cli/{worktree-isolation-w4yamc3b.js → worktree-isolation-40v34p0s.js} +31 -31
  68. package/dist/commands/command-dispatch.d.ts +2 -1
  69. package/dist/commands/harness.d.ts +14 -0
  70. package/dist/commands/index.d.ts +3 -1
  71. package/dist/commands/registry.d.ts +115 -2
  72. package/dist/config/schema.d.ts +34 -0
  73. package/dist/harness/contracts.d.ts +492 -0
  74. package/dist/harness/factory.d.ts +72 -0
  75. package/dist/harness/hash.d.ts +4 -0
  76. package/dist/harness/index.d.ts +6 -0
  77. package/dist/harness/patch.d.ts +3 -0
  78. package/dist/harness/public-api.d.ts +105 -0
  79. package/dist/harness/source-candidate.d.ts +45 -0
  80. package/dist/harness/store.d.ts +256 -0
  81. package/dist/hooks/pr-workflow-gate.d.ts +291 -3
  82. package/dist/index.d.ts +2 -0
  83. package/dist/index.js +320 -296
  84. package/dist/lang/manifest-files.d.ts +25 -0
  85. package/dist/security/write-authority.d.ts +2 -1
  86. package/dist/tools/index.d.ts +1 -0
  87. package/dist/tools/invalidate-pr-feedback-publication.d.ts +20 -0
  88. package/dist/tools/manifest.d.ts +1 -0
  89. package/dist/tools/tool-metadata.d.ts +4 -0
  90. package/package.json +1 -1
  91. package/dist/cli/guardrail-explain-wqb5h7kk.js +0 -67
@@ -0,0 +1,492 @@
1
+ import { z } from 'zod';
2
+ declare const RiskTierSchema: z.ZodEnum<{
3
+ low: "low";
4
+ medium: "medium";
5
+ high: "high";
6
+ }>;
7
+ export declare const HarnessIdentifierSchema: z.ZodString;
8
+ export declare const HarnessSha256Schema: z.ZodString;
9
+ export declare const HarnessRelativePathSchema: z.ZodString;
10
+ export declare const HarnessRiskTierSchema: z.ZodEnum<{
11
+ low: "low";
12
+ medium: "medium";
13
+ high: "high";
14
+ }>;
15
+ declare const PromptArtifactProvenanceV1Schema: z.ZodObject<{
16
+ source: z.ZodLiteral<"candidate">;
17
+ origin: z.ZodString;
18
+ }, z.core.$strict>;
19
+ export type PromptArtifactProvenanceV1 = z.infer<typeof PromptArtifactProvenanceV1Schema>;
20
+ export declare const PromptArtifactV1Schema: z.ZodObject<{
21
+ v: z.ZodLiteral<1>;
22
+ promptId: z.ZodString;
23
+ candidateId: z.ZodString;
24
+ sha256: z.ZodString;
25
+ bytes: z.ZodNumber;
26
+ mediaType: z.ZodLiteral<"text/plain; charset=utf-8">;
27
+ content: z.ZodString;
28
+ provenance: z.ZodObject<{
29
+ source: z.ZodLiteral<"candidate">;
30
+ origin: z.ZodString;
31
+ }, z.core.$strict>;
32
+ }, z.core.$strict>;
33
+ export type PromptArtifactV1 = z.infer<typeof PromptArtifactV1Schema>;
34
+ export declare const PromptBindingV1Schema: z.ZodObject<{
35
+ v: z.ZodLiteral<1>;
36
+ promptId: z.ZodString;
37
+ ref: z.ZodString;
38
+ sha256: z.ZodString;
39
+ }, z.core.$strict>;
40
+ export type PromptBindingV1 = z.infer<typeof PromptBindingV1Schema>;
41
+ export declare const ToolSpecV1Schema: z.ZodObject<{
42
+ v: z.ZodLiteral<1>;
43
+ toolId: z.ZodString;
44
+ description: z.ZodOptional<z.ZodString>;
45
+ }, z.core.$strict>;
46
+ export type ToolSpecV1 = z.infer<typeof ToolSpecV1Schema>;
47
+ export declare const AgentBlueprintV1Schema: z.ZodObject<{
48
+ v: z.ZodLiteral<1>;
49
+ agentName: z.ZodString;
50
+ description: z.ZodOptional<z.ZodString>;
51
+ mode: z.ZodEnum<{
52
+ primary: "primary";
53
+ subagent: "subagent";
54
+ }>;
55
+ model: z.ZodOptional<z.ZodString>;
56
+ variant: z.ZodOptional<z.ZodString>;
57
+ reasoning: z.ZodOptional<z.ZodObject<{
58
+ effort: z.ZodEnum<{
59
+ none: "none";
60
+ low: "low";
61
+ medium: "medium";
62
+ high: "high";
63
+ max: "max";
64
+ xhigh: "xhigh";
65
+ minimal: "minimal";
66
+ ultra: "ultra";
67
+ }>;
68
+ }, z.core.$strict>>;
69
+ thinking: z.ZodOptional<z.ZodObject<{
70
+ type: z.ZodEnum<{
71
+ enabled: "enabled";
72
+ disabled: "disabled";
73
+ }>;
74
+ budget_tokens: z.ZodOptional<z.ZodNumber>;
75
+ }, z.core.$strict>>;
76
+ temperature: z.ZodNumber;
77
+ prompt: z.ZodObject<{
78
+ v: z.ZodLiteral<1>;
79
+ promptId: z.ZodString;
80
+ ref: z.ZodString;
81
+ sha256: z.ZodString;
82
+ }, z.core.$strict>;
83
+ tools: z.ZodArray<z.ZodString>;
84
+ disabledTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
85
+ }, z.core.$strict>;
86
+ export type AgentBlueprintV1 = z.infer<typeof AgentBlueprintV1Schema>;
87
+ export declare const OrchestrationSpecV1Schema: z.ZodObject<{
88
+ v: z.ZodLiteral<1>;
89
+ defaultAgent: z.ZodString;
90
+ activation: z.ZodEnum<{
91
+ manual: "manual";
92
+ }>;
93
+ execution: z.ZodEnum<{
94
+ disabled: "disabled";
95
+ }>;
96
+ multiSwarm: z.ZodBoolean;
97
+ }, z.core.$strict>;
98
+ export type OrchestrationSpecV1 = z.infer<typeof OrchestrationSpecV1Schema>;
99
+ export declare const HarnessConstraintsV1Schema: z.ZodObject<{
100
+ v: z.ZodLiteral<1>;
101
+ sourceAllowlist: z.ZodArray<z.ZodString>;
102
+ extraProtectedPaths: z.ZodArray<z.ZodString>;
103
+ maxPatchBytes: z.ZodNumber;
104
+ maxFiles: z.ZodNumber;
105
+ maxFileBytes: z.ZodNumber;
106
+ maxTotalBytes: z.ZodNumber;
107
+ maxChangedLines: z.ZodNumber;
108
+ maxVersions: z.ZodNumber;
109
+ maxReplayRecords: z.ZodNumber;
110
+ maxOutputBytes: z.ZodNumber;
111
+ }, z.core.$strict>;
112
+ export type HarnessConstraintsV1 = z.infer<typeof HarnessConstraintsV1Schema>;
113
+ export declare const DEFAULT_HARNESS_CONSTRAINTS_V1: HarnessConstraintsV1;
114
+ export declare const HarnessBlueprintV1Schema: z.ZodObject<{
115
+ v: z.ZodLiteral<1>;
116
+ blueprintId: z.ZodString;
117
+ definitionsHash: z.ZodString;
118
+ tools: z.ZodArray<z.ZodObject<{
119
+ v: z.ZodLiteral<1>;
120
+ toolId: z.ZodString;
121
+ description: z.ZodOptional<z.ZodString>;
122
+ }, z.core.$strict>>;
123
+ agents: z.ZodArray<z.ZodObject<{
124
+ v: z.ZodLiteral<1>;
125
+ agentName: z.ZodString;
126
+ description: z.ZodOptional<z.ZodString>;
127
+ mode: z.ZodEnum<{
128
+ primary: "primary";
129
+ subagent: "subagent";
130
+ }>;
131
+ model: z.ZodOptional<z.ZodString>;
132
+ variant: z.ZodOptional<z.ZodString>;
133
+ reasoning: z.ZodOptional<z.ZodObject<{
134
+ effort: z.ZodEnum<{
135
+ none: "none";
136
+ low: "low";
137
+ medium: "medium";
138
+ high: "high";
139
+ max: "max";
140
+ xhigh: "xhigh";
141
+ minimal: "minimal";
142
+ ultra: "ultra";
143
+ }>;
144
+ }, z.core.$strict>>;
145
+ thinking: z.ZodOptional<z.ZodObject<{
146
+ type: z.ZodEnum<{
147
+ enabled: "enabled";
148
+ disabled: "disabled";
149
+ }>;
150
+ budget_tokens: z.ZodOptional<z.ZodNumber>;
151
+ }, z.core.$strict>>;
152
+ temperature: z.ZodNumber;
153
+ prompt: z.ZodObject<{
154
+ v: z.ZodLiteral<1>;
155
+ promptId: z.ZodString;
156
+ ref: z.ZodString;
157
+ sha256: z.ZodString;
158
+ }, z.core.$strict>;
159
+ tools: z.ZodArray<z.ZodString>;
160
+ disabledTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
161
+ }, z.core.$strict>>;
162
+ orchestration: z.ZodObject<{
163
+ v: z.ZodLiteral<1>;
164
+ defaultAgent: z.ZodString;
165
+ activation: z.ZodEnum<{
166
+ manual: "manual";
167
+ }>;
168
+ execution: z.ZodEnum<{
169
+ disabled: "disabled";
170
+ }>;
171
+ multiSwarm: z.ZodBoolean;
172
+ }, z.core.$strict>;
173
+ constraints: z.ZodObject<{
174
+ v: z.ZodLiteral<1>;
175
+ sourceAllowlist: z.ZodArray<z.ZodString>;
176
+ extraProtectedPaths: z.ZodArray<z.ZodString>;
177
+ maxPatchBytes: z.ZodNumber;
178
+ maxFiles: z.ZodNumber;
179
+ maxFileBytes: z.ZodNumber;
180
+ maxTotalBytes: z.ZodNumber;
181
+ maxChangedLines: z.ZodNumber;
182
+ maxVersions: z.ZodNumber;
183
+ maxReplayRecords: z.ZodNumber;
184
+ maxOutputBytes: z.ZodNumber;
185
+ }, z.core.$strict>;
186
+ contentHash: z.ZodString;
187
+ }, z.core.$strict>;
188
+ export type HarnessBlueprintV1 = z.infer<typeof HarnessBlueprintV1Schema>;
189
+ export declare const HarnessCandidateFileV1Schema: z.ZodObject<{
190
+ relativePath: z.ZodString;
191
+ oldRelativePath: z.ZodOptional<z.ZodString>;
192
+ operation: z.ZodOptional<z.ZodEnum<{
193
+ mode: "mode";
194
+ rename: "rename";
195
+ copy: "copy";
196
+ add: "add";
197
+ delete: "delete";
198
+ modify: "modify";
199
+ }>>;
200
+ trackedMode: z.ZodString;
201
+ afterMode: z.ZodOptional<z.ZodString>;
202
+ beforeSha256: z.ZodString;
203
+ afterSha256: z.ZodString;
204
+ bytesBefore: z.ZodNumber;
205
+ bytesAfter: z.ZodNumber;
206
+ addedLines: z.ZodNumber;
207
+ removedLines: z.ZodNumber;
208
+ changedLines: z.ZodNumber;
209
+ }, z.core.$strict>;
210
+ export type HarnessCandidateFileV1 = z.infer<typeof HarnessCandidateFileV1Schema>;
211
+ export declare const HarnessCandidateManifestV1Schema: z.ZodObject<{
212
+ v: z.ZodLiteral<1>;
213
+ candidateId: z.ZodString;
214
+ baseSha: z.ZodString;
215
+ origin: z.ZodString;
216
+ patchSha256: z.ZodString;
217
+ promptArtifactHashes: z.ZodArray<z.ZodString>;
218
+ manifestHash: z.ZodString;
219
+ riskTier: z.ZodEnum<{
220
+ low: "low";
221
+ medium: "medium";
222
+ high: "high";
223
+ }>;
224
+ approvedPaths: z.ZodArray<z.ZodString>;
225
+ files: z.ZodArray<z.ZodObject<{
226
+ relativePath: z.ZodString;
227
+ oldRelativePath: z.ZodOptional<z.ZodString>;
228
+ operation: z.ZodOptional<z.ZodEnum<{
229
+ mode: "mode";
230
+ rename: "rename";
231
+ copy: "copy";
232
+ add: "add";
233
+ delete: "delete";
234
+ modify: "modify";
235
+ }>>;
236
+ trackedMode: z.ZodString;
237
+ afterMode: z.ZodOptional<z.ZodString>;
238
+ beforeSha256: z.ZodString;
239
+ afterSha256: z.ZodString;
240
+ bytesBefore: z.ZodNumber;
241
+ bytesAfter: z.ZodNumber;
242
+ addedLines: z.ZodNumber;
243
+ removedLines: z.ZodNumber;
244
+ changedLines: z.ZodNumber;
245
+ }, z.core.$strict>>;
246
+ }, z.core.$strict>;
247
+ export type HarnessCandidateManifestV1 = z.infer<typeof HarnessCandidateManifestV1Schema>;
248
+ export declare const BlueprintPatchOperationV1Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
249
+ op: z.ZodLiteral<"upsert_prompt">;
250
+ fieldPath: z.ZodUnion<readonly [z.ZodLiteral<"orchestration">, z.ZodLiteral<"constraints">, z.ZodString]>;
251
+ expectedFieldHash: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
252
+ prompt: z.ZodObject<{
253
+ v: z.ZodLiteral<1>;
254
+ promptId: z.ZodString;
255
+ candidateId: z.ZodString;
256
+ sha256: z.ZodString;
257
+ bytes: z.ZodNumber;
258
+ mediaType: z.ZodLiteral<"text/plain; charset=utf-8">;
259
+ content: z.ZodString;
260
+ provenance: z.ZodObject<{
261
+ source: z.ZodLiteral<"candidate">;
262
+ origin: z.ZodString;
263
+ }, z.core.$strict>;
264
+ }, z.core.$strict>;
265
+ }, z.core.$strict>, z.ZodObject<{
266
+ op: z.ZodLiteral<"upsert_tool">;
267
+ fieldPath: z.ZodUnion<readonly [z.ZodLiteral<"orchestration">, z.ZodLiteral<"constraints">, z.ZodString]>;
268
+ expectedFieldHash: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
269
+ tool: z.ZodObject<{
270
+ v: z.ZodLiteral<1>;
271
+ toolId: z.ZodString;
272
+ description: z.ZodOptional<z.ZodString>;
273
+ }, z.core.$strict>;
274
+ }, z.core.$strict>, z.ZodObject<{
275
+ op: z.ZodLiteral<"remove_tool">;
276
+ fieldPath: z.ZodUnion<readonly [z.ZodLiteral<"orchestration">, z.ZodLiteral<"constraints">, z.ZodString]>;
277
+ expectedFieldHash: z.ZodString;
278
+ }, z.core.$strict>, z.ZodObject<{
279
+ op: z.ZodLiteral<"upsert_agent">;
280
+ fieldPath: z.ZodUnion<readonly [z.ZodLiteral<"orchestration">, z.ZodLiteral<"constraints">, z.ZodString]>;
281
+ expectedFieldHash: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
282
+ agent: z.ZodObject<{
283
+ v: z.ZodLiteral<1>;
284
+ agentName: z.ZodString;
285
+ description: z.ZodOptional<z.ZodString>;
286
+ mode: z.ZodEnum<{
287
+ primary: "primary";
288
+ subagent: "subagent";
289
+ }>;
290
+ model: z.ZodOptional<z.ZodString>;
291
+ variant: z.ZodOptional<z.ZodString>;
292
+ reasoning: z.ZodOptional<z.ZodObject<{
293
+ effort: z.ZodEnum<{
294
+ none: "none";
295
+ low: "low";
296
+ medium: "medium";
297
+ high: "high";
298
+ max: "max";
299
+ xhigh: "xhigh";
300
+ minimal: "minimal";
301
+ ultra: "ultra";
302
+ }>;
303
+ }, z.core.$strict>>;
304
+ thinking: z.ZodOptional<z.ZodObject<{
305
+ type: z.ZodEnum<{
306
+ enabled: "enabled";
307
+ disabled: "disabled";
308
+ }>;
309
+ budget_tokens: z.ZodOptional<z.ZodNumber>;
310
+ }, z.core.$strict>>;
311
+ temperature: z.ZodNumber;
312
+ prompt: z.ZodObject<{
313
+ v: z.ZodLiteral<1>;
314
+ promptId: z.ZodString;
315
+ ref: z.ZodString;
316
+ sha256: z.ZodString;
317
+ }, z.core.$strict>;
318
+ tools: z.ZodArray<z.ZodString>;
319
+ disabledTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
320
+ }, z.core.$strict>;
321
+ }, z.core.$strict>, z.ZodObject<{
322
+ op: z.ZodLiteral<"remove_agent">;
323
+ fieldPath: z.ZodUnion<readonly [z.ZodLiteral<"orchestration">, z.ZodLiteral<"constraints">, z.ZodString]>;
324
+ expectedFieldHash: z.ZodString;
325
+ }, z.core.$strict>, z.ZodObject<{
326
+ op: z.ZodLiteral<"replace_orchestration">;
327
+ fieldPath: z.ZodLiteral<"orchestration">;
328
+ expectedFieldHash: z.ZodString;
329
+ orchestration: z.ZodObject<{
330
+ v: z.ZodLiteral<1>;
331
+ defaultAgent: z.ZodString;
332
+ activation: z.ZodEnum<{
333
+ manual: "manual";
334
+ }>;
335
+ execution: z.ZodEnum<{
336
+ disabled: "disabled";
337
+ }>;
338
+ multiSwarm: z.ZodBoolean;
339
+ }, z.core.$strict>;
340
+ }, z.core.$strict>, z.ZodObject<{
341
+ op: z.ZodLiteral<"replace_constraints">;
342
+ fieldPath: z.ZodLiteral<"constraints">;
343
+ expectedFieldHash: z.ZodString;
344
+ constraints: z.ZodObject<{
345
+ v: z.ZodLiteral<1>;
346
+ sourceAllowlist: z.ZodArray<z.ZodString>;
347
+ extraProtectedPaths: z.ZodArray<z.ZodString>;
348
+ maxPatchBytes: z.ZodNumber;
349
+ maxFiles: z.ZodNumber;
350
+ maxFileBytes: z.ZodNumber;
351
+ maxTotalBytes: z.ZodNumber;
352
+ maxChangedLines: z.ZodNumber;
353
+ maxVersions: z.ZodNumber;
354
+ maxReplayRecords: z.ZodNumber;
355
+ maxOutputBytes: z.ZodNumber;
356
+ }, z.core.$strict>;
357
+ }, z.core.$strict>], "op">;
358
+ export type BlueprintPatchOperationV1 = z.infer<typeof BlueprintPatchOperationV1Schema>;
359
+ export declare const BlueprintPatchV1Schema: z.ZodObject<{
360
+ v: z.ZodLiteral<1>;
361
+ patchId: z.ZodString;
362
+ expectedBaseHash: z.ZodString;
363
+ expectedResultHash: z.ZodString;
364
+ operations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
365
+ op: z.ZodLiteral<"upsert_prompt">;
366
+ fieldPath: z.ZodUnion<readonly [z.ZodLiteral<"orchestration">, z.ZodLiteral<"constraints">, z.ZodString]>;
367
+ expectedFieldHash: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
368
+ prompt: z.ZodObject<{
369
+ v: z.ZodLiteral<1>;
370
+ promptId: z.ZodString;
371
+ candidateId: z.ZodString;
372
+ sha256: z.ZodString;
373
+ bytes: z.ZodNumber;
374
+ mediaType: z.ZodLiteral<"text/plain; charset=utf-8">;
375
+ content: z.ZodString;
376
+ provenance: z.ZodObject<{
377
+ source: z.ZodLiteral<"candidate">;
378
+ origin: z.ZodString;
379
+ }, z.core.$strict>;
380
+ }, z.core.$strict>;
381
+ }, z.core.$strict>, z.ZodObject<{
382
+ op: z.ZodLiteral<"upsert_tool">;
383
+ fieldPath: z.ZodUnion<readonly [z.ZodLiteral<"orchestration">, z.ZodLiteral<"constraints">, z.ZodString]>;
384
+ expectedFieldHash: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
385
+ tool: z.ZodObject<{
386
+ v: z.ZodLiteral<1>;
387
+ toolId: z.ZodString;
388
+ description: z.ZodOptional<z.ZodString>;
389
+ }, z.core.$strict>;
390
+ }, z.core.$strict>, z.ZodObject<{
391
+ op: z.ZodLiteral<"remove_tool">;
392
+ fieldPath: z.ZodUnion<readonly [z.ZodLiteral<"orchestration">, z.ZodLiteral<"constraints">, z.ZodString]>;
393
+ expectedFieldHash: z.ZodString;
394
+ }, z.core.$strict>, z.ZodObject<{
395
+ op: z.ZodLiteral<"upsert_agent">;
396
+ fieldPath: z.ZodUnion<readonly [z.ZodLiteral<"orchestration">, z.ZodLiteral<"constraints">, z.ZodString]>;
397
+ expectedFieldHash: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
398
+ agent: z.ZodObject<{
399
+ v: z.ZodLiteral<1>;
400
+ agentName: z.ZodString;
401
+ description: z.ZodOptional<z.ZodString>;
402
+ mode: z.ZodEnum<{
403
+ primary: "primary";
404
+ subagent: "subagent";
405
+ }>;
406
+ model: z.ZodOptional<z.ZodString>;
407
+ variant: z.ZodOptional<z.ZodString>;
408
+ reasoning: z.ZodOptional<z.ZodObject<{
409
+ effort: z.ZodEnum<{
410
+ none: "none";
411
+ low: "low";
412
+ medium: "medium";
413
+ high: "high";
414
+ max: "max";
415
+ xhigh: "xhigh";
416
+ minimal: "minimal";
417
+ ultra: "ultra";
418
+ }>;
419
+ }, z.core.$strict>>;
420
+ thinking: z.ZodOptional<z.ZodObject<{
421
+ type: z.ZodEnum<{
422
+ enabled: "enabled";
423
+ disabled: "disabled";
424
+ }>;
425
+ budget_tokens: z.ZodOptional<z.ZodNumber>;
426
+ }, z.core.$strict>>;
427
+ temperature: z.ZodNumber;
428
+ prompt: z.ZodObject<{
429
+ v: z.ZodLiteral<1>;
430
+ promptId: z.ZodString;
431
+ ref: z.ZodString;
432
+ sha256: z.ZodString;
433
+ }, z.core.$strict>;
434
+ tools: z.ZodArray<z.ZodString>;
435
+ disabledTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
436
+ }, z.core.$strict>;
437
+ }, z.core.$strict>, z.ZodObject<{
438
+ op: z.ZodLiteral<"remove_agent">;
439
+ fieldPath: z.ZodUnion<readonly [z.ZodLiteral<"orchestration">, z.ZodLiteral<"constraints">, z.ZodString]>;
440
+ expectedFieldHash: z.ZodString;
441
+ }, z.core.$strict>, z.ZodObject<{
442
+ op: z.ZodLiteral<"replace_orchestration">;
443
+ fieldPath: z.ZodLiteral<"orchestration">;
444
+ expectedFieldHash: z.ZodString;
445
+ orchestration: z.ZodObject<{
446
+ v: z.ZodLiteral<1>;
447
+ defaultAgent: z.ZodString;
448
+ activation: z.ZodEnum<{
449
+ manual: "manual";
450
+ }>;
451
+ execution: z.ZodEnum<{
452
+ disabled: "disabled";
453
+ }>;
454
+ multiSwarm: z.ZodBoolean;
455
+ }, z.core.$strict>;
456
+ }, z.core.$strict>, z.ZodObject<{
457
+ op: z.ZodLiteral<"replace_constraints">;
458
+ fieldPath: z.ZodLiteral<"constraints">;
459
+ expectedFieldHash: z.ZodString;
460
+ constraints: z.ZodObject<{
461
+ v: z.ZodLiteral<1>;
462
+ sourceAllowlist: z.ZodArray<z.ZodString>;
463
+ extraProtectedPaths: z.ZodArray<z.ZodString>;
464
+ maxPatchBytes: z.ZodNumber;
465
+ maxFiles: z.ZodNumber;
466
+ maxFileBytes: z.ZodNumber;
467
+ maxTotalBytes: z.ZodNumber;
468
+ maxChangedLines: z.ZodNumber;
469
+ maxVersions: z.ZodNumber;
470
+ maxReplayRecords: z.ZodNumber;
471
+ maxOutputBytes: z.ZodNumber;
472
+ }, z.core.$strict>;
473
+ }, z.core.$strict>], "op">>;
474
+ }, z.core.$strict>;
475
+ export type BlueprintPatchV1 = z.infer<typeof BlueprintPatchV1Schema>;
476
+ export declare function computePromptArtifactHash(value: Omit<PromptArtifactV1, 'sha256'> | PromptArtifactV1): string;
477
+ export declare function computePromptBindingHash(value: PromptBindingV1): string;
478
+ export declare function computeHarnessBlueprintHash(value: Omit<HarnessBlueprintV1, 'contentHash'> | HarnessBlueprintV1): string;
479
+ export declare function computeHarnessCandidateManifestHash(value: Omit<HarnessCandidateManifestV1, 'manifestHash' | 'riskTier'> | HarnessCandidateManifestV1): string;
480
+ export declare function computeBlueprintPatchHash(value: BlueprintPatchV1): string;
481
+ export declare function deriveHarnessCandidateFloors(value: Pick<HarnessCandidateManifestV1, 'files'>): {
482
+ maxFilesFloor: number;
483
+ maxFileBytesFloor: number;
484
+ maxTotalBytesFloor: number;
485
+ maxChangedLinesFloor: number;
486
+ };
487
+ export declare function deriveHarnessCandidateRiskTier(value: Pick<HarnessCandidateManifestV1, 'files'>): z.infer<typeof RiskTierSchema>;
488
+ export declare function parsePromptArtifact(value: unknown): PromptArtifactV1;
489
+ export declare function parseHarnessBlueprint(value: unknown): HarnessBlueprintV1;
490
+ export declare function parseHarnessCandidateManifest(value: unknown): HarnessCandidateManifestV1;
491
+ export declare function parseBlueprintPatch(value: unknown): BlueprintPatchV1;
492
+ export {};
@@ -0,0 +1,72 @@
1
+ import { z } from 'zod';
2
+ import { type HarnessBlueprintV1, type HarnessConstraintsV1, type ToolSpecV1 } from './contracts.js';
3
+ import { loadHarnessPromptArtifact } from './store.js';
4
+ declare const RuntimeAgentDefinitionSchema: z.ZodObject<{
5
+ name: z.ZodString;
6
+ description: z.ZodOptional<z.ZodString>;
7
+ config: z.ZodObject<{
8
+ mode: z.ZodEnum<{
9
+ primary: "primary";
10
+ subagent: "subagent";
11
+ }>;
12
+ model: z.ZodOptional<z.ZodString>;
13
+ variant: z.ZodOptional<z.ZodString>;
14
+ reasoning: z.ZodOptional<z.ZodObject<{
15
+ effort: z.ZodEnum<{
16
+ none: "none";
17
+ low: "low";
18
+ medium: "medium";
19
+ high: "high";
20
+ max: "max";
21
+ xhigh: "xhigh";
22
+ minimal: "minimal";
23
+ ultra: "ultra";
24
+ }>;
25
+ }, z.core.$strict>>;
26
+ thinking: z.ZodOptional<z.ZodObject<{
27
+ type: z.ZodEnum<{
28
+ enabled: "enabled";
29
+ disabled: "disabled";
30
+ }>;
31
+ budget_tokens: z.ZodOptional<z.ZodNumber>;
32
+ }, z.core.$strict>>;
33
+ temperature: z.ZodNumber;
34
+ prompt: z.ZodString;
35
+ tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
36
+ }, z.core.$strict>;
37
+ harnessPromptProvenance: z.ZodOptional<z.ZodObject<{
38
+ source: z.ZodEnum<{
39
+ candidate: "candidate";
40
+ static: "static";
41
+ }>;
42
+ promptId: z.ZodString;
43
+ sha256: z.ZodString;
44
+ candidateId: z.ZodOptional<z.ZodString>;
45
+ }, z.core.$strict>>;
46
+ }, z.core.$strict>;
47
+ export type RuntimeAgentDefinition = z.infer<typeof RuntimeAgentDefinitionSchema>;
48
+ export declare function computeRuntimeDefinitionsHash(runtimeDefinitions: readonly RuntimeAgentDefinition[]): string;
49
+ export declare function createToolFactory(registeredToolIds: readonly string[]): {
50
+ projectTools(toolIds: readonly string[]): ToolSpecV1[];
51
+ materializeTools(tools: readonly ToolSpecV1[]): string[];
52
+ };
53
+ export declare function createAgentFactory(options: {
54
+ runtimeDefinitions: readonly RuntimeAgentDefinition[];
55
+ registeredToolIds: readonly string[];
56
+ defaultConstraints?: HarnessConstraintsV1;
57
+ }): {
58
+ definitionsHash: string;
59
+ projectBlueprint(args: {
60
+ blueprintId: string;
61
+ agentNames?: readonly string[];
62
+ defaultAgent?: string;
63
+ constraints?: HarnessConstraintsV1;
64
+ }): HarnessBlueprintV1;
65
+ materializeBlueprint(blueprint: HarnessBlueprintV1, options?: {
66
+ directory?: string;
67
+ }): RuntimeAgentDefinition[];
68
+ };
69
+ export declare const _factoryInternals: {
70
+ loadHarnessPromptArtifact: typeof loadHarnessPromptArtifact;
71
+ };
72
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare function canonicalJson(value: unknown): string;
2
+ export declare function sha256(value: string | Uint8Array): string;
3
+ export declare function canonicalHash(value: unknown): string;
4
+ export declare function contentHashWithout<T extends Record<string, unknown>>(value: T, keys: readonly (keyof T)[]): string;
@@ -0,0 +1,6 @@
1
+ export * from './contracts.js';
2
+ export * from './factory.js';
3
+ export * from './hash.js';
4
+ export * from './patch.js';
5
+ export * from './source-candidate.js';
6
+ export * from './store.js';
@@ -0,0 +1,3 @@
1
+ import { type BlueprintPatchOperationV1, type HarnessBlueprintV1 } from './contracts.js';
2
+ export declare function deriveBlueprintPatchRiskTier(operations: readonly BlueprintPatchOperationV1[]): 'low' | 'medium' | 'high';
3
+ export declare function applyBlueprintPatch(base: HarnessBlueprintV1, patch: unknown): HarnessBlueprintV1;
@@ -0,0 +1,105 @@
1
+ import type { AgentDefinition } from '../agents/index.js';
2
+ import { type HarnessBlueprintV1, parseHarnessBlueprint } from './contracts.js';
3
+ import { applyBlueprintPatch } from './patch.js';
4
+ import { validateSourceCandidate } from './source-candidate.js';
5
+ import { activateHarnessCandidate, auditHarnessLedger, listHarnessHistory, loadHarnessCurrent, recordHarnessCandidate, recoverHarnessCorruptTail, rollbackHarnessVersion, saveHarnessVersion } from './store.js';
6
+ declare function projectStaticBlueprint(agents: Record<string, AgentDefinition>): {
7
+ v: 1;
8
+ blueprintId: string;
9
+ definitionsHash: string;
10
+ tools: {
11
+ v: 1;
12
+ toolId: string;
13
+ description?: string | undefined;
14
+ }[];
15
+ agents: {
16
+ v: 1;
17
+ agentName: string;
18
+ mode: "primary" | "subagent";
19
+ temperature: number;
20
+ prompt: {
21
+ v: 1;
22
+ promptId: string;
23
+ ref: string;
24
+ sha256: string;
25
+ };
26
+ tools: string[];
27
+ description?: string | undefined;
28
+ model?: string | undefined;
29
+ variant?: string | undefined;
30
+ reasoning?: {
31
+ effort: "none" | "low" | "medium" | "high" | "max" | "xhigh" | "minimal" | "ultra";
32
+ } | undefined;
33
+ thinking?: {
34
+ type: "enabled" | "disabled";
35
+ budget_tokens?: number | undefined;
36
+ } | undefined;
37
+ disabledTools?: string[] | undefined;
38
+ }[];
39
+ orchestration: {
40
+ v: 1;
41
+ defaultAgent: string;
42
+ activation: "manual";
43
+ execution: "disabled";
44
+ multiSwarm: boolean;
45
+ };
46
+ constraints: {
47
+ v: 1;
48
+ sourceAllowlist: string[];
49
+ extraProtectedPaths: string[];
50
+ maxPatchBytes: number;
51
+ maxFiles: number;
52
+ maxFileBytes: number;
53
+ maxTotalBytes: number;
54
+ maxChangedLines: number;
55
+ maxVersions: number;
56
+ maxReplayRecords: number;
57
+ maxOutputBytes: number;
58
+ };
59
+ contentHash: string;
60
+ };
61
+ declare function diffHarnessBlueprints(left: HarnessBlueprintV1, right: HarnessBlueprintV1): {
62
+ changes: Record<string, {
63
+ before: unknown;
64
+ after: unknown;
65
+ }>;
66
+ summary: {
67
+ changeCount: number;
68
+ changedKeys: string[];
69
+ };
70
+ };
71
+ /**
72
+ * Callable package namespace for explicit HarnessOpt consumers. Importing it is
73
+ * pure; no filesystem, Git, agent, or activation work occurs until a method is
74
+ * invoked. The live plugin manifest never calls this function during init.
75
+ */
76
+ export declare const harnessMutationV1: (() => /*elided*/ any & {
77
+ validateBlueprint: typeof parseHarnessBlueprint;
78
+ projectStaticBlueprint: typeof projectStaticBlueprint;
79
+ applyPatchSet: typeof applyBlueprintPatch;
80
+ validateSourceCandidate: typeof validateSourceCandidate;
81
+ saveCandidate: typeof recordHarnessCandidate;
82
+ saveVersion: typeof saveHarnessVersion;
83
+ activate: typeof activateHarnessCandidate;
84
+ rollback: typeof rollbackHarnessVersion;
85
+ current: typeof loadHarnessCurrent;
86
+ history: typeof listHarnessHistory;
87
+ diff: typeof diffHarnessBlueprints;
88
+ auditLedger: typeof auditHarnessLedger;
89
+ recoverCorruptTail: typeof recoverHarnessCorruptTail;
90
+ }) & {
91
+ validateBlueprint: typeof parseHarnessBlueprint;
92
+ projectStaticBlueprint: typeof projectStaticBlueprint;
93
+ applyPatchSet: typeof applyBlueprintPatch;
94
+ validateSourceCandidate: typeof validateSourceCandidate;
95
+ saveCandidate: typeof recordHarnessCandidate;
96
+ saveVersion: typeof saveHarnessVersion;
97
+ activate: typeof activateHarnessCandidate;
98
+ rollback: typeof rollbackHarnessVersion;
99
+ current: typeof loadHarnessCurrent;
100
+ history: typeof listHarnessHistory;
101
+ diff: typeof diffHarnessBlueprints;
102
+ auditLedger: typeof auditHarnessLedger;
103
+ recoverCorruptTail: typeof recoverHarnessCorruptTail;
104
+ };
105
+ export {};