replicas-cli 0.3.506 → 0.3.507

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 +54 -56
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -24569,7 +24569,7 @@ var init_issues = __esm({
24569
24569
  "../shared/src/default-skills/replicas-agent/abilities/issues.ts"() {
24570
24570
  "use strict";
24571
24571
  SECTION7 = `### Issues
24572
- Track work in Replicas Issues (\`REP-42\`), the shared to-do list of the people and agents in this organization, with \`replicas issue\` or the \`issue_*\` MCP tools.
24572
+ Track work in Replicas Issues (\`REP-42\`), the shared to-do list of the people and agents in this organization, with \`replicas issue\`.
24573
24573
 
24574
24574
  **Reference:** \`references/ISSUES.md\`
24575
24575
 
@@ -24582,7 +24582,7 @@ Use this when:
24582
24582
 
24583
24583
  Issues are how people and agents in this organization track work. Each has an identifier like \`REP-42\`, a title, a markdown description, a status, a priority, assignees (people and workspaces), subscribers, comments, linked pull requests, and an activity log. Pass the identifier everywhere an issue is asked for.
24584
24584
 
24585
- Use the CLI, or the matching \`issue_*\` MCP tools when you have them; both act as this workspace. Add \`--json\` to any command for machine-readable output.
24585
+ The CLI acts as this workspace. Add \`--json\` to any command for machine-readable output.
24586
24586
 
24587
24587
  \`\`\`bash
24588
24588
  replicas issue view REP-42 # description, comments, activity, pull requests
@@ -24595,6 +24595,7 @@ replicas issue update REP-42 --title "..." --description-file /tmp/desc.md
24595
24595
  replicas issue comment REP-42 "Ready for review: https://github.com/acme/app/pull/12"
24596
24596
  replicas issue comment REP-42 "Before and after" --attach /tmp/after.png
24597
24597
  replicas issue assign REP-42 alice@acme.com # a member's email, user ID, or a workspace ID; \`me\` is this workspace
24598
+ replicas issue unassign REP-42 alice@acme.com # they stay subscribed
24598
24599
  replicas issue subscribe REP-42 | unsubscribe REP-42
24599
24600
  replicas issue link-pr REP-42 https://github.com/acme/app/pull/12
24600
24601
  replicas issue relate REP-42 blocks REP-43 | duplicate_of REP-40
@@ -24621,7 +24622,7 @@ Read the event and act only when it asks something of you: a person's question o
24621
24622
 
24622
24623
  **Keep the description current**, the way a good PM does: when the scope or the plan changes, edit it rather than burying the change in comment 14. Comments are for progress, questions, and decisions.
24623
24624
 
24624
- **Ask a person** by assigning them and commenting with exactly what you need decided; mention them as \`@email\` in the comment. Their reply arrives as an \`<issue_event>\`.
24625
+ **Ask a person** by assigning them and commenting with exactly what you need decided; mention them as \`@email\` in the comment. Their reply arrives as an \`<issue_event>\`. Once they've answered, unassign them so the issue only shows as theirs while it needs them; they stay subscribed.
24625
24626
 
24626
24627
  **Split big work:** create sub-issues with \`--parent REP-42\`, one per pull request or separable piece, and link blockers with \`relate\`.
24627
24628
 
@@ -27109,7 +27110,7 @@ var init_environment_config_source = __esm({
27109
27110
  });
27110
27111
 
27111
27112
  // ../shared/src/replicas-mcp.ts
27112
- var REPLICAS_MCP_PATH, REPLICAS_MCP_TOOLS, ISSUE_MCP_TOOLS, automationToolInputSchema, credentialUserIdDescription, automationBackgroundSchema, automationCreateToolInputSchema, automationUpdateToolInputSchema, chatPath, provider, model, thinkingLevel, title, message, createChatToolInputSchema, forkChatToolInputSchema, renameChatToolInputSchema, runCommandToolInputSchema, environmentMcpPath, createEnvironmentMcpToolInputSchema, updateEnvironmentMcpToolInputSchema, createEnvironmentDeviceToolInputSchema, previewEnvironmentConfigSourceToolInputSchema, applyEnvironmentConfigSourceToolInputSchema;
27113
+ var REPLICAS_MCP_TOOLS, automationToolInputSchema, credentialUserIdDescription, automationBackgroundSchema, automationCreateToolInputSchema, automationUpdateToolInputSchema, chatPath, provider, model, thinkingLevel, title, message, createChatToolInputSchema, forkChatToolInputSchema, renameChatToolInputSchema, runCommandToolInputSchema, environmentMcpPath, createEnvironmentMcpToolInputSchema, updateEnvironmentMcpToolInputSchema, createEnvironmentDeviceToolInputSchema, previewEnvironmentConfigSourceToolInputSchema, applyEnvironmentConfigSourceToolInputSchema;
27113
27114
  var init_replicas_mcp = __esm({
27114
27115
  "../shared/src/replicas-mcp.ts"() {
27115
27116
  "use strict";
@@ -27124,7 +27125,6 @@ var init_replicas_mcp = __esm({
27124
27125
  init_environment_config_source();
27125
27126
  init_workspaces();
27126
27127
  init_sandbox();
27127
- REPLICAS_MCP_PATH = "/v1/mcp";
27128
27128
  REPLICAS_MCP_TOOLS = {
27129
27129
  listEnvironments: "list_environments",
27130
27130
  createAutomation: "create_automation",
@@ -27185,19 +27185,6 @@ var init_replicas_mcp = __esm({
27185
27185
  deleteChat: "delete_chat",
27186
27186
  listRepositories: "list_repositories"
27187
27187
  };
27188
- ISSUE_MCP_TOOLS = {
27189
- create: "create_issue",
27190
- update: "update_issue",
27191
- get: "get_issue",
27192
- list: "list_issues",
27193
- comment: "comment_on_issue",
27194
- assign: "assign_issue",
27195
- unassign: "unassign_issue",
27196
- subscribe: "subscribe_issue",
27197
- unsubscribe: "unsubscribe_issue",
27198
- linkPr: "link_issue_pr",
27199
- relate: "relate_issues"
27200
- };
27201
27188
  automationToolInputSchema = external_exports.object({
27202
27189
  name: external_exports.string().describe("Short automation name."),
27203
27190
  prompt: external_exports.string().describe("Prompt each automation run starts with."),
@@ -27452,7 +27439,7 @@ function stripAgentInstructionBlocks(text4) {
27452
27439
  else spans(prose, text4.length);
27453
27440
  return stripInstructionBlocksOutside(text4, quoted);
27454
27441
  }
27455
- var REPLICAS_INSTRUCTIONS_TAG, fenceMarker, INSTRUCTIONS_OPEN, INSTRUCTIONS_CLOSE, MANAGER_EVENT_CHAT_NOTE, BOARD_ANSWER_NOTE, BOARD_RULES, MANAGER_TICKET_MESSAGE_NOTE, MANAGER_TICKET_REPLY_NUDGE, T, SCOUT_LINEAR_RULES, SCOUT_MUTED_RULES, SCOUT_PRIOR_UNTAGGED_RULES, SCOUT_JOINED_RULES, SCOUT_REACTION_RULES;
27442
+ var REPLICAS_INSTRUCTIONS_TAG, fenceMarker, INSTRUCTIONS_OPEN, INSTRUCTIONS_CLOSE, managerEventChatNote, MANAGER_EVENT_CHAT_NOTE, BOARD_ANSWER_NOTE, MANAGER_ISSUE_EVENT_CHAT_NOTE, MERGE_RULE, chatRule, BOARD_RULES, ISSUE_RULES, MANAGER_TICKET_MESSAGE_NOTE, MANAGER_TICKET_REPLY_NUDGE, T, SCOUT_LINEAR_RULES, SCOUT_MUTED_RULES, SCOUT_PRIOR_UNTAGGED_RULES, SCOUT_JOINED_RULES, SCOUT_REACTION_RULES;
27456
27443
  var init_prompts = __esm({
27457
27444
  "../shared/src/prompts.ts"() {
27458
27445
  "use strict";
@@ -27475,15 +27462,28 @@ var init_prompts = __esm({
27475
27462
  };
27476
27463
  INSTRUCTIONS_OPEN = `<${REPLICAS_INSTRUCTIONS_TAG}>`;
27477
27464
  INSTRUCTIONS_CLOSE = `</${REPLICAS_INSTRUCTIONS_TAG}>`;
27478
- MANAGER_EVENT_CHAT_NOTE = `If a message the user typed in this turn is still unanswered, your final reply answers it and they see it. Otherwise they don't see text you write in this turn: if it brings something they asked for, or a blocker that needs them, send it with ${REPLICAS_MCP_TOOLS.sendToChat}; then update the board if its order, notes or overview changed, and end with a one-line note.`;
27465
+ managerEventChatNote = (then) => `If a message the user typed in this turn is still unanswered, your final reply answers it and they see it. Otherwise they don't see text you write in this turn: if it brings something they asked for, or a blocker that needs them, send it with ${REPLICAS_MCP_TOOLS.sendToChat}; then ${then}end with a one-line note.`;
27466
+ MANAGER_EVENT_CHAT_NOTE = managerEventChatNote("update the board if its order, notes or overview changed, and ");
27479
27467
  BOARD_ANSWER_NOTE = "The user answered on the board.";
27468
+ MANAGER_ISSUE_EVENT_CHAT_NOTE = managerEventChatNote("");
27469
+ MERGE_RULE = `- When a pull request should merge once it's approved and CI passes, call \`${REPLICAS_MCP_TOOLS.mergeWhenReady}\`: Replicas merges it and sends \`merged\`, or \`needs_attention\` saying why it can't. Never watch CI or pull requests with \`gh\`, sleep loops or wait scripts, and merge one yourself only when the user wants it merged right away.`;
27470
+ chatRule = (view, news) => `- The chat is like texting an assistant. In a turn the user typed, they see the text you write between tool calls as it streams, your final reply, what you send with \`${REPLICAS_MCP_TOOLS.sendToChat}\`, and your \`${REPLICAS_MCP_TOOLS.setStatus}\` line, never your tool calls. Unless you can answer right away, open with one line on what you'll do first and roughly how long it takes. Then call \`${REPLICAS_MCP_TOOLS.setStatus}\` with a few words on your current step, such as "Reading the billing webhook", and again each time you move to a new step. Before your final reply, write only what they'd want to know now: ${news}. Never narrate tool calls or say you're still working. When they message you mid-turn, reply in one line before anything else, then fold it into your work. Write in a line or two with links and any media inline, and never restate ${view} in chat.`;
27480
27471
  BOARD_RULES = `- The board in the Ships pane beside this chat is the user's one view of the work: one ticket per task they ask for, holding only that task's pull requests. Replicas fills in each ticket's title, summaries, section and pull requests from the task, the ship's reports and its pull requests, so never restate what a ticket shows, and correct one with \`${REPLICAS_MCP_TOOLS.updateBoard}\` only when it's wrong.
27481
27472
  - Keep the board organized with \`${REPLICAS_MCP_TOOLS.updateBoard}\`: tickets in order, most important first; one short note per ticket only when it adds something, such as "Merge after #12"; and one overview line on where the work as a whole stands. Archive tickets the user no longer needs.
27482
27473
  - Ask the user only for decisions you truly can't make. Make routine calls yourself, such as retries, small scope choices or test cleanup. For a question of your own, create a ticket with it; the user's answer comes to you here, marked "${BOARD_ANSWER_NOTE}". Answers to a ship's questions go straight to that ship.
27483
27474
  - A ship with open pull requests is not done when it sends \`finished\`: Replicas fixes their CI failures and review comments automatically, then sends \`ready\` or \`needs_attention\`. On \`needs_attention\`, direct the ship, or ask the user only if you can't decide.
27484
- - When a pull request should merge once it's approved and CI passes, call \`${REPLICAS_MCP_TOOLS.mergeWhenReady}\`: Replicas merges it and sends \`merged\`, or \`needs_attention\` saying why it can't. Never watch CI or pull requests with \`gh\`, sleep loops or wait scripts, and merge one yourself only when the user wants it merged right away.
27475
+ ${MERGE_RULE}
27485
27476
  - On every ship event and board answer, act with tools on whatever it unblocks, such as starting the next task once a pull request merges, and update the board if it changed. The user sees nothing you write in these turns unless a message they typed is still unanswered; otherwise reach them only with \`${REPLICAS_MCP_TOOLS.sendToChat}\`, and only for what they'd want right now: a deliverable they asked for, with its media, links or answer; a blocker that needs them, also on the board; or a request of theirs being done. Never for status, such as "PR #12 merged" or "I asked the ship to\u2026". End the turn with a one-line note of what you did.
27486
- - The chat is like texting an assistant. In a turn the user typed, they see the text you write between tool calls as it streams, your final reply, what you send with \`${REPLICAS_MCP_TOOLS.sendToChat}\`, and your \`${REPLICAS_MCP_TOOLS.setStatus}\` line, never your tool calls. Unless you can answer right away, open with one line on what you'll do first and roughly how long it takes. Then call \`${REPLICAS_MCP_TOOLS.setStatus}\` with a few words on your current step, such as "Reading the billing webhook", and again each time you move to a new step. Before your final reply, write only what they'd want to know now: a finding that changes the answer, a ship you started, or a decision you need. Never narrate tool calls or say you're still working. When they message you mid-turn, reply in one line before anything else, then fold it into your work. Write in a line or two with links and any media inline, and never restate the board in chat.
27477
+ ${chatRule("the board", "a finding that changes the answer, a ship you started, or a decision you need")}
27478
+ `;
27479
+ ISSUE_RULES = `- Your work lives in issues in your slice of the organization's Issues, which the Issues tab beside this chat shows the user. Before delegating, turn a request into issues with \`replicas issue create\`: one per independent task, so five small bugs are five issues, and a parent with sub-issues for a big project. Reuse an issue the request is about; find it with \`replicas issue list\`. A title says what the task is about, never a ship, branch or pull request name.
27480
+ - Spawn ships with \`issue\`, and pass \`issue\` to \`${REPLICAS_MCP_TOOLS.messageSubagent}\` to point a ship at another one: it is assigned, subscribed and told. Several ships can share an issue. Replicas moves an issue to In progress when a ship starts it, In review when its pull request opens and Done when they merge, and ships comment their progress, so never restate what an issue shows. Order, reprioritize or cancel issues with \`replicas issue update\`.
27481
+ - You are subscribed to every issue in your slice: comments and changes by ships and people arrive as \`<issue_event>\` blocks. Act on them like ship events. Ships assigned to an issue get its comments too, so never relay a comment to them; pass it only to a ship that isn't on the issue.
27482
+ - Ask the user only for decisions you truly can't make. Make routine calls yourself, such as retries, small scope choices or test cleanup. For a decision or merge only they can give, assign them to the issue with \`replicas issue assign\` and comment the question with \`replicas issue comment\`; their reply comes back as an \`<issue_event>\`. Once they answer a question you asked, unassign them with \`replicas issue unassign\` so the issue leaves their "Assigned to you"; they stay subscribed. Ships ask and unassign for their own questions, so leave those to them.
27483
+ - A ship with open pull requests is not done when it sends \`finished\`: Replicas fixes their CI failures and review comments automatically, then sends \`ready\` or \`needs_attention\`. On \`needs_attention\`, direct the ship, or assign the user only if you can't decide. On \`ready\` for a pull request that needs a person's review, assign the user with a one-line comment.
27484
+ ${MERGE_RULE}
27485
+ - On every ship and issue event, act with tools on whatever it unblocks, such as starting the next task once a pull request merges. The user sees nothing you write in these turns unless a message they typed is still unanswered; otherwise reach them only with \`${REPLICAS_MCP_TOOLS.sendToChat}\`, and only for what they'd want right now: a deliverable they asked for, with its media, links or answer; a blocker that needs them, also assigned to them on its issue; or a request of theirs being done. Never for status, such as "PR #12 merged" or "I asked the ship to\u2026". End the turn with a one-line note of what you did, or only \`No action needed.\` when an issue event needs nothing from you.
27486
+ ${chatRule("the Issues tab", "the issues you created, a ship you started, a finding that changes the answer, or a decision you need")}
27487
27487
  `;
27488
27488
  MANAGER_TICKET_MESSAGE_NOTE = `The user sent this from your ticket on the Manager's board and reads your answer there, not in this chat. Answer them with \`${REPLICAS_MCP_TOOLS.replyOnTicket}\`: briefly, with a link or screenshot if it helps, and a follow-up question only if you need one. Keep longer work and detail in this chat.`;
27489
27489
  MANAGER_TICKET_REPLY_NUDGE = `The user is still waiting for your answer on your ticket, and they only read the ticket. Answer them now with \`${REPLICAS_MCP_TOOLS.replyOnTicket}\`, briefly.`;
@@ -27563,7 +27563,7 @@ var init_tag_blocks = __esm({
27563
27563
  });
27564
27564
 
27565
27565
  // ../shared/src/routes/issues.ts
27566
- var ISSUE_STATUSES, ISSUE_PRIORITIES, ISSUE_ACTOR_TYPES, ISSUE_SUBSCRIBER_ROLES, ISSUE_RELATION_TYPES, ISSUE_PULL_REQUEST_STATES, issueStatusSchema, issuePrioritySchema, issueSubscriberRoleSchema, issueRelationTypeSchema, issuePullRequestStateSchema, ISSUE_STATUS_LABELS, ISSUE_PRIORITY_LABELS, issueActorSchema, ISSUE_KEY_RE, timestamp, nullableTimestamp, issueSchema, issueSubscriberSchema, issueRelationSchema, issuePullRequestSchema, issueCommentSchema, change, nullableId, ISSUE_EVENT_TYPES, issueEventDataSchemas, issueEventBase, issueEventVariant, issueEventSchema, clientMutationId, title2, description, body, createIssueRequestSchema, updateIssueRequestSchema, issueActorRequestSchema, createIssueCommentRequestSchema, updateIssueCommentRequestSchema, createIssueRelationRequestSchema, linkIssuePullRequestRequestSchema, updateIssuePullRequestRequestSchema, issueMutationRequestSchema, updateIssueSettingsRequestSchema, listIssuesQuerySchema, issueDetailResponseSchema, listIssuesResponseSchema, issuesDeltaQuerySchema, issueInboxQuerySchema, markIssueInboxReadRequestSchema;
27566
+ var ISSUE_STATUSES, ISSUE_PRIORITIES, ISSUE_ACTOR_TYPES, ISSUE_SUBSCRIBER_ROLES, ISSUE_RELATION_TYPES, ISSUE_PULL_REQUEST_STATES, issueStatusSchema, issuePrioritySchema, issueSubscriberRoleSchema, issueRelationTypeSchema, issuePullRequestStateSchema, ISSUE_STATUS_LABELS, ISSUE_PRIORITY_LABELS, issueActorSchema, ISSUE_KEY_RE, timestamp, nullableTimestamp, issueSchema, issueSubscriberSchema, issueRelationSchema, issuePullRequestSchema, issueCommentSchema, change, nullableId, ISSUE_EVENT_TYPES, issueEventDataSchemas, issueEventBase, issueEventVariant, issueEventSchema, clientMutationId, title2, description, body, createIssueRequestSchema, updateIssueRequestSchema, issueActorRequestSchema, createIssueCommentRequestSchema, updateIssueCommentRequestSchema, createIssueRelationRequestSchema, linkIssuePullRequestRequestSchema, updateIssuePullRequestRequestSchema, issueMutationRequestSchema, updateIssueSettingsRequestSchema, listIssuesQuerySchema, issueDetailResponseSchema, listIssuesResponseSchema, issuesDeltaQuerySchema, issueInboxQuerySchema, markIssueInboxReadRequestSchema, ISSUE_COMMANDS;
27567
27567
  var init_issues2 = __esm({
27568
27568
  "../shared/src/routes/issues.ts"() {
27569
27569
  "use strict";
@@ -27793,6 +27793,19 @@ var init_issues2 = __esm({
27793
27793
  before: external_exports.coerce.number().int().min(1).optional()
27794
27794
  });
27795
27795
  markIssueInboxReadRequestSchema = external_exports.object({ sync_id: external_exports.number().int().min(0).optional() });
27796
+ ISSUE_COMMANDS = {
27797
+ create: "create",
27798
+ update: "update",
27799
+ get: "get",
27800
+ list: "list",
27801
+ comment: "comment",
27802
+ assign: "assign",
27803
+ unassign: "unassign",
27804
+ subscribe: "subscribe",
27805
+ unsubscribe: "unsubscribe",
27806
+ linkPr: "link-pr",
27807
+ relate: "relate"
27808
+ };
27796
27809
  }
27797
27810
  });
27798
27811
 
@@ -40139,7 +40152,7 @@ var CLI_VERSION;
40139
40152
  var init_cli_version = __esm({
40140
40153
  "../shared/src/cli-version.ts"() {
40141
40154
  "use strict";
40142
- CLI_VERSION = "0.3.506";
40155
+ CLI_VERSION = "0.3.507";
40143
40156
  }
40144
40157
  });
40145
40158
 
@@ -56631,22 +56644,12 @@ var init_media_gif = __esm({
56631
56644
  // src/commands/issue.ts
56632
56645
  async function callIssueTool(name, args, schema) {
56633
56646
  if (!isAgentMode() && !getApiKey()) throw new Error("replicas issue needs an API key: run `replicas login --api-key`, or use it inside a workspace.");
56634
- const { bearer, extraHeaders } = await buildOrgAuthHeaders();
56635
- const response = await fetch(`${MONOLITH_URL}${REPLICAS_MCP_PATH}`, {
56636
- method: "POST",
56637
- headers: { ...extraHeaders, Authorization: `Bearer ${bearer}`, "Content-Type": "application/json", Accept: "application/json, text/event-stream" },
56638
- body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/call", params: { name, arguments: Object.fromEntries(Object.entries(args).filter(([, value]) => value !== void 0)) } })
56639
- });
56640
- const text4 = await response.text();
56641
- if (!response.ok) throw new Error(`Request failed (${response.status}): ${text4}`);
56642
- const payload = text4.split("\n").filter((line) => line.startsWith("data:")).map((line) => line.slice(5)).at(-1) ?? text4;
56643
- const message2 = toolMessageSchema.parse(JSON.parse(payload));
56644
- if (message2.error) {
56645
- throw new Error(/Tool .* not found/i.test(message2.error.message) ? "Issues are not enabled for this organization" : message2.error.message);
56647
+ try {
56648
+ return schema.parse(await orgAuthenticatedFetch(`/v1/issue-commands/${name}`, { method: "POST", body: args }));
56649
+ } catch (error62) {
56650
+ if (error62 instanceof ApiError && error62.status === 404 && error62.message === "Not found") throw new Error("Issues are not enabled for this organization");
56651
+ throw error62;
56646
56652
  }
56647
- const body2 = message2.result?.content?.find((item) => item.type === "text")?.text ?? "";
56648
- if (message2.result?.isError) throw new Error(body2.replace(/^Error \d+: /, ""));
56649
- return schema.parse(JSON.parse(body2));
56650
56653
  }
56651
56654
  async function uploadAttachments(files) {
56652
56655
  if (!files?.length) return void 0;
@@ -56662,7 +56665,7 @@ function printIssueLine(issue3) {
56662
56665
  console.log(`${import_chalk29.default.cyan(issue3.identifier.padEnd(9))} ${issue3.status.padEnd(11)} ${issue3.priority === "none" ? "" : import_chalk29.default.yellow(`${issue3.priority} `)}${issue3.title}`);
56663
56666
  }
56664
56667
  async function issueCreateCommand(title3, options) {
56665
- output2(await callIssueTool(ISSUE_MCP_TOOLS.create, {
56668
+ output2(await callIssueTool(ISSUE_COMMANDS.create, {
56666
56669
  title: title3,
56667
56670
  description: readText(options.description, options.descriptionFile, "description"),
56668
56671
  status: options.status,
@@ -56674,7 +56677,7 @@ async function issueCreateCommand(title3, options) {
56674
56677
  }, mutationSchema), printMutation);
56675
56678
  }
56676
56679
  async function issueUpdateCommand(issue3, options) {
56677
- output2(await callIssueTool(ISSUE_MCP_TOOLS.update, {
56680
+ output2(await callIssueTool(ISSUE_COMMANDS.update, {
56678
56681
  issue: issue3,
56679
56682
  title: options.title,
56680
56683
  description: readText(options.description, options.descriptionFile, "description"),
@@ -56685,7 +56688,7 @@ async function issueUpdateCommand(issue3, options) {
56685
56688
  }, mutationSchema), printMutation);
56686
56689
  }
56687
56690
  async function issueViewCommand(issue3) {
56688
- output2(await callIssueTool(ISSUE_MCP_TOOLS.get, { issue: issue3 }, issueDetailResponseSchema), (detail) => {
56691
+ output2(await callIssueTool(ISSUE_COMMANDS.get, { issue: issue3 }, issueDetailResponseSchema), (detail) => {
56689
56692
  console.log(`${import_chalk29.default.bold.cyan(detail.issue.identifier)} ${import_chalk29.default.bold(detail.issue.title)}`);
56690
56693
  console.log(import_chalk29.default.dim(`${detail.issue.status} \xB7 priority ${detail.issue.priority}`));
56691
56694
  const assignees = detail.subscribers.filter((subscriber) => subscriber.role === "assignee");
@@ -56703,7 +56706,7 @@ ${comment.body}`);
56703
56706
  });
56704
56707
  }
56705
56708
  async function issueListCommand(options) {
56706
- output2(await callIssueTool(ISSUE_MCP_TOOLS.list, {
56709
+ output2(await callIssueTool(ISSUE_COMMANDS.list, {
56707
56710
  query: options.query,
56708
56711
  status: csv(options.status),
56709
56712
  priority: csv(options.priority),
@@ -56722,7 +56725,7 @@ async function issueCommentCommand(issue3, body2, options) {
56722
56725
  const text4 = readText(body2, options.file, "file") ?? "";
56723
56726
  const media_ids = await uploadAttachments(options.attach);
56724
56727
  if (!text4.trim() && !media_ids) throw new Error("Pass the comment text, --file, or --attach");
56725
- output2(await callIssueTool(ISSUE_MCP_TOOLS.comment, { issue: issue3, body: text4, media_ids }, external_exports.unknown()), () => console.log(`${import_chalk29.default.green("\u2713")} Commented on ${issue3}`));
56728
+ output2(await callIssueTool(ISSUE_COMMANDS.comment, { issue: issue3, body: text4, media_ids }, external_exports.unknown()), () => console.log(`${import_chalk29.default.green("\u2713")} Commented on ${issue3}`));
56726
56729
  }
56727
56730
  function issueActorCommand(tool, done) {
56728
56731
  return async (issue3, who) => {
@@ -56730,12 +56733,12 @@ function issueActorCommand(tool, done) {
56730
56733
  };
56731
56734
  }
56732
56735
  async function issueLinkPrCommand(issue3, url2) {
56733
- output2(await callIssueTool(ISSUE_MCP_TOOLS.linkPr, { issue: issue3, url: url2 }, external_exports.unknown()), () => console.log(`${import_chalk29.default.green("\u2713")} Linked ${url2} to ${issue3}`));
56736
+ output2(await callIssueTool(ISSUE_COMMANDS.linkPr, { issue: issue3, url: url2 }, external_exports.unknown()), () => console.log(`${import_chalk29.default.green("\u2713")} Linked ${url2} to ${issue3}`));
56734
56737
  }
56735
56738
  async function issueRelateCommand(issue3, type, related) {
56736
- output2(await callIssueTool(ISSUE_MCP_TOOLS.relate, { issue: issue3, type, related_issue: related }, external_exports.unknown()), () => console.log(`${import_chalk29.default.green("\u2713")} ${issue3} ${type.replace("_", " ")} ${related}`));
56739
+ output2(await callIssueTool(ISSUE_COMMANDS.relate, { issue: issue3, type, related_issue: related }, external_exports.unknown()), () => console.log(`${import_chalk29.default.green("\u2713")} ${issue3} ${type.replace("_", " ")} ${related}`));
56737
56740
  }
56738
- var import_node_fs2, import_node_path2, import_chalk29, toolMessageSchema, mutationSchema, csv, printMutation;
56741
+ var import_node_fs2, import_node_path2, import_chalk29, mutationSchema, csv, printMutation;
56739
56742
  var init_issue = __esm({
56740
56743
  "src/commands/issue.ts"() {
56741
56744
  "use strict";
@@ -56746,13 +56749,8 @@ var init_issue = __esm({
56746
56749
  init_src();
56747
56750
  init_api2();
56748
56751
  init_config();
56749
- init_monolith_url();
56750
56752
  init_output();
56751
56753
  init_media3();
56752
- toolMessageSchema = external_exports.object({
56753
- result: external_exports.object({ content: external_exports.array(external_exports.object({ type: external_exports.string(), text: external_exports.string().optional() })).optional(), isError: external_exports.boolean().optional() }).optional(),
56754
- error: external_exports.object({ message: external_exports.string() }).optional()
56755
- });
56756
56754
  mutationSchema = external_exports.object({ issue: issueSchema });
56757
56755
  csv = (value) => value?.split(",").map((entry) => entry.trim()).filter(Boolean).join(",");
56758
56756
  printMutation = ({ issue: issue3 }) => console.log(`${import_chalk29.default.green("\u2713")} ${import_chalk29.default.cyan(issue3.identifier)} ${issue3.title} (${issue3.status})`);
@@ -58299,10 +58297,10 @@ var init_src2 = __esm({
58299
58297
  issue2.command("list").description("List issues, newest first").option("-q, --query <text>", "Search titles and descriptions").option("-s, --status <statuses>", "Comma-separated statuses").option("-p, --priority <priorities>", "Comma-separated priorities").option("--mine", "Assigned to you (this workspace inside one)").option("--assignee <actor>", "me, user:<id> or workspace:<id>").option("--manager <workspaceId>", "A Manager's issues").option("--parent <issue>", "Sub-issues of this issue; 'none' for top-level only").option("--archived", "Include archived issues").option("-l, --limit <n>", "Page size (default 50, max 200)").action(run(issueListCommand));
58300
58298
  issue2.command("search <query>").description("Search issues by text or identifier").action(run((query) => issueListCommand({ query })));
58301
58299
  issue2.command("comment <issue> [body]").description("Comment on an issue. Mention a member as @their@email.com").option("-f, --file <path>", "Read the comment from a file (- for stdin)").option("--attach <file>", "Upload and embed a screenshot or recording (repeatable)", collect, []).action(run(issueCommentCommand));
58302
- issue2.command("assign <issue> <who>").description("Assign me, an email, a user ID or a workspace ID").action(run(issueActorCommand(ISSUE_MCP_TOOLS.assign, "Assigned")));
58303
- issue2.command("unassign <issue> <who>").description("Remove an assignee (they stay subscribed)").action(run(issueActorCommand(ISSUE_MCP_TOOLS.unassign, "Unassigned")));
58304
- issue2.command("subscribe <issue> [who]").description("Follow an issue (default: you)").action(run(issueActorCommand(ISSUE_MCP_TOOLS.subscribe, "Subscribed")));
58305
- issue2.command("unsubscribe <issue> [who]").description("Stop following an issue (default: you)").action(run(issueActorCommand(ISSUE_MCP_TOOLS.unsubscribe, "Unsubscribed")));
58300
+ issue2.command("assign <issue> <who>").description("Assign me, an email, a user ID or a workspace ID").action(run(issueActorCommand(ISSUE_COMMANDS.assign, "Assigned")));
58301
+ issue2.command("unassign <issue> <who>").description("Remove an assignee (they stay subscribed)").action(run(issueActorCommand(ISSUE_COMMANDS.unassign, "Unassigned")));
58302
+ issue2.command("subscribe <issue> [who]").description("Follow an issue (default: you)").action(run(issueActorCommand(ISSUE_COMMANDS.subscribe, "Subscribed")));
58303
+ issue2.command("unsubscribe <issue> [who]").description("Stop following an issue (default: you)").action(run(issueActorCommand(ISSUE_COMMANDS.unsubscribe, "Unsubscribed")));
58306
58304
  issue2.command("link-pr <issue> <url>").description("Link a pull request").action(run(issueLinkPrCommand));
58307
58305
  issue2.command("relate <issue> <type> <related>").description(`Mark <type> (${ISSUE_RELATION_TYPES.join(" or ")}) another issue`).action(run(issueRelateCommand));
58308
58306
  media.command("delete <mediaId>").description("Permanently delete media and stop all of its links working").action(run(mediaDeleteCommand));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.506",
3
+ "version": "0.3.507",
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": {