@flamingo-stack/openframe-frontend-core 0.0.579 → 0.0.580-1952.5355.1
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/chat-protocol/decode.d.ts.map +1 -1
- package/dist/chat-protocol/events.d.ts +1 -47
- package/dist/chat-protocol/events.d.ts.map +1 -1
- package/dist/chat-protocol/index.cjs +0 -51
- package/dist/chat-protocol/index.cjs.map +1 -1
- package/dist/chat-protocol/index.js +1 -48
- package/dist/chat-protocol/index.js.map +1 -1
- package/dist/chat-protocol/leading-frames.d.ts +3 -9
- package/dist/chat-protocol/leading-frames.d.ts.map +1 -1
- package/dist/chat-protocol/nats-decoder.d.ts +0 -41
- package/dist/chat-protocol/nats-decoder.d.ts.map +1 -1
- package/dist/{chunk-OGZAFM6M.cjs → chunk-3HON5UEM.cjs} +5 -5
- package/dist/{chunk-OGZAFM6M.cjs.map → chunk-3HON5UEM.cjs.map} +1 -1
- package/dist/{chunk-PMENIZXI.js → chunk-3IQ5EPTU.js} +4 -4
- package/dist/{chunk-BCJQ7CJE.cjs → chunk-4VXIRT7T.cjs} +9 -9
- package/dist/{chunk-BCJQ7CJE.cjs.map → chunk-4VXIRT7T.cjs.map} +1 -1
- package/dist/{chunk-IFYQ7DHV.cjs → chunk-5UWZEYWX.cjs} +43 -43
- package/dist/{chunk-IFYQ7DHV.cjs.map → chunk-5UWZEYWX.cjs.map} +1 -1
- package/dist/{chunk-CP5EYMNL.js → chunk-6IIFWQMC.js} +2 -2
- package/dist/{chunk-O2FTVZOD.js → chunk-D6FA6PG5.js} +3 -3
- package/dist/{chunk-DB3TV4CW.js → chunk-DNM5EXQS.js} +3 -3
- package/dist/{chunk-H4BPHGU5.js → chunk-E4VOSHP4.js} +2 -2
- package/dist/{chunk-36TJYCF3.cjs → chunk-E5AYJ337.cjs} +21 -21
- package/dist/{chunk-36TJYCF3.cjs.map → chunk-E5AYJ337.cjs.map} +1 -1
- package/dist/{chunk-H54EPP3P.cjs → chunk-GKKPUEMT.cjs} +4 -4
- package/dist/{chunk-H54EPP3P.cjs.map → chunk-GKKPUEMT.cjs.map} +1 -1
- package/dist/{chunk-BW4WDUSI.js → chunk-GSLJDW4F.js} +2 -2
- package/dist/{chunk-4FJSN2XW.cjs → chunk-GUILHB3S.cjs} +10 -10
- package/dist/{chunk-4FJSN2XW.cjs.map → chunk-GUILHB3S.cjs.map} +1 -1
- package/dist/{chunk-NPVDKOGD.cjs → chunk-IA3HSKNP.cjs} +22 -22
- package/dist/{chunk-NPVDKOGD.cjs.map → chunk-IA3HSKNP.cjs.map} +1 -1
- package/dist/{chunk-FEVLXRTC.cjs → chunk-JHKKXU2F.cjs} +159 -159
- package/dist/{chunk-FEVLXRTC.cjs.map → chunk-JHKKXU2F.cjs.map} +1 -1
- package/dist/{chunk-37XJYOAY.cjs → chunk-JZGN2RH3.cjs} +10 -10
- package/dist/{chunk-37XJYOAY.cjs.map → chunk-JZGN2RH3.cjs.map} +1 -1
- package/dist/{chunk-L2CF2QZW.js → chunk-L2TJ5AIY.js} +5 -5
- package/dist/{chunk-4LZ7B5H5.cjs → chunk-NAT4RZ27.cjs} +3 -3
- package/dist/{chunk-4LZ7B5H5.cjs.map → chunk-NAT4RZ27.cjs.map} +1 -1
- package/dist/{chunk-YW4WBNYV.cjs → chunk-NFZSFZK7.cjs} +24 -24
- package/dist/{chunk-YW4WBNYV.cjs.map → chunk-NFZSFZK7.cjs.map} +1 -1
- package/dist/{chunk-QCP2KV7P.js → chunk-O4NV4EYT.js} +3 -3
- package/dist/{chunk-A6C5HOD7.cjs → chunk-POIFPUEC.cjs} +15 -15
- package/dist/{chunk-A6C5HOD7.cjs.map → chunk-POIFPUEC.cjs.map} +1 -1
- package/dist/{chunk-AKPLEWMH.js → chunk-Q2BEBMWV.js} +2 -2
- package/dist/{chunk-4WSKSNXL.js → chunk-QHEFJMGH.js} +6 -6
- package/dist/{chunk-3AX3ZEY3.js → chunk-QZSNH7XU.js} +1317 -1480
- package/dist/chunk-QZSNH7XU.js.map +1 -0
- package/dist/{chunk-HGA74X35.js → chunk-RCFPYPV5.js} +3 -3
- package/dist/{chunk-PWOYEUIQ.js → chunk-RU2VPCO3.js} +5 -5
- package/dist/{chunk-M5GWCMYE.cjs → chunk-VI5NVHZ5.cjs} +32 -32
- package/dist/{chunk-M5GWCMYE.cjs.map → chunk-VI5NVHZ5.cjs.map} +1 -1
- package/dist/{chunk-HHJVIHVR.cjs → chunk-VMXQASS5.cjs} +69 -69
- package/dist/{chunk-HHJVIHVR.cjs.map → chunk-VMXQASS5.cjs.map} +1 -1
- package/dist/{chunk-QGJYWLF4.js → chunk-VSHN2F34.js} +2 -2
- package/dist/{chunk-RKGOVTXZ.cjs → chunk-VYQNM75R.cjs} +167 -330
- package/dist/chunk-VYQNM75R.cjs.map +1 -0
- package/dist/{chunk-5Y6TPFW7.js → chunk-WXTXA22M.js} +5 -5
- package/dist/{chunk-4HGRXFQP.cjs → chunk-WZRXOP7V.cjs} +3 -3
- package/dist/{chunk-4HGRXFQP.cjs.map → chunk-WZRXOP7V.cjs.map} +1 -1
- package/dist/{chunk-D44S2QLI.js → chunk-Y5XXRM53.js} +3 -3
- package/dist/components/case-studies/index.cjs +9 -9
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/chat-message-enhanced.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -10
- package/dist/components/chat/index.cjs.map +1 -1
- package/dist/components/chat/index.d.ts +0 -1
- package/dist/components/chat/index.d.ts.map +1 -1
- package/dist/components/chat/index.js +1 -9
- package/dist/components/chat/stream/chat-stream-reducer.d.ts +0 -9
- package/dist/components/chat/stream/chat-stream-reducer.d.ts.map +1 -1
- package/dist/components/chat/stream/delta-batcher.d.ts +3 -3
- package/dist/components/chat/stream/delta-batcher.d.ts.map +1 -1
- package/dist/components/chat/stream/message-mutations.d.ts.map +1 -1
- package/dist/components/chat/types/component.types.d.ts +0 -6
- package/dist/components/chat/types/component.types.d.ts.map +1 -1
- package/dist/components/chat/types/message.types.d.ts +2 -30
- package/dist/components/chat/types/message.types.d.ts.map +1 -1
- package/dist/components/chat/types/network.types.d.ts +1 -3
- package/dist/components/chat/types/network.types.d.ts.map +1 -1
- package/dist/components/chat/types/processing.types.d.ts +1 -4
- package/dist/components/chat/types/processing.types.d.ts.map +1 -1
- package/dist/components/chat/utils/approval-display.d.ts +8 -36
- package/dist/components/chat/utils/approval-display.d.ts.map +1 -1
- package/dist/components/chat/utils/extract-incomplete-message-state.d.ts.map +1 -1
- package/dist/components/chat/utils/index.d.ts +1 -1
- package/dist/components/chat/utils/index.d.ts.map +1 -1
- package/dist/components/chat/utils/message-segment-accumulator.d.ts +4 -16
- package/dist/components/chat/utils/message-segment-accumulator.d.ts.map +1 -1
- package/dist/components/chat/utils/process-historical-messages.d.ts.map +1 -1
- package/dist/components/chat/utils/resolve-fetched-card-href.d.ts +1 -1
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +7 -7
- package/dist/components/docs/index.js +6 -6
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +4 -4
- package/dist/components/faq/index.js +3 -3
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/help-center-pages/index.cjs +23 -23
- package/dist/components/help-center-pages/index.js +14 -14
- package/dist/components/index.cjs +121 -129
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +13 -21
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +21 -21
- package/dist/components/meeting-scheduler/index.js +2 -2
- package/dist/components/navigation/index.cjs +6 -6
- package/dist/components/navigation/index.js +5 -5
- package/dist/components/onboarding-guides/index.cjs +6 -6
- package/dist/components/onboarding-guides/index.js +5 -5
- package/dist/components/tickets/index.cjs +7 -7
- package/dist/components/tickets/index.js +6 -6
- package/dist/components/ui/index.cjs +3 -11
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +2 -10
- package/dist/index.cjs +7 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -14
- package/dist/index.js.map +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/chat-protocol/__tests__/__snapshots__/nats-decoder-golden.test.ts.snap +0 -80
- package/src/chat-protocol/__tests__/nats-decoder-golden.test.ts +1 -118
- package/src/chat-protocol/decode.ts +3 -4
- package/src/chat-protocol/events.ts +0 -51
- package/src/chat-protocol/leading-frames.ts +3 -9
- package/src/chat-protocol/nats-decoder.ts +1 -110
- package/src/components/chat/__tests__/chat-pending-turn.test.tsx +0 -19
- package/src/components/chat/chat-message-enhanced.tsx +1 -13
- package/src/components/chat/index.ts +0 -1
- package/src/components/chat/stream/__tests__/chat-stream-reducer.test.ts +0 -90
- package/src/components/chat/stream/chat-dialog-store.ts +1 -1
- package/src/components/chat/stream/chat-stream-reducer.ts +11 -49
- package/src/components/chat/stream/delta-batcher.ts +4 -9
- package/src/components/chat/stream/message-mutations.ts +0 -2
- package/src/components/chat/types/component.types.ts +0 -9
- package/src/components/chat/types/message.types.ts +0 -32
- package/src/components/chat/types/network.types.ts +1 -3
- package/src/components/chat/types/processing.types.ts +1 -4
- package/src/components/chat/utils/__tests__/process-historical-messages-approvals.test.ts +0 -93
- package/src/components/chat/utils/__tests__/process-historical-messages-golden.test.ts +1 -78
- package/src/components/chat/utils/approval-display.ts +8 -53
- package/src/components/chat/utils/extract-incomplete-message-state.ts +0 -1
- package/src/components/chat/utils/index.ts +1 -6
- package/src/components/chat/utils/message-segment-accumulator.ts +3 -37
- package/src/components/chat/utils/process-historical-messages.ts +7 -44
- package/src/components/chat/utils/resolve-fetched-card-href.ts +1 -1
- package/src/stories/ChatMessageEnhanced.stories.tsx +3 -7
- package/dist/chunk-3AX3ZEY3.js.map +0 -1
- package/dist/chunk-RKGOVTXZ.cjs.map +0 -1
- package/dist/components/chat/guide-display.d.ts +0 -14
- package/dist/components/chat/guide-display.d.ts.map +0 -1
- package/src/components/chat/guide-display.tsx +0 -42
- /package/dist/{chunk-PMENIZXI.js.map → chunk-3IQ5EPTU.js.map} +0 -0
- /package/dist/{chunk-CP5EYMNL.js.map → chunk-6IIFWQMC.js.map} +0 -0
- /package/dist/{chunk-O2FTVZOD.js.map → chunk-D6FA6PG5.js.map} +0 -0
- /package/dist/{chunk-DB3TV4CW.js.map → chunk-DNM5EXQS.js.map} +0 -0
- /package/dist/{chunk-H4BPHGU5.js.map → chunk-E4VOSHP4.js.map} +0 -0
- /package/dist/{chunk-BW4WDUSI.js.map → chunk-GSLJDW4F.js.map} +0 -0
- /package/dist/{chunk-L2CF2QZW.js.map → chunk-L2TJ5AIY.js.map} +0 -0
- /package/dist/{chunk-QCP2KV7P.js.map → chunk-O4NV4EYT.js.map} +0 -0
- /package/dist/{chunk-AKPLEWMH.js.map → chunk-Q2BEBMWV.js.map} +0 -0
- /package/dist/{chunk-4WSKSNXL.js.map → chunk-QHEFJMGH.js.map} +0 -0
- /package/dist/{chunk-HGA74X35.js.map → chunk-RCFPYPV5.js.map} +0 -0
- /package/dist/{chunk-PWOYEUIQ.js.map → chunk-RU2VPCO3.js.map} +0 -0
- /package/dist/{chunk-QGJYWLF4.js.map → chunk-VSHN2F34.js.map} +0 -0
- /package/dist/{chunk-5Y6TPFW7.js.map → chunk-WXTXA22M.js.map} +0 -0
- /package/dist/{chunk-D44S2QLI.js.map → chunk-Y5XXRM53.js.map} +0 -0
|
@@ -4,10 +4,6 @@ var END_OF_LEADING = "";
|
|
|
4
4
|
var TRAILER_SENTINEL = "";
|
|
5
5
|
|
|
6
6
|
// src/chat-protocol/events.ts
|
|
7
|
-
var GUIDE_ORIGIN = "guide";
|
|
8
|
-
function isGuideOrigin(source) {
|
|
9
|
-
return source?.origin === GUIDE_ORIGIN;
|
|
10
|
-
}
|
|
11
7
|
var ESCALATION_STATE = {
|
|
12
8
|
PENDING: "PENDING",
|
|
13
9
|
APPROVED: "APPROVED",
|
|
@@ -288,7 +284,6 @@ function createSseFrameDecoder() {
|
|
|
288
284
|
var MESSAGE_TYPE = {
|
|
289
285
|
TEXT: "TEXT",
|
|
290
286
|
THINKING: "THINKING",
|
|
291
|
-
GUIDE: "GUIDE",
|
|
292
287
|
ASK: "ASK",
|
|
293
288
|
EXECUTING_TOOL: "EXECUTING_TOOL",
|
|
294
289
|
EXECUTED_TOOL: "EXECUTED_TOOL",
|
|
@@ -344,34 +339,6 @@ function normalizeAskOptions(raw) {
|
|
|
344
339
|
description: typeof item.description === "string" ? item.description : void 0
|
|
345
340
|
})).filter((option) => option.label.length > 0);
|
|
346
341
|
}
|
|
347
|
-
var AGENT_OWNED_EVENTS = /* @__PURE__ */ new Set([
|
|
348
|
-
"usage",
|
|
349
|
-
"token-usage",
|
|
350
|
-
"status",
|
|
351
|
-
"compaction",
|
|
352
|
-
"participant",
|
|
353
|
-
"dialog-closed"
|
|
354
|
-
]);
|
|
355
|
-
var ORIGIN_BEARING_EVENTS = /* @__PURE__ */ new Set(["approval-request", "approval-resolved"]);
|
|
356
|
-
function guideEventForNats(event) {
|
|
357
|
-
switch (event.type) {
|
|
358
|
-
case "text-delta":
|
|
359
|
-
return { type: "guide-delta", text: event.text };
|
|
360
|
-
case "thinking-delta":
|
|
361
|
-
return { type: "thinking-delta", text: escapeThinkingTags(event.text) };
|
|
362
|
-
case "metadata":
|
|
363
|
-
return typeof event.conversationId === "string" && event.conversationId ? { type: "metadata", conversationId: event.conversationId, origin: GUIDE_ORIGIN } : null;
|
|
364
|
-
default:
|
|
365
|
-
if (AGENT_OWNED_EVENTS.has(event.type)) return null;
|
|
366
|
-
return ORIGIN_BEARING_EVENTS.has(event.type) ? { ...event, origin: GUIDE_ORIGIN } : event;
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
function guideFrameEvent(frame) {
|
|
370
|
-
const events = [];
|
|
371
|
-
mapLeadingFrame(frame, events);
|
|
372
|
-
const event = events[0];
|
|
373
|
-
return event ? guideEventForNats(event) : null;
|
|
374
|
-
}
|
|
375
342
|
function decodeNatsChunk(chunk) {
|
|
376
343
|
if (!chunk || typeof chunk !== "object") return null;
|
|
377
344
|
const data = chunk;
|
|
@@ -406,20 +373,6 @@ function decodeNatsChunk(chunk) {
|
|
|
406
373
|
return { type: "thinking-delta", text: data.text, ...seq };
|
|
407
374
|
}
|
|
408
375
|
return null;
|
|
409
|
-
// Two shapes share this chunk type. `text` is the answer body the agent
|
|
410
|
-
// streams (and persists). `payload` is a Product Guide frame re-streamed
|
|
411
|
-
// verbatim from the hub — decoded through the shared frame table, with the
|
|
412
|
-
// narrowing `guideFrameEvent` documents.
|
|
413
|
-
case MESSAGE_TYPE.GUIDE: {
|
|
414
|
-
if (typeof data.text === "string") {
|
|
415
|
-
return { type: "guide-delta", text: data.text, ...seq };
|
|
416
|
-
}
|
|
417
|
-
const frame = data.payload;
|
|
418
|
-
if (!frame || typeof frame !== "object" || Array.isArray(frame)) return null;
|
|
419
|
-
const event = guideFrameEvent(frame);
|
|
420
|
-
if (!event) return null;
|
|
421
|
-
return { ...event, ...seq };
|
|
422
|
-
}
|
|
423
376
|
// An ask card is only an ask card with something to pick: a question and at
|
|
424
377
|
// least one option. Anything less is dropped rather than rendered as an
|
|
425
378
|
// empty card the user can't answer — the backend already falls back to a
|
|
@@ -704,6 +657,6 @@ function envFlagEnabled(name) {
|
|
|
704
657
|
return v !== "" && v !== "0" && v !== "false" && v !== "off";
|
|
705
658
|
}
|
|
706
659
|
|
|
707
|
-
export { CHAT_OWNER_ADMIN, END_OF_LEADING, ESCALATION_STATE, FRAME_TERMINATOR,
|
|
660
|
+
export { CHAT_OWNER_ADMIN, END_OF_LEADING, ESCALATION_STATE, FRAME_TERMINATOR, IP_BUCKET_KEY_MAX_LENGTH, TRAILER_SENTINEL, buildConfirmToolBody, createSseFrameDecoder, decodeNatsChunk, encodeEndOfLeading, encodeLeadingFrame, encodeTextDelta, encodeTrailingUsageFrame, envFlagEnabled, errorDetailsMessage, escalationResolvedStatus, escapeThinkingTags, normalizeAskOptions, normalizeIpForBucketKey, readServerErrorMessage, stripSentinelBytes };
|
|
708
661
|
//# sourceMappingURL=index.js.map
|
|
709
662
|
//# sourceMappingURL=index.js.map
|