@stigmer/react 3.12.7 → 3.12.8

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 (137) hide show
  1. package/composer/ComposerToolbar.d.ts +1 -19
  2. package/composer/ComposerToolbar.d.ts.map +1 -1
  3. package/composer/ComposerToolbar.js +2 -7
  4. package/composer/ComposerToolbar.js.map +1 -1
  5. package/composer/SessionComposer.d.ts +0 -10
  6. package/composer/SessionComposer.d.ts.map +1 -1
  7. package/composer/SessionComposer.js +2 -2
  8. package/composer/SessionComposer.js.map +1 -1
  9. package/composer/index.d.ts +0 -1
  10. package/composer/index.d.ts.map +1 -1
  11. package/composer/index.js.map +1 -1
  12. package/execution/ResultView.d.ts.map +1 -1
  13. package/execution/ResultView.js +6 -0
  14. package/execution/ResultView.js.map +1 -1
  15. package/execution/ToolCallItem.d.ts.map +1 -1
  16. package/execution/ToolCallItem.js +13 -2
  17. package/execution/ToolCallItem.js.map +1 -1
  18. package/execution/tool-categories.d.ts +1 -1
  19. package/execution/tool-categories.d.ts.map +1 -1
  20. package/execution/tool-categories.js +6 -0
  21. package/execution/tool-categories.js.map +1 -1
  22. package/identity-account/AccountPreferencesPanel.d.ts +2 -1
  23. package/identity-account/AccountPreferencesPanel.d.ts.map +1 -1
  24. package/identity-account/AccountPreferencesPanel.js +41 -3
  25. package/identity-account/AccountPreferencesPanel.js.map +1 -1
  26. package/identity-account/useAccountExecutionDefaults.d.ts +7 -0
  27. package/identity-account/useAccountExecutionDefaults.d.ts.map +1 -1
  28. package/identity-account/useAccountExecutionDefaults.js +5 -2
  29. package/identity-account/useAccountExecutionDefaults.js.map +1 -1
  30. package/index.d.ts +4 -4
  31. package/index.d.ts.map +1 -1
  32. package/index.js +1 -1
  33. package/index.js.map +1 -1
  34. package/internal/MemoryEnabledRow.d.ts +37 -0
  35. package/internal/MemoryEnabledRow.d.ts.map +1 -0
  36. package/internal/MemoryEnabledRow.js +25 -0
  37. package/internal/MemoryEnabledRow.js.map +1 -0
  38. package/memory/MemoryProposalCard.d.ts +35 -0
  39. package/memory/MemoryProposalCard.d.ts.map +1 -0
  40. package/memory/MemoryProposalCard.js +73 -0
  41. package/memory/MemoryProposalCard.js.map +1 -0
  42. package/memory/index.d.ts +2 -0
  43. package/memory/index.d.ts.map +1 -1
  44. package/memory/index.js +2 -0
  45. package/memory/index.js.map +1 -1
  46. package/memory/useMemory.d.ts +39 -0
  47. package/memory/useMemory.d.ts.map +1 -0
  48. package/memory/useMemory.js +43 -0
  49. package/memory/useMemory.js.map +1 -0
  50. package/organization/OrgPreferencesPanel.d.ts.map +1 -1
  51. package/organization/OrgPreferencesPanel.js +36 -4
  52. package/organization/OrgPreferencesPanel.js.map +1 -1
  53. package/package.json +4 -4
  54. package/session/AutoApproveIndicator.d.ts +18 -0
  55. package/session/AutoApproveIndicator.d.ts.map +1 -0
  56. package/session/AutoApproveIndicator.js +23 -0
  57. package/session/AutoApproveIndicator.js.map +1 -0
  58. package/session/NewSessionViewer.d.ts.map +1 -1
  59. package/session/NewSessionViewer.js +10 -9
  60. package/session/NewSessionViewer.js.map +1 -1
  61. package/session/SessionViewer.d.ts +21 -9
  62. package/session/SessionViewer.d.ts.map +1 -1
  63. package/session/SessionViewer.js +31 -21
  64. package/session/SessionViewer.js.map +1 -1
  65. package/session/facets/SetupTab.d.ts +43 -6
  66. package/session/facets/SetupTab.d.ts.map +1 -1
  67. package/session/facets/SetupTab.js +32 -36
  68. package/session/facets/SetupTab.js.map +1 -1
  69. package/session/facets/UsageTab.d.ts +2 -1
  70. package/session/facets/UsageTab.d.ts.map +1 -1
  71. package/session/facets/UsageTab.js +11 -5
  72. package/session/facets/UsageTab.js.map +1 -1
  73. package/session/facets/index.d.ts +1 -1
  74. package/session/facets/index.d.ts.map +1 -1
  75. package/session/facets/primitives.d.ts +58 -0
  76. package/session/facets/primitives.d.ts.map +1 -0
  77. package/session/facets/primitives.js +59 -0
  78. package/session/facets/primitives.js.map +1 -0
  79. package/session/index.d.ts +1 -1
  80. package/session/index.d.ts.map +1 -1
  81. package/session/index.js.map +1 -1
  82. package/session/useNewSessionFlow.d.ts +9 -4
  83. package/session/useNewSessionFlow.d.ts.map +1 -1
  84. package/session/useNewSessionFlow.js +20 -9
  85. package/session/useNewSessionFlow.js.map +1 -1
  86. package/session/useSessionPageFlow.d.ts +28 -10
  87. package/session/useSessionPageFlow.d.ts.map +1 -1
  88. package/session/useSessionPageFlow.js +16 -10
  89. package/session/useSessionPageFlow.js.map +1 -1
  90. package/src/attachment/__tests__/prepare-image.test.ts +12 -6
  91. package/src/composer/ComposerToolbar.tsx +0 -57
  92. package/src/composer/SessionComposer.tsx +1 -13
  93. package/src/composer/index.ts +0 -1
  94. package/src/execution/ResultView.tsx +6 -0
  95. package/src/execution/ToolCallItem.tsx +18 -1
  96. package/src/execution/tool-categories.ts +7 -0
  97. package/src/identity-account/AccountPreferencesPanel.tsx +89 -2
  98. package/src/identity-account/__tests__/AccountPreferencesPanel.test.tsx +112 -0
  99. package/src/identity-account/__tests__/useAccountExecutionDefaults.test.tsx +34 -1
  100. package/src/identity-account/useAccountExecutionDefaults.ts +12 -2
  101. package/src/index.ts +5 -1
  102. package/src/internal/MemoryEnabledRow.tsx +92 -0
  103. package/src/memory/MemoryProposalCard.tsx +181 -0
  104. package/src/memory/__tests__/MemoryProposalCard.test.tsx +236 -0
  105. package/src/memory/__tests__/memoryHooks.test.tsx +63 -0
  106. package/src/memory/index.ts +5 -0
  107. package/src/memory/useMemory.ts +80 -0
  108. package/src/organization/OrgPreferencesPanel.tsx +52 -3
  109. package/src/organization/__tests__/OrgPreferencesPanel.test.tsx +65 -0
  110. package/src/session/AutoApproveIndicator.tsx +45 -0
  111. package/src/session/NewSessionViewer.tsx +18 -15
  112. package/src/session/SessionViewer.tsx +70 -32
  113. package/src/session/__tests__/NewSessionViewer.test.tsx +32 -0
  114. package/src/session/__tests__/SessionViewer-autoApprove.test.tsx +244 -0
  115. package/src/session/__tests__/SessionViewer-transcriptExport.test.tsx +60 -22
  116. package/src/session/__tests__/useNewSessionFlow.test.tsx +56 -0
  117. package/src/session/__tests__/useSessionPageFlow.autoApprove.test.tsx +87 -0
  118. package/src/session/facets/SetupTab.tsx +193 -157
  119. package/src/session/facets/UsageTab.tsx +38 -38
  120. package/src/session/facets/index.ts +1 -0
  121. package/src/session/facets/primitives.tsx +169 -0
  122. package/src/session/index.ts +1 -0
  123. package/src/session/useNewSessionFlow.ts +30 -15
  124. package/src/session/useSessionPageFlow.ts +44 -20
  125. package/src/switch/Switch.tsx +4 -0
  126. package/src/workflow/__tests__/useWorkflowCanvas.dirty.test.tsx +7 -2
  127. package/src/workflow/__tests__/useWorkflowCanvas.drag.test.tsx +7 -2
  128. package/src/workspace/WorkspaceSurface.tsx +26 -3
  129. package/styles.css +1 -1
  130. package/switch/Switch.d.ts +3 -1
  131. package/switch/Switch.d.ts.map +1 -1
  132. package/switch/Switch.js +2 -2
  133. package/switch/Switch.js.map +1 -1
  134. package/workspace/WorkspaceSurface.js +11 -2
  135. package/workspace/WorkspaceSurface.js.map +1 -1
  136. package/src/composer/__tests__/ComposerToolbar-autoApprove.test.tsx +0 -80
  137. package/src/session/__tests__/SessionViewer-autoApproveToggle.test.tsx +0 -178
@@ -1 +1 @@
1
- {"version":3,"file":"useSessionPageFlow.js","sourceRoot":"","sources":["../../src/session/useSessionPageFlow.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAC;AAE9F,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAkC,MAAM,uB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Y;QACZ,WAAW;QACX,gBAAgB;QAChB,aAAa;QACb,oBAAoB;KACrB,CAAC;AACJ,CAAC"}
@@ -1,6 +1,10 @@
1
- import { describe, it, expect } from "vitest";
1
+ import { describe, it, expect, vi, afterEach } from "vitest";
2
2
  import { prepareImageForVision } from "../prepare-image.js";
3
3
 
4
+ afterEach(() => {
5
+ vi.unstubAllGlobals();
6
+ });
7
+
4
8
  /**
5
9
  * happy-dom half of the prepare-image coverage: the guard rails that make
6
10
  * the function safe to call from any environment. The actual pixel work
@@ -17,11 +21,13 @@ describe("prepareImageForVision — environment guard rails", () => {
17
21
  });
18
22
 
19
23
  it("returns an image untouched when the canvas pipeline is unavailable", async () => {
20
- // happy-dom has no createImageBitmap the exact situation of an old
21
- // browser or a privacy extension that blocks canvas. The paste must
22
- // still work end to end with the original bytes; it merely degrades
23
- // at the runner with the standard disclosure.
24
- expect(typeof createImageBitmap).toBe("undefined");
24
+ // The situation of an old browser or a privacy extension that blocks
25
+ // canvas. Stubbed explicitly rather than relying on the DOM shim
26
+ // lacking createImageBitmap newer shims ship one, and this guard
27
+ // must hold regardless of the test environment's capabilities. The
28
+ // paste must still work end to end with the original bytes; it merely
29
+ // degrades at the runner with the standard disclosure.
30
+ vi.stubGlobal("createImageBitmap", undefined);
25
31
 
26
32
  const png = new File([new Uint8Array([0x89, 0x50, 0x4e, 0x47])], "shot.png", {
27
33
  type: "image/png",
@@ -1,6 +1,5 @@
1
1
  "use client";
2
2
 
3
- import { useId } from "react";
4
3
  import { cn } from "@stigmer/theme";
5
4
  import {
6
5
  Tooltip,
@@ -8,7 +7,6 @@ import {
8
7
  TooltipProvider,
9
8
  TooltipTrigger,
10
9
  } from "../internal/tooltip.js";
11
- import { Switch } from "../switch/Switch.js";
12
10
  import { ContextPopover } from "./ContextPopover.js";
13
11
  import { ConfigureMenu, type ConfigureMenuItem } from "./ConfigureMenu.js";
14
12
  import { ModelSelector } from "../models/ModelSelector.js";
@@ -25,18 +23,6 @@ import {
25
23
  } from "./icons.js";
26
24
  import { SpinnerIcon } from "../internal/SpinnerIcon.js";
27
25
 
28
- /**
29
- * Wiring for the always-available "auto-approve tool calls" toggle
30
- * (stigmer/stigmer#816). Presence renders the control; omission keeps the
31
- * toolbar byte-identical for consumers that don't wire it (DD-011).
32
- */
33
- export interface ComposerAutoApproveProps {
34
- /** Whether auto-approve is currently armed for this conversation. */
35
- readonly armed: boolean;
36
- /** Called with the next value when the user flips the toggle. */
37
- readonly onChange: (armed: boolean) => void;
38
- }
39
-
40
26
  export interface ComposerToolbarProps {
41
27
  readonly disabled: boolean;
42
28
  readonly isSubmitting: boolean;
@@ -61,14 +47,6 @@ export interface ComposerToolbarProps {
61
47
  readonly interactionMode?: InteractionModeOption;
62
48
  readonly onInteractionModeChange: (mode: InteractionModeOption) => void;
63
49
 
64
- /**
65
- * Always-available auto-approve toggle (#816). Deliberately NOT bound to
66
- * {@link disabled}: the walk-away user flips it exactly while a turn
67
- * streams, so it stays interactive under the composer lock — the same
68
- * exemption the Stop button carries.
69
- */
70
- readonly autoApprove?: ComposerAutoApproveProps;
71
-
72
50
  readonly showModelSelector: boolean;
73
51
  readonly modelId?: string;
74
52
  readonly onModelChange: (id: string) => void;
@@ -150,7 +128,6 @@ export function ComposerToolbar({
150
128
  showInteractionModePicker,
151
129
  interactionMode,
152
130
  onInteractionModeChange,
153
- autoApprove,
154
131
  showModelSelector,
155
132
  modelId,
156
133
  onModelChange,
@@ -160,7 +137,6 @@ export function ComposerToolbar({
160
137
  onThinkingModeChange,
161
138
  }: ComposerToolbarProps) {
162
139
  const showHarnessSeparate = showHarnessSelector && !showModelSelector;
163
- const autoApproveLabelId = useId();
164
140
 
165
141
  return (
166
142
  <div className="stg:flex stg:items-center stg:justify-between stg:gap-2 stg:border-t stg:border-border-muted stg:px-3 stg:py-2">
@@ -198,39 +174,6 @@ export function ComposerToolbar({
198
174
  />
199
175
  )}
200
176
 
201
- {/* Auto-approve (#816): primary state like Mode and Model — armed
202
- vs gated is something the user glances at before walking away.
203
- Never bound to `disabled` (see ComposerAutoApproveProps): the
204
- whole point is flipping it while a turn streams. Scoped provider:
205
- this tooltip does not share the icon cluster's hover-delay group. */}
206
- {autoApprove && (
207
- <TooltipProvider>
208
- <Tooltip>
209
- <TooltipTrigger render={<span className="stg:inline-flex" />}>
210
- <span className="stg:flex stg:shrink-0 stg:items-center stg:gap-1.5 stg:px-1">
211
- <label
212
- id={autoApproveLabelId}
213
- htmlFor={`${autoApproveLabelId}-switch`}
214
- className="stg:cursor-pointer stg:select-none stg:text-xs stg:text-muted-foreground"
215
- >
216
- Auto-approve
217
- </label>
218
- <Switch
219
- id={`${autoApproveLabelId}-switch`}
220
- checked={autoApprove.armed}
221
- onCheckedChange={autoApprove.onChange}
222
- aria-labelledby={autoApproveLabelId}
223
- />
224
- </span>
225
- </TooltipTrigger>
226
- <TooltipContent side="top">
227
- {autoApprove.armed
228
- ? "Tool calls run without asking — this conversation only. Turn off to be asked again."
229
- : "Run this conversation's tool calls without asking for approval, including the run in progress."}
230
- </TooltipContent>
231
- </Tooltip>
232
- </TooltipProvider>
233
- )}
234
177
  </div>
235
178
 
236
179
  {/* ---- Right group: Secondary actions (icon-only) + Send ----
@@ -4,7 +4,7 @@ import { forwardRef, memo, useCallback, useEffect, useImperativeHandle, useMemo,
4
4
  import { cn } from "@stigmer/theme";
5
5
  import { getUserMessage, type AttachmentInput, type EnvVarInput, type McpServerUsageInput, type ResourceRef } from "@stigmer/sdk";
6
6
  import { useComposer } from "./useComposer.js";
7
- import { ComposerToolbar, type ComposerAutoApproveProps } from "./ComposerToolbar.js";
7
+ import { ComposerToolbar } from "./ComposerToolbar.js";
8
8
  import { type ConfigureMenuItem } from "./ConfigureMenu.js";
9
9
  import type { HarnessOption } from "../models/harness.js";
10
10
  import { FAST_SERVICE_TIER, type ServiceTierOption } from "../models/service-tier.js";
@@ -300,16 +300,6 @@ export interface SessionComposerProps {
300
300
  /** Show the model selector. @default true */
301
301
  readonly showModelSelector?: boolean;
302
302
 
303
- /**
304
- * Always-visible "auto-approve tool calls" toggle in the toolbar
305
- * (stigmer/stigmer#816). Presence renders it; omission keeps the composer
306
- * byte-identical (DD-011). Stays interactive while the composer is
307
- * `disabled` — the walk-away user flips it exactly while a turn streams —
308
- * so consumers must only wire it on surfaces whose viewer may submit
309
- * approvals (never guest/observer). See {@link ComposerAutoApproveProps}.
310
- */
311
- readonly autoApprove?: ComposerAutoApproveProps;
312
-
313
303
  /**
314
304
  * Workspace state managed by {@link useWorkspaceEntries}.
315
305
  * When provided, renders a workspace trigger in the toolbar
@@ -627,7 +617,6 @@ const SessionComposerInner = forwardRef<SessionComposerHandle, SessionComposerPr
627
617
  defaultModelId,
628
618
  onModelChange,
629
619
  showModelSelector = true,
630
- autoApprove,
631
620
  workspace,
632
621
  gitHubConnection,
633
622
  enableGitHub = true,
@@ -1931,7 +1920,6 @@ const SessionComposerInner = forwardRef<SessionComposerHandle, SessionComposerPr
1931
1920
  interactionMode={interactionMode}
1932
1921
  onInteractionModeChange={handleInteractionModeChange}
1933
1922
  showModelSelector={showModelSelector}
1934
- autoApprove={autoApprove}
1935
1923
  // The pill renders the effective selection — the same value the
1936
1924
  // submit payload carries (#663), never a fallback of its own.
1937
1925
  modelId={effective.modelId}
@@ -7,7 +7,6 @@ export type {
7
7
  SessionComposerProps,
8
8
  SessionComposerSubmitContext,
9
9
  } from "./SessionComposer.js";
10
- export type { ComposerAutoApproveProps } from "./ComposerToolbar.js";
11
10
 
12
11
  export { InteractionModePicker } from "./InteractionModePicker.js";
13
12
  export type {
@@ -80,6 +80,12 @@ export function ResultView({ view, showFileName = true, showStats = true, classN
80
80
  return view.text ? <CollapsiblePre content={view.text} className={cn("stg:text-foreground", className)} /> : null;
81
81
  case "json":
82
82
  return <CollapsibleCode label="Result" content={formatJson(view.value)} className={className} />;
83
+ case "memoryProposal":
84
+ // Fallback for consumers composing ResultView directly: the verbatim
85
+ // proposed fact (DD-005 D6 — never paraphrased). The consent chip
86
+ // (Confirm/Reject, live lifecycle state) is the thread's primary
87
+ // surface for this view and renders it in place of this.
88
+ return <CollapsiblePre content={view.fact} className={cn("stg:text-foreground", className)} />;
83
89
  case "error":
84
90
  return <ErrorResultView message={view.message} className={className} />;
85
91
  case "empty":
@@ -26,6 +26,7 @@ import { TerminalTail } from "./TerminalSession.js";
26
26
  import { ToolCallDetail, formatHeaderDuration } from "./ToolCallDetail.js";
27
27
  import { SubAgentSection } from "./SubAgentSection.js";
28
28
  import { ApprovalCardBody } from "./ApprovalCard.js";
29
+ import { MemoryProposalCardBody } from "../memory/MemoryProposalCard.js";
29
30
  import { useApproval } from "./ApprovalContext.js";
30
31
  import { useFileReviewRowState } from "./FileReviewContext.js";
31
32
  import type { FileReviewRowState } from "./file-review-status.js";
@@ -351,7 +352,8 @@ export const ToolCallItem = memo(function ToolCallItem({
351
352
  (disclosure === "preview" || (isTailCategory && tailSession == null));
352
353
 
353
354
  // The disclosed body, shared by both layouts: a pending gate decides inline,
354
- // a sub-agent shows its delegation, otherwise the category detail.
355
+ // a sub-agent shows its delegation, a settled remember call renders the
356
+ // memory-proposal consent surface, otherwise the category detail.
355
357
  const body = isSubAgent ? (
356
358
  <SubAgentSection subAgentExecution={subAgentExecution} collapsible={false} />
357
359
  ) : approval ? (
@@ -364,6 +366,12 @@ export const ToolCallItem = memo(function ToolCallItem({
364
366
  isSubmitting={approval.isSubmitting}
365
367
  error={approval.error}
366
368
  />
369
+ ) : result.type === "memoryProposal" ? (
370
+ // The remember tool's consent chip (DD-005 D4): verbatim fact +
371
+ // Confirm/Reject, with the record's CURRENT lifecycle fetched so a
372
+ // reloaded thread never shows stale action buttons. Borderless — this
373
+ // row's card owns the chrome (the ApprovalCardBody posture).
374
+ <MemoryProposalCardBody memoryId={result.memoryId} fact={result.fact} />
367
375
  ) : (
368
376
  <ToolCallDetail
369
377
  toolCall={toolCall}
@@ -608,9 +616,18 @@ export const CATEGORY_ICON: Record<ToolCategory, () => React.JSX.Element> = {
608
616
  "sub-agent": BotIcon,
609
617
  internal: WrenchIcon,
610
618
  mcp: McpPlugIcon,
619
+ memory: BookmarkIcon,
611
620
  unknown: WrenchIcon,
612
621
  };
613
622
 
623
+ function BookmarkIcon() {
624
+ return (
625
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" stroke="currentColor" strokeWidth="1.2" strokeLinecap="round" strokeLinejoin="round">
626
+ <path d="M9 11L6 8.5L3 11V2.5C3 1.95 3.45 1.5 4 1.5H8C8.55 1.5 9 1.95 9 2.5V11Z" />
627
+ </svg>
628
+ );
629
+ }
630
+
614
631
  function GlobeIcon() {
615
632
  return (
616
633
  <svg width="12" height="12" viewBox="0 0 12 12" fill="none" stroke="currentColor" strokeWidth="1.2" strokeLinecap="round" strokeLinejoin="round">
@@ -32,6 +32,7 @@ export type ToolCategory =
32
32
  | "sub-agent"
33
33
  | "internal"
34
34
  | "mcp"
35
+ | "memory"
35
36
  | "unknown";
36
37
 
37
38
  /**
@@ -122,6 +123,11 @@ const PREVIEW_CATEGORIES: ReadonlySet<ToolCategory> = new Set<ToolCategory>([
122
123
  "mcp",
123
124
  "web-search",
124
125
  "fetch",
126
+ // A memory proposal is a decision surface: the verbatim fact and the
127
+ // Confirm/Reject actions ARE the content — never fold it behind a chevron
128
+ // (DD-005 D4: a proposal the user scrolled past is caught by the memory
129
+ // page, but the chip must not hide itself while in view).
130
+ "memory",
125
131
  "unknown",
126
132
  ]);
127
133
 
@@ -232,6 +238,7 @@ const KIND_DISPLAY: Partial<Record<ToolKind, KindDisplayEntry>> = {
232
238
  [ToolKind.THINK]: { category: "think", label: "Thinking", primaryField: "thought" },
233
239
  [ToolKind.SUBAGENT]: { category: "sub-agent", label: "Sub-agent", primaryField: "description", fallbackFields: ["prompt"] },
234
240
  [ToolKind.TODO]: { category: "internal", label: "Todos", primaryField: "todos" },
241
+ [ToolKind.MEMORY]: { category: "memory", label: "Remember", primaryField: "fact" },
235
242
  };
236
243
 
237
244
  /**
@@ -18,8 +18,10 @@ import { useResourceAvailable, ApiResourceKind } from "../deployment-mode.js";
18
18
  import { useModelRegistry } from "../models/index.js";
19
19
  import { HARNESS_META, type HarnessOption } from "../models/harness.js";
20
20
  import { CloudFeatureNotice } from "../internal/CloudFeatureNotice.js";
21
+ import { MemoryEnabledRow } from "../internal/MemoryEnabledRow.js";
21
22
  import { StandingContextField } from "../internal/StandingContextField.js";
22
23
  import { SpinnerIcon } from "../internal/SpinnerIcon.js";
24
+ import { Switch } from "../switch/Switch.js";
23
25
 
24
26
  /** Props for {@link AccountPreferencesPanel}. */
25
27
  export interface AccountPreferencesPanelProps {
@@ -32,7 +34,8 @@ export interface AccountPreferencesPanelProps {
32
34
  /**
33
35
  * Self-contained editor for the current user's declared preferences
34
36
  * (`IdentityAccountSpec.preferences`): standing context plus the
35
- * execution defaults (default harness and per-harness default models).
37
+ * execution defaults (default harness, per-harness default models, and
38
+ * the auto-approve default).
36
39
  *
37
40
  * The declared text is snapshotted into the user's own eligible agent
38
41
  * executions and delivered to the agent as background context.
@@ -108,16 +111,26 @@ function AccountPreferencesForm({
108
111
  clearError,
109
112
  } = useUpdateIdentityAccount();
110
113
 
114
+ // The memory toggle saves instantly (its own hook instance, so a flip's
115
+ // in-flight/error state never bleeds into the form's Save button).
116
+ const {
117
+ update: updateMemoryFlag,
118
+ isUpdating: isSavingMemoryFlag,
119
+ error: memoryFlagError,
120
+ } = useUpdateIdentityAccount();
121
+
111
122
  const [standingContext, setStandingContext] = useState("");
112
123
  const [defaultHarness, setDefaultHarness] = useState("");
113
124
  const [defaultNativeModel, setDefaultNativeModel] = useState("");
114
125
  const [defaultCursorModel, setDefaultCursorModel] = useState("");
126
+ const [defaultAutoApprove, setDefaultAutoApprove] = useState(false);
115
127
 
116
128
  const serverPreferences = account?.spec?.preferences;
117
129
  const serverStandingContext = serverPreferences?.standingContext ?? "";
118
130
  const serverDefaultHarness = serverPreferences?.defaultHarness ?? "";
119
131
  const serverDefaultNativeModel = serverPreferences?.defaultNativeModel ?? "";
120
132
  const serverDefaultCursorModel = serverPreferences?.defaultCursorModel ?? "";
133
+ const serverDefaultAutoApprove = serverPreferences?.defaultAutoApprove ?? false;
121
134
 
122
135
  // Sync the form fields when server data changes.
123
136
  useEffect(() => {
@@ -127,6 +140,7 @@ function AccountPreferencesForm({
127
140
  setDefaultHarness(prefs?.defaultHarness ?? "");
128
141
  setDefaultNativeModel(prefs?.defaultNativeModel ?? "");
129
142
  setDefaultCursorModel(prefs?.defaultCursorModel ?? "");
143
+ setDefaultAutoApprove(prefs?.defaultAutoApprove ?? false);
130
144
  }, [account]);
131
145
 
132
146
  const hasChanges = useMemo(
@@ -134,16 +148,19 @@ function AccountPreferencesForm({
134
148
  standingContext.trim() !== serverStandingContext ||
135
149
  defaultHarness !== serverDefaultHarness ||
136
150
  defaultNativeModel !== serverDefaultNativeModel ||
137
- defaultCursorModel !== serverDefaultCursorModel,
151
+ defaultCursorModel !== serverDefaultCursorModel ||
152
+ defaultAutoApprove !== serverDefaultAutoApprove,
138
153
  [
139
154
  standingContext,
140
155
  defaultHarness,
141
156
  defaultNativeModel,
142
157
  defaultCursorModel,
158
+ defaultAutoApprove,
143
159
  serverStandingContext,
144
160
  serverDefaultHarness,
145
161
  serverDefaultNativeModel,
146
162
  serverDefaultCursorModel,
163
+ serverDefaultAutoApprove,
147
164
  ],
148
165
  );
149
166
 
@@ -154,12 +171,14 @@ function AccountPreferencesForm({
154
171
  setDefaultHarness(serverDefaultHarness);
155
172
  setDefaultNativeModel(serverDefaultNativeModel);
156
173
  setDefaultCursorModel(serverDefaultCursorModel);
174
+ setDefaultAutoApprove(serverDefaultAutoApprove);
157
175
  clearError();
158
176
  }, [
159
177
  serverStandingContext,
160
178
  serverDefaultHarness,
161
179
  serverDefaultNativeModel,
162
180
  serverDefaultCursorModel,
181
+ serverDefaultAutoApprove,
163
182
  clearError,
164
183
  ]);
165
184
 
@@ -183,6 +202,7 @@ function AccountPreferencesForm({
183
202
  defaultHarness: defaultHarness || undefined,
184
203
  defaultNativeModel: defaultNativeModel || undefined,
185
204
  defaultCursorModel: defaultCursorModel || undefined,
205
+ defaultAutoApprove: defaultAutoApprove || undefined,
186
206
  },
187
207
  });
188
208
  refetch();
@@ -198,6 +218,7 @@ function AccountPreferencesForm({
198
218
  defaultHarness,
199
219
  defaultNativeModel,
200
220
  defaultCursorModel,
221
+ defaultAutoApprove,
201
222
  update,
202
223
  clearError,
203
224
  refetch,
@@ -205,6 +226,30 @@ function AccountPreferencesForm({
205
226
  ],
206
227
  );
207
228
 
229
+ // The memory consent flag applies instantly (the UX-checkpoint decision):
230
+ // a consent bit flipped-but-unsaved that silently reverts on navigation is
231
+ // the failure consent UX must not have. Same wipe-safe double spread.
232
+ const handleMemoryToggle = useCallback(
233
+ async (next: boolean) => {
234
+ if (!account) return;
235
+ try {
236
+ const mapped = toIdentityAccountUpdateInput(account);
237
+ const updated = await updateMemoryFlag({
238
+ ...mapped,
239
+ preferences: {
240
+ ...mapped.preferences,
241
+ memoryEnabled: next || undefined,
242
+ },
243
+ });
244
+ refetch();
245
+ onUpdated?.(updated);
246
+ } catch {
247
+ // error state is managed by the toggle's own hook instance
248
+ }
249
+ },
250
+ [account, updateMemoryFlag, refetch, onUpdated],
251
+ );
252
+
208
253
  // -----------------------------------------------------------------------
209
254
  // Loading state
210
255
  // -----------------------------------------------------------------------
@@ -330,8 +375,50 @@ function AccountPreferencesForm({
330
375
  on that harness — even when it isn&apos;t your default.
331
376
  </p>
332
377
  </fieldset>
378
+
379
+ {/* Auto-approve default (stigmer/stigmer#816): a client-read seed
380
+ like the harness/model defaults above — the session panel's
381
+ Config switch beats it per conversation, and armed sessions
382
+ always show the "Auto-approving tool calls" strip by the
383
+ composer. Never applied to guest or observer surfaces. */}
384
+ <div
385
+ className={cn(
386
+ "stg:flex stg:items-start stg:justify-between stg:gap-3 stg:rounded-md stg:border stg:border-input stg:px-3 stg:py-2.5",
387
+ isUpdating && "stg:opacity-50",
388
+ )}
389
+ >
390
+ <div className="stg:min-w-0">
391
+ <span
392
+ id={`${baseId}-default-auto-approve-title`}
393
+ className="stg:block stg:text-xs stg:font-medium stg:text-foreground"
394
+ >
395
+ Auto-approve tool calls
396
+ </span>
397
+ <p className="stg:text-[0.65rem] stg:text-muted-foreground">
398
+ Start your sessions with tool calls running unattended — no
399
+ approval prompts. Each conversation can turn this off (or on)
400
+ in its session panel.
401
+ </p>
402
+ </div>
403
+ <Switch
404
+ checked={defaultAutoApprove}
405
+ onCheckedChange={setDefaultAutoApprove}
406
+ disabled={isUpdating}
407
+ aria-labelledby={`${baseId}-default-auto-approve-title`}
408
+ className="stg:mt-0.5"
409
+ />
410
+ </div>
333
411
  </div>
334
412
 
413
+ <MemoryEnabledRow
414
+ id={`${baseId}-memory-enabled`}
415
+ checked={account.spec?.preferences?.memoryEnabled ?? false}
416
+ onToggle={(next) => void handleMemoryToggle(next)}
417
+ saving={isSavingMemoryFlag}
418
+ error={memoryFlagError}
419
+ helperText="When on, agents may propose facts to remember about you; only facts you confirm are stored. Confirmed memories are shared with your future sessions and appear on those executions' records. Requires your organization to have memory enabled. Changes apply immediately."
420
+ />
421
+
335
422
  {updateError && (
336
423
  <p className="stg:text-destructive stg:text-[0.65rem]" role="alert">
337
424
  {getUserMessage(updateError)}
@@ -115,6 +115,52 @@ describe("AccountPreferencesPanel", () => {
115
115
  expect(input.slug).toBe("ada");
116
116
  });
117
117
 
118
+ it("saves the auto-approve default when the toggle is flipped on", async () => {
119
+ const update = vi.fn(async (_input: IdentityAccountInput) => ACCOUNT);
120
+ renderPanel(createMockStigmer({ update }));
121
+
122
+ await findSyncedField("Keep answers terse.");
123
+ const toggle = screen.getByRole("switch", { name: "Auto-approve tool calls" });
124
+ expect(toggle.getAttribute("aria-checked")).toBe("false");
125
+
126
+ fireEvent.click(toggle);
127
+ fireEvent.click(screen.getByRole("button", { name: "Save changes" }));
128
+
129
+ await waitFor(() => expect(update).toHaveBeenCalledTimes(1));
130
+ const input = update.mock.calls[0]![0];
131
+ expect(input.preferences?.defaultAutoApprove).toBe(true);
132
+ });
133
+
134
+ it("reflects a declared auto-approve default and omits it when turned off", async () => {
135
+ const armedAccount = create(IdentityAccountSchema, {
136
+ metadata: { id: "ia-1", name: "Ada Lovelace", slug: "ada", org: "acme" },
137
+ spec: {
138
+ idpId: "auth0|abc",
139
+ email: "ada@acme.example",
140
+ preferences: { defaultAutoApprove: true },
141
+ },
142
+ });
143
+ const update = vi.fn(async (_input: IdentityAccountInput) => armedAccount);
144
+ renderPanel(
145
+ createMockStigmer({ whoAmI: vi.fn(async () => armedAccount), update }),
146
+ );
147
+
148
+ const toggle = await screen.findByRole("switch", {
149
+ name: "Auto-approve tool calls",
150
+ });
151
+ await waitFor(() =>
152
+ expect(toggle.getAttribute("aria-checked")).toBe("true"),
153
+ );
154
+
155
+ fireEvent.click(toggle);
156
+ fireEvent.click(screen.getByRole("button", { name: "Save changes" }));
157
+
158
+ await waitFor(() => expect(update).toHaveBeenCalledTimes(1));
159
+ // Only a declared true travels — off is the absent zero value.
160
+ const input = update.mock.calls[0]![0];
161
+ expect(input.preferences?.defaultAutoApprove).toBeUndefined();
162
+ });
163
+
118
164
  it("refetches the account after a successful save", async () => {
119
165
  const whoAmI = vi.fn(async () => ACCOUNT);
120
166
  renderPanel(createMockStigmer({ whoAmI }));
@@ -137,6 +183,72 @@ describe("AccountPreferencesPanel", () => {
137
183
  expect(screen.getByRole("button", { name: "Retry" })).toBeTruthy();
138
184
  });
139
185
 
186
+ describe("memory consent (oss#293 Phase 2 Stage 3)", () => {
187
+ it("memory toggle applies instantly with the full mapped input (wipe-safe)", async () => {
188
+ const update = vi.fn(async (_input: IdentityAccountInput) => ACCOUNT);
189
+ renderPanel(createMockStigmer({ update }));
190
+ await findSyncedField("Keep answers terse.");
191
+
192
+ // No Save click: consent applies the moment it is flipped (the
193
+ // UX-checkpoint decision).
194
+ fireEvent.click(screen.getByRole("switch", { name: "Memory" }));
195
+
196
+ await waitFor(() => expect(update).toHaveBeenCalledTimes(1));
197
+ const input = update.mock.calls[0]![0];
198
+ expect(input.preferences?.memoryEnabled).toBe(true);
199
+ // The double spread: the flip preserves every sibling preference…
200
+ expect(input.preferences?.standingContext).toBe("Keep answers terse.");
201
+ // …and the identity fields the row never renders.
202
+ expect(input.id).toBe("ia-1");
203
+ expect(input.email).toBe("ada@acme.example");
204
+ });
205
+
206
+ it("saving the form preserves memory_enabled (the wipe-hazard regression)", async () => {
207
+ const accountWithMemoryOn = create(IdentityAccountSchema, {
208
+ metadata: { id: "ia-1", name: "Ada Lovelace", slug: "ada", org: "acme" },
209
+ spec: {
210
+ idpId: "auth0|abc",
211
+ email: "ada@acme.example",
212
+ preferences: {
213
+ standingContext: "Keep answers terse.",
214
+ memoryEnabled: true,
215
+ },
216
+ },
217
+ });
218
+ const update = vi.fn(async (_input: IdentityAccountInput) => accountWithMemoryOn);
219
+ renderPanel(
220
+ createMockStigmer({ whoAmI: vi.fn(async () => accountWithMemoryOn), update }),
221
+ );
222
+
223
+ const field = await findSyncedField("Keep answers terse.");
224
+ fireEvent.change(field, { target: { value: "Terser still." } });
225
+ fireEvent.click(screen.getByRole("button", { name: "Save changes" }));
226
+
227
+ await waitFor(() => expect(update).toHaveBeenCalledTimes(1));
228
+ // Update is a full-spec replace: without the nested preferences
229
+ // spread, this save would silently revoke the memory consent.
230
+ expect(update.mock.calls[0]![0].preferences?.memoryEnabled).toBe(true);
231
+ });
232
+
233
+ it("reflects the stored flag as the switch state", async () => {
234
+ const accountWithMemoryOn = create(IdentityAccountSchema, {
235
+ metadata: { id: "ia-1", name: "Ada", slug: "ada", org: "acme" },
236
+ spec: {
237
+ idpId: "auth0|abc",
238
+ preferences: { memoryEnabled: true },
239
+ },
240
+ });
241
+ renderPanel(createMockStigmer({ whoAmI: vi.fn(async () => accountWithMemoryOn) }));
242
+ await findSyncedField("");
243
+
244
+ await waitFor(() =>
245
+ expect(
246
+ screen.getByRole("switch", { name: "Memory" }).getAttribute("aria-checked"),
247
+ ).toBe("true"),
248
+ );
249
+ });
250
+ });
251
+
140
252
  describe("execution defaults (oss#293 Phase 1.5)", () => {
141
253
  const ACCOUNT_WITH_DEFAULTS: IdentityAccount = create(IdentityAccountSchema, {
142
254
  metadata: { id: "ia-1", name: "Ada Lovelace", slug: "ada", org: "acme" },