@lesliechan721/aw 0.1.0-beta.10 → 0.1.0-beta.12
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/authoring/assets/aw-config.d.mts +1 -50
- package/dist/authoring/assets/aw-config.mjs +58 -928
- package/dist/authoring/assets/aw-config.mjs.map +1 -1
- package/dist/authoring/scripts/init-plugin.mjs +28 -33
- package/dist/authoring/scripts/init-plugin.mjs.map +1 -1
- package/dist/authoring/scripts/lib/plugin-version-check.d.mts +1 -0
- package/dist/authoring/scripts/lib/plugin-version-check.mjs +229 -8
- package/dist/authoring/scripts/lib/plugin-version-check.mjs.map +1 -1
- package/dist/authoring/scripts/validate-plugin.mjs +159 -48
- package/dist/authoring/scripts/validate-plugin.mjs.map +1 -1
- package/dist/scripts/bundle-plugins.js +18 -4
- package/dist/scripts/bundle-plugins.js.map +1 -1
- package/dist/scripts/test-plugin-scripts.d.ts +2 -0
- package/dist/scripts/test-plugin-scripts.js +21 -5
- package/dist/scripts/test-plugin-scripts.js.map +1 -1
- package/dist/src/commands/aw-capabilities.d.ts +1 -1
- package/dist/src/commands/aw-capabilities.js +1 -1
- package/dist/src/commands/aw-capabilities.js.map +1 -1
- package/dist/src/commands/catalog-dev-source.d.ts +6 -3
- package/dist/src/commands/catalog-dev-source.js +96 -35
- package/dist/src/commands/catalog-dev-source.js.map +1 -1
- package/dist/src/commands/catalog-publication-inspection.d.ts +1 -1
- package/dist/src/commands/catalog-publication-inspection.js +54 -8
- package/dist/src/commands/catalog-publication-inspection.js.map +1 -1
- package/dist/src/commands/catalog-publication-journal.js +1 -1
- package/dist/src/commands/catalog-publication-journal.js.map +1 -1
- package/dist/src/commands/catalog-source.d.ts +19 -4
- package/dist/src/commands/catalog-source.js +121 -12
- package/dist/src/commands/catalog-source.js.map +1 -1
- package/dist/src/commands/catalog-store.d.ts +26 -7
- package/dist/src/commands/catalog-store.js +361 -42
- package/dist/src/commands/catalog-store.js.map +1 -1
- package/dist/src/commands/console.js +28 -17
- package/dist/src/commands/console.js.map +1 -1
- package/dist/src/commands/operation-plan.d.ts +2 -1
- package/dist/src/commands/operation-plan.js +24 -0
- package/dist/src/commands/operation-plan.js.map +1 -1
- package/dist/src/commands/operation-planner.d.ts +2 -2
- package/dist/src/commands/operation-planner.js +22 -20
- package/dist/src/commands/operation-planner.js.map +1 -1
- package/dist/src/commands/options.d.ts +2 -2
- package/dist/src/commands/options.js +18 -4
- package/dist/src/commands/options.js.map +1 -1
- package/dist/src/commands/plugin-capabilities.js +2 -2
- package/dist/src/commands/plugin-capabilities.js.map +1 -1
- package/dist/src/commands/rebuild-command.d.ts +19 -0
- package/dist/src/commands/rebuild-command.js +828 -283
- package/dist/src/commands/rebuild-command.js.map +1 -1
- package/dist/src/commands/rebuild-integration.d.ts +25 -47
- package/dist/src/commands/rebuild-integration.js +1176 -1016
- package/dist/src/commands/rebuild-integration.js.map +1 -1
- package/dist/src/commands/rebuild-operations.d.ts +50 -12
- package/dist/src/commands/rebuild-operations.js +207 -101
- package/dist/src/commands/rebuild-operations.js.map +1 -1
- package/dist/src/commands/status-v6.d.ts +21 -2
- package/dist/src/commands/status-v6.js +163 -31
- package/dist/src/commands/status-v6.js.map +1 -1
- package/dist/src/commands/sync-command.d.ts +17 -0
- package/dist/src/commands/sync-command.js +45 -37
- package/dist/src/commands/sync-command.js.map +1 -1
- package/dist/src/commands/write-commands.d.ts +5 -0
- package/dist/src/commands/write-commands.js +50 -3
- package/dist/src/commands/write-commands.js.map +1 -1
- package/dist/src/generators/local-plugin.js +14 -4
- package/dist/src/generators/local-plugin.js.map +1 -1
- package/dist/src/index.js +260 -91
- package/dist/src/index.js.map +1 -1
- package/dist/src/output/command-receipt.js +1 -3
- package/dist/src/output/command-receipt.js.map +1 -1
- package/dist/src/output/rebuild-progress.js +1 -3
- package/dist/src/output/rebuild-progress.js.map +1 -1
- package/dist/src/portable/materializer.js +10 -8
- package/dist/src/portable/materializer.js.map +1 -1
- package/dist/src/tui/catalog-generation.js +41 -1
- package/dist/src/tui/catalog-generation.js.map +1 -1
- package/dist/src/tui/catalog-sources/session.d.ts +1 -0
- package/dist/src/tui/catalog-sources/session.js +16 -3
- package/dist/src/tui/catalog-sources/session.js.map +1 -1
- package/dist/src/tui/catalog-sources/types.d.ts +3 -2
- package/dist/src/tui/components.d.ts +4 -0
- package/dist/src/tui/components.js +36 -24
- package/dist/src/tui/components.js.map +1 -1
- package/dist/src/tui/console-app-v4.d.ts +13 -4
- package/dist/src/tui/console-app-v4.js +2065 -857
- package/dist/src/tui/console-app-v4.js.map +1 -1
- package/dist/src/tui/controller-runtime.js +731 -62
- package/dist/src/tui/controller-runtime.js.map +1 -1
- package/dist/src/tui/controller.d.ts +156 -10
- package/dist/src/tui/controller.js +1187 -163
- package/dist/src/tui/controller.js.map +1 -1
- package/dist/src/tui/diagnostic-projection.d.ts +22 -0
- package/dist/src/tui/diagnostic-projection.js +437 -0
- package/dist/src/tui/diagnostic-projection.js.map +1 -0
- package/dist/src/tui/diagnostics.d.ts +1 -1
- package/dist/src/tui/diagnostics.js +7 -2
- package/dist/src/tui/diagnostics.js.map +1 -1
- package/dist/src/tui/glossary.d.ts +23 -0
- package/dist/src/tui/glossary.js +42 -0
- package/dist/src/tui/glossary.js.map +1 -0
- package/dist/src/tui/index.d.ts +4 -1
- package/dist/src/tui/index.js +4 -1
- package/dist/src/tui/index.js.map +1 -1
- package/dist/src/tui/keys.d.ts +44 -0
- package/dist/src/tui/keys.js +43 -15
- package/dist/src/tui/keys.js.map +1 -1
- package/dist/src/tui/lifecycle-action-view.d.ts +6 -0
- package/dist/src/tui/lifecycle-action-view.js +34 -0
- package/dist/src/tui/lifecycle-action-view.js.map +1 -0
- package/dist/src/tui/model.d.ts +12 -2
- package/dist/src/tui/model.js +128 -52
- package/dist/src/tui/model.js.map +1 -1
- package/dist/src/tui/operation-diagnostic-screens.d.ts +21 -0
- package/dist/src/tui/operation-diagnostic-screens.js +101 -0
- package/dist/src/tui/operation-diagnostic-screens.js.map +1 -0
- package/dist/src/tui/operation-history.d.ts +80 -0
- package/dist/src/tui/operation-history.js +130 -0
- package/dist/src/tui/operation-history.js.map +1 -0
- package/dist/src/tui/operation-review-planner.js +366 -99
- package/dist/src/tui/operation-review-planner.js.map +1 -1
- package/dist/src/tui/router.d.ts +82 -17
- package/dist/src/tui/router.js +186 -38
- package/dist/src/tui/router.js.map +1 -1
- package/dist/src/tui/screen-registry.d.ts +546 -0
- package/dist/src/tui/screen-registry.js +179 -0
- package/dist/src/tui/screen-registry.js.map +1 -0
- package/dist/src/tui/session-console-app.d.ts +6 -0
- package/dist/src/tui/session-console-app.js +13 -0
- package/dist/src/tui/session-console-app.js.map +1 -0
- package/dist/src/tui/session-host.d.ts +44 -0
- package/dist/src/tui/session-host.js +197 -0
- package/dist/src/tui/session-host.js.map +1 -0
- package/dist/src/types.d.ts +64 -3
- package/dist/src/types.js +1 -1
- package/dist/src/types.js.map +1 -1
- package/dist/src/utils/agent-version.js +1 -1
- package/dist/src/utils/agent-version.js.map +1 -1
- package/dist/src/utils/artifact-plan.d.ts +2 -2
- package/dist/src/utils/artifact-plan.js +8 -6
- package/dist/src/utils/artifact-plan.js.map +1 -1
- package/dist/src/utils/artifact-renderer.d.ts +2 -1
- package/dist/src/utils/artifact-renderer.js +139 -120
- package/dist/src/utils/artifact-renderer.js.map +1 -1
- package/dist/src/utils/artifact-request.d.ts +5 -0
- package/dist/src/utils/artifact-request.js +40 -0
- package/dist/src/utils/artifact-request.js.map +1 -1
- package/dist/src/utils/bundle-layout.js +4 -4
- package/dist/src/utils/bundle-layout.js.map +1 -1
- package/dist/src/utils/catalog-capability-projection.d.ts +8 -0
- package/dist/src/utils/catalog-capability-projection.js +14 -0
- package/dist/src/utils/catalog-capability-projection.js.map +1 -0
- package/dist/src/utils/catalog-generation-resolver.d.ts +14 -2
- package/dist/src/utils/catalog-generation-resolver.js +49 -27
- package/dist/src/utils/catalog-generation-resolver.js.map +1 -1
- package/dist/src/utils/catalog-generation-service.d.ts +8 -1
- package/dist/src/utils/catalog-generation-service.js +81 -47
- package/dist/src/utils/catalog-generation-service.js.map +1 -1
- package/dist/src/utils/catalog-generation-store.d.ts +1 -0
- package/dist/src/utils/catalog-generation-store.js +60 -5
- package/dist/src/utils/catalog-generation-store.js.map +1 -1
- package/dist/src/utils/catalog-operation-context.js +1 -0
- package/dist/src/utils/catalog-operation-context.js.map +1 -1
- package/dist/src/utils/catalog-public-error.js +4 -0
- package/dist/src/utils/catalog-public-error.js.map +1 -1
- package/dist/src/utils/catalog-source-impact.d.ts +3 -2
- package/dist/src/utils/catalog-source-impact.js +142 -20
- package/dist/src/utils/catalog-source-impact.js.map +1 -1
- package/dist/src/utils/catalog-source-references.js +95 -9
- package/dist/src/utils/catalog-source-references.js.map +1 -1
- package/dist/src/utils/catalog-sources.d.ts +1 -1
- package/dist/src/utils/catalog-sources.js +19 -3
- package/dist/src/utils/catalog-sources.js.map +1 -1
- package/dist/src/utils/codex-manager.js +8 -0
- package/dist/src/utils/codex-manager.js.map +1 -1
- package/dist/src/utils/codex-native-observation.d.ts +34 -1
- package/dist/src/utils/codex-native-observation.js +132 -0
- package/dist/src/utils/codex-native-observation.js.map +1 -1
- package/dist/src/utils/codex-reconciler.d.ts +0 -2
- package/dist/src/utils/codex-reconciler.js.map +1 -1
- package/dist/src/utils/codex-shared-native.d.ts +2 -26
- package/dist/src/utils/codex-shared-native.js +8 -82
- package/dist/src/utils/codex-shared-native.js.map +1 -1
- package/dist/src/utils/git-catalog-provider.d.ts +3 -0
- package/dist/src/utils/git-catalog-provider.js +40 -1
- package/dist/src/utils/git-catalog-provider.js.map +1 -1
- package/dist/src/utils/local-marketplace.d.ts +1 -0
- package/dist/src/utils/local-marketplace.js +69 -73
- package/dist/src/utils/local-marketplace.js.map +1 -1
- package/dist/src/utils/multi-source-catalog.js +1 -0
- package/dist/src/utils/multi-source-catalog.js.map +1 -1
- package/dist/src/utils/native-cli.d.ts +9 -4
- package/dist/src/utils/native-cli.js +280 -34
- package/dist/src/utils/native-cli.js.map +1 -1
- package/dist/src/utils/path-catalog-provider.js +2 -0
- package/dist/src/utils/path-catalog-provider.js.map +1 -1
- package/dist/src/utils/plugin-config-impact.d.ts +33 -0
- package/dist/src/utils/plugin-config-impact.js +298 -0
- package/dist/src/utils/plugin-config-impact.js.map +1 -0
- package/dist/src/utils/plugin-config-write.d.ts +36 -14
- package/dist/src/utils/plugin-config-write.js +709 -225
- package/dist/src/utils/plugin-config-write.js.map +1 -1
- package/dist/src/utils/plugin-config.d.ts +58 -4
- package/dist/src/utils/plugin-config.js +328 -60
- package/dist/src/utils/plugin-config.js.map +1 -1
- package/dist/src/utils/plugin-scripts.d.ts +20 -12
- package/dist/src/utils/plugin-scripts.js +389 -114
- package/dist/src/utils/plugin-scripts.js.map +1 -1
- package/dist/src/utils/process-tree.d.ts +2 -2
- package/dist/src/utils/process-tree.js +1 -1
- package/dist/src/utils/process-tree.js.map +1 -1
- package/dist/src/utils/project-boundary.d.ts +11 -1
- package/dist/src/utils/project-boundary.js +33 -11
- package/dist/src/utils/project-boundary.js.map +1 -1
- package/dist/src/utils/safe-operation-diagnostic.d.ts +15 -0
- package/dist/src/utils/safe-operation-diagnostic.js +33 -0
- package/dist/src/utils/safe-operation-diagnostic.js.map +1 -0
- package/dist/src/utils/sensitive-content.d.ts +4 -0
- package/dist/src/utils/sensitive-content.js +36 -0
- package/dist/src/utils/sensitive-content.js.map +1 -0
- package/dist/src/utils/windows-claude-shim.d.ts +9 -0
- package/dist/src/utils/windows-claude-shim.js +141 -0
- package/dist/src/utils/windows-claude-shim.js.map +1 -0
- package/dist/vitest.config.js +91 -10
- package/dist/vitest.config.js.map +1 -1
- package/package.json +9 -9
- package/dist/authoring/templates/aw-config-runtime.d.mts +0 -2
- package/dist/authoring/templates/aw-config-runtime.mjs +0 -407
- package/dist/authoring/templates/aw-config-runtime.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lesliechan721/aw",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.12",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22"
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@inkjs/ui": "^2.0.0",
|
|
20
|
-
"@lesliechan721/agent-skill-eval": "0.1.0-beta.
|
|
21
|
-
"@lesliechan721/aw-plugin-core": "0.1.0-beta.
|
|
20
|
+
"@lesliechan721/agent-skill-eval": "0.1.0-beta.12",
|
|
21
|
+
"@lesliechan721/aw-plugin-core": "0.1.0-beta.12",
|
|
22
22
|
"commander": "^14.0.1",
|
|
23
23
|
"fs-extra": "^11.3.0",
|
|
24
24
|
"ink": "^7.1.1",
|
|
@@ -40,15 +40,15 @@
|
|
|
40
40
|
"vitest": "^3.2.4"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
|
-
"build": "node scripts/
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"test": "node ../../scripts/test/run-vitest.mjs run",
|
|
47
|
-
"test:unit": "node ../../scripts/test/run-vitest.mjs run tests/unit",
|
|
43
|
+
"build": "node scripts/clean-dist.mjs && tsc -p tsconfig.json && node dist/scripts/bundle-plugins.js",
|
|
44
|
+
"build:dev:typescript": "tsc -p tsconfig.dev.json",
|
|
45
|
+
"test": "pnpm run test:unit && pnpm run test:integration",
|
|
46
|
+
"test:unit": "node ../../scripts/test/run-vitest.mjs run --project pure --maxWorkers=2 tests/unit && node ../../scripts/test/run-vitest.mjs run --project filesystem-isolated --maxWorkers=2 tests/unit && node ../../scripts/test/run-vitest.mjs run --project process-lifecycle --pool=forks --maxWorkers=1 --no-file-parallelism tests/unit",
|
|
48
47
|
"test:unit:fast": "node ../../scripts/test/run-vitest.mjs run --config vitest.fast.config.ts",
|
|
49
|
-
"test:integration": "node ../../scripts/test/run-vitest.mjs run tests/integration",
|
|
48
|
+
"test:integration": "node ../../scripts/test/run-vitest.mjs run --project integration --maxWorkers=2 tests/integration && node ../../scripts/test/run-vitest.mjs run --project process-lifecycle --pool=forks --maxWorkers=1 --no-file-parallelism tests/integration",
|
|
50
49
|
"test:coverage": "node ../../scripts/test/run-vitest.mjs run --coverage",
|
|
51
50
|
"test:perf": "node ../../scripts/test/run-vitest.mjs run --config vitest.perf.config.ts",
|
|
51
|
+
"test:dist": "node ../../scripts/test/run-vitest.mjs run --config vitest.dist.config.ts",
|
|
52
52
|
"test:smoke": "node ../../scripts/test/run-vitest.mjs run --config vitest.smoke.config.ts",
|
|
53
53
|
"test:smoke:build": "node ../../scripts/test/run-vitest.mjs run --config vitest.smoke.config.ts tests/smoke/build-smoke.test.ts",
|
|
54
54
|
"test:smoke:pack:cli": "node ../../scripts/test/run-vitest.mjs run --config vitest.smoke.config.ts tests/smoke/pack-smoke.test.ts",
|
|
@@ -1,407 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import fs from 'node:fs';
|
|
3
|
-
import os from 'node:os';
|
|
4
|
-
import path from 'node:path';
|
|
5
|
-
import { fileURLToPath } from 'node:url';
|
|
6
|
-
/* @aw-config-core */
|
|
7
|
-
const CONFIG_DIR = 'plugin-config';
|
|
8
|
-
const CONFIG_FILE = 'config.json';
|
|
9
|
-
const SOURCE_IDENTITY_PATTERN = /^sha256:[0-9a-f]{64}$/;
|
|
10
|
-
function isRecord(value) {
|
|
11
|
-
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
12
|
-
}
|
|
13
|
-
function fail(message) {
|
|
14
|
-
throw new Error(message);
|
|
15
|
-
}
|
|
16
|
-
function readJsonFile(filePath, label) {
|
|
17
|
-
let content;
|
|
18
|
-
try {
|
|
19
|
-
content = fs.readFileSync(filePath, 'utf8');
|
|
20
|
-
}
|
|
21
|
-
catch {
|
|
22
|
-
fail(`Unable to read ${label}.`);
|
|
23
|
-
}
|
|
24
|
-
try {
|
|
25
|
-
return JSON.parse(content);
|
|
26
|
-
}
|
|
27
|
-
catch {
|
|
28
|
-
fail(`invalidJson: Unable to parse ${label} as JSON.`);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
function safeSegment(value) {
|
|
32
|
-
if (typeof value !== 'string' || value.trim() === '')
|
|
33
|
-
fail('Invalid plugin config segment.');
|
|
34
|
-
if (value !== value.trim()
|
|
35
|
-
|| value === '.'
|
|
36
|
-
|| value === '..'
|
|
37
|
-
|| value.includes('/')
|
|
38
|
-
|| value.includes('\\')
|
|
39
|
-
|| path.posix.isAbsolute(value)
|
|
40
|
-
|| path.win32.isAbsolute(value)
|
|
41
|
-
|| /^[A-Za-z][A-Za-z0-9+.-]*:/.test(value))
|
|
42
|
-
fail('Invalid plugin config segment.');
|
|
43
|
-
return value;
|
|
44
|
-
}
|
|
45
|
-
function normalizeSchema(rawSchema) {
|
|
46
|
-
try {
|
|
47
|
-
return normalizePluginConfigDefinition({ fields: rawSchema }).fields;
|
|
48
|
-
}
|
|
49
|
-
catch (error) {
|
|
50
|
-
fail(error instanceof Error ? error.message : 'Invalid AW config schema.');
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function validateManifest(rawManifest) {
|
|
54
|
-
if (!isRecord(rawManifest))
|
|
55
|
-
fail('Bundle manifest is not a JSON object.');
|
|
56
|
-
const pluginName = safeSegment(rawManifest.name);
|
|
57
|
-
if (!isRecord(rawManifest.config) || !isRecord(rawManifest.config.fields)) {
|
|
58
|
-
fail(`Plugin "${pluginName}" does not declare an AW config schema.`);
|
|
59
|
-
}
|
|
60
|
-
return { pluginName, schema: normalizeSchema(rawManifest.config.fields) };
|
|
61
|
-
}
|
|
62
|
-
function locateBundleManifest() {
|
|
63
|
-
let currentDir = path.dirname(fileURLToPath(import.meta.url));
|
|
64
|
-
while (true) {
|
|
65
|
-
const manifestPath = path.join(currentDir, '.agents-plugin', 'plugin.json');
|
|
66
|
-
if (fs.existsSync(manifestPath))
|
|
67
|
-
return { bundleRoot: currentDir, manifestPath };
|
|
68
|
-
const parentDir = path.dirname(currentDir);
|
|
69
|
-
if (parentDir === currentDir)
|
|
70
|
-
fail('Unable to locate bundle .agents-plugin/plugin.json.');
|
|
71
|
-
currentDir = parentDir;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
function resolveProjectRoot(cwd) {
|
|
75
|
-
let currentDir = path.resolve(cwd);
|
|
76
|
-
while (true) {
|
|
77
|
-
if (fs.existsSync(path.join(currentDir, '.git')) || fs.existsSync(path.join(currentDir, 'pnpm-workspace.yaml'))) {
|
|
78
|
-
return currentDir;
|
|
79
|
-
}
|
|
80
|
-
const parentDir = path.dirname(currentDir);
|
|
81
|
-
if (parentDir === currentDir)
|
|
82
|
-
return path.resolve(cwd);
|
|
83
|
-
currentDir = parentDir;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
function resolveAwHome() {
|
|
87
|
-
return process.env.AW_HOME || path.join(os.homedir(), '.aw');
|
|
88
|
-
}
|
|
89
|
-
function resolveStorePath(sourceId, pluginName, scope, cwd) {
|
|
90
|
-
const root = scope === 'user'
|
|
91
|
-
? resolveAwHome()
|
|
92
|
-
: path.join(resolveProjectRoot(cwd), '.agent-workflows');
|
|
93
|
-
return path.join(root, CONFIG_DIR, sourceId, pluginName, CONFIG_FILE);
|
|
94
|
-
}
|
|
95
|
-
function supportedValue(value) {
|
|
96
|
-
if (typeof value === 'string' || typeof value === 'boolean')
|
|
97
|
-
return true;
|
|
98
|
-
if (typeof value === 'number')
|
|
99
|
-
return Number.isFinite(value);
|
|
100
|
-
return isRecord(value) && Object.values(value).every((child) => typeof child === 'string'
|
|
101
|
-
|| typeof child === 'boolean'
|
|
102
|
-
|| (typeof child === 'number' && Number.isFinite(child)));
|
|
103
|
-
}
|
|
104
|
-
function validateValues(values, schema) {
|
|
105
|
-
if (!isRecord(values))
|
|
106
|
-
fail('invalidValues: Store values must be an object.');
|
|
107
|
-
for (const [key, value] of Object.entries(values)) {
|
|
108
|
-
if (isDangerousConfigKey(key)) {
|
|
109
|
-
fail(`dangerousKey: Config "${key}" is not allowed.`);
|
|
110
|
-
}
|
|
111
|
-
if (!supportedValue(value))
|
|
112
|
-
fail(`invalidValues: Config "${key}" has an unsupported value.`);
|
|
113
|
-
const field = Object.hasOwn(schema, key) ? schema[key] : undefined;
|
|
114
|
-
if (!field)
|
|
115
|
-
continue;
|
|
116
|
-
const issues = validatePluginConfigValue(field, value, key);
|
|
117
|
-
if (issues.length > 0)
|
|
118
|
-
fail(`invalidValues: ${formatPluginConfigIssue(issues[0])}`);
|
|
119
|
-
}
|
|
120
|
-
return values;
|
|
121
|
-
}
|
|
122
|
-
function missingStore(filePath) {
|
|
123
|
-
return { path: filePath, state: 'missing', exists: false, values: {} };
|
|
124
|
-
}
|
|
125
|
-
function readStore(filePath, identity, schema) {
|
|
126
|
-
if (!fs.existsSync(filePath))
|
|
127
|
-
return missingStore(filePath);
|
|
128
|
-
const envelope = readJsonFile(filePath, 'plugin config store');
|
|
129
|
-
if (!isRecord(envelope) || envelope.schemaVersion !== 3) {
|
|
130
|
-
fail('schemaVersionUnsupported: Only plugin config store schemaVersion 3 is supported.');
|
|
131
|
-
}
|
|
132
|
-
if (envelope.sourceId !== identity.sourceId
|
|
133
|
-
|| envelope.sourceIdentity !== identity.sourceIdentity
|
|
134
|
-
|| envelope.pluginName !== identity.pluginName)
|
|
135
|
-
fail('identityMismatch: Plugin config store identity does not match its path.');
|
|
136
|
-
return {
|
|
137
|
-
path: filePath,
|
|
138
|
-
state: 'ready',
|
|
139
|
-
exists: true,
|
|
140
|
-
values: validateValues(envelope.values, schema),
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
function createState(schema) {
|
|
144
|
-
return {
|
|
145
|
-
values: Object.create(null),
|
|
146
|
-
redactedValues: Object.create(null),
|
|
147
|
-
sources: Object.fromEntries(Object.keys(schema).map((key) => [key, 'missing'])),
|
|
148
|
-
ignoredUnknownKeys: [],
|
|
149
|
-
issues: [],
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
function applyLayer(state, schema, entries, source) {
|
|
153
|
-
validateValues(entries, schema);
|
|
154
|
-
for (const [key, field] of Object.entries(schema)) {
|
|
155
|
-
if (!Object.hasOwn(entries, key))
|
|
156
|
-
continue;
|
|
157
|
-
const value = entries[key];
|
|
158
|
-
state.values[key] = value;
|
|
159
|
-
state.redactedValues[key] = redactPluginConfigValue(field, value);
|
|
160
|
-
state.sources[key] = source;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
function collectUnknownKeys(state, schema, store, scope) {
|
|
164
|
-
for (const key of Object.keys(store.values)) {
|
|
165
|
-
if (!Object.hasOwn(schema, key))
|
|
166
|
-
state.ignoredUnknownKeys.push({ scope, key });
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
function addRequiredIssues(state, schema) {
|
|
170
|
-
for (const [key, field] of Object.entries(schema)) {
|
|
171
|
-
if (field.required === true && !Object.hasOwn(state.values, key)) {
|
|
172
|
-
state.issues.push({
|
|
173
|
-
type: 'missing-required',
|
|
174
|
-
key,
|
|
175
|
-
source: state.sources[key],
|
|
176
|
-
message: `Config "${key}" is required.`,
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
function resolveFromStores({ identity, schema, scope, stores }) {
|
|
182
|
-
const state = createState(schema);
|
|
183
|
-
if (scope === 'effective') {
|
|
184
|
-
for (const [key, field] of Object.entries(schema)) {
|
|
185
|
-
if (field.default !== undefined)
|
|
186
|
-
applyLayer(state, { [key]: field }, { [key]: field.default }, 'default');
|
|
187
|
-
}
|
|
188
|
-
for (const [storeKey, source] of [['user', 'user'], ['project', 'project']]) {
|
|
189
|
-
collectUnknownKeys(state, schema, stores[storeKey], source);
|
|
190
|
-
applyLayer(state, schema, stores[storeKey].values, source);
|
|
191
|
-
}
|
|
192
|
-
addRequiredIssues(state, schema);
|
|
193
|
-
}
|
|
194
|
-
else {
|
|
195
|
-
collectUnknownKeys(state, schema, stores[scope], scope);
|
|
196
|
-
applyLayer(state, schema, stores[scope].values, scope);
|
|
197
|
-
}
|
|
198
|
-
return {
|
|
199
|
-
pluginName: identity.pluginName,
|
|
200
|
-
sourceId: identity.sourceId,
|
|
201
|
-
sourceIdentity: identity.sourceIdentity,
|
|
202
|
-
pluginId: `${identity.sourceId}/${identity.pluginName}`,
|
|
203
|
-
scope,
|
|
204
|
-
values: state.values,
|
|
205
|
-
redactedValues: state.redactedValues,
|
|
206
|
-
sources: state.sources,
|
|
207
|
-
schema,
|
|
208
|
-
diagnostics: { issues: state.issues, ignoredUnknownKeys: state.ignoredUnknownKeys },
|
|
209
|
-
paths: { configStores: { user: stores.user.path, project: stores.project.path } },
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
|
-
function contextIdentity(context, pluginName) {
|
|
213
|
-
const sourceId = context.plugin?.sourceId;
|
|
214
|
-
const sourceIdentity = context.plugin?.sourceIdentity;
|
|
215
|
-
if ((sourceId === undefined) !== (sourceIdentity === undefined)) {
|
|
216
|
-
fail('AW_PLUGIN_CONTEXT contains an incomplete source identity.');
|
|
217
|
-
}
|
|
218
|
-
if (sourceId === undefined)
|
|
219
|
-
return null;
|
|
220
|
-
if (typeof sourceIdentity !== 'string' || !SOURCE_IDENTITY_PATTERN.test(sourceIdentity)) {
|
|
221
|
-
fail('AW_PLUGIN_CONTEXT contains an invalid source identity.');
|
|
222
|
-
}
|
|
223
|
-
return { pluginName, sourceId: safeSegment(sourceId), sourceIdentity };
|
|
224
|
-
}
|
|
225
|
-
function resolveFromContext(scope) {
|
|
226
|
-
const contextPath = process.env.AW_PLUGIN_CONTEXT;
|
|
227
|
-
if (!contextPath)
|
|
228
|
-
return null;
|
|
229
|
-
const context = readJsonFile(contextPath, 'AW_PLUGIN_CONTEXT');
|
|
230
|
-
if (!isRecord(context) || !isRecord(context.config))
|
|
231
|
-
fail('AW_PLUGIN_CONTEXT does not contain config data.');
|
|
232
|
-
const schema = normalizeSchema(context.config.schema);
|
|
233
|
-
const pluginName = safeSegment(context.plugin?.name || context.pluginName || context.config.pluginName || 'plugin');
|
|
234
|
-
const identity = contextIdentity(context, pluginName);
|
|
235
|
-
if (scope === 'effective') {
|
|
236
|
-
const state = createState(schema);
|
|
237
|
-
const values = validateValues(context.config.values, schema);
|
|
238
|
-
applyLayer(state, schema, values, 'missing');
|
|
239
|
-
for (const [key, source] of Object.entries(isRecord(context.config.sources) ? context.config.sources : {})) {
|
|
240
|
-
if (Object.hasOwn(schema, key)
|
|
241
|
-
&& ['default', 'user', 'project', 'missing'].includes(source))
|
|
242
|
-
state.sources[key] = source;
|
|
243
|
-
}
|
|
244
|
-
const contextStorePaths = isRecord(context.paths?.configStores)
|
|
245
|
-
? context.paths.configStores
|
|
246
|
-
: {};
|
|
247
|
-
return {
|
|
248
|
-
pluginName,
|
|
249
|
-
...(identity ? {
|
|
250
|
-
sourceId: identity.sourceId,
|
|
251
|
-
sourceIdentity: identity.sourceIdentity,
|
|
252
|
-
pluginId: `${identity.sourceId}/${pluginName}`,
|
|
253
|
-
} : {}),
|
|
254
|
-
scope,
|
|
255
|
-
values: state.values,
|
|
256
|
-
redactedValues: state.redactedValues,
|
|
257
|
-
sources: state.sources,
|
|
258
|
-
schema,
|
|
259
|
-
diagnostics: {
|
|
260
|
-
issues: Array.isArray(context.config.issues) ? context.config.issues : [],
|
|
261
|
-
ignoredUnknownKeys: Array.isArray(context.config.ignoredUnknownKeys)
|
|
262
|
-
? context.config.ignoredUnknownKeys : [],
|
|
263
|
-
},
|
|
264
|
-
paths: {
|
|
265
|
-
configStores: {
|
|
266
|
-
...(typeof contextStorePaths.user === 'string' ? { user: contextStorePaths.user } : {}),
|
|
267
|
-
...(typeof contextStorePaths.project === 'string' ? { project: contextStorePaths.project } : {}),
|
|
268
|
-
},
|
|
269
|
-
},
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
if (!identity)
|
|
273
|
-
fail('AW_PLUGIN_CONTEXT must provide a source identity for scoped config reads.');
|
|
274
|
-
const storePath = context.paths?.configStores?.[scope];
|
|
275
|
-
if (typeof storePath !== 'string' || storePath.trim() === '') {
|
|
276
|
-
fail(`AW_PLUGIN_CONTEXT does not provide a ${scope} config store path.`);
|
|
277
|
-
}
|
|
278
|
-
const store = readStore(storePath, identity, schema);
|
|
279
|
-
return resolveFromStores({
|
|
280
|
-
identity,
|
|
281
|
-
schema,
|
|
282
|
-
scope,
|
|
283
|
-
stores: {
|
|
284
|
-
user: scope === 'user' ? store : missingStore(''),
|
|
285
|
-
project: scope === 'project' ? store : missingStore(''),
|
|
286
|
-
},
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
function resolveFallback(scope) {
|
|
290
|
-
const { bundleRoot, manifestPath } = locateBundleManifest();
|
|
291
|
-
const { pluginName, schema } = validateManifest(readJsonFile(manifestPath, 'bundle manifest'));
|
|
292
|
-
const pluginsRoot = path.dirname(bundleRoot);
|
|
293
|
-
const marketplaceRoot = path.dirname(pluginsRoot);
|
|
294
|
-
if (path.basename(pluginsRoot) !== 'plugins' || path.basename(bundleRoot) !== pluginName) {
|
|
295
|
-
fail('Bundle manifest is not inside a namespaced local marketplace.');
|
|
296
|
-
}
|
|
297
|
-
const marketplace = readJsonFile(path.join(marketplaceRoot, 'config.json'), 'marketplace config');
|
|
298
|
-
const sourceId = safeSegment(marketplace.sourceId);
|
|
299
|
-
const sourceIdentity = marketplace.sourceIdentity;
|
|
300
|
-
if (marketplace.schemaVersion !== 2
|
|
301
|
-
|| sourceId !== path.basename(marketplaceRoot)
|
|
302
|
-
|| typeof sourceIdentity !== 'string'
|
|
303
|
-
|| !SOURCE_IDENTITY_PATTERN.test(sourceIdentity)
|
|
304
|
-
|| !['aw', `aw-${sourceId}`].includes(marketplace.marketplaceName))
|
|
305
|
-
fail('Marketplace config does not contain a canonical schema 2 source identity.');
|
|
306
|
-
const identity = { sourceId, sourceIdentity, pluginName };
|
|
307
|
-
const cwd = process.cwd();
|
|
308
|
-
const projectRoot = resolveProjectRoot(cwd);
|
|
309
|
-
for (const legacyPath of [
|
|
310
|
-
path.join(resolveAwHome(), CONFIG_DIR, pluginName, CONFIG_FILE),
|
|
311
|
-
path.join(projectRoot, '.agent-workflows', CONFIG_DIR, pluginName, CONFIG_FILE),
|
|
312
|
-
]) {
|
|
313
|
-
if (fs.existsSync(legacyPath))
|
|
314
|
-
fail('Legacy non-namespaced plugin config is not supported.');
|
|
315
|
-
}
|
|
316
|
-
const stores = {
|
|
317
|
-
user: scope === 'project'
|
|
318
|
-
? missingStore('')
|
|
319
|
-
: readStore(resolveStorePath(sourceId, pluginName, 'user', cwd), identity, schema),
|
|
320
|
-
project: scope === 'user'
|
|
321
|
-
? missingStore('')
|
|
322
|
-
: readStore(resolveStorePath(sourceId, pluginName, 'project', cwd), identity, schema),
|
|
323
|
-
};
|
|
324
|
-
return resolveFromStores({ identity, schema, scope, stores });
|
|
325
|
-
}
|
|
326
|
-
function printUsage() {
|
|
327
|
-
process.stdout.write(`Usage:
|
|
328
|
-
node aw-config.mjs get <key> [--scope effective|user|project]
|
|
329
|
-
node aw-config.mjs json [--scope effective|user|project]
|
|
330
|
-
|
|
331
|
-
Options:
|
|
332
|
-
--scope <scope> Read effective, user, or project config. Default: effective.
|
|
333
|
-
-h, --help Show this help message.
|
|
334
|
-
`);
|
|
335
|
-
}
|
|
336
|
-
function parseArgs(argv) {
|
|
337
|
-
const args = argv.slice(2);
|
|
338
|
-
const command = args.shift();
|
|
339
|
-
if (command === '-h' || command === '--help')
|
|
340
|
-
return { help: true };
|
|
341
|
-
let scope = 'effective';
|
|
342
|
-
const positional = [];
|
|
343
|
-
for (let index = 0; index < args.length; index += 1) {
|
|
344
|
-
const arg = args[index];
|
|
345
|
-
if (arg === '--scope') {
|
|
346
|
-
const value = args[index + 1];
|
|
347
|
-
if (!value || value.startsWith('--'))
|
|
348
|
-
fail('--scope requires a value.');
|
|
349
|
-
scope = value;
|
|
350
|
-
index += 1;
|
|
351
|
-
}
|
|
352
|
-
else if (arg.startsWith('--scope=')) {
|
|
353
|
-
scope = arg.slice('--scope='.length);
|
|
354
|
-
}
|
|
355
|
-
else {
|
|
356
|
-
positional.push(arg);
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
if (!['effective', 'user', 'project'].includes(scope))
|
|
360
|
-
fail('--scope must be effective, user, or project.');
|
|
361
|
-
if (command !== 'get' && command !== 'json')
|
|
362
|
-
fail('Usage: node aw-config.mjs get <key> | json');
|
|
363
|
-
if (command === 'get' && positional.length !== 1)
|
|
364
|
-
fail('Usage: node aw-config.mjs get <key>');
|
|
365
|
-
if (command === 'json' && positional.length !== 0)
|
|
366
|
-
fail('Usage: node aw-config.mjs json');
|
|
367
|
-
return { command, key: positional[0], scope };
|
|
368
|
-
}
|
|
369
|
-
function main() {
|
|
370
|
-
const args = parseArgs(process.argv);
|
|
371
|
-
if (args.help) {
|
|
372
|
-
printUsage();
|
|
373
|
-
return;
|
|
374
|
-
}
|
|
375
|
-
const result = resolveFromContext(args.scope) || resolveFallback(args.scope);
|
|
376
|
-
if (args.command === 'get') {
|
|
377
|
-
if (!Object.hasOwn(result.schema, args.key))
|
|
378
|
-
fail(`Unknown config key "${args.key}".`);
|
|
379
|
-
if (!Object.hasOwn(result.values, args.key))
|
|
380
|
-
fail(`Config key "${args.key}" is not set.`);
|
|
381
|
-
const value = result.redactedValues[args.key];
|
|
382
|
-
process.stdout.write(typeof value === 'string' ? `${value}\n` : `${JSON.stringify(value)}\n`);
|
|
383
|
-
}
|
|
384
|
-
else {
|
|
385
|
-
process.stdout.write(`${JSON.stringify({ ...result, values: result.redactedValues }, null, 2)}\n`);
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
function isDirectExecution() {
|
|
389
|
-
if (!process.argv[1])
|
|
390
|
-
return false;
|
|
391
|
-
try {
|
|
392
|
-
return fs.realpathSync(fileURLToPath(import.meta.url)) === fs.realpathSync(process.argv[1]);
|
|
393
|
-
}
|
|
394
|
-
catch {
|
|
395
|
-
return fileURLToPath(import.meta.url) === path.resolve(process.argv[1]);
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
if (isDirectExecution()) {
|
|
399
|
-
try {
|
|
400
|
-
main();
|
|
401
|
-
}
|
|
402
|
-
catch (error) {
|
|
403
|
-
process.stderr.write(`[aw-config] ${error instanceof Error ? error.message : String(error)}\n`);
|
|
404
|
-
process.exitCode = 1;
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
//# sourceMappingURL=aw-config-runtime.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aw-config-runtime.mjs","sourceRoot":"","sources":["../../../authoring/templates/aw-config-runtime.mjs"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,qBAAqB;AAErB,MAAM,UAAU,GAAG,eAAe,CAAC;AACnC,MAAM,WAAW,GAAG,aAAa,CAAC;AAClC,MAAM,uBAAuB,GAAG,uBAAuB,CAAC;AAExD,SAAS,QAAQ,CAAC,KAAK;IACrB,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,IAAI,CAAC,OAAO;IACnB,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,YAAY,CAAC,QAAQ,EAAE,KAAK;IACnC,IAAI,OAAO,CAAC;IACZ,IAAI,CAAC;QACH,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;IAAC,MAAM,CAAC;QACP,IAAI,CAAC,kBAAkB,KAAK,GAAG,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