@tangle-network/agent-app 4.0.30 → 4.0.32
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 +5 -5
- package/dist/{chunk-RK2VCJQW.js → chunk-5L3X42ES.js} +2 -2
- package/dist/{chunk-LSUJ2RIC.js → chunk-AG5Q273U.js} +2 -2
- package/dist/{chunk-GHBQUZYG.js → chunk-DSFMSRWT.js} +4 -4
- package/dist/{chunk-7TZX2KSH.js → chunk-G3W3EIP4.js} +11 -4
- package/dist/chunk-G3W3EIP4.js.map +1 -0
- package/dist/{chunk-H7NMUXNZ.js → chunk-JLKH2VYF.js} +5 -4
- package/dist/chunk-JLKH2VYF.js.map +1 -0
- package/dist/platform/agent-spend.d.ts +2 -1
- package/dist/platform/delegated-keys.d.ts +2 -1
- package/dist/platform/index.js +47 -23
- package/dist/platform/index.js.map +1 -1
- package/dist/platform/platform-busy.d.ts +17 -0
- package/dist/preset-cloudflare/index.js +1 -1
- package/dist/public-consultation/index.d.ts +1 -1
- package/dist/public-consultation/index.js +4 -4
- package/dist/runtime/index.js +3 -3
- package/dist/runtime/router-turn.js +2 -2
- package/dist/sandbox/index.js +2 -2
- package/dist/turn-trace/index.js +1 -1
- package/dist/turn-trace/recorder.d.ts +2 -1
- package/package.json +1 -1
- package/dist/chunk-7TZX2KSH.js.map +0 -1
- package/dist/chunk-H7NMUXNZ.js.map +0 -1
- /package/dist/{chunk-RK2VCJQW.js.map → chunk-5L3X42ES.js.map} +0 -0
- /package/dist/{chunk-LSUJ2RIC.js.map → chunk-AG5Q273U.js.map} +0 -0
- /package/dist/{chunk-GHBQUZYG.js.map → chunk-DSFMSRWT.js.map} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Send a Platform request through a busy writer. Platform answers 503 `PLATFORM_BUSY` with `Retry-After` when its
|
|
3
|
+
* one SQLite writer is backed up past about 1 s (agent-container #19577, #19603, #19614): a service key write such as
|
|
4
|
+
* `POST /v1/keys/delegate` is refused before it queues, and a write that met a locked writer is rolled back. That
|
|
5
|
+
* answer carries no verdict, so the same request is sent again after Retry-After × (1 + U[0, 1)), spread so a shed
|
|
6
|
+
* burst does not come back in lockstep, while the deadline leaves the next attempt room. Any other answer, or a fetch
|
|
7
|
+
* that throws, is returned at once. The Sandbox Worker's Platform client waits the same way inside its 8 s delegation
|
|
8
|
+
* budget (agent-container `products/sandbox/api/src/lib/platform-client-errors.ts`).
|
|
9
|
+
*/
|
|
10
|
+
/** A caller's own end for the wait, when it comes before the 8 s budget, and a signal that stops it early. */
|
|
11
|
+
export interface PlatformBusyWait {
|
|
12
|
+
deadline?: number;
|
|
13
|
+
signal?: AbortSignal;
|
|
14
|
+
}
|
|
15
|
+
/** Wait `ms`, or less when `signal` aborts first; answers whether the wait ran its course. */
|
|
16
|
+
export declare function sleepUnlessAborted(ms: number, signal?: AbortSignal): Promise<boolean>;
|
|
17
|
+
export declare function sendThroughPlatformBusy(send: (signal: AbortSignal) => Promise<Response>, wait?: PlatformBusyWait): Promise<Response>;
|
|
@@ -121,9 +121,9 @@ export declare function createPublicConsultation(options: PublicConsultationOpti
|
|
|
121
121
|
executionBudget?: ChatTurnExecutionLimits;
|
|
122
122
|
maxOutputTokens?: number;
|
|
123
123
|
}) => Promise<{
|
|
124
|
-
start?: undefined;
|
|
125
124
|
status: 'unsupported';
|
|
126
125
|
reason: string;
|
|
126
|
+
start?: undefined;
|
|
127
127
|
} | {
|
|
128
128
|
reason?: undefined;
|
|
129
129
|
status: 'prepared';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createChatTurnRoutes,
|
|
3
3
|
streamChatRouteAsSandboxEvents
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-DSFMSRWT.js";
|
|
5
5
|
import "../chunk-SBHFMDR7.js";
|
|
6
6
|
import "../chunk-H6BRJU5M.js";
|
|
7
7
|
import "../chunk-4DBHC63F.js";
|
|
8
8
|
import "../chunk-RN4WPTBH.js";
|
|
9
9
|
import "../chunk-MM6RLOXF.js";
|
|
10
10
|
import "../chunk-M4QITAQV.js";
|
|
11
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-G3W3EIP4.js";
|
|
12
12
|
import "../chunk-F4TUZYMX.js";
|
|
13
13
|
import "../chunk-MH74DY2I.js";
|
|
14
14
|
import "../chunk-O6MFZVNS.js";
|
|
@@ -36,9 +36,9 @@ import "../chunk-S5SRJJQG.js";
|
|
|
36
36
|
import "../chunk-GD4ONMKJ.js";
|
|
37
37
|
import "../chunk-UGWQLQDS.js";
|
|
38
38
|
import "../chunk-R32MULDK.js";
|
|
39
|
-
import "../chunk-
|
|
39
|
+
import "../chunk-AG5Q273U.js";
|
|
40
40
|
import "../chunk-D6UJEOZQ.js";
|
|
41
|
-
import "../chunk-
|
|
41
|
+
import "../chunk-JLKH2VYF.js";
|
|
42
42
|
import "../chunk-KSLTD4FI.js";
|
|
43
43
|
import "../chunk-5VE4IDSU.js";
|
|
44
44
|
import "../chunk-67CSI5PU.js";
|
package/dist/runtime/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
ProtectedModelSettlementError,
|
|
3
3
|
createRouterProtectedModelPort,
|
|
4
4
|
runProtectedRouterTurn
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-5L3X42ES.js";
|
|
6
6
|
import {
|
|
7
7
|
DURABLE_HOP_BUDGET_MS,
|
|
8
8
|
asksForLanguage,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
turnKnowledgeInstructions,
|
|
28
28
|
workspaceKnowledgeForTurn,
|
|
29
29
|
workspaceTurnCheckpoints
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-AG5Q273U.js";
|
|
31
31
|
import {
|
|
32
32
|
DEFAULT_TANGLE_BILLING_ENFORCEMENT_ENV_VAR,
|
|
33
33
|
DEFAULT_TANGLE_ROUTER_BASE_URL,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
tangleExecutionKeyHttpError,
|
|
44
44
|
trimOrNull
|
|
45
45
|
} from "../chunk-D6UJEOZQ.js";
|
|
46
|
-
import "../chunk-
|
|
46
|
+
import "../chunk-JLKH2VYF.js";
|
|
47
47
|
import {
|
|
48
48
|
MAX_RECOMMENDED_MODELS,
|
|
49
49
|
__resetCatalogCache,
|
|
@@ -14,9 +14,9 @@ import {
|
|
|
14
14
|
turnKnowledgeInstructions,
|
|
15
15
|
workspaceKnowledgeForTurn,
|
|
16
16
|
workspaceTurnCheckpoints
|
|
17
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-AG5Q273U.js";
|
|
18
18
|
import "../chunk-D6UJEOZQ.js";
|
|
19
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-JLKH2VYF.js";
|
|
20
20
|
import "../chunk-KSLTD4FI.js";
|
|
21
21
|
export {
|
|
22
22
|
DURABLE_HOP_BUDGET_MS,
|
package/dist/sandbox/index.js
CHANGED
|
@@ -114,7 +114,7 @@ import {
|
|
|
114
114
|
warmKey,
|
|
115
115
|
warmReceiptId,
|
|
116
116
|
warmWeekdayOf
|
|
117
|
-
} from "../chunk-
|
|
117
|
+
} from "../chunk-G3W3EIP4.js";
|
|
118
118
|
import {
|
|
119
119
|
createWarmCache
|
|
120
120
|
} from "../chunk-F4TUZYMX.js";
|
|
@@ -177,7 +177,7 @@ import "../chunk-GD4ONMKJ.js";
|
|
|
177
177
|
import "../chunk-UGWQLQDS.js";
|
|
178
178
|
import "../chunk-R32MULDK.js";
|
|
179
179
|
import "../chunk-D6UJEOZQ.js";
|
|
180
|
-
import "../chunk-
|
|
180
|
+
import "../chunk-JLKH2VYF.js";
|
|
181
181
|
import {
|
|
182
182
|
splitDeferredProfileFiles,
|
|
183
183
|
writeProfileFilesToBox
|
package/dist/turn-trace/index.js
CHANGED
|
@@ -102,7 +102,8 @@ export interface TurnTrace {
|
|
|
102
102
|
/** Name the turn's execution id once it is known. Spans recorded earlier keep their times. */
|
|
103
103
|
bind(executionId: string): void;
|
|
104
104
|
start(name: string, kind: TurnSpanKind, attrs?: TurnSpanAttrs, parent?: TurnSpan): TurnSpan;
|
|
105
|
-
|
|
105
|
+
/** A span whose times are already known; `error` marks it failed, as `end` does for an open one. */
|
|
106
|
+
record(name: string, kind: TurnSpanKind, startMs: number, endMs: number, attrs?: TurnSpanAttrs, parent?: TurnSpan, error?: unknown): TurnSpan;
|
|
106
107
|
/** Run `work` inside a span; the span ends when it settles, failed if it throws. */
|
|
107
108
|
measure<T>(name: string, kind: TurnSpanKind, work: (span: TurnSpan) => Promise<T> | T, attrs?: TurnSpanAttrs, parent?: TurnSpan): Promise<T>;
|
|
108
109
|
/**
|
package/package.json
CHANGED