Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .claude/commands/check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: check
description: Lints, builds, and tests the code.
argument-hint: [package-name]
allowed-tools:
- Bash(yarn lint*)
- Bash(yarn build*)
- Bash(yarn test*)
- Bash(yarn workspace *)
model: claude-haiku-4-5
---

Run the following commands to check the current state of the code:

If `$ARGUMENTS` is provided (e.g. `@metamask/ocap-kernel`), run the commands in
that workspace using `yarn workspace $ARGUMENTS`:

1. `yarn workspace $ARGUMENTS lint:fix`
2. `yarn workspace $ARGUMENTS build`
3. `yarn workspace $ARGUMENTS test:dev`

If `$ARGUMENTS` is empty, run the commands at the monorepo root:

1. `yarn lint:fix`
2. `yarn build`
3. `yarn test:dev`

Return the results of the commands.
10 changes: 10 additions & 0 deletions .claude/commands/commit-push-pr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: commit-push-pr
description: Optionally checks, then commits and pushes code to the remote repository, and creates a pull request.
argument-hint: check | force
allowed-tools:
- Skill
model: claude-haiku-4-5
---

Run `/commit-push $ARGUMENTS` then `/pr`.
56 changes: 56 additions & 0 deletions .claude/commands/commit-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
name: commit-push
description: Optionally checks, then commits and pushes code to the remote repository.
argument-hint: check | force
allowed-tools:
- Bash(git branch*)
- Bash(git checkout*)
- Bash(git add*)
- Bash(git status*)
- Bash(git commit*)
- Bash(git push*)
- Bash(git diff*)
- Bash(git log*)
- Skill
model: claude-haiku-4-5
---

Arguments: $ARGUMENTS

If the argument is "force", skip the check step. Otherwise (default), run the `/check` command first to lint, build, and test the code. If any of the checks fail, stop and report the errors.

Once ready, commit and push the code by following these steps:

1. Run these bash commands in parallel to understand the current state:

- `git status` to see all untracked files
- `git diff HEAD` to see both staged and unstaged changes
- `git log --oneline -10` to see recent commit messages for style consistency

2. If you are on the `main` branch, create a new feature branch using `git branch` and switch to it.

3. Analyze all changes and draft a commit message:

- Summarize the nature of the changes (new feature, enhancement, bug fix, refactoring, test, docs, etc.)
- Use the conventional commit format: `type(scope): description`
- Keep the first line under 72 characters
- Do not commit files that likely contain secrets (.env, credentials.json, etc.)

4. Stage and commit the changes:

- Add relevant files using `git add`
- Create the commit with a message ending with:
```
Co-Authored-By: Claude <[email protected]>
```
- Use a HEREDOC for the commit message to ensure proper formatting

5. Push to the remote repository:

- Run `git push` to push the commit
- If the branch has no upstream, use `git push -u origin <branch-name>`

6. Report the results including:
- The commit hash
- The commit message
- The push status
20 changes: 20 additions & 0 deletions .claude/commands/pr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: pr
description: Creates a pull request for the current branch.
allowed-tools:
- Bash(git status*)
- Bash(git log*)
- Bash(git show*)
- Bash(git diff*)
- Bash(gh pr create*)
model: claude-haiku-4-5
---

1. Run `git status`. If any of the following conditions apply, stop and report the errors:
- There are unstaged changes
- There are untracked files
- The current branch is the default branch (`main`)
2. Run `git log main..HEAD --oneline` to see the commit history.
3. Run `git diff` and/or `git show` as necessary to understand the changes.
4. Run `gh pr create` to create a pull request.
5. Return the results of the commands.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
"clean": "rimraf --glob './*.tsbuildinfo' ./.eslintcache ./coverage ./.turbo && yarn workspaces foreach --all --parallel --interlaced --verbose run clean",
"create-package": "tsx packages/create-package/src/index.ts",
"lint": "yarn constraints && yarn lint:eslint && yarn lint:misc --check && yarn lint:dependencies",
"lint:dependencies": "yarn dedupe --check && yarn depcheck && yarn workspaces foreach --all --parallel --verbose run lint:dependencies",
"lint:dependencies:fix": "yarn dedupe && yarn depcheck && yarn workspaces foreach --all --parallel --verbose run lint:dependencies",
"lint:dependencies": "yarn dedupe --check >/dev/null && yarn depcheck --quiet && yarn workspaces foreach --all --parallel --verbose run lint:dependencies",
"lint:dependencies:fix": "yarn dedupe >/dev/null && yarn depcheck --quiet && yarn workspaces foreach --all --parallel --verbose run lint:dependencies",
"lint:eslint": "yarn eslint . --cache",
"lint:fix": "yarn constraints --fix && yarn lint:eslint --fix && yarn lint:misc --write && yarn lint:dependencies:fix",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '**/*.yml' '!**/CHANGELOG.old.md' '!.yarnrc.yml' '!CLAUDE.md' '!merged-packages/**' --ignore-path .gitignore",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '**/*.yml' '!**/CHANGELOG.old.md' '!.yarnrc.yml' '!CLAUDE.md' '!merged-packages/**' --ignore-path .gitignore --log-level error",
"postinstall": "simple-git-hooks && yarn rebuild:native",
"prepack": "./scripts/prepack.sh",
"pretest": "bash scripts/reset-coverage-thresholds.sh",
"rebuild:native": "./scripts/rebuild-native.sh",
"test": "yarn pretest && vitest run",
"test:ci": "vitest run --coverage false",
"test:dev": "yarn test --mode development",
"test:dev": "yarn test --mode development --reporter dot",
"test:e2e": "yarn workspaces foreach --all run test:e2e",
"test:e2e:ci": "yarn workspaces foreach --all run test:e2e:ci",
"test:verbose": "yarn test --reporter verbose",
Expand Down
6 changes: 3 additions & 3 deletions packages/brow-2-brow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
"changelog:validate": "../../scripts/validate-changelog.sh @ocap/brow-2-brow",
"clean": "rimraf --glob './*.tsbuildinfo' ./.eslintcache ./coverage ./dist ./.turbo",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint:dependencies": "depcheck",
"lint:dependencies": "depcheck --quiet",
"lint:eslint": "eslint . --cache",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore --log-level error",
"test": "vitest run --config vitest.config.ts",
"test:clean": "yarn test --no-cache --coverage.clean",
"test:dev": "yarn test --mode development",
"test:dev": "yarn test --mode development --reporter dot",
"test:verbose": "yarn test --reporter verbose",
"test:watch": "vitest --config vitest.config.ts",
"start": "npm run build:dev && esbuild src/index.js --serve --sourcemap --bundle --outdir=dist --servedir=dist --external:@types/web",
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
"changelog:validate": "../../scripts/validate-changelog.sh @ocap/cli",
"clean": "rimraf --glob './*.tsbuildinfo' ./.eslintcache ./coverage ./dist ./.turbo",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint:dependencies": "depcheck",
"lint:dependencies": "depcheck --quiet",
"lint:eslint": "eslint . --cache",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore --log-level error",
"publish:preview": "yarn npm publish --tag preview",
"test": "vitest run --config vitest.config.ts",
"test:clean": "yarn test --no-cache --coverage.clean",
"test:dev": "yarn test --mode development",
"test:dev": "yarn test --mode development --reporter dot",
"test:verbose": "yarn test --reporter verbose",
"test:watch": "vitest --config vitest.config.ts",
"test:integration": "vitest run --config vitest.integration.config.ts"
Expand Down
6 changes: 3 additions & 3 deletions packages/create-package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
"changelog:validate": "../../scripts/validate-changelog.sh @ocap/create-package",
"clean": "rimraf --glob './*.tsbuildinfo' ./.eslintcache ./coverage ./dist ./.turbo",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint:dependencies": "depcheck",
"lint:dependencies": "depcheck --quiet",
"lint:eslint": "eslint . --cache",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore --log-level error",
"publish:preview": "yarn npm publish --tag preview",
"test": "vitest run --config vitest.config.ts",
"test:clean": "yarn test --no-cache --coverage.clean",
"test:dev": "yarn test --mode development",
"test:dev": "yarn test --mode development --reporter dot",
"test:verbose": "yarn test --reporter verbose",
"test:watch": "vitest --config vitest.config.ts"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
"changelog:validate": "../../scripts/validate-changelog.sh @ocap/extension",
"clean": "rimraf --glob './*.tsbuildinfo' ./.eslintcache ./coverage ./dist ./.turbo",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint:dependencies": "depcheck",
"lint:dependencies": "depcheck --quiet",
"lint:eslint": "eslint . --cache",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore --log-level error",
"publish:preview": "yarn npm publish --tag preview",
"postinstall": "yarn playwright install chromium",
"start": "./scripts/start.sh",
"test": "vitest run --config vitest.config.ts",
"test:build": "tsx ./test/build/build-tests.ts",
"test:clean": "yarn test --no-cache --coverage.clean",
"test:dev": "yarn test --mode development",
"test:dev": "yarn test --mode development --reporter dot",
"test:verbose": "yarn test --reporter verbose",
"test:watch": "vitest --config vitest.config.ts",
"test:e2e": "yarn playwright test",
Expand Down
6 changes: 3 additions & 3 deletions packages/kernel-agents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
"changelog:validate": "../../scripts/validate-changelog.sh @ocap/kernel-agents",
"clean": "rimraf --glob './*.tsbuildinfo' ./.eslintcache ./coverage ./dist",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint:dependencies": "depcheck",
"lint:dependencies": "depcheck --quiet",
"lint:eslint": "eslint . --cache",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore --log-level error",
"publish:preview": "yarn npm publish --tag preview",
"test": "vitest run --config vitest.config.ts",
"test:e2e": "vitest run --config vitest.config.e2e.ts",
"test:clean": "yarn test --no-cache --coverage.clean",
"test:dev": "yarn test --mode development",
"test:dev": "yarn test --mode development --reporter dot",
"test:verbose": "yarn test --reporter verbose",
"test:watch": "vitest --config vitest.config.ts"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/kernel-browser-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/kernel-browser-runtime",
"clean": "rimraf --glob './*.tsbuildinfo' ./.eslintcache ./coverage ./dist ./.turbo",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint:dependencies": "depcheck",
"lint:dependencies": "depcheck --quiet",
"lint:eslint": "eslint . --cache",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore --log-level error",
"publish:preview": "yarn npm publish --tag preview",
"test": "vitest run --config vitest.config.ts",
"test:build": "tsx ./test/build-tests.ts",
"test:clean": "yarn test --no-cache --coverage.clean",
"test:dev": "yarn test --mode development",
"test:dev": "yarn test --mode development --reporter dot",
"test:verbose": "yarn test --reporter verbose",
"test:watch": "vitest --config vitest.config.ts"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/kernel-errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/kernel-errors",
"clean": "rimraf --glob './*.tsbuildinfo' ./.eslintcache ./coverage ./dist ./.turbo",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint:dependencies": "depcheck",
"lint:dependencies": "depcheck --quiet",
"lint:eslint": "eslint . --cache",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore --log-level error",
"publish:preview": "yarn npm publish --tag preview",
"test": "vitest run --config vitest.config.ts",
"test:clean": "yarn test --no-cache --coverage.clean",
"test:dev": "yarn test --mode development",
"test:dev": "yarn test --mode development --reporter dot",
"test:verbose": "yarn test --reporter verbose",
"test:watch": "vitest --config vitest.config.ts"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/kernel-language-model-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@
"changelog:validate": "../../scripts/validate-changelog.sh @ocap/kernel-language-model-service",
"clean": "rimraf --glob './*.tsbuildinfo' ./.eslintcache ./coverage ./dist ./.turbo",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint:dependencies": "depcheck",
"lint:dependencies": "depcheck --quiet",
"lint:eslint": "eslint . --cache",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore --log-level error",
"publish:preview": "yarn npm publish --tag preview",
"test": "vitest run --config vitest.config.ts",
"test:e2e": "vitest run --config vitest.config.e2e.ts",
"test:clean": "yarn test --no-cache --coverage.clean",
"test:dev": "yarn test --mode development",
"test:dev": "yarn test --mode development --reporter dot",
"test:verbose": "yarn test --reporter verbose",
"test:watch": "vitest --config vitest.config.ts"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/kernel-platforms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@
"changelog:validate": "../../scripts/validate-changelog.sh @ocap/kernel-platforms",
"clean": "rimraf --glob './*.tsbuildinfo' ./.eslintcache ./coverage ./dist ./.turbo",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint:dependencies": "depcheck",
"lint:dependencies": "depcheck --quiet",
"lint:eslint": "eslint . --cache",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore --log-level error",
"publish:preview": "yarn npm publish --tag preview",
"test": "vitest run --config vitest.config.ts",
"test:clean": "yarn test --no-cache --coverage.clean",
"test:dev": "yarn test --mode development",
"test:dev": "yarn test --mode development --reporter dot",
"test:verbose": "yarn test --reporter verbose",
"test:watch": "vitest --config vitest.config.ts"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/kernel-rpc-methods/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@
"changelog:update": "../../scripts/update-changelog.sh @metamask/kernel-rpc-methods",
"clean": "rimraf --glob './*.tsbuildinfo' ./.eslintcache ./coverage ./dist ./.turbo",
"lint": "yarn lint:eslint && yarn lint:misc --check && yarn constraints && yarn lint:dependencies",
"lint:dependencies": "depcheck",
"lint:dependencies": "depcheck --quiet",
"lint:eslint": "eslint . --cache",
"lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write && yarn constraints --fix && yarn lint:dependencies",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore",
"lint:misc": "prettier --no-error-on-unmatched-pattern '**/*.json' '**/*.md' '**/*.html' '!**/CHANGELOG.old.md' '**/*.yml' '!.yarnrc.yml' '!merged-packages/**' --ignore-path ../../.gitignore --log-level error",
"publish:preview": "yarn npm publish --tag preview",
"test": "vitest run --config vitest.config.ts",
"test:clean": "yarn test --no-cache --coverage.clean",
"test:dev": "yarn test --mode development",
"test:dev": "yarn test --mode development --reporter dot",
"test:verbose": "yarn test --reporter verbose",
"test:watch": "vitest --config vitest.config.ts"
},
Expand Down
Loading
Loading