@picassohq/cli 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/dist/build-info.json +2 -1
- package/dist/index.js +1557 -1353
- package/package.json +1 -1
- package/runtime/dsh/picasso-ecosystem.cordis.patch.yml +4 -7
- package/runtime/dsh/picasso-sdk.patch.yml +47 -0
- package/runtime/engine-manifest.json +20 -10
- package/runtime/packages/picasso-compaction/index.js +257 -5
- package/runtime/packages/picasso-hooks/cordis.patch.yml +4 -0
- package/runtime/packages/picasso-hooks/index.js +302 -0
- package/runtime/packages/picasso-hooks/lifecycle-events.js +651 -0
- package/runtime/packages/picasso-hooks/package.json +29 -0
- package/runtime/packages/picasso-lean-context/glob-walk.js +518 -0
- package/runtime/packages/picasso-lean-context/index.js +136 -9
- package/runtime/packages/picasso-memory/index.js +66 -24
- package/runtime/packages/picasso-model-router/connections.js +164 -7
- package/runtime/packages/picasso-model-router/index.js +97 -1
- package/runtime/packages/picasso-model-router/thinking-default.js +29 -5
- package/runtime/packages/picasso-progress-reports/index.js +128 -18
- package/runtime/packages/picasso-sdk-server/command-runs.js +37 -0
- package/runtime/packages/picasso-sdk-server/ignore-file.js +5 -1
- package/runtime/packages/picasso-sdk-server/index.js +11 -3
- package/runtime/packages/picasso-sdk-server/package.json +1 -0
- package/runtime/packages/picasso-sdk-server/wave2-hooks.js +26 -6
- package/runtime/packages/picasso-x-reader/settings.js +4 -1
- package/runtime/plugins/picasso-auto-approve/index.js +21 -8
- package/runtime/plugins/picasso-compaction/index.js +257 -5
- package/runtime/plugins/picasso-hooks/index.js +302 -0
- package/runtime/plugins/picasso-hooks/lifecycle-events.js +651 -0
- package/runtime/plugins/picasso-hooks/package.json +29 -0
- package/runtime/plugins/picasso-lean-context/glob-walk.js +518 -0
- package/runtime/plugins/picasso-lean-context/index.js +136 -9
- package/runtime/plugins/picasso-memory/index.js +66 -24
- package/runtime/plugins/picasso-model-router/connections.js +164 -7
- package/runtime/plugins/picasso-model-router/index.js +97 -1
- package/runtime/plugins/picasso-model-router/thinking-default.js +29 -5
- package/runtime/plugins/picasso-progress-reports/index.js +128 -18
- package/runtime/plugins/picasso-trackers/index.js +12 -2
- package/runtime/plugins/picasso-x-reader/settings.js +4 -1
- package/runtime/relay/main.mjs +2254 -1648
- package/runtime/relay/versions-routes.mjs +24 -20
|
@@ -101,12 +101,12 @@ import { join as join5 } from "node:path";
|
|
|
101
101
|
var KEYCHAIN_COMMAND_TIMEOUT_MS = 1e4;
|
|
102
102
|
var KEYCHAIN_TIMEOUT_EXIT_CODE = 124;
|
|
103
103
|
function createSecurityRunner(timeoutMs = KEYCHAIN_COMMAND_TIMEOUT_MS) {
|
|
104
|
-
return (command, args, options) => new Promise((
|
|
104
|
+
return (command, args, options) => new Promise((resolve7) => {
|
|
105
105
|
let timedOut = false;
|
|
106
106
|
const child = execFile(command, [...args], { encoding: "utf8", maxBuffer: 1024 * 1024, windowsHide: true }, (error, stdout, stderr) => {
|
|
107
107
|
clearTimeout(timer);
|
|
108
108
|
if (timedOut) {
|
|
109
|
-
|
|
109
|
+
resolve7({
|
|
110
110
|
exitCode: KEYCHAIN_TIMEOUT_EXIT_CODE,
|
|
111
111
|
stdout: "",
|
|
112
112
|
stderr: `The Keychain did not answer within ${Math.ceil(timeoutMs / 1e3)} s (${command} was stopped); it may be waiting for an unlock prompt.`
|
|
@@ -114,7 +114,7 @@ function createSecurityRunner(timeoutMs = KEYCHAIN_COMMAND_TIMEOUT_MS) {
|
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
116
|
const code = error?.code;
|
|
117
|
-
|
|
117
|
+
resolve7({
|
|
118
118
|
exitCode: error === null ? 0 : typeof code === "number" ? code : 1,
|
|
119
119
|
stdout: String(stdout),
|
|
120
120
|
stderr: String(stderr)
|
|
@@ -548,11 +548,15 @@ import { join as join19 } from "node:path";
|
|
|
548
548
|
// ../../packages/shared-home/dist/disconnected-routes.js
|
|
549
549
|
import { readFileSync as readFileSync8 } from "node:fs";
|
|
550
550
|
|
|
551
|
+
// ../../packages/shared-home/dist/project-models.js
|
|
552
|
+
import { mkdirSync as mkdirSync5, readFileSync as readFileSync9, realpathSync as realpathSync2, renameSync as renameSync4, statSync as statSync2, writeFileSync as writeFileSync4 } from "node:fs";
|
|
553
|
+
import { dirname as dirname8, isAbsolute as isAbsolute2, join as join20, resolve as resolve3 } from "node:path";
|
|
554
|
+
|
|
551
555
|
// ../../packages/sessions/dist/index.js
|
|
552
556
|
import { createHash as createHash3, randomBytes as randomBytes4 } from "node:crypto";
|
|
553
|
-
import { createReadStream, readFileSync as
|
|
557
|
+
import { createReadStream, readFileSync as readFileSync12, statSync as statSync5 } from "node:fs";
|
|
554
558
|
import { appendFile, chmod as chmod4, mkdir as mkdir4, readdir as readdir2, rename as rename3, rm as rm5, writeFile } from "node:fs/promises";
|
|
555
|
-
import { isAbsolute as
|
|
559
|
+
import { isAbsolute as isAbsolute4, join as join24, resolve as resolve6 } from "node:path";
|
|
556
560
|
import { createInterface } from "node:readline/promises";
|
|
557
561
|
|
|
558
562
|
// ../../packages/shared/dist/logger.js
|
|
@@ -859,9 +863,9 @@ function namesEngineLibrary(text) {
|
|
|
859
863
|
}
|
|
860
864
|
|
|
861
865
|
// ../../packages/sessions/dist/dsh-log.js
|
|
862
|
-
import { existsSync as existsSync5, readdirSync as readdirSync4, readFileSync as
|
|
866
|
+
import { existsSync as existsSync5, readdirSync as readdirSync4, readFileSync as readFileSync10, statSync as statSync3 } from "node:fs";
|
|
863
867
|
import { homedir as homedir3 } from "node:os";
|
|
864
|
-
import { join as
|
|
868
|
+
import { join as join21 } from "node:path";
|
|
865
869
|
import * as zlib from "node:zlib";
|
|
866
870
|
var LOG_FILE = /^session\.v(\d+)\.jsonl(\.zstd)?$/u;
|
|
867
871
|
var ZSTD_MAGIC = Buffer.from([40, 181, 47, 253]);
|
|
@@ -869,10 +873,10 @@ var MEMORY_PREAMBLE = "Background memory recalled from EARLIER";
|
|
|
869
873
|
var MEMORY_REQUEST_MARKER = "\n\nUser request:\n";
|
|
870
874
|
var PROMPT_SOURCES = ["user", "goal", "agent-message", "subagent-settled"];
|
|
871
875
|
function defaultDshHome() {
|
|
872
|
-
return process.env.DSH_HOME ??
|
|
876
|
+
return process.env.DSH_HOME ?? join21(homedir3(), ".dsh");
|
|
873
877
|
}
|
|
874
878
|
function dshSessionsRoot(dshHome2 = defaultDshHome()) {
|
|
875
|
-
return
|
|
879
|
+
return join21(dshHome2, "sessions");
|
|
876
880
|
}
|
|
877
881
|
function safeReaddir(path) {
|
|
878
882
|
try {
|
|
@@ -889,10 +893,10 @@ function logInSessionDir(sessionDir, sessionId, projectDir) {
|
|
|
889
893
|
const match = LOG_FILE.exec(entry.name);
|
|
890
894
|
if (match === null)
|
|
891
895
|
continue;
|
|
892
|
-
const path =
|
|
896
|
+
const path = join21(sessionDir, entry.name);
|
|
893
897
|
let stats;
|
|
894
898
|
try {
|
|
895
|
-
stats =
|
|
899
|
+
stats = statSync3(path);
|
|
896
900
|
} catch {
|
|
897
901
|
continue;
|
|
898
902
|
}
|
|
@@ -916,11 +920,11 @@ function indexDshSessionLogs(dshHome2) {
|
|
|
916
920
|
for (const project of safeReaddir(root)) {
|
|
917
921
|
if (!project.isDirectory())
|
|
918
922
|
continue;
|
|
919
|
-
const projectDir =
|
|
923
|
+
const projectDir = join21(root, project.name);
|
|
920
924
|
for (const session of safeReaddir(projectDir)) {
|
|
921
925
|
if (!session.isDirectory())
|
|
922
926
|
continue;
|
|
923
|
-
const found = logInSessionDir(
|
|
927
|
+
const found = logInSessionDir(join21(projectDir, session.name), session.name, projectDir);
|
|
924
928
|
if (found === void 0)
|
|
925
929
|
continue;
|
|
926
930
|
const existing = index.get(found.sessionId);
|
|
@@ -1199,13 +1203,13 @@ function projectDshTranscript(records, options = {}) {
|
|
|
1199
1203
|
}
|
|
1200
1204
|
|
|
1201
1205
|
// ../../packages/sessions/dist/last-session.js
|
|
1202
|
-
import { realpathSync as
|
|
1203
|
-
import { resolve as
|
|
1206
|
+
import { realpathSync as realpathSync3 } from "node:fs";
|
|
1207
|
+
import { resolve as resolve4 } from "node:path";
|
|
1204
1208
|
|
|
1205
1209
|
// ../../packages/sessions/dist/dsh-log-diagnostics.js
|
|
1206
1210
|
import { createHash } from "node:crypto";
|
|
1207
|
-
import { existsSync as existsSync6, readFileSync as
|
|
1208
|
-
import { basename as basename3, dirname as
|
|
1211
|
+
import { existsSync as existsSync6, readFileSync as readFileSync11, statSync as statSync4 } from "node:fs";
|
|
1212
|
+
import { basename as basename3, dirname as dirname9, join as join22 } from "node:path";
|
|
1209
1213
|
|
|
1210
1214
|
// ../../packages/sessions/dist/sharing.js
|
|
1211
1215
|
import { createHash as createHash2 } from "node:crypto";
|
|
@@ -1220,10 +1224,10 @@ var CLOUD_SESSION_SYNC_AVAILABILITY = Object.freeze({
|
|
|
1220
1224
|
import { execFile as execFile3 } from "node:child_process";
|
|
1221
1225
|
import { existsSync as existsSync7, readdirSync as readdirSync5 } from "node:fs";
|
|
1222
1226
|
import { readdir, readlink, realpath } from "node:fs/promises";
|
|
1223
|
-
import { join as
|
|
1227
|
+
import { join as join23, resolve as resolve5 } from "node:path";
|
|
1224
1228
|
|
|
1225
1229
|
// ../../packages/sessions/dist/work-artifacts.js
|
|
1226
|
-
import { isAbsolute as
|
|
1230
|
+
import { isAbsolute as isAbsolute3, posix } from "node:path";
|
|
1227
1231
|
|
|
1228
1232
|
// src/versions-routes.ts
|
|
1229
1233
|
var IMPORTED_VERSIONS_REASON = "Imported threads are read-only, so their versions cannot be switched.";
|
|
@@ -1304,7 +1308,7 @@ var LineageIndex = class {
|
|
|
1304
1308
|
for (const location of found) {
|
|
1305
1309
|
let head = this.heads.get(location.path);
|
|
1306
1310
|
if (head === void 0) {
|
|
1307
|
-
if (++reads % 32 === 0) await new Promise((
|
|
1311
|
+
if (++reads % 32 === 0) await new Promise((resolve7) => setImmediate(resolve7));
|
|
1308
1312
|
try {
|
|
1309
1313
|
const records = await readHeadRecords(location);
|
|
1310
1314
|
head = records === void 0 ? void 0 : headOf(location, records);
|