@metago-ai/engine 2.1.0 → 2.1.1

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/SDK/types.d.ts CHANGED
@@ -1,168 +1,168 @@
1
- /**
2
- * MetaGO Engine - SDK 类型定义
3
- * SDK Type Definitions
4
- *
5
- * 让其他开发者基于引擎构建应用时的类型接口。
6
- *
7
- * @author 易霄 / MetaGO Lightyear
8
- * @version 1.0.0
9
- */
10
-
11
- // ===== 引擎核心类型 =====
12
-
13
- export interface EngineConfig {
14
- enginePath?: string;
15
- version?: string;
16
- memoryPath?: string;
17
- }
18
-
19
- export interface EngineContext {
20
- input?: string;
21
- decision?: string;
22
- capability?: {
23
- trigger?: string;
24
- preconditions?: string[];
25
- steps?: string[];
26
- feedback?: string;
27
- endState?: string;
28
- };
29
- }
30
-
31
- // ===== 验证类型 =====
32
-
33
- export type ValidationSeverity = 'critical' | 'high' | 'medium' | 'low';
34
- export type ValidationStatus = 'pass' | 'fail' | 'warning';
35
-
36
- export interface ValidationResult {
37
- axiomId: string;
38
- axiomName: string;
39
- status: ValidationStatus;
40
- severity: ValidationSeverity;
41
- message: string;
42
- details?: string[];
43
- timestamp: string;
44
- }
45
-
46
- export interface ValidationSummary {
47
- total: number;
48
- pass: number;
49
- fail: number;
50
- warning: number;
51
- criticalFail: number;
52
- }
53
-
54
- // ===== 决策锁类型 =====
55
-
56
- export type GateStatus = 'pass' | 'fail' | 'warning';
57
-
58
- export interface GateResult {
59
- gateId: string;
60
- gateName: string;
61
- status: GateStatus;
62
- message: string;
63
- details?: string[];
64
- }
65
-
66
- export interface DecisionLockResult {
67
- passed: boolean;
68
- gates: GateResult[];
69
- failedGates: string[];
70
- timestamp: string;
71
- output: string;
72
- }
73
-
74
- // ===== 进化类型 =====
75
-
76
- export type EvolutionStage =
77
- | 'PERCEPTION'
78
- | 'GAP_ANALYSIS'
79
- | 'SELF_GENERATION'
80
- | 'VALIDATION'
81
- | 'RECURSION';
82
-
83
- export interface Boundary {
84
- type: string;
85
- message: string;
86
- severity: 'critical' | 'high' | 'medium' | 'low';
87
- detectedAt: string;
88
- context?: Record<string, any>;
89
- }
90
-
91
- export interface Gap {
92
- id: string;
93
- description: string;
94
- missingCapability: string;
95
- requiredSkill?: string;
96
- requiredProtocol?: string;
97
- severity: 'critical' | 'high' | 'medium' | 'low';
98
- }
99
-
100
- export interface GeneratedSolution {
101
- id: string;
102
- type: 'skill' | 'protocol' | 'validator' | 'engine';
103
- name: string;
104
- description: string;
105
- draft: string;
106
- validated: boolean;
107
- }
108
-
109
- export interface EvolutionResult {
110
- success: boolean;
111
- stage: EvolutionStage;
112
- boundary?: Boundary;
113
- gaps?: Gap[];
114
- solutions?: GeneratedSolution[];
115
- newVersion?: string;
116
- errors: string[];
117
- timestamp: string;
118
- metaMetaEvolution?: {
119
- monitored: boolean;
120
- evolutionValid: boolean;
121
- concerns: string[];
122
- };
123
- }
124
-
125
- // ===== 基因组类型 =====
126
-
127
- export interface Genome {
128
- engine_version: string;
129
- metago_version: string;
130
- package_version: string;
131
- release_date: string;
132
- backward_compatibility: string;
133
- genome: {
134
- axioms: { total: number; critical: number; critical_ids: string[]; immutable: boolean; file: string };
135
- attributes: { total: number; critical: number; critical_ids: string[]; evolvable: boolean; file: string };
136
- protocols: { total: number; critical: number; critical_ids: string[]; file: string };
137
- engines: { total: number; core: number; file: string };
138
- algorithms: { total: number };
139
- atoms: { total: number };
140
- patents: { total: number; accepted: number; reserved: number };
141
- value_dimensions: number;
142
- meta_ideologies: number;
143
- capability_families: number;
144
- architecture_layers: number;
145
- };
146
- runtime: {
147
- validators: string[];
148
- decision_lock_gates: string[];
149
- evolution_stages: string[];
150
- };
151
- activation: {
152
- rate: string;
153
- strategy: string;
154
- priority_order: string[];
155
- };
156
- platforms: string[];
157
- }
158
-
159
- // ===== SDK 接口 =====
160
-
161
- export interface IMetaGOEngine {
162
- init(): Promise<boolean>;
163
- validate(output: string, context?: EngineContext): { results: ValidationResult[]; summary: ValidationSummary };
164
- lock(output: string, intent?: string, userRequest?: string): Promise<DecisionLockResult>;
165
- evolve(context?: { task?: string; failure?: { type: string; message: string }; feedback?: string }): Promise<EvolutionResult>;
166
- getStatus(): string;
167
- getGenome(): Genome | null;
168
- }
1
+ /**
2
+ * MetaGO Engine - SDK 类型定义
3
+ * SDK Type Definitions
4
+ *
5
+ * 让其他开发者基于引擎构建应用时的类型接口。
6
+ *
7
+ * @author 易霄 / MetaGO Lightyear
8
+ * @version 1.0.0
9
+ */
10
+
11
+ // ===== 引擎核心类型 =====
12
+
13
+ export interface EngineConfig {
14
+ enginePath?: string;
15
+ version?: string;
16
+ memoryPath?: string;
17
+ }
18
+
19
+ export interface EngineContext {
20
+ input?: string;
21
+ decision?: string;
22
+ capability?: {
23
+ trigger?: string;
24
+ preconditions?: string[];
25
+ steps?: string[];
26
+ feedback?: string;
27
+ endState?: string;
28
+ };
29
+ }
30
+
31
+ // ===== 验证类型 =====
32
+
33
+ export type ValidationSeverity = 'critical' | 'high' | 'medium' | 'low';
34
+ export type ValidationStatus = 'pass' | 'fail' | 'warning';
35
+
36
+ export interface ValidationResult {
37
+ axiomId: string;
38
+ axiomName: string;
39
+ status: ValidationStatus;
40
+ severity: ValidationSeverity;
41
+ message: string;
42
+ details?: string[];
43
+ timestamp: string;
44
+ }
45
+
46
+ export interface ValidationSummary {
47
+ total: number;
48
+ pass: number;
49
+ fail: number;
50
+ warning: number;
51
+ criticalFail: number;
52
+ }
53
+
54
+ // ===== 决策锁类型 =====
55
+
56
+ export type GateStatus = 'pass' | 'fail' | 'warning';
57
+
58
+ export interface GateResult {
59
+ gateId: string;
60
+ gateName: string;
61
+ status: GateStatus;
62
+ message: string;
63
+ details?: string[];
64
+ }
65
+
66
+ export interface DecisionLockResult {
67
+ passed: boolean;
68
+ gates: GateResult[];
69
+ failedGates: string[];
70
+ timestamp: string;
71
+ output: string;
72
+ }
73
+
74
+ // ===== 进化类型 =====
75
+
76
+ export type EvolutionStage =
77
+ | 'PERCEPTION'
78
+ | 'GAP_ANALYSIS'
79
+ | 'SELF_GENERATION'
80
+ | 'VALIDATION'
81
+ | 'RECURSION';
82
+
83
+ export interface Boundary {
84
+ type: string;
85
+ message: string;
86
+ severity: 'critical' | 'high' | 'medium' | 'low';
87
+ detectedAt: string;
88
+ context?: Record<string, any>;
89
+ }
90
+
91
+ export interface Gap {
92
+ id: string;
93
+ description: string;
94
+ missingCapability: string;
95
+ requiredSkill?: string;
96
+ requiredProtocol?: string;
97
+ severity: 'critical' | 'high' | 'medium' | 'low';
98
+ }
99
+
100
+ export interface GeneratedSolution {
101
+ id: string;
102
+ type: 'skill' | 'protocol' | 'validator' | 'engine';
103
+ name: string;
104
+ description: string;
105
+ draft: string;
106
+ validated: boolean;
107
+ }
108
+
109
+ export interface EvolutionResult {
110
+ success: boolean;
111
+ stage: EvolutionStage;
112
+ boundary?: Boundary;
113
+ gaps?: Gap[];
114
+ solutions?: GeneratedSolution[];
115
+ newVersion?: string;
116
+ errors: string[];
117
+ timestamp: string;
118
+ metaMetaEvolution?: {
119
+ monitored: boolean;
120
+ evolutionValid: boolean;
121
+ concerns: string[];
122
+ };
123
+ }
124
+
125
+ // ===== 基因组类型 =====
126
+
127
+ export interface Genome {
128
+ engine_version: string;
129
+ metago_version: string;
130
+ package_version: string;
131
+ release_date: string;
132
+ backward_compatibility: string;
133
+ genome: {
134
+ axioms: { total: number; critical: number; critical_ids: string[]; immutable: boolean; file: string };
135
+ attributes: { total: number; critical: number; critical_ids: string[]; evolvable: boolean; file: string };
136
+ protocols: { total: number; critical: number; critical_ids: string[]; file: string };
137
+ engines: { total: number; core: number; file: string };
138
+ algorithms: { total: number };
139
+ atoms: { total: number };
140
+ patents: { total: number; accepted: number; reserved: number };
141
+ value_dimensions: number;
142
+ meta_ideologies: number;
143
+ capability_families: number;
144
+ architecture_layers: number;
145
+ };
146
+ runtime: {
147
+ validators: string[];
148
+ decision_lock_gates: string[];
149
+ evolution_stages: string[];
150
+ };
151
+ activation: {
152
+ rate: string;
153
+ strategy: string;
154
+ priority_order: string[];
155
+ };
156
+ platforms: string[];
157
+ }
158
+
159
+ // ===== SDK 接口 =====
160
+
161
+ export interface IMetaGOEngine {
162
+ init(): Promise<boolean>;
163
+ validate(output: string, context?: EngineContext): { results: ValidationResult[]; summary: ValidationSummary };
164
+ lock(output: string, intent?: string, userRequest?: string): Promise<DecisionLockResult>;
165
+ evolve(context?: { task?: string; failure?: { type: string; message: string }; feedback?: string }): Promise<EvolutionResult>;
166
+ getStatus(): string;
167
+ getGenome(): Genome | null;
168
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metago-ai/engine",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "MetaGO Agent Harness(智能体运行时控制层套件 · 驭智层)Engine V2.1.0 — 硬驱动核心。让法律从建议变为可执行:KMWI 四层记忆(知识→记忆→智慧→直觉,持久化 JSON)+ 元进化五阶段循环(边界感知→差距分析→自生成→验证→递归,含时间预算和耦生度阈值)+ 技能智能生成(元创造五阶段,写入真实 SKILL.md 文件)+ 决策锁四道关卡 + 全链路溯源 + 927 算法驱动(57 工具 / 14 触发大类)。8 公理 + 7 属性 + 6 协议 CONSTITUTION 驱动。",
5
5
  "main": "RUNTIME/dist/index.js",
6
6
  "types": "RUNTIME/dist/index.d.ts",
@@ -15,7 +15,8 @@
15
15
  "status": "node RUNTIME/dist/cli.js status",
16
16
  "metrics": "node RUNTIME/dist/cli.js metrics",
17
17
  "lock": "node RUNTIME/dist/cli.js lock",
18
- "evolve": "node RUNTIME/dist/cli.js evolve"
18
+ "evolve": "node RUNTIME/dist/cli.js evolve",
19
+ "prepublishOnly": "node scripts/verify-dist.cjs"
19
20
  },
20
21
  "keywords": [
21
22
  "metago",
@@ -68,6 +69,7 @@
68
69
  "CORE/",
69
70
  "INDEX/",
70
71
  "EVOLUTION/",
72
+ "EVOLUTION.md",
71
73
  "ENGINE.md",
72
74
  "CHANGES.md",
73
75
  "GENOME.json",
@@ -77,8 +79,8 @@
77
79
  "package.json"
78
80
  ],
79
81
  "metago": {
80
- "engine_version": "2.1.0",
81
- "metago_version": "V36.8.5",
82
+ "engine_version": "2.1.1",
83
+ "metago_version": "V36.8.7",
82
84
  "parentPackage": "metago-lifeform@>=36.8.0",
83
85
  "algorithms": {
84
86
  "tools": 57,
@@ -86,4 +88,4 @@
86
88
  "trigger_categories": 14
87
89
  }
88
90
  }
89
- }
91
+ }