@zhin.js/runtime 1.1.4 → 1.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.
@@ -1,5 +1,4 @@
1
- import type { RuntimeConfigDocument } from '@zhin.js/plugin-runtime';
2
- import type { PluginId } from '@zhin.js/plugin-runtime';
1
+ import type { RuntimeConfigDocument, PluginId } from '@zhin.js/plugin-runtime';
3
2
  import type { ProjectGraph } from './project-graph.js';
4
3
  export declare const HOST_CONFIG_SCHEMA: {
5
4
  $schema: string;
@@ -72,6 +71,36 @@ export declare const HOST_CONFIG_SCHEMA: {
72
71
  description: string;
73
72
  "x-descriptionZh": string;
74
73
  properties: {
74
+ decisions: {
75
+ type: string;
76
+ additionalProperties: boolean;
77
+ required: string[];
78
+ description: string;
79
+ "x-descriptionZh": string;
80
+ properties: {
81
+ provider: {
82
+ type: string;
83
+ pattern: string;
84
+ description: string;
85
+ "x-descriptionZh": string;
86
+ };
87
+ skills: {
88
+ $ref: string;
89
+ };
90
+ tools: {
91
+ $ref: string;
92
+ };
93
+ memory: {
94
+ $ref: string;
95
+ };
96
+ agents: {
97
+ $ref: string;
98
+ };
99
+ approval: {
100
+ $ref: string;
101
+ };
102
+ };
103
+ };
75
104
  workroom: {
76
105
  type: string;
77
106
  additionalProperties: boolean;
@@ -564,6 +593,44 @@ export declare const HOST_CONFIG_SCHEMA: {
564
593
  "x-descriptionZh": string;
565
594
  };
566
595
  };
596
+ $defs: {
597
+ decisionTask: {
598
+ type: string;
599
+ additionalProperties: boolean;
600
+ required: string[];
601
+ properties: {
602
+ mode: {
603
+ type: string;
604
+ enum: string[];
605
+ };
606
+ timeoutMs: {
607
+ type: string;
608
+ minimum: number;
609
+ maximum: number;
610
+ };
611
+ minConfidence: {
612
+ type: string;
613
+ minimum: number;
614
+ maximum: number;
615
+ };
616
+ topK: {
617
+ type: string;
618
+ minimum: number;
619
+ maximum: number;
620
+ };
621
+ maxCandidates: {
622
+ type: string;
623
+ minimum: number;
624
+ maximum: number;
625
+ };
626
+ maxSelections: {
627
+ type: string;
628
+ minimum: number;
629
+ maximum: number;
630
+ };
631
+ };
632
+ };
633
+ };
567
634
  };
568
635
  /** Host configuration keys consumed by Runtime composition and Host installers. */
569
636
  export declare const HOST_CONFIG_KEYS: readonly string[];
@@ -57,6 +57,7 @@ export class ConfigComposer {
57
57
  // start-command, not Plugin ConfigViews.
58
58
  const effectiveSchema = Object.freeze({
59
59
  type: 'object',
60
+ $defs: HOST_CONFIG_SCHEMA.$defs,
60
61
  additionalProperties: false,
61
62
  properties: {
62
63
  ...HOST_CONFIG_SCHEMA.properties,
@@ -46,6 +46,21 @@
46
46
  "description": "Providers, Agents, sessions, memory, tools, and execution security.",
47
47
  "x-descriptionZh": "Provider、Agent、会话、记忆、工具与执行安全策略。",
48
48
  "properties": {
49
+ "decisions": {
50
+ "type": "object",
51
+ "additionalProperties": false,
52
+ "required": ["provider"],
53
+ "description": "Optional structured-decision service. Missing tasks are off; use shadow before active.",
54
+ "x-descriptionZh": "可选的结构化决策服务。未配置的任务关闭;建议先用 shadow 验证。",
55
+ "properties": {
56
+ "provider": { "type": "string", "pattern": "^root(/[a-z0-9][a-z0-9-]*)+$", "description": "Exact enabled DecisionProvider Plugin owner, such as root/typesafe.", "x-descriptionZh": "提供已启用 DecisionProvider 的精确插件身份,例如 root/typesafe。" },
57
+ "skills": { "$ref": "#/$defs/decisionTask" },
58
+ "tools": { "$ref": "#/$defs/decisionTask" },
59
+ "memory": { "$ref": "#/$defs/decisionTask" },
60
+ "agents": { "$ref": "#/$defs/decisionTask" },
61
+ "approval": { "$ref": "#/$defs/decisionTask" }
62
+ }
63
+ },
49
64
  "workroom": {
50
65
  "type": "object",
51
66
  "additionalProperties": true,
@@ -264,5 +279,20 @@
264
279
  "assistant": { "type": "object", "additionalProperties": true, "description": "Scheduled jobs, event ingress, and failure notifications.", "x-descriptionZh": "调度任务、事件入口和失败通知。" },
265
280
  "log_level": { "type": ["string", "number"], "description": "Runtime log level.", "x-descriptionZh": "Runtime 日志级别。" },
266
281
  "plugin": { "type": "object", "description": "Root Plugin configuration; replaced by its project schema during composition.", "x-descriptionZh": "Root Plugin 配置;组合时由项目 Schema 替换。" }
282
+ },
283
+ "$defs": {
284
+ "decisionTask": {
285
+ "type": "object",
286
+ "additionalProperties": false,
287
+ "required": ["mode"],
288
+ "properties": {
289
+ "mode": { "type": "string", "enum": ["off", "shadow", "active"] },
290
+ "timeoutMs": { "type": "integer", "minimum": 1, "maximum": 2147483647 },
291
+ "minConfidence": { "type": "number", "minimum": 0, "maximum": 1 },
292
+ "topK": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
293
+ "maxCandidates": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 },
294
+ "maxSelections": { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }
295
+ }
296
+ }
267
297
  }
268
298
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/runtime",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "Static Plugin graph, generation transaction and HMR Root runtime for Zhin.js",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -20,24 +20,24 @@
20
20
  "es-module-lexer": "2.3.1",
21
21
  "import-meta-resolve": "4.2.0",
22
22
  "semver": "7.8.5",
23
- "@zhin.js/plugin-runtime": "1.1.11",
24
- "@zhin.js/feature-kit": "1.1.2"
23
+ "@zhin.js/plugin-runtime": "1.1.12",
24
+ "@zhin.js/feature-kit": "1.1.3"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "^26.1.2",
28
28
  "tsx": "^4.23.1",
29
29
  "typescript": "^6.0.3",
30
- "@zhin.js/adapter": "1.1.16",
31
- "@zhin.js/agent-feature": "1.1.3",
32
- "@zhin.js/command": "1.1.4",
33
- "@zhin.js/component": "1.1.3",
34
- "@zhin.js/mcp-feature": "1.1.3",
35
- "@zhin.js/layout": "1.1.3",
36
- "@zhin.js/page": "1.1.3",
37
- "@zhin.js/middleware": "1.1.3",
38
- "@zhin.js/prompt-section": "1.1.2",
39
- "@zhin.js/skill": "1.1.3",
40
- "@zhin.js/tool": "1.1.3"
30
+ "@zhin.js/adapter": "1.1.17",
31
+ "@zhin.js/agent-feature": "1.1.4",
32
+ "@zhin.js/command": "1.1.5",
33
+ "@zhin.js/component": "1.1.4",
34
+ "@zhin.js/layout": "1.1.4",
35
+ "@zhin.js/mcp-feature": "1.1.4",
36
+ "@zhin.js/middleware": "1.1.4",
37
+ "@zhin.js/page": "1.1.4",
38
+ "@zhin.js/prompt-section": "1.1.3",
39
+ "@zhin.js/skill": "1.1.4",
40
+ "@zhin.js/tool": "1.1.4"
41
41
  },
42
42
  "repository": {
43
43
  "type": "git",