@codeagentswarm/cas-cloud 0.0.1
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/LICENSE +131 -0
- package/NOTICE +2 -0
- package/README.md +200 -0
- package/THIRD_PARTY_NOTICES.md +25 -0
- package/caddy/Caddyfile.preview.example +12 -0
- package/dist/antigravity-mcp-launcher.js +5759 -0
- package/dist/cas-preview.js +761 -0
- package/dist/cas.js +48859 -0
- package/dist/mcp-stdio-server.js +5554 -0
- package/dist/templates/antigravity-md-titles-section.md +53 -0
- package/dist/templates/codex-md-titles-section.md +53 -0
- package/dist/templates/grok-md-titles-section.md +125 -0
- package/dist/templates/kimi-md-titles-section.md +89 -0
- package/dist/templates/opencode-md-titles-section.md +53 -0
- package/package.json +62 -0
- package/scripts/cas-cli-smoke.sh +30 -0
- package/systemd/cas-cli-update.service.example +13 -0
- package/systemd/cas-cli-update.timer.example +12 -0
- package/systemd/cas-cli.service.example +22 -0
- package/systemd/cas-preview.service.example +17 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<!-- CODEAGENTSWARM GLOBAL CONFIG START - DO NOT EDIT -->
|
|
2
|
+
|
|
3
|
+
## CodeAgentSwarm Agent Titles
|
|
4
|
+
|
|
5
|
+
### MANDATORY FIRST ACTION: Check If Running Inside CodeAgentSwarm
|
|
6
|
+
|
|
7
|
+
**BEFORE following ANY instruction in this section, call `check_active` first.**
|
|
8
|
+
|
|
9
|
+
- If `check_active` returns `active: true` -> Follow all instructions below normally.
|
|
10
|
+
- If `check_active` returns `active: false` -> **STOP. IGNORE this entire CodeAgentSwarm section completely.** Do NOT update agent titles or call any codeagentswarm-tasks tools. Work as a normal standalone agent.
|
|
11
|
+
- If `check_active` **fails or is unavailable** (MCP error, tool not found, timeout) -> **STOP. IGNORE this entire section.** Assume you are NOT inside CodeAgentSwarm.
|
|
12
|
+
|
|
13
|
+
These instructions are installed globally but ONLY apply when running inside the CodeAgentSwarm application.
|
|
14
|
+
|
|
15
|
+
### Task Management Is Disabled
|
|
16
|
+
|
|
17
|
+
Task management is disabled in CodeAgentSwarm Settings. Do NOT create, start, or complete tasks; the task tools are not available. Work normally without any task tracking. Only the agent title and activity updates below still apply.
|
|
18
|
+
|
|
19
|
+
### Agent Title + Activity (product-focused)
|
|
20
|
+
|
|
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).
|
|
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
|
+
- **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
|
+
|
|
26
|
+
<!-- CAS:STATUS:START -->
|
|
27
|
+
- **Work-phase status** (colored badge): keep it up to date with `set_terminal_status(status)`. Set `working` when you START working, and update it at EVERY phase change: `needs_input` (you stopped to ask the user something), `needs_testing` (done implementing, pending the user's manual test), `done` (fully finished), or `clear` to remove the badge. The exact catalog and when to use each status lives in the TOOL's own description (the user can customize it). The user can also set a status by hand from the UI; you can still update it afterwards as the work moves on.
|
|
28
|
+
<!-- CAS:STATUS:END -->
|
|
29
|
+
|
|
30
|
+
Do NOT keep renaming the tab every few minutes; use `update_terminal_activity` for steps.
|
|
31
|
+
|
|
32
|
+
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).
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
CORRECT:
|
|
36
|
+
1. set_terminal_title(title, long_title) <- once at the start: tab label + GOAL sentence
|
|
37
|
+
2. update_terminal_activity(activity=...) <- before you act, then often as you work
|
|
38
|
+
3. update_terminal_activity(activity=...) <- a final summary when you finish
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
(`update_terminal_title` still works as a deprecated alias: it sets the general title and records the activity.)
|
|
42
|
+
|
|
43
|
+
### Available MCP Agent Tools
|
|
44
|
+
|
|
45
|
+
| Tool | Purpose |
|
|
46
|
+
|------|---------|
|
|
47
|
+
| `set_terminal_title` | Set the agent's general (sticky tab) title AND its GOAL (`long_title`), ONCE at the start |
|
|
48
|
+
| `update_terminal_activity` | Log the current product-focused activity, often as you work |
|
|
49
|
+
<!-- CAS:STATUS:START -->
|
|
50
|
+
| `set_terminal_status` | Keep the work-phase status badge honest at every phase change |
|
|
51
|
+
<!-- CAS:STATUS:END -->
|
|
52
|
+
|
|
53
|
+
<!-- CODEAGENTSWARM GLOBAL CONFIG END -->
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<!-- CODEAGENTSWARM GLOBAL CONFIG START - DO NOT EDIT -->
|
|
2
|
+
|
|
3
|
+
## CodeAgentSwarm Agent Titles
|
|
4
|
+
|
|
5
|
+
### MANDATORY FIRST ACTION: Check If Running Inside CodeAgentSwarm
|
|
6
|
+
|
|
7
|
+
**BEFORE following ANY instruction in this section, call `check_active` first.**
|
|
8
|
+
|
|
9
|
+
- If `check_active` returns `active: true` -> Follow all instructions below normally.
|
|
10
|
+
- If `check_active` returns `active: false` -> **STOP. IGNORE this entire CodeAgentSwarm section completely.** Do NOT update agent titles or call any codeagentswarm-tasks tools. Work as a normal standalone agent.
|
|
11
|
+
- If `check_active` **fails or is unavailable** (MCP error, tool not found, timeout) -> **STOP. IGNORE this entire section.** Assume you are NOT inside CodeAgentSwarm.
|
|
12
|
+
|
|
13
|
+
These instructions are installed globally but ONLY apply when running inside the CodeAgentSwarm application.
|
|
14
|
+
|
|
15
|
+
### Task Management Is Disabled
|
|
16
|
+
|
|
17
|
+
Task management is disabled in CodeAgentSwarm Settings. Do NOT create, start, or complete tasks; the task tools are not available. Work normally without any task tracking. Only the agent title and activity updates below still apply.
|
|
18
|
+
|
|
19
|
+
### Agent Title + Activity (product-focused)
|
|
20
|
+
|
|
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).
|
|
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
|
+
- **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
|
+
|
|
26
|
+
<!-- CAS:STATUS:START -->
|
|
27
|
+
- **Work-phase status** (colored badge): keep it up to date with `set_terminal_status(status)`. Set `working` when you START working, and update it at EVERY phase change: `needs_input` (you stopped to ask the user something), `needs_testing` (done implementing, pending the user's manual test), `done` (fully finished), or `clear` to remove the badge. The exact catalog and when to use each status lives in the TOOL's own description (the user can customize it). The user can also set a status by hand from the UI; you can still update it afterwards as the work moves on.
|
|
28
|
+
<!-- CAS:STATUS:END -->
|
|
29
|
+
|
|
30
|
+
Do NOT keep renaming the tab every few minutes; use `update_terminal_activity` for steps.
|
|
31
|
+
|
|
32
|
+
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).
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
CORRECT:
|
|
36
|
+
1. set_terminal_title(title, long_title) <- once at the start: tab label + GOAL sentence
|
|
37
|
+
2. update_terminal_activity(activity=...) <- before you act, then often as you work
|
|
38
|
+
3. update_terminal_activity(activity=...) <- a final summary when you finish
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
(`update_terminal_title` still works as a deprecated alias: it sets the general title and records the activity.)
|
|
42
|
+
|
|
43
|
+
### Available MCP Agent Tools
|
|
44
|
+
|
|
45
|
+
| Tool | Purpose |
|
|
46
|
+
|------|---------|
|
|
47
|
+
| `set_terminal_title` | Set the agent's general (sticky tab) title AND its GOAL (`long_title`), ONCE at the start |
|
|
48
|
+
| `update_terminal_activity` | Log the current product-focused activity, often as you work |
|
|
49
|
+
<!-- CAS:STATUS:START -->
|
|
50
|
+
| `set_terminal_status` | Keep the work-phase status badge honest at every phase change |
|
|
51
|
+
<!-- CAS:STATUS:END -->
|
|
52
|
+
|
|
53
|
+
<!-- CODEAGENTSWARM GLOBAL CONFIG END -->
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<!-- CODEAGENTSWARM GLOBAL CONFIG START - DO NOT EDIT -->
|
|
2
|
+
|
|
3
|
+
## CodeAgentSwarm Agent Titles
|
|
4
|
+
|
|
5
|
+
### MANDATORY FIRST ACTION: Check If Running Inside CodeAgentSwarm
|
|
6
|
+
|
|
7
|
+
**BEFORE following ANY instruction in this section, call `check_active` first.**
|
|
8
|
+
|
|
9
|
+
- If `check_active` returns `active: true` -> Follow all instructions below normally.
|
|
10
|
+
- If `check_active` returns `active: false` -> **STOP. IGNORE this entire CodeAgentSwarm section completely.** Do NOT update agent titles or call any codeagentswarm-tasks tools. Work as a normal standalone agent.
|
|
11
|
+
- If `check_active` **fails or is unavailable** (MCP error, tool not found, timeout) -> **STOP. IGNORE this entire section.** Assume you are NOT inside CodeAgentSwarm.
|
|
12
|
+
|
|
13
|
+
These instructions are installed globally but ONLY apply when running inside the CodeAgentSwarm application.
|
|
14
|
+
|
|
15
|
+
### Task Management Is Disabled
|
|
16
|
+
|
|
17
|
+
Task management is disabled in CodeAgentSwarm Settings. Do NOT create, start, or complete tasks; the task tools are not available. Work normally without any task tracking. Only the agent title and activity updates below still apply.
|
|
18
|
+
|
|
19
|
+
### MANDATORY SESSION BOOTSTRAP (title / goal / status / activity)
|
|
20
|
+
|
|
21
|
+
**After `check_active` returns `active: true`, and BEFORE any other tool**
|
|
22
|
+
(read, grep, bash, image gen, web search, file writes, MCP discovery for non-title work, etc.):
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
1. set_terminal_title(title, long_title) <- sticky tab + GOAL (ALWAYS both args)
|
|
26
|
+
<!-- CAS:STATUS:START -->
|
|
27
|
+
2. set_terminal_status("working") <- work-phase badge
|
|
28
|
+
<!-- CAS:STATUS:END -->
|
|
29
|
+
3. update_terminal_activity(activity=...) <- first product-focused step
|
|
30
|
+
```
|
|
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.
|
|
35
|
+
|
|
36
|
+
Batch the bootstrap calls in the **same first tool round** as `check_active` when
|
|
37
|
+
possible (or immediately after it). Do not start real work until they succeed.
|
|
38
|
+
|
|
39
|
+
LANGUAGE: write title, goal (`long_title`) and activity in the SAME language the user is speaking.
|
|
40
|
+
|
|
41
|
+
### GROK: call them through MCP (`search_tool` then `use_tool`)
|
|
42
|
+
|
|
43
|
+
Grok Build does **not** expose `set_terminal_title` /
|
|
44
|
+
`update_terminal_activity` as native functions. That is expected. **Not seeing
|
|
45
|
+
them in your function list is not a reason to skip the title.**
|
|
46
|
+
|
|
47
|
+
How to call them in this runtime:
|
|
48
|
+
|
|
49
|
+
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": "..." }`.
|
|
53
|
+
<!-- CAS:STATUS:START -->
|
|
54
|
+
4. Same round: `codeagentswarm-tasks__set_terminal_status` with `{ "status": "working" }`.
|
|
55
|
+
<!-- CAS:STATUS:END -->
|
|
56
|
+
|
|
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.
|
|
61
|
+
|
|
62
|
+
### Agent Title + Activity (product-focused)
|
|
63
|
+
|
|
64
|
+
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).
|
|
66
|
+
- **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
|
+
- **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
|
+
|
|
69
|
+
<!-- CAS:STATUS:START -->
|
|
70
|
+
- **Work-phase status** (colored badge): keep it up to date with `set_terminal_status(status)`. Set `working` when you START working, and update it at EVERY phase change: `needs_input` (you stopped to ask the user something), `needs_testing` (done implementing, pending the user's manual test), `done` (fully finished), or `clear` to remove the badge. The exact catalog and when to use each status lives in the TOOL's own description (the user can customize it). The user can also set a status by hand from the UI; you can still update it afterwards as the work moves on.
|
|
71
|
+
<!-- CAS:STATUS:END -->
|
|
72
|
+
|
|
73
|
+
Do NOT keep renaming the tab every few minutes; use `update_terminal_activity` for steps.
|
|
74
|
+
|
|
75
|
+
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
|
+
|
|
77
|
+
```
|
|
78
|
+
CORRECT (every request — research, questions, design, advice):
|
|
79
|
+
1. check_active
|
|
80
|
+
2. set_terminal_title(title, long_title) <- once at the start: tab label + GOAL sentence
|
|
81
|
+
<!-- CAS:STATUS:START -->
|
|
82
|
+
3. set_terminal_status("working")
|
|
83
|
+
<!-- CAS:STATUS:END -->
|
|
84
|
+
4. update_terminal_activity(activity=...) <- before you act, then often as you work
|
|
85
|
+
5. update_terminal_activity(activity=...) <- a final summary when you finish
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
(`update_terminal_title` still works as a deprecated alias: it sets the general title and records the activity — prefer `set_terminal_title` + `update_terminal_activity`.)
|
|
89
|
+
|
|
90
|
+
### Available MCP Agent Tools
|
|
91
|
+
|
|
92
|
+
| Tool | Purpose |
|
|
93
|
+
|------|---------|
|
|
94
|
+
| `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 |
|
|
96
|
+
| `update_terminal_activity` | Log the current product-focused activity, often as you work |
|
|
97
|
+
<!-- CAS:STATUS:START -->
|
|
98
|
+
| `set_terminal_status` | Keep the work-phase status badge honest at every phase change |
|
|
99
|
+
<!-- CAS:STATUS:END -->
|
|
100
|
+
|
|
101
|
+
### MEMORIZE (every session)
|
|
102
|
+
|
|
103
|
+
1. **Start work** → `check_active` then `set_terminal_title(title, long_title)` + `update_terminal_activity` **before any other tool**
|
|
104
|
+
<!-- CAS:STATUS:START -->
|
|
105
|
+
2. **Also set status** → `set_terminal_status("working")` at start; update on every phase change (`needs_input` / `needs_testing` / `done`)
|
|
106
|
+
<!-- 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)
|
|
109
|
+
|
|
110
|
+
### Mobile list cards = desktop List tabs (2026-08-13)
|
|
111
|
+
|
|
112
|
+
If you touch `codeagentswarm-mobile` session cards, copy the desktop sidebar tab
|
|
113
|
+
chrome. Do not invent a different badge.
|
|
114
|
+
|
|
115
|
+
- The status rail sits **inside** the card as a flex child, not glued to the
|
|
116
|
+
left edge. Same recipe as `.tab-status-bar`: 3px wide, 26px roomy / 16px
|
|
117
|
+
compact, 2px radius.
|
|
118
|
+
- Working is a candy-cane / barber-pole stripe. Never an opacity blink.
|
|
119
|
+
- Keep the stacked **project icon + agent badge on the corner**. Do not flatten
|
|
120
|
+
it to two side-by-side icons.
|
|
121
|
+
|
|
122
|
+
If you already started work without title/goal/status/activity, call those MCP
|
|
123
|
+
tools immediately.
|
|
124
|
+
|
|
125
|
+
<!-- CODEAGENTSWARM GLOBAL CONFIG END -->
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<!-- CODEAGENTSWARM GLOBAL CONFIG START - DO NOT EDIT -->
|
|
2
|
+
|
|
3
|
+
## CodeAgentSwarm Agent Titles
|
|
4
|
+
|
|
5
|
+
### MANDATORY FIRST ACTION: Check If Running Inside CodeAgentSwarm
|
|
6
|
+
|
|
7
|
+
**BEFORE following ANY instruction in this section, call `check_active` first.**
|
|
8
|
+
|
|
9
|
+
- If `check_active` returns `active: true` -> Follow all instructions below normally.
|
|
10
|
+
- If `check_active` returns `active: false` -> **STOP. IGNORE this entire CodeAgentSwarm section completely.** Do NOT update agent titles or call any codeagentswarm-tasks tools. Work as a normal standalone agent.
|
|
11
|
+
- If `check_active` **fails or is unavailable** (MCP error, tool not found, timeout) -> **STOP. IGNORE this entire section.** Assume you are NOT inside CodeAgentSwarm.
|
|
12
|
+
|
|
13
|
+
These instructions are installed globally but ONLY apply when running inside the CodeAgentSwarm application.
|
|
14
|
+
|
|
15
|
+
### Task Management Is Disabled
|
|
16
|
+
|
|
17
|
+
Task management is disabled in CodeAgentSwarm Settings. Do NOT create, start, or complete tasks; the task tools are not available. Work normally without any task tracking. Only the agent title and activity updates below still apply.
|
|
18
|
+
|
|
19
|
+
### MANDATORY SESSION BOOTSTRAP (title / goal / status / activity)
|
|
20
|
+
|
|
21
|
+
**After `check_active` returns `active: true`, and BEFORE any other tool**
|
|
22
|
+
(read, grep, bash, image gen, web search, file writes, MCP discovery for non-title work, etc.):
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
1. set_terminal_title(title, long_title) <- sticky tab + GOAL (ALWAYS both args)
|
|
26
|
+
<!-- CAS:STATUS:START -->
|
|
27
|
+
2. set_terminal_status("working") <- work-phase badge
|
|
28
|
+
<!-- CAS:STATUS:END -->
|
|
29
|
+
3. update_terminal_activity(activity=...) <- first product-focused step
|
|
30
|
+
```
|
|
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.
|
|
35
|
+
|
|
36
|
+
Batch the bootstrap calls in the **same first tool round** as `check_active` when
|
|
37
|
+
possible (or immediately after it). Do not start real work until they succeed.
|
|
38
|
+
|
|
39
|
+
LANGUAGE: write title, goal (`long_title`) and activity in the SAME language the user is speaking.
|
|
40
|
+
|
|
41
|
+
### Agent Title + Activity (product-focused)
|
|
42
|
+
|
|
43
|
+
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).
|
|
45
|
+
- **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
|
+
- **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
|
+
|
|
48
|
+
<!-- CAS:STATUS:START -->
|
|
49
|
+
- **Work-phase status** (colored badge): keep it up to date with `set_terminal_status(status)`. Set `working` when you START working, and update it at EVERY phase change: `needs_input` (you stopped to ask the user something), `needs_testing` (done implementing, pending the user's manual test), `done` (fully finished), or `clear` to remove the badge. The exact catalog and when to use each status lives in the TOOL's own description (the user can customize it). The user can also set a status by hand from the UI; you can still update it afterwards as the work moves on.
|
|
50
|
+
<!-- CAS:STATUS:END -->
|
|
51
|
+
|
|
52
|
+
Do NOT keep renaming the tab every few minutes; use `update_terminal_activity` for steps.
|
|
53
|
+
|
|
54
|
+
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
|
+
|
|
56
|
+
```
|
|
57
|
+
CORRECT (every request — research, questions, design, advice):
|
|
58
|
+
1. check_active
|
|
59
|
+
2. set_terminal_title(title, long_title) <- once at the start: tab label + GOAL sentence
|
|
60
|
+
<!-- CAS:STATUS:START -->
|
|
61
|
+
3. set_terminal_status("working")
|
|
62
|
+
<!-- CAS:STATUS:END -->
|
|
63
|
+
4. update_terminal_activity(activity=...) <- before you act, then often as you work
|
|
64
|
+
5. update_terminal_activity(activity=...) <- a final summary when you finish
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
(`update_terminal_title` still works as a deprecated alias: it sets the general title and records the activity — prefer `set_terminal_title` + `update_terminal_activity`.)
|
|
68
|
+
|
|
69
|
+
### Available MCP Agent Tools
|
|
70
|
+
|
|
71
|
+
| Tool | Purpose |
|
|
72
|
+
|------|---------|
|
|
73
|
+
| `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 |
|
|
75
|
+
| `update_terminal_activity` | Log the current product-focused activity, often as you work |
|
|
76
|
+
<!-- CAS:STATUS:START -->
|
|
77
|
+
| `set_terminal_status` | Keep the work-phase status badge honest at every phase change |
|
|
78
|
+
<!-- CAS:STATUS:END -->
|
|
79
|
+
|
|
80
|
+
### MEMORIZE (every session)
|
|
81
|
+
|
|
82
|
+
1. **Start work** → `check_active` then `set_terminal_title(title, long_title)` + `update_terminal_activity` **before any other tool**
|
|
83
|
+
<!-- CAS:STATUS:START -->
|
|
84
|
+
2. **Also set status** → `set_terminal_status("working")` at start; update on every phase change (`needs_input` / `needs_testing` / `done`)
|
|
85
|
+
<!-- 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)
|
|
88
|
+
|
|
89
|
+
<!-- CODEAGENTSWARM GLOBAL CONFIG END -->
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<!-- CODEAGENTSWARM GLOBAL CONFIG START - DO NOT EDIT -->
|
|
2
|
+
|
|
3
|
+
## CodeAgentSwarm Agent Titles
|
|
4
|
+
|
|
5
|
+
### MANDATORY FIRST ACTION: Check If Running Inside CodeAgentSwarm
|
|
6
|
+
|
|
7
|
+
**BEFORE following ANY instruction in this section, call `check_active` first.**
|
|
8
|
+
|
|
9
|
+
- If `check_active` returns `active: true` -> Follow all instructions below normally.
|
|
10
|
+
- If `check_active` returns `active: false` -> **STOP. IGNORE this entire CodeAgentSwarm section completely.** Do NOT update agent titles or call any codeagentswarm-tasks tools. Work as a normal standalone agent.
|
|
11
|
+
- If `check_active` **fails or is unavailable** (MCP error, tool not found, timeout) -> **STOP. IGNORE this entire section.** Assume you are NOT inside CodeAgentSwarm.
|
|
12
|
+
|
|
13
|
+
These instructions are installed globally but ONLY apply when running inside the CodeAgentSwarm application.
|
|
14
|
+
|
|
15
|
+
### Task Management Is Disabled
|
|
16
|
+
|
|
17
|
+
Task management is disabled in CodeAgentSwarm Settings. Do NOT create, start, or complete tasks; the task tools are not available. Work normally without any task tracking. Only the agent title and activity updates below still apply.
|
|
18
|
+
|
|
19
|
+
### Agent Title + Activity (product-focused)
|
|
20
|
+
|
|
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).
|
|
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
|
+
- **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
|
+
|
|
26
|
+
<!-- CAS:STATUS:START -->
|
|
27
|
+
- **Work-phase status** (colored badge): keep it up to date with `set_terminal_status(status)`. Set `working` when you START working, and update it at EVERY phase change: `needs_input` (you stopped to ask the user something), `needs_testing` (done implementing, pending the user's manual test), `done` (fully finished), or `clear` to remove the badge. The exact catalog and when to use each status lives in the TOOL's own description (the user can customize it). The user can also set a status by hand from the UI; you can still update it afterwards as the work moves on.
|
|
28
|
+
<!-- CAS:STATUS:END -->
|
|
29
|
+
|
|
30
|
+
Do NOT keep renaming the tab every few minutes; use `update_terminal_activity` for steps.
|
|
31
|
+
|
|
32
|
+
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).
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
CORRECT:
|
|
36
|
+
1. set_terminal_title(title, long_title) <- once at the start: tab label + GOAL sentence
|
|
37
|
+
2. update_terminal_activity(activity=...) <- before you act, then often as you work
|
|
38
|
+
3. update_terminal_activity(activity=...) <- a final summary when you finish
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
(`update_terminal_title` still works as a deprecated alias: it sets the general title and records the activity.)
|
|
42
|
+
|
|
43
|
+
### Available MCP Agent Tools
|
|
44
|
+
|
|
45
|
+
| Tool | Purpose |
|
|
46
|
+
|------|---------|
|
|
47
|
+
| `set_terminal_title` | Set the agent's general (sticky tab) title AND its GOAL (`long_title`), ONCE at the start |
|
|
48
|
+
| `update_terminal_activity` | Log the current product-focused activity, often as you work |
|
|
49
|
+
<!-- CAS:STATUS:START -->
|
|
50
|
+
| `set_terminal_status` | Keep the work-phase status badge honest at every phase change |
|
|
51
|
+
<!-- CAS:STATUS:END -->
|
|
52
|
+
|
|
53
|
+
<!-- CODEAGENTSWARM GLOBAL CONFIG END -->
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@codeagentswarm/cas-cloud",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "CAS Cloud runtime for remote CodeAgentSwarm sessions",
|
|
5
|
+
"author": "Arturo Garcia <hello@codeagentswarm.com>",
|
|
6
|
+
"license": "PolyForm-Noncommercial-1.0.0",
|
|
7
|
+
"type": "commonjs",
|
|
8
|
+
"bin": {
|
|
9
|
+
"cas-cloud": "dist/cas.js",
|
|
10
|
+
"cas-cli": "dist/cas.js",
|
|
11
|
+
"cas": "dist/cas.js",
|
|
12
|
+
"cas-preview": "dist/cas-preview.js"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/arturogj92/cas-cloud.git"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://github.com/arturogj92/cas-cloud#readme",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/arturogj92/cas-cloud/issues"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist/*.js",
|
|
27
|
+
"dist/templates/*.md",
|
|
28
|
+
"README.md",
|
|
29
|
+
"LICENSE",
|
|
30
|
+
"NOTICE",
|
|
31
|
+
"THIRD_PARTY_NOTICES.md",
|
|
32
|
+
"scripts/cas-cli-smoke.sh",
|
|
33
|
+
"systemd/cas-cli.service.example",
|
|
34
|
+
"systemd/cas-cli-update.service.example",
|
|
35
|
+
"systemd/cas-cli-update.timer.example",
|
|
36
|
+
"systemd/cas-preview.service.example",
|
|
37
|
+
"caddy/Caddyfile.preview.example"
|
|
38
|
+
],
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=20"
|
|
41
|
+
},
|
|
42
|
+
"os": [
|
|
43
|
+
"darwin",
|
|
44
|
+
"linux"
|
|
45
|
+
],
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "node esbuild.config.js",
|
|
48
|
+
"prepack": "npm run build",
|
|
49
|
+
"test": "node --test test/*.test.js"
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@anthropic-ai/claude-agent-sdk": "^0.3.220",
|
|
53
|
+
"better-sqlite3": "^12.9.0",
|
|
54
|
+
"qrcode": "^1.5.4",
|
|
55
|
+
"tweetnacl": "^1.0.3",
|
|
56
|
+
"tweetnacl-util": "^0.15.1",
|
|
57
|
+
"ws": "^8.18.0"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"esbuild": "^0.28.1"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
set -eu
|
|
3
|
+
|
|
4
|
+
cas_cli_bin=${CAS_CLI_BIN:-cas-cli}
|
|
5
|
+
package_dir=${CAS_CLI_PACKAGE_DIR:-}
|
|
6
|
+
|
|
7
|
+
node_major=$(node -p "process.versions.node.split('.')[0]")
|
|
8
|
+
if [ "$node_major" -lt 20 ]; then
|
|
9
|
+
echo "Node.js 20 or newer is required; found $(node --version)." >&2
|
|
10
|
+
exit 1
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
command -v "$cas_cli_bin" >/dev/null
|
|
14
|
+
"$cas_cli_bin" doctor
|
|
15
|
+
|
|
16
|
+
if [ -z "$package_dir" ]; then
|
|
17
|
+
package_dir="$(npm root -g)/@codeagentswarm/cas-cloud"
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
CAS_CLI_PACKAGE_DIR="$package_dir" node <<'NODE'
|
|
21
|
+
const path = require('path');
|
|
22
|
+
const packageDir = process.env.CAS_CLI_PACKAGE_DIR;
|
|
23
|
+
const Database = require(require.resolve('better-sqlite3', { paths: [packageDir] }));
|
|
24
|
+
const database = new Database(':memory:');
|
|
25
|
+
database.exec('CREATE TABLE smoke(value INTEGER); INSERT INTO smoke VALUES (1)');
|
|
26
|
+
if (database.prepare('SELECT value FROM smoke').get().value !== 1) process.exit(1);
|
|
27
|
+
database.close();
|
|
28
|
+
NODE
|
|
29
|
+
|
|
30
|
+
echo 'CAS CLI local smoke check passed.'
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[Unit]
|
|
2
|
+
Description=Update CAS Cloud when its sessions are idle
|
|
3
|
+
Wants=network-online.target
|
|
4
|
+
After=network-online.target cas-cli.service
|
|
5
|
+
|
|
6
|
+
[Service]
|
|
7
|
+
Type=oneshot
|
|
8
|
+
Environment=PATH=%h/.local/bin:/usr/local/bin:/usr/bin:/bin
|
|
9
|
+
Environment=CAS_CLI_INSTALL_ROOT=%h/.local/share/codeagentswarm-cloud
|
|
10
|
+
Environment=CAS_CLI_SYSTEMD_SCOPE=user
|
|
11
|
+
EnvironmentFile=-%h/.config/codeagentswarm/cas-cli-update.env
|
|
12
|
+
ExecStart=%h/.local/share/codeagentswarm-cloud/current/node_modules/.bin/cas-cli update
|
|
13
|
+
TimeoutStartSec=infinity
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[Unit]
|
|
2
|
+
Description=CAS Cloud runtime
|
|
3
|
+
Wants=network-online.target
|
|
4
|
+
After=network-online.target
|
|
5
|
+
|
|
6
|
+
[Service]
|
|
7
|
+
Type=simple
|
|
8
|
+
Environment=PATH=%h/.local/bin:/usr/local/bin:/usr/bin:/bin
|
|
9
|
+
Environment=CAS_CLI_INSTALL_ROOT=%h/.local/share/codeagentswarm-cloud
|
|
10
|
+
Environment=CAS_CLI_SYSTEMD_SCOPE=user
|
|
11
|
+
EnvironmentFile=%h/.config/codeagentswarm/cas-cli.env
|
|
12
|
+
# Replace both paths. --project registers existing work; --projects-root
|
|
13
|
+
# authorizes remote registration and cloning below that directory.
|
|
14
|
+
ExecStart=%h/.local/share/codeagentswarm-cloud/current/node_modules/.bin/cas-cli serve --project /srv/code/project --projects-root /srv/code
|
|
15
|
+
Restart=always
|
|
16
|
+
RestartSec=5
|
|
17
|
+
KillSignal=SIGTERM
|
|
18
|
+
KillMode=control-group
|
|
19
|
+
TimeoutStopSec=60
|
|
20
|
+
|
|
21
|
+
[Install]
|
|
22
|
+
WantedBy=default.target
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[Unit]
|
|
2
|
+
Description=CAS ephemeral development preview service
|
|
3
|
+
After=network.target
|
|
4
|
+
|
|
5
|
+
[Service]
|
|
6
|
+
Type=simple
|
|
7
|
+
ExecStart=/usr/local/bin/cas-preview serve --listen 127.0.0.1 --port 41820 --socket /run/cas-preview.sock --root /srv/cas-projects --ttl-seconds 7200 --public-origin https://preview.example.com
|
|
8
|
+
Restart=on-failure
|
|
9
|
+
RestartSec=3
|
|
10
|
+
KillMode=control-group
|
|
11
|
+
KillSignal=SIGTERM
|
|
12
|
+
TimeoutStopSec=15
|
|
13
|
+
UMask=0077
|
|
14
|
+
NoNewPrivileges=true
|
|
15
|
+
|
|
16
|
+
[Install]
|
|
17
|
+
WantedBy=multi-user.target
|