@tangle-network/agent-app 4.0.14 → 4.0.16
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/billing/identity-bound.d.ts +5 -9
- package/dist/billing/index.js +1 -1
- package/dist/chat-routes/detached-turn.d.ts +1 -1
- package/dist/chat-routes/failure-wording.d.ts +3 -4
- package/dist/chat-routes/index.js +3 -3
- package/dist/chat-routes/index.js.map +1 -1
- package/dist/{chunk-UXVSX5N6.js → chunk-CM5W7U7S.js} +9 -5
- package/dist/chunk-CM5W7U7S.js.map +1 -0
- package/dist/{chunk-TMWUWKLU.js → chunk-GE242CLI.js} +2 -2
- package/dist/{chunk-RNDWCT4O.js → chunk-MZZMOGFN.js} +101 -89
- package/dist/{chunk-RNDWCT4O.js.map → chunk-MZZMOGFN.js.map} +1 -1
- package/dist/{chunk-FAI54DBZ.js → chunk-RFXROORA.js} +11 -11
- package/dist/chunk-RFXROORA.js.map +1 -0
- package/dist/platform/delegated-keys.d.ts +1 -0
- package/dist/platform/index.js +2 -1
- package/dist/platform/index.js.map +1 -1
- package/dist/preset-cloudflare/index.js +3 -3
- package/dist/public-consultation/index.js +2 -2
- package/dist/turn-health/index.js +3 -1
- package/dist/turn-health/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-FAI54DBZ.js.map +0 -1
- package/dist/chunk-UXVSX5N6.js.map +0 -1
- /package/dist/{chunk-TMWUWKLU.js.map → chunk-GE242CLI.js.map} +0 -0
|
@@ -33,7 +33,7 @@ export interface DurableWorkspaceKeyRecord {
|
|
|
33
33
|
idempotencyKey?: string | null;
|
|
34
34
|
keyId: string;
|
|
35
35
|
keyEncrypted: string;
|
|
36
|
-
/** 0 for a spend-through child
|
|
36
|
+
/** A provisioning row keeps the requested budget. An active row: 0 for a confirmed spend-through child, which spends its source's cap. */
|
|
37
37
|
budgetUsd: number;
|
|
38
38
|
expiresAt: Date;
|
|
39
39
|
status: WorkspaceKeyStatus;
|
|
@@ -46,8 +46,10 @@ export interface DurableWorkspaceKeyRecord {
|
|
|
46
46
|
export interface DurableWorkspaceKeyProvisioningRecord extends DurableWorkspaceKeyRecord {
|
|
47
47
|
status: 'provisioning';
|
|
48
48
|
}
|
|
49
|
+
/** `spendThrough: true` confirms the child has no budget of its own; without it the child is sized at the requested budget. */
|
|
49
50
|
type DurableWorkspaceKeyCreateResult = Awaited<ReturnType<KeyProvisioner['createKey']>> & {
|
|
50
51
|
budgetUsd?: number | null;
|
|
52
|
+
spendThrough?: true;
|
|
51
53
|
expiresAt?: string | null;
|
|
52
54
|
};
|
|
53
55
|
/** The exact request identity that must be reused when recovering a create. */
|
|
@@ -96,13 +98,7 @@ export interface DurableWorkspaceKeyConditionalWrites {
|
|
|
96
98
|
keyId: string;
|
|
97
99
|
}): Promise<boolean>;
|
|
98
100
|
/** Return false when the row was no longer provisioning. */
|
|
99
|
-
markActive(input:
|
|
100
|
-
id: string;
|
|
101
|
-
keyId: string;
|
|
102
|
-
keyEncrypted: string;
|
|
103
|
-
expiresAt: Date;
|
|
104
|
-
budgetUsd: number;
|
|
105
|
-
}): Promise<boolean>;
|
|
101
|
+
markActive(input: Parameters<DurableWorkspaceKeyStore['markActive']>[0]): Promise<boolean>;
|
|
106
102
|
}
|
|
107
103
|
/** Persistence operations for identity-bound key lifecycle state. */
|
|
108
104
|
export interface DurableWorkspaceKeyStore {
|
|
@@ -234,7 +230,7 @@ export interface DurableWorkspaceKeyManagerOptions {
|
|
|
234
230
|
/** Recognize a missing remote key without depending on a provider SDK. */
|
|
235
231
|
isRemoteMissing?: (error: unknown) => boolean;
|
|
236
232
|
}
|
|
237
|
-
/** Default reuse floor
|
|
233
|
+
/** Default child-key reuse floor; set minRemainingLifetimeMs to cover the caller's execution policy and safety margin. */
|
|
238
234
|
export declare const DEFAULT_MIN_REMAINING_KEY_LIFETIME_MS: number;
|
|
239
235
|
/**
|
|
240
236
|
* Create a product-neutral manager for child-key issuance and cleanup.
|
package/dist/billing/index.js
CHANGED
|
@@ -173,7 +173,7 @@ export interface DetachedTurnResult {
|
|
|
173
173
|
/** True when the preferred model did not serve. Makes an autonomous
|
|
174
174
|
* downgrade — which no human watched happen — attributable after the fact. */
|
|
175
175
|
usedModelFallback?: boolean;
|
|
176
|
-
/** Every model tried, in order
|
|
176
|
+
/** Every model tried, in order. Each attempt's raw `reason` is server-only; never render or send it to a client. */
|
|
177
177
|
modelAttempts?: ModelFailoverAttempt[];
|
|
178
178
|
}
|
|
179
179
|
/**
|
|
@@ -30,9 +30,10 @@ export interface FailureView {
|
|
|
30
30
|
export declare function failureIds(source: unknown): Record<string, string>;
|
|
31
31
|
/** The text a failure adds to the answer: its sentence, after a lead line for the classes that carry one. */
|
|
32
32
|
export declare function failureText(view: FailureView, partialAnswer: string): string;
|
|
33
|
-
/** The reason
|
|
34
|
-
* properties, the top level, or a raw harness event. Empty when there is none, so a failure always reads its class. */
|
|
33
|
+
/** The reason stays server-side; a closed protocol reason is a class, not prose. */
|
|
35
34
|
export declare function failureReason(event: unknown): string;
|
|
35
|
+
/** One code extractor for the wire, raw harness events and the answer text. */
|
|
36
|
+
export declare function failureCode(event: unknown): string | undefined;
|
|
36
37
|
/** One turn's person-facing filter. `view` classifies a failure reason; every reason is logged once, at warn (`log`,
|
|
37
38
|
* else `console.warn`), with its class and ids, and the same reason reads the same wherever it appears. `warning`
|
|
38
39
|
* gives an allowed warning's sentence. `event` is every event the producer yields as it may reach the client.
|
|
@@ -52,8 +53,6 @@ export declare function sandboxStreamFailureDiagnostic(error: unknown): {
|
|
|
52
53
|
code: string;
|
|
53
54
|
reason: string;
|
|
54
55
|
};
|
|
55
|
-
/** The typed reason a sandbox `error` event carries, or a generic stream-error code. */
|
|
56
|
-
export declare function sandboxStreamErrorCode(data: unknown): string;
|
|
57
56
|
/** A tool part as the person may read it, live and stored: a failed call's `error` and `output` lose the harness's list
|
|
58
57
|
* of every tool, and the harness's `invalid` repair tool, which stands in for a call to a tool the model does not have,
|
|
59
58
|
* reads one sentence. Inputs, metadata and a completed call's output (a document it read) stay whole. */
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
observeNativeCompletion,
|
|
41
41
|
readCompletedSandboxTurn,
|
|
42
42
|
recoverSandboxAssistantMessage
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-GE242CLI.js";
|
|
44
44
|
import {
|
|
45
45
|
runProtectedRouterTurn
|
|
46
46
|
} from "../chunk-FYF564KJ.js";
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
turnPromptText,
|
|
75
75
|
valueRedactor,
|
|
76
76
|
withProducerStream
|
|
77
|
-
} from "../chunk-
|
|
77
|
+
} from "../chunk-RFXROORA.js";
|
|
78
78
|
import "../chunk-SBHFMDR7.js";
|
|
79
79
|
import "../chunk-H6BRJU5M.js";
|
|
80
80
|
import "../chunk-4DBHC63F.js";
|
|
@@ -109,7 +109,7 @@ import {
|
|
|
109
109
|
streamWithModelFailover,
|
|
110
110
|
summarizeFailoverReason,
|
|
111
111
|
transformVisibleTextParts
|
|
112
|
-
} from "../chunk-
|
|
112
|
+
} from "../chunk-MZZMOGFN.js";
|
|
113
113
|
import "../chunk-QUV5M7SZ.js";
|
|
114
114
|
import "../chunk-WGT32NQ4.js";
|
|
115
115
|
import "../chunk-YG66IHDU.js";
|