@paradow/ledge 0.21.0 → 0.22.1
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-WNQ3NJGD.js +27 -0
- package/dist/cli/{attach-IVICSJYB.js → attach-UHM7QQ4W.js} +9 -8
- package/dist/cli/{bridge-H3ZPGIUY.js → bridge-R37AHVXS.js} +2 -1
- package/dist/cli/{chunk-ZQON4EV7.js → chunk-5VFFJ3ZC.js} +2 -2
- package/dist/cli/{chunk-ALEZJFJ3.js → chunk-7XMGYJTN.js} +7 -7
- package/dist/cli/chunk-ARB4BKZJ.js +2302 -0
- package/dist/cli/{chunk-24AHC55Y.js → chunk-AVKFQSRP.js} +7 -21
- package/dist/cli/{chunk-2VSEIOGA.js → chunk-JNLARCUC.js} +7 -4
- package/dist/cli/{chunk-EKXZ45MQ.js → chunk-KRFXWD5S.js} +821 -201
- package/dist/cli/chunk-O6FTIYJV.js +85 -0
- package/dist/cli/chunk-ONFWK2WW.js +6 -0
- package/dist/cli/{chunk-EBBAOQ2Z.js → chunk-PUJLMKZC.js} +3 -3
- package/dist/cli/{chunk-ZZMZDAF6.js → chunk-RKV5KYKL.js} +3 -3
- package/dist/cli/{chunk-WRE3PUTV.js → chunk-RYUDIFSI.js} +2 -2
- package/dist/cli/{chunk-AJFC33TH.js → chunk-TOFVC6IV.js} +2 -2
- package/dist/cli/{chunk-KACRWFN3.js → chunk-TZBI2RVU.js} +1 -1
- package/dist/cli/chunk-U67V476Y.js +35 -0
- package/dist/cli/{chunk-35BPMR6P.js → chunk-ZDEEHFU3.js} +9 -4
- package/dist/cli/{daemon-5FPZG5R3.js → daemon-DLJCIC7L.js} +8 -7
- package/dist/cli/{decide-2ZKSX7O5.js → decide-UWJMKDR4.js} +4 -3
- package/dist/cli/{handover-AZ35QZRK.js → handover-5JHFA5EF.js} +5 -4
- package/dist/cli/{hook-KANGO46Y.js → hook-XBSMUMZ7.js} +10 -9
- package/dist/cli/index.js +25 -18
- package/dist/cli/{launch-DEKJ5HI4.js → launch-OVB66BZJ.js} +9 -8
- package/dist/cli/{send-BFPJBXXH.js → send-Y2C3BIGK.js} +5 -4
- package/dist/cli/{setup-47ODKJBM.js → setup-K42IVMHS.js} +1 -0
- package/dist/cli/{status-JPF4NZNI.js → status-5YEORNTH.js} +3 -2
- package/dist/cli/{task-UTRG4KA5.js → task-R44VWZHR.js} +5 -4
- package/dist/cli/team-F7B3IG3I.js +205 -0
- package/dist/cli/tui-GL6Q3KOX.js +19115 -0
- package/dist/cli/{uninstall-QNWRD27D.js → uninstall-4IMMR55T.js} +1 -0
- package/dist/cli/version-ZPC6END5.js +7 -0
- package/dist/cli/who-YMSQI64I.js +12 -0
- package/package.json +2 -1
- package/dist/cli/chunk-EX66KH66.js +0 -1856
- package/dist/cli/chunk-NFXFY5CT.js +0 -6
- package/dist/cli/team-SZJHGA7D.js +0 -101
- package/dist/cli/tui-GEJHBWP5.js +0 -4873
- package/dist/cli/version-YUO6SLAF.js +0 -6
- package/dist/cli/who-NYPVBO64.js +0 -11
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
ROLE_LABEL_MAX,
|
|
3
3
|
ROLE_PROMPT_MAX,
|
|
4
4
|
RoleSchema
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ARB4BKZJ.js";
|
|
6
6
|
import {
|
|
7
7
|
log
|
|
8
8
|
} from "./chunk-6IYPRUQG.js";
|
|
@@ -96,7 +96,11 @@ function listRoles(cwd) {
|
|
|
96
96
|
for (const { dir, source } of definitionDirs("roles", cwd)) {
|
|
97
97
|
for (const path of definitionFiles(dir, [".md"])) {
|
|
98
98
|
const id = path.slice(dir.length + 1, -".md".length);
|
|
99
|
-
|
|
99
|
+
const won = roles.get(id);
|
|
100
|
+
if (won) {
|
|
101
|
+
if (source === "home") roles.set(id, { ...won, shadows: path });
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
100
104
|
let r;
|
|
101
105
|
try {
|
|
102
106
|
r = parseRole(id, readSmall(path), source, path);
|
|
@@ -116,22 +120,6 @@ function listRoles(cwd) {
|
|
|
116
120
|
function findRole(id, cwd) {
|
|
117
121
|
return listRoles(cwd).roles.find((r) => r.id === id);
|
|
118
122
|
}
|
|
119
|
-
function autonomyArgs(tool, autonomy) {
|
|
120
|
-
if (!autonomy || autonomy === "ask") return [];
|
|
121
|
-
switch (tool) {
|
|
122
|
-
case "claude":
|
|
123
|
-
return ["--permission-mode", autonomy === "edits" ? "acceptEdits" : "auto"];
|
|
124
|
-
case "codex":
|
|
125
|
-
return autonomy === "edits" ? ["--ask-for-approval", "on-request"] : ["--ask-for-approval", "never", "--sandbox", "workspace-write"];
|
|
126
|
-
case "cursor":
|
|
127
|
-
return autonomy === "auto" ? ["--force"] : [];
|
|
128
|
-
case "omp":
|
|
129
|
-
return [];
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
function ompApprovalFor(autonomy) {
|
|
133
|
-
return autonomy === "auto" ? "yolo" : autonomy ? "always-ask" : void 0;
|
|
134
|
-
}
|
|
135
123
|
|
|
136
124
|
export {
|
|
137
125
|
definitionDirs,
|
|
@@ -139,7 +127,5 @@ export {
|
|
|
139
127
|
readSmall,
|
|
140
128
|
unquote,
|
|
141
129
|
listRoles,
|
|
142
|
-
findRole
|
|
143
|
-
autonomyArgs,
|
|
144
|
-
ompApprovalFor
|
|
130
|
+
findRole
|
|
145
131
|
};
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
listRoles,
|
|
5
5
|
readSmall,
|
|
6
6
|
unquote
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AVKFQSRP.js";
|
|
8
8
|
import {
|
|
9
9
|
SeatsSchema,
|
|
10
10
|
TeamNameSchema
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ARB4BKZJ.js";
|
|
12
12
|
import {
|
|
13
13
|
log
|
|
14
14
|
} from "./chunk-6IYPRUQG.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-HOOHS3MX.js";
|
|
18
18
|
|
|
19
19
|
// src/daemon/teams.ts
|
|
20
|
-
import { writeFileSync, mkdirSync, renameSync } from "fs";
|
|
20
|
+
import { existsSync, writeFileSync, mkdirSync, renameSync } from "fs";
|
|
21
21
|
import { join } from "path";
|
|
22
22
|
var scalar = (raw) => unquote(raw.replace(/\s+#.*$/, "").trim());
|
|
23
23
|
function flowMap(raw) {
|
|
@@ -148,8 +148,10 @@ function templateId(name) {
|
|
|
148
148
|
return id || "team";
|
|
149
149
|
}
|
|
150
150
|
var yamlScalar = (v) => /^[\w./@:+-]+$/.test(v) && !/^(true|false|null|yes|no|~)$/i.test(v) ? v : JSON.stringify(v);
|
|
151
|
+
var templatePath = (name, dir) => join(dir, `${templateId(name)}.yaml`);
|
|
152
|
+
var templateExists = (name, dir = join(ledgeDir(), "teams")) => existsSync(templatePath(name, dir));
|
|
151
153
|
function saveTemplate(name, seats, dir = join(ledgeDir(), "teams")) {
|
|
152
|
-
const path =
|
|
154
|
+
const path = templatePath(name, dir);
|
|
153
155
|
const lines = [`name: ${yamlScalar(name)}`, "seats:", ...seats.map((s) => ` - { ${Object.entries(s).filter(([, v]) => v !== void 0).map(([k, v]) => `${k}: ${yamlScalar(String(v))}`).join(", ")} }`), ""];
|
|
154
156
|
mkdirSync(dir, { recursive: true });
|
|
155
157
|
const tmp = `${path}.tmp`;
|
|
@@ -161,5 +163,6 @@ function saveTemplate(name, seats, dir = join(ledgeDir(), "teams")) {
|
|
|
161
163
|
export {
|
|
162
164
|
resolveSeats,
|
|
163
165
|
listDefinitions,
|
|
166
|
+
templateExists,
|
|
164
167
|
saveTemplate
|
|
165
168
|
};
|