{"_id":"@4gpts/sil","name":"@4gpts/sil","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@4gpts/sil","version":"0.1.0","description":"OpenClaw plugin for sil — register an identity and search and look up products in the sil commerce catalog from an agent.","license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/Context4GPTs/sil-openclaw.git"},"bugs":{"url":"https://github.com/Context4GPTs/sil-openclaw/issues"},"homepage":"https://4gpts.com","keywords":["openclaw","openclaw-plugin","sil","commerce","catalog","agent","ucp","4gpts"],"type":"module","engines":{"node":">=22"},"main":"./dist/index.js","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"openclaw":{"extensions":["./dist/index.js"],"compat":{"pluginApi":">=2026.4.1","minGatewayVersion":">=2026.4.15"},"build":{"openclawVersion":"2026.4.15","pluginSdkVersion":"2026.4.15"},"hostTargets":["darwin-arm64","darwin-x64","linux-x64","linux-arm64","win32-x64"],"environment":{"externalServices":["sil-web","sil-api"]},"install":{"npmSpec":"@4gpts/sil","localPath":"./","defaultChoice":"npm","minHostVersion":">=2026.4.15"}},"scripts":{"clean":"node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"","build":"pnpm clean && tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","dev":"tsc -p tsconfig.build.json --watch","test":"vitest run --passWithNoTests","test:watch":"vitest","sync-version":"node scripts/sync-version.mjs","preversion":"pnpm typecheck && pnpm test","version":"pnpm sync-version && node scripts/changelog.mjs cut && git add openclaw.plugin.json CHANGELOG.md","postversion":"git push --follow-tags","prepack":"pnpm build","release":"node scripts/release.mjs","release:dry":"node scripts/release.mjs --dry-run"},"dependencies":{"typebox":"^1.2.2"},"devDependencies":{"@types/node":"22.15.3","typescript":"5.8.3","vitest":"4.1.2"},"_id":"@4gpts/sil@0.1.0","_integrity":"sha512-rx/B6QPB4L+/vNvfoJmuzvV74NpR0cAEibvrXMAuTp6M4XUYk5Jnvqamv22PBy0WjlNuljj/5EIeTrztK9r1iA==","_resolved":"/Users/knitlybak/GitHub/4gpts/sil/sil-openclaw/4gpts-sil-0.1.0.tgz","_from":"file:/Users/knitlybak/GitHub/4gpts/sil/sil-openclaw/4gpts-sil-0.1.0.tgz","_nodeVersion":"24.11.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-rx/B6QPB4L+/vNvfoJmuzvV74NpR0cAEibvrXMAuTp6M4XUYk5Jnvqamv22PBy0WjlNuljj/5EIeTrztK9r1iA==","shasum":"9fe3dac51a8f20890655d046222cfae1b7010596","tarball":"https://registry.npmjs.org/@4gpts/sil/-/sil-0.1.0.tgz","fileCount":17,"unpackedSize":152086,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIH0+Z/PTCjo9OUNnelVHxJHd6WUwN7zdapqDl7F0/9lXAiEA7UGrteyYcP6c7IkYqAcVKkNywvIRIJ5r/zpAIw+vX24="}]},"_npmUser":{"name":"blackbak","email":"giannis.bakagiannis@gmail.com"},"directories":{},"maintainers":[{"name":"ioannis_4gpts","email":"ioannis@4gpts.com"},{"name":"blackbak","email":"giannis.bakagiannis@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sil_0.1.0_1781185034843_0.6726972777944433"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-11T13:37:14.667Z","0.1.0":"2026-06-11T13:37:15.009Z","modified":"2026-06-11T13:37:15.229Z"},"maintainers":[{"name":"ioannis_4gpts","email":"ioannis@4gpts.com"},{"name":"blackbak","email":"giannis.bakagiannis@gmail.com"}],"description":"OpenClaw plugin for sil — register an identity and search and look up products in the sil commerce catalog from an agent.","homepage":"https://4gpts.com","keywords":["openclaw","openclaw-plugin","sil","commerce","catalog","agent","ucp","4gpts"],"repository":{"type":"git","url":"git+https://github.com/Context4GPTs/sil-openclaw.git"},"bugs":{"url":"https://github.com/Context4GPTs/sil-openclaw/issues"},"license":"Apache-2.0","readme":"# sil — OpenClaw plugin\n\nA [OpenClaw](https://docs.openclaw.ai) plugin for **sil**. It exposes the sil commerce tools to an agent running in an OpenClaw host: register an identity, read it back, and search and look up purchasable products in the sil catalog.\n\n## Tools\n\n| Tool | Arguments | Returns |\n|---|---|---|\n| `sil_register` | _(none)_ | Starts browser-based registration. Returns an `auth_url` for the user to open; the plugin polls in the background and stores credentials once sign-in completes. |\n| `sil_whoami` | _(none)_ | The registered user's identity (name and addresses), refreshing an expired token transparently. |\n| `sil_search` | `query?`, `category?`, `price_min?`, `price_max?`, `cursor?`, `limit?` | A ranked list of purchasable variants (`id`, `title`, `price`, `availability`, `checkout_url`, `source`) plus a pagination `cursor`. |\n| `sil_product_get` | `ids: string[]` | The matching products in UCP shape with fresh detail (description, options, featured variant), each variant carrying an `inputs` correlation; unresolved ids come back in `not_found`. |\n\nEvery tool returns the same envelope — a single text content block whose JSON body carries a `status` (`ok`, `not_registered`, `must_reregister`, `forbidden`, `invalid_request`, or `retryable`) and, on success, the tool's payload. All I/O happens inside a tool's `execute()`; `register()` opens nothing.\n\n## Configuration\n\nTwo optional plugin-scoped keys, resolved at call time (override → env → default):\n\n| Key | Env fallback | Default | Purpose |\n|---|---|---|---|\n| `sil_web_url` | `SIL_WEB_URL` | `https://sil.4gpts.com` | sil-web origin — the auth authority (registration, token refresh). |\n| `sil_api_url` | `SIL_API_URL` | `https://sil-api.4gpts.com` | sil-api origin — the domain service (`sil_whoami` identity reads, `sil_search` / `sil_product_get` catalog calls). |\n\nSet them under `plugins.sil.config` in your OpenClaw config. Override only for staging or self-hosted deployments.\n\n## Developing\n\n```bash\npnpm install     # install dependencies (Node 22+)\npnpm build       # tsc → dist/  (emits the plugin entry dist/index.js)\npnpm test        # vitest\npnpm typecheck   # tsc --noEmit\n```\n\n### How to add a tool\n\n`src/tools/identity.ts` (`sil_register`, `sil_whoami`) is the reference group — it sets the `jsonResult` success shape and the structured-error envelope every real tool follows; `src/tools/catalog.ts` is the catalog counterpart. Adding a real tool is three steps:\n\n1. Register the tool with `api.registerTool({...})` inside a `registerXTools(api)` group in `src/tools/`.\n2. Wire that group into `register()` in `src/index.ts` (only needed for a new group).\n3. Add the tool's `name` to `openclaw.plugin.json#contracts.tools`.\n\nA drift-guard test set-compares the manifest's `contracts.tools` against the names `register()` registers and fails if they disagree, so step 3 is enforced, not optional. The full contributor guide — including why `register()` must stay synchronous — is in [`CLAUDE.md`](./CLAUDE.md).\n\n## Releasing\n\n`@4gpts/sil` publishes to **npm** (`@4gpts/sil`) and to **ClawHub** (the `code-plugin` family). Two steps — bump on every change, publish when ready:\n\n```bash\n# 1. Bump — your cadence, run on every shippable change:\npnpm version patch        # or: minor | major\n#   runs typecheck + tests, bumps package.json#version, mirrors it into\n#   openclaw.plugin.json, commits, tags v<x.y.z>, and pushes (commit + tag).\n\n# 2. Publish — build once, ship the same tarball to both registries:\npnpm release:dry          # full build → pack → publish pipeline, uploads NOTHING\npnpm release              # npm publish + clawhub package publish\n```\n\n`package.json#version` is the single source of truth — `scripts/sync-version.mjs` keeps `openclaw.plugin.json`'s version in lock-step, and a version-parity test fails if they ever drift. `pnpm release` builds a clean `dist/`, packs one tarball, and uploads those exact bytes to both registries (no drift between what npm and ClawHub serve). It refuses to publish a dirty or untagged tree, or when you are not logged in — so run `pnpm version` first.\n\n**Changelog:** keep the `## [Unreleased]` section of [`CHANGELOG.md`](./CHANGELOG.md) current as you work ([Keep a Changelog](https://keepachangelog.com/) format). `pnpm version` promotes it to a dated release section inside the version commit, and `pnpm release` attaches those notes to the ClawHub release (`clawhub package publish --changelog`). After a real publish, `clawhub package readiness @4gpts/sil` reports any remaining readiness blockers.\n\n**One-time prerequisites:**\n\n```bash\nnpm login                            # npm auth (publishConfig already sets access: public)\nnpm i -g clawhub && clawhub login    # ClawHub CLI + auth\n```\n\nReleases publish under the **`4gpts`** ClawHub org — the `CLAWHUB_OWNER` default, mirroring the `@4gpts` npm scope. You authenticate as an org member with `clawhub login` (and `npm login`); override the org with `CLAWHUB_OWNER` if needed.\n\n## License\n\n[Apache-2.0](./LICENSE). See [`NOTICE`](./NOTICE).\n","readmeFilename":"README.md","_rev":"1-26f9dcc0d3ba8d9a5daae8bfe9dab696"}