@scalableweb/companion 0.0.0-stage → 0.2.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Juho Vepsäläinen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,54 @@
1
- # Temporary Holding Version
1
+ # Scalable Web learning companion
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A private local notebook and optional Codex connection for [scalableweb.dev](https://scalableweb.dev).
4
+ Use Node.js 24 or newer.
5
+
6
+ ```sh
7
+ npx @scalableweb/companion@0.2.0 setup --notebook
8
+ npx @scalableweb/companion@0.2.0 start
9
+ ```
10
+
11
+ Pair the printed address and single-use code in **Notebook → Connect**.
12
+ Your notebook is stored in your per-user application data directory, independently of the current folder and npm's cache.
13
+ Stop the companion with Ctrl+C before backing up or migrating its directory.
14
+
15
+ For optional Codex access, install the verified Codex CLI 0.154.0 and use a dedicated profile:
16
+
17
+ ```sh
18
+ npm install -g @openai/codex@0.154.0
19
+ npx @scalableweb/companion@0.2.0 setup --codex
20
+ npx @scalableweb/companion@0.2.0 login
21
+ npx @scalableweb/companion@0.2.0 start
22
+ ```
23
+
24
+ Run `doctor` for local checks, or `doctor --json` for a report you choose whether to share.
25
+ Provider diagnostics, credentials, notes, conversations and connection tokens are excluded from that report.
26
+ `--directory`, `--port`, repeated `--origin`, `--codex-home` and `--model` allow explicit overrides.
27
+ `start --notebook` uses your notes without starting a model.
28
+
29
+ To migrate an existing repository notebook, stop its companion and provider process, then run:
30
+
31
+ ```sh
32
+ npx @scalableweb/companion@0.2.0 migrate --from /absolute/path/to/.local/learning-companion --confirm-stopped
33
+ ```
34
+
35
+ Migration retains the source and rejects a nonempty destination.
36
+ Updates retain the same notebook location; export a portable backup in the book before updating.
37
+ An unsupported newer database schema is rejected without rewriting it.
38
+
39
+ See [student setup and recovery](https://scalableweb.dev/notebook/setup/) for the full workflow.
40
+ Release metadata in `dist/release.json` identifies the source revision, package, protocol and storage schemas.
41
+ Model providers process the source and notebook entries you explicitly select; teachers and peers do not gain notebook access through course membership.
42
+
43
+ ## Version 0.2.0
44
+
45
+ The optional teaching assistant uses the shared study policy version 1: patient, curious, precise and constructive, with direct explanations available on request and source-grounded support for the current difficulty.
46
+ New exchanges retain the requested help, explicitly supplied note identities, teaching policy and Codex CLI version.
47
+ The book shows the source and selected notes before sending, and offers reviewed takeaways without saving a transcript as a reflection automatically.
48
+ Older replies retain their original history rather than being assigned the current policy.
49
+
50
+ Notebook storage, browser protocol, notebook/archive and conversation schemas remain version 1.
51
+ Codex CLI 0.154.0 remains the verified provider version; no new sign-in is needed when retaining the same dedicated profile.
52
+ Before updating from 0.1.0, export a notebook backup, stop the companion and privately copy its data directory and any external provider profile.
53
+ Start 0.2.0 with the same directory options and pair again; existing setup preferences and work remain available.
54
+ A website update alone does not update an installed companion.
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ // Keep this launcher parseable on older runtimes so prerequisite failures are useful.
3
+ if (Number(process.versions.node.split(".")[0]) < 24) {
4
+ console.error(
5
+ "The learning companion needs Node.js 24 or newer. Install Node 24, then rerun the same command. Your notebook was not opened.",
6
+ );
7
+ process.exitCode = 1;
8
+ } else {
9
+ try {
10
+ await import("../dist/companion.js");
11
+ } catch {
12
+ console.error(
13
+ "This companion installation is incomplete or unavailable on this runtime. Reinstall the documented package version; keep your notebook data directory.",
14
+ );
15
+ process.exitCode = 1;
16
+ }
17
+ }