@thjodann/wk 1.0.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 (153) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +197 -0
  3. package/dist/cli/commands/article.d.ts +2 -0
  4. package/dist/cli/commands/article.js +47 -0
  5. package/dist/cli/commands/article.js.map +1 -0
  6. package/dist/cli/commands/closeout.d.ts +2 -0
  7. package/dist/cli/commands/closeout.js +37 -0
  8. package/dist/cli/commands/closeout.js.map +1 -0
  9. package/dist/cli/commands/compile.d.ts +2 -0
  10. package/dist/cli/commands/compile.js +50 -0
  11. package/dist/cli/commands/compile.js.map +1 -0
  12. package/dist/cli/commands/concept.d.ts +2 -0
  13. package/dist/cli/commands/concept.js +36 -0
  14. package/dist/cli/commands/concept.js.map +1 -0
  15. package/dist/cli/commands/decision.d.ts +2 -0
  16. package/dist/cli/commands/decision.js +38 -0
  17. package/dist/cli/commands/decision.js.map +1 -0
  18. package/dist/cli/commands/event.d.ts +2 -0
  19. package/dist/cli/commands/event.js +32 -0
  20. package/dist/cli/commands/event.js.map +1 -0
  21. package/dist/cli/commands/init.d.ts +2 -0
  22. package/dist/cli/commands/init.js +52 -0
  23. package/dist/cli/commands/init.js.map +1 -0
  24. package/dist/cli/commands/installAgent.d.ts +2 -0
  25. package/dist/cli/commands/installAgent.js +130 -0
  26. package/dist/cli/commands/installAgent.js.map +1 -0
  27. package/dist/cli/commands/link.d.ts +2 -0
  28. package/dist/cli/commands/link.js +36 -0
  29. package/dist/cli/commands/link.js.map +1 -0
  30. package/dist/cli/commands/note.d.ts +2 -0
  31. package/dist/cli/commands/note.js +34 -0
  32. package/dist/cli/commands/note.js.map +1 -0
  33. package/dist/cli/commands/pages.d.ts +2 -0
  34. package/dist/cli/commands/pages.js +46 -0
  35. package/dist/cli/commands/pages.js.map +1 -0
  36. package/dist/cli/commands/record.d.ts +2 -0
  37. package/dist/cli/commands/record.js +101 -0
  38. package/dist/cli/commands/record.js.map +1 -0
  39. package/dist/cli/commands/render.d.ts +2 -0
  40. package/dist/cli/commands/render.js +33 -0
  41. package/dist/cli/commands/render.js.map +1 -0
  42. package/dist/cli/commands/search.d.ts +2 -0
  43. package/dist/cli/commands/search.js +125 -0
  44. package/dist/cli/commands/search.js.map +1 -0
  45. package/dist/cli/commands/setup.d.ts +2 -0
  46. package/dist/cli/commands/setup.js +53 -0
  47. package/dist/cli/commands/setup.js.map +1 -0
  48. package/dist/cli/commands/site.d.ts +2 -0
  49. package/dist/cli/commands/site.js +47 -0
  50. package/dist/cli/commands/site.js.map +1 -0
  51. package/dist/cli/commands/spin.d.ts +2 -0
  52. package/dist/cli/commands/spin.js +43 -0
  53. package/dist/cli/commands/spin.js.map +1 -0
  54. package/dist/cli/commands/status.d.ts +2 -0
  55. package/dist/cli/commands/status.js +63 -0
  56. package/dist/cli/commands/status.js.map +1 -0
  57. package/dist/cli/commands/symbol.d.ts +2 -0
  58. package/dist/cli/commands/symbol.js +37 -0
  59. package/dist/cli/commands/symbol.js.map +1 -0
  60. package/dist/cli/commands/theme.d.ts +2 -0
  61. package/dist/cli/commands/theme.js +52 -0
  62. package/dist/cli/commands/theme.js.map +1 -0
  63. package/dist/cli/commands/validate.d.ts +2 -0
  64. package/dist/cli/commands/validate.js +44 -0
  65. package/dist/cli/commands/validate.js.map +1 -0
  66. package/dist/cli/helpers.d.ts +30 -0
  67. package/dist/cli/helpers.js +131 -0
  68. package/dist/cli/helpers.js.map +1 -0
  69. package/dist/core/articles.d.ts +5 -0
  70. package/dist/core/articles.js +25 -0
  71. package/dist/core/articles.js.map +1 -0
  72. package/dist/core/automation.d.ts +96 -0
  73. package/dist/core/automation.js +384 -0
  74. package/dist/core/automation.js.map +1 -0
  75. package/dist/core/beads.d.ts +43 -0
  76. package/dist/core/beads.js +358 -0
  77. package/dist/core/beads.js.map +1 -0
  78. package/dist/core/compiler.d.ts +45 -0
  79. package/dist/core/compiler.js +399 -0
  80. package/dist/core/compiler.js.map +1 -0
  81. package/dist/core/config.d.ts +59 -0
  82. package/dist/core/config.js +187 -0
  83. package/dist/core/config.js.map +1 -0
  84. package/dist/core/git.d.ts +21 -0
  85. package/dist/core/git.js +109 -0
  86. package/dist/core/git.js.map +1 -0
  87. package/dist/core/ids.d.ts +2 -0
  88. package/dist/core/ids.js +8 -0
  89. package/dist/core/ids.js.map +1 -0
  90. package/dist/core/pages.d.ts +34 -0
  91. package/dist/core/pages.js +233 -0
  92. package/dist/core/pages.js.map +1 -0
  93. package/dist/core/paths.d.ts +15 -0
  94. package/dist/core/paths.js +67 -0
  95. package/dist/core/paths.js.map +1 -0
  96. package/dist/core/profiles.d.ts +30 -0
  97. package/dist/core/profiles.js +243 -0
  98. package/dist/core/profiles.js.map +1 -0
  99. package/dist/core/renderer.d.ts +8 -0
  100. package/dist/core/renderer.js +106 -0
  101. package/dist/core/renderer.js.map +1 -0
  102. package/dist/core/schemas.d.ts +1039 -0
  103. package/dist/core/schemas.js +108 -0
  104. package/dist/core/schemas.js.map +1 -0
  105. package/dist/core/site.d.ts +20 -0
  106. package/dist/core/site.js +2684 -0
  107. package/dist/core/site.js.map +1 -0
  108. package/dist/core/spin.d.ts +42 -0
  109. package/dist/core/spin.js +265 -0
  110. package/dist/core/spin.js.map +1 -0
  111. package/dist/core/store.d.ts +29 -0
  112. package/dist/core/store.js +146 -0
  113. package/dist/core/store.js.map +1 -0
  114. package/dist/core/theme.d.ts +35 -0
  115. package/dist/core/theme.js +1086 -0
  116. package/dist/core/theme.js.map +1 -0
  117. package/dist/core/validator.d.ts +8 -0
  118. package/dist/core/validator.js +154 -0
  119. package/dist/core/validator.js.map +1 -0
  120. package/dist/index.d.ts +3 -0
  121. package/dist/index.js +61 -0
  122. package/dist/index.js.map +1 -0
  123. package/dist/templates/articlesPage.d.ts +3 -0
  124. package/dist/templates/articlesPage.js +46 -0
  125. package/dist/templates/articlesPage.js.map +1 -0
  126. package/dist/templates/conceptsPage.d.ts +2 -0
  127. package/dist/templates/conceptsPage.js +24 -0
  128. package/dist/templates/conceptsPage.js.map +1 -0
  129. package/dist/templates/decisionsPage.d.ts +2 -0
  130. package/dist/templates/decisionsPage.js +27 -0
  131. package/dist/templates/decisionsPage.js.map +1 -0
  132. package/dist/templates/devlogPage.d.ts +2 -0
  133. package/dist/templates/devlogPage.js +22 -0
  134. package/dist/templates/devlogPage.js.map +1 -0
  135. package/dist/templates/indexPage.d.ts +6 -0
  136. package/dist/templates/indexPage.js +33 -0
  137. package/dist/templates/indexPage.js.map +1 -0
  138. package/dist/templates/linksPage.d.ts +2 -0
  139. package/dist/templates/linksPage.js +26 -0
  140. package/dist/templates/linksPage.js.map +1 -0
  141. package/dist/templates/notesPage.d.ts +2 -0
  142. package/dist/templates/notesPage.js +26 -0
  143. package/dist/templates/notesPage.js.map +1 -0
  144. package/dist/templates/symbolsPage.d.ts +2 -0
  145. package/dist/templates/symbolsPage.js +25 -0
  146. package/dist/templates/symbolsPage.js.map +1 -0
  147. package/docs/concepts.md +249 -0
  148. package/docs/reference.md +356 -0
  149. package/docs/setup.md +331 -0
  150. package/docs/workflows.md +154 -0
  151. package/package.json +61 -0
  152. package/skills/wk/SKILL.md +251 -0
  153. package/skills/wk/agents/openai.yaml +4 -0
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.registerInstallAgentCommand = registerInstallAgentCommand;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const os_1 = __importDefault(require("os"));
9
+ const path_1 = __importDefault(require("path"));
10
+ const helpers_1 = require("../helpers");
11
+ function registerInstallAgentCommand(program) {
12
+ program
13
+ .command("install-agent")
14
+ .description("Install Wikiwiki instructions for an agentic IDE.")
15
+ .argument("<target>", "agent target, currently: codex")
16
+ .option("--dest <path>", "destination skill directory")
17
+ .option("--yes", "write files without an interactive confirmation prompt")
18
+ .option("--force", "install even when the destination contains unknown files")
19
+ .option("--json", "print machine-readable output")
20
+ .action((target, options) => {
21
+ if (target !== "codex") {
22
+ throw new Error(`Unsupported agent target: ${target}. Expected: codex.`);
23
+ }
24
+ const source = bundledSkillPath();
25
+ const destination = path_1.default.resolve(options.dest ?? defaultCodexSkillPath());
26
+ const sourceFiles = listRelativeFiles(source);
27
+ const result = {
28
+ ok: Boolean(options.yes),
29
+ target,
30
+ source,
31
+ destination,
32
+ files: sourceFiles.map((file) => path_1.default.join(destination, file))
33
+ };
34
+ if (!options.yes) {
35
+ const command = `wk install-agent codex --dest ${JSON.stringify(destination)} --yes`;
36
+ if (options.json) {
37
+ (0, helpers_1.printJson)({
38
+ ...result,
39
+ ok: false,
40
+ confirmation_required: true,
41
+ command
42
+ });
43
+ return;
44
+ }
45
+ console.log("Wikiwiki can install the wk skill for Codex.");
46
+ console.log(`Destination: ${destination}`);
47
+ console.log(`Run this command to write files:\n${command}`);
48
+ return;
49
+ }
50
+ const destinationStatus = inspectDestination(destination, sourceFiles, Boolean(options.force));
51
+ installKnownFiles(source, destination, sourceFiles, Boolean(options.force));
52
+ if (options.json) {
53
+ (0, helpers_1.printJson)({
54
+ ...result,
55
+ force: Boolean(options.force),
56
+ overwritten_files: destinationStatus.knownFiles.map((file) => path_1.default.join(destination, file)),
57
+ unknown_files: destinationStatus.unknownFiles.map((file) => path_1.default.join(destination, file))
58
+ });
59
+ return;
60
+ }
61
+ console.log(`Installed wk agent skill to ${destination}`);
62
+ });
63
+ }
64
+ function bundledSkillPath() {
65
+ const candidates = [
66
+ path_1.default.resolve(__dirname, "../../../skills/wk"),
67
+ path_1.default.resolve(process.cwd(), "skills/wk")
68
+ ];
69
+ const found = candidates.find((candidate) => fs_1.default.existsSync(path_1.default.join(candidate, "SKILL.md")));
70
+ if (!found) {
71
+ throw new Error("Bundled wk skill not found.");
72
+ }
73
+ return found;
74
+ }
75
+ function defaultCodexSkillPath() {
76
+ const codexHome = process.env.CODEX_HOME || path_1.default.join(os_1.default.homedir(), ".codex");
77
+ return path_1.default.join(codexHome, "skills/wk");
78
+ }
79
+ function inspectDestination(destination, sourceFiles, force) {
80
+ if (!fs_1.default.existsSync(destination)) {
81
+ return { knownFiles: [], unknownFiles: [] };
82
+ }
83
+ const stat = fs_1.default.lstatSync(destination);
84
+ if (!stat.isDirectory()) {
85
+ throw new Error(`Destination exists and is not a directory: ${destination}`);
86
+ }
87
+ const sourceFileSet = new Set(sourceFiles);
88
+ const destinationFiles = listRelativeFiles(destination);
89
+ const knownFiles = destinationFiles.filter((file) => sourceFileSet.has(file));
90
+ const unknownFiles = destinationFiles.filter((file) => !sourceFileSet.has(file));
91
+ if (unknownFiles.length > 0 && !force) {
92
+ throw new Error(`Refusing to install wk skill because ${destination} contains unknown files: ${unknownFiles.join(", ")}. ` +
93
+ "Re-run with --force to keep those files and overwrite only bundled wk skill files.");
94
+ }
95
+ return { knownFiles, unknownFiles };
96
+ }
97
+ function installKnownFiles(source, destination, sourceFiles, force) {
98
+ fs_1.default.mkdirSync(destination, { recursive: true });
99
+ for (const file of sourceFiles) {
100
+ const sourceFile = path_1.default.join(source, file);
101
+ const destinationFile = path_1.default.join(destination, file);
102
+ fs_1.default.mkdirSync(path_1.default.dirname(destinationFile), { recursive: true });
103
+ if (fs_1.default.existsSync(destinationFile) && fs_1.default.lstatSync(destinationFile).isSymbolicLink()) {
104
+ if (!force) {
105
+ throw new Error(`Refusing to overwrite symlink at known wk skill path: ${destinationFile}. Re-run with --force to replace it.`);
106
+ }
107
+ fs_1.default.unlinkSync(destinationFile);
108
+ }
109
+ fs_1.default.copyFileSync(sourceFile, destinationFile);
110
+ }
111
+ }
112
+ function listRelativeFiles(root) {
113
+ const files = [];
114
+ function walk(directory) {
115
+ for (const entry of fs_1.default.readdirSync(directory, { withFileTypes: true })) {
116
+ const fullPath = path_1.default.join(directory, entry.name);
117
+ if (entry.isDirectory()) {
118
+ walk(fullPath);
119
+ continue;
120
+ }
121
+ files.push(toPosixPath(path_1.default.relative(root, fullPath)));
122
+ }
123
+ }
124
+ walk(root);
125
+ return files.sort();
126
+ }
127
+ function toPosixPath(file) {
128
+ return file.split(path_1.default.sep).join("/");
129
+ }
130
+ //# sourceMappingURL=installAgent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installAgent.js","sourceRoot":"","sources":["../../../src/cli/commands/installAgent.ts"],"names":[],"mappings":";;;;;AAaA,kEA0DC;AAvED,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AAExB,wCAAuC;AASvC,SAAgB,2BAA2B,CAAC,OAAgB;IAC1D,OAAO;SACJ,OAAO,CAAC,eAAe,CAAC;SACxB,WAAW,CAAC,mDAAmD,CAAC;SAChE,QAAQ,CAAC,UAAU,EAAE,gCAAgC,CAAC;SACtD,MAAM,CAAC,eAAe,EAAE,6BAA6B,CAAC;SACtD,MAAM,CAAC,OAAO,EAAE,wDAAwD,CAAC;SACzE,MAAM,CAAC,SAAS,EAAE,0DAA0D,CAAC;SAC7E,MAAM,CAAC,QAAQ,EAAE,+BAA+B,CAAC;SACjD,MAAM,CAAC,CAAC,MAAc,EAAE,OAA4B,EAAE,EAAE;QACvD,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,6BAA6B,MAAM,oBAAoB,CAAC,CAAC;QAC3E,CAAC;QAED,MAAM,MAAM,GAAG,gBAAgB,EAAE,CAAC;QAClC,MAAM,WAAW,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,IAAI,qBAAqB,EAAE,CAAC,CAAC;QAC1E,MAAM,WAAW,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAC9C,MAAM,MAAM,GAAG;YACb,EAAE,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC;YACxB,MAAM;YACN,MAAM;YACN,WAAW;YACX,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAI,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AAC,eAAe,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC;YACrF,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,MAAM,IAAI,KAAK,CAAC,yDAAyD,eAAe,sCAAsC,CAAC,CAAC;YAClI,CAAC;YACD,YAAE,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;QACjC,CAAC;QAED,YAAE,CAAC,YAAY,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAY;IACrC,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,SAAS,IAAI,CAAC,SAAiB;QAC7B,KAAK,MAAM,KAAK,IAAI,YAAE,CAAC,WAAW,CAAC,SAAS,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;YACvE,MAAM,QAAQ,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;YAClD,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;gBACxB,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACf,SAAS;YACX,CAAC;YAED,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,cAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,CAAC;IACX,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC;AACtB,CAAC;AAED,SAAS,WAAW,CAAC,IAAY;IAC/B,OAAO,IAAI,CAAC,KAAK,CAAC,cAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare function registerLinkCommand(program: Command): void;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerLinkCommand = registerLinkCommand;
4
+ const helpers_1 = require("../helpers");
5
+ const ids_1 = require("../../core/ids");
6
+ const paths_1 = require("../../core/paths");
7
+ const store_1 = require("../../core/store");
8
+ function registerLinkCommand(program) {
9
+ const link = program.command("link").description("Manage links between records or files.");
10
+ link
11
+ .command("add")
12
+ .description("Add a link.")
13
+ .option("--from <from>", "source record id or file")
14
+ .option("--to <to>", "target record id or file")
15
+ .option("--relationship <relationship>", "relationship name")
16
+ .option("--source <source>", "record source: manual, agent, git-diff, imported")
17
+ .option("--authority <authority>", "record authority: user, agent, system")
18
+ .option("--confidence <confidence>", "record confidence: low, medium, high")
19
+ .option("--json [payload]", "read input as JSON and print machine-readable output")
20
+ .action((options) => {
21
+ const root = (0, paths_1.findRepoRoot)();
22
+ const payload = (0, helpers_1.parseJsonInput)(options.json);
23
+ const record = {
24
+ type: "link",
25
+ id: (0, helpers_1.stringValue)(payload, "id", (0, ids_1.createId)("link")),
26
+ from: options.from ?? (0, helpers_1.stringValue)(payload, "from"),
27
+ to: options.to ?? (0, helpers_1.stringValue)(payload, "to"),
28
+ relationship: options.relationship ?? (0, helpers_1.stringValue)(payload, "relationship"),
29
+ ...(0, helpers_1.commonRecordFields)(options, payload),
30
+ created_at: (0, helpers_1.stringValue)(payload, "created_at", new Date().toISOString())
31
+ };
32
+ const added = (0, store_1.appendRecord)(root, "link", record);
33
+ (0, helpers_1.printAdded)("link", added.id, (0, helpers_1.wantsJsonOutput)(options.json), added);
34
+ });
35
+ }
36
+ //# sourceMappingURL=link.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"link.js","sourceRoot":"","sources":["../../../src/cli/commands/link.ts"],"names":[],"mappings":";;AAaA,kDA6BC;AAzCD,wCAMoB;AACpB,wCAA0C;AAC1C,4CAAgD;AAChD,4CAAgD;AAGhD,SAAgB,mBAAmB,CAAC,OAAgB;IAClD,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,wCAAwC,CA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AC,CAAC;QACjD,IAAA,oBAAU,EAAC,MAAM,EAAE,KAAK,CAAC,EAAE,EAAE,IAAA,yBAAe,EAAC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare function registerNoteCommand(program: Command): void;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerNoteCommand = registerNoteCommand;
4
+ const helpers_1 = require("../helpers");
5
+ const ids_1 = require("../../core/ids");
6
+ const paths_1 = require("../../core/paths");
7
+ const store_1 = require("../../core/store");
8
+ function registerNoteCommand(program) {
9
+ const note = program.command("note").description("Manage lightweight notes.");
10
+ (0, helpers_1.addCommonRecordOptions)(note
11
+ .command("add [body...]")
12
+ .description("Add a note.")
13
+ .option("--title <title>", "note title")
14
+ .option("--json [payload]", "read input as JSON and print machine-readable output")).action((bodyParts, options) => {
15
+ const root = (0, paths_1.findRepoRoot)();
16
+ const payload = (0, helpers_1.parseJsonInput)(options.json);
17
+ const body = (0, helpers_1.stringValue)(payload, "body", bodyParts?.join(" ") ?? "");
18
+ const title = options.title ?? (0, helpers_1.stringValue)(payload, "title");
19
+ const createdAt = (0, helpers_1.stringValue)(payload, "created_at", new Date().toISOString());
20
+ const record = {
21
+ type: "note",
22
+ id: (0, helpers_1.stringValue)(payload, "id", (0, ids_1.createId)("note")),
23
+ title: title || undefined,
24
+ body,
25
+ files: (0, helpers_1.parseList)(options.files).length ? (0, helpers_1.parseList)(options.files) : (0, helpers_1.arrayValue)(payload, "files"),
26
+ tags: (0, helpers_1.parseList)(options.tags).length ? (0, helpers_1.parseList)(options.tags) : (0, helpers_1.arrayValue)(payload, "tags"),
27
+ ...(0, helpers_1.commonRecordFields)(options, payload),
28
+ created_at: createdAt
29
+ };
30
+ const added = (0, store_1.appendRecord)(root, "note", record);
31
+ (0, helpers_1.printAdded)("note", added.id, (0, helpers_1.wantsJsonOutput)(options.json), added);
32
+ });
33
+ }
34
+ //# sourceMappingURL=note.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"note.js","sourceRoot":"","sources":["../../../src/cli/commands/note.ts"],"names":[],"mappings":";;AAgBA,kDA6BC;AA5CD,wCASoB;AACpB,wCAA0C;AAC1C,4CAAgD;AAChD,4CAAgD;AAGhD,SAAgB,mBAAmB,CAAC,OAAgB;IAClD,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,2BAA2B,CAAC,CAAC;IAE9E,IAAA,gCAAsB,EACpB,IAAI;SACD,OAAO,CAAC,eAAe,CAAC;SACxB,WAAW,CAAC,aAAa,CAAC;SAC1B,MAAM,CAAC,iBAAiB,EAAE,YAAY,CAAC;SACvC,MAAM,CAAC,kBAAkB,EAAE,sDAAsD,CAAC,CACtF,CAAC,MAAM,CAAC,CAAC,SAA+B,EAAE,OAAO,EAAE,EAAE;QACpD,MAAM,IAAI,GAAG,IAAA,oBAAY,GAAE,CAAC;QAC5B,MAAM,OAAO,GAAG,IAAA,wBAAc,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC7C,MAAM,IAAI,GAAG,IAAA,qBAAW,EAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;QACtE,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,IAAA,qBAAW,EAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QAC7D,MAAM,SAAS,GAAG,IAAA,qBAAW,EAAC,OAAO,EAAE,YAAY,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;QAC/E,MAAM,MAAM,GAAe;YACzB,IAAI,EAAE,MAAM;YACZ,EAAE,EAAE,IAAA,qBAAW,EAAC,OAAO,EAAE,IAAI,EAAE,IAAA,cAAQ,EAAC,MAAM,CAAC,CAAC;YAChD,KAAK,EAAE,KAAK,IAAI,SAAS;YACzB,IAAI;YACJ,KAAK,EAAE,IAAA,mBAAS,EAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,mBAAS,EAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAA,oBAAU,EAAC,OAAO,EAAE,OAAO,CAAC;YAChG,IAAI,EAAE,IAAA,mBAAS,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAA,mBAAS,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAA,oBAAU,EAAC,OAAO,EAAE,MAAM,CAAC;YAC5F,GAAG,IAAA,4BAAkB,EAAC,OAAO,EAAE,OAAO,CAAC;YACvC,UAAU,EAAE,SAAS;SACtB,CAAC;QAEF,MAAM,KAAK,GAAG,IAAA,oBAAY,EAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QACjD,IAAA,oBAAU,EAAC,MAAM,EAAE,KAAK,CAAC,EAAE,EAAE,IAAA,yBAAe,EAAC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare function registerPagesCommand(program: Command): void;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerPagesCommand = registerPagesCommand;
4
+ const helpers_1 = require("../helpers");
5
+ const paths_1 = require("../../core/paths");
6
+ const pages_1 = require("../../core/pages");
7
+ function registerPagesCommand(program) {
8
+ const command = program
9
+ .command("pages")
10
+ .description("Scaffold GitHub Pages publishing for the generated Wikiwiki site.");
11
+ command
12
+ .command("init")
13
+ .description("Write a GitHub Actions workflow that publishes wiki-site/.")
14
+ .option("--audience <audience>", "site audience: all, user, developer")
15
+ .option("--branch <branch>", "branch that should publish the Pages site")
16
+ .option("--source-base-url <url>", "base URL for source file links")
17
+ .option("--workflow <path>", "workflow path", ".github/workflows/wikiwiki-pages.yml")
18
+ .option("--force", "overwrite an existing different Pages workflow")
19
+ .option("--json", "print machine-readable output")
20
+ .action((options) => {
21
+ const root = (0, paths_1.findRepoRoot)();
22
+ const result = (0, pages_1.initPages)(root, options);
23
+ if (options.json) {
24
+ (0, helpers_1.printJson)(result);
25
+ return;
26
+ }
27
+ if (result.already_current) {
28
+ console.log("Wikiwiki Pages workflow is already current.");
29
+ }
30
+ else if (result.overwritten) {
31
+ console.log("Overwrote Wikiwiki Pages workflow.");
32
+ }
33
+ else {
34
+ console.log("Created Wikiwiki Pages workflow.");
35
+ }
36
+ console.log(`Workflow: ${result.workflow_path}`);
37
+ console.log(`Branch: ${result.branch}`);
38
+ console.log(`Audience: ${result.audience}`);
39
+ console.log(`Source base URL: ${result.source_base_url}`);
40
+ console.log("Next steps:");
41
+ for (const step of result.next_steps) {
42
+ console.log(`- ${step}`);
43
+ }
44
+ });
45
+ }
46
+ //# sourceMappingURL=pages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pages.js","sourceRoot":"","sources":["../../../src/cli/commands/pages.ts"],"names":[],"mappings":";;AAcA,oDAuCC;AApDD,wCAAuC;AACvC,4CAAgD;AAChD,4CAA6C;AAW7C,SAAgB,oBAAoB,CAAC,OAAgB;IACnD,MAAM,OAAO,GAAG,OAAO;SACpB,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,mEAAmE,CAAC,CAAC;IAEpF,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,4DAA4D,CAAC;SACzE,MAAM,CAAC,uBAAuB,EAAE,qCAAqC,CAAC;SACtE,MAAM,CAAC,mBAAmB,EAAE,2CAA2C,CAAC;SACxE,MAAM,CAAC,yBAAyB,EAAE,gCAAgC,CAAC;SACnE,MAAM,CAAC,mBAAmB,EAAE,eAAe,EAAE,s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and(program: Command): void;
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerRecordCommand = registerRecordCommand;
4
+ const helpers_1 = require("../helpers");
5
+ const paths_1 = require("../../core/paths");
6
+ const store_1 = require("../../core/store");
7
+ function registerRecordCommand(program) {
8
+ const record = program.command("record").description("Inspect and revise records.");
9
+ record
10
+ .command("list <type>")
11
+ .description("List active records by type.")
12
+ .option("--json", "print machine-readable output")
13
+ .action((typeArg, options) => {
14
+ const root = (0, paths_1.findRepoRoot)();
15
+ const type = (0, helpers_1.parseRecordType)(typeArg);
16
+ const records = (0, store_1.readRecords)(root, type);
17
+ const result = { type, records };
18
+ if (options.json) {
19
+ (0, helpers_1.printJson)(result);
20
+ return;
21
+ }
22
+ for (const item of records) {
23
+ console.log(`${item.id}\t${(0, helpers_1.recordTitle)(item)}`);
24
+ }
25
+ });
26
+ record
27
+ .command("get <type> <id>")
28
+ .description("Get one active record.")
29
+ .option("--json", "print machine-readable output")
30
+ .action((typeArg, id, options) => {
31
+ const root = (0, paths_1.findRepoRoot)();
32
+ const type = (0, helpers_1.parseRecordType)(typeArg);
33
+ const found = (0, store_1.readActiveRecord)(root, type, id);
34
+ if (!found) {
35
+ throw new Error(`Active ${type} record not found: ${id}`);
36
+ }
37
+ if (options.json) {
38
+ (0, helpers_1.printJson)({ type, record: found });
39
+ return;
40
+ }
41
+ console.log(`${found.id}\t${(0, helpers_1.recordTitle)(found)}`);
42
+ });
43
+ record
44
+ .command("update <type> <id>")
45
+ .description("Append a revised record with the same logical id.")
46
+ .requiredOption("--json <payload>", "JSON fields to merge into the active record")
47
+ .action((typeArg, id, options) => {
48
+ const root = (0, paths_1.findRepoRoot)();
49
+ const type = (0, helpers_1.parseRecordType)(typeArg);
50
+ const current = (0, store_1.readActiveRecord)(root, type, id);
51
+ if (!current) {
52
+ throw new Error(`Active ${type} record not found: ${id}`);
53
+ }
54
+ const payload = (0, helpers_1.parseJsonInput)(options.json);
55
+ const updated = buildUpdatedRecord(type, current, payload);
56
+ const added = (0, store_1.appendRecord)(root, type, updated);
57
+ (0, helpers_1.printJson)({ ok: true, record: added });
58
+ });
59
+ record
60
+ .command("delete <type> <id>")
61
+ .description("Append a deletion tombstone for an active record.")
62
+ .option("--reason <reason>", "reason for deletion")
63
+ .option("--json", "print machine-readable output")
64
+ .action((typeArg, id, options) => {
65
+ const root = (0, paths_1.findRepoRoot)();
66
+ const type = (0, helpers_1.parseRecordType)(typeArg);
67
+ const current = (0, store_1.readActiveRecord)(root, type, id);
68
+ if (!current) {
69
+ throw new Error(`Active ${type} record not found: ${id}`);
70
+ }
71
+ const now = new Date().toISOString();
72
+ const tombstone = {
73
+ ...current,
74
+ updated_at: now,
75
+ deleted_at: now,
76
+ delete_reason: options.reason ?? ""
77
+ };
78
+ const added = (0, store_1.appendRecord)(root, type, tombstone);
79
+ const result = { ok: true, record: added };
80
+ if (options.json) {
81
+ (0, helpers_1.printJson)(result);
82
+ return;
83
+ }
84
+ console.log(`Deleted ${type}: ${id}`);
85
+ });
86
+ }
87
+ function buildUpdatedRecord(type, current, payload) {
88
+ const now = new Date().toISOString();
89
+ const next = {
90
+ ...current,
91
+ ...payload,
92
+ type,
93
+ id: current.id,
94
+ created_at: current.created_at,
95
+ updated_at: typeof payload.updated_at === "string" ? payload.updated_at : now
96
+ };
97
+ delete next.deleted_at;
98
+ delete next.delete_reason;
99
+ return next;
100
+ }
101
+ //# sourceMappingURL=record.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"record.js","sourceRoot":"","sources":["../../../src/cli/commands/record.ts"],"names":[],"mappings":";;AAWA,sDA2FC;AArGD,wCAKoB;AACpB,4CAAgD;AAChD,4CAA+E;AAG/E,SAAgB,qBAAqB,CAAC,OAAgB;IACpD,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,6BAA6B,CAAC,CAAC;IAEpF,MAAM;SACH,OAAO,CAAC,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IAAI;QACJ,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,UAAU,EAAE,OAAO,CAAC,UAAU;QAC9B,UAAU,EAAE,OAAO,OAAO,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG;KACjE,CAAC;IAEf,OAAO,IAAI,CAAC,UAAU,CAAC;IACvB,OAAO,IAAI,CAAC,aAAa,CAAC;IAE1B,OAAO,IAAuB,CAAC;AACjC,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare function registerRenderCommand(program: Command): void;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerRenderCommand = registerRenderCommand;
4
+ const helpers_1 = require("../helpers");
5
+ const paths_1 = require("../../core/paths");
6
+ const renderer_1 = require("../../core/renderer");
7
+ const store_1 = require("../../core/store");
8
+ function registerRenderCommand(program) {
9
+ program
10
+ .command("render")
11
+ .description("Render structured records into Markdown wiki pages.")
12
+ .option("--json", "print machine-readable output")
13
+ .action((options) => {
14
+ const root = (0, paths_1.findRepoRoot)();
15
+ if (!(0, store_1.isInitialized)(root)) {
16
+ throw new Error("Wikiwiki is not initialized. Run `wk init` first.");
17
+ }
18
+ const files = (0, renderer_1.renderWiki)(root);
19
+ const result = {
20
+ ok: true,
21
+ rendered_files: files.map((file) => (0, paths_1.relativeReportPath)(root, file))
22
+ };
23
+ if (options.json) {
24
+ (0, helpers_1.printJson)(result);
25
+ return;
26
+ }
27
+ console.log("Rendered wiki files:");
28
+ for (const file of result.rendered_files) {
29
+ console.log(`- ${file}`);
30
+ }
31
+ });
32
+ }
33
+ //# sourceMappingURL=render.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"render.js","sourceRoot":"","sources":["../../../src/cli/commands/render.ts"],"names":[],"mappings":";;AAMA,sDA2BC;AAhCD,wCAAuC;AACvC,4CAAoE;AACpE,kDAAiD;AACjD,4CAAiD;AAEjD,SAAgB,qBAAqB,CAAC,OAAgB;IACpD,OAAO;SACJ,OAAO,CAAC,QAAQ,CAAC;SACjB,WAAW,CAAC,qDAAqD,CAAC;SAClE,MAAM,CAAC,QAAQ,EAAE,+BAA+B,CAAC;SACjD,MAAM,CAAC,CAAC,OAA2B,EAAE,EAAE;QACtC,MAAM,IAAI,GAAG,IAAA,oBAAY,GAAE,CAAC;QAC5B,IAAI,CAAC,IAAA,qBAAa,EAAC,IAAI,CAAC,EAAE,CAAC;YACzB,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;QACvE,CAAC;QAED,MAAM,KAAK,GAAG,IAAA,qBAAU,EAAC,IAAI,CAAC,CAAC;QAC/B,MAAM,MAAM,GAAG;YACb,EAAE,EAAE,IAAI;YACR,cAAc,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAA,0BAAkB,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;SACpE,CAAC;QAEF,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,IAAA,mBAAS,EAAC,MAAM,CAAC,CAAC;YAClB,OAAO;QACT,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;QACpC,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;YACzC,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from "commander";
2
+ export declare function registerSearchCommand(program: Command): void;
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.registerSearchCommand = registerSearchCommand;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const path_1 = __importDefault(require("path"));
9
+ const helpers_1 = require("../helpers");
10
+ const paths_1 = require("../../core/paths");
11
+ const store_1 = require("../../core/store");
12
+ const schemas_1 = require("../../core/schemas");
13
+ function registerSearchCommand(program) {
14
+ program
15
+ .command("search <query...>")
16
+ .description("Search active records and rendered wiki pages.")
17
+ .option("--json", "print machine-readable output")
18
+ .action((queryParts, options) => {
19
+ const root = (0, paths_1.findRepoRoot)();
20
+ const query = queryParts.join(" ").trim();
21
+ if (!query) {
22
+ throw new Error("Search query is required.");
23
+ }
24
+ const result = {
25
+ query,
26
+ records: searchRecords(root, query),
27
+ file_matches: searchRenderedFiles(root, query)
28
+ };
29
+ if (options.json) {
30
+ (0, helpers_1.printJson)(result);
31
+ return;
32
+ }
33
+ console.log(`Record matches: ${result.records.length}`);
34
+ for (const match of result.records) {
35
+ console.log(`- ${match.type} ${match.id}: ${match.title}`);
36
+ }
37
+ console.log(`File matches: ${result.file_matches.length}`);
38
+ for (const match of result.file_matches) {
39
+ console.log(`- ${match.file}`);
40
+ }
41
+ });
42
+ }
43
+ function searchRecords(root, query) {
44
+ const normalized = query.toLowerCase();
45
+ const records = (0, store_1.readAllRecords)(root);
46
+ const matches = [];
47
+ for (const type of schemas_1.recordTypes) {
48
+ for (const record of records[type]) {
49
+ const haystack = recordSearchText(record).toLowerCase();
50
+ if (!haystack.includes(normalized)) {
51
+ continue;
52
+ }
53
+ matches.push({
54
+ type,
55
+ id: record.id,
56
+ title: (0, helpers_1.recordTitle)(record),
57
+ snippet: snippet(recordSearchText(record), query),
58
+ source: record.source,
59
+ authority: record.authority,
60
+ confidence: record.confidence,
61
+ files: relatedFiles(record).map(paths_1.toPosixPath)
62
+ });
63
+ }
64
+ }
65
+ return matches;
66
+ }
67
+ function searchRenderedFiles(root, query) {
68
+ const outputPath = (0, paths_1.wikiPath)(root);
69
+ if (!fs_1.default.existsSync(outputPath)) {
70
+ return [];
71
+ }
72
+ const normalized = query.toLowerCase();
73
+ return listMarkdownFiles(outputPath)
74
+ .sort()
75
+ .flatMap((file) => {
76
+ const content = fs_1.default.readFileSync(file, "utf8");
77
+ if (!content.toLowerCase().includes(normalized)) {
78
+ return [];
79
+ }
80
+ return [{
81
+ file: (0, paths_1.relativeReportPath)(root, file),
82
+ snippet: snippet(content, query)
83
+ }];
84
+ });
85
+ }
86
+ function listMarkdownFiles(root) {
87
+ return fs_1.default
88
+ .readdirSync(root, { withFileTypes: true })
89
+ .flatMap((entry) => {
90
+ const file = path_1.default.join(root, entry.name);
91
+ if (entry.isDirectory()) {
92
+ return listMarkdownFiles(file);
93
+ }
94
+ return entry.isFile() && entry.name.endsWith(".md") ? [file] : [];
95
+ });
96
+ }
97
+ function recordSearchText(record) {
98
+ return Object.values(record)
99
+ .flatMap((value) => Array.isArray(value) ? value : [value])
100
+ .filter((value) => typeof value === "string")
101
+ .join(" ");
102
+ }
103
+ function relatedFiles(record) {
104
+ if ("files" in record && Array.isArray(record.files)) {
105
+ return record.files;
106
+ }
107
+ if ("file" in record && typeof record.file === "string") {
108
+ return [record.file];
109
+ }
110
+ return [];
111
+ }
112
+ function snippet(text, query) {
113
+ const normalizedText = text.toLowerCase();
114
+ const normalizedQuery = query.toLowerCase();
115
+ const index = normalizedText.indexOf(normalizedQuery);
116
+ if (index < 0) {
117
+ return text.slice(0, 160).trim();
118
+ }
119
+ const start = Math.max(0, index - 60);
120
+ const end = Math.min(text.length, index + query.length + 100);
121
+ const prefix = start > 0 ? "..." : "";
122
+ const suffix = end < text.length ? "..." : "";
123
+ return `${prefix}${text.slice(start, end).trim()}${suffix}`;
124
+ }
125
+ //# sourceMappingURL=search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/cli/commands/search.ts"],"names":[],"mappings":";;;;;AAQA,sDAiCC;AAzCD,4CAAoB;AACpB,gDAAwB;AAExB,wCAAoD;AACpD,4CAA2F;AAC3F,4CAAkD;AAClD,gDAAiE;AAEjE,SAAgB,qBAAqB,CAAC,O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