@dsmm/dsmm 0.1.1 → 0.1.5
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 +26 -15
- package/agent-presets/dsmm-builder/agent.cordis.yml +14 -12
- package/agent-presets/dsmm-builder/preset.yml +1 -1
- package/agent-presets/dsmm-clarifier/agent.cordis.yml +4 -2
- package/agent-presets/dsmm-clarifier/preset.yml +1 -1
- package/agent-presets/dsmm-code-search/agent.cordis.yml +4 -2
- package/agent-presets/dsmm-code-search/preset.yml +1 -1
- package/agent-presets/dsmm-creative/agent.cordis.yml +3 -1
- package/agent-presets/dsmm-creative/preset.yml +1 -1
- package/agent-presets/dsmm-doc-search/agent.cordis.yml +4 -2
- package/agent-presets/dsmm-doc-search/preset.yml +1 -1
- package/agent-presets/dsmm-media-reader/agent.cordis.yml +4 -2
- package/agent-presets/dsmm-media-reader/preset.yml +1 -1
- package/agent-presets/dsmm-oracle/agent.cordis.yml +3 -1
- package/agent-presets/dsmm-oracle/preset.yml +1 -1
- package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +3 -1
- package/agent-presets/dsmm-oracle-2nd/preset.yml +1 -1
- package/agent-presets/dsmm-orchestrator/agent.cordis.yml +15 -13
- package/agent-presets/dsmm-orchestrator/preset.yml +2 -2
- package/agent-presets/dsmm-plan-critic/agent.cordis.yml +4 -2
- package/agent-presets/dsmm-plan-critic/preset.yml +1 -1
- package/agent-presets/dsmm-planner/agent.cordis.yml +4 -2
- package/agent-presets/dsmm-planner/preset.yml +1 -1
- package/agent-presets/dsmm-reviewer/agent.cordis.yml +4 -2
- package/agent-presets/dsmm-reviewer/preset.yml +1 -1
- package/docs/agent-presets.md +15 -5
- package/docs/compatibility.md +66 -11
- package/docs/migration-from-ocmm.md +8 -0
- package/docs/model-routing.md +25 -7
- package/docs/profiles.md +95 -0
- package/docs/releasing.md +66 -19
- package/docs/runtime-recovery.md +39 -14
- package/docs/settings-status.md +13 -5
- package/lib/client/ProfilesSection.d.ts +11 -0
- package/lib/client/ProfilesSection.js +66 -0
- package/lib/client/SessionProfiles.d.ts +19 -0
- package/lib/client/SessionProfiles.js +24 -0
- package/lib/client/StructuredEditor.d.ts +11 -0
- package/lib/client/StructuredEditor.js +74 -0
- package/lib/client/controller.d.ts +115 -0
- package/lib/client/controller.js +340 -0
- package/lib/client/index.d.ts +13 -0
- package/lib/client/index.js +54 -0
- package/lib/client/locales.d.ts +145 -0
- package/lib/client/locales.js +91 -0
- package/lib/client/session-labels.d.ts +8 -0
- package/lib/client/session-labels.js +13 -0
- package/lib/client/structured.d.ts +18 -0
- package/lib/client/structured.js +98 -0
- package/lib/client/styles.d.ts +3 -0
- package/lib/client/styles.js +36 -0
- package/lib/client.js +2825 -0
- package/lib/commands.d.ts +3 -3
- package/lib/commands.js +5 -4
- package/lib/dsh-types.d.ts +20 -0
- package/lib/guards.d.ts +2 -2
- package/lib/guards.js +3 -2
- package/lib/index.d.ts +12 -4
- package/lib/index.js +98 -20
- package/lib/mode.d.ts +2 -2
- package/lib/mode.js +1 -1
- package/lib/model-routing.d.ts +2 -2
- package/lib/model-routing.js +100 -15
- package/lib/preset-registry.js +5 -3
- package/lib/profile-remote.d.ts +37 -0
- package/lib/profile-remote.js +219 -0
- package/lib/profile-rpc.d.ts +35 -0
- package/lib/profile-rpc.js +187 -0
- package/lib/profile-runtime.d.ts +63 -0
- package/lib/profile-runtime.js +310 -0
- package/lib/profile-store.d.ts +60 -0
- package/lib/profile-store.js +588 -0
- package/lib/profile-types.d.ts +80 -0
- package/lib/profile-types.js +2 -0
- package/lib/profiles.d.ts +26 -0
- package/lib/profiles.js +269 -0
- package/lib/prompts.d.ts +2 -2
- package/lib/prompts.js +4 -4
- package/lib/role-providers.d.ts +2 -2
- package/lib/role-providers.js +49 -6
- package/lib/role-routing.d.ts +37 -3
- package/lib/role-routing.js +110 -35
- package/lib/role-subagents.d.ts +2 -2
- package/lib/role-subagents.js +6 -4
- package/lib/roles.d.ts +4 -0
- package/lib/roles.js +43 -27
- package/lib/routing-policy.d.ts +32 -0
- package/lib/routing-policy.js +92 -0
- package/lib/runtime-recovery.d.ts +2 -2
- package/lib/runtime-recovery.js +215 -54
- package/lib/session-metadata.d.ts +13 -0
- package/lib/session-metadata.js +34 -0
- package/lib/session-persistence.d.ts +35 -0
- package/lib/session-persistence.js +304 -0
- package/lib/settings.d.ts +34 -1
- package/lib/settings.js +33 -7
- package/lib/state.d.ts +1 -0
- package/lib/state.js +4 -0
- package/lib/status.d.ts +9 -1
- package/lib/status.js +34 -12
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +66 -15
- package/patches/agent-presets-root.example.cordis.patch.yml +6 -10
- package/prompts/deepseek-v4-pro.md +1 -1
- package/prompts/deepwork.md +3 -3
- package/scripts/repair-session-log.mjs +476 -0
- package/scripts/session-repair-native-verifier.mjs +367 -0
package/lib/role-routing.js
CHANGED
|
@@ -1,22 +1,111 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
1
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
2
|
+
import { LlmError } from "@deepseek-ai/dsh-llm";
|
|
3
|
+
import { assertDsmmMetadataPersistence } from "./session-metadata.js";
|
|
2
4
|
import { isDsmmRoleId } from "./roles.js";
|
|
3
5
|
import { isCurrentRecoveryStep } from "./recovery-policy.js";
|
|
4
6
|
import { childOwnedSessionEvents, sessionEvents } from "./session-scope.js";
|
|
7
|
+
import { resolveRoleRuntimePolicy } from "./routing-policy.js";
|
|
5
8
|
const admittedRecoveryRoutes = new WeakMap();
|
|
9
|
+
const routeLocks = new WeakMap();
|
|
10
|
+
const agentEntries = new WeakMap();
|
|
6
11
|
export const DSMM_ROLE_POLICY_EVENT = "dsmm/role-policy";
|
|
7
|
-
|
|
12
|
+
/** Native user selection is authority; inherited headers/default configs are not. */
|
|
13
|
+
export function latestNativeModelSelection(agent) {
|
|
14
|
+
let selected;
|
|
15
|
+
for (const event of policyEvents({ agent })) {
|
|
16
|
+
if (event.type !== "model/selection" || !("seq" in event) || !Number.isSafeInteger(event.seq)
|
|
17
|
+
|| typeof event.seq !== "number" || event.seq < 0 || !isRecord(event.data))
|
|
18
|
+
continue;
|
|
19
|
+
const { provider, model, reasoningEffort } = event.data;
|
|
20
|
+
if (typeof provider !== "string" || provider.trim() === "" || typeof model !== "string" || model.trim() === ""
|
|
21
|
+
|| (reasoningEffort !== undefined && (typeof reasoningEffort !== "string" || reasoningEffort.trim() === "")))
|
|
22
|
+
continue;
|
|
23
|
+
selected = { seq: event.seq, route: { provider, model, ...(reasoningEffort === undefined ? {} : { reasoningEffort }) } };
|
|
24
|
+
}
|
|
25
|
+
return selected;
|
|
26
|
+
}
|
|
27
|
+
export function sameExactModelRoute(left, right) {
|
|
28
|
+
return sameModelRoute(left, right) && left.reasoningEffort === right.reasoningEffort;
|
|
29
|
+
}
|
|
30
|
+
/** Consumed user intent stays explicit on cold resume and profile re-admission. */
|
|
31
|
+
export function nativeModelSelectionWasAccepted(agent, intent) {
|
|
32
|
+
return policyEvents({ agent }).some((event) => event.type === "request/header" && "seq" in event
|
|
33
|
+
&& typeof event.seq === "number" && event.seq > intent.seq && isRecord(event.data)
|
|
34
|
+
&& isRecord(event.data.header) && isRecord(event.data.header.config)
|
|
35
|
+
&& sameExactModelRoute(event.data.header.config, intent.route));
|
|
36
|
+
}
|
|
37
|
+
/** Only native, machine-routable absence authorizes initial candidate admission. */
|
|
38
|
+
export function isUnavailableRouteFailure(error, nativeRequestFailure = false) {
|
|
39
|
+
return isRecord(error) && (error.status === undefined || error.status === 503)
|
|
40
|
+
&& (error.code === "NO_ADAPTER" || (error.code === "UNKNOWN_MODEL" && (nativeRequestFailure || error instanceof LlmError)));
|
|
41
|
+
}
|
|
42
|
+
export function orderedModelRoutes(candidates) {
|
|
43
|
+
const routes = [];
|
|
44
|
+
for (const route of candidates)
|
|
45
|
+
if (!routes.some((previous) => sameModelRoute(previous, route)))
|
|
46
|
+
routes.push(canonicalRoute(route));
|
|
47
|
+
return routes;
|
|
48
|
+
}
|
|
49
|
+
/** Exact metadata preparation, never a completion or advisory catalog health check. */
|
|
50
|
+
export async function selectInitialModelRoute(llm, candidates, signal) {
|
|
51
|
+
if (llm.resolveCallConfig === undefined)
|
|
52
|
+
throw new Error("dsmm route admission requires the Agent native LLM service");
|
|
53
|
+
let unavailable;
|
|
54
|
+
for (const route of orderedModelRoutes(candidates)) {
|
|
55
|
+
signal?.throwIfAborted();
|
|
56
|
+
try {
|
|
57
|
+
await llm.resolveCallConfig({ ...route }, signal);
|
|
58
|
+
signal?.throwIfAborted();
|
|
59
|
+
return { ...route };
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
signal?.throwIfAborted();
|
|
63
|
+
if (!isUnavailableRouteFailure(error))
|
|
64
|
+
throw error;
|
|
65
|
+
unavailable = error;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
throw unavailable ?? new Error("dsmm route admission has no configured candidate");
|
|
69
|
+
}
|
|
70
|
+
export function roleRouteLock(agent, identity) {
|
|
71
|
+
const lock = routeLocks.get(agent);
|
|
72
|
+
return lock?.identity === identity ? lock : undefined;
|
|
73
|
+
}
|
|
74
|
+
export function pinRoleRoute(agent, identity, route, candidates) {
|
|
75
|
+
const lock = { identity, route: canonicalRoute(route), candidates: orderedModelRoutes(candidates), generation: 0,
|
|
76
|
+
attempts: 0, startupSettled: false, retries: 0, rateLimits: 0, switches: 0, totalDelayMs: 0 };
|
|
77
|
+
routeLocks.set(agent, lock);
|
|
78
|
+
return lock;
|
|
79
|
+
}
|
|
80
|
+
export function clearRoleRouteLock(agent) { routeLocks.delete(agent); }
|
|
81
|
+
export function roleRouteRuntimeState(agent, settings, role, epoch) {
|
|
82
|
+
const resolved = resolveRoleRuntimePolicy(settings, role);
|
|
83
|
+
const identity = liveRolePolicyIdentity(agent, settings, role, epoch);
|
|
84
|
+
const lock = identity === undefined ? undefined : roleRouteLock(agent, identity);
|
|
85
|
+
return { ...(role === undefined ? {} : { role }), strategy: resolved.strategy, rateLimit: { ...resolved.rateLimit },
|
|
86
|
+
...(lock === undefined ? {} : { route: { ...lock.route } }), retries: lock?.retries ?? 0,
|
|
87
|
+
rateLimitFailures: lock?.rateLimits ?? 0, switches: lock?.switches ?? 0, totalDelayMs: lock?.totalDelayMs ?? 0 };
|
|
88
|
+
}
|
|
89
|
+
export function rolePolicyIdentity(settings, role, epoch) {
|
|
8
90
|
if (role === undefined)
|
|
9
91
|
return undefined;
|
|
10
92
|
const policy = settings.roleRouting[role];
|
|
11
|
-
|
|
12
|
-
return undefined;
|
|
93
|
+
const resolved = resolveRoleRuntimePolicy(settings, role);
|
|
13
94
|
return createHash("sha256").update(JSON.stringify({
|
|
14
|
-
version:
|
|
15
|
-
fallbackSource:
|
|
16
|
-
|
|
17
|
-
enabled: settings.runtimeRecovery.enabled
|
|
95
|
+
version: 2, role, epoch: epoch ?? null, primary: policy?.primary === undefined ? null : canonicalRoute(policy.primary),
|
|
96
|
+
fallbackSource: resolved.fallbackSource, fallbackRoutes: resolved.fallbackRoutes.map(canonicalRoute),
|
|
97
|
+
strategy: resolved.strategy, rateLimit: resolved.rateLimit
|
|
18
98
|
})).digest("hex");
|
|
19
99
|
}
|
|
100
|
+
/** Durable profile choice is not permission to retain a former process's route lock. */
|
|
101
|
+
export function liveRolePolicyIdentity(agent, settings, role, epoch) {
|
|
102
|
+
let entry = agentEntries.get(agent);
|
|
103
|
+
if (entry === undefined) {
|
|
104
|
+
entry = randomUUID();
|
|
105
|
+
agentEntries.set(agent, entry);
|
|
106
|
+
}
|
|
107
|
+
return rolePolicyIdentity(settings, role, `${epoch ?? "unscoped"}:${entry}`);
|
|
108
|
+
}
|
|
20
109
|
function canonicalRoute(route) {
|
|
21
110
|
return { provider: route.provider, model: route.model, ...(route.reasoningEffort === undefined ? {} : { reasoningEffort: route.reasoningEffort }) };
|
|
22
111
|
}
|
|
@@ -41,8 +130,9 @@ function readPolicyMarker(event) {
|
|
|
41
130
|
return { role: data.role, policy: data.policy };
|
|
42
131
|
}
|
|
43
132
|
/** Native custom events are model-hidden log facts, retained across surface compaction. */
|
|
44
|
-
export async function establishRolePolicy(frame, settings, role) {
|
|
45
|
-
const identity =
|
|
133
|
+
export async function establishRolePolicy(frame, settings, role, ctx, epoch) {
|
|
134
|
+
const identity = liveRolePolicyIdentity(frame.agent, settings, role, epoch);
|
|
135
|
+
const declared = role !== undefined && (Object.keys(settings.roleRouting[role] ?? {}).length > 0 || settings.runtimeRecovery.fallbackRoutes.length > 0);
|
|
46
136
|
if (frame.signal.aborted)
|
|
47
137
|
return identity;
|
|
48
138
|
let latest;
|
|
@@ -55,13 +145,15 @@ export async function establishRolePolicy(frame, settings, role) {
|
|
|
55
145
|
}
|
|
56
146
|
if (frame.signal.aborted || !isCurrentRecoveryStep(events, frame.turn, frame.step))
|
|
57
147
|
return identity;
|
|
58
|
-
if (identity === undefined || role === undefined) {
|
|
148
|
+
if (identity === undefined || role === undefined || !declared) {
|
|
59
149
|
if (latest !== undefined && latest.policy !== null) {
|
|
150
|
+
assertDsmmMetadataPersistence(ctx ?? frame.agent.ctx);
|
|
60
151
|
await frame.agent.session.append(DSMM_ROLE_POLICY_EVENT, { version: 1, role: latest.role, policy: null });
|
|
61
152
|
}
|
|
62
|
-
return
|
|
153
|
+
return identity;
|
|
63
154
|
}
|
|
64
155
|
if (latest?.role !== role || latest.policy !== identity) {
|
|
156
|
+
assertDsmmMetadataPersistence(ctx ?? frame.agent.ctx);
|
|
65
157
|
await frame.agent.session.append(DSMM_ROLE_POLICY_EVENT, { version: 1, role, policy: identity });
|
|
66
158
|
}
|
|
67
159
|
return identity;
|
|
@@ -75,10 +167,7 @@ export function takeAdmittedRecoveryRoute(frame) {
|
|
|
75
167
|
return route;
|
|
76
168
|
}
|
|
77
169
|
export function effectiveRoleFallbackRoutes(settings, role) {
|
|
78
|
-
|
|
79
|
-
return [];
|
|
80
|
-
return role === undefined ? settings.runtimeRecovery.fallbackRoutes
|
|
81
|
-
: settings.roleRouting[role]?.fallbackRoutes ?? settings.runtimeRecovery.fallbackRoutes;
|
|
170
|
+
return resolveRoleRuntimePolicy(settings, role).fallbackRoutes;
|
|
82
171
|
}
|
|
83
172
|
export function applyModelRoute(config, route) {
|
|
84
173
|
const { reasoningEffort: _inheritedEffort, ...preserved } = config;
|
|
@@ -91,16 +180,10 @@ export function sameModelRoute(left, right) {
|
|
|
91
180
|
export function persistedRoleRoute(frame, primary, fallbacks = [], identity) {
|
|
92
181
|
const events = policyEvents(frame);
|
|
93
182
|
let matchingPolicy = false;
|
|
94
|
-
let sawPrimary = false;
|
|
95
|
-
let initial;
|
|
96
|
-
let sawChange = false;
|
|
97
183
|
let selected;
|
|
98
184
|
for (const event of events) {
|
|
99
185
|
if (isPresetBoundary(frame, event) || event.type === DSMM_ROLE_POLICY_EVENT) {
|
|
100
186
|
matchingPolicy = event.type === DSMM_ROLE_POLICY_EVENT && identity !== undefined && readPolicyMarker(event)?.policy === identity;
|
|
101
|
-
sawPrimary = false;
|
|
102
|
-
initial = undefined;
|
|
103
|
-
sawChange = false;
|
|
104
187
|
selected = undefined;
|
|
105
188
|
continue;
|
|
106
189
|
}
|
|
@@ -116,22 +199,14 @@ export function persistedRoleRoute(frame, primary, fallbacks = [], identity) {
|
|
|
116
199
|
if (typeof config?.provider !== "string" || config.provider.trim() === ""
|
|
117
200
|
|| typeof config.model !== "string" || config.model.trim() === "")
|
|
118
201
|
continue;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
sawPrimary = true;
|
|
124
|
-
else if (primary === undefined ? sawChange : sawPrimary)
|
|
125
|
-
selected = {
|
|
126
|
-
provider: config.provider, model: config.model,
|
|
127
|
-
...(typeof config.reasoningEffort === "string" && !adapterDefaultEffort(header) ? { reasoningEffort: config.reasoningEffort } : {})
|
|
128
|
-
};
|
|
129
|
-
if (primary !== undefined && sameModelRoute(config, primary))
|
|
130
|
-
selected = undefined;
|
|
202
|
+
selected = {
|
|
203
|
+
provider: config.provider, model: config.model,
|
|
204
|
+
...(typeof config.reasoningEffort === "string" && !adapterDefaultEffort(header) ? { reasoningEffort: config.reasoningEffort } : {})
|
|
205
|
+
};
|
|
131
206
|
}
|
|
132
207
|
// A configured fallback remains exact after its adapter/default header is
|
|
133
208
|
// persisted. A later non-chain durable host route remains host-owned instead.
|
|
134
|
-
return selected === undefined ? undefined : fallbacks.find((route) => sameModelRoute(route, selected)) ?? selected;
|
|
209
|
+
return selected === undefined ? undefined : [primary, ...fallbacks].find((route) => route !== undefined && sameModelRoute(route, selected)) ?? selected;
|
|
135
210
|
}
|
|
136
211
|
function isRecord(value) {
|
|
137
212
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
package/lib/role-subagents.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DshContext } from "./dsh-types.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { DsmmSettingsGetter } from "./settings.js";
|
|
3
3
|
import type { DeepworkModeController } from "./state.js";
|
|
4
4
|
/** The DSH headless runner never mounts Agent presets; give it role-specific native tools. */
|
|
5
|
-
export declare function registerHeadlessRoleTools(ctx: DshContext, controller: DeepworkModeController, getSettings:
|
|
5
|
+
export declare function registerHeadlessRoleTools(ctx: DshContext, controller: DeepworkModeController, getSettings: DsmmSettingsGetter): void;
|
|
6
6
|
//# sourceMappingURL=role-subagents.d.ts.map
|
package/lib/role-subagents.js
CHANGED
|
@@ -20,16 +20,16 @@ export function registerHeadlessRoleTools(ctx, controller, getSettings) {
|
|
|
20
20
|
throw new Error("dsmm headless role tools require Agent-scoped Cordis plugin and tool guard services");
|
|
21
21
|
installed.add(agentCtx);
|
|
22
22
|
try {
|
|
23
|
-
const settings = getSettings();
|
|
23
|
+
const settings = getSettings(agent);
|
|
24
24
|
const roles = DSMM_ROLES.filter((role) => role.id !== "dsmm-orchestrator" && settings.roles[role.id]);
|
|
25
25
|
const names = new Set(roles.map((role) => role.id.replace(/-/gu, "_")));
|
|
26
26
|
const guard = agentCtx.tools.guard((execution) => {
|
|
27
27
|
if (!names.has(execution.name))
|
|
28
28
|
return undefined;
|
|
29
|
-
const current = getSettings();
|
|
29
|
+
const current = getSettings(execution.agent);
|
|
30
30
|
if (controller.active(execution.agent, current.defaultActive) || isDsmmRoleId(resolveSelectedAgentPreset(execution.agent?.session)))
|
|
31
31
|
return undefined;
|
|
32
|
-
return "
|
|
32
|
+
return "DW role tools require an active Deepwork session or DW-selected preset";
|
|
33
33
|
});
|
|
34
34
|
agentCtx.effect?.(() => guard);
|
|
35
35
|
const catalog = agentCtx.tools;
|
|
@@ -38,7 +38,9 @@ export function registerHeadlessRoleTools(ctx, controller, getSettings) {
|
|
|
38
38
|
// Agent creation is awaited before first prompt assembly. Mounting here
|
|
39
39
|
// sees the Agent-isolated systemPrompt/tools and avoids leaking tools to
|
|
40
40
|
// its sibling sessions or the read-only child being delegated.
|
|
41
|
-
|
|
41
|
+
// Model routing belongs to the parent's admitted profile, not the tool's
|
|
42
|
+
// standing composition. The role provider validates it before spawning.
|
|
43
|
+
await agentCtx.plugin(nativeSubagentTool, roleSubagentConfig(role, availableTools));
|
|
42
44
|
}
|
|
43
45
|
agentCtx.effect?.(() => () => installed.delete(agentCtx));
|
|
44
46
|
}
|
package/lib/roles.d.ts
CHANGED
|
@@ -2,17 +2,21 @@ import type { DsmmSkillName } from "./skills.js";
|
|
|
2
2
|
import type { DsmmModelRoute, DsmmRoleRouting } from "./settings.js";
|
|
3
3
|
export declare const DSMM_ROLE_IDS: readonly ["dsmm-orchestrator", "dsmm-planner", "dsmm-plan-critic", "dsmm-builder", "dsmm-reviewer", "dsmm-oracle", "dsmm-oracle-2nd", "dsmm-creative", "dsmm-code-search", "dsmm-doc-search", "dsmm-clarifier", "dsmm-media-reader"];
|
|
4
4
|
export type DsmmRoleId = (typeof DSMM_ROLE_IDS)[number];
|
|
5
|
+
export type DsmmRoleMode = "primary" | "all" | "subagent";
|
|
5
6
|
export interface DsmmRoleDefinition {
|
|
6
7
|
id: DsmmRoleId;
|
|
7
8
|
name: string;
|
|
8
9
|
description: string;
|
|
9
10
|
order: number;
|
|
11
|
+
mode: DsmmRoleMode;
|
|
10
12
|
enabledByDefault: boolean;
|
|
11
13
|
access?: "read-only" | "write";
|
|
12
14
|
persona: string;
|
|
13
15
|
}
|
|
14
16
|
export declare const DSMM_ROLES: readonly DsmmRoleDefinition[];
|
|
15
17
|
export declare function isDsmmRoleId(value: unknown): value is DsmmRoleId;
|
|
18
|
+
/** Root exposure is separate from whether a role is enabled for delegation. */
|
|
19
|
+
export declare function isRootRole(role: Pick<DsmmRoleDefinition, "mode">): boolean;
|
|
16
20
|
export declare function renderAgentCordis(role: DsmmRoleDefinition, skills?: readonly DsmmSkillName[], enabledRoles?: readonly DsmmRoleId[], roleRouting?: DsmmRoleRouting): string;
|
|
17
21
|
export interface RolePluginRow {
|
|
18
22
|
id: string;
|
package/lib/roles.js
CHANGED
|
@@ -17,11 +17,12 @@ export const DSMM_ROLE_IDS = [
|
|
|
17
17
|
export const DSMM_ROLES = [
|
|
18
18
|
{
|
|
19
19
|
id: "dsmm-orchestrator",
|
|
20
|
-
name: "
|
|
21
|
-
description: "Coordinates
|
|
20
|
+
name: "DW Orchestrator",
|
|
21
|
+
description: "Coordinates Deepwork sessions and routes work to focused DW roles.",
|
|
22
22
|
order: 10,
|
|
23
|
+
mode: "primary",
|
|
23
24
|
enabledByDefault: true,
|
|
24
|
-
persona: `You are dsmm-orchestrator, a dsh-native coordinator for deepwork sessions.
|
|
25
|
+
persona: `You are DW Orchestrator (role ID: dsmm-orchestrator), a dsh-native coordinator for deepwork sessions.
|
|
25
26
|
For complex behavior implementation, default to planner → plan-critic → implementation; for simple bounded low-risk work, proceed directly. A clear implementation request authorizes its stated scope without repeated design approval.
|
|
26
27
|
Delegate bounded work only through callable role-specific DSH tools: dsmm-planner, dsmm-plan-critic, dsmm-builder, dsmm-reviewer, dsmm-oracle, dsmm-oracle-2nd, dsmm-creative, dsmm-code-search, dsmm-doc-search, dsmm-clarifier and dsmm-media-reader.
|
|
27
28
|
Reviewer is primary-lane self-review; use Oracle only for a useful external cross-check when a different model was explicitly selected. Review when risk warrants it, not in a fixed loop.
|
|
@@ -29,111 +30,122 @@ Keep scope explicit, preserve user constraints, and do not claim a preset is act
|
|
|
29
30
|
},
|
|
30
31
|
{
|
|
31
32
|
id: "dsmm-planner",
|
|
32
|
-
name: "
|
|
33
|
+
name: "DW Planner",
|
|
33
34
|
description: "Turns approved scope into ordered implementation steps with verification gates.",
|
|
34
35
|
order: 20,
|
|
36
|
+
mode: "all",
|
|
35
37
|
enabledByDefault: true,
|
|
36
38
|
access: "read-only",
|
|
37
|
-
persona: `You are dsmm-planner, a dsh-native planning specialist.
|
|
39
|
+
persona: `You are DW Planner (role ID: dsmm-planner), a dsh-native planning specialist.
|
|
38
40
|
Inspect evidence and convert approved complex work into an outcome-oriented plan with dependencies, interfaces, risks and verification. Do not implement or modify files. Flag decisions that change scope, safety or public APIs. Git writes need specific authorization.`
|
|
39
41
|
},
|
|
40
42
|
{
|
|
41
43
|
id: "dsmm-plan-critic",
|
|
42
|
-
name: "
|
|
44
|
+
name: "DW Plan Critic",
|
|
43
45
|
description: "Checks implementation plans for ambiguity, missing evidence, and unsafe sequencing.",
|
|
44
46
|
order: 30,
|
|
47
|
+
mode: "subagent",
|
|
45
48
|
enabledByDefault: true,
|
|
46
49
|
access: "read-only",
|
|
47
|
-
persona: `You are dsmm-plan-critic, a dsh-native plan review specialist.
|
|
50
|
+
persona: `You are DW Plan Critic (role ID: dsmm-plan-critic), a dsh-native plan review specialist.
|
|
48
51
|
Inspect the plan and evidence for material blockers in outcome coverage, dependencies, tests, safety and scope. Return concrete blockers or a concise pass with residual risks; do not require a fixed format or repeated reviews after editorial changes. Read only; do not implement or perform Git writes.`
|
|
49
52
|
},
|
|
50
53
|
{
|
|
51
54
|
id: "dsmm-builder",
|
|
52
|
-
name: "
|
|
55
|
+
name: "DW Builder",
|
|
53
56
|
description: "Implements one bounded approved outcome and verifies the changed surface.",
|
|
54
57
|
order: 35,
|
|
58
|
+
mode: "primary",
|
|
55
59
|
enabledByDefault: true,
|
|
56
60
|
access: "write",
|
|
57
|
-
persona: `You are dsmm-builder, a bounded implementation worker. Respect assigned file ownership and other workers' changes. Implement only the approved outcome, verify the affected surface, and report changes, evidence and risks. Escalate changes to public APIs, permissions, safety, data guarantees or irreversible behavior. Never stage, commit, push, tag, rebase or release without specific authorization.`
|
|
61
|
+
persona: `You are DW Builder (role ID: dsmm-builder), a bounded implementation worker. Respect assigned file ownership and other workers' changes. Implement only the approved outcome, verify the affected surface, and report changes, evidence and risks. Escalate changes to public APIs, permissions, safety, data guarantees or irreversible behavior. Never stage, commit, push, tag, rebase or release without specific authorization.`
|
|
58
62
|
},
|
|
59
63
|
{
|
|
60
64
|
id: "dsmm-reviewer",
|
|
61
|
-
name: "
|
|
65
|
+
name: "DW Reviewer",
|
|
62
66
|
description: "Reviews completed changes against requirements, tests, and regression risk.",
|
|
63
67
|
order: 40,
|
|
68
|
+
mode: "subagent",
|
|
64
69
|
enabledByDefault: true,
|
|
65
70
|
access: "read-only",
|
|
66
|
-
persona: `You are dsmm-reviewer, a dsh-native implementation reviewer.
|
|
71
|
+
persona: `You are DW Reviewer (role ID: dsmm-reviewer), a dsh-native implementation reviewer.
|
|
67
72
|
Read the current implementation diff and new files against requirements, conventions and verification. Prioritize actionable correctness and regression findings. This is primary-model or primary-lane self-review, not external Oracle review. Do not modify files or perform Git writes.`
|
|
68
73
|
},
|
|
69
74
|
{
|
|
70
75
|
id: "dsmm-oracle",
|
|
71
|
-
name: "
|
|
76
|
+
name: "DW Oracle",
|
|
72
77
|
description: "First-priority external-model implementation cross-check when explicitly configured.",
|
|
73
78
|
order: 42,
|
|
79
|
+
mode: "subagent",
|
|
74
80
|
enabledByDefault: true,
|
|
75
81
|
access: "read-only",
|
|
76
|
-
persona: `You are dsmm-oracle, first-priority implementation cross-check. Read only; inspect the current diff, evidence and requirements for concrete defects. Your role is externally heterogeneous only when the caller selects a different available model; do not claim model independence when inheriting the parent's route. Do not implement or perform Git writes.`
|
|
82
|
+
persona: `You are DW Oracle (role ID: dsmm-oracle), first-priority implementation cross-check. Read only; inspect the current diff, evidence and requirements for concrete defects. Your role is externally heterogeneous only when the caller selects a different available model; do not claim model independence when inheriting the parent's route. Do not implement or perform Git writes.`
|
|
77
83
|
},
|
|
78
84
|
{
|
|
79
85
|
id: "dsmm-oracle-2nd",
|
|
80
|
-
name: "
|
|
86
|
+
name: "DW Oracle 2nd",
|
|
81
87
|
description: "Second-priority external-model implementation cross-check for an additional evidence need.",
|
|
82
88
|
order: 44,
|
|
89
|
+
mode: "subagent",
|
|
83
90
|
enabledByDefault: true,
|
|
84
91
|
access: "read-only",
|
|
85
|
-
persona: `You are dsmm-oracle-2nd, second-priority implementation cross-check, not a higher-capability rank. Read only; report concrete defects in the current diff and evidence. An external model must be explicitly selected; the role label alone is no proof of independence. Do not implement or perform Git writes.`
|
|
92
|
+
persona: `You are DW Oracle 2nd (role ID: dsmm-oracle-2nd), second-priority implementation cross-check, not a higher-capability rank. Read only; report concrete defects in the current diff and evidence. An external model must be explicitly selected; the role label alone is no proof of independence. Do not implement or perform Git writes.`
|
|
86
93
|
},
|
|
87
94
|
{
|
|
88
95
|
id: "dsmm-creative",
|
|
89
|
-
name: "
|
|
96
|
+
name: "DW Creative",
|
|
90
97
|
description: "Explores unconventional but coherent approaches and explicit trade-offs.",
|
|
91
98
|
order: 46,
|
|
99
|
+
mode: "subagent",
|
|
92
100
|
enabledByDefault: true,
|
|
93
101
|
access: "read-only",
|
|
94
|
-
persona: `You are dsmm-creative. Explore distinct coherent approaches, state trade-offs, constraints and a grounded recommendation. Remain read-only unless a separate implementation assignment authorizes changes. Do not perform Git writes.`
|
|
102
|
+
persona: `You are DW Creative (role ID: dsmm-creative). Explore distinct coherent approaches, state trade-offs, constraints and a grounded recommendation. Remain read-only unless a separate implementation assignment authorizes changes. Do not perform Git writes.`
|
|
95
103
|
},
|
|
96
104
|
{
|
|
97
105
|
id: "dsmm-code-search",
|
|
98
|
-
name: "
|
|
106
|
+
name: "DW Code Search",
|
|
99
107
|
description: "Finds local codebase facts, symbols, patterns, and relevant implementation context.",
|
|
100
108
|
order: 50,
|
|
109
|
+
mode: "subagent",
|
|
101
110
|
enabledByDefault: true,
|
|
102
111
|
access: "read-only",
|
|
103
|
-
persona: `You are dsmm-code-search, a dsh-native codebase research specialist.
|
|
112
|
+
persona: `You are DW Code Search (role ID: dsmm-code-search), a dsh-native codebase research specialist.
|
|
104
113
|
Search local project context for exact files, symbols, references, and conventions needed by the caller.
|
|
105
114
|
Summarize findings with paths and evidence; do not modify files.`
|
|
106
115
|
},
|
|
107
116
|
{
|
|
108
117
|
id: "dsmm-doc-search",
|
|
109
|
-
name: "
|
|
118
|
+
name: "DW Doc Search",
|
|
110
119
|
description: "Finds current external documentation and examples for library or API questions.",
|
|
111
120
|
order: 60,
|
|
121
|
+
mode: "subagent",
|
|
112
122
|
enabledByDefault: true,
|
|
113
123
|
access: "read-only",
|
|
114
|
-
persona: `You are dsmm-doc-search, a dsh-native documentation research specialist.
|
|
124
|
+
persona: `You are DW Doc Search (role ID: dsmm-doc-search), a dsh-native documentation research specialist.
|
|
115
125
|
Find current documentation and real examples for libraries, APIs, CLIs, and services relevant to the task.
|
|
116
126
|
Cite source locations, separate facts from assumptions, and avoid guessing when documentation is unavailable.`
|
|
117
127
|
},
|
|
118
128
|
{
|
|
119
129
|
id: "dsmm-clarifier",
|
|
120
|
-
name: "
|
|
130
|
+
name: "DW Clarifier",
|
|
121
131
|
description: "Reduces ambiguous requests to the few decisions needed before planning or implementation.",
|
|
122
132
|
order: 70,
|
|
133
|
+
mode: "subagent",
|
|
123
134
|
enabledByDefault: true,
|
|
124
135
|
access: "read-only",
|
|
125
|
-
persona: `You are dsmm-clarifier, a dsh-native requirements clarification specialist.
|
|
136
|
+
persona: `You are DW Clarifier (role ID: dsmm-clarifier), a dsh-native requirements clarification specialist.
|
|
126
137
|
Identify ambiguity in purpose, constraints, success criteria, and scope boundaries.
|
|
127
138
|
Ask at most three material questions, prefer concrete choices, and propose safe defaults when evidence is strong.`
|
|
128
139
|
},
|
|
129
140
|
{
|
|
130
141
|
id: "dsmm-media-reader",
|
|
131
|
-
name: "
|
|
142
|
+
name: "DW Media Reader",
|
|
132
143
|
description: "Extracts implementation-relevant information from images, PDFs, and visual artifacts.",
|
|
133
144
|
order: 80,
|
|
145
|
+
mode: "subagent",
|
|
134
146
|
enabledByDefault: true,
|
|
135
147
|
access: "read-only",
|
|
136
|
-
persona: `You are dsmm-media-reader, a dsh-native visual and document analysis specialist.
|
|
148
|
+
persona: `You are DW Media Reader (role ID: dsmm-media-reader), a dsh-native visual and document analysis specialist.
|
|
137
149
|
Extract text, structure, UI details, diagrams, and implementation-relevant facts from provided media.
|
|
138
150
|
Report uncertainty clearly and avoid inventing details that are not visible.`
|
|
139
151
|
}
|
|
@@ -141,14 +153,18 @@ Report uncertainty clearly and avoid inventing details that are not visible.`
|
|
|
141
153
|
export function isDsmmRoleId(value) {
|
|
142
154
|
return typeof value === "string" && DSMM_ROLE_IDS.includes(value);
|
|
143
155
|
}
|
|
156
|
+
/** Root exposure is separate from whether a role is enabled for delegation. */
|
|
157
|
+
export function isRootRole(role) {
|
|
158
|
+
return role.mode === "primary" || role.mode === "all";
|
|
159
|
+
}
|
|
144
160
|
export function renderAgentCordis(role, skills = DSMM_SKILL_NAMES, enabledRoles = DSMM_ROLE_IDS, roleRouting = {}) {
|
|
145
161
|
return rolePluginRows(role, skills, enabledRoles, roleRouting).map(renderPluginRow).join("");
|
|
146
162
|
}
|
|
147
163
|
/** The native PresetDefinition and the static YAML mirror use this same inventory. */
|
|
148
164
|
export function rolePluginRows(role, skills = DSMM_SKILL_NAMES, enabledRoles = DSMM_ROLE_IDS, roleRouting = {}) {
|
|
149
165
|
const rows = [
|
|
150
|
-
{ id: "persona", name: "@deepseek-ai/dsh-persona", config: {
|
|
151
|
-
{ id: "agent-instructions", name: "@deepseek-ai/dsh-agent-instructions" },
|
|
166
|
+
{ id: "persona", name: "@deepseek-ai/dsh-persona", config: { prefix: role.persona } },
|
|
167
|
+
{ id: "agent-instructions", name: "@deepseek-ai/dsh-agent-instructions", config: { maxBytes: 65536 } },
|
|
152
168
|
{ id: "tool-fs", name: "@deepseek-ai/dsh-tool-fs" },
|
|
153
169
|
{ id: "tool-fs-search", name: "@deepseek-ai/dsh-tool-fs-search", config: { sampleOverCapGlobResults: false } },
|
|
154
170
|
{ id: "tool-web", name: "@deepseek-ai/dsh-tool-web", config: { fetch: true } },
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Browser-safe route policy grammar shared by settings, profiles and native UI. */
|
|
2
|
+
import type { DsmmRoleId } from "./roles.js";
|
|
3
|
+
import type { DsmmResolvedRoleRuntimePolicy, DsmmSettings } from "./settings.js";
|
|
4
|
+
export type DsmmRoutingStrategy = "startup-lock" | "rate-limit-fallback";
|
|
5
|
+
export interface DsmmRateLimitPolicy {
|
|
6
|
+
/** Same-route requests after the first attempt. */
|
|
7
|
+
maxRetries: number;
|
|
8
|
+
initialDelayMs: number;
|
|
9
|
+
maxDelayMs: number;
|
|
10
|
+
maxTotalDelayMs: number;
|
|
11
|
+
/** Distinct failed native attempts, including the first attempt. */
|
|
12
|
+
switchAfterRateLimits: number;
|
|
13
|
+
maxSwitches: number;
|
|
14
|
+
}
|
|
15
|
+
export interface DsmmRuntimePolicyConfig {
|
|
16
|
+
strategy?: DsmmRoutingStrategy;
|
|
17
|
+
rateLimit?: Partial<DsmmRateLimitPolicy>;
|
|
18
|
+
}
|
|
19
|
+
export interface DsmmRuntimePolicySettings {
|
|
20
|
+
strategy: DsmmRoutingStrategy;
|
|
21
|
+
rateLimit: DsmmRateLimitPolicy;
|
|
22
|
+
}
|
|
23
|
+
export declare const DEFAULT_DSMM_RATE_LIMIT_POLICY: Readonly<DsmmRateLimitPolicy>;
|
|
24
|
+
export declare const DEFAULT_DSMM_RUNTIME_POLICY: Readonly<DsmmRuntimePolicySettings>;
|
|
25
|
+
export declare const DSMM_RATE_LIMIT_BOUNDS: Readonly<Record<keyof DsmmRateLimitPolicy, readonly [number, number]>>;
|
|
26
|
+
export declare function normalizeRoutingStrategy(value: unknown): DsmmRoutingStrategy;
|
|
27
|
+
export declare function normalizeRateLimitOverrides(value: unknown): Partial<DsmmRateLimitPolicy>;
|
|
28
|
+
export declare function normalizeRateLimitPolicy(value?: unknown, defaults?: Readonly<DsmmRateLimitPolicy>): DsmmRateLimitPolicy;
|
|
29
|
+
export declare function normalizeRuntimePolicy(value?: unknown): DsmmRuntimePolicySettings;
|
|
30
|
+
/** Resolve once per immutable settings admission; omission and explicit [] remain distinct. */
|
|
31
|
+
export declare function resolveRoleRuntimePolicy(settings: DsmmSettings, role?: DsmmRoleId): DsmmResolvedRoleRuntimePolicy;
|
|
32
|
+
//# sourceMappingURL=routing-policy.d.ts.map
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export const DEFAULT_DSMM_RATE_LIMIT_POLICY = Object.freeze({
|
|
2
|
+
maxRetries: 3,
|
|
3
|
+
initialDelayMs: 500,
|
|
4
|
+
maxDelayMs: 10000,
|
|
5
|
+
maxTotalDelayMs: 30000,
|
|
6
|
+
switchAfterRateLimits: 3,
|
|
7
|
+
maxSwitches: 2
|
|
8
|
+
});
|
|
9
|
+
export const DEFAULT_DSMM_RUNTIME_POLICY = Object.freeze({
|
|
10
|
+
strategy: "startup-lock",
|
|
11
|
+
rateLimit: DEFAULT_DSMM_RATE_LIMIT_POLICY
|
|
12
|
+
});
|
|
13
|
+
export const DSMM_RATE_LIMIT_BOUNDS = Object.freeze({
|
|
14
|
+
maxRetries: Object.freeze([0, 10]),
|
|
15
|
+
initialDelayMs: Object.freeze([0, 30000]),
|
|
16
|
+
maxDelayMs: Object.freeze([0, 30000]),
|
|
17
|
+
maxTotalDelayMs: Object.freeze([0, 120000]),
|
|
18
|
+
switchAfterRateLimits: Object.freeze([1, 10]),
|
|
19
|
+
maxSwitches: Object.freeze([0, 10])
|
|
20
|
+
});
|
|
21
|
+
export function normalizeRoutingStrategy(value) {
|
|
22
|
+
if (value !== "startup-lock" && value !== "rate-limit-fallback") {
|
|
23
|
+
throw new TypeError("dsmm strategy must be startup-lock or rate-limit-fallback");
|
|
24
|
+
}
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
export function normalizeRateLimitOverrides(value) {
|
|
28
|
+
if (!isRecord(value))
|
|
29
|
+
throw new TypeError("dsmm rateLimit must be an object");
|
|
30
|
+
const result = {};
|
|
31
|
+
for (const [field, raw] of Object.entries(value)) {
|
|
32
|
+
if (!Object.hasOwn(DSMM_RATE_LIMIT_BOUNDS, field))
|
|
33
|
+
throw new TypeError("dsmm rateLimit contains an unknown field");
|
|
34
|
+
const [minimum, maximum] = DSMM_RATE_LIMIT_BOUNDS[field];
|
|
35
|
+
if (typeof raw !== "number" || !Number.isSafeInteger(raw) || raw < minimum || raw > maximum) {
|
|
36
|
+
throw new TypeError(`dsmm rateLimit ${field} must be an integer from ${minimum} to ${maximum}`);
|
|
37
|
+
}
|
|
38
|
+
result[field] = raw;
|
|
39
|
+
}
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
export function normalizeRateLimitPolicy(value = undefined, defaults = DEFAULT_DSMM_RATE_LIMIT_POLICY) {
|
|
43
|
+
return { ...defaults, ...(value === undefined ? {} : normalizeRateLimitOverrides(value)) };
|
|
44
|
+
}
|
|
45
|
+
export function normalizeRuntimePolicy(value = undefined) {
|
|
46
|
+
if (value === undefined)
|
|
47
|
+
return { strategy: "startup-lock", rateLimit: { ...DEFAULT_DSMM_RATE_LIMIT_POLICY } };
|
|
48
|
+
if (!isRecord(value) || Object.keys(value).some((key) => key !== "strategy" && key !== "rateLimit")) {
|
|
49
|
+
throw new TypeError("dsmm runtimePolicy must contain only strategy and rateLimit");
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
strategy: Object.hasOwn(value, "strategy") ? normalizeRoutingStrategy(value.strategy) : "startup-lock",
|
|
53
|
+
rateLimit: normalizeRateLimitPolicy(Object.hasOwn(value, "rateLimit") ? normalizeRateLimitOverrides(value.rateLimit) : undefined)
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function isRecord(value) {
|
|
57
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
58
|
+
}
|
|
59
|
+
const resolvedRoleRuntimePolicies = new WeakMap();
|
|
60
|
+
/** Resolve once per immutable settings admission; omission and explicit [] remain distinct. */
|
|
61
|
+
export function resolveRoleRuntimePolicy(settings, role) {
|
|
62
|
+
let policies = resolvedRoleRuntimePolicies.get(settings);
|
|
63
|
+
if (policies === undefined) {
|
|
64
|
+
policies = new Map();
|
|
65
|
+
resolvedRoleRuntimePolicies.set(settings, policies);
|
|
66
|
+
}
|
|
67
|
+
const existing = policies.get(role);
|
|
68
|
+
if (existing !== undefined)
|
|
69
|
+
return existing;
|
|
70
|
+
const configured = role === undefined ? undefined : settings.roleRouting[role];
|
|
71
|
+
const defaults = settings.runtimePolicy;
|
|
72
|
+
const primary = configured?.primary === undefined ? undefined : Object.freeze({ ...configured.primary });
|
|
73
|
+
const seen = new Set(primary === undefined ? [] : [JSON.stringify([primary.provider, primary.model])]);
|
|
74
|
+
const fallbacks = [];
|
|
75
|
+
for (const route of configured?.fallbackRoutes ?? settings.runtimeRecovery.fallbackRoutes) {
|
|
76
|
+
const identity = JSON.stringify([route.provider, route.model]);
|
|
77
|
+
if (seen.has(identity))
|
|
78
|
+
continue;
|
|
79
|
+
seen.add(identity);
|
|
80
|
+
fallbacks.push(Object.freeze({ ...route }));
|
|
81
|
+
}
|
|
82
|
+
const policy = Object.freeze({
|
|
83
|
+
strategy: configured?.strategy ?? defaults.strategy,
|
|
84
|
+
rateLimit: Object.freeze(normalizeRateLimitPolicy(configured?.rateLimit, defaults.rateLimit)),
|
|
85
|
+
...(primary === undefined ? {} : { primary }),
|
|
86
|
+
fallbackRoutes: Object.freeze(fallbacks),
|
|
87
|
+
fallbackSource: configured?.fallbackRoutes === undefined ? "global" : "role"
|
|
88
|
+
});
|
|
89
|
+
policies.set(role, policy);
|
|
90
|
+
return policy;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=routing-policy.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DshContext } from "./dsh-types.js";
|
|
2
|
-
import type {
|
|
2
|
+
import type { DsmmSettingsGetter } from "./settings.js";
|
|
3
3
|
import type { DeepworkModeController } from "./state.js";
|
|
4
|
-
export declare function registerRuntimeRecovery(ctx: DshContext, controller: DeepworkModeController, getSettings:
|
|
4
|
+
export declare function registerRuntimeRecovery(ctx: DshContext, controller: DeepworkModeController, getSettings: DsmmSettingsGetter): void;
|
|
5
5
|
//# sourceMappingURL=runtime-recovery.d.ts.map
|