@tangle-network/agent-app 0.63.76 → 0.63.78
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-DRVL3MWL.js → DesignCanvas-JA5O6Y6C.js} +2 -3
- package/dist/{DesignCanvasEditor-5T3MHHFH.js → DesignCanvasEditor-6SQAQGOY.js} +2 -3
- package/dist/agent-profiles/d1.js +3 -3
- package/dist/agent-profiles/index.js +3 -3
- package/dist/app-auth/index.js +1 -2
- package/dist/app-auth/index.js.map +1 -1
- package/dist/assistant/index.js +2 -3
- package/dist/assistant/index.js.map +1 -1
- package/dist/chat-routes/agent-producers.d.ts +5 -2
- package/dist/chat-routes/index.js +9 -10
- package/dist/chat-routes/index.js.map +1 -1
- package/dist/chat-store/index.js +1 -1
- package/dist/chat-store/parts.d.ts +4 -1
- package/dist/{chunk-JLFFTSWN.js → chunk-2CRRXINH.js} +20 -8
- package/dist/chunk-2CRRXINH.js.map +1 -0
- package/dist/{chunk-SK6WU2TI.js → chunk-DNM5CN3R.js} +3 -3
- package/dist/{chunk-CGBB2AUP.js → chunk-DURND7YS.js} +5 -5
- package/dist/{chunk-CGBB2AUP.js.map → chunk-DURND7YS.js.map} +1 -1
- package/dist/{chunk-GAYWV565.js → chunk-H3XWDX4Z.js} +2 -2
- package/dist/chunk-H3XWDX4Z.js.map +1 -0
- package/dist/{chunk-RKNNMC6T.js → chunk-H6BRJU5M.js} +1 -1
- package/dist/{chunk-YG3DSMPS.js → chunk-IWEGCOQR.js} +40 -21
- package/dist/chunk-IWEGCOQR.js.map +1 -0
- package/dist/{chunk-DS3FDGVJ.js → chunk-M42DQ6HM.js} +2 -2
- package/dist/{chunk-5DXOFO4V.js → chunk-OWNWWT76.js} +2 -2
- package/dist/{chunk-5ERXADSW.js → chunk-Q54SXI57.js} +2 -2
- package/dist/{chunk-CI6Z2C4L.js → chunk-X32H7TXZ.js} +2 -2
- package/dist/{chunk-YGMJ6NDY.js → chunk-YAIUAUWJ.js} +3 -3
- package/dist/{chunk-7O62NYGT.js → chunk-YHA6W3OW.js} +2 -2
- package/dist/design-canvas/index.js +1 -2
- package/dist/design-canvas/index.js.map +1 -1
- package/dist/design-canvas-react/engine.js +1 -2
- package/dist/design-canvas-react/index.js +2 -3
- package/dist/design-canvas-react/index.js.map +1 -1
- package/dist/design-canvas-react/lazy.js +1 -1
- package/dist/platform/index.js +1 -2
- package/dist/platform/index.js.map +1 -1
- package/dist/preset-cloudflare/index.js +5 -5
- package/dist/public-consultation/index.js +8 -9
- package/dist/public-consultation/index.js.map +1 -1
- package/dist/sandbox/index.js +4 -4
- package/dist/sequences/index.js +1 -2
- package/dist/sequences/index.js.map +1 -1
- package/dist/stories/chat/fixtures.d.ts +5 -5
- package/dist/tools/index.js +4 -4
- package/dist/web/index.d.ts +0 -1
- package/dist/web/index.js +1 -7
- package/dist/web-react/chat-stream.d.ts +3 -1
- package/dist/web-react/index.js +2 -3
- package/dist/web-react/message-projection.d.ts +2 -2
- package/dist/work-product/index.js +2 -2
- package/package.json +2 -2
- package/dist/chunk-GAYWV565.js.map +0 -1
- package/dist/chunk-JLFFTSWN.js.map +0 -1
- package/dist/chunk-XBBXPZJI.js +0 -47
- package/dist/chunk-XBBXPZJI.js.map +0 -1
- package/dist/chunk-YG3DSMPS.js.map +0 -1
- package/dist/web/speakers.d.ts +0 -30
- /package/dist/{DesignCanvas-DRVL3MWL.js.map → DesignCanvas-JA5O6Y6C.js.map} +0 -0
- /package/dist/{DesignCanvasEditor-5T3MHHFH.js.map → DesignCanvasEditor-6SQAQGOY.js.map} +0 -0
- /package/dist/{chunk-SK6WU2TI.js.map → chunk-DNM5CN3R.js.map} +0 -0
- /package/dist/{chunk-RKNNMC6T.js.map → chunk-H6BRJU5M.js.map} +0 -0
- /package/dist/{chunk-DS3FDGVJ.js.map → chunk-M42DQ6HM.js.map} +0 -0
- /package/dist/{chunk-5DXOFO4V.js.map → chunk-OWNWWT76.js.map} +0 -0
- /package/dist/{chunk-5ERXADSW.js.map → chunk-Q54SXI57.js.map} +0 -0
- /package/dist/{chunk-CI6Z2C4L.js.map → chunk-X32H7TXZ.js.map} +0 -0
- /package/dist/{chunk-YGMJ6NDY.js.map → chunk-YAIUAUWJ.js.map} +0 -0
- /package/dist/{chunk-7O62NYGT.js.map → chunk-YHA6W3OW.js.map} +0 -0
package/dist/chunk-XBBXPZJI.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// src/web/speakers.ts
|
|
2
|
-
var isSpeaker = (value) => {
|
|
3
|
-
const part = value;
|
|
4
|
-
return !!part && typeof part === "object" && part.type === "speaker" && typeof part.id === "string" && typeof part.name === "string";
|
|
5
|
-
};
|
|
6
|
-
var asRecord = (value) => value;
|
|
7
|
-
var SPEAKER_ROLE_LABEL = "Agent";
|
|
8
|
-
function expandSpeakerRows(rows) {
|
|
9
|
-
const out = [];
|
|
10
|
-
for (const row of rows) {
|
|
11
|
-
const parts = (row.role === "assistant" ? row.parts ?? [] : []).map(asRecord);
|
|
12
|
-
if (!parts.some(isSpeaker)) {
|
|
13
|
-
out.push(row);
|
|
14
|
-
continue;
|
|
15
|
-
}
|
|
16
|
-
let current = null;
|
|
17
|
-
const groups = [];
|
|
18
|
-
for (const part of parts) {
|
|
19
|
-
if (isSpeaker(part)) {
|
|
20
|
-
current = { speaker: { id: part.id, name: part.name, ...typeof part.handle === "string" ? { handle: part.handle } : {} }, parts: [] };
|
|
21
|
-
groups.push(current);
|
|
22
|
-
} else if (current) {
|
|
23
|
-
current.parts.push(part);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
groups.forEach((group, index) => {
|
|
27
|
-
const content = group.parts.filter((part) => part.type === "text" && typeof part.text === "string").map((part) => part.text).join("");
|
|
28
|
-
out.push({
|
|
29
|
-
...row,
|
|
30
|
-
id: `${row.id}#${index}:${group.speaker.id}`,
|
|
31
|
-
author: { id: group.speaker.id, name: group.speaker.name, role: SPEAKER_ROLE_LABEL },
|
|
32
|
-
content,
|
|
33
|
-
parts: group.parts,
|
|
34
|
-
// Client-built views of the whole row do not apply to one speaker's slice.
|
|
35
|
-
segments: void 0,
|
|
36
|
-
toolCalls: void 0
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
return out;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export {
|
|
44
|
-
SPEAKER_ROLE_LABEL,
|
|
45
|
-
expandSpeakerRows
|
|
46
|
-
};
|
|
47
|
-
//# sourceMappingURL=chunk-XBBXPZJI.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/web/speakers.ts"],"sourcesContent":["/**\n * A turn addressed to several agents is persisted as ONE assistant row whose\n * parts carry a `speaker` part before each responder's parts. A transcript\n * draws each answer under its author, so this splits such a row into one row\n * per speaker in stored order. Rows without a speaker part pass through\n * untouched, byte for byte. Pure and renderer-neutral: no React, no DOM.\n */\nexport interface SpeakerRow {\n id: string | number\n role?: string\n content: string\n /** Stored parts; the typed store union and raw records are both read. */\n parts?: ReadonlyArray<unknown>\n author?: { id: string; name: string; role?: string; avatarUrl?: string }\n segments?: unknown\n toolCalls?: unknown\n}\n\nexport interface Speaker {\n id: string\n name: string\n handle?: string\n}\n\nconst isSpeaker = (value: unknown): value is Record<string, unknown> & Speaker & { type: 'speaker' } => {\n const part = value as Record<string, unknown> | null\n return !!part && typeof part === 'object' && part.type === 'speaker' && typeof part.id === 'string' && typeof part.name === 'string'\n}\nconst asRecord = (value: unknown): Record<string, unknown> => value as Record<string, unknown>\n\n/** The role label a split row shows beside the agent's name. */\nexport const SPEAKER_ROLE_LABEL = 'Agent'\n\nexport function expandSpeakerRows<T extends SpeakerRow>(rows: readonly T[]): Array<T & Pick<SpeakerRow, 'author'>> {\n const out: Array<T & Pick<SpeakerRow, 'author'>> = []\n for (const row of rows) {\n const parts = (row.role === 'assistant' ? row.parts ?? [] : []).map(asRecord)\n if (!parts.some(isSpeaker)) { out.push(row); continue }\n let current: { speaker: Speaker; parts: Record<string, unknown>[] } | null = null\n const groups: Array<{ speaker: Speaker; parts: Record<string, unknown>[] }> = []\n for (const part of parts) {\n if (isSpeaker(part)) {\n current = { speaker: { id: part.id, name: part.name, ...(typeof part.handle === 'string' ? { handle: part.handle } : {}) }, parts: [] }\n groups.push(current)\n } else if (current) {\n current.parts.push(part)\n }\n // Parts before the first speaker belong to no one and are dropped; the\n // route writes a speaker part first.\n }\n groups.forEach((group, index) => {\n const content = group.parts\n .filter((part) => part.type === 'text' && typeof part.text === 'string')\n .map((part) => part.text as string)\n .join('')\n out.push({\n ...row,\n id: `${row.id}#${index}:${group.speaker.id}`,\n author: { id: group.speaker.id, name: group.speaker.name, role: SPEAKER_ROLE_LABEL },\n content,\n parts: group.parts,\n // Client-built views of the whole row do not apply to one speaker's slice.\n segments: undefined,\n toolCalls: undefined,\n })\n })\n }\n return out\n}\n"],"mappings":";AAwBA,IAAM,YAAY,CAAC,UAAqF;AACtG,QAAM,OAAO;AACb,SAAO,CAAC,CAAC,QAAQ,OAAO,SAAS,YAAY,KAAK,SAAS,aAAa,OAAO,KAAK,OAAO,YAAY,OAAO,KAAK,SAAS;AAC9H;AACA,IAAM,WAAW,CAAC,UAA4C;AAGvD,IAAM,qBAAqB;AAE3B,SAAS,kBAAwC,MAA2D;AACjH,QAAM,MAA6C,CAAC;AACpD,aAAW,OAAO,MAAM;AACtB,UAAM,SAAS,IAAI,SAAS,cAAc,IAAI,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,QAAQ;AAC5E,QAAI,CAAC,MAAM,KAAK,SAAS,GAAG;AAAE,UAAI,KAAK,GAAG;AAAG;AAAA,IAAS;AACtD,QAAI,UAAyE;AAC7E,UAAM,SAAwE,CAAC;AAC/E,eAAW,QAAQ,OAAO;AACxB,UAAI,UAAU,IAAI,GAAG;AACnB,kBAAU,EAAE,SAAS,EAAE,IAAI,KAAK,IAAI,MAAM,KAAK,MAAM,GAAI,OAAO,KAAK,WAAW,WA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