@ascenda-one/agent-mcp 0.1.3
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 +78 -0
- package/dist/cli.js +22072 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.js +46 -0
- package/dist/config.js.map +1 -0
- package/dist/server.js +135 -0
- package/dist/server.js.map +1 -0
- package/package.json +36 -0
package/README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Ascenda Agent MCP
|
|
2
|
+
|
|
3
|
+
MCP server exposing `ascenda_emit_work_signal` — the one submission interface any agent host can call to report an **agent-observed** work-friction pattern.
|
|
4
|
+
|
|
5
|
+
Part of [ai-engineer-tools](../). See the [Tool Pairing API Reference](../api-docs/TOOL_PAIRING_API_REFERENCE.md#semantic-event-rules) for the wire-level rules this server enforces, and [`docs/CURSOR_ADAPTER_PLAN.md`](../docs/CURSOR_ADAPTER_PLAN.md) for the earlier scaffold this supersedes for the semantic-signal case (that scaffold's broader `ascenda_emit_workload_event` generic emitter is a separate, still-open concern).
|
|
6
|
+
|
|
7
|
+
## What this is for
|
|
8
|
+
|
|
9
|
+
The deterministic hook adapters (`ascenda-claude-code-hooks`, `ascenda-codex-hooks`) map host lifecycle events — a tool call, a compaction, a long session — to the telemetry catalog. They cannot see **semantic** patterns: an agent circling the same problem with three different approaches, drift from a goal the user stated at the start of the session, a session that has gone quiet without resolution. Nobody can derive those from a single host event; they require an agent reading the interaction.
|
|
10
|
+
|
|
11
|
+
This server is where that reading becomes a wire event, and it is deliberately narrow:
|
|
12
|
+
|
|
13
|
+
- **One tool.** `ascenda_emit_work_signal`, nothing else.
|
|
14
|
+
- **Six event types**, exactly `SEMANTIC_WORK_SIGNAL_EVENT_TYPES` from `@ascenda-one/tool-contract`: `approach_churn_detected`, `goal_drift_detected`, `progress_stalled`, `progress_recovered`, `session_intention_declared`, `scope_change_declared`.
|
|
15
|
+
- **Report the pattern, not a diagnosis.** The schema has no field for the model's read of the user's emotional state, and no severity field a caller can set — severity is the backend's own judgement against the person's baseline, never the emitter's.
|
|
16
|
+
- **Never raw content.** No field accepts free text. `taskFingerprint` must be hash-shaped; `evidenceCounts`/`evidenceFlags` keys must be bare identifiers, not sentences — both enforced by the schema itself, not by a length heuristic on the way out.
|
|
17
|
+
|
|
18
|
+
## Architecture
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
Agent (Claude Code / Cursor / other MCP host)
|
|
22
|
+
-> ascenda-agent-mcp (stdio, this package)
|
|
23
|
+
-> AscendaEventSender.sendSemanticSignal (@ascenda-one/tool-kit)
|
|
24
|
+
-> Ascenda backend (POST /v1/tool-events, consentScope: semantic_work_signals)
|
|
25
|
+
-> paired anonymous Ascenda user
|
|
26
|
+
-> Weekly Loop trigger evaluation / work-map (asc-core-be)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Reuses the same pairing model as the hooks and IDE extensions — same `toolInstallationId` + `eventWriteToken`, same token file convention — but **does not mint its own tool type**. See `src/config.ts`: this process is host-agnostic (the same binary runs under Claude Code or Cursor), so it refuses to guess a prefix the way `ascenda-claude-hook`/`ascenda-codex-hook` do. Passing an id that already contains `:` (i.e. the exact value your existing pairing shows) reuses that pairing's token file; a bare id is rejected rather than silently minting a second, unpaired tool identity.
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
### Prerequisites
|
|
34
|
+
|
|
35
|
+
- Node.js **20+**
|
|
36
|
+
- A paired Ascenda `toolInstallationId` + `eventWriteToken` — pair first via the Claude Code hooks, Cursor extension, or [pairing-sim `e2e`](../ascenda-pairing-sim/), then reuse that pairing here.
|
|
37
|
+
- The paired lease must include the `semantic_work_signals` consent scope. `ide_telemetry` alone does not cover these six event types (see the Tool Pairing API Reference).
|
|
38
|
+
|
|
39
|
+
### Build
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# from the repo root
|
|
43
|
+
npm install
|
|
44
|
+
npm run build:shared
|
|
45
|
+
cd ascenda-agent-mcp
|
|
46
|
+
npm run build
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Configure your MCP host
|
|
50
|
+
|
|
51
|
+
Add to your Claude Code (`.mcp.json`) or Cursor MCP config — see [`examples/mcp.json`](./examples/mcp.json):
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"mcpServers": {
|
|
56
|
+
"ascenda-agent": {
|
|
57
|
+
"command": "node",
|
|
58
|
+
"args": ["/absolute/path/to/ascenda-agent-mcp/dist/cli.js"],
|
|
59
|
+
"env": {
|
|
60
|
+
"ASCENDA_TOOL_INSTALLATION_ID": "claude_code:abc123",
|
|
61
|
+
"ASCENDA_API_BASE_URL": "https://api.ascenda.one"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Use the **exact** `toolInstallationId` your existing pairing already shows (it contains a `:`). `ASCENDA_EVENT_WRITE_TOKEN` is read from the same token file the hook/extension already wrote (`~/.ascenda/tokens/...`); set `ASCENDA_EVENT_WRITE_TOKEN` directly only if you have no prior pairing to reuse.
|
|
69
|
+
|
|
70
|
+
## What calls this tool
|
|
71
|
+
|
|
72
|
+
This server is the transport. It does not decide *when* a semantic pattern is worth reporting or *what* the six event types mean in practice — that judgement belongs to an agent skill reading the actual interaction. See [`ascenda-agent-skills`](../ascenda-agent-skills/) for the Claude Code skill / Cursor rules that call this tool, including the emission criteria and the vocabulary the skill is written never to use.
|
|
73
|
+
|
|
74
|
+
## Privacy
|
|
75
|
+
|
|
76
|
+
- Metadata-only, always (`privacyMode: "metadata_only"`) — never negotiable per call.
|
|
77
|
+
- No field in the schema accepts arbitrary text. `evidenceCounts`/`evidenceFlags` are closed to bare-identifier keys with numeric/boolean values only.
|
|
78
|
+
- `taskFingerprint` must already be a hash when it reaches this tool; this server does not compute it and never sees the task itself.
|