replicas-cli 0.3.444 → 0.3.446

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/index.cjs +239 -23
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -20916,6 +20916,9 @@ var init_zod = __esm({
20916
20916
  });
20917
20917
 
20918
20918
  // ../shared/src/agent.ts
20919
+ function isEngineAgentProvider(value) {
20920
+ return value !== AGENT.REPLICAS && isValidAgentProvider(value);
20921
+ }
20919
20922
  function isValidAgentProvider(value) {
20920
20923
  return VALID_AGENT_PROVIDERS.some((p) => p === value);
20921
20924
  }
@@ -20940,14 +20943,16 @@ function getProviderDisplayName(provider2, variant = "short") {
20940
20943
  return "Opencode";
20941
20944
  case "pi":
20942
20945
  return "Pi";
20946
+ case "replicas":
20947
+ return "Replicas";
20943
20948
  case "claude":
20944
20949
  return variant === "long" ? "Claude Code" : "Claude";
20945
20950
  }
20946
20951
  }
20947
20952
  function getCodingAgentDisplayNames() {
20948
- return VALID_AGENT_PROVIDERS.map((provider2) => getProviderDisplayName(provider2)).join(", ");
20953
+ return ENGINE_AGENT_PROVIDERS.map((provider2) => getProviderDisplayName(provider2)).join(", ");
20949
20954
  }
20950
- var AGENT, VALID_AGENT_PROVIDERS, SUBAGENT_MCP_HARNESSES, AGENT_PROVIDER_OPTIONS, VALID_THINKING_LEVELS, STANDARD_THINKING_LEVELS, THINKING_LEVELS_BY_AGENT;
20955
+ var AGENT, VALID_AGENT_PROVIDERS, ENGINE_AGENT_PROVIDERS, SUBAGENT_MCP_HARNESSES, AGENT_PROVIDER_OPTIONS, VALID_THINKING_LEVELS, STANDARD_THINKING_LEVELS, THINKING_LEVELS_BY_AGENT;
20951
20956
  var init_agent = __esm({
20952
20957
  "../shared/src/agent.ts"() {
20953
20958
  "use strict";
@@ -20957,9 +20962,11 @@ var init_agent = __esm({
20957
20962
  CURSOR: "cursor",
20958
20963
  MUSE: "muse",
20959
20964
  OPENCODE: "opencode",
20960
- PI: "pi"
20965
+ PI: "pi",
20966
+ REPLICAS: "replicas"
20961
20967
  };
20962
20968
  VALID_AGENT_PROVIDERS = Object.values(AGENT);
20969
+ ENGINE_AGENT_PROVIDERS = VALID_AGENT_PROVIDERS.filter(isEngineAgentProvider);
20963
20970
  SUBAGENT_MCP_HARNESSES = [AGENT.CLAUDE, AGENT.CODEX];
20964
20971
  AGENT_PROVIDER_OPTIONS = [
20965
20972
  {
@@ -21001,7 +21008,8 @@ var init_agent = __esm({
21001
21008
  cursor: STANDARD_THINKING_LEVELS,
21002
21009
  muse: VALID_THINKING_LEVELS.filter((level) => level !== "max" && level !== "ultracode"),
21003
21010
  opencode: STANDARD_THINKING_LEVELS,
21004
- pi: STANDARD_THINKING_LEVELS
21011
+ pi: STANDARD_THINKING_LEVELS,
21012
+ replicas: STANDARD_THINKING_LEVELS
21005
21013
  };
21006
21014
  }
21007
21015
  });
@@ -21166,6 +21174,10 @@ var init_agents = __esm({
21166
21174
  { method: CREDENTIAL_METHOD.OPENAI_COMPATIBLE, credentialType: CREDENTIAL_TYPE.OPENAI_COMPATIBLE },
21167
21175
  { method: CREDENTIAL_METHOD.OLLAMA, credentialType: CREDENTIAL_TYPE.OLLAMA }
21168
21176
  ],
21177
+ [AGENT.REPLICAS]: [
21178
+ { method: CREDENTIAL_METHOD.OAUTH, credentialType: CREDENTIAL_TYPE.CODEX_OAUTH },
21179
+ { method: CREDENTIAL_METHOD.API_KEY, credentialType: CREDENTIAL_TYPE.OPENAI_API_KEY }
21180
+ ],
21169
21181
  [AGENT.PI]: [
21170
21182
  { method: CREDENTIAL_METHOD.OPENCODE_GO, credentialType: CREDENTIAL_TYPE.OPENCODE_GO_API_KEY },
21171
21183
  { method: CREDENTIAL_METHOD.ASTER, credentialType: CREDENTIAL_TYPE.ASTER_API_KEY },
@@ -21489,7 +21501,7 @@ var init_mothership = __esm({
21489
21501
  mothershipLinearRuleSchema = external_exports.preprocess(withLabelIds, linearRuleFields);
21490
21502
  SUBAGENT_SERVICE_TIERS = ["default", "fast", "ultrafast"];
21491
21503
  mothershipSubagentSettingsSchema = external_exports.object({
21492
- coding_agent: external_exports.enum(VALID_AGENT_PROVIDERS),
21504
+ coding_agent: external_exports.enum(ENGINE_AGENT_PROVIDERS),
21493
21505
  model: external_exports.string().nullable(),
21494
21506
  thinking_level: external_exports.enum(VALID_THINKING_LEVELS).nullable(),
21495
21507
  service_tier: external_exports.enum(SUBAGENT_SERVICE_TIERS),
@@ -21953,6 +21965,7 @@ var init_types4 = __esm({
21953
21965
  AGENT_MODELS = {
21954
21966
  claude: Object.keys(CLAUDE_MODEL_MIN_SANDBOX_IMAGE),
21955
21967
  codex: Object.keys(CODEX_MODEL_MIN_SANDBOX_IMAGE),
21968
+ replicas: Object.keys(CODEX_MODEL_MIN_SANDBOX_IMAGE),
21956
21969
  cursor: [
21957
21970
  CLAUDE_FABLE_5_1_MODEL,
21958
21971
  CLAUDE_FABLE_5_MODEL,
@@ -22197,7 +22210,7 @@ var init_fallback_chains = __esm({
22197
22210
  init_type_guards();
22198
22211
  fallbackHarnessStepSchema = external_exports.object({
22199
22212
  kind: external_exports.literal("harness"),
22200
- provider: external_exports.enum(VALID_AGENT_PROVIDERS),
22213
+ provider: external_exports.enum(ENGINE_AGENT_PROVIDERS),
22201
22214
  model: external_exports.string().min(1),
22202
22215
  thinkingLevel: external_exports.enum(VALID_THINKING_LEVELS).optional().catch(void 0)
22203
22216
  });
@@ -22241,7 +22254,7 @@ var init_chat_fork = __esm({
22241
22254
  completedAt: external_exports.string().optional()
22242
22255
  });
22243
22256
  forkChatRequestSchema = external_exports.object({
22244
- provider: external_exports.enum(VALID_AGENT_PROVIDERS),
22257
+ provider: external_exports.enum(ENGINE_AGENT_PROVIDERS),
22245
22258
  model: external_exports.string().min(1).optional(),
22246
22259
  thinkingLevel: external_exports.enum(VALID_THINKING_LEVELS).optional(),
22247
22260
  title: external_exports.string().min(1).max(200).optional(),
@@ -22444,7 +22457,7 @@ var init_v1 = __esm({
22444
22457
  createChatRequestSchema = external_exports.object({
22445
22458
  id: external_exports.string().uuid().optional(),
22446
22459
  createdAt: external_exports.string().datetime().optional(),
22447
- provider: external_exports.enum(VALID_AGENT_PROVIDERS),
22460
+ provider: external_exports.enum(ENGINE_AGENT_PROVIDERS),
22448
22461
  title: external_exports.string().min(1).optional(),
22449
22462
  parentChatId: external_exports.string().uuid().optional(),
22450
22463
  forkSourceChatId: external_exports.string().uuid().optional(),
@@ -22456,7 +22469,7 @@ var init_v1 = __esm({
22456
22469
  message: "A side chat must fork its parent chat"
22457
22470
  });
22458
22471
  spawnSubagentRequestSchema = external_exports.object({
22459
- provider: external_exports.enum(VALID_AGENT_PROVIDERS),
22472
+ provider: external_exports.enum(ENGINE_AGENT_PROVIDERS),
22460
22473
  prompt: external_exports.string().min(1),
22461
22474
  forkTurns: external_exports.string().regex(/^(all|none|[1-9]\d*)$/).refine(
22462
22475
  (value) => value === "all" || value === "none" || Number.isSafeInteger(Number(value)),
@@ -22507,7 +22520,7 @@ var init_v1 = __esm({
22507
22520
  messageId: external_exports.string().min(1).optional(),
22508
22521
  submittedAt: external_exports.string().datetime().optional(),
22509
22522
  message: external_exports.string().min(1),
22510
- provider: external_exports.enum(VALID_AGENT_PROVIDERS).optional(),
22523
+ provider: external_exports.enum(ENGINE_AGENT_PROVIDERS).optional(),
22511
22524
  model: external_exports.string().optional(),
22512
22525
  customInstructions: external_exports.string().optional(),
22513
22526
  planMode: external_exports.boolean().optional(),
@@ -22784,6 +22797,10 @@ var init_provider_icons = __esm({
22784
22797
  viewBox: "0 0 800 800",
22785
22798
  paths: ["M165.29 165.29h352.07V400H400v117.36H282.65v117.36H165.29V165.29Zm117.36 117.36V400H400V282.65H282.65Z", "M517.36 400h117.36v234.72H517.36V400Z"],
22786
22799
  fillRules: ["evenodd", void 0]
22800
+ },
22801
+ replicas: {
22802
+ viewBox: "0 0 225 300",
22803
+ paths: ["M0 0H150V75H0V0ZM150 75H225V150H150V75ZM0 150H150V225H0V150ZM0 225H75V300H0V225ZM150 225H225V300H150V225Z"]
22787
22804
  }
22788
22805
  };
22789
22806
  SLACK_ICON_DEFINITION = {
@@ -23533,7 +23550,7 @@ var init_replicas_mcp = __esm({
23533
23550
  automationUpdateToolInputSchema = automationToolInputSchema.partial().extend({
23534
23551
  automation_id: external_exports.string().describe("Automation ID"),
23535
23552
  enabled: external_exports.boolean().optional(),
23536
- agent_provider: external_exports.enum(AGENT).nullable().optional(),
23553
+ agent_provider: external_exports.enum(ENGINE_AGENT_PROVIDERS).nullable().optional(),
23537
23554
  model: external_exports.string().nullable().optional(),
23538
23555
  thinking_level: external_exports.enum(VALID_THINKING_LEVELS).nullable().optional(),
23539
23556
  workspace_size: external_exports.enum(WORKSPACE_SIZES).optional(),
@@ -26561,7 +26578,7 @@ var init_preferences = __esm({
26561
26578
  goal_mode: null,
26562
26579
  fast_mode: null
26563
26580
  };
26564
- DEFAULT_SUBAGENT_MCP_PROVIDERS = [...VALID_AGENT_PROVIDERS];
26581
+ DEFAULT_SUBAGENT_MCP_PROVIDERS = [...ENGINE_AGENT_PROVIDERS];
26565
26582
  ALERT_SOUND_FAMILIES = {
26566
26583
  glass: ["glint", "tap", "ripple", "halo"],
26567
26584
  wood: ["ready", "pluck", "knock", "bloom", "steps"]
@@ -26605,6 +26622,7 @@ var init_preferences = __esm({
26605
26622
  slack_settings_moved_notice: false,
26606
26623
  mothership_board_opened: false,
26607
26624
  follow_up_mode: "steer",
26625
+ send_key: "enter",
26608
26626
  memory_enabled: null,
26609
26627
  subagent_mcp_enabled: null,
26610
26628
  default_fast_mode: false,
@@ -38386,17 +38404,147 @@ var init_slash_commands = __esm({
38386
38404
  command,
38387
38405
  description: "Open a side chat about this chat without interrupting it.",
38388
38406
  argumentHint: "[question]",
38389
- providers: [...VALID_AGENT_PROVIDERS]
38407
+ providers: [...ENGINE_AGENT_PROVIDERS]
38390
38408
  }))
38391
38409
  ];
38392
38410
  }
38393
38411
  });
38394
38412
 
38395
38413
  // ../shared/src/keyboard-shortcuts.ts
38396
- var MAC_KEY_LABELS, OTHER_KEY_LABELS;
38414
+ var KEYBOARD_SHORTCUTS, COMPOSER_SEND_SHORTCUTS, MAC_KEY_LABELS, OTHER_KEY_LABELS;
38397
38415
  var init_keyboard_shortcuts = __esm({
38398
38416
  "../shared/src/keyboard-shortcuts.ts"() {
38399
38417
  "use strict";
38418
+ KEYBOARD_SHORTCUTS = {
38419
+ search: { label: "Search", group: "General", keys: { key: "k", mod: true } },
38420
+ newWorkspace: {
38421
+ label: "New workspace",
38422
+ group: "General",
38423
+ keys: { key: "o", mod: true, shift: true },
38424
+ desktopKeys: { key: "n", mod: true }
38425
+ },
38426
+ toggleSidebar: { label: "Toggle sidebar", group: "General", keys: { key: "b", mod: true } },
38427
+ toggleRightPane: { label: "Toggle right pane", group: "General", keys: { key: "b", mod: true, alt: true } },
38428
+ openSettings: { label: "Settings", group: "General", keys: { key: ",", mod: true } },
38429
+ showKeyboardShortcuts: {
38430
+ label: "Keyboard shortcuts",
38431
+ group: "General",
38432
+ keys: { key: "/", mod: true },
38433
+ allowInDialog: true
38434
+ },
38435
+ saveFile: { label: "Save the open file", group: "General", keys: { key: "s", mod: true } },
38436
+ previousWorkspace: {
38437
+ label: "Previous workspace",
38438
+ group: "Navigation",
38439
+ keys: { key: "ArrowUp", alt: true },
38440
+ macKeys: { key: "ArrowUp", mod: true, alt: true }
38441
+ },
38442
+ nextWorkspace: {
38443
+ label: "Next workspace",
38444
+ group: "Navigation",
38445
+ keys: { key: "ArrowDown", alt: true },
38446
+ macKeys: { key: "ArrowDown", mod: true, alt: true }
38447
+ },
38448
+ nextWorkspaceNeedingYou: {
38449
+ label: "Next workspace that needs you",
38450
+ group: "Navigation",
38451
+ keys: { key: "ArrowDown", mod: true, alt: true, shift: true },
38452
+ linuxKeys: { key: "ArrowDown", alt: true, shift: true }
38453
+ },
38454
+ jumpToWorkspace: { label: "Workspace 1\u20139 in the sidebar", group: "Navigation", desktopKeys: { key: "1", mod: true } },
38455
+ goBack: { label: "Back", group: "Navigation", desktopKeys: { key: "[", mod: true } },
38456
+ goForward: { label: "Forward", group: "Navigation", desktopKeys: { key: "]", mod: true } },
38457
+ stopAgent: { label: "Stop the agent", group: "Chat", keys: { key: "Escape" } },
38458
+ newChat: { label: "New chat", group: "Chat", desktopKeys: { key: "t", mod: true } },
38459
+ previousChat: {
38460
+ label: "Previous chat",
38461
+ group: "Chat",
38462
+ keys: { key: "[", alt: true },
38463
+ macKeys: { key: "[", mod: true, alt: true },
38464
+ desktopKeys: { key: "Tab", ctrl: true, shift: true }
38465
+ },
38466
+ nextChat: {
38467
+ label: "Next chat",
38468
+ group: "Chat",
38469
+ keys: { key: "]", alt: true },
38470
+ macKeys: { key: "]", mod: true, alt: true },
38471
+ desktopKeys: { key: "Tab", ctrl: true }
38472
+ },
38473
+ findInChat: { label: "Find in chat", group: "Chat", desktopKeys: { key: "f", mod: true } },
38474
+ findInCanvas: { label: "Find in canvas", group: "Chat", desktopKeys: { key: "f", mod: true } },
38475
+ shareWorkspace: { label: "Share workspace", group: "Chat", keys: { key: "s", mod: true, shift: true } },
38476
+ archiveWorkspace: { label: "Archive workspace", group: "Chat", keys: { key: "e", mod: true, shift: true } },
38477
+ // Cursor's binding. Claimed only while the Add to chat toolbar is showing, so the browser keeps it otherwise.
38478
+ addToChat: { label: "Add selection to chat", group: "Chat", keys: { key: "l", mod: true } },
38479
+ // Zed's agent panel bindings (ToggleModelSelector, CycleFavoriteModels); Cursor also uses ⌥⌘/ on macOS.
38480
+ openModelPicker: {
38481
+ label: "Choose model",
38482
+ group: "Chat",
38483
+ keys: { key: "/", alt: true, shift: true },
38484
+ macKeys: { key: "/", mod: true, alt: true },
38485
+ linuxKeys: { key: "/", mod: true, alt: true }
38486
+ },
38487
+ nextModel: {
38488
+ label: "Next model",
38489
+ group: "Chat",
38490
+ keys: { key: "l", alt: true },
38491
+ macKeys: { key: "Tab", alt: true }
38492
+ },
38493
+ send: { label: "Send", group: "Composer", keys: { key: "Enter" } },
38494
+ sendAlternate: { label: "Queue or steer instead", group: "Composer", keys: { key: "Enter", alt: true } },
38495
+ newLine: { label: "New line", group: "Composer", keys: { key: "Enter", shift: true } },
38496
+ toggleTaskMode: { label: "Switch Plan / Build", group: "Composer", keys: { key: "Tab", shift: true } },
38497
+ toggleVoiceInput: { label: "Voice input", group: "Composer", keys: { key: " ", mod: true, shift: true } },
38498
+ previousPrompt: { label: "Previous prompt", group: "Composer", keys: { key: "ArrowUp" } },
38499
+ searchPromptHistory: { label: "Search prompt history", group: "Composer", keys: { key: "r", ctrl: true } },
38500
+ mentionFile: { label: "Mention a file", group: "Composer", keys: { key: "@" } },
38501
+ slashCommand: { label: "Commands and skills", group: "Composer", keys: { key: "/" } },
38502
+ previousCanvasItem: { label: "Previous item", group: "Canvas", keys: { key: "ArrowLeft" } },
38503
+ nextCanvasItem: { label: "Next item", group: "Canvas", keys: { key: "ArrowRight" } },
38504
+ exitCanvasFullScreen: { label: "Exit full screen", group: "Canvas", keys: { key: "Escape" } },
38505
+ previousMedia: { label: "Previous", group: "Media viewer", keys: { key: "ArrowLeft" } },
38506
+ nextMedia: { label: "Next", group: "Media viewer", keys: { key: "ArrowRight" } },
38507
+ zoomInMedia: { label: "Zoom in", group: "Media viewer", keys: { key: "+" } },
38508
+ zoomOutMedia: { label: "Zoom out", group: "Media viewer", keys: { key: "-" } },
38509
+ fitMediaToScreen: { label: "Fit to screen", group: "Media viewer", keys: { key: "0" } },
38510
+ toggleMediaPlayback: { label: "Play or pause", group: "Media viewer", keys: { key: " " } },
38511
+ toggleMediaText: { label: "Show text", group: "Media viewer", keys: { key: "t" } },
38512
+ showReviewShortcuts: { label: "Show help", group: "Review", keys: { key: "?" }, allowInDialog: true },
38513
+ toggleReviewSidebar: { label: "Toggle left sidebar", group: "Review", keys: { key: "[" } },
38514
+ toggleReviewSidePanel: { label: "Show or hide chat", group: "Review", keys: { key: "]" } },
38515
+ goToReviewInbox: { label: "Go to review inbox", group: "Review", prefix: "g", keys: { key: "i" } },
38516
+ showReviewShortcutsSequence: { label: "Show keyboard shortcut help", group: "Review", prefix: "g", keys: { key: "k" } },
38517
+ toggleReviewFileTree: { label: "Show or hide file tree", group: "Review", keys: { key: "f" } },
38518
+ toggleReviewMode: { label: "Switch Files / Tour", group: "Review", keys: { key: "t" } },
38519
+ showReviewDiscussion: { label: "Jump to comments", group: "Review", keys: { key: "2" } },
38520
+ showReviewCommits: { label: "Jump to commits", group: "Review", keys: { key: "3" } },
38521
+ toggleReviewComments: { label: "Show or hide comments", group: "Review", keys: { key: "i" } },
38522
+ approvePullRequest: { label: "Approve", group: "Review", prefix: "r", keys: { key: "y" } },
38523
+ nextReviewFile: { label: "Next file", group: "Review", keys: { key: "ArrowDown", mod: true } },
38524
+ previousReviewFile: { label: "Previous file", group: "Review", keys: { key: "ArrowUp", mod: true } },
38525
+ markReviewFileViewed: { label: "Mark file as viewed", group: "Review", keys: { key: "Enter", mod: true }, ignoreWhileTyping: true },
38526
+ nextReviewComment: { label: "Next thread", group: "Review", keys: { key: "ArrowDown", shift: true } },
38527
+ previousReviewComment: { label: "Previous thread", group: "Review", keys: { key: "ArrowUp", shift: true } },
38528
+ nextPullRequest: { label: "Next pull request to review", group: "Review", keys: { key: "ArrowDown", mod: true, shift: true } },
38529
+ previousPullRequest: { label: "Previous pull request to review", group: "Review", keys: { key: "ArrowUp", mod: true, shift: true } },
38530
+ copyReviewLink: { label: "Copy link", group: "Review", prefix: "c", keys: { key: "l" } },
38531
+ copyPullRequestNumber: { label: "Copy PR number", group: "Review", prefix: "c", keys: { key: "n" } },
38532
+ copyPullRequestTitle: { label: "Copy title", group: "Review", prefix: "c", keys: { key: "t" } },
38533
+ copyPullRequestBranch: { label: "Copy branch name", group: "Review", prefix: "c", keys: { key: "b" } },
38534
+ copyPullRequestCheckout: { label: "Copy checkout command", group: "Review", prefix: "c", keys: { key: "c" } },
38535
+ copyPullRequestGitHubLink: { label: "Copy GitHub link", group: "Review", prefix: "c", keys: { key: "g" } },
38536
+ copyPullRequest: { label: "Copy PR", group: "Review", prefix: "c", keys: { key: "p" } },
38537
+ openReviewChat: { label: "Start chat", group: "Review", keys: { key: ";", mod: true } },
38538
+ mergePullRequest: { label: "Merge", group: "Review", keys: { key: "m" } }
38539
+ };
38540
+ COMPOSER_SEND_SHORTCUTS = {
38541
+ enter: { send: KEYBOARD_SHORTCUTS.send, sendAlternate: KEYBOARD_SHORTCUTS.sendAlternate, newLine: KEYBOARD_SHORTCUTS.newLine },
38542
+ mod_enter: {
38543
+ send: { ...KEYBOARD_SHORTCUTS.send, keys: { key: "Enter", mod: true } },
38544
+ sendAlternate: { ...KEYBOARD_SHORTCUTS.sendAlternate, keys: { key: "Enter", mod: true, alt: true } },
38545
+ newLine: { ...KEYBOARD_SHORTCUTS.newLine, keys: { key: "Enter" } }
38546
+ }
38547
+ };
38400
38548
  MAC_KEY_LABELS = {
38401
38549
  ArrowUp: "\u2191",
38402
38550
  ArrowDown: "\u2193",
@@ -38605,6 +38753,71 @@ var init_organizations = __esm({
38605
38753
  }
38606
38754
  });
38607
38755
 
38756
+ // ../shared/src/harness/types.ts
38757
+ var HARNESS_THREAD_STATUSES, textSchema, imageSchema, userMessageSchema, assistantMessageSchema, toolResultMessageSchema, harnessInboxPayloadSchemas, harnessEventBodySchema;
38758
+ var init_types8 = __esm({
38759
+ "../shared/src/harness/types.ts"() {
38760
+ "use strict";
38761
+ init_zod();
38762
+ init_agent();
38763
+ HARNESS_THREAD_STATUSES = ["idle", "working", "error"];
38764
+ textSchema = external_exports.looseObject({ type: external_exports.literal("text"), text: external_exports.string() });
38765
+ imageSchema = external_exports.looseObject({ type: external_exports.literal("image"), data: external_exports.string(), mimeType: external_exports.string() });
38766
+ userMessageSchema = external_exports.looseObject({
38767
+ role: external_exports.literal("user"),
38768
+ content: external_exports.union([external_exports.string(), external_exports.array(external_exports.discriminatedUnion("type", [textSchema, imageSchema]))]),
38769
+ timestamp: external_exports.number()
38770
+ });
38771
+ assistantMessageSchema = external_exports.looseObject({
38772
+ role: external_exports.literal("assistant"),
38773
+ content: external_exports.array(external_exports.discriminatedUnion("type", [
38774
+ textSchema,
38775
+ external_exports.looseObject({ type: external_exports.literal("thinking"), thinking: external_exports.string() }),
38776
+ external_exports.looseObject({ type: external_exports.literal("toolCall"), id: external_exports.string(), name: external_exports.string(), arguments: external_exports.record(external_exports.string(), external_exports.json()) })
38777
+ ])),
38778
+ api: external_exports.string(),
38779
+ provider: external_exports.string(),
38780
+ model: external_exports.string(),
38781
+ usage: external_exports.looseObject({
38782
+ input: external_exports.number(),
38783
+ output: external_exports.number(),
38784
+ cacheRead: external_exports.number(),
38785
+ cacheWrite: external_exports.number(),
38786
+ totalTokens: external_exports.number(),
38787
+ cost: external_exports.looseObject({ input: external_exports.number(), output: external_exports.number(), cacheRead: external_exports.number(), cacheWrite: external_exports.number(), total: external_exports.number() })
38788
+ }),
38789
+ stopReason: external_exports.enum(["pending", "stop", "length", "toolUse", "error", "aborted", "deferred"]),
38790
+ timestamp: external_exports.number()
38791
+ });
38792
+ toolResultMessageSchema = external_exports.looseObject({
38793
+ role: external_exports.literal("toolResult"),
38794
+ toolCallId: external_exports.string(),
38795
+ toolName: external_exports.string(),
38796
+ content: external_exports.array(external_exports.discriminatedUnion("type", [textSchema, imageSchema])),
38797
+ isError: external_exports.boolean(),
38798
+ timestamp: external_exports.number()
38799
+ });
38800
+ harnessInboxPayloadSchemas = {
38801
+ message: external_exports.looseObject({
38802
+ message: userMessageSchema,
38803
+ userId: external_exports.string().nullable(),
38804
+ messageId: external_exports.string().optional(),
38805
+ model: external_exports.string().optional(),
38806
+ thinkingLevel: external_exports.enum(VALID_THINKING_LEVELS).optional()
38807
+ }),
38808
+ interrupt: external_exports.looseObject({ userId: external_exports.string().nullable() })
38809
+ };
38810
+ harnessEventBodySchema = external_exports.discriminatedUnion("type", [
38811
+ external_exports.object({ type: external_exports.literal("user_message"), payload: harnessInboxPayloadSchemas.message }),
38812
+ /** Saved before its tool calls run. */
38813
+ external_exports.object({ type: external_exports.literal("assistant_message"), payload: external_exports.looseObject({ message: assistantMessageSchema }) }),
38814
+ external_exports.object({ type: external_exports.literal("tool_result"), payload: external_exports.looseObject({ message: toolResultMessageSchema }) }),
38815
+ external_exports.object({ type: external_exports.literal("status"), payload: external_exports.looseObject({ status: external_exports.enum(HARNESS_THREAD_STATUSES) }) }),
38816
+ external_exports.object({ type: external_exports.literal("error"), payload: external_exports.looseObject({ message: external_exports.string() }) })
38817
+ ]);
38818
+ }
38819
+ });
38820
+
38608
38821
  // ../shared/src/headless-agent.ts
38609
38822
  var headlessAgentRequestSchema;
38610
38823
  var init_headless_agent = __esm({
@@ -38669,7 +38882,7 @@ var CLI_VERSION;
38669
38882
  var init_cli_version = __esm({
38670
38883
  "../shared/src/cli-version.ts"() {
38671
38884
  "use strict";
38672
- CLI_VERSION = "0.3.444";
38885
+ CLI_VERSION = "0.3.445";
38673
38886
  }
38674
38887
  });
38675
38888
 
@@ -39117,7 +39330,7 @@ var init_scout2 = __esm({
39117
39330
  RESET_TO_DEFAULT = "default";
39118
39331
  resettable = (schema, description) => external_exports.union([schema, external_exports.literal(RESET_TO_DEFAULT)]).optional().describe(`${description} \`${RESET_TO_DEFAULT}\` falls back to the organization default. Omit to keep it.`);
39119
39332
  scoutSetSlackAgentDefaultsToolInputSchema = scoutSlackConfirmationSchema.extend({
39120
- agent_provider: resettable(external_exports.enum(AGENT), "Agent for Slack-triggered workspaces. Changing it without `model` resets the model to that agent's default."),
39333
+ agent_provider: resettable(external_exports.enum(ENGINE_AGENT_PROVIDERS), "Agent for Slack-triggered workspaces. Changing it without `model` resets the model to that agent's default."),
39121
39334
  model: resettable(external_exports.string(), "Model id for that agent; the default is the agent's own."),
39122
39335
  thinking_level: resettable(external_exports.enum(VALID_THINKING_LEVELS), "Thinking level."),
39123
39336
  goal_mode: resettable(external_exports.boolean(), "Goal mode."),
@@ -39764,7 +39977,7 @@ var init_review_messages = __esm({
39764
39977
  }).shape,
39765
39978
  /** Starts a new chat instead of continuing the PR's review chat. The provider only applies to a new chat. */
39766
39979
  newChat: external_exports.boolean().optional(),
39767
- provider: external_exports.enum(VALID_AGENT_PROVIDERS).optional()
39980
+ provider: external_exports.enum(ENGINE_AGENT_PROVIDERS).optional()
39768
39981
  });
39769
39982
  }
39770
39983
  });
@@ -39842,8 +40055,8 @@ var init_github_checks = __esm({
39842
40055
  function validateAgentSelection(body, existing, modelCatalogs = {}) {
39843
40056
  const agentProvider = body.agent_provider;
39844
40057
  if (agentProvider !== void 0 && agentProvider !== null) {
39845
- if (!isValidAgentProvider(agentProvider)) {
39846
- return createErrorResult({ message: `Invalid agent_provider: must be one of ${VALID_AGENT_PROVIDERS.join(", ")}` });
40058
+ if (!isEngineAgentProvider(agentProvider)) {
40059
+ return createErrorResult({ message: `Invalid agent_provider: must be one of ${ENGINE_AGENT_PROVIDERS.join(", ")}` });
39847
40060
  }
39848
40061
  }
39849
40062
  const executionAgent = agentProvider !== void 0 ? agentProvider : existing.agentProvider;
@@ -49780,7 +49993,7 @@ var init_provider = __esm({
49780
49993
 
49781
49994
  // ../shared/src/object-store/types.ts
49782
49995
  var MEDIA_KIND, MEDIA_KINDS, PUBLIC_MEDIA_KINDS, MAX_ENGINE_LOG_BYTES;
49783
- var init_types8 = __esm({
49996
+ var init_types9 = __esm({
49784
49997
  "../shared/src/object-store/types.ts"() {
49785
49998
  "use strict";
49786
49999
  init_agent();
@@ -50028,6 +50241,7 @@ var init_src = __esm({
50028
50241
  init_terminal();
50029
50242
  init_replicas_mcp();
50030
50243
  init_subagent_mcp();
50244
+ init_types8();
50031
50245
  init_headless_agent();
50032
50246
  init_errors3();
50033
50247
  init_external_api_host();
@@ -50123,7 +50337,7 @@ var init_src = __esm({
50123
50337
  init_onboarding_emails();
50124
50338
  init_onboarding_emails2();
50125
50339
  init_provider();
50126
- init_types8();
50340
+ init_types9();
50127
50341
  init_media2();
50128
50342
  init_memory();
50129
50343
  init_learned_skills();
@@ -53946,6 +54160,7 @@ async function chatInterruptCommand(id, chatId) {
53946
54160
  async function chatForkCommand(id, chatId, options) {
53947
54161
  const provider2 = parseReplicaAgent(options.agent);
53948
54162
  if (!provider2) throw new Error("--agent is required");
54163
+ if (!isEngineAgentProvider(provider2)) throw new Error("Chats cannot be forked to the Replicas harness");
53949
54164
  const body = {
53950
54165
  provider: provider2,
53951
54166
  title: options.title,
@@ -53997,6 +54212,7 @@ var init_chat = __esm({
53997
54212
  "src/commands/chat.ts"() {
53998
54213
  "use strict";
53999
54214
  import_chalk24 = __toESM(require("chalk"));
54215
+ init_src();
54000
54216
  init_api2();
54001
54217
  init_output();
54002
54218
  init_replica2();
@@ -54149,8 +54365,8 @@ function parseAgentProviderOption(value) {
54149
54365
  const trimmed = value.trim();
54150
54366
  if (trimmed === "" || trimmed.toLowerCase() === "none") return null;
54151
54367
  const lower = trimmed.toLowerCase();
54152
- if (!isValidAgentProvider(lower)) {
54153
- throw new Error(`Invalid --agent-provider: ${value}. Valid options: ${VALID_AGENT_PROVIDERS.join(", ")}, none`);
54368
+ if (!isEngineAgentProvider(lower)) {
54369
+ throw new Error(`Invalid --agent-provider: ${value}. Valid options: ${ENGINE_AGENT_PROVIDERS.join(", ")}, none`);
54154
54370
  }
54155
54371
  return lower;
54156
54372
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.444",
3
+ "version": "0.3.446",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {