replicas-cli 0.3.8 → 0.3.10

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 +36 -8
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -22898,6 +22898,18 @@ function coerceAuthFallbackPayload(payload) {
22898
22898
  };
22899
22899
  }
22900
22900
 
22901
+ // ../shared/src/api-casing.ts
22902
+ var OPAQUE_KEYS = /* @__PURE__ */ new Set(["payload", "env", "headers", "config", "input", "arguments"]);
22903
+ var toSnake = (key) => key.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase();
22904
+ function toSnakeCaseKeys(value) {
22905
+ if (Array.isArray(value)) return value.map(toSnakeCaseKeys);
22906
+ if (!isRecord(value)) return value;
22907
+ return Object.fromEntries(Object.entries(value).map(([key, entry]) => [
22908
+ toSnake(key),
22909
+ OPAQUE_KEYS.has(key) ? entry : toSnakeCaseKeys(entry)
22910
+ ]));
22911
+ }
22912
+
22901
22913
  // ../shared/src/engine/v1.ts
22902
22914
  var updateChatDisplayNameRequestSchema = external_exports.object({
22903
22915
  displayName: external_exports.string().trim().min(1).max(100)
@@ -22976,6 +22988,7 @@ var sendChatMessageRequestSchema = external_exports.object({
22976
22988
  thinkingLevel: external_exports.enum(VALID_THINKING_LEVELS).optional(),
22977
22989
  goalMode: external_exports.boolean().optional(),
22978
22990
  fastMode: external_exports.boolean().optional(),
22991
+ ultrafastMode: external_exports.boolean().optional(),
22979
22992
  source: external_exports.enum(MESSAGE_SOURCES).optional(),
22980
22993
  enableInteractiveTools: external_exports.boolean().optional(),
22981
22994
  type: external_exports.string().min(1).optional(),
@@ -24740,7 +24753,7 @@ Create tickets, fetch issues, update state, add comments, and search through \`r
24740
24753
 
24741
24754
  Use this when:
24742
24755
  - You need to create a Linear ticket or issue
24743
- - You encounter a Linear issue link and need to understand the task
24756
+ - You encounter a linear.app issue link and need to understand the task
24744
24757
  - You need to update an issue's state or add a comment
24745
24758
  - You need to search Linear issues
24746
24759
  - A Linear request failed with an authentication error`;
@@ -24798,6 +24811,8 @@ const issue = await replicas.linear.graphql({
24798
24811
  });
24799
24812
  \`\`\`
24800
24813
 
24814
+ For a link such as \`https://linear.app/acme/issue/ENG-123/fix-login\`, the identifier is the path segment after \`/issue/\` (\`ENG-123\`).
24815
+
24801
24816
  ## Update and comment in one script
24802
24817
 
24803
24818
  \`\`\`ts
@@ -24834,7 +24849,7 @@ For screenshots, recordings, diagrams, or other media, read \`references/MEDIA.m
24834
24849
  var LINEAR_ABILITY = {
24835
24850
  label: "Linear",
24836
24851
  description: "Create tickets, fetch issues, comment, and update state through @replicas/sdk.",
24837
- bullet: "- Interacting with Linear (creating tickets, fetching issues, updating state, commenting, or troubleshooting authentication): use replicas.linear.graphql from @replicas/sdk, which refreshes tokens automatically and needs no Linear MCP server. Read references/LINEAR.md before treating a rejected workspace token as a disconnected integration.",
24852
+ bullet: "- Interacting with Linear (creating tickets, fetching issues including any linear.app link the user shares, updating state, commenting, or troubleshooting authentication): use replicas.linear.graphql from @replicas/sdk, which refreshes tokens automatically and needs no Linear MCP server. Read references/LINEAR.md before treating a rejected workspace token as a disconnected integration.",
24838
24853
  section: SECTION6,
24839
24854
  referenceFile: { name: "LINEAR.md", content: REFERENCE6 }
24840
24855
  };
@@ -25758,6 +25773,7 @@ Read issues and project data through the workspace-scoped TypeScript SDK.
25758
25773
  **Reference:** \`references/SENTRY.md\`
25759
25774
 
25760
25775
  Use this when:
25776
+ - A user shares a sentry.io link
25761
25777
  - You need to inspect Sentry projects or issues
25762
25778
  - A user asks for error-monitoring context outside a webhook-triggered task`;
25763
25779
  var REFERENCE11 = `# Sentry Integration
@@ -25772,12 +25788,23 @@ import { replicas } from '@replicas/sdk';
25772
25788
  const issues = await replicas.sentry.request('/organizations/acme/issues/?query=is:unresolved');
25773
25789
  \`\`\`
25774
25790
 
25791
+ ## Read a pasted issue link
25792
+
25793
+ Map the link to API paths instead of fetching the page. For \`https://acme.sentry.io/issues/4512345678/?project=123\` or \`https://sentry.io/organizations/acme/issues/4512345678/\`, the organization slug is \`acme\` and the issue ID is \`4512345678\`:
25794
+
25795
+ \`\`\`ts
25796
+ const issue = await replicas.sentry.request('/organizations/acme/issues/4512345678/');
25797
+ const latest = await replicas.sentry.request('/organizations/acme/issues/4512345678/events/latest/');
25798
+ \`\`\`
25799
+
25800
+ A link ending in \`/events/<eventId>/\` names a specific event: \`/organizations/acme/issues/4512345678/events/<eventId>/\`. Resolve a short ID such as \`BACKEND-1A2\` with \`/organizations/acme/shortids/BACKEND-1A2/\`. The event's \`entries\` hold the stack trace and breadcrumbs.
25801
+
25775
25802
  Pass only a relative Sentry API path. The Replicas gateway selects the connected organization credential and rejects writes, absolute URLs, oversized responses, and long-running requests.
25776
25803
  `;
25777
25804
  var SENTRY_ABILITY = {
25778
25805
  label: "Sentry",
25779
25806
  description: "Read Sentry projects and issues through @replicas/sdk.",
25780
- bullet: "- Interacting with Sentry (reading projects, issues, and error context)",
25807
+ bullet: "- Interacting with Sentry (reading projects, issues, and error context, including any sentry.io link the user shares): use replicas.sentry.request from @replicas/sdk. Read references/SENTRY.md to turn an issue link into API paths.",
25781
25808
  section: SECTION11,
25782
25809
  referenceFile: { name: "SENTRY.md", content: REFERENCE11 }
25783
25810
  };
@@ -26045,8 +26072,8 @@ var automationUpdateToolInputSchema = automationToolInputSchema.partial().extend
26045
26072
  var chatPath = { id: external_exports.string().describe("Workspace ID"), chat_id: external_exports.string().describe("Chat ID") };
26046
26073
  var { provider, model, thinkingLevel, title, message } = forkChatRequestSchema.shape;
26047
26074
  var createChatToolInputSchema = external_exports.object({ id: chatPath.id, provider, title: createChatRequestSchema.shape.title });
26048
- var forkChatToolInputSchema = external_exports.object({ ...chatPath, provider, model, thinkingLevel, title, message });
26049
- var renameChatToolInputSchema = external_exports.object({ ...chatPath, ...updateChatDisplayNameRequestSchema.shape });
26075
+ var forkChatToolInputSchema = external_exports.object({ ...chatPath, provider, model, thinking_level: thinkingLevel, title, message });
26076
+ var renameChatToolInputSchema = external_exports.object({ ...chatPath, display_name: updateChatDisplayNameRequestSchema.shape.displayName });
26050
26077
  var runCommandToolInputSchema = external_exports.object({ id: chatPath.id, ...workspaceExecRequestSchema.shape });
26051
26078
  var environmentMcpPath = { environment_id: external_exports.string().describe("Environment ID") };
26052
26079
  var createEnvironmentMcpToolInputSchema = external_exports.object({ ...environmentMcpPath, ...createEnvironmentMcpRequestSchema.shape });
@@ -28343,7 +28370,7 @@ var headlessAgentRequestSchema = external_exports.object({
28343
28370
  });
28344
28371
 
28345
28372
  // ../shared/src/cli-version.ts
28346
- var CLI_VERSION = "0.3.8";
28373
+ var CLI_VERSION = "0.3.10";
28347
28374
 
28348
28375
  // ../shared/src/version.ts
28349
28376
  function compareVersions(v1, v2) {
@@ -28978,6 +29005,7 @@ var EMAIL_TEMPLATE_KEYS = [...EMAIL_KEYS, ...MANUAL_EMAIL_TEMPLATE_KEYS];
28978
29005
  var decoder = new TextDecoder("utf-8", { fatal: true });
28979
29006
  var MAX_SOURCE_PAGE_BYTES = 4 * 1024 * 1024;
28980
29007
  var SOURCE_RANGE_BYTES = 256 * 1024;
29008
+ var MAX_APPENDED_BYTES = 4 * 1024 * 1024;
28981
29009
 
28982
29010
  // ../shared/src/object-store/types.ts
28983
29011
  var MEDIA_KIND = {
@@ -29167,7 +29195,7 @@ function enableJsonMode() {
29167
29195
  var isJsonMode = () => jsonMode;
29168
29196
  var isInteractive = () => !jsonMode && !!process.stdin.isTTY;
29169
29197
  function output(data, printHuman) {
29170
- if (jsonMode) process.stdout.write(`${JSON.stringify(data, null, 2)}
29198
+ if (jsonMode) process.stdout.write(`${JSON.stringify(toSnakeCaseKeys(data), null, 2)}
29171
29199
  `);
29172
29200
  else printHuman(data);
29173
29201
  }
@@ -30966,7 +30994,7 @@ async function credentialsSetCommand(service, options) {
30966
30994
  const { org: org2, models, ...fields } = options;
30967
30995
  const secretField = service === "bedrock" ? "aws_secret_access_key" : "api_key";
30968
30996
  const body = {
30969
- ...Object.fromEntries(Object.entries(fields).map(([key, value]) => [key.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`), value])),
30997
+ ...toSnakeCaseKeys(fields),
30970
30998
  ...models ? { models: models.split(",").map((model2) => model2.trim()).filter(Boolean) } : {},
30971
30999
  [secretField]: await readSecret(service, secretField === "api_key" ? "API key" : "AWS secret access key")
30972
31000
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-cli",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
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": {