@open-agent-toolkit/cli 0.2.34 → 0.2.35
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.
|
@@ -198,6 +198,26 @@ project settings. Neither has a config key.
|
|
|
198
198
|
|
|
199
199
|
Both accept `1`, `true` or `on`.
|
|
200
200
|
|
|
201
|
+
### Bundled assets root (`OAT_ASSETS_DIR`)
|
|
202
|
+
|
|
203
|
+
The CLI reads its bundled skills, agents, templates, and scripts from the
|
|
204
|
+
packaged `assets/` directory next to the installed CLI. Setting a non-empty
|
|
205
|
+
`OAT_ASSETS_DIR` makes `resolveAssetsRoot` read that directory instead:
|
|
206
|
+
|
|
207
|
+
- The value is trimmed; unset, empty, or whitespace-only values keep the
|
|
208
|
+
packaged default. A relative value is resolved against the process working
|
|
209
|
+
directory.
|
|
210
|
+
- The override is validated exactly like the packaged root and fails closed:
|
|
211
|
+
the path must be a directory containing bundle metadata whose version matches
|
|
212
|
+
the running CLI (`OAT_VERSION`). A missing, malformed, or version-mismatched
|
|
213
|
+
override is an error — the CLI never silently falls back to packaged assets.
|
|
214
|
+
- Produce a matching bundle with `bash packages/cli/scripts/bundle-assets.sh`
|
|
215
|
+
while `OAT_ASSETS_DIR` points at the target directory (the script already
|
|
216
|
+
honors the variable as its destination).
|
|
217
|
+
|
|
218
|
+
This is primarily a test-isolation and packaging seam; day-to-day use of the CLI
|
|
219
|
+
does not need it.
|
|
220
|
+
|
|
201
221
|
`EXPLAINER_KIT_ALLOW_PRIVATE_PUBLIC_ROOT` disables an anti-SSRF control. Public
|
|
202
222
|
verification issues an outbound GET against whatever `publicBaseUrl` names, so
|
|
203
223
|
by default the connector refuses internal addresses — including the
|
package/dist/fs/assets.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
export declare function validateAssetsBundle(assetsRoot: string, expectedVersion?: string): Promise<void>;
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the directory the CLI reads bundled assets from.
|
|
4
|
+
*
|
|
5
|
+
* A non-empty `OAT_ASSETS_DIR` selects an explicit root; an unset or blank
|
|
6
|
+
* value keeps the packaged `<cliRoot>/assets` default. Both paths run the same
|
|
7
|
+
* directory and bundle-integrity checks, and an explicit root never falls back
|
|
8
|
+
* to the packaged one: a missing, non-directory, malformed, or
|
|
9
|
+
* version-mismatched override fails closed with the same actionable errors.
|
|
10
|
+
* A relative value is resolved against the process working directory.
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveAssetsRoot(env?: NodeJS.ProcessEnv): Promise<string>;
|
|
3
13
|
//# sourceMappingURL=assets.d.ts.map
|
package/dist/fs/assets.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/fs/assets.ts"],"names":[],"mappings":"AA2BA,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAClB,eAAe,SAAc,GAC5B,OAAO,CAAC,IAAI,CAAC,CAoCf;
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/fs/assets.ts"],"names":[],"mappings":"AA2BA,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAClB,eAAe,SAAc,GAC5B,OAAO,CAAC,IAAI,CAAC,CAoCf;AAQD;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,OAAO,CAAC,MAAM,CAAC,CAwBjB"}
|
package/dist/fs/assets.js
CHANGED
|
@@ -36,10 +36,24 @@ export async function validateAssetsBundle(assetsRoot, expectedVersion = OAT_VER
|
|
|
36
36
|
throw new CliError(`Bundled assets version mismatch: CLI ${expectedVersion}, assets ${metadata.oatVersion}. Reinstall @open-agent-toolkit/cli or rebuild the CLI before updating tools.`, 2);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
function resolvePackagedAssetsRoot() {
|
|
40
40
|
const modulePath = fileURLToPath(import.meta.url);
|
|
41
41
|
const cliRoot = resolve(dirname(modulePath), '..', '..');
|
|
42
|
-
|
|
42
|
+
return join(cliRoot, 'assets');
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Resolve the directory the CLI reads bundled assets from.
|
|
46
|
+
*
|
|
47
|
+
* A non-empty `OAT_ASSETS_DIR` selects an explicit root; an unset or blank
|
|
48
|
+
* value keeps the packaged `<cliRoot>/assets` default. Both paths run the same
|
|
49
|
+
* directory and bundle-integrity checks, and an explicit root never falls back
|
|
50
|
+
* to the packaged one: a missing, non-directory, malformed, or
|
|
51
|
+
* version-mismatched override fails closed with the same actionable errors.
|
|
52
|
+
* A relative value is resolved against the process working directory.
|
|
53
|
+
*/
|
|
54
|
+
export async function resolveAssetsRoot(env = process.env) {
|
|
55
|
+
const override = env.OAT_ASSETS_DIR?.trim() ?? '';
|
|
56
|
+
const assetsRoot = override.length > 0 ? resolve(override) : resolvePackagedAssetsRoot();
|
|
43
57
|
try {
|
|
44
58
|
const assetsStat = await stat(assetsRoot);
|
|
45
59
|
if (!assetsStat.isDirectory()) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-agent-toolkit/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.35",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Open Agent Toolkit CLI",
|
|
6
6
|
"homepage": "https://github.com/voxmedia/open-agent-toolkit/tree/main/packages/cli",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"ora": "^9.0.0",
|
|
35
35
|
"yaml": "2.8.2",
|
|
36
36
|
"zod": "^3.25.76",
|
|
37
|
-
"@open-agent-toolkit/control-plane": "0.2.
|
|
37
|
+
"@open-agent-toolkit/control-plane": "0.2.35"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/node": "^22.10.0",
|