replicas-engine 0.1.1004 → 0.1.1006

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,12 +5,12 @@ import {
5
5
  getCodexAspHost,
6
6
  restartCodexAspHost,
7
7
  restartCodexAspHostIfRunning
8
- } from "./chunk-GWPJN4NR.js";
9
- import "./chunk-75KGYSGI.js";
10
- import "./chunk-VJWOFQ5O.js";
11
- import "./chunk-2QY7YTWF.js";
8
+ } from "./chunk-7OGI4N7B.js";
9
+ import "./chunk-VAJAXROC.js";
10
+ import "./chunk-SVJZNG2F.js";
11
+ import "./chunk-E25NLO2C.js";
12
12
  import "./chunk-UZSNFLDQ.js";
13
- import "./chunk-QTAA3IKC.js";
13
+ import "./chunk-BOUFJ6MN.js";
14
14
  import "./chunk-VEQXQN22.js";
15
15
  export {
16
16
  getCodexAspHost,
@@ -5,15 +5,15 @@ import {
5
5
  ENGINE_ENV,
6
6
  monolithRequest,
7
7
  setAgentCredentialSnapshot
8
- } from "./chunk-75KGYSGI.js";
8
+ } from "./chunk-VAJAXROC.js";
9
9
  import {
10
10
  AppServerProcess,
11
11
  buildCodexAgentEnv
12
- } from "./chunk-VJWOFQ5O.js";
12
+ } from "./chunk-SVJZNG2F.js";
13
13
  import {
14
14
  SUBPROCESS_MAX_BUFFER,
15
15
  execFileAsync
16
- } from "./chunk-2QY7YTWF.js";
16
+ } from "./chunk-E25NLO2C.js";
17
17
  import {
18
18
  isRecord
19
19
  } from "./chunk-UZSNFLDQ.js";
@@ -28,7 +28,7 @@ import {
28
28
  listOpenAICompatibleModels,
29
29
  readOllamaAuthEnv,
30
30
  resolveOpenAICompatibleModelsUrl
31
- } from "./chunk-QTAA3IKC.js";
31
+ } from "./chunk-BOUFJ6MN.js";
32
32
 
33
33
  // src/managers/codex-token-manager.ts
34
34
  import { promises as fs } from "fs";
@@ -264,7 +264,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
264
264
  await this.applyCredentialUpdate(++this.credentialGeneration, async () => {
265
265
  await this.applyCredentialsResponse(data);
266
266
  setAgentCredentialSnapshot("codex", data);
267
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-4FEEI44I.js");
267
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-VVFKBVIK.js");
268
268
  await restartCodexAspHostIfRunning2();
269
269
  });
270
270
  await this.start(true);
@@ -285,7 +285,7 @@ var CodexTokenManager = class extends BaseRefreshManager {
285
285
  const accountChanged = ENGINE_ENV.REPLICAS_AGENT_CREDENTIALS.codex?.credentialId !== data.credentialId;
286
286
  await this.applyCredentialsResponse(data);
287
287
  if (restartOnChange && (accountChanged || CODEX_AUTH_ENV_KEYS.some((key, index) => process.env[key] !== previousEnv[index]))) {
288
- const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-4FEEI44I.js");
288
+ const { restartCodexAspHostIfRunning: restartCodexAspHostIfRunning2 } = await import("./asp-host-VVFKBVIK.js");
289
289
  await restartCodexAspHostIfRunning2();
290
290
  }
291
291
  setAgentCredentialSnapshot("codex", data);
@@ -3182,10 +3182,11 @@ Explore a codebase, get it running in this workspace, verify it end to end, and
3182
3182
  Use this when:
3183
3183
  - This workspace was started as an environment setup run (\`replicas environment-setup status\` succeeds)
3184
3184
  - The user asks you to set up, configure, audit, or improve a Replicas environment for a repository
3185
- - The user asks what should go in a start hook, warm hook, or environment system prompt`;
3185
+ - The user asks what should go in a start hook, warm hook, or environment system prompt
3186
+ - A warm pool, warm hook, or start hook is failing, or the fix you found belongs in the environment rather than the repository`;
3186
3187
  var REFERENCE3 = `# Environment setup (agent-led)
3187
3188
 
3188
- Use this workflow to make a repository fully usable by Replicas background agents: agents booted from the environment should be able to install, run, test, verify, and demo changes without a human babysitting them. The result of the workflow is a **proposal**, never a direct change: the user reviews, edits, and saves it in the Environment panel next to the chat.
3189
+ Use this workflow to make a repository fully usable by Replicas background agents: agents booted from the environment should be able to install, run, test, verify, and demo changes without a human babysitting them. In a setup run, the result is a **proposal**, never a direct change: the user reviews, edits, and saves it in the Environment panel next to the chat. Outside a setup run, see below.
3189
3190
 
3190
3191
  ## Mental model
3191
3192
 
@@ -3217,7 +3218,14 @@ replicas environment-setup wait-variables [-t 5m]
3217
3218
 
3218
3219
  \`status\` prints the environment, repositories, current steps, and variable requests. \`request-variables\` returns immediately; \`wait-variables\` blocks until the required values arrive, are skipped, or the time runs out. Step statuses are \`pending\`, \`in_progress\`, \`completed\`, and \`skipped\`. Step keys, in order: \`understand\`, \`install\`, \`verify\`, \`configure\`, \`propose\`. Mark the first step \`in_progress\` before your first tool call, keep exactly one step \`in_progress\`, and mark a step \`completed\` only after its work actually succeeded. Use \`skipped\` when something genuinely cannot run (for example no browser UI to record) and say so in the proposal.
3219
3220
 
3220
- If \`replicas environment-setup status\` reports that there is no active setup run, the user asked for this in an ordinary workspace. Follow the same discovery and verification steps, then present the configuration in chat; apply it with \`replicas environment ...\` and \`replicas automation ...\` only when the user explicitly asks you to.
3221
+ If \`replicas environment-setup status\` reports that there is no active setup run, you are in an ordinary workspace, either because the user asked for this or because the fix you found while debugging belongs in the environment. Follow the same discovery and verification steps, show the exact change in chat, and offer to apply and test it yourself. Ask the user before changing the environment, since it affects every workspace built from it. Once they approve:
3222
+
3223
+ - Warm hook: \`replicas environment warm-hooks save-test <env> -f <file>\` runs it in an isolated sandbox and saves it only if it passes.
3224
+ - Start hook: \`replicas environment start-hooks test <env> -f <file>\`, then \`replicas environment start-hooks save <env> -f <file>\` with the same file once it passes.
3225
+ - Variables and files: apply with \`replicas environment vars set\` or \`files set\`, then confirm with \`vars list\` or \`files list\`.
3226
+ - Automations: apply with \`replicas automation ...\`, then read back with \`replicas automation get <id>\`.
3227
+
3228
+ When a test fails, fix the earliest failure and test again instead of saving. If the fix materially changes what the user approved, show the revised change and ask again before saving. Report what you changed and the test result.
3221
3229
 
3222
3230
  ## 1. Understand the codebase
3223
3231
 
@@ -3409,7 +3417,7 @@ After \`propose\` succeeds, mark the \`propose\` step completed and send one mes
3409
3417
  Review the start hook, warm hook, system prompt, variables, and automations in the Environment panel on the right. Edit anything inline, then select **Save configuration**. Ask me here if you want changes and I will revise the proposal.
3410
3418
  \`\`\`
3411
3419
 
3412
- Keep it under 250 words plus the lists. Do not paste the hooks or system prompt into chat; the panel shows them. Never imply the configuration was saved: saving is the user's action.
3420
+ Keep it under 250 words plus the lists. Do not paste the hooks or system prompt into chat; the panel shows them. Never imply the configuration was saved: in a setup run, saving is the user's action.
3413
3421
 
3414
3422
  ## Safety
3415
3423
 
@@ -3421,7 +3429,7 @@ Keep it under 250 words plus the lists. Do not paste the hooks or system prompt
3421
3429
  var ENVIRONMENT_SETUP_ABILITY = {
3422
3430
  label: "Environment setup",
3423
3431
  description: "Explore a codebase, verify it runs, and propose environment hooks, a system prompt, variables, and automations for review.",
3424
- bullet: "- Setting up, auditing, or improving a Replicas environment for a repository (hooks, system prompt, variables, automations)",
3432
+ bullet: "- Setting up, auditing, fixing, or improving a Replicas environment for a repository (hooks, system prompt, variables, automations), including a failing warm pool or hook",
3425
3433
  section: SECTION3,
3426
3434
  referenceFile: { name: "ENVIRONMENT-SETUP.md", content: REFERENCE3 }
3427
3435
  };
@@ -4186,6 +4194,7 @@ Use this when:
4186
4194
  - The user asks to create or control an E2B sandbox
4187
4195
  - The user asks to invoke a connected Modal function
4188
4196
  - The user asks to access Vercel projects, deployments, domains, logs, or infrastructure
4197
+ - The user asks to read or update Lightfield CRM accounts, contacts, opportunities, meetings, notes, or tasks
4189
4198
  - The user asks to search or read Greptile's codebase knowledge bases
4190
4199
  - The user asks to inspect Vanta controls, tests, evidence, vendors, risks, or compliance data
4191
4200
  - The user asks to query or update a connected turbopuffer namespace
@@ -4297,6 +4306,18 @@ const deployments = await replicas.vercel.request('/v6/deployments?teamId=team_1
4297
4306
 
4298
4307
  Confirm mutations before using POST, PUT, PATCH, or DELETE.
4299
4308
 
4309
+ ## Lightfield
4310
+
4311
+ Lightfield is a native API-key integration. Pass a path relative to the Lightfield \`/v1\` API; Replicas sends the key and \`Lightfield-Version\` header server-side:
4312
+
4313
+ \`\`\`ts
4314
+ const accounts = await replicas.lightfield.request('/accounts?limit=25');
4315
+ const fields = await replicas.lightfield.request('/accounts/definitions');
4316
+ const note = await replicas.lightfield.request('/notes', { method: 'POST', body: { fields: { $title: 'Call recap' } } });
4317
+ \`\`\`
4318
+
4319
+ See https://docs.lightfield.app/llms.txt for endpoints. Paginate with \`limit\` and \`offset\`. The key's scopes control permitted operations. Confirm mutations before using POST, PUT, PATCH, or DELETE.
4320
+
4300
4321
  ## Vanta
4301
4322
 
4302
4323
  Vanta is a native Manage API integration. Pass a relative path beginning with /v1/; Replicas exchanges the stored client credentials and caches the short-lived token server-side:
@@ -8490,6 +8511,15 @@ var EXPLICIT_PLUGIN_CATALOG = [
8490
8511
  name: "Stripe",
8491
8512
  description: "Manage customers, payments, invoices, subscriptions, and balances."
8492
8513
  },
8514
+ {
8515
+ id: "lightfield",
8516
+ backend: "native",
8517
+ toolkit: "lightfield",
8518
+ authType: "api_key",
8519
+ category: "business",
8520
+ name: "Lightfield",
8521
+ description: "Manage CRM accounts, contacts, opportunities, meetings, notes, and tasks."
8522
+ },
8493
8523
  {
8494
8524
  id: "pangram",
8495
8525
  backend: "native",
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  HOOK_EXEC_MAX_BUFFER_BYTES
6
- } from "./chunk-QTAA3IKC.js";
6
+ } from "./chunk-BOUFJ6MN.js";
7
7
 
8
8
  // src/utils/exec.ts
9
9
  import { exec, execFile } from "child_process";
@@ -5,7 +5,7 @@ import {
5
5
  extractCommandProtectionCommandText,
6
6
  isRecord,
7
7
  parseCodeHostPrUrl
8
- } from "./chunk-QTAA3IKC.js";
8
+ } from "./chunk-BOUFJ6MN.js";
9
9
 
10
10
  // src/services/published-pull-request-urls.ts
11
11
  function publishedPullRequestUrls(result) {
@@ -3,10 +3,10 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  execFileAsync
6
- } from "./chunk-2QY7YTWF.js";
6
+ } from "./chunk-E25NLO2C.js";
7
7
  import {
8
8
  isVersionBelow
9
- } from "./chunk-QTAA3IKC.js";
9
+ } from "./chunk-BOUFJ6MN.js";
10
10
 
11
11
  // src/utils/codex-agent-env.ts
12
12
  function buildCodexAgentEnv(source = process.env) {
@@ -240,7 +240,7 @@ function getCodexModelProvider(method) {
240
240
  if (method === "foundry") return "azure";
241
241
  return method === "ollama" || method === "openai-compatible" ? "replicas_openai_compatible" : "openai";
242
242
  }
243
- var ENGINE_PACKAGE_VERSION = "0.1.1004";
243
+ var ENGINE_PACKAGE_VERSION = "0.1.1006";
244
244
  var INITIALIZE_METHOD = "initialize";
245
245
  var INITIALIZED_NOTIFICATION = "initialized";
246
246
  var ACCOUNT_LOGIN_START_METHOD = "account/login/start";
@@ -14,7 +14,7 @@ import {
14
14
  isValidAgentProvider,
15
15
  parsePosixEnvFile,
16
16
  readReplicasRuntimeEnv
17
- } from "./chunk-QTAA3IKC.js";
17
+ } from "./chunk-BOUFJ6MN.js";
18
18
 
19
19
  // src/runtime-env-loader.ts
20
20
  import { readFileSync } from "fs";
@@ -3,18 +3,18 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  monolithRequest
6
- } from "./chunk-75KGYSGI.js";
6
+ } from "./chunk-VAJAXROC.js";
7
7
  import {
8
8
  SUBPROCESS_MAX_BUFFER,
9
9
  execFileAsync
10
- } from "./chunk-2QY7YTWF.js";
10
+ } from "./chunk-E25NLO2C.js";
11
11
  import {
12
12
  extractCommandProtectionCommandText,
13
13
  findCommandProtectionGitLookups,
14
14
  findGitCommitSignals,
15
15
  findPrMergeSignals,
16
16
  parseCommandProtectionRequest
17
- } from "./chunk-QTAA3IKC.js";
17
+ } from "./chunk-BOUFJ6MN.js";
18
18
 
19
19
  // src/services/command-protection-service.ts
20
20
  import { readFile, stat } from "fs/promises";
@@ -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-MS7SNJCX.js";
7
- import "./chunk-75KGYSGI.js";
8
- import "./chunk-2QY7YTWF.js";
6
+ } from "./chunk-YHLMQT2K.js";
7
+ import "./chunk-VAJAXROC.js";
8
+ import "./chunk-E25NLO2C.js";
9
9
  import {
10
10
  isRecord
11
11
  } from "./chunk-UZSNFLDQ.js";
12
- import "./chunk-QTAA3IKC.js";
12
+ import "./chunk-BOUFJ6MN.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
 
15
15
  // src/command-protection-hook.ts
@@ -7,12 +7,12 @@ import {
7
7
  import {
8
8
  AppServerProcess,
9
9
  buildCodexAgentEnv
10
- } from "./chunk-VJWOFQ5O.js";
11
- import "./chunk-2QY7YTWF.js";
10
+ } from "./chunk-SVJZNG2F.js";
11
+ import "./chunk-E25NLO2C.js";
12
12
  import {
13
13
  AGENT,
14
14
  headlessAgentRequestSchema
15
- } from "./chunk-QTAA3IKC.js";
15
+ } from "./chunk-BOUFJ6MN.js";
16
16
  import "./chunk-VEQXQN22.js";
17
17
 
18
18
  // src/headless-agent.ts
package/dist/src/index.js CHANGED
@@ -32,7 +32,7 @@ import {
32
32
  reportCommandProtectionBlock,
33
33
  resolveDiffBase,
34
34
  runGitCommand
35
- } from "./chunk-MS7SNJCX.js";
35
+ } from "./chunk-YHLMQT2K.js";
36
36
  import {
37
37
  ACCOUNT_RATE_LIMITS_UPDATED_METHOD,
38
38
  AGENT_MESSAGE_DELTA_METHOD,
@@ -57,7 +57,7 @@ import {
57
57
  } from "./chunk-P73LGPQO.js";
58
58
  import {
59
59
  publishedPullRequestUrls
60
- } from "./chunk-FG665FDV.js";
60
+ } from "./chunk-JNCJG25E.js";
61
61
  import {
62
62
  BaseRefreshManager,
63
63
  CodexAspAuthMethodChangedError,
@@ -71,7 +71,7 @@ import {
71
71
  refreshDelayMs,
72
72
  restartCodexAspHost,
73
73
  routineRefreshRequest
74
- } from "./chunk-GWPJN4NR.js";
74
+ } from "./chunk-7OGI4N7B.js";
75
75
  import {
76
76
  ENGINE_ENV,
77
77
  monolithRequest,
@@ -79,16 +79,16 @@ import {
79
79
  readRuntimeEnvFile,
80
80
  reloadEngineEnv,
81
81
  setAgentCredentialSnapshot
82
- } from "./chunk-75KGYSGI.js";
82
+ } from "./chunk-VAJAXROC.js";
83
83
  import {
84
84
  AspClient,
85
85
  getCodexModelProvider
86
- } from "./chunk-VJWOFQ5O.js";
86
+ } from "./chunk-SVJZNG2F.js";
87
87
  import {
88
88
  SUBPROCESS_MAX_BUFFER,
89
89
  execAsync,
90
90
  execFileAsync
91
- } from "./chunk-2QY7YTWF.js";
91
+ } from "./chunk-E25NLO2C.js";
92
92
  import {
93
93
  isRecord as isRecord2
94
94
  } from "./chunk-UZSNFLDQ.js";
@@ -316,7 +316,7 @@ import {
316
316
  workspaceCredentialProviderSchema,
317
317
  workspaceTokenRequestSchema,
318
318
  workspaceTokenResponseSchema
319
- } from "./chunk-QTAA3IKC.js";
319
+ } from "./chunk-BOUFJ6MN.js";
320
320
  import {
321
321
  cloneMcpConfig,
322
322
  ensureCompatibilityImports,
@@ -3,13 +3,13 @@ import { createRequire as __createRequire } from 'node:module';
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  publishedPullRequestUrls
6
- } from "./chunk-FG665FDV.js";
6
+ } from "./chunk-JNCJG25E.js";
7
7
  import {
8
8
  isRecord
9
9
  } from "./chunk-UZSNFLDQ.js";
10
10
  import {
11
11
  shouldRefreshPullRequests
12
- } from "./chunk-QTAA3IKC.js";
12
+ } from "./chunk-BOUFJ6MN.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
 
15
15
  // src/services/post-tool-pr-notifier.ts
@@ -9,7 +9,7 @@ import {
9
9
  spawnSubagentRequestSchema,
10
10
  subagentResponseSchema,
11
11
  waitSubagentRequestSchema
12
- } from "./chunk-QTAA3IKC.js";
12
+ } from "./chunk-BOUFJ6MN.js";
13
13
  import "./chunk-VEQXQN22.js";
14
14
 
15
15
  // src/subagent-mcp.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.1004",
3
+ "version": "0.1.1006",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
@@ -133,6 +133,8 @@ const planetscale = providerClient('/v1/engine/planetscale/api');
133
133
 
134
134
  const vercel = providerClient('/v1/engine/vercel/api');
135
135
 
136
+ const lightfield = providerClient('/v1/engine/lightfield/api');
137
+
136
138
  const vanta = providerClient('/v1/engine/vanta/api');
137
139
  const greptile = {
138
140
  call: (tool, args) => request('/v1/engine/greptile/call', { method: 'POST', body: { tool, arguments: args } }),
@@ -154,5 +156,5 @@ const e2b = {
154
156
  kill: (sandboxId) => request('/v1/engine/e2b', { method: 'POST', body: { operation: 'kill', sandboxId } }),
155
157
  };
156
158
 
157
- export const replicas = { integrations, plugins, linear, slack, github, gitlab, sentry, modal, greptile, pangram, planetscale, vercel, vanta, turbopuffer, e2b };
159
+ export const replicas = { integrations, plugins, linear, slack, github, gitlab, sentry, modal, greptile, pangram, planetscale, vercel, lightfield, vanta, turbopuffer, e2b };
158
160
  export default replicas;
@@ -149,6 +149,14 @@ export declare const PLUGIN_CATALOG: readonly [{
149
149
  readonly category: "business";
150
150
  readonly name: "Stripe";
151
151
  readonly description: "Manage customers, payments, invoices, subscriptions, and balances.";
152
+ }, {
153
+ readonly id: "lightfield";
154
+ readonly backend: "native";
155
+ readonly toolkit: "lightfield";
156
+ readonly authType: "api_key";
157
+ readonly category: "business";
158
+ readonly name: "Lightfield";
159
+ readonly description: "Manage CRM accounts, contacts, opportunities, meetings, notes, and tasks.";
152
160
  }, {
153
161
  readonly id: "pangram";
154
162
  readonly backend: "native";
@@ -56,6 +56,7 @@ export interface PluginConnectApiKeyRequest {
56
56
  apiKey: string;
57
57
  }
58
58
  export type PluginConnectCloudflareRequest = PluginConnectApiKeyRequest;
59
+ export declare const LIGHTFIELD_API_VERSION = "2026-03-01";
59
60
  export declare const GREPTILE_KNOWLEDGE_BASE_TOOLS: readonly ["get_me", "list_repositories", "list_knowledge_bases", "list_knowledge_base_documents", "get_knowledge_base_document", "search_knowledge_base"];
60
61
  export type GreptileKnowledgeBaseTool = (typeof GREPTILE_KNOWLEDGE_BASE_TOOLS)[number];
61
62
  export interface GreptileCallRequest {
@@ -70,6 +70,9 @@ export interface ReplicasSdk {
70
70
  vercel: {
71
71
  request<T = unknown>(path: string, options?: ProviderRequestOptions): Promise<T>;
72
72
  };
73
+ lightfield: {
74
+ request<T = unknown>(path: string, options?: ProviderRequestOptions): Promise<T>;
75
+ };
73
76
  vanta: {
74
77
  request<T = unknown>(path: `/v1/${string}`, options?: ProviderRequestOptions): Promise<T>;
75
78
  };