@aaac/runtime 0.1.19 → 0.1.21
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/claude-agent-sdk.js +73 -5
- package/dist/adapters/claude-agent-sdk.js.map +1 -1
- package/dist/adapters/mock.d.ts +1 -1
- package/dist/adapters/openai-agents-sdk.d.ts +1 -1
- package/dist/chunk-FNB3PE74.js +299 -0
- package/dist/chunk-FNB3PE74.js.map +1 -0
- package/dist/index.d.ts +83 -3
- package/dist/index.js +329 -228
- package/dist/index.js.map +1 -1
- package/dist/{task-runner-DV49qwpk.d.ts → task-runner-CuJ3uLj8.d.ts} +44 -1
- package/package.json +6 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as ObserverEmitFn, T as TaskContext, b as TaskOutcome, c as AgentContractLike, d as TaskContractLike, P as PromptBuilderOptions, W as WorkflowResult, S as SdkAdapter, e as WorkflowRegistries, H as HandoffInput, f as StepCompleteEvent, g as StepResult, D as DelegateStep, h as GuardrailRuleData, i as MemoryStore, M as MemoryRef, L as LibraryToolRegistry, G as GuardrailHooks, R as ResolvedComponent, j as ArtifactBindingConfig, k as RunToolchainChecksOptions, l as TaskRunResult, m as ResolvedToolchain, n as LibraryToolDefinition, o as HookResponse, p as GuardrailCheckResult } from './task-runner-
|
|
2
|
-
export { q as AdapterOrFactory, A as AdapterSendOptions, a as AgentExecutionRequest, r as AgentProgressEvent, B as BoundResolveOptions, s as BoundResolver, C as CacheConfig, t as CandidateAgent, u as ConvergenceEnvelope, v as ConvergenceEnvelopePayload, E as EnvelopeParams, w as EvaluateStep, x as GateStep, y as GuardrailCheckFunctions, z as GuardrailRule, F as HookContext, I as InMemoryStore, J as
|
|
1
|
+
import { O as ObserverEmitFn, T as TaskContext, b as TaskOutcome, c as AgentContractLike, d as TaskContractLike, P as PromptBuilderOptions, W as WorkflowResult, S as SdkAdapter, e as WorkflowRegistries, H as HandoffInput, f as StepCompleteEvent, g as StepResult, D as DelegateStep, h as GuardrailRuleData, i as MemoryStore, M as MemoryRef, L as LibraryToolRegistry, G as GuardrailHooks, R as ResolvedComponent, j as ArtifactBindingConfig, k as RunToolchainChecksOptions, l as TaskRunResult, m as ResolvedToolchain, n as LibraryToolDefinition, o as HookResponse, p as GuardrailCheckResult } from './task-runner-CuJ3uLj8.js';
|
|
2
|
+
export { q as AdapterOrFactory, A as AdapterSendOptions, a as AgentExecutionRequest, r as AgentProgressEvent, B as BoundResolveOptions, s as BoundResolver, C as CacheConfig, t as CandidateAgent, u as ConvergenceEnvelope, v as ConvergenceEnvelopePayload, E as EnvelopeParams, w as EvaluateStep, x as GateStep, y as GuardrailCheckFunctions, z as GuardrailRule, F as HookContext, I as InMemoryStore, J as InnerSpanOptions, K as ModelAwareSdkAdapterFactory, N as ModelClass, Q as ModelMappingConfig, U as ModelResolver, V as ModelResolverOptions, X as ReceiveSpec, Y as ResolvedModel, Z as RetryDecision, _ as SdkAdapterFactory, $ as SplitPrompt, a0 as TaskRunOptions, a1 as ToolchainCheckResult, a2 as ToolchainManifest, a3 as ToolchainManifestSchema, a4 as WorkflowContractLike, a5 as WorkflowInvocation, a6 as WorkflowRunOptions, a7 as WorkflowStep, a8 as buildCandidateAgents, a9 as buildGateEvaluationPrompt, aa as buildPerAgentGuardrails, ab as buildRetryFollowUp, ac as buildSplitTaskPrompt, ad as buildTaskPrompt, ae as createExecutionEnvelope, af as createGuardrailHooks, ag as createGuardrailHooksForAgent, ah as createGuardrailHooksFromRules, ai as createLibraryToolRegistry, aj as createModelResolver, ak as deriveToolchainsForAgents, al as emitIterationClose, am as emitIterationMetric, an as emitIterationOpen, ao as emitLlmTurnClose, ap as emitLlmTurnOpen, aq as emitSessionClose, ar as emitSessionOpen, as as emitSubagentClose, at as emitSubagentOpen, au as emitToolExecClose, av as emitToolExecOpen, aw as emitToolchainClose, ax as emitToolchainOpen, ay as extractStructuredResult, az as getBlockingViolations, aA as getEffectiveGuardrailIds, aB as getGuardrailRulesForAgent, aC as getWarnings, aD as guardrailContextToRuleData, aE as hasBlockingViolation, aF as parseGateEvaluationResponse, aG as renderAgentSystemPrompt, aH as runTask, aI as runToolchainChecks, aJ as runWorkflow, aK as zodSchemaToPromptDescription, aL as zodSchemaToYamlExample } from './task-runner-CuJ3uLj8.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { OperationIR, ComponentIR } from '@aaac/contracts';
|
|
5
5
|
import { ResolvedConfig } from './generator/index.js';
|
|
@@ -383,6 +383,86 @@ interface SdkFunctionTool {
|
|
|
383
383
|
*/
|
|
384
384
|
declare function buildSdkFunctionTools(registry: LibraryToolRegistry): SdkFunctionTool[];
|
|
385
385
|
|
|
386
|
+
/**
|
|
387
|
+
* Analyzer Bridge — integrates artifact-contracts-analyzer as a standard
|
|
388
|
+
* runtime tool provider.
|
|
389
|
+
*
|
|
390
|
+
* Wraps analyzeImpact, generateContextPack, and buildCallGraph behind a
|
|
391
|
+
* lazily-initialised DependencyGraph, and exposes them as SdkFunctionTool[]
|
|
392
|
+
* for adapter consumption.
|
|
393
|
+
*
|
|
394
|
+
* `artifact-contracts-analyzer` is a peerDependency (optional) loaded via
|
|
395
|
+
* dynamic import; when absent, every method returns a descriptive error
|
|
396
|
+
* rather than crashing.
|
|
397
|
+
*/
|
|
398
|
+
|
|
399
|
+
/** Subset of DependencyGraph that the bridge caches and exposes. */
|
|
400
|
+
type DependencyGraph = Record<string, unknown>;
|
|
401
|
+
/** Subset of ImpactReport returned by analyzeImpact. */
|
|
402
|
+
type ImpactReport = Record<string, unknown>;
|
|
403
|
+
/** Subset of ContextPack returned by generateContextPack. */
|
|
404
|
+
type ContextPack = {
|
|
405
|
+
entries: Array<{
|
|
406
|
+
path: string;
|
|
407
|
+
artifactId?: string;
|
|
408
|
+
relevanceScore: number;
|
|
409
|
+
contentMode: string;
|
|
410
|
+
content: string;
|
|
411
|
+
reason: string;
|
|
412
|
+
}>;
|
|
413
|
+
metadata: {
|
|
414
|
+
totalTokens: number;
|
|
415
|
+
budgetTokens: number;
|
|
416
|
+
filesIncluded: number;
|
|
417
|
+
filesExcluded: number;
|
|
418
|
+
filesReferenced: number;
|
|
419
|
+
artifactsCovered: string[];
|
|
420
|
+
generatedAt: string;
|
|
421
|
+
};
|
|
422
|
+
taskId?: string;
|
|
423
|
+
};
|
|
424
|
+
/** Subset of CallGraph returned by buildCallGraph. */
|
|
425
|
+
type CallGraph = Record<string, unknown>;
|
|
426
|
+
interface AnalyzerBridgeOptions {
|
|
427
|
+
projectRoot: string;
|
|
428
|
+
navigationIndex?: Record<string, unknown>;
|
|
429
|
+
artifactPatterns?: Map<string, string[]>;
|
|
430
|
+
manifests?: string[];
|
|
431
|
+
}
|
|
432
|
+
interface AnalyzeImpactInput {
|
|
433
|
+
direction: "downstream" | "upstream";
|
|
434
|
+
maxDepth: number;
|
|
435
|
+
limit: number;
|
|
436
|
+
}
|
|
437
|
+
interface GenerateContextPackInput {
|
|
438
|
+
budgetTokens: number;
|
|
439
|
+
granularity: "file" | "symbol";
|
|
440
|
+
}
|
|
441
|
+
interface BuildCallGraphInput {
|
|
442
|
+
maxDepth: number;
|
|
443
|
+
direction: "forward" | "reverse";
|
|
444
|
+
}
|
|
445
|
+
interface AnalyzerBridge {
|
|
446
|
+
buildGraph(): Promise<void>;
|
|
447
|
+
getGraph(): Promise<DependencyGraph>;
|
|
448
|
+
analyzeImpact(changed: string[], options?: Partial<AnalyzeImpactInput>): Promise<ImpactReport>;
|
|
449
|
+
generateContextPack(changed: string[], options?: Partial<GenerateContextPackInput>): Promise<ContextPack>;
|
|
450
|
+
buildCallGraph(entry: string, options?: Partial<BuildCallGraphInput>): Promise<CallGraph>;
|
|
451
|
+
invalidateCache(): void;
|
|
452
|
+
buildAnalyzerTools(): SdkFunctionTool[];
|
|
453
|
+
}
|
|
454
|
+
declare function createAnalyzerBridge(options: AnalyzerBridgeOptions): AnalyzerBridge;
|
|
455
|
+
/**
|
|
456
|
+
* Duck-type check: does `value` look like a ContextPack?
|
|
457
|
+
* Checks for the `entries` array and `metadata` object with expected fields.
|
|
458
|
+
*/
|
|
459
|
+
declare function isContextPack(value: unknown): value is ContextPack;
|
|
460
|
+
/**
|
|
461
|
+
* Render a ContextPack as a structured prompt section.
|
|
462
|
+
* Used by task-runner when `variables.analyzerContextPack` is present.
|
|
463
|
+
*/
|
|
464
|
+
declare function renderContextPackPrompt(pack: ContextPack): string;
|
|
465
|
+
|
|
386
466
|
/**
|
|
387
467
|
* Adapter Factory — public API for creating SDK adapters by name.
|
|
388
468
|
*
|
|
@@ -811,4 +891,4 @@ declare function executePrompt(message: string, ir: ComponentIR, binding: Runtim
|
|
|
811
891
|
/** Package version string. */
|
|
812
892
|
declare const version: string;
|
|
813
893
|
|
|
814
|
-
export { type AaacInvocationContext, type AaacObserver, type AaacPolicy, type AaacRuntime, AgentContractLike, AgentLogWriter, type AgentLogWriterOptions, type AgentPlugin, ArtifactBindingConfig, type ArtifactResolveOptions, type ArtifactResolveResult, type ComponentScope, type CreateAdapterOptions, type CreateComponentScopeOptions, type CreateProjectRuntimeOptions, DelegateStep, type DslContext, DslValidationError, type EvaluateGuardrailOptions, type EvaluateGuardrailResult, type ExecuteOptions, type ExecuteTaskOptions, type ExecuteWorkflowOptions, FileMemoryStore, type GuardStatusOptions, type GuardStatusResult, GuardrailCheckResult, GuardrailHooks, type GuardrailListEntry, type GuardrailResult, GuardrailRuleData, HandoffInput, HookResponse, LibraryToolDefinition, LibraryToolRegistry, type ListGuardrailsOptions, type ListGuardrailsResult, type LoadDslOptions, MemoryRef, MemoryStore, type MemoryStoreEntry, type NavigationContext, type NavigationContextOptions, ObserverEmitFn, type OperationHandler, type OperationMemoryRefConfig, type OperationToolDef, PROJECT_CONFIG_FILENAME, type PermissionMode, type PluginLoadResult, PluginRegistry, type ProcessEditOptions, type ProcessTaskOptions, type ProcessWorkflowOptions, type ProgressSink, type ProgressSinkOptions, type ProjectRuntime, type PromptBuilderArgs, PromptBuilderOptions, type PromptExecuteOptions, type PromptResult, type RequiredEntities, type ResolvedAdapterSelection, ResolvedComponent, ResolvedToolchain, type RunLogEvent, RunToolchainChecksOptions, type Runtime, type RuntimeBinding, type RuntimeConfig, SdkAdapter, type SdkFunctionTool, StepCompleteEvent, StepResult, TaskContext, TaskContractLike, type TaskHookContext, TaskOutcome, TaskRunResult, WorkflowBuilder, type WorkflowHookContext, WorkflowRegistries, WorkflowResult, buildGuardrailRulesFromDsl, buildNavigationContext, buildRegistriesFromDsl, buildSdkFunctionTools, createAdapter, createComponentScope, createProgressSink, createProjectRuntime, createRuntime, createRuntimeBinding, emitProcessEdit, emitProcessTaskClose, emitProcessTaskOpen, emitProcessWorkflowClose, emitProcessWorkflowOpen, evaluateGuardrail, executePrompt, executeTask, executeWorkflow, findProjectConfig, guardStatus, jsonSchemaToZod, listGuardrails, loadDslContext, loadPlugins, loadPluginsFromDirectory, loadPluginsFromPaths, operationsToTools, parseRouterResponse, pluginRegistry, resolveArtifacts, version };
|
|
894
|
+
export { type AaacInvocationContext, type AaacObserver, type AaacPolicy, type AaacRuntime, AgentContractLike, AgentLogWriter, type AgentLogWriterOptions, type AgentPlugin, type AnalyzeImpactInput, type AnalyzerBridge, type AnalyzerBridgeOptions, ArtifactBindingConfig, type ArtifactResolveOptions, type ArtifactResolveResult, type BuildCallGraphInput, type ComponentScope, type CreateAdapterOptions, type CreateComponentScopeOptions, type CreateProjectRuntimeOptions, DelegateStep, type DslContext, DslValidationError, type EvaluateGuardrailOptions, type EvaluateGuardrailResult, type ExecuteOptions, type ExecuteTaskOptions, type ExecuteWorkflowOptions, FileMemoryStore, type GenerateContextPackInput, type GuardStatusOptions, type GuardStatusResult, GuardrailCheckResult, GuardrailHooks, type GuardrailListEntry, type GuardrailResult, GuardrailRuleData, HandoffInput, HookResponse, LibraryToolDefinition, LibraryToolRegistry, type ListGuardrailsOptions, type ListGuardrailsResult, type LoadDslOptions, MemoryRef, MemoryStore, type MemoryStoreEntry, type NavigationContext, type NavigationContextOptions, ObserverEmitFn, type OperationHandler, type OperationMemoryRefConfig, type OperationToolDef, PROJECT_CONFIG_FILENAME, type PermissionMode, type PluginLoadResult, PluginRegistry, type ProcessEditOptions, type ProcessTaskOptions, type ProcessWorkflowOptions, type ProgressSink, type ProgressSinkOptions, type ProjectRuntime, type PromptBuilderArgs, PromptBuilderOptions, type PromptExecuteOptions, type PromptResult, type RequiredEntities, type ResolvedAdapterSelection, ResolvedComponent, ResolvedToolchain, type RunLogEvent, RunToolchainChecksOptions, type Runtime, type RuntimeBinding, type RuntimeConfig, SdkAdapter, type SdkFunctionTool, StepCompleteEvent, StepResult, TaskContext, TaskContractLike, type TaskHookContext, TaskOutcome, TaskRunResult, WorkflowBuilder, type WorkflowHookContext, WorkflowRegistries, WorkflowResult, buildGuardrailRulesFromDsl, buildNavigationContext, buildRegistriesFromDsl, buildSdkFunctionTools, createAdapter, createAnalyzerBridge, createComponentScope, createProgressSink, createProjectRuntime, createRuntime, createRuntimeBinding, emitProcessEdit, emitProcessTaskClose, emitProcessTaskOpen, emitProcessWorkflowClose, emitProcessWorkflowOpen, evaluateGuardrail, executePrompt, executeTask, executeWorkflow, findProjectConfig, guardStatus, isContextPack, jsonSchemaToZod, listGuardrails, loadDslContext, loadPlugins, loadPluginsFromDirectory, loadPluginsFromPaths, operationsToTools, parseRouterResponse, pluginRegistry, renderContextPackPrompt, resolveArtifacts, version };
|