@chaoset/adaptive-perf 0.2.1 → 0.2.2
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/lib/typert.host.js +50 -0
- package/package.json +2 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* typert.host.js — 手写的 Typert host 工件(typert-loader 机制)。
|
|
3
|
+
*
|
|
4
|
+
* 见 @chaoset/vision-router 的同名文件说明:通过 typert-loader 把端点注册
|
|
5
|
+
* 进 ctx.typert.local,避免依赖 Remote 装饰器 markers(typert-protocol
|
|
6
|
+
* 双实例时 markers 丢失导致 SRC 认领为空、web 设置页 404)。
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
const passthrough = (value) => value;
|
|
10
|
+
const codec = (typeSymbol) => ({
|
|
11
|
+
mode: 'strict',
|
|
12
|
+
typeSymbol,
|
|
13
|
+
schema: { _zod: true, parse: passthrough },
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const TYPERT = {
|
|
17
|
+
package: '@chaoset/adaptive-perf',
|
|
18
|
+
face: 'host',
|
|
19
|
+
schemas: [],
|
|
20
|
+
invocations: [
|
|
21
|
+
{
|
|
22
|
+
id: '@chaoset/adaptive-perf#adaptivePerfConfig/get',
|
|
23
|
+
service: 'adaptivePerfConfig',
|
|
24
|
+
namespace: 'adaptivePerfConfig',
|
|
25
|
+
method: 'get',
|
|
26
|
+
invocation: { kind: 'direct' },
|
|
27
|
+
parameters: [],
|
|
28
|
+
result: codec('@chaoset/adaptive-perf/types#AdaptivePerfConfig'),
|
|
29
|
+
sourceLocation: { file: 'packages/adaptive-perf/lib/remote.mjs', line: 1, column: 1 },
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
id: '@chaoset/adaptive-perf#adaptivePerfConfig/set',
|
|
33
|
+
service: 'adaptivePerfConfig',
|
|
34
|
+
namespace: 'adaptivePerfConfig',
|
|
35
|
+
method: 'set',
|
|
36
|
+
invocation: { kind: 'direct' },
|
|
37
|
+
parameters: [
|
|
38
|
+
{
|
|
39
|
+
name: 'partial',
|
|
40
|
+
wire: 'partial',
|
|
41
|
+
source: 'json',
|
|
42
|
+
codec: codec('@chaoset/adaptive-perf/types#PartialAdaptivePerfConfig'),
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
result: codec('@chaoset/adaptive-perf/types#SetResult'),
|
|
46
|
+
sourceLocation: { file: 'packages/adaptive-perf/lib/remote.mjs', line: 1, column: 1 },
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
model: { services: [], events: [], objects: [] },
|
|
50
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chaoset/adaptive-perf",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "DSH host plugin: bring standard / PTC presets to minimal-mode-level performance via runtime-context suppression and adaptive tool-catalog trimming with demand-driven escalation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"exports": {
|
|
14
14
|
".": "./lib/index.mjs",
|
|
15
15
|
"./client": "./client/client.cjs",
|
|
16
|
+
"./typert": "./lib/typert.host.js",
|
|
16
17
|
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
17
18
|
"./package.json": "./package.json"
|
|
18
19
|
},
|