@learnaltitude/cli 0.4.0 → 0.5.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.
Files changed (3) hide show
  1. package/README.md +58 -45
  2. package/dist/cli.js +29 -31
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -21,10 +21,14 @@ altitude connect --agent claude-code
21
21
  altitude connect --agent codex
22
22
  ```
23
23
 
24
- Use one command, not both. Codex requires Codex CLI 0.131.0 or newer; its adapter-native connect
25
- command enforces that floor, while the raw terminal command does not. Connecting stores a scoped
26
- bearer token in the CLI data directory (by default, `~/.altitude/token.json`) with owner-only
27
- permissions; it does not activate hooks in every directory.
24
+ Use one command, not both. Codex must meet the current compatibility floor documented on the
25
+ [W2 card](../../docs/BUILD-PLAN.md#w2--codex-adapter-config-only-by-mandate). Adapter-native
26
+ connect declares the detected version; the server refuses a parseable version below its floor
27
+ with server-authored remediation. The raw terminal command stamps the version as `"unknown"`,
28
+ which deliberately remains pairable. Other JSON connection failures likewise print the server's
29
+ message; non-JSON failures retain the HTTP status line. Connecting stores a scoped bearer token
30
+ in the CLI data directory (by default, `~/.altitude/token.json`) with owner-only permissions; it
31
+ does not activate hooks in every directory.
28
32
 
29
33
  A directory declares WHICH journey it works. From the root of the project, pick from your
30
34
  journey list:
@@ -64,70 +68,79 @@ that includes the nearest binding plus the bound journey's cached working-set su
64
68
  requires a connected device token; the command tells unconnected users to connect and directs
65
69
  users without a bindable journey back to Altitude.
66
70
 
67
- The envelope also carries `update_available`, a client-local boolean: true when a **copied** skills
68
- install (or the CLI itself) is behind what the last background version check saw upstream. It is
69
- read from the local update-check cache only — `altitude task` never makes a version request, so a
70
- lesson never waits on one and it is always false for marketplace/plugin-managed skills, which
71
- update with the agent rather than through `altitude update`.
71
+ The envelope also carries `update_available`, a client-local boolean that is true when the CLI is
72
+ behind the latest npm version seen by the last background version check. It is read from the local
73
+ update-check cache only — `altitude task` never makes a version request, so a lesson never waits on
74
+ one. Skills update separately through the agent's plugin system.
72
75
 
73
- Tutor flows can attach a graded answer to its canonical concepts so the server can update the
74
- corresponding mastery cards:
76
+ Tutor flows can attach the learner's verbatim answer to its canonical concepts. The tutor does
77
+ not grade the answer; grading and any resulting mastery update are server-side:
75
78
 
76
79
  ```sh
77
80
  altitude emit quiz-moment --session <id> --question <q> --answer <a> \
78
- --verdict <correct|partial|incorrect> --concepts <id,...>
81
+ --concepts <id,...>
79
82
  ```
80
83
 
81
84
  `--concepts` accepts comma-separated IDs or repeated flags. The CLI trims empty entries, removes
82
85
  duplicates in first-seen order, and omits `concept_ids` when no non-empty ID is supplied.
83
86
 
84
- ## Copied skills installs and updates
87
+ ## Plugin marketplace installs and updates
85
88
 
86
- Claude Code marketplace installs remain the recommended Claude path and update through that
87
- marketplace. For Codex or a manual Claude Code copy, install the public skills through the target
88
- declaration shipped by the relevant adapter:
89
+ Install the Altitude plugin exclusively through the marketplace built into your coding agent. In
90
+ Claude Code, run:
91
+
92
+ ```text
93
+ /plugin marketplace add jasonku09/altitude-skills
94
+ /plugin install altitude@altitude
95
+ ```
96
+
97
+ For Codex, run these commands in a terminal:
89
98
 
90
99
  ```sh
91
- altitude skills install --adapter-config /path/to/adapter/skills-install.json
100
+ codex plugin marketplace add jasonku09/altitude-skills
101
+ codex plugin add altitude@altitude
92
102
  ```
93
103
 
94
- The first install remembers the resolved target in the CLI data directory (by default,
95
- `~/.altitude/skills-manifest.json`), including the exact `jasonku09/altitude-skills` commit and a
96
- SHA-256 content hash for every managed file. Later updates need no adapter flag:
104
+ On the first Codex launch after installation, accept the one-time
105
+ `Hooks need review -> Trust all and continue` prompt. Skills update with the agent's plugin system.
106
+
107
+ **Neither half updates on its own by default.** Claude Code enables marketplace auto-update only
108
+ for official Anthropic marketplaces; `altitude` is third-party, so its auto-update starts off.
109
+ Turn it on once — run `/plugin` in Claude Code, open Marketplaces → altitude, enable auto-update —
110
+ and the plugin then follows releases without further prompting.
111
+
112
+ The globally installed Altitude CLI never updates itself. To move it:
97
113
 
98
114
  ```sh
99
115
  altitude update
100
116
  ```
101
117
 
102
- Use `--ref <commit-sha>` with either command to pin or roll back to a particular public-repository
103
- commit. Updates change only manifest-managed files plus new upstream paths; unrelated skills in a
104
- shared target are left alone, while managed files removed upstream are removed locally. An edited
105
- managed file or colliding pre-CLI copy is backed up in the CLI data directory (by default,
106
- `~/.altitude/skills-backups/`) before the upstream version replaces or removes it. Backups never
107
- live in an agent skills directory. If no copied install is configured, the skills step is an
108
- informative no-op because marketplace or plugin-managed skills update through the agent.
109
- After the skills step completes or is skipped, `altitude update` asks the detected global package
110
- manager to update `@learnaltitude/cli`; if detection or execution fails, it prints the exact manual
111
- command instead. A genuine copied-skills sync failure stops before the CLI self-update.
118
+ The command prints a one-line reminder that skills update with the agent, then asks the detected
119
+ global package manager to update `@learnaltitude/cli`. If detection or execution fails, it prints
120
+ the exact manual command instead.
121
+
122
+ Because nothing forces either update, the server enforces a minimum CLI version at the device
123
+ connect handshake. `altitude connect` is refused when the CLI does not report a readable version
124
+ or is older than the floor; the refusal names the update command and, for Claude Code, the
125
+ auto-update toggle. The floor is server-owned raising it needs no client release.
112
126
 
113
127
  ## Network disclosure
114
128
 
115
129
  The distributed client uses the user's own agent subscription and no Altitude-held API key.
116
130
  Interactive `connect`, `diagnostics`, and `update` commands make anonymous, direct version checks
117
- to GitHub (the public skills repository's `main` commit) and the npm registry (the CLI's latest
118
- version). Check attempts are throttled for about 24 hours; the latest usable result remains cached
119
- until a later successful check replaces it. Skills downloads also come directly from GitHub. These
120
- requests do not pass through the Altitude service and carry no Altitude credentials.
131
+ with a single request to `registry.npmjs.org` for the CLI's latest version. Check attempts are
132
+ throttled for 24 hours; the latest usable result remains cached until a later successful check
133
+ replaces it. The request does not pass through the Altitude service and carries no Altitude
134
+ credentials.
121
135
 
122
136
  A bound SessionStart schedules the same anonymous check without awaiting it, and the detached
123
- flusher daemon keeps doing so in the background. Background checks run only on a device that holds
124
- a copied skills install otherwise the answer could never change anything the CLI can act on. The
125
- SessionStart process exits roughly 250 ms after its command completes, so this scheduling improves
126
- spawn-fallback coverage only when both version requests settle inside that remaining budget; it
127
- does not guarantee fallback coverage. An interrupted attempt writes no marker and therefore cannot
128
- suppress a later daemon or command attempt. Because unbound directories keep hooks dormant, they
129
- do not start a flusher or receive background refreshes; their cache is refreshed only by
130
- `connect`, `diagnostics`, or `update`. `altitude task --json` only reads the cache and never makes a
131
- request itself. Gates and other hooks never perform the version check. Set
132
- `ALTITUDE_DISABLE_UPDATE_CHECK=1` to turn every version check off. All check failures are silent
133
- and cannot change a command's exit code or discard a previously usable cache result.
137
+ flusher daemon keeps doing so in the background. The SessionStart process exits roughly 250 ms
138
+ after its command completes, so this scheduling improves spawn-fallback coverage only when the npm
139
+ request settles inside that remaining budget; it does not guarantee fallback coverage. An
140
+ interrupted attempt writes no marker and therefore cannot suppress a later daemon or command
141
+ attempt. Because unbound directories keep hooks dormant, they do not start a flusher or receive
142
+ background refreshes; their cache is refreshed only by `connect`, `diagnostics`, or `update`.
143
+ `altitude task --json` only reads the cache and never makes a request itself. Gates and other hooks
144
+ never perform the version check. Set `ALTITUDE_DISABLE_UPDATE_CHECK=1` to disable every version
145
+ check. All check failures are silent and cannot change a command's exit code or discard a
146
+ previously usable cache result.