@meshmakers/octo-ai-console 3.5.780 → 3.5.800

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.
@@ -1,194 +1,192 @@
1
- import * as _angular_core from '@angular/core';
2
- import { InjectionToken, EnvironmentProviders } from '@angular/core';
3
- import { Observable, Subject, ReplaySubject } from 'rxjs';
4
-
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import * as i0 from "@angular/core";
5
+ import { EnvironmentProviders, InjectionToken } from "@angular/core";
6
+ import { Observable, ReplaySubject, Subject } from "rxjs";
5
7
  /**
6
8
  * Status names emitted by the adapter's session lifecycle (RtSessionStatusEnum in C#).
7
9
  * Wire format is the enum name so the UI does not need to know the underlying integer
8
10
  * mapping — this union mirrors the values currently emitted on the wire.
9
11
  */
10
- type AiSessionStatus = 'Queued' | 'Running' | 'Paused' | 'Completed' | 'Failed' | 'Cancelled' | 'QuotaBlocked' | 'RateLimited';
12
+ export type AiSessionStatus = 'Queued' | 'Running' | 'Paused' | 'Completed' | 'Failed' | 'Cancelled' | 'QuotaBlocked' | 'RateLimited';
11
13
  /**
12
14
  * Job kinds classify the prompt-template family + tool-policy track. Mirrors
13
15
  * RtJobKindEnum in System.Ai-3. Phase-1 default is `DataModel`.
14
16
  */
15
- type AiJobKind = 'DataModel' | 'Application' | 'Deployment' | 'Investigation';
17
+ export type AiJobKind = 'DataModel' | 'Application' | 'Deployment' | 'Investigation';
16
18
  /**
17
19
  * Wire shape returned from every adapter session endpoint. Mirrors
18
20
  * `SessionResponse` on the C# side (src/AiServices/TenantApi/v1/Models).
19
21
  */
20
- interface AiSessionDto {
21
- readonly sessionRtId: string;
22
- readonly jobRtId: string;
23
- readonly goalSummary: string;
24
- readonly status: AiSessionStatus;
25
- readonly startedAt: string;
26
- readonly completedAt?: string | null;
27
- readonly tokensConsumed: number;
28
- readonly ownerUserId: string;
29
- /**
30
- * Per-session preview URL (#4136) — present on sessions whose worker pod
31
- * has the preview-deploy sidecar enabled AND the agent's
32
- * `npm run build:prod` has emitted a dist under the convention path
33
- * (`/workspaces/preview/{sessionRtId}/dist`). The server composes the URL
34
- * via `AiWorkspaceOptions.PreviewUrlPattern`; absent / empty when the
35
- * feature is off or no build is ready yet.
36
- */
37
- readonly previewUrl?: string | null;
22
+ export interface AiSessionDto {
23
+ readonly sessionRtId: string;
24
+ readonly jobRtId: string;
25
+ readonly goalSummary: string;
26
+ readonly status: AiSessionStatus;
27
+ readonly startedAt: string;
28
+ readonly completedAt?: string | null;
29
+ readonly tokensConsumed: number;
30
+ readonly ownerUserId: string;
31
+ /**
32
+ * Per-session preview URL (#4136) — present on sessions whose worker pod
33
+ * has the preview-deploy sidecar enabled AND the agent's
34
+ * `npm run build:prod` has emitted a dist under the convention path
35
+ * (`/workspaces/preview/{sessionRtId}/dist`). The server composes the URL
36
+ * via `AiWorkspaceOptions.PreviewUrlPattern`; absent / empty when the
37
+ * feature is off or no build is ready yet.
38
+ */
39
+ readonly previewUrl?: string | null;
38
40
  }
39
41
  /**
40
42
  * Quota gate decision snapshot as observed at the moment a session was created (or
41
43
  * polled). Mirrors `QuotaSnapshot` server-side. `decision` is the enum name; useful
42
44
  * values are `Admit` / `Queue` / `BlockMonthlyCap` etc.
43
45
  */
44
- interface AiQuotaSnapshotDto {
45
- readonly decision: string;
46
- readonly concurrentJobsCap: number;
47
- readonly maxSessionsQueuedCap: number;
48
- readonly currentActive: number;
49
- readonly currentQueued: number;
50
- readonly queuePosition: number;
46
+ export interface AiQuotaSnapshotDto {
47
+ readonly decision: string;
48
+ readonly concurrentJobsCap: number;
49
+ readonly maxSessionsQueuedCap: number;
50
+ readonly currentActive: number;
51
+ readonly currentQueued: number;
52
+ readonly queuePosition: number;
51
53
  }
52
54
  /**
53
55
  * Body for `POST /{tenantId}/v1/sessions`. The owning user is taken from the JWT
54
56
  * subject claim — clients never send a user id on the request.
55
57
  */
56
- interface CreateSessionRequestDto {
57
- readonly goal: string;
58
- readonly jobKind?: AiJobKind;
58
+ export interface CreateSessionRequestDto {
59
+ readonly goal: string;
60
+ readonly jobKind?: AiJobKind;
59
61
  }
60
62
  /**
61
63
  * Response for `POST /{tenantId}/v1/sessions`. Carries the freshly persisted
62
64
  * session plus the quota decision so the UI can render a "Running" pill or a
63
65
  * "Queued (3 / 10)" pill without a second round-trip.
64
66
  */
65
- interface CreateSessionResponseDto {
66
- readonly session: AiSessionDto;
67
- readonly quota: AiQuotaSnapshotDto;
67
+ export interface CreateSessionResponseDto {
68
+ readonly session: AiSessionDto;
69
+ readonly quota: AiQuotaSnapshotDto;
68
70
  }
69
-
70
71
  /**
71
72
  * Event kinds emitted as stream-json lines by the Claude Code worker (and synthetic
72
73
  * lines from the orchestrator). Mirrors `RtAiSessionEventKindEnum` in System.Ai-3.
73
74
  */
74
- type AiSessionEventKind = 'Message' | 'ToolCall' | 'ToolResult' | 'StatusChange' | 'Hook' | 'Error';
75
+ export type AiSessionEventKind = 'Message' | 'ToolCall' | 'ToolResult' | 'StatusChange' | 'Hook' | 'Error';
75
76
  /**
76
77
  * Payload pushed by the adapter's SignalR `OnSessionEventAsync` callback. Mirrors
77
78
  * `SessionEventEnvelope` on the C# side.
78
79
  */
79
- interface AiSessionEventDto {
80
- readonly sessionId: string;
81
- readonly kind: AiSessionEventKind;
82
- readonly sequence: number;
83
- readonly payload: string;
84
- readonly actorRef: string;
85
- readonly at: string;
80
+ export interface AiSessionEventDto {
81
+ readonly sessionId: string;
82
+ readonly kind: AiSessionEventKind;
83
+ readonly sequence: number;
84
+ readonly payload: string;
85
+ readonly actorRef: string;
86
+ readonly at: string;
86
87
  }
87
88
  /**
88
89
  * Payload pushed by `OnSessionStatusChangedAsync`. Mirrors
89
90
  * `SessionStatusChangedEnvelope` on the C# side.
90
91
  */
91
- interface AiSessionStatusChangedDto {
92
- readonly sessionId: string;
93
- readonly newStatus: AiSessionStatus;
94
- readonly reason?: string | null;
95
- readonly at: string;
92
+ export interface AiSessionStatusChangedDto {
93
+ readonly sessionId: string;
94
+ readonly newStatus: AiSessionStatus;
95
+ readonly reason?: string | null;
96
+ readonly at: string;
96
97
  }
97
98
  /**
98
99
  * Decoded tool-call lifted from an `AiSessionEvent` payload. Owned by the UI
99
100
  * because the adapter wire format is a stream-json string and the components
100
101
  * render structured fields.
101
102
  */
102
- interface AiToolCallDto {
103
- readonly sessionId: string;
104
- readonly callId: string;
105
- readonly toolName: string;
106
- readonly arguments: unknown;
107
- readonly result?: unknown;
108
- readonly status: 'Pending' | 'Approved' | 'Rejected' | 'Succeeded' | 'Failed';
109
- readonly startedAt: string;
110
- readonly completedAt?: string | null;
111
- readonly durationMs?: number | null;
103
+ export interface AiToolCallDto {
104
+ readonly sessionId: string;
105
+ readonly callId: string;
106
+ readonly toolName: string;
107
+ readonly arguments: unknown;
108
+ readonly result?: unknown;
109
+ readonly status: 'Pending' | 'Approved' | 'Rejected' | 'Succeeded' | 'Failed';
110
+ readonly startedAt: string;
111
+ readonly completedAt?: string | null;
112
+ readonly durationMs?: number | null;
112
113
  }
113
-
114
114
  /**
115
115
  * Approval outcome — mirrors the `ApprovalOutcome` enum the adapter writes back
116
116
  * after the user decides. The hub serialises the enum name on the wire.
117
117
  */
118
- type AiApprovalOutcome = 'Approved' | 'Rejected';
118
+ export type AiApprovalOutcome = 'Approved' | 'Rejected';
119
119
  /**
120
120
  * Why the approval gate fired. Mirrors `RtApprovalReasonEnum` in System.Ai-3.
121
121
  * The strings match the C# enum value names verbatim — the adapter serialises
122
122
  * the enum name, not its integer value, on the wire.
123
123
  */
124
- type AiApprovalReason = 'HighRiskTool' | 'PerToolOverride' | 'PolicyDenied' | 'TenantOverride' | 'TimeoutResume';
124
+ export type AiApprovalReason = 'HighRiskTool' | 'PerToolOverride' | 'PolicyDenied' | 'TenantOverride' | 'TimeoutResume';
125
125
  /**
126
126
  * Payload pushed by `OnApprovalRequestedAsync`. Mirrors
127
127
  * `ApprovalRequestedEnvelope` on the C# side.
128
128
  */
129
- interface AiApprovalRequestedDto {
130
- readonly requestId: string;
131
- readonly sessionId: string;
132
- readonly toolName: string;
133
- readonly payload: string;
134
- readonly reason: AiApprovalReason | string;
135
- readonly at: string;
129
+ export interface AiApprovalRequestedDto {
130
+ readonly requestId: string;
131
+ readonly sessionId: string;
132
+ readonly toolName: string;
133
+ readonly payload: string;
134
+ readonly reason: AiApprovalReason | string;
135
+ readonly at: string;
136
136
  }
137
137
  /**
138
138
  * Payload pushed by `OnApprovalDecidedAsync`. Mirrors `ApprovalDecidedEnvelope`
139
139
  * on the C# side. Fanned to every connection so a UI in a sibling browser tab
140
140
  * dismisses its modal too.
141
141
  */
142
- interface AiApprovalDecidedDto {
143
- readonly requestId: string;
144
- readonly outcome: AiApprovalOutcome;
145
- readonly comment?: string | null;
146
- readonly decidedBy: string;
147
- readonly at: string;
142
+ export interface AiApprovalDecidedDto {
143
+ readonly requestId: string;
144
+ readonly outcome: AiApprovalOutcome;
145
+ readonly comment?: string | null;
146
+ readonly decidedBy: string;
147
+ readonly at: string;
148
148
  }
149
149
  /**
150
150
  * Body for `POST /{tenantId}/v1/sessions/{sessionId}/approvals/{requestId}`.
151
151
  * The UI sends the user's decision; the server fans out
152
152
  * `OnApprovalDecidedAsync` to every connection.
153
153
  */
154
- interface AiApprovalDecisionDto {
155
- readonly outcome: AiApprovalOutcome;
156
- readonly comment?: string;
154
+ export interface AiApprovalDecisionDto {
155
+ readonly outcome: AiApprovalOutcome;
156
+ readonly comment?: string;
157
157
  }
158
-
159
158
  /**
160
159
  * Severity of a quota warning. `Warning` fires at 80% of the daily-tokens cap,
161
160
  * `Critical` fires at 100%. Mirrors the C# discriminator string.
162
161
  */
163
- type AiQuotaSeverity = 'Warning' | 'Critical';
162
+ export type AiQuotaSeverity = 'Warning' | 'Critical';
164
163
  /**
165
164
  * Payload pushed by the adapter's `OnQuotaWarningAsync` SignalR callback.
166
165
  * Broadcast to every connection for the tenant when the daily-tokens budget
167
166
  * crosses 80% or 100%. UI renders a banner with the embedded numbers.
168
167
  */
169
- interface AiQuotaWarningDto {
170
- readonly severity: AiQuotaSeverity;
171
- readonly thresholdPercent: number;
172
- readonly tokensConsumed: number;
173
- readonly tokensPerDayCap: number;
174
- readonly at: string;
168
+ export interface AiQuotaWarningDto {
169
+ readonly severity: AiQuotaSeverity;
170
+ readonly thresholdPercent: number;
171
+ readonly tokensConsumed: number;
172
+ readonly tokensPerDayCap: number;
173
+ readonly at: string;
175
174
  }
176
-
177
175
  /**
178
176
  * Scopes a one-time credential-registration ticket authorises. Mirrors
179
177
  * `RtTicketScopeEnum` in System.Ai-3 (C# side: enum members
180
178
  * `CredentialRegister`, `DevSshKeyRegister`).
181
179
  */
182
- type AiCredentialTicketScope = 'CredentialRegister' | 'DevSshKeyRegister';
180
+ export type AiCredentialTicketScope = 'CredentialRegister' | 'DevSshKeyRegister';
183
181
  /**
184
182
  * Body for `POST /{tenantId}/v1/credentials/tickets`. The admin in Refinery
185
183
  * Studio fills this in to mint a one-time code the developer / operator
186
184
  * redeems from their own machine (#4133). `ttlMinutes` is clamped server-side
187
185
  * to 60 minutes; omitting it defaults to 5 minutes.
188
186
  */
189
- interface IssueAiCredentialTicketRequestDto {
190
- readonly scope: AiCredentialTicketScope;
191
- readonly ttlMinutes?: number;
187
+ export interface IssueAiCredentialTicketRequestDto {
188
+ readonly scope: AiCredentialTicketScope;
189
+ readonly ttlMinutes?: number;
192
190
  }
193
191
  /**
194
192
  * Wire shape returned from `POST /{tenantId}/v1/credentials/tickets`. The
@@ -196,48 +194,46 @@ interface IssueAiCredentialTicketRequestDto {
196
194
  * the server stores only the SHA-256 hash, so a future GET cannot re-derive
197
195
  * it (#4133, concept §10).
198
196
  */
199
- interface IssueAiCredentialTicketResponseDto {
200
- readonly rtId: string;
201
- readonly code: string;
202
- readonly expiresAt: string;
203
- readonly scope: AiCredentialTicketScope;
197
+ export interface IssueAiCredentialTicketResponseDto {
198
+ readonly rtId: string;
199
+ readonly code: string;
200
+ readonly expiresAt: string;
201
+ readonly scope: AiCredentialTicketScope;
204
202
  }
205
-
206
203
  /**
207
204
  * Body for `POST /{tenantId}/v1/credentials/github-pat`. The plaintext token is
208
205
  * validated against GitHub's `/user` endpoint before encryption — a refused
209
206
  * token comes back as HTTP 422 + `error: 'github_refused_token'`.
210
207
  */
211
- interface RegisterAiGitHubPatRequestDto {
212
- /** Operator-supplied label so PATs are tellable apart in the list view. */
213
- readonly name: string;
214
- /** Plaintext token. Never persisted client-side; cleared from the form on submit. */
215
- readonly token: string;
216
- /** Free-form scope hint — purely informational. */
217
- readonly scope?: string;
208
+ export interface RegisterAiGitHubPatRequestDto {
209
+ /** Operator-supplied label so PATs are tellable apart in the list view. */
210
+ readonly name: string;
211
+ /** Plaintext token. Never persisted client-side; cleared from the form on submit. */
212
+ readonly token: string;
213
+ /** Free-form scope hint — purely informational. */
214
+ readonly scope?: string;
218
215
  }
219
216
  /**
220
217
  * Wire shape returned by `GET /{tenantId}/v1/credentials/github-pat`. Carries
221
218
  * neither the plaintext token nor the encrypted ciphertext — only enough to
222
219
  * render a row + offer Revoke.
223
220
  */
224
- interface AiGitHubPatDto {
225
- /** Binding rtId — pass to delete. */
226
- readonly rtId: string;
227
- /** Operator-supplied label from registration. */
228
- readonly name: string;
229
- /** Operator-supplied free-form scope hint. */
230
- readonly scope: string;
231
- /** Last four characters of the plaintext token preceded by "…" (e.g. "…ABCD"). */
232
- readonly maskedTail: string;
233
- /**
234
- * GitHub login the token authenticated as during registration. Null when the
235
- * binding's ciphertext is unreadable (rotation gone wrong) — UI should hint
236
- * "revoke and re-register" in that case.
237
- */
238
- readonly gitHubLogin?: string | null;
239
- }
240
-
221
+ export interface AiGitHubPatDto {
222
+ /** Binding rtId — pass to delete. */
223
+ readonly rtId: string;
224
+ /** Operator-supplied label from registration. */
225
+ readonly name: string;
226
+ /** Operator-supplied free-form scope hint. */
227
+ readonly scope: string;
228
+ /** Last four characters of the plaintext token preceded by "…" (e.g. "…ABCD"). */
229
+ readonly maskedTail: string;
230
+ /**
231
+ * GitHub login the token authenticated as during registration. Null when the
232
+ * binding's ciphertext is unreadable (rotation gone wrong) — UI should hint
233
+ * "revoke and re-register" in that case.
234
+ */
235
+ readonly gitHubLogin?: string | null;
236
+ }
241
237
  /**
242
238
  * Wire shape returned by `GET /{tenantId}/v1/app-templates` (#4145). Each entry
243
239
  * is one option in the Studio's "New App from Template" wizard. The wizard
@@ -247,79 +243,78 @@ interface AiGitHubPatDto {
247
243
  * (`src/AiServices/TenantApi/v1/Models/AppTemplateResponse.cs`). The JSON is
248
244
  * camel-cased on the wire; the C# DTO is PascalCased server-side.
249
245
  */
250
- interface AiAppTemplateDto {
251
- /** Stable identifier the wizard echoes on submit (`crud-list`, `dashboard`, `form-only`). */
252
- readonly id: string;
253
- /** Display name for the template picker. */
254
- readonly name: string;
255
- /** One-paragraph description shown next to the picker entry. */
256
- readonly description: string;
257
- /**
258
- * JobKind enum key the adapter expects when the wizard POSTs the session.
259
- * The wire is the CK enum key as string — see `AiJobKind` for the values
260
- * the adapter currently emits. Today every Phase-1 template uses
261
- * `Application`.
262
- */
263
- readonly jobKind: AiJobKind;
264
- /**
265
- * Handlebars-style template the wizard interpolates with operator inputs
266
- * (e.g. `{{projectName}}`, `{{primaryEntity}}`). The rendered text is what
267
- * goes onto `CreateSessionRequestDto.goal` — the adapter never interpolates,
268
- * so the operator sees the final Goal in the wizard before submit.
269
- */
270
- readonly goalTemplate: string;
271
- /**
272
- * Names of the placeholders the wizard must collect before enabling Submit.
273
- * Drives the form's required-field gate without the wizard having to parse
274
- * `goalTemplate`.
275
- */
276
- readonly requiredPlaceholders: readonly string[];
246
+ export interface AiAppTemplateDto {
247
+ /** Stable identifier the wizard echoes on submit (`crud-list`, `dashboard`, `form-only`). */
248
+ readonly id: string;
249
+ /** Display name for the template picker. */
250
+ readonly name: string;
251
+ /** One-paragraph description shown next to the picker entry. */
252
+ readonly description: string;
253
+ /**
254
+ * JobKind enum key the adapter expects when the wizard POSTs the session.
255
+ * The wire is the CK enum key as string — see `AiJobKind` for the values
256
+ * the adapter currently emits. Today every Phase-1 template uses
257
+ * `Application`.
258
+ */
259
+ readonly jobKind: AiJobKind;
260
+ /**
261
+ * Handlebars-style template the wizard interpolates with operator inputs
262
+ * (e.g. `{{projectName}}`, `{{primaryEntity}}`). The rendered text is what
263
+ * goes onto `CreateSessionRequestDto.goal` — the adapter never interpolates,
264
+ * so the operator sees the final Goal in the wizard before submit.
265
+ */
266
+ readonly goalTemplate: string;
267
+ /**
268
+ * Names of the placeholders the wizard must collect before enabling Submit.
269
+ * Drives the form's required-field gate without the wizard having to parse
270
+ * `goalTemplate`.
271
+ */
272
+ readonly requiredPlaceholders: readonly string[];
277
273
  }
278
274
  /**
279
275
  * The shape the wizard emits on Submit. The host page is expected to render
280
276
  * `goal` (interpolated from the picked template) into a
281
277
  * `CreateSessionRequestDto` and call `createSession` on the adapter client.
282
278
  */
283
- interface AiNewAppSubmission {
284
- readonly templateId: string;
285
- readonly jobKind: AiJobKind;
286
- readonly projectName: string;
287
- readonly primaryEntity: string;
288
- /** The fully interpolated Goal string — what the wizard would POST on submit. */
289
- readonly goal: string;
279
+ export interface AiNewAppSubmission {
280
+ readonly templateId: string;
281
+ readonly jobKind: AiJobKind;
282
+ readonly projectName: string;
283
+ readonly primaryEntity: string;
284
+ /** The fully interpolated Goal string — what the wizard would POST on submit. */
285
+ readonly goal: string;
290
286
  }
291
-
292
287
  /**
293
288
  * Configuration the host application supplies via {@link provideOctoAiConsole}.
294
289
  * Every field is required so the library never falls back to a hard-coded URL or
295
290
  * tenant id — host apps that wire the library through their own DI container can
296
291
  * surface placeholders explicitly instead.
297
292
  */
298
- interface AiAdapterOptions {
299
- /**
300
- * Absolute base URL of the AI Adapter REST API, e.g. `https://ai.acme.cloud`.
301
- * Must NOT include a trailing slash. The library appends
302
- * `/{tenantId}/v1/sessions...` itself.
303
- */
304
- readonly baseUrl: string;
305
- /**
306
- * Tenant whose sessions the host wants to surface. The library renders the
307
- * tenant id into every REST URL. Host apps that have multiple tenants must
308
- * compose the provider with the tenant id from their routing context.
309
- */
310
- readonly tenantId: string;
311
- /**
312
- * SignalR hub path, relative to the base URL, e.g. `/hubs/ai`. Used by
313
- * `AiSessionStreamService` to connect when a host calls
314
- * `streamSession(sessionId)`.
315
- */
316
- readonly hubPath: string;
293
+ export interface AiAdapterOptions {
294
+ /**
295
+ * Absolute base URL of the AI Adapter REST API, e.g. `https://ai.acme.cloud`.
296
+ * Must NOT include a trailing slash. The library appends
297
+ * `/{tenantId}/v1/sessions...` itself.
298
+ */
299
+ readonly baseUrl: string;
300
+ /**
301
+ * Tenant whose sessions the host wants to surface. The library renders the
302
+ * tenant id into every REST URL. Host apps that have multiple tenants must
303
+ * compose the provider with the tenant id from their routing context.
304
+ */
305
+ readonly tenantId: string;
306
+ /**
307
+ * SignalR hub path, relative to the base URL, e.g. `/hubs/ai`. Used by
308
+ * `AiSessionStreamService` to connect when a host calls
309
+ * `streamSession(sessionId)`.
310
+ */
311
+ readonly hubPath: string;
317
312
  }
318
313
  /**
319
314
  * DI token the services in this library read at construction time.
320
315
  * Provided by {@link provideOctoAiConsole}.
321
316
  */
322
- declare const AI_ADAPTER_OPTIONS: InjectionToken<AiAdapterOptions>;
317
+ export declare const AI_ADAPTER_OPTIONS: InjectionToken<AiAdapterOptions>;
323
318
  /**
324
319
  * Minimal subset of the `@microsoft/signalr` `HubConnection` surface the library
325
320
  * exercises. The interface stays in the public API so host apps can supply
@@ -329,25 +324,25 @@ declare const AI_ADAPTER_OPTIONS: InjectionToken<AiAdapterOptions>;
329
324
  * structural lets the library stay agnostic of the `@microsoft/signalr` major
330
325
  * version line the host has installed.
331
326
  */
332
- interface AiHubConnectionLike {
333
- on(methodName: string, handler: (payload: unknown) => void): void;
334
- start(): Promise<void>;
335
- stop(): Promise<void>;
336
- invoke<T = unknown>(methodName: string, ...args: unknown[]): Promise<T>;
337
- onreconnected(handler: (connectionId?: string) => void): void;
327
+ export interface AiHubConnectionLike {
328
+ on(methodName: string, handler: (payload: unknown) => void): void;
329
+ start(): Promise<void>;
330
+ stop(): Promise<void>;
331
+ invoke<T = unknown>(methodName: string, ...args: unknown[]): Promise<T>;
332
+ onreconnected(handler: (connectionId?: string) => void): void;
338
333
  }
339
334
  /**
340
335
  * Builds a hub connection against the resolved URL. Return null when streaming
341
336
  * is not wired in this deployment yet — the stream service then quietly skips
342
337
  * the live channel and behaves exactly like the Phase-1 stub.
343
338
  */
344
- type AiSessionStreamConnectionFactory = (hubUrl: string) => AiHubConnectionLike | null;
339
+ export type AiSessionStreamConnectionFactory = (hubUrl: string) => AiHubConnectionLike | null;
345
340
  /**
346
341
  * Optional DI token a host application provides to enable the live SignalR
347
342
  * channel on {@link AiSessionStreamService}. When absent, the service degrades
348
343
  * to REST-only backfill.
349
344
  */
350
- declare const AI_SESSION_STREAM_CONNECTION_FACTORY: InjectionToken<AiSessionStreamConnectionFactory>;
345
+ export declare const AI_SESSION_STREAM_CONNECTION_FACTORY: InjectionToken<AiSessionStreamConnectionFactory>;
351
346
  /**
352
347
  * Composable provider that surfaces the library's adapter configuration to the
353
348
  * Angular DI container. Host applications call this once in `app.config.ts`:
@@ -362,8 +357,7 @@ declare const AI_SESSION_STREAM_CONNECTION_FACTORY: InjectionToken<AiSessionStre
362
357
  * ]
363
358
  * ```
364
359
  */
365
- declare function provideOctoAiConsole(options: AiAdapterOptions): EnvironmentProviders;
366
-
360
+ export declare function provideOctoAiConsole(options: AiAdapterOptions): EnvironmentProviders;
367
361
  /**
368
362
  * Typed REST client for the AI Adapter's session endpoints. Every method maps
369
363
  * 1:1 to a controller route on the C# side
@@ -384,126 +378,125 @@ declare function provideOctoAiConsole(options: AiAdapterOptions): EnvironmentPro
384
378
  * inject this service pick up the route-level provider via the element
385
379
  * injector hierarchy.
386
380
  */
387
- declare class AiAdapterClientService {
388
- private readonly http;
389
- private readonly options;
390
- /**
391
- * `GET /{tenantId}/v1/sessions` — list all sessions for the configured tenant.
392
- * Optional `status` filter narrows to one lifecycle state when present.
393
- */
394
- listSessions(status?: string): Observable<AiSessionDto[]>;
395
- /** `GET /{tenantId}/v1/sessions/{sessionId}` — single session by rtId. */
396
- getSession(sessionId: string): Observable<AiSessionDto>;
397
- /**
398
- * `POST /{tenantId}/v1/sessions` — start a new session. Returns the persisted
399
- * session plus the quota gate's decision so the caller can render either a
400
- * "Running" pill or a "Queued (n)" pill without a second round-trip.
401
- */
402
- createSession(request: CreateSessionRequestDto): Observable<CreateSessionResponseDto>;
403
- /**
404
- * `POST /{tenantId}/v1/sessions/{sessionId}/cancel` — request graceful
405
- * cancellation; the orchestrator transitions the session to `Cancelled`
406
- * once the worker has acknowledged.
407
- */
408
- cancelSession(sessionId: string): Observable<AiSessionDto>;
409
- /**
410
- * `DELETE /{tenantId}/v1/sessions/{sessionId}` — hard-delete a terminal
411
- * session. The server refuses non-terminal sessions with HTTP 409 and the
412
- * <code>invalid_state_transition</code> error code, so callers should cancel
413
- * first when the session is still in flight. 204 on success; the response
414
- * has no body.
415
- */
416
- deleteSession(sessionId: string): Observable<void>;
417
- /**
418
- * `POST /{tenantId}/v1/sessions/{sessionId}/messages` — append a follow-up
419
- * user turn to a `Completed` session. The adapter re-materialises the
420
- * workspace (fresh credential snapshot), recovers Claude's session id from
421
- * the persisted `system/init` event of the original turn, and spawns
422
- * <code>claude --resume &lt;id&gt;</code> so the conversation context
423
- * carries over. The next turn's events stream on the same SignalR channel
424
- * as the prior turn — there is no separate subscription to set up.
425
- *
426
- * Server response is 202 with the updated session DTO (status flipped back
427
- * to `Running`); the caller can use the returned status to drive an
428
- * optimistic UI update. Non-Completed sessions return 409 with
429
- * <code>invalid_state_transition</code>; a session whose first turn died
430
- * before claude emitted init returns 409 with
431
- * <code>claude_session_id_not_captured</code>.
432
- */
433
- sendMessage(sessionId: string, text: string): Observable<AiSessionDto>;
434
- /**
435
- * `GET /{tenantId}/v1/sessions/{sessionId}/events?sinceSequence=N` — replay
436
- * persisted events for a session. UI uses this on reconnect to backfill any
437
- * events SignalR missed while disconnected (drives the resume-from-sequence
438
- * path in {@link AiSessionStreamService}).
439
- */
440
- listEvents(sessionId: string, sinceSequence?: number): Observable<AiSessionEventDto[]>;
441
- /**
442
- * `POST /{tenantId}/v1/sessions/{sessionId}/approvals/{requestId}` — submit
443
- * the user's decision on a paused approval gate. Server fans
444
- * `OnApprovalDecidedAsync` to every connection on the session.
445
- */
446
- decideApproval(sessionId: string, requestId: string, decision: AiApprovalDecisionDto): Observable<void>;
447
- /**
448
- * `POST /{tenantId}/v1/credentials/tickets` — mint a one-time credential-
449
- * registration ticket (#4133). The admin sees the plaintext code once in
450
- * the response; the server stores only the SHA-256 hash. The matching
451
- * redemption call (`POST /v1/credentials/tickets/redeem`) is anonymous and
452
- * NOT in this client because the redeemer is by design a different person
453
- * on a different machine — they use the bastion CLI, not the Studio.
454
- */
455
- issueCredentialTicket(request: IssueAiCredentialTicketRequestDto): Observable<IssueAiCredentialTicketResponseDto>;
456
- /**
457
- * `POST /{tenantId}/v1/credentials/github-pat` — register a GitHub Personal
458
- * Access Token (#4124). The adapter validates the token against GitHub's
459
- * `/user` endpoint before encryption; a refused token surfaces as HTTP 422
460
- * with `error: 'github_refused_token'`. The response is intentionally minimal
461
- * (`{ rtId }`); the host re-fetches the list so the rendering path stays
462
- * shared with refresh.
463
- */
464
- registerGitHubPat(request: RegisterAiGitHubPatRequestDto): Observable<{
465
- rtId: string;
466
- }>;
467
- /**
468
- * `GET /{tenantId}/v1/credentials/github-pat` — list registered PATs with a
469
- * masked tail + GitHub login. Plaintext never crosses the wire.
470
- */
471
- listGitHubPats(): Observable<AiGitHubPatDto[]>;
472
- /**
473
- * `DELETE /{tenantId}/v1/credentials/github-pat/{rtId}` — revoke a PAT. The
474
- * ciphertext is deleted, not soft-tombstoned. Returns void on 204.
475
- */
476
- deleteGitHubPat(rtId: string): Observable<void>;
477
- /**
478
- * `GET /{tenantId}/v1/app-templates` — list the Custom-App templates the
479
- * adapter exposes for the wizard (#4145). Phase-1 returns the same three
480
- * static entries for every tenant; the wire shape is stable so per-tenant
481
- * overrides can ride it without an SPA bump.
482
- */
483
- getAppTemplates(): Observable<AiAppTemplateDto[]>;
484
- private tenantBase;
485
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AiAdapterClientService, never>;
486
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<AiAdapterClientService>;
487
- }
488
-
381
+ export declare class AiAdapterClientService {
382
+ private readonly http;
383
+ private readonly options;
384
+ /**
385
+ * `GET /{tenantId}/v1/sessions` — list all sessions for the configured tenant.
386
+ * Optional `status` filter narrows to one lifecycle state when present.
387
+ */
388
+ listSessions(status?: string): Observable<AiSessionDto[]>;
389
+ /** `GET /{tenantId}/v1/sessions/{sessionId}` — single session by rtId. */
390
+ getSession(sessionId: string): Observable<AiSessionDto>;
391
+ /**
392
+ * `POST /{tenantId}/v1/sessions` — start a new session. Returns the persisted
393
+ * session plus the quota gate's decision so the caller can render either a
394
+ * "Running" pill or a "Queued (n)" pill without a second round-trip.
395
+ */
396
+ createSession(request: CreateSessionRequestDto): Observable<CreateSessionResponseDto>;
397
+ /**
398
+ * `POST /{tenantId}/v1/sessions/{sessionId}/cancel` — request graceful
399
+ * cancellation; the orchestrator transitions the session to `Cancelled`
400
+ * once the worker has acknowledged.
401
+ */
402
+ cancelSession(sessionId: string): Observable<AiSessionDto>;
403
+ /**
404
+ * `DELETE /{tenantId}/v1/sessions/{sessionId}` — hard-delete a terminal
405
+ * session. The server refuses non-terminal sessions with HTTP 409 and the
406
+ * <code>invalid_state_transition</code> error code, so callers should cancel
407
+ * first when the session is still in flight. 204 on success; the response
408
+ * has no body.
409
+ */
410
+ deleteSession(sessionId: string): Observable<void>;
411
+ /**
412
+ * `POST /{tenantId}/v1/sessions/{sessionId}/messages` — append a follow-up
413
+ * user turn to a `Completed` session. The adapter re-materialises the
414
+ * workspace (fresh credential snapshot), recovers Claude's session id from
415
+ * the persisted `system/init` event of the original turn, and spawns
416
+ * <code>claude --resume &lt;id&gt;</code> so the conversation context
417
+ * carries over. The next turn's events stream on the same SignalR channel
418
+ * as the prior turn — there is no separate subscription to set up.
419
+ *
420
+ * Server response is 202 with the updated session DTO (status flipped back
421
+ * to `Running`); the caller can use the returned status to drive an
422
+ * optimistic UI update. Non-Completed sessions return 409 with
423
+ * <code>invalid_state_transition</code>; a session whose first turn died
424
+ * before claude emitted init returns 409 with
425
+ * <code>claude_session_id_not_captured</code>.
426
+ */
427
+ sendMessage(sessionId: string, text: string): Observable<AiSessionDto>;
428
+ /**
429
+ * `GET /{tenantId}/v1/sessions/{sessionId}/events?sinceSequence=N` — replay
430
+ * persisted events for a session. UI uses this on reconnect to backfill any
431
+ * events SignalR missed while disconnected (drives the resume-from-sequence
432
+ * path in {@link AiSessionStreamService}).
433
+ */
434
+ listEvents(sessionId: string, sinceSequence?: number): Observable<AiSessionEventDto[]>;
435
+ /**
436
+ * `POST /{tenantId}/v1/sessions/{sessionId}/approvals/{requestId}` — submit
437
+ * the user's decision on a paused approval gate. Server fans
438
+ * `OnApprovalDecidedAsync` to every connection on the session.
439
+ */
440
+ decideApproval(sessionId: string, requestId: string, decision: AiApprovalDecisionDto): Observable<void>;
441
+ /**
442
+ * `POST /{tenantId}/v1/credentials/tickets` — mint a one-time credential-
443
+ * registration ticket (#4133). The admin sees the plaintext code once in
444
+ * the response; the server stores only the SHA-256 hash. The matching
445
+ * redemption call (`POST /v1/credentials/tickets/redeem`) is anonymous and
446
+ * NOT in this client because the redeemer is by design a different person
447
+ * on a different machine — they use the bastion CLI, not the Studio.
448
+ */
449
+ issueCredentialTicket(request: IssueAiCredentialTicketRequestDto): Observable<IssueAiCredentialTicketResponseDto>;
450
+ /**
451
+ * `POST /{tenantId}/v1/credentials/github-pat` — register a GitHub Personal
452
+ * Access Token (#4124). The adapter validates the token against GitHub's
453
+ * `/user` endpoint before encryption; a refused token surfaces as HTTP 422
454
+ * with `error: 'github_refused_token'`. The response is intentionally minimal
455
+ * (`{ rtId }`); the host re-fetches the list so the rendering path stays
456
+ * shared with refresh.
457
+ */
458
+ registerGitHubPat(request: RegisterAiGitHubPatRequestDto): Observable<{
459
+ rtId: string;
460
+ }>;
461
+ /**
462
+ * `GET /{tenantId}/v1/credentials/github-pat` — list registered PATs with a
463
+ * masked tail + GitHub login. Plaintext never crosses the wire.
464
+ */
465
+ listGitHubPats(): Observable<AiGitHubPatDto[]>;
466
+ /**
467
+ * `DELETE /{tenantId}/v1/credentials/github-pat/{rtId}` — revoke a PAT. The
468
+ * ciphertext is deleted, not soft-tombstoned. Returns void on 204.
469
+ */
470
+ deleteGitHubPat(rtId: string): Observable<void>;
471
+ /**
472
+ * `GET /{tenantId}/v1/app-templates` — list the Custom-App templates the
473
+ * adapter exposes for the wizard (#4145). Phase-1 returns the same three
474
+ * static entries for every tenant; the wire shape is stable so per-tenant
475
+ * overrides can ride it without an SPA bump.
476
+ */
477
+ getAppTemplates(): Observable<AiAppTemplateDto[]>;
478
+ private tenantBase;
479
+ static ɵfac: i0.ɵɵFactoryDeclaration<AiAdapterClientService, never>;
480
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
481
+ }
489
482
  /**
490
483
  * One open SignalR connection's worth of streams. Sessions get one
491
484
  * `SessionStream` per `streamSession()` call; closing the returned subscription
492
485
  * tears the connection down.
493
486
  */
494
- interface AiSessionStream {
495
- /** Stream-json lines plus orchestrator markers, ordered by `sequence`. */
496
- readonly events$: Observable<AiSessionEventDto>;
497
- /** Lifecycle transitions for the session. */
498
- readonly statusChanges$: Observable<AiSessionStatusChangedDto>;
499
- /** Approval gate fired — UI opens the modal. */
500
- readonly approvalsRequested$: Observable<AiApprovalRequestedDto>;
501
- /** Approval resolved — UI dismisses the modal in every tab. */
502
- readonly approvalsDecided$: Observable<AiApprovalDecidedDto>;
503
- /** Tenant-wide quota threshold crossed — UI renders a banner. */
504
- readonly quotaWarnings$: Observable<AiQuotaWarningDto>;
505
- /** Tear down the underlying SignalR connection and complete all observables. */
506
- disconnect(): void;
487
+ export interface AiSessionStream {
488
+ /** Stream-json lines plus orchestrator markers, ordered by `sequence`. */
489
+ readonly events$: Observable<AiSessionEventDto>;
490
+ /** Lifecycle transitions for the session. */
491
+ readonly statusChanges$: Observable<AiSessionStatusChangedDto>;
492
+ /** Approval gate fired — UI opens the modal. */
493
+ readonly approvalsRequested$: Observable<AiApprovalRequestedDto>;
494
+ /** Approval resolved — UI dismisses the modal in every tab. */
495
+ readonly approvalsDecided$: Observable<AiApprovalDecidedDto>;
496
+ /** Tenant-wide quota threshold crossed — UI renders a banner. */
497
+ readonly quotaWarnings$: Observable<AiQuotaWarningDto>;
498
+ /** Tear down the underlying SignalR connection and complete all observables. */
499
+ disconnect(): void;
507
500
  }
508
501
  /**
509
502
  * Internal wrapper around the SignalR connection. The library does not pin a
@@ -523,43 +516,42 @@ interface AiSessionStream {
523
516
  * rationale: `AI_ADAPTER_OPTIONS` is a per-route token, the root injector
524
517
  * cannot resolve it. Element-level injection picks up the route-level provider.
525
518
  */
526
- declare class AiSessionStreamService {
527
- private readonly options;
528
- private readonly client;
529
- private readonly connectionFactory;
530
- /**
531
- * Open a streaming session. Returns the per-stream subjects and a
532
- * `disconnect()` closer. When the host has provided an
533
- * {@link AI_SESSION_STREAM_CONNECTION_FACTORY}, a live SignalR connection is
534
- * built against {@link hubUrl} and the five hub callbacks
535
- * (`OnSessionEventAsync`, `OnSessionStatusChangedAsync`,
536
- * `OnApprovalRequestedAsync`, `OnApprovalDecidedAsync`, `OnQuotaWarningAsync`)
537
- * are routed into the matching subject. Without a factory, the service
538
- * degrades to REST-only backfill — the original Phase-1 stub contract.
539
- *
540
- * Tracking the highest sequence we've emitted lets the host reconnect after a
541
- * network blip by passing `sinceSequence` to {@link replay} (the SignalR
542
- * `onreconnected` hook fires that with the highest seen sequence).
543
- */
544
- streamSession(sessionId: string): AiSessionStream;
545
- /**
546
- * Backfill missing events from a known sequence number and push them into
547
- * the host's existing stream. Used by a SignalR `onreconnected` hook the
548
- * host wires up.
549
- */
550
- replay(sessionId: string, sinceSequence: number, sink: Subject<AiSessionEventDto> | ReplaySubject<AiSessionEventDto>): void;
551
- /**
552
- * Tenant-scoped hub URL. Composition matches the AI Adapter's hub map —
553
- * `app.MapHub<AiHub>("/{tenantId:tenantId}/aiHub")` — so the host's
554
- * `hubPath` is appended after the tenant segment. Host apps that mount the
555
- * hub at a different relative path override `hubPath` via
556
- * `AI_ADAPTER_OPTIONS`.
557
- */
558
- get hubUrl(): string;
559
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AiSessionStreamService, never>;
560
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<AiSessionStreamService>;
561
- }
562
-
519
+ export declare class AiSessionStreamService {
520
+ private readonly options;
521
+ private readonly client;
522
+ private readonly connectionFactory;
523
+ /**
524
+ * Open a streaming session. Returns the per-stream subjects and a
525
+ * `disconnect()` closer. When the host has provided an
526
+ * {@link AI_SESSION_STREAM_CONNECTION_FACTORY}, a live SignalR connection is
527
+ * built against {@link hubUrl} and the five hub callbacks
528
+ * (`OnSessionEventAsync`, `OnSessionStatusChangedAsync`,
529
+ * `OnApprovalRequestedAsync`, `OnApprovalDecidedAsync`, `OnQuotaWarningAsync`)
530
+ * are routed into the matching subject. Without a factory, the service
531
+ * degrades to REST-only backfill — the original Phase-1 stub contract.
532
+ *
533
+ * Tracking the highest sequence we've emitted lets the host reconnect after a
534
+ * network blip by passing `sinceSequence` to {@link replay} (the SignalR
535
+ * `onreconnected` hook fires that with the highest seen sequence).
536
+ */
537
+ streamSession(sessionId: string): AiSessionStream;
538
+ /**
539
+ * Backfill missing events from a known sequence number and push them into
540
+ * the host's existing stream. Used by a SignalR `onreconnected` hook the
541
+ * host wires up.
542
+ */
543
+ replay(sessionId: string, sinceSequence: number, sink: Subject<AiSessionEventDto> | ReplaySubject<AiSessionEventDto>): void;
544
+ /**
545
+ * Tenant-scoped hub URL. Composition matches the AI Adapter's hub map —
546
+ * `app.MapHub<AiHub>("/{tenantId:tenantId}/aiHub")` — so the host's
547
+ * `hubPath` is appended after the tenant segment. Host apps that mount the
548
+ * hub at a different relative path override `hubPath` via
549
+ * `AI_ADAPTER_OPTIONS`.
550
+ */
551
+ get hubUrl(): string;
552
+ static ɵfac: i0.ɵɵFactoryDeclaration<AiSessionStreamService, never>;
553
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
554
+ }
563
555
  /**
564
556
  * List view of an AI Adapter tenant's sessions. The host owns data fetching —
565
557
  * the component takes the array as an input signal and emits the rtId on
@@ -572,30 +564,44 @@ declare class AiSessionStreamService {
572
564
  * status, so a Running session never offers Delete and a Completed session
573
565
  * never offers Cancel.
574
566
  */
575
- declare class AiSessionListComponent {
576
- readonly sessions: _angular_core.InputSignal<AiSessionDto[]>;
577
- readonly selectedSessionId: _angular_core.InputSignal<string | null>;
578
- readonly sessionSelected: _angular_core.OutputEmitterRef<string>;
579
- readonly cancelRequested: _angular_core.OutputEmitterRef<string>;
580
- readonly deleteRequested: _angular_core.OutputEmitterRef<string>;
581
- protected readonly orderedSessions: _angular_core.Signal<AiSessionDto[]>;
582
- /**
583
- * Terminal status set, kept in sync with the C# `AiAgentSessionService.IsTerminal`
584
- * predicate. Delete is gated to this set; Cancel is gated to its complement.
585
- * If the wire enum grows a new terminal kind, both predicates must be
586
- * updated here AND on the server.
587
- */
588
- private static readonly TERMINAL_STATUSES;
589
- protected canCancel(status: AiSessionStatus): boolean;
590
- protected canDelete(status: AiSessionStatus): boolean;
591
- protected onSelect(sessionRtId: string): void;
592
- protected onCancel(sessionRtId: string, event: MouseEvent): void;
593
- protected onDelete(sessionRtId: string, event: MouseEvent): void;
594
- protected age(startedAt: string): string;
595
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AiSessionListComponent, never>;
596
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AiSessionListComponent, "mm-ai-session-list", never, { "sessions": { "alias": "sessions"; "required": true; "isSignal": true; }; "selectedSessionId": { "alias": "selectedSessionId"; "required": false; "isSignal": true; }; }, { "sessionSelected": "sessionSelected"; "cancelRequested": "cancelRequested"; "deleteRequested": "deleteRequested"; }, never, never, true, never>;
597
- }
598
-
567
+ export declare class AiSessionListComponent {
568
+ readonly sessions: import("@angular/core").InputSignal<AiSessionDto[]>;
569
+ readonly selectedSessionId: import("@angular/core").InputSignal<string | null>;
570
+ readonly sessionSelected: import("@angular/core").OutputEmitterRef<string>;
571
+ readonly cancelRequested: import("@angular/core").OutputEmitterRef<string>;
572
+ readonly deleteRequested: import("@angular/core").OutputEmitterRef<string>;
573
+ protected readonly orderedSessions: import("@angular/core").Signal<AiSessionDto[]>;
574
+ /**
575
+ * Terminal status set, kept in sync with the C# `AiAgentSessionService.IsTerminal`
576
+ * predicate. Delete is gated to this set; Cancel is gated to its complement.
577
+ * If the wire enum grows a new terminal kind, both predicates must be
578
+ * updated here AND on the server.
579
+ */
580
+ private static readonly TERMINAL_STATUSES;
581
+ protected canCancel(status: AiSessionStatus): boolean;
582
+ protected canDelete(status: AiSessionStatus): boolean;
583
+ protected onSelect(sessionRtId: string): void;
584
+ protected onCancel(sessionRtId: string, event: MouseEvent): void;
585
+ protected onDelete(sessionRtId: string, event: MouseEvent): void;
586
+ protected age(startedAt: string): string;
587
+ static ɵfac: i0.ɵɵFactoryDeclaration<AiSessionListComponent, never>;
588
+ static ɵcmp: i0.ɵɵComponentDeclaration<AiSessionListComponent, "mm-ai-session-list", never, {
589
+ "sessions": {
590
+ "alias": "sessions";
591
+ "required": true;
592
+ "isSignal": true;
593
+ };
594
+ "selectedSessionId": {
595
+ "alias": "selectedSessionId";
596
+ "required": false;
597
+ "isSignal": true;
598
+ };
599
+ }, {
600
+ "sessionSelected": "sessionSelected";
601
+ "cancelRequested": "cancelRequested";
602
+ "deleteRequested": "deleteRequested";
603
+ }, never, never, true, never>;
604
+ }
599
605
  /**
600
606
  * Token-usage summary extracted from an `assistant` or `result` payload.
601
607
  * Fields beyond `input` / `output` are optional because the upstream worker
@@ -603,10 +609,10 @@ declare class AiSessionListComponent {
603
609
  * cache-only turns.
604
610
  */
605
611
  interface ParsedTokenUsage {
606
- readonly input: number;
607
- readonly output: number;
608
- readonly cacheRead?: number;
609
- readonly cacheCreation?: number;
612
+ readonly input: number;
613
+ readonly output: number;
614
+ readonly cacheRead?: number;
615
+ readonly cacheCreation?: number;
610
616
  }
611
617
  /**
612
618
  * A single content fragment inside an assistant event. The worker emits a
@@ -615,13 +621,13 @@ interface ParsedTokenUsage {
615
621
  * the conversational flow intact (text → "I'll run X" → tool_use card).
616
622
  */
617
623
  type ParsedAssistantPart = {
618
- readonly type: 'text';
619
- readonly text: string;
624
+ readonly type: 'text';
625
+ readonly text: string;
620
626
  } | {
621
- readonly type: 'tool_use';
622
- readonly id: string;
623
- readonly toolName: string;
624
- readonly input: unknown;
627
+ readonly type: 'tool_use';
628
+ readonly id: string;
629
+ readonly toolName: string;
630
+ readonly input: unknown;
625
631
  };
626
632
  /**
627
633
  * Discriminated union the chat-stream renders on. The component switches over
@@ -632,49 +638,48 @@ type ParsedAssistantPart = {
632
638
  * stream-json") can surface it on demand without re-parsing.
633
639
  */
634
640
  type ParsedView = {
635
- readonly kind: 'system';
636
- readonly subKind: 'init' | 'hook' | 'rate-limit' | 'other';
637
- readonly summary: string;
638
- readonly raw: unknown;
641
+ readonly kind: 'system';
642
+ readonly subKind: 'init' | 'hook' | 'rate-limit' | 'other';
643
+ readonly summary: string;
644
+ readonly raw: unknown;
639
645
  } | {
640
- readonly kind: 'assistant';
641
- readonly parts: readonly ParsedAssistantPart[];
642
- readonly model: string | null;
643
- readonly usage: ParsedTokenUsage | null;
644
- readonly raw: unknown;
646
+ readonly kind: 'assistant';
647
+ readonly parts: readonly ParsedAssistantPart[];
648
+ readonly model: string | null;
649
+ readonly usage: ParsedTokenUsage | null;
650
+ readonly raw: unknown;
645
651
  } | {
646
- readonly kind: 'tool-result';
647
- readonly toolUseId: string;
648
- readonly content: string;
649
- readonly isError: boolean;
650
- readonly raw: unknown;
652
+ readonly kind: 'tool-result';
653
+ readonly toolUseId: string;
654
+ readonly content: string;
655
+ readonly isError: boolean;
656
+ readonly raw: unknown;
651
657
  } | {
652
- readonly kind: 'result';
653
- readonly text: string;
654
- readonly durationMs: number;
655
- readonly usage: ParsedTokenUsage | null;
656
- readonly costUsd: number | null;
657
- readonly reason: string;
658
- readonly isError: boolean;
659
- readonly raw: unknown;
658
+ readonly kind: 'result';
659
+ readonly text: string;
660
+ readonly durationMs: number;
661
+ readonly usage: ParsedTokenUsage | null;
662
+ readonly costUsd: number | null;
663
+ readonly reason: string;
664
+ readonly isError: boolean;
665
+ readonly raw: unknown;
660
666
  } | {
661
- readonly kind: 'status-change';
662
- readonly status: string;
663
- readonly raw: unknown;
667
+ readonly kind: 'status-change';
668
+ readonly status: string;
669
+ readonly raw: unknown;
664
670
  } | {
665
- readonly kind: 'unknown';
666
- readonly summary: string;
667
- readonly raw: unknown;
671
+ readonly kind: 'unknown';
672
+ readonly summary: string;
673
+ readonly raw: unknown;
668
674
  };
669
675
  /**
670
676
  * Result of one parse step — wraps the source event so the renderer can still
671
677
  * carry `sequence` / `at` / `actorRef` through to the template.
672
678
  */
673
679
  interface ParsedEvent {
674
- readonly event: AiSessionEventDto;
675
- readonly view: ParsedView;
680
+ readonly event: AiSessionEventDto;
681
+ readonly view: ParsedView;
676
682
  }
677
-
678
683
  /**
679
684
  * Read-only transcript of a session, derived from the events stream.
680
685
  *
@@ -689,56 +694,66 @@ interface ParsedEvent {
689
694
  * line breaks via `white-space: pre-wrap`. Picking a renderer (markdown-it vs
690
695
  * marked) is gated on a CSP review and a markdown-corpus regression test.
691
696
  */
692
- declare class AiChatStreamComponent {
693
- readonly events: _angular_core.InputSignal<AiSessionEventDto[]>;
694
- /**
695
- * Sorted + parsed. Recomputes whenever the input signal changes; the sort
696
- * is stable so live appends from SignalR keep prior render positions.
697
- */
698
- protected readonly parsedEvents: _angular_core.Signal<ParsedEvent[]>;
699
- /**
700
- * Per-event "show raw JSON" toggle. Keyed by sequence so live appends
701
- * don't flicker existing toggles closed. A `Set<number>` rather than a
702
- * record so add / delete avoids `keyof` shenanigans.
703
- */
704
- private readonly expandedSet;
705
- protected isExpanded(sequence: number): boolean;
706
- protected toggleRaw(sequence: number): void;
707
- /**
708
- * `HH:MM:SS` formatter — full ISO is too noisy in a 30-event transcript.
709
- * Returns the input unchanged if parsing fails so we don't pretend events
710
- * we can't read are recent.
711
- */
712
- protected formatTime(iso: string): string;
713
- /** Compact "1234 tok" for the assistant header. */
714
- protected formatTokenCount(n: number): string;
715
- /** Duration in either `ms` (sub-second) or `s.SS`. */
716
- protected formatDuration(ms: number): string;
717
- /** Cost in EUR-style decimals; null + zero collapse to a dash. */
718
- protected formatCost(usd: number | null | undefined): string;
719
- /** Pretty-print arbitrary tool_use input or raw blocks for the expandable detail panel. */
720
- protected formatRaw(value: unknown): string;
721
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AiChatStreamComponent, never>;
722
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AiChatStreamComponent, "mm-ai-chat-stream", never, { "events": { "alias": "events"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
723
- }
724
-
697
+ export declare class AiChatStreamComponent {
698
+ readonly events: import("@angular/core").InputSignal<AiSessionEventDto[]>;
699
+ /**
700
+ * Sorted + parsed. Recomputes whenever the input signal changes; the sort
701
+ * is stable so live appends from SignalR keep prior render positions.
702
+ */
703
+ protected readonly parsedEvents: import("@angular/core").Signal<ParsedEvent[]>;
704
+ /**
705
+ * Per-event "show raw JSON" toggle. Keyed by sequence so live appends
706
+ * don't flicker existing toggles closed. A `Set<number>` rather than a
707
+ * record so add / delete avoids `keyof` shenanigans.
708
+ */
709
+ private readonly expandedSet;
710
+ protected isExpanded(sequence: number): boolean;
711
+ protected toggleRaw(sequence: number): void;
712
+ /**
713
+ * `HH:MM:SS` formatter — full ISO is too noisy in a 30-event transcript.
714
+ * Returns the input unchanged if parsing fails so we don't pretend events
715
+ * we can't read are recent.
716
+ */
717
+ protected formatTime(iso: string): string;
718
+ /** Compact "1234 tok" for the assistant header. */
719
+ protected formatTokenCount(n: number): string;
720
+ /** Duration in either `ms` (sub-second) or `s.SS`. */
721
+ protected formatDuration(ms: number): string;
722
+ /** Cost in EUR-style decimals; null + zero collapse to a dash. */
723
+ protected formatCost(usd: number | null | undefined): string;
724
+ /** Pretty-print arbitrary tool_use input or raw blocks for the expandable detail panel. */
725
+ protected formatRaw(value: unknown): string;
726
+ static ɵfac: i0.ɵɵFactoryDeclaration<AiChatStreamComponent, never>;
727
+ static ɵcmp: i0.ɵɵComponentDeclaration<AiChatStreamComponent, "mm-ai-chat-stream", never, {
728
+ "events": {
729
+ "alias": "events";
730
+ "required": true;
731
+ "isSignal": true;
732
+ };
733
+ }, {}, never, never, true, never>;
734
+ }
725
735
  /**
726
736
  * Expandable card surface for one tool invocation in a session transcript.
727
737
  * Click the header to toggle arguments + result; the body is rendered as
728
738
  * pretty-printed JSON so the host doesn't need its own json formatter.
729
739
  */
730
- declare class AiToolCallComponent {
731
- readonly call: _angular_core.InputSignal<AiToolCallDto>;
732
- protected readonly expanded: _angular_core.WritableSignal<boolean>;
733
- protected readonly statusVariant: _angular_core.Signal<"failed" | "succeeded" | "rejected" | "pending">;
734
- protected readonly argumentsJson: _angular_core.Signal<string>;
735
- protected readonly resultJson: _angular_core.Signal<string | null>;
736
- protected toggleExpanded(): void;
737
- private format;
738
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AiToolCallComponent, never>;
739
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AiToolCallComponent, "mm-ai-tool-call", never, { "call": { "alias": "call"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
740
+ export declare class AiToolCallComponent {
741
+ readonly call: import("@angular/core").InputSignal<AiToolCallDto>;
742
+ protected readonly expanded: import("@angular/core").WritableSignal<boolean>;
743
+ protected readonly statusVariant: import("@angular/core").Signal<"failed" | "succeeded" | "rejected" | "pending">;
744
+ protected readonly argumentsJson: import("@angular/core").Signal<string>;
745
+ protected readonly resultJson: import("@angular/core").Signal<string | null>;
746
+ protected toggleExpanded(): void;
747
+ private format;
748
+ static ɵfac: i0.ɵɵFactoryDeclaration<AiToolCallComponent, never>;
749
+ static ɵcmp: i0.ɵɵComponentDeclaration<AiToolCallComponent, "mm-ai-tool-call", never, {
750
+ "call": {
751
+ "alias": "call";
752
+ "required": true;
753
+ "isSignal": true;
754
+ };
755
+ }, {}, never, never, true, never>;
740
756
  }
741
-
742
757
  /**
743
758
  * Approval modal. The host opens it when a `AiApprovalRequestedDto` arrives on
744
759
  * the SignalR stream, fills the `request` input, and listens for the `decide`
@@ -749,54 +764,87 @@ declare class AiToolCallComponent {
749
764
  * the library doesn't pull in a positioning dependency (CDK overlay, Kendo
750
765
  * window, ng-bootstrap, …) — each host shop already has one.
751
766
  */
752
- declare class AiApprovalModalComponent {
753
- readonly request: _angular_core.InputSignal<AiApprovalRequestedDto>;
754
- readonly decide: _angular_core.OutputEmitterRef<AiApprovalDecisionDto>;
755
- readonly dismiss: _angular_core.OutputEmitterRef<void>;
756
- protected readonly comment: _angular_core.WritableSignal<string>;
757
- protected readonly prettyPayload: _angular_core.Signal<string>;
758
- protected approve(): void;
759
- protected reject(): void;
760
- protected onDismiss(): void;
761
- private commentOrUndefined;
762
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AiApprovalModalComponent, never>;
763
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AiApprovalModalComponent, "mm-ai-approval-modal", never, { "request": { "alias": "request"; "required": true; "isSignal": true; }; }, { "decide": "decide"; "dismiss": "dismiss"; }, never, never, true, never>;
764
- }
765
-
767
+ export declare class AiApprovalModalComponent {
768
+ readonly request: import("@angular/core").InputSignal<AiApprovalRequestedDto>;
769
+ readonly decide: import("@angular/core").OutputEmitterRef<AiApprovalDecisionDto>;
770
+ readonly dismiss: import("@angular/core").OutputEmitterRef<void>;
771
+ protected readonly comment: import("@angular/core").WritableSignal<string>;
772
+ protected readonly prettyPayload: import("@angular/core").Signal<string>;
773
+ protected approve(): void;
774
+ protected reject(): void;
775
+ protected onDismiss(): void;
776
+ private commentOrUndefined;
777
+ static ɵfac: i0.ɵɵFactoryDeclaration<AiApprovalModalComponent, never>;
778
+ static ɵcmp: i0.ɵɵComponentDeclaration<AiApprovalModalComponent, "mm-ai-approval-modal", never, {
779
+ "request": {
780
+ "alias": "request";
781
+ "required": true;
782
+ "isSignal": true;
783
+ };
784
+ }, {
785
+ "decide": "decide";
786
+ "dismiss": "dismiss";
787
+ }, never, never, true, never>;
788
+ }
766
789
  /**
767
790
  * Two-bar usage indicator (daily + monthly) with threshold colour state.
768
791
  * Inputs are unit-agnostic counts and caps; the component does not parse the
769
792
  * tenant's `AiQuotaLimit` itself — the host is expected to feed numbers the
770
793
  * adapter already aggregated.
771
794
  */
772
- declare class AiQuotaIndicatorComponent {
773
- readonly dailyConsumed: _angular_core.InputSignal<number>;
774
- readonly dailyCap: _angular_core.InputSignal<number>;
775
- readonly monthlyConsumed: _angular_core.InputSignal<number | null>;
776
- readonly monthlyCap: _angular_core.InputSignal<number | null>;
777
- protected readonly dailyPercent: _angular_core.Signal<number>;
778
- protected readonly monthlyPercent: _angular_core.Signal<number | null>;
779
- protected readonly dailyState: _angular_core.Signal<"ok" | "warning" | "critical">;
780
- protected readonly monthlyState: _angular_core.Signal<"ok" | "warning" | "critical" | null>;
781
- private percent;
782
- private toState;
783
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AiQuotaIndicatorComponent, never>;
784
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AiQuotaIndicatorComponent, "mm-ai-quota-indicator", never, { "dailyConsumed": { "alias": "dailyConsumed"; "required": true; "isSignal": true; }; "dailyCap": { "alias": "dailyCap"; "required": true; "isSignal": true; }; "monthlyConsumed": { "alias": "monthlyConsumed"; "required": false; "isSignal": true; }; "monthlyCap": { "alias": "monthlyCap"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
785
- }
786
-
795
+ export declare class AiQuotaIndicatorComponent {
796
+ readonly dailyConsumed: import("@angular/core").InputSignal<number>;
797
+ readonly dailyCap: import("@angular/core").InputSignal<number>;
798
+ readonly monthlyConsumed: import("@angular/core").InputSignal<number | null>;
799
+ readonly monthlyCap: import("@angular/core").InputSignal<number | null>;
800
+ protected readonly dailyPercent: import("@angular/core").Signal<number>;
801
+ protected readonly monthlyPercent: import("@angular/core").Signal<number | null>;
802
+ protected readonly dailyState: import("@angular/core").Signal<"ok" | "warning" | "critical">;
803
+ protected readonly monthlyState: import("@angular/core").Signal<"ok" | "warning" | "critical" | null>;
804
+ private percent;
805
+ private toState;
806
+ static ɵfac: i0.ɵɵFactoryDeclaration<AiQuotaIndicatorComponent, never>;
807
+ static ɵcmp: i0.ɵɵComponentDeclaration<AiQuotaIndicatorComponent, "mm-ai-quota-indicator", never, {
808
+ "dailyConsumed": {
809
+ "alias": "dailyConsumed";
810
+ "required": true;
811
+ "isSignal": true;
812
+ };
813
+ "dailyCap": {
814
+ "alias": "dailyCap";
815
+ "required": true;
816
+ "isSignal": true;
817
+ };
818
+ "monthlyConsumed": {
819
+ "alias": "monthlyConsumed";
820
+ "required": false;
821
+ "isSignal": true;
822
+ };
823
+ "monthlyCap": {
824
+ "alias": "monthlyCap";
825
+ "required": false;
826
+ "isSignal": true;
827
+ };
828
+ }, {}, never, never, true, never>;
829
+ }
787
830
  /**
788
831
  * Status pill that mirrors the eight values `AiSessionStatus` carries on the
789
832
  * wire. The component is purely visual — it takes a status string in and emits
790
833
  * a CSS class + display label that the host's stylesheet can theme via the
791
834
  * `--mm-ai-status-*` custom properties.
792
835
  */
793
- declare class AiJobStatusBadgeComponent {
794
- readonly status: _angular_core.InputSignal<AiSessionStatus>;
795
- protected readonly variant: _angular_core.Signal<"running" | "queued" | "paused" | "completed" | "failed" | "blocked">;
796
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AiJobStatusBadgeComponent, never>;
797
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AiJobStatusBadgeComponent, "mm-ai-job-status-badge", never, { "status": { "alias": "status"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
836
+ export declare class AiJobStatusBadgeComponent {
837
+ readonly status: import("@angular/core").InputSignal<AiSessionStatus>;
838
+ protected readonly variant: import("@angular/core").Signal<"running" | "queued" | "paused" | "completed" | "failed" | "blocked">;
839
+ static ɵfac: i0.ɵɵFactoryDeclaration<AiJobStatusBadgeComponent, never>;
840
+ static ɵcmp: i0.ɵɵComponentDeclaration<AiJobStatusBadgeComponent, "mm-ai-job-status-badge", never, {
841
+ "status": {
842
+ "alias": "status";
843
+ "required": true;
844
+ "isSignal": true;
845
+ };
846
+ }, {}, never, never, true, never>;
798
847
  }
799
-
800
848
  /**
801
849
  * Self-service credential-ticket issuer (#4133, concept §10). Admin picks a
802
850
  * scope + TTL, hits **Issue ticket**, copies the displayed code, hands it to
@@ -808,29 +856,28 @@ declare class AiJobStatusBadgeComponent {
808
856
  * defaults so the host (Refinery Studio LCARS, demo-app, etc.) can override
809
857
  * them via `--mm-ai-ticket-*` variables without touching the component.
810
858
  */
811
- declare class AiCredentialTicketIssueComponent {
812
- private readonly client;
813
- protected readonly scope: _angular_core.WritableSignal<AiCredentialTicketScope>;
814
- protected readonly ttlMinutes: _angular_core.WritableSignal<number>;
815
- protected readonly issuing: _angular_core.WritableSignal<boolean>;
816
- protected readonly issued: _angular_core.WritableSignal<IssueAiCredentialTicketResponseDto | null>;
817
- protected readonly error: _angular_core.WritableSignal<string | null>;
818
- protected readonly copied: _angular_core.WritableSignal<boolean>;
819
- /** Available scope choices — kept in sync with `AiCredentialTicketScope`. */
820
- protected readonly scopes: readonly {
821
- value: AiCredentialTicketScope;
822
- label: string;
823
- hint: string;
824
- }[];
825
- protected onIssue(): void;
826
- protected onCopy(): void;
827
- protected onClear(): void;
828
- private normalizedTtl;
829
- private formatError;
830
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AiCredentialTicketIssueComponent, never>;
831
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AiCredentialTicketIssueComponent, "mm-ai-credential-ticket-issue", never, {}, {}, never, never, true, never>;
832
- }
833
-
859
+ export declare class AiCredentialTicketIssueComponent {
860
+ private readonly client;
861
+ protected readonly scope: import("@angular/core").WritableSignal<AiCredentialTicketScope>;
862
+ protected readonly ttlMinutes: import("@angular/core").WritableSignal<number>;
863
+ protected readonly issuing: import("@angular/core").WritableSignal<boolean>;
864
+ protected readonly issued: import("@angular/core").WritableSignal<IssueAiCredentialTicketResponseDto | null>;
865
+ protected readonly error: import("@angular/core").WritableSignal<string | null>;
866
+ protected readonly copied: import("@angular/core").WritableSignal<boolean>;
867
+ /** Available scope choices — kept in sync with `AiCredentialTicketScope`. */
868
+ protected readonly scopes: readonly {
869
+ value: AiCredentialTicketScope;
870
+ label: string;
871
+ hint: string;
872
+ }[];
873
+ protected onIssue(): void;
874
+ protected onCopy(): void;
875
+ protected onClear(): void;
876
+ private normalizedTtl;
877
+ private formatError;
878
+ static ɵfac: i0.ɵɵFactoryDeclaration<AiCredentialTicketIssueComponent, never>;
879
+ static ɵcmp: i0.ɵɵComponentDeclaration<AiCredentialTicketIssueComponent, "mm-ai-credential-ticket-issue", never, {}, {}, never, never, true, never>;
880
+ }
834
881
  /**
835
882
  * "New App from Template" wizard (#4145). Presentation-only — the host fetches
836
883
  * the template catalogue via {@link AiAdapterClientService.getAppTemplates},
@@ -847,43 +894,55 @@ declare class AiCredentialTicketIssueComponent {
847
894
  * overkill. If a future template needs richer rendering, switch this to
848
895
  * `handlebars.precompile`-at-build-time and re-evaluate.
849
896
  */
850
- declare class AiNewAppDialogComponent {
851
- /** Available templates from the adapter — typically 3 in Phase 1. */
852
- readonly templates: _angular_core.InputSignal<readonly AiAppTemplateDto[]>;
853
- /** Tenant name shown in the dialog header so the operator confirms the scope. */
854
- readonly tenantName: _angular_core.InputSignal<string>;
855
- /**
856
- * Emitted on Submit with the fully interpolated Goal + the picked template id.
857
- * Named `confirmed` (not `submit`) because Angular flags native-event collisions
858
- * — `submit` is a DOM event and triggers `@angular-eslint/no-output-native`.
859
- */
860
- readonly confirmed: _angular_core.OutputEmitterRef<AiNewAppSubmission>;
861
- /**
862
- * Emitted on Cancel / dismiss. The host hides the wizard on this signal.
863
- * Named `cancelled` for the same reason `confirmed` is not `submit`.
864
- */
865
- readonly cancelled: _angular_core.OutputEmitterRef<void>;
866
- /** rtId-style id of the picked template, or empty until the operator picks one. */
867
- protected readonly selectedTemplateId: _angular_core.WritableSignal<string>;
868
- protected readonly projectName: _angular_core.WritableSignal<string>;
869
- protected readonly primaryEntity: _angular_core.WritableSignal<string>;
870
- protected readonly selectedTemplate: _angular_core.Signal<AiAppTemplateDto | null>;
871
- /**
872
- * Rendered Goal string the operator sees in the preview block. Stays empty
873
- * until a template is picked AND every required placeholder has a value, so
874
- * the operator never sees a half-interpolated string.
875
- */
876
- protected readonly renderedGoal: _angular_core.Signal<string>;
877
- /** True when every placeholder the picked template declares has a non-empty value. */
878
- protected readonly allRequiredFilled: _angular_core.Signal<boolean>;
879
- protected onSubmit(): void;
880
- protected onCancel(): void;
881
- /** Read the signal that backs the named placeholder, or `null` if unknown. */
882
- private valueFor;
883
- private interpolate;
884
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<AiNewAppDialogComponent, never>;
885
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AiNewAppDialogComponent, "mm-ai-new-app-dialog", never, { "templates": { "alias": "templates"; "required": true; "isSignal": true; }; "tenantName": { "alias": "tenantName"; "required": false; "isSignal": true; }; }, { "confirmed": "confirmed"; "cancelled": "cancelled"; }, never, never, true, never>;
886
- }
887
-
888
- export { AI_ADAPTER_OPTIONS, AI_SESSION_STREAM_CONNECTION_FACTORY, AiAdapterClientService, AiApprovalModalComponent, AiChatStreamComponent, AiCredentialTicketIssueComponent, AiJobStatusBadgeComponent, AiNewAppDialogComponent, AiQuotaIndicatorComponent, AiSessionListComponent, AiSessionStreamService, AiToolCallComponent, provideOctoAiConsole };
889
- export type { AiAdapterOptions, AiAppTemplateDto, AiApprovalDecidedDto, AiApprovalDecisionDto, AiApprovalOutcome, AiApprovalReason, AiApprovalRequestedDto, AiCredentialTicketScope, AiGitHubPatDto, AiHubConnectionLike, AiJobKind, AiNewAppSubmission, AiQuotaSeverity, AiQuotaSnapshotDto, AiQuotaWarningDto, AiSessionDto, AiSessionEventDto, AiSessionEventKind, AiSessionStatus, AiSessionStatusChangedDto, AiSessionStream, AiSessionStreamConnectionFactory, AiToolCallDto, CreateSessionRequestDto, CreateSessionResponseDto, IssueAiCredentialTicketRequestDto, IssueAiCredentialTicketResponseDto, RegisterAiGitHubPatRequestDto };
897
+ export declare class AiNewAppDialogComponent {
898
+ /** Available templates from the adapter — typically 3 in Phase 1. */
899
+ readonly templates: import("@angular/core").InputSignal<readonly AiAppTemplateDto[]>;
900
+ /** Tenant name shown in the dialog header so the operator confirms the scope. */
901
+ readonly tenantName: import("@angular/core").InputSignal<string>;
902
+ /**
903
+ * Emitted on Submit with the fully interpolated Goal + the picked template id.
904
+ * Named `confirmed` (not `submit`) because Angular flags native-event collisions
905
+ * — `submit` is a DOM event and triggers `@angular-eslint/no-output-native`.
906
+ */
907
+ readonly confirmed: import("@angular/core").OutputEmitterRef<AiNewAppSubmission>;
908
+ /**
909
+ * Emitted on Cancel / dismiss. The host hides the wizard on this signal.
910
+ * Named `cancelled` for the same reason `confirmed` is not `submit`.
911
+ */
912
+ readonly cancelled: import("@angular/core").OutputEmitterRef<void>;
913
+ /** rtId-style id of the picked template, or empty until the operator picks one. */
914
+ protected readonly selectedTemplateId: import("@angular/core").WritableSignal<string>;
915
+ protected readonly projectName: import("@angular/core").WritableSignal<string>;
916
+ protected readonly primaryEntity: import("@angular/core").WritableSignal<string>;
917
+ protected readonly selectedTemplate: import("@angular/core").Signal<AiAppTemplateDto | null>;
918
+ /**
919
+ * Rendered Goal string the operator sees in the preview block. Stays empty
920
+ * until a template is picked AND every required placeholder has a value, so
921
+ * the operator never sees a half-interpolated string.
922
+ */
923
+ protected readonly renderedGoal: import("@angular/core").Signal<string>;
924
+ /** True when every placeholder the picked template declares has a non-empty value. */
925
+ protected readonly allRequiredFilled: import("@angular/core").Signal<boolean>;
926
+ protected onSubmit(): void;
927
+ protected onCancel(): void;
928
+ /** Read the signal that backs the named placeholder, or `null` if unknown. */
929
+ private valueFor;
930
+ private interpolate;
931
+ static ɵfac: i0.ɵɵFactoryDeclaration<AiNewAppDialogComponent, never>;
932
+ static ɵcmp: i0.ɵɵComponentDeclaration<AiNewAppDialogComponent, "mm-ai-new-app-dialog", never, {
933
+ "templates": {
934
+ "alias": "templates";
935
+ "required": true;
936
+ "isSignal": true;
937
+ };
938
+ "tenantName": {
939
+ "alias": "tenantName";
940
+ "required": false;
941
+ "isSignal": true;
942
+ };
943
+ }, {
944
+ "confirmed": "confirmed";
945
+ "cancelled": "cancelled";
946
+ }, never, never, true, never>;
947
+ }
948
+ export {};