maxsimcli 3.11.0 → 4.0.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/dist/.tsbuildinfo +1 -1
- package/dist/adapters/index.d.ts +0 -11
- package/dist/adapters/index.d.ts.map +1 -1
- package/dist/adapters/index.js +4 -40
- package/dist/adapters/index.js.map +1 -1
- package/dist/assets/CHANGELOG.md +36 -0
- package/dist/assets/dashboard/client/assets/{index-CZ8WC97G.js → index-C_eAetZJ.js} +66 -66
- package/dist/assets/dashboard/client/assets/index-CmiJKqOU.css +32 -0
- package/dist/assets/dashboard/client/index.html +2 -2
- package/dist/assets/dashboard/server.js +467 -271
- package/dist/assets/templates/agents/AGENTS.md +94 -0
- package/dist/assets/templates/agents/maxsim-debugger.md +2 -2
- package/dist/assets/templates/agents/maxsim-executor.md +5 -5
- package/dist/assets/templates/agents/maxsim-phase-researcher.md +2 -2
- package/dist/assets/templates/agents/maxsim-plan-checker.md +2 -2
- package/dist/assets/templates/agents/maxsim-planner.md +3 -3
- package/dist/assets/templates/commands/maxsim/add-todo.md +15 -5
- package/dist/assets/templates/commands/maxsim/discuss-phase.md +1 -0
- package/dist/assets/templates/commands/maxsim/init-existing.md +4 -0
- package/dist/assets/templates/commands/maxsim/new-project.md +4 -0
- package/dist/assets/templates/commands/maxsim/settings.md +1 -1
- package/dist/assets/templates/references/thinking-partner.md +41 -0
- package/dist/assets/templates/skills/batch-worktree/SKILL.md +137 -0
- package/dist/assets/templates/skills/brainstorming/SKILL.md +159 -0
- package/dist/assets/templates/skills/code-review/SKILL.md +151 -0
- package/dist/assets/templates/skills/memory-management/SKILL.md +174 -0
- package/dist/assets/templates/skills/roadmap-writing/SKILL.md +198 -0
- package/dist/assets/templates/skills/sdd/SKILL.md +175 -0
- package/dist/assets/templates/skills/simplify/SKILL.md +185 -0
- package/dist/assets/templates/skills/using-maxsim/SKILL.md +120 -0
- package/dist/assets/templates/templates/acceptance-criteria.md +10 -0
- package/dist/assets/templates/templates/config.json +1 -1
- package/dist/assets/templates/templates/decisions.md +10 -0
- package/dist/assets/templates/templates/no-gos.md +9 -0
- package/dist/assets/templates/workflows/add-tests.md +3 -3
- package/dist/assets/templates/workflows/add-todo.md +89 -0
- package/dist/assets/templates/workflows/complete-milestone.md +1 -1
- package/dist/assets/templates/workflows/discuss-phase.md +85 -1
- package/dist/assets/templates/workflows/execute-phase.md +26 -16
- package/dist/assets/templates/workflows/execute-plan.md +166 -0
- package/dist/assets/templates/workflows/init-existing.md +123 -3
- package/dist/assets/templates/workflows/new-milestone.md +4 -0
- package/dist/assets/templates/workflows/new-project.md +111 -3
- package/dist/assets/templates/workflows/plan-phase.md +5 -5
- package/dist/assets/templates/workflows/quick.md +2 -2
- package/dist/assets/templates/workflows/settings.md +8 -4
- package/dist/assets/templates/workflows/verify-work.md +1 -1
- package/dist/cli.cjs +1512 -1026
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +170 -278
- package/dist/cli.js.map +1 -1
- package/dist/core/artefakte.d.ts +12 -0
- package/dist/core/artefakte.d.ts.map +1 -0
- package/dist/core/artefakte.js +136 -0
- package/dist/core/artefakte.js.map +1 -0
- package/dist/core/commands.d.ts +13 -13
- package/dist/core/commands.d.ts.map +1 -1
- package/dist/core/commands.js +48 -58
- package/dist/core/commands.js.map +1 -1
- package/dist/core/config.d.ts +4 -3
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/config.js +14 -18
- package/dist/core/config.js.map +1 -1
- package/dist/core/context-loader.d.ts +20 -0
- package/dist/core/context-loader.d.ts.map +1 -0
- package/dist/core/context-loader.js +154 -0
- package/dist/core/context-loader.js.map +1 -0
- package/dist/core/core.d.ts +26 -2
- package/dist/core/core.d.ts.map +1 -1
- package/dist/core/core.js +90 -24
- package/dist/core/core.js.map +1 -1
- package/dist/core/dashboard-launcher.d.ts +56 -0
- package/dist/core/dashboard-launcher.d.ts.map +1 -0
- package/dist/core/dashboard-launcher.js +246 -0
- package/dist/core/dashboard-launcher.js.map +1 -0
- package/dist/core/frontmatter.d.ts +5 -5
- package/dist/core/frontmatter.d.ts.map +1 -1
- package/dist/core/frontmatter.js +21 -26
- package/dist/core/frontmatter.js.map +1 -1
- package/dist/core/index.d.ts +10 -3
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +40 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/init.d.ts +14 -15
- package/dist/core/init.d.ts.map +1 -1
- package/dist/core/init.js +93 -155
- package/dist/core/init.js.map +1 -1
- package/dist/core/milestone.d.ts +3 -3
- package/dist/core/milestone.d.ts.map +1 -1
- package/dist/core/milestone.js +9 -9
- package/dist/core/milestone.js.map +1 -1
- package/dist/core/phase.d.ts +9 -9
- package/dist/core/phase.d.ts.map +1 -1
- package/dist/core/phase.js +65 -63
- package/dist/core/phase.js.map +1 -1
- package/dist/core/roadmap.d.ts +4 -3
- package/dist/core/roadmap.d.ts.map +1 -1
- package/dist/core/roadmap.js +46 -108
- package/dist/core/roadmap.js.map +1 -1
- package/dist/core/skills.d.ts +19 -0
- package/dist/core/skills.d.ts.map +1 -0
- package/dist/core/skills.js +145 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/core/start.d.ts +15 -0
- package/dist/core/start.d.ts.map +1 -0
- package/dist/core/start.js +80 -0
- package/dist/core/start.js.map +1 -0
- package/dist/core/state.d.ts +13 -13
- package/dist/core/state.d.ts.map +1 -1
- package/dist/core/state.js +125 -130
- package/dist/core/state.js.map +1 -1
- package/dist/core/template.d.ts +3 -3
- package/dist/core/template.d.ts.map +1 -1
- package/dist/core/template.js +12 -14
- package/dist/core/template.js.map +1 -1
- package/dist/core/types.d.ts +15 -4
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +9 -2
- package/dist/core/types.js.map +1 -1
- package/dist/core/verify.d.ts +10 -9
- package/dist/core/verify.d.ts.map +1 -1
- package/dist/core/verify.js +38 -48
- package/dist/core/verify.js.map +1 -1
- package/dist/core-TFSlUjV1.cjs +4312 -0
- package/dist/core-TFSlUjV1.cjs.map +1 -0
- package/dist/install/adapters.d.ts +6 -0
- package/dist/install/adapters.d.ts.map +1 -0
- package/dist/install/adapters.js +65 -0
- package/dist/install/adapters.js.map +1 -0
- package/dist/install/copy.d.ts +6 -0
- package/dist/install/copy.d.ts.map +1 -0
- package/dist/install/copy.js +71 -0
- package/dist/install/copy.js.map +1 -0
- package/dist/install/dashboard.d.ts +16 -0
- package/dist/install/dashboard.d.ts.map +1 -0
- package/dist/install/dashboard.js +273 -0
- package/dist/install/dashboard.js.map +1 -0
- package/dist/install/hooks.d.ts +31 -0
- package/dist/install/hooks.d.ts.map +1 -0
- package/dist/install/hooks.js +260 -0
- package/dist/install/hooks.js.map +1 -0
- package/dist/install/index.d.ts +2 -0
- package/dist/install/index.d.ts.map +1 -0
- package/dist/install/index.js +535 -0
- package/dist/install/index.js.map +1 -0
- package/dist/install/manifest.d.ts +23 -0
- package/dist/install/manifest.d.ts.map +1 -0
- package/dist/install/manifest.js +129 -0
- package/dist/install/manifest.js.map +1 -0
- package/dist/install/patches.d.ts +10 -0
- package/dist/install/patches.d.ts.map +1 -0
- package/dist/install/patches.js +124 -0
- package/dist/install/patches.js.map +1 -0
- package/dist/install/shared.d.ts +56 -0
- package/dist/install/shared.d.ts.map +1 -0
- package/dist/install/shared.js +172 -0
- package/dist/install/shared.js.map +1 -0
- package/dist/install/uninstall.d.ts +5 -0
- package/dist/install/uninstall.d.ts.map +1 -0
- package/dist/install/uninstall.js +222 -0
- package/dist/install/uninstall.js.map +1 -0
- package/dist/install.cjs +793 -1648
- package/dist/install.cjs.map +1 -1
- package/dist/mcp-server.cjs +38 -14
- package/dist/mcp-server.cjs.map +1 -1
- package/dist/skills-BOSxYUzf.cjs +6812 -0
- package/dist/skills-BOSxYUzf.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/adapters/codex.d.ts +0 -19
- package/dist/adapters/codex.d.ts.map +0 -1
- package/dist/adapters/codex.js +0 -94
- package/dist/adapters/codex.js.map +0 -1
- package/dist/adapters/gemini.d.ts +0 -19
- package/dist/adapters/gemini.d.ts.map +0 -1
- package/dist/adapters/gemini.js +0 -96
- package/dist/adapters/gemini.js.map +0 -1
- package/dist/adapters/opencode.d.ts +0 -17
- package/dist/adapters/opencode.d.ts.map +0 -1
- package/dist/adapters/opencode.js +0 -111
- package/dist/adapters/opencode.js.map +0 -1
- package/dist/adapters/transforms/content.d.ts +0 -39
- package/dist/adapters/transforms/content.d.ts.map +0 -1
- package/dist/adapters/transforms/content.js +0 -125
- package/dist/adapters/transforms/content.js.map +0 -1
- package/dist/adapters/transforms/frontmatter.d.ts +0 -42
- package/dist/adapters/transforms/frontmatter.d.ts.map +0 -1
- package/dist/adapters/transforms/frontmatter.js +0 -204
- package/dist/adapters/transforms/frontmatter.js.map +0 -1
- package/dist/adapters/transforms/tool-maps.d.ts +0 -20
- package/dist/adapters/transforms/tool-maps.d.ts.map +0 -1
- package/dist/adapters/transforms/tool-maps.js +0 -64
- package/dist/adapters/transforms/tool-maps.js.map +0 -1
- package/dist/assets/dashboard/client/assets/index-DzJChB-D.css +0 -32
- package/dist/install.d.ts +0 -2
- package/dist/install.d.ts.map +0 -1
- package/dist/install.js +0 -1841
- package/dist/install.js.map +0 -1
package/package.json
CHANGED
package/dist/adapters/codex.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @maxsim/adapters — Codex adapter
|
|
3
|
-
*
|
|
4
|
-
* Ports the Codex-specific logic from bin/install.js:
|
|
5
|
-
* - getGlobalDir('codex', ...) (lines 124-133)
|
|
6
|
-
* - getDirName('codex') (line 48)
|
|
7
|
-
* - getConfigDirFromHome('codex', isGlobal) (line 70)
|
|
8
|
-
* - convertClaudeCommandToCodexSkill + convertClaudeToCodexMarkdown
|
|
9
|
-
*/
|
|
10
|
-
import type { AdapterConfig } from '../core/index.js';
|
|
11
|
-
import { convertClaudeCommandToCodexSkill } from './transforms/frontmatter.js';
|
|
12
|
-
import { convertClaudeToCodexMarkdown } from './transforms/content.js';
|
|
13
|
-
/**
|
|
14
|
-
* Codex adapter configuration.
|
|
15
|
-
* Codex uses skill-based command structure (skills/maxsim-star/SKILL.md).
|
|
16
|
-
*/
|
|
17
|
-
export declare const codexAdapter: AdapterConfig;
|
|
18
|
-
export { convertClaudeCommandToCodexSkill, convertClaudeToCodexMarkdown };
|
|
19
|
-
//# sourceMappingURL=codex.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/adapters/codex.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,gCAAgC,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EACL,4BAA4B,EAE7B,MAAM,yBAAyB,CAAC;AAkCjC;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,aAO1B,CAAC;AAGF,OAAO,EAAE,gCAAgC,EAAE,4BAA4B,EAAE,CAAC"}
|
package/dist/adapters/codex.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @maxsim/adapters — Codex adapter
|
|
4
|
-
*
|
|
5
|
-
* Ports the Codex-specific logic from bin/install.js:
|
|
6
|
-
* - getGlobalDir('codex', ...) (lines 124-133)
|
|
7
|
-
* - getDirName('codex') (line 48)
|
|
8
|
-
* - getConfigDirFromHome('codex', isGlobal) (line 70)
|
|
9
|
-
* - convertClaudeCommandToCodexSkill + convertClaudeToCodexMarkdown
|
|
10
|
-
*/
|
|
11
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
15
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
16
|
-
}
|
|
17
|
-
Object.defineProperty(o, k2, desc);
|
|
18
|
-
}) : (function(o, m, k, k2) {
|
|
19
|
-
if (k2 === undefined) k2 = k;
|
|
20
|
-
o[k2] = m[k];
|
|
21
|
-
}));
|
|
22
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
23
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
24
|
-
}) : function(o, v) {
|
|
25
|
-
o["default"] = v;
|
|
26
|
-
});
|
|
27
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
28
|
-
var ownKeys = function(o) {
|
|
29
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
30
|
-
var ar = [];
|
|
31
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
32
|
-
return ar;
|
|
33
|
-
};
|
|
34
|
-
return ownKeys(o);
|
|
35
|
-
};
|
|
36
|
-
return function (mod) {
|
|
37
|
-
if (mod && mod.__esModule) return mod;
|
|
38
|
-
var result = {};
|
|
39
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
40
|
-
__setModuleDefault(result, mod);
|
|
41
|
-
return result;
|
|
42
|
-
};
|
|
43
|
-
})();
|
|
44
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
-
exports.convertClaudeToCodexMarkdown = exports.convertClaudeCommandToCodexSkill = exports.codexAdapter = void 0;
|
|
46
|
-
const path = __importStar(require("node:path"));
|
|
47
|
-
const os = __importStar(require("node:os"));
|
|
48
|
-
const base_js_1 = require("./base.js");
|
|
49
|
-
const frontmatter_js_1 = require("./transforms/frontmatter.js");
|
|
50
|
-
Object.defineProperty(exports, "convertClaudeCommandToCodexSkill", { enumerable: true, get: function () { return frontmatter_js_1.convertClaudeCommandToCodexSkill; } });
|
|
51
|
-
const content_js_1 = require("./transforms/content.js");
|
|
52
|
-
Object.defineProperty(exports, "convertClaudeToCodexMarkdown", { enumerable: true, get: function () { return content_js_1.convertClaudeToCodexMarkdown; } });
|
|
53
|
-
/**
|
|
54
|
-
* Get the global config directory for Codex.
|
|
55
|
-
* Priority: explicitDir > CODEX_HOME env > ~/.codex
|
|
56
|
-
*/
|
|
57
|
-
function getGlobalDir(explicitDir) {
|
|
58
|
-
if (explicitDir) {
|
|
59
|
-
return (0, base_js_1.expandTilde)(explicitDir);
|
|
60
|
-
}
|
|
61
|
-
if (process.env.CODEX_HOME) {
|
|
62
|
-
return (0, base_js_1.expandTilde)(process.env.CODEX_HOME);
|
|
63
|
-
}
|
|
64
|
-
return path.join(os.homedir(), '.codex');
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Get the config directory path relative to home for hook templating.
|
|
68
|
-
*/
|
|
69
|
-
function getConfigDirFromHome(_isGlobal) {
|
|
70
|
-
return "'.codex'";
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Transform markdown content for Codex installation.
|
|
74
|
-
* Applies Codex markdown conversion and path replacement.
|
|
75
|
-
*/
|
|
76
|
-
function transformContent(content, pathPrefix) {
|
|
77
|
-
let result = (0, content_js_1.replacePathReferences)(content, pathPrefix, '.codex');
|
|
78
|
-
result = result.replace(/~\/\.codex\//g, pathPrefix);
|
|
79
|
-
result = (0, frontmatter_js_1.convertClaudeCommandToCodexSkill)(result);
|
|
80
|
-
return result;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Codex adapter configuration.
|
|
84
|
-
* Codex uses skill-based command structure (skills/maxsim-star/SKILL.md).
|
|
85
|
-
*/
|
|
86
|
-
exports.codexAdapter = {
|
|
87
|
-
runtime: 'codex',
|
|
88
|
-
dirName: '.codex',
|
|
89
|
-
getGlobalDir,
|
|
90
|
-
getConfigDirFromHome,
|
|
91
|
-
transformContent,
|
|
92
|
-
commandStructure: 'skills',
|
|
93
|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B,gBAAgB;IAChB,gBAAgB,EAAE,QAAQ;CAC3B,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @maxsim/adapters — Gemini adapter
|
|
3
|
-
*
|
|
4
|
-
* Ports the Gemini-specific logic from bin/install.js:
|
|
5
|
-
* - getGlobalDir('gemini', ...) (lines 113-122)
|
|
6
|
-
* - getDirName('gemini') (line 47)
|
|
7
|
-
* - getConfigDirFromHome('gemini', isGlobal) (line 69)
|
|
8
|
-
* - convertClaudeToGeminiToml + convertClaudeToGeminiAgent + stripSubTags
|
|
9
|
-
*/
|
|
10
|
-
import type { AdapterConfig } from '../core/index.js';
|
|
11
|
-
import { convertClaudeToGeminiToml } from './transforms/frontmatter.js';
|
|
12
|
-
import { convertClaudeToGeminiAgent, stripSubTags } from './transforms/content.js';
|
|
13
|
-
/**
|
|
14
|
-
* Gemini adapter configuration.
|
|
15
|
-
* Gemini uses nested command structure (commands/maxsim/*.toml).
|
|
16
|
-
*/
|
|
17
|
-
export declare const geminiAdapter: AdapterConfig;
|
|
18
|
-
export { convertClaudeToGeminiToml, convertClaudeToGeminiAgent, stripSubTags };
|
|
19
|
-
//# sourceMappingURL=gemini.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gemini.d.ts","sourceRoot":"","sources":["../../src/adapters/gemini.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EACL,0BAA0B,EAC1B,YAAY,EAEb,MAAM,yBAAyB,CAAC;AAmCjC;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,aAO3B,CAAC;AAGF,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,YAAY,EAAE,CAAC"}
|
package/dist/adapters/gemini.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @maxsim/adapters — Gemini adapter
|
|
4
|
-
*
|
|
5
|
-
* Ports the Gemini-specific logic from bin/install.js:
|
|
6
|
-
* - getGlobalDir('gemini', ...) (lines 113-122)
|
|
7
|
-
* - getDirName('gemini') (line 47)
|
|
8
|
-
* - getConfigDirFromHome('gemini', isGlobal) (line 69)
|
|
9
|
-
* - convertClaudeToGeminiToml + convertClaudeToGeminiAgent + stripSubTags
|
|
10
|
-
*/
|
|
11
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
15
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
16
|
-
}
|
|
17
|
-
Object.defineProperty(o, k2, desc);
|
|
18
|
-
}) : (function(o, m, k, k2) {
|
|
19
|
-
if (k2 === undefined) k2 = k;
|
|
20
|
-
o[k2] = m[k];
|
|
21
|
-
}));
|
|
22
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
23
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
24
|
-
}) : function(o, v) {
|
|
25
|
-
o["default"] = v;
|
|
26
|
-
});
|
|
27
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
28
|
-
var ownKeys = function(o) {
|
|
29
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
30
|
-
var ar = [];
|
|
31
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
32
|
-
return ar;
|
|
33
|
-
};
|
|
34
|
-
return ownKeys(o);
|
|
35
|
-
};
|
|
36
|
-
return function (mod) {
|
|
37
|
-
if (mod && mod.__esModule) return mod;
|
|
38
|
-
var result = {};
|
|
39
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
40
|
-
__setModuleDefault(result, mod);
|
|
41
|
-
return result;
|
|
42
|
-
};
|
|
43
|
-
})();
|
|
44
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
-
exports.stripSubTags = exports.convertClaudeToGeminiAgent = exports.convertClaudeToGeminiToml = exports.geminiAdapter = void 0;
|
|
46
|
-
const path = __importStar(require("node:path"));
|
|
47
|
-
const os = __importStar(require("node:os"));
|
|
48
|
-
const base_js_1 = require("./base.js");
|
|
49
|
-
const frontmatter_js_1 = require("./transforms/frontmatter.js");
|
|
50
|
-
Object.defineProperty(exports, "convertClaudeToGeminiToml", { enumerable: true, get: function () { return frontmatter_js_1.convertClaudeToGeminiToml; } });
|
|
51
|
-
const content_js_1 = require("./transforms/content.js");
|
|
52
|
-
Object.defineProperty(exports, "convertClaudeToGeminiAgent", { enumerable: true, get: function () { return content_js_1.convertClaudeToGeminiAgent; } });
|
|
53
|
-
Object.defineProperty(exports, "stripSubTags", { enumerable: true, get: function () { return content_js_1.stripSubTags; } });
|
|
54
|
-
/**
|
|
55
|
-
* Get the global config directory for Gemini.
|
|
56
|
-
* Priority: explicitDir > GEMINI_CONFIG_DIR env > ~/.gemini
|
|
57
|
-
*/
|
|
58
|
-
function getGlobalDir(explicitDir) {
|
|
59
|
-
if (explicitDir) {
|
|
60
|
-
return (0, base_js_1.expandTilde)(explicitDir);
|
|
61
|
-
}
|
|
62
|
-
if (process.env.GEMINI_CONFIG_DIR) {
|
|
63
|
-
return (0, base_js_1.expandTilde)(process.env.GEMINI_CONFIG_DIR);
|
|
64
|
-
}
|
|
65
|
-
return path.join(os.homedir(), '.gemini');
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Get the config directory path relative to home for hook templating.
|
|
69
|
-
*/
|
|
70
|
-
function getConfigDirFromHome(_isGlobal) {
|
|
71
|
-
return "'.gemini'";
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Transform markdown content for Gemini installation.
|
|
75
|
-
* Applies TOML conversion for commands, agent conversion for agents,
|
|
76
|
-
* stripSubTags, and path replacement.
|
|
77
|
-
*/
|
|
78
|
-
function transformContent(content, pathPrefix) {
|
|
79
|
-
let result = (0, content_js_1.replacePathReferences)(content, pathPrefix, '.gemini');
|
|
80
|
-
result = (0, content_js_1.stripSubTags)(result);
|
|
81
|
-
result = (0, frontmatter_js_1.convertClaudeToGeminiToml)(result);
|
|
82
|
-
return result;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Gemini adapter configuration.
|
|
86
|
-
* Gemini uses nested command structure (commands/maxsim/*.toml).
|
|
87
|
-
*/
|
|
88
|
-
exports.geminiAdapter = {
|
|
89
|
-
runtime: 'gemini',
|
|
90
|
-
dirName: '.gemini',
|
|
91
|
-
getGlobalDir,
|
|
92
|
-
getConfigDirFromHome,
|
|
93
|
-
transformContent,
|
|
94
|
-
commandStructure: 'nested',
|
|
95
|
-
};
|
|
96
|
-
//# sourceMappingURL=gemini.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gemini.js","sourceRoot":"","sources":["../../src/adapters/gemini.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAAkC;AAClC,4CAA8B;AAE9B,uCAAwC;AACxC,gEAAwE;AAsD/D,0GAtDA,0CAAyB,OAsDA;AArDlC,wDAIiC;AAiDG,2GApDlC,uCAA0B,OAoDkC;AAAE,6FAnD9D,yBAAY,OAmD8D;AA/C5E;;;GAGG;AACH,SAAS,YAAY,CAAC,WAA2B;IAC/C,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,IAAA,qBAAW,EAAC,WAAW,CAAC,CAAC;IAClC,CAAC;IACD,IAAI,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC;QAClC,OAAO,IAAA,qBAAW,EAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACpD,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,SAAS,oBAAoB,CAAC,SAAkB;IAC9C,OAAO,WAAW,CAAC;AACrB,CAAC;AAED;;;;GAIG;AACH,SAAS,gBAAgB,CAAC,OAAe,EAAE,UAAkB;IAC3D,IAAI,MAAM,GAAG,IAAA,kCAAqB,EAAC,OAAO,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;IACnE,MAAM,GAAG,IAAA,yBAAY,EAAC,MAAM,CAAC,CAAC;IAC9B,MAAM,GAAG,IAAA,0CAAyB,EAAC,MAAM,CAAC,CAAC;IAC3C,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;GAGG;AACU,QAAA,aAAa,GAAkB;IAC1C,OAAO,EAAE,QAAQ;IACjB,OAAO,EAAE,SAAS;IAClB,YAAY;IACZ,oBAAoB;IACpB,gBAAgB;IAChB,gBAAgB,EAAE,QAAQ;CAC3B,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @maxsim/adapters — OpenCode adapter
|
|
3
|
-
*
|
|
4
|
-
* Ports the OpenCode-specific logic from bin/install.js:
|
|
5
|
-
* - getOpencodeGlobalDir() (lines 79-97)
|
|
6
|
-
* - getGlobalDir('opencode', ...) (lines 104-111)
|
|
7
|
-
* - getDirName('opencode') (line 46)
|
|
8
|
-
* - getConfigDirFromHome('opencode', isGlobal) (lines 58-68)
|
|
9
|
-
* - convertClaudeToOpencodeFrontmatter + path replacement
|
|
10
|
-
*/
|
|
11
|
-
import type { AdapterConfig } from '../core/index.js';
|
|
12
|
-
/**
|
|
13
|
-
* OpenCode adapter configuration.
|
|
14
|
-
* OpenCode uses flat command structure (command/maxsim-*.md).
|
|
15
|
-
*/
|
|
16
|
-
export declare const opencodeAdapter: AdapterConfig;
|
|
17
|
-
//# sourceMappingURL=opencode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../src/adapters/opencode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAwDtD;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,aAO7B,CAAC"}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @maxsim/adapters — OpenCode adapter
|
|
4
|
-
*
|
|
5
|
-
* Ports the OpenCode-specific logic from bin/install.js:
|
|
6
|
-
* - getOpencodeGlobalDir() (lines 79-97)
|
|
7
|
-
* - getGlobalDir('opencode', ...) (lines 104-111)
|
|
8
|
-
* - getDirName('opencode') (line 46)
|
|
9
|
-
* - getConfigDirFromHome('opencode', isGlobal) (lines 58-68)
|
|
10
|
-
* - convertClaudeToOpencodeFrontmatter + path replacement
|
|
11
|
-
*/
|
|
12
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
13
|
-
if (k2 === undefined) k2 = k;
|
|
14
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
15
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
16
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
17
|
-
}
|
|
18
|
-
Object.defineProperty(o, k2, desc);
|
|
19
|
-
}) : (function(o, m, k, k2) {
|
|
20
|
-
if (k2 === undefined) k2 = k;
|
|
21
|
-
o[k2] = m[k];
|
|
22
|
-
}));
|
|
23
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
24
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
25
|
-
}) : function(o, v) {
|
|
26
|
-
o["default"] = v;
|
|
27
|
-
});
|
|
28
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
29
|
-
var ownKeys = function(o) {
|
|
30
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
31
|
-
var ar = [];
|
|
32
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
33
|
-
return ar;
|
|
34
|
-
};
|
|
35
|
-
return ownKeys(o);
|
|
36
|
-
};
|
|
37
|
-
return function (mod) {
|
|
38
|
-
if (mod && mod.__esModule) return mod;
|
|
39
|
-
var result = {};
|
|
40
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
41
|
-
__setModuleDefault(result, mod);
|
|
42
|
-
return result;
|
|
43
|
-
};
|
|
44
|
-
})();
|
|
45
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.opencodeAdapter = void 0;
|
|
47
|
-
const path = __importStar(require("node:path"));
|
|
48
|
-
const os = __importStar(require("node:os"));
|
|
49
|
-
const base_js_1 = require("./base.js");
|
|
50
|
-
const frontmatter_js_1 = require("./transforms/frontmatter.js");
|
|
51
|
-
const content_js_1 = require("./transforms/content.js");
|
|
52
|
-
/**
|
|
53
|
-
* Get the global config directory for OpenCode.
|
|
54
|
-
* OpenCode follows XDG Base Directory spec and uses ~/.config/opencode/.
|
|
55
|
-
* Priority: OPENCODE_CONFIG_DIR > dirname(OPENCODE_CONFIG) > XDG_CONFIG_HOME/opencode > ~/.config/opencode
|
|
56
|
-
*/
|
|
57
|
-
function getOpencodeGlobalDir() {
|
|
58
|
-
if (process.env.OPENCODE_CONFIG_DIR) {
|
|
59
|
-
return (0, base_js_1.expandTilde)(process.env.OPENCODE_CONFIG_DIR);
|
|
60
|
-
}
|
|
61
|
-
if (process.env.OPENCODE_CONFIG) {
|
|
62
|
-
return path.dirname((0, base_js_1.expandTilde)(process.env.OPENCODE_CONFIG));
|
|
63
|
-
}
|
|
64
|
-
if (process.env.XDG_CONFIG_HOME) {
|
|
65
|
-
return path.join((0, base_js_1.expandTilde)(process.env.XDG_CONFIG_HOME), 'opencode');
|
|
66
|
-
}
|
|
67
|
-
return path.join(os.homedir(), '.config', 'opencode');
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Get the global config directory for OpenCode.
|
|
71
|
-
* Priority: explicitDir > env vars (via getOpencodeGlobalDir)
|
|
72
|
-
*/
|
|
73
|
-
function getGlobalDir(explicitDir) {
|
|
74
|
-
if (explicitDir) {
|
|
75
|
-
return (0, base_js_1.expandTilde)(explicitDir);
|
|
76
|
-
}
|
|
77
|
-
return getOpencodeGlobalDir();
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Get the config directory path relative to home for hook templating.
|
|
81
|
-
*/
|
|
82
|
-
function getConfigDirFromHome(isGlobal) {
|
|
83
|
-
if (!isGlobal) {
|
|
84
|
-
return "'.opencode'";
|
|
85
|
-
}
|
|
86
|
-
return "'.config', 'opencode'";
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Transform markdown content for OpenCode installation.
|
|
90
|
-
* Applies frontmatter conversion and path replacement.
|
|
91
|
-
*/
|
|
92
|
-
function transformContent(content, pathPrefix) {
|
|
93
|
-
let result = (0, content_js_1.replacePathReferences)(content, pathPrefix, '.opencode');
|
|
94
|
-
// Also replace ~/.opencode/ references
|
|
95
|
-
result = result.replace(/~\/\.opencode\//g, pathPrefix);
|
|
96
|
-
result = (0, frontmatter_js_1.convertClaudeToOpencodeFrontmatter)(result);
|
|
97
|
-
return result;
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* OpenCode adapter configuration.
|
|
101
|
-
* OpenCode uses flat command structure (command/maxsim-*.md).
|
|
102
|
-
*/
|
|
103
|
-
exports.opencodeAdapter = {
|
|
104
|
-
runtime: 'opencode',
|
|
105
|
-
dirName: '.opencode',
|
|
106
|
-
getGlobalDir,
|
|
107
|
-
getConfigDirFromHome,
|
|
108
|
-
transformContent,
|
|
109
|
-
commandStructure: 'flat',
|
|
110
|
-
};
|
|
111
|
-
//# sourceMappingURL=opencode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../src/adapters/opencode.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,gDAAkC;AAClC,4CAA8B;AAE9B,uCAAwC;AACxC,gEAAiF;AACjF,wDAAgE;AAEhE;;;;GAIG;AACH,SAAS,oBAAoB;IAC3B,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,CAAC;QACpC,OAAO,IAAA,qBAAW,EAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IACtD,CAAC;IACD,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAA,qBAAW,EAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;IAChE,CAAC;IACD,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAA,qBAAW,EAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,UAAU,CAAC,CAAC;AACxD,CAAC;AAED;;;GAGG;AACH,SAAS,YAAY,CAAC,WAA2B;IAC/C,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,IAAA,qBAAW,EAAC,WAAW,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,oBAAoB,EAAE,CAAC;AAChC,CAAC;AAED;;GAEG;AACH,SAAS,oBAAoB,CAAC,QAAiB;IAC7C,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,aAAa,CAAC;IACvB,CAAC;IACD,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAED;;;GAGG;AACH,SAAS,gBAAgB,CAAC,OAAe,EAAE,UAAkB;IAC3D,IAAI,MAAM,GAAG,IAAA,kCAAqB,EAAC,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;IACrE,uCAAuC;IACvC,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC;IACxD,MAAM,GAAG,IAAA,mDAAkC,EAAC,MAAM,CAAC,CAAC;IACpD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;GAGG;AACU,QAAA,eAAe,GAAkB;IAC5C,OAAO,EAAE,UAAU;IACnB,OAAO,EAAE,WAAW;IACpB,YAAY;IACZ,oBAAoB;IACpB,gBAAgB;IAChB,gBAAgB,EAAE,MAAM;CACzB,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @maxsim/adapters — Content transformation utilities
|
|
3
|
-
*
|
|
4
|
-
* Ported from bin/install.js lines ~423-564
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Convert /maxsim:command-name to $maxsim-command-name for Codex skill mentions.
|
|
8
|
-
* Ported from install.js line ~423
|
|
9
|
-
*/
|
|
10
|
-
export declare function convertSlashCommandsToCodexSkillMentions(content: string): string;
|
|
11
|
-
/**
|
|
12
|
-
* Convert Claude markdown to Codex markdown format.
|
|
13
|
-
* Replaces slash commands and $ARGUMENTS placeholder.
|
|
14
|
-
* Ported from install.js line ~431
|
|
15
|
-
*/
|
|
16
|
-
export declare function convertClaudeToCodexMarkdown(content: string): string;
|
|
17
|
-
/**
|
|
18
|
-
* Strip HTML <sub> tags for Gemini CLI output.
|
|
19
|
-
* Terminals don't support subscript -- converts <sub>text</sub> to italic *(text)*.
|
|
20
|
-
* Ported from install.js line ~474
|
|
21
|
-
*/
|
|
22
|
-
export declare function stripSubTags(content: string): string;
|
|
23
|
-
/**
|
|
24
|
-
* Convert Claude Code agent frontmatter to Gemini CLI format.
|
|
25
|
-
* - tools: must be a YAML array (not comma-separated string)
|
|
26
|
-
* - tool names: must use Gemini built-in names (read_file, not Read)
|
|
27
|
-
* - color: must be removed (causes validation error)
|
|
28
|
-
* - mcp__* tools: must be excluded (auto-discovered at runtime)
|
|
29
|
-
* - ${VAR} patterns: escaped to $VAR for Gemini template compatibility
|
|
30
|
-
*
|
|
31
|
-
* Ported from install.js line ~487
|
|
32
|
-
*/
|
|
33
|
-
export declare function convertClaudeToGeminiAgent(content: string): string;
|
|
34
|
-
/**
|
|
35
|
-
* Replace path references in markdown content for a target runtime.
|
|
36
|
-
* Replaces ~/.claude/ with pathPrefix and ./.claude/ with ./dirName/.
|
|
37
|
-
*/
|
|
38
|
-
export declare function replacePathReferences(content: string, pathPrefix: string, dirName: string): string;
|
|
39
|
-
//# sourceMappingURL=content.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/adapters/transforms/content.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;GAGG;AACH,wBAAgB,wCAAwC,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAMhF;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAIpE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAkElE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,GACd,MAAM,CAMR"}
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* @maxsim/adapters — Content transformation utilities
|
|
4
|
-
*
|
|
5
|
-
* Ported from bin/install.js lines ~423-564
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.convertSlashCommandsToCodexSkillMentions = convertSlashCommandsToCodexSkillMentions;
|
|
9
|
-
exports.convertClaudeToCodexMarkdown = convertClaudeToCodexMarkdown;
|
|
10
|
-
exports.stripSubTags = stripSubTags;
|
|
11
|
-
exports.convertClaudeToGeminiAgent = convertClaudeToGeminiAgent;
|
|
12
|
-
exports.replacePathReferences = replacePathReferences;
|
|
13
|
-
const tool_maps_js_1 = require("./tool-maps.js");
|
|
14
|
-
/**
|
|
15
|
-
* Convert /maxsim:command-name to $maxsim-command-name for Codex skill mentions.
|
|
16
|
-
* Ported from install.js line ~423
|
|
17
|
-
*/
|
|
18
|
-
function convertSlashCommandsToCodexSkillMentions(content) {
|
|
19
|
-
let converted = content.replace(/\/maxsim:([a-z0-9-]+)/gi, (_, commandName) => {
|
|
20
|
-
return `$maxsim-${String(commandName).toLowerCase()}`;
|
|
21
|
-
});
|
|
22
|
-
converted = converted.replace(/\/maxsim-help\b/g, '$maxsim-help');
|
|
23
|
-
return converted;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Convert Claude markdown to Codex markdown format.
|
|
27
|
-
* Replaces slash commands and $ARGUMENTS placeholder.
|
|
28
|
-
* Ported from install.js line ~431
|
|
29
|
-
*/
|
|
30
|
-
function convertClaudeToCodexMarkdown(content) {
|
|
31
|
-
let converted = convertSlashCommandsToCodexSkillMentions(content);
|
|
32
|
-
converted = converted.replace(/\$ARGUMENTS\b/g, '{{MAXSIM_ARGS}}');
|
|
33
|
-
return converted;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Strip HTML <sub> tags for Gemini CLI output.
|
|
37
|
-
* Terminals don't support subscript -- converts <sub>text</sub> to italic *(text)*.
|
|
38
|
-
* Ported from install.js line ~474
|
|
39
|
-
*/
|
|
40
|
-
function stripSubTags(content) {
|
|
41
|
-
return content.replace(/<sub>(.*?)<\/sub>/g, '*($1)*');
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Convert Claude Code agent frontmatter to Gemini CLI format.
|
|
45
|
-
* - tools: must be a YAML array (not comma-separated string)
|
|
46
|
-
* - tool names: must use Gemini built-in names (read_file, not Read)
|
|
47
|
-
* - color: must be removed (causes validation error)
|
|
48
|
-
* - mcp__* tools: must be excluded (auto-discovered at runtime)
|
|
49
|
-
* - ${VAR} patterns: escaped to $VAR for Gemini template compatibility
|
|
50
|
-
*
|
|
51
|
-
* Ported from install.js line ~487
|
|
52
|
-
*/
|
|
53
|
-
function convertClaudeToGeminiAgent(content) {
|
|
54
|
-
if (!content.startsWith('---'))
|
|
55
|
-
return content;
|
|
56
|
-
const endIndex = content.indexOf('---', 3);
|
|
57
|
-
if (endIndex === -1)
|
|
58
|
-
return content;
|
|
59
|
-
const frontmatter = content.substring(3, endIndex).trim();
|
|
60
|
-
const body = content.substring(endIndex + 3);
|
|
61
|
-
const lines = frontmatter.split('\n');
|
|
62
|
-
const newLines = [];
|
|
63
|
-
let inAllowedTools = false;
|
|
64
|
-
const tools = [];
|
|
65
|
-
for (const line of lines) {
|
|
66
|
-
const trimmed = line.trim();
|
|
67
|
-
if (trimmed.startsWith('allowed-tools:')) {
|
|
68
|
-
inAllowedTools = true;
|
|
69
|
-
continue;
|
|
70
|
-
}
|
|
71
|
-
if (trimmed.startsWith('tools:')) {
|
|
72
|
-
const toolsValue = trimmed.substring(6).trim();
|
|
73
|
-
if (toolsValue) {
|
|
74
|
-
const parsed = toolsValue.split(',').map((t) => t.trim()).filter((t) => t);
|
|
75
|
-
for (const t of parsed) {
|
|
76
|
-
const mapped = (0, tool_maps_js_1.convertGeminiToolName)(t);
|
|
77
|
-
if (mapped)
|
|
78
|
-
tools.push(mapped);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
else {
|
|
82
|
-
inAllowedTools = true;
|
|
83
|
-
}
|
|
84
|
-
continue;
|
|
85
|
-
}
|
|
86
|
-
if (trimmed.startsWith('color:'))
|
|
87
|
-
continue;
|
|
88
|
-
if (inAllowedTools) {
|
|
89
|
-
if (trimmed.startsWith('- ')) {
|
|
90
|
-
const mapped = (0, tool_maps_js_1.convertGeminiToolName)(trimmed.substring(2).trim());
|
|
91
|
-
if (mapped)
|
|
92
|
-
tools.push(mapped);
|
|
93
|
-
continue;
|
|
94
|
-
}
|
|
95
|
-
else if (trimmed && !trimmed.startsWith('-')) {
|
|
96
|
-
inAllowedTools = false;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
if (!inAllowedTools) {
|
|
100
|
-
newLines.push(line);
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
if (tools.length > 0) {
|
|
104
|
-
newLines.push('tools:');
|
|
105
|
-
for (const tool of tools) {
|
|
106
|
-
newLines.push(` - ${tool}`);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
const newFrontmatter = newLines.join('\n').trim();
|
|
110
|
-
// Escape ${VAR} patterns in agent body for Gemini CLI compatibility.
|
|
111
|
-
const escapedBody = body.replace(/\$\{(\w+)\}/g, '$$$1');
|
|
112
|
-
return `---\n${newFrontmatter}\n---${stripSubTags(escapedBody)}`;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Replace path references in markdown content for a target runtime.
|
|
116
|
-
* Replaces ~/.claude/ with pathPrefix and ./.claude/ with ./dirName/.
|
|
117
|
-
*/
|
|
118
|
-
function replacePathReferences(content, pathPrefix, dirName) {
|
|
119
|
-
const globalClaudeRegex = /~\/\.claude\//g;
|
|
120
|
-
const localClaudeRegex = /\.\/\.claude\//g;
|
|
121
|
-
let result = content.replace(globalClaudeRegex, pathPrefix);
|
|
122
|
-
result = result.replace(localClaudeRegex, `./${dirName}/`);
|
|
123
|
-
return result;
|
|
124
|
-
}
|
|
125
|
-
//# sourceMappingURL=content.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content.js","sourceRoot":"","sources":["../../../src/adapters/transforms/content.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAQH,4FAMC;AAOD,oEAIC;AAOD,oCAEC;AAYD,gEAkEC;AAMD,sDAUC;AA9HD,iDAAuD;AAEvD;;;GAGG;AACH,SAAgB,wCAAwC,CAAC,OAAe;IACtE,IAAI,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAAC,EAAE,WAAmB,EAAE,EAAE;QACpF,OAAO,WAAW,MAAM,CAAC,WAAW,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;IACxD,CAAC,CAAC,CAAC;IACH,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,kBAAkB,EAAE,cAAc,CAAC,CAAC;IAClE,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;GAIG;AACH,SAAgB,4BAA4B,CAAC,OAAe;IAC1D,IAAI,SAAS,GAAG,wCAAwC,CAAC,OAAO,CAAC,CAAC;IAClE,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;IACnE,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;GAIG;AACH,SAAgB,YAAY,CAAC,OAAe;IAC1C,OAAO,OAAO,CAAC,OAAO,CAAC,oBAAoB,EAAE,QAAQ,CAAC,CAAC;AACzD,CAAC;AAED;;;;;;;;;GASG;AACH,SAAgB,0BAA0B,CAAC,OAAe;IACxD,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC;IAE/C,MAAM,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IAC3C,IAAI,QAAQ,KAAK,CAAC,CAAC;QAAE,OAAO,OAAO,CAAC;IAEpC,MAAM,WAAW,GAAG,OAAO,CAAC,SA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,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC;IAC5D,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,gBAAgB,EAAE,KAAK,OAAO,GAAG,CAAC,CAAC;IAC3D,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @maxsim/adapters — Frontmatter conversion functions for opencode, gemini, codex
|
|
3
|
-
*
|
|
4
|
-
* Ported from bin/install.js lines ~308-711
|
|
5
|
-
*/
|
|
6
|
-
/** Color name to hex mapping for opencode compatibility */
|
|
7
|
-
export declare const colorNameToHex: Record<string, string>;
|
|
8
|
-
/** Collapse whitespace to single line */
|
|
9
|
-
export declare function toSingleLine(value: string): string;
|
|
10
|
-
/** Quote a value for YAML using JSON.stringify */
|
|
11
|
-
export declare function yamlQuote(value: string): string;
|
|
12
|
-
/** Extract a single-line field value from YAML frontmatter text */
|
|
13
|
-
export declare function extractFrontmatterField(frontmatter: string, fieldName: string): string | null;
|
|
14
|
-
/**
|
|
15
|
-
* Convert Claude Code frontmatter to OpenCode format.
|
|
16
|
-
* - Converts 'allowed-tools:' array to 'tools:' object with tool: true entries
|
|
17
|
-
* - Converts color names to hex
|
|
18
|
-
* - Removes name: field (opencode uses filename)
|
|
19
|
-
* - Replaces tool name references in body content
|
|
20
|
-
* - Replaces /maxsim: with /maxsim- (flat command structure)
|
|
21
|
-
* - Replaces ~/.claude with ~/.config/opencode
|
|
22
|
-
* - Replaces subagent_type="general-purpose" with "general"
|
|
23
|
-
*
|
|
24
|
-
* Ported from install.js line ~566
|
|
25
|
-
*/
|
|
26
|
-
export declare function convertClaudeToOpencodeFrontmatter(content: string): string;
|
|
27
|
-
/**
|
|
28
|
-
* Convert Claude Code markdown command to Gemini TOML format.
|
|
29
|
-
* Ported from install.js line ~677
|
|
30
|
-
*/
|
|
31
|
-
export declare function convertClaudeToGeminiToml(content: string): string;
|
|
32
|
-
/**
|
|
33
|
-
* Convert Claude command to Codex skill format with adapter header.
|
|
34
|
-
* Ported from install.js line ~452
|
|
35
|
-
*/
|
|
36
|
-
export declare function convertClaudeCommandToCodexSkill(content: string, skillName: string): string;
|
|
37
|
-
/**
|
|
38
|
-
* Generate the Codex skill adapter header block.
|
|
39
|
-
* Ported from install.js line ~437
|
|
40
|
-
*/
|
|
41
|
-
export declare function getCodexSkillAdapterHeader(skillName: string): string;
|
|
42
|
-
//# sourceMappingURL=frontmatter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"frontmatter.d.ts","sourceRoot":"","sources":["../../../src/adapters/transforms/frontmatter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,2DAA2D;AAC3D,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAcjD,CAAC;AAEF,yCAAyC;AACzC,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAElD;AAED,kDAAkD;AAClD,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,mEAAmE;AACnE,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,GAChB,MAAM,GAAG,IAAI,CAKf;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAuF1E;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA8BjE;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,GAChB,MAAM,CAgBR;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAapE"}
|