@primusclaw/personal-agent-teams 0.14.0 → 0.15.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.
package/dist/index.js CHANGED
@@ -3216,6 +3216,25 @@ function statusCard(view) {
3216
3216
  return message([...lead, top, ...lines], view.buttons.map(remoteAction), view.buttonsMax);
3217
3217
  }
3218
3218
 
3219
+ // packages/teams/src/views/remote/terminal-end-card.ts
3220
+ function commandAction(button) {
3221
+ return { type: "Action.Submit", title: button.title, data: { msteams: { type: "imBack", value: button.command } } };
3222
+ }
3223
+ function terminalEndCard(view) {
3224
+ const body = [
3225
+ header(view.title, {
3226
+ tone: view.failed ? "attention" : "good",
3227
+ emoji: view.failed ? "failed" : "good",
3228
+ subtitle: view.where
3229
+ })
3230
+ ];
3231
+ for (const line2 of view.earlier) body.push(block(line2, { spacing: "Small", weight: "Bolder" }));
3232
+ if (view.summary) body.push(block(view.summary, { spacing: "Small" }));
3233
+ if (view.full) body.push(...fold("end-full", [block(view.full, { spacing: "Small" })], view.fullLabel));
3234
+ if (view.rest) body.push(note(view.rest));
3235
+ return message(body, view.buttons.map(commandAction));
3236
+ }
3237
+
3219
3238
  // packages/teams/src/views/remote/window-card.ts
3220
3239
  import { pyStrip as pyStrip3 } from "@primusclaw/personal-agent";
3221
3240
  var WINDOW_BUTTONS_MAX = 4;
@@ -3305,6 +3324,7 @@ var REMOTE_RENDERERS = {
3305
3324
  remotePermission: permissionCard,
3306
3325
  remoteAsk: remoteAskCard,
3307
3326
  terminalAsk: terminalAskCard,
3327
+ terminalEnd: terminalEndCard,
3308
3328
  remoteDecided: decidedCard,
3309
3329
  remoteDisconnect: disconnectCard,
3310
3330
  remoteTakeover: takeoverCard,
package/dist/main.js CHANGED
@@ -6275,6 +6275,25 @@ function statusCard(view) {
6275
6275
  return message([...lead, top, ...lines], view.buttons.map(remoteAction2), view.buttonsMax);
6276
6276
  }
6277
6277
 
6278
+ // packages/teams/src/views/remote/terminal-end-card.ts
6279
+ function commandAction(button) {
6280
+ return { type: "Action.Submit", title: button.title, data: { msteams: { type: "imBack", value: button.command } } };
6281
+ }
6282
+ function terminalEndCard(view) {
6283
+ const body = [
6284
+ header(view.title, {
6285
+ tone: view.failed ? "attention" : "good",
6286
+ emoji: view.failed ? "failed" : "good",
6287
+ subtitle: view.where
6288
+ })
6289
+ ];
6290
+ for (const line2 of view.earlier) body.push(block(line2, { spacing: "Small", weight: "Bolder" }));
6291
+ if (view.summary) body.push(block(view.summary, { spacing: "Small" }));
6292
+ if (view.full) body.push(...fold("end-full", [block(view.full, { spacing: "Small" })], view.fullLabel));
6293
+ if (view.rest) body.push(note(view.rest));
6294
+ return message(body, view.buttons.map(commandAction));
6295
+ }
6296
+
6278
6297
  // packages/teams/src/views/remote/window-card.ts
6279
6298
  import { pyStrip as pyStrip14 } from "@primusclaw/personal-agent";
6280
6299
  var WINDOW_BUTTONS_MAX = 4;
@@ -6364,6 +6383,7 @@ var REMOTE_RENDERERS = {
6364
6383
  remotePermission: permissionCard,
6365
6384
  remoteAsk: remoteAskCard,
6366
6385
  terminalAsk: terminalAskCard,
6386
+ terminalEnd: terminalEndCard,
6367
6387
  remoteDecided: decidedCard,
6368
6388
  remoteDisconnect: disconnectCard,
6369
6389
  remoteTakeover: takeoverCard,
@@ -6,7 +6,8 @@ export { connectBlocks, sessionsCard } from "./sessions-card.js";
6
6
  export { disconnectButtons, disconnectCard, machineChoiceCard, modeCard, takeoverCard } from "./small-cards.js";
7
7
  export { hiddenCard } from "./hidden-card.js";
8
8
  export { statusCard } from "./status-card.js";
9
+ export { commandAction, terminalEndCard } from "./terminal-end-card.js";
9
10
  export { windowCard } from "./window-card.js";
10
- type RemoteRenderers = Pick<Renderers, "remoteAgents" | "remoteSessions" | "remoteStatus" | "remotePermission" | "remoteAsk" | "terminalAsk" | "remoteDecided" | "remoteDisconnect" | "remoteTakeover" | "remoteMachineChoice" | "remoteMode" | "remoteWindow" | "remoteHidden">;
11
+ type RemoteRenderers = Pick<Renderers, "remoteAgents" | "remoteSessions" | "remoteStatus" | "remotePermission" | "remoteAsk" | "terminalAsk" | "terminalEnd" | "remoteDecided" | "remoteDisconnect" | "remoteTakeover" | "remoteMachineChoice" | "remoteMode" | "remoteWindow" | "remoteHidden">;
11
12
  /** The remote-agent renderers. */
12
13
  export declare const REMOTE_RENDERERS: RemoteRenderers;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The card of a turn that ended in a terminal while nobody was at it: the conversation's name and status as the title, the tool, machine,
3
+ * folder and item number in one small line under it, an earlier turn that asked the person something or failed (when one did), what the
4
+ * agent did, its whole last answer folded behind "Show all", and buttons
5
+ * that send the commands for it as the person's own message (an imBack: the command is handled exactly as if typed).
6
+ */
7
+ import type { remoteView } from "@primusclaw/personal-agent";
8
+ import type { CardElement } from "../../cards/json.js";
9
+ import { type CardMessage } from "../../cards/kit.js";
10
+ /** A button that sends `command` into the chat as the person's own message. */
11
+ export declare function commandAction(button: remoteView.CommandButton): CardElement;
12
+ export declare function terminalEndCard(view: remoteView.TerminalEndView): CardMessage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primusclaw/personal-agent-teams",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "The personal agent on Microsoft Teams: activities, Adaptive Cards, streams, Bot Connector, inbound queue, and the worker's Teams surface.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -35,8 +35,8 @@
35
35
  "dependencies": {
36
36
  "@azure/core-auth": "^1.11.0",
37
37
  "@azure/service-bus": "^7.10.0",
38
- "@primusclaw/personal-agent": "0.14.0",
39
- "@primusclaw/personal-agent-runtime": "0.14.0",
38
+ "@primusclaw/personal-agent": "0.15.0",
39
+ "@primusclaw/personal-agent-runtime": "0.15.0",
40
40
  "zod": "^4.6.7"
41
41
  },
42
42
  "devDependencies": {