Skip to content

Commit d95673f

Browse files
committed
chore(sync): cascade fleet template@9ff8d75
Auto-applied by socket-wheelhouse sync-scaffolding into vscode-socket-security. 10 file(s) touched: - .claude/hooks/lock-step-ref-guard/index.mts - .claude/hooks/lock-step-ref-guard/test/index.test.mts - .claude/hooks/marketplace-comment-guard/README.md - .claude/hooks/minify-mcp-output/README.md - .claude/hooks/minify-mcp-output/index.mts - .claude/hooks/minify-mcp-output/test/index.test.mts - .claude/hooks/no-file-scope-oxlint-disable-guard/index.mts - .config/oxlint-plugin/lib/fleet-paths.mts - .config/oxlint-plugin/rules/no-file-scope-oxlint-disable.mts - scripts/check-lock-step-refs.mts
1 parent 2ded588 commit d95673f

10 files changed

Lines changed: 93 additions & 112 deletions

File tree

.claude/hooks/lock-step-ref-guard/index.mts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,7 @@ async function main(): Promise<void> {
364364
out.push(
365365
' CI gate: scripts/check-lock-step-refs.mts (run via `pnpm check`).',
366366
)
367-
out.push(
368-
' Bypass: "Allow lock-step bypass" in a recent user message, or',
369-
)
367+
out.push(' Bypass: "Allow lock-step bypass" in a recent user message, or')
370368
out.push(` ${ENV_DISABLE}=1.`)
371369
out.push('')
372370
process.stderr.write(out.join('\n') + '\n')

.claude/hooks/lock-step-ref-guard/test/index.test.mts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ function makeTranscript(userText?: string): string {
1919
return transcriptPath
2020
}
2121

22-
function makeRepo(opts: {
23-
configContent?: string
24-
existingFiles?: readonly string[]
25-
} = {}): string {
22+
function makeRepo(
23+
opts: {
24+
configContent?: string
25+
existingFiles?: readonly string[]
26+
} = {},
27+
): string {
2628
const root = mkdtempSync(path.join(tmpdir(), 'lsrg-repo-'))
2729
if (opts.configContent !== undefined) {
2830
mkdirSync(path.join(root, '.config'), { recursive: true })
@@ -118,7 +120,11 @@ test('ACCEPTS canonical "Lock-step with Go: parser.go" (no config)', () => {
118120
test('ACCEPTS file-level "//! Lock-step from Rust: crates/parser/src/class.rs"', () => {
119121
const content =
120122
'//! Lock-step from Rust: crates/parser/src/class.rs\npackage parser'
121-
const { stderr, exitCode } = runHook('Write', '/repo/src/parser/class.go', content)
123+
const { stderr, exitCode } = runHook(
124+
'Write',
125+
'/repo/src/parser/class.go',
126+
content,
127+
)
122128
assert.equal(exitCode, 0)
123129
assert.equal(stderr, '')
124130
})
@@ -143,7 +149,8 @@ test('FLAGS stale path when config opts in', () => {
143149
extensions: ['.go'],
144150
}),
145151
})
146-
const content = '// Lock-step with Rust: crates/parser-stmt/src/foo.rs\nconst x = 1'
152+
const content =
153+
'// Lock-step with Rust: crates/parser-stmt/src/foo.rs\nconst x = 1'
147154
const { stderr, exitCode } = runHook(
148155
'Write',
149156
path.join(repo, 'src/foo.go'),
@@ -157,7 +164,8 @@ test('FLAGS stale path when config opts in', () => {
157164

158165
test('ACCEPTS stale path when config absent (opt-in disabled)', () => {
159166
const repo = makeRepo() // no config
160-
const content = '// Lock-step with Rust: crates/parser-stmt/src/foo.rs\nconst x = 1'
167+
const content =
168+
'// Lock-step with Rust: crates/parser-stmt/src/foo.rs\nconst x = 1'
161169
const { stderr, exitCode } = runHook(
162170
'Write',
163171
path.join(repo, 'src/foo.go'),

.claude/hooks/marketplace-comment-guard/README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,23 +32,24 @@ against — opaque pins look fine and stay broken for months.
3232
"source": "git-subdir",
3333
"url": "https://github.com/openai/codex-plugin-cc.git",
3434
"ref": "v1.0.1",
35-
"sha": "9cb4fe4099195b2587c402117a3efce6ab5aac78"
36-
}
37-
}
38-
]
35+
"sha": "9cb4fe4099195b2587c402117a3efce6ab5aac78",
36+
},
37+
},
38+
],
3939
}
4040
```
4141

4242
```markdown
4343
<!-- .claude-plugin/README.md -->
44-
| plugin | version | sha | date | notes |
45-
|--------|---------|------------------------------------------|------------|----------------------------------|
46-
| codex | v1.0.1 | 9cb4fe4099195b2587c402117a3efce6ab5aac78 | 2026-05-18 | upstream openai/codex-plugin-cc |
44+
45+
| plugin | version | sha | date | notes |
46+
| ------ | ------- | ---------------------------------------- | ---------- | ------------------------------- |
47+
| codex | v1.0.1 | 9cb4fe4099195b2587c402117a3efce6ab5aac78 | 2026-05-18 | upstream openai/codex-plugin-cc |
4748
```
4849

4950
The first four columns are required and inspected. Any trailing column
5051
(e.g. free-form `notes`) is accepted but not validated. `git blame` is the
51-
authoritative record of *who* bumped a pin, so a `by` column is deliberately
52+
authoritative record of _who_ bumped a pin, so a `by` column is deliberately
5253
absent — duplicating personal identifiers into fleet-canonical files is a
5354
public-surface-hygiene mistake.
5455

.claude/hooks/minify-mcp-output/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ with `mcp__`. For built-in tools, use the proxy instead.
1919

2020
## Stages (identical to socket-token-minifier)
2121

22-
| Stage | What it does |
23-
| ------------- | ------------------------------------------------------------------ |
24-
| `minify` | `JSON.stringify` without indent on JSON-shaped strings. |
25-
| `strip-lines` | Removes ` 42\t` cat -n style line prefixes. |
26-
| `whitespace` | Collapses 3+ blank lines to a single blank line. |
22+
| Stage | What it does |
23+
| ------------- | ------------------------------------------------------- |
24+
| `minify` | `JSON.stringify` without indent on JSON-shaped strings. |
25+
| `strip-lines` | Removes ` 42\t` cat -n style line prefixes. |
26+
| `whitespace` | Collapses 3+ blank lines to a single blank line. |
2727

2828
All are deterministic, information-preserving transforms. No semantic
2929
compression, no ML, no Python.

.claude/hooks/minify-mcp-output/index.mts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,17 @@ function applyStages(text: string): string {
6666
// ---------- Tool-response walker ----------
6767

6868
/**
69-
* Walk an MCP tool_response value and compress text content in place.
70-
* Returns the same structure with strings minified. Non-text content
71-
* (images, structured data we don't recognize) passes through
72-
* unchanged.
69+
* Walk an MCP tool_response value and compress text content in place. Returns
70+
* the same structure with strings minified. Non-text content (images,
71+
* structured data we don't recognize) passes through unchanged.
7372
*
7473
* Shapes we handle:
75-
* - string → minified string.
76-
* - { type: "text", text: string } → minified text.
77-
* - { content: <recurse> }
78-
* - { type: "text", text: string }[] (typical MCP shape).
79-
* - other → passes through.
74+
*
75+
* - String → minified string.
76+
* - { type: "text", text: string } → minified text.
77+
* - { content: <recurse> }
78+
* - { type: "text", text: string }[] (typical MCP shape).
79+
* - Other → passes through.
8080
*/
8181
export function compressMCPOutput(value: unknown): unknown {
8282
if (typeof value === 'string') {

.claude/hooks/minify-mcp-output/test/index.test.mts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ test('compressMCPOutput: minifies text blocks in arrays', () => {
6666

6767
test('compressMCPOutput: walks into nested content fields', () => {
6868
const got = compressMCPOutput({
69-
content: [
70-
{ type: 'text', text: ' 1\tfoo\n' },
71-
],
69+
content: [{ type: 'text', text: ' 1\tfoo\n' }],
7270
})
7371
assert.deepEqual(got, {
7472
content: [{ type: 'text', text: 'foo\n' }],
@@ -129,9 +127,7 @@ test('hook: emits updatedMCPToolOutput for MCP tool with text content', () => {
129127
const { stdout, exitCode } = runHook({
130128
hook_event_name: 'PostToolUse',
131129
tool_name: 'mcp__github__list_repos',
132-
tool_response: [
133-
{ type: 'text', text: ' 1\tfoo\n 2\tbar\n' },
134-
],
130+
tool_response: [{ type: 'text', text: ' 1\tfoo\n 2\tbar\n' }],
135131
})
136132
assert.equal(exitCode, 0)
137133
const parsed = JSON.parse(stdout) as {
@@ -141,7 +137,10 @@ test('hook: emits updatedMCPToolOutput for MCP tool with text content', () => {
141137
}
142138
}
143139
assert.equal(parsed.hookSpecificOutput.hookEventName, 'PostToolUse')
144-
assert.equal(parsed.hookSpecificOutput.updatedMCPToolOutput[0]!.text, 'foo\nbar\n')
140+
assert.equal(
141+
parsed.hookSpecificOutput.updatedMCPToolOutput[0]!.text,
142+
'foo\nbar\n',
143+
)
145144
})
146145

147146
test('hook: emits updatedMCPToolOutput for MCP tool with string-shaped response', () => {

.claude/hooks/no-file-scope-oxlint-disable-guard/index.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ async function main(): Promise<void> {
154154
lines.push(' justification next to the code it covers.')
155155
lines.push('')
156156
lines.push(
157-
'If the entire file legitimately can\'t comply, the file needs a refactor',
157+
"If the entire file legitimately can't comply, the file needs a refactor",
158158
)
159159
lines.push('— not a blanket exemption.')
160160
process.stderr.write(lines.join('\n') + '\n')

.config/oxlint-plugin/lib/fleet-paths.mts

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,32 @@
11
/**
2-
* @file Shared path-suffix constants for fleet-canonical files that any
3-
* plugin rule may need to recognize. Centralizing these out of individual
4-
* rule files lets multiple rules share the same opt-in / opt-out list
5-
* without duplicating the path string + its rationale comment.
6-
*
7-
* Examples of consumers:
2+
* @file Shared path-suffix constants for fleet-canonical files that any plugin
3+
* rule may need to recognize. Centralizing these out of individual rule files
4+
* lets multiple rules share the same opt-in / opt-out list without
5+
* duplicating the path string + its rationale comment. Examples of
6+
* consumers:
87
*
98
* - `no-file-scope-oxlint-disable` exempts `scripts/paths.mts` (deliberate
109
* flow-ordered exports, see PATHS_FILE constant below).
1110
* - `socket/prefer-cached-for-loop` and `socket/no-cached-for-on-iterable`
1211
* share `lib/iterable-kind.mts` for the binding-kind heuristic — sibling
13-
* pattern.
14-
*
15-
* When a new rule needs to recognize one of these path patterns, add the
16-
* import here and use the constant, not a re-spelled literal.
12+
* pattern. When a new rule needs to recognize one of these path patterns,
13+
* add the import here and use the constant, not a re-spelled literal.
1714
*/
1815

1916
/**
2017
* The fleet's "1 path, 1 reference" source-of-truth file. Each fleet repo has
2118
* one. Its exports are ordered by path-resolution flow (REPO_ROOT → primary
22-
* roots → build paths → helpers) — deliberately not alphabetical, and the
23-
* order is load-bearing for code review. Anything keyed on per-file behavior
24-
* that recognizes `paths.mts` should match by suffix.
19+
* roots → build paths → helpers) — deliberately not alphabetical, and the order
20+
* is load-bearing for code review. Anything keyed on per-file behavior that
21+
* recognizes `paths.mts` should match by suffix.
2522
*/
2623
export const PATHS_FILE = 'scripts/paths.mts'
2724

2825
/**
29-
* Plugin-internal rule + test directories. Rule files often contain the
30-
* banned shape they ban as lookup-table data (e.g. `no-status-emoji.mts`
31-
* literally contains the emoji it bans). Same for the matching test files,
32-
* which intentionally exercise the banned shape.
26+
* Plugin-internal rule + test directories. Rule files often contain the banned
27+
* shape they ban as lookup-table data (e.g. `no-status-emoji.mts` literally
28+
* contains the emoji it bans). Same for the matching test files, which
29+
* intentionally exercise the banned shape.
3330
*/
3431
export const PLUGIN_RULE_DIR = '.config/oxlint-plugin/rules/'
3532
export const PLUGIN_TEST_DIR = '.config/oxlint-plugin/test/'

.config/oxlint-plugin/rules/no-file-scope-oxlint-disable.mts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@
2828

2929
// Path-recognition helpers shared with sibling rules. See
3030
// `../lib/fleet-paths.mts` for the rationale behind each exemption.
31-
import {
32-
isPathsModule,
33-
isPluginInternalPath,
34-
} from '../lib/fleet-paths.mts'
31+
import { isPathsModule, isPluginInternalPath } from '../lib/fleet-paths.mts'
3532
import type { AstNode, RuleContext } from '../lib/rule-types.mts'
3633

3734
const FILE_SCOPE_DISABLE_RE =

scripts/check-lock-step-refs.mts

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

0 commit comments

Comments
 (0)