@adaptiqai/mcp 0.1.5 → 0.1.6
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/.claude-plugin/plugin.json +16 -2
- package/README.md +151 -42
- package/bin/adaptiqai-mcp +6 -0
- package/claude-code/.claude-plugin/plugin.json +10 -0
- package/claude-code/commands/adaptiq.md +6 -0
- package/claude-code/hooks/hooks.json +15 -0
- package/lib/index.js +4142 -555
- package/package.json +5 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adaptiqai",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "AdaptiqAI's knowledge and memory
|
|
3
|
+
"version": "0.1.6",
|
|
4
|
+
"description": "AdaptiqAI's knowledge and memory in Claude Code: search, use and save your collections in the conversation you are in, /adaptiq, and a note each turn of the collections it reads.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "AdaptiqAI",
|
|
7
7
|
"url": "https://adaptiqai.com"
|
|
@@ -14,5 +14,19 @@
|
|
|
14
14
|
"command": "/bin/sh",
|
|
15
15
|
"args": ["${CLAUDE_PLUGIN_ROOT}/bin/adaptiqai-mcp"]
|
|
16
16
|
}
|
|
17
|
+
},
|
|
18
|
+
"commands": ["./claude-code/commands/adaptiq.md"],
|
|
19
|
+
"hooks": {
|
|
20
|
+
"UserPromptSubmit": [
|
|
21
|
+
{
|
|
22
|
+
"hooks": [
|
|
23
|
+
{
|
|
24
|
+
"type": "command",
|
|
25
|
+
"command": "/bin/sh \"${CLAUDE_PLUGIN_ROOT}/bin/adaptiqai-mcp\" hook claude-code",
|
|
26
|
+
"timeout": 30
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
]
|
|
17
31
|
}
|
|
18
32
|
}
|
package/README.md
CHANGED
|
@@ -1,25 +1,40 @@
|
|
|
1
1
|
# AdaptiqAI for Claude Code, Cline, Codex and any MCP app
|
|
2
2
|
|
|
3
3
|
Your AdaptiqAI knowledge and this conversation's memory, as tools for the
|
|
4
|
-
agent: an MCP server, over stdio, on the AdaptiqAI core.
|
|
4
|
+
agent: an MCP server, over stdio, on the AdaptiqAI core. In Claude Code and
|
|
5
|
+
Codex a prompt hook adds what a server can't: `/adaptiq`, and a note on each
|
|
6
|
+
turn of the collections the conversation reads.
|
|
5
7
|
|
|
6
8
|
## Install
|
|
7
9
|
|
|
8
10
|
**Claude Code**
|
|
9
11
|
|
|
12
|
+
Install it as a Claude Code plugin from a marketplace that lists it (the
|
|
13
|
+
package carries `.claude-plugin/plugin.json`): the plugin brings the server,
|
|
14
|
+
`/adaptiq` and the prompt hook. Or add the server alone:
|
|
15
|
+
|
|
10
16
|
```bash
|
|
11
17
|
claude mcp add adaptiqai -- npx -y @adaptiqai/mcp
|
|
12
18
|
```
|
|
13
19
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
and the command and the hook as a plugin of their own, for one session or
|
|
21
|
+
in the launcher that starts Claude Code (Connect to app's `adaptiq-claude`
|
|
22
|
+
does this):
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
claude --plugin-dir "$(npm root -g)/@adaptiqai/mcp/claude-code"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`claude-code/` is a plugin with `/adaptiq` and the hook only, so a Claude Code
|
|
29
|
+
that starts the server itself gets no second one. Both plugins run the server
|
|
30
|
+
and the hook from the package with a Node.js 22 or newer: Claude Code itself
|
|
31
|
+
needs none, and one started from the Dock often runs without a terminal's
|
|
32
|
+
PATH, so `bin/adaptiqai-mcp` looks in PATH, then where Volta, fnm, asdf,
|
|
33
|
+
mise, Homebrew and nvm put Node.js, or takes the one `ADAPTIQAI_NODE` names
|
|
34
|
+
(in the `env` of Claude Code's settings). With none, the AdaptiqAI tools are
|
|
35
|
+
missing and the agent is told why; the hook adds nothing and holds no prompt
|
|
36
|
+
up. The plugins start it with `/bin/sh`, so on Windows add the server with
|
|
37
|
+
`claude mcp add` as above.
|
|
23
38
|
|
|
24
39
|
**Cline** (the CLI, 3.0.74)
|
|
25
40
|
|
|
@@ -36,63 +51,71 @@ That writes `~/.cline/data/settings/cline_mcp_settings.json`:
|
|
|
36
51
|
**Codex** (0.166)
|
|
37
52
|
|
|
38
53
|
Connect to app in the AdaptiqAI console sets it up in the `adaptiq` profile it
|
|
39
|
-
writes (`codex --profile adaptiq`). By
|
|
40
|
-
|
|
41
|
-
where its model requests go, and on another provider the tools would act on
|
|
42
|
-
a conversation the model never reads.
|
|
54
|
+
writes (`$CODEX_HOME/adaptiq.config.toml`, `codex --profile adaptiq`). By
|
|
55
|
+
hand, add it to the profile that runs Codex on AdaptiqAI:
|
|
43
56
|
|
|
44
57
|
```toml
|
|
45
58
|
[mcp_servers.adaptiqai]
|
|
46
59
|
command = "npx"
|
|
47
60
|
args = ["-y", "@adaptiqai/mcp"]
|
|
48
|
-
env_vars = ["CODEX_HOME"]
|
|
61
|
+
env_vars = ["CODEX_HOME", "ADAPTIQAI_API_KEY"]
|
|
49
62
|
|
|
50
63
|
[mcp_servers.adaptiqai.tools.adaptiq_knowledge]
|
|
51
64
|
approval_mode = "approve"
|
|
52
65
|
|
|
53
66
|
[mcp_servers.adaptiqai.tools.adaptiq_memory]
|
|
54
67
|
approval_mode = "approve"
|
|
68
|
+
|
|
69
|
+
[[hooks.UserPromptSubmit]]
|
|
70
|
+
[[hooks.UserPromptSubmit.hooks]]
|
|
71
|
+
type = "command"
|
|
72
|
+
command = "npx -y @adaptiqai/mcp hook codex"
|
|
73
|
+
timeout = 30
|
|
55
74
|
```
|
|
56
75
|
|
|
57
76
|
Codex offers an MCP server's tools in a `namespace` tool of the Responses
|
|
58
77
|
API (`mcp__adaptiqai`), and asks before each call of a tool that does not say
|
|
59
78
|
it only reads, unless `approval_mode` says otherwise; saving knowledge still
|
|
60
79
|
asks. Codex passes a server only a few variables of its environment, so
|
|
61
|
-
`CODEX_HOME`, where it keeps its conversations, is named.
|
|
80
|
+
`CODEX_HOME`, where it keeps its conversations, is named. Codex runs a hook
|
|
81
|
+
only once it is trusted: it asks at start, and `/hooks` shows it. The tools
|
|
82
|
+
check that the thread runs on AdaptiqAI (below), so a server added elsewhere
|
|
83
|
+
refuses rather than act on a conversation the model never reads.
|
|
62
84
|
|
|
63
85
|
**Any other MCP app**: run `npx -y @adaptiqai/mcp` as a stdio server.
|
|
64
86
|
|
|
65
87
|
## Sign in
|
|
66
88
|
|
|
67
|
-
The server signs in with the first of these
|
|
68
|
-
comes first: knowledge has to be in the workspace the app's model
|
|
89
|
+
The server signs in with the first of these that AdaptiqAI takes. The app's
|
|
90
|
+
own key comes first: knowledge has to be in the workspace the app's model
|
|
91
|
+
reads.
|
|
69
92
|
|
|
70
93
|
- **Nothing to do when the app runs on an AdaptiqAI key the server can
|
|
71
94
|
see.** Claude Code set up by the console (Connect to app's `adaptiq-claude`)
|
|
72
|
-
passes its environment on to the servers it starts, and the
|
|
73
|
-
key Claude Code runs on when `ANTHROPIC_BASE_URL` is
|
|
74
|
-
OpenRouter provider, pointed at AdaptiqAI, keeps its
|
|
75
|
-
Codex hands a server no key of its own: Connect to
|
|
76
|
-
server with the key Codex runs on
|
|
95
|
+
passes its environment on to the servers and hooks it starts, and the
|
|
96
|
+
server uses the key Claude Code runs on when `ANTHROPIC_BASE_URL` is
|
|
97
|
+
AdaptiqAI's. Cline's OpenRouter provider, pointed at AdaptiqAI, keeps its
|
|
98
|
+
key in Cline's settings. Codex hands a server no key of its own: Connect to
|
|
99
|
+
app's profile starts the server, and the hook, with the key Codex runs on
|
|
100
|
+
as `ADAPTIQAI_API_KEY`.
|
|
77
101
|
- **A key**: `ADAPTIQAI_API_KEY` in the server's environment.
|
|
78
|
-
- **In the browser**: `npx -y @adaptiqai/mcp login`,
|
|
79
|
-
for your knowledge: while the computer is signed out,
|
|
80
|
-
opens the approval page and tells the agent the code.
|
|
102
|
+
- **In the browser**: `npx -y @adaptiqai/mcp login`, `/adaptiq signin`, or
|
|
103
|
+
simply ask the agent for your knowledge: while the computer is signed out,
|
|
104
|
+
the first tool call opens the approval page and tells the agent the code.
|
|
81
105
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
`
|
|
106
|
+
A key AdaptiqAI refuses (revoked in the console) gives way to the next, and
|
|
107
|
+
the last to the browser sign-in, so an old key never hides a working one or
|
|
108
|
+
a sign-in made since. One browser sign-in serves every app on this computer.
|
|
109
|
+
It is kept in `~/.config/adaptiq/mcp/` (under `XDG_CONFIG_HOME` when set),
|
|
110
|
+
readable by you alone. `npx -y @adaptiqai/mcp status` says whether this
|
|
111
|
+
computer is signed in, and `logout` signs it out.
|
|
87
112
|
|
|
88
113
|
## What it does
|
|
89
114
|
|
|
90
115
|
- **`adaptiq_knowledge`**: what this conversation uses; find words, ids or
|
|
91
116
|
names in the text of its collections, with the exact lines as
|
|
92
117
|
document:line; search your saved knowledge by name; use or stop a
|
|
93
|
-
collection here.
|
|
94
|
-
turn which collections the conversation reads, as the other plugins do; the
|
|
95
|
-
tool and the server's instructions lead with find instead.
|
|
118
|
+
collection here.
|
|
96
119
|
- **`adaptiq_memory`**: how full the memory is; your saved collections; opens
|
|
97
120
|
Knowledge in the browser to tidy up. It can't keep a conversation private,
|
|
98
121
|
as the DeepSeek Harness and Pi plugins can: Claude Code, Cline and Codex
|
|
@@ -100,11 +123,88 @@ alone.
|
|
|
100
123
|
- **`adaptiq_create_knowledge`**: save material (text, files, links) as a
|
|
101
124
|
collection, only when you ask for it. The server checks the request
|
|
102
125
|
against your own messages in the conversation, as every AdaptiqAI plugin
|
|
103
|
-
does
|
|
126
|
+
does; a yes to the agent's offer to save counts, typed or (in Codex) given
|
|
127
|
+
through its question.
|
|
104
128
|
|
|
105
129
|
Otherwise the tools, their words and their answers are the ones the DeepSeek
|
|
106
130
|
Harness and Pi plugins have (`agentTools` in `@adaptiqai/core`).
|
|
107
131
|
|
|
132
|
+
### `/adaptiq`
|
|
133
|
+
|
|
134
|
+
In Claude Code type `/adaptiq` (the plugin lists it as `/adaptiqai:adaptiq`);
|
|
135
|
+
Codex keeps `/` for its own commands and refuses one it doesn't know before
|
|
136
|
+
any hook sees it, so there type `adaptiq` and the action. Codex 0.167 takes
|
|
137
|
+
no commands of your own: custom prompts are gone, and a plugin's commands
|
|
138
|
+
become `$` skills. The prompt hook answers it to you, and the prompt never
|
|
139
|
+
reaches the model:
|
|
140
|
+
|
|
141
|
+
| | |
|
|
142
|
+
|---|---|
|
|
143
|
+
| `/adaptiq` | workspace, this conversation, models and memory |
|
|
144
|
+
| `/adaptiq knowledge` | knowledge used here, and the collections ready to use |
|
|
145
|
+
| `/adaptiq use <name>` | use a collection, or an earlier conversation, here |
|
|
146
|
+
| `/adaptiq stop <name>` | stop using it here (nothing is deleted) |
|
|
147
|
+
| `/adaptiq open` | this conversation in AdaptiqAI Knowledge |
|
|
148
|
+
| `/adaptiq diagnostics` | a report for support, without secrets |
|
|
149
|
+
| `/adaptiq signin`, `signout` | connect this computer in the browser, or forget it |
|
|
150
|
+
|
|
151
|
+
The words are the core's (`runCommand`), as in every AdaptiqAI plugin.
|
|
152
|
+
`private` and `remember` say why they can't be had here. `adaptiqai-mcp
|
|
153
|
+
command <action>` answers the same in a terminal, and from Codex's `!` in the
|
|
154
|
+
thread it is run in.
|
|
155
|
+
|
|
156
|
+
### What the hook adds to a turn
|
|
157
|
+
|
|
158
|
+
Before a turn, the hook adds what the conversation doesn't hold yet, as
|
|
159
|
+
additional context for that turn. Claude Code and Codex keep it in the
|
|
160
|
+
conversation's transcript, which is how the hook knows it was said; after a
|
|
161
|
+
compaction it is said again. What can't be had at once is left out, and the
|
|
162
|
+
next turn asks again.
|
|
163
|
+
|
|
164
|
+
- **The note**: which ready collections the conversation reads, and that find
|
|
165
|
+
looks them up: on the first turn, and again when they change (the core's
|
|
166
|
+
`turnNotes`). The tool and the server's instructions lead with find too.
|
|
167
|
+
- **Look it up with find** (Codex): the instruction every AdaptiqAI plugin
|
|
168
|
+
gives the model (the core's `KNOWLEDGE_INSTRUCTIONS`). Codex hands the
|
|
169
|
+
server's instructions to the model provider only as the description of the
|
|
170
|
+
tools' namespace, so the hook adds it once to the thread as well. Claude
|
|
171
|
+
Code puts the server's instructions in the system prompt.
|
|
172
|
+
- **Another model**: when a turn runs on another model than the one the
|
|
173
|
+
conversation last ran on, and AdaptiqAI keeps the conversation there, you
|
|
174
|
+
are told once, in the core's words, where its memory is, how to switch back
|
|
175
|
+
and how to start fresh: `AdaptiqAI: This conversation's memory is on
|
|
176
|
+
<model>. Switch back: /model <its id> · Start fresh on <this model>: /new`.
|
|
177
|
+
The model has it too. Codex says each turn's model; Claude Code's is read
|
|
178
|
+
from its transcript, where Claude Code 2.1.308 writes `/model` with the next
|
|
179
|
+
message, after the hook ran: the notice comes with the second message on
|
|
180
|
+
the new model. A conversation resumed in a Claude Code started on another
|
|
181
|
+
model gets it with the first.
|
|
182
|
+
|
|
183
|
+
### Earlier conversations with @
|
|
184
|
+
|
|
185
|
+
**Claude Code**: type `@` and the name of an earlier conversation: the
|
|
186
|
+
server offers your saved conversations on the model Claude Code runs (the
|
|
187
|
+
newest hundred, read as Claude Code starts it) as resources. Picking one
|
|
188
|
+
makes this conversation read it from memory, as `/adaptiq use <name>` does:
|
|
189
|
+
the prompt hook adds it, in the conversation the prompt is in, and says so to
|
|
190
|
+
you and the model. The resource itself tells the model what you picked;
|
|
191
|
+
reading it changes nothing, since a resource read doesn't say which
|
|
192
|
+
conversation it is for. Claude Code reads a picked resource only in its
|
|
193
|
+
interactive app (its print and SDK modes pass no resources), and the hook
|
|
194
|
+
adds the conversation either way.
|
|
195
|
+
|
|
196
|
+
**Codex** (0.167): type `@` and a word of an earlier Codex chat's title:
|
|
197
|
+
Codex lists its own interactive chats there as tasks (not the ones
|
|
198
|
+
`codex exec` ran), and writes the one picked into the prompt as a link to
|
|
199
|
+
its thread. A Codex chat is the AdaptiqAI conversation of the same id, so the
|
|
200
|
+
prompt hook makes this conversation read it from memory, as
|
|
201
|
+
`adaptiq use <name>` does, and says so to you and the model. A chat AdaptiqAI
|
|
202
|
+
doesn't keep on the model this turn runs on (one that ran on another model,
|
|
203
|
+
or on another provider) is passed over in silence: Codex has the model read
|
|
204
|
+
the chat itself (its `read_thread` tool). Codex's `@` lists no MCP
|
|
205
|
+
resources, so a conversation from another app is added with
|
|
206
|
+
`adaptiq use <name>`.
|
|
207
|
+
|
|
108
208
|
## Which conversation a call is in
|
|
109
209
|
|
|
110
210
|
MCP has no conversation id, so the server reads each app where it keeps its
|
|
@@ -114,13 +214,15 @@ own:
|
|
|
114
214
|
|---|---|---|---|
|
|
115
215
|
| What the app hands the server | `CLAUDE_CODE_SESSION_ID`, `CLAUDE_PROJECT_DIR` and its own environment; `_meta["claudecode/toolUseId"]` on every call | nothing (no id in the environment or `_meta`) | `_meta.threadId` and `_meta.sessionId` on every call |
|
|
116
216
|
| What its model requests name | `x-claude-code-session-id`, the same id | body `session_id`, only on its OpenRouter provider | body `client_metadata.thread_id`, the same thread |
|
|
117
|
-
| How the server finds the call's conversation | the transcript (`~/.claude/projects/…/<id>.jsonl`) that holds the call's tool-use id: Claude Code keeps the server across `/clear` and `/resume`, so the starting id goes stale. An agent's call is in the agent's own transcript (`<id>/subagents/…/agent-<agent>.jsonl`), and is the session `<id>.<agent>`, as the gateway names an agent's requests; what an agent saves stays the chat's | the conversation whose messages file (`~/.cline/data/sessions/<id>/<id>.messages.json`) holds the call, not answered yet: Cline writes it there a few milliseconds before it makes it. Cline's hub runs every task in one process, so when two tasks make the same call at once, or no file holds it, the record started last before this server wins: Cline starts a server for each conversation | the thread `_meta.threadId` names: an agent the chat starts is a thread of its own, as its requests are; what an agent saves stays the chat's (`_meta.sessionId`). The
|
|
118
|
-
| What has to be true for it to reach the model | Claude Code on the AdaptiqAI gateway with `CLAUDE_CODE_GATEWAY_HINT_HEADERS=1` (the gateway names a chat only from `x-claude-code-request-class: main`) | Cline's OpenRouter provider with its base URL set to the AdaptiqAI gateway | Codex on the AdaptiqAI gateway with a key Connect to app made for Codex (the gateway names a thread only for one)
|
|
217
|
+
| How the server finds the call's conversation | the transcript (`~/.claude/projects/…/<id>.jsonl`) that holds the call's tool-use id: Claude Code keeps the server across `/clear` and `/resume`, so the starting id goes stale, and a call no transcript holds is refused rather than put there. An agent's call is in the agent's own transcript (`<id>/subagents/…/agent-<agent>.jsonl`), and is the session `<id>.<agent>`, as the gateway names an agent's requests; what an agent saves stays the chat's | the conversation whose messages file (`~/.cline/data/sessions/<id>/<id>.messages.json`) holds the call, not answered yet: Cline writes it there a few milliseconds before it makes it. Cline's hub runs every task in one process, so when two tasks make the same call at once, or no file holds it, the record started last before this server wins: Cline starts a server for each conversation | the thread `_meta.threadId` names: an agent the chat starts is a thread of its own, as its requests are; what an agent saves stays the chat's (`_meta.sessionId`). The thread's rollout (`$CODEX_HOME/sessions/<year>/<month>/<day>/rollout-<time>-<thread>.jsonl`, under the day the thread began, which a UUIDv7 says; for another id the newest days are looked through) gives its folder, the person's messages and the model provider it runs on |
|
|
218
|
+
| What has to be true for it to reach the model | Claude Code on the AdaptiqAI gateway with `CLAUDE_CODE_GATEWAY_HINT_HEADERS=1` (the gateway names a chat only from `x-claude-code-request-class: main`) | Cline's OpenRouter provider with its base URL set to the AdaptiqAI gateway | Codex on a model provider whose `base_url` is the AdaptiqAI gateway, in `config.toml` or a profile beside it, with a key Connect to app made for Codex (the gateway names a thread only for one) |
|
|
119
219
|
|
|
120
220
|
When that is not so, every tool says why instead of attaching knowledge to a
|
|
121
|
-
conversation the model never reads; Codex
|
|
122
|
-
|
|
123
|
-
conversation, so its tool calls are refused
|
|
221
|
+
conversation the model never reads; a Codex thread Codex keeps no rollout of
|
|
222
|
+
(`codex exec --ephemeral`) can't be checked, so it is refused too. An app
|
|
223
|
+
other than these three names no conversation, so its tool calls are refused
|
|
224
|
+
the same way. The prompt hook gets the conversation's id from the app
|
|
225
|
+
itself, and adds nothing to a conversation that does not reach AdaptiqAI.
|
|
124
226
|
|
|
125
227
|
The transcript also holds your own messages, which `adaptiq_create_knowledge`
|
|
126
228
|
checks its quote against. The server reads them on this computer, only when
|
|
@@ -131,11 +233,13 @@ nothing of them.
|
|
|
131
233
|
|
|
132
234
|
| Variable | Default |
|
|
133
235
|
|---|---|
|
|
134
|
-
| `ADAPTIQAI_API_KEY` | none. Used when the app runs on no AdaptiqAI key the server can see; else the browser sign-in |
|
|
236
|
+
| `ADAPTIQAI_API_KEY` | none. Used when the app runs on no AdaptiqAI key the server can see, or AdaptiqAI refuses that one; else the browser sign-in |
|
|
135
237
|
| `ADAPTIQAI_API_BASE` | `https://api.adaptiqai.com` |
|
|
136
238
|
| `ADAPTIQAI_CONSOLE_URL` | `https://memory.adaptiqai.com/memory` |
|
|
137
239
|
| `ADAPTIQAI_NODE` | the plugin looks for a Node.js 22 or newer |
|
|
138
240
|
|
|
241
|
+
The hook reads the same variables, from the app's environment.
|
|
242
|
+
|
|
139
243
|
## Development
|
|
140
244
|
|
|
141
245
|
```bash
|
|
@@ -143,10 +247,15 @@ pnpm install
|
|
|
143
247
|
pnpm --filter @adaptiqai/mcp run build # lib/index.js, one file with core bundled in
|
|
144
248
|
pnpm --filter @adaptiqai/mcp run test
|
|
145
249
|
claude mcp add adaptiqai-dev -- node "$PWD/packages/mcp/lib/index.js"
|
|
250
|
+
claude --plugin-dir "$PWD/packages/mcp/claude-code" # /adaptiq and the hook
|
|
251
|
+
echo '{"session_id":"…","prompt":"/adaptiq"}' | node packages/mcp/lib/index.js hook claude-code
|
|
146
252
|
```
|
|
147
253
|
|
|
148
254
|
MCP over stdio is a few JSON-RPC methods (`initialize`, `ping`,
|
|
149
255
|
`tools/list`, `tools/call`), written by hand in `src/rpc.ts` and
|
|
150
256
|
`src/index.ts`: the server ships as one file with no dependencies. Claude
|
|
151
257
|
Code 2.1.308 asks for `server/discover` (MCP 2026-07-28) first and falls back
|
|
152
|
-
to `initialize` when the server does not know it, as this one does not.
|
|
258
|
+
to `initialize` when the server does not know it, as this one does not. The
|
|
259
|
+
hook (`src/hook.ts`) reads the UserPromptSubmit input both apps send on stdin
|
|
260
|
+
and answers with their JSON: Codex checks it against its own schema, so it
|
|
261
|
+
gets only the fields Codex knows.
|
package/bin/adaptiqai-mcp
CHANGED
|
@@ -28,6 +28,12 @@ else
|
|
|
28
28
|
fi
|
|
29
29
|
|
|
30
30
|
reason='AdaptiqAI knowledge and memory are not available here: their MCP server needs Node.js 22 or newer on this computer, and the Claude Code plugin found none. When the person asks for AdaptiqAI knowledge or memory, tell them to install Node.js 22 or newer (nodejs.org), or to set ADAPTIQAI_NODE to one in the env of Claude Code'"'"'s settings, and then to start Claude Code again.'
|
|
31
|
+
case ${1:-} in
|
|
32
|
+
# The prompt hook adds nothing, and never holds a prompt up: /adaptiq then
|
|
33
|
+
# reaches the agent as the command's own text, which says why.
|
|
34
|
+
hook) exit 0 ;;
|
|
35
|
+
?*) echo "adaptiqai-mcp: Node.js 22 or newer is needed, and none was found. Install it from nodejs.org, or set ADAPTIQAI_NODE to one." >&2; exit 1 ;;
|
|
36
|
+
esac
|
|
31
37
|
echo "adaptiqai-mcp: $reason" >&2
|
|
32
38
|
while IFS= read -r line || [ -n "$line" ]; do
|
|
33
39
|
id=$(printf '%s\n' "$line" | sed -nE 's/.*"id":("[^"]*"|-?[0-9]+).*/\1/p')
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "adaptiqai",
|
|
3
|
+
"description": "AdaptiqAI's /adaptiq command and prompt hook in Claude Code, for a Claude Code that starts AdaptiqAI's MCP server itself (adaptiq-claude): the plugin at the package's root brings the server too.",
|
|
4
|
+
"author": {
|
|
5
|
+
"name": "AdaptiqAI",
|
|
6
|
+
"url": "https://adaptiqai.com"
|
|
7
|
+
},
|
|
8
|
+
"homepage": "https://adaptiqai.com",
|
|
9
|
+
"license": "UNLICENSED"
|
|
10
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: AdaptiqAI here — status, knowledge, use or stop a collection, open, diagnostics, sign in or out
|
|
3
|
+
argument-hint: "[status | knowledge | use <name> | stop <name> | open | diagnostics | signin | signout]"
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
The person typed /adaptiq $ARGUMENTS, AdaptiqAI's command. AdaptiqAI's prompt hook answers it before it reaches you, but the hook did not run here: it needs Node.js 22 or newer on this computer. Tell the person that in one sentence, and that they can install Node.js 22 or newer (nodejs.org), or set ADAPTIQAI_NODE to one in the env of Claude Code's settings, and then start Claude Code again. Do nothing else for this message.
|