replicas-cli 0.3.638 → 0.3.639

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.
Files changed (2) hide show
  1. package/dist/index.cjs +26 -2
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -24027,7 +24027,7 @@ function workspaceConfigWithCapabilities(config3, capabilities = {}) {
24027
24027
  function workspaceConfigWithPrFollowups(config3, prFollowups = config3?.capabilities?.pr_followups === true) {
24028
24028
  return workspaceConfigWithCapabilities(config3, { pr_followups: prFollowups });
24029
24029
  }
24030
- var WORKSPACE_STATUSES, SUPPORT_EMAIL, WORKSPACE_SANDBOX_LOST_MESSAGE, STALE_PREPARING_MS, WORKSPACE_PAUSED_COPY, securityRunConfigSchema, WORKSPACE_KINDS, MANAGER_KINDS, CREATABLE_WORKSPACE_KINDS, createWorkspaceCanvasUploadRequestSchema, completeWorkspaceCanvasUploadRequestSchema, WORKSPACE_SIDEBAR_VIEWS, WORKSPACE_STATUS_FILTERS, DEFAULT_STATUS_FILTERS, DEFAULT_WORKSPACE_FILTERS, ONE_DAY_MS, describeWorkspaceAccess, workspaceExecRequestSchema, terminalRtcCandidateSchema, terminalSocketServerMessageSchema;
24030
+ var WORKSPACE_STATUSES, SUPPORT_EMAIL, WORKSPACE_SANDBOX_LOST_MESSAGE, STALE_PREPARING_MS, WORKSPACE_PAUSED_COPY, securityRunConfigSchema, WORKSPACE_KINDS, MANAGER_KINDS, CREATABLE_WORKSPACE_KINDS, WORKSPACE_ENVIRONMENT_CHANGE_KINDS, WORKSPACE_ENVIRONMENT_CHANGE_LABELS, workspaceEnvironmentChangeSchema, createWorkspaceCanvasUploadRequestSchema, completeWorkspaceCanvasUploadRequestSchema, WORKSPACE_SIDEBAR_VIEWS, WORKSPACE_STATUS_FILTERS, DEFAULT_STATUS_FILTERS, DEFAULT_WORKSPACE_FILTERS, ONE_DAY_MS, describeWorkspaceAccess, workspaceExecRequestSchema, terminalRtcCandidateSchema, terminalSocketServerMessageSchema;
24031
24031
  var init_workspaces = __esm({
24032
24032
  "../shared/src/routes/workspaces.ts"() {
24033
24033
  "use strict";
@@ -24062,6 +24062,22 @@ var init_workspaces = __esm({
24062
24062
  WORKSPACE_KINDS = ["standard", "manager", "mothership", "scout"];
24063
24063
  MANAGER_KINDS = ["manager", "mothership"];
24064
24064
  CREATABLE_WORKSPACE_KINDS = ["standard", ...MANAGER_KINDS];
24065
+ WORKSPACE_ENVIRONMENT_CHANGE_KINDS = ["variable", "file", "mcp", "skill", "skills_registry", "repository", "system_prompt", "start_hook"];
24066
+ WORKSPACE_ENVIRONMENT_CHANGE_LABELS = {
24067
+ variable: "Variable",
24068
+ file: "File",
24069
+ mcp: "MCP server",
24070
+ skill: "Skill",
24071
+ skills_registry: "Skills registry",
24072
+ repository: "Repository",
24073
+ system_prompt: "System prompt",
24074
+ start_hook: "Start hook"
24075
+ };
24076
+ workspaceEnvironmentChangeSchema = external_exports.object({
24077
+ kind: external_exports.enum(WORKSPACE_ENVIRONMENT_CHANGE_KINDS),
24078
+ name: external_exports.string(),
24079
+ change: external_exports.enum(["added", "removed", "updated"])
24080
+ });
24065
24081
  createWorkspaceCanvasUploadRequestSchema = external_exports.object({
24066
24082
  sizeBytes: external_exports.number().int().positive(),
24067
24083
  filename: external_exports.string().min(1)
@@ -43149,7 +43165,7 @@ var CLI_VERSION;
43149
43165
  var init_cli_version = __esm({
43150
43166
  "../shared/src/cli-version.ts"() {
43151
43167
  "use strict";
43152
- CLI_VERSION = "0.3.638";
43168
+ CLI_VERSION = "0.3.639";
43153
43169
  }
43154
43170
  });
43155
43171
 
@@ -58231,6 +58247,13 @@ async function workspaceWakeCommand(id, options) {
58231
58247
  await orgAuthenticatedFetch(`/v1/replica/${id}/wake${options.restore ? "?restore=true" : ""}`, { method: "POST" });
58232
58248
  outputSuccess(`Waking workspace ${id}. Check progress with: replicas status ${id}`);
58233
58249
  }
58250
+ async function workspaceRefreshEnvironmentCommand(id) {
58251
+ const result = await orgAuthenticatedFetch(`/v1/replica/${id}/environment/refresh`, { method: "POST" });
58252
+ output2(result, ({ status, changes }) => {
58253
+ console.log(status === "waking" ? `Waking workspace ${id} with its latest environment.` : `Workspace ${id} is up to date with its environment.`);
58254
+ for (const { kind, name, change: change2 } of changes) console.log(import_chalk23.default.gray(` ${change2} ${WORKSPACE_ENVIRONMENT_CHANGE_LABELS[kind]} ${name}`));
58255
+ });
58256
+ }
58234
58257
  function workspaceLifecycleCommand(action) {
58235
58258
  return async (id) => {
58236
58259
  await orgAuthenticatedFetch(`/v1/replica/${id}/${action}`, { method: "POST" });
@@ -62141,6 +62164,7 @@ var init_src2 = __esm({
62141
62164
  program.command("read <id>").description("Read conversation history of a replica").option("-l, --limit <limit>", "Maximum number of events to return, from the end").option("--before <cursor>", "Read the page before this cursor (see Has More output)").option("-b, --before-event <index>", "Read the page before this event index (older engines)").option("-c, --chat <chatId>", "Chat to read (defaults to the main chat)").action(run(replicaReadCommand));
62142
62165
  program.command("rename <id> <name>").description("Rename a replica (quote names with spaces)").action(run(workspaceRenameCommand));
62143
62166
  program.command("wake <id>").description("Wake a sleeping or archived replica").option("-r, --restore", "Restore an archived replica").action(run(workspaceWakeCommand));
62167
+ program.command("refresh-environment <id>").description("Apply the latest version of a replica's environment: variables, files, MCP servers, skills, repositories, system prompt and start hook").action(run(workspaceRefreshEnvironmentCommand));
62144
62168
  program.command("sleep <id>").description("Put a replica to sleep").action(run(workspaceLifecycleCommand("sleep")));
62145
62169
  program.command("archive <id>").description("Archive a replica").action(run(workspaceLifecycleCommand("archive")));
62146
62170
  program.command("wait <id>").description("Wait until a replica finishes starting and its agents finish their turns").option("-c, --chat <chatId>", "Wait for only this chat").option("-t, --timeout <seconds>", "Give up after this many seconds (default 600)").action(run(workspaceWaitCommand));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.638",
3
+ "version": "0.3.639",
4
4
  "description": "CLI for managing Replicas workspaces - SSH into cloud dev environments with automatic port forwarding",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {