ctxr-cli 0.5.0 → 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 (200) hide show
  1. package/dist/adapter.d.ts +0 -1
  2. package/dist/adapter.d.ts.map +1 -1
  3. package/dist/adapter.js.map +1 -1
  4. package/dist/adapters/builtin/index.d.ts.map +1 -1
  5. package/dist/adapters/builtin/index.js +2 -2
  6. package/dist/adapters/builtin/index.js.map +1 -1
  7. package/dist/adapters/harness/claude-code.d.ts.map +1 -1
  8. package/dist/adapters/harness/claude-code.js +30 -14
  9. package/dist/adapters/harness/claude-code.js.map +1 -1
  10. package/dist/adapters/harness/hermes-agent.d.ts +9 -0
  11. package/dist/adapters/harness/hermes-agent.d.ts.map +1 -0
  12. package/dist/adapters/harness/hermes-agent.js +13 -0
  13. package/dist/adapters/harness/hermes-agent.js.map +1 -0
  14. package/dist/adapters/types.d.ts +39 -18
  15. package/dist/adapters/types.d.ts.map +1 -1
  16. package/dist/adapters/types.js +3 -3
  17. package/dist/adapters/types.js.map +1 -1
  18. package/dist/commands/adapters-generate.d.ts +4 -2
  19. package/dist/commands/adapters-generate.d.ts.map +1 -1
  20. package/dist/commands/adapters-generate.js +14 -6
  21. package/dist/commands/adapters-generate.js.map +1 -1
  22. package/dist/commands/archive.d.ts +4 -2
  23. package/dist/commands/archive.d.ts.map +1 -1
  24. package/dist/commands/archive.js +5 -3
  25. package/dist/commands/archive.js.map +1 -1
  26. package/dist/commands/check.d.ts.map +1 -1
  27. package/dist/commands/check.js +1 -6
  28. package/dist/commands/check.js.map +1 -1
  29. package/dist/commands/init.d.ts +2 -0
  30. package/dist/commands/init.d.ts.map +1 -1
  31. package/dist/commands/init.js +84 -18
  32. package/dist/commands/init.js.map +1 -1
  33. package/dist/commands/publish-check.d.ts +23 -0
  34. package/dist/commands/publish-check.d.ts.map +1 -0
  35. package/dist/commands/publish-check.js +116 -0
  36. package/dist/commands/publish-check.js.map +1 -0
  37. package/dist/commands/publish-gather.d.ts +37 -0
  38. package/dist/commands/publish-gather.d.ts.map +1 -0
  39. package/dist/commands/publish-gather.js +92 -0
  40. package/dist/commands/publish-gather.js.map +1 -0
  41. package/dist/commands/publish-new.d.ts +18 -0
  42. package/dist/commands/publish-new.d.ts.map +1 -0
  43. package/dist/commands/publish-new.js +86 -0
  44. package/dist/commands/publish-new.js.map +1 -0
  45. package/dist/commands/serve.d.ts +32 -0
  46. package/dist/commands/serve.d.ts.map +1 -0
  47. package/dist/commands/serve.js +170 -0
  48. package/dist/commands/serve.js.map +1 -0
  49. package/dist/commands/update.js +3 -3
  50. package/dist/commands/update.js.map +1 -1
  51. package/dist/config/defaults.d.ts +39 -17
  52. package/dist/config/defaults.d.ts.map +1 -1
  53. package/dist/config/defaults.js +40 -21
  54. package/dist/config/defaults.js.map +1 -1
  55. package/dist/config/schema.d.ts +36 -9
  56. package/dist/config/schema.d.ts.map +1 -1
  57. package/dist/config/schema.js +71 -15
  58. package/dist/config/schema.js.map +1 -1
  59. package/dist/core/browse/link-resolver.d.ts +12 -0
  60. package/dist/core/browse/link-resolver.d.ts.map +1 -0
  61. package/dist/core/browse/link-resolver.js +12 -0
  62. package/dist/core/browse/link-resolver.js.map +1 -0
  63. package/dist/core/browse/render.d.ts +5 -0
  64. package/dist/core/browse/render.d.ts.map +1 -0
  65. package/dist/core/browse/render.js +66 -0
  66. package/dist/core/browse/render.js.map +1 -0
  67. package/dist/core/browse/routes.d.ts +31 -0
  68. package/dist/core/browse/routes.d.ts.map +1 -0
  69. package/dist/core/browse/routes.js +56 -0
  70. package/dist/core/browse/routes.js.map +1 -0
  71. package/dist/core/browse/templates.d.ts +4 -0
  72. package/dist/core/browse/templates.d.ts.map +1 -0
  73. package/dist/core/browse/templates.js +26 -0
  74. package/dist/core/browse/templates.js.map +1 -0
  75. package/dist/core/checks/integrity-checks.d.ts +18 -2
  76. package/dist/core/checks/integrity-checks.d.ts.map +1 -1
  77. package/dist/core/checks/integrity-checks.js +55 -10
  78. package/dist/core/checks/integrity-checks.js.map +1 -1
  79. package/dist/core/checks/organize-checks.d.ts +9 -1
  80. package/dist/core/checks/organize-checks.d.ts.map +1 -1
  81. package/dist/core/checks/organize-checks.js +13 -3
  82. package/dist/core/checks/organize-checks.js.map +1 -1
  83. package/dist/core/convention-doc.d.ts +8 -9
  84. package/dist/core/convention-doc.d.ts.map +1 -1
  85. package/dist/core/convention-doc.js +45 -18
  86. package/dist/core/convention-doc.js.map +1 -1
  87. package/dist/core/conventions.d.ts +2 -2
  88. package/dist/core/conventions.js +2 -2
  89. package/dist/core/disclosure/model.d.ts +11 -0
  90. package/dist/core/disclosure/model.d.ts.map +1 -1
  91. package/dist/core/disclosure/model.js +24 -0
  92. package/dist/core/disclosure/model.js.map +1 -1
  93. package/dist/core/errors.d.ts +27 -41
  94. package/dist/core/errors.d.ts.map +1 -1
  95. package/dist/core/errors.js +76 -119
  96. package/dist/core/errors.js.map +1 -1
  97. package/dist/core/git/repo.d.ts +0 -6
  98. package/dist/core/git/repo.d.ts.map +1 -1
  99. package/dist/core/git/repo.js +0 -13
  100. package/dist/core/git/repo.js.map +1 -1
  101. package/dist/core/git/worktree.d.ts +4 -7
  102. package/dist/core/git/worktree.d.ts.map +1 -1
  103. package/dist/core/git/worktree.js +4 -10
  104. package/dist/core/git/worktree.js.map +1 -1
  105. package/dist/core/graph/model.d.ts +14 -0
  106. package/dist/core/graph/model.d.ts.map +1 -1
  107. package/dist/core/graph/model.js +30 -14
  108. package/dist/core/graph/model.js.map +1 -1
  109. package/dist/core/harness/bridge.d.ts +30 -0
  110. package/dist/core/harness/bridge.d.ts.map +1 -0
  111. package/dist/core/harness/bridge.js +178 -0
  112. package/dist/core/harness/bridge.js.map +1 -0
  113. package/dist/core/json-config-merge.d.ts.map +1 -1
  114. package/dist/core/json-config-merge.js +30 -7
  115. package/dist/core/json-config-merge.js.map +1 -1
  116. package/dist/core/migrations/archive-destination-from-taxonomy.d.ts +35 -0
  117. package/dist/core/migrations/archive-destination-from-taxonomy.d.ts.map +1 -0
  118. package/dist/core/migrations/archive-destination-from-taxonomy.js +109 -0
  119. package/dist/core/migrations/archive-destination-from-taxonomy.js.map +1 -0
  120. package/dist/core/migrations/drop-forge-and-workspaces-external.d.ts +19 -0
  121. package/dist/core/migrations/drop-forge-and-workspaces-external.d.ts.map +1 -0
  122. package/dist/core/migrations/drop-forge-and-workspaces-external.js +49 -0
  123. package/dist/core/migrations/drop-forge-and-workspaces-external.js.map +1 -0
  124. package/dist/core/migrations/registry.d.ts.map +1 -1
  125. package/dist/core/migrations/registry.js +4 -0
  126. package/dist/core/migrations/registry.js.map +1 -1
  127. package/dist/core/notes/list.d.ts.map +1 -1
  128. package/dist/core/notes/list.js +5 -1
  129. package/dist/core/notes/list.js.map +1 -1
  130. package/dist/core/publish/script-check.d.ts +12 -0
  131. package/dist/core/publish/script-check.d.ts.map +1 -0
  132. package/dist/core/publish/script-check.js +39 -0
  133. package/dist/core/publish/script-check.js.map +1 -0
  134. package/dist/core/reconcile.d.ts +3 -0
  135. package/dist/core/reconcile.d.ts.map +1 -1
  136. package/dist/core/reconcile.js +15 -5
  137. package/dist/core/reconcile.js.map +1 -1
  138. package/dist/core/session.d.ts +9 -9
  139. package/dist/core/session.js +9 -9
  140. package/dist/core/skills.d.ts +36 -0
  141. package/dist/core/skills.d.ts.map +1 -1
  142. package/dist/core/skills.js +154 -29
  143. package/dist/core/skills.js.map +1 -1
  144. package/dist/core/write-lifecycle/path-gate.d.ts.map +1 -1
  145. package/dist/core/write-lifecycle/path-gate.js +4 -2
  146. package/dist/core/write-lifecycle/path-gate.js.map +1 -1
  147. package/dist/prompt/inquirer-prompter.d.ts.map +1 -1
  148. package/dist/prompt/inquirer-prompter.js +11 -1
  149. package/dist/prompt/inquirer-prompter.js.map +1 -1
  150. package/dist/prompt/prompter.d.ts +16 -0
  151. package/dist/prompt/prompter.d.ts.map +1 -1
  152. package/dist/run.d.ts.map +1 -1
  153. package/dist/run.js +61 -55
  154. package/dist/run.js.map +1 -1
  155. package/dist/taxonomy/profiles.d.ts +11 -0
  156. package/dist/taxonomy/profiles.d.ts.map +1 -1
  157. package/dist/taxonomy/profiles.js +1 -0
  158. package/dist/taxonomy/profiles.js.map +1 -1
  159. package/dist/version.d.ts +1 -1
  160. package/dist/version.js +1 -1
  161. package/package.json +3 -1
  162. package/templates/agents/canonical.md +1 -1
  163. package/templates/conventions/{baseline-convention.md → baseline-conventions.md} +4 -4
  164. package/templates/conventions/{custom-convention-seed.md → house-conventions-seed.md} +15 -2
  165. package/templates/hooks/pre-push.sh +1 -1
  166. package/templates/serve/shell.html +15 -0
  167. package/templates/serve/style.css +88 -0
  168. package/templates/skills/ctxr-land.md +32 -18
  169. package/templates/skills/ctxr-organize-audit.md +1 -1
  170. package/templates/skills/ctxr-publish.md +79 -0
  171. package/templates/skills/ctxr-session-capture.md +44 -1
  172. package/templates/skills/ctxr-session-lifecycle.md +20 -1
  173. package/templates/skills/ctxr-submit.md +15 -11
  174. package/templates/vendor/frontend-design/LICENSE.txt +177 -0
  175. package/templates/vendor/frontend-design/SKILL.md +55 -0
  176. package/templates/vendor/frontend-design/provenance.json +7 -0
  177. package/dist/adapters/forge/github.d.ts +0 -12
  178. package/dist/adapters/forge/github.d.ts.map +0 -1
  179. package/dist/adapters/forge/github.js +0 -76
  180. package/dist/adapters/forge/github.js.map +0 -1
  181. package/dist/adapters/forge/types.d.ts +0 -46
  182. package/dist/adapters/forge/types.d.ts.map +0 -1
  183. package/dist/adapters/forge/types.js +0 -2
  184. package/dist/adapters/forge/types.js.map +0 -1
  185. package/dist/commands/session-abandon.d.ts +0 -13
  186. package/dist/commands/session-abandon.d.ts.map +0 -1
  187. package/dist/commands/session-abandon.js +0 -22
  188. package/dist/commands/session-abandon.js.map +0 -1
  189. package/dist/commands/session-land.d.ts +0 -45
  190. package/dist/commands/session-land.d.ts.map +0 -1
  191. package/dist/commands/session-land.js +0 -171
  192. package/dist/commands/session-land.js.map +0 -1
  193. package/dist/commands/session-reap.d.ts +0 -22
  194. package/dist/commands/session-reap.d.ts.map +0 -1
  195. package/dist/commands/session-reap.js +0 -52
  196. package/dist/commands/session-reap.js.map +0 -1
  197. package/dist/commands/session-submit.d.ts +0 -29
  198. package/dist/commands/session-submit.d.ts.map +0 -1
  199. package/dist/commands/session-submit.js +0 -72
  200. package/dist/commands/session-submit.js.map +0 -1
@@ -0,0 +1,86 @@
1
+ import { existsSync } from 'node:fs';
2
+ import { mkdir } from 'node:fs/promises';
3
+ import path from 'node:path';
4
+ import { PublishReservedSlugError, PublishSlugExistsError } from '../core/errors.js';
5
+ import { ExitCode } from '../core/exit-codes.js';
6
+ import { writeFileAtomic } from '../core/fs/atomic.js';
7
+ export const requires = { store: 'required' };
8
+ /** publish spec: reserved for frozen snapshots — a living page's slug must never collide with this shape. */
9
+ const RESERVED_SLUG_PATTERN = /^\d{4}-/;
10
+ function pageSkeleton(slug, dateCreated) {
11
+ return [
12
+ '<!doctype html>',
13
+ '<html lang="en">',
14
+ '<head>',
15
+ '<meta charset="utf-8">',
16
+ '<meta name="viewport" content="width=device-width, initial-scale=1">',
17
+ `<title>${slug}</title>`,
18
+ '<style>',
19
+ '@media print {',
20
+ ' .no-print { display: none; }',
21
+ '}',
22
+ '</style>',
23
+ '</head>',
24
+ '<body>',
25
+ `<p class="meta"><span>${dateCreated}</span> &middot; <a href="./README.md">spec</a></p>`,
26
+ '<main>',
27
+ '<!-- Build the bespoke representation here. -->',
28
+ '</main>',
29
+ '</body>',
30
+ '</html>',
31
+ '',
32
+ ].join('\n');
33
+ }
34
+ function readmeSkeleton(slug, dateCreated) {
35
+ return [
36
+ `# ${slug}`,
37
+ '',
38
+ `date-created: ${dateCreated}`,
39
+ '',
40
+ '## Intent',
41
+ '',
42
+ "One sentence: what does this page let the viewer DO that its source notes couldn't?",
43
+ '',
44
+ '## Source notes',
45
+ '',
46
+ 'Wikilinks back into the store. The notes are the source of truth; this page is a representation of them.',
47
+ '',
48
+ '## Audience & use',
49
+ '',
50
+ 'Who is this for, and in what setting will they use it?',
51
+ '',
52
+ '## Spec / prompt',
53
+ '',
54
+ 'The brief that produced index.html. Keep this so the page is regenerable.',
55
+ '',
56
+ ].join('\n');
57
+ }
58
+ /**
59
+ * publish spec: fixes a page's identity once. Refuses a slug that collides
60
+ * with the reserved dated-snapshot naming pattern, and never overwrites an
61
+ * existing page folder — the caller updates in place by editing the
62
+ * existing files directly, never by re-running this command.
63
+ */
64
+ export async function execute(store, flags) {
65
+ if (RESERVED_SLUG_PATTERN.test(flags.slug)) {
66
+ throw new PublishReservedSlugError(flags.slug);
67
+ }
68
+ const relativePath = path.join(store.config.publish.path, flags.slug).split(path.sep).join('/');
69
+ const absolutePath = path.join(store.root, relativePath);
70
+ if (existsSync(absolutePath)) {
71
+ throw new PublishSlugExistsError(flags.slug, relativePath);
72
+ }
73
+ const dateCreated = new Date().toISOString().slice(0, 10);
74
+ await mkdir(absolutePath, { recursive: true });
75
+ await writeFileAtomic(path.join(absolutePath, 'index.html'), pageSkeleton(flags.slug, dateCreated));
76
+ await writeFileAtomic(path.join(absolutePath, 'README.md'), readmeSkeleton(flags.slug, dateCreated));
77
+ return {
78
+ exitCode: ExitCode.Ok,
79
+ data: { slug: flags.slug, path: relativePath },
80
+ findings: [],
81
+ humanSummary: `Created "${relativePath}".`,
82
+ storeRoot: store.root,
83
+ schemaVersion: store.config.schema_version,
84
+ };
85
+ }
86
+ //# sourceMappingURL=publish-new.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publish-new.js","sourceRoot":"","sources":["../../src/commands/publish-new.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAE,M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../core/env.js';
3
+ import type { Store } from '../core/store.js';
4
+ export declare const requires: CommandRequires;
5
+ export interface ServeFlags {
6
+ port: number;
7
+ host: string;
8
+ }
9
+ export interface ServeData {
10
+ url: string;
11
+ port: number;
12
+ host: string;
13
+ root: string;
14
+ }
15
+ /**
16
+ * Defaults to loopback so an invocation with no `--host` keeps today's
17
+ * behavior exactly. `--host` exists for an operator who has deliberately
18
+ * decided to put something else (a reverse proxy, a tunnel sharing this
19
+ * process's network namespace) in front and knows what binding wider than
20
+ * loopback exposes — this command still applies no requester filtering of
21
+ * its own regardless of bind address; that judgment is entirely the
22
+ * caller's.
23
+ */
24
+ export declare const DEFAULT_HOST = "127.0.0.1";
25
+ /**
26
+ * cli-contract spec (local-browsing-surface D5): resolves the moment the
27
+ * listener is ready, so `runCommand()` emits exactly one envelope before
28
+ * any request is served — the listener itself keeps the process alive
29
+ * afterward, with no change to how `run()`/`bin.ts` end.
30
+ */
31
+ export declare function execute(env: RunEnv, store: Store, flags: ServeFlags): Promise<CommandOutcome<ServeData>>;
32
+ //# sourceMappingURL=serve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,eAAO,MAAM,QAAQ,EAAE,eAAuC,CAAC;AAE/D,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,cAAc,CAAC;AAwIxC;;;;;GAKG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CA2B9G"}
@@ -0,0 +1,170 @@
1
+ import { readFile } from 'node:fs/promises';
2
+ import { createServer } from 'node:http';
3
+ import path from 'node:path';
4
+ import { buildLinkResolver } from '../core/browse/link-resolver.js';
5
+ import { escapeHtml, renderNoteBody } from '../core/browse/render.js';
6
+ import { buildRouteTable, publishSlugs } from '../core/browse/routes.js';
7
+ import { readStylesheet, renderShell } from '../core/browse/templates.js';
8
+ import { ExitCode } from '../core/exit-codes.js';
9
+ export const requires = { store: 'required' };
10
+ /**
11
+ * Defaults to loopback so an invocation with no `--host` keeps today's
12
+ * behavior exactly. `--host` exists for an operator who has deliberately
13
+ * decided to put something else (a reverse proxy, a tunnel sharing this
14
+ * process's network namespace) in front and knows what binding wider than
15
+ * loopback exposes — this command still applies no requester filtering of
16
+ * its own regardless of bind address; that judgment is entirely the
17
+ * caller's.
18
+ */
19
+ export const DEFAULT_HOST = '127.0.0.1';
20
+ const CONTENT_TYPES = {
21
+ '.html': 'text/html; charset=utf-8',
22
+ '.css': 'text/css; charset=utf-8',
23
+ '.js': 'text/javascript; charset=utf-8',
24
+ '.mjs': 'text/javascript; charset=utf-8',
25
+ '.json': 'application/json; charset=utf-8',
26
+ '.svg': 'image/svg+xml',
27
+ '.png': 'image/png',
28
+ '.jpg': 'image/jpeg',
29
+ '.jpeg': 'image/jpeg',
30
+ '.gif': 'image/gif',
31
+ '.webp': 'image/webp',
32
+ '.ico': 'image/x-icon',
33
+ '.txt': 'text/plain; charset=utf-8',
34
+ '.md': 'text/markdown; charset=utf-8',
35
+ '.woff': 'font/woff',
36
+ '.woff2': 'font/woff2',
37
+ };
38
+ function contentTypeFor(filePath) {
39
+ return CONTENT_TYPES[path.extname(filePath).toLowerCase()] ?? 'application/octet-stream';
40
+ }
41
+ /** Requirement: an unbuilt derived artifact reports how to build it, rather than an opaque 404. */
42
+ function buildHint(command) {
43
+ return `<div class="ctxr-build-hint">Not built yet. Run <code>${escapeHtml(command)}</code> and reload.</div>`;
44
+ }
45
+ function renderIndex(table) {
46
+ const notes = [...table.notes.keys()].sort();
47
+ const catalogSections = [...table.catalog.keys()].sort();
48
+ const slugs = publishSlugs(table);
49
+ const listItems = (items, hrefFor) => items.length > 0
50
+ ? items.map((item) => `<li><a href="${hrefFor(item)}">${escapeHtml(item)}</a></li>`).join('\n')
51
+ : '<li>none yet</li>';
52
+ return [
53
+ '<h1>contexture</h1>',
54
+ `<p>${notes.length} note(s), ${catalogSections.length} catalog section(s), ${slugs.length} published page(s).</p>`,
55
+ '<h2>Notes</h2>',
56
+ `<ul class="ctxr-index">${listItems(notes, (p) => `/notes/${encodeURI(p)}`)}</ul>`,
57
+ '<h2>Catalog</h2>',
58
+ `<ul class="ctxr-index">${listItems(catalogSections, (id) => `/catalog/${encodeURIComponent(id)}`)}</ul>`,
59
+ '<h2>Graph</h2>',
60
+ '<p><a href="/graph">graph document</a></p>',
61
+ '<h2>Published pages</h2>',
62
+ `<ul class="ctxr-index">${listItems(slugs, (slug) => `/publish/${encodeURIComponent(slug)}/index.html`)}</ul>`,
63
+ ].join('\n');
64
+ }
65
+ function send(res, method, status, contentType, body) {
66
+ const buffer = Buffer.isBuffer(body) ? body : Buffer.from(body, 'utf8');
67
+ res.writeHead(status, { 'Content-Type': contentType, 'Content-Length': buffer.length });
68
+ res.end(method === 'HEAD' ? undefined : buffer);
69
+ }
70
+ /** Reads a derived document, rendering `hint` instead of 404ing when it hasn't been built yet. */
71
+ async function readDerivedDocument(absolutePath) {
72
+ try {
73
+ return { text: await readFile(absolutePath, 'utf8') };
74
+ }
75
+ catch (err) {
76
+ if (err.code === 'ENOENT')
77
+ return { hint: true };
78
+ throw err;
79
+ }
80
+ }
81
+ async function handleRequest(store, stderr, req, res) {
82
+ const method = req.method ?? 'GET';
83
+ const pathname = decodeURIComponent(new URL(req.url ?? '/', 'http://localhost').pathname);
84
+ stderr.write(`${method} ${pathname}\n`);
85
+ if (method !== 'GET' && method !== 'HEAD') {
86
+ send(res, method, 405, 'text/plain; charset=utf-8', 'method not allowed\n');
87
+ return;
88
+ }
89
+ const table = await buildRouteTable(store);
90
+ const resolveLink = buildLinkResolver([...table.notes.values()]);
91
+ if (pathname === '/') {
92
+ send(res, method, 200, 'text/html; charset=utf-8', await renderShell('contexture', renderIndex(table)));
93
+ return;
94
+ }
95
+ if (pathname === '/assets/style.css') {
96
+ send(res, method, 200, 'text/css; charset=utf-8', await readStylesheet());
97
+ return;
98
+ }
99
+ if (pathname === '/graph') {
100
+ const doc = await readDerivedDocument(table.graphDocumentPath);
101
+ const body = 'hint' in doc ? buildHint('ctxr graph build') : renderNoteBody(doc.text, resolveLink);
102
+ send(res, method, 200, 'text/html; charset=utf-8', await renderShell('graph', body));
103
+ return;
104
+ }
105
+ if (pathname.startsWith('/notes/')) {
106
+ const note = table.notes.get(pathname.slice('/notes/'.length));
107
+ if (!note) {
108
+ send(res, method, 404, 'text/plain; charset=utf-8', 'not found\n');
109
+ return;
110
+ }
111
+ send(res, method, 200, 'text/html; charset=utf-8', await renderShell(note.path, renderNoteBody(note.body, resolveLink)));
112
+ return;
113
+ }
114
+ if (pathname.startsWith('/catalog/')) {
115
+ const sectionId = pathname.slice('/catalog/'.length);
116
+ const section = table.catalog.get(sectionId);
117
+ if (!section) {
118
+ send(res, method, 404, 'text/plain; charset=utf-8', 'not found\n');
119
+ return;
120
+ }
121
+ const doc = await readDerivedDocument(section.absolutePath);
122
+ const body = 'hint' in doc ? buildHint('ctxr catalog build') : renderNoteBody(doc.text, resolveLink);
123
+ send(res, method, 200, 'text/html; charset=utf-8', await renderShell(sectionId, body));
124
+ return;
125
+ }
126
+ if (pathname.startsWith('/publish/')) {
127
+ const file = table.publishFiles.get(pathname.slice('/publish/'.length));
128
+ if (!file) {
129
+ send(res, method, 404, 'text/plain; charset=utf-8', 'not found\n');
130
+ return;
131
+ }
132
+ send(res, method, 200, contentTypeFor(file.absolutePath), await readFile(file.absolutePath));
133
+ return;
134
+ }
135
+ send(res, method, 404, 'text/plain; charset=utf-8', 'not found\n');
136
+ }
137
+ /**
138
+ * cli-contract spec (local-browsing-surface D5): resolves the moment the
139
+ * listener is ready, so `runCommand()` emits exactly one envelope before
140
+ * any request is served — the listener itself keeps the process alive
141
+ * afterward, with no change to how `run()`/`bin.ts` end.
142
+ */
143
+ export async function execute(env, store, flags) {
144
+ const server = createServer((req, res) => {
145
+ handleRequest(store, env.io.stderr, req, res).catch((err) => {
146
+ env.io.stderr.write(`serve: ${err instanceof Error ? err.message : String(err)}\n`);
147
+ if (!res.headersSent)
148
+ send(res, req.method ?? 'GET', 500, 'text/plain; charset=utf-8', 'internal error\n');
149
+ else
150
+ res.end();
151
+ });
152
+ });
153
+ const host = flags.host;
154
+ await new Promise((resolve, reject) => {
155
+ server.once('error', reject);
156
+ server.listen(flags.port, host, resolve);
157
+ });
158
+ const address = server.address();
159
+ const port = typeof address === 'object' && address !== null ? address.port : flags.port;
160
+ const url = `http://${host}:${port}/`;
161
+ return {
162
+ exitCode: ExitCode.Ok,
163
+ data: { url, port, host, root: store.root },
164
+ findings: [],
165
+ humanSummary: `serving ${store.root} at ${url}`,
166
+ storeRoot: store.root,
167
+ schemaVersion: store.config.schema_version,
168
+ };
169
+ }
170
+ //# sourceMappingURL=serve.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serve.js","sourceRoot":"","sources":["../../src/commands/serve.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAA6C,MAAM,WAAW,CAAC;AACpF,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAA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CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;IACjC,MAAM,IAAI,GAAG,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;IACzF,MAAM,GAAG,GAAG,UAAU,IAAI,IAAI,IAAI,GAAG,CAAC;IAEtC,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,EAAE;QACrB,IAAI,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE;QAC3C,QAAQ,EAAE,EAAE;QACZ,YAAY,EAAE,WAAW,KAAK,CAAC,IAAI,OAAO,GAAG,EAAE;QAC/C,SAAS,EAAE,KAAK,CAAC,IAAI;QACrB,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc;KAC3C,CAAC;AACJ,CAAC"}
@@ -10,13 +10,13 @@ export const requires = { store: 'required' };
10
10
  * touched. Idempotent: a current store reports nothing changed.
11
11
  */
12
12
  export async function execute(env, store) {
13
- const { changed } = await reconcileStore(env, store.root, store.config);
14
- const adapterFiles = await generateAdapterOutputs(store);
13
+ const { changed, findings } = await reconcileStore(env, store.root, store.config);
14
+ const adapterFiles = await generateAdapterOutputs(env.git, store);
15
15
  const all = [...new Set([...changed, ...adapterFiles.filter((f) => f.changed).map((f) => f.path)])];
16
16
  return {
17
17
  exitCode: ExitCode.Ok,
18
18
  data: { changed: all },
19
- findings: [],
19
+ findings,
20
20
  humanSummary: all.length === 0 ? 'Store is already up to date.' : `Updated ${all.length} contexture-owned file(s).`,
21
21
  storeRoot: store.root,
22
22
  schemaVersion: store.config.schema_version,
@@ -1 +1 @@
1
- {"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/commands/update.ts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-portability spec (entry-doc-generation D5): contexture-owned
34
- * skills are copied here (`<slug>/SKILL.md`), defaulting to the directory
35
- * harnesses with skill auto-discovery read — one file, one hop. A store
36
- * driven by another harness points this at that harness's skills directory.
33
+ * harness-portability spec (vendored-craft-skills): the ecosystem's
34
+ * cross-harness canonical skills location — the directory the majority of
35
+ * agent runtimes read natively, with no bridge required. A harness that
36
+ * reads its own branded directory instead (e.g. Claude Code's
37
+ * `.claude/skills/`) gets that directory bridged to this one; see
38
+ * `core/harness/bridge.ts`. A store driven by no auto-discovering harness
39
+ * can still point this anywhere.
37
40
  */
38
- export declare const DEFAULT_SKILLS_PATH = ".claude/skills/";
41
+ export declare const DEFAULT_SKILLS_PATH = ".agents/skills/";
42
+ /** harness-portability spec (vendored-craft-skills): the shipped vendored skill set, installed by default and refreshed by update. */
43
+ export declare const DEFAULT_VENDORED_SKILLS: readonly ['frontend-design'];
39
44
  /**
40
45
  * harness-portability spec: the guidance directory holding contexture's
41
46
  * shipped baseline convention file, the operator's own convention files
@@ -44,10 +49,21 @@ export declare const DEFAULT_SKILLS_PATH = ".claude/skills/";
44
49
  * context-organize) the mission document.
45
50
  */
46
51
  export declare const DEFAULT_GUIDANCE_PATH = ".contexture/guidance/";
47
- /** The shipped, contexture-owned baseline convention — never hand-edited; refreshed by `ctxr update` like a skill copy. */
48
- export declare const DEFAULT_BASELINE_CONVENTION_FILE_NAME = "baseline-convention.md";
49
- /** The operator-authored convention file seeded at init. */
50
- export declare const DEFAULT_CUSTOM_CONVENTION_FILE_NAME = "custom-convention.md";
52
+ /** The shipped, contexture-owned baseline conventions — never hand-edited; refreshed by `ctxr update` like a skill copy. */
53
+ export declare const DEFAULT_BASELINE_CONVENTIONS_FILE_NAME = "baseline-conventions.md";
54
+ /**
55
+ * The baseline file's pre-rename name. `syncBaselineConventions` removes it
56
+ * when it still carries the managed-owner header, so the rename leaves no
57
+ * orphan — the guidance directory is scanned wholesale, so an orphan would
58
+ * be inlined into AGENTS.md a second time rather than merely sitting unused.
59
+ */
60
+ export declare const LEGACY_BASELINE_CONVENTION_FILE_NAME = "baseline-convention.md";
61
+ /**
62
+ * The operator-authored conventions file seeded at init: this store's house
63
+ * rules, layered on the shipped baseline and winning where the two speak to
64
+ * the same thing.
65
+ */
66
+ export declare const DEFAULT_HOUSE_CONVENTIONS_FILE_NAME = "house-conventions.md";
51
67
  /** context-organize spec: the store's standing current-state document's filename, under the guidance directory. */
52
68
  export declare const DEFAULT_MISSION_FILE_NAME = "mission.md";
53
69
  /** context-organize spec: `organize.mission_path`'s shipped default — every store gets a mission document from `init` onward, seeded there. */
@@ -69,14 +85,14 @@ export declare const DEFAULT_GRAPH_SETTINGS: {
69
85
  export declare const DEFAULT_WORKTREES_PATH = ".worktrees/";
70
86
  /** Branch names for session worktrees are prefixed so they're recognizable and sweep-safe. */
71
87
  export declare const DEFAULT_SESSION_BRANCH_PREFIX = "session/";
72
- /** write-lifecycle spec: worktrees are ctxr-owned (not externally provided) unless a store opts in. */
73
- export declare const DEFAULT_WORKSPACES_EXTERNAL = false;
74
88
  /** write-lifecycle spec: pre-commit's diff-size ceiling, in total changed lines. */
75
89
  export declare const DEFAULT_DIFF_SIZE_CEILING_LINES = 2000;
76
90
  /** context-catalog spec: where per-section catalog files live — tracked (never gitignored), since glosses are authored. */
77
91
  export declare const DEFAULT_CATALOG_PATH = ".contexture/catalog/";
78
92
  /** context-catalog spec: a section exceeding this triggers a failing doctor check, not a silent slowdown. */
79
93
  export declare const DEFAULT_CATALOG_SECTION_MAX_BYTES: number;
94
+ /** publish spec: where published pages live — tracked, authored-but-tool-owned, excluded from retrieval like the catalog and skill pack. */
95
+ export declare const DEFAULT_PUBLISH_PATH = ".contexture/publish/";
80
96
  /** disclosure-policy spec: v1 ships with no audiences pre-declared internal, and no hard walls — an explicit, empty starting point the operator opts into. */
81
97
  export declare const DEFAULT_INTERNAL_AUDIENCES: readonly string[];
82
98
  export declare const DEFAULT_HARD_WALLS: readonly HardWallConfig[];
@@ -84,15 +100,21 @@ export declare const DEFAULT_HARD_WALLS: readonly HardWallConfig[];
84
100
  export declare const DEFAULT_INBOX_PATH = "inbox/";
85
101
  /** store-primitives-from-migration-audit spec (D2): the shipped tracking-parameter list source check strips before comparing URL identities. */
86
102
  export declare const DEFAULT_TRACKING_PARAMS: string[];
87
- /** context-organize spec: archive's destination, decoupled from any taxonomy layer name. */
88
- export declare const DEFAULT_ARCHIVE_PATH = "archive/";
103
+ /**
104
+ * context-organize spec: archive's destination, decoupled from any taxonomy
105
+ * layer name. This is the fallback for a taxonomy that declares none of its
106
+ * own — a shipped profile with a retirement layer (PARA's Archives) supplies
107
+ * its `archiveDestination` at init instead, so a PARA store is never born
108
+ * pointing at a directory its own taxonomy doesn't declare.
109
+ */
110
+ export declare const DEFAULT_ARCHIVE_DESTINATION = "archive/";
89
111
  /** store-primitives-from-migration-audit spec (D4): grace period, in days, before a stale rollup is reported. */
90
112
  export declare const DEFAULT_ROLLUP_STALE_DAYS = 7;
91
113
  /**
92
- * adapters spec: init registers both shipped builtins by default, so
93
- * out-of-the-box UX (a PR opened on session submit, a generated CLAUDE.md)
94
- * keeps working without the operator hand-writing config — each is just as
95
- * removable from this list as it was addable.
114
+ * adapters spec: init registers the shipped builtin by default, so
115
+ * out-of-the-box UX (a generated CLAUDE.md) keeps working without the
116
+ * operator hand-writing config — it is just as removable from this list as
117
+ * it was addable.
96
118
  */
97
119
  export declare const DEFAULT_ADAPTERS: readonly AdapterDeclaration[];
98
120
  //# sourceMappingURL=defaults.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEtE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,4BAA4B,SAAS,CAAC;AAEnD;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,UAAU,CAAC;AAEtD,gFAAgF;A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MAAM,qBAAqB,YAAI,cAAc,CAAU,CAAC;AAE/D,oHAAoH;AACpH,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAAO,CAAC;AAEvD,8HAA8H;AAC9H,eAAO,MAAM,sBAAsB;IACjC,aAAa;IACb,OAAO;IACP,UAAU;IACV,sBAAsB,EAAQ,MAAM,EAAE;CACvC,CAAC;AAEF,wFAAwF;AACxF,eAAO,MAAM,sBAAsB,gBAAgB,CAAC;AAEpD,8FAA8F;AAC9F,eAAO,MAAM,6BAA6B,aAAa,CAAC;AAGxD,oFAAoF;AACpF,eAAO,MAAM,+BAA+B,OAAO,CAAC;AAEpD,2HAA2H;AAC3H,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAE3D,6GAA6G;AAC7G,eAAO,MAAM,iCAAiC,QAAY,CAAC;AAE3D,4IAA4I;AAC5I,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAE3D,8JAA8J;AAC9J,eAAO,MAAM,0BAA0B,EAAE,SAAS,MAAM,EAAO,CAAC;AAChE,eAAO,MAAM,kBAAkB,EAAE,SAAS,cAAc,EAAO,CAAC;AAEhE,uGAAuG;AACvG,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAE3C,gJAAgJ;AAChJ,eAAO,MAAM,uBAAuB,UAA6F,CAAC;AAElI;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,aAAa,CAAC;AAEtD,iHAAiH;AACjH,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,kBAAkB,EAAwD,CAAC"}
@@ -29,12 +29,17 @@ export const DEFAULT_VISIBILITY_CONTEXT = 'private';
29
29
  */
30
30
  export const DEFAULT_DERIVED_PATHS = ['.contexture/cache/'];
31
31
  /**
32
- * harness-portability spec (entry-doc-generation D5): contexture-owned
33
- * skills are copied here (`<slug>/SKILL.md`), defaulting to the directory
34
- * harnesses with skill auto-discovery read — one file, one hop. A store
35
- * driven by another harness points this at that harness's skills directory.
32
+ * harness-portability spec (vendored-craft-skills): the ecosystem's
33
+ * cross-harness canonical skills location — the directory the majority of
34
+ * agent runtimes read natively, with no bridge required. A harness that
35
+ * reads its own branded directory instead (e.g. Claude Code's
36
+ * `.claude/skills/`) gets that directory bridged to this one; see
37
+ * `core/harness/bridge.ts`. A store driven by no auto-discovering harness
38
+ * can still point this anywhere.
36
39
  */
37
- export const DEFAULT_SKILLS_PATH = '.claude/skills/';
40
+ export const DEFAULT_SKILLS_PATH = '.agents/skills/';
41
+ /** harness-portability spec (vendored-craft-skills): the shipped vendored skill set, installed by default and refreshed by update. */
42
+ export const DEFAULT_VENDORED_SKILLS = ['frontend-design'];
38
43
  /**
39
44
  * harness-portability spec: the guidance directory holding contexture's
40
45
  * shipped baseline convention file, the operator's own convention files
@@ -43,10 +48,21 @@ export const DEFAULT_SKILLS_PATH = '.claude/skills/';
43
48
  * context-organize) the mission document.
44
49
  */
45
50
  export const DEFAULT_GUIDANCE_PATH = '.contexture/guidance/';
46
- /** The shipped, contexture-owned baseline convention — never hand-edited; refreshed by `ctxr update` like a skill copy. */
47
- export const DEFAULT_BASELINE_CONVENTION_FILE_NAME = 'baseline-convention.md';
48
- /** The operator-authored convention file seeded at init. */
49
- export const DEFAULT_CUSTOM_CONVENTION_FILE_NAME = 'custom-convention.md';
51
+ /** The shipped, contexture-owned baseline conventions — never hand-edited; refreshed by `ctxr update` like a skill copy. */
52
+ export const DEFAULT_BASELINE_CONVENTIONS_FILE_NAME = 'baseline-conventions.md';
53
+ /**
54
+ * The baseline file's pre-rename name. `syncBaselineConventions` removes it
55
+ * when it still carries the managed-owner header, so the rename leaves no
56
+ * orphan — the guidance directory is scanned wholesale, so an orphan would
57
+ * be inlined into AGENTS.md a second time rather than merely sitting unused.
58
+ */
59
+ export const LEGACY_BASELINE_CONVENTION_FILE_NAME = 'baseline-convention.md';
60
+ /**
61
+ * The operator-authored conventions file seeded at init: this store's house
62
+ * rules, layered on the shipped baseline and winning where the two speak to
63
+ * the same thing.
64
+ */
65
+ export const DEFAULT_HOUSE_CONVENTIONS_FILE_NAME = 'house-conventions.md';
50
66
  /** context-organize spec: the store's standing current-state document's filename, under the guidance directory. */
51
67
  export const DEFAULT_MISSION_FILE_NAME = 'mission.md';
52
68
  /** context-organize spec: `organize.mission_path`'s shipped default — every store gets a mission document from `init` onward, seeded there. */
@@ -68,14 +84,14 @@ export const DEFAULT_GRAPH_SETTINGS = {
68
84
  export const DEFAULT_WORKTREES_PATH = '.worktrees/';
69
85
  /** Branch names for session worktrees are prefixed so they're recognizable and sweep-safe. */
70
86
  export const DEFAULT_SESSION_BRANCH_PREFIX = 'session/';
71
- /** write-lifecycle spec: worktrees are ctxr-owned (not externally provided) unless a store opts in. */
72
- export const DEFAULT_WORKSPACES_EXTERNAL = false;
73
87
  /** write-lifecycle spec: pre-commit's diff-size ceiling, in total changed lines. */
74
88
  export const DEFAULT_DIFF_SIZE_CEILING_LINES = 2000;
75
89
  /** context-catalog spec: where per-section catalog files live — tracked (never gitignored), since glosses are authored. */
76
90
  export const DEFAULT_CATALOG_PATH = '.contexture/catalog/';
77
91
  /** context-catalog spec: a section exceeding this triggers a failing doctor check, not a silent slowdown. */
78
92
  export const DEFAULT_CATALOG_SECTION_MAX_BYTES = 32 * 1024;
93
+ /** publish spec: where published pages live — tracked, authored-but-tool-owned, excluded from retrieval like the catalog and skill pack. */
94
+ export const DEFAULT_PUBLISH_PATH = '.contexture/publish/';
79
95
  /** disclosure-policy spec: v1 ships with no audiences pre-declared internal, and no hard walls — an explicit, empty starting point the operator opts into. */
80
96
  export const DEFAULT_INTERNAL_AUDIENCES = [];
81
97
  export const DEFAULT_HARD_WALLS = [];
@@ -83,18 +99,21 @@ export const DEFAULT_HARD_WALLS = [];
83
99
  export const DEFAULT_INBOX_PATH = 'inbox/';
84
100
  /** store-primitives-from-migration-audit spec (D2): the shipped tracking-parameter list source check strips before comparing URL identities. */
85
101
  export const DEFAULT_TRACKING_PARAMS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid'];
86
- /** context-organize spec: archive's destination, decoupled from any taxonomy layer name. */
87
- export const DEFAULT_ARCHIVE_PATH = 'archive/';
102
+ /**
103
+ * context-organize spec: archive's destination, decoupled from any taxonomy
104
+ * layer name. This is the fallback for a taxonomy that declares none of its
105
+ * own — a shipped profile with a retirement layer (PARA's Archives) supplies
106
+ * its `archiveDestination` at init instead, so a PARA store is never born
107
+ * pointing at a directory its own taxonomy doesn't declare.
108
+ */
109
+ export const DEFAULT_ARCHIVE_DESTINATION = 'archive/';
88
110
  /** store-primitives-from-migration-audit spec (D4): grace period, in days, before a stale rollup is reported. */
89
111
  export const DEFAULT_ROLLUP_STALE_DAYS = 7;
90
112
  /**
91
- * adapters spec: init registers both shipped builtins by default, so
92
- * out-of-the-box UX (a PR opened on session submit, a generated CLAUDE.md)
93
- * keeps working without the operator hand-writing config — each is just as
94
- * removable from this list as it was addable.
113
+ * adapters spec: init registers the shipped builtin by default, so
114
+ * out-of-the-box UX (a generated CLAUDE.md) keeps working without the
115
+ * operator hand-writing config — it is just as removable from this list as
116
+ * it was addable.
95
117
  */
96
- export const DEFAULT_ADAPTERS = [
97
- { id: 'github', kind: 'forge' },
98
- { id: 'claude-code', kind: 'harness-generation' },
99
- ];
118
+ export const DEFAULT_ADAPTERS = [{ id: 'claude-code', kind: 'harness-generation' }];
100
119
  //# sourceMappingURL=defaults.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/config/defaults.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,OAAO,CAAC;AAEtD,gFAAgF;AAChF,MAAM,CAAC,MAAM,0BAA0B,GAAG,SAAS,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,CAA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