replicas-cli 0.3.307 → 0.3.309
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.
- package/dist/index.cjs +60 -12
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -17709,6 +17709,50 @@ var init_scout = __esm({
|
|
|
17709
17709
|
}
|
|
17710
17710
|
});
|
|
17711
17711
|
|
|
17712
|
+
// ../shared/src/default-skills/scout-settings.ts
|
|
17713
|
+
var SCOUT_SETTINGS_SKILL_NAME, CONTENT;
|
|
17714
|
+
var init_scout_settings = __esm({
|
|
17715
|
+
"../shared/src/default-skills/scout-settings.ts"() {
|
|
17716
|
+
"use strict";
|
|
17717
|
+
init_replicas_mcp();
|
|
17718
|
+
init_scout();
|
|
17719
|
+
SCOUT_SETTINGS_SKILL_NAME = "scout-settings";
|
|
17720
|
+
CONTENT = `---
|
|
17721
|
+
name: ${SCOUT_SETTINGS_SKILL_NAME}
|
|
17722
|
+
description: Use when someone asks Scout to change or explain how Replicas behaves in Slack or Linear (channel levels, "be quieter", "only reply when tagged", channel or team instructions, presets, monitored Linear teams, Slack Connect defaults, Slack agent defaults, "what can I change?"), when someone is annoyed that Scout replied unasked ("not you", "nobody asked", a thumbs-down), when making or answering a settings or automation offer, or when setting up an automation. Not for routing ordinary requests.
|
|
17723
|
+
---
|
|
17724
|
+
|
|
17725
|
+
# Scout settings
|
|
17726
|
+
|
|
17727
|
+
You own every Scout setting: each Slack channel's level, each channel's and Linear team's preset and instructions, the presets themselves, which Linear teams are monitored, Slack Connect defaults, the organization's level, and agent defaults for Slack tasks. Handle requests here, never by spawning a workspace.
|
|
17728
|
+
|
|
17729
|
+
## Tools
|
|
17730
|
+
Read presets, channel instructions, and levels with \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`. Change them with \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\`, \`${REPLICAS_MCP_TOOLS.saveChannelPreset}\`, \`${REPLICAS_MCP_TOOLS.deleteChannelPreset}\`, \`${REPLICAS_MCP_TOOLS.setOrganizationProactivity}\`, \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\`, or \`${REPLICAS_MCP_TOOLS.setSlackAgentDefaults}\`. Every change takes \`confirmation_*\` arguments: fill them with the requesting message's envelope \`channel_id\`, \`thread_ts\`, \`message_ts\`, and \`user_id\`. The server checks that exact Slack author is an organization member (and an admin where noted). If it refuses, say why briefly and change nothing.
|
|
17731
|
+
|
|
17732
|
+
## Changing settings
|
|
17733
|
+
- Settings also change outside your chat, often on purpose: read the current settings first, never trust earlier messages, and never re-apply an earlier request the current message doesn't ask for. Save only what the current message asks.
|
|
17734
|
+
- **Levels**, lowest to highest: \`tagged\` (only @Replicas pings reach you, not even messages naming Replicas), \`conservative\` (also messages naming Replicas or Scout, and follow-ups in threads with a workspace), \`balanced\` (the normal triage rules), \`proactive\` (also clear untagged questions and requests). People see these as Mentions only, Low, Balanced and High: use those names, never the setting values.
|
|
17735
|
+
- The organization has one level for its whole Slack workspace, which only an admin can set with \`${REPLICAS_MCP_TOOLS.setOrganizationProactivity}\`. A channel or group DM can override it with \`${REPLICAS_MCP_TOOLS.updateChannelSettings}\` and \`proactivity\`. 1:1 DMs are always addressed to you. Any member can lower a channel; raising one above \`tagged\` needs an admin.
|
|
17736
|
+
- A request that points at a channel ("here", "in #eng", "stop replying in #random") changes that channel only. One that doesn't ("only respond when I @ you", "don't auto-reply to Slack messages") means the organization level. When it names a channel, even without "#" ("make support-inbound quieter"), find it with \`conversations.list\` and change that one, not the one you were asked in; ask if none or several match. If a non-admin asks for an organization change, say an organization admin has to ask, and offer the channel-only change when they asked from a channel. Instructions don't substitute for a level.
|
|
17737
|
+
- **Instructions and presets:** prefer changing the channel's own instructions; edit a shared preset only when asked, since every channel using it changes. To set up a channel without being told how, read enough of it to propose short instructions or a fitting preset (customer, vendor, internal team), and save nothing until they confirm. Never infer a channel's purpose only because Slack marks it externally shared.
|
|
17738
|
+
- **Linear teams:** set \`monitored: true\` to start triaging a team (admin only) and \`monitored: false\` to stop. Teams take a preset or instructions like channels.
|
|
17739
|
+
- **Slack Connect** channels shared with another company follow the organization's shared-channel defaults (\`tagged\` with no preset unless an admin set them with \`${REPLICAS_MCP_TOOLS.setSlackConnectDefaults}\`) until they get their own settings, unless a Mothership is linked to one. A request about all shared or customer channels changes only those defaults: leave channels with their own settings as they are, list them, and offer to switch them too. Asked why you stay quiet in one, say it's external and an admin can raise its level here.
|
|
17740
|
+
- **Slack agent defaults:** to change the agent, model, thinking level, goal mode, or fast mode for tasks started from Slack ("use Codex for Slack tasks"), call \`${REPLICAS_MCP_TOOLS.setSlackAgentDefaults}\` (admin only).
|
|
17741
|
+
- **"What can I change?"** Read the current settings, then list what applies with each current value: how much you speak up here and in every channel (raising a channel above Mentions only and the every-channel default need an admin), instructions or a preset for this channel, sending this channel's requests to a Mothership, which Linear teams you triage (an admin starts one), and the Slack agent defaults (admin).
|
|
17742
|
+
- After any change, say what changed and its scope ("every channel", or "#eng only"). Confirm only after the tool succeeded and only what it changed; say so when it failed or did less than asked.
|
|
17743
|
+
|
|
17744
|
+
## Offers
|
|
17745
|
+
When the envelope has \`offers\`, it lists the offers you may still make in this channel (${SCOUT_CHANNEL_SETTINGS_OFFERS.map((offer) => `\`${offer}\``).join(", ")}); \`offers=none\` means none. Offer only what it lists, at most one per message. Claim the offer with \`${REPLICAS_MCP_TOOLS.claimSettingsOffer}\` right before posting it, and post only when the claim succeeds. When someone declines ("no", "it's fine", "leave it"), record it with \`declined: true\`; never repeat an ignored offer. When they accept, apply it with the tools above using the accepting message as confirmation, then confirm in one short line.
|
|
17746
|
+
- **Frustration.** When someone is clearly annoyed that you replied or acted unasked ("wtf why did replicas respond", "not you", "nobody asked", or a thumbs-down on a reply you posted unasked), claim \`proactivity\` and post one short apology offering to lower this channel exactly one step. From Balanced or High: "Sorry for jumping in. Want me to only reply here when someone mentions me by name?" From Low: "Sorry for jumping in. Want me to only reply here when someone @mentions me?" On a yes, set that level, nothing lower. Do nothing else in that thread. When the claim answers \`offer: organization\`, offer to set every channel's default to \`organization_target\` instead; when \`requester_is_admin\` is false, say an admin can change it for every channel and offer this channel. An explicit "stop replying in this thread" is still a thread mute.
|
|
17747
|
+
- **Having to tag you.** After doing what an earlier untagged message asked, claim \`raise_proactivity\` and end your reply with one line offering one step up. From Mentions only: "Want me to pick up messages here that name me, without an @mention? @mention me with your answer." From Low: "Want me to pick up requests like that here without a tag next time? I can raise this channel to Balanced." From Balanced: "Want me to jump in on requests like that here without being asked? I can raise this channel to High." When the claim answers \`offer: organization\`, offer to raise every channel's default to \`organization_target\` instead, and say channels with their own level keep it. Mention an admin only when the claim answers \`needs_admin: true\`, then offer this channel instead. On a yes, raise to that level only.
|
|
17748
|
+
- **Channel instructions.** When you join a channel or first act in one whose name or purpose points to a clear role (#triage, #bugs, #incidents, #support, #customer-*, a customer's shared channel), claim \`instructions\` and offer one concrete behavior in one line ("This looks like an incident channel. Want me to triage new reports here, check for duplicates, and post findings in the thread?"). Make the same kind of offer when you keep handling messages here the same way, or the channel clearly belongs to a Mothership (offer to send its actionable messages to it by name). On a yes, save it as the channel's instructions, or its preset when one fits exactly.
|
|
17749
|
+
|
|
17750
|
+
## Automations
|
|
17751
|
+
When someone accepts an offer to automate a repeated request, set it up here instead of spawning. Infer the name, prompt, environment, repositories, schedule, and timezone from the conversation and the organization's configuration; ask one concise follow-up only for a missing detail that changes when or where it runs. Create it with \`${REPLICAS_MCP_TOOLS.createAutomation}\`, filling \`confirmation_*\` from the accepting message's envelope. The server checks that author is an organization member with automation write access; never create it if that fails. Post the result in the same thread.
|
|
17752
|
+
`;
|
|
17753
|
+
}
|
|
17754
|
+
});
|
|
17755
|
+
|
|
17712
17756
|
// ../shared/src/workspace-attention.ts
|
|
17713
17757
|
var WORKSPACE_ATTENTION_REASONS, CHAT_ATTENTION_REASONS;
|
|
17714
17758
|
var init_workspace_attention = __esm({
|
|
@@ -18252,7 +18296,7 @@ Use this workflow to make a repository fully usable by Replicas background agent
|
|
|
18252
18296
|
|
|
18253
18297
|
## Mental model
|
|
18254
18298
|
|
|
18255
|
-
Every Replicas workspace is a remote Linux VM. Repositories are cloned under \`~/workspaces/<repo-name
|
|
18299
|
+
Every Replicas workspace is a remote Linux VM. Repositories are cloned under \`~/workspaces/<repo-name>\`, or \`~/workspaces/<full-path-with-dashes>\` (like \`groupA-app\`) when two share a name. An **environment** is the org-scoped template a workspace is built from. It lists the repositories to clone, in checkout order (one, several for multi-repo stacks, or none), and carries:
|
|
18256
18300
|
|
|
18257
18301
|
| Piece | When it runs | Put here |
|
|
18258
18302
|
| --- | --- | --- |
|
|
@@ -20695,7 +20739,7 @@ function removeTag(text4, tag) {
|
|
|
20695
20739
|
function stripReplicasInstructionBlock(text4) {
|
|
20696
20740
|
return removeTag(text4, REPLICAS_INSTRUCTIONS_TAG);
|
|
20697
20741
|
}
|
|
20698
|
-
var REPLICAS_INSTRUCTIONS_TAG, MOTHERSHIP_INSTRUCTIONS_TAG, BOARD_RULES, MOTHERSHIP_INSTRUCTIONS_BLOCK,
|
|
20742
|
+
var REPLICAS_INSTRUCTIONS_TAG, MOTHERSHIP_INSTRUCTIONS_TAG, BOARD_RULES, MOTHERSHIP_INSTRUCTIONS_BLOCK, T, SCOUT_LINEAR_RULES, SCOUT_MUTED_RULES, SCOUT_PRIOR_UNTAGGED_RULES, SCOUT_JOINED_RULES, SCOUT_REACTION_RULES;
|
|
20699
20743
|
var init_prompts = __esm({
|
|
20700
20744
|
"../shared/src/prompts.ts"() {
|
|
20701
20745
|
"use strict";
|
|
@@ -20704,6 +20748,7 @@ var init_prompts = __esm({
|
|
|
20704
20748
|
init_types4();
|
|
20705
20749
|
init_replicas_mcp();
|
|
20706
20750
|
init_scout();
|
|
20751
|
+
init_scout_settings();
|
|
20707
20752
|
init_preferences();
|
|
20708
20753
|
init_registry();
|
|
20709
20754
|
init_replicas_agent();
|
|
@@ -20714,18 +20759,20 @@ var init_prompts = __esm({
|
|
|
20714
20759
|
BOARD_RULES = `- The board, a live status page you keep with \`${REPLICAS_MCP_TOOLS.updateBoard}\` in the Ships pane beside this chat, is the user's one view of the work: keep it covering every ship, pull request, deploy, blocker and ask. Show ships, pull requests and Linear tickets as ship, pr and linear blocks, which stay current on their own, instead of describing their status. Start with sections Needs you, Ready to review, Working, Shipping and Done, and add blocks and buttons whenever they help the user act.
|
|
20715
20760
|
- 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 put the decision to the user if it needs one.
|
|
20716
20761
|
- On every ship event, update the board, act with tools if other work waits on it, such as starting the next task once a pull request merges, and end your turn with no text at all. Never write an acknowledgement such as "Noted.", even if earlier turns did.
|
|
20717
|
-
-
|
|
20762
|
+
- The chat is like texting an assistant: the user sees only your last message of each turn, never your tool calls or earlier text. Write there only to answer the user, to ask a decision only they can make in a line or two, or to say in a line, with links, that work they asked for is done. Everything else, especially progress, goes on the board: spend your effort there, not in chat. Put each decision on the board too, as a choice when it has clear options, and ask it in chat once. Never restate the board in chat: no status tables, per-ship lists or summaries of what ships did.
|
|
20718
20763
|
- When the user picks a choice or clicks a button that messages or merges, Replicas removes that item from the board for you. Add it back, or a new item, only if the user is still needed.
|
|
20719
20764
|
`;
|
|
20720
20765
|
MOTHERSHIP_INSTRUCTIONS_BLOCK = new RegExp(`\\s*<${MOTHERSHIP_INSTRUCTIONS_TAG}>\\n([\\s\\S]*?)\\n</${MOTHERSHIP_INSTRUCTIONS_TAG}>`);
|
|
20721
|
-
|
|
20722
|
-
|
|
20723
|
-
|
|
20724
|
-
|
|
20725
|
-
|
|
20726
|
-
|
|
20727
|
-
|
|
20728
|
-
|
|
20766
|
+
T = REPLICAS_MCP_TOOLS;
|
|
20767
|
+
SCOUT_LINEAR_RULES = `Linear issue triage: team instructions define what is actionable. Use \`replicas.linear.graphql\` from \`@replicas/sdk\` for every Linear read and mutation, never a Replicas CLI command. Choose exactly one:
|
|
20768
|
+
1. **Ignore** issues the team instructions leave to humans or that should not start work: do nothing and write nothing to Linear. If \`agent_session_id\` is set because you asked a question earlier, create a \`response\` Agent Activity on it with one short closing response.
|
|
20769
|
+
2. **Ask** when the issue is likely actionable but lacks a requirement, reproduction, or other information needed to start safely. With \`agent_session_id=none\`, create a Linear comment on \`issue_id\` containing only one concise question, register the \`ask\` intent for it with \`${T.linearSessionIntent}\` (\`comment_id\`, \`action\`), then call \`agentSessionCreateOnComment\`. With a session, create an \`elicitation\` Agent Activity with the question; never create another comment or session.
|
|
20770
|
+
3. **Start** when the issue is clear and the team instructions permit work. With \`agent_session_id=none\`, comment only a one-line handoff such as "Picking this up.", register the \`start\` intent for it, then call \`agentSessionCreateOnComment\`. With a session, call \`${T.linearStart}\` with \`issue_id\`, \`agent_session_id\`, and the latest request in its author's words, so a coding workspace takes over that session. Never create a second session or do the work yourself.
|
|
20771
|
+
Check every mutation and tool call succeeded. Never put routing metadata in visible Linear text, invent a session ID, or change the issue's labels, priority, assignee, project, or state. Decide each issue separately, and start no second workspace when \`issue_has_workspace=true\`.`;
|
|
20772
|
+
SCOUT_MUTED_RULES = `This thread is muted (\`muted=true\`). With \`directed=false\`, ignore the message even when it names Replicas, asks for urgent work, or answers a workspace question; the only exception is an explicit request to unmute, come back, or respond again, which you record with \`${T.setThreadMuted}\` and \`muted: false\` and then triage normally. Never infer an unmute from ordinary conversation. A \`directed=true\` ping may be handled normally, but it does not end the mute. Your own latest \`${T.setThreadMuted}\` call for this thread overrides this flag.`;
|
|
20773
|
+
SCOUT_PRIOR_UNTAGGED_RULES = `\`prior_untagged_ignored=<ts>\`: the untagged message with that \`ts\`, just before this ping, never reached you. If this ping points back at it ("do the above", "^", "see above", "why didn't you pick this up") and it was a question or request for you, read it (\`conversations.replies\` in a thread, \`conversations.history\` at the top level), do what it asked, then follow **Having to tag you** in the \`${SCOUT_SETTINGS_SKILL_NAME}\` skill to offer picking up messages like it without a tag. Offer nothing when this ping is its own fresh request or that message was chatter or meant for someone else.`;
|
|
20774
|
+
SCOUT_JOINED_RULES = `\`event=joined\`: you were just added to this channel; reply in this envelope's thread. If the channel's name or purpose points to a clear role (#triage, #bugs, #incidents, #support, #customer-*, a customer's shared channel), follow **Channel instructions** in the \`${SCOUT_SETTINGS_SKILL_NAME}\` skill to offer one concrete behavior. Otherwise do nothing at all.`;
|
|
20775
|
+
SCOUT_REACTION_RULES = `\`event=reaction:\u2026\`: someone reacted to a message you posted. A thumbs-down or similar on a reply you posted unasked is frustration: follow **Frustration** in the \`${SCOUT_SETTINGS_SKILL_NAME}\` skill. On a reply someone asked for, it is about the answer: leave it. Otherwise do nothing.`;
|
|
20729
20776
|
}
|
|
20730
20777
|
});
|
|
20731
20778
|
|
|
@@ -31798,6 +31845,7 @@ var init_default_skills = __esm({
|
|
|
31798
31845
|
"../shared/src/default-skills/index.ts"() {
|
|
31799
31846
|
"use strict";
|
|
31800
31847
|
init_replicas_agent();
|
|
31848
|
+
init_scout_settings();
|
|
31801
31849
|
}
|
|
31802
31850
|
});
|
|
31803
31851
|
|
|
@@ -31872,7 +31920,7 @@ var CLI_VERSION;
|
|
|
31872
31920
|
var init_cli_version = __esm({
|
|
31873
31921
|
"../shared/src/cli-version.ts"() {
|
|
31874
31922
|
"use strict";
|
|
31875
|
-
CLI_VERSION = "0.3.
|
|
31923
|
+
CLI_VERSION = "0.3.308";
|
|
31876
31924
|
}
|
|
31877
31925
|
});
|
|
31878
31926
|
|