summer-engine 4.0.0 → 4.3.0
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/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +3 -2
- package/.codex-plugin/plugin.json +15 -11
- package/.cursor-plugin/plugin.json +5 -3
- package/.factory-plugin/plugin.json +3 -2
- package/AGENTS.md +2 -2
- package/CHANGELOG.md +48 -0
- package/README.md +21 -10
- package/dist/cli/command-usage.d.ts +8 -0
- package/dist/cli/command-usage.js +22 -0
- package/dist/cli/commands/config.js +3 -2
- package/dist/cli/commands/create.js +12 -3
- package/dist/cli/commands/list.d.ts +5 -0
- package/dist/cli/commands/list.js +30 -13
- package/dist/cli/commands/login.js +1 -1
- package/dist/cli/commands/memory.js +6 -2
- package/dist/cli/commands/ops.d.ts +20 -3
- package/dist/cli/commands/ops.js +60 -27
- package/dist/cli/commands/setup.d.ts +2 -0
- package/dist/cli/commands/setup.js +219 -16
- package/dist/cli/commands/skills.js +20 -7
- package/dist/cli/commands/status.d.ts +26 -0
- package/dist/cli/commands/status.js +36 -21
- package/dist/cli/commands/tool.js +4 -0
- package/dist/cli/index.js +2 -0
- package/dist/core/agent-host.d.ts +3 -0
- package/dist/core/agent-host.js +8 -2
- package/dist/core/capabilities/apps.d.ts +10 -10
- package/dist/core/capabilities/audit/args.d.ts +6 -6
- package/dist/core/capabilities/fabricate-mesh.d.ts +2 -2
- package/dist/core/capabilities/game-task-plan.d.ts +2 -2
- package/dist/core/capabilities/hdri-import.d.ts +2 -2
- package/dist/core/capabilities/motion-generation.d.ts +2 -2
- package/dist/core/capabilities/placement.d.ts +23 -23
- package/dist/core/capabilities/runtime-control.d.ts +38 -38
- package/dist/core/capabilities/seeing/args.d.ts +16 -16
- package/dist/core/capabilities/ui-control.d.ts +2 -2
- package/dist/core/capabilities/world-snapshot.d.ts +4 -4
- package/dist/core/cli-usage-beacon.d.ts +1 -0
- package/dist/core/cli-usage-beacon.js +18 -0
- package/dist/core/cli-usage.d.ts +49 -0
- package/dist/core/cli-usage.js +108 -0
- package/dist/core/feedback/client.d.ts +1 -1
- package/dist/core/feedback/client.js +3 -2
- package/dist/core/hosted-mcp.d.ts +7 -1
- package/dist/core/hosted-mcp.js +6 -4
- package/dist/core/library-search.d.ts +2 -2
- package/dist/core/ops/areas.d.ts +11 -0
- package/dist/core/ops/areas.js +24 -0
- package/dist/core/ops/catalog.d.ts +11 -0
- package/dist/core/ops/catalog.js +24 -1
- package/dist/core/ops/cloud.d.ts +10 -2
- package/dist/core/ops/cloud.js +51 -28
- package/dist/core/ops/contract.d.ts +2 -1
- package/dist/core/ops/contract.js +2 -10
- package/dist/core/ops/public-catalog.d.ts +48 -0
- package/dist/core/ops/public-catalog.js +56 -0
- package/dist/core/ops/search.d.ts +0 -1
- package/dist/core/ops/search.js +169 -37
- package/dist/core/telemetry.d.ts +10 -0
- package/dist/core/telemetry.js +58 -29
- package/dist/installer/agent-config.js +5 -0
- package/dist/installer/agent-table.d.ts +9 -0
- package/dist/installer/agent-table.js +23 -2
- package/dist/installer/cli-permissions.d.ts +65 -0
- package/dist/installer/cli-permissions.js +182 -0
- package/dist/installer/setup.d.ts +2 -0
- package/dist/installer/setup.js +3 -0
- package/dist/installer/skills-refresh.d.ts +29 -0
- package/dist/installer/skills-refresh.js +261 -0
- package/dist/installer/version-check.d.ts +22 -2
- package/dist/installer/version-check.js +66 -9
- package/dist/mcp/ops-surface.js +16 -6
- package/dist/mcp/server.d.ts +10 -0
- package/dist/mcp/server.js +38 -8
- package/dist/project-memory/agent-instructions.d.ts +47 -0
- package/dist/project-memory/agent-instructions.js +226 -0
- package/gemini-extension.json +3 -2
- package/integrations/README.md +1 -1
- package/integrations/claude/README.md +6 -0
- package/integrations/claude/manifest-target.json +4 -0
- package/integrations/gemini/README.md +11 -0
- package/integrations/windsurf/README.md +1 -1
- package/library/skills/3d-lighting/SKILL.md +16 -0
- package/library/skills/README.md +5 -4
- package/library/skills/adaptive-music/SKILL.md +21 -0
- package/library/skills/agent-playtesting/SKILL.md +22 -0
- package/library/skills/ai-characters-in-games/SKILL.md +15 -0
- package/library/skills/ambient-bed/SKILL.md +16 -0
- package/library/skills/animated-loop/SKILL.md +19 -0
- package/library/skills/animation-tree/SKILL.md +26 -0
- package/library/skills/art-direction/SKILL.md +14 -0
- package/library/skills/asset-strategy/SKILL.md +30 -0
- package/library/skills/audio-direction/SKILL.md +16 -0
- package/library/skills/auto-fire-targeting/SKILL.md +14 -0
- package/library/skills/brainstorm-game/SKILL.md +13 -0
- package/library/skills/browse-templates/SKILL.md +10 -0
- package/library/skills/camera-rigs/SKILL.md +20 -0
- package/library/skills/character-animation-wiring/SKILL.md +24 -0
- package/library/skills/character-model/SKILL.md +28 -0
- package/library/skills/character-movement/SKILL.md +24 -0
- package/library/skills/character-portrait/SKILL.md +15 -0
- package/library/skills/cinematic-cutscene/SKILL.md +21 -0
- package/library/skills/combat-basics/SKILL.md +19 -0
- package/library/skills/compatibility-renderer-traps/SKILL.md +11 -0
- package/library/skills/concept-art/SKILL.md +13 -0
- package/library/skills/concept-to-level/SKILL.md +20 -1
- package/library/skills/concept-to-level/resource.yaml +2 -2
- package/library/skills/create-asset-sheet/SKILL.md +18 -0
- package/library/skills/debug/SKILL.md +32 -0
- package/library/skills/debugging-game-feel/SKILL.md +12 -0
- package/library/skills/design-level/SKILL.md +17 -0
- package/library/skills/design-mechanic/SKILL.md +17 -0
- package/library/skills/design-npc/SKILL.md +21 -0
- package/library/skills/diagnosing-perf-regressions/SKILL.md +12 -0
- package/library/skills/driving-the-editor-ui/SKILL.md +23 -0
- package/library/skills/environment-kit/SKILL.md +23 -0
- package/library/skills/export-and-ship/SKILL.md +23 -0
- package/library/skills/fabricating-assets/SKILL.md +23 -0
- package/library/skills/facial-and-lipsync/SKILL.md +22 -0
- package/library/skills/fps-controller/SKILL.md +17 -0
- package/library/skills/game-feel/SKILL.md +26 -0
- package/library/skills/gameskill/SKILL.md +11 -0
- package/library/skills/gdscript-patterns/SKILL.md +15 -0
- package/library/skills/generate-motion/SKILL.md +21 -0
- package/library/skills/godogen-visual-proof-game-generation/SKILL.md +17 -0
- package/library/skills/grow-analytics/SKILL.md +10 -0
- package/library/skills/headless-scripting/SKILL.md +13 -0
- package/library/skills/in-game-purchases/SKILL.md +11 -0
- package/library/skills/instantiate-asset-pack/SKILL.md +17 -0
- package/library/skills/make-game/SKILL.md +29 -0
- package/library/skills/multiplayer/SKILL.md +12 -0
- package/library/skills/multiplayer-movement/SKILL.md +18 -0
- package/library/skills/multiplayer-project/SKILL.md +17 -0
- package/library/skills/multiplayer-publish/SKILL.md +17 -5
- package/library/skills/multiplayer-state/SKILL.md +16 -0
- package/library/skills/multiplayer-testing/SKILL.md +15 -0
- package/library/skills/music-track/SKILL.md +16 -0
- package/library/skills/navigate-summer/SKILL.md +15 -0
- package/library/skills/new-project/SKILL.md +11 -0
- package/library/skills/organic-model/SKILL.md +24 -0
- package/library/skills/pixel-art/SKILL.md +15 -0
- package/library/skills/play/SKILL.md +18 -0
- package/library/skills/playtesting-a-feature/SKILL.md +23 -0
- package/library/skills/procedural-animation/SKILL.md +18 -0
- package/library/skills/prop-model/SKILL.md +23 -0
- package/library/skills/publish-your-game/SKILL.md +27 -0
- package/library/skills/release-readiness/SKILL.md +12 -0
- package/library/skills/remote-deploy/SKILL.md +14 -0
- package/library/skills/retarget/SKILL.md +20 -0
- package/library/skills/running-in-the-cloud/SKILL.md +10 -0
- package/library/skills/save-load/SKILL.md +15 -0
- package/library/skills/scene-composition/SKILL.md +17 -0
- package/library/skills/scene-hierarchy-design/SKILL.md +24 -0
- package/library/skills/scene-scripting/SKILL.md +30 -0
- package/library/skills/scene-to-level/SKILL.md +22 -0
- package/library/skills/skill-test/SKILL.md +10 -0
- package/library/skills/skybox-panorama/SKILL.md +20 -0
- package/library/skills/sound-effect/SKILL.md +23 -0
- package/library/skills/spatial-placement/SKILL.md +30 -0
- package/library/skills/sprite-sheet/SKILL.md +23 -0
- package/library/skills/store-art/SKILL.md +11 -0
- package/library/skills/store-listing/SKILL.md +10 -0
- package/library/skills/summer-analytics/SKILL.md +15 -0
- package/library/skills/summer-apps/SKILL.md +29 -0
- package/library/skills/summer-assets/SKILL.md +31 -1
- package/library/skills/summer-assets/resource.yaml +2 -2
- package/library/skills/summer-cli/SKILL.md +133 -0
- package/library/skills/summer-cli/resource.yaml +31 -0
- package/library/skills/summer-friends/SKILL.md +14 -0
- package/library/skills/summer-leaderboards/SKILL.md +16 -0
- package/library/skills/summer-match-results/SKILL.md +17 -0
- package/library/skills/summer-matchmaking/SKILL.md +17 -0
- package/library/skills/summer-parties/SKILL.md +14 -0
- package/library/skills/summer-player-data/SKILL.md +14 -0
- package/library/skills/summer-store/SKILL.md +15 -0
- package/library/skills/summer-world-chat/SKILL.md +14 -0
- package/library/skills/summer-world-saves/SKILL.md +14 -0
- package/library/skills/text-to-motion/SKILL.md +15 -0
- package/library/skills/tileable-texture/SKILL.md +18 -0
- package/library/skills/trailer-shot/SKILL.md +18 -0
- package/library/skills/tune-performance/SKILL.md +26 -0
- package/library/skills/ui-basics/SKILL.md +14 -0
- package/library/skills/ui-graphics/SKILL.md +17 -0
- package/library/skills/use-widget-asset/SKILL.md +14 -0
- package/library/skills/using-summer/SKILL.md +26 -0
- package/library/skills/using-summer/resource.yaml +2 -1
- package/library/skills/vehicle-model/SKILL.md +27 -0
- package/library/skills/verifying-scenes/SKILL.md +29 -0
- package/library/skills/vfx-dissolve/SKILL.md +19 -0
- package/library/skills/vfx-fire/SKILL.md +26 -0
- package/library/skills/vfx-hit-spark/SKILL.md +23 -0
- package/library/skills/vfx-lightning/SKILL.md +23 -0
- package/library/skills/vfx-magic-glow/SKILL.md +23 -0
- package/library/skills/vfx-muzzle-flash/SKILL.md +23 -0
- package/library/skills/vfx-smoke/SKILL.md +26 -0
- package/library/skills/vfx-water-ripple/SKILL.md +23 -0
- package/library/skills/voice-line/SKILL.md +16 -0
- package/library/skills/web-and-touch-input/SKILL.md +19 -0
- package/library/skills/web-compatibility-look/SKILL.md +20 -0
- package/library/skills/world-building-3d/SKILL.md +28 -0
- package/package.json +3 -2
- package/registry/generated/counts.json +2 -2
- package/registry/generated/gemini-extension.json +3 -2
- package/registry/generated/index.json +157 -118
- package/registry/generated/marketplace.claude.json +2 -2
- package/registry/generated/plugin.claude-directory.json +168 -0
- package/registry/generated/plugin.claude.json +3 -2
- package/registry/generated/plugin.codex.json +15 -11
- package/registry/generated/plugin.cursor.json +5 -3
- package/registry/generated/plugin.factory.json +3 -2
- package/registry/generated/server.json +11 -2
- package/registry/generated/skills-index.md +5 -4
- package/registry/generated/skills-registry.json +16 -2
- package/registry/operations/legacy-names.json +35 -0
- package/registry/operations/public-catalog.json +33160 -0
|
@@ -181,15 +181,15 @@ export declare const runtimeAnimateArgsSchema: z.ZodObject<{
|
|
|
181
181
|
instance: z.ZodOptional<z.ZodString>;
|
|
182
182
|
}, "strip", z.ZodTypeAny, {
|
|
183
183
|
path: string;
|
|
184
|
-
target: "
|
|
184
|
+
target: "player" | "tree" | "bones";
|
|
185
185
|
name?: string | undefined;
|
|
186
186
|
state?: string | undefined;
|
|
187
187
|
value?: string | number | boolean | undefined;
|
|
188
188
|
instance?: string | undefined;
|
|
189
189
|
space?: "local" | "global" | "both" | undefined;
|
|
190
|
-
cmd?: "state" | "pause" | "play" | "
|
|
191
|
-
blend?: number | undefined;
|
|
190
|
+
cmd?: "state" | "pause" | "play" | "start" | "stop" | "seek" | "speed" | "travel" | "set_param" | "get_param" | undefined;
|
|
192
191
|
position?: number | undefined;
|
|
192
|
+
blend?: number | undefined;
|
|
193
193
|
speed?: number | undefined;
|
|
194
194
|
bones?: string[] | undefined;
|
|
195
195
|
from_end?: boolean | undefined;
|
|
@@ -200,15 +200,15 @@ export declare const runtimeAnimateArgsSchema: z.ZodObject<{
|
|
|
200
200
|
include_rest?: boolean | undefined;
|
|
201
201
|
}, {
|
|
202
202
|
path: string;
|
|
203
|
-
target: "
|
|
203
|
+
target: "player" | "tree" | "bones";
|
|
204
204
|
name?: string | undefined;
|
|
205
205
|
state?: string | undefined;
|
|
206
206
|
value?: string | number | boolean | undefined;
|
|
207
207
|
instance?: string | undefined;
|
|
208
208
|
space?: "local" | "global" | "both" | undefined;
|
|
209
|
-
cmd?: "state" | "pause" | "play" | "
|
|
210
|
-
blend?: number | undefined;
|
|
209
|
+
cmd?: "state" | "pause" | "play" | "start" | "stop" | "seek" | "speed" | "travel" | "set_param" | "get_param" | undefined;
|
|
211
210
|
position?: number | undefined;
|
|
211
|
+
blend?: number | undefined;
|
|
212
212
|
speed?: number | undefined;
|
|
213
213
|
bones?: string[] | undefined;
|
|
214
214
|
from_end?: boolean | undefined;
|
|
@@ -227,17 +227,17 @@ export declare const gameControlArgsSchema: z.ZodObject<{
|
|
|
227
227
|
speed: z.ZodOptional<z.ZodNumber>;
|
|
228
228
|
instance: z.ZodOptional<z.ZodString>;
|
|
229
229
|
}, "strip", z.ZodTypeAny, {
|
|
230
|
-
action: "instances" | "pause" | "resume" | "
|
|
230
|
+
action: "instances" | "pause" | "resume" | "step" | "speed";
|
|
231
231
|
instance?: string | undefined;
|
|
232
232
|
kind?: "physics" | "process" | undefined;
|
|
233
|
-
speed?: number | undefined;
|
|
234
233
|
frames?: number | undefined;
|
|
234
|
+
speed?: number | undefined;
|
|
235
235
|
}, {
|
|
236
|
-
action: "instances" | "pause" | "resume" | "
|
|
236
|
+
action: "instances" | "pause" | "resume" | "step" | "speed";
|
|
237
237
|
instance?: string | undefined;
|
|
238
238
|
kind?: "physics" | "process" | undefined;
|
|
239
|
-
speed?: number | undefined;
|
|
240
239
|
frames?: number | undefined;
|
|
240
|
+
speed?: number | undefined;
|
|
241
241
|
}>;
|
|
242
242
|
export type GameControlArgs = z.infer<typeof gameControlArgsSchema>;
|
|
243
243
|
export declare function buildGameControlOp(args: GameControlArgs): BuiltRuntimeOp;
|
|
@@ -259,15 +259,15 @@ export declare const inputEventSchema: z.ZodObject<{
|
|
|
259
259
|
class: z.ZodOptional<z.ZodString>;
|
|
260
260
|
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
261
261
|
}, "strip", z.ZodTypeAny, {
|
|
262
|
-
type: "key" | "action" | "
|
|
262
|
+
type: "key" | "action" | "axis" | "mouse_click" | "raw";
|
|
263
263
|
action?: string | undefined;
|
|
264
|
-
button?: number | undefined;
|
|
265
|
-
class?: string | undefined;
|
|
266
264
|
position?: [number, number] | undefined;
|
|
265
|
+
pressed?: boolean | undefined;
|
|
267
266
|
props?: Record<string, unknown> | undefined;
|
|
267
|
+
button?: number | undefined;
|
|
268
|
+
class?: string | undefined;
|
|
268
269
|
at_frame?: number | undefined;
|
|
269
270
|
at_ms?: number | undefined;
|
|
270
|
-
pressed?: boolean | undefined;
|
|
271
271
|
strength?: number | undefined;
|
|
272
272
|
hold_ms?: number | undefined;
|
|
273
273
|
keycode?: number | undefined;
|
|
@@ -276,15 +276,15 @@ export declare const inputEventSchema: z.ZodObject<{
|
|
|
276
276
|
action_positive?: string | undefined;
|
|
277
277
|
duration_ms?: number | undefined;
|
|
278
278
|
}, {
|
|
279
|
-
type: "key" | "action" | "
|
|
279
|
+
type: "key" | "action" | "axis" | "mouse_click" | "raw";
|
|
280
280
|
action?: string | undefined;
|
|
281
|
-
button?: number | undefined;
|
|
282
|
-
class?: string | undefined;
|
|
283
281
|
position?: [number, number] | undefined;
|
|
282
|
+
pressed?: boolean | undefined;
|
|
284
283
|
props?: Record<string, unknown> | undefined;
|
|
284
|
+
button?: number | undefined;
|
|
285
|
+
class?: string | undefined;
|
|
285
286
|
at_frame?: number | undefined;
|
|
286
287
|
at_ms?: number | undefined;
|
|
287
|
-
pressed?: boolean | undefined;
|
|
288
288
|
strength?: number | undefined;
|
|
289
289
|
hold_ms?: number | undefined;
|
|
290
290
|
keycode?: number | undefined;
|
|
@@ -314,15 +314,15 @@ export declare const gameInputArgsSchema: z.ZodObject<{
|
|
|
314
314
|
class: z.ZodOptional<z.ZodString>;
|
|
315
315
|
props: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
316
316
|
}, "strip", z.ZodTypeAny, {
|
|
317
|
-
type: "key" | "action" | "
|
|
317
|
+
type: "key" | "action" | "axis" | "mouse_click" | "raw";
|
|
318
318
|
action?: string | undefined;
|
|
319
|
-
button?: number | undefined;
|
|
320
|
-
class?: string | undefined;
|
|
321
319
|
position?: [number, number] | undefined;
|
|
320
|
+
pressed?: boolean | undefined;
|
|
322
321
|
props?: Record<string, unknown> | undefined;
|
|
322
|
+
button?: number | undefined;
|
|
323
|
+
class?: string | undefined;
|
|
323
324
|
at_frame?: number | undefined;
|
|
324
325
|
at_ms?: number | undefined;
|
|
325
|
-
pressed?: boolean | undefined;
|
|
326
326
|
strength?: number | undefined;
|
|
327
327
|
hold_ms?: number | undefined;
|
|
328
328
|
keycode?: number | undefined;
|
|
@@ -331,15 +331,15 @@ export declare const gameInputArgsSchema: z.ZodObject<{
|
|
|
331
331
|
action_positive?: string | undefined;
|
|
332
332
|
duration_ms?: number | undefined;
|
|
333
333
|
}, {
|
|
334
|
-
type: "key" | "action" | "
|
|
334
|
+
type: "key" | "action" | "axis" | "mouse_click" | "raw";
|
|
335
335
|
action?: string | undefined;
|
|
336
|
-
button?: number | undefined;
|
|
337
|
-
class?: string | undefined;
|
|
338
336
|
position?: [number, number] | undefined;
|
|
337
|
+
pressed?: boolean | undefined;
|
|
339
338
|
props?: Record<string, unknown> | undefined;
|
|
339
|
+
button?: number | undefined;
|
|
340
|
+
class?: string | undefined;
|
|
340
341
|
at_frame?: number | undefined;
|
|
341
342
|
at_ms?: number | undefined;
|
|
342
|
-
pressed?: boolean | undefined;
|
|
343
343
|
strength?: number | undefined;
|
|
344
344
|
hold_ms?: number | undefined;
|
|
345
345
|
keycode?: number | undefined;
|
|
@@ -358,15 +358,15 @@ export declare const gameInputArgsSchema: z.ZodObject<{
|
|
|
358
358
|
}, "strip", z.ZodTypeAny, {
|
|
359
359
|
action: "script" | "record_start" | "record_stop" | "replay";
|
|
360
360
|
events?: {
|
|
361
|
-
type: "key" | "action" | "
|
|
361
|
+
type: "key" | "action" | "axis" | "mouse_click" | "raw";
|
|
362
362
|
action?: string | undefined;
|
|
363
|
-
button?: number | undefined;
|
|
364
|
-
class?: string | undefined;
|
|
365
363
|
position?: [number, number] | undefined;
|
|
364
|
+
pressed?: boolean | undefined;
|
|
366
365
|
props?: Record<string, unknown> | undefined;
|
|
366
|
+
button?: number | undefined;
|
|
367
|
+
class?: string | undefined;
|
|
367
368
|
at_frame?: number | undefined;
|
|
368
369
|
at_ms?: number | undefined;
|
|
369
|
-
pressed?: boolean | undefined;
|
|
370
370
|
strength?: number | undefined;
|
|
371
371
|
hold_ms?: number | undefined;
|
|
372
372
|
keycode?: number | undefined;
|
|
@@ -385,15 +385,15 @@ export declare const gameInputArgsSchema: z.ZodObject<{
|
|
|
385
385
|
}, {
|
|
386
386
|
action: "script" | "record_start" | "record_stop" | "replay";
|
|
387
387
|
events?: {
|
|
388
|
-
type: "key" | "action" | "
|
|
388
|
+
type: "key" | "action" | "axis" | "mouse_click" | "raw";
|
|
389
389
|
action?: string | undefined;
|
|
390
|
-
button?: number | undefined;
|
|
391
|
-
class?: string | undefined;
|
|
392
390
|
position?: [number, number] | undefined;
|
|
391
|
+
pressed?: boolean | undefined;
|
|
393
392
|
props?: Record<string, unknown> | undefined;
|
|
393
|
+
button?: number | undefined;
|
|
394
|
+
class?: string | undefined;
|
|
394
395
|
at_frame?: number | undefined;
|
|
395
396
|
at_ms?: number | undefined;
|
|
396
|
-
pressed?: boolean | undefined;
|
|
397
397
|
strength?: number | undefined;
|
|
398
398
|
hold_ms?: number | undefined;
|
|
399
399
|
keycode?: number | undefined;
|
|
@@ -436,23 +436,23 @@ export declare const gameProbeArgsSchema: z.ZodObject<{
|
|
|
436
436
|
instance: z.ZodOptional<z.ZodString>;
|
|
437
437
|
}, "strip", z.ZodTypeAny, {
|
|
438
438
|
instance?: string | undefined;
|
|
439
|
+
props?: string[] | undefined;
|
|
440
|
+
screenshot?: boolean | undefined;
|
|
439
441
|
tree?: {
|
|
440
442
|
path?: string | undefined;
|
|
441
443
|
limit?: number | undefined;
|
|
442
444
|
depth?: number | undefined;
|
|
443
445
|
} | undefined;
|
|
444
|
-
props?: string[] | undefined;
|
|
445
|
-
screenshot?: boolean | undefined;
|
|
446
446
|
max_dim?: number | undefined;
|
|
447
447
|
}, {
|
|
448
448
|
instance?: string | undefined;
|
|
449
|
+
props?: string[] | undefined;
|
|
450
|
+
screenshot?: boolean | undefined;
|
|
449
451
|
tree?: {
|
|
450
452
|
path?: string | undefined;
|
|
451
453
|
limit?: number | undefined;
|
|
452
454
|
depth?: number | undefined;
|
|
453
455
|
} | undefined;
|
|
454
|
-
props?: string[] | undefined;
|
|
455
|
-
screenshot?: boolean | undefined;
|
|
456
456
|
max_dim?: number | undefined;
|
|
457
457
|
}>;
|
|
458
458
|
export type GameProbeArgs = z.infer<typeof gameProbeArgsSchema>;
|
|
@@ -124,10 +124,10 @@ export declare const frameNodesArgsSchema: z.ZodObject<{
|
|
|
124
124
|
marks?: boolean | undefined;
|
|
125
125
|
max_marks?: number | undefined;
|
|
126
126
|
from?: string | undefined;
|
|
127
|
-
|
|
127
|
+
direction?: "top" | "front" | "iso" | "back" | "left" | "right" | undefined;
|
|
128
128
|
bookmark_name?: string | undefined;
|
|
129
|
+
max_size?: number | undefined;
|
|
129
130
|
aspect?: number | undefined;
|
|
130
|
-
direction?: "top" | "iso" | "front" | "back" | "left" | "right" | undefined;
|
|
131
131
|
}, {
|
|
132
132
|
nodes: string[];
|
|
133
133
|
fill?: number | undefined;
|
|
@@ -136,10 +136,10 @@ export declare const frameNodesArgsSchema: z.ZodObject<{
|
|
|
136
136
|
marks?: boolean | undefined;
|
|
137
137
|
max_marks?: number | undefined;
|
|
138
138
|
from?: string | undefined;
|
|
139
|
-
|
|
139
|
+
direction?: "top" | "front" | "iso" | "back" | "left" | "right" | undefined;
|
|
140
140
|
bookmark_name?: string | undefined;
|
|
141
|
+
max_size?: number | undefined;
|
|
141
142
|
aspect?: number | undefined;
|
|
142
|
-
direction?: "top" | "iso" | "front" | "back" | "left" | "right" | undefined;
|
|
143
143
|
}>;
|
|
144
144
|
export declare const shotSheetArgsSchema: z.ZodObject<{
|
|
145
145
|
scenePath: z.ZodOptional<z.ZodString>;
|
|
@@ -177,12 +177,12 @@ export declare const shotSheetArgsSchema: z.ZodObject<{
|
|
|
177
177
|
bookmark_name?: string | undefined;
|
|
178
178
|
}[];
|
|
179
179
|
scenePath?: string | undefined;
|
|
180
|
+
compare_previous?: boolean | undefined;
|
|
180
181
|
max_size?: number | undefined;
|
|
181
182
|
save_to?: string | undefined;
|
|
182
183
|
view?: "lighting" | "beauty" | "unshaded" | "normals" | "overdraw" | "wireframe" | undefined;
|
|
183
184
|
update_previous?: boolean | undefined;
|
|
184
185
|
aspect?: number | undefined;
|
|
185
|
-
compare_previous?: boolean | undefined;
|
|
186
186
|
}, {
|
|
187
187
|
shots: {
|
|
188
188
|
camera_position?: string | undefined;
|
|
@@ -192,12 +192,12 @@ export declare const shotSheetArgsSchema: z.ZodObject<{
|
|
|
192
192
|
bookmark_name?: string | undefined;
|
|
193
193
|
}[];
|
|
194
194
|
scenePath?: string | undefined;
|
|
195
|
+
compare_previous?: boolean | undefined;
|
|
195
196
|
max_size?: number | undefined;
|
|
196
197
|
save_to?: string | undefined;
|
|
197
198
|
view?: "lighting" | "beauty" | "unshaded" | "normals" | "overdraw" | "wireframe" | undefined;
|
|
198
199
|
update_previous?: boolean | undefined;
|
|
199
200
|
aspect?: number | undefined;
|
|
200
|
-
compare_previous?: boolean | undefined;
|
|
201
201
|
}>;
|
|
202
202
|
export declare const debugViewsArgsSchema: z.ZodObject<{
|
|
203
203
|
scenePath: z.ZodOptional<z.ZodString>;
|
|
@@ -215,9 +215,9 @@ export declare const debugViewsArgsSchema: z.ZodObject<{
|
|
|
215
215
|
camera_position?: string | undefined;
|
|
216
216
|
camera_look_at?: string | undefined;
|
|
217
217
|
fov?: number | undefined;
|
|
218
|
+
bookmark_name?: string | undefined;
|
|
218
219
|
max_size?: number | undefined;
|
|
219
220
|
save_to?: string | undefined;
|
|
220
|
-
bookmark_name?: string | undefined;
|
|
221
221
|
views?: ("lighting" | "beauty" | "unshaded" | "normals" | "overdraw" | "wireframe")[] | undefined;
|
|
222
222
|
update_previous?: boolean | undefined;
|
|
223
223
|
aspect?: number | undefined;
|
|
@@ -226,9 +226,9 @@ export declare const debugViewsArgsSchema: z.ZodObject<{
|
|
|
226
226
|
camera_position?: string | undefined;
|
|
227
227
|
camera_look_at?: string | undefined;
|
|
228
228
|
fov?: number | undefined;
|
|
229
|
+
bookmark_name?: string | undefined;
|
|
229
230
|
max_size?: number | undefined;
|
|
230
231
|
save_to?: string | undefined;
|
|
231
|
-
bookmark_name?: string | undefined;
|
|
232
232
|
views?: ("lighting" | "beauty" | "unshaded" | "normals" | "overdraw" | "wireframe")[] | undefined;
|
|
233
233
|
update_previous?: boolean | undefined;
|
|
234
234
|
aspect?: number | undefined;
|
|
@@ -251,11 +251,11 @@ export declare const zoomArgsSchema: z.ZodObject<{
|
|
|
251
251
|
camera_position?: string | undefined;
|
|
252
252
|
camera_look_at?: string | undefined;
|
|
253
253
|
fov?: number | undefined;
|
|
254
|
+
bookmark_name?: string | undefined;
|
|
255
|
+
region?: number[] | undefined;
|
|
254
256
|
max_size?: number | undefined;
|
|
255
257
|
save_to?: string | undefined;
|
|
256
|
-
bookmark_name?: string | undefined;
|
|
257
258
|
view?: "lighting" | "beauty" | "unshaded" | "normals" | "overdraw" | "wireframe" | undefined;
|
|
258
|
-
region?: number[] | undefined;
|
|
259
259
|
mark?: number | undefined;
|
|
260
260
|
reference_size?: number[] | undefined;
|
|
261
261
|
pad?: number | undefined;
|
|
@@ -264,11 +264,11 @@ export declare const zoomArgsSchema: z.ZodObject<{
|
|
|
264
264
|
camera_position?: string | undefined;
|
|
265
265
|
camera_look_at?: string | undefined;
|
|
266
266
|
fov?: number | undefined;
|
|
267
|
+
bookmark_name?: string | undefined;
|
|
268
|
+
region?: number[] | undefined;
|
|
267
269
|
max_size?: number | undefined;
|
|
268
270
|
save_to?: string | undefined;
|
|
269
|
-
bookmark_name?: string | undefined;
|
|
270
271
|
view?: "lighting" | "beauty" | "unshaded" | "normals" | "overdraw" | "wireframe" | undefined;
|
|
271
|
-
region?: number[] | undefined;
|
|
272
272
|
mark?: number | undefined;
|
|
273
273
|
reference_size?: number[] | undefined;
|
|
274
274
|
pad?: number | undefined;
|
|
@@ -310,8 +310,9 @@ export declare const frameShotArgsSchema: z.ZodObject<{
|
|
|
310
310
|
spawn?: string | undefined;
|
|
311
311
|
scenePath?: string | undefined;
|
|
312
312
|
fov?: number | undefined;
|
|
313
|
-
max_size?: number | undefined;
|
|
314
313
|
bookmark_name?: string | undefined;
|
|
314
|
+
subject?: string[] | undefined;
|
|
315
|
+
max_size?: number | undefined;
|
|
315
316
|
render?: "none" | "sheet" | "best" | undefined;
|
|
316
317
|
aspect?: number | undefined;
|
|
317
318
|
occluders?: {
|
|
@@ -321,7 +322,6 @@ export declare const frameShotArgsSchema: z.ZodObject<{
|
|
|
321
322
|
hard_layers?: number | undefined;
|
|
322
323
|
soft_layers?: number | undefined;
|
|
323
324
|
} | undefined;
|
|
324
|
-
subject?: string[] | undefined;
|
|
325
325
|
eye_height?: number | undefined;
|
|
326
326
|
max_soft_fraction?: number | undefined;
|
|
327
327
|
save_bookmark?: boolean | undefined;
|
|
@@ -330,8 +330,9 @@ export declare const frameShotArgsSchema: z.ZodObject<{
|
|
|
330
330
|
spawn?: string | undefined;
|
|
331
331
|
scenePath?: string | undefined;
|
|
332
332
|
fov?: number | undefined;
|
|
333
|
-
max_size?: number | undefined;
|
|
334
333
|
bookmark_name?: string | undefined;
|
|
334
|
+
subject?: string[] | undefined;
|
|
335
|
+
max_size?: number | undefined;
|
|
335
336
|
render?: "none" | "sheet" | "best" | undefined;
|
|
336
337
|
aspect?: number | undefined;
|
|
337
338
|
occluders?: {
|
|
@@ -341,7 +342,6 @@ export declare const frameShotArgsSchema: z.ZodObject<{
|
|
|
341
342
|
hard_layers?: number | undefined;
|
|
342
343
|
soft_layers?: number | undefined;
|
|
343
344
|
} | undefined;
|
|
344
|
-
subject?: string[] | undefined;
|
|
345
345
|
eye_height?: number | undefined;
|
|
346
346
|
max_soft_fraction?: number | undefined;
|
|
347
347
|
save_bookmark?: boolean | undefined;
|
|
@@ -90,7 +90,7 @@ export declare const uiActivateArgsSchema: z.ZodObject<{
|
|
|
90
90
|
value?: string | number | undefined;
|
|
91
91
|
title?: string | undefined;
|
|
92
92
|
path?: string | undefined;
|
|
93
|
-
action?: "focus" | "press" | "
|
|
93
|
+
action?: "focus" | "press" | "select_tab" | "toggle" | "set_text" | "set_value" | "dismiss_dialog" | undefined;
|
|
94
94
|
button?: string | undefined;
|
|
95
95
|
index?: number | undefined;
|
|
96
96
|
submit?: boolean | undefined;
|
|
@@ -98,7 +98,7 @@ export declare const uiActivateArgsSchema: z.ZodObject<{
|
|
|
98
98
|
value?: string | number | undefined;
|
|
99
99
|
title?: string | undefined;
|
|
100
100
|
path?: string | undefined;
|
|
101
|
-
action?: "focus" | "press" | "
|
|
101
|
+
action?: "focus" | "press" | "select_tab" | "toggle" | "set_text" | "set_value" | "dismiss_dialog" | undefined;
|
|
102
102
|
button?: string | undefined;
|
|
103
103
|
index?: number | undefined;
|
|
104
104
|
submit?: boolean | undefined;
|
|
@@ -38,18 +38,18 @@ export declare const worldSnapshotInputSchema: z.ZodObject<{
|
|
|
38
38
|
fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
39
39
|
}, "strict", z.ZodTypeAny, {
|
|
40
40
|
scene_path?: string | undefined;
|
|
41
|
+
fields?: string[] | undefined;
|
|
42
|
+
path_prefix?: string | undefined;
|
|
41
43
|
offset?: number | undefined;
|
|
42
44
|
max_nodes?: number | undefined;
|
|
43
|
-
path_prefix?: string | undefined;
|
|
44
45
|
classes?: string[] | undefined;
|
|
45
|
-
fields?: string[] | undefined;
|
|
46
46
|
}, {
|
|
47
47
|
scene_path?: string | undefined;
|
|
48
|
+
fields?: string[] | undefined;
|
|
49
|
+
path_prefix?: string | undefined;
|
|
48
50
|
offset?: number | undefined;
|
|
49
51
|
max_nodes?: number | undefined;
|
|
50
|
-
path_prefix?: string | undefined;
|
|
51
52
|
classes?: string[] | undefined;
|
|
52
|
-
fields?: string[] | undefined;
|
|
53
53
|
}>;
|
|
54
54
|
export type WorldSnapshotArgs = z.infer<typeof worldSnapshotInputSchema>;
|
|
55
55
|
export declare function buildWorldSnapshotOp(args: WorldSnapshotArgs): JsonRecord;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The detached child cli-usage.ts starts when a CLI command exits: it sends
|
|
3
|
+
* that command's one usage line (argv[2], JSON) and exits. It prints nothing.
|
|
4
|
+
*/
|
|
5
|
+
import { postUsage } from "./telemetry.js";
|
|
6
|
+
// A hard cap: an abort does not cancel a TLS connect that hangs, so the
|
|
7
|
+
// child never lives past 3 s, whatever the network does.
|
|
8
|
+
setTimeout(() => process.exit(0), 3000).unref();
|
|
9
|
+
void (async () => {
|
|
10
|
+
try {
|
|
11
|
+
const body = JSON.parse(process.argv[2] ?? "");
|
|
12
|
+
if (body && typeof body === "object" && !Array.isArray(body))
|
|
13
|
+
await postUsage(body, 1500);
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
// best-effort: a bad body or an unreachable server sends nothing
|
|
17
|
+
}
|
|
18
|
+
})();
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The usage line for CLI commands that run on this computer (`summer create`,
|
|
3
|
+
* `summer skills install`, `summer engine play`, a local `summer tool`, ...),
|
|
4
|
+
* in the schema of the MCP tool-call line (telemetry.ts) with surface `cli`:
|
|
5
|
+
* one per command run by a signed-in person, with the tool (`summer_call`
|
|
6
|
+
* plus the operation for `summer <area> <action>`, the summer_* tool for
|
|
7
|
+
* `summer tool`, else the command name), success or the error code, duration
|
|
8
|
+
* and the agent app named in the environment. Never arguments, paths or
|
|
9
|
+
* project content. Off with SUMMER_NO_TELEMETRY=1 or DO_NOT_TRACK=1; nothing
|
|
10
|
+
* at all when no account token is on disk or in SUMMER_TOKEN. A command that
|
|
11
|
+
* ran on Summer's server (a cloud operation, a hosted `summer tool`) sends no
|
|
12
|
+
* line: the server records it from the request's `X-Summer-Client-Surface: cli`.
|
|
13
|
+
*
|
|
14
|
+
* It costs the command nothing: when the process exits, a detached child
|
|
15
|
+
* (cli-usage-beacon.ts) sends the line, so no command waits for Summer's
|
|
16
|
+
* server, prints anything, or loses the line to process.exit().
|
|
17
|
+
*/
|
|
18
|
+
import { spawn } from "node:child_process";
|
|
19
|
+
interface Pending {
|
|
20
|
+
tool: string;
|
|
21
|
+
op?: string;
|
|
22
|
+
error?: string;
|
|
23
|
+
startedAt: number;
|
|
24
|
+
/** It ran on Summer's server, which records it. */
|
|
25
|
+
hosted?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/** The command path as a tool name: `summer skills install` -> `skills_install`. */
|
|
28
|
+
export declare function cliCommandName(path: readonly string[]): string;
|
|
29
|
+
/**
|
|
30
|
+
* Start timing one command; the line goes out when the process exits. Once
|
|
31
|
+
* per process. An operation (`summer <area> <action>`, `whoami`) reports as
|
|
32
|
+
* `summer_call` with that operation; any other command as its own name.
|
|
33
|
+
*/
|
|
34
|
+
export declare function startCliCommand(command: string, op?: string, now?: number): void;
|
|
35
|
+
/** `summer tool <name>` ran this local summer_* tool: report it under its own name. */
|
|
36
|
+
export declare function noteCliTool(tool: string): void;
|
|
37
|
+
/** The command ran on Summer's server, which records it: send no line. */
|
|
38
|
+
export declare function noteCliHosted(): void;
|
|
39
|
+
/** The command failed with this error code (an operation answer's `error.code`). */
|
|
40
|
+
export declare function noteCliError(code: string): void;
|
|
41
|
+
/** The line's body: no arguments, paths or project content can reach it. */
|
|
42
|
+
export declare function cliUsageBody(started: Pending, exitCode: number, now?: number, env?: NodeJS.ProcessEnv): Record<string, unknown>;
|
|
43
|
+
export declare function sendCliUsage(exitCode: number, deps?: {
|
|
44
|
+
spawn?: typeof spawn;
|
|
45
|
+
signedIn?: () => boolean;
|
|
46
|
+
}): void;
|
|
47
|
+
/** Test-only: forget the command in progress. */
|
|
48
|
+
export declare function _resetCliUsageForTests(): void;
|
|
49
|
+
export {};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The usage line for CLI commands that run on this computer (`summer create`,
|
|
3
|
+
* `summer skills install`, `summer engine play`, a local `summer tool`, ...),
|
|
4
|
+
* in the schema of the MCP tool-call line (telemetry.ts) with surface `cli`:
|
|
5
|
+
* one per command run by a signed-in person, with the tool (`summer_call`
|
|
6
|
+
* plus the operation for `summer <area> <action>`, the summer_* tool for
|
|
7
|
+
* `summer tool`, else the command name), success or the error code, duration
|
|
8
|
+
* and the agent app named in the environment. Never arguments, paths or
|
|
9
|
+
* project content. Off with SUMMER_NO_TELEMETRY=1 or DO_NOT_TRACK=1; nothing
|
|
10
|
+
* at all when no account token is on disk or in SUMMER_TOKEN. A command that
|
|
11
|
+
* ran on Summer's server (a cloud operation, a hosted `summer tool`) sends no
|
|
12
|
+
* line: the server records it from the request's `X-Summer-Client-Surface: cli`.
|
|
13
|
+
*
|
|
14
|
+
* It costs the command nothing: when the process exits, a detached child
|
|
15
|
+
* (cli-usage-beacon.ts) sends the line, so no command waits for Summer's
|
|
16
|
+
* server, prints anything, or loses the line to process.exit().
|
|
17
|
+
*/
|
|
18
|
+
import { spawn } from "node:child_process";
|
|
19
|
+
import { existsSync } from "node:fs";
|
|
20
|
+
import { join } from "node:path";
|
|
21
|
+
import { fileURLToPath } from "node:url";
|
|
22
|
+
import { isTelemetryDisabled, resolveAgentHost } from "./agent-host.js";
|
|
23
|
+
import { hasEnvAuthToken } from "./auth.js";
|
|
24
|
+
import { OP_NAME } from "./ops/contract.js";
|
|
25
|
+
import { getSummerDir } from "./store.js";
|
|
26
|
+
/** What the server accepts as a tool: `summer_call`, `summer_play`, `create`, `skills_install`. */
|
|
27
|
+
const TOOL = /^[a-z][a-z0-9_]{0,79}$/;
|
|
28
|
+
const ERROR_CODE = /^[a-z][a-z0-9_]{0,63}$/;
|
|
29
|
+
const BEACON = fileURLToPath(new URL("./cli-usage-beacon.js", import.meta.url));
|
|
30
|
+
let pending = null;
|
|
31
|
+
/** The command path as a tool name: `summer skills install` -> `skills_install`. */
|
|
32
|
+
export function cliCommandName(path) {
|
|
33
|
+
return path.map((word) => word.toLowerCase().replace(/-/g, "_")).join("_");
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Start timing one command; the line goes out when the process exits. Once
|
|
37
|
+
* per process. An operation (`summer <area> <action>`, `whoami`) reports as
|
|
38
|
+
* `summer_call` with that operation; any other command as its own name.
|
|
39
|
+
*/
|
|
40
|
+
export function startCliCommand(command, op, now = Date.now()) {
|
|
41
|
+
if (pending || isTelemetryDisabled())
|
|
42
|
+
return;
|
|
43
|
+
const isOp = op !== undefined && OP_NAME.test(op);
|
|
44
|
+
const tool = isOp ? "summer_call" : command;
|
|
45
|
+
if (!TOOL.test(tool))
|
|
46
|
+
return;
|
|
47
|
+
pending = { tool, ...(isOp ? { op } : {}), startedAt: now };
|
|
48
|
+
process.once("exit", (code) => sendCliUsage(code));
|
|
49
|
+
}
|
|
50
|
+
/** `summer tool <name>` ran this local summer_* tool: report it under its own name. */
|
|
51
|
+
export function noteCliTool(tool) {
|
|
52
|
+
if (pending && /^summer_[a-z0-9_]{1,72}$/.test(tool)) {
|
|
53
|
+
pending.tool = tool;
|
|
54
|
+
delete pending.op;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/** The command ran on Summer's server, which records it: send no line. */
|
|
58
|
+
export function noteCliHosted() {
|
|
59
|
+
if (pending)
|
|
60
|
+
pending.hosted = true;
|
|
61
|
+
}
|
|
62
|
+
/** The command failed with this error code (an operation answer's `error.code`). */
|
|
63
|
+
export function noteCliError(code) {
|
|
64
|
+
if (pending && ERROR_CODE.test(code))
|
|
65
|
+
pending.error = code;
|
|
66
|
+
}
|
|
67
|
+
/** The line's body: no arguments, paths or project content can reach it. */
|
|
68
|
+
export function cliUsageBody(started, exitCode, now = Date.now(), env = process.env) {
|
|
69
|
+
const ok = exitCode === 0 && !started.error;
|
|
70
|
+
return {
|
|
71
|
+
client: "summer-cli",
|
|
72
|
+
event: "mcp_tool_call",
|
|
73
|
+
surface: "cli",
|
|
74
|
+
tool: started.tool,
|
|
75
|
+
...(started.op ? { op: started.op } : {}),
|
|
76
|
+
ok,
|
|
77
|
+
...(ok ? {} : { error: started.error ?? `exit_${exitCode}` }),
|
|
78
|
+
durationMs: Math.max(0, Math.round(now - started.startedAt)),
|
|
79
|
+
mcpClient: resolveAgentHost(env, undefined).id,
|
|
80
|
+
surfaceVersion: "v4",
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/** A token on disk or in the environment; the child reads it, the parent only checks it is there. */
|
|
84
|
+
function signedIn() {
|
|
85
|
+
return hasEnvAuthToken() || existsSync(join(getSummerDir(), "auth-token"));
|
|
86
|
+
}
|
|
87
|
+
export function sendCliUsage(exitCode, deps = {}) {
|
|
88
|
+
const started = pending;
|
|
89
|
+
pending = null;
|
|
90
|
+
if (!started || started.hosted || isTelemetryDisabled() || !(deps.signedIn ?? signedIn)())
|
|
91
|
+
return;
|
|
92
|
+
try {
|
|
93
|
+
(deps.spawn ?? spawn)(process.execPath, [BEACON, JSON.stringify(cliUsageBody(started, exitCode))], {
|
|
94
|
+
detached: true,
|
|
95
|
+
stdio: "ignore",
|
|
96
|
+
windowsHide: true,
|
|
97
|
+
// A debugger flag (--inspect-brk) would make the child wait forever.
|
|
98
|
+
env: { ...process.env, NODE_OPTIONS: (process.env.NODE_OPTIONS ?? "").replace(/--inspect\S*/g, "").trim() },
|
|
99
|
+
}).unref();
|
|
100
|
+
}
|
|
101
|
+
catch {
|
|
102
|
+
// never throws: usage is best-effort
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/** Test-only: forget the command in progress. */
|
|
106
|
+
export function _resetCliUsageForTests() {
|
|
107
|
+
pending = null;
|
|
108
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare function getFeedbackSessionId(): string;
|
|
2
2
|
/** Test-only seam. */
|
|
3
3
|
export declare function _resetFeedbackSessionForTests(): void;
|
|
4
|
-
/** Kill switches: send NOTHING when either is set
|
|
4
|
+
/** Kill switches: send NOTHING when either is set (1, true, yes or on; agent-host.ts). */
|
|
5
5
|
export declare function isFeedbackDisabled(): boolean;
|
|
6
6
|
/**
|
|
7
7
|
* Anonymous install id: a random uuid persisted once in ~/.summer/.
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
* nothing is logged on failure — silence is the contract.
|
|
22
22
|
*/
|
|
23
23
|
import { randomUUID } from "node:crypto";
|
|
24
|
+
import { isTelemetryDisabled } from "../agent-host.js";
|
|
24
25
|
import { getAuthToken } from "../auth.js";
|
|
25
26
|
import { resolveGatewayUrl } from "../config.js";
|
|
26
27
|
import { readStoreText, writeStoreText } from "../store.js";
|
|
@@ -43,9 +44,9 @@ export function _resetFeedbackSessionForTests() {
|
|
|
43
44
|
async function feedbackUrl() {
|
|
44
45
|
return `${await resolveGatewayUrl()}${FEEDBACK_PATH}`;
|
|
45
46
|
}
|
|
46
|
-
/** Kill switches: send NOTHING when either is set
|
|
47
|
+
/** Kill switches: send NOTHING when either is set (1, true, yes or on; agent-host.ts). */
|
|
47
48
|
export function isFeedbackDisabled() {
|
|
48
|
-
return (
|
|
49
|
+
return isTelemetryDisabled();
|
|
49
50
|
}
|
|
50
51
|
/**
|
|
51
52
|
* Anonymous install id: a random uuid persisted once in ~/.summer/.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
2
2
|
import { OAuthError } from "./oauth.js";
|
|
3
|
+
import { type ClientSurface } from "./agent-host.js";
|
|
3
4
|
/** The part of an MCP client the mount and the CLI use (a fake in tests). */
|
|
4
5
|
export interface HostedClient {
|
|
5
6
|
listTools(params?: {
|
|
@@ -54,7 +55,12 @@ export interface HostedConnectDependencies {
|
|
|
54
55
|
token: () => Promise<string>;
|
|
55
56
|
connect: (url: string, token: () => Promise<string>) => Promise<HostedClient>;
|
|
56
57
|
}
|
|
57
|
-
|
|
58
|
+
/** The handshake name the hosted server sees: the MCP server's own, or the `summer` CLI's, so usage tells them apart. */
|
|
59
|
+
export declare const HOSTED_CLIENT_NAMES: {
|
|
60
|
+
readonly mcp: "summer-engine-local";
|
|
61
|
+
readonly cli: "summer-cli";
|
|
62
|
+
};
|
|
63
|
+
export declare function connectHostedMcp(url: string, token: () => Promise<string>, surface?: ClientSurface): Promise<HostedClient>;
|
|
58
64
|
/**
|
|
59
65
|
* The hosted server's 3.x surface: the same address with `?surface=v3`. Once
|
|
60
66
|
* the hosted server serves 4.0 to every request that does not ask, only 3.x
|
package/dist/core/hosted-mcp.js
CHANGED
|
@@ -2,7 +2,7 @@ import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
|
2
2
|
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
|
|
3
3
|
import { getStoreAccessToken, OAuthError, readStoredOAuthToken, resolveMcpResourceUrl } from "./oauth.js";
|
|
4
4
|
import { TOOLKIT_VERSION } from "./version.js";
|
|
5
|
-
import { summerRequestHeaders } from "./agent-host.js";
|
|
5
|
+
import { processSurface, summerRequestHeaders } from "./agent-host.js";
|
|
6
6
|
/**
|
|
7
7
|
* A client for the hosted Summer Engine MCP (mcp.summerengine.com), signed in
|
|
8
8
|
* with the store sign-in ("summer login --store"). The local MCP mounts its
|
|
@@ -11,18 +11,20 @@ import { summerRequestHeaders } from "./agent-host.js";
|
|
|
11
11
|
* store and publishing tools.
|
|
12
12
|
*/
|
|
13
13
|
const CALL_TIMEOUT_MS = 120_000;
|
|
14
|
-
|
|
14
|
+
/** The handshake name the hosted server sees: the MCP server's own, or the `summer` CLI's, so usage tells them apart. */
|
|
15
|
+
export const HOSTED_CLIENT_NAMES = { mcp: "summer-engine-local", cli: "summer-cli" };
|
|
16
|
+
export async function connectHostedMcp(url, token, surface = processSurface()) {
|
|
15
17
|
const transport = new StreamableHTTPClientTransport(new URL(url), {
|
|
16
18
|
// A fresh (refreshed when near expiry) token on every request.
|
|
17
19
|
fetch: async (input, init) => {
|
|
18
20
|
const headers = new Headers(init?.headers);
|
|
19
|
-
for (const [name, value] of Object.entries(summerRequestHeaders({ tool: calledTool(init?.body), surface
|
|
21
|
+
for (const [name, value] of Object.entries(summerRequestHeaders({ tool: calledTool(init?.body), surface })))
|
|
20
22
|
headers.set(name, value);
|
|
21
23
|
headers.set("authorization", `Bearer ${await token()}`);
|
|
22
24
|
return fetch(input, { ...init, headers });
|
|
23
25
|
},
|
|
24
26
|
});
|
|
25
|
-
const client = new Client({ name:
|
|
27
|
+
const client = new Client({ name: HOSTED_CLIENT_NAMES[surface], version: TOOLKIT_VERSION });
|
|
26
28
|
await client.connect(transport);
|
|
27
29
|
const timeout = { timeout: CALL_TIMEOUT_MS };
|
|
28
30
|
return {
|