replicas-engine 0.1.827 → 0.1.830

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.
@@ -5,11 +5,11 @@ import {
5
5
  getCodexAspHost,
6
6
  restartCodexAspHost,
7
7
  restartCodexAspHostIfRunning
8
- } from "./chunk-HQFWCOI3.js";
9
- import "./chunk-C3MWT2WD.js";
10
- import "./chunk-YMTLQI4E.js";
8
+ } from "./chunk-LIIFRZYH.js";
9
+ import "./chunk-NDU3XPU4.js";
10
+ import "./chunk-E53FG54G.js";
11
11
  import "./chunk-UZSNFLDQ.js";
12
- import "./chunk-5XK2ECRO.js";
12
+ import "./chunk-LMC2MLSC.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
  export {
15
15
  getCodexAspHost,
@@ -4,7 +4,7 @@ const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  HOOK_EXEC_MAX_BUFFER_BYTES,
6
6
  isVersionBelow
7
- } from "./chunk-5XK2ECRO.js";
7
+ } from "./chunk-LMC2MLSC.js";
8
8
 
9
9
  // src/utils/codex-agent-env.ts
10
10
  function buildCodexAgentEnv(source = process.env) {
@@ -241,7 +241,7 @@ var DEFAULT_CODEX_ARGS = [
241
241
  var MIN_CODEX_CLI_VERSION = "0.153.3";
242
242
  var CODEX_UPGRADE_TIMEOUT_MS = 12e4;
243
243
  var codexCliVersionEnsured = null;
244
- var ENGINE_PACKAGE_VERSION = "0.1.827";
244
+ var ENGINE_PACKAGE_VERSION = "0.1.830";
245
245
  var INITIALIZE_METHOD = "initialize";
246
246
  var INITIALIZED_NOTIFICATION = "initialized";
247
247
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  shouldRefreshPullRequests
6
- } from "./chunk-5XK2ECRO.js";
6
+ } from "./chunk-LMC2MLSC.js";
7
7
 
8
8
  // src/services/post-tool-pr-notifier.ts
9
9
  async function notifyPostToolUse(toolName, toolInput) {
@@ -5,18 +5,18 @@ import {
5
5
  ENGINE_ENV,
6
6
  monolithRequest,
7
7
  setAgentCredentialSnapshot
8
- } from "./chunk-C3MWT2WD.js";
8
+ } from "./chunk-NDU3XPU4.js";
9
9
  import {
10
10
  AppServerProcess,
11
11
  buildCodexAgentEnv
12
- } from "./chunk-YMTLQI4E.js";
12
+ } from "./chunk-E53FG54G.js";
13
13
  import {
14
14
  CODEX_AUTH_ENV_KEYS,
15
15
  CODEX_AUTH_ENV_KEYS_BY_METHOD,
16
16
  codexAuthEnvFromResponse,
17
17
  createErrorResult,
18
18
  createSuccessResult
19
- } from "./chunk-5XK2ECRO.js";
19
+ } from "./chunk-LMC2MLSC.js";
20
20
 
21
21
  // src/managers/codex-token-manager.ts
22
22
  import { promises as fs } from "fs";
@@ -232,7 +232,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
232
232
  const data = await response.json();
233
233
  await this.applyCredentialsResponse(data);
234
234
  if (restartOnChange && CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index])) {
235
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-OGXCZYKE.js");
235
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-E4CCHLWU.js");
236
236
  await restartCodexAspHostIfRunning2();
237
237
  }
238
238
  if (data.scope) {
@@ -2367,14 +2367,16 @@ Download protected attachments with \`await replicas.linear.download(url)\`; thi
2367
2367
 
2368
2368
  ## Check access
2369
2369
 
2370
+ Call Linear directly; integration listing is optional. If \`replicas.integrations.list()\` returns a 5xx or \`Internal server error\`, skip it and continue through \`replicas.linear.graphql\`.
2371
+
2370
2372
  \`\`\`ts
2371
2373
  import { replicas } from '@replicas/sdk';
2372
2374
 
2373
- const { native } = await replicas.integrations.list();
2374
- if (!native.linear) throw new Error('Connect Linear in Replicas organization integrations first.');
2375
+ const result = await replicas.linear.graphql({ query: 'query { viewer { id } }' });
2376
+ if (result.errors?.length) throw new Error(JSON.stringify(result.errors));
2375
2377
  \`\`\`
2376
2378
 
2377
- \`native.linear\` checks whether an organization credential exists. To diagnose authentication, make a read-only request through \`replicas.linear.graphql({ query: 'query { viewer { id } }' })\`; the gateway refreshes expired credentials and retries authentication failures once.
2379
+ The gateway refreshes expired credentials and retries authentication failures once. Check the response's \`errors\` field before using \`data\`.
2378
2380
 
2379
2381
  Personal \u2192 Connections links a person's Linear identity for agent defaults and attribution. Its disconnected state does not mean the organization's Linear integration is disconnected, and connecting it does not refresh the organization's token. Only recommend reconnecting under Organization \u2192 Integrations when the gateway reports missing credentials or an unrecoverable OAuth failure. Report transient failures without asking the user to disconnect.
2380
2382
 
@@ -2965,7 +2967,7 @@ const plugins = await replicas.plugins.list();
2965
2967
  const installed = plugins.filter((plugin) => plugin.connected);
2966
2968
  \`\`\`
2967
2969
 
2968
- If a plugin is not connected, ask the user to connect it under personal Connections or the relevant environment's Plugins tab. A connection on Global reaches every workspace unless a more specific environment overrides it.
2970
+ If listing returns a 5xx or \`Internal server error\`, skip it and use the known plugin's search, describe, or direct SDK API. Listing failure does not mean the plugin is disconnected. Only ask the user to connect it when the direct gateway reports missing credentials or an unrecoverable authentication failure. A connection on Global reaches every workspace unless a more specific environment overrides it.
2969
2971
 
2970
2972
  ## Search, inspect, execute
2971
2973
 
@@ -3351,12 +3353,11 @@ var REFERENCE11 = `# Sentry Integration
3351
3353
 
3352
3354
  Use \`@replicas/sdk\`; never request or read a Sentry token. Sentry access is organization-scoped and read-only.
3353
3355
 
3356
+ Call Sentry directly; integration listing is optional. If \`replicas.integrations.list()\` returns a 5xx or \`Internal server error\`, skip it and continue through \`replicas.sentry.request\`. Only recommend reconnecting when the direct gateway reports missing credentials or an unrecoverable authentication failure.
3357
+
3354
3358
  \`\`\`ts
3355
3359
  import { replicas } from '@replicas/sdk';
3356
3360
 
3357
- const { native } = await replicas.integrations.list();
3358
- if (!native.sentry) throw new Error('Connect Sentry in Replicas organization integrations first.');
3359
-
3360
3361
  const issues = await replicas.sentry.request('/organizations/acme/issues/?query=is:unresolved');
3361
3362
  \`\`\`
3362
3363
 
@@ -3391,20 +3392,15 @@ var REFERENCE12 = `# Slack Integration
3391
3392
 
3392
3393
  Use \`@replicas/sdk\`; never read or send a Slack token directly. The SDK calls Replicas, which selects only this workspace's organization connection.
3393
3394
 
3394
- ## Check access
3395
-
3396
- \`\`\`ts
3397
- import { replicas } from '@replicas/sdk';
3398
-
3399
- const { native } = await replicas.integrations.list();
3400
- if (!native.slack) throw new Error('Connect Slack in Replicas organization integrations first.');
3401
- \`\`\`
3395
+ Call Slack directly; integration listing is optional. If \`replicas.integrations.list()\` returns a 5xx or \`Internal server error\`, skip it and continue through \`replicas.slack.call\`. Only recommend reconnecting when the direct gateway reports missing credentials or an unrecoverable authentication failure.
3402
3396
 
3403
3397
  ## Read a thread
3404
3398
 
3405
3399
  For a link such as \`https://team.slack.com/archives/C0123ABC/p1234567890123456\`, the channel is \`C0123ABC\` and the timestamp is \`1234567890.123456\`.
3406
3400
 
3407
3401
  \`\`\`ts
3402
+ import { replicas } from '@replicas/sdk';
3403
+
3408
3404
  const thread = await replicas.slack.call('conversations.replies', {
3409
3405
  channel: 'C0123ABC',
3410
3406
  ts: '1234567890.123456',
@@ -15,7 +15,7 @@ import {
15
15
  isValidRelayBaseProvider,
16
16
  parsePosixEnvFile,
17
17
  readReplicasRuntimeEnv
18
- } from "./chunk-5XK2ECRO.js";
18
+ } from "./chunk-LMC2MLSC.js";
19
19
 
20
20
  // src/engine-env.ts
21
21
  import { readFileSync as readFileSync2 } from "fs";
@@ -3,12 +3,12 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  monolithRequest
6
- } from "./chunk-C3MWT2WD.js";
6
+ } from "./chunk-NDU3XPU4.js";
7
7
  import {
8
8
  extractCommandProtectionCommandText,
9
9
  findGitCommitSignals,
10
10
  findPrMergeSignals
11
- } from "./chunk-5XK2ECRO.js";
11
+ } from "./chunk-LMC2MLSC.js";
12
12
 
13
13
  // src/services/command-protection-service.ts
14
14
  var DEFAULT_COMMAND_PROTECTION_BLOCK_MESSAGE = "Blocked by Replicas command protection.";
@@ -3,12 +3,12 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  evaluateCommandProtection
6
- } from "./chunk-ULXOFMGF.js";
7
- import "./chunk-C3MWT2WD.js";
6
+ } from "./chunk-QH6IJI6C.js";
7
+ import "./chunk-NDU3XPU4.js";
8
8
  import {
9
9
  isRecord
10
10
  } from "./chunk-UZSNFLDQ.js";
11
- import "./chunk-5XK2ECRO.js";
11
+ import "./chunk-LMC2MLSC.js";
12
12
  import "./chunk-VEQXQN22.js";
13
13
 
14
14
  // src/command-protection-hook.ts
@@ -3,13 +3,13 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  evaluateCommandProtection
6
- } from "./chunk-ULXOFMGF.js";
6
+ } from "./chunk-QH6IJI6C.js";
7
7
  import {
8
8
  notifyPostToolUse
9
- } from "./chunk-HUXYXVH3.js";
10
- import "./chunk-C3MWT2WD.js";
9
+ } from "./chunk-IKQTMWNH.js";
10
+ import "./chunk-NDU3XPU4.js";
11
11
  import "./chunk-UZSNFLDQ.js";
12
- import "./chunk-5XK2ECRO.js";
12
+ import "./chunk-LMC2MLSC.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
 
15
15
  // src/deepseek-command-protection-plugin.ts
@@ -8,12 +8,12 @@ import {
8
8
  import {
9
9
  AppServerProcess,
10
10
  buildCodexAgentEnv
11
- } from "./chunk-YMTLQI4E.js";
11
+ } from "./chunk-E53FG54G.js";
12
12
  import {
13
13
  AGENT,
14
14
  getMemoryOutputSafetyViolation,
15
15
  headlessAgentRequestSchema
16
- } from "./chunk-5XK2ECRO.js";
16
+ } from "./chunk-LMC2MLSC.js";
17
17
  import "./chunk-VEQXQN22.js";
18
18
 
19
19
  // src/headless-agent.ts
package/dist/src/index.js CHANGED
@@ -91,7 +91,7 @@ import {
91
91
  evaluateCommandProtection,
92
92
  extractToolCommand,
93
93
  reportCommandProtectionBlock
94
- } from "./chunk-ULXOFMGF.js";
94
+ } from "./chunk-QH6IJI6C.js";
95
95
  import {
96
96
  ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
97
97
  AGENT_MESSAGE_DELTA_METHOD,
@@ -131,20 +131,20 @@ import {
131
131
  recordCredentialFallback,
132
132
  recordExhaustedCredential,
133
133
  restartCodexAspHost
134
- } from "./chunk-HQFWCOI3.js";
134
+ } from "./chunk-LIIFRZYH.js";
135
135
  import {
136
136
  ENGINE_ENV,
137
137
  IS_WARMING_MODE,
138
138
  monolithRequest,
139
139
  monolithService,
140
140
  setAgentCredentialSnapshot
141
- } from "./chunk-C3MWT2WD.js";
141
+ } from "./chunk-NDU3XPU4.js";
142
142
  import {
143
143
  AspClient,
144
144
  SUBPROCESS_MAX_BUFFER,
145
145
  execAsync,
146
146
  execFileAsync
147
- } from "./chunk-YMTLQI4E.js";
147
+ } from "./chunk-E53FG54G.js";
148
148
  import {
149
149
  isRecord as isRecord2
150
150
  } from "./chunk-UZSNFLDQ.js";
@@ -352,7 +352,7 @@ import {
352
352
  spawnRelaySubagentRequestSchema,
353
353
  stripAgentDiagnosticErrors,
354
354
  withTimeout
355
- } from "./chunk-5XK2ECRO.js";
355
+ } from "./chunk-LMC2MLSC.js";
356
356
  import {
357
357
  __commonJS,
358
358
  __export,
@@ -3,11 +3,11 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  notifyPostToolUse
6
- } from "./chunk-HUXYXVH3.js";
6
+ } from "./chunk-IKQTMWNH.js";
7
7
  import {
8
8
  isRecord
9
9
  } from "./chunk-UZSNFLDQ.js";
10
- import "./chunk-5XK2ECRO.js";
10
+ import "./chunk-LMC2MLSC.js";
11
11
  import "./chunk-VEQXQN22.js";
12
12
 
13
13
  // src/post-tool-pr-hook.ts
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  messageRelaySubagentRequestSchema,
9
9
  spawnRelaySubagentRequestSchema
10
- } from "./chunk-5XK2ECRO.js";
10
+ } from "./chunk-LMC2MLSC.js";
11
11
  import "./chunk-VEQXQN22.js";
12
12
 
13
13
  // src/relay-mcp.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.827",
3
+ "version": "0.1.830",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",