@craft_eco/craft-mcp 0.1.29 → 0.1.30
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/README.md +10 -55
- package/bin/craft-mcp.mjs +4 -1
- package/dist-server/game-workflow/check.mjs +3 -2
- package/dist-server/game-workflow/context-state.mjs +67 -67
- package/dist-server/game-workflow/draft-archive.mjs +147 -2
- package/dist-server/game-workflow/draft-upload-identity.mjs +11 -0
- package/dist-server/game-workflow/draft-uploads.mjs +105 -60
- package/dist-server/game-workflow/local-context.mjs +62 -62
- package/dist-server/game-workflow/native-context.mjs +289 -289
- package/dist-server/game-workflow/project-bundles.mjs +246 -246
- package/dist-server/game-workflow/project-context.mjs +8 -8
- package/dist-server/game-workflow/projects.mjs +6 -4
- package/dist-server/game-workflow/tasks.mjs +1 -1
- package/dist-server/game-workflow/work-scope.mjs +7 -7
- package/dist-server/integrations/config.mjs +145 -145
- package/dist-server/integrations/connect.mjs +36 -0
- package/dist-server/integrations/connection-handoff.mjs +36 -42
- package/dist-server/integrations/dsh-config.mjs +182 -182
- package/dist-server/integrations/files.mjs +54 -54
- package/dist-server/integrations/fixed-launcher.mjs +31 -0
- package/dist-server/integrations/host-reload.mjs +19 -0
- package/dist-server/integrations/hosts.mjs +55 -55
- package/dist-server/integrations/install.mjs +223 -205
- package/dist-server/integrations/installation-state.mjs +84 -84
- package/dist-server/integrations/launcher-start.mjs +52 -0
- package/dist-server/integrations/npm-diagnostics.mjs +32 -0
- package/dist-server/integrations/runtime-gc.mjs +191 -188
- package/dist-server/integrations/runtime-identity.mjs +22 -0
- package/dist-server/integrations/runtime.mjs +111 -126
- package/dist-server/integrations/updates.mjs +258 -225
- package/dist-server/integrations/version-policy.mjs +32 -32
- package/dist-server/launcher.mjs +1845 -0
- package/dist-server/mcp/control-panel.mjs +8 -23
- package/dist-server/mcp/server.mjs +31 -80
- package/dist-server/mcp/update-session.mjs +107 -92
- package/dist-server/upstream/craft-aigc.mjs +43 -16
- package/dist-server/upstream/draft-source.mjs +29 -0
- package/package.json +3 -2
- package/resources/context-filter-report.json +1 -1
- package/resources/craft-create/SKILL.md +19 -19
- package/resources/craft-update/SKILL.md +9 -11
- package/resources/targets/claude/js/bootstrap/SKILL.md +3 -1
- package/resources/targets/claude/js/context-filter-report.json +1 -1
- package/resources/targets/claude/js/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/claude/js/js/bundle.json +7 -7
- package/resources/targets/claude/js/recovery.md +5 -1
- package/resources/targets/claude/js/target.json +1 -1
- package/resources/targets/claude/js3d/bootstrap/SKILL.md +3 -1
- package/resources/targets/claude/js3d/context-filter-report.json +1 -1
- package/resources/targets/claude/js3d/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/claude/js3d/js3d/bundle.json +7 -7
- package/resources/targets/claude/js3d/recovery.md +5 -1
- package/resources/targets/claude/js3d/target.json +1 -1
- package/resources/targets/codebuddy/js/bootstrap/SKILL.md +3 -1
- package/resources/targets/codebuddy/js/context-filter-report.json +1 -1
- package/resources/targets/codebuddy/js/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/codebuddy/js/js/bundle.json +7 -7
- package/resources/targets/codebuddy/js/recovery.md +5 -1
- package/resources/targets/codebuddy/js/target.json +1 -1
- package/resources/targets/codebuddy/js3d/bootstrap/SKILL.md +3 -1
- package/resources/targets/codebuddy/js3d/context-filter-report.json +1 -1
- package/resources/targets/codebuddy/js3d/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/codebuddy/js3d/js3d/bundle.json +7 -7
- package/resources/targets/codebuddy/js3d/recovery.md +5 -1
- package/resources/targets/codebuddy/js3d/target.json +1 -1
- package/resources/targets/codex/js/bootstrap/SKILL.md +2 -4
- package/resources/targets/codex/js/context-filter-report.json +1 -1
- package/resources/targets/codex/js/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/codex/js/js/bundle.json +7 -7
- package/resources/targets/codex/js/recovery.md +3 -3
- package/resources/targets/codex/js/target.json +1 -1
- package/resources/targets/codex/js3d/bootstrap/SKILL.md +2 -4
- package/resources/targets/codex/js3d/context-filter-report.json +1 -1
- package/resources/targets/codex/js3d/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/codex/js3d/js3d/bundle.json +7 -7
- package/resources/targets/codex/js3d/recovery.md +3 -3
- package/resources/targets/codex/js3d/target.json +1 -1
- package/resources/targets/cursor/js/bootstrap/SKILL.md +3 -1
- package/resources/targets/cursor/js/context-filter-report.json +1 -1
- package/resources/targets/cursor/js/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/cursor/js/js/bundle.json +7 -7
- package/resources/targets/cursor/js/recovery.md +5 -1
- package/resources/targets/cursor/js/target.json +1 -1
- package/resources/targets/cursor/js3d/bootstrap/SKILL.md +3 -1
- package/resources/targets/cursor/js3d/context-filter-report.json +1 -1
- package/resources/targets/cursor/js3d/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/cursor/js3d/js3d/bundle.json +7 -7
- package/resources/targets/cursor/js3d/recovery.md +5 -1
- package/resources/targets/cursor/js3d/target.json +1 -1
- package/resources/targets/dsh/js/bootstrap/SKILL.md +3 -1
- package/resources/targets/dsh/js/context-filter-report.json +1 -1
- package/resources/targets/dsh/js/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/dsh/js/js/bundle.json +7 -7
- package/resources/targets/dsh/js/recovery.md +5 -1
- package/resources/targets/dsh/js/target.json +1 -1
- package/resources/targets/dsh/js3d/bootstrap/SKILL.md +3 -1
- package/resources/targets/dsh/js3d/context-filter-report.json +1 -1
- package/resources/targets/dsh/js3d/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/dsh/js3d/js3d/bundle.json +7 -7
- package/resources/targets/dsh/js3d/recovery.md +5 -1
- package/resources/targets/dsh/js3d/target.json +1 -1
- package/resources/targets/index.json +32 -32
- package/resources/targets/kimi/js/bootstrap/SKILL.md +3 -1
- package/resources/targets/kimi/js/context-filter-report.json +1 -1
- package/resources/targets/kimi/js/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/kimi/js/js/bundle.json +7 -7
- package/resources/targets/kimi/js/recovery.md +5 -1
- package/resources/targets/kimi/js/target.json +1 -1
- package/resources/targets/kimi/js3d/bootstrap/SKILL.md +3 -1
- package/resources/targets/kimi/js3d/context-filter-report.json +1 -1
- package/resources/targets/kimi/js3d/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/kimi/js3d/js3d/bundle.json +7 -7
- package/resources/targets/kimi/js3d/recovery.md +5 -1
- package/resources/targets/kimi/js3d/target.json +1 -1
- package/resources/targets/workbuddy/js/bootstrap/SKILL.md +22 -24
- package/resources/targets/workbuddy/js/context-filter-report.json +1 -1
- package/resources/targets/workbuddy/js/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/workbuddy/js/js/bundle.json +8 -8
- package/resources/targets/workbuddy/js/js/context/AGENTS.md +29 -29
- package/resources/targets/workbuddy/js/recovery.md +19 -19
- package/resources/targets/workbuddy/js/target.json +1 -1
- package/resources/targets/workbuddy/js3d/bootstrap/SKILL.md +22 -24
- package/resources/targets/workbuddy/js3d/context-filter-report.json +1 -1
- package/resources/targets/workbuddy/js3d/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/workbuddy/js3d/js3d/bundle.json +8 -8
- package/resources/targets/workbuddy/js3d/js3d/context/AGENTS.md +30 -30
- package/resources/targets/workbuddy/js3d/recovery.md +19 -19
- package/resources/targets/workbuddy/js3d/target.json +1 -1
- package/resources/targets/zcode/js/bootstrap/SKILL.md +3 -1
- package/resources/targets/zcode/js/context-filter-report.json +1 -1
- package/resources/targets/zcode/js/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/zcode/js/js/bundle.json +7 -7
- package/resources/targets/zcode/js/recovery.md +5 -1
- package/resources/targets/zcode/js/target.json +1 -1
- package/resources/targets/zcode/js3d/bootstrap/SKILL.md +3 -1
- package/resources/targets/zcode/js3d/context-filter-report.json +1 -1
- package/resources/targets/zcode/js3d/craft-game-maker/SKILL.md +11 -15
- package/resources/targets/zcode/js3d/js3d/bundle.json +7 -7
- package/resources/targets/zcode/js3d/recovery.md +5 -1
- package/resources/targets/zcode/js3d/target.json +1 -1
- package/vendor/craft-runtime/SOURCE.json +4 -4
- package/vendor/craft-runtime/package.json +1 -1
- package/dist-server/game-workflow/publication-materials.mjs +0 -92
- package/dist-server/game-workflow/publications.mjs +0 -168
- package/dist-server/game-workflow/publish-capture-worker.mjs +0 -57
- package/dist-server/game-workflow/publish-capture.mjs +0 -75
- package/dist-server/mcp/publication-page.html +0 -86
- package/dist-server/mcp/publication-page.mjs +0 -375
- package/dist-server/mcp/publication-preview.mjs +0 -63
- package/dist-server/mcp/publication-tools.mjs +0 -22
- package/dist-server/mcp/publish-panel.mjs +0 -210
- package/dist-server/upstream/publication-transport.mjs +0 -101
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import path from 'node:path';
|
|
2
|
-
import { existsSync } from 'node:fs';
|
|
3
|
-
|
|
4
|
-
export const hosts = Object.freeze({
|
|
5
|
-
codex: { label: 'Codex', config: '.codex/config.toml', skills: '.agents/skills', projectSkills: '.agents/skills', format: 'toml' },
|
|
6
|
-
workbuddy: { label: 'WorkBuddy', config: '.workbuddy/mcp.json', skills: '.workbuddy/skills', projectSkills: '.workbuddy/skills', format: 'json' },
|
|
7
|
-
codebuddy: { label: 'CodeBuddy', config: '.codebuddy/.mcp.json', skills: '.codebuddy/skills', projectSkills: '.codebuddy/skills', format: 'json' },
|
|
8
|
-
cursor: { label: 'Cursor', config: '.cursor/mcp.json', skills: '.cursor/skills', projectSkills: '.cursor/skills', format: 'json' },
|
|
9
|
-
claude: { label: 'Claude Code', config: '.claude.json', skills: '.claude/skills', projectSkills: '.claude/skills', format: 'json' },
|
|
10
|
-
dsh: { label: 'DSH', config: '.dsh/cordis.patch.yml', skills: '.dsh/skills', projectSkills: '.dsh/skills', format: 'yaml' },
|
|
11
|
-
zcode: { label: 'ZCode', config: '.zcode/cli/config.json', skills: '.zcode/skills', projectSkills: '.zcode/skills', format: 'json' },
|
|
12
|
-
kimi: { label: 'Kimi Code', config: '.kimi-code/mcp.json', skills: '.kimi-code/skills', projectSkills: '.kimi-code/skills', format: 'json' },
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export function clientIde(value) {
|
|
16
|
-
if (value === undefined || value === '' || value === 'generic') return 'generic';
|
|
17
|
-
if (!Object.hasOwn(hosts, value)) throw new Error('Unsupported Craft IDE: ' + value);
|
|
18
|
-
return value;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export function installTargets(value) {
|
|
22
|
-
const targets = value?.split(',');
|
|
23
|
-
if (!targets?.length || targets.some(ide => !Object.hasOwn(hosts, ide))) throw new Error('--ide must explicitly select ' + Object.keys(hosts).join(', ') + ', or a comma-separated combination');
|
|
24
|
-
return [...new Set(targets)];
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export function hostEnvironment(env = process.env) {
|
|
28
|
-
return { claudeConfigDir: env.CLAUDE_CONFIG_DIR, dshHome: env.DSH_HOME, kimiCodeHome: env.KIMI_CODE_HOME };
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export function hostPaths(home, ide, codexHome, options = {}) {
|
|
32
|
-
const host = hosts[clientIde(ide)];
|
|
33
|
-
if (!host) throw new Error('Select a host before installing');
|
|
34
|
-
if (codexHome && !path.isAbsolute(codexHome)) throw new Error('CODEX_HOME must be absolute');
|
|
35
|
-
let override = ide === 'claude' ? options.claudeConfigDir : ide === 'dsh' ? options.dshHome : ide === 'kimi' ? options.kimiCodeHome : undefined;
|
|
36
|
-
if (ide === 'dsh' && typeof override === 'string') {
|
|
37
|
-
override = override.trim();
|
|
38
|
-
if (override === '~') override = home;
|
|
39
|
-
else if (/^~[\\/]/.test(override)) override = path.resolve(home, override.slice(2));
|
|
40
|
-
}
|
|
41
|
-
if (override && !path.isAbsolute(override)) throw new Error(({ claude: 'CLAUDE_CONFIG_DIR', dsh: 'DSH_HOME', kimi: 'KIMI_CODE_HOME' })[ide] + ' must be absolute');
|
|
42
|
-
const skillsRoot = override ? path.join(override, 'skills') : path.join(home, host.skills);
|
|
43
|
-
const config = ide === 'codebuddy'
|
|
44
|
-
? ['.codebuddy/.mcp.json','.codebuddy/mcp.json','.codebuddy.json'].map(file=>path.join(home,file)).find(file=>existsSync(file)) ?? path.join(home,host.config)
|
|
45
|
-
: ide === 'codex' && codexHome ? path.join(codexHome,'config.toml')
|
|
46
|
-
: override ? path.join(override, ({ claude: '.claude.json', dsh: 'cordis.patch.yml', kimi: 'mcp.json' })[ide]) : path.join(home,host.config);
|
|
47
|
-
return { config, skill: path.join(skillsRoot, 'craft-create', 'SKILL.md'), updateSkill: path.join(skillsRoot, 'craft-update', 'SKILL.md'),
|
|
48
|
-
...(ide === 'zcode' ? { fallbackConfig: path.join(home, '.agents/mcp.json') } : {}),
|
|
49
|
-
...(ide === 'dsh' ? { dshHome: override || path.join(home, '.dsh') } : {}) };
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export function projectSkillPath(ide) {
|
|
53
|
-
const host = hosts[clientIde(ide)];
|
|
54
|
-
return host ? host.projectSkills + '/craft-project/SKILL.md' : null;
|
|
55
|
-
}
|
|
1
|
+
import path from 'node:path';
|
|
2
|
+
import { existsSync } from 'node:fs';
|
|
3
|
+
|
|
4
|
+
export const hosts = Object.freeze({
|
|
5
|
+
codex: { label: 'Codex', config: '.codex/config.toml', skills: '.agents/skills', projectSkills: '.agents/skills', format: 'toml' },
|
|
6
|
+
workbuddy: { label: 'WorkBuddy', config: '.workbuddy/mcp.json', skills: '.workbuddy/skills', projectSkills: '.workbuddy/skills', format: 'json' },
|
|
7
|
+
codebuddy: { label: 'CodeBuddy', config: '.codebuddy/.mcp.json', skills: '.codebuddy/skills', projectSkills: '.codebuddy/skills', format: 'json' },
|
|
8
|
+
cursor: { label: 'Cursor', config: '.cursor/mcp.json', skills: '.cursor/skills', projectSkills: '.cursor/skills', format: 'json' },
|
|
9
|
+
claude: { label: 'Claude Code', config: '.claude.json', skills: '.claude/skills', projectSkills: '.claude/skills', format: 'json' },
|
|
10
|
+
dsh: { label: 'DSH', config: '.dsh/cordis.patch.yml', skills: '.dsh/skills', projectSkills: '.dsh/skills', format: 'yaml' },
|
|
11
|
+
zcode: { label: 'ZCode', config: '.zcode/cli/config.json', skills: '.zcode/skills', projectSkills: '.zcode/skills', format: 'json' },
|
|
12
|
+
kimi: { label: 'Kimi Code', config: '.kimi-code/mcp.json', skills: '.kimi-code/skills', projectSkills: '.kimi-code/skills', format: 'json' },
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export function clientIde(value) {
|
|
16
|
+
if (value === undefined || value === '' || value === 'generic') return 'generic';
|
|
17
|
+
if (!Object.hasOwn(hosts, value)) throw new Error('Unsupported Craft IDE: ' + value);
|
|
18
|
+
return value;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function installTargets(value) {
|
|
22
|
+
const targets = value?.split(',');
|
|
23
|
+
if (!targets?.length || targets.some(ide => !Object.hasOwn(hosts, ide))) throw new Error('--ide must explicitly select ' + Object.keys(hosts).join(', ') + ', or a comma-separated combination');
|
|
24
|
+
return [...new Set(targets)];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function hostEnvironment(env = process.env) {
|
|
28
|
+
return { claudeConfigDir: env.CLAUDE_CONFIG_DIR, dshHome: env.DSH_HOME, kimiCodeHome: env.KIMI_CODE_HOME };
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function hostPaths(home, ide, codexHome, options = {}) {
|
|
32
|
+
const host = hosts[clientIde(ide)];
|
|
33
|
+
if (!host) throw new Error('Select a host before installing');
|
|
34
|
+
if (codexHome && !path.isAbsolute(codexHome)) throw new Error('CODEX_HOME must be absolute');
|
|
35
|
+
let override = ide === 'claude' ? options.claudeConfigDir : ide === 'dsh' ? options.dshHome : ide === 'kimi' ? options.kimiCodeHome : undefined;
|
|
36
|
+
if (ide === 'dsh' && typeof override === 'string') {
|
|
37
|
+
override = override.trim();
|
|
38
|
+
if (override === '~') override = home;
|
|
39
|
+
else if (/^~[\\/]/.test(override)) override = path.resolve(home, override.slice(2));
|
|
40
|
+
}
|
|
41
|
+
if (override && !path.isAbsolute(override)) throw new Error(({ claude: 'CLAUDE_CONFIG_DIR', dsh: 'DSH_HOME', kimi: 'KIMI_CODE_HOME' })[ide] + ' must be absolute');
|
|
42
|
+
const skillsRoot = override ? path.join(override, 'skills') : path.join(home, host.skills);
|
|
43
|
+
const config = ide === 'codebuddy'
|
|
44
|
+
? ['.codebuddy/.mcp.json','.codebuddy/mcp.json','.codebuddy.json'].map(file=>path.join(home,file)).find(file=>existsSync(file)) ?? path.join(home,host.config)
|
|
45
|
+
: ide === 'codex' && codexHome ? path.join(codexHome,'config.toml')
|
|
46
|
+
: override ? path.join(override, ({ claude: '.claude.json', dsh: 'cordis.patch.yml', kimi: 'mcp.json' })[ide]) : path.join(home,host.config);
|
|
47
|
+
return { config, skill: path.join(skillsRoot, 'craft-create', 'SKILL.md'), updateSkill: path.join(skillsRoot, 'craft-update', 'SKILL.md'),
|
|
48
|
+
...(ide === 'zcode' ? { fallbackConfig: path.join(home, '.agents/mcp.json') } : {}),
|
|
49
|
+
...(ide === 'dsh' ? { dshHome: override || path.join(home, '.dsh') } : {}) };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function projectSkillPath(ide) {
|
|
53
|
+
const host = hosts[clientIde(ide)];
|
|
54
|
+
return host ? host.projectSkills + '/craft-project/SKILL.md' : null;
|
|
55
|
+
}
|