@withpica/mcp-server-directory 1.3.0 → 1.4.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 (97) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/client.d.ts +12 -0
  3. package/dist/client.d.ts.map +1 -0
  4. package/dist/client.js +93 -0
  5. package/dist/client.js.map +1 -0
  6. package/dist/config.d.ts +9 -0
  7. package/dist/config.d.ts.map +1 -0
  8. package/dist/config.js +15 -0
  9. package/dist/config.js.map +1 -0
  10. package/dist/index.d.ts +3 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +28 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/lib/changelog.d.ts +16 -0
  15. package/dist/lib/changelog.d.ts.map +1 -0
  16. package/dist/lib/changelog.generated.d.ts +4 -0
  17. package/dist/lib/changelog.generated.d.ts.map +1 -0
  18. package/dist/lib/changelog.generated.js +6 -0
  19. package/dist/lib/changelog.generated.js.map +1 -0
  20. package/dist/lib/changelog.js +84 -0
  21. package/dist/lib/changelog.js.map +1 -0
  22. package/dist/prompts/index.d.ts +32 -0
  23. package/dist/prompts/index.d.ts.map +1 -0
  24. package/dist/prompts/index.js +165 -0
  25. package/dist/prompts/index.js.map +1 -0
  26. package/dist/prompts/public-question-atlas.d.ts +121 -0
  27. package/dist/prompts/public-question-atlas.d.ts.map +1 -0
  28. package/dist/prompts/public-question-atlas.js +434 -0
  29. package/dist/prompts/public-question-atlas.js.map +1 -0
  30. package/dist/resources/llms-primer.d.ts +2 -0
  31. package/dist/resources/llms-primer.d.ts.map +1 -0
  32. package/dist/resources/llms-primer.js +35 -0
  33. package/dist/resources/llms-primer.js.map +1 -0
  34. package/dist/server.d.ts +33 -0
  35. package/dist/server.d.ts.map +1 -0
  36. package/dist/server.js +223 -0
  37. package/dist/server.js.map +1 -0
  38. package/dist/skills/index.d.ts +32 -0
  39. package/dist/skills/index.d.ts.map +1 -0
  40. package/dist/skills/index.js +50 -0
  41. package/dist/skills/index.js.map +1 -0
  42. package/dist/skills/skills.generated.d.ts +18 -0
  43. package/dist/skills/skills.generated.d.ts.map +1 -0
  44. package/dist/skills/skills.generated.js +14 -0
  45. package/dist/skills/skills.generated.js.map +1 -0
  46. package/dist/tools/__tests__/release-notes.test.d.ts +2 -0
  47. package/dist/tools/__tests__/release-notes.test.d.ts.map +1 -0
  48. package/dist/tools/__tests__/release-notes.test.js +49 -0
  49. package/dist/tools/__tests__/release-notes.test.js.map +1 -0
  50. package/dist/tools/chain.d.ts +12 -0
  51. package/dist/tools/chain.d.ts.map +1 -0
  52. package/dist/tools/chain.js +109 -0
  53. package/dist/tools/chain.js.map +1 -0
  54. package/dist/tools/index.d.ts +36 -0
  55. package/dist/tools/index.d.ts.map +1 -0
  56. package/dist/tools/index.js +49 -0
  57. package/dist/tools/index.js.map +1 -0
  58. package/dist/tools/people.d.ts +13 -0
  59. package/dist/tools/people.d.ts.map +1 -0
  60. package/dist/tools/people.js +177 -0
  61. package/dist/tools/people.js.map +1 -0
  62. package/dist/tools/recordings.d.ts +12 -0
  63. package/dist/tools/recordings.d.ts.map +1 -0
  64. package/dist/tools/recordings.js +145 -0
  65. package/dist/tools/recordings.js.map +1 -0
  66. package/dist/tools/release-notes.d.ts +22 -0
  67. package/dist/tools/release-notes.d.ts.map +1 -0
  68. package/dist/tools/release-notes.js +102 -0
  69. package/dist/tools/release-notes.js.map +1 -0
  70. package/dist/tools/search.d.ts +12 -0
  71. package/dist/tools/search.d.ts.map +1 -0
  72. package/dist/tools/search.js +56 -0
  73. package/dist/tools/search.js.map +1 -0
  74. package/dist/tools/skills.d.ts +19 -0
  75. package/dist/tools/skills.d.ts.map +1 -0
  76. package/dist/tools/skills.js +127 -0
  77. package/dist/tools/skills.js.map +1 -0
  78. package/dist/tools/works.d.ts +14 -0
  79. package/dist/tools/works.d.ts.map +1 -0
  80. package/dist/tools/works.js +248 -0
  81. package/dist/tools/works.js.map +1 -0
  82. package/dist/utils/errors.d.ts +14 -0
  83. package/dist/utils/errors.d.ts.map +1 -0
  84. package/dist/utils/errors.js +48 -0
  85. package/dist/utils/errors.js.map +1 -0
  86. package/dist/utils/formatting.d.ts +10 -0
  87. package/dist/utils/formatting.d.ts.map +1 -0
  88. package/dist/utils/formatting.js +16 -0
  89. package/dist/utils/formatting.js.map +1 -0
  90. package/package.json +4 -3
  91. package/scripts/build-changelog.ts +25 -0
  92. package/src/lib/changelog.ts +119 -0
  93. package/src/prompts/public-question-atlas.ts +19 -10
  94. package/src/server.ts +19 -0
  95. package/src/tools/__tests__/release-notes.test.ts +62 -0
  96. package/src/tools/index.ts +2 -0
  97. package/src/tools/release-notes.ts +148 -0
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Public Question Atlas — ADR-229 Decision 1.
3
+ *
4
+ * Source-of-truth registry mapping natural public-discovery questions to
5
+ * the canonical directory-MCP tool resolution. Sister of:
6
+ * - `mcp-server/src/prompts/creator-question-atlas.ts` (ADR-226, customer)
7
+ * - `team-mcp-server/src/prompts/operator-question-atlas.ts` (ADR-228, operator)
8
+ *
9
+ * Read by:
10
+ *
11
+ * - lint Rule 11F (extended in ADR-229) — validates every `directory_*`
12
+ * tool's `Use when the user asks` block cites questions resolving
13
+ * here, rejects creator/operator atlas cross-pollination, asserts
14
+ * mutual exclusivity of `clean_empty_state` and `fallback_when_empty`,
15
+ * and asserts `disambiguation` shape integrity
16
+ * - `scripts/intent-resolution-eval.ts --surface=directory` (ADR-229 PR-3)
17
+ * - the Phase 4 description rewrites — `Use when the user asks` blocks
18
+ * pull question + synonym strings from here
19
+ *
20
+ * The `AtlasEntry` type is inline-duplicated rather than imported from a
21
+ * shared package, mirroring ADR-228's choice (Open Question 3 default —
22
+ * extract to `packages/mcp-atlas-types/` only if a fourth MCP surface
23
+ * lands or the type drift becomes painful).
24
+ *
25
+ * Two shape extensions vs the creator and operator atlases (per ADR-229
26
+ * Decision 4):
27
+ *
28
+ * 1. `clean_empty_state?: { message; suggest_query_shape }` — public-
29
+ * surface analog of `fallback_when_empty`. The directory has no
30
+ * internal action to nudge toward (the empty state IS the final
31
+ * answer for the anonymous user); this field carries the prescribed
32
+ * empty-state copy plus a query-shape hint for the calling LLM.
33
+ *
34
+ * 2. `disambiguation?: { ambiguous_terms[]; resolver_tool; resolver_intent }` —
35
+ * first-class concern on the public surface (creator/operator MCPs
36
+ * have a calling-context that narrows the search; the public
37
+ * directory hits "Bowie", "Sade", "Madonna", "Lover Boy" constantly
38
+ * and must declare an explicit resolver step).
39
+ *
40
+ * `clean_empty_state` and `fallback_when_empty` are mutually exclusive on
41
+ * a single entry — Rule 11F enforces this at lint time.
42
+ *
43
+ * The public atlas omits `natural_domain` (creator-side binds to
44
+ * `discovery.ts` CATEGORIES; the directory MCP has no equivalent
45
+ * taxonomy — the discovery surface is search and lookup, not category-
46
+ * faceted browse). It also omits `available_when` (the operator atlas's
47
+ * forward-compat hook for unshipped sections; the directory has no
48
+ * deferred-section concept).
49
+ */
50
+ export interface AtlasFallback {
51
+ message: string;
52
+ next_tool: string;
53
+ }
54
+ export interface AtlasCleanEmptyState {
55
+ /**
56
+ * Atlas-prescribed copy for the empty-state response. The calling LLM
57
+ * may render in its own voice; the suggested-query-shape hint is the
58
+ * load-bearing part.
59
+ */
60
+ message: string;
61
+ /**
62
+ * Free-text hint for how to refine the query, interpreted by the LLM
63
+ * as guidance (not rendered verbatim). Example:
64
+ * `"title + writer | title + year | ISWC if known"`.
65
+ */
66
+ suggest_query_shape: string;
67
+ }
68
+ export interface AtlasDisambiguation {
69
+ /**
70
+ * Names known to be ambiguous in the music-metadata domain (multiple
71
+ * persons, artist projects, or works with the same string). v1 ships
72
+ * a static list; v2 (deferred per ADR-229 § Risks #3) could resolve
73
+ * dynamically against the index's name-collision frequency.
74
+ */
75
+ ambiguous_terms: string[];
76
+ /**
77
+ * The directory tool the agent should call FIRST to surface candidate
78
+ * entities for the user to disambiguate before committing to the
79
+ * lookup tool in `resolves_to`.
80
+ */
81
+ resolver_tool: string;
82
+ /**
83
+ * Free-text guidance for the LLM on how to run the resolver step.
84
+ * Example: `"Call directory_lookup_person first to surface candidates;
85
+ * ask which one before calling directory_list_works."`
86
+ */
87
+ resolver_intent: string;
88
+ }
89
+ export type AtlasResolution = {
90
+ kind: "tool";
91
+ name: string;
92
+ default_args?: Record<string, unknown>;
93
+ } | {
94
+ kind: "prompt";
95
+ name: string;
96
+ };
97
+ export interface AtlasEntry {
98
+ question: string;
99
+ synonyms: string[];
100
+ resolves_to: AtlasResolution;
101
+ /** Mutually exclusive with `clean_empty_state` (lint-enforced). */
102
+ fallback_when_empty?: AtlasFallback;
103
+ /** ADR-229 Decision 4 — public-surface empty-state contract. */
104
+ clean_empty_state?: AtlasCleanEmptyState;
105
+ /** ADR-229 Decision 4 — public-surface name-collision contract. */
106
+ disambiguation?: AtlasDisambiguation;
107
+ }
108
+ /**
109
+ * Names known-ambiguous in the music-metadata domain — multiple persons
110
+ * sharing a stage name, or artist project names that collide with
111
+ * person names. Seed list per ADR-229 § Open Q2 (case-insensitive — the
112
+ * lint and the resolver normalise on lowercase).
113
+ *
114
+ * Grow this list as Phase 5 eval data surfaces real collisions the
115
+ * static seed misses. Do not prune without eval evidence — the cost of
116
+ * missing a real collision (wrong-tool routing on a public-facing
117
+ * surface) is higher than the cost of an extra resolver call.
118
+ */
119
+ export declare const AMBIGUOUS_NAMES: string[];
120
+ export declare const PUBLIC_ATLAS: AtlasEntry[];
121
+ //# sourceMappingURL=public-question-atlas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-question-atlas.d.ts","sourceRoot":"","sources":["../../src/prompts/public-question-atlas.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAEH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GACtE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAErC,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,eAAe,CAAC;IAC7B,mEAAmE;IACnE,mBAAmB,CAAC,EAAE,aAAa,CAAC;IACpC,gEAAgE;IAChE,iBAAiB,CAAC,EAAE,oBAAoB,CAAC;IACzC,mEAAmE;IACnE,cAAc,CAAC,EAAE,mBAAmB,CAAC;CACtC;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,EAWnC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,UAAU,EA+apC,CAAC"}
@@ -0,0 +1,434 @@
1
+ // Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
2
+ /**
3
+ * Names known-ambiguous in the music-metadata domain — multiple persons
4
+ * sharing a stage name, or artist project names that collide with
5
+ * person names. Seed list per ADR-229 § Open Q2 (case-insensitive — the
6
+ * lint and the resolver normalise on lowercase).
7
+ *
8
+ * Grow this list as Phase 5 eval data surfaces real collisions the
9
+ * static seed misses. Do not prune without eval evidence — the cost of
10
+ * missing a real collision (wrong-tool routing on a public-facing
11
+ * surface) is higher than the cost of an extra resolver call.
12
+ */
13
+ export const AMBIGUOUS_NAMES = [
14
+ "Bowie",
15
+ "Sade",
16
+ "Madonna",
17
+ "Cher",
18
+ "Drake",
19
+ "Prince",
20
+ "Eminem",
21
+ "Beyoncé",
22
+ "Adele",
23
+ "Sia",
24
+ ];
25
+ export const PUBLIC_ATLAS = [
26
+ // ─────────────────────────────────────────────────────────────────
27
+ // A. Identifier-lookup — direct resolution, no disambiguation
28
+ // ─────────────────────────────────────────────────────────────────
29
+ {
30
+ question: "what's the ISWC for X?",
31
+ synonyms: ["ISWC of X", "song code for X", "registration number for X"],
32
+ resolves_to: { kind: "tool", name: "directory_lookup_work" },
33
+ clean_empty_state: {
34
+ message: "No work matched that title in our index. The work may not be " +
35
+ "registered with a society we mirror, or the title may be " +
36
+ "ambiguous — try a writer name or year of release to narrow.",
37
+ suggest_query_shape: "title + writer | title + year | ISWC if known",
38
+ },
39
+ },
40
+ {
41
+ question: "lookup IPI 12345",
42
+ synonyms: [
43
+ "find IPI X",
44
+ "person with IPI X",
45
+ "who is IPI X?",
46
+ "look up IPI number",
47
+ ],
48
+ resolves_to: { kind: "tool", name: "directory_lookup_person" },
49
+ clean_empty_state: {
50
+ message: "No creator matched that IPI in our index. The IPI may not be " +
51
+ "mirrored from the source society yet, or it may belong to a " +
52
+ "publisher rather than a writer — try the directory_list_people " +
53
+ "filter or search by name.",
54
+ suggest_query_shape: "IPI | ISNI | writer name | publisher name",
55
+ },
56
+ },
57
+ {
58
+ question: "lookup ISRC X",
59
+ synonyms: [
60
+ "what's the work for ISRC X?",
61
+ "find the work for this recording",
62
+ "look up ISRC code",
63
+ ],
64
+ resolves_to: { kind: "tool", name: "directory_lookup_isrc" },
65
+ clean_empty_state: {
66
+ message: "No work matched that ISRC in our index. The recording may not " +
67
+ "be linked to a registered work yet, or the ISRC may belong to " +
68
+ "a recording outside our mirrored societies — try a title or " +
69
+ "writer-name lookup.",
70
+ suggest_query_shape: "ISRC | title + artist | ISWC if known",
71
+ },
72
+ },
73
+ {
74
+ question: "lookup ISNI X",
75
+ synonyms: [
76
+ "find creator by ISNI",
77
+ "person with ISNI X",
78
+ "look up ISNI identifier",
79
+ ],
80
+ resolves_to: { kind: "tool", name: "directory_lookup_person" },
81
+ clean_empty_state: {
82
+ message: "No creator matched that ISNI in our index. The creator may not " +
83
+ "have an ISNI registered, or the ISNI may not be mirrored — try " +
84
+ "an IPI lookup or a name search.",
85
+ suggest_query_shape: "ISNI | IPI | creator name",
86
+ },
87
+ },
88
+ {
89
+ question: "find creator by MusicBrainz ID",
90
+ synonyms: ["lookup MBID X", "person with MusicBrainz ID"],
91
+ resolves_to: { kind: "tool", name: "directory_lookup_person" },
92
+ clean_empty_state: {
93
+ message: "No creator matched that MusicBrainz ID in our index. The MBID " +
94
+ "may not be mirrored, or it may identify a release/recording " +
95
+ "rather than a person — try an ISNI or name lookup.",
96
+ suggest_query_shape: "MBID | ISNI | creator name",
97
+ },
98
+ },
99
+ // ─────────────────────────────────────────────────────────────────
100
+ // B. Name-lookup — works
101
+ // ─────────────────────────────────────────────────────────────────
102
+ {
103
+ question: "who wrote X?",
104
+ synonyms: [
105
+ "who composed X?",
106
+ "writers of X",
107
+ "songwriters for X",
108
+ "credits for song X",
109
+ ],
110
+ resolves_to: { kind: "tool", name: "directory_lookup_work" },
111
+ clean_empty_state: {
112
+ message: "No work matched that title. The song may not be in our index " +
113
+ "yet, or the title may be ambiguous (many works share the same " +
114
+ "title) — try a writer name or year of release.",
115
+ suggest_query_shape: "title + writer | title + year | ISWC if known",
116
+ },
117
+ },
118
+ {
119
+ question: "find me song X",
120
+ synonyms: ["look up song X by title", "is there a song called X?"],
121
+ resolves_to: { kind: "tool", name: "directory_lookup_work" },
122
+ clean_empty_state: {
123
+ message: "No work matched that title in our index. Try refining with the " +
124
+ "writer's name, year of release, or the ISWC if you have it.",
125
+ suggest_query_shape: "title + writer | title + year | ISWC if known",
126
+ },
127
+ },
128
+ {
129
+ question: "tell me about song X",
130
+ synonyms: [
131
+ "show me song X",
132
+ "what do you know about song X?",
133
+ "details for song X",
134
+ ],
135
+ resolves_to: { kind: "tool", name: "directory_lookup_work" },
136
+ },
137
+ {
138
+ question: "find recordings of X",
139
+ synonyms: [
140
+ "versions of X",
141
+ "covers of X",
142
+ "who recorded X?",
143
+ "list recordings of song X",
144
+ ],
145
+ // Disambiguation routes through directory_lookup_work first so the
146
+ // agent can pick the right work-row; recordings then come from the
147
+ // work-detail response. NEVER directory_search_recordings — that
148
+ // tool is audio-feature-only despite the verb match.
149
+ disambiguation: {
150
+ ambiguous_terms: AMBIGUOUS_NAMES,
151
+ resolver_tool: "directory_lookup_work",
152
+ resolver_intent: "Call directory_lookup_work first to identify the work " +
153
+ "(multiple works may share the title); then read the recordings[] " +
154
+ "field from the work-detail response. If the user typed an " +
155
+ "ISRC-shaped string, call directory_lookup_isrc instead. " +
156
+ "DO NOT call directory_search_recordings — that tool is for " +
157
+ "audio-feature filters (BPM/key/energy), not recording lookup.",
158
+ },
159
+ resolves_to: { kind: "tool", name: "directory_lookup_work" },
160
+ },
161
+ // ─────────────────────────────────────────────────────────────────
162
+ // C. Name-lookup — people (heavy disambiguation)
163
+ // ─────────────────────────────────────────────────────────────────
164
+ {
165
+ question: "find Bowie's songs",
166
+ synonyms: [
167
+ "songs by X",
168
+ "X discography",
169
+ "X's catalog",
170
+ "what has X written?",
171
+ ],
172
+ disambiguation: {
173
+ ambiguous_terms: AMBIGUOUS_NAMES,
174
+ resolver_tool: "directory_lookup_person",
175
+ resolver_intent: "Call directory_lookup_person first to surface candidate persons " +
176
+ "(many stage names map to multiple creators); ask the user to " +
177
+ "pick one before calling directory_list_works with the resolved " +
178
+ "person ID.",
179
+ },
180
+ resolves_to: { kind: "tool", name: "directory_list_works" },
181
+ },
182
+ {
183
+ question: "who is creator X?",
184
+ synonyms: [
185
+ "find creator X",
186
+ "look up artist by name",
187
+ "find the songwriter X",
188
+ ],
189
+ disambiguation: {
190
+ ambiguous_terms: AMBIGUOUS_NAMES,
191
+ resolver_tool: "directory_lookup_person",
192
+ resolver_intent: "Call directory_lookup_person; if the response shows multiple " +
193
+ "candidates (common for stage names), surface them and let the " +
194
+ "user pick before any follow-up call.",
195
+ },
196
+ resolves_to: { kind: "tool", name: "directory_lookup_person" },
197
+ },
198
+ {
199
+ question: "tell me about creator X",
200
+ synonyms: [
201
+ "show me creator X",
202
+ "what do you know about creator X?",
203
+ "details for creator X",
204
+ "what's X's catalog?",
205
+ ],
206
+ resolves_to: { kind: "tool", name: "directory_lookup_person" },
207
+ },
208
+ {
209
+ question: "who performs this song?",
210
+ synonyms: [
211
+ "who recorded this version?",
212
+ "performers of this recording",
213
+ "artist on this ISRC",
214
+ ],
215
+ resolves_to: { kind: "tool", name: "directory_lookup_isrc" },
216
+ clean_empty_state: {
217
+ message: "No recording matched that identifier. If you have a song title " +
218
+ "instead of an ISRC, look up the work and read its recordings " +
219
+ "list. Performer credits surface there per recording.",
220
+ suggest_query_shape: "ISRC | work title + artist",
221
+ },
222
+ },
223
+ // ─────────────────────────────────────────────────────────────────
224
+ // D. Discovery-traversal / chain (graph shape)
225
+ // ─────────────────────────────────────────────────────────────────
226
+ {
227
+ question: "show me the rights chain for X",
228
+ synonyms: [
229
+ "full graph for X",
230
+ "rights chain on this song",
231
+ "what's the chain for X?",
232
+ ],
233
+ resolves_to: { kind: "tool", name: "directory_chain" },
234
+ },
235
+ {
236
+ question: "give me everything on this song",
237
+ synonyms: [
238
+ "everything we know about this work",
239
+ "what's the full picture for X?",
240
+ "full picture for X",
241
+ "the whole graph for X",
242
+ ],
243
+ resolves_to: { kind: "tool", name: "directory_chain" },
244
+ },
245
+ {
246
+ question: "trace the chain from this writer to that work",
247
+ synonyms: [
248
+ "how is X connected to Y?",
249
+ "trace this credit",
250
+ "show the connection between X and Y",
251
+ ],
252
+ resolves_to: { kind: "tool", name: "directory_chain" },
253
+ },
254
+ // ─────────────────────────────────────────────────────────────────
255
+ // E. Browse / filter
256
+ // ─────────────────────────────────────────────────────────────────
257
+ {
258
+ question: "list works in PICA",
259
+ synonyms: [
260
+ "browse the catalog",
261
+ "what works are in the directory?",
262
+ "show me all works",
263
+ ],
264
+ resolves_to: { kind: "tool", name: "directory_list_works" },
265
+ },
266
+ {
267
+ question: "works starting with B",
268
+ synonyms: [
269
+ "list works starting with letter X",
270
+ "browse catalog by first letter",
271
+ "alphabetical work browse",
272
+ ],
273
+ resolves_to: {
274
+ kind: "tool",
275
+ name: "directory_list_works",
276
+ default_args: { letter: "B" },
277
+ },
278
+ },
279
+ {
280
+ question: "find works by publisher X",
281
+ synonyms: [
282
+ "list publisher X's works",
283
+ "what's in publisher X's catalog?",
284
+ "publisher catalog browse",
285
+ ],
286
+ resolves_to: { kind: "tool", name: "directory_list_works" },
287
+ },
288
+ {
289
+ question: "find works by label X",
290
+ synonyms: [
291
+ "list label X's recordings",
292
+ "what's on label X?",
293
+ "label catalog browse",
294
+ ],
295
+ resolves_to: { kind: "tool", name: "directory_list_works" },
296
+ },
297
+ {
298
+ question: "list creators in PICA",
299
+ synonyms: [
300
+ "browse the people directory",
301
+ "what creators are in the directory?",
302
+ "show me all creators",
303
+ ],
304
+ resolves_to: { kind: "tool", name: "directory_list_people" },
305
+ },
306
+ {
307
+ question: "people starting with B",
308
+ synonyms: [
309
+ "list creators starting with letter X",
310
+ "browse creators by first letter",
311
+ "alphabetical people browse",
312
+ ],
313
+ resolves_to: {
314
+ kind: "tool",
315
+ name: "directory_list_people",
316
+ default_args: { letter: "B" },
317
+ },
318
+ },
319
+ // ─────────────────────────────────────────────────────────────────
320
+ // F. Audio-feature search (sync licensing — distinct from text search)
321
+ // ─────────────────────────────────────────────────────────────────
322
+ {
323
+ question: "find upbeat tracks around 120 BPM",
324
+ synonyms: [
325
+ "find tracks at X BPM",
326
+ "find energetic music for sync",
327
+ "tracks with high energy",
328
+ ],
329
+ resolves_to: { kind: "tool", name: "directory_search_recordings" },
330
+ },
331
+ {
332
+ question: "find instrumental tracks in C minor",
333
+ synonyms: [
334
+ "tracks in [key]",
335
+ "instrumental tracks for sync",
336
+ "find moody music in a minor key",
337
+ ],
338
+ resolves_to: { kind: "tool", name: "directory_search_recordings" },
339
+ },
340
+ {
341
+ question: "tracks at X BPM in [key]",
342
+ synonyms: [
343
+ "find music matching tempo and key",
344
+ "audio-feature search for sync",
345
+ "filter recordings by audio characteristics",
346
+ ],
347
+ resolves_to: { kind: "tool", name: "directory_search_recordings" },
348
+ },
349
+ // ─────────────────────────────────────────────────────────────────
350
+ // G. Cross-type search (entity type unknown)
351
+ // ─────────────────────────────────────────────────────────────────
352
+ {
353
+ question: "find me X",
354
+ synonyms: [
355
+ "is there anything about X in the directory?",
356
+ "find any record of X",
357
+ "search the directory for X",
358
+ ],
359
+ resolves_to: { kind: "tool", name: "directory_search" },
360
+ clean_empty_state: {
361
+ message: "No matches in our public directory. The work, creator, or " +
362
+ "recording may not be mirrored from a society we cover yet, or " +
363
+ "the spelling may differ — try an identifier (ISWC / ISRC / IPI) " +
364
+ "if you have one.",
365
+ suggest_query_shape: "name + role | identifier (ISWC/ISRC/IPI/ISNI) | title + writer",
366
+ },
367
+ },
368
+ {
369
+ question: "who or what is X?",
370
+ synonyms: [
371
+ "is X a song or a person?",
372
+ "what kind of thing is X?",
373
+ "fan-out search for X",
374
+ ],
375
+ resolves_to: { kind: "tool", name: "directory_search" },
376
+ clean_empty_state: {
377
+ message: "No matches in our public directory across works or creators. " +
378
+ "Try narrowing to one entity type (work title or creator name), " +
379
+ "or supply an identifier if you have one.",
380
+ suggest_query_shape: "title + writer | creator name + role | identifier",
381
+ },
382
+ },
383
+ // ─────────────────────────────────────────────────────────────────
384
+ // H. Registration / status (specialised lookups)
385
+ // ─────────────────────────────────────────────────────────────────
386
+ {
387
+ question: "is this song registered?",
388
+ synonyms: [
389
+ "is X in PICA?",
390
+ "is this work known?",
391
+ "registration status of X",
392
+ "is the ISWC issued for X?",
393
+ ],
394
+ resolves_to: { kind: "tool", name: "directory_lookup_work" },
395
+ clean_empty_state: {
396
+ message: "We don't have this work in our directory. That can mean it's " +
397
+ "unregistered, registered with a society we don't mirror, or the " +
398
+ "title is ambiguous. Try a writer name or year to narrow, or " +
399
+ "look up by ISWC if you have one.",
400
+ suggest_query_shape: "title + writer | title + year | ISWC if known",
401
+ },
402
+ },
403
+ {
404
+ // ADR-140 Phase 2b — skill discovery meta-questions.
405
+ // Routes to directory_skill_list so an external LLM connecting to the
406
+ // directory MCP via Anthropic's MCP Directory or ChatGPT Apps catalogue
407
+ // can ask "what can this server do?" and get a list of named
408
+ // methodologies (find-music-for-sync-brief, etc.) rather than having
409
+ // to read the full 9-tool surface description-by-description.
410
+ question: "what skills do you have?",
411
+ synonyms: [
412
+ "what can you do?",
413
+ "show me your methodologies",
414
+ "how do I find music here?",
415
+ "how do I use this directory?",
416
+ "what workflows are available?",
417
+ ],
418
+ resolves_to: { kind: "tool", name: "directory_skill_list" },
419
+ },
420
+ // ─────────────────────────────────────────────────────────────────
421
+ // Directory-surface self-introspection — what shipped in this MCP
422
+ // ─────────────────────────────────────────────────────────────────
423
+ {
424
+ question: "what's new in the directory mcp",
425
+ synonyms: [
426
+ "what changed in the directory",
427
+ "directory release notes",
428
+ "what version is the directory on",
429
+ "directory changelog",
430
+ ],
431
+ resolves_to: { kind: "tool", name: "directory_release_notes" },
432
+ },
433
+ ];
434
+ //# sourceMappingURL=public-question-atlas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-question-atlas.js","sourceRoot":"","sources":["../../src/prompts/public-question-atlas.ts"],"names":[],"mappings":"AAAA,6DAA6D;AA8G7D;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,eAAe,GAAa;IACvC,OAAO;IACP,MAAM;IACN,SAAS;IACT,MAAM;IACN,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,OAAO;IACP,KAAK;CACN,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,oEAAoE;IACpE,8DAA8D;IAC9D,o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Q,EAAE,0BAA0B;QACpC,QAAQ,EAAE;YACR,kBAAkB;YAClB,4BAA4B;YAC5B,2BAA2B;YAC3B,8BAA8B;YAC9B,+BAA+B;SAChC;QACD,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,EAAE;KAC5D;IAED,oEAAoE;IACpE,kEAAkE;IAClE,oEAAoE;IACpE;QACE,QAAQ,EAAE,iCAAiC;QAC3C,QAAQ,EAAE;YACR,+BAA+B;YAC/B,yBAAyB;YACzB,kCAAkC;YAClC,qBAAqB;SACtB;QACD,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,EAAE;KAC/D;CACF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const DIRECTORY_PRIMER = "# PICA Directory \u2014 Public Music Catalog Search\n\nRead-only access to published music catalog data. No authentication required.\nWorks and people are only visible if the owning organisation has opted into\nthe directory.\n\n## First Connection\n\nIf you're not sure where to start, invoke the **directory-autopilot** prompt.\nIt asks what you need and routes to the right workflow: sync search, rights\nresearch, or identifier lookup.\n\n## What You Can Do\n- Search works by title, ISWC, publisher, label\n- Search people by name, ISNI, IPI\n- Look up works by recording ISRC (directory_lookup_isrc)\n- Search recordings by audio characteristics (BPM, key, mood, energy)\n\n## What You Cannot Do\n- Create, update, or delete anything (read-only)\n- Access unpublished works or private catalog data\n- See financial data, agreements, or internal metadata\n\n## Entity Model\n- **Work**: composition with title, ISWC, credits, recordings\n- **Person**: writer/composer/performer with IPI, ISNI identifiers\n- **Recording**: audio capture with ISRC, linked to one work\n\n## Recommended Flow\n1. directory_search (broad text search across works + people)\n2. directory_lookup_work or directory_lookup_person (detailed view)\n3. directory_search_recordings (audio characteristic search for sync)\n";
2
+ //# sourceMappingURL=llms-primer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llms-primer.d.ts","sourceRoot":"","sources":["../../src/resources/llms-primer.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB,wxCAgC5B,CAAC"}
@@ -0,0 +1,35 @@
1
+ // Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
2
+ export const DIRECTORY_PRIMER = `# PICA Directory — Public Music Catalog Search
3
+
4
+ Read-only access to published music catalog data. No authentication required.
5
+ Works and people are only visible if the owning organisation has opted into
6
+ the directory.
7
+
8
+ ## First Connection
9
+
10
+ If you're not sure where to start, invoke the **directory-autopilot** prompt.
11
+ It asks what you need and routes to the right workflow: sync search, rights
12
+ research, or identifier lookup.
13
+
14
+ ## What You Can Do
15
+ - Search works by title, ISWC, publisher, label
16
+ - Search people by name, ISNI, IPI
17
+ - Look up works by recording ISRC (directory_lookup_isrc)
18
+ - Search recordings by audio characteristics (BPM, key, mood, energy)
19
+
20
+ ## What You Cannot Do
21
+ - Create, update, or delete anything (read-only)
22
+ - Access unpublished works or private catalog data
23
+ - See financial data, agreements, or internal metadata
24
+
25
+ ## Entity Model
26
+ - **Work**: composition with title, ISWC, credits, recordings
27
+ - **Person**: writer/composer/performer with IPI, ISNI identifiers
28
+ - **Recording**: audio capture with ISRC, linked to one work
29
+
30
+ ## Recommended Flow
31
+ 1. directory_search (broad text search across works + people)
32
+ 2. directory_lookup_work or directory_lookup_person (detailed view)
33
+ 3. directory_search_recordings (audio characteristic search for sync)
34
+ `;
35
+ //# sourceMappingURL=llms-primer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"llms-primer.js","sourceRoot":"","sources":["../../src/resources/llms-primer.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC/B,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { ServerConfig } from "./config.js";
2
+ export declare class DirectoryMcpServer {
3
+ private server;
4
+ private client;
5
+ private toolRegistry;
6
+ private promptRegistry;
7
+ private skillsRegistry;
8
+ private config;
9
+ private clientAttributionLogged;
10
+ constructor(config: ServerConfig);
11
+ private setupHandlers;
12
+ /**
13
+ * Emit a single stderr line per session naming the client that handshook
14
+ * with us — sourced from `clientInfo` on the MCP `initialize` request.
15
+ * Self-declared, NOT authenticated; treat as provenance metadata only.
16
+ *
17
+ * Directory MCP is unauthenticated and writes no audit rows, so this
18
+ * stderr breadcrumb is the only attribution surface today. When/if a
19
+ * directory audit pipeline lands, fold these values into McpAuditEntry
20
+ * (the wire shape already carries optional client_name + client_version).
21
+ */
22
+ private logClientAttributionOnce;
23
+ /**
24
+ * Resolve a skill:// URI. ADR-140 Phase 2b — SEP-2640 bridge pattern.
25
+ * Two URI shapes:
26
+ * - skill://withpica/index.json
27
+ * - skill://withpica/<name>/SKILL.md
28
+ */
29
+ private readSkillResource;
30
+ start(): Promise<void>;
31
+ stop(): Promise<void>;
32
+ }
33
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAQ3C,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,MAAM,CAAe;IAK7B,OAAO,CAAC,uBAAuB,CAAS;gBAE5B,MAAM,EAAE,YAAY;IA4BhC,OAAO,CAAC,aAAa;IA4GrB;;;;;;;;;OASG;IACH,OAAO,CAAC,wBAAwB;IAUhC;;;;;OAKG;IACH,OAAO,CAAC,iBAAiB;IAsDnB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAUtB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAI5B"}