@tangle-network/agent-app 0.60.227 → 0.60.229
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/chat-routes/index.js +1 -1
- package/dist/{chunk-YS2RYZQG.js → chunk-JILHXHJE.js} +789 -745
- package/dist/chunk-JILHXHJE.js.map +1 -0
- package/dist/chunk-NMZUW6VJ.js +29 -0
- package/dist/chunk-NMZUW6VJ.js.map +1 -0
- package/dist/design-canvas/index.js +42 -32
- package/dist/design-canvas/index.js.map +1 -1
- package/dist/design-canvas/mcp-context.d.ts +51 -0
- package/dist/design-canvas/mcp-elements-tools.d.ts +3 -0
- package/dist/design-canvas/mcp-input.d.ts +35 -0
- package/dist/design-canvas/mcp-pages-tools.d.ts +3 -0
- package/dist/design-canvas/mcp-read-tools.d.ts +3 -0
- package/dist/design-canvas/mcp-templates-tools.d.ts +3 -0
- package/dist/design-canvas/mcp-tools.d.ts +3 -9
- package/dist/public-consultation/index.d.ts +2 -2
- package/dist/sandbox/access.d.ts +46 -0
- package/dist/sandbox/app-tools.d.ts +129 -0
- package/dist/sandbox/box-health.d.ts +8 -0
- package/dist/sandbox/configuration.d.ts +280 -0
- package/dist/sandbox/credentials.d.ts +55 -0
- package/dist/sandbox/exec-failure.d.ts +9 -0
- package/dist/sandbox/existing-box.d.ts +43 -0
- package/dist/sandbox/index.d.ts +32 -950
- package/dist/sandbox/index.js +1 -1
- package/dist/sandbox/lifecycle-errors.d.ts +51 -0
- package/dist/sandbox/payload-limits.d.ts +55 -0
- package/dist/sandbox/product-egress.d.ts +4 -0
- package/dist/sandbox/profile-corpus.d.ts +16 -0
- package/dist/sandbox/profile-files.d.ts +16 -0
- package/dist/sandbox/prompt-dispatch.d.ts +14 -0
- package/dist/sandbox/prompt-events.d.ts +71 -0
- package/dist/sandbox/prompt-options.d.ts +79 -0
- package/dist/sandbox/prompt-profile.d.ts +61 -0
- package/dist/sandbox/prompt-result.d.ts +57 -0
- package/dist/sandbox/runtime-cache.d.ts +43 -0
- package/dist/sandbox/runtime-connection.d.ts +9 -0
- package/dist/sandbox/shell-path.d.ts +2 -0
- package/dist/sandbox/workspace-boxes.d.ts +76 -0
- package/dist/sandbox/workspace-claim.d.ts +13 -0
- package/dist/sandbox/workspace-provision.d.ts +9 -0
- package/dist/sequences/index.js +6 -20
- package/dist/sequences/index.js.map +1 -1
- package/dist/sequences/mcp-tools.d.ts +0 -18
- package/dist/tools/mcp-arguments.d.ts +4 -0
- package/package.json +1 -1
- package/dist/chunk-YS2RYZQG.js.map +0 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// src/tools/mcp-arguments.ts
|
|
2
|
+
function isRecord(value) {
|
|
3
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4
|
+
}
|
|
5
|
+
function requireString(args, name) {
|
|
6
|
+
const value = args[name];
|
|
7
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
8
|
+
throw new Error(`${name} is required and must be a non-empty string`);
|
|
9
|
+
}
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
function requireEnum(args, name, values) {
|
|
13
|
+
const value = args[name];
|
|
14
|
+
if (typeof value !== "string" || !values.includes(value)) {
|
|
15
|
+
throw new Error(`${name} must be one of: ${values.join(", ")}`);
|
|
16
|
+
}
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
function objectSchema(properties, required) {
|
|
20
|
+
return { type: "object", properties, required, additionalProperties: false };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
isRecord,
|
|
25
|
+
requireString,
|
|
26
|
+
requireEnum,
|
|
27
|
+
objectSchema
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=chunk-NMZUW6VJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tools/mcp-arguments.ts"],"sourcesContent":["\n\n// ---------------------------------------------------------------------------\n// Argument readers — fail loud with name + expected type\n// ---------------------------------------------------------------------------\n\nexport function isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n\nexport function requireString(args: Record<string, unknown>, name: string): string {\n const value = args[name]\n if (typeof value !== 'string' || value.trim().length === 0) {\n throw new Error(`${name} is required and must be a non-empty string`)\n }\n return value\n}\n\nexport function requireEnum<T extends string>(args: Record<string, unknown>, name: string, values: readonly T[]): T {\n const value = args[name]\n if (typeof value !== 'string' || !(values as readonly string[]).includes(value)) {\n throw new Error(`${name} must be one of: ${values.join(', ')}`)\n }\n return value as T\n}\n\n// ---------------------------------------------------------------------------\n// JSON Schema helpers\n// ---------------------------------------------------------------------------\n\nexport function objectSchema(properties: Record<string, unknown>, required: string[]): Record<string, unknown> {\n return { type: 'object', properties, required, additionalProperties: false }\n}\n"],"mappings":";AAMO,SAAS,SAAS,OAAkD;AACzE,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEO,SAAS,cAAc,MAA+B,MAAsB;AACjF,QAAM,QAAQ,KAAK,IAAI;AACvB,MAAI,OAAO,UAAU,YAAY,MAAM,KAAK,EAAE,WAAW,GAAG;AAC1D,UAAM,IAAI,MAAM,GAAG,IAAI,6CAA6C;AAAA,EACtE;AACA,SAAO;AACT;AAEO,SAAS,YAA8B,MAA+B,MAAc,QAAyB;AAClH,QAAM,QAAQ,KAAK,IAAI;AACvB,MAAI,OAAO,UAAU,YAAY,CAAE,OAA6B,SAAS,KAAK,GAAG;AAC/E,UAAM,IAAI,MAAM,GAAG,IAAI,oBAAoB,OAAO,KAAK,IAAI,CAAC,EAAE;AAAA,EAChE;AACA,SAAO;AACT;AAMO,SAAS,aAAa,YAAqC,UAA6C;AAC7G,SAAO,EAAE,MAAM,UAAU,YAAY,UAAU,sBAAsB,MAAM;AAC7E;","names":[]}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isRecord,
|
|
3
|
+
objectSchema,
|
|
4
|
+
requireEnum,
|
|
5
|
+
requireString
|
|
6
|
+
} from "../chunk-NMZUW6VJ.js";
|
|
1
7
|
import {
|
|
2
8
|
CHANNEL_PRESETS,
|
|
3
9
|
EXPORT_PRESETS,
|
|
@@ -204,17 +210,7 @@ function copyElement(element, idMap) {
|
|
|
204
210
|
return base;
|
|
205
211
|
}
|
|
206
212
|
|
|
207
|
-
// src/design-canvas/mcp-
|
|
208
|
-
function isRecord(value) {
|
|
209
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
210
|
-
}
|
|
211
|
-
function requireString(args, name) {
|
|
212
|
-
const value = args[name];
|
|
213
|
-
if (typeof value !== "string" || value.trim().length === 0) {
|
|
214
|
-
throw new Error(`${name} is required and must be a non-empty string`);
|
|
215
|
-
}
|
|
216
|
-
return value;
|
|
217
|
-
}
|
|
213
|
+
// src/design-canvas/mcp-input.ts
|
|
218
214
|
function optionalString(args, name) {
|
|
219
215
|
const value = args[name];
|
|
220
216
|
if (value === void 0 || value === null) return void 0;
|
|
@@ -259,18 +255,20 @@ function optionalRecord(args, name) {
|
|
|
259
255
|
}
|
|
260
256
|
return value;
|
|
261
257
|
}
|
|
262
|
-
function requireEnum(args, name, values) {
|
|
263
|
-
const value = args[name];
|
|
264
|
-
if (typeof value !== "string" || !values.includes(value)) {
|
|
265
|
-
throw new Error(`${name} must be one of: ${values.join(", ")}`);
|
|
266
|
-
}
|
|
267
|
-
return value;
|
|
268
|
-
}
|
|
269
258
|
function optionalEnum(args, name, values) {
|
|
270
259
|
const value = args[name];
|
|
271
260
|
if (value === void 0 || value === null) return void 0;
|
|
272
261
|
return requireEnum(args, name, values);
|
|
273
262
|
}
|
|
263
|
+
var pageIdProp = { type: "string", description: "Page id to target. Omit to target the first page." };
|
|
264
|
+
var elementIdProp = { type: "string", description: "Element id to target." };
|
|
265
|
+
var xProp = { type: "number", description: "X position in page coordinates (px)." };
|
|
266
|
+
var yProp = { type: "number", description: "Y position in page coordinates (px)." };
|
|
267
|
+
var widthProp = { type: "number", description: "Width in px (must be > 0)." };
|
|
268
|
+
var heightProp = { type: "number", description: "Height in px (must be > 0)." };
|
|
269
|
+
var colorProp = (label) => ({ type: "string", description: `${label} \u2014 hex (#rrggbb), rgb(), rgba(), or "transparent".` });
|
|
270
|
+
|
|
271
|
+
// src/design-canvas/mcp-context.ts
|
|
274
272
|
function resolvePageId(document, args) {
|
|
275
273
|
const pageId = optionalString(args, "page_id");
|
|
276
274
|
if (pageId) {
|
|
@@ -327,17 +325,9 @@ function collectPageSlotAttrs(page) {
|
|
|
327
325
|
}
|
|
328
326
|
return slots;
|
|
329
327
|
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
var pageIdProp = { type: "string", description: "Page id to target. Omit to target the first page." };
|
|
334
|
-
var elementIdProp = { type: "string", description: "Element id to target." };
|
|
335
|
-
var xProp = { type: "number", description: "X position in page coordinates (px)." };
|
|
336
|
-
var yProp = { type: "number", description: "Y position in page coordinates (px)." };
|
|
337
|
-
var widthProp = { type: "number", description: "Width in px (must be > 0)." };
|
|
338
|
-
var heightProp = { type: "number", description: "Height in px (must be > 0)." };
|
|
339
|
-
var colorProp = (label) => ({ type: "string", description: `${label} \u2014 hex (#rrggbb), rgb(), rgba(), or "transparent".` });
|
|
340
|
-
var CANVAS_MCP_TOOLS = [
|
|
328
|
+
|
|
329
|
+
// src/design-canvas/mcp-read-tools.ts
|
|
330
|
+
var CANVAS_READ_TOOLS = [
|
|
341
331
|
// ─── read ────────────────────────────────────────────────────────────────
|
|
342
332
|
{
|
|
343
333
|
name: "get_scene_state",
|
|
@@ -391,7 +381,11 @@ var CANVAS_MCP_TOOLS = [
|
|
|
391
381
|
const decisions = await env.store.listDecisions(limit);
|
|
392
382
|
return { decisions };
|
|
393
383
|
}
|
|
394
|
-
}
|
|
384
|
+
}
|
|
385
|
+
];
|
|
386
|
+
|
|
387
|
+
// src/design-canvas/mcp-elements-tools.ts
|
|
388
|
+
var CANVAS_ELEMENTS_TOOLS = [
|
|
395
389
|
// ─── add convenience wrappers ─────────────────────────────────────────────
|
|
396
390
|
{
|
|
397
391
|
name: "add_text",
|
|
@@ -794,7 +788,11 @@ var CANVAS_MCP_TOOLS = [
|
|
|
794
788
|
]);
|
|
795
789
|
return result;
|
|
796
790
|
}
|
|
797
|
-
}
|
|
791
|
+
}
|
|
792
|
+
];
|
|
793
|
+
|
|
794
|
+
// src/design-canvas/mcp-pages-tools.ts
|
|
795
|
+
var CANVAS_PAGES_TOOLS = [
|
|
798
796
|
// ─── page management ──────────────────────────────────────────────────────
|
|
799
797
|
{
|
|
800
798
|
name: "add_page",
|
|
@@ -939,7 +937,11 @@ var CANVAS_MCP_TOOLS = [
|
|
|
939
937
|
]);
|
|
940
938
|
return result;
|
|
941
939
|
}
|
|
942
|
-
}
|
|
940
|
+
}
|
|
941
|
+
];
|
|
942
|
+
|
|
943
|
+
// src/design-canvas/mcp-templates-tools.ts
|
|
944
|
+
var CANVAS_TEMPLATES_TOOLS = [
|
|
943
945
|
// ─── template / data binding ──────────────────────────────────────────────
|
|
944
946
|
{
|
|
945
947
|
name: "bind_slot",
|
|
@@ -1079,6 +1081,14 @@ var CANVAS_MCP_TOOLS = [
|
|
|
1079
1081
|
}
|
|
1080
1082
|
];
|
|
1081
1083
|
|
|
1084
|
+
// src/design-canvas/mcp-tools.ts
|
|
1085
|
+
var CANVAS_MCP_TOOLS = [
|
|
1086
|
+
...CANVAS_READ_TOOLS,
|
|
1087
|
+
...CANVAS_ELEMENTS_TOOLS,
|
|
1088
|
+
...CANVAS_PAGES_TOOLS,
|
|
1089
|
+
...CANVAS_TEMPLATES_TOOLS
|
|
1090
|
+
];
|
|
1091
|
+
|
|
1082
1092
|
// src/design-canvas/mcp-handler.ts
|
|
1083
1093
|
function createDesignCanvasMcpHandler(opts) {
|
|
1084
1094
|
const serverInfo = opts.serverInfo ?? { name: "design-canvas", version: "1.0.0" };
|