@jmanuelcorral/openteam 0.1.41 → 0.2.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.
- package/.opencode/openteam.example.json +6 -1
- package/README.es.md +1 -1
- package/README.md +1 -1
- package/dist/capabilities/types.d.ts +4 -4
- package/dist/classifier/types.d.ts +3 -3
- package/dist/cli.js +430 -36
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/graph.d.ts +36 -2
- package/dist/commands/graph.d.ts.map +1 -1
- package/dist/config/graphFeatureGate.d.ts +96 -0
- package/dist/config/graphFeatureGate.d.ts.map +1 -0
- package/dist/config/migrations.d.ts.map +1 -1
- package/dist/config/resolve.d.ts +20 -1
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/schema.d.ts +40 -19
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/console/assets.d.ts +9 -1
- package/dist/console/assets.d.ts.map +1 -1
- package/dist/console/opencodeClient.d.ts +6 -0
- package/dist/console/opencodeClient.d.ts.map +1 -1
- package/dist/console/protocol.d.ts +8 -0
- package/dist/console/protocol.d.ts.map +1 -1
- package/dist/console/render.d.ts +25 -0
- package/dist/console/render.d.ts.map +1 -1
- package/dist/context/redaction.d.ts +23 -0
- package/dist/context/redaction.d.ts.map +1 -1
- package/dist/context/schema.d.ts +3 -3
- package/dist/contract/opencode.d.ts +2 -2
- package/dist/contract/opencode.d.ts.map +1 -1
- package/dist/graph/certificate.d.ts +505 -0
- package/dist/graph/certificate.d.ts.map +1 -0
- package/dist/graph/ids.d.ts +9 -0
- package/dist/graph/ids.d.ts.map +1 -1
- package/dist/graph/privacyPolicy.d.ts.map +1 -1
- package/dist/graph/reducer.d.ts.map +1 -1
- package/dist/graph/replay.d.ts.map +1 -1
- package/dist/graph/reviewerPolicy.d.ts.map +1 -1
- package/dist/graph/schema.d.ts +33 -33
- package/dist/graph/schema.d.ts.map +1 -1
- package/dist/graph/soakLedger.d.ts +144 -0
- package/dist/graph/soakLedger.d.ts.map +1 -0
- package/dist/graph/types.d.ts +2 -0
- package/dist/graph/types.d.ts.map +1 -1
- package/dist/graph/validate.d.ts.map +1 -1
- package/dist/index.d.ts +47 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2351 -180
- package/dist/local/registry.d.ts.map +1 -1
- package/dist/memory/types.d.ts +2 -2
- package/dist/orchestrator/graphFacade.d.ts +39 -0
- package/dist/orchestrator/graphFacade.d.ts.map +1 -0
- package/dist/orchestrator/graphIngress.d.ts +136 -0
- package/dist/orchestrator/graphIngress.d.ts.map +1 -0
- package/dist/orchestrator/graphShadow.d.ts +121 -0
- package/dist/orchestrator/graphShadow.d.ts.map +1 -0
- package/dist/orchestrator/ledger.d.ts +14 -2
- package/dist/orchestrator/ledger.d.ts.map +1 -1
- package/dist/orchestrator/opencodeSessionAdapter.d.ts.map +1 -1
- package/dist/orchestrator/roles.d.ts +3 -3
- package/dist/orchestrator/sdd.d.ts +55 -1
- package/dist/orchestrator/sdd.d.ts.map +1 -1
- package/dist/orchestrator/sddCompiler.d.ts +6 -2
- package/dist/orchestrator/sddCompiler.d.ts.map +1 -1
- package/dist/orchestrator/worktreeAdapter.d.ts +39 -0
- package/dist/orchestrator/worktreeAdapter.d.ts.map +1 -0
- package/dist/orchestrator/worktreeDispatch.d.ts +84 -0
- package/dist/orchestrator/worktreeDispatch.d.ts.map +1 -0
- package/dist/orchestrator/worktreeReconciler.d.ts +74 -0
- package/dist/orchestrator/worktreeReconciler.d.ts.map +1 -0
- package/dist/plugin/graphShadowIngress.d.ts +165 -0
- package/dist/plugin/graphShadowIngress.d.ts.map +1 -0
- package/dist/plugin/graphTool.d.ts +63 -0
- package/dist/plugin/graphTool.d.ts.map +1 -0
- package/dist/plugin/hooks.d.ts +6 -0
- package/dist/plugin/hooks.d.ts.map +1 -1
- package/dist/plugin/legacyRunProducer.d.ts +60 -0
- package/dist/plugin/legacyRunProducer.d.ts.map +1 -0
- package/dist/plugin/reportRunSchema.d.ts +60 -0
- package/dist/plugin/reportRunSchema.d.ts.map +1 -0
- package/dist/plugin/sessionTracker.d.ts +42 -0
- package/dist/plugin/sessionTracker.d.ts.map +1 -0
- package/dist/plugin/shadowPipeline.d.ts +49 -0
- package/dist/plugin/shadowPipeline.d.ts.map +1 -0
- package/dist/plugin/soakObserver.d.ts +73 -0
- package/dist/plugin/soakObserver.d.ts.map +1 -0
- package/dist/storage/graph/codec.d.ts.map +1 -1
- package/dist/storage/graph/migrateLegacyBriefs.d.ts.map +1 -1
- package/dist/storage/graph/migration.d.ts +91 -0
- package/dist/storage/graph/migration.d.ts.map +1 -0
- package/dist/storage/graph/provider.d.ts +1 -0
- package/dist/storage/graph/provider.d.ts.map +1 -1
- package/dist/storage/graph/recovery.d.ts.map +1 -1
- package/dist/storage/graph/runRegistry.d.ts.map +1 -1
- package/dist/storage/graph/soakRecorder.d.ts +59 -0
- package/dist/storage/graph/soakRecorder.d.ts.map +1 -0
- package/dist/storage/graph/workspaceLease.d.ts.map +1 -1
- package/dist/storage/graph/worktreeRegistry.d.ts +29 -0
- package/dist/storage/graph/worktreeRegistry.d.ts.map +1 -0
- package/dist/storage/graph/writer.d.ts +15 -0
- package/dist/storage/graph/writer.d.ts.map +1 -1
- package/dist/storage/path.d.ts.map +1 -1
- package/dist/telemetry/events.d.ts +12 -12
- package/dist/telemetry/graphRuntimeHealth.d.ts +53 -0
- package/dist/telemetry/graphRuntimeHealth.d.ts.map +1 -0
- package/dist/telemetry/graphView.d.ts +76 -0
- package/dist/telemetry/graphView.d.ts.map +1 -0
- package/dist/telemetry/types.d.ts +4 -4
- package/dist/web/console.d.ts +6 -0
- package/dist/web/console.d.ts.map +1 -1
- package/dist/web/graphRoute.d.ts +36 -0
- package/dist/web/graphRoute.d.ts.map +1 -0
- package/dist/web/server.d.ts +21 -2
- package/dist/web/server.d.ts.map +1 -1
- package/dist/web/start.d.ts +11 -0
- package/dist/web/start.d.ts.map +1 -1
- package/package.json +7 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reviewerPolicy.d.ts","sourceRoot":"","sources":["../../src/graph/reviewerPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;GAGG;AAEH,mEAAmE;AACnE,eAAO,MAAM,6BAA6B,EAAE,SAAS,UAAU,EAAa,CAAC;AAE7E,MAAM,MAAM,kBAAkB,GAC1B,aAAa,GACb,qBAAqB,GACrB,YAAY,CAAC;AAEjB,6DAA6D;AAC7D,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"reviewerPolicy.d.ts","sourceRoot":"","sources":["../../src/graph/reviewerPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;GAGG;AAEH,mEAAmE;AACnE,eAAO,MAAM,6BAA6B,EAAE,SAAS,UAAU,EAAa,CAAC;AAE7E,MAAM,MAAM,kBAAkB,GAC1B,aAAa,GACb,qBAAqB,GACrB,YAAY,CAAC;AAEjB,6DAA6D;AAC7D,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,QAAQ,CAAC,IAAI,EAAE,kBAAkB,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,YAAY,IAAI,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,EAKnD;CACF;AAED,qEAAqE;AACrE,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,OAAO,CAET;AAED,yDAAyD;AACzD,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,IAAI,CAIN;AAED,kEAAkE;AAClE,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,SAAS,UAAU,EAAE,GAC7B,IAAI,CAMN;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,WAAW,EACjB,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAC5C,IAAI,CAYN"}
|
package/dist/graph/schema.d.ts
CHANGED
|
@@ -23,11 +23,11 @@ export declare const OperationIDSchema: z.ZodString;
|
|
|
23
23
|
export declare const AttemptIDSchema: z.ZodString;
|
|
24
24
|
/** Taxonomía acotada de clases de error de un efecto. */
|
|
25
25
|
export declare const ErrorClassSchema: z.ZodEnum<{
|
|
26
|
-
|
|
27
|
-
transient: "transient";
|
|
26
|
+
cancelled: "cancelled";
|
|
28
27
|
permanent: "permanent";
|
|
29
28
|
timeout: "timeout";
|
|
30
|
-
|
|
29
|
+
transient: "transient";
|
|
30
|
+
unknown: "unknown";
|
|
31
31
|
}>;
|
|
32
32
|
export type ErrorClass = z.infer<typeof ErrorClassSchema>;
|
|
33
33
|
/**
|
|
@@ -68,22 +68,25 @@ export declare const GraphSpecV1Schema: z.ZodObject<{
|
|
|
68
68
|
}, z.core.$strict>;
|
|
69
69
|
export type GraphSpecV1 = z.infer<typeof GraphSpecV1Schema>;
|
|
70
70
|
export declare const RunStartedEventSchema: z.ZodObject<{
|
|
71
|
-
type: z.ZodLiteral<"run.started">;
|
|
72
|
-
specDigest: z.ZodString;
|
|
73
71
|
v: z.ZodLiteral<1>;
|
|
74
72
|
seq: z.ZodNumber;
|
|
75
73
|
runID: z.ZodString;
|
|
74
|
+
type: z.ZodLiteral<"run.started">;
|
|
75
|
+
specDigest: z.ZodString;
|
|
76
76
|
}, z.core.$strict>;
|
|
77
77
|
export declare const NodeDispatchedEventSchema: z.ZodObject<{
|
|
78
|
+
v: z.ZodLiteral<1>;
|
|
79
|
+
seq: z.ZodNumber;
|
|
80
|
+
runID: z.ZodString;
|
|
78
81
|
type: z.ZodLiteral<"node.dispatched">;
|
|
79
82
|
nodeID: z.ZodString;
|
|
80
83
|
operationID: z.ZodString;
|
|
81
84
|
attemptID: z.ZodString;
|
|
85
|
+
}, z.core.$strict>;
|
|
86
|
+
export declare const NodeSucceededEventSchema: z.ZodObject<{
|
|
82
87
|
v: z.ZodLiteral<1>;
|
|
83
88
|
seq: z.ZodNumber;
|
|
84
89
|
runID: z.ZodString;
|
|
85
|
-
}, z.core.$strict>;
|
|
86
|
-
export declare const NodeSucceededEventSchema: z.ZodObject<{
|
|
87
90
|
type: z.ZodLiteral<"node.succeeded">;
|
|
88
91
|
nodeID: z.ZodString;
|
|
89
92
|
operationID: z.ZodString;
|
|
@@ -94,67 +97,67 @@ export declare const NodeSucceededEventSchema: z.ZodObject<{
|
|
|
94
97
|
bytes: z.ZodNumber;
|
|
95
98
|
mediaType: z.ZodOptional<z.ZodString>;
|
|
96
99
|
}, z.core.$strict>;
|
|
100
|
+
}, z.core.$strict>;
|
|
101
|
+
export declare const NodeFailedEventSchema: z.ZodObject<{
|
|
97
102
|
v: z.ZodLiteral<1>;
|
|
98
103
|
seq: z.ZodNumber;
|
|
99
104
|
runID: z.ZodString;
|
|
100
|
-
}, z.core.$strict>;
|
|
101
|
-
export declare const NodeFailedEventSchema: z.ZodObject<{
|
|
102
105
|
type: z.ZodLiteral<"node.failed">;
|
|
103
106
|
nodeID: z.ZodString;
|
|
104
107
|
operationID: z.ZodString;
|
|
105
108
|
attemptID: z.ZodString;
|
|
106
109
|
errorClass: z.ZodEnum<{
|
|
107
|
-
|
|
108
|
-
transient: "transient";
|
|
110
|
+
cancelled: "cancelled";
|
|
109
111
|
permanent: "permanent";
|
|
110
112
|
timeout: "timeout";
|
|
111
|
-
|
|
113
|
+
transient: "transient";
|
|
114
|
+
unknown: "unknown";
|
|
112
115
|
}>;
|
|
113
|
-
v: z.ZodLiteral<1>;
|
|
114
|
-
seq: z.ZodNumber;
|
|
115
|
-
runID: z.ZodString;
|
|
116
116
|
}, z.core.$strict>;
|
|
117
117
|
export declare const NodeCancelledEventSchema: z.ZodObject<{
|
|
118
|
-
type: z.ZodLiteral<"node.cancelled">;
|
|
119
|
-
nodeID: z.ZodString;
|
|
120
118
|
v: z.ZodLiteral<1>;
|
|
121
119
|
seq: z.ZodNumber;
|
|
122
120
|
runID: z.ZodString;
|
|
121
|
+
type: z.ZodLiteral<"node.cancelled">;
|
|
122
|
+
nodeID: z.ZodString;
|
|
123
123
|
}, z.core.$strict>;
|
|
124
124
|
export declare const RunCompletedEventSchema: z.ZodObject<{
|
|
125
|
-
type: z.ZodLiteral<"run.completed">;
|
|
126
125
|
v: z.ZodLiteral<1>;
|
|
127
126
|
seq: z.ZodNumber;
|
|
128
127
|
runID: z.ZodString;
|
|
128
|
+
type: z.ZodLiteral<"run.completed">;
|
|
129
129
|
}, z.core.$strict>;
|
|
130
130
|
export declare const RunFailedEventSchema: z.ZodObject<{
|
|
131
|
-
type: z.ZodLiteral<"run.failed">;
|
|
132
131
|
v: z.ZodLiteral<1>;
|
|
133
132
|
seq: z.ZodNumber;
|
|
134
133
|
runID: z.ZodString;
|
|
134
|
+
type: z.ZodLiteral<"run.failed">;
|
|
135
135
|
}, z.core.$strict>;
|
|
136
136
|
export declare const RunCancelledEventSchema: z.ZodObject<{
|
|
137
|
-
type: z.ZodLiteral<"run.cancelled">;
|
|
138
137
|
v: z.ZodLiteral<1>;
|
|
139
138
|
seq: z.ZodNumber;
|
|
140
139
|
runID: z.ZodString;
|
|
140
|
+
type: z.ZodLiteral<"run.cancelled">;
|
|
141
141
|
}, z.core.$strict>;
|
|
142
142
|
/** Unión discriminada exhaustiva de los eventos de Graph V1. */
|
|
143
143
|
export declare const GraphEventV1Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
144
|
+
v: z.ZodLiteral<1>;
|
|
145
|
+
seq: z.ZodNumber;
|
|
146
|
+
runID: z.ZodString;
|
|
144
147
|
type: z.ZodLiteral<"run.started">;
|
|
145
148
|
specDigest: z.ZodString;
|
|
149
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
146
150
|
v: z.ZodLiteral<1>;
|
|
147
151
|
seq: z.ZodNumber;
|
|
148
152
|
runID: z.ZodString;
|
|
149
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
150
153
|
type: z.ZodLiteral<"node.dispatched">;
|
|
151
154
|
nodeID: z.ZodString;
|
|
152
155
|
operationID: z.ZodString;
|
|
153
156
|
attemptID: z.ZodString;
|
|
157
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
154
158
|
v: z.ZodLiteral<1>;
|
|
155
159
|
seq: z.ZodNumber;
|
|
156
160
|
runID: z.ZodString;
|
|
157
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
158
161
|
type: z.ZodLiteral<"node.succeeded">;
|
|
159
162
|
nodeID: z.ZodString;
|
|
160
163
|
operationID: z.ZodString;
|
|
@@ -165,45 +168,42 @@ export declare const GraphEventV1Schema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
165
168
|
bytes: z.ZodNumber;
|
|
166
169
|
mediaType: z.ZodOptional<z.ZodString>;
|
|
167
170
|
}, z.core.$strict>;
|
|
171
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
168
172
|
v: z.ZodLiteral<1>;
|
|
169
173
|
seq: z.ZodNumber;
|
|
170
174
|
runID: z.ZodString;
|
|
171
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
172
175
|
type: z.ZodLiteral<"node.failed">;
|
|
173
176
|
nodeID: z.ZodString;
|
|
174
177
|
operationID: z.ZodString;
|
|
175
178
|
attemptID: z.ZodString;
|
|
176
179
|
errorClass: z.ZodEnum<{
|
|
177
|
-
|
|
178
|
-
transient: "transient";
|
|
180
|
+
cancelled: "cancelled";
|
|
179
181
|
permanent: "permanent";
|
|
180
182
|
timeout: "timeout";
|
|
181
|
-
|
|
183
|
+
transient: "transient";
|
|
184
|
+
unknown: "unknown";
|
|
182
185
|
}>;
|
|
186
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
183
187
|
v: z.ZodLiteral<1>;
|
|
184
188
|
seq: z.ZodNumber;
|
|
185
189
|
runID: z.ZodString;
|
|
186
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
187
190
|
type: z.ZodLiteral<"node.cancelled">;
|
|
188
191
|
nodeID: z.ZodString;
|
|
189
|
-
v: z.ZodLiteral<1>;
|
|
190
|
-
seq: z.ZodNumber;
|
|
191
|
-
runID: z.ZodString;
|
|
192
192
|
}, z.core.$strict>, z.ZodObject<{
|
|
193
|
-
type: z.ZodLiteral<"run.completed">;
|
|
194
193
|
v: z.ZodLiteral<1>;
|
|
195
194
|
seq: z.ZodNumber;
|
|
196
195
|
runID: z.ZodString;
|
|
196
|
+
type: z.ZodLiteral<"run.completed">;
|
|
197
197
|
}, z.core.$strict>, z.ZodObject<{
|
|
198
|
-
type: z.ZodLiteral<"run.failed">;
|
|
199
198
|
v: z.ZodLiteral<1>;
|
|
200
199
|
seq: z.ZodNumber;
|
|
201
200
|
runID: z.ZodString;
|
|
201
|
+
type: z.ZodLiteral<"run.failed">;
|
|
202
202
|
}, z.core.$strict>, z.ZodObject<{
|
|
203
|
-
type: z.ZodLiteral<"run.cancelled">;
|
|
204
203
|
v: z.ZodLiteral<1>;
|
|
205
204
|
seq: z.ZodNumber;
|
|
206
205
|
runID: z.ZodString;
|
|
206
|
+
type: z.ZodLiteral<"run.cancelled">;
|
|
207
207
|
}, z.core.$strict>], "type">;
|
|
208
208
|
export type GraphEventV1 = z.infer<typeof GraphEventV1Schema>;
|
|
209
209
|
export type GraphEventType = GraphEventV1["type"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/graph/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,C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QAAQ,EAKpE;CACF;AAED,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAM1D;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAM5D"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Supported observation platforms. darwin is recorded honestly but does not
|
|
3
|
+
* satisfy the os-diversity gate (which requires linux + win32). */
|
|
4
|
+
export declare const SoakPlatformSchema: z.ZodEnum<{
|
|
5
|
+
darwin: "darwin";
|
|
6
|
+
linux: "linux";
|
|
7
|
+
win32: "win32";
|
|
8
|
+
}>;
|
|
9
|
+
export type SoakPlatform = z.infer<typeof SoakPlatformSchema>;
|
|
10
|
+
/**
|
|
11
|
+
* Pair shape for privacy scanning: carries both the denominator (surfaces
|
|
12
|
+
* scanned) and the finding count. Nullable at the observation level to
|
|
13
|
+
* represent "scanner did not run".
|
|
14
|
+
*/
|
|
15
|
+
declare const PrivacyPairSchema: z.ZodObject<{
|
|
16
|
+
surfacesScanned: z.ZodNumber;
|
|
17
|
+
rawFindings: z.ZodNumber;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
/**
|
|
20
|
+
* Pair shape for duplicate-effect detection: carries both the denominator
|
|
21
|
+
* (effects examined) and the duplicate count. Nullable at the observation
|
|
22
|
+
* level to represent "detector did not run".
|
|
23
|
+
*/
|
|
24
|
+
declare const DuplicateEffectPairSchema: z.ZodObject<{
|
|
25
|
+
effectsExamined: z.ZodNumber;
|
|
26
|
+
duplicatesFound: z.ZodNumber;
|
|
27
|
+
}, z.core.$strict>;
|
|
28
|
+
/**
|
|
29
|
+
* Triplet shape for model cross-verification: denominator (nodes checked),
|
|
30
|
+
* unverified count (no tracker data), and mismatch count (verified but
|
|
31
|
+
* disagreed with routing telemetry). Nullable at the observation level to
|
|
32
|
+
* represent "verification did not run".
|
|
33
|
+
*
|
|
34
|
+
* A mismatch is a contradiction between the agent's self-report and the
|
|
35
|
+
* only independently measured field in the trace. The `zero-model-mismatch`
|
|
36
|
+
* gate treats any mismatch as a hard fail — see certificate.ts for the
|
|
37
|
+
* argument.
|
|
38
|
+
*/
|
|
39
|
+
declare const ModelVerificationPairSchema: z.ZodObject<{
|
|
40
|
+
nodesChecked: z.ZodNumber;
|
|
41
|
+
unverified: z.ZodNumber;
|
|
42
|
+
mismatched: z.ZodNumber;
|
|
43
|
+
}, z.core.$strict>;
|
|
44
|
+
/** Privacy pair type (per-observation). */
|
|
45
|
+
export type SoakPrivacyPair = z.infer<typeof PrivacyPairSchema>;
|
|
46
|
+
/** Duplicate-effect pair type (per-observation). */
|
|
47
|
+
export type SoakDuplicateEffectPair = z.infer<typeof DuplicateEffectPairSchema>;
|
|
48
|
+
/** Model verification triplet type (per-observation). */
|
|
49
|
+
export type SoakModelVerificationPair = z.infer<typeof ModelVerificationPairSchema>;
|
|
50
|
+
export declare const SoakObservationSchema: z.ZodObject<{
|
|
51
|
+
version: z.ZodLiteral<1>;
|
|
52
|
+
seq: z.ZodNumber;
|
|
53
|
+
timestamp: z.ZodString;
|
|
54
|
+
platform: z.ZodEnum<{
|
|
55
|
+
darwin: "darwin";
|
|
56
|
+
linux: "linux";
|
|
57
|
+
win32: "win32";
|
|
58
|
+
}>;
|
|
59
|
+
opencodeVersion: z.ZodString;
|
|
60
|
+
provenance: z.ZodEnum<{
|
|
61
|
+
"ci-synthetic": "ci-synthetic";
|
|
62
|
+
"genuine-usage": "genuine-usage";
|
|
63
|
+
}>;
|
|
64
|
+
traceDigest: z.ZodString;
|
|
65
|
+
criticalDivergences: z.ZodNullable<z.ZodNumber>;
|
|
66
|
+
privacy: z.ZodNullable<z.ZodObject<{
|
|
67
|
+
surfacesScanned: z.ZodNumber;
|
|
68
|
+
rawFindings: z.ZodNumber;
|
|
69
|
+
}, z.core.$strict>>;
|
|
70
|
+
duplicateEffects: z.ZodNullable<z.ZodObject<{
|
|
71
|
+
effectsExamined: z.ZodNumber;
|
|
72
|
+
duplicatesFound: z.ZodNumber;
|
|
73
|
+
}, z.core.$strict>>;
|
|
74
|
+
modelVerification: z.ZodNullable<z.ZodObject<{
|
|
75
|
+
nodesChecked: z.ZodNumber;
|
|
76
|
+
unverified: z.ZodNumber;
|
|
77
|
+
mismatched: z.ZodNumber;
|
|
78
|
+
}, z.core.$strict>>;
|
|
79
|
+
chainDigest: z.ZodString;
|
|
80
|
+
}, z.core.$strict>;
|
|
81
|
+
export type SoakObservation = z.infer<typeof SoakObservationSchema>;
|
|
82
|
+
/** Resultado de validar una cadena individual de un grabador. */
|
|
83
|
+
export type ChainValidationResult = {
|
|
84
|
+
readonly valid: boolean;
|
|
85
|
+
readonly observations: readonly SoakObservation[];
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Valida la integridad de una cadena de un grabador. Comprueba:
|
|
89
|
+
* - `seq` consecutivo comenzando en 0
|
|
90
|
+
* - Timestamps estrictamente monótonos
|
|
91
|
+
* - `chainDigest` = SHA-256(prevDigest + canonical(obs sin chainDigest))
|
|
92
|
+
*/
|
|
93
|
+
export declare function validateChain(observations: readonly SoakObservation[]): ChainValidationResult;
|
|
94
|
+
/** Evidencia agregada derivada de todas las cadenas válidas. */
|
|
95
|
+
export type SoakEvidence = {
|
|
96
|
+
readonly totalObservations: number;
|
|
97
|
+
readonly genuineUsageObservations: number;
|
|
98
|
+
readonly ciSyntheticObservations: number;
|
|
99
|
+
readonly recorderCount: number;
|
|
100
|
+
readonly firstTimestamp: string | null;
|
|
101
|
+
readonly lastTimestamp: string | null;
|
|
102
|
+
readonly distinctDays: number;
|
|
103
|
+
/** Aggregate critical divergences. null if any observation was not measured. */
|
|
104
|
+
readonly criticalDivergences: number | null;
|
|
105
|
+
/** Aggregate privacy scan. null if any observation did not run the scanner. */
|
|
106
|
+
readonly privacy: {
|
|
107
|
+
surfacesScanned: number;
|
|
108
|
+
rawFindings: number;
|
|
109
|
+
} | null;
|
|
110
|
+
/** Aggregate duplicate effects. null if any observation did not run the detector. */
|
|
111
|
+
readonly duplicateEffects: {
|
|
112
|
+
effectsExamined: number;
|
|
113
|
+
duplicatesFound: number;
|
|
114
|
+
} | null;
|
|
115
|
+
/** Aggregate model verification. null if any observation did not run verification. */
|
|
116
|
+
readonly modelVerification: {
|
|
117
|
+
nodesChecked: number;
|
|
118
|
+
unverified: number;
|
|
119
|
+
mismatched: number;
|
|
120
|
+
} | null;
|
|
121
|
+
readonly platformsGenuine: SoakPlatform[];
|
|
122
|
+
readonly platformsSynthetic: SoakPlatform[];
|
|
123
|
+
readonly opencodeVersionsObserved: string[];
|
|
124
|
+
readonly invalidChains: number;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Agrupa observaciones planas en cadenas por su posición en el array de
|
|
128
|
+
* cadenas recibido. Cada sub-array es una cadena independiente.
|
|
129
|
+
*/
|
|
130
|
+
export declare function aggregateObservations(chains: readonly (readonly SoakObservation[])[]): {
|
|
131
|
+
validObs: SoakObservation[];
|
|
132
|
+
invalidChains: number;
|
|
133
|
+
};
|
|
134
|
+
/** Deriva la evidencia completa a partir de las cadenas validadas. */
|
|
135
|
+
export declare function deriveSoakEvidence(chains: readonly (readonly SoakObservation[])[]): SoakEvidence;
|
|
136
|
+
/**
|
|
137
|
+
* Digest canónico del contenido del ledger completo. Se calcula sobre las
|
|
138
|
+
* cadenas válidas en orden de cadena (sorted por primer seq-0 chainDigest),
|
|
139
|
+
* concatenando el JSONL canónico de cada cadena. Esto vincula el certificado
|
|
140
|
+
* a la evidencia que el llamante posee.
|
|
141
|
+
*/
|
|
142
|
+
export declare function canonicalLedger(chains: readonly (readonly SoakObservation[])[]): string;
|
|
143
|
+
export {};
|
|
144
|
+
//# sourceMappingURL=soakLedger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"soakLedger.d.ts","sourceRoot":"","sources":["../../src/graph/soakLedger.ts"],"names":[],"mappings":"AAAA,OAAO,EAA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;AAMD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,SAAS,CAAC,SAAS,eAAe,EAAE,CAAC,EAAE,GAC9C,MAAM,CA0BR"}
|
package/dist/graph/types.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ import type { ErrorClass, GraphEventType, GraphEventV1, GraphNode, GraphSpecV1,
|
|
|
4
4
|
* capacidades. No se parsean de entrada externa (los construye el reducer), por
|
|
5
5
|
* eso viven fuera de los esquemas Zod. Puro: sin I/O ni estado global.
|
|
6
6
|
*/
|
|
7
|
+
/** Salud de la cola del journal en disco según la clasificación de recovery. */
|
|
8
|
+
export type GraphJournalHealth = "clean" | "recovered" | "corrupt";
|
|
7
9
|
/** Estado persistente de un nodo. `pending` es el estado inicial. */
|
|
8
10
|
export type NodeStatus = "pending" | "running" | "succeeded" | "failed" | "cancelled";
|
|
9
11
|
/** Estado del run completo. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/graph/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,YAAY,EACZ,SAAS,EACT,WAAW,EACX,MAAM,EACN,QAAQ,EACT,MAAM,UAAU,CAAC;AAElB;;;;GAIG;AAEH,qEAAqE;AACrE,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,SAAS,GACT,WAAW,GACX,QAAQ,GACR,WAAW,CAAC;AAEhB,+BAA+B;AAC/B,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEzE,wDAAwD;AACxD,eAAO,MAAM,sBAAsB,EAAE,WAAW,CAAC,UAAU,CAGzD,CAAC;AACH,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,SAAS,CAIvD,CAAC;AAEH,4DAA4D;AAC5D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,UAAU,CAAC;IACnB,QAAQ,EAAE,M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,GACP,wBAAwB,GACxB,yBAAyB,GACzB,aAAa,GACb,uBAAuB,GACvB,cAAc,CAAC;AAEnB,8CAA8C;AAC9C,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/graph/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvD;;;;GAIG;AAEH,MAAM,MAAM,mBAAmB,GAC3B,gBAAgB,GAChB,oBAAoB,GACpB,OAAO,GACP,wBAAwB,GACxB,yBAAyB,GACzB,aAAa,GACb,uBAAuB,GACvB,cAAc,CAAC;AAEnB,8CAA8C;AAC9C,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,YAAY,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,EAKpD;CACF;AAqHD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAMzD"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,58 @@
|
|
|
1
1
|
import type { Plugin, PluginModule } from "@opencode-ai/plugin";
|
|
2
2
|
import type { CliDeps } from "./commands/dispatch";
|
|
3
|
+
import { type GraphGateInput } from "./config/graphFeatureGate";
|
|
3
4
|
import type { OpenTeamConfig } from "./config/schema";
|
|
4
5
|
import { RuntimeRegistry } from "./local/registry";
|
|
6
|
+
import { type RecorderPorts } from "./storage/graph/soakRecorder";
|
|
5
7
|
import type { StorageProvider } from "./storage/provider";
|
|
6
8
|
import { type EventSink } from "./telemetry/eventLog";
|
|
7
9
|
export declare function logAvailabilityRefreshError(error: unknown): void;
|
|
8
10
|
export declare function logTelemetryError(error: unknown): void;
|
|
11
|
+
/**
|
|
12
|
+
* Reads the opencode server version from the `/global/health` endpoint.
|
|
13
|
+
*
|
|
14
|
+
* This is the server's own self-reported version, not a session-stamped value.
|
|
15
|
+
* Unlike `Session.version` (stamped once at session creation), the health
|
|
16
|
+
* endpoint always reflects the currently running binary — so after an upgrade
|
|
17
|
+
* the gate sees the new version immediately.
|
|
18
|
+
*
|
|
19
|
+
* Returns `"unknown"` if the call fails or the response is unexpected —
|
|
20
|
+
* fail-closed: `"unknown"` will not match any certificate's version pin,
|
|
21
|
+
* causing `opencode-mismatch` in the recomputing parsers.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Branded type for a version string obtained from a live opencode server.
|
|
25
|
+
*
|
|
26
|
+
* The brand prevents a compile-time constant (e.g.
|
|
27
|
+
* `DEFAULT_SOAK_POLICY.supportedOpencodeVersion`) from being silently
|
|
28
|
+
* substituted where a live-read version is expected — `buildGateInput`
|
|
29
|
+
* requires the brand, so a plain `string` fails `tsc --noEmit`. Only
|
|
30
|
+
* `readOpencodeVersion` produces this type in production code. Tests may
|
|
31
|
+
* cast explicitly via `as LiveOpencodeVersion`, which is deliberate
|
|
32
|
+
* opt-in; production wiring in this file must not — the forge-kill
|
|
33
|
+
* assertion in `graph-feature-gate.test.ts` rejects any such cast in the
|
|
34
|
+
* `opencodeVersion` assignment.
|
|
35
|
+
*
|
|
36
|
+
* See ADR section 8 (seam protection) and the GE-057 wiring tests.
|
|
37
|
+
*/
|
|
38
|
+
export type LiveOpencodeVersion = string & {
|
|
39
|
+
readonly __brand: "LiveOpencodeVersion";
|
|
40
|
+
};
|
|
41
|
+
export declare function readOpencodeVersion(serverUrl: URL): Promise<LiveOpencodeVersion>;
|
|
42
|
+
/**
|
|
43
|
+
* Builds the gate input by reading certificates and determining migration
|
|
44
|
+
* status. All I/O is isolated here; the gate itself is pure.
|
|
45
|
+
*
|
|
46
|
+
* `opencodeVersion` is the version of the opencode server actually running,
|
|
47
|
+
* obtained at startup via `readOpencodeVersion`. The recomputing parsers
|
|
48
|
+
* compare it against each certificate's stamped version — a mismatch
|
|
49
|
+
* produces `opencode-mismatch` and closes the gate. When the version is
|
|
50
|
+
* `"unknown"` (could not be determined), no certificate can match, so the
|
|
51
|
+
* gate fails closed.
|
|
52
|
+
*/
|
|
53
|
+
export declare function buildGateInput(config: OpenTeamConfig, storage: StorageProvider, opencodeVersion: LiveOpencodeVersion): Promise<GraphGateInput>;
|
|
54
|
+
/** Adapts a StorageProvider to RecorderPorts for the soak recorder. */
|
|
55
|
+
export declare function recorderPortsFromStorage(storage: StorageProvider): RecorderPorts;
|
|
9
56
|
export declare function createEventSink(rawOptions: unknown, storage?: StorageProvider): EventSink;
|
|
10
57
|
export declare function isMissingFile(error: unknown): boolean;
|
|
11
58
|
export declare function createCliDeps(config: OpenTeamConfig, registry: RuntimeRegistry, telemetryPath: string, sessionsDir?: string, storage?: StorageProvider): CliDeps;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAe,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAe,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAE7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAGnD,OAAO,EAGL,KAAK,cAAc,EAGpB,MAAM,2BAA2B,CAAC;AAInC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAYtD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAenD,OAAO,EAEL,KAAK,aAAa,E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