@aaac/runtime 0.1.10 → 0.1.11
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/README.md +1 -1
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @aaac/runtime
|
|
2
2
|
|
|
3
|
-
Runtime SDK for the
|
|
3
|
+
Runtime SDK for the AaaC (Agent-Assisted Architecture Contracts) toolchain. Bridges agent-contracts DSL workflows to multiple Agent SDKs and provides AaaC-specific component binding.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
package/dist/index.js
CHANGED
|
@@ -2545,7 +2545,9 @@ async function dispatchOperation(operationName, op, options, input, ctx, handler
|
|
|
2545
2545
|
|
|
2546
2546
|
// src/lib/project-runtime.ts
|
|
2547
2547
|
import { existsSync as existsSync2 } from "fs";
|
|
2548
|
+
import { readFile as readFile5 } from "fs/promises";
|
|
2548
2549
|
import { resolve as resolve3, dirname as dirname2 } from "path";
|
|
2550
|
+
import YAML3 from "yaml";
|
|
2549
2551
|
var PROJECT_CONFIG_FILENAME = "project.yaml";
|
|
2550
2552
|
var DEFAULT_ADAPTER = "claude";
|
|
2551
2553
|
function findProjectConfig(startDir, filename = PROJECT_CONFIG_FILENAME) {
|
|
@@ -2573,6 +2575,14 @@ async function createProjectRuntime(options) {
|
|
|
2573
2575
|
}
|
|
2574
2576
|
const config = await loadProjectConfig(configPath);
|
|
2575
2577
|
const env = options.env ?? process.env;
|
|
2578
|
+
const rawManifest = YAML3.parse(await readFile5(configPath, "utf8"));
|
|
2579
|
+
const overlayExplicit = typeof rawManifest?.agents === "string" || typeof rawManifest?.dsl === "string";
|
|
2580
|
+
if (overlayExplicit && !existsSync2(config.dslPath)) {
|
|
2581
|
+
throw new Error(
|
|
2582
|
+
`Project agents DSL not found: ${config.dslPath} (referenced by ${configPath}).`
|
|
2583
|
+
);
|
|
2584
|
+
}
|
|
2585
|
+
const projectDslPath = overlayExplicit ? config.dslPath : void 0;
|
|
2576
2586
|
function resolveAdapter2() {
|
|
2577
2587
|
const explicit = options.adapter ?? env.AGENT_RUNTIME_ADAPTER;
|
|
2578
2588
|
if (explicit) {
|
|
@@ -2593,7 +2603,7 @@ async function createProjectRuntime(options) {
|
|
|
2593
2603
|
adapter,
|
|
2594
2604
|
model,
|
|
2595
2605
|
dsl: options.embeddedDsl,
|
|
2596
|
-
projectDslPath
|
|
2606
|
+
projectDslPath,
|
|
2597
2607
|
bindingPaths: config.bindingPaths,
|
|
2598
2608
|
activeGuardrailPolicy: config.active_guardrail_policy,
|
|
2599
2609
|
artifactBinding: config.artifactsPath ? { source: config.artifactsPath } : void 0,
|
|
@@ -2621,7 +2631,7 @@ async function createProjectRuntime(options) {
|
|
|
2621
2631
|
context: { runtime },
|
|
2622
2632
|
config,
|
|
2623
2633
|
configPath,
|
|
2624
|
-
dslSource:
|
|
2634
|
+
dslSource: projectDslPath ?? "/$embedded/",
|
|
2625
2635
|
resolveAdapter: resolveAdapter2
|
|
2626
2636
|
};
|
|
2627
2637
|
}
|