clinkx 1.1.0 → 1.1.2

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 (162) hide show
  1. package/CHANGELOG.md +39 -1
  2. package/README.md +210 -177
  3. package/clinkx-workflows/dist/architecture-comparison/admission.d.ts +5 -0
  4. package/clinkx-workflows/dist/architecture-comparison/admission.js +50 -0
  5. package/clinkx-workflows/dist/architecture-comparison/admission.js.map +1 -0
  6. package/clinkx-workflows/dist/architecture-comparison/contract.d.ts +995 -0
  7. package/clinkx-workflows/dist/architecture-comparison/contract.js +149 -0
  8. package/clinkx-workflows/dist/architecture-comparison/contract.js.map +1 -0
  9. package/clinkx-workflows/dist/architecture-comparison/runtime.d.ts +29 -0
  10. package/clinkx-workflows/dist/architecture-comparison/runtime.js +387 -0
  11. package/clinkx-workflows/dist/architecture-comparison/runtime.js.map +1 -0
  12. package/clinkx-workflows/dist/contained-file.js +1 -1
  13. package/clinkx-workflows/dist/contained-file.js.map +1 -1
  14. package/clinkx-workflows/dist/council-execution-policy.d.ts +4 -2
  15. package/clinkx-workflows/dist/council-execution-policy.js +5 -1
  16. package/clinkx-workflows/dist/council-execution-policy.js.map +1 -1
  17. package/clinkx-workflows/dist/dashboard/activity-contract.d.ts +72 -72
  18. package/clinkx-workflows/dist/dashboard/contracts.d.ts +1564 -122
  19. package/clinkx-workflows/dist/dashboard/contracts.js +4 -0
  20. package/clinkx-workflows/dist/dashboard/contracts.js.map +1 -1
  21. package/clinkx-workflows/dist/dashboard/progress-report-contract.d.ts +12 -12
  22. package/clinkx-workflows/dist/dashboard/progress-report-status-overlay.d.ts +8 -8
  23. package/clinkx-workflows/dist/dashboard/scanner.d.ts +3 -0
  24. package/clinkx-workflows/dist/dashboard/scanner.js +27 -0
  25. package/clinkx-workflows/dist/dashboard/scanner.js.map +1 -1
  26. package/clinkx-workflows/dist/dashboard/session-log-contract.d.ts +48 -48
  27. package/clinkx-workflows/dist/dashboard/session-log-redaction.d.ts +2 -0
  28. package/clinkx-workflows/dist/dashboard/session-log-redaction.js +4 -0
  29. package/clinkx-workflows/dist/dashboard/session-log-redaction.js.map +1 -1
  30. package/clinkx-workflows/dist/dashboard/verified-repair-contract.d.ts +191 -0
  31. package/clinkx-workflows/dist/dashboard/verified-repair-contract.js +28 -0
  32. package/clinkx-workflows/dist/dashboard/verified-repair-contract.js.map +1 -0
  33. package/clinkx-workflows/dist/dashboard-ui/assets/index-BdpmbPps.js +115 -0
  34. package/clinkx-workflows/dist/dashboard-ui/assets/style-Im5i1iAs.css +1 -0
  35. package/clinkx-workflows/dist/dashboard-ui/index.html +2 -2
  36. package/clinkx-workflows/dist/engine.d.ts +6 -0
  37. package/clinkx-workflows/dist/engine.js +78 -7
  38. package/clinkx-workflows/dist/engine.js.map +1 -1
  39. package/clinkx-workflows/dist/index.d.ts +3 -0
  40. package/clinkx-workflows/dist/index.js +3 -2
  41. package/clinkx-workflows/dist/index.js.map +1 -1
  42. package/clinkx-workflows/dist/reducers/index.d.ts +9 -1
  43. package/clinkx-workflows/dist/reducers/index.js +22 -0
  44. package/clinkx-workflows/dist/reducers/index.js.map +1 -1
  45. package/clinkx-workflows/dist/state.js +17 -7
  46. package/clinkx-workflows/dist/state.js.map +1 -1
  47. package/clinkx-workflows/dist/validators/architecture-comparison.d.ts +2 -0
  48. package/clinkx-workflows/dist/validators/architecture-comparison.js +12 -0
  49. package/clinkx-workflows/dist/validators/architecture-comparison.js.map +1 -0
  50. package/clinkx-workflows/dist/validators/index.js +4 -0
  51. package/clinkx-workflows/dist/validators/index.js.map +1 -1
  52. package/clinkx-workflows/dist/validators/verified-repair.d.ts +2 -0
  53. package/clinkx-workflows/dist/validators/verified-repair.js +12 -0
  54. package/clinkx-workflows/dist/validators/verified-repair.js.map +1 -0
  55. package/clinkx-workflows/dist/verification-proof.d.ts +254 -0
  56. package/clinkx-workflows/dist/verification-proof.js +195 -0
  57. package/clinkx-workflows/dist/verification-proof.js.map +1 -0
  58. package/clinkx-workflows/dist/verified-repair/admission.d.ts +72 -0
  59. package/clinkx-workflows/dist/verified-repair/admission.js +63 -0
  60. package/clinkx-workflows/dist/verified-repair/admission.js.map +1 -0
  61. package/clinkx-workflows/dist/verified-repair/contract.d.ts +1910 -0
  62. package/clinkx-workflows/dist/verified-repair/contract.js +127 -0
  63. package/clinkx-workflows/dist/verified-repair/contract.js.map +1 -0
  64. package/clinkx-workflows/dist/verified-repair/host.d.ts +32 -0
  65. package/clinkx-workflows/dist/verified-repair/host.js +2 -0
  66. package/clinkx-workflows/dist/verified-repair/host.js.map +1 -0
  67. package/clinkx-workflows/dist/verified-repair/prompts.d.ts +12 -0
  68. package/clinkx-workflows/dist/verified-repair/prompts.js +58 -0
  69. package/clinkx-workflows/dist/verified-repair/prompts.js.map +1 -0
  70. package/clinkx-workflows/dist/verified-repair/result.d.ts +16 -0
  71. package/clinkx-workflows/dist/verified-repair/result.js +102 -0
  72. package/clinkx-workflows/dist/verified-repair/result.js.map +1 -0
  73. package/clinkx-workflows/dist/verified-repair/runtime.d.ts +28 -0
  74. package/clinkx-workflows/dist/verified-repair/runtime.js +186 -0
  75. package/clinkx-workflows/dist/verified-repair/runtime.js.map +1 -0
  76. package/clinkx-workflows/dist/workflow-tools.d.ts +3 -0
  77. package/clinkx-workflows/dist/workflow-tools.js +148 -14
  78. package/clinkx-workflows/dist/workflow-tools.js.map +1 -1
  79. package/clinkx-workflows/dist/workflow-verification-contract.d.ts +539 -0
  80. package/clinkx-workflows/dist/workflow-verification-contract.js +52 -0
  81. package/clinkx-workflows/dist/workflow-verification-contract.js.map +1 -0
  82. package/clinkx-workflows/dist/workflow-verification.d.ts +15 -0
  83. package/clinkx-workflows/dist/workflow-verification.js +218 -0
  84. package/clinkx-workflows/dist/workflow-verification.js.map +1 -0
  85. package/clinkx-workflows/templates/architecture-comparison/candidate.txt +29 -0
  86. package/clinkx-workflows/templates/architecture-comparison/judge.txt +31 -0
  87. package/clinkx-workflows/templates/verified-repair/investigate.txt +20 -0
  88. package/clinkx-workflows/templates/verified-repair/repair.txt +11 -0
  89. package/clinkx-workflows/templates/verified-repair/review.txt +18 -0
  90. package/clinkx-workflows/workflows/architecture-comparison.yaml +133 -0
  91. package/clinkx-workflows/workflows/verified-repair.yaml +104 -0
  92. package/dist/allowed-roots.js +4 -1
  93. package/dist/allowed-roots.js.map +1 -1
  94. package/dist/codex/app-server-client.d.ts +1 -0
  95. package/dist/codex/app-server-client.js +3 -2
  96. package/dist/codex/app-server-client.js.map +1 -1
  97. package/dist/context-builder/diagnostics.d.ts +1 -0
  98. package/dist/context-builder/diagnostics.js +1 -1
  99. package/dist/context-builder/diagnostics.js.map +1 -1
  100. package/dist/context-builder/discovery.d.ts +18 -1
  101. package/dist/context-builder/discovery.js +69 -1
  102. package/dist/context-builder/discovery.js.map +1 -1
  103. package/dist/context-builder/handler.js +8 -1
  104. package/dist/context-builder/handler.js.map +1 -1
  105. package/dist/context-builder/lifecycle-contract.d.ts +24 -24
  106. package/dist/context-builder/refine-handler.js +16 -1
  107. package/dist/context-builder/refine-handler.js.map +1 -1
  108. package/dist/context-builder/secrets.d.ts +11 -0
  109. package/dist/context-builder/secrets.js +81 -1
  110. package/dist/context-builder/secrets.js.map +1 -1
  111. package/dist/context-builder/versions.d.ts +5 -2
  112. package/dist/context-builder/versions.js +5 -2
  113. package/dist/context-builder/versions.js.map +1 -1
  114. package/dist/dashboard-cli.js +10 -3
  115. package/dist/dashboard-cli.js.map +1 -1
  116. package/dist/dashboard-gateway/main.js +8 -3
  117. package/dist/dashboard-gateway/main.js.map +1 -1
  118. package/dist/index.d.ts +2 -0
  119. package/dist/index.js +8 -2
  120. package/dist/index.js.map +1 -1
  121. package/dist/project-verification/contract.d.ts +537 -0
  122. package/dist/project-verification/contract.js +40 -0
  123. package/dist/project-verification/contract.js.map +1 -0
  124. package/dist/project-verification/files.d.ts +23 -0
  125. package/dist/project-verification/files.js +80 -0
  126. package/dist/project-verification/files.js.map +1 -0
  127. package/dist/project-verification/process.d.ts +7 -0
  128. package/dist/project-verification/process.js +115 -0
  129. package/dist/project-verification/process.js.map +1 -0
  130. package/dist/project-verification/runner.d.ts +35 -0
  131. package/dist/project-verification/runner.js +185 -0
  132. package/dist/project-verification/runner.js.map +1 -0
  133. package/dist/project-verification/service.d.ts +37 -0
  134. package/dist/project-verification/service.js +151 -0
  135. package/dist/project-verification/service.js.map +1 -0
  136. package/dist/provider-doctor.d.ts +22 -0
  137. package/dist/provider-doctor.js +22 -0
  138. package/dist/provider-doctor.js.map +1 -0
  139. package/dist/server.js +29 -1
  140. package/dist/server.js.map +1 -1
  141. package/dist/verification-tools.d.ts +90 -0
  142. package/dist/verification-tools.js +120 -0
  143. package/dist/verification-tools.js.map +1 -0
  144. package/dist/verified-repair/files.d.ts +22 -0
  145. package/dist/verified-repair/files.js +114 -0
  146. package/dist/verified-repair/files.js.map +1 -0
  147. package/dist/verified-repair/host.d.ts +14 -0
  148. package/dist/verified-repair/host.js +612 -0
  149. package/dist/verified-repair/host.js.map +1 -0
  150. package/docs/configuration.md +493 -0
  151. package/docs/engineering-recipes.md +415 -0
  152. package/docs/security.md +293 -0
  153. package/docs/verification/README.md +59 -0
  154. package/docs/verification/dashboard-real-disk.md +436 -0
  155. package/docs/verification/project-checks.example.json +14 -0
  156. package/docs/verification/project-checks.md +444 -0
  157. package/docs/verification/workflow-handoff.md +113 -0
  158. package/package.json +13 -6
  159. package/scripts/provider-doctor-core.mjs +364 -0
  160. package/scripts/provider-doctor-probe.mjs +34 -0
  161. package/clinkx-workflows/dist/dashboard-ui/assets/index-JPHQVtn9.js +0 -106
  162. package/clinkx-workflows/dist/dashboard-ui/assets/style-DOMHk-j6.css +0 -1
@@ -171,14 +171,14 @@ declare const NormalizedEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"kind"
171
171
  summary: z.ZodString;
172
172
  }, "strict", z.ZodTypeAny, {
173
173
  summary: string;
174
- kind: "tool_result";
175
174
  outcome: "succeeded" | "failed" | "cancelled";
175
+ kind: "tool_result";
176
176
  callId: string;
177
177
  toolName: string;
178
178
  }, {
179
179
  summary: string;
180
- kind: "tool_result";
181
180
  outcome: "succeeded" | "failed" | "cancelled";
181
+ kind: "tool_result";
182
182
  callId: string;
183
183
  toolName: string;
184
184
  }>, z.ZodObject<{
@@ -227,10 +227,10 @@ declare const NormalizedEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"kind"
227
227
  kind: z.ZodLiteral<"lifecycle">;
228
228
  state: z.ZodEnum<["pending", "queued", "resolving", "running", "parsing", "awaiting_approval", "succeeded", "partial", "failed", "cancelled", "interrupted", "timeout", "completed"]>;
229
229
  }, "strict", z.ZodTypeAny, {
230
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
230
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
231
231
  kind: "lifecycle";
232
232
  }, {
233
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
233
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
234
234
  kind: "lifecycle";
235
235
  }>, z.ZodObject<{
236
236
  kind: z.ZodLiteral<"usage">;
@@ -294,8 +294,8 @@ declare const NormalizedEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"kind"
294
294
  } | undefined;
295
295
  } | {
296
296
  summary: string;
297
- kind: "tool_result";
298
297
  outcome: "succeeded" | "failed" | "cancelled";
298
+ kind: "tool_result";
299
299
  callId: string;
300
300
  toolName: string;
301
301
  } | {
@@ -313,7 +313,7 @@ declare const NormalizedEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"kind"
313
313
  kind: "error";
314
314
  retryable: boolean;
315
315
  } | {
316
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
316
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
317
317
  kind: "lifecycle";
318
318
  } | {
319
319
  kind: "usage";
@@ -347,8 +347,8 @@ declare const NormalizedEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"kind"
347
347
  } | undefined;
348
348
  } | {
349
349
  summary: string;
350
- kind: "tool_result";
351
350
  outcome: "succeeded" | "failed" | "cancelled";
351
+ kind: "tool_result";
352
352
  callId: string;
353
353
  toolName: string;
354
354
  } | {
@@ -366,7 +366,7 @@ declare const NormalizedEventSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"kind"
366
366
  kind: "error";
367
367
  retryable: boolean;
368
368
  } | {
369
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
369
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
370
370
  kind: "lifecycle";
371
371
  } | {
372
372
  kind: "usage";
@@ -597,14 +597,14 @@ declare const SessionLogEventV1Schema: z.ZodEffects<z.ZodObject<{
597
597
  summary: z.ZodString;
598
598
  }, "strict", z.ZodTypeAny, {
599
599
  summary: string;
600
- kind: "tool_result";
601
600
  outcome: "succeeded" | "failed" | "cancelled";
601
+ kind: "tool_result";
602
602
  callId: string;
603
603
  toolName: string;
604
604
  }, {
605
605
  summary: string;
606
- kind: "tool_result";
607
606
  outcome: "succeeded" | "failed" | "cancelled";
607
+ kind: "tool_result";
608
608
  callId: string;
609
609
  toolName: string;
610
610
  }>, z.ZodObject<{
@@ -653,10 +653,10 @@ declare const SessionLogEventV1Schema: z.ZodEffects<z.ZodObject<{
653
653
  kind: z.ZodLiteral<"lifecycle">;
654
654
  state: z.ZodEnum<["pending", "queued", "resolving", "running", "parsing", "awaiting_approval", "succeeded", "partial", "failed", "cancelled", "interrupted", "timeout", "completed"]>;
655
655
  }, "strict", z.ZodTypeAny, {
656
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
656
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
657
657
  kind: "lifecycle";
658
658
  }, {
659
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
659
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
660
660
  kind: "lifecycle";
661
661
  }>, z.ZodObject<{
662
662
  kind: z.ZodLiteral<"usage">;
@@ -720,8 +720,8 @@ declare const SessionLogEventV1Schema: z.ZodEffects<z.ZodObject<{
720
720
  } | undefined;
721
721
  } | {
722
722
  summary: string;
723
- kind: "tool_result";
724
723
  outcome: "succeeded" | "failed" | "cancelled";
724
+ kind: "tool_result";
725
725
  callId: string;
726
726
  toolName: string;
727
727
  } | {
@@ -739,7 +739,7 @@ declare const SessionLogEventV1Schema: z.ZodEffects<z.ZodObject<{
739
739
  kind: "error";
740
740
  retryable: boolean;
741
741
  } | {
742
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
742
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
743
743
  kind: "lifecycle";
744
744
  } | {
745
745
  kind: "usage";
@@ -773,8 +773,8 @@ declare const SessionLogEventV1Schema: z.ZodEffects<z.ZodObject<{
773
773
  } | undefined;
774
774
  } | {
775
775
  summary: string;
776
- kind: "tool_result";
777
776
  outcome: "succeeded" | "failed" | "cancelled";
777
+ kind: "tool_result";
778
778
  callId: string;
779
779
  toolName: string;
780
780
  } | {
@@ -792,7 +792,7 @@ declare const SessionLogEventV1Schema: z.ZodEffects<z.ZodObject<{
792
792
  kind: "error";
793
793
  retryable: boolean;
794
794
  } | {
795
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
795
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
796
796
  kind: "lifecycle";
797
797
  } | {
798
798
  kind: "usage";
@@ -867,8 +867,8 @@ declare const SessionLogEventV1Schema: z.ZodEffects<z.ZodObject<{
867
867
  } | undefined;
868
868
  } | {
869
869
  summary: string;
870
- kind: "tool_result";
871
870
  outcome: "succeeded" | "failed" | "cancelled";
871
+ kind: "tool_result";
872
872
  callId: string;
873
873
  toolName: string;
874
874
  } | {
@@ -886,7 +886,7 @@ declare const SessionLogEventV1Schema: z.ZodEffects<z.ZodObject<{
886
886
  kind: "error";
887
887
  retryable: boolean;
888
888
  } | {
889
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
889
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
890
890
  kind: "lifecycle";
891
891
  } | {
892
892
  kind: "usage";
@@ -961,8 +961,8 @@ declare const SessionLogEventV1Schema: z.ZodEffects<z.ZodObject<{
961
961
  } | undefined;
962
962
  } | {
963
963
  summary: string;
964
- kind: "tool_result";
965
964
  outcome: "succeeded" | "failed" | "cancelled";
965
+ kind: "tool_result";
966
966
  callId: string;
967
967
  toolName: string;
968
968
  } | {
@@ -980,7 +980,7 @@ declare const SessionLogEventV1Schema: z.ZodEffects<z.ZodObject<{
980
980
  kind: "error";
981
981
  retryable: boolean;
982
982
  } | {
983
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
983
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
984
984
  kind: "lifecycle";
985
985
  } | {
986
986
  kind: "usage";
@@ -1055,8 +1055,8 @@ declare const SessionLogEventV1Schema: z.ZodEffects<z.ZodObject<{
1055
1055
  } | undefined;
1056
1056
  } | {
1057
1057
  summary: string;
1058
- kind: "tool_result";
1059
1058
  outcome: "succeeded" | "failed" | "cancelled";
1059
+ kind: "tool_result";
1060
1060
  callId: string;
1061
1061
  toolName: string;
1062
1062
  } | {
@@ -1074,7 +1074,7 @@ declare const SessionLogEventV1Schema: z.ZodEffects<z.ZodObject<{
1074
1074
  kind: "error";
1075
1075
  retryable: boolean;
1076
1076
  } | {
1077
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
1077
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
1078
1078
  kind: "lifecycle";
1079
1079
  } | {
1080
1080
  kind: "usage";
@@ -1149,8 +1149,8 @@ declare const SessionLogEventV1Schema: z.ZodEffects<z.ZodObject<{
1149
1149
  } | undefined;
1150
1150
  } | {
1151
1151
  summary: string;
1152
- kind: "tool_result";
1153
1152
  outcome: "succeeded" | "failed" | "cancelled";
1153
+ kind: "tool_result";
1154
1154
  callId: string;
1155
1155
  toolName: string;
1156
1156
  } | {
@@ -1168,7 +1168,7 @@ declare const SessionLogEventV1Schema: z.ZodEffects<z.ZodObject<{
1168
1168
  kind: "error";
1169
1169
  retryable: boolean;
1170
1170
  } | {
1171
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
1171
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
1172
1172
  kind: "lifecycle";
1173
1173
  } | {
1174
1174
  kind: "usage";
@@ -1605,14 +1605,14 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
1605
1605
  summary: z.ZodString;
1606
1606
  }, "strict", z.ZodTypeAny, {
1607
1607
  summary: string;
1608
- kind: "tool_result";
1609
1608
  outcome: "succeeded" | "failed" | "cancelled";
1609
+ kind: "tool_result";
1610
1610
  callId: string;
1611
1611
  toolName: string;
1612
1612
  }, {
1613
1613
  summary: string;
1614
- kind: "tool_result";
1615
1614
  outcome: "succeeded" | "failed" | "cancelled";
1615
+ kind: "tool_result";
1616
1616
  callId: string;
1617
1617
  toolName: string;
1618
1618
  }>, z.ZodObject<{
@@ -1661,10 +1661,10 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
1661
1661
  kind: z.ZodLiteral<"lifecycle">;
1662
1662
  state: z.ZodEnum<["pending", "queued", "resolving", "running", "parsing", "awaiting_approval", "succeeded", "partial", "failed", "cancelled", "interrupted", "timeout", "completed"]>;
1663
1663
  }, "strict", z.ZodTypeAny, {
1664
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
1664
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
1665
1665
  kind: "lifecycle";
1666
1666
  }, {
1667
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
1667
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
1668
1668
  kind: "lifecycle";
1669
1669
  }>, z.ZodObject<{
1670
1670
  kind: z.ZodLiteral<"usage">;
@@ -1728,8 +1728,8 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
1728
1728
  } | undefined;
1729
1729
  } | {
1730
1730
  summary: string;
1731
- kind: "tool_result";
1732
1731
  outcome: "succeeded" | "failed" | "cancelled";
1732
+ kind: "tool_result";
1733
1733
  callId: string;
1734
1734
  toolName: string;
1735
1735
  } | {
@@ -1747,7 +1747,7 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
1747
1747
  kind: "error";
1748
1748
  retryable: boolean;
1749
1749
  } | {
1750
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
1750
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
1751
1751
  kind: "lifecycle";
1752
1752
  } | {
1753
1753
  kind: "usage";
@@ -1781,8 +1781,8 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
1781
1781
  } | undefined;
1782
1782
  } | {
1783
1783
  summary: string;
1784
- kind: "tool_result";
1785
1784
  outcome: "succeeded" | "failed" | "cancelled";
1785
+ kind: "tool_result";
1786
1786
  callId: string;
1787
1787
  toolName: string;
1788
1788
  } | {
@@ -1800,7 +1800,7 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
1800
1800
  kind: "error";
1801
1801
  retryable: boolean;
1802
1802
  } | {
1803
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
1803
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
1804
1804
  kind: "lifecycle";
1805
1805
  } | {
1806
1806
  kind: "usage";
@@ -1875,8 +1875,8 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
1875
1875
  } | undefined;
1876
1876
  } | {
1877
1877
  summary: string;
1878
- kind: "tool_result";
1879
1878
  outcome: "succeeded" | "failed" | "cancelled";
1879
+ kind: "tool_result";
1880
1880
  callId: string;
1881
1881
  toolName: string;
1882
1882
  } | {
@@ -1894,7 +1894,7 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
1894
1894
  kind: "error";
1895
1895
  retryable: boolean;
1896
1896
  } | {
1897
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
1897
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
1898
1898
  kind: "lifecycle";
1899
1899
  } | {
1900
1900
  kind: "usage";
@@ -1969,8 +1969,8 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
1969
1969
  } | undefined;
1970
1970
  } | {
1971
1971
  summary: string;
1972
- kind: "tool_result";
1973
1972
  outcome: "succeeded" | "failed" | "cancelled";
1973
+ kind: "tool_result";
1974
1974
  callId: string;
1975
1975
  toolName: string;
1976
1976
  } | {
@@ -1988,7 +1988,7 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
1988
1988
  kind: "error";
1989
1989
  retryable: boolean;
1990
1990
  } | {
1991
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
1991
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
1992
1992
  kind: "lifecycle";
1993
1993
  } | {
1994
1994
  kind: "usage";
@@ -2063,8 +2063,8 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
2063
2063
  } | undefined;
2064
2064
  } | {
2065
2065
  summary: string;
2066
- kind: "tool_result";
2067
2066
  outcome: "succeeded" | "failed" | "cancelled";
2067
+ kind: "tool_result";
2068
2068
  callId: string;
2069
2069
  toolName: string;
2070
2070
  } | {
@@ -2082,7 +2082,7 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
2082
2082
  kind: "error";
2083
2083
  retryable: boolean;
2084
2084
  } | {
2085
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
2085
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
2086
2086
  kind: "lifecycle";
2087
2087
  } | {
2088
2088
  kind: "usage";
@@ -2157,8 +2157,8 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
2157
2157
  } | undefined;
2158
2158
  } | {
2159
2159
  summary: string;
2160
- kind: "tool_result";
2161
2160
  outcome: "succeeded" | "failed" | "cancelled";
2161
+ kind: "tool_result";
2162
2162
  callId: string;
2163
2163
  toolName: string;
2164
2164
  } | {
@@ -2176,7 +2176,7 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
2176
2176
  kind: "error";
2177
2177
  retryable: boolean;
2178
2178
  } | {
2179
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
2179
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
2180
2180
  kind: "lifecycle";
2181
2181
  } | {
2182
2182
  kind: "usage";
@@ -2298,8 +2298,8 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
2298
2298
  } | undefined;
2299
2299
  } | {
2300
2300
  summary: string;
2301
- kind: "tool_result";
2302
2301
  outcome: "succeeded" | "failed" | "cancelled";
2302
+ kind: "tool_result";
2303
2303
  callId: string;
2304
2304
  toolName: string;
2305
2305
  } | {
@@ -2317,7 +2317,7 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
2317
2317
  kind: "error";
2318
2318
  retryable: boolean;
2319
2319
  } | {
2320
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
2320
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
2321
2321
  kind: "lifecycle";
2322
2322
  } | {
2323
2323
  kind: "usage";
@@ -2439,8 +2439,8 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
2439
2439
  } | undefined;
2440
2440
  } | {
2441
2441
  summary: string;
2442
- kind: "tool_result";
2443
2442
  outcome: "succeeded" | "failed" | "cancelled";
2443
+ kind: "tool_result";
2444
2444
  callId: string;
2445
2445
  toolName: string;
2446
2446
  } | {
@@ -2458,7 +2458,7 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
2458
2458
  kind: "error";
2459
2459
  retryable: boolean;
2460
2460
  } | {
2461
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
2461
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
2462
2462
  kind: "lifecycle";
2463
2463
  } | {
2464
2464
  kind: "usage";
@@ -2580,8 +2580,8 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
2580
2580
  } | undefined;
2581
2581
  } | {
2582
2582
  summary: string;
2583
- kind: "tool_result";
2584
2583
  outcome: "succeeded" | "failed" | "cancelled";
2584
+ kind: "tool_result";
2585
2585
  callId: string;
2586
2586
  toolName: string;
2587
2587
  } | {
@@ -2599,7 +2599,7 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
2599
2599
  kind: "error";
2600
2600
  retryable: boolean;
2601
2601
  } | {
2602
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
2602
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
2603
2603
  kind: "lifecycle";
2604
2604
  } | {
2605
2605
  kind: "usage";
@@ -2721,8 +2721,8 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
2721
2721
  } | undefined;
2722
2722
  } | {
2723
2723
  summary: string;
2724
- kind: "tool_result";
2725
2724
  outcome: "succeeded" | "failed" | "cancelled";
2725
+ kind: "tool_result";
2726
2726
  callId: string;
2727
2727
  toolName: string;
2728
2728
  } | {
@@ -2740,7 +2740,7 @@ declare const SessionLogPageV1Schema: z.ZodEffects<z.ZodObject<{
2740
2740
  kind: "error";
2741
2741
  retryable: boolean;
2742
2742
  } | {
2743
- state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "parsing" | "queued" | "awaiting_approval" | "interrupted";
2743
+ state: "partial" | "pending" | "running" | "succeeded" | "failed" | "cancelled" | "resolving" | "completed" | "timeout" | "interrupted" | "parsing" | "queued" | "awaiting_approval";
2744
2744
  kind: "lifecycle";
2745
2745
  } | {
2746
2746
  kind: "usage";
@@ -1,4 +1,6 @@
1
1
  import type { SessionLogEventV1, SessionLogNormalizedEventV1 } from "./session-log-contract.js";
2
+ /** Credential token shapes only; owner paths and ordinary prose are not credentials. */
3
+ export declare function hasCredentialTokenShape(value: string): boolean;
2
4
  export type PreparedSessionLogEventV1 = Readonly<{
3
5
  event: Readonly<SessionLogNormalizedEventV1>;
4
6
  redaction: Readonly<SessionLogEventV1["redaction"]>;
@@ -20,6 +20,10 @@ const SHELL_DELIMITER_PATTERN = /[\s;|&]/;
20
20
  const POSIX_USER_HOME_PATTERN = /\/(?:Users|home)\/[^/\s"'`<>]+/g;
21
21
  const ROOT_USER_HOME_PATTERN = /\/root(?=\/|[\s"'`<>]|$)/g;
22
22
  const WINDOWS_USER_HOME_PATTERN = /\b[A-Za-z]:\\Users\\[^\\/\s"'`<>]+/gi;
23
+ /** Credential token shapes only; owner paths and ordinary prose are not credentials. */
24
+ export function hasCredentialTokenShape(value) {
25
+ return PRIVATE_KEY_SIGNAL_PATTERN.test(value) || [VENDOR_TOKEN_PATTERN, JWT_PATTERN, BEARER_PATTERN].some((pattern) => new RegExp(pattern.source, pattern.flags.replace("g", "")).test(value));
26
+ }
23
27
  function isSensitiveKey(key) {
24
28
  const normalized = key.toLowerCase().replace(/[-_ ]+/g, "_");
25
29
  return SENSITIVE_KEY_PATTERN.test(normalized) || /(?:^|_)(?:token|secret|password|api_key|secret_access_key)$/.test(normalized);