@agent-ix/quoin 0.5.2 → 0.5.3
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/{cli-BtnMrpcK.js → cli-COr-fGKh.js} +109 -106
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { existsSync as e, readFileSync as t, readdirSync as n, rmSync as r, statSync as i } from "node:fs";
|
|
2
2
|
import { basename as a, dirname as o, join as s, resolve as c } from "node:path";
|
|
3
3
|
import { fileURLToPath as l } from "node:url";
|
|
4
|
-
import { configureRuntimeContext as u,
|
|
5
|
-
import { homedir as
|
|
6
|
-
import { parse as
|
|
7
|
-
import { installEntry as ee, readRegistry as
|
|
4
|
+
import { configureRuntimeContext as u, maybeOfferUpdate as d, runSelfUpdate as f } from "@agent-ix/ix-cli-core";
|
|
5
|
+
import { homedir as p } from "node:os";
|
|
6
|
+
import { parse as m } from "yaml";
|
|
7
|
+
import { installEntry as ee, readRegistry as h, reconcile as te, validateMarketplaceManifest as g, writeRegistry as ne } from "@agent-ix/ts-plugin-kit";
|
|
8
8
|
import { spawn as re } from "node:child_process";
|
|
9
9
|
//#region src/catalog.ts
|
|
10
|
-
function
|
|
11
|
-
return process.env.IX_HOME && process.env.IX_HOME.length > 0 ? process.env.IX_HOME : s(
|
|
10
|
+
function _() {
|
|
11
|
+
return process.env.IX_HOME && process.env.IX_HOME.length > 0 ? process.env.IX_HOME : s(p(), ".ix");
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function v(e = _()) {
|
|
14
14
|
return s(e, "filament", "modules");
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function y(t = _()) {
|
|
17
17
|
let r = [], i = process.env.QUOIN_MODULE_PATHS;
|
|
18
18
|
i && r.push(...i.split(":").filter(Boolean));
|
|
19
|
-
let a =
|
|
19
|
+
let a = v(t);
|
|
20
20
|
if (e(a)) for (let e of n(a)) r.push(s(a, e));
|
|
21
21
|
return r;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function b(e = y()) {
|
|
24
24
|
let n = [], r = [], i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
25
25
|
for (let c of e) {
|
|
26
|
-
let e =
|
|
26
|
+
let e = C(c);
|
|
27
27
|
if (!e || i.has(e)) continue;
|
|
28
28
|
i.add(e);
|
|
29
|
-
let l =
|
|
29
|
+
let l = m(t(s(e, "manifest.yaml"), "utf8")), u = E(l.name) ?? a(e);
|
|
30
30
|
if (o.has(u)) continue;
|
|
31
31
|
o.add(u);
|
|
32
|
-
let d =
|
|
32
|
+
let d = T(l.artifact_types), f = T(l.object_types);
|
|
33
33
|
n.push({
|
|
34
34
|
name: u,
|
|
35
|
-
version:
|
|
35
|
+
version: E(l.version),
|
|
36
36
|
root: e,
|
|
37
37
|
artifactTypes: d.map((e) => String(e.name)),
|
|
38
38
|
objectTypes: f.map((e) => String(e.name))
|
|
39
39
|
});
|
|
40
40
|
for (let t of d) {
|
|
41
|
-
let n = String(t.name), i =
|
|
41
|
+
let n = String(t.name), i = E(t.frontmatter_schema_ref);
|
|
42
42
|
r.push({
|
|
43
43
|
name: n,
|
|
44
44
|
kind: "artifact",
|
|
@@ -46,7 +46,7 @@ function y(e = v()) {
|
|
|
46
46
|
moduleRoot: e,
|
|
47
47
|
schemaRef: i,
|
|
48
48
|
schemaPath: i ? s(e, i) : void 0,
|
|
49
|
-
skeletonPath:
|
|
49
|
+
skeletonPath: w(e, n)
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
for (let t of f) {
|
|
@@ -56,24 +56,24 @@ function y(e = v()) {
|
|
|
56
56
|
kind: "object",
|
|
57
57
|
moduleName: u,
|
|
58
58
|
moduleRoot: e,
|
|
59
|
-
skeletonPath:
|
|
59
|
+
skeletonPath: w(e, n)
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
return {
|
|
64
64
|
modules: n,
|
|
65
65
|
entries: r,
|
|
66
|
-
duplicates:
|
|
66
|
+
duplicates: ie(r)
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
let n =
|
|
71
|
-
return e.entries.find((e) =>
|
|
69
|
+
function x(e, t) {
|
|
70
|
+
let n = S(t);
|
|
71
|
+
return e.entries.find((e) => S(e.name) === n);
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function S(e) {
|
|
74
74
|
return e.toLowerCase();
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function C(t) {
|
|
77
77
|
let r = c(t);
|
|
78
78
|
if (e(r)) {
|
|
79
79
|
if (e(s(r, "manifest.yaml"))) return r;
|
|
@@ -83,16 +83,16 @@ function ie(t) {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function w(t, n) {
|
|
87
87
|
return [s(t, "skeletons", `${n}.md`), s(t, "skeletons", `${n.toLowerCase()}.md`)].find((t) => e(t));
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function T(e) {
|
|
90
90
|
return Array.isArray(e) ? e.filter((e) => !!e && typeof e == "object" && "name" in e) : [];
|
|
91
91
|
}
|
|
92
|
-
function
|
|
92
|
+
function E(e) {
|
|
93
93
|
return typeof e == "string" ? e : void 0;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function ie(e) {
|
|
96
96
|
let t = /* @__PURE__ */ new Map();
|
|
97
97
|
for (let n of e) {
|
|
98
98
|
let e = `${n.kind}:${n.name}`, r = t.get(e) ?? /* @__PURE__ */ new Set();
|
|
@@ -109,19 +109,19 @@ function T(e) {
|
|
|
109
109
|
}
|
|
110
110
|
//#endregion
|
|
111
111
|
//#region src/plugins.ts
|
|
112
|
-
function
|
|
112
|
+
function D(e = _()) {
|
|
113
113
|
return s(e, "filament", "registry.json");
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function O(e) {
|
|
116
116
|
return {
|
|
117
117
|
cacheRoot: s(e, "cache", "ts-plugin-kit"),
|
|
118
|
-
targetRoot:
|
|
119
|
-
registryPath:
|
|
120
|
-
readName:
|
|
118
|
+
targetRoot: v(e),
|
|
119
|
+
registryPath: D(e),
|
|
120
|
+
readName: N,
|
|
121
121
|
materialize: "copy"
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function k(e) {
|
|
125
125
|
if (e.startsWith("path:")) return {
|
|
126
126
|
type: "path",
|
|
127
127
|
path: e.slice(5)
|
|
@@ -155,46 +155,46 @@ function O(e) {
|
|
|
155
155
|
path: e
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
function
|
|
159
|
-
return ee({ source:
|
|
158
|
+
function A(e, t = _()) {
|
|
159
|
+
return ee({ source: k(e) }, O(t));
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
return
|
|
161
|
+
function j(e = _()) {
|
|
162
|
+
return h(D(e)).plugins;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
let n =
|
|
166
|
-
r(s(
|
|
164
|
+
function M(e, t = _()) {
|
|
165
|
+
let n = h(D(t));
|
|
166
|
+
r(s(v(t), e), {
|
|
167
167
|
force: !0,
|
|
168
168
|
recursive: !0
|
|
169
|
-
}), ne(
|
|
169
|
+
}), ne(D(t), {
|
|
170
170
|
schemaVersion: 1,
|
|
171
171
|
plugins: n.plugins.filter((t) => t.name !== e)
|
|
172
172
|
});
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function N(n) {
|
|
175
175
|
let r = e(s(n, "manifest.yaml")) ? s(n, "manifest.yaml") : s(n, a(n), "manifest.yaml");
|
|
176
176
|
if (!e(r)) throw Error(`no manifest.yaml found under ${n}`);
|
|
177
|
-
let i =
|
|
177
|
+
let i = m(t(r, "utf8"));
|
|
178
178
|
if (typeof i.name != "string" || i.name.length === 0) throw Error(`manifest ${r} has no name`);
|
|
179
179
|
return i.name;
|
|
180
180
|
}
|
|
181
181
|
//#endregion
|
|
182
182
|
//#region src/modules.ts
|
|
183
|
-
function
|
|
183
|
+
function P() {
|
|
184
184
|
return o(o(l(import.meta.url)));
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
return
|
|
186
|
+
function F() {
|
|
187
|
+
return g(m(t(s(P(), "default-modules.yaml"), "utf8")));
|
|
188
188
|
}
|
|
189
|
-
function
|
|
190
|
-
|
|
191
|
-
...
|
|
189
|
+
function I(e = _(), t = F()) {
|
|
190
|
+
te(t, {
|
|
191
|
+
...O(e),
|
|
192
192
|
mode: "lazy"
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
195
|
//#endregion
|
|
196
196
|
//#region src/flows.ts
|
|
197
|
-
var
|
|
197
|
+
var L = {
|
|
198
198
|
review: {
|
|
199
199
|
packageSkill: "spec-review",
|
|
200
200
|
runtimeSkill: "review"
|
|
@@ -208,11 +208,11 @@ var I = {
|
|
|
208
208
|
runtimeSkill: "to-plan"
|
|
209
209
|
}
|
|
210
210
|
};
|
|
211
|
-
function
|
|
212
|
-
return Object.keys(
|
|
211
|
+
function R() {
|
|
212
|
+
return Object.keys(L);
|
|
213
213
|
}
|
|
214
|
-
async function
|
|
215
|
-
let n =
|
|
214
|
+
async function ae(e, t = {}) {
|
|
215
|
+
let n = oe(e), r = _(), i = [
|
|
216
216
|
"run",
|
|
217
217
|
e,
|
|
218
218
|
"--path",
|
|
@@ -224,16 +224,16 @@ async function R(e, t = {}) {
|
|
|
224
224
|
];
|
|
225
225
|
t.id && i.push("--id", t.id), t.json && i.push("--json");
|
|
226
226
|
for (let e of t.target ?? []) i.push("--target", e);
|
|
227
|
-
await
|
|
227
|
+
await B(i);
|
|
228
228
|
}
|
|
229
|
-
function
|
|
230
|
-
let n =
|
|
229
|
+
function oe(t) {
|
|
230
|
+
let n = L[t];
|
|
231
231
|
if (!n) throw Error(`unknown spec flow ${t}`);
|
|
232
232
|
let r = [
|
|
233
233
|
process.env.IX_SPEC_WORKFLOWS_ROOT,
|
|
234
|
-
|
|
234
|
+
z(),
|
|
235
235
|
s(o(c(process.cwd())), "ix-spec-workflows"),
|
|
236
|
-
s(
|
|
236
|
+
s(p(), ".ix", "plugins", "ix-spec-workflows")
|
|
237
237
|
].filter((e) => !!e);
|
|
238
238
|
for (let t of r) {
|
|
239
239
|
let r = s(t, n.packageSkill, "workflow-assets", "skills", n.runtimeSkill);
|
|
@@ -241,10 +241,10 @@ function z(t) {
|
|
|
241
241
|
}
|
|
242
242
|
throw Error(`could not find ix-spec workflow skill ${n.runtimeSkill}; set IX_SPEC_WORKFLOWS_ROOT`);
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function z() {
|
|
245
245
|
return s(o(o(l(import.meta.url))), "skills");
|
|
246
246
|
}
|
|
247
|
-
async function
|
|
247
|
+
async function B(e) {
|
|
248
248
|
await new Promise((t, n) => {
|
|
249
249
|
let r = re("ix-flow", e, { stdio: "inherit" });
|
|
250
250
|
r.on("error", n), r.on("close", (e) => {
|
|
@@ -258,28 +258,28 @@ async function V(e) {
|
|
|
258
258
|
}
|
|
259
259
|
//#endregion
|
|
260
260
|
//#region src/write.ts
|
|
261
|
-
function
|
|
261
|
+
function V(e) {
|
|
262
262
|
return (Array.isArray(e) ? e : e ? [e] : []).flatMap((e) => e.split(",")).map((e) => e.trim()).filter(Boolean);
|
|
263
263
|
}
|
|
264
|
-
function
|
|
264
|
+
function H(t, n, r) {
|
|
265
265
|
if (r.length === 0) throw Error("write requires --types <type[,type...]>");
|
|
266
266
|
let a = c(n);
|
|
267
267
|
if (!e(a) || !i(a).isDirectory()) throw Error(`write repo_dir is not a directory: ${n}`);
|
|
268
268
|
return {
|
|
269
269
|
repoRoot: a,
|
|
270
270
|
types: r.map((e) => {
|
|
271
|
-
let n =
|
|
271
|
+
let n = x(t, e);
|
|
272
272
|
if (!n) throw Error(`catalog type not found: ${e}\nAvailable types: ${t.entries.map((e) => e.name).sort((e, t) => e.localeCompare(t)).join(", ")}`);
|
|
273
|
-
return
|
|
273
|
+
return W(n);
|
|
274
274
|
}),
|
|
275
275
|
validation: {
|
|
276
|
-
command: `quire validate --scope ${
|
|
276
|
+
command: `quire validate --scope ${G(a)} "spec/**/*.md"`,
|
|
277
277
|
scope: a,
|
|
278
278
|
globs: ["spec/**/*.md"]
|
|
279
279
|
}
|
|
280
280
|
};
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function U(e) {
|
|
283
283
|
let t = [
|
|
284
284
|
"quoin write",
|
|
285
285
|
"",
|
|
@@ -290,7 +290,7 @@ function W(e) {
|
|
|
290
290
|
for (let n of e.types) t.push(`- ${n.name} (${n.kind})`), t.push(` module: ${n.moduleName}`), t.push(` module_root: ${n.moduleRoot}`), n.skeletonPath && t.push(` skeleton: ${n.skeletonPath}`), n.schemaPath && t.push(` schema: ${n.schemaPath}`), !n.skeletonPath && !n.schemaPath && t.push(" contract: manifest only");
|
|
291
291
|
return t.push(""), t.push("Author files directly in the repo, then validate changed spec files."), t.push(`Validate scope: ${e.validation.scope}`), t.push(`Validate command: ${e.validation.command}`), t.join("\n");
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function W(e) {
|
|
294
294
|
return {
|
|
295
295
|
name: e.name,
|
|
296
296
|
kind: e.kind,
|
|
@@ -300,76 +300,79 @@ function G(e) {
|
|
|
300
300
|
...e.skeletonPath ? { skeletonPath: e.skeletonPath } : {}
|
|
301
301
|
};
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function G(e) {
|
|
304
304
|
return /^[A-Za-z0-9_./:-]+$/.test(e) ? e : `'${e.replaceAll("'", "'\\''")}'`;
|
|
305
305
|
}
|
|
306
306
|
//#endregion
|
|
307
307
|
//#region src/cli.ts
|
|
308
|
-
var
|
|
309
|
-
async function
|
|
310
|
-
let t =
|
|
308
|
+
var K = "https://registry.npmjs.org/", q = "quoin\n\nSpec workflow and catalog CLI for Agent IX.\n\nquoin starts spec-domain work. ix-flow resumes, advances, acknowledges gates,\nand inspects workflow runs created by quoin.\n\nDefault modules (installed on first use into ~/.ix/filament/modules):\n Artifact modules: spec-artifacts-iso, spec-artifacts-app, spec-artifacts-process\n Object modules: spec-objects-business, spec-objects-architecture,\n spec-objects-enterprise, spec-objects-operational,\n spec-objects-security\n Workflows: review, matrix, to-plan\n\nUsage:\n quoin write <repo_dir> --types <type[,type...]>\n quoin catalog list|validate\n quoin catalog show <type>\n quoin plugin install <path:...|github:...>\n quoin plugin list\n quoin plugin remove <name>\n quoin review|matrix|to-plan [--target <ref>...]\n quoin update [--check] [--registry <url>]\n\nGlobal flags:\n --json\n --config-root <dir> Defaults to ~/.ix\n\nExamples:\n quoin catalog list\n quoin catalog show FR\n quoin plugin install github:agent-ix/spec-objects-custom\n quoin write . --types FR,domain\n ix-flow status <run-id>\n", J = "quoin write\n\nBuild an authoring pack for spec files an agent is about to create or edit.\n\nPass the target repository and the artifact/object types involved in the work.\nquoin resolves those types from the active catalog and returns the local\nskeletons, schemas, module roots, and Quire validation command for the repo.\n\nUsage:\n quoin write <repo_dir> --types <type[,type...]>\n\nExamples:\n quoin write . --types FR\n quoin write . --types FR,domain,entity\n quoin write ../my-service --types fr,DOMAIN --json\n\nNotes:\n - Type lookup is case-insensitive; FR and fr are the same type.\n - Types can be artifacts or objects from the default module set or plugins.\n - Use the returned skeletons and schemas as the authoring contract.\n - Run the returned Quire command after editing spec files.\n", se = "quoin catalog\n\nInspect the active artifact/object catalog.\n\nThe catalog is assembled from, in order:\n 1. QUOIN_MODULE_PATHS\n 2. modules installed under ~/.ix/filament/modules\n\nThe default module set is installed there automatically on first catalog access,\nand updated by \"quoin plugin install\". The same directory is read by quire-rs.\n\nDefault artifact modules:\n spec-artifacts-iso FR, NFR, StR, US, IT, TC, AC, CON, Spec\n spec-artifacts-app app-level artifacts\n spec-artifacts-process plans, reviews, matrices, ADRs, tasks, findings\n\nDefault object modules:\n spec-objects-business\n spec-objects-architecture\n spec-objects-enterprise\n spec-objects-operational\n spec-objects-security\n\nUsage:\n quoin catalog list\n quoin catalog show <type>\n quoin catalog validate\n\nExamples:\n quoin catalog show FR\n quoin catalog show entity\n quoin catalog validate --json\n", ce = "quoin plugin\n\nInstall and manage user/community spec modules.\n\nPlugins add or override artifact/object modules under ~/.ix/filament/modules.\nUse \"catalog list\" to see the full active catalog, including default modules and\nplugins.\n\nSupported install sources:\n path:<dir> Use a local directory containing manifest.yaml\n github:<owner>/<repo> Clone a GitHub repository (manifest at root)\n github:<owner>/<repo>@<ref> Pin to a tag, branch, or sha\n github:<owner>/<repo>//<subdir> Manifest in a monorepo subdirectory (@<ref> ok)\n package:<name> Install a module from an npm package (manifest at root)\n package:<name>@<version> Pin to an npm version\n\nUsage:\n quoin plugin install <path:...|github:...|package:...>\n quoin plugin list\n quoin plugin remove <name>\n quoin plugin ensure-defaults\n\nExamples:\n quoin plugin install path:../spec-objects-custom\n quoin plugin install github:agent-ix/spec-objects-custom\n quoin plugin install github:agent-ix/spec-objects-security//spec_objects_security@v0.1.1\n quoin plugin install package:@agent-ix/spec-objects-security@0.4.0\n quoin plugin list\n quoin plugin ensure-defaults\n", le = "quoin update\n\nCheck for and install the latest published quoin.\n\nquoin is distributed on the public npm registry as @agent-ix/quoin. This command\nqueries the registry for the latest version, compares it to the running version,\nand (unless --check) runs npm install -g to upgrade in place.\n\nUsage:\n quoin update [--check] [--registry <url>]\n\nFlags:\n --check Report whether an update is available; do not install.\n --registry <url> Force an npm registry to query/install from. Defaults\n to the public npm registry\n (https://registry.npmjs.org/), where @agent-ix/quoin is\n published. Pass http://npm.ix/ for local dev snapshots.\n\nExamples:\n quoin update\n quoin update --check\n quoin update --registry http://npm.ix/\n", Y = "quoin workflows\n\nStart bundled spec review/planning workflows. quoin creates the workflow run in ~/.ix/flows.\nUse ix-flow to inspect, resume, advance phases, and acknowledge human gates.\n\nAvailable workflow launchers:\n review Run a composite spec review\n matrix Build or update a requirements test matrix\n to-plan Convert accepted requirements into an implementation plan\n\nUsage:\n quoin review|matrix|to-plan [--target <ref>...]\n\nExamples:\n quoin review --target spec/\n quoin matrix --target spec/\n ix-flow status <run-id>\n ix-flow resume <run-id>\n";
|
|
309
|
+
async function ue(e) {
|
|
310
|
+
let t = _e(e);
|
|
311
311
|
if (t.flags.version || t.flags.v || t.command === "version") {
|
|
312
312
|
console.log(Z());
|
|
313
313
|
return;
|
|
314
314
|
}
|
|
315
315
|
if (!t.command) {
|
|
316
|
-
console.log(
|
|
316
|
+
console.log(q);
|
|
317
317
|
return;
|
|
318
318
|
}
|
|
319
319
|
if (t.flags.help || t.flags.h) {
|
|
320
|
-
console.log(
|
|
320
|
+
console.log(fe(t));
|
|
321
321
|
return;
|
|
322
322
|
}
|
|
323
|
-
let n = Q(t, "config-root") ??
|
|
323
|
+
let n = Q(t, "config-root") ?? _();
|
|
324
324
|
if (process.env.IX_HOME = n, u({
|
|
325
325
|
configRoot: n,
|
|
326
326
|
configNamespace: "ix",
|
|
327
327
|
projectConfigRoot: `${process.cwd()}/.ix`,
|
|
328
328
|
projectConfigEnabled: t.flags["no-project-config"] !== !0
|
|
329
|
-
}), t.command
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
if (
|
|
329
|
+
}), t.command !== "update" && t.flags.json !== !0 && await d({
|
|
330
|
+
packageName: "@agent-ix/quoin",
|
|
331
|
+
currentVersion: Z()
|
|
332
|
+
}), t.command === "update") return me(t);
|
|
333
|
+
if (t.command === "catalog") return he(t);
|
|
334
|
+
if (t.command === "plugin") return ge(t);
|
|
335
|
+
if (t.command === "write") return pe(t);
|
|
336
|
+
if (R().includes(t.command)) return ae(t.command, {
|
|
334
337
|
json: t.flags.json === !0,
|
|
335
338
|
id: Q(t, "id"),
|
|
336
339
|
target: $(t, "target")
|
|
337
340
|
});
|
|
338
|
-
throw Error(`unknown command ${t.command}\n\n${
|
|
341
|
+
throw Error(`unknown command ${t.command}\n\n${q}`);
|
|
339
342
|
}
|
|
340
|
-
function
|
|
343
|
+
function de() {
|
|
341
344
|
let e = o(o(l(import.meta.url))), n = JSON.parse(t(s(e, "package.json"), "utf8"));
|
|
342
345
|
if (typeof n.version != "string") throw Error("package.json version is missing");
|
|
343
346
|
return n.version;
|
|
344
347
|
}
|
|
345
348
|
function X(e) {
|
|
346
|
-
return e ||
|
|
349
|
+
return e || de();
|
|
347
350
|
}
|
|
348
351
|
function Z() {
|
|
349
|
-
return X("0.5.
|
|
350
|
-
}
|
|
351
|
-
function de(e) {
|
|
352
|
-
return e.command === "update" ? se : e.command === "write" ? Y : e.command === "catalog" ? ae : e.command === "plugin" ? oe : L().includes(e.command) ? ce : J;
|
|
352
|
+
return X("0.5.3-dirty");
|
|
353
353
|
}
|
|
354
354
|
function fe(e) {
|
|
355
|
+
return e.command === "update" ? le : e.command === "write" ? J : e.command === "catalog" ? se : e.command === "plugin" ? ce : R().includes(e.command) ? Y : q;
|
|
356
|
+
}
|
|
357
|
+
function pe(e) {
|
|
355
358
|
let [t] = e.positionals;
|
|
356
|
-
if (!t) throw Error(`write requires <repo_dir>\n\n${
|
|
357
|
-
|
|
358
|
-
let n =
|
|
359
|
-
console.log(e.flags.json ? JSON.stringify(n, null, 2) :
|
|
359
|
+
if (!t) throw Error(`write requires <repo_dir>\n\n${J}`);
|
|
360
|
+
I();
|
|
361
|
+
let n = H(b(), t, V($(e, "types")));
|
|
362
|
+
console.log(e.flags.json ? JSON.stringify(n, null, 2) : U(n));
|
|
360
363
|
}
|
|
361
|
-
async function
|
|
362
|
-
await
|
|
364
|
+
async function me(e) {
|
|
365
|
+
await f({
|
|
363
366
|
packageName: "@agent-ix/quoin",
|
|
364
367
|
currentVersion: Z(),
|
|
365
368
|
header: "quoin update",
|
|
366
|
-
registry: Q(e, "registry") ??
|
|
369
|
+
registry: Q(e, "registry") ?? K,
|
|
367
370
|
check: e.flags.check === !0
|
|
368
371
|
});
|
|
369
372
|
}
|
|
370
|
-
function
|
|
371
|
-
|
|
372
|
-
let t =
|
|
373
|
+
function he(e) {
|
|
374
|
+
I();
|
|
375
|
+
let t = b();
|
|
373
376
|
switch (e.subcommand) {
|
|
374
377
|
case "list":
|
|
375
378
|
case void 0:
|
|
@@ -382,7 +385,7 @@ function me(e) {
|
|
|
382
385
|
case "show": {
|
|
383
386
|
let [n] = e.positionals;
|
|
384
387
|
if (!n) throw Error("catalog show requires <type>");
|
|
385
|
-
let r =
|
|
388
|
+
let r = x(t, n);
|
|
386
389
|
if (!r) throw Error(`catalog type not found: ${n}`);
|
|
387
390
|
console.log(e.flags.json ? JSON.stringify(r, null, 2) : `${r.kind} ${r.name} from ${r.moduleName}\n${r.moduleRoot}`);
|
|
388
391
|
return;
|
|
@@ -403,34 +406,34 @@ function me(e) {
|
|
|
403
406
|
default: throw Error(`unknown catalog command ${e.subcommand}`);
|
|
404
407
|
}
|
|
405
408
|
}
|
|
406
|
-
function
|
|
409
|
+
function ge(e) {
|
|
407
410
|
switch (e.subcommand) {
|
|
408
411
|
case "list":
|
|
409
412
|
case void 0:
|
|
410
|
-
console.log(JSON.stringify({ plugins:
|
|
413
|
+
console.log(JSON.stringify({ plugins: j() }, null, 2));
|
|
411
414
|
return;
|
|
412
415
|
case "install": {
|
|
413
416
|
let [t] = e.positionals;
|
|
414
417
|
if (!t) throw Error("plugin install requires <source>");
|
|
415
|
-
console.log(JSON.stringify(
|
|
418
|
+
console.log(JSON.stringify(A(t), null, 2));
|
|
416
419
|
return;
|
|
417
420
|
}
|
|
418
421
|
case "remove": {
|
|
419
422
|
let [t] = e.positionals;
|
|
420
423
|
if (!t) throw Error("plugin remove requires <name>");
|
|
421
|
-
|
|
424
|
+
M(t), console.log(`removed ${t}`);
|
|
422
425
|
return;
|
|
423
426
|
}
|
|
424
427
|
case "ensure-defaults":
|
|
425
|
-
|
|
428
|
+
I(), console.log(JSON.stringify({
|
|
426
429
|
ensured: !0,
|
|
427
|
-
plugins:
|
|
430
|
+
plugins: j().map((e) => e.name)
|
|
428
431
|
}, null, 2));
|
|
429
432
|
return;
|
|
430
433
|
default: throw Error(`unknown plugin command ${e.subcommand}`);
|
|
431
434
|
}
|
|
432
435
|
}
|
|
433
|
-
function
|
|
436
|
+
function _e(e) {
|
|
434
437
|
let t = {}, n = [], r, i;
|
|
435
438
|
for (let a = 0; a < e.length; a++) {
|
|
436
439
|
let o = e[a];
|
|
@@ -455,4 +458,4 @@ function $(e, t) {
|
|
|
455
458
|
return Array.isArray(n) ? n : [];
|
|
456
459
|
}
|
|
457
460
|
//#endregion
|
|
458
|
-
export {
|
|
461
|
+
export { U as a, I as c, k as d, M as f, b as g, x as h, H as i, A as l, v as m, Z as n, V as o, y as p, X as r, F as s, ue as t, j as u };
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAyMA,wBAAsB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA6CxD;AAqBD,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC"}
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, r as t, t as n } from "./cli-
|
|
1
|
+
import { n as e, r as t, t as n } from "./cli-COr-fGKh.js";
|
|
2
2
|
export { n as main, e as packageVersion, t as resolveVersion };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, o as l, p as u, s as d, t as f, u as p } from "./cli-
|
|
1
|
+
import { a as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, o as l, p as u, s as d, t as f, u as p } from "./cli-COr-fGKh.js";
|
|
2
2
|
export { o as createAuthoringPack, u as defaultModuleRoots, d as defaultModulesManifest, t as ensureDefaultModules, c as filamentModulesDir, a as findCatalogEntry, e as formatAuthoringPack, s as installPlugin, p as listPlugins, i as loadCatalog, f as main, n as parseSourceArg, l as parseTypeList, r as removePlugin };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-ix/quoin",
|
|
3
3
|
"description": "Spec-driven development for Claude Code — author validated, ISO/IEC/IEEE 29148-aligned specs, then plan and build against them.",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"files": [
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"test-results:warnings": "./node_modules/.bin/jest-results warnings"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@agent-ix/ix-cli-core": ">=0.
|
|
60
|
+
"@agent-ix/ix-cli-core": ">=0.11.0",
|
|
61
61
|
"@agent-ix/ts-plugin-kit": ">=0.1.3",
|
|
62
62
|
"yaml": "^2.9.0"
|
|
63
63
|
},
|