@shipfox/workflow-document 3.0.0 → 3.1.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/dist/document/index.d.ts +1 -1
- package/dist/document/index.d.ts.map +1 -1
- package/dist/document/index.js +1 -1
- package/dist/document/index.js.map +1 -1
- package/dist/document/step-enums.d.ts +16 -16
- package/dist/document/workflow-document-parser.d.ts.map +1 -1
- package/dist/document/workflow-document.d.ts +57 -56
- package/dist/document/workflow-document.d.ts.map +1 -1
- package/dist/document/workflow-document.js +14 -4
- package/dist/document/workflow-document.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/document/workflow-document.ts"],"sourcesContent":["import {z} from 'zod';\nimport {checkoutTargetValidationIssues} from './checkout-target-validation.js';\nimport {agentThinkingSchema, harnessSchema} from './step-enums.js';\n\nconst stringOrStringArraySchema = z.union([z.string().min(1), z.array(z.string().min(1)).min(1)]);\nconst nonEmptyRecordSchema = <ValueSchema extends z.ZodType>(valueSchema: ValueSchema) =>\n z\n .record(z.string().min(1), valueSchema)\n .refine((value) => Object.keys(value).length > 0, {message: 'Expected at least one entry'});\n\nexport const WORKFLOW_LITERAL_NAME_PATTERN = /^(?:[^$]|\\$\\$\\{\\{|\\$(?!\\{\\{))*$/;\n// The inverse of a literal name: a literal prefix followed by an unescaped\n// `${{`. An enum field that also accepts a template matches one or the other.\nexport const WORKFLOW_INTERPOLATED_VALUE_PATTERN = /^(?:[^$]|\\$\\$\\{\\{|\\$(?!\\{\\{))*\\$\\{\\{/;\n\n// Reasoning effort is an enum so editors can complete it, and a template so a\n// workflow can choose the effort from run context. The resolved value is\n// checked against the harness levels when the step is dispatched.\nexport const agentThinkingFieldSchema = z\n .union([\n agentThinkingSchema,\n z.string().regex(WORKFLOW_INTERPOLATED_VALUE_PATTERN, {\n message:\n 'Agent thinking must be a supported level or a $' +\n '{{ }} interpolation that resolves to one.',\n }),\n ])\n .meta({\n description:\n 'Reasoning effort for an agent step. Supported values depend on the resolved harness. Accepts a $' +\n '{{ }} interpolation. When omitted, Shipfox uses the provider default, or `xhigh` when none is configured.',\n });\n\nconst workflowNameSchema = literalNameSchema(\n 'Workflow name must be literal. Move runtime interpolation to run_name.',\n).meta({description: 'Static literal human-readable workflow name.'});\nconst jobNameSchema = literalNameSchema(\n 'Job name must be literal. Move runtime interpolation to execution_name.',\n).meta({description: 'Static literal human-readable job name.'});\n\nfunction literalNameSchema(message: string) {\n return z.string().min(1).regex(WORKFLOW_LITERAL_NAME_PATTERN, {message});\n}\n\n// Runner shell steps execute on Unix shells, so workflow env names follow the\n// portable POSIX-style variable shape.\nconst envNameSchema = z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/);\nconst envStringValueSchema = z.string().refine((value) => !value.includes('\\u0000'), {\n message: 'Env string values cannot contain null bytes',\n});\nexport const WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES = 128;\nexport const WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES = 32 * 1024;\nexport const workflowDocumentStepOutputTypes = ['string', 'number', 'boolean', 'json'] as const;\nexport const WORKFLOW_DOCUMENT_STEP_OUTPUTS_MAX_ENTRIES = WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES;\nexport const WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_SERIALIZED_BYTES =\n WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES;\nexport const WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_DEPTH = 64;\n\nconst utf8Encoder = new TextEncoder();\n\nexport const workflowDocumentEnvSchema = z\n .record(envNameSchema, z.union([envStringValueSchema, z.number(), z.boolean()]))\n .superRefine((env, ctx) => {\n const entries = Object.keys(env).length;\n if (entries > WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES) {\n ctx.addIssue({\n code: 'custom',\n message: `Env cannot define more than ${WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES} entries.`,\n });\n }\n\n const serializedBytes = utf8Encoder.encode(JSON.stringify(env)).byteLength;\n if (serializedBytes > WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES) {\n ctx.addIssue({\n code: 'custom',\n message: `Env cannot serialize to more than ${WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES} bytes.`,\n });\n }\n })\n .meta({\n description: `Environment variables as string, number, or boolean values. Each map allows up to ${WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES} entries and ${WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES} serialized bytes.`,\n });\n\nconst workflowDocumentStepOutputKeyPattern = /^[a-zA-Z_][a-zA-Z0-9_]*$/;\n\nconst workflowDocumentStepOutputTypeSchema = z.enum(workflowDocumentStepOutputTypes).meta({\n description: 'Declared output type. Use `json` when the output has a JSON Schema.',\n});\n\nconst workflowDocumentStepOutputDeclarationSchema = z\n .union([\n workflowDocumentStepOutputTypeSchema.transform((type) => ({type})),\n z.strictObject({\n type: workflowDocumentStepOutputTypeSchema,\n schema: z\n .unknown()\n .optional()\n .meta({\n description:\n 'JSON Schema for a `json` output. It allows up to ' +\n WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_SERIALIZED_BYTES +\n ' serialized bytes and ' +\n WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_DEPTH +\n ' nesting levels.',\n }),\n }),\n ])\n .superRefine((declaration, ctx) => {\n const schema = 'schema' in declaration ? declaration.schema : undefined;\n if (declaration.type !== 'json' && schema !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['schema'],\n message: '`schema` is only supported for json outputs.',\n });\n return;\n }\n\n if (schema === undefined) return;\n\n if (!isJsonSchemaDocument(schema)) {\n ctx.addIssue({\n code: 'custom',\n path: ['schema'],\n message: 'Schema must be a valid JSON Schema document.',\n });\n return;\n }\n\n const serializedBytes = utf8Encoder.encode(JSON.stringify(schema)).byteLength;\n if (serializedBytes > WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_SERIALIZED_BYTES) {\n ctx.addIssue({\n code: 'custom',\n path: ['schema'],\n message: `Output JSON Schema cannot serialize to more than ${WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_SERIALIZED_BYTES} bytes.`,\n });\n }\n\n const depth = maxJsonDepth(schema);\n if (depth > WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_DEPTH) {\n ctx.addIssue({\n code: 'custom',\n path: ['schema'],\n message: `Output JSON Schema cannot be nested deeper than ${WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_DEPTH} levels.`,\n });\n }\n });\n\nexport const workflowDocumentStepOutputsSchema = z\n .record(z.string(), workflowDocumentStepOutputDeclarationSchema)\n .superRefine((outputs, ctx) => {\n const entries = Object.keys(outputs).length;\n if (entries > WORKFLOW_DOCUMENT_STEP_OUTPUTS_MAX_ENTRIES) {\n ctx.addIssue({\n code: 'custom',\n message: `Step outputs cannot define more than ${WORKFLOW_DOCUMENT_STEP_OUTPUTS_MAX_ENTRIES} entries.`,\n });\n }\n\n for (const key of Object.keys(outputs)) {\n if (workflowDocumentStepOutputKeyPattern.test(key)) continue;\n ctx.addIssue({\n code: 'custom',\n path: [key],\n message: 'Output keys must be CEL identifiers.',\n });\n }\n })\n .meta({\n description: `Named step outputs. Keys must be CEL identifiers and each step allows up to ${WORKFLOW_DOCUMENT_STEP_OUTPUTS_MAX_ENTRIES} declarations.`,\n });\n\nconst workflowDocumentTriggerBaseSchema = {\n source: z.string().min(1).meta({\n description:\n 'Integration connection slug or built-in trigger source. See [Trigger sources](/reference/trigger-sources).',\n }),\n with: z.record(z.string(), z.unknown()).optional().meta({\n description:\n 'Provider-specific values used to match or configure the trigger. See [Trigger sources](/reference/trigger-sources).',\n }),\n filter: z.string().min(1).optional().meta({\n description:\n 'CEL condition that filters matching events. It is not supported for `manual` or `cron` triggers. See [Expressions](/reference/expressions) and [Contexts](/reference/contexts#context-availability).',\n }),\n config: z.record(z.string(), z.unknown()).optional().meta({\n description:\n 'Source-specific configuration. It is supported only for top-level triggers with a known built-in source. See [cron triggers](/reference/trigger-sources#cron).',\n }),\n} satisfies z.ZodRawShape;\n\nexport const triggerSourceConfigSchemas = {\n cron: z.strictObject({\n schedule: z.string().min(1).optional().meta({\n description: 'Cron expression that schedules the workflow.',\n }),\n timezone: z.string().min(1).optional().meta({\n description: 'IANA time zone used to evaluate `schedule`.',\n }),\n }),\n} satisfies Record<string, z.ZodType>;\nconst triggerSourceConfigSchemaRegistry: Readonly<Record<string, z.ZodType>> =\n triggerSourceConfigSchemas;\n\nexport const workflowDocumentTriggerSchema = z\n .strictObject({\n ...workflowDocumentTriggerBaseSchema,\n event: z.string().min(1).meta({\n description: 'Provider event name that starts the workflow.',\n }),\n })\n .superRefine((trigger, ctx) => {\n if (trigger.config === undefined) return;\n\n const configSchema = triggerSourceConfigSchemaRegistry[trigger.source];\n if (configSchema === undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['config'],\n message: `\\`config\\` is not supported for source \\`${trigger.source}\\`.`,\n });\n return;\n }\n\n const configResult = configSchema.safeParse(trigger.config);\n if (configResult.success) return;\n\n for (const configIssue of configResult.error.issues) {\n ctx.addIssue({\n ...configIssue,\n path: ['config', ...configIssue.path],\n });\n }\n });\n\nconst workflowDocumentListeningSchema = z\n .strictObject({\n on: z.array(workflowDocumentTriggerSchema).min(1).meta({\n description: 'Events that start listening. Listening triggers cannot use `config`.',\n }),\n until: z.array(workflowDocumentTriggerSchema).min(1).optional().meta({\n description:\n 'Events that resolve listening. Listening jobs need this, `timeout`, or `max_executions`; these triggers cannot use `config`.',\n }),\n timeout: z.string().min(1).optional().meta({\n description:\n 'Maximum duration to listen before resolving. A listening job needs this, `until`, or `max_executions`.',\n }),\n max_executions: z.number().int().positive().optional().meta({\n description:\n 'Maximum number of matching events before resolving. A listening job needs this, `until`, or `timeout`.',\n }),\n batch: z\n .strictObject({\n debounce: z.string().min(1).optional().meta({\n description: 'Quiet period to wait for more matching events before processing a batch.',\n }),\n max_size: z.number().int().positive().optional().meta({\n description: 'Maximum number of matching events in one batch.',\n }),\n max_wait: z.string().min(1).optional().meta({\n description: 'Maximum time to wait before processing a partial batch.',\n }),\n })\n .refine(\n (value) =>\n value.debounce !== undefined ||\n value.max_size !== undefined ||\n value.max_wait !== undefined,\n {message: 'Expected debounce, max_size, or max_wait'},\n )\n .optional()\n .meta({\n description:\n 'Optional batching policy. Set at least one of `debounce`, `max_size`, or `max_wait`.',\n }),\n on_resolve: z.enum(['finish', 'cancel']).optional().meta({\n description: 'How the job resolves when its listening condition is met.',\n }),\n })\n .superRefine((listening, ctx) => {\n for (const field of ['on', 'until'] as const) {\n for (const [index, trigger] of (listening[field] ?? []).entries()) {\n if (trigger.config !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: [field, index, 'config'],\n message: '`config` is only supported on top-level triggers.',\n });\n }\n }\n }\n });\n\nconst workflowDocumentStepGateSchema = z\n .strictObject({\n success: z.string().min(1).optional().meta({\n description:\n 'CEL expression that must evaluate to true for the step to succeed. See [gate outcomes](/understand/feedback-loops#gate-outcomes).',\n }),\n on_failure: z\n .strictObject({\n restart_from: z.string().min(1).meta({\n description:\n 'Key of an earlier step in the same job to restart from after a failed gate.',\n }),\n feedback: z.string().min(1).optional().meta({\n description: 'Feedback supplied when the gate fails before restarting.',\n }),\n })\n .optional()\n .meta({\n description:\n 'Restart behavior when the success gate fails. See [feedback loops](/understand/feedback-loops).',\n }),\n })\n .refine((value) => value.success !== undefined || value.on_failure !== undefined, {\n message: 'Expected success or on_failure',\n });\n\nconst workflowDocumentCheckoutPermissionsSchema = z\n .strictObject({\n contents: z.enum(['read', 'write']).optional().meta({\n description: 'Repository contents permission granted to checkout.',\n }),\n })\n .optional()\n .meta({\n description: 'Repository permissions used during checkout.',\n });\n\nconst workflowDocumentPersistCredentialsSchema = z.boolean().optional().meta({\n description: 'Whether checkout credentials remain available to later run steps.',\n});\n\nexport const workflowDocumentCheckoutSchema = z\n .strictObject({\n project: z.string().min(1).optional().meta({\n description: 'Shipfox project id to check out. Exclusive with connection and repository.',\n }),\n connection: z.string().min(1).optional().meta({\n description: 'Integration connection slug to use for checkout.',\n }),\n repository: z.string().min(1).optional().meta({\n description: 'Repository to check out, as owner/name or a bare name.',\n }),\n ref: z.string().min(1).optional().meta({\n description: 'Repository ref to check out.',\n }),\n 'fetch-depth': z.number().int().min(0).optional().meta({\n description: 'Number of commits to fetch. Use 0 for full history.',\n }),\n path: z.string().min(1).optional().meta({\n description: 'Relative path under the job workspace where this repository is checked out.',\n }),\n permissions: workflowDocumentCheckoutPermissionsSchema,\n 'persist-credentials': workflowDocumentPersistCredentialsSchema,\n force: z.boolean().optional().meta({\n description: 'Whether checkout may replace an occupied destination.',\n }),\n })\n .superRefine((checkout, ctx) => {\n for (const validationIssue of checkoutTargetValidationIssues(checkout)) {\n const message =\n validationIssue.kind === 'project-with-connection'\n ? '\"connection\" cannot be combined with \"project\".'\n : validationIssue.kind === 'project-with-repository'\n ? '\"repository\" cannot be combined with \"project\".'\n : '\"connection\" requires \"repository\".';\n ctx.addIssue({\n code: 'custom',\n path: [validationIssue.path],\n message,\n });\n }\n });\n\nconst workflowDocumentJobCheckoutSchema = z\n .union([\n z.strictObject({\n permissions: workflowDocumentCheckoutPermissionsSchema,\n 'persist-credentials': workflowDocumentPersistCredentialsSchema,\n }),\n z.literal(false),\n ])\n .meta({\n description:\n 'Checkout settings for repository content and credentials, or false to skip checkout.',\n });\n\nexport const workflowDocumentStepIntegrationSelectionSchema = z.array(z.string().min(1)).min(1);\n\nexport const workflowDocumentStepIntegrationSchema = z.strictObject({\n connection: z.string().min(1).optional().meta({\n description: 'Integration connection slug to use for these tools.',\n }),\n include: workflowDocumentStepIntegrationSelectionSchema.meta({\n description: 'Tool selectors to make available to the agent.',\n }),\n exclude: workflowDocumentStepIntegrationSelectionSchema.optional().meta({\n description: 'Tool selectors to remove from the included tools.',\n }),\n allow_write: z.boolean().optional().meta({\n description: 'Allows write-capable integration tools. Omit or set false for read-only access.',\n }),\n});\n\nexport const workflowDocumentAgentStepFields = [\n 'model',\n 'prompt',\n 'harness',\n 'thinking',\n 'provider',\n 'tools',\n 'integrations',\n] as const;\n\n// A step is a run step (`run`), an inline agent step (`prompt`), or a checkout\n// step (`checkout`), never two kinds at once. They share one strict object so\n// an unknown key is still rejected; the `superRefine` discriminates by which\n// payload keys are present and emits one targeted issue per failure mode (a\n// plain union would surface every branch's errors at once). The `agent`\n// keyword is declared only so the reserved-keyword case produces a clear\n// message instead of a generic \"unrecognized key\".\nexport const workflowDocumentStepSchema = z\n .strictObject({\n key: z\n .string()\n .min(1)\n .optional()\n .meta({description: 'Stable step key for dependencies and outputs.'}),\n if: z\n .string()\n .min(1)\n .optional()\n .meta({\n description:\n 'CEL condition wrapped in exactly one $' +\n '{{ }} interpolation. See [conditionals](/reference/expressions#syntax).',\n }),\n name: z.string().min(1).optional().meta({description: 'Human-readable step name.'}),\n working_directory: z.string().min(1).optional().meta({\n description: 'Working directory for the step, relative to the job workspace.',\n }),\n run: z.string().min(1).optional().meta({\n description: 'Shell command for a run step. Do not combine it with agent-only fields.',\n }),\n checkout: workflowDocumentCheckoutSchema.optional().meta({\n description: 'Repository checkout settings for this step.',\n }),\n model: z.string().min(1).optional().meta({\n description:\n 'Model ID for an agent step. It requires `prompt` and is not valid on a run step.',\n }),\n prompt: z.string().min(1).optional().meta({\n description: 'Prompt for an agent step. It is required when any agent-only field is set.',\n }),\n harness: harnessSchema.optional().meta({\n description:\n 'Agent harness. When omitted, Shipfox uses the workspace default harness, or `pi` when none is configured.',\n }),\n thinking: agentThinkingFieldSchema.optional(),\n provider: z.string().min(1).optional().meta({\n description:\n 'Model provider ID for an agent step. It requires `prompt` and is not valid on a run step.',\n }),\n tools: z.array(z.string().min(1)).min(1).optional().meta({\n description:\n 'Built-in tool IDs for an agent step. It requires `prompt` and is not valid on a run step.',\n }),\n integrations: z.array(workflowDocumentStepIntegrationSchema).min(1).optional().meta({\n description:\n 'Integration tools available to an agent step. It requires `prompt` and is not valid on a run step. See [integration tools](/how-to/author-workflows/use-integration-tools).',\n }),\n agent: z.unknown().optional().meta({\n description: 'Reserved keyword. It is rejected; use `prompt` to define an agent step.',\n }),\n gate: workflowDocumentStepGateSchema.optional().meta({\n description: 'Success gate and optional restart behavior after the step runs.',\n }),\n env: workflowDocumentEnvSchema.optional().meta({\n description: 'Environment variables for a run step. They are not valid on an agent step.',\n }),\n outputs: workflowDocumentStepOutputsSchema.optional().meta({\n description: 'Named output declarations produced by this step.',\n }),\n })\n .superRefine((step, ctx) => {\n if (step.agent !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['agent'],\n message: 'The \"agent\" keyword is reserved for a future step kind and is not supported yet.',\n });\n return;\n }\n\n if (step.checkout !== undefined) {\n if (step.run !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['run'],\n message: '\"run\" is not valid on a checkout step.',\n });\n }\n for (const key of workflowDocumentAgentStepFields) {\n if (step[key] !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: [key],\n message: `\"${key}\" is not valid on a checkout step.`,\n });\n }\n }\n if (step.env !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['env'],\n message: '\"env\" is not valid on a checkout step.',\n });\n }\n return;\n }\n\n if (step.run !== undefined) {\n for (const key of workflowDocumentAgentStepFields) {\n if (step[key] !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: [key],\n message: `\"${key}\" is not valid on a run step.`,\n });\n }\n }\n return;\n }\n\n const isAgent = workflowDocumentAgentStepFields.some((field) => step[field] !== undefined);\n\n if (!isAgent) {\n ctx.addIssue({\n code: 'custom',\n message: 'A step must define either \"run\", an agent \"prompt\", or \"checkout\".',\n });\n return;\n }\n\n if (step.env !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['env'],\n message: '\"env\" is supported only on run steps.',\n });\n }\n if (step.prompt === undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['prompt'],\n message: 'An agent step requires \"prompt\".',\n });\n }\n });\n\nexport const workflowDocumentJobSchema = z.strictObject({\n needs: stringOrStringArraySchema.optional().meta({\n description: 'Job key or keys that must complete before this job starts.',\n }),\n if: z\n .string()\n .min(1)\n .optional()\n .meta({\n description:\n 'CEL condition wrapped in exactly one $' +\n '{{ }} interpolation. See [conditionals](/reference/expressions#syntax).',\n }),\n runner: stringOrStringArraySchema.optional().meta({\n description:\n 'Runner label or ordered fallback labels for this job. See [runners and execution environments](/understand/runners-and-execution-environments).',\n }),\n success: z.string().min(1).optional().meta({\n description:\n 'CEL expression that determines whether the job succeeds. See [Expressions](/reference/expressions#functions-and-macros) and [Contexts](/reference/contexts#context-availability).',\n }),\n outputs: nonEmptyRecordSchema(z.string().min(1)).optional().meta({\n description: 'Named job outputs mapped from step values.',\n }),\n execution_timeout: z.string().min(1).optional().meta({\n description: 'Maximum duration for one job execution.',\n }),\n checkout: workflowDocumentJobCheckoutSchema.optional(),\n listening: workflowDocumentListeningSchema.optional().meta({\n description:\n 'Event-listening configuration for this job. See [listening jobs](/understand/listening-jobs).',\n }),\n name: jobNameSchema.optional(),\n execution_name: z.string().min(1).optional().meta({\n description: 'Dynamic name for each job execution. Supports workflow expressions.',\n }),\n env: workflowDocumentEnvSchema.optional().meta({\n description:\n 'Environment variables for run steps in this job. They do not apply to agent steps. See [secrets and variables](/reference/secrets-variables).',\n }),\n steps: z.array(workflowDocumentStepSchema).min(1).meta({\n description: 'Ordered run or agent steps. Each job needs at least one step.',\n }),\n});\n\nexport const workflowDocumentSchema = z.strictObject({\n name: workflowNameSchema,\n run_name: z.string().min(1).optional().meta({\n description: 'Dynamic name for each workflow run. Supports workflow expressions.',\n }),\n runner: stringOrStringArraySchema.optional().meta({\n description:\n 'Default runner label or ordered fallback labels for run jobs. See [runners and execution environments](/understand/runners-and-execution-environments).',\n }),\n env: workflowDocumentEnvSchema.optional().meta({\n description:\n 'Workflow-level environment variables for run steps. They do not apply to agent steps. See [secrets and variables](/reference/secrets-variables).',\n }),\n triggers: nonEmptyRecordSchema(workflowDocumentTriggerSchema).optional().meta({\n description:\n 'Named events that start workflow runs. A workflow can have at most one `manual` trigger.',\n }),\n jobs: nonEmptyRecordSchema(workflowDocumentJobSchema).meta({\n description: 'Named jobs that make up the workflow. At least one job is required.',\n }),\n});\n\nexport type WorkflowDocument = z.infer<typeof workflowDocumentSchema>;\nexport type WorkflowDocumentCheckout = z.infer<typeof workflowDocumentCheckoutSchema>;\nexport type WorkflowDocumentJobCheckout = z.infer<typeof workflowDocumentJobCheckoutSchema>;\nexport type WorkflowDocumentEnv = z.infer<typeof workflowDocumentEnvSchema>;\nexport type WorkflowDocumentJob = z.infer<typeof workflowDocumentJobSchema>;\nexport type WorkflowDocumentJobListening = z.infer<typeof workflowDocumentListeningSchema>;\nexport type WorkflowDocumentRunStepGate = z.infer<typeof workflowDocumentStepGateSchema>;\nexport type WorkflowDocumentStepIntegration = z.infer<typeof workflowDocumentStepIntegrationSchema>;\nexport type WorkflowDocumentStepOutputType = (typeof workflowDocumentStepOutputTypes)[number];\nexport type WorkflowDocumentStepOutputs = z.infer<typeof workflowDocumentStepOutputsSchema>;\nexport type WorkflowDocumentStep = z.infer<typeof workflowDocumentStepSchema>;\nexport type WorkflowDocumentTrigger = z.infer<typeof workflowDocumentTriggerSchema>;\n\nfunction maxJsonDepth(value: unknown): number {\n if (value === null || typeof value !== 'object') return 0;\n if (Array.isArray(value)) {\n if (value.length === 0) return 1;\n return 1 + Math.max(...value.map(maxJsonDepth));\n }\n\n const entries = Object.values(value);\n if (entries.length === 0) return 1;\n return 1 + Math.max(...entries.map(maxJsonDepth));\n}\n\nfunction isJsonSchemaDocument(value: unknown): boolean {\n return (\n typeof value === 'boolean' ||\n (typeof value === 'object' && value !== null && !Array.isArray(value))\n );\n}\n"],"names":["z","checkoutTargetValidationIssues","agentThinkingSchema","harnessSchema","stringOrStringArraySchema","union","string","min","array","nonEmptyRecordSchema","valueSchema","record","refine","value","Object","keys","length","message","WORKFLOW_LITERAL_NAME_PATTERN","WORKFLOW_INTERPOLATED_VALUE_PATTERN","agentThinkingFieldSchema","regex","meta","description","workflowNameSchema","literalNameSchema","jobNameSchema","envNameSchema","envStringValueSchema","includes","WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES","WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES","workflowDocumentStepOutputTypes","WORKFLOW_DOCUMENT_STEP_OUTPUTS_MAX_ENTRIES","WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_SERIALIZED_BYTES","WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_DEPTH","utf8Encoder","TextEncoder","workflowDocumentEnvSchema","number","boolean","superRefine","env","ctx","entries","addIssue","code","serializedBytes","encode","JSON","stringify","byteLength","workflowDocumentStepOutputKeyPattern","workflowDocumentStepOutputTypeSchema","enum","workflowDocumentStepOutputDeclarationSchema","transform","type","strictObject","schema","unknown","optional","declaration","undefined","path","isJsonSchemaDocument","depth","maxJsonDepth","workflowDocumentStepOutputsSchema","outputs","key","test","workflowDocumentTriggerBaseSchema","source","with","filter","config","triggerSourceConfigSchemas","cron","schedule","timezone","triggerSourceConfigSchemaRegistry","workflowDocumentTriggerSchema","event","trigger","configSchema","configResult","safeParse","success","configIssue","error","issues","workflowDocumentListeningSchema","on","until","timeout","max_executions","int","positive","batch","debounce","max_size","max_wait","on_resolve","listening","field","index","workflowDocumentStepGateSchema","on_failure","restart_from","feedback","workflowDocumentCheckoutPermissionsSchema","contents","workflowDocumentPersistCredentialsSchema","workflowDocumentCheckoutSchema","project","connection","repository","ref","permissions","force","checkout","validationIssue","kind","workflowDocumentJobCheckoutSchema","literal","workflowDocumentStepIntegrationSelectionSchema","workflowDocumentStepIntegrationSchema","include","exclude","allow_write","workflowDocumentAgentStepFields","workflowDocumentStepSchema","if","name","working_directory","run","model","prompt","harness","thinking","provider","tools","integrations","agent","gate","step","isAgent","some","workflowDocumentJobSchema","needs","runner","execution_timeout","execution_name","steps","workflowDocumentSchema","run_name","triggers","jobs","Array","isArray","Math","max","map","values"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AACtB,SAAQC,8BAA8B,QAAO,kCAAkC;AAC/E,SAAQC,mBAAmB,EAAEC,aAAa,QAAO,kBAAkB;AAEnE,MAAMC,4BAA4BJ,EAAEK,KAAK,CAAC;IAACL,EAAEM,MAAM,GAAGC,GAAG,CAAC;IAAIP,EAAEQ,KAAK,CAACR,EAAEM,MAAM,GAAGC,GAAG,CAAC,IAAIA,GAAG,CAAC;CAAG;AAChG,MAAME,uBAAuB,CAAgCC,cAC3DV,EACGW,MAAM,CAACX,EAAEM,MAAM,GAAGC,GAAG,CAAC,IAAIG,aAC1BE,MAAM,CAAC,CAACC,QAAUC,OAAOC,IAAI,CAACF,OAAOG,MAAM,GAAG,GAAG;QAACC,SAAS;IAA6B;AAE7F,OAAO,MAAMC,gCAAgC,kCAAkC;AAC/E,2EAA2E;AAC3E,8EAA8E;AAC9E,OAAO,MAAMC,sCAAsC,uCAAuC;AAE1F,8EAA8E;AAC9E,yEAAyE;AACzE,kEAAkE;AAClE,OAAO,MAAMC,2BAA2BpB,EACrCK,KAAK,CAAC;IACLH;IACAF,EAAEM,MAAM,GAAGe,KAAK,CAACF,qCAAqC;QACpDF,SACE,oDACA;IACJ;CACD,EACAK,IAAI,CAAC;IACJC,aACE,qGACA;AACJ,GAAG;AAEL,MAAMC,qBAAqBC,kBACzB,0EACAH,IAAI,CAAC;IAACC,aAAa;AAA8C;AACnE,MAAMG,gBAAgBD,kBACpB,2EACAH,IAAI,CAAC;IAACC,aAAa;AAAyC;AAE9D,SAASE,kBAAkBR,OAAe;IACxC,OAAOjB,EAAEM,MAAM,GAAGC,GAAG,CAAC,G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OAAO;IACxD,IAAIkJ,MAAMC,OAAO,CAACnJ,QAAQ;QACxB,IAAIA,MAAMG,MAAM,KAAK,GAAG,OAAO;QAC/B,OAAO,IAAIiJ,KAAKC,GAAG,IAAIrJ,MAAMsJ,GAAG,CAAChG;IACnC;IAEA,MAAMvB,UAAU9B,OAAOsJ,MAAM,CAACvJ;IAC9B,IAAI+B,QAAQ5B,MAAM,KAAK,GAAG,OAAO;IACjC,OAAO,IAAIiJ,KAAKC,GAAG,IAAItH,QAAQuH,GAAG,CAAChG;AACrC;AAEA,SAASF,qBAAqBpD,KAAc;IAC1C,OACE,OAAOA,UAAU,aAChB,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAACkJ,MAAMC,OAAO,CAACnJ;AAEnE"}
|
|
1
|
+
{"version":3,"sources":["../../src/document/workflow-document.ts"],"sourcesContent":["import {z} from 'zod';\nimport {checkoutTargetValidationIssues} from './checkout-target-validation.js';\nimport {agentThinkingSchema, harnessSchema} from './step-enums.js';\n\nconst stringOrStringArraySchema = z.union([z.string().min(1), z.array(z.string().min(1)).min(1)]);\nconst nonEmptyRecordSchema = <ValueSchema extends z.ZodType>(valueSchema: ValueSchema) =>\n z\n .record(z.string().min(1), valueSchema)\n .refine((value) => Object.keys(value).length > 0, {message: 'Expected at least one entry'});\n\nexport const WORKFLOW_LITERAL_NAME_PATTERN = /^(?:[^$]|\\$\\$\\{\\{|\\$(?!\\{\\{))*$/;\n// The inverse of a literal name: a literal prefix followed by an unescaped\n// `${{`. An enum field that also accepts a template matches one or the other.\nexport const WORKFLOW_INTERPOLATED_VALUE_PATTERN = /^(?:[^$]|\\$\\$\\{\\{|\\$(?!\\{\\{))*\\$\\{\\{/;\n\n// Reasoning effort is an enum so editors can complete it, and a template so a\n// workflow can choose the effort from run context. The resolved value is\n// checked against the harness levels when the step is dispatched.\nexport const agentThinkingFieldSchema = z\n .union([\n agentThinkingSchema,\n z.string().regex(WORKFLOW_INTERPOLATED_VALUE_PATTERN, {\n message:\n 'Agent thinking must be a supported level or a $' +\n '{{ }} interpolation that resolves to one.',\n }),\n ])\n .meta({\n description:\n 'Reasoning effort for an agent step. Supported values depend on the resolved harness. Accepts a $' +\n '{{ }} interpolation. When omitted, Shipfox uses the provider default, or `xhigh` when none is configured.',\n });\n\nconst workflowNameSchema = literalNameSchema(\n 'Workflow name must be literal. Move runtime interpolation to run_name.',\n).meta({description: 'Static literal human-readable workflow name.'});\nconst jobNameSchema = literalNameSchema(\n 'Job name must be literal. Move runtime interpolation to execution_name.',\n).meta({description: 'Static literal human-readable job name.'});\n\nfunction literalNameSchema(message: string) {\n return z.string().min(1).regex(WORKFLOW_LITERAL_NAME_PATTERN, {message});\n}\n\n// Runner shell steps execute on Unix shells, so workflow env names follow the\n// portable POSIX-style variable shape.\nconst envNameSchema = z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/);\nconst envStringValueSchema = z.string().refine((value) => !value.includes('\\u0000'), {\n message: 'Env string values cannot contain null bytes',\n});\nexport const WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES = 128;\nexport const WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES = 32 * 1024;\nexport const workflowDocumentStepOutputTypes = ['string', 'number', 'boolean', 'json'] as const;\nexport const WORKFLOW_DOCUMENT_JOB_OUTPUTS_MAX_ENTRIES = WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES;\nexport const WORKFLOW_DOCUMENT_STEP_OUTPUTS_MAX_ENTRIES = WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES;\nexport const WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_SERIALIZED_BYTES =\n WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES;\nexport const WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_DEPTH = 64;\n\nconst utf8Encoder = new TextEncoder();\n\nexport const workflowDocumentEnvSchema = z\n .record(envNameSchema, z.union([envStringValueSchema, z.number(), z.boolean()]))\n .superRefine((env, ctx) => {\n const entries = Object.keys(env).length;\n if (entries > WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES) {\n ctx.addIssue({\n code: 'custom',\n message: `Env cannot define more than ${WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES} entries.`,\n });\n }\n\n const serializedBytes = utf8Encoder.encode(JSON.stringify(env)).byteLength;\n if (serializedBytes > WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES) {\n ctx.addIssue({\n code: 'custom',\n message: `Env cannot serialize to more than ${WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES} bytes.`,\n });\n }\n })\n .meta({\n description: `Environment variables as string, number, or boolean values. Each map allows up to ${WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES} entries and ${WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES} serialized bytes.`,\n });\n\nconst workflowDocumentStepOutputKeyPattern = /^[a-zA-Z_][a-zA-Z0-9_]*$/;\n\nconst workflowDocumentStepOutputTypeSchema = z.enum(workflowDocumentStepOutputTypes).meta({\n description: 'Declared output type. Use `json` when the output has a JSON Schema.',\n});\n\nconst workflowDocumentStepOutputDeclarationSchema = z\n .union([\n workflowDocumentStepOutputTypeSchema.transform((type) => ({type})),\n z.strictObject({\n type: workflowDocumentStepOutputTypeSchema,\n schema: z\n .unknown()\n .optional()\n .meta({\n description:\n 'JSON Schema for a `json` output. It allows up to ' +\n WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_SERIALIZED_BYTES +\n ' serialized bytes and ' +\n WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_DEPTH +\n ' nesting levels.',\n }),\n }),\n ])\n .superRefine((declaration, ctx) => {\n const schema = 'schema' in declaration ? declaration.schema : undefined;\n if (declaration.type !== 'json' && schema !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['schema'],\n message: '`schema` is only supported for json outputs.',\n });\n return;\n }\n\n if (schema === undefined) return;\n\n if (!isJsonSchemaDocument(schema)) {\n ctx.addIssue({\n code: 'custom',\n path: ['schema'],\n message: 'Schema must be a valid JSON Schema document.',\n });\n return;\n }\n\n const serializedBytes = utf8Encoder.encode(JSON.stringify(schema)).byteLength;\n if (serializedBytes > WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_SERIALIZED_BYTES) {\n ctx.addIssue({\n code: 'custom',\n path: ['schema'],\n message: `Output JSON Schema cannot serialize to more than ${WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_SERIALIZED_BYTES} bytes.`,\n });\n }\n\n const depth = maxJsonDepth(schema);\n if (depth > WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_DEPTH) {\n ctx.addIssue({\n code: 'custom',\n path: ['schema'],\n message: `Output JSON Schema cannot be nested deeper than ${WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_DEPTH} levels.`,\n });\n }\n });\n\nexport const workflowDocumentStepOutputsSchema = z\n .record(z.string(), workflowDocumentStepOutputDeclarationSchema)\n .superRefine((outputs, ctx) => {\n const entries = Object.keys(outputs).length;\n if (entries > WORKFLOW_DOCUMENT_STEP_OUTPUTS_MAX_ENTRIES) {\n ctx.addIssue({\n code: 'custom',\n message: `Step outputs cannot define more than ${WORKFLOW_DOCUMENT_STEP_OUTPUTS_MAX_ENTRIES} entries.`,\n });\n }\n\n for (const key of Object.keys(outputs)) {\n if (workflowDocumentStepOutputKeyPattern.test(key)) continue;\n ctx.addIssue({\n code: 'custom',\n path: [key],\n message: 'Output keys must be CEL identifiers.',\n });\n }\n })\n .meta({\n description: `Named step outputs. Keys must be CEL identifiers and each step allows up to ${WORKFLOW_DOCUMENT_STEP_OUTPUTS_MAX_ENTRIES} declarations.`,\n });\n\nconst workflowDocumentTriggerBaseSchema = {\n source: z.string().min(1).meta({\n description:\n 'Integration connection slug or built-in trigger source. See [Trigger sources](/reference/trigger-sources).',\n }),\n with: z.record(z.string(), z.unknown()).optional().meta({\n description:\n 'Provider-specific values used to match or configure the trigger. See [Trigger sources](/reference/trigger-sources).',\n }),\n filter: z.string().min(1).optional().meta({\n description:\n 'CEL condition that filters matching events. It is not supported for `manual` or `cron` triggers. See [Expressions](/reference/expressions) and [Contexts](/reference/contexts#context-availability).',\n }),\n config: z.record(z.string(), z.unknown()).optional().meta({\n description:\n 'Source-specific configuration. It is supported only for top-level triggers with a known built-in source. See [cron triggers](/reference/trigger-sources#cron).',\n }),\n} satisfies z.ZodRawShape;\n\nexport const triggerSourceConfigSchemas = {\n cron: z.strictObject({\n schedule: z.string().min(1).optional().meta({\n description: 'Cron expression that schedules the workflow.',\n }),\n timezone: z.string().min(1).optional().meta({\n description: 'IANA time zone used to evaluate `schedule`.',\n }),\n }),\n} satisfies Record<string, z.ZodType>;\nconst triggerSourceConfigSchemaRegistry: Readonly<Record<string, z.ZodType>> =\n triggerSourceConfigSchemas;\n\nexport const workflowDocumentTriggerSchema = z\n .strictObject({\n ...workflowDocumentTriggerBaseSchema,\n event: z.string().min(1).optional().meta({\n description:\n 'Event name that starts the workflow. Omit it to accept every event the source delivers. Sources that deliver one event, such as `manual`, `cron`, and custom webhooks, do not need it.',\n }),\n })\n .superRefine((trigger, ctx) => {\n if (trigger.config === undefined) return;\n\n const configSchema = triggerSourceConfigSchemaRegistry[trigger.source];\n if (configSchema === undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['config'],\n message: `\\`config\\` is not supported for source \\`${trigger.source}\\`.`,\n });\n return;\n }\n\n const configResult = configSchema.safeParse(trigger.config);\n if (configResult.success) return;\n\n for (const configIssue of configResult.error.issues) {\n ctx.addIssue({\n ...configIssue,\n path: ['config', ...configIssue.path],\n });\n }\n });\n\nconst workflowDocumentListeningSchema = z\n .strictObject({\n on: z.array(workflowDocumentTriggerSchema).min(1).meta({\n description: 'Events that start listening. Listening triggers cannot use `config`.',\n }),\n until: z.array(workflowDocumentTriggerSchema).min(1).optional().meta({\n description:\n 'Events that resolve listening. Listening jobs need this, `timeout`, or `max_executions`; these triggers cannot use `config`.',\n }),\n timeout: z.string().min(1).optional().meta({\n description:\n 'Maximum duration to listen before resolving. A listening job needs this, `until`, or `max_executions`.',\n }),\n max_executions: z.number().int().positive().optional().meta({\n description:\n 'Maximum number of matching events before resolving. A listening job needs this, `until`, or `timeout`.',\n }),\n batch: z\n .strictObject({\n debounce: z.string().min(1).optional().meta({\n description: 'Quiet period to wait for more matching events before processing a batch.',\n }),\n max_size: z.number().int().positive().optional().meta({\n description: 'Maximum number of matching events in one batch.',\n }),\n max_wait: z.string().min(1).optional().meta({\n description: 'Maximum time to wait before processing a partial batch.',\n }),\n })\n .refine(\n (value) =>\n value.debounce !== undefined ||\n value.max_size !== undefined ||\n value.max_wait !== undefined,\n {message: 'Expected debounce, max_size, or max_wait'},\n )\n .optional()\n .meta({\n description:\n 'Optional batching policy. Set at least one of `debounce`, `max_size`, or `max_wait`.',\n }),\n on_resolve: z.enum(['finish', 'cancel']).optional().meta({\n description: 'How the job resolves when its listening condition is met.',\n }),\n })\n .superRefine((listening, ctx) => {\n for (const field of ['on', 'until'] as const) {\n for (const [index, trigger] of (listening[field] ?? []).entries()) {\n if (trigger.config !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: [field, index, 'config'],\n message: '`config` is only supported on top-level triggers.',\n });\n }\n }\n }\n });\n\nconst workflowDocumentStepGateSchema = z\n .strictObject({\n success: z.string().min(1).optional().meta({\n description:\n 'CEL expression that must evaluate to true for the step to succeed. See [gate outcomes](/understand/feedback-loops#gate-outcomes).',\n }),\n on_failure: z\n .strictObject({\n restart_from: z.string().min(1).meta({\n description:\n 'Key of an earlier step in the same job to restart from after a failed gate.',\n }),\n feedback: z.string().min(1).optional().meta({\n description: 'Feedback supplied when the gate fails before restarting.',\n }),\n })\n .optional()\n .meta({\n description:\n 'Restart behavior when the success gate fails. See [feedback loops](/understand/feedback-loops).',\n }),\n })\n .refine((value) => value.success !== undefined || value.on_failure !== undefined, {\n message: 'Expected success or on_failure',\n });\n\nconst workflowDocumentCheckoutPermissionsSchema = z\n .strictObject({\n contents: z.enum(['read', 'write']).optional().meta({\n description: 'Repository contents permission granted to checkout.',\n }),\n })\n .optional()\n .meta({\n description: 'Repository permissions used during checkout.',\n });\n\nconst workflowDocumentPersistCredentialsSchema = z.boolean().optional().meta({\n description: 'Whether checkout credentials remain available to later run steps.',\n});\n\nexport const workflowDocumentCheckoutSchema = z\n .strictObject({\n project: z.string().min(1).optional().meta({\n description: 'Shipfox project id to check out. Exclusive with connection and repository.',\n }),\n connection: z.string().min(1).optional().meta({\n description: 'Integration connection slug to use for checkout.',\n }),\n repository: z.string().min(1).optional().meta({\n description: 'Repository to check out, as owner/name or a bare name.',\n }),\n ref: z.string().min(1).optional().meta({\n description: 'Repository ref to check out.',\n }),\n 'fetch-depth': z.number().int().min(0).optional().meta({\n description: 'Number of commits to fetch. Use 0 for full history.',\n }),\n path: z.string().min(1).optional().meta({\n description: 'Relative path under the job workspace where this repository is checked out.',\n }),\n permissions: workflowDocumentCheckoutPermissionsSchema,\n 'persist-credentials': workflowDocumentPersistCredentialsSchema,\n force: z.boolean().optional().meta({\n description: 'Whether checkout may replace an occupied destination.',\n }),\n })\n .superRefine((checkout, ctx) => {\n for (const validationIssue of checkoutTargetValidationIssues(checkout)) {\n const message =\n validationIssue.kind === 'project-with-connection'\n ? '\"connection\" cannot be combined with \"project\".'\n : validationIssue.kind === 'project-with-repository'\n ? '\"repository\" cannot be combined with \"project\".'\n : '\"connection\" requires \"repository\".';\n ctx.addIssue({\n code: 'custom',\n path: [validationIssue.path],\n message,\n });\n }\n });\n\nconst workflowDocumentJobCheckoutSchema = z\n .union([\n z.strictObject({\n permissions: workflowDocumentCheckoutPermissionsSchema,\n 'persist-credentials': workflowDocumentPersistCredentialsSchema,\n }),\n z.literal(false),\n ])\n .meta({\n description:\n 'Checkout settings for repository content and credentials, or false to skip checkout.',\n });\n\nexport const workflowDocumentStepIntegrationSelectionSchema = z.array(z.string().min(1)).min(1);\n\nexport const workflowDocumentStepIntegrationSchema = z.strictObject({\n connection: z.string().min(1).optional().meta({\n description: 'Integration connection slug to use for these tools.',\n }),\n include: workflowDocumentStepIntegrationSelectionSchema.meta({\n description: 'Tool selectors to make available to the agent.',\n }),\n exclude: workflowDocumentStepIntegrationSelectionSchema.optional().meta({\n description: 'Tool selectors to remove from the included tools.',\n }),\n allow_write: z.boolean().optional().meta({\n description: 'Allows write-capable integration tools. Omit or set false for read-only access.',\n }),\n});\n\nexport const workflowDocumentAgentStepFields = [\n 'model',\n 'prompt',\n 'harness',\n 'thinking',\n 'provider',\n 'tools',\n 'integrations',\n] as const;\n\n// A step is a run step (`run`), an inline agent step (`prompt`), or a checkout\n// step (`checkout`), never two kinds at once. They share one strict object so\n// an unknown key is still rejected; the `superRefine` discriminates by which\n// payload keys are present and emits one targeted issue per failure mode (a\n// plain union would surface every branch's errors at once). The `agent`\n// keyword is declared only so the reserved-keyword case produces a clear\n// message instead of a generic \"unrecognized key\".\nexport const workflowDocumentStepSchema = z\n .strictObject({\n key: z\n .string()\n .min(1)\n .optional()\n .meta({description: 'Stable step key for dependencies and outputs.'}),\n if: z\n .string()\n .min(1)\n .optional()\n .meta({\n description:\n 'CEL condition wrapped in exactly one $' +\n '{{ }} interpolation. See [conditionals](/reference/expressions#syntax).',\n }),\n name: z.string().min(1).optional().meta({description: 'Human-readable step name.'}),\n working_directory: z.string().min(1).optional().meta({\n description: 'Working directory for the step, relative to the job workspace.',\n }),\n run: z.string().min(1).optional().meta({\n description: 'Shell command for a run step. Do not combine it with agent-only fields.',\n }),\n checkout: workflowDocumentCheckoutSchema.optional().meta({\n description: 'Repository checkout settings for this step.',\n }),\n model: z.string().min(1).optional().meta({\n description:\n 'Model ID for an agent step. It requires `prompt` and is not valid on a run step.',\n }),\n prompt: z.string().min(1).optional().meta({\n description: 'Prompt for an agent step. It is required when any agent-only field is set.',\n }),\n harness: harnessSchema.optional().meta({\n description:\n 'Agent harness. When omitted, Shipfox uses the workspace default harness, or `pi` when none is configured.',\n }),\n thinking: agentThinkingFieldSchema.optional(),\n provider: z.string().min(1).optional().meta({\n description:\n 'Model provider ID for an agent step. It requires `prompt` and is not valid on a run step.',\n }),\n tools: z.array(z.string().min(1)).min(1).optional().meta({\n description:\n 'Built-in tool IDs for an agent step. It requires `prompt` and is not valid on a run step.',\n }),\n integrations: z.array(workflowDocumentStepIntegrationSchema).min(1).optional().meta({\n description:\n 'Integration tools available to an agent step. It requires `prompt` and is not valid on a run step. See [integration tools](/how-to/author-workflows/use-integration-tools).',\n }),\n agent: z.unknown().optional().meta({\n description: 'Reserved keyword. It is rejected; use `prompt` to define an agent step.',\n }),\n gate: workflowDocumentStepGateSchema.optional().meta({\n description: 'Success gate and optional restart behavior after the step runs.',\n }),\n env: workflowDocumentEnvSchema.optional().meta({\n description: 'Environment variables for a run step. They are not valid on an agent step.',\n }),\n outputs: workflowDocumentStepOutputsSchema.optional().meta({\n description: 'Named output declarations produced by this step.',\n }),\n })\n .superRefine((step, ctx) => {\n if (step.agent !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['agent'],\n message: 'The \"agent\" keyword is reserved for a future step kind and is not supported yet.',\n });\n return;\n }\n\n if (step.checkout !== undefined) {\n if (step.run !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['run'],\n message: '\"run\" is not valid on a checkout step.',\n });\n }\n for (const key of workflowDocumentAgentStepFields) {\n if (step[key] !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: [key],\n message: `\"${key}\" is not valid on a checkout step.`,\n });\n }\n }\n if (step.env !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['env'],\n message: '\"env\" is not valid on a checkout step.',\n });\n }\n return;\n }\n\n if (step.run !== undefined) {\n for (const key of workflowDocumentAgentStepFields) {\n if (step[key] !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: [key],\n message: `\"${key}\" is not valid on a run step.`,\n });\n }\n }\n return;\n }\n\n const isAgent = workflowDocumentAgentStepFields.some((field) => step[field] !== undefined);\n\n if (!isAgent) {\n ctx.addIssue({\n code: 'custom',\n message: 'A step must define either \"run\", an agent \"prompt\", or \"checkout\".',\n });\n return;\n }\n\n if (step.env !== undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['env'],\n message: '\"env\" is supported only on run steps.',\n });\n }\n if (step.prompt === undefined) {\n ctx.addIssue({\n code: 'custom',\n path: ['prompt'],\n message: 'An agent step requires \"prompt\".',\n });\n }\n });\n\nconst workflowDocumentJobOutputsSchema = nonEmptyRecordSchema(z.string().min(1)).superRefine(\n (outputs, ctx) => {\n const entries = Object.keys(outputs).length;\n if (entries > WORKFLOW_DOCUMENT_JOB_OUTPUTS_MAX_ENTRIES) {\n ctx.addIssue({\n code: 'custom',\n message: `Job outputs cannot define more than ${WORKFLOW_DOCUMENT_JOB_OUTPUTS_MAX_ENTRIES} entries.`,\n });\n }\n },\n);\n\nexport const workflowDocumentJobSchema = z.strictObject({\n needs: stringOrStringArraySchema.optional().meta({\n description: 'Job key or keys that must complete before this job starts.',\n }),\n if: z\n .string()\n .min(1)\n .optional()\n .meta({\n description:\n 'CEL condition wrapped in exactly one $' +\n '{{ }} interpolation. See [conditionals](/reference/expressions#syntax).',\n }),\n runner: stringOrStringArraySchema.optional().meta({\n description:\n 'Runner label or ordered fallback labels for this job. See [runners and execution environments](/understand/runners-and-execution-environments).',\n }),\n success: z.string().min(1).optional().meta({\n description:\n 'CEL expression that determines whether the job succeeds. See [Expressions](/reference/expressions#functions-and-macros) and [Contexts](/reference/contexts#context-availability).',\n }),\n outputs: workflowDocumentJobOutputsSchema.optional().meta({\n description: `Named job outputs mapped from step values. A mapping with exactly one expression preserves an inferred non-string source type. Each job allows up to ${WORKFLOW_DOCUMENT_JOB_OUTPUTS_MAX_ENTRIES} declarations.`,\n }),\n execution_timeout: z.string().min(1).optional().meta({\n description: 'Maximum duration for one job execution.',\n }),\n checkout: workflowDocumentJobCheckoutSchema.optional(),\n listening: workflowDocumentListeningSchema.optional().meta({\n description:\n 'Event-listening configuration for this job. See [listening jobs](/understand/listening-jobs).',\n }),\n name: jobNameSchema.optional(),\n execution_name: z.string().min(1).optional().meta({\n description: 'Dynamic name for each job execution. Supports workflow expressions.',\n }),\n env: workflowDocumentEnvSchema.optional().meta({\n description:\n 'Environment variables for run steps in this job. They do not apply to agent steps. See [secrets and variables](/reference/secrets-variables).',\n }),\n steps: z.array(workflowDocumentStepSchema).min(1).meta({\n description: 'Ordered run or agent steps. Each job needs at least one step.',\n }),\n});\n\nexport const workflowDocumentSchema = z.strictObject({\n name: workflowNameSchema,\n run_name: z.string().min(1).optional().meta({\n description: 'Dynamic name for each workflow run. Supports workflow expressions.',\n }),\n runner: stringOrStringArraySchema.optional().meta({\n description:\n 'Default runner label or ordered fallback labels for run jobs. See [runners and execution environments](/understand/runners-and-execution-environments).',\n }),\n env: workflowDocumentEnvSchema.optional().meta({\n description:\n 'Workflow-level environment variables for run steps. They do not apply to agent steps. See [secrets and variables](/reference/secrets-variables).',\n }),\n triggers: nonEmptyRecordSchema(workflowDocumentTriggerSchema).optional().meta({\n description:\n 'Named events that start workflow runs. A workflow can have at most one `manual` trigger.',\n }),\n jobs: nonEmptyRecordSchema(workflowDocumentJobSchema).meta({\n description: 'Named jobs that make up the workflow. At least one job is required.',\n }),\n});\n\nexport type WorkflowDocument = z.infer<typeof workflowDocumentSchema>;\nexport type WorkflowDocumentCheckout = z.infer<typeof workflowDocumentCheckoutSchema>;\nexport type WorkflowDocumentJobCheckout = z.infer<typeof workflowDocumentJobCheckoutSchema>;\nexport type WorkflowDocumentEnv = z.infer<typeof workflowDocumentEnvSchema>;\nexport type WorkflowDocumentJob = z.infer<typeof workflowDocumentJobSchema>;\nexport type WorkflowDocumentJobListening = z.infer<typeof workflowDocumentListeningSchema>;\nexport type WorkflowDocumentRunStepGate = z.infer<typeof workflowDocumentStepGateSchema>;\nexport type WorkflowDocumentStepIntegration = z.infer<typeof workflowDocumentStepIntegrationSchema>;\nexport type WorkflowDocumentStepOutputType = (typeof workflowDocumentStepOutputTypes)[number];\nexport type WorkflowDocumentStepOutputs = z.infer<typeof workflowDocumentStepOutputsSchema>;\nexport type WorkflowDocumentStep = z.infer<typeof workflowDocumentStepSchema>;\nexport type WorkflowDocumentTrigger = z.infer<typeof workflowDocumentTriggerSchema>;\n\nfunction maxJsonDepth(value: unknown): number {\n if (value === null || typeof value !== 'object') return 0;\n if (Array.isArray(value)) {\n if (value.length === 0) return 1;\n return 1 + Math.max(...value.map(maxJsonDepth));\n }\n\n const entries = Object.values(value);\n if (entries.length === 0) return 1;\n return 1 + Math.max(...entries.map(maxJsonDepth));\n}\n\nfunction isJsonSchemaDocument(value: unknown): boolean {\n return (\n typeof value === 'boolean' ||\n (typeof value === 'object' && value !== null && !Array.isArray(value))\n );\n}\n"],"names":["z","checkoutTargetValidationIssues","agentThinkingSchema","harnessSchema","stringOrStringArraySchema","union","string","min","array","nonEmptyRecordSchema","valueSchema","record","refine","value","Object","keys","length","message","WORKFLOW_LITERAL_NAME_PATTERN","WORKFLOW_INTERPOLATED_VALUE_PATTERN","agentThinkingFieldSchema","regex","meta","description","workflowNameSchema","literalNameSchema","jobNameSchema","envNameSchema","envStringValueSchema","includes","WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES","WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES","workflowDocumentStepOutputTypes","WORKFLOW_DOCUMENT_JOB_OUTPUTS_MAX_ENTRIES","WORKFLOW_DOCUMENT_STEP_OUTPUTS_MAX_ENTRIES","WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_SERIALIZED_BYTES","WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_DEPTH","utf8Encoder","TextEncoder","workflowDocumentEnvSchema","number","boolean","superRefine","env","ctx","entries","addIssue","code","serializedBytes","encode","JSON","stringify","byteLength","workflowDocumentStepOutputKeyPattern","workflowDocumentStepOutputTypeSchema","enum","workflowDocumentStepOutputDeclarationSchema","transform","type","strictObject","schema","unknown","optional","declaration","undefined","path","isJsonSchemaDocument","depth","maxJsonDepth","workflowDocumentStepOutputsSchema","outputs","key","test","workflowDocumentTriggerBaseSchema","source","with","filter","config","triggerSourceConfigSchemas","cron","schedule","timezone","triggerSourceConfigSchemaRegistry","workflowDocumentTriggerSchema","event","trigger","configSchema","configResult","safeParse","success","configIssue","error","issues","workflowDocumentListeningSchema","on","until","timeout","max_executions","int","positive","batch","debounce","max_size","max_wait","on_resolve","listening","field","index","workflowDocumentStepGateSchema","on_failure","restart_from","feedback","workflowDocumentCheckoutPermissionsSchema","contents","workflowDocumentPersistCredentialsSchema","workflowDocumentCheckoutSchema","project","connection","repository","ref","permissions","force","checkout","validationIssue","kind","workflowDocumentJobCheckoutSchema","literal","workflowDocumentStepIntegrationSelectionSchema","workflowDocumentStepIntegrationSchema","include","exclude","allow_write","workflowDocumentAgentStepFields","workflowDocumentStepSchema","if","name","working_directory","run","model","prompt","harness","thinking","provider","tools","integrations","agent","gate","step","isAgent","some","workflowDocumentJobOutputsSchema","workflowDocumentJobSchema","needs","runner","execution_timeout","execution_name","steps","workflowDocumentSchema","run_name","triggers","jobs","Array","isArray","Math","max","map","values"],"mappings":"AAAA,SAAQA,CAAC,QAAO,MAAM;AACtB,SAAQC,8BAA8B,QAAO,kCAAkC;AAC/E,SAAQC,mBAAmB,EAAEC,aAAa,QAAO,kBAAkB;AAEnE,MAAMC,4BAA4BJ,EAAEK,KAAK,CAAC;IAACL,EAAEM,MAAM,GAAGC,GAAG,CAAC;IAAIP,EAAEQ,KAAK,CAACR,EAAEM,MAAM,GAAGC,GAAG,CAAC,IAAIA,GAAG,CAAC;CAAG;AAChG,MAAME,uBAAuB,CAAgCC,cAC3DV,EACGW,MAAM,CAACX,EAAEM,MAAM,GAAGC,GAAG,CAAC,IAAIG,aAC1BE,MAAM,CAAC,CAACC,QAAUC,OAAOC,IAAI,CAACF,OAAOG,MAAM,GAAG,GAAG;QAACC,SAAS;IAA6B;AAE7F,OAAO,MAAMC,gCAAgC,kCAAkC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;IAC1C,OACE,OAAOA,UAAU,aAChB,OAAOA,UAAU,YAAYA,UAAU,QAAQ,CAACoJ,MAAMC,OAAO,CAACrJ;AAEnE"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { type AgentThinking, agentThinkingByHarness, agentThinkingSchema, type BuildWorkflowJsonSchemaOptions, buildWorkflowJsonSchema, type CheckoutTargetValidationIssue, checkoutTargetValidationIssues, claudeAgentThinkingSchema, DEFAULT_AGENT_THINKING, DEFAULT_HARNESS, DEFAULT_MODEL_PROVIDER, type Harness, harnessSchema, InvalidWorkflowDocumentError, invalidWorkflowDocumentErrorCode, parseWorkflowDocument, piAgentThinkingSchema, thinkingLevelsForHarness, triggerSourceConfigSchemas, WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES, WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES, WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_DEPTH, WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_SERIALIZED_BYTES, WORKFLOW_DOCUMENT_STEP_OUTPUTS_MAX_ENTRIES, type WorkflowDocument, type WorkflowDocumentCheckout, type WorkflowDocumentEnv, type WorkflowDocumentJob, type WorkflowDocumentJobCheckout, type WorkflowDocumentRunStepGate, type WorkflowDocumentStep, type WorkflowDocumentStepIntegration, type WorkflowDocumentStepOutputs, type WorkflowDocumentStepOutputType, type WorkflowDocumentTrigger, workflowDocumentEnvSchema, workflowDocumentSchema, workflowDocumentStepIntegrationSchema, workflowDocumentStepIntegrationSelectionSchema, workflowDocumentStepOutputsSchema, workflowDocumentStepOutputTypes, workflowDocumentStepSchema, } from '#document/index.js';
|
|
1
|
+
export { type AgentThinking, agentThinkingByHarness, agentThinkingSchema, type BuildWorkflowJsonSchemaOptions, buildWorkflowJsonSchema, type CheckoutTargetValidationIssue, checkoutTargetValidationIssues, claudeAgentThinkingSchema, DEFAULT_AGENT_THINKING, DEFAULT_HARNESS, DEFAULT_MODEL_PROVIDER, type Harness, harnessSchema, InvalidWorkflowDocumentError, invalidWorkflowDocumentErrorCode, parseWorkflowDocument, piAgentThinkingSchema, thinkingLevelsForHarness, triggerSourceConfigSchemas, WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES, WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES, WORKFLOW_DOCUMENT_JOB_OUTPUTS_MAX_ENTRIES, WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_DEPTH, WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_SERIALIZED_BYTES, WORKFLOW_DOCUMENT_STEP_OUTPUTS_MAX_ENTRIES, type WorkflowDocument, type WorkflowDocumentCheckout, type WorkflowDocumentEnv, type WorkflowDocumentJob, type WorkflowDocumentJobCheckout, type WorkflowDocumentRunStepGate, type WorkflowDocumentStep, type WorkflowDocumentStepIntegration, type WorkflowDocumentStepOutputs, type WorkflowDocumentStepOutputType, type WorkflowDocumentTrigger, workflowDocumentEnvSchema, workflowDocumentSchema, workflowDocumentStepIntegrationSchema, workflowDocumentStepIntegrationSelectionSchema, workflowDocumentStepOutputsSchema, workflowDocumentStepOutputTypes, workflowDocumentStepSchema, } from '#document/index.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,8BAA8B,EACnC,uBAAuB,EACvB,KAAK,6BAA6B,EAClC,8BAA8B,EAC9B,yBAAyB,EACzB,sBAAsB,EACtB,eAAe,EACf,sBAAsB,EACtB,KAAK,OAAO,EACZ,aAAa,EACb,4BAA4B,EAC5B,gCAAgC,EAChC,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,0BAA0B,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GAC3B,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { agentThinkingByHarness, agentThinkingSchema, buildWorkflowJsonSchema, checkoutTargetValidationIssues, claudeAgentThinkingSchema, DEFAULT_AGENT_THINKING, DEFAULT_HARNESS, DEFAULT_MODEL_PROVIDER, harnessSchema, InvalidWorkflowDocumentError, invalidWorkflowDocumentErrorCode, parseWorkflowDocument, piAgentThinkingSchema, thinkingLevelsForHarness, triggerSourceConfigSchemas, WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES, WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES, WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_DEPTH, WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_SERIALIZED_BYTES, WORKFLOW_DOCUMENT_STEP_OUTPUTS_MAX_ENTRIES, workflowDocumentEnvSchema, workflowDocumentSchema, workflowDocumentStepIntegrationSchema, workflowDocumentStepIntegrationSelectionSchema, workflowDocumentStepOutputsSchema, workflowDocumentStepOutputTypes, workflowDocumentStepSchema } from '#document/index.js';
|
|
1
|
+
export { agentThinkingByHarness, agentThinkingSchema, buildWorkflowJsonSchema, checkoutTargetValidationIssues, claudeAgentThinkingSchema, DEFAULT_AGENT_THINKING, DEFAULT_HARNESS, DEFAULT_MODEL_PROVIDER, harnessSchema, InvalidWorkflowDocumentError, invalidWorkflowDocumentErrorCode, parseWorkflowDocument, piAgentThinkingSchema, thinkingLevelsForHarness, triggerSourceConfigSchemas, WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES, WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES, WORKFLOW_DOCUMENT_JOB_OUTPUTS_MAX_ENTRIES, WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_DEPTH, WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_SERIALIZED_BYTES, WORKFLOW_DOCUMENT_STEP_OUTPUTS_MAX_ENTRIES, workflowDocumentEnvSchema, workflowDocumentSchema, workflowDocumentStepIntegrationSchema, workflowDocumentStepIntegrationSelectionSchema, workflowDocumentStepOutputsSchema, workflowDocumentStepOutputTypes, workflowDocumentStepSchema } from '#document/index.js';
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n type AgentThinking,\n agentThinkingByHarness,\n agentThinkingSchema,\n type BuildWorkflowJsonSchemaOptions,\n buildWorkflowJsonSchema,\n type CheckoutTargetValidationIssue,\n checkoutTargetValidationIssues,\n claudeAgentThinkingSchema,\n DEFAULT_AGENT_THINKING,\n DEFAULT_HARNESS,\n DEFAULT_MODEL_PROVIDER,\n type Harness,\n harnessSchema,\n InvalidWorkflowDocumentError,\n invalidWorkflowDocumentErrorCode,\n parseWorkflowDocument,\n piAgentThinkingSchema,\n thinkingLevelsForHarness,\n triggerSourceConfigSchemas,\n WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES,\n WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES,\n WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_DEPTH,\n WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_SERIALIZED_BYTES,\n WORKFLOW_DOCUMENT_STEP_OUTPUTS_MAX_ENTRIES,\n type WorkflowDocument,\n type WorkflowDocumentCheckout,\n type WorkflowDocumentEnv,\n type WorkflowDocumentJob,\n type WorkflowDocumentJobCheckout,\n type WorkflowDocumentRunStepGate,\n type WorkflowDocumentStep,\n type WorkflowDocumentStepIntegration,\n type WorkflowDocumentStepOutputs,\n type WorkflowDocumentStepOutputType,\n type WorkflowDocumentTrigger,\n workflowDocumentEnvSchema,\n workflowDocumentSchema,\n workflowDocumentStepIntegrationSchema,\n workflowDocumentStepIntegrationSelectionSchema,\n workflowDocumentStepOutputsSchema,\n workflowDocumentStepOutputTypes,\n workflowDocumentStepSchema,\n} from '#document/index.js';\n"],"names":["agentThinkingByHarness","agentThinkingSchema","buildWorkflowJsonSchema","checkoutTargetValidationIssues","claudeAgentThinkingSchema","DEFAULT_AGENT_THINKING","DEFAULT_HARNESS","DEFAULT_MODEL_PROVIDER","harnessSchema","InvalidWorkflowDocumentError","invalidWorkflowDocumentErrorCode","parseWorkflowDocument","piAgentThinkingSchema","thinkingLevelsForHarness","triggerSourceConfigSchemas","WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES","WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES","WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_DEPTH","WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_SERIALIZED_BYTES","WORKFLOW_DOCUMENT_STEP_OUTPUTS_MAX_ENTRIES","workflowDocumentEnvSchema","workflowDocumentSchema","workflowDocumentStepIntegrationSchema","workflowDocumentStepIntegrationSelectionSchema","workflowDocumentStepOutputsSchema","workflowDocumentStepOutputTypes","workflowDocumentStepSchema"],"mappings":"AAAA,SAEEA,sBAAsB,EACtBC,mBAAmB,EAEnBC,uBAAuB,EAEvBC,8BAA8B,EAC9BC,yBAAyB,EACzBC,sBAAsB,EACtBC,eAAe,EACfC,sBAAsB,EAEtBC,aAAa,EACbC,4BAA4B,EAC5BC,gCAAgC,EAChCC,qBAAqB,EACrBC,qBAAqB,EACrBC,wBAAwB,EACxBC,0BAA0B,EAC1BC,iCAAiC,EACjCC,0CAA0C,EAC1CC,8CAA8C,EAC9CC,yDAAyD,EACzDC,0CAA0C,EAY1CC,yBAAyB,EACzBC,sBAAsB,EACtBC,qCAAqC,EACrCC,8CAA8C,EAC9CC,iCAAiC,EACjCC,+BAA+B,EAC/BC,0BAA0B,QACrB,qBAAqB"}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n type AgentThinking,\n agentThinkingByHarness,\n agentThinkingSchema,\n type BuildWorkflowJsonSchemaOptions,\n buildWorkflowJsonSchema,\n type CheckoutTargetValidationIssue,\n checkoutTargetValidationIssues,\n claudeAgentThinkingSchema,\n DEFAULT_AGENT_THINKING,\n DEFAULT_HARNESS,\n DEFAULT_MODEL_PROVIDER,\n type Harness,\n harnessSchema,\n InvalidWorkflowDocumentError,\n invalidWorkflowDocumentErrorCode,\n parseWorkflowDocument,\n piAgentThinkingSchema,\n thinkingLevelsForHarness,\n triggerSourceConfigSchemas,\n WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES,\n WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES,\n WORKFLOW_DOCUMENT_JOB_OUTPUTS_MAX_ENTRIES,\n WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_DEPTH,\n WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_SERIALIZED_BYTES,\n WORKFLOW_DOCUMENT_STEP_OUTPUTS_MAX_ENTRIES,\n type WorkflowDocument,\n type WorkflowDocumentCheckout,\n type WorkflowDocumentEnv,\n type WorkflowDocumentJob,\n type WorkflowDocumentJobCheckout,\n type WorkflowDocumentRunStepGate,\n type WorkflowDocumentStep,\n type WorkflowDocumentStepIntegration,\n type WorkflowDocumentStepOutputs,\n type WorkflowDocumentStepOutputType,\n type WorkflowDocumentTrigger,\n workflowDocumentEnvSchema,\n workflowDocumentSchema,\n workflowDocumentStepIntegrationSchema,\n workflowDocumentStepIntegrationSelectionSchema,\n workflowDocumentStepOutputsSchema,\n workflowDocumentStepOutputTypes,\n workflowDocumentStepSchema,\n} from '#document/index.js';\n"],"names":["agentThinkingByHarness","agentThinkingSchema","buildWorkflowJsonSchema","checkoutTargetValidationIssues","claudeAgentThinkingSchema","DEFAULT_AGENT_THINKING","DEFAULT_HARNESS","DEFAULT_MODEL_PROVIDER","harnessSchema","InvalidWorkflowDocumentError","invalidWorkflowDocumentErrorCode","parseWorkflowDocument","piAgentThinkingSchema","thinkingLevelsForHarness","triggerSourceConfigSchemas","WORKFLOW_DOCUMENT_ENV_MAX_ENTRIES","WORKFLOW_DOCUMENT_ENV_MAX_SERIALIZED_BYTES","WORKFLOW_DOCUMENT_JOB_OUTPUTS_MAX_ENTRIES","WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_DEPTH","WORKFLOW_DOCUMENT_STEP_OUTPUT_SCHEMA_MAX_SERIALIZED_BYTES","WORKFLOW_DOCUMENT_STEP_OUTPUTS_MAX_ENTRIES","workflowDocumentEnvSchema","workflowDocumentSchema","workflowDocumentStepIntegrationSchema","workflowDocumentStepIntegrationSelectionSchema","workflowDocumentStepOutputsSchema","workflowDocumentStepOutputTypes","workflowDocumentStepSchema"],"mappings":"AAAA,SAEEA,sBAAsB,EACtBC,mBAAmB,EAEnBC,uBAAuB,EAEvBC,8BAA8B,EAC9BC,yBAAyB,EACzBC,sBAAsB,EACtBC,eAAe,EACfC,sBAAsB,EAEtBC,aAAa,EACbC,4BAA4B,EAC5BC,gCAAgC,EAChCC,qBAAqB,EACrBC,qBAAqB,EACrBC,wBAAwB,EACxBC,0BAA0B,EAC1BC,iCAAiC,EACjCC,0CAA0C,EAC1CC,yCAAyC,EACzCC,8CAA8C,EAC9CC,yDAAyD,EACzDC,0CAA0C,EAY1CC,yBAAyB,EACzBC,sBAAsB,EACtBC,qCAAqC,EACrCC,8CAA8C,EAC9CC,iCAAiC,EACjCC,+BAA+B,EAC/BC,0BAA0B,QACrB,qBAAqB"}
|