@moda-ai/cli 1.55.108 → 1.55.109
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 +3 -3
- package/dist/{agent-vvefg4bm.js → agent-5kfdbx36.js} +8 -8
- package/dist/{change-impact-5h3k9kg6.js → change-impact-v2vbcphy.js} +5 -5
- package/dist/cli-2fv0q9tx.js +141 -0
- package/dist/{cli-xxpaq3n8.js → cli-3r578f36.js} +6 -6
- package/dist/{cli-13zdcv4w.js → cli-3thzh1mq.js} +1 -1
- package/dist/{cli-998n4kz9.js → cli-6df723jn.js} +1 -1
- package/dist/{cli-5z2f1w5m.js → cli-6zmc6asf.js} +6 -6
- package/dist/{cli-ap7wfbnk.js → cli-7gnw6smk.js} +2 -2
- package/dist/{cli-r2dxdhg8.js → cli-84jkd2x7.js} +13 -13
- package/dist/{cli-mc3z77bv.js → cli-8qtxp95w.js} +1 -1
- package/dist/cli-ahqr7wsp.js +429 -0
- package/dist/{cli-qwnkv4jy.js → cli-bgbtrmtr.js} +1 -1
- package/dist/{cli-n9ng8mym.js → cli-cp8gv24j.js} +1 -1
- package/dist/{cli-eq09n00v.js → cli-ew4pkn5b.js} +6 -6
- package/dist/{cli-ekartfps.js → cli-hv4bztsm.js} +1 -1
- package/dist/{cli-62e1vy8f.js → cli-m6w66x9d.js} +3 -3
- package/dist/{cli-2bhhk2nn.js → cli-mh94f7gp.js} +2 -2
- package/dist/{cli-1nd4339b.js → cli-tca7sztv.js} +2 -2
- package/dist/cli.js +29 -108
- package/dist/{doctor-1hhktzsz.js → doctor-t0b99wnq.js} +7 -7
- package/dist/{harness-github-actions-1hq2ed0v.js → harness-github-actions-e4zrcrym.js} +5 -5
- package/dist/{harness-7s0w2wc9.js → harness-phdj0eqr.js} +5 -5
- package/dist/{index-9adksf01.js → index-65grk0mp.js} +5 -5
- package/dist/{index-n1jx9hta.js → index-86wb6vbh.js} +6 -6
- package/dist/{index-2g0ft2hm.js → index-zhg2zc3x.js} +13 -13
- package/dist/{production-intelligence-8w7an97c.js → production-intelligence-31p18dfx.js} +3 -3
- package/dist/{profile-commands-zgq8dja0.js → profile-commands-tz3jykvh.js} +4 -4
- package/dist/{prompt-attribution-c1a5pysf.js → prompt-attribution-8ak38a3q.js} +5 -5
- package/dist/prompt-source-mcp.js +5 -5
- package/dist/{prompts-fdqrbawx.js → prompts-a8zcvc1c.js} +5 -5
- package/dist/{provision-d0sxcka1.js → provision-2dzzb0be.js} +5 -5
- package/dist/{registry-vxrxw1tj.js → registry-p07epn79.js} +22 -18
- package/dist/skills-5atq9sgh.js +17 -0
- package/dist/{skills-bundled-7jes6hqx.js → skills-bundled-tcxpw88n.js} +2 -2
- package/dist/{sync-gxgpfztm.js → sync-e76vmfty.js} +10 -12
- package/package.json +1 -1
- package/skills/integration/index.json +2 -2
- package/skills/moda-cli/SKILL.md +1 -1
- package/skills/moda-cli/references/commands.md +2 -2
- package/skills/moda-cli/references/dashboard-parity.md +1 -1
- package/skills/moda-cli/references/output-protocol.md +4 -4
- package/skills/moda-cli/references/registry.md +1 -3
- package/dist/cli-h7hfpmwa.js +0 -1019
- package/dist/cli-qm5b1vck.js +0 -220
- package/dist/skills-rjbnv8nn.js +0 -23
package/dist/cli-qm5b1vck.js
DELETED
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
// src/skills-manifest.ts
|
|
2
|
-
import {
|
|
3
|
-
existsSync,
|
|
4
|
-
mkdirSync,
|
|
5
|
-
readdirSync,
|
|
6
|
-
readFileSync,
|
|
7
|
-
rmdirSync,
|
|
8
|
-
unlinkSync,
|
|
9
|
-
writeFileSync
|
|
10
|
-
} from "node:fs";
|
|
11
|
-
import { dirname, isAbsolute, join, normalize, relative, resolve } from "node:path";
|
|
12
|
-
var SKILLS_MANIFEST_PATH = join(".moda", "skills.yml");
|
|
13
|
-
var SKILL_SOURCE_HARNESS = "moda";
|
|
14
|
-
var SKILL_SOURCE_INTEGRATION_BUNDLED = "integration-bundled";
|
|
15
|
-
function readSkillsManifest(cwd) {
|
|
16
|
-
const manifestPath = join(cwd, SKILLS_MANIFEST_PATH);
|
|
17
|
-
if (!existsSync(manifestPath))
|
|
18
|
-
return null;
|
|
19
|
-
let text = "";
|
|
20
|
-
try {
|
|
21
|
-
text = readFileSync(manifestPath, "utf8");
|
|
22
|
-
} catch {
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
return {
|
|
26
|
-
tenantId: readYamlScalar(text, "tenant_id"),
|
|
27
|
-
generationRunId: readYamlScalar(text, "generation_run_id"),
|
|
28
|
-
generationVersion: Number(readYamlScalar(text, "generation_version") || 0),
|
|
29
|
-
releaseKey: readYamlScalar(text, "release_key"),
|
|
30
|
-
statusFilter: readYamlScalar(text, "status_filter"),
|
|
31
|
-
releasedAt: readYamlScalar(text, "released_at"),
|
|
32
|
-
managedPaths: readManagedPaths(text),
|
|
33
|
-
records: readSkillRecords(text)
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
function manifestHeaderFrom(manifest) {
|
|
37
|
-
return {
|
|
38
|
-
tenantId: manifest?.tenantId ?? "",
|
|
39
|
-
releaseKey: manifest?.releaseKey ?? "",
|
|
40
|
-
statusFilter: manifest?.statusFilter ?? "",
|
|
41
|
-
generationRunId: manifest?.generationRunId ?? "",
|
|
42
|
-
generationVersion: manifest?.generationVersion ?? 0,
|
|
43
|
-
releasedAt: manifest?.releasedAt ?? ""
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function writeSkillsManifest(cwd, header, records) {
|
|
47
|
-
const manifestPath = join(cwd, SKILLS_MANIFEST_PATH);
|
|
48
|
-
const managedPaths = [...new Set(records.flatMap((record) => record.paths))].sort();
|
|
49
|
-
const lines = [
|
|
50
|
-
"version: 1",
|
|
51
|
-
"source: moda",
|
|
52
|
-
`tenant_id: ${yamlQuote(header.tenantId)}`,
|
|
53
|
-
`release_key: ${yamlQuote(header.releaseKey)}`,
|
|
54
|
-
`status_filter: ${yamlQuote(header.statusFilter)}`,
|
|
55
|
-
`generation_run_id: ${yamlQuote(header.generationRunId)}`,
|
|
56
|
-
`generation_version: ${header.generationVersion}`,
|
|
57
|
-
`released_at: ${yamlQuote(header.releasedAt)}`,
|
|
58
|
-
`installed_at: ${yamlQuote(new Date().toISOString())}`,
|
|
59
|
-
"managed_paths:",
|
|
60
|
-
...managedPaths.map((path) => ` - ${yamlQuote(path)}`),
|
|
61
|
-
"skills:",
|
|
62
|
-
...records.flatMap((record) => [
|
|
63
|
-
` - skill_id: ${yamlQuote(record.skillId)}`,
|
|
64
|
-
` content_hash: ${yamlQuote(record.contentHash)}`,
|
|
65
|
-
` source: ${yamlQuote(record.source)}`,
|
|
66
|
-
" paths:",
|
|
67
|
-
...record.paths.map((path) => ` - ${yamlQuote(path)}`)
|
|
68
|
-
]),
|
|
69
|
-
""
|
|
70
|
-
];
|
|
71
|
-
mkdirSync(dirname(manifestPath), { recursive: true });
|
|
72
|
-
writeFileSync(manifestPath, lines.join(`
|
|
73
|
-
`));
|
|
74
|
-
}
|
|
75
|
-
function upsertSkillManifestRecord(cwd, record) {
|
|
76
|
-
const manifest = readSkillsManifest(cwd);
|
|
77
|
-
const records = (manifest?.records ?? []).filter((existing) => !(existing.skillId === record.skillId && existing.source === record.source));
|
|
78
|
-
records.push(record);
|
|
79
|
-
writeSkillsManifest(cwd, manifestHeaderFrom(manifest), records);
|
|
80
|
-
}
|
|
81
|
-
function pruneManagedSkillPaths(cwd, managedPaths, log) {
|
|
82
|
-
let pruned = 0;
|
|
83
|
-
for (const rawPath of [...new Set(managedPaths)]) {
|
|
84
|
-
const safePath = safeManagedRelativePath(rawPath);
|
|
85
|
-
if (!safePath)
|
|
86
|
-
continue;
|
|
87
|
-
const absolutePath = absoluteManagedPath(cwd, safePath);
|
|
88
|
-
if (!absolutePath || !existsSync(absolutePath))
|
|
89
|
-
continue;
|
|
90
|
-
try {
|
|
91
|
-
unlinkSync(absolutePath);
|
|
92
|
-
pruned++;
|
|
93
|
-
log(` pruned ${safePath}`);
|
|
94
|
-
pruneEmptyClaudeSkillDir(cwd, safePath);
|
|
95
|
-
} catch {}
|
|
96
|
-
}
|
|
97
|
-
return pruned;
|
|
98
|
-
}
|
|
99
|
-
function pruneEmptyClaudeSkillDir(cwd, relativePath) {
|
|
100
|
-
if (!relativePath.startsWith(".claude/skills/") || !relativePath.endsWith("/SKILL.md"))
|
|
101
|
-
return;
|
|
102
|
-
const dir = dirname(join(cwd, relativePath));
|
|
103
|
-
try {
|
|
104
|
-
if (existsSync(dir) && readdirSync(dir).length === 0) {
|
|
105
|
-
rmdirSync(dir);
|
|
106
|
-
}
|
|
107
|
-
} catch {}
|
|
108
|
-
}
|
|
109
|
-
function absoluteManagedPath(cwd, relativePath) {
|
|
110
|
-
const abs = resolve(cwd, relativePath);
|
|
111
|
-
const root = resolve(cwd);
|
|
112
|
-
const rel = relative(root, abs);
|
|
113
|
-
if (rel.startsWith("..") || isAbsolute(rel))
|
|
114
|
-
return null;
|
|
115
|
-
return abs;
|
|
116
|
-
}
|
|
117
|
-
function safeManagedRelativePath(rawPath) {
|
|
118
|
-
if (!rawPath || rawPath.includes("\x00") || isAbsolute(rawPath))
|
|
119
|
-
return null;
|
|
120
|
-
const normalized = normalize(rawPath).replace(/\\/g, "/");
|
|
121
|
-
if (normalized.startsWith("../") || normalized === ".." || normalized.includes("/../"))
|
|
122
|
-
return null;
|
|
123
|
-
const isClaudeSkill = normalized.startsWith(".claude/skills/") && normalized.endsWith("/SKILL.md");
|
|
124
|
-
const isCursorRule = normalized.startsWith(".cursor/rules/") && normalized.endsWith(".mdc");
|
|
125
|
-
return isClaudeSkill || isCursorRule ? normalized : null;
|
|
126
|
-
}
|
|
127
|
-
function readYamlScalar(text, key) {
|
|
128
|
-
const match = text.match(new RegExp(`^${key}:\\s*(.*?)\\s*$`, "m"));
|
|
129
|
-
return match ? parseYamlScalar(match[1]) : "";
|
|
130
|
-
}
|
|
131
|
-
function readSkillRecords(text) {
|
|
132
|
-
const records = [];
|
|
133
|
-
let inSkills = false;
|
|
134
|
-
let current = null;
|
|
135
|
-
let inPaths = false;
|
|
136
|
-
for (const line of text.split(/\r?\n/)) {
|
|
137
|
-
if (line.trim() === "skills:") {
|
|
138
|
-
inSkills = true;
|
|
139
|
-
continue;
|
|
140
|
-
}
|
|
141
|
-
if (!inSkills)
|
|
142
|
-
continue;
|
|
143
|
-
if (line.length > 0 && !line.startsWith(" "))
|
|
144
|
-
break;
|
|
145
|
-
const skillIdMatch = line.match(/^ {2}- skill_id:\s*(.*?)\s*$/);
|
|
146
|
-
if (skillIdMatch) {
|
|
147
|
-
if (current)
|
|
148
|
-
records.push(current);
|
|
149
|
-
current = {
|
|
150
|
-
skillId: parseYamlScalar(skillIdMatch[1]),
|
|
151
|
-
contentHash: "",
|
|
152
|
-
source: SKILL_SOURCE_HARNESS,
|
|
153
|
-
paths: []
|
|
154
|
-
};
|
|
155
|
-
inPaths = false;
|
|
156
|
-
continue;
|
|
157
|
-
}
|
|
158
|
-
if (!current)
|
|
159
|
-
continue;
|
|
160
|
-
const hashMatch = line.match(/^ {4}content_hash:\s*(.*?)\s*$/);
|
|
161
|
-
if (hashMatch) {
|
|
162
|
-
current.contentHash = parseYamlScalar(hashMatch[1]);
|
|
163
|
-
continue;
|
|
164
|
-
}
|
|
165
|
-
const sourceMatch = line.match(/^ {4}source:\s*(.*?)\s*$/);
|
|
166
|
-
if (sourceMatch) {
|
|
167
|
-
current.source = parseYamlScalar(sourceMatch[1]) || SKILL_SOURCE_HARNESS;
|
|
168
|
-
continue;
|
|
169
|
-
}
|
|
170
|
-
if (/^ {4}paths:\s*$/.test(line)) {
|
|
171
|
-
inPaths = true;
|
|
172
|
-
continue;
|
|
173
|
-
}
|
|
174
|
-
const pathMatch = inPaths ? line.match(/^ {6}-\s*(.*?)\s*$/) : null;
|
|
175
|
-
if (pathMatch) {
|
|
176
|
-
const value = parseYamlScalar(pathMatch[1]);
|
|
177
|
-
if (value)
|
|
178
|
-
current.paths.push(value);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
if (current)
|
|
182
|
-
records.push(current);
|
|
183
|
-
return records;
|
|
184
|
-
}
|
|
185
|
-
function readManagedPaths(text) {
|
|
186
|
-
const paths = [];
|
|
187
|
-
let inManagedPaths = false;
|
|
188
|
-
for (const line of text.split(/\r?\n/)) {
|
|
189
|
-
if (line.trim() === "managed_paths:") {
|
|
190
|
-
inManagedPaths = true;
|
|
191
|
-
continue;
|
|
192
|
-
}
|
|
193
|
-
if (inManagedPaths && line.length > 0 && !line.startsWith(" "))
|
|
194
|
-
break;
|
|
195
|
-
if (!inManagedPaths)
|
|
196
|
-
continue;
|
|
197
|
-
const match = line.match(/^\s*-\s*(.*?)\s*$/);
|
|
198
|
-
if (match)
|
|
199
|
-
paths.push(parseYamlScalar(match[1]));
|
|
200
|
-
}
|
|
201
|
-
return paths.filter(Boolean);
|
|
202
|
-
}
|
|
203
|
-
function parseYamlScalar(raw) {
|
|
204
|
-
const value = raw.trim();
|
|
205
|
-
if (!value)
|
|
206
|
-
return "";
|
|
207
|
-
if (value.startsWith('"')) {
|
|
208
|
-
try {
|
|
209
|
-
return String(JSON.parse(value));
|
|
210
|
-
} catch {
|
|
211
|
-
return value.replace(/^"|"$/g, "");
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
return value.replace(/^'|'$/g, "");
|
|
215
|
-
}
|
|
216
|
-
function yamlQuote(value) {
|
|
217
|
-
return JSON.stringify(value);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
export { SKILL_SOURCE_HARNESS, SKILL_SOURCE_INTEGRATION_BUNDLED, readSkillsManifest, writeSkillsManifest, upsertSkillManifestRecord, pruneManagedSkillPaths };
|
package/dist/skills-rjbnv8nn.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
parseScopeInt,
|
|
3
|
-
pullSkills,
|
|
4
|
-
runSkillSync,
|
|
5
|
-
runSkillsCommand
|
|
6
|
-
} from "./cli-h7hfpmwa.js";
|
|
7
|
-
import"./cli-qm5b1vck.js";
|
|
8
|
-
import"./cli-rjav0vj1.js";
|
|
9
|
-
import"./cli-hcwdz9sd.js";
|
|
10
|
-
import"./cli-13zdcv4w.js";
|
|
11
|
-
import"./cli-2bhhk2nn.js";
|
|
12
|
-
import"./cli-e0kbye4s.js";
|
|
13
|
-
import"./cli-n9ng8mym.js";
|
|
14
|
-
import"./cli-1nd4339b.js";
|
|
15
|
-
import"./cli-k4tqwah4.js";
|
|
16
|
-
import"./cli-0semcakc.js";
|
|
17
|
-
import"./cli-0v6na3yp.js";
|
|
18
|
-
export {
|
|
19
|
-
runSkillsCommand,
|
|
20
|
-
runSkillSync,
|
|
21
|
-
pullSkills,
|
|
22
|
-
parseScopeInt
|
|
23
|
-
};
|