@tangle-network/agent-app 0.60.267 → 0.60.268
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/chat-routes/index.js +1 -1
- package/dist/{chunk-3Q2JI5MQ.js → chunk-UJKWM4UY.js} +59 -1
- package/dist/chunk-UJKWM4UY.js.map +1 -0
- package/dist/public-consultation/index.d.ts +1 -1
- package/dist/sandbox/index.d.ts +1 -0
- package/dist/sandbox/index.js +3 -1
- package/dist/sandbox/warm-cache.d.ts +47 -0
- package/package.json +3 -3
- package/dist/chunk-3Q2JI5MQ.js.map +0 -1
|
@@ -121,9 +121,9 @@ export declare function createPublicConsultation(options: PublicConsultationOpti
|
|
|
121
121
|
executionBudget?: ChatTurnExecutionLimits;
|
|
122
122
|
maxOutputTokens?: number;
|
|
123
123
|
}) => Promise<{
|
|
124
|
+
start?: undefined;
|
|
124
125
|
status: 'unsupported';
|
|
125
126
|
reason: string;
|
|
126
|
-
start?: undefined;
|
|
127
127
|
} | {
|
|
128
128
|
reason?: undefined;
|
|
129
129
|
status: 'prepared';
|
package/dist/sandbox/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { traceSandboxPromptEvents, type TraceSandboxPromptOptions } from './prompt-trace';
|
|
2
2
|
export { createCacheReuseStore, type ReuseCacheLike, type ReuseChecks, type ReuseStateStore, type SharedReuseState, } from './reuse-state';
|
|
3
|
+
export * from './warm-cache';
|
|
3
4
|
export type { Outcome } from './outcome';
|
|
4
5
|
export * from './binary-read';
|
|
5
6
|
export * from './transient-failure';
|
package/dist/sandbox/index.js
CHANGED
|
@@ -53,6 +53,7 @@ import {
|
|
|
53
53
|
createSandboxPrewarmer,
|
|
54
54
|
createSandboxRunTool,
|
|
55
55
|
createSandboxTerminalConnectionRoute,
|
|
56
|
+
createWarmCache,
|
|
56
57
|
createWarmLeases,
|
|
57
58
|
createWorkspacePrewarmRoute,
|
|
58
59
|
createWorkspaceSandboxManager,
|
|
@@ -101,7 +102,7 @@ import {
|
|
|
101
102
|
warmKey,
|
|
102
103
|
warmReceiptId,
|
|
103
104
|
warmWeekdayOf
|
|
104
|
-
} from "../chunk-
|
|
105
|
+
} from "../chunk-UJKWM4UY.js";
|
|
105
106
|
import {
|
|
106
107
|
EGRESS_PROXY_RECOVERY_PHASE,
|
|
107
108
|
EGRESS_PROXY_RECOVERY_REQUIRED,
|
|
@@ -230,6 +231,7 @@ export {
|
|
|
230
231
|
createSandboxPrewarmer,
|
|
231
232
|
createSandboxRunTool,
|
|
232
233
|
createSandboxTerminalConnectionRoute,
|
|
234
|
+
createWarmCache,
|
|
233
235
|
createWarmLeases,
|
|
234
236
|
createWorkspacePrewarmRoute,
|
|
235
237
|
createWorkspaceSandboxManager,
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A value computed once and read by every later request of the same key until
|
|
3
|
+
* it expires: this isolate's Map first, then the data center's Workers cache, so
|
|
4
|
+
* a request served by another isolate (or warmed by a workspace prewarm on page
|
|
5
|
+
* open or composer focus) reads the value instead of computing it again.
|
|
6
|
+
*
|
|
7
|
+
* Mechanism only: the product decides what is cached, for how long, and when a
|
|
8
|
+
* refusal must `forget` it. Lifted from Creative (creative-agent#691), which
|
|
9
|
+
* caches its connected-tool catalog and its billing verdicts with it.
|
|
10
|
+
*
|
|
11
|
+
* Keys name a subject (a user), never a credential: a key in a cache URL is
|
|
12
|
+
* stored in the clear.
|
|
13
|
+
*/
|
|
14
|
+
/** Which layer answered a read: this isolate's memory or the data center's Workers cache. */
|
|
15
|
+
export type WarmCacheSource = 'isolate' | 'colo';
|
|
16
|
+
export interface WarmCache<T> {
|
|
17
|
+
read(key: string): Promise<{
|
|
18
|
+
value: T;
|
|
19
|
+
source: WarmCacheSource;
|
|
20
|
+
} | null>;
|
|
21
|
+
/** Awaited: a prewarm's response ends right after it, which could cancel the write. */
|
|
22
|
+
write(key: string, value: T, ttlMs: number): Promise<void>;
|
|
23
|
+
forget(key: string): Promise<void>;
|
|
24
|
+
/** Test seam: clears this isolate's layer only. */
|
|
25
|
+
clearIsolate(): void;
|
|
26
|
+
}
|
|
27
|
+
export interface WarmCacheOptions {
|
|
28
|
+
/**
|
|
29
|
+
* `false` keeps only the data center's layer, so `forget` reaches every
|
|
30
|
+
* isolate there: use it for a value a refusal must end everywhere at once.
|
|
31
|
+
* Default `true`.
|
|
32
|
+
*/
|
|
33
|
+
isolate?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The deployment environment, part of every cache key because staging and
|
|
36
|
+
* production share a zone's cache. A function is read on each call, so a
|
|
37
|
+
* module-level cache can follow an environment bound after import.
|
|
38
|
+
* Default `'production'`.
|
|
39
|
+
*/
|
|
40
|
+
env?: string | (() => string | undefined);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* `namespace` is the cache URL's host; it names no origin and is never routed.
|
|
44
|
+
* Use one namespace per product and value kind, such as
|
|
45
|
+
* `connected-tools.creative.internal`.
|
|
46
|
+
*/
|
|
47
|
+
export declare function createWarmCache<T>(namespace: string, options?: WarmCacheOptions): WarmCache<T>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-app",
|
|
3
|
-
"version": "0.60.
|
|
3
|
+
"version": "0.60.268",
|
|
4
4
|
"packageManager": "pnpm@11.24.0",
|
|
5
5
|
"description": "Build agent applications with typed chat, tools, sandboxes, integrations, billing, and evaluation.",
|
|
6
6
|
"keywords": [
|
|
@@ -804,8 +804,8 @@
|
|
|
804
804
|
"@tangle-network/agent-profile-materialize": "0.27.1",
|
|
805
805
|
"@tangle-network/agent-runtime": "0.343.3",
|
|
806
806
|
"@tangle-network/brand": "1.26.2",
|
|
807
|
-
"@tangle-network/hub-sdk": "0.30.
|
|
808
|
-
"@tangle-network/sandbox": "0.64.
|
|
807
|
+
"@tangle-network/hub-sdk": "0.30.14",
|
|
808
|
+
"@tangle-network/sandbox": "0.64.7",
|
|
809
809
|
"@tangle-network/sandbox-ui": "0.136.1",
|
|
810
810
|
"@tangle-network/ui": "11.41.0",
|
|
811
811
|
"@testing-library/dom": "^10.4.1",
|