@averyyy/pi-coding-agent 0.82.1-piclient.4 → 0.82.1-piclient.5
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 +1 -1
- package/dist/core/agent-session.d.ts +0 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +0 -26
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/model-runtime.d.ts +0 -7
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +0 -66
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/pi-server-client.d.ts +0 -3
- package/dist/core/pi-server-client.d.ts.map +1 -1
- package/dist/core/pi-server-client.js +0 -10
- package/dist/core/pi-server-client.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +0 -5
- package/dist/core/sdk.js.map +1 -1
- package/package.json +4 -4
- package/dist/core/pi-server-provider-execution.d.ts +0 -19
- package/dist/core/pi-server-provider-execution.d.ts.map +0 -1
- package/dist/core/pi-server-provider-execution.js +0 -43
- package/dist/core/pi-server-provider-execution.js.map +0 -1
- package/dist/core/provider-execution-contract.d.ts +0 -36
- package/dist/core/provider-execution-contract.d.ts.map +0 -1
- package/dist/core/provider-execution-contract.js +0 -30
- package/dist/core/provider-execution-contract.js.map +0 -1
|
@@ -32,7 +32,6 @@ import { emitSessionShutdownEvent } from "./extensions/runner.js";
|
|
|
32
32
|
import { ModelRegistry } from "./model-registry.js";
|
|
33
33
|
import { acknowledgePiServerCompaction, acknowledgePiServerRunMessage, acquirePiServerSessionLease, compactPiServer, getPiServerRunDiagnostic, recordPiServerCompactionApplied, recoverPendingPiServerCompaction, releasePiServerRunLease, releasePiServerSessionLease, syncPiServerTree, } from "./pi-server-client.js";
|
|
34
34
|
import { getPiServerCompactStatePath, readPiServerPendingCompact } from "./pi-server-compact-state.js";
|
|
35
|
-
import { assertPiServerProviderExecution, } from "./pi-server-provider-execution.js";
|
|
36
35
|
import { getPiServerRunStatePath, readPiServerPendingRun } from "./pi-server-run-state.js";
|
|
37
36
|
import { expandPromptTemplate } from "./prompt-templates.js";
|
|
38
37
|
import { CURRENT_SESSION_VERSION, getLatestCompactionEntry } from "./session-manager.js";
|
|
@@ -382,9 +381,6 @@ export class AgentSession {
|
|
|
382
381
|
return undefined;
|
|
383
382
|
return this._applyPiServerCompactionResult(result, reason, willRetry);
|
|
384
383
|
}
|
|
385
|
-
_assertPiServerProviderExecution(model) {
|
|
386
|
-
return assertPiServerProviderExecution(this._modelRuntime, model, this._extensionRunner);
|
|
387
|
-
}
|
|
388
384
|
async _getRequiredRequestAuth(model) {
|
|
389
385
|
let result;
|
|
390
386
|
try {
|
|
@@ -1121,9 +1117,6 @@ export class AgentSession {
|
|
|
1121
1117
|
// Prompting
|
|
1122
1118
|
// =========================================================================
|
|
1123
1119
|
async _runAgentPrompt(messages) {
|
|
1124
|
-
if (isPiServerMode() && this.model) {
|
|
1125
|
-
this._assertPiServerProviderExecution(this.model);
|
|
1126
|
-
}
|
|
1127
1120
|
const piServerLease = this._acquirePiServerOperationLease();
|
|
1128
1121
|
this._resetValidationHintState();
|
|
1129
1122
|
this._isAgentRunActive = true;
|
|
@@ -1320,9 +1313,6 @@ export class AgentSession {
|
|
|
1320
1313
|
if (!this.model) {
|
|
1321
1314
|
throw new Error(formatNoModelSelectedMessage());
|
|
1322
1315
|
}
|
|
1323
|
-
if (isPiServerMode()) {
|
|
1324
|
-
this._assertPiServerProviderExecution(this.model);
|
|
1325
|
-
}
|
|
1326
1316
|
const hasConfiguredAuth = this._modelRuntime.hasConfiguredAuth(this.model.provider) ||
|
|
1327
1317
|
(await this._modelRuntime.checkAuth(this.model.provider)) !== undefined;
|
|
1328
1318
|
if (!hasConfiguredAuth) {
|
|
@@ -1896,7 +1886,6 @@ export class AgentSession {
|
|
|
1896
1886
|
* @param customInstructions Optional instructions for the compaction summary
|
|
1897
1887
|
*/
|
|
1898
1888
|
async compact(customInstructions) {
|
|
1899
|
-
const piServerExecution = isPiServerMode() && this.model ? this._assertPiServerProviderExecution(this.model) : undefined;
|
|
1900
1889
|
this._disconnectFromAgent();
|
|
1901
1890
|
await this.abort();
|
|
1902
1891
|
this._compactionAbortController = new AbortController();
|
|
@@ -1978,7 +1967,6 @@ export class AgentSession {
|
|
|
1978
1967
|
extensionCompaction,
|
|
1979
1968
|
retry: this.settingsManager.getRetrySettings(),
|
|
1980
1969
|
sessionTree: { entries: this.sessionManager.getEntries(), leafId: this.sessionManager.getLeafId() },
|
|
1981
|
-
providerExecutionFingerprint: piServerExecution?.providerExecutionFingerprint,
|
|
1982
1970
|
piServerCompactStatePath: getPiServerCompactStatePath(sessionFile),
|
|
1983
1971
|
signal: this._compactionAbortController.signal,
|
|
1984
1972
|
reasoning: toProviderReasoning(this.thinkingLevel),
|
|
@@ -2124,9 +2112,6 @@ export class AgentSession {
|
|
|
2124
2112
|
// but must not retry: the assistant answer already completed and agent.continue() cannot
|
|
2125
2113
|
// continue from an assistant message.
|
|
2126
2114
|
if (sameModel && isContextOverflow(assistantMessage, contextWindow)) {
|
|
2127
|
-
if (isPiServerMode() && this.model) {
|
|
2128
|
-
this._assertPiServerProviderExecution(this.model);
|
|
2129
|
-
}
|
|
2130
2115
|
const willRetry = assistantMessage.stopReason !== "stop";
|
|
2131
2116
|
if (!willRetry) {
|
|
2132
2117
|
return await this._runAutoCompaction("overflow", false);
|
|
@@ -2185,9 +2170,6 @@ export class AgentSession {
|
|
|
2185
2170
|
contextTokens = directContextTokens;
|
|
2186
2171
|
}
|
|
2187
2172
|
if (shouldCompact(contextTokens, contextWindow, settings)) {
|
|
2188
|
-
if (isPiServerMode() && this.model) {
|
|
2189
|
-
this._assertPiServerProviderExecution(this.model);
|
|
2190
|
-
}
|
|
2191
2173
|
return await this._runAutoCompaction("threshold", false);
|
|
2192
2174
|
}
|
|
2193
2175
|
return false;
|
|
@@ -2198,7 +2180,6 @@ export class AgentSession {
|
|
|
2198
2180
|
async _runAutoCompaction(reason, willRetry, preparationOverride, preparationOptions) {
|
|
2199
2181
|
const settings = this.settingsManager.getCompactionSettings();
|
|
2200
2182
|
const model = this.model;
|
|
2201
|
-
const piServerExecution = isPiServerMode() && model ? this._assertPiServerProviderExecution(model) : undefined;
|
|
2202
2183
|
let started = false;
|
|
2203
2184
|
let piServerLease = {
|
|
2204
2185
|
path: undefined,
|
|
@@ -2280,7 +2261,6 @@ export class AgentSession {
|
|
|
2280
2261
|
preparation: preparationOptions ?? { firstKeptEntryId: preparation.firstKeptEntryId },
|
|
2281
2262
|
extensionCompaction,
|
|
2282
2263
|
sessionTree: { entries: this.sessionManager.getEntries(), leafId: this.sessionManager.getLeafId() },
|
|
2283
|
-
providerExecutionFingerprint: piServerExecution?.providerExecutionFingerprint,
|
|
2284
2264
|
piServerCompactStatePath: getPiServerCompactStatePath(sessionFile),
|
|
2285
2265
|
signal,
|
|
2286
2266
|
reasoning: toProviderReasoning(this.thinkingLevel),
|
|
@@ -2428,9 +2408,6 @@ export class AgentSession {
|
|
|
2428
2408
|
}
|
|
2429
2409
|
const settings = this.settingsManager.getCompactionSettings();
|
|
2430
2410
|
const markerParentId = this.sessionManager.getLeafId();
|
|
2431
|
-
if (isPiServerMode() && this.model) {
|
|
2432
|
-
this._assertPiServerProviderExecution(this.model);
|
|
2433
|
-
}
|
|
2434
2411
|
const markerId = this._appendIntraTurnCompactionMarker();
|
|
2435
2412
|
const preparationOptions = { firstKeptEntryId: markerId };
|
|
2436
2413
|
const branchWithMarker = this.sessionManager.getBranch();
|
|
@@ -3039,9 +3016,6 @@ export class AgentSession {
|
|
|
3039
3016
|
* @returns Result with editorText (if user message) and cancelled status
|
|
3040
3017
|
*/
|
|
3041
3018
|
async navigateTree(targetId, options = {}) {
|
|
3042
|
-
if (isPiServerMode() && options.summarize && this.model) {
|
|
3043
|
-
this._assertPiServerProviderExecution(this.model);
|
|
3044
|
-
}
|
|
3045
3019
|
const oldLeafId = this.sessionManager.getLeafId();
|
|
3046
3020
|
// No-op if already at target
|
|
3047
3021
|
if (targetId === oldLeafId) {
|