@guuey/host 0.16.15 → 0.16.16
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/frameworks/claude-options.d.ts +7 -0
- package/dist/frameworks/claude-options.d.ts.map +1 -1
- package/dist/frameworks/claude-options.js +7 -1
- package/dist/frameworks/claude.d.ts +7 -0
- package/dist/frameworks/claude.d.ts.map +1 -1
- package/dist/frameworks/claude.js +1 -0
- package/dist/frameworks/google-adk.d.ts.map +1 -1
- package/dist/frameworks/google-adk.js +15 -1
- package/dist/frameworks/openai.d.ts.map +1 -1
- package/dist/frameworks/openai.js +6 -1
- package/dist/preamble.d.ts +47 -0
- package/dist/preamble.d.ts.map +1 -1
- package/dist/preamble.js +60 -0
- package/package.json +11 -7
|
@@ -171,6 +171,13 @@ export interface BuildOptionsContext {
|
|
|
171
171
|
* `Invoke.resourceCount` in `@guuey/worker`.
|
|
172
172
|
*/
|
|
173
173
|
resourceCount?: number;
|
|
174
|
+
/**
|
|
175
|
+
* Whether the ggui generative-UI rail is ARMED this turn (guuey#630) — the
|
|
176
|
+
* Router sets it only when the ggui credential was actually written, so the
|
|
177
|
+
* generative-UI section never names a tool this turn cannot call. See
|
|
178
|
+
* `Invoke.gguiAttached` in `@guuey/worker`.
|
|
179
|
+
*/
|
|
180
|
+
gguiAttached?: boolean;
|
|
174
181
|
/**
|
|
175
182
|
* Returns every credential the Router broker wrote to
|
|
176
183
|
* `<sessionDir>/.guuey/credentials/` this invoke — one `{name, cred}` per
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-options.d.ts","sourceRoot":"","sources":["../../src/frameworks/claude-options.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAY,MAAM,gCAAgC,CAAC;AAChG,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,c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;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,+EAA+E;IAC/E,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,iHAAiH;IACjH,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,0FAA0F;IAC1F,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,4FAA4F;IAC5F,iBAAiB,EAAE,OAAO,CAAC;IAC3B,+DAA+D;IAC/D,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACjC;AAmCD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,UAAU,EACpB,mBAAmB,EAAE,SAAS,MAAM,EAAE,EACtC,OAAO,EAAE,OAAO,GACf,iBAAiB,CAkBnB;AAUD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -147,6 +147,12 @@ export function buildOptions(snapshot, ctx) {
|
|
|
147
147
|
// only by an explicit `agent.surfaceHints: false` (BYO plain-text
|
|
148
148
|
// surfaces). Before the norms, which stay LAST.
|
|
149
149
|
renderSurfaceSection(snapshot.surfaceHints) +
|
|
150
|
+
// guuey#630: the generative-UI section — DIRECTLY AFTER the surface
|
|
151
|
+
// section it qualifies ("use a table when comparing things" is right
|
|
152
|
+
// for a text answer, wrong for a shaped one). Gated inside the
|
|
153
|
+
// renderer on `gguiAttached` (the rail is really armed) AND the same
|
|
154
|
+
// `surfaceHints: false` BYO opt-out. Before the norms, which stay LAST.
|
|
155
|
+
renderGenerativeUiSection(ctx.gguiAttached, snapshot.surfaceHints) +
|
|
150
156
|
// guuey#556: the default response norms, LAST and unconditional —
|
|
151
157
|
// every hosted agent inherits them (see RESPONSE_NORMS_SECTION's doc
|
|
152
158
|
// for the confirm-gate carve-out + the per-court opt-out grammar).
|
|
@@ -415,4 +421,4 @@ function dedupe(names) {
|
|
|
415
421
|
// `renderMemorySection` (the memory SAVE + RECALL block, memory-mcp T5) lives
|
|
416
422
|
// there too — framework-blind, so openai/adk render the identical section.
|
|
417
423
|
export { withContextPreamble } from "../preamble.js";
|
|
418
|
-
import { RESPONSE_NORMS_SECTION, renderSurfaceSection, renderMemorySection, renderProfileSection, renderResourcesSection, withContextPreamble, } from "../preamble.js";
|
|
424
|
+
import { RESPONSE_NORMS_SECTION, renderSurfaceSection, renderGenerativeUiSection, renderMemorySection, renderProfileSection, renderResourcesSection, withContextPreamble, } from "../preamble.js";
|
|
@@ -58,6 +58,13 @@ export interface HostInvoke {
|
|
|
58
58
|
* {@link fsBound}. See `Invoke.resourceCount` in `@guuey/worker`.
|
|
59
59
|
*/
|
|
60
60
|
resourceCount?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Whether the ggui generative-UI rail is ARMED this turn (guuey#630) — set
|
|
63
|
+
* only when the ggui credential was actually written. Gates the
|
|
64
|
+
* generative-UI system-prompt section. See `Invoke.gguiAttached` in
|
|
65
|
+
* `@guuey/worker`.
|
|
66
|
+
*/
|
|
67
|
+
gguiAttached?: boolean;
|
|
61
68
|
}
|
|
62
69
|
/** Per-process config the worker resolves once at boot. */
|
|
63
70
|
export interface HostRuntime {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../src/frameworks/claude.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,EAAE,EACF,cAAc,EACd,QAAQ,EACR,SAAS,EACT,cAAc,EAEf,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,YAAY,EAEZ,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAQ7B;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,QAAQ,CAAC;IACnB,EAAE,EAAE,EAAE,CAAC;IACP;;;;OAIG;IACH,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Ac,CAAA;KAAE,CAAC,CAAC;CACtE;AAED,8EAA8E;AAC9E,MAAM,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;CAClB,KAAK,aAAa,CAAC,UAAU,CAAC,CAAC;AA0BhC;;;;GAIG;AACH,wBAAsB,SAAS,CAC7B,QAAQ,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,EACrE,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,OAAO,GACb,OAAO,CAAC,IAAI,CAAC,CAuDf"}
|
|
@@ -55,6 +55,7 @@ export async function runInvoke(snapshot, invoke, runtime, emit, query) {
|
|
|
55
55
|
...(invoke.profileAccess !== undefined ? { profileAccess: invoke.profileAccess } : {}),
|
|
56
56
|
...(invoke.profileSections !== undefined ? { profileSections: invoke.profileSections } : {}),
|
|
57
57
|
...(invoke.resourceCount !== undefined ? { resourceCount: invoke.resourceCount } : {}),
|
|
58
|
+
...(invoke.gguiAttached !== undefined ? { gguiAttached: invoke.gguiAttached } : {}),
|
|
58
59
|
};
|
|
59
60
|
options = buildOptions(snapshot, ctx);
|
|
60
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-adk.d.ts","sourceRoot":"","sources":["../../src/frameworks/google-adk.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"google-adk.d.ts","sourceRoot":"","sources":["../../src/frameworks/google-adk.ts"],"names":[],"mappings":"AA+CA,OAAO,EAAgD,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,EAAmB,KAAK,cAAc,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,KAAK,EAAE,eAAe,EAAE,Y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ool
|
|
18
18
|
* follow-ups (upstream adk-js#475); the pin is a mechanistically complete
|
|
19
19
|
* mitigation for arbitrary-depth tool loops.
|
|
20
|
+
* - **ADK 2.0 peer trap (guuey#657).** From `@google/adk@2.0.0` the MCP
|
|
21
|
+
* SDK (`@modelcontextprotocol/sdk`) is an OPTIONAL peer the ADK lazy-loads
|
|
22
|
+
* at `MCPToolset` connect — on 1.x it arrived transitively. Any install
|
|
23
|
+
* that runs this runner against ADK 2 must carry the SDK explicitly (the
|
|
24
|
+
* pod image, a code-mode project, a scaffold); `@guuey/host` declares it
|
|
25
|
+
* as an optional peer so package managers surface the gap. The adapter's
|
|
26
|
+
* structural slice below compiles unchanged against 2.0.0's typings, and
|
|
27
|
+
* `StreamingMode.SSE === "sse"` holds at runtime on both majors — the
|
|
28
|
+
* string this runner passes stays correct (pinned in the test).
|
|
20
29
|
* - **MCP = Streamable-HTTP only.** The JS `MCPToolset` speaks stdio +
|
|
21
30
|
* Streamable-HTTP; a `transport: "sse"` credential is REJECTED with an
|
|
22
31
|
* actionable error (the Python-era SSE arm has no JS mapping). Auth
|
|
@@ -39,7 +48,7 @@ import { pathToFileURL } from "node:url";
|
|
|
39
48
|
import { GUUEY_DEFAULT_SYSTEM_PROMPT, defaultModelFor } from "@guuey/config";
|
|
40
49
|
import { listCredentials } from "@guuey/worker";
|
|
41
50
|
import { AGENT_ENTRY_ENV, WORKER_ROOT_ENV, loadAgentEntry, materializeAgent, nativeLoad, resolveAgentEntry, } from "../agent-entry.js";
|
|
42
|
-
import { RESPONSE_NORMS_SECTION, renderSurfaceSection, renderMemorySection, renderProfileSection, renderResourcesSection, withContextPreamble, } from "../preamble.js";
|
|
51
|
+
import { RESPONSE_NORMS_SECTION, renderSurfaceSection, renderGenerativeUiSection, renderMemorySection, renderProfileSection, renderResourcesSection, withContextPreamble, } from "../preamble.js";
|
|
43
52
|
import { resolveSdkVersion } from "../sdk-version.js";
|
|
44
53
|
const ADK_FRAMEWORK = "google-adk";
|
|
45
54
|
/**
|
|
@@ -287,6 +296,11 @@ export function createRunner(deps = {}) {
|
|
|
287
296
|
// guuey#531: surface-formatting hints — default ON, only an explicit
|
|
288
297
|
// `agent.surfaceHints: false` suppresses. Before the norms (LAST).
|
|
289
298
|
renderSurfaceSection(snapshot.surfaceHints) +
|
|
299
|
+
// guuey#630: the generative-UI section — DIRECTLY AFTER the surface
|
|
300
|
+
// section it qualifies. Gated inside the renderer on `gguiAttached`
|
|
301
|
+
// (the rail is really armed this turn) AND the same `surfaceHints:
|
|
302
|
+
// false` BYO opt-out. Before the norms (LAST).
|
|
303
|
+
renderGenerativeUiSection(turn.gguiAttached, snapshot.surfaceHints) +
|
|
290
304
|
// guuey#556: default response norms, LAST and unconditional (see the
|
|
291
305
|
// constant's doc for the confirm-gate carve-out).
|
|
292
306
|
RESPONSE_NORMS_SECTION;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../src/frameworks/openai.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EACL,KAAK,EAIL,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,OAAO,EAAa,MAAM,eAAe,CAAC;AAUxD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAgD,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAsB9F;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAgB,SAAQ,aAAa,CAAC,cAAc,CAAC;IACpE,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,+EAA+E;IAC/E,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3C;AAED;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,CACxB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,M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,EAAE,UAAU,GAAG;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,EAC7C,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,WAAW,EACpB,IAAI,EAAE,OAAO,EACb,GAAG,EAAE,WAAW,GACf,OAAO,CAAC,IAAI,CAAC,CAqJf"}
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
*/
|
|
32
32
|
import { Agent, MaxTurnsExceededError, MCPServerStreamableHttp, } from "@openai/agents";
|
|
33
33
|
import { resolveMcpServers, withContextPreamble, } from "./claude-options.js";
|
|
34
|
-
import { RESPONSE_NORMS_SECTION, renderSurfaceSection, renderMemorySection, renderProfileSection, renderResourcesSection } from "../preamble.js";
|
|
34
|
+
import { RESPONSE_NORMS_SECTION, renderSurfaceSection, renderGenerativeUiSection, renderMemorySection, renderProfileSection, renderResourcesSection } from "../preamble.js";
|
|
35
35
|
import { GUUEY_DEFAULT_SYSTEM_PROMPT, defaultModelFor } from "@guuey/config";
|
|
36
36
|
import { resolveSdkVersion } from "../sdk-version.js";
|
|
37
37
|
/** The framework tag this arm runs — matches the `AgentFramework` enum value. */
|
|
@@ -120,6 +120,11 @@ export async function runInvokeOpenai(snapshot, invoke, runtime, emit, run) {
|
|
|
120
120
|
// guuey#531: surface-formatting hints — default ON, only an explicit
|
|
121
121
|
// `agent.surfaceHints: false` suppresses. Before the norms (LAST).
|
|
122
122
|
renderSurfaceSection(snapshot.surfaceHints) +
|
|
123
|
+
// guuey#630: the generative-UI section — DIRECTLY AFTER the surface
|
|
124
|
+
// section it qualifies. Gated inside the renderer on `gguiAttached`
|
|
125
|
+
// (the rail is really armed this turn) AND the same `surfaceHints:
|
|
126
|
+
// false` BYO opt-out. Before the norms (LAST).
|
|
127
|
+
renderGenerativeUiSection(invoke.gguiAttached, snapshot.surfaceHints) +
|
|
123
128
|
// guuey#556: default response norms, LAST and unconditional (see the
|
|
124
129
|
// constant's doc for the confirm-gate carve-out).
|
|
125
130
|
RESPONSE_NORMS_SECTION;
|
package/dist/preamble.d.ts
CHANGED
|
@@ -168,5 +168,52 @@ export declare const SURFACE_FORMATTING_SECTION: string;
|
|
|
168
168
|
* explicit `false` suppresses. Framework-blind like every sibling.
|
|
169
169
|
*/
|
|
170
170
|
export declare function renderSurfaceSection(surfaceHints: boolean | undefined): string;
|
|
171
|
+
/**
|
|
172
|
+
* The generative-UI section (guuey#630) — WHEN a drawn card beats prose,
|
|
173
|
+
* for an agent whose ggui render rail is actually armed this turn.
|
|
174
|
+
*
|
|
175
|
+
* Why it exists: a briefed agent supplies its own `systemPrompt`, which
|
|
176
|
+
* REPLACES {@link GUUEY_DEFAULT_SYSTEM_PROMPT} wholesale, and the only
|
|
177
|
+
* "show, don't tell" text the platform owned lived in the CODE-path
|
|
178
|
+
* scaffold (`@guuey/config`'s `GUUEY_SCAFFOLD_SYSTEM_PROMPT` →
|
|
179
|
+
* `create-agentic-app`'s `prompts/system.md`), which a no-code /
|
|
180
|
+
* console-briefed agent never sees. So the ggui rail was attached to
|
|
181
|
+
* every default agent while nothing told the model to reach for it —
|
|
182
|
+
* "attached but never invoked". ir's #630 receipt: a briefed wizard agent
|
|
183
|
+
* answered a menu-shaped ask as a clean markdown table with zero cards,
|
|
184
|
+
* on the Playground AND the portal.
|
|
185
|
+
*
|
|
186
|
+
* It sits DIRECTLY AFTER {@link SURFACE_FORMATTING_SECTION} on purpose.
|
|
187
|
+
* That section ends with "Tables render natively — use one when comparing
|
|
188
|
+
* things", which is true for a text answer and is exactly the nudge that
|
|
189
|
+
* loses a shaped answer to a table; this section is the qualifier, and
|
|
190
|
+
* qualifiers only work downstream of what they qualify.
|
|
191
|
+
*
|
|
192
|
+
* TWO gates, both owned here so all three adapters stay byte-identical:
|
|
193
|
+
* - `gguiAttached` — the memory-mcp T5 lesson, restated for renders: the
|
|
194
|
+
* Router only sets it when the ggui credential was actually WRITTEN
|
|
195
|
+
* this turn, so the section can never name a tool the model has no
|
|
196
|
+
* rail to call. A `ggui: false` opt-out, a swapped-in non-ggui server,
|
|
197
|
+
* a broker failure and a no-layers turn all render nothing.
|
|
198
|
+
* - `surfaceHints === false` — the guuey#531 BYO-surface opt-out. A
|
|
199
|
+
* plain-text court (SMS, voice) that has opted out of markdown cannot
|
|
200
|
+
* show a card either, so it must not be told to draw one.
|
|
201
|
+
*
|
|
202
|
+
* The tool is named by its BARE name (`ggui_render`): the SDK namespaces
|
|
203
|
+
* MCP tools `mcp__<serverKey>__<tool>` and the ggui server key is the
|
|
204
|
+
* builder's to rename, so the bare name is the only spelling that is true
|
|
205
|
+
* under every key. The three-tool flow (`ggui_handshake` → `ggui_render`
|
|
206
|
+
* → `ggui_update` / `ggui_consume`) is deliberately NOT restated here —
|
|
207
|
+
* the tools' own descriptions own it, and duplicating protocol mechanics
|
|
208
|
+
* in a platform section is how they rot.
|
|
209
|
+
*/
|
|
210
|
+
export declare const GENERATIVE_UI_SECTION: string;
|
|
211
|
+
/**
|
|
212
|
+
* Render the generative-UI section honoring both gates (guuey#630) — see
|
|
213
|
+
* {@link GENERATIVE_UI_SECTION}. Framework-blind like every sibling:
|
|
214
|
+
* Claude, OpenAI and ADK call this identically, so the section is
|
|
215
|
+
* byte-identical across frameworks (pinned in `preamble.test.ts`).
|
|
216
|
+
*/
|
|
217
|
+
export declare function renderGenerativeUiSection(gguiAttached: boolean | undefined, surfaceHints: boolean | undefined): string;
|
|
171
218
|
export declare const RESPONSE_NORMS_SECTION: string;
|
|
172
219
|
//# sourceMappingURL=preamble.d.ts.map
|
package/dist/preamble.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preamble.d.ts","sourceRoot":"","sources":["../src/preamble.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAClG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,w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EAAE,OAAO,GAAG,SAAS,EACjC,YAAY,EAAE,OAAO,GAAG,SAAS,GAChC,MAAM,CAGR;AAED,eAAO,MAAM,sBAAsB,QAQE,CAAC"}
|
package/dist/preamble.js
CHANGED
|
@@ -292,6 +292,66 @@ export const SURFACE_FORMATTING_SECTION = `\n\n## Your rendering surface\n\n` +
|
|
|
292
292
|
export function renderSurfaceSection(surfaceHints) {
|
|
293
293
|
return surfaceHints === false ? "" : SURFACE_FORMATTING_SECTION;
|
|
294
294
|
}
|
|
295
|
+
/**
|
|
296
|
+
* The generative-UI section (guuey#630) — WHEN a drawn card beats prose,
|
|
297
|
+
* for an agent whose ggui render rail is actually armed this turn.
|
|
298
|
+
*
|
|
299
|
+
* Why it exists: a briefed agent supplies its own `systemPrompt`, which
|
|
300
|
+
* REPLACES {@link GUUEY_DEFAULT_SYSTEM_PROMPT} wholesale, and the only
|
|
301
|
+
* "show, don't tell" text the platform owned lived in the CODE-path
|
|
302
|
+
* scaffold (`@guuey/config`'s `GUUEY_SCAFFOLD_SYSTEM_PROMPT` →
|
|
303
|
+
* `create-agentic-app`'s `prompts/system.md`), which a no-code /
|
|
304
|
+
* console-briefed agent never sees. So the ggui rail was attached to
|
|
305
|
+
* every default agent while nothing told the model to reach for it —
|
|
306
|
+
* "attached but never invoked". ir's #630 receipt: a briefed wizard agent
|
|
307
|
+
* answered a menu-shaped ask as a clean markdown table with zero cards,
|
|
308
|
+
* on the Playground AND the portal.
|
|
309
|
+
*
|
|
310
|
+
* It sits DIRECTLY AFTER {@link SURFACE_FORMATTING_SECTION} on purpose.
|
|
311
|
+
* That section ends with "Tables render natively — use one when comparing
|
|
312
|
+
* things", which is true for a text answer and is exactly the nudge that
|
|
313
|
+
* loses a shaped answer to a table; this section is the qualifier, and
|
|
314
|
+
* qualifiers only work downstream of what they qualify.
|
|
315
|
+
*
|
|
316
|
+
* TWO gates, both owned here so all three adapters stay byte-identical:
|
|
317
|
+
* - `gguiAttached` — the memory-mcp T5 lesson, restated for renders: the
|
|
318
|
+
* Router only sets it when the ggui credential was actually WRITTEN
|
|
319
|
+
* this turn, so the section can never name a tool the model has no
|
|
320
|
+
* rail to call. A `ggui: false` opt-out, a swapped-in non-ggui server,
|
|
321
|
+
* a broker failure and a no-layers turn all render nothing.
|
|
322
|
+
* - `surfaceHints === false` — the guuey#531 BYO-surface opt-out. A
|
|
323
|
+
* plain-text court (SMS, voice) that has opted out of markdown cannot
|
|
324
|
+
* show a card either, so it must not be told to draw one.
|
|
325
|
+
*
|
|
326
|
+
* The tool is named by its BARE name (`ggui_render`): the SDK namespaces
|
|
327
|
+
* MCP tools `mcp__<serverKey>__<tool>` and the ggui server key is the
|
|
328
|
+
* builder's to rename, so the bare name is the only spelling that is true
|
|
329
|
+
* under every key. The three-tool flow (`ggui_handshake` → `ggui_render`
|
|
330
|
+
* → `ggui_update` / `ggui_consume`) is deliberately NOT restated here —
|
|
331
|
+
* the tools' own descriptions own it, and duplicating protocol mechanics
|
|
332
|
+
* in a platform section is how they rot.
|
|
333
|
+
*/
|
|
334
|
+
export const GENERATIVE_UI_SECTION = `\n\n## Drawing the answer\n\n` +
|
|
335
|
+
`You have the ggui generative-UI tools: \`ggui_render\` draws a real ` +
|
|
336
|
+
`interactive card on this surface. When an answer has a SHAPE — a menu, a ` +
|
|
337
|
+
`price list, a schedule, a set of options, a comparison, a form to fill in, ` +
|
|
338
|
+
`an order or booking to confirm — draw it with \`ggui_render\` rather than ` +
|
|
339
|
+
`writing a markdown table, and keep a line or two of plain text beside it. ` +
|
|
340
|
+
`Prose stays prose: one-line answers, a yes or no, a clarifying question, an ` +
|
|
341
|
+
`explanation. Follow the ggui tools' own descriptions for how to render and ` +
|
|
342
|
+
`update, and put only data you actually have on a card — never invent rows ` +
|
|
343
|
+
`to fill one out.`;
|
|
344
|
+
/**
|
|
345
|
+
* Render the generative-UI section honoring both gates (guuey#630) — see
|
|
346
|
+
* {@link GENERATIVE_UI_SECTION}. Framework-blind like every sibling:
|
|
347
|
+
* Claude, OpenAI and ADK call this identically, so the section is
|
|
348
|
+
* byte-identical across frameworks (pinned in `preamble.test.ts`).
|
|
349
|
+
*/
|
|
350
|
+
export function renderGenerativeUiSection(gguiAttached, surfaceHints) {
|
|
351
|
+
if (gguiAttached !== true || surfaceHints === false)
|
|
352
|
+
return "";
|
|
353
|
+
return GENERATIVE_UI_SECTION;
|
|
354
|
+
}
|
|
295
355
|
export const RESPONSE_NORMS_SECTION = `\n\n## Speaking to the user\n\n` +
|
|
296
356
|
`Your tools' mechanics are internal working, not conversation. Never narrate ` +
|
|
297
357
|
`cache hits, save or blueprint states, render plumbing, retries, tool names, or ` +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guuey/host",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.16",
|
|
4
4
|
"description": "The universal config-driven Guuey worker. Reads the resolved agent.json snapshot, runs the Claude Agent SDK, and emits each native SDKMessage to fd-3 as a `native` WorkerEvent.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@guuey/config": "0.16.
|
|
26
|
-
"@guuey/worker": "0.16.
|
|
25
|
+
"@guuey/config": "0.16.16",
|
|
26
|
+
"@guuey/worker": "0.16.16"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^24.0.0",
|
|
30
30
|
"typescript": "^5.0.0",
|
|
31
31
|
"vitest": "^3.2.7",
|
|
32
|
-
"@anthropic-ai/claude-agent-sdk": "0.3.
|
|
32
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.258",
|
|
33
33
|
"@openai/agents": "0.17.0",
|
|
34
|
-
"@google/adk": "
|
|
34
|
+
"@google/adk": "1.6.0"
|
|
35
35
|
},
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
@@ -54,8 +54,9 @@
|
|
|
54
54
|
"homepage": "https://guuey.com",
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@anthropic-ai/claude-agent-sdk": "^0.3.199",
|
|
57
|
-
"@google/adk": ">=1.0.0 <
|
|
58
|
-
"@openai/agents": ">=0.12.0 <0.18"
|
|
57
|
+
"@google/adk": ">=1.0.0 <3",
|
|
58
|
+
"@openai/agents": ">=0.12.0 <0.18",
|
|
59
|
+
"@modelcontextprotocol/sdk": "^1.26.0"
|
|
59
60
|
},
|
|
60
61
|
"peerDependenciesMeta": {
|
|
61
62
|
"@anthropic-ai/claude-agent-sdk": {
|
|
@@ -66,6 +67,9 @@
|
|
|
66
67
|
},
|
|
67
68
|
"@openai/agents": {
|
|
68
69
|
"optional": true
|
|
70
|
+
},
|
|
71
|
+
"@modelcontextprotocol/sdk": {
|
|
72
|
+
"optional": true
|
|
69
73
|
}
|
|
70
74
|
},
|
|
71
75
|
"scripts": {
|