@aaac/runtime 0.1.54 → 0.1.55
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 +1 -1
- package/dist/adapters/claude-agent-sdk.d.ts +1 -1
- package/dist/adapters/mock.d.ts +1 -1
- package/dist/adapters/openai-agents-sdk.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +45 -24
- package/dist/index.js.map +1 -1
- package/dist/{task-runner-CLc8iTzy.d.ts → task-runner-DfIEorkU.d.ts} +16 -1
- package/package.json +1 -1
|
@@ -448,7 +448,13 @@ type SdkAdapterFactory = () => SdkAdapter;
|
|
|
448
448
|
* Model-aware adapter factory. Accepts a model_class and returns an adapter
|
|
449
449
|
* configured for that capability level (possibly a different provider/model).
|
|
450
450
|
*/
|
|
451
|
-
type ModelAwareSdkAdapterFactory = (modelClass?: ModelClass
|
|
451
|
+
type ModelAwareSdkAdapterFactory = (modelClass?: ModelClass,
|
|
452
|
+
/**
|
|
453
|
+
* Agent the step runs as (a task's `target_agent`). Guardrail hooks are fixed at
|
|
454
|
+
* adapter construction, so an agent-scoped factory returns a distinct adapter per
|
|
455
|
+
* agent (#269). Ignored by factories that do not scope guardrails.
|
|
456
|
+
*/
|
|
457
|
+
agentId?: string) => SdkAdapter | Promise<SdkAdapter>;
|
|
452
458
|
/** Accepts either a single adapter (serial/shared) or a factory (parallel-safe). */
|
|
453
459
|
type AdapterOrFactory = SdkAdapter | SdkAdapterFactory | ModelAwareSdkAdapterFactory;
|
|
454
460
|
/** Specification for what a step receives from a dependency. */
|
|
@@ -564,6 +570,13 @@ interface WorkflowRunOptions {
|
|
|
564
570
|
* When undefined, envelopes omit adapter/model (observer spans lack gen_ai attrs).
|
|
565
571
|
*/
|
|
566
572
|
resolveModelMeta?: (modelClass?: ModelClass) => ResolvedModel;
|
|
573
|
+
/**
|
|
574
|
+
* Request each step's adapter from the factory scoped to the step's agent, so
|
|
575
|
+
* per-agent guardrails apply to the agent actually doing the work (#269). Set by
|
|
576
|
+
* executeWorkflow when the resolved component has per-agent guardrail rules;
|
|
577
|
+
* without it, adapters are shared exactly as before.
|
|
578
|
+
*/
|
|
579
|
+
perAgentAdapters?: boolean;
|
|
567
580
|
}
|
|
568
581
|
/** Typed handoff envelope for workflow input. */
|
|
569
582
|
interface HandoffInput<TType extends string = string, TPayload = unknown> {
|
|
@@ -628,6 +641,8 @@ interface WorkflowInvocation<THandoffType extends string = string, TPayload = un
|
|
|
628
641
|
* not typically set by external callers.
|
|
629
642
|
*/
|
|
630
643
|
resolveModelMeta?: (modelClass?: ModelClass) => ResolvedModel;
|
|
644
|
+
/** See WorkflowRunOptions.perAgentAdapters (#269). Injected by executeWorkflow. */
|
|
645
|
+
perAgentAdapters?: boolean;
|
|
631
646
|
}
|
|
632
647
|
interface StepResult {
|
|
633
648
|
step_index: number;
|