mirror of
https://github.com/akitaonrails/ai-memory.git
synced 2026-10-02 03:24:46 +08:00
Grok gains a managed adapter following the managed-harness contribution protocol: wrapper-generated --session-id for fresh sessions, --resume for linked ones, explicit native selectors always win (including the bare --resume picker and --fork-session), utility subcommands pass through, and wrapper --yolo maps onto the native --yolo/--always-approve alias pair. The bounded workstream context packet is delivered through Grok's native --rules flag (system-prompt append) because Grok discards SessionStart stdout and its UserPromptSubmit hook is passive; acceptance happens only after the child spawns, matching the Crush contract, and a natively supplied --rules/--append-system-prompt wins with redelivery on a later run. Transcript import reads chat_history.jsonl read-only with a prefix-validated cursor and content-hash event ids so rewind-driven journal rewrites cannot duplicate history; system prompts, encrypted reasoning, and the injected <user_info> block are excluded as loss annotations. Discovery matches checkouts through summary.json's recorded info.cwd, never the URL-encoded bucket name, and honors GROK_HOME. Grok stays out of the bare-mode automatic pool. Verified against Grok Build CLI v0.2.111.