@tangle-network/agent-app 0.63.5 → 0.63.7
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/assistant/index.js +1 -1
- package/dist/chat-routes/default-backend.d.ts +46 -0
- package/dist/chat-routes/dispatch-first.d.ts +3 -2
- package/dist/chat-routes/index.d.ts +1 -0
- package/dist/chat-routes/index.js +13 -345
- package/dist/chat-routes/index.js.map +1 -1
- package/dist/chat-routes/route-prewarm.d.ts +2 -0
- package/dist/chat-routes/route-storage.d.ts +13 -4
- package/dist/chat-routes/sandbox-model-source.d.ts +1 -0
- package/dist/chat-routes/turn-ownership.d.ts +2 -1
- package/dist/chat-routes/turn-route-contracts.d.ts +21 -5
- package/dist/{chunk-XYSKMHWG.js → chunk-42QCR4CV.js} +548 -15
- package/dist/chunk-42QCR4CV.js.map +1 -0
- package/dist/{chunk-JRTWTADT.js → chunk-E3AOUTIR.js} +5 -2
- package/dist/chunk-E3AOUTIR.js.map +1 -0
- package/dist/{chunk-IDG2XR5O.js → chunk-EKXG4JSN.js} +2 -2
- package/dist/chunk-EKXG4JSN.js.map +1 -0
- package/dist/{chunk-4CALWPN5.js → chunk-L6BS2XTE.js} +20 -16
- package/dist/chunk-L6BS2XTE.js.map +1 -0
- package/dist/{chunk-YCMVNXAX.js → chunk-NUWSPR5O.js} +2 -2
- package/dist/{chunk-OCR36QGZ.js → chunk-UVMKP5IK.js} +65 -28
- package/dist/chunk-UVMKP5IK.js.map +1 -0
- package/dist/public-consultation/index.js +3 -3
- package/dist/runtime/index.js +2 -2
- package/dist/runtime/router-turn.d.ts +2 -2
- package/dist/runtime/router-turn.js +1 -1
- package/dist/sandbox/index.js +1 -1
- package/dist/sandbox/prompt-events.d.ts +1 -1
- package/dist/sandbox/sandbox-run-error.d.ts +8 -0
- package/dist/sandbox/sandbox-run-tool.d.ts +5 -9
- package/dist/signoff/cli.js +1 -1
- package/dist/signoff/index.js +1 -1
- package/dist/web-react/durable-plan-flow.d.ts +10 -0
- package/dist/web-react/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4CALWPN5.js.map +0 -1
- package/dist/chunk-IDG2XR5O.js.map +0 -1
- package/dist/chunk-JRTWTADT.js.map +0 -1
- package/dist/chunk-OCR36QGZ.js.map +0 -1
- package/dist/chunk-XYSKMHWG.js.map +0 -1
- /package/dist/{chunk-YCMVNXAX.js.map → chunk-NUWSPR5O.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createChatTurnRoutes,
|
|
3
3
|
streamChatRouteAsSandboxEvents
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-42QCR4CV.js";
|
|
5
5
|
import "../chunk-KH4QSBNI.js";
|
|
6
6
|
import "../chunk-CQGEGPY7.js";
|
|
7
7
|
import "../chunk-RN4WPTBH.js";
|
|
@@ -9,7 +9,7 @@ import "../chunk-WP2GYFZ4.js";
|
|
|
9
9
|
import "../chunk-4DBHC63F.js";
|
|
10
10
|
import "../chunk-MH74DY2I.js";
|
|
11
11
|
import "../chunk-MM6RLOXF.js";
|
|
12
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-UVMKP5IK.js";
|
|
13
13
|
import "../chunk-F4TUZYMX.js";
|
|
14
14
|
import "../chunk-N6URQ6DM.js";
|
|
15
15
|
import "../chunk-Z4RD5UF7.js";
|
|
@@ -33,7 +33,7 @@ import "../chunk-S5SRJJQG.js";
|
|
|
33
33
|
import "../chunk-FCYHDENJ.js";
|
|
34
34
|
import "../chunk-UGWQLQDS.js";
|
|
35
35
|
import "../chunk-HRBF4B5L.js";
|
|
36
|
-
import "../chunk-
|
|
36
|
+
import "../chunk-EKXG4JSN.js";
|
|
37
37
|
import "../chunk-D6UJEOZQ.js";
|
|
38
38
|
import "../chunk-AVBNS64P.js";
|
|
39
39
|
import "../chunk-AMUXRAUO.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-NUWSPR5O.js";
|
|
6
6
|
import {
|
|
7
7
|
DURABLE_HOP_BUDGET_MS,
|
|
8
8
|
asksForLanguage,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
turnKnowledgeInstructions,
|
|
27
27
|
workspaceKnowledgeForTurn,
|
|
28
28
|
workspaceTurnCheckpoints
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-EKXG4JSN.js";
|
|
30
30
|
import {
|
|
31
31
|
DEFAULT_TANGLE_BILLING_ENFORCEMENT_ENV_VAR,
|
|
32
32
|
DEFAULT_TANGLE_ROUTER_BASE_URL,
|
|
@@ -269,8 +269,8 @@ export interface RouterTurnOptions {
|
|
|
269
269
|
/** At most this many tool calls run. The next one is refused before it runs and the turn ends
|
|
270
270
|
* with `turn_tool_limit`. */
|
|
271
271
|
maxToolCalls?: number;
|
|
272
|
-
/** Replace
|
|
273
|
-
renderToolResult?: (toolName: string, outcome: RouterTurnToolOutcome) => string;
|
|
272
|
+
/** Replace a domain-specific tool result; return undefined to use the shared serialization and limit. */
|
|
273
|
+
renderToolResult?: (toolName: string, outcome: RouterTurnToolOutcome) => string | undefined;
|
|
274
274
|
/**
|
|
275
275
|
* Place the turn before any model call, using `model` as the executed model rather than
|
|
276
276
|
* the optional `requestedModel` hint. A turn placed in the sandbox returns at once
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
turnKnowledgeInstructions,
|
|
14
14
|
workspaceKnowledgeForTurn,
|
|
15
15
|
workspaceTurnCheckpoints
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-EKXG4JSN.js";
|
|
17
17
|
import "../chunk-D6UJEOZQ.js";
|
|
18
18
|
import "../chunk-AVBNS64P.js";
|
|
19
19
|
import "../chunk-AMUXRAUO.js";
|
package/dist/sandbox/index.js
CHANGED
|
@@ -65,7 +65,7 @@ export type SandboxStepTransition = {
|
|
|
65
65
|
};
|
|
66
66
|
/** Resolve the severed stream event to a corresponding sandbox step transition or null */
|
|
67
67
|
export declare function classifySeveredStream(event: unknown): SandboxStepTransition | null;
|
|
68
|
-
/**
|
|
68
|
+
/** A backend result or terminal event, excluding SDK cleanup after observation loss. */
|
|
69
69
|
export declare function isTerminalPromptEvent(event: unknown): boolean;
|
|
70
70
|
/** Resolve the interactive question text from a structured event or return null if none found */
|
|
71
71
|
export declare function detectInteractiveQuestion(event: unknown): string | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Typed computer-task outcomes shared by prompt observation and the Router tool. */
|
|
2
|
+
export type SandboxRunFailureCode = 'sandbox_unavailable' | 'sandbox_failed' | 'sandbox_unconfirmed' | 'sandbox_empty' | 'invalid_arguments';
|
|
3
|
+
export declare class SandboxRunError extends Error {
|
|
4
|
+
readonly code: SandboxRunFailureCode;
|
|
5
|
+
constructor(code: SandboxRunFailureCode, message: string, options?: {
|
|
6
|
+
cause?: unknown;
|
|
7
|
+
});
|
|
8
|
+
}
|
|
@@ -21,14 +21,8 @@
|
|
|
21
21
|
import type { SandboxInstance } from '@tangle-network/sandbox';
|
|
22
22
|
import type { TurnSpan, TurnTrace } from '../turn-trace/recorder';
|
|
23
23
|
import { type SandboxRuntimeConfig, type StreamSandboxPromptOptions } from './index';
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export declare class SandboxRunError extends Error {
|
|
27
|
-
readonly code: SandboxRunFailureCode;
|
|
28
|
-
constructor(code: SandboxRunFailureCode, message: string, options?: {
|
|
29
|
-
cause?: unknown;
|
|
30
|
-
});
|
|
31
|
-
}
|
|
24
|
+
import { SandboxRunError } from './sandbox-run-error';
|
|
25
|
+
export { SandboxRunError, type SandboxRunFailureCode } from './sandbox-run-error';
|
|
32
26
|
/** The engine's per-call tool context (`RouterTurnToolContext`), kept structural so this module does not import the engine. */
|
|
33
27
|
export interface SandboxToolContext {
|
|
34
28
|
/** The Router engine's call identity; never derived from task text. */
|
|
@@ -90,6 +84,8 @@ export interface SandboxRunTool {
|
|
|
90
84
|
}>;
|
|
91
85
|
}
|
|
92
86
|
export declare const SANDBOX_RUN_DESCRIPTION: string;
|
|
93
|
-
/** The
|
|
87
|
+
/** The shell's unattended runner. A supplied execution/turn id seeds child
|
|
88
|
+
* identity with the actual tool callId: different calls stay separate and a
|
|
89
|
+
* retry of that exact call stays idempotent. Without callId, use a fresh child. */
|
|
94
90
|
export declare function sandboxPromptRunner(shell: SandboxRuntimeConfig, prompt?: Omit<StreamSandboxPromptOptions, 'signal' | 'history'>): SandboxRunToolOptions['runTask'];
|
|
95
91
|
export declare function createSandboxRunTool(options: SandboxRunToolOptions): SandboxRunTool;
|
package/dist/signoff/cli.js
CHANGED
package/dist/signoff/index.js
CHANGED
|
@@ -33,6 +33,8 @@ export interface DurablePlanCurrentInput {
|
|
|
33
33
|
}
|
|
34
34
|
/** Define methods to obtain and decide durable plan decisions asynchronously */
|
|
35
35
|
export interface DurablePlanDecisionClient {
|
|
36
|
+
/** Stable transport context, independent of the client object's identity. */
|
|
37
|
+
readonly scopeKey?: string;
|
|
36
38
|
current: (input: DurablePlanCurrentInput) => Promise<DurablePlanDecisionResult>;
|
|
37
39
|
decide: (input: DurablePlanDecisionInput) => Promise<DurablePlanDecisionResult>;
|
|
38
40
|
}
|
|
@@ -46,6 +48,9 @@ export declare class DurablePlanClientError extends Error {
|
|
|
46
48
|
/** Define configuration options for creating a durable plan decision client */
|
|
47
49
|
export interface DurablePlanDecisionClientOptions {
|
|
48
50
|
url: string | ((input: DurablePlanCurrentInput | DurablePlanDecisionInput) => string);
|
|
51
|
+
/** Non-secret endpoint/workspace/authentication identity. Defaults to a
|
|
52
|
+
* string URL; function URLs and authentication changes need an explicit key. */
|
|
53
|
+
scopeKey?: string;
|
|
49
54
|
body?: Record<string, unknown> | ((input: DurablePlanDecisionInput) => Record<string, unknown>);
|
|
50
55
|
fetchImpl?: typeof fetch;
|
|
51
56
|
}
|
|
@@ -57,6 +62,11 @@ export declare function createDurablePlanDecisionClient(options: DurablePlanDeci
|
|
|
57
62
|
export interface UseDurablePlanFlowOptions {
|
|
58
63
|
plan: ChatPlan;
|
|
59
64
|
client: DurablePlanDecisionClient;
|
|
65
|
+
/** Stable, non-secret identity of the endpoint/workspace/authentication
|
|
66
|
+
* context. Change it when that context changes even if the plan does not.
|
|
67
|
+
* Defaults to client.scopeKey. Incidental client object recreation does not
|
|
68
|
+
* change request lifetime. */
|
|
69
|
+
scopeKey?: string;
|
|
60
70
|
/** Must be idempotent by receipt.receiptId. */
|
|
61
71
|
attachFollowUp?: (receipt: DurablePlanFollowUpReceipt, plan: ChatPlan, decision: DurablePlanDecision) => Promise<void> | void;
|
|
62
72
|
/** Restore an already-decided plan and bound failed follow-up attachment attempts. */
|
package/dist/web-react/index.js
CHANGED
package/package.json
CHANGED