sloptimize 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +18 -7
- package/mcp/server.mjs +5 -2
- package/package.json +2 -2
- package/skills/install/SKILL.md +2 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sloptimize",
|
|
3
3
|
"displayName": "sloptimize",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"description": "The agent-native profiler for browser games: always-on incident recording, zero-setup attach with file:line attribution, budgets with exit codes — the agent's senses and ruler for performance work.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": ["profiler", "three.js", "webgpu", "performance", "draw-calls"]
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# sloptimize
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/sloptimize)
|
|
4
|
+
|
|
3
5
|
sloptimize optimizes your game's rendering performance by finding the
|
|
4
6
|
bottlenecks and reporting them to Claude Code to fix — all while you just play
|
|
5
7
|
the game. No action is required on your end.
|
|
@@ -64,12 +66,18 @@ and `sloptimize history` read that ledger back.
|
|
|
64
66
|
|
|
65
67
|
## Install
|
|
66
68
|
|
|
69
|
+
Published on npm as [`sloptimize`](https://www.npmjs.com/package/sloptimize).
|
|
70
|
+
Node 22+.
|
|
71
|
+
|
|
67
72
|
```bash
|
|
68
|
-
npm i -D sloptimize
|
|
69
|
-
#
|
|
70
|
-
# or from a checkout: node sloptimize/bin/sloptimize.mjs … (bare Node, no install)
|
|
73
|
+
npm i -D sloptimize # in your game repo (recommended)
|
|
74
|
+
npx sloptimize --version # confirm: prints the installed version
|
|
71
75
|
```
|
|
72
76
|
|
|
77
|
+
No install at all for a one-off: `npx sloptimize attach --launch http://localhost:3000`.
|
|
78
|
+
Working from a git checkout instead? `node /path/to/sloptimize/bin/sloptimize.mjs …`
|
|
79
|
+
runs on bare Node.
|
|
80
|
+
|
|
73
81
|
Zero dependencies, no postinstall, no supply chain — npm is delivery only.
|
|
74
82
|
|
|
75
83
|
## Quickest start: zero integration (tier 0)
|
|
@@ -164,14 +172,17 @@ top where the engine grants scene access — see `docs/SPEC.md` §4.
|
|
|
164
172
|
|
|
165
173
|
## Claude Code integration — the whole point
|
|
166
174
|
|
|
167
|
-
|
|
175
|
+
The npm package IS a Claude Code plugin — skill, prompt hook, and MCP server
|
|
176
|
+
ship inside it. After `npm i -D sloptimize`, point Claude at it:
|
|
168
177
|
|
|
169
178
|
```bash
|
|
170
|
-
claude --plugin-dir node_modules/sloptimize
|
|
171
|
-
claude --plugin-dir /path/to/sloptimize # from a checkout
|
|
172
|
-
# or via marketplace: /plugin marketplace add m0dE/sloptimize && /plugin install sloptimize
|
|
179
|
+
claude --plugin-dir node_modules/sloptimize
|
|
173
180
|
```
|
|
174
181
|
|
|
182
|
+
Alternatives: `claude --plugin-dir /path/to/sloptimize` from a git checkout,
|
|
183
|
+
or via the marketplace:
|
|
184
|
+
`/plugin marketplace add m0dE/sloptimize` then `/plugin install sloptimize`.
|
|
185
|
+
|
|
175
186
|
Then let the agent wire your game: `/sloptimize:install` walks it through
|
|
176
187
|
the tier-1 integration (runtime, sink, budgets, hooks) and refuses to call
|
|
177
188
|
itself done until the feed is proven live end-to-end.
|
package/mcp/server.mjs
CHANGED
|
@@ -13,9 +13,12 @@
|
|
|
13
13
|
// wake is not a contract this host documents; when it becomes one, the
|
|
14
14
|
// watcher moves here (SPEC-attach §2, delivery edge).
|
|
15
15
|
import { readFileSync, existsSync } from 'node:fs';
|
|
16
|
-
import { join } from 'node:path';
|
|
16
|
+
import { join, dirname } from 'node:path';
|
|
17
|
+
import { fileURLToPath } from 'node:url';
|
|
17
18
|
import { createInterface } from 'node:readline';
|
|
18
19
|
|
|
20
|
+
const PKG_VERSION = JSON.parse(readFileSync(join(dirname(fileURLToPath(import.meta.url)), '..', 'package.json'), 'utf8')).version;
|
|
21
|
+
|
|
19
22
|
const DIR = () => join(process.cwd(), '.sloptimize');
|
|
20
23
|
let attachSession = null;
|
|
21
24
|
|
|
@@ -111,7 +114,7 @@ rl.on('line', (line) => {
|
|
|
111
114
|
try {
|
|
112
115
|
if (msg.method === 'initialize') {
|
|
113
116
|
reply(msg.id, { protocolVersion: msg.params?.protocolVersion ?? '2024-11-05',
|
|
114
|
-
capabilities: { tools: {} }, serverInfo: { name: 'sloptimize', version:
|
|
117
|
+
capabilities: { tools: {} }, serverInfo: { name: 'sloptimize', version: PKG_VERSION } });
|
|
115
118
|
} else if (msg.method === 'tools/list') {
|
|
116
119
|
reply(msg.id, { tools: TOOLS });
|
|
117
120
|
} else if (msg.method === 'tools/call') {
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sloptimize",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "The agent-native profiler for three.js games: an always-on flight recorder, per-entity cost attribution, and a deterministic bench — so a coding agent can measure, attribute, and verify instead of guessing.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"engines": {
|
|
8
|
-
"node": ">=
|
|
8
|
+
"node": ">=22"
|
|
9
9
|
},
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
package/skills/install/SKILL.md
CHANGED
|
@@ -16,7 +16,8 @@ not report success until step 7 shows your test keyframe in
|
|
|
16
16
|
|
|
17
17
|
## 1. Locate the package and the game's shape
|
|
18
18
|
|
|
19
|
-
- Find sloptimize: `node_modules/sloptimize` (npm) or a
|
|
19
|
+
- Find sloptimize: `node_modules/sloptimize` (from `npm i -D sloptimize`) or a
|
|
20
|
+
sibling checkout. If neither exists, install it from npm first.
|
|
20
21
|
- Identify: the render loop's stats site (wherever `renderer.info` is
|
|
21
22
|
already read), the dev-server topology (vite? own server? esbuild?), and
|
|
22
23
|
the dev-only switch the project already uses for debug endpoints.
|