@guuey/host 0.16.5 → 0.16.6

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.
@@ -160,6 +160,17 @@ export interface BuildOptionsContext {
160
160
  /** The user's cross-app profile sections for the RECALL push (cross-app-profile
161
161
  * T7), read Router-side. Gated by {@link profileAccess}. */
162
162
  profileSections?: ProfileSection[];
163
+ /**
164
+ * How many builder-provided reference files sit at `<fs.app>/resources` this
165
+ * turn (guuey#456 B4) — counted Router-side at invoke assembly and written
166
+ * onto the wire only when the layers are REAL and the count is positive.
167
+ * Gates the app-resources system-prompt section
168
+ * ({@link buildResourcesSection}) together with {@link fsBound}, so the hint
169
+ * never renders on a turn whose file tools are off (the memory-mcp T5
170
+ * lesson: gate on the real signal, never on `fs` presence). See
171
+ * `Invoke.resourceCount` in `@guuey/worker`.
172
+ */
173
+ resourceCount?: number;
163
174
  /**
164
175
  * Returns every credential the Router broker wrote to
165
176
  * `<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,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;AA6E3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD;;;;GAIG;AACH,MA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;;GAIG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,mBAAmB,GAAG,OAAO,CAqLpF;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,EAAE,UACiC,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,UAAU,CAU5E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAgBxF;AAED;;;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"}
@@ -90,6 +90,25 @@ function buildProfileSection(ctx) {
90
90
  return "";
91
91
  return renderProfileSection(ctx.profileSections, ctx.profileAccess);
92
92
  }
93
+ /**
94
+ * Build the app-resources system-prompt section (guuey#456 B4) — the hint
95
+ * that builder-provided reference files exist at `<fs.app>/resources`. SIBLING
96
+ * of {@link buildMemorySection}/{@link buildProfileSection}, appended AFTER
97
+ * the profile section. Gated on {@link BuildOptionsContext.fsBound} — the
98
+ * REAL "file tools are armed" signal (guuey#234), never `fs` presence — AND a
99
+ * positive {@link BuildOptionsContext.resourceCount} (the Router only writes
100
+ * it when > 0; re-checked here fail-closed). Deliberately NOT auth-gated: the
101
+ * app layer is shared, public-by-definition content — guests read it too.
102
+ * Delegates to the framework-neutral {@link renderResourcesSection}
103
+ * (`../preamble.js`) so Claude, OpenAI, and ADK render the IDENTICAL section.
104
+ * Returns `""` (append-safe) when out of scope.
105
+ */
106
+ function buildResourcesSection(ctx) {
107
+ const count = ctx.resourceCount;
108
+ if (ctx.fsBound !== true || count === undefined || count <= 0 || ctx.fs === undefined)
109
+ return "";
110
+ return renderResourcesSection(count, ctx.fs.app);
111
+ }
93
112
  /**
94
113
  * Build the Claude Agent SDK `Options` for one invoke. Pure: all disk/env access
95
114
  * is injected via {@link BuildOptionsContext}. Throws on an unresolved `{file}`
@@ -119,7 +138,11 @@ export function buildOptions(snapshot, ctx) {
119
138
  // cross-app-profile T7: the profile section is a SIBLING of the memory
120
139
  // section, appended AFTER it (memory first, then profile). Both are
121
140
  // framework-blind renderers from ../preamble.js.
122
- buildProfileSection(ctx);
141
+ buildProfileSection(ctx) +
142
+ // guuey#456 B4: the app-resources hint, appended AFTER the profile
143
+ // section (memory → profile → resources) — same framework-blind renderer
144
+ // family from ../preamble.js, gated on fsBound && resourceCount > 0.
145
+ buildResourcesSection(ctx);
123
146
  const model = snapshot.model ?? DEFAULT_MODEL;
124
147
  const maxTurns = snapshot.runtime?.maxTurns ?? DEFAULT_MAX_TURNS;
125
148
  const fs = ctx.fs;
@@ -384,4 +407,4 @@ function dedupe(names) {
384
407
  // `renderMemorySection` (the memory SAVE + RECALL block, memory-mcp T5) lives
385
408
  // there too — framework-blind, so openai/adk render the identical section.
386
409
  export { withContextPreamble } from "../preamble.js";
387
- import { renderMemorySection, renderProfileSection, withContextPreamble } from "../preamble.js";
410
+ import { renderMemorySection, renderProfileSection, renderResourcesSection, withContextPreamble, } from "../preamble.js";
@@ -51,6 +51,13 @@ export interface HostInvoke {
51
51
  /** The user's cross-app profile sections for the RECALL push (cross-app-profile
52
52
  * T7). See `Invoke.profileSections` in `@guuey/worker`. */
53
53
  profileSections?: ProfileSection[];
54
+ /**
55
+ * How many builder-provided reference files sit at `<fs.app>/resources` this
56
+ * turn (guuey#456 B4) — present only when the layers are REAL and the count
57
+ * is positive. Gates the app-resources system-prompt section together with
58
+ * {@link fsBound}. See `Invoke.resourceCount` in `@guuey/worker`.
59
+ */
60
+ resourceCount?: number;
54
61
  }
55
62
  /** Per-process config the worker resolves once at boot. */
56
63
  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,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAClC,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IACtC;gEAC4D;IAC5D,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;CACpC;AAED,2DAA2D;A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f"}
@@ -54,6 +54,7 @@ export async function runInvoke(snapshot, invoke, runtime, emit, query) {
54
54
  ...(invoke.memoryAttached !== undefined ? { memoryAttached: invoke.memoryAttached } : {}),
55
55
  ...(invoke.profileAccess !== undefined ? { profileAccess: invoke.profileAccess } : {}),
56
56
  ...(invoke.profileSections !== undefined ? { profileSections: invoke.profileSections } : {}),
57
+ ...(invoke.resourceCount !== undefined ? { resourceCount: invoke.resourceCount } : {}),
57
58
  };
58
59
  options = buildOptions(snapshot, ctx);
59
60
  }
@@ -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;AAc3E;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAsB9E;AAYD;;;;;GAKG;AACH,UAAU,SAAS;IACjB,QAAQ,EAAE,KAAK,MAAM,EAAE;QACrB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QAWd,WAAW,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAC;QACrC,KAAK,EAAE,OAAO,EAAE,CAAC;KAClB,KAAK,QAAQ,CAAC;IACf,cAAc,EAAE,KAAK,MAAM,EAAE;QAAE,KAAK,EAAE,QAAQ,CAAA;KAAE,KAAK,SAAS,CAAC;IAC/D,UAAU,EAAE,KAAK,gBAAgB,EAAE;QACjC,IAAI,EAAE,gCAAgC,CAAC;QACvC,GAAG,EAAE,MAAM,CAAC;QACZ,gBAAgB,CAAC,EAAE;YAAE,WAAW,CAAC,EAA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,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,cAAc,CAAA;CAAE,CAAC,GACnD,OAAO,EAAE,CAcX;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM,CAapD;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAC9B,GAAG,EAAE,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,EACtC,KAAK,EAAE,QAAQ,EACf,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,OAAO,EACb,UAAU,EAAE,MAAM,GAAG,IAAI,GACxB,OAAO,CAAC,IAAI,CAAC,CA6Bf;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,YAAY,EACtB,IAAI,EAAE,QAAQ,EACd,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,OAAO,EAAE,GACrB,YAAY,CAWd;AAED,sEAAsE;AACtE,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,OAAO,OAAO,CAAC;CACvB;AAED,wBAAgB,YAAY,CAAC,IAAI,GAAE,aAAkB,GAAG,eAAe,CAiHtE"}
@@ -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, withContextPreamble } from "../preamble.js";
42
+ import { renderMemorySection, renderProfileSection, renderResourcesSection, withContextPreamble, } from "../preamble.js";
43
43
  import { resolveSdkVersion } from "../sdk-version.js";
44
44
  const ADK_FRAMEWORK = "google-adk";
45
45
  /**
@@ -267,13 +267,23 @@ export function createRunner(deps = {}) {
267
267
  // to a const so the truthy branch narrows it to the required `ProfileAccess`.
268
268
  const profileAccess = turn.profileAccess;
269
269
  const profileOn = turn.identity.authMode === "authenticated" && profileAccess !== undefined;
270
+ // guuey#456 B4: the app-resources hint is a SIBLING of the memory/
271
+ // profile sections, appended AFTER the profile section. Gated on
272
+ // `fsBound && resourceCount > 0` — `fsBound` is the REAL "file tools
273
+ // are armed" signal (guuey#234), so the hint never names files the
274
+ // model has no tools to read; deliberately NOT auth-gated (the app
275
+ // layer is shared, public-by-definition content). `resourceCount` is
276
+ // aliased to a const so the truthy branch narrows it.
277
+ const resourceCount = turn.resourceCount;
278
+ const resourcesOn = turn.fsBound === true && resourceCount !== undefined && resourceCount > 0;
270
279
  const instruction =
271
280
  // Prompt-less snapshots run the platform default — same fallback as
272
281
  // the claude and openai arms (this arm used to fall back to "",
273
282
  // leaving google-adk agents effectively promptless).
274
283
  withContextPreamble(snapshot.systemPrompt ?? GUUEY_DEFAULT_SYSTEM_PROMPT, turn.history, turn.priorMemory, turn.priorState) +
275
284
  (memoryOn ? renderMemorySection(turn.userMemory) : "") +
276
- (profileOn ? renderProfileSection(turn.profileSections, profileAccess) : "");
285
+ (profileOn ? renderProfileSection(turn.profileSections, profileAccess) : "") +
286
+ (resourcesOn ? renderResourcesSection(resourceCount, turn.fs.app) : "");
277
287
  let agent;
278
288
  try {
279
289
  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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EACL,KAAK,EAIL,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,OAAO,EAAa,MAAM,eAAe,CAAC;AAQxD,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAgD,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAsB9F;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAg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C;AAED;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,CACxB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,EAAE;IAAE,MAAM,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,KACzC,OAAO,CAAC,eAAe,CAAC,CAAC;AAgB9B;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,QAAQ,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,CA0If"}
@@ -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 { renderMemorySection, renderProfileSection } from "../preamble.js";
34
+ import { 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. */
@@ -103,10 +103,20 @@ export async function runInvokeOpenai(snapshot, invoke, runtime, emit, run) {
103
103
  // it to the non-undefined `ProfileAccess` the renderer requires.
104
104
  const profileAccess = invoke.profileAccess;
105
105
  const profileOn = invoke.identity.authMode === "authenticated" && profileAccess !== undefined;
106
+ // guuey#456 B4: the app-resources hint is a SIBLING of the memory/profile
107
+ // sections, appended AFTER the profile section. Gated on `fsBound &&
108
+ // resourceCount > 0` — `fsBound` is the REAL "file tools are armed"
109
+ // signal (guuey#234), so the hint never names files the model has no
110
+ // tools to read; deliberately NOT auth-gated (the app layer is shared,
111
+ // public-by-definition content). `resourceCount` is aliased to a const so
112
+ // the truthy branch narrows it to the `number` the renderer requires.
113
+ const resourceCount = invoke.resourceCount;
114
+ const resourcesOn = invoke.fsBound === true && resourceCount !== undefined && resourceCount > 0;
106
115
  instructions =
107
116
  withContextPreamble(snapshot.systemPrompt ?? GUUEY_DEFAULT_SYSTEM_PROMPT, ctx.history, ctx.priorMemory, ctx.priorState) +
108
117
  (memoryOn ? renderMemorySection(invoke.userMemory) : "") +
109
- (profileOn ? renderProfileSection(invoke.profileSections, profileAccess) : "");
118
+ (profileOn ? renderProfileSection(invoke.profileSections, profileAccess) : "") +
119
+ (resourcesOn ? renderResourcesSection(resourceCount, invoke.fs.app) : "");
110
120
  mcpServers = buildOpenaiMcpServers(ctx);
111
121
  }
112
122
  catch (err) {
@@ -99,4 +99,27 @@ export declare function renderProfileRecall(sections: ProfileSection[]): string;
99
99
  * A `read` grant with no sections renders `""` (nothing to say).
100
100
  */
101
101
  export declare function renderProfileSection(sections: ProfileSection[] | undefined, access: ProfileAccess): string;
102
+ /**
103
+ * Render the app-resources system-prompt section (guuey#456 B4) — the hint
104
+ * that the builder-provided reference files exist. SIBLING of
105
+ * {@link renderMemorySection}/{@link renderProfileSection}: framework-BLIND,
106
+ * one string built once, appended AFTER the profile section by all three
107
+ * adapters (Claude `claude-options.ts`, OpenAI `openai.ts`, google-adk
108
+ * `google-adk.ts`) — byte-identical, pinned in `preamble.test.ts`.
109
+ *
110
+ * ONE gate, owned by the CALLER (all three adapters identically):
111
+ * `fsBound && resourceCount > 0` — the memory-mcp T5 lesson restated for
112
+ * files: `fsBound` is the REAL "file tools are armed" signal (guuey#234), so
113
+ * the hint can never name files the model has no tools to read, and a count
114
+ * of 0/absent (the normal no-resources state) renders nothing. Deliberately
115
+ * NOT auth-gated: the app layer is shared, public-by-definition content —
116
+ * guests read it too.
117
+ *
118
+ * `appDir` is the app mount AS THE WORKER SEES IT — the invoke's own
119
+ * `fs.app` (`/app` in the hosted sandbox; the real host path on a bare dev
120
+ * run) — so the hint always names a directory the file tools can actually
121
+ * open. Leading `\n\n` so it appends cleanly after the profile section
122
+ * (mirrors the sibling renderers).
123
+ */
124
+ export declare function renderResourcesSection(count: number, appDir: string): string;
102
125
  //# sourceMappingURL=preamble.d.ts.map
@@ -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,UAAU,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAE1E;AAED;;;;;;;;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"}
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,UAAU,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAE1E;AAED;;;;;;;;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"}
package/dist/preamble.js CHANGED
@@ -211,3 +211,31 @@ export function renderProfileSection(sections, access) {
211
211
  const recall = sections && sections.length > 0 ? renderProfileRecall(sections) : "";
212
212
  return `${save}${recall}`;
213
213
  }
214
+ /**
215
+ * Render the app-resources system-prompt section (guuey#456 B4) — the hint
216
+ * that the builder-provided reference files exist. SIBLING of
217
+ * {@link renderMemorySection}/{@link renderProfileSection}: framework-BLIND,
218
+ * one string built once, appended AFTER the profile section by all three
219
+ * adapters (Claude `claude-options.ts`, OpenAI `openai.ts`, google-adk
220
+ * `google-adk.ts`) — byte-identical, pinned in `preamble.test.ts`.
221
+ *
222
+ * ONE gate, owned by the CALLER (all three adapters identically):
223
+ * `fsBound && resourceCount > 0` — the memory-mcp T5 lesson restated for
224
+ * files: `fsBound` is the REAL "file tools are armed" signal (guuey#234), so
225
+ * the hint can never name files the model has no tools to read, and a count
226
+ * of 0/absent (the normal no-resources state) renders nothing. Deliberately
227
+ * NOT auth-gated: the app layer is shared, public-by-definition content —
228
+ * guests read it too.
229
+ *
230
+ * `appDir` is the app mount AS THE WORKER SEES IT — the invoke's own
231
+ * `fs.app` (`/app` in the hosted sandbox; the real host path on a bare dev
232
+ * run) — so the hint always names a directory the file tools can actually
233
+ * open. Leading `\n\n` so it appends cleanly after the profile section
234
+ * (mirrors the sibling renderers).
235
+ */
236
+ export function renderResourcesSection(count, appDir) {
237
+ const files = count === 1 ? "1 reference file" : `${count} reference files`;
238
+ return (`\n\n## App resources\n\n` +
239
+ `You have ${files} at ${appDir}/resources — the builder provided them for you. ` +
240
+ `Read them with your file tools when they're relevant to the question.`);
241
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guuey/host",
3
- "version": "0.16.5",
3
+ "version": "0.16.6",
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.5",
26
- "@guuey/worker": "0.16.5"
25
+ "@guuey/worker": "0.16.6",
26
+ "@guuey/config": "0.16.6"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/node": "^24.0.0",