@ponythewhite/base-context 1.0.4 → 1.0.6
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 +11 -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 +2 -2
- package/dist/bundle/{bundled-modules-R5EAJ62K.js → bundled-modules-MEACET4U.js} +4 -4
- package/dist/bundle/{chunk-HKINIBP4.js → chunk-LFPWHI42.js} +1 -1
- package/dist/bundle/{chunk-BV25CVRM.js → chunk-LIZVVGHR.js} +83 -108
- package/dist/bundle/{chunk-XDJ56NJA.js → chunk-QKI6KEGP.js} +47 -23
- package/dist/bundle/{chunk-27QCJ2AZ.js → chunk-UPVDERMD.js} +0 -12
- package/dist/bundle/{cli-main-OUKN743U.js → cli-main-ANUJY7Y4.js} +3 -3
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/{main-QPCXSW6X.js → main-4GIKOHIT.js} +4 -4
- package/dist/cli/product-doctor.d.ts.map +1 -1
- package/dist/cli/product-doctor.js +2 -2
- package/dist/cli/product-doctor.js.map +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +9 -3
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/canonical-context.d.ts +3 -1
- package/dist/core/canonical-context.d.ts.map +1 -1
- package/dist/core/canonical-context.js +46 -16
- package/dist/core/canonical-context.js.map +1 -1
- package/dist/core/context-epoch-copy.d.ts.map +1 -1
- package/dist/core/context-epoch-copy.js +1 -1
- package/dist/core/context-epoch-copy.js.map +1 -1
- package/dist/core/context-epoch.d.ts +12 -2
- package/dist/core/context-epoch.d.ts.map +1 -1
- package/dist/core/context-epoch.js +28 -12
- package/dist/core/context-epoch.js.map +1 -1
- package/dist/core/session-bootstrap.d.ts +1 -0
- package/dist/core/session-bootstrap.d.ts.map +1 -1
- package/dist/core/session-bootstrap.js +1 -1
- package/dist/core/session-bootstrap.js.map +1 -1
- package/dist/modes/interactive/components/brand-announcement.d.ts +5 -0
- package/dist/modes/interactive/components/brand-announcement.d.ts.map +1 -0
- package/dist/modes/interactive/components/brand-announcement.js +14 -0
- package/dist/modes/interactive/components/brand-announcement.js.map +1 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +9 -6
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +4 -4
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/shared/startup-notices.d.ts.map +1 -1
- package/dist/modes/shared/startup-notices.js +1 -1
- package/dist/modes/shared/startup-notices.js.map +1 -1
- package/dist/themes/synerise-logo.d.ts +3 -0
- package/dist/themes/synerise-logo.d.ts.map +1 -0
- package/dist/themes/synerise-logo.js +9 -0
- package/dist/themes/synerise-logo.js.map +1 -0
- package/package.json +6 -6
- package/dist/modes/interactive/assets/clankolas.png +0 -0
- package/dist/modes/interactive/components/earendil-announcement.d.ts +0 -5
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +0 -1
- package/dist/modes/interactive/components/earendil-announcement.js +0 -40
- package/dist/modes/interactive/components/earendil-announcement.js.map +0 -1
- package/dist/themes/prime-logo.d.ts +0 -9
- package/dist/themes/prime-logo.d.ts.map +0 -1
- package/dist/themes/prime-logo.js +0 -18
- package/dist/themes/prime-logo.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.6] - 2026-09-18
|
|
4
|
+
|
|
5
|
+
- Fixed automatic and manual compaction failing after native tool continuations.
|
|
6
|
+
- Kept pending-tool context reads available without granting provider-request permission.
|
|
7
|
+
- Preserved public tool facts and exact source references through summaries and subsequent requests.
|
|
8
|
+
|
|
9
|
+
## [1.0.5] - 2026-09-18
|
|
10
|
+
|
|
11
|
+
- Displayed the built-in theme as Synerise without changing saved theme IDs, and branded the tmux startup notice as base-context.
|
|
12
|
+
- Replaced the upstream startup artwork with a Synerise ASCII wordmark and base-context label.
|
|
13
|
+
|
|
3
14
|
## [1.0.4] - 2026-09-17
|
|
4
15
|
|
|
5
16
|
- Fixed first-time Python setup failing to find its newly installed uv when XDG data paths are configured.
|
package/dist/build-info.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createRequire as __piBundleCreateRequire } from 'node:module'; const require = __piBundleCreateRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
writeFileLogEntry
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-LFPWHI42.js";
|
|
5
|
+
import "./chunk-UPVDERMD.js";
|
|
6
6
|
import "./chunk-5QCJ5DQU.js";
|
|
7
7
|
import "./chunk-CRBVRZBV.js";
|
|
8
8
|
import "./chunk-GRJFXLBM.js";
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
oauth_exports,
|
|
52
52
|
runPrintMode,
|
|
53
53
|
runRpcMode
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-LIZVVGHR.js";
|
|
55
55
|
import {
|
|
56
56
|
AgentSession,
|
|
57
57
|
CURRENT_SESSION_VERSION,
|
|
@@ -143,15 +143,15 @@ import {
|
|
|
143
143
|
withFileMutationQueue,
|
|
144
144
|
wrapRegisteredTool,
|
|
145
145
|
wrapRegisteredTools
|
|
146
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-QKI6KEGP.js";
|
|
147
147
|
import "./chunk-CFNASUYO.js";
|
|
148
|
-
import "./chunk-
|
|
148
|
+
import "./chunk-LFPWHI42.js";
|
|
149
149
|
import {
|
|
150
150
|
VERSION,
|
|
151
151
|
build_exports,
|
|
152
152
|
getAgentDir,
|
|
153
153
|
src_exports
|
|
154
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-UPVDERMD.js";
|
|
155
155
|
import "./chunk-5QCJ5DQU.js";
|
|
156
156
|
import {
|
|
157
157
|
compile_exports,
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
CONTEXT_POLICY_EPOCH_RENDERER,
|
|
19
19
|
CONTEXT_SKILL_EPOCH_RENDERER,
|
|
20
20
|
CONTEXT_TOOL_EPOCH_RENDERER,
|
|
21
|
+
CONTEXT_TOOL_SUMMARY_RENDERER,
|
|
21
22
|
CURRENT_SESSION_VERSION,
|
|
22
23
|
CURSOR_MARKER,
|
|
23
24
|
CombinedAutocompleteProvider,
|
|
@@ -347,7 +348,7 @@ import {
|
|
|
347
348
|
watchWithErrorHandler,
|
|
348
349
|
workerRosterEntryFromSummary,
|
|
349
350
|
wrapTextWithAnsi
|
|
350
|
-
} from "./chunk-
|
|
351
|
+
} from "./chunk-QKI6KEGP.js";
|
|
351
352
|
import {
|
|
352
353
|
array,
|
|
353
354
|
boolean,
|
|
@@ -366,7 +367,7 @@ import {
|
|
|
366
367
|
import {
|
|
367
368
|
installFileLogSink,
|
|
368
369
|
setLogContext
|
|
369
|
-
} from "./chunk-
|
|
370
|
+
} from "./chunk-LFPWHI42.js";
|
|
370
371
|
import {
|
|
371
372
|
APP_NAME,
|
|
372
373
|
APP_TITLE,
|
|
@@ -383,7 +384,6 @@ import {
|
|
|
383
384
|
getAgentLogPath,
|
|
384
385
|
getAuthPath,
|
|
385
386
|
getBinDir,
|
|
386
|
-
getBundledInteractiveAssetPath,
|
|
387
387
|
getBundledSkillsDir,
|
|
388
388
|
getChangelogPath,
|
|
389
389
|
getClientErrorLogPath,
|
|
@@ -413,7 +413,7 @@ import {
|
|
|
413
413
|
shouldUseWindowsShell,
|
|
414
414
|
signalProcessGroupOrProcess,
|
|
415
415
|
typebox_exports
|
|
416
|
-
} from "./chunk-
|
|
416
|
+
} from "./chunk-UPVDERMD.js";
|
|
417
417
|
import {
|
|
418
418
|
PRODUCT,
|
|
419
419
|
PRODUCT_ENV
|
|
@@ -605,9 +605,9 @@ var require_pump = __commonJS({
|
|
|
605
605
|
"../../node_modules/pump/index.js"(exports, module) {
|
|
606
606
|
var once = require_once();
|
|
607
607
|
var eos = require_end_of_stream();
|
|
608
|
-
var
|
|
608
|
+
var fs5;
|
|
609
609
|
try {
|
|
610
|
-
|
|
610
|
+
fs5 = __require("fs");
|
|
611
611
|
} catch (e) {
|
|
612
612
|
}
|
|
613
613
|
var noop = function() {
|
|
@@ -618,8 +618,8 @@ var require_pump = __commonJS({
|
|
|
618
618
|
};
|
|
619
619
|
var isFS = function(stream) {
|
|
620
620
|
if (!ancient) return false;
|
|
621
|
-
if (!
|
|
622
|
-
return (stream instanceof (
|
|
621
|
+
if (!fs5) return false;
|
|
622
|
+
return (stream instanceof (fs5.ReadStream || noop) || stream instanceof (fs5.WriteStream || noop)) && isFn(stream.close);
|
|
623
623
|
};
|
|
624
624
|
var isRequest = function(stream) {
|
|
625
625
|
return stream.setHeader && isFn(stream.abort);
|
|
@@ -831,7 +831,7 @@ var require_pend = __commonJS({
|
|
|
831
831
|
// ../../node_modules/fd-slicer/index.js
|
|
832
832
|
var require_fd_slicer = __commonJS({
|
|
833
833
|
"../../node_modules/fd-slicer/index.js"(exports) {
|
|
834
|
-
var
|
|
834
|
+
var fs5 = __require("fs");
|
|
835
835
|
var util = __require("util");
|
|
836
836
|
var stream = __require("stream");
|
|
837
837
|
var Readable3 = stream.Readable;
|
|
@@ -856,7 +856,7 @@ var require_fd_slicer = __commonJS({
|
|
|
856
856
|
FdSlicer.prototype.read = function(buffer, offset, length, position, callback) {
|
|
857
857
|
var self = this;
|
|
858
858
|
self.pend.go(function(cb) {
|
|
859
|
-
|
|
859
|
+
fs5.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer2) {
|
|
860
860
|
cb();
|
|
861
861
|
callback(err, bytesRead, buffer2);
|
|
862
862
|
});
|
|
@@ -865,7 +865,7 @@ var require_fd_slicer = __commonJS({
|
|
|
865
865
|
FdSlicer.prototype.write = function(buffer, offset, length, position, callback) {
|
|
866
866
|
var self = this;
|
|
867
867
|
self.pend.go(function(cb) {
|
|
868
|
-
|
|
868
|
+
fs5.write(self.fd, buffer, offset, length, position, function(err, written, buffer2) {
|
|
869
869
|
cb();
|
|
870
870
|
callback(err, written, buffer2);
|
|
871
871
|
});
|
|
@@ -886,7 +886,7 @@ var require_fd_slicer = __commonJS({
|
|
|
886
886
|
if (self.refCount > 0) return;
|
|
887
887
|
if (self.refCount < 0) throw new Error("invalid unref");
|
|
888
888
|
if (self.autoClose) {
|
|
889
|
-
|
|
889
|
+
fs5.close(self.fd, onCloseDone);
|
|
890
890
|
}
|
|
891
891
|
function onCloseDone(err) {
|
|
892
892
|
if (err) {
|
|
@@ -923,7 +923,7 @@ var require_fd_slicer = __commonJS({
|
|
|
923
923
|
self.context.pend.go(function(cb) {
|
|
924
924
|
if (self.destroyed) return cb();
|
|
925
925
|
var buffer = new Buffer(toRead);
|
|
926
|
-
|
|
926
|
+
fs5.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) {
|
|
927
927
|
if (err) {
|
|
928
928
|
self.destroy(err);
|
|
929
929
|
} else if (bytesRead === 0) {
|
|
@@ -970,7 +970,7 @@ var require_fd_slicer = __commonJS({
|
|
|
970
970
|
}
|
|
971
971
|
self.context.pend.go(function(cb) {
|
|
972
972
|
if (self.destroyed) return cb();
|
|
973
|
-
|
|
973
|
+
fs5.write(self.context.fd, buffer, 0, buffer.length, self.pos, function(err2, bytes) {
|
|
974
974
|
if (err2) {
|
|
975
975
|
self.destroy();
|
|
976
976
|
cb();
|
|
@@ -1397,7 +1397,7 @@ var require_buffer_crc32 = __commonJS({
|
|
|
1397
1397
|
// ../../node_modules/yauzl/index.js
|
|
1398
1398
|
var require_yauzl = __commonJS({
|
|
1399
1399
|
"../../node_modules/yauzl/index.js"(exports) {
|
|
1400
|
-
var
|
|
1400
|
+
var fs5 = __require("fs");
|
|
1401
1401
|
var zlib = __require("zlib");
|
|
1402
1402
|
var fd_slicer = require_fd_slicer();
|
|
1403
1403
|
var crc32 = require_buffer_crc32();
|
|
@@ -1427,10 +1427,10 @@ var require_yauzl = __commonJS({
|
|
|
1427
1427
|
if (options.validateEntrySizes == null) options.validateEntrySizes = true;
|
|
1428
1428
|
if (options.strictFileNames == null) options.strictFileNames = false;
|
|
1429
1429
|
if (callback == null) callback = defaultCallback;
|
|
1430
|
-
|
|
1430
|
+
fs5.open(path6, "r", function(err, fd) {
|
|
1431
1431
|
if (err) return callback(err);
|
|
1432
1432
|
fromFd(fd, options, function(err2, zipfile) {
|
|
1433
|
-
if (err2)
|
|
1433
|
+
if (err2) fs5.close(fd, defaultCallback);
|
|
1434
1434
|
callback(err2, zipfile);
|
|
1435
1435
|
});
|
|
1436
1436
|
});
|
|
@@ -1447,7 +1447,7 @@ var require_yauzl = __commonJS({
|
|
|
1447
1447
|
if (options.validateEntrySizes == null) options.validateEntrySizes = true;
|
|
1448
1448
|
if (options.strictFileNames == null) options.strictFileNames = false;
|
|
1449
1449
|
if (callback == null) callback = defaultCallback;
|
|
1450
|
-
|
|
1450
|
+
fs5.fstat(fd, function(err, stats) {
|
|
1451
1451
|
if (err) return callback(err);
|
|
1452
1452
|
var reader = fd_slicer.createFromFd(fd, { autoClose: true });
|
|
1453
1453
|
fromRandomAccessReader(reader, stats.size, options, callback);
|
|
@@ -2027,7 +2027,7 @@ var require_yauzl = __commonJS({
|
|
|
2027
2027
|
var require_extract_zip = __commonJS({
|
|
2028
2028
|
"../../node_modules/extract-zip/index.js"(exports, module) {
|
|
2029
2029
|
var debug = require_src()("extract-zip");
|
|
2030
|
-
var { createWriteStream: createWriteStream2, promises:
|
|
2030
|
+
var { createWriteStream: createWriteStream2, promises: fs5 } = __require("fs");
|
|
2031
2031
|
var getStream = require_get_stream();
|
|
2032
2032
|
var path6 = __require("path");
|
|
2033
2033
|
var { promisify } = __require("util");
|
|
@@ -2068,8 +2068,8 @@ var require_extract_zip = __commonJS({
|
|
|
2068
2068
|
}
|
|
2069
2069
|
const destDir = path6.dirname(path6.join(this.opts.dir, entry.fileName));
|
|
2070
2070
|
try {
|
|
2071
|
-
await
|
|
2072
|
-
const canonicalDestDir = await
|
|
2071
|
+
await fs5.mkdir(destDir, { recursive: true });
|
|
2072
|
+
const canonicalDestDir = await fs5.realpath(destDir);
|
|
2073
2073
|
const relativeDestDir = path6.relative(this.opts.dir, canonicalDestDir);
|
|
2074
2074
|
if (relativeDestDir.split(path6.sep).includes("..")) {
|
|
2075
2075
|
throw new Error(`Out of bound path "${canonicalDestDir}" found while processing file ${entry.fileName}`);
|
|
@@ -2113,14 +2113,14 @@ var require_extract_zip = __commonJS({
|
|
|
2113
2113
|
mkdirOptions.mode = procMode;
|
|
2114
2114
|
}
|
|
2115
2115
|
debug("mkdir", { dir: destDir, ...mkdirOptions });
|
|
2116
|
-
await
|
|
2116
|
+
await fs5.mkdir(destDir, mkdirOptions);
|
|
2117
2117
|
if (isDir) return;
|
|
2118
2118
|
debug("opening read stream", dest);
|
|
2119
2119
|
const readStream = await promisify(this.zipfile.openReadStream.bind(this.zipfile))(entry);
|
|
2120
2120
|
if (symlink) {
|
|
2121
2121
|
const link = await getStream(readStream);
|
|
2122
2122
|
debug("creating symlink", link, dest);
|
|
2123
|
-
await
|
|
2123
|
+
await fs5.symlink(link, dest);
|
|
2124
2124
|
} else {
|
|
2125
2125
|
await pipeline2(readStream, createWriteStream2(dest, { mode: procMode }));
|
|
2126
2126
|
}
|
|
@@ -2152,8 +2152,8 @@ var require_extract_zip = __commonJS({
|
|
|
2152
2152
|
if (!path6.isAbsolute(opts.dir)) {
|
|
2153
2153
|
throw new Error("Target directory is expected to be absolute");
|
|
2154
2154
|
}
|
|
2155
|
-
await
|
|
2156
|
-
opts.dir = await
|
|
2155
|
+
await fs5.mkdir(opts.dir, { recursive: true });
|
|
2156
|
+
opts.dir = await fs5.realpath(opts.dir);
|
|
2157
2157
|
return new Extractor(zipPath, opts).extract();
|
|
2158
2158
|
};
|
|
2159
2159
|
}
|
|
@@ -17578,7 +17578,7 @@ function getProductDiagnostics() {
|
|
|
17578
17578
|
daemon: DAEMON_PROTOCOL_INFO,
|
|
17579
17579
|
daemonSchema: DAEMON_SCHEMA_ID,
|
|
17580
17580
|
session: CURRENT_SESSION_VERSION,
|
|
17581
|
-
nativeContext: `${CONTEXT_EPOCH_RENDERER} (request), ${CONTEXT_POLICY_EPOCH_RENDERER} (policy), ${CONTEXT_TOOL_EPOCH_RENDERER} (tool continuation), ${CONTEXT_SKILL_EPOCH_RENDERER} (selected skills)`
|
|
17581
|
+
nativeContext: `${CONTEXT_EPOCH_RENDERER} (request), ${CONTEXT_POLICY_EPOCH_RENDERER} (policy), ${CONTEXT_TOOL_EPOCH_RENDERER} (tool continuation), ${CONTEXT_SKILL_EPOCH_RENDERER} (selected skills), ${CONTEXT_TOOL_SUMMARY_RENDERER} (tool summary)`
|
|
17582
17582
|
},
|
|
17583
17583
|
paths: {
|
|
17584
17584
|
...paths,
|
|
@@ -36706,7 +36706,7 @@ var CustomEditor = class extends Editor {
|
|
|
36706
36706
|
|
|
36707
36707
|
// dist/modes/interactive/interactive-mode.js
|
|
36708
36708
|
import { randomUUID as randomUUID9 } from "node:crypto";
|
|
36709
|
-
import * as
|
|
36709
|
+
import * as fs4 from "node:fs";
|
|
36710
36710
|
import * as os3 from "node:os";
|
|
36711
36711
|
import * as path5 from "node:path";
|
|
36712
36712
|
import { spawnSync as spawnSync8 } from "child_process";
|
|
@@ -37021,17 +37021,14 @@ function requireNewPrompt(value) {
|
|
|
37021
37021
|
return prompt;
|
|
37022
37022
|
}
|
|
37023
37023
|
|
|
37024
|
-
// dist/themes/
|
|
37025
|
-
var
|
|
37026
|
-
|
|
37027
|
-
|
|
37028
|
-
|
|
37029
|
-
|
|
37030
|
-
|
|
37031
|
-
|
|
37032
|
-
\u2588\u2588\u2588\u2588\u2588 \u2580\u2588\u2584\u2584\u2584\u2588\u2588\u2588\u2588\u2588\u2580
|
|
37033
|
-
\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2584 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2580
|
|
37034
|
-
\u2580\u2588\u2588\u2588\u2580\u2580 \u2588\u2588\u2588\u2588\u2588\u2580`;
|
|
37024
|
+
// dist/themes/synerise-logo.js
|
|
37025
|
+
var SYNERISE_LOGO = ` #### # # # # ##### #### ##### #### #####
|
|
37026
|
+
# # # ## # # # # # # #
|
|
37027
|
+
### # # # # #### #### # ### ####
|
|
37028
|
+
# # # ## # # # # # #
|
|
37029
|
+
#### # # # ##### # # ##### #### #####
|
|
37030
|
+
|
|
37031
|
+
Synerise base-context`;
|
|
37035
37032
|
|
|
37036
37033
|
// dist/utils/changelog.js
|
|
37037
37034
|
import { existsSync as existsSync19, readFileSync as readFileSync16 } from "fs";
|
|
@@ -37470,7 +37467,7 @@ async function checkTmuxKeyboardSetup() {
|
|
|
37470
37467
|
return "tmux extended-keys is off. Modified Enter keys may not work. Add `set -g extended-keys on` to ~/.tmux.conf and restart tmux.";
|
|
37471
37468
|
}
|
|
37472
37469
|
if (extendedKeysFormat === "xterm") {
|
|
37473
|
-
return "tmux extended-keys-format is xterm.
|
|
37470
|
+
return "tmux extended-keys-format is xterm. base-context works best with csi-u. Add `set -g extended-keys-format csi-u` to ~/.tmux.conf and restart tmux.";
|
|
37474
37471
|
}
|
|
37475
37472
|
return void 0;
|
|
37476
37473
|
}
|
|
@@ -39977,6 +39974,17 @@ var BranchSummaryMessageComponent = class extends Box {
|
|
|
39977
39974
|
}
|
|
39978
39975
|
};
|
|
39979
39976
|
|
|
39977
|
+
// dist/modes/interactive/components/brand-announcement.js
|
|
39978
|
+
var BrandAnnouncementComponent = class extends Container {
|
|
39979
|
+
constructor() {
|
|
39980
|
+
super();
|
|
39981
|
+
this.addChild(new DynamicBorder((text) => theme.fg("accent", text)));
|
|
39982
|
+
this.addChild(new Text(theme.fg("accent", SYNERISE_LOGO), 1, 0));
|
|
39983
|
+
this.addChild(new Spacer(1));
|
|
39984
|
+
this.addChild(new DynamicBorder((text) => theme.fg("accent", text)));
|
|
39985
|
+
}
|
|
39986
|
+
};
|
|
39987
|
+
|
|
39980
39988
|
// dist/modes/interactive/components/compaction-outcome-message.js
|
|
39981
39989
|
var CompactionOutcomeMessageComponent = class extends Container {
|
|
39982
39990
|
constructor(message) {
|
|
@@ -42319,45 +42327,9 @@ var DaxnutsComponent = class {
|
|
|
42319
42327
|
}
|
|
42320
42328
|
};
|
|
42321
42329
|
|
|
42322
|
-
// dist/modes/interactive/components/earendil-announcement.js
|
|
42323
|
-
import * as fs3 from "node:fs";
|
|
42324
|
-
var BLOG_URL = "https://mariozechner.at/posts/2026-04-08-ive-sold-out/";
|
|
42325
|
-
var IMAGE_FILENAME = "clankolas.png";
|
|
42326
|
-
var cachedImageBase64;
|
|
42327
|
-
var attemptedImageLoad = false;
|
|
42328
|
-
function loadImageBase64() {
|
|
42329
|
-
if (attemptedImageLoad) {
|
|
42330
|
-
return cachedImageBase64;
|
|
42331
|
-
}
|
|
42332
|
-
attemptedImageLoad = true;
|
|
42333
|
-
try {
|
|
42334
|
-
cachedImageBase64 = fs3.readFileSync(getBundledInteractiveAssetPath(IMAGE_FILENAME)).toString("base64");
|
|
42335
|
-
} catch {
|
|
42336
|
-
cachedImageBase64 = void 0;
|
|
42337
|
-
}
|
|
42338
|
-
return cachedImageBase64;
|
|
42339
|
-
}
|
|
42340
|
-
var EarendilAnnouncementComponent = class extends Container {
|
|
42341
|
-
constructor() {
|
|
42342
|
-
super();
|
|
42343
|
-
this.addChild(new DynamicBorder((text) => theme.fg("accent", text)));
|
|
42344
|
-
this.addChild(new Text(theme.bold(theme.fg("accent", "pi has joined Earendil")), 1, 0));
|
|
42345
|
-
this.addChild(new Spacer(1));
|
|
42346
|
-
this.addChild(new Text(theme.fg("muted", "Read the blog post:"), 1, 0));
|
|
42347
|
-
this.addChild(new Text(theme.fg("mdLink", BLOG_URL), 1, 0));
|
|
42348
|
-
this.addChild(new Spacer(1));
|
|
42349
|
-
const imageBase64 = loadImageBase64();
|
|
42350
|
-
if (imageBase64) {
|
|
42351
|
-
this.addChild(new Image(imageBase64, "image/png", { fallbackColor: (text) => theme.fg("muted", text) }, { maxWidthCells: 56, filename: IMAGE_FILENAME, fallbackOnly: true }));
|
|
42352
|
-
this.addChild(new Spacer(1));
|
|
42353
|
-
}
|
|
42354
|
-
this.addChild(new DynamicBorder((text) => theme.fg("accent", text)));
|
|
42355
|
-
}
|
|
42356
|
-
};
|
|
42357
|
-
|
|
42358
42330
|
// dist/modes/interactive/components/extension-editor.js
|
|
42359
42331
|
import { spawnSync as spawnSync7 } from "node:child_process";
|
|
42360
|
-
import * as
|
|
42332
|
+
import * as fs3 from "node:fs";
|
|
42361
42333
|
import * as os2 from "node:os";
|
|
42362
42334
|
import * as path4 from "node:path";
|
|
42363
42335
|
var ExtensionEditorComponent = class extends Container {
|
|
@@ -42419,7 +42391,7 @@ var ExtensionEditorComponent = class extends Container {
|
|
|
42419
42391
|
const currentText = this.editor.getText();
|
|
42420
42392
|
const tmpFile = path4.join(os2.tmpdir(), `pi-extension-editor-${Date.now()}.md`);
|
|
42421
42393
|
try {
|
|
42422
|
-
|
|
42394
|
+
fs3.writeFileSync(tmpFile, currentText, "utf-8");
|
|
42423
42395
|
this.tui.stop();
|
|
42424
42396
|
const [editor, ...editorArgs] = editorCmd.split(" ");
|
|
42425
42397
|
const result = spawnSync7(editor, [...editorArgs, tmpFile], {
|
|
@@ -42427,12 +42399,12 @@ var ExtensionEditorComponent = class extends Container {
|
|
|
42427
42399
|
shell: process.platform === "win32"
|
|
42428
42400
|
});
|
|
42429
42401
|
if (result.status === 0) {
|
|
42430
|
-
const newContent =
|
|
42402
|
+
const newContent = fs3.readFileSync(tmpFile, "utf-8").replace(/\n$/, "");
|
|
42431
42403
|
this.editor.setText(newContent);
|
|
42432
42404
|
}
|
|
42433
42405
|
} finally {
|
|
42434
42406
|
try {
|
|
42435
|
-
|
|
42407
|
+
fs3.unlinkSync(tmpFile);
|
|
42436
42408
|
} catch {
|
|
42437
42409
|
}
|
|
42438
42410
|
this.tui.start();
|
|
@@ -46943,6 +46915,8 @@ var SettingsSelectorComponent = class extends Container {
|
|
|
46943
46915
|
constructor(config, callbacks) {
|
|
46944
46916
|
super();
|
|
46945
46917
|
let currentWarnings = { ...config.warnings };
|
|
46918
|
+
let currentTheme = config.currentTheme;
|
|
46919
|
+
const themeLabel = (name) => name === "prime" ? "Synerise" : name;
|
|
46946
46920
|
const idleEvictionValues = [30, 60, 90, 180, 360];
|
|
46947
46921
|
if (typeof config.idleEvictionMinutes === "number" && !idleEvictionValues.includes(config.idleEvictionMinutes)) {
|
|
46948
46922
|
idleEvictionValues.push(config.idleEvictionMinutes);
|
|
@@ -47040,15 +47014,16 @@ var SettingsSelectorComponent = class extends Container {
|
|
|
47040
47014
|
id: "theme",
|
|
47041
47015
|
label: "Theme",
|
|
47042
47016
|
description: "Color theme for the interface",
|
|
47043
|
-
currentValue:
|
|
47044
|
-
submenu: (
|
|
47017
|
+
currentValue: themeLabel(currentTheme),
|
|
47018
|
+
submenu: (_currentValue, done) => new SelectSubmenu("Theme", "Select color theme", config.availableThemes.map((t) => ({
|
|
47045
47019
|
value: t,
|
|
47046
|
-
label: t
|
|
47047
|
-
})),
|
|
47020
|
+
label: themeLabel(t)
|
|
47021
|
+
})), currentTheme, (value) => {
|
|
47022
|
+
currentTheme = value;
|
|
47048
47023
|
callbacks.onThemeChange(value);
|
|
47049
|
-
done(value);
|
|
47024
|
+
done(themeLabel(value));
|
|
47050
47025
|
}, () => {
|
|
47051
|
-
callbacks.onThemePreview?.(
|
|
47026
|
+
callbacks.onThemePreview?.(currentTheme);
|
|
47052
47027
|
done();
|
|
47053
47028
|
}, (value) => {
|
|
47054
47029
|
callbacks.onThemePreview?.(value);
|
|
@@ -48889,7 +48864,7 @@ var BrandSplashHeader = class {
|
|
|
48889
48864
|
this.getCwd = getCwd;
|
|
48890
48865
|
this.verboseInstructions = verboseInstructions;
|
|
48891
48866
|
this.options = options;
|
|
48892
|
-
this.logoRaw = (options.logo ??
|
|
48867
|
+
this.logoRaw = (options.logo ?? SYNERISE_LOGO).split("\n");
|
|
48893
48868
|
this.logoCanvasWidth = this.logoRaw.reduce((max, line) => Math.max(max, visibleWidth(line)), 0);
|
|
48894
48869
|
}
|
|
48895
48870
|
invalidate() {
|
|
@@ -54368,7 +54343,7 @@ ${message}`, ["Yes", "No"], opts);
|
|
|
54368
54343
|
const currentText = this.editor.getExpandedText?.() ?? this.editor.getText();
|
|
54369
54344
|
const tmpFile = path5.join(os3.tmpdir(), `pi-editor-${Date.now()}.pi.md`);
|
|
54370
54345
|
try {
|
|
54371
|
-
|
|
54346
|
+
fs4.writeFileSync(tmpFile, currentText, "utf-8");
|
|
54372
54347
|
this.ui.stop();
|
|
54373
54348
|
const [editor, ...editorArgs] = editorCmd.split(" ");
|
|
54374
54349
|
const result = spawnSync8(editor, [...editorArgs, tmpFile], {
|
|
@@ -54376,12 +54351,12 @@ ${message}`, ["Yes", "No"], opts);
|
|
|
54376
54351
|
shell: process.platform === "win32"
|
|
54377
54352
|
});
|
|
54378
54353
|
if (result.status === 0) {
|
|
54379
|
-
const newContent =
|
|
54354
|
+
const newContent = fs4.readFileSync(tmpFile, "utf-8").replace(/\n$/, "");
|
|
54380
54355
|
this.editor.setText(newContent);
|
|
54381
54356
|
}
|
|
54382
54357
|
} finally {
|
|
54383
54358
|
try {
|
|
54384
|
-
|
|
54359
|
+
fs4.unlinkSync(tmpFile);
|
|
54385
54360
|
} catch {
|
|
54386
54361
|
}
|
|
54387
54362
|
this.ui.start();
|
|
@@ -55836,8 +55811,8 @@ Fell back to dark theme.`);
|
|
|
55836
55811
|
`;
|
|
55837
55812
|
let files = [];
|
|
55838
55813
|
try {
|
|
55839
|
-
if (
|
|
55840
|
-
files =
|
|
55814
|
+
if (fs4.existsSync(logsDir)) {
|
|
55815
|
+
files = fs4.readdirSync(logsDir).filter((name) => !name.startsWith("."));
|
|
55841
55816
|
}
|
|
55842
55817
|
} catch {
|
|
55843
55818
|
}
|
|
@@ -55848,7 +55823,7 @@ Fell back to dark theme.`);
|
|
|
55848
55823
|
for (const name of files.sort()) {
|
|
55849
55824
|
let size = "";
|
|
55850
55825
|
try {
|
|
55851
|
-
size = ` ${theme.fg("dim", `(${(
|
|
55826
|
+
size = ` ${theme.fg("dim", `(${(fs4.statSync(path5.join(logsDir, name)).size / 1024).toFixed(1)} KB)`)}`;
|
|
55852
55827
|
} catch {
|
|
55853
55828
|
}
|
|
55854
55829
|
info += `${theme.fg("dim", "\u2022")} ${name}${size}
|
|
@@ -56295,8 +56270,8 @@ ${interrupt ? `| \`${interrupt}\` | Interrupt current operation |
|
|
|
56295
56270
|
...messages.map((msg) => JSON.stringify(msg)),
|
|
56296
56271
|
""
|
|
56297
56272
|
].join("\n");
|
|
56298
|
-
|
|
56299
|
-
|
|
56273
|
+
fs4.mkdirSync(path5.dirname(debugLogPath), { recursive: true });
|
|
56274
|
+
fs4.writeFileSync(debugLogPath, debugData);
|
|
56300
56275
|
this.chatContainer.addChild(new Spacer(1));
|
|
56301
56276
|
this.chatContainer.addChild(new Text(`${theme.fg("accent", "\u2713 Debug log written")}
|
|
56302
56277
|
${theme.fg("muted", debugLogPath)}`, 1, 1));
|
|
@@ -56312,7 +56287,7 @@ ${theme.fg("muted", debugLogPath)}`, 1, 1));
|
|
|
56312
56287
|
}
|
|
56313
56288
|
handleDementedDelves() {
|
|
56314
56289
|
this.chatContainer.addChild(new Spacer(1));
|
|
56315
|
-
this.chatContainer.addChild(new
|
|
56290
|
+
this.chatContainer.addChild(new BrandAnnouncementComponent());
|
|
56316
56291
|
this.ui.requestRender();
|
|
56317
56292
|
}
|
|
56318
56293
|
handleDaxnuts() {
|
|
@@ -58875,7 +58850,7 @@ function padLine(line, width) {
|
|
|
58875
58850
|
// dist/modes/daemon/daemon-mode.js
|
|
58876
58851
|
import { spawn as spawn9 } from "node:child_process";
|
|
58877
58852
|
import { createHash as createHash8, randomUUID as randomUUID13, timingSafeEqual } from "node:crypto";
|
|
58878
|
-
import { existsSync as existsSync24, mkdirSync as mkdirSync16, readFileSync as
|
|
58853
|
+
import { existsSync as existsSync24, mkdirSync as mkdirSync16, readFileSync as readFileSync22, renameSync as renameSync11, rmSync as rmSync12, writeFileSync as writeFileSync11 } from "node:fs";
|
|
58879
58854
|
import { stat as stat3 } from "node:fs/promises";
|
|
58880
58855
|
import { createConnection as createConnection2, createServer as createServer2 } from "node:net";
|
|
58881
58856
|
import { basename as basename11, dirname as dirname18, isAbsolute as isAbsolute5, join as join30, resolve as resolve23 } from "node:path";
|
|
@@ -60028,7 +60003,7 @@ async function readRlmSubagentDisplayEntry(sessionDir) {
|
|
|
60028
60003
|
}
|
|
60029
60004
|
|
|
60030
60005
|
// dist/modes/daemon/snapshot-transcript-cache.js
|
|
60031
|
-
import { mkdirSync as mkdirSync14, readFileSync as
|
|
60006
|
+
import { mkdirSync as mkdirSync14, readFileSync as readFileSync20, rmSync as rmSync11, writeFileSync as writeFileSync10 } from "node:fs";
|
|
60032
60007
|
import { join as join29 } from "node:path";
|
|
60033
60008
|
var SNAPSHOT_TARGET_CHUNK_BYTES = 512 * 1024;
|
|
60034
60009
|
var SNAPSHOT_MEMORY_CACHE_BYTES = 4 * 1024 * 1024;
|
|
@@ -60119,7 +60094,7 @@ var SnapshotTranscriptCache = class {
|
|
|
60119
60094
|
if (!chunk.path) {
|
|
60120
60095
|
throw new Error(`Snapshot transcript chunk ${index} has no backing storage`);
|
|
60121
60096
|
}
|
|
60122
|
-
return
|
|
60097
|
+
return readFileSync20(chunk.path);
|
|
60123
60098
|
}
|
|
60124
60099
|
*[Symbol.iterator]() {
|
|
60125
60100
|
for (let index = 0; index < this.chunkCount; index++) {
|
|
@@ -60275,7 +60250,7 @@ var SnapshotTranscriptCache = class {
|
|
|
60275
60250
|
};
|
|
60276
60251
|
|
|
60277
60252
|
// dist/modes/daemon/worker-recovery-journal.js
|
|
60278
|
-
import { fchmodSync, fstatSync as fstatSync3, fsyncSync as fsyncSync6, mkdirSync as mkdirSync15, openSync as openSync6, readFileSync as
|
|
60253
|
+
import { fchmodSync, fstatSync as fstatSync3, fsyncSync as fsyncSync6, mkdirSync as mkdirSync15, openSync as openSync6, readFileSync as readFileSync21, readSync as readSync3, renameSync as renameSync10 } from "node:fs";
|
|
60279
60254
|
import { dirname as dirname17 } from "node:path";
|
|
60280
60255
|
|
|
60281
60256
|
// dist/modes/daemon/recovery-journal-io.js
|
|
@@ -60306,7 +60281,7 @@ function parseRecords(path6) {
|
|
|
60306
60281
|
const latest = /* @__PURE__ */ new Map();
|
|
60307
60282
|
let contents;
|
|
60308
60283
|
try {
|
|
60309
|
-
contents =
|
|
60284
|
+
contents = readFileSync21(path6, "utf8");
|
|
60310
60285
|
} catch (error) {
|
|
60311
60286
|
if (error.code === "ENOENT")
|
|
60312
60287
|
return { latest, incompleteTail: false };
|
|
@@ -60901,7 +60876,7 @@ var AgentDaemon = class {
|
|
|
60901
60876
|
}
|
|
60902
60877
|
let ownerPid;
|
|
60903
60878
|
try {
|
|
60904
|
-
ownerPid = Number(
|
|
60879
|
+
ownerPid = Number(readFileSync22(join30(lockDirectory, "pid"), "utf8").trim());
|
|
60905
60880
|
} catch {
|
|
60906
60881
|
}
|
|
60907
60882
|
if (ownerPid && this.isProcessAlive(ownerPid)) {
|
|
@@ -66492,13 +66467,13 @@ async function resolveDaemonSessionPath(selector, cwd, sessionDir) {
|
|
|
66492
66467
|
// dist/modes/daemon/daemon-supervisor.js
|
|
66493
66468
|
import { spawn as spawn10 } from "node:child_process";
|
|
66494
66469
|
import { createHash as createHash9, randomBytes, randomUUID as randomUUID14 } from "node:crypto";
|
|
66495
|
-
import { chmodSync as chmodSync3, existsSync as existsSync25, mkdirSync as mkdirSync18, readdirSync as readdirSync10, readFileSync as
|
|
66470
|
+
import { chmodSync as chmodSync3, existsSync as existsSync25, mkdirSync as mkdirSync18, readdirSync as readdirSync10, readFileSync as readFileSync24, renameSync as renameSync13, rmSync as rmSync13, writeFileSync as writeFileSync12 } from "node:fs";
|
|
66496
66471
|
import { createServer as createServer3 } from "node:net";
|
|
66497
66472
|
import { basename as basename12, dirname as dirname20, join as join31, resolve as resolve24 } from "node:path";
|
|
66498
66473
|
import { Writable } from "node:stream";
|
|
66499
66474
|
|
|
66500
66475
|
// dist/modes/daemon/command-recovery-journal.js
|
|
66501
|
-
import { fchmodSync as fchmodSync2, fstatSync as fstatSync4, fsyncSync as fsyncSync7, mkdirSync as mkdirSync17, openSync as openSync7, readFileSync as
|
|
66476
|
+
import { fchmodSync as fchmodSync2, fstatSync as fstatSync4, fsyncSync as fsyncSync7, mkdirSync as mkdirSync17, openSync as openSync7, readFileSync as readFileSync23, readSync as readSync4, renameSync as renameSync12 } from "node:fs";
|
|
66502
66477
|
import { dirname as dirname19 } from "node:path";
|
|
66503
66478
|
var COMPACT_AFTER_RECORDS = 4096;
|
|
66504
66479
|
function createCommandIdempotencyKey(clientId, commandId) {
|
|
@@ -66581,7 +66556,7 @@ var CommandRecoveryJournal = class {
|
|
|
66581
66556
|
load() {
|
|
66582
66557
|
let contents;
|
|
66583
66558
|
try {
|
|
66584
|
-
contents =
|
|
66559
|
+
contents = readFileSync23(this.path, "utf8");
|
|
66585
66560
|
} catch (error) {
|
|
66586
66561
|
if (error.code === "ENOENT") {
|
|
66587
66562
|
return;
|
|
@@ -67665,7 +67640,7 @@ var DaemonSupervisor = class {
|
|
|
67665
67640
|
}
|
|
67666
67641
|
const path6 = join31(this.descriptorDir, name);
|
|
67667
67642
|
try {
|
|
67668
|
-
const descriptor = JSON.parse(
|
|
67643
|
+
const descriptor = JSON.parse(readFileSync24(path6, "utf8"));
|
|
67669
67644
|
if (!isDaemonWorkerDescriptor(descriptor, this.socketPath)) {
|
|
67670
67645
|
continue;
|
|
67671
67646
|
}
|
|
@@ -67707,7 +67682,7 @@ var DaemonSupervisor = class {
|
|
|
67707
67682
|
const descriptorPath = join31(this.descriptorDir, name);
|
|
67708
67683
|
let descriptor;
|
|
67709
67684
|
try {
|
|
67710
|
-
descriptor = JSON.parse(
|
|
67685
|
+
descriptor = JSON.parse(readFileSync24(descriptorPath, "utf8"));
|
|
67711
67686
|
} catch {
|
|
67712
67687
|
continue;
|
|
67713
67688
|
}
|
|
@@ -67723,7 +67698,7 @@ var DaemonSupervisor = class {
|
|
|
67723
67698
|
}
|
|
67724
67699
|
loadPersistedSupervisorConfig() {
|
|
67725
67700
|
try {
|
|
67726
|
-
const parsed = JSON.parse(
|
|
67701
|
+
const parsed = JSON.parse(readFileSync24(this.supervisorConfigPath, "utf8"));
|
|
67727
67702
|
if (parsed.version !== 1 || typeof parsed.socketPath !== "string" || normalizeSocketPath(parsed.socketPath) !== this.socketPath || !parsed.defaultSessionConfig || typeof parsed.defaultSessionConfig !== "object" || typeof parsed.defaultSessionConfig.agentDir !== "string") {
|
|
67728
67703
|
return void 0;
|
|
67729
67704
|
}
|
|
@@ -71909,7 +71884,7 @@ var DaemonSupervisor = class {
|
|
|
71909
71884
|
writeFileSync12(tempPath, `${JSON.stringify(manifest)}
|
|
71910
71885
|
`, { mode: 384 });
|
|
71911
71886
|
chmodSync3(tempPath, 384);
|
|
71912
|
-
const validated = JSON.parse(
|
|
71887
|
+
const validated = JSON.parse(readFileSync24(tempPath, "utf8"));
|
|
71913
71888
|
if (!Array.isArray(validated.sessions) || validated.sessions.length !== manifest.sessions.length) {
|
|
71914
71889
|
throw new Error("Could not validate aggregate update manifest");
|
|
71915
71890
|
}
|