@agent-ix/quoin 0.5.5 → 0.6.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.
Files changed (107) hide show
  1. package/.codex-plugin/plugin.json +18 -1
  2. package/bin/quoin.js +11 -5
  3. package/dist/base-B_MXqS0S.js +137 -0
  4. package/dist/base.d.ts +23 -0
  5. package/dist/base.d.ts.map +1 -0
  6. package/dist/cli.d.ts +17 -3
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +20 -2
  9. package/dist/commands/catalog/index.d.ts +2 -0
  10. package/dist/commands/catalog/index.d.ts.map +1 -0
  11. package/dist/commands/catalog/index.js +2 -0
  12. package/dist/commands/catalog/list.d.ts +11 -0
  13. package/dist/commands/catalog/list.d.ts.map +1 -0
  14. package/dist/commands/catalog/list.js +22 -0
  15. package/dist/commands/catalog/show.d.ts +13 -0
  16. package/dist/commands/catalog/show.d.ts.map +1 -0
  17. package/dist/commands/catalog/show.js +25 -0
  18. package/dist/commands/catalog/validate.d.ts +10 -0
  19. package/dist/commands/catalog/validate.d.ts.map +1 -0
  20. package/dist/commands/catalog/validate.js +27 -0
  21. package/dist/commands/config/doctor.d.ts +7 -0
  22. package/dist/commands/config/doctor.d.ts.map +1 -0
  23. package/dist/commands/config/doctor.js +15 -0
  24. package/dist/commands/config/edit.d.ts +7 -0
  25. package/dist/commands/config/edit.d.ts.map +1 -0
  26. package/dist/commands/config/edit.js +13 -0
  27. package/dist/commands/config/get.d.ts +11 -0
  28. package/dist/commands/config/get.d.ts.map +1 -0
  29. package/dist/commands/config/get.js +20 -0
  30. package/dist/commands/config/index.d.ts +2 -0
  31. package/dist/commands/config/index.d.ts.map +1 -0
  32. package/dist/commands/config/index.js +2 -0
  33. package/dist/commands/config/set.d.ts +12 -0
  34. package/dist/commands/config/set.d.ts.map +1 -0
  35. package/dist/commands/config/set.js +26 -0
  36. package/dist/commands/matrix.d.ts +14 -0
  37. package/dist/commands/matrix.d.ts.map +1 -0
  38. package/dist/commands/matrix.js +15 -0
  39. package/dist/commands/module/ensure-defaults.d.ts +8 -0
  40. package/dist/commands/module/ensure-defaults.d.ts.map +1 -0
  41. package/dist/commands/module/ensure-defaults.js +17 -0
  42. package/dist/commands/module/index.d.ts +2 -0
  43. package/dist/commands/module/index.d.ts.map +1 -0
  44. package/dist/commands/module/index.js +2 -0
  45. package/dist/commands/module/install.d.ts +11 -0
  46. package/dist/commands/module/install.d.ts.map +1 -0
  47. package/dist/commands/module/install.js +22 -0
  48. package/dist/commands/module/list.d.ts +8 -0
  49. package/dist/commands/module/list.d.ts.map +1 -0
  50. package/dist/commands/module/list.js +13 -0
  51. package/dist/commands/module/remove.d.ts +10 -0
  52. package/dist/commands/module/remove.d.ts.map +1 -0
  53. package/dist/commands/module/remove.js +16 -0
  54. package/dist/commands/plugin/deprecation.d.ts +10 -0
  55. package/dist/commands/plugin/deprecation.d.ts.map +1 -0
  56. package/dist/commands/plugin/ensure-defaults.d.ts +8 -0
  57. package/dist/commands/plugin/ensure-defaults.d.ts.map +1 -0
  58. package/dist/commands/plugin/ensure-defaults.js +12 -0
  59. package/dist/commands/plugin/index.d.ts +2 -0
  60. package/dist/commands/plugin/index.d.ts.map +1 -0
  61. package/dist/commands/plugin/index.js +2 -0
  62. package/dist/commands/plugin/install.d.ts +8 -0
  63. package/dist/commands/plugin/install.d.ts.map +1 -0
  64. package/dist/commands/plugin/install.js +12 -0
  65. package/dist/commands/plugin/list.d.ts +8 -0
  66. package/dist/commands/plugin/list.d.ts.map +1 -0
  67. package/dist/commands/plugin/list.js +12 -0
  68. package/dist/commands/plugin/remove.d.ts +8 -0
  69. package/dist/commands/plugin/remove.d.ts.map +1 -0
  70. package/dist/commands/plugin/remove.js +12 -0
  71. package/dist/commands/review.d.ts +14 -0
  72. package/dist/commands/review.d.ts.map +1 -0
  73. package/dist/commands/review.js +15 -0
  74. package/dist/commands/to-plan.d.ts +14 -0
  75. package/dist/commands/to-plan.d.ts.map +1 -0
  76. package/dist/commands/to-plan.js +15 -0
  77. package/dist/commands/update.d.ts +13 -0
  78. package/dist/commands/update.d.ts.map +1 -0
  79. package/dist/commands/update.js +34 -0
  80. package/dist/commands/write.d.ts +16 -0
  81. package/dist/commands/write.d.ts.map +1 -0
  82. package/dist/commands/write.js +33 -0
  83. package/dist/config-schema-Dp-vlxuR.js +13 -0
  84. package/dist/config-schema.d.ts +52 -0
  85. package/dist/config-schema.d.ts.map +1 -0
  86. package/dist/deprecation-fRxUHoxv.js +4 -0
  87. package/dist/flow-command-DTPkcpHy.js +88 -0
  88. package/dist/flow-command.d.ts +25 -0
  89. package/dist/flow-command.d.ts.map +1 -0
  90. package/dist/index.d.ts +6 -1
  91. package/dist/index.d.ts.map +1 -1
  92. package/dist/index.js +9 -2
  93. package/dist/modules-BcFs6dmB.js +22 -0
  94. package/dist/org.d.ts +61 -0
  95. package/dist/org.d.ts.map +1 -0
  96. package/dist/plugins-ica0OxAT.js +77 -0
  97. package/dist/version-BF9oqMYd.js +17 -0
  98. package/dist/version.d.ts +3 -0
  99. package/dist/version.d.ts.map +1 -0
  100. package/dist/write-CLwhJDM2.js +156 -0
  101. package/dist/write.d.ts +7 -1
  102. package/dist/write.d.ts.map +1 -1
  103. package/package.json +34 -3
  104. package/skills/specify/SKILL.md +5 -0
  105. package/skills/specify/assets/app-spec-template.md +1 -1
  106. package/skills/specify/assets/spec-template.md +1 -1
  107. package/dist/cli-DOC_L1Lg.js +0 -461
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,GACd,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,UAAU,EACV,SAAS,EACT,sBAAsB,EACtB,KAAK,SAAS,EACd,KAAK,WAAW,GACjB,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,kBAAkB,EAClB,KAAK,WAAW,GACjB,MAAM,oBAAoB,CAAC"}
package/dist/index.js CHANGED
@@ -1,2 +1,9 @@
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-DOC_L1Lg.js";
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 };
1
+ import { n as e, t } from "./version-BF9oqMYd.js";
2
+ import { isVersionRequest as n, main as r } from "./cli.js";
3
+ import { i, n as a, o, r as s, t as c } from "./base-B_MXqS0S.js";
4
+ import { a as l, i as u, n as d, r as f } from "./plugins-ica0OxAT.js";
5
+ import { n as p, t as m } from "./modules-BcFs6dmB.js";
6
+ import { i as h, n as g, r as _, t as v } from "./config-schema-Dp-vlxuR.js";
7
+ import { a as y, i as b, n as x, o as S, r as C, t as w } from "./write-CLwhJDM2.js";
8
+ import { t as T } from "./flow-command-DTPkcpHy.js";
9
+ export { T as FlowCommand, v as QUOIN_ENV_BINDINGS, g as QUOIN_PLUGIN_ID, c as QuoinCommand, _ as QuoinConfigSchema, b as UNRESOLVED_ORG_MESSAGE, w as createAuthoringPack, a as defaultModuleRoots, m as defaultModulesManifest, p as ensureDefaultModules, s as filamentModulesDir, i as findCatalogEntry, x as formatAuthoringPack, d as installPlugin, n as isVersionRequest, h as ixSchema, f as listPlugins, o as loadCatalog, r as main, y as originOrg, t as packageVersion, u as parseSourceArg, C as parseTypeList, l as removePlugin, S as resolveOrg, e as resolveVersion };
@@ -0,0 +1,22 @@
1
+ import { a as e } from "./base-B_MXqS0S.js";
2
+ import { t } from "./plugins-ica0OxAT.js";
3
+ import { readFileSync as n } from "node:fs";
4
+ import { dirname as r, join as i } from "node:path";
5
+ import { fileURLToPath as a } from "node:url";
6
+ import { parse as o } from "yaml";
7
+ import { reconcile as s, validateMarketplaceManifest as c } from "@agent-ix/ts-plugin-kit";
8
+ //#region src/modules.ts
9
+ function l() {
10
+ return r(r(a(import.meta.url)));
11
+ }
12
+ function u() {
13
+ return c(o(n(i(l(), "default-modules.yaml"), "utf8")));
14
+ }
15
+ function d(n = e(), r = u()) {
16
+ s(r, {
17
+ ...t(n),
18
+ mode: "lazy"
19
+ });
20
+ }
21
+ //#endregion
22
+ export { d as n, u as t };
package/dist/org.d.ts ADDED
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Where a resolved organization came from, or `none` when nothing yielded one.
3
+ *
4
+ * Reported alongside the organization itself so an author can tell an explicitly
5
+ * stated org from one inferred off the repository's remote.
6
+ */
7
+ export type OrgSource = "flag" | "env" | "config" | "git" | "none";
8
+ export interface ResolvedOrg {
9
+ /** The organization, or `undefined` when unresolved. */
10
+ org?: string;
11
+ source: OrgSource;
12
+ }
13
+ /** Message shown when no source yielded an organization (FR-025, NFR-003). */
14
+ export declare const UNRESOLVED_ORG_MESSAGE: string;
15
+ /**
16
+ * Resolve the authoring organization for a repository (FR-025).
17
+ *
18
+ * Precedence, first non-empty wins: the explicit `--org` value, `QUOIN_ORG`,
19
+ * the stored config, then the `origin` remote in the repository's git config.
20
+ *
21
+ * A stored value outranks the remote because it is something a person said,
22
+ * where the remote is only what quoin could infer — but it does not weaken the
23
+ * no-substitution rule below: a config file is an explicit statement, never a
24
+ * value quoin picked. `QUOIN_ORG` is declared to `ConfigService` as an env
25
+ * binding, so it is checked here only when a caller supplies its own `env`
26
+ * (tests); in the normal path ConfigService layers it over the file itself,
27
+ * keeping one precedence rule in one place.
28
+ *
29
+ * Deliberately returns `source: "none"` rather than substituting a default. An
30
+ * org qualifies a repository so same-named repos in different organizations stay
31
+ * distinguishable, so inventing one defeats the point of carrying it — and a
32
+ * declared org is human-facing identity in a published artifact, where a
33
+ * plausible-but-wrong value is harder to notice than an absent one that stops
34
+ * the author and asks. (quire-rs #15 made org a required, caller-supplied input
35
+ * for the same reason; this is quoin's half of that contract.)
36
+ *
37
+ * Note this is a deliberate divergence from filament-ide-rs's `repo_identity`,
38
+ * which falls back to a `local` sentinel — correct there, because a code-symbol
39
+ * qualifier must always produce some name.
40
+ */
41
+ export declare function resolveOrg(repoRoot: string, options?: {
42
+ flag?: string;
43
+ env?: NodeJS.ProcessEnv;
44
+ /**
45
+ * Project-local `.ix` layering overrides. Omit them in normal use:
46
+ * `BaseCommand.init` publishes the runtime context (honouring
47
+ * `--no-project-config`) and `ConfigService` falls back to it, so the
48
+ * project layer works without quoin threading anything. Supplied by tests
49
+ * that need a hermetic root.
50
+ */
51
+ projectConfigRoot?: string;
52
+ projectConfigEnabled?: boolean;
53
+ }): ResolvedOrg;
54
+ /**
55
+ * Parse the org out of the `[remote "origin"]` url in a git config.
56
+ *
57
+ * Handles both `git@host:org/repo.git` and `https://host/org/repo.git`. Exported
58
+ * for direct testing of the url forms.
59
+ */
60
+ export declare function originOrg(config: string): string | undefined;
61
+ //# sourceMappingURL=org.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"org.d.ts","sourceRoot":"","sources":["../src/org.ts"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;AAEnE,MAAM,WAAW,WAAW;IAC1B,wDAAwD;IACxD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,CAAC;CACnB;AAED,8EAA8E;AAC9E,eAAO,MAAM,sBAAsB,QAGoC,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,UAAU,CACxB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE;IACP,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAC3B,GACL,WAAW,CAuBb;AAwFD;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAmB5D"}
@@ -0,0 +1,77 @@
1
+ import { a as e, r as t } from "./base-B_MXqS0S.js";
2
+ import { existsSync as n, readFileSync as r, rmSync as i } from "node:fs";
3
+ import { basename as a, join as o } from "node:path";
4
+ import { parse as s } from "yaml";
5
+ import { installEntry as c, readRegistry as l, writeRegistry as u } from "@agent-ix/ts-plugin-kit";
6
+ //#region src/plugins.ts
7
+ function d(t = e()) {
8
+ return o(t, "filament", "registry.json");
9
+ }
10
+ function f(e) {
11
+ return {
12
+ cacheRoot: o(e, "cache", "ts-plugin-kit"),
13
+ targetRoot: t(e),
14
+ registryPath: d(e),
15
+ readName: _,
16
+ materialize: "copy"
17
+ };
18
+ }
19
+ function p(e) {
20
+ if (e.startsWith("path:")) return {
21
+ type: "path",
22
+ path: e.slice(5)
23
+ };
24
+ if (e.startsWith("github:")) {
25
+ let [t, n] = e.slice(7).split("@"), r = t.indexOf("//");
26
+ return r === -1 ? {
27
+ type: "github",
28
+ repo: t,
29
+ ref: n
30
+ } : {
31
+ type: "git-subdir",
32
+ url: t.slice(0, r),
33
+ path: t.slice(r + 2),
34
+ ref: n
35
+ };
36
+ }
37
+ if (e.startsWith("package:")) {
38
+ let t = e.slice(8), n = t.lastIndexOf("@");
39
+ return n > 0 ? {
40
+ type: "npm",
41
+ package: t.slice(0, n),
42
+ version: t.slice(n + 1)
43
+ } : {
44
+ type: "npm",
45
+ package: t
46
+ };
47
+ }
48
+ return {
49
+ type: "path",
50
+ path: e
51
+ };
52
+ }
53
+ function m(t, n = e()) {
54
+ return c({ source: p(t) }, f(n));
55
+ }
56
+ function h(t = e()) {
57
+ return l(d(t)).plugins;
58
+ }
59
+ function g(n, r = e()) {
60
+ let a = l(d(r));
61
+ i(o(t(r), n), {
62
+ force: !0,
63
+ recursive: !0
64
+ }), u(d(r), {
65
+ schemaVersion: 1,
66
+ plugins: a.plugins.filter((e) => e.name !== n)
67
+ });
68
+ }
69
+ function _(e) {
70
+ let t = n(o(e, "manifest.yaml")) ? o(e, "manifest.yaml") : o(e, a(e), "manifest.yaml");
71
+ if (!n(t)) throw Error(`no manifest.yaml found under ${e}`);
72
+ let i = s(r(t, "utf8"));
73
+ if (typeof i.name != "string" || i.name.length === 0) throw Error(`manifest ${t} has no name`);
74
+ return i.name;
75
+ }
76
+ //#endregion
77
+ export { g as a, p as i, m as n, h as r, f as t };
@@ -0,0 +1,17 @@
1
+ import { readFileSync as e } from "node:fs";
2
+ import { dirname as t, join as n } from "node:path";
3
+ import { fileURLToPath as r } from "node:url";
4
+ //#region src/version.ts
5
+ function i() {
6
+ let i = t(t(r(import.meta.url))), a = JSON.parse(e(n(i, "package.json"), "utf8"));
7
+ if (typeof a.version != "string") throw Error("package.json version is missing");
8
+ return a.version;
9
+ }
10
+ function a(e) {
11
+ return e || i();
12
+ }
13
+ function o() {
14
+ return a("0.6.0");
15
+ }
16
+ //#endregion
17
+ export { a as n, o as t };
@@ -0,0 +1,3 @@
1
+ export declare function resolveVersion(baked: string): string;
2
+ export declare function packageVersion(): string;
3
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAsBA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED,wBAAgB,cAAc,IAAI,MAAM,CAMvC"}
@@ -0,0 +1,156 @@
1
+ import { i as e } from "./base-B_MXqS0S.js";
2
+ import { n as t, r as n, t as r } from "./config-schema-Dp-vlxuR.js";
3
+ import { ConfigService as i } from "@agent-ix/ix-cli-core";
4
+ import { existsSync as a, readFileSync as o, statSync as s } from "node:fs";
5
+ import { join as c, resolve as l } from "node:path";
6
+ //#region src/org.ts
7
+ var u = "could not determine the authoring organization: no --org flag, no QUOIN_ORG, no stored config, and no [remote \"origin\"] in .git/config. Pass --org <name>, or store one with `quoin config set org <name>`.";
8
+ function d(e, t = {}) {
9
+ let n = t.flag?.trim();
10
+ if (n) return {
11
+ org: n,
12
+ source: "flag"
13
+ };
14
+ if (t.env) {
15
+ let e = t.env.QUOIN_ORG?.trim();
16
+ if (e) return {
17
+ org: e,
18
+ source: "env"
19
+ };
20
+ } else {
21
+ let e = f(t);
22
+ if (e) return {
23
+ org: e,
24
+ source: process.env.QUOIN_ORG?.trim() === e ? "env" : "config"
25
+ };
26
+ }
27
+ let r = p(e);
28
+ return r ? {
29
+ org: r,
30
+ source: "git"
31
+ } : { source: "none" };
32
+ }
33
+ function f(e) {
34
+ return i.forPlugin(t, n, {
35
+ envBindings: r,
36
+ ...e.projectConfigRoot ? { projectConfigRoot: e.projectConfigRoot } : {},
37
+ ...e.projectConfigEnabled === void 0 ? {} : { projectConfigEnabled: e.projectConfigEnabled }
38
+ }).get().org?.trim();
39
+ }
40
+ function p(e) {
41
+ let t = m(e);
42
+ if (t) try {
43
+ return h(o(c(t, "config"), "utf8"));
44
+ } catch {
45
+ return;
46
+ }
47
+ }
48
+ function m(e) {
49
+ let t = c(e, ".git"), n;
50
+ try {
51
+ n = s(t);
52
+ } catch {
53
+ return;
54
+ }
55
+ if (n.isDirectory()) return t;
56
+ try {
57
+ let n = o(t, "utf8").match(/^gitdir:\s*(.+)$/m)?.[1];
58
+ if (!n) return;
59
+ let r = l(e, n.trim());
60
+ try {
61
+ return l(r, o(c(r, "commondir"), "utf8").trim());
62
+ } catch {
63
+ return r;
64
+ }
65
+ } catch {
66
+ return;
67
+ }
68
+ }
69
+ function h(e) {
70
+ let t = !1;
71
+ for (let n of e.split("\n")) {
72
+ let e = n.trim();
73
+ if (e.startsWith("[")) {
74
+ t = e.replaceAll(/\s/g, "").toLowerCase().startsWith("[remote") && e.replaceAll(/\s/g, "").slice(7) === "\"origin\"]";
75
+ continue;
76
+ }
77
+ if (!t || !e.startsWith("url")) continue;
78
+ let r = e.slice(3).trimStart();
79
+ if (r.startsWith("=")) return g(r.slice(1).trim());
80
+ }
81
+ }
82
+ function g(e) {
83
+ let t, n = /^[A-Za-z][A-Za-z0-9+.-]*:\/\//.exec(e);
84
+ if (n) {
85
+ if (e.slice(0, n[0].length - 3).toLowerCase() === "file") return;
86
+ let r = e.slice(n[0].length).indexOf("/");
87
+ if (r === -1) return;
88
+ t = e.slice(n[0].length + r + 1);
89
+ } else if (!e.startsWith("/") && !e.startsWith(".") && !e.startsWith("~")) {
90
+ let n = e.indexOf(":");
91
+ if (n === -1) return;
92
+ t = e.slice(n + 1);
93
+ } else return;
94
+ let r = t.replace(/\/+$/, "").split("/").filter(Boolean);
95
+ if (!(r.length < 2)) return r[r.length - 2];
96
+ }
97
+ //#endregion
98
+ //#region src/write.ts
99
+ var _ = {
100
+ flag: "--org",
101
+ env: "QUOIN_ORG",
102
+ config: "stored config",
103
+ git: "git remote",
104
+ none: "nothing"
105
+ };
106
+ function v(e) {
107
+ return (Array.isArray(e) ? e : e ? [e] : []).flatMap((e) => e.split(",")).map((e) => e.trim()).filter(Boolean);
108
+ }
109
+ function y(t, n, r, i = {}) {
110
+ if (r.length === 0) throw Error("write requires --types <type[,type...]>");
111
+ let o = l(n);
112
+ if (!a(o) || !s(o).isDirectory()) throw Error(`write repo_dir is not a directory: ${n}`);
113
+ let c = r.map((n) => {
114
+ let r = e(t, n);
115
+ if (!r) throw Error(`catalog type not found: ${n}\nAvailable types: ${t.entries.map((e) => e.name).sort((e, t) => e.localeCompare(t)).join(", ")}`);
116
+ return x(r);
117
+ }), { org: u, source: f } = d(o, { flag: i.org });
118
+ return {
119
+ repoRoot: o,
120
+ ...u ? { org: u } : {},
121
+ orgSource: f,
122
+ types: c,
123
+ validation: {
124
+ command: `quire validate --scope ${S(o)} "spec/**/*.md"`,
125
+ scope: o,
126
+ globs: ["spec/**/*.md"]
127
+ }
128
+ };
129
+ }
130
+ function b(e) {
131
+ let t = [
132
+ "quoin write",
133
+ "",
134
+ `Repo: ${e.repoRoot}`,
135
+ e.org ? `Org: ${e.org} (from ${_[e.orgSource]})` : `Org: unresolved — ${u}`,
136
+ "",
137
+ "Authoring contracts:"
138
+ ];
139
+ 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");
140
+ 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");
141
+ }
142
+ function x(e) {
143
+ return {
144
+ name: e.name,
145
+ kind: e.kind,
146
+ moduleName: e.moduleName,
147
+ moduleRoot: e.moduleRoot,
148
+ ...e.schemaPath ? { schemaPath: e.schemaPath } : {},
149
+ ...e.skeletonPath ? { skeletonPath: e.skeletonPath } : {}
150
+ };
151
+ }
152
+ function S(e) {
153
+ return /^[A-Za-z0-9_./:-]+$/.test(e) ? e : `'${e.replaceAll("'", "'\\''")}'`;
154
+ }
155
+ //#endregion
156
+ export { h as a, u as i, b as n, d as o, v as r, y as t };
package/dist/write.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { SpecCatalog } from './catalog.js';
2
+ import { OrgSource } from './org.js';
2
3
  export interface AuthoringContract {
3
4
  name: string;
4
5
  kind: "artifact" | "object";
@@ -9,6 +10,9 @@ export interface AuthoringContract {
9
10
  }
10
11
  export interface AuthoringPack {
11
12
  repoRoot: string;
13
+ /** Authoring organization, absent when no source yielded one (FR-025). */
14
+ org?: string;
15
+ orgSource: OrgSource;
12
16
  types: AuthoringContract[];
13
17
  validation: {
14
18
  command: string;
@@ -17,6 +21,8 @@ export interface AuthoringPack {
17
21
  };
18
22
  }
19
23
  export declare function parseTypeList(value: string | string[] | undefined): string[];
20
- export declare function createAuthoringPack(catalog: SpecCatalog, repoDir: string, typeNames: string[]): AuthoringPack;
24
+ export declare function createAuthoringPack(catalog: SpecCatalog, repoDir: string, typeNames: string[], options?: {
25
+ org?: string;
26
+ }): AuthoringPack;
21
27
  export declare function formatAuthoringPack(pack: AuthoringPack): string;
22
28
  //# sourceMappingURL=write.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../src/write.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,WAAW,EAGjB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,GAAG,QAAQ,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,UAAU,EAAE;QACV,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,EAAE,CAAC;KACjB,CAAC;CACH;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,CAM5E;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EAAE,GAClB,aAAa,CA+Bf;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAyB/D"}
1
+ {"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../src/write.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,WAAW,EAGjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAA0B,KAAK,SAAS,EAAc,MAAM,UAAU,CAAC;AAW9E,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,GAAG,QAAQ,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,UAAU,EAAE;QACV,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,EAAE,CAAC;KACjB,CAAC;CACH;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,CAM5E;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EAAE,EACnB,OAAO,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAC7B,aAAa,CAmCf;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CA4B/D"}
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.5",
4
+ "version": "0.6.0",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "files": [
@@ -21,6 +21,29 @@
21
21
  "bin": {
22
22
  "quoin": "bin/quoin.js"
23
23
  },
24
+ "oclif": {
25
+ "bin": "quoin",
26
+ "dirname": "quoin",
27
+ "commands": "./dist/commands",
28
+ "topicSeparator": " ",
29
+ "topics": {
30
+ "catalog": {
31
+ "description": "Inspect the active artifact/object catalog (list, show, validate)."
32
+ },
33
+ "config": {
34
+ "description": "Read and store quoin configuration (get, set, edit, doctor)."
35
+ },
36
+ "module": {
37
+ "description": "Install and manage user/community spec modules (list, install, remove, ensure-defaults)."
38
+ },
39
+ "plugin": {
40
+ "description": "[DEPRECATED] Renamed to `module`; retained as a forwarding alias."
41
+ }
42
+ },
43
+ "plugins": [
44
+ "@agent-ix/filament-plan-sync"
45
+ ]
46
+ },
24
47
  "packageManager": "pnpm@10.33.4",
25
48
  "scripts": {
26
49
  "help": "node scripts/help.js",
@@ -57,9 +80,12 @@
57
80
  "test-results:warnings": "./node_modules/.bin/jest-results warnings"
58
81
  },
59
82
  "dependencies": {
60
- "@agent-ix/ix-cli-core": ">=0.11.0",
83
+ "@agent-ix/filament-plan-sync": ">=0.1.0",
84
+ "@agent-ix/ix-cli-core": ">=0.12.0",
61
85
  "@agent-ix/ts-plugin-kit": ">=0.1.3",
62
- "yaml": "^2.9.0"
86
+ "@oclif/core": ">=4.11.14",
87
+ "yaml": "^2.9.0",
88
+ "zod": ">=4.4.3"
63
89
  },
64
90
  "devDependencies": {
65
91
  "@types/node": "25.9.2",
@@ -84,5 +110,10 @@
84
110
  "repository": {
85
111
  "type": "git",
86
112
  "url": "git+https://github.com/agent-ix/quoin.git"
113
+ },
114
+ "pnpm": {
115
+ "overrides": {
116
+ "brace-expansion": ">=5.0.8"
117
+ }
87
118
  }
88
119
  }
@@ -66,6 +66,11 @@ Run only the steps the request needs; stop after IT.
66
66
  2. Run `quoin write <repo_dir> --types <type[,type...]>` **once** for the full
67
67
  set. Use the returned skeletons, schemas, module roots, and examples as the
68
68
  authoring contract — the per-type rules live in the template, not your memory.
69
+ The pack also reports the repo's `Org:`; use that value for the `org:` field
70
+ and for the `ix://<org>/<repo>/…` targets you write. If it reports
71
+ `Org: unresolved`, ask the user which organization owns the repo — never
72
+ invent one, never leave a literal `<your-org>` in a file, and never copy the
73
+ org out of a skeleton's example values.
69
74
  3. Author each artifact as its own file (table above), in this logical order,
70
75
  skipping any type not requested:
71
76
  - `spec.md` — **REQUIRED when starting a new spec**: the
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  type: master-requirements
3
3
  name: <app-name>
4
- org: <your-org>
4
+ org: <your-org> # use the `Org:` quoin write reports
5
5
  component_type: application
6
6
  tags: []
7
7
  implementation_language: null
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  type: master-requirements
3
3
  name: <component-name> # Required: repo/component name
4
- org: <your-org> # Required: owning organization
4
+ org: <your-org> # Required: owning org — use the `Org:` quoin write reports
5
5
  component_type: fastapi-service # Canonical type (fastapi-service, react-lib, etc.)
6
6
  tags: # Optional capabilities
7
7
  - postgres