Skip to content

Commit 308dcd6

Browse files
committed
feat: initialize socket-bin scaffold
Publish-only repo for @socketbin/* SEA-packed binaries. Mirrors socket-addon's shape (download from socket-btm GH Releases, verify SHA-256, republish to npm) but scoped to standalone binaries instead of NAPI .node addons. Scaffold sourced from socket-wheelhouse template + socket-addon as the working reference for the publish-only fleet pattern. publish.mts is stubbed; the generic multi-tool implementation lands as part of task #42/#43 (one generalization in tandem with rolling out across both repos). Initial packages/ is empty until first @socketbin/* binary is published. See .claude/plans/build-publish-handoff.md in socket-btm for the architectural contract (GH-Release → npm-publish handoff).
0 parents  commit 308dcd6

671 files changed

Lines changed: 86741 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/agents/security-reviewer.md

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.claude/commands/audit-gha-settings.md

Lines changed: 54 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.claude/commands/green-ci.md

Lines changed: 63 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.claude/commands/quality-loop.md

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.claude/commands/security-scan.md

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.claude/commands/setup-security-tools.md

Lines changed: 45 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.claude/commands/squash-history.md

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
description: Resolve open GitHub Dependabot security alerts on the current repo via the updating-security skill.
3+
---
4+
5+
Walk open Dependabot security alerts and fix each one — direct
6+
deps via `pnpm update`, transitives via `pnpm.overrides`,
7+
unfixable advisories via principled dismissal. Per-alert atomic
8+
commits with `chore(security): …` titles. Validates with
9+
`pnpm run check`, pushes via the standard push-then-PR fallback
10+
policy. Honors the 7-day soak gate; awaiting-soak alerts surface
11+
in the summary without modification.
12+
13+
Use after `gh` warns "Dependabot found N vulnerabilities" on push,
14+
or whenever the GitHub security tab is non-empty.
15+
16+
Invokes the `updating-security` skill.

.claude/hooks/_shared/README.md

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# acorn-wasm — shared parser for fleet hooks
2+
3+
Vendored from
4+
[`@ultrathink/acorn-monorepo`](https://github.com/SocketDev/ultrathink/tree/main/packages/acorn)'s
5+
Rust → WebAssembly prod build (path:
6+
`packages/acorn/lang/rust/build/prod/darwin-arm64/wasm/out/Final/`).
7+
Pending `@ultrathink/acorn` ship to the npm registry, fleet hooks
8+
that need AST-aware analysis `import` from here.
9+
10+
## Provenance
11+
12+
The three vendored files come straight from the ultrathink prod build:
13+
14+
- `acorn.wasm` — compiled Rust acorn parser, ~3.3 MB.
15+
- `acorn-bindgen.cjs` — wasm-bindgen JS glue.
16+
- `acorn-wasm-sync.mts` — sync ESM loader (no top-level await,
17+
`WebAssembly.Instance` constructed at module import).
18+
19+
The artifact is rebuilt in ultrathink with `pnpm run
20+
build:wasm:node:release` from `packages/acorn/lang/rust`.
21+
22+
## Refreshing
23+
24+
Hooks importing this directory don't need to do anything special —
25+
the cascade keeps the files byte-identical with the ultrathink
26+
canonical source. To pull a newer build:
27+
28+
```bash
29+
# Inside socket-wheelhouse (the canonical source for fleet template):
30+
node scripts/refresh-vendored-acorn.mts
31+
```
32+
33+
The script reads from
34+
`$ULTRATHINK_ROOT/packages/acorn/lang/rust/build/prod/darwin-arm64/wasm/out/Final/`,
35+
copies the three files into this directory, and updates this README's
36+
"Last refreshed" line.
37+
38+
Last refreshed: 2026-05-20 (ultrathink build dated 2026-05-20).
39+
40+
## Public surface
41+
42+
`template/.claude/hooks/_shared/acorn/index.mts` is the canonical
43+
import path for fleet hooks. It re-exports a narrow `tryParse` /
44+
`walkSimple` / `findBareCallsTo` surface — see the module's JSDoc for
45+
the parse-failure tolerance + visitor patterns hook authors rely on.
46+
47+
Don't import `acorn-wasm-sync.mts` directly from hooks; the `index.mts`
48+
wrapper provides the failure-handling + visitor adapters every hook
49+
needs.
50+
51+
## Why vendor instead of `import 'acorn'`
52+
53+
- **No JS parser in the npm dep graph.** Hooks fire on every Edit/Write.
54+
A 3-5 MB JS bundle in `node_modules` adds startup latency and Socket-
55+
score risk on every fleet repo.
56+
- **AST parity with the lint plugin.** Both surfaces (oxlint via plugin
57+
- hook via this loader) use the same acorn semantics — the rules can
58+
share visitor logic without divergence between commit-time and
59+
edit-time.
60+
- **wasm sandbox.** The parser runs in WebAssembly with no filesystem
61+
/ network access — even a malicious source file under analysis can't
62+
reach the host.
63+
64+
Retire this directory once `@ultrathink/acorn` ships and the wheelhouse
65+
catalog can pin it.

0 commit comments

Comments
 (0)