n2n-nexus 0.8.2 → 0.9.0
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/CHANGELOG.md +39 -0
- package/CONTRIBUTING.md +49 -0
- package/README.md +157 -77
- package/SECURITY.md +37 -0
- package/build/cli/client-command.js +58 -0
- package/build/cli/doctor.js +58 -8
- package/build/cli/entry.js +5 -0
- package/build/cli/hook.js +104 -16
- package/build/cli/install.js +37 -13
- package/build/cli/mcp-config.js +16 -12
- package/build/client/discovery.js +115 -0
- package/build/client/nexus-client.js +8 -2
- package/build/contract.js +69 -0
- package/build/index.js +12 -18
- package/build/server/nexus.js +63 -35
- package/contract/errors.json +52 -0
- package/contract/hook.json +156 -0
- package/contract/tools.json +2812 -0
- package/docs/ARCHITECTURE.md +142 -108
- package/docs/ARCHITECTURE_zh.md +144 -110
- package/docs/ASSISTANT_GUIDE.md +5 -4
- package/docs/ASSISTANT_GUIDE_zh.md +134 -0
- package/docs/MEETING_MINUTES_2025-12-29.md +166 -0
- package/docs/README_zh.md +159 -79
- package/docs/TOOLS_REFERENCE.md +404 -0
- package/docs/discussion_2025-12-29.md +727 -0
- package/llms.txt +16 -5
- package/package.json +12 -8
- package/build/cli/autostart.js +0 -64
- package/build/config/cli.js +0 -8
- package/build/config/paths.js +0 -38
- package/build/constants.js +0 -18
- package/build/daemon/hook-contract.js +0 -68
- package/build/daemon/index.js +0 -57
- package/build/daemon/rate-limit.js +0 -62
- package/build/daemon/server.js +0 -862
- package/build/daemon/tool-outputs.js +0 -180
- package/build/daemon/tools.js +0 -326
- package/build/storage/agents.js +0 -227
- package/build/storage/docs.js +0 -81
- package/build/storage/events.js +0 -31
- package/build/storage/fs-utils.js +0 -88
- package/build/storage/global-messages.js +0 -44
- package/build/storage/index.js +0 -141
- package/build/storage/migrations.js +0 -87
- package/build/storage/paths.js +0 -23
- package/build/storage/projects.js +0 -53
- package/build/storage/registry.js +0 -355
- package/build/storage/sqlite-meeting.js +0 -323
- package/build/storage/sqlite.js +0 -275
- package/build/storage/tasks.js +0 -138
- package/build/types.js +0 -1
- package/build/utils/async-rwlock.js +0 -64
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
# n2n-nexus tools reference
|
|
2
|
+
|
|
3
|
+
This document describes the MCP tools exposed by the n2n-nexus adapter. Tool calls are forwarded to the host (`n2n-nexus-host`) running at `NEXUS_ENDPOINT`.
|
|
4
|
+
|
|
5
|
+
Parameter tables below are derived from `contract/tools.json`, the JSON Schema the host serves through `GET /api/tools` and validates every call against before a handler runs. Invalid arguments are rejected with a descriptive error (`Invalid arguments for <tool>: ...`); keys the schema does not declare are dropped before validation.
|
|
6
|
+
|
|
7
|
+
## Conventions
|
|
8
|
+
|
|
9
|
+
- Every successful result is returned twice: as `structuredContent` (a JSON object) and as the same JSON in a text block for clients that only read text. Tools that return data (`search_projects`, `get_global_topology`, `get_project`, `read_messages`, `list_events`, `get_global_strategy`, `list_global_docs`, `get_global_doc`, `list_meetings`, `get_task`, `list_tasks`, `peers`, `read`, `set_profile`) also publish an `outputSchema`; acknowledgement-only tools do not publish one, to keep `tools/list` small. The result shapes are the `outputSchema` entries in `contract/tools.json`; the host validates every result against them.
|
|
10
|
+
- Calls are rate limited per instance (default 20 per second, burst 60; `rateLimit` and `rateBurst` in the host's `settings.json`). Over the limit a call fails with "Rate limit exceeded ... retry after Ns"; retry after that delay.
|
|
11
|
+
- Every tool has a display `title` (for example "Delete Project") for client UIs.
|
|
12
|
+
- Every tool carries MCP annotations: `readOnlyHint`, `destructiveHint`, `idempotentHint` and `openWorldHint: false` (all tools act only on the host). Per the MCP definition a tool is non-destructive only when its updates are purely additive. Read tools are marked read-only. `start_meeting`, `create_task`, `send_message`, `send` and `reply` only add data and are non-destructive; `update_task` is marked non-destructive and idempotent too. `listen`, `set_profile`, `sync_project_assets`, `update_project`, `upload_project_asset`, `rename_project`, `sync_global_doc`, `update_global_strategy`, `end_meeting`, `archive_meeting`, `reopen_meeting`, `cancel_task`, `host_maintenance` and `host_delete_project` rewrite or remove existing state and are marked destructive, so clients can ask for confirmation. `read_messages` and `read` are not read-only because they advance the caller's own unread state, but they are non-destructive since no shared data changes.
|
|
13
|
+
- Every adapter has an instance ID (`NEXUS_INSTANCE_ID`, `--id`, or `mcp-<hostname>-<hash of the working directory>-<IDE name>` by default, where the IDE name is the MCP client name from the request's `io.modelcontextprotocol/clientInfo` or, for 2025-era clients, from `initialize`). Read cursors and meeting initiator permissions are keyed on it, so it stays the same across restarts of the same IDE in the same workspace while two IDEs on one workspace stay distinct. The adapter sends it as `instanceId` with every call; `read_messages` fails without one.
|
|
14
|
+
- Project IDs should follow `[prefix]_[name]`, for example `web_example.com`, `api_user-auth`, or `mcp_nexus`.
|
|
15
|
+
- All project write tools run synchronously and return their result directly. The task tools (`create_task`, `get_task`, `list_tasks`, `update_task`, `cancel_task`) track work that assistants manage themselves.
|
|
16
|
+
- Project tools take `projectId` explicitly.
|
|
17
|
+
- `host_delete_project` is destructive and irreversible.
|
|
18
|
+
|
|
19
|
+
## Shared object shapes
|
|
20
|
+
|
|
21
|
+
### Project manifest
|
|
22
|
+
|
|
23
|
+
Used by `sync_project_assets` and partially by `update_project`.
|
|
24
|
+
|
|
25
|
+
| Field | Type | Required by MCP schema | Notes |
|
|
26
|
+
| --- | --- | --- | --- |
|
|
27
|
+
| `id` | string | yes | Project ID. Cannot be changed through `update_project`; use `rename_project`. |
|
|
28
|
+
| `name` | string | yes | Human-readable project name. |
|
|
29
|
+
| `description` | string | yes | Project summary. |
|
|
30
|
+
| `techStack` | string[] | yes | Technologies used by the project. |
|
|
31
|
+
| `relations` | object[] | yes | Project relationships. TypeScript shape is `{ targetId, type }`, where `type` is `dependency`, `parent`, `child`, or `related`. |
|
|
32
|
+
| `repositoryUrl` | string | yes | Source repository URL. |
|
|
33
|
+
| `localPath` | string | yes | Local filesystem path for the project. |
|
|
34
|
+
| `endpoints` | object[] | yes | TypeScript shape is `{ name, url, description }`. |
|
|
35
|
+
| `apiSpec` | object[] | yes | TypeScript shape is `{ method, path, summary }`. |
|
|
36
|
+
| `billing` | object | no | Optional TypeScript field: `{ plain, price }`. |
|
|
37
|
+
| `lastUpdated` | string | no | Stored manifest field. |
|
|
38
|
+
| `apiDependencies` | object | no | Optional map of project ID to version constraint. |
|
|
39
|
+
| `gatewayCompatibility` | string | no | Optional gateway version compatibility string. |
|
|
40
|
+
| `api_versions` | object | no | Optional feature-level API version map. |
|
|
41
|
+
| `feature_tier` | string | no | Optional `standard`, `advanced`, or `team`. |
|
|
42
|
+
|
|
43
|
+
## Project asset management
|
|
44
|
+
|
|
45
|
+
### `sync_project_assets`
|
|
46
|
+
|
|
47
|
+
Sync a full project manifest and internal docs.
|
|
48
|
+
|
|
49
|
+
| Parameter | Type | Required | Notes |
|
|
50
|
+
| --- | --- | --- | --- |
|
|
51
|
+
| `manifest` | Project manifest | yes | Full manifest object. See [Project manifest](#project-manifest). |
|
|
52
|
+
| `internalDocs` | string | yes | Markdown implementation guide or internal notes. |
|
|
53
|
+
|
|
54
|
+
Behavior:
|
|
55
|
+
|
|
56
|
+
- Saves the manifest and project docs.
|
|
57
|
+
- Returns `{ ok: true, projectId }`.
|
|
58
|
+
|
|
59
|
+
### `upload_project_asset`
|
|
60
|
+
|
|
61
|
+
Upload a binary or text asset into a project's asset store.
|
|
62
|
+
|
|
63
|
+
| Parameter | Type | Required | Notes |
|
|
64
|
+
| --- | --- | --- | --- |
|
|
65
|
+
| `projectId` | string | yes | Target project. Must exist. |
|
|
66
|
+
| `fileName` | string | yes | Filename only. Unsafe path characters are replaced; `.` is rejected. |
|
|
67
|
+
| `base64Content` | string | yes | Base64-encoded file content. |
|
|
68
|
+
|
|
69
|
+
Behavior:
|
|
70
|
+
|
|
71
|
+
- Stores the file with the project in the host database, replacing an asset with the same name. Renaming or deleting the project renames or deletes its assets too.
|
|
72
|
+
- Returns `{ ok: true, projectId, fileName }` with the sanitized file name.
|
|
73
|
+
|
|
74
|
+
### `update_project`
|
|
75
|
+
|
|
76
|
+
Patch fields on an existing project manifest.
|
|
77
|
+
|
|
78
|
+
| Parameter | Type | Required | Notes |
|
|
79
|
+
| --- | --- | --- | --- |
|
|
80
|
+
| `projectId` | string | yes | Project to update. |
|
|
81
|
+
| `patch` | object | yes | Partial manifest fields to update. Unknown fields and `id` are rejected. |
|
|
82
|
+
|
|
83
|
+
Behavior:
|
|
84
|
+
|
|
85
|
+
- Returns `{ ok: true, projectId }`.
|
|
86
|
+
- To change a project ID, use `rename_project`.
|
|
87
|
+
|
|
88
|
+
### `rename_project`
|
|
89
|
+
|
|
90
|
+
Rename a project ID and cascade relation updates.
|
|
91
|
+
|
|
92
|
+
| Parameter | Type | Required | Notes |
|
|
93
|
+
| --- | --- | --- | --- |
|
|
94
|
+
| `oldId` | string | yes | Existing project ID. |
|
|
95
|
+
| `newId` | string | yes | New project ID. |
|
|
96
|
+
|
|
97
|
+
Behavior:
|
|
98
|
+
|
|
99
|
+
- Fails if `oldId` does not exist.
|
|
100
|
+
- Returns `{ ok: true, oldId, newId }`.
|
|
101
|
+
|
|
102
|
+
### `search_projects`
|
|
103
|
+
|
|
104
|
+
Search the project registry.
|
|
105
|
+
|
|
106
|
+
| Parameter | Type | Required | Default | Notes |
|
|
107
|
+
| --- | --- | --- | --- | --- |
|
|
108
|
+
| `query` | string | yes | | Matches project ID, name, or summary. |
|
|
109
|
+
| `limit` | integer | no | `10` | Maximum number of returned projects (1–200). |
|
|
110
|
+
|
|
111
|
+
### `get_global_topology`
|
|
112
|
+
|
|
113
|
+
Read the project topology.
|
|
114
|
+
|
|
115
|
+
| Parameter | Type | Required | Notes |
|
|
116
|
+
| --- | --- | --- | --- |
|
|
117
|
+
| `projectId` | string | no | When provided, returns a focused subgraph for that project. Without it, returns a global project list and stats. |
|
|
118
|
+
|
|
119
|
+
### `get_project`
|
|
120
|
+
|
|
121
|
+
Read one project's manifest and internal docs.
|
|
122
|
+
|
|
123
|
+
| Parameter | Type | Required | Default | Notes |
|
|
124
|
+
| --- | --- | --- | --- | --- |
|
|
125
|
+
| `projectId` | string | yes | | Project to read. |
|
|
126
|
+
| `includeDocs` | boolean | no | `true` | Set `false` to skip the internal docs. |
|
|
127
|
+
|
|
128
|
+
Behavior:
|
|
129
|
+
|
|
130
|
+
- Returns `{ manifest, internalDocs? }`.
|
|
131
|
+
- Fails if the project does not exist.
|
|
132
|
+
|
|
133
|
+
## Messaging and collaboration
|
|
134
|
+
|
|
135
|
+
### Direct messages between conversations
|
|
136
|
+
|
|
137
|
+
Every Claude Code and Codex conversation is one session with ID `claude:<session id>` or `codex:<session id>`, taken from the client. The hooks that `n2n-nexus install <claude|codex>` writes create the session and keep its status current; a sub-agent shares its parent conversation's session. Resuming a conversation keeps its session. A new conversation in the same client, such as after `/clear` in Claude Code, is a new session; Claude Code also ends the old one, which goes offline.
|
|
138
|
+
|
|
139
|
+
The six tools below identify their caller from the MCP request's `_meta`, never from arguments: Claude Code attaches `claudecode/toolUseId`, which its PreToolUse hook bound to the conversation just before the call; Codex attaches `sessionId`. Other clients, conversations without the hooks, or a binding older than five minutes get the error `Direct messaging needs Claude Code or Codex with n2n-nexus hooks installed. Run: n2n-nexus install <claude|codex>`. Every other tool ignores the caller.
|
|
140
|
+
|
|
141
|
+
| Tool | Parameters | Result and behavior |
|
|
142
|
+
| --- | --- | --- |
|
|
143
|
+
| `peers` | `includeOffline?: boolean = false` | `{ self: Profile, peers: Profile[] }`; the other sessions that are not offline, most recent first. With `includeOffline`, also the offline ones active in the last 24 hours. |
|
|
144
|
+
| `send` | `to: string`, `text: string` (1–32000 chars), `notifyWhenIdle?: boolean = false` | `{ messageId, to: { id, name, status } }`. `to` is a session ID (any status) or the name of a session that is not offline; you cannot message yourself. Offline recipients get the message when they resume. With `notifyWhenIdle`, you get one notice when the recipient next ends its turn, starts listening or goes offline (the subscription lapses after 24 hours). |
|
|
145
|
+
| `read` | `count?: integer = 10` (1–50) | `{ messages: [{ messageId, from: { id, name }, replyTo, text, createdAt }], remaining }`; unread messages oldest first, marked read. |
|
|
146
|
+
| `reply` | `messageId: string`, `text: string` (1–32000 chars) | Same result as `send`. The message must have been sent to you; the reply goes to its sender with `replyTo` set to it. |
|
|
147
|
+
| `listen` | `on: boolean` | `{ listening }`. While on, each time the conversation ends a turn its Stop hook waits up to 590 seconds and continues the conversation when a message or notice arrives. Pressing Esc in the client ends one wait. |
|
|
148
|
+
| `set_profile` | `name?: string` (1–48 of `A–Z a–z 0–9 . _ @ # -`), `note?: string` (≤ 200 chars); at least one | `{ profile }`. Names are unique among sessions that are not offline. |
|
|
149
|
+
|
|
150
|
+
`Profile` contains `id`, `name`, `client` (`claude` or `codex`), `cwd`, `note`, `status` and `lastActiveAt`. A session is first named `<client>@<working directory name>`, with `#2`, `#3`, … when that name is taken by a session that is not offline. `status` is `working` (the user sent a prompt or a tool ran), `idle` (the turn ended), `listening` (waiting in listen mode) or `offline` (the conversation ended). Clients do not always report the end of a conversation, so an `idle` or `working` session without any activity for 30 minutes becomes `offline` too; its next event brings it back. Only a `listening` session answers right away; `idle` and `working` ones see a message when their user next sends a prompt or they next call a tool.
|
|
151
|
+
|
|
152
|
+
Delivery. The recipient's hooks announce new messages; notifications carry only the sender, the time and the first line (up to 100 characters), and the text arrives through `read`, as tool output:
|
|
153
|
+
|
|
154
|
+
| Client event | What the recipient sees |
|
|
155
|
+
| --- | --- |
|
|
156
|
+
| Conversation started | Its own name and ID, the other sessions that are not offline (up to five listed), which of them can answer right away, and how to use `peers`, `send` and `read`. |
|
|
157
|
+
| Prompt submitted | Count of unread messages, up to five listed, and pending notices. |
|
|
158
|
+
| After each tool call | Only messages and notices not announced yet. |
|
|
159
|
+
| Turn about to end | If anything is unread, the turn continues once with the announcement. |
|
|
160
|
+
| Listening | The wait ends as soon as something new arrives, and the conversation continues with it. |
|
|
161
|
+
| Idle (turn ended) | A background wait started by the Stop hook (`n2n-nexus hook <client> --wait`, up to an hour) starts a new turn with the announcement: Claude Code through an `asyncRewake` hook (exit code 2), Codex through `codex queue --thread <session id>` (`NEXUS_CODEX_COMMAND` overrides the `codex` command). In an unattended Claude session (`claude -p`, `CLAUDE_CODE_SESSION_ATTENDED=0`) the hook returns at once, since `claude -p` waits for it before exiting. Meanwhile the session shows as `listening`; any new activity in the conversation ends the wait. Codex starts the queued turn only for a conversation loaded in the running Codex app, and the wait ends when Codex quits. |
|
|
162
|
+
| Automatic turn limit | Waking, a listening Stop and a Stop held open for messages each count as an automatic turn; the announcement says `Automatic turn n of N`. After `maxAutoTurns` (host `settings.json`, default 8) of them since the user's last prompt, messages are still stored but no longer wake or hold the conversation; the user's next prompt announces them and starts counting again. A prompt within a minute of a wake is the woken turn starting and does not reset the count. |
|
|
163
|
+
|
|
164
|
+
Unread messages expire after 24 hours; the sender then gets a notice. Notices also report `notifyWhenIdle` results.
|
|
165
|
+
|
|
166
|
+
HTTP clients: hooks call `POST /api/hook` with `{ client: "claude" | "codex", input }`, where `input` holds the hook's stdin fields `hook_event_name`, `session_id`, `cwd`, `stop_hook_active`, `tool_use_id`, `tool_name`, `source` and `reason`; the response is `{ output }`, printed by the hook when not null. Tool calls name their session with `caller` beside `tool`, `args` and `instanceId` in `POST /api/tools/call`: `{ client: "claude", toolUseId }` or `{ client: "codex", sessionId }`. These identify conversations within the trusted local host; they are not credentials: any process of the same operating-system user can send them (see the local trust model in [SECURITY.md](../SECURITY.md)).
|
|
167
|
+
|
|
168
|
+
### `send_message`
|
|
169
|
+
|
|
170
|
+
Post to a meeting or to global chat. For a message to one conversation, use `send`.
|
|
171
|
+
|
|
172
|
+
| Parameter | Type | Required | Notes |
|
|
173
|
+
| --- | --- | --- | --- |
|
|
174
|
+
| `message` | string | yes | Message body. |
|
|
175
|
+
| `category` | string | no | One of `MEETING_START`, `PROPOSAL`, `DECISION`, `UPDATE`, or `CHAT`. |
|
|
176
|
+
| `meetingId` | string | no | Target meeting. Must be active. |
|
|
177
|
+
|
|
178
|
+
Behavior:
|
|
179
|
+
|
|
180
|
+
- With `meetingId`, the message goes to that meeting.
|
|
181
|
+
- Otherwise, if a meeting is active, the message goes to it.
|
|
182
|
+
- Otherwise it is written to global chat.
|
|
183
|
+
- Result: `{ ok: true, sentTo: "meeting" | "global", meetingId?, messageId?, message }`; global chat message IDs are numbers.
|
|
184
|
+
|
|
185
|
+
### `read_messages`
|
|
186
|
+
|
|
187
|
+
Read recent or unread messages.
|
|
188
|
+
|
|
189
|
+
| Parameter | Type | Required | Default | Notes |
|
|
190
|
+
| --- | --- | --- | --- | --- |
|
|
191
|
+
| `count` | integer | no | `10` | Number of messages to read (1–500). |
|
|
192
|
+
| `meetingId` | string | no | | When provided, reads from that meeting. Otherwise reads from global logs. |
|
|
193
|
+
|
|
194
|
+
Behavior:
|
|
195
|
+
|
|
196
|
+
- Both global and meeting reads are incremental per adapter instance: each call returns only messages not yet returned to that instance, oldest first, and advances the cursor.
|
|
197
|
+
- Needs the calling instance: a call without `instanceId` fails with `read_messages needs an instanceId: unread cursors are kept per instance.` The MCP adapter always sends one.
|
|
198
|
+
|
|
199
|
+
### `list_events`
|
|
200
|
+
|
|
201
|
+
Read the structured activity log.
|
|
202
|
+
|
|
203
|
+
| Parameter | Type | Required | Default | Notes |
|
|
204
|
+
| --- | --- | --- | --- | --- |
|
|
205
|
+
| `limit` | integer | no | `20` | Maximum number of events, newest first (1–500). |
|
|
206
|
+
| `action` | string | no | | Exact action (`meeting.end`) or prefix (`project`, `meeting`). |
|
|
207
|
+
|
|
208
|
+
Behavior:
|
|
209
|
+
|
|
210
|
+
- Every state change made through the host's tools is recorded: `project.sync`, `project.update`, `project.rename`, `project.delete`, `project.asset`, `doc.sync`, `strategy.update`, `meeting.start`, `meeting.end`, `meeting.archive`, `meeting.reopen`, `maintenance.prune`, `maintenance.clear`.
|
|
211
|
+
- Each event carries `timestamp`, `actor` (instance ID), `action`, optional `target` and `detail`.
|
|
212
|
+
|
|
213
|
+
### `update_global_strategy`
|
|
214
|
+
|
|
215
|
+
Overwrite the master strategy document.
|
|
216
|
+
|
|
217
|
+
| Parameter | Type | Required | Notes |
|
|
218
|
+
| --- | --- | --- | --- |
|
|
219
|
+
| `content` | string | yes | Full Markdown content for the global strategy document. |
|
|
220
|
+
|
|
221
|
+
Behavior:
|
|
222
|
+
|
|
223
|
+
- Replaces the stored strategy document. Read it back with `get_global_strategy`.
|
|
224
|
+
|
|
225
|
+
### `get_global_strategy`
|
|
226
|
+
|
|
227
|
+
Read the master strategy document. No parameters.
|
|
228
|
+
|
|
229
|
+
Behavior:
|
|
230
|
+
|
|
231
|
+
- Returns `{ content }`.
|
|
232
|
+
|
|
233
|
+
### `list_global_docs`
|
|
234
|
+
|
|
235
|
+
List global shared documents. No parameters.
|
|
236
|
+
|
|
237
|
+
Behavior:
|
|
238
|
+
|
|
239
|
+
- Returns `{ count, docs: [{ docId, title, lastUpdated, updatedBy }] }`, most recently updated first.
|
|
240
|
+
|
|
241
|
+
### `get_global_doc`
|
|
242
|
+
|
|
243
|
+
Read one global shared document.
|
|
244
|
+
|
|
245
|
+
| Parameter | Type | Required | Notes |
|
|
246
|
+
| --- | --- | --- | --- |
|
|
247
|
+
| `docId` | string | yes | Document ID from `list_global_docs`. |
|
|
248
|
+
|
|
249
|
+
Behavior:
|
|
250
|
+
|
|
251
|
+
- Returns `{ docId, title, lastUpdated, updatedBy, content }`.
|
|
252
|
+
- Fails if the document does not exist.
|
|
253
|
+
|
|
254
|
+
### `sync_global_doc`
|
|
255
|
+
|
|
256
|
+
Create or update a shared global document.
|
|
257
|
+
|
|
258
|
+
| Parameter | Type | Required | Notes |
|
|
259
|
+
| --- | --- | --- | --- |
|
|
260
|
+
| `docId` | string | yes | Stable document ID. |
|
|
261
|
+
| `title` | string | yes | Human-readable document title. |
|
|
262
|
+
| `content` | string | yes | Markdown content. |
|
|
263
|
+
|
|
264
|
+
## Meeting management
|
|
265
|
+
|
|
266
|
+
### `list_meetings`
|
|
267
|
+
|
|
268
|
+
List meetings, newest first.
|
|
269
|
+
|
|
270
|
+
| Parameter | Type | Required | Default | Notes |
|
|
271
|
+
| --- | --- | --- | --- | --- |
|
|
272
|
+
| `status` | string | no | | `active`, `closed`, or `archived`. |
|
|
273
|
+
| `limit` | integer | no | `20` | Maximum number of meetings (1–200). |
|
|
274
|
+
|
|
275
|
+
Behavior:
|
|
276
|
+
|
|
277
|
+
- Returns `{ count, activeMeetingId, meetings: [{ id, topic, status, initiator, startTime, endTime?, participants, messageCount, decisionCount, summary? }] }`.
|
|
278
|
+
- Read a meeting's messages with `read_messages(meetingId)`.
|
|
279
|
+
|
|
280
|
+
### `start_meeting`
|
|
281
|
+
|
|
282
|
+
Open a new meeting session.
|
|
283
|
+
|
|
284
|
+
| Parameter | Type | Required | Notes |
|
|
285
|
+
| --- | --- | --- | --- |
|
|
286
|
+
| `topic` | string | yes | Meeting topic. Used to create the meeting record. |
|
|
287
|
+
|
|
288
|
+
### `end_meeting`
|
|
289
|
+
|
|
290
|
+
Close and lock a meeting.
|
|
291
|
+
|
|
292
|
+
| Parameter | Type | Required | Notes |
|
|
293
|
+
| --- | --- | --- | --- |
|
|
294
|
+
| `meetingId` | string | no | Meeting to close. If omitted, the active meeting is used. |
|
|
295
|
+
| `summary` | string | no | Optional closing summary. |
|
|
296
|
+
|
|
297
|
+
### `archive_meeting`
|
|
298
|
+
|
|
299
|
+
Archive a closed meeting.
|
|
300
|
+
|
|
301
|
+
| Parameter | Type | Required | Notes |
|
|
302
|
+
| --- | --- | --- | --- |
|
|
303
|
+
| `meetingId` | string | yes | Meeting to archive. |
|
|
304
|
+
|
|
305
|
+
### `reopen_meeting`
|
|
306
|
+
|
|
307
|
+
Reactivate a closed or archived meeting.
|
|
308
|
+
|
|
309
|
+
| Parameter | Type | Required | Notes |
|
|
310
|
+
| --- | --- | --- | --- |
|
|
311
|
+
| `meetingId` | string | yes | Meeting to reopen. |
|
|
312
|
+
|
|
313
|
+
Behavior:
|
|
314
|
+
|
|
315
|
+
- Only the meeting initiator can end, archive or reopen a meeting.
|
|
316
|
+
|
|
317
|
+
## Task management
|
|
318
|
+
|
|
319
|
+
### `create_task`
|
|
320
|
+
|
|
321
|
+
Create a background task.
|
|
322
|
+
|
|
323
|
+
| Parameter | Type | Required | Notes |
|
|
324
|
+
| --- | --- | --- | --- |
|
|
325
|
+
| `source_meeting_id` | string | no | Link the task to a meeting for traceability. The meeting must exist. |
|
|
326
|
+
| `metadata` | object | no | Arbitrary metadata object. |
|
|
327
|
+
| `ttl` | integer | no | Time to live in milliseconds. A pending or running task past its TTL is marked `failed` (`TTL expired`) by the hourly maintenance run; finished tasks are purged after 7 days. |
|
|
328
|
+
|
|
329
|
+
Behavior:
|
|
330
|
+
|
|
331
|
+
- Returns `{ task_id, status, message, task }`.
|
|
332
|
+
|
|
333
|
+
### `get_task`
|
|
334
|
+
|
|
335
|
+
Read task status and result.
|
|
336
|
+
|
|
337
|
+
| Parameter | Type | Required | Notes |
|
|
338
|
+
| --- | --- | --- | --- |
|
|
339
|
+
| `taskId` | string | yes | Task ID returned by `create_task`. |
|
|
340
|
+
|
|
341
|
+
### `list_tasks`
|
|
342
|
+
|
|
343
|
+
List tasks, optionally filtered by status.
|
|
344
|
+
|
|
345
|
+
| Parameter | Type | Required | Default | Notes |
|
|
346
|
+
| --- | --- | --- | --- | --- |
|
|
347
|
+
| `status` | string | no | | One of `pending`, `running`, `completed`, `failed`, or `cancelled`. |
|
|
348
|
+
| `limit` | integer | no | `50` | Maximum number of tasks returned (1–500). |
|
|
349
|
+
|
|
350
|
+
### `update_task`
|
|
351
|
+
|
|
352
|
+
Update a task you created.
|
|
353
|
+
|
|
354
|
+
| Parameter | Type | Required | Notes |
|
|
355
|
+
| --- | --- | --- | --- |
|
|
356
|
+
| `taskId` | string | yes | Task to update. |
|
|
357
|
+
| `status` | string | no | One of `pending`, `running`, `completed`, `failed`, or `cancelled`. |
|
|
358
|
+
| `progress` | number | no | Progress from `0` to `1`. |
|
|
359
|
+
| `result_uri` | string | no | Where the result is. |
|
|
360
|
+
| `error_message` | string | no | Why the task failed. |
|
|
361
|
+
| `metadata` | object | no | Replaces the task's metadata. |
|
|
362
|
+
|
|
363
|
+
Behavior:
|
|
364
|
+
|
|
365
|
+
- Changes only the fields given and the task's update time.
|
|
366
|
+
- Returns the task: `{ id, status, progress, source_meeting_id, metadata, result_uri, error_message, created_at, updated_at, ttl }`.
|
|
367
|
+
- Fails if the task does not exist.
|
|
368
|
+
|
|
369
|
+
### `cancel_task`
|
|
370
|
+
|
|
371
|
+
Cancel a pending or running task.
|
|
372
|
+
|
|
373
|
+
| Parameter | Type | Required | Notes |
|
|
374
|
+
| --- | --- | --- | --- |
|
|
375
|
+
| `taskId` | string | yes | Task to cancel. |
|
|
376
|
+
|
|
377
|
+
## Maintenance
|
|
378
|
+
|
|
379
|
+
### `host_maintenance`
|
|
380
|
+
|
|
381
|
+
Prune or clear the global chat stream.
|
|
382
|
+
|
|
383
|
+
| Parameter | Type | Required | Notes |
|
|
384
|
+
| --- | --- | --- | --- |
|
|
385
|
+
| `action` | string | yes | `prune` or `clear`. |
|
|
386
|
+
| `count` | integer | no | Number of oldest messages to remove for `prune` (default `0`); ignored by `clear`. |
|
|
387
|
+
|
|
388
|
+
Behavior:
|
|
389
|
+
|
|
390
|
+
- Returns `{ ok, removed, remaining }`.
|
|
391
|
+
|
|
392
|
+
### `host_delete_project`
|
|
393
|
+
|
|
394
|
+
Permanently delete a project and its assets.
|
|
395
|
+
|
|
396
|
+
| Parameter | Type | Required | Notes |
|
|
397
|
+
| --- | --- | --- | --- |
|
|
398
|
+
| `projectId` | string | yes | Project to delete. |
|
|
399
|
+
|
|
400
|
+
Behavior:
|
|
401
|
+
|
|
402
|
+
- Fails if the project does not exist.
|
|
403
|
+
- Returns `{ ok: true, projectId }`.
|
|
404
|
+
- This operation is irreversible.
|