@withpica/mcp-server 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.local.json +5 -0
- package/CHANGELOG.md +1850 -0
- package/README.md +304 -0
- package/assets/fonts/GeistSans-Light.woff2 +0 -0
- package/assets/fonts/InstrumentSerif-Italic.woff2 +0 -0
- package/assets/fonts/InstrumentSerif-Regular.woff2 +0 -0
- package/dist/apps/download.d.ts +2 -0
- package/dist/apps/download.d.ts.map +1 -0
- package/dist/apps/download.js +125 -0
- package/dist/apps/download.js.map +1 -0
- package/dist/apps/generated/shared-bundle.d.ts +5 -0
- package/dist/apps/generated/shared-bundle.d.ts.map +1 -0
- package/dist/apps/generated/shared-bundle.js +7 -0
- package/dist/apps/generated/shared-bundle.js.map +1 -0
- package/dist/apps/release.d.ts +2 -0
- package/dist/apps/release.d.ts.map +1 -0
- package/dist/apps/release.js +69 -0
- package/dist/apps/release.js.map +1 -0
- package/dist/apps/shared.d.ts +15 -0
- package/dist/apps/shared.d.ts.map +1 -0
- package/dist/apps/shared.js +480 -0
- package/dist/apps/shared.js.map +1 -0
- package/dist/apps/upload.d.ts +2 -0
- package/dist/apps/upload.d.ts.map +1 -0
- package/dist/apps/upload.js +280 -0
- package/dist/apps/upload.js.map +1 -0
- package/dist/config.d.ts +14 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +73 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/index.d.ts +86 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +645 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/resources/agent-guide.d.ts +15 -0
- package/dist/resources/agent-guide.d.ts.map +1 -0
- package/dist/resources/agent-guide.js +284 -0
- package/dist/resources/agent-guide.js.map +1 -0
- package/dist/resources/index.d.ts +66 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +510 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/resources/llms-primer.d.ts +2 -0
- package/dist/resources/llms-primer.d.ts.map +1 -0
- package/dist/resources/llms-primer.js +68 -0
- package/dist/resources/llms-primer.js.map +1 -0
- package/dist/resources/required-schemas.generated.d.ts +455 -0
- package/dist/resources/required-schemas.generated.d.ts.map +1 -0
- package/dist/resources/required-schemas.generated.js +1041 -0
- package/dist/resources/required-schemas.generated.js.map +1 -0
- package/dist/resources/required-schemas.source.d.ts +53 -0
- package/dist/resources/required-schemas.source.d.ts.map +1 -0
- package/dist/resources/required-schemas.source.js +493 -0
- package/dist/resources/required-schemas.source.js.map +1 -0
- package/dist/resources/welcome.d.ts +14 -0
- package/dist/resources/welcome.d.ts.map +1 -0
- package/dist/resources/welcome.js +26 -0
- package/dist/resources/welcome.js.map +1 -0
- package/dist/server-instructions.d.ts +60 -0
- package/dist/server-instructions.d.ts.map +1 -0
- package/dist/server-instructions.js +93 -0
- package/dist/server-instructions.js.map +1 -0
- package/dist/server.d.ts +52 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +334 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/access-simulate.d.ts +23 -0
- package/dist/tools/access-simulate.d.ts.map +1 -0
- package/dist/tools/access-simulate.js +162 -0
- package/dist/tools/access-simulate.js.map +1 -0
- 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 +274 -0
- package/dist/tools/agent-identity.js.map +1 -0
- package/dist/tools/agreement-types.d.ts +27 -0
- package/dist/tools/agreement-types.d.ts.map +1 -0
- package/dist/tools/agreement-types.js +281 -0
- package/dist/tools/agreement-types.js.map +1 -0
- package/dist/tools/agreements.d.ts +20 -0
- package/dist/tools/agreements.d.ts.map +1 -0
- package/dist/tools/agreements.js +282 -0
- package/dist/tools/agreements.js.map +1 -0
- package/dist/tools/analytics.d.ts +20 -0
- package/dist/tools/analytics.d.ts.map +1 -0
- package/dist/tools/analytics.js +130 -0
- package/dist/tools/analytics.js.map +1 -0
- package/dist/tools/app-tools.d.ts +15 -0
- package/dist/tools/app-tools.d.ts.map +1 -0
- package/dist/tools/app-tools.js +388 -0
- package/dist/tools/app-tools.js.map +1 -0
- package/dist/tools/assets.d.ts +25 -0
- package/dist/tools/assets.d.ts.map +1 -0
- package/dist/tools/assets.js +454 -0
- package/dist/tools/assets.js.map +1 -0
- package/dist/tools/audio-files.d.ts +20 -0
- package/dist/tools/audio-files.d.ts.map +1 -0
- package/dist/tools/audio-files.js +409 -0
- package/dist/tools/audio-files.js.map +1 -0
- package/dist/tools/audit.d.ts +19 -0
- package/dist/tools/audit.d.ts.map +1 -0
- package/dist/tools/audit.js +58 -0
- package/dist/tools/audit.js.map +1 -0
- package/dist/tools/auth.d.ts +22 -0
- package/dist/tools/auth.d.ts.map +1 -0
- package/dist/tools/auth.js +212 -0
- package/dist/tools/auth.js.map +1 -0
- package/dist/tools/bulk.d.ts +22 -0
- package/dist/tools/bulk.d.ts.map +1 -0
- package/dist/tools/bulk.js +164 -0
- package/dist/tools/bulk.js.map +1 -0
- package/dist/tools/calendar.d.ts +15 -0
- package/dist/tools/calendar.d.ts.map +1 -0
- package/dist/tools/calendar.js +68 -0
- package/dist/tools/calendar.js.map +1 -0
- package/dist/tools/collaborators.d.ts +21 -0
- package/dist/tools/collaborators.d.ts.map +1 -0
- package/dist/tools/collaborators.js +381 -0
- package/dist/tools/collaborators.js.map +1 -0
- package/dist/tools/comparisons.d.ts +22 -0
- package/dist/tools/comparisons.d.ts.map +1 -0
- package/dist/tools/comparisons.js +80 -0
- package/dist/tools/comparisons.js.map +1 -0
- package/dist/tools/credits.d.ts +39 -0
- package/dist/tools/credits.d.ts.map +1 -0
- package/dist/tools/credits.js +541 -0
- package/dist/tools/credits.js.map +1 -0
- package/dist/tools/custody-hints.d.ts +16 -0
- package/dist/tools/custody-hints.d.ts.map +1 -0
- package/dist/tools/custody-hints.js +27 -0
- package/dist/tools/custody-hints.js.map +1 -0
- package/dist/tools/custody.d.ts +38 -0
- package/dist/tools/custody.d.ts.map +1 -0
- package/dist/tools/custody.js +281 -0
- package/dist/tools/custody.js.map +1 -0
- package/dist/tools/dashboard.d.ts +22 -0
- package/dist/tools/dashboard.d.ts.map +1 -0
- package/dist/tools/dashboard.js +258 -0
- package/dist/tools/dashboard.js.map +1 -0
- package/dist/tools/directory.d.ts +15 -0
- package/dist/tools/directory.d.ts.map +1 -0
- package/dist/tools/directory.js +107 -0
- package/dist/tools/directory.js.map +1 -0
- package/dist/tools/discovery.d.ts +49 -0
- package/dist/tools/discovery.d.ts.map +1 -0
- package/dist/tools/discovery.js +851 -0
- package/dist/tools/discovery.js.map +1 -0
- package/dist/tools/disputes.d.ts +18 -0
- package/dist/tools/disputes.d.ts.map +1 -0
- package/dist/tools/disputes.js +62 -0
- package/dist/tools/disputes.js.map +1 -0
- package/dist/tools/documents.d.ts +15 -0
- package/dist/tools/documents.d.ts.map +1 -0
- package/dist/tools/documents.js +37 -0
- package/dist/tools/documents.js.map +1 -0
- package/dist/tools/duplicates.d.ts +25 -0
- package/dist/tools/duplicates.d.ts.map +1 -0
- package/dist/tools/duplicates.js +108 -0
- package/dist/tools/duplicates.js.map +1 -0
- package/dist/tools/enrichment.d.ts +56 -0
- package/dist/tools/enrichment.d.ts.map +1 -0
- package/dist/tools/enrichment.js +616 -0
- package/dist/tools/enrichment.js.map +1 -0
- package/dist/tools/exports.d.ts +19 -0
- package/dist/tools/exports.d.ts.map +1 -0
- package/dist/tools/exports.js +184 -0
- package/dist/tools/exports.js.map +1 -0
- package/dist/tools/feedback.d.ts +22 -0
- package/dist/tools/feedback.d.ts.map +1 -0
- package/dist/tools/feedback.js +100 -0
- package/dist/tools/feedback.js.map +1 -0
- package/dist/tools/forbidden-keywords.d.ts +62 -0
- package/dist/tools/forbidden-keywords.d.ts.map +1 -0
- package/dist/tools/forbidden-keywords.js +99 -0
- package/dist/tools/forbidden-keywords.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/groups.d.ts +29 -0
- package/dist/tools/groups.d.ts.map +1 -0
- package/dist/tools/groups.js +186 -0
- package/dist/tools/groups.js.map +1 -0
- package/dist/tools/import-documents.d.ts +21 -0
- package/dist/tools/import-documents.d.ts.map +1 -0
- package/dist/tools/import-documents.js +206 -0
- package/dist/tools/import-documents.js.map +1 -0
- package/dist/tools/import.d.ts +31 -0
- package/dist/tools/import.d.ts.map +1 -0
- package/dist/tools/import.js +610 -0
- package/dist/tools/import.js.map +1 -0
- package/dist/tools/index.d.ts +293 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +1182 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/integrations.d.ts +19 -0
- package/dist/tools/integrations.d.ts.map +1 -0
- package/dist/tools/integrations.js +120 -0
- package/dist/tools/integrations.js.map +1 -0
- package/dist/tools/labels.d.ts +20 -0
- package/dist/tools/labels.d.ts.map +1 -0
- package/dist/tools/labels.js +48 -0
- package/dist/tools/labels.js.map +1 -0
- package/dist/tools/licensing.d.ts +40 -0
- package/dist/tools/licensing.d.ts.map +1 -0
- package/dist/tools/licensing.js +436 -0
- package/dist/tools/licensing.js.map +1 -0
- package/dist/tools/memory.d.ts +21 -0
- package/dist/tools/memory.d.ts.map +1 -0
- package/dist/tools/memory.js +120 -0
- package/dist/tools/memory.js.map +1 -0
- package/dist/tools/metadata.d.ts +15 -0
- package/dist/tools/metadata.d.ts.map +1 -0
- package/dist/tools/metadata.js +1532 -0
- package/dist/tools/metadata.js.map +1 -0
- package/dist/tools/multimedia.d.ts +19 -0
- package/dist/tools/multimedia.d.ts.map +1 -0
- package/dist/tools/multimedia.js +371 -0
- package/dist/tools/multimedia.js.map +1 -0
- package/dist/tools/my-reported-issues.d.ts +32 -0
- package/dist/tools/my-reported-issues.d.ts.map +1 -0
- package/dist/tools/my-reported-issues.js +123 -0
- package/dist/tools/my-reported-issues.js.map +1 -0
- package/dist/tools/notes.d.ts +21 -0
- package/dist/tools/notes.d.ts.map +1 -0
- package/dist/tools/notes.js +115 -0
- package/dist/tools/notes.js.map +1 -0
- package/dist/tools/notifications.d.ts +28 -0
- package/dist/tools/notifications.d.ts.map +1 -0
- package/dist/tools/notifications.js +417 -0
- package/dist/tools/notifications.js.map +1 -0
- package/dist/tools/onboarding.d.ts +24 -0
- package/dist/tools/onboarding.d.ts.map +1 -0
- package/dist/tools/onboarding.js +81 -0
- package/dist/tools/onboarding.js.map +1 -0
- package/dist/tools/people.d.ts +254 -0
- package/dist/tools/people.d.ts.map +1 -0
- package/dist/tools/people.js +481 -0
- package/dist/tools/people.js.map +1 -0
- package/dist/tools/projects.d.ts +20 -0
- package/dist/tools/projects.d.ts.map +1 -0
- package/dist/tools/projects.js +316 -0
- package/dist/tools/projects.js.map +1 -0
- package/dist/tools/public-filter.d.ts +43 -0
- package/dist/tools/public-filter.d.ts.map +1 -0
- package/dist/tools/public-filter.js +356 -0
- package/dist/tools/public-filter.js.map +1 -0
- package/dist/tools/publishers.d.ts +30 -0
- package/dist/tools/publishers.d.ts.map +1 -0
- package/dist/tools/publishers.js +105 -0
- package/dist/tools/publishers.js.map +1 -0
- package/dist/tools/purchases.d.ts +27 -0
- package/dist/tools/purchases.d.ts.map +1 -0
- package/dist/tools/purchases.js +9 -0
- package/dist/tools/purchases.js.map +1 -0
- package/dist/tools/recording-attribution-hints.d.ts +24 -0
- package/dist/tools/recording-attribution-hints.d.ts.map +1 -0
- package/dist/tools/recording-attribution-hints.js +27 -0
- package/dist/tools/recording-attribution-hints.js.map +1 -0
- package/dist/tools/recordings.d.ts +96 -0
- package/dist/tools/recordings.d.ts.map +1 -0
- package/dist/tools/recordings.js +564 -0
- package/dist/tools/recordings.js.map +1 -0
- package/dist/tools/recovery-hints.d.ts +40 -0
- package/dist/tools/recovery-hints.d.ts.map +1 -0
- package/dist/tools/recovery-hints.js +827 -0
- package/dist/tools/recovery-hints.js.map +1 -0
- package/dist/tools/release-rich.d.ts +31 -0
- package/dist/tools/release-rich.d.ts.map +1 -0
- package/dist/tools/release-rich.js +245 -0
- package/dist/tools/release-rich.js.map +1 -0
- package/dist/tools/releases.d.ts +36 -0
- package/dist/tools/releases.d.ts.map +1 -0
- package/dist/tools/releases.js +649 -0
- package/dist/tools/releases.js.map +1 -0
- package/dist/tools/report-issue.d.ts +21 -0
- package/dist/tools/report-issue.d.ts.map +1 -0
- package/dist/tools/report-issue.js +101 -0
- package/dist/tools/report-issue.js.map +1 -0
- package/dist/tools/royalties.d.ts +23 -0
- package/dist/tools/royalties.d.ts.map +1 -0
- package/dist/tools/royalties.js +262 -0
- package/dist/tools/royalties.js.map +1 -0
- package/dist/tools/search.d.ts +30 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +115 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/tools/send.d.ts +17 -0
- package/dist/tools/send.d.ts.map +1 -0
- package/dist/tools/send.js +188 -0
- package/dist/tools/send.js.map +1 -0
- package/dist/tools/sessions.d.ts +18 -0
- package/dist/tools/sessions.d.ts.map +1 -0
- package/dist/tools/sessions.js +153 -0
- package/dist/tools/sessions.js.map +1 -0
- package/dist/tools/settings.d.ts +23 -0
- package/dist/tools/settings.d.ts.map +1 -0
- package/dist/tools/settings.js +365 -0
- package/dist/tools/settings.js.map +1 -0
- package/dist/tools/share-links.d.ts +22 -0
- package/dist/tools/share-links.d.ts.map +1 -0
- package/dist/tools/share-links.js +188 -0
- package/dist/tools/share-links.js.map +1 -0
- package/dist/tools/signup.d.ts +26 -0
- package/dist/tools/signup.d.ts.map +1 -0
- package/dist/tools/signup.js +266 -0
- package/dist/tools/signup.js.map +1 -0
- package/dist/tools/split-sheets.d.ts +25 -0
- package/dist/tools/split-sheets.d.ts.map +1 -0
- package/dist/tools/split-sheets.js +309 -0
- package/dist/tools/split-sheets.js.map +1 -0
- package/dist/tools/storage-config.d.ts +13 -0
- package/dist/tools/storage-config.d.ts.map +1 -0
- package/dist/tools/storage-config.js +245 -0
- package/dist/tools/storage-config.js.map +1 -0
- package/dist/tools/subscription.d.ts +60 -0
- package/dist/tools/subscription.d.ts.map +1 -0
- package/dist/tools/subscription.js +440 -0
- package/dist/tools/subscription.js.map +1 -0
- package/dist/tools/sync-placements.d.ts +31 -0
- package/dist/tools/sync-placements.d.ts.map +1 -0
- package/dist/tools/sync-placements.js +431 -0
- package/dist/tools/sync-placements.js.map +1 -0
- package/dist/tools/team.d.ts +22 -0
- package/dist/tools/team.d.ts.map +1 -0
- package/dist/tools/team.js +144 -0
- package/dist/tools/team.js.map +1 -0
- package/dist/tools/telegram.d.ts +21 -0
- package/dist/tools/telegram.d.ts.map +1 -0
- package/dist/tools/telegram.js +144 -0
- package/dist/tools/telegram.js.map +1 -0
- package/dist/tools/uploads.d.ts +17 -0
- package/dist/tools/uploads.d.ts.map +1 -0
- package/dist/tools/uploads.js +165 -0
- package/dist/tools/uploads.js.map +1 -0
- package/dist/tools/works.d.ts +71 -0
- package/dist/tools/works.d.ts.map +1 -0
- package/dist/tools/works.js +694 -0
- package/dist/tools/works.js.map +1 -0
- package/package.json +54 -0
- package/scripts/build-required-schemas.ts +233 -0
- package/scripts/bundle-apps.ts +61 -0
- package/scripts/refresh-schema-mirror.ts +182 -0
- package/server.json +20 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Export Tools - MCP tools for exporting catalog data
|
|
3
|
+
*/
|
|
4
|
+
import { PicaClient } from "@withpica/mcp-sdk";
|
|
5
|
+
import { ToolDefinition, ToolExecutor } from "./index.js";
|
|
6
|
+
export declare class ExportTools {
|
|
7
|
+
private pica;
|
|
8
|
+
constructor(pica: PicaClient);
|
|
9
|
+
getTools(): Array<{
|
|
10
|
+
definition: ToolDefinition;
|
|
11
|
+
executor: ToolExecutor;
|
|
12
|
+
}>;
|
|
13
|
+
private exportCatalogCsv;
|
|
14
|
+
private exportSongRegistration;
|
|
15
|
+
private exportIndustryReady;
|
|
16
|
+
private exportCatalogAssetReport;
|
|
17
|
+
private exportAiConsent;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=exports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../src/tools/exports.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAItE,qBAAa,WAAW;IACtB,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;YA8H3D,gBAAgB;YAShB,sBAAsB;YAuBtB,mBAAmB;YAOnB,wBAAwB;YAgDxB,eAAe;CAS9B"}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
|
|
2
|
+
import { formatAsText, formatSuccess } from "@withpica/mcp-utils";
|
|
3
|
+
import { withBillingGate } from "@withpica/mcp-utils";
|
|
4
|
+
export class ExportTools {
|
|
5
|
+
pica;
|
|
6
|
+
constructor(pica) {
|
|
7
|
+
this.pica = pica;
|
|
8
|
+
}
|
|
9
|
+
getTools() {
|
|
10
|
+
return [
|
|
11
|
+
{
|
|
12
|
+
definition: {
|
|
13
|
+
name: "pica_export_catalog_csv",
|
|
14
|
+
description: "Export the full works catalog as CSV or JSON data. " +
|
|
15
|
+
"Returns the data inline. If the user wants to save it as a file, " +
|
|
16
|
+
"use pica_download to offer a download card, or share the data directly " +
|
|
17
|
+
"and suggest they copy it. Alternatively, exports are available at " +
|
|
18
|
+
"https://withpica.com/workspace via the export button.",
|
|
19
|
+
workflows: ["export-required"],
|
|
20
|
+
inputSchema: {
|
|
21
|
+
type: "object",
|
|
22
|
+
properties: {
|
|
23
|
+
format: {
|
|
24
|
+
type: "string",
|
|
25
|
+
enum: ["csv", "json"],
|
|
26
|
+
description: "Export format (default: csv)",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
executor: this.exportCatalogCsv.bind(this),
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
definition: {
|
|
35
|
+
name: "pica_export_song_registration",
|
|
36
|
+
description: "Export catalog in song registration format (CWR-compatible) for PRO/CMO registration.",
|
|
37
|
+
workflows: ["export-required"],
|
|
38
|
+
inputSchema: {
|
|
39
|
+
type: "object",
|
|
40
|
+
properties: {},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
executor: withBillingGate(this.pica, "song registration export", this.exportSongRegistration.bind(this)),
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
definition: {
|
|
47
|
+
name: "pica_export_industry_ready",
|
|
48
|
+
description: "Export industry-ready metadata package — formatted for distribution to publishers, labels, and sync agents.",
|
|
49
|
+
workflows: ["export-required"],
|
|
50
|
+
inputSchema: {
|
|
51
|
+
type: "object",
|
|
52
|
+
properties: {},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
executor: withBillingGate(this.pica, "industry-ready export", this.exportIndustryReady.bind(this)),
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
definition: {
|
|
59
|
+
name: "pica_export_catalog_asset_report",
|
|
60
|
+
description: "Generate a Catalog Asset Report (CAR) — a unified ZIP bundle with cover PDF, evidence folders, and integrity manifest. Maps creative portfolio data to property-lending equivalents for financial institutions, insurers, PROs, and distributors. Sections include: ownership (title deed equivalent), valuation (surveyor's report), physical assets (contents schedule), agreements (mortgage deed), catalog intelligence (condition report), and summary with equivalence map.",
|
|
61
|
+
workflows: ["export-required"],
|
|
62
|
+
inputSchema: {
|
|
63
|
+
type: "object",
|
|
64
|
+
properties: {
|
|
65
|
+
sections: {
|
|
66
|
+
type: "object",
|
|
67
|
+
description: "Which sections to include in the export. Ownership is always included.",
|
|
68
|
+
properties: {
|
|
69
|
+
valuation: {
|
|
70
|
+
type: "boolean",
|
|
71
|
+
description: "Include earnings, audio intelligence, DSP presence, completeness scores",
|
|
72
|
+
},
|
|
73
|
+
assets: {
|
|
74
|
+
type: "boolean",
|
|
75
|
+
description: "Include physical asset register with insurance and valuations",
|
|
76
|
+
},
|
|
77
|
+
agreements: {
|
|
78
|
+
type: "boolean",
|
|
79
|
+
description: "Include agreements structure and AI consent status",
|
|
80
|
+
},
|
|
81
|
+
intelligence: {
|
|
82
|
+
type: "boolean",
|
|
83
|
+
description: "Include gap analysis, carbon footprint, diligence readiness",
|
|
84
|
+
},
|
|
85
|
+
audio: {
|
|
86
|
+
type: "boolean",
|
|
87
|
+
description: "Include audio master files (large, opt-in)",
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
executor: withBillingGate(this.pica, "catalog asset report", this.exportCatalogAssetReport.bind(this)),
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
definition: {
|
|
98
|
+
name: "pica_export_ai_consent",
|
|
99
|
+
description: "Export AI usage consent declarations for all works — " +
|
|
100
|
+
"shows which works are human-made, AI-assisted, or AI-generated, " +
|
|
101
|
+
"with contributor-level consent tracking for AI model training and licensing.",
|
|
102
|
+
workflows: ["export-required"],
|
|
103
|
+
inputSchema: {
|
|
104
|
+
type: "object",
|
|
105
|
+
properties: {},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
executor: this.exportAiConsent.bind(this),
|
|
109
|
+
},
|
|
110
|
+
];
|
|
111
|
+
}
|
|
112
|
+
async exportCatalogCsv(args) {
|
|
113
|
+
const result = await this.pica.exports.catalogCsv({
|
|
114
|
+
format: args.format,
|
|
115
|
+
});
|
|
116
|
+
return formatAsText(result);
|
|
117
|
+
}
|
|
118
|
+
async exportSongRegistration(_args) {
|
|
119
|
+
const result = await this.pica.exports.songRegistration();
|
|
120
|
+
const data = result?.data ?? result;
|
|
121
|
+
// ADR-146: Surface export gate warnings
|
|
122
|
+
const parts = ["Song registration export generated"];
|
|
123
|
+
if (data?.exportReadiness?.blockers?.length > 0) {
|
|
124
|
+
parts.push(`\n--- export gate (${data.exportReadiness.mode} mode) ---`);
|
|
125
|
+
for (const b of data.exportReadiness.blockers) {
|
|
126
|
+
parts.push(`${b.type}: ${b.workTitle} — ${b.resolutionHint}`);
|
|
127
|
+
}
|
|
128
|
+
if (data.exportReadiness.mode === "advisory") {
|
|
129
|
+
parts.push("These issues will block export when enforcement mode is enabled.");
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return formatSuccess(parts.join("\n"), data);
|
|
133
|
+
}
|
|
134
|
+
async exportIndustryReady(_args) {
|
|
135
|
+
const result = await this.pica.exports.industryReady();
|
|
136
|
+
return formatSuccess("Industry-ready export generated", result);
|
|
137
|
+
}
|
|
138
|
+
async exportCatalogAssetReport(args) {
|
|
139
|
+
const sections = {
|
|
140
|
+
ownership: true,
|
|
141
|
+
valuation: args.sections?.valuation ?? true,
|
|
142
|
+
assets: args.sections?.assets ?? true,
|
|
143
|
+
agreements: args.sections?.agreements ?? true,
|
|
144
|
+
intelligence: args.sections?.intelligence ?? true,
|
|
145
|
+
audio: args.sections?.audio ?? false,
|
|
146
|
+
};
|
|
147
|
+
const result = await this.pica.exports.catalogAssetReport({
|
|
148
|
+
sections,
|
|
149
|
+
attestation: {
|
|
150
|
+
signer_name: "MCP Agent",
|
|
151
|
+
declaration_accepted: true,
|
|
152
|
+
},
|
|
153
|
+
});
|
|
154
|
+
const data = result?.data ?? result;
|
|
155
|
+
let summary = [
|
|
156
|
+
`Catalog Asset Report generated`,
|
|
157
|
+
`Stage: ${data.stage ?? "unknown"}`,
|
|
158
|
+
`PICA Score: ${data.pica_score ?? "N/A"}${data.pica_grade ? ` (${data.pica_grade})` : ""}`,
|
|
159
|
+
`Sections: ownership${sections.valuation ? ", valuation" : ""}${sections.assets ? ", assets" : ""}${sections.agreements ? ", agreements" : ""}${sections.intelligence ? ", intelligence" : ""}${sections.audio ? ", audio" : ""}`,
|
|
160
|
+
data.file_size_bytes
|
|
161
|
+
? `Size: ${(data.file_size_bytes / 1024).toFixed(1)} KB`
|
|
162
|
+
: null,
|
|
163
|
+
data.download_url ? `Download: ${data.download_url}` : null,
|
|
164
|
+
]
|
|
165
|
+
.filter(Boolean)
|
|
166
|
+
.join("\n");
|
|
167
|
+
// ADR-146: Surface export gate warnings
|
|
168
|
+
if (data?.exportReadiness?.blockers?.length > 0) {
|
|
169
|
+
summary += `\nExport gate (${data.exportReadiness.mode} mode): ${data.exportReadiness.blockers.length} blocker(s)`;
|
|
170
|
+
for (const b of data.exportReadiness.blockers.slice(0, 5)) {
|
|
171
|
+
summary += `\n ${b.type}: ${b.workTitle} — ${b.resolutionHint}`;
|
|
172
|
+
}
|
|
173
|
+
if (data.exportReadiness.blockers.length > 5) {
|
|
174
|
+
summary += `\n ... and ${data.exportReadiness.blockers.length - 5} more`;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return formatSuccess(summary, data);
|
|
178
|
+
}
|
|
179
|
+
async exportAiConsent(_args) {
|
|
180
|
+
const result = await this.pica.exports.aiConsent();
|
|
181
|
+
return formatSuccess("AI consent declarations exported — shows disclosure level and training rights per work", result);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
//# sourceMappingURL=exports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exports.js","sourceRoot":"","sources":["../../src/tools/exports.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAU7D,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE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,EACxF,MAAM,CACP,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feedback Tools — MCP tool for agent-submitted feedback (ADR-184 slice 8).
|
|
3
|
+
*
|
|
4
|
+
* Thin wrapper over the existing /api/feedback → feedbackService pipeline.
|
|
5
|
+
* Routes via `general_<category>` actionType so the downstream
|
|
6
|
+
* teamTasksService.createFromGeneralFeedback fan-out handles role routing.
|
|
7
|
+
*
|
|
8
|
+
* ADR-187 compliance: response carries content[].text (narratable) — card
|
|
9
|
+
* rendering deferred to a follow-on per the text-block-is-the-contract rule.
|
|
10
|
+
*/
|
|
11
|
+
import { PicaClient } from "@withpica/mcp-sdk";
|
|
12
|
+
import { ToolDefinition, ToolExecutor } from "./index.js";
|
|
13
|
+
export declare class FeedbackTools {
|
|
14
|
+
private pica;
|
|
15
|
+
constructor(pica: PicaClient);
|
|
16
|
+
getTools(): Array<{
|
|
17
|
+
definition: ToolDefinition;
|
|
18
|
+
executor: ToolExecutor;
|
|
19
|
+
}>;
|
|
20
|
+
private submitFeedback;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=feedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback.d.ts","sourceRoot":"","sources":["../../src/tools/feedback.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAK/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAWtE,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;YAwB3D,cAAc;CAuE7B"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
|
|
2
|
+
import { SUBMIT_FEEDBACK_WRITE_PROPERTIES, SUBMIT_FEEDBACK_REQUIRED, } from "@withpica/mcp-utils";
|
|
3
|
+
const VALID_CATEGORIES = ["bug_report", "feature_request", "question", "other"];
|
|
4
|
+
const ROUTING = {
|
|
5
|
+
bug_report: "devops",
|
|
6
|
+
feature_request: "ceo",
|
|
7
|
+
question: "comms",
|
|
8
|
+
other: "category-mapped",
|
|
9
|
+
};
|
|
10
|
+
export class FeedbackTools {
|
|
11
|
+
pica;
|
|
12
|
+
constructor(pica) {
|
|
13
|
+
this.pica = pica;
|
|
14
|
+
}
|
|
15
|
+
getTools() {
|
|
16
|
+
return [
|
|
17
|
+
{
|
|
18
|
+
definition: {
|
|
19
|
+
name: "pica_submit_feedback",
|
|
20
|
+
description: "File a bug report, feature request, question, or general note " +
|
|
21
|
+
"without leaving the conversation. Routes to the correct team " +
|
|
22
|
+
"role (bug_report→devops, feature_request→ceo, question→comms, " +
|
|
23
|
+
"other→category-mapped) and creates a team_tasks row the " +
|
|
24
|
+
"founder reviews directly. Subject is always " +
|
|
25
|
+
"the authenticated user; no user_id parameter accepted.",
|
|
26
|
+
workflows: "infrastructure",
|
|
27
|
+
inputSchema: {
|
|
28
|
+
type: "object",
|
|
29
|
+
properties: SUBMIT_FEEDBACK_WRITE_PROPERTIES,
|
|
30
|
+
required: SUBMIT_FEEDBACK_REQUIRED,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
executor: this.submitFeedback.bind(this),
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
}
|
|
37
|
+
async submitFeedback(args) {
|
|
38
|
+
const category = args.category;
|
|
39
|
+
const description = args.description;
|
|
40
|
+
if (!category) {
|
|
41
|
+
return {
|
|
42
|
+
content: [{ type: "text", text: "Error: category is required." }],
|
|
43
|
+
isError: true,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
if (!VALID_CATEGORIES.includes(category)) {
|
|
47
|
+
return {
|
|
48
|
+
content: [
|
|
49
|
+
{
|
|
50
|
+
type: "text",
|
|
51
|
+
text: `Error: category must be one of ${VALID_CATEGORIES.join(", ")}.`,
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
isError: true,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
if (typeof description !== "string" || description.trim().length === 0) {
|
|
58
|
+
return {
|
|
59
|
+
content: [{ type: "text", text: "Error: description is required." }],
|
|
60
|
+
isError: true,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
// ADR-184 rule 2: reject caller-supplied user_id defensively. The
|
|
64
|
+
// subject is always the authenticated session/API-key user.
|
|
65
|
+
const sentiment = args.sentiment === "positive" || args.sentiment === "negative"
|
|
66
|
+
? args.sentiment
|
|
67
|
+
: category === "bug_report"
|
|
68
|
+
? "negative"
|
|
69
|
+
: "positive";
|
|
70
|
+
const result = await this.pica.feedback.submit({
|
|
71
|
+
actionType: `general_${category}`,
|
|
72
|
+
sentiment,
|
|
73
|
+
comment: description.trim(),
|
|
74
|
+
portal: "mcp",
|
|
75
|
+
});
|
|
76
|
+
const data = result?.data || result;
|
|
77
|
+
const id = data?.id ?? "unknown";
|
|
78
|
+
const routed = ROUTING[category];
|
|
79
|
+
return {
|
|
80
|
+
content: [
|
|
81
|
+
{
|
|
82
|
+
type: "text",
|
|
83
|
+
text: `Feedback submitted as ${category.replace("_", " ")}; ` +
|
|
84
|
+
`routed to ${routed} team. Reference ID: ${id}.`,
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
structuredContent: {
|
|
88
|
+
kind: "pica.card.feedback_submitted",
|
|
89
|
+
version: 1,
|
|
90
|
+
data: {
|
|
91
|
+
id,
|
|
92
|
+
category,
|
|
93
|
+
routed_to: routed,
|
|
94
|
+
sentiment,
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=feedback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P;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EACF,yBAAyB,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI;wBACvD,aAAa,MAAM,wBAAwB,EAAE,GAAG;iBACnD;aACF;YACD,iBAAiB,EAAE;gBACjB,IAAI,EAAE,8BAA8B;gBACpC,OAAO,EAAE,CAAC;gBACV,IAAI,EAAE;oBACJ,EAAE;oBACF,QAAQ;oBACR,SAAS,EAAE,MAAM;oBACjB,SAAS;iBACV;aACF;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ADR-180 Rule 9 (2026-05-02 amendment) — description hygiene.
|
|
3
|
+
*
|
|
4
|
+
* Two filter lists govern what's allowed in tool descriptions:
|
|
5
|
+
*
|
|
6
|
+
* PUBLIC_FORBIDDEN_KEYWORDS: broad. Bans data-source names + concept
|
|
7
|
+
* vocabulary so the unauthenticated lobby surface (anon `tools/list`,
|
|
8
|
+
* directory tools) gives no architectural intel to callers who haven't
|
|
9
|
+
* authenticated yet. Used by `public-filter.ts` to sanitise descriptions
|
|
10
|
+
* before they cross the lobby boundary.
|
|
11
|
+
*
|
|
12
|
+
* AUTHENTICATED_FORBIDDEN_KEYWORDS: narrow. Bans only infra / vendor /
|
|
13
|
+
* library names whose presence is always wrong regardless of audience —
|
|
14
|
+
* they leak hosting + integration choices that aren't load-bearing for
|
|
15
|
+
* any agent. Used by the lint at `scripts/lint-mcp-tools.ts` to enforce
|
|
16
|
+
* on every tool description, authenticated or not.
|
|
17
|
+
*
|
|
18
|
+
* Concept vocabulary that legitimately helps the agent (Tier A/B, cascade,
|
|
19
|
+
* "→ then:", MCP Apps) stays permitted on the authenticated surface — those
|
|
20
|
+
* are user-facing concepts the agent can reason about, not implementation
|
|
21
|
+
* leakage. Data-source names (MLC, ISNI, MusicBrainz, etc.) similarly stay
|
|
22
|
+
* permitted on the authenticated surface because the agent benefits from
|
|
23
|
+
* knowing which sources resolved a query.
|
|
24
|
+
*
|
|
25
|
+
* The two lists are explicitly disjoint by design — sanitisation for the
|
|
26
|
+
* lobby surface uses the union (PUBLIC ∪ AUTHENTICATED) since everything
|
|
27
|
+
* banned for authenticated surfaces is also banned for unauthenticated.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* Banned on the unauthenticated lobby surface (also banned on authenticated
|
|
31
|
+
* via union — see PUBLIC_FORBIDDEN_KEYWORDS_FULL below).
|
|
32
|
+
*
|
|
33
|
+
* Notably absent: "Spotify" and "YouTube" are public product surface that
|
|
34
|
+
* customers see in tool names like `pica_import_from_spotify` — hiding
|
|
35
|
+
* them in lobby descriptions would gut the utility-signal of those tools
|
|
36
|
+
* without protecting any algorithm.
|
|
37
|
+
*/
|
|
38
|
+
export declare const PUBLIC_FORBIDDEN_KEYWORDS: readonly string[];
|
|
39
|
+
/**
|
|
40
|
+
* Banned on every tool description, authenticated or not. These are infra /
|
|
41
|
+
* vendor / library names whose presence in a tool description is always
|
|
42
|
+
* implementation leakage — agents derive zero useful signal from knowing
|
|
43
|
+
* the email vendor, audio analysis library, or hosting platform.
|
|
44
|
+
*
|
|
45
|
+
* Stripe and Telegram are intentionally NOT banned — those are user-facing
|
|
46
|
+
* product surfaces (Stripe Checkout, Telegram reminders) the agent must
|
|
47
|
+
* reference in tool descriptions to drive correct behaviour.
|
|
48
|
+
*/
|
|
49
|
+
export declare const AUTHENTICATED_FORBIDDEN_KEYWORDS: readonly string[];
|
|
50
|
+
/**
|
|
51
|
+
* The full lobby filter is the union of both lists — anything banned on
|
|
52
|
+
* authenticated surfaces is also banned on unauthenticated.
|
|
53
|
+
*/
|
|
54
|
+
export declare const PUBLIC_FORBIDDEN_KEYWORDS_FULL: readonly string[];
|
|
55
|
+
/**
|
|
56
|
+
* Pattern matching any ADR reference (`ADR-123`, `ADR-1`, `ADR-9999` ...).
|
|
57
|
+
* The `\b` word boundaries prevent false matches on substrings like
|
|
58
|
+
* `LADRADR-`. ADR references are forbidden in every tool description on
|
|
59
|
+
* every surface.
|
|
60
|
+
*/
|
|
61
|
+
export declare const ADR_REFERENCE_REGEX: RegExp;
|
|
62
|
+
//# sourceMappingURL=forbidden-keywords.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forbidden-keywords.d.ts","sourceRoot":"","sources":["../../src/tools/forbidden-keywords.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,EAAE,SAAS,MAAM,EAetD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,gCAAgC,EAAE,SAAS,MAAM,EAkB7D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,8BAA8B,EAAE,SAAS,MAAM,EAG3D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,QAAgB,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
|
|
2
|
+
/**
|
|
3
|
+
* ADR-180 Rule 9 (2026-05-02 amendment) — description hygiene.
|
|
4
|
+
*
|
|
5
|
+
* Two filter lists govern what's allowed in tool descriptions:
|
|
6
|
+
*
|
|
7
|
+
* PUBLIC_FORBIDDEN_KEYWORDS: broad. Bans data-source names + concept
|
|
8
|
+
* vocabulary so the unauthenticated lobby surface (anon `tools/list`,
|
|
9
|
+
* directory tools) gives no architectural intel to callers who haven't
|
|
10
|
+
* authenticated yet. Used by `public-filter.ts` to sanitise descriptions
|
|
11
|
+
* before they cross the lobby boundary.
|
|
12
|
+
*
|
|
13
|
+
* AUTHENTICATED_FORBIDDEN_KEYWORDS: narrow. Bans only infra / vendor /
|
|
14
|
+
* library names whose presence is always wrong regardless of audience —
|
|
15
|
+
* they leak hosting + integration choices that aren't load-bearing for
|
|
16
|
+
* any agent. Used by the lint at `scripts/lint-mcp-tools.ts` to enforce
|
|
17
|
+
* on every tool description, authenticated or not.
|
|
18
|
+
*
|
|
19
|
+
* Concept vocabulary that legitimately helps the agent (Tier A/B, cascade,
|
|
20
|
+
* "→ then:", MCP Apps) stays permitted on the authenticated surface — those
|
|
21
|
+
* are user-facing concepts the agent can reason about, not implementation
|
|
22
|
+
* leakage. Data-source names (MLC, ISNI, MusicBrainz, etc.) similarly stay
|
|
23
|
+
* permitted on the authenticated surface because the agent benefits from
|
|
24
|
+
* knowing which sources resolved a query.
|
|
25
|
+
*
|
|
26
|
+
* The two lists are explicitly disjoint by design — sanitisation for the
|
|
27
|
+
* lobby surface uses the union (PUBLIC ∪ AUTHENTICATED) since everything
|
|
28
|
+
* banned for authenticated surfaces is also banned for unauthenticated.
|
|
29
|
+
*/
|
|
30
|
+
/**
|
|
31
|
+
* Banned on the unauthenticated lobby surface (also banned on authenticated
|
|
32
|
+
* via union — see PUBLIC_FORBIDDEN_KEYWORDS_FULL below).
|
|
33
|
+
*
|
|
34
|
+
* Notably absent: "Spotify" and "YouTube" are public product surface that
|
|
35
|
+
* customers see in tool names like `pica_import_from_spotify` — hiding
|
|
36
|
+
* them in lobby descriptions would gut the utility-signal of those tools
|
|
37
|
+
* without protecting any algorithm.
|
|
38
|
+
*/
|
|
39
|
+
export const PUBLIC_FORBIDDEN_KEYWORDS = [
|
|
40
|
+
"MLC",
|
|
41
|
+
"ISNI",
|
|
42
|
+
"MusicBrainz",
|
|
43
|
+
"Wikidata",
|
|
44
|
+
"Discogs",
|
|
45
|
+
"ACRCloud",
|
|
46
|
+
"cascade",
|
|
47
|
+
"Tier A",
|
|
48
|
+
"Tier B",
|
|
49
|
+
"ADR-164",
|
|
50
|
+
"ADR-179",
|
|
51
|
+
"identity graph",
|
|
52
|
+
"identity-graph",
|
|
53
|
+
"CAR scoring",
|
|
54
|
+
];
|
|
55
|
+
/**
|
|
56
|
+
* Banned on every tool description, authenticated or not. These are infra /
|
|
57
|
+
* vendor / library names whose presence in a tool description is always
|
|
58
|
+
* implementation leakage — agents derive zero useful signal from knowing
|
|
59
|
+
* the email vendor, audio analysis library, or hosting platform.
|
|
60
|
+
*
|
|
61
|
+
* Stripe and Telegram are intentionally NOT banned — those are user-facing
|
|
62
|
+
* product surfaces (Stripe Checkout, Telegram reminders) the agent must
|
|
63
|
+
* reference in tool descriptions to drive correct behaviour.
|
|
64
|
+
*/
|
|
65
|
+
export const AUTHENTICATED_FORBIDDEN_KEYWORDS = [
|
|
66
|
+
"Railway",
|
|
67
|
+
"Postmark",
|
|
68
|
+
// SendGrid + Resend intentionally omitted:
|
|
69
|
+
// - SendGrid: not in use. CLAUDE.md still lists it as "legacy" but
|
|
70
|
+
// this is stale per a 2026-05-02 confirmation; the codebase
|
|
71
|
+
// transactional email path is Postmark-only.
|
|
72
|
+
// - "Resend" the email vendor collides with the English verb "resend"
|
|
73
|
+
// used in tool names (`pica_collaborators_invite_resend`,
|
|
74
|
+
// `pica_send_resend`) and their descriptions ("Resend a pending
|
|
75
|
+
// collaboration invite"). Too close to the verb to lint safely;
|
|
76
|
+
// PR review catches the rare vendor-name leakage.
|
|
77
|
+
"Librosa",
|
|
78
|
+
"Groq",
|
|
79
|
+
"Whisper",
|
|
80
|
+
"Supabase",
|
|
81
|
+
"Sentry",
|
|
82
|
+
"Vercel",
|
|
83
|
+
];
|
|
84
|
+
/**
|
|
85
|
+
* The full lobby filter is the union of both lists — anything banned on
|
|
86
|
+
* authenticated surfaces is also banned on unauthenticated.
|
|
87
|
+
*/
|
|
88
|
+
export const PUBLIC_FORBIDDEN_KEYWORDS_FULL = [
|
|
89
|
+
...PUBLIC_FORBIDDEN_KEYWORDS,
|
|
90
|
+
...AUTHENTICATED_FORBIDDEN_KEYWORDS,
|
|
91
|
+
];
|
|
92
|
+
/**
|
|
93
|
+
* Pattern matching any ADR reference (`ADR-123`, `ADR-1`, `ADR-9999` ...).
|
|
94
|
+
* The `\b` word boundaries prevent false matches on substrings like
|
|
95
|
+
* `LADRADR-`. ADR references are forbidden in every tool description on
|
|
96
|
+
* every surface.
|
|
97
|
+
*/
|
|
98
|
+
export const ADR_REFERENCE_REGEX = /\bADR-\d+\b/;
|
|
99
|
+
//# sourceMappingURL=forbidden-keywords.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forbidden-keywords.js","sourceRoot":"","sources":["../../src/tools/forbidden-keywords.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAsB;IAC1D,KAAK;IACL,MAAM;IACN,aAAa;IACb,UAAU;IACV,SAAS;IACT,UAAU;IACV,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,SAAS;IACT,gBAAgB;IAChB,gBAAgB;IAChB,aAAa;CACd,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAsB;IACjE,SAAS;IACT,UAAU;IACV,2CAA2C;IAC3C,qEAAqE;IACrE,gEAAgE;IAChE,iDAAiD;IACjD,wEAAwE;IACxE,8DAA8D;IAC9D,oEAAoE;IACpE,oEAAoE;IACpE,sDAAsD;IACtD,SAAS;IACT,MAAM;IACN,SAAS;IACT,UAAU;IACV,QAAQ;IACR,QAAQ;CACT,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAsB;IAC/D,GAAG,yBAAyB;IAC5B,GAAG,gCAAgC;CACpC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ADR-193 Surface 2 — gap_hints envelope
|
|
3
|
+
*
|
|
4
|
+
* Proactive capability-named hints appended to read-tool results. When
|
|
5
|
+
* a real gap exists on an entity, a hint names the peer-MCP capability
|
|
6
|
+
* that could fill it (email_search, drive_search, filesystem_search,
|
|
7
|
+
* notes_search, calendar_search — never vendor names like gmail/notion
|
|
8
|
+
* per ADR-190 Principle 2) and pre-fills the `then_call` shape the
|
|
9
|
+
* agent should emit back into PICA.
|
|
10
|
+
*
|
|
11
|
+
* Gated by MCP_GAP_HINTS_ENABLED=1. Off in prod by default; staging
|
|
12
|
+
* enables for holdout verification. Empty array means no real gap —
|
|
13
|
+
* the envelope is additive, never misleading (ADR-193 AC 7).
|
|
14
|
+
*
|
|
15
|
+
* Separate from `CompletionHint` (mcp-utils/formatting.ts): that is a
|
|
16
|
+
* reactive "what's missing" summary; this is a proactive "what to do
|
|
17
|
+
* next, via which peer capability" pointer with a concrete call shape.
|
|
18
|
+
*/
|
|
19
|
+
export type GapCapability = "email_search" | "drive_search" | "filesystem_search" | "notes_search" | "calendar_search" | "web_search";
|
|
20
|
+
export interface GapHint {
|
|
21
|
+
gap: string;
|
|
22
|
+
capability: GapCapability;
|
|
23
|
+
rationale: string;
|
|
24
|
+
query_shape: string;
|
|
25
|
+
then_call: string;
|
|
26
|
+
then_args_shape: Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Read MCP_GAP_HINTS_ENABLED at call time. Not cached so tests can flip
|
|
30
|
+
* it per-case. Returns true only for the explicit "1" value, mirroring
|
|
31
|
+
* the MCP_LAYERED_DISCOVERY pattern at mcp-server/src/config.ts.
|
|
32
|
+
*/
|
|
33
|
+
export declare function gapHintsEnabled(): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* A work is missing an executed agreement when:
|
|
36
|
+
* - the `agreements` section is empty, OR
|
|
37
|
+
* - none of its agreements have a fully-executed status
|
|
38
|
+
*
|
|
39
|
+
* We stay conservative — only fire when there's a clear gap, not when
|
|
40
|
+
* the caller just didn't request the agreements section.
|
|
41
|
+
*/
|
|
42
|
+
export declare function computeWorkGapHints(workResult: Record<string, unknown>): GapHint[];
|
|
43
|
+
export declare function computeAgreementGapHints(agreementResult: Record<string, unknown>): GapHint[];
|
|
44
|
+
export declare function computePersonGapHints(personResult: Record<string, unknown>): GapHint[];
|
|
45
|
+
/**
|
|
46
|
+
* When the pending-proposals list is empty, surface a hint reminding
|
|
47
|
+
* the agent that peer MCPs may hold evidence that would produce
|
|
48
|
+
* proposals. This is the weakest of the four surfaces — the list tool
|
|
49
|
+
* doesn't know which entity's proposals are missing — so we only fire
|
|
50
|
+
* on the empty case and cite the generic flow.
|
|
51
|
+
*/
|
|
52
|
+
export declare function computeProposalListGapHints(listResult: Array<unknown> | undefined): GapHint[];
|
|
53
|
+
//# sourceMappingURL=gap-hints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gap-hints.d.ts","sourceRoot":"","sources":["../../src/tools/gap-hints.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,MAAM,aAAa,GACrB,cAAc,GACd,cAAc,GACd,mBAAmB,GACnB,cAAc,GACd,iBAAiB,GACjB,YAAY,CAAC;AAEjB,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,aAAa,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAMD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,OAAO,EAAE,CAsDX;AAMD,wBAAgB,wBAAwB,CACtC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACvC,OAAO,EAAE,CAuEX;AAMD,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACpC,OAAO,EAAE,CAyEX;AAMD;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,SAAS,GACrC,OAAO,EAAE,CA4BX"}
|