@withpica/mcp-server 2.53.0 → 2.55.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 (51) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/dist/lib/changelog.d.ts +18 -0
  3. package/dist/lib/changelog.d.ts.map +1 -0
  4. package/dist/lib/changelog.generated.d.ts +4 -0
  5. package/dist/lib/changelog.generated.d.ts.map +1 -0
  6. package/dist/lib/changelog.generated.js +6 -0
  7. package/dist/lib/changelog.generated.js.map +1 -0
  8. package/dist/lib/changelog.js +84 -0
  9. package/dist/lib/changelog.js.map +1 -0
  10. package/dist/prompts/index.d.ts.map +1 -1
  11. package/dist/prompts/index.js +0 -2
  12. package/dist/prompts/index.js.map +1 -1
  13. package/dist/resources/index.d.ts.map +1 -1
  14. package/dist/resources/index.js +18 -0
  15. package/dist/resources/index.js.map +1 -1
  16. package/dist/resources/release-notes.d.ts +13 -0
  17. package/dist/resources/release-notes.d.ts.map +1 -0
  18. package/dist/resources/release-notes.js +18 -0
  19. package/dist/resources/release-notes.js.map +1 -0
  20. package/dist/server-instructions.d.ts +3 -2
  21. package/dist/server-instructions.d.ts.map +1 -1
  22. package/dist/server-instructions.js +5 -4
  23. package/dist/server-instructions.js.map +1 -1
  24. package/dist/tools/discovery.d.ts.map +1 -1
  25. package/dist/tools/discovery.js +8 -1
  26. package/dist/tools/discovery.js.map +1 -1
  27. package/dist/tools/import.d.ts.map +1 -1
  28. package/dist/tools/import.js +90 -37
  29. package/dist/tools/import.js.map +1 -1
  30. package/dist/tools/index.d.ts.map +1 -1
  31. package/dist/tools/index.js +8 -6
  32. package/dist/tools/index.js.map +1 -1
  33. package/dist/tools/metadata.js +6 -6
  34. package/dist/tools/metadata.js.map +1 -1
  35. package/dist/tools/public-filter.d.ts.map +1 -1
  36. package/dist/tools/public-filter.js +0 -1
  37. package/dist/tools/public-filter.js.map +1 -1
  38. package/dist/tools/recovery-hints.d.ts.map +1 -1
  39. package/dist/tools/recovery-hints.js +1 -0
  40. package/dist/tools/recovery-hints.js.map +1 -1
  41. package/dist/tools/release-notes.d.ts +26 -0
  42. package/dist/tools/release-notes.d.ts.map +1 -0
  43. package/dist/tools/release-notes.js +104 -0
  44. package/dist/tools/release-notes.js.map +1 -0
  45. package/package.json +5 -4
  46. package/scripts/build-changelog.ts +25 -0
  47. package/server.json +2 -2
  48. package/dist/tools/integrations.d.ts +0 -19
  49. package/dist/tools/integrations.d.ts.map +0 -1
  50. package/dist/tools/integrations.js +0 -140
  51. package/dist/tools/integrations.js.map +0 -1
@@ -0,0 +1,104 @@
1
+ // Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
2
+ import { parseChangelogText, CHANGELOG_SECTION_NAMES, } from "../lib/changelog.js";
3
+ import { CHANGELOG_MD, PACKAGE_NAME, PACKAGE_VERSION, } from "../lib/changelog.generated.js";
4
+ const RESOURCE_URI = "release-notes://withpica/mcp-server/latest";
5
+ const DEFAULT_LIMIT = 3;
6
+ const MAX_LIMIT = 20;
7
+ function compareSemver(a, b) {
8
+ const parse = (v) => v.split(".").map((n) => parseInt(n, 10) || 0);
9
+ const [a1, a2, a3] = parse(a);
10
+ const [b1, b2, b3] = parse(b);
11
+ if (a1 !== b1)
12
+ return a1 - b1;
13
+ if (a2 !== b2)
14
+ return a2 - b2;
15
+ return a3 - b3;
16
+ }
17
+ export class ReleaseNotesTools {
18
+ pica;
19
+ constructor(pica) {
20
+ this.pica = pica;
21
+ }
22
+ getTools() {
23
+ return [
24
+ {
25
+ definition: {
26
+ name: "pica_release_notes",
27
+ tier: "read",
28
+ vernacular_kind: "specialist",
29
+ vernacular_reason: "Server self-introspection — surfaces platform release notes for the MCP server itself. Not a catalog tool; not yet covered by the Creator Question Atlas (ADR-226). Disambiguated from the ambiguous 'what's new' phrasing by the NOT-FOR clause in the description.",
30
+ description: "Use when the user asks: 'what's new in pica', 'any updates to the server', " +
31
+ "'what changed in the MCP', 'what version am I on'. " +
32
+ "Returns recent releases of the PICA MCP server (platform updates). " +
33
+ "NOT for catalog activity, recent works, or 'what's new in my catalogue' — " +
34
+ "use pica_dashboard_briefing or pica_works_query for that. " +
35
+ "Returns { package, current_version, releases: [{ version, date, sections, markdown }], resource_uri }. " +
36
+ "Defaults to the last 3 releases; use `since_version` to bound the output " +
37
+ "or `sections` to filter to Added/Fixed/etc.",
38
+ workflows: "infrastructure",
39
+ inputSchema: {
40
+ type: "object",
41
+ properties: {
42
+ since_version: {
43
+ type: "string",
44
+ description: "If set, returns only releases strictly greater than this version " +
45
+ "(semver-compared). Example: '2.50.0' returns 2.50.1+, 2.51.0+, etc. " +
46
+ "Versions equal to since_version are excluded.",
47
+ },
48
+ limit: {
49
+ type: "number",
50
+ description: `Maximum number of releases to return. Default ${DEFAULT_LIMIT}, max ${MAX_LIMIT}.`,
51
+ },
52
+ sections: {
53
+ type: "array",
54
+ items: { type: "string", enum: [...CHANGELOG_SECTION_NAMES] },
55
+ description: "Filter each release's sections to only these names " +
56
+ "(e.g. ['Added', 'Fixed']). Sections not in the list are omitted from output.",
57
+ },
58
+ },
59
+ },
60
+ },
61
+ executor: this.releaseNotes.bind(this),
62
+ },
63
+ ];
64
+ }
65
+ releaseNotes = async (args) => {
66
+ const sinceVersion = typeof args.since_version === "string" ? args.since_version : null;
67
+ const rawLimit = typeof args.limit === "number" ? args.limit : DEFAULT_LIMIT;
68
+ const limit = Math.max(1, Math.min(MAX_LIMIT, Math.floor(rawLimit)));
69
+ const sectionFilter = Array.isArray(args.sections)
70
+ ? args.sections.filter((s) => CHANGELOG_SECTION_NAMES.includes(s))
71
+ : null;
72
+ const all = parseChangelogText(CHANGELOG_MD);
73
+ let filtered = all;
74
+ if (sinceVersion) {
75
+ filtered = all.filter((e) => compareSemver(e.version, sinceVersion) > 0);
76
+ }
77
+ filtered = filtered.slice(0, limit);
78
+ const releases = filtered.map((e) => {
79
+ const sections = sectionFilter
80
+ ? Object.fromEntries(Object.entries(e.sections).filter(([k]) => sectionFilter.includes(k)))
81
+ : e.sections;
82
+ return {
83
+ version: e.version,
84
+ date: e.date,
85
+ sections,
86
+ markdown: e.markdown,
87
+ };
88
+ });
89
+ return {
90
+ content: [
91
+ {
92
+ type: "text",
93
+ text: JSON.stringify({
94
+ package: PACKAGE_NAME,
95
+ current_version: PACKAGE_VERSION,
96
+ releases,
97
+ resource_uri: RESOURCE_URI,
98
+ }, null, 2),
99
+ },
100
+ ],
101
+ };
102
+ };
103
+ }
104
+ //# sourceMappingURL=release-notes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release-notes.js","sourceRoot":"","sources":["../../src/tools/release-notes.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAqB7D,OAAO,EACL,kBAAkB,EAElB,uBAAuB,GACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,eAAe,GAChB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,YAAY,GAAG,4CAA4C,CAAC;AAClE,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,SAAS,GAAG,EAAE,CAAC;AAErB,SAAS,aAAa,CAAC,CAAS,EAAE,CAAS;IACzC,MAAM,KAAK,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3E,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC9B,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAC9B,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,EAAE,GAAG,EAAE,CAAC;IAC9B,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,EAAE,GAAG,EAAE,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AAO;gBACL,OAAO,EAAE,CAAC,CAAC,OAAO;gBAClB,IAAI,EAAE,CAAC,CAAC,IAAI;gBACZ,QAAQ;gBACR,QAAQ,EAAE,CAAC,CAAC,QAAQ;aACrB,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;wBACE,OAAO,EAAE,YAAY;wBACrB,eAAe,EAAE,eAAe;wBAChC,QAAQ;wBACR,YAAY,EAAE,YAAY;qBAC3B,EACD,IAAI,EACJ,CAAC,CACF;iBACF;aACF;SACF,CAAC;IACJ,CAAC,CAAC;CACH"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@withpica/mcp-server",
3
3
  "mcpName": "io.github.withpica/pica",
4
- "version": "2.53.0",
4
+ "version": "2.55.0",
5
5
  "description": "MCP Server for PICA Platform - enables AI assistants to interact with PICA",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -9,7 +9,7 @@
9
9
  "pica-mcp": "./dist/index.js"
10
10
  },
11
11
  "scripts": {
12
- "prebuild": "tsx scripts/bundle-apps.ts && tsx scripts/build-required-schemas.ts && tsx scripts/build-skills.ts",
12
+ "prebuild": "tsx scripts/build-changelog.ts && tsx scripts/bundle-apps.ts && tsx scripts/build-required-schemas.ts && tsx scripts/build-skills.ts",
13
13
  "build": "tsc",
14
14
  "dev": "tsx src/index.ts",
15
15
  "start": "node dist/index.js",
@@ -19,7 +19,8 @@
19
19
  "lint:required-schemas": "tsx ../scripts/lint-required-schemas.ts",
20
20
  "lint:agent-guide": "tsx ../scripts/lint-agent-guide.ts",
21
21
  "lint:resource-coverage": "tsx ../scripts/lint-resource-coverage.ts",
22
- "prepublishOnly": "npm run build && tsx ../scripts/check-mcp-bundle.ts && tsx ../scripts/lint-mcp-tools.ts && npm run lint:required-schemas && npm run lint:agent-guide && npm run lint:resource-coverage"
22
+ "lint:changelog": "tsx ../scripts/lint-changelog.ts --package=.",
23
+ "prepublishOnly": "npm run build && tsx ../scripts/check-mcp-bundle.ts && tsx ../scripts/lint-mcp-tools.ts && npm run lint:required-schemas && npm run lint:agent-guide && npm run lint:resource-coverage && npm run lint:changelog"
23
24
  },
24
25
  "keywords": [
25
26
  "mcp",
@@ -34,7 +35,7 @@
34
35
  "license": "MIT",
35
36
  "dependencies": {
36
37
  "@modelcontextprotocol/sdk": "~1.27.1",
37
- "@withpica/mcp-sdk": "^1.26.0",
38
+ "@withpica/mcp-sdk": "^1.27.0",
38
39
  "@withpica/mcp-utils": "^1.21.0",
39
40
  "mppx": "^0.5.0"
40
41
  },
@@ -0,0 +1,25 @@
1
+ // Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
2
+
3
+ import { readFileSync, writeFileSync } from "fs";
4
+ import { resolve, dirname } from "path";
5
+ import { fileURLToPath } from "url";
6
+
7
+ const __dirname = dirname(fileURLToPath(import.meta.url));
8
+ const root = resolve(__dirname, "..");
9
+ const changelogPath = resolve(root, "CHANGELOG.md");
10
+ const outPath = resolve(root, "src/lib/changelog.generated.ts");
11
+ const pkg = JSON.parse(readFileSync(resolve(root, "package.json"), "utf8"));
12
+
13
+ const md = readFileSync(changelogPath, "utf8");
14
+ const escaped = JSON.stringify(md);
15
+
16
+ writeFileSync(
17
+ outPath,
18
+ `// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.\n` +
19
+ `// Generated by scripts/build-changelog.ts — do not edit.\n\n` +
20
+ `export const CHANGELOG_MD = ${escaped};\n` +
21
+ `export const PACKAGE_NAME = ${JSON.stringify(pkg.name)};\n` +
22
+ `export const PACKAGE_VERSION = ${JSON.stringify(pkg.version)};\n`,
23
+ );
24
+
25
+ console.log(`Wrote ${outPath} (${md.length} chars).`);
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/withpica/pica",
7
7
  "source": "github"
8
8
  },
9
- "version": "2.53.0",
9
+ "version": "2.55.0",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "@withpica/mcp-server",
14
- "version": "2.53.0",
14
+ "version": "2.55.0",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  }
@@ -1,19 +0,0 @@
1
- /**
2
- * Integrations Tools — report which OPTIONAL peer-data connectors the user has set up.
3
- * Does NOT gate PICA catalog access — the catalog is always accessible via
4
- * pica_works_query / pica_people_query / pica_dashboard_briefing regardless of
5
- * peer-connector state. Platform-level sources (Spotify, YouTube, etc.) are
6
- * exposed separately as `platformReads` — they never require user connection.
7
- */
8
- import { PicaClient } from "@withpica/mcp-sdk";
9
- import { ToolDefinition, ToolExecutor } from "./index.js";
10
- export declare class IntegrationsTools {
11
- private pica;
12
- constructor(pica: PicaClient);
13
- getTools(): Array<{
14
- definition: ToolDefinition;
15
- executor: ToolExecutor;
16
- }>;
17
- private getStatus;
18
- }
19
- //# sourceMappingURL=integrations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../src/tools/integrations.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAGtE,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,IAAI,CAAa;gBAEb,IAAI,EAAE,UAAU;IAI5B,QAAQ,IAAI,KAAK,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;YA8B3D,SAAS;CAsHxB"}
@@ -1,140 +0,0 @@
1
- // Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
2
- import { formatSuccess } from "@withpica/mcp-utils";
3
- export class IntegrationsTools {
4
- pica;
5
- constructor(pica) {
6
- this.pica = pica;
7
- }
8
- getTools() {
9
- return [
10
- {
11
- definition: {
12
- name: "pica_integrations_status",
13
- tier: "read",
14
- description: "Check which OPTIONAL peer-data connectors the user has set up — Google " +
15
- "(Gmail + Calendar + Drive), Notion, Airtable, Telegram. These pull data FROM the " +
16
- "user's other tools INTO PICA (enrichment, context). They are optional — PICA's own " +
17
- "catalog (works, people, recordings, agreements) is always accessible via " +
18
- "pica_works_query, pica_people_query, pica_dashboard_briefing, pica_search_all " +
19
- "regardless of peer-connector state. " +
20
- "Platform-level sources (Spotify, YouTube, MusicBrainz, MLC, ISNI, Discogs) are " +
21
- "always available with no setup — never tell the user to 'connect' them; use " +
22
- "pica_import_streaming_link, pica_import_youtube_link, or pica_resolve_work / pica_resolve_person / pica_resolve_recording with sources:[...] directly.",
23
- workflows: "infrastructure",
24
- vernacular_kind: "specialist",
25
- vernacular_reason: "Specialist context; not yet covered by the Creator Question Atlas — pending telemetry-driven addition per ADR-226 Phase 4 substrate writes.",
26
- inputSchema: {
27
- type: "object",
28
- properties: {},
29
- },
30
- },
31
- executor: this.getStatus.bind(this),
32
- },
33
- ];
34
- }
35
- async getStatus(_args) {
36
- // Fetch both OAuth connections and platform integrations
37
- const [oauthResult, platformResult] = await Promise.allSettled([
38
- this.pica.integrations.oauthConnections(),
39
- this.pica.integrations.platforms(),
40
- ]);
41
- const oauthConnections = oauthResult.status === "fulfilled"
42
- ? oauthResult.value?.data || oauthResult.value || []
43
- : [];
44
- const platforms = platformResult.status === "fulfilled"
45
- ? platformResult.value?.data?.platforms ||
46
- platformResult.value?.platforms ||
47
- []
48
- : [];
49
- const connections = Array.isArray(oauthConnections) ? oauthConnections : [];
50
- const connectedProviders = connections.map((c) => c.provider?.toLowerCase() || "");
51
- // Peer-data connectors — user-level OAuth that pulls data INTO PICA from other tools.
52
- // Google is one OAuth that unlocks Calendar, Gmail, and Drive.
53
- // Spotify/YouTube are NOT listed here — they are platform-level reads with no per-user
54
- // connection; listing them here caused agents to tell users to "connect Spotify", which
55
- // is impossible and misrepresents PICA's capability.
56
- const peerConnectors = [
57
- {
58
- name: "Google",
59
- connected: connectedProviders.includes("google"),
60
- what: "Gmail, Google Calendar, and Google Drive — one connection unlocks all three",
61
- includes: ["Gmail", "Google Calendar", "Google Drive"],
62
- },
63
- {
64
- name: "Notion",
65
- connected: connectedProviders.includes("notion"),
66
- what: "Pull notes/pages from Notion as enrichment context",
67
- },
68
- {
69
- name: "Airtable",
70
- connected: connectedProviders.includes("airtable"),
71
- what: "Sync catalog to Airtable",
72
- },
73
- {
74
- name: "Telegram",
75
- connected: connectedProviders.includes("telegram"),
76
- what: "Get notifications and run commands via Telegram",
77
- },
78
- ];
79
- // ADR-179 — the per-source `pica_enrich_*` tools were folded into
80
- // `pica_resolve_work` / `pica_resolve_person` / `pica_resolve_recording`
81
- // with a `sources: [...]` parameter, then removed in commit dc1bfca72
82
- // (2026-04-21). This advertisement points agents at the surviving
83
- // tools so calling out a specific platform routes to the right verb.
84
- const platformReads = [
85
- {
86
- name: "Spotify",
87
- use_via: "pica_import_streaming_link (paste track/album/playlist URL), or pica_resolve_work with sources:['spotify'] for catalog enrichment",
88
- },
89
- {
90
- name: "YouTube",
91
- use_via: "pica_import_youtube_link (paste video URL), or pica_resolve_recording with sources:['youtube']",
92
- },
93
- {
94
- name: "MusicBrainz",
95
- use_via: "pica_resolve_work with sources:['musicbrainz'] (works) or pica_resolve_person with sources:['musicbrainz'] (people)",
96
- },
97
- {
98
- name: "MLC",
99
- use_via: "pica_resolve_work with sources:['mlc']",
100
- },
101
- {
102
- name: "ISNI",
103
- use_via: "pica_resolve_person with sources:['isni']",
104
- },
105
- {
106
- name: "Discogs",
107
- use_via: "pica_resolve_recording with sources:['discogs']",
108
- },
109
- ];
110
- const connected = peerConnectors.filter((s) => s.connected);
111
- const available = peerConnectors.filter((s) => !s.connected);
112
- const summary = [
113
- "PICA catalog is ALWAYS accessible via pica_works_query, pica_people_query, pica_dashboard_briefing, pica_search_all — no setup required to read or write your own data.",
114
- "",
115
- `Optional peer-data connectors: ${connected.length} of ${peerConnectors.length} connected.`,
116
- connected.length > 0
117
- ? ` Connected: ${connected.map((s) => s.name).join(", ")}.`
118
- : null,
119
- available.length > 0
120
- ? ` Available at withpica.com/admin/settings: ${available.map((s) => s.name).join(", ")}.`
121
- : " All peer connectors connected.",
122
- "",
123
- "Platform-level sources (always available, never need 'connecting'): Spotify, YouTube, MusicBrainz, MLC, ISNI, Discogs. For a Spotify URL use pica_import_streaming_link; for YouTube use pica_import_youtube_link; for catalog enrichment use pica_resolve_work / pica_resolve_person / pica_resolve_recording with sources:[...] (the per-source pica_enrich_* tools were folded into these in ADR-179 and removed in 2026-04).",
124
- ]
125
- .filter((line) => line !== null)
126
- .join("\n");
127
- return formatSuccess(summary, {
128
- peerConnectors,
129
- platformReads,
130
- platforms: Array.isArray(platforms) ? platforms : [],
131
- oauthConnections: connections.map((c) => ({
132
- provider: c.provider,
133
- account_name: c.account_name,
134
- is_active: c.is_active,
135
- connected_at: c.created_at,
136
- })),
137
- });
138
- }
139
- }
140
- //# sourceMappingURL=integrations.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"integrations.js","sourceRoot":"","sources":["../../src/tools/integrations.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAY7D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,OAAO,iBAAiB;IACpB,IAAI,CAAa;IAEzB,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,QAAQ;QACN,OAAO;YACL;gBACE,UAAU,EAAE;oBACV,IAAI,EAAE,0BAA0B;oBAChC,IAAI,EAAE,MAAM;oBACZ,WAAW,EACT,yEAAyE;wBACzE,mFAAmF;wBACnF,qFAAqF;wBACrF,2EAA2E;wBAC3E,gFAAgF;wBAChF,sCAAsC;wBACtC,iFAAiF;wBACjF,8EAA8E;wBAC9E,wJAAwJ;oBAC1J,SAAS,EAAE,gBAAgB;oBAC3B,eAAe,EAAE,YAAY;oBAC7B,iBAAiB,EACf,6IAA6I;o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