{"_id":"@aundal/ill-be-back","_rev":"3-2872a34847ccfa0e50c0a5a65ec29f1c","name":"@aundal/ill-be-back","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.3":{"name":"@aundal/ill-be-back","version":"1.0.3","keywords":["opencode","opencode-plugin","prompt-cache"],"license":"MIT","_id":"@aundal/ill-be-back@1.0.3","maintainers":[{"name":"aundal","email":"aundal@gmail.com"}],"homepage":"https://github.com/aundal/opencode-ill-be-back#readme","bugs":{"url":"https://github.com/aundal/opencode-ill-be-back/issues"},"dist":{"shasum":"a2e97ff1b762574c73abe6474ae0a1cc0c08191e","tarball":"https://registry.npmjs.org/@aundal/ill-be-back/-/ill-be-back-1.0.3.tgz","fileCount":7,"integrity":"sha512-+UG4SLfoNFz2MlSvEQdLhzGv2RP/92CU3Ath2GeCka/nX2IUMObJSDS588rLQeQIwHfMCAJZBuEVUGsQOA3nVw==","signatures":[{"sig":"MEUCIBlkMI9arXPcbsLvWVSalNToBW+N0maFZGEEiclTavxaAiEArFAg60H+jNn451ZYHL8QxL+uEH4FV3MyZ5/NuAjdHXA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":45351},"type":"module","engines":{"opencode":">=1.4.0"},"exports":{"./tui":"./src/tui.ts","./server":"./src/server.ts"},"gitHead":"6fabfa8c18173eed8ee35693853bf80aad8bb92f","_npmUser":{"name":"aundal","email":"aundal@gmail.com"},"repository":{"url":"git+https://github.com/aundal/opencode-ill-be-back.git","type":"git"},"_npmVersion":"11.8.0","description":"OpenCode plugin that keeps the active session cache warm while you are away.","directories":{},"_nodeVersion":"24.13.1","dependencies":{"solid-js":"1.9.12","@opentui/solid":"0.4.0"},"_hasShrinkwrap":false,"peerDependencies":{"@opencode-ai/plugin":">=1.4.0"},"_npmOperationalInternal":{"tmp":"tmp/ill-be-back_1.0.3_1783519176953_0.6458129968555826","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@aundal/ill-be-back","version":"1.0.4","keywords":["opencode","opencode-plugin","prompt-cache"],"license":"MIT","_id":"@aundal/ill-be-back@1.0.4","maintainers":[{"name":"aundal","email":"aundal@gmail.com"}],"homepage":"https://github.com/aundal/opencode-ill-be-back#readme","bugs":{"url":"https://github.com/aundal/opencode-ill-be-back/issues"},"dist":{"shasum":"90fb84d97c3b84874f87cd3f5b41eb06c07c5696","tarball":"https://registry.npmjs.org/@aundal/ill-be-back/-/ill-be-back-1.0.4.tgz","fileCount":7,"integrity":"sha512-izvsAptuwGSP7Mdixzfo4sH60hE4LYVAHgIg10Mgss9DWELXsAuSYogS6uulEUBqz6+1oISz0r5oS1ISsW8DvQ==","signatures":[{"sig":"MEYCIQCqnwYCTQ+wtkQEtzxwFzwkwWHr2I8nv2NJkzii9SHoAQIhAJ2907uEOqx6OLJw+jS+VP6rxt1E1wxhDw36xnPfu4YV","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":45457},"main":"./src/server.ts","type":"module","engines":{"opencode":">=1.4.0"},"exports":{".":"./src/server.ts","./tui":"./src/tui.ts","./server":"./src/server.ts"},"gitHead":"43671e9554995506c9541d29ecf1ae29e5f94f52","_npmUser":{"name":"aundal","email":"aundal@gmail.com"},"repository":{"url":"git+https://github.com/aundal/opencode-ill-be-back.git","type":"git"},"_npmVersion":"11.8.0","description":"OpenCode plugin that keeps the active session cache warm while you are away.","directories":{},"_nodeVersion":"24.13.1","dependencies":{"solid-js":"1.9.12","@opentui/solid":"0.4.0"},"_hasShrinkwrap":false,"peerDependencies":{"@opencode-ai/plugin":">=1.4.0"},"_npmOperationalInternal":{"tmp":"tmp/ill-be-back_1.0.4_1783520414791_0.4450007369576434","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@aundal/ill-be-back","version":"1.0.5","description":"OpenCode plugin that keeps the active session cache warm while you are away.","license":"MIT","type":"module","main":"./src/server.ts","repository":{"type":"git","url":"git+https://github.com/aundal/opencode-ill-be-back.git"},"homepage":"https://github.com/aundal/opencode-ill-be-back#readme","bugs":{"url":"https://github.com/aundal/opencode-ill-be-back/issues"},"exports":{".":"./src/ill-be-back.ts","./server":"./src/ill-be-back.ts","./tui":"./src/ill-be-back.tsx"},"keywords":["opencode","opencode-plugin","prompt-cache"],"dependencies":{"@opentui/solid":"0.4.0","solid-js":"1.9.12"},"peerDependencies":{"@opencode-ai/plugin":">=1.4.0"},"engines":{"opencode":">=1.4.0"},"gitHead":"43671e9554995506c9541d29ecf1ae29e5f94f52","_id":"@aundal/ill-be-back@1.0.5","_nodeVersion":"24.13.1","_npmVersion":"11.8.0","dist":{"integrity":"sha512-Lz941sV5DgjPwEfdJhfN2wrGvHObjtnlVDdfgrdCfRCaJzeIKaW7pP8KMKE2J0hka4sMRrP4jylrGiJLDa3XSw==","shasum":"23a9f3f808ffc531f8f34d9c89b0d41995ea117c","tarball":"https://registry.npmjs.org/@aundal/ill-be-back/-/ill-be-back-1.0.5.tgz","fileCount":7,"unpackedSize":45508,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGJKwdMnih4ID5Npm1dj3L3CA8S2IBh+wEj+aGcmrumeAiEAgzIl1hde7SK5QY3HBeseBnrJKXWlai1BlQRmCcUERBE="}]},"_npmUser":{"name":"aundal","email":"aundal@gmail.com"},"directories":{},"maintainers":[{"name":"aundal","email":"aundal@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ill-be-back_1.0.5_1783521289352_0.027380162668763752"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-08T13:59:36.772Z","modified":"2026-07-08T14:34:49.635Z","1.0.3":"2026-07-08T13:59:37.144Z","1.0.4":"2026-07-08T14:20:14.918Z","1.0.5":"2026-07-08T14:34:49.516Z"},"bugs":{"url":"https://github.com/aundal/opencode-ill-be-back/issues"},"license":"MIT","homepage":"https://github.com/aundal/opencode-ill-be-back#readme","keywords":["opencode","opencode-plugin","prompt-cache"],"repository":{"type":"git","url":"git+https://github.com/aundal/opencode-ill-be-back.git"},"description":"OpenCode plugin that keeps the active session cache warm while you are away.","maintainers":[{"name":"aundal","email":"aundal@gmail.com"}],"readme":"# opencode-ill-be-back\r\n\r\nKeep the active OpenCode session cache warm while you are away.\r\n\r\n`ill-be-back` watches the active session and starts a cache countdown after the\r\nfirst assistant reply. When you arm away mode with `/illbeback`, it sends a small\r\nkeep-alive ping every time the countdown hits `0:00`, until the ping limit is\r\nused. This keeps the provider prompt cache alive so your next real message reuses\r\ncached context instead of paying full input cost again.\r\n\r\nKeep-alive pings use a fixed marker so they are never confused with your real\r\nmessages:\r\n\r\n```\r\nI'll Be Back - Ping [UN1QU3M2G] n/x - REPLY: OK\r\n```\r\n\r\n## Files\n\nOpenCode can load these plugin files directly:\n\n| File                  | Type           | Loaded via      |\n| --------------------- | -------------- | --------------- |\n| `src/ill-be-back.ts`  | runtime plugin | `opencode.json` |\n| `src/ill-be-back.tsx` | TUI sidebar    | `tui.json`      |\n\r\nShared state is written to `~/.config/opencode/ill-be-back-state.json`.\r\n\r\n## Install\r\n\r\nClone this repo under your OpenCode config directory, or copy the files into any path you control.\n\r\n### 1. Register the runtime plugin\n\r\nEdit `~/.config/opencode/opencode.json`:\r\n\r\n```json\r\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"plugin\": [\"./github/opencode-ill-be-back/src/ill-be-back.ts\"]\n}\n```\n\n### 2. Register the TUI sidebar\n\r\nEdit `~/.config/opencode/tui.json`:\r\n\r\n```json\r\n{\n  \"$schema\": \"https://opencode.ai/tui.json\",\n  \"plugin\": [\"./github/opencode-ill-be-back/src/ill-be-back.tsx\"]\n}\n```\n\n### 3. Restart OpenCode\n\r\nPlugins load at startup. Fully quit and restart.\n\r\n> Prefer letting an agent do this? See [Install with an LLM](#install-with-an-llm).\r\n\r\n## Usage\r\n\r\nCommands are registered by the TUI plugin (no `commands/*.md` needed):\r\n\r\n| Command                 | Action                                                              |\r\n| ----------------------- | ------------------------------------------------------------------ |\r\n| `/illbeback`            | Prompt for a ping count and arm away mode                          |\r\n| `/illbeback-toggle`     | Show or hide the sidebar block                                     |\r\n| `/illbeback-shorttimer` | Switch the title countdown between `MM:SS` and short form (`5m`)   |\r\n| `/illbeback-test`       | Measure the provider cache timeout and set a safe ping interval    |\r\n\r\n### Sidebar\r\n\r\nTitle:\r\n\r\n- first load: `I'll Be Back (-:--)`\r\n- after first assistant reply: live countdown starts\r\n- away mode armed: countdown resets after each ping\r\n- state marker after the timer: `⚫` idle, `🟢 <pings left>` away, `🧪` testing\r\n\r\nExpanded rows show `Session` and `Total` net USD savings. Each ping subtracts its\r\ncache-read cost; on your first real reply after returning, the preserved-cache\r\nbenefit is added back once, capped to\r\n`min(pre_away_context_tokens, return_reply.tokens.cache.read)`.\r\n\r\n### Timeout test\r\n\r\n`/illbeback-test` finds your provider's cache timeout:\r\n\r\n1. starts at 5 minutes\r\n2. doubles while the cache is still warm, until the first cache miss\r\n3. bisects between last-cached and first-miss until the gap is under 10s\r\n4. stores a safe interval = 90% of the last cached delay\r\n\r\nAfter that, keep-alive pings use the measured interval instead of the 4-minute\r\ndefault.\r\n\r\n## Options\r\n\r\nThere is no config schema. Behavior is tuned via constants at the top of\r\n`src/ill-be-back.ts`:\r\n\r\n| Constant                       | Default | Meaning                                                          |\r\n| ------------------------------ | ------- | ---------------------------------------------------------------- |\r\n| `DEFAULT_INTERVAL_SECONDS`     | `240`   | Ping interval (seconds) until a timeout test measures a new one  |\r\n| `DEFAULT_MAX_PINGS`            | `5`     | Ping count used when you confirm `/illbeback` without a number   |\r\n| `DEFAULT_TEST_DELAY_MINUTES`   | `5`     | Starting delay for `/illbeback-test`                             |\r\n| `CACHE_TIMEOUT_SAFETY_FACTOR`  | `0.9`   | Fraction of the last cached delay used as the safe interval      |\r\n| `DEBUG`                        | `false` | Show `Last Ping` / `Time` / `Proof` debug rows in the sidebar    |\r\n\r\nRuntime options (no restart): the ping count in the `/illbeback` prompt, and the\r\n`toggle` / `shorttimer` commands. Editing constants requires a restart.\r\n\r\nPricing for the savings display is pulled best-effort from\r\n[models.dev](https://models.dev). If it is unreachable, savings simply show `0.00`\r\nand pings/tests still run.\r\n\r\n## Development\n\n```sh\nnpm pack\nnpm publish --access public\n```\n\n## Notes\n\r\n- Restart OpenCode after updating plugin config or package versions.\n- `/illbeback` only resets the away cycle; session/total counters persist in\r\n  `ill-be-back-state.json`.\r\n- Synthetic ping text is hidden from the model history but still warms the cache.\r\n\r\n## License\r\n\r\nMIT. See [LICENSE](LICENSE).\r\n","readmeFilename":"README.md"}