@deepblend/dsh-blender-provider-local 0.2.6 → 0.2.7
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/lib/index.js +20 -1
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -167,6 +167,20 @@ export const ProviderConfig = z.object({
|
|
|
167
167
|
sessionActions: z.array(z.string()).default([]),
|
|
168
168
|
/** How long a kept session may sit idle before it is closed. */
|
|
169
169
|
sessionIdleMs: z.number().default(60_000),
|
|
170
|
+
/**
|
|
171
|
+
* The socket a Blender bridge is listening on, when the operator wants the session actions served by
|
|
172
|
+
* THE USER'S OWN BLENDER rather than one this provider spawns (SPEC §20 M6 "Live Bridge").
|
|
173
|
+
*
|
|
174
|
+
* Empty means "spawn one", which is what every deployment did before this key existed. Setting it is
|
|
175
|
+
* how a user says *use the Blender I already have open* — and the difference is not speed, it is that
|
|
176
|
+
* they can watch the operations happen in the window they are looking at.
|
|
177
|
+
*
|
|
178
|
+
* A CONFIGURED SOCKET THAT DOES NOT ANSWER IS AN ERROR, not a fallback to spawning. Silently doing
|
|
179
|
+
* something else than what was asked is the failure mode this repository keeps paying for: the user
|
|
180
|
+
* would see operations succeed and never learn that their Blender was not the one doing them. The
|
|
181
|
+
* refusal names the add-on, because that is what has to be enabled.
|
|
182
|
+
*/
|
|
183
|
+
sessionSocket: z.string().default(''),
|
|
170
184
|
})
|
|
171
185
|
|
|
172
186
|
/**
|
|
@@ -948,7 +962,12 @@ export default class LocalBlenderRuntime extends Service {
|
|
|
948
962
|
*/
|
|
949
963
|
async _keptSession() {
|
|
950
964
|
if (this._session !== null && !this._session.closed) return this._session
|
|
951
|
-
|
|
965
|
+
const socket = this.config.sessionSocket
|
|
966
|
+
// THE USER'S BLENDER, when they have named one. `attachSession` owns the refusal and its message;
|
|
967
|
+
// this only decides which of the two transports the configured actions travel over.
|
|
968
|
+
this._session = typeof socket === 'string' && socket.length > 0
|
|
969
|
+
? await this.attachSession(socket)
|
|
970
|
+
: await this.openSession()
|
|
952
971
|
return this._session
|
|
953
972
|
}
|
|
954
973
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepblend/dsh-blender-provider-local",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local Blender Provider: the BlenderRuntime Service over ctx.subprocess (batch execution).",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"./package.json": "./package.json"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@deepblend/dsh-blender-contracts": "0.2.
|
|
14
|
+
"@deepblend/dsh-blender-contracts": "0.2.7"
|
|
15
15
|
},
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"repository": {
|