@tangle-network/agent-app 0.43.47 → 0.43.48
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/assistant/index.d.ts +3 -2
- package/dist/assistant/index.js +3 -2
- package/dist/assistant/index.js.map +1 -1
- package/dist/chat-routes/index.d.ts +394 -4
- package/dist/chat-routes/index.js +507 -9
- package/dist/chat-routes/index.js.map +1 -1
- package/dist/chat-store/index.d.ts +3 -2
- package/dist/chat-store/index.js +19 -1
- package/dist/chat-store/index.js.map +1 -1
- package/dist/chunk-23LUHHHN.js +282 -0
- package/dist/chunk-23LUHHHN.js.map +1 -0
- package/dist/{chunk-4AUQIAYU.js → chunk-5MG74GVQ.js} +2 -281
- package/dist/chunk-5MG74GVQ.js.map +1 -0
- package/dist/{chunk-6E2XJSCT.js → chunk-JGYOYY5D.js} +65 -2
- package/dist/chunk-JGYOYY5D.js.map +1 -0
- package/dist/{chunk-7VMUOD3G.js → chunk-PHIXZC6Y.js} +1 -1
- package/dist/chunk-PHIXZC6Y.js.map +1 -0
- package/dist/{file-index-Bn6sitKb.d.ts → file-index-b26ee-_R.d.ts} +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +38 -22
- package/dist/{parts-1_3y2JmR.d.ts → parts-IB-Kbb7z.d.ts} +146 -2
- package/dist/sandbox/index.d.ts +1 -1
- package/dist/stream/index.d.ts +4 -47
- package/dist/stream/index.js +14 -12
- package/dist/stream-normalizer-DWvtmY6F.d.ts +48 -0
- package/dist/web-react/index.d.ts +4 -3
- package/dist/web-react/index.js +24 -2
- package/package.json +1 -1
- package/dist/chunk-4AUQIAYU.js.map +0 -1
- package/dist/chunk-6E2XJSCT.js.map +0 -1
- package/dist/chunk-7VMUOD3G.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -17,9 +17,10 @@ export { KeyCrypto, KeyProvisioner, PlanLimit, PlatformBalanceInfo, PlatformBala
|
|
|
17
17
|
export { HttpHeadProbeConfig, PreflightProbe, PreflightProbeResult, PreflightProbeVerdict, PreflightReport, RouterChatProbeConfig, SandboxAuthProbeConfig, formatPreflightReport, httpHeadProbe, routerChatProbe, runPreflight, sandboxAuthProbe } from './preflight/index.js';
|
|
18
18
|
export { ObjectBody, ObjectKeyParts, ObjectStore, PutObjectOptions, R2LikeBucket, R2LikeObjectBody, R2LikeObjectHead, SignObjectUrlArgs, VerifyObjectUrlResult, assertSafeKeySegment, createProxiedArtifactRoute, createR2ObjectStore, objectKey, signObjectUrl, verifyObjectUrl } from './object-store/index.js';
|
|
19
19
|
export { B as BULK_DELETE_MAX_THREADS, C as ChatStoreInputError, t as threadTitleFromMessage } from './core-7qIM7svy.js';
|
|
20
|
-
export { C as
|
|
20
|
+
export { C as ChatAttachmentKind, a as ChatAttachmentPart, b as ChatFilePart, c as ChatImagePart, d as ChatInteractionPart, e as ChatMentionKind, f as ChatMentionPart, g as ChatMessagePart, h as ChatNoticePart, i as ChatPartTime, j as ChatPlanPart, k as ChatReasoningPart, l as ChatStepFinishPart, m as ChatStepStartPart, n as ChatSubtaskPart, o as ChatTextPart, p as ChatToolPart, q as ChatToolState, r as ChatToolStatus, s as ChatUsageTokens, D as DEFAULT_ATTACHMENT_PROMPT_HEADER, S as StorableHarnessPartKind, t as attachmentInputToPart, u as attachmentKindForMime, v as attachmentPartsFromMessageParts, w as buildAttachmentPromptBlock, x as historyContentWithAttachments, y as isChatAttachmentPart, z as isChatInteractionPart, A as isChatMentionPart, B as isChatPlanPart, E as isChatStepFinishPart, F as isChatTextPart, G as isChatToolPart, H as mentionInputToPart, I as mentionPartsFromMessageParts, J as toChatMessageParts } from './parts-IB-Kbb7z.js';
|
|
21
21
|
export { DeriveKeyOptions, createFieldCrypto, decodeHexKey, decryptAesGcm, decryptBytes, decryptWithKey, deriveKey, encryptAesGcm, encryptBytes, encryptWithKey } from './crypto/index.js';
|
|
22
|
-
export { JsonRecord, MISSING_TOOL_TERMINAL_ERROR, MISSING_TOOL_TERMINAL_REASON,
|
|
22
|
+
export { J as JsonRecord, M as MISSING_TOOL_TERMINAL_ERROR, a as MISSING_TOOL_TERMINAL_REASON, S as StreamEvent, b as asRecord, c as asString, d as attachmentPartKey, e as collapseRedundantTextParts, f as encodeEvent, g as finalizeAssistantParts, h as finalizePendingInteractionParts, i as getPartKey, m as mergePersistedPart, n as normalizePersistedPart, j as normalizeTime, k as normalizeToolEvent, r as resolveToolId, l as resolveToolName, t as terminalizeDanglingAssistantToolUpdates, o as terminalizeDanglingToolPart, p as terminalizeDanglingToolParts } from './stream-normalizer-DWvtmY6F.js';
|
|
23
|
+
export { PersistedChatMessageForTurn, ResolvedChatTurn, buildUserTextParts, messageHasTurnId, normalizeClientTurnId, resolveChatTurn } from './stream/index.js';
|
|
23
24
|
export { B as BufferedTurnEvent, a as BufferedTurnOptions, b as BufferedTurnTap, D as D1LikeForTurns, P as PumpBufferedTurnOptions, R as ReplayTurnEventsOptions, T as TURN_EVENTS_MIGRATION_SQL, c as TURN_STATUS_SCOPE_MIGRATION_SQL, d as TurnEventStore, e as TurnStatus, f as coalesceChatStreamEvents, g as coalesceDeltas, h as createBufferedTurnTap, i as createD1TurnEventStore, j as createMemoryTurnEventStore, p as pumpBufferedTurn, r as replayTurnEvents } from './turn-buffer-C9mEgoop.js';
|
|
24
25
|
export { HubExecClient, HubExecClientOptions, HubExecErrorCode, HubExecResult, HubInvokeDeps, HubInvokeInput, HubInvokeOutcome, ParsedIntegrationAction, invokeIntegrationHub, resolveIntegrationAction } from './integrations/index.js';
|
|
25
26
|
export { C as ChatInteraction, a as ChatInteractionField, b as ChatInteractionStatus, c as ChatSelectField, d as ComposerAnswerDelivery, I as INTERACTION_CANCEL_EVENT, e as INTERACTION_EVENT, f as INTERACTION_RESOLVED_EVENT, g as InteractionAnswerValue, h as InteractionAnswers, i as InteractionCancelData, j as InteractionPersistedPart, k as InteractionRequestWire, N as NoticeKind, l as NoticePersistedPart, P as ParseInteractionAnswersResult, m as ParseInteractionResult, n as canTransitionInteractionStatus, o as cancelStatusFor, p as composerAnswerData, q as composerAnswerDeliveries, r as dedupeQuestionInteractionsByContent, s as fieldAcceptsFreeText, t as interactionFromWireRequest, u as interactionPartKey, v as interactionToPersistedPart, w as isRenderableInteractionKind, x as isSafeInteractionFieldKey, y as isTerminalInteractionStatus, z as noticePart, A as noticePartKey, B as parseInteractionAnswers, D as parseInteractionCancel, E as parseInteractionRequest, F as persistedPartToInteraction, G as questionInteractionContentSignature, H as stampInteractionAnswers } from './contract-KfqJh_au.js';
|
package/dist/index.js
CHANGED
|
@@ -244,39 +244,20 @@ import {
|
|
|
244
244
|
threadTitleFromMessage
|
|
245
245
|
} from "./chunk-5EQCITY3.js";
|
|
246
246
|
import {
|
|
247
|
-
MISSING_TOOL_TERMINAL_ERROR,
|
|
248
|
-
MISSING_TOOL_TERMINAL_REASON,
|
|
249
247
|
TURN_EVENTS_MIGRATION_SQL,
|
|
250
248
|
TURN_STATUS_SCOPE_MIGRATION_SQL,
|
|
251
|
-
asRecord,
|
|
252
|
-
asString,
|
|
253
|
-
attachmentPartKey,
|
|
254
249
|
buildUserTextParts,
|
|
255
250
|
coalesceChatStreamEvents,
|
|
256
251
|
coalesceDeltas,
|
|
257
|
-
collapseRedundantTextParts,
|
|
258
252
|
createBufferedTurnTap,
|
|
259
253
|
createD1TurnEventStore,
|
|
260
254
|
createMemoryTurnEventStore,
|
|
261
|
-
encodeEvent,
|
|
262
|
-
finalizeAssistantParts,
|
|
263
|
-
finalizePendingInteractionParts,
|
|
264
|
-
getPartKey,
|
|
265
|
-
mergePersistedPart,
|
|
266
255
|
messageHasTurnId,
|
|
267
256
|
normalizeClientTurnId,
|
|
268
|
-
normalizePersistedPart,
|
|
269
|
-
normalizeTime,
|
|
270
|
-
normalizeToolEvent,
|
|
271
257
|
pumpBufferedTurn,
|
|
272
258
|
replayTurnEvents,
|
|
273
|
-
resolveChatTurn
|
|
274
|
-
|
|
275
|
-
resolveToolName,
|
|
276
|
-
terminalizeDanglingAssistantToolUpdates,
|
|
277
|
-
terminalizeDanglingToolPart,
|
|
278
|
-
terminalizeDanglingToolParts
|
|
279
|
-
} from "./chunk-4AUQIAYU.js";
|
|
259
|
+
resolveChatTurn
|
|
260
|
+
} from "./chunk-23LUHHHN.js";
|
|
280
261
|
import {
|
|
281
262
|
createInteractionAnswerRoute,
|
|
282
263
|
listSessionInteractions,
|
|
@@ -296,6 +277,13 @@ import {
|
|
|
296
277
|
serializeCookie
|
|
297
278
|
} from "./chunk-HFC4BTWJ.js";
|
|
298
279
|
import {
|
|
280
|
+
DEFAULT_ATTACHMENT_PROMPT_HEADER,
|
|
281
|
+
attachmentInputToPart,
|
|
282
|
+
attachmentKindForMime,
|
|
283
|
+
attachmentPartsFromMessageParts,
|
|
284
|
+
buildAttachmentPromptBlock,
|
|
285
|
+
historyContentWithAttachments,
|
|
286
|
+
isChatAttachmentPart,
|
|
299
287
|
isChatInteractionPart,
|
|
300
288
|
isChatMentionPart,
|
|
301
289
|
isChatPlanPart,
|
|
@@ -305,7 +293,28 @@ import {
|
|
|
305
293
|
mentionInputToPart,
|
|
306
294
|
mentionPartsFromMessageParts,
|
|
307
295
|
toChatMessageParts
|
|
308
|
-
} from "./chunk-
|
|
296
|
+
} from "./chunk-JGYOYY5D.js";
|
|
297
|
+
import {
|
|
298
|
+
MISSING_TOOL_TERMINAL_ERROR,
|
|
299
|
+
MISSING_TOOL_TERMINAL_REASON,
|
|
300
|
+
asRecord,
|
|
301
|
+
asString,
|
|
302
|
+
attachmentPartKey,
|
|
303
|
+
collapseRedundantTextParts,
|
|
304
|
+
encodeEvent,
|
|
305
|
+
finalizeAssistantParts,
|
|
306
|
+
finalizePendingInteractionParts,
|
|
307
|
+
getPartKey,
|
|
308
|
+
mergePersistedPart,
|
|
309
|
+
normalizePersistedPart,
|
|
310
|
+
normalizeTime,
|
|
311
|
+
normalizeToolEvent,
|
|
312
|
+
resolveToolId,
|
|
313
|
+
resolveToolName,
|
|
314
|
+
terminalizeDanglingAssistantToolUpdates,
|
|
315
|
+
terminalizeDanglingToolPart,
|
|
316
|
+
terminalizeDanglingToolParts
|
|
317
|
+
} from "./chunk-5MG74GVQ.js";
|
|
309
318
|
import {
|
|
310
319
|
INTERACTION_CANCEL_EVENT,
|
|
311
320
|
INTERACTION_EVENT,
|
|
@@ -524,6 +533,7 @@ export {
|
|
|
524
533
|
ConversionMetricsSchema,
|
|
525
534
|
CopyContentSchema,
|
|
526
535
|
DEFAULT_APP_TOOL_PATHS,
|
|
536
|
+
DEFAULT_ATTACHMENT_PROMPT_HEADER,
|
|
527
537
|
DEFAULT_DESIGN_CANVAS_MCP_DESCRIPTION,
|
|
528
538
|
DEFAULT_HARNESS,
|
|
529
539
|
DEFAULT_HEADER_NAMES,
|
|
@@ -604,7 +614,10 @@ export {
|
|
|
604
614
|
assertSceneMediaSrc,
|
|
605
615
|
assertSequenceMediaUrl,
|
|
606
616
|
attachReasoningEffort,
|
|
617
|
+
attachmentInputToPart,
|
|
618
|
+
attachmentKindForMime,
|
|
607
619
|
attachmentPartKey,
|
|
620
|
+
attachmentPartsFromMessageParts,
|
|
608
621
|
authenticateToolRequest,
|
|
609
622
|
bearerSubprotocolToken,
|
|
610
623
|
bearerToken,
|
|
@@ -616,6 +629,7 @@ export {
|
|
|
616
629
|
buildAppToolMcpServer,
|
|
617
630
|
buildAppToolMcpServers,
|
|
618
631
|
buildAppToolOpenAITools,
|
|
632
|
+
buildAttachmentPromptBlock,
|
|
619
633
|
buildCaptionChunks,
|
|
620
634
|
buildCatalog,
|
|
621
635
|
buildConsentUrl,
|
|
@@ -755,6 +769,7 @@ export {
|
|
|
755
769
|
getClient,
|
|
756
770
|
getPartKey,
|
|
757
771
|
handleAppToolRequest,
|
|
772
|
+
historyContentWithAttachments,
|
|
758
773
|
httpHeadProbe,
|
|
759
774
|
instantiateTemplate,
|
|
760
775
|
interactionFromWireRequest,
|
|
@@ -762,6 +777,7 @@ export {
|
|
|
762
777
|
interactionToPersistedPart,
|
|
763
778
|
invokeIntegrationHub,
|
|
764
779
|
isAppToolName,
|
|
780
|
+
isChatAttachmentPart,
|
|
765
781
|
isChatInteractionPart,
|
|
766
782
|
isChatMentionPart,
|
|
767
783
|
isChatPlanPart,
|
|
@@ -29,6 +29,27 @@ interface ChatTurnFilePartInput {
|
|
|
29
29
|
content?: string;
|
|
30
30
|
}
|
|
31
31
|
type ChatTurnPartInput = ChatTurnTextPartInput | ChatTurnFilePartInput;
|
|
32
|
+
/** The image/file split an attachment is rendered and persisted under — the
|
|
33
|
+
* same discriminant as {@link ChatMentionKind}, but a distinct name because an
|
|
34
|
+
* attachment carries content the product uploaded (`ChatAttachmentInput`)
|
|
35
|
+
* while a mention points at a file the box already has. Defined HERE (the
|
|
36
|
+
* import-free layer) so `ChatAttachmentInput` can reference it and the client
|
|
37
|
+
* composer imports it without pulling the persisted-part vocabulary;
|
|
38
|
+
* `/chat-store`'s parts module re-exports it alongside the attachment helpers. */
|
|
39
|
+
type ChatAttachmentKind = 'image' | 'file';
|
|
40
|
+
/** `POST` turn-body entry describing a file already uploaded to the product's
|
|
41
|
+
* store (vault/object-store) — distinct from an inline {@link
|
|
42
|
+
* ChatTurnFilePartInput} (which carries bytes) and from a {@link FileMention}
|
|
43
|
+
* (a sandbox path the box already holds). The route resolves this field with
|
|
44
|
+
* {@link resolveChatAttachments}: every path is re-validated and every size is
|
|
45
|
+
* re-derived from the stored body, so nothing here is trusted as sent. */
|
|
46
|
+
interface ChatAttachmentInput {
|
|
47
|
+
path: string;
|
|
48
|
+
name: string;
|
|
49
|
+
size: number;
|
|
50
|
+
mediaType: string;
|
|
51
|
+
kind: ChatAttachmentKind;
|
|
52
|
+
}
|
|
32
53
|
/** POST body for the turn route. `content` may be empty when `parts` carry the
|
|
33
54
|
* message (an image-only send). Product routing fields (workspaceId etc.) ride
|
|
34
55
|
* alongside and are read by the product's `authorize` seam. */
|
|
@@ -45,6 +66,12 @@ interface ChatTurnRequestPayload {
|
|
|
45
66
|
* route validates this field with {@link parseFileMentions} and replaces it
|
|
46
67
|
* on the payload with the validated, deduped list. */
|
|
47
68
|
mentions?: FileMention[];
|
|
69
|
+
/** Files uploaded to the product's store ahead of the turn — path
|
|
70
|
+
* references, NOT inline bytes (those ride `parts`). Validated and
|
|
71
|
+
* size-re-derived by {@link resolveChatAttachments} into persistable
|
|
72
|
+
* attachment parts; a product whose `parts` field is spoken for by inline
|
|
73
|
+
* uploads still sends store-backed files here. */
|
|
74
|
+
attachments?: ChatAttachmentInput[];
|
|
48
75
|
model?: string;
|
|
49
76
|
effort?: 'auto' | 'low' | 'medium' | 'high';
|
|
50
77
|
harness?: string;
|
|
@@ -57,6 +84,41 @@ interface ChatTurnRequestPayload {
|
|
|
57
84
|
* parser. */
|
|
58
85
|
declare function chatTurnRequestInit(payload: ChatTurnRequestPayload): RequestInit;
|
|
59
86
|
declare const INLINE_PARTS_MAX_BYTES = 950000;
|
|
87
|
+
/** Hard cap on the whole `/prompt` request body as it crosses the sandbox
|
|
88
|
+
* proxy — smaller in practice than a raw-file write cap because a dispatch
|
|
89
|
+
* carries several inline parts plus the flattened history in one request. */
|
|
90
|
+
declare const DISPATCH_REQUEST_MAX_BYTES: number;
|
|
91
|
+
/** Bytes reserved off the top of {@link DISPATCH_REQUEST_MAX_BYTES} for the
|
|
92
|
+
* JSON structure around the parts array (keys, delimiters, per-part
|
|
93
|
+
* `type`/`filename`/`mediaType` fields) that {@link base64WireLen} does not
|
|
94
|
+
* account for — keeps the inline budget off the exact proxy cap where one
|
|
95
|
+
* stray byte trips the 413. */
|
|
96
|
+
declare const DISPATCH_STRUCTURAL_RESERVE_BYTES: number;
|
|
97
|
+
/** Sidecar's hard cap on the `parts` array of one prompt request — a dispatch
|
|
98
|
+
* must never assemble more parts than this or the whole turn 400s. */
|
|
99
|
+
declare const DISPATCH_MAX_PARTS = 64;
|
|
100
|
+
/** Product-side cap on media parts per dispatch (current turn + carried
|
|
101
|
+
* history), well under {@link DISPATCH_MAX_PARTS}. History trimming that keeps
|
|
102
|
+
* a transcript's native media under this is a PRODUCT concern (the pointer
|
|
103
|
+
* block keeps trimmed media reachable); `buildDispatchParts` enforces only the
|
|
104
|
+
* total {@link DISPATCH_MAX_PARTS} cap. */
|
|
105
|
+
declare const DISPATCH_MAX_MEDIA_PARTS = 24;
|
|
106
|
+
/** Size a base64-encoded string occupies on the wire given the raw
|
|
107
|
+
* (pre-encoding) byte length: base64 packs 3 raw bytes into 4 output
|
|
108
|
+
* characters, rounded up to the next multiple of 4. */
|
|
109
|
+
declare function base64WireLen(byteLen: number): number;
|
|
110
|
+
/**
|
|
111
|
+
* Render a raw byte count as a human-readable size (`512B`, `3KB`, `12MB
|
|
112
|
+
* 500KB`). Ported EXACTLY from gtm-agent's `attachment-limits.ts` — byte-
|
|
113
|
+
* identical implementation, not a reinterpretation — so `resolve-attachments`'s
|
|
114
|
+
* and `promote-file-part`'s error strings match gtm's wording verbatim. Lives
|
|
115
|
+
* in the import-free wire layer (not `resolve-attachments.ts` alone) because
|
|
116
|
+
* BOTH the aggregate-cap message here and the per-file oversize message in
|
|
117
|
+
* `promote-file-part.ts` need it; a browser composer wanting the same
|
|
118
|
+
* formatting for a client-side pre-check can also import it with no engine
|
|
119
|
+
* pulled in.
|
|
120
|
+
*/
|
|
121
|
+
declare function formatBytes(bytes: number): string;
|
|
60
122
|
declare class ChatTurnInputError extends Error {
|
|
61
123
|
readonly status: number;
|
|
62
124
|
readonly code: string;
|
|
@@ -229,11 +291,15 @@ interface ChatToolPart {
|
|
|
229
291
|
state: ChatToolState;
|
|
230
292
|
}
|
|
231
293
|
/** Union of the sidecar's legacy (path-based) and AI-SDK (url-based) file
|
|
232
|
-
* shapes; response-side every field besides `type` is optional.
|
|
294
|
+
* shapes; response-side every field besides `type` is optional. `name` is the
|
|
295
|
+
* attachment-flavored display label an uploaded/promoted file carries (see
|
|
296
|
+
* {@link ChatAttachmentPart}) — absent on a harness-emitted file part, which
|
|
297
|
+
* uses `filename`. */
|
|
233
298
|
interface ChatFilePart {
|
|
234
299
|
type: 'file';
|
|
235
300
|
id?: string;
|
|
236
301
|
filename?: string;
|
|
302
|
+
name?: string;
|
|
237
303
|
mediaType?: string;
|
|
238
304
|
url?: string;
|
|
239
305
|
path?: string;
|
|
@@ -242,6 +308,7 @@ interface ChatFilePart {
|
|
|
242
308
|
interface ChatImagePart {
|
|
243
309
|
type: 'image';
|
|
244
310
|
filename?: string;
|
|
311
|
+
name?: string;
|
|
245
312
|
mediaType?: string;
|
|
246
313
|
url?: string;
|
|
247
314
|
path?: string;
|
|
@@ -364,5 +431,82 @@ declare function mentionPartsFromMessageParts(parts: ReadonlyArray<Record<string
|
|
|
364
431
|
* than stored as `undefined`, so a stored row never carries a key that means
|
|
365
432
|
* nothing. */
|
|
366
433
|
declare function mentionInputToPart(input: FileMention): ChatMentionPart;
|
|
434
|
+
/** `image` for any `image/*` mime, `file` for everything else (including an
|
|
435
|
+
* absent/empty mime) — the same split the composer and the persisted-part
|
|
436
|
+
* discriminant both key on. */
|
|
437
|
+
declare function attachmentKindForMime(mime?: string): ChatAttachmentKind;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Persisted attachment part: structurally an attachment-flavored `ChatFilePart`
|
|
441
|
+
* / `ChatImagePart` (`path` + `name` promoted to required) rather than a
|
|
442
|
+
* separate union member — see the section note above. The index signature keeps
|
|
443
|
+
* it a `Record<string, unknown>` so it drops into the same untyped `parts`
|
|
444
|
+
* arrays every other stored part rides in, and lets the `type`-driven
|
|
445
|
+
* constructors below build it without union-discriminant gymnastics.
|
|
446
|
+
*/
|
|
447
|
+
interface ChatAttachmentPart {
|
|
448
|
+
type: ChatAttachmentKind;
|
|
449
|
+
path: string;
|
|
450
|
+
name: string;
|
|
451
|
+
size?: number;
|
|
452
|
+
mediaType?: string;
|
|
453
|
+
turnId?: string;
|
|
454
|
+
[key: string]: unknown;
|
|
455
|
+
}
|
|
456
|
+
/** True for any `image`/`file` part carrying a non-empty string `path`.
|
|
457
|
+
* DELIBERATELY also matches a sidecar path-bearing file part (a mention-style
|
|
458
|
+
* `file` part with only `path`) — the guard is a structural attachment shape,
|
|
459
|
+
* not proof of provenance; a caller that needs to exclude those filters
|
|
460
|
+
* upstream. The `path.length > 0` check diverges from gtm's original guard
|
|
461
|
+
* (which only checked `typeof`), mirroring sibling {@link isChatMentionPart}:
|
|
462
|
+
* read-side robustness against a stored `{type:'file', path:''}` row — which
|
|
463
|
+
* would otherwise render a malformed `(vault: )` pointer line — justifies the
|
|
464
|
+
* small divergence from byte-for-byte gtm parity here; no legitimate write
|
|
465
|
+
* path ever produces an empty `path`. */
|
|
466
|
+
declare function isChatAttachmentPart(part: unknown): part is ChatAttachmentPart;
|
|
467
|
+
/** Drop absent/empty optional fields rather than persisting `undefined`/`''`
|
|
468
|
+
* — keeps stored parts minimal. */
|
|
469
|
+
declare function attachmentInputToPart(input: ChatAttachmentInput): ChatAttachmentPart;
|
|
470
|
+
/** Every attachment part on one message's stored `parts`, in stored order. */
|
|
471
|
+
declare function attachmentPartsFromMessageParts(parts: ReadonlyArray<Record<string, unknown>> | null | undefined): ChatAttachmentPart[];
|
|
472
|
+
/** gtm's exact default header for {@link buildAttachmentPromptBlock} — kept
|
|
473
|
+
* byte-identical because it feeds dispatched prompts (gtm-agent#618
|
|
474
|
+
* reproduces the prompt bytes through this module). Override only with intent. */
|
|
475
|
+
declare const DEFAULT_ATTACHMENT_PROMPT_HEADER = "Attached files (already saved to the workspace vault \u2014 read them from these paths):";
|
|
476
|
+
/**
|
|
477
|
+
* The agent-facing pointer block appended to the dispatched prompt — never
|
|
478
|
+
* persisted in `message.content`. Empty array → `''` so callers can append
|
|
479
|
+
* unconditionally. The sole producer of this text: both the current turn's
|
|
480
|
+
* dispatch and history projection ({@link historyContentWithAttachments}) build
|
|
481
|
+
* it from here, so the two can never drift. `header` overrides the first line
|
|
482
|
+
* ({@link DEFAULT_ATTACHMENT_PROMPT_HEADER}); the per-file line format is fixed.
|
|
483
|
+
*
|
|
484
|
+
* Every interpolated `name`/`path` is swept for control characters first
|
|
485
|
+
* (newline/carriage-return/tab included) and each one replaced with a single
|
|
486
|
+
* space — a single-line-per-file guarantee. Without it, a control character
|
|
487
|
+
* riding through on a PERSISTED row (`historyContentWithAttachments` reads
|
|
488
|
+
* whatever is already stored; a legacy or hand-edited row was never re-checked
|
|
489
|
+
* against `resolveChatAttachments`) could inject extra lines — fabricated
|
|
490
|
+
* pointer entries or instructions — into a prompt the agent trusts verbatim.
|
|
491
|
+
* The wire-side validator is the primary control; this is the backstop for
|
|
492
|
+
* rows it never saw.
|
|
493
|
+
*/
|
|
494
|
+
declare function buildAttachmentPromptBlock(atts: ReadonlyArray<Pick<ChatAttachmentPart, 'name' | 'path'>>, header?: string): string;
|
|
495
|
+
/**
|
|
496
|
+
* History projection for a persisted message: `content` unchanged when it
|
|
497
|
+
* carries no attachment parts, else the block is appended once. The
|
|
498
|
+
* no-double-annotation guarantee holds under the invariant that the block is
|
|
499
|
+
* never persisted INTO `message.content` — it is appended only at read time,
|
|
500
|
+
* by this function and the current turn's dispatch, both sourcing from
|
|
501
|
+
* `attachmentPartsFromMessageParts` — never by content inspection. This
|
|
502
|
+
* function does not (and cannot) detect an already-embedded block by scanning
|
|
503
|
+
* `content` for its text: a message whose stored `content` happens to already
|
|
504
|
+
* contain the block's bytes, alongside attachment parts, still gets the block
|
|
505
|
+
* appended a second time. See the pinned test for that boundary.
|
|
506
|
+
*/
|
|
507
|
+
declare function historyContentWithAttachments(message: {
|
|
508
|
+
content: string;
|
|
509
|
+
parts?: ReadonlyArray<Record<string, unknown>> | null;
|
|
510
|
+
}, header?: string): string;
|
|
367
511
|
|
|
368
|
-
export {
|
|
512
|
+
export { base64WireLen as $, isChatMentionPart as A, isChatPlanPart as B, type ChatAttachmentKind as C, DEFAULT_ATTACHMENT_PROMPT_HEADER as D, isChatStepFinishPart as E, isChatTextPart as F, isChatToolPart as G, mentionInputToPart as H, mentionPartsFromMessageParts as I, toChatMessageParts as J, type FileMention as K, type ChatTurnRequestPayload as L, type ChatTurnPartInput as M, type ChatTurnFilePartInput as N, type ChatAttachmentInput as O, ChatTurnInputError as P, type ChatTurnTextPartInput as Q, DISPATCH_MAX_MEDIA_PARTS as R, type StorableHarnessPartKind as S, DISPATCH_MAX_PARTS as T, DISPATCH_REQUEST_MAX_BYTES as U, DISPATCH_STRUCTURAL_RESERVE_BYTES as V, type FileMentionsToPartsOptions as W, INLINE_PARTS_MAX_BYTES as X, MENTION_MAX_COUNT as Y, type SandboxMentionPathCheck as Z, assertPromptPartsWithinCap as _, type ChatAttachmentPart as a, buildMentionPromptBlock as a0, chatTurnRequestInit as a1, fileMentionsToParts as a2, formatBytes as a3, mediaTypeForMentionPath as a4, mentionKindForPath as a5, parseChatTurnParts as a6, parseFileMentions as a7, promptPartsByteSize as a8, validateSandboxMentionPath as a9, type ChatFilePart as b, type ChatImagePart as c, type ChatInteractionPart as d, type ChatMentionKind as e, type ChatMentionPart as f, type ChatMessagePart as g, type ChatNoticePart as h, type ChatPartTime as i, type ChatPlanPart as j, type ChatReasoningPart as k, type ChatStepFinishPart as l, type ChatStepStartPart as m, type ChatSubtaskPart as n, type ChatTextPart as o, type ChatToolPart as p, type ChatToolState as q, type ChatToolStatus as r, type ChatUsageTokens as s, attachmentInputToPart as t, attachmentKindForMime as u, attachmentPartsFromMessageParts as v, buildAttachmentPromptBlock as w, historyContentWithAttachments as x, isChatAttachmentPart as y, isChatInteractionPart as z };
|
package/dist/sandbox/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentProfileMcpServer, ProvisionEvent,
|
|
1
|
+
import { SandboxInstance, AgentProfileMcpServer, ProvisionEvent, AgentProfileFileMount, AgentProfile, StorageConfig, ScopedTokenScope, TurnDriveResult, Sandbox } from '@tangle-network/sandbox';
|
|
2
2
|
export { StorageConfig } from '@tangle-network/sandbox';
|
|
3
3
|
import { a as ToolHeaderNames } from '../auth-DuptSkWh.js';
|
|
4
4
|
import { f as AppToolName, c as AppToolContext } from '../types-BEOvc_ue.js';
|
package/dist/stream/index.d.ts
CHANGED
|
@@ -1,52 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as JsonRecord } from '../stream-normalizer-DWvtmY6F.js';
|
|
2
|
+
export { M as MISSING_TOOL_TERMINAL_ERROR, a as MISSING_TOOL_TERMINAL_REASON, S as StreamEvent, b as asRecord, c as asString, d as attachmentPartKey, e as collapseRedundantTextParts, f as encodeEvent, g as finalizeAssistantParts, h as finalizePendingInteractionParts, i as getPartKey, m as mergePersistedPart, n as normalizePersistedPart, j as normalizeTime, k as normalizeToolEvent, r as resolveToolId, l as resolveToolName, t as terminalizeDanglingAssistantToolUpdates, o as terminalizeDanglingToolPart, p as terminalizeDanglingToolParts } from '../stream-normalizer-DWvtmY6F.js';
|
|
2
3
|
export { B as BufferedTurnEvent, a as BufferedTurnOptions, b as BufferedTurnTap, D as D1LikeForTurns, P as PumpBufferedTurnOptions, R as ReplayTurnEventsOptions, T as TURN_EVENTS_MIGRATION_SQL, c as TURN_STATUS_SCOPE_MIGRATION_SQL, d as TurnEventStore, e as TurnStatus, f as coalesceChatStreamEvents, g as coalesceDeltas, h as createBufferedTurnTap, i as createD1TurnEventStore, j as createMemoryTurnEventStore, p as pumpBufferedTurn, r as replayTurnEvents } from '../turn-buffer-C9mEgoop.js';
|
|
4
|
+
import '../contract-KfqJh_au.js';
|
|
3
5
|
import '@tangle-network/agent-interface';
|
|
4
6
|
|
|
5
|
-
type JsonRecord = Record<string, unknown>;
|
|
6
|
-
interface StreamEvent {
|
|
7
|
-
type: string;
|
|
8
|
-
data?: JsonRecord;
|
|
9
|
-
}
|
|
10
|
-
declare function asRecord(value: unknown): JsonRecord | undefined;
|
|
11
|
-
declare function asString(value: unknown): string | undefined;
|
|
12
|
-
declare function resolveToolId(part: JsonRecord): string;
|
|
13
|
-
declare function resolveToolName(part: JsonRecord): string;
|
|
14
|
-
declare function normalizeTime(value: unknown): JsonRecord | undefined;
|
|
15
|
-
declare function normalizeToolEvent(event: StreamEvent): StreamEvent;
|
|
16
|
-
declare function normalizePersistedPart(rawPart: JsonRecord): JsonRecord | null;
|
|
17
|
-
/** Stream/transcript part key for a promoted (path-bearing) attachment,
|
|
18
|
-
* keyed on its storage path — re-emitting the same path folds into the same
|
|
19
|
-
* segment instead of duplicating it. */
|
|
20
|
-
declare function attachmentPartKey(path: string): string;
|
|
21
|
-
declare function getPartKey(part: JsonRecord): string;
|
|
22
|
-
declare function mergePersistedPart(existing: JsonRecord | undefined, incoming: JsonRecord, delta?: string): JsonRecord;
|
|
23
|
-
declare const MISSING_TOOL_TERMINAL_ERROR = "Tool did not report a terminal result before the assistant turn completed.";
|
|
24
|
-
declare const MISSING_TOOL_TERMINAL_REASON = "missing-tool-terminal";
|
|
25
|
-
/** Closes a tool part left `running` when a stream ended abnormally: settles
|
|
26
|
-
* it as a terminal `error` and stamps `state.metadata.terminalized` so the
|
|
27
|
-
* synthetic settlement is distinguishable from a real tool failure. Parts
|
|
28
|
-
* that already settled (and non-tool parts) pass through untouched. */
|
|
29
|
-
declare function terminalizeDanglingToolPart(part: JsonRecord): JsonRecord;
|
|
30
|
-
declare function terminalizeDanglingToolParts(parts: JsonRecord[]): JsonRecord[];
|
|
31
|
-
/** Settles still-pending interaction parts at persist time. The broker
|
|
32
|
-
* guarantees a resolved question either answered (run unblocked, no cancel
|
|
33
|
-
* event) or cancelled/timed out (cancel event already updated the part), so
|
|
34
|
-
* the success path finalizes remaining pendings as `answered` and the
|
|
35
|
-
* failure/terminalize paths as `expired`. */
|
|
36
|
-
declare function finalizePendingInteractionParts(parts: JsonRecord[], outcome: Extract<ChatInteractionStatus, 'answered' | 'expired'>): JsonRecord[];
|
|
37
|
-
/** Collapses text-part artifacts of unstable upstream segment identity: the
|
|
38
|
-
* same text arriving under two keys (id-less delta stream, then an
|
|
39
|
-
* id-bearing snapshot) folds into two segments, and interleaved empty
|
|
40
|
-
* segments survive as blank parts. Consecutive identical text parts merge
|
|
41
|
-
* into one; empty text parts drop when any non-empty text part exists. */
|
|
42
|
-
declare function collapseRedundantTextParts(parts: JsonRecord[]): JsonRecord[];
|
|
43
|
-
declare function finalizeAssistantParts(partOrder: string[], partMap: Map<string, JsonRecord>, finalText: string): JsonRecord[];
|
|
44
|
-
/** Finalizes, then folds each synthetic tool settlement back into `partMap`
|
|
45
|
-
* and returns just those updates — the shape a streaming loop needs to emit
|
|
46
|
-
* closing `message.part.updated` frames for tools the stream never settled. */
|
|
47
|
-
declare function terminalizeDanglingAssistantToolUpdates(partOrder: string[], partMap: Map<string, JsonRecord>, finalText: string): JsonRecord[];
|
|
48
|
-
declare function encodeEvent(encoder: TextEncoder, event: StreamEvent): Uint8Array;
|
|
49
|
-
|
|
50
7
|
interface PersistedChatMessageForTurn {
|
|
51
8
|
id: string;
|
|
52
9
|
role: 'user' | 'assistant' | 'system' | 'tool';
|
|
@@ -68,4 +25,4 @@ declare function resolveChatTurn(input: {
|
|
|
68
25
|
turnId?: string;
|
|
69
26
|
}): ResolvedChatTurn;
|
|
70
27
|
|
|
71
|
-
export {
|
|
28
|
+
export { JsonRecord, type PersistedChatMessageForTurn, type ResolvedChatTurn, buildUserTextParts, messageHasTurnId, normalizeClientTurnId, resolveChatTurn };
|
package/dist/stream/index.js
CHANGED
|
@@ -1,37 +1,39 @@
|
|
|
1
1
|
import {
|
|
2
|
-
MISSING_TOOL_TERMINAL_ERROR,
|
|
3
|
-
MISSING_TOOL_TERMINAL_REASON,
|
|
4
2
|
TURN_EVENTS_MIGRATION_SQL,
|
|
5
3
|
TURN_STATUS_SCOPE_MIGRATION_SQL,
|
|
6
|
-
asRecord,
|
|
7
|
-
asString,
|
|
8
|
-
attachmentPartKey,
|
|
9
4
|
buildUserTextParts,
|
|
10
5
|
coalesceChatStreamEvents,
|
|
11
6
|
coalesceDeltas,
|
|
12
|
-
collapseRedundantTextParts,
|
|
13
7
|
createBufferedTurnTap,
|
|
14
8
|
createD1TurnEventStore,
|
|
15
9
|
createMemoryTurnEventStore,
|
|
10
|
+
messageHasTurnId,
|
|
11
|
+
normalizeClientTurnId,
|
|
12
|
+
pumpBufferedTurn,
|
|
13
|
+
replayTurnEvents,
|
|
14
|
+
resolveChatTurn
|
|
15
|
+
} from "../chunk-23LUHHHN.js";
|
|
16
|
+
import {
|
|
17
|
+
MISSING_TOOL_TERMINAL_ERROR,
|
|
18
|
+
MISSING_TOOL_TERMINAL_REASON,
|
|
19
|
+
asRecord,
|
|
20
|
+
asString,
|
|
21
|
+
attachmentPartKey,
|
|
22
|
+
collapseRedundantTextParts,
|
|
16
23
|
encodeEvent,
|
|
17
24
|
finalizeAssistantParts,
|
|
18
25
|
finalizePendingInteractionParts,
|
|
19
26
|
getPartKey,
|
|
20
27
|
mergePersistedPart,
|
|
21
|
-
messageHasTurnId,
|
|
22
|
-
normalizeClientTurnId,
|
|
23
28
|
normalizePersistedPart,
|
|
24
29
|
normalizeTime,
|
|
25
30
|
normalizeToolEvent,
|
|
26
|
-
pumpBufferedTurn,
|
|
27
|
-
replayTurnEvents,
|
|
28
|
-
resolveChatTurn,
|
|
29
31
|
resolveToolId,
|
|
30
32
|
resolveToolName,
|
|
31
33
|
terminalizeDanglingAssistantToolUpdates,
|
|
32
34
|
terminalizeDanglingToolPart,
|
|
33
35
|
terminalizeDanglingToolParts
|
|
34
|
-
} from "../chunk-
|
|
36
|
+
} from "../chunk-5MG74GVQ.js";
|
|
35
37
|
import "../chunk-XAWFPMAR.js";
|
|
36
38
|
import "../chunk-SIXYZ2FB.js";
|
|
37
39
|
export {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { b as ChatInteractionStatus } from './contract-KfqJh_au.js';
|
|
2
|
+
|
|
3
|
+
type JsonRecord = Record<string, unknown>;
|
|
4
|
+
interface StreamEvent {
|
|
5
|
+
type: string;
|
|
6
|
+
data?: JsonRecord;
|
|
7
|
+
}
|
|
8
|
+
declare function asRecord(value: unknown): JsonRecord | undefined;
|
|
9
|
+
declare function asString(value: unknown): string | undefined;
|
|
10
|
+
declare function resolveToolId(part: JsonRecord): string;
|
|
11
|
+
declare function resolveToolName(part: JsonRecord): string;
|
|
12
|
+
declare function normalizeTime(value: unknown): JsonRecord | undefined;
|
|
13
|
+
declare function normalizeToolEvent(event: StreamEvent): StreamEvent;
|
|
14
|
+
declare function normalizePersistedPart(rawPart: JsonRecord): JsonRecord | null;
|
|
15
|
+
/** Stream/transcript part key for a promoted (path-bearing) attachment,
|
|
16
|
+
* keyed on its storage path — re-emitting the same path folds into the same
|
|
17
|
+
* segment instead of duplicating it. */
|
|
18
|
+
declare function attachmentPartKey(path: string): string;
|
|
19
|
+
declare function getPartKey(part: JsonRecord): string;
|
|
20
|
+
declare function mergePersistedPart(existing: JsonRecord | undefined, incoming: JsonRecord, delta?: string): JsonRecord;
|
|
21
|
+
declare const MISSING_TOOL_TERMINAL_ERROR = "Tool did not report a terminal result before the assistant turn completed.";
|
|
22
|
+
declare const MISSING_TOOL_TERMINAL_REASON = "missing-tool-terminal";
|
|
23
|
+
/** Closes a tool part left `running` when a stream ended abnormally: settles
|
|
24
|
+
* it as a terminal `error` and stamps `state.metadata.terminalized` so the
|
|
25
|
+
* synthetic settlement is distinguishable from a real tool failure. Parts
|
|
26
|
+
* that already settled (and non-tool parts) pass through untouched. */
|
|
27
|
+
declare function terminalizeDanglingToolPart(part: JsonRecord): JsonRecord;
|
|
28
|
+
declare function terminalizeDanglingToolParts(parts: JsonRecord[]): JsonRecord[];
|
|
29
|
+
/** Settles still-pending interaction parts at persist time. The broker
|
|
30
|
+
* guarantees a resolved question either answered (run unblocked, no cancel
|
|
31
|
+
* event) or cancelled/timed out (cancel event already updated the part), so
|
|
32
|
+
* the success path finalizes remaining pendings as `answered` and the
|
|
33
|
+
* failure/terminalize paths as `expired`. */
|
|
34
|
+
declare function finalizePendingInteractionParts(parts: JsonRecord[], outcome: Extract<ChatInteractionStatus, 'answered' | 'expired'>): JsonRecord[];
|
|
35
|
+
/** Collapses text-part artifacts of unstable upstream segment identity: the
|
|
36
|
+
* same text arriving under two keys (id-less delta stream, then an
|
|
37
|
+
* id-bearing snapshot) folds into two segments, and interleaved empty
|
|
38
|
+
* segments survive as blank parts. Consecutive identical text parts merge
|
|
39
|
+
* into one; empty text parts drop when any non-empty text part exists. */
|
|
40
|
+
declare function collapseRedundantTextParts(parts: JsonRecord[]): JsonRecord[];
|
|
41
|
+
declare function finalizeAssistantParts(partOrder: string[], partMap: Map<string, JsonRecord>, finalText: string): JsonRecord[];
|
|
42
|
+
/** Finalizes, then folds each synthetic tool settlement back into `partMap`
|
|
43
|
+
* and returns just those updates — the shape a streaming loop needs to emit
|
|
44
|
+
* closing `message.part.updated` frames for tools the stream never settled. */
|
|
45
|
+
declare function terminalizeDanglingAssistantToolUpdates(partOrder: string[], partMap: Map<string, JsonRecord>, finalText: string): JsonRecord[];
|
|
46
|
+
declare function encodeEvent(encoder: TextEncoder, event: StreamEvent): Uint8Array;
|
|
47
|
+
|
|
48
|
+
export { type JsonRecord as J, MISSING_TOOL_TERMINAL_ERROR as M, type StreamEvent as S, MISSING_TOOL_TERMINAL_REASON as a, asRecord as b, asString as c, attachmentPartKey as d, collapseRedundantTextParts as e, encodeEvent as f, finalizeAssistantParts as g, finalizePendingInteractionParts as h, getPartKey as i, normalizeTime as j, normalizeToolEvent as k, resolveToolName as l, mergePersistedPart as m, normalizePersistedPart as n, terminalizeDanglingToolPart as o, terminalizeDanglingToolParts as p, resolveToolId as r, terminalizeDanglingAssistantToolUpdates as t };
|
|
@@ -5,14 +5,15 @@ export { d as ComposerAnswerDelivery, I as INTERACTION_CANCEL_EVENT, e as INTERA
|
|
|
5
5
|
import { ChatPlan } from '../plans/index.js';
|
|
6
6
|
import { InteractionData } from '@tangle-network/agent-interface';
|
|
7
7
|
export { InteractionData, InteractionOutcome, InteractionRequest } from '@tangle-network/agent-interface';
|
|
8
|
-
import {
|
|
9
|
-
export {
|
|
8
|
+
import { K as FileMention, f as ChatMentionPart } from '../parts-IB-Kbb7z.js';
|
|
9
|
+
export { O as ChatAttachmentInput, C as ChatAttachmentKind, a as ChatAttachmentPart, e as ChatMentionKind, N as ChatTurnFilePartInput, M as ChatTurnPartInput, L as ChatTurnRequestPayload, R as DISPATCH_MAX_MEDIA_PARTS, T as DISPATCH_MAX_PARTS, U as DISPATCH_REQUEST_MAX_BYTES, V as DISPATCH_STRUCTURAL_RESERVE_BYTES, t as attachmentInputToPart, u as attachmentKindForMime, v as attachmentPartsFromMessageParts, $ as base64WireLen, a0 as buildMentionPromptBlock, a1 as chatTurnRequestInit, a2 as fileMentionsToParts, y as isChatAttachmentPart, a4 as mediaTypeForMentionPath, H as mentionInputToPart, a5 as mentionKindForPath, I as mentionPartsFromMessageParts } from '../parts-IB-Kbb7z.js';
|
|
10
10
|
import { S as StepAgentActivity } from '../agent-activity-C8ZG0F0M.js';
|
|
11
11
|
import { a as FlowTrace } from '../flow-types-Cb_AblZs.js';
|
|
12
12
|
export { S as SandboxTerminalConnection, a as SandboxTerminalConnectionResponse, U as UseSandboxTerminalConnectionOptions, b as UseSandboxTerminalConnectionResult, t as tabTerminalConnectionId, u as useSandboxTerminalConnection } from '../sandbox-terminal-BIIC__CP.js';
|
|
13
13
|
import { CatalogModel } from '../catalog/index.js';
|
|
14
14
|
import { Harness } from '../harness/index.js';
|
|
15
|
-
export { b as FileIndexReadyResponse, c as FileIndexResponse, d as FileIndexWarmingResponse } from '../file-index-
|
|
15
|
+
export { b as FileIndexReadyResponse, c as FileIndexResponse, d as FileIndexWarmingResponse } from '../file-index-b26ee-_R.js';
|
|
16
|
+
export { d as attachmentPartKey } from '../stream-normalizer-DWvtmY6F.js';
|
|
16
17
|
|
|
17
18
|
type DurablePlanDecision = 'approved' | 'rejected';
|
|
18
19
|
/** Stable authority receipt for the follow-up turn dispatched by a plan
|
package/dist/web-react/index.js
CHANGED
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
useSmoothText,
|
|
69
69
|
useThinkingSeconds,
|
|
70
70
|
waterfallLayout
|
|
71
|
-
} from "../chunk-
|
|
71
|
+
} from "../chunk-PHIXZC6Y.js";
|
|
72
72
|
import {
|
|
73
73
|
tabTerminalConnectionId,
|
|
74
74
|
useSandboxTerminalConnection
|
|
@@ -76,14 +76,26 @@ import {
|
|
|
76
76
|
import "../chunk-LCNY3DCM.js";
|
|
77
77
|
import "../chunk-2QI7XV2T.js";
|
|
78
78
|
import {
|
|
79
|
+
DISPATCH_MAX_MEDIA_PARTS,
|
|
80
|
+
DISPATCH_MAX_PARTS,
|
|
81
|
+
DISPATCH_REQUEST_MAX_BYTES,
|
|
82
|
+
DISPATCH_STRUCTURAL_RESERVE_BYTES,
|
|
83
|
+
attachmentInputToPart,
|
|
84
|
+
attachmentKindForMime,
|
|
85
|
+
attachmentPartsFromMessageParts,
|
|
86
|
+
base64WireLen,
|
|
79
87
|
buildMentionPromptBlock,
|
|
80
88
|
chatTurnRequestInit,
|
|
81
89
|
fileMentionsToParts,
|
|
90
|
+
isChatAttachmentPart,
|
|
82
91
|
mediaTypeForMentionPath,
|
|
83
92
|
mentionInputToPart,
|
|
84
93
|
mentionKindForPath,
|
|
85
94
|
mentionPartsFromMessageParts
|
|
86
|
-
} from "../chunk-
|
|
95
|
+
} from "../chunk-JGYOYY5D.js";
|
|
96
|
+
import {
|
|
97
|
+
attachmentPartKey
|
|
98
|
+
} from "../chunk-5MG74GVQ.js";
|
|
87
99
|
import {
|
|
88
100
|
INTERACTION_CANCEL_EVENT,
|
|
89
101
|
INTERACTION_EVENT,
|
|
@@ -120,6 +132,10 @@ export {
|
|
|
120
132
|
DEFAULT_EFFORT_LEVELS,
|
|
121
133
|
DEFAULT_MENTION_EMPTY_TEXT,
|
|
122
134
|
DEFAULT_MENTION_LIMIT,
|
|
135
|
+
DISPATCH_MAX_MEDIA_PARTS,
|
|
136
|
+
DISPATCH_MAX_PARTS,
|
|
137
|
+
DISPATCH_REQUEST_MAX_BYTES,
|
|
138
|
+
DISPATCH_STRUCTURAL_RESERVE_BYTES,
|
|
123
139
|
DurableChatCards,
|
|
124
140
|
DurablePlanCard,
|
|
125
141
|
DurablePlanClientError,
|
|
@@ -142,6 +158,11 @@ export {
|
|
|
142
158
|
RunDrillIn,
|
|
143
159
|
SeatPaywall,
|
|
144
160
|
activityTone,
|
|
161
|
+
attachmentInputToPart,
|
|
162
|
+
attachmentKindForMime,
|
|
163
|
+
attachmentPartKey,
|
|
164
|
+
attachmentPartsFromMessageParts,
|
|
165
|
+
base64WireLen,
|
|
145
166
|
buildAnswerData,
|
|
146
167
|
buildMentionPromptBlock,
|
|
147
168
|
canTransitionInteractionStatus,
|
|
@@ -175,6 +196,7 @@ export {
|
|
|
175
196
|
interactionSubmissionSignature,
|
|
176
197
|
interactionTerminalNotes,
|
|
177
198
|
interactionToPersistedPart,
|
|
199
|
+
isChatAttachmentPart,
|
|
178
200
|
isLateAnswerableStatus,
|
|
179
201
|
isRenderableInteractionKind,
|
|
180
202
|
isSafeInteractionFieldKey,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-app",
|
|
3
|
-
"version": "0.43.
|
|
3
|
+
"version": "0.43.48",
|
|
4
4
|
"packageManager": "pnpm@10.33.4",
|
|
5
5
|
"description": "Application-shell framework for Tangle agent products: a bounded tool loop, the structured agent→app tool side channel, integration-hub client, per-workspace billing, and crypto — composed over the Tangle agent substrate through typed seams.",
|
|
6
6
|
"keywords": [
|