@autohq/cli 0.1.591 → 0.1.593

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.
@@ -37736,7 +37736,7 @@ Object.assign(lookup, {
37736
37736
  // package.json
37737
37737
  var package_default = {
37738
37738
  name: "@autohq/cli",
37739
- version: "0.1.591",
37739
+ version: "0.1.593",
37740
37740
  license: "SEE LICENSE IN README.md",
37741
37741
  publishConfig: {
37742
37742
  access: "public"
@@ -40412,6 +40412,35 @@ var TranscriptActivitySchema = external_exports.discriminatedUnion("type", [
40412
40412
  external_exports.object({
40413
40413
  type: external_exports.literal("run"),
40414
40414
  command: external_exports.string()
40415
+ }),
40416
+ external_exports.object({
40417
+ type: external_exports.literal("edit"),
40418
+ paths: external_exports.array(external_exports.string()).optional()
40419
+ }),
40420
+ external_exports.object({
40421
+ type: external_exports.literal("tool"),
40422
+ name: external_exports.string(),
40423
+ provider: external_exports.string().optional()
40424
+ }),
40425
+ external_exports.object({
40426
+ type: external_exports.literal("webSearch"),
40427
+ query: external_exports.string()
40428
+ }),
40429
+ external_exports.object({
40430
+ type: external_exports.literal("imageView"),
40431
+ path: external_exports.string()
40432
+ }),
40433
+ external_exports.object({
40434
+ type: external_exports.literal("collaboration"),
40435
+ action: external_exports.string()
40436
+ }),
40437
+ external_exports.object({
40438
+ type: external_exports.literal("wait"),
40439
+ durationMs: external_exports.number().nonnegative()
40440
+ }),
40441
+ external_exports.object({
40442
+ type: external_exports.literal("imageGeneration"),
40443
+ savedPath: external_exports.string().optional()
40415
40444
  })
40416
40445
  ]);
40417
40446
  var TranscriptToolMetadataSchema = external_exports.object({
@@ -40499,13 +40528,74 @@ var CodexMcpToolCallItemSchema = external_exports.object({
40499
40528
  error: external_exports.object({ message: external_exports.string() }).passthrough().nullish(),
40500
40529
  durationMs: external_exports.number().nonnegative().nullish()
40501
40530
  }).passthrough();
40531
+ var CodexDynamicToolCallItemSchema = external_exports.object({
40532
+ type: external_exports.literal("dynamicToolCall"),
40533
+ id: external_exports.string(),
40534
+ namespace: external_exports.string().nullish(),
40535
+ tool: external_exports.string().default(""),
40536
+ arguments: external_exports.unknown().optional(),
40537
+ status: external_exports.string().optional(),
40538
+ contentItems: external_exports.array(external_exports.unknown()).nullish(),
40539
+ success: external_exports.boolean().nullish(),
40540
+ durationMs: external_exports.number().nonnegative().nullish()
40541
+ }).passthrough();
40542
+ var CodexCollabAgentToolCallItemSchema = external_exports.object({
40543
+ type: external_exports.literal("collabAgentToolCall"),
40544
+ id: external_exports.string(),
40545
+ tool: external_exports.string(),
40546
+ status: external_exports.string().optional(),
40547
+ senderThreadId: external_exports.string().default(""),
40548
+ receiverThreadIds: external_exports.array(external_exports.string()).default([]),
40549
+ prompt: external_exports.string().nullish(),
40550
+ model: external_exports.string().nullish(),
40551
+ reasoningEffort: external_exports.string().nullish(),
40552
+ agentsStates: external_exports.record(external_exports.string(), external_exports.unknown()).default({})
40553
+ }).passthrough();
40554
+ var CodexSubAgentActivityItemSchema = external_exports.object({
40555
+ type: external_exports.literal("subAgentActivity"),
40556
+ id: external_exports.string(),
40557
+ kind: external_exports.string(),
40558
+ agentThreadId: external_exports.string(),
40559
+ agentPath: external_exports.string()
40560
+ }).passthrough();
40561
+ var CodexWebSearchItemSchema = external_exports.object({
40562
+ type: external_exports.literal("webSearch"),
40563
+ id: external_exports.string(),
40564
+ query: external_exports.string().default(""),
40565
+ action: external_exports.unknown().nullish()
40566
+ }).passthrough();
40567
+ var CodexImageViewItemSchema = external_exports.object({
40568
+ type: external_exports.literal("imageView"),
40569
+ id: external_exports.string(),
40570
+ path: external_exports.string()
40571
+ }).passthrough();
40572
+ var CodexSleepItemSchema = external_exports.object({
40573
+ type: external_exports.literal("sleep"),
40574
+ id: external_exports.string(),
40575
+ durationMs: external_exports.number().nonnegative()
40576
+ }).passthrough();
40577
+ var CodexImageGenerationItemSchema = external_exports.object({
40578
+ type: external_exports.literal("imageGeneration"),
40579
+ id: external_exports.string(),
40580
+ status: external_exports.string().optional(),
40581
+ revisedPrompt: external_exports.string().nullish(),
40582
+ result: external_exports.string().default(""),
40583
+ savedPath: external_exports.string().optional()
40584
+ }).passthrough();
40502
40585
  var CodexItemSchema = external_exports.discriminatedUnion("type", [
40503
40586
  CodexUserMessageItemSchema,
40504
40587
  CodexAgentMessageItemSchema,
40505
40588
  CodexReasoningItemSchema,
40506
40589
  CodexCommandExecutionItemSchema,
40507
40590
  CodexFileChangeItemSchema,
40508
- CodexMcpToolCallItemSchema
40591
+ CodexMcpToolCallItemSchema,
40592
+ CodexDynamicToolCallItemSchema,
40593
+ CodexCollabAgentToolCallItemSchema,
40594
+ CodexSubAgentActivityItemSchema,
40595
+ CodexWebSearchItemSchema,
40596
+ CodexImageViewItemSchema,
40597
+ CodexSleepItemSchema,
40598
+ CodexImageGenerationItemSchema
40509
40599
  ]);
40510
40600
  var OptionalCodexItemSchema = external_exports.unknown().transform((value2) => {
40511
40601
  const parsed = CodexItemSchema.safeParse(value2);
@@ -47084,37 +47174,18 @@ var TEAM_TEMPLATES = [
47084
47174
  id: "staff-engineer",
47085
47175
  roleLine: "Owns each task end to end through CI and review."
47086
47176
  },
47087
- {
47088
- id: "senior-engineer",
47089
- roleLine: "Handles complex scoped implementation work."
47090
- },
47091
47177
  {
47092
47178
  id: "junior-engineer",
47093
47179
  roleLine: "Takes mechanical and batch coding work."
47094
47180
  },
47095
- {
47096
- id: "designer",
47097
- roleLine: "Iterates on live UI and graduates it to a production PR."
47098
- },
47099
47181
  {
47100
47182
  id: "pr-review",
47101
47183
  roleLine: "Reviews every pull request against the current head."
47102
47184
  },
47103
- {
47104
- id: "intern",
47105
- roleLine: "Handles quick questions, small fixes, and grunt work."
47106
- },
47107
- {
47108
- id: "ship-digest",
47109
- roleLine: "Summarizes what shipped and what needs attention."
47110
- },
47111
- {
47112
- id: "workforce-optimization-consultant",
47113
- roleLine: "Produces weekly evidence-based team scorecards."
47114
- },
47115
47185
  SELF_IMPROVEMENT
47116
47186
  ],
47117
47187
  availability: "available",
47188
+ onboardingPickerEnabled: true,
47118
47189
  legacyKits: [
47119
47190
  {
47120
47191
  id: "startup",
@@ -47198,6 +47269,7 @@ var TEAM_TEMPLATES = [
47198
47269
  SELF_IMPROVEMENT
47199
47270
  ],
47200
47271
  availability: "available",
47272
+ onboardingPickerEnabled: false,
47201
47273
  legacyKits: [
47202
47274
  {
47203
47275
  id: "code-quality",
@@ -47258,6 +47330,7 @@ var TEAM_TEMPLATES = [
47258
47330
  SELF_IMPROVEMENT
47259
47331
  ],
47260
47332
  availability: "available",
47333
+ onboardingPickerEnabled: false,
47261
47334
  legacyKits: [
47262
47335
  {
47263
47336
  id: "ops",
@@ -47285,6 +47358,7 @@ var TEAM_TEMPLATES = [
47285
47358
  }
47286
47359
  ],
47287
47360
  availability: "available",
47361
+ onboardingPickerEnabled: true,
47288
47362
  legacyKits: [{ id: "custom", name: "Custom", agents: [] }]
47289
47363
  }
47290
47364
  ];
@@ -84538,7 +84612,10 @@ var ClaudeCodeProjector = class {
84538
84612
  this.activeParts.clear();
84539
84613
  this.activeToolInputs.clear();
84540
84614
  this.interruptMarkerSeen = false;
84541
- return this.ensureResponseStarted(this.currentMessageId);
84615
+ return [
84616
+ ...this.ensureResponseStarted(this.currentMessageId),
84617
+ uiChunk({ type: "start-step" })
84618
+ ];
84542
84619
  }
84543
84620
  if (message.event.type === "message_stop") {
84544
84621
  const outputs = [
@@ -84711,7 +84788,8 @@ var ClaudeCodeProjector = class {
84711
84788
  const messageId = messageProjection?.messageId ?? toolCallProjections.find((projection) => projection.messageId)?.messageId ?? UNKNOWN_MESSAGE_ID;
84712
84789
  const standalone = this.activeResponseMessageId === null;
84713
84790
  const outputs = [
84714
- ...this.ensureResponseStarted(messageId)
84791
+ ...this.ensureResponseStarted(messageId),
84792
+ uiChunk({ type: "start-step" })
84715
84793
  ];
84716
84794
  if (messageProjection) {
84717
84795
  outputs.push(...messagePartChunks(messageProjection));
@@ -84719,7 +84797,8 @@ var ClaudeCodeProjector = class {
84719
84797
  outputs.push(
84720
84798
  ...toolCallProjections.flatMap(
84721
84799
  (projection) => toolCallChunks(projection)
84722
- )
84800
+ ),
84801
+ uiChunk({ type: "finish-step" })
84723
84802
  );
84724
84803
  if (standalone && toolCallProjections.length === 0) {
84725
84804
  outputs.push(uiChunk({ type: "finish", finishReason: "stop" }));
@@ -87261,12 +87340,14 @@ var CodexProjector = class {
87261
87340
  activeToolCalls = /* @__PURE__ */ new Set();
87262
87341
  activeToolMetadata = /* @__PURE__ */ new Map();
87263
87342
  activeToolOutput = /* @__PURE__ */ new Map();
87343
+ activeSteps = /* @__PURE__ */ new Set();
87264
87344
  activeResponseMessageId = null;
87265
87345
  project(notification) {
87266
87346
  switch (notification.type) {
87267
87347
  case "agentMessageDelta":
87268
87348
  return [
87269
87349
  ...this.ensureResponseStarted(notification.itemId),
87350
+ ...this.ensureStepStarted(notification.itemId),
87270
87351
  ...this.projectAgentMessageDelta(
87271
87352
  notification.itemId,
87272
87353
  notification.delta
@@ -87293,7 +87374,10 @@ var CodexProjector = class {
87293
87374
  case "itemCompleted":
87294
87375
  return this.projectItem(notification.item, "completed");
87295
87376
  case "turnCompleted": {
87296
- const outputs = this.endAllReasoningParts();
87377
+ const outputs = [
87378
+ ...this.endAllReasoningParts(),
87379
+ ...this.finishAllSteps()
87380
+ ];
87297
87381
  this.activeResponseMessageId = null;
87298
87382
  this.activeAgentMessages.clear();
87299
87383
  this.agentMessagePhases.clear();
@@ -87376,7 +87460,10 @@ var CodexProjector = class {
87376
87460
  if (delta.length === 0) {
87377
87461
  return [];
87378
87462
  }
87379
- const outputs = this.ensureResponseStarted(itemId);
87463
+ const outputs = [
87464
+ ...this.ensureResponseStarted(itemId),
87465
+ ...this.ensureStepStarted(itemId)
87466
+ ];
87380
87467
  const active = this.activeReasoningParts.get(itemId);
87381
87468
  if (active && active.summaryIndex !== summaryIndex) {
87382
87469
  outputs.push(...this.endReasoningPart(itemId));
@@ -87423,10 +87510,15 @@ var CodexProjector = class {
87423
87510
  }
87424
87511
  return [
87425
87512
  ...this.ensureResponseStarted(item.id),
87513
+ ...this.ensureStepStarted(item.id),
87426
87514
  ...this.projectAgentMessageItem(item, phase)
87427
87515
  ];
87428
87516
  case "reasoning":
87429
- return this.projectReasoningItem(item, phase);
87517
+ return [
87518
+ ...this.ensureResponseStarted(item.id),
87519
+ ...this.ensureStepStarted(item.id),
87520
+ ...this.projectReasoningItem(item, phase)
87521
+ ];
87430
87522
  case "commandExecution":
87431
87523
  return this.projectToolItem({
87432
87524
  phase,
@@ -87456,7 +87548,14 @@ var CodexProjector = class {
87456
87548
  isDenied: isDeclinedStatus(item.status),
87457
87549
  isError: isFailedStatus(item.status),
87458
87550
  title: "apply_patch",
87459
- toolMetadata: statusMetadata(item.status)
87551
+ toolMetadata: statusMetadata(item.status, {
87552
+ activities: [
87553
+ {
87554
+ type: "edit",
87555
+ paths: fileChangePaths(item.changes)
87556
+ }
87557
+ ]
87558
+ })
87460
87559
  });
87461
87560
  case "mcpToolCall":
87462
87561
  if (isAskUserMcpTool(item.server, item.tool)) {
@@ -87476,6 +87575,132 @@ var CodexProjector = class {
87476
87575
  ...item.durationMs != null ? { durationMs: item.durationMs } : {}
87477
87576
  })
87478
87577
  });
87578
+ case "dynamicToolCall": {
87579
+ const name23 = item.namespace ? `${item.namespace}.${item.tool}` : item.tool;
87580
+ return this.projectToolItem({
87581
+ phase,
87582
+ itemId: item.id,
87583
+ name: name23,
87584
+ input: toJsonValue(item.arguments),
87585
+ output: {
87586
+ contentItems: toJsonValue(item.contentItems),
87587
+ success: item.success
87588
+ },
87589
+ isError: isFailedStatus(item.status) || item.success === false,
87590
+ title: name23,
87591
+ toolMetadata: statusMetadata(item.status, {
87592
+ tool: item.tool,
87593
+ ...item.namespace ? { server: item.namespace } : {},
87594
+ activities: [
87595
+ {
87596
+ type: "tool",
87597
+ name: item.tool,
87598
+ ...item.namespace ? { provider: item.namespace } : {}
87599
+ }
87600
+ ],
87601
+ ...item.durationMs != null ? { durationMs: item.durationMs } : {}
87602
+ })
87603
+ });
87604
+ }
87605
+ case "collabAgentToolCall":
87606
+ return this.projectToolItem({
87607
+ phase,
87608
+ itemId: item.id,
87609
+ name: `collaboration.${item.tool}`,
87610
+ input: {
87611
+ prompt: item.prompt,
87612
+ receiverThreadIds: item.receiverThreadIds,
87613
+ model: item.model,
87614
+ reasoningEffort: item.reasoningEffort
87615
+ },
87616
+ output: {
87617
+ status: item.status ?? "unknown",
87618
+ agentsStates: item.agentsStates
87619
+ },
87620
+ isError: isFailedStatus(item.status),
87621
+ title: item.tool,
87622
+ toolMetadata: statusMetadata(item.status, {
87623
+ activities: [{ type: "collaboration", action: item.tool }]
87624
+ })
87625
+ });
87626
+ case "subAgentActivity":
87627
+ return this.projectToolItem({
87628
+ phase,
87629
+ itemId: item.id,
87630
+ name: "collaboration.sub_agent_activity",
87631
+ input: {
87632
+ kind: item.kind,
87633
+ agentThreadId: item.agentThreadId,
87634
+ agentPath: item.agentPath
87635
+ },
87636
+ output: { status: "completed" },
87637
+ isError: false,
87638
+ title: item.kind,
87639
+ toolMetadata: {
87640
+ activities: [{ type: "collaboration", action: item.kind }]
87641
+ }
87642
+ });
87643
+ case "webSearch":
87644
+ return this.projectToolItem({
87645
+ phase,
87646
+ itemId: item.id,
87647
+ name: "web_search",
87648
+ input: { query: item.query, action: toJsonValue(item.action) },
87649
+ output: { status: "completed" },
87650
+ isError: false,
87651
+ title: item.query || "Web search",
87652
+ toolMetadata: {
87653
+ activities: [{ type: "webSearch", query: item.query }]
87654
+ }
87655
+ });
87656
+ case "imageView":
87657
+ return this.projectToolItem({
87658
+ phase,
87659
+ itemId: item.id,
87660
+ name: "view_image",
87661
+ input: { path: item.path },
87662
+ output: { status: "viewed" },
87663
+ isError: false,
87664
+ title: item.path,
87665
+ toolMetadata: {
87666
+ activities: [{ type: "imageView", path: item.path }]
87667
+ }
87668
+ });
87669
+ case "sleep":
87670
+ return this.projectToolItem({
87671
+ phase,
87672
+ itemId: item.id,
87673
+ name: "wait",
87674
+ input: { durationMs: item.durationMs },
87675
+ output: { status: "completed" },
87676
+ isError: false,
87677
+ title: "Wait",
87678
+ toolMetadata: {
87679
+ activities: [{ type: "wait", durationMs: item.durationMs }],
87680
+ durationMs: item.durationMs
87681
+ }
87682
+ });
87683
+ case "imageGeneration":
87684
+ return this.projectToolItem({
87685
+ phase,
87686
+ itemId: item.id,
87687
+ name: "image_generation",
87688
+ input: { prompt: item.revisedPrompt },
87689
+ output: {
87690
+ result: item.result,
87691
+ ...item.savedPath ? { savedPath: item.savedPath } : {}
87692
+ },
87693
+ isError: isFailedStatus(item.status),
87694
+ title: item.revisedPrompt ?? "Generate image",
87695
+ toolMetadata: statusMetadata(item.status, {
87696
+ activities: [
87697
+ {
87698
+ type: "imageGeneration",
87699
+ ...item.savedPath ? { savedPath: item.savedPath } : {}
87700
+ }
87701
+ ]
87702
+ })
87703
+ });
87479
87704
  default:
87480
87705
  return [];
87481
87706
  }
@@ -87483,6 +87708,7 @@ var CodexProjector = class {
87483
87708
  projectToolItem(input) {
87484
87709
  const outputs = [];
87485
87710
  outputs.push(...this.ensureResponseStarted(input.itemId));
87711
+ outputs.push(...this.ensureStepStarted(input.itemId));
87486
87712
  if (input.toolMetadata) {
87487
87713
  this.activeToolMetadata.set(input.itemId, input.toolMetadata);
87488
87714
  }
@@ -87498,7 +87724,7 @@ var CodexProjector = class {
87498
87724
  input.output = this.activeToolOutput.get(input.itemId)?.output ?? "";
87499
87725
  }
87500
87726
  outputs.push(toolOutputChunk(input));
87501
- outputs.push(uiChunk2({ type: "finish-step" }));
87727
+ outputs.push(...this.finishStep(input.itemId));
87502
87728
  this.activeToolCalls.delete(input.itemId);
87503
87729
  this.activeToolMetadata.delete(input.itemId);
87504
87730
  this.activeToolOutput.delete(input.itemId);
@@ -87531,7 +87757,7 @@ var CodexProjector = class {
87531
87757
  }
87532
87758
  outputs.push(
87533
87759
  textBoundaryChunk("text-end", item.id, messagePhase),
87534
- uiChunk2({ type: "finish-step" })
87760
+ ...this.finishStep(item.id)
87535
87761
  );
87536
87762
  this.activeAgentMessages.delete(item.id);
87537
87763
  this.agentMessagePhases.delete(item.id);
@@ -87546,15 +87772,11 @@ var CodexProjector = class {
87546
87772
  this.streamedReasoningIndexes.delete(item.id);
87547
87773
  if (streamedIndexes && streamedIndexes.size > 0) {
87548
87774
  outputs.push(...reasoningItemChunks(item, streamedIndexes));
87549
- outputs.push(uiChunk2({ type: "finish-step" }));
87775
+ outputs.push(...this.finishStep(item.id));
87550
87776
  return outputs;
87551
87777
  }
87552
87778
  const completedChunks = reasoningItemChunks(item);
87553
- return completedChunks.length > 0 ? [
87554
- ...this.ensureResponseStarted(item.id),
87555
- ...completedChunks,
87556
- uiChunk2({ type: "finish-step" })
87557
- ] : [];
87779
+ return [...completedChunks, ...this.finishStep(item.id)];
87558
87780
  }
87559
87781
  endReasoningPart(itemId) {
87560
87782
  const active = this.activeReasoningParts.get(itemId);
@@ -87576,6 +87798,26 @@ var CodexProjector = class {
87576
87798
  this.activeResponseMessageId = messageId;
87577
87799
  return [uiChunk2({ type: "start", messageId })];
87578
87800
  }
87801
+ ensureStepStarted(itemId) {
87802
+ if (this.activeSteps.has(itemId)) {
87803
+ return [];
87804
+ }
87805
+ this.activeSteps.add(itemId);
87806
+ return [uiChunk2({ type: "start-step" })];
87807
+ }
87808
+ finishStep(itemId) {
87809
+ if (!this.activeSteps.delete(itemId)) {
87810
+ return [];
87811
+ }
87812
+ return [uiChunk2({ type: "finish-step" })];
87813
+ }
87814
+ finishAllSteps() {
87815
+ const outputs = [...this.activeSteps].map(
87816
+ () => uiChunk2({ type: "finish-step" })
87817
+ );
87818
+ this.activeSteps.clear();
87819
+ return outputs;
87820
+ }
87579
87821
  };
87580
87822
  function emptyToolOutput() {
87581
87823
  return { bytes: 0, output: "", truncated: false };
@@ -87699,6 +87941,14 @@ function commandActivities(actions) {
87699
87941
  }
87700
87942
  });
87701
87943
  }
87944
+ function fileChangePaths(changes) {
87945
+ return changes.flatMap((change) => {
87946
+ if (typeof change !== "object" || change === null || !("path" in change) || typeof change.path !== "string") {
87947
+ return [];
87948
+ }
87949
+ return [change.path];
87950
+ });
87951
+ }
87702
87952
  function turnCompletionEntry(notification) {
87703
87953
  if (notification.status === "failed") {
87704
87954
  const detail = notification.errorMessage ?? "unknown error";