@ponythewhite/base-context 1.0.4 → 1.0.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 +5 -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-UVCJPNFC.js} +4 -4
- package/dist/bundle/{chunk-XDJ56NJA.js → chunk-6FZM46AU.js} +3 -3
- package/dist/bundle/{chunk-HKINIBP4.js → chunk-LFPWHI42.js} +1 -1
- package/dist/bundle/{chunk-27QCJ2AZ.js → chunk-UPVDERMD.js} +0 -12
- package/dist/bundle/{chunk-BV25CVRM.js → chunk-WFJRFQGG.js} +81 -107
- package/dist/bundle/{cli-main-OUKN743U.js → cli-main-OYVMMJUO.js} +3 -3
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/{main-QPCXSW6X.js → main-AVMYOTHF.js} +4 -4
- 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
|
@@ -347,7 +347,7 @@ import {
|
|
|
347
347
|
watchWithErrorHandler,
|
|
348
348
|
workerRosterEntryFromSummary,
|
|
349
349
|
wrapTextWithAnsi
|
|
350
|
-
} from "./chunk-
|
|
350
|
+
} from "./chunk-6FZM46AU.js";
|
|
351
351
|
import {
|
|
352
352
|
array,
|
|
353
353
|
boolean,
|
|
@@ -366,7 +366,7 @@ import {
|
|
|
366
366
|
import {
|
|
367
367
|
installFileLogSink,
|
|
368
368
|
setLogContext
|
|
369
|
-
} from "./chunk-
|
|
369
|
+
} from "./chunk-LFPWHI42.js";
|
|
370
370
|
import {
|
|
371
371
|
APP_NAME,
|
|
372
372
|
APP_TITLE,
|
|
@@ -383,7 +383,6 @@ import {
|
|
|
383
383
|
getAgentLogPath,
|
|
384
384
|
getAuthPath,
|
|
385
385
|
getBinDir,
|
|
386
|
-
getBundledInteractiveAssetPath,
|
|
387
386
|
getBundledSkillsDir,
|
|
388
387
|
getChangelogPath,
|
|
389
388
|
getClientErrorLogPath,
|
|
@@ -413,7 +412,7 @@ import {
|
|
|
413
412
|
shouldUseWindowsShell,
|
|
414
413
|
signalProcessGroupOrProcess,
|
|
415
414
|
typebox_exports
|
|
416
|
-
} from "./chunk-
|
|
415
|
+
} from "./chunk-UPVDERMD.js";
|
|
417
416
|
import {
|
|
418
417
|
PRODUCT,
|
|
419
418
|
PRODUCT_ENV
|
|
@@ -605,9 +604,9 @@ var require_pump = __commonJS({
|
|
|
605
604
|
"../../node_modules/pump/index.js"(exports, module) {
|
|
606
605
|
var once = require_once();
|
|
607
606
|
var eos = require_end_of_stream();
|
|
608
|
-
var
|
|
607
|
+
var fs5;
|
|
609
608
|
try {
|
|
610
|
-
|
|
609
|
+
fs5 = __require("fs");
|
|
611
610
|
} catch (e) {
|
|
612
611
|
}
|
|
613
612
|
var noop = function() {
|
|
@@ -618,8 +617,8 @@ var require_pump = __commonJS({
|
|
|
618
617
|
};
|
|
619
618
|
var isFS = function(stream) {
|
|
620
619
|
if (!ancient) return false;
|
|
621
|
-
if (!
|
|
622
|
-
return (stream instanceof (
|
|
620
|
+
if (!fs5) return false;
|
|
621
|
+
return (stream instanceof (fs5.ReadStream || noop) || stream instanceof (fs5.WriteStream || noop)) && isFn(stream.close);
|
|
623
622
|
};
|
|
624
623
|
var isRequest = function(stream) {
|
|
625
624
|
return stream.setHeader && isFn(stream.abort);
|
|
@@ -831,7 +830,7 @@ var require_pend = __commonJS({
|
|
|
831
830
|
// ../../node_modules/fd-slicer/index.js
|
|
832
831
|
var require_fd_slicer = __commonJS({
|
|
833
832
|
"../../node_modules/fd-slicer/index.js"(exports) {
|
|
834
|
-
var
|
|
833
|
+
var fs5 = __require("fs");
|
|
835
834
|
var util = __require("util");
|
|
836
835
|
var stream = __require("stream");
|
|
837
836
|
var Readable3 = stream.Readable;
|
|
@@ -856,7 +855,7 @@ var require_fd_slicer = __commonJS({
|
|
|
856
855
|
FdSlicer.prototype.read = function(buffer, offset, length, position, callback) {
|
|
857
856
|
var self = this;
|
|
858
857
|
self.pend.go(function(cb) {
|
|
859
|
-
|
|
858
|
+
fs5.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer2) {
|
|
860
859
|
cb();
|
|
861
860
|
callback(err, bytesRead, buffer2);
|
|
862
861
|
});
|
|
@@ -865,7 +864,7 @@ var require_fd_slicer = __commonJS({
|
|
|
865
864
|
FdSlicer.prototype.write = function(buffer, offset, length, position, callback) {
|
|
866
865
|
var self = this;
|
|
867
866
|
self.pend.go(function(cb) {
|
|
868
|
-
|
|
867
|
+
fs5.write(self.fd, buffer, offset, length, position, function(err, written, buffer2) {
|
|
869
868
|
cb();
|
|
870
869
|
callback(err, written, buffer2);
|
|
871
870
|
});
|
|
@@ -886,7 +885,7 @@ var require_fd_slicer = __commonJS({
|
|
|
886
885
|
if (self.refCount > 0) return;
|
|
887
886
|
if (self.refCount < 0) throw new Error("invalid unref");
|
|
888
887
|
if (self.autoClose) {
|
|
889
|
-
|
|
888
|
+
fs5.close(self.fd, onCloseDone);
|
|
890
889
|
}
|
|
891
890
|
function onCloseDone(err) {
|
|
892
891
|
if (err) {
|
|
@@ -923,7 +922,7 @@ var require_fd_slicer = __commonJS({
|
|
|
923
922
|
self.context.pend.go(function(cb) {
|
|
924
923
|
if (self.destroyed) return cb();
|
|
925
924
|
var buffer = new Buffer(toRead);
|
|
926
|
-
|
|
925
|
+
fs5.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) {
|
|
927
926
|
if (err) {
|
|
928
927
|
self.destroy(err);
|
|
929
928
|
} else if (bytesRead === 0) {
|
|
@@ -970,7 +969,7 @@ var require_fd_slicer = __commonJS({
|
|
|
970
969
|
}
|
|
971
970
|
self.context.pend.go(function(cb) {
|
|
972
971
|
if (self.destroyed) return cb();
|
|
973
|
-
|
|
972
|
+
fs5.write(self.context.fd, buffer, 0, buffer.length, self.pos, function(err2, bytes) {
|
|
974
973
|
if (err2) {
|
|
975
974
|
self.destroy();
|
|
976
975
|
cb();
|
|
@@ -1397,7 +1396,7 @@ var require_buffer_crc32 = __commonJS({
|
|
|
1397
1396
|
// ../../node_modules/yauzl/index.js
|
|
1398
1397
|
var require_yauzl = __commonJS({
|
|
1399
1398
|
"../../node_modules/yauzl/index.js"(exports) {
|
|
1400
|
-
var
|
|
1399
|
+
var fs5 = __require("fs");
|
|
1401
1400
|
var zlib = __require("zlib");
|
|
1402
1401
|
var fd_slicer = require_fd_slicer();
|
|
1403
1402
|
var crc32 = require_buffer_crc32();
|
|
@@ -1427,10 +1426,10 @@ var require_yauzl = __commonJS({
|
|
|
1427
1426
|
if (options.validateEntrySizes == null) options.validateEntrySizes = true;
|
|
1428
1427
|
if (options.strictFileNames == null) options.strictFileNames = false;
|
|
1429
1428
|
if (callback == null) callback = defaultCallback;
|
|
1430
|
-
|
|
1429
|
+
fs5.open(path6, "r", function(err, fd) {
|
|
1431
1430
|
if (err) return callback(err);
|
|
1432
1431
|
fromFd(fd, options, function(err2, zipfile) {
|
|
1433
|
-
if (err2)
|
|
1432
|
+
if (err2) fs5.close(fd, defaultCallback);
|
|
1434
1433
|
callback(err2, zipfile);
|
|
1435
1434
|
});
|
|
1436
1435
|
});
|
|
@@ -1447,7 +1446,7 @@ var require_yauzl = __commonJS({
|
|
|
1447
1446
|
if (options.validateEntrySizes == null) options.validateEntrySizes = true;
|
|
1448
1447
|
if (options.strictFileNames == null) options.strictFileNames = false;
|
|
1449
1448
|
if (callback == null) callback = defaultCallback;
|
|
1450
|
-
|
|
1449
|
+
fs5.fstat(fd, function(err, stats) {
|
|
1451
1450
|
if (err) return callback(err);
|
|
1452
1451
|
var reader = fd_slicer.createFromFd(fd, { autoClose: true });
|
|
1453
1452
|
fromRandomAccessReader(reader, stats.size, options, callback);
|
|
@@ -2027,7 +2026,7 @@ var require_yauzl = __commonJS({
|
|
|
2027
2026
|
var require_extract_zip = __commonJS({
|
|
2028
2027
|
"../../node_modules/extract-zip/index.js"(exports, module) {
|
|
2029
2028
|
var debug = require_src()("extract-zip");
|
|
2030
|
-
var { createWriteStream: createWriteStream2, promises:
|
|
2029
|
+
var { createWriteStream: createWriteStream2, promises: fs5 } = __require("fs");
|
|
2031
2030
|
var getStream = require_get_stream();
|
|
2032
2031
|
var path6 = __require("path");
|
|
2033
2032
|
var { promisify } = __require("util");
|
|
@@ -2068,8 +2067,8 @@ var require_extract_zip = __commonJS({
|
|
|
2068
2067
|
}
|
|
2069
2068
|
const destDir = path6.dirname(path6.join(this.opts.dir, entry.fileName));
|
|
2070
2069
|
try {
|
|
2071
|
-
await
|
|
2072
|
-
const canonicalDestDir = await
|
|
2070
|
+
await fs5.mkdir(destDir, { recursive: true });
|
|
2071
|
+
const canonicalDestDir = await fs5.realpath(destDir);
|
|
2073
2072
|
const relativeDestDir = path6.relative(this.opts.dir, canonicalDestDir);
|
|
2074
2073
|
if (relativeDestDir.split(path6.sep).includes("..")) {
|
|
2075
2074
|
throw new Error(`Out of bound path "${canonicalDestDir}" found while processing file ${entry.fileName}`);
|
|
@@ -2113,14 +2112,14 @@ var require_extract_zip = __commonJS({
|
|
|
2113
2112
|
mkdirOptions.mode = procMode;
|
|
2114
2113
|
}
|
|
2115
2114
|
debug("mkdir", { dir: destDir, ...mkdirOptions });
|
|
2116
|
-
await
|
|
2115
|
+
await fs5.mkdir(destDir, mkdirOptions);
|
|
2117
2116
|
if (isDir) return;
|
|
2118
2117
|
debug("opening read stream", dest);
|
|
2119
2118
|
const readStream = await promisify(this.zipfile.openReadStream.bind(this.zipfile))(entry);
|
|
2120
2119
|
if (symlink) {
|
|
2121
2120
|
const link = await getStream(readStream);
|
|
2122
2121
|
debug("creating symlink", link, dest);
|
|
2123
|
-
await
|
|
2122
|
+
await fs5.symlink(link, dest);
|
|
2124
2123
|
} else {
|
|
2125
2124
|
await pipeline2(readStream, createWriteStream2(dest, { mode: procMode }));
|
|
2126
2125
|
}
|
|
@@ -2152,8 +2151,8 @@ var require_extract_zip = __commonJS({
|
|
|
2152
2151
|
if (!path6.isAbsolute(opts.dir)) {
|
|
2153
2152
|
throw new Error("Target directory is expected to be absolute");
|
|
2154
2153
|
}
|
|
2155
|
-
await
|
|
2156
|
-
opts.dir = await
|
|
2154
|
+
await fs5.mkdir(opts.dir, { recursive: true });
|
|
2155
|
+
opts.dir = await fs5.realpath(opts.dir);
|
|
2157
2156
|
return new Extractor(zipPath, opts).extract();
|
|
2158
2157
|
};
|
|
2159
2158
|
}
|
|
@@ -36706,7 +36705,7 @@ var CustomEditor = class extends Editor {
|
|
|
36706
36705
|
|
|
36707
36706
|
// dist/modes/interactive/interactive-mode.js
|
|
36708
36707
|
import { randomUUID as randomUUID9 } from "node:crypto";
|
|
36709
|
-
import * as
|
|
36708
|
+
import * as fs4 from "node:fs";
|
|
36710
36709
|
import * as os3 from "node:os";
|
|
36711
36710
|
import * as path5 from "node:path";
|
|
36712
36711
|
import { spawnSync as spawnSync8 } from "child_process";
|
|
@@ -37021,17 +37020,14 @@ function requireNewPrompt(value) {
|
|
|
37021
37020
|
return prompt;
|
|
37022
37021
|
}
|
|
37023
37022
|
|
|
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`;
|
|
37023
|
+
// dist/themes/synerise-logo.js
|
|
37024
|
+
var SYNERISE_LOGO = ` #### # # # # ##### #### ##### #### #####
|
|
37025
|
+
# # # ## # # # # # # #
|
|
37026
|
+
### # # # # #### #### # ### ####
|
|
37027
|
+
# # # ## # # # # # #
|
|
37028
|
+
#### # # # ##### # # ##### #### #####
|
|
37029
|
+
|
|
37030
|
+
Synerise base-context`;
|
|
37035
37031
|
|
|
37036
37032
|
// dist/utils/changelog.js
|
|
37037
37033
|
import { existsSync as existsSync19, readFileSync as readFileSync16 } from "fs";
|
|
@@ -37470,7 +37466,7 @@ async function checkTmuxKeyboardSetup() {
|
|
|
37470
37466
|
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
37467
|
}
|
|
37472
37468
|
if (extendedKeysFormat === "xterm") {
|
|
37473
|
-
return "tmux extended-keys-format is xterm.
|
|
37469
|
+
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
37470
|
}
|
|
37475
37471
|
return void 0;
|
|
37476
37472
|
}
|
|
@@ -39977,6 +39973,17 @@ var BranchSummaryMessageComponent = class extends Box {
|
|
|
39977
39973
|
}
|
|
39978
39974
|
};
|
|
39979
39975
|
|
|
39976
|
+
// dist/modes/interactive/components/brand-announcement.js
|
|
39977
|
+
var BrandAnnouncementComponent = class extends Container {
|
|
39978
|
+
constructor() {
|
|
39979
|
+
super();
|
|
39980
|
+
this.addChild(new DynamicBorder((text) => theme.fg("accent", text)));
|
|
39981
|
+
this.addChild(new Text(theme.fg("accent", SYNERISE_LOGO), 1, 0));
|
|
39982
|
+
this.addChild(new Spacer(1));
|
|
39983
|
+
this.addChild(new DynamicBorder((text) => theme.fg("accent", text)));
|
|
39984
|
+
}
|
|
39985
|
+
};
|
|
39986
|
+
|
|
39980
39987
|
// dist/modes/interactive/components/compaction-outcome-message.js
|
|
39981
39988
|
var CompactionOutcomeMessageComponent = class extends Container {
|
|
39982
39989
|
constructor(message) {
|
|
@@ -42319,45 +42326,9 @@ var DaxnutsComponent = class {
|
|
|
42319
42326
|
}
|
|
42320
42327
|
};
|
|
42321
42328
|
|
|
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
42329
|
// dist/modes/interactive/components/extension-editor.js
|
|
42359
42330
|
import { spawnSync as spawnSync7 } from "node:child_process";
|
|
42360
|
-
import * as
|
|
42331
|
+
import * as fs3 from "node:fs";
|
|
42361
42332
|
import * as os2 from "node:os";
|
|
42362
42333
|
import * as path4 from "node:path";
|
|
42363
42334
|
var ExtensionEditorComponent = class extends Container {
|
|
@@ -42419,7 +42390,7 @@ var ExtensionEditorComponent = class extends Container {
|
|
|
42419
42390
|
const currentText = this.editor.getText();
|
|
42420
42391
|
const tmpFile = path4.join(os2.tmpdir(), `pi-extension-editor-${Date.now()}.md`);
|
|
42421
42392
|
try {
|
|
42422
|
-
|
|
42393
|
+
fs3.writeFileSync(tmpFile, currentText, "utf-8");
|
|
42423
42394
|
this.tui.stop();
|
|
42424
42395
|
const [editor, ...editorArgs] = editorCmd.split(" ");
|
|
42425
42396
|
const result = spawnSync7(editor, [...editorArgs, tmpFile], {
|
|
@@ -42427,12 +42398,12 @@ var ExtensionEditorComponent = class extends Container {
|
|
|
42427
42398
|
shell: process.platform === "win32"
|
|
42428
42399
|
});
|
|
42429
42400
|
if (result.status === 0) {
|
|
42430
|
-
const newContent =
|
|
42401
|
+
const newContent = fs3.readFileSync(tmpFile, "utf-8").replace(/\n$/, "");
|
|
42431
42402
|
this.editor.setText(newContent);
|
|
42432
42403
|
}
|
|
42433
42404
|
} finally {
|
|
42434
42405
|
try {
|
|
42435
|
-
|
|
42406
|
+
fs3.unlinkSync(tmpFile);
|
|
42436
42407
|
} catch {
|
|
42437
42408
|
}
|
|
42438
42409
|
this.tui.start();
|
|
@@ -46943,6 +46914,8 @@ var SettingsSelectorComponent = class extends Container {
|
|
|
46943
46914
|
constructor(config, callbacks) {
|
|
46944
46915
|
super();
|
|
46945
46916
|
let currentWarnings = { ...config.warnings };
|
|
46917
|
+
let currentTheme = config.currentTheme;
|
|
46918
|
+
const themeLabel = (name) => name === "prime" ? "Synerise" : name;
|
|
46946
46919
|
const idleEvictionValues = [30, 60, 90, 180, 360];
|
|
46947
46920
|
if (typeof config.idleEvictionMinutes === "number" && !idleEvictionValues.includes(config.idleEvictionMinutes)) {
|
|
46948
46921
|
idleEvictionValues.push(config.idleEvictionMinutes);
|
|
@@ -47040,15 +47013,16 @@ var SettingsSelectorComponent = class extends Container {
|
|
|
47040
47013
|
id: "theme",
|
|
47041
47014
|
label: "Theme",
|
|
47042
47015
|
description: "Color theme for the interface",
|
|
47043
|
-
currentValue:
|
|
47044
|
-
submenu: (
|
|
47016
|
+
currentValue: themeLabel(currentTheme),
|
|
47017
|
+
submenu: (_currentValue, done) => new SelectSubmenu("Theme", "Select color theme", config.availableThemes.map((t) => ({
|
|
47045
47018
|
value: t,
|
|
47046
|
-
label: t
|
|
47047
|
-
})),
|
|
47019
|
+
label: themeLabel(t)
|
|
47020
|
+
})), currentTheme, (value) => {
|
|
47021
|
+
currentTheme = value;
|
|
47048
47022
|
callbacks.onThemeChange(value);
|
|
47049
|
-
done(value);
|
|
47023
|
+
done(themeLabel(value));
|
|
47050
47024
|
}, () => {
|
|
47051
|
-
callbacks.onThemePreview?.(
|
|
47025
|
+
callbacks.onThemePreview?.(currentTheme);
|
|
47052
47026
|
done();
|
|
47053
47027
|
}, (value) => {
|
|
47054
47028
|
callbacks.onThemePreview?.(value);
|
|
@@ -48889,7 +48863,7 @@ var BrandSplashHeader = class {
|
|
|
48889
48863
|
this.getCwd = getCwd;
|
|
48890
48864
|
this.verboseInstructions = verboseInstructions;
|
|
48891
48865
|
this.options = options;
|
|
48892
|
-
this.logoRaw = (options.logo ??
|
|
48866
|
+
this.logoRaw = (options.logo ?? SYNERISE_LOGO).split("\n");
|
|
48893
48867
|
this.logoCanvasWidth = this.logoRaw.reduce((max, line) => Math.max(max, visibleWidth(line)), 0);
|
|
48894
48868
|
}
|
|
48895
48869
|
invalidate() {
|
|
@@ -54368,7 +54342,7 @@ ${message}`, ["Yes", "No"], opts);
|
|
|
54368
54342
|
const currentText = this.editor.getExpandedText?.() ?? this.editor.getText();
|
|
54369
54343
|
const tmpFile = path5.join(os3.tmpdir(), `pi-editor-${Date.now()}.pi.md`);
|
|
54370
54344
|
try {
|
|
54371
|
-
|
|
54345
|
+
fs4.writeFileSync(tmpFile, currentText, "utf-8");
|
|
54372
54346
|
this.ui.stop();
|
|
54373
54347
|
const [editor, ...editorArgs] = editorCmd.split(" ");
|
|
54374
54348
|
const result = spawnSync8(editor, [...editorArgs, tmpFile], {
|
|
@@ -54376,12 +54350,12 @@ ${message}`, ["Yes", "No"], opts);
|
|
|
54376
54350
|
shell: process.platform === "win32"
|
|
54377
54351
|
});
|
|
54378
54352
|
if (result.status === 0) {
|
|
54379
|
-
const newContent =
|
|
54353
|
+
const newContent = fs4.readFileSync(tmpFile, "utf-8").replace(/\n$/, "");
|
|
54380
54354
|
this.editor.setText(newContent);
|
|
54381
54355
|
}
|
|
54382
54356
|
} finally {
|
|
54383
54357
|
try {
|
|
54384
|
-
|
|
54358
|
+
fs4.unlinkSync(tmpFile);
|
|
54385
54359
|
} catch {
|
|
54386
54360
|
}
|
|
54387
54361
|
this.ui.start();
|
|
@@ -55836,8 +55810,8 @@ Fell back to dark theme.`);
|
|
|
55836
55810
|
`;
|
|
55837
55811
|
let files = [];
|
|
55838
55812
|
try {
|
|
55839
|
-
if (
|
|
55840
|
-
files =
|
|
55813
|
+
if (fs4.existsSync(logsDir)) {
|
|
55814
|
+
files = fs4.readdirSync(logsDir).filter((name) => !name.startsWith("."));
|
|
55841
55815
|
}
|
|
55842
55816
|
} catch {
|
|
55843
55817
|
}
|
|
@@ -55848,7 +55822,7 @@ Fell back to dark theme.`);
|
|
|
55848
55822
|
for (const name of files.sort()) {
|
|
55849
55823
|
let size = "";
|
|
55850
55824
|
try {
|
|
55851
|
-
size = ` ${theme.fg("dim", `(${(
|
|
55825
|
+
size = ` ${theme.fg("dim", `(${(fs4.statSync(path5.join(logsDir, name)).size / 1024).toFixed(1)} KB)`)}`;
|
|
55852
55826
|
} catch {
|
|
55853
55827
|
}
|
|
55854
55828
|
info += `${theme.fg("dim", "\u2022")} ${name}${size}
|
|
@@ -56295,8 +56269,8 @@ ${interrupt ? `| \`${interrupt}\` | Interrupt current operation |
|
|
|
56295
56269
|
...messages.map((msg) => JSON.stringify(msg)),
|
|
56296
56270
|
""
|
|
56297
56271
|
].join("\n");
|
|
56298
|
-
|
|
56299
|
-
|
|
56272
|
+
fs4.mkdirSync(path5.dirname(debugLogPath), { recursive: true });
|
|
56273
|
+
fs4.writeFileSync(debugLogPath, debugData);
|
|
56300
56274
|
this.chatContainer.addChild(new Spacer(1));
|
|
56301
56275
|
this.chatContainer.addChild(new Text(`${theme.fg("accent", "\u2713 Debug log written")}
|
|
56302
56276
|
${theme.fg("muted", debugLogPath)}`, 1, 1));
|
|
@@ -56312,7 +56286,7 @@ ${theme.fg("muted", debugLogPath)}`, 1, 1));
|
|
|
56312
56286
|
}
|
|
56313
56287
|
handleDementedDelves() {
|
|
56314
56288
|
this.chatContainer.addChild(new Spacer(1));
|
|
56315
|
-
this.chatContainer.addChild(new
|
|
56289
|
+
this.chatContainer.addChild(new BrandAnnouncementComponent());
|
|
56316
56290
|
this.ui.requestRender();
|
|
56317
56291
|
}
|
|
56318
56292
|
handleDaxnuts() {
|
|
@@ -58875,7 +58849,7 @@ function padLine(line, width) {
|
|
|
58875
58849
|
// dist/modes/daemon/daemon-mode.js
|
|
58876
58850
|
import { spawn as spawn9 } from "node:child_process";
|
|
58877
58851
|
import { createHash as createHash8, randomUUID as randomUUID13, timingSafeEqual } from "node:crypto";
|
|
58878
|
-
import { existsSync as existsSync24, mkdirSync as mkdirSync16, readFileSync as
|
|
58852
|
+
import { existsSync as existsSync24, mkdirSync as mkdirSync16, readFileSync as readFileSync22, renameSync as renameSync11, rmSync as rmSync12, writeFileSync as writeFileSync11 } from "node:fs";
|
|
58879
58853
|
import { stat as stat3 } from "node:fs/promises";
|
|
58880
58854
|
import { createConnection as createConnection2, createServer as createServer2 } from "node:net";
|
|
58881
58855
|
import { basename as basename11, dirname as dirname18, isAbsolute as isAbsolute5, join as join30, resolve as resolve23 } from "node:path";
|
|
@@ -60028,7 +60002,7 @@ async function readRlmSubagentDisplayEntry(sessionDir) {
|
|
|
60028
60002
|
}
|
|
60029
60003
|
|
|
60030
60004
|
// dist/modes/daemon/snapshot-transcript-cache.js
|
|
60031
|
-
import { mkdirSync as mkdirSync14, readFileSync as
|
|
60005
|
+
import { mkdirSync as mkdirSync14, readFileSync as readFileSync20, rmSync as rmSync11, writeFileSync as writeFileSync10 } from "node:fs";
|
|
60032
60006
|
import { join as join29 } from "node:path";
|
|
60033
60007
|
var SNAPSHOT_TARGET_CHUNK_BYTES = 512 * 1024;
|
|
60034
60008
|
var SNAPSHOT_MEMORY_CACHE_BYTES = 4 * 1024 * 1024;
|
|
@@ -60119,7 +60093,7 @@ var SnapshotTranscriptCache = class {
|
|
|
60119
60093
|
if (!chunk.path) {
|
|
60120
60094
|
throw new Error(`Snapshot transcript chunk ${index} has no backing storage`);
|
|
60121
60095
|
}
|
|
60122
|
-
return
|
|
60096
|
+
return readFileSync20(chunk.path);
|
|
60123
60097
|
}
|
|
60124
60098
|
*[Symbol.iterator]() {
|
|
60125
60099
|
for (let index = 0; index < this.chunkCount; index++) {
|
|
@@ -60275,7 +60249,7 @@ var SnapshotTranscriptCache = class {
|
|
|
60275
60249
|
};
|
|
60276
60250
|
|
|
60277
60251
|
// dist/modes/daemon/worker-recovery-journal.js
|
|
60278
|
-
import { fchmodSync, fstatSync as fstatSync3, fsyncSync as fsyncSync6, mkdirSync as mkdirSync15, openSync as openSync6, readFileSync as
|
|
60252
|
+
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
60253
|
import { dirname as dirname17 } from "node:path";
|
|
60280
60254
|
|
|
60281
60255
|
// dist/modes/daemon/recovery-journal-io.js
|
|
@@ -60306,7 +60280,7 @@ function parseRecords(path6) {
|
|
|
60306
60280
|
const latest = /* @__PURE__ */ new Map();
|
|
60307
60281
|
let contents;
|
|
60308
60282
|
try {
|
|
60309
|
-
contents =
|
|
60283
|
+
contents = readFileSync21(path6, "utf8");
|
|
60310
60284
|
} catch (error) {
|
|
60311
60285
|
if (error.code === "ENOENT")
|
|
60312
60286
|
return { latest, incompleteTail: false };
|
|
@@ -60901,7 +60875,7 @@ var AgentDaemon = class {
|
|
|
60901
60875
|
}
|
|
60902
60876
|
let ownerPid;
|
|
60903
60877
|
try {
|
|
60904
|
-
ownerPid = Number(
|
|
60878
|
+
ownerPid = Number(readFileSync22(join30(lockDirectory, "pid"), "utf8").trim());
|
|
60905
60879
|
} catch {
|
|
60906
60880
|
}
|
|
60907
60881
|
if (ownerPid && this.isProcessAlive(ownerPid)) {
|
|
@@ -66492,13 +66466,13 @@ async function resolveDaemonSessionPath(selector, cwd, sessionDir) {
|
|
|
66492
66466
|
// dist/modes/daemon/daemon-supervisor.js
|
|
66493
66467
|
import { spawn as spawn10 } from "node:child_process";
|
|
66494
66468
|
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
|
|
66469
|
+
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
66470
|
import { createServer as createServer3 } from "node:net";
|
|
66497
66471
|
import { basename as basename12, dirname as dirname20, join as join31, resolve as resolve24 } from "node:path";
|
|
66498
66472
|
import { Writable } from "node:stream";
|
|
66499
66473
|
|
|
66500
66474
|
// 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
|
|
66475
|
+
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
66476
|
import { dirname as dirname19 } from "node:path";
|
|
66503
66477
|
var COMPACT_AFTER_RECORDS = 4096;
|
|
66504
66478
|
function createCommandIdempotencyKey(clientId, commandId) {
|
|
@@ -66581,7 +66555,7 @@ var CommandRecoveryJournal = class {
|
|
|
66581
66555
|
load() {
|
|
66582
66556
|
let contents;
|
|
66583
66557
|
try {
|
|
66584
|
-
contents =
|
|
66558
|
+
contents = readFileSync23(this.path, "utf8");
|
|
66585
66559
|
} catch (error) {
|
|
66586
66560
|
if (error.code === "ENOENT") {
|
|
66587
66561
|
return;
|
|
@@ -67665,7 +67639,7 @@ var DaemonSupervisor = class {
|
|
|
67665
67639
|
}
|
|
67666
67640
|
const path6 = join31(this.descriptorDir, name);
|
|
67667
67641
|
try {
|
|
67668
|
-
const descriptor = JSON.parse(
|
|
67642
|
+
const descriptor = JSON.parse(readFileSync24(path6, "utf8"));
|
|
67669
67643
|
if (!isDaemonWorkerDescriptor(descriptor, this.socketPath)) {
|
|
67670
67644
|
continue;
|
|
67671
67645
|
}
|
|
@@ -67707,7 +67681,7 @@ var DaemonSupervisor = class {
|
|
|
67707
67681
|
const descriptorPath = join31(this.descriptorDir, name);
|
|
67708
67682
|
let descriptor;
|
|
67709
67683
|
try {
|
|
67710
|
-
descriptor = JSON.parse(
|
|
67684
|
+
descriptor = JSON.parse(readFileSync24(descriptorPath, "utf8"));
|
|
67711
67685
|
} catch {
|
|
67712
67686
|
continue;
|
|
67713
67687
|
}
|
|
@@ -67723,7 +67697,7 @@ var DaemonSupervisor = class {
|
|
|
67723
67697
|
}
|
|
67724
67698
|
loadPersistedSupervisorConfig() {
|
|
67725
67699
|
try {
|
|
67726
|
-
const parsed = JSON.parse(
|
|
67700
|
+
const parsed = JSON.parse(readFileSync24(this.supervisorConfigPath, "utf8"));
|
|
67727
67701
|
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
67702
|
return void 0;
|
|
67729
67703
|
}
|
|
@@ -71909,7 +71883,7 @@ var DaemonSupervisor = class {
|
|
|
71909
71883
|
writeFileSync12(tempPath, `${JSON.stringify(manifest)}
|
|
71910
71884
|
`, { mode: 384 });
|
|
71911
71885
|
chmodSync3(tempPath, 384);
|
|
71912
|
-
const validated = JSON.parse(
|
|
71886
|
+
const validated = JSON.parse(readFileSync24(tempPath, "utf8"));
|
|
71913
71887
|
if (!Array.isArray(validated.sessions) || validated.sessions.length !== manifest.sessions.length) {
|
|
71914
71888
|
throw new Error("Could not validate aggregate update manifest");
|
|
71915
71889
|
}
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
isOwnedSessionWorkerProcess,
|
|
6
6
|
maybeRunOwnedSessionWorkerFrontend,
|
|
7
7
|
maybeStartDaemonEarly
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6FZM46AU.js";
|
|
9
9
|
import {
|
|
10
10
|
APP_NAME
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UPVDERMD.js";
|
|
12
12
|
import "./chunk-5QCJ5DQU.js";
|
|
13
13
|
import "./chunk-CRBVRZBV.js";
|
|
14
14
|
import "./chunk-GRJFXLBM.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-AVMYOTHF.js")
|
|
43
43
|
]);
|
|
44
44
|
setGlobalDispatcher(new EnvHttpProxyAgent({ bodyTimeout: 0, headersTimeout: 0 }));
|
|
45
45
|
try {
|
package/dist/bundle/cli.js
CHANGED
|
@@ -17,11 +17,11 @@ import {
|
|
|
17
17
|
shouldUseDaemonClientRuntime,
|
|
18
18
|
shouldUseDaemonInteractive,
|
|
19
19
|
shouldUseEphemeralSessionManagerForDaemonInteractive
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
20
|
+
} from "./chunk-WFJRFQGG.js";
|
|
21
|
+
import "./chunk-6FZM46AU.js";
|
|
22
22
|
import "./chunk-CFNASUYO.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-LFPWHI42.js";
|
|
24
|
+
import "./chunk-UPVDERMD.js";
|
|
25
25
|
import "./chunk-5QCJ5DQU.js";
|
|
26
26
|
import "./chunk-CRBVRZBV.js";
|
|
27
27
|
import "./chunk-GRJFXLBM.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand-announcement.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/brand-announcement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAgB,MAAM,gCAAgC,CAAC;AAKzE,qBAAa,0BAA2B,SAAQ,SAAS;IACxD,cAMC;CACD","sourcesContent":["import { Container, Spacer, Text } from \"@ponythewhite/base-context-tui\";\nimport { SYNERISE_LOGO } from \"../../../themes/synerise-logo.js\";\nimport { theme } from \"../theme/theme.js\";\nimport { DynamicBorder } from \"./dynamic-border.js\";\n\nexport class BrandAnnouncementComponent extends Container {\n\tconstructor() {\n\t\tsuper();\n\t\tthis.addChild(new DynamicBorder((text) => theme.fg(\"accent\", text)));\n\t\tthis.addChild(new Text(theme.fg(\"accent\", SYNERISE_LOGO), 1, 0));\n\t\tthis.addChild(new Spacer(1));\n\t\tthis.addChild(new DynamicBorder((text) => theme.fg(\"accent\", text)));\n\t}\n}\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Container, Spacer, Text } from "@ponythewhite/base-context-tui";
|
|
2
|
+
import { SYNERISE_LOGO } from "../../../themes/synerise-logo.js";
|
|
3
|
+
import { theme } from "../theme/theme.js";
|
|
4
|
+
import { DynamicBorder } from "./dynamic-border.js";
|
|
5
|
+
export class BrandAnnouncementComponent extends Container {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.addChild(new DynamicBorder((text) => theme.fg("accent", text)));
|
|
9
|
+
this.addChild(new Text(theme.fg("accent", SYNERISE_LOGO), 1, 0));
|
|
10
|
+
this.addChild(new Spacer(1));
|
|
11
|
+
this.addChild(new DynamicBorder((text) => theme.fg("accent", text)));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=brand-announcement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand-announcement.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/brand-announcement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,OAAO,0BAA2B,SAAQ,SAAS;IACxD,cAAc;QACb,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,QAAQ,CAAC,IAAI,aAAa,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;QACrE,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACjE,IAAI,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAI,CAAC,QAAQ,CAAC,IAAI,aAAa,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;IAAA,CACrE;CACD","sourcesContent":["import { Container, Spacer, Text } from \"@ponythewhite/base-context-tui\";\nimport { SYNERISE_LOGO } from \"../../../themes/synerise-logo.js\";\nimport { theme } from \"../theme/theme.js\";\nimport { DynamicBorder } from \"./dynamic-border.js\";\n\nexport class BrandAnnouncementComponent extends Container {\n\tconstructor() {\n\t\tsuper();\n\t\tthis.addChild(new DynamicBorder((text) => theme.fg(\"accent\", text)));\n\t\tthis.addChild(new Text(theme.fg(\"accent\", SYNERISE_LOGO), 1, 0));\n\t\tthis.addChild(new Spacer(1));\n\t\tthis.addChild(new DynamicBorder((text) => theme.fg(\"accent\", text)));\n\t}\n}\n"]}
|