replicas-cli 0.3.172 → 0.3.173
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 +13 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -29094,7 +29094,7 @@ var headlessAgentRequestSchema = external_exports.object({
|
|
|
29094
29094
|
});
|
|
29095
29095
|
|
|
29096
29096
|
// ../shared/src/cli-version.ts
|
|
29097
|
-
var CLI_VERSION = "0.3.
|
|
29097
|
+
var CLI_VERSION = "0.3.173";
|
|
29098
29098
|
|
|
29099
29099
|
// ../shared/src/version.ts
|
|
29100
29100
|
function compareVersions(v1, v2) {
|
|
@@ -30777,6 +30777,10 @@ var import_prompts7 = __toESM(require("prompts"));
|
|
|
30777
30777
|
function formatDate(dateString) {
|
|
30778
30778
|
return new Date(dateString).toLocaleString();
|
|
30779
30779
|
}
|
|
30780
|
+
function printReplicaActivity(activity) {
|
|
30781
|
+
console.log(import_chalk7.default.gray(` Agent: ${activity.state.replaceAll("_", " ")}${activity.current_step ? ` \xB7 ${activity.current_step}` : ""}`));
|
|
30782
|
+
if (activity.last_agent_message) console.log(import_chalk7.default.gray(` Last message: ${activity.last_agent_message}`));
|
|
30783
|
+
}
|
|
30780
30784
|
function ensureOrgApiAuthenticated() {
|
|
30781
30785
|
if (!canCallOrgApi()) {
|
|
30782
30786
|
throw new Error('Not logged in. Run "replicas login" or "replicas login --api-key".');
|
|
@@ -32757,6 +32761,7 @@ Replica: ${replica.name}
|
|
|
32757
32761
|
if (replica.coding_agent) {
|
|
32758
32762
|
console.log(import_chalk21.default.gray(` Coding Agent: ${replica.coding_agent}`));
|
|
32759
32763
|
}
|
|
32764
|
+
if (replica.activity) printReplicaActivity(replica.activity);
|
|
32760
32765
|
if (replica.repository_statuses && replica.repository_statuses.length > 0) {
|
|
32761
32766
|
console.log(import_chalk21.default.gray(" Repository Statuses:"));
|
|
32762
32767
|
for (const repositoryStatus of replica.repository_statuses) {
|
|
@@ -33002,9 +33007,14 @@ async function workspaceWaitCommand(id, options) {
|
|
|
33002
33007
|
do {
|
|
33003
33008
|
const query = new URLSearchParams({ timeout_seconds: String(Math.max(1, Math.min(50, Math.ceil((deadline - Date.now()) / 1e3)))) });
|
|
33004
33009
|
if (options.chat) query.set("chat_id", options.chat);
|
|
33010
|
+
const step = result?.activity.current_step;
|
|
33005
33011
|
result = await orgAuthenticatedFetch(`/v1/replica/${id}/wait?${query}`);
|
|
33006
|
-
|
|
33007
|
-
|
|
33012
|
+
if (!result.done && result.activity.current_step && result.activity.current_step !== step) console.error(import_chalk22.default.gray(`\u2026 ${result.activity.current_step}`));
|
|
33013
|
+
} while (!result.done && result.activity.state !== "waiting_for_input" && Date.now() < deadline);
|
|
33014
|
+
output(result, ({ done, status, deleted, activity }) => {
|
|
33015
|
+
console.log(done ? `Done (status: ${deleted ? "deleted" : status})` : activity.state === "waiting_for_input" ? "The agent is waiting for input" : `Still working after timeout (status: ${status})`);
|
|
33016
|
+
printReplicaActivity(activity);
|
|
33017
|
+
});
|
|
33008
33018
|
if (!result.done) process.exitCode = 1;
|
|
33009
33019
|
}
|
|
33010
33020
|
async function workspaceStatusCommand(id) {
|