@primusclaw/personal-agent 0.7.0 → 0.7.1

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
@@ -17575,11 +17575,17 @@ function choiceOf(event) {
17575
17575
  return { options, multiple: choice["multiple"] === true };
17576
17576
  }
17577
17577
  var REMOTE_KINDS = /* @__PURE__ */ new Set(["done", "needs_you", "error", "resolved"]);
17578
+ var TERMINAL_TOOL_NAMES = {
17579
+ claude: "Claude Code",
17580
+ codex: "Codex",
17581
+ cursor: "Cursor"
17582
+ };
17578
17583
  function resolvedOf(remote) {
17579
17584
  const resolved = record2(remote["resolved"]);
17580
17585
  const actionId = resolved?.["action_id"];
17581
17586
  return resolved && typeof actionId === "string" && actionId ? { actionId, by: field2(resolved["by"]) } : void 0;
17582
17587
  }
17588
+ var toolName = (tool2) => typeof tool2 === "string" && Object.hasOwn(TERMINAL_TOOL_NAMES, tool2) ? TERMINAL_TOOL_NAMES[tool2] : void 0;
17583
17589
  function remoteNoticeOf(event) {
17584
17590
  const remote = event["type"] === "assistant.say" ? record2(event["remote"]) : void 0;
17585
17591
  const kind = remote?.["kind"];
@@ -17594,7 +17600,7 @@ function remoteNoticeOf(event) {
17594
17600
  sessionId,
17595
17601
  ask: record2(remote["ask"]),
17596
17602
  machine: field2(remote["machine"]),
17597
- agent: field2(remote["agent"])
17603
+ agent: toolName(remote["tool"]) ?? field2(remote["agent"])
17598
17604
  };
17599
17605
  }
17600
17606
 
@@ -64,6 +64,7 @@ export interface RemoteNotice {
64
64
  readonly sessionId: string;
65
65
  readonly ask: Event | undefined;
66
66
  readonly machine: string;
67
+ /** Who asked, as the person knows it: the tool's name (Claude Code, Codex, Cursor) when Claw said which, else the agent's id. */
67
68
  readonly agent: string;
68
69
  readonly resolved?: {
69
70
  readonly actionId: string;
@@ -101,6 +101,11 @@ export interface AssistantRemoteNotice {
101
101
  session_id: string;
102
102
  machine: string;
103
103
  agent: string;
104
+ /**
105
+ * A terminal's request (`ask.origin` "terminal"): which tool asked there (`claude`, `codex`, `cursor`), for a channel to name it as its
106
+ * users know it (Claude Code, Codex, Cursor) instead of by `agent`, the connector's id for it. Absent when the connector did not say.
107
+ */
108
+ tool?: "claude" | "codex" | "cursor";
104
109
  ask?: AssistantRemoteAsk;
105
110
  /** With `kind: "resolved"`: which request, and who ended it (`terminal`, or `timeout`, `session_end`, `connector_restart` when nobody did). */
106
111
  resolved?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@primusclaw/personal-agent",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "The personal agent's channel-neutral core: domain logic, ports and plugin interfaces.",
5
5
  "license": "MIT",
6
6
  "repository": {