@primusclaw/personal-agent 0.4.0 → 0.6.0

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.
@@ -54,6 +54,8 @@ export declare class StatusMessage<S> {
54
54
  private opening;
55
55
  private expiry;
56
56
  private again;
57
+ /** The stream being closed because a card waits for the person (`awaitingChoice`). */
58
+ private choice;
57
59
  private preparingTimer;
58
60
  private lastText;
59
61
  private lastAt;
@@ -80,6 +82,24 @@ export declare class StatusMessage<S> {
80
82
  private statusLines;
81
83
  /** Close the stream with STILL_WORKING before the chat's limit; the answer, whenever it comes, is a message of its own. */
82
84
  private closeInTime;
85
+ /**
86
+ * Close the open stream with `line` (after the agent's words in the bubble) while the turn goes on; the answer, whenever it comes, is
87
+ * a message of its own. Nothing more is sent to the stream once this has begun.
88
+ */
89
+ private closeEarly;
90
+ /**
91
+ * A card now waits for the person (a question of the agent): it is their turn, so the floating status must not go on
92
+ * saying "Thinking…" until the chat's limit. An open stream is closed at once with AWAITING_CHOICE, and the answer comes
93
+ * as a message of its own, as after the limit. Without a stream (the progress message) nothing changes: it has no
94
+ * spinner. Never fails the turn.
95
+ */
96
+ awaitingChoice(): void;
97
+ /**
98
+ * Claw queued the message behind a turn it is still running: `notice` closes the stream at once, so it does not say
99
+ * "Thinking…" for the whole wait. The answer comes as a message of its own, as after the limit. When the stream did not open
100
+ * after all, `notice` is said as a message. False when there is no stream: the caller says it. Never fails the turn.
101
+ */
102
+ queued(notice: string): boolean;
83
103
  /** The chat's id of the posted message; undefined when the post failed or its id never came (nothing is edited then). */
84
104
  private messageId;
85
105
  /**
@@ -24,8 +24,8 @@ export interface TurnApprovals {
24
24
  * False when a card for this approval is already in a chat: the turn then shows none. `userId`: the person the turn is for,
25
25
  * whose approval it is (Python `store.save_approval(sender.aad_id, ...)`).
26
26
  */
27
- record(userId: string, sessionId: string, toolUseId: string, tool: string, expiresIn: number | undefined, envelope: Envelope): boolean;
28
- sent(sessionId: string, toolUseId: string): void;
27
+ record(userId: string, sessionId: string, toolUseId: string, tool: string, expiresIn: number | undefined, envelope: Envelope, questions?: unknown): boolean;
28
+ sent(sessionId: string, toolUseId: string, cardId?: string): void;
29
29
  unsent(sessionId: string, toolUseId: string): void;
30
30
  }
31
31
  /** What a review turn adds to a chat turn (the review service fills it in). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primusclaw/personal-agent",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "The personal agent's channel-neutral core: domain logic, ports and plugin interfaces.",
5
5
  "license": "MIT",
6
6
  "repository": {