@flamingo-stack/openframe-frontend-core 0.0.532-snapshot.20260811155109 → 0.0.532
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 +9 -1
- package/dist/chat-protocol/decode.d.ts.map +1 -1
- package/dist/chat-protocol/events.d.ts +0 -35
- package/dist/chat-protocol/events.d.ts.map +1 -1
- package/dist/chat-protocol/index.cjs +3 -72
- package/dist/chat-protocol/index.cjs.map +1 -1
- package/dist/chat-protocol/index.d.ts +0 -1
- package/dist/chat-protocol/index.d.ts.map +1 -1
- package/dist/chat-protocol/index.js +4 -67
- package/dist/chat-protocol/index.js.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-OLOKQQAP.cjs → chunk-2MBS3YEY.cjs} +5 -5
- package/dist/{chunk-OLOKQQAP.cjs.map → chunk-2MBS3YEY.cjs.map} +1 -1
- package/dist/{chunk-DFQLUK75.cjs → chunk-2QP67D2L.cjs} +3 -3
- package/dist/{chunk-DFQLUK75.cjs.map → chunk-2QP67D2L.cjs.map} +1 -1
- package/dist/{chunk-6SMLYZLH.js → chunk-3G7FDE5E.js} +4 -4
- package/dist/{chunk-J4BE4FIR.cjs → chunk-4GL2XJ5C.cjs} +4 -4
- package/dist/{chunk-J4BE4FIR.cjs.map → chunk-4GL2XJ5C.cjs.map} +1 -1
- package/dist/{chunk-LE3BJ5H2.js → chunk-5W3RCZIK.js} +2 -2
- package/dist/{chunk-MVGL5NNJ.js → chunk-65NR333L.js} +2 -2
- package/dist/{chunk-6W3ULZ4X.js → chunk-7SGBF2I2.js} +6 -6
- package/dist/{chunk-6YXN5RHW.js → chunk-ALXLWF75.js} +2 -2
- package/dist/{chunk-5U67WTAS.js → chunk-AZBS4PZG.js} +2 -2
- package/dist/{chunk-4QKXNWH5.js → chunk-ECR37JHH.js} +2 -2
- package/dist/{chunk-ENPGPZIB.cjs → chunk-ETF2QXXU.cjs} +61 -61
- package/dist/{chunk-ENPGPZIB.cjs.map → chunk-ETF2QXXU.cjs.map} +1 -1
- package/dist/{chunk-UPHN2VRZ.cjs → chunk-GVLA2BPW.cjs} +117 -259
- package/dist/chunk-GVLA2BPW.cjs.map +1 -0
- package/dist/{chunk-4ZRHVOEB.cjs → chunk-GWFC3NE5.cjs} +31 -31
- package/dist/{chunk-4ZRHVOEB.cjs.map → chunk-GWFC3NE5.cjs.map} +1 -1
- package/dist/{chunk-GNOK5J34.cjs → chunk-HJDCDOJM.cjs} +37 -37
- package/dist/{chunk-GNOK5J34.cjs.map → chunk-HJDCDOJM.cjs.map} +1 -1
- package/dist/{chunk-JDW2IL7A.cjs → chunk-HXHA3DCI.cjs} +11 -11
- package/dist/{chunk-JDW2IL7A.cjs.map → chunk-HXHA3DCI.cjs.map} +1 -1
- package/dist/{chunk-XN4JKIJY.js → chunk-IZOGFZ7N.js} +2 -2
- package/dist/{chunk-Z3NOI7X7.cjs → chunk-JZ5XDZYD.cjs} +26 -26
- package/dist/{chunk-Z3NOI7X7.cjs.map → chunk-JZ5XDZYD.cjs.map} +1 -1
- package/dist/{chunk-YLB6XXO6.js → chunk-KYQZBQYV.js} +2 -2
- package/dist/{chunk-RKITTO5V.cjs → chunk-L6EKEYF7.cjs} +14 -14
- package/dist/{chunk-RKITTO5V.cjs.map → chunk-L6EKEYF7.cjs.map} +1 -1
- package/dist/{chunk-NAV4FRNL.cjs → chunk-LYWSHNK4.cjs} +26 -26
- package/dist/{chunk-NAV4FRNL.cjs.map → chunk-LYWSHNK4.cjs.map} +1 -1
- package/dist/{chunk-46FKXLNE.js → chunk-OAEJWP7H.js} +2 -2
- package/dist/{chunk-2MYDGLJS.cjs → chunk-QEMI34VA.cjs} +87 -87
- package/dist/{chunk-2MYDGLJS.cjs.map → chunk-QEMI34VA.cjs.map} +1 -1
- package/dist/{chunk-QZ2NAPLF.cjs → chunk-QYNLVIGQ.cjs} +9 -9
- package/dist/{chunk-QZ2NAPLF.cjs.map → chunk-QYNLVIGQ.cjs.map} +1 -1
- package/dist/{chunk-KMB66NYX.cjs → chunk-TMZS63G2.cjs} +7 -7
- package/dist/{chunk-KMB66NYX.cjs.map → chunk-TMZS63G2.cjs.map} +1 -1
- package/dist/{chunk-2TUOBFPK.js → chunk-TQ7EPKKO.js} +2 -2
- package/dist/{chunk-U555TMPC.js → chunk-UP4RA54U.js} +5 -5
- package/dist/{chunk-LIUARTOZ.js → chunk-WINT757E.js} +64 -206
- package/dist/chunk-WINT757E.js.map +1 -0
- package/dist/{chunk-2XGHEJZK.js → chunk-XBYEPSNZ.js} +4 -4
- package/dist/components/case-studies/index.cjs +8 -8
- package/dist/components/case-studies/index.js +2 -2
- package/dist/components/chat/embeddable-chat.d.ts +0 -13
- package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
- package/dist/components/chat/hooks/use-sse-chat-adapter.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.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/types/message.types.d.ts +0 -15
- package/dist/components/chat/types/message.types.d.ts.map +1 -1
- package/dist/components/chat/types/network.types.d.ts +0 -4
- package/dist/components/chat/types/network.types.d.ts.map +1 -1
- package/dist/components/chat/types/processing.types.d.ts +1 -7
- package/dist/components/chat/types/processing.types.d.ts.map +1 -1
- package/dist/components/chat/utils/index.d.ts +0 -1
- package/dist/components/chat/utils/index.d.ts.map +1 -1
- package/dist/components/chat/utils/message-segment-accumulator.d.ts +3 -25
- 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/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/docs/index.cjs +5 -5
- package/dist/components/docs/index.js +4 -4
- package/dist/components/embeds/index.cjs +3 -3
- package/dist/components/embeds/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/help-center-pages/index.cjs +22 -22
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +132 -140
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.js +11 -19
- package/dist/components/index.js.map +1 -1
- package/dist/components/meeting-scheduler/index.cjs +34 -34
- package/dist/components/meeting-scheduler/index.js +3 -3
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/onboarding-guides/index.cjs +5 -5
- package/dist/components/onboarding-guides/index.js +4 -4
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +6 -6
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/index.cjs +2 -10
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.js +1 -9
- package/dist/index.cjs +2 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -9
- 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 -70
- package/src/chat-protocol/__tests__/nats-decoder-golden.test.ts +1 -108
- package/src/chat-protocol/decode.ts +153 -7
- package/src/chat-protocol/events.ts +0 -40
- package/src/chat-protocol/index.ts +0 -3
- package/src/chat-protocol/nats-decoder.ts +3 -111
- package/src/components/chat/embeddable-chat.tsx +0 -18
- package/src/components/chat/hooks/use-sse-chat-adapter.ts +16 -7
- package/src/components/chat/stream/chat-stream-reducer.ts +3 -49
- package/src/components/chat/types/message.types.ts +0 -15
- package/src/components/chat/types/network.types.ts +0 -4
- package/src/components/chat/types/processing.types.ts +1 -12
- package/src/components/chat/utils/__tests__/process-historical-messages-approvals.test.ts +0 -92
- package/src/components/chat/utils/index.ts +0 -9
- package/src/components/chat/utils/message-segment-accumulator.ts +32 -62
- package/src/components/chat/utils/process-historical-messages.ts +6 -40
- package/dist/chat-protocol/confirm-tool.d.ts +0 -50
- package/dist/chat-protocol/confirm-tool.d.ts.map +0 -1
- package/dist/chat-protocol/leading-frames.d.ts +0 -38
- package/dist/chat-protocol/leading-frames.d.ts.map +0 -1
- package/dist/chunk-LIUARTOZ.js.map +0 -1
- package/dist/chunk-UPHN2VRZ.cjs.map +0 -1
- package/dist/components/chat/utils/approval-display.d.ts +0 -49
- package/dist/components/chat/utils/approval-display.d.ts.map +0 -1
- package/src/chat-protocol/confirm-tool.ts +0 -67
- package/src/chat-protocol/leading-frames.ts +0 -175
- package/src/components/chat/utils/approval-display.ts +0 -70
- /package/dist/{chunk-6SMLYZLH.js.map → chunk-3G7FDE5E.js.map} +0 -0
- /package/dist/{chunk-LE3BJ5H2.js.map → chunk-5W3RCZIK.js.map} +0 -0
- /package/dist/{chunk-MVGL5NNJ.js.map → chunk-65NR333L.js.map} +0 -0
- /package/dist/{chunk-6W3ULZ4X.js.map → chunk-7SGBF2I2.js.map} +0 -0
- /package/dist/{chunk-6YXN5RHW.js.map → chunk-ALXLWF75.js.map} +0 -0
- /package/dist/{chunk-5U67WTAS.js.map → chunk-AZBS4PZG.js.map} +0 -0
- /package/dist/{chunk-4QKXNWH5.js.map → chunk-ECR37JHH.js.map} +0 -0
- /package/dist/{chunk-XN4JKIJY.js.map → chunk-IZOGFZ7N.js.map} +0 -0
- /package/dist/{chunk-YLB6XXO6.js.map → chunk-KYQZBQYV.js.map} +0 -0
- /package/dist/{chunk-46FKXLNE.js.map → chunk-OAEJWP7H.js.map} +0 -0
- /package/dist/{chunk-2TUOBFPK.js.map → chunk-TQ7EPKKO.js.map} +0 -0
- /package/dist/{chunk-U555TMPC.js.map → chunk-UP4RA54U.js.map} +0 -0
- /package/dist/{chunk-2XGHEJZK.js.map → chunk-XBYEPSNZ.js.map} +0 -0
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The hub's confirm-tool contract — request shape and error envelope.
|
|
3
|
-
*
|
|
4
|
-
* Resolving a Product Guide proposal is a POST to `endpoints.approvalToolUrl`
|
|
5
|
-
* whose response is an ordinary guide stream (a `decision_resolved` frame, then
|
|
6
|
-
* the hub's auto-continuation). Two callers make that call today: the SSE chat
|
|
7
|
-
* adapter, and any host replaying the same route into a different transport's
|
|
8
|
-
* conversation (the product app resolves guide cards inside a NATS Mingo
|
|
9
|
-
* dialog). They MUST send byte-identical bodies — a proposal is single-use, so a
|
|
10
|
-
* caller that drifts on a field name does not degrade, it fails the write — and
|
|
11
|
-
* they must surface the same server copy, because the hub's errors are written
|
|
12
|
-
* for the end user ("This approval expired — ask again to get a fresh one").
|
|
13
|
-
*
|
|
14
|
-
* Hence both live here rather than at either call site.
|
|
15
|
-
*
|
|
16
|
-
* Server-safe: no React, no browser APIs.
|
|
17
|
-
*/
|
|
18
|
-
/** What the user did with the card. */
|
|
19
|
-
export type ApprovalToolAction = 'approve' | 'reject';
|
|
20
|
-
/** Client-side shape of a confirm; `buildConfirmToolBody` renames it to the
|
|
21
|
-
* wire's own casing so no caller hand-writes `proposal_id`. */
|
|
22
|
-
export interface ConfirmToolRequest {
|
|
23
|
-
/** The hub-minted proposal id carried by the card. */
|
|
24
|
-
proposalId: string;
|
|
25
|
-
action: ApprovalToolAction;
|
|
26
|
-
/**
|
|
27
|
-
* The hub's conversation id, quoted back verbatim. The hub rejects a confirm
|
|
28
|
-
* without it: a proposal only means something inside the conversation that
|
|
29
|
-
* minted it.
|
|
30
|
-
*/
|
|
31
|
-
conversationId: string | null | undefined;
|
|
32
|
-
}
|
|
33
|
-
/** Build the confirm-tool request body. The ONE place that knows the wire
|
|
34
|
-
* spells the id `proposal_id` while everything else is camelCase. */
|
|
35
|
-
export declare function buildConfirmToolBody(request: ConfirmToolRequest): Record<string, unknown>;
|
|
36
|
-
/**
|
|
37
|
-
* Pull the user-facing copy out of a failed chat/confirm response.
|
|
38
|
-
*
|
|
39
|
-
* The route-base envelope is `{error, code}`; `error` is written for the end
|
|
40
|
-
* user, so it beats any status-code copy the client could invent. Returns null
|
|
41
|
-
* when the body is not that envelope (HTML error page, empty body, gateway
|
|
42
|
-
* response) — the caller then supplies its own generic line.
|
|
43
|
-
*
|
|
44
|
-
* Consumes the body: call it once, on a response you have already decided is a
|
|
45
|
-
* failure.
|
|
46
|
-
*/
|
|
47
|
-
export declare function readServerErrorMessage(response: {
|
|
48
|
-
json: () => Promise<unknown>;
|
|
49
|
-
}): Promise<string | null>;
|
|
50
|
-
//# sourceMappingURL=confirm-tool.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"confirm-tool.d.ts","sourceRoot":"","sources":["../../src/chat-protocol/confirm-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,uCAAuC;AACvC,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,QAAQ,CAAA;AAErD;gEACgE;AAChE,MAAM,WAAW,kBAAkB;IACjC,sDAAsD;IACtD,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,kBAAkB,CAAA;IAC1B;;;;OAIG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;CAC1C;AAED;sEACsE;AACtE,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAMzF;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,sBAAsB,CAAC,QAAQ,EAAE;IACrD,IAAI,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;CAC7B,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAQzB"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Leading-frame → `ChatStreamEvent` table — the ONE mapping both transports read.
|
|
3
|
-
*
|
|
4
|
-
* The SSE decoder (`./decode.ts`) reaches it while walking the hub's byte
|
|
5
|
-
* framing. The NATS decoder (`./nats-decoder.ts`) reaches it for `GUIDE` chunks
|
|
6
|
-
* carrying a `payload`: the saas-ai-agent re-streams the Product Guide's hub
|
|
7
|
-
* frames VERBATIM into the Mingo chunk stream (`GuideStreamingService`), so the
|
|
8
|
-
* bytes a guide answer is made of are the same frames on both transports — only
|
|
9
|
-
* the envelope differs. Decoding them twice would drift the moment the hub adds
|
|
10
|
-
* a frame kind, which is why this table lives outside either decoder.
|
|
11
|
-
*
|
|
12
|
-
* The NATS side does NOT take every event this table can produce; see
|
|
13
|
-
* `guideFrameEvent` in `./nats-decoder.ts` for which ones cross over and why.
|
|
14
|
-
*
|
|
15
|
-
* Server-safe: no React, no browser APIs.
|
|
16
|
-
*/
|
|
17
|
-
import type { ChatStreamEvent } from './events';
|
|
18
|
-
/**
|
|
19
|
-
* Escape `<` so markdown renderers that pass HTML through (rehypeRaw)
|
|
20
|
-
* don't treat XML-like tokens in Claude's thinking output as elements.
|
|
21
|
-
* `<` → `<` preserves the visible character without breaking
|
|
22
|
-
* blockquote `>` markers. Per-character, so it distributes over
|
|
23
|
-
* concatenation: escape(a + b) === escape(a) + escape(b) — callers may
|
|
24
|
-
* apply it per-delta or on the accumulated string interchangeably.
|
|
25
|
-
*/
|
|
26
|
-
export declare function escapeThinkingTags(text: string): string;
|
|
27
|
-
/**
|
|
28
|
-
* Map one parsed leading frame to normalized events, replicating the
|
|
29
|
-
* legacy parser's else-if chain ORDER and its exact truthiness/typeof
|
|
30
|
-
* gates. Frames that matched a branch but failed its inner validation
|
|
31
|
-
* (e.g. `routing` without a string `routedComplexity`) produce NO event,
|
|
32
|
-
* exactly like the legacy no-op.
|
|
33
|
-
*
|
|
34
|
-
* Every branch pushes AT MOST ONE event — `guideFrameEvent` relies on that
|
|
35
|
-
* to hand a single event back to `decodeNatsChunk`'s per-chunk contract.
|
|
36
|
-
*/
|
|
37
|
-
export declare function mapLeadingFrame(meta: any, out: ChatStreamEvent[]): void;
|
|
38
|
-
//# sourceMappingURL=leading-frames.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"leading-frames.d.ts","sourceRoot":"","sources":["../../src/chat-protocol/leading-frames.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,IAAI,CAqIvE"}
|