Skip to content

Commit f35d68e

Browse files
committed
chore(sync): cascade fleet template@9ff8d75
Auto-applied by socket-wheelhouse sync-scaffolding into socket-registry. 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 1af9c18 commit f35d68e

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
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

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

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

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

.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
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.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
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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)