@rynx-ai/daemon 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.
- package/bundled-plugins/plugins/lark/dist/cli-mirror/mirror-index.js +3 -1
- package/bundled-plugins/plugins/lark/dist/host-adapters.d.ts +1 -1
- package/bundled-plugins/plugins/lark/dist/host-adapters.js +4 -2
- package/bundled-plugins/plugins/lark/dist/lark.js +6 -8
- package/bundled-plugins/plugins/lark/dist/runtime.js +15 -12
- package/bundled-plugins/plugins/lark/dist/settings.js +7 -6
- package/bundled-plugins/plugins/lark/package.json +1 -1
- package/dist/agent-file.js +0 -1
- package/dist/control-deps.js +1 -1
- package/dist/daemon-server.js +8 -9
- package/dist/plugin-host-rpc.d.ts +8 -1
- package/dist/plugin-host-rpc.js +27 -3
- package/package.json +9 -9
|
@@ -35,7 +35,9 @@ export class CodexMirrorIndex {
|
|
|
35
35
|
chatId: directory.chatId,
|
|
36
36
|
threadId: directory.threadId,
|
|
37
37
|
participants: directory.participants ?? [],
|
|
38
|
-
model
|
|
38
|
+
// A null model means the provider CLI owns model selection. The mirror
|
|
39
|
+
// still needs a stable string label for transcript normalization.
|
|
40
|
+
model: session.execution.model ?? session.execution.provider,
|
|
39
41
|
};
|
|
40
42
|
}
|
|
41
43
|
/** All Codex threads currently bound to a Feishu conversation (those whose
|
|
@@ -23,7 +23,7 @@ export declare class HostConversationRuntime implements LarkConversationRuntime
|
|
|
23
23
|
runLive(input: ConversationStreamRequest): Promise<{
|
|
24
24
|
provider: "codex" | "traex" | "claude";
|
|
25
25
|
threadId: string;
|
|
26
|
-
model: string;
|
|
26
|
+
model: string | null;
|
|
27
27
|
authSource: "codex_cli" | "traex_cli" | "claude_cli";
|
|
28
28
|
generator: AsyncGenerator<SessionEvent, any, any>;
|
|
29
29
|
}>;
|
|
@@ -88,6 +88,8 @@ export class HostConversationRuntime {
|
|
|
88
88
|
try {
|
|
89
89
|
started = await this.host.sessions.run({
|
|
90
90
|
sessionId: input.threadId,
|
|
91
|
+
model: input.model?.trim() || null,
|
|
92
|
+
reasoningEffort: input.reasoningEffort?.trim() || null,
|
|
91
93
|
message: input.message,
|
|
92
94
|
});
|
|
93
95
|
runId = started.runId;
|
|
@@ -188,7 +190,7 @@ export class HostSessionProvisioner {
|
|
|
188
190
|
throw new Error("host did not return a provisioned session id");
|
|
189
191
|
this.resolvedExecutions.set(result.sessionId, {
|
|
190
192
|
runtime: result.execution.provider,
|
|
191
|
-
model: result.execution.model,
|
|
193
|
+
...(result.execution.model ? { model: result.execution.model } : {}),
|
|
192
194
|
...(result.execution.reasoningEffort
|
|
193
195
|
? { reasoningEffort: result.execution.reasoningEffort }
|
|
194
196
|
: {}),
|
|
@@ -206,7 +208,7 @@ export class HostSessionProvisioner {
|
|
|
206
208
|
const session = await this.host.sessions.get({ sessionId });
|
|
207
209
|
return {
|
|
208
210
|
runtime: session.execution.provider,
|
|
209
|
-
model: session.execution.model,
|
|
211
|
+
...(session.execution.model ? { model: session.execution.model } : {}),
|
|
210
212
|
...(session.execution.reasoningEffort
|
|
211
213
|
? { reasoningEffort: session.execution.reasoningEffort }
|
|
212
214
|
: {}),
|
|
@@ -1308,11 +1308,9 @@ export class LarkMessageIngestor {
|
|
|
1308
1308
|
const effort = pending.effort !== SETTINGS_DEFAULT_VALUE && allowedEfforts.includes(pending.effort)
|
|
1309
1309
|
? pending.effort
|
|
1310
1310
|
: undefined;
|
|
1311
|
-
//
|
|
1312
|
-
// reasoning
|
|
1313
|
-
const rotate = runtime !== pending.currentRuntime
|
|
1314
|
-
model !== pending.currentModel ||
|
|
1315
|
-
effort !== pending.currentEffort;
|
|
1311
|
+
// Provider selects the immutable runtime implementation. Model and
|
|
1312
|
+
// reasoning effort are Turn settings and update the same idle Session.
|
|
1313
|
+
const rotate = runtime !== pending.currentRuntime;
|
|
1316
1314
|
await this.activeSessionStore.applySettings(sessionKey, {
|
|
1317
1315
|
runtime,
|
|
1318
1316
|
model,
|
|
@@ -1715,7 +1713,7 @@ export class LarkMessageIngestor {
|
|
|
1715
1713
|
// A user-triggered cancel needs no redundant chat reply (the card carries it).
|
|
1716
1714
|
text: cancelled ? "" : `处理失败:${errorMessage}`,
|
|
1717
1715
|
provider: started.provider,
|
|
1718
|
-
model: started.model,
|
|
1716
|
+
...(started.model ? { model: started.model } : {}),
|
|
1719
1717
|
};
|
|
1720
1718
|
}
|
|
1721
1719
|
// The card carries the answer; only emit a plain-text reply when no card
|
|
@@ -1723,7 +1721,7 @@ export class LarkMessageIngestor {
|
|
|
1723
1721
|
return {
|
|
1724
1722
|
text: orchestrator.cardStarted ? "" : orchestrator.fallbackText.trim() || DEFAULT_EMPTY_RESPONSE,
|
|
1725
1723
|
provider: started.provider,
|
|
1726
|
-
model: started.model,
|
|
1724
|
+
...(started.model ? { model: started.model } : {}),
|
|
1727
1725
|
};
|
|
1728
1726
|
}
|
|
1729
1727
|
/**
|
|
@@ -1765,7 +1763,7 @@ export class LarkMessageIngestor {
|
|
|
1765
1763
|
return {
|
|
1766
1764
|
text: answer.trim() || DEFAULT_EMPTY_RESPONSE,
|
|
1767
1765
|
provider: started.provider,
|
|
1768
|
-
model: started.model,
|
|
1766
|
+
...(started.model ? { model: started.model } : {}),
|
|
1769
1767
|
};
|
|
1770
1768
|
}
|
|
1771
1769
|
catch (error) {
|
|
@@ -126117,14 +126117,14 @@ var envSchema = external_exports.object({
|
|
|
126117
126117
|
/** Default model for the traex runtime; empty lets traex use its config. */
|
|
126118
126118
|
TRAEX_MODEL: external_exports.string().optional().transform((value) => value?.trim() || void 0),
|
|
126119
126119
|
/**
|
|
126120
|
-
*
|
|
126121
|
-
*
|
|
126120
|
+
* Optional model override for the claude runtime (native `claude` CLI).
|
|
126121
|
+
* Empty leaves model selection to Claude Code itself.
|
|
126122
126122
|
*/
|
|
126123
|
-
CLAUDE_MODEL: external_exports.string().optional().transform((value) => value?.trim() ||
|
|
126123
|
+
CLAUDE_MODEL: external_exports.string().optional().transform((value) => value?.trim() || void 0),
|
|
126124
126124
|
/** Codex-lineage approval default (legacy `CODEX_APPROVAL_POLICY` is honoured);
|
|
126125
126125
|
* also helps derive Claude's unset permission posture. */
|
|
126126
126126
|
AGENT_APPROVAL_POLICY: external_exports.enum(["never", "on-failure", "on-request", "untrusted"]).default("never"),
|
|
126127
|
-
CODEX_MODEL: external_exports.string().optional().transform((value) => value?.trim() ||
|
|
126127
|
+
CODEX_MODEL: external_exports.string().optional().transform((value) => value?.trim() || void 0),
|
|
126128
126128
|
/** Codex-lineage sandbox default (legacy `CODEX_SANDBOX` is honoured); paired
|
|
126129
126129
|
* with approval to derive Claude's unset permission posture. */
|
|
126130
126130
|
AGENT_SANDBOX: external_exports.enum(["read-only", "workspace-write", "danger-full-access"]).default("danger-full-access"),
|
|
@@ -126238,7 +126238,8 @@ var agentSpecSchema = external_exports.object({
|
|
|
126238
126238
|
instructions: trimmed.optional(),
|
|
126239
126239
|
executor: external_exports.object({
|
|
126240
126240
|
runtime: runtimeEnum.optional(),
|
|
126241
|
-
model
|
|
126241
|
+
/** `null` explicitly delegates model selection to the Provider CLI. */
|
|
126242
|
+
model: trimmed.nullable().optional(),
|
|
126242
126243
|
reasoningEffort: reasoningEffortSchema.optional(),
|
|
126243
126244
|
// Runtime budget (borrowed from reference implementation's `ExecutorSpec`). All optional;
|
|
126244
126245
|
// enforced per-runtime where supported (timeout everywhere; maxIterations
|
|
@@ -126415,7 +126416,7 @@ var executionBudgetSnapshotSchema = external_exports.object({
|
|
|
126415
126416
|
var resolvedExecutionSnapshotSchema = external_exports.object({
|
|
126416
126417
|
snapshotVersion: external_exports.literal(SESSION_EXECUTION_SNAPSHOT_VERSION),
|
|
126417
126418
|
provider: external_exports.enum(["codex", "traex", "claude"]),
|
|
126418
|
-
model: nonEmptyString,
|
|
126419
|
+
model: nonEmptyString.nullable(),
|
|
126419
126420
|
reasoningEffort: nonEmptyString.nullable(),
|
|
126420
126421
|
instructions: external_exports.string().nullable(),
|
|
126421
126422
|
skills: external_exports.array(skillRefSchema2),
|
|
@@ -126933,6 +126934,8 @@ var HostConversationRuntime = class {
|
|
|
126933
126934
|
try {
|
|
126934
126935
|
started = await this.host.sessions.run({
|
|
126935
126936
|
sessionId: input.threadId,
|
|
126937
|
+
model: input.model?.trim() || null,
|
|
126938
|
+
reasoningEffort: input.reasoningEffort?.trim() || null,
|
|
126936
126939
|
message: input.message
|
|
126937
126940
|
});
|
|
126938
126941
|
runId = started.runId;
|
|
@@ -127022,7 +127025,7 @@ var HostSessionProvisioner = class {
|
|
|
127022
127025
|
if (!result?.sessionId) throw new Error("host did not return a provisioned session id");
|
|
127023
127026
|
this.resolvedExecutions.set(result.sessionId, {
|
|
127024
127027
|
runtime: result.execution.provider,
|
|
127025
|
-
model: result.execution.model,
|
|
127028
|
+
...result.execution.model ? { model: result.execution.model } : {},
|
|
127026
127029
|
...result.execution.reasoningEffort ? { reasoningEffort: result.execution.reasoningEffort } : {},
|
|
127027
127030
|
...session.agent ? { agent: session.agent } : {}
|
|
127028
127031
|
});
|
|
@@ -127038,7 +127041,7 @@ var HostSessionProvisioner = class {
|
|
|
127038
127041
|
const session = await this.host.sessions.get({ sessionId });
|
|
127039
127042
|
return {
|
|
127040
127043
|
runtime: session.execution.provider,
|
|
127041
|
-
model: session.execution.model,
|
|
127044
|
+
...session.execution.model ? { model: session.execution.model } : {},
|
|
127042
127045
|
...session.execution.reasoningEffort ? { reasoningEffort: session.execution.reasoningEffort } : {}
|
|
127043
127046
|
};
|
|
127044
127047
|
} catch (error51) {
|
|
@@ -130412,7 +130415,7 @@ ${transcript}` : header;
|
|
|
130412
130415
|
const selectedModel = pending.models.find((candidate) => candidate.value === pending.model);
|
|
130413
130416
|
const allowedEfforts = selectedModel?.supportedEfforts?.length ? selectedModel.supportedEfforts : SETTINGS_EFFORT_VALUES;
|
|
130414
130417
|
const effort = pending.effort !== SETTINGS_DEFAULT_VALUE && allowedEfforts.includes(pending.effort) ? pending.effort : void 0;
|
|
130415
|
-
const rotate = runtime !== pending.currentRuntime
|
|
130418
|
+
const rotate = runtime !== pending.currentRuntime;
|
|
130416
130419
|
await this.activeSessionStore.applySettings(sessionKey, {
|
|
130417
130420
|
runtime,
|
|
130418
130421
|
model,
|
|
@@ -130810,13 +130813,13 @@ ${transcript}` : header;
|
|
|
130810
130813
|
// A user-triggered cancel needs no redundant chat reply (the card carries it).
|
|
130811
130814
|
text: cancelled ? "" : `\u5904\u7406\u5931\u8D25\uFF1A${errorMessage}`,
|
|
130812
130815
|
provider: started.provider,
|
|
130813
|
-
model: started.model
|
|
130816
|
+
...started.model ? { model: started.model } : {}
|
|
130814
130817
|
};
|
|
130815
130818
|
}
|
|
130816
130819
|
return {
|
|
130817
130820
|
text: orchestrator.cardStarted ? "" : orchestrator.fallbackText.trim() || DEFAULT_EMPTY_RESPONSE,
|
|
130818
130821
|
provider: started.provider,
|
|
130819
|
-
model: started.model
|
|
130822
|
+
...started.model ? { model: started.model } : {}
|
|
130820
130823
|
};
|
|
130821
130824
|
}
|
|
130822
130825
|
/**
|
|
@@ -130856,7 +130859,7 @@ ${transcript}` : header;
|
|
|
130856
130859
|
return {
|
|
130857
130860
|
text: answer.trim() || DEFAULT_EMPTY_RESPONSE,
|
|
130858
130861
|
provider: started.provider,
|
|
130859
|
-
model: started.model
|
|
130862
|
+
...started.model ? { model: started.model } : {}
|
|
130860
130863
|
};
|
|
130861
130864
|
} catch (error51) {
|
|
130862
130865
|
const errorMessage = toErrorMessage(error51);
|
|
@@ -126053,14 +126053,14 @@ var envSchema = external_exports.object({
|
|
|
126053
126053
|
/** Default model for the traex runtime; empty lets traex use its config. */
|
|
126054
126054
|
TRAEX_MODEL: external_exports.string().optional().transform((value) => value?.trim() || void 0),
|
|
126055
126055
|
/**
|
|
126056
|
-
*
|
|
126057
|
-
*
|
|
126056
|
+
* Optional model override for the claude runtime (native `claude` CLI).
|
|
126057
|
+
* Empty leaves model selection to Claude Code itself.
|
|
126058
126058
|
*/
|
|
126059
|
-
CLAUDE_MODEL: external_exports.string().optional().transform((value) => value?.trim() ||
|
|
126059
|
+
CLAUDE_MODEL: external_exports.string().optional().transform((value) => value?.trim() || void 0),
|
|
126060
126060
|
/** Codex-lineage approval default (legacy `CODEX_APPROVAL_POLICY` is honoured);
|
|
126061
126061
|
* also helps derive Claude's unset permission posture. */
|
|
126062
126062
|
AGENT_APPROVAL_POLICY: external_exports.enum(["never", "on-failure", "on-request", "untrusted"]).default("never"),
|
|
126063
|
-
CODEX_MODEL: external_exports.string().optional().transform((value) => value?.trim() ||
|
|
126063
|
+
CODEX_MODEL: external_exports.string().optional().transform((value) => value?.trim() || void 0),
|
|
126064
126064
|
/** Codex-lineage sandbox default (legacy `CODEX_SANDBOX` is honoured); paired
|
|
126065
126065
|
* with approval to derive Claude's unset permission posture. */
|
|
126066
126066
|
AGENT_SANDBOX: external_exports.enum(["read-only", "workspace-write", "danger-full-access"]).default("danger-full-access"),
|
|
@@ -126174,7 +126174,8 @@ var agentSpecSchema = external_exports.object({
|
|
|
126174
126174
|
instructions: trimmed.optional(),
|
|
126175
126175
|
executor: external_exports.object({
|
|
126176
126176
|
runtime: runtimeEnum.optional(),
|
|
126177
|
-
model
|
|
126177
|
+
/** `null` explicitly delegates model selection to the Provider CLI. */
|
|
126178
|
+
model: trimmed.nullable().optional(),
|
|
126178
126179
|
reasoningEffort: reasoningEffortSchema.optional(),
|
|
126179
126180
|
// Runtime budget (borrowed from reference implementation's `ExecutorSpec`). All optional;
|
|
126180
126181
|
// enforced per-runtime where supported (timeout everywhere; maxIterations
|
|
@@ -126283,7 +126284,7 @@ var executionBudgetSnapshotSchema = external_exports.object({
|
|
|
126283
126284
|
var resolvedExecutionSnapshotSchema = external_exports.object({
|
|
126284
126285
|
snapshotVersion: external_exports.literal(SESSION_EXECUTION_SNAPSHOT_VERSION),
|
|
126285
126286
|
provider: external_exports.enum(["codex", "traex", "claude"]),
|
|
126286
|
-
model: nonEmptyString,
|
|
126287
|
+
model: nonEmptyString.nullable(),
|
|
126287
126288
|
reasoningEffort: nonEmptyString.nullable(),
|
|
126288
126289
|
instructions: external_exports.string().nullable(),
|
|
126289
126290
|
skills: external_exports.array(skillRefSchema2),
|
package/dist/agent-file.js
CHANGED
|
@@ -46,7 +46,6 @@ export function scaffoldAgentSpec(id) {
|
|
|
46
46
|
instructions: "You are a helpful agent.",
|
|
47
47
|
executor: {
|
|
48
48
|
runtime: "claude",
|
|
49
|
-
model: "claude-sonnet-4-6",
|
|
50
49
|
reasoningEffort: "medium",
|
|
51
50
|
// Runtime budget (edit/remove as needed): timeout is enforced on every
|
|
52
51
|
// runtime; retry maps to per-runtime env. maxIterations (claude only) and
|
package/dist/control-deps.js
CHANGED
|
@@ -55,7 +55,7 @@ export function buildControlDeps(config) {
|
|
|
55
55
|
name: spec.name,
|
|
56
56
|
description: spec.description,
|
|
57
57
|
runtime: spec.executor?.runtime,
|
|
58
|
-
model: spec.executor
|
|
58
|
+
...(spec.executor?.model ? { model: spec.executor.model } : {}),
|
|
59
59
|
skillCount: spec.skills?.length ?? 0,
|
|
60
60
|
})),
|
|
61
61
|
getAgent: (id) => loadAgentSpec(id),
|
package/dist/daemon-server.js
CHANGED
|
@@ -17,7 +17,7 @@ import { REMOTE_RUNTIME_CORE_PROTOCOL } from "@rynx-ai/protocol/remote-runtime";
|
|
|
17
17
|
import { RUNTIME_BROWSER_INSPECT_MAX_MESSAGE_BYTES, RUNTIME_BROWSER_INSPECT_SEMANTIC_CAPABILITY, } from "@rynx-ai/protocol/runtime-browser-inspect";
|
|
18
18
|
import { RUNTIME_BROWSER_SURFACE_SEMANTIC_CAPABILITY } from "@rynx-ai/protocol/runtime-browser-surface";
|
|
19
19
|
import { RUNTIME_EMULATOR_SURFACE_SEMANTIC_CAPABILITY } from "@rynx-ai/protocol/runtime-emulator-surface";
|
|
20
|
-
import { createDaemonRuntimeHost, createDesktopFirstSessionBrowserHost, createRunnerSessionTerminalHost, createSessionRuntimeServices, DesktopBrowserHostAbsentError, DesktopBrowserHostRegistry, DirectRuntimeConnectionHub, DirectRuntimeBrowserInspectHostError, MachineSessionService, MachineSessionServiceFailure,
|
|
20
|
+
import { createDaemonRuntimeHost, createDesktopFirstSessionBrowserHost, createRunnerSessionTerminalHost, createSessionRuntimeServices, DesktopBrowserHostAbsentError, DesktopBrowserHostRegistry, DirectRuntimeConnectionHub, DirectRuntimeBrowserInspectHostError, MachineSessionService, MachineSessionServiceFailure, RemoteRuntimeDispatcher, SessionBrowserService, SessionBrowserServiceError, SessionBrowserSurfaceCoordinator, SessionEmulatorService, startServer, startDirectRuntimeServer, } from "@rynx-ai/server";
|
|
21
21
|
import { authorizeSessionPortalGrant, redeemSessionPortalTicket, } from "./session-portal-grant-store.js";
|
|
22
22
|
import { APP_BROWSER_HOST_BOOTSTRAP_TYPE, AppBrowserHostSupervisor, parseAppBrowserHostLaunchConfig, } from "./app-browser-host-supervisor.js";
|
|
23
23
|
import { buildControlDeps, listControlAgentModels } from "./control-deps.js";
|
|
@@ -69,13 +69,7 @@ const require = createRequire(import.meta.url);
|
|
|
69
69
|
const DAEMON_PACKAGE_VERSION = readDaemonPackageVersion();
|
|
70
70
|
async function resolveSessionExecutionSnapshot(input) {
|
|
71
71
|
return {
|
|
72
|
-
...await resolveExecutionSnapshot(
|
|
73
|
-
...input,
|
|
74
|
-
resolveDefaultModel: async (provider) => {
|
|
75
|
-
const models = await listRuntimeModels(input.config, provider);
|
|
76
|
-
return models?.data.find((candidate) => candidate.isDefault)?.model;
|
|
77
|
-
},
|
|
78
|
-
}),
|
|
72
|
+
...await resolveExecutionSnapshot(input),
|
|
79
73
|
pluginSkills: snapshotEnabledPluginSkillSources(),
|
|
80
74
|
};
|
|
81
75
|
}
|
|
@@ -412,7 +406,7 @@ export async function startRynxDaemonServer({ config, warn = defaultWarn, onShut
|
|
|
412
406
|
...((selection.provider || (!selection.agent && !selection.config))
|
|
413
407
|
? { provider: selection.provider ?? appConfig.DEFAULT_RUNTIME }
|
|
414
408
|
: {}),
|
|
415
|
-
...(selection.model ? { model: selection.model } : {}),
|
|
409
|
+
...(selection.model !== undefined ? { model: selection.model } : {}),
|
|
416
410
|
...(selection.reasoningEffort
|
|
417
411
|
? { reasoningEffort: selection.reasoningEffort }
|
|
418
412
|
: {}),
|
|
@@ -421,6 +415,11 @@ export async function startRynxDaemonServer({ config, warn = defaultWarn, onShut
|
|
|
421
415
|
};
|
|
422
416
|
},
|
|
423
417
|
},
|
|
418
|
+
sessionExecution: {
|
|
419
|
+
update: async (input) => {
|
|
420
|
+
await machineSessions.updateExecutionSettings(input);
|
|
421
|
+
},
|
|
422
|
+
},
|
|
424
423
|
sessionFork: (input) => machineSessions.fork(input),
|
|
425
424
|
admissionOpen,
|
|
426
425
|
admissionReserve: reserveAdmission,
|
|
@@ -22,7 +22,7 @@ export interface PluginSessionLaunchSelection {
|
|
|
22
22
|
agent?: string;
|
|
23
23
|
config?: AgentSpec;
|
|
24
24
|
provider?: AgentRuntimeId;
|
|
25
|
-
model?: string;
|
|
25
|
+
model?: string | null;
|
|
26
26
|
reasoningEffort?: string;
|
|
27
27
|
title?: string;
|
|
28
28
|
}
|
|
@@ -45,6 +45,13 @@ export interface PluginHostServices {
|
|
|
45
45
|
sessionLaunch: {
|
|
46
46
|
resolve(input: PluginSessionLaunchSelection): Promise<PluginResolvedSessionLaunch>;
|
|
47
47
|
};
|
|
48
|
+
sessionExecution: {
|
|
49
|
+
update(input: {
|
|
50
|
+
sessionId: string;
|
|
51
|
+
model: string | null;
|
|
52
|
+
reasoningEffort: string | null;
|
|
53
|
+
}): Promise<void>;
|
|
54
|
+
};
|
|
48
55
|
interruptSession?(sessionId: string): Promise<boolean>;
|
|
49
56
|
terminateSession?(sessionId: string): Promise<boolean>;
|
|
50
57
|
resolveSessionInteraction?(sessionId: string, interactionId: string, resolution: SessionInteractionResolution): Promise<{
|
package/dist/plugin-host-rpc.js
CHANGED
|
@@ -301,7 +301,15 @@ export class PluginHostRpc {
|
|
|
301
301
|
const input = record(params);
|
|
302
302
|
const sessionId = requiredSessionId(input);
|
|
303
303
|
const operationId = optionalString(input.operationId, "operationId", 512);
|
|
304
|
-
const
|
|
304
|
+
const modelProvided = input.model !== undefined;
|
|
305
|
+
const requestedModel = input.model === null || input.model === ""
|
|
306
|
+
? null
|
|
307
|
+
: optionalString(input.model, "model", 256);
|
|
308
|
+
const reasoningEffortProvided = input.reasoningEffort !== undefined;
|
|
309
|
+
const requestedReasoningEffort = input.reasoningEffort === null || input.reasoningEffort === ""
|
|
310
|
+
? null
|
|
311
|
+
: optionalString(input.reasoningEffort, "reasoningEffort", 64);
|
|
312
|
+
let session = this.ownedSession(sessionId);
|
|
305
313
|
if (operationId && this.activeRunsByOperation.has(operationId)) {
|
|
306
314
|
throw new PluginHostCallError("RUN_ALREADY_ACTIVE", `operation already has an active run: ${operationId}`, true);
|
|
307
315
|
}
|
|
@@ -312,6 +320,19 @@ export class PluginHostRpc {
|
|
|
312
320
|
throw new PluginHostCallError("RUN_LIMIT", "plugin has too many active session runs", true);
|
|
313
321
|
}
|
|
314
322
|
const message = requiredText(input.message, "message", MAX_MESSAGE_LENGTH);
|
|
323
|
+
const nextModel = modelProvided ? requestedModel ?? null : session.execution.model;
|
|
324
|
+
const nextReasoningEffort = reasoningEffortProvided
|
|
325
|
+
? requestedReasoningEffort ?? null
|
|
326
|
+
: session.execution.reasoningEffort;
|
|
327
|
+
if (nextModel !== session.execution.model ||
|
|
328
|
+
nextReasoningEffort !== session.execution.reasoningEffort) {
|
|
329
|
+
await this.services.sessionExecution.update({
|
|
330
|
+
sessionId,
|
|
331
|
+
model: nextModel,
|
|
332
|
+
reasoningEffort: nextReasoningEffort,
|
|
333
|
+
});
|
|
334
|
+
session = this.ownedSession(sessionId);
|
|
335
|
+
}
|
|
315
336
|
const abort = new AbortController();
|
|
316
337
|
const cancel = () => abort.abort(signal?.reason);
|
|
317
338
|
if (signal?.aborted) {
|
|
@@ -710,7 +731,10 @@ function sessionLaunchSelection(value) {
|
|
|
710
731
|
const agent = optionalAgentId(input.agent, "session.agent");
|
|
711
732
|
const config = input.config === undefined ? undefined : agentSpecSchema.parse(input.config);
|
|
712
733
|
const provider = optionalRuntimeValue(input.provider);
|
|
713
|
-
const
|
|
734
|
+
const modelProvided = input.model !== undefined;
|
|
735
|
+
const model = input.model === null || input.model === ""
|
|
736
|
+
? null
|
|
737
|
+
: optionalString(input.model, "session.model", 256);
|
|
714
738
|
const reasoningEffort = optionalString(input.reasoningEffort, "session.reasoningEffort", 128);
|
|
715
739
|
const title = optionalString(input.title, "session.title", 1_000);
|
|
716
740
|
if (Number(Boolean(projectId)) + Number(Boolean(managedCwd)) + Number(Boolean(workspace)) > 1) {
|
|
@@ -729,7 +753,7 @@ function sessionLaunchSelection(value) {
|
|
|
729
753
|
...(agent ? { agent } : {}),
|
|
730
754
|
...(config ? { config } : {}),
|
|
731
755
|
...(provider ? { provider } : {}),
|
|
732
|
-
...(
|
|
756
|
+
...(modelProvided ? { model: model ?? null } : {}),
|
|
733
757
|
...(reasoningEffort ? { reasoningEffort } : {}),
|
|
734
758
|
...(title ? { title } : {}),
|
|
735
759
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rynx-ai/daemon",
|
|
3
|
-
"version": "0.1.11-beta.
|
|
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",
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
"pm2": "^6.0.0",
|
|
48
48
|
"tar": "^7.5.19",
|
|
49
49
|
"ws": "^8.21.0",
|
|
50
|
-
"@rynx-ai/core": "0.1.11-beta.
|
|
51
|
-
"@rynx-ai/
|
|
52
|
-
"@rynx-ai/plugin-
|
|
53
|
-
"@rynx-ai/
|
|
54
|
-
"@rynx-ai/
|
|
55
|
-
"@rynx-ai/
|
|
56
|
-
"@rynx-ai/server": "0.1.11-beta.
|
|
50
|
+
"@rynx-ai/core": "0.1.11-beta.9",
|
|
51
|
+
"@rynx-ai/plugin-runner": "0.1.11-beta.9",
|
|
52
|
+
"@rynx-ai/plugin-sdk": "0.1.11-beta.9",
|
|
53
|
+
"@rynx-ai/protocol": "0.1.11-beta.9",
|
|
54
|
+
"@rynx-ai/remote-runtime-client": "0.1.11-beta.9",
|
|
55
|
+
"@rynx-ai/emulator": "0.1.11-beta.9",
|
|
56
|
+
"@rynx-ai/server": "0.1.11-beta.9"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/ws": "^8.18.1",
|
|
60
|
-
"@rynx-ai/plugin-channel-lark": "0.1.11-beta.
|
|
60
|
+
"@rynx-ai/plugin-channel-lark": "0.1.11-beta.9"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"build": "rm -rf dist bundled-plugins && tsc -p tsconfig.json && chmod +x dist/index-daemon.js && node ../../scripts/stage-bundled-plugins.mjs",
|