@openclaw/plugin-inspector 0.3.20 → 0.3.21
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/CHANGELOG.md +9 -0
- package/package.json +1 -1
- package/src/openclaw-target.js +2 -2
- package/src/sdk-mock.js +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 0.3.21 - 2026-08-05
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Preserve record predicate and coercion contracts in generated SDK mocks so schema-aware plugin imports cannot recurse through primitive values.
|
|
10
|
+
- Read raw plugin manifest fields from packed OpenClaw declarations instead of runtime registry fields, avoiding false unknown-field warnings for supported metadata such as `uiHints`.
|
|
11
|
+
|
|
3
12
|
## 0.3.20 - 2026-07-31
|
|
4
13
|
|
|
5
14
|
### Added
|
package/package.json
CHANGED
package/src/openclaw-target.js
CHANGED
|
@@ -284,12 +284,12 @@ async function readPackedOpenClawTargetSurface({ rootDir, requestedPaths, reques
|
|
|
284
284
|
}))
|
|
285
285
|
.sort((left, right) => right.values.length - left.values.length)[0];
|
|
286
286
|
const hookDeclaration = declarations.find((declaration) => declaration.source.includes("type PluginHookName ="));
|
|
287
|
-
const manifestDeclaration = declarations.find((declaration) => declaration.source.includes("type
|
|
287
|
+
const manifestDeclaration = declarations.find((declaration) => declaration.source.includes("type PluginManifest ="));
|
|
288
288
|
const manifestContractDeclaration = declarations.find((declaration) => declaration.source.includes("type PluginManifestContracts ="));
|
|
289
289
|
const apiRegistrars = apiDeclaration?.values ?? [];
|
|
290
290
|
const hookNames = hookDeclaration ? parseStringUnion(hookDeclaration.source, "PluginHookName") : [];
|
|
291
291
|
const manifestFields = manifestDeclaration
|
|
292
|
-
? parseObjectTypeFields(manifestDeclaration.source, "
|
|
292
|
+
? parseObjectTypeFields(manifestDeclaration.source, "PluginManifest")
|
|
293
293
|
: [];
|
|
294
294
|
const manifestContractFields = manifestContractDeclaration
|
|
295
295
|
? parseObjectTypeFields(manifestContractDeclaration.source, "PluginManifestContracts")
|
package/src/sdk-mock.js
CHANGED
|
@@ -621,6 +621,21 @@ function isValidExportName(name) {
|
|
|
621
621
|
}
|
|
622
622
|
|
|
623
623
|
function genericExportStatement(name) {
|
|
624
|
+
if (name === "isRecord") {
|
|
625
|
+
return "export function isRecord(value) { return isPlainObject(value); }";
|
|
626
|
+
}
|
|
627
|
+
if (name === "asRecord") {
|
|
628
|
+
return 'export function asRecord(value) { return value !== null && typeof value === "object" ? value : {}; }';
|
|
629
|
+
}
|
|
630
|
+
if (name === "asOptionalRecord") {
|
|
631
|
+
return "export function asOptionalRecord(value) { return isPlainObject(value) ? value : undefined; }";
|
|
632
|
+
}
|
|
633
|
+
if (name === "asNullableRecord") {
|
|
634
|
+
return "export function asNullableRecord(value) { return isPlainObject(value) ? value : null; }";
|
|
635
|
+
}
|
|
636
|
+
if (name === "readStringField") {
|
|
637
|
+
return 'export function readStringField(record, key) { const value = record?.[key]; return typeof value === "string" ? value : undefined; }';
|
|
638
|
+
}
|
|
624
639
|
if (name === "z") {
|
|
625
640
|
return "export const z = createZNamespace();";
|
|
626
641
|
}
|