@bizagent/dsh 0.0.0-stage → 1.0.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 +124 -0
- package/LICENSE +21 -0
- package/README.md +61 -2
- package/cordis.patch.yml +14 -0
- package/docs/README.md +23 -0
- package/docs/architecture.md +154 -0
- package/docs/concepts.md +192 -0
- package/docs/configuration.md +154 -0
- package/docs/quickstart.md +103 -0
- package/docs/quickstart.zh-CN.md +86 -0
- package/docs/tools.md +607 -0
- package/docs/user-guide.zh-CN.md +132 -0
- package/docs/verification.md +69 -0
- package/examples/README.md +64 -0
- package/examples/demo-runtime.mjs +71 -0
- package/examples/learning-lab.mjs +263 -0
- package/examples/scenarios.mjs +45 -0
- package/lib/agent-preset.d.ts +20 -0
- package/lib/agent-preset.js +46 -0
- package/lib/agent-session-address.d.ts +14 -0
- package/lib/agent-session-address.js +15 -0
- package/lib/agent-session-coordinator.d.ts +24 -0
- package/lib/agent-session-coordinator.js +101 -0
- package/lib/cli.d.ts +3 -0
- package/lib/cli.js +142 -0
- package/lib/client-types/agent-session-address.d.ts +13 -0
- package/lib/client-types/client/agent-mentions.d.ts +3 -0
- package/lib/client-types/client/api.d.ts +180 -0
- package/lib/client-types/client/components.d.ts +22 -0
- package/lib/client-types/client/controller.d.ts +23 -0
- package/lib/client-types/client/frame-participants.d.ts +5 -0
- package/lib/client-types/client/home-name.d.ts +9 -0
- package/lib/client-types/client/human-inbox.d.ts +8 -0
- package/lib/client-types/client/index.d.ts +13 -0
- package/lib/client-types/client/locales.d.ts +796 -0
- package/lib/client-types/client/markdown.d.ts +12 -0
- package/lib/client-types/client/project-artifact-link.d.ts +10 -0
- package/lib/client-types/client/project-outcome-review-inbox.d.ts +13 -0
- package/lib/client-types/client/projects.d.ts +11 -0
- package/lib/client-types/client/sample-guide.d.ts +9 -0
- package/lib/client-types/client/session-resource.d.ts +34 -0
- package/lib/client-types/client/session-surfaces.d.ts +24 -0
- package/lib/client-types/client/styles.d.ts +1 -0
- package/lib/client-types/config.d.ts +55 -0
- package/lib/client-types/cron.d.ts +8 -0
- package/lib/client-types/domain.d.ts +818 -0
- package/lib/client-types/frame-reference.d.ts +4 -0
- package/lib/client-types/home-directory.d.ts +5 -0
- package/lib/client-types/home-space.d.ts +49 -0
- package/lib/client-types/home-store.d.ts +125 -0
- package/lib/client-types/inbox-stalled-topic.d.ts +15 -0
- package/lib/client-types/inbox-wake-policy.d.ts +18 -0
- package/lib/client-types/known-format.d.ts +2 -0
- package/lib/client-types/learning-scheduler.d.ts +36 -0
- package/lib/client-types/learning-session-runner.d.ts +49 -0
- package/lib/client-types/learning-trigger.d.ts +17 -0
- package/lib/client-types/learning-usage.d.ts +17 -0
- package/lib/client-types/ledger.d.ts +190 -0
- package/lib/client-types/local-owner.d.ts +7 -0
- package/lib/client-types/message-source.d.ts +9 -0
- package/lib/client-types/organization-location.d.ts +19 -0
- package/lib/client-types/project-ledger.d.ts +182 -0
- package/lib/client-types/project-seat-context.d.ts +17 -0
- package/lib/client-types/safe-file.d.ts +23 -0
- package/lib/client-types/sample-organization.d.ts +9 -0
- package/lib/client-types/service.d.ts +596 -0
- package/lib/client-types/shared-knowledge.d.ts +116 -0
- package/lib/client-types/ui-contract.d.ts +276 -0
- package/lib/client-types/untrusted-text.d.ts +15 -0
- package/lib/client-types/work-ledger.d.ts +108 -0
- package/lib/client-types/work-output-eval.d.ts +15 -0
- package/lib/client-types/worklog-ledger.d.ts +88 -0
- package/lib/client-types/worklog-snapshot.d.ts +33 -0
- package/lib/client.js +5463 -0
- package/lib/config.d.ts +56 -0
- package/lib/config.js +115 -0
- package/lib/cron.d.ts +9 -0
- package/lib/cron.js +127 -0
- package/lib/domain.d.ts +819 -0
- package/lib/domain.js +662 -0
- package/lib/frame-admission.d.ts +6 -0
- package/lib/frame-admission.js +39 -0
- package/lib/frame-reference.d.ts +5 -0
- package/lib/frame-reference.js +12 -0
- package/lib/home-archive.d.ts +17 -0
- package/lib/home-archive.js +177 -0
- package/lib/home-directory.d.ts +6 -0
- package/lib/home-directory.js +38 -0
- package/lib/home-space.d.ts +50 -0
- package/lib/home-space.js +120 -0
- package/lib/home-store.d.ts +126 -0
- package/lib/home-store.js +837 -0
- package/lib/host.d.ts +22 -0
- package/lib/host.js +15 -0
- package/lib/human-inbox-transport.d.ts +23 -0
- package/lib/human-inbox-transport.js +105 -0
- package/lib/human-notification-runner.d.ts +83 -0
- package/lib/human-notification-runner.js +138 -0
- package/lib/human-notification-webhook.d.ts +18 -0
- package/lib/human-notification-webhook.js +102 -0
- package/lib/human-turn-completion.d.ts +61 -0
- package/lib/human-turn-completion.js +157 -0
- package/lib/inbox-return-notifier.d.ts +46 -0
- package/lib/inbox-return-notifier.js +279 -0
- package/lib/inbox-stalled-escalation-runner.d.ts +31 -0
- package/lib/inbox-stalled-escalation-runner.js +68 -0
- package/lib/inbox-stalled-topic.d.ts +16 -0
- package/lib/inbox-stalled-topic.js +44 -0
- package/lib/inbox-wake-policy.d.ts +19 -0
- package/lib/inbox-wake-policy.js +28 -0
- package/lib/inbox-wake-runner.d.ts +45 -0
- package/lib/inbox-wake-runner.js +481 -0
- package/lib/index.d.ts +29 -0
- package/lib/index.js +480 -0
- package/lib/known-format.d.ts +3 -0
- package/lib/known-format.js +8 -0
- package/lib/learning-scheduler.d.ts +37 -0
- package/lib/learning-scheduler.js +182 -0
- package/lib/learning-session-runner.d.ts +50 -0
- package/lib/learning-session-runner.js +435 -0
- package/lib/learning-trigger.d.ts +18 -0
- package/lib/learning-trigger.js +92 -0
- package/lib/learning-usage.d.ts +18 -0
- package/lib/learning-usage.js +49 -0
- package/lib/ledger.d.ts +191 -0
- package/lib/ledger.js +752 -0
- package/lib/local-human-host.d.ts +11 -0
- package/lib/local-human-host.js +191 -0
- package/lib/local-human-token.d.ts +9 -0
- package/lib/local-human-token.js +32 -0
- package/lib/local-owner.d.ts +8 -0
- package/lib/local-owner.js +26 -0
- package/lib/message-source.d.ts +10 -0
- package/lib/message-source.js +2 -0
- package/lib/organization-location.d.ts +20 -0
- package/lib/organization-location.js +80 -0
- package/lib/organization-workspace.d.ts +22 -0
- package/lib/organization-workspace.js +32 -0
- package/lib/project-ledger.d.ts +183 -0
- package/lib/project-ledger.js +189 -0
- package/lib/project-review-transport.d.ts +23 -0
- package/lib/project-review-transport.js +155 -0
- package/lib/project-seat-context.d.ts +18 -0
- package/lib/project-seat-context.js +34 -0
- package/lib/proposal-review-transport.d.ts +26 -0
- package/lib/proposal-review-transport.js +104 -0
- package/lib/route-guard.d.ts +31 -0
- package/lib/route-guard.js +80 -0
- package/lib/safe-file.d.ts +24 -0
- package/lib/safe-file.js +93 -0
- package/lib/sample-organization.d.ts +10 -0
- package/lib/sample-organization.js +46 -0
- package/lib/service.d.ts +597 -0
- package/lib/service.js +4076 -0
- package/lib/session-surface.d.ts +11 -0
- package/lib/session-surface.js +109 -0
- package/lib/shared-knowledge-review-transport.d.ts +28 -0
- package/lib/shared-knowledge-review-transport.js +85 -0
- package/lib/shared-knowledge.d.ts +117 -0
- package/lib/shared-knowledge.js +240 -0
- package/lib/tools.d.ts +7 -0
- package/lib/tools.js +955 -0
- package/lib/ui-contract.d.ts +277 -0
- package/lib/ui-contract.js +12 -0
- package/lib/ui-host.d.ts +24 -0
- package/lib/ui-host.js +471 -0
- package/lib/untrusted-text.d.ts +16 -0
- package/lib/untrusted-text.js +50 -0
- package/lib/work-ledger.d.ts +109 -0
- package/lib/work-ledger.js +107 -0
- package/lib/work-output-eval.d.ts +16 -0
- package/lib/work-output-eval.js +58 -0
- package/lib/work-runner.d.ts +47 -0
- package/lib/work-runner.js +352 -0
- package/lib/worklog-ledger.d.ts +89 -0
- package/lib/worklog-ledger.js +91 -0
- package/lib/worklog-snapshot.d.ts +34 -0
- package/lib/worklog-snapshot.js +100 -0
- package/lib/writer-guard.d.ts +11 -0
- package/lib/writer-guard.js +207 -0
- package/package.json +172 -4
|
@@ -0,0 +1,818 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const HOME_TYPES: readonly ["personal", "line", "business", "role", "capability"];
|
|
3
|
+
export type HomeType = typeof HOME_TYPES[number];
|
|
4
|
+
export declare const ORGANIZATION_RELATIONS: readonly ["member-of", "fulfills-role", "serves", "belongs-to-line"];
|
|
5
|
+
export type OrganizationRelation = typeof ORGANIZATION_RELATIONS[number];
|
|
6
|
+
export declare const ASSET_KINDS: readonly ["memory", "insight", "knowledge", "method", "identity"];
|
|
7
|
+
export type AssetKind = typeof ASSET_KINDS[number];
|
|
8
|
+
export declare const ASSET_STATUSES: readonly ["candidate", "active", "superseded", "retired"];
|
|
9
|
+
export type AssetStatus = typeof ASSET_STATUSES[number];
|
|
10
|
+
export declare const HomeAddressSchema: z.ZodString;
|
|
11
|
+
export type HomeAddress = `${HomeType}:${string}`;
|
|
12
|
+
export declare const UserAddressSchema: z.ZodString;
|
|
13
|
+
export type UserAddress = `user:${string}`;
|
|
14
|
+
export declare const ProjectSeatAddressSchema: z.ZodString;
|
|
15
|
+
export type ProjectSeatAddress = `seat:${string}:seat-${string}`;
|
|
16
|
+
export declare const InboxAddressSchema: z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>;
|
|
17
|
+
export type InboxAddress = HomeAddress | UserAddress | ProjectSeatAddress;
|
|
18
|
+
export declare const InboxSenderAddressSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>, z.ZodLiteral<"engine:inbox">]>;
|
|
19
|
+
export type InboxSenderAddress = InboxAddress | 'engine:inbox';
|
|
20
|
+
export declare const HumanActionSchema: z.ZodObject<{
|
|
21
|
+
request: z.ZodString;
|
|
22
|
+
reason: z.ZodString;
|
|
23
|
+
recommendation: z.ZodOptional<z.ZodString>;
|
|
24
|
+
href: z.ZodOptional<z.ZodString>;
|
|
25
|
+
label: z.ZodOptional<z.ZodString>;
|
|
26
|
+
}, z.core.$strict>;
|
|
27
|
+
export type HumanAction = z.infer<typeof HumanActionSchema>;
|
|
28
|
+
export declare const EvidenceRefSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
29
|
+
type: z.ZodLiteral<"session-events">;
|
|
30
|
+
sessionId: z.ZodString;
|
|
31
|
+
fromSeq: z.ZodNumber;
|
|
32
|
+
toSeq: z.ZodNumber;
|
|
33
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
34
|
+
type: z.ZodLiteral<"worklog">;
|
|
35
|
+
sessionId: z.ZodString;
|
|
36
|
+
revisionId: z.ZodString;
|
|
37
|
+
fingerprint: z.ZodString;
|
|
38
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
39
|
+
type: z.ZodLiteral<"tool-result">;
|
|
40
|
+
sessionId: z.ZodString;
|
|
41
|
+
eventSeq: z.ZodNumber;
|
|
42
|
+
toolCallId: z.ZodString;
|
|
43
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
44
|
+
type: z.ZodLiteral<"artifact">;
|
|
45
|
+
uri: z.ZodString;
|
|
46
|
+
digest: z.ZodString;
|
|
47
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
48
|
+
type: z.ZodLiteral<"document">;
|
|
49
|
+
uri: z.ZodString;
|
|
50
|
+
digest: z.ZodString;
|
|
51
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
+
type: z.ZodLiteral<"asset">;
|
|
54
|
+
ownerAddress: z.ZodString;
|
|
55
|
+
assetId: z.ZodString;
|
|
56
|
+
revision: z.ZodNumber;
|
|
57
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
58
|
+
type: z.ZodLiteral<"user-confirmation">;
|
|
59
|
+
sessionId: z.ZodString;
|
|
60
|
+
eventSeq: z.ZodNumber;
|
|
61
|
+
}, z.core.$strip>], "type">;
|
|
62
|
+
export type EvidenceRef = z.infer<typeof EvidenceRefSchema>;
|
|
63
|
+
export declare const AgentHomeSchema: z.ZodObject<{
|
|
64
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
65
|
+
id: z.ZodString;
|
|
66
|
+
address: z.ZodString;
|
|
67
|
+
type: z.ZodEnum<{
|
|
68
|
+
personal: "personal";
|
|
69
|
+
line: "line";
|
|
70
|
+
business: "business";
|
|
71
|
+
role: "role";
|
|
72
|
+
capability: "capability";
|
|
73
|
+
}>;
|
|
74
|
+
displayName: z.ZodString;
|
|
75
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
76
|
+
revision: z.ZodNumber;
|
|
77
|
+
contextDigest: z.ZodString;
|
|
78
|
+
status: z.ZodEnum<{
|
|
79
|
+
active: "active";
|
|
80
|
+
archived: "archived";
|
|
81
|
+
}>;
|
|
82
|
+
createdAt: z.ZodString;
|
|
83
|
+
updatedAt: z.ZodString;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
export type AgentHome = z.infer<typeof AgentHomeSchema> & {
|
|
86
|
+
address: HomeAddress;
|
|
87
|
+
};
|
|
88
|
+
export declare const OrganizationLinkSchema: z.ZodObject<{
|
|
89
|
+
from: z.ZodString;
|
|
90
|
+
to: z.ZodString;
|
|
91
|
+
relation: z.ZodEnum<{
|
|
92
|
+
"member-of": "member-of";
|
|
93
|
+
"fulfills-role": "fulfills-role";
|
|
94
|
+
serves: "serves";
|
|
95
|
+
"belongs-to-line": "belongs-to-line";
|
|
96
|
+
}>;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
export declare const OrganizationSchema: z.ZodObject<{
|
|
99
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
100
|
+
id: z.ZodString;
|
|
101
|
+
name: z.ZodString;
|
|
102
|
+
mission: z.ZodString;
|
|
103
|
+
lineHome: z.ZodOptional<z.ZodString>;
|
|
104
|
+
businessHome: z.ZodString;
|
|
105
|
+
members: z.ZodArray<z.ZodObject<{
|
|
106
|
+
personalHome: z.ZodString;
|
|
107
|
+
roleHome: z.ZodString;
|
|
108
|
+
}, z.core.$strip>>;
|
|
109
|
+
capabilityHomes: z.ZodArray<z.ZodString>;
|
|
110
|
+
links: z.ZodArray<z.ZodObject<{
|
|
111
|
+
from: z.ZodString;
|
|
112
|
+
to: z.ZodString;
|
|
113
|
+
relation: z.ZodEnum<{
|
|
114
|
+
"member-of": "member-of";
|
|
115
|
+
"fulfills-role": "fulfills-role";
|
|
116
|
+
serves: "serves";
|
|
117
|
+
"belongs-to-line": "belongs-to-line";
|
|
118
|
+
}>;
|
|
119
|
+
}, z.core.$strip>>;
|
|
120
|
+
revision: z.ZodNumber;
|
|
121
|
+
createdAt: z.ZodString;
|
|
122
|
+
updatedAt: z.ZodString;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
export type Organization = Omit<z.infer<typeof OrganizationSchema>, 'lineHome' | 'businessHome' | 'members' | 'capabilityHomes' | 'links'> & {
|
|
125
|
+
lineHome?: HomeAddress;
|
|
126
|
+
businessHome: HomeAddress;
|
|
127
|
+
members: Array<{
|
|
128
|
+
personalHome: HomeAddress;
|
|
129
|
+
roleHome: HomeAddress;
|
|
130
|
+
}>;
|
|
131
|
+
capabilityHomes: HomeAddress[];
|
|
132
|
+
links: Array<{
|
|
133
|
+
from: HomeAddress;
|
|
134
|
+
to: HomeAddress;
|
|
135
|
+
relation: OrganizationRelation;
|
|
136
|
+
}>;
|
|
137
|
+
};
|
|
138
|
+
export declare const AssetMetadataSchema: z.ZodObject<{
|
|
139
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
140
|
+
id: z.ZodString;
|
|
141
|
+
ownerAddress: z.ZodString;
|
|
142
|
+
kind: z.ZodEnum<{
|
|
143
|
+
memory: "memory";
|
|
144
|
+
insight: "insight";
|
|
145
|
+
knowledge: "knowledge";
|
|
146
|
+
method: "method";
|
|
147
|
+
identity: "identity";
|
|
148
|
+
}>;
|
|
149
|
+
title: z.ZodOptional<z.ZodString>;
|
|
150
|
+
description: z.ZodString;
|
|
151
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
152
|
+
sourceRefs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
153
|
+
type: z.ZodLiteral<"session-events">;
|
|
154
|
+
sessionId: z.ZodString;
|
|
155
|
+
fromSeq: z.ZodNumber;
|
|
156
|
+
toSeq: z.ZodNumber;
|
|
157
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
158
|
+
type: z.ZodLiteral<"worklog">;
|
|
159
|
+
sessionId: z.ZodString;
|
|
160
|
+
revisionId: z.ZodString;
|
|
161
|
+
fingerprint: z.ZodString;
|
|
162
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
163
|
+
type: z.ZodLiteral<"tool-result">;
|
|
164
|
+
sessionId: z.ZodString;
|
|
165
|
+
eventSeq: z.ZodNumber;
|
|
166
|
+
toolCallId: z.ZodString;
|
|
167
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
168
|
+
type: z.ZodLiteral<"artifact">;
|
|
169
|
+
uri: z.ZodString;
|
|
170
|
+
digest: z.ZodString;
|
|
171
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
172
|
+
type: z.ZodLiteral<"document">;
|
|
173
|
+
uri: z.ZodString;
|
|
174
|
+
digest: z.ZodString;
|
|
175
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
176
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
177
|
+
type: z.ZodLiteral<"asset">;
|
|
178
|
+
ownerAddress: z.ZodString;
|
|
179
|
+
assetId: z.ZodString;
|
|
180
|
+
revision: z.ZodNumber;
|
|
181
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
182
|
+
type: z.ZodLiteral<"user-confirmation">;
|
|
183
|
+
sessionId: z.ZodString;
|
|
184
|
+
eventSeq: z.ZodNumber;
|
|
185
|
+
}, z.core.$strip>], "type">>;
|
|
186
|
+
confidence: z.ZodNumber;
|
|
187
|
+
fitness: z.ZodNumber;
|
|
188
|
+
status: z.ZodEnum<{
|
|
189
|
+
candidate: "candidate";
|
|
190
|
+
active: "active";
|
|
191
|
+
superseded: "superseded";
|
|
192
|
+
retired: "retired";
|
|
193
|
+
}>;
|
|
194
|
+
revision: z.ZodNumber;
|
|
195
|
+
proposalId: z.ZodOptional<z.ZodString>;
|
|
196
|
+
proposalApplications: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
197
|
+
proposalId: z.ZodString;
|
|
198
|
+
revision: z.ZodNumber;
|
|
199
|
+
bodySha256: z.ZodString;
|
|
200
|
+
}, z.core.$strip>>>;
|
|
201
|
+
createdAt: z.ZodString;
|
|
202
|
+
updatedAt: z.ZodString;
|
|
203
|
+
}, z.core.$strip>;
|
|
204
|
+
export type AssetMetadata = z.infer<typeof AssetMetadataSchema> & {
|
|
205
|
+
ownerAddress: HomeAddress;
|
|
206
|
+
};
|
|
207
|
+
export interface StoredAsset extends AssetMetadata {
|
|
208
|
+
body: string;
|
|
209
|
+
bodyPath: string;
|
|
210
|
+
}
|
|
211
|
+
export declare const SessionBindingSchema: z.ZodObject<{
|
|
212
|
+
sessionId: z.ZodString;
|
|
213
|
+
homeAddress: z.ZodString;
|
|
214
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
215
|
+
boundAt: z.ZodString;
|
|
216
|
+
}, z.core.$strip>;
|
|
217
|
+
export type SessionBinding = z.infer<typeof SessionBindingSchema> & {
|
|
218
|
+
homeAddress: HomeAddress;
|
|
219
|
+
};
|
|
220
|
+
export declare const ProjectTurnParticipationSchema: z.ZodObject<{
|
|
221
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
222
|
+
projectId: z.ZodString;
|
|
223
|
+
sessionId: z.ZodString;
|
|
224
|
+
homeAddress: z.ZodString;
|
|
225
|
+
turn: z.ZodNumber;
|
|
226
|
+
recordedAt: z.ZodString;
|
|
227
|
+
}, z.core.$strip>;
|
|
228
|
+
export type ProjectTurnParticipation = z.infer<typeof ProjectTurnParticipationSchema> & {
|
|
229
|
+
homeAddress: HomeAddress;
|
|
230
|
+
};
|
|
231
|
+
export declare const LearningMaterialObservationSchema: z.ZodObject<{
|
|
232
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
233
|
+
id: z.ZodString;
|
|
234
|
+
homeAddress: z.ZodString;
|
|
235
|
+
sessionId: z.ZodString;
|
|
236
|
+
fingerprint: z.ZodString;
|
|
237
|
+
eventCount: z.ZodNumber;
|
|
238
|
+
lastSeq: z.ZodNumber;
|
|
239
|
+
sourceKind: z.ZodOptional<z.ZodLiteral<"worklog">>;
|
|
240
|
+
worklogRevisionId: z.ZodOptional<z.ZodString>;
|
|
241
|
+
worklogRevision: z.ZodOptional<z.ZodNumber>;
|
|
242
|
+
observedAt: z.ZodString;
|
|
243
|
+
}, z.core.$strip>;
|
|
244
|
+
export type LearningMaterialObservation = z.infer<typeof LearningMaterialObservationSchema> & {
|
|
245
|
+
homeAddress: HomeAddress;
|
|
246
|
+
};
|
|
247
|
+
export declare const LearningMaterialReviewSchema: z.ZodObject<{
|
|
248
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
249
|
+
materialId: z.ZodString;
|
|
250
|
+
homeAddress: z.ZodString;
|
|
251
|
+
reviewerSessionId: z.ZodString;
|
|
252
|
+
summary: z.ZodString;
|
|
253
|
+
batchRunId: z.ZodOptional<z.ZodString>;
|
|
254
|
+
assetIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
255
|
+
reviewedAt: z.ZodString;
|
|
256
|
+
}, z.core.$strip>;
|
|
257
|
+
export type LearningMaterialReview = z.infer<typeof LearningMaterialReviewSchema> & {
|
|
258
|
+
homeAddress: HomeAddress;
|
|
259
|
+
};
|
|
260
|
+
export declare const LearningLibraryFileSchema: z.ZodObject<{
|
|
261
|
+
path: z.ZodString;
|
|
262
|
+
sha256: z.ZodString;
|
|
263
|
+
bytes: z.ZodNumber;
|
|
264
|
+
}, z.core.$strip>;
|
|
265
|
+
export type LearningLibraryFile = z.infer<typeof LearningLibraryFileSchema>;
|
|
266
|
+
export declare const LearningLibraryChangeSchema: z.ZodObject<{
|
|
267
|
+
path: z.ZodString;
|
|
268
|
+
result: z.ZodEnum<{
|
|
269
|
+
created: "created";
|
|
270
|
+
updated: "updated";
|
|
271
|
+
deleted: "deleted";
|
|
272
|
+
}>;
|
|
273
|
+
before: z.ZodOptional<z.ZodObject<{
|
|
274
|
+
path: z.ZodString;
|
|
275
|
+
sha256: z.ZodString;
|
|
276
|
+
bytes: z.ZodNumber;
|
|
277
|
+
}, z.core.$strip>>;
|
|
278
|
+
after: z.ZodOptional<z.ZodObject<{
|
|
279
|
+
path: z.ZodString;
|
|
280
|
+
sha256: z.ZodString;
|
|
281
|
+
bytes: z.ZodNumber;
|
|
282
|
+
}, z.core.$strip>>;
|
|
283
|
+
}, z.core.$strip>;
|
|
284
|
+
export type LearningLibraryChange = z.infer<typeof LearningLibraryChangeSchema>;
|
|
285
|
+
export declare const LearningBatchRunSchema: z.ZodObject<{
|
|
286
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
287
|
+
id: z.ZodString;
|
|
288
|
+
homeAddress: z.ZodString;
|
|
289
|
+
reviewerSessionId: z.ZodString;
|
|
290
|
+
materialIds: z.ZodArray<z.ZodString>;
|
|
291
|
+
status: z.ZodEnum<{
|
|
292
|
+
open: "open";
|
|
293
|
+
completed: "completed";
|
|
294
|
+
abandoned: "abandoned";
|
|
295
|
+
}>;
|
|
296
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
297
|
+
libraryBefore: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
298
|
+
path: z.ZodString;
|
|
299
|
+
sha256: z.ZodString;
|
|
300
|
+
bytes: z.ZodNumber;
|
|
301
|
+
}, z.core.$strip>>>;
|
|
302
|
+
libraryChanges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
303
|
+
path: z.ZodString;
|
|
304
|
+
result: z.ZodEnum<{
|
|
305
|
+
created: "created";
|
|
306
|
+
updated: "updated";
|
|
307
|
+
deleted: "deleted";
|
|
308
|
+
}>;
|
|
309
|
+
before: z.ZodOptional<z.ZodObject<{
|
|
310
|
+
path: z.ZodString;
|
|
311
|
+
sha256: z.ZodString;
|
|
312
|
+
bytes: z.ZodNumber;
|
|
313
|
+
}, z.core.$strip>>;
|
|
314
|
+
after: z.ZodOptional<z.ZodObject<{
|
|
315
|
+
path: z.ZodString;
|
|
316
|
+
sha256: z.ZodString;
|
|
317
|
+
bytes: z.ZodNumber;
|
|
318
|
+
}, z.core.$strip>>;
|
|
319
|
+
}, z.core.$strip>>>;
|
|
320
|
+
libraryChangeError: z.ZodOptional<z.ZodString>;
|
|
321
|
+
createdAt: z.ZodString;
|
|
322
|
+
updatedAt: z.ZodString;
|
|
323
|
+
}, z.core.$strip>;
|
|
324
|
+
export type LearningBatchRun = z.infer<typeof LearningBatchRunSchema> & {
|
|
325
|
+
homeAddress: HomeAddress;
|
|
326
|
+
};
|
|
327
|
+
export declare const LearningLaunchSchema: z.ZodObject<{
|
|
328
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
329
|
+
id: z.ZodString;
|
|
330
|
+
homeAddress: z.ZodString;
|
|
331
|
+
requestedBySessionId: z.ZodString;
|
|
332
|
+
workerSessionId: z.ZodString;
|
|
333
|
+
workspace: z.ZodString;
|
|
334
|
+
promptMessageId: z.ZodString;
|
|
335
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
336
|
+
model: z.ZodOptional<z.ZodString>;
|
|
337
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
338
|
+
trigger: z.ZodOptional<z.ZodEnum<{
|
|
339
|
+
explicit: "explicit";
|
|
340
|
+
schedule: "schedule";
|
|
341
|
+
}>>;
|
|
342
|
+
scheduledFor: z.ZodOptional<z.ZodNumber>;
|
|
343
|
+
status: z.ZodEnum<{
|
|
344
|
+
active: "active";
|
|
345
|
+
completed: "completed";
|
|
346
|
+
abandoned: "abandoned";
|
|
347
|
+
reserved: "reserved";
|
|
348
|
+
needs_review: "needs_review";
|
|
349
|
+
}>;
|
|
350
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
351
|
+
createdAt: z.ZodString;
|
|
352
|
+
updatedAt: z.ZodString;
|
|
353
|
+
}, z.core.$strip>;
|
|
354
|
+
export type LearningLaunch = z.infer<typeof LearningLaunchSchema> & {
|
|
355
|
+
homeAddress: HomeAddress;
|
|
356
|
+
};
|
|
357
|
+
export declare const LearningScheduleCursorSchema: z.ZodObject<{
|
|
358
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
359
|
+
homeAddress: z.ZodString;
|
|
360
|
+
scheduleFingerprint: z.ZodString;
|
|
361
|
+
nextDueAt: z.ZodNumber;
|
|
362
|
+
lastDueAt: z.ZodOptional<z.ZodNumber>;
|
|
363
|
+
lastOutcome: z.ZodOptional<z.ZodEnum<{
|
|
364
|
+
launched: "launched";
|
|
365
|
+
empty: "empty";
|
|
366
|
+
limit: "limit";
|
|
367
|
+
deferred: "deferred";
|
|
368
|
+
expired: "expired";
|
|
369
|
+
}>>;
|
|
370
|
+
lastLaunchId: z.ZodOptional<z.ZodString>;
|
|
371
|
+
lastReason: z.ZodOptional<z.ZodString>;
|
|
372
|
+
updatedAt: z.ZodString;
|
|
373
|
+
}, z.core.$strip>;
|
|
374
|
+
export type LearningScheduleCursor = z.infer<typeof LearningScheduleCursorSchema> & {
|
|
375
|
+
homeAddress: HomeAddress;
|
|
376
|
+
};
|
|
377
|
+
export declare const LearningSchedulePolicySchema: z.ZodObject<{
|
|
378
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
379
|
+
homeAddress: z.ZodString;
|
|
380
|
+
revision: z.ZodNumber;
|
|
381
|
+
enabled: z.ZodBoolean;
|
|
382
|
+
cron: z.ZodString;
|
|
383
|
+
dailyRuns: z.ZodNumber;
|
|
384
|
+
updatedBy: z.ZodLiteral<"local-ui">;
|
|
385
|
+
updatedAt: z.ZodString;
|
|
386
|
+
}, z.core.$strip>;
|
|
387
|
+
export type LearningSchedulePolicy = z.infer<typeof LearningSchedulePolicySchema> & {
|
|
388
|
+
homeAddress: HomeAddress;
|
|
389
|
+
};
|
|
390
|
+
export declare const FRAME_MODES: readonly ["lead", "contribute", "reference"];
|
|
391
|
+
export type FrameMode = typeof FRAME_MODES[number];
|
|
392
|
+
export declare const AgentFrameSchema: z.ZodObject<{
|
|
393
|
+
address: z.ZodString;
|
|
394
|
+
mode: z.ZodEnum<{
|
|
395
|
+
lead: "lead";
|
|
396
|
+
contribute: "contribute";
|
|
397
|
+
reference: "reference";
|
|
398
|
+
}>;
|
|
399
|
+
revision: z.ZodNumber;
|
|
400
|
+
digest: z.ZodString;
|
|
401
|
+
contextEpoch: z.ZodOptional<z.ZodNumber>;
|
|
402
|
+
openedAt: z.ZodString;
|
|
403
|
+
updatedAt: z.ZodString;
|
|
404
|
+
}, z.core.$strip>;
|
|
405
|
+
export type AgentFrame = Omit<z.infer<typeof AgentFrameSchema>, 'address'> & {
|
|
406
|
+
address: HomeAddress;
|
|
407
|
+
};
|
|
408
|
+
export declare const AgentFrameStateSchema: z.ZodObject<{
|
|
409
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
410
|
+
sessionId: z.ZodString;
|
|
411
|
+
primaryHome: z.ZodString;
|
|
412
|
+
contextEpoch: z.ZodOptional<z.ZodNumber>;
|
|
413
|
+
lastCompactionSeq: z.ZodOptional<z.ZodNumber>;
|
|
414
|
+
frames: z.ZodArray<z.ZodObject<{
|
|
415
|
+
address: z.ZodString;
|
|
416
|
+
mode: z.ZodEnum<{
|
|
417
|
+
lead: "lead";
|
|
418
|
+
contribute: "contribute";
|
|
419
|
+
reference: "reference";
|
|
420
|
+
}>;
|
|
421
|
+
revision: z.ZodNumber;
|
|
422
|
+
digest: z.ZodString;
|
|
423
|
+
contextEpoch: z.ZodOptional<z.ZodNumber>;
|
|
424
|
+
openedAt: z.ZodString;
|
|
425
|
+
updatedAt: z.ZodString;
|
|
426
|
+
}, z.core.$strip>>;
|
|
427
|
+
focusAddress: z.ZodOptional<z.ZodString>;
|
|
428
|
+
updatedAt: z.ZodString;
|
|
429
|
+
}, z.core.$strip>;
|
|
430
|
+
export type AgentFrameState = Omit<z.infer<typeof AgentFrameStateSchema>, 'primaryHome' | 'frames' | 'focusAddress'> & {
|
|
431
|
+
primaryHome: HomeAddress;
|
|
432
|
+
frames: AgentFrame[];
|
|
433
|
+
focusAddress?: HomeAddress;
|
|
434
|
+
};
|
|
435
|
+
export declare const HumanTurnProvenanceSchema: z.ZodObject<{
|
|
436
|
+
sessionId: z.ZodString;
|
|
437
|
+
turn: z.ZodNumber;
|
|
438
|
+
fromSeq: z.ZodNumber;
|
|
439
|
+
userMessageSeq: z.ZodNumber;
|
|
440
|
+
toSeq: z.ZodNumber;
|
|
441
|
+
sourceSha256: z.ZodString;
|
|
442
|
+
recipient: z.ZodString;
|
|
443
|
+
authorityRef: z.ZodString;
|
|
444
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
445
|
+
}, z.core.$strict>;
|
|
446
|
+
export type HumanTurnProvenance = z.infer<typeof HumanTurnProvenanceSchema> & {
|
|
447
|
+
recipient: UserAddress;
|
|
448
|
+
};
|
|
449
|
+
export declare const InboxMessageSchema: z.ZodObject<{
|
|
450
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
451
|
+
id: z.ZodString;
|
|
452
|
+
idempotencyKey: z.ZodString;
|
|
453
|
+
fromAddress: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>, z.ZodLiteral<"engine:inbox">]>;
|
|
454
|
+
returnToSessionId: z.ZodOptional<z.ZodString>;
|
|
455
|
+
wakeOptions: z.ZodOptional<z.ZodObject<{
|
|
456
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
457
|
+
model: z.ZodOptional<z.ZodString>;
|
|
458
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
459
|
+
}, z.core.$strip>>;
|
|
460
|
+
returnAddress: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString]>>;
|
|
461
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
462
|
+
to: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>>;
|
|
463
|
+
cc: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>>;
|
|
464
|
+
subject: z.ZodString;
|
|
465
|
+
body: z.ZodString;
|
|
466
|
+
kind: z.ZodEnum<{
|
|
467
|
+
ordinary: "ordinary";
|
|
468
|
+
"project-outcome-rework": "project-outcome-rework";
|
|
469
|
+
conclusion: "conclusion";
|
|
470
|
+
escalation: "escalation";
|
|
471
|
+
"work-request": "work-request";
|
|
472
|
+
"work-result": "work-result";
|
|
473
|
+
"work-notice": "work-notice";
|
|
474
|
+
"turn-complete": "turn-complete";
|
|
475
|
+
}>;
|
|
476
|
+
priority: z.ZodEnum<{
|
|
477
|
+
normal: "normal";
|
|
478
|
+
urgent: "urgent";
|
|
479
|
+
}>;
|
|
480
|
+
due: z.ZodOptional<z.ZodString>;
|
|
481
|
+
contextRefs: z.ZodArray<z.ZodString>;
|
|
482
|
+
humanAction: z.ZodOptional<z.ZodObject<{
|
|
483
|
+
request: z.ZodString;
|
|
484
|
+
reason: z.ZodString;
|
|
485
|
+
recommendation: z.ZodOptional<z.ZodString>;
|
|
486
|
+
href: z.ZodOptional<z.ZodString>;
|
|
487
|
+
label: z.ZodOptional<z.ZodString>;
|
|
488
|
+
}, z.core.$strict>>;
|
|
489
|
+
humanTurn: z.ZodOptional<z.ZodObject<{
|
|
490
|
+
sessionId: z.ZodString;
|
|
491
|
+
turn: z.ZodNumber;
|
|
492
|
+
fromSeq: z.ZodNumber;
|
|
493
|
+
userMessageSeq: z.ZodNumber;
|
|
494
|
+
toSeq: z.ZodNumber;
|
|
495
|
+
sourceSha256: z.ZodString;
|
|
496
|
+
recipient: z.ZodString;
|
|
497
|
+
authorityRef: z.ZodString;
|
|
498
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
499
|
+
}, z.core.$strict>>;
|
|
500
|
+
projectOutcomeRework: z.ZodOptional<z.ZodObject<{
|
|
501
|
+
projectId: z.ZodString;
|
|
502
|
+
claimId: z.ZodString;
|
|
503
|
+
lead: z.ZodString;
|
|
504
|
+
}, z.core.$strict>>;
|
|
505
|
+
automaticEscalation: z.ZodOptional<z.ZodObject<{
|
|
506
|
+
sourceMessageId: z.ZodString;
|
|
507
|
+
authorityRef: z.ZodString;
|
|
508
|
+
}, z.core.$strip>>;
|
|
509
|
+
conclusionArtifact: z.ZodOptional<z.ZodString>;
|
|
510
|
+
replyTo: z.ZodOptional<z.ZodString>;
|
|
511
|
+
rootId: z.ZodString;
|
|
512
|
+
chain: z.ZodNumber;
|
|
513
|
+
topicId: z.ZodOptional<z.ZodString>;
|
|
514
|
+
hop: z.ZodOptional<z.ZodNumber>;
|
|
515
|
+
sentAt: z.ZodString;
|
|
516
|
+
}, z.core.$strip>;
|
|
517
|
+
export type InboxMessage = Omit<z.infer<typeof InboxMessageSchema>, 'fromAddress' | 'to' | 'cc' | 'returnAddress'> & {
|
|
518
|
+
fromAddress: InboxSenderAddress;
|
|
519
|
+
to: InboxAddress[];
|
|
520
|
+
cc: InboxAddress[];
|
|
521
|
+
returnAddress?: HomeAddress | ProjectSeatAddress;
|
|
522
|
+
};
|
|
523
|
+
export declare function inboxShouldConverge(hop: number, topicCount: number): boolean;
|
|
524
|
+
export declare const InboxWakeOriginSchema: z.ZodObject<{
|
|
525
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
526
|
+
sessionId: z.ZodString;
|
|
527
|
+
homeAddress: z.ZodString;
|
|
528
|
+
topicId: z.ZodString;
|
|
529
|
+
hop: z.ZodNumber;
|
|
530
|
+
wakePlanId: z.ZodString;
|
|
531
|
+
createdAt: z.ZodString;
|
|
532
|
+
}, z.core.$strip>;
|
|
533
|
+
export type InboxWakeOrigin = Omit<z.infer<typeof InboxWakeOriginSchema>, 'homeAddress'> & {
|
|
534
|
+
homeAddress: HomeAddress;
|
|
535
|
+
};
|
|
536
|
+
export declare const InboxWakePlanSchema: z.ZodObject<{
|
|
537
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
538
|
+
id: z.ZodString;
|
|
539
|
+
recipient: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
540
|
+
messageIds: z.ZodArray<z.ZodString>;
|
|
541
|
+
sessionId: z.ZodString;
|
|
542
|
+
topicId: z.ZodString;
|
|
543
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
544
|
+
owner: "owner";
|
|
545
|
+
topic: "topic";
|
|
546
|
+
}>>;
|
|
547
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
548
|
+
initial: "initial";
|
|
549
|
+
"nudge-due": "nudge-due";
|
|
550
|
+
"nudge-stale": "nudge-stale";
|
|
551
|
+
}>>;
|
|
552
|
+
hop: z.ZodNumber;
|
|
553
|
+
workspace: z.ZodString;
|
|
554
|
+
dueAt: z.ZodString;
|
|
555
|
+
createdAt: z.ZodString;
|
|
556
|
+
dispatchedAt: z.ZodOptional<z.ZodString>;
|
|
557
|
+
retiredReason: z.ZodOptional<z.ZodString>;
|
|
558
|
+
}, z.core.$strip>;
|
|
559
|
+
export type InboxWakePlan = Omit<z.infer<typeof InboxWakePlanSchema>, 'recipient'> & {
|
|
560
|
+
recipient: HomeAddress | ProjectSeatAddress;
|
|
561
|
+
};
|
|
562
|
+
export declare const InboxReturnRouteSchema: z.ZodObject<{
|
|
563
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
564
|
+
messageId: z.ZodString;
|
|
565
|
+
recipient: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
566
|
+
sessionId: z.ZodString;
|
|
567
|
+
status: z.ZodEnum<{
|
|
568
|
+
queued: "queued";
|
|
569
|
+
fallback: "fallback";
|
|
570
|
+
}>;
|
|
571
|
+
updatedAt: z.ZodString;
|
|
572
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
573
|
+
}, z.core.$strip>;
|
|
574
|
+
export type InboxReturnRoute = Omit<z.infer<typeof InboxReturnRouteSchema>, 'recipient'> & {
|
|
575
|
+
recipient: HomeAddress | ProjectSeatAddress;
|
|
576
|
+
};
|
|
577
|
+
export declare const InboxDeliverySchema: z.ZodObject<{
|
|
578
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
579
|
+
messageId: z.ZodString;
|
|
580
|
+
recipient: z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodString]>;
|
|
581
|
+
status: z.ZodEnum<{
|
|
582
|
+
delivered: "delivered";
|
|
583
|
+
bounced: "bounced";
|
|
584
|
+
}>;
|
|
585
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
586
|
+
wakePolicy: z.ZodOptional<z.ZodEnum<{
|
|
587
|
+
immediate: "immediate";
|
|
588
|
+
batch: "batch";
|
|
589
|
+
scheduled: "scheduled";
|
|
590
|
+
carried: "carried";
|
|
591
|
+
}>>;
|
|
592
|
+
wakeAt: z.ZodOptional<z.ZodString>;
|
|
593
|
+
nudgedAt: z.ZodOptional<z.ZodString>;
|
|
594
|
+
nudgeReason: z.ZodOptional<z.ZodEnum<{
|
|
595
|
+
due: "due";
|
|
596
|
+
stale: "stale";
|
|
597
|
+
}>>;
|
|
598
|
+
handledAt: z.ZodOptional<z.ZodString>;
|
|
599
|
+
handledBySessionId: z.ZodOptional<z.ZodString>;
|
|
600
|
+
handledByUserId: z.ZodOptional<z.ZodString>;
|
|
601
|
+
updatedAt: z.ZodString;
|
|
602
|
+
}, z.core.$strip>;
|
|
603
|
+
export type InboxDelivery = Omit<z.infer<typeof InboxDeliverySchema>, 'recipient'> & {
|
|
604
|
+
recipient: InboxAddress;
|
|
605
|
+
};
|
|
606
|
+
export declare const HumanNotificationPreferenceSchema: z.ZodObject<{
|
|
607
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
608
|
+
recipient: z.ZodString;
|
|
609
|
+
enabled: z.ZodBoolean;
|
|
610
|
+
revision: z.ZodNumber;
|
|
611
|
+
updatedAt: z.ZodString;
|
|
612
|
+
}, z.core.$strict>;
|
|
613
|
+
export type HumanNotificationPreference = Omit<z.infer<typeof HumanNotificationPreferenceSchema>, 'recipient'> & {
|
|
614
|
+
recipient: UserAddress;
|
|
615
|
+
};
|
|
616
|
+
/** A push attempt is unknown before calling an external channel, so crashes cannot cause blind resend. */
|
|
617
|
+
export declare const InboxHumanNotificationSchema: z.ZodObject<{
|
|
618
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
619
|
+
id: z.ZodString;
|
|
620
|
+
messageId: z.ZodString;
|
|
621
|
+
recipient: z.ZodString;
|
|
622
|
+
attempt: z.ZodDefault<z.ZodNumber>;
|
|
623
|
+
priorRejections: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
624
|
+
id: z.ZodString;
|
|
625
|
+
attemptedAt: z.ZodString;
|
|
626
|
+
resolvedAt: z.ZodString;
|
|
627
|
+
reason: z.ZodString;
|
|
628
|
+
}, z.core.$strip>>>;
|
|
629
|
+
status: z.ZodEnum<{
|
|
630
|
+
unknown: "unknown";
|
|
631
|
+
sent: "sent";
|
|
632
|
+
rejected: "rejected";
|
|
633
|
+
suppressed: "suppressed";
|
|
634
|
+
}>;
|
|
635
|
+
attemptedAt: z.ZodOptional<z.ZodString>;
|
|
636
|
+
suppressedAt: z.ZodOptional<z.ZodString>;
|
|
637
|
+
resolvedAt: z.ZodOptional<z.ZodString>;
|
|
638
|
+
providerReceipt: z.ZodOptional<z.ZodString>;
|
|
639
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
640
|
+
}, z.core.$strip>;
|
|
641
|
+
export type InboxHumanNotification = Omit<z.infer<typeof InboxHumanNotificationSchema>, 'recipient'> & {
|
|
642
|
+
recipient: UserAddress;
|
|
643
|
+
};
|
|
644
|
+
export declare const MemoryProposalSchema: z.ZodObject<{
|
|
645
|
+
id: z.ZodString;
|
|
646
|
+
fromAddress: z.ZodString;
|
|
647
|
+
toAddress: z.ZodString;
|
|
648
|
+
proposedKind: z.ZodEnum<{
|
|
649
|
+
memory: "memory";
|
|
650
|
+
insight: "insight";
|
|
651
|
+
knowledge: "knowledge";
|
|
652
|
+
method: "method";
|
|
653
|
+
identity: "identity";
|
|
654
|
+
}>;
|
|
655
|
+
description: z.ZodString;
|
|
656
|
+
body: z.ZodString;
|
|
657
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
658
|
+
sourceRefs: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
659
|
+
type: z.ZodLiteral<"session-events">;
|
|
660
|
+
sessionId: z.ZodString;
|
|
661
|
+
fromSeq: z.ZodNumber;
|
|
662
|
+
toSeq: z.ZodNumber;
|
|
663
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
664
|
+
type: z.ZodLiteral<"worklog">;
|
|
665
|
+
sessionId: z.ZodString;
|
|
666
|
+
revisionId: z.ZodString;
|
|
667
|
+
fingerprint: z.ZodString;
|
|
668
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
669
|
+
type: z.ZodLiteral<"tool-result">;
|
|
670
|
+
sessionId: z.ZodString;
|
|
671
|
+
eventSeq: z.ZodNumber;
|
|
672
|
+
toolCallId: z.ZodString;
|
|
673
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
674
|
+
type: z.ZodLiteral<"artifact">;
|
|
675
|
+
uri: z.ZodString;
|
|
676
|
+
digest: z.ZodString;
|
|
677
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
678
|
+
type: z.ZodLiteral<"document">;
|
|
679
|
+
uri: z.ZodString;
|
|
680
|
+
digest: z.ZodString;
|
|
681
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
682
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
683
|
+
type: z.ZodLiteral<"asset">;
|
|
684
|
+
ownerAddress: z.ZodString;
|
|
685
|
+
assetId: z.ZodString;
|
|
686
|
+
revision: z.ZodNumber;
|
|
687
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
688
|
+
type: z.ZodLiteral<"user-confirmation">;
|
|
689
|
+
sessionId: z.ZodString;
|
|
690
|
+
eventSeq: z.ZodNumber;
|
|
691
|
+
}, z.core.$strip>], "type">>;
|
|
692
|
+
status: z.ZodEnum<{
|
|
693
|
+
rejected: "rejected";
|
|
694
|
+
pending: "pending";
|
|
695
|
+
accepted: "accepted";
|
|
696
|
+
withdrawn: "withdrawn";
|
|
697
|
+
}>;
|
|
698
|
+
baseAsset: z.ZodOptional<z.ZodObject<{
|
|
699
|
+
id: z.ZodString;
|
|
700
|
+
revision: z.ZodNumber;
|
|
701
|
+
bodySha256: z.ZodString;
|
|
702
|
+
}, z.core.$strip>>;
|
|
703
|
+
targetAssetId: z.ZodOptional<z.ZodString>;
|
|
704
|
+
appliedAssetRevision: z.ZodOptional<z.ZodNumber>;
|
|
705
|
+
appliedBodySha256: z.ZodOptional<z.ZodString>;
|
|
706
|
+
humanReview: z.ZodOptional<z.ZodObject<{
|
|
707
|
+
reviewerId: z.ZodString;
|
|
708
|
+
authorityRef: z.ZodString;
|
|
709
|
+
action: z.ZodEnum<{
|
|
710
|
+
accept: "accept";
|
|
711
|
+
reject: "reject";
|
|
712
|
+
}>;
|
|
713
|
+
decision: z.ZodString;
|
|
714
|
+
reviewedAt: z.ZodString;
|
|
715
|
+
}, z.core.$strip>>;
|
|
716
|
+
decision: z.ZodOptional<z.ZodString>;
|
|
717
|
+
createdAt: z.ZodString;
|
|
718
|
+
decidedAt: z.ZodOptional<z.ZodString>;
|
|
719
|
+
}, z.core.$strip>;
|
|
720
|
+
export type MemoryProposal = z.infer<typeof MemoryProposalSchema> & {
|
|
721
|
+
fromAddress: HomeAddress;
|
|
722
|
+
toAddress: HomeAddress;
|
|
723
|
+
};
|
|
724
|
+
export declare const FITNESS_SIGNALS: readonly ["retrieved", "applied", "confirmed", "contradicted", "failed"];
|
|
725
|
+
export type FitnessSignal = typeof FITNESS_SIGNALS[number];
|
|
726
|
+
export declare const FitnessReceiptSchema: z.ZodObject<{
|
|
727
|
+
id: z.ZodString;
|
|
728
|
+
assetId: z.ZodString;
|
|
729
|
+
ownerAddress: z.ZodString;
|
|
730
|
+
sessionId: z.ZodString;
|
|
731
|
+
eventSeq: z.ZodOptional<z.ZodNumber>;
|
|
732
|
+
assetRevision: z.ZodOptional<z.ZodNumber>;
|
|
733
|
+
assetBodySha256: z.ZodOptional<z.ZodString>;
|
|
734
|
+
signal: z.ZodEnum<{
|
|
735
|
+
retrieved: "retrieved";
|
|
736
|
+
applied: "applied";
|
|
737
|
+
confirmed: "confirmed";
|
|
738
|
+
contradicted: "contradicted";
|
|
739
|
+
failed: "failed";
|
|
740
|
+
}>;
|
|
741
|
+
outcome: z.ZodOptional<z.ZodString>;
|
|
742
|
+
createdAt: z.ZodString;
|
|
743
|
+
}, z.core.$strip>;
|
|
744
|
+
export type FitnessReceipt = z.infer<typeof FitnessReceiptSchema> & {
|
|
745
|
+
ownerAddress: HomeAddress;
|
|
746
|
+
};
|
|
747
|
+
export declare const LEARNING_CHECKPOINT_STATUSES: readonly ["pending", "remembered", "skipped", "failed"];
|
|
748
|
+
export type LearningCheckpointStatus = typeof LEARNING_CHECKPOINT_STATUSES[number];
|
|
749
|
+
export declare const LearningCheckpointSchema: z.ZodObject<{
|
|
750
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
751
|
+
id: z.ZodString;
|
|
752
|
+
sessionId: z.ZodString;
|
|
753
|
+
turn: z.ZodNumber;
|
|
754
|
+
homeAddress: z.ZodString;
|
|
755
|
+
reason: z.ZodLiteral<"explicit-correction">;
|
|
756
|
+
status: z.ZodEnum<{
|
|
757
|
+
pending: "pending";
|
|
758
|
+
failed: "failed";
|
|
759
|
+
remembered: "remembered";
|
|
760
|
+
skipped: "skipped";
|
|
761
|
+
}>;
|
|
762
|
+
evidenceRef: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
763
|
+
type: z.ZodLiteral<"session-events">;
|
|
764
|
+
sessionId: z.ZodString;
|
|
765
|
+
fromSeq: z.ZodNumber;
|
|
766
|
+
toSeq: z.ZodNumber;
|
|
767
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
768
|
+
type: z.ZodLiteral<"worklog">;
|
|
769
|
+
sessionId: z.ZodString;
|
|
770
|
+
revisionId: z.ZodString;
|
|
771
|
+
fingerprint: z.ZodString;
|
|
772
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
773
|
+
type: z.ZodLiteral<"tool-result">;
|
|
774
|
+
sessionId: z.ZodString;
|
|
775
|
+
eventSeq: z.ZodNumber;
|
|
776
|
+
toolCallId: z.ZodString;
|
|
777
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
778
|
+
type: z.ZodLiteral<"artifact">;
|
|
779
|
+
uri: z.ZodString;
|
|
780
|
+
digest: z.ZodString;
|
|
781
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
782
|
+
type: z.ZodLiteral<"document">;
|
|
783
|
+
uri: z.ZodString;
|
|
784
|
+
digest: z.ZodString;
|
|
785
|
+
authority: z.ZodOptional<z.ZodString>;
|
|
786
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
787
|
+
type: z.ZodLiteral<"asset">;
|
|
788
|
+
ownerAddress: z.ZodString;
|
|
789
|
+
assetId: z.ZodString;
|
|
790
|
+
revision: z.ZodNumber;
|
|
791
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
792
|
+
type: z.ZodLiteral<"user-confirmation">;
|
|
793
|
+
sessionId: z.ZodString;
|
|
794
|
+
eventSeq: z.ZodNumber;
|
|
795
|
+
}, z.core.$strip>], "type">;
|
|
796
|
+
excerpt: z.ZodString;
|
|
797
|
+
assetId: z.ZodOptional<z.ZodString>;
|
|
798
|
+
decision: z.ZodOptional<z.ZodString>;
|
|
799
|
+
createdAt: z.ZodString;
|
|
800
|
+
settledAt: z.ZodOptional<z.ZodString>;
|
|
801
|
+
}, z.core.$strip>;
|
|
802
|
+
export type LearningCheckpoint = z.infer<typeof LearningCheckpointSchema> & {
|
|
803
|
+
homeAddress: HomeAddress;
|
|
804
|
+
};
|
|
805
|
+
export interface ContextBudget {
|
|
806
|
+
identityMaxBytes: number;
|
|
807
|
+
indexMaxBytes: number;
|
|
808
|
+
}
|
|
809
|
+
export declare function parseHomeAddress(value: string): HomeAddress;
|
|
810
|
+
export declare function parseInboxAddress(value: string): InboxAddress;
|
|
811
|
+
export declare function isUserAddress(value: string): value is UserAddress;
|
|
812
|
+
export declare function isHomeAddress(value: string): value is HomeAddress;
|
|
813
|
+
export declare function isProjectSeatAddress(value: string): value is ProjectSeatAddress;
|
|
814
|
+
export declare function parseUserAddress(value: string): UserAddress;
|
|
815
|
+
export declare function homeTypeOf(address: HomeAddress): HomeType;
|
|
816
|
+
export declare function stableId(prefix: string, value: string): string;
|
|
817
|
+
export declare function safeHomeId(address: HomeAddress): string;
|
|
818
|
+
export declare function nowIso(): string;
|