@cmodjs/core 5.1.1 → 5.2.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/docs/commands.md +24 -12
- package/docs/dependencies.md +5 -5
- package/docs/index.md +2 -1
- package/docs/install-steps.md +1 -1
- package/docs/mod.md +44 -1
- package/docs/options.md +1 -1
- package/docs/session.md +5 -1
- package/docs/testing.md +7 -3
- package/mod.d.ts +11 -0
- package/mod.d.ts.map +1 -1
- package/mod.js +3 -0
- package/package.json +1 -1
- package/records.d.ts +2 -2
- package/records.d.ts.map +1 -1
- package/records.js +5 -4
- package/register.d.ts.map +1 -1
- package/register.js +4 -2
- package/runtime/before.d.ts +1 -1
- package/runtime/before.d.ts.map +1 -1
- package/runtime/before.js +33 -21
- package/runtime/claude.d.ts +4 -0
- package/runtime/claude.d.ts.map +1 -1
- package/runtime/conversations.d.ts.map +1 -1
- package/runtime/conversations.js +58 -26
- package/runtime/deadline.d.ts +1 -1
- package/runtime/deadline.d.ts.map +1 -1
- package/runtime/deadline.js +7 -2
- package/runtime/device.d.ts +6 -0
- package/runtime/device.d.ts.map +1 -0
- package/runtime/device.js +58 -0
- package/runtime/hooks.d.ts +1 -1
- package/runtime/hooks.d.ts.map +1 -1
- package/runtime/hooks.js +1 -1
- package/runtime/lifecycle.d.ts +1 -1
- package/runtime/lifecycle.d.ts.map +1 -1
- package/runtime/lifecycle.js +30 -7
- package/runtime/permission-check.d.ts +1 -1
- package/runtime/permission-check.d.ts.map +1 -1
- package/runtime/permission-check.js +5 -5
- package/runtime/router.d.ts +7 -3
- package/runtime/router.d.ts.map +1 -1
- package/runtime/router.js +5 -3
- package/runtime/sessions.d.ts +10 -6
- package/runtime/sessions.d.ts.map +1 -1
- package/runtime/sessions.js +60 -37
- package/session/context/turn/device.d.ts +10 -0
- package/session/context/turn/device.d.ts.map +1 -0
- package/session/context/turn/device.js +11 -0
- package/session/context/turn/turn.d.ts +2 -0
- package/session/context/turn/turn.d.ts.map +1 -1
- package/session/conversation.d.ts +4 -1
- package/session/conversation.d.ts.map +1 -1
- package/session/conversation.js +8 -3
- package/src/mod.ts +12 -0
- package/src/records.ts +5 -4
- package/src/register.ts +5 -3
- package/src/runtime/before.ts +35 -24
- package/src/runtime/claude.ts +2 -0
- package/src/runtime/conversations.ts +63 -34
- package/src/runtime/deadline.ts +7 -2
- package/src/runtime/device.ts +65 -0
- package/src/runtime/hooks.ts +3 -3
- package/src/runtime/lifecycle.ts +33 -8
- package/src/runtime/permission-check.ts +6 -6
- package/src/runtime/router.ts +14 -7
- package/src/runtime/sessions.ts +67 -39
- package/src/session/context/turn/device.ts +21 -0
- package/src/session/context/turn/turn.ts +2 -0
- package/src/session/conversation.ts +10 -5
- package/src/testing/claude-code.ts +2 -2
- package/src/testing/fake-claude.ts +6 -1
- package/src/testing.ts +50 -13
- package/testing/claude-code.d.ts +2 -2
- package/testing/claude-code.d.ts.map +1 -1
- package/testing/fake-claude.d.ts +3 -0
- package/testing/fake-claude.d.ts.map +1 -1
- package/testing/fake-claude.js +3 -1
- package/testing.d.ts +1 -0
- package/testing.d.ts.map +1 -1
- package/testing.js +53 -12
- package/vendor-markdown.js +744 -738
- package/vendor.js +122 -106
package/docs/commands.md
CHANGED
|
@@ -30,8 +30,8 @@ Loads the checkout at `path` (default: the current folder) in every Claude Code
|
|
|
30
30
|
It loads the checkout through a marketplace cmod keeps in the checkout's parent folder:
|
|
31
31
|
|
|
32
32
|
1. It lists the checkout in `<parent>/.claude-plugin/marketplace.json`, named `<parent folder>-linked`, beside the cmod plugin from the `release` branch of `heyJordanParker/cmod`, so the mod's `cmod` dependency resolves in that marketplace. Every checkout linked from one folder shares its marketplace. The checkout's own `.claude-plugin/marketplace.json`, the one `cmod publish` writes, stays as it was.
|
|
33
|
-
2. It adds that file to the parent's `.git/info/exclude` when the parent is inside a git repository.
|
|
34
|
-
3. It adds the marketplace to Claude Code
|
|
33
|
+
2. It adds that file, and `<parent>/.claude/settings.local.json` beside it, to the parent's `.git/info/exclude` when the parent is inside a git repository.
|
|
34
|
+
3. It adds the marketplace to Claude Code with `claude plugin marketplace add <parent> --scope local`, which declares it in `<parent>/.claude/settings.local.json`, so the `settings.json` you share between computers holds no path of this one, the way `npm link` keeps a link out of the shared `package.json`. Then it installs `<mod>@<parent folder>-linked` from it, which loads the checkout's own files in every session, in any project, at the next reload.
|
|
35
35
|
4. It turns off the installed copy of the mod from any other marketplace, and records it in `links.json` in the cmod store, so `cmod unlink` turns that copy back on.
|
|
36
36
|
|
|
37
37
|
It refuses a parent folder whose `.claude-plugin/marketplace.json` cmod did not write. `cmod watch` reloads every session once a change builds.
|
|
@@ -44,7 +44,7 @@ It refuses a parent folder whose `.claude-plugin/marketplace.json` cmod did not
|
|
|
44
44
|
cmod unlink [path]
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
Stops loading the checkout at `path` (default: the current folder) in every Claude Code session. Uninstalls it through Claude Code and takes it out of the marketplace in its parent folder. Once that marketplace lists no checkout, it uninstalls the cmod plugin the marketplace installed, removes the marketplace from Claude Code, and deletes its file and its line in `.git/info/exclude`. Then it turns back on the copy of the mod `cmod link` turned off, runs the checkout's uninstall step, and removes the program `cmod link` built, with its links.
|
|
47
|
+
Stops loading the checkout at `path` (default: the current folder) in every Claude Code session. Uninstalls it through Claude Code and takes it out of the marketplace in its parent folder. Once that marketplace lists no checkout, it uninstalls the cmod plugin the marketplace installed, removes the marketplace and its declaration in `<parent>/.claude/settings.local.json` from Claude Code, and deletes its file and its line in `.git/info/exclude`. The line for `settings.local.json` stays while that file does, because Claude Code leaves it behind, empty. Then it turns back on the copy of the mod `cmod link` turned off, runs the checkout's uninstall step, and removes the program `cmod link` built, with its links.
|
|
48
48
|
|
|
49
49
|
### cmod check
|
|
50
50
|
|
|
@@ -61,7 +61,7 @@ Runs every check this machine can run on the mod at `path` (default: the current
|
|
|
61
61
|
5. Checks the permission check. It adds `"approve": true` to `package.json` `"cmod"` when the mod allows or asks on Claude Code's permission check and `hooks/register.ts` calls `registerPermissionCheck`. It fails a mod whose `src/` hears the permission check while `register.ts` does not call `registerPermissionCheck`, and a mod on `@cmodjs/core` 5.0.0 or later whose `package.json` `"cmod"` still declares `"permissions"`, with the fix `Delete "permissions" from package.json "cmod", and write "approve": true there if the mod approves tool calls.`
|
|
62
62
|
6. Reads the metadata of every file in the mod, and names each file whose metadata cmod cannot read.
|
|
63
63
|
7. Writes the options `defineMod` declares into `.claude-plugin/plugin.json` `userConfig`, and its hotkeys into `package.json` `"cmod"` `hotkeys`, keeping each file's own formatting, so Claude Code shows the options in `/config` ([options.md](options.md)). It loads `hooks/register.ts` to read them, without starting the mod.
|
|
64
|
-
8. Writes the `cmod` dependency in `.claude-plugin/plugin.json` as `>=` the oldest cmod the `@cmodjs/core` the mod installed runs on, `oldestCmodVersion` in its `records.js`, such as `>=5.
|
|
64
|
+
8. Writes the `cmod` dependency in `.claude-plugin/plugin.json` as `>=` the oldest cmod the `@cmodjs/core` the mod installed runs on, `oldestCmodVersion` in its `records.js`, such as `>=5.2.0`, so every newer cmod runs the mod. A `@cmodjs/core` that does not export `oldestCmodVersion` runs on the cmod of its own version, so the range is `>=` that version, such as `>=4.3.4`. A mod still on `@cmodjs/core` 3 keeps its own range ([dependencies.md](dependencies.md#call-the-methods-mod-dependencies)). Claude Code turns a mod off when its cmod is older than that dependency, so `cmod check` first compares it with every cmod plugin Claude Code installed on this machine. When an installed copy is older, it updates them as `cmod update cmod` does. When one is still older, as when your `@cmodjs/core` needs a cmod newer than every published one, the check fails, keeps the old dependency, and names the `@cmodjs/core` to install instead. When a cmod linked from a checkout is older, the check fails the same way and says to pull that checkout, because no update reaches it. On a machine without Claude Code or without a cmod plugin, such as CI, it writes the dependency at once.
|
|
65
65
|
9. Checks its imports.
|
|
66
66
|
10. Looks for prebuilt binaries outside `cli/`.
|
|
67
67
|
11. Builds the release in a temporary folder as `cmod publish` builds it, with its `"files"` list and its bundled hooks module, and validates the release with Claude Code, `claude plugin validate --strict`. So it fails on a path `plugin.json` names that `"files"` leaves out, a `"files"` path that matches no file in the mod, and each reason a bundle fails, and prints every line the validator writes. Then it deletes the folder.
|
|
@@ -147,7 +147,7 @@ Adds the plugin's marketplace to Claude Code and installs the plugin through Cla
|
|
|
147
147
|
- When the marketplace lists several plugins, name the one to install after it.
|
|
148
148
|
- Given `name@marketplace` of a marketplace Claude Code has added, it installs that plugin.
|
|
149
149
|
- Given the name of a plugin Claude Code already holds, it runs a mod's install step again.
|
|
150
|
-
- A path holds a `/`, such as `./my-mod`.
|
|
150
|
+
- A path holds a `/`, such as `./my-mod`. A folder's marketplace is declared in that folder's `.claude/settings.local.json`, so the `settings.json` you share between computers holds no path of this one, and an `owner/repo` marketplace is declared in `settings.json`. In a git checkout, that file goes into `.git/info/exclude`, so `git status` stays clean. `cmod remove` keeps the line, because the marketplace and its file stay after the plugin is gone.
|
|
151
151
|
- `--option key=value` sets one of the mod's options through `claude plugin configure`, once per option, so a scripted install needs no visit to `/config`. It refuses a key the mod does not declare, and names the keys it does ([options.md](options.md)).
|
|
152
152
|
|
|
153
153
|
### cmod update
|
|
@@ -183,7 +183,7 @@ cmod list [--json]
|
|
|
183
183
|
|
|
184
184
|
Lists every plugin Claude Code has installed or linked, with its version. A mod shows whether cmod set it up, and any other plugin shows whether Claude Code enabled it. A plugin Claude Code turned off shows Claude Code's reason, such as `Requires "cmod@market" >=4.2.0, installed 4.0.0`. It also lists every mod Claude Code removed whose uninstall step has not run yet.
|
|
185
185
|
|
|
186
|
-
- `--json` prints the list as JSON: one object per row with its `name`, `version`, `state`, and `unsatisfied`, the dependencies Claude Code turned the plugin off for because they are older than the plugin needs.
|
|
186
|
+
- `--json` prints the list as JSON: one object per row with its `name`, `version`, `state`, and `unsatisfied`, the dependencies Claude Code turned the plugin off for because they are older than the plugin needs. A plugin whose folder exists also has `folder`, the folder it runs from: the checkout for a linked mod, and Claude Code's copy for any other. A mod also has `dataFolder`, and the two are the folders its `mod.folder` and `mod.dataFolder` name. A removed mod has only `dataFolder`, because its data stays until `cmod teardown` deletes it.
|
|
187
187
|
|
|
188
188
|
- The `cmod` commands count a plugin as a mod only when its `package.json` has a `cmod` step key or cmod holds an install record for it. A mod made with `cmod new` has neither until its first Claude Code session sets it up, so until then `cmod list` shows it as `enabled`, like any other plugin.
|
|
189
189
|
|
|
@@ -210,7 +210,7 @@ Reads every conversation Claude Code saved, as the sessions, contexts, turns, ta
|
|
|
210
210
|
- `sessions` lists the conversations of the current folder's project, or `--project`'s, newest first, each with its time, id, and title. `--all` lists every project's, `--since` keeps those active in the last `30m`, `6h`, `2d`, or `1w`, or since a date such as `2026-10-01`, and `--running` keeps those open in Claude Code now.
|
|
211
211
|
- `search` prints the newest 50 messages whose text or tool input contains the text, at least 3 characters, any case, each with its time and session. Each tool input value is searched in its first 1,024 characters, and tool results are not searched. `--all`, `--since`, and `--running` scope it as they scope `sessions`, `--limit` changes the 50, and `--before <session>:<id>` prints the page after the message it names, the last one of the page before. `--session` searches one conversation, and inside it `--task` searches a task and the tasks it started, `--turn` one turn, `--context` one context, and `--agent` keeps the main agent's messages, or with `--task` that task's own, without the tasks it started.
|
|
212
212
|
- `messages` prints one conversation's messages in order: the session named, or the one the command runs in when Claude Code runs it. `--task` reads a task's messages instead, `--turn` keeps one turn's, `--after` starts after a message id, and `--last` keeps that many from the end.
|
|
213
|
-
- `turns` prints the conversation's turns, each opened by a prompt and closed when Claude finishes. `--context` keeps one context's, and `--last` keeps that many from the end.
|
|
213
|
+
- `turns` prints the conversation's turns, each opened by a prompt and closed when Claude finishes. `--context` keeps one context's, and `--last` keeps that many from the end. With `--json`, a turn names the `device` it ran on, as `Turn.device` does ([session.md](session.md#turn-context-goal-and-task)).
|
|
214
214
|
- `contexts` prints the conversation's contexts, a new one after each compaction.
|
|
215
215
|
- `tasks` prints the tasks the conversation started, with `--task` the tasks that task started, and with `--nested` every task at any depth.
|
|
216
216
|
- `goal` prints what the conversation is for: the goal a mod set, or its first prompt.
|
|
@@ -219,7 +219,7 @@ Reads every conversation Claude Code saved, as the sessions, contexts, turns, ta
|
|
|
219
219
|
- `state` prints what a running conversation resumes from.
|
|
220
220
|
- `follow` prints each message, turn, context, task, and goal change of the sessions named as Claude Code saves it, until stopped with Ctrl+C. `--running` follows every running session of the project too, and each one that starts later. The cmod plugin runs it to hear other running sessions.
|
|
221
221
|
- `--json` prints JSON instead of one line each.
|
|
222
|
-
- `index` reads every saved conversation into the index at `~/.local/share/cmod/history-
|
|
222
|
+
- `index` reads every saved conversation into the index at `~/.local/share/cmod/history-12.sqlite`, which holds where each message is in its transcript, not a copy of it, and each conversation's turns, with the device each ran on, contexts, and tasks. While cmod has set up a mod other than cmod, the cmod plugin runs it in the background at each session's start, and a second run while one is running exits at once. The index forgets a conversation whose transcript is deleted.
|
|
223
223
|
|
|
224
224
|
## Run in an install script
|
|
225
225
|
|
|
@@ -251,7 +251,7 @@ cmod runs these itself. A person runs them to see a step's whole log, or to fini
|
|
|
251
251
|
cmod setup <plugin-root> [--events]
|
|
252
252
|
```
|
|
253
253
|
|
|
254
|
-
Refuses a machine the `os` and `cpu` keys of the mod's `package.json` leave out. Downloads the program its `cmod.program` names, or builds it from the checkout's `cli/` when `cmod link` loaded the mod, so a linked checkout whose version has no release yet still sets up, and links it into cmod's programs folder, which Claude Code runs it from by its name, and into `~/.local/bin` unless a file there is not cmod's. Runs the mod's install step, saves its uninstall step, binds its hotkeys, and records the mod as set up, asking nothing first ([install-steps.md](install-steps.md#when-the-steps-run)). A mod installed from a marketplace whose automatic updates the person has not turned on or off gets them turned on, through `"autoUpdate": true` on the marketplace's `extraKnownMarketplaces` entry in Claude Code's `settings.json`, and the setup says so. An unchanged mod runs nothing. `--events` prints one event per line for a program to read, and the mod's install toast in Claude Code reads them. Before all of that, it links each folder a cmod before 4.1.0 left in `CLAUDE_CODE_PLUGIN_DIRS`, as [`cmod watch`](#cmod-watch) does.
|
|
254
|
+
Refuses a machine the `os` and `cpu` keys of the mod's `package.json` leave out. Downloads the program its `cmod.program` names, or builds it from the checkout's `cli/` when `cmod link` loaded the mod, so a linked checkout whose version has no release yet still sets up, and links it into cmod's programs folder, which Claude Code runs it from by its name, and into `~/.local/bin` unless a file there is not cmod's. Runs the mod's install step, saves its uninstall step, binds its hotkeys, and records the mod as set up, asking nothing first ([install-steps.md](install-steps.md#when-the-steps-run)). A mod installed from a marketplace whose automatic updates the person has not turned on or off gets them turned on, unless the marketplace is a folder, which Claude Code reads in place, through `"autoUpdate": true` on the marketplace's `extraKnownMarketplaces` entry in Claude Code's `settings.json`, and the setup says so. An unchanged mod runs nothing. `--events` prints one event per line for a program to read, and the mod's install toast in Claude Code reads them. Before all of that, it links each folder a cmod before 4.1.0 left in `CLAUDE_CODE_PLUGIN_DIRS`, as [`cmod watch`](#cmod-watch) does.
|
|
255
255
|
|
|
256
256
|
### cmod teardown
|
|
257
257
|
|
|
@@ -259,15 +259,27 @@ Refuses a machine the `os` and `cpu` keys of the mod's `package.json` leave out.
|
|
|
259
259
|
cmod teardown <plugin-name> [--events]
|
|
260
260
|
```
|
|
261
261
|
|
|
262
|
-
Runs a removed mod's saved uninstall step, then deletes its install record, the saved step, every version of its program, its data folder, and `instances/<plugin-name>/`, where its `singleInstance` programs keep their addresses, takes out each Claude Code setting it changed that still has the value it set, and deletes its entry in `consent.json`. It keeps the mod's config folder, `~/.claude/cmods/<plugin-name>`. A failed uninstall step keeps the record, so `cmod teardown` can run again.
|
|
262
|
+
Runs a removed mod's saved uninstall step, then deletes its install record, the saved step, every version of its program, its data folder, and `instances/<plugin-name>/`, where its `singleInstance` programs keep their addresses, takes out each Claude Code setting it changed that still has the value it set, deletes its secrets ([cmod secret](#cmod-secret)), and deletes its entry in `consent.json`. It keeps the mod's config folder, `~/.claude/cmods/<plugin-name>`. A failed uninstall step keeps the record, so `cmod teardown` can run again.
|
|
263
263
|
|
|
264
264
|
### cmod hotkey
|
|
265
265
|
|
|
266
266
|
```text
|
|
267
|
-
cmod hotkey <mod> <hotkey> <combo>
|
|
267
|
+
cmod hotkey <mod | plugin-root> <hotkey> <combo>
|
|
268
268
|
```
|
|
269
269
|
|
|
270
|
-
Binds one hotkey of a mod to a new combo in Claude Code's `keybindings.json`, such as `cmod hotkey notes toggle ctrl+shift+n`, and removes the combo it had. It binds a hotkey without a default combo the same way. A combo in Settings, under the mod, Hotkeys, runs it, and so does the cmod plugin for its own two hotkeys at its first start. It refuses a combo that is not one, and a combo the person already bound to something else, with `<combo> already runs something else in ~/.claude/keybindings.json. Pick another combo.` The mod's next update keeps the combo ([mod.md](mod.md#hotkeys)).
|
|
270
|
+
Binds one hotkey of a mod to a new combo in Claude Code's `keybindings.json`, such as `cmod hotkey notes toggle ctrl+shift+n`, and removes the combo it had. It binds a hotkey without a default combo the same way. A plugin root holds a `/`, such as `./notes`, so a mod Claude Code loads with `--plugin-dir`, which has no install record, binds its hotkeys too. A combo in Settings, under the mod, Hotkeys, runs it, and so does the cmod plugin for its own two hotkeys at its first start, with its own plugin folder. It refuses a combo that is not one, and a combo the person already bound to something else, with `<combo> already runs something else in ~/.claude/keybindings.json. Pick another combo.` The mod's next update keeps the combo ([mod.md](mod.md#hotkeys)).
|
|
271
|
+
|
|
272
|
+
### cmod secret
|
|
273
|
+
|
|
274
|
+
```text
|
|
275
|
+
cmod secret store <mod> <key>
|
|
276
|
+
cmod secret get <mod> <key>
|
|
277
|
+
cmod secret delete <mod> <key>
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Keeps a mod's secrets, for `mod.secrets` and the mod's own programs ([mod.md](mod.md#mod-secrets)). `store` reads the value from stdin, such as `printf '%s' "$TOKEN" | cmod secret store anyhost token`, and refuses a terminal, where the value would show, and an empty value. `get` prints the value to stdout as it was stored, with no newline added, and prints nothing for a secret the mod does not have. `delete` removes one secret. A value never goes in the arguments, where every process on the computer can read it.
|
|
281
|
+
|
|
282
|
+
Every mod's secrets live in `secrets.json` in the cmod store, mode 600, as `{ "<mod>": { "<key>": "<value>" } }`. On macOS each value is sealed as Chromium's `os_crypt` seals Chrome's and VS Code's: one random 32-byte key for cmod lives in the login keychain at `~/Library/Keychains/login.keychain-db`, as the generic password `cmod Safe Storage` with account `cmod`, and each value is `v10`, a fresh 12-byte nonce, the AES-256-GCM ciphertext, and its 16-byte tag, in base64. cmod makes the key once through `/usr/bin/security -i`, with the key hex-encoded on stdin, and reads it with `security find-generic-password -w`, so `security` is the one program the item trusts, and an update of cmod asks nothing. Only the key crosses `security`, so a secret has no size limit. A home with no login keychain keeps nothing, because `security` writes to the default keychain when the one it names does not exist. On Linux the values are plain, as Claude Code keeps its own login in `~/.claude/.credentials.json`. `cmod teardown` deletes the secrets of a removed mod, and the key stays for the other mods.
|
|
271
283
|
|
|
272
284
|
### cmod settings
|
|
273
285
|
|
package/docs/dependencies.md
CHANGED
|
@@ -52,7 +52,7 @@ declare module 'claude-code' {
|
|
|
52
52
|
A mod that calls tracer lists it in its own `.claude-plugin/plugin.json`, and Claude Code installs it with the mod:
|
|
53
53
|
|
|
54
54
|
```json
|
|
55
|
-
"dependencies": [{ "name": "cmod", "version": ">=5.
|
|
55
|
+
"dependencies": [{ "name": "cmod", "version": ">=5.2.0" }, "tracer"]
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
Write the dependency bare, by its name alone. Claude Code looks for a bare dependency only in the mod's own marketplace, so `cmod publish` lists tracer there, from the `release` branch of the GitHub repository that the `"repository"` of tracer's `plugin.json` names. Install or link tracer before you publish, or `cmod publish` stops and says to. A dependency that names its `"marketplace"` loads for the people who install your mod, but not from the marketplace `cmod link` writes for your checkout.
|
|
@@ -60,12 +60,12 @@ Write the dependency bare, by its name alone. Claude Code looks for a bare depen
|
|
|
60
60
|
A provider that changes or removes a method breaks every mod that calls it, and with automatic updates the provider can update first. Name the versions you tested with a range, and Claude Code turns your mod off with a clear error instead of letting its calls fail one by one:
|
|
61
61
|
|
|
62
62
|
```json
|
|
63
|
-
"dependencies": [{ "name": "cmod", "version": ">=5.
|
|
63
|
+
"dependencies": [{ "name": "cmod", "version": ">=5.2.0" }, { "name": "tracer", "version": "^1.0" }]
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
Claude Code checks the range against the provider's `version` when it loads your mod. Every mod's marketplace lists cmod and each provider from its git repository, so Claude Code also installs it at the highest `<name>--v<version>` tag inside the range, which `cmod publish` pushes for every release ([Claude Code's plugin dependencies](https://code.claude.com/docs/en/plugins/dependencies)).
|
|
67
67
|
|
|
68
|
-
cmod is a provider too, with one difference: every newer cmod runs every mod built on an older `@cmodjs/core`. So a mod names only the oldest cmod it runs on, which the `@cmodjs/core` it bundles names as `oldestCmodVersion` in its `records.js`, as `>=5.
|
|
68
|
+
cmod is a provider too, with one difference: every newer cmod runs every mod built on an older `@cmodjs/core`. So a mod names only the oldest cmod it runs on, which the `@cmodjs/core` it bundles names as `oldestCmodVersion` in its `records.js`, as `>=5.2.0`. `cmod check` writes that range whenever the mod's `@cmodjs/core` changes, and `cmod publish` refuses a release whose range differs. A caret range such as `^5.0.0` stops Claude Code from updating cmod past 5.x for every mod on the computer, so leave it to `cmod check`.
|
|
69
69
|
|
|
70
70
|
Each mod's marketplace lists its own copy of cmod and of each provider, and Claude Code loads only one copy of each. When a mod needs a newer cmod than a copy Claude Code installed, the cmod plugin updates every copy of cmod, and when two copies of any plugin differ, it updates every copy of that plugin. Then it reloads the mods, so a mod never waits for the person to update its providers.
|
|
71
71
|
|
|
@@ -98,14 +98,14 @@ A call that cannot answer rejects with one of these reasons:
|
|
|
98
98
|
|
|
99
99
|
```text
|
|
100
100
|
tracer is not installed. Install it in Plugins.
|
|
101
|
-
tracer is not set up
|
|
101
|
+
tracer is not set up: <why its setup failed>
|
|
102
102
|
tracer is installing. Try again when it's ready.
|
|
103
103
|
tracer has no method signatures.
|
|
104
104
|
tracer: <the message of the error the method threw>
|
|
105
105
|
```
|
|
106
106
|
|
|
107
107
|
- `tracer is not installed` covers a provider whose code did not load. The caller's error toast shows a `Plugins` button, which opens Claude Code's `/plugin`.
|
|
108
|
-
- `tracer is not set up` covers a provider the person declined to install and one whose install failed.
|
|
108
|
+
- `tracer is not set up` covers a provider the person declined to install and one whose install failed, and names why. The provider's own toast shows the same reason, with `Retry` or `Install`.
|
|
109
109
|
- `tracer is installing` covers a provider that is still running its install step. A provider that is only starting makes the call wait for it, up to 9 seconds.
|
|
110
110
|
- When tracer is disabled, Claude Code unloads the mod that lists it, with its own error: `Dependency "tracer" is disabled — enable it or remove the dependency`.
|
|
111
111
|
- A call fails with `mod.dependencies.tracer.signatures passed its 30 s deadline` when the other mod takes longer than 30 seconds. A job bounds the whole function that makes the call by its own deadline ([jobs.md](jobs.md)), so a slow call inside `slashCommand` can fail the command first, with `/outline passed the 30 s deadline of slashCommand`.
|
package/docs/index.md
CHANGED
|
@@ -10,7 +10,7 @@ A mod is a Claude Code plugin built with `@cmodjs/core`. Claude Mod Manager (cmo
|
|
|
10
10
|
|
|
11
11
|
```text
|
|
12
12
|
my-mod/
|
|
13
|
-
├── .claude-plugin/plugin.json name, version, and "dependencies": [{ "name": "cmod", "version": ">=5.
|
|
13
|
+
├── .claude-plugin/plugin.json name, version, and "dependencies": [{ "name": "cmod", "version": ">=5.2.0" }]
|
|
14
14
|
├── .claude/CLAUDE.md facts for coding agents, starting with these docs
|
|
15
15
|
├── .gitignore node_modules/ and .claude-plugin/types/
|
|
16
16
|
├── .oxlintrc.json leaves .claude-plugin/types/ out of the lint
|
|
@@ -63,6 +63,7 @@ A program the mod needs lives as source in `cli/`. `cmod publish` builds it and
|
|
|
63
63
|
| How does a mod give Claude a prompt on a schedule, like `/loop`? | [jobs.md](jobs.md#schedule) |
|
|
64
64
|
| How do I keep values across prompts, sessions, and projects? | [state.md](state.md) |
|
|
65
65
|
| How does a person set a token, a URL, or a setting for my mod, for themselves or their team? | [options.md](options.md) |
|
|
66
|
+
| Where does my mod keep a token it gets by itself, such as from a sign-in, out of its files? | [mod.md](mod.md#mod-secrets) |
|
|
66
67
|
| How does my mod find files and keep its own keys on each one, such as on a Skill? | [mod.md](mod.md#metadata-a-file-s-own-keys) |
|
|
67
68
|
| How does the person finish a setup step only they can do, such as signing in? | [install-steps.md](install-steps.md#steps-in-claude-code) |
|
|
68
69
|
| How do I add my mod's own page to Settings, or change Claude Code's settings? | [ui.md](ui.md#settings-pages), [mod.md](mod.md#settings-claude-code-s-settings-files) |
|
package/docs/install-steps.md
CHANGED
|
@@ -43,7 +43,7 @@ The mod starts only once its install step has run ([mod.md](mod.md)).
|
|
|
43
43
|
|
|
44
44
|
## Automatic updates
|
|
45
45
|
|
|
46
|
-
Claude Code updates a plugin by itself only when its marketplace has automatic updates on, and they are off for every marketplace that is not Anthropic's. So the setup of a mod installed from a marketplace turns them on, through `"autoUpdate": true` on that marketplace's `extraKnownMarketplaces` entry in `settings.json`. The setup logs `<mod> now updates automatically from the <marketplace> marketplace. Turn it off in /plugin, Marketplaces.` The setup never changes a choice the person made, in `settings.json` or with the toggle under `/plugin` Marketplaces, and leaves a linked mod
|
|
46
|
+
Claude Code updates a plugin by itself only when its marketplace has automatic updates on, and they are off for every marketplace that is not Anthropic's. So the setup of a mod installed from a marketplace turns them on, through `"autoUpdate": true` on that marketplace's `extraKnownMarketplaces` entry in `settings.json`. The setup logs `<mod> now updates automatically from the <marketplace> marketplace. Turn it off in /plugin, Marketplaces.` The setup never changes a choice the person made, in `settings.json` or with the toggle under `/plugin` Marketplaces, and leaves alone a linked mod, or a mod from a folder's marketplace, which Claude Code reads in place. The cmod plugin's own `cmod` marketplace gets the same entry whenever a `cmod` command installs the cmod plugin or `cmod update` updates it.
|
|
47
47
|
|
|
48
48
|
Claude Code downloads an update in the background and loads it at the next launch or `/reload-plugins`. An update that changes a command or a script file, adds a hotkey, or changes its default combo runs the install step again.
|
|
49
49
|
|
package/docs/mod.md
CHANGED
|
@@ -150,6 +150,7 @@ type Mod<State, Options, Hotkeys> = {
|
|
|
150
150
|
readonly name: string
|
|
151
151
|
readonly folder: string
|
|
152
152
|
readonly dataFolder: string
|
|
153
|
+
readonly secrets: { get(key): Promise<string | undefined>; store(key, value): Promise<void>; delete(key): Promise<void> }
|
|
153
154
|
readonly state: Readonly<State>
|
|
154
155
|
readonly options: OptionValues<Options>
|
|
155
156
|
readonly hotkeys: { readonly [name in keyof Hotkeys]: Hotkey }
|
|
@@ -171,6 +172,7 @@ type Mod<State, Options, Hotkeys> = {
|
|
|
171
172
|
- `name` is the mod's name from `defineMod`.
|
|
172
173
|
- `folder` is the plugin's own folder, where the files the mod ships live.
|
|
173
174
|
- `dataFolder` is the mod's own folder in the cmod store: `$XDG_DATA_HOME/cmod/data/<plugin name>`, or `~/.local/share/cmod/data/<plugin name>` when `XDG_DATA_HOME` is not set. The install step gets the same folder as `CMOD_DATA`. cmod deletes it when the mod is removed ([install-steps.md](install-steps.md)).
|
|
175
|
+
- `secrets` keeps the mod's own keys, such as a token it got from a sign-in, out of its files ([mod.secrets](#mod-secrets)).
|
|
174
176
|
- `state` holds the mod's values. Assign to a key to change it ([state.md](state.md)).
|
|
175
177
|
- `options` holds the values a person set for the mod's options, typed from their declaration. Read-only ([options.md](options.md)).
|
|
176
178
|
- `hotkeys` holds each hotkey `defineMod` declared ([Hotkeys](#hotkeys)).
|
|
@@ -183,7 +185,7 @@ type Mod<State, Options, Hotkeys> = {
|
|
|
183
185
|
Everything that is Claude Code's or the computer's rather than the mod's is an import from `mod.js`, so a function in any file calls it without being handed `mod`:
|
|
184
186
|
|
|
185
187
|
```ts
|
|
186
|
-
import { clipboard, commands, config, fs, http, metadata, model, process, sessions, settings } from '../node_modules/@cmodjs/core/mod.js'
|
|
188
|
+
import { clipboard, commands, config, device, fs, http, metadata, model, process, sessions, settings } from '../node_modules/@cmodjs/core/mod.js'
|
|
187
189
|
```
|
|
188
190
|
|
|
189
191
|
- `sessions` is the conversations: the one the mod runs in, every other one, and search across them. Everything that happens in a session, from a prompt to a permission dialog, is a method on it ([session.md](session.md)).
|
|
@@ -195,6 +197,7 @@ import { clipboard, commands, config, fs, http, metadata, model, process, sessio
|
|
|
195
197
|
- `metadata` reads and changes the mod's keys in one file's metadata.
|
|
196
198
|
- `process` runs a program.
|
|
197
199
|
- `http` fetches a URL.
|
|
200
|
+
- `device` is the computer the session runs on.
|
|
198
201
|
- `clipboard` puts text on the person's clipboard ([ui.md](ui.md#toasts)).
|
|
199
202
|
|
|
200
203
|
Each import works once the mod has started, in `setup` and anything it adds.
|
|
@@ -212,6 +215,27 @@ const watching = sessions.current.onToolCall({ name: 'Edit' }, () => void (mod.s
|
|
|
212
215
|
mod.use(slashCommand({ name: 'stop-counting', description: 'Stop counting edits', reply: () => watching.remove() }))
|
|
213
216
|
```
|
|
214
217
|
|
|
218
|
+
### mod.secrets
|
|
219
|
+
|
|
220
|
+
```ts
|
|
221
|
+
mod.secrets.get(key: string): Promise<string | undefined>
|
|
222
|
+
mod.secrets.store(key: string, value: string): Promise<void>
|
|
223
|
+
mod.secrets.delete(key: string): Promise<void>
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
`secrets` keeps a key the mod gets by itself, such as the token a sign-in returns, apart from its files, as VS Code's `SecretStorage` does. `get` answers `undefined` for a secret the mod never stored or deleted, `store` replaces the value a key had, and `delete` of a missing key does nothing. A key the person types in is an option instead: `option.secret` shows it in `/config`, where Claude Code keeps it ([options.md](options.md)).
|
|
227
|
+
|
|
228
|
+
```ts
|
|
229
|
+
const token = (await mod.secrets.get('token')) ?? (await signIn())
|
|
230
|
+
await mod.secrets.store('token', token)
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
- Every mod's secrets live in `secrets.json` in the cmod store, which only you can read and write. On macOS each value there is encrypted with AES-256-GCM, under one random key cmod keeps in your login keychain as the `cmod Safe Storage` item, as Chrome keeps `Chrome Safe Storage` and VS Code keeps `Code Safe Storage`. On Linux the values are plain, as Claude Code keeps its own login in `~/.claude/.credentials.json`.
|
|
234
|
+
- Each mod gets only its own secrets. They are kept apart, not locked away: any program you run can read your keychain items through `security` and your files.
|
|
235
|
+
- A value never goes in a command's arguments, a log, a toast, or an error. `mod.secrets` hands it to `cmod secret` on stdin, and a mod's own program reads it from stdout of `cmod secret get <mod> <key>`, run as `programs/cmod` in the cmod store, such as `~/.local/share/cmod/programs/cmod` ([commands.md](commands.md#cmod-secret)).
|
|
236
|
+
- `store` of an empty value fails, because `delete` removes a secret.
|
|
237
|
+
- cmod deletes the mod's secrets with its data folder when the mod is removed.
|
|
238
|
+
|
|
215
239
|
### mod.every and mod.after
|
|
216
240
|
|
|
217
241
|
```ts
|
|
@@ -504,6 +528,25 @@ http.fetch(url: string, init?: HttpInit): Promise<HttpResponse>
|
|
|
504
528
|
- The response is `{ status, ok, headers, text }`. `ok` is true for a 2xx status. Header names are lower case.
|
|
505
529
|
- A mod reaches the address its own `program` job answers on the same way ([jobs.md](jobs.md#program)).
|
|
506
530
|
|
|
531
|
+
## device: the computer the session runs on
|
|
532
|
+
|
|
533
|
+
```ts
|
|
534
|
+
device.read(): Promise<Device>
|
|
535
|
+
|
|
536
|
+
type Device = { id: string; name: string; os: 'darwin' | 'linux'; arch: 'arm64' | 'x64' }
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
- `id` is the same on one computer for every session, mod, and reinstall, and differs between computers. cmod reads it from the operating system and stores nothing: the IOPlatformUUID on macOS, and on Linux `/etc/machine-id`, or `/var/lib/dbus/machine-id` when that holds none, as systemd and D-Bus read them, hashed for cmod the way systemd's `sd_id128_get_machine_app_specific` hashes a machine id for an app, so the id never shows the computer's own.
|
|
540
|
+
- `name` is the name the computer goes by on its network: its LocalHostName on macOS, such as `Jordans-Mac-mini`, and its hostname on Linux.
|
|
541
|
+
- `os` and `arch` are the names cmod's builds use, such as `darwin` and `arm64`.
|
|
542
|
+
- `read` reads the computer the first time the mod calls it, and answers the same device after that. It rejects on a computer other than macOS or Linux on arm64 or x64. It also rejects on a Linux computer where neither `/etc/machine-id` nor `/var/lib/dbus/machine-id` holds a machine id, as in many containers, with a sentence that names both files.
|
|
543
|
+
- Each turn names the device it ran on, as `turn.device` ([session.md](session.md#turn-context-goal-and-task)), so a mod tells which computer ran each turn of a session that moved between computers. A start on a computer without a machine id names no device, so the turns after it keep the device of the start before, or have none.
|
|
544
|
+
|
|
545
|
+
```ts
|
|
546
|
+
const here = await device.read()
|
|
547
|
+
const elsewhere = (await sessions.current.turns()).filter((turn) => turn.device !== undefined && turn.device.id !== here.id)
|
|
548
|
+
```
|
|
549
|
+
|
|
507
550
|
## messageOf
|
|
508
551
|
|
|
509
552
|
```ts
|
package/docs/options.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
An option is a value a person sets for a mod and the mod reads, such as a token, a URL, or how often to check. The mod declares its options in `defineMod`, and `mod.options` holds their values, typed from the declaration. Claude Code stores them: it shows each one in `/config`, keeps a secret in the system keychain, and reloads the mod when one changes.
|
|
4
4
|
|
|
5
|
-
`mod.state` is the other kind of value: what the mod owns and changes as it runs ([state.md](state.md)).
|
|
5
|
+
`mod.state` is the other kind of value: what the mod owns and changes as it runs ([state.md](state.md)). A secret the mod gets by itself, such as the token a sign-in returns, goes in `mod.secrets` instead ([mod.md](mod.md#mod-secrets)).
|
|
6
6
|
|
|
7
7
|
## Declare the options
|
|
8
8
|
|
package/docs/session.md
CHANGED
|
@@ -163,7 +163,7 @@ A listener that throws shows the error toast `The <method> listener failed`, suc
|
|
|
163
163
|
|
|
164
164
|
### Give a listener time
|
|
165
165
|
|
|
166
|
-
A listener gets 10 seconds. `timeoutMs` changes that, a whole number above 0 and at most `600000`. The second argument a listener gets is its `deadline`, the time it ends as `Date.now()` counts, and a `signal` that aborts then, so a slow call such as `http.fetch` can stop with it. Time a listener spends waiting on a call, such as `process.run`, never counts against the 10 seconds Claude Code gives a hook's own code, so a listener that waits can use its whole `timeoutMs`:
|
|
166
|
+
A listener gets 10 seconds. `timeoutMs` changes that, a whole number above 0 and at most `600000`. The second argument a listener gets is its `deadline`, the time it ends as `Date.now()` counts, and a `signal` that aborts then, or as soon as the person cancels the work the listener runs for, as Esc does during a tool call, so a slow call such as `http.fetch` can stop with it. Time a listener spends waiting on a call, such as `process.run`, never counts against the 10 seconds Claude Code gives a hook's own code, so a listener that waits can use its whole `timeoutMs`:
|
|
167
167
|
|
|
168
168
|
```ts
|
|
169
169
|
sessions.current.onTurnEnd(async (turn, { signal }) => {
|
|
@@ -171,6 +171,8 @@ sessions.current.onTurnEnd(async (turn, { signal }) => {
|
|
|
171
171
|
}, { timeoutMs: 30_000 })
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
+
A cancel stops the listener quietly. Claude Code stops the programs its `process.run` and `process.spawn` calls started, cmod goes on without its answer, and nothing it throws shows a toast.
|
|
175
|
+
|
|
174
176
|
An `on` listener that passes its time stops quietly. A `before` listener that passes its time shows the error toast, and what was about to happen goes on as it was. With `onFailure: 'refuse'`, a `before` listener that throws or passes its time refuses instead, with the error as the reason, for a gate that must hold even when it breaks. The gate holds when Claude Code stops the mod's hook too, as it does when the listener's own code runs past 10 seconds without waiting on a call, and the toast `Claude Code stopped its <hook> hook` says so. On another session, it holds when that session does not answer within 5 seconds, or within what is left of the 8 seconds cmod waits on other sessions for one event, for what the listener's matcher and part cover. A `beforePermissionRequest` listener always refuses when it fails.
|
|
175
177
|
|
|
176
178
|
### Change what happens
|
|
@@ -396,6 +398,7 @@ type Turn = {
|
|
|
396
398
|
readonly answer?: string
|
|
397
399
|
readonly reason?: 'answer' | 'error'
|
|
398
400
|
readonly failure?: { readonly type: string; readonly text: string }
|
|
401
|
+
readonly device?: Device
|
|
399
402
|
messages(): Promise<Message[]>
|
|
400
403
|
abort(): Promise<void>
|
|
401
404
|
search; on…; before…
|
|
@@ -432,6 +435,7 @@ sessions.current.onTurnEnd((turn) => {
|
|
|
432
435
|
if (turn.failure !== undefined) mod.toast.error(`Claude stopped: ${turn.failure.text}`)
|
|
433
436
|
})
|
|
434
437
|
```
|
|
438
|
+
- A turn's `device` is the computer it ran on ([mod.md](mod.md#device-the-computer-the-session-runs-on)). At each start, resume, `/clear`, and compaction, the cmod plugin adds a note Claude reads and the person never sees, naming the computer the session runs on and the time, so a session resumed on another computer names that one from then on. A turn runs on the device the last such note before it names, and a task's turns on the device its session ran on when it started the task, so the note a subagent's compaction puts in its own window changes no turn's device. A turn with no such note before it, such as one from a session an older cmod ran, has no `device`.
|
|
435
439
|
- `abort()` stops a turn while it runs, a task's turn included. It throws on a turn that has ended. Claude Code shows no marker, so a mod that aborts tells the person with a toast.
|
|
436
440
|
- A context's `number` counts from 1. Its `closedAt` is set at the compaction that ended it.
|
|
437
441
|
- A goal's text starts as the session's first prompt, and `text()` reads it. `update` replaces it, and `onGoalChange` hears the goal, whose `text()` reads the new text.
|
package/docs/testing.md
CHANGED
|
@@ -33,6 +33,7 @@ type TestOptions<State, Options> = {
|
|
|
33
33
|
readonly dependencies?: { [Name in keyof CmodDependencies]?: CmodDependencies[Name] }
|
|
34
34
|
readonly files?: Readonly<Record<string, string>>
|
|
35
35
|
readonly links?: Readonly<Record<string, string>>
|
|
36
|
+
readonly secrets?: Readonly<Record<string, string>>
|
|
36
37
|
readonly sessions?: readonly FakeSession[]
|
|
37
38
|
}
|
|
38
39
|
```
|
|
@@ -47,6 +48,7 @@ type TestOptions<State, Options> = {
|
|
|
47
48
|
| `dependencies` | The methods other mods answer with | none: every call fails with `<name> is not installed. Install it in Plugins.` |
|
|
48
49
|
| `files` | The fake file system, absolute path to text | no files |
|
|
49
50
|
| `links` | Symbolic links in the fake file system, absolute link path to its target | no links |
|
|
51
|
+
| `secrets` | The mod's secrets `mod.secrets` starts with, key to value. The fake keeps what the mod stores in memory, and `tested.calls` never holds a value | no secrets |
|
|
50
52
|
| `sessions` | The earlier conversations `sessions.list` and `sessions.search` read, each `{ id, messages?, goal?, … }` ([Build a conversation](#build-a-conversation)) | none: only the current session, `test-session` |
|
|
51
53
|
|
|
52
54
|
A project plugin finds its repository through a `.git` entry at `projectRoot`, so a test of one puts it in `files`, such as `files: { '/test/project/.git': '' }`. Without it the project plugin has no repository, and its rules match calls in every folder, as a user mod's do.
|
|
@@ -175,12 +177,12 @@ Waits until the work a listener started without awaiting it has run, such as a `
|
|
|
175
177
|
|
|
176
178
|
### Build a conversation
|
|
177
179
|
|
|
178
|
-
The current session, `test-session`, starts
|
|
180
|
+
The current session, `test-session`, starts with one message: the cmod plugin's note naming the device, from `fakes.device.read`, as a live session starts with it. So each turn's `device` is `test-computer` unless the test sets `fakes.device.read` ([session.md](session.md#turn-context-goal-and-task)). A test builds the rest of the conversation the mod reads through `sessions` ([session.md](session.md)), the way Claude Code would write it:
|
|
179
181
|
|
|
180
182
|
- `add(message, { task? })` adds a message and returns it, placed in its context and turn. A `Prompt` opens a new turn. With `task`, the message is that task's.
|
|
181
183
|
- `endTurn({ answer?, failure? })` ends the open turn, as Claude stopping does. `answer` is Claude's last words, and `failure` ends it on an error, such as `{ type: 'rate_limit', text: 'Rate limited' }`. `{ task }` ends the open turn of that task's owner instead, and the first one a background task's session ends also ends the task.
|
|
182
|
-
- `compact()` records a compaction boundary, which ends the context and starts the next, as a compaction does.
|
|
183
|
-
- `startSession({ source, id? })` starts a session as `/clear`, `/resume`, or a fork does, under `id` when it names one. The mod's `session` values are that session's, so a `resume` to `test-session` brings the first session's values back, and `onSessionStart` hears the `source`.
|
|
184
|
+
- `compact()` records a compaction boundary, which ends the context and starts the next, then the cmod plugin's device note, as a compaction does.
|
|
185
|
+
- `startSession({ source, id? })` starts a session as `/clear`, `/resume`, or a fork does, under `id` when it names one, and adds the cmod plugin's device note. A first `startup` is the session the test already started, so it adds no second note. The mod's `session` values are that session's, so a `resume` to `test-session` brings the first session's values back, and `onSessionStart` hears the `source`. Set `fakes.device.read` before a `resume` to test a session that moved to another computer.
|
|
184
186
|
- `startTask({ title, agentType?, model?, openedBy?, parent?, isBackground?, forkedFrom? })` starts a task and returns its id, under the task `parent` names when it has one. Its owner runs `agentType` on `model`, and a `Prompt` added with its `task` opens the owner's own turn. `forkedFrom: 'test-session'` starts a fork, `isBackground: true` a background task whose owner is a session of its own, and both together a clone. A message added with a background task's `task` goes into its owner's session.
|
|
185
187
|
|
|
186
188
|
Each one runs the mod's session listeners, as a new message does in Claude Code. A `MessageDraft` is a message without its place: `{ type: Prompt, text, from? }`, `{ type: Note, text, from? }`, `{ type: Reply, text }`, `{ type: ToolCall, name, input?, callId? }`, `{ type: ToolResult, callId, output, isError? }`, `{ type: Skill, name, text }`, `{ type: InstructionFile, path, text }`, `{ type: AttachedFile, path, attachmentType, text }`, or `{ type: Notice, text }`.
|
|
@@ -298,12 +300,14 @@ type Fakes = {
|
|
|
298
300
|
clock: { now?, after?, every? }
|
|
299
301
|
cmod: { call? }
|
|
300
302
|
tool: { call? }
|
|
303
|
+
device: { read? }
|
|
301
304
|
}
|
|
302
305
|
```
|
|
303
306
|
|
|
304
307
|
Set a fake to answer a call:
|
|
305
308
|
|
|
306
309
|
- `session.surfaces` answers `['terminal']` unless set. Set it to `async () => []` to test a session no Claude app shows, such as `claude -p`.
|
|
310
|
+
- `device.read` answers `{ id: '5f0e8c2a9b7d4e31a6c4d2b0e8f71a93', name: 'test-computer', os: 'linux', arch: 'x64' }` unless set, so `device.read()` and each turn's `device` answer the same in every test on every computer. Set it to test the mod on another computer, or to reject to test a computer cmod cannot read, where the cmod plugin's note is left out and turns have no `device`.
|
|
307
311
|
- A call with no fake throws `<call>(<args>) has no fake answer. Set fakes.<call> on the tested mod.` So set `fakes.process.run` before a test runs a program, and `fakes.ui.ask` before the mod asks a question.
|
|
308
312
|
- A `program` job is the exception: it catches the `process.spawn` error and retries after 1, 2, 4, 8 and 16 seconds on real timers, so its `ready()` waits past `bun test`'s 5-second timeout. Set `fakes.process.spawn` before a test starts a `program` job.
|
|
309
313
|
- A `program` job with `singleInstance` spawns `/test/home/.local/share/cmod/programs/cmod program <mod> -- <command…>`, so `fakes.process.spawn` gets that `argv`. Each line the fake writes to standard output is the address of the copy that runs now, so a test fakes another session's copy taking over by writing a second line, and `ready()` resolves the new address.
|
package/mod.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { AskOptions, CmodDependencies, ConfigRow as ClaudeConfigRow, FsStat
|
|
|
2
2
|
import { type Hotkey, type HotkeyInit, type Hotkeys } from './hotkeys.js';
|
|
3
3
|
import { type Step } from './installer.js';
|
|
4
4
|
import { type Option, type Options, type OptionValues } from './options.js';
|
|
5
|
+
import type { Device } from './session/context/turn/device.js';
|
|
5
6
|
import { type BeforeMethod, type CommandRun, type CommandRunAnswer, type OnMethod, type Sessions } from './session/session.js';
|
|
6
7
|
import type { Widget, WidgetInit } from './ui/areas.js';
|
|
7
8
|
import type { Page, PageInit, Pane, PaneInit } from './ui/panes.js';
|
|
@@ -137,6 +138,9 @@ export type Imports = {
|
|
|
137
138
|
readonly http: {
|
|
138
139
|
fetch(url: string, init?: HttpInit): Promise<HttpResponse>;
|
|
139
140
|
};
|
|
141
|
+
readonly device: {
|
|
142
|
+
read(): Promise<Device>;
|
|
143
|
+
};
|
|
140
144
|
readonly clipboard: {
|
|
141
145
|
write(text: string): Promise<void>;
|
|
142
146
|
};
|
|
@@ -150,11 +154,17 @@ export declare const fs: Imports['fs'];
|
|
|
150
154
|
export declare const metadata: Imports['metadata'];
|
|
151
155
|
export declare const process: Imports['process'];
|
|
152
156
|
export declare const http: Imports['http'];
|
|
157
|
+
export declare const device: Imports['device'];
|
|
153
158
|
export declare const clipboard: Imports['clipboard'];
|
|
154
159
|
export type Mod<State extends object = Record<never, never>, Declared extends Options = Options, Keys extends Hotkeys = Hotkeys> = {
|
|
155
160
|
readonly name: string;
|
|
156
161
|
readonly folder: string;
|
|
157
162
|
readonly dataFolder: string;
|
|
163
|
+
readonly secrets: {
|
|
164
|
+
get(key: string): Promise<string | undefined>;
|
|
165
|
+
store(key: string, value: string): Promise<void>;
|
|
166
|
+
delete(key: string): Promise<void>;
|
|
167
|
+
};
|
|
158
168
|
readonly state: Readonly<State>;
|
|
159
169
|
readonly options: OptionValues<Declared>;
|
|
160
170
|
readonly hotkeys: {
|
|
@@ -227,6 +237,7 @@ export type { Tool } from './jobs/tool.js';
|
|
|
227
237
|
export { Session, type AnswerOptions, type BeforeMethods, type Surface, type Listener, type ListenerTime, type OnMethods, type ReadOptions, type RecordPart, type Refusal, type SearchOptions, type SessionScope, type SessionSend, type Sessions, type CurrentSession, type Placement, type ProjectSetup, type SessionStartAsked, type SessionStarted, type SessionEnded, type ModelChange, type CwdChange, type DirectoryAdd, type Worktree, type Notification, type Elicitation, type ElicitationResponse, type McpServer, type PermissionUpdate, type PermissionCheck, type PermissionRequest, type PermissionDenial, type BatchedCall, type ToolBatch, type Todo, type ReplyDisplay, type TaskOwner, type TaskStartArgs, type ToolCallArgs, type Usage, type RateLimit, type CommandRun, type CommandRunAnswer } from './session/session.js';
|
|
228
238
|
export type { Context } from './session/context/context.js';
|
|
229
239
|
export type { Turn } from './session/context/turn/turn.js';
|
|
240
|
+
export type { Device } from './session/context/turn/device.js';
|
|
230
241
|
export type { Message, MessageType } from './session/context/turn/message/message.js';
|
|
231
242
|
export { Prompt } from './session/context/turn/message/prompt.js';
|
|
232
243
|
export { Note } from './session/context/turn/message/note.js';
|
package/mod.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,SAAS,IAAI,eAAe,EAC5B,aAAa,EACb,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,QAAQ,EACT,MAAM,aAAa,CAAA;AACpB,OAAO,EAAgB,KAAK,MAAM,EAAE,KAAK,UAAU,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAA;AACvF,OAAO,EAAc,KAAK,IAAI,EAAE,MAAM,gBAAgB,CAAA;AACtD,OAAO,EAAgB,KAAK,MAAM,EAAE,KAAK,OAAO,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Q,EAAE,GAAG,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAE,MAAM,0CAA0C,CAAA;AAC/H,YAAY,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAClD,OAAO,EAAE,IAAI,EAAE,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA"}
|
package/mod.js
CHANGED
|
@@ -50,6 +50,9 @@ export const process = {
|
|
|
50
50
|
export const http = {
|
|
51
51
|
fetch: (url, init) => bound().http.fetch(url, init),
|
|
52
52
|
};
|
|
53
|
+
export const device = {
|
|
54
|
+
read: () => bound().device.read(),
|
|
55
|
+
};
|
|
53
56
|
export const clipboard = {
|
|
54
57
|
write: (text) => bound().clipboard.write(text),
|
|
55
58
|
};
|
package/package.json
CHANGED
package/records.d.ts
CHANGED
|
@@ -96,8 +96,8 @@ export type Preferences = {
|
|
|
96
96
|
};
|
|
97
97
|
export declare function parsePreferences(value: unknown, path: string): Preferences;
|
|
98
98
|
export declare function parseConsent(value: unknown, path: string): Record<string, string[]>;
|
|
99
|
-
export declare const coreVersion = "5.
|
|
100
|
-
export declare const oldestCmodVersion = "5.
|
|
99
|
+
export declare const coreVersion = "5.2.1";
|
|
100
|
+
export declare const oldestCmodVersion = "5.2.0";
|
|
101
101
|
export declare function hotkeyCommand(mod: string, hotkey: string): string;
|
|
102
102
|
export declare function hotkeyBindings(mod: string, hotkeys: Hotkeys | undefined): Record<string, string>;
|
|
103
103
|
export declare function boundCombos(keybindings: unknown): Map<string, string>;
|
package/records.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"records.d.ts","sourceRoot":"","sources":["src/records.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,OAAO,EAAE,M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AE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;CAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CA6BzI;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAiBtD;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAiBpD;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAQnE;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE"}
|
package/records.js
CHANGED
|
@@ -195,8 +195,9 @@ export function updatesToTurnOn(marketplace, settings, known) {
|
|
|
195
195
|
const declared = isObject(settings) && isObject(settings['extraKnownMarketplaces']) ? settings['extraKnownMarketplaces'][marketplace] : undefined;
|
|
196
196
|
const fetched = isObject(known) ? known[marketplace] : undefined;
|
|
197
197
|
const isDecided = [declared, fetched].some((entry) => isObject(entry) && typeof entry['autoUpdate'] === 'boolean');
|
|
198
|
-
const
|
|
199
|
-
|
|
198
|
+
const sources = [declared, fetched].flatMap((entry) => (isObject(entry) && isObject(entry['source']) ? [entry['source']] : []));
|
|
199
|
+
const isFolder = sources.some((source) => source['source'] === 'directory');
|
|
200
|
+
return isDecided || isFolder || sources.length === 0 ? undefined : marketplace;
|
|
200
201
|
}
|
|
201
202
|
export function consentPath(store) {
|
|
202
203
|
return `${store}/consent.json`;
|
|
@@ -265,8 +266,8 @@ function readHotkeys(hotkeys) {
|
|
|
265
266
|
throw new Error(`package.json "cmod.hotkeys" is not a map of hotkeys to their title and optional default combo. ${fix}`);
|
|
266
267
|
return { hotkeys: checkHotkeys('package.json "cmod"', hotkeys) };
|
|
267
268
|
}
|
|
268
|
-
export const coreVersion = '5.
|
|
269
|
-
export const oldestCmodVersion = '5.
|
|
269
|
+
export const coreVersion = '5.2.1';
|
|
270
|
+
export const oldestCmodVersion = '5.2.0';
|
|
270
271
|
export function hotkeyCommand(mod, hotkey) {
|
|
271
272
|
return `${mod}--${hotkey}`;
|
|
272
273
|
}
|
package/register.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["src/register.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA4D,EAAE,EAAE,aAAa,EAAgB,MAAM,aAAa,CAAA;AAC5H,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["src/register.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA4D,EAAE,EAAE,aAAa,EAAgB,MAAM,aAAa,CAAA;AAC5H,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAc3C,wBAAgB,aAAa,IAAI,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,CAEjE;AAkGD,wBAAgB,WAAW,CAAC,KAAK,SAAS,MAAM,EAAE,QAAQ,SAAS,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,UAAU,EAAE,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI,CAsDzK;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,EAAE,GAAG,IAAI,CAIzD"}
|