@republicroad/seal-appshell 1.1.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 (105) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +74 -0
  3. package/dist/assets/custom-node-schema.json.d.ts +549 -0
  4. package/dist/components/__tests__/skinned-decision-graph.test.d.ts +1 -0
  5. package/dist/components/__tests__/skinned-header.test.d.ts +1 -0
  6. package/dist/components/__tests__/skinned-panels.test.d.ts +1 -0
  7. package/dist/components/__tests__/skinned-simulator-panel.test.d.ts +1 -0
  8. package/dist/components/__tests__/skinned-simulator.test.d.ts +1 -0
  9. package/dist/components/custom-node/__tests__/custom-node-button.test.d.ts +1 -0
  10. package/dist/components/custom-node/__tests__/schema-container-tab.test.d.ts +1 -0
  11. package/dist/components/custom-node/crypto-node.d.ts +5 -0
  12. package/dist/components/custom-node/current-date-node.d.ts +8 -0
  13. package/dist/components/custom-node/http-request-node.d.ts +5 -0
  14. package/dist/components/custom-node/key-value-editor.d.ts +16 -0
  15. package/dist/components/custom-node/locked-corner-badge.d.ts +2 -0
  16. package/dist/components/custom-node/query-list-node.d.ts +5 -0
  17. package/dist/components/custom-node/schema-container-tab.d.ts +13 -0
  18. package/dist/components/icons/code.d.ts +3 -0
  19. package/dist/components/icons/flash-circle.d.ts +3 -0
  20. package/dist/components/reui/alert.d.ts +9 -0
  21. package/dist/components/reui/autocomplete.d.ts +40 -0
  22. package/dist/components/reui/badge.d.ts +14 -0
  23. package/dist/components/reui/cascader/cascader-async.d.ts +86 -0
  24. package/dist/components/reui/cascader/cascader-columns.d.ts +26 -0
  25. package/dist/components/reui/cascader/cascader-context.d.ts +190 -0
  26. package/dist/components/reui/cascader/cascader-footer.d.ts +83 -0
  27. package/dist/components/reui/cascader/cascader-i18n.d.ts +13 -0
  28. package/dist/components/reui/cascader/cascader-item.d.ts +112 -0
  29. package/dist/components/reui/cascader/cascader-lib.d.ts +137 -0
  30. package/dist/components/reui/cascader/cascader-nav.d.ts +56 -0
  31. package/dist/components/reui/cascader/cascader-types.d.ts +179 -0
  32. package/dist/components/reui/cascader/cascader-virtual.d.ts +62 -0
  33. package/dist/components/reui/cascader/cascader.d.ts +325 -0
  34. package/dist/components/shell-header.d.ts +20 -0
  35. package/dist/components/skinned-decision-graph.d.ts +19 -0
  36. package/dist/components/ui/alert-dialog.d.ts +20 -0
  37. package/dist/components/ui/avatar.d.ts +5 -0
  38. package/dist/components/ui/badge.d.ts +9 -0
  39. package/dist/components/ui/button.d.ts +11 -0
  40. package/dist/components/ui/dropdown-menu.d.ts +27 -0
  41. package/dist/components/ui/field.d.ts +24 -0
  42. package/dist/components/ui/input.d.ts +3 -0
  43. package/dist/components/ui/label.d.ts +4 -0
  44. package/dist/components/ui/scroll-area.d.ts +4 -0
  45. package/dist/components/ui/select.d.ts +13 -0
  46. package/dist/components/ui/separator.d.ts +3 -0
  47. package/dist/components/ui/sheet.d.ts +23 -0
  48. package/dist/components/ui/sonner.d.ts +5 -0
  49. package/dist/components/ui/spinner.d.ts +2 -0
  50. package/dist/components/ui/switch.d.ts +3 -0
  51. package/dist/components/ui/tabs.d.ts +6 -0
  52. package/dist/components/ui/toggle-group.d.ts +13 -0
  53. package/dist/components/ui/toggle.d.ts +12 -0
  54. package/dist/components/ui/tooltip.d.ts +7 -0
  55. package/dist/components/version-history/__tests__/version-history-panel.test.d.ts +1 -0
  56. package/dist/components/version-history/version-history-panel.d.ts +40 -0
  57. package/dist/context/theme.provider.d.ts +29 -0
  58. package/dist/hooks/useCustomNodes.d.ts +16 -0
  59. package/dist/index.d.ts +24 -0
  60. package/dist/index.js +121959 -0
  61. package/dist/integration/decision-graph-appshell.stories.d.ts +10 -0
  62. package/dist/lib/__tests__/crypto-protocol.test.d.ts +1 -0
  63. package/dist/lib/__tests__/custom-node-registry.test.d.ts +1 -0
  64. package/dist/lib/__tests__/http-request-protocol.test.d.ts +1 -0
  65. package/dist/lib/__tests__/json-path-protocol.test.d.ts +1 -0
  66. package/dist/lib/__tests__/storage-key.test.d.ts +1 -0
  67. package/dist/lib/auth/__tests__/adapter.test.d.ts +1 -0
  68. package/dist/lib/auth/adapter.d.ts +7 -0
  69. package/dist/lib/auth-client.d.ts +3 -0
  70. package/dist/lib/crypto-protocol.d.ts +28 -0
  71. package/dist/lib/custom-node-plans.d.ts +24 -0
  72. package/dist/lib/custom-node-registry.d.ts +13 -0
  73. package/dist/lib/custom-node-schema-source.d.ts +6 -0
  74. package/dist/lib/custom-node-types.d.ts +73 -0
  75. package/dist/lib/http-request-protocol.d.ts +47 -0
  76. package/dist/lib/json-path-protocol.d.ts +11 -0
  77. package/dist/lib/roster-source.d.ts +12 -0
  78. package/dist/lib/storage-key.d.ts +5 -0
  79. package/dist/lib/user-resolver.d.ts +6 -0
  80. package/dist/lib/utils.d.ts +2 -0
  81. package/dist/reui/icons/animated/duotone/lock.d.ts +3 -0
  82. package/dist/reui/icons/animated/outline/play-circle.d.ts +3 -0
  83. package/dist/reui/icons/default/outline/plus-circle.d.ts +3 -0
  84. package/dist/reui/icons/default/outline/shield-search.d.ts +3 -0
  85. package/dist/reui/icons/default/outline/trash-square.d.ts +3 -0
  86. package/dist/setupTests.d.ts +0 -0
  87. package/dist/shell/__tests__/default-simulate.test.d.ts +1 -0
  88. package/dist/shell/__tests__/graphs-http-adapter.test.d.ts +1 -0
  89. package/dist/shell/__tests__/indexed-db-adapter.test.d.ts +0 -0
  90. package/dist/shell/__tests__/restore.test.d.ts +0 -0
  91. package/dist/shell/default-simulate.d.ts +3 -0
  92. package/dist/shell/editor-shell.context.d.ts +22 -0
  93. package/dist/shell/execute-simulate.d.ts +8 -0
  94. package/dist/shell/graphs-http-adapter.d.ts +7 -0
  95. package/dist/shell/index.d.ts +10 -0
  96. package/dist/shell/indexed-db-adapter.d.ts +16 -0
  97. package/dist/shell/persistence.d.ts +89 -0
  98. package/dist/shell/restore.d.ts +21 -0
  99. package/dist/shell/types.d.ts +20 -0
  100. package/dist/skin/__tests__/apply.test.d.ts +1 -0
  101. package/dist/skin/apply.d.ts +7 -0
  102. package/dist/skin/layout.d.ts +17 -0
  103. package/dist/skin/types.d.ts +73 -0
  104. package/dist/style.css +2 -0
  105. package/package.json +73 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 RYefccd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,74 @@
1
+ # @republicroad/jdm-appshell
2
+
3
+ `@republicroad/jdm-editor`(内核)的参考消费者层:自定义节点托管、UI 槽位
4
+ 出现与换肤、持久化契约与认证适配。
5
+
6
+ ## 定位
7
+
8
+ ```
9
+ 宿主应用 (apps/*)
10
+ ├── @republicroad/jdm-appshell → 观点性 shell Provider / 自定义节点 / UI kit / 持久化
11
+ └── @republicroad/jdm-editor → 编辑器内核(peer)
12
+ └── react >= 18 (peer)
13
+ ```
14
+
15
+ - **内核**只提供编辑器界面/主题/导入契约,不持有任何宿主观点。
16
+ - **appshell** 承载业务侧自定义节点、皮肤系统(按 kind 出现/替换节点 UI,
17
+ 配合 `JdmConfigProvider seeds` 一键换肤)与图持久化契约。
18
+
19
+ ## 五大职责域
20
+
21
+ | 职责域 | 位置 | 内容 |
22
+ | -------------------- | ------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- |
23
+ | **Custom node 宿主** | `components/custom-node/`、`hooks/useCustomNodes.ts` | 六节点(http-request / query-list / crypto / json-path / template / current-date)+ KeyValueEditor + LockedCornerBadge |
24
+ | **Registry 与协议** | `lib/` | custom-node-registry(schema→节点,内置兜底)、协议库(http-request / json-path / crypto)、user-resolver、storage-key |
25
+ | **组合 Hook** | `hooks/useCustomNodes.ts` | 基础节点 + schema 拉取节点(优雅回退)+ 皮肤覆盖 → `customNodes` 数组 |
26
+ | **Skin 皮肤系统** | `skin/`、`context/theme.provider` | `applyNodeOverrides` 按 kind 覆盖 renderTab/renderNode |
27
+ | **持久化契约** | `shell/persistence.ts`、`shell/graphs-http-adapter.ts` | `GraphPersistenceAdapter`:宿主实现,乐观锁 + 404 语义 + 版本历史 |
28
+
29
+ 在线文档:https://republicroad.github.io/jdm-editor/docs/
30
+
31
+ 完整说明见仓库文档 [`docs/appshell.md`](../../docs/appshell.md)(在线站点
32
+ Docs 区同文)。
33
+
34
+ ## 宿主接线
35
+
36
+ ```tsx
37
+ import { DecisionGraph } from '@republicroad/jdm-editor';
38
+ import { useCustomNodes } from '@republicroad/jdm-appshell';
39
+
40
+ // 六个自定义节点开箱即用;schema 拉取失败时自动回退内置定义
41
+ const { customNodes, ready } = useCustomNodes();
42
+
43
+ // 完整壳:用户解析(better-auth 或匿名)+ 持久化适配器由宿主实现
44
+ <DecisionGraph customNodes={customNodes} userResolver={...} />
45
+ ```
46
+
47
+ ## 消费方式
48
+
49
+ - **monorepo 内部**:源码直连——`main`/`types` 直指 `src/index.ts`,
50
+ vite/bun 直接吃源码;路径别名见根 `tsconfig.json`
51
+ (`@republicroad/jdm-appshell` / `@republicroad/jdm-appshell/*`)。
52
+ - **外部(npm)**:`publishConfig` 于发布时切换到 `dist/`
53
+ (`bun run build` 产出 `index.js` + `index.d.ts` + `style.css`)。
54
+
55
+ ## 开发
56
+
57
+ ```bash
58
+ pnpm --filter @republicroad/jdm-appshell typecheck # tsc --noEmit
59
+ pnpm --filter @republicroad/jdm-appshell test # vitest(8 套件 / 67 用例)
60
+ pnpm --filter @republicroad/jdm-appshell build # dist + style.css
61
+ pnpm --filter @republicroad/jdm-appshell test:npm-smoke
62
+ ```
63
+
64
+ ## 运行要求
65
+
66
+ - React >= 18;`@republicroad/jdm-editor` >= 0.3;monaco-editor 需显式安装
67
+ - Tailwind v4 + shadcn 语义 token(`--background`/`--foreground`/... 参考
68
+ `src/main.css`);内核侧 `--grl-*` 变量由 `JdmConfigProvider` 自动注入
69
+
70
+ ## 发布契约
71
+
72
+ **dist 是唯一的发布工件**(npm 安装即 `dist/`);monorepo 内部消费源码直连
73
+ (`main/types → src/index.ts`),便于本仓库内的快速迭代与外部仓库的稳定性
74
+ 隔离。
@@ -0,0 +1,549 @@
1
+ declare const _default: [
2
+ {
3
+ "type": "namespace",
4
+ "title": "crypto",
5
+ "name": "crypto",
6
+ "description": "",
7
+ "tools": [
8
+ {
9
+ "name": "crypto",
10
+ "title": "crypto",
11
+ "type": "function",
12
+ "description": "计算字符串摘要或 HMAC 签名,返回摘要字符串. algorithm 支持 md5/sha1/sha256/sha512(非法值回退 sha256),secret 非空时启用 HMAC 模式,encoding 支持 hex/base64/base64url(非法值回退 hex),upper 仅对 hex 生效(大写输出).",
13
+ "parameters": {
14
+ "properties": {
15
+ "input": {
16
+ "type": "string",
17
+ "title": "Input",
18
+ "description": "待摘要内容"
19
+ },
20
+ "algorithm": {
21
+ "type": "string",
22
+ "title": "Algorithm",
23
+ "description": "摘要算法(md5/sha1/sha256/sha512),默认 sha256,非法值回退 sha256",
24
+ "default": "sha256"
25
+ },
26
+ "secret": {
27
+ "type": "string",
28
+ "title": "Secret",
29
+ "description": "HMAC 密钥,非空启用 HMAC 模式,留空则为普通摘要",
30
+ "default": ""
31
+ },
32
+ "encoding": {
33
+ "type": "string",
34
+ "title": "Encoding",
35
+ "description": "输出编码(hex/base64/base64url),默认 hex,非法值回退 hex",
36
+ "default": "hex"
37
+ },
38
+ "upper": {
39
+ "type": "boolean",
40
+ "title": "Upper",
41
+ "description": "hex 输出转大写(仅 encoding=hex 时生效),默认 false",
42
+ "default": false
43
+ }
44
+ },
45
+ "required": ["input"],
46
+ "title": "crypto",
47
+ "type": "object"
48
+ },
49
+ "returns": {
50
+ "type": "string",
51
+ "title": "crypto 函数返回",
52
+ "properties": {}
53
+ },
54
+ "namespace": "crypto",
55
+ "kind": "crypto",
56
+ "semantics": "query"
57
+ }
58
+ ]
59
+ },
60
+ {
61
+ "type": "namespace",
62
+ "title": "custom-list-query",
63
+ "name": "custom-list-query",
64
+ "description": "",
65
+ "tools": [
66
+ {
67
+ "name": "custom_list_query",
68
+ "title": "custom_list_query",
69
+ "type": "function",
70
+ "description": "旧域重建·名单查询:在服务端指定名单中查询某个值是否存在,返回 {result}。",
71
+ "parameters": {
72
+ "properties": {
73
+ "list_name": {
74
+ "type": "string",
75
+ "title": "名单名称",
76
+ "description": "服务端名单名称"
77
+ },
78
+ "value": {
79
+ "type": "string",
80
+ "title": "查询值",
81
+ "description": "待查询的值"
82
+ }
83
+ },
84
+ "required": ["list_name", "value"],
85
+ "title": "custom_list_query",
86
+ "type": "object"
87
+ },
88
+ "returns": {
89
+ "type": "object",
90
+ "title": "custom_list_query_result",
91
+ "properties": {
92
+ "result": {
93
+ "type": "boolean",
94
+ "title": "Result"
95
+ }
96
+ },
97
+ "required": ["result"]
98
+ },
99
+ "namespace": "custom-list-query",
100
+ "kind": "custom-list-query",
101
+ "semantics": "query"
102
+ }
103
+ ]
104
+ },
105
+ {
106
+ "type": "namespace",
107
+ "title": "debug",
108
+ "name": "debug",
109
+ "description": "",
110
+ "tools": [
111
+ {
112
+ "name": "inout",
113
+ "title": "inout",
114
+ "type": "function",
115
+ "description": "Docstring for inout\n自定义函数测试, 返回值返回入参, 用于调试.",
116
+ "parameters": {
117
+ "properties": {
118
+ "b": {
119
+ "description": "参数 b",
120
+ "title": "B",
121
+ "type": "integer"
122
+ },
123
+ "a": {
124
+ "anyOf": [
125
+ {
126
+ "type": "string"
127
+ },
128
+ {
129
+ "type": "integer"
130
+ }
131
+ ],
132
+ "description": "参数 a",
133
+ "title": "A"
134
+ },
135
+ "c": {
136
+ "description": "参数 c",
137
+ "title": "C",
138
+ "type": "null"
139
+ }
140
+ },
141
+ "required": ["b", "a", "c"],
142
+ "title": "inout",
143
+ "type": "object"
144
+ },
145
+ "returns": {
146
+ "type": "string",
147
+ "title": "inout 函数返回",
148
+ "properties": {}
149
+ },
150
+ "namespace": "debug",
151
+ "kind": "debug",
152
+ "semantics": "query"
153
+ },
154
+ {
155
+ "name": "func_without_args",
156
+ "title": "func_without_args",
157
+ "type": "function",
158
+ "description": "Docstring for func_without_args\n无参数函数, 用于自定义函数测试",
159
+ "parameters": {
160
+ "properties": {},
161
+ "title": "func_without_args",
162
+ "type": "object"
163
+ },
164
+ "returns": {
165
+ "type": "string",
166
+ "title": "func_without_args 函数返回",
167
+ "properties": {}
168
+ },
169
+ "namespace": "debug",
170
+ "kind": "debug",
171
+ "semantics": "query"
172
+ }
173
+ ]
174
+ },
175
+ {
176
+ "type": "namespace",
177
+ "title": "debugui",
178
+ "name": "debugui",
179
+ "description": "",
180
+ "tools": [
181
+ {
182
+ "name": "current_date",
183
+ "title": "current_date",
184
+ "type": "function",
185
+ "description": "返回服务器当前日期(本地时区,YYYY-MM-DD 格式),无参数.",
186
+ "parameters": {
187
+ "properties": {},
188
+ "title": "current_date",
189
+ "type": "object"
190
+ },
191
+ "returns": {
192
+ "type": "string",
193
+ "title": "current_date 函数返回",
194
+ "properties": {}
195
+ },
196
+ "namespace": "debugui",
197
+ "kind": "debugui",
198
+ "semantics": "query"
199
+ }
200
+ ]
201
+ },
202
+ {
203
+ "type": "namespace",
204
+ "title": "http",
205
+ "name": "http",
206
+ "description": "",
207
+ "tools": [
208
+ {
209
+ "name": "http_request",
210
+ "title": "http_request",
211
+ "type": "function",
212
+ "description": "发起 HTTP 请求, 返回响应结果 { status, headers, body }. 支持 params 查询参数合并、timeout 单次超时(默认 10s, 上限 60s)、retry 重试(仅网络异常/超时/5xx/429, 指数退避)与 auth 认证({ type: \"basic\", username, password } 或 { type: \"bearer\", token }, headers 显式 Authorization 优先). 失败返回结构化错误 { status: 0, error }, 不抛出异常.",
213
+ "parameters": {
214
+ "properties": {
215
+ "url": {
216
+ "type": "string",
217
+ "title": "URL",
218
+ "description": "请求地址"
219
+ },
220
+ "method": {
221
+ "type": "string",
222
+ "title": "Method",
223
+ "description": "HTTP 方法(GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS),默认 GET",
224
+ "default": "GET"
225
+ },
226
+ "headers": {
227
+ "type": "object",
228
+ "title": "Headers",
229
+ "description": "请求头键值对对象,默认无",
230
+ "default": null
231
+ },
232
+ "body": {
233
+ "type": "object",
234
+ "title": "Body",
235
+ "description": "请求体对象(自动 JSON 序列化并补充 content-type: application/json),GET/HEAD 忽略,空对象视为无请求体",
236
+ "default": null
237
+ },
238
+ "params": {
239
+ "type": "object",
240
+ "title": "Params",
241
+ "description": "查询参数键值对对象,合并到 URL 查询串(URL 已有同名参数时覆盖),默认无",
242
+ "default": null
243
+ },
244
+ "timeout": {
245
+ "type": "integer",
246
+ "title": "Timeout",
247
+ "description": "单次请求超时毫秒数(100–60000),默认 10000",
248
+ "default": 10000
249
+ },
250
+ "retry": {
251
+ "type": "integer",
252
+ "title": "Retry",
253
+ "description": "失败重试次数(0–5),仅网络异常/超时/5xx/429 触发,指数退避,默认 0",
254
+ "default": 0
255
+ },
256
+ "auth": {
257
+ "type": "object",
258
+ "title": "Auth",
259
+ "description": "认证配置。Basic: { type: 'basic', username, password };Bearer: { type: 'bearer', token }。headers 显式 Authorization 优先,默认无",
260
+ "default": null
261
+ }
262
+ },
263
+ "required": ["url"],
264
+ "title": "http_request",
265
+ "type": "object"
266
+ },
267
+ "returns": {
268
+ "type": "object",
269
+ "title": "http_request 函数返回",
270
+ "properties": {}
271
+ },
272
+ "namespace": "http",
273
+ "kind": "http",
274
+ "semantics": "query"
275
+ }
276
+ ]
277
+ },
278
+ {
279
+ "type": "namespace",
280
+ "title": "ip-location",
281
+ "name": "ip-location",
282
+ "description": "",
283
+ "tools": [
284
+ {
285
+ "name": "ip_location",
286
+ "title": "ip_location",
287
+ "type": "function",
288
+ "description": "旧域重建·IP 属地解析:按最长前缀匹配数据集(env IP_LOCATION_DATASET 指向 JSON)返回 country/province/city/isp;未命中返回空字段。",
289
+ "parameters": {
290
+ "properties": {
291
+ "ip": {
292
+ "type": "string",
293
+ "title": "IP",
294
+ "description": "待解析的 IP 地址"
295
+ }
296
+ }
297
+ },
298
+ "returns": {
299
+ "type": "object",
300
+ "title": "ip_location_result",
301
+ "properties": {
302
+ "country": {
303
+ "type": "string",
304
+ "title": "Country"
305
+ },
306
+ "province": {
307
+ "type": "string",
308
+ "title": "Province"
309
+ },
310
+ "city": {
311
+ "type": "string",
312
+ "title": "City"
313
+ },
314
+ "isp": {
315
+ "type": "string",
316
+ "title": "Isp"
317
+ },
318
+ "ip": {
319
+ "type": "string",
320
+ "title": "Ip"
321
+ }
322
+ },
323
+ "required": ["country", "province", "city", "isp", "ip"]
324
+ },
325
+ "namespace": "ip-location",
326
+ "kind": "ip-location",
327
+ "semantics": "query"
328
+ }
329
+ ]
330
+ },
331
+ {
332
+ "type": "namespace",
333
+ "title": "rate-window",
334
+ "name": "rate-window",
335
+ "description": "",
336
+ "tools": [
337
+ {
338
+ "name": "rate_1h",
339
+ "title": "rate_1h",
340
+ "type": "function",
341
+ "description": "旧域重建·频次统计:记录实体事件并返回其 1 小时滑动窗口内的事件计数。",
342
+ "parameters": {
343
+ "properties": {
344
+ "entity": {
345
+ "type": "string",
346
+ "title": "实体",
347
+ "description": "计数实体(如 ip、phone)"
348
+ }
349
+ }
350
+ },
351
+ "returns": {
352
+ "type": "object",
353
+ "title": "RateCommonResult",
354
+ "properties": {
355
+ "counter": {
356
+ "type": "integer",
357
+ "title": "Counter",
358
+ "default": 0
359
+ },
360
+ "v": {
361
+ "type": "string",
362
+ "title": "V",
363
+ "default": ""
364
+ },
365
+ "idle": {
366
+ "type": "integer",
367
+ "title": "Idle",
368
+ "default": 0
369
+ },
370
+ "timestamp": {
371
+ "type": "string",
372
+ "title": "Timestamp",
373
+ "default": ""
374
+ }
375
+ }
376
+ },
377
+ "namespace": "rate-window",
378
+ "kind": "rate-window",
379
+ "semantics": "observe"
380
+ },
381
+ {
382
+ "name": "group_distinct_1h",
383
+ "title": "group_distinct_1h",
384
+ "type": "function",
385
+ "description": "旧域重建·组去重统计:记录 (组, 值) 事件并返回 1 小时滑动窗口内组事件数(pv)与去重值数(uv)。",
386
+ "parameters": {
387
+ "properties": {
388
+ "group": {
389
+ "type": "string",
390
+ "title": "组",
391
+ "description": "分组键(如 ip)"
392
+ },
393
+ "value": {
394
+ "type": "string",
395
+ "title": "值",
396
+ "description": "组内观测值(如 phone)"
397
+ }
398
+ }
399
+ },
400
+ "returns": {
401
+ "type": "object",
402
+ "title": "GroupDistinctCommonResult",
403
+ "properties": {
404
+ "idle": {
405
+ "type": "integer",
406
+ "title": "Idle",
407
+ "default": 0
408
+ },
409
+ "pv": {
410
+ "type": "integer",
411
+ "title": "Pv",
412
+ "default": 0
413
+ },
414
+ "uv": {
415
+ "type": "integer",
416
+ "title": "Uv",
417
+ "default": 0
418
+ },
419
+ "gidle": {
420
+ "type": "integer",
421
+ "title": "Gidle",
422
+ "default": 0
423
+ },
424
+ "vidle": {
425
+ "type": "integer",
426
+ "title": "Vidle",
427
+ "default": 0
428
+ },
429
+ "group": {
430
+ "type": "string",
431
+ "title": "Group",
432
+ "default": ""
433
+ },
434
+ "v": {
435
+ "type": "string",
436
+ "title": "V",
437
+ "default": ""
438
+ },
439
+ "timestamp": {
440
+ "type": "string",
441
+ "title": "Timestamp",
442
+ "default": ""
443
+ }
444
+ }
445
+ },
446
+ "namespace": "rate-window",
447
+ "kind": "rate-window",
448
+ "semantics": "observe"
449
+ }
450
+ ]
451
+ },
452
+ {
453
+ "type": "namespace",
454
+ "title": "roster",
455
+ "name": "roster",
456
+ "description": "",
457
+ "tools": [
458
+ {
459
+ "name": "roster",
460
+ "title": "roster",
461
+ "type": "function",
462
+ "description": "查询名单:在服务端指定名单中查询某个值是否存在,返回命中结果.",
463
+ "parameters": {
464
+ "properties": {
465
+ "roster": {
466
+ "type": "string",
467
+ "title": "名单",
468
+ "description": "服务端名单名称(从名单下拉中动态选择)"
469
+ },
470
+ "value": {
471
+ "type": "string",
472
+ "title": "查询值",
473
+ "description": "待查询的值"
474
+ }
475
+ },
476
+ "required": ["roster", "value"],
477
+ "title": "roster",
478
+ "type": "object"
479
+ },
480
+ "returns": {
481
+ "type": "object",
482
+ "title": "roster 函数返回",
483
+ "properties": {}
484
+ },
485
+ "namespace": "roster",
486
+ "kind": "roster",
487
+ "semantics": "query"
488
+ }
489
+ ]
490
+ },
491
+ {
492
+ "type": "namespace",
493
+ "title": "notify",
494
+ "name": "notify",
495
+ "description": "IM 机器人文本通知(飞书/钉钉/企业微信/Slack)",
496
+ "tools": [
497
+ {
498
+ "name": "webhook",
499
+ "title": "webhook",
500
+ "type": "function",
501
+ "description": "向 IM 机器人 webhook 发送文本通知, 返回 { ok, status, body }. channel 支持 feishu/dingtalk/wecom/slack; 带 title 时按渠道转 markdown 形态. webhook 地址支持 ${secret:名称} 引用(按租户解析, 群机器人地址含凭证, 推荐走密钥), timeout/retry 语义与 http_request 一致. ok 仅表示 HTTP 2xx; 部分平台(如钉钉)限流/错参仍回 200, 业务错误码在 body.errcode. 失败返回结构化错误, 不抛出异常.",
502
+ "parameters": {
503
+ "properties": {
504
+ "channel": {
505
+ "type": "string",
506
+ "title": "Channel",
507
+ "description": "通知渠道(feishu/dingtalk/wecom/slack), 决定 payload 形状, 默认 feishu",
508
+ "default": "feishu"
509
+ },
510
+ "webhook": {
511
+ "type": "string",
512
+ "title": "Webhook URL",
513
+ "description": "机器人 webhook 地址, 支持 ${secret:名称} 引用(推荐, 地址含凭证不应落图)"
514
+ },
515
+ "message": {
516
+ "type": "string",
517
+ "title": "Message",
518
+ "description": "通知正文(纯文本/markdown, ≤16KB)"
519
+ },
520
+ "title": {
521
+ "type": "string",
522
+ "title": "Title",
523
+ "description": "可选标题; 提供时 feishu 拼接首行, dingtalk/wecom/slack 转对应 markdown 形态",
524
+ "default": null
525
+ },
526
+ "timeout": {
527
+ "type": "integer",
528
+ "title": "Timeout",
529
+ "description": "单次请求超时毫秒数(100–60000), 默认 10000",
530
+ "default": 10000
531
+ },
532
+ "retry": {
533
+ "type": "integer",
534
+ "title": "Retry",
535
+ "description": "失败重试次数(0–5), 仅网络异常/超时/5xx/429 触发, 指数退避, 默认 0",
536
+ "default": 0
537
+ }
538
+ },
539
+ "required": ["webhook", "message"],
540
+ "title": "notify_webhook",
541
+ "type": "object"
542
+ }
543
+ }
544
+ ]
545
+ }
546
+ ]
547
+ ;
548
+
549
+ export default _default;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ export declare const CryptoTab: React.FC<{
3
+ id: string;
4
+ }>;
5
+ export declare const cryptoNode: import('../..').CustomNodeSpec;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ type CurrentDateTabProps = {
3
+ id: string;
4
+ };
5
+ /** 专属页面:输出 key 可由客户输入 + 仿真结果回显 */
6
+ export declare const CurrentDateTab: React.FC<CurrentDateTabProps>;
7
+ export declare const currentDateNode: import('../..').CustomNodeSpec;
8
+ export {};