@lmzhen/dsh-evolution-adapter 0.0.0 → 0.59.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.
Files changed (58) hide show
  1. package/README.md +19 -0
  2. package/lib/index.js +12 -0
  3. package/lib/llm-9Y3qyl1T.js +304 -0
  4. package/lib/ports.js +2 -0
  5. package/lib/review-child.js +117 -0
  6. package/lib/service.js +50 -0
  7. package/lib/types/agents.d.ts +9 -0
  8. package/lib/types/agents.js +26 -0
  9. package/lib/types/commands.d.ts +9 -0
  10. package/lib/types/commands.js +9 -0
  11. package/lib/types/connection.d.ts +9 -0
  12. package/lib/types/connection.js +27 -0
  13. package/lib/types/index.d.ts +18 -0
  14. package/lib/types/index.js +10 -0
  15. package/lib/types/llm.d.ts +12 -0
  16. package/lib/types/llm.js +67 -0
  17. package/lib/types/platformView.d.ts +10 -0
  18. package/lib/types/platformView.js +29 -0
  19. package/lib/types/ports.d.ts +40 -0
  20. package/lib/types/ports.js +24 -0
  21. package/lib/types/presets.d.ts +9 -0
  22. package/lib/types/presets.js +31 -0
  23. package/lib/types/profileContext.d.ts +9 -0
  24. package/lib/types/profileContext.js +14 -0
  25. package/lib/types/projections.d.ts +9 -0
  26. package/lib/types/projections.js +34 -0
  27. package/lib/types/review-child.d.ts +45 -0
  28. package/lib/types/review-child.js +117 -0
  29. package/lib/types/service.d.ts +24 -0
  30. package/lib/types/service.js +63 -0
  31. package/lib/types/settings.d.ts +9 -0
  32. package/lib/types/settings.js +14 -0
  33. package/lib/types/skills.d.ts +9 -0
  34. package/lib/types/skills.js +9 -0
  35. package/lib/types/storageDomain.d.ts +9 -0
  36. package/lib/types/storageDomain.js +9 -0
  37. package/lib/types/subagents.d.ts +9 -0
  38. package/lib/types/subagents.js +17 -0
  39. package/lib/types/systemPrompt.d.ts +9 -0
  40. package/lib/types/systemPrompt.js +13 -0
  41. package/lib/types/tools.d.ts +15 -0
  42. package/lib/types/tools.js +24 -0
  43. package/lib/types/userQuestions.d.ts +9 -0
  44. package/lib/types/userQuestions.js +9 -0
  45. package/lib/types/values.d.ts +25 -0
  46. package/lib/types/values.js +15 -0
  47. package/lib/types/workingDirectory.d.ts +9 -0
  48. package/lib/types/workingDirectory.js +9 -0
  49. package/lib/values.js +8 -0
  50. package/locale/de.json +6 -0
  51. package/locale/en.json +6 -0
  52. package/locale/es.json +6 -0
  53. package/locale/fr.json +6 -0
  54. package/locale/ja.json +6 -0
  55. package/locale/pt.json +6 -0
  56. package/locale/ru.json +6 -0
  57. package/locale/zh.json +6 -0
  58. package/package.json +59 -3
@@ -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,24 @@
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, options) => tools.register(definition, options),
13
+ guard: (guard) => tools.guard(guard),
14
+ restrict: (filter) => tools.restrict(filter),
15
+ get: (name, scope) => tools.get(name, scope),
16
+ ...(typeof tools.resolve === 'function' ? { resolve: (context) => tools.resolve(context) } : {}),
17
+ ...(typeof tools.execute === 'function' ? { execute: (input) => tools.execute(input) } : {}),
18
+ };
19
+ }
20
+ /** Register one family tool through the port; a missing service yields a no-op disposer. */
21
+ export function registerEvolutionTool(ctx, definition) {
22
+ return toolsPort(ctx)?.register(definition) ?? (() => { });
23
+ }
24
+ //# 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
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Host-Plattform-Adapter",
4
+ "description": "Verbindet die Familien-Plugins mit der Host-Plattform; das einzige Paket, das Host-Interna importiert."
5
+ }
6
+ }
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Host platform adapter",
4
+ "description": "Connects family plugins to the host platform; the only package that imports host internals."
5
+ }
6
+ }
package/locale/es.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Adaptador de la plataforma host",
4
+ "description": "Conecta los plugins de la familia con la plataforma host; el único paquete que importa las tripas del host."
5
+ }
6
+ }
package/locale/fr.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Adaptateur de la plateforme hôte",
4
+ "description": "Relie les plugins de la famille à la plateforme hôte ; le seul paquet qui importe les entrailles de l’hôte."
5
+ }
6
+ }
package/locale/ja.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "ホストプラットフォームアダプター",
4
+ "description": "ファミリープラグインをホストプラットフォームに接続する。ホスト内部をインポートする唯一のパッケージ。"
5
+ }
6
+ }
package/locale/pt.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Adaptador da plataforma host",
4
+ "description": "Conecta os plugins da família à plataforma host; o único pacote que importa os internos do host."
5
+ }
6
+ }
package/locale/ru.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Адаптер хост-платформы",
4
+ "description": "Связывает плагины семейства с хост-платформой; единственный пакет, импортирующий внутренности хоста."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "宿主平台适配器",
4
+ "description": "把家族插件接到宿主平台;唯一导入宿主内部实现的包。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,9 +1,65 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-adapter",
3
- "version": "0.0.0",
4
- "description": "Placeholder for the dsh-evolution host platform adapter",
5
- "license": "MIT",
3
+ "description": "The only host-facing platform adapter for the dsh-evolution family (community build)",
4
+ "version": "0.59.0",
6
5
  "publishConfig": {
7
6
  "access": "public"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/lmzhen/dsh-evolution.git",
11
+ "directory": "packages/evolution-adapter"
12
+ },
13
+ "type": "module",
14
+ "main": "lib/index.js",
15
+ "types": "lib/types/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./lib/types/index.d.ts",
19
+ "default": "./lib/index.js"
20
+ },
21
+ "./service": {
22
+ "types": "./lib/types/service.d.ts",
23
+ "default": "./lib/service.js"
24
+ },
25
+ "./ports": {
26
+ "types": "./lib/types/ports.d.ts",
27
+ "default": "./lib/ports.js"
28
+ },
29
+ "./values": {
30
+ "types": "./lib/types/values.d.ts",
31
+ "default": "./lib/values.js"
32
+ },
33
+ "./review-child": {
34
+ "types": "./lib/types/review-child.d.ts",
35
+ "default": "./lib/review-child.js"
36
+ },
37
+ "./package.json": "./package.json"
38
+ },
39
+ "files": [
40
+ "lib/**/*.js",
41
+ "lib/types/**/*.d.ts",
42
+ "locale/*.json"
43
+ ],
44
+ "license": "MIT",
45
+ "dependencies": {
46
+ "@deepseek-ai/dsh-atomic-write": "0.2.2-rc.5",
47
+ "@lmzhen/dsh-evolution-platform-contract": "0.59.0"
48
+ },
49
+ "peerDependencies": {
50
+ "@deepseek-ai/cordis": "^4.0.5",
51
+ "@deepseek-ai/dsh-agent": "0.2.2-rc.5",
52
+ "@deepseek-ai/dsh-commands": "0.2.2-rc.5",
53
+ "@deepseek-ai/dsh-llm": "0.2.2-rc.5",
54
+ "@deepseek-ai/dsh-scope": "0.2.2-rc.5",
55
+ "@deepseek-ai/dsh-session": "0.2.2-rc.5",
56
+ "@deepseek-ai/dsh-skill": "0.2.2-rc.5",
57
+ "@deepseek-ai/dsh-storage-domain": "0.2.2-rc.5",
58
+ "@deepseek-ai/dsh-subagent": "0.2.2-rc.5",
59
+ "@deepseek-ai/dsh-system-prompt": "0.2.2-rc.5",
60
+ "@deepseek-ai/dsh-tools": "0.2.2-rc.5"
61
+ },
62
+ "engines": {
63
+ "dsh": "0.2.2-rc.5"
8
64
  }
9
65
  }