@codyswann/lisa 4.101.5 → 4.101.6
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 +12 -1
- 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/scripts/automation-run-record.mjs +678 -0
- package/plugins/lisa/.codex-plugin/scripts/blocker-edge-resolution.mjs +150 -0
- package/plugins/lisa/.codex-plugin/scripts/intake-blocker-reprobe.mjs +1379 -0
- package/plugins/lisa/.codex-plugin/scripts/intake-prework-denominator.mjs +249 -0
- package/plugins/lisa/.codex-plugin/scripts/operator-id-kinds.mjs +120 -0
- package/plugins/lisa/.codex-plugin/scripts/qa-signal-lifecycle.mjs +523 -0
- package/plugins/lisa/.codex-plugin/scripts/ready-queue-order.mjs +549 -0
- package/plugins/lisa/.codex-plugin/scripts/resolve-lifecycle-role.mjs +347 -0
- package/plugins/lisa-agy/plugin.json +1 -1
- 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-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- 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/scripts/generate-codex-plugin-artifacts.mjs +6 -0
- package/scripts/lib/codex-shared-scripts.mjs +156 -0
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Lifecycle-role resolution — the single resolver for every vendor.
|
|
4
|
+
*
|
|
5
|
+
* ## The defect this replaces
|
|
6
|
+
*
|
|
7
|
+
* Twelve skills inlined their own `read_role()` bash helper. Hashing the
|
|
8
|
+
* function bodies produced ELEVEN distinct implementations — only
|
|
9
|
+
* `lisa-linear-build-intake` and `lisa-linear-evidence` agreed. Copy-paste with
|
|
10
|
+
* no shared source is why the three vendors drifted apart on the same contract.
|
|
11
|
+
*
|
|
12
|
+
* The drift was not cosmetic. `lisa-linear-evidence` resolved
|
|
13
|
+
* `read_role review "In Review"` — a NON-EMPTY default — while
|
|
14
|
+
* `lisa-jira-evidence/scripts/post-evidence.sh` resolved the same role with
|
|
15
|
+
* `REVIEW=""` and an explicit skip branch. Same role, opposite behaviour, on the
|
|
16
|
+
* question of whether an unconfigured review step exists at all.
|
|
17
|
+
*
|
|
18
|
+
* ## R1 — absent means SKIP, never default
|
|
19
|
+
*
|
|
20
|
+
* `ready`, `claimed`, `blocked` and `done` are REQUIRED: a project that omits
|
|
21
|
+
* them is misconfigured and the caller should say so. `review` and the `qa.*`
|
|
22
|
+
* roles are OPTIONAL and have NO built-in default, so omitting one means the
|
|
23
|
+
* lifecycle skips that transition entirely.
|
|
24
|
+
*
|
|
25
|
+
* This is the difference between "not customized" and "we don't do this step",
|
|
26
|
+
* which a defaulting resolver cannot express. Measured downstream: a project
|
|
27
|
+
* deliberately bound no `review` role — a PR-open ticket was meant to stay in
|
|
28
|
+
* `claimed` until it reached an environment — and agents moved issues into a
|
|
29
|
+
* human-only review state anyway, because every layer that could have honoured
|
|
30
|
+
* the omission supplied a default instead.
|
|
31
|
+
*
|
|
32
|
+
* ## R2 — a fallback may inform a READ, never supply a WRITE target
|
|
33
|
+
*
|
|
34
|
+
* Linear states carry a machine-readable `type`, so a skill may fall back to
|
|
35
|
+
* resolving a role by type when the configured name is missing — the
|
|
36
|
+
* `config-resolution` rule permits this "but only to *read* … it must never
|
|
37
|
+
* invent a state to write into."
|
|
38
|
+
*
|
|
39
|
+
* Nothing enforced that sentence. The fallback selects the lowest-position
|
|
40
|
+
* `started` state, and on the board where this was measured the states ranked
|
|
41
|
+
* `blocked` (-1989.26), `claimed` (-1478.50), then two unbound human-only review
|
|
42
|
+
* states at -1209.69 and -1079.70. With `blocked` and `claimed` already taken,
|
|
43
|
+
* the fallback returned the first unbound one — precisely where two issues
|
|
44
|
+
* landed. Not fuzzy matching; position ordering, used for a write.
|
|
45
|
+
*
|
|
46
|
+
* `--intent=write` therefore refuses to return a fallback value and reports a
|
|
47
|
+
* setup defect instead. `--intent=read` may use one, and always reports which.
|
|
48
|
+
*
|
|
49
|
+
* ## Why a script rather than a shared bash snippet
|
|
50
|
+
*
|
|
51
|
+
* A snippet is copy-paste, which is the disease. Skills shell out to
|
|
52
|
+
* `${CLAUDE_PLUGIN_ROOT}/scripts/…` for exactly this reason elsewhere
|
|
53
|
+
* (`lifecycle-label-trust.mjs`, `automation-run-record.mjs`), and a real process
|
|
54
|
+
* boundary means the resolution can be unit-tested rather than re-read.
|
|
55
|
+
* @module scripts/resolve-lifecycle-role
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
import { readFileSync, realpathSync } from "node:fs";
|
|
59
|
+
import { fileURLToPath } from "node:url";
|
|
60
|
+
|
|
61
|
+
/** Config file consulted first; its keys override the committed file. */
|
|
62
|
+
export const LOCAL_CONFIG = ".lisa.config.local.json";
|
|
63
|
+
|
|
64
|
+
/** The committed config file. */
|
|
65
|
+
export const GLOBAL_CONFIG = ".lisa.config.json";
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Roles a project MUST bind. Omitting one is a setup defect, not a policy
|
|
69
|
+
* choice — there is no coherent lifecycle without a ready lane, a claimed lane,
|
|
70
|
+
* a blocked lane and a terminal.
|
|
71
|
+
*/
|
|
72
|
+
export const REQUIRED_ROLES = Object.freeze([
|
|
73
|
+
"ready",
|
|
74
|
+
"claimed",
|
|
75
|
+
"blocked",
|
|
76
|
+
"done",
|
|
77
|
+
]);
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Roles a project MAY bind. Omitting one means the lifecycle skips that
|
|
81
|
+
* transition. These have NO built-in default — that is the whole point of R1.
|
|
82
|
+
*/
|
|
83
|
+
export const OPTIONAL_ROLES = Object.freeze(["review", "human_needed"]);
|
|
84
|
+
|
|
85
|
+
/** Where each vendor keeps its build lifecycle role map. */
|
|
86
|
+
export const VENDOR_ROOTS = Object.freeze({
|
|
87
|
+
jira: "jira.workflow",
|
|
88
|
+
linear: "linear.workflow",
|
|
89
|
+
github: "github.labels.build",
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
/** GitHub's PRD lifecycle is a separate required role map from build work. */
|
|
93
|
+
const GITHUB_PRD_PREFIX = "prd.";
|
|
94
|
+
|
|
95
|
+
/** Resolution outcomes, reported so a caller never has to guess what happened. */
|
|
96
|
+
export const OUTCOMES = Object.freeze({
|
|
97
|
+
CONFIGURED: "configured",
|
|
98
|
+
UNSET_OPTIONAL: "unset-optional",
|
|
99
|
+
UNSET_REQUIRED: "unset-required",
|
|
100
|
+
FALLBACK_REFUSED: "fallback-refused-for-write",
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Read a dotted path out of a parsed config object.
|
|
105
|
+
*
|
|
106
|
+
* @param {unknown} source parsed config
|
|
107
|
+
* @param {string} path dotted key path, e.g. `linear.workflow.review`
|
|
108
|
+
* @returns {unknown} the value, or undefined when any segment is missing
|
|
109
|
+
*/
|
|
110
|
+
export const readPath = (source, path) => {
|
|
111
|
+
let cursor = source;
|
|
112
|
+
for (const segment of path.split(".")) {
|
|
113
|
+
if (cursor === null || typeof cursor !== "object" || !(segment in cursor))
|
|
114
|
+
return undefined;
|
|
115
|
+
cursor = cursor[segment];
|
|
116
|
+
}
|
|
117
|
+
return cursor;
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Parse a config file, treating an unreadable or malformed file as absent.
|
|
122
|
+
*
|
|
123
|
+
* A malformed local override must not silently mask the committed file, so the
|
|
124
|
+
* caller is told which files actually parsed via the returned `sources`.
|
|
125
|
+
*
|
|
126
|
+
* @param {string} file path to read
|
|
127
|
+
* @returns {{ value: object | undefined, error: string | undefined }} parse result
|
|
128
|
+
*/
|
|
129
|
+
export const parseConfig = file => {
|
|
130
|
+
let raw;
|
|
131
|
+
try {
|
|
132
|
+
raw = readFileSync(file, "utf8");
|
|
133
|
+
} catch {
|
|
134
|
+
return { value: undefined, error: undefined };
|
|
135
|
+
}
|
|
136
|
+
try {
|
|
137
|
+
return { value: JSON.parse(raw), error: undefined };
|
|
138
|
+
} catch (cause) {
|
|
139
|
+
return {
|
|
140
|
+
value: undefined,
|
|
141
|
+
error: `${file} is not valid JSON: ${cause.message}`,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Resolve one lifecycle role for one vendor.
|
|
148
|
+
*
|
|
149
|
+
* Resolution order is local config → global config → (nothing). There is no
|
|
150
|
+
* built-in default tier: see R1 in the module docblock.
|
|
151
|
+
*
|
|
152
|
+
* @param {object} options resolution inputs
|
|
153
|
+
* @param {string} options.role role name (`ready`, `review`, `human_needed`, …)
|
|
154
|
+
* @param {string} options.vendor one of `jira` | `linear` | `github`
|
|
155
|
+
* @param {"read" | "write"} [options.intent] what the caller will do with it
|
|
156
|
+
* @param {string} [options.env] env key when resolving the env-keyed `done` map
|
|
157
|
+
* @param {object} [options.local] pre-parsed local config (tests)
|
|
158
|
+
* @param {object} [options.global] pre-parsed global config (tests)
|
|
159
|
+
* @param {string} [options.fallback] a value a vendor fallback would supply
|
|
160
|
+
* @returns {{ value: string, outcome: string, source: string, message: string }} resolution
|
|
161
|
+
*/
|
|
162
|
+
export const resolveRole = ({
|
|
163
|
+
role,
|
|
164
|
+
vendor,
|
|
165
|
+
intent = "read",
|
|
166
|
+
env,
|
|
167
|
+
local,
|
|
168
|
+
global: globalConfig,
|
|
169
|
+
fallback,
|
|
170
|
+
}) => {
|
|
171
|
+
let root = VENDOR_ROOTS[vendor];
|
|
172
|
+
let configuredRole = role;
|
|
173
|
+
if (vendor === "github" && role.startsWith(GITHUB_PRD_PREFIX)) {
|
|
174
|
+
root = "github.labels.prd";
|
|
175
|
+
configuredRole = role.slice(GITHUB_PRD_PREFIX.length);
|
|
176
|
+
}
|
|
177
|
+
if (!root) {
|
|
178
|
+
return {
|
|
179
|
+
value: "",
|
|
180
|
+
outcome: OUTCOMES.UNSET_REQUIRED,
|
|
181
|
+
source: "none",
|
|
182
|
+
message: `Unknown vendor '${vendor}'. Expected one of: ${Object.keys(VENDOR_ROOTS).join(", ")}.`,
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// `done` is env-keyed on every vendor; an env selects one rung of the map.
|
|
187
|
+
const path =
|
|
188
|
+
env && configuredRole === "done"
|
|
189
|
+
? `${root}.done.${env}`
|
|
190
|
+
: `${root}.${configuredRole}`;
|
|
191
|
+
|
|
192
|
+
for (const [label, source] of [
|
|
193
|
+
["local", local],
|
|
194
|
+
["global", globalConfig],
|
|
195
|
+
]) {
|
|
196
|
+
const found = readPath(source, path);
|
|
197
|
+
if (typeof found === "string" && found.length > 0) {
|
|
198
|
+
return {
|
|
199
|
+
value: found,
|
|
200
|
+
outcome: OUTCOMES.CONFIGURED,
|
|
201
|
+
source: label,
|
|
202
|
+
message: `${path} = ${found} (from ${label} config)`,
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
const optional =
|
|
208
|
+
!role.startsWith(GITHUB_PRD_PREFIX) &&
|
|
209
|
+
OPTIONAL_ROLES.includes(configuredRole);
|
|
210
|
+
|
|
211
|
+
// R2 — a fallback may inform a read, never supply a write target.
|
|
212
|
+
if (fallback && intent === "write") {
|
|
213
|
+
return {
|
|
214
|
+
value: "",
|
|
215
|
+
outcome: OUTCOMES.FALLBACK_REFUSED,
|
|
216
|
+
source: "none",
|
|
217
|
+
message:
|
|
218
|
+
`Refusing to write to '${fallback}': it was derived by fallback, not named at ${path}. ` +
|
|
219
|
+
`A fallback may inform a read but must never supply a write target (config-resolution). ` +
|
|
220
|
+
`Bind ${path} explicitly, or run /lisa:setup:${vendor}.`,
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
if (fallback) {
|
|
224
|
+
return {
|
|
225
|
+
value: fallback,
|
|
226
|
+
outcome: OUTCOMES.CONFIGURED,
|
|
227
|
+
source: "fallback",
|
|
228
|
+
message: `${path} is unset; using fallback '${fallback}' for a READ only.`,
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
if (optional) {
|
|
233
|
+
return {
|
|
234
|
+
value: "",
|
|
235
|
+
outcome: OUTCOMES.UNSET_OPTIONAL,
|
|
236
|
+
source: "none",
|
|
237
|
+
message:
|
|
238
|
+
`No ${path} configured; skipping the ${role} transition. ` +
|
|
239
|
+
`This is a supported configuration, not an error — the item stays in its current role.`,
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
return {
|
|
244
|
+
value: "",
|
|
245
|
+
outcome: OUTCOMES.UNSET_REQUIRED,
|
|
246
|
+
source: "none",
|
|
247
|
+
message: `Required role '${role}' is not configured at ${path}. Run /lisa:setup:${vendor}.`,
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Parse `--key=value` / `--key value` argv into a plain object.
|
|
253
|
+
*
|
|
254
|
+
* @param {string[]} argv raw arguments
|
|
255
|
+
* @returns {Record<string, string>} parsed flags
|
|
256
|
+
*/
|
|
257
|
+
export const parseArgs = argv => {
|
|
258
|
+
const out = {};
|
|
259
|
+
for (let index = 0; index < argv.length; index += 1) {
|
|
260
|
+
const token = argv[index];
|
|
261
|
+
if (!token.startsWith("--")) continue;
|
|
262
|
+
const [key, inline] = token.slice(2).split("=");
|
|
263
|
+
if (inline !== undefined) {
|
|
264
|
+
out[key] = inline;
|
|
265
|
+
continue;
|
|
266
|
+
}
|
|
267
|
+
const next = argv[index + 1];
|
|
268
|
+
if (next && !next.startsWith("--")) {
|
|
269
|
+
out[key] = next;
|
|
270
|
+
index += 1;
|
|
271
|
+
} else {
|
|
272
|
+
out[key] = "true";
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return out;
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* CLI entry point.
|
|
280
|
+
*
|
|
281
|
+
* Exit codes are the contract callers branch on:
|
|
282
|
+
* - `0` with a value on stdout — the role is configured (or a read fallback).
|
|
283
|
+
* - `0` with EMPTY stdout — an optional role is unset; skip the transition.
|
|
284
|
+
* - `2` — a required role is unset, or a write was refused a fallback value.
|
|
285
|
+
*
|
|
286
|
+
* The distinction between the two `0` cases is deliberate: an unset optional
|
|
287
|
+
* role is a supported configuration, so it must not look like a failure.
|
|
288
|
+
*
|
|
289
|
+
* @param {string[]} argv arguments after the script name
|
|
290
|
+
* @returns {number} process exit code
|
|
291
|
+
*/
|
|
292
|
+
export const main = argv => {
|
|
293
|
+
const args = parseArgs(argv);
|
|
294
|
+
if (!args.role || !args.vendor) {
|
|
295
|
+
process.stderr.write(
|
|
296
|
+
"usage: resolve-lifecycle-role.mjs --role <name> --vendor <jira|linear|github> " +
|
|
297
|
+
"[--intent read|write] [--env dev|staging|production] [--fallback <name>]\n"
|
|
298
|
+
);
|
|
299
|
+
return 2;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const local = parseConfig(args.local ?? LOCAL_CONFIG);
|
|
303
|
+
const globalConfig = parseConfig(args.config ?? GLOBAL_CONFIG);
|
|
304
|
+
for (const parsed of [local, globalConfig]) {
|
|
305
|
+
if (parsed.error) {
|
|
306
|
+
process.stderr.write(`${parsed.error}\n`);
|
|
307
|
+
return 2;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
const result = resolveRole({
|
|
312
|
+
role: args.role,
|
|
313
|
+
vendor: args.vendor,
|
|
314
|
+
intent: args.intent ?? "read",
|
|
315
|
+
env: args.env,
|
|
316
|
+
fallback: args.fallback,
|
|
317
|
+
local: local.value,
|
|
318
|
+
global: globalConfig.value,
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
if (args.json === "true") {
|
|
322
|
+
process.stdout.write(`${JSON.stringify(result)}\n`);
|
|
323
|
+
} else if (result.value) {
|
|
324
|
+
process.stdout.write(`${result.value}\n`);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
if (result.outcome === OUTCOMES.CONFIGURED) return 0;
|
|
328
|
+
if (result.outcome === OUTCOMES.UNSET_OPTIONAL) {
|
|
329
|
+
process.stderr.write(`${result.message}\n`);
|
|
330
|
+
return 0;
|
|
331
|
+
}
|
|
332
|
+
process.stderr.write(`${result.message}\n`);
|
|
333
|
+
return 2;
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
const invokedDirectly = (() => {
|
|
337
|
+
try {
|
|
338
|
+
return (
|
|
339
|
+
realpathSync(process.argv[1] ?? "") ===
|
|
340
|
+
realpathSync(fileURLToPath(import.meta.url))
|
|
341
|
+
);
|
|
342
|
+
} catch {
|
|
343
|
+
return false;
|
|
344
|
+
}
|
|
345
|
+
})();
|
|
346
|
+
|
|
347
|
+
if (invokedDirectly) process.exit(main(process.argv.slice(2)));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lisa-openclaw",
|
|
3
|
-
"version": "4.101.
|
|
3
|
+
"version": "4.101.6",
|
|
4
4
|
"description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Cody Swann"
|