@marlinjai/studio-mcp 0.6.0 → 0.7.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/dist/index.d.ts CHANGED
@@ -907,6 +907,45 @@ interface ProjectSummary {
907
907
  slug: string;
908
908
  name: string;
909
909
  }
910
+ /** `GET /api/v1/projects/:id`: the project and what deleting it would remove. */
911
+ interface ProjectContents {
912
+ project: ProjectSummary & {
913
+ isDefault: boolean;
914
+ };
915
+ workflows: number;
916
+ publishedWorkflows: number;
917
+ runs: number;
918
+ assets: number;
919
+ chats: number;
920
+ campaignShots: number;
921
+ campaigns: number;
922
+ jobsInFlight: number;
923
+ runsInFlight: number;
924
+ }
925
+ /** One row of `GET /api/v1/workflows`. */
926
+ interface SavedWorkflowListing {
927
+ savedId: string;
928
+ label: string;
929
+ version?: number;
930
+ [key: string]: unknown;
931
+ }
932
+ /** One row of `GET /api/campaigns`. */
933
+ interface CampaignListing {
934
+ id: string;
935
+ name: string;
936
+ studioId: string;
937
+ shotCount: number | null;
938
+ createdAt: string;
939
+ }
940
+ /** `GET /api/campaigns/:id`: the campaign and what deleting it would remove or keep. */
941
+ interface CampaignContents {
942
+ id: string;
943
+ name: string;
944
+ createdAt: string;
945
+ shots: number;
946
+ imagesKept: number;
947
+ shotsRendering: number;
948
+ }
910
949
  type JobStatus = 'queued' | 'running' | 'succeeded' | 'failed' | 'canceled' | (string & {});
911
950
  interface JobResponse {
912
951
  job: {
@@ -1247,6 +1286,48 @@ declare class StudioClient {
1247
1286
  listProjects(): Promise<{
1248
1287
  projects: ProjectSummary[];
1249
1288
  }>;
1289
+ createProject(name: string): Promise<{
1290
+ project: ProjectSummary & {
1291
+ isDefault: boolean;
1292
+ };
1293
+ }>;
1294
+ renameProject(projectId: string, name: string): Promise<{
1295
+ project: ProjectSummary & {
1296
+ isDefault: boolean;
1297
+ };
1298
+ }>;
1299
+ /** What a project holds, which is what deleting it would remove. */
1300
+ describeProject(projectId: string): Promise<ProjectContents>;
1301
+ deleteProject(projectId: string): Promise<{
1302
+ deleted: true;
1303
+ project: ProjectSummary;
1304
+ fallbackProjectId: string;
1305
+ }>;
1306
+ listWorkflows(opts?: {
1307
+ projectId?: string;
1308
+ }): Promise<{
1309
+ workflows: SavedWorkflowListing[];
1310
+ }>;
1311
+ moveWorkflow(savedId: string, body: {
1312
+ toProjectId: string;
1313
+ projectId?: string;
1314
+ }): Promise<{
1315
+ moved: true;
1316
+ savedId: string;
1317
+ projectId: string;
1318
+ runsMoved: number;
1319
+ assetsMoved: number;
1320
+ }>;
1321
+ listCampaigns(): Promise<{
1322
+ campaigns: CampaignListing[];
1323
+ }>;
1324
+ /** The campaign and what deleting it would remove or keep. */
1325
+ describeCampaign(campaignId: string): Promise<CampaignContents>;
1326
+ deleteCampaign(campaignId: string): Promise<{
1327
+ deleted: true;
1328
+ id: string;
1329
+ shotsDeleted: number;
1330
+ }>;
1250
1331
  /**
1251
1332
  * One image job. `brandSlug` is optional: without it the image is generated
1252
1333
  * with no brand. A `brandSlug` or `characterSlug` the key's company cannot
@@ -1493,6 +1574,22 @@ declare function pollUntil<T>(what: string, fetchState: () => Promise<T>, isDone
1493
1574
  declare function waitForJob(client: StudioClient, jobId: string, opts?: PollOptions): Promise<JobResponse>;
1494
1575
  declare function waitForRun(client: StudioClient, runId: string, opts?: PollOptions): Promise<RunResponse>;
1495
1576
 
1577
+ /** What a confirmation ended in. `unavailable`: the client cannot ask the person. */
1578
+ type ConfirmOutcome = 'confirmed' | 'declined' | 'unavailable';
1579
+ type ConfirmFn = (message: string) => Promise<ConfirmOutcome>;
1580
+ /**
1581
+ * One-time confirmation tokens for clients without elicitation. A token names
1582
+ * the exact `subject` the person was shown (the action, the target and a
1583
+ * fingerprint of its contents), so it cannot be spent on anything else.
1584
+ */
1585
+ declare class ConfirmationStore {
1586
+ #private;
1587
+ constructor(now?: () => number);
1588
+ issue(subject: string): string;
1589
+ /** True once for a live token issued for exactly this subject; the token is spent either way. */
1590
+ redeem(token: string, subject: string): boolean;
1591
+ }
1592
+
1496
1593
  /**
1497
1594
  * The shape of one tool in the catalog, shared by `tools.ts` (the recipe and
1498
1595
  * entity tools) and `workflowTools.ts` (the workflow command-model primitives)
@@ -1503,6 +1600,14 @@ interface ToolContext {
1503
1600
  client: StudioClient;
1504
1601
  /** Poll tuning (tests inject a zero-delay sleep). */
1505
1602
  poll?: Omit<PollOptions, 'timeoutMs'>;
1603
+ /**
1604
+ * Ask the PERSON to confirm a destructive action in the chat (Model Context
1605
+ * Protocol elicitation). `registerTools` wires it to the connected client;
1606
+ * resolves `unavailable` when the client cannot show the dialog.
1607
+ */
1608
+ confirm?: ConfirmFn;
1609
+ /** One-time confirmation tokens, the fallback for a client without elicitation. */
1610
+ confirmations?: ConfirmationStore;
1506
1611
  }
1507
1612
  interface ToolDef<Shape extends z.ZodRawShape = z.ZodRawShape> {
1508
1613
  name: string;
@@ -1543,7 +1648,7 @@ type ToolResult = {
1543
1648
  * an MCP tool error whose text is the API's own message, redacted of the key.
1544
1649
  */
1545
1650
  declare function invokeTool<Shape extends z.ZodRawShape>(def: ToolDef<Shape>, args: unknown, ctx: ToolContext): Promise<ToolResult>;
1546
- declare function registerTools(server: McpServer, ctx: ToolContext): void;
1651
+ declare function registerTools(server: McpServer, base: ToolContext): void;
1547
1652
 
1548
1653
  /**
1549
1654
  * Build an McpServer with the Studio tool catalog registered. Transport-agnostic:
@@ -1551,7 +1656,7 @@ declare function registerTools(server: McpServer, ctx: ToolContext): void;
1551
1656
  */
1552
1657
 
1553
1658
  declare const SERVER_NAME = "lumitra-studio";
1554
- declare const SERVER_VERSION = "0.6.0";
1659
+ declare const SERVER_VERSION = "0.7.0";
1555
1660
  interface CreateServerOptions {
1556
1661
  config?: StudioConfig;
1557
1662
  env?: NodeJS.ProcessEnv;
@@ -2911,4 +3016,4 @@ declare function parseArgs(argv: string[]): CliArgs;
2911
3016
  declare function createHttpHandler(): (req: IncomingMessage, res: ServerResponse) => Promise<void>;
2912
3017
  declare function main(argv?: string[]): Promise<void>;
2913
3018
 
2914
- export { type AllTenantsUsageResponse, type Binding, CHARACTER_SHEET_DEFINITION, CHARACTER_SHEET_NODES, type CandidatePlan, type CharacterReference, type CharacterSummary, type CharacterSwapInput, ConfigError, ContractError, type CreateServerOptions, DEFAULT_BASE_URL, DEFAULT_MOTION_PROMPT, DEFAULT_SWAP_EDIT_MODEL, DEFAULT_SWAP_PROMPT, DEFAULT_SWAP_VIDEO_MODEL, DEFAULT_TIMEOUT_MS, type DocumentSummary, type FetchLike, type GenerateImageResponse, type JobResponse, type JobStatus, type JudgeCandidate, MINT_REFERENCE_CATEGORIES, type NodeResultResponse, type NodeRun, type NodeStatus, type NodeSummary, type NodeTypesResponse, type PollOptions, PollTimeoutError, type ProjectSummary, type Projection, type RemovedNode, type RunResponse, type RunStartResponse, type RunStatus, SERVER_NAME, SERVER_VERSION, SUMMARY_TEXT_CHARS, SWAP_SCOPES, type SpendLedger, StudioApiError, StudioClient, type StudioClientOptions, type StudioConfig, type StudioMcp, type SummaryMeta, type SwapPromptOptions, type SwapScope, TOOLS, TOOL_NAMES, type TaskDescriptor, type TenantSpendSummary, type TenantUsageResponse, type ToolContext, type ToolDef, ToolInputError, type ToolResult, type TurnaroundView, type UploadFile, type UsageByModel, type UsageResponse, WORKFLOW_TOOLS, type WorkflowApplyResponse, type WorkflowCreateResponse, type WorkflowDefinition, type WorkflowDocumentResponse, type WorkflowNode, type WorkflowValidateResponse, affectedNodes, buildCharacterSheetParams, buildCharacterSwapDefinition, categoryForNode, characterSheetDefinition, composeSwapPrompt, createHttpHandler, createStudioMcpServer, extensionForMime, filenameFromUrl, invokeTool, main, mimeForFilename, parseArgs, parseDocument, parseOps, pollUntil, projectionOf, redactSecret, registerTools, resolveConfig, seedFacePrompt, studioWorkflowApply, studioWorkflowCreate, studioWorkflowDescribe, studioWorkflowGet, studioWorkflowScreenshot, studioWorkflowValidate, summarizeDocument, summarizeNode, touchedNodeIds, turnaroundViewPrompt, waitForJob, waitForRun };
3019
+ export { type AllTenantsUsageResponse, type Binding, CHARACTER_SHEET_DEFINITION, CHARACTER_SHEET_NODES, type CampaignContents, type CampaignListing, type CandidatePlan, type CharacterReference, type CharacterSummary, type CharacterSwapInput, ConfigError, ContractError, type CreateServerOptions, DEFAULT_BASE_URL, DEFAULT_MOTION_PROMPT, DEFAULT_SWAP_EDIT_MODEL, DEFAULT_SWAP_PROMPT, DEFAULT_SWAP_VIDEO_MODEL, DEFAULT_TIMEOUT_MS, type DocumentSummary, type FetchLike, type GenerateImageResponse, type JobResponse, type JobStatus, type JudgeCandidate, MINT_REFERENCE_CATEGORIES, type NodeResultResponse, type NodeRun, type NodeStatus, type NodeSummary, type NodeTypesResponse, type PollOptions, PollTimeoutError, type ProjectContents, type ProjectSummary, type Projection, type RemovedNode, type RunResponse, type RunStartResponse, type RunStatus, SERVER_NAME, SERVER_VERSION, SUMMARY_TEXT_CHARS, SWAP_SCOPES, type SavedWorkflowListing, type SpendLedger, StudioApiError, StudioClient, type StudioClientOptions, type StudioConfig, type StudioMcp, type SummaryMeta, type SwapPromptOptions, type SwapScope, TOOLS, TOOL_NAMES, type TaskDescriptor, type TenantSpendSummary, type TenantUsageResponse, type ToolContext, type ToolDef, ToolInputError, type ToolResult, type TurnaroundView, type UploadFile, type UsageByModel, type UsageResponse, WORKFLOW_TOOLS, type WorkflowApplyResponse, type WorkflowCreateResponse, type WorkflowDefinition, type WorkflowDocumentResponse, type WorkflowNode, type WorkflowValidateResponse, affectedNodes, buildCharacterSheetParams, buildCharacterSwapDefinition, categoryForNode, characterSheetDefinition, composeSwapPrompt, createHttpHandler, createStudioMcpServer, extensionForMime, filenameFromUrl, invokeTool, main, mimeForFilename, parseArgs, parseDocument, parseOps, pollUntil, projectionOf, redactSecret, registerTools, resolveConfig, seedFacePrompt, studioWorkflowApply, studioWorkflowCreate, studioWorkflowDescribe, studioWorkflowGet, studioWorkflowScreenshot, studioWorkflowValidate, summarizeDocument, summarizeNode, touchedNodeIds, turnaroundViewPrompt, waitForJob, waitForRun };