replicas-cli 0.3.229 → 0.3.232
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 +44 -31
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -523,6 +523,7 @@ var init_services = __esm({
|
|
|
523
523
|
"opencode-go",
|
|
524
524
|
"aster",
|
|
525
525
|
"ollama",
|
|
526
|
+
"anthropic-compatible",
|
|
526
527
|
"openai-compatible",
|
|
527
528
|
"bedrock",
|
|
528
529
|
"claude-foundry",
|
|
@@ -569,6 +570,7 @@ var init_agents = __esm({
|
|
|
569
570
|
CREDENTIAL_METHOD = {
|
|
570
571
|
OAUTH: "oauth",
|
|
571
572
|
API_KEY: "api_key",
|
|
573
|
+
ANTHROPIC_COMPATIBLE: "anthropic-compatible",
|
|
572
574
|
OPENAI_COMPATIBLE: "openai-compatible",
|
|
573
575
|
OLLAMA: "ollama",
|
|
574
576
|
FOUNDRY: "foundry",
|
|
@@ -581,6 +583,7 @@ var init_agents = __esm({
|
|
|
581
583
|
CREDENTIAL_TYPE = {
|
|
582
584
|
CLAUDE_OAUTH: "claude",
|
|
583
585
|
ANTHROPIC_API_KEY: "claude_anthropic_api_key",
|
|
586
|
+
ANTHROPIC_COMPATIBLE: "anthropic_compatible",
|
|
584
587
|
CLAUDE_FOUNDRY: "claude_foundry",
|
|
585
588
|
CLAUDE_BEDROCK: "claude_bedrock",
|
|
586
589
|
CODEX_OAUTH: "codex",
|
|
@@ -607,12 +610,14 @@ var init_agents = __esm({
|
|
|
607
610
|
[CREDENTIAL_METHOD.OPENCODE_GO]: "OpenCode Go",
|
|
608
611
|
[CREDENTIAL_METHOD.ASTER]: "Aster",
|
|
609
612
|
[CREDENTIAL_METHOD.OPENROUTER]: "OpenRouter",
|
|
610
|
-
[CREDENTIAL_METHOD.OPENAI_COMPATIBLE]: "OpenAI-compatible endpoint"
|
|
613
|
+
[CREDENTIAL_METHOD.OPENAI_COMPATIBLE]: "OpenAI-compatible endpoint",
|
|
614
|
+
[CREDENTIAL_METHOD.ANTHROPIC_COMPATIBLE]: "Anthropic-compatible endpoint"
|
|
611
615
|
};
|
|
612
616
|
AGENT_CREDENTIAL_METHODS_IN_ORDER = {
|
|
613
617
|
[AGENT.CLAUDE]: [
|
|
614
618
|
{ method: CREDENTIAL_METHOD.OAUTH, credentialType: CREDENTIAL_TYPE.CLAUDE_OAUTH },
|
|
615
619
|
{ method: CREDENTIAL_METHOD.API_KEY, credentialType: CREDENTIAL_TYPE.ANTHROPIC_API_KEY },
|
|
620
|
+
{ method: CREDENTIAL_METHOD.ANTHROPIC_COMPATIBLE, credentialType: CREDENTIAL_TYPE.ANTHROPIC_COMPATIBLE },
|
|
616
621
|
{ method: CREDENTIAL_METHOD.FOUNDRY, credentialType: CREDENTIAL_TYPE.CLAUDE_FOUNDRY },
|
|
617
622
|
{ method: CREDENTIAL_METHOD.BEDROCK, credentialType: CREDENTIAL_TYPE.CLAUDE_BEDROCK },
|
|
618
623
|
{ method: CREDENTIAL_METHOD.OLLAMA, credentialType: CREDENTIAL_TYPE.OLLAMA }
|
|
@@ -16845,7 +16850,8 @@ var init_v1 = __esm({
|
|
|
16845
16850
|
senderAvatarUrl: external_exports.string().optional(),
|
|
16846
16851
|
errorNotificationTarget: integrationErrorNotificationTargetSchema.optional(),
|
|
16847
16852
|
errorNotificationTargets: external_exports.array(integrationErrorNotificationTargetSchema).optional(),
|
|
16848
|
-
replacesMessageId: external_exports.string().min(1).max(256).optional()
|
|
16853
|
+
replacesMessageId: external_exports.string().min(1).max(256).optional(),
|
|
16854
|
+
steer: external_exports.union([external_exports.boolean(), external_exports.literal("alone")]).optional()
|
|
16849
16855
|
}).passthrough();
|
|
16850
16856
|
CODEX_ITEM_FIELD_CHECKS = {
|
|
16851
16857
|
userMessage: (item) => typeof item.content === "string",
|
|
@@ -16864,7 +16870,8 @@ var init_v1 = __esm({
|
|
|
16864
16870
|
messageId: external_exports.string(),
|
|
16865
16871
|
queued: external_exports.boolean(),
|
|
16866
16872
|
position: external_exports.number(),
|
|
16867
|
-
chatId: external_exports.string().optional()
|
|
16873
|
+
chatId: external_exports.string().optional(),
|
|
16874
|
+
steered: external_exports.boolean().optional()
|
|
16868
16875
|
});
|
|
16869
16876
|
}
|
|
16870
16877
|
});
|
|
@@ -20962,15 +20969,15 @@ function skillNamesFromCommand(command) {
|
|
|
20962
20969
|
});
|
|
20963
20970
|
})));
|
|
20964
20971
|
}
|
|
20965
|
-
function pathArgs(
|
|
20972
|
+
function pathArgs(command, words) {
|
|
20966
20973
|
const paths = [];
|
|
20967
20974
|
for (let i = 0; i < words.length; i++) {
|
|
20968
20975
|
const word = words[i];
|
|
20969
|
-
|
|
20976
|
+
const valueAt = /^-[A-Za-z]{2,}$/.test(word) ? [...word.slice(1)].findIndex((letter) => VALUE_FLAGS[command]?.has(`-${letter}`)) : -1;
|
|
20977
|
+
if (VALUE_FLAGS[command]?.has(word) || valueAt >= 0 && valueAt === word.length - 2) {
|
|
20970
20978
|
i++;
|
|
20971
20979
|
continue;
|
|
20972
20980
|
}
|
|
20973
|
-
if (word.startsWith("--glob=") || word.startsWith("--regexp=")) continue;
|
|
20974
20981
|
if (word.startsWith("-")) continue;
|
|
20975
20982
|
paths.push(word);
|
|
20976
20983
|
}
|
|
@@ -20978,8 +20985,13 @@ function pathArgs(words, extraValueFlags) {
|
|
|
20978
20985
|
}
|
|
20979
20986
|
function readCommandPaths(command, words) {
|
|
20980
20987
|
if (SEARCH_COMMANDS.has(command)) {
|
|
20981
|
-
const args = pathArgs(words.slice(1));
|
|
20982
|
-
return args.slice(1);
|
|
20988
|
+
const args = pathArgs(command, words.slice(1));
|
|
20989
|
+
return words.some((word) => PATTERN_FLAGS.has(word) || /^-[A-Za-z]+[ef]$/.test(word) || /^--(file|regexp)=/.test(word)) ? args : args.slice(1);
|
|
20990
|
+
}
|
|
20991
|
+
if (command === "find") {
|
|
20992
|
+
const paths = words.slice(1).filter((word) => !/^(-[HLP]|-O\d|--)$/.test(word));
|
|
20993
|
+
const expression = paths.findIndex((word) => word.startsWith("-") || word === "(" || word === "!");
|
|
20994
|
+
return expression === -1 ? paths : paths.slice(0, expression);
|
|
20983
20995
|
}
|
|
20984
20996
|
if (command === "sed") {
|
|
20985
20997
|
const paths = [];
|
|
@@ -21005,13 +21017,13 @@ function readCommandPaths(command, words) {
|
|
|
21005
21017
|
}
|
|
21006
21018
|
return Array.from(new Set(paths));
|
|
21007
21019
|
}
|
|
21008
|
-
return pathArgs(words.slice(1)
|
|
21020
|
+
return pathArgs(command, words.slice(1));
|
|
21009
21021
|
}
|
|
21010
21022
|
function writesFiles(name, argv) {
|
|
21011
21023
|
if (name === "sed") return argv.some((word) => /^(-[a-zA-Z]*i|--in-place)/.test(word));
|
|
21012
21024
|
return name === "find" && argv.some((word) => /^-(exec|ok|delete|fprint|fls)/.test(word));
|
|
21013
21025
|
}
|
|
21014
|
-
var SEARCH_COMMANDS,
|
|
21026
|
+
var SEARCH_COMMANDS, LINE_COUNT_VALUE_FLAGS, SEARCH_VALUE_FLAGS, VALUE_FLAGS, PATTERN_FLAGS, SCRIPT_ROOT, commandName, fileWrites, SKILL_READ_COMMANDS;
|
|
21015
21027
|
var init_format2 = __esm({
|
|
21016
21028
|
"../shared/src/display-message/format.ts"() {
|
|
21017
21029
|
"use strict";
|
|
@@ -21021,25 +21033,18 @@ var init_format2 = __esm({
|
|
|
21021
21033
|
init_shell_commands();
|
|
21022
21034
|
init_utils();
|
|
21023
21035
|
SEARCH_COMMANDS = /* @__PURE__ */ new Set(["grep", "rg"]);
|
|
21024
|
-
|
|
21025
|
-
|
|
21026
|
-
|
|
21027
|
-
"-
|
|
21028
|
-
"-
|
|
21029
|
-
|
|
21030
|
-
|
|
21031
|
-
"
|
|
21032
|
-
"
|
|
21033
|
-
"--
|
|
21034
|
-
|
|
21035
|
-
|
|
21036
|
-
"--regexp"
|
|
21037
|
-
]);
|
|
21038
|
-
LINE_COUNT_VALUE_FLAGS = /* @__PURE__ */ new Set([
|
|
21039
|
-
"-c",
|
|
21040
|
-
"-n",
|
|
21041
|
-
"--lines"
|
|
21042
|
-
]);
|
|
21036
|
+
LINE_COUNT_VALUE_FLAGS = /* @__PURE__ */ new Set(["-c", "-n", "--bytes", "--lines"]);
|
|
21037
|
+
SEARCH_VALUE_FLAGS = ["-A", "-B", "-C", "-d", "-e", "-f", "-m", "--after-context", "--before-context", "--context", "--file", "--max-count", "--regexp"];
|
|
21038
|
+
VALUE_FLAGS = {
|
|
21039
|
+
grep: /* @__PURE__ */ new Set([...SEARCH_VALUE_FLAGS, "-D", "--devices", "--directories", "--exclude", "--exclude-dir", "--include"]),
|
|
21040
|
+
rg: /* @__PURE__ */ new Set([...SEARCH_VALUE_FLAGS, "-E", "-M", "-T", "-g", "-j", "-t", "--encoding", "--glob", "--iglob", "--max-columns", "--max-depth", "--sort", "--sortr", "--threads", "--type", "--type-add", "--type-not"]),
|
|
21041
|
+
head: LINE_COUNT_VALUE_FLAGS,
|
|
21042
|
+
tail: LINE_COUNT_VALUE_FLAGS,
|
|
21043
|
+
ls: /* @__PURE__ */ new Set(["-I", "-T", "-w", "--hide", "--ignore", "--tabsize", "--width"]),
|
|
21044
|
+
nl: /* @__PURE__ */ new Set(["-b", "-d", "-f", "-h", "-i", "-l", "-n", "-s", "-v", "-w"]),
|
|
21045
|
+
tree: /* @__PURE__ */ new Set(["-I", "-L", "-P", "--filelimit"])
|
|
21046
|
+
};
|
|
21047
|
+
PATTERN_FLAGS = /* @__PURE__ */ new Set(["-e", "-f", "--file", "--regexp"]);
|
|
21043
21048
|
SCRIPT_ROOT = "/";
|
|
21044
21049
|
commandName = (argv) => argv[0].split("/").pop() ?? argv[0];
|
|
21045
21050
|
fileWrites = ({ writes }) => writes.filter(({ path: path10 }) => path10 !== "/dev/null");
|
|
@@ -31403,7 +31408,7 @@ var CLI_VERSION;
|
|
|
31403
31408
|
var init_cli_version = __esm({
|
|
31404
31409
|
"../shared/src/cli-version.ts"() {
|
|
31405
31410
|
"use strict";
|
|
31406
|
-
CLI_VERSION = "0.3.
|
|
31411
|
+
CLI_VERSION = "0.3.232";
|
|
31407
31412
|
}
|
|
31408
31413
|
});
|
|
31409
31414
|
|
|
@@ -32292,6 +32297,13 @@ var init_presence = __esm({
|
|
|
32292
32297
|
}
|
|
32293
32298
|
});
|
|
32294
32299
|
|
|
32300
|
+
// ../shared/src/routes/voice.ts
|
|
32301
|
+
var init_voice = __esm({
|
|
32302
|
+
"../shared/src/routes/voice.ts"() {
|
|
32303
|
+
"use strict";
|
|
32304
|
+
}
|
|
32305
|
+
});
|
|
32306
|
+
|
|
32295
32307
|
// ../shared/src/routes/workspace-deferred-messages.ts
|
|
32296
32308
|
var init_workspace_deferred_messages = __esm({
|
|
32297
32309
|
"../shared/src/routes/workspace-deferred-messages.ts"() {
|
|
@@ -32998,6 +33010,7 @@ var init_src = __esm({
|
|
|
32998
33010
|
init_mothership();
|
|
32999
33011
|
init_workspace_events();
|
|
33000
33012
|
init_presence();
|
|
33013
|
+
init_voice();
|
|
33001
33014
|
init_workspace_deferred_messages();
|
|
33002
33015
|
init_workspace_wait();
|
|
33003
33016
|
init_repositories();
|
|
@@ -39346,7 +39359,7 @@ var init_src2 = __esm({
|
|
|
39346
39359
|
credentials = program.command("credentials").description("Manage coding agent API keys and providers (personal by default, --org for the organization)");
|
|
39347
39360
|
credentials.command("list <agent>").description("List connected credentials for an agent (claude, codex, cursor, ...) and which one new workspaces use").action(run(credentialsListCommand));
|
|
39348
39361
|
credentials.command("get <service>").description("Show stored credentials for a service (secrets masked for API keys)").option("-o, --org", "Organization credentials instead of personal").action(run(credentialsGetCommand));
|
|
39349
|
-
credentials.command("set <service>").description(`Store credentials. The API key (AWS secret for bedrock) is prompted for, or read from stdin. Services: ${API_KEY_CREDENTIAL_SERVICES.join(", ")}`).option("-o, --org", "Organization credentials (admins only)").option("--base-url <url>", "Base URL (ollama, openai-compatible, codex-foundry)").option("--models <ids>", "Comma-separated model IDs (ollama)").option("--models-url <url>", "Models endpoint (openai-compatible)").option("--authorization-header <value>", "Authorization header value (openai-compatible)").option("--preserve-authorization-header", "Forward the authorization header unchanged (openai-compatible)").option("--aws-access-key-id <id>", "AWS access key ID (bedrock)").option("--aws-region <region>", "AWS region (bedrock)").option("--small-fast-model-region <region>", "Region for the small fast model (bedrock)").option("--resource <name>", "Azure Foundry resource (claude-foundry)").option("--sonnet-model <id>", "Sonnet deployment (claude-foundry)").option("--haiku-model <id>", "Haiku deployment (claude-foundry)").option("--opus-model <id>", "Opus deployment (claude-foundry)").option("--model <id>", "Model deployment (codex-foundry)").action(run(credentialsSetCommand));
|
|
39362
|
+
credentials.command("set <service>").description(`Store credentials. The API key (AWS secret for bedrock) is prompted for, or read from stdin. Services: ${API_KEY_CREDENTIAL_SERVICES.join(", ")}`).option("-o, --org", "Organization credentials (admins only)").option("--base-url <url>", "Base URL (ollama, anthropic-compatible, openai-compatible, codex-foundry)").option("--models <ids>", "Comma-separated model IDs (ollama)").option("--models-url <url>", "Models endpoint (openai-compatible)").option("--authorization-header <value>", "Authorization header value (openai-compatible)").option("--preserve-authorization-header", "Forward the authorization header unchanged (openai-compatible)").option("--aws-access-key-id <id>", "AWS access key ID (bedrock)").option("--aws-region <region>", "AWS region (bedrock)").option("--small-fast-model-region <region>", "Region for the small fast model (bedrock)").option("--resource <name>", "Azure Foundry resource (claude-foundry)").option("--sonnet-model <id>", "Sonnet deployment (claude-foundry)").option("--haiku-model <id>", "Haiku deployment (claude-foundry)").option("--opus-model <id>", "Opus deployment (claude-foundry)").option("--model <id>", "Model deployment (codex-foundry)").action(run(credentialsSetCommand));
|
|
39350
39363
|
credentials.command("remove <service>").description("Remove stored credentials for a service (also claude, codex, muse subscriptions)").option("-o, --org", "Organization credentials instead of personal").action(run(credentialsRemoveCommand));
|
|
39351
39364
|
credentials.command("usage").description("Show how much of each connected Claude and ChatGPT subscription's 5-hour and weekly limits is used (personal and organization by default)").addOption(new import_commander.Option("-o, --org", "Only organization subscriptions").conflicts("user")).option("-u, --user", "Only your personal subscriptions").action(run(credentialsUsageCommand));
|
|
39352
39365
|
automation = program.command("automation").alias("auto").description("Manage automations");
|