@paradow/ledge 0.32.0 → 0.33.0
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/cli/{action-HUKZUHQ7.js → action-QW2ZQQBN.js} +4 -4
- package/dist/cli/{attach-ILMHKRUI.js → attach-ULTYWCJ7.js} +9 -9
- package/dist/cli/{bridge-LFKUCKQP.js → bridge-CSLF7EW6.js} +1 -1
- package/dist/cli/{chunk-VGAPV4DC.js → chunk-3DB3VOMM.js} +2 -2
- package/dist/cli/{chunk-U7J2AN3F.js → chunk-4HXJQEUN.js} +3 -3
- package/dist/cli/{chunk-5FKHISVK.js → chunk-4VNKZOC2.js} +1 -1
- package/dist/cli/{chunk-CXZETRPA.js → chunk-ASYAWVFW.js} +1 -1
- package/dist/cli/{chunk-YHZIHIGI.js → chunk-CCSUP5ZI.js} +2 -2
- package/dist/cli/{chunk-5JNJFBKZ.js → chunk-CPERVAPQ.js} +5 -5
- package/dist/cli/{chunk-SUBKKCGA.js → chunk-CSLVBADC.js} +3 -3
- package/dist/cli/chunk-E3LXONBI.js +6 -0
- package/dist/cli/{chunk-Q6RMLRPI.js → chunk-GXL3X7M7.js} +2 -2
- package/dist/cli/{chunk-IE52REEI.js → chunk-JEGPTNWV.js} +1 -1
- package/dist/cli/{chunk-QQVWFOPU.js → chunk-NWIICISV.js} +2 -2
- package/dist/cli/{chunk-EGXOBQZI.js → chunk-PZ3F4QH3.js} +6 -6
- package/dist/cli/{chunk-2BLPGRLO.js → chunk-WXE2NOE5.js} +4 -1
- package/dist/cli/{chunk-OPUIV6PR.js → chunk-XOZD4BP5.js} +3 -3
- package/dist/cli/{daemon-UJTMG3D4.js → daemon-5GT545BB.js} +7 -7
- package/dist/cli/{decide-3B6LGVNN.js → decide-PFHHOCFZ.js} +4 -4
- package/dist/cli/{handover-IX7EFDIP.js → handover-EMO6JT7O.js} +4 -4
- package/dist/cli/{hook-G7UA6MB6.js → hook-W2BU74H5.js} +9 -9
- package/dist/cli/index.js +16 -16
- package/dist/cli/{launch-2GZIRF3A.js → launch-LP7YJR5N.js} +9 -9
- package/dist/cli/{send-55RWY4LZ.js → send-NEI4X33R.js} +4 -4
- package/dist/cli/{status-NT5ZUYM6.js → status-U2HGGKHF.js} +2 -2
- package/dist/cli/{task-GABQ4SKY.js → task-PDDCE23D.js} +4 -4
- package/dist/cli/{team-IK2RYXW2.js → team-S3ASP22H.js} +6 -6
- package/dist/cli/{tui-AMW2XAH5.js → tui-UPMRMCPC.js} +20 -18
- package/dist/cli/{version-35XLTEMX.js → version-LUMK3Z3T.js} +1 -1
- package/dist/cli/{who-4FRIGYVT.js → who-NM3GPAPJ.js} +3 -3
- package/package.json +1 -1
- package/dist/cli/chunk-M7364G3S.js +0 -6
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
resultLine,
|
|
9
9
|
runClose,
|
|
10
10
|
runOnClient
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-XOZD4BP5.js";
|
|
12
|
+
import "./chunk-JEGPTNWV.js";
|
|
13
|
+
import "./chunk-ASYAWVFW.js";
|
|
14
|
+
import "./chunk-WXE2NOE5.js";
|
|
15
15
|
import "./chunk-HOOHS3MX.js";
|
|
16
16
|
import "./chunk-U67V476Y.js";
|
|
17
17
|
export {
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
attachEnv
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-CPERVAPQ.js";
|
|
4
|
+
import "./chunk-PZ3F4QH3.js";
|
|
5
5
|
import "./chunk-OLLQBK6N.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-NWIICISV.js";
|
|
7
|
+
import "./chunk-3DB3VOMM.js";
|
|
8
|
+
import "./chunk-4VNKZOC2.js";
|
|
9
|
+
import "./chunk-JEGPTNWV.js";
|
|
10
10
|
import {
|
|
11
11
|
connect
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ASYAWVFW.js";
|
|
13
13
|
import {
|
|
14
14
|
PROTOCOL_PORT,
|
|
15
15
|
backendOf
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-WXE2NOE5.js";
|
|
17
|
+
import "./chunk-E3LXONBI.js";
|
|
18
18
|
import {
|
|
19
19
|
realTmux
|
|
20
20
|
} from "./chunk-NLL2EQJ2.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ledgeTitleRest
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JEGPTNWV.js";
|
|
4
4
|
import {
|
|
5
5
|
cleanTopic,
|
|
6
6
|
isArchived,
|
|
7
7
|
sessionTitle
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WXE2NOE5.js";
|
|
9
9
|
|
|
10
10
|
// src/daemon/seat.ts
|
|
11
11
|
function teammates(team, sessions) {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CODEX_HOOK_VAR
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JEGPTNWV.js";
|
|
4
4
|
import {
|
|
5
5
|
connect
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ASYAWVFW.js";
|
|
7
7
|
import {
|
|
8
8
|
LEDGE_GIVER,
|
|
9
9
|
TASK_TEXT_MAX,
|
|
10
10
|
TASK_TITLE_MAX
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WXE2NOE5.js";
|
|
12
12
|
|
|
13
13
|
// src/cli/task.ts
|
|
14
14
|
import { randomUUID } from "crypto";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EFFORT_ARGS,
|
|
3
3
|
MODEL_ARGS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PZ3F4QH3.js";
|
|
5
5
|
import {
|
|
6
6
|
findRole
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-4VNKZOC2.js";
|
|
8
8
|
import {
|
|
9
9
|
exitFile,
|
|
10
10
|
spawnSession
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JEGPTNWV.js";
|
|
12
12
|
import {
|
|
13
13
|
DaemonRefusedError,
|
|
14
14
|
connect
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ASYAWVFW.js";
|
|
16
16
|
import {
|
|
17
17
|
PROTOCOL_PORT,
|
|
18
18
|
autonomyArgs
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-WXE2NOE5.js";
|
|
20
20
|
import {
|
|
21
21
|
realTmux
|
|
22
22
|
} from "./chunk-NLL2EQJ2.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CODEX_HOOK_VAR
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JEGPTNWV.js";
|
|
4
4
|
import {
|
|
5
5
|
connect
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ASYAWVFW.js";
|
|
7
7
|
import {
|
|
8
8
|
BRIEF_MAX
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WXE2NOE5.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/handover.ts
|
|
12
12
|
import { randomUUID } from "crypto";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CODEX_HOOK_VAR
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JEGPTNWV.js";
|
|
4
4
|
import {
|
|
5
5
|
connect,
|
|
6
6
|
sendMessageAndAwaitAck
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ASYAWVFW.js";
|
|
8
8
|
|
|
9
9
|
// src/cli/send.ts
|
|
10
10
|
import { randomUUID } from "crypto";
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
readSmall,
|
|
9
9
|
repoRoot,
|
|
10
10
|
scalarValue
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4VNKZOC2.js";
|
|
12
12
|
import {
|
|
13
13
|
SeatsSchema,
|
|
14
14
|
TeamNameSchema,
|
|
15
15
|
TemplateIdSchema
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WXE2NOE5.js";
|
|
17
17
|
import {
|
|
18
18
|
log
|
|
19
19
|
} from "./chunk-6IYPRUQG.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
templateId,
|
|
16
16
|
templateText,
|
|
17
17
|
writeDefinition
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-NWIICISV.js";
|
|
19
19
|
import {
|
|
20
20
|
NO_ALWAYS,
|
|
21
21
|
NO_NOTE,
|
|
@@ -47,12 +47,12 @@ import {
|
|
|
47
47
|
shownCommand,
|
|
48
48
|
teammates,
|
|
49
49
|
withImages
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-3DB3VOMM.js";
|
|
51
51
|
import {
|
|
52
52
|
findRole,
|
|
53
53
|
frontMatter,
|
|
54
54
|
loadRole
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-4VNKZOC2.js";
|
|
56
56
|
import {
|
|
57
57
|
PARENT_AGENT_VARS,
|
|
58
58
|
agentEnv,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
labelTranscript,
|
|
63
63
|
resumeLabel,
|
|
64
64
|
spawnSession
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-JEGPTNWV.js";
|
|
66
66
|
import {
|
|
67
67
|
ACTIONS,
|
|
68
68
|
ATTACHMENT_ID,
|
|
@@ -161,10 +161,10 @@ import {
|
|
|
161
161
|
teamsPurpose,
|
|
162
162
|
tokenEquals,
|
|
163
163
|
transmissions
|
|
164
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-WXE2NOE5.js";
|
|
165
165
|
import {
|
|
166
166
|
LEDGE_VERSION
|
|
167
|
-
} from "./chunk-
|
|
167
|
+
} from "./chunk-E3LXONBI.js";
|
|
168
168
|
import {
|
|
169
169
|
log
|
|
170
170
|
} from "./chunk-6IYPRUQG.js";
|
|
@@ -225,12 +225,15 @@ var MachineIdSchema = z5.string().regex(/^[a-zA-Z0-9_-]{1,64}$/);
|
|
|
225
225
|
var MachineSchema = z5.object({
|
|
226
226
|
id: MachineIdSchema,
|
|
227
227
|
label: z5.string().trim().min(1).max(80),
|
|
228
|
-
ssh: SshAliasSchema.optional()
|
|
228
|
+
ssh: SshAliasSchema.optional(),
|
|
229
|
+
/** Kept in the list but never connected to: no peer, no retry, no session shown until it is enabled again. */
|
|
230
|
+
disabled: z5.boolean().optional()
|
|
229
231
|
});
|
|
230
232
|
var MachinesSchema = z5.array(MachineSchema).min(1).max(20).superRefine((list, ctx) => {
|
|
231
233
|
if (list[0]?.id !== "local" || list[0].ssh !== void 0) ctx.addIssue({ code: "custom", message: "the first machine is local, without ssh", path: [0] });
|
|
232
234
|
const ids = /* @__PURE__ */ new Set(), aliases = /* @__PURE__ */ new Set();
|
|
233
235
|
list.forEach((m, i) => {
|
|
236
|
+
if (i === 0 && m.disabled) ctx.addIssue({ code: "custom", message: "the local machine cannot be disabled", path: [0, "disabled"] });
|
|
234
237
|
if (i > 0 && !m.ssh) ctx.addIssue({ code: "custom", message: "a remote machine needs an ssh alias", path: [i, "ssh"] });
|
|
235
238
|
if (ids.has(m.id)) ctx.addIssue({ code: "custom", message: `duplicate id ${m.id}`, path: [i, "id"] });
|
|
236
239
|
ids.add(m.id);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CODEX_HOOK_VAR
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JEGPTNWV.js";
|
|
4
4
|
import {
|
|
5
5
|
connect
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ASYAWVFW.js";
|
|
7
7
|
import {
|
|
8
8
|
SESSION_KEY_VAR,
|
|
9
9
|
actionById
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WXE2NOE5.js";
|
|
11
11
|
|
|
12
12
|
// src/cli/action.ts
|
|
13
13
|
import { randomUUID } from "crypto";
|
|
@@ -9,9 +9,9 @@ import {
|
|
|
9
9
|
startServer,
|
|
10
10
|
tasksJournal,
|
|
11
11
|
teamsJournal
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-PZ3F4QH3.js";
|
|
13
13
|
import "./chunk-OLLQBK6N.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-NWIICISV.js";
|
|
15
15
|
import {
|
|
16
16
|
QUESTION_TOOLS,
|
|
17
17
|
crossSession,
|
|
@@ -26,11 +26,11 @@ import {
|
|
|
26
26
|
readPeers,
|
|
27
27
|
reduce,
|
|
28
28
|
stripNote
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-3DB3VOMM.js";
|
|
30
|
+
import "./chunk-4VNKZOC2.js";
|
|
31
31
|
import {
|
|
32
32
|
agentMessages
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-JEGPTNWV.js";
|
|
34
34
|
import {
|
|
35
35
|
DEFAULT_RELAY_URL,
|
|
36
36
|
DevicePollResponseSchema,
|
|
@@ -44,10 +44,10 @@ import {
|
|
|
44
44
|
SealedFrameSchema,
|
|
45
45
|
SessionSchema,
|
|
46
46
|
backendOf
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-WXE2NOE5.js";
|
|
48
48
|
import {
|
|
49
49
|
LEDGE_VERSION
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-E3LXONBI.js";
|
|
51
51
|
import {
|
|
52
52
|
SERVICE,
|
|
53
53
|
inDaemonService,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runOnClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XOZD4BP5.js";
|
|
4
4
|
import {
|
|
5
5
|
CODEX_HOOK_VAR
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JEGPTNWV.js";
|
|
7
7
|
import {
|
|
8
8
|
connect
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ASYAWVFW.js";
|
|
10
10
|
import {
|
|
11
11
|
LEDGE_GIVER,
|
|
12
12
|
TASK_TEXT_MAX
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WXE2NOE5.js";
|
|
14
14
|
import "./chunk-HOOHS3MX.js";
|
|
15
15
|
import "./chunk-U67V476Y.js";
|
|
16
16
|
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
handoverArgs,
|
|
4
4
|
handoverOnClient,
|
|
5
5
|
runHandover
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-CSLVBADC.js";
|
|
7
|
+
import "./chunk-JEGPTNWV.js";
|
|
8
|
+
import "./chunk-ASYAWVFW.js";
|
|
9
|
+
import "./chunk-WXE2NOE5.js";
|
|
10
10
|
import "./chunk-HOOHS3MX.js";
|
|
11
11
|
import "./chunk-U67V476Y.js";
|
|
12
12
|
export {
|
|
@@ -11,37 +11,37 @@ import {
|
|
|
11
11
|
takeImages,
|
|
12
12
|
teamChangeLine,
|
|
13
13
|
teammates
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3DB3VOMM.js";
|
|
15
15
|
import {
|
|
16
16
|
findRole
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4VNKZOC2.js";
|
|
18
18
|
import {
|
|
19
19
|
parseLedgeCommand,
|
|
20
20
|
readOnClient,
|
|
21
21
|
sendOnClient
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-GXL3X7M7.js";
|
|
23
23
|
import {
|
|
24
24
|
taskOnClient
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-4HXJQEUN.js";
|
|
26
26
|
import {
|
|
27
27
|
handoverOnClient
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-CSLVBADC.js";
|
|
29
29
|
import {
|
|
30
30
|
CODEX_ENV_VAR,
|
|
31
31
|
CODEX_HOOK_VAR,
|
|
32
32
|
codexPlan
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-JEGPTNWV.js";
|
|
34
34
|
import {
|
|
35
35
|
formatWho
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-CCSUP5ZI.js";
|
|
37
37
|
import {
|
|
38
38
|
connect,
|
|
39
39
|
sendMessageAndAwaitAck
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-ASYAWVFW.js";
|
|
41
41
|
import {
|
|
42
42
|
MESSAGE_MAX,
|
|
43
43
|
taskClosed
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-WXE2NOE5.js";
|
|
45
45
|
import {
|
|
46
46
|
log
|
|
47
47
|
} from "./chunk-6IYPRUQG.js";
|
package/dist/cli/index.js
CHANGED
|
@@ -25,7 +25,7 @@ async function hookMain(args) {
|
|
|
25
25
|
try {
|
|
26
26
|
const chunks = [];
|
|
27
27
|
for await (const c of process.stdin) chunks.push(c);
|
|
28
|
-
const { runHook } = await import("./hook-
|
|
28
|
+
const { runHook } = await import("./hook-W2BU74H5.js");
|
|
29
29
|
const out = await runHook(event, Buffer.concat(chunks).toString("utf8"), { tool });
|
|
30
30
|
if (out) process.stdout.write(`${out}
|
|
31
31
|
`);
|
|
@@ -37,7 +37,7 @@ async function main(argv) {
|
|
|
37
37
|
const [cmd, ...rest] = argv;
|
|
38
38
|
switch (cmd) {
|
|
39
39
|
case "daemon": {
|
|
40
|
-
const { startDaemon } = await import("./daemon-
|
|
40
|
+
const { startDaemon } = await import("./daemon-5GT545BB.js");
|
|
41
41
|
await startDaemon();
|
|
42
42
|
await new Promise(() => {
|
|
43
43
|
});
|
|
@@ -45,7 +45,7 @@ async function main(argv) {
|
|
|
45
45
|
}
|
|
46
46
|
case "--version":
|
|
47
47
|
case "version": {
|
|
48
|
-
const { LEDGE_VERSION } = await import("./version-
|
|
48
|
+
const { LEDGE_VERSION } = await import("./version-LUMK3Z3T.js");
|
|
49
49
|
console.log(LEDGE_VERSION);
|
|
50
50
|
return 0;
|
|
51
51
|
}
|
|
@@ -66,74 +66,74 @@ async function main(argv) {
|
|
|
66
66
|
return r.ok ? 0 : 1;
|
|
67
67
|
}
|
|
68
68
|
case "status": {
|
|
69
|
-
const { printStatus } = await import("./status-
|
|
69
|
+
const { printStatus } = await import("./status-U2HGGKHF.js");
|
|
70
70
|
console.log(await printStatus());
|
|
71
71
|
return 0;
|
|
72
72
|
}
|
|
73
73
|
case "who": {
|
|
74
|
-
const { printWho } = await import("./who-
|
|
74
|
+
const { printWho } = await import("./who-NM3GPAPJ.js");
|
|
75
75
|
console.log(await printWho());
|
|
76
76
|
return 0;
|
|
77
77
|
}
|
|
78
78
|
case "send": {
|
|
79
|
-
const { sendMessage } = await import("./send-
|
|
79
|
+
const { sendMessage } = await import("./send-NEI4X33R.js");
|
|
80
80
|
const r = await sendMessage(rest);
|
|
81
81
|
console.log(r.line);
|
|
82
82
|
return r.code;
|
|
83
83
|
}
|
|
84
84
|
case "read": {
|
|
85
|
-
const { readMessage } = await import("./send-
|
|
85
|
+
const { readMessage } = await import("./send-NEI4X33R.js");
|
|
86
86
|
const r = await readMessage(rest);
|
|
87
87
|
console.log(r.line);
|
|
88
88
|
return r.code;
|
|
89
89
|
}
|
|
90
90
|
case "task": {
|
|
91
|
-
const { runTask } = await import("./task-
|
|
91
|
+
const { runTask } = await import("./task-PDDCE23D.js");
|
|
92
92
|
const r = await runTask(rest);
|
|
93
93
|
console.log(r.line);
|
|
94
94
|
return r.code;
|
|
95
95
|
}
|
|
96
96
|
case "decide": {
|
|
97
|
-
const { runDecide } = await import("./decide-
|
|
97
|
+
const { runDecide } = await import("./decide-PFHHOCFZ.js");
|
|
98
98
|
const r = await runDecide(rest);
|
|
99
99
|
console.log(r.line);
|
|
100
100
|
return r.code;
|
|
101
101
|
}
|
|
102
102
|
case "handover": {
|
|
103
|
-
const { runHandover } = await import("./handover-
|
|
103
|
+
const { runHandover } = await import("./handover-EMO6JT7O.js");
|
|
104
104
|
const r = await runHandover(rest);
|
|
105
105
|
console.log(r.line);
|
|
106
106
|
return r.code;
|
|
107
107
|
}
|
|
108
108
|
case "close": {
|
|
109
|
-
const { runClose } = await import("./action-
|
|
109
|
+
const { runClose } = await import("./action-QW2ZQQBN.js");
|
|
110
110
|
const r = await runClose(rest);
|
|
111
111
|
console.log(r.line);
|
|
112
112
|
return r.code;
|
|
113
113
|
}
|
|
114
114
|
case "team": {
|
|
115
|
-
const { runTeam } = await import("./team-
|
|
115
|
+
const { runTeam } = await import("./team-S3ASP22H.js");
|
|
116
116
|
const r = await runTeam(rest);
|
|
117
117
|
console.log(r.line);
|
|
118
118
|
return r.code;
|
|
119
119
|
}
|
|
120
120
|
case "tui": {
|
|
121
|
-
const { runTui } = await import("./tui-
|
|
121
|
+
const { runTui } = await import("./tui-UPMRMCPC.js");
|
|
122
122
|
return runTui(rest);
|
|
123
123
|
}
|
|
124
124
|
case "bridge": {
|
|
125
|
-
const { bridge } = await import("./bridge-
|
|
125
|
+
const { bridge } = await import("./bridge-CSLF7EW6.js");
|
|
126
126
|
await bridge();
|
|
127
127
|
return 0;
|
|
128
128
|
}
|
|
129
129
|
case "claude":
|
|
130
130
|
case "codex":
|
|
131
131
|
case "cursor": {
|
|
132
|
-
const { launch } = await import("./launch-
|
|
132
|
+
const { launch } = await import("./launch-LP7YJR5N.js");
|
|
133
133
|
return launch(cmd, rest);
|
|
134
134
|
}
|
|
135
135
|
case "attach": {
|
|
136
|
-
const { attach } = await import("./attach-
|
|
136
|
+
const { attach } = await import("./attach-ULTYWCJ7.js");
|
|
137
137
|
return attach(rest.find((a) => !a.startsWith("--")) ?? "", { readOnly: rest.includes("--read-only") });
|
|
138
138
|
}
|
|
139
139
|
default:
|
|
@@ -6,19 +6,19 @@ import {
|
|
|
6
6
|
launch,
|
|
7
7
|
parseLaunchArgs,
|
|
8
8
|
roleArgs
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-CPERVAPQ.js";
|
|
10
|
+
import "./chunk-PZ3F4QH3.js";
|
|
11
11
|
import "./chunk-OLLQBK6N.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-NWIICISV.js";
|
|
13
|
+
import "./chunk-3DB3VOMM.js";
|
|
14
|
+
import "./chunk-4VNKZOC2.js";
|
|
15
15
|
import {
|
|
16
16
|
agentEnv,
|
|
17
17
|
exitFile
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-JEGPTNWV.js";
|
|
19
|
+
import "./chunk-ASYAWVFW.js";
|
|
20
|
+
import "./chunk-WXE2NOE5.js";
|
|
21
|
+
import "./chunk-E3LXONBI.js";
|
|
22
22
|
import "./chunk-NLL2EQJ2.js";
|
|
23
23
|
import "./chunk-6IYPRUQG.js";
|
|
24
24
|
import "./chunk-HOOHS3MX.js";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
readOnClient,
|
|
5
5
|
sendMessage,
|
|
6
6
|
sendOnClient
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-GXL3X7M7.js";
|
|
8
|
+
import "./chunk-JEGPTNWV.js";
|
|
9
|
+
import "./chunk-ASYAWVFW.js";
|
|
10
|
+
import "./chunk-WXE2NOE5.js";
|
|
11
11
|
import "./chunk-HOOHS3MX.js";
|
|
12
12
|
import "./chunk-U67V476Y.js";
|
|
13
13
|
export {
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
runTask,
|
|
5
5
|
taskArgs,
|
|
6
6
|
taskOnClient
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-4HXJQEUN.js";
|
|
8
|
+
import "./chunk-JEGPTNWV.js";
|
|
9
|
+
import "./chunk-ASYAWVFW.js";
|
|
10
|
+
import "./chunk-WXE2NOE5.js";
|
|
11
11
|
import "./chunk-HOOHS3MX.js";
|
|
12
12
|
import "./chunk-U67V476Y.js";
|
|
13
13
|
export {
|
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
callerOf,
|
|
5
5
|
resultLine,
|
|
6
6
|
runOnClient
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XOZD4BP5.js";
|
|
8
8
|
import {
|
|
9
9
|
listDefinitions
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-NWIICISV.js";
|
|
11
|
+
import "./chunk-4VNKZOC2.js";
|
|
12
|
+
import "./chunk-JEGPTNWV.js";
|
|
13
13
|
import {
|
|
14
14
|
connect
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-ASYAWVFW.js";
|
|
16
16
|
import {
|
|
17
17
|
RoleIdSchema,
|
|
18
18
|
SeatsSchema,
|
|
19
19
|
ToolSchema
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-WXE2NOE5.js";
|
|
21
21
|
import "./chunk-6IYPRUQG.js";
|
|
22
22
|
import "./chunk-HOOHS3MX.js";
|
|
23
23
|
import "./chunk-U67V476Y.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
attachEnv
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CPERVAPQ.js";
|
|
4
4
|
import {
|
|
5
5
|
imageInfo
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PZ3F4QH3.js";
|
|
7
7
|
import {
|
|
8
8
|
MAX_FRAME
|
|
9
9
|
} from "./chunk-OLLQBK6N.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-NWIICISV.js";
|
|
11
|
+
import "./chunk-3DB3VOMM.js";
|
|
12
|
+
import "./chunk-4VNKZOC2.js";
|
|
13
|
+
import "./chunk-JEGPTNWV.js";
|
|
14
|
+
import "./chunk-ASYAWVFW.js";
|
|
15
15
|
import {
|
|
16
16
|
ACTION_ERROR_CODES,
|
|
17
17
|
ATTACHMENTS_MAX,
|
|
@@ -44,8 +44,8 @@ import {
|
|
|
44
44
|
readDaemonToken,
|
|
45
45
|
taskClosed,
|
|
46
46
|
transmissions
|
|
47
|
-
} from "./chunk-
|
|
48
|
-
import "./chunk-
|
|
47
|
+
} from "./chunk-WXE2NOE5.js";
|
|
48
|
+
import "./chunk-E3LXONBI.js";
|
|
49
49
|
import "./chunk-NLL2EQJ2.js";
|
|
50
50
|
import "./chunk-6IYPRUQG.js";
|
|
51
51
|
import {
|
|
@@ -574,13 +574,14 @@ function changeOf(was, now2) {
|
|
|
574
574
|
}
|
|
575
575
|
|
|
576
576
|
// ../fleet/src/fleet.ts
|
|
577
|
-
var toWire = (list3) => list3.map(({ id, label, ssh }) => ({ id, label, ...ssh ? { ssh } : {} }));
|
|
577
|
+
var toWire = (list3) => list3.map(({ id, label, ssh, disabled }) => ({ id, label, ...ssh ? { ssh } : {}, ...disabled ? { disabled: true } : {} }));
|
|
578
578
|
var OPERATIONS = /* @__PURE__ */ new Set(["session.launch", "session.relay", "session.relay.cancel", "session.close"]);
|
|
579
579
|
function createFleetClient(config, makeClient = createDaemonClient, opts = {}) {
|
|
580
580
|
const prefix = opts.prefix ?? "ledge";
|
|
581
581
|
const HISTORY_KEY = `${prefix}.fleet.history`, MACHINES_KEY = `${prefix}.machines`;
|
|
582
582
|
let configs = parseMachines(config), selected = configs[0].id, connected = false, configuring = false, state2 = [];
|
|
583
583
|
const peers = /* @__PURE__ */ new Map();
|
|
584
|
+
const active = () => configs.filter((c) => !c.disabled);
|
|
584
585
|
const machineMessages = /* @__PURE__ */ new Set();
|
|
585
586
|
const messages = /* @__PURE__ */ new Set(), statuses = /* @__PURE__ */ new Set(), listeners2 = /* @__PURE__ */ new Set();
|
|
586
587
|
const turns2 = /* @__PURE__ */ new Map(), bindings = /* @__PURE__ */ new Map();
|
|
@@ -710,7 +711,7 @@ function createFleetClient(config, makeClient = createDaemonClient, opts = {}) {
|
|
|
710
711
|
const stateSessions = (p) => (stale(p) ? p.snapshot.sessions.map((s) => ({ ...s, offline: true })) : p.snapshot?.sessions ?? []).filter((s) => !isArchived(s));
|
|
711
712
|
function refresh() {
|
|
712
713
|
if (configuring) return;
|
|
713
|
-
state2 =
|
|
714
|
+
state2 = active().map((c) => {
|
|
714
715
|
const p = peers.get(c.id);
|
|
715
716
|
return { ...c, status: p.status, ready: available(p), recents: p.snapshot?.recents ?? [], sessions: stateSessions(p), launcher: p.snapshot?.launcher ?? null, version: p.snapshot?.daemon?.version, daemon: p.snapshot?.daemon, error: p.error };
|
|
716
717
|
});
|
|
@@ -723,7 +724,7 @@ function createFleetClient(config, makeClient = createDaemonClient, opts = {}) {
|
|
|
723
724
|
}
|
|
724
725
|
function publish() {
|
|
725
726
|
if (configuring) return;
|
|
726
|
-
state2 =
|
|
727
|
+
state2 = active().map((c) => {
|
|
727
728
|
const p = peers.get(c.id);
|
|
728
729
|
return { ...c, status: p.status, ready: available(p), recents: p.snapshot?.recents ?? [], sessions: stateSessions(p), launcher: p.snapshot?.launcher ?? null, version: p.snapshot?.daemon?.version, daemon: p.snapshot?.daemon, error: p.error };
|
|
729
730
|
});
|
|
@@ -766,13 +767,13 @@ function createFleetClient(config, makeClient = createDaemonClient, opts = {}) {
|
|
|
766
767
|
}
|
|
767
768
|
function apply(next2) {
|
|
768
769
|
configuring = true;
|
|
769
|
-
for (const [id, p] of peers) if (!next2.some((c) => c.id === id && c.url === p.config.url && c.ssh === p.config.ssh)) {
|
|
770
|
+
for (const [id, p] of peers) if (!next2.some((c) => !c.disabled && c.id === id && c.url === p.config.url && c.ssh === p.config.ssh)) {
|
|
770
771
|
p.client.close();
|
|
771
772
|
p.off.forEach((off) => off());
|
|
772
773
|
peers.delete(id);
|
|
773
774
|
}
|
|
774
775
|
configs = next2;
|
|
775
|
-
for (const c of
|
|
776
|
+
for (const c of active()) {
|
|
776
777
|
const p = peers.get(c.id);
|
|
777
778
|
if (p) p.config = c;
|
|
778
779
|
else add(c);
|
|
@@ -1062,7 +1063,7 @@ function createFleetClient(config, makeClient = createDaemonClient, opts = {}) {
|
|
|
1062
1063
|
return;
|
|
1063
1064
|
}
|
|
1064
1065
|
if (m.request !== void 0 && OPERATIONS.has(m.request)) endOperation(machine);
|
|
1065
|
-
emit2({ ...m, ...m.id ? { id: qualify(machine, m.id) } : {}, message:
|
|
1066
|
+
emit2({ ...m, ...m.id ? { id: qualify(machine, m.id) } : {}, message: active().length > 1 ? `${p.config.label}: ${m.message}` : m.message });
|
|
1066
1067
|
return;
|
|
1067
1068
|
}
|
|
1068
1069
|
if (m.type === "session.handover.result") {
|
|
@@ -1110,7 +1111,7 @@ function createFleetClient(config, makeClient = createDaemonClient, opts = {}) {
|
|
|
1110
1111
|
}));
|
|
1111
1112
|
if (connected) client.connect();
|
|
1112
1113
|
}
|
|
1113
|
-
for (const c of
|
|
1114
|
+
for (const c of active()) add(c);
|
|
1114
1115
|
function inventory() {
|
|
1115
1116
|
return { machines: state2.map((m) => ({ id: m.id, label: m.label, online: m.ready, local: m.id === "local", sessions: m.sessions.slice(0, 500).map((s) => ({ id: s.id, name: s.name, project: s.repo ?? s.project, cwd: s.cwd, topic: s.topic, state: s.state, readOnly: s.source === "hook_only" })), folders: m.recents.slice(0, 100).map((r) => ({ project: r.project, cwd: r.cwd })) })), history: [...turns2.values()].slice(-30).map((t) => ({ question: t.question.slice(0, 2e4), answer: t.answer?.slice(0, 2e4), machineId: t.machineId })) };
|
|
1116
1117
|
}
|
|
@@ -1163,7 +1164,7 @@ function createFleetClient(config, makeClient = createDaemonClient, opts = {}) {
|
|
|
1163
1164
|
const context = inventory();
|
|
1164
1165
|
turns2.set(msg.qid, { qid: msg.qid, question: msg.text, askedAt: (/* @__PURE__ */ new Date()).toISOString(), steps: [] });
|
|
1165
1166
|
history();
|
|
1166
|
-
if (
|
|
1167
|
+
if (active().length === 1) {
|
|
1167
1168
|
const p = peers.get("local");
|
|
1168
1169
|
if (!available(p)) return fail(msg.qid, "Local is offline");
|
|
1169
1170
|
bindings.set(msg.qid, { machine: "local", raw: msg.qid });
|
|
@@ -1216,7 +1217,7 @@ function createFleetClient(config, makeClient = createDaemonClient, opts = {}) {
|
|
|
1216
1217
|
attachmentAsks.set(msg.requestId, machine);
|
|
1217
1218
|
}
|
|
1218
1219
|
if (msg.type === "document.read") {
|
|
1219
|
-
if (
|
|
1220
|
+
if (active().length > 1 && !msg.machineId && !msg.sessionId) {
|
|
1220
1221
|
emit2({ type: "document.error", requestId: msg.requestId, path: msg.path, code: "read_failed" });
|
|
1221
1222
|
return;
|
|
1222
1223
|
}
|
|
@@ -1371,6 +1372,7 @@ function createFleetClient(config, makeClient = createDaemonClient, opts = {}) {
|
|
|
1371
1372
|
localStorage.setItem(MACHINES_KEY, JSON.stringify(next2));
|
|
1372
1373
|
apply(next2);
|
|
1373
1374
|
},
|
|
1375
|
+
configured: () => configs,
|
|
1374
1376
|
machinesSource: () => source2,
|
|
1375
1377
|
probe: (ssh) => probeMachine(configs[0].url, ssh, { token: opts.token }),
|
|
1376
1378
|
// The last try's error is forgotten: the machine is « connecting » until its next answer (a snapshot, or an error again).
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
formatWho,
|
|
3
3
|
printWho
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-CCSUP5ZI.js";
|
|
5
|
+
import "./chunk-ASYAWVFW.js";
|
|
6
|
+
import "./chunk-WXE2NOE5.js";
|
|
7
7
|
import "./chunk-HOOHS3MX.js";
|
|
8
8
|
import "./chunk-U67V476Y.js";
|
|
9
9
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paradow/ledge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "Follow and answer your WSL agent sessions (Claude Code, Codex, Cursor Agent) from the Ledge island on Windows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": { "ledge": "dist/cli/index.js" },
|