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
59 changes: 59 additions & 0 deletions .github/workflows/size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Size

on:
pull_request:

permissions:
contents: read
pull-requests: write

concurrency:
group: size-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
bundle-size:
name: Bundle Size
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0

- name: Setup toolchain
uses: ./.github/actions/setup-node-pnpm

- name: Preserve report script
run: cp scripts/size-report.mjs /tmp/agent-device-size-report.mjs

- name: Measure base size
run: |
git checkout --detach "${{ github.event.pull_request.base.sha }}"
pnpm install --frozen-lockfile
pnpm build
node /tmp/agent-device-size-report.mjs \
--startup-runs 7 \
--json /tmp/agent-device-size-base.json

- name: Measure PR size
run: |
git checkout --detach "${{ github.event.pull_request.head.sha }}"
pnpm install --frozen-lockfile
pnpm build
node scripts/size-report.mjs \
--compare /tmp/agent-device-size-base.json \
--startup-runs 7 \
--json .tmp/size-report.json \
--markdown .tmp/size-report.md

- name: Add job summary
run: cat .tmp/size-report.md >> "$GITHUB_STEP_SUMMARY"

- name: Comment on PR
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
run: node scripts/size-report.mjs --post-comment .tmp/size-report.md
1 change: 1 addition & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ Single-context repo. Read `CONTEXT.md` for domain language and testing/architect
- CLI/client/runtime output projection: `src/commands/cli-output.ts`, `src/commands/client-output.ts`, `src/commands/runtime-output.ts`
- Do not reintroduce CLI-shaped command adapters or schemas as a second source of truth. CLI, Node.js, and MCP should project from command contracts.
- Keep `src/daemon/request-router.ts` as request orchestration: auth, diagnostics scope, request admission, locking, handler chain, and fallback dispatch.
- New daemon handler-family commands must update the relevant `DAEMON_COMMAND_GROUPS.*Handler` entry and the handler module's exported `*_COMMAND_HANDLERS` coverage table; `src/daemon/__tests__/request-handler-catalog.test.ts` guards drift and overlap.
- Put request policies in focused request modules:
- tenant/lease/selector/lock admission: `src/daemon/request-admission.ts`
- artifact/error finalization: `src/daemon/request-finalization.ts`
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@
"build:macos-helper": "swift build -c release --package-path macos-helper",
"build:all": "pnpm build:node && pnpm build:xcuitest",
"ad": "node bin/agent-device.mjs",
"size": "node scripts/size-report.mjs",
"size:markdown": "node scripts/size-report.mjs --json .tmp/size-report.json --markdown .tmp/size-report.md",
"lint": "oxlint . --deny-warnings",
"format": "oxfmt --write src test skills package.json tsconfig.json tsconfig.lib.json rslib.config.ts vitest.config.ts .github/actions/setup-node-pnpm/action.yml .oxlintrc.json .oxfmtrc.json '!test/skillgym/.skillgym-results/**'",
"fallow": "fallow --summary",
Expand Down
1 change: 1 addition & 0 deletions scripts/integration-progress.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ function readClientCommandMethods() {

function readCommandContractBlocks(text) {
const starts = [
...text.matchAll(/defineExecutableCommand\(\s*metadata\(\s*['"]([^'"]+)['"]\s*\)/g),
...text.matchAll(/defineFieldCommand\(\s*['"]([^'"]+)['"]/g),
...text.matchAll(/defineCommand\(\s*\{[\s\S]*?\bname:\s*['"]([^'"]+)['"]/g),
]
Expand Down
Loading
Loading