agent-contracts-runtime 0.36.7 → 0.36.8
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/cli-contract.yaml +76 -0
- package/dist/agent-runtime.bundle.mjs +520 -339
- package/dist/agent-runtime.bundle.mjs.map +4 -4
- package/dist/bound-resolver-K4UHLXN6.js +17 -0
- package/dist/bound-resolver-K4UHLXN6.js.map +1 -0
- package/dist/{chunk-DPJFPYJO.js → chunk-5UGCLWDM.js} +8 -429
- package/dist/chunk-5UGCLWDM.js.map +1 -0
- package/dist/chunk-D2QTXQB2.js +266 -0
- package/dist/chunk-D2QTXQB2.js.map +1 -0
- package/dist/chunk-MWZXU25C.js +171 -0
- package/dist/chunk-MWZXU25C.js.map +1 -0
- package/dist/{chunk-PEHJ3J5C.js → chunk-VOBS62OH.js} +17 -1
- package/dist/chunk-VOBS62OH.js.map +1 -0
- package/dist/cli/index.js +93 -15
- package/dist/cli/index.js.map +1 -1
- package/dist/dsl-context-LACANPO4.js +13 -0
- package/dist/dsl-context-LACANPO4.js.map +1 -0
- package/dist/generator/index.d.ts +15 -0
- package/dist/generator/index.js +1 -1
- package/dist/index.js +17 -13
- package/docs/cli-reference.md +160 -0
- package/package.json +7 -2
- package/dist/chunk-DPJFPYJO.js.map +0 -1
- package/dist/chunk-PEHJ3J5C.js.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DslValidationError,
|
|
3
|
+
buildGuardrailRulesFromDsl,
|
|
4
|
+
buildRegistriesFromDsl,
|
|
5
|
+
loadDslContext
|
|
6
|
+
} from "./chunk-D2QTXQB2.js";
|
|
7
|
+
export {
|
|
8
|
+
DslValidationError,
|
|
9
|
+
buildGuardrailRulesFromDsl,
|
|
10
|
+
buildRegistriesFromDsl,
|
|
11
|
+
loadDslContext
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=dsl-context-LACANPO4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -11,6 +11,11 @@ declare const RuntimeConfigSchema: z.ZodObject<{
|
|
|
11
11
|
generated_dir: z.ZodDefault<z.ZodString>;
|
|
12
12
|
bindings: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
13
13
|
active_guardrail_policy: z.ZodOptional<z.ZodString>;
|
|
14
|
+
artifact_binding: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
15
|
+
source: z.ZodString;
|
|
16
|
+
mappings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
17
|
+
}, z.core.$strip>]>>;
|
|
18
|
+
paths: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
14
19
|
templates_dir: z.ZodOptional<z.ZodString>;
|
|
15
20
|
plugins: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
16
21
|
recovery: z.ZodDefault<z.ZodObject<{
|
|
@@ -54,6 +59,11 @@ declare const ProjectConfigSchema: z.ZodObject<{
|
|
|
54
59
|
generated_dir: z.ZodOptional<z.ZodString>;
|
|
55
60
|
bindings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
56
61
|
active_guardrail_policy: z.ZodOptional<z.ZodString>;
|
|
62
|
+
artifact_binding: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
63
|
+
source: z.ZodString;
|
|
64
|
+
mappings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
65
|
+
}, z.core.$strip>]>>;
|
|
66
|
+
paths: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
57
67
|
templates_dir: z.ZodOptional<z.ZodString>;
|
|
58
68
|
plugins: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
59
69
|
recovery: z.ZodDefault<z.ZodObject<{
|
|
@@ -108,6 +118,11 @@ interface ResolvedConfig extends RuntimeConfig {
|
|
|
108
118
|
dslPath: string;
|
|
109
119
|
generatedDir: string;
|
|
110
120
|
bindingPaths: string[];
|
|
121
|
+
artifactBinding?: {
|
|
122
|
+
source: string;
|
|
123
|
+
mappings?: Record<string, string>;
|
|
124
|
+
};
|
|
125
|
+
paths?: Record<string, string>;
|
|
111
126
|
templatesDir: string | undefined;
|
|
112
127
|
pluginPaths: string[];
|
|
113
128
|
resolvedLogging: {
|
package/dist/generator/index.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
BoundResolver,
|
|
3
|
-
DslValidationError,
|
|
4
2
|
InMemoryStore,
|
|
5
3
|
WorkflowBuilder,
|
|
6
4
|
buildCandidateAgents,
|
|
7
5
|
buildGateEvaluationPrompt,
|
|
8
|
-
buildGuardrailRulesFromDsl,
|
|
9
|
-
buildPerAgentGuardrails,
|
|
10
|
-
buildRegistriesFromDsl,
|
|
11
6
|
buildRetryFollowUp,
|
|
12
7
|
buildSplitTaskPrompt,
|
|
13
8
|
buildTaskPrompt,
|
|
@@ -17,11 +12,6 @@ import {
|
|
|
17
12
|
executeTask,
|
|
18
13
|
executeWorkflow,
|
|
19
14
|
extractStructuredResult,
|
|
20
|
-
getEffectiveGuardrailIds,
|
|
21
|
-
getGuardrailRulesForAgent,
|
|
22
|
-
guardrailContextToRuleData,
|
|
23
|
-
jsonSchemaToZod,
|
|
24
|
-
loadDslContext,
|
|
25
15
|
loadPlugins,
|
|
26
16
|
loadPluginsFromDirectory,
|
|
27
17
|
loadPluginsFromPaths,
|
|
@@ -31,7 +21,17 @@ import {
|
|
|
31
21
|
runWorkflow,
|
|
32
22
|
zodSchemaToPromptDescription,
|
|
33
23
|
zodSchemaToYamlExample
|
|
34
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5UGCLWDM.js";
|
|
25
|
+
import {
|
|
26
|
+
BoundResolver,
|
|
27
|
+
buildPerAgentGuardrails,
|
|
28
|
+
getEffectiveGuardrailIds,
|
|
29
|
+
getGuardrailRulesForAgent,
|
|
30
|
+
guardrailContextToRuleData
|
|
31
|
+
} from "./chunk-MWZXU25C.js";
|
|
32
|
+
import {
|
|
33
|
+
createModelResolver
|
|
34
|
+
} from "./chunk-AWBHN3LI.js";
|
|
35
35
|
import {
|
|
36
36
|
PluginRegistry,
|
|
37
37
|
createGuardrailHooks,
|
|
@@ -44,8 +44,12 @@ import {
|
|
|
44
44
|
} from "./chunk-MGRZBGQL.js";
|
|
45
45
|
import "./chunk-LTZA6QWC.js";
|
|
46
46
|
import {
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
DslValidationError,
|
|
48
|
+
buildGuardrailRulesFromDsl,
|
|
49
|
+
buildRegistriesFromDsl,
|
|
50
|
+
jsonSchemaToZod,
|
|
51
|
+
loadDslContext
|
|
52
|
+
} from "./chunk-D2QTXQB2.js";
|
|
49
53
|
export {
|
|
50
54
|
BoundResolver,
|
|
51
55
|
DslValidationError,
|
package/docs/cli-reference.md
CHANGED
|
@@ -19,6 +19,7 @@ then runs workflows through pluggable SDK adapters.
|
|
|
19
19
|
- [audit-implementation](#agent-runtime-audit-implementation)
|
|
20
20
|
- [agents](#agent-runtime-agents)
|
|
21
21
|
- [doctor](#agent-runtime-doctor)
|
|
22
|
+
- [navigation-index](#agent-runtime-navigation-index)
|
|
22
23
|
|
|
23
24
|
---
|
|
24
25
|
|
|
@@ -1617,6 +1618,108 @@ x-agent:
|
|
|
1617
1618
|
|
|
1618
1619
|
---
|
|
1619
1620
|
|
|
1621
|
+
### navigation-index
|
|
1622
|
+
|
|
1623
|
+
Build artifact navigation index from resolved DSL.
|
|
1624
|
+
|
|
1625
|
+
Resolves the embedded DSL (merged with project overlay if configured),
|
|
1626
|
+
applies artifact binding, and builds a navigation index showing
|
|
1627
|
+
artifact-to-tool-to-agent mappings.
|
|
1628
|
+
|
|
1629
|
+
The output is a JSON/YAML structure suitable for IDE integration,
|
|
1630
|
+
routing rules, and artifact coverage analysis.
|
|
1631
|
+
|
|
1632
|
+
|
|
1633
|
+
**Usage:**
|
|
1634
|
+
|
|
1635
|
+
```
|
|
1636
|
+
agent-runtime navigation-index [--format] [--artifact] [--output]
|
|
1637
|
+
```
|
|
1638
|
+
|
|
1639
|
+
#### Options
|
|
1640
|
+
|
|
1641
|
+
| Option | Aliases | Required | Default | Description |
|
|
1642
|
+
|---|---|---|---|---|
|
|
1643
|
+
| `--format` | -F | No | `"json"` | Output format. |
|
|
1644
|
+
| `--artifact` | | No | | Filter output to a single artifact by ID. |
|
|
1645
|
+
| `--output` | -o | No | | Write output to a file instead of stdout. |
|
|
1646
|
+
|
|
1647
|
+
#### Exit Codes
|
|
1648
|
+
|
|
1649
|
+
**Exit 0:** Navigation index built successfully.
|
|
1650
|
+
|
|
1651
|
+
- **stdout:** format=`json`
|
|
1652
|
+
|
|
1653
|
+
| Property | Type | Required | Description |
|
|
1654
|
+
|---|---|---|---|
|
|
1655
|
+
| `version` | `string` | Yes | |
|
|
1656
|
+
| `generated_at` | `string` | Yes | |
|
|
1657
|
+
| `system` | `object` | Yes | |
|
|
1658
|
+
| `system.id` | `string` | Yes | |
|
|
1659
|
+
| `system.name` | `string` | Yes | |
|
|
1660
|
+
| `artifacts` | `Record<string, any>` | Yes | |
|
|
1661
|
+
|
|
1662
|
+
<details>
|
|
1663
|
+
<summary>JSON Schema</summary>
|
|
1664
|
+
|
|
1665
|
+
```json
|
|
1666
|
+
{
|
|
1667
|
+
"type": "object",
|
|
1668
|
+
"required": [
|
|
1669
|
+
"version",
|
|
1670
|
+
"generated_at",
|
|
1671
|
+
"system",
|
|
1672
|
+
"artifacts"
|
|
1673
|
+
],
|
|
1674
|
+
"properties": {
|
|
1675
|
+
"version": {
|
|
1676
|
+
"type": "string"
|
|
1677
|
+
},
|
|
1678
|
+
"generated_at": {
|
|
1679
|
+
"type": "string"
|
|
1680
|
+
},
|
|
1681
|
+
"system": {
|
|
1682
|
+
"type": "object",
|
|
1683
|
+
"required": [
|
|
1684
|
+
"id",
|
|
1685
|
+
"name"
|
|
1686
|
+
],
|
|
1687
|
+
"properties": {
|
|
1688
|
+
"id": {
|
|
1689
|
+
"type": "string"
|
|
1690
|
+
},
|
|
1691
|
+
"name": {
|
|
1692
|
+
"type": "string"
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
},
|
|
1696
|
+
"artifacts": {
|
|
1697
|
+
"type": "object",
|
|
1698
|
+
"additionalProperties": true
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
```
|
|
1703
|
+
|
|
1704
|
+
</details>
|
|
1705
|
+
|
|
1706
|
+
**Exit 1:** Failed to build navigation index.
|
|
1707
|
+
|
|
1708
|
+
- **stderr:** format=`text`
|
|
1709
|
+
|
|
1710
|
+
#### Extensions
|
|
1711
|
+
|
|
1712
|
+
```yaml
|
|
1713
|
+
x-agent:
|
|
1714
|
+
riskLevel: low
|
|
1715
|
+
requiresConfirmation: false
|
|
1716
|
+
idempotent: true
|
|
1717
|
+
sideEffects:
|
|
1718
|
+
|
|
1719
|
+
```
|
|
1720
|
+
|
|
1721
|
+
---
|
|
1722
|
+
|
|
1620
1723
|
---
|
|
1621
1724
|
|
|
1622
1725
|
## Schemas
|
|
@@ -2444,6 +2547,63 @@ Type: `object`
|
|
|
2444
2547
|
|
|
2445
2548
|
</details>
|
|
2446
2549
|
|
|
2550
|
+
### NavigationIndexResult
|
|
2551
|
+
|
|
2552
|
+
Type: `object`
|
|
2553
|
+
|
|
2554
|
+
| Property | Type | Required | Description |
|
|
2555
|
+
|---|---|---|---|
|
|
2556
|
+
| `version` | `string` | Yes | |
|
|
2557
|
+
| `generated_at` | `string` | Yes | |
|
|
2558
|
+
| `system` | `object` | Yes | |
|
|
2559
|
+
| `system.id` | `string` | Yes | |
|
|
2560
|
+
| `system.name` | `string` | Yes | |
|
|
2561
|
+
| `artifacts` | `Record<string, any>` | Yes | |
|
|
2562
|
+
|
|
2563
|
+
<details>
|
|
2564
|
+
<summary>JSON Schema</summary>
|
|
2565
|
+
|
|
2566
|
+
```json
|
|
2567
|
+
{
|
|
2568
|
+
"type": "object",
|
|
2569
|
+
"required": [
|
|
2570
|
+
"version",
|
|
2571
|
+
"generated_at",
|
|
2572
|
+
"system",
|
|
2573
|
+
"artifacts"
|
|
2574
|
+
],
|
|
2575
|
+
"properties": {
|
|
2576
|
+
"version": {
|
|
2577
|
+
"type": "string"
|
|
2578
|
+
},
|
|
2579
|
+
"generated_at": {
|
|
2580
|
+
"type": "string"
|
|
2581
|
+
},
|
|
2582
|
+
"system": {
|
|
2583
|
+
"type": "object",
|
|
2584
|
+
"required": [
|
|
2585
|
+
"id",
|
|
2586
|
+
"name"
|
|
2587
|
+
],
|
|
2588
|
+
"properties": {
|
|
2589
|
+
"id": {
|
|
2590
|
+
"type": "string"
|
|
2591
|
+
},
|
|
2592
|
+
"name": {
|
|
2593
|
+
"type": "string"
|
|
2594
|
+
}
|
|
2595
|
+
}
|
|
2596
|
+
},
|
|
2597
|
+
"artifacts": {
|
|
2598
|
+
"type": "object",
|
|
2599
|
+
"additionalProperties": true
|
|
2600
|
+
}
|
|
2601
|
+
}
|
|
2602
|
+
}
|
|
2603
|
+
```
|
|
2604
|
+
|
|
2605
|
+
</details>
|
|
2606
|
+
|
|
2447
2607
|
### AgentFinding
|
|
2448
2608
|
|
|
2449
2609
|
Type: `object`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-contracts-runtime",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.8",
|
|
4
4
|
"description": "Runtime bridge for executing agent-contracts workflows on Agent SDKs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -53,7 +53,6 @@
|
|
|
53
53
|
"test": "vitest run",
|
|
54
54
|
"test:watch": "vitest",
|
|
55
55
|
"test:coverage": "vitest run --coverage",
|
|
56
|
-
"lint": "eslint src/",
|
|
57
56
|
"cli:validate": "cli-contracts validate -f cli-contract.yaml",
|
|
58
57
|
"prepublishOnly": "npm run build && npm run bundle:min",
|
|
59
58
|
"test:ci": "vitest run",
|
|
@@ -123,5 +122,11 @@
|
|
|
123
122
|
"@openai/agents": {
|
|
124
123
|
"optional": true
|
|
125
124
|
}
|
|
125
|
+
},
|
|
126
|
+
"overrides": {
|
|
127
|
+
"tar": "^7.5.16",
|
|
128
|
+
"uuid": "^11.1.1",
|
|
129
|
+
"@opentelemetry/core": "^2.8.0",
|
|
130
|
+
"@tootallnate/once": "^2.0.1"
|
|
126
131
|
}
|
|
127
132
|
}
|