@tangle-network/agent-app 0.63.74 → 0.63.76
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/{DesignCanvas-566V5KVC.js → DesignCanvas-DRVL3MWL.js} +3 -3
- package/dist/{DesignCanvasEditor-PUO5Y6FB.js → DesignCanvasEditor-5T3MHHFH.js} +4 -4
- package/dist/agent-profiles/d1.js +3 -3
- package/dist/agent-profiles/index.js +3 -3
- package/dist/assistant/index.js +3 -3
- package/dist/assistant/index.js.map +1 -1
- package/dist/chat-routes/index.js +4 -4
- package/dist/{chunk-WYQTPFPI.js → chunk-3ELC7F62.js} +2 -2
- package/dist/{chunk-2ACI3WYT.js → chunk-5DXOFO4V.js} +2 -2
- package/dist/{chunk-E2JMXA2V.js → chunk-CGBB2AUP.js} +5 -5
- package/dist/{chunk-E2JMXA2V.js.map → chunk-CGBB2AUP.js.map} +1 -1
- package/dist/{chunk-VKJEH6DG.js → chunk-CI6Z2C4L.js} +2 -2
- package/dist/{chunk-6IMNAZR7.js → chunk-DS3FDGVJ.js} +2 -2
- package/dist/{chunk-XJ7DC2DI.js → chunk-SK6WU2TI.js} +3 -3
- package/dist/{chunk-62BPUU3A.js → chunk-V2BC73KQ.js} +5 -5
- package/dist/{chunk-I4CFBLSJ.js → chunk-Y3HRQVAO.js} +10 -10
- package/dist/{chunk-KBJZMR4E.js → chunk-Y5WTAHWY.js} +1 -1
- package/dist/chunk-Y5WTAHWY.js.map +1 -0
- package/dist/{chunk-YQD2RISF.js → chunk-YGMJ6NDY.js} +3 -3
- package/dist/{chunk-OBKVNZPH.js → chunk-YL5JDX7K.js} +4 -4
- package/dist/{chunk-OBKVNZPH.js.map → chunk-YL5JDX7K.js.map} +1 -1
- package/dist/design-canvas-react/index.js +9 -9
- package/dist/design-canvas-react/lazy.js +1 -1
- package/dist/platform/index.js +8 -8
- package/dist/preset-cloudflare/index.js +5 -5
- package/dist/public-consultation/index.js +4 -4
- package/dist/sandbox/index.js +4 -4
- package/dist/settings-react/index.js +64 -31
- package/dist/settings-react/index.js.map +1 -1
- package/dist/settings-react/members-section.d.ts +15 -5
- package/dist/stories/settings/settings-demo.d.ts +4 -1
- package/dist/teams/index.js +1 -1
- package/dist/teams/invitations-api.d.ts +6 -4
- package/dist/teams/invitations-api.js +4 -2
- package/dist/teams/invitations-api.js.map +1 -1
- package/dist/teams/invitations.d.ts +2 -0
- package/dist/teams/members-api.js +2 -2
- package/dist/teams-react/components/invitation-detail.d.ts +4 -2
- package/dist/teams-react/index.js +2 -2
- package/dist/theme/tokens.css +19 -19
- package/dist/tools/index.js +4 -4
- package/dist/web-react/index.js +7 -7
- package/dist/work-product/index.js +2 -2
- package/dist/worker-build/index.d.ts +26 -0
- package/dist/worker-build/index.js +73 -0
- package/dist/worker-build/index.js.map +1 -0
- package/package.json +14 -9
- package/dist/chunk-KBJZMR4E.js.map +0 -1
- /package/dist/{DesignCanvas-566V5KVC.js.map → DesignCanvas-DRVL3MWL.js.map} +0 -0
- /package/dist/{DesignCanvasEditor-PUO5Y6FB.js.map → DesignCanvasEditor-5T3MHHFH.js.map} +0 -0
- /package/dist/{chunk-WYQTPFPI.js.map → chunk-3ELC7F62.js.map} +0 -0
- /package/dist/{chunk-2ACI3WYT.js.map → chunk-5DXOFO4V.js.map} +0 -0
- /package/dist/{chunk-VKJEH6DG.js.map → chunk-CI6Z2C4L.js.map} +0 -0
- /package/dist/{chunk-6IMNAZR7.js.map → chunk-DS3FDGVJ.js.map} +0 -0
- /package/dist/{chunk-XJ7DC2DI.js.map → chunk-SK6WU2TI.js.map} +0 -0
- /package/dist/{chunk-62BPUU3A.js.map → chunk-V2BC73KQ.js.map} +0 -0
- /package/dist/{chunk-I4CFBLSJ.js.map → chunk-Y3HRQVAO.js.map} +0 -0
- /package/dist/{chunk-YQD2RISF.js.map → chunk-YGMJ6NDY.js.map} +0 -0
package/dist/web-react/index.js
CHANGED
|
@@ -159,6 +159,10 @@ import {
|
|
|
159
159
|
MENTION_PILL_CLASS
|
|
160
160
|
} from "../chunk-3HUFJ5LO.js";
|
|
161
161
|
import "../chunk-7PULOECS.js";
|
|
162
|
+
import {
|
|
163
|
+
tabTerminalConnectionId,
|
|
164
|
+
useSandboxTerminalConnection
|
|
165
|
+
} from "../chunk-E4AY62T2.js";
|
|
162
166
|
import "../chunk-ZOS3D26Z.js";
|
|
163
167
|
import {
|
|
164
168
|
AGENT_PROFILE_EDITOR_SECTIONS,
|
|
@@ -235,19 +239,15 @@ import {
|
|
|
235
239
|
usePopover
|
|
236
240
|
} from "../chunk-RO25WIVS.js";
|
|
237
241
|
import "../chunk-ZAMHLXNS.js";
|
|
238
|
-
import {
|
|
239
|
-
tabTerminalConnectionId,
|
|
240
|
-
useSandboxTerminalConnection
|
|
241
|
-
} from "../chunk-E4AY62T2.js";
|
|
242
242
|
import "../chunk-SJWIZT7B.js";
|
|
243
|
+
import {
|
|
244
|
+
ProviderLogo
|
|
245
|
+
} from "../chunk-RASGKEAL.js";
|
|
243
246
|
import {
|
|
244
247
|
ReviewFeedbackForm
|
|
245
248
|
} from "../chunk-TEZETVLE.js";
|
|
246
249
|
import "../chunk-ZA56ZOIT.js";
|
|
247
250
|
import "../chunk-AVP5SNIG.js";
|
|
248
|
-
import {
|
|
249
|
-
ProviderLogo
|
|
250
|
-
} from "../chunk-RASGKEAL.js";
|
|
251
251
|
import "../chunk-FQYAJYPW.js";
|
|
252
252
|
import {
|
|
253
253
|
ALLOWED_ATTACHMENT_SNIFFED_MIMES,
|
|
@@ -26,9 +26,9 @@ import {
|
|
|
26
26
|
} from "../chunk-ZVEEWGDK.js";
|
|
27
27
|
import {
|
|
28
28
|
defineAppTool
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-DS3FDGVJ.js";
|
|
30
30
|
import "../chunk-UGWQLQDS.js";
|
|
31
|
-
import "../chunk-
|
|
31
|
+
import "../chunk-CGBB2AUP.js";
|
|
32
32
|
import {
|
|
33
33
|
ToolInputError
|
|
34
34
|
} from "../chunk-F4XBNR5L.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@tangle-network/agent-app/worker-build` — the chunk rules for a Worker that
|
|
3
|
+
* `@cloudflare/vite-plugin` builds in the `ssr` environment.
|
|
4
|
+
*
|
|
5
|
+
* Cloudflare evaluates a Worker's chunks in import order. When two chunks
|
|
6
|
+
* import each other, one of them runs before the chunk it reads, and the Worker
|
|
7
|
+
* crashes at startup (`Cannot read properties of undefined`) or survives only
|
|
8
|
+
* because of the order the chunks happen to load in. agent-interface is the
|
|
9
|
+
* package every agent app bundles that Rolldown splits across chunks, so
|
|
10
|
+
* {@link workerChunkGraph} puts all of it in one chunk and then fails the build
|
|
11
|
+
* on any static chunk cycle that remains.
|
|
12
|
+
*
|
|
13
|
+
* The plugin is type-only coupled to `vite`; the app that calls it already
|
|
14
|
+
* installs Vite.
|
|
15
|
+
*/
|
|
16
|
+
import type { Plugin } from 'vite';
|
|
17
|
+
/**
|
|
18
|
+
* Put every `@tangle-network/agent-interface` module of the Worker bundle in
|
|
19
|
+
* one chunk, and fail the build when the bundle has a static chunk cycle.
|
|
20
|
+
*
|
|
21
|
+
* The group sets `maxSize: Infinity` so an app's global `codeSplitting.maxSize`
|
|
22
|
+
* cannot split the package again: measured on gtm-agent, a 450 KB global limit
|
|
23
|
+
* cut it into 7 chunks that imported each other. Priority 90 leaves the modules
|
|
24
|
+
* of an app's own higher-priority groups (a polyfill group at 100, say) to them.
|
|
25
|
+
*/
|
|
26
|
+
export declare function workerChunkGraph(): Plugin;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// src/worker-build/index.ts
|
|
2
|
+
var AGENT_INTERFACE_MODULES = /[\\/]@tangle-network[\\/]agent-interface[\\/]/;
|
|
3
|
+
function workerChunkGraph() {
|
|
4
|
+
return {
|
|
5
|
+
name: "agent-app:worker-chunk-graph",
|
|
6
|
+
apply: "build",
|
|
7
|
+
applyToEnvironment: (environment) => environment.name === "ssr",
|
|
8
|
+
configEnvironment(name) {
|
|
9
|
+
if (name !== "ssr") return;
|
|
10
|
+
return {
|
|
11
|
+
build: {
|
|
12
|
+
rolldownOptions: {
|
|
13
|
+
output: {
|
|
14
|
+
codeSplitting: {
|
|
15
|
+
groups: [{ name: "agent-interface", test: AGENT_INTERFACE_MODULES, priority: 90, maxSize: Infinity }]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
generateBundle(_options, bundle) {
|
|
23
|
+
const chunks = Object.values(bundle).flatMap((item) => item.type === "chunk" ? [item] : []);
|
|
24
|
+
const cycles = findChunkCycles(chunks);
|
|
25
|
+
if (cycles.length === 0) return;
|
|
26
|
+
const lines = cycles.map((cycle) => ` - ${cycle.map((chunk) => `${chunk.fileName} (${chunk.moduleIds.length} modules)`).join(", ")}`);
|
|
27
|
+
this.error(
|
|
28
|
+
`The ssr bundle has ${cycles.length} static chunk cycle${cycles.length === 1 ? "" : "s"}:
|
|
29
|
+
${lines.join("\n")}
|
|
30
|
+
Cloudflare evaluates a Worker's chunks in import order, so a chunk in a cycle can run before the chunk it reads and crash at startup. Put the modules that form the cycle in one chunk with a codeSplitting group, as workerChunkGraph does for @tangle-network/agent-interface.`
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function findChunkCycles(chunks) {
|
|
36
|
+
const byName = new Map(chunks.map((chunk) => [chunk.fileName, chunk]));
|
|
37
|
+
const index = /* @__PURE__ */ new Map();
|
|
38
|
+
const lowlink = /* @__PURE__ */ new Map();
|
|
39
|
+
const open = [];
|
|
40
|
+
const onStack = /* @__PURE__ */ new Set();
|
|
41
|
+
const cycles = [];
|
|
42
|
+
let next = 0;
|
|
43
|
+
const visit = (name) => {
|
|
44
|
+
index.set(name, next);
|
|
45
|
+
lowlink.set(name, next);
|
|
46
|
+
next += 1;
|
|
47
|
+
open.push(name);
|
|
48
|
+
onStack.add(name);
|
|
49
|
+
for (const target of byName.get(name)?.imports ?? []) {
|
|
50
|
+
if (!byName.has(target)) continue;
|
|
51
|
+
if (!index.has(target)) {
|
|
52
|
+
visit(target);
|
|
53
|
+
lowlink.set(name, Math.min(lowlink.get(name), lowlink.get(target)));
|
|
54
|
+
} else if (onStack.has(target)) {
|
|
55
|
+
lowlink.set(name, Math.min(lowlink.get(name), index.get(target)));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
if (lowlink.get(name) !== index.get(name)) return;
|
|
59
|
+
const members = [];
|
|
60
|
+
for (let member = open.pop(); ; member = open.pop()) {
|
|
61
|
+
onStack.delete(member);
|
|
62
|
+
members.push(byName.get(member));
|
|
63
|
+
if (member === name) break;
|
|
64
|
+
}
|
|
65
|
+
if (members.length > 1) cycles.push(members.reverse());
|
|
66
|
+
};
|
|
67
|
+
for (const chunk of chunks) if (!index.has(chunk.fileName)) visit(chunk.fileName);
|
|
68
|
+
return cycles;
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
workerChunkGraph
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/worker-build/index.ts"],"sourcesContent":["/**\n * `@tangle-network/agent-app/worker-build` — the chunk rules for a Worker that\n * `@cloudflare/vite-plugin` builds in the `ssr` environment.\n *\n * Cloudflare evaluates a Worker's chunks in import order. When two chunks\n * import each other, one of them runs before the chunk it reads, and the Worker\n * crashes at startup (`Cannot read properties of undefined`) or survives only\n * because of the order the chunks happen to load in. agent-interface is the\n * package every agent app bundles that Rolldown splits across chunks, so\n * {@link workerChunkGraph} puts all of it in one chunk and then fails the build\n * on any static chunk cycle that remains.\n *\n * The plugin is type-only coupled to `vite`; the app that calls it already\n * installs Vite.\n */\n\nimport type { Plugin } from 'vite'\n\n/** Every module of the agent-interface package, matched by its install path. */\nconst AGENT_INTERFACE_MODULES = /[\\\\/]@tangle-network[\\\\/]agent-interface[\\\\/]/\n\ninterface ChunkNode {\n fileName: string\n imports: readonly string[]\n moduleIds: readonly string[]\n}\n\n/**\n * Put every `@tangle-network/agent-interface` module of the Worker bundle in\n * one chunk, and fail the build when the bundle has a static chunk cycle.\n *\n * The group sets `maxSize: Infinity` so an app's global `codeSplitting.maxSize`\n * cannot split the package again: measured on gtm-agent, a 450 KB global limit\n * cut it into 7 chunks that imported each other. Priority 90 leaves the modules\n * of an app's own higher-priority groups (a polyfill group at 100, say) to them.\n */\nexport function workerChunkGraph(): Plugin {\n return {\n name: 'agent-app:worker-chunk-graph',\n apply: 'build',\n applyToEnvironment: (environment) => environment.name === 'ssr',\n configEnvironment(name) {\n if (name !== 'ssr') return\n return {\n build: {\n rolldownOptions: {\n output: {\n codeSplitting: {\n groups: [{ name: 'agent-interface', test: AGENT_INTERFACE_MODULES, priority: 90, maxSize: Infinity }],\n },\n },\n },\n },\n }\n },\n generateBundle(_options, bundle) {\n const chunks = Object.values(bundle).flatMap((item) => (item.type === 'chunk' ? [item] : []))\n const cycles = findChunkCycles(chunks)\n if (cycles.length === 0) return\n const lines = cycles.map((cycle) => ` - ${cycle.map((chunk) => `${chunk.fileName} (${chunk.moduleIds.length} modules)`).join(', ')}`)\n this.error(\n `The ssr bundle has ${cycles.length} static chunk cycle${cycles.length === 1 ? '' : 's'}:\\n${lines.join('\\n')}\\n`\n + 'Cloudflare evaluates a Worker\\'s chunks in import order, so a chunk in a cycle can run before the chunk it reads and crash at startup. '\n + 'Put the modules that form the cycle in one chunk with a codeSplitting group, as workerChunkGraph does for @tangle-network/agent-interface.',\n )\n },\n }\n}\n\n/** The groups of chunks that import one another through static imports (Tarjan's strongly connected components of size 2 or more). */\nfunction findChunkCycles(chunks: readonly ChunkNode[]): ChunkNode[][] {\n const byName = new Map(chunks.map((chunk) => [chunk.fileName, chunk]))\n const index = new Map<string, number>()\n const lowlink = new Map<string, number>()\n const open: string[] = []\n const onStack = new Set<string>()\n const cycles: ChunkNode[][] = []\n let next = 0\n\n const visit = (name: string): void => {\n index.set(name, next)\n lowlink.set(name, next)\n next += 1\n open.push(name)\n onStack.add(name)\n for (const target of byName.get(name)?.imports ?? []) {\n if (!byName.has(target)) continue\n if (!index.has(target)) {\n visit(target)\n lowlink.set(name, Math.min(lowlink.get(name)!, lowlink.get(target)!))\n } else if (onStack.has(target)) {\n lowlink.set(name, Math.min(lowlink.get(name)!, index.get(target)!))\n }\n }\n if (lowlink.get(name) !== index.get(name)) return\n const members: ChunkNode[] = []\n for (let member = open.pop()!; ; member = open.pop()!) {\n onStack.delete(member)\n members.push(byName.get(member)!)\n if (member === name) break\n }\n if (members.length > 1) cycles.push(members.reverse())\n }\n\n for (const chunk of chunks) if (!index.has(chunk.fileName)) visit(chunk.fileName)\n return cycles\n}\n"],"mappings":";AAmBA,IAAM,0BAA0B;AAiBzB,SAAS,mBAA2B;AACzC,SAAO;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,oBAAoB,CAAC,gBAAgB,YAAY,SAAS;AAAA,IAC1D,kBAAkB,MAAM;AACtB,UAAI,SAAS,MAAO;AACpB,aAAO;AAAA,QACL,OAAO;AAAA,UACL,iBAAiB;AAAA,YACf,QAAQ;AAAA,cACN,eAAe;AAAA,gBACb,QAAQ,CAAC,EAAE,MAAM,mBAAmB,MAAM,yBAAyB,UAAU,IAAI,SAAS,SAAS,CAAC;AAAA,cACtG;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,IACA,eAAe,UAAU,QAAQ;AAC/B,YAAM,SAAS,OAAO,OAAO,MAAM,EAAE,QAAQ,CAAC,SAAU,KAAK,SAAS,UAAU,CAAC,IAAI,IAAI,CAAC,CAAE;AAC5F,YAAM,SAAS,gBAAgB,MAAM;AACrC,UAAI,OAAO,WAAW,EAAG;AACzB,YAAM,QAAQ,OAAO,IAAI,CAAC,UAAU,OAAO,MAAM,IAAI,CAAC,UAAU,GAAG,MAAM,QAAQ,KAAK,MAAM,UAAU,MAAM,WAAW,EAAE,KAAK,IAAI,CAAC,EAAE;AACrI,WAAK;AAAA,QACH,sBAAsB,OAAO,MAAM,sBAAsB,OAAO,WAAW,IAAI,KAAK,GAAG;AAAA,EAAM,MAAM,KAAK,IAAI,CAAC;AAAA;AAAA,MAG/G;AAAA,IACF;AAAA,EACF;AACF;AAGA,SAAS,gBAAgB,QAA6C;AACpE,QAAM,SAAS,IAAI,IAAI,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,UAAU,KAAK,CAAC,CAAC;AACrE,QAAM,QAAQ,oBAAI,IAAoB;AACtC,QAAM,UAAU,oBAAI,IAAoB;AACxC,QAAM,OAAiB,CAAC;AACxB,QAAM,UAAU,oBAAI,IAAY;AAChC,QAAM,SAAwB,CAAC;AAC/B,MAAI,OAAO;AAEX,QAAM,QAAQ,CAAC,SAAuB;AACpC,UAAM,IAAI,MAAM,IAAI;AACpB,YAAQ,IAAI,MAAM,IAAI;AACtB,YAAQ;AACR,SAAK,KAAK,IAAI;AACd,YAAQ,IAAI,IAAI;AAChB,eAAW,UAAU,OAAO,IAAI,IAAI,GAAG,WAAW,CAAC,GAAG;AACpD,UAAI,CAAC,OAAO,IAAI,MAAM,EAAG;AACzB,UAAI,CAAC,MAAM,IAAI,MAAM,GAAG;AACtB,cAAM,MAAM;AACZ,gBAAQ,IAAI,MAAM,KAAK,IAAI,QAAQ,IAAI,IAAI,GAAI,QAAQ,IAAI,MAAM,CAAE,CAAC;AAAA,MACtE,WAAW,QAAQ,IAAI,MAAM,GAAG;AAC9B,gBAAQ,IAAI,MAAM,KAAK,IAAI,QAAQ,IAAI,IAAI,GAAI,MAAM,IAAI,MAAM,CAAE,CAAC;AAAA,MACpE;AAAA,IACF;AACA,QAAI,QAAQ,IAAI,IAAI,MAAM,MAAM,IAAI,IAAI,EAAG;AAC3C,UAAM,UAAuB,CAAC;AAC9B,aAAS,SAAS,KAAK,IAAI,KAAM,SAAS,KAAK,IAAI,GAAI;AACrD,cAAQ,OAAO,MAAM;AACrB,cAAQ,KAAK,OAAO,IAAI,MAAM,CAAE;AAChC,UAAI,WAAW,KAAM;AAAA,IACvB;AACA,QAAI,QAAQ,SAAS,EAAG,QAAO,KAAK,QAAQ,QAAQ,CAAC;AAAA,EACvD;AAEA,aAAW,SAAS,OAAQ,KAAI,CAAC,MAAM,IAAI,MAAM,QAAQ,EAAG,OAAM,MAAM,QAAQ;AAChF,SAAO;AACT;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-app",
|
|
3
|
-
"version": "0.63.
|
|
3
|
+
"version": "0.63.76",
|
|
4
4
|
"packageManager": "pnpm@11.28.8",
|
|
5
5
|
"description": "Build agent applications with typed chat, tools, sandboxes, integrations, billing, and evaluation.",
|
|
6
6
|
"keywords": [
|
|
@@ -215,6 +215,11 @@
|
|
|
215
215
|
"import": "./dist/preset-cloudflare/index.js",
|
|
216
216
|
"default": "./dist/preset-cloudflare/index.js"
|
|
217
217
|
},
|
|
218
|
+
"./worker-build": {
|
|
219
|
+
"types": "./dist/worker-build/index.d.ts",
|
|
220
|
+
"import": "./dist/worker-build/index.js",
|
|
221
|
+
"default": "./dist/worker-build/index.js"
|
|
222
|
+
},
|
|
218
223
|
"./billing": {
|
|
219
224
|
"types": "./dist/billing/index.d.ts",
|
|
220
225
|
"import": "./dist/billing/index.js",
|
|
@@ -800,15 +805,15 @@
|
|
|
800
805
|
"@tangle-network/agent-integrations": "0.76.2",
|
|
801
806
|
"@tangle-network/agent-interface": "5.10.2",
|
|
802
807
|
"@tangle-network/agent-knowledge": "23.0.0",
|
|
803
|
-
"@tangle-network/agent-profile-materialize": "1.1.
|
|
804
|
-
"@tangle-network/agent-runtime": "
|
|
808
|
+
"@tangle-network/agent-profile-materialize": "1.1.2",
|
|
809
|
+
"@tangle-network/agent-runtime": "2.0.3",
|
|
805
810
|
"@tangle-network/brand": "1.29.0",
|
|
806
811
|
"@tangle-network/browser-agent-driver": "0.37.0",
|
|
807
812
|
"@tangle-network/hub-sdk": "1.0.4",
|
|
808
|
-
"@tangle-network/sandbox": "1.0.
|
|
809
|
-
"@tangle-network/sandbox-ui": "1.1.
|
|
813
|
+
"@tangle-network/sandbox": "1.0.40",
|
|
814
|
+
"@tangle-network/sandbox-ui": "1.1.5",
|
|
810
815
|
"@tangle-network/tcloud": "0.8.6",
|
|
811
|
-
"@tangle-network/ui": "11.
|
|
816
|
+
"@tangle-network/ui": "11.47.0",
|
|
812
817
|
"@testing-library/dom": "^10.4.2",
|
|
813
818
|
"@testing-library/react": "^16.3.3",
|
|
814
819
|
"@testing-library/user-event": "^14.6.8",
|
|
@@ -872,7 +877,7 @@
|
|
|
872
877
|
"@tangle-network/agent-interface": "^5.9.0",
|
|
873
878
|
"@tangle-network/agent-knowledge": "^23.0.0",
|
|
874
879
|
"@tangle-network/agent-profile-materialize": "^1.0.0",
|
|
875
|
-
"@tangle-network/agent-runtime": "^1.0.0",
|
|
880
|
+
"@tangle-network/agent-runtime": "^1.0.0 || ^2.0.0",
|
|
876
881
|
"@tangle-network/brand": ">=1.21.1",
|
|
877
882
|
"@tangle-network/browser-agent-driver": ">=0.36.1 <0.38.0",
|
|
878
883
|
"@tangle-network/hub-sdk": "^1.0.2",
|
|
@@ -1002,9 +1007,9 @@
|
|
|
1002
1007
|
}
|
|
1003
1008
|
},
|
|
1004
1009
|
"dependencies": {
|
|
1005
|
-
"@tangle-network/agent-core": "^1.0.
|
|
1010
|
+
"@tangle-network/agent-core": "^1.0.1",
|
|
1006
1011
|
"@tangle-network/agent-trace-contract": "2.2.0",
|
|
1007
|
-
"@tangle-network/charts": "0.21.
|
|
1012
|
+
"@tangle-network/charts": "0.21.22",
|
|
1008
1013
|
"proper-lockfile": "4.1.2"
|
|
1009
1014
|
}
|
|
1010
1015
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/teams/invitations.ts"],"sourcesContent":["/**\n * Pure invitation helpers for the teams capability. Zero dependencies: no\n * drizzle, no env, no react, no network. The lifecycle API (`./invitations-api`)\n * and an app's own mail transport build on these; the invitation email itself\n * is `inviteEmail` from `@tangle-network/agent-app/email`.\n */\n\nimport type { AssignableWorkspaceRole } from './roles'\n\n/** The role an invitation grants — the assignable workspace ladder (never owner). */\nexport type InvitationPermission = AssignableWorkspaceRole\n\n/** Define possible states for an invitation's lifecycle including pending, accepted, expired, and revoked */\nexport type InvitationStatus = 'pending' | 'accepted' | 'expired' | 'revoked'\n/** Define possible statuses for the sending state of an invitation email */\nexport type InvitationEmailStatus = 'not_sent' | 'sent' | 'failed'\n\n/** Define the number of days before an invitation expires */\nexport const INVITATION_EXPIRY_DAYS = 7\n\nconst INVITATION_PERMISSIONS = ['admin', 'editor', 'viewer'] as const\nconst TOKEN_BYTE_LENGTH = 32\n\n/** Normalize an invitation email by trimming whitespace and converting to lowercase */\nexport function normalizeInvitationEmail(email: string): string {\n return email.trim().toLowerCase()\n}\n\n// One `@`, a local part, and a domain with a dot and a 2+ letter ending. It is\n// the shape a mail server can deliver to, not full RFC 5322: the invite email\n// itself is the real check, and this only stops `founder@` or `founder@example`.\nconst DELIVERABLE_EMAIL = /^[^\\s@]+@[^\\s@.]+(\\.[^\\s@.]+)*\\.[^\\s@.]{2,}$/\n\n/** Whether an address has the shape an invitation can be delivered to. */\nexport function isInvitationEmail(email: string): boolean {\n return DELIVERABLE_EMAIL.test(email.trim())\n}\n\n/** What to tell someone whose invite address cannot be delivered to. */\nexport const INVITATION_EMAIL_HINT = 'Enter a full email address, such as name@company.com.'\n\n/** Resolve invitation permission from a string or return null if invalid */\nexport function parseInvitationPermission(value: string | undefined): InvitationPermission | null {\n return INVITATION_PERMISSIONS.includes(value as InvitationPermission) ? (value as InvitationPermission) : null\n}\n\n/** Calculate the expiration date of an invitation based on the given or current date */\nexport function getInvitationExpiresAt(now: Date = new Date()): Date {\n return new Date(now.getTime() + INVITATION_EXPIRY_DAYS * 24 * 60 * 60 * 1000)\n}\n\n/**\n * A cryptographically-random, URL-safe invitation token. `inv_`-prefixed so a\n * token is self-identifying and never collides with the workspaceMember invite\n * tokens minted by `members-api` (`generateInviteToken`).\n */\nexport function generateInvitationToken(): string {\n const bytes = new Uint8Array(TOKEN_BYTE_LENGTH)\n globalThis.crypto.getRandomValues(bytes)\n const token = Array.from(bytes, (byte) => String.fromCharCode(byte)).join('')\n return `inv_${btoa(token).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/g, '')}`\n}\n\n/** Generate an invite URL by combining the origin with an encoded token */\nexport function inviteUrlForToken(origin: string, token: string): string {\n return `${origin.replace(/\\/+$/, '')}/invite/${encodeURIComponent(token)}`\n}\n"],"mappings":";AAkBO,IAAM,yBAAyB;AAEtC,IAAM,yBAAyB,CAAC,SAAS,UAAU,QAAQ;AAC3D,IAAM,oBAAoB;AAGnB,SAAS,yBAAyB,OAAuB;AAC9D,SAAO,MAAM,KAAK,EAAE,YAAY;AAClC;AAKA,IAAM,oBAAoB;AAGnB,SAAS,kBAAkB,OAAwB;AACxD,SAAO,kBAAkB,KAAK,MAAM,KAAK,CAAC;AAC5C;AAGO,IAAM,wBAAwB;AAG9B,SAAS,0BAA0B,OAAwD;AAChG,SAAO,uBAAuB,SAAS,KAA6B,IAAK,QAAiC;AAC5G;AAGO,SAAS,uBAAuB,MAAY,oBAAI,KAAK,GAAS;AACnE,SAAO,IAAI,KAAK,IAAI,QAAQ,IAAI,yBAAyB,KAAK,KAAK,KAAK,GAAI;AAC9E;AAOO,SAAS,0BAAkC;AAChD,QAAM,QAAQ,IAAI,WAAW,iBAAiB;AAC9C,aAAW,OAAO,gBAAgB,KAAK;AACvC,QAAM,QAAQ,MAAM,KAAK,OAAO,CAAC,SAAS,OAAO,aAAa,IAAI,CAAC,EAAE,KAAK,EAAE;AAC5E,SAAO,OAAO,KAAK,KAAK,EAAE,QAAQ,OAAO,GAAG,EAAE,QAAQ,OAAO,GAAG,EAAE,QAAQ,QAAQ,EAAE,CAAC;AACvF;AAGO,SAAS,kBAAkB,QAAgB,OAAuB;AACvE,SAAO,GAAG,OAAO,QAAQ,QAAQ,EAAE,CAAC,WAAW,mBAAmB,KAAK,CAAC;AAC1E;","names":[]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|