@guuey/chat 0.14.2 → 0.15.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/plan.d.ts.map +1 -1
- package/dist/plan.js +31 -5
- package/dist/policy.d.ts +8 -0
- package/dist/policy.d.ts.map +1 -1
- package/dist/policy.js +2 -1
- package/dist/react/components.d.ts +1 -1
- package/dist/react/components.d.ts.map +1 -1
- package/dist/react/components.js +5 -0
- package/dist/react/guuey-chat.d.ts +1 -1
- package/dist/react/guuey-chat.d.ts.map +1 -1
- package/dist/react/guuey-chat.js +68 -18
- package/dist/react/use-transcript.d.ts.map +1 -1
- package/dist/react/use-transcript.js +3 -1
- package/dist/strings.d.ts +5 -0
- package/dist/strings.d.ts.map +1 -1
- package/dist/strings.js +1 -0
- package/dist/types.d.ts +18 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/corpus/__snapshots__/corpus.test.ts.snap +25 -0
- package/src/plan.ts +34 -5
- package/src/policy.ts +13 -2
- package/src/react/components.tsx +28 -0
- package/src/react/guuey-chat.tsx +70 -20
- package/src/react/use-transcript.ts +3 -1
- package/src/strings.ts +6 -0
- package/src/types.ts +18 -0
package/dist/plan.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../src/plan.ts"],"names":[],"mappings":"AAkCA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD,OAAO,KAAK,EAUV,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EAIf,MAAM,YAAY,CAAC;AA2pBpB,uCAAuC;AACvC,wBAAgB,cAAc,CAC5B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,gBAAgB,EACxB,SAAS,GAAE,mBAAwB,GAClC,cAAc,
|
|
1
|
+
{"version":3,"file":"plan.d.ts","sourceRoot":"","sources":["../src/plan.ts"],"names":[],"mappings":"AAkCA,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD,OAAO,KAAK,EAUV,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EAIf,MAAM,YAAY,CAAC;AA2pBpB,uCAAuC;AACvC,wBAAgB,cAAc,CAC5B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,gBAAgB,EACxB,SAAS,GAAE,mBAAwB,GAClC,cAAc,CAwVhB;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,QAAQ,GAAG,cAAc,CAAC,GACxD;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAAE,GAAG,SAAS,CAiB5D"}
|
package/dist/plan.js
CHANGED
|
@@ -700,13 +700,22 @@ export function planTranscript(inputs, policy, overrides = {}) {
|
|
|
700
700
|
const sendState = user.clientMessageId !== undefined
|
|
701
701
|
? (inputs.sendStates?.[user.clientMessageId] ?? "sent")
|
|
702
702
|
: "sent";
|
|
703
|
+
// guuey#422 close-condition 3: a forwarded view directive (the
|
|
704
|
+
// `ui/message` doorbell's `<ggui_directive>` carrier, relayed through
|
|
705
|
+
// the composer's send gate) collapses into a calm continuation row.
|
|
706
|
+
// DISPLAY-ONLY — `text` stays wire-verbatim (expand reveals it); the
|
|
707
|
+
// wire itself was never touched. Marker matches ggui's runtime
|
|
708
|
+
// construction (`<ggui_directive kind="user-action">` inside the
|
|
709
|
+
// relayed prose).
|
|
710
|
+
const directive = policy.userMessage.collapseDirectives && user.text.includes("<ggui_directive");
|
|
703
711
|
conversation.push({
|
|
704
712
|
kind: "user",
|
|
705
713
|
key,
|
|
706
|
-
expanded:
|
|
714
|
+
expanded: resolveExpanded(key, !directive, overrides),
|
|
707
715
|
text: user.text,
|
|
708
716
|
state: sendState,
|
|
709
717
|
retry: sendState === "failed" && policy.userMessage.retryAffordance,
|
|
718
|
+
directive,
|
|
710
719
|
});
|
|
711
720
|
}
|
|
712
721
|
const assistant = assistants[slot];
|
|
@@ -718,9 +727,15 @@ export function planTranscript(inputs, policy, overrides = {}) {
|
|
|
718
727
|
conversation.push(noticeItem(n));
|
|
719
728
|
}
|
|
720
729
|
items.push(...groupTools(conversation, policy, overrides));
|
|
721
|
-
// R13 — persisted cards, seq order. (
|
|
722
|
-
//
|
|
723
|
-
//
|
|
730
|
+
// R13 — persisted cards, seq order. POSITION (guuey#423): interleaved at
|
|
731
|
+
// their TRUE transcript positions when the flat surface carries read-plane
|
|
732
|
+
// seqs (the assemblers thread `TranscriptMessage.seq` since #423 — the
|
|
733
|
+
// refinement the 3b-era note deferred): a card slots before the first
|
|
734
|
+
// HISTORY user turn whose seq exceeds it. Cards newer than every seq-
|
|
735
|
+
// bearing turn — and every card in a seq-less (live-only) session — keep
|
|
736
|
+
// the tail, byte-identical to the old behavior. The old tail-always
|
|
737
|
+
// placement + bottom-pin buried a returning visitor's conversation above
|
|
738
|
+
// a stale trailing card (the #423 founder face).
|
|
724
739
|
//
|
|
725
740
|
// Dedupe against LIVE mounts by actionScope (the persisted `ui://`
|
|
726
741
|
// identity both sides carry): a session whose fold still holds a turn the
|
|
@@ -758,7 +773,18 @@ export function planTranscript(inputs, policy, overrides = {}) {
|
|
|
758
773
|
actionScope: scope,
|
|
759
774
|
};
|
|
760
775
|
view.label = viewLabel(view, policy);
|
|
761
|
-
|
|
776
|
+
// The interleave: find the first seq-bearing user turn NEWER than the
|
|
777
|
+
// card; insert before its item. Cards processed in ascending seq order,
|
|
778
|
+
// so same-target cards keep their relative order (each splice lands
|
|
779
|
+
// after the previous card, before the user item).
|
|
780
|
+
const nextUserSlot = users.findIndex((u) => u.seq !== undefined && card.seq < u.seq);
|
|
781
|
+
const anchorIdx = nextUserSlot === -1 ? -1 : items.findIndex((it) => it.key === `u${nextUserSlot}`);
|
|
782
|
+
if (anchorIdx === -1) {
|
|
783
|
+
items.push(view);
|
|
784
|
+
}
|
|
785
|
+
else {
|
|
786
|
+
items.splice(anchorIdx, 0, view);
|
|
787
|
+
}
|
|
762
788
|
}
|
|
763
789
|
// R10 — prompts, in input order (narrow on `kind`: the guuey-wire
|
|
764
790
|
// link-invite arm vs the AgJSON hitl arm — spec draft.2; consent rides
|
package/dist/policy.d.ts
CHANGED
|
@@ -20,6 +20,14 @@ export interface TranscriptPolicy {
|
|
|
20
20
|
/** R0. */
|
|
21
21
|
userMessage: {
|
|
22
22
|
retryAffordance: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Collapse forwarded view-directive turns (guuey#422 `ui/message`
|
|
25
|
+
* relays carrying `<ggui_directive>`) into a calm
|
|
26
|
+
* `strings.directiveContinuation` row. Display-only — the sent/
|
|
27
|
+
* persisted text stays wire-verbatim, and expand reveals it. Debug
|
|
28
|
+
* preset shows the verbatim bubble (`false`).
|
|
29
|
+
*/
|
|
30
|
+
collapseDirectives: boolean;
|
|
23
31
|
};
|
|
24
32
|
/** R1 (markdown sanitization itself is the 3b renderer's security surface). */
|
|
25
33
|
text: {
|
package/dist/policy.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../src/policy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAwC,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAEtF,MAAM,WAAW,gBAAgB;IAC/B,6EAA6E;IAC7E,OAAO,EAAE,WAAW,CAAC;IACrB,gFAAgF;IAChF,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU;IACV,WAAW,EAAE;
|
|
1
|
+
{"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../src/policy.ts"],"names":[],"mappings":"AAAA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
|
|
|
36
36
|
strings: defaultChatStrings,
|
|
37
37
|
locale: "en",
|
|
38
38
|
debugDetail: false,
|
|
39
|
-
userMessage: { retryAffordance: true },
|
|
39
|
+
userMessage: { retryAffordance: true, collapseDirectives: true },
|
|
40
40
|
text: { markdown: true },
|
|
41
41
|
reasoning: { show: true, expandedByDefault: false },
|
|
42
42
|
tool: { expandByDefault: false, argsVisible: false, humanizeTitle: humanizeToolName },
|
|
@@ -64,6 +64,7 @@ export function debugPolicy(overrides) {
|
|
|
64
64
|
const debug = {
|
|
65
65
|
...base,
|
|
66
66
|
debugDetail: true,
|
|
67
|
+
userMessage: { ...base.userMessage, collapseDirectives: false },
|
|
67
68
|
reasoning: { ...base.reasoning, expandedByDefault: true },
|
|
68
69
|
tool: { ...base.tool, expandByDefault: true, argsVisible: true },
|
|
69
70
|
toolGroup: { threshold: false },
|
|
@@ -69,7 +69,7 @@ export interface TranscriptItemContext {
|
|
|
69
69
|
viewProps?: ViewSlotProps | ((item: ViewMountItem, mount: ResolvedViewMount) => ViewSlotProps);
|
|
70
70
|
}
|
|
71
71
|
/** The per-view slice of `GuueyViewProps` a transcript may configure. */
|
|
72
|
-
export type ViewSlotProps = Pick<GuueyViewProps, "hostCapabilities" | "hostInfo" | "hostContext" | "onCallTool" | "onUpdateModelContext" | "onReadResource" | "onSizeChanged" | "negotiationTimeoutMs" | "dangerouslyAddSandboxFlags" | "allow" | "sandboxPageUrl" | "autoResize" | "cspOrigins">;
|
|
72
|
+
export type ViewSlotProps = Pick<GuueyViewProps, "hostCapabilities" | "hostInfo" | "hostContext" | "onCallTool" | "onUpdateModelContext" | "onUserMessage" | "onReadResource" | "onSizeChanged" | "negotiationTimeoutMs" | "dangerouslyAddSandboxFlags" | "allow" | "sandboxPageUrl" | "autoResize" | "cspOrigins">;
|
|
73
73
|
interface ItemProps<T> {
|
|
74
74
|
item: T;
|
|
75
75
|
ctx: TranscriptItemContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"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SAAS,CAuEX"}
|
package/dist/react/components.js
CHANGED
|
@@ -42,6 +42,11 @@ function CopyButton({ text, ctx }) {
|
|
|
42
42
|
}
|
|
43
43
|
// ─── R0 ────────────────────────────────────────────────────────────────────
|
|
44
44
|
export function DefaultUserMessage({ item, ctx }) {
|
|
45
|
+
// guuey#422: a forwarded view directive renders as a calm continuation
|
|
46
|
+
// row — the wire-verbatim text sits behind the expand, never rewritten.
|
|
47
|
+
if (item.directive) {
|
|
48
|
+
return (_jsxs("div", { className: `guuey-chat-user guuey-chat-user-directive guuey-chat-user-${item.state}`, children: [_jsx(Collapsible, { itemKey: item.key, expanded: item.expanded, header: _jsx("span", { className: "guuey-chat-directive-label", children: ctx.strings.directiveContinuation }), ctx: ctx, children: _jsx("div", { className: "guuey-chat-user-bubble", children: item.text }) }), item.state === "failed" ? (_jsxs("p", { className: "guuey-chat-send-failed", role: "status", children: [ctx.strings.userCouldntSend, item.retry ? (_jsx("button", { type: "button", className: "guuey-chat-retry", onClick: () => ctx.onRetry?.(item), children: ctx.strings.userRetry })) : null] })) : null] }));
|
|
49
|
+
}
|
|
45
50
|
return (_jsxs("div", { className: `guuey-chat-user guuey-chat-user-${item.state}`, children: [_jsx("div", { className: "guuey-chat-user-bubble", children: item.text }), item.state === "failed" ? (_jsxs("p", { className: "guuey-chat-send-failed", role: "status", children: [ctx.strings.userCouldntSend, item.retry ? (_jsx("button", { type: "button", className: "guuey-chat-retry", onClick: () => ctx.onRetry?.(item), children: ctx.strings.userRetry })) : null] })) : null] }));
|
|
46
51
|
}
|
|
47
52
|
// ─── R1 ────────────────────────────────────────────────────────────────────
|
|
@@ -61,7 +61,7 @@ import type { TranscriptComponents, TranscriptItemContext, ViewSlotProps } from
|
|
|
61
61
|
* `hostContext` key wins field-by-field; `theme` is only filled in.
|
|
62
62
|
* Exported for tests; not part of the package surface.
|
|
63
63
|
*/
|
|
64
|
-
export declare function viewPropsWithThemeAnnounce(viewProps: TranscriptItemContext["viewProps"], mode: ThemeMode, defaults?: Pick<ViewSlotProps, "onCallTool" | "onUpdateModelContext">): TranscriptItemContext["viewProps"];
|
|
64
|
+
export declare function viewPropsWithThemeAnnounce(viewProps: TranscriptItemContext["viewProps"], mode: ThemeMode, defaults?: Pick<ViewSlotProps, "onCallTool" | "onUpdateModelContext" | "onUserMessage">): TranscriptItemContext["viewProps"];
|
|
65
65
|
/**
|
|
66
66
|
* The imperative seam (guuey#210): programmatic send/prefill/focus for
|
|
67
67
|
* hosts that stay on the batteries-included path (suggested-prompt chips
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guuey-chat.d.ts","sourceRoot":"","sources":["../../src/react/guuey-chat.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,OAAO,EASL,KAAK,aAAa,EAEnB,MAAM,OAAO,CAAC;AACf,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGtE,OAAO,KAAK,EAAsC,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACjG,OAAO,EAA2B,KAAK,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAEvF,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAsB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,KAAK,EACV,cAAc,EACd,SAAS,EACT,eAAe,EACf,UAAU,EAEV,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAc,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIlG;;;;;GAKG;AACH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KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAQD,eAAO,MAAM,SAAS,4GA+fpB,CAAC"}
|
package/dist/react/guuey-chat.js
CHANGED
|
@@ -48,7 +48,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
48
48
|
import { forwardRef, useCallback, useEffect, useId, useImperativeHandle, useMemo, useRef, useState, } from "react";
|
|
49
49
|
import { createUiActionRelay, createUiResourceReader, createWebAdapters, } from "@guuey/agent-client";
|
|
50
50
|
import { useAgentInvoke } from "@guuey/agent-client/react";
|
|
51
|
-
import { unavailableToolCallResult
|
|
51
|
+
import { unavailableToolCallResult } from "@guuey/mcp-apps-host";
|
|
52
52
|
import { calmPolicy, debugPolicy } from "../policy.js";
|
|
53
53
|
import { useStructuralIdentity } from "./structural-identity.js";
|
|
54
54
|
import { defaultChatStrings } from "../strings.js";
|
|
@@ -260,27 +260,76 @@ export const GuueyChat = forwardRef(function GuueyChat(props, ref) {
|
|
|
260
260
|
byteSize: JSON.stringify(params)?.length ?? 0,
|
|
261
261
|
});
|
|
262
262
|
}, []);
|
|
263
|
-
//
|
|
264
|
-
//
|
|
265
|
-
//
|
|
266
|
-
//
|
|
267
|
-
//
|
|
268
|
-
//
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
263
|
+
// guuey#422: the kit default DOES NOT stage the ggui semantic carrier
|
|
264
|
+
// any more — post-turn actions RELAY (the #222 platform door serves
|
|
265
|
+
// persisted-card actions after the turn), so the runtime receives its
|
|
266
|
+
// REAL result envelope and its #440 classifier grades honestly; the
|
|
267
|
+
// post-turn agent turn then starts through the ui/message doorbell
|
|
268
|
+
// (the sink below). The #356 staging seam remains a PUBLIC export
|
|
269
|
+
// (withActionStaging) for hosts that choose the composer-staging UX —
|
|
270
|
+
// the widget's own mountCallTool still applies it by its own choice.
|
|
271
|
+
const stagedDefaultOnCallTool = defaultOnCallTool;
|
|
272
|
+
// The ui/message sink (guuey#422): the view hands the host role-user
|
|
273
|
+
// content (ggui's #440 doorbell — the model directive that drains a
|
|
274
|
+
// post-turn gesture). Forward through the SAME gate as handle.send: a
|
|
275
|
+
// real turn starts, the agent calls ggui_consume, the card repaints.
|
|
276
|
+
// Busy/unavailable ⇒ dropped (the doorbell fires post-turn by design;
|
|
277
|
+
// mid-turn the consume pipe is live and no doorbell fires).
|
|
278
|
+
// guuey#422 close-condition 1 (ggui review): the machine ACKs the
|
|
279
|
+
// doorbell BEFORE delivery, so a busy-drop here would be an
|
|
280
|
+
// ACKed-then-silently-dropped message — the night's silence class in
|
|
281
|
+
// protocol clothes. Queue-and-drain instead: while a turn is live the
|
|
282
|
+
// directive queues (exact-text dedupe — a session's repeat doorbells
|
|
283
|
+
// collapse; the consume PIPE holds the gestures, the doorbell only
|
|
284
|
+
// wakes), and the idle transition drains one per turn. Unavailable chat
|
|
285
|
+
// cannot drain — that drop is LOUD (console.warn), never silent.
|
|
286
|
+
const pendingDoorbellsRef = useRef([]);
|
|
287
|
+
const defaultOnUserMessage = useCallback((params) => {
|
|
288
|
+
const content = params["content"];
|
|
289
|
+
if (!Array.isArray(content))
|
|
290
|
+
return;
|
|
291
|
+
const text = content
|
|
292
|
+
.map((b) => typeof b === "object" && b !== null && "text" in b && typeof b.text === "string"
|
|
293
|
+
? b.text
|
|
294
|
+
: "")
|
|
295
|
+
.filter((t) => t !== "")
|
|
296
|
+
.join("\n");
|
|
297
|
+
if (text.trim() === "")
|
|
298
|
+
return;
|
|
299
|
+
const live = liveRef.current;
|
|
300
|
+
if (!live.available) {
|
|
301
|
+
console.warn("[GuueyChat] ui/message doorbell dropped — chat is unavailable (endpointUrl null); the view's gesture cannot start a turn here.");
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
if (live.busy) {
|
|
305
|
+
if (!pendingDoorbellsRef.current.includes(text))
|
|
306
|
+
pendingDoorbellsRef.current.push(text);
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
void live.invoke.send(text).catch(() => {
|
|
310
|
+
// The hook owns failure surfacing, same as every send path.
|
|
278
311
|
});
|
|
279
|
-
}, [
|
|
312
|
+
}, []);
|
|
313
|
+
// The drain: one queued doorbell per idle transition — its send flips
|
|
314
|
+
// busy again, and the NEXT idle drains the next (never a turn storm).
|
|
315
|
+
useEffect(() => {
|
|
316
|
+
if (busy || pendingDoorbellsRef.current.length === 0)
|
|
317
|
+
return;
|
|
318
|
+
const next = pendingDoorbellsRef.current.shift();
|
|
319
|
+
if (next === undefined)
|
|
320
|
+
return;
|
|
321
|
+
const live = liveRef.current;
|
|
322
|
+
if (!live.available) {
|
|
323
|
+
console.warn("[GuueyChat] queued ui/message doorbell dropped — chat became unavailable.");
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
void live.invoke.send(next).catch(() => { });
|
|
327
|
+
}, [busy]);
|
|
280
328
|
const effectiveViewProps = useMemo(() => viewPropsWithThemeAnnounce(viewProps, mode, {
|
|
281
329
|
...(stagedDefaultOnCallTool !== undefined ? { onCallTool: stagedDefaultOnCallTool } : {}),
|
|
282
330
|
onUpdateModelContext: defaultOnUpdateModelContext,
|
|
283
|
-
|
|
331
|
+
onUserMessage: defaultOnUserMessage,
|
|
332
|
+
}), [viewProps, mode, stagedDefaultOnCallTool, defaultOnUpdateModelContext, defaultOnUserMessage]);
|
|
284
333
|
// The canvas-host door (guuey#335): a host mounting views DIRECTLY from
|
|
285
334
|
// the roster (the chat-rail shell) needs the SAME slot wiring the kit's
|
|
286
335
|
// inline mounts get — theme announce, action relay, context sink. Read
|
|
@@ -293,6 +342,7 @@ export const GuueyChat = forwardRef(function GuueyChat(props, ref) {
|
|
|
293
342
|
? {
|
|
294
343
|
...(stagedDefaultOnCallTool !== undefined ? { onCallTool: stagedDefaultOnCallTool } : {}),
|
|
295
344
|
onUpdateModelContext: defaultOnUpdateModelContext,
|
|
345
|
+
onUserMessage: defaultOnUserMessage,
|
|
296
346
|
hostContext: { theme: mode },
|
|
297
347
|
}
|
|
298
348
|
: (effectiveViewProps ?? {});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-transcript.d.ts","sourceRoot":"","sources":["../../src/react/use-transcript.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACtE,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAA+D,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEhH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EAEP,gBAAgB,EAEhB,mBAAmB,EACnB,cAAc,EACf,MAAM,aAAa,CAAC;AAIrB,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,gBAAgB,CAAC;IACzB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CAChD;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,cAAc,CAAC;IACrB,wEAAwE;IACxE,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/B,mEAAmE;IACnE,SAAS,EAAE,mBAAmB,CAAC;IAC/B,0EAA0E;IAC1E,WAAW,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1D;;;;OAIG;IACH,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE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AW,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1D;;;;OAIG;IACH,eAAe,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACrE,sEAAsE;IACtE,cAAc,EAAE,WAAW,CAAC,OAAO,EAAE,iBAAiB,GAAG,SAAS,CAAC,CAAC;CACrE;AAED,wBAAgB,aAAa,CAAC,EAC5B,MAAM,EACN,MAAM,EACN,MAAM,EACN,YAAY,GACb,EAAE,iBAAiB,GAAG,mBAAmB,CAwIzC;AAID,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,gBAAgB,CAAC;IACzB;;;;;OAKG;IACH,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,UAAU,GAAG,WAAW,KAAK,IAAI,CAAC;IAClF;;;;;;;;OAQG;IACH,gBAAgB,EAAE,CAAC,GAAG,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,KAAK,YAAY,CAAC;CAChF;AAKD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,oBAAoB,GAAG,yBAAyB,CAsH3F"}
|
|
@@ -141,7 +141,9 @@ export function useTranscript({ inputs, policy, reader, onDebugEvent, }) {
|
|
|
141
141
|
settle("expired");
|
|
142
142
|
continue;
|
|
143
143
|
}
|
|
144
|
-
|
|
144
|
+
// guuey#421: the roster knows a card's origin — a history card's
|
|
145
|
+
// locator skips the pod door (it 404s by construction there).
|
|
146
|
+
void resolveViewMount(locator, read, { origin: item.origin }).then((resolved) => settle(resolved ?? "expired"), () => settle("expired"));
|
|
145
147
|
}
|
|
146
148
|
}, [plan, resolvedMounts]);
|
|
147
149
|
return { plan, toggle, overrides, onViewPhase, onViewDiagnosis, resolvedMounts };
|
package/dist/strings.d.ts
CHANGED
|
@@ -41,6 +41,11 @@ export interface ChatStrings {
|
|
|
41
41
|
/** R0. */
|
|
42
42
|
userCouldntSend: string;
|
|
43
43
|
userRetry: string;
|
|
44
|
+
/**
|
|
45
|
+
* R0 directive collapse (guuey#422): the calm label for a forwarded
|
|
46
|
+
* view-directive turn — the wire-verbatim text sits behind the expand.
|
|
47
|
+
*/
|
|
48
|
+
directiveContinuation: string;
|
|
44
49
|
/** R6 states. */
|
|
45
50
|
viewNegotiating: string;
|
|
46
51
|
viewBootFailure: string;
|
package/dist/strings.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../src/strings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,WAAW;IAC1B,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC,qDAAqD;IACrD,OAAO,EAAE,MAAM,CAAC;IAEhB,6EAA6E;IAC7E,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IAErB,aAAa;IACb,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAC7C,eAAe,EAAE,MAAM,CAAC;IACxB,2EAA2E;IAC3E,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IAEvC,UAAU;IACV,cAAc,EAAE,MAAM,CAAC;IAEvB,UAAU;IACV,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IAErC,yCAAyC;IACzC,YAAY,EAAE,MAAM,CAAC;IAErB,WAAW;IACX,UAAU,EA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,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,cAAc,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IAExC,wEAAwE;IACxE,WAAW,EAAE,MAAM,CAAC;IAEpB,uCAAuC;IACvC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAiBD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAWzD;AAED,eAAO,MAAM,kBAAkB,EAAE,WAyEhC,CAAC"}
|
package/dist/strings.js
CHANGED
|
@@ -46,6 +46,7 @@ export const defaultChatStrings = {
|
|
|
46
46
|
compaction: "Earlier conversation summarized",
|
|
47
47
|
userCouldntSend: "Couldn't send",
|
|
48
48
|
userRetry: "Retry",
|
|
49
|
+
directiveContinuation: "Continuing from your action…",
|
|
49
50
|
viewNegotiating: "Loading view…",
|
|
50
51
|
viewBootFailure: "This view couldn't start",
|
|
51
52
|
viewInlineFallback: "Showing plain content",
|
package/dist/types.d.ts
CHANGED
|
@@ -31,6 +31,12 @@ export interface TranscriptMessage {
|
|
|
31
31
|
clientMessageId?: string;
|
|
32
32
|
/** R16 provenance — meaningful only when `role === "notice"`. */
|
|
33
33
|
noticeSource?: AgNoticeSource;
|
|
34
|
+
/**
|
|
35
|
+
* Read-plane transcript `seq` on history-rehydrated rows (guuey#423) —
|
|
36
|
+
* the interleave key that lets persisted cards render at their TRUE
|
|
37
|
+
* positions instead of the R13 tail. Live turns carry none.
|
|
38
|
+
*/
|
|
39
|
+
seq?: number;
|
|
34
40
|
}
|
|
35
41
|
/**
|
|
36
42
|
* A pending/resolved account-LINK invite (R10) — the turn-level
|
|
@@ -173,6 +179,18 @@ export interface UserMessageItem extends BaseItem {
|
|
|
173
179
|
state: "sending" | "sent" | "failed";
|
|
174
180
|
/** The failed-state affordance (policy-gated); never silently disappears. */
|
|
175
181
|
retry: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* The turn is a forwarded view directive (guuey#422 — a `ui/message`
|
|
184
|
+
* doorbell's `<ggui_directive>` carrier, relayed through the composer's
|
|
185
|
+
* send gate). DISPLAY-ONLY: `text` stays wire-verbatim — the calm
|
|
186
|
+
* renderer collapses the bubble into a quiet
|
|
187
|
+
* `strings.directiveContinuation` row (expand reveals the verbatim
|
|
188
|
+
* text); nothing about the wire changes. Collapse is policy-gated
|
|
189
|
+
* (`userMessage.collapseDirectives`) — `false` here means "render as an
|
|
190
|
+
* ordinary bubble" whether because the text is ordinary or the policy
|
|
191
|
+
* says show it.
|
|
192
|
+
*/
|
|
193
|
+
directive: boolean;
|
|
176
194
|
}
|
|
177
195
|
/** R1 — assistant text. */
|
|
178
196
|
export interface TextItem extends BaseItem {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,WAAW,EACX,cAAc,EACd,QAAQ,EACR,SAAS,EACV,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,gBAAgB,EACjB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;GASG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iEAAiE;IACjE,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at",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "The default end-user transcript UI for guuey agents — the headless view-model (planTranscript), calm/debug presets, the GuueyChatTheme token schema, the ChatStrings i18n seam, and (at ./react) the component kit that renders it: per-category components, <Transcript>, the live + history input assemblers, and stick-to-bottom/windowed/accessible transcript behavior; at ./native, the React Native renderer over the same view-model.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"@silverprotocol/core": "0.5.1",
|
|
40
40
|
"@silverprotocol/richtext": "0.5.1",
|
|
41
41
|
"zod": "^4.3.6",
|
|
42
|
-
"@guuey/agent-client": "0.
|
|
43
|
-
"@guuey/mcp-apps-host": "0.
|
|
42
|
+
"@guuey/agent-client": "0.15.1",
|
|
43
|
+
"@guuey/mcp-apps-host": "0.15.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": ">=18",
|
|
@@ -4,6 +4,7 @@ exports[`corpus > 1. forty-tools — grouping caps the rows; plan stays O(groups
|
|
|
4
4
|
{
|
|
5
5
|
"items": [
|
|
6
6
|
{
|
|
7
|
+
"directive": false,
|
|
7
8
|
"expanded": true,
|
|
8
9
|
"key": "u0",
|
|
9
10
|
"kind": "user",
|
|
@@ -841,6 +842,7 @@ exports[`corpus > 2. midstream-tool-failure — failed inline; badge without unr
|
|
|
841
842
|
{
|
|
842
843
|
"items": [
|
|
843
844
|
{
|
|
845
|
+
"directive": false,
|
|
844
846
|
"expanded": true,
|
|
845
847
|
"key": "u0",
|
|
846
848
|
"kind": "user",
|
|
@@ -978,6 +980,7 @@ exports[`corpus > 3. cold-start — R12 escalation at 0 / 2.5 s / 15 s 1`] = `
|
|
|
978
980
|
{
|
|
979
981
|
"items": [
|
|
980
982
|
{
|
|
983
|
+
"directive": false,
|
|
981
984
|
"expanded": true,
|
|
982
985
|
"key": "u0",
|
|
983
986
|
"kind": "user",
|
|
@@ -1002,6 +1005,7 @@ exports[`corpus > 4. consent-gate — pending grant-mode card → answered one-l
|
|
|
1002
1005
|
{
|
|
1003
1006
|
"items": [
|
|
1004
1007
|
{
|
|
1008
|
+
"directive": false,
|
|
1005
1009
|
"expanded": true,
|
|
1006
1010
|
"key": "u0",
|
|
1007
1011
|
"kind": "user",
|
|
@@ -1076,6 +1080,7 @@ exports[`corpus > 5. bypass-text-only — plan identical to a silver text-only s
|
|
|
1076
1080
|
{
|
|
1077
1081
|
"items": [
|
|
1078
1082
|
{
|
|
1083
|
+
"directive": false,
|
|
1079
1084
|
"expanded": true,
|
|
1080
1085
|
"key": "u0",
|
|
1081
1086
|
"kind": "user",
|
|
@@ -1103,6 +1108,7 @@ exports[`corpus > 7. view-never-handshakes — channel-aware labels on both chan
|
|
|
1103
1108
|
{
|
|
1104
1109
|
"items": [
|
|
1105
1110
|
{
|
|
1111
|
+
"directive": false,
|
|
1106
1112
|
"expanded": true,
|
|
1107
1113
|
"key": "u0",
|
|
1108
1114
|
"kind": "user",
|
|
@@ -1210,6 +1216,7 @@ exports[`corpus > 8. aborted-mid-stream — partial kept + Stopped.; no orphaned
|
|
|
1210
1216
|
{
|
|
1211
1217
|
"items": [
|
|
1212
1218
|
{
|
|
1219
|
+
"directive": false,
|
|
1213
1220
|
"expanded": true,
|
|
1214
1221
|
"key": "u0",
|
|
1215
1222
|
"kind": "user",
|
|
@@ -1255,6 +1262,7 @@ exports[`corpus > 9. history-dead-locators — the expired path beside a healthy
|
|
|
1255
1262
|
{
|
|
1256
1263
|
"items": [
|
|
1257
1264
|
{
|
|
1265
|
+
"directive": false,
|
|
1258
1266
|
"expanded": true,
|
|
1259
1267
|
"key": "u0",
|
|
1260
1268
|
"kind": "user",
|
|
@@ -1333,6 +1341,7 @@ exports[`corpus > 10. empty-turn — status resolves, no empty bubble 1`] = `
|
|
|
1333
1341
|
{
|
|
1334
1342
|
"items": [
|
|
1335
1343
|
{
|
|
1344
|
+
"directive": false,
|
|
1336
1345
|
"expanded": true,
|
|
1337
1346
|
"key": "u0",
|
|
1338
1347
|
"kind": "user",
|
|
@@ -1351,6 +1360,7 @@ exports[`corpus > 11. unknown-block-storm — labeled rows; nothing blank, nothi
|
|
|
1351
1360
|
{
|
|
1352
1361
|
"items": [
|
|
1353
1362
|
{
|
|
1363
|
+
"directive": false,
|
|
1354
1364
|
"expanded": true,
|
|
1355
1365
|
"key": "u0",
|
|
1356
1366
|
"kind": "user",
|
|
@@ -1396,6 +1406,7 @@ exports[`corpus > 12. interleaved-media-code-citations — ordering and aggregat
|
|
|
1396
1406
|
{
|
|
1397
1407
|
"items": [
|
|
1398
1408
|
{
|
|
1409
|
+
"directive": false,
|
|
1399
1410
|
"expanded": true,
|
|
1400
1411
|
"key": "u0",
|
|
1401
1412
|
"kind": "user",
|
|
@@ -1461,6 +1472,7 @@ exports[`corpus > 13. saturated-then-served — only R12 waiting, then a normal
|
|
|
1461
1472
|
{
|
|
1462
1473
|
"items": [
|
|
1463
1474
|
{
|
|
1475
|
+
"directive": false,
|
|
1464
1476
|
"expanded": true,
|
|
1465
1477
|
"key": "u0",
|
|
1466
1478
|
"kind": "user",
|
|
@@ -1488,6 +1500,7 @@ exports[`corpus > 14. reasoning-heavy — calm collapses to one line; debug expa
|
|
|
1488
1500
|
{
|
|
1489
1501
|
"items": [
|
|
1490
1502
|
{
|
|
1503
|
+
"directive": false,
|
|
1491
1504
|
"expanded": true,
|
|
1492
1505
|
"key": "u0",
|
|
1493
1506
|
"kind": "user",
|
|
@@ -1523,6 +1536,7 @@ exports[`corpus > 15. tools-around-a-view — the group SPLITS at the view's pos
|
|
|
1523
1536
|
{
|
|
1524
1537
|
"items": [
|
|
1525
1538
|
{
|
|
1539
|
+
"directive": false,
|
|
1526
1540
|
"expanded": true,
|
|
1527
1541
|
"key": "u0",
|
|
1528
1542
|
"kind": "user",
|
|
@@ -1690,6 +1704,7 @@ exports[`corpus > 16. user-send-failure — R0 failed with retry; the message ne
|
|
|
1690
1704
|
{
|
|
1691
1705
|
"items": [
|
|
1692
1706
|
{
|
|
1707
|
+
"directive": false,
|
|
1693
1708
|
"expanded": true,
|
|
1694
1709
|
"key": "u0",
|
|
1695
1710
|
"kind": "user",
|
|
@@ -1708,6 +1723,7 @@ exports[`corpus > 19. persisted-plus-live — the fold owns its trailing turns;
|
|
|
1708
1723
|
{
|
|
1709
1724
|
"items": [
|
|
1710
1725
|
{
|
|
1726
|
+
"directive": false,
|
|
1711
1727
|
"expanded": true,
|
|
1712
1728
|
"key": "u0",
|
|
1713
1729
|
"kind": "user",
|
|
@@ -1725,6 +1741,7 @@ exports[`corpus > 19. persisted-plus-live — the fold owns its trailing turns;
|
|
|
1725
1741
|
"text": "Here are some options.",
|
|
1726
1742
|
},
|
|
1727
1743
|
{
|
|
1744
|
+
"directive": false,
|
|
1728
1745
|
"expanded": true,
|
|
1729
1746
|
"key": "u1",
|
|
1730
1747
|
"kind": "user",
|
|
@@ -1770,6 +1787,7 @@ exports[`corpus > 19. persisted-plus-live — the fold owns its trailing turns;
|
|
|
1770
1787
|
"toolTitle": "ggui render",
|
|
1771
1788
|
},
|
|
1772
1789
|
{
|
|
1790
|
+
"directive": false,
|
|
1773
1791
|
"expanded": true,
|
|
1774
1792
|
"key": "u2",
|
|
1775
1793
|
"kind": "user",
|
|
@@ -1855,6 +1873,7 @@ exports[`corpus > 20. hitl-grant-modes — the persisted declaration renders; an
|
|
|
1855
1873
|
{
|
|
1856
1874
|
"items": [
|
|
1857
1875
|
{
|
|
1876
|
+
"directive": false,
|
|
1858
1877
|
"expanded": true,
|
|
1859
1878
|
"key": "u0",
|
|
1860
1879
|
"kind": "user",
|
|
@@ -1940,6 +1959,7 @@ exports[`corpus > 21. notice-rows — both arrival paths render labeled, never a
|
|
|
1940
1959
|
"text": "Model fell back to concise mode",
|
|
1941
1960
|
},
|
|
1942
1961
|
{
|
|
1962
|
+
"directive": false,
|
|
1943
1963
|
"expanded": true,
|
|
1944
1964
|
"key": "u0",
|
|
1945
1965
|
"kind": "user",
|
|
@@ -1967,6 +1987,7 @@ exports[`corpus > 22. promoted-view — the stage's mount chips (guuey#204); oth
|
|
|
1967
1987
|
{
|
|
1968
1988
|
"items": [
|
|
1969
1989
|
{
|
|
1990
|
+
"directive": false,
|
|
1970
1991
|
"expanded": true,
|
|
1971
1992
|
"key": "u0",
|
|
1972
1993
|
"kind": "user",
|
|
@@ -2071,6 +2092,7 @@ exports[`corpus > 23. meta-less-locator — a \`_meta\`-withholding producer's r
|
|
|
2071
2092
|
{
|
|
2072
2093
|
"items": [
|
|
2073
2094
|
{
|
|
2095
|
+
"directive": false,
|
|
2074
2096
|
"expanded": true,
|
|
2075
2097
|
"key": "u0",
|
|
2076
2098
|
"kind": "user",
|
|
@@ -2130,6 +2152,7 @@ exports[`corpus > 24. prod-wire-ggui-render — ggui's production posture: no _m
|
|
|
2130
2152
|
{
|
|
2131
2153
|
"items": [
|
|
2132
2154
|
{
|
|
2155
|
+
"directive": false,
|
|
2133
2156
|
"expanded": true,
|
|
2134
2157
|
"key": "u0",
|
|
2135
2158
|
"kind": "user",
|
|
@@ -2198,6 +2221,7 @@ exports[`corpus > 25. chips-presentation — EVERY view chips; the promoted key
|
|
|
2198
2221
|
{
|
|
2199
2222
|
"items": [
|
|
2200
2223
|
{
|
|
2224
|
+
"directive": false,
|
|
2201
2225
|
"expanded": true,
|
|
2202
2226
|
"key": "u0",
|
|
2203
2227
|
"kind": "user",
|
|
@@ -2291,6 +2315,7 @@ exports[`corpus > 25. oauth-auth-ask — kind:auth + authConfig oauth2 plans as
|
|
|
2291
2315
|
{
|
|
2292
2316
|
"items": [
|
|
2293
2317
|
{
|
|
2318
|
+
"directive": false,
|
|
2294
2319
|
"expanded": true,
|
|
2295
2320
|
"key": "u0",
|
|
2296
2321
|
"kind": "user",
|
package/src/plan.ts
CHANGED
|
@@ -823,13 +823,23 @@ export function planTranscript(
|
|
|
823
823
|
user.clientMessageId !== undefined
|
|
824
824
|
? (inputs.sendStates?.[user.clientMessageId] ?? "sent")
|
|
825
825
|
: "sent";
|
|
826
|
+
// guuey#422 close-condition 3: a forwarded view directive (the
|
|
827
|
+
// `ui/message` doorbell's `<ggui_directive>` carrier, relayed through
|
|
828
|
+
// the composer's send gate) collapses into a calm continuation row.
|
|
829
|
+
// DISPLAY-ONLY — `text` stays wire-verbatim (expand reveals it); the
|
|
830
|
+
// wire itself was never touched. Marker matches ggui's runtime
|
|
831
|
+
// construction (`<ggui_directive kind="user-action">` inside the
|
|
832
|
+
// relayed prose).
|
|
833
|
+
const directive =
|
|
834
|
+
policy.userMessage.collapseDirectives && user.text.includes("<ggui_directive");
|
|
826
835
|
conversation.push({
|
|
827
836
|
kind: "user",
|
|
828
837
|
key,
|
|
829
|
-
expanded:
|
|
838
|
+
expanded: resolveExpanded(key, !directive, overrides),
|
|
830
839
|
text: user.text,
|
|
831
840
|
state: sendState,
|
|
832
841
|
retry: sendState === "failed" && policy.userMessage.retryAffordance,
|
|
842
|
+
directive,
|
|
833
843
|
});
|
|
834
844
|
}
|
|
835
845
|
const assistant = assistants[slot];
|
|
@@ -840,9 +850,15 @@ export function planTranscript(
|
|
|
840
850
|
}
|
|
841
851
|
items.push(...groupTools(conversation, policy, overrides));
|
|
842
852
|
|
|
843
|
-
// R13 — persisted cards, seq order. (
|
|
844
|
-
//
|
|
845
|
-
//
|
|
853
|
+
// R13 — persisted cards, seq order. POSITION (guuey#423): interleaved at
|
|
854
|
+
// their TRUE transcript positions when the flat surface carries read-plane
|
|
855
|
+
// seqs (the assemblers thread `TranscriptMessage.seq` since #423 — the
|
|
856
|
+
// refinement the 3b-era note deferred): a card slots before the first
|
|
857
|
+
// HISTORY user turn whose seq exceeds it. Cards newer than every seq-
|
|
858
|
+
// bearing turn — and every card in a seq-less (live-only) session — keep
|
|
859
|
+
// the tail, byte-identical to the old behavior. The old tail-always
|
|
860
|
+
// placement + bottom-pin buried a returning visitor's conversation above
|
|
861
|
+
// a stale trailing card (the #423 founder face).
|
|
846
862
|
//
|
|
847
863
|
// Dedupe against LIVE mounts by actionScope (the persisted `ui://`
|
|
848
864
|
// identity both sides carry): a session whose fold still holds a turn the
|
|
@@ -879,7 +895,20 @@ export function planTranscript(
|
|
|
879
895
|
actionScope: scope,
|
|
880
896
|
};
|
|
881
897
|
view.label = viewLabel(view, policy);
|
|
882
|
-
|
|
898
|
+
// The interleave: find the first seq-bearing user turn NEWER than the
|
|
899
|
+
// card; insert before its item. Cards processed in ascending seq order,
|
|
900
|
+
// so same-target cards keep their relative order (each splice lands
|
|
901
|
+
// after the previous card, before the user item).
|
|
902
|
+
const nextUserSlot = users.findIndex(
|
|
903
|
+
(u) => u.seq !== undefined && card.seq < u.seq,
|
|
904
|
+
);
|
|
905
|
+
const anchorIdx =
|
|
906
|
+
nextUserSlot === -1 ? -1 : items.findIndex((it) => it.key === `u${nextUserSlot}`);
|
|
907
|
+
if (anchorIdx === -1) {
|
|
908
|
+
items.push(view);
|
|
909
|
+
} else {
|
|
910
|
+
items.splice(anchorIdx, 0, view);
|
|
911
|
+
}
|
|
883
912
|
}
|
|
884
913
|
|
|
885
914
|
// R10 — prompts, in input order (narrow on `kind`: the guuey-wire
|
package/src/policy.ts
CHANGED
|
@@ -19,7 +19,17 @@ export interface TranscriptPolicy {
|
|
|
19
19
|
*/
|
|
20
20
|
debugDetail: boolean;
|
|
21
21
|
/** R0. */
|
|
22
|
-
userMessage: {
|
|
22
|
+
userMessage: {
|
|
23
|
+
retryAffordance: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Collapse forwarded view-directive turns (guuey#422 `ui/message`
|
|
26
|
+
* relays carrying `<ggui_directive>`) into a calm
|
|
27
|
+
* `strings.directiveContinuation` row. Display-only — the sent/
|
|
28
|
+
* persisted text stays wire-verbatim, and expand reveals it. Debug
|
|
29
|
+
* preset shows the verbatim bubble (`false`).
|
|
30
|
+
*/
|
|
31
|
+
collapseDirectives: boolean;
|
|
32
|
+
};
|
|
23
33
|
/** R1 (markdown sanitization itself is the 3b renderer's security surface). */
|
|
24
34
|
text: { markdown: boolean };
|
|
25
35
|
/** R2. */
|
|
@@ -125,7 +135,7 @@ function calmBase(): TranscriptPolicy {
|
|
|
125
135
|
strings: defaultChatStrings,
|
|
126
136
|
locale: "en",
|
|
127
137
|
debugDetail: false,
|
|
128
|
-
userMessage: { retryAffordance: true },
|
|
138
|
+
userMessage: { retryAffordance: true, collapseDirectives: true },
|
|
129
139
|
text: { markdown: true },
|
|
130
140
|
reasoning: { show: true, expandedByDefault: false },
|
|
131
141
|
tool: { expandByDefault: false, argsVisible: false, humanizeTitle: humanizeToolName },
|
|
@@ -155,6 +165,7 @@ export function debugPolicy(overrides?: TranscriptPolicyOverrides): TranscriptPo
|
|
|
155
165
|
const debug: TranscriptPolicy = {
|
|
156
166
|
...base,
|
|
157
167
|
debugDetail: true,
|
|
168
|
+
userMessage: { ...base.userMessage, collapseDirectives: false },
|
|
158
169
|
reasoning: { ...base.reasoning, expandedByDefault: true },
|
|
159
170
|
tool: { ...base.tool, expandByDefault: true, argsVisible: true },
|
|
160
171
|
toolGroup: { threshold: false },
|
package/src/react/components.tsx
CHANGED
|
@@ -107,6 +107,7 @@ export type ViewSlotProps = Pick<
|
|
|
107
107
|
| "hostContext"
|
|
108
108
|
| "onCallTool"
|
|
109
109
|
| "onUpdateModelContext"
|
|
110
|
+
| "onUserMessage"
|
|
110
111
|
| "onReadResource"
|
|
111
112
|
| "onSizeChanged"
|
|
112
113
|
| "negotiationTimeoutMs"
|
|
@@ -186,6 +187,33 @@ function CopyButton({ text, ctx }: { text: string; ctx: TranscriptItemContext })
|
|
|
186
187
|
// ─── R0 ────────────────────────────────────────────────────────────────────
|
|
187
188
|
|
|
188
189
|
export function DefaultUserMessage({ item, ctx }: ItemProps<UserMessageItem>): ReactNode {
|
|
190
|
+
// guuey#422: a forwarded view directive renders as a calm continuation
|
|
191
|
+
// row — the wire-verbatim text sits behind the expand, never rewritten.
|
|
192
|
+
if (item.directive) {
|
|
193
|
+
return (
|
|
194
|
+
<div className={`guuey-chat-user guuey-chat-user-directive guuey-chat-user-${item.state}`}>
|
|
195
|
+
<Collapsible
|
|
196
|
+
itemKey={item.key}
|
|
197
|
+
expanded={item.expanded}
|
|
198
|
+
header={<span className="guuey-chat-directive-label">{ctx.strings.directiveContinuation}</span>}
|
|
199
|
+
ctx={ctx}
|
|
200
|
+
>
|
|
201
|
+
{/* Verbatim quote — same never-rendered rule as the bubble. */}
|
|
202
|
+
<div className="guuey-chat-user-bubble">{item.text}</div>
|
|
203
|
+
</Collapsible>
|
|
204
|
+
{item.state === "failed" ? (
|
|
205
|
+
<p className="guuey-chat-send-failed" role="status">
|
|
206
|
+
{ctx.strings.userCouldntSend}
|
|
207
|
+
{item.retry ? (
|
|
208
|
+
<button type="button" className="guuey-chat-retry" onClick={() => ctx.onRetry?.(item)}>
|
|
209
|
+
{ctx.strings.userRetry}
|
|
210
|
+
</button>
|
|
211
|
+
) : null}
|
|
212
|
+
</p>
|
|
213
|
+
) : null}
|
|
214
|
+
</div>
|
|
215
|
+
);
|
|
216
|
+
}
|
|
189
217
|
return (
|
|
190
218
|
<div className={`guuey-chat-user guuey-chat-user-${item.state}`}>
|
|
191
219
|
{/* User text is QUOTED, never rendered — whitespace preserved. */}
|
package/src/react/guuey-chat.tsx
CHANGED
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
} from "@guuey/agent-client";
|
|
65
65
|
import type { AgHitlAnswer, AgPausedAsk } from "@silverprotocol/core";
|
|
66
66
|
import { useAgentInvoke } from "@guuey/agent-client/react";
|
|
67
|
-
import { unavailableToolCallResult
|
|
67
|
+
import { unavailableToolCallResult } from "@guuey/mcp-apps-host";
|
|
68
68
|
import type { McpToolCallResult, UiActionRequest, UiResourceReader } from "@guuey/mcp-apps-host";
|
|
69
69
|
import { calmPolicy, debugPolicy, type TranscriptPolicyOverrides } from "../policy.js";
|
|
70
70
|
import { useStructuralIdentity } from "./structural-identity.js";
|
|
@@ -93,7 +93,7 @@ import { oauthPromptAction, useOAuthReturn } from "./oauth-return.js";
|
|
|
93
93
|
export function viewPropsWithThemeAnnounce(
|
|
94
94
|
viewProps: TranscriptItemContext["viewProps"],
|
|
95
95
|
mode: ThemeMode,
|
|
96
|
-
defaults: Pick<ViewSlotProps, "onCallTool" | "onUpdateModelContext"> = {},
|
|
96
|
+
defaults: Pick<ViewSlotProps, "onCallTool" | "onUpdateModelContext" | "onUserMessage"> = {},
|
|
97
97
|
): TranscriptItemContext["viewProps"] {
|
|
98
98
|
const themed = (base: ViewSlotProps | undefined): ViewSlotProps => ({
|
|
99
99
|
// Kit-default host wires (guuey#335): the ACTION RELAY (Confirm inside
|
|
@@ -504,32 +504,81 @@ export const GuueyChat = forwardRef<GuueyChatHandle, GuueyChatProps>(function Gu
|
|
|
504
504
|
});
|
|
505
505
|
}, []);
|
|
506
506
|
|
|
507
|
-
//
|
|
508
|
-
//
|
|
509
|
-
//
|
|
510
|
-
//
|
|
511
|
-
//
|
|
512
|
-
//
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
507
|
+
// guuey#422: the kit default DOES NOT stage the ggui semantic carrier
|
|
508
|
+
// any more — post-turn actions RELAY (the #222 platform door serves
|
|
509
|
+
// persisted-card actions after the turn), so the runtime receives its
|
|
510
|
+
// REAL result envelope and its #440 classifier grades honestly; the
|
|
511
|
+
// post-turn agent turn then starts through the ui/message doorbell
|
|
512
|
+
// (the sink below). The #356 staging seam remains a PUBLIC export
|
|
513
|
+
// (withActionStaging) for hosts that choose the composer-staging UX —
|
|
514
|
+
// the widget's own mountCallTool still applies it by its own choice.
|
|
515
|
+
const stagedDefaultOnCallTool = defaultOnCallTool;
|
|
516
|
+
|
|
517
|
+
// The ui/message sink (guuey#422): the view hands the host role-user
|
|
518
|
+
// content (ggui's #440 doorbell — the model directive that drains a
|
|
519
|
+
// post-turn gesture). Forward through the SAME gate as handle.send: a
|
|
520
|
+
// real turn starts, the agent calls ggui_consume, the card repaints.
|
|
521
|
+
// Busy/unavailable ⇒ dropped (the doorbell fires post-turn by design;
|
|
522
|
+
// mid-turn the consume pipe is live and no doorbell fires).
|
|
523
|
+
// guuey#422 close-condition 1 (ggui review): the machine ACKs the
|
|
524
|
+
// doorbell BEFORE delivery, so a busy-drop here would be an
|
|
525
|
+
// ACKed-then-silently-dropped message — the night's silence class in
|
|
526
|
+
// protocol clothes. Queue-and-drain instead: while a turn is live the
|
|
527
|
+
// directive queues (exact-text dedupe — a session's repeat doorbells
|
|
528
|
+
// collapse; the consume PIPE holds the gestures, the doorbell only
|
|
529
|
+
// wakes), and the idle transition drains one per turn. Unavailable chat
|
|
530
|
+
// cannot drain — that drop is LOUD (console.warn), never silent.
|
|
531
|
+
const pendingDoorbellsRef = useRef<string[]>([]);
|
|
532
|
+
const defaultOnUserMessage = useCallback((params: { [key: string]: unknown }) => {
|
|
533
|
+
const content = params["content"];
|
|
534
|
+
if (!Array.isArray(content)) return;
|
|
535
|
+
const text = content
|
|
536
|
+
.map((b) =>
|
|
537
|
+
typeof b === "object" && b !== null && "text" in b && typeof b.text === "string"
|
|
538
|
+
? b.text
|
|
539
|
+
: "",
|
|
540
|
+
)
|
|
541
|
+
.filter((t) => t !== "")
|
|
542
|
+
.join("\n");
|
|
543
|
+
if (text.trim() === "") return;
|
|
544
|
+
const live = liveRef.current;
|
|
545
|
+
if (!live.available) {
|
|
546
|
+
console.warn(
|
|
547
|
+
"[GuueyChat] ui/message doorbell dropped — chat is unavailable (endpointUrl null); the view's gesture cannot start a turn here.",
|
|
548
|
+
);
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
if (live.busy) {
|
|
552
|
+
if (!pendingDoorbellsRef.current.includes(text)) pendingDoorbellsRef.current.push(text);
|
|
553
|
+
return;
|
|
554
|
+
}
|
|
555
|
+
void live.invoke.send(text).catch(() => {
|
|
556
|
+
// The hook owns failure surfacing, same as every send path.
|
|
523
557
|
});
|
|
524
|
-
}, [
|
|
558
|
+
}, []);
|
|
559
|
+
|
|
560
|
+
// The drain: one queued doorbell per idle transition — its send flips
|
|
561
|
+
// busy again, and the NEXT idle drains the next (never a turn storm).
|
|
562
|
+
useEffect(() => {
|
|
563
|
+
if (busy || pendingDoorbellsRef.current.length === 0) return;
|
|
564
|
+
const next = pendingDoorbellsRef.current.shift();
|
|
565
|
+
if (next === undefined) return;
|
|
566
|
+
const live = liveRef.current;
|
|
567
|
+
if (!live.available) {
|
|
568
|
+
console.warn("[GuueyChat] queued ui/message doorbell dropped — chat became unavailable.");
|
|
569
|
+
return;
|
|
570
|
+
}
|
|
571
|
+
void live.invoke.send(next).catch(() => {});
|
|
572
|
+
}, [busy]);
|
|
525
573
|
|
|
526
574
|
const effectiveViewProps = useMemo<TranscriptItemContext["viewProps"]>(
|
|
527
575
|
() =>
|
|
528
576
|
viewPropsWithThemeAnnounce(viewProps, mode, {
|
|
529
577
|
...(stagedDefaultOnCallTool !== undefined ? { onCallTool: stagedDefaultOnCallTool } : {}),
|
|
530
578
|
onUpdateModelContext: defaultOnUpdateModelContext,
|
|
579
|
+
onUserMessage: defaultOnUserMessage,
|
|
531
580
|
}),
|
|
532
|
-
[viewProps, mode, stagedDefaultOnCallTool, defaultOnUpdateModelContext],
|
|
581
|
+
[viewProps, mode, stagedDefaultOnCallTool, defaultOnUpdateModelContext, defaultOnUserMessage],
|
|
533
582
|
);
|
|
534
583
|
|
|
535
584
|
// The canvas-host door (guuey#335): a host mounting views DIRECTLY from
|
|
@@ -544,6 +593,7 @@ export const GuueyChat = forwardRef<GuueyChatHandle, GuueyChatProps>(function Gu
|
|
|
544
593
|
? {
|
|
545
594
|
...(stagedDefaultOnCallTool !== undefined ? { onCallTool: stagedDefaultOnCallTool } : {}),
|
|
546
595
|
onUpdateModelContext: defaultOnUpdateModelContext,
|
|
596
|
+
onUserMessage: defaultOnUserMessage,
|
|
547
597
|
hostContext: { theme: mode },
|
|
548
598
|
}
|
|
549
599
|
: (effectiveViewProps ?? {});
|
|
@@ -204,7 +204,9 @@ export function useTranscript({
|
|
|
204
204
|
settle("expired");
|
|
205
205
|
continue;
|
|
206
206
|
}
|
|
207
|
-
|
|
207
|
+
// guuey#421: the roster knows a card's origin — a history card's
|
|
208
|
+
// locator skips the pod door (it 404s by construction there).
|
|
209
|
+
void resolveViewMount(locator, read, { origin: item.origin }).then(
|
|
208
210
|
(resolved) => settle(resolved ?? "expired"),
|
|
209
211
|
() => settle("expired"),
|
|
210
212
|
);
|
package/src/strings.ts
CHANGED
|
@@ -48,6 +48,11 @@ export interface ChatStrings {
|
|
|
48
48
|
/** R0. */
|
|
49
49
|
userCouldntSend: string;
|
|
50
50
|
userRetry: string;
|
|
51
|
+
/**
|
|
52
|
+
* R0 directive collapse (guuey#422): the calm label for a forwarded
|
|
53
|
+
* view-directive turn — the wire-verbatim text sits behind the expand.
|
|
54
|
+
*/
|
|
55
|
+
directiveContinuation: string;
|
|
51
56
|
|
|
52
57
|
/** R6 states. */
|
|
53
58
|
viewNegotiating: string;
|
|
@@ -178,6 +183,7 @@ export const defaultChatStrings: ChatStrings = {
|
|
|
178
183
|
|
|
179
184
|
userCouldntSend: "Couldn't send",
|
|
180
185
|
userRetry: "Retry",
|
|
186
|
+
directiveContinuation: "Continuing from your action…",
|
|
181
187
|
|
|
182
188
|
viewNegotiating: "Loading view…",
|
|
183
189
|
viewBootFailure: "This view couldn't start",
|
package/src/types.ts
CHANGED
|
@@ -44,6 +44,12 @@ export interface TranscriptMessage {
|
|
|
44
44
|
clientMessageId?: string;
|
|
45
45
|
/** R16 provenance — meaningful only when `role === "notice"`. */
|
|
46
46
|
noticeSource?: AgNoticeSource;
|
|
47
|
+
/**
|
|
48
|
+
* Read-plane transcript `seq` on history-rehydrated rows (guuey#423) —
|
|
49
|
+
* the interleave key that lets persisted cards render at their TRUE
|
|
50
|
+
* positions instead of the R13 tail. Live turns carry none.
|
|
51
|
+
*/
|
|
52
|
+
seq?: number;
|
|
47
53
|
}
|
|
48
54
|
|
|
49
55
|
/**
|
|
@@ -191,6 +197,18 @@ export interface UserMessageItem extends BaseItem {
|
|
|
191
197
|
state: "sending" | "sent" | "failed";
|
|
192
198
|
/** The failed-state affordance (policy-gated); never silently disappears. */
|
|
193
199
|
retry: boolean;
|
|
200
|
+
/**
|
|
201
|
+
* The turn is a forwarded view directive (guuey#422 — a `ui/message`
|
|
202
|
+
* doorbell's `<ggui_directive>` carrier, relayed through the composer's
|
|
203
|
+
* send gate). DISPLAY-ONLY: `text` stays wire-verbatim — the calm
|
|
204
|
+
* renderer collapses the bubble into a quiet
|
|
205
|
+
* `strings.directiveContinuation` row (expand reveals the verbatim
|
|
206
|
+
* text); nothing about the wire changes. Collapse is policy-gated
|
|
207
|
+
* (`userMessage.collapseDirectives`) — `false` here means "render as an
|
|
208
|
+
* ordinary bubble" whether because the text is ordinary or the policy
|
|
209
|
+
* says show it.
|
|
210
|
+
*/
|
|
211
|
+
directive: boolean;
|
|
194
212
|
}
|
|
195
213
|
|
|
196
214
|
/** R1 — assistant text. */
|