muuuuse 3.1.1 → 3.3.2
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/README.md +13 -11
- package/package.json +2 -2
- package/src/cli.js +90 -82
- package/src/runtime.js +201 -451
- package/src/util.js +18 -28
package/src/util.js
CHANGED
|
@@ -175,18 +175,6 @@ function normalizeSeatId(value) {
|
|
|
175
175
|
return seatId;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
function isAnchorSeat(seatId) {
|
|
179
|
-
return normalizeSeatId(seatId) % 2 === 1;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
function getPartnerSeatId(seatId) {
|
|
183
|
-
const normalized = normalizeSeatId(seatId);
|
|
184
|
-
if (!normalized) {
|
|
185
|
-
return null;
|
|
186
|
-
}
|
|
187
|
-
return isAnchorSeat(normalized) ? normalized + 1 : normalized - 1;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
178
|
function listSeatIds(sessionName) {
|
|
191
179
|
const sessionDir = getSessionDir(sessionName);
|
|
192
180
|
try {
|
|
@@ -282,30 +270,34 @@ function listSessionNames() {
|
|
|
282
270
|
|
|
283
271
|
function usage() {
|
|
284
272
|
return [
|
|
285
|
-
`${BRAND} arms regular terminals
|
|
273
|
+
`${BRAND} arms regular terminals and relays assistant output across signed terminal links.`,
|
|
286
274
|
"",
|
|
287
275
|
"Usage:",
|
|
288
|
-
" muuuuse",
|
|
289
276
|
" muuuuse 1",
|
|
290
|
-
" muuuuse 1
|
|
291
|
-
" muuuuse 1
|
|
292
|
-
" muuuuse 1
|
|
277
|
+
" muuuuse 1 flow on",
|
|
278
|
+
" muuuuse 1 flow off",
|
|
279
|
+
" muuuuse 1 flow on continue 3",
|
|
280
|
+
" muuuuse 1 link 2 flow on 3 flow off 5 flow off",
|
|
293
281
|
" muuuuse 2",
|
|
282
|
+
" muuuuse 2 flow on",
|
|
283
|
+
" muuuuse 2 flow off",
|
|
284
|
+
" muuuuse 2 flow on continue 3",
|
|
285
|
+
" muuuuse 2 link 3 flow off",
|
|
294
286
|
" muuuuse 3",
|
|
295
287
|
" muuuuse 4",
|
|
296
|
-
" muuuuse 4
|
|
288
|
+
" muuuuse 4 flow on continue 1",
|
|
297
289
|
" muuuuse stop",
|
|
298
290
|
" muuuuse status",
|
|
299
291
|
"",
|
|
300
292
|
"Flow:",
|
|
301
|
-
" 1. Run `muuuuse
|
|
302
|
-
" 2.
|
|
303
|
-
" 3.
|
|
304
|
-
" 4.
|
|
305
|
-
" 5.
|
|
306
|
-
" 6.
|
|
307
|
-
" 7.
|
|
308
|
-
" 8.
|
|
293
|
+
" 1. Run `muuuuse <seat>` in the terminal you want to arm.",
|
|
294
|
+
" 2. All armed seats in the same cwd join one relay graph.",
|
|
295
|
+
" 3. Use `link <seat> flow on|off ...` to define each outbound relay edge.",
|
|
296
|
+
" 4. `flow on` sends commentary and final answers on that edge. `flow off` sends final answers only.",
|
|
297
|
+
" 5. `continue <seat>` is shorthand for one outbound link that uses the seat's default `flow on|off`.",
|
|
298
|
+
" 6. Every forwarded relay is signed with the sender seat's key.",
|
|
299
|
+
" 7. A seat only accepts signed inbound relays when the sender linked to that seat.",
|
|
300
|
+
" 8. Use those armed shells normally.",
|
|
309
301
|
" 9. Run `muuuuse status` or `muuuuse stop` from any shell.",
|
|
310
302
|
"",
|
|
311
303
|
"Notes:",
|
|
@@ -323,9 +315,7 @@ module.exports = {
|
|
|
323
315
|
ensureDir,
|
|
324
316
|
getDefaultSessionName,
|
|
325
317
|
getFileSize,
|
|
326
|
-
getPartnerSeatId,
|
|
327
318
|
loadOrCreateSeatIdentity,
|
|
328
|
-
isAnchorSeat,
|
|
329
319
|
getSeatPaths,
|
|
330
320
|
getSessionPaths,
|
|
331
321
|
getStateRoot,
|