@adaptiqai/openclaw 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/README.md +140 -35
- package/lib/index.js +4341 -605
- package/openclaw.plugin.json +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,50 +7,66 @@ OpenClaw plugin.
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
openclaw plugins install @adaptiqai/openclaw
|
|
10
|
+
openclaw plugins install @adaptiqai/openclaw --force --accept-capabilities
|
|
11
11
|
openclaw gateway restart
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Then sign in, in a
|
|
14
|
+
Then sign in, in a chat with OpenClaw:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
/adaptiq signin
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
or in a terminal:
|
|
15
21
|
|
|
16
22
|
```bash
|
|
17
23
|
openclaw models auth login --provider adaptiq
|
|
18
24
|
```
|
|
19
25
|
|
|
20
|
-
|
|
21
|
-
browser and approve, and OpenClaw picks it up by itself.
|
|
22
|
-
|
|
26
|
+
Either shows a link and a code; you sign in (or create an account) in your
|
|
27
|
+
browser and approve, and OpenClaw picks it up by itself. In the chat, the link
|
|
28
|
+
is given, never opened: the Gateway may run on another computer than your
|
|
29
|
+
browser. Without a browser, give a key from the AdaptiqAI console instead:
|
|
23
30
|
`openclaw models auth paste-api-key --provider adaptiq`, or `ADAPTIQAI_API_KEY`.
|
|
24
|
-
A pasted key comes before `ADAPTIQAI_API_KEY`, as OpenClaw orders them; the
|
|
25
|
-
plugin's tools use the variable only until OpenClaw has resolved a key.
|
|
26
31
|
A setup made by the console's Connect to app keeps working as it is.
|
|
27
32
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
33
|
+
The plugin tries every credential it has, in this order: the browser sign-in,
|
|
34
|
+
the key OpenClaw resolved for the provider (a pasted key comes before
|
|
35
|
+
`ADAPTIQAI_API_KEY`, as OpenClaw orders them), then `ADAPTIQAI_API_KEY`. A key
|
|
36
|
+
AdaptiqAI refuses gives way to the next, so an old key never hides a working
|
|
37
|
+
one.
|
|
38
|
+
|
|
39
|
+
Choose a model of the **AdaptiqAI** provider (`/model adaptiq/<id>`, or
|
|
40
|
+
`openclaw models set adaptiq/<id>`). The list is the models in your
|
|
41
|
+
workspace, each with its own context window, output limit, prices, and
|
|
42
|
+
thinking levels; a run you give no level starts on the model's own default.
|
|
43
|
+
The terminal sign-in starts you on the first model that answers now.
|
|
31
44
|
|
|
32
45
|
## What it does
|
|
33
46
|
|
|
34
47
|
- **A conversation is one AdaptiqAI session.** Every turn carries OpenClaw's
|
|
35
48
|
session id as `x-adaptiq-session-id`, so AdaptiqAI keeps the conversation's
|
|
36
|
-
memory, and the collections and conversations you attach to it
|
|
37
|
-
|
|
49
|
+
memory, and the collections and conversations you attach to it reach the
|
|
50
|
+
model. `/new` starts a new one. Switch a conversation to another model and
|
|
51
|
+
the first reply there ends with a line saying where its memory is, with
|
|
52
|
+
`/model adaptiq/<id>` to switch back or `/new` to start fresh.
|
|
38
53
|
- **No compaction.** AdaptiqAI keeps the whole conversation in native memory,
|
|
39
54
|
so OpenClaw's compaction is declined for AdaptiqAI models: nothing is sent,
|
|
40
55
|
nothing is removed, and OpenClaw keeps the conversation as it is. Other
|
|
41
56
|
models compact as before.
|
|
42
|
-
- **Helper calls
|
|
43
|
-
once, marked ephemeral, and never
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
57
|
+
- **Helper calls and the runs OpenClaw starts by itself leave nothing.**
|
|
58
|
+
Titles and other one-off completions run once, marked ephemeral, and never
|
|
59
|
+
become a conversation. Heartbeat, cron and memory-flush runs read their
|
|
60
|
+
conversation back, the memory and the knowledge attached to it, and save
|
|
61
|
+
nothing; in a conversation AdaptiqAI doesn't store yet they run once.
|
|
62
|
+
OpenClaw 2026.10 marks these runs itself, so this needs no access to
|
|
63
|
+
conversations. On older OpenClaw, cron and memory-flush runs look like
|
|
64
|
+
turns unless you let the plugin see each run's trigger
|
|
65
|
+
(`plugins.entries.adaptiq.hooks.allowConversationAccess`).
|
|
66
|
+
- **Only your own words count as you asking.** The agent saves knowledge only
|
|
67
|
+
when you asked for it. Prompts OpenClaw writes itself (cron jobs, wake-ups,
|
|
68
|
+
system events), a subagent's task, and another session's messages never
|
|
69
|
+
count, whatever they say.
|
|
54
70
|
- **A subagent names the session that started it**, so the console folds it
|
|
55
71
|
under that conversation: as a helper for a one-off task (`mode: "run"`), as
|
|
56
72
|
its own line of work for a persistent one (`mode: "session"`).
|
|
@@ -59,20 +75,106 @@ window, output limit and thinking levels.
|
|
|
59
75
|
lines as document:line; search the library by name, use or stop a
|
|
60
76
|
collection), `adaptiq_memory` (how full the memory is; the saved
|
|
61
77
|
collections; keep a conversation private) and `adaptiq_create_knowledge`
|
|
62
|
-
(save material as a collection, only when you ask).
|
|
78
|
+
(save material as a collection, only when you ask). They are always in the
|
|
79
|
+
model's tool list, also where OpenClaw's tool search hides other plugins'
|
|
80
|
+
tools.
|
|
63
81
|
Where `commands.ownerAllowFrom` names the owners, only their messages save
|
|
64
82
|
knowledge (in a group, other members' do not), and an agent kept to its
|
|
65
83
|
workspace (a sandbox, or `tools.fs.workspaceOnly`) saves only files inside
|
|
66
84
|
it.
|
|
67
|
-
- **Each turn is told
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
85
|
+
- **Each turn is told to look a collection up with find, and which ready
|
|
86
|
+
collections its conversation reads**, in the system prompt of every request
|
|
87
|
+
the plugin sends for it. It is the same text until the collections change,
|
|
88
|
+
and needs no access to conversations. It is prompt injection, which
|
|
89
|
+
`hooks.allowPromptInjection: false` turns off; a run whose prompt is the
|
|
90
|
+
identity line alone (prompt mode `none`) gets neither.
|
|
91
|
+
- **Busy answers are waited out.** When AdaptiqAI says it is busy and when to
|
|
92
|
+
come back (`Retry-After`), the plugin waits and asks again, twice at most
|
|
93
|
+
and within a minute, before OpenClaw sees a failure.
|
|
94
|
+
- **A full memory is said as the reply.** OpenClaw shows a provider's
|
|
95
|
+
failure only in its own words ("The AI service is having trouble. Please
|
|
96
|
+
try again in a moment.") and retries it eight times, which cannot help. So
|
|
97
|
+
when AdaptiqAI's memory is full, the reply says so, what frees room, and the
|
|
98
|
+
console's link, never "start a new conversation", which frees nothing.
|
|
99
|
+
- **Memory notices come under the next answer, once.** When idle
|
|
100
|
+
conversations go to sleep to make room, or the library is full or nearly
|
|
101
|
+
so, the next answer ends with one line that says so (with the console's
|
|
102
|
+
link where there is something to do), as DeepSeek Harness shows it for a
|
|
103
|
+
few seconds. `/adaptiq` repeats it while it holds.
|
|
104
|
+
|
|
105
|
+
## The AdaptiqAI tab
|
|
106
|
+
|
|
107
|
+
On OpenClaw 2026.10 the Control UI gets an **AdaptiqAI** tab
|
|
108
|
+
(`http://<gateway>/adaptiq`): your workspace and account, each model with its
|
|
109
|
+
status, context, thinking levels and what runs and waits on it now, memory
|
|
110
|
+
(library and conversations), the conversations that ran on AdaptiqAI since
|
|
111
|
+
OpenClaw started (how much of each is in memory, saving or private, what it
|
|
112
|
+
reads, and what its last turn and all of it read from memory, sent new,
|
|
113
|
+
saved and cost), your collections, and the console's links.
|
|
114
|
+
|
|
115
|
+
The Control UI shows a plugin's tab in a sandboxed frame that may only read,
|
|
116
|
+
and cannot open pages or send forms. So the tab shows, and the chat acts: each
|
|
117
|
+
change is the `/adaptiq` command it names, and the links are there to copy.
|
|
118
|
+
The page is a route of the Gateway behind its own sign-in.
|
|
119
|
+
|
|
120
|
+
## `/adaptiq`
|
|
121
|
+
|
|
122
|
+
| Command | Does |
|
|
123
|
+
|---|---|
|
|
124
|
+
| `/adaptiq` | the workspace, this conversation (its memory and what it processed), memory and models; what needs you (full memory, an empty balance), and the update |
|
|
125
|
+
| `/adaptiq signin` | connect your AdaptiqAI account in the browser |
|
|
126
|
+
| `/adaptiq private` | stop saving new messages of this conversation |
|
|
127
|
+
| `/adaptiq remember` | save this conversation to memory again |
|
|
128
|
+
| `/adaptiq knowledge` | knowledge used in this conversation, and what else you can use |
|
|
129
|
+
| `/adaptiq conversations` | the earlier conversations on this model, to add one with `/adaptiq use` |
|
|
130
|
+
| `/adaptiq use <name>` | use a collection or an earlier conversation here |
|
|
131
|
+
| `/adaptiq stop <name>` | stop using it here (nothing is deleted) |
|
|
132
|
+
| `/adaptiq available <name>` | make a collection built for another model available for this conversation's |
|
|
133
|
+
| `/adaptiq open` | the console's link for this conversation |
|
|
134
|
+
| `/adaptiq update` | whether a newer version is out; `/adaptiq update now` installs it and switches to it |
|
|
135
|
+
| `/adaptiq diagnostics` | a report you can send to support (no secrets) |
|
|
136
|
+
| `/adaptiq signout` | forget the connection on this computer |
|
|
137
|
+
|
|
138
|
+
Where `commands.ownerAllowFrom` names the owners, only they sign in or out,
|
|
139
|
+
and only they update the plugin.
|
|
140
|
+
|
|
141
|
+
Replies come with buttons where the channel has them (Telegram, Discord,
|
|
142
|
+
Slack): Add funds, Get access, Sign in again, Private or Remember, Knowledge,
|
|
143
|
+
Use a collection or an earlier conversation, Install an update, Open console.
|
|
144
|
+
A button runs the `/adaptiq` command it names, or opens the console. Where a
|
|
145
|
+
channel has none (the Control UI's chat among them), each is a line under the
|
|
146
|
+
reply, as OpenClaw's own `/status` does.
|
|
147
|
+
|
|
148
|
+
## Updates
|
|
149
|
+
|
|
150
|
+
The plugin checks npm once a day. When a newer version is out, `/adaptiq`
|
|
151
|
+
and the Gateway log say so, and `/adaptiq update now` installs it with
|
|
152
|
+
OpenClaw's own command and switches to it: the Gateway loads the new version
|
|
153
|
+
in place, without a restart. The install starts once no AdaptiqAI answer is in
|
|
154
|
+
progress; `/adaptiq` then shows the version running, and `/adaptiq update`
|
|
155
|
+
says if it did not finish. In a terminal:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
openclaw plugins install @adaptiqai/openclaw@<version> --force --accept-capabilities && openclaw gateway restart
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
`openclaw plugins update` works too, with the Gateway stopped.
|
|
162
|
+
|
|
163
|
+
## What OpenClaw does not let a plugin do
|
|
164
|
+
|
|
165
|
+
- **"Preparing memory".** OpenClaw reads AdaptiqAI's answers itself and gives
|
|
166
|
+
a provider only each answer's status and headers; the stream's own progress
|
|
167
|
+
lines never reach a plugin, and its status line takes only OpenClaw's own
|
|
168
|
+
stages. A memory notice reaches the plugin only when AdaptiqAI sends it as
|
|
169
|
+
a header.
|
|
170
|
+
- **Picking an earlier conversation after @.** The chat's @ list holds the
|
|
171
|
+
Gateway's people alone; `/adaptiq conversations` lists them instead.
|
|
172
|
+
- **Acting in the tab.** The tab's frame may only read: changes are the
|
|
173
|
+
`/adaptiq` commands it names, and files are saved as knowledge by asking the
|
|
174
|
+
agent (`adaptiq_create_knowledge`) or in the console.
|
|
175
|
+
- **Buttons in the Control UI's chat**, which shows a reply's text only.
|
|
176
|
+
|
|
177
|
+
An empty balance is said by AdaptiqAI itself, with the link to add funds.
|
|
76
178
|
|
|
77
179
|
## Configuration
|
|
78
180
|
|
|
@@ -88,6 +190,9 @@ spawned as sessions of their own are kept in `~/.openclaw/adaptiqai/`
|
|
|
88
190
|
OpenClaw's auth profile `adaptiq:device` holds only a stand-in: the plugin
|
|
89
191
|
swaps it for the current access token on every run that goes to
|
|
90
192
|
`ADAPTIQAI_API_BASE`. A provider pointed at another address gets no token.
|
|
193
|
+
A sign-in from the chat writes no auth profile, so while one is saved and
|
|
194
|
+
`ADAPTIQAI_API_KEY` is not set, the plugin puts the same stand-in there, in
|
|
195
|
+
the Gateway's own process only; it never replaces a key you set.
|
|
91
196
|
|
|
92
197
|
## Development
|
|
93
198
|
|
|
@@ -98,4 +203,4 @@ pnpm --filter @adaptiqai/openclaw run test
|
|
|
98
203
|
openclaw plugins install --link ./packages/openclaw --force # try it in your own OpenClaw
|
|
99
204
|
```
|
|
100
205
|
|
|
101
|
-
Tested against OpenClaw 2026.9.2.
|
|
206
|
+
Tested against OpenClaw 2026.9.2 and 2026.10.10.
|