Repository navigation
feat(commands): a command says how long it runs - #164
Merged
Merged
Conversation
CommandMeta gains `lifetime` (persistent until stopped, interactive until a person answers; unset is bounded) and `cooperative` (stops at its own pace when aborted from outside), set with annotate and printed in commands --json. cli-core's run() decides these today by matching command names (watch/serve/mcp, setup, session start, messages sync); with the fields it can read metaOf(action) instead. Re-review step 6, PR 1. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 6, PR 1 of the architecture re-review: commands described by declaration.
Change:
CommandMeta.lifetime:persistentruns until stopped (a server, a watch);interactivewaits for a person (a login). Unset, the command is bounded by the runner's default timeout.CommandMeta.cooperative: the command stops at its own pace when the run is aborted from outside, and keeps what it already did.annotate, printed incommands --json, and covered by the command-document schema.Why: cli-core's
run()decides these today by matching command names (program.ts:208-231: watch, serve, mcp, bot watch, setup, session start, messages sync). Once released, cli-core annotates those commands and readsmetaOf(action)instead.Checks:
pnpm lint,pnpm typecheck,pnpm test(713 tests, one new: both fields in the document and read back) andpnpm docs:checkpass.🤖 Generated with Claude Code