@withpica/mcp-server 2.22.0 → 2.24.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 +43 -0
- package/dist/config.d.ts +10 -9
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +10 -7
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/prompts/index.d.ts +64 -64
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +3 -1
- package/dist/prompts/index.js.map +1 -1
- package/dist/resources/index.d.ts +53 -53
- package/dist/server-instructions.d.ts +1 -1
- package/dist/server-instructions.d.ts.map +1 -1
- package/dist/server-instructions.js +13 -15
- package/dist/server-instructions.js.map +1 -1
- package/dist/server.d.ts +49 -49
- package/dist/tools/agent-identity.d.ts +36 -0
- package/dist/tools/agent-identity.d.ts.map +1 -0
- package/dist/tools/agent-identity.js +269 -0
- package/dist/tools/agent-identity.js.map +1 -0
- package/dist/tools/agreements.d.ts.map +1 -1
- package/dist/tools/agreements.js +6 -2
- package/dist/tools/agreements.js.map +1 -1
- package/dist/tools/audit.d.ts +19 -0
- package/dist/tools/audit.d.ts.map +1 -0
- package/dist/tools/audit.js +57 -0
- package/dist/tools/audit.js.map +1 -0
- package/dist/tools/discovery.d.ts.map +1 -1
- package/dist/tools/discovery.js +17 -0
- package/dist/tools/discovery.js.map +1 -1
- package/dist/tools/enrichment.d.ts.map +1 -1
- package/dist/tools/enrichment.js +13 -1
- package/dist/tools/enrichment.js.map +1 -1
- package/dist/tools/feedback.d.ts +22 -0
- package/dist/tools/feedback.d.ts.map +1 -0
- package/dist/tools/feedback.js +99 -0
- package/dist/tools/feedback.js.map +1 -0
- package/dist/tools/gap-hints.d.ts +53 -0
- package/dist/tools/gap-hints.d.ts.map +1 -0
- package/dist/tools/gap-hints.js +245 -0
- package/dist/tools/gap-hints.js.map +1 -0
- package/dist/tools/index.d.ts +72 -88
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +34 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/integrations.d.ts +5 -1
- package/dist/tools/integrations.d.ts.map +1 -1
- package/dist/tools/integrations.js +44 -25
- package/dist/tools/integrations.js.map +1 -1
- package/dist/tools/metadata.d.ts.map +1 -1
- package/dist/tools/metadata.js +265 -0
- package/dist/tools/metadata.js.map +1 -1
- package/dist/tools/notes.d.ts.map +1 -1
- package/dist/tools/notes.js +1 -1
- package/dist/tools/notes.js.map +1 -1
- package/dist/tools/people.d.ts +262 -38
- package/dist/tools/people.d.ts.map +1 -1
- package/dist/tools/people.js +258 -265
- package/dist/tools/people.js.map +1 -1
- package/dist/tools/recordings.d.ts +82 -31
- package/dist/tools/recordings.d.ts.map +1 -1
- package/dist/tools/recordings.js +186 -123
- package/dist/tools/recordings.js.map +1 -1
- package/dist/tools/releases.d.ts +5 -0
- package/dist/tools/releases.d.ts.map +1 -1
- package/dist/tools/releases.js +295 -0
- package/dist/tools/releases.js.map +1 -1
- package/dist/tools/search.d.ts +20 -20
- package/dist/tools/settings.d.ts +5 -0
- package/dist/tools/settings.d.ts.map +1 -1
- package/dist/tools/settings.js +197 -1
- package/dist/tools/settings.js.map +1 -1
- package/dist/tools/works.d.ts +65 -39
- package/dist/tools/works.d.ts.map +1 -1
- package/dist/tools/works.js +125 -220
- package/dist/tools/works.js.map +1 -1
- package/package.json +3 -2
- package/server.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,49 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
11
11
|
|
|
12
12
|
## [Unreleased]
|
|
13
13
|
|
|
14
|
+
## [2.24.0] - 2026-04-21
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **`pica_integrations_status` no longer tells users to "connect Spotify".** Two real-user failures on Claude Desktop (2026-04-21) traced back to the tool lumping platform-level Spotify/YouTube (PICA has its own credentials; no per-user OAuth exists or has ever existed) into the same "Available to connect" list as genuine user-OAuth peer connectors (Google/Notion/Airtable/Telegram). Failure modes observed: (1) user pasted a Spotify track URL → agent replied "head to your Pica dashboard and add Spotify as an integration"; (2) user asked "what songs do I have in pica" with a catalog holding 1 work → agent replied "you currently have no connections set up in Pica — so there are no songs or any other data accessible." Reshape: the tool now returns `peerConnectors` (the 4 actual OAuth services) separately from `platformReads` (Spotify, YouTube, MusicBrainz, MLC, ISNI, Discogs, with the tool name for each). Summary leads with "PICA catalog is ALWAYS accessible via pica_works_query, pica_people_query, pica_dashboard_briefing, pica_search_all — no setup required." The dead `connectedProviders.includes("spotify")` check that could never evaluate true was removed.
|
|
19
|
+
- **Server instructions: catalog-is-always-accessible guidance.** Handshake now explicitly states (a) the catalog is always accessible via the read tools with zero setup, (b) `pica_integrations_status` showing "0 connected" refers to optional peer connectors, NOT the catalog — call `pica_works_query` to check, (c) Spotify/YouTube URLs go through `pica_import_streaming_link` / `pica_import_youtube_link` directly; no per-user Spotify/YouTube OAuth exists to set up, do not tell the user to "connect Spotify in your dashboard". Replaces earlier copy that left the agent free to hallucinate a dashboard-integration flow. `lib/mcp/server-instructions.ts` parity copy updated in lockstep; the HTTP transport at `/api/mcp` picks up the new text on next handshake without requiring a redeploy of this package. Under the 2000-char token budget at 1833 chars.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- **ADR-180 Phase 3: full TOOL_METADATA coverage.** 29 tools retrofitted in `mcp-server/src/tools/metadata.ts` across eight family-scoped commits — resolve (3), cascade (3), enrichment proposals (4), collaborators (4), notify-user scheduling (3), physical-assets links (4), misc singletons (5), and the ADR-185 Part 1 agent-identity drift (3). `scripts/mcp-tool-lint-baseline.json` is deleted; MCP Tool Lint now runs in fully-strict mode. No behaviour change — tool discovery, audit categorisation, and risk-tier gating now classify the same 29 tools they couldn't classify before. `credits_required` deliberately omitted from new entries (credit gating is a no-op pass-through since ADR-162). Retry-safety follows ADR-180's `risk × retry_safe` table — e.g. `pica_enrichment_proposal_apply` is `retry_safe: false` (writes to entity columns), `_reject` is `retry_safe: true` (content-hash suppression is set-once). ADR-180 flipped from `Proposed` to `Accepted`.
|
|
24
|
+
- **ADR-193 Surfaces 1+3: peer-connector coaching + URI source conventions (server-instructions addendum).** Handshake copy coaches agents to check peer MCPs (email / drive / notes / calendar / DAW) before asking users to paste or type data, and to cite findings via `pica_enrichment_propose` `sources[].url` using URI schemes — `gmail://` `gdrive://` `notion://` `file://` `telegram://` `calendar://` `daw://` `user://` `web://`. See `docs/mcp-source-uri-conventions.md` in the main repo for shapes. First concrete build for ADR-190 Principles 2 + 3 (Agent-Mediated Source Discovery). A latent HTTP-transport gap was fixed in the same develop commit (`63eef17f8`) — `/api/mcp/route.ts` was not wiring `SERVER_INSTRUCTIONS` into its Server constructor, so remote agentic clients (ChatGPT Apps, Claude Desktop remote, Cursor) saw zero coaching. The stdio transport in this package was always serving instructions correctly; only the remote transport was affected.
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- **ADR-193 Surface 2: `gap_hints` envelope on 4 read tools.** `pica_works_inspect`, `pica_agreements_inspect`, `pica_people_inspect`, and `pica_enrichment_proposals_list` now emit an optional `gap_hints[]` field on `structuredContent` when a real gap is present. Each hint is capability-named (ADR-190 Principle 2 — `email_search` / `drive_search` / `filesystem_search` / `notes_search` / `calendar_search` / `web_search`, never vendor names), carries a concrete `query_shape`, and pre-fills the `then_call: "pica_enrichment_propose"` with the exact `then_args_shape` the agent should emit back (including URI-citation scaffolding from Surface 3). Gated by `MCP_GAP_HINTS_ENABLED=1` — off by default in prod. Empty array / omitted envelope when there's no real gap. Flat additive — the existing `CompletionHint` pipeline on `works_inspect` is untouched. Bundled: `enrich-metadata` prompt references the peer-connector pattern and points the agent at `gap_hints`.
|
|
29
|
+
- **ADR-185 Part 1: three new session-auth-only tools.** `pica_create_agent_identity`, `pica_issue_agent_grant`, `pica_list_my_agent_grants`. Back a user-issued agent-identity + scoped-grant primitive — the substrate for Parts 2 (settings UI) and 3 (per-write provenance stamping). All three require `write:agent_identity` scope AND session-auth (raw API key / OAuth); the HTTP MCP dispatcher refuses `pica_grant_` callers with a structured `reason: "session_auth_required"` error before execution per AC 12. Subject is always the authenticated user — caller-supplied `user_id` is dropped per ADR-184 rule 2 / ADR-185 rule 1. Grant tokens use the format `pica_grant_<64 hex>` and are hashed at rest with HMAC-SHA256 + `API_KEY_HASH_PEPPER` (same scheme as api_keys per ADR-185 line 193 + ADR-167 D-5).
|
|
30
|
+
- **ADR-185 Part 2: two new session-auth-only tools.** `pica_revoke_agent_grant` (DELETE `/admin/agent-grants/:id`, idempotent, 404 masks ownership failures) and `pica_get_agent_activity` (GET `/admin/agent-activity`, paginated, optionally filtered by identity or grant). Both appended to `SESSION_AUTH_ONLY_TOOLS` in the HTTP MCP dispatcher and to the `write:agent_identity` scope bucket. Together with the Part 1 trio this completes the five-tool agent-identity surface the ADR Scope requires. Revocation takes effect on the next request (AC: within 60s — `resolveGrantToken` checks `revoked_at` on every call, no cache layer).
|
|
31
|
+
- **ADR-185 Part 3 passes 1-5: agent-action provenance stamping wraps 27 write-tool families.** Part 3 layers two complementary wrappers over existing write tools so every per-grant write records a row in `mcp_agent_actions` for audit + revoke-replay. `withAgentActionStamp` (compensation-after): handler runs, stamps; on stamp failure, compensation undoes the write via captured prior state — used for creates and updates (soft-delete families get meaningful delete compensation — flip `is_deleted` back). `withAgentActionStampFirst` (stamp-first, pass 4): stamp commits BEFORE the destructive op; stamp-ok + handler-fail logs a "ghost stamp" at error level — used for hard-delete families where compensation is impossible. Both wrappers are no-ops when the caller is not an agent grant (session-auth / raw API key writes are unaffected). Families covered across the five passes: works/recordings/people/agreements/releases/notes creates; notes_delete; sessions_create; share_links_create; projects_create; multimedia_create; recording_splits_create; works_update; recordings_update; people_update; agreements_update; projects_update; notes_update; releases_update; people_delete; publishers_create; the six hard-delete families (works/recordings/agreements/projects/sessions/releases) via the stamp-first variant; and pass 5's `pica_projects_attach_works` (project_works insert wrapped, GET + POST migrated from `requireAuth` + `getUserProfile` to `withOrgContext` for consistency). `pica_sessions_update` remains deferred — action-branching route (start/complete/cancel + participant add/remove + regular update) needs a dedicated design slice before wrapping.
|
|
32
|
+
- **New tool** `pica_submit_feedback`: agent-native feedback submission. Routes bug_report→devops, feature_request→ceo, question→comms, other→category-mapped. Requires `write:feedback` scope. Subject is always the authenticated user per ADR-184 rule 2. (ADR-184 slice 8 — landed on develop 2026-04-19 post-2.23.0 publish.)
|
|
33
|
+
- **ADR-189 Phase 3: two new identity-capture tools.** `pica_update_my_identity` (stage_name / IPI / ISNI / IPN / PRO) and `pica_update_organisation_profile` (org_type / display_name / tagline / ipi_number). Both admin-scoped, both `retry_safe: true` (idempotent upserts — re-applying the same IPI leaves the row in the same state). Subject derived from auth (no `user_id` / `organisation_id` parameters — ADR-184 rule 2). After the identity write, `pica_update_my_identity` re-runs cross-org discovery and returns the count of newly-visible credits / custody / artist-link rows so the agent can surface "found N more — claim them?" in the same conversation turn. Rate-limited at 20 writes/hour/user via `checkActionRateLimit` (R1 mitigation). Admin routes (`POST /api/admin/my-identity`, `POST /api/admin/organisation-profile`) wrap in `withAgentActionStamp` when the caller presents an agent grant (ADR-185 Part 3) — UPDATE compensation captures pre-write state via read-before-write and PATCHes the row back on stamp failure, or deletes a lazy-created person row.
|
|
34
|
+
|
|
35
|
+
## [2.23.0] - 2026-04-19
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- **ADR-181 Phase 1: `pica_audit_list` ported from `@withpica/mcp-server-settings`
|
|
40
|
+
(ADR-154 F6).** Closes the one trailing-gap tool from the source-merge audit —
|
|
41
|
+
every other tool the three sub-servers exposed was already registered by
|
|
42
|
+
`mcp-server`'s superset. Registered in `lib/services/mcp-scopes.ts`
|
|
43
|
+
`ADMIN_ONLY_TOOLS` alongside the team / org-profile admin operations; the
|
|
44
|
+
`mcp_audit_log` read is org-scoped and matches the existing admin posture
|
|
45
|
+
for `pica_organisation_profile` / `pica_team_list`. Landed in `54ae935d9`
|
|
46
|
+
via PR #50.
|
|
47
|
+
- **ADR-181 Phase 1: bundle-size CI gate per Decision 2.** New
|
|
48
|
+
`scripts/check-mcp-bundle.ts` walks `mcp-server/dist/`, sums byte size
|
|
49
|
+
(excluding source maps), and fails if total > 210 MB (70% × Vercel's
|
|
50
|
+
300 MB serverless-function cap). Runs on every push / PR that touches
|
|
51
|
+
`mcp-server/**`, `mcp-server-shared/**`, the script, or the workflow
|
|
52
|
+
itself (`.github/workflows/mcp-bundle-size.yml`). `package.json`
|
|
53
|
+
`prepublishOnly` invokes it locally so a bloated bundle can't ship out
|
|
54
|
+
of a developer machine. Current measurement on this branch:
|
|
55
|
+
0.79 MB / 210 MB limit (0.38% of cap). Landed in `558315069` via PR #50.
|
|
56
|
+
|
|
14
57
|
## [2.22.0] - 2026-04-18
|
|
15
58
|
|
|
16
59
|
### Added
|
package/dist/config.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
export declare const VERSION = "2.24.0";
|
|
1
2
|
export interface ServerConfig {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
picaApiKey: string | null;
|
|
4
|
+
picaApiUrl: string;
|
|
5
|
+
serverName: string;
|
|
6
|
+
version: string;
|
|
7
|
+
debug: boolean;
|
|
8
|
+
lobbyMode: boolean;
|
|
9
|
+
credentialsPath: string;
|
|
10
|
+
discoveryMode: boolean;
|
|
10
11
|
}
|
|
11
12
|
export declare function loadConfig(): ServerConfig;
|
|
12
13
|
export declare function validateConfig(config: ServerConfig): void;
|
|
13
|
-
//# sourceMappingURL=config.d.ts.map
|
|
14
|
+
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,OAAO,WAAW,CAAC;AAEhC,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,UAAU,IAAI,YAAY,CAwCzC;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAWzD"}
|
package/dist/config.js
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
* MCP Server Configuration
|
|
4
4
|
*/
|
|
5
5
|
import { readCredentials, getDefaultCredentialsPath, } from "@withpica/mcp-utils";
|
|
6
|
+
// Single TS-side source of truth for the customer MCP server version.
|
|
7
|
+
// Keep in sync with mcp-server/package.json; scripts/lint-mcp-tools.ts
|
|
8
|
+
// enforces that and blocks literal version strings elsewhere. Surfaces
|
|
9
|
+
// on stdio via the boot banner + MCP `initialize` handshake (loadConfig
|
|
10
|
+
// below) and on HTTP via app/api/mcp/route.ts, which imports this const
|
|
11
|
+
// from mcp-server/dist/config.js. Past drift incidents: 2026-04-08
|
|
12
|
+
// (banner 2.5.0 vs npm 2.6.1), 2026-04-19 ADR-181 Phase 2 (banner 2.6.2
|
|
13
|
+
// vs npm 2.22.0). ADR-180 Phase 2 collapses the duplication.
|
|
14
|
+
export const VERSION = "2.24.0";
|
|
6
15
|
export function loadConfig() {
|
|
7
16
|
const credentialsPath = process.env.PICA_CREDENTIALS_PATH || getDefaultCredentialsPath();
|
|
8
17
|
const debug = process.env.DEBUG === "true" || process.env.DEBUG === "1";
|
|
@@ -30,13 +39,7 @@ export function loadConfig() {
|
|
|
30
39
|
picaApiKey,
|
|
31
40
|
picaApiUrl: process.env.PICA_API_URL || "https://withpica.com/api",
|
|
32
41
|
serverName: "pica-mcp-server",
|
|
33
|
-
|
|
34
|
-
// string surfaces in the boot banner ([MCP Server] Version: ...) and
|
|
35
|
-
// in the MCP `initialize` handshake response under `serverInfo.version`,
|
|
36
|
-
// which is what clients display in their connector UIs. Drift from
|
|
37
|
-
// package.json was caught 2026-04-08 — banner read 2.5.0 long after
|
|
38
|
-
// npm was on 2.6.1.
|
|
39
|
-
version: "2.6.2",
|
|
42
|
+
version: VERSION,
|
|
40
43
|
debug,
|
|
41
44
|
lobbyMode,
|
|
42
45
|
credentialsPath,
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D;;GAEG;AAEH,OAAO,EACL,eAAe,EACf,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D;;GAEG;AAEH,OAAO,EACL,eAAe,EACf,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAE7B,sEAAsE;AACtE,uEAAuE;AACvE,uEAAuE;AACvE,wEAAwE;AACxE,wEAAwE;AACxE,mEAAmE;AACnE,wEAAwE;AACxE,6DAA6D;AAC7D,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC;AAahC,MAAM,UAAU,UAAU;IACxB,MAAM,eAAe,GACnB,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,yBAAyB,EAAE,CAAC;IACnE,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,GAAG,CAAC;IAExE,sBAAsB;IACtB,IAAI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AAC,MAAM,CAAC,EAAE,CAAC;QAChE,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/prompts/index.d.ts
CHANGED
|
@@ -3,76 +3,76 @@
|
|
|
3
3
|
* Manages pre-configured prompts for common workflows
|
|
4
4
|
*/
|
|
5
5
|
export interface PromptDefinition {
|
|
6
|
-
name: string;
|
|
7
|
-
description: string;
|
|
8
|
-
arguments?: Array<{
|
|
9
6
|
name: string;
|
|
10
7
|
description: string;
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
arguments?: Array<{
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
required?: boolean;
|
|
12
|
+
}>;
|
|
13
13
|
}
|
|
14
14
|
export interface PromptMessage {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
role: "user" | "assistant";
|
|
16
|
+
content: {
|
|
17
|
+
type: string;
|
|
18
|
+
text: string;
|
|
19
|
+
};
|
|
20
20
|
}
|
|
21
21
|
export interface PromptResult {
|
|
22
|
-
|
|
22
|
+
messages: PromptMessage[];
|
|
23
23
|
}
|
|
24
24
|
export declare class PromptRegistry {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
25
|
+
/**
|
|
26
|
+
* List all available prompts
|
|
27
|
+
*/
|
|
28
|
+
listPrompts(): PromptDefinition[];
|
|
29
|
+
/**
|
|
30
|
+
* Get a prompt by name
|
|
31
|
+
*/
|
|
32
|
+
getPrompt(name: string, args?: Record<string, any>): Promise<any>;
|
|
33
|
+
/**
|
|
34
|
+
* Analyze catalog prompt
|
|
35
|
+
*/
|
|
36
|
+
private getAnalyzeCatalogPrompt;
|
|
37
|
+
/**
|
|
38
|
+
* Find duplicates prompt
|
|
39
|
+
*/
|
|
40
|
+
private getFindDuplicatesPrompt;
|
|
41
|
+
/**
|
|
42
|
+
* Enrich metadata prompt
|
|
43
|
+
*/
|
|
44
|
+
private getEnrichMetadataPrompt;
|
|
45
|
+
/**
|
|
46
|
+
* Verify works prompt
|
|
47
|
+
*/
|
|
48
|
+
private getVerifyWorksPrompt;
|
|
49
|
+
/**
|
|
50
|
+
* Assess catalog health prompt
|
|
51
|
+
*/
|
|
52
|
+
private getAssessCatalogHealthPrompt;
|
|
53
|
+
/**
|
|
54
|
+
* Audit credits prompt
|
|
55
|
+
*/
|
|
56
|
+
private getAuditCreditsPrompt;
|
|
57
|
+
/**
|
|
58
|
+
* New catalog setup prompt — first-time onboarding
|
|
59
|
+
*/
|
|
60
|
+
private getNewCatalogSetupPrompt;
|
|
61
|
+
/**
|
|
62
|
+
* Close the loop — check a specific work's gaps and offer to fix each one
|
|
63
|
+
*/
|
|
64
|
+
private getCloseTheLoopPrompt;
|
|
65
|
+
/**
|
|
66
|
+
* Register my works — check registration status and prepare for PRO submission
|
|
67
|
+
*/
|
|
68
|
+
private getRegisterMyWorksPrompt;
|
|
69
|
+
/**
|
|
70
|
+
* Workspace autopilot — assess state and route to the right workflow
|
|
71
|
+
*/
|
|
72
|
+
private getWorkspaceAutopilotPrompt;
|
|
73
|
+
/**
|
|
74
|
+
* Prepare for sync — get catalog sync-ready
|
|
75
|
+
*/
|
|
76
|
+
private getPrepareForSyncPrompt;
|
|
77
77
|
}
|
|
78
|
-
//# sourceMappingURL=index.d.ts.map
|
|
78
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,KAAK,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B;AAED,qBAAa,cAAc;IACzB;;OAEG;IACH,WAAW,IAAI,gBAAgB,EAAE;IA6EjC;;OAEG;IACG,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;IAwCvE;;OAEG;IACH,OAAO,CAAC,uBAAuB;IA8B/B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IA+B/B;;OAEG;IACH,OAAO,CAAC,uBAAuB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/prompts/index.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192
192
|
- Suggest potential sources (ISNI, MusicBrainz, etc.)
|
|
193
193
|
- Prioritize the most impactful enrichment opportunities
|
|
194
194
|
|
|
195
|
-
Focus on people and works where enrichment would add the most value
|
|
195
|
+
Focus on people and works where enrichment would add the most value.
|
|
196
|
+
|
|
197
|
+
ADR-193 — before asking the user to paste facts, check your other connected MCPs (email, drive, notes, calendar) for evidence first. When you find it, cite the source via pica_enrichment_propose with a URI-style source (gmail://thread-id/..., gdrive://file-id/..., notion://page-id/..., file:///..., etc). PICA read tools surface gap_hints pointing at the exact capability + query shape to use — follow them when present.`,
|
|
196
198
|
},
|
|
197
199
|
},
|
|
198
200
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AA6B7D,MAAM,OAAO,cAAc;IACzB;;OAEG;IACH,WAAW;QACT,OAAO;YACL;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EACT,+FAA+F;gBACjG,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EACT,kEAAkE;gBACpE,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EACT,2FAA2F;gBAC7F,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,cAAc;gBACpB,WAAW,EACT,2EAA2E;gBAC7E,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,uBAAuB;gBAC7B,WAAW,EACT,6GAA6G;gBAC/G,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,eAAe;gBACrB,WAAW,EACT,+EAA+E;gBACjF,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,mBAAmB;gBACzB,WAAW,EACT,iIAAiI;gBACnI,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,gBAAgB;gBACtB,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,OAAO,IAAI,CAAC,2BAA2B,EAAE,CAAC;YAE5C;gBACE,MAAM,IAAI,KAAK,CAAC,qBAAqB,IAAI,EAAE,CAAC,CAAC;QACjD,CAAC;IACH,CAAC;IAED;;OAEG;IACK,uBAAuB;QAC7B,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE;;;;;;;;;;;;;;;;8CAgB4B;qBACnC;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,uBAAuB;QAC7B,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE;;;;;;;;;;;;;;;;;kGAiBgF;qBACvF;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,uBAAuB;QAC7B,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AA6B7D,MAAM,OAAO,cAAc;IACzB;;OAEG;IACH,WAAW;QACT,OAAO;YACL;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EACT,+FAA+F;gBACjG,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EACT,kEAAkE;gBACpE,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EACT,2FAA2F;gBAC7F,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,cAAc;gBACpB,WAAW,EACT,2EAA2E;gBAC7E,SAAS,EAAE,EAAE;aACd;YACD;gBACE,I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BACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;mDAqBiC;qBACxC;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,2BAA2B;QACjC,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gIAiC8G;qBACrH;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,uBAAuB;QAC7B,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;0GAuBwF;qBAC/F;iBACF;aACF;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -5,62 +5,62 @@
|
|
|
5
5
|
import { PicaClient } from "@withpica/mcp-sdk";
|
|
6
6
|
import { ServerConfig } from "../config.js";
|
|
7
7
|
export interface ResourceDefinition {
|
|
8
|
-
uri: string;
|
|
9
|
-
name: string;
|
|
10
|
-
description: string;
|
|
11
|
-
mimeType: string;
|
|
12
|
-
}
|
|
13
|
-
export interface ResourceContent {
|
|
14
|
-
contents: Array<{
|
|
15
8
|
uri: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
16
11
|
mimeType: string;
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
}
|
|
13
|
+
export interface ResourceContent {
|
|
14
|
+
contents: Array<{
|
|
15
|
+
uri: string;
|
|
16
|
+
mimeType: string;
|
|
17
|
+
text: string;
|
|
18
|
+
}>;
|
|
19
19
|
}
|
|
20
20
|
export type ResourceResult = any;
|
|
21
21
|
export declare class ResourceRegistry {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
22
|
+
private pica;
|
|
23
|
+
private config?;
|
|
24
|
+
constructor(pica: PicaClient | null, config?: ServerConfig);
|
|
25
|
+
/**
|
|
26
|
+
* List all available resources
|
|
27
|
+
*/
|
|
28
|
+
listResources(): ResourceDefinition[];
|
|
29
|
+
/**
|
|
30
|
+
* Read a resource by URI
|
|
31
|
+
*/
|
|
32
|
+
readResource(uri: string): Promise<any>;
|
|
33
|
+
/**
|
|
34
|
+
* Get OpenAPI specification resource
|
|
35
|
+
*/
|
|
36
|
+
private getOpenAPISpec;
|
|
37
|
+
/**
|
|
38
|
+
* Get works list resource
|
|
39
|
+
*/
|
|
40
|
+
private getWorksList;
|
|
41
|
+
/**
|
|
42
|
+
* Get people list resource
|
|
43
|
+
*/
|
|
44
|
+
private getPeopleList;
|
|
45
|
+
/**
|
|
46
|
+
* Get recordings list resource
|
|
47
|
+
*/
|
|
48
|
+
private getRecordingsList;
|
|
49
|
+
/**
|
|
50
|
+
* Get catalog statistics resource
|
|
51
|
+
*/
|
|
52
|
+
private getCatalogStats;
|
|
53
|
+
/**
|
|
54
|
+
* Get catalog health (PICA Score) resource
|
|
55
|
+
*/
|
|
56
|
+
private getCatalogHealth;
|
|
57
|
+
/**
|
|
58
|
+
* Get workspace context resource — aggregated orientation for agents
|
|
59
|
+
*/
|
|
60
|
+
private getWorkspaceContext;
|
|
61
|
+
/**
|
|
62
|
+
* Get recent events resource — webhook deliveries
|
|
63
|
+
*/
|
|
64
|
+
private getRecentEvents;
|
|
65
65
|
}
|
|
66
|
-
//# sourceMappingURL=index.d.ts.map
|
|
66
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* Block playbook: "document the high level of your server"
|
|
6
6
|
* Lowin: "instructions are context — design them as context"
|
|
7
7
|
*/
|
|
8
|
-
export declare const SERVER_INSTRUCTIONS = "PICA manages music catalog metadata \u2014 works, recordings, people, credits, agreements,
|
|
8
|
+
export declare const SERVER_INSTRUCTIONS = "PICA manages music catalog metadata \u2014 works, recordings, people, credits, agreements, rights.\n\nStart here:\n- pica_dashboard_briefing \u2014 daily summary of what needs attention\n- pica_search_all \u2014 find any entity by name, ISWC, ISRC, or IPI\n- pica_works_query / pica_people_query \u2014 browse the catalog\n\nThe catalog is ALWAYS accessible via the tools above \u2014 zero setup, no integration required. If pica_integrations_status shows \"0 connected\" that refers to optional peer connectors (Google/Notion/Airtable/Telegram), NOT the catalog; call pica_works_query to check what's there.\n\nSpotify/YouTube URLs: call pica_import_streaming_link (Spotify/Deezer) or pica_import_youtube_link directly. PICA reads these at platform level \u2014 there is no per-user Spotify/YouTube OAuth; do not tell the user to \"connect Spotify\".\n\nKey patterns:\n- Read tools are safe to call freely (readOnlyHint=true)\n- _inspect tools take sections (e.g., pica_works_inspect sections: [\"health\", \"completeness\"])\n- Write tools confirm what changed; destructive tools (delete/merge) need two-step confirmation with a token\n- Errors include \"suggestion\" and \"next_tool\" for recovery\n- Enrichment (pica_enrich_*) pulls from Spotify, MusicBrainz, MLC, ISNI, Discogs, YouTube \u2014 agent picks sources from available identifiers\n\nQuery endpoints accept \"limit\" (default 50) and paginate. IDs are UUIDs \u2014 use a _query tool first when unsure.\n\nWrite tools: announce intent, confirm result. Destructive tools: describe impact, require explicit user confirmation.\n\nPeer connectors (email, drive, notes, calendar, DAW MCPs): when PICA shows missing data, check peer MCPs before asking the user. Cite via pica_enrichment_propose sources[].url with URI schemes \u2014 gmail:// gdrive:// notion:// file:// telegram:// calendar:// daw:// user:// web://. See docs/mcp-source-uri-conventions.md.";
|
|
9
9
|
//# sourceMappingURL=server-instructions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"server-instructions.d.ts","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,+3DAsB+R,CAAC"}
|
|
@@ -6,29 +6,27 @@
|
|
|
6
6
|
* Block playbook: "document the high level of your server"
|
|
7
7
|
* Lowin: "instructions are context — design them as context"
|
|
8
8
|
*/
|
|
9
|
-
export const SERVER_INSTRUCTIONS = `PICA manages music catalog metadata — works, recordings, people, credits, agreements,
|
|
9
|
+
export const SERVER_INSTRUCTIONS = `PICA manages music catalog metadata — works, recordings, people, credits, agreements, rights.
|
|
10
10
|
|
|
11
11
|
Start here:
|
|
12
12
|
- pica_dashboard_briefing — daily summary of what needs attention
|
|
13
13
|
- pica_search_all — find any entity by name, ISWC, ISRC, or IPI
|
|
14
14
|
- pica_works_query / pica_people_query — browse the catalog
|
|
15
15
|
|
|
16
|
+
The catalog is ALWAYS accessible via the tools above — zero setup, no integration required. If pica_integrations_status shows "0 connected" that refers to optional peer connectors (Google/Notion/Airtable/Telegram), NOT the catalog; call pica_works_query to check what's there.
|
|
17
|
+
|
|
18
|
+
Spotify/YouTube URLs: call pica_import_streaming_link (Spotify/Deezer) or pica_import_youtube_link directly. PICA reads these at platform level — there is no per-user Spotify/YouTube OAuth; do not tell the user to "connect Spotify".
|
|
19
|
+
|
|
16
20
|
Key patterns:
|
|
17
|
-
- Read tools are safe to call freely (
|
|
18
|
-
-
|
|
19
|
-
- Write tools (
|
|
20
|
-
-
|
|
21
|
-
-
|
|
21
|
+
- Read tools are safe to call freely (readOnlyHint=true)
|
|
22
|
+
- _inspect tools take sections (e.g., pica_works_inspect sections: ["health", "completeness"])
|
|
23
|
+
- Write tools confirm what changed; destructive tools (delete/merge) need two-step confirmation with a token
|
|
24
|
+
- Errors include "suggestion" and "next_tool" for recovery
|
|
25
|
+
- Enrichment (pica_enrich_*) pulls from Spotify, MusicBrainz, MLC, ISNI, Discogs, YouTube — agent picks sources from available identifiers
|
|
22
26
|
|
|
23
|
-
|
|
24
|
-
Use pica_dashboard_attention for items needing action.
|
|
25
|
-
Use pica_works_inspect with sections: ["health", "completeness"] to check data quality.
|
|
26
|
-
Enrichment tools (pica_enrich_work_*) pull from external sources — Spotify, MusicBrainz, MLC, ISNI, Discogs, YouTube.
|
|
27
|
-
The agent orchestrates enrichment — try sources based on available identifiers, follow recovery hints.
|
|
27
|
+
Query endpoints accept "limit" (default 50) and paginate. IDs are UUIDs — use a _query tool first when unsure.
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
IDs are UUIDs. When unsure of an ID, use a _query tool first.
|
|
29
|
+
Write tools: announce intent, confirm result. Destructive tools: describe impact, require explicit user confirmation.
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
When calling destructive tools: describe exactly what will be deleted/merged and get explicit user confirmation before calling.`;
|
|
31
|
+
Peer connectors (email, drive, notes, calendar, DAW MCPs): when PICA shows missing data, check peer MCPs before asking the user. Cite via pica_enrichment_propose sources[].url with URI schemes — gmail:// gdrive:// notion:// file:// telegram:// calendar:// daw:// user:// web://. See docs/mcp-source-uri-conventions.md.`;
|
|
34
32
|
//# sourceMappingURL=server-instructions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-instructions.js","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG
|
|
1
|
+
{"version":3,"file":"server-instructions.js","sourceRoot":"","sources":["../src/server-instructions.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;+TAsB4R,CAAC"}
|
package/dist/server.d.ts
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
import { ServerConfig } from "./config.js";
|
|
2
2
|
export declare class PicaMcpServer {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
3
|
+
private server;
|
|
4
|
+
private pica;
|
|
5
|
+
private toolRegistry;
|
|
6
|
+
private resourceRegistry;
|
|
7
|
+
private promptRegistry;
|
|
8
|
+
private config;
|
|
9
|
+
private httpServer?;
|
|
10
|
+
constructor(config: ServerConfig);
|
|
11
|
+
/**
|
|
12
|
+
* Reinitialize server with new credentials (called after successful auth)
|
|
13
|
+
*/
|
|
14
|
+
reinitialize(apiKey: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* Reset the server back to lobby mode (called after sign_out).
|
|
17
|
+
* Mirrors reinitialize() but in reverse: clears the PicaClient,
|
|
18
|
+
* sets lobbyMode=true, and rebuilds the tool/resource registries so
|
|
19
|
+
* the next tools/list call returns only [pica_sign_in, pica_sign_out].
|
|
20
|
+
*
|
|
21
|
+
* Without this the server would keep advertising the full authenticated
|
|
22
|
+
* tool surface after sign_out until the process is restarted, which
|
|
23
|
+
* lies about what's actually available — every privileged tool call
|
|
24
|
+
* would still fail at the API layer (no PicaClient), but the surface
|
|
25
|
+
* itself shouldn't pretend the catalog is reachable.
|
|
26
|
+
*/
|
|
27
|
+
signOut(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Set up MCP protocol handlers on the main server instance (for stdio)
|
|
30
|
+
*/
|
|
31
|
+
private setupHandlers;
|
|
32
|
+
/**
|
|
33
|
+
* Start the MCP server.
|
|
34
|
+
*
|
|
35
|
+
* Transport is selected by environment:
|
|
36
|
+
* - MCP_TRANSPORT=http → HTTP server on MCP_PORT (default 3100)
|
|
37
|
+
* - Otherwise → stdio (default, for Claude Code / Cursor / VS Code)
|
|
38
|
+
*/
|
|
39
|
+
start(): Promise<void>;
|
|
40
|
+
private startStdio;
|
|
41
|
+
private startHttp;
|
|
42
|
+
/**
|
|
43
|
+
* Register protocol handlers on a server instance.
|
|
44
|
+
* Used by both the main server (stdio) and per-request servers (HTTP).
|
|
45
|
+
*/
|
|
46
|
+
private registerHandlers;
|
|
47
|
+
/**
|
|
48
|
+
* Stop the MCP server
|
|
49
|
+
*/
|
|
50
|
+
stop(): Promise<void>;
|
|
51
51
|
}
|
|
52
|
-
//# sourceMappingURL=server.d.ts.map
|
|
52
|
+
//# sourceMappingURL=server.d.ts.map
|