@tangle-network/agent-app 0.63.59 → 0.63.61
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-Q65UV4D5.js → DesignCanvas-566V5KVC.js} +3 -2
- package/dist/{DesignCanvasEditor-THEFESEX.js → DesignCanvasEditor-YWDEFWYQ.js} +3 -2
- package/dist/app-auth/index.js +2 -1
- package/dist/app-auth/index.js.map +1 -1
- package/dist/assistant/index.js +6 -5
- package/dist/assistant/index.js.map +1 -1
- package/dist/chat-react/index.js +3 -3
- package/dist/chat-routes/agent-producers.d.ts +38 -0
- package/dist/chat-routes/index.d.ts +1 -0
- package/dist/chat-routes/index.js +25 -8
- package/dist/chat-routes/index.js.map +1 -1
- package/dist/chat-routes/turn-admission.d.ts +3 -3
- package/dist/chat-routes/turn-route-contracts.d.ts +38 -1
- package/dist/chat-routes/wire.d.ts +29 -4
- package/dist/chat-store/index.js +4 -2
- package/dist/chat-store/index.js.map +1 -1
- package/dist/chat-store/parts.d.ts +19 -3
- package/dist/{chunk-P7UB7ZVP.js → chunk-75I4RXIE.js} +2 -2
- package/dist/{chunk-GGJYAV7R.js → chunk-DPZXCVVS.js} +2 -2
- package/dist/{chunk-GGJYAV7R.js.map → chunk-DPZXCVVS.js.map} +1 -1
- package/dist/{chunk-LAZCUQFZ.js → chunk-F2N55QQX.js} +47 -10
- package/dist/chunk-F2N55QQX.js.map +1 -0
- package/dist/{chunk-QGJOT6R6.js → chunk-F6UC2T6U.js} +49 -9
- package/dist/{chunk-QGJOT6R6.js.map → chunk-F6UC2T6U.js.map} +1 -1
- package/dist/{chunk-AICYKYYF.js → chunk-MIQL36JS.js} +17 -4
- package/dist/chunk-MIQL36JS.js.map +1 -0
- package/dist/{chunk-RILVJYXJ.js → chunk-N5KBDRSX.js} +2 -2
- package/dist/{chunk-IDQ7N36R.js → chunk-O2TYB3DH.js} +2 -2
- package/dist/{chunk-H6BRJU5M.js → chunk-RKNNMC6T.js} +1 -1
- package/dist/{chunk-HHPQMFKP.js → chunk-RNFVAAJJ.js} +2 -2
- package/dist/{chunk-KFO5R4SN.js → chunk-RVC7EHJI.js} +135 -64
- package/dist/chunk-RVC7EHJI.js.map +1 -0
- package/dist/{chunk-4E2MUVGL.js → chunk-TFV4QOCG.js} +3 -3
- package/dist/chunk-XBBXPZJI.js +47 -0
- package/dist/chunk-XBBXPZJI.js.map +1 -0
- package/dist/design-canvas/index.js +2 -1
- package/dist/design-canvas/index.js.map +1 -1
- package/dist/design-canvas-react/engine.js +2 -1
- package/dist/design-canvas-react/index.js +3 -2
- package/dist/design-canvas-react/index.js.map +1 -1
- package/dist/design-canvas-react/lazy.js +1 -1
- package/dist/operator/index.js +2 -2
- package/dist/platform/index.js +2 -1
- package/dist/platform/index.js.map +1 -1
- package/dist/preset-cloudflare/index.js +4 -4
- package/dist/public-consultation/index.d.ts +2 -2
- package/dist/public-consultation/index.js +7 -6
- package/dist/public-consultation/index.js.map +1 -1
- package/dist/sandbox/index.js +2 -2
- package/dist/sequences/index.js +2 -1
- package/dist/sequences/index.js.map +1 -1
- package/dist/stories/chat/fixtures.d.ts +4 -0
- package/dist/theme/tokens.css +2 -4
- package/dist/vault/store/index.js +330 -259
- package/dist/vault/store/index.js.map +1 -1
- package/dist/vault/store/sandbox-hydrate.d.ts +22 -1
- package/dist/vault/store/sandbox-reconcile.d.ts +11 -3
- package/dist/vault/store/sandbox-sync.d.ts +26 -0
- package/dist/web/index.d.ts +1 -0
- package/dist/web/index.js +7 -1
- package/dist/web/speakers.d.ts +30 -0
- package/dist/web-react/chat-messages.d.ts +1 -1
- package/dist/web-react/chat-stream.d.ts +7 -0
- package/dist/web-react/entry-composer.d.ts +2 -2
- package/dist/web-react/index.js +8 -5
- package/dist/web-react/use-file-mentions.d.ts +23 -4
- package/dist/workspace-react/index.d.ts +29 -1
- package/dist/workspace-react/index.js +34 -0
- package/dist/workspace-react/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/chunk-AICYKYYF.js.map +0 -1
- package/dist/chunk-KFO5R4SN.js.map +0 -1
- package/dist/chunk-LAZCUQFZ.js.map +0 -1
- /package/dist/{DesignCanvas-Q65UV4D5.js.map → DesignCanvas-566V5KVC.js.map} +0 -0
- /package/dist/{DesignCanvasEditor-THEFESEX.js.map → DesignCanvasEditor-YWDEFWYQ.js.map} +0 -0
- /package/dist/{chunk-P7UB7ZVP.js.map → chunk-75I4RXIE.js.map} +0 -0
- /package/dist/{chunk-RILVJYXJ.js.map → chunk-N5KBDRSX.js.map} +0 -0
- /package/dist/{chunk-IDQ7N36R.js.map → chunk-O2TYB3DH.js.map} +0 -0
- /package/dist/{chunk-H6BRJU5M.js.map → chunk-RKNNMC6T.js.map} +0 -0
- /package/dist/{chunk-HHPQMFKP.js.map → chunk-RNFVAAJJ.js.map} +0 -0
- /package/dist/{chunk-4E2MUVGL.js.map → chunk-TFV4QOCG.js.map} +0 -0
package/dist/chat-react/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ComposerModeControls,
|
|
3
3
|
EntryComposer
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-DPZXCVVS.js";
|
|
5
5
|
import "../chunk-L7MB2LLM.js";
|
|
6
6
|
import "../chunk-ARCXYOMS.js";
|
|
7
7
|
import "../chunk-2HQP2CTA.js";
|
|
@@ -10,8 +10,8 @@ import "../chunk-RO25WIVS.js";
|
|
|
10
10
|
import "../chunk-ZAMHLXNS.js";
|
|
11
11
|
import "../chunk-SJWIZT7B.js";
|
|
12
12
|
import "../chunk-RASGKEAL.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-75I4RXIE.js";
|
|
14
|
+
import "../chunk-F6UC2T6U.js";
|
|
15
15
|
import "../chunk-AMUXRAUO.js";
|
|
16
16
|
import "../chunk-RCSAAWOH.js";
|
|
17
17
|
import "../chunk-TXD5HXLE.js";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A turn addressed to several agents runs them one after another, in mention
|
|
3
|
+
* order, as one producer: the route sees one stream, persists one assistant
|
|
4
|
+
* row, and the row's parts carry a `speaker` part before each responder's
|
|
5
|
+
* parts so a transcript can draw each answer under its author. The live
|
|
6
|
+
* stream carries the same boundary as a `speaker` event, so a viewer can
|
|
7
|
+
* open a new block as each agent starts.
|
|
8
|
+
*
|
|
9
|
+
* Sequential on purpose: one live block at a time is what a reader can follow,
|
|
10
|
+
* the order is the order typed, and the box runs one session at a time per
|
|
11
|
+
* turn. Running responders concurrently is an internal change here, not a
|
|
12
|
+
* change to what is stored.
|
|
13
|
+
*/
|
|
14
|
+
import type { ChatTurnIdentity } from '@tangle-network/agent-runtime/durable';
|
|
15
|
+
import type { TurnTrace } from '../turn-trace/recorder';
|
|
16
|
+
import type { ChatTurnAgentsOptions, ChatTurnAgentTarget, ChatTurnProduceArgs, ChatTurnRouteProducer } from './turn-route-contracts';
|
|
17
|
+
import { type ChatMention } from './wire';
|
|
18
|
+
/**
|
|
19
|
+
* Name a turn's responders from its agent mentions, before any lock, row or
|
|
20
|
+
* model call: the product's resolver maps mentioned ids to the profiles they
|
|
21
|
+
* run as, and a mention it does not return is refused. The thread's binding
|
|
22
|
+
* does not move. Returns the response to send on refusal, otherwise the
|
|
23
|
+
* produce args carrying `agents` in mention order (unchanged when none).
|
|
24
|
+
*/
|
|
25
|
+
export declare function addressAgents<TContext, TResource>(input: {
|
|
26
|
+
options: {
|
|
27
|
+
agents?: ChatTurnAgentsOptions<TContext>;
|
|
28
|
+
};
|
|
29
|
+
mentions: readonly ChatMention[];
|
|
30
|
+
identity: ChatTurnIdentity;
|
|
31
|
+
context: TContext;
|
|
32
|
+
produceArgs: ChatTurnProduceArgs<TContext, TResource>;
|
|
33
|
+
trace: TurnTrace;
|
|
34
|
+
}): Promise<Response | ChatTurnProduceArgs<TContext, TResource>>;
|
|
35
|
+
/** The event a viewer receives when the next responder starts. */
|
|
36
|
+
export declare const SPEAKER_EVENT = "speaker";
|
|
37
|
+
export declare function speakerPart(agent: ChatTurnAgentTarget): Record<string, unknown>;
|
|
38
|
+
export declare function composeAgentProducers<TContext, TResource>(args: ChatTurnProduceArgs<TContext, TResource>, produce: (final: ChatTurnProduceArgs<TContext, TResource>) => ChatTurnRouteProducer | Promise<ChatTurnRouteProducer>): Promise<ChatTurnRouteProducer>;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* re-exported through `/web-react`'s chat-stream glue.
|
|
8
8
|
*/
|
|
9
9
|
export * from './wire';
|
|
10
|
+
export { composeAgentProducers, SPEAKER_EVENT, speakerPart } from './agent-producers';
|
|
10
11
|
export * from './binary-sniff';
|
|
11
12
|
export * from './attachment-validation';
|
|
12
13
|
export * from './turn-routes';
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
sanitizeAttachmentFileName,
|
|
28
28
|
sniffBinary,
|
|
29
29
|
sniffedMimeImpliedByName
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-75I4RXIE.js";
|
|
31
31
|
import {
|
|
32
32
|
assertSafeKeySegment
|
|
33
33
|
} from "../chunk-6DOQ6T2O.js";
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
observeNativeCompletion,
|
|
41
41
|
readCompletedSandboxTurn,
|
|
42
42
|
recoverSandboxAssistantMessage
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-N5KBDRSX.js";
|
|
44
44
|
import {
|
|
45
45
|
runProtectedRouterTurn
|
|
46
46
|
} from "../chunk-6XEW5YXP.js";
|
|
@@ -53,12 +53,14 @@ import {
|
|
|
53
53
|
INTENT_LINE_TIMEOUT_MS,
|
|
54
54
|
MAX_EMPTY_TURN_RETRIES,
|
|
55
55
|
ModelFailoverTimeoutError,
|
|
56
|
+
SPEAKER_EVENT,
|
|
56
57
|
UPLOAD_INLINE_MAX_BYTES,
|
|
57
58
|
UPLOAD_MAX_FILE_BYTES,
|
|
58
59
|
buildDispatchParts,
|
|
59
60
|
bytesToBase64,
|
|
60
61
|
cancelChatTurn,
|
|
61
62
|
classifyTerminalFailure,
|
|
63
|
+
composeAgentProducers,
|
|
62
64
|
createChatTurnRoutes,
|
|
63
65
|
createHybridTurnProducer,
|
|
64
66
|
createRouterTurnProducer,
|
|
@@ -72,6 +74,7 @@ import {
|
|
|
72
74
|
resolveEmptyTurnRetries,
|
|
73
75
|
routerTurnHistory,
|
|
74
76
|
sanitizeUploadFilename,
|
|
77
|
+
speakerPart,
|
|
75
78
|
startHybridBox,
|
|
76
79
|
streamChatRouteAsSandboxEvents,
|
|
77
80
|
streamWithModelFailover,
|
|
@@ -79,13 +82,14 @@ import {
|
|
|
79
82
|
turnCarriesFiles,
|
|
80
83
|
turnPromptText,
|
|
81
84
|
withProducerStream
|
|
82
|
-
} from "../chunk-
|
|
85
|
+
} from "../chunk-RVC7EHJI.js";
|
|
83
86
|
import "../chunk-SBHFMDR7.js";
|
|
84
|
-
import "../chunk-
|
|
87
|
+
import "../chunk-RKNNMC6T.js";
|
|
88
|
+
import "../chunk-XBBXPZJI.js";
|
|
85
89
|
import "../chunk-4DBHC63F.js";
|
|
86
90
|
import "../chunk-RN4WPTBH.js";
|
|
87
91
|
import "../chunk-MM6RLOXF.js";
|
|
88
|
-
import "../chunk-
|
|
92
|
+
import "../chunk-O2TYB3DH.js";
|
|
89
93
|
import "../chunk-F4TUZYMX.js";
|
|
90
94
|
import {
|
|
91
95
|
redactErrorMessage
|
|
@@ -96,14 +100,14 @@ import {
|
|
|
96
100
|
isDraftContentEvent,
|
|
97
101
|
rowIdOf,
|
|
98
102
|
storeSupportsDraftPersistence
|
|
99
|
-
} from "../chunk-
|
|
103
|
+
} from "../chunk-RNFVAAJJ.js";
|
|
100
104
|
import "../chunk-2PCNHHN2.js";
|
|
101
105
|
import "../chunk-YG66IHDU.js";
|
|
102
106
|
import {
|
|
103
107
|
attachmentInputToPart,
|
|
104
108
|
attachmentKindForMime,
|
|
105
109
|
toChatMessageParts
|
|
106
|
-
} from "../chunk-
|
|
110
|
+
} from "../chunk-MIQL36JS.js";
|
|
107
111
|
import "../chunk-ZVEEWGDK.js";
|
|
108
112
|
import {
|
|
109
113
|
getPartKey,
|
|
@@ -122,6 +126,7 @@ import {
|
|
|
122
126
|
createBufferedTurnTap
|
|
123
127
|
} from "../chunk-3Q3UEWKK.js";
|
|
124
128
|
import {
|
|
129
|
+
AGENT_HANDLE_PATTERN,
|
|
125
130
|
ChatTurnInputError,
|
|
126
131
|
DISPATCH_MAX_MEDIA_PARTS,
|
|
127
132
|
DISPATCH_MAX_PARTS,
|
|
@@ -136,24 +141,28 @@ import {
|
|
|
136
141
|
TURN_RESPONSE_EVENT,
|
|
137
142
|
TURN_ROUTE_PHASE_MESSAGES,
|
|
138
143
|
TURN_STREAM_LOST_CODE,
|
|
144
|
+
agentMentionsOf,
|
|
139
145
|
assertPromptPartsWithinCap,
|
|
140
146
|
base64WireLen,
|
|
141
147
|
buildMentionPromptBlock,
|
|
142
148
|
buildTurnPhaseEvent,
|
|
143
149
|
chatTurnRequestInit,
|
|
150
|
+
fileMentionsOf,
|
|
144
151
|
fileMentionsToParts,
|
|
145
152
|
formatBytes,
|
|
153
|
+
isAgentMention,
|
|
146
154
|
isTurnIntentEvent,
|
|
147
155
|
isTurnPhaseEvent,
|
|
148
156
|
mediaTypeForMentionPath,
|
|
149
157
|
mentionKindForPath,
|
|
150
158
|
parseChatTurnParts,
|
|
151
159
|
parseFileMentions,
|
|
160
|
+
parseMentions,
|
|
152
161
|
promptPartsByteSize,
|
|
153
162
|
settleTurnResponse,
|
|
154
163
|
turnResponseEventFor,
|
|
155
164
|
validateSandboxMentionPath
|
|
156
|
-
} from "../chunk-
|
|
165
|
+
} from "../chunk-F6UC2T6U.js";
|
|
157
166
|
import "../chunk-L3QR274L.js";
|
|
158
167
|
import "../chunk-XELWWXJJ.js";
|
|
159
168
|
import "../chunk-DSMGS4IV.js";
|
|
@@ -1916,6 +1925,7 @@ function createStoredChatAttachments(options) {
|
|
|
1916
1925
|
return { readAttachment, writeAttachment, getAttachmentObject, attachmentObjectKey };
|
|
1917
1926
|
}
|
|
1918
1927
|
export {
|
|
1928
|
+
AGENT_HANDLE_PATTERN,
|
|
1919
1929
|
ALLOWED_ATTACHMENT_SNIFFED_MIMES,
|
|
1920
1930
|
ATTACHMENT_ACCEPT,
|
|
1921
1931
|
ATTACHMENT_MAX_COUNT,
|
|
@@ -1953,6 +1963,7 @@ export {
|
|
|
1953
1963
|
OOXML_WORD_MIME,
|
|
1954
1964
|
PROMOTE_MAX_FILE_BYTES,
|
|
1955
1965
|
RUNTIME_RESTARTED_ERROR,
|
|
1966
|
+
SPEAKER_EVENT,
|
|
1956
1967
|
STREAM_SNIFF_HEAD_BYTES,
|
|
1957
1968
|
STREAM_SNIFF_TAIL_BYTES,
|
|
1958
1969
|
TOOL_ABORTED_ERROR,
|
|
@@ -1965,6 +1976,7 @@ export {
|
|
|
1965
1976
|
TURN_STREAM_LOST_CODE,
|
|
1966
1977
|
UPLOAD_INLINE_MAX_BYTES,
|
|
1967
1978
|
UPLOAD_MAX_FILE_BYTES,
|
|
1979
|
+
agentMentionsOf,
|
|
1968
1980
|
aggregateNativeCompletionReceipts,
|
|
1969
1981
|
assertPromptPartsWithinCap,
|
|
1970
1982
|
assistantRowIdForTurn,
|
|
@@ -1980,6 +1992,7 @@ export {
|
|
|
1980
1992
|
chatTurnRequestInit,
|
|
1981
1993
|
checkAttachmentType,
|
|
1982
1994
|
classifyTerminalFailure,
|
|
1995
|
+
composeAgentProducers,
|
|
1983
1996
|
createAssistantDraftWriter,
|
|
1984
1997
|
createAtomicAttachmentWriter,
|
|
1985
1998
|
createAttachmentUploadRoute,
|
|
@@ -1994,9 +2007,11 @@ export {
|
|
|
1994
2007
|
createStreamingSniffer,
|
|
1995
2008
|
createUploadRoute,
|
|
1996
2009
|
defaultValidateAttachmentPath,
|
|
2010
|
+
fileMentionsOf,
|
|
1997
2011
|
fileMentionsToParts,
|
|
1998
2012
|
formatBytes,
|
|
1999
2013
|
immutableAttachmentPath,
|
|
2014
|
+
isAgentMention,
|
|
2000
2015
|
isCommittingSandboxEvent,
|
|
2001
2016
|
isDraftContentEvent,
|
|
2002
2017
|
isLiveLifecycleEvent,
|
|
@@ -2011,6 +2026,7 @@ export {
|
|
|
2011
2026
|
parseChatAttachmentInputs,
|
|
2012
2027
|
parseChatTurnParts,
|
|
2013
2028
|
parseFileMentions,
|
|
2029
|
+
parseMentions,
|
|
2014
2030
|
parsePlanFollowUpAttach,
|
|
2015
2031
|
planFollowUpExecutionId,
|
|
2016
2032
|
prepareDispatchAttachments,
|
|
@@ -2033,6 +2049,7 @@ export {
|
|
|
2033
2049
|
sniffBinary,
|
|
2034
2050
|
sniffMimeFromName,
|
|
2035
2051
|
sniffedMimeImpliedByName,
|
|
2052
|
+
speakerPart,
|
|
2036
2053
|
startHybridBox,
|
|
2037
2054
|
storeSupportsDraftPersistence,
|
|
2038
2055
|
streamChatRouteAsSandboxEvents,
|