@oneie/mcp 0.5.6 → 0.6.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/README.md +58 -17
- package/dist/index.d.ts +16 -3
- package/dist/index.js +24 -4
- package/dist/index.js.map +1 -1
- package/dist/tools/fn.js +5 -7
- package/dist/tools/fn.js.map +1 -1
- package/dist/tools/tasks.d.ts +2 -0
- package/dist/tools/tasks.js +244 -0
- package/dist/tools/tasks.js.map +1 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -27,6 +27,18 @@ npm install -g @oneie/mcp
|
|
|
27
27
|
npx @oneie/mcp
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
## Get a key
|
|
31
|
+
|
|
32
|
+
Mint your own rather than being handed one:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm i -g @oneie/cli
|
|
36
|
+
oneie auth login
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This is a device flow — it opens a browser, you approve, and it mints a key bound
|
|
40
|
+
to you. Keys minted this way carry exactly your own authority and nothing more.
|
|
41
|
+
|
|
30
42
|
## Configure in Claude Code
|
|
31
43
|
|
|
32
44
|
Add to your `.claude/settings.json`:
|
|
@@ -38,29 +50,24 @@ Add to your `.claude/settings.json`:
|
|
|
38
50
|
"command": "npx",
|
|
39
51
|
"args": ["@oneie/mcp"],
|
|
40
52
|
"env": {
|
|
41
|
-
"ONEIE_API_URL": "
|
|
42
|
-
"ONEIE_API_KEY": "
|
|
53
|
+
"ONEIE_API_URL": "https://one.ie",
|
|
54
|
+
"ONEIE_API_KEY": "one-..."
|
|
43
55
|
}
|
|
44
56
|
}
|
|
45
57
|
}
|
|
46
58
|
}
|
|
47
59
|
```
|
|
48
60
|
|
|
49
|
-
Or
|
|
61
|
+
Or against a local dev server, `"ONEIE_API_URL": "http://localhost:4321"`.
|
|
50
62
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
```
|
|
63
|
+
**`ONEIE_API_URL` must be the app origin, not the gateway.** This client calls
|
|
64
|
+
`/api/*` paths, and the gateway serves the substrate unprefixed — pointing at
|
|
65
|
+
`https://api.one.ie` makes every tool 404. `https://one.ie` is the default when the
|
|
66
|
+
variable is unset, so omitting it is safer than guessing.
|
|
67
|
+
|
|
68
|
+
`ONE_API_URL` / `ONE_API_KEY` are accepted as fallbacks; `ONEIE_*` are canonical.
|
|
69
|
+
|
|
70
|
+
Restart the client after editing — tools load at start.
|
|
64
71
|
|
|
65
72
|
## Tools
|
|
66
73
|
|
|
@@ -79,7 +86,7 @@ Or point at production:
|
|
|
79
86
|
| `reveal` | `GET /api/pii/reveal/:uid` | Full memory card for a uid |
|
|
80
87
|
| `forget` | `POST /api/forget` | GDPR erasure of a uid |
|
|
81
88
|
| `frontier` | `GET /api/frontiers` | Unexplored tag clusters |
|
|
82
|
-
| `know` | via `signal("learning:know")` |
|
|
89
|
+
| `know` | via `signal("learning:know")` | **Broken** — `learning:know` is in no registry and has no resolver, so the call dissolves and no hypothesis is written. The shipped harden receiver is `chat:harden` |
|
|
83
90
|
| `highways` | `GET /api/export/highways` | Top weighted paths |
|
|
84
91
|
| `groups` | `GET /api/groups` | List groups (dimension query) |
|
|
85
92
|
| `actors` | `GET /api/actors` | List actors (dimension query) |
|
|
@@ -112,6 +119,40 @@ Or point at production:
|
|
|
112
119
|
| `tasks_link` | Close the loop on a claimed task — append provenance (the /do slug + docs it became) |
|
|
113
120
|
| `own_me` | Generate an ownership invitation link for a registered agent — the human who opens it becomes the owner |
|
|
114
121
|
|
|
122
|
+
### Tasks (the board)
|
|
123
|
+
|
|
124
|
+
`tasks_list` is the read the `/u/<slug>/tasks` page makes, so what you get here is
|
|
125
|
+
what the operator sees in the browser. Use it — not `tasks_mine` — to manage a
|
|
126
|
+
workspace. `tasks_mine` above is the narrower pull: *what matches what I subscribed
|
|
127
|
+
to*, which answers "what next", not "what's on this board".
|
|
128
|
+
|
|
129
|
+
| Tool | What |
|
|
130
|
+
|------|------|
|
|
131
|
+
| `tasks_list` | The board for a workspace — every task, labelled `kind: work \| approval`; filter by status, tag, or name |
|
|
132
|
+
| `tasks_create` | Add a task |
|
|
133
|
+
| `tasks_subtask` | Add a task under a parent |
|
|
134
|
+
| `tasks_status` | `open` · `picked` · `done` · `verified` · `dissolved` |
|
|
135
|
+
| `tasks_priority` | Rank it |
|
|
136
|
+
| `tasks_tag` | Tag it |
|
|
137
|
+
| `tasks_notes` | Set the body |
|
|
138
|
+
| `tasks_rename` | Retitle it |
|
|
139
|
+
| `tasks_comment` | Thread on it |
|
|
140
|
+
| `tasks_depend` | Make one task wait on another |
|
|
141
|
+
| `tasks_schedule` | Set dates, where dates apply |
|
|
142
|
+
| `tasks_approve` | Resolve an approval row |
|
|
143
|
+
|
|
144
|
+
Two things worth knowing before you debug something that isn't broken:
|
|
145
|
+
|
|
146
|
+
**An empty result is not proof of an empty board.** An authorised call against a
|
|
147
|
+
workspace you don't belong to returns `ok: true` with no rows — indistinguishable
|
|
148
|
+
from "no work queued". Treat zero rows as an unproven connection until a call with
|
|
149
|
+
rows proves otherwise.
|
|
150
|
+
|
|
151
|
+
**Write serially.** Batching `tasks_depend` / `tasks_tag` in one parallel block
|
|
152
|
+
produces spurious `not_found` and `write_failed` responses; the same calls succeed
|
|
153
|
+
on a serial retry with identical arguments. The errors read exactly like a
|
|
154
|
+
permission failure, so the reflex is to go debug authority — retry once first.
|
|
155
|
+
|
|
115
156
|
### Observability
|
|
116
157
|
|
|
117
158
|
| Tool | What |
|
package/dist/index.d.ts
CHANGED
|
@@ -13,18 +13,31 @@ export { fnTools } from "./tools/fn.js";
|
|
|
13
13
|
export { seoTools } from "./tools/seo.js";
|
|
14
14
|
export { viewsTools } from "./tools/views.js";
|
|
15
15
|
export { workflowTools } from "./tools/workflow.js";
|
|
16
|
+
export { tasksTools } from "./tools/tasks.js";
|
|
16
17
|
export declare const MCP_VERSION: string;
|
|
17
18
|
export declare const MCP_TOOLS: {
|
|
18
19
|
substrate: readonly ["signal", "ask", "mark", "warn", "fade", "follow", "select", "recall", "reveal", "forget", "frontier", "know", "highways", "groups", "actors", "things", "paths", "events", "learning"];
|
|
19
|
-
lifecycle: readonly ["auth_agent", "tasks_mine", "tasks_claim", "tasks_link", "sync_agent", "publish_agent", "pull_agent", "unpublish_agent", "list_agents", "agent_history", "rollback_agent", "discover_skill", "register", "pay", "list_skills", "unimport_skill", "own_me", "skill_eval"];
|
|
20
|
+
lifecycle: readonly ["auth_agent", "tasks_mine", "tasks_claim", "tasks_link", "sync_agent", "publish_agent", "pull_agent", "unpublish_agent", "list_agents", "agent_history", "rollback_agent", "discover_skill", "register", "pay", "list_skills", "unimport_skill", "own_me", "skill_eval", "tasks_everywhere"];
|
|
20
21
|
observability: readonly ["stats", "health", "revenue", "frontiers_global", "export_units", "export_highways", "ingest_event", "chat_turn"];
|
|
21
22
|
discovery: readonly ["scaffold_agent", "list_presets", "get_agent"];
|
|
22
23
|
social: readonly ["social_list_posts", "social_create_post", "social_accounts"];
|
|
23
24
|
video: readonly ["create_room", "delete_room", "contact_call", "invite_to_call", "schedule_webinar", "create_session", "quick_call", "start_recording", "start_stream", "video_summary", "get_room_status"];
|
|
24
|
-
broadcast: readonly ["broadcast_create", "broadcast_list", "broadcast_get", "broadcast_send", "newsletter_update"];
|
|
25
|
+
broadcast: readonly ["broadcast_create", "broadcast_list", "broadcast_get", "broadcast_send", "newsletter_update", "segment_list", "segment_get", "segment_preview"];
|
|
25
26
|
messaging: readonly ["message", "chat_send", "chat_broadcast"];
|
|
26
27
|
seo: readonly ["seo_backlinks", "seo_ai_visibility", "seo_research_keywords", "seo_serp", "seo_keyword_metrics", "seo_gsc"];
|
|
27
28
|
views: readonly ["create_view", "list_views"];
|
|
28
|
-
workflow: readonly ["workflow_list", "workflow_get", "workflow_apply_diff", "workflow_run", "workflow_runs"];
|
|
29
|
+
workflow: readonly ["workflow_list", "workflow_get", "workflow_apply_diff", "workflow_run", "workflow_runs", "workflow_validate", "workflow_resolve"];
|
|
30
|
+
tasks: readonly ["tasks_list", "tasks_create", "tasks_status", "tasks_priority", "tasks_tag", "tasks_notes", "tasks_schedule", "tasks_rename", "tasks_comment", "tasks_subtask", "tasks_depend", "tasks_approve"];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* MCP_TOOLS is hand-maintained, and the note above MCP_VERSION records what that
|
|
34
|
+
* costs: a literal nothing forces to move drifts stale and stays wrong for
|
|
35
|
+
* releases. This is the forcing function — `bun run check:tools` fails when the
|
|
36
|
+
* manifest and the router disagree. `fn_*` is excluded because those are
|
|
37
|
+
* generated from FN_MAP at runtime and deliberately absent from the manifest.
|
|
38
|
+
*/
|
|
39
|
+
export declare function toolManifestDrift(): {
|
|
40
|
+
missing: string[];
|
|
41
|
+
extra: string[];
|
|
29
42
|
};
|
|
30
43
|
export declare function createOneRouter(): import("./serve.js").McpRouter;
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ import { fnTools } from "./tools/fn.js";
|
|
|
15
15
|
import { seoTools } from "./tools/seo.js";
|
|
16
16
|
import { viewsTools } from "./tools/views.js";
|
|
17
17
|
import { workflowTools } from "./tools/workflow.js";
|
|
18
|
+
import { tasksTools } from "./tools/tasks.js";
|
|
18
19
|
export { createRouter, serve, apiCall } from "./serve.js";
|
|
19
20
|
export { readEnv } from "./env.js";
|
|
20
21
|
export { substrateTools } from "./tools/substrate.js";
|
|
@@ -28,6 +29,7 @@ export { fnTools } from "./tools/fn.js";
|
|
|
28
29
|
export { seoTools } from "./tools/seo.js";
|
|
29
30
|
export { viewsTools } from "./tools/views.js";
|
|
30
31
|
export { workflowTools } from "./tools/workflow.js";
|
|
32
|
+
export { tasksTools } from "./tools/tasks.js";
|
|
31
33
|
// Read live from package.json rather than a hand-maintained literal — the
|
|
32
34
|
// literal drifted stale for 8+ releases (last touched at 0.4.6, silently
|
|
33
35
|
// wrong ever since) because nothing forced it to move with the real version.
|
|
@@ -35,21 +37,39 @@ const _pkgPath = join(dirname(fileURLToPath(import.meta.url)), "..", "package.js
|
|
|
35
37
|
export const MCP_VERSION = JSON.parse(readFileSync(_pkgPath, "utf8")).version;
|
|
36
38
|
export const MCP_TOOLS = {
|
|
37
39
|
substrate: ["signal", "ask", "mark", "warn", "fade", "follow", "select", "recall", "reveal", "forget", "frontier", "know", "highways", "groups", "actors", "things", "paths", "events", "learning"],
|
|
38
|
-
lifecycle: ["auth_agent", "tasks_mine", "tasks_claim", "tasks_link", "sync_agent", "publish_agent", "pull_agent", "unpublish_agent", "list_agents", "agent_history", "rollback_agent", "discover_skill", "register", "pay", "list_skills", "unimport_skill", "own_me", "skill_eval"],
|
|
40
|
+
lifecycle: ["auth_agent", "tasks_mine", "tasks_claim", "tasks_link", "sync_agent", "publish_agent", "pull_agent", "unpublish_agent", "list_agents", "agent_history", "rollback_agent", "discover_skill", "register", "pay", "list_skills", "unimport_skill", "own_me", "skill_eval", "tasks_everywhere"],
|
|
39
41
|
observability: ["stats", "health", "revenue", "frontiers_global", "export_units", "export_highways", "ingest_event", "chat_turn"],
|
|
40
42
|
discovery: ["scaffold_agent", "list_presets", "get_agent"],
|
|
41
43
|
social: ["social_list_posts", "social_create_post", "social_accounts"],
|
|
42
44
|
video: ["create_room", "delete_room", "contact_call", "invite_to_call", "schedule_webinar", "create_session", "quick_call", "start_recording", "start_stream", "video_summary", "get_room_status"],
|
|
43
|
-
broadcast: ["broadcast_create", "broadcast_list", "broadcast_get", "broadcast_send", "newsletter_update"],
|
|
45
|
+
broadcast: ["broadcast_create", "broadcast_list", "broadcast_get", "broadcast_send", "newsletter_update", "segment_list", "segment_get", "segment_preview"],
|
|
44
46
|
messaging: ["message", "chat_send", "chat_broadcast"],
|
|
45
47
|
seo: ["seo_backlinks", "seo_ai_visibility", "seo_research_keywords", "seo_serp", "seo_keyword_metrics", "seo_gsc"],
|
|
46
48
|
views: ["create_view", "list_views"],
|
|
47
|
-
workflow: ["workflow_list", "workflow_get", "workflow_apply_diff", "workflow_run", "workflow_runs"],
|
|
49
|
+
workflow: ["workflow_list", "workflow_get", "workflow_apply_diff", "workflow_run", "workflow_runs", "workflow_validate", "workflow_resolve"],
|
|
50
|
+
// The board + the write verbs. lifecycle's tasks_* model the PULL (subscription
|
|
51
|
+
// queue, claim, close); these manage a workspace's tasks outright.
|
|
52
|
+
tasks: ["tasks_list", "tasks_create", "tasks_status", "tasks_priority", "tasks_tag", "tasks_notes", "tasks_schedule", "tasks_rename", "tasks_comment", "tasks_subtask", "tasks_depend", "tasks_approve"],
|
|
48
53
|
// fn_* tools are generated dynamically from FN_MAP; see tools/fn.ts ALLOWLIST for the current set
|
|
49
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* MCP_TOOLS is hand-maintained, and the note above MCP_VERSION records what that
|
|
57
|
+
* costs: a literal nothing forces to move drifts stale and stays wrong for
|
|
58
|
+
* releases. This is the forcing function — `bun run check:tools` fails when the
|
|
59
|
+
* manifest and the router disagree. `fn_*` is excluded because those are
|
|
60
|
+
* generated from FN_MAP at runtime and deliberately absent from the manifest.
|
|
61
|
+
*/
|
|
62
|
+
export function toolManifestDrift() {
|
|
63
|
+
const live = new Set([...createOneRouter().tools.keys()].filter((n) => !n.startsWith("fn_")));
|
|
64
|
+
const declared = new Set(Object.values(MCP_TOOLS).flat());
|
|
65
|
+
return {
|
|
66
|
+
missing: [...live].filter((n) => !declared.has(n)).sort(),
|
|
67
|
+
extra: [...declared].filter((n) => !live.has(n)).sort(),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
50
70
|
export function createOneRouter() {
|
|
51
71
|
const router = createRouter();
|
|
52
|
-
for (const tool of [...substrateTools(), ...lifecycleTools(), ...observabilityTools(), ...discoveryTools(), ...socialTools(), ...videoTools(), ...broadcastTools(), ...messagingTools(), ...chatTools(), ...fnTools(), ...seoTools(), ...viewsTools(), ...workflowTools()]) {
|
|
72
|
+
for (const tool of [...substrateTools(), ...lifecycleTools(), ...observabilityTools(), ...discoveryTools(), ...socialTools(), ...videoTools(), ...broadcastTools(), ...messagingTools(), ...chatTools(), ...fnTools(), ...seoTools(), ...viewsTools(), ...workflowTools(), ...tasksTools()]) {
|
|
53
73
|
router.register(tool);
|
|
54
74
|
}
|
|
55
75
|
return router;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|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CAAC;IACxB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;IAAC,OAAO,UAAU,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;AAAC,CAAC;AAAC,MAAM,CAAC;IAAC,OAAO,UAAU,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAA;AAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;AAClI,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,UAAU,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAClF,MAAM,MAAM,GAAG,eAAe,EAAE,CAAC;IACjC,KAAK,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACnE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;QAC5C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/tools/fn.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { FN_MAP, FN_MAP_VERSION } from "@oneie/sdk/generated/fn-map";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
"highways", "optimal_route", "promising_frontiers", "suggest_route", "total_contribution",
|
|
7
|
-
]);
|
|
2
|
+
// The allowlist is ONE source (`@oneie/sdk/fn-allowlist`) shared by web, MCP, CLI
|
|
3
|
+
// and channels — never a literal copied per surface. Module path, not the bare
|
|
4
|
+
// barrel: the barrel crashes CF Workers and two of the four consumers are Workers.
|
|
5
|
+
import { FN_ALLOWLIST } from "@oneie/sdk/fn-allowlist";
|
|
8
6
|
function paramSchema(params) {
|
|
9
7
|
if (!params.length)
|
|
10
8
|
return { type: "object", properties: {}, additionalProperties: false };
|
|
@@ -34,7 +32,7 @@ async function callFn(env, fnName, args) {
|
|
|
34
32
|
}
|
|
35
33
|
export function fnTools() {
|
|
36
34
|
const tools = [];
|
|
37
|
-
for (const name of
|
|
35
|
+
for (const name of FN_ALLOWLIST) {
|
|
38
36
|
const entry = FN_MAP[name];
|
|
39
37
|
if (!entry)
|
|
40
38
|
continue;
|
package/dist/tools/fn.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fn.js","sourceRoot":"","sources":["../../src/tools/fn.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAgB,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"fn.js","sourceRoot":"","sources":["../../src/tools/fn.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAgB,MAAM,6BAA6B,CAAC;AACnF,kFAAkF;AAClF,+EAA+E;AAC/E,mFAAmF;AACnF,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,SAAS,WAAW,CAAC,MAAyB;IAC5C,IAAI,CAAC,MAAM,CAAC,MAAM;QAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;IAC3F,MAAM,UAAU,GAA4B,EAAE,CAAC;IAC/C,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;QACvB,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAClF,CAAC;IACD,OAAO;QACL,IAAI,EAAE,QAAQ;QAC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AE,CAAC,CAAC;aAChE,IAAI,CAAC,IAAI,CAAC,CAAC;QACd,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACzC,KAAK,CAAC,IAAI,CAAC;YACT,IAAI,EAAE,MAAM,IAAI,EAAE;YAClB,WAAW,EAAE,4BAA4B,IAAI,IAAI,UAAU,CAAC,CAAC,CAAC,KAAK,UAAU,GAAG,CAAC,CAAC,CAAC,EAAE,2CAA2C,cAAc,GAAG;YACjJ,WAAW,EAAE,MAAM;YACnB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;gBAC3B,MAAM,QAAQ,GAA4B,EAAE,CAAC;gBAC7C,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;oBAC1C,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;gBAChD,CAAC;gBACD,OAAO,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;YACrC,CAAC;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { apiCall } from "../serve.js";
|
|
2
|
+
/**
|
|
3
|
+
* Task management from an MCP client (Claude Code, Cursor, Claude Desktop).
|
|
4
|
+
*
|
|
5
|
+
* Why these are separate from the four task tools in lifecycle.ts: those model
|
|
6
|
+
* the *pull* — `tasks_mine` / `tasks_everywhere` rank a subscriber's queue by
|
|
7
|
+
* learned weight, and `tasks_claim` / `tasks_link` lease and close what the
|
|
8
|
+
* puller picked up. That surface is deliberately follow-scoped (a task is
|
|
9
|
+
* visible when you're in its workspace AND you follow one of its words, or it's
|
|
10
|
+
* assigned to you), which makes it the right door for "what should I build
|
|
11
|
+
* next" and the WRONG door for "show me everything on the board".
|
|
12
|
+
*
|
|
13
|
+
* An operator managing a workspace needs the board, not the queue — and needs to
|
|
14
|
+
* WRITE. The substrate has had 18 `tasks:*` receivers for a while; MCP exposed
|
|
15
|
+
* four of them, none of which could create a task or change one. These wrap the
|
|
16
|
+
* rest, so a session can run a workspace's tasks end to end without leaving the
|
|
17
|
+
* editor.
|
|
18
|
+
*
|
|
19
|
+
* `workspace` is optional on every write. Omitted, the receiver's
|
|
20
|
+
* `effectiveWorkspace` resolves to the caller's own slug; supplied, it is
|
|
21
|
+
* honoured only when the caller is staff or actually controls that workspace
|
|
22
|
+
* (resolvers/tasks.ts:32) — the parameter is a request, never an authorisation.
|
|
23
|
+
*/
|
|
24
|
+
const ask = (env, receiver, data) => apiCall(env.baseUrl, env.apiKey, `/api/ask/${encodeURIComponent(receiver)}`, {
|
|
25
|
+
method: "POST",
|
|
26
|
+
body: JSON.stringify({ data }),
|
|
27
|
+
});
|
|
28
|
+
/** Drop undefined keys so an omitted arg never reaches a receiver as `null`. */
|
|
29
|
+
const only = (o) => Object.fromEntries(Object.entries(o).filter(([, v]) => v !== undefined));
|
|
30
|
+
const TID = { type: "string", description: "Task id, e.g. task:abc123 (from tasks_list)" };
|
|
31
|
+
const WS = {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "Workspace slug to act in. Omit for your own. Honoured only if you're staff or control it.",
|
|
34
|
+
};
|
|
35
|
+
export function tasksTools() {
|
|
36
|
+
return [
|
|
37
|
+
{
|
|
38
|
+
name: "tasks_list",
|
|
39
|
+
description: "The task BOARD for a workspace — every task, not just the ones matching your subscriptions. This is the read the /u/<slug>/tasks page makes, so what you see here is what the operator sees. Use this (not tasks_mine) to manage a workspace's tasks; tasks_mine answers the narrower question 'what matches what I subscribed to'. Returns id, name, status, priority, tags, dueAt, notes.",
|
|
40
|
+
inputSchema: {
|
|
41
|
+
type: "object",
|
|
42
|
+
properties: {
|
|
43
|
+
workspace: { type: "string", description: "Workspace slug, e.g. 'one'" },
|
|
44
|
+
limit: { type: "number", description: "Max tasks (default 50, cap 200)" },
|
|
45
|
+
search: { type: "string", description: "Substring match on task name" },
|
|
46
|
+
status: { type: "string", description: "Filter by task-status, e.g. open | picked | done | verified | dissolved" },
|
|
47
|
+
tag: { type: "string", description: "Filter by a single tag" },
|
|
48
|
+
sort: { type: "string", description: "name | due-at | priority | updated-at (default name)" },
|
|
49
|
+
dir: { type: "string", description: "asc | desc (default asc)" },
|
|
50
|
+
scope: { type: "string", description: "Pass 'tree' to include every descendant workspace's tasks too" },
|
|
51
|
+
kind: { type: "string", description: "work (authored tasks) | approval (workflow suspensions awaiting a human) | all (default)" },
|
|
52
|
+
},
|
|
53
|
+
required: ["workspace"],
|
|
54
|
+
},
|
|
55
|
+
handler: async (args, env) => {
|
|
56
|
+
const q = new URLSearchParams({ type: "task", workspace: String(args.workspace) });
|
|
57
|
+
for (const k of ["limit", "search", "status", "tag", "sort", "dir", "scope"]) {
|
|
58
|
+
if (args[k] !== undefined)
|
|
59
|
+
q.set(k, String(args[k]));
|
|
60
|
+
}
|
|
61
|
+
const res = (await apiCall(env.baseUrl, env.apiKey, `/api/things?${q}`));
|
|
62
|
+
const things = res?.things ?? [];
|
|
63
|
+
// A board holds two populations that read identically in a flat list:
|
|
64
|
+
// work someone authored, and `human:ask` suspensions a workflow run
|
|
65
|
+
// minted while waiting for an answer. Mistaking the second for clutter
|
|
66
|
+
// is expensive — "cleaning up" 12 approval rows abandons 12 live runs.
|
|
67
|
+
// They're already distinguishable by the `approval` tag; this labels
|
|
68
|
+
// them and counts them so the distinction survives a glance.
|
|
69
|
+
const kindOf = (t) => (Array.isArray(t.tags) && t.tags.includes("approval") ? "approval" : "work");
|
|
70
|
+
const labelled = things.map((t) => ({ ...t, kind: kindOf(t) }));
|
|
71
|
+
const want = args.kind === undefined ? "all" : String(args.kind);
|
|
72
|
+
const tasks = want === "all" ? labelled : labelled.filter((t) => t.kind === want);
|
|
73
|
+
const count = (k, open) => labelled.filter((t) => t.kind === k && (open === undefined || t.status === "open")).length;
|
|
74
|
+
return {
|
|
75
|
+
things: tasks,
|
|
76
|
+
summary: {
|
|
77
|
+
returned: tasks.length,
|
|
78
|
+
work: count("work"), workOpen: count("work", true),
|
|
79
|
+
approvals: count("approval"), approvalsPending: count("approval", true),
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "tasks_create",
|
|
86
|
+
description: "Create a task on a workspace's board. `notes` is the prose goal a future puller reads to know what 'done' means — a task with a bare title and no notes is the one that sits in the queue untouched. Returns the new tid.",
|
|
87
|
+
inputSchema: {
|
|
88
|
+
type: "object",
|
|
89
|
+
properties: {
|
|
90
|
+
title: { type: "string", description: "What the task is, as a doer would name it" },
|
|
91
|
+
notes: { type: "string", description: "The goal in prose: what done looks like, and why" },
|
|
92
|
+
tags: { type: "array", items: { type: "string" }, description: "Plain words, no ':' or '@' — those namespaces are reserved for workspace:/assignee tags" },
|
|
93
|
+
assignee: { type: "string", description: "Actor slug to assign to (becomes the @slug tag)" },
|
|
94
|
+
workspace: WS,
|
|
95
|
+
},
|
|
96
|
+
required: ["title"],
|
|
97
|
+
},
|
|
98
|
+
handler: async (args, env) => ask(env, "tasks:create", only({
|
|
99
|
+
title: args.title, notes: args.notes, tags: args.tags,
|
|
100
|
+
assignee: args.assignee, workspace: args.workspace,
|
|
101
|
+
})),
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: "tasks_status",
|
|
105
|
+
description: "Move a task through its lifecycle: open | picked | done | verified | dissolved. Use tasks_claim instead when you're taking work off the queue for yourself — it also stamps @you so nobody double-builds it.",
|
|
106
|
+
inputSchema: {
|
|
107
|
+
type: "object",
|
|
108
|
+
properties: { tid: TID, status: { type: "string", description: "open | picked | done | verified | dissolved" }, workspace: WS },
|
|
109
|
+
required: ["tid", "status"],
|
|
110
|
+
},
|
|
111
|
+
handler: async (args, env) => ask(env, "tasks:status", only({ tid: args.tid, status: args.status, workspace: args.workspace })),
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: "tasks_priority",
|
|
115
|
+
description: "Set a task's priority slider (1-100). Note the board ranks by LEARNED weight where it has evidence, so priority is the authored starting point, not the final order.",
|
|
116
|
+
inputSchema: {
|
|
117
|
+
type: "object",
|
|
118
|
+
properties: { tid: TID, priority: { type: "number", description: "1-100" }, workspace: WS },
|
|
119
|
+
required: ["tid", "priority"],
|
|
120
|
+
},
|
|
121
|
+
handler: async (args, env) => ask(env, "tasks:priority", only({ tid: args.tid, priority: args.priority, workspace: args.workspace })),
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: "tasks_tag",
|
|
125
|
+
description: "Add or remove a task's tags. Tags are how a task finds its doer — they're matched against what actors subscribed to, so tagging is routing, not labelling. Reserved prefixes ':' and '@' are rejected (workspace:/assignee tags are set by create/claim).",
|
|
126
|
+
inputSchema: {
|
|
127
|
+
type: "object",
|
|
128
|
+
properties: {
|
|
129
|
+
tid: TID,
|
|
130
|
+
add: { type: "array", items: { type: "string" }, description: "Tags to add" },
|
|
131
|
+
remove: { type: "array", items: { type: "string" }, description: "Tags to remove" },
|
|
132
|
+
workspace: WS,
|
|
133
|
+
},
|
|
134
|
+
required: ["tid"],
|
|
135
|
+
},
|
|
136
|
+
handler: async (args, env) => ask(env, "tasks:tag", only({ tid: args.tid, add: args.add, remove: args.remove, workspace: args.workspace })),
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: "tasks_notes",
|
|
140
|
+
description: "Set or clear a task's notes (the prose goal). Pass an empty string to clear.",
|
|
141
|
+
inputSchema: {
|
|
142
|
+
type: "object",
|
|
143
|
+
properties: { tid: TID, notes: { type: "string", description: "The goal in prose; empty string clears" }, workspace: WS },
|
|
144
|
+
required: ["tid", "notes"],
|
|
145
|
+
},
|
|
146
|
+
handler: async (args, env) => ask(env, "tasks:notes", only({ tid: args.tid, notes: args.notes, workspace: args.workspace })),
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: "tasks_schedule",
|
|
150
|
+
description: "Set or clear a task's dates. Pass null to clear a field; omit a field to leave it untouched.",
|
|
151
|
+
inputSchema: {
|
|
152
|
+
type: "object",
|
|
153
|
+
properties: {
|
|
154
|
+
tid: TID,
|
|
155
|
+
dueAt: { type: "string", description: "ISO date/datetime, or null to clear" },
|
|
156
|
+
startAt: { type: "string", description: "ISO date/datetime, or null to clear" },
|
|
157
|
+
workspace: WS,
|
|
158
|
+
},
|
|
159
|
+
required: ["tid"],
|
|
160
|
+
},
|
|
161
|
+
handler: async (args, env) => {
|
|
162
|
+
// `in data` is what the receiver tests to tell "clear this" from "leave it
|
|
163
|
+
// alone", so an explicitly-passed null must survive — only() would keep it
|
|
164
|
+
// (it drops undefined, not null), but the keys must not be added at all
|
|
165
|
+
// when the caller omitted them.
|
|
166
|
+
const d = { tid: args.tid };
|
|
167
|
+
if ("dueAt" in args)
|
|
168
|
+
d.dueAt = args.dueAt;
|
|
169
|
+
if ("startAt" in args)
|
|
170
|
+
d.startAt = args.startAt;
|
|
171
|
+
if (args.workspace !== undefined)
|
|
172
|
+
d.workspace = args.workspace;
|
|
173
|
+
return ask(env, "tasks:schedule", d);
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: "tasks_rename",
|
|
178
|
+
description: "Rename a task. The tid is stable — links, dependencies and provenance survive a rename.",
|
|
179
|
+
inputSchema: {
|
|
180
|
+
type: "object",
|
|
181
|
+
properties: { tid: TID, title: { type: "string", description: "New title" }, workspace: WS },
|
|
182
|
+
required: ["tid", "title"],
|
|
183
|
+
},
|
|
184
|
+
handler: async (args, env) => ask(env, "tasks:rename", only({ tid: args.tid, title: args.title, workspace: args.workspace })),
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: "tasks_comment",
|
|
188
|
+
description: "Post a comment on a task's thread — the durable record of why a decision was made, readable by the next actor (human or agent) who picks it up. Requires only read-level access to the task, unlike the write verbs above.",
|
|
189
|
+
inputSchema: {
|
|
190
|
+
type: "object",
|
|
191
|
+
properties: { tid: TID, body: { type: "string", description: "Comment text" }, workspace: WS },
|
|
192
|
+
required: ["tid", "body"],
|
|
193
|
+
},
|
|
194
|
+
handler: async (args, env) => ask(env, "tasks:comment", only({ tid: args.tid, body: args.body, workspace: args.workspace })),
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
name: "tasks_subtask",
|
|
198
|
+
description: "Create a child task under a parent — a containment relation, so closing the parent surfaces what's still open beneath it.",
|
|
199
|
+
inputSchema: {
|
|
200
|
+
type: "object",
|
|
201
|
+
properties: {
|
|
202
|
+
parent: { type: "string", description: "Parent task id" },
|
|
203
|
+
title: { type: "string", description: "Subtask title" },
|
|
204
|
+
workspace: WS,
|
|
205
|
+
},
|
|
206
|
+
required: ["parent", "title"],
|
|
207
|
+
},
|
|
208
|
+
handler: async (args, env) => ask(env, "tasks:subtask", only({ parent: args.parent, title: args.title, workspace: args.workspace })),
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: "tasks_approve",
|
|
212
|
+
description: "Answer a task whose kind is `approval` — a workflow run parked at a human step. This RESUMES the run; the task closing is a side effect, so setting such a task to done with tasks_status leaves the run parked forever. Take runId and stepId from the task's `run:` and `step:` tags.",
|
|
213
|
+
inputSchema: {
|
|
214
|
+
type: "object",
|
|
215
|
+
properties: {
|
|
216
|
+
runId: { type: "string", description: "From the task's `run:<id>` tag" },
|
|
217
|
+
stepId: { type: "string", description: "From the task's `step:<id>` tag" },
|
|
218
|
+
decision: { type: "string", description: "approved (default) | rejected" },
|
|
219
|
+
formPayload: { type: "object", description: "Answers for a form step, e.g. { email: 'x@y.com' }" },
|
|
220
|
+
},
|
|
221
|
+
required: ["runId", "stepId"],
|
|
222
|
+
},
|
|
223
|
+
handler: async (args, env) => ask(env, "human:resolve", only({
|
|
224
|
+
runId: args.runId, stepId: args.stepId,
|
|
225
|
+
decision: args.decision ?? "approved", formPayload: args.formPayload,
|
|
226
|
+
})),
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
name: "tasks_depend",
|
|
230
|
+
description: "Record that a task is blocked by another. A blocked task refuses tasks_claim until its blockers resolve — the dependency is enforced, not decorative.",
|
|
231
|
+
inputSchema: {
|
|
232
|
+
type: "object",
|
|
233
|
+
properties: {
|
|
234
|
+
tid: TID,
|
|
235
|
+
blockedBy: { type: "string", description: "Task id that must finish first" },
|
|
236
|
+
workspace: WS,
|
|
237
|
+
},
|
|
238
|
+
required: ["tid", "blockedBy"],
|
|
239
|
+
},
|
|
240
|
+
handler: async (args, env) => ask(env, "tasks:depend", only({ tid: args.tid, blockedBy: args.blockedBy, workspace: args.workspace })),
|
|
241
|
+
},
|
|
242
|
+
];
|
|
243
|
+
}
|
|
244
|
+
//# sourceMappingURL=tasks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../src/tools/tasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAgB,MAAM,aAAa,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,GAAG,GAAG,CACV,GAAyC,EACzC,QAAgB,EAChB,IAA6B,EAC7B,EAAE,CACF,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,kBAAkB,CAAC,QAAQ,CAAC,EAAE,EAAE;IAC3E,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,CAAC;CAC/B,CAAC,CAAC;AAEL,gFAAgF;AAChF,MAAM,IAAI,GAAG,CAAC,CAA0B,EAA2B,EAAE,CACnE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,C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I,CAAC,WAAW;aACrE,CAAC,CAAC;SACN;QACD;YACE,IAAI,EAAE,cAAc;YACpB,WAAW,EAAE,uJAAuJ;YACpK,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,GAAG,EAAE,GAAG;oBACR,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gCAAgC,EAAE;oBAC5E,SAAS,EAAE,EAAE;iBACd;gBACD,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC;aAC/B;YACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAC3B,GAAG,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;SAC1G;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneie/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "ONE substrate MCP server — 12 substrate verbs + 3 discovery tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -15,10 +15,11 @@
|
|
|
15
15
|
"build": "tsc",
|
|
16
16
|
"dev": "tsc --watch",
|
|
17
17
|
"typecheck": "tsc --noEmit",
|
|
18
|
-
"prepublishOnly": "bun run build"
|
|
18
|
+
"prepublishOnly": "bun run build",
|
|
19
|
+
"check:tools": "bun run build && node -e \"import('./dist/index.js').then(m=>{const d=m.toolManifestDrift();if(d.missing.length||d.extra.length){console.error('MCP_TOOLS drift — missing:',d.missing,'extra:',d.extra);process.exit(1)}console.log('MCP_TOOLS matches the router')})\""
|
|
19
20
|
},
|
|
20
21
|
"dependencies": {
|
|
21
|
-
"@oneie/sdk": "^0.14.
|
|
22
|
+
"@oneie/sdk": "^0.14.12",
|
|
22
23
|
"@oneie/templates": "^0.2.0",
|
|
23
24
|
"@modelcontextprotocol/sdk": "^1.0.0"
|
|
24
25
|
},
|