@nextclaw/kernel 0.1.12 → 0.1.13
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/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/update-manifest.types-C0qPrjGQ.js +2 -0
- package/dist/update-manifest.types-C0qPrjGQ.js.map +1 -0
- package/dist/update-manifest.types-DLWDvs_v.d.ts +2 -1
- package/dist/update-manifest.types-DLWDvs_v.d.ts.map +1 -0
- package/package.json +15 -15
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-manifest.types-C0qPrjGQ.js","names":[],"sources":["../src/types/update-manifest.types.ts"],"sourcesContent":["export type UpdateHostKind = \"desktop-bundle\" | \"npm-runtime-bundle\";\n\nexport type UnsignedUpdateManifest = {\n channel: string;\n platform: string;\n arch: string;\n hostKind?: UpdateHostKind;\n latestVersion: string;\n minimumLauncherVersion: string;\n bundleUrl: string;\n bundleSha256: string;\n bundleSignature: string;\n releaseNotesUrl: string | null;\n};\n\nexport type UpdateManifest = UnsignedUpdateManifest & {\n manifestSignature: string;\n};\n\nfunction readRequiredString(record: Record<string, unknown>, key: string, context: string): string {\n const value = record[key];\n if (typeof value !== \"string\" || !value.trim()) {\n throw new Error(`${context} missing required string field: ${key}`);\n }\n return value.trim();\n}\n\nexport function getUnsignedUpdateManifest(manifest: UpdateManifest | UnsignedUpdateManifest): UnsignedUpdateManifest {\n return {\n channel: manifest.channel,\n platform: manifest.platform,\n arch: manifest.arch,\n hostKind: manifest.hostKind,\n latestVersion: manifest.latestVersion,\n minimumLauncherVersion: manifest.minimumLauncherVersion,\n bundleUrl: manifest.bundleUrl,\n bundleSha256: manifest.bundleSha256,\n bundleSignature: manifest.bundleSignature,\n releaseNotesUrl: manifest.releaseNotesUrl\n };\n}\n\nexport function serializeUnsignedUpdateManifest(manifest: UpdateManifest | UnsignedUpdateManifest): string {\n return JSON.stringify(getUnsignedUpdateManifest(manifest));\n}\n\nexport class UpdateManifestReader {\n parse = (input: unknown, context = \"update manifest\"): UpdateManifest => {\n if (!input || typeof input !== \"object\" || Array.isArray(input)) {\n throw new Error(`${context} must be an object`);\n }\n const record = input as Record<string, unknown>;\n const hostKind = typeof record.hostKind === \"string\" && record.hostKind.trim()\n ? this.readHostKind(record.hostKind.trim(), context)\n : undefined;\n const releaseNotesUrl =\n typeof record.releaseNotesUrl === \"string\" && record.releaseNotesUrl.trim() ? record.releaseNotesUrl.trim() : null;\n\n return {\n channel: readRequiredString(record, \"channel\", context),\n platform: readRequiredString(record, \"platform\", context),\n arch: readRequiredString(record, \"arch\", context),\n hostKind,\n latestVersion: readRequiredString(record, \"latestVersion\", context),\n minimumLauncherVersion: readRequiredString(record, \"minimumLauncherVersion\", context),\n bundleUrl: readRequiredString(record, \"bundleUrl\", context),\n bundleSha256: readRequiredString(record, \"bundleSha256\", context).toLowerCase(),\n bundleSignature: readRequiredString(record, \"bundleSignature\", context),\n releaseNotesUrl,\n manifestSignature: readRequiredString(record, \"manifestSignature\", context)\n };\n };\n\n private readHostKind = (value: string, context: string): UpdateHostKind => {\n if (value === \"desktop-bundle\" || value === \"npm-runtime-bundle\") {\n return value;\n }\n throw new Error(`${context} has unsupported hostKind: ${value}`);\n };\n}\n"],"mappings":";AAmBA,SAAS,mBAAmB,QAAiC,KAAa,SAAyB;CACjG,MAAM,QAAQ,OAAO;AACrB,KAAI,OAAO,UAAU,YAAY,CAAC,MAAM,MAAM,CAC5C,OAAM,IAAI,MAAM,GAAG,QAAQ,kCAAkC,MAAM;AAErE,QAAO,MAAM,MAAM;;AAGrB,SAAgB,0BAA0B,UAA2E;AACnH,QAAO;EACL,SAAS,SAAS;EAClB,UAAU,SAAS;EACnB,MAAM,SAAS;EACf,UAAU,SAAS;EACnB,eAAe,SAAS;EACxB,wBAAwB,SAAS;EACjC,WAAW,SAAS;EACpB,cAAc,SAAS;EACvB,iBAAiB,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ateSnapshot as d, UpdateStatus as f, UpdateManifestReader as i, UpdatePreferences as l, UpdateHostKind as n, serializeUnsignedUpdateManifest as o, UpdateManifest as r, InstallationKind as s, UnsignedUpdateManifest as t, UpdateProgress as u };
|
|
27
|
+
export { getUnsignedUpdateManifest as a, UpdateBlockReason as c, UpdateSnapshot as d, UpdateStatus as f, UpdateManifestReader as i, UpdatePreferences as l, UpdateHostKind as n, serializeUnsignedUpdateManifest as o, UpdateManifest as r, InstallationKind as s, UnsignedUpdateManifest as t, UpdateProgress as u };
|
|
28
|
+
//# sourceMappingURL=update-manifest.types-DLWDvs_v.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-manifest.types-DLWDvs_v.d.ts","names":[],"sources":["../src/types/update-manifest.types.ts"],"mappings":";;;KAAY,cAAA;AAAA,KAEA,sBAAA;EACV,OAAA;EACA,QAAA;EACA,IAAA;EACA,QAAA,GAAW,cAAA;EACX,aAAA;EACA,sBAAA;EACA,SAAA;EACA,YAAA;EACA,eAAA;EACA,eAAA;AAAA;AAAA,KAGU,cAAA,GAAiB,sBAAA;EAC3B,iBAAA;AAAA;AAAA,iBAWc,yBAAA,CAA0B,QAAA,EAAU,cAAA,GAAiB,sBAAA,GAAyB,sBAAA;AAAA,iBAe9E,+BAAA,CAAgC,QAAA,EAAU,cAAA,GAAiB,sBAAA;AAAA,cAI9D,oBAAA;EACX,KAAA,GAAS,KAAA,WAAgB,OAAA,cAA8B,cAAA;EAAA,QA0B/C,YAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextclaw/kernel",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "NextClaw product kernel skeleton for agents, tasks, sessions, context, tools, skills, providers, automation, and channels.",
|
|
6
6
|
"type": "module",
|
|
@@ -21,19 +21,19 @@
|
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"yaml": "^2.8.1",
|
|
24
|
-
"@nextclaw/channel-extension-feishu": "0.1.
|
|
25
|
-
"@nextclaw/channel-extension-weixin": "0.1.
|
|
26
|
-
"@nextclaw/core": "0.12.
|
|
27
|
-
"@nextclaw/mcp": "0.1.
|
|
28
|
-
"@nextclaw/ncp-agent-runtime": "0.3.
|
|
29
|
-
"@nextclaw/ncp-mcp": "0.1.
|
|
30
|
-
"@nextclaw/ncp-toolkit": "0.5.
|
|
31
|
-
"@nextclaw/nextclaw-ncp-runtime-
|
|
32
|
-
"@nextclaw/nextclaw-ncp-runtime-
|
|
33
|
-
"@nextclaw/openclaw-compat": "1.0.
|
|
34
|
-
"@nextclaw/runtime": "0.2.
|
|
35
|
-
"@nextclaw/shared": "0.1.
|
|
36
|
-
"@nextclaw/ncp": "0.5.
|
|
24
|
+
"@nextclaw/channel-extension-feishu": "0.1.7",
|
|
25
|
+
"@nextclaw/channel-extension-weixin": "0.1.10",
|
|
26
|
+
"@nextclaw/core": "0.12.23",
|
|
27
|
+
"@nextclaw/mcp": "0.1.88",
|
|
28
|
+
"@nextclaw/ncp-agent-runtime": "0.3.27",
|
|
29
|
+
"@nextclaw/ncp-mcp": "0.1.90",
|
|
30
|
+
"@nextclaw/ncp-toolkit": "0.5.21",
|
|
31
|
+
"@nextclaw/nextclaw-ncp-runtime-stdio-client": "0.1.16",
|
|
32
|
+
"@nextclaw/nextclaw-ncp-runtime-http-client": "0.1.15",
|
|
33
|
+
"@nextclaw/openclaw-compat": "1.0.23",
|
|
34
|
+
"@nextclaw/runtime": "0.2.55",
|
|
35
|
+
"@nextclaw/shared": "0.1.10",
|
|
36
|
+
"@nextclaw/ncp": "0.5.16"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/node": "^20.17.6",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"vitest": "^4.1.2"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
|
-
"build": "tsdown src/index.ts src/types/update-contract.types.ts --dts --clean --target es2022 --no-fixedExtension",
|
|
45
|
+
"build": "tsdown src/index.ts src/types/update-contract.types.ts --dts.sourcemap --clean --target es2022 --no-fixedExtension",
|
|
46
46
|
"lint": "eslint .",
|
|
47
47
|
"test": "vitest run",
|
|
48
48
|
"tsc": "tsc -p tsconfig.json"
|