mano-coding 0.1.20 → 0.1.21

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/bin.js CHANGED
@@ -32113,6 +32113,85 @@ function validateMcpConfig(rawConfig) {
32113
32113
  }
32114
32114
  return validatedServers;
32115
32115
  }
32116
+ function getTargetSkillPath(target, skillId, relFile) {
32117
+ const normalizedRel = relFile.replaceAll("\\", "/");
32118
+ switch (target) {
32119
+ case "cursor":
32120
+ return `.cursor/skills/${skillId}/${normalizedRel}`;
32121
+ case "codebuddy":
32122
+ return `.codebuddy/skills/${skillId}/${normalizedRel}`;
32123
+ case "claude-code":
32124
+ return `.claude/skills/${skillId}/${normalizedRel}`;
32125
+ case "trae":
32126
+ return `.trae/skills/${skillId}/${normalizedRel}`;
32127
+ case "opencode":
32128
+ return `.opencode/skills/${skillId}/${normalizedRel}`;
32129
+ case "codex":
32130
+ return `.agents/skills/${skillId}/${normalizedRel}`;
32131
+ case "deepseek-harness":
32132
+ return `.dsh/skills/${skillId}/${normalizedRel}`;
32133
+ default:
32134
+ return `.${target}/skills/${skillId}/${normalizedRel}`;
32135
+ }
32136
+ }
32137
+ function getTargetRulePath(target, relFile) {
32138
+ const normalizedRel = relFile.replaceAll("\\", "/");
32139
+ switch (target) {
32140
+ case "cursor":
32141
+ return `.cursor/rules/${normalizedRel}`;
32142
+ case "claude-code":
32143
+ return `.claude/rules/${normalizedRel}`;
32144
+ case "trae":
32145
+ return `.trae/rules/${normalizedRel}`;
32146
+ case "codebuddy":
32147
+ return `.codebuddy/rules/${normalizedRel}`;
32148
+ case "opencode":
32149
+ return `.opencode/rules/${normalizedRel}`;
32150
+ case "deepseek-harness":
32151
+ return `.dsh/rules/${normalizedRel}`;
32152
+ default:
32153
+ return `.${target}/rules/${normalizedRel}`;
32154
+ }
32155
+ }
32156
+ function getTargetSubagentPath(target, relFile) {
32157
+ const normalizedRel = relFile.replaceAll("\\", "/");
32158
+ switch (target) {
32159
+ case "cursor":
32160
+ return `.cursor/agents/${normalizedRel}`;
32161
+ case "claude-code":
32162
+ return `.claude/agents/${normalizedRel}`;
32163
+ case "codex":
32164
+ return `.codex/agents/${normalizedRel}`;
32165
+ case "opencode":
32166
+ return `.opencode/agents/${normalizedRel}`;
32167
+ case "codebuddy":
32168
+ return `.codebuddy/agents/${normalizedRel}`;
32169
+ case "trae":
32170
+ return `.trae/agents/${normalizedRel}`;
32171
+ case "deepseek-harness":
32172
+ return `.dsh/agents/${normalizedRel}`;
32173
+ default:
32174
+ return `.${target}/agents/${normalizedRel}`;
32175
+ }
32176
+ }
32177
+ function getTargetMcpPath(target) {
32178
+ switch (target) {
32179
+ case "cursor":
32180
+ return ".cursor/mcp.json";
32181
+ case "trae":
32182
+ return ".trae/mcp.json";
32183
+ case "codebuddy":
32184
+ return ".codebuddy/mcp.json";
32185
+ case "claude-code":
32186
+ return ".claude/mcp.json";
32187
+ case "opencode":
32188
+ return ".opencode/mcp.json";
32189
+ case "deepseek-harness":
32190
+ return ".dsh/mcp.json";
32191
+ default:
32192
+ return `.${target}/mcp.json`;
32193
+ }
32194
+ }
32116
32195
  async function scanTemplateDirectoryContract(options) {
32117
32196
  const { templateDir, targets } = options;
32118
32197
  const intents = [];
@@ -32137,21 +32216,15 @@ async function scanTemplateDirectoryContract(options) {
32137
32216
  const allSkillFiles = await listAllFilesRecursive(singleSkillDir);
32138
32217
  for (const relFile of allSkillFiles) {
32139
32218
  const fileContent = await readFile17(join12(singleSkillDir, relFile));
32140
- intents.push({
32141
- action: "upsert",
32142
- type: "file",
32143
- path: `.agents/skills/${skillId}/${relFile.replaceAll("\\", "/")}`,
32144
- content: fileContent
32145
- });
32219
+ const normalizedRel = relFile.replaceAll("\\", "/");
32146
32220
  for (const target of targets) {
32147
- if (target === "cursor") {
32148
- intents.push({
32149
- action: "upsert",
32150
- type: "file",
32151
- path: `.cursor/skills/${skillId}/${relFile.replaceAll("\\", "/")}`,
32152
- content: fileContent
32153
- });
32154
- }
32221
+ intents.push({
32222
+ action: "upsert",
32223
+ type: "file",
32224
+ path: getTargetSkillPath(target, skillId, normalizedRel),
32225
+ content: fileContent,
32226
+ target
32227
+ });
32155
32228
  }
32156
32229
  }
32157
32230
  }
@@ -32169,28 +32242,33 @@ async function scanTemplateDirectoryContract(options) {
32169
32242
  for (const relFile of allRuleFiles) {
32170
32243
  const fileContent = await readFile17(join12(singleRuleDir, relFile));
32171
32244
  const normalizedRel = relFile.replaceAll("\\", "/");
32172
- let targetDestPath;
32173
- switch (ide) {
32174
- case "cursor":
32175
- targetDestPath = `.cursor/rules/${normalizedRel}`;
32176
- break;
32177
- case "claude-code":
32178
- targetDestPath = `.claude/rules/${normalizedRel}`;
32179
- break;
32180
- case "trae":
32181
- targetDestPath = `.trae/rules/${normalizedRel}`;
32182
- break;
32183
- case "codebuddy":
32184
- targetDestPath = `.codebuddy/rules/${normalizedRel}`;
32185
- break;
32186
- default:
32187
- targetDestPath = `.${ide}/rules/${normalizedRel}`;
32188
- break;
32189
- }
32190
32245
  intents.push({
32191
32246
  action: "upsert",
32192
32247
  type: "file",
32193
- path: targetDestPath,
32248
+ path: getTargetRulePath(ide, normalizedRel),
32249
+ content: fileContent,
32250
+ target: ide
32251
+ });
32252
+ }
32253
+ }
32254
+ } catch {
32255
+ }
32256
+ const subagentsDir = join12(templateDir, "subagents");
32257
+ try {
32258
+ const agentIdeEntries = await readdir4(subagentsDir, { withFileTypes: true });
32259
+ for (const ideEntry of agentIdeEntries) {
32260
+ if (!ideEntry.isDirectory()) continue;
32261
+ const ide = ideEntry.name;
32262
+ if (!targets.includes(ide)) continue;
32263
+ const singleAgentDir = join12(subagentsDir, ide);
32264
+ const allAgentFiles = await listAllFilesRecursive(singleAgentDir);
32265
+ for (const relFile of allAgentFiles) {
32266
+ const fileContent = await readFile17(join12(singleAgentDir, relFile));
32267
+ const normalizedRel = relFile.replaceAll("\\", "/");
32268
+ intents.push({
32269
+ action: "upsert",
32270
+ type: "file",
32271
+ path: getTargetSubagentPath(ide, normalizedRel),
32194
32272
  content: fileContent,
32195
32273
  target: ide
32196
32274
  });
@@ -32204,25 +32282,10 @@ async function scanTemplateDirectoryContract(options) {
32204
32282
  const mcpServers = validateMcpConfig(JSON.parse(mcpRaw));
32205
32283
  for (const [serverName, serverConfig] of Object.entries(mcpServers)) {
32206
32284
  for (const target of targets) {
32207
- let mcpConfigPath;
32208
- switch (target) {
32209
- case "cursor":
32210
- mcpConfigPath = ".cursor/mcp.json";
32211
- break;
32212
- case "trae":
32213
- mcpConfigPath = ".trae/mcp.json";
32214
- break;
32215
- case "codebuddy":
32216
- mcpConfigPath = ".codebuddy/mcp.json";
32217
- break;
32218
- default:
32219
- mcpConfigPath = `.${target}/mcp.json`;
32220
- break;
32221
- }
32222
32285
  intents.push({
32223
32286
  action: "upsert",
32224
32287
  type: "config-entry",
32225
- path: mcpConfigPath,
32288
+ path: getTargetMcpPath(target),
32226
32289
  selector: `/mcpServers/${serverName}`,
32227
32290
  value: serverConfig,
32228
32291
  format: "json",
@@ -33525,6 +33588,10 @@ __export(src_exports, {
33525
33588
  getOfficialTargets: () => getOfficialTargets,
33526
33589
  getPlanIntents: () => getPlanIntents,
33527
33590
  getPluginDeliveryDriver: () => getPluginDeliveryDriver,
33591
+ getTargetMcpPath: () => getTargetMcpPath,
33592
+ getTargetRulePath: () => getTargetRulePath,
33593
+ getTargetSkillPath: () => getTargetSkillPath,
33594
+ getTargetSubagentPath: () => getTargetSubagentPath,
33528
33595
  getUserInstallCommands: () => getUserInstallCommands,
33529
33596
  getUserInstallEnvChanges: () => getUserInstallEnvChanges,
33530
33597
  hasActiveLease: () => hasActiveLease,
@@ -38608,13 +38675,13 @@ async function buildLock(_operation, templateResolution, addonResolutions, proje
38608
38675
  id: templateResolution.packageId,
38609
38676
  version: templateResolution.resolvedVersion,
38610
38677
  source: templateResolution.source,
38611
- integrity: templateResolution.integrity ?? ""
38678
+ ...templateResolution.integrity ? { integrity: templateResolution.integrity } : {}
38612
38679
  } : void 0;
38613
38680
  const resolvedAddons = addonResolutions.map((r) => ({
38614
38681
  id: r.packageId,
38615
38682
  version: r.resolvedVersion,
38616
38683
  source: r.source,
38617
- integrity: r.integrity ?? ""
38684
+ ...r.integrity ? { integrity: r.integrity } : {}
38618
38685
  }));
38619
38686
  const allResolutions = [...templateResolution ? [templateResolution] : [], ...addonResolutions];
38620
38687
  const activeTargetIds = new Set(projectTargets.map((target) => target.id));
@@ -38629,7 +38696,7 @@ async function buildLock(_operation, templateResolution, addonResolutions, proje
38629
38696
  id: r.packageId,
38630
38697
  version: r.resolvedVersion,
38631
38698
  source: r.source,
38632
- integrity: r.integrity ?? ""
38699
+ ...r.integrity ? { integrity: r.integrity } : {}
38633
38700
  }));
38634
38701
  for (const intent of intents) {
38635
38702
  if (intent.action === "remove") continue;
@@ -42009,7 +42076,7 @@ import { createRequire as createRequire2 } from "node:module";
42009
42076
  import { readFileSync as readFileSync4 } from "node:fs";
42010
42077
  import { fileURLToPath as fileURLToPath5 } from "node:url";
42011
42078
  function resolveVersion() {
42012
- if (true) return "0.1.20";
42079
+ if (true) return "0.1.21";
42013
42080
  const candidates = [
42014
42081
  new URL("../package.json", import.meta.url),
42015
42082
  new URL("../../package.json", import.meta.url),
@@ -18,8 +18,8 @@
18
18
  "$defs": {
19
19
  "packageName": {
20
20
  "type": "string",
21
- "pattern": "^(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*$",
22
- "maxLength": 214
21
+ "pattern": "^(?:(?:gitlab|github):[a-zA-Z0-9_.-]+(?:/[a-zA-Z0-9_.-]+)+|(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*)$",
22
+ "maxLength": 256
23
23
  },
24
24
  "localId": {
25
25
  "type": "string",
@@ -18,8 +18,8 @@
18
18
  "$defs": {
19
19
  "packageName": {
20
20
  "type": "string",
21
- "pattern": "^(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*$",
22
- "maxLength": 214
21
+ "pattern": "^(?:(?:gitlab|github):[a-zA-Z0-9_.-]+(?:/[a-zA-Z0-9_.-]+)+|(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*)$",
22
+ "maxLength": 256
23
23
  },
24
24
  "localId": {
25
25
  "type": "string",
@@ -221,7 +221,7 @@
221
221
  },
222
222
  "resolvedPackage": {
223
223
  "type": "object",
224
- "required": ["id", "version", "source", "integrity"],
224
+ "required": ["id", "version", "source"],
225
225
  "properties": {
226
226
  "id": { "$ref": "#/$defs/packageName" },
227
227
  "version": { "$ref": "#/$defs/semver" },
@@ -17,7 +17,7 @@
17
17
  "$defs": {
18
18
  "packageName": {
19
19
  "type": "string",
20
- "pattern": "^(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*$"
20
+ "pattern": "^(?:(?:gitlab|github):[a-zA-Z0-9_.-]+(?:/[a-zA-Z0-9_.-]+)+|(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*)$"
21
21
  },
22
22
  "semver": {
23
23
  "type": "string",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mano-coding",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "Mano Coding CLI and toolchain",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -18,8 +18,8 @@
18
18
  "$defs": {
19
19
  "packageName": {
20
20
  "type": "string",
21
- "pattern": "^(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*$",
22
- "maxLength": 214
21
+ "pattern": "^(?:(?:gitlab|github):[a-zA-Z0-9_.-]+(?:/[a-zA-Z0-9_.-]+)+|(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*)$",
22
+ "maxLength": 256
23
23
  },
24
24
  "localId": {
25
25
  "type": "string",
@@ -18,8 +18,8 @@
18
18
  "$defs": {
19
19
  "packageName": {
20
20
  "type": "string",
21
- "pattern": "^(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*$",
22
- "maxLength": 214
21
+ "pattern": "^(?:(?:gitlab|github):[a-zA-Z0-9_.-]+(?:/[a-zA-Z0-9_.-]+)+|(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*)$",
22
+ "maxLength": 256
23
23
  },
24
24
  "localId": {
25
25
  "type": "string",
@@ -221,7 +221,7 @@
221
221
  },
222
222
  "resolvedPackage": {
223
223
  "type": "object",
224
- "required": ["id", "version", "source", "integrity"],
224
+ "required": ["id", "version", "source"],
225
225
  "properties": {
226
226
  "id": { "$ref": "#/$defs/packageName" },
227
227
  "version": { "$ref": "#/$defs/semver" },
@@ -17,7 +17,7 @@
17
17
  "$defs": {
18
18
  "packageName": {
19
19
  "type": "string",
20
- "pattern": "^(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*$"
20
+ "pattern": "^(?:(?:gitlab|github):[a-zA-Z0-9_.-]+(?:/[a-zA-Z0-9_.-]+)+|(?:@[a-z0-9][a-z0-9._-]*/)?[a-z0-9][a-z0-9._-]*)$"
21
21
  },
22
22
  "semver": {
23
23
  "type": "string",