@nonoun/native-ai 1.0.70 → 1.0.72

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.
Files changed (148) hide show
  1. package/dist/native-ai.js +43 -47
  2. package/dist/register.js +349 -353
  3. package/package.json +1 -1
  4. package/dist/a2ui/a2ui-diagnostics.d.ts +0 -31
  5. package/dist/a2ui/a2ui-diagnostics.d.ts.map +0 -1
  6. package/dist/a2ui/a2ui-element.d.ts +0 -30
  7. package/dist/a2ui/a2ui-element.d.ts.map +0 -1
  8. package/dist/a2ui/a2ui-presets.d.ts +0 -22
  9. package/dist/a2ui/a2ui-presets.d.ts.map +0 -1
  10. package/dist/a2ui/adapters/a2a-adapter.d.ts +0 -38
  11. package/dist/a2ui/adapters/a2a-adapter.d.ts.map +0 -1
  12. package/dist/a2ui/adapters/adapter-types.d.ts +0 -19
  13. package/dist/a2ui/adapters/adapter-types.d.ts.map +0 -1
  14. package/dist/a2ui/adapters/ag-ui-adapter.d.ts +0 -42
  15. package/dist/a2ui/adapters/ag-ui-adapter.d.ts.map +0 -1
  16. package/dist/a2ui/adapters/direct-adapter.d.ts +0 -30
  17. package/dist/a2ui/adapters/direct-adapter.d.ts.map +0 -1
  18. package/dist/a2ui/adapters/index.d.ts +0 -8
  19. package/dist/a2ui/adapters/index.d.ts.map +0 -1
  20. package/dist/a2ui/builder/pipeline.d.ts +0 -33
  21. package/dist/a2ui/builder/pipeline.d.ts.map +0 -1
  22. package/dist/a2ui/builder/step-prompts.d.ts +0 -5
  23. package/dist/a2ui/builder/step-prompts.d.ts.map +0 -1
  24. package/dist/a2ui/index.d.ts +0 -15
  25. package/dist/a2ui/index.d.ts.map +0 -1
  26. package/dist/a2ui/install.d.ts +0 -23
  27. package/dist/a2ui/install.d.ts.map +0 -1
  28. package/dist/a2ui/protocol/a2ui-adapter.d.ts +0 -52
  29. package/dist/a2ui/protocol/a2ui-adapter.d.ts.map +0 -1
  30. package/dist/a2ui/protocol/a2ui-component-map.d.ts +0 -98
  31. package/dist/a2ui/protocol/a2ui-component-map.d.ts.map +0 -1
  32. package/dist/a2ui/protocol/a2ui-composition-map.d.ts +0 -101
  33. package/dist/a2ui/protocol/a2ui-composition-map.d.ts.map +0 -1
  34. package/dist/a2ui/protocol/a2ui-converter.d.ts +0 -37
  35. package/dist/a2ui/protocol/a2ui-converter.d.ts.map +0 -1
  36. package/dist/a2ui/protocol/a2ui-surface.d.ts +0 -34
  37. package/dist/a2ui/protocol/a2ui-surface.d.ts.map +0 -1
  38. package/dist/a2ui/protocol/a2ui-transport.d.ts +0 -80
  39. package/dist/a2ui/protocol/a2ui-transport.d.ts.map +0 -1
  40. package/dist/a2ui/protocol/a2ui-types.d.ts +0 -104
  41. package/dist/a2ui/protocol/a2ui-types.d.ts.map +0 -1
  42. package/dist/a2ui/protocol/index.d.ts +0 -15
  43. package/dist/a2ui/protocol/index.d.ts.map +0 -1
  44. package/dist/a2ui/protocol/kernel-bridge.d.ts +0 -114
  45. package/dist/a2ui/protocol/kernel-bridge.d.ts.map +0 -1
  46. package/dist/a2ui/register.d.ts +0 -12
  47. package/dist/a2ui/register.d.ts.map +0 -1
  48. package/dist/a2ui/session/agent-session.d.ts +0 -44
  49. package/dist/a2ui/session/agent-session.d.ts.map +0 -1
  50. package/dist/a2ui/session/catalog.d.ts +0 -41
  51. package/dist/a2ui/session/catalog.d.ts.map +0 -1
  52. package/dist/a2ui/session/event-emitter.d.ts +0 -17
  53. package/dist/a2ui/session/event-emitter.d.ts.map +0 -1
  54. package/dist/a2ui/session/index.d.ts +0 -9
  55. package/dist/a2ui/session/index.d.ts.map +0 -1
  56. package/dist/a2ui/session/session-manager.d.ts +0 -33
  57. package/dist/a2ui/session/session-manager.d.ts.map +0 -1
  58. package/dist/a2ui/session/surface-registry.d.ts +0 -32
  59. package/dist/a2ui/session/surface-registry.d.ts.map +0 -1
  60. package/dist/a2ui/session/types.d.ts +0 -27
  61. package/dist/a2ui/session/types.d.ts.map +0 -1
  62. package/dist/chat/avatar/chat-avatar-element.d.ts +0 -18
  63. package/dist/chat/avatar/chat-avatar-element.d.ts.map +0 -1
  64. package/dist/chat/avatar/index.d.ts +0 -2
  65. package/dist/chat/avatar/index.d.ts.map +0 -1
  66. package/dist/chat/avatar/n-chat-avatar.d.ts +0 -2
  67. package/dist/chat/avatar/n-chat-avatar.d.ts.map +0 -1
  68. package/dist/chat/chat-input-element.d.ts +0 -35
  69. package/dist/chat/chat-input-element.d.ts.map +0 -1
  70. package/dist/chat/chat-panel-element.d.ts +0 -100
  71. package/dist/chat/chat-panel-element.d.ts.map +0 -1
  72. package/dist/chat/feed/chat-feed-element.d.ts +0 -48
  73. package/dist/chat/feed/chat-feed-element.d.ts.map +0 -1
  74. package/dist/chat/feed/index.d.ts +0 -2
  75. package/dist/chat/feed/index.d.ts.map +0 -1
  76. package/dist/chat/feed/n-chat-feed.d.ts +0 -2
  77. package/dist/chat/feed/n-chat-feed.d.ts.map +0 -1
  78. package/dist/chat/gateway/adapter-chatgpt.d.ts +0 -67
  79. package/dist/chat/gateway/adapter-chatgpt.d.ts.map +0 -1
  80. package/dist/chat/gateway/adapter-claude.d.ts +0 -68
  81. package/dist/chat/gateway/adapter-claude.d.ts.map +0 -1
  82. package/dist/chat/gateway/adapter-mock.d.ts +0 -3
  83. package/dist/chat/gateway/adapter-mock.d.ts.map +0 -1
  84. package/dist/chat/gateway/adapter.d.ts +0 -71
  85. package/dist/chat/gateway/adapter.d.ts.map +0 -1
  86. package/dist/chat/gateway/controller.d.ts +0 -46
  87. package/dist/chat/gateway/controller.d.ts.map +0 -1
  88. package/dist/chat/gateway/index.d.ts +0 -9
  89. package/dist/chat/gateway/index.d.ts.map +0 -1
  90. package/dist/chat/gateway/runtime.d.ts +0 -53
  91. package/dist/chat/gateway/runtime.d.ts.map +0 -1
  92. package/dist/chat/gateway/types.d.ts +0 -73
  93. package/dist/chat/gateway/types.d.ts.map +0 -1
  94. package/dist/chat/gateway.d.ts +0 -2
  95. package/dist/chat/gateway.d.ts.map +0 -1
  96. package/dist/chat/index.d.ts +0 -17
  97. package/dist/chat/index.d.ts.map +0 -1
  98. package/dist/chat/message/chat-input-structured-element.d.ts +0 -43
  99. package/dist/chat/message/chat-input-structured-element.d.ts.map +0 -1
  100. package/dist/chat/message/chat-message-activity-element.d.ts +0 -32
  101. package/dist/chat/message/chat-message-activity-element.d.ts.map +0 -1
  102. package/dist/chat/message/chat-message-element.d.ts +0 -44
  103. package/dist/chat/message/chat-message-element.d.ts.map +0 -1
  104. package/dist/chat/message/chat-message-genui-element.d.ts +0 -45
  105. package/dist/chat/message/chat-message-genui-element.d.ts.map +0 -1
  106. package/dist/chat/message/chat-message-seed-element.d.ts +0 -32
  107. package/dist/chat/message/chat-message-seed-element.d.ts.map +0 -1
  108. package/dist/chat/message/chat-message-text-element.d.ts +0 -37
  109. package/dist/chat/message/chat-message-text-element.d.ts.map +0 -1
  110. package/dist/chat/message/chat-messages-element.d.ts +0 -39
  111. package/dist/chat/message/chat-messages-element.d.ts.map +0 -1
  112. package/dist/chat/message/index.d.ts +0 -8
  113. package/dist/chat/message/index.d.ts.map +0 -1
  114. package/dist/chat/message/n-chat-message.d.ts +0 -2
  115. package/dist/chat/message/n-chat-message.d.ts.map +0 -1
  116. package/dist/chat/register.d.ts +0 -13
  117. package/dist/chat/register.d.ts.map +0 -1
  118. package/dist/chat/stream/classify.d.ts +0 -19
  119. package/dist/chat/stream/classify.d.ts.map +0 -1
  120. package/dist/chat/stream/create-transport.d.ts +0 -19
  121. package/dist/chat/stream/create-transport.d.ts.map +0 -1
  122. package/dist/chat/stream/index.d.ts +0 -9
  123. package/dist/chat/stream/index.d.ts.map +0 -1
  124. package/dist/chat/stream/parse-json.d.ts +0 -9
  125. package/dist/chat/stream/parse-json.d.ts.map +0 -1
  126. package/dist/chat/stream/parse-ndjson.d.ts +0 -9
  127. package/dist/chat/stream/parse-ndjson.d.ts.map +0 -1
  128. package/dist/chat/stream/parse-sse.d.ts +0 -9
  129. package/dist/chat/stream/parse-sse.d.ts.map +0 -1
  130. package/dist/chat/stream/types.d.ts +0 -42
  131. package/dist/chat/stream/types.d.ts.map +0 -1
  132. package/dist/chat/telemetry/emitter.d.ts +0 -20
  133. package/dist/chat/telemetry/emitter.d.ts.map +0 -1
  134. package/dist/chat/telemetry/events.d.ts +0 -11
  135. package/dist/chat/telemetry/events.d.ts.map +0 -1
  136. package/dist/chat/telemetry/index.d.ts +0 -5
  137. package/dist/chat/telemetry/index.d.ts.map +0 -1
  138. package/dist/chat/telemetry/redactor.d.ts +0 -17
  139. package/dist/chat/telemetry/redactor.d.ts.map +0 -1
  140. package/dist/chat/telemetry/types.d.ts +0 -27
  141. package/dist/chat/telemetry/types.d.ts.map +0 -1
  142. package/dist/gateway.d.ts +0 -2
  143. package/dist/gateway.d.ts.map +0 -1
  144. package/dist/index.d.ts +0 -5
  145. package/dist/index.d.ts.map +0 -1
  146. package/dist/native-ai.css +0 -1567
  147. package/dist/register.d.ts +0 -12
  148. package/dist/register.d.ts.map +0 -1
@@ -1,101 +0,0 @@
1
- /**
2
- * A2UI Composition Map
3
- *
4
- * Bridge between abstract A2UI schema types and native-ui primitives.
5
- * Sits above the Component Map — while the Component Map handles 1:1
6
- * mappings (A2UI type → native tag), the Composition Map handles
7
- * complex types that require assembling multiple primitives into a
8
- * coordinated template with prop delegation, state projection,
9
- * and event bubbling.
10
- *
11
- * The `CompositionRegistry` class provides a mutable registry with
12
- * change tracking via a signal. The default singleton
13
- * (`defaultCompositionRegistry`) preserves backward compatibility.
14
- */
15
- import type { Signal } from '@nonoun/native-ui';
16
- import type { ComponentMapping, ComponentRegistry } from './a2ui-component-map.ts';
17
- export interface TemplateNode {
18
- readonly role: string;
19
- readonly primitiveType: string;
20
- readonly staticProps?: Readonly<Record<string, unknown>>;
21
- readonly children?: readonly TemplateNode[];
22
- readonly repeatFrom?: string;
23
- }
24
- export type CompositionTemplate = TemplateNode;
25
- export interface PropDelegation {
26
- readonly from: string;
27
- readonly toRole: string;
28
- readonly toProp: string;
29
- readonly transform?: 'direct' | 'variantMap' | 'boolean' | 'count' | 'template';
30
- readonly templateString?: string;
31
- }
32
- export interface StateProjection {
33
- readonly compositeState: string;
34
- readonly childStates: Readonly<Record<string, string | Readonly<Record<string, unknown>>>>;
35
- readonly description?: string;
36
- }
37
- export interface EventBubble {
38
- readonly fromRole: string;
39
- readonly fromEvent: string;
40
- readonly toAction: string;
41
- readonly payloadStrategy?: 'passthrough' | 'index' | 'merge';
42
- readonly mergePayload?: Readonly<Record<string, string>>;
43
- }
44
- export interface CompositionGap {
45
- readonly need: string;
46
- readonly impact: string;
47
- readonly workaround?: string;
48
- }
49
- export interface CompositionSpec {
50
- readonly a2uiType: string;
51
- readonly description: string;
52
- readonly mappingStatus: 'none' | 'partial';
53
- readonly template: CompositionTemplate;
54
- readonly propDelegation: readonly PropDelegation[];
55
- readonly stateProjection: readonly StateProjection[];
56
- readonly eventBubbling: readonly EventBubble[];
57
- readonly requiredStates: readonly string[];
58
- readonly gaps?: readonly CompositionGap[];
59
- }
60
- export declare class CompositionRegistry {
61
- #private;
62
- constructor(specs: readonly CompositionSpec[]);
63
- get version(): Signal<number>;
64
- get(type: string): CompositionSpec | undefined;
65
- has(type: string): boolean;
66
- get size(): number;
67
- keys(): IterableIterator<string>;
68
- values(): IterableIterator<CompositionSpec>;
69
- add(spec: CompositionSpec): void;
70
- remove(a2uiType: string): void;
71
- resolveStrategy(a2uiType: string, componentRegistry: ComponentRegistry): 'direct' | 'composition' | 'unknown';
72
- toJSON(): {
73
- compositions: CompositionSpec[];
74
- };
75
- static fromJSON(data: {
76
- compositions: CompositionSpec[];
77
- }): CompositionRegistry;
78
- getAllGaps(): Array<{
79
- a2uiType: string;
80
- gap: CompositionGap;
81
- }>;
82
- coverageReport(componentRegistry: ComponentRegistry, allSchemaTypes: readonly string[]): {
83
- direct: string[];
84
- composed: string[];
85
- unresolved: string[];
86
- gapCount: number;
87
- };
88
- }
89
- export declare function resolveComponent(a2uiType: string, compositionRegistry: CompositionRegistry, componentRegistry: ComponentRegistry): {
90
- strategy: 'direct';
91
- mapping: ComponentMapping;
92
- } | {
93
- strategy: 'composition';
94
- spec: CompositionSpec;
95
- } | {
96
- strategy: 'unknown';
97
- type: string;
98
- };
99
- export declare const defaultCompositionRegistry: CompositionRegistry;
100
- export declare const COMPOSITION_MAP: CompositionRegistry;
101
- //# sourceMappingURL=a2ui-composition-map.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"a2ui-composition-map.d.ts","sourceRoot":"","sources":["../../../src/a2ui/protocol/a2ui-composition-map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAInF,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IACzD,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;IAC5C,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC;AAE/C,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,GAAG,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;IAChF,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CAClC;A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GACnC;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,OAAO,EAAE,gBAAgB,CAAA;CAAE,GAChD;IAAE,QAAQ,EAAE,aAAa,CAAC;IAAC,IAAI,EAAE,eAAe,CAAA;CAAE,GAClD;IAAE,QAAQ,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAUxC;AAuiBD,eAAO,MAAM,0BAA0B,qBAAgD,CAAC;AACxF,eAAO,MAAM,eAAe,EAAE,mBAAgD,CAAC"}
@@ -1,37 +0,0 @@
1
- /**
2
- * A2UI Converter
3
- *
4
- * Bidirectional conversion between A2UI flat adjacency lists
5
- * and native-ui nested UINode trees.
6
- */
7
- import type { UINode, UIPlan, CommandSource } from './kernel-bridge.ts';
8
- import type { A2UIComponent, A2UIProtocolVersion } from './a2ui-types.ts';
9
- import type { ComponentRegistry } from './a2ui-component-map.ts';
10
- export interface ConversionResult {
11
- readonly root: UINode;
12
- readonly bindings: ReadonlyMap<string, readonly DataBindingEntry[]>;
13
- readonly warnings: readonly string[];
14
- readonly orphans: readonly string[];
15
- }
16
- export interface DataBindingEntry {
17
- readonly property: string;
18
- readonly path: string;
19
- }
20
- export interface ToUINodeOptions {
21
- readonly rootId?: string;
22
- readonly surfaceId?: string;
23
- readonly version?: A2UIProtocolVersion;
24
- readonly registry?: ComponentRegistry;
25
- }
26
- export interface ToA2UIOptions {
27
- readonly surfaceId?: string;
28
- readonly version?: A2UIProtocolVersion;
29
- readonly registry?: ComponentRegistry;
30
- }
31
- export declare function a2uiToUINode(components: readonly A2UIComponent[], options?: ToUINodeOptions): ConversionResult;
32
- export declare function uiNodeToA2UI(root: UINode, options?: ToA2UIOptions): readonly A2UIComponent[];
33
- /**
34
- * Wrap a conversion result as a UIPlan.
35
- */
36
- export declare function conversionToPlan(result: ConversionResult, source?: CommandSource): UIPlan;
37
- //# sourceMappingURL=a2ui-converter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"a2ui-converter.d.ts","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AgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,aAAa,GACtB,SAAS,aAAa,EAAE,CAU1B;AA2HD;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,gBAAgB,EACxB,MAAM,GAAE,aAA2B,GAClC,MAAM,CAQR"}
@@ -1,34 +0,0 @@
1
- /**
2
- * A2UI Surface Manager
3
- *
4
- * Manages A2UI surface lifecycle: create → updateComponents → updateDataModel → delete.
5
- * Each surface maps to one UIPlan in the kernel.
6
- */
7
- import type { ReadonlySignal } from '@nonoun/native-ui';
8
- import type { A2UIServerMessage, A2UIActionMessage, A2UIComponent } from './a2ui-types.ts';
9
- import type { ComponentRegistry } from './a2ui-component-map.ts';
10
- import type { A2UIKernelBridge as Kernel } from './kernel-bridge.ts';
11
- import type { PatchOp } from './kernel-bridge.ts';
12
- export interface SurfaceState {
13
- readonly surfaceId: string;
14
- readonly planId: string;
15
- readonly catalogId?: string;
16
- readonly theme?: Readonly<Record<string, string>>;
17
- readonly container: HTMLElement;
18
- readonly rendered: boolean;
19
- }
20
- export declare function resolveJsonPointer(data: unknown, pointer: string): unknown;
21
- export declare function setJsonPointer(data: Record<string, unknown>, pointer: string, value: unknown): void;
22
- export declare class SurfaceManager {
23
- #private;
24
- readonly surfaceCount: ReadonlySignal<number>;
25
- constructor(kernel: Kernel, onAction: (msg: A2UIActionMessage) => void, onRender?: (surfaceId: string, container: HTMLElement) => void, registry?: ComponentRegistry);
26
- handleMessage(msg: A2UIServerMessage, container?: HTMLElement): void;
27
- getSurface(surfaceId: string): SurfaceState | null;
28
- getSurfaceIds(): readonly string[];
29
- getDataModel(surfaceId: string): Record<string, unknown> | null;
30
- destroy(): void;
31
- }
32
- export declare function diffComponents(oldComponents: readonly A2UIComponent[], newComponents: readonly A2UIComponent[], surfaceId: string, registry?: ComponentRegistry): readonly PatchOp[];
33
- export declare function createSurfaceManager(kernel: Kernel, onAction: (msg: A2UIActionMessage) => void, registry?: ComponentRegistry): SurfaceManager;
34
- //# sourceMappingURL=a2ui-surface.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"a2ui-surface.d.ts","sourceRoot":"","sources":["../../../src/a2ui/protocol/a2ui-surface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAU,cAAc,EAAW,MAAM,mBAAmB,CAAC;AACzE,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EAKd,MAAM,iBAAiB,CAAC;AASzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,IAAI,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAClD,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAkBD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAS1E;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAiBnG;AAQD,qBAAa,cAAc;;IAQzB,QAAQ,CAAC,YAAY,EAAE,cAAc,CAAC,MAAM,CAAC,CAA4C;gBAGvF,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,IAAI,EAC1C,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,KAAK,IAAI,EAC9D,QAAQ,CAAC,EAAE,iBAAiB;IAU9B,aAAa,CAAC,GAAG,EAAE,iBAAiB,EAAE,SAAS,CAAC,EAAE,WAAW,GAAG,IAAI;IAmPpE,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI;IAalD,aAAa,IAAI,SAAS,MAAM,EAAE;IAIlC,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAM/D,OAAO,IAAI,IAAI;CAKhB;AAkCD,wBAAgB,cAAc,CAC5B,aAAa,EAAE,SAAS,aAAa,EAAE,EACvC,aAAa,EAAE,SAAS,aAAa,EAAE,EACvC,SAAS,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,SAAS,OAAO,EAAE,CA6FpB;AA+BD,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,IAAI,EAC1C,QAAQ,CAAC,EAAE,iBAAiB,GAC3B,cAAc,CAEhB"}
@@ -1,80 +0,0 @@
1
- /**
2
- * A2UI Transport
3
- *
4
- * WebSocket and SSE (Server-Sent Events) transport layers for the A2UI protocol.
5
- * Connects a remote A2UI server to the local A2UIAdapter, forwarding inbound
6
- * messages to receive() and outbound client messages back to the server.
7
- */
8
- import type { A2UIAdapter } from './a2ui-adapter.ts';
9
- import type { A2UIClientMessage, A2UIServerMessage } from './a2ui-types.ts';
10
- export type TransportState = 'disconnected' | 'connecting' | 'connected' | 'reconnecting' | 'closed';
11
- export interface TransportEvents {
12
- readonly onStateChange?: (state: TransportState) => void;
13
- readonly onError?: (error: Error) => void;
14
- readonly onMessage?: (msg: A2UIServerMessage) => void;
15
- }
16
- export interface WebSocketTransportOptions extends TransportEvents {
17
- /** Render container for received surfaces. */
18
- readonly container?: HTMLElement;
19
- /** Auto-reconnect on disconnect (default: true). */
20
- readonly reconnect?: boolean;
21
- /** Max reconnect attempts (default: 5). */
22
- readonly maxReconnects?: number;
23
- /** Base reconnect delay in ms (default: 1000). Doubles each attempt. */
24
- readonly reconnectDelay?: number;
25
- /** Protocols to pass to WebSocket constructor. */
26
- readonly protocols?: string | string[];
27
- }
28
- export declare class WebSocketTransport {
29
- #private;
30
- constructor(adapter: A2UIAdapter, url: string, options?: WebSocketTransportOptions);
31
- get state(): TransportState;
32
- /**
33
- * Open the WebSocket connection.
34
- * Messages are forwarded to adapter.receive() as they arrive.
35
- */
36
- connect(): void;
37
- /**
38
- * Send a client message (action, error) to the server.
39
- */
40
- send(msg: A2UIClientMessage): void;
41
- /**
42
- * Close the connection. No reconnection will be attempted.
43
- */
44
- close(): void;
45
- }
46
- export interface SSETransportOptions extends TransportEvents {
47
- /** Render container for received surfaces. */
48
- readonly container?: HTMLElement;
49
- /** EventSource init options (e.g., withCredentials). */
50
- readonly eventSourceInit?: EventSourceInit;
51
- /** SSE event name to listen for (default: 'message'). */
52
- readonly eventName?: string;
53
- /**
54
- * URL to POST client messages to (actions, errors).
55
- * If not provided, send() will throw.
56
- */
57
- readonly postUrl?: string;
58
- }
59
- export declare class SSETransport {
60
- #private;
61
- constructor(adapter: A2UIAdapter, url: string, options?: SSETransportOptions);
62
- get state(): TransportState;
63
- /**
64
- * Open the SSE connection.
65
- * Messages are forwarded to adapter.receive() as they arrive.
66
- */
67
- connect(): void;
68
- /**
69
- * Send a client message to the server via POST.
70
- * Requires postUrl to be set in options.
71
- */
72
- send(msg: A2UIClientMessage): Promise<void>;
73
- /**
74
- * Close the SSE connection.
75
- */
76
- close(): void;
77
- }
78
- export declare function createWebSocketTransport(adapter: A2UIAdapter, url: string, options?: WebSocketTransportOptions): WebSocketTransport;
79
- export declare function createSSETransport(adapter: A2UIAdapter, url: string, options?: SSETransportOptions): SSETransport;
80
- //# sourceMappingURL=a2ui-transport.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"a2ui-transport.d.ts","sourceRoot":"","sources":["../../../src/a2ui/protocol/a2ui-transport.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAI5E,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG,YAAY,GAAG,WAAW,GAAG,cAAc,GAAG,QAAQ,CAAC;AAErG,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACzD,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACvD;AAID,MAAM,WAAW,yBAA0B,SAAQ,eAAe;IAChE,8CAA8C;IAC9C,QAAQ,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC;IACjC,oDAAoD;IACpD,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,2CAA2C;IAC3C,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,wEAAwE;IACxE,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,kDAAkD;IAClD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACxC;AAED,qBAAa,kBAAkB;;gBASjB,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,yBAAyB;IAMlF,IAAI,KAAK,IAAI,cAAc,CAAwB;IAEnD;;;OAGG;IACH,OAAO,IAAI,IAAI;IAuCf;;OAEG;IACH,IAAI,CAAC,GAAG,EAAE,iBAAiB,GAAG,IAAI;IAQlC;;OAEG;IACH,KAAK,IAAI,IAAI;CA+Bd;AAID,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D,8CAA8C;IAC9C,QAAQ,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC;IACjC,wDAAwD;IACxD,QAAQ,CAAC,eAAe,CAAC,EAAE,eAAe,CAAC;IAC3C,yDAAyD;IACzD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,qBAAa,YAAY;;gBAOX,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,mBAAmB;IAM5E,IAAI,KAAK,IAAI,cAAc,CAAwB;IAEnD;;;OAGG;IACH,OAAO,IAAI,IAAI;IAuCf;;;OAGG;IACG,IAAI,CAAC,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBjD;;OAEG;IACH,KAAK,IAAI,IAAI;CAWd;AAID,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,yBAAyB,GAClC,kBAAkB,CAEpB;AAED,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,WAAW,EACpB,GAAG,EAAE,MAAM,EACX,OAAO,CAAC,EAAE,mBAAmB,GAC5B,YAAY,CAEd"}
@@ -1,104 +0,0 @@
1
- /**
2
- * A2UI Protocol — Wire Format Types
3
- *
4
- * Type definitions for Google's A2UI (Agent-to-UI) protocol.
5
- * Supports both v0.8 and v0.9 message formats.
6
- * No runtime code except type guard functions.
7
- */
8
- export type A2UIProtocolVersion = '0.8' | '0.9';
9
- export type A2UIServerMessage = A2UICreateSurface | A2UIUpdateComponents | A2UIUpdateDataModel | A2UIDeleteSurface | A2UICatalogRequest;
10
- export interface A2UICreateSurface {
11
- readonly createSurface: {
12
- readonly surfaceId: string;
13
- readonly catalogId?: string;
14
- readonly theme?: Readonly<Record<string, string>>;
15
- };
16
- }
17
- export interface A2UIUpdateComponents {
18
- readonly updateComponents: {
19
- readonly surfaceId: string;
20
- readonly components: readonly A2UIComponent[];
21
- };
22
- }
23
- export interface A2UIUpdateDataModel {
24
- readonly updateDataModel: {
25
- readonly surfaceId: string;
26
- readonly path?: string;
27
- readonly value?: unknown;
28
- };
29
- }
30
- export interface A2UIDeleteSurface {
31
- readonly deleteSurface: {
32
- readonly surfaceId: string;
33
- };
34
- }
35
- export interface A2UICatalogRequest {
36
- readonly requestCatalog: {
37
- readonly surfaceId?: string;
38
- };
39
- }
40
- export interface A2UICatalogResponse {
41
- readonly catalog: {
42
- readonly surfaceId?: string;
43
- readonly supportedTypes: readonly string[];
44
- readonly version: string;
45
- };
46
- }
47
- export type A2UIClientMessage = A2UIActionMessage | A2UIErrorMessage | A2UICatalogResponse;
48
- export interface A2UIActionMessage {
49
- readonly action: {
50
- readonly surfaceId: string;
51
- readonly sourceComponentId: string;
52
- readonly name: string;
53
- readonly timestamp: string;
54
- readonly context?: Readonly<Record<string, unknown>>;
55
- };
56
- }
57
- export interface A2UIErrorMessage {
58
- readonly error: {
59
- readonly surfaceId: string;
60
- readonly code: string;
61
- readonly message: string;
62
- };
63
- }
64
- export interface A2UIComponent {
65
- readonly id: string;
66
- readonly component: string;
67
- readonly children?: readonly string[];
68
- readonly child?: string;
69
- readonly text?: string;
70
- readonly label?: string;
71
- readonly variant?: string;
72
- readonly disabled?: boolean;
73
- readonly action?: A2UIComponentAction;
74
- readonly accessibility?: {
75
- readonly label?: string;
76
- readonly description?: string;
77
- };
78
- readonly [key: string]: unknown;
79
- }
80
- export interface A2UIComponentAction {
81
- readonly event: {
82
- readonly name: string;
83
- readonly context?: Readonly<Record<string, unknown>>;
84
- };
85
- }
86
- export interface A2UIDataBinding {
87
- readonly path: string;
88
- }
89
- export type A2UIStandardType = 'Text' | 'Button' | 'TextField' | 'TextArea' | 'CheckBox' | 'Switch' | 'ChoicePicker' | 'Slider' | 'DateTimeInput' | 'Row' | 'Column' | 'Card' | 'Modal' | 'Tabs' | 'List' | 'ListItem' | 'Image' | 'Icon' | 'Divider' | 'Badge' | 'Avatar' | 'Select' | 'Video' | 'AudioPlayer';
90
- export declare function isDataBinding(value: unknown): value is A2UIDataBinding;
91
- export declare function isCreateSurface(msg: A2UIServerMessage): msg is A2UICreateSurface;
92
- export declare function isUpdateComponents(msg: A2UIServerMessage): msg is A2UIUpdateComponents;
93
- export declare function isUpdateDataModel(msg: A2UIServerMessage): msg is A2UIUpdateDataModel;
94
- export declare function isDeleteSurface(msg: A2UIServerMessage): msg is A2UIDeleteSurface;
95
- export declare function isCatalogRequest(msg: A2UIServerMessage): msg is A2UICatalogRequest;
96
- export declare function isActionMessage(msg: A2UIClientMessage): msg is A2UIActionMessage;
97
- export declare function isErrorMessage(msg: A2UIClientMessage): msg is A2UIErrorMessage;
98
- export declare function isCatalogResponse(msg: A2UIClientMessage): msg is A2UICatalogResponse;
99
- /**
100
- * Parse a raw JSON string into a typed A2UI server message.
101
- * Returns null if the JSON is not a valid A2UI message.
102
- */
103
- export declare function parseServerMessage(json: string): A2UIServerMessage | null;
104
- //# sourceMappingURL=a2ui-types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"a2ui-types.d.ts","sourceRoot":"","sources":["../../../src/a2ui/protocol/a2ui-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,MAAM,mBAAmB,GAAG,KAAK,GAAG,KAAK,CAAC;AAIhD,MAAM,MAAM,iBAAiB,GACzB,iBAAiB,GACjB,oBAAoB,GACpB,mBAAmB,GACnB,iBAAiB,GACjB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,aAAa,EAAE;QACtB,QAAQ,CAAC,SAAS,EAAE,MA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B,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAYzE"}
@@ -1,15 +0,0 @@
1
- export { A2UIAdapter, createA2UIAdapter } from './a2ui-adapter.ts';
2
- export type { A2UIAdapterOptions } from './a2ui-adapter.ts';
3
- export { SurfaceManager, createSurfaceManager, resolveJsonPointer, setJsonPointer } from './a2ui-surface.ts';
4
- export type { SurfaceState } from './a2ui-surface.ts';
5
- export { a2uiToUINode, uiNodeToA2UI, conversionToPlan } from './a2ui-converter.ts';
6
- export type { ConversionResult, DataBindingEntry, ToUINodeOptions, ToA2UIOptions } from './a2ui-converter.ts';
7
- export { ComponentRegistry, defaultRegistry, resolveNativeTag, resolveA2UIType, COMPONENT_MAP, getSupportedTypes, getComponentCategory, getCompatibleTypes, textVariantTag, textFieldInputType, dateTimeInputType } from './a2ui-component-map.ts';
8
- export type { ComponentMapping, ChildStrategy, RegistrySnapshot, EventSpec, PropertySpec, MethodSpec } from './a2ui-component-map.ts';
9
- export { CompositionRegistry, defaultCompositionRegistry, COMPOSITION_MAP, resolveComponent } from './a2ui-composition-map.ts';
10
- export type { CompositionSpec, CompositionTemplate, TemplateNode, PropDelegation, StateProjection, EventBubble, CompositionGap } from './a2ui-composition-map.ts';
11
- export { isDataBinding, isCreateSurface, isUpdateComponents, isUpdateDataModel, isDeleteSurface, isCatalogRequest, isCatalogResponse, isActionMessage, isErrorMessage, parseServerMessage, } from './a2ui-types.ts';
12
- export type { A2UIProtocolVersion, A2UIServerMessage, A2UICreateSurface, A2UIUpdateComponents, A2UIUpdateDataModel, A2UIDeleteSurface, A2UICatalogRequest, A2UICatalogResponse, A2UIClientMessage, A2UIActionMessage, A2UIErrorMessage, A2UIComponent, A2UIComponentAction, A2UIDataBinding, A2UIStandardType, } from './a2ui-types.ts';
13
- export { WebSocketTransport, SSETransport, createWebSocketTransport, createSSETransport } from './a2ui-transport.ts';
14
- export type { TransportState, TransportEvents, WebSocketTransportOptions, SSETransportOptions } from './a2ui-transport.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AiB,CAAC;AACzB,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACrH,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,114 +0,0 @@
1
- /**
2
- * Kernel Bridge Interface
3
- *
4
- * Decouples A2UI protocol from the concrete Kernel class.
5
- * The real Kernel satisfies this via TypeScript structural typing — no `implements` needed.
6
- *
7
- * Only the subset of Kernel/types/patch that A2UI actually accesses is duplicated here.
8
- */
9
- import type { Dispose } from '@nonoun/native-ui';
10
- export interface UINode {
11
- readonly id: string;
12
- readonly tag: string;
13
- readonly attributes?: Readonly<Record<string, string>>;
14
- readonly properties?: Readonly<Record<string, unknown>>;
15
- readonly children?: readonly UINode[];
16
- readonly textContent?: string;
17
- readonly events?: Readonly<Record<string, string>>;
18
- readonly slot?: string;
19
- }
20
- export type CommandSource = 'human' | 'generated' | 'replay';
21
- export interface UIPlan {
22
- readonly id: string;
23
- readonly version: number;
24
- readonly root: UINode;
25
- readonly source: CommandSource;
26
- readonly timestamp: number;
27
- }
28
- export type PatchOp = {
29
- readonly type: 'add';
30
- readonly parentId: string;
31
- readonly node: UINode;
32
- readonly index?: number;
33
- } | {
34
- readonly type: 'remove';
35
- readonly targetId: string;
36
- } | {
37
- readonly type: 'replace';
38
- readonly targetId: string;
39
- readonly node: UINode;
40
- } | {
41
- readonly type: 'set-attribute';
42
- readonly targetId: string;
43
- readonly name: string;
44
- readonly value: string;
45
- } | {
46
- readonly type: 'remove-attribute';
47
- readonly targetId: string;
48
- readonly name: string;
49
- } | {
50
- readonly type: 'set-property';
51
- readonly targetId: string;
52
- readonly name: string;
53
- readonly value: unknown;
54
- } | {
55
- readonly type: 'set-text';
56
- readonly targetId: string;
57
- readonly text: string;
58
- } | {
59
- readonly type: 'set-event';
60
- readonly targetId: string;
61
- readonly event: string;
62
- readonly commandType: string;
63
- } | {
64
- readonly type: 'remove-event';
65
- readonly targetId: string;
66
- readonly event: string;
67
- };
68
- export interface UIPatch {
69
- readonly planId: string;
70
- readonly ops: readonly PatchOp[];
71
- readonly source: CommandSource;
72
- readonly timestamp: number;
73
- }
74
- export interface PlanResult {
75
- readonly plan: UIPlan;
76
- readonly validation: {
77
- readonly valid: boolean;
78
- readonly errors: readonly {
79
- readonly path: string;
80
- readonly code: string;
81
- readonly message: string;
82
- }[];
83
- };
84
- readonly accessibility: {
85
- readonly violations: readonly unknown[];
86
- readonly passes: number;
87
- };
88
- readonly warnings: readonly string[];
89
- }
90
- export interface Command<T = unknown> {
91
- readonly type: string;
92
- readonly payload: T;
93
- readonly id: string;
94
- readonly timestamp: number;
95
- readonly source: CommandSource;
96
- }
97
- export type CommandFilter = (command: Command) => boolean;
98
- export type CommandHandler<T = unknown> = (command: Command<T>) => void | Promise<void>;
99
- /**
100
- * The subset of the Kernel API that A2UI needs.
101
- * Real `Kernel` from `@nonoun/native-ui/kernel` satisfies this structurally.
102
- */
103
- export interface A2UIKernelBridge {
104
- readonly bus: {
105
- on(typeOrFilter: string | CommandFilter, handler: CommandHandler): Dispose;
106
- };
107
- readonly executor: {
108
- getElements(planId: string): Map<string, HTMLElement> | null;
109
- };
110
- executePlan(plan: UIPlan, container: HTMLElement): Map<string, HTMLElement>;
111
- patchPlan(patch: UIPatch): unknown;
112
- teardownPlan(planId: string): void;
113
- }
114
- //# sourceMappingURL=kernel-bridge.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kernel-bridge.d.ts","sourceRoot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I,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAIxF;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,GAAG,EAAE;QACZ,EAAE,CAAC,YAAY,EAAE,MAAM,GAAG,aAAa,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC;KAC5E,CAAC;IACF,QAAQ,CAAC,QAAQ,EAAE;QACjB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,GAAG,IAAI,CAAC;KAC9D,CAAC;IACF,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,GAAG,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC5E,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC;IACnC,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Register native-a2ui
3
- *
4
- * Side-effect module that registers the <native-a2ui> custom element
5
- * and all dogfooded n-* components it creates via document.createElement.
6
- *
7
- * Usage:
8
- * import '@nonoun/native-ai/register';
9
- */
10
- import { NA2UI } from './a2ui-element.ts';
11
- export { NA2UI };
12
- //# sourceMappingURL=register.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/a2ui/register.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAK1C,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -1,44 +0,0 @@
1
- /**
2
- * NAgentSession — Per-Agent Session
3
- *
4
- * Represents a single agent-to-renderer connection. Each session wraps
5
- * a dedicated A2UIAdapter (1:1) and validates ownership + catalog
6
- * before delegating to the existing protocol layer.
7
- */
8
- import type { A2UIServerMessage } from '../protocol/a2ui-types.ts';
9
- import type { A2UIKernelBridge } from '../protocol/kernel-bridge.ts';
10
- import type { NSessionStatus, NInteractionEvent } from './types.ts';
11
- import { NEventEmitter } from './event-emitter.ts';
12
- import type { NCatalog } from './catalog.ts';
13
- import type { NSurfaceRegistry } from './surface-registry.ts';
14
- interface SessionEventMap {
15
- 'interaction': (e: NInteractionEvent) => void;
16
- 'surface-ready': (surfaceId: string) => void;
17
- 'status-change': (status: NSessionStatus) => void;
18
- 'catalog-violation': (type: string, componentId: string) => void;
19
- }
20
- export interface NAgentSessionConfig {
21
- readonly agentId: string;
22
- readonly catalog: NCatalog;
23
- readonly surfaces?: readonly string[];
24
- }
25
- export declare class NAgentSession {
26
- #private;
27
- readonly id: string;
28
- readonly agentId: string;
29
- readonly catalog: NCatalog;
30
- readonly eventEmitter: NEventEmitter;
31
- constructor(kernel: A2UIKernelBridge, registry: NSurfaceRegistry, config: NAgentSessionConfig);
32
- get status(): NSessionStatus;
33
- /**
34
- * Inbound: agent sends A2UI payload.
35
- * Validates ownership and catalog before forwarding to the internal adapter.
36
- */
37
- receive(message: A2UIServerMessage | string): void;
38
- /** Subscribe to session events. */
39
- on<K extends keyof SessionEventMap>(event: K, handler: SessionEventMap[K]): () => void;
40
- /** Terminate the session and clean up. */
41
- terminate(): void;
42
- }
43
- export {};
44
- //# sourceMappingURL=agent-session.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-session.d.ts","sourceRoot":"","sources":["../../../src/a2ui/session/agent-session.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EACV,iBAAiB,EAGlB,MAAM,2BAA2B,CAAC;AAUnC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAiB,MAAM,YAAY,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAI9D,UAAU,eAAe;IACvB,aAAa,EAAE,CAAC,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC9C,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,eAAe,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAClD,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;CAClE;AAID,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAID,qBAAa,aAAa;;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAC3B,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;gBAUnC,MAAM,EAAE,gBAAgB,EACxB,QAAQ,EAAE,gBAAgB,EAC1B,MAAM,EAAE,mBAAmB;IA4C7B,IAAI,MAAM,IAAI,cAAc,CAAyB;IAErD;;;OAGG;IACH,OAAO,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI;IA4ClD,mCAAmC;IACnC,EAAE,CAAC,CAAC,SAAS,MAAM,eAAe,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI;IAStF,0CAA0C;IAC1C,SAAS,IAAI,IAAI;CAqBlB"}
@@ -1,41 +0,0 @@
1
- /**
2
- * NCatalog — Per-Session Component Catalog
3
- *
4
- * Scoped component catalog for security enforcement.
5
- * Agents can only render components granted in their session's catalog.
6
- * Reads from the existing COMPONENT_MAP in a2ui-component-map.ts.
7
- */
8
- import type { A2UIComponent } from '../protocol/a2ui-types.ts';
9
- export interface NCatalogEntry {
10
- readonly a2uiType: string;
11
- readonly tagName: string;
12
- readonly properties: readonly string[];
13
- readonly events: readonly string[];
14
- }
15
- export declare class NCatalog {
16
- #private;
17
- constructor(entries: readonly NCatalogEntry[]);
18
- /** All catalog entries. */
19
- get entries(): readonly NCatalogEntry[];
20
- /** Check if a component type is in this catalog. */
21
- has(a2uiType: string): boolean;
22
- /** Get entry for a component type. */
23
- get(a2uiType: string): NCatalogEntry | undefined;
24
- /**
25
- * Serialize to A2UI catalog format for AgentCard / negotiation.
26
- */
27
- toManifest(): object;
28
- /**
29
- * Filter an A2UI component array against this catalog.
30
- * Returns only components whose type is allowed.
31
- * Also strips blocked component IDs from parent children arrays.
32
- */
33
- filterComponents(components: readonly A2UIComponent[], onViolation?: (type: string, id: string) => void): A2UIComponent[];
34
- }
35
- /**
36
- * Build a catalog from the existing COMPONENT_MAP.
37
- * - `'core-only'`: excludes `native-dashboard-*` elements (recommended default)
38
- * - `'full'`: all registered component types
39
- */
40
- export declare function buildCatalogFromRegistry(scope?: 'full' | 'core-only'): NCatalog;
41
- //# sourceMappingURL=catalog.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/a2ui/session/catalog.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAM/D,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IACvC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAID,qBAAa,QAAQ;;gBAGP,OAAO,EAAE,SAAS,aAAa,EAAE;IAM7C,2BAA2B;IAC3B,IAAI,OAAO,IAAI,SAAS,aAAa,EAAE,CAEtC;IAED,oDAAoD;IACpD,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAI9B,sCAAsC;IACtC,GAAG,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAIhD;;OAEG;IACH,UAAU,IAAI,MAAM;IAapB;;;;OAIG;IACH,gBAAgB,CACd,UAAU,EAAE,SAAS,aAAa,EAAE,EACpC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,GAC/C,aAAa,EAAE;CAsBnB;AAiBD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,GAAE,MAAM,GAAG,WAAyB,GAAG,QAAQ,CAO5F"}