@deliverd/sdk 0.12.0 → 0.14.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/src/types.ts CHANGED
@@ -465,6 +465,19 @@ export interface PublishReportInput {
465
465
  changeSummary?: string;
466
466
  /** Publish only if this is still the current version; 0 claims a new slug. */
467
467
  expectedVersion?: number;
468
+ /**
469
+ * The flow this report belongs to, from `flows.create()`. Set on the first
470
+ * publish; a new version keeps whatever flow the report already has.
471
+ */
472
+ flowId?: string;
473
+ /**
474
+ * The task (an objective or a side task) this report is written for. It is
475
+ * then listed on the task and returned in `task.context()`, so the next
476
+ * agent publishes a new version rather than a second report. A later
477
+ * publish naming another task moves it; leaving this out keeps it where it
478
+ * is. Needs `tasks:read` on the key.
479
+ */
480
+ taskId?: string;
468
481
  uploadId?: string;
469
482
  content?: string;
470
483
  files?: InlineFile[];
@@ -481,6 +494,7 @@ export type UpdateReportInput = Pick<
481
494
  | "sourceModel"
482
495
  | "changeSummary"
483
496
  | "expectedVersion"
497
+ | "taskId"
484
498
  >;
485
499
 
486
500
  export interface ReportData {
@@ -490,6 +504,8 @@ export interface ReportData {
490
504
  url: string;
491
505
  status: string;
492
506
  currentVersion: number | null;
507
+ /** The task this report was written for, when it was published with one. */
508
+ taskId?: string | null;
493
509
  [key: string]: unknown;
494
510
  }
495
511
 
@@ -1258,10 +1274,25 @@ export interface TaskContext {
1258
1274
  snapshot: TaskSnapshot | null;
1259
1275
  relevantFindings: TaskContextFinding[];
1260
1276
  sideTasks: TaskContextSideTasks;
1277
+ /**
1278
+ * Reports published for this task, newest first, up to ten. Revise one with
1279
+ * `reports.update()` rather than publishing a second on the same thing.
1280
+ */
1281
+ reports: TaskContextReport[];
1261
1282
  /** One paragraph to say back to yourself to re-anchor on the objective. */
1262
1283
  reanchor: string;
1263
1284
  }
1264
1285
 
1286
+ /** A report published for a task, as its context names it. */
1287
+ export interface TaskContextReport {
1288
+ id: string;
1289
+ title: string;
1290
+ url: string;
1291
+ /** The live version; null until one has gone live. */
1292
+ version: number | null;
1293
+ publishedAt: string | null;
1294
+ }
1295
+
1265
1296
  export interface TaskGraph {
1266
1297
  root: TaskData;
1267
1298
  nodes: TaskNode[];
@@ -1305,6 +1336,38 @@ export interface CreateTaskInput {
1305
1336
  sessionUrl?: string;
1306
1337
  /** The starting state, if anything is already known. */
1307
1338
  state?: TaskStatePatch;
1339
+ /**
1340
+ * Govern it from the start (Compliance Mode, Business and Enterprise): the
1341
+ * AI system, purpose, owners, risk, data and oversight. Refused on a plan
1342
+ * without Compliance Mode.
1343
+ */
1344
+ governance?: GovernanceProfileInput;
1345
+ }
1346
+
1347
+ /** A governed task's profile, as far as it is known. Every field is optional. */
1348
+ export interface GovernanceProfileInput {
1349
+ aiSystemId?: string | null;
1350
+ purpose?: string | null;
1351
+ businessOwner?: string | null;
1352
+ technicalOwner?: string | null;
1353
+ risk?: "low" | "medium" | "high" | "critical";
1354
+ dataClassification?: "public" | "internal" | "confidential" | "restricted" | null;
1355
+ personalData?: boolean;
1356
+ sensitiveData?: boolean;
1357
+ customerFacing?: boolean;
1358
+ productionUse?: boolean;
1359
+ autonomy?: "assist" | "recommend" | "act_with_approval" | "act_autonomously" | null;
1360
+ decisionImpact?: "none" | "informs" | "supports_decision" | "automated_decision" | null;
1361
+ oversight?:
1362
+ | "none"
1363
+ | "post_action_review"
1364
+ | "sampled_review"
1365
+ | "human_on_the_loop"
1366
+ | "human_in_the_loop"
1367
+ | "pre_action_approval"
1368
+ | "dual_approval"
1369
+ | null;
1370
+ jurisdictions?: string[];
1308
1371
  }
1309
1372
 
1310
1373
  export interface ListTasksInput {