replicas-cli 0.3.19 → 0.3.21

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
@@ -26051,6 +26051,7 @@ var REPLICAS_MCP_TOOLS = {
26051
26051
  linearSessionIntent: "register_linear_session_intent",
26052
26052
  listChannelSettings: "list_channel_settings",
26053
26053
  saveChannelPreset: "save_channel_preset",
26054
+ deleteChannelPreset: "delete_channel_preset",
26054
26055
  updateChannelSettings: "update_channel_settings",
26055
26056
  spawnSubagent: "spawn_subagent",
26056
26057
  messageSubagent: "message_subagent",
@@ -28395,7 +28396,7 @@ var headlessAgentRequestSchema = external_exports.object({
28395
28396
  });
28396
28397
 
28397
28398
  // ../shared/src/cli-version.ts
28398
- var CLI_VERSION = "0.3.19";
28399
+ var CLI_VERSION = "0.3.21";
28399
28400
 
28400
28401
  // ../shared/src/version.ts
28401
28402
  function compareVersions(v1, v2) {
@@ -28523,10 +28524,14 @@ var mothershipSaveChannelPresetToolInputSchema = mothershipSlackConfirmationSche
28523
28524
  });
28524
28525
  var mothershipUpdateChannelSettingsToolInputSchema = mothershipSlackConfirmationSchema.extend({
28525
28526
  source: external_exports.enum(MOTHERSHIP_SOURCE_TYPES).optional().describe("Defaults to `slack`."),
28526
- external_id: external_exports.string().describe(`Slack channel id or Linear team id of an already monitored source, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`.`),
28527
+ external_id: external_exports.string().describe("Slack channel id or Linear team id."),
28528
+ monitored: external_exports.boolean().optional().describe("`false` stops Mothership from handling the source: it excludes a Slack channel or stops monitoring a Linear team. `true` resumes a Slack channel or starts monitoring a Linear team, and only an organization admin can ask for that. Omit to keep it."),
28527
28529
  preset_id: external_exports.string().nullable().optional().describe("Preset to assign; `null` removes the preset. Omit to keep it."),
28528
28530
  instructions: external_exports.string().nullable().optional().describe("Complete channel-specific instructions, applied after the preset; replaces the existing text. `null` clears them. Omit to keep them.")
28529
28531
  });
28532
+ var mothershipDeleteChannelPresetToolInputSchema = mothershipSlackConfirmationSchema.extend({
28533
+ preset_id: external_exports.string().describe(`Id of the preset to delete, from \`${REPLICAS_MCP_TOOLS.listChannelSettings}\`.`)
28534
+ });
28530
28535
 
28531
28536
  // ../shared/src/routes/plugin-catalog.ts
28532
28537
  var EXPLICIT_PLUGIN_CATALOG = [
@@ -31039,6 +31044,24 @@ async function credentialsRemoveCommand(service, options) {
31039
31044
  const response = await orgAuthenticatedFetch(credentialsPath(service, options), { method: "DELETE" });
31040
31045
  output(response, ({ success: success2 }) => console.log(success2 ? import_chalk17.default.green(`Removed ${scopeLabel(options)} ${service} credentials.`) : `No ${scopeLabel(options)} ${service} credentials to remove.`));
31041
31046
  }
31047
+ async function credentialsUsageCommand({ org: org2, user }) {
31048
+ const scope = org2 ? "org" : user ? "user" : null;
31049
+ const response = await orgAuthenticatedFetch(`/v1/agents/subscription-usage${scope ? `?scope=${scope}` : ""}`);
31050
+ output(response, ({ accounts }) => {
31051
+ if (accounts.length === 0) console.log(import_chalk17.default.yellow("No Claude or Codex subscriptions connected."));
31052
+ for (const account of accounts) {
31053
+ const limits = account.reconnectRequired ? import_chalk17.default.yellow(`Reconnect required: run replicas ${account.provider}-auth${account.scope === "org" ? " --org" : ""} with the same account`) : !account.windows ? import_chalk17.default.gray("Usage unavailable, try again in a few minutes") : account.windows.length === 0 ? "No usage limits" : account.windows.map((window) => [
31054
+ window.kind === "session" ? "5-hour" : "weekly",
31055
+ window.model,
31056
+ `${Math.round(window.usedPercent)}%`,
31057
+ window.resetsAt && import_chalk17.default.gray(`(resets ${formatDate(window.resetsAt)})`)
31058
+ ].filter(Boolean).join(" ")).join(", ");
31059
+ const label = [account.email ?? account.credentialId, account.planType].filter(Boolean).join(" ");
31060
+ console.log(`${account.provider} ${scopeLabel({ org: account.scope === "org" })} ${label} ${limits}`);
31061
+ if (account.exhaustedUntil) console.log(import_chalk17.default.gray(` Workspaces skip this account until ${formatDate(account.exhaustedUntil)}`));
31062
+ }
31063
+ });
31064
+ }
31042
31065
 
31043
31066
  // src/lib/version-check.ts
31044
31067
  var import_chalk18 = __toESM(require("chalk"));
@@ -34162,6 +34185,7 @@ credentials.command("list <agent>").description("List connected credentials for
34162
34185
  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));
34163
34186
  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));
34164
34187
  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));
34188
+ 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));
34165
34189
  var automation = program.command("automation").alias("auto").description("Manage automations");
34166
34190
  automation.command("list").description("List all automations").option("-p, --page <page>", "Page number").option("-l, --limit <limit>", "Number of items per page").option("--owner <owner>", "Ownership filter: org, user, all").option("--trigger-type <type>", "Only automations with a trigger of this type (cron, github, gitlab, slack, sentry, custom)").option("--enabled <enabled>", "Only enabled or disabled automations (true/false)").option("--search <search>", "Case-insensitive substring match on the name").option("--background <background>", "Only background (true) or main-list (false) automations").action(run(automationListCommand));
34167
34191
  automation.command("get <id>").description("Get automation details by ID").action(run(automationGetCommand));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.19",
3
+ "version": "0.3.21",
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": {