@aiwg/cli 2026.11.4 → 2026.11.6
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/agentic/code/providers/capability-matrix.yaml +75 -5
- package/agentic/code/providers/model-capabilities.v1.json +44 -36
- package/bin/aiwg.mjs +6 -4
- package/dist/src/activity-log/cli.js +1 -1
- package/dist/src/agents/agent-deployer.js +1 -1
- package/dist/src/artifacts/audit/types.js +1 -1
- package/dist/src/artifacts/discover-facets.js +1 -1
- package/dist/src/artifacts/enrichment/prompt.js +1 -1
- package/dist/src/artifacts/enrichment/types.js +1 -1
- package/dist/src/artifacts/index-builder.js +4 -2
- package/dist/src/artifacts/query-engine-rules.js +2 -2
- package/dist/src/artifacts/types.js +1 -1
- package/dist/src/artifacts/views/definition.js +1 -1
- package/dist/src/artifacts/views/types.js +1 -1
- package/dist/src/catalog/cli.js +1 -1
- package/dist/src/catalog/cli.mjs +1 -1
- package/dist/src/catalog/loader.js +1 -1
- package/dist/src/catalog/loader.mjs +1 -1
- package/dist/src/catalog/types.js +1 -1
- package/dist/src/cli/cli-extension-loader.js +19 -5
- package/dist/src/cli/cli-extension-paths.js +65 -0
- package/dist/src/cli/handlers/best-practices-audit.js +1 -1
- package/dist/src/cli/handlers/help.js +3 -4
- package/dist/src/cli/handlers/index.js +1 -1
- package/dist/src/cli/handlers/marketplace-plugin-search.js +37 -0
- package/dist/src/cli/handlers/marketplace.js +3 -1
- package/dist/src/cli/handlers/models.js +1 -1
- package/dist/src/cli/handlers/ralph-launcher.js +8 -2
- package/dist/src/cli/handlers/ralph.js +1 -1
- package/dist/src/cli/handlers/runtime-info.js +1 -1
- package/dist/src/cli/handlers/scaffolding.js +2 -2
- package/dist/src/cli/handlers/script-runner.js +8 -5
- package/dist/src/cli/handlers/sdlc-accelerate.js +1 -1
- package/dist/src/cli/handlers/steward-format.js +12 -0
- package/dist/src/cli/handlers/subcommands-bundles.js +1 -1
- package/dist/src/cli/handlers/subcommands-list-format.js +19 -1
- package/dist/src/cli/handlers/types.js +1 -1
- package/dist/src/cli/handlers/use.js +15 -6
- package/dist/src/cli/handlers/utilities.js +1 -1
- package/dist/src/cli/handlers/utility-doctor.js +4 -0
- package/dist/src/cli/handlers/version.js +1 -1
- package/dist/src/cli/handlers/workspace.js +1 -1
- package/dist/src/cli/help-generator.js +9 -11
- package/dist/src/cli/hooks/builtin/activity-log-hook.js +1 -1
- package/dist/src/cli/router.js +1 -1
- package/dist/src/cli/workflow-orchestrator.js +1 -1
- package/dist/src/config/worker-context.js +37 -7
- package/dist/src/config/worker-parallelism.js +11 -0
- package/dist/src/contributors/detect.js +1 -1
- package/dist/src/contributors/discover.js +1 -1
- package/dist/src/contributors/heuristic.js +1 -1
- package/dist/src/contributors/index.js +1 -1
- package/dist/src/contributors/types.js +1 -1
- package/dist/src/contributors/validation.js +1 -1
- package/dist/src/effects/worker-delivery.js +83 -0
- package/dist/src/extensions/capability-index.js +1 -1
- package/dist/src/extensions/commands/definitions.js +2 -2
- package/dist/src/extensions/deployment-registration.js +1 -1
- package/dist/src/extensions/index.js +1 -1
- package/dist/src/extensions/loader.js +1 -1
- package/dist/src/extensions/manifest.js +10 -2
- package/dist/src/extensions/project-local-activity.js +1 -1
- package/dist/src/extensions/project-local-discovery.js +23 -3
- package/dist/src/extensions/project-local-doctor.js +7 -3
- package/dist/src/extensions/project-local-promote.js +3 -3
- package/dist/src/extensions/project-local-remove.js +3 -3
- package/dist/src/extensions/project-local-scaffold.js +20 -8
- package/dist/src/extensions/registry.js +1 -1
- package/dist/src/extensions/shadow-resolver.js +1 -1
- package/dist/src/extensions/types.js +1 -1
- package/dist/src/extensions/upstream-registry.js +1 -1
- package/dist/src/extensions/validation.js +1 -1
- package/dist/src/intake/git-history-analyzer.js +1 -1
- package/dist/src/kb/cli.js +1 -1
- package/dist/src/marketplace/plugin-directory.js +36 -0
- package/dist/src/marketplace/plugin-search.js +180 -0
- package/dist/src/mcp/cli.mjs +2 -2
- package/dist/src/mcp/helpers.mjs +1 -1
- package/dist/src/mcp/http-tools.mjs +8 -6
- package/dist/src/mcp/http-transport.mjs +3 -1
- package/dist/src/mcp/server.mjs +1 -1
- package/dist/src/mcp/tools/command-run.mjs +1 -1
- package/dist/src/mcp/tools/discovery.mjs +1 -1
- package/dist/src/mcp/tools/subsystems.mjs +1 -1
- package/dist/src/mcp/tools/worker-invoke.mjs +68 -22
- package/dist/src/mcp/tools/worker-local-only-preflight.mjs +79 -0
- package/dist/src/mcp/tools/worker-recorded-launch.mjs +26 -0
- package/dist/src/mcp/tools/worker-stdin-runtime.mjs +33 -6
- package/dist/src/mcp/tools/worker-verify-deliver-schema.mjs +33 -0
- package/dist/src/mcp/tools/worker-verify-deliver.mjs +27 -0
- package/dist/src/models/catalog-policy.js +2 -2
- package/dist/src/models/conductor-data-policy.mjs +83 -14
- package/dist/src/models/config-loader.js +2 -2
- package/dist/src/models/factory-models.js +144 -0
- package/dist/src/models/index.js +2 -2
- package/dist/src/models/local-endpoint-models.js +155 -0
- package/dist/src/models/model-capabilities.v1.json +44 -36
- package/dist/src/models/model-discovery.js +16 -8
- package/dist/src/models/opencode-worker-model.mjs +16 -0
- package/dist/src/models/resolver.js +2 -2
- package/dist/src/models/worker-installation.d.mts +2 -0
- package/dist/src/models/worker-installation.mjs +16 -5
- package/dist/src/models/worker-invocation-policy.js +25 -1
- package/dist/src/models/worker-plan.js +1 -1
- package/dist/src/models/wrapper-enforcement.js +1 -1
- package/dist/src/plugin/plugin-installer.js +2 -2
- package/dist/src/plugin/registry-validator.js +2 -2
- package/dist/src/plugin/skill-command-translator.js +1 -1
- package/dist/src/policy/repo-access.js +3 -1
- package/dist/src/providers/capability-matrix.yaml +75 -5
- package/dist/src/providers/deployment-ownership.mjs +8 -1
- package/dist/src/providers/deployment-preservation.mjs +44 -3
- package/dist/src/providers/grok-build-acp.js +13 -5
- package/dist/src/providers/grok-build-dispatch.js +35 -2
- package/dist/src/providers/grok-build-headless.js +2 -1
- package/dist/src/rlm/cache/hash.js +1 -1
- package/dist/src/rlm/cache/store.js +1 -1
- package/dist/src/rlm/cache/types.js +1 -1
- package/dist/src/serve/worker-invocation-preparation.js +13 -0
- package/dist/src/serve/worker-invocation.js +21 -6
- package/dist/src/serve/worker-stdin-frame.mjs +1 -1
- package/dist/src/sessions/adapters/grok-build-native-records.js +77 -7
- package/dist/src/sessions/adapters/grok-build-native.js +148 -1
- package/dist/src/sessions/adapters/grok-build.js +36 -14
- package/dist/src/sessions/normalization.js +1 -1
- package/dist/src/skills/run.js +0 -11
- package/dist/src/smiths/agentsmith/generator.js +1 -1
- package/dist/src/smiths/context-pipeline/index.js +1 -1
- package/dist/src/smiths/context-pipeline/provider-policy.js +1 -1
- package/dist/src/smiths/context-pipeline/types.js +1 -1
- package/dist/src/smiths/context-pipeline/workspace-doctor.js +4 -0
- package/dist/src/smiths/hook-bridge/factory-trust.js +2 -2
- package/dist/src/smiths/hook-bridge/hermes-prompt-discovery.js +10 -7
- package/dist/src/smiths/hook-bridge/hermes-trust.js +65 -0
- package/dist/src/smiths/mcpsmith/analyzers/cli-analyzer.js +2 -2
- package/dist/src/smiths/mcpsmith/generator.js +2 -2
- package/dist/src/smiths/mcpsmith/index.js +2 -2
- package/dist/src/smiths/mcpsmith/types.js +2 -2
- package/dist/src/smiths/skillsmith/collision-detector.js +1 -1
- package/dist/src/smiths/skillsmith/namespace-adapter.js +1 -1
- package/dist/src/smiths/toolsmith/runtime-discovery.mjs +2 -2
- package/dist/src/smiths/toolsmith/types.js +2 -2
- package/dist/src/storage/backends/fortemi.js +1 -1
- package/dist/src/storage/backends/fs.js +1 -1
- package/dist/src/storage/backends/logseq.js +1 -1
- package/dist/src/storage/backends/obsidian.js +1 -1
- package/dist/src/storage/cli.js +2 -2
- package/dist/src/storage/config.js +1 -1
- package/dist/src/storage/index.js +1 -1
- package/dist/src/storage/subsystem-cli.js +1 -1
- package/dist/src/storage/types.js +1 -1
- package/dist/src/testing/generators/test-case-generator.js +1 -1
- package/dist/src/writing/validation-engine.js +1 -1
- package/package.json +11 -1
- package/schemas/models/model-catalog.v1.schema.json +6 -3
- package/tools/agents/deploy-agents.mjs +4 -2
- package/tools/agents/deploy-options.mjs +2 -0
- package/tools/agents/providers/base-inventory.mjs +3 -1
- package/tools/agents/providers/base-kernel-skills.mjs +11 -5
- package/tools/agents/providers/conductor-data-guard.mjs +1 -1
- package/tools/agents/providers/grok-build.mjs +31 -40
- package/tools/agents/providers/model-wrapper.mjs +2 -5
- package/tools/agents/providers/rule-deployment-commit.mjs +3 -0
- package/tools/agents/providers/rule-deployment-prepare.mjs +2 -2
- package/tools/agents/providers/rule-projection.mjs +39 -4
- package/tools/agents/providers/skill-copy-prune.mjs +12 -0
- package/tools/agents/providers/stale-artifact-prune.mjs +24 -10
- package/tools/ralph-external/lib/claude-adapter.mjs +2 -0
- package/tools/ralph-external/lib/factory-adapter.mjs +6 -2
- package/tools/ralph-external/lib/mcp-worker-launch.mjs +67 -0
- package/tools/ralph-external/lib/opencode-adapter.mjs +9 -7
- package/tools/ralph-external/lib/trusted-verification.mjs +1021 -0
- package/tools/ralph-external/lib/typed-stop-delivery.mjs +46 -0
- package/tools/ralph-external/lib/verification-isolation.mjs +509 -0
- package/tools/ralph-external/lib/worker-context.mjs +3 -3
- package/tools/ralph-external/lib/worker-delivery-guards.mjs +95 -0
- package/tools/ralph-external/lib/worker-delivery-record.mjs +15 -0
- package/tools/ralph-external/lib/worker-final.mjs +4 -1
- package/tools/ralph-external/lib/worker-inputs.mjs +20 -1
- package/tools/ralph-external/lib/worker-isolation-status.mjs +3 -0
- package/tools/ralph-external/lib/worker-isolation.mjs +1 -0
- package/tools/ralph-external/lib/worker-launch-cli.mjs +8 -0
- package/tools/ralph-external/lib/worker-local-only-paths.mjs +45 -0
- package/tools/ralph-external/lib/worker-prompt.mjs +4 -1
- package/tools/ralph-external/lib/worker-retry-evidence.mjs +2 -1
- package/tools/ralph-external/lib/worker-run-directory.mjs +45 -0
- package/tools/ralph-external/lib/worker-termination.mjs +21 -12
- package/tools/ralph-external/lib/worker-unit-cleanup.mjs +10 -2
- package/tools/ralph-external/lib/worker-verification-cli.mjs +164 -0
- package/tools/ralph-external/lib/worktree-preparation.mjs +417 -0
- package/tools/ralph-external/session-launcher.mjs +30 -32
- package/vscode-extension/schemas/aiwg.config.v1.json +27 -0
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates complete MCP servers from analyzer results.
|
|
5
5
|
*
|
|
6
|
-
* @architecture
|
|
7
|
-
* @implements
|
|
6
|
+
* @architecture @docs/smithing/mcpsmith.md
|
|
7
|
+
* @implements @docs/smithing/mcpsmith.md
|
|
8
8
|
*/
|
|
9
9
|
import fs from 'fs/promises';
|
|
10
10
|
import path from 'path';
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* - Natural language descriptions
|
|
9
9
|
*
|
|
10
10
|
* @module smiths/mcpsmith
|
|
11
|
-
* @architecture
|
|
12
|
-
* @implements
|
|
11
|
+
* @architecture @docs/smithing/mcpsmith.md
|
|
12
|
+
* @implements @docs/smithing/mcpsmith.md
|
|
13
13
|
*/
|
|
14
14
|
export * from './types.js';
|
|
15
15
|
export * from './analyzers/cli-analyzer.js';
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Types for MCP server generation from various sources.
|
|
5
5
|
*
|
|
6
|
-
* @architecture
|
|
7
|
-
* @implements
|
|
6
|
+
* @architecture @docs/smithing/mcpsmith.md
|
|
7
|
+
* @implements @docs/smithing/mcpsmith.md
|
|
8
8
|
*/
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=types.js.map
|
|
@@ -49,7 +49,7 @@ const PLATFORM_BUILTINS = {
|
|
|
49
49
|
// IS the canonical slug for the doctor skill (the bare `doctor` collides with
|
|
50
50
|
// Claude's built-in). Slash commands and shell CLI commands live on different
|
|
51
51
|
// surfaces and do not actually conflict at runtime.
|
|
52
|
-
// See: docs/migration/skill-namespace-migration.md,
|
|
52
|
+
// See: docs/migration/skill-namespace-migration.md, docs/migration/skill-namespace-migration.md
|
|
53
53
|
// ============================================
|
|
54
54
|
// Ownership Attribution
|
|
55
55
|
// ============================================
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Namespace-aware Skill Deployment Adapter
|
|
3
3
|
*
|
|
4
4
|
* Implements per-platform namespace deployment strategy per ADR:
|
|
5
|
-
*
|
|
5
|
+
* docs/migration/skill-namespace-migration.md
|
|
6
6
|
*
|
|
7
7
|
* Platform groups:
|
|
8
8
|
* Group A (deep-recursion): Claude Code, Cursor, Codex, OpenCode, OpenClaw
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Discovers installed tools, verifies functionality, and generates runtime catalog.
|
|
5
5
|
*
|
|
6
|
-
* @architecture
|
|
7
|
-
* @architecture
|
|
6
|
+
* @architecture @docs/smithing/toolsmith.md
|
|
7
|
+
* @architecture @docs/smithing/toolsmith.md
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { boundedExecFileSync, boundedExecSync } from '../../process/bounded-child-process.mjs';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Type definitions for Toolsmith feature
|
|
3
3
|
*
|
|
4
|
-
* @architecture
|
|
5
|
-
* @architecture
|
|
4
|
+
* @architecture @docs/smithing/toolsmith.md
|
|
5
|
+
* @architecture @docs/smithing/toolsmith.md
|
|
6
6
|
*/
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=types.js.map
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
* because Fortemi's MCP surface does not document a direct delete
|
|
32
32
|
* tool (immutability + versioning is core to the design).
|
|
33
33
|
*
|
|
34
|
-
* @design
|
|
34
|
+
* @design @docs/storage/overview.md
|
|
35
35
|
* @issue #934
|
|
36
36
|
* @issue #961
|
|
37
37
|
* @issue #972
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* overrides from `storage.config`. Output is byte-identical to the
|
|
6
6
|
* pre-abstraction direct-fs calls so consumer migrations stay safe.
|
|
7
7
|
*
|
|
8
|
-
* @design
|
|
8
|
+
* @design @docs/storage/overview.md
|
|
9
9
|
* @issue #934
|
|
10
10
|
* @issue #956
|
|
11
11
|
*/
|
package/dist/src/storage/cli.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* migrate <subsystem> — copy entries from one backend to another
|
|
10
10
|
* import-corpus — ingest the local research corpus through a storage backend
|
|
11
11
|
*
|
|
12
|
-
* @design
|
|
12
|
+
* @design @docs/storage/overview.md
|
|
13
13
|
* @issue #934
|
|
14
14
|
* @issue #954
|
|
15
15
|
* @issue #955
|
|
@@ -276,6 +276,6 @@ Examples:
|
|
|
276
276
|
aiwg storage import-corpus --to obsidian:~/vault --dry-run
|
|
277
277
|
aiwg storage import-corpus --server fortemi-enterprise
|
|
278
278
|
|
|
279
|
-
See
|
|
279
|
+
See @docs/storage/overview.md for the design.`);
|
|
280
280
|
}
|
|
281
281
|
//# sourceMappingURL=cli.js.map
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* `schemas/storage/storage.config.v1.schema.json`; the lightweight path here
|
|
10
10
|
* avoids loading the full catalog during storage bootstrap.
|
|
11
11
|
*
|
|
12
|
-
* @design
|
|
12
|
+
* @design @docs/storage/overview.md
|
|
13
13
|
* @issue #934
|
|
14
14
|
* @issue #953
|
|
15
15
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* `resolveStorage(subsystem)` to obtain a backend-specific adapter
|
|
6
6
|
* conforming to `StorageAdapter`.
|
|
7
7
|
*
|
|
8
|
-
* @design
|
|
8
|
+
* @design @docs/storage/overview.md
|
|
9
9
|
* @schema @schemas/storage/storage.config.v1.schema.json
|
|
10
10
|
* @issue #934
|
|
11
11
|
* @issue #953
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module src/testing/generators/test-case-generator
|
|
8
8
|
* @implements @.aiwg/requirements/use-cases/UC-009-generate-test-artifacts.md
|
|
9
|
-
* @architecture
|
|
9
|
+
* @architecture @docs/architecture/cli/index.md
|
|
10
10
|
* @nfr @.aiwg/requirements/nfr-modules/performance.md - NFR-TEST-01 (<10min for 100 reqs)
|
|
11
11
|
* @tests @test/unit/testing/test-case-generator.test.ts
|
|
12
12
|
* @depends @src/testing/generators/use-case-parser.ts
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Pattern matches and legacy scores do not establish human or machine authorship.
|
|
6
6
|
*
|
|
7
7
|
* @implements @.aiwg/requirements/use-cases/UC-001-validate-ai-generated-content.md
|
|
8
|
-
* @architecture
|
|
8
|
+
* @architecture @docs/architecture/cli/index.md
|
|
9
9
|
* @nfr @.aiwg/requirements/nfr-modules/performance.md - NFR-PERF-001 (<60s validation)
|
|
10
10
|
* @nfr @.aiwg/requirements/nfr-modules/accuracy.md - NFR-ACC-001 (<5% false positives)
|
|
11
11
|
* @tests @test/unit/writing/validation-engine.test.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiwg/cli",
|
|
3
|
-
"version": "2026.11.
|
|
3
|
+
"version": "2026.11.6",
|
|
4
4
|
"description": "Lightweight AIWG CLI for signed, versioned web-backed resources.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -67,9 +67,17 @@
|
|
|
67
67
|
"tools/ralph-external/lib/worker-inputs.mjs",
|
|
68
68
|
"tools/ralph-external/lib/worker-final.mjs",
|
|
69
69
|
"tools/ralph-external/lib/worker-prompt.mjs",
|
|
70
|
+
"tools/ralph-external/lib/worker-verification-cli.mjs",
|
|
71
|
+
"tools/ralph-external/lib/worker-delivery-guards.mjs",
|
|
72
|
+
"tools/ralph-external/lib/typed-stop-delivery.mjs",
|
|
73
|
+
"tools/ralph-external/lib/trusted-verification.mjs",
|
|
74
|
+
"tools/ralph-external/lib/verification-isolation.mjs",
|
|
75
|
+
"tools/ralph-external/lib/worker-delivery-record.mjs",
|
|
76
|
+
"tools/ralph-external/lib/mcp-worker-launch.mjs",
|
|
70
77
|
"tools/ralph-external/lib/worker-capture.mjs",
|
|
71
78
|
"tools/ralph-external/lib/worker-launch-cli.mjs",
|
|
72
79
|
"tools/ralph-external/lib/worker-run-directory-refusal.mjs",
|
|
80
|
+
"tools/ralph-external/lib/worker-run-directory.mjs",
|
|
73
81
|
"tools/ralph-external/lib/worker-isolation.mjs",
|
|
74
82
|
"tools/ralph-external/lib/worker-isolation-args.mjs",
|
|
75
83
|
"tools/ralph-external/lib/worker-unit-cleanup.mjs",
|
|
@@ -81,6 +89,8 @@
|
|
|
81
89
|
"tools/ralph-external/lib/worker-invocation-processes.mjs",
|
|
82
90
|
"tools/ralph-external/lib/worker-invocation-ancestry.mjs",
|
|
83
91
|
"tools/ralph-external/lib/worker-context.mjs",
|
|
92
|
+
"tools/ralph-external/lib/worktree-preparation.mjs",
|
|
93
|
+
"tools/ralph-external/lib/worker-local-only-paths.mjs",
|
|
84
94
|
"tools/ralph-external/lib/systemd-client.mjs",
|
|
85
95
|
"tools/ralph-external/lib/consecutive-failure-circuit-breaker.mjs",
|
|
86
96
|
"tools/ralph-external/lib/launcher-recovery-evidence.mjs",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"additionalProperties": false,
|
|
52
52
|
"required": ["source", "fetchedAt", "providers"],
|
|
53
53
|
"properties": {
|
|
54
|
-
"source": { "enum": ["native", "cache", "remote", "static"] },
|
|
55
|
-
"upstreamSource": { "enum": ["native", "remote", "static"] },
|
|
54
|
+
"source": { "enum": ["native", "cache", "remote", "static", "local-endpoint"] },
|
|
55
|
+
"upstreamSource": { "enum": ["native", "remote", "static", "local-endpoint"] },
|
|
56
56
|
"fetchedAt": { "type": "string", "format": "date-time" },
|
|
57
57
|
"remoteUrl": { "type": "string", "format": "uri" },
|
|
58
58
|
"remoteError": { "type": "string" },
|
|
@@ -92,6 +92,9 @@
|
|
|
92
92
|
"family": { "type": "string", "minLength": 1 },
|
|
93
93
|
"runtimeVersion": { "type": "string", "minLength": 1 },
|
|
94
94
|
"accountScope": { "type": "string", "minLength": 1 },
|
|
95
|
+
"endpoint": { "type": "string", "format": "uri" },
|
|
96
|
+
"checkpoint": { "type": "string", "minLength": 1 },
|
|
97
|
+
"unavailableReason": { "enum": ["endpoint-down", "timeout", "unauthorized", "model-missing", "invalid-response", "host-denied", "auth-env-missing"] },
|
|
95
98
|
"endpointFingerprint": { "type": "string", "minLength": 1 },
|
|
96
99
|
"observedAt": { "type": "string", "minLength": 1, "format": "date-time" },
|
|
97
100
|
"verifiedAt": { "type": "string", "minLength": 1, "format": "date-time" },
|
|
@@ -301,7 +304,7 @@
|
|
|
301
304
|
"required": ["provider", "source", "observedAt", "accountScope", "models"],
|
|
302
305
|
"properties": {
|
|
303
306
|
"provider": { "type": "string" },
|
|
304
|
-
"source": { "enum": ["native", "cache", "remote", "static"] },
|
|
307
|
+
"source": { "enum": ["native", "cache", "remote", "static", "local-endpoint"] },
|
|
305
308
|
"observedAt": { "type": "string", "format": "date-time" },
|
|
306
309
|
"runtimeVersion": { "type": "string" },
|
|
307
310
|
"accountScope": { "enum": ["local-account", "local-runtime", "public-feed", "static"] },
|
|
@@ -292,13 +292,15 @@ async function mainUnlocked(args, internal) {
|
|
|
292
292
|
deployRules: !cfg.deferRuleProjection && (cfg.kernelOnly || cfg.deployRules),
|
|
293
293
|
deployBehaviors: cfg.kernelOnly ? false : cfg.deployBehaviors,
|
|
294
294
|
commandsOnly: cfg.commandsOnly,
|
|
295
|
-
|
|
295
|
+
// Grok bulk deployment includes native agents alongside kernel skills (#2577).
|
|
296
|
+
skillsOnly: cfg.skillsOnly || (cfg.kernelOnly && provider.name !== 'grok-build'),
|
|
296
297
|
rulesOnly: cfg.rulesOnly,
|
|
297
298
|
strict: cfg.strict,
|
|
298
299
|
reportOnly: cfg.reportOnly,
|
|
299
300
|
allowOverBudget: cfg.allowOverBudget === true,
|
|
300
301
|
kernelOnly: cfg.kernelOnly,
|
|
301
302
|
deferRuleProjection: cfg.deferRuleProjection,
|
|
303
|
+
bundleOnly: cfg.bundleOnly,
|
|
302
304
|
additionalSources: cfg.additionalSources,
|
|
303
305
|
filter: cfg.filter,
|
|
304
306
|
filterRole: cfg.filterRole,
|
|
@@ -391,7 +393,7 @@ async function mainUnlocked(args, internal) {
|
|
|
391
393
|
// or removed (the flat-file analogue of the skills holistic prune). #1627.
|
|
392
394
|
pruneStaleAiwgArtifacts(provider, cfg.target, srcRoot, opts, cfg.source);
|
|
393
395
|
|
|
394
|
-
if (!['claude', 'codex', 'cursor', 'hermes', 'warp', 'openclaw'].includes(provider.name) && !opts.commandsOnly && !opts.skillsOnly && !opts.rulesOnly) {
|
|
396
|
+
if (!opts.kernelOnly && !['claude', 'codex', 'cursor', 'hermes', 'warp', 'openclaw'].includes(provider.name) && !opts.commandsOnly && !opts.skillsOnly && !opts.rulesOnly) {
|
|
395
397
|
const behaviorDirs = collectBehaviorDirs(srcRoot);
|
|
396
398
|
const behaviorCount = deployEmulatedBehaviors(behaviorDirs, provider.name, cfg.target, opts);
|
|
397
399
|
if (behaviorCount > 0 && !cfg.quiet) {
|
|
@@ -29,6 +29,7 @@ export function parseArgs(args = process.argv.slice(2)) {
|
|
|
29
29
|
reportOnly: true,
|
|
30
30
|
kernelOnly: false,
|
|
31
31
|
deferRuleProjection: false,
|
|
32
|
+
bundleOnly: false,
|
|
32
33
|
ruleSelectionMode: null,
|
|
33
34
|
additionalSources: [],
|
|
34
35
|
filter: null, // Glob pattern for agent names
|
|
@@ -99,6 +100,7 @@ export function parseArgs(args = process.argv.slice(2)) {
|
|
|
99
100
|
else if (a === '--kernel-only') cfg.kernelOnly = true;
|
|
100
101
|
// Internal use orchestration: the final source owns rule presentation.
|
|
101
102
|
else if (a === '--defer-rule-projection') cfg.deferRuleProjection = true;
|
|
103
|
+
else if (a === '--bundle-only') cfg.bundleOnly = true;
|
|
102
104
|
else if (a === '--deploy-behaviors') cfg.deployBehaviors = true;
|
|
103
105
|
else if (a === '--filter' && args[i + 1]) cfg.filter = args[++i];
|
|
104
106
|
else if (a === '--filter-role' && args[i + 1]) cfg.filterRole = args[++i];
|
|
@@ -244,6 +244,7 @@ export function pruneStaleAiwgFiles(destDir, desiredStems, opts = {}) {
|
|
|
244
244
|
const record = managed[name];
|
|
245
245
|
const owners = [record?.frameworkSlug, ...(Array.isArray(record?.owners) ? record.owners : [])]
|
|
246
246
|
.filter(owner => typeof owner === 'string' && owner.length > 0);
|
|
247
|
+
if (opts.onlyOwner && (!owners.length || owners.some(owner => owner !== opts.onlyOwner))) continue;
|
|
247
248
|
// Wrappers belong to the skill inventory below, not the command inventory.
|
|
248
249
|
const ownerAware = opts.ownerStems instanceof Map && owners.length > 0 && record?.kind !== 'skill-command';
|
|
249
250
|
if (ownerAware ? owners.some(owner => opts.ownerStems.get(owner)?.has(stem)) : desired.has(stem)) continue;
|
|
@@ -275,7 +276,8 @@ export function pruneStaleAiwgFiles(destDir, desiredStems, opts = {}) {
|
|
|
275
276
|
}
|
|
276
277
|
removed.push(target);
|
|
277
278
|
if (dryRun) {
|
|
278
|
-
if (
|
|
279
|
+
if (opts.onlyOwner) console.log(`[dry-run] Would remove ${target} (recorded owner ${opts.onlyOwner} no longer ships this artifact)`);
|
|
280
|
+
else if (verbose) console.log(`[dry-run] would prune stale AIWG artifact: ${path.relative(process.cwd(), target)}`);
|
|
279
281
|
continue;
|
|
280
282
|
}
|
|
281
283
|
try {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { removeSkillCopy } from './skill-copy-prune.mjs';
|
|
3
3
|
import { fs, path } from './base-runtime.mjs';
|
|
4
4
|
import { parseFrontmatter } from './base-frontmatter.mjs';
|
|
5
|
-
import { ensureDir } from './base-files.mjs';
|
|
5
|
+
import { ensureDir, listSkillDirs, readSidecarManifest } from './base-files.mjs';
|
|
6
6
|
import { deploySkillDir, pruneMissingStandardSkills } from './base-skill-copy.mjs';
|
|
7
7
|
|
|
8
8
|
|
|
@@ -30,7 +30,8 @@ export function isKernelSkill(skillDir) {
|
|
|
30
30
|
* Deploy skills with kernel-vs-standard routing (#1212/#1216/#1217).
|
|
31
31
|
*
|
|
32
32
|
* Partitions `skillDirs` into kernel skills (frontmatter `kernel: true`)
|
|
33
|
-
* and standard skills.
|
|
33
|
+
* and standard skills. Project-local skills use the native kernel destination
|
|
34
|
+
* too, so the provider can load them without a framework-index lookup (#4086).
|
|
34
35
|
*
|
|
35
36
|
* **Kernel skills** copy to `kernelDestDir` (platform-native dir,
|
|
36
37
|
* always-loaded by the platform). Small set: currently 24 skills spanning
|
|
@@ -88,7 +89,7 @@ export function deploySkillsWithKernelRouting(
|
|
|
88
89
|
const kernel = [];
|
|
89
90
|
const standard = [];
|
|
90
91
|
for (const dir of skillDirs) {
|
|
91
|
-
if (kernelDestDir && isKernelSkill(dir)) kernel.push(dir);
|
|
92
|
+
if (kernelDestDir && (opts?.deploySource === 'project-local' || isKernelSkill(dir))) kernel.push(dir);
|
|
92
93
|
else standard.push(dir);
|
|
93
94
|
}
|
|
94
95
|
|
|
@@ -322,13 +323,18 @@ export function computeAllKernelNames(srcRoot) {
|
|
|
322
323
|
export function pruneStaleAiwgSkills(kernelDestDir, desiredKernelNames, opts = {}) {
|
|
323
324
|
if ((opts.copyMode ?? opts.copyStandardSkills) || !kernelDestDir || !fs.existsSync(kernelDestDir)) return 0;
|
|
324
325
|
// No global desired set — skip pruning rather than delete everything (#123).
|
|
325
|
-
if (desiredKernelNames == null) return 0;
|
|
326
|
+
if (desiredKernelNames == null && !opts.bundleOnly) return 0;
|
|
326
327
|
if (opts.dryRun) return 0;
|
|
327
|
-
const desired = new Set(desiredKernelNames);
|
|
328
|
+
const desired = new Set(desiredKernelNames || []);
|
|
329
|
+
if (opts.bundleOnly) for (const dir of listSkillDirs(path.join(opts.srcRoot, 'skills')).filter(isKernelSkill)) {
|
|
330
|
+
desired.add(path.basename(dir));
|
|
331
|
+
}
|
|
328
332
|
let pruned = 0;
|
|
329
333
|
for (const entry of fs.readdirSync(kernelDestDir, { withFileTypes: true })) {
|
|
330
334
|
if (!entry.isDirectory()) continue;
|
|
331
335
|
if (desired.has(entry.name)) continue;
|
|
336
|
+
// The bundled corpus cannot declare project-local skills obsolete (#4086).
|
|
337
|
+
if (readSidecarManifest(path.join(kernelDestDir, entry.name))?.managed?.['SKILL.md']?.source === 'project-local') continue;
|
|
332
338
|
|
|
333
339
|
const skillMd = path.join(kernelDestDir, entry.name, 'SKILL.md');
|
|
334
340
|
if (!fs.existsSync(skillMd)) continue;
|
|
@@ -80,6 +80,6 @@ export async function deployConductorDataGuard(targetDir, provider, opts = {}) {
|
|
|
80
80
|
fs.mkdirSync(path.dirname(rulesPath), { recursive: true });
|
|
81
81
|
fs.writeFileSync(rulesPath, lines.join('\n') + '\n');
|
|
82
82
|
}
|
|
83
|
-
console.log(`Conductor guard (${provider}): ${paths.join(', ')}${executionGuard ? '; worker execution checks enabled' : ''}; shell coverage is limited.`);
|
|
83
|
+
console.log(`Conductor guard (${provider}): ${paths.join(', ')}${executionGuard ? '; worker execution/integration checks enabled' : ''}; shell coverage is limited.`);
|
|
84
84
|
return paths;
|
|
85
85
|
}
|
|
@@ -4,8 +4,8 @@ import { withModelWrapper } from './model-wrapper.mjs';
|
|
|
4
4
|
* Project skills under `.grok/skills`; user home via $GROK_HOME (default ~/.grok).
|
|
5
5
|
* Distinct from grokbot. No bare `grok` alias.
|
|
6
6
|
*
|
|
7
|
-
* Native
|
|
8
|
-
*
|
|
7
|
+
* Native agents use captured name/description frontmatter and a body prompt.
|
|
8
|
+
* Grok 1.0.77 ignores model frontmatter; worker CLI -m controls model selection.
|
|
9
9
|
* Rules are written to .grok/rules and loaded by Grok alongside AGENTS.md.
|
|
10
10
|
*
|
|
11
11
|
* @issue #2575
|
|
@@ -24,6 +24,10 @@ import {
|
|
|
24
24
|
createAgentsMdFromTemplate,
|
|
25
25
|
deploySkillsWithKernelRouting,
|
|
26
26
|
collectFrameworkArtifacts,
|
|
27
|
+
getAddonAgentFiles,
|
|
28
|
+
filterAgentFiles,
|
|
29
|
+
listMdFiles,
|
|
30
|
+
toKebabCase,
|
|
27
31
|
getAddonSkillDirs,
|
|
28
32
|
injectPlatformInContent,
|
|
29
33
|
isKernelSkill,
|
|
@@ -138,9 +142,7 @@ export function deploySkills(skillDirs, targetDir, opts = {}) {
|
|
|
138
142
|
});
|
|
139
143
|
}
|
|
140
144
|
|
|
141
|
-
const WORKER_ROLES = new Set(['reasoning', 'coding', 'efficiency']);
|
|
142
145
|
const ROLE_FROM_ALIAS = { opus: 'reasoning', sonnet: 'coding', haiku: 'efficiency' };
|
|
143
|
-
const GROK_TOOLS = new Set(['Bash', 'Read', 'Write', 'Edit', 'Grep', 'Glob']);
|
|
144
146
|
|
|
145
147
|
/** Grok agent files accept a small YAML frontmatter subset, not AIWG metadata. */
|
|
146
148
|
export const compileGrokAgent = withModelWrapper('grok-build', translateAgent);
|
|
@@ -151,42 +153,34 @@ function translateAgent(source, content, opts = {}) {
|
|
|
151
153
|
if (!metadata || typeof metadata !== 'object' || Array.isArray(metadata)) {
|
|
152
154
|
throw new Error(`${source}: invalid agent frontmatter`);
|
|
153
155
|
}
|
|
154
|
-
const name = metadata.name;
|
|
156
|
+
const name = toKebabCase(metadata.name || path.basename(source, '.md'));
|
|
155
157
|
const role = metadata['model-role'] || ROLE_FROM_ALIAS[metadata.model];
|
|
156
|
-
if (!/^aiwg-model-((reasoning|coding|efficiency)-worker|explorer|verifier)$/.test(String(name)) || !WORKER_ROLES.has(role)) {
|
|
157
|
-
throw new Error(`${source}: Grok Build native compilation currently supports only the five AIWG model wrappers; use aiwg show agent for other roles`);
|
|
158
|
-
}
|
|
159
158
|
if (typeof metadata.description !== 'string' || !metadata.description.trim()) {
|
|
160
159
|
throw new Error(`${source}: agent description is required`);
|
|
161
160
|
}
|
|
162
|
-
|
|
163
|
-
if (!Array.isArray(tools) || tools.some(tool => !GROK_TOOLS.has(tool))) {
|
|
164
|
-
throw new Error(`${source}: unsupported Grok Build tool mapping; supported tools: ${[...GROK_TOOLS].join(', ')}`);
|
|
165
|
-
}
|
|
161
|
+
// Portable tier aliases are intent. Exact pins cannot be honored in Grok agents.
|
|
166
162
|
const sourceModel = String(metadata.model || '').trim();
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
if (configuredModel && (typeof configuredModel !== 'string' || /^(configured\/|inherit$)/.test(configuredModel))) {
|
|
172
|
-
throw new Error(`${source}: unresolved Grok Build ${role} model; configure --${role}-model with a discovered selector`);
|
|
163
|
+
const configuredModel = metadata['model-override'] || opts[`${role}Model`]
|
|
164
|
+
|| opts.modelsConfig?.['grok-build']?.[role]?.model;
|
|
165
|
+
if (configuredModel || (sourceModel && !ROLE_FROM_ALIAS[sourceModel] && sourceModel !== 'inherit')) {
|
|
166
|
+
throw new Error(`${source}: exact model pin is unsupported in Grok Build agents: frontmatter model is ignored. Select a model with -m in the worker CLI invocation instead.`);
|
|
173
167
|
}
|
|
174
168
|
const header = [
|
|
175
169
|
'---',
|
|
176
170
|
`name: ${name}`,
|
|
177
171
|
`description: ${JSON.stringify(metadata.description)}`,
|
|
178
|
-
`tools: ${tools.join(', ')}`,
|
|
179
|
-
...(configuredModel ? [`model: ${JSON.stringify(configuredModel)}`] : []),
|
|
180
172
|
'---',
|
|
181
173
|
];
|
|
182
|
-
const intent =
|
|
183
|
-
? `AIWG model role: ${role}
|
|
184
|
-
|
|
174
|
+
const intent = [
|
|
175
|
+
...(role ? [`AIWG model role: ${role}.`] : []),
|
|
176
|
+
...(metadata['model-tier'] ? [`AIWG model tier intent: ${metadata['model-tier']}.`] : []),
|
|
177
|
+
'Grok Build frontmatter model is ignored; this agent inherits the session model. Role and tier intent do not pin a model. Select the worker model with -m in the CLI invocation.',
|
|
178
|
+
].join(' ');
|
|
185
179
|
return `${header.join('\n')}\n\n${intent}\n\n${match[2].trim()}\n`;
|
|
186
180
|
}
|
|
187
181
|
|
|
188
182
|
export function deployAgents(agentFiles, targetDir, opts = {}) {
|
|
189
|
-
const selected = agentFiles
|
|
183
|
+
const selected = filterAgentFiles(agentFiles, opts);
|
|
190
184
|
const dir = assertSafeNativeDirectory(targetDir, paths.agents);
|
|
191
185
|
for (const source of selected) {
|
|
192
186
|
const dest = path.join(dir, path.basename(source));
|
|
@@ -298,7 +292,7 @@ export function uninstall(target, opts = {}) {
|
|
|
298
292
|
}
|
|
299
293
|
manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
300
294
|
for (const [name, record] of Object.entries(manifest.managed ?? {})) {
|
|
301
|
-
if (path.basename(name) !== name ||
|
|
295
|
+
if (path.basename(name) !== name || !name.endsWith('.md')) continue;
|
|
302
296
|
const file = path.join(agentsDir, name);
|
|
303
297
|
const relative = path.relative(root, file);
|
|
304
298
|
if (!fs.existsSync(file) || fs.lstatSync(file).isSymbolicLink() || !fs.lstatSync(file).isFile()) {
|
|
@@ -352,7 +346,7 @@ export async function postDeploy(target, opts = {}) {
|
|
|
352
346
|
console.log(
|
|
353
347
|
`Grok Build (experimental): kernel skills → ${kernelSkillsPath}; ` +
|
|
354
348
|
`standard skills index-driven (opt-in mirror → ${standardSkillsPath} with --copy-all); ` +
|
|
355
|
-
`
|
|
349
|
+
`agents → ${paths.agents}; rules → ${paths.rules}; user home → ${home || '(unresolved GROK_HOME)'}. ` +
|
|
356
350
|
'Distinct from grokbot.',
|
|
357
351
|
);
|
|
358
352
|
}
|
|
@@ -371,23 +365,20 @@ async function deploySelected(opts) {
|
|
|
371
365
|
if (opts.createAgentsMd || (!opts.commandsOnly && !opts.skillsOnly && !opts.rulesOnly)) {
|
|
372
366
|
assertSafeAgentsMd(opts.target);
|
|
373
367
|
}
|
|
374
|
-
const aiwgRoot = resolveAiwgRoot(opts.srcRoot) || opts.srcRoot;
|
|
375
368
|
const skillDirs = [...getAddonSkillDirs(opts.srcRoot)];
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
);
|
|
369
|
+
const artifacts = collectFrameworkArtifacts(opts.srcRoot, mode, {
|
|
370
|
+
includeAgents: true,
|
|
371
|
+
includeCommands: false,
|
|
372
|
+
includeSkills: true,
|
|
373
|
+
includeRules: false,
|
|
374
|
+
});
|
|
375
|
+
skillDirs.push(...artifacts.skills);
|
|
384
376
|
let count = 0;
|
|
385
377
|
if (!opts.commandsOnly && !opts.skillsOnly && !opts.rulesOnly) {
|
|
386
|
-
|
|
387
|
-
const
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
count += deployAgents(workers, opts.target, opts).filter(action => action.type === 'deploy').length;
|
|
378
|
+
// Use the same frozen source root as skills/frameworks, including direct bundles.
|
|
379
|
+
const agents = [...getAddonAgentFiles(opts.srcRoot), ...artifacts.agents,
|
|
380
|
+
...listMdFiles(path.join(opts.srcRoot, 'agents'))];
|
|
381
|
+
count += deployAgents(agents, opts.target, opts).filter(action => action.type === 'deploy').length;
|
|
391
382
|
}
|
|
392
383
|
if (!opts.commandsOnly && !opts.rulesOnly) {
|
|
393
384
|
const result = deploySkills(skillDirs, opts.target, opts);
|
|
@@ -47,8 +47,7 @@ export function withModelWrapper(provider, translate) {
|
|
|
47
47
|
const mapped = translate(source, normalized, opts);
|
|
48
48
|
const notice = `AIWG wrapper tier: ${tier}; catalog role: ${role}. `
|
|
49
49
|
+ `Tier enforcement: ${enforcement}; effort: ${nativeEffort ? `pinned (${nativeEffort})` : 'not enforced per wrapper'}. `
|
|
50
|
-
+ (pin ? `Model selector: ${pin}.` : 'The automatic selector is not a model pin. Model control is inherited or informational; stop unless the conductor confirms the required non-flagship session.')
|
|
51
|
-
+ (provider === 'grok-build' ? ' Native-agent tier enforcement remains gated by #2577; not enforced.' : '');
|
|
50
|
+
+ (pin ? `Model selector: ${pin}.` : 'The automatic selector is not a model pin. Model control is inherited or informational; stop unless the conductor confirms the required non-flagship session.');
|
|
52
51
|
if (provider === 'codex') {
|
|
53
52
|
let output = mapped.replace(/^model = .*$/m, `model = ${JSON.stringify(pin)}`);
|
|
54
53
|
if (!pin) throw new Error(`${source}: Codex wrapper needs a catalog model pin`);
|
|
@@ -62,7 +61,7 @@ export function withModelWrapper(provider, translate) {
|
|
|
62
61
|
if (!target) return `${mapped.trim()}\n\n${notice}\n`;
|
|
63
62
|
const metadata = target.metadata;
|
|
64
63
|
if (pin) metadata[controls.model] = pin;
|
|
65
|
-
else
|
|
64
|
+
else delete metadata.model;
|
|
66
65
|
// Portable input aliases are not provider controls. Emit only the resolved native field.
|
|
67
66
|
for (const key of ['effort', 'model-effort', 'model_reasoning_effort', 'reasoningEffort', 'thinkingLevel']) {
|
|
68
67
|
if (key !== controls.effort || !nativeEffort) delete metadata[key];
|
|
@@ -83,8 +82,6 @@ export function withModelWrapper(provider, translate) {
|
|
|
83
82
|
const nativeHeader = mapped.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n/)?.[1] ?? '';
|
|
84
83
|
const nativeTools = nativeHeader.match(/^tools:[^\n]*(?:\n[ \t]+- [^\n]*)*/m)?.[0];
|
|
85
84
|
if (nativeTools) header = header.replace(/^tools:[^\n]*(?:\n[ \t]+- [^\n]*)*/m, () => nativeTools);
|
|
86
|
-
// Keep Grok's quoted native model selector, including operator-supplied IDs.
|
|
87
|
-
if (provider === 'grok-build' && metadata.model) header = header.replace(/^model: .*$/m, `model: ${JSON.stringify(metadata.model)}`);
|
|
88
85
|
return `---\n${header}---\n\n${notice}\n\n${target.body.trim()}\n`;
|
|
89
86
|
};
|
|
90
87
|
}
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
walk,
|
|
23
23
|
} from './rule-delivery-surface.mjs';
|
|
24
24
|
import { prepareRuleDeployment } from './rule-deployment-prepare.mjs';
|
|
25
|
+
import { ruleRemovalReason } from './rule-projection.mjs';
|
|
25
26
|
import {
|
|
26
27
|
captureAnchors,
|
|
27
28
|
capturePreimage,
|
|
@@ -82,6 +83,8 @@ export function commitRuleDeploymentPlan(plan) {
|
|
|
82
83
|
promoteDirectories(to, from, rel => delegated(from, rel));
|
|
83
84
|
const after = new Set(walk(to).map(file => path.relative(to, file)).filter(rel => !delegated(from, rel)));
|
|
84
85
|
for (const rel of before.keys()) if (!delegated(from, rel) && !after.has(rel)) {
|
|
86
|
+
const reason = ruleRemovalReason(path.join(from, rel));
|
|
87
|
+
if (reason) console.warn(`Removing ${path.join(from, rel)}${reason}`);
|
|
85
88
|
fs.rmSync(path.join(from, rel), { force: true });
|
|
86
89
|
// A pruned managed skill must disappear as a directory too. Remove
|
|
87
90
|
// only empty parents absent from the staged result; preserve siblings.
|
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
stagedCleanups,
|
|
45
45
|
verifyInputPool,
|
|
46
46
|
} from './rule-deployment-state.mjs';
|
|
47
|
-
import { inlineStartup, projectRules } from './rule-projection.mjs';
|
|
47
|
+
import { ruleRemovalReason, inlineStartup, projectRules } from './rule-projection.mjs';
|
|
48
48
|
const { captureDeploymentOutputs, recordDeploymentOutputs } = await importImpl(import.meta.url, 'providers/deployment-ownership.mjs');
|
|
49
49
|
const { preserveDeploymentOutputs } = await importImpl(import.meta.url, 'providers/deployment-preservation.mjs');
|
|
50
50
|
import { retireInlineStartup } from './rule-startup.mjs';
|
|
@@ -427,7 +427,7 @@ export async function prepareRuleDeployment(original, provider, deploy) {
|
|
|
427
427
|
const file = path.join(to, rel);
|
|
428
428
|
if (before.get(rel) !== fileDigest(file)) console.log(`[dry-run] Would write ${normalize(file)}`);
|
|
429
429
|
}
|
|
430
|
-
for (const rel of before.keys()) if (!delegated(from, rel) && !after.has(rel)) console.log(`[dry-run] Would remove ${path.join(from, rel)}`);
|
|
430
|
+
for (const rel of before.keys()) if (!delegated(from, rel) && !after.has(rel)) console.log(`[dry-run] Would remove ${path.join(from, rel)}${ruleRemovalReason(path.join(from, rel))}`);
|
|
431
431
|
}
|
|
432
432
|
for (const name of rootNames) {
|
|
433
433
|
const file = path.join(stage, name);
|