@guuey/chat 0.7.1 → 0.8.0
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/README.md +13 -0
- package/dist/hitl.d.ts +5 -0
- package/dist/hitl.d.ts.map +1 -1
- package/dist/hitl.js +5 -0
- package/dist/native/components.d.ts.map +1 -1
- package/dist/native/components.js +1 -3
- package/dist/plan.d.ts.map +1 -1
- package/dist/plan.js +9 -1
- package/dist/react/components.d.ts +8 -2
- package/dist/react/components.d.ts.map +1 -1
- package/dist/react/components.js +2 -4
- package/dist/react/guuey-chat.d.ts.map +1 -1
- package/dist/react/guuey-chat.js +2 -2
- package/dist/react/transcript.d.ts +1 -1
- package/dist/react/transcript.d.ts.map +1 -1
- package/dist/react/transcript.js +13 -2
- package/dist/react/use-transcript.d.ts +10 -4
- package/dist/react/use-transcript.d.ts.map +1 -1
- package/dist/react/use-transcript.js +33 -30
- package/dist/strings.d.ts +11 -0
- package/dist/strings.d.ts.map +1 -1
- package/dist/strings.js +1 -0
- package/dist/types.d.ts +31 -12
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/corpus/__snapshots__/corpus.test.ts.snap +52 -7
- package/src/corpus/drive.ts +43 -12
- package/src/corpus/fixtures.ts +18 -4
- package/src/hitl.ts +5 -0
- package/src/native/components.tsx +1 -3
- package/src/plan.ts +9 -2
- package/src/react/components.tsx +10 -6
- package/src/react/guuey-chat.tsx +2 -1
- package/src/react/transcript.tsx +23 -3
- package/src/react/use-transcript.ts +42 -36
- package/src/strings.ts +13 -0
- package/src/types.ts +41 -13
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,sB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AAO,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC3E;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/C,MAAM,WAAW,cAAc;IAC7B,6DAA6D;IAC7D,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,kEAAkE;IAClE,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guuey/chat",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
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.0",
|
|
40
40
|
"@silverprotocol/richtext": "0.5.0",
|
|
41
41
|
"zod": "^4.3.6",
|
|
42
|
-
"@guuey/agent-client": "0.
|
|
43
|
-
"@guuey/mcp-apps-host": "0.
|
|
42
|
+
"@guuey/agent-client": "0.8.0",
|
|
43
|
+
"@guuey/mcp-apps-host": "0.8.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": ">=18",
|
|
@@ -995,7 +995,7 @@ exports[`corpus > 3. cold-start — R12 escalation at 0 / 2.5 s / 15 s 1`] = `
|
|
|
995
995
|
}
|
|
996
996
|
`;
|
|
997
997
|
|
|
998
|
-
exports[`corpus > 4. consent-gate — pending card → answered one-line collapse 1`] = `
|
|
998
|
+
exports[`corpus > 4. consent-gate — pending grant-mode card → answered one-line collapse (guuey#207 hitl arm) 1`] = `
|
|
999
999
|
{
|
|
1000
1000
|
"items": [
|
|
1001
1001
|
{
|
|
@@ -1013,17 +1013,52 @@ exports[`corpus > 4. consent-gate — pending card → answered one-line collaps
|
|
|
1013
1013
|
"markdown": true,
|
|
1014
1014
|
"stopped": false,
|
|
1015
1015
|
"streaming": false,
|
|
1016
|
-
"text": "
|
|
1016
|
+
"text": "Booked your usual — I couldn't see your profile yet.",
|
|
1017
1017
|
},
|
|
1018
1018
|
{
|
|
1019
|
-
"
|
|
1019
|
+
"ask": {
|
|
1020
|
+
"askId": "profile-consent:app-1:thread-corpus",
|
|
1021
|
+
"grantModes": [
|
|
1022
|
+
{
|
|
1023
|
+
"description": "Every conversation with this agent",
|
|
1024
|
+
"id": "always",
|
|
1025
|
+
"label": "Always allow",
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
"description": "Only this conversation",
|
|
1029
|
+
"id": "once",
|
|
1030
|
+
"label": "Allow this chat",
|
|
1031
|
+
},
|
|
1032
|
+
],
|
|
1033
|
+
"kind": "approval",
|
|
1034
|
+
"message": "Trip Planner wants to read your guuey profile — the notes agents keep about you across apps.",
|
|
1035
|
+
"metadata": {
|
|
1036
|
+
"appId": "app-1",
|
|
1037
|
+
"requested": "read",
|
|
1038
|
+
},
|
|
1039
|
+
},
|
|
1040
|
+
"askKind": "approval",
|
|
1041
|
+
"chosenModeId": null,
|
|
1042
|
+
"chosenModeLabel": null,
|
|
1020
1043
|
"expanded": true,
|
|
1021
|
-
"
|
|
1044
|
+
"grantModes": [
|
|
1045
|
+
{
|
|
1046
|
+
"description": "Every conversation with this agent",
|
|
1047
|
+
"id": "always",
|
|
1048
|
+
"label": "Always allow",
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
"description": "Only this conversation",
|
|
1052
|
+
"id": "once",
|
|
1053
|
+
"label": "Allow this chat",
|
|
1054
|
+
},
|
|
1055
|
+
],
|
|
1056
|
+
"key": "p.profile-consent:app-1:thread-corpus",
|
|
1022
1057
|
"kind": "prompt",
|
|
1023
|
-
"
|
|
1024
|
-
"
|
|
1058
|
+
"message": "Trip Planner wants to read your guuey profile — the notes agents keep about you across apps.",
|
|
1059
|
+
"promptId": "profile-consent:app-1:thread-corpus",
|
|
1060
|
+
"promptKind": "hitl",
|
|
1025
1061
|
"raw": null,
|
|
1026
|
-
"requested": "read",
|
|
1027
1062
|
"state": "pending",
|
|
1028
1063
|
},
|
|
1029
1064
|
],
|
|
@@ -1085,6 +1120,7 @@ exports[`corpus > 7. view-never-handshakes — channel-aware labels on both chan
|
|
|
1085
1120
|
"actionScope": null,
|
|
1086
1121
|
"attribution": "via render form",
|
|
1087
1122
|
"channel": "inline",
|
|
1123
|
+
"diagnosis": null,
|
|
1088
1124
|
"expanded": true,
|
|
1089
1125
|
"key": "view.tInline",
|
|
1090
1126
|
"kind": "view",
|
|
@@ -1116,6 +1152,7 @@ exports[`corpus > 7. view-never-handshakes — channel-aware labels on both chan
|
|
|
1116
1152
|
"actionScope": "ui://ggui/render/render_00000000-0000-4000-8000-300000000001/c0ffee",
|
|
1117
1153
|
"attribution": "via ggui render",
|
|
1118
1154
|
"channel": "locator",
|
|
1155
|
+
"diagnosis": null,
|
|
1119
1156
|
"expanded": true,
|
|
1120
1157
|
"key": "view.tGgui",
|
|
1121
1158
|
"kind": "view",
|
|
@@ -1201,6 +1238,7 @@ exports[`corpus > 9. history-dead-locators — the expired path beside a healthy
|
|
|
1201
1238
|
"actionScope": "ui://ggui/render/old/1",
|
|
1202
1239
|
"attribution": null,
|
|
1203
1240
|
"channel": "locator",
|
|
1241
|
+
"diagnosis": null,
|
|
1204
1242
|
"expanded": true,
|
|
1205
1243
|
"key": "card.1",
|
|
1206
1244
|
"kind": "view",
|
|
@@ -1216,6 +1254,7 @@ exports[`corpus > 9. history-dead-locators — the expired path beside a healthy
|
|
|
1216
1254
|
"actionScope": null,
|
|
1217
1255
|
"attribution": null,
|
|
1218
1256
|
"channel": null,
|
|
1257
|
+
"diagnosis": null,
|
|
1219
1258
|
"expanded": true,
|
|
1220
1259
|
"key": "card.2",
|
|
1221
1260
|
"kind": "view",
|
|
@@ -1492,6 +1531,7 @@ exports[`corpus > 15. tools-around-a-view — the group SPLITS at the view's pos
|
|
|
1492
1531
|
"actionScope": null,
|
|
1493
1532
|
"attribution": "via ggui render",
|
|
1494
1533
|
"channel": "inline",
|
|
1534
|
+
"diagnosis": null,
|
|
1495
1535
|
"expanded": true,
|
|
1496
1536
|
"key": "view.t3",
|
|
1497
1537
|
"kind": "view",
|
|
@@ -1633,6 +1673,7 @@ exports[`corpus > 19. persisted-plus-live — the fold owns its trailing turns;
|
|
|
1633
1673
|
"actionScope": "ui://ggui/render/render_00000000-0000-4000-8000-300000000001/c0ffee",
|
|
1634
1674
|
"attribution": "via ggui render",
|
|
1635
1675
|
"channel": "locator",
|
|
1676
|
+
"diagnosis": null,
|
|
1636
1677
|
"expanded": true,
|
|
1637
1678
|
"key": "view.tA",
|
|
1638
1679
|
"kind": "view",
|
|
@@ -1676,6 +1717,7 @@ exports[`corpus > 19. persisted-plus-live — the fold owns its trailing turns;
|
|
|
1676
1717
|
"actionScope": "ui://ggui/render/old/1",
|
|
1677
1718
|
"attribution": null,
|
|
1678
1719
|
"channel": "locator",
|
|
1720
|
+
"diagnosis": null,
|
|
1679
1721
|
"expanded": true,
|
|
1680
1722
|
"key": "card.1",
|
|
1681
1723
|
"kind": "view",
|
|
@@ -1835,6 +1877,7 @@ exports[`corpus > 22. promoted-view — the stage's mount chips (guuey#204); oth
|
|
|
1835
1877
|
"actionScope": null,
|
|
1836
1878
|
"attribution": "via ggui render",
|
|
1837
1879
|
"channel": "inline",
|
|
1880
|
+
"diagnosis": null,
|
|
1838
1881
|
"expanded": true,
|
|
1839
1882
|
"key": "view.t1",
|
|
1840
1883
|
"kind": "view",
|
|
@@ -1902,6 +1945,7 @@ exports[`corpus > 23. meta-less-locator — a \`_meta\`-withholding producer's r
|
|
|
1902
1945
|
"actionScope": "ui://ggui/render/render_dark/h1",
|
|
1903
1946
|
"attribution": "via ggui render",
|
|
1904
1947
|
"channel": "locator",
|
|
1948
|
+
"diagnosis": null,
|
|
1905
1949
|
"expanded": true,
|
|
1906
1950
|
"key": "view.t1",
|
|
1907
1951
|
"kind": "view",
|
|
@@ -1946,6 +1990,7 @@ exports[`corpus > 24. prod-wire-ggui-render — ggui's production posture: no _m
|
|
|
1946
1990
|
"actionScope": "ui://ggui/render/render_5d11b1b4-75ba-44e5-81bb-0b420b86bb8e/7328555b44e72bd7",
|
|
1947
1991
|
"attribution": "via ggui render",
|
|
1948
1992
|
"channel": "locator",
|
|
1993
|
+
"diagnosis": null,
|
|
1949
1994
|
"expanded": true,
|
|
1950
1995
|
"key": "view.t1",
|
|
1951
1996
|
"kind": "view",
|
package/src/corpus/drive.ts
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
* `@silverprotocol/core` Reducer). Test-only plumbing — excluded from the
|
|
6
6
|
* build; the 3b live/history assemblers are the production twins.
|
|
7
7
|
*/
|
|
8
|
-
import { Reducer, type AgEvent } from "@silverprotocol/core";
|
|
8
|
+
import { Reducer, type AgEvent, type AgPausedAsk } from "@silverprotocol/core";
|
|
9
9
|
import type { InvokeTurnEvent } from "@guuey/agent-client";
|
|
10
|
+
import { hitlPromptsFromFold, type HitlAnswerRecord } from "../hitl.js";
|
|
10
11
|
import type { ProfilePromptInput, TranscriptInputs, TranscriptMessage } from "../types.js";
|
|
11
12
|
|
|
12
13
|
export interface DriveOptions {
|
|
@@ -21,8 +22,10 @@ export interface DriveOptions {
|
|
|
21
22
|
viewPhases?: TranscriptInputs["viewPhases"];
|
|
22
23
|
historyCards?: TranscriptInputs["historyCards"];
|
|
23
24
|
historyState?: TranscriptInputs["historyState"];
|
|
24
|
-
/** Resolve accumulated prompts to this state
|
|
25
|
+
/** Resolve accumulated link prompts to this state. */
|
|
25
26
|
promptState?: ProfilePromptInput["state"];
|
|
27
|
+
/** The host-side answer ledger for AgJSON hitl asks (fixture 4's answered leg). */
|
|
28
|
+
hitlAnswers?: Readonly<Record<string, HitlAnswerRecord>>;
|
|
26
29
|
}
|
|
27
30
|
|
|
28
31
|
export function driveTurn(events: InvokeTurnEvent[], opts: DriveOptions = {}): TranscriptInputs {
|
|
@@ -53,15 +56,6 @@ export function driveTurn(events: InvokeTurnEvent[], opts: DriveOptions = {}): T
|
|
|
53
56
|
error = { message: ev.message, code: ev.code };
|
|
54
57
|
status = "ready";
|
|
55
58
|
break;
|
|
56
|
-
case "profile-consent":
|
|
57
|
-
prompts.push({
|
|
58
|
-
id: `consent-${prompts.length}`,
|
|
59
|
-
kind: "consent",
|
|
60
|
-
appId: ev.request.appId,
|
|
61
|
-
requested: ev.request.requested,
|
|
62
|
-
state: opts.promptState ?? "pending",
|
|
63
|
-
});
|
|
64
|
-
break;
|
|
65
59
|
case "profile-link":
|
|
66
60
|
prompts.push({
|
|
67
61
|
id: `link-${prompts.length}`,
|
|
@@ -101,7 +95,9 @@ export function driveTurn(events: InvokeTurnEvent[], opts: DriveOptions = {}): T
|
|
|
101
95
|
statusElapsedMs: opts.statusElapsedMs ?? 0,
|
|
102
96
|
activeTool,
|
|
103
97
|
error,
|
|
104
|
-
|
|
98
|
+
// The link ledger + the AgJSON hitl asks lifted from the fold — the
|
|
99
|
+
// live assembler's exact composition (use-transcript.ts).
|
|
100
|
+
prompts: [...prompts, ...hitlPromptsFromFold(sawAgEvents ? reducer.result() : null, opts.hitlAnswers ?? {})],
|
|
105
101
|
messages,
|
|
106
102
|
...(opts.sendStates !== undefined ? { sendStates: opts.sendStates } : {}),
|
|
107
103
|
...(opts.viewPhases !== undefined ? { viewPhases: opts.viewPhases } : {}),
|
|
@@ -180,5 +176,40 @@ export function frame(
|
|
|
180
176
|
};
|
|
181
177
|
}
|
|
182
178
|
|
|
179
|
+
/**
|
|
180
|
+
* The runtime's cross-app profile consent ask (guuey#207) — the paused turn
|
|
181
|
+
* the pod appends AFTER the agent's own turn: `turn.start` → `hitl.ask` →
|
|
182
|
+
* `turn.done outcome:"paused"` carrying the same `AgPausedAsk`. Mirrors
|
|
183
|
+
* `nocode-runtime/src/profile-consent.ts` byte-for-byte in shape.
|
|
184
|
+
*/
|
|
185
|
+
export const CONSENT_ASK: AgPausedAsk = {
|
|
186
|
+
askId: "profile-consent:app-1:thread-corpus",
|
|
187
|
+
kind: "approval",
|
|
188
|
+
message: "Trip Planner wants to read your guuey profile — the notes agents keep about you across apps.",
|
|
189
|
+
grantModes: [
|
|
190
|
+
{ id: "always", label: "Always allow", description: "Every conversation with this agent" },
|
|
191
|
+
{ id: "once", label: "Allow this chat", description: "Only this conversation" },
|
|
192
|
+
],
|
|
193
|
+
metadata: { appId: "app-1", requested: "read" },
|
|
194
|
+
};
|
|
195
|
+
export function consentTurn(next: () => number, ask: AgPausedAsk = CONSENT_ASK): AgEvent[] {
|
|
196
|
+
const turnId = `${ask.askId}#turn`;
|
|
197
|
+
return [
|
|
198
|
+
{ type: "turn.start", threadId: THREAD, turnId, seq: next() },
|
|
199
|
+
{
|
|
200
|
+
type: "hitl.ask",
|
|
201
|
+
turnId,
|
|
202
|
+
askId: ask.askId,
|
|
203
|
+
kind: ask.kind,
|
|
204
|
+
...(ask.message !== undefined ? { message: ask.message } : {}),
|
|
205
|
+
...(ask.grantModes !== undefined ? { grantModes: ask.grantModes } : {}),
|
|
206
|
+
...(ask.metadata !== undefined ? { metadata: ask.metadata } : {}),
|
|
207
|
+
continuation: "turn",
|
|
208
|
+
seq: next(),
|
|
209
|
+
},
|
|
210
|
+
{ type: "turn.done", turnId, finishReason: "paused", outcome: { type: "paused", asks: [ask] }, seq: next() },
|
|
211
|
+
];
|
|
212
|
+
}
|
|
213
|
+
|
|
183
214
|
export const session: InvokeTurnEvent = { kind: "session", threadId: THREAD };
|
|
184
215
|
export const doneEvent: InvokeTurnEvent = { kind: "done", stopReason: "end_turn" };
|
package/src/corpus/fixtures.ts
CHANGED
|
@@ -13,6 +13,8 @@ import type { InvokeTurnEvent } from "@guuey/agent-client";
|
|
|
13
13
|
import type { TranscriptInputs } from "../types.js";
|
|
14
14
|
import {
|
|
15
15
|
boot,
|
|
16
|
+
CONSENT_ASK,
|
|
17
|
+
consentTurn,
|
|
16
18
|
doneEvent,
|
|
17
19
|
driveTurn,
|
|
18
20
|
frame,
|
|
@@ -81,17 +83,29 @@ export function coldStart(elapsedMs: number): TranscriptInputs {
|
|
|
81
83
|
return driveTurn([], { userText: "hi", finalStatus: "connecting", statusElapsedMs: elapsedMs });
|
|
82
84
|
}
|
|
83
85
|
|
|
84
|
-
/**
|
|
86
|
+
/**
|
|
87
|
+
* 4. consent-gate — R10 pending grant-mode card → answered one-line collapse.
|
|
88
|
+
* The pod's real shape (guuey#207): the agent turn runs WITHOUT the profile
|
|
89
|
+
* and closes, then the paused consent turn rides after it; the answered leg
|
|
90
|
+
* is the host ledger recording the picked mode (`resolved` + `always`).
|
|
91
|
+
*/
|
|
85
92
|
export function consentGate(state: "pending" | "answered"): TranscriptInputs {
|
|
86
93
|
const s = seqSource();
|
|
87
94
|
const events: InvokeTurnEvent[] = [
|
|
88
95
|
session,
|
|
89
96
|
frame(boot(s), { status: "thinking" }),
|
|
90
|
-
|
|
91
|
-
|
|
97
|
+
frame(textPart(s, "x", "Booked your usual — I couldn't see your profile yet."), {
|
|
98
|
+
status: "responding",
|
|
99
|
+
text: "Booked your usual — I couldn't see your profile yet.",
|
|
100
|
+
}),
|
|
101
|
+
frame([{ type: "message.end", id: "msg-corpus", seq: s() }, { type: "turn.done", turnId: "turn-corpus", finishReason: "stop", outcome: { type: "success" }, seq: s() }]),
|
|
102
|
+
frame(consentTurn(s)),
|
|
92
103
|
doneEvent,
|
|
93
104
|
];
|
|
94
|
-
return driveTurn(events, {
|
|
105
|
+
return driveTurn(events, {
|
|
106
|
+
userText: "book my usual",
|
|
107
|
+
...(state === "answered" ? { hitlAnswers: { [CONSENT_ASK.askId]: { status: "resolved", grantModeId: "always" } } } : {}),
|
|
108
|
+
});
|
|
95
109
|
}
|
|
96
110
|
|
|
97
111
|
/** 5. bypass-text-only — plan identical to a silver stream carrying only text. */
|
package/src/hitl.ts
CHANGED
|
@@ -19,6 +19,11 @@
|
|
|
19
19
|
* Answer states encode guuey's ratified dismissal ruling (#16): dismissal
|
|
20
20
|
* maps to `cancelled` (still-pending, re-askable — the card stays
|
|
21
21
|
* answerable), `declined` is the durable explicit deny.
|
|
22
|
+
*
|
|
23
|
+
* The first producer is the guuey runtime's cross-app profile consent
|
|
24
|
+
* (guuey#207): the pod appends a paused turn whose ask declares
|
|
25
|
+
* `grantModes: [always, once?]`; the host delivers the built answer through
|
|
26
|
+
* `@guuey/agent-client`'s `createHitlAnswerRelay` (`POST <pod>/agent/hitl-answer`).
|
|
22
27
|
*/
|
|
23
28
|
import {
|
|
24
29
|
validateHitlAnswer,
|
|
@@ -565,9 +565,7 @@ export function NativePrompt({ item, ctx }: ItemProps<PromptItem>): ReactNode {
|
|
|
565
565
|
style={{ backgroundColor: tokens.palette.surface, borderRadius: tokens.radius, padding: tokens.pad, gap: 8 }}
|
|
566
566
|
>
|
|
567
567
|
<Text style={{ color: tokens.palette.ink, fontSize: tokens.fontSize, fontFamily: tokens.fontFamily }}>
|
|
568
|
-
{item.
|
|
569
|
-
? `${item.appId} requests ${item.requested} access`
|
|
570
|
-
: `Link your account to ${item.appId}`}
|
|
568
|
+
{`Link your account to ${item.appId}`}
|
|
571
569
|
</Text>
|
|
572
570
|
<View style={{ flexDirection: "row", gap: 12 }}>
|
|
573
571
|
<Pressable accessibilityRole="button" onPress={() => ctx.onPromptAction?.(item, "accept")}>
|
package/src/plan.ts
CHANGED
|
@@ -272,7 +272,7 @@ function trustChannel(item: Pick<ViewMountItem, "mount" | "channel">): "inline"
|
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
function viewLabel(
|
|
275
|
-
item: Pick<ViewMountItem, "phase" | "channel" | "mount">,
|
|
275
|
+
item: Pick<ViewMountItem, "phase" | "channel" | "mount" | "diagnosis">,
|
|
276
276
|
policy: TranscriptPolicy,
|
|
277
277
|
): string | null {
|
|
278
278
|
const s = policy.strings;
|
|
@@ -284,6 +284,10 @@ function viewLabel(
|
|
|
284
284
|
case "expired":
|
|
285
285
|
return s.viewExpired;
|
|
286
286
|
case "no-handshake":
|
|
287
|
+
// The host's CSP tripwire outranks the channel heuristic (guuey#235):
|
|
288
|
+
// a blocked runtime never negotiates on ANY channel, and the verdict
|
|
289
|
+
// is actionable — name the blocked URI and the allowance.
|
|
290
|
+
if (item.diagnosis !== null) return s.viewCspBlocked(item.diagnosis);
|
|
287
291
|
// Channel-aware (R6): a ggui shell that never handshakes is a boot
|
|
288
292
|
// failure; inline tenant HTML may legitimately be a non-App document.
|
|
289
293
|
// Keyed on the TRUST channel (locators resolve to it by uri), not the
|
|
@@ -427,6 +431,7 @@ function planAssistantSource(
|
|
|
427
431
|
channel: mount.channel,
|
|
428
432
|
phase: inputs.viewPhases?.[viewKey] ?? "negotiating",
|
|
429
433
|
label: null,
|
|
434
|
+
diagnosis: inputs.viewDiagnoses?.[viewKey] ?? null,
|
|
430
435
|
attribution: policy.debugDetail ? null : policy.strings.viaTool(tool.title),
|
|
431
436
|
toolTitle: tool.title,
|
|
432
437
|
// `result` is narrowed by `mount !== undefined` above; the scope
|
|
@@ -823,6 +828,7 @@ export function planTranscript(
|
|
|
823
828
|
channel: mount?.channel ?? null,
|
|
824
829
|
phase: mount === undefined ? "expired" : (inputs.viewPhases?.[key] ?? "negotiating"),
|
|
825
830
|
label: null,
|
|
831
|
+
diagnosis: mount === undefined ? null : (inputs.viewDiagnoses?.[key] ?? null),
|
|
826
832
|
attribution: null,
|
|
827
833
|
toolTitle: null,
|
|
828
834
|
actionScope: scope,
|
|
@@ -832,7 +838,8 @@ export function planTranscript(
|
|
|
832
838
|
}
|
|
833
839
|
|
|
834
840
|
// R10 — prompts, in input order (narrow on `kind`: the guuey-wire
|
|
835
|
-
//
|
|
841
|
+
// link-invite arm vs the AgJSON hitl arm — spec draft.2; consent rides
|
|
842
|
+
// hitl since guuey#207).
|
|
836
843
|
for (const prompt of inputs.prompts) {
|
|
837
844
|
const key = `p.${prompt.id}`;
|
|
838
845
|
if (prompt.kind === "hitl") {
|
package/src/react/components.tsx
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
type ReactNode,
|
|
27
27
|
} from "react";
|
|
28
28
|
import { GuueyView, type GuueyViewProps } from "@guuey/mcp-apps-host/react";
|
|
29
|
-
import type { ResolvedViewMount, ViewHostPhase } from "@guuey/mcp-apps-host";
|
|
29
|
+
import type { ResolvedViewMount, ViewCspDiagnosis, ViewHostPhase } from "@guuey/mcp-apps-host";
|
|
30
30
|
import type { ChatStrings } from "../strings.js";
|
|
31
31
|
import type {
|
|
32
32
|
CitationsItem,
|
|
@@ -74,6 +74,12 @@ export interface TranscriptItemContext {
|
|
|
74
74
|
resolvedMounts: ReadonlyMap<ItemKey, ResolvedViewMount | "expired">;
|
|
75
75
|
/** R6: live phase reports wired back into the next plan. */
|
|
76
76
|
onViewPhase: (key: ItemKey, phase: ViewHostPhase) => void;
|
|
77
|
+
/**
|
|
78
|
+
* R6: the host's CSP tripwire diagnosed the embedding page blocking a
|
|
79
|
+
* view (guuey#235) — wired back so the label names the cause. Optional:
|
|
80
|
+
* a hand-wired host that omits it simply keeps the channel heuristic.
|
|
81
|
+
*/
|
|
82
|
+
onViewDiagnosis?: (key: ItemKey, diagnosis: ViewCspDiagnosis) => void;
|
|
77
83
|
/**
|
|
78
84
|
* guuey#204: a promoted-view reference chip was activated — the host
|
|
79
85
|
* focuses/reveals its stage (canvas). Absent ⇒ the chip renders as a
|
|
@@ -107,6 +113,7 @@ export type ViewSlotProps = Pick<
|
|
|
107
113
|
| "allow"
|
|
108
114
|
| "sandboxPageUrl"
|
|
109
115
|
| "autoResize"
|
|
116
|
+
| "cspOrigins"
|
|
110
117
|
>;
|
|
111
118
|
|
|
112
119
|
interface ItemProps<T> {
|
|
@@ -365,6 +372,7 @@ export function DefaultView({ item, ctx }: ItemProps<ViewMountItem>): ReactNode
|
|
|
365
372
|
mount={mount}
|
|
366
373
|
{...viewProps}
|
|
367
374
|
onPhaseChange={(phase) => ctx.onViewPhase(item.key, phase)}
|
|
375
|
+
onCspDiagnosis={(diagnosis) => ctx.onViewDiagnosis?.(item.key, diagnosis)}
|
|
368
376
|
/>
|
|
369
377
|
{item.attribution !== null ? (
|
|
370
378
|
<p className="guuey-chat-attribution">{item.attribution}</p>
|
|
@@ -580,11 +588,7 @@ export function DefaultPrompt({ item, ctx }: ItemProps<PromptItem>): ReactNode {
|
|
|
580
588
|
}
|
|
581
589
|
return (
|
|
582
590
|
<div className="guuey-chat-prompt" role="group">
|
|
583
|
-
<p className="guuey-chat-prompt-ask">
|
|
584
|
-
{item.promptKind === "consent"
|
|
585
|
-
? `${item.appId} requests ${item.requested} access`
|
|
586
|
-
: `Link your account to ${item.appId}`}
|
|
587
|
-
</p>
|
|
591
|
+
<p className="guuey-chat-prompt-ask">{`Link your account to ${item.appId}`}</p>
|
|
588
592
|
<div className="guuey-chat-prompt-actions">
|
|
589
593
|
<button
|
|
590
594
|
ref={firstAction}
|
package/src/react/guuey-chat.tsx
CHANGED
|
@@ -288,7 +288,7 @@ export const GuueyChat = forwardRef<GuueyChatHandle, GuueyChatProps>(function Gu
|
|
|
288
288
|
}, [preset, policyOverrides, stringOverrides]);
|
|
289
289
|
|
|
290
290
|
const { inputs, resolvePrompt, answerHitlPrompt } = useTranscriptInputs(invoke);
|
|
291
|
-
const { plan, toggle, resolvedMounts, onViewPhase } = useTranscript({
|
|
291
|
+
const { plan, toggle, resolvedMounts, onViewPhase, onViewDiagnosis } = useTranscript({
|
|
292
292
|
inputs,
|
|
293
293
|
policy,
|
|
294
294
|
...(effectiveReader !== undefined ? { reader: effectiveReader } : {}),
|
|
@@ -427,6 +427,7 @@ export const GuueyChat = forwardRef<GuueyChatHandle, GuueyChatProps>(function Gu
|
|
|
427
427
|
{...(onErrorAction !== undefined ? { onErrorAction } : {})}
|
|
428
428
|
resolvedMounts={resolvedMounts}
|
|
429
429
|
onViewPhase={onViewPhase}
|
|
430
|
+
onViewDiagnosis={onViewDiagnosis}
|
|
430
431
|
{...(viewProps !== undefined ? { viewProps } : {})}
|
|
431
432
|
/>
|
|
432
433
|
<form
|
package/src/react/transcript.tsx
CHANGED
|
@@ -46,7 +46,15 @@ export interface TranscriptWindowing {
|
|
|
46
46
|
export interface TranscriptProps
|
|
47
47
|
extends Pick<
|
|
48
48
|
TranscriptItemContext,
|
|
49
|
-
|
|
49
|
+
| "onToggle"
|
|
50
|
+
| "onRetry"
|
|
51
|
+
| "onPromptAction"
|
|
52
|
+
| "onErrorAction"
|
|
53
|
+
| "resolvedMounts"
|
|
54
|
+
| "onViewPhase"
|
|
55
|
+
| "onViewDiagnosis"
|
|
56
|
+
| "onViewRef"
|
|
57
|
+
| "viewProps"
|
|
50
58
|
> {
|
|
51
59
|
plan: TranscriptPlan;
|
|
52
60
|
/** Per-slot component overrides (spec §3's override column). */
|
|
@@ -77,6 +85,7 @@ export function Transcript(props: TranscriptProps): ReactNode {
|
|
|
77
85
|
onErrorAction,
|
|
78
86
|
resolvedMounts,
|
|
79
87
|
onViewPhase,
|
|
88
|
+
onViewDiagnosis,
|
|
80
89
|
onViewRef,
|
|
81
90
|
viewProps,
|
|
82
91
|
} = props;
|
|
@@ -86,8 +95,19 @@ export function Transcript(props: TranscriptProps): ReactNode {
|
|
|
86
95
|
[components],
|
|
87
96
|
);
|
|
88
97
|
const ctx: TranscriptItemContext = useMemo(
|
|
89
|
-
() => ({
|
|
90
|
-
|
|
98
|
+
() => ({
|
|
99
|
+
strings,
|
|
100
|
+
onToggle,
|
|
101
|
+
onRetry,
|
|
102
|
+
onPromptAction,
|
|
103
|
+
onErrorAction,
|
|
104
|
+
resolvedMounts,
|
|
105
|
+
onViewPhase,
|
|
106
|
+
onViewDiagnosis,
|
|
107
|
+
onViewRef,
|
|
108
|
+
viewProps,
|
|
109
|
+
}),
|
|
110
|
+
[strings, onToggle, onRetry, onPromptAction, onErrorAction, resolvedMounts, onViewPhase, onViewDiagnosis, onViewRef, viewProps],
|
|
91
111
|
);
|
|
92
112
|
|
|
93
113
|
// ── Windowing ────────────────────────────────────────────────────────
|