@stigmer/plugin-package 0.1.0-dev.20261017020314.g644422724c27

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 (273) hide show
  1. package/LICENSE +194 -0
  2. package/README.md +72 -0
  3. package/client/archive.d.ts +27 -0
  4. package/client/archive.d.ts.map +1 -0
  5. package/client/archive.js +38 -0
  6. package/client/archive.js.map +1 -0
  7. package/client/builtin.d.ts +37 -0
  8. package/client/builtin.d.ts.map +1 -0
  9. package/client/builtin.js +49 -0
  10. package/client/builtin.js.map +1 -0
  11. package/client/ignore/defaults.d.ts +2 -0
  12. package/client/ignore/defaults.d.ts.map +1 -0
  13. package/client/ignore/defaults.js +140 -0
  14. package/client/ignore/defaults.js.map +1 -0
  15. package/client/ignore/match.d.ts +3 -0
  16. package/client/ignore/match.d.ts.map +1 -0
  17. package/client/ignore/match.js +166 -0
  18. package/client/ignore/match.js.map +1 -0
  19. package/client/ignore/matcher.d.ts +50 -0
  20. package/client/ignore/matcher.d.ts.map +1 -0
  21. package/client/ignore/matcher.js +116 -0
  22. package/client/ignore/matcher.js.map +1 -0
  23. package/client/ignore/pattern.d.ts +13 -0
  24. package/client/ignore/pattern.d.ts.map +1 -0
  25. package/client/ignore/pattern.js +119 -0
  26. package/client/ignore/pattern.js.map +1 -0
  27. package/client/prepare-eval.d.ts +62 -0
  28. package/client/prepare-eval.d.ts.map +1 -0
  29. package/client/prepare-eval.js +60 -0
  30. package/client/prepare-eval.js.map +1 -0
  31. package/client/prepare.d.ts +99 -0
  32. package/client/prepare.d.ts.map +1 -0
  33. package/client/prepare.js +89 -0
  34. package/client/prepare.js.map +1 -0
  35. package/client/presentation.d.ts +19 -0
  36. package/client/presentation.d.ts.map +1 -0
  37. package/client/presentation.js +44 -0
  38. package/client/presentation.js.map +1 -0
  39. package/client/refs.d.ts +76 -0
  40. package/client/refs.d.ts.map +1 -0
  41. package/client/refs.js +123 -0
  42. package/client/refs.js.map +1 -0
  43. package/client/release.d.ts +20 -0
  44. package/client/release.d.ts.map +1 -0
  45. package/client/release.js +28 -0
  46. package/client/release.js.map +1 -0
  47. package/client/reroot.d.ts +21 -0
  48. package/client/reroot.d.ts.map +1 -0
  49. package/client/reroot.js +37 -0
  50. package/client/reroot.js.map +1 -0
  51. package/client/select.d.ts +74 -0
  52. package/client/select.d.ts.map +1 -0
  53. package/client/select.js +121 -0
  54. package/client/select.js.map +1 -0
  55. package/client/vocabulary.d.ts +13 -0
  56. package/client/vocabulary.d.ts.map +1 -0
  57. package/client/vocabulary.js +17 -0
  58. package/client/vocabulary.js.map +1 -0
  59. package/client.d.ts +51 -0
  60. package/client.d.ts.map +1 -0
  61. package/client.js +51 -0
  62. package/client.js.map +1 -0
  63. package/detect.d.ts +83 -0
  64. package/detect.d.ts.map +1 -0
  65. package/detect.js +210 -0
  66. package/detect.js.map +1 -0
  67. package/dialects/claude.d.ts +34 -0
  68. package/dialects/claude.d.ts.map +1 -0
  69. package/dialects/claude.js +84 -0
  70. package/dialects/claude.js.map +1 -0
  71. package/dialects/codex.d.ts +20 -0
  72. package/dialects/codex.d.ts.map +1 -0
  73. package/dialects/codex.js +21 -0
  74. package/dialects/codex.js.map +1 -0
  75. package/dialects/cursor.d.ts +25 -0
  76. package/dialects/cursor.d.ts.map +1 -0
  77. package/dialects/cursor.js +66 -0
  78. package/dialects/cursor.js.map +1 -0
  79. package/dialects/manifest.d.ts +164 -0
  80. package/dialects/manifest.d.ts.map +1 -0
  81. package/dialects/manifest.js +256 -0
  82. package/dialects/manifest.js.map +1 -0
  83. package/dialects/open.d.ts +19 -0
  84. package/dialects/open.d.ts.map +1 -0
  85. package/dialects/open.js +49 -0
  86. package/dialects/open.js.map +1 -0
  87. package/documents.d.ts +58 -0
  88. package/documents.d.ts.map +1 -0
  89. package/documents.js +121 -0
  90. package/documents.js.map +1 -0
  91. package/evals/eval-dir.d.ts +59 -0
  92. package/evals/eval-dir.d.ts.map +1 -0
  93. package/evals/eval-dir.js +84 -0
  94. package/evals/eval-dir.js.map +1 -0
  95. package/evals/fields.d.ts +78 -0
  96. package/evals/fields.d.ts.map +1 -0
  97. package/evals/fields.js +156 -0
  98. package/evals/fields.js.map +1 -0
  99. package/evals/glob.d.ts +40 -0
  100. package/evals/glob.d.ts.map +1 -0
  101. package/evals/glob.js +146 -0
  102. package/evals/glob.js.map +1 -0
  103. package/evals/graders.d.ts +52 -0
  104. package/evals/graders.d.ts.map +1 -0
  105. package/evals/graders.js +279 -0
  106. package/evals/graders.js.map +1 -0
  107. package/evals/markdown.d.ts +24 -0
  108. package/evals/markdown.d.ts.map +1 -0
  109. package/evals/markdown.js +48 -0
  110. package/evals/markdown.js.map +1 -0
  111. package/evals/mocks.d.ts +50 -0
  112. package/evals/mocks.d.ts.map +1 -0
  113. package/evals/mocks.js +182 -0
  114. package/evals/mocks.js.map +1 -0
  115. package/evals/read-eval-suite.d.ts +110 -0
  116. package/evals/read-eval-suite.d.ts.map +1 -0
  117. package/evals/read-eval-suite.js +603 -0
  118. package/evals/read-eval-suite.js.map +1 -0
  119. package/evals/summary.d.ts +61 -0
  120. package/evals/summary.d.ts.map +1 -0
  121. package/evals/summary.js +69 -0
  122. package/evals/summary.js.map +1 -0
  123. package/evals/types.d.ts +203 -0
  124. package/evals/types.d.ts.map +1 -0
  125. package/evals/types.js +21 -0
  126. package/evals/types.js.map +1 -0
  127. package/files.d.ts +135 -0
  128. package/files.d.ts.map +1 -0
  129. package/files.js +209 -0
  130. package/files.js.map +1 -0
  131. package/frontmatter.d.ts +51 -0
  132. package/frontmatter.d.ts.map +1 -0
  133. package/frontmatter.js +61 -0
  134. package/frontmatter.js.map +1 -0
  135. package/index.d.ts +37 -0
  136. package/index.d.ts.map +1 -0
  137. package/index.js +33 -0
  138. package/index.js.map +1 -0
  139. package/marketplace/messages.d.ts +20 -0
  140. package/marketplace/messages.d.ts.map +1 -0
  141. package/marketplace/messages.js +49 -0
  142. package/marketplace/messages.js.map +1 -0
  143. package/marketplace/outcome.d.ts +70 -0
  144. package/marketplace/outcome.d.ts.map +1 -0
  145. package/marketplace/outcome.js +29 -0
  146. package/marketplace/outcome.js.map +1 -0
  147. package/marketplace/read-marketplace.d.ts +52 -0
  148. package/marketplace/read-marketplace.d.ts.map +1 -0
  149. package/marketplace/read-marketplace.js +351 -0
  150. package/marketplace/read-marketplace.js.map +1 -0
  151. package/messages.d.ts +55 -0
  152. package/messages.d.ts.map +1 -0
  153. package/messages.js +167 -0
  154. package/messages.js.map +1 -0
  155. package/normalise/hooks.d.ts +91 -0
  156. package/normalise/hooks.d.ts.map +1 -0
  157. package/normalise/hooks.js +437 -0
  158. package/normalise/hooks.js.map +1 -0
  159. package/normalise/ignored.d.ts +34 -0
  160. package/normalise/ignored.d.ts.map +1 -0
  161. package/normalise/ignored.js +78 -0
  162. package/normalise/ignored.js.map +1 -0
  163. package/normalise/mcp-servers.d.ts +50 -0
  164. package/normalise/mcp-servers.d.ts.map +1 -0
  165. package/normalise/mcp-servers.js +398 -0
  166. package/normalise/mcp-servers.js.map +1 -0
  167. package/normalise/settings.d.ts +32 -0
  168. package/normalise/settings.d.ts.map +1 -0
  169. package/normalise/settings.js +72 -0
  170. package/normalise/settings.js.map +1 -0
  171. package/normalise/skills.d.ts +39 -0
  172. package/normalise/skills.d.ts.map +1 -0
  173. package/normalise/skills.js +135 -0
  174. package/normalise/skills.js.map +1 -0
  175. package/normalise/stigmer-folder.d.ts +17 -0
  176. package/normalise/stigmer-folder.d.ts.map +1 -0
  177. package/normalise/stigmer-folder.js +19 -0
  178. package/normalise/stigmer-folder.js.map +1 -0
  179. package/normalise/sub-agents.d.ts +54 -0
  180. package/normalise/sub-agents.d.ts.map +1 -0
  181. package/normalise/sub-agents.js +219 -0
  182. package/normalise/sub-agents.js.map +1 -0
  183. package/normalise/variables.d.ts +31 -0
  184. package/normalise/variables.d.ts.map +1 -0
  185. package/normalise/variables.js +170 -0
  186. package/normalise/variables.js.map +1 -0
  187. package/outcome.d.ts +59 -0
  188. package/outcome.d.ts.map +1 -0
  189. package/outcome.js +32 -0
  190. package/outcome.js.map +1 -0
  191. package/package.json +47 -0
  192. package/placeholders.d.ts +65 -0
  193. package/placeholders.d.ts.map +1 -0
  194. package/placeholders.js +99 -0
  195. package/placeholders.js.map +1 -0
  196. package/presentation.d.ts +53 -0
  197. package/presentation.d.ts.map +1 -0
  198. package/presentation.js +156 -0
  199. package/presentation.js.map +1 -0
  200. package/read-plugin-package.d.ts +20 -0
  201. package/read-plugin-package.d.ts.map +1 -0
  202. package/read-plugin-package.js +73 -0
  203. package/read-plugin-package.js.map +1 -0
  204. package/src/client/archive.ts +44 -0
  205. package/src/client/builtin.ts +60 -0
  206. package/src/client/ignore/defaults.ts +155 -0
  207. package/src/client/ignore/match.ts +158 -0
  208. package/src/client/ignore/matcher.ts +156 -0
  209. package/src/client/ignore/pattern.ts +132 -0
  210. package/src/client/prepare-eval.ts +92 -0
  211. package/src/client/prepare.ts +160 -0
  212. package/src/client/presentation.ts +47 -0
  213. package/src/client/refs.ts +170 -0
  214. package/src/client/release.ts +29 -0
  215. package/src/client/reroot.ts +35 -0
  216. package/src/client/select.ts +161 -0
  217. package/src/client/vocabulary.ts +19 -0
  218. package/src/client.ts +102 -0
  219. package/src/detect.ts +245 -0
  220. package/src/dialects/claude.ts +102 -0
  221. package/src/dialects/codex.ts +26 -0
  222. package/src/dialects/cursor.ts +77 -0
  223. package/src/dialects/manifest.ts +316 -0
  224. package/src/dialects/open.ts +50 -0
  225. package/src/documents.ts +158 -0
  226. package/src/evals/eval-dir.ts +101 -0
  227. package/src/evals/fields.ts +184 -0
  228. package/src/evals/glob.ts +141 -0
  229. package/src/evals/graders.ts +293 -0
  230. package/src/evals/markdown.ts +56 -0
  231. package/src/evals/mocks.ts +202 -0
  232. package/src/evals/read-eval-suite.ts +713 -0
  233. package/src/evals/summary.ts +100 -0
  234. package/src/evals/types.ts +217 -0
  235. package/src/files.ts +235 -0
  236. package/src/frontmatter.ts +70 -0
  237. package/src/index.ts +129 -0
  238. package/src/marketplace/messages.ts +61 -0
  239. package/src/marketplace/outcome.ts +91 -0
  240. package/src/marketplace/read-marketplace.ts +388 -0
  241. package/src/messages.ts +248 -0
  242. package/src/normalise/hooks.ts +469 -0
  243. package/src/normalise/ignored.ts +79 -0
  244. package/src/normalise/mcp-servers.ts +423 -0
  245. package/src/normalise/settings.ts +81 -0
  246. package/src/normalise/skills.ts +145 -0
  247. package/src/normalise/stigmer-folder.ts +23 -0
  248. package/src/normalise/sub-agents.ts +231 -0
  249. package/src/normalise/variables.ts +181 -0
  250. package/src/outcome.ts +158 -0
  251. package/src/placeholders.ts +110 -0
  252. package/src/presentation.ts +170 -0
  253. package/src/read-plugin-package.ts +80 -0
  254. package/src/testing.ts +347 -0
  255. package/src/tool-names.ts +30 -0
  256. package/src/trim.ts +10 -0
  257. package/src/types.ts +214 -0
  258. package/testing.d.ts +127 -0
  259. package/testing.d.ts.map +1 -0
  260. package/testing.js +266 -0
  261. package/testing.js.map +1 -0
  262. package/tool-names.d.ts +21 -0
  263. package/tool-names.d.ts.map +1 -0
  264. package/tool-names.js +28 -0
  265. package/tool-names.js.map +1 -0
  266. package/trim.d.ts +7 -0
  267. package/trim.d.ts.map +1 -0
  268. package/trim.js +12 -0
  269. package/trim.js.map +1 -0
  270. package/types.d.ts +179 -0
  271. package/types.d.ts.map +1 -0
  272. package/types.js +19 -0
  273. package/types.js.map +1 -0
package/detect.js ADDED
@@ -0,0 +1,210 @@
1
+ /**
2
+ * Which manifests a package carries, which one gives it its identity, and
3
+ * what they agree on.
4
+ *
5
+ * A root `plugin.json` (the open format) is the identity when present, and
6
+ * any vendor manifests beside it contribute only their dialect data
7
+ * (declared paths, variables, inline servers). Without a root manifest the
8
+ * precedence is Claude, Cursor, Codex: the first present names the plugin.
9
+ * Every present manifest is read, so a plugin that ships two dialects has
10
+ * both honoured; a `name` present in two manifests with different values is
11
+ * refused, because a plugin that is two plugins depending on who reads it
12
+ * is exactly the drift Stigmer will not carry.
13
+ *
14
+ * The plugin name obeys the open format's rule in every dialect (1 to 64
15
+ * characters of `a-z 0-9 - .`, alphanumeric at both ends, no `--` or `..`);
16
+ * Cursor's published pattern is the same rule minus the repetition clause.
17
+ * Slugging is the installer's, not the reader's.
18
+ *
19
+ * MCP configuration sources are resolved here too, because a default
20
+ * location is a cross-manifest fact: `mcp.json` is read under the open
21
+ * rules when a root manifest exists; a Claude or Codex manifest that
22
+ * declares no `mcpServers` reads `.mcp.json` when present; Cursor reads
23
+ * only what it declares. Hooks sources resolve the same way: every vendor
24
+ * manifest's declared sources, then `hooks/hooks.json` when it exists (the
25
+ * default Claude Code, Cursor and Codex all read, merged with what is
26
+ * declared), each file read once and tagged with the hook formats of the
27
+ * manifests that reach it. Sub-agent files (`agents/*.md`) are a vendor
28
+ * component: they are read when any vendor manifest is present and recorded
29
+ * as ignored otherwise, since the open format defines no such component.
30
+ */
31
+ import { readClaudeManifest, CLAUDE_DEFAULT_MCP_CONFIG } from "./dialects/claude.js";
32
+ import { readCodexManifest } from "./dialects/codex.js";
33
+ import { readCursorManifest } from "./dialects/cursor.js";
34
+ import { readOpenManifest } from "./dialects/open.js";
35
+ import { parseJsonObject, readText } from "./documents.js";
36
+ import { MANIFEST_LOCATIONS } from "./messages.js";
37
+ /** The open format's `mcp.json`, a fixed location. */
38
+ export const OPEN_MCP_CONFIG = "mcp.json";
39
+ /** The hooks file every vendor reads by default. */
40
+ export const DEFAULT_HOOKS_FILE = "hooks/hooks.json";
41
+ /** The hook format a vendor dialect reads; Codex reads Claude Code's. */
42
+ export function hookFormatOf(dialect) {
43
+ return dialect === "cursor" ? "cursor" : "claude-code";
44
+ }
45
+ /** The vendor precedence when no root manifest exists. */
46
+ const VENDOR_PRECEDENCE = ["claude", "cursor", "codex"];
47
+ /**
48
+ * Every manifest location in the order that names a plugin: the root
49
+ * manifest, then the vendors. The one precedence the reader applies,
50
+ * exported so a partial read (`presentation.ts`) cannot rank the manifests
51
+ * differently from the full one.
52
+ */
53
+ export const MANIFEST_PRECEDENCE = ["agent-plugins", ...VENDOR_PRECEDENCE];
54
+ const NAME_MAX_LENGTH = 64;
55
+ const NAME_PATTERN = /^[a-z0-9]([a-z0-9.-]*[a-z0-9])?$/;
56
+ /** True when the directory holds any of the four manifests; the CLI's routing test. */
57
+ export function hasPluginManifest(paths) {
58
+ const locations = new Set(Object.values(MANIFEST_LOCATIONS));
59
+ for (const path of paths)
60
+ if (locations.has(path))
61
+ return true;
62
+ return false;
63
+ }
64
+ /** Read every present manifest; `undefined` (after `no-manifest`) when there is none. */
65
+ export function detectManifests(index, findings) {
66
+ const manifests = [];
67
+ const present = (dialect) => {
68
+ const path = MANIFEST_LOCATIONS[dialect];
69
+ if (!index.has(path))
70
+ return undefined;
71
+ const object = readManifestObject(index, path, findings);
72
+ // An unreadable manifest still counts as present: the finding already
73
+ // says why, and an empty contribution keeps the read going.
74
+ const manifest = object === undefined ? emptyManifest(dialect, path) : readDialect(dialect, object, path, findings);
75
+ manifests.push(manifest);
76
+ return manifest;
77
+ };
78
+ const root = present("agent-plugins");
79
+ const vendors = VENDOR_PRECEDENCE.map(present).filter((m) => m !== undefined);
80
+ if (manifests.length === 0) {
81
+ findings.error("no-manifest");
82
+ return undefined;
83
+ }
84
+ const identity = root ?? vendors[0];
85
+ if (identity === undefined) {
86
+ // Unreachable: manifests is non-empty, so root or vendors[0] exists.
87
+ throw new Error("manifest set without an identity manifest");
88
+ }
89
+ const ordered = [identity, ...manifests.filter((m) => m !== identity)];
90
+ const name = resolveName(identity, ordered, findings);
91
+ return {
92
+ dialect: identity.dialect,
93
+ manifests: ordered,
94
+ name,
95
+ readsAgents: vendors.length > 0,
96
+ mcpSources: resolveMcpSources(index, root, vendors),
97
+ hookSources: resolveHookSources(index, vendors),
98
+ };
99
+ }
100
+ function readManifestObject(index, path, findings) {
101
+ const text = readText(index, path, "manifest", findings);
102
+ return text === undefined ? undefined : parseJsonObject(text, path, "manifest-unreadable", findings);
103
+ }
104
+ function readDialect(dialect, object, path, findings) {
105
+ switch (dialect) {
106
+ case "agent-plugins":
107
+ return readOpenManifest(object, path, findings);
108
+ case "claude":
109
+ return readClaudeManifest(object, path, findings);
110
+ case "cursor":
111
+ return readCursorManifest(object, path, findings);
112
+ case "codex":
113
+ return readCodexManifest(object, path, findings);
114
+ default: {
115
+ const exhaustive = dialect;
116
+ throw new Error(`unknown dialect ${String(exhaustive)}`);
117
+ }
118
+ }
119
+ }
120
+ function emptyManifest(dialect, path) {
121
+ return { dialect, path, identity: {}, skillPaths: [], mcpConfigs: [], hookSources: [], ignored: [] };
122
+ }
123
+ function resolveName(identity, all, findings) {
124
+ const name = identity.identity.name;
125
+ if (name === undefined) {
126
+ // An unreadable identity manifest already reported itself; a second
127
+ // finding about its missing name would blame the author twice.
128
+ if (findings.errors.some((f) => f.kind === "manifest-unreadable" && f.path === identity.path))
129
+ return undefined;
130
+ findings.error("manifest-name-missing", { path: identity.path });
131
+ return undefined;
132
+ }
133
+ let valid = true;
134
+ if (!isValidPluginName(name)) {
135
+ findings.error("manifest-name-invalid", { path: identity.path, subject: name });
136
+ valid = false;
137
+ }
138
+ for (const other of all) {
139
+ if (other === identity)
140
+ continue;
141
+ const otherName = other.identity.name;
142
+ if (otherName !== undefined && otherName !== name) {
143
+ findings.error("manifest-name-conflict", {
144
+ path: identity.path,
145
+ subject: name,
146
+ detail: `'${otherName}' in '${other.path}'`,
147
+ });
148
+ valid = false;
149
+ }
150
+ }
151
+ return valid ? name : undefined;
152
+ }
153
+ /** The open format's name rule, applied in every dialect. */
154
+ export function isValidPluginName(name) {
155
+ return name.length <= NAME_MAX_LENGTH && NAME_PATTERN.test(name) && !name.includes("--") && !name.includes("..");
156
+ }
157
+ function resolveMcpSources(index, root, vendors) {
158
+ const sources = [];
159
+ if (root !== undefined && index.has(OPEN_MCP_CONFIG)) {
160
+ sources.push({ kind: "file", path: OPEN_MCP_CONFIG, dialect: "agent-plugins", manifest: root.path });
161
+ }
162
+ for (const vendor of vendors) {
163
+ if (vendor.mcpConfigs.length > 0) {
164
+ sources.push(...vendor.mcpConfigs);
165
+ }
166
+ else if (vendor.dialect !== "cursor" && index.has(CLAUDE_DEFAULT_MCP_CONFIG)) {
167
+ sources.push({ kind: "file", path: CLAUDE_DEFAULT_MCP_CONFIG, dialect: vendor.dialect, manifest: vendor.path });
168
+ }
169
+ }
170
+ // Two manifests may name the same file (Claude and Codex both defaulting
171
+ // to `.mcp.json`); reading it twice would report every server twice.
172
+ const seen = new Set();
173
+ return sources.filter((source) => {
174
+ if (source.kind === "inline")
175
+ return true;
176
+ if (seen.has(source.path))
177
+ return false;
178
+ seen.add(source.path);
179
+ return true;
180
+ });
181
+ }
182
+ function resolveHookSources(index, vendors) {
183
+ const sources = [];
184
+ const files = new Map();
185
+ const addFile = (path, format, manifest) => {
186
+ const existing = files.get(path);
187
+ if (existing !== undefined) {
188
+ if (!existing.formats.includes(format))
189
+ existing.formats.push(format);
190
+ return;
191
+ }
192
+ const entry = { path, formats: [format], manifest };
193
+ files.set(path, entry);
194
+ sources.push({ kind: "file", path, formats: entry.formats, manifest });
195
+ };
196
+ // Vendors only: the open manifest declares no hooks.
197
+ for (const vendor of vendors) {
198
+ const format = hookFormatOf(vendor.dialect);
199
+ for (const source of vendor.hookSources) {
200
+ if (source.kind === "inline")
201
+ sources.push({ kind: "inline", manifest: source.manifest, value: source.value, format });
202
+ else
203
+ addFile(source.path, format, source.manifest);
204
+ }
205
+ if (index.has(DEFAULT_HOOKS_FILE))
206
+ addFile(DEFAULT_HOOKS_FILE, format, vendor.path);
207
+ }
208
+ return sources;
209
+ }
210
+ //# sourceMappingURL=detect.js.map
package/detect.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detect.js","sourceRoot":"","sources":["src/detect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAO,E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AG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QACvB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;IACzE,CAAC,CAAC;IACF,qDAAqD;IACrD,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC5C,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;YACxC,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ;gBAAE,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;;gBAClH,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;QACrD,CAAC;QACD,IAAI,KAAK,CAAC,GAAG,CAAC,kBAAkB,CAAC;YAAE,OAAO,CAAC,kBAAkB,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IACtF,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * The Claude Code manifest (`.claude-plugin/plugin.json`), and the shape the
3
+ * Codex compatibility manifest shares with it.
4
+ *
5
+ * Claude's manifest is optional in its own tool (without one, the directory
6
+ * name is the plugin name) and `name` is its only required field. Path
7
+ * fields are a string or an array of strings, `./`-prefixed: `skills` ADDS
8
+ * to the default `skills/` scan and may name a directory that is itself a
9
+ * skill; `agents` REPLACES the default `agents/` and its entries are files
10
+ * or directories. `mcpServers` is a path, an inline object, or an array of
11
+ * either, defaulting to `.mcp.json` at the plugin root. `hooks` is the same
12
+ * three forms, merged with `hooks/hooks.json` when that file exists.
13
+ * `userConfig` declares the variables a user is prompted for. `settings`
14
+ * is the inline form of the plugin's `settings.json` (only its `agent` key
15
+ * takes effect on Stigmer; `normalise/settings.ts`). LSP servers, channels,
16
+ * output styles, workflows and the experimental components are recorded as
17
+ * ignored, except `experimental.evals`, the eval suite's directory, which is
18
+ * carried raw for the eval reader.
19
+ *
20
+ * The reader is exported with its known-field set so the Codex dialect,
21
+ * whose legacy manifest is this shape plus `apps` and `interface` and minus
22
+ * `settings`, reuses it rather than restating it.
23
+ */
24
+ import { type JsonObject } from "../documents.js";
25
+ import type { Findings } from "../messages.js";
26
+ import type { PluginDialect } from "../types.js";
27
+ import { type DialectManifest } from "./manifest.js";
28
+ export declare const CLAUDE_KNOWN_FIELDS: ReadonlySet<string>;
29
+ /** The default MCP configuration file when the manifest declares none. */
30
+ export declare const CLAUDE_DEFAULT_MCP_CONFIG = ".mcp.json";
31
+ export declare function readClaudeManifest(object: JsonObject, path: string, findings: Findings): DialectManifest;
32
+ /** The Claude shape under a given dialect and known-field set (Codex reuses it). */
33
+ export declare function readClaudeShapedManifest(object: JsonObject, path: string, dialect: PluginDialect, known: ReadonlySet<string>, findings: Findings): DialectManifest;
34
+ //# sourceMappingURL=claude.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../src/dialects/claude.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EACL,KAAK,eAAe,EAOrB,MAAM,eAAe,CAAC;AAEvB,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,MAAM,CAuBlD,CAAC;AAEH,0EAA0E;AAC1E,eAAO,MAAM,yBAAyB,cAAc,CAAC;AAErD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,eAAe,CAExG;AAED,oFAAoF;AACpF,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,EAC1B,QAAQ,EAAE,QAAQ,GACjB,eAAe,CAyBjB"}
@@ -0,0 +1,84 @@
1
+ /**
2
+ * The Claude Code manifest (`.claude-plugin/plugin.json`), and the shape the
3
+ * Codex compatibility manifest shares with it.
4
+ *
5
+ * Claude's manifest is optional in its own tool (without one, the directory
6
+ * name is the plugin name) and `name` is its only required field. Path
7
+ * fields are a string or an array of strings, `./`-prefixed: `skills` ADDS
8
+ * to the default `skills/` scan and may name a directory that is itself a
9
+ * skill; `agents` REPLACES the default `agents/` and its entries are files
10
+ * or directories. `mcpServers` is a path, an inline object, or an array of
11
+ * either, defaulting to `.mcp.json` at the plugin root. `hooks` is the same
12
+ * three forms, merged with `hooks/hooks.json` when that file exists.
13
+ * `userConfig` declares the variables a user is prompted for. `settings`
14
+ * is the inline form of the plugin's `settings.json` (only its `agent` key
15
+ * takes effect on Stigmer; `normalise/settings.ts`). LSP servers, channels,
16
+ * output styles, workflows and the experimental components are recorded as
17
+ * ignored, except `experimental.evals`, the eval suite's directory, which is
18
+ * carried raw for the eval reader.
19
+ *
20
+ * The reader is exported with its known-field set so the Codex dialect,
21
+ * whose legacy manifest is this shape plus `apps` and `interface` and minus
22
+ * `settings`, reuses it rather than restating it.
23
+ */
24
+ import { isJsonObject } from "../documents.js";
25
+ import { ignoredFieldComponents, readDeclaredPaths, readHookSources, readIdentity, readMcpSources, warnUnknownFields, } from "./manifest.js";
26
+ export const CLAUDE_KNOWN_FIELDS = new Set([
27
+ "name",
28
+ "version",
29
+ "description",
30
+ "author",
31
+ "homepage",
32
+ "repository",
33
+ "license",
34
+ "keywords",
35
+ "skills",
36
+ "commands",
37
+ "agents",
38
+ "workflows",
39
+ "hooks",
40
+ "mcpServers",
41
+ "outputStyles",
42
+ "lspServers",
43
+ "experimental",
44
+ "userConfig",
45
+ "channels",
46
+ "dependencies",
47
+ "defaultEnabled",
48
+ "settings",
49
+ ]);
50
+ /** The default MCP configuration file when the manifest declares none. */
51
+ export const CLAUDE_DEFAULT_MCP_CONFIG = ".mcp.json";
52
+ export function readClaudeManifest(object, path, findings) {
53
+ return readClaudeShapedManifest(object, path, "claude", CLAUDE_KNOWN_FIELDS, findings);
54
+ }
55
+ /** The Claude shape under a given dialect and known-field set (Codex reuses it). */
56
+ export function readClaudeShapedManifest(object, path, dialect, known, findings) {
57
+ warnUnknownFields(object, known, path, findings);
58
+ const identity = readIdentity(object, path, findings);
59
+ const skillPaths = readDeclaredPaths(object, "skills", path, findings) ?? [];
60
+ const agentPaths = readDeclaredPaths(object, "agents", path, findings);
61
+ const declaredMcp = readMcpSources(object, "mcpServers", path, dialect, findings);
62
+ const manifest = {
63
+ dialect,
64
+ path,
65
+ identity,
66
+ skillPaths,
67
+ mcpConfigs: declaredMcp,
68
+ hookSources: readHookSources(object, path, dialect, findings),
69
+ ignored: ignoredFieldComponents(object, path),
70
+ };
71
+ if (agentPaths !== undefined)
72
+ manifest.agentPaths = agentPaths;
73
+ if (dialect === "claude" && object["settings"] !== undefined)
74
+ manifest.settings = object["settings"];
75
+ if (object["userConfig"] !== undefined) {
76
+ manifest.variables = { dialect: "claude", value: object["userConfig"], manifest: path };
77
+ }
78
+ const experimental = object["experimental"];
79
+ if (isJsonObject(experimental) && experimental["evals"] !== undefined) {
80
+ manifest.evalsDir = { value: experimental["evals"], manifest: path };
81
+ }
82
+ return manifest;
83
+ }
84
+ //# sourceMappingURL=claude.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude.js","sourceRoot":"","sources":["../src/dialects/claude.ts"],"names":[],"m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CAAC,CAAC;IACvE,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAClF,MAAM,QAAQ,GAAmE;QAC/E,OAAO;QACP,IAAI;QACJ,QAAQ;QACR,UAAU;QACV,UAAU,EAAE,WAAW;QACvB,WAAW,EAAE,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC;QAC7D,OAAO,EAAE,sBAAsB,CAAC,MAAM,EAAE,IAAI,CAAC;KAC9C,CAAC;IACF,IAAI,UAAU,KAAK,SAAS;QAAE,QAAQ,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/D,IAAI,OAAO,KAAK,QAAQ,IAAI,MAAM,CAAC,UAAU,CAAC,KAAK,SAAS;QAAE,QAAQ,CAAC,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IACrG,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,SAAS,EAAE,CAAC;QACvC,QAAQ,CAAC,SAAS,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC1F,CAAC;IACD,MAAM,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;IAC5C,IAAI,YAAY,CAAC,YAAY,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,KAAK,SAAS,EAAE,CAAC;QACtE,QAAQ,CAAC,QAAQ,GAAG,EAAE,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACvE,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The Codex compatibility manifest (`.codex-plugin/plugin.json`).
3
+ *
4
+ * New Codex packages are the open form: a root `plugin.json` with
5
+ * OpenAI-specific presentation, app mappings and hooks under
6
+ * `extensions["com.openai"]`, which the open reader records as an ignored
7
+ * extension. The legacy `.codex-plugin/plugin.json` that Codex still
8
+ * accepts is the Claude shape (`skills`, `mcpServers`, `hooks`) plus two
9
+ * fields of its own: `apps` (registered ChatGPT app mappings, `.app.json`)
10
+ * and `interface` (marketplace presentation). Its hooks are Claude Code's
11
+ * format, defaulting to `hooks/hooks.json`. Nothing else Codex-specific maps
12
+ * to a Stigmer resource, so the reader is the Claude reader under the
13
+ * `codex` dialect with the two extra fields known, `apps` ignored, and
14
+ * Claude's `settings` left unknown (Codex documents no such field).
15
+ */
16
+ import type { JsonObject } from "../documents.js";
17
+ import type { Findings } from "../messages.js";
18
+ import type { DialectManifest } from "./manifest.js";
19
+ export declare function readCodexManifest(object: JsonObject, path: string, findings: Findings): DialectManifest;
20
+ //# sourceMappingURL=codex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../src/dialects/codex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAIrD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,eAAe,CAEvG"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The Codex compatibility manifest (`.codex-plugin/plugin.json`).
3
+ *
4
+ * New Codex packages are the open form: a root `plugin.json` with
5
+ * OpenAI-specific presentation, app mappings and hooks under
6
+ * `extensions["com.openai"]`, which the open reader records as an ignored
7
+ * extension. The legacy `.codex-plugin/plugin.json` that Codex still
8
+ * accepts is the Claude shape (`skills`, `mcpServers`, `hooks`) plus two
9
+ * fields of its own: `apps` (registered ChatGPT app mappings, `.app.json`)
10
+ * and `interface` (marketplace presentation). Its hooks are Claude Code's
11
+ * format, defaulting to `hooks/hooks.json`. Nothing else Codex-specific maps
12
+ * to a Stigmer resource, so the reader is the Claude reader under the
13
+ * `codex` dialect with the two extra fields known, `apps` ignored, and
14
+ * Claude's `settings` left unknown (Codex documents no such field).
15
+ */
16
+ import { CLAUDE_KNOWN_FIELDS, readClaudeShapedManifest } from "./claude.js";
17
+ const KNOWN_FIELDS = new Set([...[...CLAUDE_KNOWN_FIELDS].filter((field) => field !== "settings"), "apps", "interface"]);
18
+ export function readCodexManifest(object, path, findings) {
19
+ return readClaudeShapedManifest(object, path, "codex", KNOWN_FIELDS, findings);
20
+ }
21
+ //# sourceMappingURL=codex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex.js","sourceRoot":"","sources":["../src/dialects/codex.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAG5E,MAAM,YAAY,GAAwB,IAAI,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,UAAU,CAAC,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC;AAE9I,MAAM,UAAU,iBAAiB,CAAC,MAAkB,EAAE,IAAY,EAAE,QAAkB;IACpF,OAAO,wBAAwB,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;AACjF,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The Cursor manifest (`.cursor-plugin/plugin.json`).
3
+ *
4
+ * Cursor publishes a draft-07 schema for this file (`additionalProperties:
5
+ * false`, only `name` required); the known-field set below is that schema's
6
+ * key list, and `author` there carries `name` and `email` only. Component
7
+ * fields `skills`, `agents`, `rules`, `commands` are a path or an array of
8
+ * paths (the schema says "glob pattern(s) or path(s)"; every published
9
+ * plugin uses a `./`-prefixed directory, and a glob is refused rather than
10
+ * expanded). `mcpServers` is a path, an inline object, or an array of
11
+ * either. `variables` is a JSON Schema object whose `properties` are the
12
+ * variables a user is prompted for and whose `required` list marks the
13
+ * mandatory ones; Cursor has no sensitivity flag, so Stigmer treats every
14
+ * Cursor variable as a secret. `hooks` is a path, an inline object or an
15
+ * array of either, merged with `hooks/hooks.json` when that file exists.
16
+ * `rules`, `commands`, `logo` and `minClientVersions` are recorded as
17
+ * ignored; `displayName`, `publisher`,
18
+ * `category` and `tags` are marketplace metadata Stigmer neither carries
19
+ * nor warns about.
20
+ */
21
+ import type { JsonObject } from "../documents.js";
22
+ import type { Findings } from "../messages.js";
23
+ import { type DialectManifest } from "./manifest.js";
24
+ export declare function readCursorManifest(object: JsonObject, path: string, findings: Findings): DialectManifest;
25
+ //# sourceMappingURL=cursor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor.d.ts","sourceRoot":"","sources":["../src/dialects/cursor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,KAAK,eAAe,EAOrB,MAAM,eAAe,CAAC;AA0BvB,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,eAAe,CAmBxG"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * The Cursor manifest (`.cursor-plugin/plugin.json`).
3
+ *
4
+ * Cursor publishes a draft-07 schema for this file (`additionalProperties:
5
+ * false`, only `name` required); the known-field set below is that schema's
6
+ * key list, and `author` there carries `name` and `email` only. Component
7
+ * fields `skills`, `agents`, `rules`, `commands` are a path or an array of
8
+ * paths (the schema says "glob pattern(s) or path(s)"; every published
9
+ * plugin uses a `./`-prefixed directory, and a glob is refused rather than
10
+ * expanded). `mcpServers` is a path, an inline object, or an array of
11
+ * either. `variables` is a JSON Schema object whose `properties` are the
12
+ * variables a user is prompted for and whose `required` list marks the
13
+ * mandatory ones; Cursor has no sensitivity flag, so Stigmer treats every
14
+ * Cursor variable as a secret. `hooks` is a path, an inline object or an
15
+ * array of either, merged with `hooks/hooks.json` when that file exists.
16
+ * `rules`, `commands`, `logo` and `minClientVersions` are recorded as
17
+ * ignored; `displayName`, `publisher`,
18
+ * `category` and `tags` are marketplace metadata Stigmer neither carries
19
+ * nor warns about.
20
+ */
21
+ import { ignoredFieldComponents, readDeclaredPaths, readHookSources, readIdentity, readMcpSources, warnUnknownFields, } from "./manifest.js";
22
+ const KNOWN_FIELDS = new Set([
23
+ "name",
24
+ "displayName",
25
+ "description",
26
+ "version",
27
+ "minClientVersions",
28
+ "author",
29
+ "publisher",
30
+ "homepage",
31
+ "repository",
32
+ "license",
33
+ "logo",
34
+ "keywords",
35
+ "category",
36
+ "tags",
37
+ "commands",
38
+ "agents",
39
+ "skills",
40
+ "rules",
41
+ "hooks",
42
+ "variables",
43
+ "mcpServers",
44
+ ]);
45
+ export function readCursorManifest(object, path, findings) {
46
+ warnUnknownFields(object, KNOWN_FIELDS, path, findings);
47
+ const identity = readIdentity(object, path, findings);
48
+ const skillPaths = readDeclaredPaths(object, "skills", path, findings) ?? [];
49
+ const agentPaths = readDeclaredPaths(object, "agents", path, findings);
50
+ const manifest = {
51
+ dialect: "cursor",
52
+ path,
53
+ identity,
54
+ skillPaths,
55
+ mcpConfigs: readMcpSources(object, "mcpServers", path, "cursor", findings),
56
+ hookSources: readHookSources(object, path, "cursor", findings),
57
+ ignored: ignoredFieldComponents(object, path),
58
+ };
59
+ if (agentPaths !== undefined)
60
+ manifest.agentPaths = agentPaths;
61
+ if (object["variables"] !== undefined) {
62
+ manifest.variables = { dialect: "cursor", value: object["variables"], manifest: path };
63
+ }
64
+ return manifest;
65
+ }
66
+ //# sourceMappingURL=cursor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursor.js","sourceRoot":"","sources":["../src/dialects/cursor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAEL,sBAAsB,EACtB,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,iBAAiB,GAClB,MAAM,eAAe,CAAC;AAEvB,MAAM,YAAY,GAAwB,IAAI,GAAG,CAAC;IAChD,MAAM;IACN,aAAa;IACb,aAAa;IACb,SAAS;IACT,mBAAmB;IACnB,QAAQ;IACR,WAAW;IACX,UAAU;IACV,YAAY;IACZ,SAAS;IACT,MAAM;IACN,UAAU;IACV,UAAU;IACV,MAAM;IACN,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,OAAO;IACP,WAAW;IACX,YAAY;CACb,CAAC,CAAC;AAEH,MAAM,UAAU,kBAAkB,CAAC,MAAkB,EAAE,IAAY,EAAE,QAAkB;IACrF,iBAAiB,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IACxD,MAAM,QAAQ,GAAG,YAAY,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IACtD,MAAM,UAAU,GAAG,iBAAiB,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC;IAC7E,MAAM,UAAU,GAAG,iBAAiB,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IACvE,MAAM,QAAQ,GAAmE;QAC/E,OAAO,EAAE,QAAQ;QACjB,IAAI;QACJ,QAAQ;QACR,UAAU;QACV,UAAU,EAAE,cAAc,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC;QAC1E,WAAW,EAAE,eAAe,CAAC,MAAM,EAAE,IAAI,E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