replicas-engine 0.1.201 → 0.1.203

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/src/index.js +27 -1
  2. package/package.json +1 -1
package/dist/src/index.js CHANGED
@@ -396,7 +396,7 @@ function parseReplicasConfigString(content, filename) {
396
396
  }
397
397
 
398
398
  // ../shared/src/engine/environment.ts
399
- var DAYTONA_SNAPSHOT_ID = "22-05-2026-royal-york-v8";
399
+ var DAYTONA_SNAPSHOT_ID = "23-05-2026-royal-york-v2";
400
400
 
401
401
  // ../shared/src/engine/types.ts
402
402
  var DEFAULT_CHAT_TITLES = {
@@ -2923,6 +2923,7 @@ function buildClaudeAgentEnv(overrides) {
2923
2923
  if (shouldStripAnthropicApiKey()) {
2924
2924
  env.ANTHROPIC_API_KEY = void 0;
2925
2925
  }
2926
+ env.CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD = "1";
2926
2927
  return env;
2927
2928
  }
2928
2929
  function buildCodexAgentEnv() {
@@ -2951,6 +2952,16 @@ function shouldStripOpenAIApiKey() {
2951
2952
  return ENGINE_ENV.REPLICAS_CODEX_AUTH_METHOD === "oauth";
2952
2953
  }
2953
2954
 
2955
+ // src/utils/agent-additional-directories.ts
2956
+ async function getAgentAdditionalDirectories() {
2957
+ try {
2958
+ const repos = await gitService.listRepositories();
2959
+ return repos.map((repo) => repo.path);
2960
+ } catch {
2961
+ return [];
2962
+ }
2963
+ }
2964
+
2954
2965
  // src/managers/claude-manager.ts
2955
2966
  var PromptStream = class {
2956
2967
  queue = [];
@@ -3144,6 +3155,9 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
3144
3155
  });
3145
3156
  }
3146
3157
  }
3158
+ isAwaitingInput() {
3159
+ return this.pendingToolInputs.size > 0;
3160
+ }
3147
3161
  async respondToToolInput(requestId, selectionId) {
3148
3162
  const pending = this.pendingToolInputs.get(requestId);
3149
3163
  if (!pending) {
@@ -3297,6 +3311,7 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
3297
3311
  append: combinedInstructions
3298
3312
  };
3299
3313
  const queryEnv = buildClaudeAgentEnv(this.envOverrides);
3314
+ const additionalDirectories = await getAgentAdditionalDirectories();
3300
3315
  const resolvedModel = normalizeClaudeModel(model) || CLAUDE_OPUS_1M_MODEL;
3301
3316
  const interactiveAllowed = enableInteractiveTools && permissionMode === "read";
3302
3317
  const useDefaultToolPolicy = !this.toolsOverride;
@@ -3314,6 +3329,7 @@ var ClaudeManager = class _ClaudeManager extends CodingAgentManager {
3314
3329
  options: {
3315
3330
  resume: this.sessionId || void 0,
3316
3331
  cwd: this.workingDirectory,
3332
+ additionalDirectories,
3317
3333
  permissionMode: permissionMode === "read" ? "plan" : "bypassPermissions",
3318
3334
  allowDangerouslySkipPermissions: permissionMode !== "read",
3319
3335
  ...this.toolsOverride ? { tools: this.toolsOverride } : {},
@@ -3728,12 +3744,14 @@ var CodexManager = class extends CodingAgentManager {
3728
3744
  const sandboxMode = "danger-full-access";
3729
3745
  const webSearchMode = "live";
3730
3746
  const codexReasoningEffort = thinkingLevel ? thinkingLevel === "max" ? "xhigh" : thinkingLevel : void 0;
3747
+ const additionalDirectories = await getAgentAdditionalDirectories();
3731
3748
  const threadOptions = {
3732
3749
  workingDirectory: this.workingDirectory,
3733
3750
  skipGitRepoCheck: true,
3734
3751
  sandboxMode,
3735
3752
  model: model || DEFAULT_MODEL,
3736
3753
  webSearchMode,
3754
+ additionalDirectories,
3737
3755
  ...codexReasoningEffort ? { modelReasoningEffort: codexReasoningEffort } : {}
3738
3756
  };
3739
3757
  abortController = new AbortController();
@@ -4918,6 +4936,7 @@ var ChatService = class {
4918
4936
  createdAt: chat.persisted.createdAt,
4919
4937
  updatedAt: chat.persisted.updatedAt,
4920
4938
  processing: chat.provider.isProcessing(),
4939
+ awaitingInput: chat.provider.isAwaitingInput?.() ?? false,
4921
4940
  parentChatId: chat.persisted.parentChatId
4922
4941
  };
4923
4942
  }
@@ -4960,6 +4979,13 @@ var ChatService = class {
4960
4979
  }
4961
4980
  }).catch(() => {
4962
4981
  });
4982
+ if (event.type === "replicas-tool-input-request" || event.type === "replicas-tool-input-resolved") {
4983
+ this.publish({
4984
+ type: "chat.updated",
4985
+ payload: { chat: this.toSummary(chat) }
4986
+ }).catch(() => {
4987
+ });
4988
+ }
4963
4989
  }
4964
4990
  async handleTurnFinished(chatId) {
4965
4991
  const chat = this.getRuntimeChat(chatId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replicas-engine",
3
- "version": "0.1.201",
3
+ "version": "0.1.203",
4
4
  "description": "Lightweight API server for Replicas workspaces",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",