@morlay/dsh-session-mode 0.0.13 → 0.0.14-alpha.0
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/dist/{catalog-K5cESbqA.cjs → catalog-C_6kb1aC.cjs} +2 -3
- package/dist/{catalog-DWxIg3qw.mjs → catalog-D-n_RctY.mjs} +2 -3
- package/dist/{catalog-remote-KXJjDaN6.mjs → catalog-remote-Cz8L_Zrl.mjs} +1 -2
- package/dist/{catalog-remote-B7ZgYqun.cjs → catalog-remote-DWV4E4Vo.cjs} +1 -2
- package/dist/client.cjs +1228 -520
- package/dist/client.d.cts +0 -14
- package/dist/client.d.mts +0 -14
- package/dist/client.mjs +11 -22
- package/dist/index.cjs +62 -42
- package/dist/index.d.mts +9 -7
- package/dist/index.mjs +62 -42
- package/dist/rows.cjs +8 -6
- package/dist/rows.d.mts +1 -3
- package/dist/rows.mjs +8 -6
- package/dist/{shared-BusmswG5.cjs → shared-DO1nZbJ0.cjs} +2 -4
- package/dist/{shared-DX2Giyh3.mjs → shared-vjlwxiMt.mjs} +1 -2
- package/dist/testing.cjs +2 -2
- package/dist/testing.d.mts +0 -4
- package/dist/testing.mjs +2 -2
- package/package.json +56 -56
- package/src/index.ts +62 -21
- package/src/mode-sources.ts +6 -3
- package/src/scope.ts +53 -36
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { t as SessionModeCatalog } from "./catalog-
|
|
2
|
-
import { n as SESSION_MODE_PATH, t as POLICY_NAMES } from "./shared-
|
|
1
|
+
import { t as SessionModeCatalog } from "./catalog-D-n_RctY.mjs";
|
|
2
|
+
import { n as SESSION_MODE_PATH, t as POLICY_NAMES } from "./shared-vjlwxiMt.mjs";
|
|
3
3
|
import { Service } from "@deepseek-ai/cordis";
|
|
4
|
+
import { modelSelectionProjectionDefinition } from "@deepseek-ai/dsh-agent";
|
|
4
5
|
import { ReasoningEffortId } from "@deepseek-ai/dsh-llm";
|
|
6
|
+
import { agentPresetProjectionDefinition } from "@deepseek-ai/dsh-agent-preset-registry";
|
|
5
7
|
import { z } from "zod";
|
|
6
8
|
import z$1 from "@deepseek-ai/schemastery";
|
|
7
9
|
import { PERSONA_PREFIX_SECTION, PERSONA_SUFFIX_SECTION } from "@deepseek-ai/dsh-system-prompt";
|
|
8
|
-
|
|
10
|
+
// src/modes.ts
|
|
9
11
|
function derivedSkills(mode) {
|
|
10
12
|
return (mode.allowTools.length === 0 || mode.allowTools.includes("skill")) && !mode.denyTools.includes("skill");
|
|
11
13
|
}
|
|
@@ -121,8 +123,7 @@ function configProblem(config) {
|
|
|
121
123
|
}).map(([id]) => id);
|
|
122
124
|
if (partial.length > 0) return `session-mode: mode(s) ${partial.join(", ")} declare \`defaultModel\` without both \`provider\` and \`model\``;
|
|
123
125
|
}
|
|
124
|
-
|
|
125
|
-
//#region src/persona.ts
|
|
126
|
+
// src/persona.ts
|
|
126
127
|
const PREFIX_ORDER = "DEPLOYMENT_PERSONA_PREFIX";
|
|
127
128
|
const SUFFIX_ORDER = "DEPLOYMENT_PERSONA_SUFFIX";
|
|
128
129
|
function installPersona(agent, persona) {
|
|
@@ -140,13 +141,7 @@ function installPersona(agent, persona) {
|
|
|
140
141
|
for (const dispose of disposers) dispose();
|
|
141
142
|
};
|
|
142
143
|
}
|
|
143
|
-
|
|
144
|
-
//#region src/scope.ts
|
|
145
|
-
const OUT_OF_SCOPE = (toolName, modeName) => `${toolName} 不在「${modeName}」的工具白名单里,用它不会有结果;按当前模式提供的工具完成任务,或让用户切到别的模式。`;
|
|
146
|
-
const DENYLISTED = (toolName, modeName) => `${toolName} 被「${modeName}」的工具黑名单排除,用它不会有结果;按当前模式提供的工具完成任务,或让用户切到别的模式。`;
|
|
147
|
-
function refusalOf(toolName, modeName, denial) {
|
|
148
|
-
return denial === "denylisted" ? DENYLISTED(toolName, modeName) : OUT_OF_SCOPE(toolName, modeName);
|
|
149
|
-
}
|
|
144
|
+
// src/scope.ts
|
|
150
145
|
const SKILL_OUT_OF_SCOPE = (skillName, modeName) => `${skillName} 不在「${modeName}」的技能白名单里,加载它不会有结果;按当前模式可用的技能完成任务,或让用户切到别的模式。`;
|
|
151
146
|
const SKILL_DENYLISTED = (skillName, modeName) => `${skillName} 被「${modeName}」的技能黑名单排除,加载它不会有结果;按当前模式可用的技能完成任务,或让用户切到别的模式。`;
|
|
152
147
|
function skillRefusalOf(skillName, modeName, denial) {
|
|
@@ -223,8 +218,7 @@ var SessionScope = class {
|
|
|
223
218
|
const result = await next();
|
|
224
219
|
return {
|
|
225
220
|
...result,
|
|
226
|
-
sections: result.sections.filter((section) => section.name.startsWith(TOOL_SECTION_PREFIX) ? denialOf(gate, section.name.slice(5)) === void 0 : true)
|
|
227
|
-
tools: result.tools.filter((tool) => denialOf(gate, tool.name) === void 0)
|
|
221
|
+
sections: result.sections.filter((section) => section.name.startsWith(TOOL_SECTION_PREFIX) ? denialOf(gate, section.name.slice(5)) === void 0 : true)
|
|
228
222
|
};
|
|
229
223
|
});
|
|
230
224
|
}
|
|
@@ -245,19 +239,32 @@ var SessionScope = class {
|
|
|
245
239
|
};
|
|
246
240
|
}, { prepend: true }));
|
|
247
241
|
if (definition.runtimeContext === false) stoppers.push(agent.ctx.systemPrompt.suppressRuntimeContext());
|
|
248
|
-
const
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
|
|
242
|
+
const install = (scope) => {
|
|
243
|
+
const disposers = [];
|
|
244
|
+
if (gate !== void 0) {
|
|
245
|
+
const known = new Set(scope.tools.definitions(agent).map((tool) => tool.name));
|
|
246
|
+
disposers.push(scope.tools.restrict({
|
|
247
|
+
...gate.allow === void 0 ? {} : { allow: [...gate.allow].filter((name) => known.has(name)) },
|
|
248
|
+
...gate.deny.size === 0 ? {} : { deny: [...gate.deny].filter((name) => known.has(name)) }
|
|
249
|
+
}));
|
|
250
|
+
}
|
|
251
|
+
if (skillGate === void 0) return disposers;
|
|
252
|
+
disposers.push(scope.tools.guard((exec) => {
|
|
253
|
+
if (exec.name !== SKILL_TOOL_NAME) return void 0;
|
|
254
254
|
const skillName = skillNameOf(exec.arguments);
|
|
255
255
|
if (skillName === void 0) return void 0;
|
|
256
256
|
const skillDenial = denialOf(skillGate, skillName);
|
|
257
257
|
return skillDenial === void 0 ? void 0 : skillRefusalOf(skillName, definition.name, skillDenial);
|
|
258
|
+
}));
|
|
259
|
+
return disposers;
|
|
260
|
+
};
|
|
261
|
+
if (agent.ctx.get("tools") === void 0) {
|
|
262
|
+
const fiber = agent.ctx.inject(["tools"], (scope) => {
|
|
263
|
+
stoppers.push(...install(scope));
|
|
258
264
|
});
|
|
259
|
-
|
|
260
|
-
|
|
265
|
+
stoppers.push(() => fiber.dispose());
|
|
266
|
+
} else stoppers.push(...install(agent.ctx));
|
|
267
|
+
return stoppers;
|
|
261
268
|
}, "session-mode: per-session gate");
|
|
262
269
|
this.channel()?.setInstructions(agent, definition.instructions);
|
|
263
270
|
this.applied.set(agent, {
|
|
@@ -305,8 +312,7 @@ var SessionScope = class {
|
|
|
305
312
|
}
|
|
306
313
|
}
|
|
307
314
|
};
|
|
308
|
-
|
|
309
|
-
//#region src/index.ts
|
|
315
|
+
// src/index.ts
|
|
310
316
|
const name = "session-mode";
|
|
311
317
|
const inject = [
|
|
312
318
|
"agents",
|
|
@@ -338,9 +344,13 @@ const sessionModeEditableProjection = {
|
|
|
338
344
|
},
|
|
339
345
|
stateVersion: 1
|
|
340
346
|
};
|
|
341
|
-
var SessionModes = class extends Service {
|
|
347
|
+
var SessionModes = class SessionModes extends Service {
|
|
342
348
|
installs = /* @__PURE__ */ new WeakMap();
|
|
343
349
|
scope;
|
|
350
|
+
projectionHandle;
|
|
351
|
+
editableHandle;
|
|
352
|
+
modelSelectionHandle;
|
|
353
|
+
agentPresetHandle;
|
|
344
354
|
config;
|
|
345
355
|
constructor(ctx, config) {
|
|
346
356
|
super(ctx, "sessionModes");
|
|
@@ -354,8 +364,6 @@ var SessionModes = class extends Service {
|
|
|
354
364
|
});
|
|
355
365
|
if (problem !== void 0) throw new Error(problem);
|
|
356
366
|
this.scope = new SessionScope(ctx);
|
|
357
|
-
ctx.sessionProjections.register(sessionModeProjection);
|
|
358
|
-
ctx.sessionProjections.register(sessionModeEditableProjection);
|
|
359
367
|
ctx.on("fs/write-intent", (_target, actor, next) => this.decidePolicy("fs/write-intent", actor, next), { prepend: true });
|
|
360
368
|
ctx.on("fs/edit-intent", (_target, actor, next) => this.decidePolicy("fs/edit-intent", actor, next), { prepend: true });
|
|
361
369
|
ctx.on("agent/created", ({ agent }) => {
|
|
@@ -365,10 +373,21 @@ var SessionModes = class extends Service {
|
|
|
365
373
|
const mapped = this.modeForPreset(preset);
|
|
366
374
|
const agent = ctx.agents.get(sessionId);
|
|
367
375
|
if (mapped === void 0 || agent === void 0) return;
|
|
368
|
-
if (this.
|
|
376
|
+
if (this.projectionHandle.stateOf(agent.session) !== mapped) agent.session.append("session-mode/selected", { sessionMode: mapped });
|
|
369
377
|
this.installFor(agent, mapped);
|
|
370
378
|
});
|
|
371
379
|
}
|
|
380
|
+
static async create(ctx, config) {
|
|
381
|
+
const modes = new SessionModes(ctx, config);
|
|
382
|
+
await modes.init();
|
|
383
|
+
return modes;
|
|
384
|
+
}
|
|
385
|
+
async init() {
|
|
386
|
+
this.projectionHandle = await this.ctx.sessionProjections.register(sessionModeProjection);
|
|
387
|
+
this.editableHandle = await this.ctx.sessionProjections.register(sessionModeEditableProjection);
|
|
388
|
+
this.modelSelectionHandle = await this.ctx.sessionProjections.register(modelSelectionProjectionDefinition);
|
|
389
|
+
this.agentPresetHandle = await this.ctx.sessionProjections.register(agentPresetProjectionDefinition);
|
|
390
|
+
}
|
|
372
391
|
get defaultId() {
|
|
373
392
|
return this.config.default;
|
|
374
393
|
}
|
|
@@ -403,8 +422,14 @@ var SessionModes = class extends Service {
|
|
|
403
422
|
if (mode === void 0) throw new Error(`未知的模式 ${JSON.stringify(wanted)};可用的是 ${Object.keys(this.config.modes).join(", ")}`);
|
|
404
423
|
return mode;
|
|
405
424
|
}
|
|
425
|
+
selectedOf(session) {
|
|
426
|
+
return this.projectionHandle.stateOf(session);
|
|
427
|
+
}
|
|
406
428
|
modeOf(session) {
|
|
407
|
-
return this.
|
|
429
|
+
return this.projectionHandle.stateOf(session) ?? this.defaultId;
|
|
430
|
+
}
|
|
431
|
+
editableOf(session) {
|
|
432
|
+
return this.editableHandle.stateOf(session);
|
|
408
433
|
}
|
|
409
434
|
modeOfSession(session) {
|
|
410
435
|
return this.definition(this.modeOf(session));
|
|
@@ -428,14 +453,14 @@ var SessionModes = class extends Service {
|
|
|
428
453
|
if (!definition.role.includes("main")) throw new Error(`模式 ${JSON.stringify(mode)} 不是用户可选的(它的 role 里没有 main)。`);
|
|
429
454
|
const session = this.ctx.sessions.get(sessionId);
|
|
430
455
|
if (session === void 0) throw new Error(`未知的会话 ${sessionId}`);
|
|
431
|
-
if (this.
|
|
456
|
+
if (this.editableHandle.stateOf(session) === false) throw new Error("这个会话已经开始,模式不能再改;要换模式请新开一个会话。");
|
|
432
457
|
const agent = this.ctx.agents.get(sessionId);
|
|
433
458
|
const registry = this.presetRegistry();
|
|
434
459
|
if (agent !== void 0 && registry !== void 0) {
|
|
435
460
|
const target = this.presetTarget(definition.presetsOnly, this.presetOfAgent(registry, agent));
|
|
436
461
|
if (target !== void 0) await registry.select(agent, target);
|
|
437
462
|
}
|
|
438
|
-
if (this.
|
|
463
|
+
if (this.projectionHandle.stateOf(session) !== mode) session.append("session-mode/selected", { sessionMode: mode });
|
|
439
464
|
if (agent !== void 0) this.installFor(agent);
|
|
440
465
|
return mode;
|
|
441
466
|
}
|
|
@@ -467,7 +492,7 @@ var SessionModes = class extends Service {
|
|
|
467
492
|
this.installFor(agent, mode);
|
|
468
493
|
}
|
|
469
494
|
resolveModeId(agent) {
|
|
470
|
-
const selected = this.
|
|
495
|
+
const selected = this.projectionHandle.stateOf(agent.session);
|
|
471
496
|
if (typeof selected === "string") return selected;
|
|
472
497
|
const mapped = this.modeForPreset(this.presetOf(agent.session));
|
|
473
498
|
if (mapped !== void 0) {
|
|
@@ -480,12 +505,8 @@ var SessionModes = class extends Service {
|
|
|
480
505
|
return inherited;
|
|
481
506
|
}
|
|
482
507
|
presetOf(session) {
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
return typeof state === "string" ? state : void 0;
|
|
486
|
-
} catch {
|
|
487
|
-
return;
|
|
488
|
-
}
|
|
508
|
+
const state = this.agentPresetHandle.stateOf(session);
|
|
509
|
+
return typeof state === "string" ? state : void 0;
|
|
489
510
|
}
|
|
490
511
|
modeForPreset(preset) {
|
|
491
512
|
if (preset === void 0) return void 0;
|
|
@@ -526,7 +547,7 @@ var SessionModes = class extends Service {
|
|
|
526
547
|
const resolved = await next();
|
|
527
548
|
const model = this.config.modes[modeId]?.defaultModel;
|
|
528
549
|
if (model === void 0) return resolved;
|
|
529
|
-
const pending = this.
|
|
550
|
+
const pending = this.modelSelectionHandle.stateOf(agent.session).pending;
|
|
530
551
|
if (pending !== void 0 && pending !== null) return resolved;
|
|
531
552
|
if (agent.session.requestHeader() !== void 0) return resolved;
|
|
532
553
|
return {
|
|
@@ -538,8 +559,8 @@ var SessionModes = class extends Service {
|
|
|
538
559
|
});
|
|
539
560
|
}
|
|
540
561
|
};
|
|
541
|
-
function apply(ctx, config) {
|
|
542
|
-
registerHttpRoutes(ctx,
|
|
562
|
+
async function apply(ctx, config) {
|
|
563
|
+
registerHttpRoutes(ctx, await SessionModes.create(ctx, config));
|
|
543
564
|
ctx.plugin(SessionModeCatalog);
|
|
544
565
|
}
|
|
545
566
|
function respondJson(response, status, body) {
|
|
@@ -599,5 +620,4 @@ function registerHttpRoutes(ctx, modes) {
|
|
|
599
620
|
}), "session-mode: HTTP route");
|
|
600
621
|
});
|
|
601
622
|
}
|
|
602
|
-
//#endregion
|
|
603
623
|
export { Config, POLICY_NAMES, SESSION_MODE_PATH, SessionModes, apply, inject, name, sessionModeEditableProjection, sessionModeProjection };
|
package/dist/rows.cjs
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
3
|
-
const CODING_PERSONA = { prefix: [
|
|
2
|
+
// src/mode-sources.ts
|
|
3
|
+
const CODING_PERSONA = { prefix: [
|
|
4
|
+
"你是一个经验丰富的编程专家,YAGNI 是你的编程哲学,PDCA 是你的行为规范。",
|
|
5
|
+
"全程 MUST 用中文(专有名词除外),包括但不限于思考,回答,工具描述,subagent 提示词;思考 NEVER 陷入重复循环,一旦循环立即退出;思考 SHOULD 聚焦需求理解与方案设计,不预演具体代码实现,正确性由验证环节确认。",
|
|
6
|
+
"单轮次内 MUST 完成明确的任务,任务未完成 NEVER 停下,除非有明确分歧点需要停下询问用户来做决断"
|
|
7
|
+
].join("\n") };
|
|
4
8
|
const CHAT_PERSONA = { prefix: "你是一个助手。全程用中文(专有名词除外),包括但不限于思考,回答,工具描述;思考不要陷入重复循环,一旦循环立即退出。" };
|
|
5
9
|
const NOOP_MODE_ID = "noop";
|
|
6
10
|
const DEFAULT_MODE = "coding";
|
|
@@ -11,7 +15,7 @@ const MODE_SOURCES = [
|
|
|
11
15
|
description: "功能完整的编码 Agent:文件、Shell、检索、联网等工具常驻,其余用法说明按需加载。",
|
|
12
16
|
persona: CODING_PERSONA,
|
|
13
17
|
role: ["main", "subagent"],
|
|
14
|
-
denyTools: ["load_workspace_dependencies"],
|
|
18
|
+
denyTools: ["load_workspace_dependencies", "plugin_manager"],
|
|
15
19
|
denySkills: [
|
|
16
20
|
"office-docx",
|
|
17
21
|
"office-pptx",
|
|
@@ -40,8 +44,7 @@ const MODE_SOURCES = [
|
|
|
40
44
|
role: ["main", "subagent"]
|
|
41
45
|
}
|
|
42
46
|
];
|
|
43
|
-
|
|
44
|
-
//#region src/rows.ts
|
|
47
|
+
// src/rows.ts
|
|
45
48
|
function list(values) {
|
|
46
49
|
return values === void 0 || values.length === 0 ? void 0 : [...values];
|
|
47
50
|
}
|
|
@@ -81,5 +84,4 @@ function sessionModeRows() {
|
|
|
81
84
|
}
|
|
82
85
|
}] }];
|
|
83
86
|
}
|
|
84
|
-
//#endregion
|
|
85
87
|
exports.sessionModeRows = sessionModeRows;
|
package/dist/rows.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/rows.d.ts
|
|
2
1
|
export interface PatchRow {
|
|
3
2
|
readonly insert?: readonly RowEntry[];
|
|
4
3
|
}
|
|
@@ -7,5 +6,4 @@ export interface RowEntry {
|
|
|
7
6
|
readonly name: string;
|
|
8
7
|
readonly config?: Readonly<Record<string, unknown>>;
|
|
9
8
|
}
|
|
10
|
-
export declare function sessionModeRows(): readonly PatchRow[];
|
|
11
|
-
//#endregion
|
|
9
|
+
export declare function sessionModeRows(): readonly PatchRow[];
|
package/dist/rows.mjs
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
const CODING_PERSONA = { prefix: [
|
|
1
|
+
// src/mode-sources.ts
|
|
2
|
+
const CODING_PERSONA = { prefix: [
|
|
3
|
+
"你是一个经验丰富的编程专家,YAGNI 是你的编程哲学,PDCA 是你的行为规范。",
|
|
4
|
+
"全程 MUST 用中文(专有名词除外),包括但不限于思考,回答,工具描述,subagent 提示词;思考 NEVER 陷入重复循环,一旦循环立即退出;思考 SHOULD 聚焦需求理解与方案设计,不预演具体代码实现,正确性由验证环节确认。",
|
|
5
|
+
"单轮次内 MUST 完成明确的任务,任务未完成 NEVER 停下,除非有明确分歧点需要停下询问用户来做决断"
|
|
6
|
+
].join("\n") };
|
|
3
7
|
const CHAT_PERSONA = { prefix: "你是一个助手。全程用中文(专有名词除外),包括但不限于思考,回答,工具描述;思考不要陷入重复循环,一旦循环立即退出。" };
|
|
4
8
|
const NOOP_MODE_ID = "noop";
|
|
5
9
|
const DEFAULT_MODE = "coding";
|
|
@@ -10,7 +14,7 @@ const MODE_SOURCES = [
|
|
|
10
14
|
description: "功能完整的编码 Agent:文件、Shell、检索、联网等工具常驻,其余用法说明按需加载。",
|
|
11
15
|
persona: CODING_PERSONA,
|
|
12
16
|
role: ["main", "subagent"],
|
|
13
|
-
denyTools: ["load_workspace_dependencies"],
|
|
17
|
+
denyTools: ["load_workspace_dependencies", "plugin_manager"],
|
|
14
18
|
denySkills: [
|
|
15
19
|
"office-docx",
|
|
16
20
|
"office-pptx",
|
|
@@ -39,8 +43,7 @@ const MODE_SOURCES = [
|
|
|
39
43
|
role: ["main", "subagent"]
|
|
40
44
|
}
|
|
41
45
|
];
|
|
42
|
-
|
|
43
|
-
//#region src/rows.ts
|
|
46
|
+
// src/rows.ts
|
|
44
47
|
function list(values) {
|
|
45
48
|
return values === void 0 || values.length === 0 ? void 0 : [...values];
|
|
46
49
|
}
|
|
@@ -80,5 +83,4 @@ function sessionModeRows() {
|
|
|
80
83
|
}
|
|
81
84
|
}] }];
|
|
82
85
|
}
|
|
83
|
-
//#endregion
|
|
84
86
|
export { sessionModeRows };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -29,11 +29,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
value: mod,
|
|
30
30
|
enumerable: true
|
|
31
31
|
}) : target, mod));
|
|
32
|
-
|
|
33
|
-
//#region src/shared.ts
|
|
32
|
+
// src/shared.ts
|
|
34
33
|
const SESSION_MODE_PATH = "/session-mode";
|
|
35
34
|
const POLICY_NAMES = ["fs/write-intent", "fs/edit-intent"];
|
|
36
|
-
//#endregion
|
|
37
35
|
Object.defineProperty(exports, "POLICY_NAMES", {
|
|
38
36
|
enumerable: true,
|
|
39
37
|
get: function() {
|
package/dist/testing.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_catalog_remote = require("./catalog-remote-
|
|
3
|
-
const require_catalog = require("./catalog-
|
|
2
|
+
const require_catalog_remote = require("./catalog-remote-DWV4E4Vo.cjs");
|
|
3
|
+
const require_catalog = require("./catalog-C_6kb1aC.cjs");
|
|
4
4
|
exports.CATALOG_NS = require_catalog_remote.CATALOG_NS;
|
|
5
5
|
exports.SESSION_MODE_CATALOG_REMOTE = require_catalog_remote.SESSION_MODE_CATALOG_REMOTE;
|
|
6
6
|
exports.SessionModeCatalog = require_catalog.SessionModeCatalog;
|
package/dist/testing.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Context } from "@deepseek-ai/cordis";
|
|
2
2
|
import { RemoteResult, TypertRemoteContribution, TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
|
|
3
|
-
//#region src/catalog-remote.d.ts
|
|
4
3
|
export declare const CATALOG_NS = "sessionModeCatalog";
|
|
5
4
|
interface SessionModeCatalogValue {
|
|
6
5
|
readonly tools: readonly string[];
|
|
@@ -15,8 +14,6 @@ declare module "@deepseek-ai/dsh-typert-protocol" {
|
|
|
15
14
|
}
|
|
16
15
|
}
|
|
17
16
|
export declare const SESSION_MODE_CATALOG_REMOTE: TypertRemoteContribution;
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region src/catalog.d.ts
|
|
20
17
|
export declare class SessionModeCatalog extends TypertRemoteService {
|
|
21
18
|
/**
|
|
22
19
|
* @param ctx - owning context (the `session-mode` row).
|
|
@@ -31,5 +28,4 @@ export declare class SessionModeCatalog extends TypertRemoteService {
|
|
|
31
28
|
private skillNames;
|
|
32
29
|
private agents;
|
|
33
30
|
}
|
|
34
|
-
//#endregion
|
|
35
31
|
export {};
|
package/dist/testing.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as SESSION_MODE_CATALOG_REMOTE, t as CATALOG_NS } from "./catalog-remote-
|
|
2
|
-
import { t as SessionModeCatalog } from "./catalog-
|
|
1
|
+
import { n as SESSION_MODE_CATALOG_REMOTE, t as CATALOG_NS } from "./catalog-remote-Cz8L_Zrl.mjs";
|
|
2
|
+
import { t as SessionModeCatalog } from "./catalog-D-n_RctY.mjs";
|
|
3
3
|
export { CATALOG_NS, SESSION_MODE_CATALOG_REMOTE, SessionModeCatalog };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morlay/dsh-session-mode",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.14-alpha.0",
|
|
4
4
|
"description": "Session modes for dsh: coding / chat as data — a mode is a persona plus its tool lists, its upstream policy lists, its instruction / skill-catalog / runtime-context switches and an optional default model. The host applies the current mode to each session, and the chip in the composer sits beside the official agent-preset entry, which stays.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
@@ -43,39 +43,39 @@
|
|
|
43
43
|
"./locale/*.json": "./locale/*.json"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@morlay/dsh-client-ui-primitives": "0.0.
|
|
46
|
+
"@morlay/dsh-client-ui-primitives": "0.0.14-alpha.0",
|
|
47
47
|
"zod": "4.4.3"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
51
|
-
"@deepseek-ai/cordis-plugin-group": "^1.0.
|
|
52
|
-
"@deepseek-ai/cordis-plugin-include": "^1.0.
|
|
53
|
-
"@deepseek-ai/cordis-plugin-loader": "^1.0.
|
|
54
|
-
"@deepseek-ai/cosmokit": "^1.8.
|
|
55
|
-
"@deepseek-ai/dsh-agent": "^0.2.
|
|
56
|
-
"@deepseek-ai/dsh-agent-loop-testkit": "^0.2.
|
|
57
|
-
"@deepseek-ai/dsh-agent-preset-registry": "^0.2.
|
|
58
|
-
"@deepseek-ai/dsh-api-session-controller": "^0.2.
|
|
59
|
-
"@deepseek-ai/dsh-client-locale": "^0.2.
|
|
60
|
-
"@deepseek-ai/dsh-client-store": "^0.2.
|
|
61
|
-
"@deepseek-ai/dsh-client-ui-conversation": "^0.2.
|
|
62
|
-
"@deepseek-ai/dsh-client-ui-plugin-manager": "^0.2.
|
|
63
|
-
"@deepseek-ai/dsh-client-ui-primitives": "^0.2.
|
|
64
|
-
"@deepseek-ai/dsh-client-ui-renderer": "^0.2.
|
|
65
|
-
"@deepseek-ai/dsh-client-ui-settings": "^0.2.
|
|
66
|
-
"@deepseek-ai/dsh-client-ui-slots": "^0.2.
|
|
67
|
-
"@deepseek-ai/dsh-fs": "^0.2.
|
|
68
|
-
"@deepseek-ai/dsh-fs-local": "^0.2.
|
|
69
|
-
"@deepseek-ai/dsh-fs-observation-policy": "^0.2.
|
|
70
|
-
"@deepseek-ai/dsh-llm": "^0.2.
|
|
71
|
-
"@deepseek-ai/dsh-session": "^0.2.
|
|
72
|
-
"@deepseek-ai/dsh-session-projection": "^0.2.
|
|
73
|
-
"@deepseek-ai/dsh-settings": "^0.2.
|
|
74
|
-
"@deepseek-ai/dsh-skill": "^0.2.
|
|
75
|
-
"@deepseek-ai/dsh-system-prompt": "^0.2.
|
|
76
|
-
"@deepseek-ai/dsh-tools": "^0.2.
|
|
77
|
-
"@deepseek-ai/dsh-typert-protocol": "^0.2.
|
|
78
|
-
"@deepseek-ai/dsh-working-directory": "^0.2.
|
|
50
|
+
"@deepseek-ai/cordis": "^4.0.6-alpha.1",
|
|
51
|
+
"@deepseek-ai/cordis-plugin-group": "^1.0.6-alpha.1",
|
|
52
|
+
"@deepseek-ai/cordis-plugin-include": "^1.0.11-alpha.1",
|
|
53
|
+
"@deepseek-ai/cordis-plugin-loader": "^1.0.7-alpha.1",
|
|
54
|
+
"@deepseek-ai/cosmokit": "^1.8.7-alpha.1",
|
|
55
|
+
"@deepseek-ai/dsh-agent": "^0.2.2-alpha.2",
|
|
56
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "^0.2.2-alpha.2",
|
|
57
|
+
"@deepseek-ai/dsh-agent-preset-registry": "^0.2.2-alpha.2",
|
|
58
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.2.2-alpha.2",
|
|
59
|
+
"@deepseek-ai/dsh-client-locale": "^0.2.2-alpha.2",
|
|
60
|
+
"@deepseek-ai/dsh-client-store": "^0.2.2-alpha.2",
|
|
61
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.2.2-alpha.2",
|
|
62
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager": "^0.2.2-alpha.2",
|
|
63
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.2.2-alpha.2",
|
|
64
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.2.2-alpha.2",
|
|
65
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.2.2-alpha.2",
|
|
66
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.2.2-alpha.2",
|
|
67
|
+
"@deepseek-ai/dsh-fs": "^0.2.2-alpha.2",
|
|
68
|
+
"@deepseek-ai/dsh-fs-local": "^0.2.2-alpha.2",
|
|
69
|
+
"@deepseek-ai/dsh-fs-observation-policy": "^0.2.2-alpha.2",
|
|
70
|
+
"@deepseek-ai/dsh-llm": "^0.2.2-alpha.2",
|
|
71
|
+
"@deepseek-ai/dsh-session": "^0.2.2-alpha.2",
|
|
72
|
+
"@deepseek-ai/dsh-session-projection": "^0.2.2-alpha.2",
|
|
73
|
+
"@deepseek-ai/dsh-settings": "^0.2.2-alpha.2",
|
|
74
|
+
"@deepseek-ai/dsh-skill": "^0.2.2-alpha.2",
|
|
75
|
+
"@deepseek-ai/dsh-system-prompt": "^0.2.2-alpha.2",
|
|
76
|
+
"@deepseek-ai/dsh-tools": "^0.2.2-alpha.2",
|
|
77
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.2.2-alpha.2",
|
|
78
|
+
"@deepseek-ai/dsh-working-directory": "^0.2.2-alpha.2",
|
|
79
79
|
"@testing-library/react": "^16.3.0",
|
|
80
80
|
"@types/js-yaml": "^4.0.9",
|
|
81
81
|
"@types/react": "~18.3.1",
|
|
@@ -83,34 +83,34 @@
|
|
|
83
83
|
"react-dom": "^18.2.0"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
87
|
-
"@deepseek-ai/cosmokit": "^1.8.
|
|
88
|
-
"@deepseek-ai/dsh-agent": "^0.2.
|
|
89
|
-
"@deepseek-ai/dsh-agent-preset-registry": "^0.2.
|
|
90
|
-
"@deepseek-ai/dsh-api-remotes": "^0.2.
|
|
91
|
-
"@deepseek-ai/dsh-api-session-controller": "^0.2.
|
|
92
|
-
"@deepseek-ai/dsh-client-locale": "^0.2.
|
|
93
|
-
"@deepseek-ai/dsh-client-store": "^0.2.
|
|
94
|
-
"@deepseek-ai/dsh-client-ui-conversation": "^0.2.
|
|
95
|
-
"@deepseek-ai/dsh-client-ui-plugin-manager": "^0.2.
|
|
96
|
-
"@deepseek-ai/dsh-client-ui-primitives": "^0.2.
|
|
97
|
-
"@deepseek-ai/dsh-client-ui-settings": "^0.2.
|
|
98
|
-
"@deepseek-ai/dsh-client-ui-slots": "^0.2.
|
|
99
|
-
"@deepseek-ai/dsh-fs": "^0.2.
|
|
100
|
-
"@deepseek-ai/dsh-llm": "^0.2.
|
|
101
|
-
"@deepseek-ai/dsh-session": "^0.2.
|
|
102
|
-
"@deepseek-ai/dsh-session-projection": "^0.2.
|
|
103
|
-
"@deepseek-ai/dsh-skill": "^0.2.
|
|
104
|
-
"@deepseek-ai/dsh-system-prompt": "^0.2.
|
|
105
|
-
"@deepseek-ai/dsh-tool-skill": "^0.2.
|
|
106
|
-
"@deepseek-ai/dsh-tools": "^0.2.
|
|
107
|
-
"@deepseek-ai/dsh-typert-protocol": "^0.2.
|
|
108
|
-
"@deepseek-ai/schemastery": "^3.18.
|
|
109
|
-
"@morlay/dsh-context-assembler": "0.0.
|
|
86
|
+
"@deepseek-ai/cordis": "^4.0.6-alpha.1",
|
|
87
|
+
"@deepseek-ai/cosmokit": "^1.8.7-alpha.1",
|
|
88
|
+
"@deepseek-ai/dsh-agent": "^0.2.2-alpha.2",
|
|
89
|
+
"@deepseek-ai/dsh-agent-preset-registry": "^0.2.2-alpha.2",
|
|
90
|
+
"@deepseek-ai/dsh-api-remotes": "^0.2.2-alpha.2",
|
|
91
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.2.2-alpha.2",
|
|
92
|
+
"@deepseek-ai/dsh-client-locale": "^0.2.2-alpha.2",
|
|
93
|
+
"@deepseek-ai/dsh-client-store": "^0.2.2-alpha.2",
|
|
94
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.2.2-alpha.2",
|
|
95
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager": "^0.2.2-alpha.2",
|
|
96
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.2.2-alpha.2",
|
|
97
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.2.2-alpha.2",
|
|
98
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.2.2-alpha.2",
|
|
99
|
+
"@deepseek-ai/dsh-fs": "^0.2.2-alpha.2",
|
|
100
|
+
"@deepseek-ai/dsh-llm": "^0.2.2-alpha.2",
|
|
101
|
+
"@deepseek-ai/dsh-session": "^0.2.2-alpha.2",
|
|
102
|
+
"@deepseek-ai/dsh-session-projection": "^0.2.2-alpha.2",
|
|
103
|
+
"@deepseek-ai/dsh-skill": "^0.2.2-alpha.2",
|
|
104
|
+
"@deepseek-ai/dsh-system-prompt": "^0.2.2-alpha.2",
|
|
105
|
+
"@deepseek-ai/dsh-tool-skill": "^0.2.2-alpha.2",
|
|
106
|
+
"@deepseek-ai/dsh-tools": "^0.2.2-alpha.2",
|
|
107
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.2.2-alpha.2",
|
|
108
|
+
"@deepseek-ai/schemastery": "^3.18.6-alpha.1",
|
|
109
|
+
"@morlay/dsh-context-assembler": "0.0.11-alpha.0",
|
|
110
110
|
"react": "^18.2.0"
|
|
111
111
|
},
|
|
112
112
|
"engines": {
|
|
113
|
-
"dsh": ">= 0.2.
|
|
113
|
+
"dsh": ">= 0.2.2-alpha.2 < 0.2.3"
|
|
114
114
|
},
|
|
115
115
|
"dsh": {
|
|
116
116
|
"client": {
|