@agentic-ui-experience/ui-runtime 0.0.1-beta.4 → 0.0.1-beta.5

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/README.md CHANGED
@@ -34,6 +34,8 @@ const runtime = createUIRuntime({
34
34
 
35
35
  `catalog` is required: the runtime uses it to recognize component names and to validate the props emitted by the agent against each component's own Zod schema. It is a single catalog, not a list — A2UI fixes a surface's catalog at `createSurface` time and never composes two catalogs into one component tree, so combine vocabularies with `defineCatalog({ extends })` instead. `normalizeMode` defaults to `"repair"`, which drops invalid components or messages and keeps as much valid content as possible; `"strict"` stops at the first error and exposes it through `onError` / `errors`.
36
36
 
37
+ Incoming messages accept only `v0.9.1`; legacy wire version `v0.9` is rejected. `protocolVersion` affects only client data-model messages generated by this runtime and supports only `v0.9.1`.
38
+
37
39
  ### `ingest()`
38
40
 
39
41
  Process one complete output:
@@ -135,6 +137,8 @@ const surface = {
135
137
 
136
138
  In short, a `SurfaceModel` represents one renderable UI region: `componentsModel` holds the component tree / component set, and `dataModel` holds the input state. The rendering layer usually consumes the whole `surface` object instead of assembling components by hand.
137
139
 
140
+ A `surfaceId` must be unique among active surfaces. A duplicate active `createSurface` is an error; once `deleteSurface` removes that surface, the ID may be reused.
141
+
138
142
  ### Action dispatch
139
143
 
140
144
  User interaction with a surface falls into two kinds; only the first triggers `onAction`:
@@ -1 +1 @@
1
- function _0x2dd0(_0x3a98af,_0xf232b1){_0x3a98af=_0x3a98af-0x7b;var _0x1e3cf6=_0x1e3c();var _0x2dd0da=_0x1e3cf6[_0x3a98af];return _0x2dd0da;}function _0x1e3c(){var _0xe61d6=['4626780cwPzSc','902450UQVatn','41279oYqngs','52190FHyEtu','5734476EBYRGR','885306cWXTPt','14NLdIFS','2111752MroboP','8BAahce'];_0x1e3c=function(){return _0xe61d6;};return _0x1e3c();}(function(_0x23c4bd,_0xba4d61){var _0x4c12f0=_0x2dd0,_0x811363=_0x23c4bd();while(!![]){try{var _0x29c863=parseInt(_0x4c12f0(0x7e))/0x1*(-parseInt(_0x4c12f0(0x81))/0x2)+parseInt(_0x4c12f0(0x80))/0x3+parseInt(_0x4c12f0(0x82))/0x4+-parseInt(_0x4c12f0(0x7c))/0x5+parseInt(_0x4c12f0(0x7b))/0x6+parseInt(_0x4c12f0(0x7d))/0x7*(parseInt(_0x4c12f0(0x83))/0x8)+-parseInt(_0x4c12f0(0x7f))/0x9;if(_0x29c863===_0xba4d61)break;else _0x811363['push'](_0x811363['shift']());}catch(_0x3d9253){_0x811363['push'](_0x811363['shift']());}}}(_0x1e3c,0x65d3b));export*from'@a2ui/web_core/v0_9/basic_catalog';
1
+ function _0x4e43(){var _0x52a0bc=['494886VsQUJW','12717lpiGjg','1640595qovxCE','1528275tGfFYc','12oosvPS','19129260eyVENh','4063352sHovIH','239154RoPmJt','4976txistD','3tOWqSO'];_0x4e43=function(){return _0x52a0bc;};return _0x4e43();}(function(_0x39c674,_0x368d74){var _0x14b023=_0x5392,_0x56ce1f=_0x39c674();while(!![]){try{var _0x5eee2b=-parseInt(_0x14b023(0xed))/0x1+-parseInt(_0x14b023(0xf0))/0x2*(-parseInt(_0x14b023(0xef))/0x3)+parseInt(_0x14b023(0xec))/0x4+-parseInt(_0x14b023(0xe8))/0x5*(-parseInt(_0x14b023(0xea))/0x6)+parseInt(_0x14b023(0xe9))/0x7+parseInt(_0x14b023(0xee))/0x8*(parseInt(_0x14b023(0xf1))/0x9)+-parseInt(_0x14b023(0xeb))/0xa;if(_0x5eee2b===_0x368d74)break;else _0x56ce1f['push'](_0x56ce1f['shift']());}catch(_0x3a433c){_0x56ce1f['push'](_0x56ce1f['shift']());}}}(_0x4e43,0xd318a));function _0x5392(_0x4f9e79,_0x2a7c1e){_0x4f9e79=_0x4f9e79-0xe8;var _0x4e4370=_0x4e43();var _0x539277=_0x4e4370[_0x4f9e79];return _0x539277;}export*from'@a2ui/web_core/v0_9/basic_catalog';
package/dist/catalog.js CHANGED
@@ -1 +1 @@
1
- function _0x17ca(_0x411431,_0x200fa8){_0x411431=_0x411431-0xde;const _0x13b561=_0x13b5();let _0x17cacb=_0x13b561[_0x411431];return _0x17cacb;}(function(_0x3c830e,_0x23542c){const _0x3a438d=_0x17ca,_0x5d5a5b=_0x3c830e();while(!![]){try{const _0x27bd59=-parseInt(_0x3a438d(0xe4))/0x1+parseInt(_0x3a438d(0xe7))/0x2*(-parseInt(_0x3a438d(0xdf))/0x3)+-parseInt(_0x3a438d(0xe3))/0x4+-parseInt(_0x3a438d(0xe0))/0x5*(parseInt(_0x3a438d(0xea))/0x6)+parseInt(_0x3a438d(0xe1))/0x7+-parseInt(_0x3a438d(0xde))/0x8*(parseInt(_0x3a438d(0xe6))/0x9)+parseInt(_0x3a438d(0xe5))/0xa;if(_0x27bd59===_0x23542c)break;else _0x5d5a5b['push'](_0x5d5a5b['shift']());}catch(_0x8ef816){_0x5d5a5b['push'](_0x5d5a5b['shift']());}}}(_0x13b5,0x28507));import{Catalog}from'@a2ui/web_core/v0_9';function _0x13b5(){const _0x26a3a7=['49112xAESAR','6113730tBNSmU','90sGVxfF','62DGNmnb','values','functions','6OIGczR','components','51896PuQZjo','23739YsUmtK','1225220MMYhqQ','2009112miBFYp','extends','515732GsuXmt'];_0x13b5=function(){return _0x26a3a7;};return _0x13b5();}import{BASIC_COMPONENTS,BASIC_FUNCTIONS}from'@a2ui/web_core/v0_9/basic_catalog';import{A2UI_BASIC_CATALOG_ID}from'@agentic-ui-experience/ui-core';function defineCatalog(_0x46eccb){const _0x4374c1=_0x17ca,_0x370008=_0x46eccb[_0x4374c1(0xe2)]??basicCatalog,_0x4f1281=_0x46eccb[_0x4374c1(0xeb)]??[],_0x3ecbe2=_0x46eccb['functions']??[];return new Catalog(_0x46eccb['id'],[..._0x370008['components'][_0x4374c1(0xe8)](),..._0x4f1281],[..._0x370008[_0x4374c1(0xe9)]['values'](),..._0x3ecbe2],_0x370008['themeSchema']);}const basicCatalog=new Catalog(A2UI_BASIC_CATALOG_ID,BASIC_COMPONENTS,BASIC_FUNCTIONS);export{basicCatalog,defineCatalog};
1
+ (function(_0x390f70,_0x4cf24c){const _0x434635=_0x40d9,_0x2e7963=_0x390f70();while(!![]){try{const _0xa244d2=parseInt(_0x434635(0x147))/0x1*(parseInt(_0x434635(0x140))/0x2)+parseInt(_0x434635(0x149))/0x3+-parseInt(_0x434635(0x146))/0x4*(-parseInt(_0x434635(0x14a))/0x5)+parseInt(_0x434635(0x145))/0x6+-parseInt(_0x434635(0x14b))/0x7*(parseInt(_0x434635(0x144))/0x8)+parseInt(_0x434635(0x142))/0x9*(-parseInt(_0x434635(0x14c))/0xa)+parseInt(_0x434635(0x143))/0xb;if(_0xa244d2===_0x4cf24c)break;else _0x2e7963['push'](_0x2e7963['shift']());}catch(_0xdb6837){_0x2e7963['push'](_0x2e7963['shift']());}}}(_0x2011,0x457b9));import{Catalog}from'@a2ui/web_core/v0_9';function _0x2011(){const _0x15b443=['16DsFwSF','565075EJayzE','components','933753yUvOmp','318335eCFqhh','455gcCvox','10nrUebw','2WZWyZU','values','4900113gjOeBr','1747592MkacVv','61896awiSIF','252582KcbJTD'];_0x2011=function(){return _0x15b443;};return _0x2011();}import{BASIC_COMPONENTS,BASIC_FUNCTIONS}from'@a2ui/web_core/v0_9/basic_catalog';import{A2UI_BASIC_CATALOG_ID}from'@agentic-ui-experience/ui-core';function defineCatalog(_0x44cdf1){const _0x453f67=_0x40d9,_0x488175=_0x44cdf1['extends']??basicCatalog,_0x122ca6=_0x44cdf1[_0x453f67(0x148)]??[],_0x342d29=_0x44cdf1['functions']??[];return new Catalog(_0x44cdf1['id'],[..._0x488175['components']['values'](),..._0x122ca6],[..._0x488175['functions'][_0x453f67(0x141)](),..._0x342d29],_0x488175['themeSchema']);}const basicCatalog=new Catalog(A2UI_BASIC_CATALOG_ID,BASIC_COMPONENTS,BASIC_FUNCTIONS);function _0x40d9(_0xc15f76,_0x597613){_0xc15f76=_0xc15f76-0x140;const _0x201102=_0x2011();let _0x40d9d5=_0x201102[_0xc15f76];return _0x40d9d5;}export{basicCatalog,defineCatalog};
@@ -1 +1 @@
1
- function _0x382e(){const _0x21595b=['382435SnqBrv','2239400heUwkR','1423224rRaPLC','261yQsuiC','2302336mJxXfG','issues','1107460NSQMTF','2FjTLSf','54nimKLR','accessibility','success','unknown\x20component\x20\x22','32696wJpgxW','5520305oooyLf','components','path','message','safeParse'];_0x382e=function(){return _0x21595b;};return _0x382e();}(function(_0x9e75e3,_0x20b56d){const _0x5db89f=_0x5896,_0x3e2fa6=_0x9e75e3();while(!![]){try{const _0xe46225=-parseInt(_0x5db89f(0xa1))/0x1*(-parseInt(_0x5db89f(0xa6))/0x2)+-parseInt(_0x5db89f(0xae))/0x3+-parseInt(_0x5db89f(0xb0))/0x4+parseInt(_0x5db89f(0xac))/0x5*(-parseInt(_0x5db89f(0xa2))/0x6)+-parseInt(_0x5db89f(0xa7))/0x7+-parseInt(_0x5db89f(0xad))/0x8+parseInt(_0x5db89f(0xaf))/0x9*(parseInt(_0x5db89f(0xb2))/0xa);if(_0xe46225===_0x20b56d)break;else _0x3e2fa6['push'](_0x3e2fa6['shift']());}catch(_0x3d7cc4){_0x3e2fa6['push'](_0x3e2fa6['shift']());}}}(_0x382e,0x6aca7));function _0x5896(_0x26f685,_0x3c783e){_0x26f685=_0x26f685-0xa1;const _0x382ec8=_0x382e();let _0x58967c=_0x382ec8[_0x26f685];return _0x58967c;}function createCatalogComponentValidator(_0x2458c1){const _0x38c193=_0x5896,_0x195d90=new Map();for(const [_0x2d8e5d,_0x317e9f]of _0x2458c1[_0x38c193(0xa8)]){_0x195d90['set'](_0x2d8e5d,_0x317e9f['schema']);}return(_0x1ae736,_0x261b91)=>{const _0x31790e=_0x38c193,_0x49a10d=_0x195d90['get'](_0x1ae736);if(!_0x49a10d)return[_0x31790e(0xa5)+_0x1ae736+'\x22'];const _0x59637a={..._0x261b91};delete _0x59637a['id'],delete _0x59637a['component'],delete _0x59637a[_0x31790e(0xa3)],delete _0x59637a['weight'];const _0x5f5473=_0x49a10d[_0x31790e(0xab)](_0x59637a);if(_0x5f5473[_0x31790e(0xa4)])return[];return _0x5f5473['error'][_0x31790e(0xb1)]['map'](_0x32c652=>{const _0x9eaa11=_0x31790e,_0x5d603a=_0x32c652[_0x9eaa11(0xa9)]['join']('.');return _0x5d603a?_0x5d603a+':\x20'+_0x32c652['message']:_0x32c652[_0x9eaa11(0xaa)];});};}export{createCatalogComponentValidator};
1
+ (function(_0xee7e9e,_0x56d4cd){const _0xb4ff24=_0x5eaf,_0x11cf3c=_0xee7e9e();while(!![]){try{const _0x3968f6=parseInt(_0xb4ff24(0x1a1))/0x1*(-parseInt(_0xb4ff24(0x1a0))/0x2)+-parseInt(_0xb4ff24(0x1b1))/0x3+-parseInt(_0xb4ff24(0x1ac))/0x4*(-parseInt(_0xb4ff24(0x1ae))/0x5)+parseInt(_0xb4ff24(0x1ad))/0x6*(parseInt(_0xb4ff24(0x1a7))/0x7)+parseInt(_0xb4ff24(0x1a5))/0x8*(parseInt(_0xb4ff24(0x1aa))/0x9)+-parseInt(_0xb4ff24(0x1a4))/0xa*(parseInt(_0xb4ff24(0x1a6))/0xb)+-parseInt(_0xb4ff24(0x1af))/0xc;if(_0x3968f6===_0x56d4cd)break;else _0x11cf3c['push'](_0x11cf3c['shift']());}catch(_0x184430){_0x11cf3c['push'](_0x11cf3c['shift']());}}}(_0x5433,0x90eb2));function _0x5433(){const _0x17ecf3=['accessibility','join','4221CNKent','message','4AeYSkM','110094kkNVuV','5252870OqYnLo','5517648URFupi','safeParse','1511349PidYET','weight','error','components','122308tnxJJq','1JBLxkZ','success','unknown\x20component\x20\x22','470EkjTWV','11288lVgKgE','95007gbfIBN','119ygQKhi'];_0x5433=function(){return _0x17ecf3;};return _0x5433();}function _0x5eaf(_0x437604,_0x6f33f5){_0x437604=_0x437604-0x19f;const _0x5433e1=_0x5433();let _0x5eafc4=_0x5433e1[_0x437604];return _0x5eafc4;}function createCatalogComponentValidator(_0x3c7a41){const _0x496335=_0x5eaf,_0x2c240f=new Map();for(const [_0x2f2f27,_0xfd40c]of _0x3c7a41[_0x496335(0x19f)]){_0x2c240f['set'](_0x2f2f27,_0xfd40c['schema']);}return(_0x41a7f5,_0x3b9fe0)=>{const _0x5e69ce=_0x496335,_0x3b5826=_0x2c240f['get'](_0x41a7f5);if(!_0x3b5826)return[_0x5e69ce(0x1a3)+_0x41a7f5+'\x22'];const _0x2e4649={..._0x3b9fe0};delete _0x2e4649['id'],delete _0x2e4649['component'],delete _0x2e4649[_0x5e69ce(0x1a8)],delete _0x2e4649[_0x5e69ce(0x1b2)];const _0x22f71e=_0x3b5826[_0x5e69ce(0x1b0)](_0x2e4649);if(_0x22f71e[_0x5e69ce(0x1a2)])return[];return _0x22f71e[_0x5e69ce(0x1b3)]['issues']['map'](_0x9b37b2=>{const _0x42dbaf=_0x5e69ce,_0x3eeadb=_0x9b37b2['path'][_0x42dbaf(0x1a9)]('.');return _0x3eeadb?_0x3eeadb+':\x20'+_0x9b37b2['message']:_0x9b37b2[_0x42dbaf(0x1ab)];});};}export{createCatalogComponentValidator};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- (function(_0x1eeb5e,_0x2b0403){var _0x2cfefd=_0x3320,_0x95b23f=_0x1eeb5e();while(!![]){try{var _0x1a90e7=-parseInt(_0x2cfefd(0xe0))/0x1+parseInt(_0x2cfefd(0xe4))/0x2+parseInt(_0x2cfefd(0xdf))/0x3+parseInt(_0x2cfefd(0xe5))/0x4*(parseInt(_0x2cfefd(0xe7))/0x5)+-parseInt(_0x2cfefd(0xe2))/0x6+parseInt(_0x2cfefd(0xe1))/0x7+-parseInt(_0x2cfefd(0xe6))/0x8*(-parseInt(_0x2cfefd(0xe3))/0x9);if(_0x1a90e7===_0x2b0403)break;else _0x95b23f['push'](_0x95b23f['shift']());}catch(_0x3a3d6a){_0x95b23f['push'](_0x95b23f['shift']());}}}(_0x28ef,0xe7655));import{basicCatalog,defineCatalog}from'./catalog.js';import{createUIRuntime}from'./runtime.js';import{createCatalogComponentValidator}from'./component-validator.js';import{ActionSchema,Catalog,CheckableSchema,CommonSchemas,DataBindingSchema,DynamicBooleanSchema,DynamicNumberSchema,DynamicStringListSchema,DynamicStringSchema,DynamicValueSchema,FunctionCallSchema}from'@a2ui/web_core/v0_9';function _0x3320(_0xc037d6,_0x4bba7a){_0xc037d6=_0xc037d6-0xdf;var _0x28ef1f=_0x28ef();var _0x33206d=_0x28ef1f[_0xc037d6];return _0x33206d;}import{z}from'zod/v3';function _0x28ef(){var _0x3e36a1=['1949478VHXUfL','1793509adQWbb','6181147wsxrZR','6531702bBkjYO','225bPZwbG','312354fMrwDK','60988JuxEEm','236216ZFdfJf','460xjhzdv'];_0x28ef=function(){return _0x3e36a1;};return _0x28ef();}export{ActionSchema,Catalog,CheckableSchema,CommonSchemas,DataBindingSchema,DynamicBooleanSchema,DynamicNumberSchema,DynamicStringListSchema,DynamicStringSchema,DynamicValueSchema,FunctionCallSchema,basicCatalog,createCatalogComponentValidator,createUIRuntime,defineCatalog,z};
1
+ function _0x5524(_0x423259,_0x3d84c9){_0x423259=_0x423259-0x1ce;var _0x10bcee=_0x10bc();var _0x55242d=_0x10bcee[_0x423259];return _0x55242d;}(function(_0x32c4bd,_0x31b14f){var _0x1db386=_0x5524,_0x567906=_0x32c4bd();while(!![]){try{var _0x1c5c7c=-parseInt(_0x1db386(0x1ce))/0x1+parseInt(_0x1db386(0x1d5))/0x2*(-parseInt(_0x1db386(0x1d3))/0x3)+-parseInt(_0x1db386(0x1d1))/0x4+-parseInt(_0x1db386(0x1d4))/0x5*(parseInt(_0x1db386(0x1cf))/0x6)+-parseInt(_0x1db386(0x1d0))/0x7*(parseInt(_0x1db386(0x1d7))/0x8)+-parseInt(_0x1db386(0x1d8))/0x9+-parseInt(_0x1db386(0x1d2))/0xa*(-parseInt(_0x1db386(0x1d6))/0xb);if(_0x1c5c7c===_0x31b14f)break;else _0x567906['push'](_0x567906['shift']());}catch(_0x14c0f7){_0x567906['push'](_0x567906['shift']());}}}(_0x10bc,0xe935f));import{basicCatalog,defineCatalog}from'./catalog.js';import{createUIRuntime}from'./runtime.js';import{createCatalogComponentValidator}from'./component-validator.js';function _0x10bc(){var _0x257ffd=['676844BRCeKt','10oVcTWO','27TXqNBe','6927535gfVOvV','67910gAwoPs','63827005KKmcWp','24QoAleF','4454937AAGoWY','945235GzLzts','6DzDTku','3608927ajGcYN'];_0x10bc=function(){return _0x257ffd;};return _0x10bc();}import{ActionSchema,Catalog,CheckableSchema,CommonSchemas,DataBindingSchema,DynamicBooleanSchema,DynamicNumberSchema,DynamicStringListSchema,DynamicStringSchema,DynamicValueSchema,FunctionCallSchema}from'@a2ui/web_core/v0_9';import{z}from'zod/v3';export{ActionSchema,Catalog,CheckableSchema,CommonSchemas,DataBindingSchema,DynamicBooleanSchema,DynamicNumberSchema,DynamicStringListSchema,DynamicStringSchema,DynamicValueSchema,FunctionCallSchema,basicCatalog,createCatalogComponentValidator,createUIRuntime,defineCatalog,z};
package/dist/runtime.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { type CapabilitiesOptions, type Catalog, type ComponentApi, type SurfaceModel } from "@a2ui/web_core/v0_9";
2
- import type { A2uiClientAction, A2uiClientCapabilities, A2uiClientDataModel } from "@a2ui/web_core/v0_9";
3
- import { type NormalizeUIResponseOptions } from "@agentic-ui-experience/ui-core";
2
+ import type { A2uiClientAction, A2uiClientCapabilities } from "@a2ui/web_core/v0_9";
3
+ import { type A2UIProtocolVersion, type NormalizeUIResponseOptions, type SpecA2UIClientDataModel } from "@agentic-ui-experience/ui-core";
4
4
  export type UIRuntimeCatalog<TComp extends ComponentApi = ComponentApi> = Catalog<TComp>;
5
5
  export type UIRuntimeSurface<TComp extends ComponentApi = ComponentApi> = SurfaceModel<TComp>;
6
6
  export type UIAction = A2uiClientAction;
@@ -18,6 +18,11 @@ export interface UIRuntimeOptions<TComp extends ComponentApi = ComponentApi> {
18
18
  */
19
19
  catalog: UIRuntimeCatalog<TComp>;
20
20
  normalizeMode?: NormalizeUIResponseOptions["mode"];
21
+ /**
22
+ * Version used only for client data-model messages generated by this runtime.
23
+ * Incoming server messages always accept every supported protocol version.
24
+ */
25
+ protocolVersion?: A2UIProtocolVersion;
21
26
  onAction?: (action: UIAction) => void;
22
27
  onError?: (error: UIRuntimeError) => void;
23
28
  }
@@ -66,6 +71,6 @@ export interface UIRuntime<TComp extends ComponentApi = ComponentApi> {
66
71
  getState(): UIRuntimeState<TComp>;
67
72
  subscribe(listener: () => void): () => void;
68
73
  getClientCapabilities(options?: CapabilitiesOptions): A2uiClientCapabilities;
69
- getClientDataModel(): A2uiClientDataModel | undefined;
74
+ getClientDataModel(): SpecA2UIClientDataModel | undefined;
70
75
  }
71
76
  export declare function createUIRuntime<TComp extends ComponentApi = ComponentApi>(options: UIRuntimeOptions<TComp>): UIRuntime<TComp>;
package/dist/runtime.js CHANGED
@@ -1 +1 @@
1
- function _0x5bbe(){const _0x343fd8=['obj','318992rhXLmA','UI\x20runtime\x20mutations\x20are\x20not\x20allowed\x20inside\x20a\x20transaction\x20commit\x20callback.','clear','visibleText','deleteSurface','code','dispose','onSurfaceDeleted','processMessages','onSurfaceCreated','22PTxkHP','130PFSLvc','dataModel','add','length','assistantText','3205404Ejjyvi','delete','nextIdx','getClientDataModel','catalog','a2uiInner','model','properties','133OzEXAF','values','surfacesMap','entries','slice','72244IzhKaJ','test','13107186NWODIE','773795RxocQr','subscribe','165CetYDA','message','3010630KGyFrU','keys','startsWith','uiMessages','componentsModel','repair','v0.9','unsubscribe','19583FHgXcg','54KlOZoc','map'];_0x5bbe=function(){return _0x343fd8;};return _0x5bbe();}(function(_0x59d65f,_0x58b0b8){const _0x195f5b=_0x2056,_0x12538b=_0x59d65f();while(!![]){try{const _0xe773c2=parseInt(_0x195f5b(0x1f7))/0x1*(parseInt(_0x195f5b(0x206))/0x2)+-parseInt(_0x195f5b(0x1ed))/0x3*(-parseInt(_0x195f5b(0x1e8))/0x4)+parseInt(_0x195f5b(0x1eb))/0x5*(-parseInt(_0x195f5b(0x1f8))/0x6)+-parseInt(_0x195f5b(0x1e3))/0x7*(parseInt(_0x195f5b(0x1fb))/0x8)+parseInt(_0x195f5b(0x1ea))/0x9+-parseInt(_0x195f5b(0x1ef))/0xa+-parseInt(_0x195f5b(0x205))/0xb*(parseInt(_0x195f5b(0x20b))/0xc);if(_0xe773c2===_0x58b0b8)break;else _0x12538b['push'](_0x12538b['shift']());}catch(_0x543ac8){_0x12538b['push'](_0x12538b['shift']());}}}(_0x5bbe,0xb3e66));import{MessageProcessor}from'@a2ui/web_core/v0_9';function _0x2056(_0x52677d,_0x537eb7){_0x52677d=_0x52677d-0x1e1;const _0x5bbee6=_0x5bbe();let _0x20563b=_0x5bbee6[_0x52677d];return _0x20563b;}import{splitUIEnvelope,normalizeUIResponse,toSDKCompatibleA2UIMessage}from'@agentic-ui-experience/ui-core';import{createCatalogComponentValidator}from'./component-validator.js';function scanNextTopLevelObject(_0x35d3c3,_0x1bba4c){const _0x5d1f95=_0x2056;let _0x40e0f0=_0x1bba4c;while(_0x40e0f0<_0x35d3c3[_0x5d1f95(0x209)]&&/\s/[_0x5d1f95(0x1e9)](_0x35d3c3[_0x40e0f0]))_0x40e0f0++;while(_0x40e0f0<_0x35d3c3[_0x5d1f95(0x209)]&&(_0x35d3c3[_0x40e0f0]==='['||_0x35d3c3[_0x40e0f0]===',')){_0x40e0f0++;while(_0x40e0f0<_0x35d3c3[_0x5d1f95(0x209)]&&/\s/['test'](_0x35d3c3[_0x40e0f0]))_0x40e0f0++;}if(_0x40e0f0>=_0x35d3c3['length']||_0x35d3c3[_0x40e0f0]!=='{')return null;let _0x2c1884=0x0,_0x57c15f=![],_0x1d312e=![];const _0x40e35d=_0x40e0f0;for(;_0x40e0f0<_0x35d3c3['length'];_0x40e0f0++){const _0x188afb=_0x35d3c3[_0x40e0f0];if(_0x57c15f){if(_0x1d312e){_0x1d312e=![];continue;}if(_0x188afb==='\x5c'){_0x1d312e=!![];continue;}_0x188afb==='\x22'&&(_0x57c15f=![]);continue;}if(_0x188afb==='\x22'){_0x57c15f=!![];continue;}if(_0x188afb==='{')_0x2c1884++;else{if(_0x188afb==='}'){_0x2c1884--;if(_0x2c1884===0x0)return{'obj':_0x35d3c3['slice'](_0x40e35d,_0x40e0f0+0x1),'nextIdx':_0x40e0f0+0x1};}}}return null;}function createUIRuntime(_0xa1c68d){const _0x32243d=_0x2056,_0x47faae=_0xa1c68d['catalog'],_0x5d129d=_0xa1c68d['normalizeMode']??_0x32243d(0x1f4),_0x513541=createCatalogComponentValidator(_0x47faae),_0x304d02=new Set();let _0x1a743f;const _0x53a4f2=[],_0x4da545=new Map();let _0xcc6a92=![],_0x3b74f2='',_0x1bed05=0x0,_0x53903d=0x0,_0x335b37=![];const _0x545125=()=>{_0x3b74f2='',_0x1bed05=0x0,_0x53903d=0x0,_0x335b37=![];},_0x20ba3e=()=>new MessageProcessor([_0x47faae],_0x30a554=>{_0xa1c68d['onAction']?.(_0x30a554);});let _0xe27946=_0x20ba3e(),_0x4ef4c6=null,_0x4596ec=![];const _0xd19272=()=>{_0x4ef4c6=null;for(const _0x11612c of _0x304d02)_0x11612c();},_0x452095=_0xd9ce90=>{_0x53a4f2['push'](_0xd9ce90),_0xa1c68d['onError']?.(_0xd9ce90);},_0x380a5e=_0x39f84d=>{const _0x5cf8be=_0x32243d;_0x4da545['get'](_0x39f84d['id'])?.['unsubscribe']();const _0x2509c2=_0x39f84d['onError'][_0x5cf8be(0x1ec)](_0x486c1b=>{const _0x668c89=_0x5cf8be,_0x329816=_0x486c1b??{};_0x452095({'surfaceId':_0x39f84d['id'],..._0x329816[_0x668c89(0x200)]!==void 0x0?{'code':_0x329816['code']}:{},'message':_0x329816[_0x668c89(0x1ee)]??'A2UI\x20surface\x20error'}),_0xd19272();});_0x4da545['set'](_0x39f84d['id'],_0x2509c2);};let _0x118b1f,_0xc1cb3a;const _0x3a6547=_0x3aa493=>{const _0x34fbf8=_0x32243d;_0x118b1f=_0x3aa493[_0x34fbf8(0x204)](_0x383757=>{_0x380a5e(_0x383757),_0xd19272();}),_0xc1cb3a=_0x3aa493[_0x34fbf8(0x202)](_0x103df3=>{_0x4da545['get'](_0x103df3)?.['unsubscribe'](),_0x4da545['delete'](_0x103df3),_0xd19272();});for(const _0x417914 of _0x3aa493[_0x34fbf8(0x1e1)][_0x34fbf8(0x1e5)][_0x34fbf8(0x1e4)]()){_0x380a5e(_0x417914);}},_0x2228b8=()=>{const _0x4e04d1=_0x32243d;_0x118b1f['unsubscribe'](),_0xc1cb3a[_0x4e04d1(0x1f6)]();for(const _0x1a0ca8 of _0x4da545[_0x4e04d1(0x1e4)]())_0x1a0ca8[_0x4e04d1(0x1f6)]();_0x4da545[_0x4e04d1(0x1fd)]();};_0x3a6547(_0xe27946);const _0x3abf6a=_0x400331=>Array['from'](_0x400331['model']['surfacesMap'][_0x32243d(0x1e4)]())['flatMap'](_0x3a51d5=>{const _0x3b43cb=_0x32243d,_0x2f5c97=[..._0x3a51d5[_0x3b43cb(0x1f3)][_0x3b43cb(0x1e6)]][_0x3b43cb(0x1f9)](([_0x60e003,_0x5e8175])=>({'id':_0x60e003,'component':_0x5e8175['type'],...structuredClone(_0x5e8175[_0x3b43cb(0x1e2)])})),_0xe847a9=_0x3a51d5[_0x3b43cb(0x207)]['get']('/');return[{'version':'v0.9','createSurface':{'surfaceId':_0x3a51d5['id'],'catalogId':_0x3a51d5[_0x3b43cb(0x20f)]['id'],'theme':structuredClone(_0x3a51d5['theme']),'sendDataModel':_0x3a51d5['sendDataModel']}},..._0x2f5c97[_0x3b43cb(0x209)]>0x0?[{'version':_0x3b43cb(0x1f5),'updateComponents':{'surfaceId':_0x3a51d5['id'],'components':_0x2f5c97}}]:[],..._0xe847a9===void 0x0?[]:[{'version':_0x3b43cb(0x1f5),'updateDataModel':{'surfaceId':_0x3a51d5['id'],'path':'/','value':structuredClone(_0xe847a9)}}]];}),_0x46bfe8=()=>{const _0x40369=_0x32243d;if(_0x4596ec)throw new Error(_0x40369(0x1fc));},_0x246a5c=()=>{const _0x1f64ef=_0x32243d;if(_0x4ef4c6!==null)return _0x4ef4c6;const _0x2d8680=Array['from'](_0xe27946['model'][_0x1f64ef(0x1e5)]['values']());return _0x4ef4c6=_0x1a743f===void 0x0?{'surfaces':_0x2d8680,'errors':[..._0x53a4f2]}:{'surfaces':_0x2d8680,'assistantText':_0x1a743f,'errors':[..._0x53a4f2]},_0x4ef4c6;},_0x586a5e=_0x30ecf5=>{const _0x43ed99=_0x32243d;if(_0xcc6a92)return;_0x46bfe8();let _0x14ef2a=![];try{const _0x5a5eb3=normalizeUIResponse(_0x30ecf5,{'mode':_0x5d129d,'validateComponent':_0x513541});_0x5a5eb3['assistantText']!==void 0x0&&(_0x1a743f=_0x5a5eb3[_0x43ed99(0x20a)],_0x14ef2a=!![]);if(_0x5a5eb3['uiMessages'][_0x43ed99(0x209)]>0x0){const _0x2d2187=_0x5a5eb3['uiMessages'][_0x43ed99(0x1f9)](toSDKCompatibleA2UIMessage);_0xe27946['processMessages'](_0x2d2187),_0x14ef2a=!![];}}catch(_0x1f6790){_0x452095({'message':_0x1f6790 instanceof Error?_0x1f6790[_0x43ed99(0x1ee)]:String(_0x1f6790)}),_0x14ef2a=!![];}if(_0x14ef2a)_0xd19272();},_0x468458=(_0x3c2447,_0x3fc7d5)=>{const _0x263039=_0x32243d;if(_0xcc6a92)return![];_0x46bfe8();let _0x5313a6;try{_0x5313a6=normalizeUIResponse(_0x3c2447,{'mode':_0x5d129d,'validateComponent':_0x513541});}catch(_0x37e76e){return _0x452095({'message':_0x37e76e instanceof Error?_0x37e76e[_0x263039(0x1ee)]:String(_0x37e76e)}),_0xd19272(),![];}if(_0x5313a6['uiMessages']['length']===0x0)return![];const _0x7dda=_0xe27946,_0x36a19b=_0x1a743f,_0x4c3e60=_0x4ef4c6,_0x9e0723=_0x20ba3e();try{const _0x5e3e39=_0x3abf6a(_0x7dda);_0x5e3e39[_0x263039(0x209)]>0x0&&_0x9e0723[_0x263039(0x203)](_0x5e3e39);const _0xbc4b04=_0x5313a6[_0x263039(0x1f2)][_0x263039(0x1f9)](toSDKCompatibleA2UIMessage);_0x9e0723[_0x263039(0x203)](_0xbc4b04);}catch(_0x25f6cb){return _0x9e0723[_0x263039(0x1e1)][_0x263039(0x201)](),_0x452095({'message':_0x25f6cb instanceof Error?_0x25f6cb[_0x263039(0x1ee)]:String(_0x25f6cb)}),_0xd19272(),![];}_0xe27946=_0x9e0723;_0x5313a6[_0x263039(0x20a)]!==void 0x0&&(_0x1a743f=_0x5313a6[_0x263039(0x20a)]);_0x4ef4c6=null,_0x4596ec=!![];try{_0x3fc7d5?.();}catch(_0x1b27f6){return _0xe27946=_0x7dda,_0x1a743f=_0x36a19b,_0x4ef4c6=_0x4c3e60,_0x9e0723[_0x263039(0x1e1)]['dispose'](),![];}finally{_0x4596ec=![];}return _0x2228b8(),_0x3a6547(_0x9e0723),_0x7dda[_0x263039(0x1e1)][_0x263039(0x201)](),_0x4ef4c6=null,_0xd19272(),!![];},_0xe8c9d2=_0x539df1=>{const _0x23cdfd=_0x32243d;if(_0xcc6a92)return;_0x46bfe8();!_0x539df1[_0x23cdfd(0x1f1)](_0x3b74f2)&&_0x545125();let _0x5327fb=![];const _0x4409e2=splitUIEnvelope(_0x539df1);_0x1a743f!==_0x4409e2[_0x23cdfd(0x1fe)]&&(_0x1a743f=_0x4409e2[_0x23cdfd(0x1fe)],_0x5327fb=!![]);if(_0x4409e2[_0x23cdfd(0x210)]!==null&&!_0x335b37)while(!![]){const _0x519468=scanNextTopLevelObject(_0x4409e2[_0x23cdfd(0x210)],_0x1bed05);if(!_0x519468)break;try{const _0xb9a886=JSON['parse'](_0x519468[_0x23cdfd(0x1fa)]),_0x30a654=normalizeUIResponse([_0xb9a886],{'mode':_0x5d129d,'validateComponent':_0x513541});if(_0x30a654[_0x23cdfd(0x1f2)][_0x23cdfd(0x209)]>0x0){const _0x5e3de9=_0x30a654[_0x23cdfd(0x1f2)]['map'](toSDKCompatibleA2UIMessage);_0xe27946['processMessages'](_0x5e3de9),_0x53903d+=_0x30a654[_0x23cdfd(0x1f2)][_0x23cdfd(0x209)],_0x5327fb=!![];}}catch{_0x335b37=!![];break;}_0x1bed05=_0x519468[_0x23cdfd(0x20d)];}_0x3b74f2=_0x539df1;if(_0x5327fb)_0xd19272();},_0x5502e4=()=>{const _0xce97a6=_0x32243d;if(_0xcc6a92)return;_0x46bfe8();const _0x1a1c70=_0x3b74f2;if(_0x1a1c70[_0xce97a6(0x209)]===0x0&&!_0x335b37)return;const _0x4679cb=splitUIEnvelope(_0x1a1c70);let _0x1b9a82=![];_0x1a743f!==_0x4679cb[_0xce97a6(0x1fe)]&&(_0x1a743f=_0x4679cb[_0xce97a6(0x1fe)],_0x1b9a82=!![]);const _0x298023=_0x335b37||!_0x4679cb['closed'];if(_0x298023&&_0x1a1c70[_0xce97a6(0x209)]>0x0)try{const _0x1510dc=normalizeUIResponse(_0x1a1c70,{'mode':_0x5d129d,'validateComponent':_0x513541}),_0x572eb1=_0x1510dc[_0xce97a6(0x1f2)][_0xce97a6(0x1e7)](_0x53903d);if(_0x572eb1['length']>0x0){const _0x442528=_0x572eb1['map'](toSDKCompatibleA2UIMessage);_0xe27946['processMessages'](_0x442528),_0x53903d+=_0x572eb1['length'],_0x1b9a82=!![];}}catch(_0x51fcbf){_0x452095({'message':_0x51fcbf instanceof Error?_0x51fcbf['message']:String(_0x51fcbf)}),_0x1b9a82=!![];}_0x545125();if(_0x1b9a82)_0xd19272();},_0x505f38=()=>{const _0x4634f8=_0x32243d;if(_0xcc6a92)return;_0x46bfe8();const _0x4ce3cc=Array['from'](_0xe27946['model']['surfacesMap'][_0x4634f8(0x1f0)]());for(const _0x507c64 of _0x4ce3cc){_0xe27946[_0x4634f8(0x1e1)][_0x4634f8(0x1ff)](_0x507c64);}_0x1a743f=void 0x0,_0x53a4f2['length']=0x0,_0x545125(),_0xd19272();},_0x3beed0=()=>{if(_0xcc6a92)return;_0x46bfe8(),_0xcc6a92=!![],_0x2228b8(),_0xe27946['model']['dispose'](),_0x304d02['clear']();},_0x1a485a=_0x38eeb3=>{const _0x22bf39=_0x32243d;if(_0xcc6a92)return()=>{};return _0x304d02[_0x22bf39(0x208)](_0x38eeb3),()=>{const _0x3b8596=_0x22bf39;_0x304d02[_0x3b8596(0x20c)](_0x38eeb3);};},_0x59554a=()=>{if(_0xcc6a92)return;_0x46bfe8();if(_0x53a4f2['length']===0x0)return;_0x53a4f2['length']=0x0,_0xd19272();};return{'ingest':_0x586a5e,'ingestTransaction':_0x468458,'ingestStreaming':_0xe8c9d2,'endStream':_0x5502e4,'reset':_0x505f38,'clearErrors':_0x59554a,'dispose':_0x3beed0,'getState':_0x246a5c,'subscribe':_0x1a485a,'getClientCapabilities':_0x300459=>_0xe27946['getClientCapabilities'](_0x300459),'getClientDataModel':()=>_0xe27946[_0x32243d(0x20e)]()};}export{createUIRuntime};
1
+ (function(_0x270ed2,_0x4c861b){const _0x2c896a=_0x1f03,_0x3741f7=_0x270ed2();while(!![]){try{const _0x329022=parseInt(_0x2c896a(0xcf))/0x1*(-parseInt(_0x2c896a(0xb7))/0x2)+parseInt(_0x2c896a(0xc0))/0x3+-parseInt(_0x2c896a(0xc6))/0x4*(parseInt(_0x2c896a(0xad))/0x5)+parseInt(_0x2c896a(0xb2))/0x6+parseInt(_0x2c896a(0xd5))/0x7+-parseInt(_0x2c896a(0xcb))/0x8+parseInt(_0x2c896a(0xbb))/0x9*(parseInt(_0x2c896a(0xb0))/0xa);if(_0x329022===_0x4c861b)break;else _0x3741f7['push'](_0x3741f7['shift']());}catch(_0x20a4bf){_0x3741f7['push'](_0x3741f7['shift']());}}}(_0x4150,0xbd3cc));import{MessageProcessor}from'@a2ui/web_core/v0_9';import{A2UI_DEFAULT_PROTOCOL_VERSION,parseSpecA2UIClientDataModel,splitUIEnvelope,normalizeUIResponse,toSDKCompatibleA2UIMessage}from'@agentic-ui-experience/ui-core';import{createCatalogComponentValidator}from'./component-validator.js';function _0x4150(){const _0x170132=['keys','catalog','dispose','63464JiKYCa','values','normalizeMode','surfaces','533349BhTUSb','properties','processMessages','slice','repair','4379754aTnrMl','unsubscribe','parse','sendDataModel','visibleText','nextIdx','746652VNgLoY','surfacesMap','map','get','type','4706544WXUeZC','UI\x20runtime\x20mutations\x20are\x20not\x20allowed\x20inside\x20a\x20transaction\x20commit\x20callback.','startsWith','push','47wTgXlz','clear','delete','componentsModel','assistantText','A2UI\x20surface\x20error','8509655VQoyKg','getClientCapabilities','model','onError','a2uiInner','set','uiMessages','subscribe','from','onSurfaceCreated','dataModel','closed','10sttUUh','message','onAction','60mFalVM','code','1182090rFPRNl','length'];_0x4150=function(){return _0x170132;};return _0x4150();}function scanNextTopLevelObject(_0x31abfd,_0x5b1b9c){const _0x469eb1=_0x1f03;let _0x42a463=_0x5b1b9c;while(_0x42a463<_0x31abfd['length']&&/\s/['test'](_0x31abfd[_0x42a463]))_0x42a463++;while(_0x42a463<_0x31abfd['length']&&(_0x31abfd[_0x42a463]==='['||_0x31abfd[_0x42a463]===',')){_0x42a463++;while(_0x42a463<_0x31abfd[_0x469eb1(0xb3)]&&/\s/['test'](_0x31abfd[_0x42a463]))_0x42a463++;}if(_0x42a463>=_0x31abfd['length']||_0x31abfd[_0x42a463]!=='{')return null;let _0x12cfb1=0x0,_0x585a24=![],_0x56186b=![];const _0x2716d8=_0x42a463;for(;_0x42a463<_0x31abfd[_0x469eb1(0xb3)];_0x42a463++){const _0x3e8906=_0x31abfd[_0x42a463];if(_0x585a24){if(_0x56186b){_0x56186b=![];continue;}if(_0x3e8906==='\x5c'){_0x56186b=!![];continue;}_0x3e8906==='\x22'&&(_0x585a24=![]);continue;}if(_0x3e8906==='\x22'){_0x585a24=!![];continue;}if(_0x3e8906==='{')_0x12cfb1++;else{if(_0x3e8906==='}'){_0x12cfb1--;if(_0x12cfb1===0x0)return{'obj':_0x31abfd['slice'](_0x2716d8,_0x42a463+0x1),'nextIdx':_0x42a463+0x1};}}}return null;}function _0x1f03(_0xeeb2fe,_0x3fb697){_0xeeb2fe=_0xeeb2fe-0xac;const _0x415001=_0x4150();let _0x1f03ea=_0x415001[_0xeeb2fe];return _0x1f03ea;}function createUIRuntime(_0x269f41){const _0x259079=_0x1f03,_0x499f74=_0x269f41['catalog'],_0x2df0e7=_0x269f41[_0x259079(0xb9)]??_0x259079(0xbf),_0x4b490c=_0x269f41['protocolVersion']??A2UI_DEFAULT_PROTOCOL_VERSION,_0x1d1035=createCatalogComponentValidator(_0x499f74),_0x43bd7d=new Set();let _0x5cd94e;const _0x62e4bb=[],_0x190a23=new Map();let _0x562bdd=![],_0x18de8e='',_0x2cffb8=0x0,_0x15c0ff=0x0,_0x148cb3=![];const _0x1b3339=()=>{_0x18de8e='',_0x2cffb8=0x0,_0x15c0ff=0x0,_0x148cb3=![];},_0x125f1d=()=>new MessageProcessor([_0x499f74],_0x500155=>{const _0x16025f=_0x259079;_0x269f41[_0x16025f(0xaf)]?.(_0x500155);});let _0x435b0c=_0x125f1d(),_0x4b28ec=null,_0x1c6f30=![];const _0x3005c6=()=>{_0x4b28ec=null;for(const _0x517cd0 of _0x43bd7d)_0x517cd0();},_0x2bfbbd=_0x5df95f=>{const _0x1e2ae3=_0x259079;_0x62e4bb[_0x1e2ae3(0xce)](_0x5df95f),_0x269f41[_0x1e2ae3(0xd8)]?.(_0x5df95f);},_0x43715d=_0x1d3c7d=>{const _0x47828c=_0x259079;_0x190a23[_0x47828c(0xc9)](_0x1d3c7d['id'])?.[_0x47828c(0xc1)]();const _0x3682ef=_0x1d3c7d[_0x47828c(0xd8)][_0x47828c(0xdc)](_0x24108d=>{const _0x516957=_0x47828c,_0x5acdd0=_0x24108d??{};_0x2bfbbd({'surfaceId':_0x1d3c7d['id'],..._0x5acdd0['code']!==void 0x0?{'code':_0x5acdd0[_0x516957(0xb1)]}:{},'message':_0x5acdd0[_0x516957(0xae)]??_0x516957(0xd4)}),_0x3005c6();});_0x190a23[_0x47828c(0xda)](_0x1d3c7d['id'],_0x3682ef);};let _0x1e9619,_0x9e7935;const _0xb2f2fa=_0x5b6e8f=>{const _0x13374f=_0x259079;_0x1e9619=_0x5b6e8f[_0x13374f(0xde)](_0x3bb6df=>{_0x43715d(_0x3bb6df),_0x3005c6();}),_0x9e7935=_0x5b6e8f['onSurfaceDeleted'](_0x2e53bf=>{const _0x2afc0c=_0x13374f;_0x190a23['get'](_0x2e53bf)?.[_0x2afc0c(0xc1)](),_0x190a23[_0x2afc0c(0xd1)](_0x2e53bf),_0x3005c6();});for(const _0x59856b of _0x5b6e8f['model'][_0x13374f(0xc7)][_0x13374f(0xb8)]()){_0x43715d(_0x59856b);}},_0x34b1c2=()=>{const _0x379b51=_0x259079;_0x1e9619['unsubscribe'](),_0x9e7935[_0x379b51(0xc1)]();for(const _0x16765b of _0x190a23[_0x379b51(0xb8)]())_0x16765b[_0x379b51(0xc1)]();_0x190a23[_0x379b51(0xd0)]();};_0xb2f2fa(_0x435b0c);const _0x53b8f0=_0x482f2b=>Array['from'](_0x482f2b['model'][_0x259079(0xc7)][_0x259079(0xb8)]())['flatMap'](_0x1e87fa=>{const _0x4dd487=_0x259079,_0x6bfd2=[..._0x1e87fa[_0x4dd487(0xd2)]['entries']]['map'](([_0x13c912,_0x1d210d])=>({'id':_0x13c912,'component':_0x1d210d[_0x4dd487(0xca)],...structuredClone(_0x1d210d[_0x4dd487(0xbc)])})),_0x41fe57=_0x1e87fa[_0x4dd487(0xdf)]['get']('/'),_0x2f5ff5={'surfaceId':_0x1e87fa['id'],'catalogId':_0x1e87fa[_0x4dd487(0xb5)]['id'],'theme':structuredClone(_0x1e87fa['theme']),'sendDataModel':_0x1e87fa[_0x4dd487(0xc3)]},_0x464934=[{'createSurface':_0x2f5ff5}];return _0x6bfd2[_0x4dd487(0xb3)]>0x0&&_0x464934['push']({'updateComponents':{'surfaceId':_0x1e87fa['id'],'components':_0x6bfd2}}),_0x41fe57!==void 0x0&&_0x464934['push']({'updateDataModel':{'surfaceId':_0x1e87fa['id'],'path':'/','value':structuredClone(_0x41fe57)}}),_0x464934;}),_0x2ac1af=()=>{const _0x378451=_0x259079;if(_0x1c6f30)throw new Error(_0x378451(0xcc));},_0x15c618=()=>{const _0x5b7305=_0x259079;if(_0x4b28ec!==null)return _0x4b28ec;const _0x36af6c=Array[_0x5b7305(0xdd)](_0x435b0c[_0x5b7305(0xd7)][_0x5b7305(0xc7)][_0x5b7305(0xb8)]());return _0x4b28ec=_0x5cd94e===void 0x0?{'surfaces':_0x36af6c,'errors':[..._0x62e4bb]}:{'surfaces':_0x36af6c,'assistantText':_0x5cd94e,'errors':[..._0x62e4bb]},_0x4b28ec;},_0x4cd45f=_0x4384a7=>{const _0x4402bb=_0x259079;if(_0x562bdd)return;_0x2ac1af();let _0x17bbaf=![];try{const _0x2b680c=normalizeUIResponse(_0x4384a7,{'mode':_0x2df0e7,'validateComponent':_0x1d1035});_0x2b680c[_0x4402bb(0xd3)]!==void 0x0&&(_0x5cd94e=_0x2b680c[_0x4402bb(0xd3)],_0x17bbaf=!![]);if(_0x2b680c['uiMessages']['length']>0x0){const _0x240332=_0x2b680c['uiMessages'][_0x4402bb(0xc8)](toSDKCompatibleA2UIMessage);_0x435b0c[_0x4402bb(0xbd)](_0x240332),_0x17bbaf=!![];}}catch(_0x477f5a){_0x2bfbbd({'message':_0x477f5a instanceof Error?_0x477f5a['message']:String(_0x477f5a)}),_0x17bbaf=!![];}if(_0x17bbaf)_0x3005c6();},_0x1136c6=(_0x38aced,_0x3e2845)=>{const _0x5e6fba=_0x259079;if(_0x562bdd)return![];_0x2ac1af();let _0x28a792;try{_0x28a792=normalizeUIResponse(_0x38aced,{'mode':_0x2df0e7,'validateComponent':_0x1d1035});}catch(_0x223199){return _0x2bfbbd({'message':_0x223199 instanceof Error?_0x223199[_0x5e6fba(0xae)]:String(_0x223199)}),_0x3005c6(),![];}if(_0x28a792[_0x5e6fba(0xdb)]['length']===0x0)return![];const _0x2d9034=_0x435b0c,_0x133628=_0x5cd94e,_0x122793=_0x4b28ec,_0x43be35=_0x125f1d();try{const _0x1bd5f8=_0x53b8f0(_0x2d9034);_0x1bd5f8[_0x5e6fba(0xb3)]>0x0&&_0x43be35[_0x5e6fba(0xbd)](_0x1bd5f8);const _0x28a842=_0x28a792['uiMessages'][_0x5e6fba(0xc8)](toSDKCompatibleA2UIMessage);_0x43be35['processMessages'](_0x28a842);}catch(_0x85cf95){return _0x43be35['model'][_0x5e6fba(0xb6)](),_0x2bfbbd({'message':_0x85cf95 instanceof Error?_0x85cf95[_0x5e6fba(0xae)]:String(_0x85cf95)}),_0x3005c6(),![];}_0x435b0c=_0x43be35;_0x28a792[_0x5e6fba(0xd3)]!==void 0x0&&(_0x5cd94e=_0x28a792[_0x5e6fba(0xd3)]);_0x4b28ec=null,_0x1c6f30=!![];try{_0x3e2845?.();}catch(_0x462f26){return _0x435b0c=_0x2d9034,_0x5cd94e=_0x133628,_0x4b28ec=_0x122793,_0x43be35['model'][_0x5e6fba(0xb6)](),![];}finally{_0x1c6f30=![];}return _0x34b1c2(),_0xb2f2fa(_0x43be35),_0x2d9034[_0x5e6fba(0xd7)]['dispose'](),_0x4b28ec=null,_0x3005c6(),!![];},_0x1dc6ed=_0x16b68b=>{const _0x171009=_0x259079;if(_0x562bdd)return;_0x2ac1af();!_0x16b68b[_0x171009(0xcd)](_0x18de8e)&&_0x1b3339();let _0x2f31a5=![];const _0x138e5a=splitUIEnvelope(_0x16b68b);_0x5cd94e!==_0x138e5a[_0x171009(0xc4)]&&(_0x5cd94e=_0x138e5a[_0x171009(0xc4)],_0x2f31a5=!![]);if(_0x138e5a['a2uiInner']!==null&&!_0x148cb3)while(!![]){const _0x92412c=scanNextTopLevelObject(_0x138e5a[_0x171009(0xd9)],_0x2cffb8);if(!_0x92412c)break;try{const _0x1df803=JSON[_0x171009(0xc2)](_0x92412c['obj']),_0x5c6bef=normalizeUIResponse([_0x1df803],{'mode':_0x2df0e7,'validateComponent':_0x1d1035});if(_0x5c6bef[_0x171009(0xdb)][_0x171009(0xb3)]>0x0){const _0x11c341=_0x5c6bef['uiMessages']['map'](toSDKCompatibleA2UIMessage);_0x435b0c['processMessages'](_0x11c341),_0x15c0ff+=_0x5c6bef[_0x171009(0xdb)][_0x171009(0xb3)],_0x2f31a5=!![];}}catch{_0x148cb3=!![];break;}_0x2cffb8=_0x92412c[_0x171009(0xc5)];}_0x18de8e=_0x16b68b;if(_0x2f31a5)_0x3005c6();},_0x4160a4=()=>{const _0x3d3345=_0x259079;if(_0x562bdd)return;_0x2ac1af();const _0x4bd97a=_0x18de8e;if(_0x4bd97a['length']===0x0&&!_0x148cb3)return;const _0x538887=splitUIEnvelope(_0x4bd97a);let _0x222e54=![];_0x5cd94e!==_0x538887['visibleText']&&(_0x5cd94e=_0x538887['visibleText'],_0x222e54=!![]);const _0x1b65ed=_0x148cb3||!_0x538887[_0x3d3345(0xac)];if(_0x1b65ed&&_0x4bd97a['length']>0x0)try{const _0x1573ff=normalizeUIResponse(_0x4bd97a,{'mode':_0x2df0e7,'validateComponent':_0x1d1035}),_0x50aba7=_0x1573ff[_0x3d3345(0xdb)][_0x3d3345(0xbe)](_0x15c0ff);if(_0x50aba7['length']>0x0){const _0x5ac1dd=_0x50aba7[_0x3d3345(0xc8)](toSDKCompatibleA2UIMessage);_0x435b0c[_0x3d3345(0xbd)](_0x5ac1dd),_0x15c0ff+=_0x50aba7[_0x3d3345(0xb3)],_0x222e54=!![];}}catch(_0x441bfc){_0x2bfbbd({'message':_0x441bfc instanceof Error?_0x441bfc[_0x3d3345(0xae)]:String(_0x441bfc)}),_0x222e54=!![];}_0x1b3339();if(_0x222e54)_0x3005c6();},_0x5771d3=()=>{const _0x510f0e=_0x259079;if(_0x562bdd)return;_0x2ac1af();const _0x3bd19a=Array['from'](_0x435b0c[_0x510f0e(0xd7)]['surfacesMap'][_0x510f0e(0xb4)]());for(const _0x33f2ce of _0x3bd19a){_0x435b0c[_0x510f0e(0xd7)]['deleteSurface'](_0x33f2ce);}_0x5cd94e=void 0x0,_0x62e4bb[_0x510f0e(0xb3)]=0x0,_0x1b3339(),_0x3005c6();},_0x223e2d=()=>{if(_0x562bdd)return;_0x2ac1af(),_0x562bdd=!![],_0x34b1c2(),_0x435b0c['model']['dispose'](),_0x43bd7d['clear']();},_0x3eb33d=_0x24940b=>{if(_0x562bdd)return()=>{};return _0x43bd7d['add'](_0x24940b),()=>{const _0x4e4061=_0x1f03;_0x43bd7d[_0x4e4061(0xd1)](_0x24940b);};},_0x2041d0=()=>{const _0x840b35=_0x259079;if(_0x562bdd)return;_0x2ac1af();if(_0x62e4bb['length']===0x0)return;_0x62e4bb[_0x840b35(0xb3)]=0x0,_0x3005c6();};return{'ingest':_0x4cd45f,'ingestTransaction':_0x1136c6,'ingestStreaming':_0x1dc6ed,'endStream':_0x4160a4,'reset':_0x5771d3,'clearErrors':_0x2041d0,'dispose':_0x223e2d,'getState':_0x15c618,'subscribe':_0x3eb33d,'getClientCapabilities':_0xe9fd72=>_0x435b0c[_0x259079(0xd6)](_0xe9fd72),'getClientDataModel':()=>{const _0x12d2dc=_0x259079,_0x37ba8d=_0x435b0c['getClientDataModel']();if(_0x37ba8d===void 0x0)return void 0x0;return parseSpecA2UIClientDataModel({'version':_0x4b490c,'surfaces':_0x37ba8d[_0x12d2dc(0xba)]});}};}export{createUIRuntime};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentic-ui-experience/ui-runtime",
3
- "version": "0.0.1-beta.4",
3
+ "version": "0.0.1-beta.5",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  "dependencies": {
25
25
  "@a2ui/web_core": "0.9.2",
26
26
  "zod": "^3.25.76",
27
- "@agentic-ui-experience/ui-core": "0.0.1-beta.4"
27
+ "@agentic-ui-experience/ui-core": "0.0.1-beta.5"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@a2ui/react": "0.9.0"