replicas-cli 0.3.230 → 0.3.233
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 +34 -29
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -16850,7 +16850,8 @@ var init_v1 = __esm({
|
|
|
16850
16850
|
senderAvatarUrl: external_exports.string().optional(),
|
|
16851
16851
|
errorNotificationTarget: integrationErrorNotificationTargetSchema.optional(),
|
|
16852
16852
|
errorNotificationTargets: external_exports.array(integrationErrorNotificationTargetSchema).optional(),
|
|
16853
|
-
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()
|
|
16854
16855
|
}).passthrough();
|
|
16855
16856
|
CODEX_ITEM_FIELD_CHECKS = {
|
|
16856
16857
|
userMessage: (item) => typeof item.content === "string",
|
|
@@ -16869,7 +16870,8 @@ var init_v1 = __esm({
|
|
|
16869
16870
|
messageId: external_exports.string(),
|
|
16870
16871
|
queued: external_exports.boolean(),
|
|
16871
16872
|
position: external_exports.number(),
|
|
16872
|
-
chatId: external_exports.string().optional()
|
|
16873
|
+
chatId: external_exports.string().optional(),
|
|
16874
|
+
steered: external_exports.boolean().optional()
|
|
16873
16875
|
});
|
|
16874
16876
|
}
|
|
16875
16877
|
});
|
|
@@ -17515,6 +17517,11 @@ Only one recording at a time. Re-running \`start\` while one is active fails - c
|
|
|
17515
17517
|
### \`replicas computer record stop\`
|
|
17516
17518
|
SIGINTs ffmpeg, verifies that the process has finalized the MP4, then prints the output path. A finalization timeout preserves the recording state so \`stop\` can be retried safely. To show the interaction in a PR or message, turn it into a short looping GIF with \`replicas media gif <path>\`, then upload with \`replicas media upload <path> --name "<name>"\`.
|
|
17517
17519
|
|
|
17520
|
+
### \`replicas computer mac <tool> ['<json>'] [--screenshot PATH] [--session NAME]\`
|
|
17521
|
+
Drives one app on the user's own Mac in the background, while they keep working: their cursor, focus and front window stay theirs. It works while they have this workspace open in the Replicas desktop app with computer use turned on; otherwise it says no Mac is connected. Each call runs one [Cua Driver tool](https://cua.ai/docs/cua-driver) and opens a live view of the window you're working in on this desktop, so the user can watch it in the \`Desktop\` tab.
|
|
17522
|
+
|
|
17523
|
+
Start with \`list_apps\` or \`launch_app '{"bundle_id":"com.apple.TextEdit"}'\` (never \`open\`, which brings the app forward), then \`get_window_state '{"pid":\u2026,"window_id":\u2026}'\` for the accessibility tree and a screenshot (\`--screenshot\` saves it), then act with \`click\`, \`type_text\`, \`press_key\`, \`set_value\` or \`scroll\` by \`element_token\`, and read the window again to verify. Type line breaks as a separate \`press_key\` Return: a newline inside \`type_text\` is dropped. Pass the same \`--session\` to keep element tokens valid across calls. Apps that open no window when launched in the background show one once you open a file with \`launch_app\`'s \`urls\`. \`get_guide\` explains everything else. Some actions, like a disabled menu item, need the app in front: ask the user before \`bring_to_front\`.
|
|
17524
|
+
|
|
17518
17525
|
## Patterns
|
|
17519
17526
|
|
|
17520
17527
|
### Browser action / state loop
|
|
@@ -20967,15 +20974,15 @@ function skillNamesFromCommand(command) {
|
|
|
20967
20974
|
});
|
|
20968
20975
|
})));
|
|
20969
20976
|
}
|
|
20970
|
-
function pathArgs(
|
|
20977
|
+
function pathArgs(command, words) {
|
|
20971
20978
|
const paths = [];
|
|
20972
20979
|
for (let i = 0; i < words.length; i++) {
|
|
20973
20980
|
const word = words[i];
|
|
20974
|
-
|
|
20981
|
+
const valueAt = /^-[A-Za-z]{2,}$/.test(word) ? [...word.slice(1)].findIndex((letter) => VALUE_FLAGS[command]?.has(`-${letter}`)) : -1;
|
|
20982
|
+
if (VALUE_FLAGS[command]?.has(word) || valueAt >= 0 && valueAt === word.length - 2) {
|
|
20975
20983
|
i++;
|
|
20976
20984
|
continue;
|
|
20977
20985
|
}
|
|
20978
|
-
if (word.startsWith("--glob=") || word.startsWith("--regexp=")) continue;
|
|
20979
20986
|
if (word.startsWith("-")) continue;
|
|
20980
20987
|
paths.push(word);
|
|
20981
20988
|
}
|
|
@@ -20983,8 +20990,13 @@ function pathArgs(words, extraValueFlags) {
|
|
|
20983
20990
|
}
|
|
20984
20991
|
function readCommandPaths(command, words) {
|
|
20985
20992
|
if (SEARCH_COMMANDS.has(command)) {
|
|
20986
|
-
const args = pathArgs(words.slice(1));
|
|
20987
|
-
return args.slice(1);
|
|
20993
|
+
const args = pathArgs(command, words.slice(1));
|
|
20994
|
+
return words.some((word) => PATTERN_FLAGS.has(word) || /^-[A-Za-z]+[ef]$/.test(word) || /^--(file|regexp)=/.test(word)) ? args : args.slice(1);
|
|
20995
|
+
}
|
|
20996
|
+
if (command === "find") {
|
|
20997
|
+
const paths = words.slice(1).filter((word) => !/^(-[HLP]|-O\d|--)$/.test(word));
|
|
20998
|
+
const expression = paths.findIndex((word) => word.startsWith("-") || word === "(" || word === "!");
|
|
20999
|
+
return expression === -1 ? paths : paths.slice(0, expression);
|
|
20988
21000
|
}
|
|
20989
21001
|
if (command === "sed") {
|
|
20990
21002
|
const paths = [];
|
|
@@ -21010,13 +21022,13 @@ function readCommandPaths(command, words) {
|
|
|
21010
21022
|
}
|
|
21011
21023
|
return Array.from(new Set(paths));
|
|
21012
21024
|
}
|
|
21013
|
-
return pathArgs(words.slice(1)
|
|
21025
|
+
return pathArgs(command, words.slice(1));
|
|
21014
21026
|
}
|
|
21015
21027
|
function writesFiles(name, argv) {
|
|
21016
21028
|
if (name === "sed") return argv.some((word) => /^(-[a-zA-Z]*i|--in-place)/.test(word));
|
|
21017
21029
|
return name === "find" && argv.some((word) => /^-(exec|ok|delete|fprint|fls)/.test(word));
|
|
21018
21030
|
}
|
|
21019
|
-
var SEARCH_COMMANDS,
|
|
21031
|
+
var SEARCH_COMMANDS, LINE_COUNT_VALUE_FLAGS, SEARCH_VALUE_FLAGS, VALUE_FLAGS, PATTERN_FLAGS, SCRIPT_ROOT, commandName, fileWrites, SKILL_READ_COMMANDS;
|
|
21020
21032
|
var init_format2 = __esm({
|
|
21021
21033
|
"../shared/src/display-message/format.ts"() {
|
|
21022
21034
|
"use strict";
|
|
@@ -21026,25 +21038,18 @@ var init_format2 = __esm({
|
|
|
21026
21038
|
init_shell_commands();
|
|
21027
21039
|
init_utils();
|
|
21028
21040
|
SEARCH_COMMANDS = /* @__PURE__ */ new Set(["grep", "rg"]);
|
|
21029
|
-
|
|
21030
|
-
|
|
21031
|
-
|
|
21032
|
-
"-
|
|
21033
|
-
"-
|
|
21034
|
-
|
|
21035
|
-
|
|
21036
|
-
"
|
|
21037
|
-
"
|
|
21038
|
-
"--
|
|
21039
|
-
|
|
21040
|
-
|
|
21041
|
-
"--regexp"
|
|
21042
|
-
]);
|
|
21043
|
-
LINE_COUNT_VALUE_FLAGS = /* @__PURE__ */ new Set([
|
|
21044
|
-
"-c",
|
|
21045
|
-
"-n",
|
|
21046
|
-
"--lines"
|
|
21047
|
-
]);
|
|
21041
|
+
LINE_COUNT_VALUE_FLAGS = /* @__PURE__ */ new Set(["-c", "-n", "--bytes", "--lines"]);
|
|
21042
|
+
SEARCH_VALUE_FLAGS = ["-A", "-B", "-C", "-d", "-e", "-f", "-m", "--after-context", "--before-context", "--context", "--file", "--max-count", "--regexp"];
|
|
21043
|
+
VALUE_FLAGS = {
|
|
21044
|
+
grep: /* @__PURE__ */ new Set([...SEARCH_VALUE_FLAGS, "-D", "--devices", "--directories", "--exclude", "--exclude-dir", "--include"]),
|
|
21045
|
+
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"]),
|
|
21046
|
+
head: LINE_COUNT_VALUE_FLAGS,
|
|
21047
|
+
tail: LINE_COUNT_VALUE_FLAGS,
|
|
21048
|
+
ls: /* @__PURE__ */ new Set(["-I", "-T", "-w", "--hide", "--ignore", "--tabsize", "--width"]),
|
|
21049
|
+
nl: /* @__PURE__ */ new Set(["-b", "-d", "-f", "-h", "-i", "-l", "-n", "-s", "-v", "-w"]),
|
|
21050
|
+
tree: /* @__PURE__ */ new Set(["-I", "-L", "-P", "--filelimit"])
|
|
21051
|
+
};
|
|
21052
|
+
PATTERN_FLAGS = /* @__PURE__ */ new Set(["-e", "-f", "--file", "--regexp"]);
|
|
21048
21053
|
SCRIPT_ROOT = "/";
|
|
21049
21054
|
commandName = (argv) => argv[0].split("/").pop() ?? argv[0];
|
|
21050
21055
|
fileWrites = ({ writes }) => writes.filter(({ path: path10 }) => path10 !== "/dev/null");
|
|
@@ -31408,7 +31413,7 @@ var CLI_VERSION;
|
|
|
31408
31413
|
var init_cli_version = __esm({
|
|
31409
31414
|
"../shared/src/cli-version.ts"() {
|
|
31410
31415
|
"use strict";
|
|
31411
|
-
CLI_VERSION = "0.3.
|
|
31416
|
+
CLI_VERSION = "0.3.233";
|
|
31412
31417
|
}
|
|
31413
31418
|
});
|
|
31414
31419
|
|