@adaptiqai/pi 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 +105 -23
- package/lib/index.js +5242 -364
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -9,37 +9,118 @@ that AdaptiqAI remembers, and your saved knowledge, in one Pi package.
|
|
|
9
9
|
pi install npm:@adaptiqai/pi
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
Then sign in: run `/login adaptiqai` in Pi. Your
|
|
13
|
-
(or create an account) and approve, and Pi picks
|
|
14
|
-
browser, give a key from the AdaptiqAI console
|
|
15
|
-
`ADAPTIQAI_API_KEY` or as Pi's own key for the
|
|
16
|
-
`~/.pi/agent/auth.json`.
|
|
12
|
+
Then sign in: run `/login adaptiqai` (or `/adaptiq signin`) in Pi. Your
|
|
13
|
+
browser opens; you sign in (or create an account) and approve, and Pi picks
|
|
14
|
+
it up by itself. Without a browser, give a key from the AdaptiqAI console
|
|
15
|
+
instead, either as `ADAPTIQAI_API_KEY` or as Pi's own key for the
|
|
16
|
+
`adaptiqai` provider in `~/.pi/agent/auth.json`. When you have both, a key
|
|
17
|
+
AdaptiqAI refuses gives way to the other.
|
|
17
18
|
|
|
18
19
|
Choose a model from the **AdaptiqAI** provider (`/model`, or
|
|
19
20
|
`pi --provider adaptiqai --model <id>`). The list is the models in your
|
|
20
|
-
workspace, each with its own context window, output limit
|
|
21
|
-
|
|
21
|
+
workspace, each with its own context window, output limit, thinking levels,
|
|
22
|
+
sampling and prices.
|
|
22
23
|
|
|
23
24
|
## What it does
|
|
24
25
|
|
|
25
26
|
- **A conversation is one AdaptiqAI session.** Every turn carries Pi's
|
|
26
27
|
session id as `x-adaptiq-session-id`, so AdaptiqAI keeps the conversation's
|
|
27
|
-
memory, and the collections and conversations you attach to it
|
|
28
|
-
|
|
29
|
-
- **
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
|
|
28
|
+
memory, and the collections and conversations you attach to it reach the
|
|
29
|
+
model.
|
|
30
|
+
- **Nothing is compacted.** AdaptiqAI keeps the whole conversation, so on an
|
|
31
|
+
AdaptiqAI model Pi's compaction (`/compact`, or automatic) is declined, with
|
|
32
|
+
one line a conversation saying why. Branch summaries run once, marked
|
|
33
|
+
ephemeral, and never become a conversation. On Pi 1.4 and later the
|
|
34
|
+
cache-warming replays are switched off.
|
|
35
|
+
- **Each model as its card describes it.** Pi's thinking levels map onto the
|
|
36
|
+
model's own, and go in the field the model reads them from. A new
|
|
37
|
+
conversation starts at the level the card names, unless you chose one
|
|
38
|
+
(`--thinking`, `defaultThinkingLevel` or `modelThinkingLevels` in Pi's
|
|
39
|
+
settings, or in Pi itself). The card's sampling goes with every request.
|
|
40
|
+
- **Pi's cost display is right.** Prices come from your workspace; what a
|
|
41
|
+
turn reads from the conversation's memory counts as a cache read, what it
|
|
42
|
+
saves as a cache write.
|
|
43
|
+
- **AdaptiqAI's answers, in plain words.** While memory is being prepared or
|
|
44
|
+
you wait in line, the line beside Pi's spinner says so. A busy model is
|
|
45
|
+
asked again as long as AdaptiqAI says to wait (up to eight times). An empty
|
|
46
|
+
balance says so with the link to add funds; a full memory says what to free
|
|
47
|
+
up, never to start over. When idle conversations go to sleep to make room,
|
|
48
|
+
or memory gets full, Pi tells you.
|
|
49
|
+
- **Switching models.** Choose another model in a conversation whose memory
|
|
50
|
+
is on an AdaptiqAI model, and Pi tells you how to switch back
|
|
51
|
+
(`/model adaptiqai/<id>`) or start fresh (`/new`).
|
|
52
|
+
- **A Pi that works for another Pi** (one an extension or the agent starts to
|
|
53
|
+
run with `-p`, `--mode json` or RPC) names the first as its parent. A
|
|
54
|
+
one-off run, or one that keeps nothing (`--no-session`), is folded under
|
|
55
|
+
that conversation in the console. A conversation Pi keeps and the parent
|
|
56
|
+
comes back to (in RPC, or started with `--session`, `--session-id`,
|
|
57
|
+
`--continue`, `--resume` or `--fork`) is a line of work of its own: it is
|
|
58
|
+
listed on its own, linked to that conversation. A Pi you open yourself from
|
|
59
|
+
Pi's terminal is a conversation of its own.
|
|
35
60
|
- **Tools for the agent:** `adaptiq_knowledge` (what this conversation uses;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
`
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
61
|
+
find words, ids or names in the text of its collections, with the exact
|
|
62
|
+
lines as document:line; search the library by name, use or stop a
|
|
63
|
+
collection), `adaptiq_memory` (how full the memory is; the saved
|
|
64
|
+
collections; keep a conversation private) and `adaptiq_create_knowledge`
|
|
65
|
+
(save material as a collection, only when you ask).
|
|
66
|
+
- **A turn that offers the knowledge tool is told which ready collections
|
|
67
|
+
its conversation reads**, once and again when they change, in a message Pi
|
|
68
|
+
keeps hidden in the session, so the agent looks things up there with find.
|
|
69
|
+
- **Updates.** When a newer version is on npm, Pi tells you. `/adaptiq
|
|
70
|
+
update` installs it through Pi (`pi update npm:@adaptiqai/pi`) and loads it
|
|
71
|
+
in place, after one yes. A version pinned in Pi's settings stays; Pi says
|
|
72
|
+
the command that installs the new one. Where Pi installs packages with pnpm
|
|
73
|
+
or bun, a new release is offered once it is a day old, as they wait that
|
|
74
|
+
long.
|
|
75
|
+
|
|
76
|
+
## In Pi's terminal
|
|
77
|
+
|
|
78
|
+
The screens of the DeepSeek Harness plugin, as Pi draws them:
|
|
79
|
+
|
|
80
|
+
- **Pi's footer** shows this conversation's memory against the model's
|
|
81
|
+
window, and after a turn what it read from memory and what it cost:
|
|
82
|
+
`AdaptiqAI · Memory 25k / 5M · 24k from memory · free · last turn $0.0006 · alt+m menu`.
|
|
83
|
+
- **alt+m** (or `/adaptiq memory`) opens the memory menu: what the model
|
|
84
|
+
sees, saving (Remember or Private), what this conversation uses, and what
|
|
85
|
+
its requests processed. On macOS the terminal's Option key must send Meta,
|
|
86
|
+
as for Pi's own alt keys.
|
|
87
|
+
- **`/adaptiq`** opens the settings panel: the account, the models with
|
|
88
|
+
their queues, memory, Save new conversations, and links.
|
|
89
|
+
- **`/adaptiq knowledge`** lists every collection and earlier conversation on
|
|
90
|
+
the model: space uses one here or stops it. A collection built for another
|
|
91
|
+
model can be made available here, and a new collection is made from files
|
|
92
|
+
you drop into the terminal.
|
|
93
|
+
- **A failure asks what to do**: Add funds, Sign in, Free up space or
|
|
94
|
+
Continue privately, in a dialog.
|
|
95
|
+
- **`@`** lists earlier conversations above Pi's files. One you pick is read
|
|
96
|
+
in this conversation from memory once you send the message.
|
|
97
|
+
|
|
98
|
+
Outside Pi's terminal (RPC, print and JSON mode) the same comes as words.
|
|
99
|
+
|
|
100
|
+
## `/adaptiq`
|
|
101
|
+
|
|
102
|
+
The same command as in every AdaptiqAI plugin, with Pi's own `memory` and
|
|
103
|
+
`update`.
|
|
104
|
+
|
|
105
|
+
| Command | Does |
|
|
106
|
+
|---|---|
|
|
107
|
+
| `/adaptiq` | the settings panel; outside Pi's terminal, workspace, models and memory |
|
|
108
|
+
| `/adaptiq status` | workspace, models and memory, in words |
|
|
109
|
+
| `/adaptiq memory` | this conversation's memory: saving, knowledge in use, processed (alt+m) |
|
|
110
|
+
| `/adaptiq signin` | connect your AdaptiqAI account in the browser |
|
|
111
|
+
| `/adaptiq private` | stop saving new messages of this conversation |
|
|
112
|
+
| `/adaptiq remember` | save this conversation to memory again |
|
|
113
|
+
| `/adaptiq knowledge` | knowledge used in this conversation, and what else you can use |
|
|
114
|
+
| `/adaptiq use <name>` | use a collection or an earlier conversation here |
|
|
115
|
+
| `/adaptiq stop <name>` | stop using it here (nothing is deleted) |
|
|
116
|
+
| `/adaptiq open` | open this conversation in AdaptiqAI Knowledge |
|
|
117
|
+
| `/adaptiq update` | install the new version of AdaptiqAI for Pi and load it |
|
|
118
|
+
| `/adaptiq diagnostics` | a report you can send to support (no secrets) |
|
|
119
|
+
| `/adaptiq signout` | forget the connection on this computer |
|
|
120
|
+
|
|
121
|
+
`/adaptiq signout` signs Pi out too, as `/logout` does; an API key you gave
|
|
122
|
+
stays. Signing out with Pi's `/logout` signs the plugin out the next time Pi
|
|
123
|
+
starts.
|
|
43
124
|
|
|
44
125
|
## Configuration
|
|
45
126
|
|
|
@@ -51,7 +132,8 @@ thinking levels.
|
|
|
51
132
|
|
|
52
133
|
The sign-in, the plugin's state and the last model list are kept in
|
|
53
134
|
`~/.pi/agent/adaptiqai/` (or under `PI_CODING_AGENT_DIR`), readable by you
|
|
54
|
-
alone.
|
|
135
|
+
alone. Pi's own copy of the sign-in is in its `auth.json`, which the plugin
|
|
136
|
+
changes only under Pi's lock.
|
|
55
137
|
|
|
56
138
|
## Development
|
|
57
139
|
|