@shipfox/workflow-document 3.2.0 → 3.3.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/workflow-document.d.ts +53 -1
- package/dist/document/workflow-document.d.ts.map +1 -1
- package/dist/document/workflow-document.js +117 -1
- 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
package/dist/document/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { type CheckoutTargetValidationIssue, checkoutTargetValidationIssues, } from './checkout-target-validation.js';
|
|
2
2
|
export { type AgentThinking, agentThinkingByHarness, agentThinkingSchema, claudeAgentThinkingSchema, DEFAULT_AGENT_THINKING, DEFAULT_HARNESS, DEFAULT_MODEL_PROVIDER, type Harness, harnessSchema, piAgentThinkingSchema, thinkingLevelsForHarness, } from './step-enums.js';
|
|
3
|
-
export { 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, WORKFLOW_DOCUMENT_TOOL_WITH_MAX_DEPTH, WORKFLOW_DOCUMENT_TOOL_WITH_MAX_SERIALIZED_BYTES, type WorkflowDocument, type WorkflowDocumentCheckout, type WorkflowDocumentEnv, type WorkflowDocumentJob, type WorkflowDocumentJobCheckout, type WorkflowDocumentRunStepGate, type WorkflowDocumentStep, type WorkflowDocumentStepIntegration, type WorkflowDocumentStepOutputs, type WorkflowDocumentStepOutputType, type WorkflowDocumentToolStepOutputs, type WorkflowDocumentToolWith, type WorkflowDocumentTrigger, workflowDocumentCheckoutSchema, workflowDocumentEnvSchema, workflowDocumentJobSchema, workflowDocumentSchema, workflowDocumentStepIntegrationSchema, workflowDocumentStepIntegrationSelectionSchema, workflowDocumentStepOutputsSchema, workflowDocumentStepOutputTypes, workflowDocumentStepSchema, workflowDocumentToolStepOutputsSchema, workflowDocumentToolStepWithSchema, workflowDocumentTriggerSchema, } from './workflow-document.js';
|
|
3
|
+
export { isValidWorkflowSessionKeyTemplateLiteralParts, 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, WORKFLOW_DOCUMENT_TOOL_WITH_MAX_DEPTH, WORKFLOW_DOCUMENT_TOOL_WITH_MAX_SERIALIZED_BYTES, WORKFLOW_SESSION_KEY_MAX_LENGTH, WORKFLOW_SESSION_KEY_PATTERN, WORKFLOW_SESSION_KEY_PATTERN_SOURCE, type WorkflowDocument, type WorkflowDocumentCheckout, type WorkflowDocumentEnv, type WorkflowDocumentJob, type WorkflowDocumentJobCheckout, type WorkflowDocumentRunStepGate, type WorkflowDocumentStep, type WorkflowDocumentStepIntegration, type WorkflowDocumentStepOutputs, type WorkflowDocumentStepOutputType, type WorkflowDocumentToolStepOutputs, type WorkflowDocumentToolWith, type WorkflowDocumentTrigger, workflowDocumentCheckoutSchema, workflowDocumentEnvSchema, workflowDocumentJobSchema, workflowDocumentSchema, workflowDocumentSessionSchema, workflowDocumentStepIntegrationSchema, workflowDocumentStepIntegrationSelectionSchema, workflowDocumentStepOutputsSchema, workflowDocumentStepOutputTypes, workflowDocumentStepSchema, workflowDocumentToolStepOutputsSchema, workflowDocumentToolStepWithSchema, workflowDocumentTriggerSchema, } from './workflow-document.js';
|
|
4
4
|
export { InvalidWorkflowDocumentError, invalidWorkflowDocumentErrorCode, parseWorkflowDocument, } from './workflow-document-parser.js';
|
|
5
5
|
export { type BuildWorkflowJsonSchemaOptions, buildWorkflowJsonSchema, } from './workflow-json-schema.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/document/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,6BAA6B,EAClC,8BAA8B,GAC/B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,aAAa,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,eAAe,EACf,sBAAsB,EACtB,KAAK,OAAO,EACZ,aAAa,EACb,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,0BAA0B,EAC1B,iCAAiC,EACjC,0CAA0C,EAC1C,yCAAyC,EACzC,8CAA8C,EAC9C,yDAAyD,EACzD,0CAA0C,EAC1C,qCAAqC,EACrC,gDAAgD,EAChD,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,+BAA+B,EACpC,KAAK,2BAA2B,EAChC,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,8BAA8B,EAC9B,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,qCAAqC,EACrC,8CAA8C,EAC9C,iCAAiC,EACjC,+BAA+B,EAC/B,0BAA0B,EAC1B,qCAAqC,EACrC,kCAAkC,EAClC,6BAA6B,GAC9B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,4BAA4B,EAC5B,gCAAgC,EAChC,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,8BAA8B,EACnC,uBAAuB,GACxB,MAAM,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/document/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,6BAA6B,EAClC,8BAA8B,GAC/B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,KAAK,aAAa,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,yBAAyB,EACzB,sBAAsB,EACtB,eAAe,EACf,sBAAsB,EACtB,KAAK,OAAO,EACZ,aAAa,EACb,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,6CAA6C,EAC7C,0BAA0B,EAC1B,iCAAiC,EACjC,0CAA0C,EAC1C,yCAAyC,EACzC,8CAA8C,EAC9C,yDAAyD,EACzD,0CAA0C,EAC1C,qCAAqC,EACrC,gDAAgD,EAChD,+BAA+B,EAC/B,4BAA4B,EAC5B,mCAAmC,EACnC,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,oBAAoB,EACzB,KAAK,+BAA+B,EACpC,KAAK,2BAA2B,EAChC,KAAK,8BAA8B,EACnC,KAAK,+BAA+B,EACpC,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,8BAA8B,EAC9B,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,6BAA6B,EAC7B,qCAAqC,EACrC,8CAA8C,EAC9C,iCAAiC,EACjC,+BAA+B,EAC/B,0BAA0B,EAC1B,qCAAqC,EACrC,kCAAkC,EAClC,6BAA6B,GAC9B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,4BAA4B,EAC5B,gCAAgC,EAChC,qBAAqB,GACtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,KAAK,8BAA8B,EACnC,uBAAuB,GACxB,MAAM,2BAA2B,CAAC"}
|
package/dist/document/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { checkoutTargetValidationIssues } from './checkout-target-validation.js';
|
|
2
2
|
export { agentThinkingByHarness, agentThinkingSchema, claudeAgentThinkingSchema, DEFAULT_AGENT_THINKING, DEFAULT_HARNESS, DEFAULT_MODEL_PROVIDER, harnessSchema, piAgentThinkingSchema, thinkingLevelsForHarness } from './step-enums.js';
|
|
3
|
-
export { 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, WORKFLOW_DOCUMENT_TOOL_WITH_MAX_DEPTH, WORKFLOW_DOCUMENT_TOOL_WITH_MAX_SERIALIZED_BYTES, workflowDocumentCheckoutSchema, workflowDocumentEnvSchema, workflowDocumentJobSchema, workflowDocumentSchema, workflowDocumentStepIntegrationSchema, workflowDocumentStepIntegrationSelectionSchema, workflowDocumentStepOutputsSchema, workflowDocumentStepOutputTypes, workflowDocumentStepSchema, workflowDocumentToolStepOutputsSchema, workflowDocumentToolStepWithSchema, workflowDocumentTriggerSchema } from './workflow-document.js';
|
|
3
|
+
export { isValidWorkflowSessionKeyTemplateLiteralParts, 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, WORKFLOW_DOCUMENT_TOOL_WITH_MAX_DEPTH, WORKFLOW_DOCUMENT_TOOL_WITH_MAX_SERIALIZED_BYTES, WORKFLOW_SESSION_KEY_MAX_LENGTH, WORKFLOW_SESSION_KEY_PATTERN, WORKFLOW_SESSION_KEY_PATTERN_SOURCE, workflowDocumentCheckoutSchema, workflowDocumentEnvSchema, workflowDocumentJobSchema, workflowDocumentSchema, workflowDocumentSessionSchema, workflowDocumentStepIntegrationSchema, workflowDocumentStepIntegrationSelectionSchema, workflowDocumentStepOutputsSchema, workflowDocumentStepOutputTypes, workflowDocumentStepSchema, workflowDocumentToolStepOutputsSchema, workflowDocumentToolStepWithSchema, workflowDocumentTriggerSchema } from './workflow-document.js';
|
|
4
4
|
export { InvalidWorkflowDocumentError, invalidWorkflowDocumentErrorCode, parseWorkflowDocument } from './workflow-document-parser.js';
|
|
5
5
|
export { buildWorkflowJsonSchema } from './workflow-json-schema.js';
|
|
6
6
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/document/index.ts"],"sourcesContent":["export {\n type CheckoutTargetValidationIssue,\n checkoutTargetValidationIssues,\n} from './checkout-target-validation.js';\nexport {\n type AgentThinking,\n agentThinkingByHarness,\n agentThinkingSchema,\n claudeAgentThinkingSchema,\n DEFAULT_AGENT_THINKING,\n DEFAULT_HARNESS,\n DEFAULT_MODEL_PROVIDER,\n type Harness,\n harnessSchema,\n piAgentThinkingSchema,\n thinkingLevelsForHarness,\n} from './step-enums.js';\nexport {\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 WORKFLOW_DOCUMENT_TOOL_WITH_MAX_DEPTH,\n WORKFLOW_DOCUMENT_TOOL_WITH_MAX_SERIALIZED_BYTES,\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 WorkflowDocumentToolStepOutputs,\n type WorkflowDocumentToolWith,\n type WorkflowDocumentTrigger,\n workflowDocumentCheckoutSchema,\n workflowDocumentEnvSchema,\n workflowDocumentJobSchema,\n workflowDocumentSchema,\n workflowDocumentStepIntegrationSchema,\n workflowDocumentStepIntegrationSelectionSchema,\n workflowDocumentStepOutputsSchema,\n workflowDocumentStepOutputTypes,\n workflowDocumentStepSchema,\n workflowDocumentToolStepOutputsSchema,\n workflowDocumentToolStepWithSchema,\n workflowDocumentTriggerSchema,\n} from './workflow-document.js';\nexport {\n InvalidWorkflowDocumentError,\n invalidWorkflowDocumentErrorCode,\n parseWorkflowDocument,\n} from './workflow-document-parser.js';\nexport {\n type BuildWorkflowJsonSchemaOptions,\n buildWorkflowJsonSchema,\n} from './workflow-json-schema.js';\n"],"names":["checkoutTargetValidationIssues","agentThinkingByHarness","agentThinkingSchema","claudeAgentThinkingSchema","DEFAULT_AGENT_THINKING","DEFAULT_HARNESS","DEFAULT_MODEL_PROVIDER","harnessSchema","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","WORKFLOW_DOCUMENT_TOOL_WITH_MAX_DEPTH","WORKFLOW_DOCUMENT_TOOL_WITH_MAX_SERIALIZED_BYTES","workflowDocumentCheckoutSchema","workflowDocumentEnvSchema","workflowDocumentJobSchema","workflowDocumentSchema","workflowDocumentStepIntegrationSchema","workflowDocumentStepIntegrationSelectionSchema","workflowDocumentStepOutputsSchema","workflowDocumentStepOutputTypes","workflowDocumentStepSchema","workflowDocumentToolStepOutputsSchema","workflowDocumentToolStepWithSchema","workflowDocumentTriggerSchema","InvalidWorkflowDocumentError","invalidWorkflowDocumentErrorCode","parseWorkflowDocument","buildWorkflowJsonSchema"],"mappings":"AAAA,SAEEA,8BAA8B,QACzB,kCAAkC;AACzC,SAEEC,sBAAsB,EACtBC,mBAAmB,EACnBC,yBAAyB,EACzBC,sBAAsB,EACtBC,eAAe,EACfC,sBAAsB,EAEtBC,aAAa,EACbC,qBAAqB,EACrBC,wBAAwB,QACnB,kBAAkB;AACzB,SACEC,0BAA0B,EAC1BC,iCAAiC,EACjCC,0CAA0C,EAC1CC,yCAAyC,EACzCC,8CAA8C,EAC9CC,yDAAyD,EACzDC,0CAA0C,EAC1CC,qCAAqC,EACrCC,gDAAgD,
|
|
1
|
+
{"version":3,"sources":["../../src/document/index.ts"],"sourcesContent":["export {\n type CheckoutTargetValidationIssue,\n checkoutTargetValidationIssues,\n} from './checkout-target-validation.js';\nexport {\n type AgentThinking,\n agentThinkingByHarness,\n agentThinkingSchema,\n claudeAgentThinkingSchema,\n DEFAULT_AGENT_THINKING,\n DEFAULT_HARNESS,\n DEFAULT_MODEL_PROVIDER,\n type Harness,\n harnessSchema,\n piAgentThinkingSchema,\n thinkingLevelsForHarness,\n} from './step-enums.js';\nexport {\n isValidWorkflowSessionKeyTemplateLiteralParts,\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 WORKFLOW_DOCUMENT_TOOL_WITH_MAX_DEPTH,\n WORKFLOW_DOCUMENT_TOOL_WITH_MAX_SERIALIZED_BYTES,\n WORKFLOW_SESSION_KEY_MAX_LENGTH,\n WORKFLOW_SESSION_KEY_PATTERN,\n WORKFLOW_SESSION_KEY_PATTERN_SOURCE,\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 WorkflowDocumentToolStepOutputs,\n type WorkflowDocumentToolWith,\n type WorkflowDocumentTrigger,\n workflowDocumentCheckoutSchema,\n workflowDocumentEnvSchema,\n workflowDocumentJobSchema,\n workflowDocumentSchema,\n workflowDocumentSessionSchema,\n workflowDocumentStepIntegrationSchema,\n workflowDocumentStepIntegrationSelectionSchema,\n workflowDocumentStepOutputsSchema,\n workflowDocumentStepOutputTypes,\n workflowDocumentStepSchema,\n workflowDocumentToolStepOutputsSchema,\n workflowDocumentToolStepWithSchema,\n workflowDocumentTriggerSchema,\n} from './workflow-document.js';\nexport {\n InvalidWorkflowDocumentError,\n invalidWorkflowDocumentErrorCode,\n parseWorkflowDocument,\n} from './workflow-document-parser.js';\nexport {\n type BuildWorkflowJsonSchemaOptions,\n buildWorkflowJsonSchema,\n} from './workflow-json-schema.js';\n"],"names":["checkoutTargetValidationIssues","agentThinkingByHarness","agentThinkingSchema","claudeAgentThinkingSchema","DEFAULT_AGENT_THINKING","DEFAULT_HARNESS","DEFAULT_MODEL_PROVIDER","harnessSchema","piAgentThinkingSchema","thinkingLevelsForHarness","isValidWorkflowSessionKeyTemplateLiteralParts","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","WORKFLOW_DOCUMENT_TOOL_WITH_MAX_DEPTH","WORKFLOW_DOCUMENT_TOOL_WITH_MAX_SERIALIZED_BYTES","WORKFLOW_SESSION_KEY_MAX_LENGTH","WORKFLOW_SESSION_KEY_PATTERN","WORKFLOW_SESSION_KEY_PATTERN_SOURCE","workflowDocumentCheckoutSchema","workflowDocumentEnvSchema","workflowDocumentJobSchema","workflowDocumentSchema","workflowDocumentSessionSchema","workflowDocumentStepIntegrationSchema","workflowDocumentStepIntegrationSelectionSchema","workflowDocumentStepOutputsSchema","workflowDocumentStepOutputTypes","workflowDocumentStepSchema","workflowDocumentToolStepOutputsSchema","workflowDocumentToolStepWithSchema","workflowDocumentTriggerSchema","InvalidWorkflowDocumentError","invalidWorkflowDocumentErrorCode","parseWorkflowDocument","buildWorkflowJsonSchema"],"mappings":"AAAA,SAEEA,8BAA8B,QACzB,kCAAkC;AACzC,SAEEC,sBAAsB,EACtBC,mBAAmB,EACnBC,yBAAyB,EACzBC,sBAAsB,EACtBC,eAAe,EACfC,sBAAsB,EAEtBC,aAAa,EACbC,qBAAqB,EACrBC,wBAAwB,QACnB,kBAAkB;AACzB,SACEC,6CAA6C,EAC7CC,0BAA0B,EAC1BC,iCAAiC,EACjCC,0CAA0C,EAC1CC,yCAAyC,EACzCC,8CAA8C,EAC9CC,yDAAyD,EACzDC,0CAA0C,EAC1CC,qCAAqC,EACrCC,gDAAgD,EAChDC,+BAA+B,EAC/BC,4BAA4B,EAC5BC,mCAAmC,EAcnCC,8BAA8B,EAC9BC,yBAAyB,EACzBC,yBAAyB,EACzBC,sBAAsB,EACtBC,6BAA6B,EAC7BC,qCAAqC,EACrCC,8CAA8C,EAC9CC,iCAAiC,EACjCC,+BAA+B,EAC/BC,0BAA0B,EAC1BC,qCAAqC,EACrCC,kCAAkC,EAClCC,6BAA6B,QACxB,yBAAyB;AAChC,SACEC,4BAA4B,EAC5BC,gCAAgC,EAChCC,qBAAqB,QAChB,gCAAgC;AACvC,SAEEC,uBAAuB,QAClB,4BAA4B"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const WORKFLOW_LITERAL_NAME_PATTERN: RegExp;
|
|
3
3
|
export declare const WORKFLOW_INTERPOLATED_VALUE_PATTERN: RegExp;
|
|
4
|
+
export declare const WORKFLOW_SESSION_KEY_MAX_LENGTH = 128;
|
|
5
|
+
export declare const WORKFLOW_SESSION_KEY_PATTERN_SOURCE = "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$";
|
|
6
|
+
export declare const WORKFLOW_SESSION_KEY_PATTERN: RegExp;
|
|
4
7
|
export declare const agentThinkingFieldSchema: z.ZodUnion<readonly [z.ZodEnum<{
|
|
5
8
|
high: "high";
|
|
6
9
|
low: "low";
|
|
@@ -136,7 +139,15 @@ export declare const workflowDocumentStepIntegrationSchema: z.ZodObject<{
|
|
|
136
139
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
137
140
|
allow_write: z.ZodOptional<z.ZodBoolean>;
|
|
138
141
|
}, z.core.$strict>;
|
|
139
|
-
export declare const
|
|
142
|
+
export declare const workflowDocumentSessionSchema: z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodObject<{
|
|
143
|
+
key: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
144
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
145
|
+
fork: "fork";
|
|
146
|
+
resume: "resume";
|
|
147
|
+
}>>;
|
|
148
|
+
}, z.core.$strict>]>;
|
|
149
|
+
export declare function isValidWorkflowSessionKeyTemplateLiteralParts(source: string): boolean;
|
|
150
|
+
export declare const workflowDocumentAgentStepFields: readonly ['model', 'prompt', 'harness', 'thinking', 'provider', 'tools', 'integrations', 'session'];
|
|
140
151
|
declare const workflowDocumentStepBaseSchema: z.ZodObject<{
|
|
141
152
|
key: z.ZodOptional<z.ZodString>;
|
|
142
153
|
if: z.ZodOptional<z.ZodString>;
|
|
@@ -174,6 +185,13 @@ declare const workflowDocumentStepBaseSchema: z.ZodObject<{
|
|
|
174
185
|
off: "off";
|
|
175
186
|
xhigh: "xhigh";
|
|
176
187
|
}>, z.ZodString]>>;
|
|
188
|
+
session: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodObject<{
|
|
189
|
+
key: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
190
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
191
|
+
fork: "fork";
|
|
192
|
+
resume: "resume";
|
|
193
|
+
}>>;
|
|
194
|
+
}, z.core.$strict>]>>;
|
|
177
195
|
provider: z.ZodOptional<z.ZodString>;
|
|
178
196
|
tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
179
197
|
integrations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -251,6 +269,13 @@ export declare const workflowDocumentStepSchema: z.ZodPipe<z.ZodObject<{
|
|
|
251
269
|
off: "off";
|
|
252
270
|
xhigh: "xhigh";
|
|
253
271
|
}>, z.ZodString]>>;
|
|
272
|
+
session: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodObject<{
|
|
273
|
+
key: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
274
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
275
|
+
fork: "fork";
|
|
276
|
+
resume: "resume";
|
|
277
|
+
}>>;
|
|
278
|
+
}, z.core.$strict>]>>;
|
|
254
279
|
provider: z.ZodOptional<z.ZodString>;
|
|
255
280
|
tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
256
281
|
integrations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -310,6 +335,10 @@ export declare const workflowDocumentStepSchema: z.ZodPipe<z.ZodObject<{
|
|
|
310
335
|
prompt?: string | undefined;
|
|
311
336
|
harness?: "claude" | "pi" | undefined;
|
|
312
337
|
thinking?: string | undefined;
|
|
338
|
+
session?: string | {
|
|
339
|
+
key: string;
|
|
340
|
+
mode?: "fork" | "resume" | undefined;
|
|
341
|
+
} | undefined;
|
|
313
342
|
provider?: string | undefined;
|
|
314
343
|
tools?: string[] | undefined;
|
|
315
344
|
integrations?: {
|
|
@@ -420,6 +449,13 @@ export declare const workflowDocumentJobSchema: z.ZodObject<{
|
|
|
420
449
|
off: "off";
|
|
421
450
|
xhigh: "xhigh";
|
|
422
451
|
}>, z.ZodString]>>;
|
|
452
|
+
session: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodObject<{
|
|
453
|
+
key: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
454
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
455
|
+
fork: "fork";
|
|
456
|
+
resume: "resume";
|
|
457
|
+
}>>;
|
|
458
|
+
}, z.core.$strict>]>>;
|
|
423
459
|
provider: z.ZodOptional<z.ZodString>;
|
|
424
460
|
tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
425
461
|
integrations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -479,6 +515,10 @@ export declare const workflowDocumentJobSchema: z.ZodObject<{
|
|
|
479
515
|
prompt?: string | undefined;
|
|
480
516
|
harness?: "claude" | "pi" | undefined;
|
|
481
517
|
thinking?: string | undefined;
|
|
518
|
+
session?: string | {
|
|
519
|
+
key: string;
|
|
520
|
+
mode?: "fork" | "resume" | undefined;
|
|
521
|
+
} | undefined;
|
|
482
522
|
provider?: string | undefined;
|
|
483
523
|
tools?: string[] | undefined;
|
|
484
524
|
integrations?: {
|
|
@@ -602,6 +642,13 @@ export declare const workflowDocumentSchema: z.ZodObject<{
|
|
|
602
642
|
off: "off";
|
|
603
643
|
xhigh: "xhigh";
|
|
604
644
|
}>, z.ZodString]>>;
|
|
645
|
+
session: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodString, z.ZodObject<{
|
|
646
|
+
key: z.ZodUnion<readonly [z.ZodString, z.ZodString]>;
|
|
647
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
648
|
+
fork: "fork";
|
|
649
|
+
resume: "resume";
|
|
650
|
+
}>>;
|
|
651
|
+
}, z.core.$strict>]>>;
|
|
605
652
|
provider: z.ZodOptional<z.ZodString>;
|
|
606
653
|
tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
607
654
|
integrations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -661,6 +708,10 @@ export declare const workflowDocumentSchema: z.ZodObject<{
|
|
|
661
708
|
prompt?: string | undefined;
|
|
662
709
|
harness?: "claude" | "pi" | undefined;
|
|
663
710
|
thinking?: string | undefined;
|
|
711
|
+
session?: string | {
|
|
712
|
+
key: string;
|
|
713
|
+
mode?: "fork" | "resume" | undefined;
|
|
714
|
+
} | undefined;
|
|
664
715
|
provider?: string | undefined;
|
|
665
716
|
tools?: string[] | undefined;
|
|
666
717
|
integrations?: {
|
|
@@ -703,6 +754,7 @@ export type WorkflowDocumentStepOutputType = (typeof workflowDocumentStepOutputT
|
|
|
703
754
|
export type WorkflowDocumentStepOutputs = z.infer<typeof workflowDocumentStepOutputsSchema>;
|
|
704
755
|
export type WorkflowDocumentToolStepOutputs = z.infer<typeof workflowDocumentToolStepOutputsSchema>;
|
|
705
756
|
export type WorkflowDocumentToolWith = z.infer<typeof workflowDocumentToolStepWithSchema>;
|
|
757
|
+
export type WorkflowDocumentSession = z.infer<typeof workflowDocumentSessionSchema>;
|
|
706
758
|
export type WorkflowDocumentTrigger = z.infer<typeof workflowDocumentTriggerSchema>;
|
|
707
759
|
export {};
|
|
708
760
|
//# sourceMappingURL=workflow-document.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-document.d.ts","sourceRoot":"","sources":["../../src/document/workflow-document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAUtB,eAAO,MAAM,6BAA6B,QAAoC,CAAC;AAG/E,eAAO,MAAM,mCAAmC,QAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"workflow-document.d.ts","sourceRoot":"","sources":["../../src/document/workflow-document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAUtB,eAAO,MAAM,6BAA6B,QAAoC,CAAC;AAG/E,eAAO,MAAM,mCAAmC,QAAyC,CAAC;AAC1F,eAAO,MAAM,+BAA+B,MAAM,CAAC;AACnD,eAAO,MAAM,mCAAmC,uCAAuC,CAAC;AACxF,eAAO,MAAM,4BAA4B,QAAkD,CAAC;AAO5F,eAAO,MAAM,wBAAwB;;;;;;;;iBAajC,CAAC;AAmBL,eAAO,MAAM,iCAAiC,MAAM,CAAC;AACrD,eAAO,MAAM,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12,6 +12,11 @@ export const WORKFLOW_LITERAL_NAME_PATTERN = /^(?:[^$]|\$\$\{\{|\$(?!\{\{))*$/;
|
|
|
12
12
|
// The inverse of a literal name: a literal prefix followed by an unescaped
|
|
13
13
|
// `${{`. An enum field that also accepts a template matches one or the other.
|
|
14
14
|
export const WORKFLOW_INTERPOLATED_VALUE_PATTERN = /^(?:[^$]|\$\$\{\{|\$(?!\{\{))*\$\{\{/;
|
|
15
|
+
export const WORKFLOW_SESSION_KEY_MAX_LENGTH = 128;
|
|
16
|
+
export const WORKFLOW_SESSION_KEY_PATTERN_SOURCE = '^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$';
|
|
17
|
+
export const WORKFLOW_SESSION_KEY_PATTERN = new RegExp(WORKFLOW_SESSION_KEY_PATTERN_SOURCE);
|
|
18
|
+
const workflowSessionKeyLiteralPartPattern = /^[A-Za-z0-9._-]*$/;
|
|
19
|
+
const workflowSessionKeyLiteralPartStartPattern = /^[A-Za-z0-9]/;
|
|
15
20
|
// Reasoning effort is an enum so editors can complete it, and a template so a
|
|
16
21
|
// workflow can choose the effort from run context. The resolved value is
|
|
17
22
|
// checked against the harness levels when the step is dispatched.
|
|
@@ -563,6 +568,115 @@ export const workflowDocumentStepIntegrationSchema = z.strictObject({
|
|
|
563
568
|
description: 'Allows write-capable integration tools. Omit or set false for read-only access.'
|
|
564
569
|
})
|
|
565
570
|
});
|
|
571
|
+
// A session names an agent conversation that continues across steps of one run.
|
|
572
|
+
// The shorthand string form names the session and resumes it; the long form
|
|
573
|
+
// adds an explicit mode. The key is a field template, evaluated at step
|
|
574
|
+
// dispatch with the same context roots the prompt sees.
|
|
575
|
+
const workflowSessionKeyLiteralSchema = z.string().min(1).max(WORKFLOW_SESSION_KEY_MAX_LENGTH).regex(WORKFLOW_SESSION_KEY_PATTERN, {
|
|
576
|
+
message: 'Literal session keys must start with a letter or number and contain only letters, numbers, dots, underscores, or hyphens.'
|
|
577
|
+
});
|
|
578
|
+
const workflowSessionKeyTemplateSchema = z.string().min(1).regex(WORKFLOW_INTERPOLATED_VALUE_PATTERN, {
|
|
579
|
+
message: 'Session keys with interpolation must use a $' + '{{ }} template.'
|
|
580
|
+
}).refine(isValidWorkflowSessionKeyTemplateLiteralParts, {
|
|
581
|
+
message: 'Literal parts of interpolated session keys may contain only letters, numbers, dots, underscores, or hyphens, and may not exceed 128 characters in total.'
|
|
582
|
+
});
|
|
583
|
+
const workflowSessionKeySchema = z.union([
|
|
584
|
+
workflowSessionKeyLiteralSchema,
|
|
585
|
+
workflowSessionKeyTemplateSchema
|
|
586
|
+
]);
|
|
587
|
+
export const workflowDocumentSessionSchema = z.union([
|
|
588
|
+
workflowSessionKeyLiteralSchema,
|
|
589
|
+
workflowSessionKeyTemplateSchema,
|
|
590
|
+
z.strictObject({
|
|
591
|
+
key: workflowSessionKeySchema.meta({
|
|
592
|
+
description: 'Session key, or a $' + '{{ }} interpolation that resolves to one.'
|
|
593
|
+
}),
|
|
594
|
+
mode: z.enum([
|
|
595
|
+
'resume',
|
|
596
|
+
'fork'
|
|
597
|
+
]).optional().meta({
|
|
598
|
+
description: 'Session mode. `resume` continues the session and writes back; `fork` reads a snapshot and never writes. Defaults to `resume`.'
|
|
599
|
+
})
|
|
600
|
+
})
|
|
601
|
+
]).meta({
|
|
602
|
+
description: 'Named agent session continued across steps of one workflow run. A string names the session and resumes it; an object adds the mode.'
|
|
603
|
+
});
|
|
604
|
+
export function isValidWorkflowSessionKeyTemplateLiteralParts(source) {
|
|
605
|
+
let cursor = 0;
|
|
606
|
+
let expressionSeen = false;
|
|
607
|
+
let literalLength = 0;
|
|
608
|
+
while(true){
|
|
609
|
+
const opener = source.indexOf('${{', cursor);
|
|
610
|
+
const literalEnd = opener === -1 ? source.length : opener;
|
|
611
|
+
const literal = source.slice(cursor, literalEnd);
|
|
612
|
+
literalLength += literal.length;
|
|
613
|
+
if (literalLength > WORKFLOW_SESSION_KEY_MAX_LENGTH || !workflowSessionKeyLiteralPartPattern.test(literal) || !expressionSeen && literal.length > 0 && !workflowSessionKeyLiteralPartStartPattern.test(literal)) {
|
|
614
|
+
return false;
|
|
615
|
+
}
|
|
616
|
+
if (opener === -1) return expressionSeen;
|
|
617
|
+
const close = findWorkflowSessionKeyTemplateClose(source, opener);
|
|
618
|
+
if (close === -1) return false;
|
|
619
|
+
expressionSeen = true;
|
|
620
|
+
cursor = close + 2;
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
function findWorkflowSessionKeyTemplateClose(source, openerIndex) {
|
|
624
|
+
let index = openerIndex + 3;
|
|
625
|
+
let depth = 0;
|
|
626
|
+
while(index < source.length){
|
|
627
|
+
const stringEnd = scanWorkflowSessionKeyStringLiteral(source, index);
|
|
628
|
+
if (stringEnd !== null) {
|
|
629
|
+
index = stringEnd;
|
|
630
|
+
continue;
|
|
631
|
+
}
|
|
632
|
+
if (source.startsWith('//', index)) {
|
|
633
|
+
const newline = source.indexOf('\n', index + 2);
|
|
634
|
+
index = newline === -1 ? source.length : newline;
|
|
635
|
+
continue;
|
|
636
|
+
}
|
|
637
|
+
if (depth === 0 && source.startsWith('}}', index)) return index;
|
|
638
|
+
const char = source[index];
|
|
639
|
+
if (char === '(' || char === '[' || char === '{') {
|
|
640
|
+
depth += 1;
|
|
641
|
+
} else if ((char === ')' || char === ']' || char === '}') && depth > 0) {
|
|
642
|
+
depth -= 1;
|
|
643
|
+
}
|
|
644
|
+
index += 1;
|
|
645
|
+
}
|
|
646
|
+
return -1;
|
|
647
|
+
}
|
|
648
|
+
function scanWorkflowSessionKeyStringLiteral(source, index) {
|
|
649
|
+
for (const prefix of [
|
|
650
|
+
'r',
|
|
651
|
+
'R',
|
|
652
|
+
'b',
|
|
653
|
+
'B',
|
|
654
|
+
''
|
|
655
|
+
]){
|
|
656
|
+
if (!source.startsWith(prefix, index)) continue;
|
|
657
|
+
const quoteIndex = index + prefix.length;
|
|
658
|
+
const quote = source[quoteIndex];
|
|
659
|
+
if (quote !== '"' && quote !== "'") continue;
|
|
660
|
+
const tripleQuote = quote.repeat(3);
|
|
661
|
+
if (source.startsWith(tripleQuote, quoteIndex)) {
|
|
662
|
+
return scanWorkflowSessionKeyQuotedString(source, quoteIndex + 3, tripleQuote, prefix === 'r' || prefix === 'R');
|
|
663
|
+
}
|
|
664
|
+
return scanWorkflowSessionKeyQuotedString(source, quoteIndex + 1, quote, prefix === 'r' || prefix === 'R');
|
|
665
|
+
}
|
|
666
|
+
return null;
|
|
667
|
+
}
|
|
668
|
+
function scanWorkflowSessionKeyQuotedString(source, startIndex, delimiter, raw) {
|
|
669
|
+
let index = startIndex;
|
|
670
|
+
while(index < source.length){
|
|
671
|
+
if (!raw && source[index] === '\\') {
|
|
672
|
+
index += 2;
|
|
673
|
+
continue;
|
|
674
|
+
}
|
|
675
|
+
if (source.startsWith(delimiter, index)) return index + delimiter.length;
|
|
676
|
+
index += 1;
|
|
677
|
+
}
|
|
678
|
+
return source.length;
|
|
679
|
+
}
|
|
566
680
|
export const workflowDocumentAgentStepFields = [
|
|
567
681
|
'model',
|
|
568
682
|
'prompt',
|
|
@@ -570,7 +684,8 @@ export const workflowDocumentAgentStepFields = [
|
|
|
570
684
|
'thinking',
|
|
571
685
|
'provider',
|
|
572
686
|
'tools',
|
|
573
|
-
'integrations'
|
|
687
|
+
'integrations',
|
|
688
|
+
'session'
|
|
574
689
|
];
|
|
575
690
|
// A step is a run step (`run`), an inline agent step (`prompt`), or a checkout
|
|
576
691
|
// step (`checkout`), never two kinds at once. They share one strict object so
|
|
@@ -611,6 +726,7 @@ const workflowDocumentStepBaseSchema = z.strictObject({
|
|
|
611
726
|
description: 'Agent harness. When omitted, Shipfox uses the workspace default harness, or `pi` when none is configured.'
|
|
612
727
|
}),
|
|
613
728
|
thinking: agentThinkingFieldSchema.optional(),
|
|
729
|
+
session: workflowDocumentSessionSchema.optional(),
|
|
614
730
|
provider: z.string().min(1).optional().meta({
|
|
615
731
|
description: 'Model provider ID for an agent step. It requires `prompt` and is not valid on a run step.'
|
|
616
732
|
}),
|