@angflow/angular 0.0.17 → 0.0.18

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 (168) hide show
  1. package/README.md +53 -0
  2. package/dist/base.css +18 -0
  3. package/dist/esm/lib/agent/agent-bridge.service.d.ts +6 -2
  4. package/dist/esm/lib/agent/agent-bridge.service.d.ts.map +1 -1
  5. package/dist/esm/lib/agent/agent-bridge.service.js +228 -5
  6. package/dist/esm/lib/agent/agent-bridge.service.js.map +1 -1
  7. package/dist/esm/lib/agent/chat/agent-chat.component.d.ts +20 -0
  8. package/dist/esm/lib/agent/chat/agent-chat.component.d.ts.map +1 -0
  9. package/dist/esm/lib/agent/chat/agent-chat.component.js +174 -0
  10. package/dist/esm/lib/agent/chat/agent-chat.component.js.map +1 -0
  11. package/dist/esm/lib/agent/chat/agent-chat.service.d.ts +43 -0
  12. package/dist/esm/lib/agent/chat/agent-chat.service.d.ts.map +1 -0
  13. package/dist/esm/lib/agent/chat/agent-chat.service.js +226 -0
  14. package/dist/esm/lib/agent/chat/agent-chat.service.js.map +1 -0
  15. package/dist/esm/lib/agent/chat/default-system-prompt.d.ts +6 -0
  16. package/dist/esm/lib/agent/chat/default-system-prompt.d.ts.map +1 -0
  17. package/dist/esm/lib/agent/chat/default-system-prompt.js +14 -0
  18. package/dist/esm/lib/agent/chat/default-system-prompt.js.map +1 -0
  19. package/dist/esm/lib/agent/chat/index.d.ts +7 -0
  20. package/dist/esm/lib/agent/chat/index.d.ts.map +1 -0
  21. package/dist/esm/lib/agent/chat/index.js +5 -0
  22. package/dist/esm/lib/agent/chat/index.js.map +1 -0
  23. package/dist/esm/lib/agent/chat/provide-agent-chat.d.ts +29 -0
  24. package/dist/esm/lib/agent/chat/provide-agent-chat.d.ts.map +1 -0
  25. package/dist/esm/lib/agent/chat/provide-agent-chat.js +40 -0
  26. package/dist/esm/lib/agent/chat/provide-agent-chat.js.map +1 -0
  27. package/dist/esm/lib/agent/chat/types.d.ts +77 -0
  28. package/dist/esm/lib/agent/chat/types.d.ts.map +1 -0
  29. package/dist/esm/lib/agent/chat/types.js +9 -0
  30. package/dist/esm/lib/agent/chat/types.js.map +1 -0
  31. package/dist/esm/lib/agent/index.d.ts +1 -0
  32. package/dist/esm/lib/agent/index.d.ts.map +1 -1
  33. package/dist/esm/lib/agent/index.js +1 -0
  34. package/dist/esm/lib/agent/index.js.map +1 -1
  35. package/dist/esm/lib/agent/provide-agent-bridge.d.ts +8 -0
  36. package/dist/esm/lib/agent/provide-agent-bridge.d.ts.map +1 -1
  37. package/dist/esm/lib/agent/provide-agent-bridge.js +2 -1
  38. package/dist/esm/lib/agent/provide-agent-bridge.js.map +1 -1
  39. package/dist/esm/lib/agent/tool-schemas.d.ts.map +1 -1
  40. package/dist/esm/lib/agent/tool-schemas.js +138 -0
  41. package/dist/esm/lib/agent/tool-schemas.js.map +1 -1
  42. package/dist/esm/lib/components/a11y-descriptions/a11y-descriptions.component.js +3 -3
  43. package/dist/esm/lib/components/a11y-descriptions/a11y-descriptions.component.js.map +1 -1
  44. package/dist/esm/lib/components/attribution/attribution.component.js +3 -3
  45. package/dist/esm/lib/components/attribution/attribution.component.js.map +1 -1
  46. package/dist/esm/lib/components/background/background.component.js +3 -3
  47. package/dist/esm/lib/components/background/background.component.js.map +1 -1
  48. package/dist/esm/lib/components/connection-line/connection-line.component.js +3 -3
  49. package/dist/esm/lib/components/connection-line/connection-line.component.js.map +1 -1
  50. package/dist/esm/lib/components/controls/controls.component.js +3 -3
  51. package/dist/esm/lib/components/controls/controls.component.js.map +1 -1
  52. package/dist/esm/lib/components/edge-label-renderer/edge-label-renderer.component.js +3 -3
  53. package/dist/esm/lib/components/edge-label-renderer/edge-label-renderer.component.js.map +1 -1
  54. package/dist/esm/lib/components/edge-toolbar/edge-toolbar.component.d.ts +2 -2
  55. package/dist/esm/lib/components/edge-toolbar/edge-toolbar.component.js +3 -3
  56. package/dist/esm/lib/components/edge-toolbar/edge-toolbar.component.js.map +1 -1
  57. package/dist/esm/lib/components/edges/base-edge.component.js +3 -3
  58. package/dist/esm/lib/components/edges/base-edge.component.js.map +1 -1
  59. package/dist/esm/lib/components/edges/bezier-edge.component.js +3 -3
  60. package/dist/esm/lib/components/edges/bezier-edge.component.js.map +1 -1
  61. package/dist/esm/lib/components/edges/edge-text.component.js +3 -3
  62. package/dist/esm/lib/components/edges/edge-text.component.js.map +1 -1
  63. package/dist/esm/lib/components/edges/simple-bezier-edge.component.js +3 -3
  64. package/dist/esm/lib/components/edges/simple-bezier-edge.component.js.map +1 -1
  65. package/dist/esm/lib/components/edges/smooth-step-edge.component.js +3 -3
  66. package/dist/esm/lib/components/edges/smooth-step-edge.component.js.map +1 -1
  67. package/dist/esm/lib/components/edges/step-edge.component.js +3 -3
  68. package/dist/esm/lib/components/edges/step-edge.component.js.map +1 -1
  69. package/dist/esm/lib/components/edges/straight-edge.component.js +3 -3
  70. package/dist/esm/lib/components/edges/straight-edge.component.js.map +1 -1
  71. package/dist/esm/lib/components/handle/handle.component.js +3 -3
  72. package/dist/esm/lib/components/handle/handle.component.js.map +1 -1
  73. package/dist/esm/lib/components/handle-group/handle-group.component.d.ts +1 -1
  74. package/dist/esm/lib/components/handle-group/handle-group.component.js +3 -3
  75. package/dist/esm/lib/components/handle-group/handle-group.component.js.map +1 -1
  76. package/dist/esm/lib/components/handle-group/handle-row.component.js +3 -3
  77. package/dist/esm/lib/components/handle-group/handle-row.component.js.map +1 -1
  78. package/dist/esm/lib/components/minimap/minimap.component.js +3 -3
  79. package/dist/esm/lib/components/minimap/minimap.component.js.map +1 -1
  80. package/dist/esm/lib/components/ng-flow-provider/ng-flow-provider.component.js +3 -3
  81. package/dist/esm/lib/components/ng-flow-provider/ng-flow-provider.component.js.map +1 -1
  82. package/dist/esm/lib/components/node-resizer/node-resizer.component.js +3 -3
  83. package/dist/esm/lib/components/node-resizer/node-resizer.component.js.map +1 -1
  84. package/dist/esm/lib/components/node-toolbar/node-toolbar.component.js +3 -3
  85. package/dist/esm/lib/components/node-toolbar/node-toolbar.component.js.map +1 -1
  86. package/dist/esm/lib/components/nodes/default-node.component.js +3 -3
  87. package/dist/esm/lib/components/nodes/default-node.component.js.map +1 -1
  88. package/dist/esm/lib/components/nodes/group-node.component.js +3 -3
  89. package/dist/esm/lib/components/nodes/group-node.component.js.map +1 -1
  90. package/dist/esm/lib/components/nodes/input-node.component.js +3 -3
  91. package/dist/esm/lib/components/nodes/input-node.component.js.map +1 -1
  92. package/dist/esm/lib/components/nodes/output-node.component.js +3 -3
  93. package/dist/esm/lib/components/nodes/output-node.component.js.map +1 -1
  94. package/dist/esm/lib/components/nodes/template-node.component.d.ts +48 -0
  95. package/dist/esm/lib/components/nodes/template-node.component.d.ts.map +1 -0
  96. package/dist/esm/lib/components/nodes/template-node.component.js +209 -0
  97. package/dist/esm/lib/components/nodes/template-node.component.js.map +1 -0
  98. package/dist/esm/lib/components/panel/panel.component.js +3 -3
  99. package/dist/esm/lib/components/panel/panel.component.js.map +1 -1
  100. package/dist/esm/lib/components/selection-box/selection-box.component.js +3 -3
  101. package/dist/esm/lib/components/selection-box/selection-box.component.js.map +1 -1
  102. package/dist/esm/lib/components/viewport-portal/viewport-portal.component.js +3 -3
  103. package/dist/esm/lib/components/viewport-portal/viewport-portal.component.js.map +1 -1
  104. package/dist/esm/lib/container/edge-renderer/edge-renderer.component.d.ts.map +1 -1
  105. package/dist/esm/lib/container/edge-renderer/edge-renderer.component.js +9 -5
  106. package/dist/esm/lib/container/edge-renderer/edge-renderer.component.js.map +1 -1
  107. package/dist/esm/lib/container/ng-flow/ng-flow.component.d.ts +19 -1
  108. package/dist/esm/lib/container/ng-flow/ng-flow.component.d.ts.map +1 -1
  109. package/dist/esm/lib/container/ng-flow/ng-flow.component.js +28 -4
  110. package/dist/esm/lib/container/ng-flow/ng-flow.component.js.map +1 -1
  111. package/dist/esm/lib/container/node-renderer/node-renderer.component.d.ts +5 -0
  112. package/dist/esm/lib/container/node-renderer/node-renderer.component.d.ts.map +1 -1
  113. package/dist/esm/lib/container/node-renderer/node-renderer.component.js +71 -7
  114. package/dist/esm/lib/container/node-renderer/node-renderer.component.js.map +1 -1
  115. package/dist/esm/lib/container/pane/pane.component.js +3 -3
  116. package/dist/esm/lib/container/pane/pane.component.js.map +1 -1
  117. package/dist/esm/lib/container/viewport/viewport.component.js +3 -3
  118. package/dist/esm/lib/container/viewport/viewport.component.js.map +1 -1
  119. package/dist/esm/lib/directives/drag.directive.js +3 -3
  120. package/dist/esm/lib/directives/drag.directive.js.map +1 -1
  121. package/dist/esm/lib/directives/drop-zone.directive.js +3 -3
  122. package/dist/esm/lib/directives/drop-zone.directive.js.map +1 -1
  123. package/dist/esm/lib/directives/key-handler.directive.js +3 -3
  124. package/dist/esm/lib/directives/key-handler.directive.js.map +1 -1
  125. package/dist/esm/lib/directives/node-type.directive.js +3 -3
  126. package/dist/esm/lib/directives/node-type.directive.js.map +1 -1
  127. package/dist/esm/lib/layout/dagre-layout.d.ts +12 -0
  128. package/dist/esm/lib/layout/dagre-layout.d.ts.map +1 -0
  129. package/dist/esm/lib/layout/dagre-layout.js +13 -0
  130. package/dist/esm/lib/layout/dagre-layout.js.map +1 -0
  131. package/dist/esm/lib/layout/index.d.ts +4 -0
  132. package/dist/esm/lib/layout/index.d.ts.map +1 -0
  133. package/dist/esm/lib/layout/index.js +3 -0
  134. package/dist/esm/lib/layout/index.js.map +1 -0
  135. package/dist/esm/lib/layout/layout-nodes.d.ts +47 -0
  136. package/dist/esm/lib/layout/layout-nodes.d.ts.map +1 -0
  137. package/dist/esm/lib/layout/layout-nodes.js +49 -0
  138. package/dist/esm/lib/layout/layout-nodes.js.map +1 -0
  139. package/dist/esm/lib/public-api.d.ts +2 -1
  140. package/dist/esm/lib/public-api.d.ts.map +1 -1
  141. package/dist/esm/lib/public-api.js +4 -1
  142. package/dist/esm/lib/public-api.js.map +1 -1
  143. package/dist/esm/lib/services/flow-store.service.d.ts +52 -2
  144. package/dist/esm/lib/services/flow-store.service.d.ts.map +1 -1
  145. package/dist/esm/lib/services/flow-store.service.js +145 -3
  146. package/dist/esm/lib/services/flow-store.service.js.map +1 -1
  147. package/dist/esm/lib/services/ng-flow.service.d.ts +81 -0
  148. package/dist/esm/lib/services/ng-flow.service.d.ts.map +1 -1
  149. package/dist/esm/lib/services/ng-flow.service.js +127 -3
  150. package/dist/esm/lib/services/ng-flow.service.js.map +1 -1
  151. package/dist/esm/lib/types/index.d.ts +1 -0
  152. package/dist/esm/lib/types/index.d.ts.map +1 -1
  153. package/dist/esm/lib/types/index.js +1 -0
  154. package/dist/esm/lib/types/index.js.map +1 -1
  155. package/dist/esm/lib/types/node-template.d.ts +77 -0
  156. package/dist/esm/lib/types/node-template.d.ts.map +1 -0
  157. package/dist/esm/lib/types/node-template.js +10 -0
  158. package/dist/esm/lib/types/node-template.js.map +1 -0
  159. package/dist/esm/lib/utils/position-tween.d.ts +19 -0
  160. package/dist/esm/lib/utils/position-tween.d.ts.map +1 -0
  161. package/dist/esm/lib/utils/position-tween.js +25 -0
  162. package/dist/esm/lib/utils/position-tween.js.map +1 -0
  163. package/dist/esm/lib/utils/template-interpolation.d.ts +16 -0
  164. package/dist/esm/lib/utils/template-interpolation.d.ts.map +1 -0
  165. package/dist/esm/lib/utils/template-interpolation.js +51 -0
  166. package/dist/esm/lib/utils/template-interpolation.js.map +1 -0
  167. package/dist/style.css +18 -0
  168. package/package.json +78 -66
@@ -0,0 +1,226 @@
1
+ import { Injectable, inject, signal } from '@angular/core';
2
+ import { AngflowAgentBridge } from '../agent-bridge.service';
3
+ import { AGENT_TOOL_SCHEMAS } from '../tool-schemas';
4
+ import { AGENT_CHAT_CONFIG } from './provide-agent-chat';
5
+ import { toAgentChatTools, } from './types';
6
+ import * as i0 from "@angular/core";
7
+ const SUMMARY_MAX = 120;
8
+ function truncate(text) {
9
+ return text.length > SUMMARY_MAX ? `${text.slice(0, SUMMARY_MAX)}…` : text;
10
+ }
11
+ /**
12
+ * Headless tool-use loop for the in-browser canvas copilot.
13
+ *
14
+ * Each `send()` runs: build request → `complete()` → execute `tool_use`
15
+ * blocks in-process via `bridge.callTool` → feed `tool_result` blocks back →
16
+ * repeat until `end_turn`, `maxTurns`, or `stop()`. State is exposed as
17
+ * signals so any UI (the bundled `<ng-flow-agent-chat>` or a custom one)
18
+ * renders zoneless-clean.
19
+ *
20
+ * Tool errors do NOT abort the loop — they become `is_error` tool_results
21
+ * the model can react to. Only `complete()` failures abort the turn.
22
+ */
23
+ export class AgentChatService {
24
+ constructor() {
25
+ this.bridge = inject(AngflowAgentBridge);
26
+ this.config = inject(AGENT_CHAT_CONFIG);
27
+ this._messages = signal([], ...(ngDevMode ? [{ debugName: "_messages" }] : /* istanbul ignore next */ []));
28
+ this._busy = signal(false, ...(ngDevMode ? [{ debugName: "_busy" }] : /* istanbul ignore next */ []));
29
+ this._error = signal(null, ...(ngDevMode ? [{ debugName: "_error" }] : /* istanbul ignore next */ []));
30
+ /** Conversation as rendered by the UI. */
31
+ this.messages = this._messages.asReadonly();
32
+ /** True while a send() turn (including tool rounds) is running. */
33
+ this.busy = this._busy.asReadonly();
34
+ /** Last transport/loop failure; cleared on the next send(). */
35
+ this.error = this._error.asReadonly();
36
+ /** Wire-format history sent to complete(). */
37
+ this.history = [];
38
+ this.stopped = false;
39
+ this.nextMessageId = 1;
40
+ this.tools = toAgentChatTools(AGENT_TOOL_SCHEMAS);
41
+ }
42
+ /** Abort after the current step; in-flight complete() results are discarded. */
43
+ stop() {
44
+ this.stopped = true;
45
+ }
46
+ /** Reset the conversation. No-op while busy. */
47
+ clear() {
48
+ if (this._busy())
49
+ return;
50
+ this.history = [];
51
+ this._messages.set([]);
52
+ this._error.set(null);
53
+ }
54
+ async send(text) {
55
+ if (this._busy() || text.trim().length === 0)
56
+ return;
57
+ this._busy.set(true);
58
+ this._error.set(null);
59
+ this.stopped = false;
60
+ this.appendMessage({ role: 'user', text, activity: [] });
61
+ this.history.push({ role: 'user', content: [{ type: 'text', text }] });
62
+ try {
63
+ for (let turn = 0; turn < this.config.maxTurns; turn++) {
64
+ if (this.stopped)
65
+ return;
66
+ const response = await this.config.complete({
67
+ system: this.config.systemPrompt,
68
+ messages: this.trimmedHistory(),
69
+ tools: this.tools,
70
+ max_tokens: this.config.maxTokens,
71
+ });
72
+ if (this.stopped)
73
+ return; // discard in-flight results
74
+ const { assistantText, toolUses } = splitContent(response);
75
+ const message = this.appendMessage({
76
+ role: 'assistant',
77
+ text: assistantText,
78
+ activity: toolUses.map((tu) => ({
79
+ name: tu.name,
80
+ status: 'running',
81
+ summary: '',
82
+ })),
83
+ });
84
+ this.history.push({ role: 'assistant', content: response.content });
85
+ if (toolUses.length === 0 || response.stop_reason !== 'tool_use') {
86
+ return; // end_turn / max_tokens: the text shown is the final answer
87
+ }
88
+ const results = [];
89
+ for (let i = 0; i < toolUses.length; i++) {
90
+ const tu = toolUses[i];
91
+ try {
92
+ const result = await this.bridge.callTool(tu.name, tu.input);
93
+ this.updateActivity(message.id, i, {
94
+ status: 'ok',
95
+ summary: truncate(JSON.stringify(result ?? null)),
96
+ });
97
+ results.push({
98
+ type: 'tool_result',
99
+ tool_use_id: tu.id,
100
+ content: JSON.stringify(result ?? null),
101
+ });
102
+ }
103
+ catch (err) {
104
+ const detail = formatToolError(err);
105
+ this.updateActivity(message.id, i, { status: 'error', summary: detail });
106
+ results.push({
107
+ type: 'tool_result',
108
+ tool_use_id: tu.id,
109
+ content: detail,
110
+ is_error: true,
111
+ });
112
+ }
113
+ if (this.stopped) {
114
+ // Synthesize cancelled results for all not-yet-executed tool_uses
115
+ // so history never ends with a dangling assistant tool_use block.
116
+ // Anthropic rejects any request where a tool_use has no matching
117
+ // tool_result in the immediately following user turn.
118
+ for (let j = i + 1; j < toolUses.length; j++) {
119
+ results.push({
120
+ type: 'tool_result',
121
+ tool_use_id: toolUses[j].id,
122
+ content: '[cancelled] the user stopped this turn',
123
+ is_error: true,
124
+ });
125
+ }
126
+ this.history.push({ role: 'user', content: results });
127
+ return;
128
+ }
129
+ }
130
+ this.history.push({ role: 'user', content: results });
131
+ }
132
+ // maxTurns exhausted.
133
+ this.appendMessage({
134
+ role: 'assistant',
135
+ text: '(stopped: too many tool rounds)',
136
+ activity: [],
137
+ });
138
+ }
139
+ catch (err) {
140
+ // complete() failed: abort the turn, keep history retry-safe (the
141
+ // user message stays; no partial assistant turn was recorded for
142
+ // the failed round because history.push happens after complete()).
143
+ this._error.set(err instanceof Error ? err.message : String(err));
144
+ }
145
+ finally {
146
+ this._busy.set(false);
147
+ }
148
+ }
149
+ trimmedHistory() {
150
+ if (this.history.length <= this.config.maxHistory) {
151
+ return this.history;
152
+ }
153
+ let trimmed = this.history.slice(this.history.length - this.config.maxHistory);
154
+ // Anthropic requires the first message to be a user turn — and a
155
+ // leading tool_result-only user turn is as confusing as an assistant
156
+ // turn, so drop until we reach a plain user text message.
157
+ while (trimmed.length > 0 &&
158
+ !(trimmed[0].role === 'user' && trimmed[0].content.some((b) => b.type === 'text'))) {
159
+ trimmed = trimmed.slice(1);
160
+ }
161
+ if (trimmed.length === 0) {
162
+ // The repair loop emptied the slice — this happens when maxHistory is
163
+ // small and the tail lands entirely within a multi-round tool turn
164
+ // (assistant tool_use + user tool_result, no plain text leader).
165
+ // Protocol validity beats the soft cap: fall back to the most recent
166
+ // plain user-text boundary in the FULL history so that all tool_use /
167
+ // tool_result pairs of the current round are intact.
168
+ // Note: this may yield slightly more than maxHistory entries — that is
169
+ // the correct trade-off.
170
+ let fallbackIndex = -1;
171
+ for (let i = this.history.length - 1; i >= 0; i--) {
172
+ const m = this.history[i];
173
+ if (m.role === 'user' && m.content.some((b) => b.type === 'text')) {
174
+ fallbackIndex = i;
175
+ break;
176
+ }
177
+ }
178
+ trimmed = fallbackIndex >= 0 ? this.history.slice(fallbackIndex) : this.history;
179
+ }
180
+ // Only collapse history when the trimmed result is valid (non-empty,
181
+ // user-text leader). This avoids destructively assigning [] when the
182
+ // repair fails, which would corrupt subsequent sends.
183
+ if (trimmed.length > 0 && trimmed[0].role === 'user') {
184
+ this.history = trimmed;
185
+ }
186
+ return trimmed;
187
+ }
188
+ appendMessage(msg) {
189
+ const full = { id: this.nextMessageId++, ...msg };
190
+ this._messages.update((all) => [...all, full]);
191
+ return full;
192
+ }
193
+ updateActivity(messageId, index, patch) {
194
+ this._messages.update((all) => all.map((m) => m.id === messageId
195
+ ? {
196
+ ...m,
197
+ activity: m.activity.map((a, i) => (i === index ? { ...a, ...patch } : a)),
198
+ }
199
+ : m));
200
+ }
201
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: AgentChatService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
202
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: AgentChatService }); }
203
+ }
204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: AgentChatService, decorators: [{
205
+ type: Injectable
206
+ }] });
207
+ function splitContent(response) {
208
+ const texts = [];
209
+ const toolUses = [];
210
+ for (const block of response.content) {
211
+ if (block.type === 'text')
212
+ texts.push(block.text);
213
+ if (block.type === 'tool_use')
214
+ toolUses.push(block);
215
+ }
216
+ return { assistantText: texts.join('\n'), toolUses };
217
+ }
218
+ /** Bridge errors carry code/data (see AngflowAgentBridge.callTool). */
219
+ function formatToolError(err) {
220
+ if (err instanceof Error) {
221
+ const code = err.code;
222
+ return code !== undefined ? `[${code}] ${err.message}` : err.message;
223
+ }
224
+ return String(err);
225
+ }
226
+ //# sourceMappingURL=agent-chat.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-chat.service.js","sourceRoot":"","sources":["../../../../../src/lib/agent/chat/agent-chat.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MA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AI,CAAC;QACrD,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,IAAI,KAAK,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC;IACvE,CAAC;IACD,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;AACrB,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Default system prompt for the in-browser canvas copilot. Hosts override
3
+ * via `provideAgentChat({ systemPrompt })`.
4
+ */
5
+ export declare const DEFAULT_AGENT_CHAT_SYSTEM_PROMPT = "You are a copilot operating a node-graph canvas on behalf of the user. You manipulate the canvas exclusively through the provided tools while the user watches \u2014 and may keep editing alongside you.\n\nGuidelines:\n- Inspect before large changes: call get_state to see the current graph, and list_node_types to learn which node types this app renders.\n- Never hand-compute coordinates for more than a couple of nodes \u2014 create the nodes, then call layout_nodes to arrange them.\n- For new visual kinds of nodes, call register_node_template once, then create nodes with that type. Interpolate node data into the template with {{data.field}} placeholders.\n- Prefer incremental tools (add_node, add_edge, update_node, delete_elements, apply_changes) over set_nodes/set_edges full replacement.\n- Every mutation you make is undoable: the user can revert via undo, so act decisively rather than asking for confirmation.\n- The user sees the canvas change live. Keep your text responses to one or two short sentences describing what you did.";
6
+ //# sourceMappingURL=default-system-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-system-prompt.d.ts","sourceRoot":"","sources":["../../../../../src/lib/agent/chat/default-system-prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,gCAAgC,yhCAQ2E,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Default system prompt for the in-browser canvas copilot. Hosts override
3
+ * via `provideAgentChat({ systemPrompt })`.
4
+ */
5
+ export const DEFAULT_AGENT_CHAT_SYSTEM_PROMPT = `You are a copilot operating a node-graph canvas on behalf of the user. You manipulate the canvas exclusively through the provided tools while the user watches — and may keep editing alongside you.
6
+
7
+ Guidelines:
8
+ - Inspect before large changes: call get_state to see the current graph, and list_node_types to learn which node types this app renders.
9
+ - Never hand-compute coordinates for more than a couple of nodes — create the nodes, then call layout_nodes to arrange them.
10
+ - For new visual kinds of nodes, call register_node_template once, then create nodes with that type. Interpolate node data into the template with {{data.field}} placeholders.
11
+ - Prefer incremental tools (add_node, add_edge, update_node, delete_elements, apply_changes) over set_nodes/set_edges full replacement.
12
+ - Every mutation you make is undoable: the user can revert via undo, so act decisively rather than asking for confirmation.
13
+ - The user sees the canvas change live. Keep your text responses to one or two short sentences describing what you did.`;
14
+ //# sourceMappingURL=default-system-prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-system-prompt.js","sourceRoot":"","sources":["../../../../../src/lib/agent/chat/default-system-prompt.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG;;;;;;;;wHAQwE,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { provideAgentChat, AGENT_CHAT_CONFIG } from './provide-agent-chat';
2
+ export type { ResolvedAgentChatConfig } from './provide-agent-chat';
3
+ export { AgentChatService } from './agent-chat.service';
4
+ export { AgentChatComponent } from './agent-chat.component';
5
+ export { DEFAULT_AGENT_CHAT_SYSTEM_PROMPT } from './default-system-prompt';
6
+ export type { AgentChatConfig, AgentChatRequest, AgentChatResponse, AgentChatMessageParam, AgentChatContentBlock, AgentChatTextBlock, AgentChatToolUseBlock, AgentChatToolResultBlock, AgentChatTool, CompleteFn, ChatMessage, ToolActivity, } from './types';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/agent/chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC3E,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AAC3E,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,aAAa,EACb,UAAU,EACV,WAAW,EACX,YAAY,GACb,MAAM,SAAS,CAAC"}
@@ -0,0 +1,5 @@
1
+ export { provideAgentChat, AGENT_CHAT_CONFIG } from './provide-agent-chat';
2
+ export { AgentChatService } from './agent-chat.service';
3
+ export { AgentChatComponent } from './agent-chat.component';
4
+ export { DEFAULT_AGENT_CHAT_SYSTEM_PROMPT } from './default-system-prompt';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/agent/chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { InjectionToken, type EnvironmentProviders } from '@angular/core';
2
+ import type { AgentChatConfig } from './types';
3
+ /** Resolved (defaults applied) chat configuration. */
4
+ export type ResolvedAgentChatConfig = Required<AgentChatConfig>;
5
+ export declare const AGENT_CHAT_CONFIG: InjectionToken<Required<AgentChatConfig>>;
6
+ /**
7
+ * Register the in-browser agent chat harness.
8
+ *
9
+ * The `complete` function is the ONLY path to the model: typically a fetch
10
+ * to your own backend proxy, which holds the API key server-side. The
11
+ * library and the browser bundle never handle a key.
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * provideAgentChat({
16
+ * complete: (req) =>
17
+ * fetch('/api/agent', {
18
+ * method: 'POST',
19
+ * headers: { 'content-type': 'application/json' },
20
+ * body: JSON.stringify(req),
21
+ * }).then((r) => {
22
+ * if (!r.ok) throw new Error(`agent proxy responded ${r.status}`);
23
+ * return r.json();
24
+ * }),
25
+ * })
26
+ * ```
27
+ */
28
+ export declare function provideAgentChat(config: AgentChatConfig): EnvironmentProviders;
29
+ //# sourceMappingURL=provide-agent-chat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provide-agent-chat.d.ts","sourceRoot":"","sources":["../../../../../src/lib/agent/chat/provide-agent-chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAA4B,KAAK,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAGpG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,sDAAsD;AACtD,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEhE,eAAO,MAAM,iBAAiB,2CAE7B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe,GAAG,oBAAoB,CAY9E"}
@@ -0,0 +1,40 @@
1
+ import { InjectionToken, makeEnvironmentProviders } from '@angular/core';
2
+ import { AgentChatService } from './agent-chat.service';
3
+ import { DEFAULT_AGENT_CHAT_SYSTEM_PROMPT } from './default-system-prompt';
4
+ export const AGENT_CHAT_CONFIG = new InjectionToken('AngflowAgentChatConfig');
5
+ /**
6
+ * Register the in-browser agent chat harness.
7
+ *
8
+ * The `complete` function is the ONLY path to the model: typically a fetch
9
+ * to your own backend proxy, which holds the API key server-side. The
10
+ * library and the browser bundle never handle a key.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * provideAgentChat({
15
+ * complete: (req) =>
16
+ * fetch('/api/agent', {
17
+ * method: 'POST',
18
+ * headers: { 'content-type': 'application/json' },
19
+ * body: JSON.stringify(req),
20
+ * }).then((r) => {
21
+ * if (!r.ok) throw new Error(`agent proxy responded ${r.status}`);
22
+ * return r.json();
23
+ * }),
24
+ * })
25
+ * ```
26
+ */
27
+ export function provideAgentChat(config) {
28
+ const resolved = {
29
+ complete: config.complete,
30
+ systemPrompt: config.systemPrompt ?? DEFAULT_AGENT_CHAT_SYSTEM_PROMPT,
31
+ maxTurns: config.maxTurns ?? 12,
32
+ maxTokens: config.maxTokens ?? 2048,
33
+ maxHistory: config.maxHistory ?? 40,
34
+ };
35
+ return makeEnvironmentProviders([
36
+ { provide: AGENT_CHAT_CONFIG, useValue: resolved },
37
+ AgentChatService,
38
+ ]);
39
+ }
40
+ //# sourceMappingURL=provide-agent-chat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provide-agent-chat.js","sourceRoot":"","sources":["../../../../../src/lib/agent/chat/provide-agent-chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAA6B,MAAM,eAAe,CAAC;AACpG,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AAM3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,cAAc,CACjD,wBAAwB,CACzB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAuB;IACtD,MAAM,QAAQ,GAA4B;QACxC,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,YAAY,EAAE,MAAM,CAAC,YAAY,IAAI,gCAAgC;QACrE,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,EAAE;QAC/B,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,IAAI;QACnC,UAAU,EAAE,MAAM,CAAC,UAAU,IAAI,EAAE;KACpC,CAAC;IACF,OAAO,wBAAwB,CAAC;QAC9B,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,EAAE;QAClD,gBAAgB;KACjB,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Contracts for the in-browser agent chat harness.
3
+ *
4
+ * `CompleteFn` carries the Anthropic Messages API subset the loop uses —
5
+ * the host's backend proxy forwards it into `client.messages.create` (adding
6
+ * model + key server-side) and returns `{ content, stop_reason }`. The
7
+ * library and the browser never see an API key.
8
+ */
9
+ import type { AgentToolSchema } from '../types';
10
+ export interface AgentChatTextBlock {
11
+ type: 'text';
12
+ text: string;
13
+ }
14
+ export interface AgentChatToolUseBlock {
15
+ type: 'tool_use';
16
+ id: string;
17
+ name: string;
18
+ input: Record<string, unknown>;
19
+ }
20
+ export interface AgentChatToolResultBlock {
21
+ type: 'tool_result';
22
+ tool_use_id: string;
23
+ content: string;
24
+ is_error?: boolean;
25
+ }
26
+ export type AgentChatContentBlock = AgentChatTextBlock | AgentChatToolUseBlock | AgentChatToolResultBlock;
27
+ export interface AgentChatMessageParam {
28
+ role: 'user' | 'assistant';
29
+ content: AgentChatContentBlock[];
30
+ }
31
+ /** Anthropic's wire tool format (snake_case `input_schema`). */
32
+ export interface AgentChatTool {
33
+ name: string;
34
+ description: string;
35
+ input_schema: AgentToolSchema['inputSchema'];
36
+ }
37
+ export interface AgentChatRequest {
38
+ system: string;
39
+ messages: AgentChatMessageParam[];
40
+ tools: AgentChatTool[];
41
+ max_tokens: number;
42
+ }
43
+ export interface AgentChatResponse {
44
+ content: Array<AgentChatTextBlock | AgentChatToolUseBlock>;
45
+ stop_reason: 'end_turn' | 'tool_use' | 'max_tokens' | (string & {});
46
+ }
47
+ /**
48
+ * Host-supplied completion function — typically a fetch to the host's own
49
+ * backend proxy. Must reject (throw) on transport/HTTP failure.
50
+ */
51
+ export type CompleteFn = (req: AgentChatRequest) => Promise<AgentChatResponse>;
52
+ export interface ToolActivity {
53
+ name: string;
54
+ status: 'running' | 'ok' | 'error';
55
+ /** Short result/error preview for tooltips. */
56
+ summary: string;
57
+ }
58
+ export interface ChatMessage {
59
+ id: number;
60
+ role: 'user' | 'assistant';
61
+ text: string;
62
+ activity: ToolActivity[];
63
+ }
64
+ export interface AgentChatConfig {
65
+ complete: CompleteFn;
66
+ /** Defaults to DEFAULT_AGENT_CHAT_SYSTEM_PROMPT. */
67
+ systemPrompt?: string;
68
+ /** Max model round-trips per send(). Default 12. */
69
+ maxTurns?: number;
70
+ /** max_tokens per completion. Default 2048. */
71
+ maxTokens?: number;
72
+ /** Max wire-history entries kept (oldest dropped first). Default 40. */
73
+ maxHistory?: number;
74
+ }
75
+ /** Map the bridge catalog to Anthropic's wire tool format. Pure; no mutation. */
76
+ export declare function toAgentChatTools(schemas: readonly AgentToolSchema[]): AgentChatTool[];
77
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/agent/chat/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIhD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,aAAa,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,qBAAqB,GAC7B,kBAAkB,GAClB,qBAAqB,GACrB,wBAAwB,CAAC;AAE7B,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC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C,EAAE,MAAM,CAAC;CACrB;AAED,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,SAAS,eAAe,EAAE,GAAG,aAAa,EAAE,CAMrF"}
@@ -0,0 +1,9 @@
1
+ /** Map the bridge catalog to Anthropic's wire tool format. Pure; no mutation. */
2
+ export function toAgentChatTools(schemas) {
3
+ return schemas.map((s) => ({
4
+ name: s.name,
5
+ description: s.description,
6
+ input_schema: s.inputSchema,
7
+ }));
8
+ }
9
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/lib/agent/chat/types.ts"],"names":[],"mappings":"AAgGA,iFAAiF;AACjF,MAAM,UAAU,gBAAgB,CAAC,OAAmC;IAClE,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QACzB,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,YAAY,EAAE,CAAC,CAAC,WAAW;KAC5B,CAAC,CAAC,CAAC;AACN,CAAC"}
@@ -5,4 +5,5 @@ export { AGENT_TOOL_SCHEMAS } from './tool-schemas';
5
5
  export { WindowTransport, type WindowTransportOptions } from './transports/window';
6
6
  export { WebSocketTransport, type WebSocketTransportOptions } from './transports/websocket';
7
7
  export type { AgentRequest, AgentResponse, AgentSuccessResponse, AgentErrorResponse, AgentEvent, AgentInbound, AgentOutbound, AgentTransport, AgentToolSchema, } from './types';
8
+ export * from './chat';
8
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/agent/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,KAAK,iBAAiB,EAAE,KAAK,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAClH,YAAY,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,KAAK,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAC5F,YAAY,EACV,YAAY,EACZ,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,eAAe,GAChB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/agent/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,KAAK,iBAAiB,EAAE,KAAK,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAClH,YAAY,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,KAAK,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAC5F,YAAY,EACV,YAAY,EACZ,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,eAAe,GAChB,MAAM,SAAS,CAAC;AACjB,cAAc,QAAQ,CAAC"}
@@ -3,4 +3,5 @@ export { provideAgentBridge } from './provide-agent-bridge';
3
3
  export { AGENT_TOOL_SCHEMAS } from './tool-schemas';
4
4
  export { WindowTransport } from './transports/window';
5
5
  export { WebSocketTransport } from './transports/websocket';
6
+ export * from './chat';
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/agent/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAwD,MAAM,wBAAwB,CAAC;AAElH,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,eAAe,EAA+B,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAkC,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/agent/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAwD,MAAM,wBAAwB,CAAC;AAElH,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,eAAe,EAA+B,MAAM,qBAAqB,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAkC,MAAM,wBAAwB,CAAC;AAY5F,cAAc,QAAQ,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { type EnvironmentProviders } from '@angular/core';
2
2
  import type { AgentHistoryOptions } from './history';
3
3
  import type { AgentTransport } from './types';
4
+ import type { AgentLayoutFn } from '../types/node-template';
4
5
  export type AgentBridgeErrorContext = {
5
6
  kind: 'transport-start';
6
7
  transport: AgentTransport;
@@ -23,6 +24,13 @@ export interface AgentBridgeConfig {
23
24
  * this to log or report.
24
25
  */
25
26
  onError?: (err: unknown, ctx: AgentBridgeErrorContext) => void;
27
+ /**
28
+ * Optional layout function backing the `layout_nodes` tool. Import the
29
+ * turnkey dagre adapter from `@angflow/angular/layout`, or supply your own.
30
+ * When omitted, `layout_nodes` fails with a "no layout function configured"
31
+ * error.
32
+ */
33
+ layout?: AgentLayoutFn;
26
34
  }
27
35
  /**
28
36
  * Register the agent bridge for an Angular app. Add to your `appConfig`
@@ -1 +1 @@
1
- {"version":3,"file":"provide-agent-bridge.d.ts","sourceRoot":"","sources":["../../../../src/lib/agent/provide-agent-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oBAAoB,EAA4B,MAAM,eAAe,CAAC;AAEpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,MAAM,uBAAuB,GAC/B;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,SAAS,EAAE,cAAc,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,SAAS,EAAE,cAAc,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC,MAAM,WAAW,iBAAiB;IAChC,oEAAoE;IACpE,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,8FAA8F;IAC9F,OAAO,CAAC,EAAE,mBAAmB,GAAG,KAAK,CAAC;IACtC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,uBAAuB,KAAK,IAAI,CAAC;CAChE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,iBAAiB,GAAG,oBAAoB,CASlF"}
1
+ {"version":3,"file":"provide-agent-bridge.d.ts","sourceRoot":"","sources":["../../../../src/lib/agent/provide-agent-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oBAAoB,EAA4B,MAAM,eAAe,CAAC;AAEpF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,MAAM,uBAAuB,GAC/B;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,SAAS,EAAE,cAAc,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,SAAS,EAAE,cAAc,CAAA;CAAE,GACrD;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC,MAAM,WAAW,iBAAiB;IAChC,oEAAoE;IACpE,UAAU,EAAE,cAAc,EAAE,CAAC;IAC7B,8FAA8F;IAC9F,OAAO,CAAC,EAAE,mBAAmB,GAAG,KAAK,CAAC;IACtC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAC/D;;;;;OAKG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,iBAAiB,GAAG,oBAAoB,CAUlF"}
@@ -1,5 +1,5 @@
1
1
  import { makeEnvironmentProviders } from '@angular/core';
2
- import { AGENT_HISTORY_OPTIONS, AGENT_ON_ERROR, AGENT_TRANSPORTS } from './agent-bridge.service';
2
+ import { AGENT_HISTORY_OPTIONS, AGENT_LAYOUT, AGENT_ON_ERROR, AGENT_TRANSPORTS } from './agent-bridge.service';
3
3
  /**
4
4
  * Register the agent bridge for an Angular app. Add to your `appConfig`
5
5
  * providers alongside `provideRouter` etc., then attach `<ng-flow>`
@@ -27,6 +27,7 @@ export function provideAgentBridge(config) {
27
27
  useValue: config.history ?? { maxDepth: 100 },
28
28
  },
29
29
  ...(config.onError ? [{ provide: AGENT_ON_ERROR, useValue: config.onError }] : []),
30
+ ...(config.layout ? [{ provide: AGENT_LAYOUT, useValue: config.layout }] : []),
30
31
  ]);
31
32
  }
32
33
  //# sourceMappingURL=provide-agent-bridge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"provide-agent-bridge.js","sourceRoot":"","sources":["../../../../src/lib/agent/provide-agent-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAuBjG;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAyB;IAC1D,OAAO,wBAAwB,CAAC;QAC9B,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,CAAC,UAAU,EAAE;QAC1D;YACE,OAAO,EAAE,qBAAqB;YAC9B,QAAQ,EAAE,MAAM,CAAC,OAAO,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE;SAC9C;QACD,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KACnF,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"provide-agent-bridge.js","sourceRoot":"","sources":["../../../../src/lib/agent/provide-agent-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AA+B/G;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAyB;IAC1D,OAAO,wBAAwB,CAAC;QAC9B,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,CAAC,UAAU,EAAE;QAC1D;YACE,OAAO,EAAE,qBAAqB;YAC9B,QAAQ,EAAE,MAAM,CAAC,OAAO,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE;SAC9C;QACD,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAClF,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KAC/E,CAAC,CAAC;AACL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tool-schemas.d.ts","sourceRoot":"","sources":["../../../../src/lib/agent/tool-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,eAAe,EAkoB/C,CAAC"}
1
+ {"version":3,"file":"tool-schemas.d.ts","sourceRoot":"","sources":["../../../../src/lib/agent/tool-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,EAAE,eAAe,EAkxB/C,CAAC"}