@lmzhen/dsh-evolution-adapter 0.0.0-stage → 0.58.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/README.md +14 -2
- package/lib/index.js +12 -0
- package/lib/llm-C8dh3Tqa.js +303 -0
- package/lib/ports.js +2 -0
- package/lib/service.js +50 -0
- package/lib/types/agents.d.ts +9 -0
- package/lib/types/agents.js +26 -0
- package/lib/types/commands.d.ts +9 -0
- package/lib/types/commands.js +9 -0
- package/lib/types/connection.d.ts +9 -0
- package/lib/types/connection.js +27 -0
- package/lib/types/index.d.ts +18 -0
- package/lib/types/index.js +10 -0
- package/lib/types/llm.d.ts +12 -0
- package/lib/types/llm.js +67 -0
- package/lib/types/platformView.d.ts +10 -0
- package/lib/types/platformView.js +29 -0
- package/lib/types/ports.d.ts +40 -0
- package/lib/types/ports.js +24 -0
- package/lib/types/presets.d.ts +9 -0
- package/lib/types/presets.js +31 -0
- package/lib/types/profileContext.d.ts +9 -0
- package/lib/types/profileContext.js +14 -0
- package/lib/types/projections.d.ts +9 -0
- package/lib/types/projections.js +34 -0
- package/lib/types/service.d.ts +24 -0
- package/lib/types/service.js +63 -0
- package/lib/types/settings.d.ts +9 -0
- package/lib/types/settings.js +14 -0
- package/lib/types/skills.d.ts +9 -0
- package/lib/types/skills.js +9 -0
- package/lib/types/storageDomain.d.ts +9 -0
- package/lib/types/storageDomain.js +9 -0
- package/lib/types/subagents.d.ts +9 -0
- package/lib/types/subagents.js +17 -0
- package/lib/types/systemPrompt.d.ts +9 -0
- package/lib/types/systemPrompt.js +13 -0
- package/lib/types/tools.d.ts +15 -0
- package/lib/types/tools.js +23 -0
- package/lib/types/userQuestions.d.ts +9 -0
- package/lib/types/userQuestions.js +9 -0
- package/lib/types/values.d.ts +25 -0
- package/lib/types/values.js +15 -0
- package/lib/types/workingDirectory.d.ts +9 -0
- package/lib/types/workingDirectory.js +9 -0
- package/lib/values.js +8 -0
- package/locale/de.json +6 -0
- package/locale/en.json +6 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/pt.json +6 -0
- package/locale/ru.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +59 -4
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host platform ports.
|
|
3
|
+
*
|
|
4
|
+
* This entry is safe to import at composition time: every module here uses
|
|
5
|
+
* platform types only, and resolves the live host service through `ctx.get`
|
|
6
|
+
* when a feature calls it. No host runtime value is imported here.
|
|
7
|
+
*/
|
|
8
|
+
export { commandsPort } from './commands.ts';
|
|
9
|
+
export type { CommandsPort } from './commands.ts';
|
|
10
|
+
export { profileContextPort } from './profileContext.ts';
|
|
11
|
+
export type { ProfileContextPort } from './profileContext.ts';
|
|
12
|
+
export { pluginManagerPort, pluginInventoryPort, configEditorPort } from './platformView.ts';
|
|
13
|
+
export type { PluginManagerPort, PluginInventoryPort, ConfigEditorPort } from './platformView.ts';
|
|
14
|
+
export { workingDirectoryPort } from './workingDirectory.ts';
|
|
15
|
+
export type { WorkingDirectoryPort } from './workingDirectory.ts';
|
|
16
|
+
export { skillsPort } from './skills.ts';
|
|
17
|
+
export type { SkillsPort } from './skills.ts';
|
|
18
|
+
export { storageDomainPort } from './storageDomain.ts';
|
|
19
|
+
export type { StorageDomainPort } from './storageDomain.ts';
|
|
20
|
+
export { settingsPort } from './settings.ts';
|
|
21
|
+
export type { SettingsPort } from './settings.ts';
|
|
22
|
+
export { connectionPort } from './connection.ts';
|
|
23
|
+
export type { ConnectionPort, ConnectionRoute } from './connection.ts';
|
|
24
|
+
export { systemPromptPort } from './systemPrompt.ts';
|
|
25
|
+
export type { SystemPromptPort } from './systemPrompt.ts';
|
|
26
|
+
export { agentsPort } from './agents.ts';
|
|
27
|
+
export type { AgentIdentity, AgentsPort } from './agents.ts';
|
|
28
|
+
export { subagentsPort } from './subagents.ts';
|
|
29
|
+
export type { SubagentActivationPort, SubagentSendOptions, SubagentsPort } from './subagents.ts';
|
|
30
|
+
export { userQuestionsPort } from './userQuestions.ts';
|
|
31
|
+
export type { AskedQuestions, UserQuestion, UserQuestionOption, UserQuestionsPort } from './userQuestions.ts';
|
|
32
|
+
export { presetsPort } from './presets.ts';
|
|
33
|
+
export type { PresetDefinitionLike, PresetDocument, PresetsPort } from './presets.ts';
|
|
34
|
+
export { projectionPort } from './projections.ts';
|
|
35
|
+
export type { EvolutionProjectionDefinition, ProjectionHandleLike, ProjectionPort } from './projections.ts';
|
|
36
|
+
export { EvolutionLlmError, llmPort, modelRoute } from './llm.ts';
|
|
37
|
+
export type { EvolutionLlmFailureKind, EvolutionLlmPurpose, EvolutionLlmRequest, LlmPort, ModelRoute } from './llm.ts';
|
|
38
|
+
export { registerEvolutionTool, toolsPort } from './tools.ts';
|
|
39
|
+
export type { ToolsPort } from './tools.ts';
|
|
40
|
+
//# sourceMappingURL=ports.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host platform ports.
|
|
3
|
+
*
|
|
4
|
+
* This entry is safe to import at composition time: every module here uses
|
|
5
|
+
* platform types only, and resolves the live host service through `ctx.get`
|
|
6
|
+
* when a feature calls it. No host runtime value is imported here.
|
|
7
|
+
*/
|
|
8
|
+
export { commandsPort } from "./commands.js";
|
|
9
|
+
export { profileContextPort } from "./profileContext.js";
|
|
10
|
+
export { pluginManagerPort, pluginInventoryPort, configEditorPort } from "./platformView.js";
|
|
11
|
+
export { workingDirectoryPort } from "./workingDirectory.js";
|
|
12
|
+
export { skillsPort } from "./skills.js";
|
|
13
|
+
export { storageDomainPort } from "./storageDomain.js";
|
|
14
|
+
export { settingsPort } from "./settings.js";
|
|
15
|
+
export { connectionPort } from "./connection.js";
|
|
16
|
+
export { systemPromptPort } from "./systemPrompt.js";
|
|
17
|
+
export { agentsPort } from "./agents.js";
|
|
18
|
+
export { subagentsPort } from "./subagents.js";
|
|
19
|
+
export { userQuestionsPort } from "./userQuestions.js";
|
|
20
|
+
export { presetsPort } from "./presets.js";
|
|
21
|
+
export { projectionPort } from "./projections.js";
|
|
22
|
+
export { EvolutionLlmError, llmPort, modelRoute } from "./llm.js";
|
|
23
|
+
export { registerEvolutionTool, toolsPort } from "./tools.js";
|
|
24
|
+
//# sourceMappingURL=ports.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The agent-preset implementation half of the family's platform boundary.
|
|
3
|
+
*/
|
|
4
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
5
|
+
import type { PresetsPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
6
|
+
export type { PresetDefinitionLike, PresetDocument, PresetsPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
7
|
+
/** Resolve the preset registry facade; undefined when the host has no agentPresets service. */
|
|
8
|
+
export declare function presetsPort(ctx: Context): PresetsPort | undefined;
|
|
9
|
+
//# sourceMappingURL=presets.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** Resolve the preset registry facade; undefined when the host has no agentPresets service. */
|
|
2
|
+
export function presetsPort(ctx) {
|
|
3
|
+
// platform-declaration anchor: agentPresets is declared in core PLATFORM_SERVICE_PROBES.
|
|
4
|
+
const registry = ctx.get('agentPresets');
|
|
5
|
+
if (registry === undefined)
|
|
6
|
+
return undefined;
|
|
7
|
+
return {
|
|
8
|
+
readDocument: (id) => {
|
|
9
|
+
if (registry.readDocument === undefined)
|
|
10
|
+
throw new Error('agentPresets service has no readDocument()');
|
|
11
|
+
return registry.readDocument(id);
|
|
12
|
+
},
|
|
13
|
+
register: (definition) => {
|
|
14
|
+
if (registry.register === undefined)
|
|
15
|
+
throw new Error('agentPresets service has no register()');
|
|
16
|
+
return registry.register(definition);
|
|
17
|
+
},
|
|
18
|
+
resolve: (id) => {
|
|
19
|
+
if (registry.resolve === undefined)
|
|
20
|
+
throw new Error('agentPresets service has no resolve()');
|
|
21
|
+
return registry.resolve(id);
|
|
22
|
+
},
|
|
23
|
+
mount: (target, id) => {
|
|
24
|
+
if (registry.mount === undefined)
|
|
25
|
+
throw new Error('agentPresets service has no mount()');
|
|
26
|
+
return registry.mount(target, id);
|
|
27
|
+
},
|
|
28
|
+
composedPreset: (target) => registry.composedPreset?.(target),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=presets.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The profile-context implementation half of the family's platform boundary.
|
|
3
|
+
*/
|
|
4
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
5
|
+
import type { ProfileContextPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
6
|
+
export type { ProfileContextPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
7
|
+
/** Resolve the profile-context port; undefined means no profile is mounted. */
|
|
8
|
+
export declare function profileContextPort(ctx: Context): ProfileContextPort | undefined;
|
|
9
|
+
//# sourceMappingURL=profileContext.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Resolve the profile-context port; undefined means no profile is mounted. */
|
|
2
|
+
export function profileContextPort(ctx) {
|
|
3
|
+
// platform-declaration anchor: profileContext is declared in core PLATFORM_SERVICE_PROBES.
|
|
4
|
+
const service = ctx.get('profileContext');
|
|
5
|
+
if (service === undefined || typeof service.dir !== 'string' || service.dir === '')
|
|
6
|
+
return undefined;
|
|
7
|
+
return {
|
|
8
|
+
name: typeof service.name === 'string' ? service.name : '',
|
|
9
|
+
dir: service.dir,
|
|
10
|
+
...(typeof service.patchPath === 'string' && service.patchPath !== '' ? { patchPath: service.patchPath } : {}),
|
|
11
|
+
...(Array.isArray(service.startedBundles) ? { startedBundles: service.startedBundles } : {}),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=profileContext.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The session-projection implementation half of the family's platform boundary.
|
|
3
|
+
*/
|
|
4
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
5
|
+
import type { ProjectionPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
6
|
+
export type { EvolutionProjectionDefinition, ProjectionHandleLike, ProjectionPort, ProjectionPortShape, } from '@lmzhen/dsh-evolution-platform-contract';
|
|
7
|
+
/** Resolve the projection port; undefined means the host has no projection registry. */
|
|
8
|
+
export declare function projectionPort(ctx: Context): ProjectionPort | undefined;
|
|
9
|
+
//# sourceMappingURL=projections.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const isHandle = (value) => value !== null && typeof value === 'object'
|
|
2
|
+
&& typeof value.stateOf === 'function'
|
|
3
|
+
&& typeof value.dispose === 'function';
|
|
4
|
+
/** Resolve the projection port; undefined means the host has no projection registry. */
|
|
5
|
+
export function projectionPort(ctx) {
|
|
6
|
+
// platform-declaration anchor: sessionProjections is declared in core PLATFORM_SERVICE_PROBES.
|
|
7
|
+
const registry = ctx.get('sessionProjections');
|
|
8
|
+
if (registry === undefined)
|
|
9
|
+
return undefined;
|
|
10
|
+
let shape = 'unrecognised';
|
|
11
|
+
let reason = 'sessionProjections.register has not answered yet';
|
|
12
|
+
return {
|
|
13
|
+
get shape() { return shape; },
|
|
14
|
+
get reason() { return shape === 'unrecognised' ? reason : undefined; },
|
|
15
|
+
async register(definition) {
|
|
16
|
+
const resolved = await registry.register(definition);
|
|
17
|
+
if (isHandle(resolved)) {
|
|
18
|
+
shape = 'handle';
|
|
19
|
+
reason = undefined;
|
|
20
|
+
return {
|
|
21
|
+
stateOf: (session) => resolved.stateOf(session),
|
|
22
|
+
dispose: () => resolved.dispose(),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
// Keep reads empty, but say so through `shape`/`reason` instead of pretending the
|
|
26
|
+
// units have no data.
|
|
27
|
+
shape = 'unrecognised';
|
|
28
|
+
reason = 'sessionProjections.register returned ' + (resolved === null ? 'null' : typeof resolved)
|
|
29
|
+
+ ' without a projection handle';
|
|
30
|
+
return { stateOf: () => undefined, dispose: async () => { } };
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=projections.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The family's host capability service: one place that resolves the platform
|
|
3
|
+
* ports and reports which halves are available.
|
|
4
|
+
*/
|
|
5
|
+
import { Service } from '@deepseek-ai/cordis';
|
|
6
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
7
|
+
import type { AgentIdentity, HostPlatformPorts } from '@lmzhen/dsh-evolution-platform-contract';
|
|
8
|
+
export type { HostPlatformPorts } from '@lmzhen/dsh-evolution-platform-contract';
|
|
9
|
+
/** Domain service owning the host port table. */
|
|
10
|
+
export declare class EvolutionPlatform extends Service {
|
|
11
|
+
static inject: never[];
|
|
12
|
+
/** The family-facing contract generation this adapter implements. */
|
|
13
|
+
readonly contract: 1;
|
|
14
|
+
constructor(ctx: Context);
|
|
15
|
+
/**
|
|
16
|
+
* Resolve the host ports now. Consumers read this one table; they never fall
|
|
17
|
+
* back to a direct platform import (the second resolution D7 removed).
|
|
18
|
+
* Deliberately uncached: `ctx.get` is the capability lifecycle.
|
|
19
|
+
*/
|
|
20
|
+
get ports(): HostPlatformPorts;
|
|
21
|
+
/** Whether an exact live root agent is available for this id. */
|
|
22
|
+
isRootAgent(agent: AgentIdentity): boolean;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The family's host capability service: one place that resolves the platform
|
|
3
|
+
* ports and reports which halves are available.
|
|
4
|
+
*/
|
|
5
|
+
import { Service } from '@deepseek-ai/cordis';
|
|
6
|
+
import { CONTRACT } from '@lmzhen/dsh-evolution-platform-contract';
|
|
7
|
+
import { agentsPort } from "./agents.js";
|
|
8
|
+
import { commandsPort } from "./commands.js";
|
|
9
|
+
import { settingsPort } from "./settings.js";
|
|
10
|
+
import { profileContextPort } from "./profileContext.js";
|
|
11
|
+
import { pluginManagerPort, pluginInventoryPort, configEditorPort } from "./platformView.js";
|
|
12
|
+
import { workingDirectoryPort } from "./workingDirectory.js";
|
|
13
|
+
import { skillsPort } from "./skills.js";
|
|
14
|
+
import { storageDomainPort } from "./storageDomain.js";
|
|
15
|
+
import { connectionPort } from "./connection.js";
|
|
16
|
+
import { systemPromptPort } from "./systemPrompt.js";
|
|
17
|
+
import { subagentsPort } from "./subagents.js";
|
|
18
|
+
import { userQuestionsPort } from "./userQuestions.js";
|
|
19
|
+
import { presetsPort } from "./presets.js";
|
|
20
|
+
import { projectionPort } from "./projections.js";
|
|
21
|
+
import { toolsPort } from "./tools.js";
|
|
22
|
+
import { llmPort } from "./llm.js";
|
|
23
|
+
/** Domain service owning the host port table. */
|
|
24
|
+
export class EvolutionPlatform extends Service {
|
|
25
|
+
static inject = [];
|
|
26
|
+
/** The family-facing contract generation this adapter implements. */
|
|
27
|
+
contract = CONTRACT;
|
|
28
|
+
constructor(ctx) {
|
|
29
|
+
super(ctx, 'evolutionPlatform');
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Resolve the host ports now. Consumers read this one table; they never fall
|
|
33
|
+
* back to a direct platform import (the second resolution D7 removed).
|
|
34
|
+
* Deliberately uncached: `ctx.get` is the capability lifecycle.
|
|
35
|
+
*/
|
|
36
|
+
get ports() {
|
|
37
|
+
return {
|
|
38
|
+
agents: agentsPort(this.ctx),
|
|
39
|
+
connection: connectionPort(this.ctx),
|
|
40
|
+
settings: settingsPort(this.ctx),
|
|
41
|
+
storageDomain: storageDomainPort(this.ctx),
|
|
42
|
+
workingDirectory: workingDirectoryPort(this.ctx),
|
|
43
|
+
pluginManager: pluginManagerPort(this.ctx),
|
|
44
|
+
pluginInventory: pluginInventoryPort(this.ctx),
|
|
45
|
+
configEditor: configEditorPort(this.ctx),
|
|
46
|
+
profileContext: profileContextPort(this.ctx),
|
|
47
|
+
skills: skillsPort(this.ctx),
|
|
48
|
+
commands: commandsPort(this.ctx),
|
|
49
|
+
systemPrompt: systemPromptPort(this.ctx),
|
|
50
|
+
subagents: subagentsPort(this.ctx),
|
|
51
|
+
userQuestions: userQuestionsPort(this.ctx),
|
|
52
|
+
projections: projectionPort(this.ctx),
|
|
53
|
+
llm: llmPort(this.ctx),
|
|
54
|
+
tools: toolsPort(this.ctx),
|
|
55
|
+
presets: presetsPort(this.ctx),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/** Whether an exact live root agent is available for this id. */
|
|
59
|
+
isRootAgent(agent) {
|
|
60
|
+
return this.ports.agents?.isRoot(agent) === true;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The settings implementation half of the family's platform boundary.
|
|
3
|
+
*/
|
|
4
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
5
|
+
import type { SettingsPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
6
|
+
export type { SettingsPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
7
|
+
/** Resolve the settings port; undefined means the host has no settings service. */
|
|
8
|
+
export declare function settingsPort(ctx: Context): SettingsPort | undefined;
|
|
9
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Resolve the settings port; undefined means the host has no settings service. */
|
|
2
|
+
export function settingsPort(ctx) {
|
|
3
|
+
// platform-declaration anchor: settings is declared in core PLATFORM_SERVICE_PROBES.
|
|
4
|
+
const service = ctx.get('settings');
|
|
5
|
+
if (service === undefined)
|
|
6
|
+
return undefined;
|
|
7
|
+
if (typeof service.configure !== 'function' && typeof service.describe !== 'function')
|
|
8
|
+
return undefined;
|
|
9
|
+
return {
|
|
10
|
+
...(typeof service.configure === 'function' ? { configure: (options, owner) => service.configure(options, owner) } : {}),
|
|
11
|
+
...(typeof service.describe === 'function' ? { describe: (options) => service.describe(options) } : {}),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The skills implementation half of the family's platform boundary.
|
|
3
|
+
*/
|
|
4
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
5
|
+
import type { SkillsPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
6
|
+
export type { SkillsPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
7
|
+
/** Resolve the skills port; undefined means the host has no skills service. */
|
|
8
|
+
export declare function skillsPort(ctx: Context): SkillsPort | undefined;
|
|
9
|
+
//# sourceMappingURL=skills.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Resolve the skills port; undefined means the host has no skills service. */
|
|
2
|
+
export function skillsPort(ctx) {
|
|
3
|
+
// platform-declaration anchor: skills is declared in core PLATFORM_SERVICE_PROBES.
|
|
4
|
+
const service = ctx.get('skills');
|
|
5
|
+
if (service === undefined || typeof service.list !== 'function')
|
|
6
|
+
return undefined;
|
|
7
|
+
return { list: (options) => service.list(options) };
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=skills.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The storage-domain implementation half of the family's platform boundary.
|
|
3
|
+
*/
|
|
4
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
5
|
+
import type { StorageDomainPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
6
|
+
export type { StorageDomainPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
7
|
+
/** Resolve the storage-domain port; undefined means the host has no provider. */
|
|
8
|
+
export declare function storageDomainPort(ctx: Context): StorageDomainPort | undefined;
|
|
9
|
+
//# sourceMappingURL=storageDomain.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Resolve the storage-domain port; undefined means the host has no provider. */
|
|
2
|
+
export function storageDomainPort(ctx) {
|
|
3
|
+
// platform-declaration anchor: storageDomain is declared in core PLATFORM_SERVICE_PROBES.
|
|
4
|
+
const service = ctx.get('storageDomain');
|
|
5
|
+
if (service === undefined || typeof service.open !== 'function')
|
|
6
|
+
return undefined;
|
|
7
|
+
return { open: (spec) => service.open(spec) };
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=storageDomain.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The subagents implementation half of the family's platform boundary.
|
|
3
|
+
*/
|
|
4
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
5
|
+
import type { SubagentsPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
6
|
+
export type { SubagentActivationPort, SubagentSendOptions, SubagentsPort, } from '@lmzhen/dsh-evolution-platform-contract';
|
|
7
|
+
/** Resolve the subagents port; undefined means the host has no subagents service. */
|
|
8
|
+
export declare function subagentsPort(ctx: Context): SubagentsPort | undefined;
|
|
9
|
+
//# sourceMappingURL=subagents.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Resolve the subagents port; undefined means the host has no subagents service. */
|
|
2
|
+
export function subagentsPort(ctx) {
|
|
3
|
+
// platform-declaration anchor: subagents is declared in core PLATFORM_SERVICE_PROBES.
|
|
4
|
+
const subagents = ctx.get('subagents');
|
|
5
|
+
if (subagents === undefined
|
|
6
|
+
|| typeof subagents.getProvider !== 'function'
|
|
7
|
+
|| typeof subagents.startActivation !== 'function')
|
|
8
|
+
return undefined;
|
|
9
|
+
return {
|
|
10
|
+
getProvider: (name) => subagents.getProvider(name),
|
|
11
|
+
start: (spec) => subagents.startActivation(spec),
|
|
12
|
+
...(typeof subagents.sendMessage === 'function'
|
|
13
|
+
? { sendMessage: (sender, targetId, content, options) => subagents.sendMessage(sender, targetId, content, options) }
|
|
14
|
+
: {}),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=subagents.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The system-prompt implementation half of the family's platform boundary.
|
|
3
|
+
*/
|
|
4
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
5
|
+
import type { SystemPromptPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
6
|
+
export type { SystemPromptPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
7
|
+
/** Resolve the system-prompt port; undefined means the host has no such service. */
|
|
8
|
+
export declare function systemPromptPort(ctx: Context): SystemPromptPort | undefined;
|
|
9
|
+
//# sourceMappingURL=systemPrompt.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Resolve the system-prompt port; undefined means the host has no such service. */
|
|
2
|
+
export function systemPromptPort(ctx) {
|
|
3
|
+
// platform-declaration anchor: systemPrompt is declared in core PLATFORM_SERVICE_PROBES.
|
|
4
|
+
const service = ctx.get('systemPrompt');
|
|
5
|
+
if (service === undefined || typeof service.section !== 'function' || typeof service.variable !== 'function')
|
|
6
|
+
return undefined;
|
|
7
|
+
return {
|
|
8
|
+
section: (section) => service.section(section),
|
|
9
|
+
variable: (name, provider) => service.variable(name, provider),
|
|
10
|
+
...(typeof service.context === 'function' ? { context: (context) => service.context(context) } : {}),
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=systemPrompt.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tools implementation half of the family's platform boundary.
|
|
3
|
+
*/
|
|
4
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
5
|
+
import type { ToolDefinition } from '@deepseek-ai/dsh-tools';
|
|
6
|
+
import type { ToolsPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
7
|
+
export type { ToolsPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
8
|
+
/**
|
|
9
|
+
* Resolve the tools port from a context; undefined means the host has no tools service.
|
|
10
|
+
* platform-declaration anchor: tools is declared in core PLATFORM_SERVICE_PROBES.
|
|
11
|
+
*/
|
|
12
|
+
export declare function toolsPort(ctx: Context): ToolsPort | undefined;
|
|
13
|
+
/** Register one family tool through the port; a missing service yields a no-op disposer. */
|
|
14
|
+
export declare function registerEvolutionTool(ctx: Context, definition: ToolDefinition): () => void;
|
|
15
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve the tools port from a context; undefined means the host has no tools service.
|
|
3
|
+
* platform-declaration anchor: tools is declared in core PLATFORM_SERVICE_PROBES.
|
|
4
|
+
*/
|
|
5
|
+
export function toolsPort(ctx) {
|
|
6
|
+
// The cast is confined to the boundary: the platform service class is the
|
|
7
|
+
// contract, while the port keeps feature code independent of its full face.
|
|
8
|
+
const tools = ctx.get('tools');
|
|
9
|
+
if (tools === undefined)
|
|
10
|
+
return undefined;
|
|
11
|
+
return {
|
|
12
|
+
register: (definition) => tools.register(definition),
|
|
13
|
+
guard: (guard) => tools.guard(guard),
|
|
14
|
+
restrict: (filter) => tools.restrict(filter),
|
|
15
|
+
get: (name, scope) => tools.get(name, scope),
|
|
16
|
+
...(typeof tools.execute === 'function' ? { execute: (input) => tools.execute(input) } : {}),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/** Register one family tool through the port; a missing service yields a no-op disposer. */
|
|
20
|
+
export function registerEvolutionTool(ctx, definition) {
|
|
21
|
+
return toolsPort(ctx)?.register(definition) ?? (() => { });
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The human-question implementation half of the family's platform boundary.
|
|
3
|
+
*/
|
|
4
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
5
|
+
import type { UserQuestionsPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
6
|
+
export type { AskedQuestions, UserQuestion, UserQuestionOption, UserQuestionsPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
7
|
+
/** Resolve the user-questions port; undefined means the host has no such service. */
|
|
8
|
+
export declare function userQuestionsPort(ctx: Context): UserQuestionsPort | undefined;
|
|
9
|
+
//# sourceMappingURL=userQuestions.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Resolve the user-questions port; undefined means the host has no such service. */
|
|
2
|
+
export function userQuestionsPort(ctx) {
|
|
3
|
+
// platform-declaration anchor: userQuestions is declared in core PLATFORM_SERVICE_PROBES.
|
|
4
|
+
const service = ctx.get('userQuestions');
|
|
5
|
+
if (service === undefined || typeof service.ask !== 'function')
|
|
6
|
+
return undefined;
|
|
7
|
+
return { ask: (request) => service.ask(request) };
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=userQuestions.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform-provided runtime helper values.
|
|
3
|
+
*
|
|
4
|
+
* These are the only host values feature packages may receive from the
|
|
5
|
+
* adapter besides the port functions. Kept separate from `./ports` so a
|
|
6
|
+
* composition-time import of a port does not load the host runtime.
|
|
7
|
+
*/
|
|
8
|
+
export { defineTool } from '@deepseek-ai/dsh-tools';
|
|
9
|
+
export type { ObjectJsonSchema, ToolDefinition, ToolGuard, ToolRestriction, } from '@deepseek-ai/dsh-tools';
|
|
10
|
+
export type { CommandInvocation, CommandResult } from '@deepseek-ai/dsh-commands';
|
|
11
|
+
export { scopeOf } from '@deepseek-ai/dsh-scope';
|
|
12
|
+
export { defineDomain, domainTable, DomainError } from '@deepseek-ai/dsh-storage-domain';
|
|
13
|
+
export { escapeText } from '@deepseek-ai/dsh-skill';
|
|
14
|
+
export type { SkillCandidate, SkillDefinition, SkillInvocationPolicy, SkillLookupOptions, SkillProvider, SkillProviderControl, SkillProviderObservation, SkillSummary, } from '@deepseek-ai/dsh-skill';
|
|
15
|
+
export type { Domain } from '@deepseek-ai/dsh-storage-domain';
|
|
16
|
+
export { BlockAssembler, createToolResultMessage, createUserMessage } from '@deepseek-ai/dsh-llm';
|
|
17
|
+
export type { ContentBlock, ContextFormed, GenerateOptions, Message, RequestMessage, StreamChunk, ToolCallBlock, ToolCallId, ToolHistory, ToolSchema, } from '@deepseek-ai/dsh-llm';
|
|
18
|
+
export { SessionId } from '@deepseek-ai/dsh-session';
|
|
19
|
+
export type { EpochHeader, Session, SessionEvent } from '@deepseek-ai/dsh-session';
|
|
20
|
+
export type { Agent, AgentOptions, PreStepDecision } from '@deepseek-ai/dsh-agent';
|
|
21
|
+
export type { SubagentStopReason } from '@deepseek-ai/dsh-subagent';
|
|
22
|
+
export type { UserMessage } from '@deepseek-ai/dsh-llm';
|
|
23
|
+
export type { PromptContext, PromptSection } from '@deepseek-ai/dsh-system-prompt';
|
|
24
|
+
export { withFileLock } from '@deepseek-ai/dsh-atomic-write';
|
|
25
|
+
//# sourceMappingURL=values.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Platform-provided runtime helper values.
|
|
3
|
+
*
|
|
4
|
+
* These are the only host values feature packages may receive from the
|
|
5
|
+
* adapter besides the port functions. Kept separate from `./ports` so a
|
|
6
|
+
* composition-time import of a port does not load the host runtime.
|
|
7
|
+
*/
|
|
8
|
+
export { defineTool } from '@deepseek-ai/dsh-tools';
|
|
9
|
+
export { scopeOf } from '@deepseek-ai/dsh-scope';
|
|
10
|
+
export { defineDomain, domainTable, DomainError } from '@deepseek-ai/dsh-storage-domain';
|
|
11
|
+
export { escapeText } from '@deepseek-ai/dsh-skill';
|
|
12
|
+
export { BlockAssembler, createToolResultMessage, createUserMessage } from '@deepseek-ai/dsh-llm';
|
|
13
|
+
export { SessionId } from '@deepseek-ai/dsh-session';
|
|
14
|
+
export { withFileLock } from '@deepseek-ai/dsh-atomic-write';
|
|
15
|
+
//# sourceMappingURL=values.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The working-directory implementation half of the family's platform boundary.
|
|
3
|
+
*/
|
|
4
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
5
|
+
import type { WorkingDirectoryPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
6
|
+
export type { WorkingDirectoryPort } from '@lmzhen/dsh-evolution-platform-contract';
|
|
7
|
+
/** Resolve the working-directory port; undefined means the host has no such service. */
|
|
8
|
+
export declare function workingDirectoryPort(ctx: Context): WorkingDirectoryPort | undefined;
|
|
9
|
+
//# sourceMappingURL=workingDirectory.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Resolve the working-directory port; undefined means the host has no such service. */
|
|
2
|
+
export function workingDirectoryPort(ctx) {
|
|
3
|
+
// platform-declaration anchor: workingDirectory is declared in core PLATFORM_SERVICE_PROBES.
|
|
4
|
+
const service = ctx.get('workingDirectory');
|
|
5
|
+
if (service === undefined || typeof service.ensure !== 'function')
|
|
6
|
+
return undefined;
|
|
7
|
+
return { ensure: (agent, signal) => service.ensure(agent, signal) };
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=workingDirectory.js.map
|
package/lib/values.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { defineTool } from "@deepseek-ai/dsh-tools";
|
|
2
|
+
import { scopeOf } from "@deepseek-ai/dsh-scope";
|
|
3
|
+
import { DomainError, defineDomain, domainTable } from "@deepseek-ai/dsh-storage-domain";
|
|
4
|
+
import { escapeText } from "@deepseek-ai/dsh-skill";
|
|
5
|
+
import { BlockAssembler, createToolResultMessage, createUserMessage } from "@deepseek-ai/dsh-llm";
|
|
6
|
+
import { SessionId } from "@deepseek-ai/dsh-session";
|
|
7
|
+
import { withFileLock } from "@deepseek-ai/dsh-atomic-write";
|
|
8
|
+
export { BlockAssembler, DomainError, SessionId, createToolResultMessage, createUserMessage, defineDomain, defineTool, domainTable, escapeText, scopeOf, withFileLock };
|
package/locale/de.json
ADDED
package/locale/en.json
ADDED
package/locale/es.json
ADDED
package/locale/fr.json
ADDED
package/locale/ja.json
ADDED
package/locale/pt.json
ADDED
package/locale/ru.json
ADDED