@qilin-agent/client-schema-form 0.0.0-stage → 3.1.7
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/LICENSE +21 -0
- package/README.i18n.yaml +28 -0
- package/README.md +47 -2
- package/README.zh.md +48 -0
- package/lib/index.js +141 -0
- package/lib/types/index.d.ts +10 -0
- package/lib/types/model.d.ts +68 -0
- package/package.json +36 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 kkutysllb
|
|
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.i18n.yaml
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Bilingual-pair consistency record for README.md (docs/i18n/README.md): per heading
|
|
2
|
+
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
|
3
|
+
# After editing either side, bring the other along and re-record with:
|
|
4
|
+
# pnpm run verify-translation-pairing --write packages/client/schema-form/README.md
|
|
5
|
+
/:
|
|
6
|
+
en: 29df4c8e1bc00a92
|
|
7
|
+
zh: 1f10d0b3ef6edddd
|
|
8
|
+
/qilin-agent-client-schema-form:
|
|
9
|
+
en: b9f0043a06e0f834
|
|
10
|
+
zh: 503ec8030ec56db2
|
|
11
|
+
/qilin-agent-client-schema-form/summary:
|
|
12
|
+
en: 4f9409a1d4c655ba
|
|
13
|
+
zh: 2ae30bee38ce2869
|
|
14
|
+
/qilin-agent-client-schema-form/table-of-contents:
|
|
15
|
+
en: b4683d2a53256fda
|
|
16
|
+
zh: 4e65ff63dc8c48fe
|
|
17
|
+
/qilin-agent-client-schema-form/model-experience:
|
|
18
|
+
en: bdb6bdc139b7f5a7
|
|
19
|
+
zh: feca992d9b340e0b
|
|
20
|
+
/qilin-agent-client-schema-form/model-experience/kv-cache-effect:
|
|
21
|
+
en: ca75c51c89c2c9b0
|
|
22
|
+
zh: de54f3467ef3b9be
|
|
23
|
+
/qilin-agent-client-schema-form/known-limitations-and-deferred-work:
|
|
24
|
+
en: 6ab3a1e79b9555a9
|
|
25
|
+
zh: 14695aac0fc46105
|
|
26
|
+
/qilin-agent-client-schema-form/known-limitations-and-deferred-work/dev-note:
|
|
27
|
+
en: 08801a2906bf9717
|
|
28
|
+
zh: 363e3669de77dc34
|
package/README.md
CHANGED
|
@@ -1,3 +1,48 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
description: "Schema and draft model layer behind configuration editors: rehydrate a serialized schemastery envelope, validate drafts, and edit them immutably by path."
|
|
3
|
+
kind: "package-library"
|
|
4
|
+
---
|
|
5
|
+
# @qilin-agent/client-schema-form
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
English | [中文](README.zh.md)
|
|
8
|
+
|
|
9
|
+
## Summary
|
|
10
|
+
|
|
11
|
+
Schema introspection and immutable draft editing for the configuration editors of the web client. A Host row publishes its declared schemastery `Config` as the serialized `schema.toJSON()` envelope, and `rehydrateSchema` turns that envelope back into a live node tree, so the same schema that validates a row on the Host validates a draft in the browser. `setPath`, `deletePath`, `nodeAtPath`, and `validateDraft` apply and reject a draft by path; the package owns no React and no rendering.
|
|
12
|
+
|
|
13
|
+
Consumers: `@qilin-agent/client-ui-settings` serves these helpers as `ctx.settingsSchema`, and `@qilin-agent/client-ui-plugin-manager` builds a row's configuration form over them.
|
|
14
|
+
|
|
15
|
+
## Table of Contents
|
|
16
|
+
|
|
17
|
+
- [Model Experience](#model-experience)
|
|
18
|
+
- [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
|
|
19
|
+
- [Dev Note](#dev-note)
|
|
20
|
+
|
|
21
|
+
-----
|
|
22
|
+
|
|
23
|
+
<a id="model-experience"></a>
|
|
24
|
+
## Model Experience
|
|
25
|
+
|
|
26
|
+
None, as this package backs browser configuration editors; nothing here reaches a model request.
|
|
27
|
+
|
|
28
|
+
#### KV Cache effect
|
|
29
|
+
|
|
30
|
+
None; this package neither assembles nor sends a provider request.
|
|
31
|
+
|
|
32
|
+
## Known Limitations and Deferred Work
|
|
33
|
+
|
|
34
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
35
|
+
|
|
36
|
+
- **Rehydration executes the served envelope** — `rehydrateSchema` reconstructs a live schemastery validator, and schemastery revives serialized callbacks through `new Function`, so the schema envelope is executable content rather than inert data. This is safe only for an envelope from the same trusted host that serves the page; the protocol provides no inert cross-trust representation.
|
|
37
|
+
- **Validation is draft-level, not per-field** — `validateDraft` reports schemastery's first failure message, including its `$.path`; it does not map errors onto individual controls.
|
|
38
|
+
- **No generic renderer** — consumers build their own controls over these helpers. Every configuration surface in this repository decides its own layout; the [Web configuration plane Agent Note](../../../.agents/notes/archived/architecture/2026-07-30-web-config-plane.md) records why the schema dump that a fully generic renderer produced was rejected.
|
|
39
|
+
|
|
40
|
+
<a id="dev-note"></a>
|
|
41
|
+
### Dev Note
|
|
42
|
+
|
|
43
|
+
<details>
|
|
44
|
+
<summary>Working context for maintainers — click to expand</summary>
|
|
45
|
+
|
|
46
|
+
The package is built with the `staticLinked` preset and named in `INLINE_SAFE` in [`tsdown.client.ts`](../tsdown.client.ts): its exports are pure folds with no runtime identity to share, so a dynamic browser bundle inlines its own copy instead of requesting a module-table row.
|
|
47
|
+
|
|
48
|
+
</details>
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "配置编辑器背后的 schema 与草稿模型层:还原序列化的 schemastery 封装、校验草稿,并按路径以不可变方式编辑。"
|
|
3
|
+
kind: "package-library"
|
|
4
|
+
---
|
|
5
|
+
# @qilin-agent/client-schema-form
|
|
6
|
+
|
|
7
|
+
[English](README.md) | 中文
|
|
8
|
+
|
|
9
|
+
## 概述
|
|
10
|
+
|
|
11
|
+
Web 客户端各配置编辑器共用的 schema 内省与不可变草稿编辑。Host 行把自身声明的 schemastery `Config` 以序列化的 `schema.toJSON()` 封装发布出来,`rehydrateSchema` 把该封装还原成活的节点树,因此宿主机上校验某一行的那份 schema,就是浏览器里校验草稿的那份 schema。`setPath`、`deletePath`、`nodeAtPath` 与 `validateDraft` 按路径施加或拒绝草稿;该包不含任何 React,也不做任何渲染。
|
|
12
|
+
|
|
13
|
+
使用方:`@qilin-agent/client-ui-settings` 以 `ctx.settingsSchema` 提供这批辅助函数,`@qilin-agent/client-ui-plugin-manager` 在其之上构建行的配置表单。
|
|
14
|
+
|
|
15
|
+
## 目录
|
|
16
|
+
|
|
17
|
+
- [模型体验](#model-experience)
|
|
18
|
+
- [已知限制与暂缓事项](#known-limitations-and-deferred-work)
|
|
19
|
+
- [开发备注](#dev-note)
|
|
20
|
+
|
|
21
|
+
-----
|
|
22
|
+
|
|
23
|
+
<a id="model-experience"></a>
|
|
24
|
+
## 模型体验
|
|
25
|
+
|
|
26
|
+
无。该包支撑的是浏览器配置编辑器;这里没有任何内容进入模型请求。
|
|
27
|
+
|
|
28
|
+
#### KV Cache 影响
|
|
29
|
+
|
|
30
|
+
无;该包既不组装也不发送提供方请求。
|
|
31
|
+
|
|
32
|
+
## 已知限制与暂缓事项
|
|
33
|
+
|
|
34
|
+
<a id="known-limitations-and-deferred-work"></a>
|
|
35
|
+
|
|
36
|
+
- **重建 schema 会执行所收到的封装**——`rehydrateSchema` 会重建一个活的 schemastery 校验器,而 schemastery 通过 `new Function` 复活序列化过的回调函数,因此 schema 信封是可执行内容,而不是不可执行数据。只有该封装来自提供该页面的同一受信任宿主时才安全;该协议没有跨信任边界使用的不可执行表示。
|
|
37
|
+
- **校验是草稿级的,而非逐字段的**——`validateDraft` 报告 schemastery 的第一条失败消息及其 `$.path`;它不会把错误映射到各个控件。
|
|
38
|
+
- **没有通用渲染器**——消费方在这些辅助函数之上构建自己的控件。本仓库的每个配置界面都自行决定布局;[Web 配置面 Agent Note](../../../.agents/notes/archived/architecture/2026-07-30-web-config-plane.md) 记录了完全通用渲染器产出的 schema 转储为何被否决。
|
|
39
|
+
|
|
40
|
+
<a id="dev-note"></a>
|
|
41
|
+
### 开发备注
|
|
42
|
+
|
|
43
|
+
<details>
|
|
44
|
+
<summary>维护者工作上下文——点击展开</summary>
|
|
45
|
+
|
|
46
|
+
该包以 `staticLinked` 预设构建,并在 [`tsdown.client.ts`](../tsdown.client.ts) 的 `INLINE_SAFE` 中登记:它的导出是无运行期身份可共享的纯函数折叠,因此动态浏览器包内联自己的副本,而不申请模块表行。
|
|
47
|
+
|
|
48
|
+
</details>
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import Schema from "@qilin-agent/schemastery";
|
|
2
|
+
//#region lib/types/model.js
|
|
3
|
+
/**
|
|
4
|
+
* Schema introspection and draft-editing helpers behind settings editors.
|
|
5
|
+
* The serialized schemastery envelope (`schema.toJSON()`) rehydrates into a
|
|
6
|
+
* live validator whose node relations (`dict`/`inner`) editors probe for
|
|
7
|
+
* field presence and roles; drafts are edited immutably by path.
|
|
8
|
+
* @module @qilin-agent/client-schema-form/model
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Rehydrate a serialized schema envelope into a live validator/node tree.
|
|
12
|
+
* @param serialized - `schema.toJSON()` output received over the wire.
|
|
13
|
+
* @returns the root schema node.
|
|
14
|
+
*/
|
|
15
|
+
function rehydrateSchema(serialized) {
|
|
16
|
+
return new Schema(serialized);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Validate a draft against a rehydrated schema.
|
|
20
|
+
* @param schema - rehydrated root node.
|
|
21
|
+
* @param draft - candidate value.
|
|
22
|
+
* @returns the validation failure message, or `undefined` when the draft passes.
|
|
23
|
+
*/
|
|
24
|
+
function validateDraft(schema, draft) {
|
|
25
|
+
try {
|
|
26
|
+
schema(draft);
|
|
27
|
+
return;
|
|
28
|
+
} catch (error) {
|
|
29
|
+
return error instanceof Error ? error.message : String(error);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Resolve the schema node at a settings path (the configurable-provider
|
|
34
|
+
* directory's `settingsPath` vocabulary): object properties by name, dict
|
|
35
|
+
* entries through `inner`. An unresolvable segment returns `undefined` so
|
|
36
|
+
* the caller falls back instead of rendering a wrong subtree.
|
|
37
|
+
* @param root - rehydrated section root node.
|
|
38
|
+
* @param path - key path from the section root.
|
|
39
|
+
* @returns the node describing that position, or `undefined`.
|
|
40
|
+
*/
|
|
41
|
+
function nodeAtPath(root, path) {
|
|
42
|
+
let node = root;
|
|
43
|
+
for (const key of path) {
|
|
44
|
+
if (node === void 0) return void 0;
|
|
45
|
+
if (node.type === "object") node = node.dict?.[key];
|
|
46
|
+
else if (node.type === "dict" || node.type === "array") node = node.inner;
|
|
47
|
+
else return void 0;
|
|
48
|
+
}
|
|
49
|
+
return node;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Read a nested value by path.
|
|
53
|
+
* @param value - root value (draft or fallback layer).
|
|
54
|
+
* @param path - key path from the root; array indexes as strings.
|
|
55
|
+
* @returns the value at the path, or `undefined` along a missing branch.
|
|
56
|
+
*/
|
|
57
|
+
function getPath(value, path) {
|
|
58
|
+
let current = value;
|
|
59
|
+
for (const key of path) {
|
|
60
|
+
if (Array.isArray(current)) {
|
|
61
|
+
current = current[Number(key)];
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
if (typeof current !== "object" || current === null) return void 0;
|
|
65
|
+
current = current[key];
|
|
66
|
+
}
|
|
67
|
+
return current;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Whether a draft explicitly carries the path (its presence marks a user
|
|
71
|
+
* override, independent of the value stored there).
|
|
72
|
+
* @param value - root value (draft or fallback layer).
|
|
73
|
+
* @param path - key path from the root; array indexes as strings.
|
|
74
|
+
* @returns whether the path's final key exists on its parent.
|
|
75
|
+
*/
|
|
76
|
+
function hasPath(value, path) {
|
|
77
|
+
if (path.length === 0) return value !== void 0;
|
|
78
|
+
const parent = getPath(value, path.slice(0, -1));
|
|
79
|
+
const key = path[path.length - 1];
|
|
80
|
+
if (Array.isArray(parent)) return Number(key) < parent.length;
|
|
81
|
+
if (typeof parent !== "object" || parent === null) return false;
|
|
82
|
+
return key in parent;
|
|
83
|
+
}
|
|
84
|
+
function cloneContainer(container, key) {
|
|
85
|
+
if (Array.isArray(container)) return [...container];
|
|
86
|
+
if (typeof container === "object" && container !== null) return { ...container };
|
|
87
|
+
return /^\d+$/.test(key) ? [] : {};
|
|
88
|
+
}
|
|
89
|
+
/** Clone the container spine down to the leaf's parent, materializing missing intermediates. */
|
|
90
|
+
function cloneSpine(root, path) {
|
|
91
|
+
const result = { ...root };
|
|
92
|
+
let target = result;
|
|
93
|
+
for (let i = 0; i < path.length - 1; i++) {
|
|
94
|
+
const key = path[i];
|
|
95
|
+
const child = cloneContainer(Array.isArray(target) ? target[Number(key)] : target[key], path[i + 1]);
|
|
96
|
+
if (Array.isArray(target)) target[Number(key)] = child;
|
|
97
|
+
else target[key] = child;
|
|
98
|
+
target = child;
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
result,
|
|
102
|
+
parent: target,
|
|
103
|
+
leaf: path[path.length - 1]
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Immutably set a nested value, materializing missing intermediate containers.
|
|
108
|
+
* @param root - draft root (never mutated).
|
|
109
|
+
* @param path - non-empty key path.
|
|
110
|
+
* @param value - value to store at the path.
|
|
111
|
+
* @returns the new draft root.
|
|
112
|
+
* @throws when `path` is empty.
|
|
113
|
+
*/
|
|
114
|
+
function setPath(root, path, value) {
|
|
115
|
+
if (path.length === 0) throw new Error("schema-form: setPath needs a non-empty path");
|
|
116
|
+
const { result, parent, leaf } = cloneSpine(root, path);
|
|
117
|
+
if (Array.isArray(parent)) parent[Number(leaf)] = value;
|
|
118
|
+
else parent[leaf] = value;
|
|
119
|
+
return result;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Immutably remove a nested key (the per-field reset: the resolved value
|
|
123
|
+
* falls back to the composition base and schema defaults). Removing along a
|
|
124
|
+
* missing branch returns the root unchanged.
|
|
125
|
+
* @param root - draft root (never mutated).
|
|
126
|
+
* @param path - non-empty key path.
|
|
127
|
+
* @returns the new draft root.
|
|
128
|
+
* @throws when `path` is empty.
|
|
129
|
+
*/
|
|
130
|
+
function deletePath(root, path) {
|
|
131
|
+
if (path.length === 0) throw new Error("schema-form: deletePath needs a non-empty path");
|
|
132
|
+
if (!hasPath(root, path)) return root;
|
|
133
|
+
const { result, parent, leaf } = cloneSpine(root, path);
|
|
134
|
+
if (Array.isArray(parent)) parent.splice(Number(leaf), 1);
|
|
135
|
+
else Reflect.deleteProperty(parent, leaf);
|
|
136
|
+
return result;
|
|
137
|
+
}
|
|
138
|
+
//#endregion
|
|
139
|
+
export { deletePath, getPath, hasPath, nodeAtPath, rehydrateSchema, setPath, validateDraft };
|
|
140
|
+
|
|
141
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema/draft model layer for configuration editors: rehydrate the wire's
|
|
3
|
+
* serialized schemastery envelope, resolve nodes by settings path, validate
|
|
4
|
+
* drafts, and edit them immutably by path. Editors render their own controls
|
|
5
|
+
* on top of these helpers.
|
|
6
|
+
* @module @qilin-agent/client-schema-form
|
|
7
|
+
*/
|
|
8
|
+
export { deletePath, getPath, hasPath, nodeAtPath, rehydrateSchema, setPath, validateDraft, } from './model.ts';
|
|
9
|
+
export type { SchemaNode } from './model.ts';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema introspection and draft-editing helpers behind settings editors.
|
|
3
|
+
* The serialized schemastery envelope (`schema.toJSON()`) rehydrates into a
|
|
4
|
+
* live validator whose node relations (`dict`/`inner`) editors probe for
|
|
5
|
+
* field presence and roles; drafts are edited immutably by path.
|
|
6
|
+
* @module @qilin-agent/client-schema-form/model
|
|
7
|
+
*/
|
|
8
|
+
import Schema from '@qilin-agent/schemastery';
|
|
9
|
+
/** Live schemastery node; the renderer reads only its structural relations. */
|
|
10
|
+
export type SchemaNode = Schema;
|
|
11
|
+
/**
|
|
12
|
+
* Rehydrate a serialized schema envelope into a live validator/node tree.
|
|
13
|
+
* @param serialized - `schema.toJSON()` output received over the wire.
|
|
14
|
+
* @returns the root schema node.
|
|
15
|
+
*/
|
|
16
|
+
export declare function rehydrateSchema(serialized: unknown): SchemaNode;
|
|
17
|
+
/**
|
|
18
|
+
* Validate a draft against a rehydrated schema.
|
|
19
|
+
* @param schema - rehydrated root node.
|
|
20
|
+
* @param draft - candidate value.
|
|
21
|
+
* @returns the validation failure message, or `undefined` when the draft passes.
|
|
22
|
+
*/
|
|
23
|
+
export declare function validateDraft(schema: SchemaNode, draft: unknown): string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Resolve the schema node at a settings path (the configurable-provider
|
|
26
|
+
* directory's `settingsPath` vocabulary): object properties by name, dict
|
|
27
|
+
* entries through `inner`. An unresolvable segment returns `undefined` so
|
|
28
|
+
* the caller falls back instead of rendering a wrong subtree.
|
|
29
|
+
* @param root - rehydrated section root node.
|
|
30
|
+
* @param path - key path from the section root.
|
|
31
|
+
* @returns the node describing that position, or `undefined`.
|
|
32
|
+
*/
|
|
33
|
+
export declare function nodeAtPath(root: SchemaNode, path: readonly string[]): SchemaNode | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Read a nested value by path.
|
|
36
|
+
* @param value - root value (draft or fallback layer).
|
|
37
|
+
* @param path - key path from the root; array indexes as strings.
|
|
38
|
+
* @returns the value at the path, or `undefined` along a missing branch.
|
|
39
|
+
*/
|
|
40
|
+
export declare function getPath(value: unknown, path: readonly string[]): unknown;
|
|
41
|
+
/**
|
|
42
|
+
* Whether a draft explicitly carries the path (its presence marks a user
|
|
43
|
+
* override, independent of the value stored there).
|
|
44
|
+
* @param value - root value (draft or fallback layer).
|
|
45
|
+
* @param path - key path from the root; array indexes as strings.
|
|
46
|
+
* @returns whether the path's final key exists on its parent.
|
|
47
|
+
*/
|
|
48
|
+
export declare function hasPath(value: unknown, path: readonly string[]): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Immutably set a nested value, materializing missing intermediate containers.
|
|
51
|
+
* @param root - draft root (never mutated).
|
|
52
|
+
* @param path - non-empty key path.
|
|
53
|
+
* @param value - value to store at the path.
|
|
54
|
+
* @returns the new draft root.
|
|
55
|
+
* @throws when `path` is empty.
|
|
56
|
+
*/
|
|
57
|
+
export declare function setPath(root: Record<string, unknown>, path: readonly string[], value: unknown): Record<string, unknown>;
|
|
58
|
+
/**
|
|
59
|
+
* Immutably remove a nested key (the per-field reset: the resolved value
|
|
60
|
+
* falls back to the composition base and schema defaults). Removing along a
|
|
61
|
+
* missing branch returns the root unchanged.
|
|
62
|
+
* @param root - draft root (never mutated).
|
|
63
|
+
* @param path - non-empty key path.
|
|
64
|
+
* @returns the new draft root.
|
|
65
|
+
* @throws when `path` is empty.
|
|
66
|
+
*/
|
|
67
|
+
export declare function deletePath(root: Record<string, unknown>, path: readonly string[]): Record<string, unknown>;
|
|
68
|
+
//# sourceMappingURL=model.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qilin-agent/client-schema-form",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"description": "Schema/draft model layer for settings editors: rehydrates a serialized schemastery schema, validates drafts, and edits them immutably by path",
|
|
4
|
+
"version": "3.1.7",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/kkutysllb/QiLin.git",
|
|
11
|
+
"directory": "packages/client/schema-form"
|
|
12
|
+
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
15
|
+
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"main": "lib/index.js",
|
|
18
|
+
"types": "lib/types/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./lib/types/index.d.ts",
|
|
22
|
+
"default": "./lib/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./src/*": "./src/*",
|
|
25
|
+
"./package.json": "./package.json"
|
|
26
|
+
},
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@qilin-agent/kylin": "~4.0.5"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@qilin-agent/kylin": "~4.0.5",
|
|
33
|
+
"@qilin-agent/schemastery": "~3.18.5"
|
|
34
|
+
},
|
|
35
|
+
"files": [
|
|
36
|
+
"lib/index.js",
|
|
37
|
+
"lib/types/**/*.d.ts"
|
|
38
|
+
]
|
|
6
39
|
}
|