replicas-engine 0.1.886 → 0.1.888

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-JKQE77NV.js";
9
- import "./chunk-VAA25G27.js";
10
- import "./chunk-V5OPGQCX.js";
8
+ } from "./chunk-2JFHMLKJ.js";
9
+ import "./chunk-N2DC3SCQ.js";
10
+ import "./chunk-ADX5FHF6.js";
11
11
  import "./chunk-UZSNFLDQ.js";
12
- import "./chunk-T2XVBN5C.js";
12
+ import "./chunk-5RULOJKJ.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
  export {
15
15
  getCodexAspHost,
@@ -5,13 +5,13 @@ import {
5
5
  ENGINE_ENV,
6
6
  monolithRequest,
7
7
  setAgentCredentialSnapshot
8
- } from "./chunk-VAA25G27.js";
8
+ } from "./chunk-N2DC3SCQ.js";
9
9
  import {
10
10
  AppServerProcess,
11
11
  SUBPROCESS_MAX_BUFFER,
12
12
  buildCodexAgentEnv,
13
13
  execFileAsync
14
- } from "./chunk-V5OPGQCX.js";
14
+ } from "./chunk-ADX5FHF6.js";
15
15
  import {
16
16
  isRecord
17
17
  } from "./chunk-UZSNFLDQ.js";
@@ -25,7 +25,7 @@ import {
25
25
  listOpenAICompatibleModels,
26
26
  readOllamaAuthEnv,
27
27
  resolveOpenAICompatibleModelsUrl
28
- } from "./chunk-T2XVBN5C.js";
28
+ } from "./chunk-5RULOJKJ.js";
29
29
 
30
30
  // src/managers/codex-token-manager.ts
31
31
  import { promises as fs } from "fs";
@@ -251,7 +251,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
251
251
  await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
252
252
  await this.applyCredentialsResponse(data);
253
253
  if (data.scope) setAgentCredentialSnapshot("codex", { method: data.type, scope: data.scope, revision: data.revision });
254
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-TW4BW2RA.js");
254
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-BGOXGPHG.js");
255
255
  await restartCodexAspHostIfRunning2();
256
256
  });
257
257
  await this.start(true);
@@ -271,7 +271,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
271
271
  await this.applyCredentialUpdate(generation, async () => {
272
272
  await this.applyCredentialsResponse(data);
273
273
  if (restartOnChange && CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index])) {
274
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-TW4BW2RA.js");
274
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-BGOXGPHG.js");
275
275
  await restartCodexAspHostIfRunning2();
276
276
  }
277
277
  if (data.scope) {
@@ -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-T2XVBN5C.js";
6
+ } from "./chunk-5RULOJKJ.js";
7
7
 
8
8
  // src/services/post-tool-pr-notifier.ts
9
9
  async function notifyPostToolUse(toolName, toolInput) {
@@ -3434,6 +3434,22 @@ const { data } = await replicas.plugins.execute({
3434
3434
  });
3435
3435
  \`\`\`
3436
3436
 
3437
+ Each plugin includes a \`connections\` list with stable IDs and account labels. When a plugin has more than one connection, run the operation once per relevant connection:
3438
+
3439
+ \`\`\`ts
3440
+ const gmail = plugins.find((plugin) => plugin.id === 'gmail');
3441
+ const messages = await Promise.all((gmail?.connections ?? []).map((connection) =>
3442
+ replicas.plugins.execute({
3443
+ plugin: 'gmail',
3444
+ connectionId: connection.id,
3445
+ tool: 'GMAIL_FETCH_EMAILS',
3446
+ arguments: { max_results: 25 },
3447
+ }),
3448
+ ));
3449
+ \`\`\`
3450
+
3451
+ Omit \`connectionId\` to use the first connection in the most specific environment. Never guess an ID; take it from \`replicas.plugins.list()\`.
3452
+
3437
3453
  Use \`replicas.plugins.describe({ plugin, tools: [slug] })\` when search returned a partial schema or before constructing unfamiliar arguments.
3438
3454
 
3439
3455
  ## Batch work
@@ -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-T2XVBN5C.js";
7
+ } from "./chunk-5RULOJKJ.js";
8
8
 
9
9
  // src/utils/codex-agent-env.ts
10
10
  function buildCodexAgentEnv(source = process.env) {
@@ -245,7 +245,7 @@ function getCodexModelProvider(method) {
245
245
  if (method === "foundry") return "azure";
246
246
  return method === "ollama" || method === "openai-compatible" ? "replicas_openai_compatible" : "openai";
247
247
  }
248
- var ENGINE_PACKAGE_VERSION = "0.1.886";
248
+ var ENGINE_PACKAGE_VERSION = "0.1.888";
249
249
  var INITIALIZE_METHOD = "initialize";
250
250
  var INITIALIZED_NOTIFICATION = "initialized";
251
251
  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-T2XVBN5C.js";
18
+ } from "./chunk-5RULOJKJ.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-VAA25G27.js";
6
+ } from "./chunk-N2DC3SCQ.js";
7
7
  import {
8
8
  extractCommandProtectionCommandText,
9
9
  findGitCommitSignals,
10
10
  findPrMergeSignals
11
- } from "./chunk-T2XVBN5C.js";
11
+ } from "./chunk-5RULOJKJ.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-G65O3M47.js";
7
- import "./chunk-VAA25G27.js";
6
+ } from "./chunk-P7AHODJ6.js";
7
+ import "./chunk-N2DC3SCQ.js";
8
8
  import {
9
9
  isRecord
10
10
  } from "./chunk-UZSNFLDQ.js";
11
- import "./chunk-T2XVBN5C.js";
11
+ import "./chunk-5RULOJKJ.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-G65O3M47.js";
6
+ } from "./chunk-P7AHODJ6.js";
7
7
  import {
8
8
  notifyPostToolUse
9
- } from "./chunk-TDRHAENL.js";
10
- import "./chunk-VAA25G27.js";
9
+ } from "./chunk-4DGHCMBQ.js";
10
+ import "./chunk-N2DC3SCQ.js";
11
11
  import "./chunk-UZSNFLDQ.js";
12
- import "./chunk-T2XVBN5C.js";
12
+ import "./chunk-5RULOJKJ.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-V5OPGQCX.js";
11
+ } from "./chunk-ADX5FHF6.js";
12
12
  import {
13
13
  AGENT,
14
14
  getMemoryOutputSafetyViolation,
15
15
  headlessAgentRequestSchema
16
- } from "./chunk-T2XVBN5C.js";
16
+ } from "./chunk-5RULOJKJ.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-G65O3M47.js";
94
+ } from "./chunk-P7AHODJ6.js";
95
95
  import {
96
96
  ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
97
97
  AGENT_MESSAGE_DELTA_METHOD,
@@ -133,21 +133,21 @@ import {
133
133
  recordExhaustedCredential,
134
134
  restartCodexAspHost,
135
135
  routineRefreshExclusions
136
- } from "./chunk-JKQE77NV.js";
136
+ } from "./chunk-2JFHMLKJ.js";
137
137
  import {
138
138
  ENGINE_ENV,
139
139
  IS_WARMING_MODE,
140
140
  monolithRequest,
141
141
  monolithService,
142
142
  setAgentCredentialSnapshot
143
- } from "./chunk-VAA25G27.js";
143
+ } from "./chunk-N2DC3SCQ.js";
144
144
  import {
145
145
  AspClient,
146
146
  SUBPROCESS_MAX_BUFFER,
147
147
  execAsync,
148
148
  execFileAsync,
149
149
  getCodexModelProvider
150
- } from "./chunk-V5OPGQCX.js";
150
+ } from "./chunk-ADX5FHF6.js";
151
151
  import {
152
152
  isRecord as isRecord2
153
153
  } from "./chunk-UZSNFLDQ.js";
@@ -363,7 +363,7 @@ import {
363
363
  waitRelaySubagentRequestSchema,
364
364
  withTimeout,
365
365
  workspaceCredentialProviderSchema
366
- } from "./chunk-T2XVBN5C.js";
366
+ } from "./chunk-5RULOJKJ.js";
367
367
  import {
368
368
  __commonJS,
369
369
  __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-TDRHAENL.js";
6
+ } from "./chunk-4DGHCMBQ.js";
7
7
  import {
8
8
  isRecord
9
9
  } from "./chunk-UZSNFLDQ.js";
10
- import "./chunk-T2XVBN5C.js";
10
+ import "./chunk-5RULOJKJ.js";
11
11
  import "./chunk-VEQXQN22.js";
12
12
 
13
13
  // src/post-tool-pr-hook.ts
@@ -11,7 +11,7 @@ import {
11
11
  relaySubagentResponseSchema,
12
12
  spawnRelaySubagentRequestSchema,
13
13
  waitRelaySubagentRequestSchema
14
- } from "./chunk-T2XVBN5C.js";
14
+ } from "./chunk-5RULOJKJ.js";
15
15
  import "./chunk-VEQXQN22.js";
16
16
 
17
17
  // src/relay-mcp.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.886",
3
+ "version": "0.1.888",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
@@ -37,13 +37,14 @@ describe('@replicas/sdk', () => {
37
37
  try {
38
38
  await replicas.plugins.execute({
39
39
  plugin: 'stripe',
40
+ connectionId: 'connection-2',
40
41
  tool: 'STRIPE_RETRIEVE_BALANCE',
41
42
  });
42
43
  expect(observed).toEqual({
43
44
  path: '/v1/engine/plugins/execute',
44
45
  authorization: 'Bearer engine-secret',
45
46
  workspace: 'workspace-1',
46
- body: { plugin: 'stripe', tool: 'STRIPE_RETRIEVE_BALANCE' },
47
+ body: { plugin: 'stripe', connectionId: 'connection-2', tool: 'STRIPE_RETRIEVE_BALANCE' },
47
48
  });
48
49
  } finally {
49
50
  server.stop(true);
@@ -130,6 +130,7 @@ export interface WorkspacePluginSummary extends PluginCatalogItem {
130
130
  connected: boolean;
131
131
  status?: PluginConnectionStatus;
132
132
  accountLabel?: string;
133
+ connections: PluginConnectionSummary[];
133
134
  }
134
135
  export interface WorkspaceIntegrationsResponse {
135
136
  plugins: WorkspacePluginSummary[];
@@ -138,6 +139,7 @@ export interface WorkspaceIntegrationsResponse {
138
139
  export interface PluginSearchRequest {
139
140
  plugin: ComposioPluginId;
140
141
  query: string;
142
+ connectionId?: string;
141
143
  }
142
144
  export interface PluginToolSchema {
143
145
  slug: string;
@@ -152,6 +154,7 @@ export interface PluginSearchResponse {
152
154
  export interface PluginDescribeRequest {
153
155
  plugin: ComposioPluginId;
154
156
  tools: string[];
157
+ connectionId?: string;
155
158
  }
156
159
  export interface PluginDescribeResponse {
157
160
  tools: PluginToolSchema[];
@@ -160,6 +163,7 @@ export interface PluginExecuteRequest {
160
163
  plugin: ComposioPluginId;
161
164
  tool: string;
162
165
  arguments?: Record<string, unknown>;
166
+ connectionId?: string;
163
167
  }
164
168
  export interface PluginExecuteResponse {
165
169
  data: unknown;