@ponythewhite/base-context 1.0.10 → 1.0.12
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/CHANGELOG.md +22 -0
- package/dist/base-context-runtime/pyproject.toml +1 -1
- package/dist/base-context-runtime/uv.lock +1 -1
- package/dist/build-info.json +1 -1
- package/dist/bundle/amazon-bedrock.js +3 -3
- package/dist/bundle/{anthropic-5PSCZEER.js → anthropic-BJVPUMPB.js} +2 -2
- package/dist/bundle/{azure-openai-responses-AYTLJR33.js → azure-openai-responses-ERRMAXK6.js} +4 -5
- package/dist/bundle/{bundled-modules-MX6YNAM2.js → bundled-modules-WCGPZI2H.js} +5 -5
- package/dist/bundle/{chunk-D3KOF57W.js → chunk-25VYRAC6.js} +14 -1
- package/dist/bundle/{chunk-2IPDSTDR.js → chunk-AEMRBMI2.js} +9 -9
- package/dist/bundle/{chunk-Q3MBSBEB.js → chunk-FOGKLC7V.js} +1 -1
- package/dist/bundle/{chunk-UHLGPYMI.js → chunk-IAKHCQA2.js} +185 -39
- package/dist/bundle/{chunk-KT2BNEPE.js → chunk-MUFZODP5.js} +1 -1
- package/dist/bundle/{chunk-QKIFBA7N.js → chunk-Q6UAHLII.js} +2 -2
- package/dist/bundle/{chunk-CDXQNS5P.js → chunk-YGV3Y4AD.js} +1009 -185
- package/dist/bundle/{cli-main-D7W3WWCV.js → cli-main-CTYDQHFE.js} +4 -4
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/{google-HTMCUJ7X.js → google-4GA4YMUX.js} +2 -2
- package/dist/bundle/{google-vertex-ZQO65AXF.js → google-vertex-7AMALD7D.js} +2 -2
- package/dist/bundle/{main-5J3QBZ5Y.js → main-GVGK354K.js} +5 -5
- package/dist/bundle/{mistral-SB7LU56G.js → mistral-74BXMNRM.js} +1 -1
- package/dist/bundle/{openai-codex-responses-5CEW4VN3.js → openai-codex-responses-COXNC4IH.js} +2 -2
- package/dist/bundle/{openai-completions-BAZJQSS2.js → openai-completions-BCSA5Q6S.js} +2 -2
- package/dist/bundle/{openai-responses-VHOE427P.js → openai-responses-ONCIZSJS.js} +3 -3
- package/dist/core/agent-session.d.ts +6 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +445 -146
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/canonical-context.d.ts +19 -3
- package/dist/core/canonical-context.d.ts.map +1 -1
- package/dist/core/canonical-context.js +130 -9
- package/dist/core/canonical-context.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +9 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +29 -3
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/context-epoch-copy.d.ts +1 -1
- package/dist/core/context-epoch-copy.d.ts.map +1 -1
- package/dist/core/context-epoch-copy.js +18 -7
- package/dist/core/context-epoch-copy.js.map +1 -1
- package/dist/core/context-epoch.d.ts +4 -0
- package/dist/core/context-epoch.d.ts.map +1 -1
- package/dist/core/context-epoch.js +8 -1
- package/dist/core/context-epoch.js.map +1 -1
- package/dist/core/context-tree.d.ts +14 -11
- package/dist/core/context-tree.d.ts.map +1 -1
- package/dist/core/context-tree.js +145 -9
- package/dist/core/context-tree.js.map +1 -1
- package/dist/core/history-index-worker.d.ts.map +1 -1
- package/dist/core/history-index-worker.js +59 -6
- package/dist/core/history-index-worker.js.map +1 -1
- package/dist/core/history-index.d.ts +17 -0
- package/dist/core/history-index.d.ts.map +1 -1
- package/dist/core/history-index.js +22 -0
- package/dist/core/history-index.js.map +1 -1
- package/dist/core/inference-coordinator.d.ts +1 -1
- package/dist/core/inference-coordinator.d.ts.map +1 -1
- package/dist/core/inference-coordinator.js +23 -6
- package/dist/core/inference-coordinator.js.map +1 -1
- package/dist/core/messages.d.ts +2 -0
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +2 -0
- package/dist/core/messages.js.map +1 -1
- package/dist/core/refinement/refinement.d.ts +2 -0
- package/dist/core/refinement/refinement.d.ts.map +1 -1
- package/dist/core/refinement/refinement.js +10 -1
- package/dist/core/refinement/refinement.js.map +1 -1
- package/dist/core/request-usage.d.ts +34 -0
- package/dist/core/request-usage.d.ts.map +1 -0
- package/dist/core/request-usage.js +111 -0
- package/dist/core/request-usage.js.map +1 -0
- package/dist/core/request-view-selection.d.ts +2 -1
- package/dist/core/request-view-selection.d.ts.map +1 -1
- package/dist/core/request-view-selection.js +29 -2
- package/dist/core/request-view-selection.js.map +1 -1
- package/dist/core/session-fork-messages.d.ts +5 -0
- package/dist/core/session-fork-messages.d.ts.map +1 -1
- package/dist/core/session-fork-messages.js +44 -0
- package/dist/core/session-fork-messages.js.map +1 -1
- package/dist/core/session-history-index.d.ts +5 -0
- package/dist/core/session-history-index.d.ts.map +1 -1
- package/dist/core/session-history-index.js +7 -0
- package/dist/core/session-history-index.js.map +1 -1
- package/dist/core/session-manager.d.ts +2 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +155 -13
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-tree.d.ts +9 -0
- package/dist/core/session-tree.d.ts.map +1 -1
- package/dist/core/session-tree.js +71 -11
- package/dist/core/session-tree.js.map +1 -1
- package/dist/core/settings-manager.d.ts +3 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +7 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/system-prompt.d.ts +2 -0
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +4 -2
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/modes/agent-connection/daemon-agent-connection.d.ts.map +1 -1
- package/dist/modes/agent-connection/daemon-agent-connection.js +8 -1
- package/dist/modes/agent-connection/daemon-agent-connection.js.map +1 -1
- package/dist/modes/agent-connection/in-process-agent-connection.d.ts.map +1 -1
- package/dist/modes/agent-connection/in-process-agent-connection.js +4 -4
- package/dist/modes/agent-connection/in-process-agent-connection.js.map +1 -1
- package/dist/modes/daemon/daemon-mode.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-mode.js +4 -4
- package/dist/modes/daemon/daemon-mode.js.map +1 -1
- package/dist/modes/daemon/daemon-protocol.d.ts +13 -3
- package/dist/modes/daemon/daemon-protocol.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-protocol.js +10 -2
- package/dist/modes/daemon/daemon-protocol.js.map +1 -1
- package/dist/modes/daemon/daemon-session-summarizer.d.ts +3 -0
- package/dist/modes/daemon/daemon-session-summarizer.d.ts.map +1 -1
- package/dist/modes/daemon/daemon-session-summarizer.js +71 -32
- package/dist/modes/daemon/daemon-session-summarizer.js.map +1 -1
- package/dist/modes/interactive/components/context-tree-format.d.ts.map +1 -1
- package/dist/modes/interactive/components/context-tree-format.js +49 -0
- package/dist/modes/interactive/components/context-tree-format.js.map +1 -1
- package/docs/compaction.md +27 -3
- package/docs/context-management.md +17 -1
- package/docs/rlm.md +1 -1
- package/docs/settings.md +12 -0
- package/docs/usage.md +24 -1
- package/package.json +4 -4
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
isOwnedSessionWorkerProcess,
|
|
6
6
|
maybeRunOwnedSessionWorkerFrontend,
|
|
7
7
|
maybeStartDaemonEarly
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YGV3Y4AD.js";
|
|
9
9
|
import {
|
|
10
10
|
APP_NAME
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-AEMRBMI2.js";
|
|
12
12
|
import "./chunk-5QCJ5DQU.js";
|
|
13
13
|
import "./chunk-CRBVRZBV.js";
|
|
14
14
|
import "./chunk-GRJFXLBM.js";
|
|
@@ -16,7 +16,7 @@ import "./chunk-2T7M7VJ4.js";
|
|
|
16
16
|
import "./chunk-UIRUOAIQ.js";
|
|
17
17
|
import "./chunk-HXOBFFJX.js";
|
|
18
18
|
import "./chunk-DGNX7HQ3.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-25VYRAC6.js";
|
|
20
20
|
import "./chunk-BAWSWWEU.js";
|
|
21
21
|
|
|
22
22
|
// dist/cli-main.js
|
|
@@ -39,7 +39,7 @@ async function runCli() {
|
|
|
39
39
|
}
|
|
40
40
|
const [{ EnvHttpProxyAgent, setGlobalDispatcher }, { main }] = await Promise.all([
|
|
41
41
|
import("undici"),
|
|
42
|
-
import("./main-
|
|
42
|
+
import("./main-GVGK354K.js")
|
|
43
43
|
]);
|
|
44
44
|
setGlobalDispatcher(new EnvHttpProxyAgent({ bodyTimeout: 0, headersTimeout: 0 }));
|
|
45
45
|
try {
|
package/dist/bundle/cli.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
mapToolChoice,
|
|
11
11
|
observeGoogleUsage,
|
|
12
12
|
retainThoughtSignature
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FOGKLC7V.js";
|
|
14
14
|
import {
|
|
15
15
|
buildBaseOptions,
|
|
16
16
|
sanitizeSurrogates
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
formatStreamFailureMessage,
|
|
27
27
|
recordStreamFailure,
|
|
28
28
|
streamFailureFromStopReason
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-25VYRAC6.js";
|
|
30
30
|
import "./chunk-BAWSWWEU.js";
|
|
31
31
|
|
|
32
32
|
// ../ai/src/providers/google.ts
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
mapToolChoice,
|
|
13
13
|
observeGoogleUsage,
|
|
14
14
|
retainThoughtSignature
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FOGKLC7V.js";
|
|
16
16
|
import {
|
|
17
17
|
buildBaseOptions,
|
|
18
18
|
sanitizeSurrogates
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
formatStreamFailureMessage,
|
|
26
26
|
recordStreamFailure,
|
|
27
27
|
streamFailureFromStopReason
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-25VYRAC6.js";
|
|
29
29
|
import "./chunk-BAWSWWEU.js";
|
|
30
30
|
|
|
31
31
|
// ../ai/src/providers/google-vertex.ts
|
|
@@ -17,11 +17,11 @@ import {
|
|
|
17
17
|
shouldUseDaemonClientRuntime,
|
|
18
18
|
shouldUseDaemonInteractive,
|
|
19
19
|
shouldUseEphemeralSessionManagerForDaemonInteractive
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-IAKHCQA2.js";
|
|
21
|
+
import "./chunk-YGV3Y4AD.js";
|
|
22
22
|
import "./chunk-CFNASUYO.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-Q6UAHLII.js";
|
|
24
|
+
import "./chunk-AEMRBMI2.js";
|
|
25
25
|
import "./chunk-5QCJ5DQU.js";
|
|
26
26
|
import "./chunk-CRBVRZBV.js";
|
|
27
27
|
import "./chunk-GRJFXLBM.js";
|
|
@@ -29,7 +29,7 @@ import "./chunk-2T7M7VJ4.js";
|
|
|
29
29
|
import "./chunk-UIRUOAIQ.js";
|
|
30
30
|
import "./chunk-HXOBFFJX.js";
|
|
31
31
|
import "./chunk-DGNX7HQ3.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-25VYRAC6.js";
|
|
33
33
|
import "./chunk-BAWSWWEU.js";
|
|
34
34
|
export {
|
|
35
35
|
createDefaultRuntimeFactory,
|
package/dist/bundle/{openai-codex-responses-5CEW4VN3.js → openai-codex-responses-COXNC4IH.js}
RENAMED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
convertResponsesTools,
|
|
9
9
|
observeResponsesEvent,
|
|
10
10
|
processResponsesStream
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MUFZODP5.js";
|
|
12
12
|
import "./chunk-NQB5DCFC.js";
|
|
13
13
|
import {
|
|
14
14
|
headersToRecord
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
formatThrownValue,
|
|
34
34
|
isLocalRequestPreparationError,
|
|
35
35
|
recordStreamFailure
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-25VYRAC6.js";
|
|
37
37
|
import "./chunk-BAWSWWEU.js";
|
|
38
38
|
|
|
39
39
|
// ../ai/src/utils/abortable-delay.ts
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
formatStreamFailureMessage,
|
|
37
37
|
recordStreamFailure,
|
|
38
38
|
withRequestBody
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-25VYRAC6.js";
|
|
40
40
|
import "./chunk-BAWSWWEU.js";
|
|
41
41
|
|
|
42
42
|
// ../ai/src/providers/openai-completions.ts
|
|
@@ -120,7 +120,7 @@ var streamOpenAICompletions = (model, context, options) => {
|
|
|
120
120
|
const cacheWriteCost = cacheControl && hasStandardAnthropicCachePricing(model) ? getAnthropicCacheWriteCost(model.cost.input, cacheControl.ttl === "1h" ? "1h" : "5m") : void 0;
|
|
121
121
|
const cacheSessionId = cacheRetention === "none" ? void 0 : options?.sessionId;
|
|
122
122
|
let client = createClient(model, context, apiKey, options?.headers, cacheSessionId, compat);
|
|
123
|
-
if (attempts.enabled) {
|
|
123
|
+
if (attempts.enabled || options?.signal) {
|
|
124
124
|
client = client.withOptions({});
|
|
125
125
|
client.fetchWithTimeout = attempts.wrapHttp(client.fetchWithTimeout.bind(client));
|
|
126
126
|
}
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
convertResponsesMessages,
|
|
11
11
|
convertResponsesTools,
|
|
12
12
|
processResponsesStream
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MUFZODP5.js";
|
|
14
14
|
import "./chunk-NQB5DCFC.js";
|
|
15
15
|
import {
|
|
16
16
|
OpenAI
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
openAIVisibleInput,
|
|
34
34
|
recordStreamFailure,
|
|
35
35
|
streamFailureFromStopReason
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-25VYRAC6.js";
|
|
37
37
|
import "./chunk-BAWSWWEU.js";
|
|
38
38
|
|
|
39
39
|
// ../ai/src/providers/openai-responses.ts
|
|
@@ -83,7 +83,7 @@ var streamOpenAIResponses = (model, context, options) => {
|
|
|
83
83
|
const cacheSessionId = cacheRetention === "none" ? void 0 : options?.sessionId;
|
|
84
84
|
let client = createClient(model, context, apiKey, options?.headers, cacheSessionId);
|
|
85
85
|
const preparationClient = client;
|
|
86
|
-
if (attempts.enabled) {
|
|
86
|
+
if (attempts.enabled || options?.signal) {
|
|
87
87
|
client = client.withOptions({});
|
|
88
88
|
client.fetchWithTimeout = attempts.wrapHttp(client.fetchWithTimeout.bind(client));
|
|
89
89
|
}
|
|
@@ -518,6 +518,8 @@ export declare class AgentSession {
|
|
|
518
518
|
private _rlmChildCleanupFailures;
|
|
519
519
|
private _deletingRlmChildren;
|
|
520
520
|
private _rlmChildUnsubscribes;
|
|
521
|
+
private _rlmChildUsageSources;
|
|
522
|
+
private _rlmParentUsageAttribution?;
|
|
521
523
|
/** Latest recap for this session, written by the daemon summarizer; read by a parent to label its child snapshots. */
|
|
522
524
|
private _currentRecap?;
|
|
523
525
|
private readonly _initialGoal;
|
|
@@ -834,6 +836,8 @@ export declare class AgentSession {
|
|
|
834
836
|
private _normalizePromptSnippet;
|
|
835
837
|
private _normalizePromptGuidelines;
|
|
836
838
|
private _rebuildSystemPrompt;
|
|
839
|
+
private _readHarnessSnapshot;
|
|
840
|
+
private _appendHarnessSnapshotIfChanged;
|
|
837
841
|
private _refreshExtensionSystemPrompt;
|
|
838
842
|
private _finishSubmissionNormalization;
|
|
839
843
|
private _normalizeSubmission;
|
|
@@ -1202,6 +1206,8 @@ export declare class AgentSession {
|
|
|
1202
1206
|
private _removeRlmSubagentTracking;
|
|
1203
1207
|
private _emitRlmSubagentRemoval;
|
|
1204
1208
|
private _deleteResolvedRlmSubagent;
|
|
1209
|
+
private _restoreRlmChildUsageSource;
|
|
1210
|
+
private _subscribeRlmChildEvents;
|
|
1205
1211
|
/**
|
|
1206
1212
|
* Retain a finished child session for the parent lifetime so inspectors and
|
|
1207
1213
|
* daemon-hosted agent messaging can keep addressing it. Returns false (and disposes
|
|
@@ -1337,7 +1343,6 @@ export declare class AgentSession {
|
|
|
1337
1343
|
getContextUsage(): Promise<ContextUsage | undefined>;
|
|
1338
1344
|
private _rlmSessionDirForReading;
|
|
1339
1345
|
private _contextWindowResolver;
|
|
1340
|
-
private _ownUsageMemo?;
|
|
1341
1346
|
getOwnUsageSummary(): Promise<SessionUsageSummary | undefined>;
|
|
1342
1347
|
/**
|
|
1343
1348
|
* Build the agent context overview for /context: this session as the root
|