@psnext/slingcli 2.4.20260601-1 → 2.5.20260602-1
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/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +12 -1
- package/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js +12 -1
- package/node_modules/@aws-sdk/credential-provider-node/package.json +1 -1
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +4 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +81 -18
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/session/session.js +14 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
- package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +197 -190
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +84 -21
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +24 -14
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +5 -9
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.js +5 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/images/openrouter.js +2 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.js +2 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +130 -62
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +18 -12
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +4 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +5 -9
- package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/stream.js +14 -2
- package/node_modules/@earendil-works/pi-ai/dist/utils/abort-signals.js +34 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/device-code.js +8 -7
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/github-copilot.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/index.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/oauth/openai-codex.js +179 -79
- package/node_modules/@earendil-works/pi-ai/package.json +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +27 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/config.js +9 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session-services.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +29 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +21 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/footer-data-provider.js +29 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +65 -13
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/resolve-config-value.js +134 -11
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/sdk.js +12 -6
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/session-manager.js +167 -96
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/settings-manager.js +14 -9
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +0 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/edit.js +7 -10
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/ls.js +5 -7
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/read.js +6 -7
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/render-utils.js +17 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/write.js +5 -6
- package/node_modules/@earendil-works/pi-coding-agent/dist/index.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/main.js +69 -16
- package/node_modules/@earendil-works/pi-coding-agent/dist/migrations.js +118 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/config-selector.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/login-dialog.js +2 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +61 -6
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/theme/theme.js +10 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/print-mode.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +4 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/deprecation.js +13 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/json.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +71 -56
- package/node_modules/@earendil-works/pi-coding-agent/package.json +7 -7
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +9 -53
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js +6 -54
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +34 -7
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +172 -37
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +166 -22
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +8 -3
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js +96 -0
- package/node_modules/@earendil-works/pi-tui/package.json +2 -2
- package/node_modules/@mariozechner/clipboard/Cargo.toml +3 -3
- package/node_modules/@mariozechner/clipboard/index.d.ts +34 -20
- package/node_modules/@mariozechner/clipboard/index.js +546 -257
- package/node_modules/@mariozechner/clipboard/package.json +14 -14
- package/node_modules/@mariozechner/clipboard/src/lib.rs +4 -9
- package/node_modules/@mariozechner/clipboard-linux-x64-gnu/clipboard.linux-x64-gnu.node +0 -0
- package/node_modules/@mariozechner/clipboard-linux-x64-gnu/package.json +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +39 -22
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +39 -22
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js +19 -6
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +4 -5
- package/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/constants.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/ConfiguredRetryStrategy.js +4 -5
- package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRetryToken.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/StandardRetryStrategy.js +9 -5
- package/node_modules/@smithy/core/dist-types/submodules/retry/middleware-retry/configurations.d.ts +4 -1
- package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/ConfiguredRetryStrategy.d.ts +1 -2
- package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/DefaultRetryToken.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/StandardRetryStrategy.d.ts +1 -1
- package/node_modules/@smithy/core/package.json +2 -2
- package/node_modules/@smithy/credential-provider-imds/package.json +3 -3
- package/node_modules/@smithy/fetch-http-handler/package.json +4 -4
- package/node_modules/@smithy/signature-v4/package.json +3 -3
- package/node_modules/@smithy/types/dist-types/retry.d.ts +25 -0
- package/node_modules/@smithy/types/package.json +1 -1
- package/package.json +6 -6
- package/slingshot/index.js +231 -230
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/node-http-handler",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.6",
|
|
4
4
|
"description": "Provides a way to make requests",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"module": "./dist-es/index.js",
|
|
27
27
|
"types": "./dist-types/index.d.ts",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@smithy/core": "^3.24.
|
|
30
|
-
"@smithy/types": "^4.14.
|
|
29
|
+
"@smithy/core": "^3.24.6",
|
|
30
|
+
"@smithy/types": "^4.14.3",
|
|
31
31
|
"tslib": "^2.6.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@smithy/abort-controller": "^4.2.
|
|
34
|
+
"@smithy/abort-controller": "^4.2.16",
|
|
35
35
|
"@types/node": "^18.11.9",
|
|
36
36
|
"concurrently": "7.0.0",
|
|
37
37
|
"downlevel-dts": "0.10.1",
|
|
@@ -25,9 +25,20 @@ function memoizeChain(providers, treatAsExpired) {
|
|
|
25
25
|
let activeLock;
|
|
26
26
|
let passiveLock;
|
|
27
27
|
let credentials;
|
|
28
|
+
let forceRefreshLock;
|
|
28
29
|
const provider = async (options) => {
|
|
29
30
|
if (options?.forceRefresh) {
|
|
30
|
-
|
|
31
|
+
if (!forceRefreshLock) {
|
|
32
|
+
forceRefreshLock = chain(options)
|
|
33
|
+
.then((c) => {
|
|
34
|
+
credentials = c;
|
|
35
|
+
})
|
|
36
|
+
.finally(() => {
|
|
37
|
+
forceRefreshLock = undefined;
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
await forceRefreshLock;
|
|
41
|
+
return credentials;
|
|
31
42
|
}
|
|
32
43
|
if (credentials?.expiration) {
|
|
33
44
|
if (credentials?.expiration?.getTime() < Date.now()) {
|
|
@@ -3,9 +3,20 @@ export function memoizeChain(providers, treatAsExpired) {
|
|
|
3
3
|
let activeLock;
|
|
4
4
|
let passiveLock;
|
|
5
5
|
let credentials;
|
|
6
|
+
let forceRefreshLock;
|
|
6
7
|
const provider = async (options) => {
|
|
7
8
|
if (options?.forceRefresh) {
|
|
8
|
-
|
|
9
|
+
if (!forceRefreshLock) {
|
|
10
|
+
forceRefreshLock = chain(options)
|
|
11
|
+
.then((c) => {
|
|
12
|
+
credentials = c;
|
|
13
|
+
})
|
|
14
|
+
.finally(() => {
|
|
15
|
+
forceRefreshLock = undefined;
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
await forceRefreshLock;
|
|
19
|
+
return credentials;
|
|
9
20
|
}
|
|
10
21
|
if (credentials?.expiration) {
|
|
11
22
|
if (credentials?.expiration?.getTime() < Date.now()) {
|
package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithy/node-http-handler",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.6",
|
|
4
4
|
"description": "Provides a way to make requests",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"module": "./dist-es/index.js",
|
|
27
27
|
"types": "./dist-types/index.d.ts",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@smithy/core": "^3.24.
|
|
30
|
-
"@smithy/types": "^4.14.
|
|
29
|
+
"@smithy/core": "^3.24.6",
|
|
30
|
+
"@smithy/types": "^4.14.3",
|
|
31
31
|
"tslib": "^2.6.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@smithy/abort-controller": "^4.2.
|
|
34
|
+
"@smithy/abort-controller": "^4.2.16",
|
|
35
35
|
"@types/node": "^18.11.9",
|
|
36
36
|
"concurrently": "7.0.0",
|
|
37
37
|
"downlevel-dts": "0.10.1",
|
|
@@ -50,6 +50,16 @@ function mergeHeaders(...headers) {
|
|
|
50
50
|
}
|
|
51
51
|
return hasHeaders ? merged : undefined;
|
|
52
52
|
}
|
|
53
|
+
function findDuplicateNames(names) {
|
|
54
|
+
const seen = new Set();
|
|
55
|
+
const duplicates = new Set();
|
|
56
|
+
for (const name of names) {
|
|
57
|
+
if (seen.has(name))
|
|
58
|
+
duplicates.add(name);
|
|
59
|
+
seen.add(name);
|
|
60
|
+
}
|
|
61
|
+
return [...duplicates];
|
|
62
|
+
}
|
|
53
63
|
function applyStreamOptionsPatch(base, patch) {
|
|
54
64
|
const result = cloneStreamOptions(base);
|
|
55
65
|
if (!patch)
|
|
@@ -140,12 +150,17 @@ export class AgentHarness {
|
|
|
140
150
|
this.streamOptions = cloneStreamOptions(options.streamOptions);
|
|
141
151
|
this.systemPrompt = options.systemPrompt;
|
|
142
152
|
this.getApiKeyAndHeaders = options.getApiKeyAndHeaders;
|
|
153
|
+
this.validateUniqueNames((options.tools ?? []).map((tool) => tool.name), "Duplicate tool name(s)");
|
|
143
154
|
for (const tool of options.tools ?? []) {
|
|
144
155
|
this.tools.set(tool.name, tool);
|
|
145
156
|
}
|
|
146
157
|
this.model = options.model;
|
|
147
158
|
this.thinkingLevel = options.thinkingLevel ?? "off";
|
|
148
|
-
this.activeToolNames = options.activeToolNames
|
|
159
|
+
this.activeToolNames = options.activeToolNames
|
|
160
|
+
? [...options.activeToolNames]
|
|
161
|
+
: (options.tools ?? []).map((tool) => tool.name);
|
|
162
|
+
this.validateUniqueNames(this.activeToolNames, "Duplicate active tool name(s)");
|
|
163
|
+
this.validateToolNames(this.activeToolNames);
|
|
149
164
|
this.steeringQueueMode = options.steeringMode ?? "one-at-a-time";
|
|
150
165
|
this.followUpQueueMode = options.followUpMode ?? "one-at-a-time";
|
|
151
166
|
}
|
|
@@ -379,7 +394,13 @@ export class AgentHarness {
|
|
|
379
394
|
getFollowUpMessages: async () => this.drainQueuedMessages(this.followUpQueue, this.followUpQueueMode),
|
|
380
395
|
};
|
|
381
396
|
}
|
|
397
|
+
validateUniqueNames(names, message) {
|
|
398
|
+
const duplicates = findDuplicateNames(names);
|
|
399
|
+
if (duplicates.length > 0)
|
|
400
|
+
throw new AgentHarnessError("invalid_argument", `${message}: ${duplicates.join(", ")}`);
|
|
401
|
+
}
|
|
382
402
|
validateToolNames(toolNames, tools = this.tools) {
|
|
403
|
+
this.validateUniqueNames(toolNames, "Duplicate active tool name(s)");
|
|
383
404
|
const missing = toolNames.filter((name) => !tools.has(name));
|
|
384
405
|
if (missing.length > 0)
|
|
385
406
|
throw new AgentHarnessError("invalid_argument", `Unknown tool(s): ${missing.join(", ")}`);
|
|
@@ -396,6 +417,9 @@ export class AgentHarness {
|
|
|
396
417
|
else if (write.type === "thinking_level_change") {
|
|
397
418
|
await this.session.appendThinkingLevelChange(write.thinkingLevel);
|
|
398
419
|
}
|
|
420
|
+
else if (write.type === "active_tools_change") {
|
|
421
|
+
await this.session.appendActiveToolsChange(write.activeToolNames);
|
|
422
|
+
}
|
|
399
423
|
else if (write.type === "custom") {
|
|
400
424
|
await this.session.appendCustomEntry(write.customType, write.data);
|
|
401
425
|
}
|
|
@@ -756,9 +780,6 @@ export class AgentHarness {
|
|
|
756
780
|
getModel() {
|
|
757
781
|
return this.model;
|
|
758
782
|
}
|
|
759
|
-
getThinkingLevel() {
|
|
760
|
-
return this.thinkingLevel;
|
|
761
|
-
}
|
|
762
783
|
async setModel(model) {
|
|
763
784
|
try {
|
|
764
785
|
const previousModel = this.model;
|
|
@@ -769,12 +790,15 @@ export class AgentHarness {
|
|
|
769
790
|
this.pendingSessionWrites.push({ type: "model_change", provider: model.provider, modelId: model.id });
|
|
770
791
|
}
|
|
771
792
|
this.model = model;
|
|
772
|
-
await this.emitOwn({ type: "
|
|
793
|
+
await this.emitOwn({ type: "model_update", model, previousModel, source: "set" });
|
|
773
794
|
}
|
|
774
795
|
catch (error) {
|
|
775
796
|
throw normalizeHarnessError(error, "session");
|
|
776
797
|
}
|
|
777
798
|
}
|
|
799
|
+
getThinkingLevel() {
|
|
800
|
+
return this.thinkingLevel;
|
|
801
|
+
}
|
|
778
802
|
async setThinkingLevel(level) {
|
|
779
803
|
try {
|
|
780
804
|
const previousLevel = this.thinkingLevel;
|
|
@@ -785,16 +809,67 @@ export class AgentHarness {
|
|
|
785
809
|
this.pendingSessionWrites.push({ type: "thinking_level_change", thinkingLevel: level });
|
|
786
810
|
}
|
|
787
811
|
this.thinkingLevel = level;
|
|
788
|
-
await this.emitOwn({ type: "
|
|
812
|
+
await this.emitOwn({ type: "thinking_level_update", level, previousLevel });
|
|
789
813
|
}
|
|
790
814
|
catch (error) {
|
|
791
815
|
throw normalizeHarnessError(error, "session");
|
|
792
816
|
}
|
|
793
817
|
}
|
|
818
|
+
getTools() {
|
|
819
|
+
return [...this.tools.values()];
|
|
820
|
+
}
|
|
821
|
+
async setTools(tools, activeToolNames) {
|
|
822
|
+
try {
|
|
823
|
+
this.validateUniqueNames(tools.map((tool) => tool.name), "Duplicate tool name(s)");
|
|
824
|
+
const nextTools = new Map(tools.map((tool) => [tool.name, tool]));
|
|
825
|
+
const nextActiveToolNames = activeToolNames ? [...activeToolNames] : this.activeToolNames;
|
|
826
|
+
this.validateToolNames(nextActiveToolNames, nextTools);
|
|
827
|
+
const previousToolNames = [...this.tools.keys()];
|
|
828
|
+
const previousActiveToolNames = [...this.activeToolNames];
|
|
829
|
+
if (this.phase === "idle") {
|
|
830
|
+
await this.session.appendActiveToolsChange(nextActiveToolNames);
|
|
831
|
+
}
|
|
832
|
+
else {
|
|
833
|
+
this.pendingSessionWrites.push({ type: "active_tools_change", activeToolNames: [...nextActiveToolNames] });
|
|
834
|
+
}
|
|
835
|
+
this.tools = nextTools;
|
|
836
|
+
this.activeToolNames = [...nextActiveToolNames];
|
|
837
|
+
await this.emitOwn({
|
|
838
|
+
type: "tools_update",
|
|
839
|
+
toolNames: [...this.tools.keys()],
|
|
840
|
+
previousToolNames,
|
|
841
|
+
activeToolNames: [...this.activeToolNames],
|
|
842
|
+
previousActiveToolNames,
|
|
843
|
+
source: "set",
|
|
844
|
+
});
|
|
845
|
+
}
|
|
846
|
+
catch (error) {
|
|
847
|
+
throw normalizeHarnessError(error, "invalid_argument");
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
getActiveTools() {
|
|
851
|
+
return this.activeToolNames.map((name) => this.tools.get(name));
|
|
852
|
+
}
|
|
794
853
|
async setActiveTools(toolNames) {
|
|
795
854
|
try {
|
|
796
855
|
this.validateToolNames(toolNames);
|
|
856
|
+
const previousToolNames = [...this.tools.keys()];
|
|
857
|
+
const previousActiveToolNames = [...this.activeToolNames];
|
|
858
|
+
if (this.phase === "idle") {
|
|
859
|
+
await this.session.appendActiveToolsChange(toolNames);
|
|
860
|
+
}
|
|
861
|
+
else {
|
|
862
|
+
this.pendingSessionWrites.push({ type: "active_tools_change", activeToolNames: [...toolNames] });
|
|
863
|
+
}
|
|
797
864
|
this.activeToolNames = [...toolNames];
|
|
865
|
+
await this.emitOwn({
|
|
866
|
+
type: "tools_update",
|
|
867
|
+
toolNames: [...this.tools.keys()],
|
|
868
|
+
previousToolNames,
|
|
869
|
+
activeToolNames: [...this.activeToolNames],
|
|
870
|
+
previousActiveToolNames,
|
|
871
|
+
source: "set",
|
|
872
|
+
});
|
|
798
873
|
}
|
|
799
874
|
catch (error) {
|
|
800
875
|
throw normalizeHarnessError(error, "invalid_argument");
|
|
@@ -832,18 +907,6 @@ export class AgentHarness {
|
|
|
832
907
|
async setStreamOptions(streamOptions) {
|
|
833
908
|
this.streamOptions = cloneStreamOptions(streamOptions);
|
|
834
909
|
}
|
|
835
|
-
async setTools(tools, activeToolNames) {
|
|
836
|
-
try {
|
|
837
|
-
const nextTools = new Map(tools.map((tool) => [tool.name, tool]));
|
|
838
|
-
const nextActiveToolNames = activeToolNames ? [...activeToolNames] : this.activeToolNames;
|
|
839
|
-
this.validateToolNames(nextActiveToolNames, nextTools);
|
|
840
|
-
this.tools = nextTools;
|
|
841
|
-
this.activeToolNames = [...nextActiveToolNames];
|
|
842
|
-
}
|
|
843
|
-
catch (error) {
|
|
844
|
-
throw normalizeHarnessError(error, "invalid_argument");
|
|
845
|
-
}
|
|
846
|
-
}
|
|
847
910
|
async abort() {
|
|
848
911
|
const clearedSteer = [...this.steerQueue];
|
|
849
912
|
const clearedFollowUp = [...this.followUpQueue];
|
package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/branch-summarization.js
CHANGED
|
@@ -43,6 +43,7 @@ function getMessageFromEntry(entry) {
|
|
|
43
43
|
return createCompactionSummaryMessage(entry.summary, entry.tokensBefore, entry.timestamp);
|
|
44
44
|
case "thinking_level_change":
|
|
45
45
|
case "model_change":
|
|
46
|
+
case "active_tools_change":
|
|
46
47
|
case "custom":
|
|
47
48
|
case "label":
|
|
48
49
|
case "session_info":
|
|
@@ -3,6 +3,7 @@ import { SessionError } from "../types.js";
|
|
|
3
3
|
export function buildSessionContext(pathEntries) {
|
|
4
4
|
let thinkingLevel = "off";
|
|
5
5
|
let model = null;
|
|
6
|
+
let activeToolNames = null;
|
|
6
7
|
let compaction = null;
|
|
7
8
|
for (const entry of pathEntries) {
|
|
8
9
|
if (entry.type === "thinking_level_change") {
|
|
@@ -14,6 +15,9 @@ export function buildSessionContext(pathEntries) {
|
|
|
14
15
|
else if (entry.type === "message" && entry.message.role === "assistant") {
|
|
15
16
|
model = { provider: entry.message.provider, modelId: entry.message.model };
|
|
16
17
|
}
|
|
18
|
+
else if (entry.type === "active_tools_change") {
|
|
19
|
+
activeToolNames = [...entry.activeToolNames];
|
|
20
|
+
}
|
|
17
21
|
else if (entry.type === "compaction") {
|
|
18
22
|
compaction = entry;
|
|
19
23
|
}
|
|
@@ -50,7 +54,7 @@ export function buildSessionContext(pathEntries) {
|
|
|
50
54
|
appendMessage(entry);
|
|
51
55
|
}
|
|
52
56
|
}
|
|
53
|
-
return { messages, thinkingLevel, model };
|
|
57
|
+
return { messages, thinkingLevel, model, activeToolNames };
|
|
54
58
|
}
|
|
55
59
|
export class Session {
|
|
56
60
|
storage;
|
|
@@ -118,6 +122,15 @@ export class Session {
|
|
|
118
122
|
modelId,
|
|
119
123
|
});
|
|
120
124
|
}
|
|
125
|
+
async appendActiveToolsChange(activeToolNames) {
|
|
126
|
+
return this.appendTypedEntry({
|
|
127
|
+
type: "active_tools_change",
|
|
128
|
+
id: await this.storage.createEntryId(),
|
|
129
|
+
parentId: await this.storage.getLeafId(),
|
|
130
|
+
timestamp: new Date().toISOString(),
|
|
131
|
+
activeToolNames: [...activeToolNames],
|
|
132
|
+
});
|
|
133
|
+
}
|
|
121
134
|
async appendCompaction(summary, firstKeptEntryId, tokensBefore, details, fromHook) {
|
|
122
135
|
return this.appendTypedEntry({
|
|
123
136
|
type: "compaction",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@earendil-works/pi-agent-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.78.0",
|
|
4
4
|
"description": "General-purpose agent with transport abstraction, state management, and attachment support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"prepublishOnly": "npm run clean && npm run build"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@earendil-works/pi-ai": "^0.
|
|
32
|
+
"@earendil-works/pi-ai": "^0.78.0",
|
|
33
33
|
"ignore": "7.0.5",
|
|
34
34
|
"typebox": "1.1.38",
|
|
35
35
|
"yaml": "2.9.0"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"license": "MIT",
|
|
46
46
|
"repository": {
|
|
47
47
|
"type": "git",
|
|
48
|
-
"url": "git+https://github.com/earendil-works/pi
|
|
48
|
+
"url": "git+https://github.com/earendil-works/pi.git",
|
|
49
49
|
"directory": "packages/agent"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|