@tangle-network/agent-app 0.39.0 → 0.39.1
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/{auth-BlS9GWfL.d.ts → auth-DcK5ERaL.d.ts} +7 -4
- package/dist/{chunk-IOREXWLM.js → chunk-2FDTJIU4.js} +8 -35
- package/dist/{chunk-IOREXWLM.js.map → chunk-2FDTJIU4.js.map} +1 -1
- package/dist/{chunk-CDYYR3Z7.js → chunk-AF5ZST7M.js} +60 -26
- package/dist/chunk-AF5ZST7M.js.map +1 -0
- package/dist/{chunk-JT6HHO5P.js → chunk-BUUJ7TEQ.js} +8 -33
- package/dist/{chunk-JT6HHO5P.js.map → chunk-BUUJ7TEQ.js.map} +1 -1
- package/dist/{chunk-VT5DI6GL.js → chunk-FDJ6JQCI.js} +3 -3
- package/dist/{chunk-JZZ6AWF4.js → chunk-PPSZNVKT.js} +9 -7
- package/dist/chunk-PPSZNVKT.js.map +1 -0
- package/dist/{chunk-A76ZHWNF.js → chunk-RH74YJIK.js} +31 -1
- package/dist/chunk-RH74YJIK.js.map +1 -0
- package/dist/{chunk-4IQMTTNE.js → chunk-TQ5M7BFV.js} +2 -2
- package/dist/design-canvas/index.d.ts +8 -21
- package/dist/design-canvas/index.js +2 -2
- package/dist/eval/index.d.ts +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +10 -9
- package/dist/{mcp-BShTlESm.d.ts → mcp-4I_RHhNa.d.ts} +38 -3
- package/dist/preset-cloudflare/index.d.ts +1 -1
- package/dist/runtime/index.d.ts +3 -3
- package/dist/runtime/index.js +2 -2
- package/dist/sandbox/index.d.ts +2 -2
- package/dist/sandbox/index.js +4 -4
- package/dist/sequences/index.d.ts +10 -27
- package/dist/sequences/index.js +5 -4
- package/dist/tools/index.d.ts +5 -5
- package/dist/tools/index.js +5 -3
- package/dist/{types-2rOJo8Hc.d.ts → types-wHs0rmtu.d.ts} +12 -1
- package/package.json +1 -1
- package/dist/chunk-A76ZHWNF.js.map +0 -1
- package/dist/chunk-CDYYR3Z7.js.map +0 -1
- package/dist/chunk-JZZ6AWF4.js.map +0 -1
- /package/dist/{chunk-VT5DI6GL.js.map → chunk-FDJ6JQCI.js.map} +0 -0
- /package/dist/{chunk-4IQMTTNE.js.map → chunk-TQ5M7BFV.js.map} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
authenticateToolRequest
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RH74YJIK.js";
|
|
4
4
|
import {
|
|
5
5
|
dispatchAppTool,
|
|
6
6
|
outcomeStatus
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PPSZNVKT.js";
|
|
8
8
|
|
|
9
9
|
// src/crypto/web-token.ts
|
|
10
10
|
function base64UrlEncode(bytes) {
|
|
@@ -151,4 +151,4 @@ export {
|
|
|
151
151
|
restrictTaxonomy,
|
|
152
152
|
handleAppToolRequest
|
|
153
153
|
};
|
|
154
|
-
//# sourceMappingURL=chunk-
|
|
154
|
+
//# sourceMappingURL=chunk-FDJ6JQCI.js.map
|
|
@@ -16,13 +16,15 @@ var NAME_SET = new Set(APP_TOOL_NAMES);
|
|
|
16
16
|
function isAppToolName(name) {
|
|
17
17
|
return NAME_SET.has(name);
|
|
18
18
|
}
|
|
19
|
-
function buildAppToolOpenAITools(taxonomy) {
|
|
19
|
+
function buildAppToolOpenAITools(taxonomy, opts) {
|
|
20
|
+
const d = opts?.descriptions;
|
|
21
|
+
const priorityValues = opts?.priorityValues ?? ["low", "medium", "high"];
|
|
20
22
|
return [
|
|
21
23
|
{
|
|
22
24
|
type: "function",
|
|
23
25
|
function: {
|
|
24
26
|
name: "submit_proposal",
|
|
25
|
-
description: "Route a regulated or state-changing action to a human for approval (a recommendation, contacting/soliciting a contact, outreach, a record/account change, scheduling). Queues it for a named certified human to approve before it executes.",
|
|
27
|
+
description: d?.submit_proposal ?? "Route a regulated or state-changing action to a human for approval (a recommendation, contacting/soliciting a contact, outreach, a record/account change, scheduling). Queues it for a named certified human to approve before it executes.",
|
|
26
28
|
parameters: {
|
|
27
29
|
type: "object",
|
|
28
30
|
properties: {
|
|
@@ -38,13 +40,13 @@ function buildAppToolOpenAITools(taxonomy) {
|
|
|
38
40
|
type: "function",
|
|
39
41
|
function: {
|
|
40
42
|
name: "schedule_followup",
|
|
41
|
-
description: "Register a dated cadence step (a reminder, chase, or check-in) on the follow-up calendar. Executes immediately.",
|
|
43
|
+
description: d?.schedule_followup ?? "Register a dated cadence step (a reminder, chase, or check-in) on the follow-up calendar. Executes immediately.",
|
|
42
44
|
parameters: {
|
|
43
45
|
type: "object",
|
|
44
46
|
properties: {
|
|
45
47
|
title: { type: "string" },
|
|
46
48
|
dueDate: { type: "string", description: "ISO date YYYY-MM-DD." },
|
|
47
|
-
priority: { type: "string", enum: [
|
|
49
|
+
priority: { type: "string", enum: [...priorityValues] }
|
|
48
50
|
},
|
|
49
51
|
required: ["title", "dueDate"]
|
|
50
52
|
}
|
|
@@ -54,7 +56,7 @@ function buildAppToolOpenAITools(taxonomy) {
|
|
|
54
56
|
type: "function",
|
|
55
57
|
function: {
|
|
56
58
|
name: "render_ui",
|
|
57
|
-
description: "Show a generated view live in the workspace. Validates the OpenUI JSON and persists the artifact. Executes immediately.",
|
|
59
|
+
description: d?.render_ui ?? "Show a generated view live in the workspace. Validates the OpenUI JSON and persists the artifact. Executes immediately.",
|
|
58
60
|
parameters: {
|
|
59
61
|
type: "object",
|
|
60
62
|
properties: {
|
|
@@ -69,7 +71,7 @@ function buildAppToolOpenAITools(taxonomy) {
|
|
|
69
71
|
type: "function",
|
|
70
72
|
function: {
|
|
71
73
|
name: "add_citation",
|
|
72
|
-
description: "Anchor a grounding reference: the exact quote from a file backing a figure or claim. Verifies the quote appears in the file. Executes immediately.",
|
|
74
|
+
description: d?.add_citation ?? "Anchor a grounding reference: the exact quote from a file backing a figure or claim. Verifies the quote appears in the file. Executes immediately.",
|
|
73
75
|
parameters: {
|
|
74
76
|
type: "object",
|
|
75
77
|
properties: {
|
|
@@ -157,4 +159,4 @@ export {
|
|
|
157
159
|
outcomeStatus,
|
|
158
160
|
createAppToolRuntimeExecutor
|
|
159
161
|
};
|
|
160
|
-
//# sourceMappingURL=chunk-
|
|
162
|
+
//# sourceMappingURL=chunk-PPSZNVKT.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tools/errors.ts","../src/tools/openai.ts","../src/tools/dispatch.ts","../src/tools/runtime.ts"],"sourcesContent":["/** A correctable bad-input error a tool handler throws; the HTTP layer maps it\n * to a 4xx with the code, the runtime layer to a failed tool_result. So the\n * agent learns the call failed and can correct, instead of a silent success. */\nexport class ToolInputError extends Error {\n constructor(\n public code: string,\n message: string,\n public status = 400,\n ) {\n super(message)\n this.name = 'ToolInputError'\n }\n}\n","import type { AppToolTaxonomy, BuildAppToolsOptions } from './types'\n\n/** The four canonical app-tool names. Stable identifiers the model calls in\n * both the sandbox (MCP server name) and runtime (function-tool name) paths. */\nexport const APP_TOOL_NAMES = ['submit_proposal', 'schedule_followup', 'render_ui', 'add_citation'] as const\nexport type AppToolName = (typeof APP_TOOL_NAMES)[number]\n\nconst NAME_SET = new Set<string>(APP_TOOL_NAMES)\nexport function isAppToolName(name: string): name is AppToolName {\n return NAME_SET.has(name)\n}\n\n/** A minimal OpenAI Chat Completions function-tool shape — structurally\n * compatible with `@tangle-network/agent-runtime`'s `OpenAIChatTool` without\n * importing it (keeps this package runtime-free). */\nexport interface OpenAIFunctionTool {\n type: 'function'\n function: {\n name: string\n description: string\n parameters: Record<string, unknown>\n }\n}\n\n/**\n * Build the four app tools in OpenAI function-tool shape. `submit_proposal`'s\n * `type` enum is the product's {@link AppToolTaxonomy.proposalTypes}; the\n * model-facing descriptions and the follow-up priority enum default to the\n * Tangle reference vocabulary and can be retuned via {@link BuildAppToolsOptions}\n * (the tool names + JSON-Schema shapes stay fixed — they are mechanism). Pass\n * the result to the agent-runtime backend's `tools`.\n */\nexport function buildAppToolOpenAITools(\n taxonomy: AppToolTaxonomy,\n opts?: BuildAppToolsOptions,\n): OpenAIFunctionTool[] {\n const d = opts?.descriptions\n const priorityValues = opts?.priorityValues ?? ['low', 'medium', 'high']\n return [\n {\n type: 'function',\n function: {\n name: 'submit_proposal',\n description:\n d?.submit_proposal ??\n 'Route a regulated or state-changing action to a human for approval (a recommendation, contacting/soliciting a contact, outreach, a record/account change, scheduling). Queues it for a named certified human to approve before it executes.',\n parameters: {\n type: 'object',\n properties: {\n type: { type: 'string', enum: [...taxonomy.proposalTypes] },\n title: { type: 'string', description: 'Short label for the approval queue.' },\n description: { type: 'string', description: 'The full drafted message/recommendation, with sources.' },\n },\n required: ['type', 'title'],\n },\n },\n },\n {\n type: 'function',\n function: {\n name: 'schedule_followup',\n description:\n d?.schedule_followup ??\n 'Register a dated cadence step (a reminder, chase, or check-in) on the follow-up calendar. Executes immediately.',\n parameters: {\n type: 'object',\n properties: {\n title: { type: 'string' },\n dueDate: { type: 'string', description: 'ISO date YYYY-MM-DD.' },\n priority: { type: 'string', enum: [...priorityValues] },\n },\n required: ['title', 'dueDate'],\n },\n },\n },\n {\n type: 'function',\n function: {\n name: 'render_ui',\n description:\n d?.render_ui ??\n 'Show a generated view live in the workspace. Validates the OpenUI JSON and persists the artifact. Executes immediately.',\n parameters: {\n type: 'object',\n properties: {\n title: { type: 'string' },\n schema: { type: 'object', description: 'The OpenUI JSON object.' },\n },\n required: ['title', 'schema'],\n },\n },\n },\n {\n type: 'function',\n function: {\n name: 'add_citation',\n description:\n d?.add_citation ??\n 'Anchor a grounding reference: the exact quote from a file backing a figure or claim. Verifies the quote appears in the file. Executes immediately.',\n parameters: {\n type: 'object',\n properties: {\n path: { type: 'string', description: 'The vault file path.' },\n quote: { type: 'string', description: 'The exact text from it.' },\n },\n required: ['path', 'quote'],\n },\n },\n },\n ]\n}\n","import { ToolInputError } from './errors'\nimport { isAppToolName } from './openai'\nimport type {\n AppToolContext,\n AppToolHandlers,\n AppToolOutcome,\n AppToolProducedEvent,\n AppToolTaxonomy,\n} from './types'\n\nexport interface DispatchOptions {\n handlers: AppToolHandlers\n taxonomy: AppToolTaxonomy\n /** Per-call approval policy. When provided it OVERRIDES the static\n * `taxonomy.regulatedTypes` membership check, so products can gate by\n * cost threshold, environment, or first-use instead of always/never.\n * Fail-closed: a predicate that throws counts as \"approval required\". */\n needsApproval?: (type: string, args: { title: string; description: string | null }, ctx: AppToolContext) => boolean | Promise<boolean>\n /** Called at the real side-effect site for proposals (proposal_created) and\n * generated views (artifact) so a consumer's completion oracle credits\n * persisted state. Omit when produced state isn't tracked. */\n onProduced?: (event: AppToolProducedEvent) => void\n}\n\n/**\n * The ONE place an app-tool call is validated, dispatched to the product's\n * handler, and turned into an {@link AppToolOutcome} + produced events. Shared\n * by the HTTP route layer and the agent-runtime executor so both paths apply\n * identical validation and identical side effects. A {@link ToolInputError}\n * (bad input the agent can correct) and any other throw both become\n * `{ ok: false }` — a tool call never silently \"succeeds\" without its effect.\n */\nexport async function dispatchAppTool(\n toolName: string,\n rawArgs: Record<string, unknown>,\n ctx: AppToolContext,\n opts: DispatchOptions,\n): Promise<AppToolOutcome> {\n try {\n if (!isAppToolName(toolName)) {\n return { ok: false, code: 'unknown_tool', message: `${toolName} is not an app tool.` }\n }\n\n if (toolName === 'submit_proposal') {\n const type = String(rawArgs.type ?? '').trim()\n const title = String(rawArgs.title ?? '').trim()\n if (!type || !opts.taxonomy.proposalTypes.includes(type)) {\n return { ok: false, code: 'invalid_type', message: `type must be one of: ${opts.taxonomy.proposalTypes.join(', ')}.` }\n }\n if (!title) return { ok: false, code: 'missing_title', message: 'title is required.' }\n const description = rawArgs.description == null ? null : String(rawArgs.description)\n // Approval policy runs BEFORE the handler so the decision can gate the\n // side effect itself, not merely re-label it afterwards.\n let regulated = opts.taxonomy.regulatedTypes.includes(type)\n if (opts.needsApproval) {\n try {\n regulated = await opts.needsApproval(type, { title, description }, ctx)\n } catch {\n regulated = true // fail-closed: a broken policy means approval required\n }\n }\n const r = await opts.handlers.submitProposal({ type, title, description, regulated }, ctx)\n // Pass the handler's result through: products with immediate-execute\n // proposal types return status 'executed' plus their own fields\n // (e.g. datasetId) — the model must see what actually happened, not a\n // hard-coded \"queued for approval\".\n const { proposalId, deduped, status, ...extra } = r\n const effectiveStatus = status ?? 'queued_for_approval'\n opts.onProduced?.({\n type: 'proposal_created',\n proposalId,\n title,\n status: effectiveStatus === 'executed' ? 'executed' : 'pending',\n content: description ?? undefined,\n })\n return { ok: true, result: { ...extra, status: effectiveStatus, proposalId, deduped, regulated } }\n }\n\n if (toolName === 'schedule_followup') {\n const r = await opts.handlers.scheduleFollowup(\n { title: String(rawArgs.title ?? ''), dueDate: String(rawArgs.dueDate ?? ''), priority: rawArgs.priority as string | undefined },\n ctx,\n )\n return { ok: true, result: { followupId: r.id, dueDate: r.dueDate, deduped: r.deduped } }\n }\n\n if (toolName === 'render_ui') {\n const r = await opts.handlers.renderUi({ title: String(rawArgs.title ?? ''), schema: rawArgs.schema }, ctx)\n opts.onProduced?.({ type: 'artifact', path: r.path, content: r.content })\n return { ok: true, result: { path: r.path } }\n }\n\n // add_citation\n const r = await opts.handlers.addCitation(\n { path: String(rawArgs.path ?? ''), quote: String(rawArgs.quote ?? ''), label: rawArgs.label as string | undefined },\n ctx,\n )\n return { ok: true, result: { citationId: r.citationId, path: r.path } }\n } catch (err) {\n if (err instanceof ToolInputError) return { ok: false, code: err.code, message: err.message, status: err.status }\n return { ok: false, code: 'app_tool_error', message: err instanceof Error ? err.message : String(err), status: 500 }\n }\n}\n\n/** HTTP status for a failed outcome — the handler's `ToolInputError.status`\n * when present, else 400 for a validation reject. */\nexport function outcomeStatus(outcome: Extract<AppToolOutcome, { ok: false }>): number {\n return outcome.status ?? 400\n}\n","import { dispatchAppTool, type DispatchOptions } from './dispatch'\nimport type { AppToolContext, AppToolOutcome } from './types'\n\n/** Executes an app-tool call the model emits on the agent-runtime chat path.\n * Plug into `runChatThroughRuntime({ appToolExecutor })` (or any loop that\n * dispatches function tool_calls). */\nexport type AppToolRuntimeExecutor = (call: {\n toolName: string\n args: Record<string, unknown>\n}) => Promise<AppToolOutcome>\n\nexport interface RuntimeExecutorOptions extends DispatchOptions {\n /** The trusted per-turn context — supplied directly (not from headers), since\n * the runtime path has no HTTP request. */\n ctx: AppToolContext\n}\n\n/**\n * Build the runtime executor for one turn. The agent-runtime backend must also\n * advertise the tools (`buildAppToolOpenAITools(taxonomy)` on the backend's\n * `tools`) for the model to call them; this executor fulfils each call against\n * the product's handlers and emits produced events via `opts.onProduced`.\n */\nexport function createAppToolRuntimeExecutor(opts: RuntimeExecutorOptions): AppToolRuntimeExecutor {\n return ({ toolName, args }) => dispatchAppTool(toolName, args, opts.ctx, opts)\n}\n"],"mappings":";AAGO,IAAM,iBAAN,cAA6B,MAAM;AAAA,EACxC,YACS,MACP,SACO,SAAS,KAChB;AACA,UAAM,OAAO;AAJN;AAEA;AAGP,SAAK,OAAO;AAAA,EACd;AAAA,EANS;AAAA,EAEA;AAKX;;;ACRO,IAAM,iBAAiB,CAAC,mBAAmB,qBAAqB,aAAa,cAAc;AAGlG,IAAM,WAAW,IAAI,IAAY,cAAc;AACxC,SAAS,cAAc,MAAmC;AAC/D,SAAO,SAAS,IAAI,IAAI;AAC1B;AAsBO,SAAS,wBACd,UACA,MACsB;AACtB,QAAM,IAAI,MAAM;AAChB,QAAM,iBAAiB,MAAM,kBAAkB,CAAC,OAAO,UAAU,MAAM;AACvE,SAAO;AAAA,IACL;AAAA,MACE,MAAM;AAAA,MACN,UAAU;AAAA,QACR,MAAM;AAAA,QACN,aACE,GAAG,mBACH;AAAA,QACF,YAAY;AAAA,UACV,MAAM;AAAA,UACN,YAAY;AAAA,YACV,MAAM,EAAE,MAAM,UAAU,MAAM,CAAC,GAAG,SAAS,aAAa,EAAE;AAAA,YAC1D,OAAO,EAAE,MAAM,UAAU,aAAa,sCAAsC;AAAA,YAC5E,aAAa,EAA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AAI;AAC/E;","names":["r"]}
|
|
@@ -55,6 +55,35 @@ function buildHttpMcpServer(opts) {
|
|
|
55
55
|
metadata: { description: opts.description }
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
+
function buildScopedMcpServerEntry(opts) {
|
|
59
|
+
if (opts.token.trim().length === 0) {
|
|
60
|
+
throw new Error(`${opts.label} requires a capability token \u2014 omit the MCP server when none is available`);
|
|
61
|
+
}
|
|
62
|
+
if (!opts.path.startsWith("/")) {
|
|
63
|
+
throw new Error(`${opts.label} path must start with "/" (got "${opts.path}")`);
|
|
64
|
+
}
|
|
65
|
+
const description = opts.description ?? opts.defaultDescription;
|
|
66
|
+
if (opts.ctx) {
|
|
67
|
+
return buildHttpMcpServer({
|
|
68
|
+
path: opts.path,
|
|
69
|
+
baseUrl: opts.baseUrl,
|
|
70
|
+
token: opts.token,
|
|
71
|
+
ctx: opts.ctx,
|
|
72
|
+
description,
|
|
73
|
+
headerNames: opts.headerNames ?? DEFAULT_HEADER_NAMES
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
transport: "http",
|
|
78
|
+
url: `${opts.baseUrl.replace(/\/+$/, "")}${opts.path}`,
|
|
79
|
+
headers: {
|
|
80
|
+
Authorization: `Bearer ${opts.token}`,
|
|
81
|
+
"Content-Type": "application/json"
|
|
82
|
+
},
|
|
83
|
+
enabled: true,
|
|
84
|
+
metadata: { description }
|
|
85
|
+
};
|
|
86
|
+
}
|
|
58
87
|
function buildAppToolMcpServer(opts) {
|
|
59
88
|
return buildHttpMcpServer({
|
|
60
89
|
path: opts.paths?.[opts.tool] ?? DEFAULT_APP_TOOL_PATHS[opts.tool],
|
|
@@ -187,8 +216,9 @@ export {
|
|
|
187
216
|
readToolArgs,
|
|
188
217
|
DEFAULT_APP_TOOL_PATHS,
|
|
189
218
|
buildHttpMcpServer,
|
|
219
|
+
buildScopedMcpServerEntry,
|
|
190
220
|
buildAppToolMcpServer,
|
|
191
221
|
MCP_PROTOCOL_VERSIONS,
|
|
192
222
|
createMcpToolHandler
|
|
193
223
|
};
|
|
194
|
-
//# sourceMappingURL=chunk-
|
|
224
|
+
//# sourceMappingURL=chunk-RH74YJIK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tools/auth.ts","../src/tools/mcp.ts","../src/tools/mcp-rpc.ts"],"sourcesContent":["import type { AppToolContext } from './types'\n\n/**\n * Header names carrying the server-set per-turn context + the capability token.\n * Defaults are product-neutral (`X-Agent-App-*`); a product that already ships\n * a header convention (e.g. `X-Acme-User-Id`) passes its own.\n */\nexport interface ToolHeaderNames {\n userId: string\n workspaceId: string\n threadId: string\n}\n\nexport const DEFAULT_HEADER_NAMES: ToolHeaderNames = {\n userId: 'X-Agent-App-User-Id',\n workspaceId: 'X-Agent-App-Workspace-Id',\n threadId: 'X-Agent-App-Thread-Id',\n}\n\nexport interface AuthenticateOptions {\n /** Verify the bearer capability token belongs to `userId`. The product's\n * HMAC/JWT impl — the seam that keeps token crypto out of this package. */\n verifyToken: (userId: string, bearer: string) => Promise<boolean>\n headerNames?: ToolHeaderNames\n}\n\nexport type ToolAuthResult =\n | { ok: true; ctx: AppToolContext }\n | { ok: false; response: Response }\n\n/**\n * Recover + verify the trusted context for a tool request. The user comes from\n * a server-set header and the bearer token MUST verify against THAT user; the\n * workspace comes from a header too — never from tool args — so the model can\n * neither forge identity nor target another workspace. Fail-closed: any missing\n * credential or a token minted for another user yields a 401/400 Response.\n */\nexport async function authenticateToolRequest(request: Request, opts: AuthenticateOptions): Promise<ToolAuthResult> {\n const h = opts.headerNames ?? DEFAULT_HEADER_NAMES\n const userId = request.headers.get(h.userId)?.trim()\n const workspaceId = request.headers.get(h.workspaceId)?.trim()\n const threadId = request.headers.get(h.threadId)?.trim() || null\n const bearer = request.headers.get('authorization')?.match(/^Bearer\\s+(.+)$/i)?.[1]\n\n if (!userId || !bearer) {\n return { ok: false, response: Response.json({ error: 'Missing capability credentials' }, { status: 401 }) }\n }\n if (!(await opts.verifyToken(userId, bearer))) {\n return { ok: false, response: Response.json({ error: 'Invalid capability token' }, { status: 401 }) }\n }\n if (!workspaceId) {\n return { ok: false, response: Response.json({ error: 'Missing workspace context' }, { status: 400 }) }\n }\n return { ok: true, ctx: { userId, workspaceId, threadId } }\n}\n\n/** Read a tool's argument object from the request body, tolerant of MCP host\n * aliases (`args` / `arguments`) or a bare body. Returns null on non-JSON. */\nexport async function readToolArgs<T>(request: Request): Promise<T | null> {\n let body: { args?: T; arguments?: T }\n try {\n body = (await request.json()) as typeof body\n } catch {\n return null\n }\n return (body.args ?? body.arguments ?? (body as T)) as T\n}\n","import type { AppToolContext } from './types'\nimport type { AppToolName } from './openai'\nimport type { ToolHeaderNames } from './auth'\nimport { DEFAULT_HEADER_NAMES } from './auth'\n\n/** Default route path each app tool is served at. A product mounts its routes\n * at these paths (or supplies its own via {@link BuildMcpServerOptions.paths}). */\nexport const DEFAULT_APP_TOOL_PATHS: Record<AppToolName, string> = {\n submit_proposal: '/api/tools/propose',\n schedule_followup: '/api/tools/followup',\n render_ui: '/api/tools/render-ui',\n add_citation: '/api/tools/citation',\n}\n\n/** The portable MCP server entry the sandbox SDK accepts (transport + url +\n * headers). Matches `AgentProfileMcpServer` structurally without importing the\n * sandbox SDK — products spread it into their profile's `mcp` map. */\nexport interface AppToolMcpServer {\n transport: 'http'\n url: string\n headers: Record<string, string>\n enabled: true\n metadata: { description: string }\n}\n\nexport interface BuildHttpMcpServerOptions {\n /** Route path on the app the sandbox POSTs to (e.g. `/api/tools/propose`). */\n path: string\n /** App base URL the sandbox reaches back to (no trailing slash required). */\n baseUrl: string\n /** Per-user capability token, baked into the Authorization header. */\n token: string\n ctx: AppToolContext\n /** Tool description the model sees. */\n description: string\n headerNames?: ToolHeaderNames\n}\n\n/**\n * Build ONE HTTP MCP server entry — the generic agent→app bridge. The\n * capability token + the user/workspace/thread ids ride in server-set headers\n * (never tool args), so the model can't forge identity or target another\n * workspace. Workspace/thread headers are omitted when their `ctx` value is\n * empty/null (e.g. an integration-invoke bridge that's user-scoped only). Used\n * directly for non-app-tool bridges (integration_invoke) and via\n * {@link buildAppToolMcpServer} for the four app tools.\n */\nexport function buildHttpMcpServer(opts: BuildHttpMcpServerOptions): AppToolMcpServer {\n const base = opts.baseUrl.replace(/\\/+$/, '')\n const h = opts.headerNames ?? DEFAULT_HEADER_NAMES\n return {\n transport: 'http',\n url: `${base}${opts.path}`,\n headers: {\n Authorization: `Bearer ${opts.token}`,\n [h.userId]: opts.ctx.userId,\n ...(opts.ctx.workspaceId ? { [h.workspaceId]: opts.ctx.workspaceId } : {}),\n ...(opts.ctx.threadId ? { [h.threadId]: opts.ctx.threadId } : {}),\n 'Content-Type': 'application/json',\n },\n enabled: true,\n metadata: { description: opts.description },\n }\n}\n\n/** Options for a per-document/scoped MCP channel entry (design-canvas,\n * sequences, …). The capability token + path scope ONE resource; the document\n * id lives in the path, never a tool argument. */\nexport interface ScopedMcpServerEntryOptions {\n /** App base URL the sandbox reaches back to (trailing slash tolerated). */\n baseUrl: string\n /** Product route serving the resource's MCP handler — id is part of the path. */\n path: string\n /** Capability token the product minted for this (user, resource) scope. With\n * no token there is no entry to build — omit the server instead. */\n token: string\n /** Override the channel's default tool-server description. */\n description?: string\n /** Identity headers for products whose route recovers the user via\n * `authenticateToolRequest`. Omit when the bearer token is self-contained. */\n ctx?: AppToolContext\n headerNames?: ToolHeaderNames\n}\n\n/**\n * Build the `AgentProfileMcpServer`-shaped entry for a scoped, per-resource MCP\n * channel. The shared mechanism behind the per-domain entry builders\n * (`buildDesignCanvasMcpServerEntry`, `buildSequencesMcpServerEntry`): same\n * token/path guards, same description default, same ctx-vs-self-contained-token\n * branching. The domain is two parameters — `label` (for guard messages) and\n * `defaultDescription` — never baked.\n *\n * The no-`ctx` branch is a GENUINE behavioral path, not a shortcut: it emits a\n * self-contained-token entry with ONLY `Authorization` + `Content-Type`.\n * Routing it through {@link buildHttpMcpServer} would unconditionally write a\n * `userId` identity header (here `undefined`), so it stays a distinct branch.\n */\nexport function buildScopedMcpServerEntry(\n opts: ScopedMcpServerEntryOptions & { label: string; defaultDescription: string },\n): AppToolMcpServer {\n if (opts.token.trim().length === 0) {\n throw new Error(`${opts.label} requires a capability token — omit the MCP server when none is available`)\n }\n if (!opts.path.startsWith('/')) {\n throw new Error(`${opts.label} path must start with \"/\" (got \"${opts.path}\")`)\n }\n const description = opts.description ?? opts.defaultDescription\n\n if (opts.ctx) {\n return buildHttpMcpServer({\n path: opts.path,\n baseUrl: opts.baseUrl,\n token: opts.token,\n ctx: opts.ctx,\n description,\n headerNames: opts.headerNames ?? DEFAULT_HEADER_NAMES,\n })\n }\n\n return {\n transport: 'http',\n url: `${opts.baseUrl.replace(/\\/+$/, '')}${opts.path}`,\n headers: {\n Authorization: `Bearer ${opts.token}`,\n 'Content-Type': 'application/json',\n },\n enabled: true,\n metadata: { description },\n }\n}\n\nexport interface BuildMcpServerOptions {\n tool: AppToolName\n baseUrl: string\n token: string\n ctx: AppToolContext\n description: string\n headerNames?: ToolHeaderNames\n paths?: Partial<Record<AppToolName, string>>\n}\n\n/** Build one of the four app-tool MCP servers — a thin wrapper over\n * {@link buildHttpMcpServer} that maps the tool name to its route path. */\nexport function buildAppToolMcpServer(opts: BuildMcpServerOptions): AppToolMcpServer {\n return buildHttpMcpServer({\n path: opts.paths?.[opts.tool] ?? DEFAULT_APP_TOOL_PATHS[opts.tool],\n baseUrl: opts.baseUrl,\n token: opts.token,\n ctx: opts.ctx,\n description: opts.description,\n headerNames: opts.headerNames,\n })\n}\n","/**\n * Generic streamable-HTTP JSON-RPC 2.0 envelope for a tools-only MCP server.\n * Stateless, Workers-compatible: no session table, no SSE — every request gets\n * a single `application/json` response, which the streamable-HTTP transport\n * explicitly permits for tools-only servers.\n *\n * Protocol surface:\n * initialize → echo client's protocolVersion if supported, else latest\n * ping → empty result {}\n * notifications/* (no `id`) → 202 with no body\n * tools/list → tool manifest\n * tools/call → run + surface execution failures as isError text results\n * anything else → -32601\n *\n * Execution failures (argument shape, validation, store throws) become `isError`\n * tool results carrying the thrown message verbatim — the model reads WHY and\n * retries. Protocol misuse becomes a JSON-RPC error object.\n */\n\nexport const MCP_PROTOCOL_VERSIONS = ['2025-06-18', '2025-03-26', '2024-11-05'] as const\nexport type McpProtocolVersion = (typeof MCP_PROTOCOL_VERSIONS)[number]\n\nconst LATEST_PROTOCOL_VERSION: McpProtocolVersion = MCP_PROTOCOL_VERSIONS[0]\n\nexport interface McpServerInfo {\n name: string\n version: string\n}\n\n/** One tool entry in the registry the handler owns. */\nexport interface McpToolDefinition<TEnv = Record<string, never>> {\n name: string\n description: string\n /** JSON Schema for the `params.arguments` object. */\n inputSchema: Record<string, unknown>\n /** Receive validated (Record) args + the env the handler threaded; throw to\n * surface an isError result — never throw for protocol/framing issues. */\n run(args: Record<string, unknown>, env: TEnv): Promise<unknown>\n}\n\nexport interface CreateMcpToolHandlerOptions<TEnv = Record<string, never>> {\n serverInfo: McpServerInfo\n /** Full tool list; order IS the tools/list order. */\n tools: McpToolDefinition<TEnv>[]\n /** Per-request environment threaded into every `run` call. If your tools are\n * stateless (or carry state through closure) pass an empty builder:\n * `() => ({} as TEnv)`. */\n buildEnv(request: Request): TEnv | Promise<TEnv>\n}\n\n// ---------------------------------------------------------------------------\n// Internal helpers\n// ---------------------------------------------------------------------------\n\ntype JsonRpcId = string | number | null\n\ninterface ToolCallContent {\n content: Array<{ type: 'text'; text: string }>\n isError?: true\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n\nfunction rpcResult(id: JsonRpcId, result: unknown): Response {\n return Response.json({ jsonrpc: '2.0', id, result })\n}\n\nfunction rpcError(id: JsonRpcId, code: number, message: string, status = 200): Response {\n return Response.json({ jsonrpc: '2.0', id, error: { code, message } }, { status })\n}\n\n// ---------------------------------------------------------------------------\n// Factory\n// ---------------------------------------------------------------------------\n\n/**\n * Build a request handler for a tools-only MCP server. The returned function\n * accepts a standard `Request` and resolves to a `Response` — mount it on any\n * Cloudflare Worker route or Remix `loader`.\n *\n * The handler calls `buildEnv` exactly ONCE per `tools/call` request (after\n * the tool is found, before `run`) — non-`tools/call` paths skip it entirely\n * so metadata requests do not pay env-build cost.\n */\nexport function createMcpToolHandler<TEnv = Record<string, never>>(\n opts: CreateMcpToolHandlerOptions<TEnv>,\n): (request: Request) => Promise<Response> {\n const toolMap = new Map<string, McpToolDefinition<TEnv>>()\n for (const tool of opts.tools) {\n if (toolMap.has(tool.name)) throw new Error(`duplicate MCP tool name: ${tool.name}`)\n toolMap.set(tool.name, tool)\n }\n\n return async (request: Request): Promise<Response> => {\n if (request.method !== 'POST') {\n return new Response('MCP server accepts JSON-RPC 2.0 over POST only', {\n status: 405,\n headers: { Allow: 'POST' },\n })\n }\n\n let body: unknown\n try {\n body = await request.json()\n } catch {\n return rpcError(null, -32700, 'Parse error: request body is not valid JSON', 400)\n }\n\n if (Array.isArray(body)) {\n return rpcError(null, -32600, 'Invalid request: JSON-RPC batching is not supported', 400)\n }\n if (!isRecord(body) || body.jsonrpc !== '2.0' || typeof body.method !== 'string') {\n return rpcError(\n null,\n -32600,\n 'Invalid request: expected a JSON-RPC 2.0 object with jsonrpc \"2.0\" and a string method',\n 400,\n )\n }\n\n const method = body.method\n const params = isRecord(body.params) ? body.params : {}\n\n // Notifications have no `id` — acknowledge without a JSON-RPC body.\n if (!('id' in body) || body.id === undefined) {\n return new Response(null, { status: 202 })\n }\n const id = body.id as JsonRpcId\n\n switch (method) {\n case 'initialize': {\n const requested = typeof params.protocolVersion === 'string' ? params.protocolVersion : undefined\n const protocolVersion =\n requested !== undefined && (MCP_PROTOCOL_VERSIONS as readonly string[]).includes(requested)\n ? requested\n : LATEST_PROTOCOL_VERSION\n return rpcResult(id, {\n protocolVersion,\n capabilities: { tools: { listChanged: false } },\n serverInfo: opts.serverInfo,\n })\n }\n\n case 'ping':\n return rpcResult(id, {})\n\n case 'tools/list':\n return rpcResult(id, {\n tools: opts.tools.map((tool) => ({\n name: tool.name,\n description: tool.description,\n inputSchema: tool.inputSchema,\n })),\n })\n\n case 'tools/call': {\n const name = params.name\n if (typeof name !== 'string' || name.length === 0) {\n return rpcError(id, -32602, 'tools/call requires params.name (string)')\n }\n const tool = toolMap.get(name)\n if (!tool) {\n return rpcError(\n id,\n -32602,\n `Unknown tool: ${name}. Available tools: ${opts.tools.map((t) => t.name).join(', ')}`,\n )\n }\n if (params.arguments !== undefined && !isRecord(params.arguments)) {\n return rpcError(id, -32602, 'tools/call params.arguments must be an object when provided')\n }\n const args = isRecord(params.arguments) ? params.arguments : {}\n let env: TEnv\n try {\n env = await opts.buildEnv(request)\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err)\n const payload: ToolCallContent = {\n content: [{ type: 'text', text: `${name} failed to build env: ${message}` }],\n isError: true,\n }\n return rpcResult(id, payload)\n }\n try {\n const result = await tool.run(args, env)\n const payload: ToolCallContent = { content: [{ type: 'text', text: JSON.stringify(result) }] }\n return rpcResult(id, payload)\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err)\n const payload: ToolCallContent = {\n content: [{ type: 'text', text: `${name} failed: ${message}` }],\n isError: true,\n }\n return rpcResult(id, payload)\n }\n }\n\n default:\n return rpcError(id, -32601, `Method not found: ${method}`)\n }\n }\n}\n"],"mappings":";AAaO,IAAM,uBAAwC;AAAA,EACnD,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,UAAU;AACZ;AAoBA,eAAsB,wBAAwB,SAAkB,MAAoD;AAClH,QAAM,IAAI,KAAK,eAAe;AAC9B,QAAM,SAAS,QAAQ,QAAQ,IAAI,EAAE,MAAM,GAAG,KAAK;AACnD,QAAM,cAAc,QAAQ,QAAQ,IAAI,EAAE,WAAW,GAAG,KAAK;AAC7D,QAAM,WAAW,QAAQ,QAAQ,IAAI,EAAE,QAAQ,GAAG,KAAK,KAAK;AAC5D,QAAM,SAAS,QAAQ,QAAQ,IAAI,eAAe,GAAG,MAAM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498,4 +498,4 @@ export {
|
|
|
498
498
|
createSurfaceRegistry,
|
|
499
499
|
mergeSurfaceOverlay
|
|
500
500
|
};
|
|
501
|
-
//# sourceMappingURL=chunk-
|
|
501
|
+
//# sourceMappingURL=chunk-TQ5M7BFV.js.map
|
|
@@ -6,9 +6,9 @@ import { d as SceneStore, N as NewSceneDecision, a as SceneDocumentRecord } from
|
|
|
6
6
|
export { S as SceneDecision, b as SceneExportFormat, c as SceneExportRecord, e as SceneStoreScope } from '../store-CFyxgTlD.js';
|
|
7
7
|
export { C as CHANNEL_PRESETS, a as ChannelPreset, b as ChannelPresetId, c as ChannelScaleResult, E as EXPORT_PRESETS, d as ExportCropRect, e as ExportFormat, f as ExportPreset, S as SIZE_PRESETS, g as SizePreset, h as bleedAwareExportBounds, i as bleedAwareExportRect, j as findPreset, m as matchPreset, r as requireChannelPreset, s as scaleForPreset, k as scalePageForChannelPreset } from '../export-presets-DAsU5Wal.js';
|
|
8
8
|
import { c as McpToolDefinition } from '../mcp-rpc-DLw_r9PQ.js';
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import
|
|
9
|
+
import { S as ScopedMcpServerEntryOptions, A as AppToolMcpServer } from '../mcp-4I_RHhNa.js';
|
|
10
|
+
import '../types-wHs0rmtu.js';
|
|
11
|
+
import '../auth-DcK5ERaL.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Pre-write validation for scene operations. Every rule runs against a
|
|
@@ -236,27 +236,14 @@ declare function createDesignCanvasMcpHandler(opts: CreateDesignCanvasMcpHandler
|
|
|
236
236
|
/**
|
|
237
237
|
* Profile entry for the design-canvas MCP server — what a product spreads
|
|
238
238
|
* into its sandbox `AgentProfile.mcp` map so the in-sandbox agent gets the
|
|
239
|
-
* live canvas channel.
|
|
240
|
-
* ../
|
|
241
|
-
* Authorization header (server-set, never a tool argument).
|
|
239
|
+
* live canvas channel. A thin wrapper over the shared `buildScopedMcpServerEntry`
|
|
240
|
+
* mechanism (../tools/mcp): transport 'http', capability token in the
|
|
241
|
+
* Authorization header (server-set, never a tool argument). The only
|
|
242
|
+
* domain-specific values are this channel's default description and name.
|
|
242
243
|
*/
|
|
243
244
|
|
|
244
245
|
declare const DEFAULT_DESIGN_CANVAS_MCP_DESCRIPTION = "Live visual asset editor for the current design document: read scene state, add/move/resize/delete elements, manage pages, bind template slots, apply data, and queue exports. All coordinates are CSS pixels.";
|
|
245
|
-
|
|
246
|
-
/** App base URL the sandbox reaches back to (trailing slash tolerated). */
|
|
247
|
-
baseUrl: string;
|
|
248
|
-
/** Product route serving `createDesignCanvasMcpHandler` for ONE document —
|
|
249
|
-
* the document id is part of the path, never a tool argument. */
|
|
250
|
-
path: string;
|
|
251
|
-
/** Capability token the product minted for this (user, document) scope.
|
|
252
|
-
* With no token there is no entry to build — omit the server instead. */
|
|
253
|
-
token: string;
|
|
254
|
-
description?: string;
|
|
255
|
-
/** Identity headers for products whose route recovers the user via
|
|
256
|
-
* `authenticateToolRequest`. Omit when the bearer token is self-contained. */
|
|
257
|
-
ctx?: AppToolContext;
|
|
258
|
-
headerNames?: ToolHeaderNames;
|
|
259
|
-
}
|
|
246
|
+
type BuildDesignCanvasMcpServerEntryOptions = ScopedMcpServerEntryOptions;
|
|
260
247
|
/** Build the `AgentProfileMcpServer`-shaped entry for the design-canvas channel. */
|
|
261
248
|
declare function buildDesignCanvasMcpServerEntry(opts: BuildDesignCanvasMcpServerEntryOptions): AppToolMcpServer;
|
|
262
249
|
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
instantiateTemplate,
|
|
12
12
|
listTemplateSlots,
|
|
13
13
|
validateBindings
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-2FDTJIU4.js";
|
|
15
15
|
import {
|
|
16
16
|
CHANNEL_PRESETS,
|
|
17
17
|
EXPORT_PRESETS,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
validateSlotValue
|
|
48
48
|
} from "../chunk-M2EBUDZ7.js";
|
|
49
49
|
import "../chunk-HFC4BTWJ.js";
|
|
50
|
-
import "../chunk-
|
|
50
|
+
import "../chunk-RH74YJIK.js";
|
|
51
51
|
export {
|
|
52
52
|
CANVAS_ELEMENT_KINDS,
|
|
53
53
|
CANVAS_MCP_TOOLS,
|
package/dist/eval/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CompletionRequirement, RuntimeEventLike } from '@tangle-network/agent-eval';
|
|
2
2
|
export { CompletionRequirement, CompletionVerdict, CorrectnessChecker, ProducedState, RuntimeEventLike, SatisfiedBy, TaskGold, createLlmCorrectnessChecker, extractProducedState, verifyCompletion, weightedComposite } from '@tangle-network/agent-eval';
|
|
3
|
-
import { e as AppToolProducedEvent } from '../types-
|
|
3
|
+
import { e as AppToolProducedEvent } from '../types-wHs0rmtu.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Eval — the app-shell BRIDGE to `@tangle-network/agent-eval`, not a reimpl.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { AppToolRuntimeExecutor, CapabilityTokenOptions, DispatchOptions, ExpiringCapabilityTokenOptions, HandleToolRequestOptions, ResolveToolCapabilitiesOptions, ResolvedToolCapabilities, RuntimeExecutorOptions, ToolCapability, ToolInputError, createAppToolRuntimeExecutor, createCapabilityToken, createExpiringCapabilityToken, dispatchAppTool, handleAppToolRequest, outcomeStatus, resolveToolCapabilities, restrictTaxonomy, verifyCapabilityToken, verifyExpiringCapabilityToken } from './tools/index.js';
|
|
2
|
-
export { A as APP_TOOL_NAMES, a as AppToolName, b as AuthenticateOptions, D as DEFAULT_HEADER_NAMES, O as OpenAIFunctionTool, T as ToolAuthResult, c as ToolHeaderNames, d as authenticateToolRequest, e as buildAppToolOpenAITools, i as isAppToolName, r as readToolArgs } from './auth-
|
|
3
|
-
export { A as AppToolMcpServer, B as BuildHttpMcpServerOptions, a as BuildMcpServerOptions, D as DEFAULT_APP_TOOL_PATHS, b as buildAppToolMcpServer, c as buildHttpMcpServer } from './mcp-
|
|
4
|
-
export { C as CreateMcpToolHandlerOptions, M as MCP_PROTOCOL_VERSIONS, a as McpProtocolVersion, b as McpServerInfo, c as McpToolDefinition, d as createMcpToolHandler } from './mcp-rpc-DLw_r9PQ.js';
|
|
5
|
-
export { A as AddCitationArgs, a as AddCitationResult, b as AppToolContext, c as AppToolHandlers, d as AppToolOutcome, e as AppToolProducedEvent, f as AppToolTaxonomy, R as RenderUiArgs, g as RenderUiResult, S as ScheduleFollowupArgs, h as ScheduleFollowupResult, i as SubmitProposalArgs, j as SubmitProposalResult } from './types-
|
|
2
|
+
export { A as APP_TOOL_NAMES, a as AppToolName, b as AuthenticateOptions, D as DEFAULT_HEADER_NAMES, O as OpenAIFunctionTool, T as ToolAuthResult, c as ToolHeaderNames, d as authenticateToolRequest, e as buildAppToolOpenAITools, i as isAppToolName, r as readToolArgs } from './auth-DcK5ERaL.js';
|
|
3
|
+
export { A as AppToolMcpServer, B as BuildHttpMcpServerOptions, a as BuildMcpServerOptions, D as DEFAULT_APP_TOOL_PATHS, S as ScopedMcpServerEntryOptions, b as buildAppToolMcpServer, c as buildHttpMcpServer, d as buildScopedMcpServerEntry } from './mcp-4I_RHhNa.js';
|
|
4
|
+
export { C as CreateMcpToolHandlerOptions, M as MCP_PROTOCOL_VERSIONS, a as McpProtocolVersion, b as McpServerInfo, c as McpToolDefinition, M as SEQUENCES_MCP_PROTOCOL_VERSIONS, d as createMcpToolHandler } from './mcp-rpc-DLw_r9PQ.js';
|
|
5
|
+
export { A as AddCitationArgs, a as AddCitationResult, b as AppToolContext, c as AppToolHandlers, d as AppToolOutcome, e as AppToolProducedEvent, f as AppToolTaxonomy, B as BuildAppToolsOptions, R as RenderUiArgs, g as RenderUiResult, S as ScheduleFollowupArgs, h as ScheduleFollowupResult, i as SubmitProposalArgs, j as SubmitProposalResult } from './types-wHs0rmtu.js';
|
|
6
6
|
export { BuildDelegationOptions, DELEGATION_MCP_SERVER_KEY, DELEGATION_TOOLS, DelegationMcpServer, buildDelegationMcpServer, delegationMcpForConfig } from './delegation/index.js';
|
|
7
7
|
export { BrokerToken, BrokerTokenMinter, BrokerTokenProvider, BrokerTokenProviderOptions, ConsentUrlInput, buildConsentUrl, createBrokerTokenProvider } from './tangle/index.js';
|
|
8
8
|
export { C as CatalogModel, M as ModelCatalog, R as RouterModel, _ as __resetCatalogCache, b as buildCatalog, f as fetchModelCatalog, n as normalizeModelId } from './model-catalog-BEAEVDaa.js';
|
|
@@ -28,7 +28,7 @@ export { AgentAppTheme, CanvasRenderPalette, darkTheme, lightTheme, themeColor,
|
|
|
28
28
|
export { DistributionSummary, LoopTraceEventLike, MissionFlowStep, MissionTraceContext, StepSpanContext, TimedEvent, buildFlowTrace, childSpanContext, composeMissionFlowTrace, createMissionTraceContext, delegationActivityToFlowSpans, loopTraceEventsToFlowSpans, renderHistogram, renderWaterfall, stepActivityFlowTrace, summarize, timedEventsFromLines, traceEnv } from './trace/index.js';
|
|
29
29
|
export { M as MIN_SEQUENCE_CLIP_FRAMES, N as NewSequenceClip, a as NewSequenceDecision, b as NewSequenceTrack, S as SequenceClip, c as SequenceClipMedia, d as SequenceClipPatch, e as SequenceDecision, f as SequenceExportFormat, g as SequenceExportRecord, h as SequenceExportStatus, i as SequenceFrameSnapshot, j as SequenceMediaKind, k as SequenceMeta, l as SequenceStatus, m as SequenceStore, n as SequenceStoreScope, o as SequenceTimeline, p as SequenceTrack, q as SequenceTrackKind, T as TimelineClipBounds, r as TimelineInterval, s as assertClipFitsSequence, t as chooseCaptionPlacement, u as clampClipDuration, v as clampClipStart, w as formatSeconds, x as formatTimecode, y as framesToSeconds, z as secondsToFrames, A as snapshotFrame, B as trackIntervals } from './store-gckrNq-g.js';
|
|
30
30
|
export { A as AddCaptionOperation, C as CaptionTargetResolution, a as CreateTrackOperation, D as DeleteClipOperation, E as ExtendSequenceOperation, M as MoveClipOperation, P as PlaceClipOperation, Q as QueueExportOperation, S as SEQUENCE_OPERATION_TYPES, b as SequenceApplyResult, c as SequenceOperation, d as SequenceOperationContext, e as SequenceOperationType, f as SequencePlan, g as SetClipDisabledOperation, h as SetClipTextOperation, i as SplitClipOperation, T as TrimClipOperation, j as applySequenceOperation, k as applySequenceOperations, l as assertSequenceMediaUrl, m as captionTrackNameForLanguage, n as lastClipEndFrame, p as parseSequenceOperations, r as resolveCaptionPlacement, o as resolveCaptionTarget, q as resolvePlaceClipTrack, v as validateAddCaption, s as validateCreateTrack, t as validateDeleteClip, u as validateExtendSequence, w as validateMoveClip, x as validatePlaceClip, y as validateQueueExport, z as validateSequenceOperation, B as validateSequenceOperations, F as validateSetClipDisabled, G as validateSetClipText, H as validateSplitClip, I as validateTrimClip } from './apply-Gk4raT2j.js';
|
|
31
|
-
export { BuildCaptionChunksOptions, BuildSequencesMcpServerEntryOptions, CaptionChunk, CaptionCoverageEntry, CaptionExportOptions, ContactSheetEntry, ContactSheetManifest, CreateSequencesMcpHandlerOptions, DEFAULT_SEQUENCES_MCP_DESCRIPTION, LanguageFanoutOptions, MAX_CAPTION_BATCH, OtioClip, OtioExternalReference, OtioGap, OtioMissingReference, OtioRationalTime, OtioStack, OtioTimeRange, OtioTimeline, OtioTrack,
|
|
31
|
+
export { BuildCaptionChunksOptions, BuildSequencesMcpServerEntryOptions, CaptionChunk, CaptionCoverageEntry, CaptionExportOptions, ContactSheetEntry, ContactSheetManifest, CreateSequencesMcpHandlerOptions, DEFAULT_SEQUENCES_MCP_DESCRIPTION, LanguageFanoutOptions, MAX_CAPTION_BATCH, OtioClip, OtioExternalReference, OtioGap, OtioMissingReference, OtioRationalTime, OtioStack, OtioTimeRange, OtioTimeline, OtioTrack, SEQUENCE_EXPORT_FORMATS, SEQUENCE_MCP_TOOLS, SEQUENCE_MEDIA_KINDS, SEQUENCE_TRACK_KINDS, SequenceMcpToolDefinition, SequenceMcpToolEnv, SequencesMcpServerInfo, TranscriptSegment, buildCaptionChunks, buildContactSheetManifest, buildEdl, buildOtio, buildSequencesMcpServerEntry, buildSrt, buildVtt, captionCoverage, createSequencesMcpHandler, findSequenceMcpTool, normalizeLanguageTag, planLanguageFanout } from './sequences/index.js';
|
|
32
32
|
export { B as Bounds, E as EllipseElement, G as GroupElement, I as ImageElement, L as LineElement, N as NewPageOptions, P as PageBleed, a as PageGuides, R as RectElement, S as SCENE_ELEMENT_KINDS, b as SCENE_SCHEMA_VERSION, c as SceneDocument, d as SceneElement, e as SceneElementBase, f as SceneElementKind, g as ScenePage, h as SceneSettings, T as TextElement, V as VideoElement, i as assertColor, j as assertFinite, k as assertPositiveFinite, l as assertSceneMediaSrc, m as boundsIntersect, n as collectSlots, o as createEmptyDocument, p as createPage, q as elementAabb, r as elementExtent, s as estimateTextHeight, t as findElement, u as requireElement, v as requirePage } from './model-BBwyOuWG.js';
|
|
33
33
|
export { A as AddElementOperation, a as AddPageOperation, b as ApplyDataOperation, B as BindSlotOperation, D as DeleteElementOperation, c as DeletePageOperation, d as DuplicatePageOperation, G as GroupElementsOperation, R as ReorderElementOperation, e as ReorderPageOperation, S as SCENE_OPERATION_TYPES, f as SceneAttrsPatch, g as SceneOperation, h as SceneOperationType, i as ScenePlan, j as SetAttrsOperation, k as SetDocumentTitleOperation, l as SetPageGuidesOperation, m as SetPagePropsOperation, U as UngroupElementOperation } from './operations-DLIvvD00.js';
|
|
34
34
|
export { N as NewSceneDecision, S as SceneDecision, a as SceneDocumentRecord, b as SceneExportFormat, c as SceneExportRecord, d as SceneStore, e as SceneStoreScope } from './store-CFyxgTlD.js';
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
instantiateTemplate,
|
|
13
13
|
listTemplateSlots,
|
|
14
14
|
validateBindings
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-2FDTJIU4.js";
|
|
16
16
|
import {
|
|
17
17
|
darkTheme,
|
|
18
18
|
lightTheme,
|
|
@@ -91,7 +91,6 @@ import {
|
|
|
91
91
|
import {
|
|
92
92
|
DEFAULT_SEQUENCES_MCP_DESCRIPTION,
|
|
93
93
|
MAX_CAPTION_BATCH,
|
|
94
|
-
SEQUENCES_MCP_PROTOCOL_VERSIONS,
|
|
95
94
|
SEQUENCE_EXPORT_FORMATS,
|
|
96
95
|
SEQUENCE_MCP_TOOLS,
|
|
97
96
|
SEQUENCE_MEDIA_KINDS,
|
|
@@ -131,7 +130,7 @@ import {
|
|
|
131
130
|
validateSetClipText,
|
|
132
131
|
validateSplitClip,
|
|
133
132
|
validateTrimClip
|
|
134
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-BUUJ7TEQ.js";
|
|
135
134
|
import {
|
|
136
135
|
MIN_SEQUENCE_CLIP_FRAMES,
|
|
137
136
|
assertClipFitsSequence,
|
|
@@ -290,7 +289,7 @@ import {
|
|
|
290
289
|
verifySandboxTerminalToken,
|
|
291
290
|
verifyTerminalProxyToken,
|
|
292
291
|
writeProfileFilesToBox
|
|
293
|
-
} from "./chunk-
|
|
292
|
+
} from "./chunk-AF5ZST7M.js";
|
|
294
293
|
import {
|
|
295
294
|
DEFAULT_HARNESS,
|
|
296
295
|
HARNESS_MODEL_POLICIES,
|
|
@@ -313,7 +312,7 @@ import {
|
|
|
313
312
|
restrictTaxonomy,
|
|
314
313
|
verifyCapabilityToken,
|
|
315
314
|
verifyExpiringCapabilityToken
|
|
316
|
-
} from "./chunk-
|
|
315
|
+
} from "./chunk-FDJ6JQCI.js";
|
|
317
316
|
import {
|
|
318
317
|
DEFAULT_APP_TOOL_PATHS,
|
|
319
318
|
DEFAULT_HEADER_NAMES,
|
|
@@ -321,9 +320,10 @@ import {
|
|
|
321
320
|
authenticateToolRequest,
|
|
322
321
|
buildAppToolMcpServer,
|
|
323
322
|
buildHttpMcpServer,
|
|
323
|
+
buildScopedMcpServerEntry,
|
|
324
324
|
createMcpToolHandler,
|
|
325
325
|
readToolArgs
|
|
326
|
-
} from "./chunk-
|
|
326
|
+
} from "./chunk-RH74YJIK.js";
|
|
327
327
|
import {
|
|
328
328
|
DELEGATION_MCP_SERVER_KEY,
|
|
329
329
|
DELEGATION_TOOLS,
|
|
@@ -348,7 +348,7 @@ import {
|
|
|
348
348
|
runToolLoop,
|
|
349
349
|
streamToolLoop,
|
|
350
350
|
toLoopEvents
|
|
351
|
-
} from "./chunk-
|
|
351
|
+
} from "./chunk-TQ5M7BFV.js";
|
|
352
352
|
import {
|
|
353
353
|
DEFAULT_TANGLE_BILLING_ENFORCEMENT_ENV_VAR,
|
|
354
354
|
DEFAULT_TANGLE_ROUTER_BASE_URL,
|
|
@@ -372,7 +372,7 @@ import {
|
|
|
372
372
|
dispatchAppTool,
|
|
373
373
|
isAppToolName,
|
|
374
374
|
outcomeStatus
|
|
375
|
-
} from "./chunk-
|
|
375
|
+
} from "./chunk-PPSZNVKT.js";
|
|
376
376
|
import {
|
|
377
377
|
createLlmCorrectnessChecker,
|
|
378
378
|
createTokenRecallChecker,
|
|
@@ -425,7 +425,7 @@ export {
|
|
|
425
425
|
SCENE_ELEMENT_KINDS,
|
|
426
426
|
SCENE_OPERATION_TYPES,
|
|
427
427
|
SCENE_SCHEMA_VERSION,
|
|
428
|
-
SEQUENCES_MCP_PROTOCOL_VERSIONS,
|
|
428
|
+
MCP_PROTOCOL_VERSIONS as SEQUENCES_MCP_PROTOCOL_VERSIONS,
|
|
429
429
|
SEQUENCE_EXPORT_FORMATS,
|
|
430
430
|
SEQUENCE_MCP_TOOLS,
|
|
431
431
|
SEQUENCE_MEDIA_KINDS,
|
|
@@ -483,6 +483,7 @@ export {
|
|
|
483
483
|
buildSandboxRuntimeProxyHeaders,
|
|
484
484
|
buildSandboxToolFileMounts,
|
|
485
485
|
buildSandboxToolPathSetupScript,
|
|
486
|
+
buildScopedMcpServerEntry,
|
|
486
487
|
buildSequencesMcpServerEntry,
|
|
487
488
|
buildSrt,
|
|
488
489
|
buildUserTextParts,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as AppToolContext } from './types-
|
|
2
|
-
import { c as ToolHeaderNames, a as AppToolName } from './auth-
|
|
1
|
+
import { b as AppToolContext } from './types-wHs0rmtu.js';
|
|
2
|
+
import { c as ToolHeaderNames, a as AppToolName } from './auth-DcK5ERaL.js';
|
|
3
3
|
|
|
4
4
|
/** Default route path each app tool is served at. A product mounts its routes
|
|
5
5
|
* at these paths (or supplies its own via {@link BuildMcpServerOptions.paths}). */
|
|
@@ -38,6 +38,41 @@ interface BuildHttpMcpServerOptions {
|
|
|
38
38
|
* {@link buildAppToolMcpServer} for the four app tools.
|
|
39
39
|
*/
|
|
40
40
|
declare function buildHttpMcpServer(opts: BuildHttpMcpServerOptions): AppToolMcpServer;
|
|
41
|
+
/** Options for a per-document/scoped MCP channel entry (design-canvas,
|
|
42
|
+
* sequences, …). The capability token + path scope ONE resource; the document
|
|
43
|
+
* id lives in the path, never a tool argument. */
|
|
44
|
+
interface ScopedMcpServerEntryOptions {
|
|
45
|
+
/** App base URL the sandbox reaches back to (trailing slash tolerated). */
|
|
46
|
+
baseUrl: string;
|
|
47
|
+
/** Product route serving the resource's MCP handler — id is part of the path. */
|
|
48
|
+
path: string;
|
|
49
|
+
/** Capability token the product minted for this (user, resource) scope. With
|
|
50
|
+
* no token there is no entry to build — omit the server instead. */
|
|
51
|
+
token: string;
|
|
52
|
+
/** Override the channel's default tool-server description. */
|
|
53
|
+
description?: string;
|
|
54
|
+
/** Identity headers for products whose route recovers the user via
|
|
55
|
+
* `authenticateToolRequest`. Omit when the bearer token is self-contained. */
|
|
56
|
+
ctx?: AppToolContext;
|
|
57
|
+
headerNames?: ToolHeaderNames;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Build the `AgentProfileMcpServer`-shaped entry for a scoped, per-resource MCP
|
|
61
|
+
* channel. The shared mechanism behind the per-domain entry builders
|
|
62
|
+
* (`buildDesignCanvasMcpServerEntry`, `buildSequencesMcpServerEntry`): same
|
|
63
|
+
* token/path guards, same description default, same ctx-vs-self-contained-token
|
|
64
|
+
* branching. The domain is two parameters — `label` (for guard messages) and
|
|
65
|
+
* `defaultDescription` — never baked.
|
|
66
|
+
*
|
|
67
|
+
* The no-`ctx` branch is a GENUINE behavioral path, not a shortcut: it emits a
|
|
68
|
+
* self-contained-token entry with ONLY `Authorization` + `Content-Type`.
|
|
69
|
+
* Routing it through {@link buildHttpMcpServer} would unconditionally write a
|
|
70
|
+
* `userId` identity header (here `undefined`), so it stays a distinct branch.
|
|
71
|
+
*/
|
|
72
|
+
declare function buildScopedMcpServerEntry(opts: ScopedMcpServerEntryOptions & {
|
|
73
|
+
label: string;
|
|
74
|
+
defaultDescription: string;
|
|
75
|
+
}): AppToolMcpServer;
|
|
41
76
|
interface BuildMcpServerOptions {
|
|
42
77
|
tool: AppToolName;
|
|
43
78
|
baseUrl: string;
|
|
@@ -51,4 +86,4 @@ interface BuildMcpServerOptions {
|
|
|
51
86
|
* {@link buildHttpMcpServer} that maps the tool name to its route path. */
|
|
52
87
|
declare function buildAppToolMcpServer(opts: BuildMcpServerOptions): AppToolMcpServer;
|
|
53
88
|
|
|
54
|
-
export { type AppToolMcpServer as A, type BuildHttpMcpServerOptions as B, DEFAULT_APP_TOOL_PATHS as D, type BuildMcpServerOptions as a, buildAppToolMcpServer as b, buildHttpMcpServer as c };
|
|
89
|
+
export { type AppToolMcpServer as A, type BuildHttpMcpServerOptions as B, DEFAULT_APP_TOOL_PATHS as D, type ScopedMcpServerEntryOptions as S, type BuildMcpServerOptions as a, buildAppToolMcpServer as b, buildHttpMcpServer as c, buildScopedMcpServerEntry as d };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { KeyProvisioner, KeyCrypto, WorkspaceKeyManager, WorkspaceKeyStore } from '../billing/index.js';
|
|
2
2
|
import { KnowledgeStateAccessor } from '../knowledge/index.js';
|
|
3
|
-
import { c as AppToolHandlers } from '../types-
|
|
3
|
+
import { c as AppToolHandlers } from '../types-wHs0rmtu.js';
|
|
4
4
|
import { KvLike } from '../web/index.js';
|
|
5
5
|
import '@tangle-network/agent-eval';
|
|
6
6
|
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -3,10 +3,10 @@ export { C as CreateTangleRouterModelConfigOptions, D as DEFAULT_TANGLE_BILLING_
|
|
|
3
3
|
import * as _tangle_network_agent_runtime from '@tangle-network/agent-runtime';
|
|
4
4
|
import { ToolLoopMessage, ToolLoopResult, StreamToolLoopYield, ToolLoopCall } from '@tangle-network/agent-runtime';
|
|
5
5
|
export { RunToolLoopOptions as AppToolLoopOptions, ToolLoopAssistantToolCall as LoopAssistantToolCall, ToolLoopMessage as LoopMessage, ToolLoopCall as LoopToolCall, StreamToolLoopOptions as StreamAppToolLoopOptions, StreamToolLoopYield as StreamLoopYield, ToolLoopEvent, ToolLoopResult, ToolLoopStopReason, runToolLoop as runAppToolLoop, streamToolLoop as streamAppToolLoop } from '@tangle-network/agent-runtime';
|
|
6
|
-
import { b as AppToolContext, e as AppToolProducedEvent, f as AppToolTaxonomy, c as AppToolHandlers, d as AppToolOutcome } from '../types-
|
|
6
|
+
import { b as AppToolContext, e as AppToolProducedEvent, f as AppToolTaxonomy, c as AppToolHandlers, d as AppToolOutcome } from '../types-wHs0rmtu.js';
|
|
7
7
|
import { CertifiedProfile } from '@tangle-network/agent-runtime/intelligence';
|
|
8
|
-
import { A as AppToolMcpServer } from '../mcp-
|
|
9
|
-
import '../auth-
|
|
8
|
+
import { A as AppToolMcpServer } from '../mcp-4I_RHhNa.js';
|
|
9
|
+
import '../auth-DcK5ERaL.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Events the app's OpenAI-compat stream adapter ({@link toLoopEvents}) yields.
|
package/dist/runtime/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
runToolLoop,
|
|
13
13
|
streamToolLoop,
|
|
14
14
|
toLoopEvents
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-TQ5M7BFV.js";
|
|
16
16
|
import {
|
|
17
17
|
DEFAULT_TANGLE_BILLING_ENFORCEMENT_ENV_VAR,
|
|
18
18
|
DEFAULT_TANGLE_ROUTER_BASE_URL,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
tangleExecutionKeyHttpError,
|
|
29
29
|
trimOrNull
|
|
30
30
|
} from "../chunk-7W5XSTUF.js";
|
|
31
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-PPSZNVKT.js";
|
|
32
32
|
export {
|
|
33
33
|
DEFAULT_TANGLE_BILLING_ENFORCEMENT_ENV_VAR,
|
|
34
34
|
DEFAULT_TANGLE_ROUTER_BASE_URL,
|
package/dist/sandbox/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AgentProfileFileMount, AgentProfileMcpServer, AgentProfile, StorageConfig, SandboxInstance, ScopedTokenScope, PromptResult, Sandbox } from '@tangle-network/sandbox';
|
|
2
2
|
export { StorageConfig } from '@tangle-network/sandbox';
|
|
3
|
-
import { a as AppToolName, c as ToolHeaderNames } from '../auth-
|
|
4
|
-
import { b as AppToolContext } from '../types-
|
|
3
|
+
import { a as AppToolName, c as ToolHeaderNames } from '../auth-DcK5ERaL.js';
|
|
4
|
+
import { b as AppToolContext } from '../types-wHs0rmtu.js';
|
|
5
5
|
import { Harness } from '../harness/index.js';
|
|
6
6
|
import { f as TangleExecutionEnvironment } from '../model-dF2h4xT9.js';
|
|
7
7
|
|
package/dist/sandbox/index.js
CHANGED
|
@@ -46,12 +46,12 @@ import {
|
|
|
46
46
|
verifySandboxTerminalToken,
|
|
47
47
|
verifyTerminalProxyToken,
|
|
48
48
|
writeProfileFilesToBox
|
|
49
|
-
} from "../chunk-
|
|
49
|
+
} from "../chunk-AF5ZST7M.js";
|
|
50
50
|
import "../chunk-5VXPDXZJ.js";
|
|
51
|
-
import "../chunk-
|
|
52
|
-
import "../chunk-
|
|
51
|
+
import "../chunk-FDJ6JQCI.js";
|
|
52
|
+
import "../chunk-RH74YJIK.js";
|
|
53
53
|
import "../chunk-7W5XSTUF.js";
|
|
54
|
-
import "../chunk-
|
|
54
|
+
import "../chunk-PPSZNVKT.js";
|
|
55
55
|
export {
|
|
56
56
|
DEFAULT_SANDBOX_RESOURCES,
|
|
57
57
|
attachReasoningEffort,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { j as SequenceMediaKind, o as SequenceTimeline, r as TimelineInterval, m as SequenceStore } from '../store-gckrNq-g.js';
|
|
2
2
|
export { M as MIN_SEQUENCE_CLIP_FRAMES, N as NewSequenceClip, a as NewSequenceDecision, b as NewSequenceTrack, S as SequenceClip, c as SequenceClipMedia, d as SequenceClipPatch, e as SequenceDecision, f as SequenceExportFormat, g as SequenceExportRecord, h as SequenceExportStatus, i as SequenceFrameSnapshot, k as SequenceMeta, l as SequenceStatus, n as SequenceStoreScope, p as SequenceTrack, q as SequenceTrackKind, T as TimelineClipBounds, s as assertClipFitsSequence, t as chooseCaptionPlacement, u as clampClipDuration, v as clampClipStart, w as formatSeconds, x as formatTimecode, y as framesToSeconds, z as secondsToFrames, A as snapshotFrame, B as trackIntervals } from '../store-gckrNq-g.js';
|
|
3
3
|
export { A as AddCaptionOperation, C as CaptionTargetResolution, a as CreateTrackOperation, D as DeleteClipOperation, E as ExtendSequenceOperation, M as MoveClipOperation, P as PlaceClipOperation, Q as QueueExportOperation, S as SEQUENCE_OPERATION_TYPES, b as SequenceApplyResult, c as SequenceOperation, d as SequenceOperationContext, e as SequenceOperationType, f as SequencePlan, g as SetClipDisabledOperation, h as SetClipTextOperation, i as SplitClipOperation, T as TrimClipOperation, j as applySequenceOperation, k as applySequenceOperations, l as assertSequenceMediaUrl, m as captionTrackNameForLanguage, n as lastClipEndFrame, p as parseSequenceOperations, r as resolveCaptionPlacement, o as resolveCaptionTarget, q as resolvePlaceClipTrack, v as validateAddCaption, s as validateCreateTrack, t as validateDeleteClip, u as validateExtendSequence, w as validateMoveClip, x as validatePlaceClip, y as validateQueueExport, z as validateSequenceOperation, B as validateSequenceOperations, F as validateSetClipDisabled, G as validateSetClipText, H as validateSplitClip, I as validateTrimClip } from '../apply-Gk4raT2j.js';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import
|
|
4
|
+
import { S as ScopedMcpServerEntryOptions, A as AppToolMcpServer } from '../mcp-4I_RHhNa.js';
|
|
5
|
+
export { M as SEQUENCES_MCP_PROTOCOL_VERSIONS } from '../mcp-rpc-DLw_r9PQ.js';
|
|
6
|
+
import '../types-wHs0rmtu.js';
|
|
7
|
+
import '../auth-DcK5ERaL.js';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Pure interchange-format builders over `SequenceTimeline` — SRT, WebVTT,
|
|
@@ -283,10 +284,6 @@ declare function findSequenceMcpTool(name: string): SequenceMcpToolDefinition |
|
|
|
283
284
|
* is a thin adapter wiring the sequences tool list + playhead env.
|
|
284
285
|
*/
|
|
285
286
|
|
|
286
|
-
/** Newest first. The handler echoes the client's requested version when
|
|
287
|
-
* supported, else answers with the newest it speaks (per MCP negotiation the
|
|
288
|
-
* client then disconnects if it cannot use it). */
|
|
289
|
-
declare const SEQUENCES_MCP_PROTOCOL_VERSIONS: readonly ["2025-06-18", "2025-03-26", "2024-11-05"];
|
|
290
287
|
interface SequencesMcpServerInfo {
|
|
291
288
|
name: string;
|
|
292
289
|
version: string;
|
|
@@ -304,29 +301,15 @@ declare function createSequencesMcpHandler(opts: CreateSequencesMcpHandlerOption
|
|
|
304
301
|
/**
|
|
305
302
|
* Profile entry for the sequences MCP server — what a product spreads into its
|
|
306
303
|
* sandbox `AgentProfile.mcp` map so the in-sandbox agent gets the live
|
|
307
|
-
* timeline channel.
|
|
308
|
-
* ../tools/mcp: transport 'http', capability token in the
|
|
309
|
-
* header (server-set, never a tool argument)
|
|
310
|
-
*
|
|
304
|
+
* timeline channel. A thin wrapper over the shared `buildScopedMcpServerEntry`
|
|
305
|
+
* mechanism (../tools/mcp): transport 'http', capability token in the
|
|
306
|
+
* Authorization header (server-set, never a tool argument). The only
|
|
307
|
+
* domain-specific values are this channel's default description and name.
|
|
311
308
|
*/
|
|
312
309
|
|
|
313
310
|
declare const DEFAULT_SEQUENCES_MCP_DESCRIPTION = "Live timeline editor for the current video sequence: read timeline state, place/move/trim/split clips, add captions, manage tracks, and queue exports. All times are seconds.";
|
|
314
|
-
|
|
315
|
-
/** App base URL the sandbox reaches back to (trailing slash tolerated). */
|
|
316
|
-
baseUrl: string;
|
|
317
|
-
/** Product route serving `createSequencesMcpHandler` for ONE sequence —
|
|
318
|
-
* the sequence id is part of the path, never a tool argument. */
|
|
319
|
-
path: string;
|
|
320
|
-
/** Capability token the product minted for this (user, sequence) scope.
|
|
321
|
-
* With no token there is no entry to build — omit the server instead. */
|
|
322
|
-
token: string;
|
|
323
|
-
description?: string;
|
|
324
|
-
/** Identity headers for products whose route recovers the user via
|
|
325
|
-
* `authenticateToolRequest`. Omit when the bearer token is self-contained. */
|
|
326
|
-
ctx?: AppToolContext;
|
|
327
|
-
headerNames?: ToolHeaderNames;
|
|
328
|
-
}
|
|
311
|
+
type BuildSequencesMcpServerEntryOptions = ScopedMcpServerEntryOptions;
|
|
329
312
|
/** Build the `AgentProfileMcpServer`-shaped entry for the sequences channel. */
|
|
330
313
|
declare function buildSequencesMcpServerEntry(opts: BuildSequencesMcpServerEntryOptions): AppToolMcpServer;
|
|
331
314
|
|
|
332
|
-
export { type BuildCaptionChunksOptions, type BuildSequencesMcpServerEntryOptions, type CaptionChunk, type CaptionCoverageEntry, type CaptionExportOptions, type ContactSheetEntry, type ContactSheetManifest, type CreateSequencesMcpHandlerOptions, DEFAULT_SEQUENCES_MCP_DESCRIPTION, type LanguageFanoutOptions, MAX_CAPTION_BATCH, type OtioClip, type OtioExternalReference, type OtioGap, type OtioMissingReference, type OtioRationalTime, type OtioStack, type OtioTimeRange, type OtioTimeline, type OtioTrack,
|
|
315
|
+
export { type BuildCaptionChunksOptions, type BuildSequencesMcpServerEntryOptions, type CaptionChunk, type CaptionCoverageEntry, type CaptionExportOptions, type ContactSheetEntry, type ContactSheetManifest, type CreateSequencesMcpHandlerOptions, DEFAULT_SEQUENCES_MCP_DESCRIPTION, type LanguageFanoutOptions, MAX_CAPTION_BATCH, type OtioClip, type OtioExternalReference, type OtioGap, type OtioMissingReference, type OtioRationalTime, type OtioStack, type OtioTimeRange, type OtioTimeline, type OtioTrack, SEQUENCE_EXPORT_FORMATS, SEQUENCE_MCP_TOOLS, SEQUENCE_MEDIA_KINDS, SEQUENCE_TRACK_KINDS, type SequenceMcpToolDefinition, type SequenceMcpToolEnv, SequenceMediaKind, SequenceStore, SequenceTimeline, type SequencesMcpServerInfo, TimelineInterval, type TranscriptSegment, buildCaptionChunks, buildContactSheetManifest, buildEdl, buildOtio, buildSequencesMcpServerEntry, buildSrt, buildVtt, captionCoverage, createSequencesMcpHandler, findSequenceMcpTool, normalizeLanguageTag, planLanguageFanout };
|