@agentconnect.md/daemon 1.0.0-rc.241 → 1.0.0-rc.243

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.
@@ -11099,13 +11099,15 @@ const ULTRACODE_EFFORT = "ultracode";
11099
11099
  * or with workflows unavailable the runtime reports `applied.ultracode=false` and
11100
11100
  * the session still runs on its default effort — nothing to fail on our side.
11101
11101
  * - `systemPrompt` (top-level, sibling of `claudeCode`): the agent's system-prompt
11102
- * seed. We send it as `{ append }` so it layers ON TOP of claude-acp's
11103
- * `claude_code` preset (keeping the coding scaffolding) rather than replacing it.
11104
- * Honored by claude-agent-acp #91; older runtimes ignore the unknown `_meta` key.
11105
- * This is the only channel for the system prompt — ACP session/new has no such
11106
- * field, and other runtimes have no equivalent yet (see cp-overlay.ts). */
11107
- function claudeSessionMeta(reasoningEffort, isClaudeRuntime, systemPrompt) {
11102
+ * seed PLUS, on a fresh session, the agent's memory index (standing context, not a
11103
+ * user turn — see SessionManager). We send it as `{ append }` so it layers ON TOP
11104
+ * of claude-acp's `claude_code` preset (keeping the coding scaffolding) rather than
11105
+ * replacing it. Honored by claude-agent-acp #91; older runtimes ignore the unknown
11106
+ * `_meta` key. This is the only channel for the system prompt — ACP session/new has
11107
+ * no such field, and other runtimes have no equivalent yet (see cp-overlay.ts). */
11108
+ function claudeSessionMeta(reasoningEffort, isClaudeRuntime, systemPrompt, memoryAppend) {
11108
11109
  if (!isClaudeRuntime) return void 0;
11110
+ const append = [systemPrompt, memoryAppend].filter(Boolean).join("\n\n");
11109
11111
  return {
11110
11112
  claudeCode: { options: {
11111
11113
  thinking: {
@@ -11117,7 +11119,7 @@ function claudeSessionMeta(reasoningEffort, isClaudeRuntime, systemPrompt) {
11117
11119
  enableWorkflows: true
11118
11120
  } } : {}
11119
11121
  } },
11120
- ...systemPrompt ? { systemPrompt: { append: systemPrompt } } : {}
11122
+ ...append ? { systemPrompt: { append } } : {}
11121
11123
  };
11122
11124
  }
11123
11125
  /**
@@ -11276,12 +11278,21 @@ var AcpHost = class {
11276
11278
  if (!seed || this.isClaudeRuntime()) return void 0;
11277
11279
  return seed;
11278
11280
  }
11281
+ /** Whether this runtime carries the system prompt (and the fresh-session memory
11282
+ * index) via `_meta.systemPrompt` — true for Claude, which gets them there rather
11283
+ * than as a leading inline block. Lets SessionManager route memory correctly:
11284
+ * Claude → `_meta` (via newSession's memoryAppend); others → an inline block. */
11285
+ usesMetaSystemPrompt() {
11286
+ return this.isClaudeRuntime();
11287
+ }
11279
11288
  /** Create a fresh ACP session. `effortOverride` (the sticky per-session effort choice,
11280
11289
  * when set) takes the place of the agent default in the Claude `_meta` — the only
11281
11290
  * channel `ultracode` can ride (the `thought_level` select rejects it); select-based
11282
- * effort/model/fast overrides are layered on afterward by the daemon at turn start. */
11283
- async newSession(cwd, mcpServers = [], effortOverride) {
11284
- const _meta = claudeSessionMeta(effortOverride ?? this.opts.configPrefs?.reasoningEffort, this.isClaudeRuntime(), this.opts.configPrefs?.systemPrompt);
11291
+ * effort/model/fast overrides are layered on afterward by the daemon at turn start.
11292
+ * `memoryAppend` (the agent's memory index for a FRESH session) rides the same Claude
11293
+ * `_meta.systemPrompt` append — standing context, never a user turn (see #398). */
11294
+ async newSession(cwd, mcpServers = [], effortOverride, memoryAppend) {
11295
+ const _meta = claudeSessionMeta(effortOverride ?? this.opts.configPrefs?.reasoningEffort, this.isClaudeRuntime(), this.opts.configPrefs?.systemPrompt, memoryAppend);
11285
11296
  const res = await this.conn.agent.request(methods.agent.session.new, {
11286
11297
  cwd,
11287
11298
  mcpServers,
@@ -11495,4 +11506,4 @@ var AcpHost = class {
11495
11506
  //#endregion
11496
11507
  export { toolsForIntegrations as A, decodeRelayDaemonFrame as C, MAX_FRAME_BYTES as D, encode as E, cachedRuntimeVersions as M, resolveRuntimes as N, RESERVED_MCP_SERVER_NAME as O, buildRelayDaemonFrame as S, decodeEnvelope as T, writeMemoryFile as _, initGitInjection as a, RELAY_DAEMON_SUBPROTOCOL as b, simpleGit as c, memoryProviderFor as d, MemoryConflictError as f, resolveInMemoryDir as g, listMemory as h, prepareWorkspace as i, cachedRuntimeNames as j, MEMORY_TOOL_NAMES as k, createMemoryProvider as l, MemoryTooLargeError as m, installedRuntimes as n, probeGitVersion as o, MemoryPathError as p, prefetchWorkspace as r, sessionGitEnv as s, AcpHost as t, memoryKindOf as u, isFrame as v, buildEnvelope as w, RELAY_DAEMON_WS_PATH as x, normalizeGitUrl as y };
11497
11508
 
11498
- //# sourceMappingURL=acp-host-jS9ZQLGG.js.map
11509
+ //# sourceMappingURL=acp-host-iKdfasdN.js.map