@jmanuelcorral/openteam 0.1.42 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/.opencode/openteam.example.json +6 -1
  2. package/README.es.md +5 -5
  3. package/README.md +5 -5
  4. package/dist/capabilities/types.d.ts +4 -4
  5. package/dist/classifier/types.d.ts +3 -3
  6. package/dist/cli.js +11 -0
  7. package/dist/commands/doctor.d.ts +2 -0
  8. package/dist/commands/doctor.d.ts.map +1 -1
  9. package/dist/commands/graph.d.ts +28 -2
  10. package/dist/commands/graph.d.ts.map +1 -1
  11. package/dist/config/graphFeatureGate.d.ts +101 -0
  12. package/dist/config/graphFeatureGate.d.ts.map +1 -0
  13. package/dist/config/migrations.d.ts.map +1 -1
  14. package/dist/config/resolve.d.ts +20 -1
  15. package/dist/config/resolve.d.ts.map +1 -1
  16. package/dist/config/schema.d.ts +22 -19
  17. package/dist/config/schema.d.ts.map +1 -1
  18. package/dist/console/render.d.ts.map +1 -1
  19. package/dist/context/redaction.d.ts +23 -0
  20. package/dist/context/redaction.d.ts.map +1 -1
  21. package/dist/context/schema.d.ts +3 -3
  22. package/dist/contract/opencode.d.ts +2 -2
  23. package/dist/contract/opencode.d.ts.map +1 -1
  24. package/dist/graph/certificate.d.ts +515 -0
  25. package/dist/graph/certificate.d.ts.map +1 -0
  26. package/dist/graph/ids.d.ts +9 -0
  27. package/dist/graph/ids.d.ts.map +1 -1
  28. package/dist/graph/privacyPolicy.d.ts.map +1 -1
  29. package/dist/graph/reducer.d.ts.map +1 -1
  30. package/dist/graph/replay.d.ts.map +1 -1
  31. package/dist/graph/reviewerPolicy.d.ts.map +1 -1
  32. package/dist/graph/schema.d.ts +33 -33
  33. package/dist/graph/schema.d.ts.map +1 -1
  34. package/dist/graph/soakLedger.d.ts +167 -0
  35. package/dist/graph/soakLedger.d.ts.map +1 -0
  36. package/dist/graph/types.d.ts +2 -0
  37. package/dist/graph/types.d.ts.map +1 -1
  38. package/dist/graph/validate.d.ts.map +1 -1
  39. package/dist/index.d.ts +52 -0
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +2452 -279
  42. package/dist/local/registry.d.ts.map +1 -1
  43. package/dist/memory/types.d.ts +2 -2
  44. package/dist/orchestrator/graphFacade.d.ts +39 -0
  45. package/dist/orchestrator/graphFacade.d.ts.map +1 -0
  46. package/dist/orchestrator/graphIngress.d.ts +136 -0
  47. package/dist/orchestrator/graphIngress.d.ts.map +1 -0
  48. package/dist/orchestrator/graphShadow.d.ts +121 -0
  49. package/dist/orchestrator/graphShadow.d.ts.map +1 -0
  50. package/dist/orchestrator/ledger.d.ts +11 -30
  51. package/dist/orchestrator/ledger.d.ts.map +1 -1
  52. package/dist/orchestrator/opencodeSessionAdapter.d.ts.map +1 -1
  53. package/dist/orchestrator/roles.d.ts +3 -3
  54. package/dist/orchestrator/sddCompiler.d.ts +31 -3
  55. package/dist/orchestrator/sddCompiler.d.ts.map +1 -1
  56. package/dist/orchestrator/worktreeAdapter.d.ts.map +1 -1
  57. package/dist/orchestrator/worktreeDispatch.d.ts.map +1 -1
  58. package/dist/plugin/graphShadowIngress.d.ts +165 -0
  59. package/dist/plugin/graphShadowIngress.d.ts.map +1 -0
  60. package/dist/plugin/graphTool.d.ts +63 -0
  61. package/dist/plugin/graphTool.d.ts.map +1 -0
  62. package/dist/plugin/hooks.d.ts +6 -0
  63. package/dist/plugin/hooks.d.ts.map +1 -1
  64. package/dist/plugin/legacyRunProducer.d.ts +60 -0
  65. package/dist/plugin/legacyRunProducer.d.ts.map +1 -0
  66. package/dist/plugin/reportRunSchema.d.ts +60 -0
  67. package/dist/plugin/reportRunSchema.d.ts.map +1 -0
  68. package/dist/plugin/sessionTracker.d.ts +42 -0
  69. package/dist/plugin/sessionTracker.d.ts.map +1 -0
  70. package/dist/plugin/shadowPipeline.d.ts +49 -0
  71. package/dist/plugin/shadowPipeline.d.ts.map +1 -0
  72. package/dist/plugin/soakObserver.d.ts +73 -0
  73. package/dist/plugin/soakObserver.d.ts.map +1 -0
  74. package/dist/storage/graph/codec.d.ts.map +1 -1
  75. package/dist/storage/graph/migrateLegacyBriefs.d.ts.map +1 -1
  76. package/dist/storage/graph/migration.d.ts +91 -0
  77. package/dist/storage/graph/migration.d.ts.map +1 -0
  78. package/dist/storage/graph/provider.d.ts +1 -0
  79. package/dist/storage/graph/provider.d.ts.map +1 -1
  80. package/dist/storage/graph/recovery.d.ts.map +1 -1
  81. package/dist/storage/graph/runRegistry.d.ts.map +1 -1
  82. package/dist/storage/graph/soakRecorder.d.ts +59 -0
  83. package/dist/storage/graph/soakRecorder.d.ts.map +1 -0
  84. package/dist/storage/graph/workspaceLease.d.ts.map +1 -1
  85. package/dist/storage/graph/worktreeRegistry.d.ts.map +1 -1
  86. package/dist/storage/graph/writer.d.ts +15 -0
  87. package/dist/storage/graph/writer.d.ts.map +1 -1
  88. package/dist/storage/path.d.ts.map +1 -1
  89. package/dist/telemetry/events.d.ts +12 -12
  90. package/dist/telemetry/graphRuntimeHealth.d.ts +53 -0
  91. package/dist/telemetry/graphRuntimeHealth.d.ts.map +1 -0
  92. package/dist/telemetry/graphView.d.ts +1 -0
  93. package/dist/telemetry/graphView.d.ts.map +1 -1
  94. package/dist/telemetry/types.d.ts +4 -4
  95. package/package.json +7 -5
  96. package/dist/orchestrator/sdd.d.ts +0 -126
  97. package/dist/orchestrator/sdd.d.ts.map +0 -1
@@ -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
- unknown: "unknown";
27
- transient: "transient";
26
+ cancelled: "cancelled";
28
27
  permanent: "permanent";
29
28
  timeout: "timeout";
30
- cancelled: "cancelled";
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
- unknown: "unknown";
108
- transient: "transient";
110
+ cancelled: "cancelled";
109
111
  permanent: "permanent";
110
112
  timeout: "timeout";
111
- cancelled: "cancelled";
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
- unknown: "unknown";
178
- transient: "transient";
180
+ cancelled: "cancelled";
179
181
  permanent: "permanent";
180
182
  timeout: "timeout";
181
- cancelled: "cancelled";
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,CAAC;AAQxB;;;;;;;GAOG;AAEH,eAAO,MAAM,kBAAkB,EAAG,CAAU,CAAC;AAC7C,eAAO,MAAM,mBAAmB,EAAG,CAAU,CAAC;AAE9C,4EAA4E;AAC5E,eAAO,MAAM,YAAY,aAIkC,CAAC;AAC5D,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAElD,+CAA+C;AAC/C,eAAO,MAAM,cAAc;;;EAAsC,CAAC;AAClE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,8EAA8E;AAC9E,eAAO,MAAM,iBAAiB,aAEsB,CAAC;AACrD,eAAO,MAAM,eAAe,aAEsB,CAAC;AAEnD,yDAAyD;AACzD,eAAO,MAAM,gBAAgB;;;;;;EAM3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAA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AO,MAAM,yBAAyB;;;;;;;;kBAQ3B,CAAC;AAEZ,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;kBAS1B,CAAC;AAEZ,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;kBASvB,CAAC;AAEZ,eAAO,MAAM,wBAAwB;;;;;;kBAM1B,CAAC;AAEZ,eAAO,MAAM,uBAAuB;;;;;kBAEzB,CAAC;AAEZ,eAAO,MAAM,oBAAoB;;;;;kBAEtB,CAAC;AAEZ,eAAO,MAAM,uBAAuB;;;;;kBAEzB,CAAC;AAEZ,gEAAgE;AAChE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAS7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;AAElD,mDAAmD;AACnD,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,eAAe,CAAC;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC;IAE1B,YAAY,IAAI,EAAE,cAAc,GAAG,eAAe,EAAE,KAAK,EAAE,CAAC,CAAC,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,167 @@
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
+ /**
101
+ * Count of chain-valid observations that were excluded from every total in
102
+ * this evidence because their `opencodeVersion` is not in the supported set.
103
+ * Recorded (not dropped) so the exclusion is auditable — a large value means
104
+ * evidence was gathered on versions this certificate does not cover.
105
+ */
106
+ readonly ineligibleObservations: number;
107
+ readonly firstTimestamp: string | null;
108
+ readonly lastTimestamp: string | null;
109
+ readonly distinctDays: number;
110
+ /** Aggregate critical divergences. null if any observation was not measured. */
111
+ readonly criticalDivergences: number | null;
112
+ /** Aggregate privacy scan. null if any observation did not run the scanner. */
113
+ readonly privacy: {
114
+ surfacesScanned: number;
115
+ rawFindings: number;
116
+ } | null;
117
+ /** Aggregate duplicate effects. null if any observation did not run the detector. */
118
+ readonly duplicateEffects: {
119
+ effectsExamined: number;
120
+ duplicatesFound: number;
121
+ } | null;
122
+ /** Aggregate model verification. null if any observation did not run verification. */
123
+ readonly modelVerification: {
124
+ nodesChecked: number;
125
+ unverified: number;
126
+ mismatched: number;
127
+ } | null;
128
+ readonly platformsGenuine: SoakPlatform[];
129
+ readonly platformsSynthetic: SoakPlatform[];
130
+ readonly opencodeVersionsObserved: string[];
131
+ readonly invalidChains: number;
132
+ };
133
+ /**
134
+ * Agrupa observaciones planas en cadenas por su posición en el array de
135
+ * cadenas recibido. Cada sub-array es una cadena independiente.
136
+ */
137
+ export declare function aggregateObservations(chains: readonly (readonly SoakObservation[])[]): {
138
+ validObs: SoakObservation[];
139
+ invalidChains: number;
140
+ };
141
+ /**
142
+ * Deriva la evidencia completa a partir de las cadenas validadas.
143
+ *
144
+ * **Eligibility filter (GE-055a, soak-pin semantics).** An observation only
145
+ * contributes to the soak totals — counts, distinct days, platform coverage,
146
+ * the aggregate safety counters, and `opencodeVersionsObserved` — when its
147
+ * `opencodeVersion` is in `supportedOpencodeVersions`. Off-version observations
148
+ * are excluded from *all* derivation (not just the count gates) so this
149
+ * certificate carries one crisp invariant: everything it summarizes happened on
150
+ * a supported version. Excluded observations are **not** discarded from the raw
151
+ * ledger — they remain chain-valid on disk and are only filtered here, at
152
+ * derivation time, so evidence gathered before a policy change re-derives
153
+ * without re-running the clock. Their count surfaces as `ineligibleObservations`.
154
+ *
155
+ * Pure and deterministic: a function of `chains` and `supportedOpencodeVersions`
156
+ * only. No I/O, clock, or randomness.
157
+ */
158
+ export declare function deriveSoakEvidence(chains: readonly (readonly SoakObservation[])[], supportedOpencodeVersions: readonly string[]): SoakEvidence;
159
+ /**
160
+ * Digest canónico del contenido del ledger completo. Se calcula sobre las
161
+ * cadenas válidas en orden de cadena (sorted por primer seq-0 chainDigest),
162
+ * concatenando el JSONL canónico de cada cadena. Esto vincula el certificado
163
+ * a la evidencia que el llamante posee.
164
+ */
165
+ export declare function canonicalLedger(chains: readonly (readonly SoakObservation[])[]): string;
166
+ export {};
167
+ //# 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,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB;oEACoE;AACpE,eAAO,MAAM,kBAAkB;;;;EAAuC,CAAC;AACvE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;;;GAIG;AACH,QAAA,MAAM,iBAAiB;;;kBAKZ,CAAC;AAEZ;;;;GAIG;AACH,QAAA,MAAM,yBAAyB;;;kBAKpB,CAAC;AAEZ;;;;;;;;;;GAUG;AACH,QAAA,MAAM,2BAA2B;;;;kBAMtB,CAAC;AAEZ,2CAA2C;AAC3C,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEhE,oDAAoD;AACpD,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAEhF,yDAAyD;AACzD,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,2BAA2B,CACnC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAuBvB,CAAC;AAEZ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,q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CAAC,gBAAgB,EAAE,YAAY,EAAE,CAAC;IAC1C,QAAQ,CAAC,kBAAkB,EAAE,YAAY,EAAE,CAAC;IAC5C,QAAQ,CAAC,wBAAwB,EAAE,MAAM,EAAE,CAAC;IAC5C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,CAAC,SAAS,eAAe,EAAE,CAAC,EAAE,GAC9C;IAAE,QAAQ,EAAE,eAAe,EAAE,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAcxD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,CAAC,SAAS,eAAe,EAAE,CAAC,EAAE,EAC/C,yBAAyB,EAAE,SAAS,MAAM,EAAE,GAC3C,YAAY,CA6Hd;AAMD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,SAAS,CAAC,SAAS,eAAe,EAAE,CAAC,EAAE,GAC9C,MAAM,CA0BR"}
@@ -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,CAA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GAAG;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,YAAY,EACV,UAAU,EACV,cAAc,EACd,YAAY,EACZ,SAAS,EACT,WAAW,EACX,MAAM,EACN,QAAQ,GACT,CAAC"}
@@ -1 +1 @@
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;gBAEZ,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM;CAMtD;AAqHD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAMzD"}
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,63 @@
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. This is
20
+ * fail-closed for the **shadow and release** certificates: their recomputing
21
+ * parsers receive this live version and compare it to the value stamped in the
22
+ * certificate, so `"unknown"` (or any mismatch) yields `opencode-mismatch` and
23
+ * closes the cutover gate. The **soak** certificate is intentionally not
24
+ * compared to this live value (see the `parseSoakCertificate` call site); its
25
+ * version guarantee comes from the eligibility filter applied to the recorded
26
+ * evidence at build time, not from a live cross-check here.
27
+ */
28
+ /**
29
+ * Branded type for a version string obtained from a live opencode server.
30
+ *
31
+ * The brand prevents a compile-time constant (e.g.
32
+ * `DEFAULT_SOAK_POLICY.supportedOpencodeVersions`) from being silently
33
+ * substituted where a live-read version is expected — `buildGateInput`
34
+ * requires the brand, so a plain `string` fails `tsc --noEmit`. Only
35
+ * `readOpencodeVersion` produces this type in production code. Tests may
36
+ * cast explicitly via `as LiveOpencodeVersion`, which is deliberate
37
+ * opt-in; production wiring in this file must not — the forge-kill
38
+ * assertion in `graph-feature-gate.test.ts` rejects any such cast in the
39
+ * `opencodeVersion` assignment.
40
+ *
41
+ * See ADR section 8 (seam protection) and the GE-057 wiring tests.
42
+ */
43
+ export type LiveOpencodeVersion = string & {
44
+ readonly __brand: "LiveOpencodeVersion";
45
+ };
46
+ export declare function readOpencodeVersion(serverUrl: URL): Promise<LiveOpencodeVersion>;
47
+ /**
48
+ * Builds the gate input by reading certificates and determining migration
49
+ * status. All I/O is isolated here; the gate itself is pure.
50
+ *
51
+ * `opencodeVersion` is the version of the opencode server actually running,
52
+ * obtained at startup via `readOpencodeVersion`. The recomputing parsers
53
+ * compare it against each certificate's stamped version — a mismatch
54
+ * produces `opencode-mismatch` and closes the gate. When the version is
55
+ * `"unknown"` (could not be determined), no certificate can match, so the
56
+ * gate fails closed.
57
+ */
58
+ export declare function buildGateInput(config: OpenTeamConfig, storage: StorageProvider, opencodeVersion: LiveOpencodeVersion): Promise<GraphGateInput>;
59
+ /** Adapts a StorageProvider to RecorderPorts for the soak recorder. */
60
+ export declare function recorderPortsFromStorage(storage: StorageProvider): RecorderPorts;
9
61
  export declare function createEventSink(rawOptions: unknown, storage?: StorageProvider): EventSink;
10
62
  export declare function isMissingFile(error: unknown): boolean;
11
63
  export declare function createCliDeps(config: OpenTeamConfig, registry: RuntimeRegistry, telemetryPath: string, sessionsDir?: string, storage?: StorageProvider): CliDeps;
@@ -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;AAKnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC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