@aaac/runtime 0.1.23 → 0.1.24
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 +3 -31
- package/dist/index.js +48 -6
- package/dist/index.js.map +1 -1
- package/dist/{task-runner-DzLAb3UC.d.ts → task-runner-Bl3SZfft.d.ts} +46 -1
- package/package.json +1 -1
|
@@ -43,6 +43,34 @@ declare class InMemoryStore implements MemoryStore {
|
|
|
43
43
|
delete(ref: MemoryRef): Promise<void>;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Library Tool → SDK Function Tool conversion.
|
|
48
|
+
*
|
|
49
|
+
* Converts LibraryToolDefinition entries into SDK-native function tools
|
|
50
|
+
* that each adapter can register with its respective LLM SDK.
|
|
51
|
+
*
|
|
52
|
+
* Each adapter receives tools in its native format:
|
|
53
|
+
* - Claude Agent SDK: MCP tool via createSdkMcpServer + tool()
|
|
54
|
+
* - OpenAI Agents SDK: function tool object
|
|
55
|
+
* - Google ADK: FunctionDeclaration tool
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Adapter-agnostic function tool descriptor. Adapters convert this
|
|
60
|
+
* into their SDK-specific tool format.
|
|
61
|
+
*/
|
|
62
|
+
interface SdkFunctionTool {
|
|
63
|
+
name: string;
|
|
64
|
+
description: string;
|
|
65
|
+
inputSchema: Record<string, unknown>;
|
|
66
|
+
handler: (args: Record<string, unknown>) => Promise<string>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Build adapter-agnostic function tool descriptors from a LibraryToolRegistry.
|
|
70
|
+
* Each tool's handler calls registry.execute() and serialises the result.
|
|
71
|
+
*/
|
|
72
|
+
declare function buildSdkFunctionTools(registry: LibraryToolRegistry): SdkFunctionTool[];
|
|
73
|
+
|
|
46
74
|
interface LibraryToolDefinition {
|
|
47
75
|
toolId: string;
|
|
48
76
|
description: string;
|
|
@@ -58,6 +86,12 @@ interface LibraryToolRegistry {
|
|
|
58
86
|
execute(toolId: string, input: unknown): Promise<unknown>;
|
|
59
87
|
}
|
|
60
88
|
declare function createLibraryToolRegistry(): LibraryToolRegistry;
|
|
89
|
+
/**
|
|
90
|
+
* Create a LibraryToolRegistry backed by pre-built SdkFunctionTool handlers.
|
|
91
|
+
* Unlike createLibraryToolRegistry (which resolves tools via dynamic import),
|
|
92
|
+
* this variant delegates execute() directly to the tool's in-process handler.
|
|
93
|
+
*/
|
|
94
|
+
declare function createRegistryFromSdkTools(tools: SdkFunctionTool[]): LibraryToolRegistry;
|
|
61
95
|
|
|
62
96
|
/**
|
|
63
97
|
* SDK Guardrail Hook Bridge — generic adapter from guardrail check functions
|
|
@@ -535,6 +569,12 @@ interface WorkflowRunOptions {
|
|
|
535
569
|
* artifactsPath/cwd/policy actions).
|
|
536
570
|
*/
|
|
537
571
|
toolchain?: RunToolchainChecksOptions;
|
|
572
|
+
/**
|
|
573
|
+
* In-process library tools to register with every task in this workflow.
|
|
574
|
+
* Passed through to each runTask() call. Adapters convert these to their
|
|
575
|
+
* native tool format (Claude MCP, OpenAI function tools, ADK tools).
|
|
576
|
+
*/
|
|
577
|
+
libraryTools?: LibraryToolRegistry;
|
|
538
578
|
}
|
|
539
579
|
/** Typed handoff envelope for workflow input. */
|
|
540
580
|
interface HandoffInput<TType extends string = string, TPayload = unknown> {
|
|
@@ -589,6 +629,11 @@ interface WorkflowInvocation<THandoffType extends string = string, TPayload = un
|
|
|
589
629
|
* OBSERVATION ONLY — never changes the workflow outcome.
|
|
590
630
|
*/
|
|
591
631
|
toolchain?: RunToolchainChecksOptions;
|
|
632
|
+
/**
|
|
633
|
+
* In-process library tools to register with every task in this workflow.
|
|
634
|
+
* Created once per execution and shared across all steps.
|
|
635
|
+
*/
|
|
636
|
+
libraryTools?: LibraryToolRegistry;
|
|
592
637
|
}
|
|
593
638
|
interface StepResult {
|
|
594
639
|
step_index: number;
|
|
@@ -1105,4 +1150,4 @@ declare function runTask(adapter: SdkAdapter, taskId: string, context: TaskConte
|
|
|
1105
1150
|
libraryTools?: LibraryToolRegistry;
|
|
1106
1151
|
}): Promise<TaskRunResult>;
|
|
1107
1152
|
|
|
1108
|
-
export { type
|
|
1153
|
+
export { type RetryDecision as $, type AdapterSendOptions as A, type BoundResolveOptions as B, type CacheConfig as C, type DelegateStep as D, type EnvelopeParams as E, type GuardrailCheckFunctions as F, type GuardrailHooks as G, type HandoffInput as H, type GuardrailRule as I, type HookContext as J, InMemoryStore as K, type LibraryToolRegistry as L, type MemoryRef as M, type InnerSpanOptions as N, type ObserverEmitFn as O, type PromptBuilderOptions as P, type ModelAwareSdkAdapterFactory as Q, type ResolvedComponent as R, type SdkAdapter as S, type TokenUsage as T, type ModelClass as U, type ModelMappingConfig as V, type WorkflowResult as W, type ModelResolver as X, type ModelResolverOptions as Y, type ReceiveSpec as Z, type ResolvedModel as _, type AgentExecutionRequest as a, type SdkAdapterFactory as a0, type SplitPrompt as a1, type TaskRunOptions as a2, type ToolchainCheckResult as a3, type ToolchainManifest as a4, ToolchainManifestSchema as a5, type WorkflowContractLike as a6, type WorkflowInvocation as a7, type WorkflowRunOptions as a8, type WorkflowStep as a9, emitToolchainClose as aA, emitToolchainOpen as aB, extractStructuredResult as aC, getBlockingViolations as aD, getEffectiveGuardrailIds as aE, getGuardrailRulesForAgent as aF, getWarnings as aG, guardrailContextToRuleData as aH, hasBlockingViolation as aI, parseGateEvaluationResponse as aJ, renderAgentSystemPrompt as aK, runTask as aL, runToolchainChecks as aM, runWorkflow as aN, zodSchemaToPromptDescription as aO, zodSchemaToYamlExample as aP, buildCandidateAgents as aa, buildGateEvaluationPrompt as ab, buildPerAgentGuardrails as ac, buildRetryFollowUp as ad, buildSdkFunctionTools as ae, buildSplitTaskPrompt as af, buildTaskPrompt as ag, createExecutionEnvelope as ah, createGuardrailHooks as ai, createGuardrailHooksForAgent as aj, createGuardrailHooksFromRules as ak, createLibraryToolRegistry as al, createModelResolver as am, createRegistryFromSdkTools as an, deriveToolchainsForAgents as ao, emitIterationClose as ap, emitIterationMetric as aq, emitIterationOpen as ar, emitLlmTurnClose as as, emitLlmTurnOpen as at, emitSessionClose as au, emitSessionOpen as av, emitSubagentClose as aw, emitSubagentOpen as ax, emitToolExecClose as ay, emitToolExecOpen as az, type TaskContext as b, type TaskOutcome as c, type AgentContractLike as d, type TaskContractLike as e, type WorkflowRegistries as f, type StepCompleteEvent as g, type StepResult as h, type GuardrailRuleData as i, type MemoryStore as j, type SdkFunctionTool as k, type ArtifactBindingConfig as l, type RunToolchainChecksOptions as m, type TaskRunResult as n, type ResolvedToolchain as o, type LibraryToolDefinition as p, type HookResponse as q, type GuardrailCheckResult as r, type AdapterOrFactory as s, type AgentProgressEvent as t, BoundResolver as u, type CandidateAgent as v, type ConvergenceEnvelope as w, type ConvergenceEnvelopePayload as x, type EvaluateStep as y, type GateStep as z };
|