@agent-relay/workflow-types 6.0.3

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.
@@ -0,0 +1,265 @@
1
+ /**
2
+ * Shared workflow types for Agent Relay packages.
3
+ *
4
+ * This package is intentionally a leaf dependency so workflow integrations can
5
+ * share the public workflow type surface without depending on the full SDK.
6
+ */
7
+ export type SwarmPattern = 'fan-out' | 'pipeline' | 'hub-spoke' | 'consensus' | 'mesh' | 'handoff' | 'cascade' | 'dag' | 'debate' | 'hierarchical' | 'map-reduce' | 'scatter-gather' | 'supervisor' | 'reflection' | 'red-team' | 'verifier' | 'auction' | 'escalation' | 'saga' | 'circuit-breaker' | 'blackboard' | 'swarm' | 'competitive' | 'review-loop';
8
+ export type AgentPreset = 'lead' | 'worker' | 'reviewer' | 'analyst';
9
+ /** Optional credential settings for a workflow agent. */
10
+ export interface AgentCredentialConfig {
11
+ /** Opt the agent into credential proxy mode. */
12
+ proxy?: boolean;
13
+ /** Override the provider used for proxy credential resolution. */
14
+ provider?: string;
15
+ }
16
+ /** Definition of an agent participating in a workflow. */
17
+ export interface AgentDefinition {
18
+ name: string;
19
+ cli: AgentCli;
20
+ role?: string;
21
+ task?: string;
22
+ channels?: string[];
23
+ constraints?: AgentConstraints;
24
+ /**
25
+ * Permission configuration controlling file access, network, and exec restrictions.
26
+ * Omitting this field preserves the default behavior: inherit dotfiles + readwrite access.
27
+ */
28
+ permissions?: AgentPermissions;
29
+ /** When false, the agent runs as a non-interactive subprocess (no PTY, no relay messaging).
30
+ * It receives its task as a CLI prompt argument and returns stdout as output.
31
+ * Default: true (interactive PTY mode). */
32
+ interactive?: boolean;
33
+ /** Working directory for this agent, resolved relative to the YAML file. */
34
+ cwd?: string;
35
+ /** Sets this agent's working directory to a named entry from the top-level `paths` array.
36
+ * Mutually exclusive with `cwd`. If omitted, the agent runs in the runner's
37
+ * working directory (the directory containing the workflow YAML file). */
38
+ workdir?: string;
39
+ /** Additional paths the agent needs read/write access to. */
40
+ additionalPaths?: string[];
41
+ /**
42
+ * Role preset that automatically configures interactive mode and injects
43
+ * appropriate task guardrails. Overrides are still accepted.
44
+ * lead → interactive PTY, relay-aware, coordinates workers via channels
45
+ * worker → interactive: false, produces structured output, no sub-agents
46
+ * reviewer → interactive: false, reads artifacts, produces verdict, no sub-agents
47
+ * analyst → interactive: false, reads code/files, writes findings, no sub-agents
48
+ */
49
+ preset?: AgentPreset;
50
+ /** Optional credential proxy settings for this agent. */
51
+ credentials?: AgentCredentialConfig;
52
+ /** System prompt / skills for API-mode agents (cli: 'api'). */
53
+ skills?: string;
54
+ }
55
+ export type AgentCli = 'claude' | 'codex' | 'gemini' | 'aider' | 'goose' | 'opencode' | 'droid' | 'cursor' | 'cursor-agent' | 'agent' | 'api';
56
+ /** Resource and behavioral constraints for an agent. */
57
+ export interface AgentConstraints {
58
+ maxTokens?: number;
59
+ timeoutMs?: number;
60
+ retries?: number;
61
+ model?: string;
62
+ /** Silence duration in seconds before the agent is considered idle (0 = disabled, default: 30). */
63
+ idleThresholdSecs?: number;
64
+ }
65
+ /**
66
+ * Access preset for role-based permission shortcuts.
67
+ *
68
+ * readonly → read all non-ignored files, write nothing
69
+ * readwrite → read and write all non-ignored files (default behavior)
70
+ * restricted → read/write only explicitly listed paths
71
+ * full → read and write everything, including normally-ignored files
72
+ */
73
+ export type AccessPreset = 'readonly' | 'readwrite' | 'restricted' | 'full';
74
+ /** Fine-grained network permission with allowlist/denylist. */
75
+ export interface NetworkPermissions {
76
+ /** Host:port pairs the agent may connect to (e.g. ['registry.npmjs.org:443']). */
77
+ allow?: string[];
78
+ /** Host:port patterns to block (e.g. ['*'] to deny all except allowed). */
79
+ deny?: string[];
80
+ }
81
+ /** Network permission: boolean to allow/deny all, or object for fine-grained control. */
82
+ export type NetworkPermission = boolean | NetworkPermissions;
83
+ /** Glob-based file permission scopes for an agent. */
84
+ export interface FilePermissions {
85
+ /** Glob patterns the agent may read (e.g. ['src/**', 'docs/**']). */
86
+ read?: string[];
87
+ /** Glob patterns the agent may write (e.g. ['src/tests/**']). */
88
+ write?: string[];
89
+ /** Glob patterns the agent must never access (e.g. ['.env', 'secrets/**']).
90
+ * Deny rules take precedence over read/write grants. */
91
+ deny?: string[];
92
+ }
93
+ /** Reusable named permission profile shared by one or more agents. */
94
+ export interface PermissionProfileDefinition {
95
+ /** Human-readable summary of the profile's intended use. */
96
+ description?: string;
97
+ /** Explain why this profile exists or what constraint it is protecting. */
98
+ why?: string;
99
+ /** Role-based access preset. Expands into file permission rules.
100
+ * Default: 'readwrite'. */
101
+ access?: AccessPreset;
102
+ /** Inherit patterns from .agentignore and .agentreadonly dotfiles.
103
+ * Default: true. Set to false to ignore dotfiles for this agent. */
104
+ inherit?: boolean;
105
+ /** Explicit glob-based file read/write/deny rules.
106
+ * Merged on top of the access preset and inherited dotfile patterns. */
107
+ files?: FilePermissions;
108
+ /** Raw relayauth scopes appended verbatim to the minted token.
109
+ * For power users who need fine-grained control beyond file globs.
110
+ * Example: ['relayfile:fs:read:/src/**', 'relayfile:fs:write:/tests/**'] */
111
+ scopes?: string[];
112
+ /** Network access control.
113
+ * - undefined: no restriction
114
+ * - false: deny all network access
115
+ * - { allow, deny }: fine-grained host:port allowlist/denylist */
116
+ network?: NetworkPermission;
117
+ /** Allowlist of shell commands the agent may execute.
118
+ * When set, only commands matching these prefixes are permitted.
119
+ * Example: ['npm test', 'npm run lint', 'git diff']
120
+ * Default: undefined (no restriction). */
121
+ exec?: string[];
122
+ }
123
+ /**
124
+ * Permission configuration for a workflow agent.
125
+ *
126
+ * All fields are optional — omitting `permissions` entirely preserves the
127
+ * existing default behavior (inherit dotfiles, readwrite access).
128
+ *
129
+ * Resolution order (later overrides earlier):
130
+ * 1. Dotfile patterns (.agentignore / .agentreadonly) when `inherit` is true
131
+ * 2. `access` preset expands into base file rules
132
+ * 3. Explicit `files` globs merge on top
133
+ * 4. `deny` patterns always win (applied last)
134
+ * 5. `scopes` are appended verbatim to the token
135
+ */
136
+ export interface AgentPermissions {
137
+ /** Human-readable summary of what this permission block is for. */
138
+ description?: string;
139
+ /** Reference a reusable entry from the top-level `permission_profiles` map. */
140
+ profile?: string;
141
+ /** Explain why these permissions are needed or intentionally constrained. */
142
+ why?: string;
143
+ /** Role-based access preset. Expands into file permission rules.
144
+ * Default: 'readwrite'. */
145
+ access?: AccessPreset;
146
+ /** Inherit patterns from .agentignore and .agentreadonly dotfiles.
147
+ * Default: true. Set to false to ignore dotfiles for this agent. */
148
+ inherit?: boolean;
149
+ /** Explicit glob-based file read/write/deny rules.
150
+ * Merged on top of the access preset and inherited dotfile patterns. */
151
+ files?: FilePermissions;
152
+ /** Raw relayauth scopes appended verbatim to the minted token.
153
+ * For power users who need fine-grained control beyond file globs.
154
+ * Example: ['relayfile:fs:read:/src/**', 'relayfile:fs:write:/tests/**'] */
155
+ scopes?: string[];
156
+ /** Network access control.
157
+ * - undefined: no restriction
158
+ * - false: deny all network access
159
+ * - { allow, deny }: fine-grained host:port allowlist/denylist */
160
+ network?: NetworkPermission;
161
+ /** Allowlist of shell commands the agent may execute.
162
+ * When set, only commands matching these prefixes are permitted.
163
+ * Example: ['npm test', 'npm run lint', 'git diff']
164
+ * Default: undefined (no restriction). */
165
+ exec?: string[];
166
+ }
167
+ /** Step type: agent (LLM-powered), deterministic (shell command), worktree (git worktree setup), or integration (external service). */
168
+ export type WorkflowStepType = 'agent' | 'deterministic' | 'worktree' | 'integration';
169
+ /**
170
+ * A single step within a workflow.
171
+ *
172
+ * Steps can be either:
173
+ * - Agent steps (type: undefined or "agent"): Spawn an LLM agent to execute a task
174
+ * - Deterministic steps (type: "deterministic"): Execute a shell command
175
+ */
176
+ export interface WorkflowStep {
177
+ /** Unique step name within the workflow. */
178
+ name: string;
179
+ /** Step type: "agent" (default) or "deterministic". */
180
+ type?: WorkflowStepType;
181
+ /** Reference to a custom step definition from .relay/steps.yaml. */
182
+ use?: string;
183
+ /** Step names that must complete before this step runs. */
184
+ dependsOn?: string[];
185
+ /** Timeout in milliseconds. */
186
+ timeoutMs?: number;
187
+ /** Name of the agent to execute this step (required for agent steps). */
188
+ agent?: string;
189
+ /** Task description for the agent (required for agent steps). */
190
+ task?: string;
191
+ /** Verification check to validate step output. */
192
+ verification?: VerificationCheck;
193
+ /** Number of retry attempts on failure. */
194
+ retries?: number;
195
+ /** Maximum iterations for steps that may need to retry (e.g., fix-failures). */
196
+ maxIterations?: number;
197
+ /** Explicit working directory for this step. */
198
+ cwd?: string;
199
+ /** Shell command to execute (required for deterministic steps). */
200
+ command?: string;
201
+ /** Sets this step's working directory to a named entry from the top-level `paths` array.
202
+ * If omitted, the step inherits the agent's workdir, or falls back to the runner's
203
+ * working directory. */
204
+ workdir?: string;
205
+ /** Fail if command exit code is non-zero. Default: true. */
206
+ failOnError?: boolean;
207
+ /** Capture stdout as step output for downstream steps. Default: true. */
208
+ captureOutput?: boolean;
209
+ /** Integration name: 'github', 'linear', 'slack' (required for integration steps). */
210
+ integration?: string;
211
+ /** Action within the integration, e.g. 'create-pr', 'create-branch' (required for integration steps). */
212
+ action?: string;
213
+ /** Action parameters, supports {{steps.X.output}} interpolation. */
214
+ params?: Record<string, string>;
215
+ /** Branch name for the worktree (required for worktree steps). */
216
+ branch?: string;
217
+ /** Base branch to create the worktree from. Default: HEAD. */
218
+ baseBranch?: string;
219
+ /** Explicit path for the worktree. Default: .worktrees/<step-name>. */
220
+ path?: string;
221
+ /** Create the branch if it doesn't exist. Default: true. */
222
+ createBranch?: boolean;
223
+ }
224
+ /** Type guard: Check if a step is a deterministic (shell command) step. */
225
+ export declare function isDeterministicStep(step: WorkflowStep): boolean;
226
+ /** Type guard: Check if a step is a worktree (git worktree setup) step. */
227
+ export declare function isWorktreeStep(step: WorkflowStep): boolean;
228
+ /** Type guard: Check if a step is an integration (external service) step. */
229
+ export declare function isIntegrationStep(step: WorkflowStep): boolean;
230
+ /** Type guard: Check if a step uses a custom step definition. */
231
+ export declare function isCustomStep(step: WorkflowStep): boolean;
232
+ /** Type guard: Check if a step is an agent (LLM-powered) step. */
233
+ export declare function isAgentStep(step: WorkflowStep): boolean;
234
+ export type AgentWorkflowStep = WorkflowStep;
235
+ export type DeterministicWorkflowStep = WorkflowStep;
236
+ /** Verification check to validate a step's output. */
237
+ export interface VerificationCheck {
238
+ type: 'output_contains' | 'exit_code' | 'file_exists' | 'custom';
239
+ value: string;
240
+ description?: string;
241
+ timeoutMs?: number;
242
+ /** Name of the agent to analyze verification failures before retrying. */
243
+ diagnosticAgent?: string;
244
+ /** Timeout for the diagnostic agent in milliseconds. Default: 60_000. */
245
+ diagnosticTimeout?: number;
246
+ }
247
+ /**
248
+ * Extension point for delegating step execution to an external backend
249
+ * (e.g. Daytona sandboxes) while keeping the runner's DAG/retry/verification
250
+ * machinery intact.
251
+ */
252
+ export interface RunnerStepExecutor {
253
+ executeAgentStep(step: WorkflowStep, agentDef: AgentDefinition, resolvedTask: string, timeoutMs?: number): Promise<string>;
254
+ executeDeterministicStep?(step: WorkflowStep, resolvedCommand: string, cwd: string): Promise<{
255
+ output: string;
256
+ exitCode: number;
257
+ }>;
258
+ executeIntegrationStep?(step: WorkflowStep, resolvedParams: Record<string, string>, context: {
259
+ workspaceId?: string;
260
+ }): Promise<{
261
+ output: string;
262
+ success: boolean;
263
+ }>;
264
+ }
265
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,UAAU,GACV,WAAW,GACX,WAAW,GACX,MAAM,GACN,SAAS,GACT,SAAS,GACT,KAAK,GACL,QAAQ,GACR,cAAc,GAEd,YAAY,GACZ,gBAAgB,GAChB,YAAY,GACZ,YAAY,GACZ,UAAU,GACV,UAAU,GACV,SAAS,GACT,YAAY,GACZ,MAAM,GACN,iBAAiB,GACjB,YAAY,GACZ,OAAO,GACP,aAAa,GACb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AAC;IACzB,yEAAyE;IACzE,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,gBAAgB,CACd,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,eAAe,EACzB,YAAY,EAAE,MAAM,EACpB,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnB,wBAAwB,CAAC,CACvB,IAAI,EAAE,YAAY,EAClB,eAAe,EAAE,MAAM,EACvB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAEjD,sBAAsB,CAAC,CACrB,IAAI,EAAE,YAAY,EAClB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACtC,OAAO,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,GAChC,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;CAClD"}
package/dist/index.js ADDED
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Shared workflow types for Agent Relay packages.
3
+ *
4
+ * This package is intentionally a leaf dependency so workflow integrations can
5
+ * share the public workflow type surface without depending on the full SDK.
6
+ */
7
+ /** Type guard: Check if a step is a deterministic (shell command) step. */
8
+ export function isDeterministicStep(step) {
9
+ return step.type === 'deterministic';
10
+ }
11
+ /** Type guard: Check if a step is a worktree (git worktree setup) step. */
12
+ export function isWorktreeStep(step) {
13
+ return step.type === 'worktree';
14
+ }
15
+ /** Type guard: Check if a step is an integration (external service) step. */
16
+ export function isIntegrationStep(step) {
17
+ return step.type === 'integration';
18
+ }
19
+ /** Type guard: Check if a step uses a custom step definition. */
20
+ export function isCustomStep(step) {
21
+ return step.use !== undefined;
22
+ }
23
+ /** Type guard: Check if a step is an agent (LLM-powered) step. */
24
+ export function isAgentStep(step) {
25
+ return step.type !== 'deterministic' && step.type !== 'worktree' && step.type !== 'integration';
26
+ }
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAwSH,2EAA2E;AAC3E,MAAM,UAAU,mBAAmB,CAAC,IAAkB;IACpD,OAAO,IAAI,CAAC,IAAI,KAAK,eAAe,CAAC;AACvC,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,cAAc,CAAC,IAAkB;IAC/C,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC;AAClC,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,iBAAiB,CAAC,IAAkB;IAClD,OAAO,IAAI,CAAC,IAAI,KAAK,aAAa,CAAC;AACrC,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,YAAY,CAAC,IAAkB;IAC7C,OAAO,IAAI,CAAC,GAAG,KAAK,SAAS,CAAC;AAChC,CAAC;AAED,kEAAkE;AAClE,MAAM,UAAU,WAAW,CAAC,IAAkB;IAC5C,OAAO,IAAI,CAAC,IAAI,KAAK,eAAe,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,CAAC;AAClG,CAAC"}
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@agent-relay/workflow-types",
3
+ "version": "6.0.3",
4
+ "type": "module",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js",
11
+ "default": "./dist/index.js"
12
+ }
13
+ },
14
+ "scripts": {
15
+ "build": "tsc",
16
+ "check": "tsc --noEmit"
17
+ },
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "publishConfig": {
22
+ "access": "public"
23
+ }
24
+ }