@microi.net/cli 5.9.3 → 5.9.4
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/.codebuddy-plugin/marketplace.json +2 -2
- package/.codebuddy-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.mcp.json +1 -1
- package/.workbuddy-plugin/marketplace.json +2 -2
- package/.workbuddy-plugin/plugin.json +1 -1
- package/LICENSE +21 -21
- package/README.md +71 -71
- package/assets/build-meta.json +6 -6
- package/assets/feature-matrix.json +138 -138
- package/assets/logo.svg +4 -4
- package/cordis.patch.yml +1 -1
- package/package.json +1 -1
- package/scripts/codex-marketplace.json +20 -20
- package/scripts/mcp-codex-stdio-adapter.js +189 -189
- package/scripts/mcp-server.js +81 -81
- package/scripts/mcp-trae-windows-launcher.cmd +21 -21
- package/scripts/microi-cli-mcp.js +7 -7
- package/scripts/microi-codex-broker.js +466 -466
- package/scripts/microi-codex-router.js +634 -634
- package/scripts/microi-skills.meta.json +230 -230
- package/skills/.microi-skills-version.json +2 -2
- package/skills/ai-engine/agents/openai.yaml +4 -4
- package/skills/app-store/agents/openai.yaml +4 -4
- package/skills/datasource-engine/agents/openai.yaml +4 -4
- package/skills/job-engine/agents/openai.yaml +4 -4
- package/skills/message-notification/agents/openai.yaml +5 -5
- package/skills/microi-ai-app-auth.js +652 -652
- package/skills/microi-ai-application/agents/openai.yaml +4 -4
- package/skills/microi-codex-installer/agents/openai.yaml +7 -7
- package/skills/microi-db-schema/agents/openai.yaml +4 -4
- package/skills/microi-docs-coverage/scripts/audit-doc-skill-coverage.mjs +894 -894
- package/skills/microi-microservice/SKILL.md +6 -4
- package/skills/microi-microservice/references/runtime-delivery.md +9 -5
- package/skills/microi-solution-quotation/agents/openai.yaml +4 -4
- package/skills/microi-solution-quotation/scripts/build_solution_quote.py +296 -296
- package/skills/microi.v8.js +1921 -1921
- package/skills/ocr-engine/agents/openai.yaml +4 -4
- package/skills/page-engine/examples/compact-dashboard.json +1444 -1444
- package/skills/report-engine/agents/openai.yaml +4 -4
- package/skills/scripts/optimize-progressive-disclosure.mjs +204 -204
- package/skills/scripts/refresh-progressive-disclosure.mjs +64 -64
- package/skills/scripts/sync-embedded-skills.mjs +46 -46
- package/skills/scripts/validate-progressive-disclosure.mjs +57 -57
- package/skills/search-engine/agents/openai.yaml +4 -4
- package/skills/translate-engine/agents/openai.yaml +4 -4
- package/skills/ui-design/assets/pattern-showcase/app.js +54 -54
- package/skills/ui-design/assets/pattern-showcase/index.html +163 -163
- package/skills/ui-design/assets/pattern-showcase/styles.css +311 -311
- package/skills/unity-integration/agents/openai.yaml +4 -4
- package/skills/v8-image-processing/agents/openai.yaml +4 -4
- package/skills/v8-mq-mqtt/scripts/check-mqtt-skill-coverage.mjs +203 -203
- package/skills/v8-tcp-integration/agents/openai.yaml +4 -4
- package/skills/vision-engine/agents/openai.yaml +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "Microi Unity 集成"
|
|
3
|
-
short_description: "交付 Unity UPM、WebGL、V8 与可安装 AI 应用"
|
|
4
|
-
default_prompt: "使用 $unity-integration 设计、实现并分层验收完整的 Microi Unity WebGL 应用。"
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Microi Unity 集成"
|
|
3
|
+
short_description: "交付 Unity UPM、WebGL、V8 与可安装 AI 应用"
|
|
4
|
+
default_prompt: "使用 $unity-integration 设计、实现并分层验收完整的 Microi Unity WebGL 应用。"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "V8 图像处理"
|
|
3
|
-
short_description: "编写安全、可验证的 V8.Image 图像处理与合并代码"
|
|
4
|
-
default_prompt: "使用 $v8-image-processing 编写一个将水印按指定位置叠加到主图并返回图片的 V8 接口引擎。"
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "V8 图像处理"
|
|
3
|
+
short_description: "编写安全、可验证的 V8.Image 图像处理与合并代码"
|
|
4
|
+
default_prompt: "使用 $v8-image-processing 编写一个将水印按指定位置叠加到主图并返回图片的 V8 接口引擎。"
|
|
@@ -1,203 +1,203 @@
|
|
|
1
|
-
import fs from 'node:fs';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
4
|
-
|
|
5
|
-
const scriptDir = path.dirname(fileURLToPath(import.meta.url));
|
|
6
|
-
const workspaceRoot = path.resolve(scriptDir, '..', '..', '..');
|
|
7
|
-
|
|
8
|
-
const files = {
|
|
9
|
-
skill: 'microi.skills/v8-mq-mqtt/SKILL.md',
|
|
10
|
-
reference: 'microi.skills/v8-mq-mqtt/references/mqtt-production.md',
|
|
11
|
-
mqttDoc: 'microi.doc/docs/doc/system-engine/mqtt-engine.md',
|
|
12
|
-
v8Doc: 'microi.doc/docs/doc/v8-engine/v8-server.md',
|
|
13
|
-
runtime: 'Microi.Server/Microi.MQTT/MicroiMQTT.cs',
|
|
14
|
-
model: 'Microi.Server/Microi.Core/Model/MqttParam.cs',
|
|
15
|
-
mqttInterface: 'Microi.Server/Microi.Core/Interface/IMicroiMQTT.cs',
|
|
16
|
-
tenantSecurity: 'Microi.Server/Microi.Core/SaaSEngine/TenantConfigurationSecurity.cs',
|
|
17
|
-
platformRuntime: 'Microi.Server/Microi.Core/V8Engine/Runtime/V8Method.PlatformPluginRuntimes.cs',
|
|
18
|
-
platformApiEngine: 'Microi.Server/OfficialApplications/Resource/platform-mqtt.js'
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
const content = {};
|
|
22
|
-
const failures = [];
|
|
23
|
-
|
|
24
|
-
for (const [name, relativePath] of Object.entries(files)) {
|
|
25
|
-
const absolutePath = path.join(workspaceRoot, relativePath);
|
|
26
|
-
if (!fs.existsSync(absolutePath)) {
|
|
27
|
-
failures.push(`${name}: 文件不存在 ${relativePath}`);
|
|
28
|
-
content[name] = '';
|
|
29
|
-
continue;
|
|
30
|
-
}
|
|
31
|
-
content[name] = fs.readFileSync(absolutePath, 'utf8');
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function collectMatches(text, regex) {
|
|
35
|
-
const values = [];
|
|
36
|
-
for (const match of text.matchAll(regex)) values.push(match[1]);
|
|
37
|
-
return values;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function requireTokens(targetName, tokens) {
|
|
41
|
-
const text = content[targetName] || '';
|
|
42
|
-
for (const token of tokens) {
|
|
43
|
-
if (!text.includes(token)) failures.push(`${targetName}: 缺少 ${token}`);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function requireAny(targetName, alternatives, label) {
|
|
48
|
-
const text = content[targetName] || '';
|
|
49
|
-
if (!alternatives.some((token) => text.includes(token))) {
|
|
50
|
-
failures.push(`${targetName}: 缺少 ${label}`);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const runtimeEvents = new Set([
|
|
55
|
-
...collectMatches(
|
|
56
|
-
content.runtime,
|
|
57
|
-
/RunMqttV8EngineAsync\([^,\r\n]+,\s*"([A-Za-z]+)"/g
|
|
58
|
-
),
|
|
59
|
-
...collectMatches(
|
|
60
|
-
content.runtime,
|
|
61
|
-
/FireV8EventForAllTenantsAsync\(\s*"([A-Za-z]+)"/g
|
|
62
|
-
)
|
|
63
|
-
]);
|
|
64
|
-
|
|
65
|
-
const expectedEvents = [
|
|
66
|
-
'StartServer',
|
|
67
|
-
'Connected',
|
|
68
|
-
'Disconnected',
|
|
69
|
-
'Subscribing',
|
|
70
|
-
'MessageReceived',
|
|
71
|
-
'MessageChanged',
|
|
72
|
-
'StopServer'
|
|
73
|
-
];
|
|
74
|
-
|
|
75
|
-
for (const eventName of expectedEvents) {
|
|
76
|
-
if (!runtimeEvents.has(eventName)) failures.push(`runtime: 未提取到事件 ${eventName}`);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
const mqttProperties = new Set(collectMatches(
|
|
80
|
-
content.model,
|
|
81
|
-
/public\s+[A-Za-z0-9_<>,.\s]+\s+([A-Za-z0-9_]+)\s*\{\s*get;\s*set;\s*\}/g
|
|
82
|
-
));
|
|
83
|
-
|
|
84
|
-
const expectedProperties = [
|
|
85
|
-
'ClientId',
|
|
86
|
-
'Payload',
|
|
87
|
-
'PayloadRaw',
|
|
88
|
-
'Topic',
|
|
89
|
-
'OsClient',
|
|
90
|
-
'UserName',
|
|
91
|
-
'Qos',
|
|
92
|
-
'Retain',
|
|
93
|
-
'UserProperties'
|
|
94
|
-
];
|
|
95
|
-
|
|
96
|
-
for (const propertyName of expectedProperties) {
|
|
97
|
-
if (!mqttProperties.has(propertyName)) failures.push(`model: 未提取到属性 ${propertyName}`);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const sourceEvents = [...runtimeEvents].sort();
|
|
101
|
-
const sourceProperties = [...mqttProperties].sort();
|
|
102
|
-
for (const targetName of ['reference', 'mqttDoc', 'v8Doc']) {
|
|
103
|
-
requireTokens(targetName, sourceEvents);
|
|
104
|
-
requireTokens(targetName, sourceProperties);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
const configurationTokens = [
|
|
108
|
-
'MqttEnable',
|
|
109
|
-
'MqttPort',
|
|
110
|
-
'MqttUseTls',
|
|
111
|
-
'MqttTlsPort',
|
|
112
|
-
'MqttCertPath',
|
|
113
|
-
'MqttCertPassword',
|
|
114
|
-
'MqttFallbackPort',
|
|
115
|
-
'MqttWsPort',
|
|
116
|
-
'MqttAccount',
|
|
117
|
-
'MqttPwd',
|
|
118
|
-
'MqttApiEngine',
|
|
119
|
-
'MqttAllowAnonymous',
|
|
120
|
-
'MqttTopicIsolation'
|
|
121
|
-
];
|
|
122
|
-
|
|
123
|
-
const securityTokens = [
|
|
124
|
-
'tenant/{lowerOsClient}',
|
|
125
|
-
'$SYS',
|
|
126
|
-
'$share',
|
|
127
|
-
'ResponseTopic',
|
|
128
|
-
'Code != 1',
|
|
129
|
-
'StaleDisconnectIgnored'
|
|
130
|
-
];
|
|
131
|
-
|
|
132
|
-
const operationsTokens = [
|
|
133
|
-
'mci_mqtt_client',
|
|
134
|
-
'mci_mqtt_log',
|
|
135
|
-
'ApiEngineId',
|
|
136
|
-
'IMicroiMQTT.PublishAsync',
|
|
137
|
-
'ConnectedClients',
|
|
138
|
-
'GetConnectedClients',
|
|
139
|
-
'外部 Broker',
|
|
140
|
-
'独立 MQTT 节点'
|
|
141
|
-
];
|
|
142
|
-
|
|
143
|
-
requireTokens('platformRuntime', [
|
|
144
|
-
'ManageMqtt',
|
|
145
|
-
'RequireCurrentTenantSuperAdmin',
|
|
146
|
-
'IMicroiMQTT',
|
|
147
|
-
'GetConnectedClients',
|
|
148
|
-
'PublishAsync'
|
|
149
|
-
]);
|
|
150
|
-
requireTokens('platformApiEngine', ['V8.Method.ManageMqtt']);
|
|
151
|
-
|
|
152
|
-
requireTokens('skill', ['references/mqtt-production.md', 'platform-mqtt']);
|
|
153
|
-
requireTokens('reference', configurationTokens);
|
|
154
|
-
|
|
155
|
-
requireTokens('reference', securityTokens);
|
|
156
|
-
requireTokens('reference', operationsTokens);
|
|
157
|
-
|
|
158
|
-
requireTokens(
|
|
159
|
-
'mqttDoc',
|
|
160
|
-
configurationTokens.filter((token) => token !== 'MqttAllowAnonymous')
|
|
161
|
-
);
|
|
162
|
-
requireAny(
|
|
163
|
-
'mqttDoc',
|
|
164
|
-
['MqttAllowAnonymous', '匿名连接只可能由主租户显式开启'],
|
|
165
|
-
'主租户匿名连接边界'
|
|
166
|
-
);
|
|
167
|
-
requireTokens(
|
|
168
|
-
'mqttDoc',
|
|
169
|
-
securityTokens.filter(
|
|
170
|
-
(token) => token !== 'StaleDisconnectIgnored' && token !== 'tenant/{lowerOsClient}'
|
|
171
|
-
)
|
|
172
|
-
);
|
|
173
|
-
requireAny(
|
|
174
|
-
'mqttDoc',
|
|
175
|
-
['tenant/{lowerOsClient}', 'tenant/<lowerOsClient>'],
|
|
176
|
-
'标准租户 Topic 模板'
|
|
177
|
-
);
|
|
178
|
-
requireTokens('v8Doc', ['## V8.MQTT', 'IMicroiMQTT.PublishAsync', 'Code != 1']);
|
|
179
|
-
|
|
180
|
-
requireTokens('runtime', [
|
|
181
|
-
'NormalizeTopic',
|
|
182
|
-
'ResponseTopic',
|
|
183
|
-
'StaleDisconnectIgnored',
|
|
184
|
-
'$share/',
|
|
185
|
-
'$SYS/',
|
|
186
|
-
'mci_mqtt_client',
|
|
187
|
-
'mci_mqtt_log',
|
|
188
|
-
'PublishRejectedByV8'
|
|
189
|
-
]);
|
|
190
|
-
requireTokens('mqttInterface', ['PublishAsync(string osClient', 'GetConnectedClients(string osClient)']);
|
|
191
|
-
requireTokens('tenantSecurity', ['NormalizeMqttTopic', 'HasTenantServiceCredentialCollision']);
|
|
192
|
-
|
|
193
|
-
if (failures.length > 0) {
|
|
194
|
-
console.error('MQTT Skill 覆盖检查失败:');
|
|
195
|
-
for (const failure of failures) console.error(`- ${failure}`);
|
|
196
|
-
process.exitCode = 1;
|
|
197
|
-
} else {
|
|
198
|
-
console.log(
|
|
199
|
-
`MQTT Skill 覆盖检查通过:${sourceEvents.length} 个事件、` +
|
|
200
|
-
`${sourceProperties.length} 个 V8.MQTT 字段、` +
|
|
201
|
-
`${configurationTokens.length} 个配置项及生产安全/部署契约均已覆盖。`
|
|
202
|
-
);
|
|
203
|
-
}
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
|
|
5
|
+
const scriptDir = path.dirname(fileURLToPath(import.meta.url));
|
|
6
|
+
const workspaceRoot = path.resolve(scriptDir, '..', '..', '..');
|
|
7
|
+
|
|
8
|
+
const files = {
|
|
9
|
+
skill: 'microi.skills/v8-mq-mqtt/SKILL.md',
|
|
10
|
+
reference: 'microi.skills/v8-mq-mqtt/references/mqtt-production.md',
|
|
11
|
+
mqttDoc: 'microi.doc/docs/doc/system-engine/mqtt-engine.md',
|
|
12
|
+
v8Doc: 'microi.doc/docs/doc/v8-engine/v8-server.md',
|
|
13
|
+
runtime: 'Microi.Server/Microi.MQTT/MicroiMQTT.cs',
|
|
14
|
+
model: 'Microi.Server/Microi.Core/Model/MqttParam.cs',
|
|
15
|
+
mqttInterface: 'Microi.Server/Microi.Core/Interface/IMicroiMQTT.cs',
|
|
16
|
+
tenantSecurity: 'Microi.Server/Microi.Core/SaaSEngine/TenantConfigurationSecurity.cs',
|
|
17
|
+
platformRuntime: 'Microi.Server/Microi.Core/V8Engine/Runtime/V8Method.PlatformPluginRuntimes.cs',
|
|
18
|
+
platformApiEngine: 'Microi.Server/OfficialApplications/Resource/platform-mqtt.js'
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const content = {};
|
|
22
|
+
const failures = [];
|
|
23
|
+
|
|
24
|
+
for (const [name, relativePath] of Object.entries(files)) {
|
|
25
|
+
const absolutePath = path.join(workspaceRoot, relativePath);
|
|
26
|
+
if (!fs.existsSync(absolutePath)) {
|
|
27
|
+
failures.push(`${name}: 文件不存在 ${relativePath}`);
|
|
28
|
+
content[name] = '';
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
content[name] = fs.readFileSync(absolutePath, 'utf8');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function collectMatches(text, regex) {
|
|
35
|
+
const values = [];
|
|
36
|
+
for (const match of text.matchAll(regex)) values.push(match[1]);
|
|
37
|
+
return values;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function requireTokens(targetName, tokens) {
|
|
41
|
+
const text = content[targetName] || '';
|
|
42
|
+
for (const token of tokens) {
|
|
43
|
+
if (!text.includes(token)) failures.push(`${targetName}: 缺少 ${token}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function requireAny(targetName, alternatives, label) {
|
|
48
|
+
const text = content[targetName] || '';
|
|
49
|
+
if (!alternatives.some((token) => text.includes(token))) {
|
|
50
|
+
failures.push(`${targetName}: 缺少 ${label}`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const runtimeEvents = new Set([
|
|
55
|
+
...collectMatches(
|
|
56
|
+
content.runtime,
|
|
57
|
+
/RunMqttV8EngineAsync\([^,\r\n]+,\s*"([A-Za-z]+)"/g
|
|
58
|
+
),
|
|
59
|
+
...collectMatches(
|
|
60
|
+
content.runtime,
|
|
61
|
+
/FireV8EventForAllTenantsAsync\(\s*"([A-Za-z]+)"/g
|
|
62
|
+
)
|
|
63
|
+
]);
|
|
64
|
+
|
|
65
|
+
const expectedEvents = [
|
|
66
|
+
'StartServer',
|
|
67
|
+
'Connected',
|
|
68
|
+
'Disconnected',
|
|
69
|
+
'Subscribing',
|
|
70
|
+
'MessageReceived',
|
|
71
|
+
'MessageChanged',
|
|
72
|
+
'StopServer'
|
|
73
|
+
];
|
|
74
|
+
|
|
75
|
+
for (const eventName of expectedEvents) {
|
|
76
|
+
if (!runtimeEvents.has(eventName)) failures.push(`runtime: 未提取到事件 ${eventName}`);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const mqttProperties = new Set(collectMatches(
|
|
80
|
+
content.model,
|
|
81
|
+
/public\s+[A-Za-z0-9_<>,.\s]+\s+([A-Za-z0-9_]+)\s*\{\s*get;\s*set;\s*\}/g
|
|
82
|
+
));
|
|
83
|
+
|
|
84
|
+
const expectedProperties = [
|
|
85
|
+
'ClientId',
|
|
86
|
+
'Payload',
|
|
87
|
+
'PayloadRaw',
|
|
88
|
+
'Topic',
|
|
89
|
+
'OsClient',
|
|
90
|
+
'UserName',
|
|
91
|
+
'Qos',
|
|
92
|
+
'Retain',
|
|
93
|
+
'UserProperties'
|
|
94
|
+
];
|
|
95
|
+
|
|
96
|
+
for (const propertyName of expectedProperties) {
|
|
97
|
+
if (!mqttProperties.has(propertyName)) failures.push(`model: 未提取到属性 ${propertyName}`);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
const sourceEvents = [...runtimeEvents].sort();
|
|
101
|
+
const sourceProperties = [...mqttProperties].sort();
|
|
102
|
+
for (const targetName of ['reference', 'mqttDoc', 'v8Doc']) {
|
|
103
|
+
requireTokens(targetName, sourceEvents);
|
|
104
|
+
requireTokens(targetName, sourceProperties);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const configurationTokens = [
|
|
108
|
+
'MqttEnable',
|
|
109
|
+
'MqttPort',
|
|
110
|
+
'MqttUseTls',
|
|
111
|
+
'MqttTlsPort',
|
|
112
|
+
'MqttCertPath',
|
|
113
|
+
'MqttCertPassword',
|
|
114
|
+
'MqttFallbackPort',
|
|
115
|
+
'MqttWsPort',
|
|
116
|
+
'MqttAccount',
|
|
117
|
+
'MqttPwd',
|
|
118
|
+
'MqttApiEngine',
|
|
119
|
+
'MqttAllowAnonymous',
|
|
120
|
+
'MqttTopicIsolation'
|
|
121
|
+
];
|
|
122
|
+
|
|
123
|
+
const securityTokens = [
|
|
124
|
+
'tenant/{lowerOsClient}',
|
|
125
|
+
'$SYS',
|
|
126
|
+
'$share',
|
|
127
|
+
'ResponseTopic',
|
|
128
|
+
'Code != 1',
|
|
129
|
+
'StaleDisconnectIgnored'
|
|
130
|
+
];
|
|
131
|
+
|
|
132
|
+
const operationsTokens = [
|
|
133
|
+
'mci_mqtt_client',
|
|
134
|
+
'mci_mqtt_log',
|
|
135
|
+
'ApiEngineId',
|
|
136
|
+
'IMicroiMQTT.PublishAsync',
|
|
137
|
+
'ConnectedClients',
|
|
138
|
+
'GetConnectedClients',
|
|
139
|
+
'外部 Broker',
|
|
140
|
+
'独立 MQTT 节点'
|
|
141
|
+
];
|
|
142
|
+
|
|
143
|
+
requireTokens('platformRuntime', [
|
|
144
|
+
'ManageMqtt',
|
|
145
|
+
'RequireCurrentTenantSuperAdmin',
|
|
146
|
+
'IMicroiMQTT',
|
|
147
|
+
'GetConnectedClients',
|
|
148
|
+
'PublishAsync'
|
|
149
|
+
]);
|
|
150
|
+
requireTokens('platformApiEngine', ['V8.Method.ManageMqtt']);
|
|
151
|
+
|
|
152
|
+
requireTokens('skill', ['references/mqtt-production.md', 'platform-mqtt']);
|
|
153
|
+
requireTokens('reference', configurationTokens);
|
|
154
|
+
|
|
155
|
+
requireTokens('reference', securityTokens);
|
|
156
|
+
requireTokens('reference', operationsTokens);
|
|
157
|
+
|
|
158
|
+
requireTokens(
|
|
159
|
+
'mqttDoc',
|
|
160
|
+
configurationTokens.filter((token) => token !== 'MqttAllowAnonymous')
|
|
161
|
+
);
|
|
162
|
+
requireAny(
|
|
163
|
+
'mqttDoc',
|
|
164
|
+
['MqttAllowAnonymous', '匿名连接只可能由主租户显式开启'],
|
|
165
|
+
'主租户匿名连接边界'
|
|
166
|
+
);
|
|
167
|
+
requireTokens(
|
|
168
|
+
'mqttDoc',
|
|
169
|
+
securityTokens.filter(
|
|
170
|
+
(token) => token !== 'StaleDisconnectIgnored' && token !== 'tenant/{lowerOsClient}'
|
|
171
|
+
)
|
|
172
|
+
);
|
|
173
|
+
requireAny(
|
|
174
|
+
'mqttDoc',
|
|
175
|
+
['tenant/{lowerOsClient}', 'tenant/<lowerOsClient>'],
|
|
176
|
+
'标准租户 Topic 模板'
|
|
177
|
+
);
|
|
178
|
+
requireTokens('v8Doc', ['## V8.MQTT', 'IMicroiMQTT.PublishAsync', 'Code != 1']);
|
|
179
|
+
|
|
180
|
+
requireTokens('runtime', [
|
|
181
|
+
'NormalizeTopic',
|
|
182
|
+
'ResponseTopic',
|
|
183
|
+
'StaleDisconnectIgnored',
|
|
184
|
+
'$share/',
|
|
185
|
+
'$SYS/',
|
|
186
|
+
'mci_mqtt_client',
|
|
187
|
+
'mci_mqtt_log',
|
|
188
|
+
'PublishRejectedByV8'
|
|
189
|
+
]);
|
|
190
|
+
requireTokens('mqttInterface', ['PublishAsync(string osClient', 'GetConnectedClients(string osClient)']);
|
|
191
|
+
requireTokens('tenantSecurity', ['NormalizeMqttTopic', 'HasTenantServiceCredentialCollision']);
|
|
192
|
+
|
|
193
|
+
if (failures.length > 0) {
|
|
194
|
+
console.error('MQTT Skill 覆盖检查失败:');
|
|
195
|
+
for (const failure of failures) console.error(`- ${failure}`);
|
|
196
|
+
process.exitCode = 1;
|
|
197
|
+
} else {
|
|
198
|
+
console.log(
|
|
199
|
+
`MQTT Skill 覆盖检查通过:${sourceEvents.length} 个事件、` +
|
|
200
|
+
`${sourceProperties.length} 个 V8.MQTT 字段、` +
|
|
201
|
+
`${configurationTokens.length} 个配置项及生产安全/部署契约均已覆盖。`
|
|
202
|
+
);
|
|
203
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "V8 TCP 原始字节"
|
|
3
|
-
short_description: "通过后端 V8 安全发送和接收 TCP 原始字节数据"
|
|
4
|
-
default_prompt: "使用 $v8-tcp-integration 编写一个安全、可验证的 Microi 后端 V8 TCP 设备集成。"
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "V8 TCP 原始字节"
|
|
3
|
+
short_description: "通过后端 V8 安全发送和接收 TCP 原始字节数据"
|
|
4
|
+
default_prompt: "使用 $v8-tcp-integration 编写一个安全、可验证的 Microi 后端 V8 TCP 设备集成。"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface:
|
|
2
|
-
display_name: "视觉引擎"
|
|
3
|
-
short_description: "构建与验收数据库优先、AI回退的通用视觉识别"
|
|
4
|
-
default_prompt: "Use $vision-engine to build and validate tenant-isolated Microi.Vision workflows."
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "视觉引擎"
|
|
3
|
+
short_description: "构建与验收数据库优先、AI回退的通用视觉识别"
|
|
4
|
+
default_prompt: "Use $vision-engine to build and validate tenant-isolated Microi.Vision workflows."
|