@lmzhen/dsh-evolution-core 0.56.0 → 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.
Files changed (84) hide show
  1. package/README.md +3 -1
  2. package/lib/authority-plugin.js +1 -1
  3. package/lib/composition/index.js +2 -2
  4. package/lib/{composition-CtNbVHq3.js → composition-B_F4TYOD.js} +5 -5
  5. package/lib/{ensure-BLmEW0Ju.js → ensure-BpVDuDnA.js} +1 -1
  6. package/lib/http-routes.js +1 -1
  7. package/lib/index.js +11 -15
  8. package/lib/{mutation-authority-DQfpXs1O.js → mutation-authority-Du-ON0NY.js} +1 -1
  9. package/lib/policy.js +1 -1
  10. package/lib/restrictor.js +1 -2
  11. package/lib/result.js +2 -33
  12. package/lib/runtime/plugin.js +1 -55
  13. package/lib/skills.js +1 -1
  14. package/lib/subagent/index.js +1 -1
  15. package/lib/types/authority.d.ts +1 -1
  16. package/lib/types/authority.js +1 -1
  17. package/lib/types/composition/ensure.js +1 -1
  18. package/lib/types/env.d.ts +4 -4
  19. package/lib/types/env.js +4 -4
  20. package/lib/types/http-routes.js +1 -1
  21. package/lib/types/opt-in.d.ts +2 -3
  22. package/lib/types/opt-in.js +4 -5
  23. package/lib/types/params.js +1 -1
  24. package/lib/types/platform-line.generated.d.ts +4 -2
  25. package/lib/types/platform-line.generated.js +6 -2
  26. package/lib/types/platform-services.js +0 -1
  27. package/lib/types/policy.js +1 -1
  28. package/lib/types/restrictor.js +2 -2
  29. package/lib/types/result.d.ts +3 -31
  30. package/lib/types/result.js +6 -24
  31. package/lib/types/runtime/coherence.js +1 -1
  32. package/lib/types/runtime/llm.d.ts +1 -1
  33. package/lib/types/runtime/llm.js +1 -1
  34. package/lib/types/runtime/platform.d.ts +8 -60
  35. package/lib/types/runtime/platform.js +7 -63
  36. package/lib/types/runtime/plugin.js +1 -4
  37. package/lib/types/runtime/projections.d.ts +1 -1
  38. package/lib/types/scope.js +1 -1
  39. package/lib/types/session-projection.d.ts +1 -1
  40. package/lib/types/signals.d.ts +1 -1
  41. package/lib/types/subagent/run.d.ts +1 -1
  42. package/lib/types/subagent/types.d.ts +4 -4
  43. package/package.json +7 -32
  44. package/lib/connection-DAJy7Xjm.js +0 -28
  45. package/lib/platform/index.js +0 -5
  46. package/lib/platform-BA27gvSG.js +0 -252
  47. package/lib/presets-C8vuCuNA.js +0 -27
  48. package/lib/tools-BrUswg8v.js +0 -22
  49. package/lib/types/platform/agents.d.ts +0 -32
  50. package/lib/types/platform/agents.js +0 -26
  51. package/lib/types/platform/commands.d.ts +0 -14
  52. package/lib/types/platform/commands.js +0 -9
  53. package/lib/types/platform/connection.d.ts +0 -26
  54. package/lib/types/platform/connection.js +0 -27
  55. package/lib/types/platform/index.d.ts +0 -57
  56. package/lib/types/platform/index.js +0 -30
  57. package/lib/types/platform/llm.d.ts +0 -47
  58. package/lib/types/platform/llm.js +0 -76
  59. package/lib/types/platform/platformView.d.ts +0 -21
  60. package/lib/types/platform/platformView.js +0 -29
  61. package/lib/types/platform/presets.d.ts +0 -31
  62. package/lib/types/platform/presets.js +0 -31
  63. package/lib/types/platform/profileContext.d.ts +0 -16
  64. package/lib/types/platform/profileContext.js +0 -14
  65. package/lib/types/platform/projections.d.ts +0 -35
  66. package/lib/types/platform/projections.js +0 -34
  67. package/lib/types/platform/sessionQuery.d.ts +0 -14
  68. package/lib/types/platform/sessionQuery.js +0 -9
  69. package/lib/types/platform/settings.d.ts +0 -22
  70. package/lib/types/platform/settings.js +0 -14
  71. package/lib/types/platform/skills.d.ts +0 -16
  72. package/lib/types/platform/skills.js +0 -9
  73. package/lib/types/platform/storageDomain.d.ts +0 -13
  74. package/lib/types/platform/storageDomain.js +0 -9
  75. package/lib/types/platform/subagents.d.ts +0 -25
  76. package/lib/types/platform/subagents.js +0 -17
  77. package/lib/types/platform/systemPrompt.d.ts +0 -16
  78. package/lib/types/platform/systemPrompt.js +0 -13
  79. package/lib/types/platform/tools.d.ts +0 -27
  80. package/lib/types/platform/tools.js +0 -23
  81. package/lib/types/platform/userQuestions.d.ts +0 -33
  82. package/lib/types/platform/userQuestions.js +0 -9
  83. package/lib/types/platform/workingDirectory.d.ts +0 -14
  84. package/lib/types/platform/workingDirectory.js +0 -9
@@ -1,16 +0,0 @@
1
- /**
2
- * The skills-catalog half of the family's host platform boundary.
3
- *
4
- * Reads stay scope-aware: the caller passes the calling scope (or undefined for
5
- * the explicit global layer), exactly as the platform's skill registry expects.
6
- */
7
- import type { Context } from '@deepseek-ai/cordis';
8
- import type { SkillSummary } from '@deepseek-ai/dsh-skill';
9
- export interface SkillsPort {
10
- list(options?: {
11
- scope?: unknown;
12
- }): Promise<readonly SkillSummary[]>;
13
- }
14
- /** Resolve the skills port; undefined means the host has no skills service. */
15
- export declare function skillsPort(ctx: Context): SkillsPort | undefined;
16
- //# sourceMappingURL=skills.d.ts.map
@@ -1,9 +0,0 @@
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
@@ -1,13 +0,0 @@
1
- /**
2
- * The storage-domain half of the family's host platform boundary.
3
- *
4
- * The domain schema stays in evolution-state; this port only forwards its open
5
- * call so the platform package imports no state types.
6
- */
7
- import type { Context } from '@deepseek-ai/cordis';
8
- export interface StorageDomainPort {
9
- open<T = unknown>(spec: unknown): Promise<T>;
10
- }
11
- /** Resolve the storage-domain port; undefined means the host has no provider. */
12
- export declare function storageDomainPort(ctx: Context): StorageDomainPort | undefined;
13
- //# sourceMappingURL=storageDomain.d.ts.map
@@ -1,9 +0,0 @@
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
@@ -1,25 +0,0 @@
1
- /**
2
- * The subagents half of the family's host platform boundary.
3
- *
4
- * Platform versions differ in the activation-spec shape. This port keeps one
5
- * family-facing entry (`start`) and one activation face; the platform-specific
6
- * shape lives in `startActivationSpec` until the version adapter replaces the
7
- * temporary dual-shape bridge.
8
- */
9
- import type { Context } from '@deepseek-ai/cordis';
10
- export interface SubagentActivationPort {
11
- readonly childId: string;
12
- readonly result: Promise<unknown>;
13
- dispose(): Promise<void>;
14
- }
15
- export interface SubagentSendOptions {
16
- readonly signal?: AbortSignal;
17
- }
18
- export interface SubagentsPort {
19
- getProvider(name: string): unknown;
20
- start(spec: unknown): Promise<SubagentActivationPort>;
21
- sendMessage?(sender: unknown, targetId: string, content: unknown, options?: SubagentSendOptions): Promise<unknown>;
22
- }
23
- /** Resolve the subagents port; undefined means the host has no subagents service. */
24
- export declare function subagentsPort(ctx: Context): SubagentsPort | undefined;
25
- //# sourceMappingURL=subagents.d.ts.map
@@ -1,17 +0,0 @@
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
@@ -1,16 +0,0 @@
1
- /**
2
- * The system-prompt half of the family's host platform boundary.
3
- *
4
- * The family registers one optional guidance section and its live variable; a
5
- * host without system-prompt keeps booting, so the port is optional.
6
- */
7
- import type { Context } from '@deepseek-ai/cordis';
8
- import type { PromptContext, PromptSection } from '@deepseek-ai/dsh-system-prompt';
9
- export interface SystemPromptPort {
10
- section(section: PromptSection): () => void;
11
- variable(name: string, provider: (context: unknown) => string | undefined): () => void;
12
- context?(context: PromptContext): () => void;
13
- }
14
- /** Resolve the system-prompt port; undefined means the host has no such service. */
15
- export declare function systemPromptPort(ctx: Context): SystemPromptPort | undefined;
16
- //# sourceMappingURL=systemPrompt.d.ts.map
@@ -1,13 +0,0 @@
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
@@ -1,27 +0,0 @@
1
- /**
2
- * The tools half of the family's host platform boundary.
3
- *
4
- * Only this module imports @deepseek-ai/dsh-tools; consumers receive a typed
5
- * port and never reshape ctx.get('tools') themselves. Missing service is a
6
- * capability downgrade, not a crash.
7
- */
8
- import type { Context } from '@deepseek-ai/cordis';
9
- import type { ToolDefinition, ToolGuard, ToolRestriction } from '@deepseek-ai/dsh-tools';
10
- /** The subset of the platform tools registry the family consumes. */
11
- export interface ToolsPort {
12
- register(definition: ToolDefinition): () => void;
13
- guard(guard: ToolGuard): () => void;
14
- restrict(filter: ToolRestriction): () => void;
15
- /** The visible tool under this scope, or undefined; the opt-in probe reads this. */
16
- get(name: string, scope?: unknown): unknown;
17
- /** Raw execute for callers that own the platform call shape (review aux path). */
18
- execute?<T = unknown>(input: unknown): Promise<T>;
19
- }
20
- /**
21
- * Resolve the tools port from a context; undefined means the host has no tools service.
22
- * platform-declaration anchor: tools is declared in core PLATFORM_SERVICE_PROBES.
23
- */
24
- export declare function toolsPort(ctx: Context): ToolsPort | undefined;
25
- /** Register one family tool through the port; a missing service yields a no-op disposer. */
26
- export declare function registerEvolutionTool(ctx: Context, definition: ToolDefinition): () => void;
27
- //# sourceMappingURL=tools.d.ts.map
@@ -1,23 +0,0 @@
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
@@ -1,33 +0,0 @@
1
- /**
2
- * The human-question half of the family's host platform boundary.
3
- *
4
- * `ask` is the only face the skill-write confirmation gate needs; the platform
5
- * owns live-root admission and delivery. The port returns the bare answer shape
6
- * so feature code does not import the user-questions package.
7
- */
8
- import type { Context } from '@deepseek-ai/cordis';
9
- export interface UserQuestionOption {
10
- readonly label: string;
11
- }
12
- export interface UserQuestion {
13
- readonly id: string;
14
- readonly header?: string;
15
- readonly question: string;
16
- readonly options?: readonly UserQuestionOption[];
17
- }
18
- export interface AskedQuestions {
19
- readonly answers: readonly {
20
- readonly id: string;
21
- readonly selected: readonly string[];
22
- }[];
23
- }
24
- export interface UserQuestionsPort {
25
- ask(request: {
26
- readonly questions: readonly UserQuestion[];
27
- readonly agent?: unknown;
28
- readonly signal?: AbortSignal;
29
- }): Promise<AskedQuestions>;
30
- }
31
- /** Resolve the user-questions port; undefined means the host has no such service. */
32
- export declare function userQuestionsPort(ctx: Context): UserQuestionsPort | undefined;
33
- //# sourceMappingURL=userQuestions.d.ts.map
@@ -1,9 +0,0 @@
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
@@ -1,14 +0,0 @@
1
- /**
2
- * The working-directory half of the family's host platform boundary.
3
- *
4
- * The platform resolves the session's cwd; the family only asks, keeping the
5
- * scope/cwd policy in one host seam.
6
- */
7
- import type { Context } from '@deepseek-ai/cordis';
8
- import type { Agent } from '@deepseek-ai/dsh-agent';
9
- export interface WorkingDirectoryPort {
10
- ensure(agent: Agent, signal?: AbortSignal): Promise<string>;
11
- }
12
- /** Resolve the working-directory port; undefined means the host has no such service. */
13
- export declare function workingDirectoryPort(ctx: Context): WorkingDirectoryPort | undefined;
14
- //# sourceMappingURL=workingDirectory.d.ts.map
@@ -1,9 +0,0 @@
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