{"_id":"@apify/kilocode-plugin","name":"@apify/kilocode-plugin","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"$schema":"https://json.schemastore.org/package.json","name":"@apify/kilocode-plugin","version":"0.1.0","description":"Apify for Kilo — run any of 20,000+ Apify Actors as a native Kilo Code agent tool.","type":"module","license":"Apache-2.0","keywords":["apify","kilocode","kilo","opencode","plugin","web-scraping","agent","ai"],"repository":{"type":"git","url":"git+https://github.com/apify/kilocode-plugin.git"},"homepage":"https://github.com/apify/kilocode-plugin#readme","bugs":{"url":"https://github.com/apify/kilocode-plugin/issues"},"exports":{"./server":{"import":"./dist/index.js","types":"./dist/index.d.ts","config":{"token":"{env:APIFY_TOKEN}"}}},"scripts":{"build":"tsc","typecheck":"tsc --noEmit","test":"vitest run","test:watch":"vitest","prepublishOnly":"npm run build"},"dependencies":{"@apify/consts":"^2.0.0","apify-client":"^2.12.0"},"devDependencies":{"@kilocode/plugin":"^7.3.18","@types/node":"^22.0.0","typescript":"^5.6.0","vitest":"^2.1.0","zod":"^3.23.0"},"publishConfig":{"access":"public"},"engines":{"node":">=18"},"gitHead":"597aae28f1c7b48ad45fc6de86eeacaa097a3736","_id":"@apify/kilocode-plugin@0.1.0","_nodeVersion":"22.13.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-4sGp8ykDIaOdhIGctUiNo5fFuIHCE9HNmM9YSSWOHxGEK6+S3MUfJf3AK6bv75WM3/j89yyThNZE+hO0oQpTcg==","shasum":"d9d52fcaf57b2fab7faeeb750a751a4840dae181","tarball":"https://registry.npmjs.org/@apify/kilocode-plugin/-/kilocode-plugin-0.1.0.tgz","fileCount":46,"unpackedSize":59305,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCIMtqajFJEOEGYcRtHm7OHeyTaapEX/zDBE1qFBD0Y5gIgK8es0cN+blckCpPXo2Kgwg/jjEbLZF5bEJUv7xAPjys="}]},"_npmUser":{"name":"drobnikj","email":"drobnik.j@gmail.com"},"directories":{},"maintainers":[{"name":"mtrunkat","email":"marek@trunkat.eu"},{"name":"jancurn","email":"jan.curn@gmail.com"},{"name":"petrpatek","email":"petrpatekml@gmail.com"},{"name":"mnmkng","email":"ondra@apify.com"},{"name":"jaroslavhejlek","email":"jarda@hejlek.cz"},{"name":"drobnikj","email":"drobnik.j@gmail.com"},{"name":"metalwarrior665","email":"lukaskrivka@gmail.com"},{"name":"fnesveda","email":"frantisek@apify.com"},{"name":"b4nan","email":"martinadamek59@gmail.com"},{"name":"janbuchar","email":"mail@bucharjan.cz"},{"name":"apify-service-account","email":"service-account@apify.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/kilocode-plugin_0.1.0_1782132272410_0.09463569452694998"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-22T12:44:32.185Z","0.1.0":"2026-06-22T12:44:32.555Z","modified":"2026-06-22T12:44:32.994Z"},"maintainers":[{"name":"mtrunkat","email":"marek@trunkat.eu"},{"name":"jancurn","email":"jan.curn@gmail.com"},{"name":"petrpatek","email":"petrpatekml@gmail.com"},{"name":"mnmkng","email":"ondra@apify.com"},{"name":"jaroslavhejlek","email":"jarda@hejlek.cz"},{"name":"drobnikj","email":"drobnik.j@gmail.com"},{"name":"metalwarrior665","email":"lukaskrivka@gmail.com"},{"name":"fnesveda","email":"frantisek@apify.com"},{"name":"b4nan","email":"martinadamek59@gmail.com"},{"name":"janbuchar","email":"mail@bucharjan.cz"},{"name":"apify-service-account","email":"service-account@apify.com"}],"description":"Apify for Kilo — run any of 20,000+ Apify Actors as a native Kilo Code agent tool.","homepage":"https://github.com/apify/kilocode-plugin#readme","keywords":["apify","kilocode","kilo","opencode","plugin","web-scraping","agent","ai"],"repository":{"type":"git","url":"git+https://github.com/apify/kilocode-plugin.git"},"bugs":{"url":"https://github.com/apify/kilocode-plugin/issues"},"license":"Apache-2.0","readme":"# Apify for Kilo\n\n[![Works with Kilo](https://img.shields.io/badge/Works%20with-Kilo-blue)](https://kilo.ai)\n[![npm](https://img.shields.io/npm/v/@apify/kilocode-plugin)](https://www.npmjs.com/package/@apify/kilocode-plugin)\n\n`@apify/kilocode-plugin` gives [Kilo Code](https://kilo.ai) agents one native tool — **`apify`** — that can run any of [Apify's](https://apify.com) 20,000+ web-scraping and automation **Actors** and bring the results back into the conversation. Scrape Google Maps, Instagram, Amazon, TikTok, search the web, crawl a site, or invoke any Actor by slug — without a tool-per-site explosion.\n\n> Community integration. \"Apify for Kilo\" is built and maintained by Apify and is not officially affiliated with Kilo.\n\n## Install\n\nAdd a single line to your `kilo.jsonc`:\n\n```jsonc\n{\n  \"plugin\": [\n    [\"@apify/kilocode-plugin\", { \"token\": \"{env:APIFY_TOKEN}\" }]\n  ]\n}\n```\n\nThen set your token (get one at [console.apify.com/account/integrations](https://console.apify.com/account/integrations)):\n\n```bash\nexport APIFY_TOKEN=\"apify_api_...\"\n```\n\nOr install via the CLI, which patches your config for you:\n\n```bash\nkilo plugin @apify/kilocode-plugin\n```\n\n### Token sources\n\nThe plugin resolves the token in this order:\n\n1. **Kilo auth login** — the plugin registers an **\"Apify API Token\"** auth method, so you can store the key through Kilo's native auth flow:\n\n   ```bash\n   kilo auth login --provider apify   # paste your apify_api_… token\n   ```\n\n   This alone is enough — login enables the tool on the next launch, with no config or env var needed.\n2. **Config** — `{ \"token\": \"...\" }` (or `{ \"apiKey\": \"...\" }`) in the `kilo.jsonc` plugin entry.\n3. **Environment** — `APIFY_API_KEY` or `APIFY_TOKEN`.\n\nIf no token is found, the plugin registers **no tool** (the agent never sees a tool that would fail). After running `kilo auth login`, restart Kilo so the plugin re-reads the credential.\n\n## The `apify` tool\n\nOne tool, three actions. The agent composes them:\n\n| Action     | What it does |\n|------------|--------------|\n| `discover` | Search the Apify Store (`query`), **or** fetch an Actor's input schema + README (`actorId`). |\n| `start`    | Launch an Actor run with a JSON `input`; returns run references immediately (non-blocking). |\n| `collect`  | Poll the runs; return finished datasets, mark the rest `pending`, surface failures. |\n\nTypical flow: **`discover` (search) → `discover` (schema) → `start` → `collect`** (repeat `collect` while `allDone` is `false`).\n\n### Example (what the agent does under the hood)\n\n```jsonc\n// 1. Learn the Actor's inputs\n{ \"action\": \"discover\", \"actorId\": \"compass~crawler-google-places\" }\n\n// 2. Launch a run (batch many targets into ONE run when possible)\n{ \"action\": \"start\",\n  \"actorId\": \"compass~crawler-google-places\",\n  \"input\": { \"searchStringsArray\": [\"coffee shop Prague\"], \"maxCrawledPlacesPerSearch\": 3 },\n  \"label\": \"prague-coffee\" }\n\n// 3. Collect — repeat until allDone: true\n{ \"action\": \"collect\",\n  \"runs\": [{ \"runId\": \"…\", \"actorId\": \"compass~crawler-google-places\", \"datasetId\": \"…\", \"label\": \"prague-coffee\" }] }\n```\n\nSlugs use a **tilde**: `username~actor-name` (e.g. `apify~google-search-scraper`), never a slash.\n\n## Safety\n\n- **Prompt-injection defense.** Scraped data is wrapped in `<<<EXTERNAL_UNTRUSTED_CONTENT>>>` markers (with the boundary markers sanitized out of the body) so a host that respects them won't treat scraped text as instructions.\n- **Result-size cap.** Dataset output is truncated to 50,000 characters to protect the context window.\n- **SSRF guard.** `baseUrl` must start with `https://api.apify.com`.\n- **Secret hygiene.** Tokens are newline-stripped before use and never echoed in tool output.\n\n## Configuration\n\n| Field          | Purpose |\n|----------------|---------|\n| `token` / `apiKey` | Apify API token. Falls back to `APIFY_API_KEY` / `APIFY_TOKEN`. |\n| `enabled`      | Force on/off. When unset, the plugin enables itself iff a token is present. |\n| `baseUrl`      | Override the Apify API origin. Must start with `https://api.apify.com`. |\n| `maxResults`   | Default result cap (forward-looking; currently informational). |\n| `enabledTools` | Subset of tools to register (only `apify` exists today). |\n\n## Development\n\n```bash\nnpm install\nnpm run build       # tsc → dist/\nnpm run typecheck\nnpm test            # vitest, mocked apify-client\n```\n\nSee [CLAUDE.md](./CLAUDE.md) for architecture notes and local end-to-end testing against a Kilo checkout.\n\n## License\n\nApache-2.0 © Apify\n","readmeFilename":"README.md","_rev":"1-ea77cce7ded6a7c1deff2699e61e14f3"}