@eleboucher/pi-memini 0.6.12 → 0.7.1
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 +45 -37
- package/dist/index.js +542 -545
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -53,60 +53,68 @@ pi -e ./integrations/pi/plugin/dist/index.js
|
|
|
53
53
|
All config is via environment variables in the shell that launches Pi (secrets
|
|
54
54
|
stay out of any file):
|
|
55
55
|
|
|
56
|
-
| Env var | Default | Purpose
|
|
57
|
-
| -------------------------------- | -------------------------------- |
|
|
58
|
-
| `MEMINI_BASE_URL` | `http://localhost:8080` | memini REST base URL
|
|
59
|
-
| `MEMINI_NAMESPACE` |
|
|
60
|
-
| `MEMINI_HOME` | unset | caller's personal namespace, sent as `X-Memini-Home`; unset = no home leg
|
|
61
|
-
| `MEMINI_RECALL` | on | `0`/`false` disables recall-before-turn
|
|
62
|
-
| `MEMINI_CAPTURE` | on | `0`/`false` disables capture-after-turn
|
|
63
|
-
| `MEMINI_RECALL_LIMIT` | `3` | max memories injected per turn
|
|
64
|
-
| `MEMINI_INJECT_RECALL_MAX_TOK` | `0` | hard ceiling on recall-block tokens (`0` = unbounded); the tail is dropped with a footer
|
|
65
|
-
| `MEMINI_INJECT_RECALL_MIN_SCORE` | `0` | fused-score floor (>=) sent as `min_score` to `/v1/search`
|
|
66
|
-
| `MEMINI_INJECT_LABELS` | — | comma-separated bullet labels: `tier`, `confidence`, `age`
|
|
67
|
-
| `MEMINI_TIMEOUT_MS` | `30000` | per-request timeout
|
|
68
|
-
| `MEMINI_FALLBACK` | on | `0`/`false` surfaces errors instead of degrading silently
|
|
69
|
-
| `MEMINI_API_KEY` | — | bearer token, if memini needs auth (sent as `Authorization: Bearer
|
|
70
|
-
| `MEMINI_REQUIRE_HTTPS` | — | `1` refuses to send the token over plaintext HTTP
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
`
|
|
75
|
-
|
|
56
|
+
| Env var | Default | Purpose |
|
|
57
|
+
| -------------------------------- | -------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
58
|
+
| `MEMINI_BASE_URL` | `http://localhost:8080` | memini REST base URL |
|
|
59
|
+
| `MEMINI_NAMESPACE` | unset (server handshake decides) | machine-local namespace override; the offline escape hatch when the server is unreachable |
|
|
60
|
+
| `MEMINI_HOME` | unset | caller's personal namespace, sent as `X-Memini-Home`; unset = no home leg |
|
|
61
|
+
| `MEMINI_RECALL` | on | `0`/`false` disables recall-before-turn |
|
|
62
|
+
| `MEMINI_CAPTURE` | on | `0`/`false` disables capture-after-turn |
|
|
63
|
+
| `MEMINI_RECALL_LIMIT` | `3` | max memories injected per turn |
|
|
64
|
+
| `MEMINI_INJECT_RECALL_MAX_TOK` | `0` | hard ceiling on recall-block tokens (`0` = unbounded); the tail is dropped with a footer |
|
|
65
|
+
| `MEMINI_INJECT_RECALL_MIN_SCORE` | `0` | fused-score floor (>=) sent as `min_score` to `/v1/search` |
|
|
66
|
+
| `MEMINI_INJECT_LABELS` | — | comma-separated bullet labels: `tier`, `confidence`, `age` |
|
|
67
|
+
| `MEMINI_TIMEOUT_MS` | `30000` | per-request timeout |
|
|
68
|
+
| `MEMINI_FALLBACK` | on | `0`/`false` surfaces errors instead of degrading silently |
|
|
69
|
+
| `MEMINI_API_KEY` | — | bearer token, if memini needs auth (sent as `Authorization: Bearer …`) |
|
|
70
|
+
| `MEMINI_REQUIRE_HTTPS` | — | `1` refuses to send the token over plaintext HTTP |
|
|
71
|
+
|
|
72
|
+
The namespace itself is resolved by the memini **server**, not this extension:
|
|
73
|
+
at the first turn the extension performs the config handshake
|
|
74
|
+
(`POST /v1/handshake`), sending the project's facts (git remote, toplevel,
|
|
75
|
+
cwd basename) and using whatever the server resolves — a pin recorded for this
|
|
76
|
+
project, `MEMINI_NAMESPACE` if exported, or derivation from the facts (repo
|
|
77
|
+
name, then toplevel basename, then cwd basename). The result is memoized in
|
|
78
|
+
memory for ten minutes. When the server is unreachable, the extension degrades
|
|
79
|
+
to the same chain locally: `MEMINI_NAMESPACE`, else git/cwd derivation — which
|
|
80
|
+
is why the env var is best thought of as the offline escape hatch, not the
|
|
81
|
+
primary lever.
|
|
76
82
|
|
|
77
83
|
### Commands
|
|
78
84
|
|
|
79
85
|
| Command | What it does |
|
|
80
86
|
| ------------------ | ------------------------------------------------------------------------------- |
|
|
81
87
|
| `memini:status` | Effective settings, the resolved namespace **and where it came from**, warnings |
|
|
82
|
-
| `memini:namespace` | Show, set, or clear the namespace
|
|
88
|
+
| `memini:namespace` | Show, set, or clear the server-side namespace pin for this project |
|
|
83
89
|
|
|
84
90
|
`memini:status` exists because a list of values is not enough to debug a namespace
|
|
85
|
-
problem. It shows provenance (`<- env` vs `(default)`), so a
|
|
86
|
-
exported once from a shell profile — which pins _every_ repo on
|
|
87
|
-
namespace — shows up as a warning rather than as a mystery.
|
|
91
|
+
problem. It shows provenance (`<- env` vs `<- server` vs `(default)`), so a
|
|
92
|
+
`MEMINI_NAMESPACE` exported once from a shell profile — which pins _every_ repo on
|
|
93
|
+
the machine to one namespace — shows up as a warning rather than as a mystery.
|
|
94
|
+
Secrets are redacted.
|
|
88
95
|
|
|
89
|
-
### The namespace
|
|
96
|
+
### The namespace pin
|
|
90
97
|
|
|
91
98
|
```
|
|
92
99
|
memini:namespace # show the namespace and where it came from
|
|
93
|
-
memini:namespace acme/api #
|
|
100
|
+
memini:namespace acme/api # pin this project to acme/api
|
|
94
101
|
memini:namespace --clear # back to automatic resolution
|
|
95
102
|
```
|
|
96
103
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
it.
|
|
104
|
+
The pin lives on the **memini server** (`PUT`/`DELETE /v1/pins`), keyed by the
|
|
105
|
+
project's git remote and/or toplevel path — so it follows you across machines,
|
|
106
|
+
and every client that handshakes for this project (Claude Code, this extension,
|
|
107
|
+
`memini doctor`) resolves the same value.
|
|
102
108
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
109
|
+
A pin beats `MEMINI_NAMESPACE` at handshake time, deliberately: a globally
|
|
110
|
+
exported `MEMINI_NAMESPACE` is exactly the problem a pin exists to solve, so if
|
|
111
|
+
the environment won, the command would silently do nothing on the machines that
|
|
112
|
+
need it. Setting or clearing a pin takes effect on the next turn — the write
|
|
113
|
+
drops the extension's in-memory handshake memo, so there is no restart or
|
|
114
|
+
ten-minute wait.
|
|
107
115
|
|
|
108
|
-
|
|
109
|
-
|
|
116
|
+
Because pins are server-side, setting one needs the server reachable. For an
|
|
117
|
+
offline, machine-local override, export `MEMINI_NAMESPACE` instead.
|
|
110
118
|
|
|
111
119
|
### Build & test
|
|
112
120
|
|