{"_id":"@bentway/llama","_rev":"5-a51524c947ea80a184515738e2bf8942","name":"@bentway/llama","dist-tags":{"latest":"0.5.1"},"versions":{"0.1.0":{"name":"@bentway/llama","version":"0.1.0","keywords":["bentway","llm","agent","llama","llama-cpp","port"],"author":{"name":"Nathan Sentjens","email":"nate@bentway.dev"},"license":"Apache-2.0","_id":"@bentway/llama@0.1.0","maintainers":[{"name":"nsentjens","email":"fluffy-stats6r@icloud.com"}],"homepage":"https://github.com/bentway-dev/bentway#readme","bugs":{"url":"https://github.com/bentway-dev/bentway/issues"},"dist":{"shasum":"34a729c59a5f9d23bec8ca6b3c904005ccc8875b","tarball":"https://registry.npmjs.org/@bentway/llama/-/llama-0.1.0.tgz","fileCount":7,"integrity":"sha512-4MU71ACOSEj47z0nM4RIiaiU37O7JUo9WETzkyjo7onB0rH27ptP6wIGh9C397PD1rS2BQaQJQMmGEix1sqY1Q==","signatures":[{"sig":"MEUCIQC7DhcegFYunTsird+/tncMV3VdY5Y8K+cdVFTDpnFo1QIgGUlo17qDTQBefP/UkNxu6OJcSln2H9A/61FipAUgseQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":29615},"type":"module","_from":"file:/tmp/bw-boot/bentway-llama-0.1.0.tgz","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.mts","default":"./src/index.mjs"}},"scripts":{"test":"bash scripts/check-file-sizes.sh && bash scripts/check-api-report.sh","build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"nsentjens","email":"fluffy-stats6r@icloud.com"},"_resolved":"/tmp/bw-boot/bentway-llama-0.1.0.tgz","_integrity":"sha512-4MU71ACOSEj47z0nM4RIiaiU37O7JUo9WETzkyjo7onB0rH27ptP6wIGh9C397PD1rS2BQaQJQMmGEix1sqY1Q==","repository":{"url":"git+https://github.com/bentway-dev/bentway.git","type":"git","directory":"packages/llama"},"_npmVersion":"10.9.4","description":"llama.cpp / llama-server completion port for the bentway kernel","directories":{},"sideEffects":false,"_nodeVersion":"22.22.0","dependencies":{"@bentway/core":"0.1.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/llama_0.1.0_1782164836835_0.2551355659739021","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@bentway/llama","version":"0.2.0","keywords":["bentway","llm","agent","llama","llama-cpp","port"],"author":{"name":"Nathan Sentjens","email":"nate@bentway.dev"},"license":"Apache-2.0","_id":"@bentway/llama@0.2.0","maintainers":[{"name":"nsentjens","email":"fluffy-stats6r@icloud.com"}],"homepage":"https://github.com/bentway-dev/bentway#readme","bugs":{"url":"https://github.com/bentway-dev/bentway/issues"},"dist":{"shasum":"0cb470e6e7becbd5266ba27030d6b56d10f4a94a","tarball":"https://registry.npmjs.org/@bentway/llama/-/llama-0.2.0.tgz","fileCount":7,"integrity":"sha512-4earmOCyO3dsin8KicjqYpUA7YEyiw7FDKKYo8w7ROpBRbN1/bunPAw6SylNhBDwnFgzFb6RdSIb8EYbnwXgZQ==","signatures":[{"sig":"MEYCIQCnlhPZjBoLP+HvfN2EuEmeLncuTwnI/maW/pN97TkOAwIhANzxUl5CVnZl1iwPdbGjwjlhb7C+y647s+22KAazCTFS","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bentway%2fllama@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":29615},"type":"module","_from":"file:/tmp/bw-out/bentway-llama-0.2.0.tgz","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.mts","default":"./src/index.mjs"}},"scripts":{"test":"bash scripts/check-file-sizes.sh && bash scripts/check-api-report.sh","build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f9187076-6e69-45e7-96f9-118f70c1af5c"}},"_resolved":"/tmp/bw-out/bentway-llama-0.2.0.tgz","_integrity":"sha512-4earmOCyO3dsin8KicjqYpUA7YEyiw7FDKKYo8w7ROpBRbN1/bunPAw6SylNhBDwnFgzFb6RdSIb8EYbnwXgZQ==","repository":{"url":"git+https://github.com/bentway-dev/bentway.git","type":"git","directory":"packages/llama"},"_npmVersion":"11.17.0","description":"llama.cpp / llama-server completion port for the bentway kernel","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"@bentway/core":"0.2.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/llama_0.2.0_1782181175192_0.45941469683323133","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@bentway/llama","version":"0.3.0","keywords":["bentway","llm","agent","llama","llama-cpp","port"],"author":{"name":"Nathan Sentjens","email":"nate@bentway.dev"},"license":"Apache-2.0","_id":"@bentway/llama@0.3.0","maintainers":[{"name":"nsentjens","email":"fluffy-stats6r@icloud.com"}],"homepage":"https://github.com/bentway-dev/bentway#readme","bugs":{"url":"https://github.com/bentway-dev/bentway/issues"},"dist":{"shasum":"21a9d53efb18e4581d7b4357ad16a4ad5b7546c5","tarball":"https://registry.npmjs.org/@bentway/llama/-/llama-0.3.0.tgz","fileCount":7,"integrity":"sha512-L7A6rwlSHbSl/R3CB4McGe925HnkeplHL2SVQri8T5MLLkNzxY7vA6uYEqqlg3/SjV3lD5eXZyIolGnB38nwmA==","signatures":[{"sig":"MEQCIHLU80r1hv1ynH8NpKpXqj1V6iI/HxJx1Ngj6zxsmSc3AiBxZu6GoX9eWi80HlN8U+W+Rzys0EyplEiluDO31Dw1Rw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bentway%2fllama@0.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":29615},"type":"module","_from":"file:/tmp/bw-out/bentway-llama-0.3.0.tgz","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.mts","default":"./src/index.mjs"}},"scripts":{"test":"bash scripts/check-file-sizes.sh && bash scripts/check-api-report.sh","build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f9187076-6e69-45e7-96f9-118f70c1af5c"}},"_resolved":"/tmp/bw-out/bentway-llama-0.3.0.tgz","_integrity":"sha512-L7A6rwlSHbSl/R3CB4McGe925HnkeplHL2SVQri8T5MLLkNzxY7vA6uYEqqlg3/SjV3lD5eXZyIolGnB38nwmA==","repository":{"url":"git+https://github.com/bentway-dev/bentway.git","type":"git","directory":"packages/llama"},"_npmVersion":"11.17.0","description":"llama.cpp / llama-server completion port for the bentway kernel","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"@bentway/core":"0.3.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/llama_0.3.0_1782187522475_0.502757225451586","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@bentway/llama","version":"0.4.0","keywords":["bentway","llm","agent","llama","llama-cpp","port"],"author":{"name":"Nathan Sentjens","email":"nate@bentway.dev"},"license":"Apache-2.0","_id":"@bentway/llama@0.4.0","maintainers":[{"name":"nsentjens","email":"fluffy-stats6r@icloud.com"}],"homepage":"https://github.com/bentway-dev/bentway#readme","bugs":{"url":"https://github.com/bentway-dev/bentway/issues"},"dist":{"shasum":"6aa4ec55857177b428cb25c753dc6585016a19fd","tarball":"https://registry.npmjs.org/@bentway/llama/-/llama-0.4.0.tgz","fileCount":7,"integrity":"sha512-BgtnuLyZIHXsTnmk5mUingpF9WfoYsff/hkVJT+Lwbisu5XgUAIR2hvXvdmCaangfK6gwGZczKHlNJEJMEqjBQ==","signatures":[{"sig":"MEUCIQCIXKLxbUGOlBcstU3/+v+EemuKM6V1tBPdXdLFX8AEoQIgVqaH5B8FkNffkhxtOjYCfotiTmqixIcadZElQswNs6A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bentway%2fllama@0.4.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":29615},"type":"module","_from":"file:/tmp/bw-out/bentway-llama-0.4.0.tgz","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.mts","default":"./src/index.mjs"}},"scripts":{"test":"bash scripts/check-file-sizes.sh && bash scripts/check-api-report.sh","build":"tsc","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f9187076-6e69-45e7-96f9-118f70c1af5c"}},"_resolved":"/tmp/bw-out/bentway-llama-0.4.0.tgz","_integrity":"sha512-BgtnuLyZIHXsTnmk5mUingpF9WfoYsff/hkVJT+Lwbisu5XgUAIR2hvXvdmCaangfK6gwGZczKHlNJEJMEqjBQ==","repository":{"url":"git+https://github.com/bentway-dev/bentway.git","type":"git","directory":"packages/llama"},"_npmVersion":"11.17.0","description":"llama.cpp / llama-server completion port for the bentway kernel","directories":{},"sideEffects":false,"_nodeVersion":"22.22.3","dependencies":{"@bentway/core":"0.4.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/llama_0.4.0_1782243854032_0.36815200618882993","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"name":"@bentway/llama","version":"0.5.1","description":"llama.cpp / llama-server completion port for the bentway kernel","keywords":["bentway","llm","agent","llama","llama-cpp","port"],"homepage":"https://github.com/bentway-dev/bentway#readme","bugs":{"url":"https://github.com/bentway-dev/bentway/issues"},"license":"Apache-2.0","author":{"name":"Nathan Sentjens","email":"nate@bentway.dev"},"repository":{"type":"git","url":"git+https://github.com/bentway-dev/bentway.git","directory":"packages/llama"},"type":"module","exports":{".":{"types":"./dist/index.d.mts","default":"./src/index.mjs"}},"engines":{"node":">=22"},"sideEffects":false,"publishConfig":{"access":"public","provenance":true},"dependencies":{"@bentway/core":"0.5.1"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.7.0"},"scripts":{"build":"tsc","typecheck":"tsc --noEmit","test":"bash scripts/check-file-sizes.sh && bash scripts/check-api-report.sh"},"_id":"@bentway/llama@0.5.1","_integrity":"sha512-Sb7MNFciY2qoPzMnR+aEg+n8UV0sRnlANHR3bysOtmp/gOJYyEURbbOWx7NlnYTvIg0jRQt7wXTPp9Fr70M+AA==","_resolved":"/tmp/bw-out/bentway-llama-0.5.1.tgz","_from":"file:/tmp/bw-out/bentway-llama-0.5.1.tgz","_nodeVersion":"22.23.1","_npmVersion":"11.18.0","dist":{"integrity":"sha512-Sb7MNFciY2qoPzMnR+aEg+n8UV0sRnlANHR3bysOtmp/gOJYyEURbbOWx7NlnYTvIg0jRQt7wXTPp9Fr70M+AA==","shasum":"584dad705ddbdb53f2246c6f854d0e49f554944f","tarball":"https://registry.npmjs.org/@bentway/llama/-/llama-0.5.1.tgz","fileCount":7,"unpackedSize":29615,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bentway%2fllama@0.5.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDgmBYXBC6g3wN9cKD5N3VKgEN8W7WnMcTOqkPRNKpalgIhAMhq89GEByMdSiDjf1hpSOj2ANfszqsizYv80cA1O7Y1"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f9187076-6e69-45e7-96f9-118f70c1af5c"}},"directories":{},"maintainers":[{"name":"nsentjens","email":"fluffy-stats6r@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/llama_0.5.1_1783013219964_0.7369695563440526"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-22T21:47:16.702Z","modified":"2026-07-02T17:27:00.482Z","0.1.0":"2026-06-22T21:47:16.972Z","0.2.0":"2026-06-23T02:19:35.337Z","0.3.0":"2026-06-23T04:05:22.667Z","0.4.0":"2026-06-23T19:44:14.184Z","0.5.1":"2026-07-02T17:27:00.121Z"},"bugs":{"url":"https://github.com/bentway-dev/bentway/issues"},"author":{"name":"Nathan Sentjens","email":"nate@bentway.dev"},"license":"Apache-2.0","homepage":"https://github.com/bentway-dev/bentway#readme","keywords":["bentway","llm","agent","llama","llama-cpp","port"],"repository":{"type":"git","url":"git+https://github.com/bentway-dev/bentway.git","directory":"packages/llama"},"description":"llama.cpp / llama-server completion port for the bentway kernel","maintainers":[{"name":"nsentjens","email":"fluffy-stats6r@icloud.com"}],"readme":"# @bentway/llama\n\nllama.cpp / llama-server completion port for the bentway kernel.\n\nPart of [Bentway](https://github.com/bentway-dev/bentway), a runtime-agnostic\nagent execution kernel.\n\n## Install\n\n```\nnpm install @bentway/llama @bentway/core @bentway/stream-json\n```\n\n## Usage\n\n`complete()` POSTs the OpenAI-compatible /v1/chat/completions endpoint\nwith `stream: true`, accumulates the SSE stream, and resolves to the\nneutral `PortResult` shape on success. Non-2xx, stream errors, and\nmalformed tool-calls all resolve to the neutral error shape rather than\nthrowing — the turn loop's host-side hooks own the policy.\n\n```js\nimport { complete } from '@bentway/llama';\n\nconst result = await complete({\n  host: 'http://localhost:11434',\n  model: 'qwen3-coder:30b',\n  messages: [{ role: 'user', content: 'do the task' }],\n  tools: [],\n  temperature: 0.7,\n  top_p: 0.8,\n  presence_penalty: 1.5,\n});\n\n// Inject `complete` into runTurnLoop from @bentway/core, with a\n// `serializeRequest` closure that produces this args shape from the\n// owned Transcript via `serializeForLlama`.\n```\n\nStreaming text is preserved in `result.textChunks`; the loop's\n`emitProviderTextStream` hook replays them to keep the projection\nprovider-neutral.\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md"}