@opengsd/gsd-core 1.5.0-rc.2 → 1.5.0-rc.3
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/.claude-plugin/plugin.json +1 -1
- package/agents/gsd-mempalace-curator.md +47 -0
- package/bin/install.js +25 -7
- package/commands/gsd/mempalace-capture.md +71 -0
- package/commands/gsd/mempalace-recall.md +102 -0
- package/commands/gsd/ns-context.md +4 -2
- package/gemini-extension.json +1 -1
- package/gsd-core/bin/gsd-tools.cjs +110 -92
- package/gsd-core/bin/lib/capability-activation.cjs +86 -0
- package/gsd-core/bin/lib/capability-registry.cjs +1468 -11
- package/gsd-core/bin/lib/capability-state.cjs +31 -18
- package/gsd-core/bin/lib/check-command-router.cjs +328 -1
- package/gsd-core/bin/lib/clusters.cjs +2 -0
- package/gsd-core/bin/lib/command-roster.cjs +19 -0
- package/gsd-core/bin/lib/commands.cjs +33 -10
- package/gsd-core/bin/lib/config-loader.cjs +7 -8
- package/gsd-core/bin/lib/config-schema.cjs +32 -3
- package/gsd-core/bin/lib/config.cjs +1 -2
- package/gsd-core/bin/lib/core.cjs +5 -2
- package/gsd-core/bin/lib/init.cjs +8 -5
- package/gsd-core/bin/lib/install-profiles.cjs +2 -1
- package/gsd-core/bin/lib/loop-resolver.cjs +157 -16
- package/gsd-core/bin/lib/model-resolver.cjs +47 -5
- package/gsd-core/bin/lib/phase.cjs +71 -11
- package/gsd-core/bin/lib/profile-output.cjs +45 -4
- package/gsd-core/bin/lib/profile-pipeline-command-router.cjs +138 -0
- package/gsd-core/bin/lib/roadmap.cjs +97 -7
- package/gsd-core/bin/lib/runtime-artifact-conversion.cjs +1700 -0
- package/gsd-core/bin/lib/runtime-artifact-layout.cjs +20 -28
- package/gsd-core/bin/lib/runtime-config-adapter-registry.cjs +27 -19
- package/gsd-core/bin/lib/runtime-homes.cjs +26 -20
- package/gsd-core/bin/lib/state-command-router.cjs +15 -3
- package/gsd-core/bin/lib/state-document.cjs +46 -1
- package/gsd-core/bin/lib/state.cjs +221 -35
- package/gsd-core/bin/lib/verify.cjs +19 -4
- package/gsd-core/bin/shared/config-defaults.manifest.json +1 -2
- package/gsd-core/bin/shared/config-schema.manifest.json +0 -18
- package/gsd-core/bin/shared/model-catalog.json +1 -0
- package/gsd-core/references/loop-hook-dispatch.md +61 -0
- package/gsd-core/templates/config.json +1 -1
- package/gsd-core/workflows/audit-milestone.md +5 -3
- package/gsd-core/workflows/autonomous.md +10 -5
- package/gsd-core/workflows/code-review-fix.md +9 -7
- package/gsd-core/workflows/code-review.md +8 -6
- package/gsd-core/workflows/discuss-phase.md +14 -0
- package/gsd-core/workflows/execute-phase.md +82 -143
- package/gsd-core/workflows/help/modes/full.md +3 -1
- package/gsd-core/workflows/new-project.md +3 -3
- package/gsd-core/workflows/plan-phase.md +89 -221
- package/gsd-core/workflows/profile-user.md +3 -1
- package/gsd-core/workflows/progress.md +58 -1
- package/gsd-core/workflows/quick.md +9 -6
- package/gsd-core/workflows/review.md +19 -2
- package/gsd-core/workflows/secure-phase.md +4 -2
- package/gsd-core/workflows/settings-advanced.md +2 -0
- package/gsd-core/workflows/ship.md +57 -0
- package/gsd-core/workflows/validate-phase.md +4 -2
- package/gsd-core/workflows/verify-work.md +27 -11
- package/package.json +3 -2
- package/scripts/affected-tests-lib.cjs +16 -4
- package/scripts/gen-capability-registry.cjs +359 -48
- package/scripts/gen-inventory-manifest.cjs +1 -4
- package/scripts/gen-loop-host-contract.cjs +55 -0
- package/scripts/issue-version-gate.cjs +140 -0
- package/scripts/lint-allow-test-rule-refs.allowlist.json +326 -0
- package/scripts/lint-allow-test-rule-refs.cjs +162 -0
- package/scripts/lint-test-file-count.allowlist.json +8 -0
- package/scripts/release-tarball-smoke.cjs +7 -1
- package/scripts/run-tests.cjs +74 -14
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Capability activation helpers.
|
|
4
|
+
*
|
|
5
|
+
* Shared by the Capability State Resolver and Loop Resolver so config-key
|
|
6
|
+
* activation uses one precedence chain and one prototype-pollution guard.
|
|
7
|
+
*/
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
12
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
14
|
+
const planningWorkspaceMod = require("./planning-workspace.cjs");
|
|
15
|
+
const { planningDir, planningRoot } = planningWorkspaceMod;
|
|
16
|
+
function _getNestedConfigValue(config, dotKey) {
|
|
17
|
+
const segments = dotKey.split('.');
|
|
18
|
+
let current = config;
|
|
19
|
+
for (const seg of segments) {
|
|
20
|
+
if (seg === '__proto__' || seg === 'constructor' || seg === 'prototype') {
|
|
21
|
+
return { found: false, value: undefined };
|
|
22
|
+
}
|
|
23
|
+
if (typeof current !== 'object' || current === null) {
|
|
24
|
+
return { found: false, value: undefined };
|
|
25
|
+
}
|
|
26
|
+
const cur = current;
|
|
27
|
+
if (!Object.prototype.hasOwnProperty.call(cur, seg)) {
|
|
28
|
+
return { found: false, value: undefined };
|
|
29
|
+
}
|
|
30
|
+
current = cur[seg];
|
|
31
|
+
}
|
|
32
|
+
return { found: true, value: current };
|
|
33
|
+
}
|
|
34
|
+
const _warnedRawConfigPaths = new Set();
|
|
35
|
+
function _readRawConfigKey(filePath, dotKey) {
|
|
36
|
+
try {
|
|
37
|
+
const raw = node_fs_1.default.readFileSync(filePath, 'utf8');
|
|
38
|
+
let parsed;
|
|
39
|
+
try {
|
|
40
|
+
parsed = JSON.parse(raw);
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
if (!_warnedRawConfigPaths.has(filePath)) {
|
|
44
|
+
_warnedRawConfigPaths.add(filePath);
|
|
45
|
+
try {
|
|
46
|
+
process.stderr.write(`gsd-tools: warning: failed to parse ${filePath} as JSON — skipping for activation resolution\n`);
|
|
47
|
+
}
|
|
48
|
+
catch { /* stderr might be closed */ }
|
|
49
|
+
}
|
|
50
|
+
return { found: false, value: undefined };
|
|
51
|
+
}
|
|
52
|
+
return _getNestedConfigValue(parsed, dotKey);
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
return { found: false, value: undefined };
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function _resolveActivationValue(dotKey, config, cwd, registry) {
|
|
59
|
+
const fromConfig = _getNestedConfigValue(config, dotKey);
|
|
60
|
+
if (fromConfig.found)
|
|
61
|
+
return Boolean(fromConfig.value);
|
|
62
|
+
if (cwd) {
|
|
63
|
+
const wsConfigPath = node_path_1.default.join(planningDir(cwd), 'config.json');
|
|
64
|
+
const rootConfigPath = node_path_1.default.join(planningRoot(cwd), 'config.json');
|
|
65
|
+
const fromWs = _readRawConfigKey(wsConfigPath, dotKey);
|
|
66
|
+
if (fromWs.found)
|
|
67
|
+
return Boolean(fromWs.value);
|
|
68
|
+
if (wsConfigPath !== rootConfigPath) {
|
|
69
|
+
const fromRoot = _readRawConfigKey(rootConfigPath, dotKey);
|
|
70
|
+
if (fromRoot.found)
|
|
71
|
+
return Boolean(fromRoot.value);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const schemaEntry = registry['configSchema']?.[dotKey];
|
|
75
|
+
if (schemaEntry && typeof schemaEntry === 'object' && schemaEntry !== null) {
|
|
76
|
+
const def = schemaEntry['default'];
|
|
77
|
+
if (def !== undefined)
|
|
78
|
+
return Boolean(def);
|
|
79
|
+
}
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
module.exports = {
|
|
83
|
+
_getNestedConfigValue,
|
|
84
|
+
_readRawConfigKey,
|
|
85
|
+
_resolveActivationValue,
|
|
86
|
+
};
|