agent-contracts-runtime 0.36.6 → 0.36.7
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/adapters/adk-sdk.d.ts +2 -2
- package/dist/adapters/adk-sdk.js +1 -1
- package/dist/adapters/claude-agent-sdk.d.ts +2 -2
- package/dist/adapters/mock.d.ts +1 -1
- package/dist/adapters/openai-agents-sdk.d.ts +2 -2
- package/dist/agent-runtime.bundle.mjs +266 -266
- package/dist/agent-runtime.bundle.mjs.map +4 -4
- package/dist/{chunk-FFCXUPYA.js → chunk-DPJFPYJO.js} +380 -172
- package/dist/chunk-DPJFPYJO.js.map +1 -0
- package/dist/chunk-LTZA6QWC.js +296 -0
- package/dist/chunk-LTZA6QWC.js.map +1 -0
- package/dist/{chunk-JDXRLHY3.js → chunk-MGRZBGQL.js} +20 -1
- package/dist/chunk-MGRZBGQL.js.map +1 -0
- package/dist/chunk-PEHJ3J5C.js +307 -0
- package/dist/chunk-PEHJ3J5C.js.map +1 -0
- package/dist/cli/index.js +4 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/context-B_bekYiE.d.ts +106 -0
- package/dist/generator/index.d.ts +2 -106
- package/dist/generator/index.js +5 -3
- package/dist/{guardrail-hooks-B1_vgkE5.d.ts → guardrail-hooks-C8G5NGsj.d.ts} +8 -1
- package/dist/index.d.ts +80 -5
- package/dist/index.js +15 -2
- package/dist/{task-runner-C1bAy5k9.d.ts → task-runner-Bo37lS9q.d.ts} +5 -0
- package/package.json +1 -1
- package/dist/chunk-FFCXUPYA.js.map +0 -1
- package/dist/chunk-JDXRLHY3.js.map +0 -1
- package/dist/chunk-KQOZCJK6.js +0 -593
- package/dist/chunk-KQOZCJK6.js.map +0 -1
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build template contexts from resolved DSL data
|
|
3
|
+
*/
|
|
4
|
+
interface AgentEntry {
|
|
5
|
+
id: string;
|
|
6
|
+
varName: string;
|
|
7
|
+
role_name: string;
|
|
8
|
+
purpose: string;
|
|
9
|
+
mode: string;
|
|
10
|
+
dispatch_only: boolean;
|
|
11
|
+
can_read_artifacts: string[];
|
|
12
|
+
can_write_artifacts: string[];
|
|
13
|
+
can_execute_tools: string[];
|
|
14
|
+
can_invoke_agents: string[];
|
|
15
|
+
can_return_handoffs: string[];
|
|
16
|
+
responsibilities: string[];
|
|
17
|
+
constraints: string[];
|
|
18
|
+
rules: Array<{
|
|
19
|
+
id: string;
|
|
20
|
+
description: string;
|
|
21
|
+
severity: string;
|
|
22
|
+
}>;
|
|
23
|
+
escalation_criteria: Array<{
|
|
24
|
+
condition: string;
|
|
25
|
+
action: string;
|
|
26
|
+
}>;
|
|
27
|
+
}
|
|
28
|
+
interface TaskEntry {
|
|
29
|
+
id: string;
|
|
30
|
+
varName: string;
|
|
31
|
+
description: string;
|
|
32
|
+
target_agent: string;
|
|
33
|
+
allowed_from_agents: string[];
|
|
34
|
+
workflow: string;
|
|
35
|
+
invocation_handoff: string;
|
|
36
|
+
result_handoff: string;
|
|
37
|
+
input_artifacts: string[];
|
|
38
|
+
responsibilities: string[];
|
|
39
|
+
completion_criteria: string[];
|
|
40
|
+
optional: boolean;
|
|
41
|
+
model_class?: string;
|
|
42
|
+
}
|
|
43
|
+
interface WorkflowStepEntry {
|
|
44
|
+
type: string;
|
|
45
|
+
task?: string;
|
|
46
|
+
from_agent?: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
optional?: boolean;
|
|
49
|
+
max_retries?: number;
|
|
50
|
+
max_follow_ups?: number;
|
|
51
|
+
depends_on?: string[];
|
|
52
|
+
gate_kind?: string;
|
|
53
|
+
retry?: {
|
|
54
|
+
condition: string;
|
|
55
|
+
fix_task: string;
|
|
56
|
+
revalidate_task?: string;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
interface WorkflowEntry {
|
|
60
|
+
id: string;
|
|
61
|
+
varName: string;
|
|
62
|
+
description: string;
|
|
63
|
+
trigger: string;
|
|
64
|
+
entry_conditions: string[];
|
|
65
|
+
steps: WorkflowStepEntry[];
|
|
66
|
+
}
|
|
67
|
+
interface HandoffEntry {
|
|
68
|
+
id: string;
|
|
69
|
+
varName: string;
|
|
70
|
+
pascalName: string;
|
|
71
|
+
schemaName: string;
|
|
72
|
+
description: string;
|
|
73
|
+
schema: Record<string, unknown>;
|
|
74
|
+
}
|
|
75
|
+
interface ContractContext {
|
|
76
|
+
agentEntries: AgentEntry[];
|
|
77
|
+
taskEntries: TaskEntry[];
|
|
78
|
+
workflowEntries: WorkflowEntry[];
|
|
79
|
+
handoffEntries: HandoffEntry[];
|
|
80
|
+
}
|
|
81
|
+
declare function buildContractContext(dsl: any): ContractContext;
|
|
82
|
+
interface GuardrailCheckEntry {
|
|
83
|
+
guardrail_id: string;
|
|
84
|
+
description: string;
|
|
85
|
+
severity: string;
|
|
86
|
+
action: string;
|
|
87
|
+
matcher_type: string;
|
|
88
|
+
pattern: string;
|
|
89
|
+
message: string;
|
|
90
|
+
file_glob?: string;
|
|
91
|
+
exclude_glob?: string;
|
|
92
|
+
}
|
|
93
|
+
interface GuardrailContext {
|
|
94
|
+
commandChecks: GuardrailCheckEntry[];
|
|
95
|
+
fileChecks: GuardrailCheckEntry[];
|
|
96
|
+
contentChecks: GuardrailCheckEntry[];
|
|
97
|
+
allChecks: GuardrailCheckEntry[];
|
|
98
|
+
hasGuardrails: boolean;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Build guardrail context from DSL guardrails, binding guardrail_impl, and active policy.
|
|
102
|
+
* Mirrors the agent-contracts resolveChecks pattern.
|
|
103
|
+
*/
|
|
104
|
+
declare function buildGuardrailContext(dsl: any, binding: any, policyName?: string): GuardrailContext;
|
|
105
|
+
|
|
106
|
+
export { type GuardrailContext as G, buildGuardrailContext as a, buildContractContext as b };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
export { b as buildContractContext, a as buildGuardrailContext } from '../context-B_bekYiE.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Generator configuration — loads and validates agents.conf.yaml / agent-runtime.config.yaml
|
|
@@ -116,111 +117,6 @@ interface ResolvedConfig extends RuntimeConfig {
|
|
|
116
117
|
declare function loadConfig(configPath: string): Promise<ResolvedConfig>;
|
|
117
118
|
declare function loadProjectConfig(configPath: string, cliName?: string): Promise<ResolvedConfig>;
|
|
118
119
|
|
|
119
|
-
/**
|
|
120
|
-
* Build template contexts from resolved DSL data
|
|
121
|
-
*/
|
|
122
|
-
interface AgentEntry {
|
|
123
|
-
id: string;
|
|
124
|
-
varName: string;
|
|
125
|
-
role_name: string;
|
|
126
|
-
purpose: string;
|
|
127
|
-
mode: string;
|
|
128
|
-
dispatch_only: boolean;
|
|
129
|
-
can_read_artifacts: string[];
|
|
130
|
-
can_write_artifacts: string[];
|
|
131
|
-
can_execute_tools: string[];
|
|
132
|
-
can_invoke_agents: string[];
|
|
133
|
-
can_return_handoffs: string[];
|
|
134
|
-
responsibilities: string[];
|
|
135
|
-
constraints: string[];
|
|
136
|
-
rules: Array<{
|
|
137
|
-
id: string;
|
|
138
|
-
description: string;
|
|
139
|
-
severity: string;
|
|
140
|
-
}>;
|
|
141
|
-
escalation_criteria: Array<{
|
|
142
|
-
condition: string;
|
|
143
|
-
action: string;
|
|
144
|
-
}>;
|
|
145
|
-
}
|
|
146
|
-
interface TaskEntry {
|
|
147
|
-
id: string;
|
|
148
|
-
varName: string;
|
|
149
|
-
description: string;
|
|
150
|
-
target_agent: string;
|
|
151
|
-
allowed_from_agents: string[];
|
|
152
|
-
workflow: string;
|
|
153
|
-
invocation_handoff: string;
|
|
154
|
-
result_handoff: string;
|
|
155
|
-
input_artifacts: string[];
|
|
156
|
-
responsibilities: string[];
|
|
157
|
-
completion_criteria: string[];
|
|
158
|
-
optional: boolean;
|
|
159
|
-
model_class?: string;
|
|
160
|
-
}
|
|
161
|
-
interface WorkflowStepEntry {
|
|
162
|
-
type: string;
|
|
163
|
-
task?: string;
|
|
164
|
-
from_agent?: string;
|
|
165
|
-
description?: string;
|
|
166
|
-
optional?: boolean;
|
|
167
|
-
max_retries?: number;
|
|
168
|
-
max_follow_ups?: number;
|
|
169
|
-
depends_on?: string[];
|
|
170
|
-
gate_kind?: string;
|
|
171
|
-
retry?: {
|
|
172
|
-
condition: string;
|
|
173
|
-
fix_task: string;
|
|
174
|
-
revalidate_task?: string;
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
interface WorkflowEntry {
|
|
178
|
-
id: string;
|
|
179
|
-
varName: string;
|
|
180
|
-
description: string;
|
|
181
|
-
trigger: string;
|
|
182
|
-
entry_conditions: string[];
|
|
183
|
-
steps: WorkflowStepEntry[];
|
|
184
|
-
}
|
|
185
|
-
interface HandoffEntry {
|
|
186
|
-
id: string;
|
|
187
|
-
varName: string;
|
|
188
|
-
pascalName: string;
|
|
189
|
-
schemaName: string;
|
|
190
|
-
description: string;
|
|
191
|
-
schema: Record<string, unknown>;
|
|
192
|
-
}
|
|
193
|
-
interface ContractContext {
|
|
194
|
-
agentEntries: AgentEntry[];
|
|
195
|
-
taskEntries: TaskEntry[];
|
|
196
|
-
workflowEntries: WorkflowEntry[];
|
|
197
|
-
handoffEntries: HandoffEntry[];
|
|
198
|
-
}
|
|
199
|
-
declare function buildContractContext(dsl: any): ContractContext;
|
|
200
|
-
interface GuardrailCheckEntry {
|
|
201
|
-
guardrail_id: string;
|
|
202
|
-
description: string;
|
|
203
|
-
severity: string;
|
|
204
|
-
action: string;
|
|
205
|
-
matcher_type: string;
|
|
206
|
-
pattern: string;
|
|
207
|
-
message: string;
|
|
208
|
-
file_glob?: string;
|
|
209
|
-
exclude_glob?: string;
|
|
210
|
-
}
|
|
211
|
-
interface GuardrailContext {
|
|
212
|
-
commandChecks: GuardrailCheckEntry[];
|
|
213
|
-
fileChecks: GuardrailCheckEntry[];
|
|
214
|
-
contentChecks: GuardrailCheckEntry[];
|
|
215
|
-
allChecks: GuardrailCheckEntry[];
|
|
216
|
-
hasGuardrails: boolean;
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Build guardrail context from DSL guardrails, binding guardrail_impl, and active policy.
|
|
220
|
-
* Mirrors the agent-contracts resolveChecks pattern.
|
|
221
|
-
*/
|
|
222
|
-
declare function buildGuardrailContext(dsl: any, binding: any, policyName?: string): GuardrailContext;
|
|
223
|
-
|
|
224
120
|
/**
|
|
225
121
|
* Generator — orchestrates DSL-to-TypeScript code generation
|
|
226
122
|
*/
|
|
@@ -241,4 +137,4 @@ interface GenerateResult {
|
|
|
241
137
|
declare function generate(options?: GenerateOptions): Promise<GenerateResult>;
|
|
242
138
|
declare function checkFreshness(configPath?: string): Promise<boolean>;
|
|
243
139
|
|
|
244
|
-
export { DEFAULT_CONFIG_PATH, type GenerateOptions, type GenerateResult, type ProjectConfig, ProjectConfigSchema, type ResolvedConfig,
|
|
140
|
+
export { DEFAULT_CONFIG_PATH, type GenerateOptions, type GenerateResult, type ProjectConfig, ProjectConfigSchema, type ResolvedConfig, checkFreshness, generate, loadConfig, loadProjectConfig };
|
package/dist/generator/index.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_CONFIG_PATH,
|
|
3
3
|
ProjectConfigSchema,
|
|
4
|
-
buildContractContext,
|
|
5
|
-
buildGuardrailContext,
|
|
6
4
|
checkFreshness,
|
|
7
5
|
generate,
|
|
8
6
|
loadConfig,
|
|
9
7
|
loadProjectConfig
|
|
10
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-PEHJ3J5C.js";
|
|
9
|
+
import {
|
|
10
|
+
buildContractContext,
|
|
11
|
+
buildGuardrailContext
|
|
12
|
+
} from "../chunk-LTZA6QWC.js";
|
|
11
13
|
export {
|
|
12
14
|
DEFAULT_CONFIG_PATH,
|
|
13
15
|
ProjectConfigSchema,
|
|
@@ -36,6 +36,8 @@ interface GuardrailCheckFunctions {
|
|
|
36
36
|
checkContent: (filePath: string, content: string) => GuardrailCheckResult[];
|
|
37
37
|
}
|
|
38
38
|
interface HookContext {
|
|
39
|
+
/** Agent id for per-agent guardrail filtering. */
|
|
40
|
+
agentId?: string;
|
|
39
41
|
command?: string;
|
|
40
42
|
filePath?: string;
|
|
41
43
|
content?: string;
|
|
@@ -71,6 +73,11 @@ declare function createGuardrailHooks(checks: GuardrailCheckFunctions): Guardrai
|
|
|
71
73
|
/**
|
|
72
74
|
* Create SDK hook functions from embedded guardrail rule data.
|
|
73
75
|
*/
|
|
76
|
+
/**
|
|
77
|
+
* Create SDK hooks scoped to a single agent from a per-agent guardrail map.
|
|
78
|
+
* Returns empty-passing hooks when the agent has no rules in the map.
|
|
79
|
+
*/
|
|
80
|
+
declare function createGuardrailHooksForAgent(agentId: string, perAgent: Map<string, GuardrailRuleData>): GuardrailHooks;
|
|
74
81
|
declare function createGuardrailHooksFromRules(rules: GuardrailRuleData): GuardrailHooks;
|
|
75
82
|
|
|
76
|
-
export { type GuardrailHooks as G, type HookContext as H, type GuardrailRuleData as a, type GuardrailCheckFunctions as b, type GuardrailCheckResult as c, type GuardrailRule as d, type HookResponse as e, createGuardrailHooks as f,
|
|
83
|
+
export { type GuardrailHooks as G, type HookContext as H, type GuardrailRuleData as a, type GuardrailCheckFunctions as b, type GuardrailCheckResult as c, type GuardrailRule as d, type HookResponse as e, createGuardrailHooks as f, createGuardrailHooksForAgent as g, createGuardrailHooksFromRules as h, getBlockingViolations as i, getWarnings as j, hasBlockingViolation as k };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { S as SdkAdapter, T as TaskOutcome, b as TaskContractLike, c as AgentContractLike, d as TaskContext, P as PromptBuilderOptions, e as TaskRunResult } from './task-runner-
|
|
2
|
-
export { A as AdapterSendOptions, a as AgentExecutionRequest, f as AgentProgressEvent, C as CacheConfig, g as CandidateAgent, I as InMemoryStore, M as MemoryRef, h as MemoryStore, R as RetryDecision, i as SplitPrompt, j as TaskRunOptions, k as buildCandidateAgents, l as buildRetryFollowUp, m as buildSplitTaskPrompt, n as buildTaskPrompt, o as extractStructuredResult, r as renderAgentSystemPrompt, p as runTask, z as zodSchemaToPromptDescription, q as zodSchemaToYamlExample } from './task-runner-
|
|
1
|
+
import { S as SdkAdapter, T as TaskOutcome, b as TaskContractLike, c as AgentContractLike, d as TaskContext, P as PromptBuilderOptions, e as TaskRunResult } from './task-runner-Bo37lS9q.js';
|
|
2
|
+
export { A as AdapterSendOptions, a as AgentExecutionRequest, f as AgentProgressEvent, C as CacheConfig, g as CandidateAgent, I as InMemoryStore, M as MemoryRef, h as MemoryStore, R as RetryDecision, i as SplitPrompt, j as TaskRunOptions, k as buildCandidateAgents, l as buildRetryFollowUp, m as buildSplitTaskPrompt, n as buildTaskPrompt, o as extractStructuredResult, r as renderAgentSystemPrompt, p as runTask, z as zodSchemaToPromptDescription, q as zodSchemaToYamlExample } from './task-runner-Bo37lS9q.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { a as GuardrailRuleData, G as GuardrailHooks } from './guardrail-hooks-
|
|
5
|
-
export { b as GuardrailCheckFunctions, c as GuardrailCheckResult, d as GuardrailRule, H as HookContext, e as HookResponse, f as createGuardrailHooks, g as
|
|
4
|
+
import { a as GuardrailRuleData, G as GuardrailHooks } from './guardrail-hooks-C8G5NGsj.js';
|
|
5
|
+
export { b as GuardrailCheckFunctions, c as GuardrailCheckResult, d as GuardrailRule, H as HookContext, e as HookResponse, f as createGuardrailHooks, g as createGuardrailHooksForAgent, h as createGuardrailHooksFromRules, i as getBlockingViolations, j as getWarnings, k as hasBlockingViolation } from './guardrail-hooks-C8G5NGsj.js';
|
|
6
|
+
import { G as GuardrailContext } from './context-B_bekYiE.js';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* ModelResolver — resolves a model_class to a concrete adapter + model pair.
|
|
@@ -276,6 +277,68 @@ declare class PluginRegistry {
|
|
|
276
277
|
}
|
|
277
278
|
declare const pluginRegistry: PluginRegistry;
|
|
278
279
|
|
|
280
|
+
/**
|
|
281
|
+
* BoundResolver — runtime binding + policy resolution with per-agent isolation.
|
|
282
|
+
*
|
|
283
|
+
* Resolves artifact binding and guardrail/policy in one pass at runtime,
|
|
284
|
+
* producing a per-agent scoped ResolvedComponent. Reuses existing
|
|
285
|
+
* resolveBound(), buildGuardrailContext(), and agent scope resolution.
|
|
286
|
+
*/
|
|
287
|
+
|
|
288
|
+
interface ArtifactBindingConfig {
|
|
289
|
+
source: string;
|
|
290
|
+
mappings?: Record<string, string>;
|
|
291
|
+
}
|
|
292
|
+
interface BoundResolveOptions {
|
|
293
|
+
/** Component identifier — used for cache keying. */
|
|
294
|
+
id: string;
|
|
295
|
+
/** Pre-resolved DSL (e.g. embedded from codegen). */
|
|
296
|
+
embeddedDsl?: Record<string, unknown>;
|
|
297
|
+
/** Path to DSL file — resolved via agent-contracts when no embeddedDsl. */
|
|
298
|
+
dslPath?: string;
|
|
299
|
+
/** Paths to software binding YAML files (guardrail_impl, etc.). */
|
|
300
|
+
bindingPaths?: string[];
|
|
301
|
+
/** Active guardrail policy name from DSL guardrail_policies. */
|
|
302
|
+
activeGuardrailPolicy?: string;
|
|
303
|
+
/** Artifact binding config — resolved via agent-contracts resolveBound(). */
|
|
304
|
+
artifactBinding?: ArtifactBindingConfig;
|
|
305
|
+
/** Path substitutions for artifact binding. */
|
|
306
|
+
paths?: Record<string, string>;
|
|
307
|
+
}
|
|
308
|
+
interface ResolvedComponent {
|
|
309
|
+
id: string;
|
|
310
|
+
dsl: Record<string, unknown>;
|
|
311
|
+
registries: WorkflowRegistries;
|
|
312
|
+
guardrails: {
|
|
313
|
+
perAgent: Map<string, GuardrailRuleData>;
|
|
314
|
+
};
|
|
315
|
+
diagnostics: Array<{
|
|
316
|
+
path?: string;
|
|
317
|
+
message: string;
|
|
318
|
+
severity?: string;
|
|
319
|
+
}>;
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Effective guardrail IDs for an agent: entity-side bindings ∪ scope-side bindings.
|
|
323
|
+
*/
|
|
324
|
+
declare function getEffectiveGuardrailIds(dsl: Record<string, unknown>, agentId: string): Set<string>;
|
|
325
|
+
declare function guardrailContextToRuleData(ctx: GuardrailContext, effectiveIds?: Set<string>): GuardrailRuleData;
|
|
326
|
+
declare function buildPerAgentGuardrails(dsl: Record<string, unknown>, guardrailCtx: GuardrailContext): Map<string, GuardrailRuleData>;
|
|
327
|
+
declare class BoundResolver {
|
|
328
|
+
private readonly cache;
|
|
329
|
+
/**
|
|
330
|
+
* Resolve binding + policy in one pass. Results are cached by component id.
|
|
331
|
+
*/
|
|
332
|
+
resolve(opts: BoundResolveOptions): Promise<ResolvedComponent>;
|
|
333
|
+
/** Clear cached components (e.g. for testing). */
|
|
334
|
+
clearCache(): void;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Get guardrail rules for a specific agent from a ResolvedComponent.
|
|
338
|
+
* Falls back to embedded _guardrailRules when no per-agent rules exist.
|
|
339
|
+
*/
|
|
340
|
+
declare function getGuardrailRulesForAgent(component: ResolvedComponent, agentId: string, fallbackDsl?: Record<string, unknown>): GuardrailRuleData | undefined;
|
|
341
|
+
|
|
279
342
|
/**
|
|
280
343
|
* Fluent Builder API for workflow invocation.
|
|
281
344
|
*
|
|
@@ -505,6 +568,18 @@ interface ExecuteOptions {
|
|
|
505
568
|
adapterOptions?: Partial<CreateAdapterOptions>;
|
|
506
569
|
maxFollowUps?: number;
|
|
507
570
|
maxRetries?: number;
|
|
571
|
+
/** Pre-resolved component from BoundResolver (skips runtime resolve). */
|
|
572
|
+
resolvedComponent?: ResolvedComponent;
|
|
573
|
+
/** Component id for BoundResolver cache keying. */
|
|
574
|
+
componentId?: string;
|
|
575
|
+
/** Software binding paths for runtime guardrail resolution. */
|
|
576
|
+
bindingPaths?: string[];
|
|
577
|
+
/** Active guardrail policy name. */
|
|
578
|
+
activeGuardrailPolicy?: string;
|
|
579
|
+
/** Artifact binding config for runtime resolveBound(). */
|
|
580
|
+
artifactBinding?: ArtifactBindingConfig;
|
|
581
|
+
/** Path substitutions for artifact binding. */
|
|
582
|
+
paths?: Record<string, string>;
|
|
508
583
|
}
|
|
509
584
|
interface TaskHookContext {
|
|
510
585
|
adapter: SdkAdapter;
|
|
@@ -544,4 +619,4 @@ interface ExecuteWorkflowOptions extends ExecuteOptions {
|
|
|
544
619
|
}
|
|
545
620
|
declare function executeWorkflow(workflowId: string, options: ExecuteWorkflowOptions): Promise<WorkflowResult>;
|
|
546
621
|
|
|
547
|
-
export { type AdapterOrFactory, AgentContractLike, type AgentPlugin, type CreateAdapterOptions, type DelegateStep, type DslContext, DslValidationError, type ExecuteOptions, type ExecuteTaskOptions, type ExecuteWorkflowOptions, type GateStep, GuardrailHooks, type GuardrailResult, GuardrailRuleData, type HandoffInput, type LoadDslOptions, type ModelAwareSdkAdapterFactory, type ModelClass, type ModelMappingConfig, type ModelResolver, type ModelResolverOptions, type PermissionMode, type PluginLoadResult, PluginRegistry, type ProgressSink, type ProgressSinkOptions, type PromptBuilderArgs, PromptBuilderOptions, type RequiredEntities, type ResolvedModel, type Runtime, type RuntimeConfig, SdkAdapter, type SdkAdapterFactory, type StepCompleteEvent, type StepResult, TaskContext, TaskContractLike, type TaskHookContext, TaskOutcome, TaskRunResult, WorkflowBuilder, type WorkflowContractLike, type WorkflowHookContext, type WorkflowInvocation, type WorkflowRegistries, type WorkflowResult, type WorkflowRunOptions, type WorkflowStep, buildGateEvaluationPrompt, buildGuardrailRulesFromDsl, buildRegistriesFromDsl, createAdapter, createModelResolver, createProgressSink, createRuntime, executeTask, executeWorkflow, jsonSchemaToZod, loadDslContext, loadPlugins, loadPluginsFromDirectory, loadPluginsFromPaths, parseGateEvaluationResponse, pluginRegistry, runWorkflow };
|
|
622
|
+
export { type AdapterOrFactory, AgentContractLike, type AgentPlugin, type ArtifactBindingConfig, type BoundResolveOptions, BoundResolver, type CreateAdapterOptions, type DelegateStep, type DslContext, DslValidationError, type ExecuteOptions, type ExecuteTaskOptions, type ExecuteWorkflowOptions, type GateStep, GuardrailHooks, type GuardrailResult, GuardrailRuleData, type HandoffInput, type LoadDslOptions, type ModelAwareSdkAdapterFactory, type ModelClass, type ModelMappingConfig, type ModelResolver, type ModelResolverOptions, type PermissionMode, type PluginLoadResult, PluginRegistry, type ProgressSink, type ProgressSinkOptions, type PromptBuilderArgs, PromptBuilderOptions, type RequiredEntities, type ResolvedComponent, type ResolvedModel, type Runtime, type RuntimeConfig, SdkAdapter, type SdkAdapterFactory, type StepCompleteEvent, type StepResult, TaskContext, TaskContractLike, type TaskHookContext, TaskOutcome, TaskRunResult, WorkflowBuilder, type WorkflowContractLike, type WorkflowHookContext, type WorkflowInvocation, type WorkflowRegistries, type WorkflowResult, type WorkflowRunOptions, type WorkflowStep, buildGateEvaluationPrompt, buildGuardrailRulesFromDsl, buildPerAgentGuardrails, buildRegistriesFromDsl, createAdapter, createModelResolver, createProgressSink, createRuntime, executeTask, executeWorkflow, getEffectiveGuardrailIds, getGuardrailRulesForAgent, guardrailContextToRuleData, jsonSchemaToZod, loadDslContext, loadPlugins, loadPluginsFromDirectory, loadPluginsFromPaths, parseGateEvaluationResponse, pluginRegistry, runWorkflow };
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
+
BoundResolver,
|
|
2
3
|
DslValidationError,
|
|
3
4
|
InMemoryStore,
|
|
4
5
|
WorkflowBuilder,
|
|
5
6
|
buildCandidateAgents,
|
|
6
7
|
buildGateEvaluationPrompt,
|
|
7
8
|
buildGuardrailRulesFromDsl,
|
|
9
|
+
buildPerAgentGuardrails,
|
|
8
10
|
buildRegistriesFromDsl,
|
|
9
11
|
buildRetryFollowUp,
|
|
10
12
|
buildSplitTaskPrompt,
|
|
@@ -15,6 +17,9 @@ import {
|
|
|
15
17
|
executeTask,
|
|
16
18
|
executeWorkflow,
|
|
17
19
|
extractStructuredResult,
|
|
20
|
+
getEffectiveGuardrailIds,
|
|
21
|
+
getGuardrailRulesForAgent,
|
|
22
|
+
guardrailContextToRuleData,
|
|
18
23
|
jsonSchemaToZod,
|
|
19
24
|
loadDslContext,
|
|
20
25
|
loadPlugins,
|
|
@@ -26,20 +31,23 @@ import {
|
|
|
26
31
|
runWorkflow,
|
|
27
32
|
zodSchemaToPromptDescription,
|
|
28
33
|
zodSchemaToYamlExample
|
|
29
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-DPJFPYJO.js";
|
|
30
35
|
import {
|
|
31
36
|
PluginRegistry,
|
|
32
37
|
createGuardrailHooks,
|
|
38
|
+
createGuardrailHooksForAgent,
|
|
33
39
|
createGuardrailHooksFromRules,
|
|
34
40
|
getBlockingViolations,
|
|
35
41
|
getWarnings,
|
|
36
42
|
hasBlockingViolation,
|
|
37
43
|
pluginRegistry
|
|
38
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-MGRZBGQL.js";
|
|
45
|
+
import "./chunk-LTZA6QWC.js";
|
|
39
46
|
import {
|
|
40
47
|
createModelResolver
|
|
41
48
|
} from "./chunk-AWBHN3LI.js";
|
|
42
49
|
export {
|
|
50
|
+
BoundResolver,
|
|
43
51
|
DslValidationError,
|
|
44
52
|
InMemoryStore,
|
|
45
53
|
PluginRegistry,
|
|
@@ -47,12 +55,14 @@ export {
|
|
|
47
55
|
buildCandidateAgents,
|
|
48
56
|
buildGateEvaluationPrompt,
|
|
49
57
|
buildGuardrailRulesFromDsl,
|
|
58
|
+
buildPerAgentGuardrails,
|
|
50
59
|
buildRegistriesFromDsl,
|
|
51
60
|
buildRetryFollowUp,
|
|
52
61
|
buildSplitTaskPrompt,
|
|
53
62
|
buildTaskPrompt,
|
|
54
63
|
createAdapter,
|
|
55
64
|
createGuardrailHooks,
|
|
65
|
+
createGuardrailHooksForAgent,
|
|
56
66
|
createGuardrailHooksFromRules,
|
|
57
67
|
createModelResolver,
|
|
58
68
|
createProgressSink,
|
|
@@ -61,7 +71,10 @@ export {
|
|
|
61
71
|
executeWorkflow,
|
|
62
72
|
extractStructuredResult,
|
|
63
73
|
getBlockingViolations,
|
|
74
|
+
getEffectiveGuardrailIds,
|
|
75
|
+
getGuardrailRulesForAgent,
|
|
64
76
|
getWarnings,
|
|
77
|
+
guardrailContextToRuleData,
|
|
65
78
|
hasBlockingViolation,
|
|
66
79
|
jsonSchemaToZod,
|
|
67
80
|
loadDslContext,
|
|
@@ -132,6 +132,11 @@ interface AgentContractLike {
|
|
|
132
132
|
* the candidate sub-agent set registered with the SDK for LLM-internal routing.
|
|
133
133
|
*/
|
|
134
134
|
readonly can_invoke_agents?: readonly string[];
|
|
135
|
+
/**
|
|
136
|
+
* Tool names this agent may execute. When present, sub-agents receive an
|
|
137
|
+
* isolated tool set instead of inheriting the parent agent's tools.
|
|
138
|
+
*/
|
|
139
|
+
readonly can_execute_tools?: readonly string[];
|
|
135
140
|
}
|
|
136
141
|
interface TaskContractLike {
|
|
137
142
|
readonly id: string;
|