chatroom-cli 1.53.3 → 1.53.4

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
@@ -26655,7 +26655,7 @@ function resolveCursorCliModel(model) {
26655
26655
  const prefix = `${CURSOR_PROVIDER}/`;
26656
26656
  return model.startsWith(prefix) ? model.slice(prefix.length) : model;
26657
26657
  }
26658
- var CURSOR_COMMAND = "agent", CURSOR_PROVIDER = "cursor", CURSOR_MODELS, CursorAgentService;
26658
+ var CURSOR_COMMAND = "agent", CURSOR_PROVIDER = "cursor", NO_SUBAGENT_DIRECTIVE = "NEVER spawn subagents. Follow the chatroom instructions strictly.", CURSOR_MODELS, CursorAgentService;
26659
26659
  var init_cursor_agent_service = __esm(() => {
26660
26660
  init_base_cli_agent_service();
26661
26661
  init_cursor_stream_reader();
@@ -26736,9 +26736,12 @@ var init_cursor_agent_service = __esm(() => {
26736
26736
  if (options.model) {
26737
26737
  args2.push("--model", resolveCursorCliModel(options.model));
26738
26738
  }
26739
- const fullPrompt = options.systemPrompt ? `${options.systemPrompt}
26739
+ const systemPrompt = options.systemPrompt ? `${NO_SUBAGENT_DIRECTIVE}
26740
26740
 
26741
- ${options.prompt}` : options.prompt;
26741
+ ${options.systemPrompt}` : NO_SUBAGENT_DIRECTIVE;
26742
+ const fullPrompt = `${systemPrompt}
26743
+
26744
+ ${options.prompt}`;
26742
26745
  const childProcess = this.deps.spawn(CURSOR_COMMAND, args2, {
26743
26746
  cwd: options.workingDir,
26744
26747
  stdio: ["pipe", "pipe", "pipe"],
@@ -27512,65 +27515,7 @@ function resolveCursorSdkModel(model) {
27512
27515
  const prefix = `${CURSOR_PROVIDER2}/`;
27513
27516
  return model.startsWith(prefix) ? model.slice(prefix.length) : model;
27514
27517
  }
27515
- var CURSOR_SDK_FALLBACK_MODELS, CURSOR_PROVIDER2 = "cursor";
27516
- var init_cursor_models = __esm(() => {
27517
- CURSOR_SDK_FALLBACK_MODELS = [
27518
- "claude-4.6-opus-high",
27519
- "claude-4.6-opus-high-thinking",
27520
- "claude-4.6-opus-max",
27521
- "claude-4.6-opus-max-thinking",
27522
- "claude-4.5-opus-high",
27523
- "claude-4.5-opus-high-thinking",
27524
- "claude-4.6-sonnet-medium",
27525
- "claude-4.6-sonnet-medium-thinking",
27526
- "claude-4.5-sonnet",
27527
- "claude-4.5-sonnet-thinking",
27528
- "claude-4-sonnet",
27529
- "claude-4-sonnet-thinking",
27530
- "claude-4-sonnet-1m",
27531
- "claude-4-sonnet-1m-thinking",
27532
- "gpt-5.4-low",
27533
- "gpt-5.4-medium",
27534
- "gpt-5.4-medium-fast",
27535
- "gpt-5.4-high",
27536
- "gpt-5.4-high-fast",
27537
- "gpt-5.4-xhigh",
27538
- "gpt-5.4-xhigh-fast",
27539
- "gpt-5.3-codex-low",
27540
- "gpt-5.3-codex-low-fast",
27541
- "gpt-5.3-codex",
27542
- "gpt-5.3-codex-fast",
27543
- "gpt-5.3-codex-high",
27544
- "gpt-5.3-codex-high-fast",
27545
- "gpt-5.3-codex-xhigh",
27546
- "gpt-5.3-codex-xhigh-fast",
27547
- "gpt-5.3-codex-spark-preview",
27548
- "gpt-5.2",
27549
- "gpt-5.2-high",
27550
- "gpt-5.2-codex-low",
27551
- "gpt-5.2-codex-low-fast",
27552
- "gpt-5.2-codex",
27553
- "gpt-5.2-codex-fast",
27554
- "gpt-5.2-codex-high",
27555
- "gpt-5.2-codex-high-fast",
27556
- "gpt-5.2-codex-xhigh",
27557
- "gpt-5.2-codex-xhigh-fast",
27558
- "gpt-5.1-high",
27559
- "gpt-5.1-codex-max",
27560
- "gpt-5.1-codex-max-high",
27561
- "gpt-5.1-codex-mini",
27562
- "gemini-3.1-pro",
27563
- "gemini-3-pro",
27564
- "gemini-3-flash",
27565
- "grok",
27566
- "kimi-k2.5",
27567
- "auto",
27568
- "composer-2.5",
27569
- "composer-2",
27570
- "composer-1.5",
27571
- "composer-1"
27572
- ];
27573
- });
27518
+ var CURSOR_PROVIDER2 = "cursor";
27574
27519
 
27575
27520
  // src/infrastructure/services/remote-agents/cursor-sdk/cursor-sdk-stream-adapter.ts
27576
27521
  class CursorSdkStreamAdapter {
@@ -27735,12 +27680,11 @@ function buildLogPrefix(context4) {
27735
27680
  function resolveModelId(model) {
27736
27681
  return model ? resolveCursorSdkModel(model) : DEFAULT_MODEL;
27737
27682
  }
27738
- var _sdkCache, _sdkLoadError, CURSOR_SDK_COMMAND = "cursor-sdk", DEFAULT_MODEL = "composer-2.5", AGENT_CREATE_TIMEOUT_MS = 60000, SEND_TIMEOUT_MS = 60000, RUN_WAIT_TIMEOUT_MS = 3600000, MODELS_LIST_TIMEOUT_MS = 1e4, RUN_CANCEL_TIMEOUT_MS = 5000, cachedSdkPackageVersion, CursorSdkAgentService;
27683
+ var NO_SUBAGENT_DIRECTIVE2 = "NEVER spawn subagents. Follow the chatroom instructions strictly.", _sdkCache, _sdkLoadError, CURSOR_SDK_COMMAND = "cursor-sdk", DEFAULT_MODEL = "composer-2.5", AGENT_CREATE_TIMEOUT_MS = 60000, SEND_TIMEOUT_MS = 60000, RUN_WAIT_TIMEOUT_MS = 3600000, MODELS_LIST_TIMEOUT_MS = 1e4, RUN_CANCEL_TIMEOUT_MS = 5000, cachedSdkPackageVersion, CursorSdkAgentService;
27739
27684
  var init_cursor_sdk_agent_service = __esm(() => {
27740
27685
  init_esm();
27741
27686
  init_base_cli_agent_service();
27742
27687
  init_detection_result();
27743
- init_cursor_models();
27744
27688
  CursorSdkAgentService = class CursorSdkAgentService extends BaseCLIAgentService {
27745
27689
  id = "cursor-sdk";
27746
27690
  displayName = "Cursor (SDK)";
@@ -27777,15 +27721,14 @@ var init_cursor_sdk_agent_service = __esm(() => {
27777
27721
  async listModels() {
27778
27722
  const apiKey = process.env.CURSOR_API_KEY?.trim();
27779
27723
  if (!apiKey)
27780
- return [...CURSOR_SDK_FALLBACK_MODELS];
27724
+ return [];
27781
27725
  try {
27782
27726
  const { Cursor } = await loadSdk();
27783
27727
  const models = await withTimeout(Cursor.models.list({ apiKey }), MODELS_LIST_TIMEOUT_MS, "Cursor.models.list");
27784
- const ids3 = models.map((m) => m.id).filter((id3) => id3.length > 0);
27785
- return ids3.length > 0 ? ids3 : [...CURSOR_SDK_FALLBACK_MODELS];
27728
+ return models.map((m) => m.id).filter((id3) => id3.length > 0);
27786
27729
  } catch (err) {
27787
- console.warn(`[cursor-sdk] Cursor.models.list failed, using fallback list:`, err instanceof Error ? err.message : err);
27788
- return [...CURSOR_SDK_FALLBACK_MODELS];
27730
+ console.warn(`[cursor-sdk] Cursor.models.list failed:`, err instanceof Error ? err.message : err);
27731
+ return [];
27789
27732
  }
27790
27733
  }
27791
27734
  async resumeTurn(pid, prompt) {
@@ -27847,9 +27790,12 @@ var init_cursor_sdk_agent_service = __esm(() => {
27847
27790
  const context4 = options.context;
27848
27791
  const agentName = stored.agentName;
27849
27792
  const modelId = resolveModelId(options.model ?? stored.model);
27850
- const fullPrompt = options.systemPrompt ? `${options.systemPrompt}
27793
+ const systemPrompt = options.systemPrompt ? `${NO_SUBAGENT_DIRECTIVE2}
27851
27794
 
27852
- ${options.prompt}` : options.prompt;
27795
+ ${options.systemPrompt}` : NO_SUBAGENT_DIRECTIVE2;
27796
+ const fullPrompt = `${systemPrompt}
27797
+
27798
+ ${options.prompt}`;
27853
27799
  let agent;
27854
27800
  try {
27855
27801
  const { Agent } = await loadSdk();
@@ -27889,7 +27835,17 @@ ${options.prompt}` : options.prompt;
27889
27835
  return keeper;
27890
27836
  }
27891
27837
  startRunningSession(args2) {
27892
- const { pid, keeper, agent, context: context4, agentName, model, workingDir, initialPrompt, forceFirstTurn } = args2;
27838
+ const {
27839
+ pid,
27840
+ keeper,
27841
+ agent,
27842
+ context: context4,
27843
+ agentName,
27844
+ model,
27845
+ workingDir,
27846
+ initialPrompt,
27847
+ forceFirstTurn
27848
+ } = args2;
27893
27849
  const entry = this.registerProcess(pid, context4);
27894
27850
  const logPrefix = buildLogPrefix(context4);
27895
27851
  const session = {
@@ -28038,16 +27994,19 @@ ${options.prompt}` : options.prompt;
28038
27994
  const context4 = options.context;
28039
27995
  const agentName = buildAgentName(context4);
28040
27996
  const modelId = resolveModelId(options.model);
28041
- const fullPrompt = options.systemPrompt ? `${options.systemPrompt}
27997
+ const systemPrompt = options.systemPrompt ? `${NO_SUBAGENT_DIRECTIVE2}
28042
27998
 
28043
- ${options.prompt}` : options.prompt;
27999
+ ${options.systemPrompt}` : NO_SUBAGENT_DIRECTIVE2;
28000
+ const fullPrompt = `${systemPrompt}
28001
+
28002
+ ${options.prompt}`;
28044
28003
  let agent;
28045
28004
  try {
28046
28005
  const { Agent } = await loadSdk();
28047
28006
  agent = await withTimeout(Agent.create({
28048
28007
  apiKey,
28049
28008
  name: agentName,
28050
- model: { id: modelId },
28009
+ model: { id: modelId, params: [{ id: "fast", value: "false" }] },
28051
28010
  local: { cwd: options.workingDir, settingSources: [] }
28052
28011
  }), AGENT_CREATE_TIMEOUT_MS, "Agent.create");
28053
28012
  } catch (err) {
@@ -87488,4 +87447,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
87488
87447
  });
87489
87448
  program2.parse();
87490
87449
 
87491
- //# debugId=738F13B9B9408F0B64756E2164756E21
87450
+ //# debugId=9CE84CC04C561C2A64756E2164756E21