{"_id":"tvijo-dshrem-mcp","_rev":"5-9f0468b7ebcafec38a22f59e3a50361b","name":"tvijo-dshrem-mcp","dist-tags":{"latest":"0.2.1"},"versions":{"0.0.0-stage":{"name":"tvijo-dshrem-mcp","version":"0.0.0-stage","_id":"tvijo-dshrem-mcp@0.0.0-stage","stub":true,"maintainers":[{"name":"nikbibamon","email":"nikbibamon@gmail.com"}],"dist":{"shasum":"0c2c34ea492cc49e8fb28ebe266d2cf37305f000","tarball":"https://registry.npmjs.org/tvijo-dshrem-mcp/-/tvijo-dshrem-mcp-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-klJIFgclFsn5x6fRhmUT5uOWChLFwOxywq443G2nKmLxF0xEdAxBLH83d9LU02BGW/UypjtEAGt/s/E7czmfhg==","signatures":[{"sig":"MEUCIGgWbFmmG2aulSNIBvi9luMZ4XTi22gPowwPrWoYILZOAiEAtaUB/2cxsdFo+pnUvBcyt5YEBC/4y7Atep5eVYTvgxs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":338},"_npmUser":{"name":"nikbibamon","email":"nikbibamon@gmail.com"},"description":"Temporary package placeholder for staged publishing","directories":{}},"0.1.0":{"name":"tvijo-dshrem-mcp","version":"0.1.0","license":"MIT","_id":"tvijo-dshrem-mcp@0.1.0","maintainers":[{"name":"nikbibamon","email":"nikbibamon@gmail.com"}],"homepage":"https://dsh.tvijo.com","bugs":{"url":"https://github.com/nikbibamon/tvijocode/issues"},"bin":{"tvijo-dshrem-mcp":"bin/tvijo-dshrem-mcp.js"},"dist":{"shasum":"5764e65c2ae51e0b1e098757c75d20fd3986f97d","tarball":"https://registry.npmjs.org/tvijo-dshrem-mcp/-/tvijo-dshrem-mcp-0.1.0.tgz","fileCount":8,"integrity":"sha512-AyB0TXHgKxLDq4L6gg+PIPI9If6OXA6dSftSXwVAZMLpBARejJQsI0Wk7UksYwLAumf7BlV+GzmX3cNynMYFew==","signatures":[{"sig":"MEYCIQCdr47F/V8/5sGHFJXDwKqnyz903l72PQUC9p+rt1O5YAIhAL5UfnEsCOk5pldM+zzG9IfhC7Rmk52pi7H0P4Q/mRun","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQClyDh2SlEWlA33SazvHyfkW0F+IfJaE9kn2JuEataSMgIgPcZyyg3OXGzxenUa2+xeYsjo/znpjQMb0UbwaYbHoik=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36105},"type":"module","engines":{"node":">=20"},"gitHead":"a890e936dfb621a6afeefcde01fcdc98bec82458","mcpName":"com.tvijo/dshrem","scripts":{"test":"node --test"},"_npmUser":{"name":"nikbibamon","email":"nikbibamon@gmail.com"},"repository":{"url":"git+https://github.com/nikbibamon/tvijocode.git","type":"git","directory":"mcp"},"_npmVersion":"11.19.0","description":"Tvijo DSHREM tools over MCP stdio","directories":{},"_nodeVersion":"26.7.0","dependencies":{"zod":"4.6.7","@modelcontextprotocol/sdk":"1.32.2"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"8.20.0","ajv-formats":"3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/tvijo-dshrem-mcp_0.1.0_1792881178691_0.893637070794451","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"tvijo-dshrem-mcp","version":"0.1.1","keywords":["mcp","mcp-server","model-context-protocol","tvijo","dshrem","coding-agent","code-review"],"author":{"url":"https://tvijo.com","name":"Tvijo"},"license":"MIT","_id":"tvijo-dshrem-mcp@0.1.1","maintainers":[{"name":"nikbibamon","email":"nikbibamon@gmail.com"}],"homepage":"https://dsh.tvijo.com","bugs":{"url":"https://github.com/nikbibamon/tvijocode/issues"},"bin":{"tvijo-dshrem-mcp":"bin/tvijo-dshrem-mcp.js"},"dist":{"shasum":"798bf096019dee060132f00195ac1d6345ebf5f0","tarball":"https://registry.npmjs.org/tvijo-dshrem-mcp/-/tvijo-dshrem-mcp-0.1.1.tgz","fileCount":8,"integrity":"sha512-a+zmX7b0GyhLtLvVL7Dnq0TEvafp9N314uthTxhqMKEgKD55onNFnkH21Wj7j2Yv6gYN4VGRT9fZbvDUYebTVQ==","signatures":[{"sig":"MEYCIQDVYeZSuAkxjW8tP0a2dlZFgv4bDDE6i8sdXIiYfB50dgIhAPU8H+Mp8nMVstn26fIAg+MKf+6y+b/CqxN+lDd2CmEF","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCICbGhTN73HGw4B6+k7eiOODIllRwNE4mv6XoP5iMYulaAiEApAd0vSXgEEdTDcjgrDaTAMAkhoBltybEWw10XtWvKko=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/tvijo-dshrem-mcp@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":36699},"type":"module","engines":{"node":">=20"},"gitHead":"4d3e320cabfeba37f417c65ea9d3cc64dab6e019","mcpName":"com.tvijo/dshrem","scripts":{"test":"node --test"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"53cf59dd-2255-4706-a83d-0dd748b1b3b8"}},"repository":{"url":"git+https://github.com/nikbibamon/tvijocode.git","type":"git","directory":"mcp"},"_npmVersion":"11.19.0","description":"Tvijo DSHREM tools over MCP stdio","directories":{},"_nodeVersion":"24.21.0","dependencies":{"zod":"4.6.7","@modelcontextprotocol/sdk":"1.32.2"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"8.20.0","ajv-formats":"3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/tvijo-dshrem-mcp_0.1.1_1792882687733_0.2189201726838419","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"tvijo-dshrem-mcp","version":"0.2.0","keywords":["mcp","mcp-server","model-context-protocol","tvijo","dshrem","coding-agent","code-review"],"author":{"url":"https://tvijo.com","name":"Tvijo"},"license":"MIT","_id":"tvijo-dshrem-mcp@0.2.0","maintainers":[{"name":"nikbibamon","email":"nikbibamon@gmail.com"}],"homepage":"https://dsh.tvijo.com","bugs":{"url":"https://github.com/nikbibamon/tvijocode/issues"},"bin":{"tvijo-dshrem-mcp":"bin/tvijo-dshrem-mcp.js"},"dist":{"shasum":"5c599c68432ef783ec924950b5fb2b493a5720ca","tarball":"https://registry.npmjs.org/tvijo-dshrem-mcp/-/tvijo-dshrem-mcp-0.2.0.tgz","fileCount":11,"integrity":"sha512-hp7byBWnT9IJpAAtURAYmOkwYUgKJgiH6c1HiPwP0u69AYnVaw2x7PC8sJV47Moa9xSqm9cQXaedF4bWgAPA0w==","signatures":[{"sig":"MEQCIF5HMQGi7r+q/IfEoh9MMT0Gds8r0fJEGU5DxySodMZGAiBhtPDhE1uM549om+BQssGtBcKJ87gh68/KdFbf/zNWdw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIHAPiLTyCz2GqGLX3Hi+11+6IRixCrjl+CJLL984Dd1sAiBFVuVbzamkVCiXSFFMVlfQfkOI+doLHbbtORNmW42/Fw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/tvijo-dshrem-mcp@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":58041},"type":"module","engines":{"node":">=20"},"gitHead":"5ec0f691cfdbe3b920e70ed886b4ab4b838c87c9","mcpName":"com.tvijo/dshrem","scripts":{"test":"node --test","readme:tools":"node scripts/readme-tools.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"53cf59dd-2255-4706-a83d-0dd748b1b3b8"}},"repository":{"url":"git+https://github.com/nikbibamon/tvijocode.git","type":"git","directory":"mcp"},"_npmVersion":"11.19.1","description":"Tvijo pre-merge diff review and cloud assistance with explicit spending limits","directories":{},"_nodeVersion":"24.22.1","dependencies":{"zod":"4.6.7","@modelcontextprotocol/sdk":"1.32.2"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"8.20.0","ajv-formats":"3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/tvijo-dshrem-mcp_0.2.0_1793214789149_0.33279246282360186","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"_id":"tvijo-dshrem-mcp@0.2.1","bin":{"tvijo-dshrem-mcp":"bin/tvijo-dshrem-mcp.js"},"bugs":{"url":"https://github.com/nikbibamon/tvijocode/issues"},"dist":{"shasum":"d311fabb038f7902be434996af3984e86cebb51a","tarball":"https://registry.npmjs.org/tvijo-dshrem-mcp/-/tvijo-dshrem-mcp-0.2.1.tgz","fileCount":12,"integrity":"sha512-0a1siOP/BLLeEywJzOeOkRzHPcZ5vB2RIOB7eW4UBtvPemDGqep5wCauIxPWsm7HFKp4zEhqvJWSi8KnoyyZog==","signatures":[{"sig":"MEUCIBJu2UUG3epKzXhRM3Nh1IyNbPnRrOTNWy8yfix+trw2AiEAgPtG/wZO4lvl0x3GedsFlRjesQ5jL8uA8qZy1gseE8c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIF30cHxhX0l8yLTrmLkvYGZ/PBXkN3k1mpMi/3Ya66U8AiEAtzINazZzKY9N08tUtgm0Y2ioSzY14fipII5VRO0z6wE="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/tvijo-dshrem-mcp@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":65231},"name":"tvijo-dshrem-mcp","type":"module","author":{"url":"https://tvijo.com","name":"Tvijo"},"engines":{"node":">=20"},"gitHead":"9b3fd9b916ab63436e297416755f8a21a383dfbd","license":"MIT","mcpName":"com.tvijo/dshrem","scripts":{"test":"node --test","readme:tools":"node scripts/readme-tools.mjs"},"version":"0.2.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"53cf59dd-2255-4706-a83d-0dd748b1b3b8"}},"homepage":"https://dsh.tvijo.com","keywords":["mcp","mcp-server","model-context-protocol","tvijo","dshrem","coding-agent","code-review"],"repository":{"url":"git+https://github.com/nikbibamon/tvijocode.git","type":"git","directory":"mcp"},"_npmVersion":"11.19.1","description":"Tvijo pre-merge diff review and cloud assistance with explicit spending limits","directories":{},"maintainers":[{"name":"nikbibamon","email":"nikbibamon@gmail.com"}],"_nodeVersion":"24.22.1","dependencies":{"zod":"4.6.7","@modelcontextprotocol/sdk":"1.32.2"},"_hasShrinkwrap":false,"devDependencies":{"ajv":"8.20.0","ajv-formats":"3.0.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tvijo-dshrem-mcp_0.2.1_1793488138377_0.24295320083351546"}}},"time":{"created":"2026-10-24T22:31:22.031Z","modified":"2026-10-31T23:08:58.745Z","0.0.0-stage":"2026-10-24T22:31:22.031Z","0.1.0":"2026-10-24T22:32:58.780Z","0.1.1":"2026-10-24T22:58:07.818Z","0.2.0":"2026-10-28T19:13:09.248Z","0.2.1":"2026-10-31T23:08:58.461Z"},"bugs":{"url":"https://github.com/nikbibamon/tvijocode/issues"},"author":{"url":"https://tvijo.com","name":"Tvijo"},"license":"MIT","homepage":"https://dsh.tvijo.com","keywords":["mcp","mcp-server","model-context-protocol","tvijo","dshrem","coding-agent","code-review"],"repository":{"url":"git+https://github.com/nikbibamon/tvijocode.git","type":"git","directory":"mcp"},"description":"Tvijo pre-merge diff review and cloud assistance with explicit spending limits","maintainers":[{"name":"nikbibamon","email":"nikbibamon@gmail.com"}],"readme":"# Tvijo DSHREM MCP\n\nRun Tvijo DSHREM as a Model Context Protocol server over stdio. Review a supplied pre-merge diff or ask a question with an explicit spending limit, inspect your account and tasks, and cancel tasks from an MCP client.\n\nmcp-name: com.tvijo/dshrem\n\nListed in the [MCP Registry](https://registry.modelcontextprotocol.io/v0.1/servers?search=com.tvijo/dshrem) as `com.tvijo/dshrem`.\n\nRequires Node.js 20 or newer and a [Tvijo account](https://dsh.tvijo.com). This is an ESM JavaScript package with no build step.\n\n## Prepared 0.2.1\n\nThis candidate adds authenticated public wiki search/context and connector catalog search/get. Reads use the existing account sign-in, preserve source revisions and projection hashes, return untrusted data, and support cancellation without retries. The public corpus stays fixed on the service.\n\nThe existing pre-merge diff review, spending caps, client tags and opt-in local evidence tools from 0.2.0 are retained. Publication is pending; changing package metadata does not publish the package or registry entry. See [candidate release notes](CHANGELOG.md).\n\n## Sign in\n\nRun the device login command in a terminal:\n\n```sh\nnpx -y tvijo-dshrem-mcp login\n```\n\nOpen the verification URL printed in the terminal and approve the displayed user code. The command polls for approval and stores your access token in `~/.config/tvijo/mcp-token.json`, with directory permissions `0700` and file permissions `0600`. The saved token includes its expiry and API base. Expired tokens require a new sign-in.\n\nAlternatively, set `TVIJO_TOKEN` in your MCP client's environment. It takes precedence over the saved token. Keep it private; the server does not log tokens. Within MCP, call `tvijo_login_start`, open its verification URL and approve the user code, then call `tvijo_login_poll` until it reports that you are signed in. The server remembers the challenge, so `device_code` may be omitted. Poll no faster than the returned interval. No token is returned by either login tool.\n\n```sh\nnpx -y tvijo-dshrem-mcp logout\n```\n\nLogout revokes the active token and removes the saved token file. If remote revocation fails, the local file is still removed and the command reports the failure. Remove `TVIJO_TOKEN` from your client configuration too if you used it.\n\n## VS Code\n\nRun device login first under the same operating-system user as the server. Add this to `.vscode/mcp.json`:\n\n```json\n{\n  \"servers\": {\n    \"tvijo\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"tvijo-dshrem-mcp\"],\n      \"env\": { \"TVIJO_MAX_USD_CAP\": \"1\" }\n    }\n  }\n}\n```\n\nStart the server from **MCP: List Servers**. This is the VS Code configuration format. Current VS Code also supports a portable configuration with a different top-level key; see the [format reference](https://code.visualstudio.com/docs/agents/reference/mcp-configuration).\n\nOn native Windows, replace the server's `command` with `\"cmd\"` and `args` with `[\"/d\", \"/c\", \"npx\", \"-y\", \"tvijo-dshrem-mcp\"]` to launch the npm command through the Windows command processor.\n\n## Claude Code\n\nRun device login first, then:\n\n```sh\nclaude mcp add tvijo -- npx -y tvijo-dshrem-mcp\n```\n\nOn native Windows:\n\n```powershell\nclaude mcp add tvijo -- cmd /d /c npx -y tvijo-dshrem-mcp\n```\n\nThe `--` separates client options from the server command. See [client configuration](https://code.claude.com/docs/en/mcp).\n\n## Codex\n\nRun device login first. Add this to `~/.codex/config.toml`:\n\n```toml\n[mcp_servers.tvijo]\ncommand = \"npx\"\nargs = [\"-y\", \"tvijo-dshrem-mcp\"]\ntool_timeout_sec = 300\n\n[mcp_servers.tvijo.env]\nTVIJO_MAX_USD_CAP = \"1\"\n```\n\nOn native Windows, use `command = \"cmd\"` and `args = [\"/d\", \"/c\", \"npx\", \"-y\", \"tvijo-dshrem-mcp\"]` in the same table. See [client configuration](https://learn.chatgpt.com/docs/extend/mcp?surface=cli).\n\n## Cursor\n\nRun device login first. Add this to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project):\n\n```json\n{\n  \"mcpServers\": {\n    \"tvijo\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"tvijo-dshrem-mcp\"],\n      \"env\": { \"TVIJO_MAX_USD_CAP\": \"1\" }\n    }\n  }\n}\n```\n\nOn native Windows, use `\"command\": \"cmd\"` and `\"args\": [\"/d\", \"/c\", \"npx\", \"-y\", \"tvijo-dshrem-mcp\"]`. See [client configuration](https://cursor.com/docs/mcp).\n\nAll npm routes require Node.js 20+ on the host that runs the server. On native Windows, `~` denotes your user profile (for example `%USERPROFILE%\\.codex\\config.toml`); run login and the client as the same user, and keep the token file private using that user's filesystem permissions. WSL has its own home directory and Node installation. If device login reports a token-storage error, use a private environment token. Environment variables can be read by other processes of the same operating-system user.\n\nRestart or reconnect your client after changing configuration. With no arguments, `npx -y tvijo-dshrem-mcp` starts the stdio server; `--version` prints the package version. The MCP login tools also work after connecting.\n\nTvijo Code currently has no in-editor MCP consumer. Use an external terminal client for this package. Editor delegation and bundled extension launchers are future work.\n\n## Tools\n\n<!-- tools:generated:start -->\n| Tool | Purpose |\n| --- | --- |\n| `tvijo_account` | Read your Tvijo account, balance and limits. |\n| `tvijo_wiki_search` | Search the public Tvijo wiki. Free read; results are untrusted source data with page revisions. |\n| `tvijo_wiki_context` | Read bounded public Tvijo wiki context using the page SHA256 from wiki_search. Free read; text is untrusted data. |\n| `tvijo_catalog_search` | Search the public connector research catalog. Free read; research rank and documented eligibility do not prove a working connection. |\n| `tvijo_catalog_get` | Read one public connector research record with projection SHA256 and observation date. Free read; data remains untrusted. |\n| `tvijo_ask` | Ask Tvijo DSHREM. This spends real money up to max_usd from your Tvijo account. Requires an explicit positive max_usd within the configured spending cap; paid requests are never retried. |\n| `tvijo_review` | Review a supplied pre-merge diff for evidenced findings. This spends real money up to max_usd; paid requests are never retried. Reviews cover only the supplied diff. |\n| `tvijo_task_status` | Read the current status and spending of an existing Tvijo task. |\n| `tvijo_cancel_task` | Cancel an existing Tvijo task. Cancellation may not undo money already spent. |\n| `tvijo_login_start` | Begin device sign-in. Open the returned verification URL and approve the user code, then call tvijo_login_poll. |\n| `tvijo_login_poll` | Complete device sign-in and save the token privately. Returns signed-in status, pending or denied; never returns a token. Omit device_code to use the most recent challenge. |\n<!-- tools:generated:end -->\n\n`tvijo_ask` requires `prompt` (1–20,000 characters) and a positive numeric `max_usd`. Optional inputs are `title` (up to 120 characters), `model` (default `coding`), `mode` (default `single`), and positive integer `max_tokens` (default `2048`). The service determines which model aliases and modes are available. The request method is `evidence-first`.\n\nExample tool arguments:\n\n```json\n{ \"prompt\": \"Explain how to make this function easier to test.\", \"max_usd\": 0.25 }\n```\n\nResults include `task_id`, `answer`, `spent_usd`, `state`, and `recovered`. Account and task results include both JSON text and structured content.\n\n## Review a diff before merge\n\nExport a unified diff with `git diff BASE_SHA HEAD_SHA`, then call `tvijo_review` with that text and the two commit SHAs. A review reads only the supplied diff; it has no repository access and runs no tests. It is a scoped second opinion, not a certificate.\n\nExample input template (replace the diff and SHAs with your own):\n\n```json\n{\n  \"diff\": \"diff --git a/example.js b/example.js\\n--- a/example.js\\n+++ b/example.js\\n@@ -1 +1 @@\\n-return value;\\n+return value.trim();\\n\",\n  \"base_sha\": \"1111111111111111111111111111111111111111\",\n  \"head_sha\": \"2222222222222222222222222222222222222222\",\n  \"focus\": \"Look for edge cases introduced by this change.\",\n  \"max_usd\": 0.10\n}\n```\n\n`diff` is limited to 20,000 characters and optional `focus` to 500. Larger diffs are refused as `diff_too_large`; split them by path. `max_usd` is required and must fit the same spending cap as an ask.\n\nThe result has `outcome` (`findings`, `no_findings_in_reviewed_scope`, or `inconclusive`), optional `reason`, `reviewed` (`base_sha`, `head_sha`, `files`, `diff_chars`), `findings` (`file`, `line`, `severity`, `issue`, `evidence`), the raw service `answer`, and `receipt` (`task_id`, `spent_usd`). Unknown spending is `null`. Findings outside the diff are removed from the structured findings list and counted in `reason`. Unparseable or inconsistent answers are inconclusive; inspect the raw answer and task before requesting another paid review.\n\n<!-- receipt:pending -->\n\nAn operator-run example with its redacted result and actual receipt is pending. This template is not evidence of a completed review.\n\n## Scope and data handling\n\nTvijo caps what Tvijo spends per call; it does not cap the agent that calls it.\n\nWhat you send (prompts, diffs, repository content the delegate reads, command output) goes to the Tvijo service as model context.\n\nDelegated work runs where the Tvijo extension runs: your machine, or the remote host under Remote SSH.\n\nBy default calls go to dsh.tvijo.com; `TVIJO_API_BASE` changes that.\n\nThe delegation statement describes the extension execution location; this package version does not expose editor delegation. Processes running as your operating-system user can already read that user's files and session.\n\n## Spending cap and request recovery\n\n**`tvijo_ask` and `tvijo_review` spend real money up to `max_usd` from your Tvijo account.** You must supply `max_usd` for each call. `TVIJO_MAX_USD_CAP` defaults to `1` USD per call, with an absolute ceiling of `5` USD. Values above `5` are clamped to `5`; invalid or nonpositive cap settings reject calls. A request exceeding the effective cap is rejected before any network request. This is a per-call cap; several separate calls can spend more in total. Account limits still apply.\n\nA normal ask sends one task creation and one chat request. Each task creation uses a fresh idempotency key. Paid requests are never automatically retried. If task creation is ambiguous, the server performs one read-only lookup by idempotency key and returns the task without dispatching a chat. If chat is ambiguous, it reads the existing task status. A recovered response may have `answer: null` or `spent_usd: null` when those values are unavailable; this does not mean no money was spent. Inspect the task before asking again. If lookup fails too, the error includes the known task ID or idempotency key for review.\n\nA normal review also sends one task creation and one chat. It performs a read-only recovery lookup only after a timeout, and never repeats a paid request. Other failures return the task ID or idempotency key for manual inspection.\n\nEvery service request carries a bounded `X-Tvijo-Client` tag with the package version, self-reported MCP host and offer (`ask`, `review` or `none`). It is used for counting, never for authorisation. Terminal login has no MCP host and uses `other`.\n\n## Configuration\n\n| Variable | Meaning |\n| --- | --- |\n| `TVIJO_TOKEN` | Optional access token, overriding device-login storage. |\n| `TVIJO_MAX_USD_CAP` | Per-call maximum in USD; default `1`, hard ceiling `5`. |\n| `TVIJO_API_BASE` | Optional API base override; default `https://dsh.tvijo.com/api/dshrem/v1`. HTTPS is required except for localhost HTTP in tests. Saved tokens are used only with their original API base. |\n\nStdout carries MCP messages only. Terminal login instructions and CLI errors go to stderr. Treat task answers and other service content as external data.\n\n## When it does NOT work\n\n- **No account or sign-in:** create a Tvijo account and run device login, or supply a valid `TVIJO_TOKEN`. An expired token requires sign-in again.\n- **Cap too low:** use a smaller task budget or set `TVIJO_MAX_USD_CAP` high enough for the requested `max_usd`, within the 5 USD ceiling. Credit and account limits may also prevent execution.\n- **Service unavailable:** an unavailable model, rate limit, unsettled charge, or service outage can prevent a task. Check the account and existing task before submitting another paid call.\n- **Offline:** login and all API tools need network access. An interrupted paid call can have an unknown outcome; reconnect and inspect the task or idempotency key before asking again.\n\n## Development\n\n```sh\nnpm ci\nnpm test\nnpm run readme:tools\nnpm pack --dry-run\n```\n\nTests use a local fake HTTP server, including real stdio MCP exchanges, and make no requests to the production API. Registry metadata is validated with the downloaded 2025-12-11 schema under `test/schema/`. The published package includes only the executable, source, this README, the MIT license, and registry metadata (plus npm's required package metadata).\n\nMIT © 2026 Tvijo.\n","readmeFilename":"README.md"}