replicas-cli 0.2.505 → 0.2.506

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.mjs +44 -8
  2. package/package.json +3 -2
package/dist/index.mjs CHANGED
@@ -9656,6 +9656,27 @@ const message = await replicas.slack.call<{ channel: string; ts: string }>('chat
9656
9656
  await replicas.slack.attachThread({ channel: message.channel, threadTs: message.ts });
9657
9657
  \`\`\`
9658
9658
 
9659
+ A link in the message text stays plain text, so when the message carries a pull request or merge request link, pass \`blocks\` alongside \`text\` to render a button for it. Keep \`text\` set to the same message \u2014 Slack uses it for notifications and fallback.
9660
+
9661
+ \`\`\`ts
9662
+ await replicas.slack.call('chat.postMessage', {
9663
+ channel: 'C0123ABC',
9664
+ thread_ts: '1234567890.123456',
9665
+ text: summary,
9666
+ blocks: [
9667
+ { type: 'section', text: { type: 'mrkdwn', text: summary } },
9668
+ {
9669
+ type: 'actions',
9670
+ elements: [
9671
+ { type: 'button', text: { type: 'plain_text', text: 'View PR' }, url: prUrl, action_id: 'view_pr' },
9672
+ ],
9673
+ },
9674
+ ],
9675
+ });
9676
+ \`\`\`
9677
+
9678
+ Use "View MR" for GitLab. With several links, give each button a unique \`action_id\` and name its repository in the label ("View PR \xB7 web").
9679
+
9659
9680
  Attach every new top-level conversation so future replies route to this workspace. For a reply in another thread, attach its root \`thread_ts\`, not the reply timestamp. Do not attach the originating thread again.
9660
9681
 
9661
9682
  ## Search and batch
@@ -9722,6 +9743,7 @@ var DEFAULT_USER_PREFERENCES = {
9722
9743
  pr_user_attribution: false,
9723
9744
  auto_draft_prs: false,
9724
9745
  open_prs_in_graphite: false,
9746
+ open_links_in_desktop_app: false,
9725
9747
  default_fast_mode: false,
9726
9748
  agent_defaults: { ...EMPTY_AGENT_DEFAULT_SETTINGS },
9727
9749
  credential_priority: null
@@ -9789,7 +9811,7 @@ function formatTurnElapsed(ms) {
9789
9811
  }
9790
9812
 
9791
9813
  // ../shared/src/cli-version.ts
9792
- var CLI_VERSION = "0.2.505";
9814
+ var CLI_VERSION = "0.2.506";
9793
9815
 
9794
9816
  // ../shared/src/version.ts
9795
9817
  function compareVersions(v1, v2) {
@@ -25616,7 +25638,7 @@ function normalizeContentBlocks(content) {
25616
25638
  if (typeof content === "string") {
25617
25639
  return content ? [{ type: "text", text: content }] : [];
25618
25640
  }
25619
- return content ?? [];
25641
+ return Array.isArray(content) ? content.filter((block) => isRecord(block) && typeof block.type === "string") : [];
25620
25642
  }
25621
25643
  function parseStringField(value) {
25622
25644
  if (typeof value !== "string") return null;
@@ -32454,16 +32476,25 @@ function GitHubPRReviewMessage({ data }) {
32454
32476
  data.commentBody && /* @__PURE__ */ jsx5(MessageBody, { children: data.commentBody })
32455
32477
  ] });
32456
32478
  }
32457
- function GitHubPRGeneralMessage({ data }) {
32479
+ function HostReviewThreadMessage({
32480
+ source,
32481
+ label,
32482
+ identifier,
32483
+ commentUser,
32484
+ commentBody
32485
+ }) {
32458
32486
  return /* @__PURE__ */ jsxs5("box", { flexDirection: "column", gap: 0, children: [
32459
32487
  /* @__PURE__ */ jsxs5("box", { flexDirection: "row", gap: 1, children: [
32460
- /* @__PURE__ */ jsx5(SourceBadge, { source: "github_pr_existing_general" }),
32461
- /* @__PURE__ */ jsx5(MetadataPill, { label: "PR", value: `#${data.prNumber}` }),
32462
- data.commentUser && /* @__PURE__ */ jsx5(MetadataPill, { label: "From", value: `@${data.commentUser}` })
32488
+ /* @__PURE__ */ jsx5(SourceBadge, { source }),
32489
+ /* @__PURE__ */ jsx5(MetadataPill, { label, value: identifier }),
32490
+ commentUser && /* @__PURE__ */ jsx5(MetadataPill, { label: "From", value: `@${commentUser}` })
32463
32491
  ] }),
32464
- /* @__PURE__ */ jsx5(MessageBody, { children: data.commentBody })
32492
+ /* @__PURE__ */ jsx5(MessageBody, { children: commentBody })
32465
32493
  ] });
32466
32494
  }
32495
+ function MergedMessage({ data }) {
32496
+ return /* @__PURE__ */ jsx5("box", { flexDirection: "column", gap: 1, children: data.messages.map((message, index) => message.source === "raw" ? /* @__PURE__ */ jsx5(MessageBody, { children: message.content }, index) : /* @__PURE__ */ jsx5(StructuredUserMessage, { parsed: message }, index)) });
32497
+ }
32467
32498
  function SlackTaskMessage({ data }) {
32468
32499
  const hasDistinctContext = data.threadContext && data.threadContext !== `@${data.latestMessageUser}: ${data.latestMessageText}`;
32469
32500
  return /* @__PURE__ */ jsxs5("box", { flexDirection: "column", gap: 0, children: [
@@ -32517,7 +32548,9 @@ function StructuredUserMessage({ parsed }) {
32517
32548
  case "github_pr_existing_pr_review":
32518
32549
  return /* @__PURE__ */ jsx5(GitHubPRReviewMessage, { data: parsed });
32519
32550
  case "github_pr_existing_general":
32520
- return /* @__PURE__ */ jsx5(GitHubPRGeneralMessage, { data: parsed });
32551
+ return /* @__PURE__ */ jsx5(HostReviewThreadMessage, { source: parsed.source, label: "PR", identifier: `#${parsed.prNumber}`, commentUser: parsed.commentUser, commentBody: parsed.commentBody });
32552
+ case "gitlab_mr_existing_general":
32553
+ return /* @__PURE__ */ jsx5(HostReviewThreadMessage, { source: parsed.source, label: "MR", identifier: `!${parsed.mergeRequestIid}`, commentUser: parsed.commentUser, commentBody: parsed.commentBody });
32521
32554
  case "slack_task":
32522
32555
  return /* @__PURE__ */ jsx5(SlackTaskMessage, { data: parsed });
32523
32556
  case "inline_diff_comments":
@@ -32527,6 +32560,8 @@ function StructuredUserMessage({ parsed }) {
32527
32560
  return /* @__PURE__ */ jsx5("text", { fg: "#cccccc", selectable: true, children: parsed.source === "plan_quote" ? parsed.blocks.map((b) => `> ${b.quotedText}
32528
32561
  ${b.replyText}`).join("\n\n") : `Automation: ${parsed.automationName} (${parsed.triggerType})
32529
32562
  ${parsed.userPrompt}` });
32563
+ case "merged":
32564
+ return /* @__PURE__ */ jsx5(MergedMessage, { data: parsed });
32530
32565
  default: {
32531
32566
  const _exhaustive = parsed;
32532
32567
  throw new Error(`Unhandled prompt source: ${_exhaustive.source}`);
@@ -33075,6 +33110,7 @@ var AUTH_METHOD_LABELS = {
33075
33110
  oauth: "OAuth",
33076
33111
  api_key: "API Key",
33077
33112
  bedrock: "Bedrock",
33113
+ foundry: "Foundry",
33078
33114
  none: null
33079
33115
  };
33080
33116
  function StatusDot({ status }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.2.505",
3
+ "version": "0.2.506",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.mjs",
6
6
  "bin": {
@@ -10,7 +10,8 @@
10
10
  "dist"
11
11
  ],
12
12
  "scripts": {
13
- "build": "tsup",
13
+ "build": "bun run typecheck && tsup",
14
+ "typecheck": "tsc --noEmit",
14
15
  "dev": "bun run src/index.ts",
15
16
  "dev-pack": "bun run build && node scripts/pack-dev-tarball.mjs",
16
17
  "start": "bun dist/index.mjs",