@nonoun/native-ai 1.0.18 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/dist/native-ai.js +1673 -225
  2. package/dist/register.js +813 -112
  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/index.d.ts +0 -15
  21. package/dist/a2ui/index.d.ts.map +0 -1
  22. package/dist/a2ui/install.d.ts +0 -23
  23. package/dist/a2ui/install.d.ts.map +0 -1
  24. package/dist/a2ui/protocol/a2ui-adapter.d.ts +0 -52
  25. package/dist/a2ui/protocol/a2ui-adapter.d.ts.map +0 -1
  26. package/dist/a2ui/protocol/a2ui-component-map.d.ts +0 -75
  27. package/dist/a2ui/protocol/a2ui-component-map.d.ts.map +0 -1
  28. package/dist/a2ui/protocol/a2ui-converter.d.ts +0 -37
  29. package/dist/a2ui/protocol/a2ui-converter.d.ts.map +0 -1
  30. package/dist/a2ui/protocol/a2ui-surface.d.ts +0 -34
  31. package/dist/a2ui/protocol/a2ui-surface.d.ts.map +0 -1
  32. package/dist/a2ui/protocol/a2ui-transport.d.ts +0 -80
  33. package/dist/a2ui/protocol/a2ui-transport.d.ts.map +0 -1
  34. package/dist/a2ui/protocol/a2ui-types.d.ts +0 -104
  35. package/dist/a2ui/protocol/a2ui-types.d.ts.map +0 -1
  36. package/dist/a2ui/protocol/index.d.ts +0 -13
  37. package/dist/a2ui/protocol/index.d.ts.map +0 -1
  38. package/dist/a2ui/protocol/kernel-bridge.d.ts +0 -114
  39. package/dist/a2ui/protocol/kernel-bridge.d.ts.map +0 -1
  40. package/dist/a2ui/register.d.ts +0 -12
  41. package/dist/a2ui/register.d.ts.map +0 -1
  42. package/dist/a2ui/session/agent-session.d.ts +0 -44
  43. package/dist/a2ui/session/agent-session.d.ts.map +0 -1
  44. package/dist/a2ui/session/catalog.d.ts +0 -41
  45. package/dist/a2ui/session/catalog.d.ts.map +0 -1
  46. package/dist/a2ui/session/event-emitter.d.ts +0 -17
  47. package/dist/a2ui/session/event-emitter.d.ts.map +0 -1
  48. package/dist/a2ui/session/index.d.ts +0 -9
  49. package/dist/a2ui/session/index.d.ts.map +0 -1
  50. package/dist/a2ui/session/session-manager.d.ts +0 -33
  51. package/dist/a2ui/session/session-manager.d.ts.map +0 -1
  52. package/dist/a2ui/session/surface-registry.d.ts +0 -32
  53. package/dist/a2ui/session/surface-registry.d.ts.map +0 -1
  54. package/dist/a2ui/session/types.d.ts +0 -27
  55. package/dist/a2ui/session/types.d.ts.map +0 -1
  56. package/dist/chat/avatar/chat-avatar-element.d.ts +0 -18
  57. package/dist/chat/avatar/chat-avatar-element.d.ts.map +0 -1
  58. package/dist/chat/avatar/index.d.ts +0 -2
  59. package/dist/chat/avatar/index.d.ts.map +0 -1
  60. package/dist/chat/avatar/n-chat-avatar.d.ts +0 -2
  61. package/dist/chat/avatar/n-chat-avatar.d.ts.map +0 -1
  62. package/dist/chat/chat-input-element.d.ts +0 -32
  63. package/dist/chat/chat-input-element.d.ts.map +0 -1
  64. package/dist/chat/chat-panel-element.d.ts +0 -100
  65. package/dist/chat/chat-panel-element.d.ts.map +0 -1
  66. package/dist/chat/feed/chat-feed-element.d.ts +0 -48
  67. package/dist/chat/feed/chat-feed-element.d.ts.map +0 -1
  68. package/dist/chat/feed/index.d.ts +0 -2
  69. package/dist/chat/feed/index.d.ts.map +0 -1
  70. package/dist/chat/feed/n-chat-feed.d.ts +0 -2
  71. package/dist/chat/feed/n-chat-feed.d.ts.map +0 -1
  72. package/dist/chat/gateway/adapter-chatgpt.d.ts +0 -67
  73. package/dist/chat/gateway/adapter-chatgpt.d.ts.map +0 -1
  74. package/dist/chat/gateway/adapter-claude.d.ts +0 -68
  75. package/dist/chat/gateway/adapter-claude.d.ts.map +0 -1
  76. package/dist/chat/gateway/adapter-mock.d.ts +0 -3
  77. package/dist/chat/gateway/adapter-mock.d.ts.map +0 -1
  78. package/dist/chat/gateway/adapter.d.ts +0 -71
  79. package/dist/chat/gateway/adapter.d.ts.map +0 -1
  80. package/dist/chat/gateway/controller.d.ts +0 -46
  81. package/dist/chat/gateway/controller.d.ts.map +0 -1
  82. package/dist/chat/gateway/index.d.ts +0 -9
  83. package/dist/chat/gateway/index.d.ts.map +0 -1
  84. package/dist/chat/gateway/runtime.d.ts +0 -53
  85. package/dist/chat/gateway/runtime.d.ts.map +0 -1
  86. package/dist/chat/gateway/types.d.ts +0 -73
  87. package/dist/chat/gateway/types.d.ts.map +0 -1
  88. package/dist/chat/gateway.d.ts +0 -2
  89. package/dist/chat/gateway.d.ts.map +0 -1
  90. package/dist/chat/index.d.ts +0 -17
  91. package/dist/chat/index.d.ts.map +0 -1
  92. package/dist/chat/message/chat-input-structured-element.d.ts +0 -43
  93. package/dist/chat/message/chat-input-structured-element.d.ts.map +0 -1
  94. package/dist/chat/message/chat-message-activity-element.d.ts +0 -32
  95. package/dist/chat/message/chat-message-activity-element.d.ts.map +0 -1
  96. package/dist/chat/message/chat-message-element.d.ts +0 -44
  97. package/dist/chat/message/chat-message-element.d.ts.map +0 -1
  98. package/dist/chat/message/chat-message-genui-element.d.ts +0 -45
  99. package/dist/chat/message/chat-message-genui-element.d.ts.map +0 -1
  100. package/dist/chat/message/chat-message-seed-element.d.ts +0 -33
  101. package/dist/chat/message/chat-message-seed-element.d.ts.map +0 -1
  102. package/dist/chat/message/chat-message-text-element.d.ts +0 -37
  103. package/dist/chat/message/chat-message-text-element.d.ts.map +0 -1
  104. package/dist/chat/message/chat-messages-element.d.ts +0 -39
  105. package/dist/chat/message/chat-messages-element.d.ts.map +0 -1
  106. package/dist/chat/message/index.d.ts +0 -8
  107. package/dist/chat/message/index.d.ts.map +0 -1
  108. package/dist/chat/message/n-chat-message.d.ts +0 -2
  109. package/dist/chat/message/n-chat-message.d.ts.map +0 -1
  110. package/dist/chat/register.d.ts +0 -13
  111. package/dist/chat/register.d.ts.map +0 -1
  112. package/dist/chat/stream/classify.d.ts +0 -19
  113. package/dist/chat/stream/classify.d.ts.map +0 -1
  114. package/dist/chat/stream/create-transport.d.ts +0 -19
  115. package/dist/chat/stream/create-transport.d.ts.map +0 -1
  116. package/dist/chat/stream/index.d.ts +0 -9
  117. package/dist/chat/stream/index.d.ts.map +0 -1
  118. package/dist/chat/stream/parse-json.d.ts +0 -9
  119. package/dist/chat/stream/parse-json.d.ts.map +0 -1
  120. package/dist/chat/stream/parse-ndjson.d.ts +0 -9
  121. package/dist/chat/stream/parse-ndjson.d.ts.map +0 -1
  122. package/dist/chat/stream/parse-sse.d.ts +0 -9
  123. package/dist/chat/stream/parse-sse.d.ts.map +0 -1
  124. package/dist/chat/stream/types.d.ts +0 -42
  125. package/dist/chat/stream/types.d.ts.map +0 -1
  126. package/dist/chat/telemetry/emitter.d.ts +0 -20
  127. package/dist/chat/telemetry/emitter.d.ts.map +0 -1
  128. package/dist/chat/telemetry/events.d.ts +0 -11
  129. package/dist/chat/telemetry/events.d.ts.map +0 -1
  130. package/dist/chat/telemetry/index.d.ts +0 -5
  131. package/dist/chat/telemetry/index.d.ts.map +0 -1
  132. package/dist/chat/telemetry/redactor.d.ts +0 -17
  133. package/dist/chat/telemetry/redactor.d.ts.map +0 -1
  134. package/dist/chat/telemetry/types.d.ts +0 -27
  135. package/dist/chat/telemetry/types.d.ts.map +0 -1
  136. package/dist/gateway.d.ts +0 -2
  137. package/dist/gateway.d.ts.map +0 -1
  138. package/dist/index.d.ts +0 -5
  139. package/dist/index.d.ts.map +0 -1
  140. package/dist/native-ai.css +0 -1422
  141. package/dist/register.d.ts +0 -12
  142. package/dist/register.d.ts.map +0 -1
@@ -1,17 +0,0 @@
1
- export { NChatInput } from './chat-input-element.ts';
2
- export { NChatPanel } from './chat-panel-element.ts';
3
- export type { AutoFocusPolicy, ChatPanelOpenOptions, FocusComposerOptions, ModelOption } from './chat-panel-element.ts';
4
- export { NChatFeed } from './feed/index.ts';
5
- export { NChatAvatar } from './avatar/index.ts';
6
- export { NChatMessage, NChatMessages, NChatMessageText, NChatMessageActivity, NChatMessageSeed, NChatMessageGenUI, NChatInputStructured, } from './message/index.ts';
7
- export type { ChatMessageActionDef } from './message/chat-message-element.ts';
8
- export { ACTION_REGISTRY, ROLE_DEFAULTS } from './message/chat-message-element.ts';
9
- export type { SeedOption } from './message/chat-message-seed-element.ts';
10
- export type { StructuredOption } from './message/chat-input-structured-element.ts';
11
- export type { GenUINode } from './message/chat-message-genui-element.ts';
12
- export { renderMarkdown, renderInline, sanitizeHtml } from './message/chat-message-text-element.ts';
13
- export type { ChatStreamChunk, StreamFormat, ChatTransportOptions, ChatStreamEvent, ChatTransport, TransportState, TransportStatus, TransportStateCallback, RetryOptions, StreamEndReason, } from './stream/index.ts';
14
- export { parseSSE, parseNDJSON, parseJSON, detectFormat, createChatStream, createChatTransport, classifyStreamEnd, classifyHttpError, backoffDelay, } from './stream/index.ts';
15
- export type { TelemetryCorrelation, TelemetryTiming, TelemetryRetry, TelemetryLevel, TelemetryEvent, TelemetryRedactor, } from './telemetry/index.ts';
16
- export { CHAT_EVENTS, SAFE_FIELDS, SENSITIVE_FIELDS, scrubPII, createDefaultRedactor, TelemetryEmitter, } from './telemetry/index.ts';
17
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/chat/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGxH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EACL,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAGnF,YAAY,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACzE,YAAY,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AACnF,YAAY,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AAGpG,YAAY,EACV,eAAe,EACf,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,QAAQ,EACR,WAAW,EACX,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,GACb,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EACV,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC"}
@@ -1,43 +0,0 @@
1
- import { NativeElement } from '@nonoun/native-ui';
2
- export interface StructuredOption {
3
- value: string;
4
- label: string;
5
- description?: string;
6
- icon?: string;
7
- }
8
- /**
9
- * Structured multi-choice input — appears before submission for
10
- * guided input (like modern Claude chat's multiple-choice UI).
11
- *
12
- * ```html
13
- * <n-chat-input-structured
14
- * question="What would you like to do?"
15
- * type="single"
16
- * options='[{"value":"a","label":"Option A"},{"value":"b","label":"Option B"}]'>
17
- * </n-chat-input-structured>
18
- * ```
19
- *
20
- * @attr {string} question - Prompt text
21
- * @attr {string} type - `single` (default) | `multi`
22
- * @attr {string} options - JSON array of `{ value, label, description?, icon? }`
23
- * @attr {boolean} required - At least one selection required before submit
24
- * @attr {boolean} disabled - Disables interaction
25
- * @fires native:structured-submit - Fired on submit with selections
26
- * @fires native:structured-cancel - Fired when dismissed without selecting
27
- */
28
- export declare class NChatInputStructured extends NativeElement {
29
- #private;
30
- static observedAttributes: string[];
31
- constructor();
32
- get question(): string;
33
- set question(val: string);
34
- get options(): StructuredOption[];
35
- set options(val: StructuredOption[]);
36
- get selections(): StructuredOption[];
37
- get disabled(): boolean;
38
- set disabled(val: boolean);
39
- attributeChangedCallback(name: string, old: string | null, val: string | null): void;
40
- setup(): void;
41
- teardown(): void;
42
- }
43
- //# sourceMappingURL=chat-input-structured-element.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat-input-structured-element.d.ts","sourceRoot":"","sources":["../../../src/chat/message/chat-input-structured-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAgC,MAAM,mBAAmB,CAAC;AAEhF,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,oBAAqB,SAAQ,aAAa;;IACrD,MAAM,CAAC,kBAAkB,WAA2D;;IAiBpF,IAAI,QAAQ,IAAI,MAAM,CAAiC;IACvD,IAAI,QAAQ,CAAC,GAAG,EAAE,MAAM,EAGvB;IAED,IAAI,OAAO,IAAI,gBAAgB,EAAE,CAAgC;IACjE,IAAI,OAAO,CAAC,GAAG,EAAE,gBAAgB,EAAE,EAGlC;IAED,IAAI,UAAU,IAAI,gBAAgB,EAAE,CAGnC;IAED,IAAI,QAAQ,IAAI,OAAO,CAAiC;IACxD,IAAI,QAAQ,CAAC,GAAG,EAAE,OAAO,EAGxB;IAID,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAiBpF,KAAK,IAAI,IAAI;IAkCb,QAAQ,IAAI,IAAI;CA6HjB"}
@@ -1,32 +0,0 @@
1
- import { NativeElement } from '@nonoun/native-ui';
2
- /**
3
- * Streaming activity indicator — typing, thinking, or tool-use status.
4
- *
5
- * When `active`, shows an animated indicator with elapsed time.
6
- * When `expandable`, clicking toggles visibility of slotted trace content.
7
- *
8
- * ```html
9
- * <n-chat-message-activity type="thinking" active>
10
- * <pre>Reasoning trace here...</pre>
11
- * </n-chat-message-activity>
12
- * ```
13
- *
14
- * @attr {string} type - `typing` | `thinking` | `tool-use`
15
- * @attr {string} label - Custom label text (overrides default per-type label)
16
- * @attr {boolean} active - Currently streaming / in progress
17
- * @attr {boolean} expandable - Allow click to expand trace content
18
- * @fires native:activity-toggle - Fired when trace is expanded/collapsed
19
- */
20
- export declare class NChatMessageActivity extends NativeElement {
21
- #private;
22
- static observedAttributes: string[];
23
- constructor();
24
- get active(): boolean;
25
- set active(val: boolean);
26
- get expanded(): boolean;
27
- set expanded(val: boolean);
28
- attributeChangedCallback(name: string, old: string | null, val: string | null): void;
29
- setup(): void;
30
- teardown(): void;
31
- }
32
- //# sourceMappingURL=chat-message-activity-element.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat-message-activity-element.d.ts","sourceRoot":"","sources":["../../../src/chat/message/chat-message-activity-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAU,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,oBAAqB,SAAQ,aAAa;;IACrD,MAAM,CAAC,kBAAkB,WAA6C;;IAsBtE,IAAI,MAAM,IAAI,OAAO,CAA+B;IACpD,IAAI,MAAM,CAAC,GAAG,EAAE,OAAO,EAGtB;IAED,IAAI,QAAQ,IAAI,OAAO,CAAiC;IACxD,IAAI,QAAQ,CAAC,GAAG,EAAE,OAAO,EAGxB;IAID,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAapF,KAAK,IAAI,IAAI;IAyCb,QAAQ,IAAI,IAAI;CAoFjB"}
@@ -1,44 +0,0 @@
1
- import { NativeElement } from '@nonoun/native-ui';
2
- export interface ChatMessageActionDef {
3
- label: string;
4
- icon: string;
5
- }
6
- export declare const ACTION_REGISTRY: Record<string, ChatMessageActionDef>;
7
- export declare const ROLE_DEFAULTS: Record<string, string[]>;
8
- /**
9
- * Individual chat message bubble.
10
- *
11
- * Accepts slotted content: `n-chat-message-text`, `n-chat-message-genui`,
12
- * `n-chat-message-seed`, or any custom content.
13
- *
14
- * @attr {string} role - `user` | `assistant` | `system`
15
- * @attr {string} message-id - Unique message identifier
16
- * @attr {string} timestamp - Epoch milliseconds
17
- * @attr {string} status - `sending` | `sent` | `error` | `streaming` | `partial`
18
- * @attr {string} actions - Comma-separated action list, or `"none"` to suppress
19
- * @attr {string} actions-style - `"icon"` (default) | `"label"` | `"icon-label"`
20
- * @attr {string} actions-position - `"below"` (default) | `"inside"` — toolbar placement
21
- * @fires native:message-action - Fired when an action button is clicked
22
- * @fires native:continue-request - Fired when continue is requested for a partial message
23
- */
24
- export declare class NChatMessage extends NativeElement {
25
- #private;
26
- static observedAttributes: string[];
27
- constructor();
28
- get role(): string;
29
- set role(val: string);
30
- get messageId(): string;
31
- get timestamp(): number;
32
- get status(): string;
33
- set status(val: string);
34
- get actions(): string | null;
35
- set actions(val: string | null);
36
- get actionsStyle(): string;
37
- set actionsStyle(val: string);
38
- get actionsPosition(): string;
39
- set actionsPosition(val: string);
40
- attributeChangedCallback(name: string, old: string | null, val: string | null): void;
41
- setup(): void;
42
- teardown(): void;
43
- }
44
- //# sourceMappingURL=chat-message-element.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat-message-element.d.ts","sourceRoot":"","sources":["../../../src/chat/message/chat-message-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAe,MAAM,mBAAmB,CAAC;AAI/D,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAOhE,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAGlD,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,YAAa,SAAQ,aAAa;;IAC7C,MAAM,CAAC,kBAAkB,WAAsG;;IAoB/H,IAAI,IAAI,IAAI,MAAM,CAA6B;IAC/C,IAAI,IAAI,CAAC,GAAG,EAAE,MAAM,EAGnB;IAED,IAAI,SAAS,IAAI,MAAM,CAAkD;IAEzE,IAAI,SAAS,IAAI,MAAM,CAAwD;IAE/E,IAAI,MAAM,IAAI,MAAM,CAA+B;IACnD,IAAI,MAAM,CAAC,GAAG,EAAE,MAAM,EAGrB;IAED,IAAI,OAAO,IAAI,MAAM,GAAG,IAAI,CAAgC;IAC5D,IAAI,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAO7B;IAED,IAAI,YAAY,IAAI,MAAM,CAAqC;IAC/D,IAAI,YAAY,CAAC,GAAG,EAAE,MAAM,EAG3B;IAED,IAAI,eAAe,IAAI,MAAM,CAAwC;IACrE,IAAI,eAAe,CAAC,GAAG,EAAE,MAAM,EAG9B;IAID,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAcpF,KAAK,IAAI,IAAI;IAqBb,QAAQ,IAAI,IAAI;CAoJjB"}
@@ -1,45 +0,0 @@
1
- import { NativeElement } from '@nonoun/native-ui';
2
- /** Minimal UINode shape for schema-driven rendering. */
3
- export interface GenUINode {
4
- tag: string;
5
- id?: string;
6
- attributes?: Record<string, string>;
7
- properties?: Record<string, unknown>;
8
- children?: GenUINode[];
9
- text?: string;
10
- slot?: string;
11
- }
12
- /**
13
- * GenUI message card — renders UI from a schema (A2UI, MCPUI, etc).
14
- *
15
- * Validates the schema before rendering. Forbidden tags are rejected.
16
- *
17
- * ```html
18
- * <n-chat-message-genui schema-type="a2ui" mode="inline"></n-chat-message-genui>
19
- * ```
20
- *
21
- * Set the schema via property:
22
- * ```js
23
- * el.schema = { tag: 'n-container', children: [{ tag: 'p', text: 'Hello' }] };
24
- * ```
25
- *
26
- * @attr {string} schema-type - `a2ui` | `mcpui`
27
- * @attr {string} mode - `inline` (default) | `lightbox`
28
- * @fires native:genui-action - Fired when an action occurs within the rendered UI
29
- * @fires native:genui-error - Fired when schema validation fails
30
- */
31
- export declare class NChatMessageGenUI extends NativeElement {
32
- #private;
33
- static observedAttributes: string[];
34
- constructor();
35
- get schema(): GenUINode | null;
36
- set schema(val: GenUINode | null);
37
- get schemaType(): string;
38
- set schemaType(val: string);
39
- get mode(): 'inline' | 'lightbox';
40
- set mode(val: 'inline' | 'lightbox');
41
- attributeChangedCallback(name: string, old: string | null, val: string | null): void;
42
- setup(): void;
43
- teardown(): void;
44
- }
45
- //# sourceMappingURL=chat-message-genui-element.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat-message-genui-element.d.ts","sourceRoot":"","sources":["../../../src/chat/message/chat-message-genui-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAU,MAAM,mBAAmB,CAAC;AAE1D,wDAAwD;AACxD,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAQD;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,iBAAkB,SAAQ,aAAa;;IAClD,MAAM,CAAC,kBAAkB,WAA2B;;IAgBpD,IAAI,MAAM,IAAI,SAAS,GAAG,IAAI,CAA+B;IAC7D,IAAI,MAAM,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,EAE/B;IAED,IAAI,UAAU,IAAI,MAAM,CAAmC;IAC3D,IAAI,UAAU,CAAC,GAAG,EAAE,MAAM,EAGzB;IAED,IAAI,IAAI,IAAI,QAAQ,GAAG,UAAU,CAA6B;IAC9D,IAAI,IAAI,CAAC,GAAG,EAAE,QAAQ,GAAG,UAAU,EAGlC;IAID,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAWpF,KAAK,IAAI,IAAI;IA0Cb,QAAQ,IAAI,IAAI;CAwFjB"}
@@ -1,33 +0,0 @@
1
- import { NativeElement } from '@nonoun/native-ui';
2
- export interface SeedOption {
3
- value: string;
4
- label: string;
5
- icon?: string;
6
- }
7
- /**
8
- * Suggestion chips — pre-seeded quick responses.
9
- *
10
- * Options can be provided as JSON attribute or via the `options` property.
11
- *
12
- * ```html
13
- * <n-chat-message-seed options='[{"value":"yes","label":"Yes"},{"value":"no","label":"No"}]'>
14
- * </n-chat-message-seed>
15
- * ```
16
- *
17
- * @attr {string} options - JSON array of `{ value, label, icon? }`
18
- * @attr {boolean} disabled - Disables all chips
19
- * @fires native:seed-select - Fired when a chip is clicked
20
- */
21
- export declare class NChatMessageSeed extends NativeElement {
22
- #private;
23
- static observedAttributes: string[];
24
- constructor();
25
- get options(): SeedOption[];
26
- set options(val: SeedOption[]);
27
- get disabled(): boolean;
28
- set disabled(val: boolean);
29
- attributeChangedCallback(name: string, old: string | null, val: string | null): void;
30
- setup(): void;
31
- teardown(): void;
32
- }
33
- //# sourceMappingURL=chat-message-seed-element.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat-message-seed-element.d.ts","sourceRoot":"","sources":["../../../src/chat/message/chat-message-seed-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAgC,MAAM,mBAAmB,CAAC;AAEhF,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,gBAAiB,SAAQ,aAAa;;IACjD,MAAM,CAAC,kBAAkB,WAA2B;;IAapD,IAAI,OAAO,IAAI,UAAU,EAAE,CAAgC;IAC3D,IAAI,OAAO,CAAC,GAAG,EAAE,UAAU,EAAE,EAG5B;IAED,IAAI,QAAQ,IAAI,OAAO,CAAiC;IACxD,IAAI,QAAQ,CAAC,GAAG,EAAE,OAAO,EAGxB;IAID,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAgBpF,KAAK,IAAI,IAAI;IA0Cb,QAAQ,IAAI,IAAI;CAsBjB"}
@@ -1,37 +0,0 @@
1
- import { NativeElement } from '@nonoun/native-ui';
2
- /**
3
- * Rich text message renderer with lightweight markdown support.
4
- *
5
- * Renders a markdown subset (paragraphs, headings, lists, code fences,
6
- * inline code, bold, italic, links, blockquotes) to sanitized HTML.
7
- *
8
- * ```html
9
- * <n-chat-message-text format="markdown">
10
- * Hello **world**!
11
- * </n-chat-message-text>
12
- * ```
13
- *
14
- * Or set content via property:
15
- * ```js
16
- * el.content = '# Title\nSome **bold** text';
17
- * ```
18
- *
19
- * @attr {string} format - `markdown` (default) | `plain`
20
- */
21
- export declare class NChatMessageText extends NativeElement {
22
- #private;
23
- static observedAttributes: string[];
24
- get content(): string;
25
- set content(val: string);
26
- get format(): 'markdown' | 'plain';
27
- set format(val: 'markdown' | 'plain');
28
- attributeChangedCallback(name: string, old: string | null, val: string | null): void;
29
- setup(): void;
30
- teardown(): void;
31
- }
32
- declare function renderInline(text: string): string;
33
- declare function renderMarkdown(src: string): string;
34
- /** Sanitize rendered HTML — strip any tags not in allowlist. */
35
- export declare function sanitizeHtml(html: string): string;
36
- export { renderMarkdown, renderInline };
37
- //# sourceMappingURL=chat-message-text-element.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat-message-text-element.d.ts","sourceRoot":"","sources":["../../../src/chat/message/chat-message-text-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAU,MAAM,mBAAmB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,gBAAiB,SAAQ,aAAa;;IACjD,MAAM,CAAC,kBAAkB,WAAc;IASvC,IAAI,OAAO,IAAI,MAAM,CAAgC;IACrD,IAAI,OAAO,CAAC,GAAG,EAAE,MAAM,EAEtB;IAED,IAAI,MAAM,IAAI,UAAU,GAAG,OAAO,CAA+B;IACjE,IAAI,MAAM,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,EAGnC;IAID,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAUpF,KAAK,IAAI,IAAI;IAoCb,QAAQ,IAAI,IAAI;CAKjB;AAuBD,iBAAS,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAmB1C;AAED,iBAAS,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA4F3C;AAED,gEAAgE;AAChE,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOjD;AAED,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC"}
@@ -1,39 +0,0 @@
1
- import { NativeElement } from '@nonoun/native-ui';
2
- /**
3
- * Message group — cluster of messages from the same sender.
4
- *
5
- * Provides a 2×2 grid layout:
6
- * - Col 1, row 1–2: avatar (bottom-aligned)
7
- * - Col 2, row 1: context area (metadata, reasoning, timestamps)
8
- * - Col 2, row 2: messages area (chat bubbles, flex column)
9
- *
10
- * On setup, non-avatar children are sorted into two wrapper divs:
11
- * - `.n-chat-context` — non-message children (row 1)
12
- * - `.n-chat-bubbles` — `n-chat-message` children (row 2)
13
- *
14
- * A MutationObserver routes dynamically added children into the
15
- * correct wrapper automatically.
16
- *
17
- * ```html
18
- * <n-chat-messages role="assistant" sender="AI">
19
- * <n-chat-avatar>AI</n-chat-avatar>
20
- * <span class="reasoning">Thinking...</span>
21
- * <n-chat-message role="assistant">
22
- * <n-chat-message-text>Hello!</n-chat-message-text>
23
- * </n-chat-message>
24
- * </n-chat-messages>
25
- * ```
26
- *
27
- * @attr {string} role - `user` | `assistant` | `system`
28
- * @attr {string} sender - Display name of the sender
29
- * @attr {string} avatar-align - `"top"` | `"center"` | `"bottom"` (default) — avatar vertical alignment
30
- */
31
- export declare class NChatMessages extends NativeElement {
32
- #private;
33
- static observedAttributes: string[];
34
- constructor();
35
- attributeChangedCallback(name: string, old: string | null, val: string | null): void;
36
- setup(): void;
37
- teardown(): void;
38
- }
39
- //# sourceMappingURL=chat-messages-element.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat-messages-element.d.ts","sourceRoot":"","sources":["../../../src/chat/message/chat-messages-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,aAAc,SAAQ,aAAa;;IAC9C,MAAM,CAAC,kBAAkB,WAA2C;;IAYpE,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAKpF,KAAK,IAAI,IAAI;IA8Bb,QAAQ,IAAI,IAAI;CA4CjB"}
@@ -1,8 +0,0 @@
1
- export { NChatMessage } from './chat-message-element.ts';
2
- export { NChatMessages } from './chat-messages-element.ts';
3
- export { NChatMessageText } from './chat-message-text-element.ts';
4
- export { NChatMessageActivity } from './chat-message-activity-element.ts';
5
- export { NChatMessageSeed } from './chat-message-seed-element.ts';
6
- export { NChatMessageGenUI } from './chat-message-genui-element.ts';
7
- export { NChatInputStructured } from './chat-input-structured-element.ts';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chat/message/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=n-chat-message.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"n-chat-message.d.ts","sourceRoot":"","sources":["../../../src/chat/message/n-chat-message.ts"],"names":[],"mappings":""}
@@ -1,13 +0,0 @@
1
- import { NChatInput } from './chat-input-element.ts';
2
- import { NChatPanel } from './chat-panel-element.ts';
3
- import { NChatFeed } from './feed/chat-feed-element.ts';
4
- import { NChatAvatar } from './avatar/chat-avatar-element.ts';
5
- import { NChatMessage } from './message/chat-message-element.ts';
6
- import { NChatMessages } from './message/chat-messages-element.ts';
7
- import { NChatMessageText } from './message/chat-message-text-element.ts';
8
- import { NChatMessageActivity } from './message/chat-message-activity-element.ts';
9
- import { NChatMessageSeed } from './message/chat-message-seed-element.ts';
10
- import { NChatMessageGenUI } from './message/chat-message-genui-element.ts';
11
- import { NChatInputStructured } from './message/chat-input-structured-element.ts';
12
- export { NChatInput, NChatPanel, NChatFeed, NChatAvatar, NChatMessage, NChatMessages, NChatMessageText, NChatMessageActivity, NChatMessageSeed, NChatMessageGenUI, NChatInputStructured, };
13
- //# sourceMappingURL=register.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/chat/register.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAmDlF,OAAO,EACL,UAAU,EACV,UAAU,EACV,SAAS,EACT,WAAW,EACX,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,GACrB,CAAC"}
@@ -1,19 +0,0 @@
1
- import type { ChatStreamChunk, TransportState } from './types.ts';
2
- export type StreamEndReason = 'complete' | 'partial' | 'error' | 'stopped';
3
- /**
4
- * Classify how a stream ended based on the final chunk and optional error.
5
- * - `complete` — explicit done signal received (e.g., `[DONE]` sentinel, `finish_reason`)
6
- * - `partial` — stream ended without explicit completion (truncated)
7
- * - `error` — an error occurred during streaming
8
- * - `stopped` — consumer aborted the stream
9
- */
10
- export declare function classifyStreamEnd(chunk: ChatStreamChunk, error?: Error): StreamEndReason;
11
- /**
12
- * Classify an HTTP status code into a transport state.
13
- */
14
- export declare function classifyHttpError(status: number): TransportState;
15
- /**
16
- * Calculate exponential backoff delay with jitter.
17
- */
18
- export declare function backoffDelay(attempt: number, base?: number, max?: number): number;
19
- //# sourceMappingURL=classify.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../../../src/chat/stream/classify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAElE,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE3E;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,eAAe,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,eAAe,CAOxF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAKhE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,SAAO,EAAE,GAAG,SAAQ,GAAG,MAAM,CAE9E"}
@@ -1,19 +0,0 @@
1
- import type { ChatStreamChunk, StreamFormat, ChatTransportOptions } from './types.ts';
2
- /**
3
- * Detect the stream format from a Content-Type header value.
4
- */
5
- export declare function detectFormat(contentType: string): StreamFormat;
6
- /**
7
- * Create an async generator that yields ChatStreamChunk values from a
8
- * Response, auto-detecting the format from Content-Type when not specified.
9
- */
10
- export declare function createChatStream(response: Response, format?: StreamFormat): AsyncGenerator<ChatStreamChunk>;
11
- export interface ChatTransport {
12
- send(body: unknown): Promise<AsyncGenerator<ChatStreamChunk>>;
13
- }
14
- /**
15
- * Create a reusable chat transport that sends requests and returns a
16
- * streaming async generator. Supports retry/backoff and transport state callbacks.
17
- */
18
- export declare function createChatTransport(options: ChatTransportOptions): ChatTransport;
19
- //# sourceMappingURL=create-transport.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-transport.d.ts","sourceRoot":"","sources":["../../../src/chat/stream/create-transport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,oBAAoB,EAAmB,MAAM,YAAY,CAAC;AAMvG;;GAEG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,YAAY,CAK9D;AAED;;;GAGG;AACH,wBAAuB,gBAAgB,CACrC,QAAQ,EAAE,QAAQ,EAClB,MAAM,CAAC,EAAE,YAAY,GACpB,cAAc,CAAC,eAAe,CAAC,CAejC;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,CAAC;CAC/D;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,oBAAoB,GAC5B,aAAa,CAsGf"}
@@ -1,9 +0,0 @@
1
- export type { ChatStreamChunk, StreamFormat, ChatTransportOptions, ChatStreamEvent, TransportState, TransportStatus, TransportStateCallback, RetryOptions, } from './types.ts';
2
- export { parseSSE } from './parse-sse.ts';
3
- export { parseNDJSON } from './parse-ndjson.ts';
4
- export { parseJSON } from './parse-json.ts';
5
- export type { ChatTransport } from './create-transport.ts';
6
- export { detectFormat, createChatStream, createChatTransport, } from './create-transport.ts';
7
- export type { StreamEndReason } from './classify.ts';
8
- export { classifyStreamEnd, classifyHttpError, backoffDelay } from './classify.ts';
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chat/stream/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,YAAY,GACb,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
@@ -1,9 +0,0 @@
1
- import type { ChatStreamChunk } from './types.ts';
2
- /**
3
- * Parse a standard JSON response as a single ChatStreamChunk.
4
- *
5
- * Reads the entire response body, parses as JSON, and yields one chunk
6
- * with `done: true`.
7
- */
8
- export declare function parseJSON(response: Response): AsyncGenerator<ChatStreamChunk>;
9
- //# sourceMappingURL=parse-json.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse-json.d.ts","sourceRoot":"","sources":["../../../src/chat/stream/parse-json.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD;;;;;GAKG;AACH,wBAAuB,SAAS,CAC9B,QAAQ,EAAE,QAAQ,GACjB,cAAc,CAAC,eAAe,CAAC,CA2BjC"}
@@ -1,9 +0,0 @@
1
- import type { ChatStreamChunk } from './types.ts';
2
- /**
3
- * Parse a newline-delimited JSON (NDJSON) response stream into ChatStreamChunk values.
4
- *
5
- * Each non-empty line is parsed as a standalone JSON object.
6
- * Accumulates the full message across chunks.
7
- */
8
- export declare function parseNDJSON(response: Response): AsyncGenerator<ChatStreamChunk>;
9
- //# sourceMappingURL=parse-ndjson.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse-ndjson.d.ts","sourceRoot":"","sources":["../../../src/chat/stream/parse-ndjson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD;;;;;GAKG;AACH,wBAAuB,WAAW,CAChC,QAAQ,EAAE,QAAQ,GACjB,cAAc,CAAC,eAAe,CAAC,CA2FjC"}
@@ -1,9 +0,0 @@
1
- import type { ChatStreamChunk } from './types.ts';
2
- /**
3
- * Parse a Server-Sent Events (SSE) response stream into ChatStreamChunk values.
4
- *
5
- * Reads `data:` lines from the response body, skips empty lines and comments,
6
- * handles the `[DONE]` sentinel, and accumulates the full message across chunks.
7
- */
8
- export declare function parseSSE(response: Response): AsyncGenerator<ChatStreamChunk>;
9
- //# sourceMappingURL=parse-sse.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parse-sse.d.ts","sourceRoot":"","sources":["../../../src/chat/stream/parse-sse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD;;;;;GAKG;AACH,wBAAuB,QAAQ,CAC7B,QAAQ,EAAE,QAAQ,GACjB,cAAc,CAAC,eAAe,CAAC,CAmIjC"}
@@ -1,42 +0,0 @@
1
- export interface ChatStreamChunk {
2
- delta: string;
3
- fullMessage: string;
4
- role: 'assistant' | 'user';
5
- datetime: number;
6
- done: boolean;
7
- /** True when stream ended without an explicit completion signal (e.g., no `[DONE]` sentinel). */
8
- partial?: boolean;
9
- }
10
- export type StreamFormat = 'sse' | 'ndjson' | 'json';
11
- export type TransportState = 'idle' | 'sending' | 'streaming' | 'retrying' | 'rate-limited' | 'auth-required' | 'server-error' | 'offline' | 'ready';
12
- export interface TransportStatus {
13
- state: TransportState;
14
- statusCode?: number;
15
- retryInMs?: number;
16
- attempt?: number;
17
- maxAttempts?: number;
18
- error?: Error;
19
- }
20
- export type TransportStateCallback = (status: TransportStatus) => void;
21
- export interface RetryOptions {
22
- maxAttempts?: number;
23
- baseDelayMs?: number;
24
- maxDelayMs?: number;
25
- }
26
- export interface ChatTransportOptions {
27
- baseUrl: string;
28
- clientId?: string;
29
- format?: StreamFormat;
30
- headers?: Record<string, string>;
31
- signal?: AbortSignal;
32
- onStateChange?: TransportStateCallback;
33
- retry?: RetryOptions;
34
- }
35
- export interface ChatStreamEvent {
36
- type: 'start' | 'chunk' | 'complete' | 'partial' | 'error' | 'stop';
37
- chunk?: ChatStreamChunk;
38
- error?: Error;
39
- durationMs?: number;
40
- requestId: string;
41
- }
42
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/chat/stream/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,WAAW,GAAG,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,iGAAiG;IACjG,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAIrD,MAAM,MAAM,cAAc,GACtB,MAAM,GACN,SAAS,GACT,WAAW,GACX,UAAU,GACV,cAAc,GACd,eAAe,GACf,cAAc,GACd,SAAS,GACT,OAAO,CAAC;AAEZ,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,cAAc,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,MAAM,MAAM,sBAAsB,GAAG,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,CAAC;AAEvE,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC,KAAK,CAAC,EAAE,YAAY,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;IACpE,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB"}
@@ -1,20 +0,0 @@
1
- import type { TelemetryCorrelation, TelemetryEvent, TelemetryLevel, TelemetryRedactor } from './types.ts';
2
- /**
3
- * Dispatches telemetry events as `CustomEvent` instances on a given
4
- * `EventTarget`, applying a configurable redactor before emission.
5
- */
6
- export declare class TelemetryEmitter {
7
- #private;
8
- constructor(target: EventTarget, level?: TelemetryLevel);
9
- /** Change the telemetry level, replacing the redactor. */
10
- setLevel(level: TelemetryLevel): void;
11
- /** Replace the redactor with a custom implementation. */
12
- setRedactor(fn: TelemetryRedactor): void;
13
- /** Apply the redactor and dispatch the event on the target. */
14
- emit(event: TelemetryEvent): void;
15
- emitTransport(correlation: TelemetryCorrelation, mode: string, contentType: string): void;
16
- emitGenerationStart(correlation: TelemetryCorrelation): void;
17
- emitGenerationComplete(correlation: TelemetryCorrelation, durationMs: number): void;
18
- emitWarning(correlation: TelemetryCorrelation, message: string, detail?: Record<string, unknown>): void;
19
- }
20
- //# sourceMappingURL=emitter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"emitter.d.ts","sourceRoot":"","sources":["../../../src/chat/telemetry/emitter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAIpB;;;GAGG;AACH,qBAAa,gBAAgB;;gBAIf,MAAM,EAAE,WAAW,EAAE,KAAK,GAAE,cAA0B;IAKlE,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI;IAIrC,yDAAyD;IACzD,WAAW,CAAC,EAAE,EAAE,iBAAiB,GAAG,IAAI;IAIxC,+DAA+D;IAC/D,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI;IASjC,aAAa,CACX,WAAW,EAAE,oBAAoB,EACjC,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,GAClB,IAAI;IAQP,mBAAmB,CAAC,WAAW,EAAE,oBAAoB,GAAG,IAAI;IAQ5D,sBAAsB,CACpB,WAAW,EAAE,oBAAoB,EACjC,UAAU,EAAE,MAAM,GACjB,IAAI;IAQP,WAAW,CACT,WAAW,EAAE,oBAAoB,EACjC,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,IAAI;CAOR"}
@@ -1,11 +0,0 @@
1
- export declare const CHAT_EVENTS: {
2
- readonly TRANSPORT: "native:chat-transport";
3
- readonly GENERATION_START: "native:generation-start";
4
- readonly GENERATION_COMPLETE: "native:generation-complete";
5
- readonly GENERATION_STOP: "native:generation-stop";
6
- readonly GENERATION_ERROR: "native:generation-error";
7
- readonly WARNING: "native:chat-warning";
8
- };
9
- export declare const SAFE_FIELDS: readonly ["requestId", "sessionId", "conversationId", "messageId", "mode", "contentType", "durationMs", "startedAt", "completedAt", "attempt", "maxAttempts", "chunkIndex"];
10
- export declare const SENSITIVE_FIELDS: readonly ["query", "message", "delta", "fullMessage", "body", "content", "prompt", "response"];
11
- //# sourceMappingURL=events.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/chat/telemetry/events.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;;;;;CAOd,CAAC;AAEX,eAAO,MAAM,WAAW,6KAad,CAAC;AAEX,eAAO,MAAM,gBAAgB,gGASnB,CAAC"}
@@ -1,5 +0,0 @@
1
- export type { TelemetryCorrelation, TelemetryTiming, TelemetryRetry, TelemetryLevel, TelemetryEvent, TelemetryRedactor, } from './types.ts';
2
- export { CHAT_EVENTS, SAFE_FIELDS, SENSITIVE_FIELDS } from './events.ts';
3
- export { scrubPII, createDefaultRedactor } from './redactor.ts';
4
- export { TelemetryEmitter } from './emitter.ts';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chat/telemetry/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEzE,OAAO,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC"}
@@ -1,17 +0,0 @@
1
- import type { TelemetryLevel, TelemetryRedactor } from './types.ts';
2
- /**
3
- * Scrub common PII patterns from a string.
4
- *
5
- * Replaces email addresses, phone-like numbers, and credit-card-like
6
- * number sequences with `[redacted]` placeholders.
7
- */
8
- export declare function scrubPII(text: string): string;
9
- /**
10
- * Create a default redactor for the given telemetry level.
11
- *
12
- * - **minimal**: Sensitive fields in `detail` are replaced with
13
- * `[redacted:Nchars]` indicating the original length.
14
- * - **debug**: All fields pass through unmodified.
15
- */
16
- export declare function createDefaultRedactor(level: TelemetryLevel): TelemetryRedactor;
17
- //# sourceMappingURL=redactor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"redactor.d.ts","sourceRoot":"","sources":["../../../src/chat/telemetry/redactor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AASpF;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAK7C;AAMD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,cAAc,GAAG,iBAAiB,CAmB9E"}