replicas-cli 0.3.638 → 0.3.640

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 +29 -3
  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)
@@ -27012,10 +27028,12 @@ var init_issues = __esm({
27012
27028
  kind: external_exports.enum(WORKSPACE_KINDS),
27013
27029
  status: external_exports.enum(WORKSPACE_STATUSES),
27014
27030
  avatar: managerAvatarSchema.nullable(),
27015
- manager_id: external_exports.string().nullable()
27031
+ manager_id: external_exports.string().nullable(),
27032
+ user_id: external_exports.string().nullable().default(null)
27016
27033
  });
27017
27034
  issuesBootstrapResponseSchema = external_exports.object({
27018
27035
  sync_id: external_exports.number().int(),
27036
+ directory_version: external_exports.number().int().default(0),
27019
27037
  issue_key: external_exports.string(),
27020
27038
  users: external_exports.array(issueDirectoryUserSchema),
27021
27039
  workspaces: external_exports.array(issueDirectoryWorkspaceSchema),
@@ -43149,7 +43167,7 @@ var CLI_VERSION;
43149
43167
  var init_cli_version = __esm({
43150
43168
  "../shared/src/cli-version.ts"() {
43151
43169
  "use strict";
43152
- CLI_VERSION = "0.3.638";
43170
+ CLI_VERSION = "0.3.640";
43153
43171
  }
43154
43172
  });
43155
43173
 
@@ -58231,6 +58249,13 @@ async function workspaceWakeCommand(id, options) {
58231
58249
  await orgAuthenticatedFetch(`/v1/replica/${id}/wake${options.restore ? "?restore=true" : ""}`, { method: "POST" });
58232
58250
  outputSuccess(`Waking workspace ${id}. Check progress with: replicas status ${id}`);
58233
58251
  }
58252
+ async function workspaceRefreshEnvironmentCommand(id) {
58253
+ const result = await orgAuthenticatedFetch(`/v1/replica/${id}/environment/refresh`, { method: "POST" });
58254
+ output2(result, ({ status, changes }) => {
58255
+ console.log(status === "waking" ? `Waking workspace ${id} with its latest environment.` : `Workspace ${id} is up to date with its environment.`);
58256
+ for (const { kind, name, change: change2 } of changes) console.log(import_chalk23.default.gray(` ${change2} ${WORKSPACE_ENVIRONMENT_CHANGE_LABELS[kind]} ${name}`));
58257
+ });
58258
+ }
58234
58259
  function workspaceLifecycleCommand(action) {
58235
58260
  return async (id) => {
58236
58261
  await orgAuthenticatedFetch(`/v1/replica/${id}/${action}`, { method: "POST" });
@@ -62141,6 +62166,7 @@ var init_src2 = __esm({
62141
62166
  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
62167
  program.command("rename <id> <name>").description("Rename a replica (quote names with spaces)").action(run(workspaceRenameCommand));
62143
62168
  program.command("wake <id>").description("Wake a sleeping or archived replica").option("-r, --restore", "Restore an archived replica").action(run(workspaceWakeCommand));
62169
+ 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
62170
  program.command("sleep <id>").description("Put a replica to sleep").action(run(workspaceLifecycleCommand("sleep")));
62145
62171
  program.command("archive <id>").description("Archive a replica").action(run(workspaceLifecycleCommand("archive")));
62146
62172
  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.640",
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": {