Preparing Policies branch to merge to main #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
General cleanup of the policies branch: removed temporary documentation files, rewrote README with comprehensive policy framework documentation, and fixed SDK serialization bugs.
Changes
Deleted Files (Temporary/AI Context Files)
• .mcp.json - MCP configuration (not needed in repo)
• CLAUDE.md - AI assistant context file
• EVENT_LOGGING_OVERVIEW.md - Temporary documentation
• POLICIES_OVERVIEW.md - Temporary documentation
• context.md - AI assistant context file
• summary.md - AI assistant summary file
README.md - Complete Rewrite
Comprehensive developer-focused documentation including:
• Grid Integration - Positioned as the easiest path for most developers
• Core Concepts - Settings struct, sub-accounts, permissions, time lock, stale transaction protection
• Execution Modes - Consensus-based and synchronous execution flows
• Policy Framework - All 4 policy types documented:
• Program Interaction Policy (with Smart Transactions explanation)
• Internal Fund Transfer Policy
• Spending Limit Policy
• Settings Change Policy
• Hooks - Pre/post execution hooks documentation
• Legacy Spending Limits - Backwards compatibility section
• Building, Testing, Verifying - Developer instructions
• Audits & Security - Links to audit reports
SDK Bug Fixes
fix-smallvec.js• Removed
SmartAccountTransactionMessage.tsfrom SmallVec list - This type uses Vec in Rust (4-byte length prefix), NOT SmallVec (1-byte prefix). The incorrect entry was causing transaction deserialization failures (RangeError: offset out of range).CompiledHook.ts• Fixed
instructionDatafield - Changed from smallArray(beet.u8, beet.u8) to smallArray(beet.u16, beet.u8) to match Rust's SmallVec<u16, u8> which uses a 2-byte length prefix.Test Fixes
tests/index.ts• Enabled all test imports (previously some were commented out)
policyCreation.ts• Changed ProgramInteraction to LegacyProgramInteraction - The test uses the old format without pubkeyTable, so it needs the legacy variant.
Other
• .yarnrc.yml - Removed yarnPath pointing to gitignored .yarn/releases/ directory