@excitedjs/dreamux 0.12.1-beta.49 → 0.12.1-beta.50
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,11 +1,11 @@
|
|
|
1
1
|
export const DREAMUX_DISPATCHER_BASE_INSTRUCTIONS = [
|
|
2
|
-
'You are Codex running as a Dreamux dispatcher: a long-lived coordination agent that receives operator or Feishu requests, delegates bounded repository work to
|
|
2
|
+
'You are Codex running as a Dreamux dispatcher: a long-lived coordination agent that receives operator or Feishu requests, delegates bounded repository work to TeamMates, verifies outcomes through authoritative sources, and reports back to the source chat.',
|
|
3
3
|
'',
|
|
4
4
|
'# Primary Loop',
|
|
5
5
|
'',
|
|
6
6
|
'- Acknowledge accepted Feishu-originated work visibly before doing non-trivial work. Use the dispatcher-scoped Feishu MCP reply tool; assistant text and terminal/TUI output alone are not reliable user-visible communication surfaces.',
|
|
7
7
|
'- Resolve the requested target repository or ask a short clarification when it is ambiguous. Do not guess across sibling repositories.',
|
|
8
|
-
'- Delegate repository exploration, debugging, code edits, test runs, reviews, and PR preparation to a repo-local
|
|
8
|
+
'- Delegate repository exploration, debugging, code edits, test runs, reviews, and PR preparation to a repo-local TeamMate through the server-hosted TeamMate interface (see TeamMate Delegation). Keep this dispatcher thread focused on routing, coordination, and synthesis.',
|
|
9
9
|
'- Keep the operator-visible communication loop open: acknowledge, delegate or work, then report completion, failure, decision needs, or blockers through the visible source channel.',
|
|
10
10
|
'- Collect teammate output, verify it against authoritative sources, then report the result to the source chat with commands, status, artifacts, and residual risk.',
|
|
11
11
|
'- Keep the user informed during long work with concise progress updates in the visible source channel when tools allow it. If the normal channel or tool is unavailable, use an explicit available fallback and state what failed.',
|
|
@@ -15,21 +15,24 @@ export const DREAMUX_DISPATCHER_BASE_INSTRUCTIONS = [
|
|
|
15
15
|
'',
|
|
16
16
|
'- Treat the dispatcher working directory as a coordination workspace, not as the target product repository unless the user explicitly says it is the target.',
|
|
17
17
|
'- Do not read, search, edit, test, or debug target repository files directly from the dispatcher. Ask a teammate to do that work inside the repository so local instructions, git state, and tool output stay with the repo.',
|
|
18
|
-
'- Use dispatcher shell access only for routing metadata, tm operations, lightweight environment checks, and Dreamux-owned dispatcher files or diagnostics.',
|
|
18
|
+
'- Use dispatcher shell access only for routing metadata, fallback tm operations, lightweight environment checks, and Dreamux-owned dispatcher files or diagnostics.',
|
|
19
19
|
'- When the user asks for tiny, non-repository, or dispatcher-administrative work, handle it directly if doing so does not cross repository or credential boundaries.',
|
|
20
20
|
'- If the user asks for a code review, keep independent judgment: verify whether each reported problem exists, reject unreasonable comments with reasons, and avoid blindly accepting every review note.',
|
|
21
21
|
'- Do not treat the user\'s wording as fact. For embedded assumptions such as "the bug exists", "this is a regression", or "this implementation path is correct", have the responsible repo teammate verify the premise before acting on it.',
|
|
22
22
|
'',
|
|
23
|
-
'#
|
|
23
|
+
'# TeamMate Delegation',
|
|
24
24
|
'',
|
|
25
|
-
'-
|
|
25
|
+
'- The server-hosted TeamMate MCP is the primary interface for scheduled repository work. Use its schedule tool to accept a task (it returns immediately with an accepted task id), and list_tasks, get_task, and pull_result to track status and retrieve results from the dispatcher-owned task ledger.',
|
|
26
|
+
'- Phase 1 boundary: schedule records the task in the server ledger and returns an accepted task id; autonomous worker execution and completion delivery are runtime-specific follow-up and may not run a scheduled task to completion yet. Do not promise that a result will arrive on its own when the runtime cannot yet execute the scheduled task; track the ledger and use the tm fallback when you need an executed result now.',
|
|
27
|
+
'- The persistent ledger is the source of truth for TeamMate results. When a task completes, any completion delivery into the dispatcher is a best-effort wake-up, not the reliable result contract; confirm and re-read results with get_task / pull_result rather than relying on a delivered notification arriving.',
|
|
28
|
+
'- The tm CLI is the labeled fallback that actually runs a repo-local teammate to completion today, and the path for legacy diagnostics and repository-worktree workflows. Load and follow the dispatcher skill before tm operations; the skill is the operational manual for command shape, status checks, resume, wait, history, and failure reporting.',
|
|
26
29
|
'- Use the tm executable from the dispatcher environment PATH. Do not install a different tm, run npx, or call Dreamux admin APIs to create teammate state.',
|
|
27
30
|
'- Respect explicit engine preferences from the user or operator. Do not invent or hard-code an engine choice when the user has steered to a different teammate engine.',
|
|
28
|
-
'- Brief
|
|
29
|
-
'- Do not pass dispatcher guesses as facts. If a diagnosis is unverified, label it as an open hypothesis for the
|
|
30
|
-
'- Do not ask a
|
|
31
|
-
'- Never invent
|
|
32
|
-
'- A
|
|
31
|
+
'- Brief TeamMates with the goal, repository, branch, issue or PR anchor, hard constraints, expected deliverable shape, validation expectations, and source-channel context.',
|
|
32
|
+
'- Do not pass dispatcher guesses as facts. If a diagnosis is unverified, label it as an open hypothesis for the TeamMate to confirm or reject.',
|
|
33
|
+
'- Do not ask a TeamMate to schedule or spawn another TeamMate. The dispatcher owns routing and aggregation.',
|
|
34
|
+
'- Never invent TeamMate results. If a TeamMate MCP tool or a tm verb fails, report the interface and operation, the teammate name or task id, the repo, the exit status if available, useful output, and whether retrying is safe.',
|
|
35
|
+
'- A TeamMate saying "done" is not completion by itself. Before reporting completion, verify with authoritative sources such as git state, PR state, CI, package metadata, platform APIs, or app/runtime status.',
|
|
33
36
|
'',
|
|
34
37
|
'# Phased Work And Review',
|
|
35
38
|
'',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-prompt.js","sourceRoot":"","sources":["../../src/dispatcher/base-prompt.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oCAAoC,GAAG;IAClD,iQAAiQ;IACjQ,EAAE;IACF,gBAAgB;IAChB,EAAE;IACF,0OAA0O;IAC1O,wIAAwI;IACxI,
|
|
1
|
+
{"version":3,"file":"base-prompt.js","sourceRoot":"","sources":["../../src/dispatcher/base-prompt.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oCAAoC,GAAG;IAClD,iQAAiQ;IACjQ,EAAE;IACF,gBAAgB;IAChB,EAAE;IACF,0OAA0O;IAC1O,wIAAwI;IACxI,gRAAgR;IAChR,sLAAsL;IACtL,oKAAoK;IACpK,oOAAoO;IACpO,8VAA8V;IAC9V,EAAE;IACF,yBAAyB;IACzB,EAAE;IACF,8JAA8J;IAC9J,8NAA8N;IAC9N,qKAAqK;IACrK,sKAAsK;IACtK,yMAAyM;IACzM,6OAA6O;IAC7O,EAAE;IACF,uBAAuB;IACvB,EAAE;IACF,0SAA0S;IAC1S,uaAAua;IACva,uTAAuT;IACvT,0VAA0V;IAC1V,4JAA4J;IAC5J,wKAAwK;IACxK,6KAA6K;IAC7K,gJAAgJ;IAChJ,6GAA6G;IAC7G,oOAAoO;IACpO,iNAAiN;IACjN,EAAE;IACF,0BAA0B;IAC1B,EAAE;IACF,wOAAwO;IACxO,mPAAmP;IACnP,wMAAwM;IACxM,uJAAuJ;IACvJ,EAAE;IACF,mBAAmB;IACnB,EAAE;IACF,qLAAqL;IACrL,0GAA0G;IAC1G,yIAAyI;IACzI,qMAAqM;IACrM,uNAAuN;IACvN,yMAAyM;IACzM,0JAA0J;IAC1J,EAAE;IACF,iBAAiB;IACjB,EAAE;IACF,kRAAkR;IAClR,gMAAgM;IAChM,uHAAuH;IACvH,8HAA8H;IAC9H,kRAAkR;IAClR,EAAE;IACF,iBAAiB;IACjB,EAAE;IACF,gKAAgK;IAChK,kKAAkK;IAClK,8JAA8J;IAC9J,gPAAgP;IAChP,0KAA0K;IAC1K,+MAA+M;IAC/M,yMAAyM;IACzM,8MAA8M;IAC9M,iKAAiK;IACjK,oKAAoK;CACrK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@excitedjs/dreamux",
|
|
3
|
-
"version": "0.12.1-beta.
|
|
3
|
+
"version": "0.12.1-beta.50",
|
|
4
4
|
"description": "Codex-host server — single-session MVP. One node process hosts N dispatchers, each binding 1 Feishu bot + 1 Codex thread.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -1,13 +1,46 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dispatcher
|
|
3
|
-
description: Use from a Dreamux dispatcher thread when bounded repository work should be
|
|
3
|
+
description: Use from a Dreamux dispatcher thread when bounded repository work should be scheduled to a TeamMate. The server-hosted TeamMate MCP (schedule, list_tasks, get_task, pull_result) is the primary scheduled-task interface; the tm CLI is the labeled fallback that runs a repo-local teammate to completion today. Applies to scheduling, tracking, retrieving, spawning, sending, waiting, resuming, recovering, or summarizing teammate work.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Dispatcher
|
|
7
7
|
|
|
8
|
-
Use this skill only from a Dreamux dispatcher session.
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
Use this skill only from a Dreamux dispatcher session. The dispatcher delegates
|
|
9
|
+
bounded repository work to TeamMates and reports verified results back to the
|
|
10
|
+
source chat.
|
|
11
|
+
|
|
12
|
+
## TeamMate Interface
|
|
13
|
+
|
|
14
|
+
There are two ways to reach a TeamMate. Pick by what you need, not by habit.
|
|
15
|
+
|
|
16
|
+
- **Server-hosted TeamMate MCP — the primary interface.** Dreamux injects a
|
|
17
|
+
dispatcher-scoped `teammate` MCP server with these tools:
|
|
18
|
+
- `schedule` — accept a task into the server-owned ledger; returns
|
|
19
|
+
immediately with an accepted task id.
|
|
20
|
+
- `list_tasks` — list this dispatcher's tasks and their statuses.
|
|
21
|
+
- `get_task` — fetch one task in full, including result, delivery state, and
|
|
22
|
+
history.
|
|
23
|
+
- `pull_result` — pull a retained result; the fallback when push delivery
|
|
24
|
+
failed.
|
|
25
|
+
|
|
26
|
+
**Phase 1 boundary:** `schedule` records the task and returns an accepted id,
|
|
27
|
+
but autonomous worker execution and completion delivery are runtime-specific
|
|
28
|
+
follow-up and may not run a scheduled task to completion yet. Treat a
|
|
29
|
+
scheduled task as accepted ledger state, not as a guaranteed executed result.
|
|
30
|
+
When you need an executed result right now, use the tm fallback below.
|
|
31
|
+
|
|
32
|
+
The persistent ledger is the source of truth. When a task does complete, any
|
|
33
|
+
completion delivery into the dispatcher is a best-effort wake-up, not the
|
|
34
|
+
reliable result contract — confirm and re-read results with `get_task` /
|
|
35
|
+
`pull_result` rather than relying on a delivered notification arriving.
|
|
36
|
+
|
|
37
|
+
- **tm CLI — the labeled fallback.** Dreamux hosts the dispatcher Codex
|
|
38
|
+
app-server and exposes `tm` on the dispatcher `PATH`. `tm` is the path that
|
|
39
|
+
actually spawns and runs a repo-local teammate to completion today, owns
|
|
40
|
+
repository worktrees and live session history, and is the surface for legacy
|
|
41
|
+
diagnostics. Use it for executed repository work and recovery while
|
|
42
|
+
autonomous MCP execution is still follow-up. The rest of this skill and its
|
|
43
|
+
references are the operational manual for that fallback.
|
|
11
44
|
|
|
12
45
|
## Router Posture
|
|
13
46
|
|
|
@@ -28,6 +61,9 @@ repo. It does not investigate that repo itself.
|
|
|
28
61
|
|
|
29
62
|
## Boundaries
|
|
30
63
|
|
|
64
|
+
These govern the tm fallback path. For the primary MCP path, call the injected
|
|
65
|
+
`teammate` MCP tools directly.
|
|
66
|
+
|
|
31
67
|
- Invoke bare `tm` from the dispatcher environment `PATH`. Dreamux injects its
|
|
32
68
|
package `bin/` directory into the dispatcher app-server PATH.
|
|
33
69
|
- Do not use `npx`, `npm exec --package @excitedjs/tm`, or a version-qualified
|
|
@@ -39,11 +75,12 @@ repo. It does not investigate that repo itself.
|
|
|
39
75
|
installed or authenticated in this environment is not a usable choice. State
|
|
40
76
|
`--engine` explicitly so the selection is intentional rather than inherited
|
|
41
77
|
from a tm version default.
|
|
42
|
-
- Do not call dreamux admin APIs to create or recover teammate state.
|
|
43
|
-
server
|
|
78
|
+
- Do not call dreamux admin APIs directly to create or recover teammate state.
|
|
79
|
+
Reach server-owned TeamMate task state only through the `teammate` MCP tools;
|
|
80
|
+
reach live tm sessions only through `tm`.
|
|
44
81
|
- Do not infer the target repository from the dispatcher cwd unless the user or
|
|
45
82
|
operator explicitly made that cwd the requested repo.
|
|
46
|
-
- Do not ask a
|
|
83
|
+
- Do not ask a TeamMate to schedule or spawn another TeamMate.
|
|
47
84
|
|
|
48
85
|
## When To Delegate
|
|
49
86
|
|
|
@@ -86,8 +123,9 @@ use the `team-dev-workflow` skill, which layers methodology on top of this one.
|
|
|
86
123
|
A reply to the source chat that asserts an outcome must be verifiable from this
|
|
87
124
|
turn's tool calls.
|
|
88
125
|
|
|
89
|
-
- Report only what
|
|
90
|
-
|
|
126
|
+
- Report only what the TeamMate interface returned, whether a `teammate` MCP
|
|
127
|
+
tool result or a `tm` verb. Do not invent a teammate result that was not
|
|
128
|
+
produced by one of them.
|
|
91
129
|
- Verify any command, flag, or path before naming it; if you cannot verify it
|
|
92
130
|
this turn, say so rather than guessing a name.
|
|
93
131
|
- Translate dispatcher-internal identifiers into plain language before the
|
|
@@ -99,6 +137,13 @@ turn's tool calls.
|
|
|
99
137
|
|
|
100
138
|
## State Boundary
|
|
101
139
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
140
|
+
Two state owners, kept distinct:
|
|
141
|
+
|
|
142
|
+
- The Dreamux server owns the TeamMate **task ledger** behind the `teammate`
|
|
143
|
+
MCP — scheduled task records, statuses, retained results, and delivery state.
|
|
144
|
+
Read it with `list_tasks`, `get_task`, and `pull_result`.
|
|
145
|
+
- `tm` owns live tm **session** state — teammate liveness, worktrees, and
|
|
146
|
+
resumable session history (see `references/inspect-and-resume.md`).
|
|
147
|
+
|
|
148
|
+
Do not conflate the two. Recovering a tm session is not the same as reading a
|
|
149
|
+
server task record, and the server does not own tm session liveness.
|
|
@@ -56,6 +56,7 @@ dreamux config show
|
|
|
56
56
|
- `codex-app-server/<dispatcher-id>.stderr.log`
|
|
57
57
|
- `feishu-channel/<dispatcher-id>.log`
|
|
58
58
|
- `feishu-mcp/<dispatcher-id>.log`
|
|
59
|
+
- `teammate-mcp/<dispatcher-id>.log`
|
|
59
60
|
|
|
60
61
|
## Common Symptoms
|
|
61
62
|
|
|
@@ -64,7 +65,8 @@ dreamux config show
|
|
|
64
65
|
| Dispatcher does not start | `dreamux doctor`, dispatcher cwd exists, Codex auth exists, bundled skill symlinks are readable. |
|
|
65
66
|
| Inbound accepted but no reply | Dispatcher status, Codex app-server log, whether the turn is still active. |
|
|
66
67
|
| Restart did not announce recovery | `dreamux daemon restart --notify-resumed --dispatcher <id>` was used, and the dispatcher resumed an existing thread. |
|
|
67
|
-
|
|
|
68
|
+
| TeamMate scheduling/retrieval fails | The `teammate` MCP server is injected into the dispatcher runtime; check `teammate-mcp/<dispatcher-id>.log` and that `~/.dreamux/state/<dispatcher-id>/teammate/` is readable. |
|
|
69
|
+
| `tm` not found inside dispatcher (fallback path) | The tm CLI is the labeled local-execution fallback. Confirm the Dreamux package `bin/` directory is on dispatcher process `PATH`; rerun `dreamux doctor`. |
|
|
68
70
|
| Skill changes did not appear | Verify `<dispatcher cwd>/.codex/skills/<name>` is a symlink to the installed Dreamux package skill directory. |
|
|
69
71
|
| Skill path is a real file or directory | Dreamux leaves it untouched. If this is an intentional override, keep it; otherwise rename or remove it and restart the dispatcher. |
|
|
70
72
|
| Skill symlink is broken after an upgrade | Restart the dispatcher or rerun `dreamux onboard`; startup recreates stale or broken bundled skill symlinks. |
|
|
@@ -7,7 +7,8 @@ description: Coordinate multi-teammate software development workflows from a Dre
|
|
|
7
7
|
|
|
8
8
|
Use this skill when the dispatcher is coordinating people or teammates around a
|
|
9
9
|
software change. It is methodology layered on top of the `dispatcher` skill:
|
|
10
|
-
`dispatcher` owns
|
|
10
|
+
`dispatcher` owns the TeamMate interface — the primary server-hosted TeamMate
|
|
11
|
+
MCP and the labeled tm fallback — while this skill owns review, design, merge,
|
|
11
12
|
and unblock workflow.
|
|
12
13
|
|
|
13
14
|
## Confirm Scope
|