@ai-gui/core 0.35.2 → 0.36.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/index.cjs CHANGED
@@ -1311,6 +1311,22 @@ var ActionRuntime = class {
1311
1311
  listActionTypes() {
1312
1312
  return this.destroyed ? [] : Object.freeze(this.registry.list().map((action) => action.type));
1313
1313
  }
1314
+ /**
1315
+ * The parameter schema of one action, and nothing else.
1316
+ *
1317
+ * A model asked to draw a form that calls an action has to know what the
1318
+ * action wants. Told only the name, it invents plausible parameter names —
1319
+ * `when` for a start time — and every dispatch is rejected before it reaches
1320
+ * the host. Prompt builders read this to describe the shape.
1321
+ *
1322
+ * Deliberately narrower than `registry.get`: a schema is a description, while
1323
+ * an ActionDefinition carries `run`, and handing that out is handing out the
1324
+ * side effect itself.
1325
+ */
1326
+ describeAction(type) {
1327
+ if (this.destroyed) return void 0;
1328
+ return this.registry.get(type)?.schema;
1329
+ }
1314
1330
  subscribe(listener) {
1315
1331
  if (this.destroyed) return () => {};
1316
1332
  this.listeners.add(listener);
package/dist/index.d.cts CHANGED
@@ -632,6 +632,19 @@ declare class ActionRuntime {
632
632
  hasAction(type: string): boolean;
633
633
  /** List registered action names without exposing executable definitions. */
634
634
  listActionTypes(): readonly string[];
635
+ /**
636
+ * The parameter schema of one action, and nothing else.
637
+ *
638
+ * A model asked to draw a form that calls an action has to know what the
639
+ * action wants. Told only the name, it invents plausible parameter names —
640
+ * `when` for a start time — and every dispatch is rejected before it reaches
641
+ * the host. Prompt builders read this to describe the shape.
642
+ *
643
+ * Deliberately narrower than `registry.get`: a schema is a description, while
644
+ * an ActionDefinition carries `run`, and handing that out is handing out the
645
+ * side effect itself.
646
+ */
647
+ describeAction(type: string): JSONSchema | undefined;
635
648
  subscribe(listener: ActionStateListener): () => void;
636
649
  subscribeDebug(listener: DebugEventListener): () => void;
637
650
  cancel(key: string): boolean;
package/dist/index.d.ts CHANGED
@@ -632,6 +632,19 @@ declare class ActionRuntime {
632
632
  hasAction(type: string): boolean;
633
633
  /** List registered action names without exposing executable definitions. */
634
634
  listActionTypes(): readonly string[];
635
+ /**
636
+ * The parameter schema of one action, and nothing else.
637
+ *
638
+ * A model asked to draw a form that calls an action has to know what the
639
+ * action wants. Told only the name, it invents plausible parameter names —
640
+ * `when` for a start time — and every dispatch is rejected before it reaches
641
+ * the host. Prompt builders read this to describe the shape.
642
+ *
643
+ * Deliberately narrower than `registry.get`: a schema is a description, while
644
+ * an ActionDefinition carries `run`, and handing that out is handing out the
645
+ * side effect itself.
646
+ */
647
+ describeAction(type: string): JSONSchema | undefined;
635
648
  subscribe(listener: ActionStateListener): () => void;
636
649
  subscribeDebug(listener: DebugEventListener): () => void;
637
650
  cancel(key: string): boolean;
package/dist/index.js CHANGED
@@ -1287,6 +1287,22 @@ var ActionRuntime = class {
1287
1287
  listActionTypes() {
1288
1288
  return this.destroyed ? [] : Object.freeze(this.registry.list().map((action) => action.type));
1289
1289
  }
1290
+ /**
1291
+ * The parameter schema of one action, and nothing else.
1292
+ *
1293
+ * A model asked to draw a form that calls an action has to know what the
1294
+ * action wants. Told only the name, it invents plausible parameter names —
1295
+ * `when` for a start time — and every dispatch is rejected before it reaches
1296
+ * the host. Prompt builders read this to describe the shape.
1297
+ *
1298
+ * Deliberately narrower than `registry.get`: a schema is a description, while
1299
+ * an ActionDefinition carries `run`, and handing that out is handing out the
1300
+ * side effect itself.
1301
+ */
1302
+ describeAction(type) {
1303
+ if (this.destroyed) return void 0;
1304
+ return this.registry.get(type)?.schema;
1305
+ }
1290
1306
  subscribe(listener) {
1291
1307
  if (this.destroyed) return () => {};
1292
1308
  this.listeners.add(listener);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-gui/core",
3
- "version": "0.35.2",
3
+ "version": "0.36.0",
4
4
  "description": "Headless streaming renderer core for LLM-generated UI — markdown/JSON repair, card registry, AST diff, plugin engine, sanitizer.",
5
5
  "keywords": [
6
6
  "llm",