rubien-mcp-server 0.2.0 → 0.3.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.
@@ -10,19 +10,22 @@ const PROPERTY_TYPES = [
10
10
  "checkbox",
11
11
  ];
12
12
  /// Tags are exposed as the seeded built-in PropertyDefinition with
13
- /// `defaultFieldKey == "tags"`. All operations below treat Tags as a regular
14
- /// multiSelect property — `set` / `add_values` / `remove_values` accept tag
15
- /// IDs (stringified), `add_option` creates a new Tag from a name + color,
16
- /// `rename_option` / `delete_option` operate by tag ID. The retired
17
- /// rubien_tags_* tool family folded into this surface.
13
+ /// `defaultFieldKey == "tags"`. The option tools below treat Tags options as
14
+ /// Tag rows — `create_option` creates a new Tag from a name + color,
15
+ /// `update_option` / `delete_option` address tags by stringified tag ID.
16
+ /// ASSIGNING values to a reference is rubien_update_reference's `properties`
17
+ /// payload, not these tools.
18
18
  function tagsContractNote(extra = "") {
19
- return ("For the built-in Tags property (defaultFieldKey == 'tags'): values are " +
20
- "tag IDs (stringified). Create new tags via rubien_properties_add_option " +
21
- "(value=name, color=hex)." +
19
+ return ("For the built-in Tags property (defaultFieldKey == 'tags'): options are " +
20
+ "Tag rows addressed by stringified tag ID. Create new tags via " +
21
+ "rubien_create_option (value=name, color=hex)." +
22
22
  (extra ? " " + extra : ""));
23
23
  }
24
+ /// The column-vs-cell boundary, stated on every option tool: these tools
25
+ /// edit the CHOICES; update_reference edits a reference's chosen VALUES.
26
+ const assignmentPointer = " (These tools edit the available choices themselves. To assign/unassign values on a specific reference, use rubien_update_reference's `properties` payload.)";
24
27
  export function registerPropertyTools(server) {
25
- server.registerTool("rubien_properties_list", {
28
+ server.registerTool("rubien_list_properties", {
26
29
  title: "List property definitions (incl. Tags)",
27
30
  description: "List property definitions. Returns PropertyDefinitionDTO[] with options inlined: " +
28
31
  "{value, label, color}. For the built-in Tags property each option is one Tag row " +
@@ -31,7 +34,7 @@ export function registerPropertyTools(server) {
31
34
  "and override `visible`. Unresolved selectors fail loudly with an `unresolved-selectors` error envelope.",
32
35
  inputSchema: {
33
36
  ids: z
34
- .array(z.string())
37
+ .array(z.number().int())
35
38
  .optional()
36
39
  .describe("Repeatable property IDs to include. Errors if any ID does not exist."),
37
40
  names: z
@@ -49,22 +52,24 @@ export function registerPropertyTools(server) {
49
52
  if (visible)
50
53
  args.push("--visible");
51
54
  for (const id of ids ?? [])
52
- args.push("--id", id);
55
+ args.push("--id", String(id));
53
56
  for (const n of names ?? [])
54
57
  args.push("--name", n);
55
58
  return runCliAsTool(args);
56
59
  });
57
- server.registerTool("rubien_properties_create", {
58
- title: "Create custom property",
59
- description: "Create a new custom property definition. To create a new tag instead, use rubien_properties_add_option against the built-in Tags property.",
60
+ server.registerTool("rubien_create_property", {
61
+ title: "Create custom property (column)",
62
+ description: "Create a new custom property definition (a column). All-digit names are rejected — they would shadow id selectors in rubien_update_reference's payload. To create a new tag instead, use rubien_create_option against the built-in Tags property." +
63
+ assignmentPointer,
60
64
  inputSchema: {
61
- name: z.string(),
65
+ name: z.string().describe("Property name (must not be all digits)"),
62
66
  type: z.enum(PROPERTY_TYPES),
63
67
  options: z
64
68
  .string()
65
69
  .optional()
66
70
  .describe("For singleSelect/multiSelect, comma-separated option labels."),
67
71
  },
72
+ annotations: { readOnlyHint: false, destructiveHint: false },
68
73
  }, async ({ name, type, options }) => runCliAsTool([
69
74
  "properties",
70
75
  "--create",
@@ -74,73 +79,79 @@ export function registerPropertyTools(server) {
74
79
  "--options": options,
75
80
  }),
76
81
  ]));
77
- server.registerTool("rubien_properties_delete", {
82
+ server.registerTool("rubien_update_property", {
83
+ title: "Update property (rename and/or visibility)",
84
+ description: "Update a property definition: rename it and/or change its UI visibility, in one transaction. At least one of `name` / `visible` is required. Built-in properties (incl. Tags) cannot be renamed; visibility can be changed on any property. All-digit names are rejected.",
85
+ inputSchema: {
86
+ id: z.number().int().describe("Property ID"),
87
+ name: z.string().optional().describe("New display name"),
88
+ visible: z.boolean().optional().describe("Show (true) or hide (false) in the app UI"),
89
+ },
90
+ annotations: { readOnlyHint: false, destructiveHint: false },
91
+ }, async ({ id, name, visible }) => {
92
+ const args = ["properties", "--update", "--id", String(id)];
93
+ if (name !== undefined)
94
+ args.push("--name", name);
95
+ if (visible !== undefined)
96
+ args.push("--set-visible", String(visible));
97
+ return runCliAsTool(args);
98
+ });
99
+ server.registerTool("rubien_delete_property", {
78
100
  title: "Delete custom property",
79
- description: "Remove a property definition and all its values on references. Cannot delete default/built-in properties (Tags included — use rubien_properties_delete_option to remove individual tags).",
80
- inputSchema: { id: z.string() },
81
- annotations: { destructiveHint: true },
82
- }, async ({ id }) => runCliAsTool(["properties", "--delete", id]));
83
- server.registerTool("rubien_properties_rename", {
84
- title: "Rename custom property",
85
- description: "Change a property's display name. Built-in properties (incl. Tags) cannot be renamed.",
86
- inputSchema: { id: z.string(), name: z.string() },
87
- }, async ({ id, name }) => runCliAsTool(["properties", "--rename", "--id", id, "--name", name]));
88
- server.registerTool("rubien_properties_show", {
89
- title: "Show property in UI",
90
- description: "Mark a property as visible in the app UI.",
91
- inputSchema: { id: z.string() },
92
- }, async ({ id }) => runCliAsTool(["properties", "--show", "--id", id]));
93
- server.registerTool("rubien_properties_hide", {
94
- title: "Hide property in UI",
95
- description: "Mark a property as hidden in the app UI.",
96
- inputSchema: { id: z.string() },
97
- }, async ({ id }) => runCliAsTool(["properties", "--hide", "--id", id]));
98
- server.registerTool("rubien_properties_add_option", {
99
- title: "Add option to select property (creates a Tag for the Tags property)",
101
+ description: "Remove a property definition and all its values on references. Cannot delete default/built-in properties (Tags included — use rubien_delete_option to remove individual tags).",
102
+ inputSchema: { id: z.number().int() },
103
+ annotations: { readOnlyHint: false, destructiveHint: true },
104
+ }, async ({ id }) => runCliAsTool(["properties", "--delete", String(id)]));
105
+ server.registerTool("rubien_create_option", {
106
+ title: "Create select option (creates a Tag for the Tags property)",
100
107
  description: "Append an option to a singleSelect/multiSelect property. " +
101
108
  "For the built-in Tags property, this creates a new Tag row with `value` as the tag name " +
102
- "and `color` as the tag color; the returned option's `value` is the new tag's stable id.",
109
+ "and `color` as the tag color; the returned option's `value` is the new tag's stable id." +
110
+ assignmentPointer,
103
111
  inputSchema: {
104
- id: z.string().describe("Property ID"),
112
+ propertyId: z.number().int().describe("Property ID"),
105
113
  value: z
106
114
  .string()
107
115
  .describe("Option label (or, for Tags, the new tag's display name)"),
108
- color: z.string().optional().describe("Optional hex color"),
116
+ color: z.string().optional().describe("Optional hex color (#RRGGBB)"),
109
117
  },
110
- }, async ({ id, value, color }) => runCliAsTool([
118
+ annotations: { readOnlyHint: false, destructiveHint: false },
119
+ }, async ({ propertyId, value, color }) => runCliAsTool([
111
120
  "properties",
112
121
  "--add-option",
113
122
  "--id",
114
- id,
123
+ String(propertyId),
115
124
  ...flagsFromOptions({ "--value": value, "--color": color }),
116
125
  ]));
117
- server.registerTool("rubien_properties_rename_option", {
118
- title: "Rename a select option (renames the underlying Tag for Tags)",
119
- description: "Rename an existing option on a singleSelect/multiSelect property and bulk-update affected references. " +
120
- "For Tags: `from` is the stringified tag id (identity-stable), `to` is the new display name. " +
121
- "Pivots are not touched. For other multiSelect: rewrites the JSON arrays in every affected propertyValue row.",
126
+ server.registerTool("rubien_update_option", {
127
+ title: "Update a select option (rename and/or recolor)",
128
+ description: "Rename and/or recolor an existing option on a singleSelect/multiSelect property, in one transaction. `option` addresses the option by its original identity; at least one of `name` / `color` is required. Renames bulk-update affected references. " +
129
+ "For Tags: `option` is the stringified tag id (identity-stable), `name` is the new display name, recolor updates the Tag row. `color` accepts #RRGGBB only. The built-in Type property's options are fully immutable (recolor included)." +
130
+ assignmentPointer,
122
131
  inputSchema: {
123
- id: z.string().describe("Property ID"),
124
- from: z.string().describe("Existing option value (tag id for Tags)"),
125
- to: z.string().describe("New option value (new tag name for Tags)"),
132
+ propertyId: z.number().int().describe("Property ID"),
133
+ option: z.string().describe("Existing option value (stringified tag id for Tags)"),
134
+ name: z.string().optional().describe("New option value (new tag name for Tags)"),
135
+ color: z.string().optional().describe("New hex color (#RRGGBB)"),
126
136
  },
127
- }, async ({ id, from, to }) => runCliAsTool([
137
+ annotations: { readOnlyHint: false, destructiveHint: false },
138
+ }, async ({ propertyId, option, name, color }) => runCliAsTool([
128
139
  "properties",
129
- "--rename-option",
140
+ "--update-option",
130
141
  "--id",
131
- id,
132
- "--from",
133
- from,
134
- "--to",
135
- to,
142
+ String(propertyId),
143
+ "--option",
144
+ option,
145
+ ...flagsFromOptions({ "--to": name, "--color": color }),
136
146
  ]));
137
- server.registerTool("rubien_properties_delete_option", {
147
+ server.registerTool("rubien_delete_option", {
138
148
  title: "Delete a select option (deletes the underlying Tag for Tags)",
139
149
  description: "Remove a select option from a property. " + tagsContractNote("For Tags, deleting a tag with attached references requires `replaceWith` (the stringified id of another tag) — affected references are re-tagged before the old tag is removed. Without `replaceWith`, in-use options surface an `optionInUse` error.") +
140
- " To delete an in-use option without migrating, set `clearInUse: true` — affected references have the option cleared from their value (singleSelect loses its value; multiSelect drops just this option). `clearInUse` and `replaceWith` are mutually exclusive.",
150
+ " To delete an in-use option without migrating, set `clearInUse: true` — affected references have the option cleared from their value (singleSelect loses its value; multiSelect drops just this option). `clearInUse` and `replaceWith` are mutually exclusive." +
151
+ assignmentPointer,
141
152
  inputSchema: {
142
- id: z.string().describe("Property ID"),
143
- value: z.string().describe("Option value to delete (tag id for Tags)"),
153
+ propertyId: z.number().int().describe("Property ID"),
154
+ value: z.string().describe("Option value to delete (stringified tag id for Tags)"),
144
155
  replaceWith: z
145
156
  .string()
146
157
  .optional()
@@ -150,12 +161,12 @@ export function registerPropertyTools(server) {
150
161
  .optional()
151
162
  .describe("Clear the option from affected references instead of migrating. Mutually exclusive with replaceWith."),
152
163
  },
153
- annotations: { destructiveHint: true },
154
- }, async ({ id, value, replaceWith, clearInUse }) => runCliAsTool([
164
+ annotations: { readOnlyHint: false, destructiveHint: true },
165
+ }, async ({ propertyId, value, replaceWith, clearInUse }) => runCliAsTool([
155
166
  "properties",
156
167
  "--delete-option",
157
168
  "--id",
158
- id,
169
+ String(propertyId),
159
170
  "--value",
160
171
  value,
161
172
  ...flagsFromOptions({
@@ -163,85 +174,5 @@ export function registerPropertyTools(server) {
163
174
  "--clear-in-use": clearInUse,
164
175
  }),
165
176
  ]));
166
- server.registerTool("rubien_properties_set", {
167
- title: "Set property value on reference (replace semantics)",
168
- description: "Assign a property value to a reference using replace semantics. For multiSelect (incl. Tags), pass comma-separated values — the existing set is overwritten. " +
169
- "Use rubien_properties_add_values / rubien_properties_remove_values for incremental edits. " +
170
- tagsContractNote(),
171
- inputSchema: {
172
- reference: z.number().int(),
173
- id: z.string().describe("Property ID"),
174
- value: z.string(),
175
- },
176
- }, async ({ reference, id, value }) => runCliAsTool([
177
- "properties",
178
- "--set",
179
- "--reference",
180
- String(reference),
181
- "--id",
182
- id,
183
- "--value",
184
- value,
185
- ]));
186
- server.registerTool("rubien_properties_add_values", {
187
- title: "Add values to a multiSelect property (additive, idempotent)",
188
- description: "Append one or more values to a multiSelect property on a reference without disturbing existing selections. " +
189
- "Idempotent: re-adding a present value is a no-op (no sync churn). " +
190
- tagsContractNote("For Tags this inserts ReferenceTag pivots."),
191
- inputSchema: {
192
- reference: z.number().int(),
193
- id: z.string().describe("Property ID"),
194
- value: z.string().describe("Comma-separated values (tag IDs for Tags)"),
195
- },
196
- }, async ({ reference, id, value }) => runCliAsTool([
197
- "properties",
198
- "--set",
199
- "--add-value",
200
- "--reference",
201
- String(reference),
202
- "--id",
203
- id,
204
- "--value",
205
- value,
206
- ]));
207
- server.registerTool("rubien_properties_remove_values", {
208
- title: "Remove values from a multiSelect property (subtractive, idempotent)",
209
- description: "Remove one or more values from a multiSelect property on a reference without disturbing other selections. " +
210
- "Idempotent: removing an absent value is a no-op. " +
211
- tagsContractNote("For Tags this deletes ReferenceTag pivots."),
212
- inputSchema: {
213
- reference: z.number().int(),
214
- id: z.string().describe("Property ID"),
215
- value: z.string().describe("Comma-separated values (tag IDs for Tags)"),
216
- },
217
- annotations: { destructiveHint: true },
218
- }, async ({ reference, id, value }) => runCliAsTool([
219
- "properties",
220
- "--set",
221
- "--remove-value",
222
- "--reference",
223
- String(reference),
224
- "--id",
225
- id,
226
- "--value",
227
- value,
228
- ]));
229
- server.registerTool("rubien_properties_clear", {
230
- title: "Clear property value on reference",
231
- description: "Remove a property value from a reference. " +
232
- tagsContractNote("For Tags this removes all of the reference's tag assignments."),
233
- inputSchema: {
234
- reference: z.number().int(),
235
- id: z.string().describe("Property ID"),
236
- },
237
- annotations: { destructiveHint: true },
238
- }, async ({ reference, id }) => runCliAsTool([
239
- "properties",
240
- "--clear",
241
- "--reference",
242
- String(reference),
243
- "--id",
244
- id,
245
- ]));
246
177
  }
247
178
  //# sourceMappingURL=properties.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"properties.js","sourceRoot":"","sources":["../../src/tools/properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEnE,MAAM,cAAc,GAAG;IACrB,QAAQ;IACR,KAAK;IACL,QAAQ;IACR,cAAc;IACd,aAAa;IACb,MAAM;IACN,UAAU;CACF,CAAC;AAEX,mEAAmE;AACnE,6EAA6E;AAC7E,4EAA4E;AAC5E,0EAA0E;AAC1E,oEAAoE;AACpE,uDAAuD;AACvD,SAAS,gBAAgB,CAAC,KAAK,GAAG,EAAE;IAClC,OAAO,CACL,yEAAyE;QACzE,0EAA0E;QAC1E,0BAA0B;QAC1B,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAC3B,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,MAAiB;IACrD,MAAM,CAAC,YAAY,CACjB,wBAAwB,EACxB;QACE,KAAK,EAAE,wCAAwC;QAC/C,WAAW,EACT,mFAA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;QACT,KAAK;QACL,GAAG,gBAAgB,CAAC;YAClB,gBAAgB,EAAE,WAAW;YAC7B,gBAAgB,EAAE,UAAU;SAC7B,CAAC;KACH,CAAC,CACL,CAAC;AACJ,CAAC"}
@@ -3,7 +3,7 @@ import { flagsFromOptions, runCliAsTool } from "../toolHelpers.js";
3
3
  export function registerReadTools(server) {
4
4
  server.registerTool("rubien_read_text", {
5
5
  title: "Read the body text of any reference",
6
- description: "Return the readable body text of any reference — its attached PDF or its clipped web page — without needing to know which it has. Source selection when `source` is omitted: `pages`/`sections` imply pdf, `start` implies web, otherwise PDF wins when both exist. Every response carries `source` (what was read) and `available` (which sources are readable now, e.g. [\"pdf\",\"web\"]). PDF responses are page-keyed: each `pages[]` item carries `text` and `sectionPath`, selected via `pages` ('1-3' or '1-3,8-10') or `sections` (title substrings, case-insensitive; errors `no-outline` when the PDF has no outline — fall back to `pages`). Web responses are one flat windowed body: `content` + `contentLength`, paginated via `start`/`maxChars`; `contentFormat` is \"markdown\" or \"html\" (treat html as a fragment). To find WHERE the body mentions something before reading, use `rubien_grep_text`. Library-only — never fetches from the network. Use `rubien_read_annotations` for the user's highlights/notes, and `rubien_pdf_info` first when you plan to select by `sections`.",
6
+ description: "Return the readable body text of any reference — its attached PDF or its clipped web page — without needing to know which it has. Source selection when `source` is omitted: `pages`/`sections` imply pdf, `start` implies web, otherwise PDF wins when both exist. Every response carries `source` (what was read) and `available` (which sources are readable now, e.g. [\"pdf\",\"web\"]). PDF responses are page-keyed: each `pages[]` item carries `text` and `sectionPath`, selected via `pages` ('1-3' or '1-3,8-10') or `sections` (title substrings, case-insensitive; errors `no-outline` when the PDF has no outline — fall back to `pages`). Web responses are one flat windowed body: `content` + `contentLength`, paginated via `start`/`maxChars`; `contentFormat` is \"markdown\" or \"html\" (treat html as a fragment). To find WHERE the body mentions something before reading, use `rubien_grep_text`. Library-only — never fetches from the network. Use `rubien_read_annotations` for the user's highlights/notes, and `rubien_get_pdf_info` first when you plan to select by `sections`.",
7
7
  inputSchema: {
8
8
  id: z.number().int().describe("Reference ID"),
9
9
  source: z.enum(["pdf", "web"]).optional()
@@ -60,7 +60,7 @@ export function registerReadTools(server) {
60
60
  });
61
61
  server.registerTool("rubien_grep_text", {
62
62
  title: "Find where a reference's body says something",
63
- description: "Find WHERE a phrase or regex occurs inside one reference's body text — its attached PDF or its clipped web page — without retrieving the body. Returns anchored locations, not text: PDF hits are page-grouped (`pages[]` with `page`, `sectionPath` breadcrumbs, `matchCount`, snippets) — drill in with `rubien_read_text` + `pages`; web hits carry exact character offsets (`matches[].start`, same coordinates as `rubien_read_text`'s `start`) — drill in with `rubien_read_text` + `start`. Matching is case-insensitive (`regex: true` treats the query as a regular expression; `(?-i:…)` restores case). Source selection mirrors `rubien_read_text`: explicit `source` wins; `pages`/`maxPages`/`snippetsPerPage` imply pdf and `maxMatches` implies web; otherwise PDF wins when both exist. Every response carries `source` and `available`. A scanned PDF returns success with `hasTextLayer: false` and no hits — fall back to `rubien_pdf_page_image`. To find which REFERENCES match, use `rubien_search` (library metadata) instead. Library-only — never fetches from the network.",
63
+ description: "Find WHERE a phrase or regex occurs inside one reference's body text — its attached PDF or its clipped web page — without retrieving the body. Returns anchored locations, not text: PDF hits are page-grouped (`pages[]` with `page`, `sectionPath` breadcrumbs, `matchCount`, snippets) — drill in with `rubien_read_text` + `pages`; web hits carry exact character offsets (`matches[].start`, same coordinates as `rubien_read_text`'s `start`) — drill in with `rubien_read_text` + `start`. Matching is case-insensitive (`regex: true` treats the query as a regular expression; `(?-i:…)` restores case). Source selection mirrors `rubien_read_text`: explicit `source` wins; `pages`/`maxPages`/`snippetsPerPage` imply pdf and `maxMatches` implies web; otherwise PDF wins when both exist. Every response carries `source` and `available`. A scanned PDF returns success with `hasTextLayer: false` and no hits — fall back to `rubien_render_pdf_page`. To find which REFERENCES match, use `rubien_search_references` (library metadata) instead. Library-only — never fetches from the network.",
64
64
  inputSchema: {
65
65
  id: z.number().int().describe("Reference ID"),
66
66
  query: z.string().min(1).describe("Literal phrase (default) or regex (`regex: true`). Case-insensitive."),
@@ -1 +1 @@
1
- {"version":3,"file":"read.js","sourceRoot":"","sources":["../../src/tools/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEnE,MAAM,UAAU,iBAAiB,CAAC,MAAiB;IACjD,MAAM,CAAC,YAAY,CACjB,kBAAkB,EAClB;QACE,KAAK,EAAE,qCAAqC;QAC5C,WAAW,EACT,8iCAA8iC;QAChjC,WAAW,EAAE;YACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;YAC7C,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,EAAE;iBACtC,QAAQ,CAAC,sFAAsF,CAAC;YACnG,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;iBACzB,QAAQ,CAAC,qGAAqG,CAAC;YAClH,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;iBAC5C,QAAQ,CAAC,gGAAgG,CAAC;YAC7G,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;iBAC7C,QAAQ,CAAC,8DAA8D,CAAC;YAC3E,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE;iBAC1D,QAAQ,CAAC,2HAA2H,CAAC;SACzI;QACD,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE;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