Repository navigation
Conversation
…ive chat Adds a new CLI subcommand that attaches to a running AI session over WebSocket and streams messages in real time, with an optional interactive mode that turns the terminal into a chat with the agent. - new `limacharlie.sdk.ai_session.SessionAttachment` async helper wrapping the ai-sessions WebSocket protocol (prompt, interrupt, tool_approval_response, ask_user_question_response, heartbeat) - `AI.attach_session()` factory on the SDK, selecting the owner-interactive or org-scoped read-only endpoint - `limacharlie ai session attach --id <sid> [--interactive] [--read-only] [--raw] [--no-history]` command with colour-coded pretty printing and transparent 403 fallback to the read-only org endpoint when the caller is not the session owner - interactive loop surfaces tool approval requests and `ask_user_question` messages as live prompts - `websockets>=13.0` added as a runtime dependency - 39 unit tests covering URL derivation, send/receive plumbing, read-only enforcement, message rendering, and CLI registration Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reworks `limacharlie ai start-session` so the ai_agent hive record is a
starting template and every profile field can be overridden from the
CLI for a single run.
Adds override flags matching the full server ProfileContent schema:
* --model, --max-turns, --max-budget-usd, --task-budget-tokens,
--ttl-seconds, --one-shot/--no-one-shot, --permission-mode,
--allowed-tools, --denied-tools, --plugin (repeatable)
* --env KEY=VALUE (repeatable) - merged with the template's
environment; override wins on key collisions
* --anthropic-key, --lc-api-key, --lc-uid - credential overrides
that accept literal values or "hive://secret/<name>" refs
Scalars and lists REPLACE the template value when passed. Environment
MERGES. Omitted flags leave the template untouched. Override values
that start with hive://secret/ are resolved before sending, so secrets
never appear in argv.
SDK: AI.start_session grows keyword-only override parameters.
Adds 30 new unit tests covering every override path: scalar replace,
list replace, env merge with collision, env secret resolution on
overrides, credential literal vs secret-ref overrides, CSV parsing
edge cases (empty list vs None), --env KEY=VALUE parsing validation,
and a help-text assertion that every flag is documented.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
# Conflicts: # limacharlie/commands/_ai_attach.py # limacharlie/commands/ai.py # limacharlie/sdk/ai_session.py # tests/unit/test_ai_session_attach.py # tests/unit/test_sdk_ai_sessions.py
Contributor
Author
|
Superseded — cli-v2 already contains both commits from this branch (tree is byte-identical after merging cli-v2). Closing as redundant. |
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.
Summary
limacharlie ai session attachfor live WebSocket streaming with optional interactive chat, read-only fallback, and pretty/raw rendering.ai start-sessionso theai_agenthive record is a starting template: everyProfileContentfield (model, budgets, TTL, permission mode, allowed/denied tools, plugins, env, credentials) can be overridden per run, withhive://secret/<name>resolution for sensitive values.AI.attach_session()andSessionAttachmentasync wrapper around the ai-sessions WebSocket protocol;AI.start_sessiongains keyword-only override params.websockets>=13.0runtime dep and ~70 new unit tests covering WS plumbing, override merge/replace semantics, env secret resolution, CSV/KEY=VALUEparsing, and CLI registration.Test plan
./run_local_test.sh(or equivalent) passeslimacharlie ai session attach --id <sid>streams messages live (owner endpoint)--interactivesurfaces tool approval +ask_user_questionpromptslimacharlie ai start-sessionwith--model,--env KEY=VAL,--anthropic-key hive://secret/...applies overrides on top of the hive template🤖 Generated with Claude Code