@ebullient/qrspi-x 0.10.0 → 0.10.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.
Files changed (2) hide show
  1. package/dist/qrspi-x.mjs +34 -10
  2. package/package.json +8 -2
package/dist/qrspi-x.mjs CHANGED
@@ -2455,21 +2455,29 @@ var help7 = {
2455
2455
  summary: "Human-invoked only: install/init/update/status/remove the central plugin payload and agent targets.",
2456
2456
  actions: [installHelp, initHelp, statusHelp, updateHelp, removeHelp]
2457
2457
  };
2458
+ var noopProgress = () => {
2459
+ };
2458
2460
  async function runInstall(opts, services = {}) {
2459
2461
  const execFile2 = services.execFile ?? defaultRun4;
2460
2462
  const home = services.homeDir ?? homedir2();
2461
2463
  const targetDir = join10(home, ".qrspi", "plugin");
2462
2464
  const repoSlug = `${QRSPI_X_REPO.owner}/${QRSPI_X_REPO.repo}`;
2465
+ const onProgress = services.onProgress ?? noopProgress;
2463
2466
  const github = services.github ?? gitHubAt(QRSPI_X_REPO, home, { execFile: execFile2 });
2464
2467
  const staging = services.staging ?? stagingAt(targetDir, repoSlug, home, { execFile: execFile2 });
2468
+ onProgress(
2469
+ opts.release ? `Resolving release ${opts.release}...` : "Resolving latest eligible release..."
2470
+ );
2465
2471
  const resolved = await github.resolveRelease(opts.release);
2466
2472
  if (!resolved.ok) {
2467
2473
  return fail(resolved.reason, resolved.message);
2468
2474
  }
2475
+ onProgress(`Downloading release ${resolved.tag}...`);
2469
2476
  const downloadResult = await staging.download(resolved.tag);
2470
2477
  if (!downloadResult.ok) {
2471
2478
  return fail(downloadResult.reason, downloadResult.message);
2472
2479
  }
2480
+ onProgress("Verifying attestation...");
2473
2481
  const attestation = await github.verifyAttestation(
2474
2482
  downloadResult.archivePath
2475
2483
  );
@@ -2477,6 +2485,7 @@ async function runInstall(opts, services = {}) {
2477
2485
  await downloadResult.cleanup();
2478
2486
  return fail(attestation.reason, attestation.message);
2479
2487
  }
2488
+ onProgress(`Unpacking into ${targetDir}...`);
2480
2489
  const staged = await staging.extractAndCommit(
2481
2490
  downloadResult.archivePath,
2482
2491
  resolved.tag
@@ -2620,7 +2629,8 @@ async function runUpdate(opts, services = {}) {
2620
2629
  execFile: services.execFile,
2621
2630
  homeDir: home,
2622
2631
  github: services.github,
2623
- staging: services.staging
2632
+ staging: services.staging,
2633
+ onProgress: services.onProgress
2624
2634
  }
2625
2635
  );
2626
2636
  if (installResult.exitCode !== 0) {
@@ -3174,7 +3184,7 @@ async function main(argv, io = processIo()) {
3174
3184
  }
3175
3185
  const { positionals, options } = parseOptions(argv.slice(1));
3176
3186
  validateOptions(command, positionals, options);
3177
- const result = command === "plugin" ? await dispatchPlugin(positionals, options) : command === "import" ? await dispatchImport(
3187
+ const result = command === "plugin" ? await dispatchPlugin(positionals, options, io) : command === "import" ? await dispatchImport(
3178
3188
  positionals,
3179
3189
  options,
3180
3190
  projectAndOptionalFeature(options, io.cwd)
@@ -3368,11 +3378,22 @@ async function dispatchImport(positionals, options, common) {
3368
3378
  repo
3369
3379
  });
3370
3380
  }
3371
- async function dispatchPlugin(positionals, options) {
3381
+ async function dispatchPlugin(positionals, options, io) {
3372
3382
  const action = singleAction("plugin", positionals);
3373
3383
  switch (action) {
3374
- case "install":
3375
- return runInstall({ release: optional(options, "release") });
3384
+ case "install": {
3385
+ const result = await runInstall(
3386
+ { release: optional(options, "release") },
3387
+ { onProgress: io.stdout }
3388
+ );
3389
+ if (result.exitCode === 0 && typeof result.text === "string") {
3390
+ return {
3391
+ ...result,
3392
+ text: `${result.text} Use "qrspi-x plugin init --agent <claude|codex|bob>" to add it to the agent(s) of your choice.`
3393
+ };
3394
+ }
3395
+ return result;
3396
+ }
3376
3397
  case "init":
3377
3398
  return runInit({
3378
3399
  agent: required(options, "agent"),
@@ -3383,10 +3404,13 @@ async function dispatchPlugin(positionals, options) {
3383
3404
  case "status":
3384
3405
  return runStatus();
3385
3406
  case "update":
3386
- return runUpdate({
3387
- release: optional(options, "release"),
3388
- force: options.force === true
3389
- });
3407
+ return runUpdate(
3408
+ {
3409
+ release: optional(options, "release"),
3410
+ force: options.force === true
3411
+ },
3412
+ { onProgress: io.stdout }
3413
+ );
3390
3414
  case "remove":
3391
3415
  return runRemove({
3392
3416
  agent: required(options, "agent"),
@@ -3525,7 +3549,7 @@ function optional(options, name) {
3525
3549
  return typeof options[name] === "string" ? options[name] : void 0;
3526
3550
  }
3527
3551
  function version() {
3528
- return true ? "0.10.0+g6a64539" : "0.0.0-dev";
3552
+ return true ? "0.10.2" : "0.0.0-dev";
3529
3553
  }
3530
3554
 
3531
3555
  // src/bin.ts
package/package.json CHANGED
@@ -1,8 +1,14 @@
1
1
  {
2
2
  "name": "@ebullient/qrspi-x",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "CLI helper for the QRSPI-X agent workflow plugin",
5
- "keywords": ["qrspi", "cli", "workflow", "agent", "plugin"],
5
+ "keywords": [
6
+ "qrspi",
7
+ "cli",
8
+ "workflow",
9
+ "agent",
10
+ "plugin"
11
+ ],
6
12
  "license": "Apache-2.0",
7
13
  "repository": {
8
14
  "type": "git",