terse-types 0.4.6 → 0.5.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.
@@ -26,6 +26,7 @@ export declare const ApiRoutes: {
26
26
  ACTIONS: string;
27
27
  BY_AGENT_ID: string;
28
28
  CHAT_BY_RUN_ID: string;
29
+ RETRY_BY_RUN_ID: string;
29
30
  };
30
31
  SESSION: {
31
32
  TOKEN: string;
@@ -25,7 +25,8 @@
25
25
  "ALL": "/run-history",
26
26
  "ACTIONS": "/run-history/actions",
27
27
  "BY_AGENT_ID": "/run-history/:agentId",
28
- "CHAT_BY_RUN_ID": "/run-history/:runId/chat"
28
+ "CHAT_BY_RUN_ID": "/run-history/:runId/chat",
29
+ "RETRY_BY_RUN_ID": "/run-history/:runId/retry"
29
30
  },
30
31
  "SESSION": {
31
32
  "TOKEN": "/session/token"
@@ -26,6 +26,7 @@ export declare const runErrorSchema: z.ZodObject<{
26
26
  code: z.ZodOptional<z.ZodString>;
27
27
  }, z.core.$strip>;
28
28
  export type RunError = z.infer<typeof runErrorSchema>;
29
+ export declare const DEPRECATED_DURABLE_RUNTIME_OUTPUT_LABEL = "compatibility warning";
29
30
  export declare const processOutputSchema: z.ZodObject<{
30
31
  id: z.ZodString;
31
32
  timestamp: z.ZodNumber;
@@ -27,6 +27,7 @@ export const runErrorSchema = modelEventBaseSchema.extend({
27
27
  error: z.string(),
28
28
  code: z.string().optional()
29
29
  });
30
+ export const DEPRECATED_DURABLE_RUNTIME_OUTPUT_LABEL = "compatibility warning";
30
31
  export const processOutputSchema = modelEventBaseSchema.extend({
31
32
  type: z.literal("ProcessOutput"),
32
33
  stream: z.enum(["stdout", "stderr"]),
@@ -90,6 +90,9 @@ export type GetAllRunHistoryResponse = {
90
90
  pageSize: number;
91
91
  total: number;
92
92
  };
93
+ export type RetryFailedRunResponse = {
94
+ accepted: boolean;
95
+ };
93
96
  export type RunHistoryModelEvent = ModelEvent & {
94
97
  id: string;
95
98
  };
package/dist/types.d.ts CHANGED
@@ -14000,12 +14000,22 @@ export declare const sdkApprovalDecisionRequestBodySchema: z.ZodObject<{
14000
14000
  approved: z.ZodBoolean;
14001
14001
  }, z.core.$strip>;
14002
14002
  export type SdkApprovalDecisionRequestBody = z.infer<typeof sdkApprovalDecisionRequestBodySchema>;
14003
- export declare const sdkJobSuspendRequestBodySchema: z.ZodObject<{
14003
+ export declare const sdkJobSuspendRequestBodySchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
14004
14004
  runId: z.ZodString;
14005
- name: z.ZodString;
14005
+ idempotencyKey: z.ZodString;
14006
+ kind: z.ZodLiteral<"timer">;
14007
+ delaySeconds: z.ZodNumber;
14008
+ }, z.core.$strip>, z.ZodObject<{
14009
+ runId: z.ZodString;
14010
+ idempotencyKey: z.ZodString;
14011
+ kind: z.ZodLiteral<"input">;
14012
+ hookToken: z.ZodString;
14013
+ }, z.core.$strip>], "kind">, z.ZodObject<{
14014
+ runId: z.ZodString;
14015
+ name: z.ZodOptional<z.ZodString>;
14006
14016
  delaySeconds: z.ZodNumber;
14007
14017
  idempotencyKey: z.ZodOptional<z.ZodString>;
14008
- }, z.core.$strip>;
14018
+ }, z.core.$strip>]>;
14009
14019
  export type SdkJobSuspendRequestBody = z.infer<typeof sdkJobSuspendRequestBodySchema>;
14010
14020
  export declare const sdkJobSuspendResponseBodySchema: z.ZodObject<{
14011
14021
  success: z.ZodBoolean;
package/dist/types.js CHANGED
@@ -520,13 +520,29 @@ export const sdkApprovalDecisionRequestBodySchema = z.object({
520
520
  stepId: z.string(),
521
521
  approved: z.boolean()
522
522
  });
523
+ const sdkJobSuspendBaseSchema = z.object({
524
+ runId: z.string().min(1),
525
+ idempotencyKey: z.string().min(1)
526
+ });
527
+ const sdkExplicitJobSuspendRequestBodySchema = z.discriminatedUnion("kind", [
528
+ sdkJobSuspendBaseSchema.extend({
529
+ kind: z.literal("timer"),
530
+ delaySeconds: z.number().int().positive()
531
+ }),
532
+ sdkJobSuspendBaseSchema.extend({
533
+ kind: z.literal("input"),
534
+ hookToken: z.string().min(1)
535
+ })
536
+ ]);
523
537
  const validQueueNameSchema = z.string().regex(/^__(?:[a-z][a-z0-9]*_)?wkf_(?:workflow|step)_.+$/, "Must be a valid queue name with a recognized prefix");
524
- export const sdkJobSuspendRequestBodySchema = z.object({
538
+ const sdkLegacyJobSuspendRequestBodySchema = z.object({
525
539
  runId: z.string().min(1),
526
- name: validQueueNameSchema,
540
+ /** @deprecated Accepted for Workflow SDK clients; current runtimes report an explicit suspension kind. */
541
+ name: validQueueNameSchema.optional(),
527
542
  delaySeconds: z.number().int().positive(),
528
543
  idempotencyKey: z.string().min(1).optional()
529
544
  });
545
+ export const sdkJobSuspendRequestBodySchema = z.union([sdkExplicitJobSuspendRequestBodySchema, sdkLegacyJobSuspendRequestBodySchema]);
530
546
  export const sdkJobSuspendResponseBodySchema = z.object({
531
547
  success: z.boolean()
532
548
  });
@@ -685,7 +701,7 @@ export const sdkDeployRequestBodySchema = z
685
701
  sourceZipBase64: z.string().optional(),
686
702
  /** Key of an archive already uploaded to object storage. Preferred over sourceZipBase64. */
687
703
  sourceObjectKey: z.string().optional(),
688
- /** False when no job needs the durable workflow bundle, letting the build skip compiling one. */
704
+ /** Legacy compatibility flag. Current CLIs always send false because durable jobs load transformed source directly. */
689
705
  requiresWorkflowBundle: z.boolean().optional()
690
706
  })
691
707
  .refine(data => !(data.remoteServerUrl && (data.sourceZipBase64 || data.sourceObjectKey)), {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "terse-types",
3
- "version": "0.4.6",
3
+ "version": "0.5.0",
4
4
  "type": "module",
5
5
  "description": "Shared Terse TypeScript types, enums, constants, and helpers.",
6
6
  "main": "./dist/index.js",