@codyswann/lisa 4.103.12 → 4.103.13
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/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +16 -4
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/package.json +4 -4
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/SKILL.md +13 -0
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-status.mjs +39 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/cli-usage.mjs +10 -6
- package/plugins/lisa/.codex-plugin/skills/lisa-session-manager/scripts/launch.mjs +20 -0
- package/plugins/lisa/skills/lisa-session-manager/SKILL.md +13 -0
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-status.mjs +39 -3
- package/plugins/lisa/skills/lisa-session-manager/scripts/cli-usage.mjs +10 -6
- package/plugins/lisa/skills/lisa-session-manager/scripts/launch.mjs +20 -0
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-session-manager/SKILL.md +13 -0
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-status.mjs +39 -3
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/cli-usage.mjs +10 -6
- package/plugins/lisa-agy/skills/lisa-session-manager/scripts/launch.mjs +20 -0
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/skills/lisa-session-manager/SKILL.md +13 -0
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-status.mjs +39 -3
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/cli-usage.mjs +10 -6
- package/plugins/lisa-copilot/skills/lisa-session-manager/scripts/launch.mjs +20 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/skills/lisa-session-manager/SKILL.md +13 -0
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-status.mjs +39 -3
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/cli-usage.mjs +10 -6
- package/plugins/lisa-cursor/skills/lisa-session-manager/scripts/launch.mjs +20 -0
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/skills/lisa-session-manager/SKILL.md +13 -0
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-status.mjs +39 -3
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/cli-usage.mjs +10 -6
- package/plugins/lisa-devin/skills/lisa-session-manager/scripts/launch.mjs +20 -0
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/skills/lisa-session-manager/SKILL.md +13 -0
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-status.mjs +39 -3
- package/plugins/src/base/skills/lisa-session-manager/scripts/cli-usage.mjs +10 -6
- package/plugins/src/base/skills/lisa-session-manager/scripts/launch.mjs +20 -0
|
@@ -360,6 +360,19 @@ Do these steps in order. Start each cycle by resolving `$SM`, then confirm the s
|
|
|
360
360
|
and check again; never run a cycle from a child repo. Handle any messages that arrived since the last
|
|
361
361
|
cycle first (above).
|
|
362
362
|
|
|
363
|
+
**Duplicate-manager check.** Decide **who** the manager is only from `status` `manager.self`; check
|
|
364
|
+
this session's own loops with `CronList`. When `manager.self` is true, this session **is** the
|
|
365
|
+
manager and its own `/loop` is the manager's loop: never report it as a second manager, and never
|
|
366
|
+
recommend `CronDelete` or stopping it. When `manager.self` is `null`, recommend stopping nothing;
|
|
367
|
+
report that self-identification failed. When `manager.running` is true, `manager.self` is false, and
|
|
368
|
+
this session runs its own `/lisa:session-manager cycle` loop, two managers can hand out the same
|
|
369
|
+
item: warn the operator and recommend stopping **this** session's loop, never the tmux manager. The
|
|
370
|
+
tmux manager cannot see another session's loop, so that warning comes from the other session's own
|
|
371
|
+
cycle and the manager must not invent one (detecting it from inside the manager is follow-up work).
|
|
372
|
+
`manager.self` means running inside the manager's tmux session, so another Claude started in a
|
|
373
|
+
second window of that same tmux session also reads true. Never infer a second manager from the tmux
|
|
374
|
+
session existing plus a loop being present.
|
|
375
|
+
|
|
363
376
|
### 1. Reconcile
|
|
364
377
|
|
|
365
378
|
**Unsent questions** (only when `notify` is `telegram`). `ledger get` shows every pending question.
|
|
@@ -10,7 +10,7 @@ import path from "node:path";
|
|
|
10
10
|
|
|
11
11
|
import { listAgents, requireConfig, run } from "./cli-runtime.mjs";
|
|
12
12
|
import { notifyProvider } from "./config.mjs";
|
|
13
|
-
import { buildHasSession } from "./launch.mjs";
|
|
13
|
+
import { buildCurrentSessionName, buildHasSession } from "./launch.mjs";
|
|
14
14
|
import { listPendingQuestions } from "./ledger-questions.mjs";
|
|
15
15
|
import { readLedger } from "./ledger.mjs";
|
|
16
16
|
import { shellQuote } from "./token.mjs";
|
|
@@ -29,12 +29,44 @@ function answerCommandFor(ctx, ref) {
|
|
|
29
29
|
return `node ${shellQuote(script)} answer ${shellQuote(ref)} --project-root ${shellQuote(ctx.root)} < answer.txt`;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* Whether the caller of `status` IS the manager: it runs inside tmux and
|
|
34
|
+
* tmux names the caller's own session as the manager's (#4496). Without this
|
|
35
|
+
* a cycle running in the manager's session saw "the tmux manager is running"
|
|
36
|
+
* plus its own `/loop` and reported itself as a second manager.
|
|
37
|
+
*
|
|
38
|
+
* "Self" means running inside the manager's tmux session, so a second Claude
|
|
39
|
+
* started in another window of that same session also reads true.
|
|
40
|
+
*
|
|
41
|
+
* Fail-safe, not fail-false: `false` only when there is no `$TMUX` or tmux
|
|
42
|
+
* names a different session. Inside tmux, `null` (unknown) when
|
|
43
|
+
* `$TMUX_PANE` is not a pane id (tmux is then not asked: untargeted, it
|
|
44
|
+
* answers for its most recently active client, which can be another
|
|
45
|
+
* session), or when the probe fails or names no session, because `false`
|
|
46
|
+
* there would tell the manager to stop its own loop. Nothing here throws.
|
|
47
|
+
* @param {{ env: Record<string, string | undefined> }} ctx - CLI context
|
|
48
|
+
* @param {string} name - Manager session name
|
|
49
|
+
* @returns {boolean | null} True for the manager's own session, false for
|
|
50
|
+
* another session or none, null when tmux cannot say which it is
|
|
51
|
+
*/
|
|
52
|
+
function isManagerSelf(ctx, name) {
|
|
53
|
+
if (!ctx.env.TMUX) return false;
|
|
54
|
+
const argv = buildCurrentSessionName(ctx.env.TMUX_PANE);
|
|
55
|
+
if (argv === null) return null;
|
|
56
|
+
const probe = run("tmux", argv, { env: ctx.env });
|
|
57
|
+
const current = probe.status === 0 ? probe.stdout.trim() : "";
|
|
58
|
+
if (current === "") return null;
|
|
59
|
+
return current === name;
|
|
60
|
+
}
|
|
61
|
+
|
|
32
62
|
/**
|
|
33
63
|
* `status`: is the manager's tmux session up, and what does the ledger say
|
|
34
64
|
* about each worker it dispatched.
|
|
35
65
|
* @param {object} ctx - CLI context
|
|
36
66
|
* `notify` is the configured notification provider (`telegram` or `none`),
|
|
37
|
-
* so the manager knows each cycle whether a channel exists.
|
|
67
|
+
* so the manager knows each cycle whether a channel exists. `manager.self`
|
|
68
|
+
* (`true|false|null`) says whether the caller runs inside that tmux session
|
|
69
|
+
* (see {@link isManagerSelf}).
|
|
38
70
|
* @returns {Promise<{ json: object }>}
|
|
39
71
|
* `{manager,notify,control,workers,untracked,pendingQuestions}`
|
|
40
72
|
*/
|
|
@@ -49,7 +81,11 @@ export async function status(ctx) {
|
|
|
49
81
|
const tracked = new Set(Object.values(ledger.items).map(i => i.worker));
|
|
50
82
|
return {
|
|
51
83
|
json: {
|
|
52
|
-
manager: {
|
|
84
|
+
manager: {
|
|
85
|
+
name: config.name,
|
|
86
|
+
running: tmux.status === 0,
|
|
87
|
+
self: isManagerSelf(ctx, config.name),
|
|
88
|
+
},
|
|
53
89
|
notify: notifyProvider(config),
|
|
54
90
|
control: ledger.control,
|
|
55
91
|
workers: Object.entries(ledger.items).map(([ref, item]) => ({
|
|
@@ -47,12 +47,16 @@ Workers and capacity
|
|
|
47
47
|
pendingQuestion}], classification one of finished|waiting|requestion|
|
|
48
48
|
working|stalled|dead|exhausted.
|
|
49
49
|
status
|
|
50
|
-
stdout {manager:{name,running},notify,control,workers:[{ref,
|
|
51
|
-
sessionId,repo,status,attempts,pendingQuestion,live}],untracked:
|
|
52
|
-
names],pendingQuestions:[{ref,kind,text,askedAt,marked,
|
|
53
|
-
answerCommand}]}.
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
stdout {manager:{name,running,self},notify,control,workers:[{ref,
|
|
51
|
+
worker,sessionId,repo,status,attempts,pendingQuestion,live}],untracked:
|
|
52
|
+
[wk-names],pendingQuestions:[{ref,kind,text,askedAt,marked,
|
|
53
|
+
answerQueued,answerCommand}]}. manager.self is true when the caller
|
|
54
|
+
runs inside the manager's tmux session (any window of it), false
|
|
55
|
+
outside tmux or in another session, null when tmux cannot say which
|
|
56
|
+
session the caller is in or $TMUX_PANE is not a pane id. notify is
|
|
57
|
+
the configured channel: "telegram" or "none". pendingQuestions lists
|
|
58
|
+
every item waiting on a human, oldest first; answerCommand is the
|
|
59
|
+
answer line to run at this machine.
|
|
56
60
|
|
|
57
61
|
Manager
|
|
58
62
|
start [--settle-ms <n>]
|
|
@@ -232,6 +232,26 @@ export function buildSessionPath(name) {
|
|
|
232
232
|
];
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
+
/** A tmux pane id as tmux sets `$TMUX_PANE`: `%` then digits. */
|
|
236
|
+
const PANE_ID_PATTERN = /^%\d+$/;
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* tmux argv that prints the name of the session the CALLER runs in, so
|
|
240
|
+
* `status` can tell the manager asking about itself from another session
|
|
241
|
+
* asking about the manager (#4496). The target is always the caller's own
|
|
242
|
+
* `$TMUX_PANE`. Without `-t`, tmux answers for its "best" client (the most
|
|
243
|
+
* recently active one), which can be a different session, so there is no
|
|
244
|
+
* untargeted form: with no real pane id this returns null and the caller
|
|
245
|
+
* must treat the answer as unknown.
|
|
246
|
+
* @param {string | undefined} pane - The caller's `$TMUX_PANE`, if any
|
|
247
|
+
* @returns {string[] | null} argv for `spawnSync("tmux", argv)`, or null
|
|
248
|
+
* when `pane` is not a pane id
|
|
249
|
+
*/
|
|
250
|
+
export function buildCurrentSessionName(pane) {
|
|
251
|
+
if (typeof pane !== "string" || !PANE_ID_PATTERN.test(pane)) return null;
|
|
252
|
+
return ["display-message", "-p", "-t", pane, "#{session_name}"];
|
|
253
|
+
}
|
|
254
|
+
|
|
235
255
|
/**
|
|
236
256
|
* tmux argv that stops the manager session and nothing else (exact name, see
|
|
237
257
|
* {@link buildHasSession}). Workers are separate background sessions and keep
|