{"_id":"@akalsey/openclaw-sapience","_rev":"5-e3ef8ff04c075361dbe7464ddce18d6c","name":"@akalsey/openclaw-sapience","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@akalsey/openclaw-sapience","version":"0.1.0","_id":"@akalsey/openclaw-sapience@0.1.0","maintainers":[{"name":"akalsey","email":"adam@kalsey.com"}],"dist":{"shasum":"7ade67e51a01b091854e92e07784cf9a416af04c","tarball":"https://registry.npmjs.org/@akalsey/openclaw-sapience/-/openclaw-sapience-0.1.0.tgz","fileCount":14,"integrity":"sha512-wsjNo9WuEwTAfgEOzLP212Pb1zRHz2SU2BnE3tDiAnjWLhlvEd3dIM47XST/6Xe4px/SeGVuL11JajRVDiRt6g==","signatures":[{"sig":"MEYCIQDG6QxfVU2jP7xSBfkGjvPd0UxiuxHFsBfvZNIHAupPtgIhAOd+zg9kj7C9s+965RhAoaleW+lH2W7cQ4DBJ0btKb5b","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25872},"main":"./dist/index.js","type":"module","exports":{".":"./dist/index.js"},"gitHead":"f1b1febcca21adfba5d6ba11efc67803d1b445ca","scripts":{"test":"vitest run","build":"tsc","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"akalsey","email":"adam@kalsey.com"},"openclaw":{"compat":{"pluginApi":">=2026.3.24-beta.2","minGatewayVersion":"2026.3.24-beta.2"},"install":{"localPath":"."},"extensions":["./dist/index.js"]},"_npmVersion":"11.13.0","description":"The Sapience Suite transforms OpenClaw from a reactive assistant into a proactive agent with genuine autonomy. It learns when to act, when to propose, when to ask, and when to explore — calibrated to your actual preferences, not a static policy you had to","directories":{},"_nodeVersion":"26.0.0","dependencies":{"@sinclair/typebox":"^0.33.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.0.0","openclaw":"latest","typescript":"^5.5.0","@types/node":"^22.0.0"},"peerDependencies":{"openclaw":">=2026.3.24-beta.2"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-sapience_0.1.0_1779425063245_0.2740122614813649","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to @akalsey/sapience"},"0.1.1":{"name":"@akalsey/openclaw-sapience","version":"0.1.1","_id":"@akalsey/openclaw-sapience@0.1.1","maintainers":[{"name":"akalsey","email":"adam@kalsey.com"}],"dist":{"shasum":"b5ac4c6a15b71505cec1c9b855569337d522dcf0","tarball":"https://registry.npmjs.org/@akalsey/openclaw-sapience/-/openclaw-sapience-0.1.1.tgz","fileCount":14,"integrity":"sha512-4w7SWe/Vl0LrLQKqv/FVDHY03PYrRvgih0aHpZ4yFj57JOLkQ2IRwl8gjOal1UKVSVGKkhd/60UMcD5zG4zaRw==","signatures":[{"sig":"MEUCIDsnZNfTGcEt/mG97iu59G1O1FlkB9iG9ON0GYXCeEayAiEAtXSIdlfVyhYjhBvFmHLb6hy7C6ugk8FD8rLq5+imjcE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":25821},"main":"./dist/index.js","type":"module","exports":{".":"./dist/index.js"},"gitHead":"b70d59d46562e15bcf869902d2a8227a82ab834d","scripts":{"test":"vitest run","build":"tsc","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"akalsey","email":"adam@kalsey.com"},"openclaw":{"compat":{"pluginApi":">=2026.3.24-beta.2","minGatewayVersion":"2026.3.24-beta.2"},"install":{"localPath":"."},"extensions":["./dist/index.js"]},"_npmVersion":"11.13.0","description":"The Sapience Suite transforms OpenClaw from a reactive assistant into a proactive agent with genuine autonomy. It learns when to act, when to propose, when to ask, and when to explore — calibrated to your actual preferences, not a static policy you had to","directories":{},"_nodeVersion":"26.0.0","dependencies":{"@sinclair/typebox":"^0.33.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.0.0","openclaw":"latest","typescript":"^5.5.0","@types/node":"^22.0.0"},"peerDependencies":{"openclaw":">=2026.3.24-beta.2"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-sapience_0.1.1_1779425645536_0.1072205612081516","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to @akalsey/sapience"},"0.1.2":{"name":"@akalsey/openclaw-sapience","version":"0.1.2","_id":"@akalsey/openclaw-sapience@0.1.2","maintainers":[{"name":"akalsey","email":"adam@kalsey.com"}],"dist":{"shasum":"93c02d6627e9b8dd727808bcb4f3a707f617d171","tarball":"https://registry.npmjs.org/@akalsey/openclaw-sapience/-/openclaw-sapience-0.1.2.tgz","fileCount":14,"integrity":"sha512-n2GaFFdV31RIqA+t0UxOzW9oicmMr8Y7I6KZwtVDCfJ3Y60c33nvjO0TirtJHfmk+IpzvZCH6J3t1Gqp9CR/vA==","signatures":[{"sig":"MEQCICsRTLo1QQ0VguwBjOidsr8NF43Q5nfyBPX8FniOs7S2AiAfotUQFOz4599m8IDS95sObnwewFgWHl97c+UoR9opFA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27060},"main":"./dist/index.js","type":"module","exports":{".":"./dist/index.js"},"gitHead":"034d5cec9e832933ec3a2cfa6273b6fdcc00d3d4","scripts":{"test":"vitest run","build":"tsc","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"akalsey","email":"adam@kalsey.com"},"openclaw":{"compat":{"pluginApi":">=2026.3.24-beta.2","minGatewayVersion":"2026.3.24-beta.2"},"install":{"localPath":"."},"extensions":["./dist/index.js"]},"_npmVersion":"11.13.0","description":"The Sapience Suite transforms OpenClaw from a reactive assistant into a proactive agent with genuine autonomy. It learns when to act, when to propose, when to ask, and when to explore — calibrated to your actual preferences, not a static policy you had to","directories":{},"_nodeVersion":"26.0.0","dependencies":{"@sinclair/typebox":"^0.33.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.0.0","openclaw":"latest","typescript":"^5.5.0","@types/node":"^22.0.0"},"peerDependencies":{"openclaw":">=2026.3.24-beta.2"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-sapience_0.1.2_1779426115446_0.41334056947821485","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to @akalsey/sapience"},"0.1.3":{"name":"@akalsey/openclaw-sapience","version":"0.1.3","_id":"@akalsey/openclaw-sapience@0.1.3","maintainers":[{"name":"akalsey","email":"adam@kalsey.com"}],"dist":{"shasum":"d7d1612c2d730d015dfab539a8f23e97e79c5196","tarball":"https://registry.npmjs.org/@akalsey/openclaw-sapience/-/openclaw-sapience-0.1.3.tgz","fileCount":14,"integrity":"sha512-uUJxPtx8qJh6Hn/Ke+e1qWL8+GRDcGTjQf8n6Uf7/Zq3CfWL8Y/IhAwK7U/Lt+qGFDfF8nHkPl4Vebw4GIa1Kg==","signatures":[{"sig":"MEQCIGcUql0kjFHYcq4fvrOYK8W9yqJMzHyeQIzDsGdaZF12AiB+NbKu+J0HWThM4Wj8OTSBtyu6g1WlIF6LJ6yZUoO+TA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26668},"main":"./dist/index.js","type":"module","exports":{".":"./dist/index.js"},"gitHead":"0e704f0d35d21e0aae46be298502da3b63985cb4","scripts":{"test":"vitest run","build":"tsc","typecheck":"tsc --noEmit","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"akalsey","email":"adam@kalsey.com"},"openclaw":{"compat":{"pluginApi":">=2026.3.24-beta.2","minGatewayVersion":"2026.3.24-beta.2"},"install":{"localPath":"."},"extensions":["./dist/index.js"]},"_npmVersion":"11.13.0","description":"The Sapience Suite transforms OpenClaw from a reactive assistant into a proactive agent with genuine autonomy. It learns when to act, when to propose, when to ask, and when to explore — calibrated to your actual preferences, not a static policy you had to","directories":{},"_nodeVersion":"26.0.0","dependencies":{"@sinclair/typebox":"^0.33.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.0.0","openclaw":"latest","typescript":"^5.5.0","@types/node":"^22.0.0"},"peerDependencies":{"openclaw":">=2026.3.24-beta.2"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-sapience_0.1.3_1779461032711_0.0808476395005926","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed to @akalsey/sapience"}},"time":{"created":"2026-05-22T04:44:23.152Z","modified":"2026-05-24T16:05:40.550Z","0.1.0":"2026-05-22T04:44:23.385Z","0.1.1":"2026-05-22T04:54:05.681Z","0.1.2":"2026-05-22T05:01:55.572Z","0.1.3":"2026-05-22T14:43:52.855Z"},"description":"The Sapience Suite transforms OpenClaw from a reactive assistant into a proactive agent with genuine autonomy. It learns when to act, when to propose, when to ask, and when to explore — calibrated to your actual preferences, not a static policy you had to","maintainers":[{"name":"akalsey","email":"adam@kalsey.com"}],"readme":"# Sapience Suite for OpenClaw\n\nThe Sapience Suite transforms OpenClaw from a reactive assistant into a proactive agent with genuine autonomy. It learns when to act, when to propose, when to ask, and when to explore — calibrated to your actual preferences, not a static policy you had to configure upfront.\n\nThe suite has four plugins that each work independently and compose into a whole:\n\n| Plugin | Does |\n|--------|------|\n| `openclaw-thinking` | Periodic thinking passes; generates observations and proposals |\n| `openclaw-sapience` *(this plugin)* | Routes proposals through autonomy tiers; calibrates to your preferences; delivers weekly digest |\n| `openclaw-feedback` | Captures corrections and confirmations from chat; recalibrates autonomy profile |\n| `openclaw-goals` | Accepts fuzzy long-running goals; decomposes them; tracks progress; weekly status |\n\n## How it works\n\n`openclaw-thinking` runs a thinking pass every 15 minutes and writes proposals to `proposals.jsonl`. `openclaw-sapience` reads that sidecar, routes each proposal through an autonomy decision function, and delivers it to your main session at the right level:\n\n- **Act** — high-confidence, reversible, low-blast-radius → done immediately, brief notification\n- **Propose** — worth doing, needs your approval → surfaces it for a yes/no\n- **Ask** — agent can do it but needs one piece of information → asks exactly what's needed\n- **Explore** — the problem is real but the right path is unclear → presents 2–3 options with tradeoffs\n- **Learning** — new domain or low confidence → calibration question before acting\n\nThe routing decision uses a calibration profile: per-domain, per-action-class entries with a confidence score. Until a domain is calibrated, everything goes through **Learning** mode and will ask you to confirm it's choices before acting.\n\n## Setup\n\n### Prerequisites\n\nInstall `openclaw-thinking` first. Sapience reads its output.\n\n### Install order\n\n```bash\nopenclaw plugins install npm:@akalsey/openclaw-thinking\nopenclaw plugins install npm:@akalsey/openclaw-sapience\nopenclaw plugins install npm:@akalsey/openclaw-feedback   # optional\nopenclaw plugins install npm:@akalsey/openclaw-goals       # optional\n```\n\n### Configuration (sapience)\n\n```json\n{\n  \"plugins\": {\n    \"sapience\": {\n      \"autonomy\": {\n        \"defaultTier\": \"propose\",\n        \"domainFloors\": {\n          \"github\": \"propose\",\n          \"salesforce\": \"ask\"\n        }\n      },\n      \"learning\": {\n        \"enabled\": true,\n        \"confidenceDropThreshold\": 0.4\n      },\n      \"digest\": {\n        \"enabled\": true,\n        \"day\": \"friday\",\n        \"time\": \"17:00\"\n      }\n    }\n  }\n}\n```\n\n**`defaultTier`** — What tier to use for uncalibrated actions when learning mode is off. Default: `\"propose\"`.\n\n**`domainFloors`** — Minimum tier for a domain. If calibration says `act` for a domain with floor `propose`, it routes as `propose`. Use this for domains where you never want autonomous action regardless of confidence.\n\n**`confidenceDropThreshold`** — Below this confidence, Learning mode fires instead of the calibrated tier. Default: `0.4`.\n\n**`digest`** — Weekly summary of what was acted on, what's pending review, and what's planned. Delivered at the configured day and time.\n\n### Output files\n\n| File | Purpose |\n|------|---------|\n| `~/.openclaw/sapience/calibration.json` | Autonomy calibration profile (shared with `openclaw-feedback`) |\n| `~/.openclaw/sapience/processed-passes.json` | Tracks which proactive-thinking passes have been routed |\n| `~/.openclaw/sapience/action-log.md` | Log of every Act-tier item delivered |\n\n## Training: calibrating autonomy\n\nCalibration is the process of teaching the agent your preferences per domain and action type.\n\n### Learning mode\n\nWhen sapience sees a domain/action-class combination with no calibration data (or low confidence), it fires a **Learning** prompt instead of acting:\n\n> \"I noticed [item]. My instinct is to surface this as a proposal. Is that the right level of initiative, or would you prefer I handle this differently?\"\n\nYou respond to confirm or redirect. The calibration profile updates accordingly.\n\n### How confidence builds\n\n| Event | Effect |\n|-------|--------|\n| You confirm the proposed approach (\"yes, that's right\") | Confidence +0.1 |\n| You correct the approach (\"no, just do it\") | Confidence −0.3, tier updated |\n| No feedback | Confidence unchanged |\n\nConfidence caps at 1.0 and floors at 0.0. A domain needs roughly 3–5 confirmations to reach the default threshold (0.4) from zero.\n\n### Reading the calibration profile\n\n```bash\ncat ~/.openclaw/sapience/calibration.json\n```\n\nEach entry:\n```json\n{\n  \"domain\": \"github\",\n  \"action_class\": \"github/action\",\n  \"tier\": \"propose\",\n  \"confidence\": 0.7,\n  \"confirmed_count\": 4,\n  \"corrected_count\": 1,\n  \"last_calibrated\": \"2026-05-20T14:00:00Z\",\n  \"notes\": \"\"\n}\n```\n\n### Resetting a domain\n\nDelete the entry from `calibration.json` to reset a domain to Learning mode.\n\n## Day-to-day use\n\nOnce installed, the suite runs in the background. What you'll see in your sessions:\n\n- `[SAPIENCE: PROPOSE]` — a proposal needing your yes/no\n- `[SAPIENCE: ACT]` — notification of something just done\n- `[SAPIENCE: ASK]` — a question needed before proceeding\n- `[SAPIENCE: EXPLORE]` — a problem with options for you to choose from\n- `[SAPIENCE: CALIBRATE]` — a calibration question for a new domain\n- `[SAPIENCE: WEEKLY DIGEST]` — Friday summary of actions, pending items, and plans\n\nYou don't need to do anything to receive these — they arrive as injected turns in your active session.\n\n### Weekly digest\n\nEvery Friday at 5pm (or your configured time), the digest summarizes:\n- What was acted on this week\n- Proposals still waiting on your input\n- What's planned for next week\n\n## Troubleshooting\n\n**Nothing being delivered to my session**\nCheck that proactive-thinking is writing `proposals.jsonl`:\n```bash\ncat ~/.openclaw/proactive-thinking/proposals.jsonl | tail -1 | python3 -m json.tool\n```\nIf the file is empty or missing, proactive-thinking isn't running. Check its logs first.\n\n**Everything is going to Learning mode**\nExpected behavior for the first week or two. Each calibration response builds confidence. If it continues beyond 2–3 weeks for a domain you use daily, check `calibration.json` — entries may not be getting written.\n\n**Calibration profile not updating**\nFeedback plugin (`openclaw-feedback`) handles explicit correction/confirmation capture. If it's not installed, calibrations only happen through the Learning mode prompts. Install `openclaw-feedback` for passive capture from chat messages.\n\n**`domainFloors` not respected**\nFloors only prevent routing *above* the floor — they don't push Act-tier items down to propose. `\"github\": \"propose\"` means github/action can be at most `propose`, `ask`, or `explore`, never `act`. If you're seeing Act-tier github items, check the floor config key matches the domain name exactly (lowercase).\n\n**Duplicate deliveries**\n`processed-passes.json` tracks which proactive-thinking passes have been routed. If it's missing or corrupt, passes get re-delivered. Delete it and it will rebuild from the current pass forward.\n","readmeFilename":"README.md"}