@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,45 @@
1
+ export declare function expandHomePath(home: string): string;
2
+ export declare function agentHomePath(home: string, agentId: string, upstream?: string): string;
3
+ export declare function safeKey(value: string): string;
4
+ export declare class AgentPaths {
5
+ readonly root: string;
6
+ constructor(agentHome: string);
7
+ get claims(): string;
8
+ get traces(): string;
9
+ get disputes(): string;
10
+ get inbox(): string;
11
+ get uploads(): string;
12
+ get pendingUploads(): string;
13
+ get pendingUploadsLock(): string;
14
+ get rejectedDisputes(): string;
15
+ get deliveryStatus(): string;
16
+ get deliveryLock(): string;
17
+ get knowledgeLock(): string;
18
+ get claimEditPending(): string;
19
+ get reportedSets(): string;
20
+ get jobs(): string;
21
+ get workerLock(): string;
22
+ get jobQueueLock(): string;
23
+ get sessions(): string;
24
+ get lastRoute(): string;
25
+ get dreamWorkspace(): string;
26
+ get llmCalls(): string;
27
+ get dreamRoot(): string;
28
+ get dreamState(): string;
29
+ get dreamPending(): string;
30
+ dreamJob(id: string): string;
31
+ dreamFinal(id: string): string;
32
+ dreamExecution(id: string, validation: string): string;
33
+ transcript(id: string): string;
34
+ transcriptPending(id: string): string;
35
+ claim(id: string): string;
36
+ trace(id: string): string;
37
+ dispute(id: string): string;
38
+ pendingInbox(id: string): string;
39
+ doneInbox(id: string): string;
40
+ inboxEffect(id: string): string;
41
+ session(id: string): string;
42
+ sessionState(id: string): string;
43
+ finalizeCheckpoint(id: string): string;
44
+ job(id: string): string;
45
+ }
@@ -0,0 +1,13 @@
1
+ import type { StoreContext } from './context.js';
2
+ export declare class PresentationStore {
3
+ private readonly context;
4
+ private readonly path;
5
+ constructor(context: StoreContext);
6
+ read(): Promise<{
7
+ schemaVersion: 1;
8
+ baselineAt: number;
9
+ seen: Record<string, number>;
10
+ } | null>;
11
+ initialize(): Promise<void>;
12
+ acknowledge(id: string, version: number): Promise<void>;
13
+ }
@@ -0,0 +1,2 @@
1
+ import fs from 'node:fs/promises';
2
+ export declare function openSingleFile(path: string, invalid: () => Error): Promise<fs.FileHandle>;
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ import { type Dispute } from '../protocol/dispute.js';
3
+ import type { StoreContext } from './context.js';
4
+ declare const RejectionsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
5
+ dispute_id: z.core.$ZodBranded<z.ZodString, "DisputeId", "out">;
6
+ status: z.ZodLiteral<409>;
7
+ attempts: z.ZodDefault<z.ZodNumber>;
8
+ rejected_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
9
+ }, z.core.$strip>>;
10
+ export declare const disputeVersion: (dispute: Dispute) => string;
11
+ export declare class RejectedDisputeStore {
12
+ readonly context: StoreContext;
13
+ constructor(context: StoreContext);
14
+ read(includeHistory?: boolean): Promise<z.infer<typeof RejectionsSchema>>;
15
+ contains(dispute: Dispute): Promise<boolean>;
16
+ record(dispute: Dispute, attempts?: number): Promise<void>;
17
+ }
18
+ export {};
@@ -0,0 +1 @@
1
+ export declare function renameFile(source: string, destination: string): Promise<void>;
@@ -0,0 +1,24 @@
1
+ import { z } from 'zod';
2
+ import type { StoreContext } from './context.js';
3
+ export declare const ReportedSetsSchema: z.ZodObject<{
4
+ reported_claim_sets: z.ZodPipe<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
5
+ first_dispute_id: z.core.$ZodBranded<z.ZodString, "DisputeId", "out">;
6
+ reported_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
7
+ }, z.core.$strip>>>, z.ZodTransform<{
8
+ [k: string]: {
9
+ first_dispute_id: string & z.core.$brand<"DisputeId">;
10
+ reported_at: string;
11
+ };
12
+ }, Record<string, {
13
+ first_dispute_id: string & z.core.$brand<"DisputeId">;
14
+ reported_at: string;
15
+ }>>>;
16
+ }, z.core.$strip>;
17
+ export declare function reportedClaimSetKey(claims: readonly string[]): string;
18
+ export declare class ReportedSetStore {
19
+ readonly context: StoreContext;
20
+ constructor(context: StoreContext);
21
+ read(): Promise<z.infer<typeof ReportedSetsSchema>>;
22
+ contains(claims: readonly string[]): Promise<boolean>;
23
+ record(claims: readonly string[], disputeId: string, reportedAt: string): Promise<void>;
24
+ }
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ import type { StoreContext } from './context.js';
3
+ export declare const VersionedDocumentSchema: z.ZodObject<{
4
+ schemaVersion: z.ZodLiteral<1>;
5
+ }, z.core.$catchall<z.ZodJSONSchema>>;
6
+ export type VersionedDocument = z.infer<typeof VersionedDocumentSchema>;
7
+ export declare class VersionedFileStore {
8
+ readonly context: StoreContext;
9
+ private readonly resolvePath;
10
+ constructor(context: StoreContext, resolvePath: (id: string) => string);
11
+ read(id: string): Promise<VersionedDocument | null>;
12
+ write(id: string, value: unknown): Promise<void>;
13
+ }
14
+ export declare class SessionStateStore extends VersionedFileStore {
15
+ constructor(context: StoreContext);
16
+ update(id: string, change: (current: VersionedDocument | null) => VersionedDocument | Promise<VersionedDocument>, signal?: AbortSignal): Promise<VersionedDocument>;
17
+ }
@@ -0,0 +1,6 @@
1
+ import { type Trace } from '../protocol/trace.js';
2
+ import type { StoreContext } from './context.js';
3
+ import { EntityStore } from './entities.js';
4
+ export declare class TraceStore extends EntityStore<Trace> {
5
+ constructor(context: StoreContext);
6
+ }
@@ -0,0 +1,312 @@
1
+ import { z } from 'zod';
2
+ import { type Claim } from '../protocol/claim.js';
3
+ import { type Dispute } from '../protocol/dispute.js';
4
+ import type { PolicyId } from '../protocol/ids.js';
5
+ import type { ConsolidationDelivery } from '../upload/consolidation.js';
6
+ import type { StoreContext } from './context.js';
7
+ export declare const ConsolidationDeliverySchema: z.ZodObject<{
8
+ before: z.ZodObject<{
9
+ id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
10
+ name: z.ZodString;
11
+ statement: z.ZodString;
12
+ scope: z.ZodString;
13
+ holder: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
14
+ confidence: z.ZodEnum<{
15
+ high: "high";
16
+ medium: "medium";
17
+ low: "low";
18
+ }>;
19
+ status: z.ZodEnum<{
20
+ active: "active";
21
+ stale: "stale";
22
+ deprecated: "deprecated";
23
+ }>;
24
+ created_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
25
+ updated_at: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
26
+ source_claim_ids: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.core.$ZodBranded<z.ZodString, "ClaimId", "out">, z.core.$ZodBranded<z.ZodString, "PolicyId", "out">]>>>;
27
+ evidence_summary: z.ZodString;
28
+ }, z.core.$strip>;
29
+ retired: z.ZodObject<{
30
+ id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
31
+ name: z.ZodString;
32
+ statement: z.ZodString;
33
+ scope: z.ZodString;
34
+ holder: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
35
+ confidence: z.ZodEnum<{
36
+ high: "high";
37
+ medium: "medium";
38
+ low: "low";
39
+ }>;
40
+ status: z.ZodEnum<{
41
+ active: "active";
42
+ stale: "stale";
43
+ deprecated: "deprecated";
44
+ }>;
45
+ created_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
46
+ updated_at: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
47
+ source_claim_ids: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.core.$ZodBranded<z.ZodString, "ClaimId", "out">, z.core.$ZodBranded<z.ZodString, "PolicyId", "out">]>>>;
48
+ evidence_summary: z.ZodString;
49
+ }, z.core.$strip>;
50
+ carriers: z.ZodArray<z.ZodObject<{
51
+ id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
52
+ name: z.ZodString;
53
+ statement: z.ZodString;
54
+ scope: z.ZodString;
55
+ holder: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
56
+ confidence: z.ZodEnum<{
57
+ high: "high";
58
+ medium: "medium";
59
+ low: "low";
60
+ }>;
61
+ status: z.ZodEnum<{
62
+ active: "active";
63
+ stale: "stale";
64
+ deprecated: "deprecated";
65
+ }>;
66
+ created_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
67
+ updated_at: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
68
+ source_claim_ids: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.core.$ZodBranded<z.ZodString, "ClaimId", "out">, z.core.$ZodBranded<z.ZodString, "PolicyId", "out">]>>>;
69
+ evidence_summary: z.ZodString;
70
+ }, z.core.$strip>>;
71
+ }, z.core.$strip>;
72
+ export declare const PendingUploadsSchema: z.ZodObject<{
73
+ consolidations: z.ZodPipe<z.ZodDefault<z.ZodArray<z.ZodObject<{
74
+ before: z.ZodObject<{
75
+ id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
76
+ name: z.ZodString;
77
+ statement: z.ZodString;
78
+ scope: z.ZodString;
79
+ holder: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
80
+ confidence: z.ZodEnum<{
81
+ high: "high";
82
+ medium: "medium";
83
+ low: "low";
84
+ }>;
85
+ status: z.ZodEnum<{
86
+ active: "active";
87
+ stale: "stale";
88
+ deprecated: "deprecated";
89
+ }>;
90
+ created_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
91
+ updated_at: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
92
+ source_claim_ids: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.core.$ZodBranded<z.ZodString, "ClaimId", "out">, z.core.$ZodBranded<z.ZodString, "PolicyId", "out">]>>>;
93
+ evidence_summary: z.ZodString;
94
+ }, z.core.$strip>;
95
+ retired: z.ZodObject<{
96
+ id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
97
+ name: z.ZodString;
98
+ statement: z.ZodString;
99
+ scope: z.ZodString;
100
+ holder: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
101
+ confidence: z.ZodEnum<{
102
+ high: "high";
103
+ medium: "medium";
104
+ low: "low";
105
+ }>;
106
+ status: z.ZodEnum<{
107
+ active: "active";
108
+ stale: "stale";
109
+ deprecated: "deprecated";
110
+ }>;
111
+ created_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
112
+ updated_at: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
113
+ source_claim_ids: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.core.$ZodBranded<z.ZodString, "ClaimId", "out">, z.core.$ZodBranded<z.ZodString, "PolicyId", "out">]>>>;
114
+ evidence_summary: z.ZodString;
115
+ }, z.core.$strip>;
116
+ carriers: z.ZodArray<z.ZodObject<{
117
+ id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
118
+ name: z.ZodString;
119
+ statement: z.ZodString;
120
+ scope: z.ZodString;
121
+ holder: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
122
+ confidence: z.ZodEnum<{
123
+ high: "high";
124
+ medium: "medium";
125
+ low: "low";
126
+ }>;
127
+ status: z.ZodEnum<{
128
+ active: "active";
129
+ stale: "stale";
130
+ deprecated: "deprecated";
131
+ }>;
132
+ created_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
133
+ updated_at: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
134
+ source_claim_ids: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.core.$ZodBranded<z.ZodString, "ClaimId", "out">, z.core.$ZodBranded<z.ZodString, "PolicyId", "out">]>>>;
135
+ evidence_summary: z.ZodString;
136
+ }, z.core.$strip>>;
137
+ }, z.core.$strip>>>, z.ZodTransform<{
138
+ before: {
139
+ id: string & z.core.$brand<"ClaimId">;
140
+ name: string;
141
+ statement: string;
142
+ scope: string;
143
+ holder: string & z.core.$brand<"AgentId">;
144
+ confidence: "high" | "medium" | "low";
145
+ status: "active" | "stale" | "deprecated";
146
+ created_at: string;
147
+ source_claim_ids: ((string & z.core.$brand<"ClaimId">) | (string & z.core.$brand<"PolicyId">))[];
148
+ evidence_summary: string;
149
+ updated_at?: string | undefined;
150
+ };
151
+ retired: {
152
+ id: string & z.core.$brand<"ClaimId">;
153
+ name: string;
154
+ statement: string;
155
+ scope: string;
156
+ holder: string & z.core.$brand<"AgentId">;
157
+ confidence: "high" | "medium" | "low";
158
+ status: "active" | "stale" | "deprecated";
159
+ created_at: string;
160
+ source_claim_ids: ((string & z.core.$brand<"ClaimId">) | (string & z.core.$brand<"PolicyId">))[];
161
+ evidence_summary: string;
162
+ updated_at?: string | undefined;
163
+ };
164
+ carriers: {
165
+ id: string & z.core.$brand<"ClaimId">;
166
+ name: string;
167
+ statement: string;
168
+ scope: string;
169
+ holder: string & z.core.$brand<"AgentId">;
170
+ confidence: "high" | "medium" | "low";
171
+ status: "active" | "stale" | "deprecated";
172
+ created_at: string;
173
+ source_claim_ids: ((string & z.core.$brand<"ClaimId">) | (string & z.core.$brand<"PolicyId">))[];
174
+ evidence_summary: string;
175
+ updated_at?: string | undefined;
176
+ }[];
177
+ }[] | undefined, {
178
+ before: {
179
+ id: string & z.core.$brand<"ClaimId">;
180
+ name: string;
181
+ statement: string;
182
+ scope: string;
183
+ holder: string & z.core.$brand<"AgentId">;
184
+ confidence: "high" | "medium" | "low";
185
+ status: "active" | "stale" | "deprecated";
186
+ created_at: string;
187
+ source_claim_ids: ((string & z.core.$brand<"ClaimId">) | (string & z.core.$brand<"PolicyId">))[];
188
+ evidence_summary: string;
189
+ updated_at?: string | undefined;
190
+ };
191
+ retired: {
192
+ id: string & z.core.$brand<"ClaimId">;
193
+ name: string;
194
+ statement: string;
195
+ scope: string;
196
+ holder: string & z.core.$brand<"AgentId">;
197
+ confidence: "high" | "medium" | "low";
198
+ status: "active" | "stale" | "deprecated";
199
+ created_at: string;
200
+ source_claim_ids: ((string & z.core.$brand<"ClaimId">) | (string & z.core.$brand<"PolicyId">))[];
201
+ evidence_summary: string;
202
+ updated_at?: string | undefined;
203
+ };
204
+ carriers: {
205
+ id: string & z.core.$brand<"ClaimId">;
206
+ name: string;
207
+ statement: string;
208
+ scope: string;
209
+ holder: string & z.core.$brand<"AgentId">;
210
+ confidence: "high" | "medium" | "low";
211
+ status: "active" | "stale" | "deprecated";
212
+ created_at: string;
213
+ source_claim_ids: ((string & z.core.$brand<"ClaimId">) | (string & z.core.$brand<"PolicyId">))[];
214
+ evidence_summary: string;
215
+ updated_at?: string | undefined;
216
+ }[];
217
+ }[]>>;
218
+ acknowledgements: z.ZodPipe<z.ZodDefault<z.ZodArray<z.ZodObject<{
219
+ id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
220
+ name: z.ZodString;
221
+ statement: z.ZodString;
222
+ scope: z.ZodString;
223
+ holder: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
224
+ confidence: z.ZodEnum<{
225
+ high: "high";
226
+ medium: "medium";
227
+ low: "low";
228
+ }>;
229
+ status: z.ZodEnum<{
230
+ active: "active";
231
+ stale: "stale";
232
+ deprecated: "deprecated";
233
+ }>;
234
+ created_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
235
+ updated_at: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
236
+ source_claim_ids: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.core.$ZodBranded<z.ZodString, "ClaimId", "out">, z.core.$ZodBranded<z.ZodString, "PolicyId", "out">]>>>;
237
+ evidence_summary: z.ZodString;
238
+ }, z.core.$strip>>>, z.ZodTransform<{
239
+ id: string & z.core.$brand<"ClaimId">;
240
+ name: string;
241
+ statement: string;
242
+ scope: string;
243
+ holder: string & z.core.$brand<"AgentId">;
244
+ confidence: "high" | "medium" | "low";
245
+ status: "active" | "stale" | "deprecated";
246
+ created_at: string;
247
+ source_claim_ids: ((string & z.core.$brand<"ClaimId">) | (string & z.core.$brand<"PolicyId">))[];
248
+ evidence_summary: string;
249
+ updated_at?: string | undefined;
250
+ }[] | undefined, {
251
+ id: string & z.core.$brand<"ClaimId">;
252
+ name: string;
253
+ statement: string;
254
+ scope: string;
255
+ holder: string & z.core.$brand<"AgentId">;
256
+ confidence: "high" | "medium" | "low";
257
+ status: "active" | "stale" | "deprecated";
258
+ created_at: string;
259
+ source_claim_ids: ((string & z.core.$brand<"ClaimId">) | (string & z.core.$brand<"PolicyId">))[];
260
+ evidence_summary: string;
261
+ updated_at?: string | undefined;
262
+ }[]>>;
263
+ claims: z.ZodDefault<z.ZodArray<z.ZodObject<{
264
+ id: z.core.$ZodBranded<z.ZodString, "ClaimId", "out">;
265
+ name: z.ZodString;
266
+ statement: z.ZodString;
267
+ scope: z.ZodString;
268
+ holder: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
269
+ confidence: z.ZodEnum<{
270
+ high: "high";
271
+ medium: "medium";
272
+ low: "low";
273
+ }>;
274
+ status: z.ZodEnum<{
275
+ active: "active";
276
+ stale: "stale";
277
+ deprecated: "deprecated";
278
+ }>;
279
+ created_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
280
+ updated_at: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
281
+ source_claim_ids: z.ZodDefault<z.ZodArray<z.ZodUnion<readonly [z.core.$ZodBranded<z.ZodString, "ClaimId", "out">, z.core.$ZodBranded<z.ZodString, "PolicyId", "out">]>>>;
282
+ evidence_summary: z.ZodString;
283
+ }, z.core.$strip>>>;
284
+ durable_claim_ids: z.ZodPipe<z.ZodDefault<z.ZodArray<z.core.$ZodBranded<z.ZodString, "ClaimId", "out">>>, z.ZodTransform<(string & z.core.$brand<"ClaimId">)[] | undefined, (string & z.core.$brand<"ClaimId">)[]>>;
285
+ disputes: z.ZodDefault<z.ZodArray<z.ZodObject<{
286
+ id: z.core.$ZodBranded<z.ZodString, "DisputeId", "out">;
287
+ name: z.ZodString;
288
+ reporter_agent_id: z.ZodDefault<z.core.$ZodBranded<z.ZodString, "AgentId", "out">>;
289
+ claims: z.ZodArray<z.core.$ZodBranded<z.ZodString, "ClaimId", "out">>;
290
+ summary: z.ZodString;
291
+ status: z.ZodEnum<{
292
+ open: "open";
293
+ resolved: "resolved";
294
+ }>;
295
+ created_at: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
296
+ resolved_at: z.ZodPreprocess<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
297
+ }, z.core.$strip>>>;
298
+ }, z.core.$strip>;
299
+ export type PendingUploads = z.infer<typeof PendingUploadsSchema>;
300
+ export declare class UploadStore {
301
+ readonly context: StoreContext;
302
+ constructor(context: StoreContext);
303
+ read(): Promise<PendingUploads>;
304
+ save(value: unknown): Promise<void>;
305
+ private persist;
306
+ modify(update: (current: PendingUploads) => PendingUploads | Promise<PendingUploads>): Promise<void>;
307
+ enqueue(claims: readonly Claim[], disputes: readonly Dispute[], durable?: boolean, dependencies?: readonly ConsolidationDelivery[]): Promise<void>;
308
+ removeDeliveredClaims(delivered: readonly Claim[]): Promise<void>;
309
+ rebind(previous: ConsolidationDelivery, revised: ConsolidationDelivery): Promise<void>;
310
+ removeDeliveredDisputes(delivered: readonly Dispute[]): Promise<void>;
311
+ withdrawPolicy(policyId: PolicyId): Promise<void>;
312
+ }
@@ -0,0 +1,8 @@
1
+ import type { z } from 'zod';
2
+ import type { StoreLogger } from './context.js';
3
+ export declare function encodeJson<T>(schema: z.ZodType<T>, value: unknown): string;
4
+ export declare function encodeYaml<T>(schema: z.ZodType<T>, value: unknown): string;
5
+ export declare function decodeYaml<T>(schema: z.ZodType<T>, text: string): T;
6
+ export declare function readYaml<T>(path: string, schema: z.ZodType<T>): Promise<T>;
7
+ export declare function readYamlOr<T, F>(path: string, schema: z.ZodType<T>, fallback: () => F): Promise<T | F>;
8
+ export declare function writeYamlAtomic<T>(path: string, value: unknown, schema: z.ZodType<T>, logger: StoreLogger): Promise<void>;
@@ -0,0 +1,10 @@
1
+ export type TeamErrorKind = 'auth' | 'client' | 'legacy_route' | 'retryable' | 'protocol' | 'cancelled';
2
+ export type ConnectionFailure = 'timeout' | 'dns' | 'unreachable' | 'network';
3
+ export declare class TeamError extends Error {
4
+ readonly kind: TeamErrorKind;
5
+ readonly service: 'router' | 'maintainer';
6
+ readonly operation: string;
7
+ readonly status?: number | undefined;
8
+ readonly connectionFailure?: ConnectionFailure | undefined;
9
+ constructor(kind: TeamErrorKind, service: 'router' | 'maintainer', operation: string, status?: number | undefined, connectionFailure?: ConnectionFailure | undefined);
10
+ }
@@ -0,0 +1,20 @@
1
+ import type { z } from 'zod';
2
+ import type { ResolvedConfig } from '../config.js';
3
+ import type { AgentId } from '../protocol/ids.js';
4
+ export type CredentialResolver = (reference: string) => Promise<string | undefined>;
5
+ export declare function bypassProxy(endpoint: string): boolean;
6
+ export declare function teamUrl(endpoint: string, path: string): string;
7
+ export declare class TeamHttp {
8
+ readonly service: 'router' | 'maintainer';
9
+ readonly endpoint: string;
10
+ readonly agentId: AgentId;
11
+ readonly config: ResolvedConfig['team'];
12
+ private readonly credential;
13
+ private readonly dispatcher;
14
+ private readonly stop;
15
+ constructor(service: 'router' | 'maintainer', endpoint: string, agentId: AgentId, config: ResolvedConfig['team'], credential?: CredentialResolver);
16
+ credentialConfigured(): Promise<boolean>;
17
+ post<T>(path: string, data: unknown, schema: z.ZodType<T>, signal?: AbortSignal): Promise<T>;
18
+ post(path: string, data: unknown, schema?: undefined, signal?: AbortSignal): Promise<void>;
19
+ close(): Promise<void>;
20
+ }
@@ -0,0 +1,5 @@
1
+ export * from './errors.js';
2
+ export * from './http.js';
3
+ export * from './router-client.js';
4
+ export * from './maintainer-client.js';
5
+ export * from './service.js';
@@ -0,0 +1,18 @@
1
+ import type { InboxMessage } from '../protocol/inbox.js';
2
+ import type { InboxId } from '../protocol/ids.js';
3
+ import type { Claim } from '../protocol/claim.js';
4
+ import type { Dispute } from '../protocol/dispute.js';
5
+ import type { TeamHttp } from './http.js';
6
+ export declare class MaintainerClient {
7
+ readonly http: TeamHttp;
8
+ constructor(http: TeamHttp);
9
+ pull(signal?: AbortSignal): Promise<InboxMessage[]>;
10
+ ack(ids: readonly InboxId[], signal?: AbortSignal): Promise<void>;
11
+ upload(claim: Claim, signal?: AbortSignal): Promise<void>;
12
+ report(dispute: Dispute, signal?: AbortSignal): Promise<void>;
13
+ health(signal?: AbortSignal): Promise<{
14
+ status: string;
15
+ team_auth_enabled: boolean;
16
+ auth_passed?: boolean | undefined;
17
+ }>;
18
+ }
@@ -0,0 +1,14 @@
1
+ import type { AgentQuery, RouterQueryResult, ScopesOverviewSnapshot } from '../protocol/router.js';
2
+ import type { TeamHttp } from './http.js';
3
+ export declare class RouterClient {
4
+ readonly http: TeamHttp;
5
+ constructor(http: TeamHttp);
6
+ private bounded;
7
+ query(query: AgentQuery, signal?: AbortSignal): Promise<RouterQueryResult>;
8
+ overview(signal?: AbortSignal): Promise<ScopesOverviewSnapshot>;
9
+ health(signal?: AbortSignal): Promise<{
10
+ status: string;
11
+ team_auth_enabled: boolean;
12
+ auth_passed?: boolean | undefined;
13
+ }>;
14
+ }
@@ -0,0 +1,28 @@
1
+ import type { ResolvedConfig } from '../config.js';
2
+ import type { AgentId } from '../protocol/ids.js';
3
+ import type { StoreLogger } from '../store/context.js';
4
+ import type { CredentialResolver } from './http.js';
5
+ import { RouterClient } from './router-client.js';
6
+ import { MaintainerClient } from './maintainer-client.js';
7
+ export interface ConnectionStatus {
8
+ state: 'unknown' | 'ok' | 'failed';
9
+ at?: string;
10
+ error?: string;
11
+ }
12
+ export interface TeamStatus {
13
+ mode: 'solo' | 'team';
14
+ router: ConnectionStatus;
15
+ maintainer: ConnectionStatus;
16
+ }
17
+ export declare class TeamFacade {
18
+ private readonly logger;
19
+ readonly router: RouterClient;
20
+ readonly maintainer: MaintainerClient;
21
+ private readonly states;
22
+ private readonly warned;
23
+ constructor(config: ResolvedConfig['team'], agentId: AgentId, logger: StoreLogger, credential?: CredentialResolver);
24
+ status(): TeamStatus;
25
+ request<T>(service: 'router' | 'maintainer', action: () => Promise<T>): Promise<T>;
26
+ health(signal?: AbortSignal): Promise<void>;
27
+ close(): Promise<void>;
28
+ }
@@ -0,0 +1,9 @@
1
+ export interface SystemProxy {
2
+ http?: string;
3
+ https?: string;
4
+ exceptions: string[];
5
+ }
6
+ export declare function parseMacProxy(output: string): SystemProxy;
7
+ export declare function parseWindowsProxy(output: string): SystemProxy;
8
+ export declare function bypassSystemProxy(endpoint: URL, exceptions: readonly string[]): boolean;
9
+ export declare function systemProxyFor(endpoint: string): Promise<string | undefined>;
@@ -0,0 +1,63 @@
1
+ import { z } from 'zod';
2
+ import type { AcnKnowledge } from '../knowledge/service.js';
3
+ export declare const ClaimToolArgsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
4
+ action: z.ZodLiteral<"list">;
5
+ query: z.ZodOptional<z.ZodString>;
6
+ include_deprecated: z.ZodOptional<z.ZodBoolean>;
7
+ offset: z.ZodOptional<z.ZodNumber>;
8
+ limit: z.ZodOptional<z.ZodNumber>;
9
+ }, z.core.$strict>, z.ZodObject<{
10
+ action: z.ZodLiteral<"read">;
11
+ id: z.ZodString;
12
+ }, z.core.$strict>, z.ZodObject<{
13
+ action: z.ZodLiteral<"update">;
14
+ id: z.ZodString;
15
+ expected_revision: z.ZodString;
16
+ name: z.ZodOptional<z.ZodString>;
17
+ statement: z.ZodOptional<z.ZodString>;
18
+ scope: z.ZodOptional<z.ZodString>;
19
+ evidence_summary: z.ZodOptional<z.ZodString>;
20
+ confidence: z.ZodOptional<z.ZodEnum<{
21
+ high: "high";
22
+ medium: "medium";
23
+ low: "low";
24
+ }>>;
25
+ status: z.ZodOptional<z.ZodEnum<{
26
+ active: "active";
27
+ stale: "stale";
28
+ deprecated: "deprecated";
29
+ }>>;
30
+ }, z.core.$strict>, z.ZodObject<{
31
+ action: z.ZodLiteral<"traces">;
32
+ claim_id: z.ZodOptional<z.ZodString>;
33
+ offset: z.ZodOptional<z.ZodNumber>;
34
+ limit: z.ZodOptional<z.ZodNumber>;
35
+ }, z.core.$strict>, z.ZodObject<{
36
+ action: z.ZodLiteral<"read_trace">;
37
+ id: z.ZodString;
38
+ task_offset: z.ZodOptional<z.ZodNumber>;
39
+ task_limit: z.ZodOptional<z.ZodNumber>;
40
+ }, z.core.$strict>], "action">;
41
+ export type ClaimToolArgs = z.infer<typeof ClaimToolArgsSchema>;
42
+ export declare const CLAIM_DESCRIPTION = "List, search, read, or CAS-update this agent's own claims, and inspect the original task traces connected to them. Updates require the revision returned by read and preserve claim identity, holder, creation time, and sources.";
43
+ export declare function executeClaim(knowledge: AcnKnowledge, input: unknown, signal?: AbortSignal): Promise<import("../knowledge/types.js").ClaimListPage | import("../knowledge/types.js").ClaimDetail | import("../knowledge/types.js").TraceListPage | import("../knowledge/types.js").TraceDetail | {
44
+ error: {
45
+ kind: string;
46
+ message: string;
47
+ retryable: boolean;
48
+ };
49
+ conflict?: never;
50
+ current_revision?: never;
51
+ } | {
52
+ conflict: true;
53
+ current_revision: string;
54
+ error?: never;
55
+ } | {
56
+ error: {
57
+ kind: string;
58
+ message: string;
59
+ retryable?: never;
60
+ };
61
+ conflict?: never;
62
+ current_revision?: never;
63
+ }>;
@@ -0,0 +1,11 @@
1
+ import { z } from 'zod';
2
+ import type { AcnKnowledge } from '../knowledge/service.js';
3
+ export declare const CONSULT_ROUTER_DESCRIPTION = "Consult the team router. Use mode='overview' to list available team claim scopes before choosing a query boundary. Use mode='query' with a non-empty scope to retrieve candidate claims and related disputes. Overview is only a map of available scopes; query returns concrete claim content.";
4
+ export declare const ConsultRouterArgsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5
+ mode: z.ZodLiteral<"overview">;
6
+ }, z.core.$strict>, z.ZodObject<{
7
+ mode: z.ZodLiteral<"query">;
8
+ scope: z.ZodString;
9
+ semantic_query: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ }, z.core.$strict>], "mode">;
11
+ export declare function executeConsultRouter(knowledge: AcnKnowledge, args: unknown, sessionId: string, signal?: AbortSignal): Promise<unknown>;