@justfortytwo/installer 1.0.0-0 → 1.0.0-10
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 +163 -11
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +11 -8
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/forget.d.ts.map +1 -1
- package/dist/commands/forget.js +6 -4
- package/dist/commands/forget.js.map +1 -1
- package/dist/commands/init.d.ts +86 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +254 -56
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/pair.d.ts +8 -0
- package/dist/commands/pair.d.ts.map +1 -1
- package/dist/commands/pair.js +37 -3
- package/dist/commands/pair.js.map +1 -1
- package/dist/commands/start.d.ts +2 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +35 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/commands/status.d.ts +14 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +54 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/stop.d.ts +4 -0
- package/dist/commands/stop.d.ts.map +1 -0
- package/dist/commands/stop.js +34 -0
- package/dist/commands/stop.js.map +1 -0
- package/dist/commands/update.d.ts +6 -2
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +50 -11
- package/dist/commands/update.js.map +1 -1
- package/dist/engine.d.ts +32 -8
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +121 -29
- package/dist/engine.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -6
- package/dist/index.js.map +1 -1
- package/dist/oneiros.d.ts +2 -0
- package/dist/oneiros.d.ts.map +1 -0
- package/dist/oneiros.js +28 -0
- package/dist/oneiros.js.map +1 -0
- package/dist/render.d.ts +4 -3
- package/dist/render.d.ts.map +1 -1
- package/dist/render.js +13 -10
- package/dist/render.js.map +1 -1
- package/dist/runtime.d.ts +75 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +219 -0
- package/dist/runtime.js.map +1 -0
- package/dist/shim.d.ts +52 -0
- package/dist/shim.d.ts.map +1 -0
- package/dist/shim.js +163 -0
- package/dist/shim.js.map +1 -0
- package/package.json +7 -31
package/README.md
CHANGED
|
@@ -9,19 +9,55 @@ assistant built on Claude Code. One package ships two bins:
|
|
|
9
9
|
## Quick start
|
|
10
10
|
|
|
11
11
|
```sh
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
npx @justfortytwo/installer init # in a new, empty directory: capture your details,
|
|
13
|
+
# install the engine, scaffold the persona
|
|
14
|
+
fortytwo start # run fortytwo (foreground; Ctrl+C stops it)
|
|
15
|
+
fortytwo pair # in a second terminal: connect Telegram
|
|
15
16
|
```
|
|
16
17
|
|
|
18
|
+
`pair` prints a code; send `/login <code>` to your bot from the chat you want to
|
|
19
|
+
connect. Until then the bot ignores everyone, so it is safe to run `start`
|
|
20
|
+
before any chat is paired.
|
|
21
|
+
|
|
22
|
+
### The `fortytwo` command
|
|
23
|
+
|
|
24
|
+
No global npm install is involved. `init` does two things so `fortytwo` keeps
|
|
25
|
+
working after `npx` exits:
|
|
26
|
+
|
|
27
|
+
1. **Pins the CLI into the project.** `@justfortytwo/installer` is added to the
|
|
28
|
+
project's `package.json` at the exact version you ran (`--save-exact`), so
|
|
29
|
+
`package-lock.json` records it and every project runs its own version.
|
|
30
|
+
2. **Installs a small launcher** named `fortytwo` into a directory that is
|
|
31
|
+
already on your `PATH`: the first writable one of `~/.local/bin`, `~/bin`, or
|
|
32
|
+
npm's global bin directory (`npm prefix -g`/bin). Set `FORTYTWO_BIN_DIR` to
|
|
33
|
+
choose the directory yourself. Your shell config and `PATH` are never edited.
|
|
34
|
+
|
|
35
|
+
The launcher holds no version and no project path. It finds the Fortytwo project
|
|
36
|
+
you are in (the nearest directory, from the current one upward, that contains
|
|
37
|
+
`.fortytwo/`) and runs that project's own `node_modules/.bin/fortytwo` from the
|
|
38
|
+
project root (only if you own that project's `.fortytwo/` and CLI, so code
|
|
39
|
+
another user plants in a shared directory such as `/tmp` is never run), so several projects can sit side by side on different versions.
|
|
40
|
+
Outside a project it exits with an error and runs nothing. It is one shared
|
|
41
|
+
file, refreshed on every `init`, and it never replaces a `fortytwo` it did not
|
|
42
|
+
write. If no directory on your `PATH` is writable, `init` says so and tells you to
|
|
43
|
+
use `npx fortytwo …` from the project, which runs the same pinned CLI without
|
|
44
|
+
downloading. `fortytwo --version` prints the version the current project runs.
|
|
45
|
+
|
|
46
|
+
To remove it: delete the launcher (`init` prints its path) and, per project,
|
|
47
|
+
`npm uninstall @justfortytwo/installer`.
|
|
48
|
+
|
|
17
49
|
You only install **this** package — `init` installs the engine packages it needs
|
|
18
50
|
on demand (`@justfortytwo/gate`, `/memory`, `/persona`, `/telegram`, `/scheduler`).
|
|
19
|
-
During the 1.0 pre-release, `/telegram`
|
|
20
|
-
|
|
51
|
+
During the 1.0 pre-release, `/telegram`, `/scheduler` and `/persona` are pinned
|
|
52
|
+
to exact pre-release versions (see `fortytwo.compat` in `package.json`); telegram
|
|
53
|
+
and scheduler pull in `@justfortytwo/runner` themselves, so the installer never
|
|
54
|
+
installs runner directly. Engine versions live only in `package.json`
|
|
55
|
+
`fortytwo.compat` (not in `peerDependencies`), so upgrading the installer never
|
|
56
|
+
trips npm's peer resolution. Pass
|
|
21
57
|
`--no-install` to manage them yourself, and `--yes` (with `--answers <file.json>`
|
|
22
58
|
or `FORTYTWO_*` env) for non-interactive installs. Point the memory engine at a
|
|
23
59
|
remote embedder with `--ollama-base-url https://host` (threaded into `.mcp.json`,
|
|
24
|
-
so the memory MCP server uses it), and pre-seed the optional Telegram channel
|
|
60
|
+
so the memory MCP server uses it — see [The embedder](#the-embedder)), and pre-seed the optional Telegram channel
|
|
25
61
|
with `--telegram-bot-token <token>` / `--allowed-chat-ids <ids>` (or the matching
|
|
26
62
|
env vars) — secrets are written to the gitignored `.env`, never prompted.
|
|
27
63
|
|
|
@@ -48,8 +84,11 @@ gitignored `.fortytwo/identity.json`; neither is ever committed.
|
|
|
48
84
|
|
|
49
85
|
| Verb | What it does |
|
|
50
86
|
|------------|--------------|
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
87
|
+
| `start` | Run fortytwo in the foreground: load the project `.env` (the shell/container env wins over it), start every installed and configured service (the Telegram bridge needs `TELEGRAM_BOT_TOKEN`; the scheduler daemon needs nothing), prefix and forward their logs, and stop them all on Ctrl+C/SIGTERM. If a service exits, the others are stopped and `start` exits non-zero. It never daemonizes or restarts anything — see [Running as a service](#running-as-a-service). |
|
|
88
|
+
| `status` | Show whether fortytwo, the Telegram bridge and the scheduler are running, and whether memory is configured. Exits 0 when `fortytwo start` is running, 3 when not (usable as a health check). |
|
|
89
|
+
| `stop` | Stop the `fortytwo start` running for this project. It signals only the process recorded in `.fortytwo/runtime.json`, and only while that record's heartbeat is fresh; it never looks for processes by name. |
|
|
90
|
+
| `init` | Install any missing engine packages, pin this CLI into the project and install the `fortytwo` launcher (see [The `fortytwo` command](#the-fortytwo-command)), then capture your assistant's name + owner details (interactive, or via flags/env for CI). Writes `.fortytwo/identity.json`, secrets + `ALLOWED_CHAT_IDS` to `.env`, wires `.mcp.json`, renders the persona, provisions local infra (pulls the embedder model, migrates the memory DB), and records the installed version set. |
|
|
91
|
+
| `pair` | Issue a one-time `/login` pairing code, persisted to the bridge's bindings db so the running bridge can redeem it (the dynamic counterpart to the static `ALLOWED_CHAT_IDS` allowlist). Refuses, and tells you to run `fortytwo start`, when Telegram isn't running; `--force` issues a code anyway (for a bridge you run yourself). |
|
|
53
92
|
| `doctor` | Health-check the engine: assert the gate's `POLICY_SCHEMA_VERSION` and memory's `MEMORY_TOOL_CONTRACT_VERSION` match what this CLI expects, confirm the memory DB is migrated, cross-check installed sibling versions against the declared compatibility ranges, and check the embedder model is pulled (warn-only). |
|
|
54
93
|
| `update` | Resolve the latest in-range version of each **installed** engine package, install it, rotate the rollback baseline, then run `doctor` to verify. `--dry-run` reports the resolved set without installing. |
|
|
55
94
|
| `rollback` | Re-install the previous version set recorded before the last `update`, then run `doctor`. Manual by design — never auto-triggered, so you can inspect a bad upgrade first. |
|
|
@@ -59,13 +98,90 @@ gitignored `.fortytwo/identity.json`; neither is ever committed.
|
|
|
59
98
|
|
|
60
99
|
Run `fortytwo <verb> --help` for verb-specific options.
|
|
61
100
|
|
|
62
|
-
> **Status:** `init`, `
|
|
63
|
-
> `rollback` are functional — `update` resolves latest-in-range from npm,
|
|
101
|
+
> **Status:** `init`, `start`, `status`, `stop`, `pair`, `doctor`, `forget`,
|
|
102
|
+
> `unbind`, `update`, and `rollback` are functional — `update` resolves latest-in-range from npm,
|
|
64
103
|
> installs, rotates the rollback ledger, and post-verifies with `doctor`;
|
|
65
104
|
> `rollback` restores the recorded previous set. `enrich` is still a stub.
|
|
66
105
|
|
|
106
|
+
## Running as a service
|
|
107
|
+
|
|
108
|
+
`fortytwo start` stays in the foreground on purpose, so the thing that runs it
|
|
109
|
+
owns restarts and logs. Use it directly as the service command:
|
|
110
|
+
|
|
111
|
+
```yaml
|
|
112
|
+
# docker-compose.yml (excerpt)
|
|
113
|
+
services:
|
|
114
|
+
fortytwo:
|
|
115
|
+
command: ["npx", "fortytwo", "start"] # the project's pinned CLI; no download
|
|
116
|
+
working_dir: /workspace # the project init was run in
|
|
117
|
+
init: true # reap processes the bridge's Claude sessions leave
|
|
118
|
+
restart: unless-stopped
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
```ini
|
|
122
|
+
# systemd unit (excerpt)
|
|
123
|
+
[Service]
|
|
124
|
+
WorkingDirectory=/path/to/project
|
|
125
|
+
ExecStart=/usr/bin/env npx fortytwo start
|
|
126
|
+
Restart=on-failure
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
`npx fortytwo` passes SIGTERM through. Use `["fortytwo", "start"]` only if the
|
|
130
|
+
image itself ran `init` (so the launcher is on the container's `PATH`).
|
|
131
|
+
|
|
132
|
+
On SIGTERM it stops its services (SIGKILL after 10 s) and exits 0; if a service
|
|
133
|
+
dies on its own, it stops the rest and exits non-zero, so `restart` policies
|
|
134
|
+
kick in. Use `docker compose stop` / `systemctl stop` there rather than
|
|
135
|
+
`fortytwo stop`.
|
|
136
|
+
|
|
137
|
+
**Environment precedence** for the services: the process env (shell, container,
|
|
138
|
+
systemd `Environment=`) > the project `.env` > defaults. `FORTYTWO_ROOT`
|
|
139
|
+
defaults to the project directory. You never need to `source .env` yourself.
|
|
140
|
+
|
|
141
|
+
### Advanced: running a service by hand
|
|
142
|
+
|
|
143
|
+
For development and debugging, each service still ships its own bin. They do not
|
|
144
|
+
load `.env`, so export it and `FORTYTWO_ROOT` yourself:
|
|
145
|
+
|
|
146
|
+
```sh
|
|
147
|
+
set -a; . ./.env; set +a
|
|
148
|
+
FORTYTWO_ROOT=$PWD npx fortytwo-telegram-bridge # Telegram bridge only
|
|
149
|
+
npx fortytwo-scheduler # scheduler daemon only
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
`fortytwo status` won't show a hand-run bridge, and `fortytwo pair` needs
|
|
153
|
+
`--force` to issue a code for it.
|
|
154
|
+
|
|
67
155
|
## Update safety
|
|
68
156
|
|
|
157
|
+
From the project root, bootstrap installations pinned to installer `1.0.0-9`
|
|
158
|
+
into this coordinated release (after publication):
|
|
159
|
+
|
|
160
|
+
```sh
|
|
161
|
+
fortytwo stop
|
|
162
|
+
npx @justfortytwo/installer@1.0.0-10 update
|
|
163
|
+
fortytwo start
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
The old CLI cannot discover a new installer's exact compatibility matrix, so this
|
|
167
|
+
one-time explicit version is necessary. No re-exec, manual npm install or init is needed. The invoked installer refuses a live runtime, persists its own newer
|
|
168
|
+
version with `npm install --save-exact`, and continues in the same process using
|
|
169
|
+
its own compatibility matrix. This updates package.json, package-lock.json and
|
|
170
|
+
the project-local CLI used by the existing launcher. Verify with
|
|
171
|
+
`fortytwo --version`. Repeated updates skip installer installation when equal;
|
|
172
|
+
invoking an older installer is refused. `--dry-run` writes no project state.
|
|
173
|
+
|
|
174
|
+
Later project-local `fortytwo update` uses the new matrix. Discovery of future
|
|
175
|
+
installer releases/channels is a separate policy; this command does not query
|
|
176
|
+
for newer installer versions. Engine rollback does not roll back the installer.
|
|
177
|
+
If a later engine step fails, fix the reported error and retry update while
|
|
178
|
+
services remain stopped; the persisted installer stays available.
|
|
179
|
+
|
|
180
|
+
Update never calls init or blanket-renders persona context. `UpdateDeps.reconcile`
|
|
181
|
+
is the seam for explicit, idempotent machine-owned asset/state migrations,
|
|
182
|
+
including Oneiros checkpoint initialization and job seeding. Curated context
|
|
183
|
+
remains untouched.
|
|
184
|
+
|
|
69
185
|
Distribution follows a **semver-ranges, latest-compatible** policy — there is no
|
|
70
186
|
curated bill-of-materials. `update` installs the latest in-range version of each
|
|
71
187
|
engine package and then runs `doctor` as a post-install health check. **Rollback
|
|
@@ -76,7 +192,24 @@ is manual**: the prior version set is recorded before every update, so
|
|
|
76
192
|
|
|
77
193
|
The engine uses a **local** embedder for privacy — personal data never leaves
|
|
78
194
|
your machine. The standard model is `qwen3-embedding:0.6b`, served by Ollama;
|
|
79
|
-
`init`
|
|
195
|
+
`init` makes sure it is available and `doctor` verifies it.
|
|
196
|
+
|
|
197
|
+
`init` asks where Ollama runs:
|
|
198
|
+
|
|
199
|
+
```
|
|
200
|
+
Ollama base URL — where the embedder runs (Enter for http://localhost:11434):
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Press Enter for a local install, or type another endpoint — e.g.
|
|
204
|
+
`http://ollama:11434` when Ollama runs in a sibling container. The default shown
|
|
205
|
+
is `$OLLAMA_BASE_URL` if it is set, else the URL already saved in `.env` by a
|
|
206
|
+
previous `init` (so re-running and pressing Enter keeps it), else
|
|
207
|
+
`http://localhost:11434`; an explicit
|
|
208
|
+
`--ollama-base-url <url>` skips the question, and `--yes`/non-TTY runs use the
|
|
209
|
+
default. The chosen URL is written to both `.env` and the memory server's
|
|
210
|
+
`.mcp.json` entry, and `init` checks for the model on **that** server
|
|
211
|
+
(`GET /api/tags`), pulling it there over HTTP (`POST /api/pull`) only if it is
|
|
212
|
+
missing — the `ollama` CLI is not needed on the installer's machine.
|
|
80
213
|
|
|
81
214
|
## Requirements
|
|
82
215
|
|
|
@@ -93,3 +226,22 @@ MIT © 2026 Enrico Deleo
|
|
|
93
226
|
---
|
|
94
227
|
|
|
95
228
|
Created and maintained by [**Enrico Deleo**](https://enricodeleo.com).
|
|
229
|
+
|
|
230
|
+
## Oneiros installation and upgrades
|
|
231
|
+
|
|
232
|
+
Init automatically initializes Oneiros at the current memory head and seeds one
|
|
233
|
+
`persona.oneiros` scheduler job, with no extra questions. An empty DB starts at
|
|
234
|
+
zero; an existing DB starts at its current insertion high watermark.
|
|
235
|
+
|
|
236
|
+
Update never re-renders persona/context files. After package installation and
|
|
237
|
+
health checks it initializes only missing Oneiros state and reconciles the job.
|
|
238
|
+
Unchanged-version updates also reconcile incomplete wiring, while dry-run does
|
|
239
|
+
not mutate anything. Existing checkpoints and curated context are preserved;
|
|
240
|
+
historical memory is never replayed implicitly.
|
|
241
|
+
|
|
242
|
+
Existing installations first need the updated installer (`1.0.0-10`); the CLI
|
|
243
|
+
is project-pinned and `fortytwo update` does not update that CLI. Once these
|
|
244
|
+
coordinated versions are released, use the new CLI, stop services with
|
|
245
|
+
`fortytwo stop` (or the service manager), run `fortytwo update`, then restart via
|
|
246
|
+
`fortytwo start`. Update refuses live services before changing anything so an
|
|
247
|
+
old scheduler cannot claim jobs it does not understand. No second init is needed.
|
|
@@ -24,6 +24,8 @@ export interface DoctorDeps {
|
|
|
24
24
|
compatRanges: Record<string, string>;
|
|
25
25
|
/** Installed Ollama model names, or null if unreachable. */
|
|
26
26
|
ollamaModels: () => Promise<string[] | null>;
|
|
27
|
+
/** The Ollama endpoint ollamaModels queries (named in the embedder check's detail). */
|
|
28
|
+
ollamaBaseUrl?: string;
|
|
27
29
|
embedModel: string;
|
|
28
30
|
migrationState: () => Promise<MigrationState>;
|
|
29
31
|
/** Returns the parsed heartbeat, or null if missing/unreadable. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAeA,OAAO,EAEkD,KAAK,cAAc,EAC3E,MAAM,cAAc,CAAC;AAQtB,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,OAAO,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QAAS,CAAC;AAEzC,qEAAqE;AACrE,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,OAAO,CAAC;QAAE,qBAAqB,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IACnE,UAAU,EAAE,MAAM,OAAO,CAAC;QAAE,4BAA4B,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IAC5E,gBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IAClD,uEAAuE;IACvE,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,4DAA4D;IAC5D,YAAY,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,OAAO,CAAC,cAAc,CAAC,CAAC;IAC9C,mEAAmE;IACnE,kBAAkB,EAAE,MAAM;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAC7D,iDAAiD;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sB,eAAe,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,WAAW,EAAE,CAAC;IAAC,EAAE,EAAE,OAAO,CAAA;CAAE,CAAC,CAWxG;AAED,4EAA4E;AAC5E,wBAAgB,iBAAiB,IAAI,UAAU,CA0B9C;AAED,wBAAsB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAQhE"}
|
package/dist/commands/doctor.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import { readFileSync } from 'node:fs';
|
|
14
14
|
import { dirname, join } from 'node:path';
|
|
15
15
|
import { loadGate, loadMemory, readInstalledVersion, readSelfCompatRanges, satisfiesRange, fetchOllamaModels, readMigrationState, } from '../engine.js';
|
|
16
|
-
import { EMBED_MODEL, DEFAULT_OLLAMA_BASE_URL, DEFAULT_DB_PATH } from './init.js';
|
|
16
|
+
import { EMBED_MODEL, DEFAULT_OLLAMA_BASE_URL, DEFAULT_DB_PATH, readProjectSetting } from './init.js';
|
|
17
17
|
// The contract versions this CLI was authored against. A sibling advertising a
|
|
18
18
|
// different MAJOR has broken the contract — doctor must flag it loudly.
|
|
19
19
|
const EXPECTED_POLICY_SCHEMA = 1;
|
|
@@ -48,7 +48,7 @@ async function checkMemoryContract(deps) {
|
|
|
48
48
|
return { name, ok: true, required: true, detail: `memory present, tool contract v${v}` };
|
|
49
49
|
}
|
|
50
50
|
async function checkCompat(deps) {
|
|
51
|
-
const name = '
|
|
51
|
+
const name = 'fortytwo.compat';
|
|
52
52
|
const drift = [];
|
|
53
53
|
const seen = [];
|
|
54
54
|
for (const [spec, range] of Object.entries(deps.compatRanges)) {
|
|
@@ -69,13 +69,14 @@ async function checkEmbedder(deps) {
|
|
|
69
69
|
// fallback) but never blocks the assistant — mirrors wakeup.sh.
|
|
70
70
|
const name = 'embedder model';
|
|
71
71
|
const models = await deps.ollamaModels();
|
|
72
|
+
const at = deps.ollamaBaseUrl ? ` at ${deps.ollamaBaseUrl}` : '';
|
|
72
73
|
if (models === null) {
|
|
73
|
-
return { name, ok: false, required: false, detail:
|
|
74
|
+
return { name, ok: false, required: false, detail: `Ollama unreachable${at} (semantic recall will degrade)` };
|
|
74
75
|
}
|
|
75
76
|
if (!models.includes(deps.embedModel)) {
|
|
76
|
-
return { name, ok: false, required: false, detail: `model ${deps.embedModel} not pulled (run: ollama pull ${deps.embedModel})` };
|
|
77
|
+
return { name, ok: false, required: false, detail: `model ${deps.embedModel} not pulled${at} (run: ollama pull ${deps.embedModel})` };
|
|
77
78
|
}
|
|
78
|
-
return { name, ok: true, required: false, detail: `${deps.embedModel} present` };
|
|
79
|
+
return { name, ok: true, required: false, detail: `${deps.embedModel} present${at}` };
|
|
79
80
|
}
|
|
80
81
|
async function checkMigrations(deps) {
|
|
81
82
|
const name = 'db migrations';
|
|
@@ -124,9 +125,10 @@ export async function runDoctorChecks(deps) {
|
|
|
124
125
|
}
|
|
125
126
|
/** Wire the real engine siblings, Ollama, and memory DB into the checks. */
|
|
126
127
|
export function defaultDoctorDeps() {
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
const
|
|
128
|
+
// Shell env first, else what init saved in the project's .env.
|
|
129
|
+
const ollamaBaseUrl = readProjectSetting('OLLAMA_BASE_URL') ?? DEFAULT_OLLAMA_BASE_URL;
|
|
130
|
+
const dbPath = readProjectSetting('DB_PATH') ?? DEFAULT_DB_PATH;
|
|
131
|
+
const embedModel = readProjectSetting('EMBED_MODEL') ?? EMBED_MODEL;
|
|
130
132
|
// Must match heartbeatPath() in @justfortytwo/scheduler/src/heartbeat.ts.
|
|
131
133
|
const hbPath = join(dirname(dbPath), 'scheduler.heartbeat');
|
|
132
134
|
return {
|
|
@@ -135,6 +137,7 @@ export function defaultDoctorDeps() {
|
|
|
135
137
|
installedVersion: readInstalledVersion,
|
|
136
138
|
compatRanges: readSelfCompatRanges(),
|
|
137
139
|
ollamaModels: () => fetchOllamaModels(ollamaBaseUrl),
|
|
140
|
+
ollamaBaseUrl,
|
|
138
141
|
embedModel,
|
|
139
142
|
migrationState: () => readMigrationState(dbPath),
|
|
140
143
|
schedulerHeartbeat: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,oFAAoF;AACpF,EAAE;AACF,8EAA8E;AAC9E,2EAA2E;AAC3E,wCAAwC;AACxC,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;AAChF,gFAAgF;AAChF,+EAA+E;AAC/E,2EAA2E;AAE3E,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EACL,QAAQ,EAAE,UAAU,EAAE,oBAAoB,EAAE,oBAAoB,EAChE,cAAc,EAAE,iBAAiB,EAAE,kBAAkB,GACtD,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../src/commands/doctor.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,oFAAoF;AACpF,EAAE;AACF,8EAA8E;AAC9E,2EAA2E;AAC3E,wCAAwC;AACxC,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;AAChF,gFAAgF;AAChF,+EAA+E;AAC/E,2EAA2E;AAE3E,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EACL,QAAQ,EAAE,UAAU,EAAE,oBAAoB,EAAE,oBAAoB,EAChE,cAAc,EAAE,iBAAiB,EAAE,kBAAkB,GACtD,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,uBAAuB,EAA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commands/forget.js
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
// delete (row + vector + FTS) via @justfortytwo/memory's deleteByIds.
|
|
9
9
|
import { createInterface } from 'node:readline/promises';
|
|
10
10
|
import { loadMemory } from '../engine.js';
|
|
11
|
-
import { EMBED_MODEL, DEFAULT_DB_PATH } from './init.js';
|
|
11
|
+
import { EMBED_MODEL, DEFAULT_DB_PATH, readProjectSetting } from './init.js';
|
|
12
12
|
export function parseForgetArgs(argv) {
|
|
13
|
-
const f = { limit: 50, dbPath:
|
|
13
|
+
const f = { limit: 50, dbPath: readProjectSetting('DB_PATH') ?? DEFAULT_DB_PATH };
|
|
14
14
|
for (let i = 0; i < argv.length; i++) {
|
|
15
15
|
const a = argv[i];
|
|
16
16
|
if (a === undefined)
|
|
@@ -73,8 +73,10 @@ export async function runForget(argv) {
|
|
|
73
73
|
rows = (await mem.query(h, { liveOnly: false, limit: 100000 })).filter((r) => r.id === f.id);
|
|
74
74
|
}
|
|
75
75
|
else if (f.query) {
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
// Shell env first, else the project's .env (the same model/endpoint init configured).
|
|
77
|
+
const embedModel = readProjectSetting('EMBED_MODEL');
|
|
78
|
+
const embedder = embedModel
|
|
79
|
+
? new mem.OllamaEmbedder(embedModel, readProjectSetting('OLLAMA_BASE_URL'))
|
|
78
80
|
: new mem.FakeEmbedder();
|
|
79
81
|
rows = await mem.recall(h, embedder, f.query, f.limit);
|
|
80
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forget.js","sourceRoot":"","sources":["../../src/commands/forget.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,EAAE;AACF,+EAA+E;AAC/E,+EAA+E;AAC/E,2EAA2E;AAC3E,6EAA6E;AAC7E,gFAAgF;AAChF,sEAAsE;AAEtE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAA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AAW,EAAE,CAAC;YAC9G,EAAE,CAAC,KAAK,EAAE,CAAC;YACX,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,KAAK,EAAE,CAAC;gBACjC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;gBAC5D,OAAO,CAAC,CAAC;YACX,CAAC;QACH,CAAC;QAED,MAAM,CAAC,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACpD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;QACrD,OAAO,CAAC,CAAC;IACX,CAAC;YAAS,CAAC;QACT,IAAI,CAAC;YAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC;QAC3D,IAAI,CAAC;YAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;QAAC,CAAC;QAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC;IAClD,CAAC;AACH,CAAC"}
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Answers, VersionPin } from '../state.js';
|
|
2
|
+
import { type ShimResult } from '../shim.js';
|
|
2
3
|
export declare const EMBED_MODEL = "qwen3-embedding:0.6b";
|
|
3
4
|
export declare const DEFAULT_OLLAMA_BASE_URL = "http://localhost:11434";
|
|
4
5
|
export declare const DEFAULT_DB_PATH = "db/fortytwo.db";
|
|
@@ -48,6 +49,42 @@ export declare function buildMcpConfig(existing: McpConfig | null, opts: {
|
|
|
48
49
|
export declare function buildVersionPins(compatRanges: Record<string, string>, readVersion: (spec: string) => string | null): VersionPin[];
|
|
49
50
|
/** Engine packages (from compat ranges) not yet resolvable, as `name@range` install specs. */
|
|
50
51
|
export declare function engineInstallSpecs(compatRanges: Record<string, string>, isPresent: (spec: string) => boolean): string[];
|
|
52
|
+
export declare const CLI_PACKAGE = "@justfortytwo/installer";
|
|
53
|
+
/**
|
|
54
|
+
* The install spec that pins this CLI into the project (so node_modules/.bin/
|
|
55
|
+
* fortytwo exists and package-lock.json records it), or null when the project
|
|
56
|
+
* already has exactly this version. `override` (FORTYTWO_INSTALLER_SPEC) lets a
|
|
57
|
+
* dev/CI run install a local tarball instead of the registry copy.
|
|
58
|
+
*/
|
|
59
|
+
export declare function cliInstallSpec(selfVersion: string | null, installedVersion: string | null, override?: string): string | null;
|
|
60
|
+
/** Ollama HTTP calls ensureEmbedModel makes (injectable for tests). */
|
|
61
|
+
export interface EmbedModelDeps {
|
|
62
|
+
listModels: (baseUrl: string) => Promise<string[] | null>;
|
|
63
|
+
pullModel: (baseUrl: string, model: string) => Promise<string | null>;
|
|
64
|
+
log: (line: string) => void;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Make sure `model` is available on the Ollama server at `baseUrl` — the SAME
|
|
68
|
+
* endpoint written to .env and .mcp.json. Checks /api/tags first and pulls (over
|
|
69
|
+
* HTTP, on that server) only when missing. Warn-only: returns a status note.
|
|
70
|
+
*/
|
|
71
|
+
export declare function ensureEmbedModel(baseUrl: string, model: string, deps?: EmbedModelDeps): Promise<string>;
|
|
72
|
+
/**
|
|
73
|
+
* A list field's manifest prompt without its "one per line" hint. readline is
|
|
74
|
+
* single-line (Enter — or Shift+Enter in many terminals — submits), so that hint
|
|
75
|
+
* promised input the UI can't take; askList gives the real instructions instead.
|
|
76
|
+
*/
|
|
77
|
+
export declare function listPromptLabel(prompt: string): string;
|
|
78
|
+
/**
|
|
79
|
+
* Collect a list one item per prompt; a blank entry ends it. Each answer is ONE
|
|
80
|
+
* item, verbatim (trimmed) — commas inside it are kept. A required list re-asks
|
|
81
|
+
* on an immediate blank instead of returning []. Pure: `ask` is injected.
|
|
82
|
+
*/
|
|
83
|
+
export declare function askList(label: string, ask: (prompt: string) => Promise<string>, opts?: {
|
|
84
|
+
required?: boolean;
|
|
85
|
+
}): Promise<string[]>;
|
|
86
|
+
/** Ask for the required fields still missing, in order; lists item by item. Pure: `ask` is injected. */
|
|
87
|
+
export declare function askMissingAnswers(fields: ManifestField[], missing: string[], answers: Answers, ask: (prompt: string) => Promise<string>): Promise<void>;
|
|
51
88
|
/**
|
|
52
89
|
* Interactively offer to capture the OPTIONAL Telegram channel secrets that
|
|
53
90
|
* weren't already supplied (via `--telegram-bot-token` / `--allowed-chat-ids` or
|
|
@@ -56,5 +93,54 @@ export declare function engineInstallSpecs(compatRanges: Record<string, string>,
|
|
|
56
93
|
* secrets to ADD (existing ones are never re-prompted).
|
|
57
94
|
*/
|
|
58
95
|
export declare function collectChannelSecrets(existing: Record<string, string>, ask: (prompt: string) => Promise<string>): Promise<Record<string, string>>;
|
|
96
|
+
/** The value of `key` in .env content (last assignment wins; surrounding quotes stripped), or undefined. */
|
|
97
|
+
export declare function readEnvValue(content: string, key: string): string | undefined;
|
|
98
|
+
/** All `KEY=value` assignments in .env content (last wins; surrounding quotes stripped; other lines ignored). */
|
|
99
|
+
export declare function parseEnvContent(content: string): Record<string, string>;
|
|
100
|
+
/**
|
|
101
|
+
* A runtime setting for a command run inside the project: the shell env wins,
|
|
102
|
+
* else the value `init` saved in `<root>/.env`. The CLI never loads .env into
|
|
103
|
+
* process.env, so without this fallback doctor/forget silently used defaults
|
|
104
|
+
* (e.g. localhost Ollama) whenever the variable was not exported.
|
|
105
|
+
*/
|
|
106
|
+
export declare function readProjectSetting(key: string, root?: string): string | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* Choose the Ollama endpoint for this init. Precedence:
|
|
109
|
+
* 1. an explicit `--ollama-base-url` — used as-is, never re-asked;
|
|
110
|
+
* 2. interactive: ask, with a default of the inherited OLLAMA_BASE_URL env,
|
|
111
|
+
* else the value already saved in the project's .env (so re-running init
|
|
112
|
+
* and pressing Enter keeps a custom endpoint), else http://localhost:11434;
|
|
113
|
+
* a typed URL is used exactly as entered (an invalid one is re-asked, up to
|
|
114
|
+
* 3 tries);
|
|
115
|
+
* 3. non-interactive (`ask` absent): that same default.
|
|
116
|
+
* Pure: `ask` is injected, so it unit-tests without a TTY.
|
|
117
|
+
*/
|
|
118
|
+
export declare function resolveOllamaBaseUrl(opts: {
|
|
119
|
+
flag?: string;
|
|
120
|
+
env?: string;
|
|
121
|
+
/** OLLAMA_BASE_URL already in the project's .env (from a previous init). */
|
|
122
|
+
saved?: string;
|
|
123
|
+
ask?: (prompt: string) => Promise<string>;
|
|
124
|
+
}): Promise<string>;
|
|
125
|
+
/**
|
|
126
|
+
* The closing "what now" lines. Points at the user-facing lifecycle
|
|
127
|
+
* (`fortytwo start`, `fortytwo pair`), never at the internal service bins.
|
|
128
|
+
* Telegram is optional: its bridge only starts with TELEGRAM_BOT_TOKEN, so say
|
|
129
|
+
* so here rather than let `start` skip it silently.
|
|
130
|
+
*/
|
|
131
|
+
export declare function nextSteps(o: {
|
|
132
|
+
hasBotToken: boolean;
|
|
133
|
+
allowedChatIds?: string;
|
|
134
|
+
cmd?: string;
|
|
135
|
+
}): string[];
|
|
136
|
+
/**
|
|
137
|
+
* The init report line for the user-level launcher, and the command to tell the
|
|
138
|
+
* user to type: `fortytwo` when our launcher is on PATH, else `npx fortytwo`
|
|
139
|
+
* (which runs the project-local CLI with no download).
|
|
140
|
+
*/
|
|
141
|
+
export declare function shimReport(r: ShimResult): {
|
|
142
|
+
line: string;
|
|
143
|
+
cmd: string;
|
|
144
|
+
};
|
|
59
145
|
export declare function runInit(argv: string[]): Promise<number>;
|
|
60
146
|
//# sourceMappingURL=init.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAY,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAMj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