@adaptiqai/openclaw 0.1.4 → 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 CHANGED
@@ -7,63 +7,174 @@ 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 terminal:
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
- OpenClaw shows a link and a code; you sign in (or create an account) in your
21
- browser and approve, and OpenClaw picks it up by itself. Without a browser,
22
- give a key from the AdaptiqAI console instead:
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
31
  A setup made by the console's Connect to app keeps working as it is.
25
32
 
26
- Choose a model of the **AdaptiqAI** provider (`openclaw models set adaptiq/<id>`).
27
- The list is the models in your workspace, each with its own context
28
- window, output limit and thinking levels.
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.
29
44
 
30
45
  ## What it does
31
46
 
32
47
  - **A conversation is one AdaptiqAI session.** Every turn carries OpenClaw's
33
48
  session id as `x-adaptiq-session-id`, so AdaptiqAI keeps the conversation's
34
- memory, and the collections and conversations you attach to it in the
35
- console reach the model. `/new` starts a new one.
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.
36
53
  - **No compaction.** AdaptiqAI keeps the whole conversation in native memory,
37
54
  so OpenClaw's compaction is declined for AdaptiqAI models: nothing is sent,
38
55
  nothing is removed, and OpenClaw keeps the conversation as it is. Other
39
56
  models compact as before.
40
- - **Helper calls leave nothing.** Titles and other one-off completions run
41
- once, marked ephemeral, and never become a conversation. A heartbeat run
42
- reads its conversation back, the memory and the knowledge attached to it,
43
- and saves nothing; in a conversation AdaptiqAI doesn't store yet it runs
44
- once. Cron and memory-flush runs look like turns to a provider; to keep
45
- them out as well, let the plugin see each run's trigger:
46
-
47
- ```bash
48
- openclaw config set plugins.entries.adaptiq.hooks.allowConversationAccess true
49
- ```
50
-
51
- The plugin reads only the trigger.
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.
52
70
  - **A subagent names the session that started it**, so the console folds it
53
71
  under that conversation: as a helper for a one-off task (`mode: "run"`), as
54
72
  its own line of work for a persistent one (`mode: "session"`).
55
73
  - **Tools for the agent:** `adaptiq_knowledge` (what this conversation uses;
56
- search, use or stop a collection), `adaptiq_memory` (how full the memory is;
57
- the saved collections; keep a conversation private) and
58
- `adaptiq_create_knowledge` (save material as a collection, only when you ask).
74
+ find words, ids or names in the text of its collections, with the exact
75
+ lines as document:line; search the library by name, use or stop a
76
+ collection), `adaptiq_memory` (how full the memory is; the saved
77
+ collections; keep a conversation private) and `adaptiq_create_knowledge`
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.
59
81
  Where `commands.ownerAllowFrom` names the owners, only their messages save
60
82
  knowledge (in a group, other members' do not), and an agent kept to its
61
83
  workspace (a sandbox, or `tools.fs.workspaceOnly`) saves only files inside
62
84
  it.
63
- - **`/adaptiq`** shows the workspace, its models and this conversation.
64
- `/adaptiq private` stops saving new messages of this conversation,
65
- `/adaptiq remember` starts again, `/adaptiq console` gives the console's link
66
- for it, and `/adaptiq logout` signs this computer out.
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.
67
178
 
68
179
  ## Configuration
69
180
 
@@ -79,6 +190,9 @@ spawned as sessions of their own are kept in `~/.openclaw/adaptiqai/`
79
190
  OpenClaw's auth profile `adaptiq:device` holds only a stand-in: the plugin
80
191
  swaps it for the current access token on every run that goes to
81
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.
82
196
 
83
197
  ## Development
84
198
 
@@ -89,4 +203,4 @@ pnpm --filter @adaptiqai/openclaw run test
89
203
  openclaw plugins install --link ./packages/openclaw --force # try it in your own OpenClaw
90
204
  ```
91
205
 
92
- Tested against OpenClaw 2026.9.2.
206
+ Tested against OpenClaw 2026.9.2 and 2026.10.10.