@kaitranntt/ccs 7.77.1-dev.9 → 7.78.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 (207) hide show
  1. package/dist/auth/auth-commands.d.ts +2 -1
  2. package/dist/auth/auth-commands.d.ts.map +1 -1
  3. package/dist/auth/auth-commands.js +18 -4
  4. package/dist/auth/auth-commands.js.map +1 -1
  5. package/dist/auth/commands/backup-command.d.ts.map +1 -1
  6. package/dist/auth/commands/backup-command.js +7 -2
  7. package/dist/auth/commands/backup-command.js.map +1 -1
  8. package/dist/auth/commands/create-command.d.ts.map +1 -1
  9. package/dist/auth/commands/create-command.js +14 -16
  10. package/dist/auth/commands/create-command.js.map +1 -1
  11. package/dist/auth/commands/default-command.d.ts +1 -1
  12. package/dist/auth/commands/default-command.d.ts.map +1 -1
  13. package/dist/auth/commands/default-command.js +10 -2
  14. package/dist/auth/commands/default-command.js.map +1 -1
  15. package/dist/auth/commands/index.d.ts +1 -0
  16. package/dist/auth/commands/index.d.ts.map +1 -1
  17. package/dist/auth/commands/index.js +3 -1
  18. package/dist/auth/commands/index.js.map +1 -1
  19. package/dist/auth/commands/list-command.d.ts.map +1 -1
  20. package/dist/auth/commands/list-command.js +16 -3
  21. package/dist/auth/commands/list-command.js.map +1 -1
  22. package/dist/auth/commands/remove-command.d.ts.map +1 -1
  23. package/dist/auth/commands/remove-command.js +5 -1
  24. package/dist/auth/commands/remove-command.js.map +1 -1
  25. package/dist/auth/commands/resources-command.d.ts +3 -0
  26. package/dist/auth/commands/resources-command.d.ts.map +1 -0
  27. package/dist/auth/commands/resources-command.js +115 -0
  28. package/dist/auth/commands/resources-command.js.map +1 -0
  29. package/dist/auth/commands/show-command.d.ts.map +1 -1
  30. package/dist/auth/commands/show-command.js +13 -4
  31. package/dist/auth/commands/show-command.js.map +1 -1
  32. package/dist/auth/commands/types.d.ts +11 -1
  33. package/dist/auth/commands/types.d.ts.map +1 -1
  34. package/dist/auth/commands/types.js +41 -2
  35. package/dist/auth/commands/types.js.map +1 -1
  36. package/dist/auth/profile-continuity-inheritance.d.ts.map +1 -1
  37. package/dist/auth/profile-continuity-inheritance.js +2 -1
  38. package/dist/auth/profile-continuity-inheritance.js.map +1 -1
  39. package/dist/auth/profile-detector.d.ts.map +1 -1
  40. package/dist/auth/profile-detector.js +1 -0
  41. package/dist/auth/profile-detector.js.map +1 -1
  42. package/dist/auth/profile-registry.d.ts +2 -0
  43. package/dist/auth/profile-registry.d.ts.map +1 -1
  44. package/dist/auth/profile-registry.js +6 -2
  45. package/dist/auth/profile-registry.js.map +1 -1
  46. package/dist/auth/shared-resource-policy.d.ts +20 -0
  47. package/dist/auth/shared-resource-policy.d.ts.map +1 -0
  48. package/dist/auth/shared-resource-policy.js +69 -0
  49. package/dist/auth/shared-resource-policy.js.map +1 -0
  50. package/dist/cliproxy/auth/oauth-handler.d.ts +34 -0
  51. package/dist/cliproxy/auth/oauth-handler.d.ts.map +1 -1
  52. package/dist/cliproxy/auth/oauth-handler.js +85 -13
  53. package/dist/cliproxy/auth/oauth-handler.js.map +1 -1
  54. package/dist/cliproxy/auth/oauth-process.d.ts.map +1 -1
  55. package/dist/cliproxy/auth/oauth-process.js +94 -3
  56. package/dist/cliproxy/auth/oauth-process.js.map +1 -1
  57. package/dist/cliproxy/auth/oauth-trace/diagnose-failure.d.ts +24 -0
  58. package/dist/cliproxy/auth/oauth-trace/diagnose-failure.d.ts.map +1 -0
  59. package/dist/cliproxy/auth/oauth-trace/diagnose-failure.js +159 -0
  60. package/dist/cliproxy/auth/oauth-trace/diagnose-failure.js.map +1 -0
  61. package/dist/cliproxy/auth/oauth-trace/index.d.ts +4 -0
  62. package/dist/cliproxy/auth/oauth-trace/index.d.ts.map +1 -0
  63. package/dist/cliproxy/auth/oauth-trace/index.js +14 -0
  64. package/dist/cliproxy/auth/oauth-trace/index.js.map +1 -0
  65. package/dist/cliproxy/auth/oauth-trace/redactor.d.ts +22 -0
  66. package/dist/cliproxy/auth/oauth-trace/redactor.d.ts.map +1 -0
  67. package/dist/cliproxy/auth/oauth-trace/redactor.js +112 -0
  68. package/dist/cliproxy/auth/oauth-trace/redactor.js.map +1 -0
  69. package/dist/cliproxy/auth/oauth-trace/sink-file.d.ts +18 -0
  70. package/dist/cliproxy/auth/oauth-trace/sink-file.d.ts.map +1 -0
  71. package/dist/cliproxy/auth/oauth-trace/sink-file.js +90 -0
  72. package/dist/cliproxy/auth/oauth-trace/sink-file.js.map +1 -0
  73. package/dist/cliproxy/auth/oauth-trace/sink-memory.d.ts +13 -0
  74. package/dist/cliproxy/auth/oauth-trace/sink-memory.d.ts.map +1 -0
  75. package/dist/cliproxy/auth/oauth-trace/sink-memory.js +31 -0
  76. package/dist/cliproxy/auth/oauth-trace/sink-memory.js.map +1 -0
  77. package/dist/cliproxy/auth/oauth-trace/sink-verbose-stdout.d.ts +11 -0
  78. package/dist/cliproxy/auth/oauth-trace/sink-verbose-stdout.d.ts.map +1 -0
  79. package/dist/cliproxy/auth/oauth-trace/sink-verbose-stdout.js +47 -0
  80. package/dist/cliproxy/auth/oauth-trace/sink-verbose-stdout.js.map +1 -0
  81. package/dist/cliproxy/auth/oauth-trace/trace-events.d.ts +51 -0
  82. package/dist/cliproxy/auth/oauth-trace/trace-events.d.ts.map +1 -0
  83. package/dist/cliproxy/auth/oauth-trace/trace-events.js +44 -0
  84. package/dist/cliproxy/auth/oauth-trace/trace-events.js.map +1 -0
  85. package/dist/cliproxy/auth/oauth-trace/trace-recorder.d.ts +34 -0
  86. package/dist/cliproxy/auth/oauth-trace/trace-recorder.d.ts.map +1 -0
  87. package/dist/cliproxy/auth/oauth-trace/trace-recorder.js +83 -0
  88. package/dist/cliproxy/auth/oauth-trace/trace-recorder.js.map +1 -0
  89. package/dist/commands/command-catalog.d.ts +1 -1
  90. package/dist/commands/command-catalog.d.ts.map +1 -1
  91. package/dist/commands/command-catalog.js +1 -0
  92. package/dist/commands/command-catalog.js.map +1 -1
  93. package/dist/commands/completion-backend.d.ts.map +1 -1
  94. package/dist/commands/completion-backend.js +7 -0
  95. package/dist/commands/completion-backend.js.map +1 -1
  96. package/dist/commands/help-command.d.ts.map +1 -1
  97. package/dist/commands/help-command.js +1 -0
  98. package/dist/commands/help-command.js.map +1 -1
  99. package/dist/commands/sync-command.d.ts.map +1 -1
  100. package/dist/commands/sync-command.js +3 -2
  101. package/dist/commands/sync-command.js.map +1 -1
  102. package/dist/config/migration-manager.d.ts.map +1 -1
  103. package/dist/config/migration-manager.js +12 -0
  104. package/dist/config/migration-manager.js.map +1 -1
  105. package/dist/config/schemas/auth.d.ts +2 -0
  106. package/dist/config/schemas/auth.d.ts.map +1 -1
  107. package/dist/config/schemas/auth.js.map +1 -1
  108. package/dist/dispatcher/flows/account-flow.d.ts.map +1 -1
  109. package/dist/dispatcher/flows/account-flow.js +4 -3
  110. package/dist/dispatcher/flows/account-flow.js.map +1 -1
  111. package/dist/shared/claude-extension-setup.d.ts.map +1 -1
  112. package/dist/shared/claude-extension-setup.js +5 -1
  113. package/dist/shared/claude-extension-setup.js.map +1 -1
  114. package/dist/types/config.d.ts +2 -0
  115. package/dist/types/config.d.ts.map +1 -1
  116. package/dist/types/config.js.map +1 -1
  117. package/dist/ui/assets/accounts-CW9bbE4S.js +1 -0
  118. package/dist/ui/assets/{alert-dialog-BM9gIsRp.js → alert-dialog-ClPYGzV3.js} +1 -1
  119. package/dist/ui/assets/{api-0YJdilQb.js → api-BjpAFHdA.js} +1 -1
  120. package/dist/ui/assets/{auth-section-C1ljCo7W.js → auth-section-wl4-fzwD.js} +1 -1
  121. package/dist/ui/assets/{backups-section-C-iLf1kg.js → backups-section-CRfyOhtX.js} +1 -1
  122. package/dist/ui/assets/{channels-DDSqllsQ.js → channels-DH0HkSGX.js} +1 -1
  123. package/dist/ui/assets/{checkbox-5R1YTubE.js → checkbox-CTpEjpTH.js} +1 -1
  124. package/dist/ui/assets/{claude-extension-CEGefl3-.js → claude-extension-BQOBO5Au.js} +1 -1
  125. package/dist/ui/assets/{cliproxy-ai-providers-DVF3FnXM.js → cliproxy-ai-providers-DoUPKyI5.js} +1 -1
  126. package/dist/ui/assets/{cliproxy-control-panel-CIsKyGK6.js → cliproxy-control-panel-CvjXdHw9.js} +1 -1
  127. package/dist/ui/assets/{cliproxy-R4kPUeL-.js → cliproxy-qUbiZjec.js} +2 -2
  128. package/dist/ui/assets/{codex-BiEEUC4Y.js → codex-BeeazJpw.js} +1 -1
  129. package/dist/ui/assets/{confirm-dialog-BhJV4F_d.js → confirm-dialog-CYj_LLWN.js} +1 -1
  130. package/dist/ui/assets/{copilot-DgRLuQfV.js → copilot-ZCJeM_Zk.js} +1 -1
  131. package/dist/ui/assets/{cursor-BuOjfajj.js → cursor-CtBjQ1_j.js} +1 -1
  132. package/dist/ui/assets/{droid-BPiviAW2.js → droid-BLmzMBtN.js} +1 -1
  133. package/dist/ui/assets/{globalenv-section-DAqbiNI1.js → globalenv-section-0ENDeVbM.js} +1 -1
  134. package/dist/ui/assets/{health-B_CfF7J0.js → health-BEnDHk-j.js} +1 -1
  135. package/dist/ui/assets/{icons-DIVjDO-z.js → icons-DzKUh8vG.js} +1 -1
  136. package/dist/ui/assets/{index-CzKdWNe5.js → index-B3xma6R0.js} +1 -1
  137. package/dist/ui/assets/{index-BJl0cazY.js → index-Bs28kNJN.js} +27 -27
  138. package/dist/ui/assets/{index-BqR6NZDE.js → index-C04Kst21.js} +1 -1
  139. package/dist/ui/assets/{index-Cj4mWFVK.js → index-Cip18A41.js} +1 -1
  140. package/dist/ui/assets/{index-Bc-AbZRU.js → index-ClMz157R.js} +1 -1
  141. package/dist/ui/assets/index-D2_yb3d2.css +1 -0
  142. package/dist/ui/assets/{index-BEGD-4HR.js → index-DrCrZ7r1.js} +1 -1
  143. package/dist/ui/assets/{index-LJitUhfE.js → index-O9Qq-UJq.js} +1 -1
  144. package/dist/ui/assets/{logs-Lqv-I3_T.js → logs-DQxVdsHm.js} +1 -1
  145. package/dist/ui/assets/{masked-input-CgCDYXYf.js → masked-input-eN6tFUjN.js} +1 -1
  146. package/dist/ui/assets/{proxy-status-widget-Df-4cfdm.js → proxy-status-widget-50UIM6S8.js} +1 -1
  147. package/dist/ui/assets/{raw-json-settings-editor-panel-BpXdUisD.js → raw-json-settings-editor-panel-DqKmVWL-.js} +1 -1
  148. package/dist/ui/assets/{searchable-select-DCOfw3f0.js → searchable-select-JO0gngYE.js} +1 -1
  149. package/dist/ui/assets/{separator-Ct6a34bG.js → separator-AoncAA6l.js} +1 -1
  150. package/dist/ui/assets/shared-BTv96-3y.js +8 -0
  151. package/dist/ui/assets/{table-DsU2UX-e.js → table-BM_YK49c.js} +1 -1
  152. package/dist/ui/assets/{updates-D-0gOqSU.js → updates-eo4H4NOg.js} +1 -1
  153. package/dist/ui/assets/use-accounts-ELLatpzU.js +1 -0
  154. package/dist/ui/index.html +3 -3
  155. package/dist/web-server/routes/account-route-helpers.d.ts +3 -0
  156. package/dist/web-server/routes/account-route-helpers.d.ts.map +1 -1
  157. package/dist/web-server/routes/account-route-helpers.js.map +1 -1
  158. package/dist/web-server/routes/account-routes.d.ts.map +1 -1
  159. package/dist/web-server/routes/account-routes.js +97 -4
  160. package/dist/web-server/routes/account-routes.js.map +1 -1
  161. package/dist/web-server/routes/cliproxy-auth-routes.d.ts.map +1 -1
  162. package/dist/web-server/routes/cliproxy-auth-routes.js +29 -0
  163. package/dist/web-server/routes/cliproxy-auth-routes.js.map +1 -1
  164. package/dist/web-server/shared-routes-collections.d.ts +13 -0
  165. package/dist/web-server/shared-routes-collections.d.ts.map +1 -0
  166. package/dist/web-server/shared-routes-collections.js +170 -0
  167. package/dist/web-server/shared-routes-collections.js.map +1 -0
  168. package/dist/web-server/shared-routes-content.d.ts +16 -0
  169. package/dist/web-server/shared-routes-content.d.ts.map +1 -0
  170. package/dist/web-server/shared-routes-content.js +152 -0
  171. package/dist/web-server/shared-routes-content.js.map +1 -0
  172. package/dist/web-server/shared-routes-markdown-walker.d.ts +12 -0
  173. package/dist/web-server/shared-routes-markdown-walker.d.ts.map +1 -0
  174. package/dist/web-server/shared-routes-markdown-walker.js +97 -0
  175. package/dist/web-server/shared-routes-markdown-walker.js.map +1 -0
  176. package/dist/web-server/shared-routes-markdown.d.ts +18 -0
  177. package/dist/web-server/shared-routes-markdown.d.ts.map +1 -0
  178. package/dist/web-server/shared-routes-markdown.js +167 -0
  179. package/dist/web-server/shared-routes-markdown.js.map +1 -0
  180. package/dist/web-server/shared-routes-path-guards.d.ts +16 -0
  181. package/dist/web-server/shared-routes-path-guards.d.ts.map +1 -0
  182. package/dist/web-server/shared-routes-path-guards.js +93 -0
  183. package/dist/web-server/shared-routes-path-guards.js.map +1 -0
  184. package/dist/web-server/shared-routes-plugin-registry-content.d.ts +12 -0
  185. package/dist/web-server/shared-routes-plugin-registry-content.d.ts.map +1 -0
  186. package/dist/web-server/shared-routes-plugin-registry-content.js +93 -0
  187. package/dist/web-server/shared-routes-plugin-registry-content.js.map +1 -0
  188. package/dist/web-server/shared-routes-plugins.d.ts +21 -0
  189. package/dist/web-server/shared-routes-plugins.d.ts.map +1 -0
  190. package/dist/web-server/shared-routes-plugins.js +197 -0
  191. package/dist/web-server/shared-routes-plugins.js.map +1 -0
  192. package/dist/web-server/shared-routes-symlink-status.d.ts +27 -0
  193. package/dist/web-server/shared-routes-symlink-status.d.ts.map +1 -0
  194. package/dist/web-server/shared-routes-symlink-status.js +135 -0
  195. package/dist/web-server/shared-routes-symlink-status.js.map +1 -0
  196. package/dist/web-server/shared-routes-types.d.ts +23 -0
  197. package/dist/web-server/shared-routes-types.d.ts.map +1 -0
  198. package/dist/web-server/shared-routes-types.js +15 -0
  199. package/dist/web-server/shared-routes-types.js.map +1 -0
  200. package/dist/web-server/shared-routes.d.ts +2 -1
  201. package/dist/web-server/shared-routes.d.ts.map +1 -1
  202. package/dist/web-server/shared-routes.js +49 -455
  203. package/dist/web-server/shared-routes.js.map +1 -1
  204. package/package.json +1 -1
  205. package/dist/ui/assets/accounts-DkID6f81.js +0 -1
  206. package/dist/ui/assets/index-Cm0qoAXb.css +0 -1
  207. package/dist/ui/assets/shared-D-JFc_Cw.js +0 -8
@@ -0,0 +1,167 @@
1
+ "use strict";
2
+ /**
3
+ * Shared Routes — Markdown file reading and description extraction
4
+ *
5
+ * Handles YAML frontmatter parsing, body-line extraction, and safe
6
+ * bounded reads for both description snippets and full content.
7
+ *
8
+ * Directory walking is in shared-routes-markdown-walker.ts.
9
+ */
10
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ var desc = Object.getOwnPropertyDescriptor(m, k);
13
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14
+ desc = { enumerable: true, get: function() { return m[k]; } };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }) : (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ o[k2] = m[k];
20
+ }));
21
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
22
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
23
+ }) : function(o, v) {
24
+ o["default"] = v;
25
+ });
26
+ var __importStar = (this && this.__importStar) || function (mod) {
27
+ if (mod && mod.__esModule) return mod;
28
+ var result = {};
29
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
30
+ __setModuleDefault(result, mod);
31
+ return result;
32
+ };
33
+ Object.defineProperty(exports, "__esModule", { value: true });
34
+ exports.resolveReadableMarkdownPath = exports.readMarkdownContent = exports.readFirstMarkdownDescription = exports.readMarkdownDescription = exports.extractDescription = exports.collectMarkdownFiles = exports.MAX_CONTENT_FILE_BYTES = void 0;
35
+ const fs = __importStar(require("fs"));
36
+ const yaml = __importStar(require("js-yaml"));
37
+ const shared_routes_path_guards_1 = require("./shared-routes-path-guards");
38
+ const MAX_DESCRIPTION_LENGTH = 140;
39
+ const MAX_MARKDOWN_FILE_BYTES = 1024 * 1024; // 1 MiB
40
+ /** Exported for content module which uses a larger limit. */
41
+ exports.MAX_CONTENT_FILE_BYTES = 2 * 1024 * 1024; // 2 MiB
42
+ var shared_routes_markdown_walker_1 = require("./shared-routes-markdown-walker");
43
+ Object.defineProperty(exports, "collectMarkdownFiles", { enumerable: true, get: function () { return shared_routes_markdown_walker_1.collectMarkdownFiles; } });
44
+ // ---------------------------------------------------------------------------
45
+ // Description extraction helpers
46
+ // ---------------------------------------------------------------------------
47
+ function isDescriptionBodyLine(line) {
48
+ if (!line) {
49
+ return false;
50
+ }
51
+ if (line === '---' || line === '...') {
52
+ return false;
53
+ }
54
+ return !line.startsWith('#') && !line.startsWith('<!--');
55
+ }
56
+ function extractFrontmatterDescription(content) {
57
+ const frontmatterMatch = content.match(/^---\s*\r?\n([\s\S]*?)\r?\n---(?:\s*\r?\n|$)/);
58
+ if (!frontmatterMatch) {
59
+ return null;
60
+ }
61
+ try {
62
+ const parsed = yaml.load(frontmatterMatch[1]);
63
+ const description = parsed?.description;
64
+ if (typeof description !== 'string') {
65
+ return null;
66
+ }
67
+ const trimmed = description.trim();
68
+ return trimmed.length > 0 ? trimmed : null;
69
+ }
70
+ catch {
71
+ return null;
72
+ }
73
+ }
74
+ function stripFrontmatter(content) {
75
+ return content.replace(/^---\s*\r?\n[\s\S]*?\r?\n---\s*\r?\n?/, '');
76
+ }
77
+ function trimDescription(description) {
78
+ if (description.length <= MAX_DESCRIPTION_LENGTH) {
79
+ return description;
80
+ }
81
+ return `${description.slice(0, MAX_DESCRIPTION_LENGTH - 3).trimEnd()}...`;
82
+ }
83
+ function extractDescription(content) {
84
+ const frontmatterDescription = extractFrontmatterDescription(content);
85
+ if (frontmatterDescription) {
86
+ return trimDescription(frontmatterDescription);
87
+ }
88
+ // Fall back to first non-empty, non-heading body line.
89
+ const lines = stripFrontmatter(content).split('\n');
90
+ for (const line of lines) {
91
+ const trimmed = line.trim();
92
+ if (isDescriptionBodyLine(trimmed)) {
93
+ return trimDescription(trimmed);
94
+ }
95
+ }
96
+ return 'No description';
97
+ }
98
+ exports.extractDescription = extractDescription;
99
+ // ---------------------------------------------------------------------------
100
+ // File readers
101
+ // ---------------------------------------------------------------------------
102
+ function readMarkdownDescription(markdownPath, allowedRoots) {
103
+ try {
104
+ const resolvedMarkdownPath = (0, shared_routes_path_guards_1.safeRealPath)(markdownPath);
105
+ if (!resolvedMarkdownPath || !(0, shared_routes_path_guards_1.isPathWithinAny)(resolvedMarkdownPath, allowedRoots)) {
106
+ return null;
107
+ }
108
+ const stats = fs.statSync(resolvedMarkdownPath);
109
+ if (!stats.isFile() || stats.size > MAX_MARKDOWN_FILE_BYTES) {
110
+ return null;
111
+ }
112
+ const content = fs.readFileSync(resolvedMarkdownPath, 'utf8');
113
+ return extractDescription(content);
114
+ }
115
+ catch {
116
+ return null;
117
+ }
118
+ }
119
+ exports.readMarkdownDescription = readMarkdownDescription;
120
+ function readFirstMarkdownDescription(markdownPaths, allowedRoots) {
121
+ for (const markdownPath of markdownPaths) {
122
+ const description = readMarkdownDescription(markdownPath, allowedRoots);
123
+ if (description) {
124
+ return description;
125
+ }
126
+ }
127
+ return null;
128
+ }
129
+ exports.readFirstMarkdownDescription = readFirstMarkdownDescription;
130
+ function readMarkdownContent(markdownPath, allowedRoots) {
131
+ try {
132
+ const resolvedMarkdownPath = (0, shared_routes_path_guards_1.safeRealPath)(markdownPath);
133
+ if (!resolvedMarkdownPath || !(0, shared_routes_path_guards_1.isPathWithinAny)(resolvedMarkdownPath, allowedRoots)) {
134
+ return null;
135
+ }
136
+ const stats = fs.statSync(resolvedMarkdownPath);
137
+ if (!stats.isFile() || stats.size > exports.MAX_CONTENT_FILE_BYTES) {
138
+ return null;
139
+ }
140
+ return fs.readFileSync(resolvedMarkdownPath, 'utf8');
141
+ }
142
+ catch {
143
+ return null;
144
+ }
145
+ }
146
+ exports.readMarkdownContent = readMarkdownContent;
147
+ function resolveReadableMarkdownPath(markdownPaths, allowedRoots) {
148
+ for (const markdownPath of markdownPaths) {
149
+ const resolvedMarkdownPath = (0, shared_routes_path_guards_1.safeRealPath)(markdownPath);
150
+ if (!resolvedMarkdownPath || !(0, shared_routes_path_guards_1.isPathWithinAny)(resolvedMarkdownPath, allowedRoots)) {
151
+ continue;
152
+ }
153
+ try {
154
+ const stats = fs.statSync(resolvedMarkdownPath);
155
+ if (!stats.isFile() || stats.size > exports.MAX_CONTENT_FILE_BYTES) {
156
+ continue;
157
+ }
158
+ return resolvedMarkdownPath;
159
+ }
160
+ catch {
161
+ continue;
162
+ }
163
+ }
164
+ return null;
165
+ }
166
+ exports.resolveReadableMarkdownPath = resolveReadableMarkdownPath;
167
+ //# sourceMappingURL=shared-routes-markdown.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-routes-markdown.js","sourceRoot":"","sources":["../../src/web-server/shared-routes-markdown.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,8CAAgC;AAEhC,2EAA4E;AAE5E,MAAM,sBAAsB,GAAG,GAAG,CAAC;AACnC,MAAM,uBAAuB,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,QAAQ;AAErD,6DAA6D;AAChD,QAAA,sBAAsB,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,QAAQ;AAI/D,iFAAuE;AAA9D,qIAAA,oBAAoB,OAAA;AAE7B,8EAA8E;AAC9E,iCAAiC;AACjC,8EAA8E;AAE9E,SAAS,qBAAqB,CAAC,IAAY;IACzC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE,CAAC;QACrC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,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CAAC;QAC9B,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AApBD,kEAoBC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Shared Routes — Path safety helpers
3
+ *
4
+ * Prevents directory traversal by resolving real paths and checking
5
+ * containment within allowed roots before any file I/O.
6
+ */
7
+ import { getCcsDir } from '../config/config-loader-facade';
8
+ import type { SharedCollectionType } from './shared-routes-types';
9
+ export declare function safeRealPath(targetPath: string): string | null;
10
+ export declare function normalizeForPathComparison(targetPath: string): string;
11
+ export declare function isPathWithin(candidatePath: string, basePath: string): boolean;
12
+ export declare function isPathWithinAny(candidatePath: string, basePaths: Set<string>): boolean;
13
+ export declare function resolveAllowedRoots(type: SharedCollectionType, ccsDir: string, sharedDirRoot: string): Set<string>;
14
+ export declare function resolveSettingsAllowedRoots(ccsDir: string, sharedDirRoot: string): Set<string>;
15
+ export { getCcsDir };
16
+ //# sourceMappingURL=shared-routes-path-guards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-routes-path-guards.d.ts","sourceRoot":"","sources":["../../src/web-server/shared-routes-path-guards.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM9D;AAED,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAGrE;AAED,wBAAgB,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAK7E;AAED,wBAAgB,eAAe,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,OAAO,CAOtF;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,oBAAoB,EAC1B,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,GACpB,GAAG,CAAC,MAAM,CAAC,CAeb;AAED,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAS9F;AAGD,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ /**
3
+ * Shared Routes — Path safety helpers
4
+ *
5
+ * Prevents directory traversal by resolving real paths and checking
6
+ * containment within allowed roots before any file I/O.
7
+ */
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
21
+ }) : function(o, v) {
22
+ o["default"] = v;
23
+ });
24
+ var __importStar = (this && this.__importStar) || function (mod) {
25
+ if (mod && mod.__esModule) return mod;
26
+ var result = {};
27
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
28
+ __setModuleDefault(result, mod);
29
+ return result;
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.getCcsDir = exports.resolveSettingsAllowedRoots = exports.resolveAllowedRoots = exports.isPathWithinAny = exports.isPathWithin = exports.normalizeForPathComparison = exports.safeRealPath = void 0;
33
+ const fs = __importStar(require("fs"));
34
+ const path = __importStar(require("path"));
35
+ const claude_config_path_1 = require("../utils/claude-config-path");
36
+ const config_loader_facade_1 = require("../config/config-loader-facade");
37
+ Object.defineProperty(exports, "getCcsDir", { enumerable: true, get: function () { return config_loader_facade_1.getCcsDir; } });
38
+ function safeRealPath(targetPath) {
39
+ try {
40
+ return fs.realpathSync(targetPath);
41
+ }
42
+ catch {
43
+ return null;
44
+ }
45
+ }
46
+ exports.safeRealPath = safeRealPath;
47
+ function normalizeForPathComparison(targetPath) {
48
+ const normalized = path.resolve(targetPath);
49
+ return process.platform === 'win32' ? normalized.toLowerCase() : normalized;
50
+ }
51
+ exports.normalizeForPathComparison = normalizeForPathComparison;
52
+ function isPathWithin(candidatePath, basePath) {
53
+ const normalizedCandidate = normalizeForPathComparison(candidatePath);
54
+ const normalizedBase = normalizeForPathComparison(basePath);
55
+ const relative = path.relative(normalizedBase, normalizedCandidate);
56
+ return relative === '' || (!relative.startsWith('..') && !path.isAbsolute(relative));
57
+ }
58
+ exports.isPathWithin = isPathWithin;
59
+ function isPathWithinAny(candidatePath, basePaths) {
60
+ for (const basePath of basePaths) {
61
+ if (isPathWithin(candidatePath, basePath)) {
62
+ return true;
63
+ }
64
+ }
65
+ return false;
66
+ }
67
+ exports.isPathWithinAny = isPathWithinAny;
68
+ function resolveAllowedRoots(type, ccsDir, sharedDirRoot) {
69
+ if (type === 'commands' || type === 'plugins') {
70
+ return new Set([sharedDirRoot]);
71
+ }
72
+ return new Set([
73
+ sharedDirRoot,
74
+ ...[
75
+ path.join((0, claude_config_path_1.getClaudeConfigDir)(), type),
76
+ path.join(ccsDir, '.claude', type),
77
+ path.join(ccsDir, 'shared', type),
78
+ ]
79
+ .map((dirPath) => safeRealPath(dirPath))
80
+ .filter((dirPath) => typeof dirPath === 'string'),
81
+ ]);
82
+ }
83
+ exports.resolveAllowedRoots = resolveAllowedRoots;
84
+ function resolveSettingsAllowedRoots(ccsDir, sharedDirRoot) {
85
+ const claudeConfigDir = (0, claude_config_path_1.getClaudeConfigDir)();
86
+ return new Set([
87
+ sharedDirRoot,
88
+ safeRealPath(path.join(claudeConfigDir, 'settings.json')),
89
+ safeRealPath(path.join(ccsDir, '.claude', 'settings.json')),
90
+ ].filter((dirPath) => typeof dirPath === 'string'));
91
+ }
92
+ exports.resolveSettingsAllowedRoots = resolveSettingsAllowedRoots;
93
+ //# sourceMappingURL=shared-routes-path-guards.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-routes-path-guards.js","sourceRoot":"","sources":["../../src/web-server/shared-routes-path-guards.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAE7B,oEAAiE;AACjE,yEAA2D;AAiElD,0FAjEA,gCAAS,OAiEA;AA9DlB,SAAgB,YAAY,CAAC,UAAkB;IAC7C,IAAI,CAAC;QACH,OAAO,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;IACrC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAND,oCAMC;AAED,SAAgB,0BAA0B,CAAC,UAAkB;IAC3D,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC5C,OAAO,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;AAC9E,CAAC;AAHD,gEAGC;AAED,SAAgB,YAAY,CAAC,aAAqB,EAAE,QAAgB;IAClE,MAAM,mBAAmB,GAAG,0BAA0B,CAAC,aAAa,CAAC,CAAC;IACtE,MAAM,cAAc,GAAG,0BAA0B,CAAC,QAAQ,CAAC,CAAC;IAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,mBAAmB,CAAC,CAAC;IACpE,OAAO,QAAQ,KAAK,EAAE,IAAI,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI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IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;KAC5D,CAAC,MAAM,CAAC,CAAC,OAAO,EAAqB,EAAE,CAAC,OAAO,OAAO,KAAK,QAAQ,CAAC,CACtE,CAAC;AACJ,CAAC;AATD,kEASC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Shared Routes — Plugin registry content renderer
3
+ *
4
+ * Renders the markdown content for an installed plugin entry,
5
+ * pulling from installed_plugins.json, known_marketplaces.json,
6
+ * and blocklist.json within the allowed roots.
7
+ */
8
+ export declare function getPluginRegistryContent(itemPath: string, sharedDir: string, allowedRoots: Set<string>): {
9
+ content: string;
10
+ contentPath: string;
11
+ } | null;
12
+ //# sourceMappingURL=shared-routes-plugin-registry-content.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-routes-plugin-registry-content.d.ts","sourceRoot":"","sources":["../../src/web-server/shared-routes-plugin-registry-content.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAkCH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,GACxB;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CA0DjD"}
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ /**
3
+ * Shared Routes — Plugin registry content renderer
4
+ *
5
+ * Renders the markdown content for an installed plugin entry,
6
+ * pulling from installed_plugins.json, known_marketplaces.json,
7
+ * and blocklist.json within the allowed roots.
8
+ */
9
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ var desc = Object.getOwnPropertyDescriptor(m, k);
12
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13
+ desc = { enumerable: true, get: function() { return m[k]; } };
14
+ }
15
+ Object.defineProperty(o, k2, desc);
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || function (mod) {
26
+ if (mod && mod.__esModule) return mod;
27
+ var result = {};
28
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
+ __setModuleDefault(result, mod);
30
+ return result;
31
+ };
32
+ Object.defineProperty(exports, "__esModule", { value: true });
33
+ exports.getPluginRegistryContent = void 0;
34
+ const path = __importStar(require("path"));
35
+ const shared_routes_path_guards_1 = require("./shared-routes-path-guards");
36
+ const shared_routes_plugins_1 = require("./shared-routes-plugins");
37
+ function findPluginBlocklistEntry(sharedDir, allowedRoots, pluginName) {
38
+ const blocklist = (0, shared_routes_plugins_1.readJsonObject)(path.join(sharedDir, 'blocklist.json'), allowedRoots);
39
+ const plugins = blocklist?.plugins;
40
+ if (!Array.isArray(plugins)) {
41
+ return null;
42
+ }
43
+ return (plugins.find((entry) => entry &&
44
+ typeof entry === 'object' &&
45
+ 'plugin' in entry &&
46
+ entry.plugin === pluginName) ?? null);
47
+ }
48
+ function getPluginRegistryContent(itemPath, sharedDir, allowedRoots) {
49
+ const pluginName = (0, shared_routes_plugins_1.decodePluginRegistryPath)(itemPath);
50
+ if (!pluginName) {
51
+ return null;
52
+ }
53
+ const registryPath = path.join(sharedDir, 'installed_plugins.json');
54
+ const resolvedRegistryPath = (0, shared_routes_path_guards_1.safeRealPath)(registryPath);
55
+ if (!resolvedRegistryPath || !(0, shared_routes_path_guards_1.isPathWithinAny)(resolvedRegistryPath, allowedRoots)) {
56
+ return null;
57
+ }
58
+ const registry = (0, shared_routes_plugins_1.readPluginInstalledRegistry)(sharedDir, allowedRoots);
59
+ if (!registry || !Object.prototype.hasOwnProperty.call(registry.plugins, pluginName)) {
60
+ return null;
61
+ }
62
+ const metadata = registry.plugins[pluginName];
63
+ const marketplace = (0, shared_routes_plugins_1.extractMarketplaceFromPluginName)(pluginName);
64
+ const marketplaceEntry = marketplace
65
+ ? (0, shared_routes_plugins_1.readJsonObject)(path.join(sharedDir, 'known_marketplaces.json'), allowedRoots)?.[marketplace]
66
+ : null;
67
+ const blocklistEntry = findPluginBlocklistEntry(sharedDir, allowedRoots, pluginName);
68
+ const lines = [
69
+ `# ${pluginName}`,
70
+ '',
71
+ `Registry: \`${resolvedRegistryPath}\``,
72
+ '',
73
+ '## Installed Plugin',
74
+ '',
75
+ `- Source: shared \`installed_plugins.json\` registry`,
76
+ `- Registry version: ${registry.version ?? 'unknown'}`,
77
+ `- Marketplace: ${marketplace ?? 'not recorded in plugin name'}`,
78
+ `- Install records: ${Array.isArray(metadata) ? metadata.length : 1}`,
79
+ ];
80
+ if (marketplaceEntry) {
81
+ lines.push('', '## Marketplace Registry Entry', '', '```json', (0, shared_routes_plugins_1.stringifyJson)(marketplaceEntry), '```');
82
+ }
83
+ if (blocklistEntry) {
84
+ lines.push('', '## Blocklist Notice', '', '```json', (0, shared_routes_plugins_1.stringifyJson)(blocklistEntry), '```');
85
+ }
86
+ lines.push('', '## Plugin Registry Entry', '', '```json', (0, shared_routes_plugins_1.stringifyJson)(metadata), '```');
87
+ return {
88
+ content: lines.join('\n'),
89
+ contentPath: resolvedRegistryPath,
90
+ };
91
+ }
92
+ exports.getPluginRegistryContent = getPluginRegistryContent;
93
+ //# sourceMappingURL=shared-routes-plugin-registry-content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-routes-plugin-registry-content.js","sourceRoot":"","sources":["../../src/web-server/shared-routes-plugin-registry-content.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,2CAA6B;AAE7B,2EAA4E;AAC5E,mEA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qCAAa,EAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAC;IAE1F,OAAO;QACL,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;QACzB,WAAW,EAAE,oBAAoB;KAClC,CAAC;AACJ,CAAC;AA9DD,4DA8DC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Shared Routes — Plugin collection and registry helpers
3
+ *
4
+ * Handles installed_plugins.json registry reads, legacy plugin directory
5
+ * scanning, and plugin path encode/decode.
6
+ *
7
+ * Registry content rendering is in shared-routes-plugin-registry-content.ts.
8
+ */
9
+ import type { SharedItem, InstalledPluginRegistry } from './shared-routes-types';
10
+ export declare function encodePluginRegistryPath(pluginName: string): string;
11
+ export declare function decodePluginRegistryPath(itemPath: string): string | null;
12
+ export declare function readJsonObject(filePath: string, allowedRoots: Set<string>): Record<string, unknown> | null;
13
+ export declare function readPluginInstalledRegistry(sharedDir: string, allowedRoots: Set<string>): InstalledPluginRegistry | null;
14
+ export declare function extractMarketplaceFromPluginName(pluginName: string): string | null;
15
+ export declare function describeInstalledPlugin(pluginName: string, metadata: unknown): string;
16
+ export declare function isPluginInfrastructurePath(candidatePath: string, sharedDir: string): boolean;
17
+ export declare function stringifyJson(value: unknown): string;
18
+ export declare function getPluginRegistryItems(sharedDir: string, allowedRoots: Set<string>): SharedItem[];
19
+ export declare function getLegacyPluginDirectoryItems(sharedDir: string, allowedRoots: Set<string>): SharedItem[];
20
+ export declare function getPluginItems(sharedDir: string, allowedRoots: Set<string>): SharedItem[];
21
+ //# sourceMappingURL=shared-routes-plugins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-routes-plugins.d.ts","sourceRoot":"","sources":["../../src/web-server/shared-routes-plugins.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,OAAO,KAAK,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AASjF,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEnE;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAWxE;AAMD,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAkBhC;AAED,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,GACxB,uBAAuB,GAAG,IAAI,CAchC;AAMD,wBAAgB,gCAAgC,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAMlF;AAED,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,CAOrF;AAMD,wBAAgB,0BAA0B,CAAC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAQ5F;AAMD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEpD;AAMD,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,UAAU,EAAE,CAWjG;AAED,wBAAgB,6BAA6B,CAC3C,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,GACxB,UAAU,EAAE,CAqCd;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,UAAU,EAAE,CAUzF"}
@@ -0,0 +1,197 @@
1
+ "use strict";
2
+ /**
3
+ * Shared Routes — Plugin collection and registry helpers
4
+ *
5
+ * Handles installed_plugins.json registry reads, legacy plugin directory
6
+ * scanning, and plugin path encode/decode.
7
+ *
8
+ * Registry content rendering is in shared-routes-plugin-registry-content.ts.
9
+ */
10
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ var desc = Object.getOwnPropertyDescriptor(m, k);
13
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14
+ desc = { enumerable: true, get: function() { return m[k]; } };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }) : (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ o[k2] = m[k];
20
+ }));
21
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
22
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
23
+ }) : function(o, v) {
24
+ o["default"] = v;
25
+ });
26
+ var __importStar = (this && this.__importStar) || function (mod) {
27
+ if (mod && mod.__esModule) return mod;
28
+ var result = {};
29
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
30
+ __setModuleDefault(result, mod);
31
+ return result;
32
+ };
33
+ Object.defineProperty(exports, "__esModule", { value: true });
34
+ exports.getPluginItems = exports.getLegacyPluginDirectoryItems = exports.getPluginRegistryItems = exports.stringifyJson = exports.isPluginInfrastructurePath = exports.describeInstalledPlugin = exports.extractMarketplaceFromPluginName = exports.readPluginInstalledRegistry = exports.readJsonObject = exports.decodePluginRegistryPath = exports.encodePluginRegistryPath = void 0;
35
+ const fs = __importStar(require("fs"));
36
+ const path = __importStar(require("path"));
37
+ const shared_routes_path_guards_1 = require("./shared-routes-path-guards");
38
+ const shared_routes_markdown_1 = require("./shared-routes-markdown");
39
+ const PLUGIN_REGISTRY_PATH_PREFIX = 'plugin-registry:';
40
+ const PLUGIN_INFRASTRUCTURE_DIRECTORIES = new Set(['cache', 'data', 'marketplaces']);
41
+ // ---------------------------------------------------------------------------
42
+ // Path encode / decode
43
+ // ---------------------------------------------------------------------------
44
+ function encodePluginRegistryPath(pluginName) {
45
+ return `${PLUGIN_REGISTRY_PATH_PREFIX}${encodeURIComponent(pluginName)}`;
46
+ }
47
+ exports.encodePluginRegistryPath = encodePluginRegistryPath;
48
+ function decodePluginRegistryPath(itemPath) {
49
+ if (!itemPath.startsWith(PLUGIN_REGISTRY_PATH_PREFIX)) {
50
+ return null;
51
+ }
52
+ try {
53
+ const encodedName = itemPath.slice(PLUGIN_REGISTRY_PATH_PREFIX.length);
54
+ const pluginName = decodeURIComponent(encodedName);
55
+ return pluginName.length > 0 ? pluginName : null;
56
+ }
57
+ catch {
58
+ return null;
59
+ }
60
+ }
61
+ exports.decodePluginRegistryPath = decodePluginRegistryPath;
62
+ // ---------------------------------------------------------------------------
63
+ // JSON helpers
64
+ // ---------------------------------------------------------------------------
65
+ function readJsonObject(filePath, allowedRoots) {
66
+ const resolvedPath = (0, shared_routes_path_guards_1.safeRealPath)(filePath);
67
+ if (!resolvedPath || !(0, shared_routes_path_guards_1.isPathWithinAny)(resolvedPath, allowedRoots)) {
68
+ return null;
69
+ }
70
+ try {
71
+ const stats = fs.statSync(resolvedPath);
72
+ if (!stats.isFile() || stats.size > shared_routes_markdown_1.MAX_CONTENT_FILE_BYTES) {
73
+ return null;
74
+ }
75
+ const parsed = JSON.parse(fs.readFileSync(resolvedPath, 'utf8'));
76
+ if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {
77
+ return null;
78
+ }
79
+ return parsed;
80
+ }
81
+ catch {
82
+ return null;
83
+ }
84
+ }
85
+ exports.readJsonObject = readJsonObject;
86
+ function readPluginInstalledRegistry(sharedDir, allowedRoots) {
87
+ const parsed = readJsonObject(path.join(sharedDir, 'installed_plugins.json'), allowedRoots);
88
+ if (!parsed ||
89
+ !parsed.plugins ||
90
+ typeof parsed.plugins !== 'object' ||
91
+ Array.isArray(parsed.plugins)) {
92
+ return null;
93
+ }
94
+ return {
95
+ version: typeof parsed.version === 'number' ? parsed.version : undefined,
96
+ plugins: parsed.plugins,
97
+ };
98
+ }
99
+ exports.readPluginInstalledRegistry = readPluginInstalledRegistry;
100
+ // ---------------------------------------------------------------------------
101
+ // Description helpers
102
+ // ---------------------------------------------------------------------------
103
+ function extractMarketplaceFromPluginName(pluginName) {
104
+ const atIndex = pluginName.lastIndexOf('@');
105
+ if (atIndex <= 0 || atIndex === pluginName.length - 1) {
106
+ return null;
107
+ }
108
+ return pluginName.slice(atIndex + 1);
109
+ }
110
+ exports.extractMarketplaceFromPluginName = extractMarketplaceFromPluginName;
111
+ function describeInstalledPlugin(pluginName, metadata) {
112
+ const recordCount = Array.isArray(metadata) ? metadata.length : 1;
113
+ const marketplace = extractMarketplaceFromPluginName(pluginName);
114
+ const recordLabel = `${recordCount} ${recordCount === 1 ? 'record' : 'records'}`;
115
+ return marketplace
116
+ ? `Installed from ${marketplace}; ${recordLabel} in shared registry`
117
+ : `Installed plugin; ${recordLabel} in shared registry`;
118
+ }
119
+ exports.describeInstalledPlugin = describeInstalledPlugin;
120
+ // ---------------------------------------------------------------------------
121
+ // Infrastructure path guard
122
+ // ---------------------------------------------------------------------------
123
+ function isPluginInfrastructurePath(candidatePath, sharedDir) {
124
+ for (const directoryName of PLUGIN_INFRASTRUCTURE_DIRECTORIES) {
125
+ const resolvedInfrastructurePath = (0, shared_routes_path_guards_1.safeRealPath)(path.join(sharedDir, directoryName));
126
+ if (resolvedInfrastructurePath && (0, shared_routes_path_guards_1.isPathWithin)(candidatePath, resolvedInfrastructurePath)) {
127
+ return true;
128
+ }
129
+ }
130
+ return false;
131
+ }
132
+ exports.isPluginInfrastructurePath = isPluginInfrastructurePath;
133
+ // ---------------------------------------------------------------------------
134
+ // JSON serialization
135
+ // ---------------------------------------------------------------------------
136
+ function stringifyJson(value) {
137
+ return JSON.stringify(value, null, 2) ?? 'null';
138
+ }
139
+ exports.stringifyJson = stringifyJson;
140
+ // ---------------------------------------------------------------------------
141
+ // Item list builders
142
+ // ---------------------------------------------------------------------------
143
+ function getPluginRegistryItems(sharedDir, allowedRoots) {
144
+ const registry = readPluginInstalledRegistry(sharedDir, allowedRoots);
145
+ if (!registry) {
146
+ return [];
147
+ }
148
+ return Object.entries(registry.plugins).map(([pluginName, metadata]) => ({
149
+ name: pluginName,
150
+ description: describeInstalledPlugin(pluginName, metadata),
151
+ path: encodePluginRegistryPath(pluginName),
152
+ type: 'plugin',
153
+ }));
154
+ }
155
+ exports.getPluginRegistryItems = getPluginRegistryItems;
156
+ function getLegacyPluginDirectoryItems(sharedDir, allowedRoots) {
157
+ let entries = [];
158
+ try {
159
+ entries = fs.readdirSync(sharedDir, { withFileTypes: true });
160
+ }
161
+ catch {
162
+ return [];
163
+ }
164
+ const items = [];
165
+ for (const entry of entries) {
166
+ if (!entry.isDirectory() || PLUGIN_INFRASTRUCTURE_DIRECTORIES.has(entry.name)) {
167
+ continue;
168
+ }
169
+ const entryPath = path.join(sharedDir, entry.name);
170
+ const resolvedEntryPath = (0, shared_routes_path_guards_1.safeRealPath)(entryPath);
171
+ if (!resolvedEntryPath || !(0, shared_routes_path_guards_1.isPathWithinAny)(resolvedEntryPath, allowedRoots)) {
172
+ continue;
173
+ }
174
+ const description = (0, shared_routes_markdown_1.readFirstMarkdownDescription)([
175
+ path.join(resolvedEntryPath, 'README.md'),
176
+ path.join(resolvedEntryPath, 'readme.md'),
177
+ path.join(resolvedEntryPath, 'PLUGIN.md'),
178
+ ], allowedRoots);
179
+ if (!description) {
180
+ continue;
181
+ }
182
+ items.push({ name: entry.name, description, path: entryPath, type: 'plugin' });
183
+ }
184
+ return items;
185
+ }
186
+ exports.getLegacyPluginDirectoryItems = getLegacyPluginDirectoryItems;
187
+ function getPluginItems(sharedDir, allowedRoots) {
188
+ const registryItems = getPluginRegistryItems(sharedDir, allowedRoots);
189
+ const legacyDirectoryItems = getLegacyPluginDirectoryItems(sharedDir, allowedRoots);
190
+ const itemsByPath = new Map();
191
+ for (const item of [...registryItems, ...legacyDirectoryItems]) {
192
+ itemsByPath.set(item.path, item);
193
+ }
194
+ return [...itemsByPath.values()].sort((a, b) => a.name.localeCompare(b.name));
195
+ }
196
+ exports.getPluginItems = getPluginItems;
197
+ //# sourceMappingURL=shared-routes-plugins.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-routes-plugins.js","sourceRoot":"","sources":["../../src/web-server/shared-routes-plugins.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAE7B,2EAA0F;AAC1F,qEAAgG;AAGhG,MAAM,2BAA2B,GAAG,kBAAkB,CAAC;AACvD,MAAM,iCAAiC,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;AAErF,8EAA8E;AAC9E,uBAAuB;AACvB,8EAA8E;AAE9E,SAAgB,wBAAwB,CAAC,UAAkB;IACzD,OAAO,GAAG,2BAA2B,GAAG,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC;AAC3E,CAAC;AAFD,4DAEC;AAED,SAAgB,wBAAwB,CAAC,QAAgB;IACvD,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC,EAAE,CAAC;QACtD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,QAAQ,CAAC,KAAK,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC;QACvE,MAAM,UAAU,GAAG,kBAAkB,CAAC,WAAW,CAAC,CAAC;QACnD,OAAO,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC;IACnD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAXD,4DAWC;AAED,8EAA8E;AAC9E,eAAe;AACf,8EAA8E;AAE9E,SAAgB,cAAc,CAC5B,QAAgB,EAChB,YAAyB;IAEzB,MAAM,YAAY,GAAG,IAAA,wCAAY,EAAC,QAAQ,CAAC,CAAC;IAC5C,IAAI,CAAC,Y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