@agentconnect.md/daemon 1.0.0-rc.94 → 1.0.0-rc.96

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.
package/dist/index.js CHANGED
@@ -18055,6 +18055,22 @@ function planConfigSelection(configOptions, category, desired) {
18055
18055
  value: desired
18056
18056
  };
18057
18057
  }
18058
+ /** The claude-acp session `_meta` that turns ultracode on, or undefined when the
18059
+ * desired effort isn't ultracode or the runtime isn't Claude. ultracode is a
18060
+ * session-scoped flag setting the wrapper reads from
18061
+ * `_meta.claudeCode.options.settings` (spread into the SDK `query()` flag-settings
18062
+ * layer) on session/new and session/load — the effort select can't reach it.
18063
+ * `enableWorkflows` rides along so the "pro" plan default (workflows off) doesn't
18064
+ * silently drop the orchestration half. Best-effort: on a non-xhigh-capable model
18065
+ * or with workflows unavailable the runtime reports `applied.ultracode=false` and
18066
+ * the session still runs on its default effort — nothing to fail on our side. */
18067
+ function ultracodeMeta(reasoningEffort, isClaudeRuntime) {
18068
+ if (!isClaudeRuntime || reasoningEffort !== "ultracode") return void 0;
18069
+ return { claudeCode: { options: { settings: {
18070
+ ultracode: true,
18071
+ enableWorkflows: true
18072
+ } } } };
18073
+ }
18058
18074
  /**
18059
18075
  * Extract the model selector from a session's `configOptions`. ACP models are an
18060
18076
  * (experimental) session config option tagged `category: "model"`, `type:
@@ -18144,9 +18160,11 @@ var AcpHost = class {
18144
18160
  return Boolean(this.promptCaps[kind]);
18145
18161
  }
18146
18162
  async newSession(cwd, mcpServers = []) {
18163
+ const _meta = ultracodeMeta(this.opts.configPrefs?.reasoningEffort, this.isClaudeRuntime());
18147
18164
  const res = await this.conn.agent.request(methods.agent.session.new, {
18148
18165
  cwd,
18149
- mcpServers
18166
+ mcpServers,
18167
+ ..._meta ? { _meta } : {}
18150
18168
  });
18151
18169
  this.live.add(res.sessionId);
18152
18170
  const configOptions = await this.applySessionConfig(res.sessionId, res.configOptions);
@@ -18163,7 +18181,8 @@ var AcpHost = class {
18163
18181
  */
18164
18182
  async applySessionConfig(sessionId, initial) {
18165
18183
  let options = initial;
18166
- const prefs = [["model", this.opts.configPrefs?.model], ["thought_level", this.opts.configPrefs?.reasoningEffort]];
18184
+ const ultracode = ultracodeMeta(this.opts.configPrefs?.reasoningEffort, this.isClaudeRuntime()) !== void 0;
18185
+ const prefs = [["model", this.opts.configPrefs?.model], ["thought_level", ultracode ? void 0 : this.opts.configPrefs?.reasoningEffort]];
18167
18186
  for (const [category, desired] of prefs) {
18168
18187
  if (!desired) continue;
18169
18188
  const plan = planConfigSelection(options, category, desired);
@@ -18209,10 +18228,12 @@ var AcpHost = class {
18209
18228
  async loadSession(sessionId, cwd) {
18210
18229
  this.loadingSessions.add(sessionId);
18211
18230
  try {
18231
+ const _meta = ultracodeMeta(this.opts.configPrefs?.reasoningEffort, this.isClaudeRuntime());
18212
18232
  const res = await this.conn.agent.request(methods.agent.session.load, {
18213
18233
  sessionId,
18214
18234
  cwd,
18215
- mcpServers: []
18235
+ mcpServers: [],
18236
+ ..._meta ? { _meta } : {}
18216
18237
  });
18217
18238
  this.live.add(sessionId);
18218
18239
  await this.applySessionConfig(sessionId, res.configOptions);