@earendil-works/pi-coding-agent 0.79.4 → 0.79.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 +33 -0
- package/dist/bun/restore-sandbox-env.d.ts +4 -0
- package/dist/bun/restore-sandbox-env.d.ts.map +1 -1
- package/dist/bun/restore-sandbox-env.js +4 -0
- package/dist/bun/restore-sandbox-env.js.map +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +10 -7
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts +5 -0
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +8 -1
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +2 -0
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +2 -2
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +2 -2
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +10 -10
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/export-html/vendor/marked.min.js +75 -3
- package/dist/core/http-dispatcher.d.ts +1 -0
- package/dist/core/http-dispatcher.d.ts.map +1 -1
- package/dist/core/http-dispatcher.js +7 -0
- package/dist/core/http-dispatcher.js.map +1 -1
- package/dist/core/model-registry.d.ts +1 -0
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +8 -4
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/provider-attribution.d.ts.map +1 -1
- package/dist/core/provider-attribution.js +10 -0
- package/dist/core/provider-attribution.js.map +1 -1
- package/dist/core/resolve-config-value.d.ts +7 -7
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js +19 -19
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +2 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-manager.d.ts +1 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +17 -5
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +4 -0
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +0 -1
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +0 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +0 -5
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/docs/providers.md +20 -2
- package/docs/settings.md +12 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +17 -17
- package/package.json +4 -4
|
@@ -150,7 +150,7 @@ export class AgentSession {
|
|
|
150
150
|
throw new Error(result.error);
|
|
151
151
|
}
|
|
152
152
|
if (result.apiKey) {
|
|
153
|
-
return { apiKey: result.apiKey, headers: result.headers };
|
|
153
|
+
return { apiKey: result.apiKey, headers: result.headers, env: result.env };
|
|
154
154
|
}
|
|
155
155
|
const isOAuth = this._modelRegistry.isUsingOAuth(model);
|
|
156
156
|
if (isOAuth) {
|
|
@@ -165,7 +165,7 @@ export class AgentSession {
|
|
|
165
165
|
return this._getRequiredRequestAuth(model);
|
|
166
166
|
}
|
|
167
167
|
const result = await this._modelRegistry.getApiKeyAndHeaders(model);
|
|
168
|
-
return result.ok ? { apiKey: result.apiKey, headers: result.headers } : {};
|
|
168
|
+
return result.ok ? { apiKey: result.apiKey, headers: result.headers, env: result.env } : {};
|
|
169
169
|
}
|
|
170
170
|
/**
|
|
171
171
|
* Install tool hooks once on the Agent instance.
|
|
@@ -1273,7 +1273,7 @@ export class AgentSession {
|
|
|
1273
1273
|
if (!this.model) {
|
|
1274
1274
|
throw new Error(formatNoModelSelectedMessage());
|
|
1275
1275
|
}
|
|
1276
|
-
const { apiKey, headers } = await this._getCompactionRequestAuth(this.model);
|
|
1276
|
+
const { apiKey, headers, env } = await this._getCompactionRequestAuth(this.model);
|
|
1277
1277
|
const pathEntries = this.sessionManager.getBranch();
|
|
1278
1278
|
const settings = this.settingsManager.getCompactionSettings();
|
|
1279
1279
|
const preparation = prepareCompaction(pathEntries, settings);
|
|
@@ -1316,7 +1316,7 @@ export class AgentSession {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
else {
|
|
1318
1318
|
// Generate compaction result
|
|
1319
|
-
const result = await compact(preparation, this.model, apiKey, headers, customInstructions, this._compactionAbortController.signal, this.thinkingLevel, this.agent.streamFn);
|
|
1319
|
+
const result = await compact(preparation, this.model, apiKey, headers, customInstructions, this._compactionAbortController.signal, this.thinkingLevel, this.agent.streamFn, env);
|
|
1320
1320
|
summary = result.summary;
|
|
1321
1321
|
firstKeptEntryId = result.firstKeptEntryId;
|
|
1322
1322
|
tokensBefore = result.tokensBefore;
|
|
@@ -1486,6 +1486,7 @@ export class AgentSession {
|
|
|
1486
1486
|
}
|
|
1487
1487
|
let apiKey;
|
|
1488
1488
|
let headers;
|
|
1489
|
+
let env;
|
|
1489
1490
|
if (this.agent.streamFn === streamSimple) {
|
|
1490
1491
|
const authResult = await this._modelRegistry.getApiKeyAndHeaders(this.model);
|
|
1491
1492
|
if (!authResult.ok || !authResult.apiKey) {
|
|
@@ -1500,9 +1501,10 @@ export class AgentSession {
|
|
|
1500
1501
|
}
|
|
1501
1502
|
apiKey = authResult.apiKey;
|
|
1502
1503
|
headers = authResult.headers;
|
|
1504
|
+
env = authResult.env;
|
|
1503
1505
|
}
|
|
1504
1506
|
else {
|
|
1505
|
-
({ apiKey, headers } = await this._getCompactionRequestAuth(this.model));
|
|
1507
|
+
({ apiKey, headers, env } = await this._getCompactionRequestAuth(this.model));
|
|
1506
1508
|
}
|
|
1507
1509
|
const pathEntries = this.sessionManager.getBranch();
|
|
1508
1510
|
const preparation = prepareCompaction(pathEntries, settings);
|
|
@@ -1554,7 +1556,7 @@ export class AgentSession {
|
|
|
1554
1556
|
}
|
|
1555
1557
|
else {
|
|
1556
1558
|
// Generate compaction result
|
|
1557
|
-
const compactResult = await compact(preparation, this.model, apiKey, headers, undefined, this._autoCompactionAbortController.signal, this.thinkingLevel, this.agent.streamFn);
|
|
1559
|
+
const compactResult = await compact(preparation, this.model, apiKey, headers, undefined, this._autoCompactionAbortController.signal, this.thinkingLevel, this.agent.streamFn, env);
|
|
1558
1560
|
summary = compactResult.summary;
|
|
1559
1561
|
firstKeptEntryId = compactResult.firstKeptEntryId;
|
|
1560
1562
|
tokensBefore = compactResult.tokensBefore;
|
|
@@ -2221,12 +2223,13 @@ export class AgentSession {
|
|
|
2221
2223
|
let summaryDetails;
|
|
2222
2224
|
if (options.summarize && entriesToSummarize.length > 0 && !extensionSummary) {
|
|
2223
2225
|
const model = this.model;
|
|
2224
|
-
const { apiKey, headers } = await this._getRequiredRequestAuth(model);
|
|
2226
|
+
const { apiKey, headers, env } = await this._getRequiredRequestAuth(model);
|
|
2225
2227
|
const branchSummarySettings = this.settingsManager.getBranchSummarySettings();
|
|
2226
2228
|
const result = await generateBranchSummary(entriesToSummarize, {
|
|
2227
2229
|
model,
|
|
2228
2230
|
apiKey,
|
|
2229
2231
|
headers,
|
|
2232
|
+
env,
|
|
2230
2233
|
signal: this._branchSummaryAbortController.signal,
|
|
2231
2234
|
customInstructions,
|
|
2232
2235
|
replaceInstructions,
|