@buoy-gg/agent-core 7.0.35 → 7.0.38
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 +21 -14
- package/lib/commonjs/blocks/receipts.js +57 -1
- package/lib/commonjs/blocks/receipts.js.map +1 -1
- package/lib/commonjs/blocks/types.js +23 -2
- package/lib/commonjs/blocks/types.js.map +1 -1
- package/lib/commonjs/blocks/uiTool.js +423 -10
- package/lib/commonjs/blocks/uiTool.js.map +1 -1
- package/lib/commonjs/catalog/catalog.g.js +213 -48
- package/lib/commonjs/catalog/catalog.g.js.map +1 -1
- package/lib/commonjs/catalog/catalog.source.json +226 -48
- package/lib/commonjs/catalog/catalog.types.g.js +44 -0
- package/lib/commonjs/catalog/catalog.types.g.js.map +1 -0
- package/lib/commonjs/catalog/normalizeParams.js +333 -0
- package/lib/commonjs/catalog/normalizeParams.js.map +1 -0
- package/lib/commonjs/catalog/signature.js +68 -0
- package/lib/commonjs/catalog/signature.js.map +1 -0
- package/lib/commonjs/catalog/snapshotReads.js +13 -6
- package/lib/commonjs/catalog/snapshotReads.js.map +1 -1
- package/lib/commonjs/catalog/toProviderTools.js +44 -6
- package/lib/commonjs/catalog/toProviderTools.js.map +1 -1
- package/lib/commonjs/context/buildContextPack.js +367 -19
- package/lib/commonjs/context/buildContextPack.js.map +1 -1
- package/lib/commonjs/effects/digest.js +34 -0
- package/lib/commonjs/effects/digest.js.map +1 -0
- package/lib/commonjs/effects/ledger.js +98 -2
- package/lib/commonjs/effects/ledger.js.map +1 -1
- package/lib/commonjs/engine/askGate.js +287 -0
- package/lib/commonjs/engine/askGate.js.map +1 -0
- package/lib/commonjs/engine/effectFor.js +82 -1
- package/lib/commonjs/engine/effectFor.js.map +1 -1
- package/lib/commonjs/engine/evidence.js +113 -0
- package/lib/commonjs/engine/evidence.js.map +1 -0
- package/lib/commonjs/engine/historyBudget.js +363 -0
- package/lib/commonjs/engine/historyBudget.js.map +1 -0
- package/lib/commonjs/engine/retrieve.js +214 -0
- package/lib/commonjs/engine/retrieve.js.map +1 -0
- package/lib/commonjs/engine/runAgentTurn.js +1231 -120
- package/lib/commonjs/engine/runAgentTurn.js.map +1 -1
- package/lib/commonjs/engine/systemPrompt.js +103 -9
- package/lib/commonjs/engine/systemPrompt.js.map +1 -1
- package/lib/commonjs/engine/textToolCalls.js +276 -0
- package/lib/commonjs/engine/textToolCalls.js.map +1 -0
- package/lib/commonjs/engine/tokenCalibration.js +81 -0
- package/lib/commonjs/engine/tokenCalibration.js.map +1 -0
- package/lib/commonjs/engine/verify.js +300 -0
- package/lib/commonjs/engine/verify.js.map +1 -0
- package/lib/commonjs/index.js +74 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/policy/labels.js +19 -3
- package/lib/commonjs/policy/labels.js.map +1 -1
- package/lib/commonjs/policy/policy.js +6 -1
- package/lib/commonjs/policy/policy.js.map +1 -1
- package/lib/commonjs/policy/redact.js +42 -5
- package/lib/commonjs/policy/redact.js.map +1 -1
- package/lib/commonjs/providers/anthropic.js +340 -208
- package/lib/commonjs/providers/anthropic.js.map +1 -1
- package/lib/commonjs/providers/openai.js +237 -103
- package/lib/commonjs/providers/openai.js.map +1 -1
- package/lib/commonjs/providers/problem.js +98 -0
- package/lib/commonjs/providers/problem.js.map +1 -0
- package/lib/commonjs/providers/sse.js +170 -34
- package/lib/commonjs/providers/sse.js.map +1 -1
- package/lib/commonjs/providers/streamTimer.js +123 -0
- package/lib/commonjs/providers/streamTimer.js.map +1 -0
- package/lib/commonjs/providers/transport.js +123 -0
- package/lib/commonjs/providers/transport.js.map +1 -0
- package/lib/commonjs/providers/xhrStream.js +212 -0
- package/lib/commonjs/providers/xhrStream.js.map +1 -0
- package/lib/commonjs/session.js +242 -58
- package/lib/commonjs/session.js.map +1 -1
- package/lib/module/blocks/receipts.js +57 -1
- package/lib/module/blocks/receipts.js.map +1 -1
- package/lib/module/blocks/types.js +23 -2
- package/lib/module/blocks/types.js.map +1 -1
- package/lib/module/blocks/uiTool.js +421 -10
- package/lib/module/blocks/uiTool.js.map +1 -1
- package/lib/module/catalog/catalog.g.js +213 -48
- package/lib/module/catalog/catalog.g.js.map +1 -1
- package/lib/module/catalog/catalog.source.json +226 -48
- package/lib/module/catalog/catalog.types.g.js +40 -0
- package/lib/module/catalog/catalog.types.g.js.map +1 -0
- package/lib/module/catalog/normalizeParams.js +327 -0
- package/lib/module/catalog/normalizeParams.js.map +1 -0
- package/lib/module/catalog/signature.js +63 -0
- package/lib/module/catalog/signature.js.map +1 -0
- package/lib/module/catalog/snapshotReads.js +13 -6
- package/lib/module/catalog/snapshotReads.js.map +1 -1
- package/lib/module/catalog/toProviderTools.js +44 -6
- package/lib/module/catalog/toProviderTools.js.map +1 -1
- package/lib/module/context/buildContextPack.js +366 -19
- package/lib/module/context/buildContextPack.js.map +1 -1
- package/lib/module/effects/digest.js +29 -0
- package/lib/module/effects/digest.js.map +1 -0
- package/lib/module/effects/ledger.js +98 -2
- package/lib/module/effects/ledger.js.map +1 -1
- package/lib/module/engine/askGate.js +280 -0
- package/lib/module/engine/askGate.js.map +1 -0
- package/lib/module/engine/effectFor.js +83 -1
- package/lib/module/engine/effectFor.js.map +1 -1
- package/lib/module/engine/evidence.js +107 -0
- package/lib/module/engine/evidence.js.map +1 -0
- package/lib/module/engine/historyBudget.js +355 -0
- package/lib/module/engine/historyBudget.js.map +1 -0
- package/lib/module/engine/retrieve.js +210 -0
- package/lib/module/engine/retrieve.js.map +1 -0
- package/lib/module/engine/runAgentTurn.js +1227 -121
- package/lib/module/engine/runAgentTurn.js.map +1 -1
- package/lib/module/engine/systemPrompt.js +101 -9
- package/lib/module/engine/systemPrompt.js.map +1 -1
- package/lib/module/engine/textToolCalls.js +270 -0
- package/lib/module/engine/textToolCalls.js.map +1 -0
- package/lib/module/engine/tokenCalibration.js +75 -0
- package/lib/module/engine/tokenCalibration.js.map +1 -0
- package/lib/module/engine/verify.js +292 -0
- package/lib/module/engine/verify.js.map +1 -0
- package/lib/module/index.js +7 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/policy/labels.js +19 -3
- package/lib/module/policy/labels.js.map +1 -1
- package/lib/module/policy/policy.js +6 -1
- package/lib/module/policy/policy.js.map +1 -1
- package/lib/module/policy/redact.js +42 -5
- package/lib/module/policy/redact.js.map +1 -1
- package/lib/module/providers/anthropic.js +341 -209
- package/lib/module/providers/anthropic.js.map +1 -1
- package/lib/module/providers/openai.js +238 -104
- package/lib/module/providers/openai.js.map +1 -1
- package/lib/module/providers/problem.js +92 -0
- package/lib/module/providers/problem.js.map +1 -0
- package/lib/module/providers/sse.js +166 -34
- package/lib/module/providers/sse.js.map +1 -1
- package/lib/module/providers/streamTimer.js +118 -0
- package/lib/module/providers/streamTimer.js.map +1 -0
- package/lib/module/providers/transport.js +119 -0
- package/lib/module/providers/transport.js.map +1 -0
- package/lib/module/providers/xhrStream.js +207 -0
- package/lib/module/providers/xhrStream.js.map +1 -0
- package/lib/module/session.js +226 -60
- package/lib/module/session.js.map +1 -1
- package/lib/typescript/blocks/receipts.d.ts +5 -0
- package/lib/typescript/blocks/receipts.d.ts.map +1 -1
- package/lib/typescript/blocks/types.d.ts +23 -2
- package/lib/typescript/blocks/types.d.ts.map +1 -1
- package/lib/typescript/blocks/uiTool.d.ts +11 -2
- package/lib/typescript/blocks/uiTool.d.ts.map +1 -1
- package/lib/typescript/catalog/catalog.g.d.ts +2 -2
- package/lib/typescript/catalog/catalog.g.d.ts.map +1 -1
- package/lib/typescript/catalog/catalog.types.g.d.ts +40 -0
- package/lib/typescript/catalog/catalog.types.g.d.ts.map +1 -0
- package/lib/typescript/catalog/normalizeParams.d.ts +43 -0
- package/lib/typescript/catalog/normalizeParams.d.ts.map +1 -0
- package/lib/typescript/catalog/signature.d.ts +29 -0
- package/lib/typescript/catalog/signature.d.ts.map +1 -0
- package/lib/typescript/catalog/snapshotReads.d.ts.map +1 -1
- package/lib/typescript/catalog/toProviderTools.d.ts +28 -15
- package/lib/typescript/catalog/toProviderTools.d.ts.map +1 -1
- package/lib/typescript/context/buildContextPack.d.ts +24 -2
- package/lib/typescript/context/buildContextPack.d.ts.map +1 -1
- package/lib/typescript/effects/digest.d.ts +10 -0
- package/lib/typescript/effects/digest.d.ts.map +1 -0
- package/lib/typescript/effects/ledger.d.ts +73 -0
- package/lib/typescript/effects/ledger.d.ts.map +1 -1
- package/lib/typescript/engine/askGate.d.ts +29 -0
- package/lib/typescript/engine/askGate.d.ts.map +1 -0
- package/lib/typescript/engine/effectFor.d.ts +6 -1
- package/lib/typescript/engine/effectFor.d.ts.map +1 -1
- package/lib/typescript/engine/evidence.d.ts +67 -0
- package/lib/typescript/engine/evidence.d.ts.map +1 -0
- package/lib/typescript/engine/historyBudget.d.ts +115 -0
- package/lib/typescript/engine/historyBudget.d.ts.map +1 -0
- package/lib/typescript/engine/retrieve.d.ts +32 -0
- package/lib/typescript/engine/retrieve.d.ts.map +1 -0
- package/lib/typescript/engine/runAgentTurn.d.ts +179 -3
- package/lib/typescript/engine/runAgentTurn.d.ts.map +1 -1
- package/lib/typescript/engine/systemPrompt.d.ts +80 -0
- package/lib/typescript/engine/systemPrompt.d.ts.map +1 -1
- package/lib/typescript/engine/textToolCalls.d.ts +58 -0
- package/lib/typescript/engine/textToolCalls.d.ts.map +1 -0
- package/lib/typescript/engine/tokenCalibration.d.ts +46 -0
- package/lib/typescript/engine/tokenCalibration.d.ts.map +1 -0
- package/lib/typescript/engine/verify.d.ts +67 -0
- package/lib/typescript/engine/verify.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +7 -3
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/policy/labels.d.ts.map +1 -1
- package/lib/typescript/policy/policy.d.ts.map +1 -1
- package/lib/typescript/policy/redact.d.ts.map +1 -1
- package/lib/typescript/providers/anthropic.d.ts.map +1 -1
- package/lib/typescript/providers/openai.d.ts +0 -16
- package/lib/typescript/providers/openai.d.ts.map +1 -1
- package/lib/typescript/providers/problem.d.ts +50 -0
- package/lib/typescript/providers/problem.d.ts.map +1 -0
- package/lib/typescript/providers/sse.d.ts +86 -2
- package/lib/typescript/providers/sse.d.ts.map +1 -1
- package/lib/typescript/providers/streamTimer.d.ts +59 -0
- package/lib/typescript/providers/streamTimer.d.ts.map +1 -0
- package/lib/typescript/providers/transport.d.ts +48 -0
- package/lib/typescript/providers/transport.d.ts.map +1 -0
- package/lib/typescript/providers/types.d.ts +105 -3
- package/lib/typescript/providers/types.d.ts.map +1 -1
- package/lib/typescript/providers/xhrStream.d.ts +45 -0
- package/lib/typescript/providers/xhrStream.d.ts.map +1 -0
- package/lib/typescript/session.d.ts +55 -4
- package/lib/typescript/session.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +6 -0
- package/lib/typescript/types.d.ts.map +1 -1
- package/package.json +10 -10
- package/LICENSE +0 -58
|
@@ -23,6 +23,13 @@ export interface ToolResult {
|
|
|
23
23
|
/** Already JSON-encoded and truncated by the engine. */
|
|
24
24
|
content: string;
|
|
25
25
|
isError?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* The evidence-store ref of the FULL result (engine/evidence.ts), when the
|
|
28
|
+
* session keeps one. Session-local: it never goes on the wire and never to
|
|
29
|
+
* disk; history compression reads it to leave a marker the model can act
|
|
30
|
+
* on. Absent on a result rebuilt from a persisted transcript.
|
|
31
|
+
*/
|
|
32
|
+
ref?: string;
|
|
26
33
|
}
|
|
27
34
|
/**
|
|
28
35
|
* An Anthropic thinking block, kept verbatim.
|
|
@@ -55,6 +62,36 @@ export type AgentMessage = {
|
|
|
55
62
|
role: "tool-results";
|
|
56
63
|
results: ToolResult[];
|
|
57
64
|
};
|
|
65
|
+
/**
|
|
66
|
+
* Why a stream ended, and whether what arrived can be acted on.
|
|
67
|
+
*
|
|
68
|
+
* `completed` is the ONLY value that admits tool calls for execution. The
|
|
69
|
+
* distinction exists because a truncated response is indistinguishable from a
|
|
70
|
+
* finished one by content alone: a connection cut after the model emitted
|
|
71
|
+
* `{"key":"cart","value":[]}` leaves valid JSON and a plausible plan, and the
|
|
72
|
+
* engine used to run it. See `StreamEvent.error.kind` for the other half.
|
|
73
|
+
*/
|
|
74
|
+
export type StreamOutcome =
|
|
75
|
+
/** A terminal marker arrived: `message_stop` (Anthropic) or `[DONE]` (OpenAI). */
|
|
76
|
+
"completed"
|
|
77
|
+
/**
|
|
78
|
+
* Terminal marker arrived, but the model was cut off at `max_tokens` mid-plan.
|
|
79
|
+
* The text it managed is real; any tool calls in it are half a thought and
|
|
80
|
+
* are NOT executed.
|
|
81
|
+
*/
|
|
82
|
+
| "output-limited";
|
|
83
|
+
/**
|
|
84
|
+
* Why a stream failed. `provider` is the model or gateway saying so; the other
|
|
85
|
+
* two are this side deciding the response cannot be trusted.
|
|
86
|
+
*/
|
|
87
|
+
import type { StreamProblem } from "./problem";
|
|
88
|
+
export type StreamErrorKind =
|
|
89
|
+
/** The provider reported it: HTTP error, or an `error` event on a 200. */
|
|
90
|
+
"provider"
|
|
91
|
+
/** The stream ended with no terminal marker. Bare EOF is never success. */
|
|
92
|
+
| "truncated"
|
|
93
|
+
/** No headers within `connectTimeoutMs`, or no bytes within `idleTimeoutMs`. */
|
|
94
|
+
| "timeout";
|
|
58
95
|
/** Incremental output from a streaming turn. */
|
|
59
96
|
export type StreamEvent = {
|
|
60
97
|
type: "text";
|
|
@@ -72,10 +109,28 @@ export type StreamEvent = {
|
|
|
72
109
|
| {
|
|
73
110
|
type: "error";
|
|
74
111
|
message: string;
|
|
75
|
-
|
|
112
|
+
kind: StreamErrorKind;
|
|
113
|
+
/**
|
|
114
|
+
* What kind of provider failure this was (providers/problem.ts). Only
|
|
115
|
+
* `kind: "provider"` errors carry it. The engine retries `throttled` and
|
|
116
|
+
* `overflow` — and only when the stream had produced nothing yet.
|
|
117
|
+
*/
|
|
118
|
+
problem?: StreamProblem;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* The stream ended in a state worth acting on. A provider that cannot say
|
|
122
|
+
* this yields an `error` instead — there is no third way out.
|
|
123
|
+
*
|
|
124
|
+
* `model` is the id the provider actually SERVED — `message_start.message.model`
|
|
125
|
+
* on Anthropic, the chunk's `model` on OpenAI — which differs from the one
|
|
126
|
+
* requested whenever a gateway resolves an alias to a dated snapshot.
|
|
127
|
+
*/
|
|
128
|
+
| {
|
|
76
129
|
type: "done";
|
|
130
|
+
outcome: StreamOutcome;
|
|
77
131
|
stopReason?: string;
|
|
78
132
|
usage?: TokenUsage;
|
|
133
|
+
model?: string;
|
|
79
134
|
};
|
|
80
135
|
export interface TokenUsage {
|
|
81
136
|
input: number;
|
|
@@ -84,8 +139,10 @@ export interface TokenUsage {
|
|
|
84
139
|
* Anthropic's prompt-cache counters, when the provider reports them.
|
|
85
140
|
* `cacheRead` is the prefix that was served from cache at 0.1x — the whole
|
|
86
141
|
* point of caching — and `cacheWrite` is the prefix stored at 1.25x on the
|
|
87
|
-
* request that populated it.
|
|
88
|
-
*
|
|
142
|
+
* request that populated it. On Anthropic both are reported SEPARATELY from
|
|
143
|
+
* `input`, so a cached request shows a tiny `input` and a large `cacheRead`;
|
|
144
|
+
* on the OpenAI protocol `cacheRead` (from `prompt_tokens_details.cached_tokens`)
|
|
145
|
+
* is INCLUDED in `input` — never add the two there. Otherwise a cached request shows a tiny `input` and a large `cacheRead`
|
|
89
146
|
* rather than a smaller `input`; adding them is what gives the real total.
|
|
90
147
|
*/
|
|
91
148
|
cacheRead?: number;
|
|
@@ -94,6 +151,13 @@ export interface TokenUsage {
|
|
|
94
151
|
export interface ProviderRequest {
|
|
95
152
|
messages: AgentMessage[];
|
|
96
153
|
system: string;
|
|
154
|
+
/**
|
|
155
|
+
* The part of the system prompt that changes every turn — the "right now"
|
|
156
|
+
* picture of the app (current route, mounted queries, recent requests).
|
|
157
|
+
* Kept apart from `system` so a provider that caches the stable prefix can
|
|
158
|
+
* append this AFTER its cache breakpoint instead of invalidating it.
|
|
159
|
+
*/
|
|
160
|
+
systemVolatile?: string;
|
|
97
161
|
tools: ProviderTool[];
|
|
98
162
|
model: string;
|
|
99
163
|
maxTokens: number;
|
|
@@ -132,6 +196,25 @@ export interface ProviderConfig {
|
|
|
132
196
|
* Set false for a gateway that rejects unknown `cache_control` fields.
|
|
133
197
|
*/
|
|
134
198
|
cache?: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* How long to wait for response HEADERS before giving up. Default 30s.
|
|
201
|
+
*
|
|
202
|
+
* There was no clock here at all: a gateway that accepted the socket and
|
|
203
|
+
* never replied left the turn spinning until someone pressed Stop, with the
|
|
204
|
+
* thinking strip still animating. A timeout is not a retry — nothing is
|
|
205
|
+
* re-sent, because a request that may have reached the model is not safe to
|
|
206
|
+
* duplicate.
|
|
207
|
+
*/
|
|
208
|
+
connectTimeoutMs?: number;
|
|
209
|
+
/**
|
|
210
|
+
* How long to wait between BYTES once the stream is open. Default 90s.
|
|
211
|
+
*
|
|
212
|
+
* Deliberately generous. Anthropic sends `ping` frames, but an OpenAI-protocol
|
|
213
|
+
* reasoning model can legitimately produce nothing for a long stretch while
|
|
214
|
+
* it thinks, and cutting that off looks exactly like a broken product. Only
|
|
215
|
+
* total silence counts — any frame, including a keepalive comment, resets it.
|
|
216
|
+
*/
|
|
217
|
+
idleTimeoutMs?: number;
|
|
135
218
|
/**
|
|
136
219
|
* Extra fields merged into every request BODY, last — `temperature`, a
|
|
137
220
|
* gateway's routing hints, whatever the endpoint demands that this config
|
|
@@ -140,6 +223,25 @@ export interface ProviderConfig {
|
|
|
140
223
|
* stream) win only if you don't override them, so use with care.
|
|
141
224
|
*/
|
|
142
225
|
requestOverrides?: Record<string, unknown>;
|
|
226
|
+
/**
|
|
227
|
+
* How to send the request: `fetch`, `xhr`, or `auto` (the default).
|
|
228
|
+
*
|
|
229
|
+
* `auto` starts with `fetch` and switches to XHR for the rest of the session
|
|
230
|
+
* if that first response turns out to have no readable body — which is React
|
|
231
|
+
* Native's own `fetch`, and every runtime without `expo/fetch` installed as
|
|
232
|
+
* the global. Pin it to `"xhr"` in a bare-RN app to stream from the very
|
|
233
|
+
* first reply instead of the second; pin it to `"fetch"` to rule XHR out.
|
|
234
|
+
* See providers/transport.ts for why the choice cannot be made later.
|
|
235
|
+
*/
|
|
236
|
+
transport?: "fetch" | "xhr" | "auto";
|
|
237
|
+
/**
|
|
238
|
+
* The fetch to send requests with. Default: the global one. A harness
|
|
239
|
+
* passes its own so a network interceptor that wraps the global fetch
|
|
240
|
+
* stays off model traffic (it would otherwise capture — and could
|
|
241
|
+
* override — the agent's own requests), and so it can keep every request
|
|
242
|
+
* body it sent.
|
|
243
|
+
*/
|
|
244
|
+
fetch?: typeof fetch;
|
|
143
245
|
}
|
|
144
246
|
export interface Provider {
|
|
145
247
|
readonly protocol: "anthropic" | "openai";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,oEAAoE;AACpE,MAAM,WAAW,QAAQ;IACvB,+DAA+D;IAC/D,EAAE,EAAE,MAAM,CAAC;IACX,+CAA+C;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/providers/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,oEAAoE;AACpE,MAAM,WAAW,QAAQ;IACvB,+DAA+D;IAC/D,EAAE,EAAE,MAAM,CAAC;IACX,+CAA+C;IA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;IACzE,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;IACrC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACtB;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,QAAQ,EAAE,WAAW,GAAG,QAAQ,CAAC;IAC1C;;;;;OAKG;IACH,IAAI,CAAC,GAAG,EAAE,eAAe,GAAG,cAAc,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;CACrE"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Streaming over `XMLHttpRequest`, for the runtimes where `fetch` cannot.
|
|
3
|
+
*
|
|
4
|
+
* React Native core still has no `response.body`: its `fetch` is the whatwg
|
|
5
|
+
* polyfill over XHR and resolves inside `xhr.onload`, i.e. after the ENTIRE
|
|
6
|
+
* body. Under Expo the global is `expo/fetch`, which does stream — but
|
|
7
|
+
* `EXPO_PUBLIC_USE_RN_FETCH=1` reverts that, and the bare-RN CLI, TV CLI and
|
|
8
|
+
* NativeScript lanes never had it at all. On those, every Ask Buoy answer
|
|
9
|
+
* appeared in one lump, however long the model took.
|
|
10
|
+
*
|
|
11
|
+
* XHR itself has streamed the whole time. `responseText` grows as bytes arrive
|
|
12
|
+
* and `onprogress` fires as it does, so slicing from the last offset gives the
|
|
13
|
+
* same incremental text a reader would. Two conditions, both easy to miss:
|
|
14
|
+
* the progress handler must be installed BEFORE `send()`, and `responseType`
|
|
15
|
+
* must stay text — anything else stops RN emitting progress at all.
|
|
16
|
+
*
|
|
17
|
+
* WHAT THIS IS NOT. It is not a second SSE parser: framing, the truncation
|
|
18
|
+
* rule and the terminal-marker contract all live in `sse.ts` and are shared
|
|
19
|
+
* verbatim. This file only produces text chunks.
|
|
20
|
+
*/
|
|
21
|
+
import { type SseEvent, type SseReadOptions } from "./sse";
|
|
22
|
+
export interface XhrStreamRequest {
|
|
23
|
+
url: string;
|
|
24
|
+
headers: Record<string, string>;
|
|
25
|
+
body: string;
|
|
26
|
+
signal?: AbortSignal;
|
|
27
|
+
}
|
|
28
|
+
export interface XhrStreamResponse {
|
|
29
|
+
status: number;
|
|
30
|
+
ok: boolean;
|
|
31
|
+
contentType: string;
|
|
32
|
+
/** The `Retry-After` header, raw, when the endpoint sent one. */
|
|
33
|
+
retryAfter: string | null;
|
|
34
|
+
/** Whole body, for the non-2xx and not-a-stream paths. Reads what arrived. */
|
|
35
|
+
text(): Promise<string>;
|
|
36
|
+
frames(options?: SseReadOptions): AsyncGenerator<SseEvent, void, void>;
|
|
37
|
+
}
|
|
38
|
+
export declare function xhrAvailable(): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Send the request and resolve once the HEADERS are in, so the caller can
|
|
41
|
+
* check the status and content type before deciding to read a stream — the
|
|
42
|
+
* same shape `fetch` offers, and the reason this can slot in beside it.
|
|
43
|
+
*/
|
|
44
|
+
export declare function xhrStream(req: XhrStreamRequest): Promise<XhrStreamResponse>;
|
|
45
|
+
//# sourceMappingURL=xhrStream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xhrStream.d.ts","sourceRoot":"","sources":["../../../src/providers/xhrStream.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAc,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAKvE,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,OAAO,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,8EAA8E;IAC9E,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACxB,MAAM,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,cAAc,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;CACxE;AAED,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAkL3E"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { type TurnEvent } from "./engine/runAgentTurn";
|
|
1
|
+
import { type ApprovalAnswer, type TurnEvent } from "./engine/runAgentTurn";
|
|
2
2
|
import { type ContextPack } from "./engine/systemPrompt";
|
|
3
3
|
import { EffectLedger } from "./effects/ledger";
|
|
4
|
-
import
|
|
4
|
+
import { EvidenceStore } from "./engine/evidence";
|
|
5
|
+
import { TokenCalibration } from "./engine/tokenCalibration";
|
|
6
|
+
import { compressConsumed, trimHistory, trimHistoryReport } from "./engine/historyBudget";
|
|
7
|
+
import type { AgentMessage, Provider, ProviderConfig } from "./providers/types";
|
|
5
8
|
import { type AskBuoyPolicy } from "./policy/policy";
|
|
6
9
|
import type { DispatchFn, SnapshotFn, ToolDescriptor } from "./types";
|
|
7
10
|
export interface AskBuoySessionConfig extends ProviderConfig {
|
|
@@ -26,6 +29,12 @@ export interface AskBuoySessionConfig extends ProviderConfig {
|
|
|
26
29
|
/** Override the built-in catalog. Tests and the desktop port use this. */
|
|
27
30
|
catalog?: ToolDescriptor[];
|
|
28
31
|
requestApproval?: RunApproval;
|
|
32
|
+
/**
|
|
33
|
+
* A ready-made provider, injected by tests and benches — a scripted one,
|
|
34
|
+
* or a real adapter wrapped for capture. Otherwise the session builds one
|
|
35
|
+
* from `protocol` and the ProviderConfig fields.
|
|
36
|
+
*/
|
|
37
|
+
provider?: Provider;
|
|
29
38
|
}
|
|
30
39
|
type RunApproval = (input: {
|
|
31
40
|
id: string;
|
|
@@ -34,10 +43,25 @@ type RunApproval = (input: {
|
|
|
34
43
|
label: string;
|
|
35
44
|
description: string;
|
|
36
45
|
reason: string;
|
|
37
|
-
|
|
46
|
+
/** The call itself — see `RunInput.requestApproval` for why it travels. */
|
|
47
|
+
params: Record<string, unknown>;
|
|
48
|
+
/** Fingerprint of the target at ask time — see `readTargetDigest`. */
|
|
49
|
+
targetDigest?: string;
|
|
50
|
+
}) => Promise<ApprovalAnswer>;
|
|
38
51
|
export interface AskBuoySession {
|
|
39
52
|
readonly ledger: EffectLedger;
|
|
40
53
|
readonly messages: AgentMessage[];
|
|
54
|
+
/** The kept results `ask-buoy.retrieve` reads from. Session-local, never persisted. */
|
|
55
|
+
readonly evidence: EvidenceStore;
|
|
56
|
+
/** The measured chars-per-token for this session's provider. */
|
|
57
|
+
readonly calibration: TokenCalibration;
|
|
58
|
+
/**
|
|
59
|
+
* `toolId.action` keys the user has waived the approval card for in this
|
|
60
|
+
* conversation. Read by the UI to show what is running unasked; cleared
|
|
61
|
+
* with the conversation, or one at a time with `untrust`.
|
|
62
|
+
*/
|
|
63
|
+
trustedActions(): string[];
|
|
64
|
+
untrust(key: string): void;
|
|
41
65
|
/**
|
|
42
66
|
* Reinstate a conversation from a previous run of the app, so the model
|
|
43
67
|
* remembers what was said before a reload or a crash. The history is
|
|
@@ -56,6 +80,33 @@ export interface AskBuoySession {
|
|
|
56
80
|
* separate store and kept rendering. Update in place instead.
|
|
57
81
|
*/
|
|
58
82
|
setAvailableActions(actions: Record<string, string[]>): void;
|
|
83
|
+
/**
|
|
84
|
+
* Turn this device's approval cards off, or back on.
|
|
85
|
+
*
|
|
86
|
+
* A DEVICE preference ("stop asking me"), not app policy — which is why it
|
|
87
|
+
* is a setter rather than a field on the config. The session is held across
|
|
88
|
+
* close and reopen so the conversation and the undo ledger survive, so a
|
|
89
|
+
* value captured when it was built could not be changed afterwards without
|
|
90
|
+
* throwing both away.
|
|
91
|
+
*
|
|
92
|
+
* It suppresses approval GATES only. `deny`, `allow`, `readOnly` and the
|
|
93
|
+
* release-build refusals are the app saying no, not the app asking a
|
|
94
|
+
* question, and a "stop asking" toggle must never widen what the agent can
|
|
95
|
+
* reach.
|
|
96
|
+
*/
|
|
97
|
+
setApprovalBypass(enabled: boolean): void;
|
|
98
|
+
/**
|
|
99
|
+
* The device's "look, don't touch" toggle.
|
|
100
|
+
*
|
|
101
|
+
* Effective policy is app read-only OR device read-only: this can only
|
|
102
|
+
* NARROW what the agent may do, never widen it — turning the device toggle
|
|
103
|
+
* off cannot switch off an app that configured `policy.readOnly`. Takes
|
|
104
|
+
* effect on the next call, including the remaining calls of a turn already
|
|
105
|
+
* running: the engine reads the policy object per call, and this mutates
|
|
106
|
+
* that object in place rather than handing the engine a new one at the next
|
|
107
|
+
* turn.
|
|
108
|
+
*/
|
|
109
|
+
setReadOnly(enabled: boolean): void;
|
|
59
110
|
send(text: string, signal?: AbortSignal): AsyncGenerator<TurnEvent, void, void>;
|
|
60
111
|
reset(): void;
|
|
61
112
|
}
|
|
@@ -75,7 +126,7 @@ export interface AskBuoySession {
|
|
|
75
126
|
* always resumes with a fresh user message instead, so their signatures are
|
|
76
127
|
* dead weight at best and a stale-signature 400 at worst.
|
|
77
128
|
*/
|
|
129
|
+
export { compressConsumed, trimHistory, trimHistoryReport };
|
|
78
130
|
export declare function resumableHistory(history: AgentMessage[]): AgentMessage[];
|
|
79
131
|
export declare function createAskBuoySession(config: AskBuoySessionConfig): AskBuoySession;
|
|
80
|
-
export {};
|
|
81
132
|
//# sourceMappingURL=session.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/session.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/session.ts"],"names":[],"mappings":"AAYA,OAAO,EAAgB,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAC1F,OAAO,EAAyD,KAAK,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAChH,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,gBAAgB,EAEhB,WAAW,EACX,iBAAiB,EAClB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAA0B,KAAK,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE7E,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEtE,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,QAAQ,EAAE,WAAW,GAAG,QAAQ,CAAC;IACjC,QAAQ,EAAE,UAAU,CAAC;IACrB;;;OAGG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC;IAC1B;;;OAGG;IACH,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IAC3C,MAA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BAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,IAAI,CAAC;IAC7D;;;;;;;;;;;;;OAaG;IACH,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1C;;;;;;;;;;OAUG;IACH,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACpC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,cAAc,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAChF,KAAK,IAAI,IAAI,CAAC;CACf;AAID;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;AAE5D,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CAUxE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,oBAAoB,GAAG,cAAc,CAyTjF"}
|
|
@@ -97,6 +97,12 @@ export interface ActionDescriptor {
|
|
|
97
97
|
* answer is "nothing is holding capture open", never "nothing happened".
|
|
98
98
|
*/
|
|
99
99
|
armsCapture?: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* The ENGINE answers this action itself — the device never sees the call
|
|
102
|
+
* (`ask-buoy.retrieve` reads the session's evidence store). Offered whenever
|
|
103
|
+
* the tool is present, even though no adapter advertises the action.
|
|
104
|
+
*/
|
|
105
|
+
servedBy?: "engine";
|
|
100
106
|
}
|
|
101
107
|
export interface ToolDescriptor {
|
|
102
108
|
/** The sync tool id — `query`, `route-events`, `time-machine`, … */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,QAA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-core",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.38",
|
|
4
4
|
"description": "Headless agent core for Ask Buoy - the tool catalog, BYO-model providers, turn loop and effect ledger that let an LLM drive Buoy devtools",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -10,6 +10,13 @@
|
|
|
10
10
|
"files": [
|
|
11
11
|
"lib"
|
|
12
12
|
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "bob build",
|
|
15
|
+
"typecheck": "tsc --noEmit",
|
|
16
|
+
"clean": "rimraf lib",
|
|
17
|
+
"test": "pnpm run typecheck",
|
|
18
|
+
"postinstall": "echo \"Run pnpm build to compile this package\""
|
|
19
|
+
},
|
|
13
20
|
"keywords": [
|
|
14
21
|
"react-native",
|
|
15
22
|
"devtools",
|
|
@@ -43,16 +50,9 @@
|
|
|
43
50
|
"bugs": {
|
|
44
51
|
"url": "https://github.com/LovesWorking/react-native-buoy/issues"
|
|
45
52
|
},
|
|
46
|
-
"homepage": "https://
|
|
53
|
+
"homepage": "https://buoy.gg/buoy/latest/docs/tools/ask-buoy",
|
|
47
54
|
"publishConfig": {
|
|
48
55
|
"access": "public",
|
|
49
56
|
"tag": "latest"
|
|
50
|
-
},
|
|
51
|
-
"scripts": {
|
|
52
|
-
"build": "bob build",
|
|
53
|
-
"typecheck": "tsc --noEmit",
|
|
54
|
-
"clean": "rimraf lib",
|
|
55
|
-
"test": "pnpm run typecheck",
|
|
56
|
-
"postinstall": "echo \"Run pnpm build to compile this package\""
|
|
57
57
|
}
|
|
58
|
-
}
|
|
58
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
PROPRIETARY SOFTWARE LICENSE
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024-present Buoy. All rights reserved.
|
|
4
|
-
|
|
5
|
-
This software and its source code are proprietary and confidential.
|
|
6
|
-
|
|
7
|
-
NOTICE: This is NOT open source software. This software is licensed,
|
|
8
|
-
not sold, and is protected by copyright laws and international treaties.
|
|
9
|
-
|
|
10
|
-
TERMS AND CONDITIONS:
|
|
11
|
-
|
|
12
|
-
1. LICENSE GRANT
|
|
13
|
-
Subject to the terms of this Agreement and payment of applicable fees,
|
|
14
|
-
Buoy grants you a limited, non-exclusive, non-transferable license
|
|
15
|
-
to use the compiled software packages in your applications.
|
|
16
|
-
|
|
17
|
-
2. RESTRICTIONS
|
|
18
|
-
You may NOT:
|
|
19
|
-
- Copy, modify, or distribute the source code
|
|
20
|
-
- Reverse engineer, decompile, or disassemble the software
|
|
21
|
-
- Remove or alter any proprietary notices or labels
|
|
22
|
-
- Sublicense, rent, lease, or lend the software
|
|
23
|
-
- Use the software to create competing products
|
|
24
|
-
- Share access credentials with unauthorized parties
|
|
25
|
-
|
|
26
|
-
3. OWNERSHIP
|
|
27
|
-
React Buoy retains all right, title, and interest in the software,
|
|
28
|
-
including all intellectual property rights. This license does not
|
|
29
|
-
grant you any rights to trademarks or service marks.
|
|
30
|
-
|
|
31
|
-
4. TERMINATION
|
|
32
|
-
This license is effective until terminated. Your rights under this
|
|
33
|
-
license will terminate automatically without notice if you fail to
|
|
34
|
-
comply with any of its terms. Upon termination, you must cease all
|
|
35
|
-
use and destroy all copies of the software.
|
|
36
|
-
|
|
37
|
-
5. DISCLAIMER OF WARRANTIES
|
|
38
|
-
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
|
|
39
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
40
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
|
|
41
|
-
|
|
42
|
-
6. LIMITATION OF LIABILITY
|
|
43
|
-
IN NO EVENT SHALL BUOY BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
|
|
44
|
-
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR IN
|
|
45
|
-
CONNECTION WITH THIS LICENSE OR THE USE OF THE SOFTWARE.
|
|
46
|
-
|
|
47
|
-
7. GOVERNING LAW
|
|
48
|
-
This Agreement shall be governed by and construed in accordance with
|
|
49
|
-
the laws of the United States, without regard to its conflict of
|
|
50
|
-
law provisions.
|
|
51
|
-
|
|
52
|
-
For licensing inquiries and subscription information:
|
|
53
|
-
- Website: https://buoy.gg
|
|
54
|
-
- Email: AustinLovesWorking@gmail.com
|
|
55
|
-
|
|
56
|
-
Unauthorized reproduction or distribution of this software, or any
|
|
57
|
-
portion of it, may result in severe civil and criminal penalties,
|
|
58
|
-
and will be prosecuted to the maximum extent possible under the law.
|