@graphlit/durable-agents 1.0.20260614002
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/LICENSE +21 -0
- package/README.md +33 -0
- package/dist/api.d.ts +173 -0
- package/dist/api.js +478 -0
- package/dist/api.js.map +1 -0
- package/dist/auth-flow.d.ts +32 -0
- package/dist/auth-flow.js +135 -0
- package/dist/auth-flow.js.map +1 -0
- package/dist/branding.d.ts +9 -0
- package/dist/branding.js +13 -0
- package/dist/branding.js.map +1 -0
- package/dist/browser.d.ts +1 -0
- package/dist/browser.js +41 -0
- package/dist/browser.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +5587 -0
- package/dist/cli.js.map +1 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +9 -0
- package/dist/client.js.map +1 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.js +12 -0
- package/dist/config.js.map +1 -0
- package/dist/credentials.d.ts +18 -0
- package/dist/credentials.js +101 -0
- package/dist/credentials.js.map +1 -0
- package/dist/format.d.ts +6 -0
- package/dist/format.js +28 -0
- package/dist/format.js.map +1 -0
- package/dist/generated/openapi-client.d.ts +30 -0
- package/dist/generated/openapi-client.js +122 -0
- package/dist/generated/openapi-client.js.map +1 -0
- package/dist/generated/openapi-types.d.ts +519 -0
- package/dist/generated/openapi-types.js +92 -0
- package/dist/generated/openapi-types.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/output.d.ts +24 -0
- package/dist/output.js +18 -0
- package/dist/output.js.map +1 -0
- package/dist/sse.d.ts +16 -0
- package/dist/sse.js +132 -0
- package/dist/sse.js.map +1 -0
- package/dist/types.d.ts +524 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +37 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,524 @@
|
|
|
1
|
+
export interface DurableRef {
|
|
2
|
+
id: string;
|
|
3
|
+
}
|
|
4
|
+
export interface DurableWorkspaceRef {
|
|
5
|
+
name: string | null;
|
|
6
|
+
slug: string | null;
|
|
7
|
+
}
|
|
8
|
+
export interface DurableNamedRef extends DurableRef {
|
|
9
|
+
name: string;
|
|
10
|
+
}
|
|
11
|
+
export interface DurableList<T> {
|
|
12
|
+
data: T[];
|
|
13
|
+
next_cursor: string | null;
|
|
14
|
+
}
|
|
15
|
+
export interface DurableApiKey {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
scopes: string[];
|
|
19
|
+
tenant: DurableRef;
|
|
20
|
+
workspace?: DurableWorkspaceRef | null;
|
|
21
|
+
created_at: string;
|
|
22
|
+
last_seen_at: string | null;
|
|
23
|
+
revoked_at: string | null;
|
|
24
|
+
}
|
|
25
|
+
export type DurableApiKeyList = DurableList<DurableApiKey>;
|
|
26
|
+
export interface DurableApiKeyCreateResponse {
|
|
27
|
+
key: DurableApiKey;
|
|
28
|
+
secret: string;
|
|
29
|
+
}
|
|
30
|
+
export interface DurableBillingUsage {
|
|
31
|
+
owner: 'workspace';
|
|
32
|
+
credit_value_usd: number;
|
|
33
|
+
status: 'active' | 'past_due' | 'paused' | 'cancelled' | 'disabled';
|
|
34
|
+
provider_kind: 'none' | 'stripe';
|
|
35
|
+
provider_customer_id: string | null;
|
|
36
|
+
signup_grant_credits: number;
|
|
37
|
+
bonus_grant_credits: number;
|
|
38
|
+
purchased_credits: number;
|
|
39
|
+
grant_credits: number;
|
|
40
|
+
total_credits: number;
|
|
41
|
+
used_credits: number;
|
|
42
|
+
available_credits: number;
|
|
43
|
+
available_balance_usd: number;
|
|
44
|
+
created_at: string;
|
|
45
|
+
updated_at: string;
|
|
46
|
+
last_graphlit_sync_at: string | null;
|
|
47
|
+
}
|
|
48
|
+
export type DurableBillingFundingStatus = 'payment_required' | 'processing' | 'succeeded' | 'failed' | 'expired' | 'cancelled';
|
|
49
|
+
export interface DurableBillingFundingLineItem {
|
|
50
|
+
name: string;
|
|
51
|
+
unit_amount: number;
|
|
52
|
+
quantity: number;
|
|
53
|
+
description: string;
|
|
54
|
+
}
|
|
55
|
+
export interface DurableBillingFundingTotal {
|
|
56
|
+
type: 'total';
|
|
57
|
+
display_text: string;
|
|
58
|
+
amount: number;
|
|
59
|
+
}
|
|
60
|
+
export interface DurableBillingFundingRequest {
|
|
61
|
+
id: string;
|
|
62
|
+
status: DurableBillingFundingStatus;
|
|
63
|
+
credits: number;
|
|
64
|
+
amount_cents: number;
|
|
65
|
+
currency: 'usd';
|
|
66
|
+
merchant: {
|
|
67
|
+
name: string;
|
|
68
|
+
url: string;
|
|
69
|
+
};
|
|
70
|
+
line_items: DurableBillingFundingLineItem[];
|
|
71
|
+
totals: DurableBillingFundingTotal[];
|
|
72
|
+
context: string;
|
|
73
|
+
mpp: {
|
|
74
|
+
url: string;
|
|
75
|
+
method: 'POST';
|
|
76
|
+
body: {
|
|
77
|
+
funding_request_id: string;
|
|
78
|
+
};
|
|
79
|
+
network_id: string;
|
|
80
|
+
challenge: string;
|
|
81
|
+
debug_decode_command: string;
|
|
82
|
+
pay_command: string;
|
|
83
|
+
};
|
|
84
|
+
link_cli: {
|
|
85
|
+
spend_request_create: {
|
|
86
|
+
payment_method_id_required: true;
|
|
87
|
+
args_without_payment_method: string[];
|
|
88
|
+
};
|
|
89
|
+
mpp_pay: {
|
|
90
|
+
spend_request_id_required: true;
|
|
91
|
+
args_without_spend_request_id: string[];
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
link_mcp: {
|
|
95
|
+
spend_request_create_input_without_payment_method: Record<string, unknown>;
|
|
96
|
+
mpp_pay_input_without_spend_request_id: Record<string, unknown>;
|
|
97
|
+
};
|
|
98
|
+
provider_result: {
|
|
99
|
+
kind: 'stripe';
|
|
100
|
+
payment_intent_id: string | null;
|
|
101
|
+
charge_id: string | null;
|
|
102
|
+
} | null;
|
|
103
|
+
failure_code: string | null;
|
|
104
|
+
failure_message: string | null;
|
|
105
|
+
created_at: string;
|
|
106
|
+
expires_at: string;
|
|
107
|
+
completed_at: string | null;
|
|
108
|
+
updated_at: string;
|
|
109
|
+
}
|
|
110
|
+
export interface DurableBillingFundingCompletion {
|
|
111
|
+
funding_request: DurableBillingFundingRequest;
|
|
112
|
+
usage: DurableBillingUsage | null;
|
|
113
|
+
}
|
|
114
|
+
export interface DurableAgentChannel {
|
|
115
|
+
type: string;
|
|
116
|
+
status: 'active' | 'disabled' | 'needs_configuration';
|
|
117
|
+
config: Record<string, unknown>;
|
|
118
|
+
}
|
|
119
|
+
export interface DurableAgentTarget {
|
|
120
|
+
type: string;
|
|
121
|
+
name: string | null;
|
|
122
|
+
default: boolean;
|
|
123
|
+
config: Record<string, unknown>;
|
|
124
|
+
}
|
|
125
|
+
export interface DurableAgentTrigger {
|
|
126
|
+
kinds: string[];
|
|
127
|
+
sources: DurableRef[];
|
|
128
|
+
}
|
|
129
|
+
export interface DurableAgent {
|
|
130
|
+
id: string;
|
|
131
|
+
name: string;
|
|
132
|
+
description: string | null;
|
|
133
|
+
state: string;
|
|
134
|
+
mode: string;
|
|
135
|
+
prompt: string | null;
|
|
136
|
+
focus: string | null;
|
|
137
|
+
trigger: DurableAgentTrigger | null;
|
|
138
|
+
persona: DurableRef | null;
|
|
139
|
+
model: string | null;
|
|
140
|
+
effort: string | null;
|
|
141
|
+
channels: DurableAgentChannel[];
|
|
142
|
+
targets: DurableAgentTarget[];
|
|
143
|
+
heartbeat: Record<string, unknown> | null;
|
|
144
|
+
schedule: Record<string, unknown> | null;
|
|
145
|
+
webhook_url: string | null;
|
|
146
|
+
created_at: string;
|
|
147
|
+
updated_at: string;
|
|
148
|
+
}
|
|
149
|
+
export type DurableAgentList = DurableList<DurableAgent>;
|
|
150
|
+
export interface DurableContent {
|
|
151
|
+
id: string;
|
|
152
|
+
state: string;
|
|
153
|
+
name: string;
|
|
154
|
+
uri: string | null;
|
|
155
|
+
identifier: string | null;
|
|
156
|
+
type: string | null;
|
|
157
|
+
file_type: string | null;
|
|
158
|
+
mime_type: string | null;
|
|
159
|
+
feed: DurableNamedRef | null;
|
|
160
|
+
source_metadata: {
|
|
161
|
+
uri: string | null;
|
|
162
|
+
identifier: string | null;
|
|
163
|
+
feed: DurableNamedRef | null;
|
|
164
|
+
};
|
|
165
|
+
labels?: string[];
|
|
166
|
+
collections?: DurableNamedRef[];
|
|
167
|
+
summary: string | null;
|
|
168
|
+
custom_summary: string | null;
|
|
169
|
+
creation_date: string;
|
|
170
|
+
modified_date: string | null;
|
|
171
|
+
original_date: string | null;
|
|
172
|
+
finished_date: string | null;
|
|
173
|
+
file_creation_date: string | null;
|
|
174
|
+
file_modified_date: string | null;
|
|
175
|
+
created_at: string;
|
|
176
|
+
updated_at: string;
|
|
177
|
+
}
|
|
178
|
+
export interface DurableContentInspectRef {
|
|
179
|
+
uri: string;
|
|
180
|
+
name?: string;
|
|
181
|
+
}
|
|
182
|
+
export interface DurableContentInspection {
|
|
183
|
+
uri: string;
|
|
184
|
+
resource_type: 'content';
|
|
185
|
+
content: DurableContent;
|
|
186
|
+
name: string;
|
|
187
|
+
mime_type: string | null;
|
|
188
|
+
text: string;
|
|
189
|
+
summary: string | null;
|
|
190
|
+
markdown: string | null;
|
|
191
|
+
description: string | null;
|
|
192
|
+
metadata: Record<string, unknown>;
|
|
193
|
+
parent: DurableContentInspectRef | null;
|
|
194
|
+
children: DurableContentInspectRef[];
|
|
195
|
+
provenance: {
|
|
196
|
+
source: 'markdown' | 'summary' | 'description' | 'resource';
|
|
197
|
+
reused_existing_data: boolean;
|
|
198
|
+
};
|
|
199
|
+
coverage: {
|
|
200
|
+
status: 'full' | 'partial' | 'preview' | 'truncated';
|
|
201
|
+
source_kind: 'inline_markdown' | 'stored_summary' | 'stored_description' | 'resource_name';
|
|
202
|
+
full_text_available: boolean;
|
|
203
|
+
total_chars: number;
|
|
204
|
+
returned_chars: number;
|
|
205
|
+
truncation_reason: string | null;
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
export type DurableContentList = DurableList<DurableContent>;
|
|
209
|
+
export interface DurableVfsEntry {
|
|
210
|
+
path: string;
|
|
211
|
+
name: string;
|
|
212
|
+
kind: 'directory' | 'content';
|
|
213
|
+
content_id: string | null;
|
|
214
|
+
directory_path: string | null;
|
|
215
|
+
type: string | null;
|
|
216
|
+
file_type?: string | null;
|
|
217
|
+
mime_type: string | null;
|
|
218
|
+
labels?: string[];
|
|
219
|
+
collections?: DurableNamedRef[];
|
|
220
|
+
canonical_path?: string | null;
|
|
221
|
+
aliases?: string[];
|
|
222
|
+
created_at: string | null;
|
|
223
|
+
updated_at: string | null;
|
|
224
|
+
}
|
|
225
|
+
export type DurableVfsEntryList = DurableList<DurableVfsEntry>;
|
|
226
|
+
export interface DurableVfsItem {
|
|
227
|
+
entry: DurableVfsEntry;
|
|
228
|
+
content: DurableContent | null;
|
|
229
|
+
body: {
|
|
230
|
+
format: 'markdown' | 'summary' | 'name';
|
|
231
|
+
value: string;
|
|
232
|
+
} | null;
|
|
233
|
+
children: {
|
|
234
|
+
directories: number;
|
|
235
|
+
contents: number;
|
|
236
|
+
} | null;
|
|
237
|
+
}
|
|
238
|
+
export interface DurableVfsSearchMatch {
|
|
239
|
+
path: string;
|
|
240
|
+
content_id: string;
|
|
241
|
+
name: string;
|
|
242
|
+
directory_path: string;
|
|
243
|
+
type: string | null;
|
|
244
|
+
file_type?: string | null;
|
|
245
|
+
mime_type: string | null;
|
|
246
|
+
labels?: string[];
|
|
247
|
+
collections?: DurableNamedRef[];
|
|
248
|
+
score: number | null;
|
|
249
|
+
snippet: string | null;
|
|
250
|
+
}
|
|
251
|
+
export type DurableVfsSearchResult = DurableList<DurableVfsSearchMatch>;
|
|
252
|
+
export interface DurablePersona {
|
|
253
|
+
id: string;
|
|
254
|
+
state: string;
|
|
255
|
+
type: 'agent';
|
|
256
|
+
name: string;
|
|
257
|
+
role: string | null;
|
|
258
|
+
instructions: string;
|
|
259
|
+
created_at: string;
|
|
260
|
+
updated_at: string;
|
|
261
|
+
}
|
|
262
|
+
export type DurablePersonaList = DurableList<DurablePersona>;
|
|
263
|
+
export interface DurableSkillArgument {
|
|
264
|
+
name: string;
|
|
265
|
+
description: string | null;
|
|
266
|
+
required: boolean | null;
|
|
267
|
+
}
|
|
268
|
+
export interface DurableSkill {
|
|
269
|
+
id: string;
|
|
270
|
+
name: string;
|
|
271
|
+
description: string | null;
|
|
272
|
+
text: string;
|
|
273
|
+
arguments: DurableSkillArgument[];
|
|
274
|
+
state: string;
|
|
275
|
+
created_at: string | null;
|
|
276
|
+
updated_at: string | null;
|
|
277
|
+
}
|
|
278
|
+
export type DurableSkillList = DurableList<DurableSkill>;
|
|
279
|
+
export interface DurableModel {
|
|
280
|
+
id: string;
|
|
281
|
+
name: string;
|
|
282
|
+
display_name: string;
|
|
283
|
+
provider: string;
|
|
284
|
+
durable_preset: string | null;
|
|
285
|
+
capabilities: string[];
|
|
286
|
+
}
|
|
287
|
+
export type DurableModelList = DurableList<DurableModel>;
|
|
288
|
+
export interface DurableAccount {
|
|
289
|
+
id: string;
|
|
290
|
+
provider: 'google' | 'microsoft' | 'dropbox' | 'box' | 'github' | 'gitlab' | 'slack' | 'hubspot' | 'notion' | 'atlassian' | 'attio' | 'intercom' | 'zendesk' | 'salesforce' | 'linear' | 'twitter' | 'zoom' | 'linkedin';
|
|
291
|
+
name: string;
|
|
292
|
+
email: string | null;
|
|
293
|
+
status: 'pending' | 'connected' | 'needs_reauth';
|
|
294
|
+
created_at: string;
|
|
295
|
+
}
|
|
296
|
+
export type DurableAccountList = DurableList<DurableAccount>;
|
|
297
|
+
export interface DurableAccountMutationResult {
|
|
298
|
+
account: DurableAccount;
|
|
299
|
+
authorization_required: boolean;
|
|
300
|
+
authorize_url: string | null;
|
|
301
|
+
}
|
|
302
|
+
export interface DurableDataSourceResource {
|
|
303
|
+
id: string;
|
|
304
|
+
kind: 'url' | 'subreddit' | 'repo' | 'project' | 'channel' | 'database' | 'page' | 'calendar' | 'drive' | 'folder' | 'library' | 'site' | 'space' | 'team' | 'bucket' | 'container' | 'company' | 'person' | 'query' | 'board' | 'card';
|
|
305
|
+
name: string;
|
|
306
|
+
summary: string | null;
|
|
307
|
+
}
|
|
308
|
+
export interface DurableDataSource {
|
|
309
|
+
id: string;
|
|
310
|
+
type: 'web' | 'rss' | 'reddit' | 'twitter' | 'linkedin' | 'discord' | 'gmail' | 'google-calendar' | 'google-drive' | 'google-contacts' | 'outlook' | 'microsoft-calendar' | 'onedrive' | 'microsoft-teams' | 'sharepoint' | 'microsoft-contacts' | 'dropbox' | 'box' | 'amazon-s3' | 'cloudflare-r2' | 'wasabi' | 'backblaze-b2' | 'digitalocean-spaces' | 'azure-blob' | 'github-code' | 'github-issues' | 'github-commits' | 'github-pull-requests' | 'github-milestones' | 'gitlab-code' | 'gitlab-issues' | 'gitlab-commits' | 'gitlab-merge-requests' | 'gitlab-milestones' | 'slack' | 'notion' | 'jira' | 'jira-epics' | 'confluence' | 'linear-issues' | 'linear-initiatives' | 'attio-records' | 'attio-notes' | 'attio-tasks' | 'attio-meetings' | 'hubspot-conversations' | 'hubspot-tasks' | 'hubspot-tickets' | 'hubspot-crm' | 'hubspot-meetings' | 'intercom-tickets' | 'intercom-articles' | 'intercom-conversations' | 'zendesk-tickets' | 'zendesk-articles' | 'productlane-threads' | 'productlane-records' | 'productlane-articles' | 'productlane-changelogs' | 'salesforce-records' | 'salesforce-notes' | 'salesforce-tasks' | 'trello' | 'asana' | 'fireflies' | 'fathom' | 'zoom';
|
|
311
|
+
name: string;
|
|
312
|
+
account: {
|
|
313
|
+
id: string;
|
|
314
|
+
name: string;
|
|
315
|
+
} | null;
|
|
316
|
+
status: 'active' | 'paused' | 'syncing' | 'error' | 'needs_reauth';
|
|
317
|
+
resource: DurableDataSourceResource | null;
|
|
318
|
+
schedule: 'Once' | '1min' | '5min' | '15min' | '30min' | '1hr' | '4hr' | '12hr' | '1day' | '3day' | '7day' | 'Monitor' | null;
|
|
319
|
+
read_limit: number | null;
|
|
320
|
+
created_at: string;
|
|
321
|
+
}
|
|
322
|
+
export type DurableDataSourceList = DurableList<DurableDataSource>;
|
|
323
|
+
export interface DurableDataSourceCreateResult {
|
|
324
|
+
source: DurableDataSource;
|
|
325
|
+
created: boolean;
|
|
326
|
+
}
|
|
327
|
+
export interface DurableDataSourceDiscoveryItem {
|
|
328
|
+
id: string;
|
|
329
|
+
kind: 'url' | 'subreddit' | 'repo' | 'project' | 'channel' | 'database' | 'page' | 'calendar' | 'drive' | 'folder' | 'library' | 'site' | 'space' | 'team' | 'bucket' | 'container' | 'company' | 'person' | 'query' | 'board' | 'card';
|
|
330
|
+
name: string;
|
|
331
|
+
parent_id: string | null;
|
|
332
|
+
summary: string | null;
|
|
333
|
+
account_name?: string | null;
|
|
334
|
+
}
|
|
335
|
+
export type DurableDataSourceDiscoveryList = DurableList<DurableDataSourceDiscoveryItem>;
|
|
336
|
+
export interface DurableConnectorAuthStatus {
|
|
337
|
+
is_authenticated: boolean;
|
|
338
|
+
authenticated_as: string | null;
|
|
339
|
+
authenticated_at: string | null;
|
|
340
|
+
expires_at: string | null;
|
|
341
|
+
provider: string | null;
|
|
342
|
+
token_state: string | null;
|
|
343
|
+
reauth_required: boolean;
|
|
344
|
+
has_refresh_token: boolean;
|
|
345
|
+
last_refresh_attempt_at: string | null;
|
|
346
|
+
last_refresh_error: string | null;
|
|
347
|
+
}
|
|
348
|
+
export interface DurableConnector {
|
|
349
|
+
id: string;
|
|
350
|
+
name: string;
|
|
351
|
+
url: string | null;
|
|
352
|
+
type: 'http' | 'sse' | 'internal';
|
|
353
|
+
status: 'disconnected' | 'connecting' | 'connected' | 'error';
|
|
354
|
+
is_built_in: boolean;
|
|
355
|
+
is_enabled: boolean;
|
|
356
|
+
tools_count: number;
|
|
357
|
+
resources_count: number;
|
|
358
|
+
requires_oauth: boolean;
|
|
359
|
+
auth_status: DurableConnectorAuthStatus | null;
|
|
360
|
+
}
|
|
361
|
+
export type DurableConnectorList = DurableList<DurableConnector>;
|
|
362
|
+
export interface DurableConnectorMutationResult {
|
|
363
|
+
connector: DurableConnector;
|
|
364
|
+
authorization_required: boolean;
|
|
365
|
+
authorize_url: string | null;
|
|
366
|
+
}
|
|
367
|
+
export interface DurableChannelConnector {
|
|
368
|
+
id: string;
|
|
369
|
+
provider: 'slack' | 'teams' | 'discord' | 'telegram' | 'google_chat' | 'whatsapp';
|
|
370
|
+
status: 'active' | 'disabled' | 'error';
|
|
371
|
+
name: string;
|
|
372
|
+
workspace_name: string | null;
|
|
373
|
+
workspace_identifier: string | null;
|
|
374
|
+
created_at: string;
|
|
375
|
+
updated_at: string;
|
|
376
|
+
}
|
|
377
|
+
export type DurableChannelConnectorList = DurableList<DurableChannelConnector>;
|
|
378
|
+
export interface DurableSlackSetupGuide {
|
|
379
|
+
provider: 'slack';
|
|
380
|
+
events_url: string;
|
|
381
|
+
manifest_url: string;
|
|
382
|
+
manifest_create_url: string;
|
|
383
|
+
manifest_yaml: string;
|
|
384
|
+
required_credentials: Array<'bot_token' | 'signing_secret'>;
|
|
385
|
+
}
|
|
386
|
+
export interface DurableEmailInbox {
|
|
387
|
+
id: string;
|
|
388
|
+
email: string;
|
|
389
|
+
username: string;
|
|
390
|
+
status: 'active' | 'deleted';
|
|
391
|
+
created_at: string;
|
|
392
|
+
}
|
|
393
|
+
export type DurableEmailInboxList = DurableList<DurableEmailInbox>;
|
|
394
|
+
export interface DurableEmailMessageAttachment {
|
|
395
|
+
id: string;
|
|
396
|
+
filename: string | null;
|
|
397
|
+
size: number;
|
|
398
|
+
content_type: string | null;
|
|
399
|
+
content_disposition: string | null;
|
|
400
|
+
content_id: string | null;
|
|
401
|
+
}
|
|
402
|
+
export interface DurableEmailMessageSummary {
|
|
403
|
+
id: string;
|
|
404
|
+
inbox_id: string;
|
|
405
|
+
thread_id: string;
|
|
406
|
+
labels: string[];
|
|
407
|
+
timestamp: string;
|
|
408
|
+
from: string;
|
|
409
|
+
to: string[];
|
|
410
|
+
cc: string[];
|
|
411
|
+
bcc: string[];
|
|
412
|
+
subject: string | null;
|
|
413
|
+
preview: string | null;
|
|
414
|
+
reply_to: string[];
|
|
415
|
+
in_reply_to: string | null;
|
|
416
|
+
references: string[];
|
|
417
|
+
attachments_count: number;
|
|
418
|
+
size: number;
|
|
419
|
+
created_at: string;
|
|
420
|
+
updated_at: string;
|
|
421
|
+
}
|
|
422
|
+
export interface DurableEmailMessage extends DurableEmailMessageSummary {
|
|
423
|
+
text: string | null;
|
|
424
|
+
html: string | null;
|
|
425
|
+
extracted_text: string | null;
|
|
426
|
+
extracted_html: string | null;
|
|
427
|
+
headers: Record<string, string>;
|
|
428
|
+
attachments: DurableEmailMessageAttachment[];
|
|
429
|
+
}
|
|
430
|
+
export type DurableEmailMessageList = DurableList<DurableEmailMessageSummary>;
|
|
431
|
+
export interface DurableEmailMessageSendResult {
|
|
432
|
+
message_id: string;
|
|
433
|
+
thread_id: string;
|
|
434
|
+
}
|
|
435
|
+
export interface DurableChannelEndpoint {
|
|
436
|
+
provider: 'email' | 'imessage' | 'slack' | 'teams' | 'discord' | 'telegram' | 'google_chat' | 'whatsapp';
|
|
437
|
+
type: 'channel' | 'inbox' | 'conversation' | 'messaging';
|
|
438
|
+
identifier: string;
|
|
439
|
+
display_name: string;
|
|
440
|
+
workspace_name: string | null;
|
|
441
|
+
workspace_identifier: string | null;
|
|
442
|
+
connector: DurableRef | null;
|
|
443
|
+
agent: DurableRef | null;
|
|
444
|
+
status: 'available' | 'bound' | 'needs_configuration';
|
|
445
|
+
}
|
|
446
|
+
export type DurableChannelEndpointList = DurableList<DurableChannelEndpoint>;
|
|
447
|
+
export interface DurableChannelBinding {
|
|
448
|
+
provider: 'email' | 'imessage' | 'slack' | 'teams' | 'discord' | 'telegram' | 'google_chat' | 'whatsapp';
|
|
449
|
+
type: 'channel' | 'inbox' | 'conversation' | 'messaging';
|
|
450
|
+
identifier: string;
|
|
451
|
+
display_name: string | null;
|
|
452
|
+
agent: DurableRef;
|
|
453
|
+
connector: DurableRef | null;
|
|
454
|
+
instructions: string | null;
|
|
455
|
+
created_at: string | null;
|
|
456
|
+
updated_at: string | null;
|
|
457
|
+
}
|
|
458
|
+
export interface DurableRegisteredPhone {
|
|
459
|
+
phone_number: string;
|
|
460
|
+
label: string | null;
|
|
461
|
+
verified_at: string;
|
|
462
|
+
outbound_opt_in: boolean;
|
|
463
|
+
}
|
|
464
|
+
export type DurableRegisteredPhoneList = DurableList<DurableRegisteredPhone>;
|
|
465
|
+
export interface DurableMessagingStatus {
|
|
466
|
+
provider: 'sendblue';
|
|
467
|
+
shared_number: string | null;
|
|
468
|
+
endpoint: DurableChannelEndpoint | null;
|
|
469
|
+
registered_phones: DurableRegisteredPhone[];
|
|
470
|
+
}
|
|
471
|
+
export interface DurableDeletedResponse {
|
|
472
|
+
deleted: boolean;
|
|
473
|
+
id?: string;
|
|
474
|
+
}
|
|
475
|
+
export interface DurableSentResponse {
|
|
476
|
+
sent: boolean;
|
|
477
|
+
}
|
|
478
|
+
export interface DurableHealth {
|
|
479
|
+
ok: boolean;
|
|
480
|
+
product: string;
|
|
481
|
+
service: string;
|
|
482
|
+
timestamp: string;
|
|
483
|
+
}
|
|
484
|
+
export type DurableRunStatus = 'queued' | 'running' | 'paused' | 'success' | 'error' | 'timeout' | 'skipped' | 'cancelled';
|
|
485
|
+
export interface DurableRun {
|
|
486
|
+
id: string;
|
|
487
|
+
agent: DurableRef;
|
|
488
|
+
status: DurableRunStatus;
|
|
489
|
+
mode: 'sync' | 'async';
|
|
490
|
+
input: Record<string, unknown>;
|
|
491
|
+
output: Record<string, unknown> | null;
|
|
492
|
+
error: {
|
|
493
|
+
code: string;
|
|
494
|
+
message: string;
|
|
495
|
+
} | null;
|
|
496
|
+
usage: Record<string, unknown> | null;
|
|
497
|
+
current_execution_id: string | null;
|
|
498
|
+
terminal_execution_id: string | null;
|
|
499
|
+
latest_execution_id: string | null;
|
|
500
|
+
started_at: string | null;
|
|
501
|
+
completed_at: string | null;
|
|
502
|
+
created_at: string;
|
|
503
|
+
updated_at: string;
|
|
504
|
+
}
|
|
505
|
+
export type DurableRunList = DurableList<DurableRun>;
|
|
506
|
+
export type DurableRunEventType = 'run.started' | 'run.progress' | 'run.paused' | 'run.resumed' | 'run.cancelled' | 'run.completed' | 'run.failed' | 'message.delta' | 'message.completed' | 'reasoning.delta' | 'reasoning.completed' | 'tool.started' | 'tool.updated' | 'tool.completed' | 'tool.failed' | 'artifact.created' | 'artifact.ready' | 'input.requested' | 'input.received' | 'usage.updated';
|
|
507
|
+
export interface DurableRunEvent {
|
|
508
|
+
id: string;
|
|
509
|
+
run_id: string;
|
|
510
|
+
agent_id: string;
|
|
511
|
+
type: DurableRunEventType;
|
|
512
|
+
sequence: number;
|
|
513
|
+
cursor: string;
|
|
514
|
+
created_at: string;
|
|
515
|
+
data: Record<string, unknown>;
|
|
516
|
+
}
|
|
517
|
+
export interface DurableRunEventList {
|
|
518
|
+
data: DurableRunEvent[];
|
|
519
|
+
next_cursor: string | null;
|
|
520
|
+
}
|
|
521
|
+
export interface DurableRunReplay {
|
|
522
|
+
run: DurableRun;
|
|
523
|
+
events: DurableRunEvent[];
|
|
524
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@graphlit/durable-agents",
|
|
3
|
+
"version": "1.0.20260614002",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"durable": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=22.20.0"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"generate": "node scripts/generate-openapi-client.mjs",
|
|
18
|
+
"prebuild": "npm run generate",
|
|
19
|
+
"build": "tsc -p tsconfig.json && node scripts/fix-bin-shebang.cjs",
|
|
20
|
+
"precheck": "npm run generate",
|
|
21
|
+
"check": "tsc --noEmit -p tsconfig.json",
|
|
22
|
+
"prepack": "npm run build"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"commander": "^14.0.3",
|
|
26
|
+
"mime-types": "^2.1.35",
|
|
27
|
+
"yaml": "^2.8.3"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/node": "^20.19.25",
|
|
31
|
+
"typescript": "^5.9.3"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public",
|
|
35
|
+
"registry": "https://registry.npmjs.org/"
|
|
36
|
+
}
|
|
37
|
+
}
|