replicas-cli 0.3.684 → 0.3.686
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 +45 -14
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -28503,8 +28503,8 @@ In agent mode the CLI hides commands that don't make sense for in-workspace agen
|
|
|
28503
28503
|
| \`replicas preview ...\` | Register / list preview URLs (covered in \`PREVIEWS.md\`) |
|
|
28504
28504
|
| \`replicas service ...\` | Run long-lived services detached so they survive workspace sleep/wake (see below) |
|
|
28505
28505
|
| \`replicas media ...\` | Upload, list, share, revoke, or delete workspace media; follow \`MEDIA.md\` for destination embedding |
|
|
28506
|
-
| \`replicas skills suggest <SKILL.md> --title <text
|
|
28507
|
-
| \`replicas skills suggest --delete <name-or-id
|
|
28506
|
+
| \`replicas skills suggest <SKILL.md> --title <text> [--scope manager|org]\` | Suggest saving a lasting user instruction as a learning (defaults to this Manager inside a Manager or its ships, otherwise organization-wide); the user accepts or dismisses it |
|
|
28507
|
+
| \`replicas skills suggest --delete <name-or-id> [--scope manager|org]\` | When the user asks you to delete a learning, suggest removing it; the user accepts or dismisses it |
|
|
28508
28508
|
| \`replicas slack thread ...\` | Attach or switch Slack thread routing (covered in \`SLACK.md\`) |
|
|
28509
28509
|
| \`replicas theme get\` / \`replicas theme set ...\` | Show or change the web and desktop app theme of the person who wrote in this workspace (see *Themes*) |
|
|
28510
28510
|
|
|
@@ -38737,7 +38737,7 @@ var init_frontmatter = __esm({
|
|
|
38737
38737
|
});
|
|
38738
38738
|
|
|
38739
38739
|
// ../shared/src/learned-skills.ts
|
|
38740
|
-
var LEARNED_SKILLS_ROOT, LEARNED_SKILLS_MANIFEST_PATH, learnedSkillsManifestSchema, dreamVerdictChecksSchema, DREAM_VERDICT_CHECKS, dreamVerdictSchema;
|
|
38740
|
+
var LEARNED_SKILLS_ROOT, LEARNED_SKILLS_MANIFEST_PATH, LEARNED_SKILL_DIR_PREFIX, MANAGER_LEARNED_SKILL_DIR_PREFIX, LEARNED_SKILL_SCOPES, learnedSkillsManifestSchema, dreamVerdictChecksSchema, DREAM_VERDICT_CHECKS, dreamVerdictSchema;
|
|
38741
38741
|
var init_learned_skills = __esm({
|
|
38742
38742
|
"../shared/src/learned-skills.ts"() {
|
|
38743
38743
|
"use strict";
|
|
@@ -38747,8 +38747,16 @@ var init_learned_skills = __esm({
|
|
|
38747
38747
|
init_sandbox();
|
|
38748
38748
|
LEARNED_SKILLS_ROOT = `${SANDBOX_PATHS.REPLICAS_DIR}/learned-skills`;
|
|
38749
38749
|
LEARNED_SKILLS_MANIFEST_PATH = `${LEARNED_SKILLS_ROOT}/manifest.json`;
|
|
38750
|
+
LEARNED_SKILL_DIR_PREFIX = "replicas-learned__";
|
|
38751
|
+
MANAGER_LEARNED_SKILL_DIR_PREFIX = `${LEARNED_SKILL_DIR_PREFIX}manager__`;
|
|
38752
|
+
LEARNED_SKILL_SCOPES = ["org", "manager"];
|
|
38750
38753
|
learnedSkillsManifestSchema = external_exports.object({
|
|
38751
|
-
|
|
38754
|
+
managerWorkspaceId: external_exports.string().nullable().default(null),
|
|
38755
|
+
skills: external_exports.array(external_exports.object({
|
|
38756
|
+
name: external_exports.string(),
|
|
38757
|
+
sha256: external_exports.string(),
|
|
38758
|
+
scope: external_exports.enum(LEARNED_SKILL_SCOPES).optional()
|
|
38759
|
+
}))
|
|
38752
38760
|
});
|
|
38753
38761
|
dreamVerdictChecksSchema = external_exports.object({
|
|
38754
38762
|
repeatable: external_exports.boolean(),
|
|
@@ -41062,15 +41070,30 @@ function toolCallMessage(id, name, args, timestamp2, result) {
|
|
|
41062
41070
|
if (name === "web_search" && typeof args.query === "string") {
|
|
41063
41071
|
return { id, type: "web_search", query: args.query, status, timestamp: timestamp2 };
|
|
41064
41072
|
}
|
|
41065
|
-
if (name === "spawn_agent") {
|
|
41066
|
-
const
|
|
41073
|
+
if (name === "spawn_agent" || name === "delegate" || name === "look") {
|
|
41074
|
+
const fusion = name !== "spawn_agent";
|
|
41075
|
+
const reply = fusion ? result?.details : result?.output ? (() => {
|
|
41067
41076
|
try {
|
|
41068
41077
|
return JSON.parse(result.output);
|
|
41069
41078
|
} catch {
|
|
41070
41079
|
return null;
|
|
41071
41080
|
}
|
|
41072
41081
|
})() : null;
|
|
41073
|
-
|
|
41082
|
+
const worker = isRecord(reply) ? reply : void 0;
|
|
41083
|
+
return {
|
|
41084
|
+
id,
|
|
41085
|
+
type: "subagent",
|
|
41086
|
+
toolUseId: id,
|
|
41087
|
+
description: typeof args.title === "string" ? args.title : typeof args.question === "string" ? args.question : fusion ? "Replicas worker" : "Replicas subagent",
|
|
41088
|
+
prompt: typeof args.prompt === "string" ? args.prompt : typeof args.brief === "string" ? args.brief : typeof args.question === "string" ? args.question : "",
|
|
41089
|
+
subagentType: "replicas",
|
|
41090
|
+
model: typeof worker?.model === "string" ? worker.model : typeof args.model === "string" ? args.model : void 0,
|
|
41091
|
+
receiverThreadIds: typeof worker?.agentId === "string" ? [worker.agentId] : void 0,
|
|
41092
|
+
status: !fusion ? result?.isError ? "failed" : "in_progress" : !result ? "in_progress" : result.isError ? "failed" : "completed",
|
|
41093
|
+
...fusion && result?.output ? { output: result.output } : {},
|
|
41094
|
+
nestedEvents: [],
|
|
41095
|
+
timestamp: timestamp2
|
|
41096
|
+
};
|
|
41074
41097
|
}
|
|
41075
41098
|
return createCallDisplayMessage({ id, server: "replicas", tool: name, input: args, output: result?.output, status, timestamp: timestamp2 });
|
|
41076
41099
|
}
|
|
@@ -41162,7 +41185,8 @@ function parseReplicasEvents(events) {
|
|
|
41162
41185
|
upsertDisplayMessage(messages, toolCallMessage(`replicas-tool-${message2.toolCallId}`, call.name, call.args, call.timestamp, {
|
|
41163
41186
|
output: extractToolResultText(message2.content) || void 0,
|
|
41164
41187
|
isError: message2.isError === true,
|
|
41165
|
-
exitCode
|
|
41188
|
+
exitCode,
|
|
41189
|
+
...isRecord(message2.details) ? { details: message2.details } : {}
|
|
41166
41190
|
}));
|
|
41167
41191
|
return;
|
|
41168
41192
|
}
|
|
@@ -43561,7 +43585,7 @@ var CLI_VERSION;
|
|
|
43561
43585
|
var init_cli_version = __esm({
|
|
43562
43586
|
"../shared/src/cli-version.ts"() {
|
|
43563
43587
|
"use strict";
|
|
43564
|
-
CLI_VERSION = "0.3.
|
|
43588
|
+
CLI_VERSION = "0.3.685";
|
|
43565
43589
|
}
|
|
43566
43590
|
});
|
|
43567
43591
|
|
|
@@ -61734,15 +61758,21 @@ var init_history = __esm({
|
|
|
61734
61758
|
|
|
61735
61759
|
// src/commands/skills.ts
|
|
61736
61760
|
async function skillsSuggestCommand(file2, options) {
|
|
61737
|
-
const
|
|
61761
|
+
const scope = LEARNED_SKILL_SCOPES.find((scope2) => scope2 === options.scope);
|
|
61762
|
+
if (options.scope !== void 0 && scope === void 0) {
|
|
61763
|
+
throw new Error(`Invalid --scope '${options.scope}'. Use one of: ${LEARNED_SKILL_SCOPES.join(", ")}`);
|
|
61764
|
+
}
|
|
61765
|
+
const target = scope ? { scope } : {};
|
|
61766
|
+
const body2 = options.delete ? { remove: options.delete, ...target } : file2 && options.title ? { content: (0, import_node_fs5.readFileSync)(file2, "utf-8"), title: options.title, ...target } : null;
|
|
61738
61767
|
if (!body2) throw new Error("Pass a SKILL.md file with --title, or --delete <name-or-id>");
|
|
61739
|
-
const { id, name, update } = await agentFetch("/v1/learned-skills/suggestions", {
|
|
61768
|
+
const { id, name, update, scope: resolvedScope, managerWorkspaceId } = await agentFetch("/v1/learned-skills/suggestions", {
|
|
61740
61769
|
method: "POST",
|
|
61741
61770
|
body: body2
|
|
61742
61771
|
});
|
|
61743
61772
|
const link = `[${name}](${MONOLITH_URL}/v1/learned-skills/suggestions/${id})`;
|
|
61744
|
-
|
|
61745
|
-
|
|
61773
|
+
const scopeLabel2 = resolvedScope === "manager" ? "manager learning" : "organization learning";
|
|
61774
|
+
output2({ id, name, update, scope: resolvedScope, managerWorkspaceId, link }, () => {
|
|
61775
|
+
console.log(options.delete ? `Suggested removing the ${scopeLabel2} '${name}'. It is removed only if the user accepts it.` : `Suggested ${update ? "an update to the" : "a new"} ${scopeLabel2} '${name}'. It is saved only if the user accepts it.`);
|
|
61746
61776
|
console.log("Put this link on its own line in your reply; it renders as a chip where the user can review it:");
|
|
61747
61777
|
console.log(link);
|
|
61748
61778
|
});
|
|
@@ -61777,6 +61807,7 @@ var init_skills = __esm({
|
|
|
61777
61807
|
"use strict";
|
|
61778
61808
|
import_node_fs5 = require("fs");
|
|
61779
61809
|
import_chalk33 = __toESM(require("chalk"));
|
|
61810
|
+
init_src();
|
|
61780
61811
|
init_agent_api();
|
|
61781
61812
|
init_api2();
|
|
61782
61813
|
init_monolith_url();
|
|
@@ -63154,7 +63185,7 @@ ${VISUAL_PAGE_RULES}`).action(run(visualizeCommand));
|
|
|
63154
63185
|
addComputeCommands("macos", (command) => command.option("-t, --timeout <duration>", `Maximum lifetime, e.g. 90m or 2h (default 1h, max ${MACOS_SANDBOX_MAX_TIMEOUT_MINUTES / 60}h)`).option("-e, --env <KEY=value>", 'Environment variable for the command run by "run" (repeatable)', collect, []));
|
|
63155
63186
|
}
|
|
63156
63187
|
program.command("history").description("Read past session history").command("transcript <name>").description("Download the full transcript of a session in INDEX.md and print its path").action(run(historyTranscriptCommand));
|
|
63157
|
-
skills.command("suggest [file]").description("Suggest saving a SKILL.md as
|
|
63188
|
+
skills.command("suggest [file]").description("Suggest saving a SKILL.md as a learning, or removing one with --delete; the user reviews it first").option("--title <text>", 'Short title shown to the user, e.g. "Always use Conventional Commits" (required with a file)').option("--delete <name-or-id>", "Suggest removing this learning instead").option("--scope <scope>", "Learning scope: manager or org (defaults to manager inside a Manager or its ships, otherwise org)").action(run(skillsSuggestCommand));
|
|
63158
63189
|
const theme = program.command("theme").description("The web and desktop app theme of the person who wrote in this workspace");
|
|
63159
63190
|
theme.command("get").description("Show their theme, color theme and accent").action(run(themeGetCommand));
|
|
63160
63191
|
theme.command("set").description("Change their theme; their open web and desktop apps repaint on their own").option("--theme <theme>", THEME_PREFERENCES.join(", ")).option("--color-theme <name>", `With --theme dark: ${PALETTE_PRESETS.dark.join(", ")}. With --theme light: ${PALETTE_PRESETS.light.join(", ")}`).option("--accent <color>", `${ACCENT_PRESETS.join(", ")}, or any hex color such as ff5500`).option("--code <code>", "Custom colors as a theme code of three hex colors, background,text,accent, such as 0d1117,e6ecf4,ff5500. The text has to read on the background").action(run(themeSetCommand));
|