@ftai/dsh-plugin-acn 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +79 -0
- package/LICENSE-APACHE +201 -0
- package/LICENSE-MIT +19 -0
- package/README.md +55 -2
- package/README_EN.md +56 -0
- package/cordis.patch.yml +29 -0
- package/docs/acn-compat.md +33 -0
- package/docs/architecture.md +129 -0
- package/docs/assets/activity-view.png +0 -0
- package/docs/assets/install-package.png +0 -0
- package/docs/assets/knowledge-model.png +0 -0
- package/docs/assets/knowledge-view.png +0 -0
- package/docs/assets/personal-configuration.png +0 -0
- package/docs/assets/session-upstream.png +0 -0
- package/docs/assets/upstream-settings.png +0 -0
- package/docs/assets/upstream-team.png +0 -0
- package/docs/command-reference.md +201 -0
- package/docs/config.md +243 -0
- package/docs/development.md +197 -0
- package/docs/dsh-compat.md +59 -0
- package/docs/index.md +16 -0
- package/docs/outstanding-issues.md +61 -0
- package/docs/user_guide.md +183 -0
- package/icon.svg +8 -0
- package/lib/activities-LRoCwpzw.js +327 -0
- package/lib/alignment-CwH0nBf-.js +80 -0
- package/lib/auth-DFI9yowX.js +71 -0
- package/lib/checkpoint-Bmt8q2vB.js +188 -0
- package/lib/checkpoint-RgcdqifN.js +318 -0
- package/lib/claim-DOAGe8ZK.js +168 -0
- package/lib/client.js +18420 -0
- package/lib/deliver-BuYQaPRW.js +168 -0
- package/lib/delivery-status-D5m3178s.js +87 -0
- package/lib/dispute-CtrInHzf.js +20 -0
- package/lib/disputes-ByEmi43j.js +51 -0
- package/lib/dream-agent-DBszTHXY.js +249 -0
- package/lib/dream.js +4 -0
- package/lib/effects-DJ4Xa7Tx.js +268 -0
- package/lib/errors-Bp_2WXBr.js +19 -0
- package/lib/errors-pPumDOGD.js +18 -0
- package/lib/evidence-store-DLFvSuNa.js +1030 -0
- package/lib/formation-D4LO31WW.js +187 -0
- package/lib/formation-replay-CEOy5FkI.js +87 -0
- package/lib/formation.js +9 -0
- package/lib/inbox-2CugZZQm.js +188 -0
- package/lib/inbox-DFtE2fOp.js +71 -0
- package/lib/inbox.js +3 -0
- package/lib/index.js +1377 -0
- package/lib/lock-DbmlKOoX.js +332 -0
- package/lib/pages-BEWC3kmZ.js +51 -0
- package/lib/paths-CDYV5UH9.js +154 -0
- package/lib/plugins/commands.js +590 -0
- package/lib/plugins/dream.js +66 -0
- package/lib/plugins/formation.js +66 -0
- package/lib/plugins/inbox.js +53 -0
- package/lib/plugins/knowledge.js +1111 -0
- package/lib/plugins/prompt.js +102 -0
- package/lib/plugins/tools.js +280 -0
- package/lib/policy-DnyHh7Bl.js +16 -0
- package/lib/prepare-DwHZudbA.js +134 -0
- package/lib/presentation-BlLjgDjP.js +47 -0
- package/lib/protocol.js +8 -0
- package/lib/queue-M917xHPS.js +153 -0
- package/lib/regular-file-BFpqMoub.js +136 -0
- package/lib/render-CJaVcKKC.js +48 -0
- package/lib/reported-sets-DdEKdeVb.js +122 -0
- package/lib/revision-DeoL_IUN.js +11 -0
- package/lib/scheduler-MaUEbXr3.js +64 -0
- package/lib/service-B7AI5jds.js +344 -0
- package/lib/service-BcHV5mc7.js +305 -0
- package/lib/service-CNjqHCBR.js +505 -0
- package/lib/service-C_i3BzdP.js +1106 -0
- package/lib/session-binding-BQrOGhZI.js +151 -0
- package/lib/session-state-CYqUhC95.js +38 -0
- package/lib/sessions-C2xuPFQv.js +218 -0
- package/lib/store.js +16 -0
- package/lib/structured-lyQCK-Zk.js +452 -0
- package/lib/subagent-yJsFxHmH.js +9 -0
- package/lib/team-credentials-C9xHrPIi.js +579 -0
- package/lib/team.js +3 -0
- package/lib/tool-schema-3b4gH1zf.js +28 -0
- package/lib/trace-Da0RnL5R.js +14 -0
- package/lib/traces-CHBo8y1z.js +11 -0
- package/lib/types/activities.d.ts +71 -0
- package/lib/types/advanced-configuration.d.ts +11 -0
- package/lib/types/client/ActivityDetails.d.ts +18 -0
- package/lib/types/client/AdvancedPreferences.d.ts +8 -0
- package/lib/types/client/BlankCommandFeedback.d.ts +10 -0
- package/lib/types/client/ComposerMenu.d.ts +24 -0
- package/lib/types/client/ConfigurationPage.d.ts +11 -0
- package/lib/types/client/ConnectionCheckDialog.d.ts +12 -0
- package/lib/types/client/KnowledgeDetail.d.ts +6 -0
- package/lib/types/client/KnowledgeDirectoryField.d.ts +11 -0
- package/lib/types/client/KnowledgePanel.d.ts +12 -0
- package/lib/types/client/KnowledgeReference.d.ts +13 -0
- package/lib/types/client/SessionToolbar.d.ts +16 -0
- package/lib/types/client/SettingsToast.d.ts +3 -0
- package/lib/types/client/SourceSessionLink.d.ts +15 -0
- package/lib/types/client/TeamCredentialField.d.ts +16 -0
- package/lib/types/client/TeamSettingsPage.d.ts +30 -0
- package/lib/types/client/configuration-errors.d.ts +2 -0
- package/lib/types/client/interaction-styles.d.ts +1 -0
- package/lib/types/client/interaction-ui.d.ts +30 -0
- package/lib/types/client/knowledge-labels.d.ts +5 -0
- package/lib/types/client/locales.d.ts +51 -0
- package/lib/types/commands/claim.d.ts +4 -0
- package/lib/types/commands/import.d.ts +10 -0
- package/lib/types/commands/status.d.ts +5 -0
- package/lib/types/config.d.ts +122 -0
- package/lib/types/configuration.d.ts +259 -0
- package/lib/types/credentials.d.ts +65 -0
- package/lib/types/dream/audit.d.ts +4 -0
- package/lib/types/dream/autonomous.d.ts +185 -0
- package/lib/types/dream/candidates.d.ts +34 -0
- package/lib/types/dream/checkpoint.d.ts +35 -0
- package/lib/types/dream/evidence-files.d.ts +10 -0
- package/lib/types/dream/evidence-store.d.ts +103 -0
- package/lib/types/dream/evidence.d.ts +30 -0
- package/lib/types/dream/index.d.ts +10 -0
- package/lib/types/dream/plan.d.ts +18 -0
- package/lib/types/dream/preservation.d.ts +6 -0
- package/lib/types/dream/review.d.ts +10 -0
- package/lib/types/dream/schema.d.ts +1475 -0
- package/lib/types/dream/service.d.ts +56 -0
- package/lib/types/dream/sync.d.ts +147 -0
- package/lib/types/dsh-adapter/configuration-remote.d.ts +1 -0
- package/lib/types/dsh-adapter/configuration-service.d.ts +28 -0
- package/lib/types/dsh-adapter/dream-agent.d.ts +4 -0
- package/lib/types/dsh-adapter/dream-evidence.d.ts +3 -0
- package/lib/types/dsh-adapter/formation-archive.d.ts +3 -0
- package/lib/types/dsh-adapter/formation-replay.d.ts +5 -0
- package/lib/types/dsh-adapter/formation.d.ts +4 -0
- package/lib/types/dsh-adapter/interaction-service.d.ts +13 -0
- package/lib/types/dsh-adapter/knowledge-paths.d.ts +3 -0
- package/lib/types/dsh-adapter/llm.d.ts +10 -0
- package/lib/types/dsh-adapter/project-upstream.d.ts +4 -0
- package/lib/types/dsh-adapter/runtime-pool.d.ts +110 -0
- package/lib/types/dsh-adapter/session-binding.d.ts +43 -0
- package/lib/types/dsh-adapter/source-sessions.d.ts +3 -0
- package/lib/types/dsh-adapter/team-credentials.d.ts +5 -0
- package/lib/types/dsh-adapter/tool-schema.d.ts +4 -0
- package/lib/types/dsh-adapter/tools.d.ts +5 -0
- package/lib/types/formation/capture.d.ts +19 -0
- package/lib/types/formation/checkpoint.d.ts +136 -0
- package/lib/types/formation/index.d.ts +10 -0
- package/lib/types/formation/prepare.d.ts +16 -0
- package/lib/types/formation/schema.d.ts +45 -0
- package/lib/types/formation/service.d.ts +58 -0
- package/lib/types/formation/transcript.d.ts +75 -0
- package/lib/types/formation/triggers.d.ts +3 -0
- package/lib/types/inbox/cascade.d.ts +3 -0
- package/lib/types/inbox/effects.d.ts +275 -0
- package/lib/types/inbox/index.d.ts +5 -0
- package/lib/types/inbox/prepare.d.ts +380 -0
- package/lib/types/inbox/service.d.ts +26 -0
- package/lib/types/inbox/sync.d.ts +9 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/interaction-messages.d.ts +69 -0
- package/lib/types/interaction.d.ts +550 -0
- package/lib/types/knowledge/alignment.d.ts +49 -0
- package/lib/types/knowledge/catalog.d.ts +5 -0
- package/lib/types/knowledge/changes.d.ts +32 -0
- package/lib/types/knowledge/disputes.d.ts +3 -0
- package/lib/types/knowledge/errors.d.ts +9 -0
- package/lib/types/knowledge/ordering.d.ts +7 -0
- package/lib/types/knowledge/pages.d.ts +7 -0
- package/lib/types/knowledge/safety.d.ts +2 -0
- package/lib/types/knowledge/service.d.ts +52 -0
- package/lib/types/knowledge/sessions.d.ts +59 -0
- package/lib/types/knowledge/sources.d.ts +2 -0
- package/lib/types/knowledge/timestamps.d.ts +1 -0
- package/lib/types/knowledge/types.d.ts +84 -0
- package/lib/types/llm/response.d.ts +1 -0
- package/lib/types/llm/structured.d.ts +27 -0
- package/lib/types/local-name.d.ts +1 -0
- package/lib/types/plugins/client.d.ts +9 -0
- package/lib/types/plugins/commands.d.ts +11 -0
- package/lib/types/plugins/configuration.d.ts +8 -0
- package/lib/types/plugins/dream.d.ts +16 -0
- package/lib/types/plugins/formation.d.ts +16 -0
- package/lib/types/plugins/inbox.d.ts +16 -0
- package/lib/types/plugins/knowledge.d.ts +19 -0
- package/lib/types/plugins/prompt.d.ts +17 -0
- package/lib/types/plugins/tools.d.ts +10 -0
- package/lib/types/prompt/render.d.ts +2 -0
- package/lib/types/protocol/arbitration.d.ts +154 -0
- package/lib/types/protocol/auth.d.ts +31 -0
- package/lib/types/protocol/claim.d.ts +36 -0
- package/lib/types/protocol/dispute.d.ts +17 -0
- package/lib/types/protocol/ids.d.ts +20 -0
- package/lib/types/protocol/inbox.d.ts +141 -0
- package/lib/types/protocol/index.d.ts +11 -0
- package/lib/types/protocol/policy.d.ts +21 -0
- package/lib/types/protocol/revision.d.ts +2 -0
- package/lib/types/protocol/router.d.ts +114 -0
- package/lib/types/protocol/schema.d.ts +4 -0
- package/lib/types/protocol/time.d.ts +5 -0
- package/lib/types/protocol/trace.d.ts +11 -0
- package/lib/types/store/atomic.d.ts +8 -0
- package/lib/types/store/claim-edits.d.ts +33 -0
- package/lib/types/store/claims.d.ts +7 -0
- package/lib/types/store/context.d.ts +13 -0
- package/lib/types/store/delivery-status.d.ts +47 -0
- package/lib/types/store/disputes.d.ts +6 -0
- package/lib/types/store/entities.d.ts +16 -0
- package/lib/types/store/errors.d.ts +8 -0
- package/lib/types/store/inbox.d.ts +27 -0
- package/lib/types/store/index.d.ts +16 -0
- package/lib/types/store/jobs.d.ts +5 -0
- package/lib/types/store/lock.d.ts +11 -0
- package/lib/types/store/path-names.d.ts +2 -0
- package/lib/types/store/paths.d.ts +45 -0
- package/lib/types/store/presentation.d.ts +13 -0
- package/lib/types/store/regular-file.d.ts +2 -0
- package/lib/types/store/rejected-disputes.d.ts +18 -0
- package/lib/types/store/rename.d.ts +1 -0
- package/lib/types/store/reported-sets.d.ts +24 -0
- package/lib/types/store/session-state.d.ts +17 -0
- package/lib/types/store/traces.d.ts +6 -0
- package/lib/types/store/uploads.d.ts +312 -0
- package/lib/types/store/yaml.d.ts +8 -0
- package/lib/types/team/errors.d.ts +10 -0
- package/lib/types/team/http.d.ts +20 -0
- package/lib/types/team/index.d.ts +5 -0
- package/lib/types/team/maintainer-client.d.ts +18 -0
- package/lib/types/team/router-client.d.ts +14 -0
- package/lib/types/team/service.d.ts +28 -0
- package/lib/types/team/system-proxy.d.ts +9 -0
- package/lib/types/tools/claim.d.ts +63 -0
- package/lib/types/tools/consult-router.d.ts +11 -0
- package/lib/types/tools/subagent.d.ts +8 -0
- package/lib/types/tools/validation.d.ts +2 -0
- package/lib/types/upload/consolidation.d.ts +63 -0
- package/lib/types/upload/deliver.d.ts +15 -0
- package/lib/types/upload/index.d.ts +2 -0
- package/lib/types/upload/scheduler.d.ts +19 -0
- package/lib/types/upstreams.d.ts +5 -0
- package/lib/types/worker/queue.d.ts +17 -0
- package/lib/types/worker/types.d.ts +51 -0
- package/lib/types/worker/worker.d.ts +39 -0
- package/lib/types-C2ST2Zdg.js +17 -0
- package/lib/upload.js +3 -0
- package/lib/uploads-BCA2p92b.js +210 -0
- package/lib/worker-BBTYP2RE.js +185 -0
- package/locale/commands/en.json +1 -0
- package/locale/commands/zh.json +1 -0
- package/locale/dream/en.json +1 -0
- package/locale/dream/zh.json +1 -0
- package/locale/en.json +7 -0
- package/locale/formation/en.json +1 -0
- package/locale/formation/zh.json +1 -0
- package/locale/inbox/en.json +1 -0
- package/locale/inbox/zh.json +1 -0
- package/locale/knowledge/en.json +1 -0
- package/locale/knowledge/zh.json +1 -0
- package/locale/prompt/en.json +1 -0
- package/locale/prompt/zh.json +1 -0
- package/locale/tools/en.json +1 -0
- package/locale/tools/zh.json +1 -0
- package/locale/zh.json +7 -0
- package/package.json +262 -3
- package/prompts/claim_dream.j2 +77 -0
- package/prompts/claim_dream_legacy.j2 +63 -0
- package/prompts/dream_compaction.j2 +11 -0
- package/prompts/dream_evidence.j2 +5 -0
- package/prompts/inbox_claim_attribute_update_internalize.j2 +112 -0
- package/prompts/inbox_policy_update_internalize.j2 +87 -0
- package/prompts/knowledge.j2 +38 -0
- package/prompts/session_recap.j2 +113 -0
- package/prompts/what_is_claim.j2 +51 -0
- package/prompts/what_is_dispute.j2 +21 -0
- package/prompts/what_is_policy.j2 +22 -0
|
@@ -0,0 +1,259 @@
|
|
|
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
|
+
legacyStorage: z.ZodOptional<z.ZodEnum<{
|
|
38
|
+
base: "base";
|
|
39
|
+
personal: "personal";
|
|
40
|
+
connection: "connection";
|
|
41
|
+
}>>;
|
|
42
|
+
legacyKey: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$strict>>>;
|
|
44
|
+
advanced: z.ZodOptional<z.ZodObject<{
|
|
45
|
+
inboxProcessingStaleAfterSecs: z.ZodNumber;
|
|
46
|
+
routerQueryTimeoutSecs: z.ZodNumber;
|
|
47
|
+
httpTimeoutSecs: z.ZodNumber;
|
|
48
|
+
httpRetryCount: z.ZodNumber;
|
|
49
|
+
httpRetryBaseDelayMs: z.ZodNumber;
|
|
50
|
+
httpRetryMaxDelayMs: z.ZodNumber;
|
|
51
|
+
}, z.core.$strict>>;
|
|
52
|
+
}, z.core.$strict>;
|
|
53
|
+
export type ConfigurationValues = z.infer<typeof ConfigurationValuesSchema>;
|
|
54
|
+
export declare const ModelChoiceSchema: z.ZodObject<{
|
|
55
|
+
provider: z.ZodString;
|
|
56
|
+
providerName: z.ZodString;
|
|
57
|
+
id: z.ZodString;
|
|
58
|
+
name: z.ZodString;
|
|
59
|
+
}, z.core.$strict>;
|
|
60
|
+
export type ModelChoice = z.infer<typeof ModelChoiceSchema>;
|
|
61
|
+
export declare const ConfigurationSnapshotSchema: z.ZodObject<{
|
|
62
|
+
revision: z.ZodString;
|
|
63
|
+
values: z.ZodObject<{
|
|
64
|
+
agentId: z.ZodString;
|
|
65
|
+
home: z.ZodString;
|
|
66
|
+
provider: z.ZodString;
|
|
67
|
+
model: z.ZodString;
|
|
68
|
+
mode: z.ZodEnum<{
|
|
69
|
+
team: "team";
|
|
70
|
+
solo: "solo";
|
|
71
|
+
}>;
|
|
72
|
+
routerEndpoint: z.ZodString;
|
|
73
|
+
maintainerEndpoint: z.ZodString;
|
|
74
|
+
keyEnv: z.ZodString;
|
|
75
|
+
timeoutMs: z.ZodNumber;
|
|
76
|
+
legacyEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
77
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
78
|
+
id: z.ZodString;
|
|
79
|
+
name: z.ZodString;
|
|
80
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
81
|
+
agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
82
|
+
routerEndpoint: z.ZodString;
|
|
83
|
+
maintainerEndpoint: z.ZodString;
|
|
84
|
+
keyEnv: z.ZodDefault<z.ZodString>;
|
|
85
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
86
|
+
}, z.core.$strict>>>;
|
|
87
|
+
defaultConnection: z.ZodOptional<z.ZodString>;
|
|
88
|
+
showCompletion: z.ZodOptional<z.ZodBoolean>;
|
|
89
|
+
upstream: z.ZodOptional<z.ZodString>;
|
|
90
|
+
upstreams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
91
|
+
name: z.ZodDefault<z.ZodString>;
|
|
92
|
+
agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
93
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
94
|
+
routerEndpoint: z.ZodDefault<z.ZodString>;
|
|
95
|
+
maintainerEndpoint: z.ZodDefault<z.ZodString>;
|
|
96
|
+
keyEnv: z.ZodDefault<z.ZodString>;
|
|
97
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
98
|
+
legacyStorage: z.ZodOptional<z.ZodEnum<{
|
|
99
|
+
base: "base";
|
|
100
|
+
personal: "personal";
|
|
101
|
+
connection: "connection";
|
|
102
|
+
}>>;
|
|
103
|
+
legacyKey: z.ZodOptional<z.ZodString>;
|
|
104
|
+
}, z.core.$strict>>>;
|
|
105
|
+
advanced: z.ZodOptional<z.ZodObject<{
|
|
106
|
+
inboxProcessingStaleAfterSecs: z.ZodNumber;
|
|
107
|
+
routerQueryTimeoutSecs: z.ZodNumber;
|
|
108
|
+
httpTimeoutSecs: z.ZodNumber;
|
|
109
|
+
httpRetryCount: z.ZodNumber;
|
|
110
|
+
httpRetryBaseDelayMs: z.ZodNumber;
|
|
111
|
+
httpRetryMaxDelayMs: z.ZodNumber;
|
|
112
|
+
}, z.core.$strict>>;
|
|
113
|
+
}, z.core.$strict>;
|
|
114
|
+
models: z.ZodArray<z.ZodObject<{
|
|
115
|
+
provider: z.ZodString;
|
|
116
|
+
providerName: z.ZodString;
|
|
117
|
+
id: z.ZodString;
|
|
118
|
+
name: z.ZodString;
|
|
119
|
+
}, z.core.$strict>>;
|
|
120
|
+
active: z.ZodBoolean;
|
|
121
|
+
dataDirectory: z.ZodString;
|
|
122
|
+
upstreamPending: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodNumber>>>;
|
|
123
|
+
}, z.core.$strict>;
|
|
124
|
+
export type ConfigurationSnapshot = z.infer<typeof ConfigurationSnapshotSchema>;
|
|
125
|
+
export declare const SaveConfigurationSchema: z.ZodObject<{
|
|
126
|
+
revision: z.ZodString;
|
|
127
|
+
values: z.ZodObject<{
|
|
128
|
+
agentId: z.ZodString;
|
|
129
|
+
home: z.ZodString;
|
|
130
|
+
provider: z.ZodString;
|
|
131
|
+
model: z.ZodString;
|
|
132
|
+
mode: z.ZodEnum<{
|
|
133
|
+
team: "team";
|
|
134
|
+
solo: "solo";
|
|
135
|
+
}>;
|
|
136
|
+
routerEndpoint: z.ZodString;
|
|
137
|
+
maintainerEndpoint: z.ZodString;
|
|
138
|
+
keyEnv: z.ZodString;
|
|
139
|
+
timeoutMs: z.ZodNumber;
|
|
140
|
+
legacyEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
141
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
142
|
+
id: z.ZodString;
|
|
143
|
+
name: z.ZodString;
|
|
144
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
145
|
+
agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
146
|
+
routerEndpoint: z.ZodString;
|
|
147
|
+
maintainerEndpoint: z.ZodString;
|
|
148
|
+
keyEnv: z.ZodDefault<z.ZodString>;
|
|
149
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
150
|
+
}, z.core.$strict>>>;
|
|
151
|
+
defaultConnection: z.ZodOptional<z.ZodString>;
|
|
152
|
+
showCompletion: z.ZodOptional<z.ZodBoolean>;
|
|
153
|
+
upstream: z.ZodOptional<z.ZodString>;
|
|
154
|
+
upstreams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
155
|
+
name: z.ZodDefault<z.ZodString>;
|
|
156
|
+
agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
157
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
158
|
+
routerEndpoint: z.ZodDefault<z.ZodString>;
|
|
159
|
+
maintainerEndpoint: z.ZodDefault<z.ZodString>;
|
|
160
|
+
keyEnv: z.ZodDefault<z.ZodString>;
|
|
161
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
162
|
+
legacyStorage: z.ZodOptional<z.ZodEnum<{
|
|
163
|
+
base: "base";
|
|
164
|
+
personal: "personal";
|
|
165
|
+
connection: "connection";
|
|
166
|
+
}>>;
|
|
167
|
+
legacyKey: z.ZodOptional<z.ZodString>;
|
|
168
|
+
}, z.core.$strict>>>;
|
|
169
|
+
advanced: z.ZodOptional<z.ZodObject<{
|
|
170
|
+
inboxProcessingStaleAfterSecs: z.ZodNumber;
|
|
171
|
+
routerQueryTimeoutSecs: z.ZodNumber;
|
|
172
|
+
httpTimeoutSecs: z.ZodNumber;
|
|
173
|
+
httpRetryCount: z.ZodNumber;
|
|
174
|
+
httpRetryBaseDelayMs: z.ZodNumber;
|
|
175
|
+
httpRetryMaxDelayMs: z.ZodNumber;
|
|
176
|
+
}, z.core.$strict>>;
|
|
177
|
+
}, z.core.$strict>;
|
|
178
|
+
}, z.core.$strict>;
|
|
179
|
+
export type SaveConfiguration = z.infer<typeof SaveConfigurationSchema>;
|
|
180
|
+
export declare const ConfigurationResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
181
|
+
ok: z.ZodLiteral<true>;
|
|
182
|
+
snapshot: z.ZodObject<{
|
|
183
|
+
revision: z.ZodString;
|
|
184
|
+
values: z.ZodObject<{
|
|
185
|
+
agentId: z.ZodString;
|
|
186
|
+
home: z.ZodString;
|
|
187
|
+
provider: z.ZodString;
|
|
188
|
+
model: z.ZodString;
|
|
189
|
+
mode: z.ZodEnum<{
|
|
190
|
+
team: "team";
|
|
191
|
+
solo: "solo";
|
|
192
|
+
}>;
|
|
193
|
+
routerEndpoint: z.ZodString;
|
|
194
|
+
maintainerEndpoint: z.ZodString;
|
|
195
|
+
keyEnv: z.ZodString;
|
|
196
|
+
timeoutMs: z.ZodNumber;
|
|
197
|
+
legacyEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
198
|
+
connections: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
199
|
+
id: z.ZodString;
|
|
200
|
+
name: z.ZodString;
|
|
201
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
202
|
+
agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
203
|
+
routerEndpoint: z.ZodString;
|
|
204
|
+
maintainerEndpoint: z.ZodString;
|
|
205
|
+
keyEnv: z.ZodDefault<z.ZodString>;
|
|
206
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
207
|
+
}, z.core.$strict>>>;
|
|
208
|
+
defaultConnection: z.ZodOptional<z.ZodString>;
|
|
209
|
+
showCompletion: z.ZodOptional<z.ZodBoolean>;
|
|
210
|
+
upstream: z.ZodOptional<z.ZodString>;
|
|
211
|
+
upstreams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
212
|
+
name: z.ZodDefault<z.ZodString>;
|
|
213
|
+
agentId: z.core.$ZodBranded<z.ZodString, "AgentId", "out">;
|
|
214
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
215
|
+
routerEndpoint: z.ZodDefault<z.ZodString>;
|
|
216
|
+
maintainerEndpoint: z.ZodDefault<z.ZodString>;
|
|
217
|
+
keyEnv: z.ZodDefault<z.ZodString>;
|
|
218
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
219
|
+
legacyStorage: z.ZodOptional<z.ZodEnum<{
|
|
220
|
+
base: "base";
|
|
221
|
+
personal: "personal";
|
|
222
|
+
connection: "connection";
|
|
223
|
+
}>>;
|
|
224
|
+
legacyKey: z.ZodOptional<z.ZodString>;
|
|
225
|
+
}, z.core.$strict>>>;
|
|
226
|
+
advanced: z.ZodOptional<z.ZodObject<{
|
|
227
|
+
inboxProcessingStaleAfterSecs: z.ZodNumber;
|
|
228
|
+
routerQueryTimeoutSecs: z.ZodNumber;
|
|
229
|
+
httpTimeoutSecs: z.ZodNumber;
|
|
230
|
+
httpRetryCount: z.ZodNumber;
|
|
231
|
+
httpRetryBaseDelayMs: z.ZodNumber;
|
|
232
|
+
httpRetryMaxDelayMs: z.ZodNumber;
|
|
233
|
+
}, z.core.$strict>>;
|
|
234
|
+
}, z.core.$strict>;
|
|
235
|
+
models: z.ZodArray<z.ZodObject<{
|
|
236
|
+
provider: z.ZodString;
|
|
237
|
+
providerName: z.ZodString;
|
|
238
|
+
id: z.ZodString;
|
|
239
|
+
name: z.ZodString;
|
|
240
|
+
}, z.core.$strict>>;
|
|
241
|
+
active: z.ZodBoolean;
|
|
242
|
+
dataDirectory: z.ZodString;
|
|
243
|
+
upstreamPending: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodNumber>>>;
|
|
244
|
+
}, z.core.$strict>;
|
|
245
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
246
|
+
ok: z.ZodLiteral<false>;
|
|
247
|
+
code: z.ZodEnum<{
|
|
248
|
+
conflict: "conflict";
|
|
249
|
+
invalid: "invalid";
|
|
250
|
+
unavailable: "unavailable";
|
|
251
|
+
persistence: "persistence";
|
|
252
|
+
inactive: "inactive";
|
|
253
|
+
busy: "busy";
|
|
254
|
+
}>;
|
|
255
|
+
fields: z.ZodArray<z.ZodString>;
|
|
256
|
+
}, z.core.$strict>], "ok">;
|
|
257
|
+
export type ConfigurationResult = z.infer<typeof ConfigurationResultSchema>;
|
|
258
|
+
export declare function configurationValues(raw: unknown): ConfigurationValues;
|
|
259
|
+
export declare function mergeConfiguration(raw: Record<string, unknown>, values: ConfigurationValues): Record<string, unknown>;
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
legacyStorage: z.ZodOptional<z.ZodEnum<{
|
|
32
|
+
base: "base";
|
|
33
|
+
personal: "personal";
|
|
34
|
+
connection: "connection";
|
|
35
|
+
}>>;
|
|
36
|
+
legacyKey: z.ZodOptional<z.ZodString>;
|
|
37
|
+
id: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strict>]>;
|
|
39
|
+
value: z.ZodString;
|
|
40
|
+
}, z.core.$strict>], "action">;
|
|
41
|
+
export type CredentialRequest = z.input<typeof CredentialRequestSchema>;
|
|
42
|
+
export declare const CredentialResultSchema: z.ZodObject<{
|
|
43
|
+
ok: z.ZodBoolean;
|
|
44
|
+
message: z.ZodString;
|
|
45
|
+
messageInfo: z.ZodOptional<z.ZodObject<{
|
|
46
|
+
code: z.ZodString;
|
|
47
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
48
|
+
entityId: z.ZodOptional<z.ZodString>;
|
|
49
|
+
status: z.ZodOptional<z.ZodNumber>;
|
|
50
|
+
}, z.core.$strip>>;
|
|
51
|
+
configured: z.ZodOptional<z.ZodBoolean>;
|
|
52
|
+
writable: z.ZodOptional<z.ZodBoolean>;
|
|
53
|
+
checks: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
54
|
+
service: z.ZodEnum<{
|
|
55
|
+
router: "router";
|
|
56
|
+
maintainer: "maintainer";
|
|
57
|
+
}>;
|
|
58
|
+
state: z.ZodEnum<{
|
|
59
|
+
failed: "failed";
|
|
60
|
+
ok: "ok";
|
|
61
|
+
}>;
|
|
62
|
+
message: z.ZodString;
|
|
63
|
+
}, z.core.$strip>>>;
|
|
64
|
+
}, z.core.$strict>;
|
|
65
|
+
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;
|