@codeagentswarm/cas-cloud 0.0.15 → 0.0.16

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.
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ "use strict";
2
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
3
4
  var __commonJS = (cb, mod) => function __require() {
4
5
  try {
@@ -8,9 +9,9 @@ var __commonJS = (cb, mod) => function __require() {
8
9
  }
9
10
  };
10
11
 
11
- // src/infrastructure/terminal/sandbox-project-request-store.js
12
+ // ../../src/infrastructure/terminal/sandbox-project-request-store.js
12
13
  var require_sandbox_project_request_store = __commonJS({
13
- "src/infrastructure/terminal/sandbox-project-request-store.js"(exports2, module2) {
14
+ "../../src/infrastructure/terminal/sandbox-project-request-store.js"(exports2, module2) {
14
15
  "use strict";
15
16
  var crypto = require("crypto");
16
17
  var fs2 = require("fs");
@@ -83,9 +84,10 @@ var require_sandbox_project_request_store = __commonJS({
83
84
  }
84
85
  });
85
86
 
86
- // src/infrastructure/platform/platform-config.js
87
+ // ../../src/infrastructure/platform/platform-config.js
87
88
  var require_platform_config = __commonJS({
88
- "src/infrastructure/platform/platform-config.js"(exports2, module2) {
89
+ "../../src/infrastructure/platform/platform-config.js"(exports2, module2) {
90
+ "use strict";
89
91
  var os2 = require("os");
90
92
  var path2 = require("path");
91
93
  var fs2 = require("fs");
@@ -395,9 +397,10 @@ var require_platform_config = __commonJS({
395
397
  }
396
398
  });
397
399
 
398
- // src/shared/logger/child-process-logger.js
400
+ // ../../src/shared/logger/child-process-logger.js
399
401
  var require_child_process_logger = __commonJS({
400
- "src/shared/logger/child-process-logger.js"(exports2, module2) {
402
+ "../../src/shared/logger/child-process-logger.js"(exports2, module2) {
403
+ "use strict";
401
404
  var EventEmitter = require("events");
402
405
  var ChildProcessLogger2 = class extends EventEmitter {
403
406
  constructor(sourceName) {
@@ -484,9 +487,10 @@ var require_child_process_logger = __commonJS({
484
487
  }
485
488
  });
486
489
 
487
- // src/infrastructure/platform/platform-utils.js
490
+ // ../../src/infrastructure/platform/platform-utils.js
488
491
  var require_platform_utils = __commonJS({
489
- "src/infrastructure/platform/platform-utils.js"(exports2, module2) {
492
+ "../../src/infrastructure/platform/platform-utils.js"(exports2, module2) {
493
+ "use strict";
490
494
  var { execSync } = require("child_process");
491
495
  var os2 = require("os");
492
496
  var crypto = require("crypto");
@@ -810,9 +814,10 @@ var require_platform_utils = __commonJS({
810
814
  }
811
815
  });
812
816
 
813
- // src/infrastructure/database/improved-similarity-algorithm.js
817
+ // ../../src/infrastructure/database/improved-similarity-algorithm.js
814
818
  var require_improved_similarity_algorithm = __commonJS({
815
- "src/infrastructure/database/improved-similarity-algorithm.js"(exports2, module2) {
819
+ "../../src/infrastructure/database/improved-similarity-algorithm.js"(exports2, module2) {
820
+ "use strict";
816
821
  var ImprovedSimilarityCalculator = class {
817
822
  constructor() {
818
823
  this.synonymGroups = [
@@ -1054,9 +1059,10 @@ var require_improved_similarity_algorithm = __commonJS({
1054
1059
  }
1055
1060
  });
1056
1061
 
1057
- // src/infrastructure/database/database-mcp-standalone.js
1062
+ // ../../src/infrastructure/database/database-mcp-standalone.js
1058
1063
  var require_database_mcp_standalone = __commonJS({
1059
- "src/infrastructure/database/database-mcp-standalone.js"(exports2, module2) {
1064
+ "../../src/infrastructure/database/database-mcp-standalone.js"(exports2, module2) {
1065
+ "use strict";
1060
1066
  var path2 = require("path");
1061
1067
  var fs2 = require("fs");
1062
1068
  var os2 = require("os");
@@ -2911,9 +2917,9 @@ ${sql}`);
2911
2917
  }
2912
2918
  });
2913
2919
 
2914
- // src/shared/utils/worktree-project-resolver.js
2920
+ // ../../src/shared/utils/worktree-project-resolver.js
2915
2921
  var require_worktree_project_resolver = __commonJS({
2916
- "src/shared/utils/worktree-project-resolver.js"(exports2, module2) {
2922
+ "../../src/shared/utils/worktree-project-resolver.js"(exports2, module2) {
2917
2923
  "use strict";
2918
2924
  function resolveProjectDir(directory, worktreeRows) {
2919
2925
  if (!directory) return directory;
@@ -2952,7 +2958,7 @@ var require_worktree_project_resolver = __commonJS({
2952
2958
  }
2953
2959
  });
2954
2960
 
2955
- // src/infrastructure/mcp/mcp-stdio-server.js
2961
+ // ../../src/infrastructure/mcp/mcp-stdio-server.js
2956
2962
  var { inspect } = require("util");
2957
2963
  var writeProtocol = process.stdout.write.bind(process.stdout);
2958
2964
  var _toStderr = (...args) => process.stderr.write(args.map((a) => typeof a === "string" ? a : inspect(a)).join(" ") + "\n");
@@ -3800,6 +3806,18 @@ var MCPStdioServer = class _MCPStdioServer {
3800
3806
  } catch (e) {
3801
3807
  }
3802
3808
  }
3809
+ _hasNudgeMarker(kind) {
3810
+ try {
3811
+ const os2 = require("os");
3812
+ const fs2 = require("fs");
3813
+ const stateDir = path.join(os2.homedir(), ".codeagentswarm", "terminal-nudge-state");
3814
+ const rawKey = process.env.CODEAGENTSWARM_TERMINAL_ID || process.env.CODEAGENTSWARM_CURRENT_QUADRANT;
3815
+ const key = String(rawKey || "").replace(/[^A-Za-z0-9_-]/g, "_");
3816
+ return !!key && fs2.existsSync(path.join(stateDir, `${key}.${kind}`));
3817
+ } catch (e) {
3818
+ return false;
3819
+ }
3820
+ }
3803
3821
  // Resolve the current terminal id (1-based) from the environment.
3804
3822
  _getCurrentTerminalId() {
3805
3823
  const terminalId = process.env.CODEAGENTSWARM_CURRENT_QUADRANT;
@@ -3818,20 +3836,30 @@ var MCPStdioServer = class _MCPStdioServer {
3818
3836
  }
3819
3837
  // Set the GENERAL terminal title: the sticky tab label that represents the
3820
3838
  // product-level goal of what this terminal is working on. Set it ONCE at the
3821
- // start of work; call it again only to refine when the overall functionality
3822
- // changes, or to replace it when the terminal pivots to a radically different
3823
- // topic. It does NOT represent the current step — use update_terminal_activity
3824
- // for that.
3839
+ // start of the conversation. Later calls preserve it unless the caller explicitly
3840
+ // declares a radical topic change. It does NOT represent the current step — use
3841
+ // update_terminal_activity for that.
3825
3842
  async setTerminalTitle(params) {
3826
- const { title, long_title } = params;
3843
+ const { title, long_title, replace_existing } = params;
3827
3844
  if (!title) {
3828
3845
  throw new Error("title is required");
3829
3846
  }
3830
3847
  if (isPlaceholderTitle(title)) {
3831
3848
  throw new Error(`"${title}" looks like example text copied from the tool documentation, not a real title. Call the tool again with a title that describes the ACTUAL feature or goal you are working on in this agent (max 6 words).`);
3832
3849
  }
3833
- const shortTitle = this.generateShortTitle(title);
3850
+ if (replace_existing !== void 0 && typeof replace_existing !== "boolean") {
3851
+ throw new Error("replace_existing must be a boolean");
3852
+ }
3834
3853
  const terminalId = this._getCurrentTerminalId();
3854
+ if (replace_existing !== true && this._hasNudgeMarker("title")) {
3855
+ return {
3856
+ terminal_id: terminalId,
3857
+ updated: false,
3858
+ preserved: true,
3859
+ message: "The existing conversation title was preserved. Use update_terminal_activity for follow-up work; set replace_existing=true only after the user pivots to a completely different functionality."
3860
+ };
3861
+ }
3862
+ const shortTitle = this.generateShortTitle(title);
3835
3863
  const currentTask = this._getCurrentTask(terminalId);
3836
3864
  const taskId = currentTask ? currentTask.id : null;
3837
3865
  let longTitle = long_title;
@@ -4729,7 +4757,7 @@ Use 'clear' to remove the status.`;
4729
4757
  },
4730
4758
  {
4731
4759
  name: "set_terminal_title",
4732
- description: 'Set the GENERAL agent title AND the agent GOAL \u2014 pass BOTH arguments, because the user sees them together. `title` is the sticky Agent tab label at the FEATURE level (e.g. "Promo video for Twitter", "Minimize agents"); `long_title` is one sentence on what this agent is FOR, shown in the hover under the title. Keep the title high-level: name the feature, not a low-level step or work phase. Set it once at the start, then only refine it when the overall goal changes. Use update_terminal_activity for the current step. LANGUAGE: write BOTH in the SAME language the user is speaking.',
4760
+ description: "Set the GENERAL agent title AND the agent GOAL from the first user request that established this conversation's topic. Pass BOTH text arguments because the user sees them together. This is once per conversation, NOT once per user message, turn, task, review, validation, or resumed session. Follow-up work belongs in update_terminal_activity and repeated calls preserve the original title. Only a user pivot to a completely different functionality may replace it, by passing replace_existing=true. LANGUAGE: write both text fields in the SAME language the user is speaking.",
4733
4761
  inputSchema: {
4734
4762
  type: "object",
4735
4763
  properties: {
@@ -4740,6 +4768,10 @@ Use 'clear' to remove the status.`;
4740
4768
  long_title: {
4741
4769
  type: "string",
4742
4770
  description: `The agent GOAL: one sentence saying what this agent is FOR \u2014 the outcome the work is aiming at, not the current step. ALWAYS provide it: the user reads it in the Agent hover, labelled GOAL, under the short title. Write the real goal in the user's language. Do NOT restate the title or prefix it with "Working on:".`
4771
+ },
4772
+ replace_existing: {
4773
+ type: "boolean",
4774
+ description: "Leave false or omit for normal follow-up work. Set true ONLY when the user explicitly pivots this existing conversation to a completely different functionality; reviews, tests, fixes, implementation phases, and refinements of the original request are activities and must not replace the title."
4743
4775
  }
4744
4776
  },
4745
4777
  // long_title is NOT in `required` on purpose: some agent clients
@@ -5193,7 +5225,8 @@ Use 'clear' to remove the status.`;
5193
5225
  case "set_terminal_title":
5194
5226
  result = await this.setTerminalTitle({
5195
5227
  title: args.title,
5196
- long_title: args.long_title
5228
+ long_title: args.long_title,
5229
+ replace_existing: args.replace_existing
5197
5230
  });
5198
5231
  break;
5199
5232
  case "update_terminal_activity":
@@ -19,7 +19,7 @@ Task management is disabled in CodeAgentSwarm Settings. Do NOT create, start, or
19
19
  ### Agent Title + Activity (product-focused)
20
20
 
21
21
  Three things, all described at the PRODUCT level:
22
- - **General title** (sticky tab): set it ONCE at the start with `set_terminal_title(title, long_title)`. It names the FEATURE / functionality this agent works on (e.g. "Promo Video", "Minimize Agents"); keep it a bit high-level so the context stays clear, NOT a low-level step and NOT a work phase (testing, e2e, validating, reviewing, deploying) running the e2e for a settings redesign keeps the title "Settings Redesign", never "Settings E2E Tests"; phases go in update_terminal_activity. Change it again only to refine when the overall goal changes, or to REPLACE it when the conversation pivots to a radically different topic — never leave a stale title while only updating the activity. Set it as your FIRST action so the agent is never without info; a manual rename always wins (the app keeps it).
22
+ - **General title** (sticky tab): derive it from the **first user request** that established this conversation's functionality and set it ONCE per conversation with `set_terminal_title(title, long_title)`. It stays stable across follow-up messages, new turns, task changes, reviews, tests, validation, implementation phases, and context compaction; those change `update_terminal_activity`, not the title. Only when the user pivots this conversation to a completely different functionality call `set_terminal_title` again with `replace_existing=true`. Refining, extending, fixing, reviewing, or finishing the original request is not a radical pivot. Keep the title at the FEATURE level, never a work phase; a manual rename always wins.
23
23
  - **Goal** (hover, labelled GOAL): the SAME call carries it in `long_title` — one sentence on what this agent is FOR, the outcome the work aims at, not the step you are on. ALWAYS pass it: it is the only place that answers "why does this agent exist", and three words of title cannot. Write it in the user's language. Good: title "Orden notificación" + long_title "Que las notificaciones no salgan antes de que cambie el status del agente". Bad: a long_title that only repeats the title, or one prefixed "Working on:" — both are DISCARDED and the user then sees no goal at all; omitting it has the same effect.
24
24
  - **Current activity** (hover + activity log): call `update_terminal_activity(activity)` OFTEN, one short sentence per step framed at the PRODUCT/feature level (what it does for the user), NOT in technical/internal terms (avoid handler, function, class, module, hook). Bad: "Investigating the output handler cost". Good: "Investigating why agents feel slow". It does NOT change the tab.
25
25
 
@@ -33,7 +33,7 @@ LANGUAGE: write the title, the goal and the activity in the SAME language the us
33
33
 
34
34
  ```
35
35
  CORRECT:
36
- 1. set_terminal_title(title, long_title) <- once at the start: tab label + GOAL sentence
36
+ 1. set_terminal_title(title, long_title) <- first request in this conversation only
37
37
  2. update_terminal_activity(activity=...) <- before you act, then often as you work
38
38
  3. update_terminal_activity(activity=...) <- a final summary when you finish
39
39
  ```
@@ -44,7 +44,7 @@ CORRECT:
44
44
 
45
45
  | Tool | Purpose |
46
46
  |------|---------|
47
- | `set_terminal_title` | Set the agent's general (sticky tab) title AND its GOAL (`long_title`), ONCE at the start |
47
+ | `set_terminal_title` | Set the sticky title + GOAL once per conversation; replace only for a radical pivot |
48
48
  | `update_terminal_activity` | Log the current product-focused activity, often as you work |
49
49
  <!-- CAS:STATUS:START -->
50
50
  | `set_terminal_status` | Keep the work-phase status badge honest at every phase change |
@@ -19,7 +19,7 @@ Task management is disabled in CodeAgentSwarm Settings. Do NOT create, start, or
19
19
  ### Agent Title + Activity (product-focused)
20
20
 
21
21
  Three things, all described at the PRODUCT level:
22
- - **General title** (sticky tab): set it ONCE at the start with `set_terminal_title(title, long_title)`. It names the FEATURE / functionality this agent works on (e.g. "Promo Video", "Minimize Agents"); keep it a bit high-level so the context stays clear, NOT a low-level step and NOT a work phase (testing, e2e, validating, reviewing, deploying) running the e2e for a settings redesign keeps the title "Settings Redesign", never "Settings E2E Tests"; phases go in update_terminal_activity. Change it again only to refine when the overall goal changes, or to REPLACE it when the conversation pivots to a radically different topic — never leave a stale title while only updating the activity. Set it as your FIRST action so the agent is never without info; a manual rename always wins (the app keeps it).
22
+ - **General title** (sticky tab): derive it from the **first user request** that established this conversation's functionality and set it ONCE per conversation with `set_terminal_title(title, long_title)`. It stays stable across follow-up messages, new turns, task changes, reviews, tests, validation, implementation phases, and context compaction; those change `update_terminal_activity`, not the title. Only when the user pivots this conversation to a completely different functionality call `set_terminal_title` again with `replace_existing=true`. Refining, extending, fixing, reviewing, or finishing the original request is not a radical pivot. Keep the title at the FEATURE level, never a work phase; a manual rename always wins.
23
23
  - **Goal** (hover, labelled GOAL): the SAME call carries it in `long_title` — one sentence on what this agent is FOR, the outcome the work aims at, not the step you are on. ALWAYS pass it: it is the only place that answers "why does this agent exist", and three words of title cannot. Write it in the user's language. Good: title "Orden notificación" + long_title "Que las notificaciones no salgan antes de que cambie el status del agente". Bad: a long_title that only repeats the title, or one prefixed "Working on:" — both are DISCARDED and the user then sees no goal at all; omitting it has the same effect.
24
24
  - **Current activity** (hover + activity log): call `update_terminal_activity(activity)` OFTEN, one short sentence per step framed at the PRODUCT/feature level (what it does for the user), NOT in technical/internal terms (avoid handler, function, class, module, hook). Bad: "Investigating the output handler cost". Good: "Investigating why agents feel slow". It does NOT change the tab.
25
25
 
@@ -33,7 +33,7 @@ LANGUAGE: write the title, the goal and the activity in the SAME language the us
33
33
 
34
34
  ```
35
35
  CORRECT:
36
- 1. set_terminal_title(title, long_title) <- once at the start: tab label + GOAL sentence
36
+ 1. set_terminal_title(title, long_title) <- first request in this conversation only
37
37
  2. update_terminal_activity(activity=...) <- before you act, then often as you work
38
38
  3. update_terminal_activity(activity=...) <- a final summary when you finish
39
39
  ```
@@ -44,7 +44,7 @@ CORRECT:
44
44
 
45
45
  | Tool | Purpose |
46
46
  |------|---------|
47
- | `set_terminal_title` | Set the agent's general (sticky tab) title AND its GOAL (`long_title`), ONCE at the start |
47
+ | `set_terminal_title` | Set the sticky title + GOAL once per conversation; replace only for a radical pivot |
48
48
  | `update_terminal_activity` | Log the current product-focused activity, often as you work |
49
49
  <!-- CAS:STATUS:START -->
50
50
  | `set_terminal_status` | Keep the work-phase status badge honest at every phase change |
@@ -22,16 +22,15 @@ Task management is disabled in CodeAgentSwarm Settings. Do NOT create, start, or
22
22
  (read, grep, bash, image gen, web search, file writes, MCP discovery for non-title work, etc.):
23
23
 
24
24
  ```
25
- 1. set_terminal_title(title, long_title) <- sticky tab + GOAL (ALWAYS both args)
25
+ 1. On the conversation's first request only: set_terminal_title(title, long_title)
26
26
  <!-- CAS:STATUS:START -->
27
27
  2. set_terminal_status("working") <- work-phase badge
28
28
  <!-- CAS:STATUS:END -->
29
- 3. update_terminal_activity(activity=...) <- first product-focused step
29
+ 3. On every request: update_terminal_activity(activity=...) for the current step
30
30
  ```
31
31
 
32
- **This bootstrap is MANDATORY for every request** research, answering questions,
33
- brainstorming, design, generating images, one-line advice, reading code. Skipping
34
- title/goal/activity while working is a failure.
32
+ The title/goal call is mandatory only for the first request that establishes the
33
+ conversation topic. On later requests, keep the existing title and update status/activity.
35
34
 
36
35
  Batch the bootstrap calls in the **same first tool round** as `check_active` when
37
36
  possible (or immediately after it). Do not start real work until they succeed.
@@ -47,22 +46,20 @@ them in your function list is not a reason to skip the title.**
47
46
  How to call them in this runtime:
48
47
 
49
48
  1. `search_tool` with query `codeagentswarm set_terminal_title` (once per session is enough).
50
- 2. Immediately `use_tool` with `tool_name` **`codeagentswarm-tasks__set_terminal_title`**
51
- and `tool_input` `{ "title": "...", "long_title": "..." }` (both args).
52
- 3. Same round: `codeagentswarm-tasks__update_terminal_activity` with `{ "activity": "..." }`.
49
+ 2. On this conversation's first request, `use_tool` with `tool_name`
50
+ **`codeagentswarm-tasks__set_terminal_title`** and both title arguments.
51
+ 3. On every turn, call `codeagentswarm-tasks__update_terminal_activity`.
53
52
  <!-- CAS:STATUS:START -->
54
53
  4. Same round: `codeagentswarm-tasks__set_terminal_status` with `{ "status": "working" }`.
55
54
  <!-- CAS:STATUS:END -->
56
55
 
57
- Do this **before** Read, Grep, bash, skills, docs, or image tools. If you already
58
- have the schemas from an earlier `search_tool` in this session, skip rediscovery
59
- and call `use_tool` directly. If you already started work without a title, call
60
- these MCP tools immediately.
56
+ Do the applicable calls **before** real work. On a later turn, keep the existing
57
+ title. For a radical topic pivot only, pass `replace_existing=true`.
61
58
 
62
59
  ### Agent Title + Activity (product-focused)
63
60
 
64
61
  Three things, all described at the PRODUCT level:
65
- - **General title** (sticky tab): set it ONCE at the start with `set_terminal_title(title, long_title)`. It names the FEATURE / functionality this agent works on (e.g. "Promo Video", "Minimize Agents"); keep it a bit high-level so the context stays clear, NOT a low-level step and NOT a work phase (testing, e2e, validating, reviewing, deploying) running the e2e for a settings redesign keeps the title "Settings Redesign", never "Settings E2E Tests"; phases go in update_terminal_activity. Change it again only to refine when the overall goal changes, or to REPLACE it when the conversation pivots to a radically different topic — never leave a stale title while only updating the activity. Set it as your FIRST action so the agent is never without info; a manual rename always wins (the app keeps it).
62
+ - **General title** (sticky tab): derive it from the **first user request** that established this conversation's functionality and set it ONCE per conversation with `set_terminal_title(title, long_title)`. It stays stable across follow-up messages, new turns, task changes, reviews, tests, validation, implementation phases, and context compaction; those change `update_terminal_activity`, not the title. Only when the user pivots this conversation to a completely different functionality call `set_terminal_title` again with `replace_existing=true`. Refining, extending, fixing, reviewing, or finishing the original request is not a radical pivot. Keep the title at the FEATURE level, never a work phase; a manual rename always wins.
66
63
  - **Goal** (hover, labelled GOAL): the SAME call carries it in `long_title` — one sentence on what this agent is FOR, the outcome the work aims at, not the step you are on. ALWAYS pass it: it is the only place that answers "why does this agent exist", and three words of title cannot. Write it in the user's language. Good: title "Orden notificación" + long_title "Que las notificaciones no salgan antes de que cambie el status del agente". Bad: a long_title that only repeats the title, or one prefixed "Working on:" — both are DISCARDED and the user then sees no goal at all; omitting it has the same effect.
67
64
  - **Current activity** (hover + activity log): call `update_terminal_activity(activity)` OFTEN, one short sentence per step framed at the PRODUCT/feature level (what it does for the user), NOT in technical/internal terms (avoid handler, function, class, module, hook). Bad: "Investigating the output handler cost". Good: "Investigating why agents feel slow". It does NOT change the tab.
68
65
 
@@ -75,9 +72,9 @@ Do NOT keep renaming the tab every few minutes; use `update_terminal_activity` f
75
72
  LANGUAGE: write the title, the goal and the activity in the SAME language the user is speaking (e.g. Spanish if the user writes in Spanish).
76
73
 
77
74
  ```
78
- CORRECT (every request — research, questions, design, advice):
75
+ CORRECT:
79
76
  1. check_active
80
- 2. set_terminal_title(title, long_title) <- once at the start: tab label + GOAL sentence
77
+ 2. set_terminal_title(title, long_title) <- first request in this conversation only
81
78
  <!-- CAS:STATUS:START -->
82
79
  3. set_terminal_status("working")
83
80
  <!-- CAS:STATUS:END -->
@@ -92,7 +89,7 @@ CORRECT (every request — research, questions, design, advice):
92
89
  | Tool | Purpose |
93
90
  |------|---------|
94
91
  | `check_active` | Gate: only use CAS tools when inside CodeAgentSwarm |
95
- | `set_terminal_title` | Set the agent's general (sticky tab) title AND its GOAL (`long_title`), ONCE at the start |
92
+ | `set_terminal_title` | Set the sticky title + GOAL once per conversation; replace only for a radical pivot |
96
93
  | `update_terminal_activity` | Log the current product-focused activity, often as you work |
97
94
  <!-- CAS:STATUS:START -->
98
95
  | `set_terminal_status` | Keep the work-phase status badge honest at every phase change |
@@ -100,12 +97,12 @@ CORRECT (every request — research, questions, design, advice):
100
97
 
101
98
  ### MEMORIZE (every session)
102
99
 
103
- 1. **Start work** → `check_active` then `set_terminal_title(title, long_title)` + `update_terminal_activity` **before any other tool**
100
+ 1. **First request** → `check_active`, then `set_terminal_title(title, long_title)` once
104
101
  <!-- CAS:STATUS:START -->
105
102
  2. **Also set status** → `set_terminal_status("working")` at start; update on every phase change (`needs_input` / `needs_testing` / `done`)
106
103
  <!-- CAS:STATUS:END -->
107
- 3. **New step** → `update_terminal_activity` (product step)
108
- 4. **Radical topic change** → new `set_terminal_title` (never leave a stale tab)
104
+ 3. **Every request/new step** → `update_terminal_activity` (product step), never retitle
105
+ 4. **Radical topic change** → `set_terminal_title(..., replace_existing=true)`
109
106
 
110
107
  ### Mobile list cards = desktop List tabs (2026-08-13)
111
108
 
@@ -22,16 +22,15 @@ Task management is disabled in CodeAgentSwarm Settings. Do NOT create, start, or
22
22
  (read, grep, bash, image gen, web search, file writes, MCP discovery for non-title work, etc.):
23
23
 
24
24
  ```
25
- 1. set_terminal_title(title, long_title) <- sticky tab + GOAL (ALWAYS both args)
25
+ 1. On the conversation's first request only: set_terminal_title(title, long_title)
26
26
  <!-- CAS:STATUS:START -->
27
27
  2. set_terminal_status("working") <- work-phase badge
28
28
  <!-- CAS:STATUS:END -->
29
- 3. update_terminal_activity(activity=...) <- first product-focused step
29
+ 3. On every request: update_terminal_activity(activity=...) for the current step
30
30
  ```
31
31
 
32
- **This bootstrap is MANDATORY for every request** research, answering questions,
33
- brainstorming, design, generating images, one-line advice, reading code. Skipping
34
- title/goal/activity while working is a failure.
32
+ The title/goal call is mandatory only for the first request that establishes the
33
+ conversation topic. On later requests, keep the existing title and update status/activity.
35
34
 
36
35
  Batch the bootstrap calls in the **same first tool round** as `check_active` when
37
36
  possible (or immediately after it). Do not start real work until they succeed.
@@ -41,7 +40,7 @@ LANGUAGE: write title, goal (`long_title`) and activity in the SAME language the
41
40
  ### Agent Title + Activity (product-focused)
42
41
 
43
42
  Three things, all described at the PRODUCT level:
44
- - **General title** (sticky tab): set it ONCE at the start with `set_terminal_title(title, long_title)`. It names the FEATURE / functionality this agent works on (e.g. "Promo Video", "Minimize Agents"); keep it a bit high-level so the context stays clear, NOT a low-level step and NOT a work phase (testing, e2e, validating, reviewing, deploying) running the e2e for a settings redesign keeps the title "Settings Redesign", never "Settings E2E Tests"; phases go in update_terminal_activity. Change it again only to refine when the overall goal changes, or to REPLACE it when the conversation pivots to a radically different topic — never leave a stale title while only updating the activity. Set it as your FIRST action so the agent is never without info; a manual rename always wins (the app keeps it).
43
+ - **General title** (sticky tab): derive it from the **first user request** that established this conversation's functionality and set it ONCE per conversation with `set_terminal_title(title, long_title)`. It stays stable across follow-up messages, new turns, task changes, reviews, tests, validation, implementation phases, and context compaction; those change `update_terminal_activity`, not the title. Only when the user pivots this conversation to a completely different functionality call `set_terminal_title` again with `replace_existing=true`. Refining, extending, fixing, reviewing, or finishing the original request is not a radical pivot. Keep the title at the FEATURE level, never a work phase; a manual rename always wins.
45
44
  - **Goal** (hover, labelled GOAL): the SAME call carries it in `long_title` — one sentence on what this agent is FOR, the outcome the work aims at, not the step you are on. ALWAYS pass it: it is the only place that answers "why does this agent exist", and three words of title cannot. Write it in the user's language. Good: title "Orden notificación" + long_title "Que las notificaciones no salgan antes de que cambie el status del agente". Bad: a long_title that only repeats the title, or one prefixed "Working on:" — both are DISCARDED and the user then sees no goal at all; omitting it has the same effect.
46
45
  - **Current activity** (hover + activity log): call `update_terminal_activity(activity)` OFTEN, one short sentence per step framed at the PRODUCT/feature level (what it does for the user), NOT in technical/internal terms (avoid handler, function, class, module, hook). Bad: "Investigating the output handler cost". Good: "Investigating why agents feel slow". It does NOT change the tab.
47
46
 
@@ -54,9 +53,9 @@ Do NOT keep renaming the tab every few minutes; use `update_terminal_activity` f
54
53
  LANGUAGE: write the title, the goal and the activity in the SAME language the user is speaking (e.g. Spanish if the user writes in Spanish).
55
54
 
56
55
  ```
57
- CORRECT (every request — research, questions, design, advice):
56
+ CORRECT:
58
57
  1. check_active
59
- 2. set_terminal_title(title, long_title) <- once at the start: tab label + GOAL sentence
58
+ 2. set_terminal_title(title, long_title) <- first request in this conversation only
60
59
  <!-- CAS:STATUS:START -->
61
60
  3. set_terminal_status("working")
62
61
  <!-- CAS:STATUS:END -->
@@ -71,7 +70,7 @@ CORRECT (every request — research, questions, design, advice):
71
70
  | Tool | Purpose |
72
71
  |------|---------|
73
72
  | `check_active` | Gate: only use CAS tools when inside CodeAgentSwarm |
74
- | `set_terminal_title` | Set the agent's general (sticky tab) title AND its GOAL (`long_title`), ONCE at the start |
73
+ | `set_terminal_title` | Set the sticky title + GOAL once per conversation; replace only for a radical pivot |
75
74
  | `update_terminal_activity` | Log the current product-focused activity, often as you work |
76
75
  <!-- CAS:STATUS:START -->
77
76
  | `set_terminal_status` | Keep the work-phase status badge honest at every phase change |
@@ -79,11 +78,11 @@ CORRECT (every request — research, questions, design, advice):
79
78
 
80
79
  ### MEMORIZE (every session)
81
80
 
82
- 1. **Start work** → `check_active` then `set_terminal_title(title, long_title)` + `update_terminal_activity` **before any other tool**
81
+ 1. **First request** → `check_active`, then `set_terminal_title(title, long_title)` once
83
82
  <!-- CAS:STATUS:START -->
84
83
  2. **Also set status** → `set_terminal_status("working")` at start; update on every phase change (`needs_input` / `needs_testing` / `done`)
85
84
  <!-- CAS:STATUS:END -->
86
- 3. **New step** → `update_terminal_activity` (product step)
87
- 4. **Radical topic change** → new `set_terminal_title` (never leave a stale tab)
85
+ 3. **Every request/new step** → `update_terminal_activity` (product step), never retitle
86
+ 4. **Radical topic change** → `set_terminal_title(..., replace_existing=true)`
88
87
 
89
88
  <!-- CODEAGENTSWARM GLOBAL CONFIG END -->
@@ -19,7 +19,7 @@ Task management is disabled in CodeAgentSwarm Settings. Do NOT create, start, or
19
19
  ### Agent Title + Activity (product-focused)
20
20
 
21
21
  Three things, all described at the PRODUCT level:
22
- - **General title** (sticky tab): set it ONCE at the start with `set_terminal_title(title, long_title)`. It names the FEATURE / functionality this agent works on (e.g. "Promo Video", "Minimize Agents"); keep it a bit high-level so the context stays clear, NOT a low-level step and NOT a work phase (testing, e2e, validating, reviewing, deploying) running the e2e for a settings redesign keeps the title "Settings Redesign", never "Settings E2E Tests"; phases go in update_terminal_activity. Change it again only to refine when the overall goal changes, or to REPLACE it when the conversation pivots to a radically different topic — never leave a stale title while only updating the activity. Set it as your FIRST action so the agent is never without info; a manual rename always wins (the app keeps it).
22
+ - **General title** (sticky tab): derive it from the **first user request** that established this conversation's functionality and set it ONCE per conversation with `set_terminal_title(title, long_title)`. It stays stable across follow-up messages, new turns, task changes, reviews, tests, validation, implementation phases, and context compaction; those change `update_terminal_activity`, not the title. Only when the user pivots this conversation to a completely different functionality call `set_terminal_title` again with `replace_existing=true`. Refining, extending, fixing, reviewing, or finishing the original request is not a radical pivot. Keep the title at the FEATURE level, never a work phase; a manual rename always wins.
23
23
  - **Goal** (hover, labelled GOAL): the SAME call carries it in `long_title` — one sentence on what this agent is FOR, the outcome the work aims at, not the step you are on. ALWAYS pass it: it is the only place that answers "why does this agent exist", and three words of title cannot. Write it in the user's language. Good: title "Orden notificación" + long_title "Que las notificaciones no salgan antes de que cambie el status del agente". Bad: a long_title that only repeats the title, or one prefixed "Working on:" — both are DISCARDED and the user then sees no goal at all; omitting it has the same effect.
24
24
  - **Current activity** (hover + activity log): call `update_terminal_activity(activity)` OFTEN, one short sentence per step framed at the PRODUCT/feature level (what it does for the user), NOT in technical/internal terms (avoid handler, function, class, module, hook). Bad: "Investigating the output handler cost". Good: "Investigating why agents feel slow". It does NOT change the tab.
25
25
 
@@ -33,7 +33,7 @@ LANGUAGE: write the title, the goal and the activity in the SAME language the us
33
33
 
34
34
  ```
35
35
  CORRECT:
36
- 1. set_terminal_title(title, long_title) <- once at the start: tab label + GOAL sentence
36
+ 1. set_terminal_title(title, long_title) <- first request in this conversation only
37
37
  2. update_terminal_activity(activity=...) <- before you act, then often as you work
38
38
  3. update_terminal_activity(activity=...) <- a final summary when you finish
39
39
  ```
@@ -44,7 +44,7 @@ CORRECT:
44
44
 
45
45
  | Tool | Purpose |
46
46
  |------|---------|
47
- | `set_terminal_title` | Set the agent's general (sticky tab) title AND its GOAL (`long_title`), ONCE at the start |
47
+ | `set_terminal_title` | Set the sticky title + GOAL once per conversation; replace only for a radical pivot |
48
48
  | `update_terminal_activity` | Log the current product-focused activity, often as you work |
49
49
  <!-- CAS:STATUS:START -->
50
50
  | `set_terminal_status` | Keep the work-phase status badge honest at every phase change |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeagentswarm/cas-cloud",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "description": "CAS Cloud runtime for remote CodeAgentSwarm sessions",
5
5
  "author": "Arturo Garcia <hello@codeagentswarm.com>",
6
6
  "license": "PolyForm-Noncommercial-1.0.0",
File without changes