@cmodjs/core 4.3.4 → 5.0.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.
Files changed (60) hide show
  1. package/README.md +1 -1
  2. package/docs/commands.md +19 -30
  3. package/docs/dependencies.md +7 -5
  4. package/docs/index.md +4 -5
  5. package/docs/install-steps.md +12 -14
  6. package/docs/jobs.md +3 -11
  7. package/docs/mod.md +18 -21
  8. package/docs/session.md +11 -11
  9. package/docs/state.md +1 -1
  10. package/docs/testing.md +3 -5
  11. package/docs/ui.md +3 -3
  12. package/jobs/program.d.ts.map +1 -1
  13. package/jobs/program.js +3 -17
  14. package/mod.d.ts +0 -16
  15. package/mod.d.ts.map +1 -1
  16. package/package.json +1 -1
  17. package/records.d.ts +4 -11
  18. package/records.d.ts.map +1 -1
  19. package/records.js +17 -48
  20. package/runtime/announce.d.ts +1 -1
  21. package/runtime/announce.d.ts.map +1 -1
  22. package/runtime/announce.js +2 -3
  23. package/runtime/conversations.d.ts.map +1 -1
  24. package/runtime/conversations.js +3 -46
  25. package/runtime/engine.d.ts +2 -2
  26. package/runtime/engine.d.ts.map +1 -1
  27. package/runtime/installer.d.ts +0 -9
  28. package/runtime/installer.d.ts.map +1 -1
  29. package/runtime/installer.js +1 -15
  30. package/runtime/lifecycle.d.ts +1 -2
  31. package/runtime/lifecycle.d.ts.map +1 -1
  32. package/runtime/lifecycle.js +37 -191
  33. package/runtime/metadata.d.ts +1 -2
  34. package/runtime/metadata.d.ts.map +1 -1
  35. package/runtime/metadata.js +1 -2
  36. package/runtime/sessions.d.ts +3 -7
  37. package/runtime/sessions.d.ts.map +1 -1
  38. package/runtime/sessions.js +10 -34
  39. package/runtime/toaster.d.ts.map +1 -1
  40. package/runtime/toaster.js +6 -9
  41. package/src/jobs/program.ts +3 -17
  42. package/src/mod.ts +0 -18
  43. package/src/records.ts +20 -55
  44. package/src/runtime/announce.ts +2 -3
  45. package/src/runtime/conversations.ts +3 -45
  46. package/src/runtime/engine.ts +2 -2
  47. package/src/runtime/installer.ts +1 -37
  48. package/src/runtime/lifecycle.ts +38 -188
  49. package/src/runtime/metadata.ts +0 -3
  50. package/src/runtime/sessions.ts +10 -39
  51. package/src/runtime/toaster.ts +6 -9
  52. package/src/testing.ts +9 -14
  53. package/testing.d.ts +0 -1
  54. package/testing.d.ts.map +1 -1
  55. package/testing.js +9 -13
  56. package/docs/permissions.md +0 -97
  57. package/runtime/grants.d.ts +0 -34
  58. package/runtime/grants.d.ts.map +0 -1
  59. package/runtime/grants.js +0 -326
  60. package/src/runtime/grants.ts +0 -348
package/docs/session.md CHANGED
@@ -8,7 +8,7 @@ import { Prompt, sessions } from '../node_modules/@cmodjs/core/mod.js'
8
8
  const prompts = (await sessions.current.messages()).filter((message) => message.type === Prompt)
9
9
  ```
10
10
 
11
- A mod hears and reads the session it runs in with no permission. Every other session needs the `conversation` permission. Sending to a session and changing its text need `prompt`, calling a tool and changing a tool call need `tools`, and starting or changing a task needs `tasks`. A `refuse` answer needs no permission ([permissions.md](permissions.md)).
11
+ A mod hears, reads, and acts on the session it runs in and every other session on the computer.
12
12
 
13
13
  ## The shape of a conversation
14
14
 
@@ -51,9 +51,9 @@ for await (const message of sessions.search('deploy job', { type: Prompt }, { si
51
51
  const more = sessions.search('deploy job', { type: Prompt }, { since: '1w', before: found.at(-1) })
52
52
  ```
53
53
 
54
- - Its `on` methods hear every running session of the project, this one included, and need the `conversation` permission ([Listen](#listen-to-a-record)). `sessions.current`'s methods hear this session with none. `sessions` has no `before` methods. To change what happens in another session, call a `before` method on that session ([Change what happens](#change-what-happens)).
54
+ - Its `on` methods hear every running session of the project, this one included ([Listen](#listen-to-a-record)). `sessions.current`'s methods hear this session. `sessions` has no `before` methods. To change what happens in another session, call a `before` method on that session ([Change what happens](#change-what-happens)).
55
55
 
56
- While a mod holds the `conversation` permission, the cmod plugin indexes every conversation in the background at each session's start, so `search` waits only for what changed since. The `cmod history` command answers the same questions in a terminal ([commands.md](commands.md#cmod-history)).
56
+ While cmod has set up a mod other than cmod, the cmod plugin indexes every conversation in the background at each session's start, so `search` waits only for what changed since. The `cmod history` command answers the same questions in a terminal ([commands.md](commands.md#cmod-history)).
57
57
 
58
58
  ## Session
59
59
 
@@ -90,7 +90,7 @@ type Session = {
90
90
  ```
91
91
 
92
92
  - `id` is Claude Code's session id, and a task owner's `id` is its task's id. `title` is the name the person gave it with `/rename`, or the first line of its first prompt. A resumed or forked session with no name, and a session the mod started in after its first prompt, has an empty `sessions.current.title` until `sessions.list()` reads it.
93
- - `color` is the color the person last picked with `/color`, such as `cyan`, and is absent when they never picked one or reset it with `/color default`. A task's owner has none. `sessions.current.color` follows each `/color` the person runs, and a resumed session's color holds from the mod's start, with or without the `conversation` permission, as `title` does.
93
+ - `color` is the color the person last picked with `/color`, such as `cyan`, and is absent when they never picked one or reset it with `/color default`. A task's owner has none. `sessions.current.color` follows each `/color` the person runs, and a resumed session's color holds from the mod's start, as `title` does.
94
94
  - `project` is the project the session works in, and `cwd` is its working folder. For the current session both follow `/cd`, and `cwd` follows a `cd` in a Bash or PowerShell call.
95
95
  - `agentType` is the agent definition the session runs, such as `Explore` for a task's owner, or the agent a session started with `claude --agent` runs. A plain session has none.
96
96
  - `model` is the model the session runs on. `startedAt` and `lastAt` are ISO times.
@@ -202,7 +202,7 @@ sessions.current.beforeTaskStart({ owner: { agentType: 'Explore' } }, () => ({ o
202
202
  sessions.current.beforeTurnEnd(async () => ((await testsPass()) ? undefined : { refuse: 'The tests fail. Fix them before you stop.' }))
203
203
  ```
204
204
 
205
- An answer that changes text needs the `prompt` permission, a `beforeToolCall` answer needs `tools`, and a `beforeTaskStart` answer needs `tasks`. A `note` always needs `prompt`, so a `beforeToolCall` answer with both `input` and `note` needs both. Without it the answer changes nothing, and the toast `The <method> listener failed` names the permission. When several listeners answer, each sees what the one before it changed, and the first `refuse` or `result` decides.
205
+ When several listeners answer, each sees what the one before it changed, and the first `refuse` or `result` decides.
206
206
 
207
207
  Claude reads each mod's `note` inside the mod's own tag, such as `<tracer_mod>…</tracer_mod>` for the mod `tracer`. Every note Claude received becomes a `Note` whose `from` is `{ type: 'mod', name }`, so `onNote({ from: { type: 'mod', name: 'tracer' } })` hears each note of tracer's that Claude got, and never one Claude Code dropped.
208
208
 
@@ -222,7 +222,7 @@ Claude reads each mod's `note` inside the mod's own tag, such as `<tracer_mod>
222
222
  | `onNotification` | Claude Code notifies the person | `Notification`: `text`, `title?`, `type` | |
223
223
  | `beforeElicitation`, `onElicitation` | an MCP server asks the person | `Elicitation`: `id?`, `server`, `text`, `mode?`, `url?`, `schema?` | `{ refuse }` |
224
224
  | `beforeElicitationResponse`, `onElicitationResponse` | the person answers an MCP server | `ElicitationResponse`: `id?`, `server`, `mode?`, `action`, `content?` | `{ refuse }` |
225
- | `beforePermissionCheck`, `onPermissionCheck` | Claude Code decides whether a tool call runs, asks, or is refused, before any dialog, and when a mod asks `tools.check` | `PermissionCheck`: `name`, `input`, `callId?`, `decision`, `reason?`, `rule?`, `ceiling?` | `{ allow: true }`, `{ ask }`, or `{ refuse }`. `allow` approves a call in every mode, auto mode included, and needs `approve`. A mod never overrides a refusal from the person's settings |
225
+ | `beforePermissionCheck`, `onPermissionCheck` | Claude Code decides whether a tool call runs, asks, or is refused, before any dialog, and when a mod asks `tools.check` | `PermissionCheck`: `name`, `input`, `callId?`, `decision`, `reason?`, `rule?`, `ceiling?` | `{ allow: true }`, `{ ask }`, or `{ refuse }`. `allow` approves a call in every mode, auto mode included. `allow` and `ask` need `"approve": true` in `package.json` `"cmod"` ([mod.md](mod.md#register-the-mod-with-claude-code)). A mod never overrides a refusal from the person's settings |
226
226
  | `beforePermissionRequest`, `onPermissionRequest` | a permission dialog is about to show | `PermissionRequest`: `name`, `input`, `suggestions`, `mcpServer?` | `{ allow: true, input?, updates? }` or `{ refuse, interrupt? }` |
227
227
  | `beforePermissionDenial`, `onPermissionDenial` | a tool call was denied | `PermissionDenial`: `name`, `input`, `callId`, `reason`, `mcpServer?` | `{ retry: true }` |
228
228
  | `beforeToolBatch`, `onToolBatch` | a batch of tool calls finished | `ToolBatch`: `calls`, each `{ callId, name, input, output? }` | `{ note }` |
@@ -251,17 +251,17 @@ A `before` method on another session asks the mod over cmod from that session. T
251
251
 
252
252
  Every action works on the current session and on every other running session. cmod carries an action to another session, and that session's cmod does it there.
253
253
 
254
- - `send` adds a message to the session, and needs the `prompt` permission.
254
+ - `send` adds a message to the session.
255
255
  - A `Note` is text the agent reads on its next call to the model and the person does not see. It starts no turn. It rejects with `<mod>: Claude Code refused the note: <reason>` when a plugin refuses it.
256
256
  - A `Prompt` is the next prompt, so the agent answers it as a turn of its own. Claude Code holds it until the session is idle, so it never cuts into a turn, and frames it as `The <mod> plugin sent a message:`. With `as: Person`, the agent reads it bare, as the person's own words, while every hook still sees that the mod sent it. It rejects with `<mod>: Claude Code dropped the prompt: <reason>` when a plugin drops it.
257
257
  - `as: Session` sends it to another session as a message from this one, which Claude Code shows as one session writing to another.
258
258
  - To a task's owner, `send` delivers the text to that running subagent.
259
- - `startTask` starts a task in the session, the way the Agent tool starts one, and resolves the `Task` once it started. It does not wait for the task to finish. `title` is the task's title, `agentType` names the owner's agent type, such as `Explore`, `name` is the address a teammate's `SendMessage` reaches it by, and `model` and `cwd` change what it runs on and where. It needs the `tasks` permission, and rejects with `<mod>: Claude Code refused the task: <reason>` when a hook refuses it.
259
+ - `startTask` starts a task in the session, the way the Agent tool starts one, and resolves the `Task` once it started. It does not wait for the task to finish. `title` is the task's title, `agentType` names the owner's agent type, such as `Explore`, `name` is the address a teammate's `SendMessage` reaches it by, and `model` and `cwd` change what it runs on and where. It rejects with `<mod>: Claude Code refused the task: <reason>` when a hook refuses it.
260
260
  - With `isBackground: true`, the owner is a new background Claude Code session, as `claude --bg` starts, which starts fresh on the prompt and keeps running after this session ends. It takes no `name`, and rejects with `<mod>: a background task takes no name.` for one.
261
261
  - `fork` starts a subagent that keeps this session's whole conversation and does what the prompt says.
262
262
  - `clone` starts a new background session with a copy of this session's conversation, which carries on with the prompt.
263
263
 
264
- Every task needs the `tasks` permission and shows in this session's goal. `fork` and `clone` take only `prompt` and `title`, because the owner is a copy of this session. A `beforeTaskStart` listener that refuses a background task or a clone rejects the call with `<mod>: a beforeTaskStart listener refused the task: <reason>`.
264
+ Every task shows in this session's goal. `fork` and `clone` take only `prompt` and `title`, because the owner is a copy of this session. A `beforeTaskStart` listener that refuses a background task or a clone rejects the call with `<mod>: a beforeTaskStart listener refused the task: <reason>`.
265
265
 
266
266
  ```ts
267
267
  await sessions.current.startTask({ title: 'Map the auth code', prompt, agentType: 'Explore' })
@@ -276,7 +276,7 @@ await sessions.current.startTask({ title: 'Upgrade dependencies', prompt, isBack
276
276
  | `fork` | absent | a subagent of this session, `forkedFrom` this session |
277
277
  | `clone` | `true` | a new session whose `id` is the task's, `forkedFrom` this session |
278
278
  | `startTask` with `isBackground` | `true` | a new session whose `id` is the task's |
279
- - `callTool` runs a tool in the session, such as `{ name: 'Bash', input: { command: 'bun test' } }`, and resolves its `ToolResult`. It needs the `tools` permission.
279
+ - `callTool` runs a tool in the session, such as `{ name: 'Bash', input: { command: 'bun test' } }`, and resolves its `ToolResult`.
280
280
  - `usage` answers the session's model, its context window's fill, its rate limits, and its cost so far, as the status line shows them: `{ model, contextWindow: { tokenCount?, size?, percent? }, rateLimits?: { type, percent, resetsAt? }[], cost?: { usd } }`. Each rate limit is one window of the account's plan: its `type`, such as `five_hour`, `seven_day`, or a Claude gateway's `spend_limit`, how much of it is used, 0 to 100, and when it resets, as an ISO 8601 time. For an ended session and a task's owner it answers the model and the tokens of its last reply, from its transcript, with no rate limits.
281
281
  - `surfaces` answers the Claude apps showing the session now: `'terminal'`, `'desktop'`, `'mobile'`, and `'vscode'`. An ended session shows in none.
282
282
 
@@ -432,7 +432,7 @@ sessions.current.onTurnEnd((turn) => {
432
432
  if (turn.failure !== undefined) mod.toast.error(`Claude stopped: ${turn.failure.text}`)
433
433
  })
434
434
  ```
435
- - `abort()` stops a turn while it runs, a task's turn included, and needs the `prompt` permission. It throws on a turn that has ended. Claude Code shows no marker, so a mod that aborts tells the person with a toast.
435
+ - `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
436
  - A context's `number` counts from 1. Its `closedAt` is set at the compaction that ended it.
437
437
  - 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.
438
438
  - A task's `owner` is a `TaskOwner`: the session doing the work, which can't start tasks or call tools. Its goal is the task's prompt, its `agentType` and `model` are what the task runs, and its turns and messages are the task's own. Claude Code's checklist tools, `TaskCreate`, `TaskUpdate`, and `TaskList`, are not tasks: they are its todo list, which `onTodoCreate` and `onTodoComplete` hear.
package/docs/state.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  cmod keeps each `session` value as long as Claude Code keeps the session's transcript, so a session comes back with its values for as long as `--resume` can find it.
17
17
 
18
- A fork of the conversation, by `/branch`, `claude --resume <id> --fork-session`, or a move to the agents view, starts with the `session` values of the conversation it came from. Outside `/branch`, Claude Code does not say which conversation a fork came from, so the cmod plugin matches the fork's copied conversation to the one it came from, which needs its "Read your Claude Code conversations" permission. A fork starts with the starting values when that permission is off, when it was taken while the conversation it came from was still answering, or in a `-p` run.
18
+ A fork of the conversation, by `/branch`, `claude --resume <id> --fork-session`, or a move to the agents view, starts with the `session` values of the conversation it came from. Outside `/branch`, Claude Code does not say which conversation a fork came from, so the cmod plugin matches the fork's copied conversation to the one it came from. A fork starts with the starting values when it was taken while the conversation it came from was still answering, or in a `-p` run.
19
19
 
20
20
  cmod keeps each `project` value for the 20 projects that wrote it last, and a project past those 20 starts that value over from its starting value.
21
21
 
package/docs/testing.md CHANGED
@@ -27,7 +27,6 @@ Assert what a person or Claude sees: `tested.shown.page.lines()`, `tested.lines(
27
27
  type TestOptions<State, Options> = {
28
28
  readonly state?: { [Lifetime in keyof State]?: Partial<State[Lifetime]> }
29
29
  readonly options?: Partial<OptionValues<Options>>
30
- readonly permissions?: readonly string[]
31
30
  readonly scope?: 'user' | 'project'
32
31
  readonly projectRoot?: string
33
32
  readonly cwd?: string
@@ -42,7 +41,6 @@ type TestOptions<State, Options> = {
42
41
  | --- | --- | --- |
43
42
  | `state` | Values over the declared starting state | The declared state |
44
43
  | `options` | The option values Claude Code passes, as a person set them ([options.md](options.md)) | none: each option gets its default |
45
- | `permissions` | Exactly the permissions the person granted, such as `['network:api.github.com', 'model']` ([permissions.md](permissions.md)) | every permission the mod's `package.json` declares |
46
44
  | `scope` | `'project'` makes the mod a project plugin, in `<projectRoot>/.claude/skills/<name>` | `'user'` |
47
45
  | `projectRoot` | `sessions.current.project` | `/test/plugins/<name>`, or `/test/project` for a project plugin |
48
46
  | `cwd` | `sessions.current.cwd` | `projectRoot` |
@@ -89,7 +87,7 @@ Starts the mod: loads its state, runs `setup`, and adds its listeners, pages, pa
89
87
 
90
88
  ### raise
91
89
 
92
- `raise.<method>(payload)` runs the mod's listeners of that `on` or `before` method of `sessions.current`, and of `commands`, and returns the answer they combine to. For a `before` method of a Claude Code event, such as `beforeSessionStart`, `beforePermissionRequest`, or `beforeRun`, that is the answer before cmod drops the parts the mod has no permission for ([permissions.md](permissions.md#when-a-before-answer-has-no-grant)).
90
+ `raise.<method>(payload)` runs the mod's listeners of that `on` or `before` method of `sessions.current`, and of `commands`, and returns the answer they combine to.
93
91
 
94
92
  - Each process method takes its payload without `session` and `cwd`, which `raise` fills: `raise.beforeModelChange({ model: 'haiku', previous: 'opus', source: 'command', … })`, `raise.onCwdChange({ previous: '/work/old' })`, `raise.beforeRun({ name: 'compact', args: '', from: { type: Person } })`.
95
93
  - Each message `before` method takes a `MessageDraft` without its `type`, placed in the open turn: `raise.beforeToolCall({ name: 'Bash', input: { command: 'rm -rf build' } })` and `raise.beforePrompt({ text: 'Deploy to prod' })`. `{ task }` places it in a task.
@@ -322,7 +320,7 @@ Set a fake to answer a call:
322
320
  - `tool.call` answers `CronCreate`, `CronDelete`, and `CronList` by default, keeping the crons a `schedule` makes in `shown.schedules`. A call to any other tool needs a fake.
323
321
  - `files` takes symbolic links too: `testMod(mod, { files, links: { '/work/skills': '/shared/skills' } })` makes `/work/skills` a link to `/shared/skills`, so a test of `fs.find` or `metadata.update` follows it as a real file system does.
324
322
  - `testMod` opens no install page: an option with no default and no value fails `start()` with its fix, and the `installer` steps are not shown. Test a step's `render` and `isDone` by calling them with the started `mod`.
325
- - The `committer` below runs `git`, so its `package.json` declares `"permissions": { "run": ["git"] }`. A gated call the mod does not declare fails before it reaches a fake ([permissions.md](permissions.md)).
323
+ - The `committer` below runs `git`, and the `process.run` fake answers in its place.
326
324
 
327
325
  ```ts
328
326
  import { expect, test } from 'bun:test'
@@ -375,7 +373,7 @@ type ShownToast = { readonly type: ToastType; readonly message: string; readonly
375
373
 
376
374
  What the person and Claude would see: the toasts shown now, with a text description, the notes the mod added for Claude with `sessions.current.send` or a `prompt` that follows the state, and the `beforePrompt` notes a subagent reads as it starts from a spawn the test fires, the prompts it sent to the current session, the messages it sent to other sessions in `sent`, the log lines, the debug log lines, the open panes, the slash commands and tools the mod added, and the crons its `schedule` keeps now.
377
375
 
378
- The test kit keeps no Log, as a cmod older than 4.3.0 keeps none, so every error cmod catches for the mod shows in `toasts`, a refusal for a permission the test turned off with `permissions` included ([ui.md](ui.md#toasts)).
376
+ The test kit keeps no Log, as a cmod older than 4.3.0 keeps none, so every error cmod catches for the mod shows in `toasts` ([ui.md](ui.md#toasts)).
379
377
 
380
378
  ```ts
381
379
  test('the Mode prompt follows the mode', async () => {
package/docs/ui.md CHANGED
@@ -88,7 +88,7 @@ Progress(props: { value: number; width?: number })
88
88
 
89
89
  ## The Sidebar and its pages
90
90
 
91
- The Sidebar is one pane the cmod plugin draws beside the conversation for every mod. Its tabs are the Dashboard, the pages mods opened, and Settings. A mod that asks the person to install it, to set an option, or to finish a step opens its install page there, the `Install <mod>` tab ([install-steps.md](install-steps.md#consent)). The person shows or hides it with `meta+0`, switches tabs with `0` for the Dashboard, `1` to `8` for the pages, and `9` for Settings, and closes a page with the `×` on its tab. They change both combos in Settings, under cmod, Hotkeys.
91
+ The Sidebar is one pane the cmod plugin draws beside the conversation for every mod. Its tabs are the Dashboard, the pages mods opened, and Settings. A mod that asks the person to set an option or to finish a step opens its install page there, the `Install <mod>` tab ([install-steps.md](install-steps.md#steps-in-claude-code)). The person shows or hides it with `meta+0`, switches tabs with `0` for the Dashboard, `1` to `8` for the pages, and `9` for Settings, and closes a page with the `×` on its tab. They change both combos in Settings, under cmod, Hotkeys.
92
92
 
93
93
  A page is a part of a mod that draws in the Sidebar. Put each page in its own file in `src/pages/`:
94
94
 
@@ -165,7 +165,7 @@ export const notes = defineMod({
165
165
 
166
166
  ### Settings pages
167
167
 
168
- `mod.settings.add(page)` adds a page to the mod's entry in Settings, beside the Options, Permissions, Hotkeys, and Changelog cmod draws for every mod. It takes the same `PageInit` and returns the same `Page`. `mod.settings.open()` shows Settings at the mod's entry. `/mods` and `meta+m` open Settings too.
168
+ `mod.settings.add(page)` adds a page to the mod's entry in Settings, beside the Options, Hotkeys, and Changelog cmod draws for every mod. It takes the same `PageInit` and returns the same `Page`. `mod.settings.open()` shows Settings at the mod's entry. `/mods` and `meta+m` open Settings too.
169
169
 
170
170
  ## Panes
171
171
 
@@ -448,7 +448,7 @@ An error also shows as a toast when any of these holds:
448
448
  - the mod runs from its checkout, linked with [`cmod link`](commands.md#cmod-link) or loaded with `--plugin-dir`, because the person is its author
449
449
  - `Show errors from installed mods` is on, in Settings on cmod's page under Preferences
450
450
 
451
- A refusal for a permission the mod declared and the person turned off, whose text ends in `Turn it on in Settings.`, shows no toast. It goes to the Log and to Claude Code's debug log. A cmod older than 4.3.0 keeps no Log, so there every error shows its toast, this one included.
451
+ A cmod older than 4.3.0 keeps no Log, so there every error shows its toast.
452
452
 
453
453
  The error toast stays, with its buttons on a line under the message:
454
454
 
@@ -1 +1 @@
1
- {"version":3,"file":"program.d.ts","s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AC,OAAO,CAAC,CAyFxK"}
package/jobs/program.js CHANGED
@@ -1,4 +1,3 @@
1
- import { PermissionRefused, programAddresses } from '../runtime/grants.js';
2
1
  import { engineOf } from '../runtime/engine.js';
3
2
  import { messageOf } from '../utils/text.js';
4
3
  import { basename } from '../vendor.js';
@@ -18,15 +17,9 @@ export function program(options) {
18
17
  let failure;
19
18
  let exits = 0;
20
19
  const waiting = [];
21
- const ownAddresses = programAddresses(mod);
22
- const spawn = async () => (singleInstance ? spawnCmod(['program', mod.name, '--', ...command], request) : claude.process.spawn(request));
23
- const forget = () => {
24
- if (address !== undefined)
25
- ownAddresses.delete(freeAddressOf(address));
26
- address = undefined;
27
- };
20
+ const spawn = () => (singleInstance ? spawnCmod(['program', mod.name, '--', ...command], environment) : claude.process.spawn(request));
28
21
  const stop = (reason) => {
29
- forget();
22
+ address = undefined;
30
23
  state = 'fatal';
31
24
  failure = new Error(`${mod.name}: the ${executable} program stopped: ${reason}`);
32
25
  const retry = () => {
@@ -39,11 +32,9 @@ export function program(options) {
39
32
  waiter.reject(failure);
40
33
  };
41
34
  const show = (next) => {
42
- forget();
43
35
  address = next;
44
36
  state = 'running';
45
37
  exits = 0;
46
- ownAddresses.add(freeAddressOf(next));
47
38
  for (const waiter of waiting.splice(0))
48
39
  waiter.resolve(next);
49
40
  };
@@ -72,11 +63,9 @@ export function program(options) {
72
63
  }
73
64
  }
74
65
  catch (error) {
75
- if (error instanceof PermissionRefused)
76
- return stop(messageOf(error));
77
66
  lastError = messageOf(error);
78
67
  }
79
- forget();
68
+ address = undefined;
80
69
  exits += 1;
81
70
  const wait = backoffSeconds[exits - 1];
82
71
  if (wait === undefined) {
@@ -116,6 +105,3 @@ function addressOf(line) {
116
105
  return { url: 'http://localhost', socketPath: unix[1] };
117
106
  return undefined;
118
107
  }
119
- function freeAddressOf(address) {
120
- return address.socketPath ?? new URL(address.url).host;
121
- }
package/mod.d.ts CHANGED
@@ -66,21 +66,6 @@ export type FileChange = {
66
66
  readonly path: string;
67
67
  readonly type: 'change' | 'add' | 'unlink';
68
68
  };
69
- export type Allowed = {
70
- allows(value: string): boolean;
71
- };
72
- export type Permissions = {
73
- readonly conversation: boolean;
74
- readonly prompt: boolean;
75
- readonly model: boolean;
76
- readonly tasks: boolean;
77
- readonly tools: boolean;
78
- readonly approve: boolean;
79
- readonly network: Allowed;
80
- readonly run: Allowed;
81
- readonly files: Allowed;
82
- readonly config: Allowed;
83
- };
84
69
  export type SettingsFile = {
85
70
  read(): Promise<Settings>;
86
71
  update(values: Readonly<Record<string, unknown>>): Promise<void>;
@@ -172,7 +157,6 @@ export type Mod<State extends object = Record<never, never>, Declared extends Op
172
157
  readonly dataFolder: string;
173
158
  readonly state: Readonly<State>;
174
159
  readonly options: OptionValues<Declared>;
175
- readonly permissions: Permissions;
176
160
  readonly hotkeys: {
177
161
  readonly [Key in keyof Keys]: Hotkey;
178
162
  };
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,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAA;AAGzF,OAAO,EAAiB,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,KAAK,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,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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmodjs/core",
3
- "version": "4.3.4",
3
+ "version": "5.0.0",
4
4
  "description": "Build Claude Code mods: hooks, panes, permissions, checks, and an install that just works.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/records.d.ts CHANGED
@@ -16,12 +16,9 @@ export type Steps = {
16
16
  uninstall?: string;
17
17
  program?: string;
18
18
  hotkeys?: Hotkeys;
19
+ approve?: true;
19
20
  permissions?: readonly string[];
20
21
  };
21
- export declare const listPermissions: readonly ['network', 'run', 'files', 'config'];
22
- export declare const flagPermissions: readonly ['conversation', 'prompt', 'model', 'tasks', 'tools', 'approve'];
23
- export type ListPermission = (typeof listPermissions)[number];
24
- export type FlagPermission = (typeof flagPermissions)[number];
25
22
  export type ReadFile = (path: string) => Promise<string | undefined>;
26
23
  export type RunnerEvent = {
27
24
  type: 'progress';
@@ -71,12 +68,9 @@ export declare function configFolders(env: Record<string, string | undefined>, n
71
68
  export declare function readRecord(read: ReadFile, store: string, name: string): Promise<InstallRecord | undefined>;
72
69
  export declare function writeRecord(write: (path: string, text: string) => Promise<void>, store: string, record: InstallRecord): Promise<void>;
73
70
  export declare function readSteps(pkg: unknown): Steps | undefined;
74
- export declare const grantFix = "Turn it on in Settings.";
75
71
  export declare const installFix = "Install it in Plugins.";
76
72
  export declare const secretFix = "Set it in /config, where Claude Code keeps it in your keychain.";
77
- export declare function permissionWords(item: string): string;
78
73
  export declare function settingPaths(values: Readonly<Record<string, unknown>>): string[][];
79
- export declare function isSettingCovered(granted: Iterable<string>, path: string): boolean;
80
74
  export declare const pendingStepsMethod = "cmod:pendingSteps";
81
75
  export declare const finishStepsMethod = "cmod:finishSteps";
82
76
  export declare function marketplaceOf(root: string, name: string): string | undefined;
@@ -98,17 +92,16 @@ export declare function hasLinkedMods(knownMarketplaces: unknown, links: Links):
98
92
  export declare function widgetsPath(store: string): string;
99
93
  export declare function preferencesPath(store: string): string;
100
94
  export type Preferences = {
101
- readonly asksBeforeUpdatePermissions: boolean;
102
95
  readonly showsInstalledModErrors: boolean;
103
96
  };
104
97
  export declare function parsePreferences(value: unknown, path: string): Preferences;
105
98
  export declare function parseConsent(value: unknown, path: string): Record<string, string[]>;
106
- export declare const coreVersion = "4.3.4";
99
+ export declare const coreVersion = "5.0.0";
100
+ export declare const oldestCmodVersion = "5.0.0";
107
101
  export declare function hotkeyCommand(mod: string, hotkey: string): string;
108
102
  export declare function hotkeyBindings(mod: string, hotkeys: Hotkeys | undefined): Record<string, string>;
109
103
  export declare function boundCombos(keybindings: unknown): Map<string, string>;
110
- export declare function hotkeyWords(hotkeys: Hotkeys | undefined): string;
111
- export declare function bundleDefines(permissions: readonly string[]): Record<string, string>;
104
+ export declare function bundleDefines(steps: Steps): Record<string, string>;
112
105
  export declare function scriptPaths(command: string): string[];
113
106
  export declare function scriptsSha256(steps: Steps, files: {
114
107
  read: ReadFile;
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,MAAM,cAAc,CAAA;AAG1E,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,GAAG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AM,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAEhG;AAED,wBAAgB,WAAW,CAAC,WAAW,EAAE,OAAO,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAQrE;AAYD,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAElE;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAMrD;AAMD,wBAAsB,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,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
@@ -1,7 +1,7 @@
1
1
  import { checkHotkeys } from './hotkeys.js';
2
2
  import { listed, messageOf } from './utils/text.js';
3
- export const listPermissions = ['network', 'run', 'files', 'config'];
4
- export const flagPermissions = ['conversation', 'prompt', 'model', 'tasks', 'tools', 'approve'];
3
+ const listPermissions = ['network', 'run', 'files', 'config'];
4
+ const flagPermissions = ['conversation', 'prompt', 'model', 'tasks', 'tools', 'approve'];
5
5
  const permissionNames = [...listPermissions, ...flagPermissions];
6
6
  const hostName = /^[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])?)*$/;
7
7
  const programName = /^[A-Za-z0-9][A-Za-z0-9._+-]*$/;
@@ -131,12 +131,16 @@ export function readSteps(pkg) {
131
131
  const program = steps['program'];
132
132
  if (program !== undefined && (typeof program !== 'string' || !pluginName.test(program)))
133
133
  throw new Error('package.json "cmod.program" must be the program\'s command, such as "hello".');
134
+ const approve = steps['approve'];
135
+ if (approve !== undefined && approve !== true)
136
+ throw new Error(`package.json "cmod.approve" is ${JSON.stringify(approve)}. Write "approve": true, or leave it out.`);
134
137
  const permissions = readPermissions(steps);
135
138
  return {
136
139
  ...readCommand(steps, 'install'),
137
140
  ...readCommand(steps, 'uninstall'),
138
141
  ...(program === undefined ? {} : { program }),
139
142
  ...readHotkeys(steps['hotkeys']),
143
+ ...(approve === true || permissions.includes('approve') ? { approve: true } : {}),
140
144
  ...(permissions.length === 0 ? {} : { permissions }),
141
145
  };
142
146
  }
@@ -174,44 +178,11 @@ function readPermissions(steps) {
174
178
  }
175
179
  return items;
176
180
  }
177
- export const grantFix = 'Turn it on in Settings.';
178
181
  export const installFix = 'Install it in Plugins.';
179
182
  export const secretFix = 'Set it in /config, where Claude Code keeps it in your keychain.';
180
- export function permissionWords(item) {
181
- const split = item.indexOf(':');
182
- const target = item.slice(split + 1);
183
- switch (split === -1 ? item : item.slice(0, split)) {
184
- case 'network':
185
- return `Connect to ${target}`;
186
- case 'run':
187
- return target === '*' ? 'Run any program on your computer' : `Run ${target} on your computer`;
188
- case 'files':
189
- return `Change ${target}`;
190
- case 'conversation':
191
- return 'Read your Claude Code conversations';
192
- case 'prompt':
193
- return 'Add text Claude reads and start turns';
194
- case 'model':
195
- return 'Ask a model, which uses your plan';
196
- case 'tasks':
197
- return 'Start tasks that work beside Claude';
198
- case 'tools':
199
- return "Use and change Claude's tool calls";
200
- case 'config':
201
- return `Change ${target} in your Claude Code settings`;
202
- case 'approve':
203
- return "Approve Claude's tool calls for you";
204
- default:
205
- return item;
206
- }
207
- }
208
183
  export function settingPaths(values) {
209
184
  return Object.entries(values).flatMap(([key, value]) => (isObject(value) && Object.keys(value).length > 0 ? settingPaths(value).map((path) => [key, ...path]) : [[key]]));
210
185
  }
211
- export function isSettingCovered(granted, path) {
212
- const item = `config:${path}`;
213
- return [...granted].some((each) => item === each || item.startsWith(`${each}.`));
214
- }
215
186
  export const pendingStepsMethod = 'cmod:pendingSteps';
216
187
  export const finishStepsMethod = 'cmod:finishSteps';
217
188
  export function marketplaceOf(root, name) {
@@ -273,16 +244,16 @@ export function preferencesPath(store) {
273
244
  }
274
245
  export function parsePreferences(value, path) {
275
246
  if (value === undefined)
276
- return { asksBeforeUpdatePermissions: false, showsInstalledModErrors: false };
277
- if (!isObject(value) || ['asksBeforeUpdatePermissions', 'showsInstalledModErrors'].some((key) => value[key] !== undefined && typeof value[key] !== 'boolean'))
247
+ return { showsInstalledModErrors: false };
248
+ if (!isObject(value) || (value['showsInstalledModErrors'] !== undefined && typeof value['showsInstalledModErrors'] !== 'boolean'))
278
249
  throw new Error(`${path} is not a map of cmod's preferences to true or false. Delete it, and cmod uses its defaults.`);
279
- return { asksBeforeUpdatePermissions: value['asksBeforeUpdatePermissions'] === true, showsInstalledModErrors: value['showsInstalledModErrors'] === true };
250
+ return { showsInstalledModErrors: value['showsInstalledModErrors'] === true };
280
251
  }
281
252
  export function parseConsent(value, path) {
282
253
  if (value === undefined)
283
254
  return Object.create(null);
284
255
  if (!isObject(value) || !Object.values(value).every(isTextList)) {
285
- throw new Error(`${path} is not a map of plugin names to what each was approved for. Delete it, and cmod asks again.`);
256
+ throw new Error(`${path} is not a map of plugin names to what each was approved for. Delete it, and cmod writes it again at each mod's next setup.`);
286
257
  }
287
258
  return Object.assign(Object.create(null), value);
288
259
  }
@@ -294,7 +265,8 @@ function readHotkeys(hotkeys) {
294
265
  throw new Error(`package.json "cmod.hotkeys" is not a map of hotkeys to their title and optional default combo. ${fix}`);
295
266
  return { hotkeys: checkHotkeys('package.json "cmod"', hotkeys) };
296
267
  }
297
- export const coreVersion = '4.3.4';
268
+ export const coreVersion = '5.0.0';
269
+ export const oldestCmodVersion = '5.0.0';
298
270
  export function hotkeyCommand(mod, hotkey) {
299
271
  return `${mod}--${hotkey}`;
300
272
  }
@@ -313,9 +285,6 @@ export function boundCombos(keybindings) {
313
285
  }
314
286
  return combos;
315
287
  }
316
- export function hotkeyWords(hotkeys) {
317
- return listed(Object.values(hotkeys ?? {}).flatMap(({ title, default: combo }) => (combo === undefined ? [] : [`${combo} to ${title}`])));
318
- }
319
288
  function readCommand(steps, key) {
320
289
  const command = steps[key];
321
290
  if (command === undefined)
@@ -326,11 +295,11 @@ function readCommand(steps, key) {
326
295
  throw new Error(`package.json "cmod.${key}" holds a line break or a tab. Write one command, such as "./setup/${key}.sh".`);
327
296
  const atRoot = scriptPaths(command).find((path) => folderOf(path) === '.');
328
297
  if (atRoot !== undefined)
329
- throw new Error(`package.json "cmod.${key}" names ${atRoot}, a script at the plugin root. Move it into a folder, such as ./setup/${key}.sh: cmod asks consent for the whole folder of each script.`);
298
+ throw new Error(`package.json "cmod.${key}" names ${atRoot}, a script at the plugin root. Move it into a folder, such as ./setup/${key}.sh: cmod runs the steps again whenever anything in a script's folder changes.`);
330
299
  return { [key]: command };
331
300
  }
332
- export function bundleDefines(permissions) {
333
- return permissions.includes('approve') ? {} : { 'globalThis.cmodWithoutApprove': 'true' };
301
+ export function bundleDefines(steps) {
302
+ return steps.approve === true ? {} : { 'globalThis.cmodWithoutApprove': 'true' };
334
303
  }
335
304
  export function scriptPaths(command) {
336
305
  const words = command
@@ -354,7 +323,7 @@ export async function scriptsSha256(steps, files) {
354
323
  scriptFolders.push(folderOf(path));
355
324
  }
356
325
  if (scriptFolders.length === 0)
357
- throw new Error(`package.json "cmod.${key}" runs "${command}", which names no script file in the mod, so consent cannot cover what it runs. Put the commands in a script, such as ./setup/${key}.sh.`);
326
+ throw new Error(`package.json "cmod.${key}" runs "${command}", which names no script file in the mod, so cmod cannot tell when what it runs changes. Put the commands in a script, such as ./setup/${key}.sh.`);
358
327
  for (const folder of scriptFolders)
359
328
  folders.add(folder);
360
329
  }
@@ -370,7 +339,7 @@ export async function scriptsSha256(steps, files) {
370
339
  const path = `${folder}/${name}`;
371
340
  const content = await files.read(path);
372
341
  if (content === undefined)
373
- throw new Error(`${path} links to a folder or to nothing, so consent cannot cover it. Point the link at a file, or delete it.`);
342
+ throw new Error(`${path} links to a folder or to nothing, so cmod cannot tell when it changes. Point the link at a file, or delete it.`);
374
343
  text += `\0${path}\0${content}`;
375
344
  }
376
345
  }
@@ -9,5 +9,5 @@ export type Announcement = {
9
9
  };
10
10
  };
11
11
  export declare const announcementMs = 10000;
12
- export declare function announcementOf(claude: Claude, plugin: Plugin, granted: ReadonlySet<string>, added: readonly string[], openSettings: () => Promise<void>): Promise<Announcement>;
12
+ export declare function announcementOf(claude: Claude, plugin: Plugin, added: readonly string[], openSettings: () => Promise<void>): Promise<Announcement>;
13
13
  //# sourceMappingURL=announce.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"announce.d.ts","sourceRoot":"","sources":["../src/runtime/announce.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAE5C,MAAM,MAAM,YAAY,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,CAAA;KAAE,CAAA;CAAE,CAAA;AAEpK,eAAO,MAAM,cAAc,QAAS,CAAA;AAEpC,wBAAsB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAarL"}
1
+ {"version":3,"file":"announce.d.ts","sourceRoot":"","sources":["../src/runtime/announce.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACzC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAE5C,MAAM,MAAM,YAAY,GAAG;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,CAAA;KAAE,CAAA;CAAE,CAAA;AAEpK,eAAO,MAAM,cAAc,QAAS,CAAA;AAEpC,wBAAsB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAYvJ"}
@@ -1,8 +1,8 @@
1
- import { isObject, permissionWords } from '../records.js';
1
+ import { isObject } from '../records.js';
2
2
  import { ifMissing } from '../utils/paths.js';
3
3
  import { listed } from '../utils/text.js';
4
4
  export const announcementMs = 10_000;
5
- export async function announcementOf(claude, plugin, granted, added, openSettings) {
5
+ export async function announcementOf(claude, plugin, added, openSettings) {
6
6
  const manifest = jsonOf(await claude.fs.read(`${plugin.root}/.claude-plugin/plugin.json`).catch(ifMissing(undefined)));
7
7
  const { program, hotkeys } = plugin.steps;
8
8
  const rules = (await claude.fs.list(`${plugin.root}/rules`).catch(ifMissing([]))).filter((entry) => entry.kind === 'file' && entry.name.endsWith('.md')).map((entry) => entry.name.slice(0, -'.md'.length)).toSorted();
@@ -12,7 +12,6 @@ export async function announcementOf(claude, plugin, granted, added, openSetting
12
12
  rules.length > 0 ? `Adds ${rules.length} ${rules.length === 1 ? 'rule' : 'rules'}: ${listed(rules)}.` : undefined,
13
13
  program === undefined ? undefined : `Installed the ${program} program.`,
14
14
  ...Object.values(hotkeys ?? {}).flatMap(({ title, default: combo }) => (combo === undefined ? [] : [`Binds ${combo} to ${title}.`])),
15
- ...[...granted].map((item) => `${permissionWords(item)}.`),
16
15
  ].filter((line) => line !== undefined);
17
16
  return { message: 'Installed', ...(lines.length === 0 ? {} : { description: lines.join('\n') }), action: { label: 'Settings', onClick: () => openSettings() } };
18
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../src/runtime/conversations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAK5D,OAAO,EAA0L,KAAK,QAAQ,EAAmB,MAAM,4BAA4B,CAAA;AAUnQ,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAIzC,OAAO,KAAK,EAAc,MAAM,EAAE,MAAM,aAAa,CAAA;AAErD,OAAO,EAAqJ,KAAK,YAAY,EAAE,MAAM,eAAe,CAAA;AAuCpM,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,GAAG;QAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,CAAA;IAClH,KAAK,IAAI,IAAI,CAAA;IACb,YAAY,CAA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