@rynx-ai/server 0.1.11-beta.8 → 0.1.11-beta.9

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.
@@ -154,7 +154,7 @@ export interface MachineSessionServicePorts {
154
154
  resolve(input: {
155
155
  agent?: string;
156
156
  provider?: SessionProviderId;
157
- model?: string;
157
+ model?: string | null;
158
158
  reasoningEffort?: ReasoningEffort;
159
159
  permissionPreset?: SessionPermissionPreset;
160
160
  cwd: string;
@@ -206,7 +206,7 @@ export interface MachineSessionSnapshotPage {
206
206
  }
207
207
  export type MachineSessionInterruptResult = RemoteRuntimeSessionInterruptResult;
208
208
  interface MachineSessionCreateOptions {
209
- model?: string;
209
+ model?: string | null;
210
210
  reasoningEffort?: ReasoningEffort;
211
211
  permissionPreset?: SessionPermissionPreset;
212
212
  title?: string;
@@ -311,7 +311,7 @@ export declare class MachineSessionService {
311
311
  launchOptions(): Promise<RemoteRuntimeSessionLaunchOptionsListResult>;
312
312
  /** Read the effective model defaults used for the next turn. */
313
313
  executionSettings(sessionIdInput: string): Promise<RemoteRuntimeSessionExecutionGetResult>;
314
- /** Replace only the model defaults of an idle Session. The runner is closed
314
+ /** Replace the Turn defaults of an idle Session. The runner is closed
315
315
  * so every Provider resumes its native context with the new settings on the
316
316
  * next turn. */
317
317
  updateExecutionSettings(input: RemoteRuntimeSessionExecutionUpdateParams): Promise<RemoteRuntimeSessionExecutionUpdateResult>;
@@ -208,12 +208,12 @@ export class MachineSessionService {
208
208
  }
209
209
  return executionSettingsResult(meta.execution);
210
210
  }
211
- /** Replace only the model defaults of an idle Session. The runner is closed
211
+ /** Replace the Turn defaults of an idle Session. The runner is closed
212
212
  * so every Provider resumes its native context with the new settings on the
213
213
  * next turn. */
214
214
  async updateExecutionSettings(input) {
215
215
  const sessionId = validOpaqueToken(input.sessionId, "sessionId", MAX_SESSION_ID_CHARS);
216
- const modelId = validRequiredText(input.model, "model");
216
+ const modelId = input.model === null ? null : validRequiredText(input.model, "model");
217
217
  const meta = this.ports.registry.get(sessionId);
218
218
  if (!meta) {
219
219
  throw new MachineSessionServiceFailure("not_found", "session not found");
@@ -228,24 +228,28 @@ export class MachineSessionService {
228
228
  throw new MachineSessionServiceFailure("failed_precondition", "Session must be idle before changing model settings");
229
229
  }
230
230
  const executionPort = this.requireExecution();
231
- if (!executionPort.listModels) {
232
- throw new MachineSessionServiceFailure("failed_precondition", "Runtime model catalog is unavailable");
233
- }
234
- const models = await executionPort.listModels(meta.execution.provider);
235
- const model = models.find((candidate) => candidate.id === modelId);
236
- if (!model) {
237
- throw new MachineSessionServiceInputError(`model is not available for ${meta.execution.provider}`);
231
+ let model = null;
232
+ if (modelId !== null) {
233
+ if (!executionPort.listModels) {
234
+ throw new MachineSessionServiceFailure("failed_precondition", "Runtime model catalog is unavailable");
235
+ }
236
+ const models = await executionPort.listModels(meta.execution.provider);
237
+ model = models.find((candidate) => candidate.id === modelId) ?? null;
238
+ if (!model) {
239
+ throw new MachineSessionServiceInputError(`model is not available for ${meta.execution.provider}`);
240
+ }
238
241
  }
239
242
  const reasoningEffort = input.reasoningEffort === null
240
243
  ? null
241
244
  : validRequiredText(input.reasoningEffort, "reasoningEffort");
242
245
  if (reasoningEffort !== null &&
246
+ model !== null &&
243
247
  !model.reasoningOptions.some((option) => option.value === reasoningEffort)) {
244
248
  throw new MachineSessionServiceInputError(`reasoningEffort is not available for model ${model.id}`);
245
249
  }
246
250
  const nextExecution = {
247
251
  ...structuredClone(meta.execution),
248
- model: model.id,
252
+ model: model?.id ?? null,
249
253
  reasoningEffort,
250
254
  };
251
255
  this.ports.registry.setExecution(sessionId, nextExecution);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rynx-ai/server",
3
- "version": "0.1.11-beta.8",
3
+ "version": "0.1.11-beta.9",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/rynx-ai/rynx.git",
@@ -27,15 +27,15 @@
27
27
  "@koa/router": "^15.4.0",
28
28
  "koa": "^3.2.0",
29
29
  "ws": "^8.21.0",
30
- "@rynx-ai/core": "0.1.11-beta.8",
31
- "@rynx-ai/plugin-sdk": "0.1.11-beta.8",
32
- "@rynx-ai/protocol": "0.1.11-beta.8",
33
- "@rynx-ai/remote-runtime-e2ee": "0.1.11-beta.8",
34
- "@rynx-ai/runtime": "0.1.11-beta.8"
30
+ "@rynx-ai/core": "0.1.11-beta.9",
31
+ "@rynx-ai/protocol": "0.1.11-beta.9",
32
+ "@rynx-ai/remote-runtime-e2ee": "0.1.11-beta.9",
33
+ "@rynx-ai/plugin-sdk": "0.1.11-beta.9",
34
+ "@rynx-ai/runtime": "0.1.11-beta.9"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/ws": "^8.18.1",
38
- "@rynx-ai/control-web": "0.1.11-beta.8"
38
+ "@rynx-ai/control-web": "0.1.11-beta.9"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "rm -rf dist && tsc -p tsconfig.json && mkdir -p dist/control-web && cp -R ../control-web/dist/. dist/control-web/",