@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.
Files changed (117) hide show
  1. package/.opencode/openteam.example.json +6 -1
  2. package/README.es.md +1 -1
  3. package/README.md +1 -1
  4. package/dist/capabilities/types.d.ts +4 -4
  5. package/dist/classifier/types.d.ts +3 -3
  6. package/dist/cli.js +430 -36
  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 +36 -2
  10. package/dist/commands/graph.d.ts.map +1 -1
  11. package/dist/config/graphFeatureGate.d.ts +96 -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 +40 -19
  17. package/dist/config/schema.d.ts.map +1 -1
  18. package/dist/console/assets.d.ts +9 -1
  19. package/dist/console/assets.d.ts.map +1 -1
  20. package/dist/console/opencodeClient.d.ts +6 -0
  21. package/dist/console/opencodeClient.d.ts.map +1 -1
  22. package/dist/console/protocol.d.ts +8 -0
  23. package/dist/console/protocol.d.ts.map +1 -1
  24. package/dist/console/render.d.ts +25 -0
  25. package/dist/console/render.d.ts.map +1 -1
  26. package/dist/context/redaction.d.ts +23 -0
  27. package/dist/context/redaction.d.ts.map +1 -1
  28. package/dist/context/schema.d.ts +3 -3
  29. package/dist/contract/opencode.d.ts +2 -2
  30. package/dist/contract/opencode.d.ts.map +1 -1
  31. package/dist/graph/certificate.d.ts +505 -0
  32. package/dist/graph/certificate.d.ts.map +1 -0
  33. package/dist/graph/ids.d.ts +9 -0
  34. package/dist/graph/ids.d.ts.map +1 -1
  35. package/dist/graph/privacyPolicy.d.ts.map +1 -1
  36. package/dist/graph/reducer.d.ts.map +1 -1
  37. package/dist/graph/replay.d.ts.map +1 -1
  38. package/dist/graph/reviewerPolicy.d.ts.map +1 -1
  39. package/dist/graph/schema.d.ts +33 -33
  40. package/dist/graph/schema.d.ts.map +1 -1
  41. package/dist/graph/soakLedger.d.ts +144 -0
  42. package/dist/graph/soakLedger.d.ts.map +1 -0
  43. package/dist/graph/types.d.ts +2 -0
  44. package/dist/graph/types.d.ts.map +1 -1
  45. package/dist/graph/validate.d.ts.map +1 -1
  46. package/dist/index.d.ts +47 -0
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +2351 -180
  49. package/dist/local/registry.d.ts.map +1 -1
  50. package/dist/memory/types.d.ts +2 -2
  51. package/dist/orchestrator/graphFacade.d.ts +39 -0
  52. package/dist/orchestrator/graphFacade.d.ts.map +1 -0
  53. package/dist/orchestrator/graphIngress.d.ts +136 -0
  54. package/dist/orchestrator/graphIngress.d.ts.map +1 -0
  55. package/dist/orchestrator/graphShadow.d.ts +121 -0
  56. package/dist/orchestrator/graphShadow.d.ts.map +1 -0
  57. package/dist/orchestrator/ledger.d.ts +14 -2
  58. package/dist/orchestrator/ledger.d.ts.map +1 -1
  59. package/dist/orchestrator/opencodeSessionAdapter.d.ts.map +1 -1
  60. package/dist/orchestrator/roles.d.ts +3 -3
  61. package/dist/orchestrator/sdd.d.ts +55 -1
  62. package/dist/orchestrator/sdd.d.ts.map +1 -1
  63. package/dist/orchestrator/sddCompiler.d.ts +6 -2
  64. package/dist/orchestrator/sddCompiler.d.ts.map +1 -1
  65. package/dist/orchestrator/worktreeAdapter.d.ts +39 -0
  66. package/dist/orchestrator/worktreeAdapter.d.ts.map +1 -0
  67. package/dist/orchestrator/worktreeDispatch.d.ts +84 -0
  68. package/dist/orchestrator/worktreeDispatch.d.ts.map +1 -0
  69. package/dist/orchestrator/worktreeReconciler.d.ts +74 -0
  70. package/dist/orchestrator/worktreeReconciler.d.ts.map +1 -0
  71. package/dist/plugin/graphShadowIngress.d.ts +165 -0
  72. package/dist/plugin/graphShadowIngress.d.ts.map +1 -0
  73. package/dist/plugin/graphTool.d.ts +63 -0
  74. package/dist/plugin/graphTool.d.ts.map +1 -0
  75. package/dist/plugin/hooks.d.ts +6 -0
  76. package/dist/plugin/hooks.d.ts.map +1 -1
  77. package/dist/plugin/legacyRunProducer.d.ts +60 -0
  78. package/dist/plugin/legacyRunProducer.d.ts.map +1 -0
  79. package/dist/plugin/reportRunSchema.d.ts +60 -0
  80. package/dist/plugin/reportRunSchema.d.ts.map +1 -0
  81. package/dist/plugin/sessionTracker.d.ts +42 -0
  82. package/dist/plugin/sessionTracker.d.ts.map +1 -0
  83. package/dist/plugin/shadowPipeline.d.ts +49 -0
  84. package/dist/plugin/shadowPipeline.d.ts.map +1 -0
  85. package/dist/plugin/soakObserver.d.ts +73 -0
  86. package/dist/plugin/soakObserver.d.ts.map +1 -0
  87. package/dist/storage/graph/codec.d.ts.map +1 -1
  88. package/dist/storage/graph/migrateLegacyBriefs.d.ts.map +1 -1
  89. package/dist/storage/graph/migration.d.ts +91 -0
  90. package/dist/storage/graph/migration.d.ts.map +1 -0
  91. package/dist/storage/graph/provider.d.ts +1 -0
  92. package/dist/storage/graph/provider.d.ts.map +1 -1
  93. package/dist/storage/graph/recovery.d.ts.map +1 -1
  94. package/dist/storage/graph/runRegistry.d.ts.map +1 -1
  95. package/dist/storage/graph/soakRecorder.d.ts +59 -0
  96. package/dist/storage/graph/soakRecorder.d.ts.map +1 -0
  97. package/dist/storage/graph/workspaceLease.d.ts.map +1 -1
  98. package/dist/storage/graph/worktreeRegistry.d.ts +29 -0
  99. package/dist/storage/graph/worktreeRegistry.d.ts.map +1 -0
  100. package/dist/storage/graph/writer.d.ts +15 -0
  101. package/dist/storage/graph/writer.d.ts.map +1 -1
  102. package/dist/storage/path.d.ts.map +1 -1
  103. package/dist/telemetry/events.d.ts +12 -12
  104. package/dist/telemetry/graphRuntimeHealth.d.ts +53 -0
  105. package/dist/telemetry/graphRuntimeHealth.d.ts.map +1 -0
  106. package/dist/telemetry/graphView.d.ts +76 -0
  107. package/dist/telemetry/graphView.d.ts.map +1 -0
  108. package/dist/telemetry/types.d.ts +4 -4
  109. package/dist/web/console.d.ts +6 -0
  110. package/dist/web/console.d.ts.map +1 -1
  111. package/dist/web/graphRoute.d.ts +36 -0
  112. package/dist/web/graphRoute.d.ts.map +1 -0
  113. package/dist/web/server.d.ts +21 -2
  114. package/dist/web/server.d.ts.map +1 -1
  115. package/dist/web/start.d.ts +11 -0
  116. package/dist/web/start.d.ts.map +1 -1
  117. package/package.json +7 -5
@@ -39,10 +39,33 @@ export declare function redactedRef(ref: ContextRef): {
39
39
  sha256: string;
40
40
  bytes: number;
41
41
  };
42
+ /** Claves prohibidas por transportar potencialmente contenido crudo. */
43
+ export declare const FORBIDDEN_RAW_KEYS: ReadonlySet<string>;
42
44
  /**
43
45
  * Recorre una estructura y lanza `RedactionError` si encuentra alguna clave de
44
46
  * contenido crudo. Guard barato para journal/snapshots/telemetría; no valida
45
47
  * esquema, solo ausencia de campos crudos.
46
48
  */
47
49
  export declare function assertReferenceOnly(value: unknown): void;
50
+ /** Result of a counting privacy scan. */
51
+ export type PrivacyScanResult = {
52
+ /** Number of top-level structures scanned (the denominator). */
53
+ readonly surfacesScanned: number;
54
+ /**
55
+ * Total forbidden-key occurrences across all surfaces. Zero means the
56
+ * scanner ran, examined the surfaces, and found nothing forbidden.
57
+ */
58
+ readonly rawFindings: number;
59
+ };
60
+ /**
61
+ * Counting privacy scanner. Walks one or more structures and returns both the
62
+ * number of surfaces examined and the total forbidden-key findings, without
63
+ * throwing.
64
+ *
65
+ * **Surface definition:** one surface = one top-level value passed in the
66
+ * `surfaces` array. In soak context, this is the trace being scanned — one
67
+ * trace per observation. The definition is deliberately not inflatable: it
68
+ * counts logical units of work, not internal leaves.
69
+ */
70
+ export declare function scanReferenceOnly(surfaces: readonly unknown[]): PrivacyScanResult;
48
71
  //# sourceMappingURL=redaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"redaction.d.ts","sourceRoot":"","sources":["../../src/context/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Y,GAAG,EAAE,MAAM,EAKtB;CACF;AAED,2DAA2D;AAC3D,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,qEAAqE;AACrE,MAAM,MAAM,MAAM,GAAG;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,2EAA2E;AAC3E,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAK/C;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,GAAG,CAAC,EAAE,UAAU,GACf,aAAa,CAKf;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,UAAU,GAAG;IAC5C,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAEA;AAED,wEAAwE;AACxE,eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAWjD,CAAC;AA+BH;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAIxD;AAED,yCAAyC;AACzC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,gEAAgE;IAChE,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;CAC9B,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,SAAS,OAAO,EAAE,GAC3B,iBAAiB,CASnB"}
@@ -14,8 +14,8 @@ import { z } from "zod";
14
14
  */
15
15
  /** Clase de privacidad de un artefacto o contrato de contexto. */
16
16
  export declare const PrivacyClassSchema: z.ZodEnum<{
17
- public: "public";
18
17
  internal: "internal";
18
+ public: "public";
19
19
  sensitive: "sensitive";
20
20
  }>;
21
21
  export type PrivacyClass = z.infer<typeof PrivacyClassSchema>;
@@ -74,8 +74,8 @@ export declare const ArtifactManifestSchema: z.ZodObject<{
74
74
  version: z.ZodLiteral<1>;
75
75
  taskID: z.ZodString;
76
76
  privacyClass: z.ZodEnum<{
77
- public: "public";
78
77
  internal: "internal";
78
+ public: "public";
79
79
  sensitive: "sensitive";
80
80
  }>;
81
81
  entries: z.ZodArray<z.ZodObject<{
@@ -105,8 +105,8 @@ export declare const NodeContextContractSchema: z.ZodObject<{
105
105
  mediaType: z.ZodOptional<z.ZodString>;
106
106
  }, z.core.$strict>>;
107
107
  privacyClass: z.ZodEnum<{
108
- public: "public";
109
108
  internal: "internal";
109
+ public: "public";
110
110
  sensitive: "sensitive";
111
111
  }>;
112
112
  maxInputTokens: z.ZodOptional<z.ZodNumber>;
@@ -25,13 +25,13 @@ export declare const MIN_SUPPORTED_OPENCODE_VERSION = "1.17.13";
25
25
  * una versión nueva hay que añadirla aquí **después** de revisar los puntos de
26
26
  * integración documentados en {@link OPENCODE_CONTRACT_SURFACES}.
27
27
  */
28
- export declare const SUPPORTED_OPENCODE_VERSIONS: readonly ["1.17.13"];
28
+ export declare const SUPPORTED_OPENCODE_VERSIONS: readonly ["1.17.13", "1.18.18"];
29
29
  export type SupportedOpencodeVersion = (typeof SUPPORTED_OPENCODE_VERSIONS)[number];
30
30
  /**
31
31
  * Puntos de integración concretos que openteam asume estables. Sirve como
32
32
  * checklist ejecutable/documental cuando se verifica una versión nueva.
33
33
  */
34
- export declare const OPENCODE_CONTRACT_SURFACES: readonly ["Hooks[\"chat.message\"] permite mutar output.message.model", "Hooks[\"chat.message\"] permite mutar output.parts[].text (inyección de contexto)", "tool() + tool.schema (zod) para custom tools", "PluginModule = { id?, server } con server: (input, options?) => Promise<Hooks>", "SDK session.create / session.prompt aceptan body.model = { providerID, modelID }", "Hooks[\"tool.execute.before\"] / Hooks[\"tool.execute.after\"] reciben { tool, sessionID, callID }", "Hooks[\"event\"] con message.updated trae properties.info (AssistantMessage) con cost:number y tokens{input,output,reasoning,cache{read,write}} y time{created,completed}", "El frontmatter `permission` de un agente (`.opencode/agent/*.md`) ANULA el `permission` global de `opencode.json`; el catch-all `\"*\": allow` concede todos los permisos (base del modo YOLO)"];
34
+ export declare const OPENCODE_CONTRACT_SURFACES: readonly ['Hooks["chat.message"] permite mutar output.message.model', 'Hooks["chat.message"] permite mutar output.parts[].text (inyección de contexto)', "tool() + tool.schema (zod) para custom tools", "PluginModule = { id?, server } con server: (input, options?) => Promise<Hooks>", "SDK session.create / session.prompt aceptan body.model = { providerID, modelID }", 'Hooks["tool.execute.before"] / Hooks["tool.execute.after"] reciben { tool, sessionID, callID }', 'Hooks["event"] con message.updated trae properties.info (AssistantMessage) con cost:number y tokens{input,output,reasoning,cache{read,write}} y time{created,completed}', 'El frontmatter `permission` de un agente (`.opencode/agent/*.md`) ANULA el `permission` global de `opencode.json`; el catch-all `"*": allow` concede todos los permisos (base del modo YOLO)'];
35
35
  export type Semver = {
36
36
  readonly major: number;
37
37
  readonly minor: number;
@@ -1 +1 @@
1
- {"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../src/contract/opencode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB,sDAGpB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,8BAA8B,YAAY,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,sBAAuB,CAAC;AAEhE,MAAM,MAAM,wBAAwB,GAClC,CAAC,OAAO,2BAA2B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,0BAA0B,y0BAS7B,CAAC;AAEX,MAAM,MAAM,MAAM,GAAG;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,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EAAE,MAAM,CAAC;CACxB,CAAC;AAIF;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAanD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAc9D;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,GACd,OAAO,IAAI,wBAAwB,CAErC;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAOpE"}
@@ -0,0 +1,505 @@
1
+ import { z } from "zod";
2
+ import { type SoakObservation } from "./soakLedger";
3
+ /**
4
+ * **Certificado de certificación shadow** `GraphShadowCertificateV1` (GE-046).
5
+ *
6
+ * Es el STOP duro que desbloquea R1 y lo consumen GE-050, GE-054 y GE-057, así
7
+ * que su propiedad central no es describir la evidencia sino **no poder mentir
8
+ * sobre ella**:
9
+ *
10
+ * - El veredicto se **deriva** de la evidencia; `buildShadowCertificate` no lo
11
+ * acepta como entrada. No existe forma de pedir un certificado en verde.
12
+ * - `parseShadowCertificate` **recomputa** el veredicto y el digest antes de
13
+ * aceptarlo, así que un `"pass"` escrito a mano o una evidencia editada
14
+ * después de firmar fallan cerrado en vez de colarse en el arranque.
15
+ * - El certificado transporta la **procedencia** del espejo (GE-043), que acota
16
+ * qué prueba realmente la paridad: certificar dimensiones que el espejo se
17
+ * limita a copiar del trace no probaría nada.
18
+ *
19
+ * Módulo **puro y determinista**: sin I/O, reloj ni azar. La misma evidencia
20
+ * produce el mismo certificado, byte a byte.
21
+ */
22
+ /** Tamaño mínimo de muestra: por debajo, no hay evidencia que certificar. */
23
+ export declare const SHADOW_CERTIFICATE_MIN_RUNS = 1000;
24
+ /** Puertas que el certificado evalúa, en orden determinista de reporte. */
25
+ export type ShadowCertificateGate = "sample" | "parity" | "one-legacy-execution" | "privacy" | "overhead";
26
+ /** Veredicto derivado del certificado. */
27
+ export type ShadowCertificateVerdict = "pass" | "fail";
28
+ declare const EvidenceSchema: z.ZodObject<{
29
+ opencodeVersion: z.ZodString;
30
+ parity: z.ZodObject<{
31
+ runs: z.ZodNumber;
32
+ match: z.ZodNumber;
33
+ divergent: z.ZodNumber;
34
+ inconclusive: z.ZodNumber;
35
+ divergences: z.ZodArray<z.ZodEnum<{
36
+ fixes: "fixes";
37
+ models: "models";
38
+ order: "order";
39
+ outcome: "outcome";
40
+ roles: "roles";
41
+ status: "status";
42
+ }>>;
43
+ }, z.core.$strict>;
44
+ legacy: z.ZodObject<{
45
+ observed: z.ZodNumber;
46
+ duplicated: z.ZodNumber;
47
+ }, z.core.$strict>;
48
+ privacy: z.ZodObject<{
49
+ surfacesScanned: z.ZodNumber;
50
+ rawFindings: z.ZodNumber;
51
+ }, z.core.$strict>;
52
+ overhead: z.ZodObject<{
53
+ p95Millis: z.ZodNumber;
54
+ budgetMillis: z.ZodNumber;
55
+ samples: z.ZodNumber;
56
+ }, z.core.$strict>;
57
+ provenance: z.ZodRecord<z.ZodEnum<{
58
+ fixes: "fixes";
59
+ models: "models";
60
+ order: "order";
61
+ outcome: "outcome";
62
+ roles: "roles";
63
+ status: "status";
64
+ }>, z.ZodEnum<{
65
+ carried: "carried";
66
+ compiled: "compiled";
67
+ recomputed: "recomputed";
68
+ validated: "validated";
69
+ }>>;
70
+ }, z.core.$strict>;
71
+ /** Evidencia bruta que alimenta el certificado. */
72
+ export type ShadowCertificateEvidence = z.infer<typeof EvidenceSchema>;
73
+ declare const CertificateSchema: z.ZodObject<{
74
+ version: z.ZodLiteral<1>;
75
+ certificate: z.ZodLiteral<"graph-shadow">;
76
+ opencodeVersion: z.ZodString;
77
+ evidence: z.ZodObject<{
78
+ opencodeVersion: z.ZodString;
79
+ parity: z.ZodObject<{
80
+ runs: z.ZodNumber;
81
+ match: z.ZodNumber;
82
+ divergent: z.ZodNumber;
83
+ inconclusive: z.ZodNumber;
84
+ divergences: z.ZodArray<z.ZodEnum<{
85
+ fixes: "fixes";
86
+ models: "models";
87
+ order: "order";
88
+ outcome: "outcome";
89
+ roles: "roles";
90
+ status: "status";
91
+ }>>;
92
+ }, z.core.$strict>;
93
+ legacy: z.ZodObject<{
94
+ observed: z.ZodNumber;
95
+ duplicated: z.ZodNumber;
96
+ }, z.core.$strict>;
97
+ privacy: z.ZodObject<{
98
+ surfacesScanned: z.ZodNumber;
99
+ rawFindings: z.ZodNumber;
100
+ }, z.core.$strict>;
101
+ overhead: z.ZodObject<{
102
+ p95Millis: z.ZodNumber;
103
+ budgetMillis: z.ZodNumber;
104
+ samples: z.ZodNumber;
105
+ }, z.core.$strict>;
106
+ provenance: z.ZodRecord<z.ZodEnum<{
107
+ fixes: "fixes";
108
+ models: "models";
109
+ order: "order";
110
+ outcome: "outcome";
111
+ roles: "roles";
112
+ status: "status";
113
+ }>, z.ZodEnum<{
114
+ carried: "carried";
115
+ compiled: "compiled";
116
+ recomputed: "recomputed";
117
+ validated: "validated";
118
+ }>>;
119
+ }, z.core.$strict>;
120
+ verdict: z.ZodEnum<{
121
+ fail: "fail";
122
+ pass: "pass";
123
+ }>;
124
+ failedGates: z.ZodArray<z.ZodEnum<{
125
+ "one-legacy-execution": "one-legacy-execution";
126
+ overhead: "overhead";
127
+ parity: "parity";
128
+ privacy: "privacy";
129
+ sample: "sample";
130
+ }>>;
131
+ digest: z.ZodString;
132
+ }, z.core.$strict>;
133
+ /** Certificado machine-readable de certificación shadow. */
134
+ export type GraphShadowCertificateV1 = z.infer<typeof CertificateSchema>;
135
+ /** Motivo tipado por el que un certificado no es aceptable. */
136
+ export type ShadowCertificateErrorCode = "invalid-certificate" | "verdict-mismatch" | "digest-mismatch" | "opencode-mismatch";
137
+ /** Error fail-closed del certificado. */
138
+ export declare class ShadowCertificateError extends Error {
139
+ readonly code: ShadowCertificateErrorCode;
140
+ readonly detail: string;
141
+ constructor(code: ShadowCertificateErrorCode, detail: string);
142
+ }
143
+ /**
144
+ * Construye el certificado a partir de la evidencia. El veredicto **no es un
145
+ * parámetro**: se deriva de las puertas, de modo que no existe un camino para
146
+ * emitir un certificado en verde sin la evidencia que lo sostiene.
147
+ */
148
+ export declare function buildShadowCertificate(evidence: ShadowCertificateEvidence): GraphShadowCertificateV1;
149
+ /**
150
+ * Valida un certificado de procedencia no confiable contra el pin de opencode
151
+ * esperado. Fail-closed en todos los casos: esquema inválido, veredicto que no
152
+ * se corresponde con su evidencia, digest que no cubre la evidencia presentada,
153
+ * o pin distinto al certificado.
154
+ */
155
+ export declare function parseShadowCertificate(value: unknown, opencodeVersion: string): GraphShadowCertificateV1;
156
+ /**
157
+ * Puertas del certificado de release. Cada una es condición **necesaria**: una
158
+ * puerta que corrió cero casos falla por vacuidad, y la ausencia de evidencia
159
+ * es fracaso, no éxito.
160
+ */
161
+ export type ReleaseCertificateGate = "shadow-valid" | "determinism" | "crash-recovery" | "replay-equivalence" | "privacy" | "contract" | "migration" | "health" | "performance";
162
+ declare const ReleaseEvidenceSchema: z.ZodObject<{
163
+ opencodeVersion: z.ZodString;
164
+ platform: z.ZodEnum<{
165
+ linux: "linux";
166
+ win32: "win32";
167
+ }>;
168
+ shadowCertificateDigest: z.ZodString;
169
+ determinism: z.ZodObject<{
170
+ runs: z.ZodNumber;
171
+ allMatch: z.ZodBoolean;
172
+ }, z.core.$strict>;
173
+ crashRecovery: z.ZodObject<{
174
+ scenarios: z.ZodNumber;
175
+ allConverge: z.ZodBoolean;
176
+ }, z.core.$strict>;
177
+ replayEquivalence: z.ZodObject<{
178
+ checks: z.ZodNumber;
179
+ allEquivalent: z.ZodBoolean;
180
+ }, z.core.$strict>;
181
+ privacy: z.ZodObject<{
182
+ surfacesScanned: z.ZodNumber;
183
+ rawFindings: z.ZodNumber;
184
+ }, z.core.$strict>;
185
+ contract: z.ZodObject<{
186
+ roundTrips: z.ZodNumber;
187
+ allSettled: z.ZodBoolean;
188
+ }, z.core.$strict>;
189
+ migration: z.ZodObject<{
190
+ cases: z.ZodNumber;
191
+ allSucceeded: z.ZodBoolean;
192
+ }, z.core.$strict>;
193
+ health: z.ZodObject<{
194
+ samples: z.ZodNumber;
195
+ bounded: z.ZodBoolean;
196
+ idempotent: z.ZodBoolean;
197
+ }, z.core.$strict>;
198
+ performance: z.ZodObject<{
199
+ p95Millis: z.ZodNumber;
200
+ budgetMillis: z.ZodNumber;
201
+ samples: z.ZodNumber;
202
+ }, z.core.$strict>;
203
+ }, z.core.$strict>;
204
+ /** Evidencia bruta que alimenta el certificado de release. */
205
+ export type ReleaseCertificateEvidence = z.infer<typeof ReleaseEvidenceSchema>;
206
+ declare const ReleaseCertificateSchema: z.ZodObject<{
207
+ version: z.ZodLiteral<1>;
208
+ certificate: z.ZodLiteral<"graph-release">;
209
+ platform: z.ZodEnum<{
210
+ linux: "linux";
211
+ win32: "win32";
212
+ }>;
213
+ opencodeVersion: z.ZodString;
214
+ shadowCertificateDigest: z.ZodString;
215
+ evidence: z.ZodObject<{
216
+ opencodeVersion: z.ZodString;
217
+ platform: z.ZodEnum<{
218
+ linux: "linux";
219
+ win32: "win32";
220
+ }>;
221
+ shadowCertificateDigest: z.ZodString;
222
+ determinism: z.ZodObject<{
223
+ runs: z.ZodNumber;
224
+ allMatch: z.ZodBoolean;
225
+ }, z.core.$strict>;
226
+ crashRecovery: z.ZodObject<{
227
+ scenarios: z.ZodNumber;
228
+ allConverge: z.ZodBoolean;
229
+ }, z.core.$strict>;
230
+ replayEquivalence: z.ZodObject<{
231
+ checks: z.ZodNumber;
232
+ allEquivalent: z.ZodBoolean;
233
+ }, z.core.$strict>;
234
+ privacy: z.ZodObject<{
235
+ surfacesScanned: z.ZodNumber;
236
+ rawFindings: z.ZodNumber;
237
+ }, z.core.$strict>;
238
+ contract: z.ZodObject<{
239
+ roundTrips: z.ZodNumber;
240
+ allSettled: z.ZodBoolean;
241
+ }, z.core.$strict>;
242
+ migration: z.ZodObject<{
243
+ cases: z.ZodNumber;
244
+ allSucceeded: z.ZodBoolean;
245
+ }, z.core.$strict>;
246
+ health: z.ZodObject<{
247
+ samples: z.ZodNumber;
248
+ bounded: z.ZodBoolean;
249
+ idempotent: z.ZodBoolean;
250
+ }, z.core.$strict>;
251
+ performance: z.ZodObject<{
252
+ p95Millis: z.ZodNumber;
253
+ budgetMillis: z.ZodNumber;
254
+ samples: z.ZodNumber;
255
+ }, z.core.$strict>;
256
+ }, z.core.$strict>;
257
+ verdict: z.ZodEnum<{
258
+ fail: "fail";
259
+ pass: "pass";
260
+ }>;
261
+ failedGates: z.ZodArray<z.ZodEnum<{
262
+ contract: "contract";
263
+ "crash-recovery": "crash-recovery";
264
+ determinism: "determinism";
265
+ health: "health";
266
+ migration: "migration";
267
+ performance: "performance";
268
+ privacy: "privacy";
269
+ "replay-equivalence": "replay-equivalence";
270
+ "shadow-valid": "shadow-valid";
271
+ }>>;
272
+ digest: z.ZodString;
273
+ }, z.core.$strict>;
274
+ /** Certificado machine-readable de release del grafo. */
275
+ export type GraphReleaseCertificateV1 = z.infer<typeof ReleaseCertificateSchema>;
276
+ /** Motivo tipado por el que un certificado de release no es aceptable. */
277
+ export type ReleaseCertificateErrorCode = "invalid-certificate" | "field-inconsistency" | "verdict-mismatch" | "digest-mismatch" | "opencode-mismatch";
278
+ /** Error fail-closed del certificado de release. */
279
+ export declare class ReleaseCertificateError extends Error {
280
+ readonly code: ReleaseCertificateErrorCode;
281
+ readonly detail: string;
282
+ constructor(code: ReleaseCertificateErrorCode, detail: string);
283
+ }
284
+ /**
285
+ * Construye el certificado de release a partir de la evidencia. El veredicto
286
+ * **no es un parámetro**: se deriva de las puertas.
287
+ *
288
+ * `expectedShadowDigest` es el digest del `GraphShadowCertificateV1` producido
289
+ * en la misma ejecución — vincula transitivamente la revisión. Si el digest no
290
+ * coincide, la puerta `shadow-valid` falla. Es obligatorio: un certificado
291
+ * nunca puede ser su propio testigo.
292
+ */
293
+ export declare function buildReleaseCertificate(evidence: ReleaseCertificateEvidence, expectedShadowDigest: string): GraphReleaseCertificateV1;
294
+ /**
295
+ * Valida un certificado de release de procedencia no confiable. Fail-closed:
296
+ * `invalid-certificate` → `field-inconsistency` → `verdict-mismatch` →
297
+ * `digest-mismatch` → `opencode-mismatch`.
298
+ *
299
+ * `expectedShadowDigest` es el digest del shadow certificate que el llamante
300
+ * espera — impide que un certificado forjado declare un digest falso y pase
301
+ * la puerta `shadow-valid` por autocomparación.
302
+ */
303
+ export declare function parseReleaseCertificate(value: unknown, opencodeVersion: string, expectedShadowDigest: string): GraphReleaseCertificateV1;
304
+ /**
305
+ * Puertas del certificado soak. Cada una es condición **necesaria**; cero
306
+ * observaciones fallan cerrado por la puerta `minimum-observations`, no por
307
+ * un error de schema. La ausencia de evidencia es fracaso, no éxito.
308
+ */
309
+ export type SoakCertificateGate = "minimum-observations" | "minimum-duration" | "chain-integrity" | "zero-critical-divergence" | "zero-privacy-breach" | "zero-duplicate-effect" | "zero-model-mismatch" | "os-diversity" | "opencode-pin";
310
+ /**
311
+ * Shadow divergence codes that the soak mechanism can classify as critical.
312
+ * Defined here (not imported from orchestrator) to keep the graph module pure.
313
+ */
314
+ export declare const ShadowDivergenceCodeSchema: z.ZodEnum<{
315
+ fixes: "fixes";
316
+ models: "models";
317
+ order: "order";
318
+ outcome: "outcome";
319
+ roles: "roles";
320
+ status: "status";
321
+ }>;
322
+ export type ShadowDivergenceCode = z.infer<typeof ShadowDivergenceCodeSchema>;
323
+ /**
324
+ * Códigos de divergencia cuya proyección shadow es recomputada de forma
325
+ * independiente por el espejo Y cuya divergencia es **demostrable** a través
326
+ * del pipeline completo (trace → mirrorLegacyTrace → proyecciones →
327
+ * compareShadowRun). Solo estos pueden producir una divergencia real y por
328
+ * tanto solo estos son aptos para el conjunto crítico de la política soak.
329
+ *
330
+ * `order` y `roles` fueron reclasificados de "recomputed" a "carried" (#55):
331
+ * `compileShadowSpec` preserva ids y roles del trace literalmente, así que
332
+ * ambos lados de la comparación ven las mismas secuencias. No se pudo
333
+ * construir ningún trace válido que los hiciera divergir por el pipeline.
334
+ *
335
+ * Un test de alcanzabilidad (`demonstrated-divergence-provenance.test.ts`)
336
+ * demuestra que cada código aquí listado PUEDE divergir por el pipeline real.
337
+ * Añadir un código sin su demostración es un test rojo.
338
+ */
339
+ export declare const RECOMPUTED_DIVERGENCE_CODES: readonly ["fixes"];
340
+ declare const RecomputedDivergenceCodeSchema: z.ZodEnum<{
341
+ fixes: "fixes";
342
+ }>;
343
+ export type RecomputedDivergenceCode = z.infer<typeof RecomputedDivergenceCodeSchema>;
344
+ /**
345
+ * Política operativa del certificado soak. Los umbrales son configuración,
346
+ * no constantes — ajustables sin editar lógica de puertas. La política se
347
+ * embebe en el certificado y se cubre por el digest: un certificado que no
348
+ * registra contra qué estándar se juzgó es infalsificable.
349
+ *
350
+ * `criticalDivergenceCodes` classifies which shadow divergence codes count as
351
+ * critical for the `zero-critical-divergence` gate. Only codes with provenance
352
+ * "recomputed" are accepted: they are the only codes where the shadow mirror
353
+ * computes the value independently, making divergence structurally possible.
354
+ * Codes with provenance "carried" or "validated" copy the same trace field on
355
+ * both sides — including them would inflate declared coverage without
356
+ * measuring anything.
357
+ */
358
+ export declare const SoakPolicySchema: z.ZodObject<{
359
+ minimumGenuineObservations: z.ZodNumber;
360
+ minimumDistinctDays: z.ZodNumber;
361
+ requireGenuineUsageOnAllPlatforms: z.ZodBoolean;
362
+ supportedOpencodeVersion: z.ZodString;
363
+ criticalDivergenceCodes: z.ZodArray<z.ZodEnum<{
364
+ fixes: "fixes";
365
+ }>>;
366
+ }, z.core.$strict>;
367
+ /** Política tipada del certificado soak. */
368
+ export type SoakPolicy = z.infer<typeof SoakPolicySchema>;
369
+ /** Política por defecto: solo el código cuya divergencia está demostrada. */
370
+ export declare const DEFAULT_SOAK_POLICY: SoakPolicy;
371
+ declare const SoakEvidenceSchema: z.ZodObject<{
372
+ totalObservations: z.ZodNumber;
373
+ genuineUsageObservations: z.ZodNumber;
374
+ ciSyntheticObservations: z.ZodNumber;
375
+ recorderCount: z.ZodNumber;
376
+ firstTimestamp: z.ZodNullable<z.ZodString>;
377
+ lastTimestamp: z.ZodNullable<z.ZodString>;
378
+ distinctDays: z.ZodNumber;
379
+ criticalDivergences: z.ZodNullable<z.ZodNumber>;
380
+ privacy: z.ZodNullable<z.ZodObject<{
381
+ surfacesScanned: z.ZodNumber;
382
+ rawFindings: z.ZodNumber;
383
+ }, z.core.$strict>>;
384
+ duplicateEffects: z.ZodNullable<z.ZodObject<{
385
+ effectsExamined: z.ZodNumber;
386
+ duplicatesFound: z.ZodNumber;
387
+ }, z.core.$strict>>;
388
+ modelVerification: z.ZodNullable<z.ZodObject<{
389
+ nodesChecked: z.ZodNumber;
390
+ unverified: z.ZodNumber;
391
+ mismatched: z.ZodNumber;
392
+ }, z.core.$strict>>;
393
+ platformsGenuine: z.ZodArray<z.ZodEnum<{
394
+ darwin: "darwin";
395
+ linux: "linux";
396
+ win32: "win32";
397
+ }>>;
398
+ platformsSynthetic: z.ZodArray<z.ZodEnum<{
399
+ darwin: "darwin";
400
+ linux: "linux";
401
+ win32: "win32";
402
+ }>>;
403
+ opencodeVersionsObserved: z.ZodArray<z.ZodString>;
404
+ invalidChains: z.ZodNumber;
405
+ }, z.core.$strict>;
406
+ /** Evidencia agregada del soak. */
407
+ export type SoakCertificateEvidence = z.infer<typeof SoakEvidenceSchema>;
408
+ declare const SoakCertificateSchema: z.ZodObject<{
409
+ version: z.ZodLiteral<1>;
410
+ certificate: z.ZodLiteral<"graph-soak">;
411
+ trustBoundary: z.ZodLiteral<"contributors">;
412
+ policy: z.ZodObject<{
413
+ minimumGenuineObservations: z.ZodNumber;
414
+ minimumDistinctDays: z.ZodNumber;
415
+ requireGenuineUsageOnAllPlatforms: z.ZodBoolean;
416
+ supportedOpencodeVersion: z.ZodString;
417
+ criticalDivergenceCodes: z.ZodArray<z.ZodEnum<{
418
+ fixes: "fixes";
419
+ }>>;
420
+ }, z.core.$strict>;
421
+ evidence: z.ZodObject<{
422
+ totalObservations: z.ZodNumber;
423
+ genuineUsageObservations: z.ZodNumber;
424
+ ciSyntheticObservations: z.ZodNumber;
425
+ recorderCount: z.ZodNumber;
426
+ firstTimestamp: z.ZodNullable<z.ZodString>;
427
+ lastTimestamp: z.ZodNullable<z.ZodString>;
428
+ distinctDays: z.ZodNumber;
429
+ criticalDivergences: z.ZodNullable<z.ZodNumber>;
430
+ privacy: z.ZodNullable<z.ZodObject<{
431
+ surfacesScanned: z.ZodNumber;
432
+ rawFindings: z.ZodNumber;
433
+ }, z.core.$strict>>;
434
+ duplicateEffects: z.ZodNullable<z.ZodObject<{
435
+ effectsExamined: z.ZodNumber;
436
+ duplicatesFound: z.ZodNumber;
437
+ }, z.core.$strict>>;
438
+ modelVerification: z.ZodNullable<z.ZodObject<{
439
+ nodesChecked: z.ZodNumber;
440
+ unverified: z.ZodNumber;
441
+ mismatched: z.ZodNumber;
442
+ }, z.core.$strict>>;
443
+ platformsGenuine: z.ZodArray<z.ZodEnum<{
444
+ darwin: "darwin";
445
+ linux: "linux";
446
+ win32: "win32";
447
+ }>>;
448
+ platformsSynthetic: z.ZodArray<z.ZodEnum<{
449
+ darwin: "darwin";
450
+ linux: "linux";
451
+ win32: "win32";
452
+ }>>;
453
+ opencodeVersionsObserved: z.ZodArray<z.ZodString>;
454
+ invalidChains: z.ZodNumber;
455
+ }, z.core.$strict>;
456
+ verdict: z.ZodEnum<{
457
+ fail: "fail";
458
+ pass: "pass";
459
+ }>;
460
+ failedGates: z.ZodArray<z.ZodEnum<{
461
+ "chain-integrity": "chain-integrity";
462
+ "minimum-duration": "minimum-duration";
463
+ "minimum-observations": "minimum-observations";
464
+ "opencode-pin": "opencode-pin";
465
+ "os-diversity": "os-diversity";
466
+ "zero-critical-divergence": "zero-critical-divergence";
467
+ "zero-duplicate-effect": "zero-duplicate-effect";
468
+ "zero-model-mismatch": "zero-model-mismatch";
469
+ "zero-privacy-breach": "zero-privacy-breach";
470
+ }>>;
471
+ ledgerDigest: z.ZodString;
472
+ digest: z.ZodString;
473
+ }, z.core.$strict>;
474
+ /** Certificado machine-readable del soak del grafo. */
475
+ export type GraphSoakCertificateV1 = z.infer<typeof SoakCertificateSchema>;
476
+ /** Motivo tipado por el que un certificado soak no es aceptable. */
477
+ export type SoakCertificateErrorCode = "invalid-certificate" | "policy-mismatch" | "verdict-mismatch" | "digest-mismatch" | "ledger-mismatch";
478
+ /** Error fail-closed del certificado soak. */
479
+ export declare class SoakCertificateError extends Error {
480
+ readonly code: SoakCertificateErrorCode;
481
+ readonly detail: string;
482
+ constructor(code: SoakCertificateErrorCode, detail: string);
483
+ }
484
+ /**
485
+ * Construye el certificado soak a partir de las cadenas de observación y la
486
+ * política operativa. El veredicto **no es un parámetro**: se deriva de las
487
+ * puertas evaluadas contra la política.
488
+ *
489
+ * La política se embebe en el certificado y se cubre por el digest — un
490
+ * certificado que no registra contra qué estándar se juzgó es infalsificable.
491
+ */
492
+ export declare function buildSoakCertificate(chains: readonly (readonly SoakObservation[])[], policy: SoakPolicy): GraphSoakCertificateV1;
493
+ /**
494
+ * Valida un certificado soak de procedencia no confiable. Fail-closed en
495
+ * todos los casos: esquema inválido → política divergente → veredicto
496
+ * incongruente → digest inválido → ledger incongruente.
497
+ *
498
+ * El llamante suministra la política que espera, exactamente como suministra
499
+ * `expectedLedgerDigest`. Si la política embebida diverge de la esperada, el
500
+ * certificado se rechaza con `policy-mismatch` — un veredicto `pass` bajo
501
+ * una política permisiva no satisface una política estricta.
502
+ */
503
+ export declare function parseSoakCertificate(value: unknown, expectedPolicy: SoakPolicy, expectedLedgerDigest: string): GraphSoakCertificateV1;
504
+ export {};
505
+ //# sourceMappingURL=certificate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"certificate.d.ts","sourceRoot":"","sources":["../../src/graph/certificate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,cAAc,CAAC;A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AAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,YAAY,IAAI,EAAE,wBAAwB,EAAE,MAAM,EAAE,MAAM,EAKzD;CACF;AAsID;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,CAAC,SAAS,eAAe,EAAE,CAAC,EAAE,EAC/C,MAAM,EAAE,UAAU,GACjB,sBAAsB,CAuBxB;AAuBD;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,EACd,cAAc,EAAE,UAAU,EAC1B,oBAAoB,EAAE,MAAM,GAC3B,sBAAsB,CAqDxB"}
@@ -1,5 +1,14 @@
1
+ import type { GraphSpecV1 } from "./schema";
1
2
  /** ID estable del efecto de un nodo, opcionalmente por revisión. */
2
3
  export declare function operationID(runID: string, nodeID: string, revision?: number): string;
3
4
  /** ID del intento `attempt` (>= 0) de una operación dada. */
4
5
  export declare function attemptID(operation: string, attempt: number): string;
6
+ /**
7
+ * Digest SHA-256 estable del spec compilado (reproducible).
8
+ *
9
+ * Vive junto a los IDs del grafo, no en el compilador SDD: el espejo shadow lo
10
+ * necesita y alcanzar el compilador arrastraría el coordinador, las sesiones y
11
+ * la telemetría —es decir, superficie de ejecución— al grafo del espejo.
12
+ */
13
+ export declare function graphSpecDigest(spec: GraphSpecV1): string;
5
14
  //# sourceMappingURL=ids.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../src/graph/ids.ts"],"names":[],"mappings":"AAYA,oEAAoE;AACpE,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,QAAQ,SAAI,GACX,MAAM,CAKR;AAED,6DAA6D;AAC7D,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEpE"}
1
+ {"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../src/graph/ids.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAY5C,oEAAoE;AACpE,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,QAAQ,SAAI,GACX,MAAM,CAKR;AAED,6DAA6D;AAC7D,wBAAgB,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEpE;AAqBD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAEzD"}
@@ -1 +1 @@
1
- {"version":3,"file":"privacyPolicy.d.ts","sourceRoot":"","sources":["../../src/graph/privacyPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,uEAAuE;AACvE,MAAM,MAAM,WAAW,GACnB,uBAAuB,GACvB,uBAAuB,GACvB,KAAK,CAAC;AAEV,oCAAoC;AACpC,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;AAE7C,kEAAkE;AAClE,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,MAAM,EAAE,MAAM;CAM3B;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,WAAW,GAChB,OAAO,CAET;AAED,uEAAuE;AACvE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC3C,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;CACtB,GAAG,IAAI,CAOP"}
1
+ {"version":3,"file":"privacyPolicy.d.ts","sourceRoot":"","sources":["../../src/graph/privacyPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,uEAAuE;AACvE,MAAM,MAAM,WAAW,GACnB,uBAAuB,GACvB,uBAAuB,GACvB,KAAK,CAAC;AAEV,oCAAoC;AACpC,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;AAE7C,kEAAkE;AAClE,qBAAa,kBAAmB,SAAQ,KAAK;IAC3C,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,YAAY,MAAM,EAAE,MAAM,EAKzB;CACF;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,WAAW,GAChB,OAAO,CAET;AAED,uEAAuE;AACvE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC3C,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;CACtB,GAAG,IAAI,CAOP"}
@@ -1 +1 @@
1
- {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../src/graph/reducer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAa,WAAW,EAAE,MAAM,UAAU,CAAC;AACrE,OAAO,EACL,KAAK,UAAU,EAGhB,MAAM,SAAS,CAAC;AAEjB;;;;;;;GAOG;AAEH,MAAM,MAAM,gBAAgB,GACxB,cAAc,GACd,eAAe,GACf,sBAAsB,GACtB,cAAc,GACd,0BAA0B,GAC1B,mBAAmB,GACnB,kBAAkB,GAClB,oBAAoB,GACpB,gBAAgB,CAAC;AAErB,2DAA2D;AAC3D,qBAAa,YAAa,SAAQ,KA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8E;AAC9E,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAEnD"}
@@ -1 +1 @@
1
- {"version":3,"file":"replay.d.ts","sourceRoot":"","sources":["../../src/graph/replay.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;;;GAMG;AAEH,yDAAyD;AACzD,qBAAa,WAAY,SAAQ,KAAK;IACpC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,MAAM,EAAE,MAAM;CAM3B;AAED,gEAAgE;AAChE,wBAAgB,MAAM,CACpB,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,UAAU,CASZ;AAED,0DAA0D;AAC1D,wBAAgB,UAAU,CACxB,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,MAAM,CAER"}
1
+ {"version":3,"file":"replay.d.ts","sourceRoot":"","sources":["../../src/graph/replay.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;;;GAMG;AAEH,yDAAyD;AACzD,qBAAa,WAAY,SAAQ,KAAK;IACpC,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,YAAY,MAAM,EAAE,MAAM,EAKzB;CACF;AAED,gEAAgE;AAChE,wBAAgB,MAAM,CACpB,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,UAAU,CASZ;AAED,0DAA0D;AAC1D,wBAAgB,UAAU,CACxB,IAAI,EAAE,WAAW,EACjB,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,MAAM,CAER"}