@nauticana/sail 1.1.37 → 1.1.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -713,7 +713,7 @@ import { AgentStudioService, PromptLanguageEditorComponent, TurnStream } from '@
713
713
  | `TurnStream` | Per-turn stream state: `accept(frame)` accepts Scout's zero-based frames and drops frames already rendered, `cursor()` is the next sequence wanted for inclusive replay, a suspension frame (`approval_pending`, even when marked final) sets `awaiting_approval` without advancing the cursor so the resumed frame at the same sequence is accepted, `markReplayExpired()` + `acceptStoredResult(frame)` handle an expired replay window, `markCancelRequested()` holds `cancelling` until the final frame. |
714
714
  | `sail-turn-stream-view` | `TurnStream` + event list + status + cancel button (`cancelRequested`). |
715
715
  | `sail-decision-timeline` | Read-only decision chain of one request, grouped by category. |
716
- | `ConversationService` | Transport for Scout's conversation bridge: `submit`, `stream(requestId, turnStream)`, `cancel`. Mount point injected through `CONVERSATION_BASE_PATH`; the service is a root singleton, so provide the token at bootstrap, or both together on a component. |
716
+ | `ConversationService` | Transport for Scout's conversation bridge: `submit`, `stream(requestId, turnStream)`, `cancel`, `turns(workRef, before, limit)`, and `agents(agentType)` — the `ConversationAgent`s (`agent_name`, `display_name`, `is_default`, `release`) of that type the person may address, default first, whose `agent_name` goes on a turn request. Mount point injected through `CONVERSATION_BASE_PATH`; the service is a root singleton, so provide the token at bootstrap, or both together on a component. |
717
717
  | `SseParser` | Incremental `text/event-stream` parser: `push(chunk)` returns whole events out of chunks that split anywhere, including between the CR and LF of a CRLF; `finish()` flushes what the closing body left pending. |
718
718
 
719
719
  `DecisionRecord` is Scout's `api.DecisionRecord` (outcome `A`, `D`, or `P`, captioned from `audit_decision_outcome`); the timeline takes the records of one request, the activity table pages the tenant's. Style the `.prompt-*`, `.release-*`, `.turn-*`, `.decision-*`, `.studio__*`, and `.approval-inbox__*` class hooks. Scout's short codes render through `sailCaption`, a pipe over the backend's constant captions.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nauticana/sail",
3
- "version": "1.1.37",
3
+ "version": "1.1.38",
4
4
  "description": "Metadata-driven Angular component library for CRUD admin frontends backed by the keel Go backend. Tables, forms, navigation, OTP/2FA/social auth, billing, payout onboarding.",
5
5
  "main": "src/index.ts",
6
6
  "exports": {
@@ -17,6 +17,14 @@ export interface ConversationTurnRequest {
17
17
  input: unknown;
18
18
  }
19
19
 
20
+ /** One agent the person may address through an agent type (`agent_name` on a turn request). */
21
+ export interface ConversationAgent {
22
+ agent_name: string;
23
+ display_name: string;
24
+ is_default: boolean;
25
+ release: string;
26
+ }
27
+
20
28
  export interface ConversationTurnAccepted {
21
29
  request_id: string;
22
30
  }
@@ -4,6 +4,7 @@ import { BaseAuthService } from '../../service/auth.service';
4
4
  import { BaseRestService } from '../../service/base_rest.service';
5
5
  import {
6
6
  CONVERSATION_BASE_PATH,
7
+ ConversationAgent,
7
8
  ConversationStreamError,
8
9
  ConversationStreamFailure,
9
10
  ConversationTurnAccepted,
@@ -19,7 +20,7 @@ const REPLAY_EXPIRED = 410;
19
20
 
20
21
  /**
21
22
  * Transport for Scout's conversation bridge: `POST {base}turn`,
22
- * `GET {base}turn/stream` as SSE, `POST {base}turn/cancel`. Submit and cancel go through
23
+ * `GET {base}turn/stream` as SSE, `POST {base}turn/cancel`, `GET {base}turns`, `GET {base}agents`. Submit and cancel go through
23
24
  * `HttpClient` (and so through sail's interceptors); the stream cannot, because
24
25
  * `EventSource` sends no `Authorization` header — it is a `fetch` body reader that carries
25
26
  * the bearer itself and rotates it through `BaseAuthService.refreshSession()` once on a 401.
@@ -35,6 +36,11 @@ export class ConversationService extends BaseRestService {
35
36
  return this.http.post<ConversationTurnAccepted>(this.conversationUrl('turn'), request);
36
37
  }
37
38
 
39
+ /** The agents of `agentType` the person may address, the default first. */
40
+ agents(agentType: string): Observable<ConversationAgent[]> {
41
+ return this.http.get<ConversationAgent[]>(this.conversationUrl('agents'), { params: { agent_type: agentType } });
42
+ }
43
+
38
44
  /** The person's turns, newest first; `before` continues from a page's `next_before`. */
39
45
  turns(workRef = '', before = '', limit = 0): Observable<ConversationTurnPage> {
40
46
  const params: Record<string, string> = {};