@ftai/dsh-plugin-acn 0.0.0-stage → 0.1.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 (276) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/LICENSE-APACHE +201 -0
  3. package/LICENSE-MIT +19 -0
  4. package/README.md +82 -2
  5. package/README_EN.md +83 -0
  6. package/cordis.patch.yml +29 -0
  7. package/docs/acn-compat.md +33 -0
  8. package/docs/architecture.md +130 -0
  9. package/docs/assets/acn-claim-reuse.png +0 -0
  10. package/docs/assets/activity-view.png +0 -0
  11. package/docs/assets/install-package.png +0 -0
  12. package/docs/assets/knowledge-model.png +0 -0
  13. package/docs/assets/knowledge-view.png +0 -0
  14. package/docs/assets/personal-configuration.png +0 -0
  15. package/docs/assets/session-upstream.png +0 -0
  16. package/docs/assets/upstream-settings.png +0 -0
  17. package/docs/assets/upstream-team.png +0 -0
  18. package/docs/command-reference.md +201 -0
  19. package/docs/config.md +253 -0
  20. package/docs/development.md +197 -0
  21. package/docs/dsh-compat.md +59 -0
  22. package/docs/index.md +16 -0
  23. package/docs/outstanding-issues.md +61 -0
  24. package/docs/user_guide.md +185 -0
  25. package/icon.svg +8 -0
  26. package/lib/activities-B8U-iW4-.js +407 -0
  27. package/lib/alignment-CwH0nBf-.js +80 -0
  28. package/lib/auth-DFI9yowX.js +71 -0
  29. package/lib/checkpoint-CPFPOxBM.js +188 -0
  30. package/lib/checkpoint-c7aI4D-X.js +318 -0
  31. package/lib/claim-DOAGe8ZK.js +168 -0
  32. package/lib/client.js +18417 -0
  33. package/lib/deliver-C-dmhkfm.js +168 -0
  34. package/lib/delivery-status-M7-Rwoyj.js +89 -0
  35. package/lib/dispute-CtrInHzf.js +20 -0
  36. package/lib/disputes-ByEmi43j.js +51 -0
  37. package/lib/dream-agent-BVqxbKFc.js +249 -0
  38. package/lib/dream.js +4 -0
  39. package/lib/effects-DX1iy6FM.js +268 -0
  40. package/lib/errors-Bp_2WXBr.js +19 -0
  41. package/lib/errors-pPumDOGD.js +18 -0
  42. package/lib/evidence-store-DW7kj20i.js +1030 -0
  43. package/lib/formation-D4LO31WW.js +187 -0
  44. package/lib/formation-replay-Bf4TSBiz.js +87 -0
  45. package/lib/formation.js +9 -0
  46. package/lib/history-DPMHX3ZE.js +214 -0
  47. package/lib/inbox-2CugZZQm.js +188 -0
  48. package/lib/inbox-DFtE2fOp.js +71 -0
  49. package/lib/inbox.js +3 -0
  50. package/lib/index.js +1373 -0
  51. package/lib/lock-DbmlKOoX.js +332 -0
  52. package/lib/pages-BEWC3kmZ.js +51 -0
  53. package/lib/paths-B7NI9Ano.js +157 -0
  54. package/lib/plugins/commands.js +590 -0
  55. package/lib/plugins/dream.js +66 -0
  56. package/lib/plugins/formation.js +66 -0
  57. package/lib/plugins/inbox.js +53 -0
  58. package/lib/plugins/knowledge.js +1109 -0
  59. package/lib/plugins/prompt.js +102 -0
  60. package/lib/plugins/tools.js +280 -0
  61. package/lib/policy-DnyHh7Bl.js +16 -0
  62. package/lib/prepare-CGXwBEcu.js +134 -0
  63. package/lib/protocol.js +8 -0
  64. package/lib/queue-M917xHPS.js +153 -0
  65. package/lib/regular-file-BFpqMoub.js +136 -0
  66. package/lib/render-CJaVcKKC.js +48 -0
  67. package/lib/reported-sets-DdEKdeVb.js +122 -0
  68. package/lib/revision-DeoL_IUN.js +11 -0
  69. package/lib/scheduler-BfJSY1eq.js +64 -0
  70. package/lib/service-BPwaZzFF.js +1106 -0
  71. package/lib/service-BQaszW_v.js +344 -0
  72. package/lib/service-BhniAHLo.js +305 -0
  73. package/lib/service-C2lXoygJ.js +505 -0
  74. package/lib/session-binding-zCSuizHs.js +342 -0
  75. package/lib/session-state-CYqUhC95.js +38 -0
  76. package/lib/sessions-C2xuPFQv.js +218 -0
  77. package/lib/store.js +16 -0
  78. package/lib/structured-C9byFuzm.js +453 -0
  79. package/lib/subagent-yJsFxHmH.js +9 -0
  80. package/lib/team.js +3 -0
  81. package/lib/tool-schema-3b4gH1zf.js +28 -0
  82. package/lib/trace-Da0RnL5R.js +14 -0
  83. package/lib/traces-CHBo8y1z.js +11 -0
  84. package/lib/types/activities.d.ts +73 -0
  85. package/lib/types/advanced-configuration.d.ts +11 -0
  86. package/lib/types/client/ActivityCard.d.ts +14 -0
  87. package/lib/types/client/ActivityDetails.d.ts +18 -0
  88. package/lib/types/client/AdvancedPreferences.d.ts +8 -0
  89. package/lib/types/client/BlankCommandFeedback.d.ts +10 -0
  90. package/lib/types/client/ComposerMenu.d.ts +24 -0
  91. package/lib/types/client/ConfigurationPage.d.ts +11 -0
  92. package/lib/types/client/ConnectionCheckDialog.d.ts +12 -0
  93. package/lib/types/client/KnowledgeDetail.d.ts +6 -0
  94. package/lib/types/client/KnowledgeDirectoryField.d.ts +11 -0
  95. package/lib/types/client/KnowledgePanel.d.ts +12 -0
  96. package/lib/types/client/KnowledgeReference.d.ts +13 -0
  97. package/lib/types/client/SessionToolbar.d.ts +16 -0
  98. package/lib/types/client/SettingsToast.d.ts +3 -0
  99. package/lib/types/client/SourceSessionLink.d.ts +16 -0
  100. package/lib/types/client/TeamCredentialField.d.ts +16 -0
  101. package/lib/types/client/TeamSettingsPage.d.ts +28 -0
  102. package/lib/types/client/configuration-errors.d.ts +2 -0
  103. package/lib/types/client/interaction-styles.d.ts +1 -0
  104. package/lib/types/client/interaction-ui.d.ts +30 -0
  105. package/lib/types/client/knowledge-labels.d.ts +5 -0
  106. package/lib/types/client/locales.d.ts +51 -0
  107. package/lib/types/commands/claim.d.ts +4 -0
  108. package/lib/types/commands/import.d.ts +10 -0
  109. package/lib/types/commands/status.d.ts +5 -0
  110. package/lib/types/config.d.ts +111 -0
  111. package/lib/types/configuration.d.ts +235 -0
  112. package/lib/types/credentials.d.ts +59 -0
  113. package/lib/types/dream/audit.d.ts +4 -0
  114. package/lib/types/dream/autonomous.d.ts +185 -0
  115. package/lib/types/dream/candidates.d.ts +34 -0
  116. package/lib/types/dream/checkpoint.d.ts +35 -0
  117. package/lib/types/dream/evidence-files.d.ts +10 -0
  118. package/lib/types/dream/evidence-store.d.ts +103 -0
  119. package/lib/types/dream/evidence.d.ts +30 -0
  120. package/lib/types/dream/index.d.ts +10 -0
  121. package/lib/types/dream/plan.d.ts +18 -0
  122. package/lib/types/dream/preservation.d.ts +6 -0
  123. package/lib/types/dream/review.d.ts +10 -0
  124. package/lib/types/dream/schema.d.ts +1475 -0
  125. package/lib/types/dream/service.d.ts +56 -0
  126. package/lib/types/dream/sync.d.ts +147 -0
  127. package/lib/types/dsh-adapter/configuration-remote.d.ts +1 -0
  128. package/lib/types/dsh-adapter/configuration-service.d.ts +28 -0
  129. package/lib/types/dsh-adapter/dream-agent.d.ts +4 -0
  130. package/lib/types/dsh-adapter/dream-evidence.d.ts +3 -0
  131. package/lib/types/dsh-adapter/formation-archive.d.ts +3 -0
  132. package/lib/types/dsh-adapter/formation-replay.d.ts +5 -0
  133. package/lib/types/dsh-adapter/formation.d.ts +4 -0
  134. package/lib/types/dsh-adapter/interaction-service.d.ts +13 -0
  135. package/lib/types/dsh-adapter/knowledge-paths.d.ts +3 -0
  136. package/lib/types/dsh-adapter/llm.d.ts +10 -0
  137. package/lib/types/dsh-adapter/project-upstream.d.ts +4 -0
  138. package/lib/types/dsh-adapter/runtime-pool.d.ts +110 -0
  139. package/lib/types/dsh-adapter/session-binding.d.ts +43 -0
  140. package/lib/types/dsh-adapter/source-sessions.d.ts +3 -0
  141. package/lib/types/dsh-adapter/team-credentials.d.ts +5 -0
  142. package/lib/types/dsh-adapter/tool-schema.d.ts +4 -0
  143. package/lib/types/dsh-adapter/tools.d.ts +5 -0
  144. package/lib/types/formation/capture.d.ts +19 -0
  145. package/lib/types/formation/checkpoint.d.ts +136 -0
  146. package/lib/types/formation/index.d.ts +10 -0
  147. package/lib/types/formation/prepare.d.ts +16 -0
  148. package/lib/types/formation/schema.d.ts +45 -0
  149. package/lib/types/formation/service.d.ts +58 -0
  150. package/lib/types/formation/transcript.d.ts +75 -0
  151. package/lib/types/formation/triggers.d.ts +3 -0
  152. package/lib/types/inbox/cascade.d.ts +3 -0
  153. package/lib/types/inbox/effects.d.ts +275 -0
  154. package/lib/types/inbox/index.d.ts +5 -0
  155. package/lib/types/inbox/prepare.d.ts +380 -0
  156. package/lib/types/inbox/service.d.ts +26 -0
  157. package/lib/types/inbox/sync.d.ts +9 -0
  158. package/lib/types/index.d.ts +1 -0
  159. package/lib/types/interaction-messages.d.ts +69 -0
  160. package/lib/types/interaction.d.ts +541 -0
  161. package/lib/types/knowledge/alignment.d.ts +49 -0
  162. package/lib/types/knowledge/catalog.d.ts +5 -0
  163. package/lib/types/knowledge/changes.d.ts +32 -0
  164. package/lib/types/knowledge/disputes.d.ts +3 -0
  165. package/lib/types/knowledge/errors.d.ts +9 -0
  166. package/lib/types/knowledge/ordering.d.ts +7 -0
  167. package/lib/types/knowledge/pages.d.ts +7 -0
  168. package/lib/types/knowledge/safety.d.ts +2 -0
  169. package/lib/types/knowledge/service.d.ts +52 -0
  170. package/lib/types/knowledge/sessions.d.ts +59 -0
  171. package/lib/types/knowledge/sources.d.ts +2 -0
  172. package/lib/types/knowledge/timestamps.d.ts +1 -0
  173. package/lib/types/knowledge/types.d.ts +84 -0
  174. package/lib/types/llm/response.d.ts +1 -0
  175. package/lib/types/llm/structured.d.ts +27 -0
  176. package/lib/types/local-name.d.ts +1 -0
  177. package/lib/types/plugins/client.d.ts +9 -0
  178. package/lib/types/plugins/commands.d.ts +11 -0
  179. package/lib/types/plugins/configuration.d.ts +8 -0
  180. package/lib/types/plugins/dream.d.ts +16 -0
  181. package/lib/types/plugins/formation.d.ts +16 -0
  182. package/lib/types/plugins/inbox.d.ts +16 -0
  183. package/lib/types/plugins/knowledge.d.ts +19 -0
  184. package/lib/types/plugins/prompt.d.ts +17 -0
  185. package/lib/types/plugins/tools.d.ts +10 -0
  186. package/lib/types/prompt/render.d.ts +2 -0
  187. package/lib/types/protocol/arbitration.d.ts +154 -0
  188. package/lib/types/protocol/auth.d.ts +31 -0
  189. package/lib/types/protocol/claim.d.ts +36 -0
  190. package/lib/types/protocol/dispute.d.ts +17 -0
  191. package/lib/types/protocol/ids.d.ts +20 -0
  192. package/lib/types/protocol/inbox.d.ts +141 -0
  193. package/lib/types/protocol/index.d.ts +11 -0
  194. package/lib/types/protocol/policy.d.ts +21 -0
  195. package/lib/types/protocol/revision.d.ts +2 -0
  196. package/lib/types/protocol/router.d.ts +114 -0
  197. package/lib/types/protocol/schema.d.ts +4 -0
  198. package/lib/types/protocol/time.d.ts +5 -0
  199. package/lib/types/protocol/trace.d.ts +11 -0
  200. package/lib/types/store/atomic.d.ts +8 -0
  201. package/lib/types/store/claim-edits.d.ts +33 -0
  202. package/lib/types/store/claims.d.ts +7 -0
  203. package/lib/types/store/context.d.ts +13 -0
  204. package/lib/types/store/delivery-status.d.ts +48 -0
  205. package/lib/types/store/disputes.d.ts +6 -0
  206. package/lib/types/store/entities.d.ts +16 -0
  207. package/lib/types/store/errors.d.ts +8 -0
  208. package/lib/types/store/history.d.ts +65 -0
  209. package/lib/types/store/inbox.d.ts +27 -0
  210. package/lib/types/store/index.d.ts +16 -0
  211. package/lib/types/store/jobs.d.ts +5 -0
  212. package/lib/types/store/library-directory.d.ts +4 -0
  213. package/lib/types/store/lock.d.ts +11 -0
  214. package/lib/types/store/path-names.d.ts +2 -0
  215. package/lib/types/store/paths.d.ts +45 -0
  216. package/lib/types/store/presentation.d.ts +13 -0
  217. package/lib/types/store/regular-file.d.ts +2 -0
  218. package/lib/types/store/rejected-disputes.d.ts +18 -0
  219. package/lib/types/store/rename.d.ts +1 -0
  220. package/lib/types/store/reported-sets.d.ts +24 -0
  221. package/lib/types/store/session-state.d.ts +17 -0
  222. package/lib/types/store/traces.d.ts +6 -0
  223. package/lib/types/store/uploads.d.ts +312 -0
  224. package/lib/types/store/yaml.d.ts +8 -0
  225. package/lib/types/team/errors.d.ts +10 -0
  226. package/lib/types/team/http.d.ts +20 -0
  227. package/lib/types/team/index.d.ts +5 -0
  228. package/lib/types/team/maintainer-client.d.ts +18 -0
  229. package/lib/types/team/router-client.d.ts +14 -0
  230. package/lib/types/team/service.d.ts +28 -0
  231. package/lib/types/team/system-proxy.d.ts +9 -0
  232. package/lib/types/tools/claim.d.ts +63 -0
  233. package/lib/types/tools/consult-router.d.ts +11 -0
  234. package/lib/types/tools/subagent.d.ts +8 -0
  235. package/lib/types/tools/validation.d.ts +2 -0
  236. package/lib/types/upload/consolidation.d.ts +63 -0
  237. package/lib/types/upload/deliver.d.ts +15 -0
  238. package/lib/types/upload/index.d.ts +2 -0
  239. package/lib/types/upload/scheduler.d.ts +19 -0
  240. package/lib/types/upstreams.d.ts +5 -0
  241. package/lib/types/worker/queue.d.ts +17 -0
  242. package/lib/types/worker/types.d.ts +51 -0
  243. package/lib/types/worker/worker.d.ts +39 -0
  244. package/lib/types-C2ST2Zdg.js +17 -0
  245. package/lib/upload.js +3 -0
  246. package/lib/uploads-BCA2p92b.js +210 -0
  247. package/lib/upstreams-DEi-56tD.js +495 -0
  248. package/lib/worker-HMGzJFWd.js +185 -0
  249. package/locale/commands/en.json +1 -0
  250. package/locale/commands/zh.json +1 -0
  251. package/locale/dream/en.json +1 -0
  252. package/locale/dream/zh.json +1 -0
  253. package/locale/en.json +7 -0
  254. package/locale/formation/en.json +1 -0
  255. package/locale/formation/zh.json +1 -0
  256. package/locale/inbox/en.json +1 -0
  257. package/locale/inbox/zh.json +1 -0
  258. package/locale/knowledge/en.json +1 -0
  259. package/locale/knowledge/zh.json +1 -0
  260. package/locale/prompt/en.json +1 -0
  261. package/locale/prompt/zh.json +1 -0
  262. package/locale/tools/en.json +1 -0
  263. package/locale/tools/zh.json +1 -0
  264. package/locale/zh.json +7 -0
  265. package/package.json +262 -3
  266. package/prompts/claim_dream.j2 +77 -0
  267. package/prompts/claim_dream_legacy.j2 +63 -0
  268. package/prompts/dream_compaction.j2 +11 -0
  269. package/prompts/dream_evidence.j2 +5 -0
  270. package/prompts/inbox_claim_attribute_update_internalize.j2 +112 -0
  271. package/prompts/inbox_policy_update_internalize.j2 +87 -0
  272. package/prompts/knowledge.j2 +38 -0
  273. package/prompts/session_recap.j2 +113 -0
  274. package/prompts/what_is_claim.j2 +51 -0
  275. package/prompts/what_is_dispute.j2 +21 -0
  276. package/prompts/what_is_policy.j2 +22 -0
@@ -0,0 +1,235 @@
1
+ import { z } from 'zod';
2
+ export declare const ConfigurationValuesSchema: z.ZodObject<{
3
+ agentId: z.ZodString;
4
+ home: z.ZodString;
5
+ provider: z.ZodString;
6
+ model: z.ZodString;
7
+ mode: z.ZodEnum<{
8
+ team: "team";
9
+ solo: "solo";
10
+ }>;
11
+ routerEndpoint: z.ZodString;
12
+ maintainerEndpoint: z.ZodString;
13
+ keyEnv: z.ZodString;
14
+ timeoutMs: z.ZodNumber;
15
+ legacyEnabled: z.ZodOptional<z.ZodBoolean>;
16
+ connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
17
+ id: z.ZodString;
18
+ name: z.ZodString;
19
+ enabled: z.ZodDefault<z.ZodBoolean>;
20
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
21
+ routerEndpoint: z.ZodString;
22
+ maintainerEndpoint: z.ZodString;
23
+ keyEnv: z.ZodDefault<z.ZodString>;
24
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
25
+ }, z.core.$strict>>>;
26
+ defaultConnection: z.ZodOptional<z.ZodString>;
27
+ showCompletion: z.ZodOptional<z.ZodBoolean>;
28
+ upstream: z.ZodOptional<z.ZodString>;
29
+ upstreams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
30
+ name: z.ZodDefault<z.ZodString>;
31
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
32
+ enabled: z.ZodDefault<z.ZodBoolean>;
33
+ routerEndpoint: z.ZodDefault<z.ZodString>;
34
+ maintainerEndpoint: z.ZodDefault<z.ZodString>;
35
+ keyEnv: z.ZodDefault<z.ZodString>;
36
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
37
+ }, z.core.$strict>>>;
38
+ advanced: z.ZodOptional<z.ZodObject<{
39
+ inboxProcessingStaleAfterSecs: z.ZodNumber;
40
+ routerQueryTimeoutSecs: z.ZodNumber;
41
+ httpTimeoutSecs: z.ZodNumber;
42
+ httpRetryCount: z.ZodNumber;
43
+ httpRetryBaseDelayMs: z.ZodNumber;
44
+ httpRetryMaxDelayMs: z.ZodNumber;
45
+ }, z.core.$strict>>;
46
+ }, z.core.$strict>;
47
+ export type ConfigurationValues = z.infer<typeof ConfigurationValuesSchema>;
48
+ export declare const ModelChoiceSchema: z.ZodObject<{
49
+ provider: z.ZodString;
50
+ providerName: z.ZodString;
51
+ id: z.ZodString;
52
+ name: z.ZodString;
53
+ }, z.core.$strict>;
54
+ export type ModelChoice = z.infer<typeof ModelChoiceSchema>;
55
+ export declare const ConfigurationSnapshotSchema: z.ZodObject<{
56
+ revision: z.ZodString;
57
+ values: z.ZodObject<{
58
+ agentId: z.ZodString;
59
+ home: z.ZodString;
60
+ provider: z.ZodString;
61
+ model: z.ZodString;
62
+ mode: z.ZodEnum<{
63
+ team: "team";
64
+ solo: "solo";
65
+ }>;
66
+ routerEndpoint: z.ZodString;
67
+ maintainerEndpoint: z.ZodString;
68
+ keyEnv: z.ZodString;
69
+ timeoutMs: z.ZodNumber;
70
+ legacyEnabled: z.ZodOptional<z.ZodBoolean>;
71
+ connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
72
+ id: z.ZodString;
73
+ name: z.ZodString;
74
+ enabled: z.ZodDefault<z.ZodBoolean>;
75
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
76
+ routerEndpoint: z.ZodString;
77
+ maintainerEndpoint: z.ZodString;
78
+ keyEnv: z.ZodDefault<z.ZodString>;
79
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
80
+ }, z.core.$strict>>>;
81
+ defaultConnection: z.ZodOptional<z.ZodString>;
82
+ showCompletion: z.ZodOptional<z.ZodBoolean>;
83
+ upstream: z.ZodOptional<z.ZodString>;
84
+ upstreams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
85
+ name: z.ZodDefault<z.ZodString>;
86
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
87
+ enabled: z.ZodDefault<z.ZodBoolean>;
88
+ routerEndpoint: z.ZodDefault<z.ZodString>;
89
+ maintainerEndpoint: z.ZodDefault<z.ZodString>;
90
+ keyEnv: z.ZodDefault<z.ZodString>;
91
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
92
+ }, z.core.$strict>>>;
93
+ advanced: z.ZodOptional<z.ZodObject<{
94
+ inboxProcessingStaleAfterSecs: z.ZodNumber;
95
+ routerQueryTimeoutSecs: z.ZodNumber;
96
+ httpTimeoutSecs: z.ZodNumber;
97
+ httpRetryCount: z.ZodNumber;
98
+ httpRetryBaseDelayMs: z.ZodNumber;
99
+ httpRetryMaxDelayMs: z.ZodNumber;
100
+ }, z.core.$strict>>;
101
+ }, z.core.$strict>;
102
+ models: z.ZodArray<z.ZodObject<{
103
+ provider: z.ZodString;
104
+ providerName: z.ZodString;
105
+ id: z.ZodString;
106
+ name: z.ZodString;
107
+ }, z.core.$strict>>;
108
+ active: z.ZodBoolean;
109
+ dataDirectory: z.ZodString;
110
+ upstreamPending: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodNumber>>>;
111
+ }, z.core.$strict>;
112
+ export type ConfigurationSnapshot = z.infer<typeof ConfigurationSnapshotSchema>;
113
+ export declare const SaveConfigurationSchema: z.ZodObject<{
114
+ revision: z.ZodString;
115
+ values: z.ZodObject<{
116
+ agentId: z.ZodString;
117
+ home: z.ZodString;
118
+ provider: z.ZodString;
119
+ model: z.ZodString;
120
+ mode: z.ZodEnum<{
121
+ team: "team";
122
+ solo: "solo";
123
+ }>;
124
+ routerEndpoint: z.ZodString;
125
+ maintainerEndpoint: z.ZodString;
126
+ keyEnv: z.ZodString;
127
+ timeoutMs: z.ZodNumber;
128
+ legacyEnabled: z.ZodOptional<z.ZodBoolean>;
129
+ connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
130
+ id: z.ZodString;
131
+ name: z.ZodString;
132
+ enabled: z.ZodDefault<z.ZodBoolean>;
133
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
134
+ routerEndpoint: z.ZodString;
135
+ maintainerEndpoint: z.ZodString;
136
+ keyEnv: z.ZodDefault<z.ZodString>;
137
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
138
+ }, z.core.$strict>>>;
139
+ defaultConnection: z.ZodOptional<z.ZodString>;
140
+ showCompletion: z.ZodOptional<z.ZodBoolean>;
141
+ upstream: z.ZodOptional<z.ZodString>;
142
+ upstreams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
143
+ name: z.ZodDefault<z.ZodString>;
144
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
145
+ enabled: z.ZodDefault<z.ZodBoolean>;
146
+ routerEndpoint: z.ZodDefault<z.ZodString>;
147
+ maintainerEndpoint: z.ZodDefault<z.ZodString>;
148
+ keyEnv: z.ZodDefault<z.ZodString>;
149
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
150
+ }, z.core.$strict>>>;
151
+ advanced: z.ZodOptional<z.ZodObject<{
152
+ inboxProcessingStaleAfterSecs: z.ZodNumber;
153
+ routerQueryTimeoutSecs: z.ZodNumber;
154
+ httpTimeoutSecs: z.ZodNumber;
155
+ httpRetryCount: z.ZodNumber;
156
+ httpRetryBaseDelayMs: z.ZodNumber;
157
+ httpRetryMaxDelayMs: z.ZodNumber;
158
+ }, z.core.$strict>>;
159
+ }, z.core.$strict>;
160
+ }, z.core.$strict>;
161
+ export type SaveConfiguration = z.infer<typeof SaveConfigurationSchema>;
162
+ export declare const ConfigurationResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
163
+ ok: z.ZodLiteral<true>;
164
+ snapshot: z.ZodObject<{
165
+ revision: z.ZodString;
166
+ values: z.ZodObject<{
167
+ agentId: z.ZodString;
168
+ home: z.ZodString;
169
+ provider: z.ZodString;
170
+ model: z.ZodString;
171
+ mode: z.ZodEnum<{
172
+ team: "team";
173
+ solo: "solo";
174
+ }>;
175
+ routerEndpoint: z.ZodString;
176
+ maintainerEndpoint: z.ZodString;
177
+ keyEnv: z.ZodString;
178
+ timeoutMs: z.ZodNumber;
179
+ legacyEnabled: z.ZodOptional<z.ZodBoolean>;
180
+ connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
181
+ id: z.ZodString;
182
+ name: z.ZodString;
183
+ enabled: z.ZodDefault<z.ZodBoolean>;
184
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
185
+ routerEndpoint: z.ZodString;
186
+ maintainerEndpoint: z.ZodString;
187
+ keyEnv: z.ZodDefault<z.ZodString>;
188
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
189
+ }, z.core.$strict>>>;
190
+ defaultConnection: z.ZodOptional<z.ZodString>;
191
+ showCompletion: z.ZodOptional<z.ZodBoolean>;
192
+ upstream: z.ZodOptional<z.ZodString>;
193
+ upstreams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
194
+ name: z.ZodDefault<z.ZodString>;
195
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
196
+ enabled: z.ZodDefault<z.ZodBoolean>;
197
+ routerEndpoint: z.ZodDefault<z.ZodString>;
198
+ maintainerEndpoint: z.ZodDefault<z.ZodString>;
199
+ keyEnv: z.ZodDefault<z.ZodString>;
200
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
201
+ }, z.core.$strict>>>;
202
+ advanced: z.ZodOptional<z.ZodObject<{
203
+ inboxProcessingStaleAfterSecs: z.ZodNumber;
204
+ routerQueryTimeoutSecs: z.ZodNumber;
205
+ httpTimeoutSecs: z.ZodNumber;
206
+ httpRetryCount: z.ZodNumber;
207
+ httpRetryBaseDelayMs: z.ZodNumber;
208
+ httpRetryMaxDelayMs: z.ZodNumber;
209
+ }, z.core.$strict>>;
210
+ }, z.core.$strict>;
211
+ models: z.ZodArray<z.ZodObject<{
212
+ provider: z.ZodString;
213
+ providerName: z.ZodString;
214
+ id: z.ZodString;
215
+ name: z.ZodString;
216
+ }, z.core.$strict>>;
217
+ active: z.ZodBoolean;
218
+ dataDirectory: z.ZodString;
219
+ upstreamPending: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodNumber>>>;
220
+ }, z.core.$strict>;
221
+ }, z.core.$strict>, z.ZodObject<{
222
+ ok: z.ZodLiteral<false>;
223
+ code: z.ZodEnum<{
224
+ conflict: "conflict";
225
+ invalid: "invalid";
226
+ unavailable: "unavailable";
227
+ persistence: "persistence";
228
+ inactive: "inactive";
229
+ busy: "busy";
230
+ }>;
231
+ fields: z.ZodArray<z.ZodString>;
232
+ }, z.core.$strict>], "ok">;
233
+ export type ConfigurationResult = z.infer<typeof ConfigurationResultSchema>;
234
+ export declare function configurationValues(raw: unknown): ConfigurationValues;
235
+ export declare function mergeConfiguration(raw: Record<string, unknown>, values: ConfigurationValues): Record<string, unknown>;
@@ -0,0 +1,59 @@
1
+ import { z } from 'zod';
2
+ export declare const CredentialRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
3
+ action: z.ZodLiteral<"describe">;
4
+ reference: z.ZodString;
5
+ }, z.core.$strict>, z.ZodObject<{
6
+ action: z.ZodLiteral<"store">;
7
+ reference: z.ZodString;
8
+ value: z.ZodString;
9
+ }, z.core.$strict>, z.ZodObject<{
10
+ action: z.ZodLiteral<"discard">;
11
+ reference: z.ZodString;
12
+ }, z.core.$strict>, z.ZodObject<{
13
+ action: z.ZodLiteral<"check">;
14
+ connection: z.ZodUnion<readonly [z.ZodObject<{
15
+ id: z.ZodString;
16
+ name: z.ZodString;
17
+ enabled: z.ZodDefault<z.ZodBoolean>;
18
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
19
+ routerEndpoint: z.ZodString;
20
+ maintainerEndpoint: z.ZodString;
21
+ keyEnv: z.ZodDefault<z.ZodString>;
22
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
23
+ }, z.core.$strict>, z.ZodObject<{
24
+ name: z.ZodDefault<z.ZodString>;
25
+ agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
26
+ enabled: z.ZodDefault<z.ZodBoolean>;
27
+ routerEndpoint: z.ZodDefault<z.ZodString>;
28
+ maintainerEndpoint: z.ZodDefault<z.ZodString>;
29
+ keyEnv: z.ZodDefault<z.ZodString>;
30
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
31
+ id: z.ZodOptional<z.ZodString>;
32
+ }, z.core.$strict>]>;
33
+ value: z.ZodString;
34
+ }, z.core.$strict>], "action">;
35
+ export type CredentialRequest = z.input<typeof CredentialRequestSchema>;
36
+ export declare const CredentialResultSchema: z.ZodObject<{
37
+ ok: z.ZodBoolean;
38
+ message: z.ZodString;
39
+ messageInfo: z.ZodOptional<z.ZodObject<{
40
+ code: z.ZodString;
41
+ count: z.ZodOptional<z.ZodNumber>;
42
+ entityId: z.ZodOptional<z.ZodString>;
43
+ status: z.ZodOptional<z.ZodNumber>;
44
+ }, z.core.$strip>>;
45
+ configured: z.ZodOptional<z.ZodBoolean>;
46
+ writable: z.ZodOptional<z.ZodBoolean>;
47
+ checks: z.ZodOptional<z.ZodArray<z.ZodObject<{
48
+ service: z.ZodEnum<{
49
+ router: "router";
50
+ maintainer: "maintainer";
51
+ }>;
52
+ state: z.ZodEnum<{
53
+ failed: "failed";
54
+ ok: "ok";
55
+ }>;
56
+ message: z.ZodString;
57
+ }, z.core.$strip>>>;
58
+ }, z.core.$strict>;
59
+ export type CredentialResult = z.infer<typeof CredentialResultSchema>;
@@ -0,0 +1,4 @@
1
+ import type { StoreContext } from '../store/context.js';
2
+ import type { Checkpoint, Progress } from './schema.js';
3
+ export declare function executionAudit(context: StoreContext, jobId: string, checkpoint: Checkpoint): Promise<void>;
4
+ export declare function jobReport(context: StoreContext, jobId: string, progress: Progress, coverage: unknown, records: readonly Checkpoint[]): Promise<void>;
@@ -0,0 +1,185 @@
1
+ import { z } from 'zod';
2
+ import type { AcnKnowledge } from '../knowledge/service.js';
3
+ import type { Job } from '../worker/types.js';
4
+ import type { JobControl } from '../worker/worker.js';
5
+ import type { Progress } from './schema.js';
6
+ export declare const DreamTools: {
7
+ dream_record_candidates: z.ZodObject<{
8
+ candidates: z.ZodArray<z.ZodObject<{
9
+ group_id: z.ZodString;
10
+ claim_ids: z.ZodArray<z.core.$ZodBranded<z.ZodString, "ClaimId", "out">>;
11
+ kind: z.ZodEnum<{
12
+ quality: "quality";
13
+ evidence: "evidence";
14
+ consolidation: "consolidation";
15
+ }>;
16
+ reason: z.ZodString;
17
+ }, z.core.$strict>>;
18
+ }, z.core.$strict>;
19
+ dream_stage_group: z.ZodObject<{
20
+ group: z.ZodNullable<z.ZodObject<{
21
+ kind: z.ZodEnum<{
22
+ quality: "quality";
23
+ evidence: "evidence";
24
+ consolidation: "consolidation";
25
+ }>;
26
+ reason: z.ZodString;
27
+ evidence_ids: z.ZodDefault<z.ZodArray<z.ZodString>>;
28
+ coverage: z.ZodDefault<z.ZodArray<z.ZodObject<{
29
+ input_id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
30
+ output_ids: z.ZodArray<z.core.$ZodBranded<z.ZodString, "ClaimId", "out">>;
31
+ note: z.ZodString;
32
+ }, z.core.$strict>>>;
33
+ change_basis: z.ZodDefault<z.ZodArray<z.ZodObject<{
34
+ claim_id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
35
+ removed_or_changed: z.ZodString;
36
+ added: z.ZodString;
37
+ justification: z.ZodString;
38
+ evidence_ids: z.ZodArray<z.ZodString>;
39
+ }, z.core.$strict>>>;
40
+ operations: z.ZodArray<z.ZodObject<{
41
+ id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
42
+ action: z.ZodEnum<{
43
+ keep: "keep";
44
+ update: "update";
45
+ deprecate: "deprecate";
46
+ }>;
47
+ changes: z.ZodDefault<z.ZodObject<{
48
+ name: z.ZodOptional<z.ZodString>;
49
+ statement: z.ZodOptional<z.ZodString>;
50
+ scope: z.ZodOptional<z.ZodString>;
51
+ confidence: z.ZodOptional<z.ZodEnum<{
52
+ high: "high";
53
+ medium: "medium";
54
+ low: "low";
55
+ }>>;
56
+ status: z.ZodOptional<z.ZodEnum<{
57
+ active: "active";
58
+ stale: "stale";
59
+ deprecated: "deprecated";
60
+ }>>;
61
+ source_claim_ids: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.core.$ZodBranded<z.ZodString, "ClaimId", "out">, z.core.$ZodBranded<z.ZodString, "PolicyId", "out">]>>>;
62
+ evidence_summary: z.ZodOptional<z.ZodString>;
63
+ }, z.core.$strict>>;
64
+ reason: z.ZodOptional<z.ZodString>;
65
+ }, z.core.$strict>>;
66
+ }, z.core.$strict>>;
67
+ group_id: z.ZodString;
68
+ }, z.core.$strict>;
69
+ dream_validate: z.ZodObject<{
70
+ group_id: z.ZodString;
71
+ }, z.core.$strict>;
72
+ dream_apply_group: z.ZodObject<{
73
+ validation_id: z.ZodString;
74
+ review: z.ZodObject<{
75
+ claims: z.ZodArray<z.ZodObject<{
76
+ claim_id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
77
+ final_name: z.ZodDefault<z.ZodString>;
78
+ name_reason: z.ZodDefault<z.ZodString>;
79
+ information_preserved: z.ZodString;
80
+ removal_or_correction: z.ZodString;
81
+ factual_correction: z.ZodBoolean;
82
+ output_ids: z.ZodArray<z.core.$ZodBranded<z.ZodString, "ClaimId", "out">>;
83
+ evidence_ids: z.ZodArray<z.ZodString>;
84
+ }, z.core.$strict>>;
85
+ scope_and_certainty: z.ZodString;
86
+ }, z.core.$strict>;
87
+ group_id: z.ZodString;
88
+ }, z.core.$strict>;
89
+ dream_keep_candidate: z.ZodObject<{
90
+ reason_kind: z.ZodEnum<{
91
+ insufficient_evidence: "insufficient_evidence";
92
+ useful_knowledge: "useful_knowledge";
93
+ uncertain_preservation: "uncertain_preservation";
94
+ no_consolidation_benefit: "no_consolidation_benefit";
95
+ external_change: "external_change";
96
+ }>;
97
+ reason: z.ZodString;
98
+ group_id: z.ZodString;
99
+ }, z.core.$strict>;
100
+ dream_read_draft: z.ZodObject<{
101
+ group_id: z.ZodOptional<z.ZodString>;
102
+ }, z.core.$strict>;
103
+ dream_read_history: z.ZodObject<{
104
+ offset: z.ZodDefault<z.ZodNumber>;
105
+ limit: z.ZodDefault<z.ZodNumber>;
106
+ }, z.core.$strict>;
107
+ dream_review_sync: z.ZodObject<{
108
+ source_id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
109
+ carrier_ids: z.ZodArray<z.core.$ZodBranded<z.ZodString, "ClaimId", "out">>;
110
+ validation_id: z.ZodOptional<z.ZodString>;
111
+ review: z.ZodOptional<z.ZodObject<{
112
+ claims: z.ZodArray<z.ZodObject<{
113
+ claim_id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
114
+ final_name: z.ZodDefault<z.ZodString>;
115
+ name_reason: z.ZodDefault<z.ZodString>;
116
+ information_preserved: z.ZodString;
117
+ removal_or_correction: z.ZodString;
118
+ factual_correction: z.ZodBoolean;
119
+ output_ids: z.ZodArray<z.core.$ZodBranded<z.ZodString, "ClaimId", "out">>;
120
+ evidence_ids: z.ZodArray<z.ZodString>;
121
+ }, z.core.$strict>>;
122
+ scope_and_certainty: z.ZodString;
123
+ }, z.core.$strict>>;
124
+ }, z.core.$strict>;
125
+ dream_finish: z.ZodObject<{
126
+ review: z.ZodObject<{
127
+ quality: z.ZodString;
128
+ evidence: z.ZodString;
129
+ consolidation: z.ZodString;
130
+ }, z.core.$strict>;
131
+ }, z.core.$strict>;
132
+ read_claim: z.ZodObject<{
133
+ id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
134
+ }, z.core.$strict>;
135
+ read_trace: z.ZodObject<{
136
+ claim_id: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "ClaimId", "out">>;
137
+ trace_id: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "TraceId", "out">>;
138
+ id: z.ZodOptional<z.core.$ZodBranded<z.ZodString, "TraceId", "out">>;
139
+ offset: z.ZodDefault<z.ZodNumber>;
140
+ limit: z.ZodOptional<z.ZodNumber>;
141
+ }, z.core.$strict>;
142
+ file_read: z.ZodObject<{
143
+ path: z.ZodString;
144
+ claim_ids: z.ZodArray<z.core.$ZodBranded<z.ZodString, "ClaimId", "out">>;
145
+ start: z.ZodDefault<z.ZodNumber>;
146
+ count: z.ZodDefault<z.ZodNumber>;
147
+ }, z.core.$strict>;
148
+ file_glob: z.ZodObject<{
149
+ query: z.ZodDefault<z.ZodString>;
150
+ }, z.core.$strict>;
151
+ file_grep: z.ZodObject<{
152
+ query: z.ZodString;
153
+ }, z.core.$strict>;
154
+ };
155
+ export type DreamTool = keyof typeof DreamTools;
156
+ export declare const isDreamTool: (name: string) => name is DreamTool;
157
+ export declare class DreamSession {
158
+ readonly knowledge: AcnKnowledge;
159
+ readonly job: Job;
160
+ readonly control: JobControl;
161
+ readonly progress: Progress;
162
+ private readonly claims;
163
+ private readonly originalHigh;
164
+ readonly workspace: string;
165
+ private readonly boundary;
166
+ private pending;
167
+ private constructor();
168
+ static create(knowledge: AcnKnowledge, job: Job, control: JobControl, boundary: () => Promise<void>): Promise<DreamSession>;
169
+ get finished(): boolean;
170
+ get exhausted(): boolean;
171
+ get wrappingUp(): boolean;
172
+ budgetNotice(): string;
173
+ admitStep(signal?: AbortSignal): Promise<void>;
174
+ finishBudget(signal?: AbortSignal): Promise<void>;
175
+ private finish;
176
+ private save;
177
+ private current;
178
+ private readable;
179
+ private candidateProgress;
180
+ input(): Promise<object>;
181
+ private evidenceState;
182
+ private register;
183
+ execute(name: DreamTool, args: unknown, signal?: AbortSignal): Promise<unknown>;
184
+ private dispatch;
185
+ }
@@ -0,0 +1,34 @@
1
+ import type { Claim } from '../protocol/claim.js';
2
+ import type { AgentId } from '../protocol/ids.js';
3
+ import type { ResolvedConfig } from '../config.js';
4
+ import type { z } from 'zod';
5
+ import type { DreamStateSchema } from './schema.js';
6
+ export declare const INPUT_TOKENS = 64000;
7
+ export declare function conservativeTokens(text: string): number;
8
+ export declare function claimInput(claims: readonly Claim[], budget?: number): {
9
+ loaded: {
10
+ id: string & z.core.$brand<"ClaimId">;
11
+ name: string;
12
+ statement: string;
13
+ scope: string;
14
+ holder: string & z.core.$brand<"AgentId">;
15
+ confidence: "high" | "medium" | "low";
16
+ status: "active" | "stale" | "deprecated";
17
+ created_at: string;
18
+ source_claim_ids: ((string & z.core.$brand<"ClaimId">) | (string & z.core.$brand<"PolicyId">))[];
19
+ evidence_summary: string;
20
+ updated_at?: string | undefined;
21
+ }[];
22
+ coverage: {
23
+ total: number;
24
+ included: number;
25
+ omitted: number;
26
+ order: string;
27
+ estimated_tokens: number;
28
+ budget_tokens: number;
29
+ };
30
+ };
31
+ export declare function versions(claims: readonly Claim[]): {
32
+ [k: string]: string;
33
+ };
34
+ export declare function dreamEligible(config: ResolvedConfig['dream'], state: z.infer<typeof DreamStateSchema>, claims: readonly Claim[], owner: AgentId, manual: boolean, now?: number): boolean;
@@ -0,0 +1,35 @@
1
+ import { z } from 'zod';
2
+ import type { StoreContext } from '../store/context.js';
3
+ import type { JobControl } from '../worker/worker.js';
4
+ import type { Checkpoint, Group, OriginSchema as OriginType, Progress, SemanticReview, SelfReview, Validation } from './schema.js';
5
+ type Origin = z.infer<typeof OriginType>;
6
+ export declare class DreamStore {
7
+ readonly context: StoreContext;
8
+ private readonly settleRegular?;
9
+ constructor(context: StoreContext, settleRegular?: (() => Promise<void>) | undefined);
10
+ state(): Promise<{
11
+ last_success_at: string | null;
12
+ last_input_snapshot_at: string | null;
13
+ known_versions: Record<string & z.core.$brand<"ClaimId">, string>;
14
+ }>;
15
+ origin(jobId: string): Promise<Origin | null>;
16
+ progress(jobId: string): Promise<Progress | null>;
17
+ final(jobId: string): Promise<Checkpoint | null>;
18
+ saveOrigin(jobId: string, origin: Origin): Promise<void>;
19
+ saveProgress(jobId: string, progress: Progress): Promise<void>;
20
+ report(jobId: string, progress: Progress): Promise<void>;
21
+ records(jobId: string): Promise<{
22
+ path: string;
23
+ checkpoint: Checkpoint;
24
+ }[]>;
25
+ private jobs;
26
+ private pending;
27
+ private unfinished;
28
+ recover(): Promise<void>;
29
+ recoverLocked(): Promise<void>;
30
+ commitGroup(jobId: string, groupId: string, group: Group, validation: Validation, semantic: SemanticReview, selfReview: SelfReview | null, control: JobControl): Promise<Checkpoint>;
31
+ finish(jobId: string, progress: Progress, control: JobControl): Promise<Checkpoint>;
32
+ private applyLocked;
33
+ archive(jobId: string, key: string, value: unknown): Promise<void>;
34
+ }
35
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { Receipt } from './evidence.js';
2
+ export declare const within: (root: string, path: string) => boolean;
3
+ export declare function authorizeFile(workspace: string, privateHome: string, input: string): Promise<string>;
4
+ export declare function readEvidenceFile(workspace: string, privateHome: string, input: string, maxBytes: number): Promise<{
5
+ path: string;
6
+ content: string;
7
+ revision: Receipt['output']['file_version']['revision'];
8
+ }>;
9
+ export declare function receiptCurrent(receipt: Receipt, workspace: string, privateHome: string): Promise<boolean>;
10
+ export declare function discoverable(name: string): boolean;
@@ -0,0 +1,103 @@
1
+ import { z } from 'zod';
2
+ import type { ResolvedConfig } from '../config.js';
3
+ import type { StoreContext } from '../store/context.js';
4
+ import type { Claim } from '../protocol/claim.js';
5
+ import { type Receipts } from './evidence.js';
6
+ export declare const ReadArgs: z.ZodObject<{
7
+ path: z.ZodString;
8
+ claim_ids: z.ZodArray<z.core.$ZodBranded<z.ZodString, "ClaimId", "out">>;
9
+ start: z.ZodDefault<z.ZodNumber>;
10
+ count: z.ZodDefault<z.ZodNumber>;
11
+ }, z.core.$strict>;
12
+ export declare const GlobArgs: z.ZodObject<{
13
+ query: z.ZodDefault<z.ZodString>;
14
+ }, z.core.$strict>;
15
+ export declare const GrepArgs: z.ZodObject<{
16
+ query: z.ZodString;
17
+ }, z.core.$strict>;
18
+ export declare const ClaimArgs: z.ZodDiscriminatedUnion<[z.ZodObject<{
19
+ action: z.ZodLiteral<"list">;
20
+ }, z.core.$strict>, z.ZodObject<{
21
+ action: z.ZodLiteral<"read">;
22
+ id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
23
+ }, z.core.$strict>], "action">;
24
+ export declare const EvidenceTools: {
25
+ read: z.ZodObject<{
26
+ path: z.ZodString;
27
+ claim_ids: z.ZodArray<z.core.$ZodBranded<z.ZodString, "ClaimId", "out">>;
28
+ start: z.ZodDefault<z.ZodNumber>;
29
+ count: z.ZodDefault<z.ZodNumber>;
30
+ }, z.core.$strict>;
31
+ glob: z.ZodObject<{
32
+ query: z.ZodDefault<z.ZodString>;
33
+ }, z.core.$strict>;
34
+ grep: z.ZodObject<{
35
+ query: z.ZodString;
36
+ }, z.core.$strict>;
37
+ claim: z.ZodDiscriminatedUnion<[z.ZodObject<{
38
+ action: z.ZodLiteral<"list">;
39
+ }, z.core.$strict>, z.ZodObject<{
40
+ action: z.ZodLiteral<"read">;
41
+ id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
42
+ }, z.core.$strict>], "action">;
43
+ };
44
+ export type EvidenceTool = keyof typeof EvidenceTools;
45
+ export declare const EvidenceManifestSchema: z.ZodObject<{
46
+ schemaVersion: z.ZodLiteral<1>;
47
+ job_id: z.ZodString;
48
+ group_id: z.ZodString;
49
+ workspace_root: z.ZodString;
50
+ claim_versions: z.ZodRecord<z.core.$ZodBranded<z.ZodString, "ClaimId", "out">, z.ZodString>;
51
+ receipts: z.ZodRecord<z.ZodString, z.ZodObject<{
52
+ tool: z.ZodLiteral<"file_read">;
53
+ input: z.ZodObject<{
54
+ path: z.ZodString;
55
+ claim_ids: z.ZodOptional<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ClaimId", "out">>>;
56
+ show_linenos: z.ZodOptional<z.ZodBoolean>;
57
+ }, z.core.$loose>;
58
+ output: z.ZodObject<{
59
+ content: z.ZodString;
60
+ page: z.ZodOptional<z.ZodObject<{
61
+ returned_start: z.ZodNumber;
62
+ returned_end: z.ZodNumber;
63
+ }, z.core.$loose>>;
64
+ file_version: z.ZodObject<{
65
+ path: z.ZodString;
66
+ revision: z.ZodObject<{
67
+ sha256: z.ZodString;
68
+ byte_len: z.ZodNumber;
69
+ }, z.core.$strict>;
70
+ }, z.core.$strip>;
71
+ }, z.core.$loose>;
72
+ }, z.core.$loose>>;
73
+ calls: z.ZodNumber;
74
+ model_steps: z.ZodNumber;
75
+ bytes_read: z.ZodNumber;
76
+ files_examined: z.ZodNumber;
77
+ limits: z.ZodObject<{
78
+ calls: z.ZodNumber;
79
+ steps: z.ZodNumber;
80
+ bytes: z.ZodNumber;
81
+ chars: z.ZodNumber;
82
+ files: z.ZodNumber;
83
+ }, z.core.$strict>;
84
+ completed: z.ZodBoolean;
85
+ }, z.core.$strict>;
86
+ export type EvidenceManifest = z.infer<typeof EvidenceManifestSchema>;
87
+ export declare const privateDataHome: (context: StoreContext) => string;
88
+ export declare class EvidenceStore {
89
+ readonly context: StoreContext;
90
+ readonly jobId: string;
91
+ readonly groupId: string;
92
+ readonly path: string;
93
+ constructor(context: StoreContext, jobId: string, groupId: string);
94
+ read(): Promise<EvidenceManifest | null>;
95
+ private save;
96
+ initialize(workspace: string, claims: readonly Claim[], config: ResolvedConfig['dream'], signal?: AbortSignal): Promise<EvidenceManifest>;
97
+ admitStep(signal: AbortSignal): Promise<void>;
98
+ reopen(signal: AbortSignal): Promise<void>;
99
+ complete(signal: AbortSignal): Promise<void>;
100
+ current(manifest: EvidenceManifest): Promise<boolean>;
101
+ authorize(receipts: Receipts, workspace: string | undefined, before: readonly Claim[]): Promise<boolean>;
102
+ execute(name: EvidenceTool, args: unknown, claims: readonly Claim[], signal: AbortSignal): Promise<z.infer<ReturnType<typeof z.json>>>;
103
+ }