replicas-engine 0.1.828 → 0.1.831

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-EDAMOFQS.js";
9
- import "./chunk-C3MWT2WD.js";
10
- import "./chunk-FH3UQKLS.js";
8
+ } from "./chunk-Y7T6IWID.js";
9
+ import "./chunk-VZ6VMXC7.js";
10
+ import "./chunk-I4FXRLZH.js";
11
11
  import "./chunk-UZSNFLDQ.js";
12
- import "./chunk-5XK2ECRO.js";
12
+ import "./chunk-EJKLU7KX.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
  export {
15
15
  getCodexAspHost,
@@ -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-EJKLU7KX.js";
7
7
 
8
8
  // src/services/post-tool-pr-notifier.ts
9
9
  async function notifyPostToolUse(toolName, toolInput) {
@@ -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
 
@@ -2952,7 +2954,7 @@ Use this when:
2952
2954
  - The user asks to analyze text with Pangram`;
2953
2955
  var REFERENCE9 = `# Plugins
2954
2956
 
2955
- Plugins are TypeScript libraries, not MCP servers. Import \`@replicas/sdk\`; Replicas authenticates the workspace and selects the owner\u2019s personal connection first, then the most specific environment the workspace inherits from, then Global. Provider credentials, sessions, and project keys are never exposed.
2957
+ Plugins are TypeScript libraries, not MCP servers. Import \`@replicas/sdk\`; Replicas authenticates the workspace and selects the most specific environment the workspace inherits from, then Global. Provider credentials, sessions, and project keys are never exposed.
2956
2958
 
2957
2959
  Plugin tools may read or write provider data according to the connected account's permissions. Only execute write or destructive tools when they match the user's request.
2958
2960
 
@@ -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',
@@ -7103,8 +7099,7 @@ var EXPLICIT_PLUGIN_CATALOG = [
7103
7099
  authType: "credentials",
7104
7100
  category: "data",
7105
7101
  name: "Vanta",
7106
- description: "Review and manage controls, tests, evidence, vendors, risks, and compliance data.",
7107
- scopes: ["environment"]
7102
+ description: "Review and manage controls, tests, evidence, vendors, risks, and compliance data."
7108
7103
  }
7109
7104
  ];
7110
7105
  var HOSTED_COMPOSIO_PLUGIN_DEFINITIONS = [
@@ -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-VZ6VMXC7.js";
7
7
  import {
8
8
  extractCommandProtectionCommandText,
9
9
  findGitCommitSignals,
10
10
  findPrMergeSignals
11
- } from "./chunk-5XK2ECRO.js";
11
+ } from "./chunk-EJKLU7KX.js";
12
12
 
13
13
  // src/services/command-protection-service.ts
14
14
  var DEFAULT_COMMAND_PROTECTION_BLOCK_MESSAGE = "Blocked by Replicas command protection.";
@@ -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-EJKLU7KX.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.828";
244
+ var ENGINE_PACKAGE_VERSION = "0.1.831";
245
245
  var INITIALIZE_METHOD = "initialize";
246
246
  var INITIALIZED_NOTIFICATION = "initialized";
247
247
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -15,7 +15,7 @@ import {
15
15
  isValidRelayBaseProvider,
16
16
  parsePosixEnvFile,
17
17
  readReplicasRuntimeEnv
18
- } from "./chunk-5XK2ECRO.js";
18
+ } from "./chunk-EJKLU7KX.js";
19
19
 
20
20
  // src/engine-env.ts
21
21
  import { readFileSync as readFileSync2 } from "fs";
@@ -5,18 +5,18 @@ import {
5
5
  ENGINE_ENV,
6
6
  monolithRequest,
7
7
  setAgentCredentialSnapshot
8
- } from "./chunk-C3MWT2WD.js";
8
+ } from "./chunk-VZ6VMXC7.js";
9
9
  import {
10
10
  AppServerProcess,
11
11
  buildCodexAgentEnv
12
- } from "./chunk-FH3UQKLS.js";
12
+ } from "./chunk-I4FXRLZH.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-EJKLU7KX.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-ASOHN5L2.js");
235
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-2BT65CNP.js");
236
236
  await restartCodexAspHostIfRunning2();
237
237
  }
238
238
  if (data.scope) {
@@ -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-GLZE6UHB.js";
7
+ import "./chunk-VZ6VMXC7.js";
8
8
  import {
9
9
  isRecord
10
10
  } from "./chunk-UZSNFLDQ.js";
11
- import "./chunk-5XK2ECRO.js";
11
+ import "./chunk-EJKLU7KX.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-GLZE6UHB.js";
7
7
  import {
8
8
  notifyPostToolUse
9
- } from "./chunk-HUXYXVH3.js";
10
- import "./chunk-C3MWT2WD.js";
9
+ } from "./chunk-3ZA72VWO.js";
10
+ import "./chunk-VZ6VMXC7.js";
11
11
  import "./chunk-UZSNFLDQ.js";
12
- import "./chunk-5XK2ECRO.js";
12
+ import "./chunk-EJKLU7KX.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-FH3UQKLS.js";
11
+ } from "./chunk-I4FXRLZH.js";
12
12
  import {
13
13
  AGENT,
14
14
  getMemoryOutputSafetyViolation,
15
15
  headlessAgentRequestSchema
16
- } from "./chunk-5XK2ECRO.js";
16
+ } from "./chunk-EJKLU7KX.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-GLZE6UHB.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-EDAMOFQS.js";
134
+ } from "./chunk-Y7T6IWID.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-VZ6VMXC7.js";
142
142
  import {
143
143
  AspClient,
144
144
  SUBPROCESS_MAX_BUFFER,
145
145
  execAsync,
146
146
  execFileAsync
147
- } from "./chunk-FH3UQKLS.js";
147
+ } from "./chunk-I4FXRLZH.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-EJKLU7KX.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-3ZA72VWO.js";
7
7
  import {
8
8
  isRecord
9
9
  } from "./chunk-UZSNFLDQ.js";
10
- import "./chunk-5XK2ECRO.js";
10
+ import "./chunk-EJKLU7KX.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-EJKLU7KX.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.828",
3
+ "version": "0.1.831",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
@@ -3,7 +3,6 @@ import type { ReplicasSdk } from './shared/workspace-sdk';
3
3
  export type {
4
4
  PluginConnectionStatus,
5
5
  PluginId,
6
- PluginScope,
7
6
  PluginToolSchema,
8
7
  ProviderRequestOptions,
9
8
  ReplicasSdk,
@@ -173,6 +173,5 @@ export declare const PLUGIN_CATALOG: readonly [{
173
173
  readonly category: "data";
174
174
  readonly name: "Vanta";
175
175
  readonly description: "Review and manage controls, tests, evidence, vendors, risks, and compliance data.";
176
- readonly scopes: readonly ["environment"];
177
176
  }, ...HostedComposioPlugin[]];
178
177
  export {};
@@ -10,7 +10,6 @@ export type NativePluginId = Extract<(typeof PLUGIN_CATALOG)[number], {
10
10
  export type ComposioPluginId = Extract<(typeof PLUGIN_CATALOG)[number], {
11
11
  backend: 'composio';
12
12
  }>['id'];
13
- export type PluginScope = 'environment' | 'personal';
14
13
  export type PluginAuthType = (typeof PLUGIN_CATALOG)[number]['authType'];
15
14
  export type PluginCategory = (typeof PLUGIN_CATALOG)[number]['category'];
16
15
  export declare const PLUGIN_CONNECTION_STATUSES: readonly ["initiated", "active", "expired", "failed"];
@@ -25,13 +24,11 @@ export interface PluginCatalogItem {
25
24
  category: PluginCategory;
26
25
  name: string;
27
26
  description: string;
28
- scopes?: readonly PluginScope[];
29
27
  }
30
28
  export interface PluginConnectionSummary {
31
29
  id: string;
32
30
  pluginId: PluginId;
33
- scope: PluginScope;
34
- environmentId?: string;
31
+ environmentId: string;
35
32
  status: PluginConnectionStatus;
36
33
  accountLabel?: string;
37
34
  connectedAt?: string;
@@ -39,7 +36,6 @@ export interface PluginConnectionSummary {
39
36
  export interface PluginConnectionsResponse {
40
37
  plugins: PluginCatalogItem[];
41
38
  environment: PluginConnectionSummary[];
42
- personal: PluginConnectionSummary[];
43
39
  }
44
40
  export interface PluginStartOAuthResponse {
45
41
  authorizationUrl: string;
@@ -126,7 +122,6 @@ export interface PangramAnalyzeRequest {
126
122
  }
127
123
  export interface WorkspacePluginSummary extends PluginCatalogItem {
128
124
  connected: boolean;
129
- scope?: PluginScope;
130
125
  status?: PluginConnectionStatus;
131
126
  accountLabel?: string;
132
127
  }
@@ -1,6 +1,6 @@
1
1
  // Generated from shared/src by generate-workspace-sdk-types.mjs; do not edit.
2
2
  import type { PluginDescribeRequest, PluginDescribeResponse, PluginExecuteRequest, PluginExecuteResponse, PluginSearchRequest, PluginSearchResponse, WorkspaceIntegrationsResponse, WorkspacePluginSummary } from './routes/plugins';
3
- export type { PluginConnectionStatus, PluginId, PluginScope, PluginToolSchema, WorkspaceIntegrationsResponse, WorkspacePluginSummary, } from './routes/plugins';
3
+ export type { PluginConnectionStatus, PluginId, PluginToolSchema, WorkspaceIntegrationsResponse, WorkspacePluginSummary, } from './routes/plugins';
4
4
  export interface ProviderRequestOptions {
5
5
  method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
6
6
  body?: unknown;