@debian777/kairos-mcp 4.0.0-pre.2 → 4.0.0-pre.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 +55 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/config.d.ts +5 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +5 -0
- package/dist/config.js.map +1 -1
- package/dist/embed-docs/mem/00000000-0000-0000-0000-000000002001.md +1 -1
- package/dist/embed-docs/mem/00000000-0000-0000-0000-000000002002.md +1 -1
- package/dist/embed-docs/mem/00000000-0000-0000-0000-000000002003.md +1 -1
- package/dist/embed-docs/mem/00000000-0000-0000-0000-000000002004.md +17 -16
- package/dist/embed-docs/mem/00000000-0000-0000-0000-000000002005.md +1 -1
- package/dist/mcp-apps/activate-widget-html.d.ts +6 -0
- package/dist/mcp-apps/activate-widget-html.d.ts.map +1 -0
- package/dist/mcp-apps/activate-widget-html.js +28 -0
- package/dist/mcp-apps/activate-widget-html.js.map +1 -0
- package/dist/mcp-apps/activate-widget-inline-css.d.ts +2 -0
- package/dist/mcp-apps/activate-widget-inline-css.d.ts.map +1 -0
- package/dist/mcp-apps/activate-widget-inline-css.js +94 -0
- package/dist/mcp-apps/activate-widget-inline-css.js.map +1 -0
- package/dist/mcp-apps/activate-widget-inline-script.d.ts +3 -0
- package/dist/mcp-apps/activate-widget-inline-script.d.ts.map +1 -0
- package/dist/mcp-apps/activate-widget-inline-script.js +373 -0
- package/dist/mcp-apps/activate-widget-inline-script.js.map +1 -0
- package/dist/mcp-apps/forward-widget-html.d.ts +2 -2
- package/dist/mcp-apps/forward-widget-html.d.ts.map +1 -1
- package/dist/mcp-apps/forward-widget-html.js +11 -18
- package/dist/mcp-apps/forward-widget-html.js.map +1 -1
- package/dist/mcp-apps/forward-widget-inline-css.d.ts +0 -1
- package/dist/mcp-apps/forward-widget-inline-css.d.ts.map +1 -1
- package/dist/mcp-apps/forward-widget-inline-css.js +25 -110
- package/dist/mcp-apps/forward-widget-inline-css.js.map +1 -1
- package/dist/mcp-apps/forward-widget-inline-script.d.ts.map +1 -1
- package/dist/mcp-apps/forward-widget-inline-script.js +40 -24
- package/dist/mcp-apps/forward-widget-inline-script.js.map +1 -1
- package/dist/mcp-apps/kairos-ui-constants.d.ts +26 -0
- package/dist/mcp-apps/kairos-ui-constants.d.ts.map +1 -1
- package/dist/mcp-apps/kairos-ui-constants.js +27 -1
- package/dist/mcp-apps/kairos-ui-constants.js.map +1 -1
- package/dist/mcp-apps/list-offerings-for-ui.d.ts +6 -0
- package/dist/mcp-apps/list-offerings-for-ui.d.ts.map +1 -1
- package/dist/mcp-apps/list-offerings-for-ui.js +48 -9
- package/dist/mcp-apps/list-offerings-for-ui.js.map +1 -1
- package/dist/mcp-apps/mcp-widget-chrome-inline-css.d.ts +6 -0
- package/dist/mcp-apps/mcp-widget-chrome-inline-css.d.ts.map +1 -0
- package/dist/mcp-apps/mcp-widget-chrome-inline-css.js +99 -0
- package/dist/mcp-apps/mcp-widget-chrome-inline-css.js.map +1 -0
- package/dist/mcp-apps/mcp-widget-presentation-inject.d.ts +5 -0
- package/dist/mcp-apps/mcp-widget-presentation-inject.d.ts.map +1 -0
- package/dist/mcp-apps/mcp-widget-presentation-inject.js +8 -0
- package/dist/mcp-apps/mcp-widget-presentation-inject.js.map +1 -0
- package/dist/mcp-apps/register-activate-ui-resources.d.ts +4 -0
- package/dist/mcp-apps/register-activate-ui-resources.d.ts.map +1 -0
- package/dist/mcp-apps/register-activate-ui-resources.js +22 -0
- package/dist/mcp-apps/register-activate-ui-resources.js.map +1 -0
- package/dist/mcp-apps/spaces-mcp-app-widget-html.d.ts +1 -1
- package/dist/mcp-apps/spaces-mcp-app-widget-html.d.ts.map +1 -1
- package/dist/mcp-apps/spaces-mcp-app-widget-html.js +27 -21
- package/dist/mcp-apps/spaces-mcp-app-widget-html.js.map +1 -1
- package/dist/mcp-apps/spaces-widget-html.js +1 -1
- package/dist/resources/embedded-mcp-resources.js +6 -6
- package/dist/resources/embedded-mcp-resources.js.map +1 -1
- package/dist/resources/mem-resources-boot.js +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +2 -0
- package/dist/server.js.map +1 -1
- package/dist/services/qdrant/memory-store.js +2 -2
- package/dist/services/qdrant/memory-store.js.map +1 -1
- package/dist/services/qdrant/memory-updates.js +6 -6
- package/dist/services/qdrant/memory-updates.js.map +1 -1
- package/dist/tools/activate.d.ts.map +1 -1
- package/dist/tools/activate.js +6 -3
- package/dist/tools/activate.js.map +1 -1
- package/dist/tools/activate_schema.d.ts +1 -0
- package/dist/tools/activate_schema.d.ts.map +1 -1
- package/dist/tools/activate_schema.js +2 -0
- package/dist/tools/activate_schema.js.map +1 -1
- package/dist/tools/next-pow-helpers.d.ts.map +1 -1
- package/dist/tools/next-pow-helpers.js +2 -0
- package/dist/tools/next-pow-helpers.js.map +1 -1
- package/dist/tools/next-previous-step.d.ts.map +1 -1
- package/dist/tools/next-previous-step.js +9 -0
- package/dist/tools/next-previous-step.js.map +1 -1
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/search.js +28 -2
- package/dist/tools/search.js.map +1 -1
- package/dist/tools/spaces.d.ts.map +1 -1
- package/dist/tools/spaces.js +2 -7
- package/dist/tools/spaces.js.map +1 -1
- package/dist/ui/assets/AccountPage-o3wGQZ1a.js +1 -0
- package/dist/ui/assets/ChallengeCard-Coecs--0.js +1 -0
- package/dist/ui/assets/{HomePage-BN3dGcYC.js → HomePage-DHaSrH_k.js} +1 -1
- package/dist/ui/assets/KairosPage-D3vTZLht.js +1 -0
- package/dist/ui/assets/{ProtocolDetailPage-B6Rj_xia.js → ProtocolDetailPage-CbEkCdWc.js} +1 -1
- package/dist/ui/assets/{ProtocolEditPage-BetFOoxm.js → ProtocolEditPage-6ms7pqhR.js} +1 -1
- package/dist/ui/assets/{RunGuidedPage-DTyqc__E.js → RunGuidedPage-QZ-FTCqP.js} +1 -1
- package/dist/ui/assets/SpaceSelect-D8dsuZ8v.js +1 -0
- package/dist/ui/assets/index-1fOlEEnO.css +2 -0
- package/dist/ui/assets/index-DfjadjMs.js +8 -0
- package/dist/ui/index.html +23 -2
- package/dist/utils/structured-logger.d.ts +1 -0
- package/dist/utils/structured-logger.d.ts.map +1 -1
- package/dist/utils/structured-logger.js +47 -17
- package/dist/utils/structured-logger.js.map +1 -1
- package/package.json +3 -2
- package/dist/ui/assets/AccountPage-CzXXPMqL.js +0 -1
- package/dist/ui/assets/ChallengeCard-DK_ggTk9.js +0 -1
- package/dist/ui/assets/KairosPage-Dt1o6uUI.js +0 -1
- package/dist/ui/assets/SpaceSelect-BBePQE01.js +0 -1
- package/dist/ui/assets/index-BZM7kl-u.js +0 -8
- package/dist/ui/assets/index-SoYiTylD.css +0 -2
package/README.md
CHANGED
|
@@ -55,6 +55,39 @@ flowchart LR
|
|
|
55
55
|
The server generates challenge data (`nonce`, `proof_hash`, URIs); agents echo
|
|
56
56
|
those values back exactly.
|
|
57
57
|
|
|
58
|
+
## Protocol execution
|
|
59
|
+
|
|
60
|
+
Authoritative behavior for agents is defined in the MCP tool resources under
|
|
61
|
+
[`src/embed-docs/tools/`](src/embed-docs/tools/) (**`activate`**, **`forward`**,
|
|
62
|
+
**`reward`**). This is an on-wire summary; follow each response’s `next_action`
|
|
63
|
+
and `must_obey` fields in real runs.
|
|
64
|
+
|
|
65
|
+
1. **`activate`** — Pass the user message or a short intent phrase as `query`.
|
|
66
|
+
From `choices`, pick **one** row and obey **that** row’s `next_action` (do not
|
|
67
|
+
mix in another URI). Typical roles: **`match`** (continue with **`forward`**
|
|
68
|
+
on the given adapter URI), **`refine`**, **`create`** (mint via **`train`**).
|
|
69
|
+
|
|
70
|
+
2. **`forward`** — With the adapter URI from **`activate`**, call **`forward`**
|
|
71
|
+
and **omit** `solution` on the **first** call for that run. Read `contract`
|
|
72
|
+
and `next_action`. For each layer, call **`forward`** again using the **layer**
|
|
73
|
+
URI from the last response (add `?execution_id=...` when the server returns
|
|
74
|
+
it) and supply a `solution` whose `type` matches `contract.type`. Loop until
|
|
75
|
+
`next_action` tells you to call **`reward`**.
|
|
76
|
+
|
|
77
|
+
3. **`reward`** — After the last layer, call **`reward`** with the **layer** URI
|
|
78
|
+
from **`forward`** (not the adapter URI unless the schema explicitly allows
|
|
79
|
+
it), `outcome` (`success` or `failure`), and optional evaluator fields per the
|
|
80
|
+
tool description.
|
|
81
|
+
|
|
82
|
+
**Must always:** Obey `next_action` verbatim. Echo server-issued `nonce`,
|
|
83
|
+
`proof_hash`, and URIs exactly.
|
|
84
|
+
|
|
85
|
+
**Must never:** Invent URIs; skip layers; submit a solution whose type does not
|
|
86
|
+
match `contract.type`.
|
|
87
|
+
|
|
88
|
+
For a longer narrative, see
|
|
89
|
+
[docs/architecture/workflow-full-execution.md](docs/architecture/workflow-full-execution.md).
|
|
90
|
+
|
|
58
91
|
## What runs in this repository
|
|
59
92
|
|
|
60
93
|
The current codebase includes:
|
|
@@ -152,9 +185,28 @@ npm run infra:up
|
|
|
152
185
|
npm run dev:deploy
|
|
153
186
|
```
|
|
154
187
|
|
|
188
|
+
The dev scripts default the app to port **3300** (see `scripts/env/.env.template` and
|
|
189
|
+
`scripts/run-env.sh`). The Docker minimal stack above defaults **3000** unless you
|
|
190
|
+
set `PORT` in `.env`. Use the same host and port in health checks, the UI, and MCP
|
|
191
|
+
URLs.
|
|
192
|
+
|
|
155
193
|
See [docs/install/README.md](docs/install/README.md) and
|
|
156
194
|
[CONTRIBUTING.md](CONTRIBUTING.md) for the exact env variables and dev workflow.
|
|
157
195
|
|
|
196
|
+
### Cursor MCP (`DEVELOPMENT_KAIROS`)
|
|
197
|
+
|
|
198
|
+
This repository ships [`.cursor/mcp.json`](.cursor/mcp.json) with a **streamable
|
|
199
|
+
HTTP** entry keyed **`DEVELOPMENT_KAIROS`**, aimed at local MCP on
|
|
200
|
+
`http://localhost:3300/mcp` (match **`npm run dev:deploy`** when `PORT=3300`).
|
|
201
|
+
If you run the minimal Compose stack without overriding `PORT`, point MCP at
|
|
202
|
+
`http://localhost:3000/mcp` instead. Cursor may show a longer **agent-visible**
|
|
203
|
+
server id (for example one ending in `-DEVELOPMENT_KAIROS`); see
|
|
204
|
+
[AGENTS.md](AGENTS.md) and [docs/INSTALL-MCP.md](docs/INSTALL-MCP.md).
|
|
205
|
+
|
|
206
|
+
When executing over MCP, follow **[Protocol execution](#protocol-execution)**
|
|
207
|
+
above and each tool result’s `next_action`. The connected server’s tool
|
|
208
|
+
descriptions are the runtime authority if they differ from this file.
|
|
209
|
+
|
|
158
210
|
## Installation options
|
|
159
211
|
|
|
160
212
|
### Run the server with Docker Compose
|
|
@@ -259,7 +311,9 @@ docker compose -p kairos-mcp logs app-prod
|
|
|
259
311
|
|
|
260
312
|
Also verify that required ports are free:
|
|
261
313
|
|
|
262
|
-
- minimal stack: `3000
|
|
314
|
+
- minimal stack: app `3000` (or your `PORT`), Qdrant `6333`, metrics `9090` (or
|
|
315
|
+
your `METRICS_PORT`)
|
|
316
|
+
- repo dev scripts: app often `3300`, metrics often `9390` (see `.env`)
|
|
263
317
|
- full stack adds: `6379`, `5432`, `8080`, `9000`
|
|
264
318
|
|
|
265
319
|
### Health check returns `503`
|