@guuey/host 0.16.11 → 0.16.12
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.map +1 -1
- package/dist/frameworks/claude-options.js +6 -2
- package/dist/frameworks/google-adk.d.ts.map +1 -1
- package/dist/frameworks/google-adk.js +5 -2
- package/dist/frameworks/openai.d.ts.map +1 -1
- package/dist/frameworks/openai.js +5 -2
- package/dist/preamble.d.ts +20 -0
- package/dist/preamble.d.ts.map +1 -1
- package/dist/preamble.js +27 -0
- package/package.json +3 -3
|
@@ -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,cAAc,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,EAIL,KAAK,UAAU,EACf,KAAK,aAAa,EACnB,MAAM,eAAe,CAAC;AAEvB,YAAY,EAAE,UAAU,EAAE,CAAC;AAa3B;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,mBAAmB,CAAC;AAC7C,eAAO,MAAM,WAAW,kBAAkB,CAAC;AAgG3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD;;;;GAIG;AACH,MAAM,MAAM,YAAY,GACpB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GACrF;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAA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|
// section (memory → profile → resources) — same framework-blind renderer
|
|
144
144
|
// family from ../preamble.js, gated on fsBound && resourceCount > 0.
|
|
145
|
-
buildResourcesSection(ctx)
|
|
145
|
+
buildResourcesSection(ctx) +
|
|
146
|
+
// guuey#556: the default response norms, LAST and unconditional —
|
|
147
|
+
// every hosted agent inherits them (see RESPONSE_NORMS_SECTION's doc
|
|
148
|
+
// for the confirm-gate carve-out + the per-court opt-out grammar).
|
|
149
|
+
RESPONSE_NORMS_SECTION;
|
|
146
150
|
const model = snapshot.model ?? DEFAULT_MODEL;
|
|
147
151
|
const maxTurns = snapshot.runtime?.maxTurns ?? DEFAULT_MAX_TURNS;
|
|
148
152
|
const fs = ctx.fs;
|
|
@@ -407,4 +411,4 @@ function dedupe(names) {
|
|
|
407
411
|
// `renderMemorySection` (the memory SAVE + RECALL block, memory-mcp T5) lives
|
|
408
412
|
// there too — framework-blind, so openai/adk render the identical section.
|
|
409
413
|
export { withContextPreamble } from "../preamble.js";
|
|
410
|
-
import { renderMemorySection, renderProfileSection, renderResourcesSection, withContextPreamble, } from "../preamble.js";
|
|
414
|
+
import { RESPONSE_NORMS_SECTION, renderMemorySection, renderProfileSection, renderResourcesSection, withContextPreamble, } from "../preamble.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google-adk.d.ts","sourceRoot":"","sources":["../../src/frameworks/google-adk.ts"],"names":[],"mappings":"AAsCA,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,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"google-adk.d.ts","sourceRoot":"","sources":["../../src/frameworks/google-adk.ts"],"names":[],"mappings":"AAsCA,OAAO,EAAgD,KAAK,YAAY,EAAE,MAAM,e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wBAAgB,YAAY,CAAC,IAAI,GAAE,aAAkB,GAAG,eAAe,CAoHtE"}
|
|
@@ -39,7 +39,7 @@ import { pathToFileURL } from "node:url";
|
|
|
39
39
|
import { GUUEY_DEFAULT_SYSTEM_PROMPT, defaultModelFor } from "@guuey/config";
|
|
40
40
|
import { listCredentials } from "@guuey/worker";
|
|
41
41
|
import { AGENT_ENTRY_ENV, WORKER_ROOT_ENV, loadAgentEntry, materializeAgent, nativeLoad, resolveAgentEntry, } from "../agent-entry.js";
|
|
42
|
-
import { renderMemorySection, renderProfileSection, renderResourcesSection, withContextPreamble, } from "../preamble.js";
|
|
42
|
+
import { RESPONSE_NORMS_SECTION, renderMemorySection, renderProfileSection, renderResourcesSection, withContextPreamble, } from "../preamble.js";
|
|
43
43
|
import { resolveSdkVersion } from "../sdk-version.js";
|
|
44
44
|
const ADK_FRAMEWORK = "google-adk";
|
|
45
45
|
/**
|
|
@@ -283,7 +283,10 @@ export function createRunner(deps = {}) {
|
|
|
283
283
|
withContextPreamble(snapshot.systemPrompt ?? GUUEY_DEFAULT_SYSTEM_PROMPT, turn.history, turn.priorMemory, turn.priorState) +
|
|
284
284
|
(memoryOn ? renderMemorySection(turn.userMemory) : "") +
|
|
285
285
|
(profileOn ? renderProfileSection(turn.profileSections, profileAccess) : "") +
|
|
286
|
-
(resourcesOn ? renderResourcesSection(resourceCount, turn.fs.app) : "")
|
|
286
|
+
(resourcesOn ? renderResourcesSection(resourceCount, turn.fs.app) : "") +
|
|
287
|
+
// guuey#556: default response norms, LAST and unconditional (see the
|
|
288
|
+
// constant's doc for the confirm-gate carve-out).
|
|
289
|
+
RESPONSE_NORMS_SECTION;
|
|
287
290
|
let agent;
|
|
288
291
|
try {
|
|
289
292
|
const toolsets = buildToolsets(adk, listCredentials(turn.fs)());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai.d.ts","sourceRoot":"","sources":["../../src/frameworks/openai.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;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@@
|
|
|
31
31
|
*/
|
|
32
32
|
import { Agent, MaxTurnsExceededError, MCPServerStreamableHttp, } from "@openai/agents";
|
|
33
33
|
import { resolveMcpServers, withContextPreamble, } from "./claude-options.js";
|
|
34
|
-
import { renderMemorySection, renderProfileSection, renderResourcesSection } from "../preamble.js";
|
|
34
|
+
import { RESPONSE_NORMS_SECTION, 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. */
|
|
@@ -116,7 +116,10 @@ export async function runInvokeOpenai(snapshot, invoke, runtime, emit, run) {
|
|
|
116
116
|
withContextPreamble(snapshot.systemPrompt ?? GUUEY_DEFAULT_SYSTEM_PROMPT, ctx.history, ctx.priorMemory, ctx.priorState) +
|
|
117
117
|
(memoryOn ? renderMemorySection(invoke.userMemory) : "") +
|
|
118
118
|
(profileOn ? renderProfileSection(invoke.profileSections, profileAccess) : "") +
|
|
119
|
-
(resourcesOn ? renderResourcesSection(resourceCount, invoke.fs.app) : "")
|
|
119
|
+
(resourcesOn ? renderResourcesSection(resourceCount, invoke.fs.app) : "") +
|
|
120
|
+
// guuey#556: default response norms, LAST and unconditional (see the
|
|
121
|
+
// constant's doc for the confirm-gate carve-out).
|
|
122
|
+
RESPONSE_NORMS_SECTION;
|
|
120
123
|
mcpServers = buildOpenaiMcpServers(ctx);
|
|
121
124
|
}
|
|
122
125
|
catch (err) {
|
package/dist/preamble.d.ts
CHANGED
|
@@ -122,4 +122,24 @@ export declare function renderProfileSection(sections: ProfileSection[] | undefi
|
|
|
122
122
|
* (mirrors the sibling renderers).
|
|
123
123
|
*/
|
|
124
124
|
export declare function renderResourcesSection(count: number, appDir: string): string;
|
|
125
|
+
/**
|
|
126
|
+
* The default response-norms section EVERY hosted agent inherits
|
|
127
|
+
* (guuey#556 — the founder's announce-day find: agents narrating
|
|
128
|
+
* render-loop internals to end-users, "Cache hit — same dashboard… no
|
|
129
|
+
* need to re-save").
|
|
130
|
+
*
|
|
131
|
+
* Unconditional and framework-blind: all three adapters append it last,
|
|
132
|
+
* byte-identically, so a fresh no-config agent speaks like a product from
|
|
133
|
+
* its first turn. The scope is DELIBERATELY narrow, per the cross-fleet
|
|
134
|
+
* seam agreed with ggui (their #440 latch semantics): the no-narration
|
|
135
|
+
* rule covers RENDER-LOOP INTERNALS ONLY — confirm-gates, HITL previews,
|
|
136
|
+
* and anything a tool explicitly puts in front of the user are
|
|
137
|
+
* user-content BY DESIGN and stay fully narrated, or a render that needs
|
|
138
|
+
* the user's eyes goes silent.
|
|
139
|
+
*
|
|
140
|
+
* Per-court opt-out (an owner/debug surface that WANTS mechanics) is the
|
|
141
|
+
* sanctioned extension: a #519/#527 agent-mode overlay appends a
|
|
142
|
+
* counter-norm for that court — this default never becomes conditional.
|
|
143
|
+
*/
|
|
144
|
+
export declare const RESPONSE_NORMS_SECTION: string;
|
|
125
145
|
//# 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,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,cAAc,EAAE,GAAG,SAAS,EACrC,WAAW,EAAE,iBAAiB,EAAE,GAAG,SAAS,EAC5C,UAAU,EAAE,SAAS,GAAG,SAAS,GAChC,MAAM,CAuCR;AAmCD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,U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;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,QAMF,CAAC;AAiBpC;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,MAAM,CAStE;AAsCD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,cAAc,EAAE,GAAG,SAAS,EACtC,MAAM,EAAE,aAAa,GACpB,MAAM,CAIR;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAO5E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,sBAAsB,QAQE,CAAC"}
|
package/dist/preamble.js
CHANGED
|
@@ -239,3 +239,30 @@ export function renderResourcesSection(count, appDir) {
|
|
|
239
239
|
`You have ${files} at ${appDir}/resources — the builder provided them for you. ` +
|
|
240
240
|
`Read them with your file tools when they're relevant to the question.`);
|
|
241
241
|
}
|
|
242
|
+
/**
|
|
243
|
+
* The default response-norms section EVERY hosted agent inherits
|
|
244
|
+
* (guuey#556 — the founder's announce-day find: agents narrating
|
|
245
|
+
* render-loop internals to end-users, "Cache hit — same dashboard… no
|
|
246
|
+
* need to re-save").
|
|
247
|
+
*
|
|
248
|
+
* Unconditional and framework-blind: all three adapters append it last,
|
|
249
|
+
* byte-identically, so a fresh no-config agent speaks like a product from
|
|
250
|
+
* its first turn. The scope is DELIBERATELY narrow, per the cross-fleet
|
|
251
|
+
* seam agreed with ggui (their #440 latch semantics): the no-narration
|
|
252
|
+
* rule covers RENDER-LOOP INTERNALS ONLY — confirm-gates, HITL previews,
|
|
253
|
+
* and anything a tool explicitly puts in front of the user are
|
|
254
|
+
* user-content BY DESIGN and stay fully narrated, or a render that needs
|
|
255
|
+
* the user's eyes goes silent.
|
|
256
|
+
*
|
|
257
|
+
* Per-court opt-out (an owner/debug surface that WANTS mechanics) is the
|
|
258
|
+
* sanctioned extension: a #519/#527 agent-mode overlay appends a
|
|
259
|
+
* counter-norm for that court — this default never becomes conditional.
|
|
260
|
+
*/
|
|
261
|
+
export const RESPONSE_NORMS_SECTION = `\n\n## Speaking to the user\n\n` +
|
|
262
|
+
`Your tools' mechanics are internal working, not conversation. Never narrate ` +
|
|
263
|
+
`cache hits, save or blueprint states, render plumbing, retries, tool names, or ` +
|
|
264
|
+
`bookkeeping to the user — say what you did or found in the user's own terms, ` +
|
|
265
|
+
`and when a step needs no mention, say nothing about it. One deliberate ` +
|
|
266
|
+
`exception: when a tool asks the user to confirm, authorize, or review ` +
|
|
267
|
+
`something, present that fully and clearly — approval prompts and previews ` +
|
|
268
|
+
`are for the user, never internal.`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guuey/host",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.12",
|
|
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,8 +22,8 @@
|
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@guuey/config": "0.16.
|
|
26
|
-
"@guuey/worker": "0.16.
|
|
25
|
+
"@guuey/config": "0.16.12",
|
|
26
|
+
"@guuey/worker": "0.16.12"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^24.0.0",
|