@autohq/cli 0.1.103 → 0.1.104

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.
@@ -19558,7 +19558,17 @@ var RuntimeBridgeBootstrapEnvelopeSchema = external_exports.object({
19558
19558
  var RuntimeBridgeBootstrapAckSchema = external_exports.object({
19559
19559
  status: external_exports.enum(["ready", "failed"]),
19560
19560
  error: external_exports.string().trim().min(1).optional(),
19561
- at: external_exports.string().datetime()
19561
+ at: external_exports.string().datetime(),
19562
+ // The sandbox-baked CLI's own release version (e.g. "0.1.95"), so the
19563
+ // bridge can tag bootstrap observability with the runtime version that is
19564
+ // actually live. Optional because runtimes older than the field predate
19565
+ // reporting it; the bridge logs those as "unknown" instead of failing.
19566
+ cliVersion: external_exports.string().trim().min(1).optional(),
19567
+ // Top-level bootstrap plaintext fields the runtime's tolerant parse
19568
+ // stripped because its schema does not know them yet (worker-ahead skew).
19569
+ // Reported so the bridge can log the degradation instead of it staying
19570
+ // silent.
19571
+ ignoredBootstrapKeys: external_exports.array(external_exports.string().trim().min(1)).optional()
19562
19572
  });
19563
19573
  var RuntimeBridgeConnectedPayloadSchema = external_exports.object({
19564
19574
  runId: SessionRunIdSchema,
@@ -22584,7 +22594,16 @@ function decryptRuntimeBridgeBootstrap(input) {
22584
22594
  decipher.update(Buffer.from(envelope.bootstrap.ciphertext, "base64")),
22585
22595
  decipher.final()
22586
22596
  ]).toString("utf8");
22587
- return RuntimeBridgeBootstrapPlaintextSchema.parse(JSON.parse(plaintext));
22597
+ const raw = JSON.parse(plaintext);
22598
+ const bootstrap = RuntimeBridgeBootstrapPlaintextSchema.parse(raw);
22599
+ return { bootstrap, ignoredKeys: ignoredPlaintextKeys(raw) };
22600
+ }
22601
+ function ignoredPlaintextKeys(raw) {
22602
+ const record2 = external_exports.record(external_exports.string(), external_exports.unknown()).parse(raw);
22603
+ const knownKeys = new Set(
22604
+ Object.keys(RuntimeBridgeBootstrapPlaintextSchema.shape)
22605
+ );
22606
+ return Object.keys(record2).filter((key) => !knownKeys.has(key));
22588
22607
  }
22589
22608
  function deriveBootstrapKey(accessToken, salt) {
22590
22609
  return Buffer.from(
@@ -26161,6 +26180,61 @@ Object.assign(lookup, {
26161
26180
  connect: lookup
26162
26181
  });
26163
26182
 
26183
+ // package.json
26184
+ var package_default = {
26185
+ name: "@autohq/cli",
26186
+ version: "0.1.104",
26187
+ license: "SEE LICENSE IN README.md",
26188
+ publishConfig: {
26189
+ access: "public"
26190
+ },
26191
+ repository: {
26192
+ type: "git",
26193
+ url: "git+https://github.com/fractal-works/auto.git",
26194
+ directory: "apps/cli"
26195
+ },
26196
+ engines: {
26197
+ node: ">=20"
26198
+ },
26199
+ type: "module",
26200
+ bin: {
26201
+ auto: "./dist/index.js"
26202
+ },
26203
+ files: ["dist"],
26204
+ scripts: {
26205
+ build: "tsup",
26206
+ dev: "tsx src/main.ts",
26207
+ "dev:tui": "node ../../scripts/cli-tui-dev-watch.mjs",
26208
+ "skill:generate": "tsx scripts/generate-skill-content.ts",
26209
+ test: "npm run test:unit",
26210
+ "test:unit": 'tsx --test "test/**/*.unit.test.ts"',
26211
+ typecheck: "tsc --noEmit"
26212
+ },
26213
+ dependencies: {
26214
+ "@anthropic-ai/claude-agent-sdk": "^0.3.153",
26215
+ "@inkjs/ui": "^2.0.0",
26216
+ "@tanstack/react-query": "^5.100.14",
26217
+ chalk: "^5.3.0",
26218
+ commander: "^14.0.2",
26219
+ ink: "^7",
26220
+ "ink-text-input": "^6.0.0",
26221
+ jose: "^5.9.6",
26222
+ marked: "^15.0.12",
26223
+ react: "^19",
26224
+ "socket.io-client": "^4.8.3",
26225
+ yaml: "^2.9.0"
26226
+ },
26227
+ devDependencies: {
26228
+ "@auto/protocol": "*",
26229
+ "@auto/schemas": "*",
26230
+ "@types/react": "^19",
26231
+ tsup: "^8.5.1"
26232
+ }
26233
+ };
26234
+
26235
+ // src/cli/version.ts
26236
+ var cliVersion = package_default.version;
26237
+
26164
26238
  // src/commands/agent-bridge/socket.ts
26165
26239
  async function runAgentBridgeSocket(options) {
26166
26240
  const socket = lookup(`${options.bridgeUrl}${RUNTIME_BRIDGE_NAMESPACE}`, {
@@ -26296,13 +26370,18 @@ function createRuntimeBridgeBootstrapListener(input) {
26296
26370
  bridgeLeaseId: envelope.bridgeLeaseId
26297
26371
  });
26298
26372
  const decryptStartedAt = Date.now();
26299
- const bootstrap = decryptRuntimeBridgeBootstrap({
26373
+ const { bootstrap, ignoredKeys } = decryptRuntimeBridgeBootstrap({
26300
26374
  accessToken: input.token,
26301
26375
  envelope
26302
26376
  });
26303
26377
  input.writeOutput?.(
26304
26378
  `agent_bridge_bootstrap_decrypted duration_ms=${Date.now() - decryptStartedAt}`
26305
26379
  );
26380
+ if (ignoredKeys.length > 0) {
26381
+ input.writeOutput?.(
26382
+ `agent_bridge_bootstrap_ignored_keys cli_version=${cliVersion} keys=${ignoredKeys.join(",")}`
26383
+ );
26384
+ }
26306
26385
  await input.onBootstrap?.(bootstrap);
26307
26386
  let handler = input.getHandler();
26308
26387
  if (!handler) {
@@ -26318,7 +26397,9 @@ function createRuntimeBridgeBootstrapListener(input) {
26318
26397
  ack?.(
26319
26398
  RuntimeBridgeBootstrapAckSchema.parse({
26320
26399
  status: "ready",
26321
- at: (/* @__PURE__ */ new Date()).toISOString()
26400
+ at: (/* @__PURE__ */ new Date()).toISOString(),
26401
+ cliVersion,
26402
+ ignoredBootstrapKeys: ignoredKeys.length > 0 ? ignoredKeys : void 0
26322
26403
  })
26323
26404
  );
26324
26405
  prepare?.then(
@@ -26344,7 +26425,10 @@ function createRuntimeBridgeBootstrapListener(input) {
26344
26425
  RuntimeBridgeBootstrapAckSchema.parse({
26345
26426
  status: "failed",
26346
26427
  error: message,
26347
- at: (/* @__PURE__ */ new Date()).toISOString()
26428
+ at: (/* @__PURE__ */ new Date()).toISOString(),
26429
+ // Version skew is a leading cause of bootstrap failure, so failed
26430
+ // acks carry the version that could not bootstrap.
26431
+ cliVersion
26348
26432
  })
26349
26433
  );
26350
26434
  input.onBootstrapError(error51);
package/dist/index.js CHANGED
@@ -18483,6 +18483,73 @@ var init_src = __esm({
18483
18483
  }
18484
18484
  });
18485
18485
 
18486
+ // package.json
18487
+ var package_default;
18488
+ var init_package = __esm({
18489
+ "package.json"() {
18490
+ package_default = {
18491
+ name: "@autohq/cli",
18492
+ version: "0.1.104",
18493
+ license: "SEE LICENSE IN README.md",
18494
+ publishConfig: {
18495
+ access: "public"
18496
+ },
18497
+ repository: {
18498
+ type: "git",
18499
+ url: "git+https://github.com/fractal-works/auto.git",
18500
+ directory: "apps/cli"
18501
+ },
18502
+ engines: {
18503
+ node: ">=20"
18504
+ },
18505
+ type: "module",
18506
+ bin: {
18507
+ auto: "./dist/index.js"
18508
+ },
18509
+ files: ["dist"],
18510
+ scripts: {
18511
+ build: "tsup",
18512
+ dev: "tsx src/main.ts",
18513
+ "dev:tui": "node ../../scripts/cli-tui-dev-watch.mjs",
18514
+ "skill:generate": "tsx scripts/generate-skill-content.ts",
18515
+ test: "npm run test:unit",
18516
+ "test:unit": 'tsx --test "test/**/*.unit.test.ts"',
18517
+ typecheck: "tsc --noEmit"
18518
+ },
18519
+ dependencies: {
18520
+ "@anthropic-ai/claude-agent-sdk": "^0.3.153",
18521
+ "@inkjs/ui": "^2.0.0",
18522
+ "@tanstack/react-query": "^5.100.14",
18523
+ chalk: "^5.3.0",
18524
+ commander: "^14.0.2",
18525
+ ink: "^7",
18526
+ "ink-text-input": "^6.0.0",
18527
+ jose: "^5.9.6",
18528
+ marked: "^15.0.12",
18529
+ react: "^19",
18530
+ "socket.io-client": "^4.8.3",
18531
+ yaml: "^2.9.0"
18532
+ },
18533
+ devDependencies: {
18534
+ "@auto/protocol": "*",
18535
+ "@auto/schemas": "*",
18536
+ "@types/react": "^19",
18537
+ tsup: "^8.5.1"
18538
+ }
18539
+ };
18540
+ }
18541
+ });
18542
+
18543
+ // src/cli/version.ts
18544
+ var cliVersion;
18545
+ var init_version = __esm({
18546
+ "src/cli/version.ts"() {
18547
+ "use strict";
18548
+ init_package();
18549
+ cliVersion = package_default.version;
18550
+ }
18551
+ });
18552
+
18486
18553
  // src/lib/auth/tokens.ts
18487
18554
  function accessTokenExpiresAt(token2) {
18488
18555
  if (!token2.access_token) {
@@ -21852,73 +21919,6 @@ var init_conversation2 = __esm({
21852
21919
  }
21853
21920
  });
21854
21921
 
21855
- // package.json
21856
- var package_default;
21857
- var init_package = __esm({
21858
- "package.json"() {
21859
- package_default = {
21860
- name: "@autohq/cli",
21861
- version: "0.1.103",
21862
- license: "SEE LICENSE IN README.md",
21863
- publishConfig: {
21864
- access: "public"
21865
- },
21866
- repository: {
21867
- type: "git",
21868
- url: "git+https://github.com/fractal-works/auto.git",
21869
- directory: "apps/cli"
21870
- },
21871
- engines: {
21872
- node: ">=20"
21873
- },
21874
- type: "module",
21875
- bin: {
21876
- auto: "./dist/index.js"
21877
- },
21878
- files: ["dist"],
21879
- scripts: {
21880
- build: "tsup",
21881
- dev: "tsx src/main.ts",
21882
- "dev:tui": "node ../../scripts/cli-tui-dev-watch.mjs",
21883
- "skill:generate": "tsx scripts/generate-skill-content.ts",
21884
- test: "npm run test:unit",
21885
- "test:unit": 'tsx --test "test/**/*.unit.test.ts"',
21886
- typecheck: "tsc --noEmit"
21887
- },
21888
- dependencies: {
21889
- "@anthropic-ai/claude-agent-sdk": "^0.3.153",
21890
- "@inkjs/ui": "^2.0.0",
21891
- "@tanstack/react-query": "^5.100.14",
21892
- chalk: "^5.3.0",
21893
- commander: "^14.0.2",
21894
- ink: "^7",
21895
- "ink-text-input": "^6.0.0",
21896
- jose: "^5.9.6",
21897
- marked: "^15.0.12",
21898
- react: "^19",
21899
- "socket.io-client": "^4.8.3",
21900
- yaml: "^2.9.0"
21901
- },
21902
- devDependencies: {
21903
- "@auto/protocol": "*",
21904
- "@auto/schemas": "*",
21905
- "@types/react": "^19",
21906
- tsup: "^8.5.1"
21907
- }
21908
- };
21909
- }
21910
- });
21911
-
21912
- // src/cli/version.ts
21913
- var cliVersion;
21914
- var init_version = __esm({
21915
- "src/cli/version.ts"() {
21916
- "use strict";
21917
- init_package();
21918
- cliVersion = package_default.version;
21919
- }
21920
- });
21921
-
21922
21922
  // src/tui/ApiClientContext.ts
21923
21923
  import { createContext, useContext } from "react";
21924
21924
  function useApiClient() {
@@ -27267,7 +27267,17 @@ var RuntimeBridgeBootstrapEnvelopeSchema = external_exports.object({
27267
27267
  var RuntimeBridgeBootstrapAckSchema = external_exports.object({
27268
27268
  status: external_exports.enum(["ready", "failed"]),
27269
27269
  error: external_exports.string().trim().min(1).optional(),
27270
- at: external_exports.string().datetime()
27270
+ at: external_exports.string().datetime(),
27271
+ // The sandbox-baked CLI's own release version (e.g. "0.1.95"), so the
27272
+ // bridge can tag bootstrap observability with the runtime version that is
27273
+ // actually live. Optional because runtimes older than the field predate
27274
+ // reporting it; the bridge logs those as "unknown" instead of failing.
27275
+ cliVersion: external_exports.string().trim().min(1).optional(),
27276
+ // Top-level bootstrap plaintext fields the runtime's tolerant parse
27277
+ // stripped because its schema does not know them yet (worker-ahead skew).
27278
+ // Reported so the bridge can log the degradation instead of it staying
27279
+ // silent.
27280
+ ignoredBootstrapKeys: external_exports.array(external_exports.string().trim().min(1)).optional()
27271
27281
  });
27272
27282
  var RuntimeBridgeConnectedPayloadSchema = external_exports.object({
27273
27283
  runId: SessionRunIdSchema,
@@ -27383,6 +27393,7 @@ function now() {
27383
27393
  }
27384
27394
 
27385
27395
  // ../../packages/protocol/src/bootstrap-crypto.ts
27396
+ init_zod();
27386
27397
  import {
27387
27398
  createCipheriv,
27388
27399
  createDecipheriv,
@@ -27412,7 +27423,16 @@ function decryptRuntimeBridgeBootstrap(input) {
27412
27423
  decipher.update(Buffer.from(envelope.bootstrap.ciphertext, "base64")),
27413
27424
  decipher.final()
27414
27425
  ]).toString("utf8");
27415
- return RuntimeBridgeBootstrapPlaintextSchema.parse(JSON.parse(plaintext));
27426
+ const raw = JSON.parse(plaintext);
27427
+ const bootstrap = RuntimeBridgeBootstrapPlaintextSchema.parse(raw);
27428
+ return { bootstrap, ignoredKeys: ignoredPlaintextKeys(raw) };
27429
+ }
27430
+ function ignoredPlaintextKeys(raw) {
27431
+ const record2 = external_exports.record(external_exports.string(), external_exports.unknown()).parse(raw);
27432
+ const knownKeys = new Set(
27433
+ Object.keys(RuntimeBridgeBootstrapPlaintextSchema.shape)
27434
+ );
27435
+ return Object.keys(record2).filter((key) => !knownKeys.has(key));
27416
27436
  }
27417
27437
  function deriveBootstrapKey(accessToken, salt) {
27418
27438
  return Buffer.from(
@@ -27433,6 +27453,7 @@ function bootstrapAdditionalData(input) {
27433
27453
  }
27434
27454
 
27435
27455
  // src/commands/agent-bridge/socket.ts
27456
+ init_version();
27436
27457
  import { io } from "socket.io-client";
27437
27458
  async function runAgentBridgeSocket(options) {
27438
27459
  const socket = io(`${options.bridgeUrl}${RUNTIME_BRIDGE_NAMESPACE}`, {
@@ -27568,13 +27589,18 @@ function createRuntimeBridgeBootstrapListener(input) {
27568
27589
  bridgeLeaseId: envelope.bridgeLeaseId
27569
27590
  });
27570
27591
  const decryptStartedAt = Date.now();
27571
- const bootstrap = decryptRuntimeBridgeBootstrap({
27592
+ const { bootstrap, ignoredKeys } = decryptRuntimeBridgeBootstrap({
27572
27593
  accessToken: input.token,
27573
27594
  envelope
27574
27595
  });
27575
27596
  input.writeOutput?.(
27576
27597
  `agent_bridge_bootstrap_decrypted duration_ms=${Date.now() - decryptStartedAt}`
27577
27598
  );
27599
+ if (ignoredKeys.length > 0) {
27600
+ input.writeOutput?.(
27601
+ `agent_bridge_bootstrap_ignored_keys cli_version=${cliVersion} keys=${ignoredKeys.join(",")}`
27602
+ );
27603
+ }
27578
27604
  await input.onBootstrap?.(bootstrap);
27579
27605
  let handler = input.getHandler();
27580
27606
  if (!handler) {
@@ -27590,7 +27616,9 @@ function createRuntimeBridgeBootstrapListener(input) {
27590
27616
  ack?.(
27591
27617
  RuntimeBridgeBootstrapAckSchema.parse({
27592
27618
  status: "ready",
27593
- at: (/* @__PURE__ */ new Date()).toISOString()
27619
+ at: (/* @__PURE__ */ new Date()).toISOString(),
27620
+ cliVersion,
27621
+ ignoredBootstrapKeys: ignoredKeys.length > 0 ? ignoredKeys : void 0
27594
27622
  })
27595
27623
  );
27596
27624
  prepare?.then(
@@ -27616,7 +27644,10 @@ function createRuntimeBridgeBootstrapListener(input) {
27616
27644
  RuntimeBridgeBootstrapAckSchema.parse({
27617
27645
  status: "failed",
27618
27646
  error: message,
27619
- at: (/* @__PURE__ */ new Date()).toISOString()
27647
+ at: (/* @__PURE__ */ new Date()).toISOString(),
27648
+ // Version skew is a leading cause of bootstrap failure, so failed
27649
+ // acks carry the version that could not bootstrap.
27650
+ cliVersion
27620
27651
  })
27621
27652
  );
27622
27653
  input.onBootstrapError(error51);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autohq/cli",
3
- "version": "0.1.103",
3
+ "version": "0.1.104",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"