@vellumai/assistant 0.12.2-dev.202609211820.22f71b0 → 0.12.2-dev.202609211913.b0ee78c

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.
Files changed (38) hide show
  1. package/docs/desktop-browser-cli.md +4 -2
  2. package/package.json +1 -1
  3. package/src/__tests__/context-search-agent-runner.test.ts +1 -1
  4. package/src/__tests__/context-search-fanout.test.ts +1 -1
  5. package/src/__tests__/context-search-types.test.ts +7 -7
  6. package/src/__tests__/plugin-import-boundary-guard.test.ts +3 -0
  7. package/src/__tests__/server-history-render.test.ts +40 -1
  8. package/src/api/events/notification-conversation-created.ts +9 -13
  9. package/src/api/events/tool-result.ts +14 -0
  10. package/src/api/index.ts +5 -0
  11. package/src/api/remember-tool.ts +15 -0
  12. package/src/approvals/AGENTS.md +3 -1
  13. package/src/cli/lib/bundled-marketplace.json +13 -0
  14. package/src/daemon/handlers/shared.ts +41 -9
  15. package/src/desktop/desktop-computer-use.test.ts +6 -6
  16. package/src/desktop/desktop-computer-use.ts +1 -2
  17. package/src/desktop/desktop-display.ts +2 -2
  18. package/src/desktop/desktop-session-manager.test.ts +1 -1
  19. package/src/notifications/AGENTS.md +1 -1
  20. package/src/notifications/README.md +54 -90
  21. package/src/notifications/adapters/macos.ts +8 -8
  22. package/src/notifications/broadcaster.ts +5 -6
  23. package/src/notifications/emit-signal.ts +5 -5
  24. package/src/notifications/signal.ts +1 -1
  25. package/src/plugin-api/index.ts +10 -0
  26. package/src/plugins/defaults/memory/context-search/agent-protocol.ts +7 -3
  27. package/src/plugins/defaults/memory/context-search/agent-runner.ts +2 -2
  28. package/src/plugins/defaults/memory/context-search/limits.ts +10 -12
  29. package/src/plugins/defaults/memory/context-search/recall-input.ts +38 -0
  30. package/src/plugins/defaults/memory/context-search/search.ts +6 -4
  31. package/src/plugins/defaults/memory/context-search/types.ts +1 -11
  32. package/src/plugins/defaults/memory/graph/tool-handlers.ts +3 -16
  33. package/src/plugins/defaults/memory/graph/tools.ts +35 -64
  34. package/src/plugins/defaults/memory/tools.test.ts +81 -7
  35. package/src/plugins/defaults/memory/tools.ts +18 -9
  36. package/src/providers/openai/__tests__/chat-template-flatten.test.ts +24 -0
  37. package/src/runtime/guardian-reply-router.ts +23 -21
  38. package/src/util/provider-error-patterns.ts +3 -0
@@ -50,8 +50,10 @@ Non-platform assistants keep their connected-computer behavior.
50
50
 
51
51
  Explicit `target: "connected-computer"` or `target_client_id` selects a connected
52
52
  computer on every client. The selected target never falls back to another
53
- computer when unavailable. Virtual desktop observations return full-screen
54
- screenshots and mouse actions use screen coordinates.
53
+ computer when unavailable. The virtual desktop uses a fixed 1440x810 display.
54
+ Observations return full-screen screenshots and mouse actions use the same
55
+ screen coordinates.
56
+ Viewer resizing scales the canvas locally without changing the desktop layout.
55
57
 
56
58
  Observe first and pass the returned `observation_id` with each native action.
57
59
  Browser commands, user handoff, errors, and interruption require a fresh
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/assistant",
3
- "version": "0.12.2-dev.202609211820.22f71b0",
3
+ "version": "0.12.2-dev.202609211913.b0ee78c",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -22,11 +22,11 @@ mock.module("../providers/provider-send-message.js", () => ({
22
22
  },
23
23
  }));
24
24
 
25
+ import type { RecallSource } from "../api/events/tool-result.js";
25
26
  import { runAgenticRecall } from "../plugins/defaults/memory/context-search/agent-runner.js";
26
27
  import type {
27
28
  RecallEvidence,
28
29
  RecallSearchContext,
29
- RecallSource,
30
30
  RecallSourceAdapter,
31
31
  } from "../plugins/defaults/memory/context-search/types.js";
32
32
 
@@ -1,12 +1,12 @@
1
1
  import { describe, expect, test } from "bun:test";
2
2
 
3
+ import type { RecallSource } from "../api/events/tool-result.js";
3
4
  import type { AssistantConfig } from "../config/schema.js";
4
5
  import { formatDeterministicRecallAnswer } from "../plugins/defaults/memory/context-search/format.js";
5
6
  import { runDeterministicRecallSearch } from "../plugins/defaults/memory/context-search/search.js";
6
7
  import type {
7
8
  RecallEvidence,
8
9
  RecallSearchContext,
9
- RecallSource,
10
10
  RecallSourceAdapter,
11
11
  } from "../plugins/defaults/memory/context-search/types.js";
12
12
 
@@ -1,7 +1,10 @@
1
1
  import { describe, expect, test } from "bun:test";
2
2
 
3
3
  import {
4
- ALL_RECALL_SOURCES,
4
+ type RecallSource,
5
+ RecallSourceSchema,
6
+ } from "../api/events/tool-result.js";
7
+ import {
5
8
  DEFAULT_RECALL_MAX_RESULTS,
6
9
  normalizeRecallInput,
7
10
  normalizeRecallMaxResults,
@@ -10,11 +13,8 @@ import {
10
13
  RECALL_SOURCE_ROUNDS_BY_DEPTH,
11
14
  RECALL_TOTAL_EVIDENCE_TEXT_CAP,
12
15
  } from "../plugins/defaults/memory/context-search/limits.js";
13
- import type {
14
- RecallInput,
15
- RecallSource,
16
- RecallSourceAdapter,
17
- } from "../plugins/defaults/memory/context-search/types.js";
16
+ import type { RecallInput } from "../plugins/defaults/memory/context-search/recall-input.js";
17
+ import type { RecallSourceAdapter } from "../plugins/defaults/memory/context-search/types.js";
18
18
 
19
19
  describe("normalizeRecallInput", () => {
20
20
  test("defaults omitted sources, max results, and depth", () => {
@@ -22,7 +22,7 @@ describe("normalizeRecallInput", () => {
22
22
 
23
23
  expect(normalized).toEqual({
24
24
  query: "project notes",
25
- sources: [...ALL_RECALL_SOURCES],
25
+ sources: [...RecallSourceSchema.options],
26
26
  maxResults: DEFAULT_RECALL_MAX_RESULTS,
27
27
  depth: "standard",
28
28
  sourceRounds: 2,
@@ -99,6 +99,8 @@ const BASELINE: Record<string, readonly string[]> = {
99
99
  "../../../../../persistence/schema/index.js",
100
100
  "../../../../../security/untrusted-content.js",
101
101
  "../../../../api/events/memory-recalled.js",
102
+ "../../../../api/events/tool-result.js",
103
+ "../../../../api/remember-tool.js",
102
104
  "../../../../api/responses/memory-v3-selection-log.js",
103
105
  "../../../../config/assistant-feature-flags.js",
104
106
  "../../../../config/default-profile-catalog.js",
@@ -166,6 +168,7 @@ const BASELINE: Record<string, readonly string[]> = {
166
168
  "../../../../util/json.js",
167
169
  "../../../../util/logger.js",
168
170
  "../../../../util/platform.js",
171
+ "../../../api/remember-tool.js",
169
172
  "../../../channels/types.js",
170
173
  "../../../config/loader.js",
171
174
  "../../../config/memory-v3-gate.js",
@@ -1,7 +1,10 @@
1
1
  import { beforeEach, describe, expect, test } from "bun:test";
2
2
 
3
3
  import type { AnsweredQuestion } from "../api/events/question-answered.js";
4
- import type { ToolActivityMetadata } from "../api/events/tool-result.js";
4
+ import type {
5
+ ToolActivityMetadata,
6
+ WebFetchMetadata,
7
+ } from "../api/events/tool-result.js";
5
8
  import { renderHistoryContent } from "../daemon/handlers/shared.js";
6
9
  import {
7
10
  getAttachmentsForMessage,
@@ -675,6 +678,42 @@ describe("renderHistoryContent", () => {
675
678
  expect(output.toolCalls[0].activityMetadata).toBeUndefined();
676
679
  });
677
680
 
681
+ test("drops a malformed activity entry and keeps a valid sibling", () => {
682
+ const webFetch: WebFetchMetadata = {
683
+ url: "https://example.com",
684
+ finalUrl: "https://example.com",
685
+ status: 200,
686
+ byteCount: 1024,
687
+ charCount: 900,
688
+ truncated: false,
689
+ domain: "example.com",
690
+ redirectCount: 0,
691
+ durationMs: 40,
692
+ };
693
+ const output = renderHistoryContent([
694
+ {
695
+ type: "tool_use",
696
+ id: "tu_1",
697
+ name: "web_fetch",
698
+ input: { url: "https://example.com" },
699
+ _activityMetadata: {
700
+ webSearch: { query: "x", results: "not a list" },
701
+ webFetch,
702
+ },
703
+ },
704
+ {
705
+ type: "server_tool_use",
706
+ id: "tu_2",
707
+ name: "web_search",
708
+ input: { query: "x" },
709
+ _activityMetadata: { webSearch: { query: 42 } },
710
+ },
711
+ ]);
712
+
713
+ expect(output.toolCalls[0].activityMetadata).toEqual({ webFetch });
714
+ expect(output.toolCalls[1].activityMetadata).toBeUndefined();
715
+ });
716
+
678
717
  test("ignores non-array _risk*Options annotations", () => {
679
718
  // Defensive: a malformed persisted block should not throw or coerce.
680
719
  const output = renderHistoryContent([
@@ -2,9 +2,8 @@
2
2
  * `notification_conversation_created` SSE event.
3
3
  *
4
4
  * Server → client broadcast emitted when an incoming notification
5
- * creates a new vellum conversation. Clients use it to place the
6
- * conversation in the sidebar (`groupId`, `source`) and decide whether
7
- * to raise a fallback OS banner (`silent`). A guardian-sensitive
5
+ * creates a new vellum conversation. First-party clients ignore it; the
6
+ * web client lists it as a no-op. A guardian-sensitive
8
7
  * conversation is announced only to connections authenticated as the
9
8
  * guardian named in `targetGuardianPrincipalId`.
10
9
  *
@@ -28,22 +27,19 @@ export const NotificationConversationCreatedEventSchema = z.object({
28
27
  */
29
28
  targetGuardianPrincipalId: z.string().optional(),
30
29
  /**
31
- * Conversation group identifier propagated from the signal producer.
32
- * Clients use this to place the conversation in the correct sidebar
33
- * folder (e.g. "system:scheduled" for schedule completion threads).
30
+ * Conversation group identifier propagated from the signal producer:
31
+ * the sidebar folder the conversation belongs in (e.g.
32
+ * "system:scheduled" for schedule completion threads).
34
33
  */
35
34
  groupId: z.string().optional(),
36
35
  /**
37
- * Semantic source of the conversation (e.g. "schedule", "reminder").
38
- * Allows clients to override the default "notification" source so the
39
- * conversation is attributed correctly.
36
+ * Semantic source of the conversation (e.g. "schedule", "reminder"),
37
+ * overriding the default "notification" source.
40
38
  */
41
39
  source: z.string().optional(),
42
40
  /**
43
- * Mirrors `NotificationIntent.silent`. When true the client must not
44
- * post a fallback OS banner for this conversation — the sidebar entry
45
- * still appears, but the always-on inbox is the only surfaced channel.
46
- * Derived from the originating signal's `attentionHints.urgency`.
41
+ * Mirrors `NotificationIntent.silent`, which the server sets for
42
+ * low- and medium-urgency signals. Clients act on the intent's copy.
47
43
  */
48
44
  silent: z.boolean().optional(),
49
45
  });
@@ -116,6 +116,20 @@ export const WebFetchMetadataSchema = z.object({
116
116
 
117
117
  export type WebFetchMetadata = z.infer<typeof WebFetchMetadataSchema>;
118
118
 
119
+ /** A place `recall` searches. */
120
+ export const RecallSourceSchema = z.enum([
121
+ "memory",
122
+ "conversations",
123
+ "workspace",
124
+ ]);
125
+
126
+ export type RecallSource = z.infer<typeof RecallSourceSchema>;
127
+
128
+ /** How hard `recall` searches: more depth, more rounds across the sources. */
129
+ export const RecallDepthSchema = z.enum(["fast", "standard", "deep"]);
130
+
131
+ export type RecallDepth = z.infer<typeof RecallDepthSchema>;
132
+
119
133
  export const ToolActivityMetadataSchema = z.object({
120
134
  webSearch: WebSearchMetadataSchema.optional(),
121
135
  webFetch: WebFetchMetadataSchema.optional(),
package/src/api/index.ts CHANGED
@@ -4,6 +4,7 @@ export {
4
4
  isComputerUseToolCall,
5
5
  resolveComputerUseToolName,
6
6
  } from "./computer-use-tool.js";
7
+ export { type RememberInput, RememberInputSchema } from "./remember-tool.js";
7
8
 
8
9
  import { AcpAuthRequiredEventSchema } from "./events/acp-auth-required.js";
9
10
  import { AcpSessionCompletedEventSchema } from "./events/acp-session-completed.js";
@@ -642,6 +643,10 @@ export {
642
643
  ToolOutputChunkSubTypeSchema,
643
644
  } from "./events/tool-output-chunk.js";
644
645
  export {
646
+ type RecallDepth,
647
+ RecallDepthSchema,
648
+ type RecallSource,
649
+ RecallSourceSchema,
645
650
  type RiskScopeOption,
646
651
  RiskScopeOptionSchema,
647
652
  type ToolActivityMetadata,
@@ -0,0 +1,15 @@
1
+ import { z } from "zod";
2
+
3
+ /**
4
+ * The `remember` tool's input: what the daemon parses a call with, and what a
5
+ * client reads a recorded call's input with. `content` is one fact or a list
6
+ * of them. `finish_turn` yields the turn only when it is `true`; any other
7
+ * value reads as absent. Unknown keys, such as the injected `activity`, pass
8
+ * through.
9
+ */
10
+ export const RememberInputSchema = z.looseObject({
11
+ content: z.union([z.string(), z.array(z.string()).min(1)]),
12
+ finish_turn: z.boolean().optional().catch(undefined),
13
+ });
14
+
15
+ export type RememberInput = z.infer<typeof RememberInputSchema>;
@@ -11,7 +11,9 @@ The end-to-end lifecycle of interactive guardian requests (approvals, questions)
11
11
 
12
12
  ## Single-Guardian Invariant
13
13
 
14
- Each assistant instance serves exactly one guardian. Multi-guardian is not supported and will never be. All connections, browser sessions, approval channels, and trust contexts within a single assistant process belong to the same guardian principal. Do not introduce guardian-keyed maps, per-guardian routing logic, or multi-guardian multiplexing — they add complexity without a real use case and create the false impression that cross-guardian isolation is required.
14
+ Each assistant instance serves exactly one guardian. Multi-guardian is not supported and will never be. Only that guardian's principal decides guardian requests: `applyGuardianDecision()` requires it exactly. Do not introduce guardian-keyed maps, per-guardian routing logic, or multi-guardian multiplexing; they add complexity without a real use case and create the false impression that cross-guardian isolation is required.
15
+
16
+ One guardian does not mean one person connected. The event stream (`GET /v1/events`) admits any actor principal with `chat.read`, so a non-guardian actor can hold a valid connection. Routes that must be guardian-only set `requireGuardian: true`, which `routes/http-adapter.ts` enforces with `requireBoundGuardian` (`runtime/auth/require-bound-guardian.ts`). Content meant only for the guardian is scoped to the guardian's principal at delivery (`targetActorPrincipalId` on the event hub), never assumed safe because it reached a connection.
15
17
 
16
18
  ## Guardian Verification Invariant
17
19
 
@@ -175,6 +175,19 @@
175
175
  "license": "MIT",
176
176
  "icon": "\ud83d\udcbb"
177
177
  },
178
+ {
179
+ "name": "ecommerce-wismo-supporter",
180
+ "description": "Resolves ecommerce Where-Is-My-Order (WISMO) support inquiries, cross-checks real-time carrier tracking milestones, flags delivery exceptions, and stages customer update drafts without helpdesk seat taxes.",
181
+ "category": "commerce",
182
+ "icon": "📦",
183
+ "license": "MIT",
184
+ "homepage": "https://github.com/ZeebBoyBlue/ecommerce-wismo-supporter",
185
+ "source": {
186
+ "source": "github",
187
+ "repo": "ZeebBoyBlue/ecommerce-wismo-supporter",
188
+ "ref": "9218c23d325c749500d59b6ae651f38264a43cd1"
189
+ }
190
+ },
178
191
  {
179
192
  "name": "family-briefing",
180
193
  "source": {
@@ -3,8 +3,13 @@ import {
3
3
  SENTINEL_REDACTION_VERSION,
4
4
  } from "@vellumai/service-contracts/redacted-credential";
5
5
  import { v4 as uuid } from "uuid";
6
+ import { z } from "zod";
6
7
 
7
8
  import { AnsweredQuestionSchema } from "../../api/events/question-answered.js";
9
+ import {
10
+ type ToolActivityMetadata,
11
+ ToolActivityMetadataSchema,
12
+ } from "../../api/events/tool-result.js";
8
13
  import type {
9
14
  ConversationContentBlock,
10
15
  ConversationMessageAttachment,
@@ -246,6 +251,33 @@ export interface ConversationCreateOptions {
246
251
  conversationType?: ConversationCreateType;
247
252
  }
248
253
 
254
+ /** One schema per activity entry, so each entry validates on its own. */
255
+ const ACTIVITY_ENTRY_SCHEMAS = Object.entries(
256
+ ToolActivityMetadataSchema.shape,
257
+ ).map(([key, schema]) => z.object({ [key]: schema }));
258
+
259
+ /**
260
+ * Validates a persisted `_activityMetadata` rider one tool's entry at a time.
261
+ * Cards render these fields directly, so an entry that no longer matches its
262
+ * schema is dropped (its card degrades to the result text) without taking a
263
+ * valid sibling entry with it.
264
+ */
265
+ function readPersistedActivityMetadata(
266
+ value: unknown,
267
+ ): ToolActivityMetadata | undefined {
268
+ if (!isRecord(value)) {
269
+ return undefined;
270
+ }
271
+ const activity: ToolActivityMetadata = {};
272
+ for (const schema of ACTIVITY_ENTRY_SCHEMAS) {
273
+ const parsed = schema.safeParse(value);
274
+ if (parsed.success) {
275
+ Object.assign(activity, parsed.data);
276
+ }
277
+ }
278
+ return Object.keys(activity).length > 0 ? activity : undefined;
279
+ }
280
+
249
281
  function isRecord(value: unknown): value is Record<string, unknown> {
250
282
  return typeof value === "object" && value != null;
251
283
  }
@@ -661,12 +693,12 @@ export function renderHistoryContent(
661
693
  entry.riskDirectoryScopeOptions =
662
694
  block._riskDirectoryScopeOptions as HistoryToolCall["riskDirectoryScopeOptions"];
663
695
  }
664
- // Read back tool activity (web_search / web_fetch) persisted by
665
- // `annotatePersistedAssistantMessage` so the activity card survives a
666
- // history reopen instead of degrading to the plain result text.
667
- if (isRecord(block._activityMetadata)) {
668
- entry.activityMetadata =
669
- block._activityMetadata as HistoryToolCall["activityMetadata"];
696
+ // Read back tool activity persisted by `annotatePersistedAssistantMessage`
697
+ // so the activity card survives a history reopen instead of degrading to
698
+ // the plain result text.
699
+ const activity = readPersistedActivityMetadata(block._activityMetadata);
700
+ if (activity) {
701
+ entry.activityMetadata = activity;
670
702
  }
671
703
  // Read back the answered `ask_question` record so the answered card
672
704
  // rehydrates from history. Validated (rather than trusted like the
@@ -708,9 +740,9 @@ export function renderHistoryContent(
708
740
  }
709
741
  // Native server tools (Anthropic web_search) persist their activity on
710
742
  // the server_tool_use block, so read it back here too.
711
- if (isRecord(block._activityMetadata)) {
712
- entry.activityMetadata =
713
- block._activityMetadata as HistoryToolCall["activityMetadata"];
743
+ const activity = readPersistedActivityMetadata(block._activityMetadata);
744
+ if (activity) {
745
+ entry.activityMetadata = activity;
714
746
  }
715
747
  toolCalls.push(entry);
716
748
  if (id) {
@@ -20,10 +20,10 @@ function driver(userGuidance?: string) {
20
20
  capture: mock(async (_signal: AbortSignal) => ({
21
21
  userGuidance,
22
22
  screenshot: "anBlZw==",
23
- screenshotWidthPx: 1600,
24
- screenshotHeightPx: 900,
25
- screenWidthPt: 1600,
26
- screenHeightPt: 900,
23
+ screenshotWidthPx: 1440,
24
+ screenshotHeightPx: 810,
25
+ screenWidthPt: 1440,
26
+ screenHeightPt: 810,
27
27
  })),
28
28
  };
29
29
  }
@@ -252,7 +252,7 @@ describe("virtual desktop computer use", () => {
252
252
  for (const [tool, input] of [
253
253
  ["computer_use_observe", { capture_window_id: 12 }],
254
254
  ["computer_use_run_applescript", { script: "return 1" }],
255
- ["computer_use_click", { x: 1600, y: 10 }],
255
+ ["computer_use_click", { x: 1440, y: 10 }],
256
256
  ["computer_use_key", { key: "Return click 1" }],
257
257
  ["computer_use_scroll", { direction: "down", amount: 100 }],
258
258
  ] as const) {
@@ -320,7 +320,7 @@ describe("virtual desktop computer use", () => {
320
320
  },
321
321
  },
322
322
  ]);
323
- expect(result.content).toContain("1600x900 px");
323
+ expect(result.content).toContain("1440x810 px");
324
324
  expect(proxy.actionHistory).toHaveLength(1);
325
325
  expect(
326
326
  (await proxy.executeLocal("computer_use_click", { x: 1, y: 2 }, execute))
@@ -5,8 +5,6 @@ import { join } from "node:path";
5
5
  import { setTimeout as delay } from "node:timers/promises";
6
6
  import { promisify } from "node:util";
7
7
 
8
- import sharp from "sharp";
9
-
10
8
  import { getConfig } from "../config/loader.js";
11
9
  import type {
12
10
  CuObservationResult,
@@ -86,6 +84,7 @@ const backend: DesktopComputerUseBackend = {
86
84
  bindObservation: (id) => accessibility.bindObservation(id),
87
85
  input: (args, signal) => run("xdotool", args, signal),
88
86
  capture: async (signal) => {
87
+ const { default: sharp } = await import("sharp");
89
88
  const dir = await mkdtemp(join(tmpdir(), "desktop-cu-"));
90
89
  try {
91
90
  const path = join(dir, "screen.png");
@@ -1,6 +1,6 @@
1
1
  export const DESKTOP_DISPLAY = ":99";
2
- export const DESKTOP_WIDTH = 1600;
3
- export const DESKTOP_HEIGHT = 900;
2
+ export const DESKTOP_WIDTH = 1440;
3
+ export const DESKTOP_HEIGHT = 810;
4
4
  export const DESKTOP_OVERRIDABLE_PARAMETERS = [
5
5
  "desktop",
6
6
  "SendCutText",
@@ -217,7 +217,7 @@ describe("DesktopSessionManager process tree", () => {
217
217
  expect(x).toContain("-localhost");
218
218
  expect(x[x.indexOf("-SecurityTypes") + 1]).toBe("None");
219
219
  expect(x[x.indexOf("-rfbport") + 1]).toBe(String(DESKTOP_VNC_PORT));
220
- expect(x[x.indexOf("-geometry") + 1]).toBe("1600x900");
220
+ expect(x[x.indexOf("-geometry") + 1]).toBe("1440x810");
221
221
  for (const role of [
222
222
  "session-bus",
223
223
  "window-manager",
@@ -4,7 +4,7 @@ All notification producers **MUST** go through `emitNotificationSignal()` in `no
4
4
 
5
5
  Guardian-request cards (approvals, questions) ride this pipeline end to end -- the full lifecycle map is [docs/guardian-request-flow.md](../../docs/guardian-request-flow.md). Card actions (`actions[]`) are built **once, centrally** in the broadcaster's context resolvers (`resolveApprovalContext` / `resolveQuestionContext`); channel adapters render only. Adding buttons for a new request kind = a broadcaster context branch, never adapter parsing.
6
6
 
7
- When a notification flow creates a server-side conversation (e.g. guardian question conversations, task run conversations), the conversation and initial message **MUST** be persisted before the conversation-created event is emitted. This ensures the macOS/iOS client can immediately fetch the conversation contents when it receives the event.
7
+ When a notification flow creates a server-side conversation (e.g. guardian question conversations, task run conversations), the conversation and initial message **MUST** be persisted before the conversation-created event is emitted. This ensures a client can immediately fetch the conversation contents when it receives the event.
8
8
 
9
9
  Guardian-request producers (access requests, tool approvals, tool-grant escalations, voice questions, trusted-contact confirmations) **MUST** record approval-card deliveries through `recordApprovalCardDelivery` / `recordGuardianRequestDeliveries` in `guardian-delivery-recorder.ts` -- never by calling the gateway client's `createGuardianRequestDelivery` directly. That sink is the single place the card-to-request addressing convention lives (conversation id for the in-app card; chat + channel-native `ts` for channel cards), so the path that writes a delivery row cannot drift from the paths that read it back to withdraw a card -- the drift that previously fanned this logic into four divergent copies. (Tests may seed delivery rows directly for fixtures.)
10
10