Skip to content

Commit 8b353c5

Browse files
grypezclaude
andcommitted
feat(caprock): add sheaf-based permission-tracker vat and hook
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 57d9c9f commit 8b353c5

44 files changed

Lines changed: 4669 additions & 10 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3+
"name": "caprock",
4+
"version": "0.1.0",
5+
"description": "Routes Claude Code tool invocations through an ocap-kernel permission vat (POLA enforcement).",
6+
"repository": "https://github.com/MetaMask/ocap-kernel",
7+
"license": "MIT"
8+
}

packages/caprock/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
[Unreleased]: https://github.com/MetaMask/ocap-kernel/

packages/caprock/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# `@ocap/caprock`
2+
3+
Claude Code plugin: routes tool invocations through an ocap-kernel permission vat (POLA enforcement)
4+
5+
## Installation
6+
7+
`yarn add @ocap/caprock`
8+
9+
or
10+
11+
`npm install @ocap/caprock`
12+
13+
## Contributing
14+
15+
This package is part of a monorepo. Instructions for contributing can be found in the [monorepo README](https://github.com/MetaMask/ocap-kernel#readme).
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* No-op harden shim for the hook process.
3+
*
4+
* The hook is not a vat — it must not run SES lockdown because full lockdown
5+
* is incompatible with native tree-sitter bindings. @endo modules call
6+
* harden() at module-evaluation time, so we install a benign identity
7+
* function as the global before any @endo import evaluates.
8+
*
9+
* ESM evaluates modules depth-first in import order, so placing this as
10+
* the first import in hook.ts guarantees it runs before @endo/promise-kit.
11+
*/
12+
(globalThis as { harden?: <T>(value: T) => T }).harden ??= (value) => value;

0 commit comments

Comments
 (0)