cli-jaw 2.4.3 → 2.4.4
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.
|
@@ -84,7 +84,11 @@ export async function handleDashboardChat(argvFromSwitch) {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
catch (err) {
|
|
87
|
-
|
|
87
|
+
const msg = err.message;
|
|
88
|
+
console.error(` ${msg}`);
|
|
89
|
+
if (msg.includes('unreachable')) {
|
|
90
|
+
console.error(` Tip: for local-instance search, use: jaw chat search "<query>" --all-sessions`);
|
|
91
|
+
}
|
|
88
92
|
process.exit(1);
|
|
89
93
|
}
|
|
90
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-chat.js","sourceRoot":"","sources":["../../../bin/commands/dashboard-chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,aAAa,IAAI,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC1G,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEpF,sFAAsF;AACtF,yFAAyF;AACzF,0EAA0E;AAC1E,MAAM,CAAC,MAAM,cAAc,GAAG,uBAAuB,CAAC;AACtD,MAAM,KAAK,GAAG,gBAAgB,CAAC;AAE/B,KAAK,UAAU,aAAa,CAAI,IAAY;IACxC,OAAO,gBAAgB,CAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;AACjF,CAAC;AAoBD,SAAS,gBAAgB,CAAC,IAAwB;IAC9C,OAAO,qBAAqB,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;QACrC,MAAM,KAAK,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC,EAAE,CAA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Aa,CAAC,OAAO,CAAC;QACnC,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,EAAE,CAAC,CAAC;QAC1B,IAAI,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;YAC9B,OAAO,CAAC,KAAK,CAAC,iFAAiF,CAAC,CAAC;QACrG,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cli-jaw",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
4
4
|
"description": "Personal AI assistant powered by Pi, Antigravity, AI-E, Claude, Claude E, Codex, Codex App, Cursor, Grok, Kiro, OpenCode, and Copilot — Web, Terminal, Telegram, and Discord interfaces with 107 built-in skills",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -51,10 +51,11 @@ git worktree add -b "$PROMOTION_BRANCH" "$WORKTREE" "$PREVIEW_SHA"
|
|
|
51
51
|
|
|
52
52
|
(
|
|
53
53
|
cd "$WORKTREE"
|
|
54
|
+
npm ci --ignore-scripts
|
|
54
55
|
npm version "$STABLE_VERSION" --no-git-tag-version --allow-same-version
|
|
55
56
|
node scripts/sync-electron-version.cjs
|
|
56
57
|
npm run gate:all
|
|
57
|
-
node scripts/require-release-evidence.mjs
|
|
58
|
+
node scripts/require-release-evidence.mjs --accept-ci-evidence
|
|
58
59
|
git add package.json package-lock.json electron/package.json electron/package-lock.json
|
|
59
60
|
git commit -m "chore: promote v$STABLE_VERSION"
|
|
60
61
|
git push --set-upstream origin "$PROMOTION_BRANCH"
|
|
@@ -214,7 +214,7 @@ else
|
|
|
214
214
|
git push origin HEAD:preview
|
|
215
215
|
fi
|
|
216
216
|
|
|
217
|
-
# ───
|
|
217
|
+
# ─── Wait for release CI, then dispatch publish ────────
|
|
218
218
|
RELEASE_SHA="$(git rev-parse HEAD)"
|
|
219
219
|
LIVE_SHA="$(git ls-remote origin refs/heads/preview | cut -f1)"
|
|
220
220
|
|
|
@@ -223,6 +223,145 @@ if [ -z "$LIVE_SHA" ] || [ "$LIVE_SHA" != "$RELEASE_SHA" ]; then
|
|
|
223
223
|
exit 1
|
|
224
224
|
fi
|
|
225
225
|
|
|
226
|
+
# Printed on every path that gives up before dispatching, so the operator can
|
|
227
|
+
# resume the release without reconstructing the command from the workflow file.
|
|
228
|
+
publish_dispatch_hint() {
|
|
229
|
+
echo ""
|
|
230
|
+
echo "Resume once the required runs are green:"
|
|
231
|
+
echo " gh workflow run publish.yml --ref preview \\"
|
|
232
|
+
echo " -f version=\"$VERSION\" -f tag=preview -f expected-sha=\"$RELEASE_SHA\" -f dry-run=false"
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
# publish.yml refuses to publish without a SUCCESSFUL PUSH run of test.yml for
|
|
236
|
+
# this exact SHA -- and, when the installer surface changed, of
|
|
237
|
+
# postinstall-platform.yml too. The push above is seconds old, so dispatching
|
|
238
|
+
# immediately made the first attempt of every preview release fail by
|
|
239
|
+
# construction: v2.4.0-preview (18e6337) needed three dispatches, 10:29:13
|
|
240
|
+
# (Tests still running), 10:37:23 (Postinstall still running), 10:38:29 (green).
|
|
241
|
+
# So wait for the evidence first, exactly as promote-to-main.sh already does for
|
|
242
|
+
# the merged main SHA on the stable path.
|
|
243
|
+
|
|
244
|
+
# publish.yml derives its range on a fetch-depth: 0 checkout and therefore sees
|
|
245
|
+
# every tag. Match that view before deciding below, or a checkout missing the
|
|
246
|
+
# newest stable tag answers a different question than the gate will.
|
|
247
|
+
git fetch origin --tags --quiet || echo "⚠️ Could not refresh tags; using the local tag list."
|
|
248
|
+
|
|
249
|
+
# postinstall-platform.yml carries `paths:` filters, so for a SHA that touches
|
|
250
|
+
# no installer-sensitive path it never runs at all and waiting for it would burn
|
|
251
|
+
# the whole deadline on a run that will never exist. publish.yml decides with
|
|
252
|
+
# `require-release-evidence.mjs --changed-files-stdin` over the diff since the
|
|
253
|
+
# last stable tag merged into the release SHA, so ask the same detector the same
|
|
254
|
+
# question over the same range rather than guessing.
|
|
255
|
+
PLATFORM_REQUIRED=false
|
|
256
|
+
PREVIOUS_STABLE_TAG="$(git tag --merged "$RELEASE_SHA" --sort=-v:refname \
|
|
257
|
+
| grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | head -1 || true)"
|
|
258
|
+
if [ -z "$PREVIOUS_STABLE_TAG" ]; then
|
|
259
|
+
echo "ℹ️ No previous stable v* tag; publish.yml treats this as a first release and skips the platform gate."
|
|
260
|
+
else
|
|
261
|
+
CHANGED_FILES="$(mktemp)"
|
|
262
|
+
git diff --name-only "$PREVIOUS_STABLE_TAG..$RELEASE_SHA" > "$CHANGED_FILES"
|
|
263
|
+
DETECTOR_STATUS=0
|
|
264
|
+
node scripts/require-release-evidence.mjs --changed-files-stdin < "$CHANGED_FILES" || DETECTOR_STATUS=$?
|
|
265
|
+
rm -f "$CHANGED_FILES"
|
|
266
|
+
case "$DETECTOR_STATUS" in
|
|
267
|
+
0)
|
|
268
|
+
echo "ℹ️ No installer-sensitive changes since $PREVIOUS_STABLE_TAG; platform checks are not required."
|
|
269
|
+
;;
|
|
270
|
+
1)
|
|
271
|
+
PLATFORM_REQUIRED=true
|
|
272
|
+
;;
|
|
273
|
+
3)
|
|
274
|
+
echo "ℹ️ Changed files are release-driver extras only; platform checks are not required."
|
|
275
|
+
;;
|
|
276
|
+
*)
|
|
277
|
+
echo "ERROR: installer-sensitive path detector failed with status $DETECTOR_STATUS" >&2
|
|
278
|
+
publish_dispatch_hint
|
|
279
|
+
exit "$DETECTOR_STATUS"
|
|
280
|
+
;;
|
|
281
|
+
esac
|
|
282
|
+
fi
|
|
283
|
+
|
|
284
|
+
echo "⏳ Waiting for preview Tests on $RELEASE_SHA..."
|
|
285
|
+
deadline=$((SECONDS + 1200))
|
|
286
|
+
PREVIEW_TESTS_URL=""
|
|
287
|
+
while [ "$SECONDS" -lt "$deadline" ]; do
|
|
288
|
+
PREVIEW_TESTS_URL="$(gh run list \
|
|
289
|
+
--workflow test.yml \
|
|
290
|
+
--branch preview \
|
|
291
|
+
--commit "$RELEASE_SHA" \
|
|
292
|
+
--event push \
|
|
293
|
+
--status success \
|
|
294
|
+
--limit 1 --json url --jq '.[0].url // ""')"
|
|
295
|
+
[ -n "$PREVIEW_TESTS_URL" ] && break
|
|
296
|
+
# An empty result also covers "GitHub has not materialised the run yet", which
|
|
297
|
+
# is the normal state for the first seconds after a push, so keep polling.
|
|
298
|
+
failed="$(gh run list \
|
|
299
|
+
--workflow test.yml \
|
|
300
|
+
--branch preview \
|
|
301
|
+
--commit "$RELEASE_SHA" \
|
|
302
|
+
--event push \
|
|
303
|
+
--status completed \
|
|
304
|
+
--limit 1 --json conclusion --jq '.[0].conclusion // ""')"
|
|
305
|
+
case "$failed" in
|
|
306
|
+
failure|cancelled|timed_out|startup_failure|action_required)
|
|
307
|
+
echo "ERROR: preview Tests completed with $failed" >&2
|
|
308
|
+
publish_dispatch_hint
|
|
309
|
+
exit 1
|
|
310
|
+
;;
|
|
311
|
+
esac
|
|
312
|
+
sleep 10
|
|
313
|
+
done
|
|
314
|
+
if [ -z "$PREVIEW_TESTS_URL" ]; then
|
|
315
|
+
echo "ERROR: timed out waiting for successful preview Tests" >&2
|
|
316
|
+
publish_dispatch_hint
|
|
317
|
+
exit 1
|
|
318
|
+
fi
|
|
319
|
+
echo "✅ Tests: $PREVIEW_TESTS_URL"
|
|
320
|
+
|
|
321
|
+
if [ "$PLATFORM_REQUIRED" = true ]; then
|
|
322
|
+
echo "⏳ Waiting for preview Postinstall Platform Checks on $RELEASE_SHA..."
|
|
323
|
+
deadline=$((SECONDS + 1200))
|
|
324
|
+
PREVIEW_PLATFORM_URL=""
|
|
325
|
+
while [ "$SECONDS" -lt "$deadline" ]; do
|
|
326
|
+
PREVIEW_PLATFORM_URL="$(gh run list \
|
|
327
|
+
--workflow postinstall-platform.yml \
|
|
328
|
+
--branch preview \
|
|
329
|
+
--commit "$RELEASE_SHA" \
|
|
330
|
+
--event push \
|
|
331
|
+
--status success \
|
|
332
|
+
--limit 1 --json url --jq '.[0].url // ""')"
|
|
333
|
+
[ -n "$PREVIEW_PLATFORM_URL" ] && break
|
|
334
|
+
failed="$(gh run list \
|
|
335
|
+
--workflow postinstall-platform.yml \
|
|
336
|
+
--branch preview \
|
|
337
|
+
--commit "$RELEASE_SHA" \
|
|
338
|
+
--event push \
|
|
339
|
+
--status completed \
|
|
340
|
+
--limit 1 --json conclusion --jq '.[0].conclusion // ""')"
|
|
341
|
+
case "$failed" in
|
|
342
|
+
failure|cancelled|timed_out|startup_failure|action_required)
|
|
343
|
+
echo "ERROR: preview Postinstall Platform Checks completed with $failed" >&2
|
|
344
|
+
publish_dispatch_hint
|
|
345
|
+
exit 1
|
|
346
|
+
;;
|
|
347
|
+
esac
|
|
348
|
+
sleep 10
|
|
349
|
+
done
|
|
350
|
+
if [ -z "$PREVIEW_PLATFORM_URL" ]; then
|
|
351
|
+
echo "ERROR: timed out waiting for successful preview Postinstall Platform Checks" >&2
|
|
352
|
+
publish_dispatch_hint
|
|
353
|
+
exit 1
|
|
354
|
+
fi
|
|
355
|
+
echo "✅ Postinstall Platform Checks: $PREVIEW_PLATFORM_URL"
|
|
356
|
+
fi
|
|
357
|
+
|
|
358
|
+
LIVE_SHA="$(git ls-remote origin refs/heads/preview | cut -f1)"
|
|
359
|
+
if [ "$LIVE_SHA" != "$RELEASE_SHA" ]; then
|
|
360
|
+
echo "ERROR: origin/preview moved while waiting for release CI" >&2
|
|
361
|
+
publish_dispatch_hint
|
|
362
|
+
exit 1
|
|
363
|
+
fi
|
|
364
|
+
|
|
226
365
|
gh workflow run publish.yml --ref preview \
|
|
227
366
|
-f version="$VERSION" -f tag=preview -f expected-sha="$RELEASE_SHA" -f dry-run=false
|
|
228
367
|
|
|
@@ -239,7 +378,7 @@ RELEASE_BODY="## Preview Release v$VERSION
|
|
|
239
378
|
$CHANGELOG
|
|
240
379
|
|
|
241
380
|
### Publish
|
|
242
|
-
- npm preview publish
|
|
381
|
+
- npm preview publish is dispatched by \`scripts/release-preview.sh\` into \`.github/workflows/publish.yml\` (\`workflow_dispatch\`), pinned to this commit, after preview CI is green.
|
|
243
382
|
- npm dist-tag: \`preview\`
|
|
244
383
|
- Install after the workflow succeeds: \`npm install -g cli-jaw@preview\`
|
|
245
384
|
|
|
@@ -270,4 +409,4 @@ echo "✅ Preview release queued: cli-jaw@$VERSION"
|
|
|
270
409
|
echo " Install: npm install -g cli-jaw@preview"
|
|
271
410
|
echo " Exact: npm install -g cli-jaw@$VERSION"
|
|
272
411
|
echo " Release: https://github.com/lidge-jun/cli-jaw/releases/tag/v$VERSION"
|
|
273
|
-
echo " Workflow: https://github.com/lidge-jun/cli-jaw/actions/workflows/publish.yml?query=
|
|
412
|
+
echo " Workflow: https://github.com/lidge-jun/cli-jaw/actions/workflows/publish.yml?query=event%3Aworkflow_dispatch"
|
|
@@ -195,6 +195,7 @@ Then it runs scripts/verify-release-evidence.mjs before publish/release can cont
|
|
|
195
195
|
let baseRef = '';
|
|
196
196
|
let changedFilesStdin = false;
|
|
197
197
|
let printPaths = false;
|
|
198
|
+
let acceptCiEvidence = false;
|
|
198
199
|
const args = process.argv.slice(2);
|
|
199
200
|
for (let i = 0; i < args.length; i += 1) {
|
|
200
201
|
const arg = args[i];
|
|
@@ -210,6 +211,10 @@ for (let i = 0; i < args.length; i += 1) {
|
|
|
210
211
|
changedFilesStdin = true;
|
|
211
212
|
continue;
|
|
212
213
|
}
|
|
214
|
+
if (arg === '--accept-ci-evidence') {
|
|
215
|
+
acceptCiEvidence = true;
|
|
216
|
+
continue;
|
|
217
|
+
}
|
|
213
218
|
if (arg === '--base-ref') {
|
|
214
219
|
baseRef = args[++i] || '';
|
|
215
220
|
if (!baseRef) throw new Error('missing value for --base-ref');
|
|
@@ -345,9 +350,19 @@ if (changedFilesStdin) {
|
|
|
345
350
|
console.log('[release-evidence-required] SKIP no installer-sensitive paths in stdin');
|
|
346
351
|
process.exit(0);
|
|
347
352
|
}
|
|
353
|
+
// Distinguish workflow-trigger changes (need platform CI) from extra-only changes.
|
|
354
|
+
// Exit 1 = platform CI required, exit 3 = sensitive but platform CI not triggered.
|
|
355
|
+
const workflowPaths = installerSensitivePaths.filter((p) => !EXTRA_SENSITIVE_PATHS.includes(p));
|
|
356
|
+
const workflowMatched = matched.filter((file) => workflowPaths.includes(file));
|
|
348
357
|
console.error(`[release-evidence-required] CHANGED installer-sensitive files (${matched.length}, ${shortHash(matched)})`);
|
|
349
358
|
for (const file of matched) {
|
|
350
|
-
|
|
359
|
+
const isExtra = EXTRA_SENSITIVE_PATHS.includes(file) && !workflowPaths.includes(file);
|
|
360
|
+
console.error(`- ${file}${isExtra ? ' (release-driver only, no platform CI trigger)' : ''}`);
|
|
361
|
+
}
|
|
362
|
+
if (workflowMatched.length === 0) {
|
|
363
|
+
console.error('[release-evidence-required] all changed files are release-driver extras, not installer surface');
|
|
364
|
+
console.error('[release-evidence-required] platform CI is not required for these changes');
|
|
365
|
+
process.exit(3);
|
|
351
366
|
}
|
|
352
367
|
process.exit(1);
|
|
353
368
|
}
|
|
@@ -385,6 +400,28 @@ if (changed.length > 30) {
|
|
|
385
400
|
}
|
|
386
401
|
|
|
387
402
|
if (!macosEvidence || !wslEvidence) {
|
|
403
|
+
// Option A from #355: accept CI postinstall-platform pass as equivalent evidence.
|
|
404
|
+
if (acceptCiEvidence) {
|
|
405
|
+
const headSha = requireGit(['rev-parse', 'HEAD'], 'resolve HEAD for CI evidence');
|
|
406
|
+
console.log(`[release-evidence-required] checking CI postinstall-platform for ${headSha.slice(0, 12)}...`);
|
|
407
|
+
const ciCheck = spawnSync('gh', [
|
|
408
|
+
'run', 'list',
|
|
409
|
+
'--workflow', 'postinstall-platform.yml',
|
|
410
|
+
'--commit', headSha,
|
|
411
|
+
'--event', 'push',
|
|
412
|
+
'--status', 'success',
|
|
413
|
+
'--limit', '1',
|
|
414
|
+
'--json', 'url',
|
|
415
|
+
'--jq', '.[0].url // ""',
|
|
416
|
+
], { cwd: repoRoot, encoding: 'utf8', shell: false });
|
|
417
|
+
const ciUrl = (ciCheck.stdout || '').trim();
|
|
418
|
+
if (ciUrl) {
|
|
419
|
+
console.log(`[release-evidence-required] PASS CI postinstall-platform evidence: ${ciUrl}`);
|
|
420
|
+
process.exit(0);
|
|
421
|
+
}
|
|
422
|
+
console.error('[release-evidence-required] no successful postinstall-platform CI run found for this SHA');
|
|
423
|
+
console.error('Falling back to local evidence requirement.');
|
|
424
|
+
}
|
|
388
425
|
console.error('[release-evidence-required] FAIL');
|
|
389
426
|
console.error('Strict fresh-machine evidence is required before git push or npm publish.');
|
|
390
427
|
console.error('Set both variables and rerun:');
|