@deliverd/sdk 0.26.0 → 0.27.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/README.md +39 -0
- package/dist/data-screen.d.ts.map +1 -1
- package/dist/data-screen.js +6 -0
- package/dist/decision-token.d.ts +102 -0
- package/dist/decision-token.d.ts.map +1 -0
- package/dist/decision-token.js +139 -0
- package/dist/dev.d.ts.map +1 -1
- package/dist/dev.js +15 -0
- package/dist/gates.d.ts +2 -0
- package/dist/gates.d.ts.map +1 -1
- package/dist/gates.js +3 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +4 -0
- package/dist/released.d.ts +1 -1
- package/dist/released.d.ts.map +1 -1
- package/dist/released.js +2538 -0
- package/dist/types.d.ts +67 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/data-screen.ts +3 -0
- package/src/decision-token.ts +184 -0
- package/src/dev.ts +18 -0
- package/src/gates.ts +3 -0
- package/src/index.ts +17 -0
- package/src/messages.ts +4 -0
- package/src/released.ts +2539 -0
- package/src/types.ts +69 -1
package/src/types.ts
CHANGED
|
@@ -240,6 +240,12 @@ export interface GateData {
|
|
|
240
240
|
description: string | null;
|
|
241
241
|
requestedBy: string;
|
|
242
242
|
createdAt: string | null;
|
|
243
|
+
/**
|
|
244
|
+
* The yes, signed, while `canExecute` is true and the deployment signs:
|
|
245
|
+
* pass it to the code that performs the action, which checks it with
|
|
246
|
+
* `deliverd.decisionTokens.verify` before it acts. Null otherwise.
|
|
247
|
+
*/
|
|
248
|
+
decisionToken?: string | null;
|
|
243
249
|
/** Returned once, by the call that made the gate and named a callbackUrl. */
|
|
244
250
|
callbackSecret?: string;
|
|
245
251
|
/** On a single read: what has been reported against it. */
|
|
@@ -264,6 +270,8 @@ export interface GateDecision {
|
|
|
264
270
|
changes: FieldChange[];
|
|
265
271
|
id: string;
|
|
266
272
|
approvalUrl: string | null;
|
|
273
|
+
/** The signed yes, for the code that performs the action to verify. Null unless it may be acted on now. */
|
|
274
|
+
decisionToken: string | null;
|
|
267
275
|
gate: unknown;
|
|
268
276
|
}
|
|
269
277
|
|
|
@@ -294,6 +302,26 @@ export interface ApprovalQuestion {
|
|
|
294
302
|
answeredAt: string | null;
|
|
295
303
|
}
|
|
296
304
|
|
|
305
|
+
/**
|
|
306
|
+
* Which agent is asking, as you describe it on a request. Every field is
|
|
307
|
+
* optional; name the ones you know.
|
|
308
|
+
*/
|
|
309
|
+
export interface RequestAgent {
|
|
310
|
+
/** What the agent is called, as people know it. */
|
|
311
|
+
name?: string;
|
|
312
|
+
/** Who makes or runs it: anthropic, openai, cursor, your own company. */
|
|
313
|
+
provider?: string;
|
|
314
|
+
/** Your own id for this agent. */
|
|
315
|
+
externalId?: string;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/** The agent a request declared, as the API returns it. */
|
|
319
|
+
export interface DeclaredAgent {
|
|
320
|
+
name: string | null;
|
|
321
|
+
provider: string | null;
|
|
322
|
+
externalId: string | null;
|
|
323
|
+
}
|
|
324
|
+
|
|
297
325
|
export interface ApprovalData {
|
|
298
326
|
id: string;
|
|
299
327
|
status: ApprovalStatus;
|
|
@@ -340,6 +368,10 @@ export interface ApprovalData {
|
|
|
340
368
|
note: string | null;
|
|
341
369
|
expiresAt: string | null;
|
|
342
370
|
questions: ApprovalQuestion[];
|
|
371
|
+
/** Which agent asked, as the request declared it. Null when it said nothing. Not verified. */
|
|
372
|
+
agent: DeclaredAgent | null;
|
|
373
|
+
/** The model the request said the agent was running on. Not verified. */
|
|
374
|
+
model: string | null;
|
|
343
375
|
createdAt: string;
|
|
344
376
|
}
|
|
345
377
|
|
|
@@ -379,6 +411,14 @@ export interface CreateApprovalInput {
|
|
|
379
411
|
* siblings set this for you.
|
|
380
412
|
*/
|
|
381
413
|
flowId?: string;
|
|
414
|
+
/**
|
|
415
|
+
* Which agent is asking, in your words. One key is often shared by
|
|
416
|
+
* several agents; this says which one was holding it. Recorded, returned
|
|
417
|
+
* and shown as declared — nothing is decided on it.
|
|
418
|
+
*/
|
|
419
|
+
agent?: RequestAgent;
|
|
420
|
+
/** The model the agent is running on, such as `claude-opus-5`. Recorded as declared. */
|
|
421
|
+
model?: string;
|
|
382
422
|
/**
|
|
383
423
|
* Where to POST the outcome when a person answers, instead of polling:
|
|
384
424
|
* HTTPS, and a public address. The call that makes the request returns the
|
|
@@ -767,7 +807,11 @@ export type WebhookEventName =
|
|
|
767
807
|
/** Opt-in: a task moved into blocked, or a side task finished and its
|
|
768
808
|
* result waits to be applied, kept or discarded. */
|
|
769
809
|
| "task.blocked"
|
|
770
|
-
| "side_task.completed"
|
|
810
|
+
| "side_task.completed"
|
|
811
|
+
/** An AI risk indicator went red for a month: its figure, limits and owner. */
|
|
812
|
+
| "risk_indicator.breached"
|
|
813
|
+
/** Opt-in: one audit log entry, with its chain position and hashes. For a SIEM. */
|
|
814
|
+
| "audit.event";
|
|
771
815
|
|
|
772
816
|
export interface WebhookEvent {
|
|
773
817
|
event: WebhookEventName;
|
|
@@ -906,6 +950,14 @@ export interface CreateReviewInput {
|
|
|
906
950
|
* siblings set this for you.
|
|
907
951
|
*/
|
|
908
952
|
flowId?: string;
|
|
953
|
+
/**
|
|
954
|
+
* Which agent is asking, in your words. One key is often shared by
|
|
955
|
+
* several agents; this says which one was holding it. Recorded, returned
|
|
956
|
+
* and shown as declared — nothing is decided on it.
|
|
957
|
+
*/
|
|
958
|
+
agent?: RequestAgent;
|
|
959
|
+
/** The model the agent is running on, such as `claude-opus-5`. Recorded as declared. */
|
|
960
|
+
model?: string;
|
|
909
961
|
/**
|
|
910
962
|
* Where to POST the outcome when a person answers, instead of polling:
|
|
911
963
|
* HTTPS, and a public address. The call that makes the request returns the
|
|
@@ -948,6 +1000,10 @@ export interface ReviewData {
|
|
|
948
1000
|
threadCount: number;
|
|
949
1001
|
settledAt: string | null;
|
|
950
1002
|
expiresAt: string | null;
|
|
1003
|
+
/** Which agent asked, as the request declared it. Null when it said nothing. Not verified. */
|
|
1004
|
+
agent: DeclaredAgent | null;
|
|
1005
|
+
/** The model the request said the agent was running on. Not verified. */
|
|
1006
|
+
model: string | null;
|
|
951
1007
|
createdAt: string;
|
|
952
1008
|
}
|
|
953
1009
|
|
|
@@ -1029,6 +1085,14 @@ export interface CreateCollectionInput {
|
|
|
1029
1085
|
* siblings set this for you.
|
|
1030
1086
|
*/
|
|
1031
1087
|
flowId?: string;
|
|
1088
|
+
/**
|
|
1089
|
+
* Which agent is asking, in your words. One key is often shared by
|
|
1090
|
+
* several agents; this says which one was holding it. Recorded, returned
|
|
1091
|
+
* and shown as declared — nothing is decided on it.
|
|
1092
|
+
*/
|
|
1093
|
+
agent?: RequestAgent;
|
|
1094
|
+
/** The model the agent is running on, such as `claude-opus-5`. Recorded as declared. */
|
|
1095
|
+
model?: string;
|
|
1032
1096
|
/**
|
|
1033
1097
|
* Where to POST the outcome when a person answers, instead of polling:
|
|
1034
1098
|
* HTTPS, and a public address. The call that makes the request returns the
|
|
@@ -1075,6 +1139,10 @@ export interface CollectionData {
|
|
|
1075
1139
|
settledAt: string | null;
|
|
1076
1140
|
dueAt: string | null;
|
|
1077
1141
|
expiresAt: string | null;
|
|
1142
|
+
/** Which agent asked, as the request declared it. Null when it said nothing. Not verified. */
|
|
1143
|
+
agent: DeclaredAgent | null;
|
|
1144
|
+
/** The model the request said the agent was running on. Not verified. */
|
|
1145
|
+
model: string | null;
|
|
1078
1146
|
createdAt: string;
|
|
1079
1147
|
}
|
|
1080
1148
|
|