unity-open-mcp 0.5.0 → 0.6.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/README.md +15 -12
- package/dist/batch-spawn.d.ts +4 -0
- package/dist/batch-spawn.js +55 -11
- package/dist/batch-spawn.js.map +1 -1
- package/dist/capabilities/cost-hints.js +20 -0
- package/dist/capabilities/cost-hints.js.map +1 -1
- package/dist/cli/commands.js +9 -8
- package/dist/cli/commands.js.map +1 -1
- package/dist/constants.d.ts +89 -0
- package/dist/constants.js +109 -0
- package/dist/constants.js.map +1 -0
- package/dist/dialog-dismiss.d.ts +0 -7
- package/dist/dialog-dismiss.js +17 -19
- package/dist/dialog-dismiss.js.map +1 -1
- package/dist/hub-control.d.ts +6 -2
- package/dist/hub-control.js +8 -8
- package/dist/hub-control.js.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/instance-discovery.js +2 -1
- package/dist/instance-discovery.js.map +1 -1
- package/dist/live-client.d.ts +49 -0
- package/dist/live-client.js +292 -255
- package/dist/live-client.js.map +1 -1
- package/dist/offline/api.d.ts +171 -0
- package/dist/offline/api.js +852 -0
- package/dist/offline/api.js.map +1 -0
- package/dist/offline/hierarchy.d.ts +24 -0
- package/dist/offline/hierarchy.js +242 -0
- package/dist/offline/hierarchy.js.map +1 -0
- package/dist/offline/index-builders.d.ts +11 -0
- package/dist/offline/index-builders.js +202 -0
- package/dist/offline/index-builders.js.map +1 -0
- package/dist/offline/model.d.ts +8 -0
- package/dist/offline/model.js +188 -0
- package/dist/offline/model.js.map +1 -0
- package/dist/offline/names.d.ts +7 -0
- package/dist/offline/names.js +20 -0
- package/dist/offline/names.js.map +1 -0
- package/dist/offline/overrides.d.ts +17 -0
- package/dist/offline/overrides.js +266 -0
- package/dist/offline/overrides.js.map +1 -0
- package/dist/offline/parse.d.ts +25 -0
- package/dist/offline/parse.js +236 -0
- package/dist/offline/parse.js.map +1 -0
- package/dist/offline/paths.d.ts +4 -0
- package/dist/offline/paths.js +23 -0
- package/dist/offline/paths.js.map +1 -0
- package/dist/offline/primitives.d.ts +17 -0
- package/dist/offline/primitives.js +195 -0
- package/dist/offline/primitives.js.map +1 -0
- package/dist/offline/references.d.ts +9 -0
- package/dist/offline/references.js +55 -0
- package/dist/offline/references.js.map +1 -0
- package/dist/offline/types.d.ts +65 -0
- package/dist/offline/types.js +154 -0
- package/dist/offline/types.js.map +1 -0
- package/dist/offline.d.ts +2 -180
- package/dist/offline.js +27 -2282
- package/dist/offline.js.map +1 -1
- package/dist/project-health.d.ts +1 -1
- package/dist/project-health.js +66 -3
- package/dist/project-health.js.map +1 -1
- package/dist/routers.js +6 -5
- package/dist/routers.js.map +1 -1
- package/dist/tool-router.d.ts +12 -0
- package/dist/tool-router.js +72 -100
- package/dist/tool-router.js.map +1 -1
- package/dist/tools/component-get.js +44 -11
- package/dist/tools/component-get.js.map +1 -1
- package/dist/tools/editor-status.js +3 -2
- package/dist/tools/editor-status.js.map +1 -1
- package/dist/tools/execute-csharp.js +3 -2
- package/dist/tools/execute-csharp.js.map +1 -1
- package/dist/tools/index.js +19 -17
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/inputsystem-asset-create.js +4 -4
- package/dist/tools/inputsystem-asset-create.js.map +1 -1
- package/dist/tools/invoke-method.js +2 -1
- package/dist/tools/invoke-method.js.map +1 -1
- package/dist/tools/navigation-surface-add.js +6 -5
- package/dist/tools/navigation-surface-add.js.map +1 -1
- package/dist/tools/probuilder-create-shape.js +4 -4
- package/dist/tools/probuilder-create-shape.js.map +1 -1
- package/dist/tools/read-compile-errors.js +44 -31
- package/dist/tools/read-compile-errors.js.map +1 -1
- package/dist/tools/scene-get-data.js +10 -2
- package/dist/tools/scene-get-data.js.map +1 -1
- package/dist/tools/scene-save.js +16 -5
- package/dist/tools/scene-save.js.map +1 -1
- package/dist/tools/scene-set-active.js +22 -6
- package/dist/tools/scene-set-active.js.map +1 -1
- package/dist/tools/scene-unload.js +20 -6
- package/dist/tools/scene-unload.js.map +1 -1
- package/package.json +1 -1
package/dist/live-client.d.ts
CHANGED
|
@@ -91,7 +91,56 @@ export declare class LiveClient implements Router {
|
|
|
91
91
|
private handleToolCall;
|
|
92
92
|
private handleRunTests;
|
|
93
93
|
private pollTestResults;
|
|
94
|
+
/**
|
|
95
|
+
* POST a tool call to the bridge and shape the response. Decomposed in
|
|
96
|
+
* M28-refactoring Plan 3 (T3.3) into named steps so retry, compile-wait,
|
|
97
|
+
* transient-offline handling, and result shaping are independently readable.
|
|
98
|
+
*
|
|
99
|
+
* Pipeline:
|
|
100
|
+
* 1. {@link postToolFetch} — POST with a timeout floored above the bridge's
|
|
101
|
+
* own default wait, handling 503-compile-retry and non-OK HTTP.
|
|
102
|
+
* 2. {@link shapeToolResult} — parse the body and dispatch mutation-envelope
|
|
103
|
+
* vs direct-body vs inline-image vs reload/corruption outcomes.
|
|
104
|
+
* 3. On a transient fetch failure, {@link handlePostFailure} classifies +
|
|
105
|
+
* recovers (re-syncing the endpoint, waiting out a reload, or surfacing
|
|
106
|
+
* the structured offline/dead-bridge error) and re-POSTs only when safe.
|
|
107
|
+
*
|
|
108
|
+
* The retry/compile contract is unchanged from the former monolithic body.
|
|
109
|
+
*/
|
|
94
110
|
private postTool;
|
|
111
|
+
/**
|
|
112
|
+
* Step 1 of {@link postTool}: perform the HTTP POST with the timeout floor,
|
|
113
|
+
* then handle 503-compile-retry and non-OK HTTP. Returns either a shaped
|
|
114
|
+
* {@link CallToolResult} (handed straight back by postTool) or a sentinel
|
|
115
|
+
* `{ _repostAfterCompile: true }` signaling a clean compile settle that
|
|
116
|
+
* should re-POST without 503 retry. Throws on transient fetch failure so the
|
|
117
|
+
* caller's catch runs {@link handlePostFailure}.
|
|
118
|
+
*/
|
|
119
|
+
private postToolFetch;
|
|
120
|
+
/**
|
|
121
|
+
* Step 2 of {@link postTool}: parse the bridge response body and shape it into
|
|
122
|
+
* a {@link CallToolResult}. Handles the four response outcomes:
|
|
123
|
+
* - inline-image unwrap (capture_inline → MCP image block + metadata),
|
|
124
|
+
* - mutation envelope (derive isError from mutation.success),
|
|
125
|
+
* - compile-reload empty body (triggered_reload — likely-success domain
|
|
126
|
+
* reload tore down the socket mid-response),
|
|
127
|
+
* - direct body (verbatim, isError when a top-level error field is present),
|
|
128
|
+
* - unparsable body (bridge_response_unparsable corruption error).
|
|
129
|
+
*/
|
|
130
|
+
private shapeToolResult;
|
|
131
|
+
/**
|
|
132
|
+
* Step 3 of {@link postTool}: classify + recover from a transient POST
|
|
133
|
+
* failure (ECONNREFUSED / timeout during a domain reload). Re-syncs the cached
|
|
134
|
+
* endpoint from the lock first (so a Unity restart self-heals), waits out a
|
|
135
|
+
* reload, and re-POSTs ONLY when safe (endpoint changed during recovery, or a
|
|
136
|
+
* genuine connection failure where no bytes reached the server).
|
|
137
|
+
*
|
|
138
|
+
* Re-POST discipline (specs/feedback.md entry 4A — duplicate side-effects):
|
|
139
|
+
* when the endpoint is unchanged the same live bridge is still processing —
|
|
140
|
+
* or has queued — the original POST's Work; re-POSTing would run the mutation
|
|
141
|
+
* a second time. In that case surface the timeout instead of retrying.
|
|
142
|
+
*/
|
|
143
|
+
private handlePostFailure;
|
|
95
144
|
private ensureReady;
|
|
96
145
|
/**
|
|
97
146
|
* M20 Plan 4-5 / T-fix-2 — classify a transient /ping or tool-POST failure
|