Skip to content

feat(core): add location-based permission service#30287

Merged
thdxr merged 10 commits into
devfrom
refactor/permission-v2-contract
Jun 2, 2026
Merged

feat(core): add location-based permission service#30287
thdxr merged 10 commits into
devfrom
refactor/permission-v2-contract

Conversation

@thdxr

@thdxr thdxr commented Jun 1, 2026

Copy link
Copy Markdown
Member

Summary

  • implement PermissionV2 in core as a location-scoped service with action/resource/decision schemas and pending request handling
  • replace legacy persisted permission storage with normalized project remembered grants and generated drop/create migrations
  • keep legacy permission wire schemas isolated in PermissionLegacy while exposing additive permission.v2.* SDK event types

Validation

  • cd packages/core && bun typecheck && bun test && bun run migration --check
  • cd packages/opencode && bun typecheck && bun test test/permission/next.test.ts test/project/project.test.ts test/storage/json-migration.test.ts
  • cd packages/sdk/js && bun typecheck
  • bun typecheck
  • ./packages/sdk/js/script/build.ts

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@thdxr thdxr enabled auto-merge (squash) June 1, 2026 21:27
@thdxr thdxr disabled auto-merge June 1, 2026 21:35
@thdxr thdxr force-pushed the refactor/permission-v2-contract branch from 6cb5a3f to e4c9617 Compare June 2, 2026 01:13
…-contract

# Conflicts:
#	packages/core/src/database/migration.gen.ts
#	packages/core/test/database-migration.test.ts
#	packages/opencode/test/storage/json-migration.test.ts
@thdxr thdxr enabled auto-merge (squash) June 2, 2026 01:22
@thdxr thdxr merged commit 9b815bc into dev Jun 2, 2026
10 checks passed
@thdxr thdxr deleted the refactor/permission-v2-contract branch June 2, 2026 01:32
ShamirSecret pushed a commit to ShamirSecret/auto-code-machine that referenced this pull request Jun 2, 2026
0xLLLLH pushed a commit to 0xLLLLH/opencode that referenced this pull request Jun 2, 2026
ShamirSecret pushed a commit to ShamirSecret/auto-code-machine that referenced this pull request Jun 3, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant