@aaac/runtime 0.1.28 → 0.1.30

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.
@@ -618,6 +618,11 @@ interface WorkflowRunOptions {
618
618
  * native tool format (Claude MCP, OpenAI function tools, ADK tools).
619
619
  */
620
620
  libraryTools?: LibraryToolRegistry;
621
+ /**
622
+ * Resolves adapter + model for execution envelopes (agent.session / agent.subagent).
623
+ * When undefined, envelopes omit adapter/model (observer spans lack gen_ai attrs).
624
+ */
625
+ resolveModelMeta?: (modelClass?: ModelClass) => ResolvedModel;
621
626
  }
622
627
  /** Typed handoff envelope for workflow input. */
623
628
  interface HandoffInput<TType extends string = string, TPayload = unknown> {
@@ -677,6 +682,11 @@ interface WorkflowInvocation<THandoffType extends string = string, TPayload = un
677
682
  * Created once per execution and shared across all steps.
678
683
  */
679
684
  libraryTools?: LibraryToolRegistry;
685
+ /**
686
+ * Resolves adapter + model for execution envelopes. Injected by executeWorkflow;
687
+ * not typically set by external callers.
688
+ */
689
+ resolveModelMeta?: (modelClass?: ModelClass) => ResolvedModel;
680
690
  }
681
691
  interface StepResult {
682
692
  step_index: number;
@@ -1156,6 +1166,10 @@ interface TaskRunOptions {
1156
1166
  * rather than the session span (#143 / #140).
1157
1167
  */
1158
1168
  sessionId?: string;
1169
+ /** LLM adapter identifier for the execution envelope (gen_ai.system). */
1170
+ envelopeAdapter?: string;
1171
+ /** LLM model identifier for the execution envelope (gen_ai.request.model). */
1172
+ envelopeModel?: string;
1159
1173
  }
1160
1174
  interface TaskRunResult {
1161
1175
  outcome: TaskOutcome;
@@ -1185,6 +1199,18 @@ declare function isNavigationIndex(value: unknown): value is Record<string, unkn
1185
1199
  * the project's artifacts so it can navigate before acting.
1186
1200
  */
1187
1201
  declare function renderNavigationIndexPrompt(navigationIndex: Record<string, unknown>): string;
1202
+ /** Collect analyzer.* tool ids from a wired library tool registry. */
1203
+ declare function collectAnalyzerToolIds(registry?: LibraryToolRegistry): string[];
1204
+ /**
1205
+ * Level 1 exploration mandate applies when the runtime injected a navigation
1206
+ * index (codebase map) — the signal that artifact-scoped investigation is active.
1207
+ */
1208
+ declare function shouldInjectAnalyzerExplorationMandate(context: TaskContext): boolean;
1209
+ /**
1210
+ * System-prompt section mandating analyzer MCP tools before ad-hoc file reads.
1211
+ * Injected automatically by runTask when Level 1 context is present.
1212
+ */
1213
+ declare function renderAnalyzerExplorationMandatePrompt(toolIds: readonly string[]): string;
1188
1214
  interface PromptBuilderOptions {
1189
1215
  handoffSchemas?: Record<string, z.ZodType>;
1190
1216
  retry?: {
@@ -1192,6 +1218,10 @@ interface PromptBuilderOptions {
1192
1218
  fix_task: string;
1193
1219
  revalidate_task?: string;
1194
1220
  };
1221
+ /** When set, injects Level 1 analyzer exploration mandate into the system prompt. */
1222
+ analyzerExploration?: {
1223
+ toolIds: readonly string[];
1224
+ };
1195
1225
  }
1196
1226
  /**
1197
1227
  * Build a prompt split into static (cacheable) and dynamic (per-invocation) parts.
@@ -1218,4 +1248,4 @@ declare function runTask(adapter: SdkAdapter, taskId: string, context: TaskConte
1218
1248
  libraryTools?: LibraryToolRegistry;
1219
1249
  }): Promise<TaskRunResult>;
1220
1250
 
1221
- export { type ReceiveSpec 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, OBSERVABILITY_ENV_VARS as Z, type ObservabilityIds as _, type AgentExecutionRequest as a, type ResolvedModel as a0, type RetryDecision as a1, type SdkAdapterFactory as a2, type SplitPrompt as a3, type TaskRunOptions as a4, type ToolchainCheckResult as a5, type ToolchainManifest as a6, ToolchainManifestSchema as a7, type WorkflowContractLike as a8, type WorkflowInvocation as a9, emitSubagentOpen as aA, emitToolExecClose as aB, emitToolExecOpen as aC, emitToolchainClose as aD, emitToolchainOpen as aE, extractStructuredResult as aF, getBlockingViolations as aG, getEffectiveGuardrailIds as aH, getGuardrailRulesForAgent as aI, getWarnings as aJ, guardrailContextToRuleData as aK, hasBlockingViolation as aL, isNavigationIndex as aM, parseGateEvaluationResponse as aN, renderAgentSystemPrompt as aO, renderNavigationIndexPrompt as aP, runTask as aQ, runToolchainChecks as aR, runWorkflow as aS, zodSchemaToPromptDescription as aT, zodSchemaToYamlExample as aU, type WorkflowRunOptions as aa, type WorkflowStep as ab, buildCandidateAgents as ac, buildGateEvaluationPrompt as ad, buildObservabilityEnv as ae, buildPerAgentGuardrails as af, buildRetryFollowUp as ag, buildSdkFunctionTools as ah, buildSplitTaskPrompt as ai, buildTaskPrompt as aj, createExecutionEnvelope as ak, createGuardrailHooks as al, createGuardrailHooksForAgent as am, createGuardrailHooksFromRules as an, createLibraryToolRegistry as ao, createModelResolver as ap, createRegistryFromSdkTools as aq, deriveToolchainsForAgents as ar, emitIterationClose as as, emitIterationMetric as at, emitIterationOpen as au, emitLlmTurnClose as av, emitLlmTurnOpen as aw, emitSessionClose as ax, emitSessionOpen as ay, emitSubagentClose 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 };
1251
+ export { type ReceiveSpec as $, type AdapterSendOptions as A, type BoundResolveOptions as B, type CacheConfig as C, type DelegateStep as D, type EnvelopeParams as E, type GateStep as F, type GuardrailHooks as G, type HandoffInput as H, type GuardrailCheckFunctions as I, type GuardrailRule as J, type HookContext as K, type LibraryToolRegistry as L, type MemoryRef as M, InMemoryStore as N, type ObserverEmitFn as O, type PromptBuilderOptions as P, type InnerSpanOptions as Q, type ResolvedComponent as R, type SdkAdapter as S, type TokenUsage as T, type ModelAwareSdkAdapterFactory as U, type ModelClass as V, type WorkflowResult as W, type ModelResolver as X, type ModelResolverOptions as Y, OBSERVABILITY_ENV_VARS as Z, type ObservabilityIds as _, type AgentExecutionRequest as a, type ResolvedModel as a0, type RetryDecision as a1, type SdkAdapterFactory as a2, type SplitPrompt as a3, type TaskRunOptions as a4, type ToolchainCheckResult as a5, type ToolchainManifest as a6, ToolchainManifestSchema as a7, type WorkflowContractLike as a8, type WorkflowInvocation as a9, emitSubagentClose as aA, emitSubagentOpen as aB, emitToolExecClose as aC, emitToolExecOpen as aD, emitToolchainClose as aE, emitToolchainOpen as aF, extractStructuredResult as aG, getBlockingViolations as aH, getEffectiveGuardrailIds as aI, getGuardrailRulesForAgent as aJ, getWarnings as aK, guardrailContextToRuleData as aL, hasBlockingViolation as aM, isNavigationIndex as aN, parseGateEvaluationResponse as aO, renderAgentSystemPrompt as aP, renderAnalyzerExplorationMandatePrompt as aQ, renderNavigationIndexPrompt as aR, runTask as aS, runToolchainChecks as aT, runWorkflow as aU, shouldInjectAnalyzerExplorationMandate as aV, zodSchemaToPromptDescription as aW, zodSchemaToYamlExample as aX, type WorkflowRunOptions as aa, type WorkflowStep as ab, buildCandidateAgents as ac, buildGateEvaluationPrompt as ad, buildObservabilityEnv as ae, buildPerAgentGuardrails as af, buildRetryFollowUp as ag, buildSdkFunctionTools as ah, buildSplitTaskPrompt as ai, buildTaskPrompt as aj, collectAnalyzerToolIds as ak, createExecutionEnvelope as al, createGuardrailHooks as am, createGuardrailHooksForAgent as an, createGuardrailHooksFromRules as ao, createLibraryToolRegistry as ap, createModelResolver as aq, createRegistryFromSdkTools as ar, deriveToolchainsForAgents as as, emitIterationClose as at, emitIterationMetric as au, emitIterationOpen as av, emitLlmTurnClose as aw, emitLlmTurnOpen as ax, emitSessionClose as ay, emitSessionOpen 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 ModelMappingConfig as n, type TaskRunResult as o, type ResolvedToolchain as p, type LibraryToolDefinition as q, type HookResponse as r, type GuardrailCheckResult as s, type AdapterOrFactory as t, type AgentProgressEvent as u, BoundResolver as v, type CandidateAgent as w, type ConvergenceEnvelope as x, type ConvergenceEnvelopePayload as y, type EvaluateStep as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aaac/runtime",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "description": "Runtime SDK for the AaaC toolchain",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",