@qilin-agent/package-manifest 0.0.0-stage → 3.1.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/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.
@@ -0,0 +1,37 @@
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/util/package-manifest/README.md
5
+ /:
6
+ en: 8cffb2f57844db66
7
+ zh: 20b158511886ac50
8
+ /qilin-agent-package-manifest:
9
+ en: 93ae335bbcdc4643
10
+ zh: 834b62ac963d8fda
11
+ /qilin-agent-package-manifest/summary:
12
+ en: 11c2d869ff7a57d5
13
+ zh: 6460dfd74b550431
14
+ /qilin-agent-package-manifest/table-of-contents:
15
+ en: d152484eb41ac6b4
16
+ zh: 1db86285abf6c499
17
+ /qilin-agent-package-manifest/use-this-package:
18
+ en: d43690593d62123d
19
+ zh: 9969f7c83dc4aecb
20
+ /qilin-agent-package-manifest/understand-the-implementation:
21
+ en: 41ec449dee927f04
22
+ zh: a60e0740a2a4034e
23
+ /qilin-agent-package-manifest/further-exploration:
24
+ en: 56a77c4f61a7391b
25
+ zh: 1372cfa0389d12c8
26
+ /qilin-agent-package-manifest/model-experience:
27
+ en: 0b5aaa4787068a57
28
+ zh: bdb5dabe0b33ff9d
29
+ /qilin-agent-package-manifest/model-experience/kv-cache-effect:
30
+ en: 2ed74a2a33958543
31
+ zh: 7d63c3a3801bef13
32
+ /qilin-agent-package-manifest/known-limitations-and-deferred-work:
33
+ en: f2e2f7b819e823ef
34
+ zh: 142b576757481f4d
35
+ /qilin-agent-package-manifest/known-limitations-and-deferred-work/dev-note:
36
+ en: e67f633dc6fe7773
37
+ zh: 3bb0c20c93f16f98
package/README.md CHANGED
@@ -1,3 +1,101 @@
1
- # Temporary Holding Version
1
+ ---
2
+ description: "Shared TypeScript declarations for package identity, runtime requirements, and DSH plugin metadata."
3
+ kind: "package-library"
4
+ ---
2
5
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
6
+ # @qilin-agent/package-manifest
7
+
8
+ English | [中文](README.zh.md)
9
+
10
+ ## Summary
11
+
12
+ Use `QilinPackageManifest` for package metadata, `QilinManifest` for the public fields under `qilin`, and member types such as `QilinClientManifest` for one domain. Each reader owns JSON parsing, validation, and default resolution.
13
+
14
+ ## Table of Contents
15
+
16
+ - [Use this package](#use-this-package)
17
+ - [Understand the implementation](#understand-the-implementation)
18
+ - [Further Exploration](#further-exploration)
19
+ - [Model Experience](#model-experience)
20
+ - [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
21
+ - [Dev Note](#dev-note)
22
+
23
+ -----
24
+
25
+ <a id="use-this-package"></a>
26
+ ## Use this package
27
+
28
+ Import from the package root. Use a development dependency when only checking your own source; use a production dependency if your published declarations reference these types.
29
+
30
+ ```ts
31
+ import type { QilinClientManifest, QilinPackageManifest } from '@qilin-agent/package-manifest'
32
+
33
+ const client: QilinClientManifest = { platform: 'web' }
34
+ const manifest: QilinPackageManifest = {
35
+ name: 'example-qilin-plugin',
36
+ version: '1.0.0',
37
+ engines: { node: '>=24', qilin: '0.1.5-alpha.1' },
38
+ qilin: {
39
+ manifestVersion: 1,
40
+ bundle: { patch: './cordis.patch.yml' },
41
+ client,
42
+ },
43
+ }
44
+ ```
45
+
46
+ `QilinPackageManifest` describes the package.json fields used by DSH, with required `name` and `version`; it is not an exhaustive npm schema. Local profile readers use `Partial<QilinPackageManifest>` because profiles need no published version. `QilinManifest` describes only public author fields under `qilin`. TypeScript checks the example and erases `import type`; these interfaces do not parse JSON or write a file.
47
+
48
+ The following metadata fields are optional. Omitting them leaves the format version or compatible host versions undeclared; readers do not infer defaults.
49
+
50
+ | Field | Meaning |
51
+ |---|---|
52
+ | `qilin.manifestVersion` | Manifest format identifier; the declared format is `1`, independent of the npm package version and Session format version. |
53
+ | `engines.qilin` | Author-declared compatible DSH versions as a SemVer range, including exact prerelease versions. This field sits beside `engines.node` and `engines.npm`; an engines object may omit `qilin`. |
54
+
55
+ Public composition declarations are defined in [`src/types.ts`](src/types.ts). Internal `configTrees`, `sessionFormatMigration`, and generated `moduleFallback` metadata remain owned by their image-packer, catalog, and launcher readers; the public types do not expose them.
56
+
57
+ -----
58
+
59
+ <a id="understand-the-implementation"></a>
60
+ ## Understand the implementation
61
+
62
+ <details>
63
+ <summary>Implementation internals — click to expand</summary>
64
+
65
+ The package root only re-exports declarations from [`src/types.ts`](src/types.ts).
66
+
67
+ </details>
68
+
69
+ -----
70
+
71
+ <a id="further-exploration"></a>
72
+ ## Further Exploration
73
+
74
+ - [Profile launcher](../../boot/app-boot/README.md#profiles) — manifest loading and composition.
75
+ - [Public package metadata](../../../.agents/notes/implemented/architecture/2026-09-10-public-package-manifest.md) — field placement and reader ownership.
76
+
77
+ <a id="model-experience"></a>
78
+ ## Model Experience
79
+
80
+ None, as this package only exports types.
81
+
82
+ #### KV Cache effect
83
+
84
+ Type declarations add no model input, so provider cache reuse is unaffected.
85
+
86
+ ## Known Limitations and Deferred Work
87
+
88
+ <a id="known-limitations-and-deferred-work"></a>
89
+
90
+ - **Static typing only.** Consumers read and validate the JSON fields they use, then adapt the shared declarations to their runtime data. The package supplies no parser, getter helpers, file checks, or defaults.
91
+ - **Compatibility is declarative.** Current installers and loaders do not enforce `qilin.manifestVersion` or `engines.qilin`; declaring a range does not reject incompatible hosts or validate SemVer syntax.
92
+
93
+ <a id="dev-note"></a>
94
+ ### Dev Note
95
+
96
+ <details>
97
+ <summary>Working context for maintainers — click to expand</summary>
98
+
99
+ None.
100
+
101
+ </details>
package/README.zh.md ADDED
@@ -0,0 +1,101 @@
1
+ ---
2
+ description: "包身份、运行时要求和 DSH 插件元数据的共享 TypeScript 声明。"
3
+ kind: "package-library"
4
+ ---
5
+
6
+ # @qilin-agent/package-manifest
7
+
8
+ [English](README.md) | 中文
9
+
10
+ ## 概述
11
+
12
+ 使用 `QilinPackageManifest` 描述包元数据、`QilinManifest` 描述 `qilin` 下的公共字段,以及 `QilinClientManifest` 等成员类型描述单个领域。各读取方负责 JSON 解析、校验和默认值解析。
13
+
14
+ ## 目录
15
+
16
+ - [使用本包](#use-this-package)
17
+ - [理解实现](#understand-the-implementation)
18
+ - [进一步探索](#further-exploration)
19
+ - [模型体验](#model-experience)
20
+ - [已知限制与后续工作](#known-limitations-and-deferred-work)
21
+ - [开发备注](#dev-note)
22
+
23
+ -----
24
+
25
+ <a id="use-this-package"></a>
26
+ ## 使用本包
27
+
28
+ 从包根导入类型。仅检查自己的源码时使用开发依赖;若发布的声明文件引用这些类型,则使用生产依赖。
29
+
30
+ ```ts
31
+ import type { QilinClientManifest, QilinPackageManifest } from '@qilin-agent/package-manifest'
32
+
33
+ const client: QilinClientManifest = { platform: 'web' }
34
+ const manifest: QilinPackageManifest = {
35
+ name: 'example-qilin-plugin',
36
+ version: '1.0.0',
37
+ engines: { node: '>=24', qilin: '0.1.5-alpha.1' },
38
+ qilin: {
39
+ manifestVersion: 1,
40
+ bundle: { patch: './cordis.patch.yml' },
41
+ client,
42
+ },
43
+ }
44
+ ```
45
+
46
+ `QilinPackageManifest` 描述 DSH 使用的 package.json 字段,其中 `name` 和 `version` 必填;它不是完整的 npm schema(模式)。本地 profile 读取方使用 `Partial<QilinPackageManifest>`,因为 profile 无需发布版本。`QilinManifest` 仅描述 `qilin` 下的公共作者字段。TypeScript 检查示例并删除 `import type`;这些接口不解析 JSON,也不写入文件。
47
+
48
+ 以下元数据字段均可选。省略时,格式版本或兼容的宿主版本保持未声明状态;读取方不推断默认值。
49
+
50
+ | 字段 | 含义 |
51
+ |---|---|
52
+ | `qilin.manifestVersion` | manifest(元数据清单)格式标识;声明的格式为 `1`,独立于 npm 包版本和 Session 格式版本。 |
53
+ | `engines.qilin` | 作者声明的兼容 DSH 版本,使用 SemVer 范围,也可填写精确的预发布版本。此字段与 `engines.node`、`engines.npm` 并列;engines 对象可省略 `qilin`。 |
54
+
55
+ 公共组合声明定义在 [`src/types.ts`](src/types.ts) 中。内部 `configTrees`、`sessionFormatMigration` 和生成的 `moduleFallback` 元数据分别由镜像打包器、目录生成器和启动器读取方拥有;公共类型不暴露这些字段。
56
+
57
+ -----
58
+
59
+ <a id="understand-the-implementation"></a>
60
+ ## 理解实现
61
+
62
+ <details>
63
+ <summary>实现细节——点击展开</summary>
64
+
65
+ 包根仅重新导出 [`src/types.ts`](src/types.ts) 中的声明。
66
+
67
+ </details>
68
+
69
+ -----
70
+
71
+ <a id="further-exploration"></a>
72
+ ## 进一步探索
73
+
74
+ - [Profile 启动器](../../boot/app-boot/README.zh.md#profiles)——manifest 加载与组合。
75
+ - [公共包元数据](../../../.agents/notes/implemented/architecture/2026-09-10-public-package-manifest.zh.md)——字段位置与读取方归属。
76
+
77
+ <a id="model-experience"></a>
78
+ ## 模型体验
79
+
80
+ 无,因为本包仅导出类型。
81
+
82
+ #### KV Cache 影响
83
+
84
+ 类型声明不增加模型输入,因此不影响提供方的缓存复用。
85
+
86
+ ## 已知限制与后续工作
87
+
88
+ <a id="known-limitations-and-deferred-work"></a>
89
+
90
+ - **仅提供静态类型。** 消费方读取并校验所需的 JSON 字段,再将共享声明适配为运行时数据。本包不提供解析器、getter helper、文件检查或默认值。
91
+ - **兼容性仅作声明。** 当前安装器和加载器不强制检查 `qilin.manifestVersion` 或 `engines.qilin`;声明范围不会拒绝不兼容的宿主,也不会校验 SemVer 语法。
92
+
93
+ <a id="dev-note"></a>
94
+ ### 开发备注
95
+
96
+ <details>
97
+ <summary>维护者的工作上下文——点击展开</summary>
98
+
99
+ 无。
100
+
101
+ </details>
package/lib/index.js ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Public package manifest types, with no runtime exports.
3
+ * @module @qilin-agent/package-manifest
4
+ */
5
+ export type { LocalizedText, PluginLocalizedMeta, QilinBundleManifest, QilinClientManifest, QilinEnginesManifest, QilinManifest, QilinPackageManifest, QilinProfileAudience, QilinProfileManifest, } from './types.ts';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Shared declarations for the package.json fields used by QiLin plugin authors.
3
+ * Each reader owns JSON validation and resolved defaults.
4
+ * @module @qilin-agent/package-manifest/types
5
+ */
6
+ /** Package identity and metadata; local profile readers may accept a partial declaration. */
7
+ export interface QilinPackageManifest {
8
+ /** Published npm package name. */
9
+ name: string;
10
+ /** Published npm package version. */
11
+ version: string;
12
+ /** Package summary for discovery and display. */
13
+ description?: string;
14
+ /** Prevent npm publication, for example for local profile projects. */
15
+ private?: boolean;
16
+ /** Packages installed alongside this package. */
17
+ dependencies?: Record<string, string>;
18
+ /** Compatible versions of packages supplied by the consuming project. */
19
+ peerDependencies?: Record<string, string>;
20
+ /** Runtime requirements; declared compatibility is advisory until a reader enforces it. */
21
+ engines?: QilinEnginesManifest;
22
+ /** QiLin-specific author declarations. */
23
+ qilin?: QilinManifest;
24
+ }
25
+ /** Public author fields under `package.json.qilin`; a package may declare several roles. */
26
+ export interface QilinManifest {
27
+ /** Manifest format version, independent of the npm package and Session format versions. */
28
+ manifestVersion?: 1;
29
+ /** Bundle metadata consumed by the profile launcher. */
30
+ bundle?: QilinBundleManifest;
31
+ /** Profile metadata consumed by the profile launcher. */
32
+ profile?: QilinProfileManifest;
33
+ /** Client module loading and build metadata. */
34
+ client?: QilinClientManifest;
35
+ }
36
+ /** Runtime version requirements under `package.json.engines`. */
37
+ export interface QilinEnginesManifest {
38
+ /** Compatible QiLin versions as a SemVer range, including an exact version. */
39
+ qilin?: string;
40
+ /** Compatible Node.js versions. */
41
+ node?: string;
42
+ /** Compatible npm versions. */
43
+ npm?: string;
44
+ /** Requirements for additional runtimes or package managers. */
45
+ [engine: string]: string | undefined;
46
+ }
47
+ /** The configuration layer exported by a bundle package. */
48
+ export interface QilinBundleManifest {
49
+ /** Patch file path relative to the declaring package root. */
50
+ patch: string;
51
+ }
52
+ /** The bundle composition declared by a profile directory. */
53
+ export interface QilinProfileManifest {
54
+ /** Ordered bundle layer list, using installed package names. */
55
+ bundles?: string[];
56
+ /**
57
+ * Presentation choice recorded for a bundle's UI, keyed by package name; a
58
+ * name the record omits reads as `both`. Only a release that still offered
59
+ * the choice wrote one: app-boot reads an entry as the profile's own claim on
60
+ * a layer the shipped template no longer supplies, and the engine composition
61
+ * keeps every bundle regardless of the value.
62
+ */
63
+ audiences?: Record<string, QilinProfileAudience>;
64
+ }
65
+ /** The workbench surfaces a bundle's UI presents on; the engine composition is presentation-independent. */
66
+ export type QilinProfileAudience = 'general' | 'coding' | 'both';
67
+ /** Literal text or translations indexed by lowercase language id, with a required English fallback. */
68
+ export type LocalizedText = string | {
69
+ readonly en: string;
70
+ readonly [locale: string]: string;
71
+ };
72
+ /** Validated plugin display fields and diagnostics from exported locales, manifests, or icon files. */
73
+ export interface PluginLocalizedMeta {
74
+ /** Display title; omission preserves the consumer's technical-name fallback. */
75
+ readonly title?: LocalizedText;
76
+ /** Display introduction after locale and package-field fallback. */
77
+ readonly description?: LocalizedText;
78
+ /** Base64 image data URL read from the manifest's icon file; render as an image, not inline markup. */
79
+ readonly icon?: string;
80
+ /** Unmodified local metadata diagnostic; the plugin remains manageable. */
81
+ readonly error?: string;
82
+ }
83
+ /** Client module declaration read by client-modules and the client build. */
84
+ export interface QilinClientManifest {
85
+ /** Client platform identifier; the Web consumer selects `web`. */
86
+ platform: string;
87
+ /** Informational package-name dependencies, not Cordis service injection. */
88
+ inject?: string[];
89
+ /** Boot phase-one registration barrier; absent means the shared application batch. */
90
+ immediately?: boolean;
91
+ /**
92
+ * Exact module-table requests beyond the implicit client baseline, including
93
+ * subpaths such as `<pkg>/client`; absent means baseline externals only.
94
+ * Type-only imports are erased and create no module request.
95
+ */
96
+ external?: string[];
97
+ }
98
+ //# sourceMappingURL=types.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,38 @@
1
1
  {
2
2
  "name": "@qilin-agent/package-manifest",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "description": "Shared type declarations for package.json.qilin configuration fields",
4
+ "version": "3.1.4",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/kkutysllb/QiLin.git",
11
+ "directory": "packages/util/package-manifest"
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
+ "files": [
28
+ "lib/index.js",
29
+ "lib/types/**/*.d.ts"
30
+ ],
31
+ "license": "MIT",
32
+ "peerDependencies": {
33
+ "@qilin-agent/kylin": "~4.0.3"
34
+ },
35
+ "devDependencies": {
36
+ "@qilin-agent/kylin": "~4.0.3"
37
+ }
6
38
  }