@ggui-ai/gadgets 0.6.3 → 0.8.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.
- package/dist/codegen.d.mts +8 -4
- package/dist/codegen.d.ts +8 -4
- package/dist/index.d.mts +7 -4
- package/dist/index.d.ts +7 -4
- package/package.json +2 -2
package/dist/codegen.d.mts
CHANGED
|
@@ -43,10 +43,14 @@ import { GadgetDescriptor } from '@ggui-ai/protocol';
|
|
|
43
43
|
*
|
|
44
44
|
* The helper:
|
|
45
45
|
* 1. Validates each descriptor against
|
|
46
|
-
* `registeredGadgetDescriptorSchema`
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
46
|
+
* `registeredGadgetDescriptorSchema` — strict validation PLUS the
|
|
47
|
+
* `typesUrl`-required refinement for non-stdlib gadgets. This
|
|
48
|
+
* build helper is that schema's one live consumer: it runs after
|
|
49
|
+
* the wrapper build has emitted the `.d.ts` and stamped
|
|
50
|
+
* `typesUrl` + `typesSri`, so requiring them is coherent HERE.
|
|
51
|
+
* (Catalog boundaries — registration writes, reads, generation —
|
|
52
|
+
* validate with `strictGadgetDescriptorSchema`, where `typesUrl`
|
|
53
|
+
* stays optional until the types-pipeline follow-up lands.)
|
|
50
54
|
* 2. Writes a JSON document `{ version: 'gg2', descriptors: [...] }`.
|
|
51
55
|
*/
|
|
52
56
|
interface WriteDescriptorJsonInput {
|
package/dist/codegen.d.ts
CHANGED
|
@@ -43,10 +43,14 @@ import { GadgetDescriptor } from '@ggui-ai/protocol';
|
|
|
43
43
|
*
|
|
44
44
|
* The helper:
|
|
45
45
|
* 1. Validates each descriptor against
|
|
46
|
-
* `registeredGadgetDescriptorSchema`
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
46
|
+
* `registeredGadgetDescriptorSchema` — strict validation PLUS the
|
|
47
|
+
* `typesUrl`-required refinement for non-stdlib gadgets. This
|
|
48
|
+
* build helper is that schema's one live consumer: it runs after
|
|
49
|
+
* the wrapper build has emitted the `.d.ts` and stamped
|
|
50
|
+
* `typesUrl` + `typesSri`, so requiring them is coherent HERE.
|
|
51
|
+
* (Catalog boundaries — registration writes, reads, generation —
|
|
52
|
+
* validate with `strictGadgetDescriptorSchema`, where `typesUrl`
|
|
53
|
+
* stays optional until the types-pipeline follow-up lands.)
|
|
50
54
|
* 2. Writes a JSON document `{ version: 'gg2', descriptors: [...] }`.
|
|
51
55
|
*/
|
|
52
56
|
interface WriteDescriptorJsonInput {
|
package/dist/index.d.mts
CHANGED
|
@@ -17,10 +17,13 @@ export { GadgetError, GadgetHook, GadgetStatus } from '@ggui-ai/protocol';
|
|
|
17
17
|
* `typesUrl`) must be full URLs — plus a non-function `hookImpl`
|
|
18
18
|
* check the schema can't see. Throws
|
|
19
19
|
* {@link WrapperConformanceError} with field-level paths on any
|
|
20
|
-
* violation. (`typesUrl` is
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
20
|
+
* violation. (`typesUrl` is optional here AND at every catalog
|
|
21
|
+
* boundary — the `strict` posture is the one live validator;
|
|
22
|
+
* generation degrades gracefully to no-types codegen when it is
|
|
23
|
+
* absent. The build helper `writeDescriptorJson` still requires
|
|
24
|
+
* it via `registeredGadgetDescriptorSchema`, since the wrapper
|
|
25
|
+
* build HAS just emitted a `.d.ts` — the front half of the
|
|
26
|
+
* types-pipeline follow-up.)
|
|
24
27
|
* 2. Returns the React hook function as the primary export, with
|
|
25
28
|
* the serializable {@link GadgetDescriptor} descriptor attached
|
|
26
29
|
* as `.descriptor`. Single export, dual purpose:
|
package/dist/index.d.ts
CHANGED
|
@@ -17,10 +17,13 @@ export { GadgetError, GadgetHook, GadgetStatus } from '@ggui-ai/protocol';
|
|
|
17
17
|
* `typesUrl`) must be full URLs — plus a non-function `hookImpl`
|
|
18
18
|
* check the schema can't see. Throws
|
|
19
19
|
* {@link WrapperConformanceError} with field-level paths on any
|
|
20
|
-
* violation. (`typesUrl` is
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
20
|
+
* violation. (`typesUrl` is optional here AND at every catalog
|
|
21
|
+
* boundary — the `strict` posture is the one live validator;
|
|
22
|
+
* generation degrades gracefully to no-types codegen when it is
|
|
23
|
+
* absent. The build helper `writeDescriptorJson` still requires
|
|
24
|
+
* it via `registeredGadgetDescriptorSchema`, since the wrapper
|
|
25
|
+
* build HAS just emitted a `.d.ts` — the front half of the
|
|
26
|
+
* types-pipeline follow-up.)
|
|
24
27
|
* 2. Returns the React hook function as the primary export, with
|
|
25
28
|
* the serializable {@link GadgetDescriptor} descriptor attached
|
|
26
29
|
* as `.descriptor`. Single export, dual purpose:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ggui-ai/gadgets",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"description": "Browser-capability gadget hooks for ggui — declared via DataContract.clientCapabilities.gadgets, mounted by the UI generator's component code.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"vitest": "^3.2.6"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@ggui-ai/protocol": "0.
|
|
63
|
+
"@ggui-ai/protocol": "0.8.0"
|
|
64
64
|
},
|
|
65
65
|
"engines": {
|
|
66
66
|
"node": ">=20.0.0"
|