Skip to content

feat(standards): scheduled is a resource as well as a view - #659

Merged
leemour merged 1 commit into
mainfrom
feat/vocabulary-scheduled
Nov 19, 2026
Merged

leemour merged 1 commit into
mainfrom
feat/vocabulary-scheduled

Conversation

@leemour

@leemour leemour commented Nov 18, 2026

Copy link
Copy Markdown
Member

Why

cli-core is adding actions on Telegram scheduled messages: messages scheduled cancel, messages scheduled edit and messages scheduled send, under the existing messages scheduled <chat> list (owner's decision NEED-2692 A). cli-dev lint refuses a group named with a view (unknown-resource), and cli-core's command lint allows no overrides, so the word goes into the vocabulary first.

What

  • scheduled registered as a singular resource: a chat's messages the messenger will send later, whose ids are their own. It stays a view too, as comments, events and links are both.
  • A lint test: a scheduled list with an action of its own and a cancel leaf passes (fails without the word).
  • Changelog entry under Unreleased.

Testing

vitest run src/dev/lint.test.ts src/standards/standards.test.ts, typecheck, biome, docs:check.

🤖 Generated with Claude Code

cli-core adds messages scheduled cancel, edit and send under the scheduled
list (owner's NEED-2692 A). cli-dev lint refused a group named with a view
(unknown-resource), so the word is registered as a singular resource too,
as comments, events and links already are both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@leemour
leemour merged commit efd5acf into main Nov 19, 2026
10 checks passed
@leemour
leemour deleted the feat/vocabulary-scheduled branch November 19, 2026 00:09
@leemour leemour mentioned this pull request Nov 19, 2026
leemour added a commit that referenced this pull request Nov 19, 2026
Dates the Unreleased section as 0.122.0: `scheduled` as a resource word
(#659), which cli-core's scheduled-message actions need for `cli-dev
lint`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
leemour added a commit to WireCatLabs/cli-core that referenced this pull request Nov 19, 2026
## Task
Owner's decision NEED-2692 A (2026-11-19): add cancel, edit (text and/or
time) and send now for scheduled messages, released on npm.

## Why
The owner had to cancel a scheduled group post by hand in the Telegram
app. tg could schedule (`messages send --at-time`) and list (`messages
scheduled <chat>`), nothing else. A scheduled message has ids of its
own: `messages edit <chat> 3` on one failed with `MESSAGE_ID_INVALID`,
and `messages delete <chat> 3` would have deleted the real, old group
message #3.

## What
- `messages scheduled cancel <chat> <scheduled-id...>`, `messages
scheduled edit <chat> <scheduled-id> [text] [--at-time <time>] [--md]`,
`messages scheduled send <chat> <scheduled-id...>`, under the existing
`messages scheduled <chat>` (which still lists). The argument is named
`<scheduled-id>`, and the help says the same number in the history is
another message. `messages delete` and `messages edit` help point to the
scheduled commands.
- Every id is checked against the chat's scheduled list before any
write. An unknown id is `not_found` and names `messages scheduled
<chat>`.
- An edit always passes the time to the adapter (the current one when
only the text changes); Telegram needs `schedule_date` to read the id as
scheduled. `--at-time` alone moves it and reads no stdin; it is parsed
by the same `sendTime` as `messages send --at-time`.
- Guard: keys `messages.scheduled.cancel` (journaled as `delete`, in the
`--allow-dangerous` set), `messages.scheduled.edit` (`edit`),
`messages.scheduled.send` (`message`, counted per id). At most 10 ids at
once, like delete.
- Port: optional group `ScheduledChanges` (`cancelScheduled`,
`editScheduled`, `sendScheduled`); the kit fake implements it. max and
wa get "this messenger cannot …" (wa has no `scheduled` group at all;
`lacks` refuses before connecting).
- Entities: `scheduled_cancellation`, `scheduled_send`; edit answers
`message_write` with `scheduled_for`.
- MCP search breaks a tie by the shorter command name, so "send message"
still finds `messages send` before `messages scheduled send`.
- cli-base 0.122.0 (dev), which registers `scheduled` as a resource word
(WireCatLabs/cli-base#659), so `cli-dev lint` passes the group.

## Deviations from the brief
- `send-now` is `send`: `cli-dev lint` allows only vocabulary verbs
(`unknown-verb`).
- Cancel mirrors `messages delete` as the code has it today, not "ask +
`--yes`": `messages.delete` defaults to `allow` (owner, 2026-11-14) and
its yes flag is `--allow-dangerous`. Cancel has the same: no question at
the default level, `--allow-dangerous` at `ask`. Agents may cancel
(nobody else has seen the message); the profile levels govern.

## Testing
- `src/cli/messenger/messages-scheduled.test.ts`: list still works;
cancel by scheduled id, refusal of a sent message's id before any write,
journal entry; ask level with `--allow-dangerous`, read-only refusal;
edit keeps the time; `--at-time` only reads no stdin; empty edit
refused; send now answers the new ids; refusal without the capability,
and before connecting with `lacks`.
- lacks, entities, MCP exposure snapshot, MCP search, command lint;
typecheck, docs:check, schema:check locally.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant