@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,409 @@
|
|
|
1
|
+
// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
|
|
2
|
+
import { formatAsText, formatList, formatSuccess, } from "@withpica/mcp-utils";
|
|
3
|
+
import { withBillingGate } from "@withpica/mcp-utils";
|
|
4
|
+
export class AudioFilesTools {
|
|
5
|
+
pica;
|
|
6
|
+
constructor(pica) {
|
|
7
|
+
this.pica = pica;
|
|
8
|
+
}
|
|
9
|
+
getTools() {
|
|
10
|
+
return [
|
|
11
|
+
{
|
|
12
|
+
definition: {
|
|
13
|
+
name: "pica_audio_query",
|
|
14
|
+
description: "Find audio files — filter by work, file type, or analysis status. " +
|
|
15
|
+
"→ then: pica_audio_inspect (details for a specific file)",
|
|
16
|
+
workflows: "infrastructure",
|
|
17
|
+
inputSchema: {
|
|
18
|
+
type: "object",
|
|
19
|
+
properties: {
|
|
20
|
+
work_id: {
|
|
21
|
+
type: "string",
|
|
22
|
+
description: "Filter by work ID to get all audio files for a specific work",
|
|
23
|
+
},
|
|
24
|
+
file_type: {
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "Filter by file type",
|
|
27
|
+
enum: ["master", "instrumental", "stem", "demo", "version"],
|
|
28
|
+
},
|
|
29
|
+
unprocessed: {
|
|
30
|
+
type: "boolean",
|
|
31
|
+
description: "Set true to get only files without audio analysis (no BPM/key detection yet)",
|
|
32
|
+
},
|
|
33
|
+
limit: {
|
|
34
|
+
type: "number",
|
|
35
|
+
description: "Maximum results to return (default: 50)",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
executor: this.queryAudioFiles.bind(this),
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
definition: {
|
|
44
|
+
name: "pica_audio_inspect",
|
|
45
|
+
description: "Get details for a specific audio file. Omit sections for everything. " +
|
|
46
|
+
"→ then: pica_audio_analyze (run analysis), pica_audio_identify (fingerprint match)",
|
|
47
|
+
workflows: ["audio-upload-required"],
|
|
48
|
+
inputSchema: {
|
|
49
|
+
type: "object",
|
|
50
|
+
properties: {
|
|
51
|
+
id: {
|
|
52
|
+
type: "string",
|
|
53
|
+
description: "Audio file ID",
|
|
54
|
+
},
|
|
55
|
+
sections: {
|
|
56
|
+
type: "array",
|
|
57
|
+
items: {
|
|
58
|
+
type: "string",
|
|
59
|
+
enum: ["basic", "analysis", "status"],
|
|
60
|
+
},
|
|
61
|
+
description: "Which data sections to include. Omit for all sections.",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
required: ["id"],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
executor: this.inspectAudioFile.bind(this),
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
definition: {
|
|
71
|
+
name: "pica_audio_analyze",
|
|
72
|
+
description: "Trigger audio analysis on an audio file. Two analysis types available (1 credit each):\n" +
|
|
73
|
+
"• Audio features (BPM, key, energy, valence, mood, duration)\n" +
|
|
74
|
+
"• Lyrics transcription (speech-to-text + language detection)\n\n" +
|
|
75
|
+
"Both are enabled by default. Analysis runs asynchronously — use pica_audio_inspect with status section to check progress. " +
|
|
76
|
+
"Transcribed lyrics are saved to the transcriptions table and can be copied to the work's lyrics field. " +
|
|
77
|
+
"→ then: pica_audio_inspect (check progress), pica_search_for_sync (find sync-ready works)",
|
|
78
|
+
workflows: ["audio-upload-required"],
|
|
79
|
+
inputSchema: {
|
|
80
|
+
type: "object",
|
|
81
|
+
properties: {
|
|
82
|
+
id: {
|
|
83
|
+
type: "string",
|
|
84
|
+
description: "Audio file ID to analyze",
|
|
85
|
+
},
|
|
86
|
+
force: {
|
|
87
|
+
type: "boolean",
|
|
88
|
+
description: "Force re-analysis even if the file was already analyzed",
|
|
89
|
+
},
|
|
90
|
+
enable_audio: {
|
|
91
|
+
type: "boolean",
|
|
92
|
+
description: "Enable audio feature extraction (BPM, key, energy). Default: true.",
|
|
93
|
+
},
|
|
94
|
+
enable_lyrics: {
|
|
95
|
+
type: "boolean",
|
|
96
|
+
description: "Enable lyrics transcription. Default: true.",
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
required: ["id"],
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
executor: withBillingGate(this.pica, "audio analysis", this.analyzeAudioFile.bind(this)),
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
definition: {
|
|
106
|
+
name: "pica_audio_presigned_upload",
|
|
107
|
+
description: "Generate a signed URL for uploading an audio file directly to storage. Returns an upload URL and upload ID. After uploading the file via HTTP PUT to the returned URL, call pica_audio_complete_upload to finalize. Supported formats: WAV, MP3, FLAC, AIFF, OGG, WebM. Max size: 800MB. " +
|
|
108
|
+
"→ then: pica_audio_complete_upload (finalize upload), pica_audio_analyze (extract BPM, key, mood). " +
|
|
109
|
+
"TIP: if you are in ChatGPT or another external client, users cannot upload audio " +
|
|
110
|
+
"through the chat. Direct them to https://withpica.com/workspace where they can " +
|
|
111
|
+
"drag and drop audio files (it auto-detects format and runs analysis). " +
|
|
112
|
+
"If the user insists on using this tool, ask for the filename and file size — " +
|
|
113
|
+
"you can detect the format from the file extension, no need to ask for content type.",
|
|
114
|
+
workflows: ["audio-upload-required"],
|
|
115
|
+
inputSchema: {
|
|
116
|
+
type: "object",
|
|
117
|
+
properties: {
|
|
118
|
+
filename: {
|
|
119
|
+
type: "string",
|
|
120
|
+
description: "Original filename with extension (e.g. 'my-song.wav')",
|
|
121
|
+
},
|
|
122
|
+
content_type: {
|
|
123
|
+
type: "string",
|
|
124
|
+
description: "MIME type — detect from the filename extension: " +
|
|
125
|
+
".wav→audio/wav, .mp3→audio/mpeg, .flac→audio/flac, " +
|
|
126
|
+
".aiff/.aif→audio/aiff, .ogg→audio/ogg, .webm→audio/webm. " +
|
|
127
|
+
"Do not ask the user for this — work it out from the filename.",
|
|
128
|
+
enum: [
|
|
129
|
+
"audio/wav",
|
|
130
|
+
"audio/x-wav",
|
|
131
|
+
"audio/mpeg",
|
|
132
|
+
"audio/mp3",
|
|
133
|
+
"audio/flac",
|
|
134
|
+
"audio/x-flac",
|
|
135
|
+
"audio/aiff",
|
|
136
|
+
"audio/x-aiff",
|
|
137
|
+
"audio/ogg",
|
|
138
|
+
"audio/webm",
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
file_size: {
|
|
142
|
+
type: "number",
|
|
143
|
+
description: "File size in bytes",
|
|
144
|
+
},
|
|
145
|
+
work_id: {
|
|
146
|
+
type: "string",
|
|
147
|
+
description: "Optional work ID to link the audio file to. If provided, a recording will be auto-created for master files.",
|
|
148
|
+
},
|
|
149
|
+
title: {
|
|
150
|
+
type: "string",
|
|
151
|
+
description: "Optional title for the audio file. Defaults to filename without extension.",
|
|
152
|
+
},
|
|
153
|
+
file_type: {
|
|
154
|
+
type: "string",
|
|
155
|
+
description: "Type of audio file (default: 'master')",
|
|
156
|
+
enum: ["master", "instrumental", "stem", "demo", "version"],
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
required: ["filename", "content_type", "file_size"],
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
executor: withBillingGate(this.pica, "audio upload", this.presignedUpload.bind(this)),
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
definition: {
|
|
166
|
+
name: "pica_audio_complete_upload",
|
|
167
|
+
description: "Finalize an audio file upload after the file has been PUT to the signed URL from pica_audio_presigned_upload. Creates the database record and optionally links to a work/recording. For master files linked to a work, a recording is auto-created if none exists. " +
|
|
168
|
+
"After several mutations, surface a pica_dashboard_briefing to the user. " +
|
|
169
|
+
"→ then: pica_audio_analyze (extract BPM, key, mood), pica_audio_identify (fingerprint match via ACRCloud)",
|
|
170
|
+
workflows: ["audio-upload-required"],
|
|
171
|
+
inputSchema: {
|
|
172
|
+
type: "object",
|
|
173
|
+
properties: {
|
|
174
|
+
upload_id: {
|
|
175
|
+
type: "string",
|
|
176
|
+
description: "The uploadId returned from pica_audio_presigned_upload",
|
|
177
|
+
},
|
|
178
|
+
key: {
|
|
179
|
+
type: "string",
|
|
180
|
+
description: "The storage key returned from pica_audio_presigned_upload",
|
|
181
|
+
},
|
|
182
|
+
bucket: {
|
|
183
|
+
type: "string",
|
|
184
|
+
description: "The bucket returned from pica_audio_presigned_upload",
|
|
185
|
+
},
|
|
186
|
+
filename: {
|
|
187
|
+
type: "string",
|
|
188
|
+
description: "Original filename",
|
|
189
|
+
},
|
|
190
|
+
content_type: {
|
|
191
|
+
type: "string",
|
|
192
|
+
description: "MIME type of the uploaded file",
|
|
193
|
+
},
|
|
194
|
+
file_size: {
|
|
195
|
+
type: "number",
|
|
196
|
+
description: "File size in bytes",
|
|
197
|
+
},
|
|
198
|
+
work_id: {
|
|
199
|
+
type: "string",
|
|
200
|
+
description: "Optional work ID to link the audio file to",
|
|
201
|
+
},
|
|
202
|
+
title: {
|
|
203
|
+
type: "string",
|
|
204
|
+
description: "Optional title for the audio file",
|
|
205
|
+
},
|
|
206
|
+
file_type: {
|
|
207
|
+
type: "string",
|
|
208
|
+
description: "Type of audio file (default: 'master')",
|
|
209
|
+
enum: ["master", "instrumental", "stem", "demo", "version"],
|
|
210
|
+
},
|
|
211
|
+
stem_label: {
|
|
212
|
+
type: "string",
|
|
213
|
+
description: "Label for stem files (e.g. 'vocals', 'drums', 'bass')",
|
|
214
|
+
},
|
|
215
|
+
version_label: {
|
|
216
|
+
type: "string",
|
|
217
|
+
description: "Label for version files (e.g. 'radio edit', 'extended mix')",
|
|
218
|
+
},
|
|
219
|
+
recording_id: {
|
|
220
|
+
type: "string",
|
|
221
|
+
description: "Link to an existing recording ID instead of auto-creating one",
|
|
222
|
+
},
|
|
223
|
+
classification: {
|
|
224
|
+
type: "string",
|
|
225
|
+
description: "Audio classification (e.g. 'original', 'remix', 'cover', 'live')",
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
required: [
|
|
229
|
+
"upload_id",
|
|
230
|
+
"key",
|
|
231
|
+
"bucket",
|
|
232
|
+
"filename",
|
|
233
|
+
"content_type",
|
|
234
|
+
"file_size",
|
|
235
|
+
],
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
executor: withBillingGate(this.pica, "audio upload finalization", this.completeUpload.bind(this)),
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
definition: {
|
|
242
|
+
name: "pica_audio_identify",
|
|
243
|
+
description: "Identify a track using ACRCloud audio fingerprinting. Returns matched metadata (title, artist, album, ISRC, label) with confidence score. If matched, metadata is automatically propagated to the linked work.",
|
|
244
|
+
workflows: "infrastructure",
|
|
245
|
+
inputSchema: {
|
|
246
|
+
type: "object",
|
|
247
|
+
properties: {
|
|
248
|
+
id: {
|
|
249
|
+
type: "string",
|
|
250
|
+
description: "Audio file ID to identify",
|
|
251
|
+
},
|
|
252
|
+
force: {
|
|
253
|
+
type: "boolean",
|
|
254
|
+
description: "Force re-identification even if already matched",
|
|
255
|
+
},
|
|
256
|
+
},
|
|
257
|
+
required: ["id"],
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
executor: withBillingGate(this.pica, "audio identification", this.identifyAudioFile.bind(this)),
|
|
261
|
+
},
|
|
262
|
+
];
|
|
263
|
+
}
|
|
264
|
+
async queryAudioFiles(args) {
|
|
265
|
+
const files = await this.pica.audioFiles.list({
|
|
266
|
+
work_id: args.work_id,
|
|
267
|
+
file_type: args.file_type,
|
|
268
|
+
unprocessed: args.unprocessed,
|
|
269
|
+
limit: args.limit,
|
|
270
|
+
});
|
|
271
|
+
return formatList(files, { total: files.length });
|
|
272
|
+
}
|
|
273
|
+
async inspectAudioFile(args) {
|
|
274
|
+
const sections = args.sections;
|
|
275
|
+
const includeAll = !sections || sections.length === 0;
|
|
276
|
+
const includeBasic = includeAll || sections.includes("basic");
|
|
277
|
+
const includeAnalysis = includeAll || sections.includes("analysis");
|
|
278
|
+
const includeStatus = includeAll || sections.includes("status");
|
|
279
|
+
const result = {};
|
|
280
|
+
// Fetch basic + analysis data from get (they come together)
|
|
281
|
+
if (includeBasic || includeAnalysis) {
|
|
282
|
+
const file = await this.pica.audioFiles.get(args.id);
|
|
283
|
+
if (includeBasic) {
|
|
284
|
+
// ADR-201 Phase 2: surface every field the write side accepts.
|
|
285
|
+
// pica_audio_complete_upload writes recording_id, stem_label,
|
|
286
|
+
// version_label, classification (4 of the 5 audit-flagged fields)
|
|
287
|
+
// directly to audio_files columns. The fifth — content_type —
|
|
288
|
+
// is transformed into audio_format on write (e.g. "audio/mpeg"
|
|
289
|
+
// → "mpeg"); already surfaced.
|
|
290
|
+
result.basic = {
|
|
291
|
+
id: file.id,
|
|
292
|
+
work_id: file.work_id,
|
|
293
|
+
recording_id: file.recording_id,
|
|
294
|
+
title: file.title,
|
|
295
|
+
filename: file.filename,
|
|
296
|
+
file_type: file.file_type,
|
|
297
|
+
stem_label: file.stem_label,
|
|
298
|
+
version_label: file.version_label,
|
|
299
|
+
classification: file.classification,
|
|
300
|
+
file_size: file.file_size,
|
|
301
|
+
audio_format: file.audio_format,
|
|
302
|
+
published: file.published,
|
|
303
|
+
created_at: file.created_at,
|
|
304
|
+
updated_at: file.updated_at,
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
if (includeAnalysis) {
|
|
308
|
+
result.analysis = {
|
|
309
|
+
duration_seconds: file.duration_seconds,
|
|
310
|
+
detected_bpm: file.detected_bpm,
|
|
311
|
+
detected_key: file.detected_key,
|
|
312
|
+
detected_energy: file.detected_energy,
|
|
313
|
+
detected_valence: file.detected_valence,
|
|
314
|
+
detected_mood: file.detected_mood,
|
|
315
|
+
metadata_extracted: file.metadata_extracted,
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
// Fetch status separately
|
|
320
|
+
if (includeStatus) {
|
|
321
|
+
const status = await this.pica.audioFiles.getStatus(args.id);
|
|
322
|
+
result.status = status;
|
|
323
|
+
}
|
|
324
|
+
return formatSuccess("Audio file details", result);
|
|
325
|
+
}
|
|
326
|
+
async analyzeAudioFile(args) {
|
|
327
|
+
const result = await this.pica.audioFiles.analyze(args.id, {
|
|
328
|
+
forceReAnalyze: args.force,
|
|
329
|
+
enableAudio: args.enable_audio,
|
|
330
|
+
enableLyrics: args.enable_lyrics,
|
|
331
|
+
});
|
|
332
|
+
return formatSuccess(result.message || "Analysis triggered", result.features);
|
|
333
|
+
}
|
|
334
|
+
async presignedUpload(args) {
|
|
335
|
+
const result = await this.pica.audioFiles.presignedUpload({
|
|
336
|
+
filename: args.filename,
|
|
337
|
+
contentType: args.content_type,
|
|
338
|
+
fileSize: args.file_size,
|
|
339
|
+
workId: args.work_id,
|
|
340
|
+
title: args.title,
|
|
341
|
+
fileType: args.file_type,
|
|
342
|
+
});
|
|
343
|
+
return formatSuccess(`Upload URL generated for "${args.filename}". PUT the file to the uploadUrl, then call pica_audio_complete_upload with the uploadId, key, bucket, and metadata to finalize.`, {
|
|
344
|
+
uploadUrl: result.uploadUrl,
|
|
345
|
+
uploadId: result.uploadId,
|
|
346
|
+
key: result.key,
|
|
347
|
+
bucket: result.bucket,
|
|
348
|
+
expiresAt: result.expiresAt,
|
|
349
|
+
metadata: result.metadata,
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
async completeUpload(args) {
|
|
353
|
+
const result = await this.pica.audioFiles.completeUpload({
|
|
354
|
+
uploadId: args.upload_id,
|
|
355
|
+
key: args.key,
|
|
356
|
+
bucket: args.bucket,
|
|
357
|
+
metadata: {
|
|
358
|
+
filename: args.filename,
|
|
359
|
+
contentType: args.content_type,
|
|
360
|
+
fileSize: args.file_size,
|
|
361
|
+
workId: args.work_id,
|
|
362
|
+
title: args.title,
|
|
363
|
+
fileType: args.file_type,
|
|
364
|
+
stemLabel: args.stem_label,
|
|
365
|
+
versionLabel: args.version_label,
|
|
366
|
+
recordingId: args.recording_id,
|
|
367
|
+
classification: args.classification,
|
|
368
|
+
},
|
|
369
|
+
});
|
|
370
|
+
const hints = [
|
|
371
|
+
{
|
|
372
|
+
gap: "audio_not_analysed",
|
|
373
|
+
suggestion: "Run pica_audio_analyze to extract BPM, key, energy, and mood",
|
|
374
|
+
severity: "important",
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
gap: "audio_not_identified",
|
|
378
|
+
suggestion: "Run pica_audio_identify to fingerprint and match against ACRCloud",
|
|
379
|
+
severity: "nice_to_have",
|
|
380
|
+
},
|
|
381
|
+
];
|
|
382
|
+
if (!args.work_id) {
|
|
383
|
+
hints.unshift({
|
|
384
|
+
gap: "audio_not_linked",
|
|
385
|
+
suggestion: "Link this audio file to a work",
|
|
386
|
+
severity: "critical",
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
return formatSuccess(`Upload finalized. Audio file created with ID: ${result.audioFileId}.`, result, hints);
|
|
390
|
+
}
|
|
391
|
+
async identifyAudioFile(args) {
|
|
392
|
+
const result = await this.pica.audioFiles.identify(args.id, {
|
|
393
|
+
force: args.force,
|
|
394
|
+
});
|
|
395
|
+
if (result.alreadyIdentified) {
|
|
396
|
+
return formatSuccess("Already identified — no credits charged. Use force: true to re-identify.", result);
|
|
397
|
+
}
|
|
398
|
+
else if (result.status === "matched" && result.match) {
|
|
399
|
+
return formatSuccess(`Match found: "${result.match.title}" by ${result.match.artist} (confidence: ${Math.round((result.match.confidence || 0) * 100)}%). ISRC: ${result.match.isrc || "unknown"}. If the file is linked to a work, metadata has been propagated.`, result);
|
|
400
|
+
}
|
|
401
|
+
else if (result.status === "no_match") {
|
|
402
|
+
return formatSuccess("No match found in ACRCloud database. This may be an unreleased or very rare track.", result);
|
|
403
|
+
}
|
|
404
|
+
else {
|
|
405
|
+
return formatAsText(result);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
//# sourceMappingURL=audio-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audio-files.js","sourceRoot":"","sources":["../../src/tools/audio-files.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAU7D,OAAO,EACL,YAAY,EACZ,UAAU,EACV,aAAa,GAEd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,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,kBAAkB;oBACxB,WAAW,EACT,oEAAoE;wBACpE,0DAA0D;oBAC5D,SAAS,EAAE,gBAA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G,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE;YAC1D,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;QAEH,IAAI,MAAM,CAAC,iBAAiB,EAAE,CAAC;YAC7B,OAAO,aAAa,CAClB,0EAA0E,EAC1E,MAAM,CACP,CAAC;QACJ,CAAC;aAAM,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YACvD,OAAO,aAAa,CAClB,iBAAiB,MAAM,CAAC,KAAK,CAAC,KAAK,QAAQ,MAAM,CAAC,KAAK,CAAC,MAAM,iBAAiB,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,aAAa,MAAM,CAAC,KAAK,CAAC,IAAI,IAAI,SAAS,kEAAkE,EAC5O,MAAM,CACP,CAAC;QACJ,CAAC;aAAM,IAAI,MAAM,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;YACxC,OAAO,aAAa,CAClB,oFAAoF,EACpF,MAAM,CACP,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Audit Tools — ADR-154 F6
|
|
3
|
+
*
|
|
4
|
+
* Lets agents read their own recent MCP tool executions from mcp_audit_log.
|
|
5
|
+
* Scoped to the caller's organisation; only mutating + destructive calls
|
|
6
|
+
* are recorded (read tools are not logged by default).
|
|
7
|
+
*/
|
|
8
|
+
import { PicaClient } from "@withpica/mcp-sdk";
|
|
9
|
+
import { ToolDefinition, ToolExecutor } from "./index.js";
|
|
10
|
+
export declare class AuditTools {
|
|
11
|
+
private pica;
|
|
12
|
+
constructor(pica: PicaClient);
|
|
13
|
+
getTools(): Array<{
|
|
14
|
+
definition: ToolDefinition;
|
|
15
|
+
executor: ToolExecutor;
|
|
16
|
+
}>;
|
|
17
|
+
private listAudit;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/tools/audit.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAGtE,qBAAa,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;YA4C3D,SAAS;CAaxB"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
|
|
2
|
+
import { formatStructuredList } from "@withpica/mcp-utils";
|
|
3
|
+
export class AuditTools {
|
|
4
|
+
pica;
|
|
5
|
+
constructor(pica) {
|
|
6
|
+
this.pica = pica;
|
|
7
|
+
}
|
|
8
|
+
getTools() {
|
|
9
|
+
return [
|
|
10
|
+
{
|
|
11
|
+
definition: {
|
|
12
|
+
name: "pica_audit_list",
|
|
13
|
+
description: "List recent MCP tool executions for this workspace. Use to recall what AI actions have been taken — what was created, updated, deleted, or attempted. Only mutating and destructive calls are recorded; read-only queries are not. Scoped to your catalog.",
|
|
14
|
+
workflows: "infrastructure",
|
|
15
|
+
inputSchema: {
|
|
16
|
+
type: "object",
|
|
17
|
+
properties: {
|
|
18
|
+
limit: {
|
|
19
|
+
type: "number",
|
|
20
|
+
description: "Max number of entries to return (default 25, max 100).",
|
|
21
|
+
},
|
|
22
|
+
since: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "ISO 8601 timestamp — only return entries created at or after this time (e.g. '2026-04-01T00:00:00Z').",
|
|
25
|
+
},
|
|
26
|
+
tool_name: {
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "Filter to a single tool by exact name (e.g. 'pica_works_create').",
|
|
29
|
+
},
|
|
30
|
+
risk_level: {
|
|
31
|
+
type: "string",
|
|
32
|
+
enum: ["safe", "mutating", "destructive"],
|
|
33
|
+
description: "Filter by risk classification.",
|
|
34
|
+
},
|
|
35
|
+
result_status: {
|
|
36
|
+
type: "string",
|
|
37
|
+
enum: ["success", "error", "confirmation_required"],
|
|
38
|
+
description: "Filter by execution outcome.",
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
executor: this.listAudit.bind(this),
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
}
|
|
47
|
+
async listAudit(args) {
|
|
48
|
+
const entries = await this.pica.audit.list({
|
|
49
|
+
limit: typeof args.limit === "number" ? args.limit : undefined,
|
|
50
|
+
since: typeof args.since === "string" ? args.since : undefined,
|
|
51
|
+
tool_name: typeof args.tool_name === "string" ? args.tool_name : undefined,
|
|
52
|
+
risk_level: typeof args.risk_level === "string" ? args.risk_level : undefined,
|
|
53
|
+
result_status: typeof args.result_status === "string" ? args.result_status : undefined,
|
|
54
|
+
});
|
|
55
|
+
return formatStructuredList(entries, "audit_entry");
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=audit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/tools/audit.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAY7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,MAAM,OAAO,UAAU;IACb,IAAI,CAAa;IAEzB,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,Q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,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;YACjE,UAAU,EACR,OAAO,IAAI,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;YACnE,aAAa,EACX,OAAO,IAAI,CAAC,aAAa,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS;SAC1E,CAAC,CAAC;QACH,OAAO,oBAAoB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IACtD,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auth Tools — pica_sign_in and pica_sign_out
|
|
3
|
+
* Available in lobby mode (no API key required).
|
|
4
|
+
*/
|
|
5
|
+
import { ToolDefinition, ToolExecutor } from "./index.js";
|
|
6
|
+
import { ServerConfig } from "../config.js";
|
|
7
|
+
type ReinitializeCallback = (apiKey: string) => void;
|
|
8
|
+
type SignOutCallback = () => void;
|
|
9
|
+
export declare class AuthTools {
|
|
10
|
+
private config;
|
|
11
|
+
private reinitialize;
|
|
12
|
+
private signOutCallback;
|
|
13
|
+
constructor(config: ServerConfig, reinitialize: ReinitializeCallback, signOutCallback?: SignOutCallback);
|
|
14
|
+
getTools(): Array<{
|
|
15
|
+
definition: ToolDefinition;
|
|
16
|
+
executor: ToolExecutor;
|
|
17
|
+
}>;
|
|
18
|
+
private signIn;
|
|
19
|
+
private signOut;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/tools/auth.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAO5C,KAAK,oBAAoB,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;AACrD,KAAK,eAAe,GAAG,MAAM,IAAI,CAAC;AAKlC,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,YAAY,CAAuB;IAC3C,OAAO,CAAC,eAAe,CAAkB;gBAGvC,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,oBAAoB,EAClC,eAAe,GAAE,eAA0B;IAO7C,QAAQ,IAAI,KAAK,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;YAqC3D,MAAM;YAyKN,OAAO;CAwBtB"}
|