@withpica/mcp-server 2.10.0 → 2.22.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.
- package/CHANGELOG.md +838 -0
- package/dist/config.d.ts +9 -9
- package/dist/index.d.ts +1 -1
- package/dist/prompts/index.d.ts +64 -64
- package/dist/resources/index.d.ts +53 -53
- package/dist/server.d.ts +49 -49
- package/dist/tools/agreement-types.d.ts.map +1 -1
- package/dist/tools/agreement-types.js +14 -128
- package/dist/tools/agreement-types.js.map +1 -1
- package/dist/tools/agreements.d.ts.map +1 -1
- package/dist/tools/agreements.js +11 -109
- package/dist/tools/agreements.js.map +1 -1
- package/dist/tools/app-tools.d.ts.map +1 -1
- package/dist/tools/app-tools.js +30 -8
- package/dist/tools/app-tools.js.map +1 -1
- package/dist/tools/assets.d.ts.map +1 -1
- package/dist/tools/assets.js +17 -257
- package/dist/tools/assets.js.map +1 -1
- package/dist/tools/audio-files.d.ts.map +1 -1
- package/dist/tools/audio-files.js +10 -2
- package/dist/tools/audio-files.js.map +1 -1
- package/dist/tools/bulk.d.ts +7 -1
- package/dist/tools/bulk.d.ts.map +1 -1
- package/dist/tools/bulk.js +24 -2
- package/dist/tools/bulk.js.map +1 -1
- package/dist/tools/collaborators.js +7 -7
- package/dist/tools/collaborators.js.map +1 -1
- package/dist/tools/credits.d.ts.map +1 -1
- package/dist/tools/credits.js +27 -13
- package/dist/tools/credits.js.map +1 -1
- package/dist/tools/custody.d.ts.map +1 -1
- package/dist/tools/custody.js +2 -1
- package/dist/tools/custody.js.map +1 -1
- package/dist/tools/discovery.d.ts.map +1 -1
- package/dist/tools/discovery.js +8 -0
- package/dist/tools/discovery.js.map +1 -1
- package/dist/tools/enrichment.d.ts +47 -0
- package/dist/tools/enrichment.d.ts.map +1 -1
- package/dist/tools/enrichment.js +418 -21
- package/dist/tools/enrichment.js.map +1 -1
- package/dist/tools/exports.d.ts.map +1 -1
- package/dist/tools/exports.js +5 -1
- package/dist/tools/exports.js.map +1 -1
- package/dist/tools/import.js +3 -3
- package/dist/tools/import.js.map +1 -1
- package/dist/tools/index.d.ts +88 -72
- package/dist/tools/labels.d.ts +20 -0
- package/dist/tools/labels.d.ts.map +1 -0
- package/dist/tools/labels.js +47 -0
- package/dist/tools/labels.js.map +1 -0
- package/dist/tools/metadata.d.ts.map +1 -1
- package/dist/tools/metadata.js +37 -0
- package/dist/tools/metadata.js.map +1 -1
- package/dist/tools/multimedia.d.ts.map +1 -1
- package/dist/tools/multimedia.js +86 -11
- package/dist/tools/multimedia.js.map +1 -1
- package/dist/tools/notes.d.ts.map +1 -1
- package/dist/tools/notes.js +4 -1
- package/dist/tools/notes.js.map +1 -1
- package/dist/tools/people.d.ts +38 -38
- package/dist/tools/projects.d.ts +1 -0
- package/dist/tools/projects.d.ts.map +1 -1
- package/dist/tools/projects.js +188 -17
- package/dist/tools/projects.js.map +1 -1
- package/dist/tools/publishers.d.ts +15 -1
- package/dist/tools/publishers.d.ts.map +1 -1
- package/dist/tools/publishers.js +43 -9
- package/dist/tools/publishers.js.map +1 -1
- package/dist/tools/recordings.d.ts +30 -30
- package/dist/tools/recovery-hints.d.ts.map +1 -1
- package/dist/tools/recovery-hints.js +49 -0
- package/dist/tools/recovery-hints.js.map +1 -1
- package/dist/tools/releases.d.ts +14 -1
- package/dist/tools/releases.d.ts.map +1 -1
- package/dist/tools/releases.js +247 -36
- package/dist/tools/releases.js.map +1 -1
- package/dist/tools/search.d.ts +20 -20
- package/dist/tools/sessions.d.ts.map +1 -1
- package/dist/tools/sessions.js +42 -8
- package/dist/tools/sessions.js.map +1 -1
- package/dist/tools/settings.d.ts +1 -0
- package/dist/tools/settings.d.ts.map +1 -1
- package/dist/tools/settings.js +51 -1
- package/dist/tools/settings.js.map +1 -1
- package/dist/tools/share-links.d.ts.map +1 -1
- package/dist/tools/share-links.js +19 -53
- package/dist/tools/share-links.js.map +1 -1
- package/dist/tools/split-sheets.d.ts.map +1 -1
- package/dist/tools/split-sheets.js +3 -42
- package/dist/tools/split-sheets.js.map +1 -1
- package/dist/tools/team.d.ts.map +1 -1
- package/dist/tools/team.js +9 -4
- package/dist/tools/team.js.map +1 -1
- package/dist/tools/uploads.d.ts.map +1 -1
- package/dist/tools/uploads.js +9 -2
- package/dist/tools/uploads.js.map +1 -1
- package/dist/tools/works.d.ts +38 -38
- package/package.json +1 -1
package/dist/tools/multimedia.js
CHANGED
|
@@ -74,17 +74,20 @@ export class MultimediaTools {
|
|
|
74
74
|
{
|
|
75
75
|
definition: {
|
|
76
76
|
name: "pica_multimedia_create",
|
|
77
|
-
description: "Create a multimedia item. Use for linking external content
|
|
77
|
+
description: "Create a multimedia item. Use for linking external content " +
|
|
78
|
+
"(YouTube, Spotify, SoundCloud URLs) or registering uploaded media. " +
|
|
79
|
+
"For actual file uploads use POST /api/admin/multimedia/upload instead; " +
|
|
80
|
+
"for YouTube videos with auto-enriched metadata use pica_multimedia_link_youtube.",
|
|
78
81
|
inputSchema: {
|
|
79
82
|
type: "object",
|
|
80
83
|
properties: {
|
|
81
84
|
title: {
|
|
82
85
|
type: "string",
|
|
83
|
-
description: "Title of the multimedia item",
|
|
86
|
+
description: "Title of the multimedia item.",
|
|
84
87
|
},
|
|
85
88
|
content_type: {
|
|
86
89
|
type: "string",
|
|
87
|
-
description: "Type of content",
|
|
90
|
+
description: "Type of content.",
|
|
88
91
|
enum: [
|
|
89
92
|
"uploaded_photo",
|
|
90
93
|
"uploaded_video",
|
|
@@ -97,11 +100,11 @@ export class MultimediaTools {
|
|
|
97
100
|
},
|
|
98
101
|
url: {
|
|
99
102
|
type: "string",
|
|
100
|
-
description: "URL of the media (YouTube URL, Spotify URI, SoundCloud URL, etc.)",
|
|
103
|
+
description: "URL of the media (YouTube URL, Spotify URI, SoundCloud URL, etc.).",
|
|
101
104
|
},
|
|
102
105
|
classification: {
|
|
103
106
|
type: "string",
|
|
104
|
-
description: "Classification of the content",
|
|
107
|
+
description: "Classification of the content.",
|
|
105
108
|
enum: [
|
|
106
109
|
"sync_placement",
|
|
107
110
|
"music_video",
|
|
@@ -114,19 +117,91 @@ export class MultimediaTools {
|
|
|
114
117
|
"general",
|
|
115
118
|
],
|
|
116
119
|
},
|
|
117
|
-
caption: {
|
|
118
|
-
type: "string",
|
|
119
|
-
description: "Caption or subtitle",
|
|
120
|
-
},
|
|
120
|
+
caption: { type: "string", description: "Caption or subtitle." },
|
|
121
121
|
description: {
|
|
122
122
|
type: "string",
|
|
123
|
-
description: "Detailed description",
|
|
123
|
+
description: "Detailed description.",
|
|
124
124
|
},
|
|
125
125
|
tags: {
|
|
126
126
|
type: "array",
|
|
127
|
-
description: "Tags for
|
|
127
|
+
description: "Tags for categorisation.",
|
|
128
128
|
items: { type: "string" },
|
|
129
129
|
},
|
|
130
|
+
credits: {
|
|
131
|
+
type: "string",
|
|
132
|
+
description: "Freeform credits string (e.g. 'Shot by Alice Nguyen, produced by Bob').",
|
|
133
|
+
},
|
|
134
|
+
duration_seconds: {
|
|
135
|
+
type: "number",
|
|
136
|
+
description: "Duration in seconds (for video / audio).",
|
|
137
|
+
},
|
|
138
|
+
// Collection / ordering / publish
|
|
139
|
+
collection_id: {
|
|
140
|
+
type: "string",
|
|
141
|
+
description: "Collection UUID — attach this item to a multimedia collection.",
|
|
142
|
+
},
|
|
143
|
+
display_order: {
|
|
144
|
+
type: "number",
|
|
145
|
+
description: "Sort position within its collection.",
|
|
146
|
+
},
|
|
147
|
+
is_featured: {
|
|
148
|
+
type: "boolean",
|
|
149
|
+
description: "Mark as featured — surfaces in prominent positions on artist portals and directory.",
|
|
150
|
+
},
|
|
151
|
+
is_published: {
|
|
152
|
+
type: "boolean",
|
|
153
|
+
description: "Publish to public surfaces on create. Default false; the service stamps `published_at` when this flips true.",
|
|
154
|
+
},
|
|
155
|
+
// Event / performance context (audit row 21 add-candidates)
|
|
156
|
+
venue: {
|
|
157
|
+
type: "string",
|
|
158
|
+
description: "Venue name (for live / performance content).",
|
|
159
|
+
},
|
|
160
|
+
event_name: {
|
|
161
|
+
type: "string",
|
|
162
|
+
description: "Event / tour / show name (for live / performance content).",
|
|
163
|
+
},
|
|
164
|
+
performance_date: {
|
|
165
|
+
type: "string",
|
|
166
|
+
description: "Date of the performance (YYYY-MM-DD) — used to timestamp live recordings.",
|
|
167
|
+
},
|
|
168
|
+
setlist_position: {
|
|
169
|
+
type: "number",
|
|
170
|
+
description: "Song's position in the performance setlist (1-indexed).",
|
|
171
|
+
},
|
|
172
|
+
sync_side: {
|
|
173
|
+
type: "string",
|
|
174
|
+
description: "Sync-side label for sync placements (e.g. 'master', 'publishing').",
|
|
175
|
+
},
|
|
176
|
+
// External identifiers (enrichment pipelines may overwrite)
|
|
177
|
+
spotify_url: {
|
|
178
|
+
type: "string",
|
|
179
|
+
description: "Spotify canonical URL.",
|
|
180
|
+
},
|
|
181
|
+
spotify_track_uri: {
|
|
182
|
+
type: "string",
|
|
183
|
+
description: "Spotify URI (spotify:track:…).",
|
|
184
|
+
},
|
|
185
|
+
spotify_track_id: {
|
|
186
|
+
type: "string",
|
|
187
|
+
description: "Spotify track ID (22 chars).",
|
|
188
|
+
},
|
|
189
|
+
youtube_url: {
|
|
190
|
+
type: "string",
|
|
191
|
+
description: "YouTube canonical URL.",
|
|
192
|
+
},
|
|
193
|
+
youtube_video_id: {
|
|
194
|
+
type: "string",
|
|
195
|
+
description: "YouTube video ID (e.g. 'dQw4w9WgXcQ').",
|
|
196
|
+
},
|
|
197
|
+
soundcloud_url: {
|
|
198
|
+
type: "string",
|
|
199
|
+
description: "SoundCloud canonical URL.",
|
|
200
|
+
},
|
|
201
|
+
thumbnail_url: {
|
|
202
|
+
type: "string",
|
|
203
|
+
description: "Externally-hosted thumbnail URL.",
|
|
204
|
+
},
|
|
130
205
|
},
|
|
131
206
|
required: ["title", "content_type"],
|
|
132
207
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multimedia.js","sourceRoot":"","sources":["../../src/tools/multimedia.ts"],"names":[],"mappings":"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ACd,WAAW,EAAE,gCAAgC;6BAC9C;yBACF;qBACF;iBACF;gBACD,QAAQ,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;aAC3C;YACD;gBACE,UAAU,EAAE;oBACV,IAAI,EAAE,wBAAwB;oBAC9B,WAAW,EACT
|
|
1
|
+
{"version":3,"file":"multimedia.js","sourceRoot":"","sources":["../../src/tools/multimedia.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAQ7D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEhE,MAAM,OAAO,eAAe;IAClB,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,wBAAwB;oBAC9B,WAAW,EACT,mLAAmL;oBACrL,WAAW,EAAE;wBACX,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,KAAK,EAAE;gCACL,IAAI,EAAE,QAAQ;gCACd,WAAW,EACT,yDAAyD;6BAC5D;4BACD,YAAY,EAAE;gCACZ,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,wBAAwB;gCACrC,IAAI,EAAE;oCACJ,gBAAgB;oCAChB,gBAAgB;oCAChB,gBAAgB;oCAChB,eAAe;oCACf,eAAe;oCACf,kBAAkB;oCAClB,kBAAkB;iCACnB;6BACF;4BACD,cAAc,EAAE;gCACd,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,0BAA0B;gCACvC,IAAI,EAAE;oCACJ,gBAAgB;oCAChB,aAAa;oCACb,mBAAmB;oCACnB,kBAAkB;oCAClB,gBAAgB;oCAChB,eAAe;oCACf,gBAAgB;oCAChB,iBAAiB;oCACjB,SAAS;iCACV;6BACF;4BACD,YAAY,EAAE;gCACZ,IAAI,EAAE,SAAS;gCACf,WAAW,EAAE,4BAA4B;6BAC1C;4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AAEA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAGtE,qBAAa,UAAU;IACrB,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;
|
|
1
|
+
{"version":3,"file":"notes.d.ts","sourceRoot":"","sources":["../../src/tools/notes.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAGtE,qBAAa,UAAU;IACrB,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;YAoF3D,SAAS;YAWT,OAAO;YAKP,UAAU;YAKV,UAAU;CAIzB"}
|
package/dist/tools/notes.js
CHANGED
|
@@ -52,7 +52,10 @@ export class NotesTools {
|
|
|
52
52
|
{
|
|
53
53
|
definition: {
|
|
54
54
|
name: "pica_notes_create",
|
|
55
|
-
description: "Add a note to the catalog. Notes can be linked to specific works or people, or stand alone as general observations. PICA auto-detects mentions of works and people in the note text."
|
|
55
|
+
description: "Add a note to the catalog. Notes can be linked to specific works or people, or stand alone as general observations. PICA auto-detects mentions of works and people in the note text. " +
|
|
56
|
+
"Stored as `assistant_memory` rows with type='note' — other assistant_memory columns " +
|
|
57
|
+
"(scope, type, key, confidence, source, expires_at, metadata) are service-managed by " +
|
|
58
|
+
"captureNote() and not settable from the tool surface.",
|
|
56
59
|
inputSchema: {
|
|
57
60
|
type: "object",
|
|
58
61
|
properties: {
|
package/dist/tools/notes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notes.js","sourceRoot":"","sources":["../../src/tools/notes.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAW7D,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE1E,MAAM,OAAO,UAAU;IACb,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,iBAAiB;oBACvB,WAAW,EACT,6HAA6H;oBAC/H,WAAW,EAAE;wBACX,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,CAAC,EAAE;gCACD,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,kCAAkC;6BAChD;4BACD,OAAO,EAAE;gCACP,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,wCAAwC;6BACtD;4BACD,SAAS,EAAE;gCACT,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,0CAA0C;6BACxD;4BACD,KAAK,EAAE;gCACL,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,0BAA0B;6BACxC;yBACF;qBACF;iBACF;gBACD,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;aACpC;YACD;gBACE,UAAU,EAAE;oBACV,IAAI,EAAE,gBAAgB;oBACtB,WAAW,EAAE,4BAA4B;oBACzC,WAAW,EAAE;wBACX,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE;yBAC/C;wBACD,QAAQ,EAAE,CAAC,IAAI,CAAC;qBACjB;iBACF;gBACD,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAA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AC;IAC7C,CAAC;IAEO,KAAK,CAAC,OAAO,CAAC,IAAyB;QAC7C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChD,OAAO,aAAa,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAC;IAC/C,CAAC;IAEO,KAAK,CAAC,UAAU,CAAC,IAAyB;QAChD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxD,OAAO,aAAa,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IAC3C,CAAC;IAEO,KAAK,CAAC,UAAU,CAAC,IAAyB;QAChD,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACtC,OAAO,aAAa,CAAC,QAAQ,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;IAClD,CAAC;CACF"}
|
package/dist/tools/people.d.ts
CHANGED
|
@@ -4,42 +4,42 @@
|
|
|
4
4
|
import { PicaClient } from "@withpica/mcp-sdk";
|
|
5
5
|
import { ToolDefinition, ToolExecutor } from "./index.js";
|
|
6
6
|
export declare class PeopleTools {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
7
|
+
private pica;
|
|
8
|
+
constructor(pica: PicaClient);
|
|
9
|
+
/**
|
|
10
|
+
* Get all people tools
|
|
11
|
+
*/
|
|
12
|
+
getTools(): Array<{
|
|
13
|
+
definition: ToolDefinition;
|
|
14
|
+
executor: ToolExecutor;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Query people — unified list + search
|
|
18
|
+
*/
|
|
19
|
+
private queryPeople;
|
|
20
|
+
/**
|
|
21
|
+
* Inspect person — unified get + get_full with section filtering
|
|
22
|
+
*/
|
|
23
|
+
private inspectPerson;
|
|
24
|
+
/**
|
|
25
|
+
* Create person
|
|
26
|
+
*/
|
|
27
|
+
private createPerson;
|
|
28
|
+
/**
|
|
29
|
+
* Update person
|
|
30
|
+
*/
|
|
31
|
+
private updatePerson;
|
|
32
|
+
/**
|
|
33
|
+
* Delete person
|
|
34
|
+
*/
|
|
35
|
+
private deletePerson;
|
|
36
|
+
/**
|
|
37
|
+
* Enrich from ISNI
|
|
38
|
+
*/
|
|
39
|
+
private enrichFromISNI;
|
|
40
|
+
/**
|
|
41
|
+
* Enrich from MusicBrainz
|
|
42
|
+
*/
|
|
43
|
+
private enrichFromMusicBrainz;
|
|
44
44
|
}
|
|
45
|
-
//# sourceMappingURL=people.d.ts.map
|
|
45
|
+
//# sourceMappingURL=people.d.ts.map
|
package/dist/tools/projects.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAGtE,qBAAa,aAAa;IACxB,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;
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAGtE,qBAAa,aAAa;IACxB,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;YAwQ3D,YAAY;YAQZ,UAAU;YAKV,aAAa;YAMb,aAAa;YAMb,aAAa;YAKb,WAAW;CAyC1B"}
|
package/dist/tools/projects.js
CHANGED
|
@@ -40,26 +40,74 @@ export class ProjectsTools {
|
|
|
40
40
|
{
|
|
41
41
|
definition: {
|
|
42
42
|
name: "pica_projects_create",
|
|
43
|
-
description: "Create a new project to organise
|
|
43
|
+
description: "Create a new project to organise collaborative work — writing camps, recording sessions, production/mixing/mastering milestones, retreats. " +
|
|
44
|
+
"To attach works to the project after creation, call POST /api/admin/projects/[id]/works — work_ids is not accepted here.",
|
|
44
45
|
inputSchema: {
|
|
45
46
|
type: "object",
|
|
46
47
|
properties: {
|
|
47
48
|
name: {
|
|
48
49
|
type: "string",
|
|
49
|
-
description: "Project name",
|
|
50
|
+
description: "Project name (required).",
|
|
50
51
|
},
|
|
51
52
|
project_type: {
|
|
52
53
|
type: "string",
|
|
53
|
-
description: "Type of project
|
|
54
|
+
description: "Type of project. Conventional values: writing_camp, recording_session, production, mixing, mastering, retreat, other. Defaults to writing_camp.",
|
|
54
55
|
},
|
|
55
56
|
description: {
|
|
56
57
|
type: "string",
|
|
57
|
-
description: "Optional project description",
|
|
58
|
+
description: "Optional project description.",
|
|
58
59
|
},
|
|
59
|
-
|
|
60
|
-
type: "
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
start_date: {
|
|
61
|
+
type: "string",
|
|
62
|
+
description: "Project start date (ISO YYYY-MM-DD). Used for scheduling and calendar display.",
|
|
63
|
+
},
|
|
64
|
+
end_date: {
|
|
65
|
+
type: "string",
|
|
66
|
+
description: "Project end date (ISO YYYY-MM-DD). Must be on or after start_date if both set.",
|
|
67
|
+
},
|
|
68
|
+
location_name: {
|
|
69
|
+
type: "string",
|
|
70
|
+
description: "Physical location name (e.g. 'Abbey Road Studio 2').",
|
|
71
|
+
},
|
|
72
|
+
location_address: {
|
|
73
|
+
type: "string",
|
|
74
|
+
description: "Street address of the location.",
|
|
75
|
+
},
|
|
76
|
+
location_url: {
|
|
77
|
+
type: "string",
|
|
78
|
+
description: "URL to a map or location page (e.g. Google Maps link).",
|
|
79
|
+
},
|
|
80
|
+
virtual_url: {
|
|
81
|
+
type: "string",
|
|
82
|
+
description: "Video-call / virtual-meeting URL for remote participation.",
|
|
83
|
+
},
|
|
84
|
+
is_open: {
|
|
85
|
+
type: "boolean",
|
|
86
|
+
description: "Whether the project is open for new participants to join via the invite code. Default: true.",
|
|
87
|
+
},
|
|
88
|
+
max_participants: {
|
|
89
|
+
type: "number",
|
|
90
|
+
description: "Maximum number of participants. Null / omitted = no cap.",
|
|
91
|
+
},
|
|
92
|
+
status: {
|
|
93
|
+
type: "string",
|
|
94
|
+
enum: [
|
|
95
|
+
"draft",
|
|
96
|
+
"scheduled",
|
|
97
|
+
"active",
|
|
98
|
+
"completed",
|
|
99
|
+
"cancelled",
|
|
100
|
+
],
|
|
101
|
+
description: "Project status. Default: draft.",
|
|
102
|
+
},
|
|
103
|
+
generate_invite_code: {
|
|
104
|
+
type: "boolean",
|
|
105
|
+
description: "If true, the service generates a unique invite code on create so participants can join. Default: false.",
|
|
106
|
+
},
|
|
107
|
+
metadata: {
|
|
108
|
+
type: "object",
|
|
109
|
+
additionalProperties: true,
|
|
110
|
+
description: "Optional freeform jsonb metadata (e.g. { notes, tags }).",
|
|
63
111
|
},
|
|
64
112
|
},
|
|
65
113
|
required: ["name"],
|
|
@@ -70,24 +118,68 @@ export class ProjectsTools {
|
|
|
70
118
|
{
|
|
71
119
|
definition: {
|
|
72
120
|
name: "pica_projects_update",
|
|
73
|
-
description: "Update project details
|
|
121
|
+
description: "Update project details. Any field from the Create schema can be updated. " +
|
|
122
|
+
"To attach or detach works from the project, call /api/admin/projects/[id]/works — work_ids is not accepted here.",
|
|
74
123
|
inputSchema: {
|
|
75
124
|
type: "object",
|
|
76
125
|
properties: {
|
|
77
|
-
id: { type: "string", description: "Project ID" },
|
|
78
|
-
name: { type: "string", description: "Updated project name" },
|
|
126
|
+
id: { type: "string", description: "Project ID (required)." },
|
|
127
|
+
name: { type: "string", description: "Updated project name." },
|
|
79
128
|
project_type: {
|
|
80
129
|
type: "string",
|
|
81
|
-
description: "Updated project type",
|
|
130
|
+
description: "Updated project type. Conventional values: writing_camp, recording_session, production, mixing, mastering, retreat, other.",
|
|
82
131
|
},
|
|
83
132
|
description: {
|
|
84
133
|
type: "string",
|
|
85
|
-
description: "Updated description",
|
|
134
|
+
description: "Updated description.",
|
|
86
135
|
},
|
|
87
|
-
|
|
88
|
-
type: "
|
|
89
|
-
|
|
90
|
-
|
|
136
|
+
start_date: {
|
|
137
|
+
type: "string",
|
|
138
|
+
description: "Updated start date (ISO YYYY-MM-DD).",
|
|
139
|
+
},
|
|
140
|
+
end_date: {
|
|
141
|
+
type: "string",
|
|
142
|
+
description: "Updated end date (ISO YYYY-MM-DD).",
|
|
143
|
+
},
|
|
144
|
+
location_name: {
|
|
145
|
+
type: "string",
|
|
146
|
+
description: "Updated location name.",
|
|
147
|
+
},
|
|
148
|
+
location_address: {
|
|
149
|
+
type: "string",
|
|
150
|
+
description: "Updated location address.",
|
|
151
|
+
},
|
|
152
|
+
location_url: {
|
|
153
|
+
type: "string",
|
|
154
|
+
description: "Updated location URL.",
|
|
155
|
+
},
|
|
156
|
+
virtual_url: {
|
|
157
|
+
type: "string",
|
|
158
|
+
description: "Updated virtual-meeting URL.",
|
|
159
|
+
},
|
|
160
|
+
is_open: {
|
|
161
|
+
type: "boolean",
|
|
162
|
+
description: "Whether the project is open for new participants.",
|
|
163
|
+
},
|
|
164
|
+
max_participants: {
|
|
165
|
+
type: "number",
|
|
166
|
+
description: "Updated participant cap.",
|
|
167
|
+
},
|
|
168
|
+
status: {
|
|
169
|
+
type: "string",
|
|
170
|
+
enum: [
|
|
171
|
+
"draft",
|
|
172
|
+
"scheduled",
|
|
173
|
+
"active",
|
|
174
|
+
"completed",
|
|
175
|
+
"cancelled",
|
|
176
|
+
],
|
|
177
|
+
description: "Updated project status.",
|
|
178
|
+
},
|
|
179
|
+
metadata: {
|
|
180
|
+
type: "object",
|
|
181
|
+
additionalProperties: true,
|
|
182
|
+
description: "Updated freeform jsonb metadata.",
|
|
91
183
|
},
|
|
92
184
|
},
|
|
93
185
|
required: ["id"],
|
|
@@ -109,6 +201,53 @@ export class ProjectsTools {
|
|
|
109
201
|
},
|
|
110
202
|
executor: this.deleteProject.bind(this),
|
|
111
203
|
},
|
|
204
|
+
{
|
|
205
|
+
definition: {
|
|
206
|
+
name: "pica_projects_attach_works",
|
|
207
|
+
description: "Attach one or more works to a project via the `project_works` " +
|
|
208
|
+
"junction. Closes the ADR-174 Phase 2 item 7 gap where " +
|
|
209
|
+
"`pica_projects_create` / `_update` rejected `work_ids` with " +
|
|
210
|
+
"FIELD_NOT_WIRED. Each item is attached with an individual POST " +
|
|
211
|
+
"so partial failure is surfaced per-work in the result — " +
|
|
212
|
+
"already-linked works are reported as `skipped` (not a hard " +
|
|
213
|
+
"error), and other failures surface their admin-route error " +
|
|
214
|
+
"message in `failed[]`.",
|
|
215
|
+
inputSchema: {
|
|
216
|
+
type: "object",
|
|
217
|
+
properties: {
|
|
218
|
+
project_id: {
|
|
219
|
+
type: "string",
|
|
220
|
+
description: "Project UUID.",
|
|
221
|
+
},
|
|
222
|
+
works: {
|
|
223
|
+
type: "array",
|
|
224
|
+
description: "Works to attach. Each: { work_id (required), project_day (optional integer >= 1), notes (optional string) }.",
|
|
225
|
+
items: {
|
|
226
|
+
type: "object",
|
|
227
|
+
properties: {
|
|
228
|
+
work_id: {
|
|
229
|
+
type: "string",
|
|
230
|
+
description: "Work UUID to attach.",
|
|
231
|
+
},
|
|
232
|
+
project_day: {
|
|
233
|
+
type: "number",
|
|
234
|
+
description: "Optional day number within the project (1-indexed).",
|
|
235
|
+
},
|
|
236
|
+
notes: {
|
|
237
|
+
type: "string",
|
|
238
|
+
description: "Optional notes about this attachment.",
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
required: ["work_id"],
|
|
242
|
+
},
|
|
243
|
+
minItems: 1,
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
required: ["project_id", "works"],
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
executor: this.attachWorks.bind(this),
|
|
250
|
+
},
|
|
112
251
|
];
|
|
113
252
|
}
|
|
114
253
|
async listProjects(args) {
|
|
@@ -136,5 +275,37 @@ export class ProjectsTools {
|
|
|
136
275
|
await this.pica.projects.delete(args.id);
|
|
137
276
|
return formatSuccess(`Project ${args.id} deleted`);
|
|
138
277
|
}
|
|
278
|
+
async attachWorks(args) {
|
|
279
|
+
const projectId = args.project_id;
|
|
280
|
+
const works = args.works ?? [];
|
|
281
|
+
const attached = [];
|
|
282
|
+
const skipped = [];
|
|
283
|
+
const failed = [];
|
|
284
|
+
for (const item of works) {
|
|
285
|
+
try {
|
|
286
|
+
const res = await this.pica.projects.attachWork(projectId, {
|
|
287
|
+
work_id: item.work_id,
|
|
288
|
+
project_day: item.project_day ?? null,
|
|
289
|
+
notes: item.notes ?? null,
|
|
290
|
+
});
|
|
291
|
+
attached.push({
|
|
292
|
+
work_id: item.work_id,
|
|
293
|
+
project_work_id: res?.data?.id ?? res?.id ?? "",
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
catch (err) {
|
|
297
|
+
const message = err?.message ?? (typeof err === "string" ? err : "unknown error");
|
|
298
|
+
if (/already linked/i.test(message)) {
|
|
299
|
+
skipped.push({ work_id: item.work_id, reason: "already_linked" });
|
|
300
|
+
}
|
|
301
|
+
else {
|
|
302
|
+
failed.push({ work_id: item.work_id, error: message });
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
return formatSuccess(`Attached ${attached.length}/${works.length} work(s) to project ${projectId}` +
|
|
307
|
+
(skipped.length ? ` — ${skipped.length} skipped` : "") +
|
|
308
|
+
(failed.length ? ` — ${failed.length} failed` : ""), { project_id: projectId, attached, skipped, failed });
|
|
309
|
+
}
|
|
139
310
|
}
|
|
140
311
|
//# sourceMappingURL=projects.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAQ7D,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE1E,MAAM,OAAO,aAAa;IAChB,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,oBAAoB;oBAC1B,WAAW,EACT,wEAAwE;oBAC1E,WAAW,EAAE;wBACX,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,KAAK,EAAE;gCACL,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,oCAAoC;6BAClD;yBACF;qBACF;iBACF;gBACD,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC;aACvC;YACD;gBACE,UAAU,EAAE;oBACV,IAAI,EAAE,mBAAmB;oBACzB,WAAW,EAAE,6CAA6C;oBAC1D,WAAW,EAAE;wBACX,IAAI,EAAE,Q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ools for querying and creating publisher records
|
|
2
|
+
* Publishers Tools - MCP tools for querying and creating publisher records.
|
|
3
|
+
*
|
|
4
|
+
* ADR-174 Phase 2 item 22: `pica_publishers_create` is stdio-only (no
|
|
5
|
+
* mcp-server-business counterpart) so the schema lives inline rather than
|
|
6
|
+
* going through `@withpica/mcp-utils/write-schemas`. The route-layer
|
|
7
|
+
* allow-list at `lib/services/publishers-write-constants.ts` is the
|
|
8
|
+
* authoritative enforcement boundary; this schema is the agent-facing
|
|
9
|
+
* contract and surfaces the same shape so the tool advertises every
|
|
10
|
+
* writable column on `global_publishers`.
|
|
11
|
+
*
|
|
12
|
+
* Pre-slice the schema accepted `{ name, ipi }` and every other DB
|
|
13
|
+
* column was invisible to agents. Post-slice all 8 audit-row-22
|
|
14
|
+
* Add-candidates are exposed, and the `ipi → ipi_number` rename is
|
|
15
|
+
* explicit (the route returns a PHANTOM_FIELD error with a rename hint
|
|
16
|
+
* if `ipi` is still sent).
|
|
3
17
|
*/
|
|
4
18
|
import { PicaClient } from "@withpica/mcp-sdk";
|
|
5
19
|
import { ToolDefinition, ToolExecutor } from "./index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publishers.d.ts","sourceRoot":"","sources":["../../src/tools/publishers.ts"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"publishers.d.ts","sourceRoot":"","sources":["../../src/tools/publishers.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAGtE,qBAAa,eAAe;IAC1B,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;YAwF3D,eAAe;YAaf,eAAe;CAQ9B"}
|