@autohq/cli 0.1.528 → 0.1.530

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.
@@ -30866,7 +30866,7 @@ Object.assign(lookup, {
30866
30866
  // package.json
30867
30867
  var package_default = {
30868
30868
  name: "@autohq/cli",
30869
- version: "0.1.528",
30869
+ version: "0.1.530",
30870
30870
  license: "SEE LICENSE IN README.md",
30871
30871
  publishConfig: {
30872
30872
  access: "public"
@@ -30954,6 +30954,14 @@ var AgentBridgeTerminalAuthError = class extends Error {
30954
30954
  this.name = "AgentBridgeTerminalAuthError";
30955
30955
  }
30956
30956
  };
30957
+ var AGENT_BRIDGE_TERMINAL_PREPARE_EXIT_CODE = 79;
30958
+ var AgentBridgeTerminalPrepareError = class extends Error {
30959
+ exitCode = AGENT_BRIDGE_TERMINAL_PREPARE_EXIT_CODE;
30960
+ constructor(message, options) {
30961
+ super(message, options);
30962
+ this.name = "AgentBridgeTerminalPrepareError";
30963
+ }
30964
+ };
30957
30965
  var AGENT_BRIDGE_OUTPUT_ACK_TIMEOUT_MS = 1e4;
30958
30966
  var AgentBridgeOutputAckTimeoutError = class extends Error {
30959
30967
  constructor(message) {
@@ -34243,8 +34251,9 @@ var GithubSyncWorkflowInputSchema = external_exports.discriminatedUnion("kind",
34243
34251
  // webhook). The tenant's `.auto` is unchanged — only our registry changed —
34244
34252
  // so this arm skips the `no_auto_changes` early-out and applies the production
34245
34253
  // branch HEAD (`after`, which the sweep resolves before starting the run).
34246
- // It is otherwise push-shaped. `templateName`/`version` identify the drift
34247
- // that triggered it (for the commit check + idempotent workflow id).
34254
+ // It is otherwise push-shaped. New waves carry the complete bounded
34255
+ // `templates` set plus a deterministic `waveId`; legacy single-template
34256
+ // coordinates remain accepted only so in-flight workflows can replay.
34248
34257
  external_exports.object({
34249
34258
  kind: external_exports.literal("template_push"),
34250
34259
  bindingId: external_exports.string().trim().min(1),
@@ -34258,9 +34267,27 @@ var GithubSyncWorkflowInputSchema = external_exports.discriminatedUnion("kind",
34258
34267
  autoPath: external_exports.literal(GITHUB_SYNC_AUTO_PATH),
34259
34268
  before: external_exports.string().trim().min(1).optional(),
34260
34269
  after: external_exports.string().trim().min(1),
34261
- templateName: external_exports.string().trim().min(1),
34262
- version: external_exports.string().trim().min(1),
34270
+ // Legacy single-template coordinates remain optional so in-flight
34271
+ // workflows started by a pre-wave worker can finish after deployment.
34272
+ templateName: external_exports.string().trim().min(1).optional(),
34273
+ version: external_exports.string().trim().min(1).optional(),
34274
+ waveId: external_exports.string().trim().min(1).optional(),
34275
+ templates: external_exports.array(
34276
+ external_exports.object({
34277
+ name: external_exports.string().trim().min(1),
34278
+ version: external_exports.string().trim().min(1)
34279
+ })
34280
+ ).min(1).max(50).optional(),
34263
34281
  triggerArtifact: GithubSyncTriggerArtifactSchema.optional()
34282
+ }).superRefine((input, context) => {
34283
+ const legacy = Boolean(input.templateName && input.version);
34284
+ const wave = Boolean(input.waveId && input.templates);
34285
+ if (legacy === wave) {
34286
+ context.addIssue({
34287
+ code: "custom",
34288
+ message: "template_push requires exactly one of legacy templateName/version or waveId/templates"
34289
+ });
34290
+ }
34264
34291
  }),
34265
34292
  // Synthetic authoritative re-apply triggered by one durable connection
34266
34293
  // lifecycle occurrence. The event id makes retries reuse the same workflow,
@@ -62369,7 +62396,7 @@ async function createClaudeAutoMcpServer(input) {
62369
62396
  const transformed = input.transformDryRun ? transformToolsListResponse(JSON.stringify(listResponse)) : { body: JSON.stringify(listResponse), pathsCompatible: false };
62370
62397
  const listed = JSON.parse(transformed.body);
62371
62398
  if (isRecord(listed.error)) {
62372
- throw new Error(
62399
+ throw new AgentBridgeTerminalPrepareError(
62373
62400
  typeof listed.error.message === "string" ? listed.error.message : `Auto MCP server ${input.name} failed tools/list`
62374
62401
  );
62375
62402
  }
@@ -74292,7 +74319,7 @@ ${cancelledToolPlatformNotice(cancelledToolRuns)}` : text2,
74292
74319
  // configured MCP servers, or whose query failed to attach, skip the gate and
74293
74320
  // fall through to the existing enqueue/error path unchanged.
74294
74321
  async awaitMcpRegistration() {
74295
- if (Object.keys(this.options.mcpServers ?? {}).length === 0) {
74322
+ if (this.gatedMcpServerNames().length === 0) {
74296
74323
  return;
74297
74324
  }
74298
74325
  let query;
@@ -74335,8 +74362,18 @@ ${cancelledToolPlatformNotice(cancelledToolRuns)}` : text2,
74335
74362
  // immediately even while unrelated configured servers remain pending. A
74336
74363
  // timeout or status-read failure returns a distinct not-ready result so the
74337
74364
  // caller closes the session and rejects before first-turn injection.
74365
+ // The gate can only await servers the runtime connects to externally
74366
+ // (stdio/http/sse). SDK-hosted in-process servers have nothing to await —
74367
+ // their tool registry was built synchronously from the prepare-time
74368
+ // tools/list snapshot — and the claude runtime's mcp_status does not report
74369
+ // them at all, so polling for them holds the gate to its timeout on every
74370
+ // turn of a healthy runtime (the 2026-07-21 camfeed retry: repeating
74371
+ // gate_not_ready with an empty status list, zero session output).
74372
+ gatedMcpServerNames() {
74373
+ return Object.entries(this.options.mcpServers ?? {}).filter(([, config2]) => config2.type !== "sdk").map(([name23]) => name23);
74374
+ }
74338
74375
  async pollMcpRegistration(query) {
74339
- const configuredNames = Object.keys(this.options.mcpServers ?? {});
74376
+ const configuredNames = this.gatedMcpServerNames();
74340
74377
  const startedAt = Date.now();
74341
74378
  const deadline = startedAt + CLAUDE_MCP_REGISTRATION_TIMEOUT_MS;
74342
74379
  this.input.writeOutput?.(
package/dist/index.js CHANGED
@@ -18117,8 +18117,9 @@ var init_github_sync = __esm({
18117
18117
  // webhook). The tenant's `.auto` is unchanged — only our registry changed —
18118
18118
  // so this arm skips the `no_auto_changes` early-out and applies the production
18119
18119
  // branch HEAD (`after`, which the sweep resolves before starting the run).
18120
- // It is otherwise push-shaped. `templateName`/`version` identify the drift
18121
- // that triggered it (for the commit check + idempotent workflow id).
18120
+ // It is otherwise push-shaped. New waves carry the complete bounded
18121
+ // `templates` set plus a deterministic `waveId`; legacy single-template
18122
+ // coordinates remain accepted only so in-flight workflows can replay.
18122
18123
  external_exports.object({
18123
18124
  kind: external_exports.literal("template_push"),
18124
18125
  bindingId: external_exports.string().trim().min(1),
@@ -18132,9 +18133,27 @@ var init_github_sync = __esm({
18132
18133
  autoPath: external_exports.literal(GITHUB_SYNC_AUTO_PATH),
18133
18134
  before: external_exports.string().trim().min(1).optional(),
18134
18135
  after: external_exports.string().trim().min(1),
18135
- templateName: external_exports.string().trim().min(1),
18136
- version: external_exports.string().trim().min(1),
18136
+ // Legacy single-template coordinates remain optional so in-flight
18137
+ // workflows started by a pre-wave worker can finish after deployment.
18138
+ templateName: external_exports.string().trim().min(1).optional(),
18139
+ version: external_exports.string().trim().min(1).optional(),
18140
+ waveId: external_exports.string().trim().min(1).optional(),
18141
+ templates: external_exports.array(
18142
+ external_exports.object({
18143
+ name: external_exports.string().trim().min(1),
18144
+ version: external_exports.string().trim().min(1)
18145
+ })
18146
+ ).min(1).max(50).optional(),
18137
18147
  triggerArtifact: GithubSyncTriggerArtifactSchema.optional()
18148
+ }).superRefine((input, context) => {
18149
+ const legacy = Boolean(input.templateName && input.version);
18150
+ const wave = Boolean(input.waveId && input.templates);
18151
+ if (legacy === wave) {
18152
+ context.addIssue({
18153
+ code: "custom",
18154
+ message: "template_push requires exactly one of legacy templateName/version or waveId/templates"
18155
+ });
18156
+ }
18138
18157
  }),
18139
18158
  // Synthetic authoritative re-apply triggered by one durable connection
18140
18159
  // lifecycle occurrence. The event id makes retries reuse the same workflow,
@@ -78587,7 +78606,7 @@ var init_package = __esm({
78587
78606
  "package.json"() {
78588
78607
  package_default = {
78589
78608
  name: "@autohq/cli",
78590
- version: "0.1.528",
78609
+ version: "0.1.530",
78591
78610
  license: "SEE LICENSE IN README.md",
78592
78611
  publishConfig: {
78593
78612
  access: "public"
@@ -89908,6 +89927,14 @@ var AgentBridgeTerminalAuthError = class extends Error {
89908
89927
  this.name = "AgentBridgeTerminalAuthError";
89909
89928
  }
89910
89929
  };
89930
+ var AGENT_BRIDGE_TERMINAL_PREPARE_EXIT_CODE = 79;
89931
+ var AgentBridgeTerminalPrepareError = class extends Error {
89932
+ exitCode = AGENT_BRIDGE_TERMINAL_PREPARE_EXIT_CODE;
89933
+ constructor(message, options) {
89934
+ super(message, options);
89935
+ this.name = "AgentBridgeTerminalPrepareError";
89936
+ }
89937
+ };
89911
89938
  var AGENT_BRIDGE_OUTPUT_ACK_TIMEOUT_MS = 1e4;
89912
89939
  var AgentBridgeOutputAckTimeoutError = class extends Error {
89913
89940
  constructor(message) {
@@ -90620,7 +90647,7 @@ async function createClaudeAutoMcpServer(input) {
90620
90647
  const transformed = input.transformDryRun ? transformToolsListResponse(JSON.stringify(listResponse)) : { body: JSON.stringify(listResponse), pathsCompatible: false };
90621
90648
  const listed = JSON.parse(transformed.body);
90622
90649
  if (isRecord2(listed.error)) {
90623
- throw new Error(
90650
+ throw new AgentBridgeTerminalPrepareError(
90624
90651
  typeof listed.error.message === "string" ? listed.error.message : `Auto MCP server ${input.name} failed tools/list`
90625
90652
  );
90626
90653
  }
@@ -94351,7 +94378,7 @@ ${cancelledToolPlatformNotice(cancelledToolRuns)}` : text,
94351
94378
  // configured MCP servers, or whose query failed to attach, skip the gate and
94352
94379
  // fall through to the existing enqueue/error path unchanged.
94353
94380
  async awaitMcpRegistration() {
94354
- if (Object.keys(this.options.mcpServers ?? {}).length === 0) {
94381
+ if (this.gatedMcpServerNames().length === 0) {
94355
94382
  return;
94356
94383
  }
94357
94384
  let query;
@@ -94394,8 +94421,18 @@ ${cancelledToolPlatformNotice(cancelledToolRuns)}` : text,
94394
94421
  // immediately even while unrelated configured servers remain pending. A
94395
94422
  // timeout or status-read failure returns a distinct not-ready result so the
94396
94423
  // caller closes the session and rejects before first-turn injection.
94424
+ // The gate can only await servers the runtime connects to externally
94425
+ // (stdio/http/sse). SDK-hosted in-process servers have nothing to await —
94426
+ // their tool registry was built synchronously from the prepare-time
94427
+ // tools/list snapshot — and the claude runtime's mcp_status does not report
94428
+ // them at all, so polling for them holds the gate to its timeout on every
94429
+ // turn of a healthy runtime (the 2026-07-21 camfeed retry: repeating
94430
+ // gate_not_ready with an empty status list, zero session output).
94431
+ gatedMcpServerNames() {
94432
+ return Object.entries(this.options.mcpServers ?? {}).filter(([, config2]) => config2.type !== "sdk").map(([name]) => name);
94433
+ }
94397
94434
  async pollMcpRegistration(query) {
94398
- const configuredNames = Object.keys(this.options.mcpServers ?? {});
94435
+ const configuredNames = this.gatedMcpServerNames();
94399
94436
  const startedAt = Date.now();
94400
94437
  const deadline = startedAt + CLAUDE_MCP_REGISTRATION_TIMEOUT_MS;
94401
94438
  this.input.writeOutput?.(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autohq/cli",
3
- "version": "0.1.528",
3
+ "version": "0.1.530",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"