@tangle-network/sandbox 0.65.1 → 0.65.2

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.
Files changed (31) hide show
  1. package/dist/agent/index.d.ts +4 -4
  2. package/dist/agent/index.js +2 -2
  3. package/dist/agent/preview.d.ts +1 -1
  4. package/dist/{agent-run-outcome-B2GRLNiR.d.ts → agent-run-outcome-D8Riqf7N.d.ts} +1 -1
  5. package/dist/auth/index.js +1 -1
  6. package/dist/{cli-auth-bundle-DEwA4y7R.js → cli-auth-bundle-BBuXynrM.js} +1 -1
  7. package/dist/{client-MuxTROy7.js → client-CmoTway8.js} +11 -10
  8. package/dist/{client-DLd0YCcK.d.ts → client-DV1SbwZK.d.ts} +121 -6
  9. package/dist/core.d.ts +6 -6
  10. package/dist/core.js +4 -4
  11. package/dist/{index-OlfnNs7A.d.ts → index-DpsISCBX.d.ts} +3 -3
  12. package/dist/index.d.ts +8 -8
  13. package/dist/index.js +5 -5
  14. package/dist/{interactive-controller-CfD8S3S7.d.ts → interactive-controller-BtdROvsm.d.ts} +1 -1
  15. package/dist/{lines-DwApng9S.d.ts → lines-DViw4KHn.d.ts} +1 -1
  16. package/dist/lines.d.ts +1 -1
  17. package/dist/{local-cli-auth-BR-B4HLq.js → local-cli-auth-BO2sfVoW.js} +1 -1
  18. package/dist/{preview-MU5AbbbZ.d.ts → preview-DRZnmu5V.d.ts} +3 -3
  19. package/dist/{public-templates-CqQWFYZG.d.ts → public-templates-ursM1K2F.d.ts} +1 -1
  20. package/dist/public-templates.d.ts +1 -1
  21. package/dist/runtime.d.ts +3 -3
  22. package/dist/{sandbox-mZ5kF4kb.js → sandbox-DiigN_DB.js} +5 -4
  23. package/dist/select-seat-BSEdpAMq.js +331 -0
  24. package/dist/select-seat-command.d.ts +16 -0
  25. package/dist/select-seat-command.js +87 -0
  26. package/dist/tangle/index.d.ts +1 -1
  27. package/dist/tangle/index.js +1 -1
  28. package/dist/{tangle-B1T44RTd.js → tangle-Ci5No-40.js} +1 -1
  29. package/dist/{types-Dal-kCMH.d.ts → types-D_RvPPTq.d.ts} +2 -2
  30. package/package.json +9 -4
  31. package/dist/line-application-CHcIY0uD.js +0 -124
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox",
3
- "version": "0.65.1",
3
+ "version": "0.65.2",
4
4
  "description": "Client SDK for the Tangle Sandbox platform - build AI agent applications with dev containers",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -44,6 +44,11 @@
44
44
  "types": "./dist/auth/index.d.ts",
45
45
  "default": "./dist/auth/index.js"
46
46
  },
47
+ "./select-seat/command": {
48
+ "import": "./dist/select-seat-command.js",
49
+ "types": "./dist/select-seat-command.d.ts",
50
+ "default": "./dist/select-seat-command.js"
51
+ },
47
52
  "./collaboration": {
48
53
  "import": "./dist/collaboration/index.js",
49
54
  "types": "./dist/collaboration/index.d.ts",
@@ -162,14 +167,14 @@
162
167
  "@products/sandbox-test-utils": "0.0.0",
163
168
  "@repo/shared": "0.0.0",
164
169
  "@tangle-network/agent-profile-materialize": "0.26.0",
165
- "@tangle-network/cli-agent-registry": "0.10.2",
166
170
  "@tangle-network/runtime-contracts": "0.19.0",
167
171
  "@tangle-network/sdk": "4.0.16",
172
+ "@tangle-network/cli-agent-registry": "0.10.2",
168
173
  "@tangle-network/sse-core": "0.0.0"
169
174
  },
170
175
  "tangleRelease": {
171
- "sourceSha": "fd20025ce7bffcc0afacd8d2b6b47c5b07839c15",
172
- "mergedAt": "2026-10-24T17:40:20-06:00"
176
+ "sourceSha": "7a07f19356e846a3448c7bb531efac37a09e746c",
177
+ "mergedAt": "2026-10-24T20:40:38-06:00"
173
178
  },
174
179
  "scripts": {
175
180
  "build": "node scripts/build-dist.mjs",
@@ -1,124 +0,0 @@
1
- //#region src/line-application.ts
2
- /** Bounded callback request bytes after canonicalization, including JSON framing. */
3
- const LINE_APPLICATION_REQUEST_MAX_BYTES = 96 * 1024;
4
- /** Fits the Lines reply splitter and the callback transport's 64 KiB read bound. */
5
- const LINE_APPLICATION_REPLY_MAX_CHARS = 12e3;
6
- function record(value) {
7
- if (value === null || typeof value !== "object" || Array.isArray(value)) throw new TypeError("Expected a line application object");
8
- return value;
9
- }
10
- function text(value, max) {
11
- if (typeof value !== "string" || !value.trim() || value.includes("\0") || value.length > max) throw new TypeError("Invalid line application text");
12
- return value;
13
- }
14
- function id(value) {
15
- const result = text(value, 256);
16
- if (!/^[A-Za-z0-9][A-Za-z0-9_.:@-]*$/.test(result)) throw new TypeError("Invalid line application identity");
17
- return result;
18
- }
19
- function subjectId(value) {
20
- if (typeof value !== "string" || !/^[A-Za-z0-9][A-Za-z0-9:._-]{0,127}$/.test(value)) throw new TypeError("Invalid line application subject");
21
- return value;
22
- }
23
- function revision(value) {
24
- const result = text(value, 64);
25
- if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(result) || !Number.isFinite(Date.parse(result)) || new Date(result).toISOString() !== result) throw new TypeError("Invalid line member revision");
26
- return result;
27
- }
28
- function deadline(value) {
29
- const result = text(value, 64);
30
- if (!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/.test(result) || !Number.isFinite(Date.parse(result)) || new Date(result).toISOString() !== result) throw new TypeError("Invalid line dispatch deadline");
31
- return result;
32
- }
33
- function binding(value) {
34
- const result = text(value, 1024);
35
- if (!/^[\x21-\x7e]+$/.test(result)) throw new TypeError("Invalid line application binding");
36
- return result;
37
- }
38
- /** Canonicalize only defined fields. Unknown provider payloads and credentials stay out. */
39
- function parseLineApplicationRequest(value) {
40
- const input = record(value);
41
- if (input.version !== 1) throw new TypeError("Unknown line application version");
42
- const sender = record(input.sender);
43
- const transport = input.transport;
44
- if (transport !== "imessage" && transport !== "sms" && transport !== "whatsapp" && transport !== "email") throw new TypeError("Unknown line transport");
45
- const receivedAt = text(input.receivedAt, 64);
46
- if (!Number.isFinite(Date.parse(receivedAt))) throw new TypeError("Invalid line message time");
47
- const hasSubject = input.subjectId !== void 0;
48
- const hasRevision = input.memberRevision !== void 0;
49
- if (hasSubject !== hasRevision) throw new TypeError("Incomplete line member authority");
50
- const hasFence = input.dispatchFence !== void 0;
51
- const hasDeadline = input.dispatchDeadline !== void 0;
52
- if (hasFence !== hasDeadline || hasSubject && !hasFence && input.acceptedExecutionId === void 0) throw new TypeError("Incomplete line dispatch authority");
53
- const result = {
54
- version: 1,
55
- binding: binding(input.binding),
56
- messageId: id(input.messageId),
57
- lineId: id(input.lineId),
58
- attachmentId: id(input.attachmentId),
59
- memberId: id(input.memberId),
60
- lineThreadId: id(input.lineThreadId),
61
- ownerUserId: id(input.ownerUserId),
62
- ...hasSubject ? { subjectId: subjectId(input.subjectId) } : {},
63
- ...hasRevision ? { memberRevision: revision(input.memberRevision) } : {},
64
- ...hasFence ? { dispatchFence: id(input.dispatchFence) } : {},
65
- ...hasDeadline ? { dispatchDeadline: deadline(input.dispatchDeadline) } : {},
66
- sender: {
67
- address: text(sender.address, 320),
68
- role: id(sender.role)
69
- },
70
- transport,
71
- receivedAt,
72
- ...input.acceptedExecutionId === void 0 ? {} : { acceptedExecutionId: id(input.acceptedExecutionId) },
73
- text: text(input.text, 64 * 1024)
74
- };
75
- if (new TextEncoder().encode(JSON.stringify(result)).byteLength > 98304) throw new TypeError("Line application request exceeds the byte limit");
76
- return result;
77
- }
78
- /** A raw agent response is not this receipt. Applications report only settled output. */
79
- function parseLineApplicationResult(value, request) {
80
- const result = record(value);
81
- if (result.version !== 1 || result.binding !== request.binding || result.messageId !== request.messageId || result.attachmentId !== request.attachmentId) throw new TypeError("Line application result identity mismatch");
82
- if (request.acceptedExecutionId !== void 0 && result.executionId !== request.acceptedExecutionId) throw new TypeError("Accepted application execution changed");
83
- const identity = {
84
- version: 1,
85
- binding: request.binding,
86
- messageId: request.messageId,
87
- attachmentId: request.attachmentId
88
- };
89
- switch (result.state) {
90
- case "pending":
91
- if (typeof result.admitted !== "boolean") throw new TypeError("Admission is not established");
92
- if (result.admitted) return {
93
- ...identity,
94
- state: "pending",
95
- admitted: true,
96
- executionId: id(result.executionId)
97
- };
98
- if (result.executionId !== void 0) throw new TypeError("Unadmitted result cannot name an execution");
99
- return {
100
- ...identity,
101
- state: "pending",
102
- admitted: false
103
- };
104
- case "completed": return {
105
- ...identity,
106
- state: "completed",
107
- executionId: id(result.executionId),
108
- text: text(result.text, LINE_APPLICATION_REPLY_MAX_CHARS)
109
- };
110
- case "failed": {
111
- const code = text(result.code, 80);
112
- if (!/^[a-z][a-z0-9_:.-]*$/.test(code)) throw new TypeError("Invalid failure code");
113
- return {
114
- ...identity,
115
- state: "failed",
116
- code,
117
- ...result.executionId === void 0 ? {} : { executionId: id(result.executionId) }
118
- };
119
- }
120
- default: throw new TypeError("Unknown line application state");
121
- }
122
- }
123
- //#endregion
124
- export { parseLineApplicationResult as i, LINE_APPLICATION_REQUEST_MAX_BYTES as n, parseLineApplicationRequest as r, LINE_APPLICATION_REPLY_MAX_CHARS as t };