@shipfox/expression 2.2.1 → 2.4.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.
@@ -1,4 +1,4 @@
1
- import type { WorkflowContextName } from './workflow-context.js';
1
+ import type { WorkflowContextName, WorkflowContextReservedRoot } from './workflow-context.js';
2
2
  /**
3
3
  * Reader-facing descriptions for every context root and property.
4
4
  *
@@ -8,7 +8,7 @@ import type { WorkflowContextName } from './workflow-context.js';
8
8
  * description for a property that no longer exists.
9
9
  */
10
10
  export interface WorkflowContextDoc {
11
- readonly root: WorkflowContextName;
11
+ readonly root: WorkflowContextName | WorkflowContextReservedRoot;
12
12
  readonly summary: string;
13
13
  /** Why an open-shape root has no property table. */
14
14
  readonly shapeNote?: string;
@@ -181,5 +181,9 @@ export declare const workflowContextDocs: readonly [{
181
181
  readonly root: 'secrets';
182
182
  readonly summary: 'Workspace and project secrets.';
183
183
  readonly shapeNote: 'The keys are the secret names the workspace defines. See [Secrets and variables](/reference/secrets-variables).';
184
+ }, {
185
+ readonly root: 'result';
186
+ readonly summary: 'The result returned by the current tool step.';
187
+ readonly shapeNote: 'The selected tool catalog defines this value. It is readable only while mapping tool outputs at step reporting.';
184
188
  }];
185
189
  //# sourceMappingURL=workflow-context-docs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-context-docs.d.ts","sourceRoot":"","sources":["../../src/workflow-context/workflow-context-docs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE/D;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,oDAAoD;IACpD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,gEAAgE;IAChE,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC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AAuC;mCACpC,0BAA0B;2BAClC,mDAAmD;uCACvC,8BAA8B;0CAC3B,iCAAiC;wCACnC,wCAAwC;yCACvC,4DAA4D;qCAChE,+DAA+D;4CACxD,qCAAqC;4CACrC,2CAA2C;4CAC3C,uCAAuC;+CACpC,0BAA0B;;;mBA8FhD,MAAM;sBACH,qEAAqE;;iBAE5E,OAAO,EAAE,8EAA8E;iBACvF,QAAQ,EAAE,mEAAmE;iBAC7E,OAAO,EAAE,sEAAsE;iBAC/E,cAAc,EACZ,qHAAqH;iBACvH,kBAAkB,EAAE,wEAAwE;iBAC5F,SAAS,EAAE,+DAA+D;iBAC1E,MAAM,EAAE,4DAA4D;iBACpE,OAAO,EAAE,6DAA6D;;;;mBAKlE,MAAM;sBACH,kCAAkC;wBAEzC,mHAAmH;;mBAG/G,SAAS;sBACN,gCAAgC;wBAEvC,iHAAiH;;mBAG7G,QAAQ;sBACL,+CAA+C;wBAEtD,iHAAiH;EAErE,CAAC"}
@@ -162,6 +162,11 @@ export const workflowContextDocs = [
162
162
  root: 'secrets',
163
163
  summary: 'Workspace and project secrets.',
164
164
  shapeNote: 'The keys are the secret names the workspace defines. See [Secrets and variables](/reference/secrets-variables).'
165
+ },
166
+ {
167
+ root: 'result',
168
+ summary: 'The result returned by the current tool step.',
169
+ shapeNote: 'The selected tool catalog defines this value. It is readable only while mapping tool outputs at step reporting.'
165
170
  }
166
171
  ];
167
172
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/workflow-context/workflow-context-docs.ts"],"sourcesContent":["import type {WorkflowContextName} from './workflow-context.js';\n\n/**\n * Reader-facing descriptions for every context root and property.\n *\n * They live beside the type registry so a new field cannot ship undescribed:\n * the documentation generator renders types from the registry and looks up each\n * property here, and its check fails on a property with no description or a\n * description for a property that no longer exists.\n */\nexport interface WorkflowContextDoc {\n readonly root: WorkflowContextName;\n readonly summary: string;\n /** Why an open-shape root has no property table. */\n readonly shapeNote?: string;\n /** Prefix shown in the property column, such as `needs[*].`. */\n readonly propertyPrefix?: string;\n /** Description per property path, relative to the root. */\n readonly fields?: Readonly<Record<string, string>>;\n /** Paths whose element shape another root already documents. */\n readonly collapse?: readonly string[];\n}\n\nconst executionFields = {\n index: 'Position of the execution in its job, starting at zero.',\n name: 'Resolved execution name, or the job name when `execution_name` is not set.',\n status: 'Final status of the execution.',\n started_at: 'Time the execution started.',\n finished_at: 'Time the execution finished.',\n events: 'Listener events in the batch that started this execution. Empty for a standard job.',\n 'events[*].source': 'Integration connection slug that delivered the event.',\n 'events[*].event': 'Shipfox event name.',\n 'events[*].delivery_id': 'Identifier of the provider delivery.',\n 'events[*].received_at': 'Time Shipfox received the event.',\n 'events[*].project':\n 'Shipfox project resolved from the event repository. Null when there is none.',\n 'events[*].project.id': 'Identifier of the resolved project.',\n 'events[*].repository':\n 'Repository the event came from, as `owner/name`. Null when there is none.',\n 'events[*].ref': 'Git ref the event carried. Null when there is none.',\n 'events[*].commit': 'Commit SHA the event carried. Null when there is none.',\n 'events[*].data': 'Raw event payload. The provider owns its shape.',\n outputs: 'Outputs the execution produced, keyed by output name.',\n} as const;\n\nconst jobEntityFields = {\n key: 'Key of the job in the `jobs` map.',\n status: 'Final status of the job.',\n outputs: 'Declared job outputs, keyed by output name.',\n executions:\n 'Executions of the job, each with the properties of the `execution` context. A standard job has one.',\n} as const;\n\nconst stepEntityFields = {\n status: 'Final status of the step.',\n exit_code: 'Exit code of the most recent finished attempt.',\n outputs: 'Declared step outputs of the most recent finished attempt.',\n response: 'Final agent response. Absent on a run step.',\n gate: 'Gate result of the most recent finished attempt. Absent when the step has no gate.',\n 'gate.passed': 'Whether the gate expression passed.',\n 'gate.source': 'Gate expression that produced the result.',\n 'gate.reason': 'Why Shipfox could not check the gate.',\n 'gate.exit_code': 'Exit code the gate read.',\n attempts: 'Every finished attempt of the step, oldest first.',\n 'attempts[*].status': 'Final status of the attempt.',\n 'attempts[*].exit_code': 'Exit code the attempt reported.',\n 'attempts[*].outputs': 'Declared outputs the attempt reported.',\n 'attempts[*].response': 'Final agent response of the attempt. Absent on a run step.',\n 'attempts[*].gate': 'Gate result of the attempt. Absent when the step has no gate.',\n 'attempts[*].gate.passed': 'Whether the gate expression passed.',\n 'attempts[*].gate.source': 'Gate expression that produced the result.',\n 'attempts[*].gate.reason': 'Why Shipfox could not check the gate.',\n 'attempts[*].gate.exit_code': 'Exit code the gate read.',\n} as const;\n\nexport const workflowContextDocs = [\n {\n root: 'workflow',\n summary: 'The workflow definition this run came from.',\n fields: {\n id: 'Identifier of the workflow definition.',\n name: 'Workflow `name` from the definition.',\n },\n },\n {\n root: 'run',\n summary: 'The current run.',\n fields: {\n id: 'Identifier of the run.',\n number: 'Sequential run number within the workflow definition.',\n name: 'Resolved run name, or the workflow name when `run_name` is not set.',\n project_id: 'Identifier of the project that owns the run.',\n workspace_id: 'Identifier of the workspace that owns the run.',\n created_at: 'Time the run was created.',\n },\n },\n {\n root: 'trigger',\n summary: 'The trigger that started the run.',\n fields: {\n source: 'Integration connection slug, or `manual` or `cron`.',\n event: 'Shipfox event name that matched the trigger.',\n project: 'Shipfox project resolved from the event repository. Null when there is none.',\n 'project.id': 'Identifier of the resolved project.',\n repository: 'Repository the event came from, as `owner/name`. Null when there is none.',\n ref: 'Git ref the event carried. Null when there is none.',\n commit: 'Commit SHA the event carried. Null when there is none.',\n },\n },\n {\n root: 'event',\n summary: 'The raw payload of the event that started the run.',\n shapeNote:\n 'The provider owns this payload, so it has no fixed shape. Each provider page under [Integrations](/integrations) lists the events Shipfox delivers and links the payload each one carries.',\n },\n {\n root: 'inputs',\n summary: 'Values the trigger `with` block passed into the run.',\n shapeNote:\n 'The keys are the ones the trigger declares. See [trigger fields](/reference/workflow-schema#trigger-fields).',\n },\n {\n root: 'job',\n summary: 'The current job.',\n fields: {\n key: 'Key of the job in the `jobs` map.',\n name: 'Job `name`, or the job key when no name is set.',\n },\n },\n {\n root: 'executions',\n summary: 'Every execution of the current job.',\n propertyPrefix: 'executions[*].',\n fields: executionFields,\n },\n {\n root: 'execution',\n summary: 'The current execution of the job.',\n fields: {\n ...executionFields,\n failed: 'Whether an earlier step in this execution failed.',\n },\n },\n {\n root: 'jobs',\n summary: 'Upstream jobs, keyed by job key.',\n shapeNote: 'The keys are the job keys the workflow declares.',\n propertyPrefix: 'jobs.<job_key>.',\n fields: jobEntityFields,\n collapse: ['executions'],\n },\n {\n root: 'needs',\n summary: 'The jobs this job declares in `needs`.',\n propertyPrefix: 'needs[*].',\n fields: jobEntityFields,\n collapse: ['executions'],\n },\n {\n root: 'steps',\n summary: 'Earlier steps of the current job, keyed by step key.',\n shapeNote: 'The keys are the step keys the workflow declares.',\n propertyPrefix: 'steps.<step_key>.',\n fields: stepEntityFields,\n },\n {\n root: 'step',\n summary: 'The current step. Its properties depend on the field that reads it.',\n fields: {\n attempt: 'Attempt number of the step, starting at one. Not readable in `gate.success`.',\n is_retry: 'Whether this is a repeat attempt. Not readable in `gate.success`.',\n restart: 'Set when a gate restarted this step. Not readable in `gate.success`.',\n 'restart.from':\n 'The step whose gate restarted this attempt, with the properties of a `steps` entry. Not readable in `gate.success`.',\n 'restart.feedback': 'Feedback the restarting gate produced. Not readable in `gate.success`.',\n exit_code: 'Exit code the step reported. Readable in `gate.success` only.',\n status: 'Status the step reported. Readable in `gate.success` only.',\n outputs: 'Outputs the step reported. Readable in `gate.success` only.',\n },\n collapse: ['restart.from'],\n },\n {\n root: 'vars',\n summary: 'Workspace and project variables.',\n shapeNote:\n 'The keys are the variable names the workspace defines. See [Secrets and variables](/reference/secrets-variables).',\n },\n {\n root: 'secrets',\n summary: 'Workspace and project secrets.',\n shapeNote:\n 'The keys are the secret names the workspace defines. See [Secrets and variables](/reference/secrets-variables).',\n },\n] as const satisfies readonly WorkflowContextDoc[];\n"],"names":["executionFields","index","name","status","started_at","finished_at","events","outputs","jobEntityFields","key","executions","stepEntityFields","exit_code","response","gate","attempts","workflowContextDocs","root","summary","fields","id","number","project_id","workspace_id","created_at","source","event","project","repository","ref","commit","shapeNote","propertyPrefix","failed","collapse","attempt","is_retry","restart"],"mappings":"AAuBA,MAAMA,kBAAkB;IACtBC,OAAO;IACPC,MAAM;IACNC,QAAQ;IACRC,YAAY;IACZC,aAAa;IACbC,QAAQ;IACR,oBAAoB;IACpB,mBAAmB;IACnB,yBAAyB;IACzB,yBAAyB;IACzB,qBACE;IACF,wBAAwB;IACxB,wBACE;IACF,iBAAiB;IACjB,oBAAoB;IACpB,kBAAkB;IAClBC,SAAS;AACX;AAEA,MAAMC,kBAAkB;IACtBC,KAAK;IACLN,QAAQ;IACRI,SAAS;IACTG,YACE;AACJ;AAEA,MAAMC,mBAAmB;IACvBR,QAAQ;IACRS,WAAW;IACXL,SAAS;IACTM,UAAU;IACVC,MAAM;IACN,eAAe;IACf,eAAe;IACf,eAAe;IACf,kBAAkB;IAClBC,UAAU;IACV,sBAAsB;IACtB,yBAAyB;IACzB,uBAAuB;IACvB,wBAAwB;IACxB,oBAAoB;IACpB,2BAA2B;IAC3B,2BAA2B;IAC3B,2BAA2B;IAC3B,8BAA8B;AAChC;AAEA,OAAO,MAAMC,sBAAsB;IACjC;QACEC,MAAM;QACNC,SAAS;QACTC,QAAQ;YACNC,IAAI;YACJlB,MAAM;QACR;IACF;IACA;QACEe,MAAM;QACNC,SAAS;QACTC,QAAQ;YACNC,IAAI;YACJC,QAAQ;YACRnB,MAAM;YACNoB,YAAY;YACZC,cAAc;YACdC,YAAY;QACd;IACF;IACA;QACEP,MAAM;QACNC,SAAS;QACTC,QAAQ;YACNM,QAAQ;YACRC,OAAO;YACPC,SAAS;YACT,cAAc;YACdC,YAAY;YACZC,KAAK;YACLC,QAAQ;QACV;IACF;IACA;QACEb,MAAM;QACNC,SAAS;QACTa,WACE;IACJ;IACA;QACEd,MAAM;QACNC,SAAS;QACTa,WACE;IACJ;IACA;QACEd,MAAM;QACNC,SAAS;QACTC,QAAQ;YACNV,KAAK;YACLP,MAAM;QACR;IACF;IACA;QACEe,MAAM;QACNC,SAAS;QACTc,gBAAgB;QAChBb,QAAQnB;IACV;IACA;QACEiB,MAAM;QACNC,SAAS;QACTC,QAAQ;YACN,GAAGnB,eAAe;YAClBiC,QAAQ;QACV;IACF;IACA;QACEhB,MAAM;QACNC,SAAS;QACTa,WAAW;QACXC,gBAAgB;QAChBb,QAAQX;QACR0B,UAAU;YAAC;SAAa;IAC1B;IACA;QACEjB,MAAM;QACNC,SAAS;QACTc,gBAAgB;QAChBb,QAAQX;QACR0B,UAAU;YAAC;SAAa;IAC1B;IACA;QACEjB,MAAM;QACNC,SAAS;QACTa,WAAW;QACXC,gBAAgB;QAChBb,QAAQR;IACV;IACA;QACEM,MAAM;QACNC,SAAS;QACTC,QAAQ;YACNgB,SAAS;YACTC,UAAU;YACVC,SAAS;YACT,gBACE;YACF,oBAAoB;YACpBzB,WAAW;YACXT,QAAQ;YACRI,SAAS;QACX;QACA2B,UAAU;YAAC;SAAe;IAC5B;IACA;QACEjB,MAAM;QACNC,SAAS;QACTa,WACE;IACJ;IACA;QACEd,MAAM;QACNC,SAAS;QACTa,WACE;IACJ;CACD,CAAkD"}
1
+ {"version":3,"sources":["../../src/workflow-context/workflow-context-docs.ts"],"sourcesContent":["import type {WorkflowContextName, WorkflowContextReservedRoot} from './workflow-context.js';\n\n/**\n * Reader-facing descriptions for every context root and property.\n *\n * They live beside the type registry so a new field cannot ship undescribed:\n * the documentation generator renders types from the registry and looks up each\n * property here, and its check fails on a property with no description or a\n * description for a property that no longer exists.\n */\nexport interface WorkflowContextDoc {\n readonly root: WorkflowContextName | WorkflowContextReservedRoot;\n readonly summary: string;\n /** Why an open-shape root has no property table. */\n readonly shapeNote?: string;\n /** Prefix shown in the property column, such as `needs[*].`. */\n readonly propertyPrefix?: string;\n /** Description per property path, relative to the root. */\n readonly fields?: Readonly<Record<string, string>>;\n /** Paths whose element shape another root already documents. */\n readonly collapse?: readonly string[];\n}\n\nconst executionFields = {\n index: 'Position of the execution in its job, starting at zero.',\n name: 'Resolved execution name, or the job name when `execution_name` is not set.',\n status: 'Final status of the execution.',\n started_at: 'Time the execution started.',\n finished_at: 'Time the execution finished.',\n events: 'Listener events in the batch that started this execution. Empty for a standard job.',\n 'events[*].source': 'Integration connection slug that delivered the event.',\n 'events[*].event': 'Shipfox event name.',\n 'events[*].delivery_id': 'Identifier of the provider delivery.',\n 'events[*].received_at': 'Time Shipfox received the event.',\n 'events[*].project':\n 'Shipfox project resolved from the event repository. Null when there is none.',\n 'events[*].project.id': 'Identifier of the resolved project.',\n 'events[*].repository':\n 'Repository the event came from, as `owner/name`. Null when there is none.',\n 'events[*].ref': 'Git ref the event carried. Null when there is none.',\n 'events[*].commit': 'Commit SHA the event carried. Null when there is none.',\n 'events[*].data': 'Raw event payload. The provider owns its shape.',\n outputs: 'Outputs the execution produced, keyed by output name.',\n} as const;\n\nconst jobEntityFields = {\n key: 'Key of the job in the `jobs` map.',\n status: 'Final status of the job.',\n outputs: 'Declared job outputs, keyed by output name.',\n executions:\n 'Executions of the job, each with the properties of the `execution` context. A standard job has one.',\n} as const;\n\nconst stepEntityFields = {\n status: 'Final status of the step.',\n exit_code: 'Exit code of the most recent finished attempt.',\n outputs: 'Declared step outputs of the most recent finished attempt.',\n response: 'Final agent response. Absent on a run step.',\n gate: 'Gate result of the most recent finished attempt. Absent when the step has no gate.',\n 'gate.passed': 'Whether the gate expression passed.',\n 'gate.source': 'Gate expression that produced the result.',\n 'gate.reason': 'Why Shipfox could not check the gate.',\n 'gate.exit_code': 'Exit code the gate read.',\n attempts: 'Every finished attempt of the step, oldest first.',\n 'attempts[*].status': 'Final status of the attempt.',\n 'attempts[*].exit_code': 'Exit code the attempt reported.',\n 'attempts[*].outputs': 'Declared outputs the attempt reported.',\n 'attempts[*].response': 'Final agent response of the attempt. Absent on a run step.',\n 'attempts[*].gate': 'Gate result of the attempt. Absent when the step has no gate.',\n 'attempts[*].gate.passed': 'Whether the gate expression passed.',\n 'attempts[*].gate.source': 'Gate expression that produced the result.',\n 'attempts[*].gate.reason': 'Why Shipfox could not check the gate.',\n 'attempts[*].gate.exit_code': 'Exit code the gate read.',\n} as const;\n\nexport const workflowContextDocs = [\n {\n root: 'workflow',\n summary: 'The workflow definition this run came from.',\n fields: {\n id: 'Identifier of the workflow definition.',\n name: 'Workflow `name` from the definition.',\n },\n },\n {\n root: 'run',\n summary: 'The current run.',\n fields: {\n id: 'Identifier of the run.',\n number: 'Sequential run number within the workflow definition.',\n name: 'Resolved run name, or the workflow name when `run_name` is not set.',\n project_id: 'Identifier of the project that owns the run.',\n workspace_id: 'Identifier of the workspace that owns the run.',\n created_at: 'Time the run was created.',\n },\n },\n {\n root: 'trigger',\n summary: 'The trigger that started the run.',\n fields: {\n source: 'Integration connection slug, or `manual` or `cron`.',\n event: 'Shipfox event name that matched the trigger.',\n project: 'Shipfox project resolved from the event repository. Null when there is none.',\n 'project.id': 'Identifier of the resolved project.',\n repository: 'Repository the event came from, as `owner/name`. Null when there is none.',\n ref: 'Git ref the event carried. Null when there is none.',\n commit: 'Commit SHA the event carried. Null when there is none.',\n },\n },\n {\n root: 'event',\n summary: 'The raw payload of the event that started the run.',\n shapeNote:\n 'The provider owns this payload, so it has no fixed shape. Each provider page under [Integrations](/integrations) lists the events Shipfox delivers and links the payload each one carries.',\n },\n {\n root: 'inputs',\n summary: 'Values the trigger `with` block passed into the run.',\n shapeNote:\n 'The keys are the ones the trigger declares. See [trigger fields](/reference/workflow-schema#trigger-fields).',\n },\n {\n root: 'job',\n summary: 'The current job.',\n fields: {\n key: 'Key of the job in the `jobs` map.',\n name: 'Job `name`, or the job key when no name is set.',\n },\n },\n {\n root: 'executions',\n summary: 'Every execution of the current job.',\n propertyPrefix: 'executions[*].',\n fields: executionFields,\n },\n {\n root: 'execution',\n summary: 'The current execution of the job.',\n fields: {\n ...executionFields,\n failed: 'Whether an earlier step in this execution failed.',\n },\n },\n {\n root: 'jobs',\n summary: 'Upstream jobs, keyed by job key.',\n shapeNote: 'The keys are the job keys the workflow declares.',\n propertyPrefix: 'jobs.<job_key>.',\n fields: jobEntityFields,\n collapse: ['executions'],\n },\n {\n root: 'needs',\n summary: 'The jobs this job declares in `needs`.',\n propertyPrefix: 'needs[*].',\n fields: jobEntityFields,\n collapse: ['executions'],\n },\n {\n root: 'steps',\n summary: 'Earlier steps of the current job, keyed by step key.',\n shapeNote: 'The keys are the step keys the workflow declares.',\n propertyPrefix: 'steps.<step_key>.',\n fields: stepEntityFields,\n },\n {\n root: 'step',\n summary: 'The current step. Its properties depend on the field that reads it.',\n fields: {\n attempt: 'Attempt number of the step, starting at one. Not readable in `gate.success`.',\n is_retry: 'Whether this is a repeat attempt. Not readable in `gate.success`.',\n restart: 'Set when a gate restarted this step. Not readable in `gate.success`.',\n 'restart.from':\n 'The step whose gate restarted this attempt, with the properties of a `steps` entry. Not readable in `gate.success`.',\n 'restart.feedback': 'Feedback the restarting gate produced. Not readable in `gate.success`.',\n exit_code: 'Exit code the step reported. Readable in `gate.success` only.',\n status: 'Status the step reported. Readable in `gate.success` only.',\n outputs: 'Outputs the step reported. Readable in `gate.success` only.',\n },\n collapse: ['restart.from'],\n },\n {\n root: 'vars',\n summary: 'Workspace and project variables.',\n shapeNote:\n 'The keys are the variable names the workspace defines. See [Secrets and variables](/reference/secrets-variables).',\n },\n {\n root: 'secrets',\n summary: 'Workspace and project secrets.',\n shapeNote:\n 'The keys are the secret names the workspace defines. See [Secrets and variables](/reference/secrets-variables).',\n },\n {\n root: 'result',\n summary: 'The result returned by the current tool step.',\n shapeNote:\n 'The selected tool catalog defines this value. It is readable only while mapping tool outputs at step reporting.',\n },\n] as const satisfies readonly WorkflowContextDoc[];\n"],"names":["executionFields","index","name","status","started_at","finished_at","events","outputs","jobEntityFields","key","executions","stepEntityFields","exit_code","response","gate","attempts","workflowContextDocs","root","summary","fields","id","number","project_id","workspace_id","created_at","source","event","project","repository","ref","commit","shapeNote","propertyPrefix","failed","collapse","attempt","is_retry","restart"],"mappings":"AAuBA,MAAMA,kBAAkB;IACtBC,OAAO;IACPC,MAAM;IACNC,QAA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;QACV;IACF;IACA;QACEhB,MAAM;QACNC,SAAS;QACTa,WAAW;QACXC,gBAAgB;QAChBb,QAAQX;QACR0B,UAAU;YAAC;SAAa;IAC1B;IACA;QACEjB,MAAM;QACNC,SAAS;QACTc,gBAAgB;QAChBb,QAAQX;QACR0B,UAAU;YAAC;SAAa;IAC1B;IACA;QACEjB,MAAM;QACNC,SAAS;QACTa,WAAW;QACXC,gBAAgB;QAChBb,QAAQR;IACV;IACA;QACEM,MAAM;QACNC,SAAS;QACTC,QAAQ;YACNgB,SAAS;YACTC,UAAU;YACVC,SAAS;YACT,gBACE;YACF,oBAAoB;YACpBzB,WAAW;YACXT,QAAQ;YACRI,SAAS;QACX;QACA2B,UAAU;YAAC;SAAe;IAC5B;IACA;QACEjB,MAAM;QACNC,SAAS;QACTa,WACE;IACJ;IACA;QACEd,MAAM;QACNC,SAAS;QACTa,WACE;IACJ;IACA;QACEd,MAAM;QACNC,SAAS;QACTa,WACE;IACJ;CACD,CAAkD"}
@@ -25,6 +25,10 @@ export declare const workflowContextReservedRoots: {
25
25
  readonly runner: {
26
26
  readonly host: 'runner';
27
27
  };
28
+ readonly result: {
29
+ readonly host: 'server';
30
+ readonly availability: 'step-report';
31
+ };
28
32
  };
29
33
  export type WorkflowContextReservedRoot = keyof typeof workflowContextReservedRoots;
30
34
  export type WorkflowContextShape = 'known' | 'open';
@@ -52,9 +56,31 @@ export interface RunnerWorkflowContextDefinition {
52
56
  readonly literalKeyOnly?: boolean;
53
57
  }
54
58
  export type WorkflowContextDefinition = TypedWorkflowContextDefinition | OpenWorkflowContextDefinition | RunnerWorkflowContextDefinition;
59
+ /**
60
+ * Gate context for a tool step: `status` and `outputs`, with no `exit_code`
61
+ * because a tool step never reports one.
62
+ */
63
+ export declare const toolStepReportTypeEnvironment: {
64
+ readonly step: {
65
+ readonly kind: 'object';
66
+ readonly fields: {
67
+ readonly status: 'string';
68
+ readonly outputs: {
69
+ readonly kind: 'map';
70
+ };
71
+ };
72
+ };
73
+ };
74
+ export type WorkflowStepKind = 'run' | 'agent' | 'checkout' | 'tool';
55
75
  export interface WorkflowStepTypeOverlay {
56
76
  readonly key: string;
77
+ readonly kind?: WorkflowStepKind;
57
78
  readonly outputs?: OutputDeclarations;
79
+ /**
80
+ * Catalog output schema of a tool step. Types the implicit `result` output
81
+ * that every tool step exposes, merged with the inferred mapped outputs.
82
+ */
83
+ readonly outputSchema?: unknown;
58
84
  }
59
85
  export interface WorkflowJobTypeOverlay {
60
86
  readonly key: string;
@@ -194,8 +220,7 @@ export declare const workflowContextDefinitions: {
194
220
  readonly delivery_id: 'string';
195
221
  readonly received_at: 'timestamp';
196
222
  readonly data: {
197
- readonly kind: 'object';
198
- readonly fields: {};
223
+ readonly kind: 'map';
199
224
  };
200
225
  };
201
226
  };
@@ -242,8 +267,7 @@ export declare const workflowContextDefinitions: {
242
267
  readonly delivery_id: 'string';
243
268
  readonly received_at: 'timestamp';
244
269
  readonly data: {
245
- readonly kind: 'object';
246
- readonly fields: {};
270
+ readonly kind: 'map';
247
271
  };
248
272
  };
249
273
  };
@@ -369,7 +393,7 @@ export declare const workflowContextDefinitions: {
369
393
  readonly literalKeyOnly: true;
370
394
  };
371
395
  };
372
- export type WorkflowInterpolationField = 'run' | 'env.value' | 'agent.prompt' | 'agent.model' | 'agent.provider' | 'agent.thinking' | 'job.runner' | 'job.outputs' | 'workflow.run_name' | 'job.execution_name' | 'step.name' | 'step.working_directory' | 'step.feedback' | 'checkout.project' | 'checkout.connection' | 'checkout.repository' | 'checkout.ref' | 'checkout.path';
396
+ export type WorkflowInterpolationField = 'run' | 'env.value' | 'agent.prompt' | 'agent.model' | 'agent.provider' | 'agent.thinking' | 'agent.session' | 'job.runner' | 'job.outputs' | 'workflow.run_name' | 'job.execution_name' | 'step.name' | 'step.working_directory' | 'step.feedback' | 'checkout.project' | 'checkout.connection' | 'checkout.repository' | 'checkout.ref' | 'checkout.path' | 'tool.with' | 'tool.outputs';
373
397
  export declare const workflowFieldFailurePolicies: readonly ['fail', 'degrade', 'fail-closed'];
374
398
  export type WorkflowFieldFailurePolicy = (typeof workflowFieldFailurePolicies)[number];
375
399
  export type WorkflowInterpolationFailurePolicy = Exclude<WorkflowFieldFailurePolicy, 'fail-closed'>;
@@ -381,6 +405,12 @@ export interface WorkflowInterpolationFieldPolicy {
381
405
  readonly root: WorkflowContextName;
382
406
  readonly key: string;
383
407
  };
408
+ /**
409
+ * Explicit root enumeration for fields whose references are not just
410
+ * host-constrained, such as `tool.outputs` with its reserved `result` root.
411
+ * When present, callers should use this instead of the accepted-hosts filter.
412
+ */
413
+ readonly roots?: readonly (WorkflowContextName | WorkflowContextReservedRoot)[];
384
414
  }
385
415
  export declare const workflowInterpolationFieldPolicies: Readonly<Record<WorkflowInterpolationField, WorkflowInterpolationFieldPolicy>>;
386
416
  export declare const workflowInterpolationFields: readonly WorkflowInterpolationField[];
@@ -411,26 +441,29 @@ export declare function resolveContextRootHost(root: string): WorkflowContextHos
411
441
  export declare function resolveContextRootAvailability(root: string): AvailabilitySite | undefined;
412
442
  export declare function getWorkflowContextSensitivity(name: WorkflowContextName): WorkflowContextSensitivity;
413
443
  export declare function rootsAvailableAt(site: AvailabilitySite): readonly WorkflowContextName[];
414
- export declare function unavailableRootsAt(roots: readonly WorkflowContextName[], site: AvailabilitySite): readonly WorkflowContextName[];
444
+ export declare function unavailableRootsAt(roots: readonly (WorkflowContextName | WorkflowContextReservedRoot)[], site: AvailabilitySite): readonly (WorkflowContextName | WorkflowContextReservedRoot)[];
415
445
  export declare function getWorkflowContextTypeEnvironment(name: WorkflowContextName): ExpressionTypeEnvironment | undefined;
446
+ export declare function getWorkflowInterpolationFieldTypeEnvironment(field: WorkflowInterpolationField, root: WorkflowContextName | WorkflowContextReservedRoot): ExpressionTypeEnvironment | undefined;
416
447
  export declare function workflowInterpolationFieldAcceptsHost(field: WorkflowInterpolationField, host: WorkflowContextHost): boolean;
417
448
  export declare function workflowContextRootRequiresLiteralKey(root: string): boolean;
418
449
  export declare function getWorkflowInterpolationFieldFailurePolicy(field: WorkflowInterpolationField): WorkflowInterpolationFailurePolicy;
419
450
  export declare function getWorkflowInterpolationFieldSelfReference(field: WorkflowInterpolationField): WorkflowInterpolationFieldPolicy['selfReference'];
420
451
  export declare function getWorkflowInterpolationFieldMinimumFillTarget(field: WorkflowInterpolationField): AvailabilitySite | undefined;
421
452
  export declare function getWorkflowPredicateFieldMinimumFillTarget(field: WorkflowPredicateField): AvailabilitySite;
422
- export declare function getWorkflowPredicateFieldTypeEnvironment(field: WorkflowPredicateField, root: WorkflowContextName): ExpressionTypeEnvironment | undefined;
453
+ export declare function getWorkflowPredicateFieldTypeEnvironment(field: WorkflowPredicateField, root: WorkflowContextName, stepKind?: WorkflowStepKind): ExpressionTypeEnvironment | undefined;
423
454
  export declare function getWorkflowPredicateContextRoots<Field extends WorkflowPredicateField>(field: Field): readonly WorkflowPredicateContextRoot<Field>[];
424
455
  /**
425
456
  * The roots a field can read, whichever kind of field it is.
426
457
  *
427
458
  * A predicate has an enumerated contract because the runtime assembles one
428
459
  * context for it. A template has no single context: each reference is filled
429
- * where its data arrives, so its only field-level constraint is which host can
430
- * resolve it. Callers that document or check fields should use this instead of
460
+ * where its data arrives, so its field-level constraint is which host can
461
+ * resolve it, except for fields that declare an explicit root list (such as
462
+ * `tool.outputs`, whose reserved `result` root is not a referenceable context
463
+ * name). Callers that document or check fields should use this instead of
431
464
  * choosing a mechanism themselves.
432
465
  */
433
- export declare function contextRootsForField(field: WorkflowPredicateField | WorkflowInterpolationField): readonly WorkflowContextName[];
466
+ export declare function contextRootsForField(field: WorkflowPredicateField | WorkflowInterpolationField): readonly (WorkflowContextName | WorkflowContextReservedRoot)[];
434
467
  export declare function isWorkflowPredicateField(field: string): field is WorkflowPredicateField;
435
468
  export declare function projectWorkflowPredicateContext(field: WorkflowPredicateField, context: WorkflowExpressionEvaluationContext): WorkflowExpressionEvaluationContext;
436
469
  export interface WorkflowContextAvailabilityReferenceEntry {
@@ -1 +1 @@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ED,wBAAgB,gCAAgC,CAAC,KAAK,SAAS,sBAAsB,EACnF,KAAK,EAAE,KAAK,GACX,SAAS,4BAA4B,CAAC,KAAK,CAAC,EAAE,CAEhD;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,sBAAsB,GAAG,0BAA0B,GACzD,SAAS,mBAAmB,EAAE,CAOhC;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,sBAAsB,CAEvF;AAED,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,sBAAsB,EAC7B,OAAO,EAAE,mCAAmC,GAC3C,mCAAmC,CAKrC;AAED,MAAM,WAAW,yCAAyC;IACxD,QAAQ,CAAC,IAAI,EAAE,mBAAmB,GAAG,2BAA2B,CAAC;IACjE,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IACzC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC,CAAC;CACnE;AAED,wBAAgB,oCAAoC,IAAI,SAAS,yCAAyC,EAAE,CAkB3G"}
1
+ {"version":3,"file":"workflow-context.d.ts","sourceRoot":"","sources":["../../src/workflow-context/workflow-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mCAAmC,EAAC,MAAM,8CAA8C,CAAC;AACtG,OAAO,KAAK,EAAC,cAAc,EAAE,yBAAyB,EAAC,MAAM,sCAAsC,CAAC;AACpG,OAAO,EAEL,KAAK,kBAAkB,EAExB,MAAM,mCAAmC,CAAC;AAE3C,eAAO,MAAM,oBAAoB,YAC/B,UAAU,EACV,KAAK,EACL,SAAS,EACT,OAAO,EACP,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,WAAW,EACX,MAAM,EACN,OAAO,EACP,OAAO,EACP,MAAM,EACN,MAAM,EACN,SAAS,CACD,CAAC;AACX,MA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,CAC5D,KAAK,EAAE,0BAA0B,GAChC,gBAAgB,GAAG,SAAS,CAG9B;AAED,wBAAgB,0CAA0C,CACxD,KAAK,EAAE,sBAAsB,GAC5B,gBAAgB,CAElB;AAED,wBAAgB,wCAAwC,CACtD,KAAK,EAAE,sBAAsB,EAC7B,IAAI,EAAE,mBAAmB,EACzB,QAAQ,CAAC,EAAE,gBAAgB,GAC1B,yBAAyB,GAAG,SAAS,CASvC;AAED,wBAAgB,gCAAgC,CAAC,KAAK,SAAS,sBAAsB,EACnF,KAAK,EAAE,KAAK,GACX,SAAS,4BAA4B,CAAC,KAAK,CAAC,EAAE,CAEhD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,sBAAsB,GAAG,0BAA0B,GACzD,SAAS,CAAC,mBAAmB,GAAG,2BAA2B,CAAC,EAAE,CAUhE;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,sBAAsB,CAEvF;AAED,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,sBAAsB,EAC7B,OAAO,EAAE,mCAAmC,GAC3C,mCAAmC,CAKrC;AAED,MAAM,WAAW,yCAAyC;IACxD,QAAQ,CAAC,IAAI,EAAE,mBAAmB,GAAG,2BAA2B,CAAC;IACjE,QAAQ,CAAC,YAAY,CAAC,EAAE,gBAAgB,CAAC;IACzC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC,CAAC;CACnE;AAED,wBAAgB,oCAAoC,IAAI,SAAS,yCAAyC,EAAE,CAkB3G"}
@@ -1,4 +1,4 @@
1
- import { outputDeclarationsToExpressionFields } from '../outputs/output-declarations.js';
1
+ import { jsonSchemaToExpressionType, outputDeclarationsToExpressionFields } from '../outputs/output-declarations.js';
2
2
  export const workflowContextNames = [
3
3
  'workflow',
4
4
  'run',
@@ -49,6 +49,11 @@ export const workflowContextReservedRoots = {
49
49
  },
50
50
  runner: {
51
51
  host: 'runner'
52
+ },
53
+ // The result of a tool step call; readable only from `tool.outputs` mappings.
54
+ result: {
55
+ host: 'server',
56
+ availability: 'step-report'
52
57
  }
53
58
  };
54
59
  // `workflow` holds definition facts and `run` holds instance facts, mirroring
@@ -114,8 +119,7 @@ const executionEventType = {
114
119
  received_at: 'timestamp',
115
120
  ...triggerReferenceFields,
116
121
  data: {
117
- kind: 'object',
118
- fields: {}
122
+ kind: 'map'
119
123
  }
120
124
  }
121
125
  };
@@ -160,6 +164,14 @@ const stepGateType = {
160
164
  exit_code: 'int'
161
165
  }
162
166
  };
167
+ const toolStepGateType = {
168
+ kind: 'object',
169
+ fields: {
170
+ passed: 'bool',
171
+ source: 'string',
172
+ reason: 'string'
173
+ }
174
+ };
163
175
  const stepAttemptType = {
164
176
  kind: 'object',
165
177
  fields: {
@@ -210,6 +222,46 @@ const stepReportTypeEnvironment = {
210
222
  }
211
223
  }
212
224
  };
225
+ /**
226
+ * Gate context for a tool step: `status` and `outputs`, with no `exit_code`
227
+ * because a tool step never reports one.
228
+ */ export const toolStepReportTypeEnvironment = {
229
+ step: {
230
+ kind: 'object',
231
+ fields: {
232
+ status: 'string',
233
+ outputs: {
234
+ kind: 'map'
235
+ }
236
+ }
237
+ }
238
+ };
239
+ // A tool step never reports an exit code: the call outcome is the attempt
240
+ // status, and the gate context of a tool step reads `status` and `outputs` only.
241
+ const toolStepAttemptType = {
242
+ kind: 'object',
243
+ fields: {
244
+ status: 'string',
245
+ outputs: {
246
+ kind: 'map'
247
+ },
248
+ response: 'string',
249
+ gate: toolStepGateType
250
+ }
251
+ };
252
+ // The self root of a tool step drops `exit_code` from the shared step fields.
253
+ const toolStepSelfTypeEnvironment = {
254
+ step: {
255
+ kind: 'object',
256
+ fields: {
257
+ ...stepDispatchTypeEnvironment.step.fields,
258
+ status: 'string',
259
+ outputs: {
260
+ kind: 'map'
261
+ }
262
+ }
263
+ }
264
+ };
213
265
  const stepTypeEnvironment = {
214
266
  step: {
215
267
  kind: 'object',
@@ -388,6 +440,10 @@ export const workflowInterpolationFieldPolicies = {
388
440
  acceptedHosts: serverOnlyHosts,
389
441
  failurePolicy: 'fail'
390
442
  },
443
+ 'agent.session': {
444
+ acceptedHosts: serverOnlyHosts,
445
+ failurePolicy: 'fail'
446
+ },
391
447
  'job.runner': {
392
448
  acceptedHosts: serverOnlyHosts,
393
449
  failurePolicy: 'fail'
@@ -446,6 +502,20 @@ export const workflowInterpolationFieldPolicies = {
446
502
  'checkout.path': {
447
503
  acceptedHosts: serverOnlyHosts,
448
504
  failurePolicy: 'fail'
505
+ },
506
+ 'tool.with': {
507
+ acceptedHosts: serverOnlyHosts,
508
+ failurePolicy: 'fail',
509
+ minimumFillTarget: 'step-dispatch'
510
+ },
511
+ 'tool.outputs': {
512
+ acceptedHosts: serverOnlyHosts,
513
+ failurePolicy: 'fail',
514
+ minimumFillTarget: 'step-report',
515
+ roots: [
516
+ 'result',
517
+ 'vars'
518
+ ]
449
519
  }
450
520
  };
451
521
  export const workflowInterpolationFields = Object.keys(workflowInterpolationFieldPolicies);
@@ -557,13 +627,21 @@ export function rootsAvailableAt(site) {
557
627
  });
558
628
  }
559
629
  export function unavailableRootsAt(roots, site) {
560
- const availableRoots = new Set(rootsAvailableAt(site));
561
- return roots.filter((root)=>!availableRoots.has(root));
630
+ const targetSiteIndex = availabilitySites.indexOf(site);
631
+ return roots.filter((root)=>{
632
+ const availability = resolveContextRootAvailability(root);
633
+ return availability === undefined || availabilitySites.indexOf(availability) > targetSiteIndex;
634
+ });
562
635
  }
563
636
  export function getWorkflowContextTypeEnvironment(name) {
564
637
  const context = getWorkflowContextDefinition(name);
565
638
  return context.shape === 'known' ? context.typeEnvironment : undefined;
566
639
  }
640
+ export function getWorkflowInterpolationFieldTypeEnvironment(field, root) {
641
+ if (field === 'tool.with' && root === 'step') return stepDispatchTypeEnvironment;
642
+ if (!isWorkflowContextName(root)) return undefined;
643
+ return getWorkflowContextTypeEnvironment(root);
644
+ }
567
645
  export function workflowInterpolationFieldAcceptsHost(field, host) {
568
646
  return workflowInterpolationFieldPolicies[field].acceptedHosts.includes(host);
569
647
  }
@@ -585,8 +663,9 @@ export function getWorkflowInterpolationFieldMinimumFillTarget(field) {
585
663
  export function getWorkflowPredicateFieldMinimumFillTarget(field) {
586
664
  return workflowPredicateFieldMinimumFillTargets[field];
587
665
  }
588
- export function getWorkflowPredicateFieldTypeEnvironment(field, root) {
589
- const typeEnvironment = workflowPredicateFieldTypeEnvironments[field];
666
+ export function getWorkflowPredicateFieldTypeEnvironment(field, root, stepKind) {
667
+ const fieldTypeEnvironment = field === 'step.success' && stepKind === 'tool' ? toolStepReportTypeEnvironment : workflowPredicateFieldTypeEnvironments[field];
668
+ const typeEnvironment = fieldTypeEnvironment;
590
669
  if (typeEnvironment === undefined) return getWorkflowContextTypeEnvironment(root);
591
670
  const rootType = typeEnvironment[root];
592
671
  return rootType === undefined ? getWorkflowContextTypeEnvironment(root) : {
@@ -601,12 +680,16 @@ export function getWorkflowPredicateContextRoots(field) {
601
680
  *
602
681
  * A predicate has an enumerated contract because the runtime assembles one
603
682
  * context for it. A template has no single context: each reference is filled
604
- * where its data arrives, so its only field-level constraint is which host can
605
- * resolve it. Callers that document or check fields should use this instead of
683
+ * where its data arrives, so its field-level constraint is which host can
684
+ * resolve it, except for fields that declare an explicit root list (such as
685
+ * `tool.outputs`, whose reserved `result` root is not a referenceable context
686
+ * name). Callers that document or check fields should use this instead of
606
687
  * choosing a mechanism themselves.
607
688
  */ export function contextRootsForField(field) {
608
689
  if (isWorkflowPredicateField(field)) return workflowPredicateContextRoots[field];
609
- const { acceptedHosts } = workflowInterpolationFieldPolicies[field];
690
+ const policy = workflowInterpolationFieldPolicies[field];
691
+ if (policy.roots !== undefined) return policy.roots;
692
+ const { acceptedHosts } = policy;
610
693
  return workflowContextNames.filter((name)=>acceptedHosts.includes(workflowContextDefinitions[name].host));
611
694
  }
612
695
  export function isWorkflowPredicateField(field) {
@@ -665,7 +748,7 @@ function stepsRootType(steps) {
665
748
  };
666
749
  }
667
750
  function stepEntityTypeForStep(step) {
668
- const attemptType = stepAttemptTypeForOutputs(outputsTypeForStep(step));
751
+ const attemptType = stepAttemptTypeForOutputs(outputsTypeForStep(step), step.kind === 'tool');
669
752
  return {
670
753
  kind: 'object',
671
754
  fields: {
@@ -678,24 +761,39 @@ function stepEntityTypeForStep(step) {
678
761
  };
679
762
  }
680
763
  function selfStepType(step) {
764
+ const selfType = step.kind === 'tool' ? toolStepSelfTypeEnvironment : stepTypeEnvironment;
681
765
  return {
682
766
  kind: 'object',
683
767
  fields: {
684
- ...stepTypeEnvironment.step.fields,
768
+ ...selfType.step.fields,
685
769
  outputs: outputsTypeForStep(step)
686
770
  }
687
771
  };
688
772
  }
689
- function stepAttemptTypeForOutputs(outputs) {
773
+ function stepAttemptTypeForOutputs(outputs, toolStep) {
690
774
  return {
691
775
  kind: 'object',
692
776
  fields: {
693
- ...stepAttemptType.fields,
777
+ ...(toolStep ? toolStepAttemptType : stepAttemptType).fields,
694
778
  outputs
695
779
  }
696
780
  };
697
781
  }
698
782
  function outputsTypeForStep(step) {
783
+ if (step.kind === 'tool') {
784
+ // Every tool step exposes `outputs.result`, typed from the catalog output
785
+ // schema when one is declared and open otherwise; `result` always wins
786
+ // over a mapped output that tries to redeclare it.
787
+ return {
788
+ kind: 'object',
789
+ fields: {
790
+ ...step.outputs === undefined ? {} : outputDeclarationsToExpressionFields(step.outputs),
791
+ result: step.outputSchema === undefined ? {
792
+ kind: 'map'
793
+ } : jsonSchemaToExpressionType(step.outputSchema)
794
+ }
795
+ };
796
+ }
699
797
  if (step.outputs === undefined) return {
700
798
  kind: 'map'
701
799
  };