@autohq/cli 0.1.611 → 0.1.613

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 (3) hide show
  1. package/dist/agent-bridge.js +26012 -20569
  2. package/dist/index.js +61 -16
  3. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -18752,6 +18752,7 @@ var init_github_mcp_catalog = __esm({
18752
18752
  "enable_pull_request_auto_merge",
18753
18753
  "enqueue_pull_request",
18754
18754
  "rerun_failed_jobs",
18755
+ "rerun_failed_jobs_for_pr_head",
18755
18756
  "upsert_issue_comment"
18756
18757
  ];
18757
18758
  GITHUB_MCP_SELECTABLE_TOOL_NAMES = [
@@ -18771,7 +18772,8 @@ var init_github_mcp_catalog = __esm({
18771
18772
  "actions_secret_write"
18772
18773
  ];
18773
18774
  GITHUB_MCP_ACTIONS_WRITE_TOOLS = [
18774
- "rerun_failed_jobs"
18775
+ "rerun_failed_jobs",
18776
+ "rerun_failed_jobs_for_pr_head"
18775
18777
  ];
18776
18778
  GITHUB_MCP_WRITE_TOOLS = [
18777
18779
  "actions_run_trigger",
@@ -19096,7 +19098,7 @@ var init_environments = __esm({
19096
19098
  });
19097
19099
 
19098
19100
  // ../../packages/schemas/src/hosted-runtimes.ts
19099
- var HOSTED_RUNTIME_STATUSES, HOSTED_RUNTIME_OUTCOMES, HOSTED_RUNTIME_COMMAND_STATUSES, HOSTED_RUNTIME_CLOSE_REASONS, HOSTED_RUNTIME_MAX_COMMAND_BUDGET_SECONDS, HostedRuntimeEnvironmentInputSchema, HostedRuntimeEnvironmentSourceSchema, HostedRuntimeEnvironmentSnapshotSchema, HostedRuntimeCommandInputSchema, HostedRuntimeIdempotencyKeySchema, CreateHostedRuntimeRequestSchema, HostedRuntimeStatusSchema, HostedRuntimeOutcomeSchema, HostedRuntimeCommandStatusSchema, HostedRuntimeCloseReasonSchema, HostedRuntimeCommandRecordSchema, HostedRuntimeRecordSchema, HostedRuntimeDispatchStatusSchema, HostedRuntimeReceiptSchema, HostedRuntimeWorkflowInputSchema;
19101
+ var HOSTED_RUNTIME_STATUSES, HOSTED_RUNTIME_EXECUTION_MODES, HOSTED_RUNTIME_OUTCOMES, HOSTED_RUNTIME_COMMAND_STATUSES, HOSTED_RUNTIME_CLOSE_REASONS, HOSTED_RUNTIME_MAX_COMMAND_BUDGET_SECONDS, HOSTED_RUNTIME_RETAINED_IDLE_TIMEOUT_SECONDS, HOSTED_RUNTIME_RETAINED_HARD_TTL_SECONDS, HostedRuntimeEnvironmentInputSchema, HostedRuntimeEnvironmentSourceSchema, HostedRuntimeEnvironmentSnapshotSchema, HostedRuntimeCommandInputSchema, HostedRuntimeIdempotencyKeySchema, HostedRuntimeOneShotRequestSchema, HostedRuntimeRetainedRequestSchema, CreateHostedRuntimeRequestSchema, HostedRuntimeStatusSchema, HostedRuntimeExecutionModeSchema, HostedRuntimeOutcomeSchema, HostedRuntimeCommandStatusSchema, HostedRuntimeCloseReasonSchema, HostedRuntimeCommandRecordSchema, HostedRuntimeRecordSchema, HostedRuntimeDispatchStatusSchema, HostedRuntimeCommandReceiptSchema, HostedRuntimeReceiptSchema, HostedRuntimeWorkflowInputSchema, HostedRuntimeRetainedSignalSchema;
19100
19102
  var init_hosted_runtimes = __esm({
19101
19103
  "../../packages/schemas/src/hosted-runtimes.ts"() {
19102
19104
  "use strict";
@@ -19107,10 +19109,12 @@ var init_hosted_runtimes = __esm({
19107
19109
  HOSTED_RUNTIME_STATUSES = [
19108
19110
  "queued",
19109
19111
  "provisioning",
19112
+ "ready",
19110
19113
  "running",
19111
19114
  "closing",
19112
19115
  "closed"
19113
19116
  ];
19117
+ HOSTED_RUNTIME_EXECUTION_MODES = ["one_shot", "retained"];
19114
19118
  HOSTED_RUNTIME_OUTCOMES = [
19115
19119
  "succeeded",
19116
19120
  "failed",
@@ -19128,9 +19132,13 @@ var init_hosted_runtimes = __esm({
19128
19132
  "command_failed",
19129
19133
  "provision_failed",
19130
19134
  "requested",
19135
+ "idle_timeout",
19136
+ "hard_ttl_expired",
19131
19137
  "internal_error"
19132
19138
  ];
19133
19139
  HOSTED_RUNTIME_MAX_COMMAND_BUDGET_SECONDS = 45 * 60;
19140
+ HOSTED_RUNTIME_RETAINED_IDLE_TIMEOUT_SECONDS = 15 * 60;
19141
+ HOSTED_RUNTIME_RETAINED_HARD_TTL_SECONDS = 60 * 60;
19134
19142
  HostedRuntimeEnvironmentInputSchema = external_exports.discriminatedUnion(
19135
19143
  "kind",
19136
19144
  [
@@ -19165,7 +19173,7 @@ var init_hosted_runtimes = __esm({
19165
19173
  timeoutSeconds: external_exports.number().int().min(1).max(300).default(60)
19166
19174
  }).strict();
19167
19175
  HostedRuntimeIdempotencyKeySchema = external_exports.string().trim().min(1).max(200);
19168
- CreateHostedRuntimeRequestSchema = external_exports.object({
19176
+ HostedRuntimeOneShotRequestSchema = external_exports.object({
19169
19177
  environment: HostedRuntimeEnvironmentInputSchema,
19170
19178
  commands: external_exports.array(HostedRuntimeCommandInputSchema).min(1).max(20)
19171
19179
  }).strict().superRefine((request, context) => {
@@ -19181,7 +19189,18 @@ var init_hosted_runtimes = __esm({
19181
19189
  });
19182
19190
  }
19183
19191
  });
19192
+ HostedRuntimeRetainedRequestSchema = external_exports.object({
19193
+ mode: external_exports.literal("retained"),
19194
+ environment: HostedRuntimeEnvironmentInputSchema
19195
+ }).strict();
19196
+ CreateHostedRuntimeRequestSchema = external_exports.union([
19197
+ HostedRuntimeRetainedRequestSchema,
19198
+ HostedRuntimeOneShotRequestSchema
19199
+ ]);
19184
19200
  HostedRuntimeStatusSchema = external_exports.enum(HOSTED_RUNTIME_STATUSES);
19201
+ HostedRuntimeExecutionModeSchema = external_exports.enum(
19202
+ HOSTED_RUNTIME_EXECUTION_MODES
19203
+ );
19185
19204
  HostedRuntimeOutcomeSchema = external_exports.enum(HOSTED_RUNTIME_OUTCOMES);
19186
19205
  HostedRuntimeCommandStatusSchema = external_exports.enum(
19187
19206
  HOSTED_RUNTIME_COMMAND_STATUSES
@@ -19204,6 +19223,7 @@ var init_hosted_runtimes = __esm({
19204
19223
  }).strict();
19205
19224
  HostedRuntimeRecordSchema = external_exports.object({
19206
19225
  id: RuntimeIdSchema,
19226
+ mode: external_exports.literal("retained").optional(),
19207
19227
  status: HostedRuntimeStatusSchema,
19208
19228
  outcome: HostedRuntimeOutcomeSchema.nullable(),
19209
19229
  environment: HostedRuntimeEnvironmentSourceSchema,
@@ -19211,6 +19231,9 @@ var init_hosted_runtimes = __esm({
19211
19231
  error: external_exports.string().nullable(),
19212
19232
  closeReason: HostedRuntimeCloseReasonSchema.nullable(),
19213
19233
  closeRequestedAt: external_exports.string().datetime().nullable(),
19234
+ idleTimeoutAt: external_exports.string().datetime().optional(),
19235
+ hardTtlAt: external_exports.string().datetime().optional(),
19236
+ lastActivityAt: external_exports.string().datetime().nullable().optional(),
19214
19237
  startedAt: external_exports.string().datetime().nullable(),
19215
19238
  finishedAt: external_exports.string().datetime().nullable(),
19216
19239
  createdAt: external_exports.string().datetime(),
@@ -19220,12 +19243,20 @@ var init_hosted_runtimes = __esm({
19220
19243
  "started",
19221
19244
  "deferred"
19222
19245
  ]);
19246
+ HostedRuntimeCommandReceiptSchema = external_exports.object({
19247
+ runtimeId: RuntimeIdSchema,
19248
+ command: HostedRuntimeCommandRecordSchema,
19249
+ workflowId: external_exports.string().trim().min(1),
19250
+ dispatchStatus: HostedRuntimeDispatchStatusSchema,
19251
+ replayed: external_exports.boolean()
19252
+ }).strict();
19223
19253
  HostedRuntimeReceiptSchema = external_exports.object({
19224
19254
  runtime: HostedRuntimeRecordSchema,
19225
19255
  workflowId: external_exports.string().trim().min(1),
19226
19256
  dispatchStatus: HostedRuntimeDispatchStatusSchema
19227
19257
  }).strict();
19228
19258
  HostedRuntimeWorkflowInputSchema = external_exports.object({ runtimeId: RuntimeIdSchema }).strip();
19259
+ HostedRuntimeRetainedSignalSchema = external_exports.object({ runtimeId: RuntimeIdSchema }).strip();
19229
19260
  }
19230
19261
  });
19231
19262
 
@@ -22850,13 +22881,14 @@ var init_project_automation_pause = __esm({
22850
22881
  });
22851
22882
 
22852
22883
  // ../../packages/schemas/src/project-config.ts
22853
- var RESOURCE_KIND_CONFIG, PROJECT_CONFIG_RESOURCE_NAME, PROJECT_CONFIG_FILE_NAME, DashboardTextSchema, DashboardViewKindSchema, DashboardViewSpecSchema, ProjectDashboardSpecSchema, ProjectConfigSpecSchema, ProjectConfigResourceSchema, ProjectConfigApplyRequestSchema, ProjectHomeAgentSchema, ProjectHomeSessionSchema, ProjectHomeResourceHealthSchema, ProjectHomeTaskSchema, ProjectHomeReadyViewSchema, ProjectHomeUnsupportedViewSchema, ProjectHomeInvalidViewSchema, ProjectHomeReadModelSchema, PROJECT_DEFAULT_AGENT_SOURCES, ProjectDefaultAgentSourceSchema, ProjectDefaultAgentSchema, UpdateProjectSettingsRequestSchema;
22884
+ var RESOURCE_KIND_CONFIG, PROJECT_CONFIG_RESOURCE_NAME, PROJECT_CONFIG_FILE_NAME, DashboardTextSchema, DashboardViewKindSchema, DashboardViewSpecSchema, ProjectDashboardSpecSchema, ManualRuntimeDefaultsSchema, ProjectConfigSpecSchema, ProjectConfigResourceSchema, ProjectConfigApplyRequestSchema, ProjectHomeAgentSchema, ProjectHomeSessionSchema, ProjectHomeResourceHealthSchema, ProjectHomeTaskSchema, ProjectHomeReadyViewSchema, ProjectHomeUnsupportedViewSchema, ProjectHomeInvalidViewSchema, ProjectHomeReadModelSchema, PROJECT_DEFAULT_AGENT_SOURCES, ProjectDefaultAgentSourceSchema, ProjectDefaultAgentSchema, UpdateProjectSettingsRequestSchema;
22854
22885
  var init_project_config = __esm({
22855
22886
  "../../packages/schemas/src/project-config.ts"() {
22856
22887
  "use strict";
22857
22888
  init_zod();
22858
22889
  init_agents();
22859
22890
  init_archive_policy();
22891
+ init_hosted_runtimes();
22860
22892
  init_ids();
22861
22893
  init_primitives();
22862
22894
  init_project_automation_pause();
@@ -22882,8 +22914,16 @@ var init_project_config = __esm({
22882
22914
  }).strict().optional(),
22883
22915
  views: external_exports.array(DashboardViewSpecSchema).max(12).optional()
22884
22916
  }).strict();
22917
+ ManualRuntimeDefaultsSchema = external_exports.object({
22918
+ idleTimeoutSeconds: external_exports.number().int().min(60).max(60 * 60).default(HOSTED_RUNTIME_RETAINED_IDLE_TIMEOUT_SECONDS),
22919
+ hardTtlSeconds: external_exports.number().int().min(60).max(24 * 60 * 60).default(HOSTED_RUNTIME_RETAINED_HARD_TTL_SECONDS)
22920
+ }).strict().refine((value) => value.idleTimeoutSeconds <= value.hardTtlSeconds, {
22921
+ message: "Manual runtime idle timeout must not exceed its hard TTL",
22922
+ path: ["idleTimeoutSeconds"]
22923
+ });
22885
22924
  ProjectConfigSpecSchema = external_exports.object({
22886
- dashboard: ProjectDashboardSpecSchema.optional()
22925
+ dashboard: ProjectDashboardSpecSchema.optional(),
22926
+ manualRuntimes: ManualRuntimeDefaultsSchema.optional()
22887
22927
  }).strict();
22888
22928
  ProjectConfigResourceSchema = resourceEnvelopeSchema(
22889
22929
  ProjectConfigSpecSchema
@@ -93169,7 +93209,7 @@ var init_package = __esm({
93169
93209
  "package.json"() {
93170
93210
  package_default = {
93171
93211
  name: "@autohq/cli",
93172
- version: "0.1.611",
93212
+ version: "0.1.613",
93173
93213
  license: "SEE LICENSE IN README.md",
93174
93214
  publishConfig: {
93175
93215
  access: "public"
@@ -93198,7 +93238,7 @@ var init_package = __esm({
93198
93238
  typecheck: "tsc --noEmit"
93199
93239
  },
93200
93240
  dependencies: {
93201
- "@anthropic-ai/claude-agent-sdk": "^0.3.153",
93241
+ "@anthropic-ai/claude-agent-sdk": "^0.3.221",
93202
93242
  "@inkjs/ui": "^2.0.0",
93203
93243
  "@modelcontextprotocol/sdk": "^1.29.0",
93204
93244
  "@tanstack/react-query": "^5.100.14",
@@ -111140,6 +111180,9 @@ var ClaudeCodeCommandHandler = class {
111140
111180
  }
111141
111181
  async emitUsageTurn(turnId) {
111142
111182
  const activeContext = this.context;
111183
+ if (!activeContext && turnId === null) {
111184
+ return;
111185
+ }
111143
111186
  if (!activeContext) {
111144
111187
  throw new Error("Cannot publish usage turn without bridge context");
111145
111188
  }
@@ -113644,8 +113687,13 @@ var CodexCommandHandler = class {
113644
113687
  delivery.commandId,
113645
113688
  message
113646
113689
  );
113690
+ if (requestedDeferredDelivery(delivery)) {
113691
+ this.input.writeOutput?.(
113692
+ "agent_bridge_codex_deferred_mapped_to_interrupt"
113693
+ );
113694
+ }
113647
113695
  await this.ensureSession().sendMessage(message, {
113648
- mode: deliveryMode2(delivery),
113696
+ mode: "interrupt",
113649
113697
  commandId: delivery.commandId
113650
113698
  });
113651
113699
  } catch (error51) {
@@ -113798,6 +113846,9 @@ var CodexCommandHandler = class {
113798
113846
  }
113799
113847
  async emitUsageTurn(turnId) {
113800
113848
  const activeContext = this.context;
113849
+ if (!activeContext && turnId === null) {
113850
+ return;
113851
+ }
113801
113852
  if (!activeContext) {
113802
113853
  throw new Error("Cannot publish usage turn without bridge context");
113803
113854
  }
@@ -113926,15 +113977,9 @@ function deliverySelection2(delivery) {
113926
113977
  function sameCodexConfigSelection(current, next) {
113927
113978
  return current.model?.provider === next.model?.provider && current.model?.id === next.model?.id && current.reasoningEffort === next.reasoningEffort;
113928
113979
  }
113929
- function deliveryMode2(delivery) {
113980
+ function requestedDeferredDelivery(delivery) {
113930
113981
  const payload = delivery.payload;
113931
- if (payload && typeof payload === "object" && "deliveryMode" in payload) {
113932
- const parsed = MessageDeliveryModeSchema.safeParse(payload.deliveryMode);
113933
- if (parsed.success) {
113934
- return parsed.data;
113935
- }
113936
- }
113937
- return "interrupt";
113982
+ return typeof payload === "object" && payload !== null && "deliveryMode" in payload && payload.deliveryMode === "deferred";
113938
113983
  }
113939
113984
  function errorMessage4(error51) {
113940
113985
  return error51 instanceof Error ? error51.message : String(error51);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autohq/cli",
3
- "version": "0.1.611",
3
+ "version": "0.1.613",
4
4
  "license": "SEE LICENSE IN README.md",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -29,7 +29,7 @@
29
29
  "typecheck": "tsc --noEmit"
30
30
  },
31
31
  "dependencies": {
32
- "@anthropic-ai/claude-agent-sdk": "^0.3.153",
32
+ "@anthropic-ai/claude-agent-sdk": "^0.3.221",
33
33
  "@inkjs/ui": "^2.0.0",
34
34
  "@modelcontextprotocol/sdk": "^1.29.0",
35
35
  "@tanstack/react-query": "^5.100.14",