@guuey/host 0.16.11 → 0.16.14
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 +10 -2
- package/dist/frameworks/google-adk.d.ts.map +1 -1
- package/dist/frameworks/google-adk.js +8 -2
- package/dist/frameworks/openai.d.ts.map +1 -1
- package/dist/frameworks/openai.js +8 -2
- package/dist/preamble.d.ts +47 -0
- package/dist/preamble.d.ts.map +1 -1
- package/dist/preamble.js +61 -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#531: the surface-formatting section — default ON, suppressed
|
|
147
|
+
// only by an explicit `agent.surfaceHints: false` (BYO plain-text
|
|
148
|
+
// surfaces). Before the norms, which stay LAST.
|
|
149
|
+
renderSurfaceSection(snapshot.surfaceHints) +
|
|
150
|
+
// guuey#556: the default response norms, LAST and unconditional —
|
|
151
|
+
// every hosted agent inherits them (see RESPONSE_NORMS_SECTION's doc
|
|
152
|
+
// for the confirm-gate carve-out + the per-court opt-out grammar).
|
|
153
|
+
RESPONSE_NORMS_SECTION;
|
|
146
154
|
const model = snapshot.model ?? DEFAULT_MODEL;
|
|
147
155
|
const maxTurns = snapshot.runtime?.maxTurns ?? DEFAULT_MAX_TURNS;
|
|
148
156
|
const fs = ctx.fs;
|
|
@@ -407,4 +415,4 @@ function dedupe(names) {
|
|
|
407
415
|
// `renderMemorySection` (the memory SAVE + RECALL block, memory-mcp T5) lives
|
|
408
416
|
// there too — framework-blind, so openai/adk render the identical section.
|
|
409
417
|
export { withContextPreamble } from "../preamble.js";
|
|
410
|
-
import { renderMemorySection, renderProfileSection, renderResourcesSection, withContextPreamble, } from "../preamble.js";
|
|
418
|
+
import { RESPONSE_NORMS_SECTION, renderSurfaceSection, 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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I,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,CAuHtE"}
|
|
@@ -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, renderSurfaceSection, 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,13 @@ 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#531: surface-formatting hints — default ON, only an explicit
|
|
288
|
+
// `agent.surfaceHints: false` suppresses. Before the norms (LAST).
|
|
289
|
+
renderSurfaceSection(snapshot.surfaceHints) +
|
|
290
|
+
// guuey#556: default response norms, LAST and unconditional (see the
|
|
291
|
+
// constant's doc for the confirm-gate carve-out).
|
|
292
|
+
RESPONSE_NORMS_SECTION;
|
|
287
293
|
let agent;
|
|
288
294
|
try {
|
|
289
295
|
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;
|
|
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,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,CAgJf"}
|
|
@@ -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, renderResourcesSection } from "../preamble.js";
|
|
34
|
+
import { RESPONSE_NORMS_SECTION, renderSurfaceSection, 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,13 @@ 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#531: surface-formatting hints — default ON, only an explicit
|
|
121
|
+
// `agent.surfaceHints: false` suppresses. Before the norms (LAST).
|
|
122
|
+
renderSurfaceSection(snapshot.surfaceHints) +
|
|
123
|
+
// guuey#556: default response norms, LAST and unconditional (see the
|
|
124
|
+
// constant's doc for the confirm-gate carve-out).
|
|
125
|
+
RESPONSE_NORMS_SECTION;
|
|
120
126
|
mcpServers = buildOpenaiMcpServers(ctx);
|
|
121
127
|
}
|
|
122
128
|
catch (err) {
|
package/dist/preamble.d.ts
CHANGED
|
@@ -122,4 +122,51 @@ 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
|
+
/**
|
|
145
|
+
* The platform wrapper's SURFACE-FORMATTING section (guuey#531) — the
|
|
146
|
+
* rendering-surface facts every guuey chat surface guarantees (styled
|
|
147
|
+
* code fences + inline code, autolinked bare URLs guuey#515, native
|
|
148
|
+
* tables guuey#370), told to the model ONCE by the platform instead of
|
|
149
|
+
* independently rediscovered by every builder (existence proof it bites:
|
|
150
|
+
* our own helper served a CLI quickstart as bare prose under a stale
|
|
151
|
+
* "no backticks" rule — dev thread 82a09002, 2026-08-30).
|
|
152
|
+
*
|
|
153
|
+
* DEFAULT ON, opt-out via `agent.surfaceHints: false` (the @guuey/config
|
|
154
|
+
* knob) — for BYO surfaces (custom `@guuey/agent-client` clients:
|
|
155
|
+
* SMS/voice/plain-text) where markdown is not the contract. Rationale
|
|
156
|
+
* for default-on: the #521 principle — defaults are the product; opt-in
|
|
157
|
+
* strands the median builder.
|
|
158
|
+
*
|
|
159
|
+
* Scope is SURFACE ONLY — never tone, brand, or behavior; those stay
|
|
160
|
+
* the builder's domain. This text is published VERBATIM in the docs
|
|
161
|
+
* ("what wraps your prompt") — trust + debuggability — so treat any
|
|
162
|
+
* edit here as a docs edit too.
|
|
163
|
+
*/
|
|
164
|
+
export declare const SURFACE_FORMATTING_SECTION: string;
|
|
165
|
+
/**
|
|
166
|
+
* Render the surface section honoring the opt-out (guuey#531):
|
|
167
|
+
* `undefined` (the default — absent knob) and `true` render it; only an
|
|
168
|
+
* explicit `false` suppresses. Framework-blind like every sibling.
|
|
169
|
+
*/
|
|
170
|
+
export declare function renderSurfaceSection(surfaceHints: boolean | undefined): string;
|
|
171
|
+
export declare const RESPONSE_NORMS_SECTION: string;
|
|
125
172
|
//# 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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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;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,0BAA0B,QAM5B,CAAC;AAEZ;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,OAAO,GAAG,SAAS,GAChC,MAAM,CAER;AAED,eAAO,MAAM,sBAAsB,QAQE,CAAC"}
|
package/dist/preamble.js
CHANGED
|
@@ -239,3 +239,64 @@ 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
|
+
/**
|
|
262
|
+
* The platform wrapper's SURFACE-FORMATTING section (guuey#531) — the
|
|
263
|
+
* rendering-surface facts every guuey chat surface guarantees (styled
|
|
264
|
+
* code fences + inline code, autolinked bare URLs guuey#515, native
|
|
265
|
+
* tables guuey#370), told to the model ONCE by the platform instead of
|
|
266
|
+
* independently rediscovered by every builder (existence proof it bites:
|
|
267
|
+
* our own helper served a CLI quickstart as bare prose under a stale
|
|
268
|
+
* "no backticks" rule — dev thread 82a09002, 2026-08-30).
|
|
269
|
+
*
|
|
270
|
+
* DEFAULT ON, opt-out via `agent.surfaceHints: false` (the @guuey/config
|
|
271
|
+
* knob) — for BYO surfaces (custom `@guuey/agent-client` clients:
|
|
272
|
+
* SMS/voice/plain-text) where markdown is not the contract. Rationale
|
|
273
|
+
* for default-on: the #521 principle — defaults are the product; opt-in
|
|
274
|
+
* strands the median builder.
|
|
275
|
+
*
|
|
276
|
+
* Scope is SURFACE ONLY — never tone, brand, or behavior; those stay
|
|
277
|
+
* the builder's domain. This text is published VERBATIM in the docs
|
|
278
|
+
* ("what wraps your prompt") — trust + debuggability — so treat any
|
|
279
|
+
* edit here as a docs edit too.
|
|
280
|
+
*/
|
|
281
|
+
export const SURFACE_FORMATTING_SECTION = `\n\n## Your rendering surface\n\n` +
|
|
282
|
+
`Your text renders in a markdown chat surface. Format code as code: ` +
|
|
283
|
+
`commands, flags, file names, env vars, and identifiers in backticks; ` +
|
|
284
|
+
`multi-line code in fenced blocks with a language tag. Bare URLs render ` +
|
|
285
|
+
`as tappable links. Tables render natively — use one when comparing ` +
|
|
286
|
+
`things.`;
|
|
287
|
+
/**
|
|
288
|
+
* Render the surface section honoring the opt-out (guuey#531):
|
|
289
|
+
* `undefined` (the default — absent knob) and `true` render it; only an
|
|
290
|
+
* explicit `false` suppresses. Framework-blind like every sibling.
|
|
291
|
+
*/
|
|
292
|
+
export function renderSurfaceSection(surfaceHints) {
|
|
293
|
+
return surfaceHints === false ? "" : SURFACE_FORMATTING_SECTION;
|
|
294
|
+
}
|
|
295
|
+
export const RESPONSE_NORMS_SECTION = `\n\n## Speaking to the user\n\n` +
|
|
296
|
+
`Your tools' mechanics are internal working, not conversation. Never narrate ` +
|
|
297
|
+
`cache hits, save or blueprint states, render plumbing, retries, tool names, or ` +
|
|
298
|
+
`bookkeeping to the user — say what you did or found in the user's own terms, ` +
|
|
299
|
+
`and when a step needs no mention, say nothing about it. One deliberate ` +
|
|
300
|
+
`exception: when a tool asks the user to confirm, authorize, or review ` +
|
|
301
|
+
`something, present that fully and clearly — approval prompts and previews ` +
|
|
302
|
+
`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.14",
|
|
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/
|
|
26
|
-
"@guuey/
|
|
25
|
+
"@guuey/worker": "0.16.14",
|
|
26
|
+
"@guuey/config": "0.16.14"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^24.0.0",
|