@akira-tl/forgerelay 1.1.2 → 1.2.0
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/CHANGELOG.md +38 -0
- package/README.md +14 -0
- package/dist/activity/runtime/mcp-query-tools.js +15 -5
- package/dist/cli/config/inspect.js +331 -0
- package/dist/cli/config/migrate.js +351 -0
- package/dist/cli/init/setup-config.js +41 -0
- package/dist/cli/init.js +128 -130
- package/dist/cli/maintenance.js +15 -5
- package/dist/cli/mcp/external-mcp.js +14 -10
- package/dist/cli/mcp/status.js +11 -6
- package/dist/cli.js +40 -7
- package/dist/lsp/language-server-config.js +66 -144
- package/dist/lsp/runtime/manager.js +35 -4
- package/dist/mcp/hooks/config.js +141 -0
- package/dist/mcp/hooks/external-mcp-transform.js +22 -13
- package/dist/mcp/hooks/hook-cli.js +62 -52
- package/dist/mcp/hooks/hooks.js +111 -85
- package/dist/mcp/operations/external-mcp/external-mcp-runtime.js +8 -5
- package/dist/mcp/operations/external-mcp/external-mcp.js +9 -2
- package/dist/mcp/server/core/capability-support.js +7 -0
- package/dist/runtime/config/config.js +142 -64
- package/dist/runtime/config/definition/catalog.js +12 -0
- package/dist/runtime/config/definition/definition.js +115 -0
- package/dist/runtime/config/definition/external-mcp.js +58 -0
- package/dist/runtime/config/definition/general-config.js +258 -0
- package/dist/runtime/config/definition/language-servers.js +116 -0
- package/dist/runtime/config/definition/schema.js +113 -0
- package/dist/runtime/config/definition/types.js +2 -0
- package/dist/runtime/config/external-mcp-auth-store.js +105 -29
- package/dist/runtime/config/external-mcp-config.js +39 -0
- package/dist/runtime/config/external-mcp-registry.js +284 -106
- package/dist/runtime/config/inspection/live.js +77 -0
- package/dist/runtime/config/resolution/general.js +93 -0
- package/dist/runtime/config/resolution/hooks.js +315 -0
- package/dist/runtime/config/resolution/language-servers.js +237 -0
- package/dist/runtime/config/resolution/project-sources.js +159 -0
- package/dist/runtime/config/resolution/resolver.js +485 -0
- package/dist/runtime/config/resolution/types.js +1 -0
- package/dist/runtime/config/runtime/config-runtime.js +74 -0
- package/dist/runtime/config/runtime/source-refresh.js +263 -0
- package/dist/runtime/config/user-config.js +38 -31
- package/dist/runtime/security/project-execution-trust.js +34 -0
- package/dist/runtime/testing/server-fixture.js +9 -8
- package/dist/server.js +10 -6
- package/dist/subagents/profiles.js +336 -53
- package/dist/subagents/sessions/execution.js +6 -35
- package/dist/subagents/sessions/manager.js +14 -2
- package/dist/ui/.vite/manifest.json +275 -275
- package/dist/ui/activity-panel-app.html +1 -1
- package/dist/ui/assets/{activity-panel-app-Bw7ZFX2g.js → activity-panel-app-BeDiwd7D.js} +3 -3
- package/dist/ui/assets/{angular-html-DeUNP12X.js → angular-html-DuoCE7nn.js} +1 -1
- package/dist/ui/assets/{angular-ts-B3v8FKi_.js → angular-ts-D5tGk0hL.js} +1 -1
- package/dist/ui/assets/{apl-Bs3iQm4P.js → apl-lciOTPbw.js} +1 -1
- package/dist/ui/assets/{astro-D6GHecBY.js → astro-vJbqfNnJ.js} +1 -1
- package/dist/ui/assets/{blade-BMNbVOHv.js → blade-C7655Q4K.js} +1 -1
- package/dist/ui/assets/{c-BquuA6bv.js → c-DdHp1Jrw.js} +1 -1
- package/dist/ui/assets/{cobol-BuZ6kfps.js → cobol-DgvzQxZP.js} +1 -1
- package/dist/ui/assets/{coffee-DgC5uBzL.js → coffee-BIjVUOUd.js} +1 -1
- package/dist/ui/assets/{cpp-BdvWqCaB.js → cpp-CU8tGzvI.js} +1 -1
- package/dist/ui/assets/{crystal-0Q5qBvNI.js → crystal-CUQAwsg9.js} +1 -1
- package/dist/ui/assets/{css-Be_T8idh.js → css-DtMTqD3F.js} +1 -1
- package/dist/ui/assets/{edge-DaGLdgh_.js → edge-DoCX9RnL.js} +1 -1
- package/dist/ui/assets/{elixir-CMgiFIzB.js → elixir-DJxV9_U6.js} +1 -1
- package/dist/ui/assets/{elm-B-ufMlMC.js → elm-DIgWqK4r.js} +1 -1
- package/dist/ui/assets/{erb-CaGiOZM-.js → erb-BHxP0c_e.js} +1 -1
- package/dist/ui/assets/{git-rebase-CpwUWCzK.js → git-rebase-HbI_Vo8d.js} +1 -1
- package/dist/ui/assets/{glimmer-js-BRxccvnE.js → glimmer-js-CthY4Ty_.js} +1 -1
- package/dist/ui/assets/{glimmer-ts-CgQbPzlT.js → glimmer-ts-B2-_A1Xz.js} +1 -1
- package/dist/ui/assets/{glsl-D7JmHFr0.js → glsl-D9V9gq98.js} +1 -1
- package/dist/ui/assets/{graphql-C8n0eUBK.js → graphql-CddeAaS3.js} +1 -1
- package/dist/ui/assets/{hack-lVN7KVQv.js → hack-D_loGkOT.js} +1 -1
- package/dist/ui/assets/{haml-h18lG0pS.js → haml-BoWDczd0.js} +1 -1
- package/dist/ui/assets/{handlebars-lRFjRPfj.js → handlebars-ZoSOvw9y.js} +1 -1
- package/dist/ui/assets/{heavy-payload-Cqx9MOkH.js → heavy-payload-DO34LwoZ.js} +3 -3
- package/dist/ui/assets/{html-DtILqTE1.js → html-CE-obXVo.js} +1 -1
- package/dist/ui/assets/{html-derivative-CSTSmPup.js → html-derivative-Cd-smAbW.js} +1 -1
- package/dist/ui/assets/{http-DNI8fsbY.js → http-CZrkbrSl.js} +1 -1
- package/dist/ui/assets/{hurl-DgRi60JG.js → hurl-CxTuxBt1.js} +1 -1
- package/dist/ui/assets/{java-CW9pZ5bh.js → java-BshLjCat.js} +1 -1
- package/dist/ui/assets/{javascript-Cvg2UrWL.js → javascript-D2pxQTiX.js} +1 -1
- package/dist/ui/assets/{jinja-CZw_S1FB.js → jinja-kbfPP7-F.js} +1 -1
- package/dist/ui/assets/{jison-C56u_FZv.js → jison-C2mt9l1M.js} +1 -1
- package/dist/ui/assets/{json-DW2UTv1q.js → json-DU_rg_AU.js} +1 -1
- package/dist/ui/assets/{jsx-Zj5gobdD.js → jsx-D_8aQMlx.js} +1 -1
- package/dist/ui/assets/{julia-Cvcrre-L.js → julia-BmefTaVV.js} +1 -1
- package/dist/ui/assets/{just-8CZ2u6Tj.js → just-DXV8vk1S.js} +1 -1
- package/dist/ui/assets/{latex-D289AXWG.js → latex-Cjm2MvGW.js} +1 -1
- package/dist/ui/assets/{liquid-CFEX3SkZ.js → liquid-DyQDlo0u.js} +1 -1
- package/dist/ui/assets/{lua-BKpJ0ybO.js → lua-B2A1vzzy.js} +1 -1
- package/dist/ui/assets/{marko-D9maZ0a6.js → marko-B9vOkXOU.js} +1 -1
- package/dist/ui/assets/{mdc-rM9l0qWR.js → mdc-D42m6spU.js} +1 -1
- package/dist/ui/assets/{nginx-C9w6p2C9.js → nginx-TpfVxSUY.js} +1 -1
- package/dist/ui/assets/{nim-BRePHk0J.js → nim-CJr5T1FK.js} +1 -1
- package/dist/ui/assets/{perl-CskTmiPQ.js → perl-cJZcsdm9.js} +1 -1
- package/dist/ui/assets/{php-DCU_FvNI.js → php-CSZL5KRT.js} +1 -1
- package/dist/ui/assets/{pug-XLaVxTvv.js → pug-B1eMKzuA.js} +1 -1
- package/dist/ui/assets/{qml-CaONKSl-.js → qml-Dl2_7zc9.js} +1 -1
- package/dist/ui/assets/{r-BCVR0ZE3.js → r-F0aaO9gG.js} +1 -1
- package/dist/ui/assets/{razor-DDnGXxnU.js → razor-BPnkSMCw.js} +1 -1
- package/dist/ui/assets/{regexp-DWGTYYVx.js → regexp-BnGHMFbv.js} +1 -1
- package/dist/ui/assets/{rst-Dz3GWvQm.js → rst-B3CO7WYO.js} +1 -1
- package/dist/ui/assets/{ruby-DC3jGtMY.js → ruby-B6VMzT1T.js} +1 -1
- package/dist/ui/assets/{sas-7mNpvsjZ.js → sas-Df2lHVuU.js} +1 -1
- package/dist/ui/assets/{scss-uBsoCJVy.js → scss-4XxI6sgu.js} +1 -1
- package/dist/ui/assets/{shellscript-BCN9N_Jf.js → shellscript-DYASCN4r.js} +1 -1
- package/dist/ui/assets/{shellsession-Hsw46VXV.js → shellsession-Br6AGJO_.js} +1 -1
- package/dist/ui/assets/{soy-D6KV69HU.js → soy-p3ZNq1We.js} +1 -1
- package/dist/ui/assets/{sql-CVzVQkJh.js → sql-CAdv2OXL.js} +1 -1
- package/dist/ui/assets/{stata-BwUjXNhI.js → stata-Dx7yUbG_.js} +1 -1
- package/dist/ui/assets/{surrealql-CgloWqRa.js → surrealql-6YsE8HQa.js} +1 -1
- package/dist/ui/assets/{svelte-DcC3n6IC.js → svelte-YgzedwpD.js} +1 -1
- package/dist/ui/assets/{templ-DOFfnWTJ.js → templ-Bahqx3uD.js} +1 -1
- package/dist/ui/assets/{tex-ln89VPaX.js → tex-o6fTQjkH.js} +1 -1
- package/dist/ui/assets/{ts-tags-CWMzCstH.js → ts-tags-BO-Co0Ju.js} +1 -1
- package/dist/ui/assets/{tsx-DgzfiGeK.js → tsx-DtQe5AoH.js} +1 -1
- package/dist/ui/assets/{twig-Bi2itZL9.js → twig-BcUs6Kqc.js} +1 -1
- package/dist/ui/assets/{typescript-CQ24f4zW.js → typescript-BPtM8h4u.js} +1 -1
- package/dist/ui/assets/{vue-BS8jE5u6.js → vue-5KkGUzJJ.js} +1 -1
- package/dist/ui/assets/{vue-html-o38xqhyB.js → vue-html-Df_Xfsz9.js} +1 -1
- package/dist/ui/assets/{vue-vine-D2NvKv50.js → vue-vine-hUIe_u_Y.js} +1 -1
- package/dist/ui/assets/{xml-_44rx9_2.js → xml-C3Jy7as5.js} +1 -1
- package/dist/ui/assets/{xsl-B5QWQPoi.js → xsl-BnF9OuFo.js} +1 -1
- package/dist/ui/assets/{yaml-CKL2pEWe.js → yaml-DyrFgCou.js} +1 -1
- package/dist/workspaces/conversation-test-support.js +3 -11
- package/dist/workspaces/sessions.js +2 -0
- package/dist/workspaces/state/project-context.js +221 -0
- package/dist/workspaces.js +3 -1
- package/docs/chatgpt-coding-workflow.md +8 -3
- package/docs/configuration.md +99 -41
- package/docs/gotchas.md +24 -5
- package/docs/security.md +14 -3
- package/docs/setup.md +12 -7
- package/package.json +12 -3
- package/schemas/v1/config.project-local.schema.json +14 -0
- package/schemas/v1/config.project.schema.json +14 -0
- package/schemas/v1/config.user.schema.json +538 -0
- package/schemas/v1/hooks.project-local.schema.json +118 -0
- package/schemas/v1/hooks.project.schema.json +118 -0
- package/schemas/v1/hooks.user.schema.json +118 -0
- package/schemas/v1/language-servers.project-local.schema.json +230 -0
- package/schemas/v1/language-servers.project.schema.json +230 -0
- package/schemas/v1/language-servers.user.schema.json +230 -0
- package/schemas/v1/mcp.project-local.schema.json +143 -0
- package/schemas/v1/mcp.project.schema.json +143 -0
- package/schemas/v1/mcp.user.schema.json +143 -0
- package/scripts/ci/architecture.mjs +54 -4
- package/scripts/ci/cmd-acceptance.mjs +9 -9
- package/scripts/ci/config-v2-product-acceptance.mjs +639 -0
- package/scripts/ci/gates/acceptance-artifact.mjs +66 -0
- package/scripts/ci/gates/core-contract.mjs +27 -0
- package/scripts/ci/gates/platform-tests.mjs +38 -0
- package/scripts/ci/gates/prepare-windows-product.mjs +57 -0
- package/scripts/ci/gates/test-shard.mjs +71 -0
- package/scripts/ci/powershell51-acceptance.mjs +9 -9
- package/scripts/ci/pwsh-acceptance.mjs +9 -9
- package/scripts/ci/verify.mjs +2 -0
- package/scripts/ci/windows-product-acceptance.mjs +9 -10
- package/scripts/config/schema-text.mjs +4 -0
- package/scripts/config/schema-text.test.mjs +18 -0
- package/scripts/config/schema.mjs +74 -0
- package/scripts/lsp/interop.mjs +4 -1
- package/scripts/release/pack.mjs +64 -4
- package/scripts/release/release-gate.test.mjs +93 -27
- package/scripts/release-parity.mjs +19 -2
- package/templates/instructions/cmd.md +12 -0
- package/templates/instructions/fish.md +11 -0
- package/templates/instructions/powershell.md +14 -0
- package/templates/instructions/pwsh.md +14 -0
- package/templates/instructions/zsh.md +11 -0
- package/dist/runtime/instructions/powershell-skill.js +0 -65
|
@@ -9,11 +9,12 @@ const MAX_DIRECT_FILES = 8;
|
|
|
9
9
|
const MAX_DIRECT_DIRS = 8;
|
|
10
10
|
const LINE_LIMIT_EXTENSIONS = new Set([".ts", ".tsx", ".js", ".mjs", ".cjs", ".css"]);
|
|
11
11
|
|
|
12
|
-
//
|
|
13
|
-
// flat paths for release tooling and stable links. They
|
|
14
|
-
// other architecture checks, including code line limits
|
|
12
|
+
// Versioned public contract directories grow by design and must keep their
|
|
13
|
+
// canonical flat paths for release tooling, schema URLs, and stable links. They
|
|
14
|
+
// remain subject to all other architecture checks, including code line limits.
|
|
15
15
|
const DIRECT_FILE_LIMIT_EXEMPT_DIRS = new Set([
|
|
16
16
|
"docs/releases",
|
|
17
|
+
"schemas/v1",
|
|
17
18
|
]);
|
|
18
19
|
|
|
19
20
|
// Repository-root protocol files are intentionally discoverable by Git, npm,
|
|
@@ -70,6 +71,8 @@ for (const allowed of ROOT_PROTOCOL_FILES) {
|
|
|
70
71
|
// Presence is allowed, not required; this loop documents the intentional set.
|
|
71
72
|
}
|
|
72
73
|
|
|
74
|
+
checkConfigV2Contraction(violations);
|
|
75
|
+
|
|
73
76
|
const directories = new Set([...directFiles.keys(), ...directDirs.keys()]);
|
|
74
77
|
for (const directory of [...directories].sort()) {
|
|
75
78
|
const files = directFiles.get(directory) ?? 0;
|
|
@@ -77,7 +80,7 @@ for (const directory of [...directories].sort()) {
|
|
|
77
80
|
if (directory !== "." && !DIRECT_FILE_LIMIT_EXEMPT_DIRS.has(directory) && files > MAX_DIRECT_FILES) {
|
|
78
81
|
violations.push(`${directory}: ${files} direct files > ${MAX_DIRECT_FILES}`);
|
|
79
82
|
}
|
|
80
|
-
if (dirs > MAX_DIRECT_DIRS) {
|
|
83
|
+
if (directory !== "." && dirs > MAX_DIRECT_DIRS) {
|
|
81
84
|
violations.push(`${directory}: ${dirs} direct directories > ${MAX_DIRECT_DIRS}`);
|
|
82
85
|
}
|
|
83
86
|
}
|
|
@@ -105,6 +108,53 @@ function gitTrackedFiles() {
|
|
|
105
108
|
return result.stdout.split("\0").filter(Boolean);
|
|
106
109
|
}
|
|
107
110
|
|
|
111
|
+
function checkConfigV2Contraction(violations) {
|
|
112
|
+
const rules = [
|
|
113
|
+
{
|
|
114
|
+
path: "src/runtime/config/config.ts",
|
|
115
|
+
forbidden: [
|
|
116
|
+
/\bconfig\.(?:mcpServers|languageServers|hooks)\b/,
|
|
117
|
+
/\b(?:mcpServers|languageServers|hooks):\s*(?:ExternalMcpServersConfig|LanguageServerConfigInput|HookConfig)\b/,
|
|
118
|
+
/\b(?:parseExternalMcpServers|parseHookConfig|mergeHookConfigs)\b/,
|
|
119
|
+
/\bfiles\.hooks\b/,
|
|
120
|
+
],
|
|
121
|
+
reason: "ServerConfig must not materialize migrated domain snapshots outside Config System v2",
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
path: "src/cli/config/inspect.ts",
|
|
125
|
+
forbidden: [/\blegacyServers\s*:/, /\blegacyUser\s*:/, /\bparseHookConfig\b/, /\bmergeHookConfigs\b/],
|
|
126
|
+
reason: "config inspection must consume unified domain resolvers rather than rebuild legacy precedence",
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
path: "src/mcp/hooks/hook-cli.ts",
|
|
130
|
+
forbidden: [/\bloadForgeRelayFiles\b/, /\bparseHookConfig\b/, /\bmergeHookConfigs\b/],
|
|
131
|
+
reason: "Hook CLI must consume the unified Hook resolver rather than load legacy sources directly",
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
path: "src/lsp/runtime/manager.ts",
|
|
135
|
+
forbidden: [/\bglobalConfig\s*:/, /\bconfig\.languageServers\b/],
|
|
136
|
+
reason: "Language Server runtime must resolve configuration on demand through Config System v2",
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
path: "src/mcp/operations/external-mcp/external-mcp-runtime.ts",
|
|
140
|
+
forbidden: [/\blegacyServers\s*:/, /\bconfig\.mcpServers\b/],
|
|
141
|
+
reason: "External MCP runtime must resolve configuration on demand through Config System v2",
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
path: "src/runtime/config/inspection/live.ts",
|
|
145
|
+
forbidden: [/\blegacyServers\s*:/, /\blegacyUser\s*:/, /\bconfig\.(?:mcpServers|languageServers|hooks)\b/],
|
|
146
|
+
reason: "live diagnostics must consume unified domain resolvers rather than startup snapshots",
|
|
147
|
+
},
|
|
148
|
+
];
|
|
149
|
+
|
|
150
|
+
for (const rule of rules) {
|
|
151
|
+
const text = readFileSync(rule.path, "utf8");
|
|
152
|
+
for (const pattern of rule.forbidden) {
|
|
153
|
+
if (pattern.test(text)) violations.push(`${rule.path}: ${rule.reason} (${pattern})`);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
108
158
|
function normalizeDirectory(directory) {
|
|
109
159
|
return directory === "" ? "." : directory.replaceAll("\\", "/");
|
|
110
160
|
}
|
|
@@ -6,6 +6,7 @@ import { mkdtemp, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
|
6
6
|
import { tmpdir } from "node:os";
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
import { spawnSync } from "node:child_process";
|
|
9
|
+
import { resolveAcceptancePrefix, resolveAcceptanceTarball } from "./gates/acceptance-artifact.mjs";
|
|
9
10
|
|
|
10
11
|
if (process.platform !== "win32") {
|
|
11
12
|
console.log("cmd.exe packaged acceptance skipped outside Windows.");
|
|
@@ -181,7 +182,8 @@ async function exercisePtyLifecycle(runtime) {
|
|
|
181
182
|
|
|
182
183
|
async function exercisePackagedCmdShim(cmd) {
|
|
183
184
|
const artifactDir = join(root, "artifact");
|
|
184
|
-
const
|
|
185
|
+
const sharedPrefix = resolveAcceptancePrefix(process.cwd());
|
|
186
|
+
const prefix = sharedPrefix ?? join(root, "prefix");
|
|
185
187
|
const configDir = join(root, "config");
|
|
186
188
|
const stateDir = join(root, "state");
|
|
187
189
|
await Promise.all([
|
|
@@ -191,14 +193,12 @@ async function exercisePackagedCmdShim(cmd) {
|
|
|
191
193
|
mkdir(stateDir, { recursive: true }),
|
|
192
194
|
]);
|
|
193
195
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
runNpm(["install", "--global", "--prefix", prefix, tarball]);
|
|
196
|
+
if (!sharedPrefix) {
|
|
197
|
+
const tarball = resolveAcceptanceTarball({ repoRoot: process.cwd(), artifactDir, npmCli });
|
|
198
|
+
runNpm(["install", "--global", "--prefix", prefix, tarball]);
|
|
199
|
+
} else {
|
|
200
|
+
console.log(`Using prepared acceptance install: ${prefix}`);
|
|
201
|
+
}
|
|
202
202
|
const shim = join(prefix, "forgerelay.cmd");
|
|
203
203
|
assert.ok(existsSync(shim), `npm did not create the cmd launcher shim: ${shim}`);
|
|
204
204
|
|