stagent 0.10.0 → 0.11.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.
Files changed (170) hide show
  1. package/README.md +15 -2
  2. package/dist/cli.js +24 -0
  3. package/docs/.coverage-gaps.json +154 -24
  4. package/docs/.last-generated +1 -1
  5. package/docs/features/agent-intelligence.md +12 -2
  6. package/docs/features/chat.md +40 -5
  7. package/docs/features/cost-usage.md +1 -1
  8. package/docs/features/documents.md +5 -2
  9. package/docs/features/inbox-notifications.md +10 -2
  10. package/docs/features/keyboard-navigation.md +12 -3
  11. package/docs/features/provider-runtimes.md +16 -2
  12. package/docs/features/settings.md +2 -2
  13. package/docs/features/shared-components.md +7 -3
  14. package/docs/features/tables.md +3 -1
  15. package/docs/features/tool-permissions.md +6 -2
  16. package/docs/features/workflows.md +6 -2
  17. package/docs/index.md +1 -1
  18. package/docs/journeys/developer.md +25 -2
  19. package/docs/journeys/personal-use.md +12 -5
  20. package/docs/journeys/power-user.md +45 -14
  21. package/docs/journeys/work-use.md +17 -8
  22. package/docs/manifest.json +15 -15
  23. package/docs/superpowers/plans/2026-04-14-chat-command-namespace-refactor.md +1390 -0
  24. package/docs/superpowers/plans/2026-04-14-chat-environment-integration.md +1561 -0
  25. package/docs/superpowers/plans/2026-04-14-chat-polish-bundle-v1.md +1219 -0
  26. package/docs/superpowers/plans/2026-04-14-chat-session-persistence-provider-closeout.md +399 -0
  27. package/next.config.mjs +1 -0
  28. package/package.json +1 -1
  29. package/src/app/api/chat/conversations/[id]/skills/__tests__/activate.test.ts +141 -0
  30. package/src/app/api/chat/conversations/[id]/skills/activate/route.ts +74 -0
  31. package/src/app/api/chat/conversations/[id]/skills/deactivate/route.ts +33 -0
  32. package/src/app/api/chat/export/route.ts +52 -0
  33. package/src/app/api/chat/files/search/route.ts +50 -0
  34. package/src/app/api/environment/rescan-if-stale/__tests__/route.test.ts +45 -0
  35. package/src/app/api/environment/rescan-if-stale/route.ts +23 -0
  36. package/src/app/api/environment/skills/route.ts +13 -0
  37. package/src/app/api/schedules/[id]/execute/route.ts +2 -2
  38. package/src/app/api/settings/chat/pins/route.ts +94 -0
  39. package/src/app/api/settings/chat/saved-searches/__tests__/route.test.ts +119 -0
  40. package/src/app/api/settings/chat/saved-searches/route.ts +79 -0
  41. package/src/app/api/settings/environment/route.ts +26 -0
  42. package/src/app/api/tasks/[id]/execute/route.ts +52 -12
  43. package/src/app/api/tasks/[id]/respond/route.ts +31 -15
  44. package/src/app/api/tasks/[id]/resume/route.ts +24 -3
  45. package/src/app/documents/page.tsx +4 -1
  46. package/src/app/settings/page.tsx +2 -0
  47. package/src/components/chat/__tests__/capability-banner.test.tsx +38 -0
  48. package/src/components/chat/__tests__/chat-session-provider.test.tsx +166 -1
  49. package/src/components/chat/__tests__/skill-row.test.tsx +91 -0
  50. package/src/components/chat/capability-banner.tsx +68 -0
  51. package/src/components/chat/chat-command-popover.tsx +668 -47
  52. package/src/components/chat/chat-input.tsx +103 -8
  53. package/src/components/chat/chat-message.tsx +12 -3
  54. package/src/components/chat/chat-session-provider.tsx +73 -3
  55. package/src/components/chat/chat-shell.tsx +62 -3
  56. package/src/components/chat/command-tab-bar.tsx +68 -0
  57. package/src/components/chat/conversation-template-picker.tsx +421 -0
  58. package/src/components/chat/help-dialog.tsx +39 -0
  59. package/src/components/chat/skill-composition-conflict-dialog.tsx +96 -0
  60. package/src/components/chat/skill-row.tsx +147 -0
  61. package/src/components/documents/document-browser.tsx +37 -19
  62. package/src/components/notifications/__tests__/permission-response-actions.test.tsx +70 -0
  63. package/src/components/notifications/permission-response-actions.tsx +155 -1
  64. package/src/components/settings/environment-section.tsx +102 -0
  65. package/src/components/shared/__tests__/filter-hint.test.tsx +40 -0
  66. package/src/components/shared/__tests__/saved-searches-manager.test.tsx +147 -0
  67. package/src/components/shared/command-palette.tsx +262 -2
  68. package/src/components/shared/filter-hint.tsx +70 -0
  69. package/src/components/shared/filter-input.tsx +59 -0
  70. package/src/components/shared/saved-searches-manager.tsx +199 -0
  71. package/src/components/tasks/task-bento-grid.tsx +12 -2
  72. package/src/components/tasks/task-card.tsx +3 -0
  73. package/src/components/tasks/task-chip-bar.tsx +30 -1
  74. package/src/hooks/__tests__/use-chat-autocomplete-tabs.test.ts +47 -0
  75. package/src/hooks/__tests__/use-saved-searches.test.ts +70 -0
  76. package/src/hooks/use-active-skills.ts +110 -0
  77. package/src/hooks/use-chat-autocomplete.ts +120 -7
  78. package/src/hooks/use-enriched-skills.ts +19 -0
  79. package/src/hooks/use-pinned-entries.ts +104 -0
  80. package/src/hooks/use-recent-user-messages.ts +19 -0
  81. package/src/hooks/use-saved-searches.ts +142 -0
  82. package/src/lib/agents/__tests__/claude-agent-sdk-options.test.ts +56 -0
  83. package/src/lib/agents/__tests__/claude-agent.test.ts +17 -4
  84. package/src/lib/agents/__tests__/task-dispatch.test.ts +166 -0
  85. package/src/lib/agents/__tests__/tool-permissions.test.ts +60 -0
  86. package/src/lib/agents/claude-agent.ts +105 -46
  87. package/src/lib/agents/handoff/bus.ts +2 -2
  88. package/src/lib/agents/profiles/__tests__/list-fused-profiles.test.ts +110 -0
  89. package/src/lib/agents/profiles/__tests__/registry.test.ts +47 -0
  90. package/src/lib/agents/profiles/builtins/upgrade-assistant/SKILL.md +30 -3
  91. package/src/lib/agents/profiles/builtins/upgrade-assistant/profile.yaml +6 -2
  92. package/src/lib/agents/profiles/list-fused-profiles.ts +104 -0
  93. package/src/lib/agents/profiles/registry.ts +18 -0
  94. package/src/lib/agents/profiles/types.ts +7 -1
  95. package/src/lib/agents/router.ts +3 -6
  96. package/src/lib/agents/runtime/__tests__/catalog.test.ts +130 -0
  97. package/src/lib/agents/runtime/__tests__/execution-target.test.ts +183 -0
  98. package/src/lib/agents/runtime/anthropic-direct.ts +8 -0
  99. package/src/lib/agents/runtime/catalog.ts +121 -0
  100. package/src/lib/agents/runtime/claude-sdk.ts +32 -0
  101. package/src/lib/agents/runtime/execution-target.ts +456 -0
  102. package/src/lib/agents/runtime/index.ts +4 -0
  103. package/src/lib/agents/runtime/launch-failure.ts +101 -0
  104. package/src/lib/agents/runtime/openai-codex.ts +35 -0
  105. package/src/lib/agents/runtime/openai-direct.ts +8 -0
  106. package/src/lib/agents/task-dispatch.ts +220 -0
  107. package/src/lib/agents/tool-permissions.ts +16 -1
  108. package/src/lib/chat/__tests__/active-skill-injection.test.ts +261 -0
  109. package/src/lib/chat/__tests__/clean-filter-input.test.ts +68 -0
  110. package/src/lib/chat/__tests__/command-tabs.test.ts +68 -0
  111. package/src/lib/chat/__tests__/context-builder-files.test.ts +112 -0
  112. package/src/lib/chat/__tests__/dismissals.test.ts +65 -0
  113. package/src/lib/chat/__tests__/engine-sdk-options.test.ts +117 -0
  114. package/src/lib/chat/__tests__/skill-conflict.test.ts +35 -0
  115. package/src/lib/chat/__tests__/types.test.ts +28 -0
  116. package/src/lib/chat/active-skills.ts +31 -0
  117. package/src/lib/chat/clean-filter-input.ts +30 -0
  118. package/src/lib/chat/codex-engine.ts +30 -7
  119. package/src/lib/chat/command-tabs.ts +61 -0
  120. package/src/lib/chat/context-builder.ts +141 -1
  121. package/src/lib/chat/dismissals.ts +73 -0
  122. package/src/lib/chat/engine.ts +109 -15
  123. package/src/lib/chat/files/__tests__/search.test.ts +135 -0
  124. package/src/lib/chat/files/expand-mention.ts +76 -0
  125. package/src/lib/chat/files/search.ts +99 -0
  126. package/src/lib/chat/skill-composition.ts +210 -0
  127. package/src/lib/chat/skill-conflict.ts +105 -0
  128. package/src/lib/chat/stagent-tools.ts +6 -19
  129. package/src/lib/chat/stream-telemetry.ts +9 -4
  130. package/src/lib/chat/system-prompt.ts +22 -0
  131. package/src/lib/chat/tool-catalog.ts +33 -3
  132. package/src/lib/chat/tools/__tests__/profile-tools.test.ts +51 -0
  133. package/src/lib/chat/tools/__tests__/settings-tools.test.ts +294 -0
  134. package/src/lib/chat/tools/__tests__/skill-tools.test.ts +474 -0
  135. package/src/lib/chat/tools/__tests__/task-tools.test.ts +47 -0
  136. package/src/lib/chat/tools/__tests__/workflow-tools-dedup.test.ts +134 -0
  137. package/src/lib/chat/tools/blueprint-tools.ts +190 -0
  138. package/src/lib/chat/tools/helpers.ts +2 -0
  139. package/src/lib/chat/tools/profile-tools.ts +120 -23
  140. package/src/lib/chat/tools/skill-tools.ts +183 -0
  141. package/src/lib/chat/tools/task-tools.ts +6 -2
  142. package/src/lib/chat/tools/workflow-tools.ts +61 -20
  143. package/src/lib/chat/types.ts +15 -0
  144. package/src/lib/constants/settings.ts +2 -0
  145. package/src/lib/data/clear.ts +2 -6
  146. package/src/lib/db/bootstrap.ts +17 -0
  147. package/src/lib/db/schema.ts +26 -0
  148. package/src/lib/environment/__tests__/auto-promote.test.ts +132 -0
  149. package/src/lib/environment/__tests__/list-skills-enriched.test.ts +55 -0
  150. package/src/lib/environment/__tests__/skill-enrichment.test.ts +129 -0
  151. package/src/lib/environment/__tests__/skill-recommendations.test.ts +87 -0
  152. package/src/lib/environment/data.ts +9 -0
  153. package/src/lib/environment/list-skills.ts +176 -0
  154. package/src/lib/environment/parsers/__tests__/skill.test.ts +54 -0
  155. package/src/lib/environment/parsers/skill.ts +26 -5
  156. package/src/lib/environment/profile-generator.ts +54 -0
  157. package/src/lib/environment/skill-enrichment.ts +106 -0
  158. package/src/lib/environment/skill-recommendations.ts +66 -0
  159. package/src/lib/filters/__tests__/parse.quoted.test.ts +40 -0
  160. package/src/lib/filters/__tests__/parse.test.ts +135 -0
  161. package/src/lib/filters/parse.ts +86 -0
  162. package/src/lib/instance/__tests__/upgrade-poller.test.ts +50 -0
  163. package/src/lib/instance/fingerprint.ts +7 -9
  164. package/src/lib/instance/upgrade-poller.ts +53 -1
  165. package/src/lib/schedules/scheduler.ts +4 -4
  166. package/src/lib/workflows/blueprints/__tests__/render-prompt.test.ts +124 -0
  167. package/src/lib/workflows/blueprints/render-prompt.ts +71 -0
  168. package/src/lib/workflows/blueprints/types.ts +6 -0
  169. package/src/lib/workflows/engine.ts +5 -3
  170. package/src/test/setup.ts +10 -0
package/README.md CHANGED
@@ -73,6 +73,9 @@ Run the same business process on different AI providers without changing a line
73
73
  | 📦 | **[Workflow Context Batching](#workflow-context-batching)** | Workflow-scoped proposal buffering with batch approve/reject for learned context |
74
74
  | 🧪 | **[E2E Test Automation](#e2e-test-automation)** | API-level end-to-end test suite covering both runtimes, 4 profiles, and 4 workflow patterns |
75
75
  | ⌨️ | **[Command Palette](#command-palette)** | Global `⌘K` search for fast navigation across tasks, projects, workflows, and settings |
76
+ | 🧱 | **[Skill Composition](#skill-composition)** | Activate up to 3 skills at once with conflict detection and runtime-aware capability gates |
77
+ | 🔎 | **[Filters & Saved Searches](#filters--saved-searches)** | `#key:value` filter grammar, pinned and saved searches surfaced in `⌘K` palette |
78
+ | 🛡️ | **[Upgrade Detection](#upgrade-detection)** | Hourly upstream check with in-app notifications and guided merge sessions |
76
79
  | 📖 | **[Playbook](#playbook)** | Built-in documentation with usage-stage awareness, adoption heatmap, and guided learning journeys |
77
80
  | 📚 | **[Living Book](#living-book)** | AI-native book reader with 9 chapters, agent-powered regeneration, staleness detection, and reading paths |
78
81
  | 🌐 | **[Environment](#environment)** | Control plane for Claude Code and Codex CLI environments with scanning, caching, sync, and templates |
@@ -276,6 +279,9 @@ Pending permission requests now surface through a shell-level approval presenter
276
279
  #### Tool Permission Presets
277
280
  Pre-configured permission bundles that reduce friction for common tool approval patterns. Three layered presets — read-only (file reads, glob, grep), git-safe (adds git operations), and full-auto (adds write, edit, bash) — compose with existing "Always Allow" patterns. Presets are layered: enabling git-safe automatically includes read-only patterns; removing git-safe only strips its unique additions. Risk badges indicate the trust level of each preset. Manage presets from the Settings page alongside individual tool permissions.
278
281
 
282
+ #### Upgrade Detection
283
+ Hourly poller checks the upstream `origin/main` for new commits and surfaces them via an in-app `UpgradeBadge` + notification queue. If three consecutive checks fail, a single deduplicated "Upgrade check failing" notification is inserted (and cleared on the next successful tick). The `upgrade-assistant` profile drives guided merge sessions end-to-end — including free-form questions and 3-choice option cards when a merge conflict or drifted `main` requires operator input. Dev repos are fully gated via `STAGENT_DEV_MODE` and a `.git/stagent-dev-mode` sentinel so contributor pushes are never blocked.
284
+
279
285
  #### Schedules
280
286
  Time-based scheduling for agent tasks with human-friendly intervals (`5m`, `2h`, `1d`) and raw 5-field cron expressions. One-shot and recurring modes with pause/resume lifecycle, expiry limits, and max firings. Each firing creates a child task through the shared execution pipeline, and schedules can now target a runtime explicitly. Scheduler runs as a poll-based engine started via Next.js instrumentation hook.
281
287
 
@@ -309,6 +315,12 @@ Conversational control plane for all workspace primitives — projects, tasks, w
309
315
  |:-:|:-:|:-:|
310
316
  | <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/chat-list.png" alt="Chat tool catalog with category tabs" width="380" /> | <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/chat-model-selector.png" alt="Chat model selector with cost tiers" width="380" /> | <img src="https://raw.githubusercontent.com/navam-io/stagent/main/public/readme/chat-create-tab.png" alt="Chat Create category prompts" width="380" /> |
311
317
 
318
+ #### Skill Composition
319
+ Activate up to three skills in a single conversation with conflict detection and runtime-aware capability gates. The Skills tab in the chat popover surfaces `+ Add` buttons on inactive skills, active badges with deactivate actions, and an "N of M active" indicator. When two skills issue polarity-divergent directives on shared keywords, a conflict dialog previews the excerpts and lets you confirm with `force:true` or back out. Composition honors the runtime capability matrix — Claude Code and Codex App Server support up to 3 active skills, while Ollama stays at 1. Conversations persist active skills through an additive `active_skill_ids` column that preserves legacy single-skill reads.
320
+
321
+ #### Filters & Saved Searches
322
+ Structured `#key:value` filter grammar across chat, documents, and the `⌘K` palette. The shared `FilterInput` parser accepts bare clauses, quoted values (`#tag:"needs review"`), and free text — clauses AND with surface-specific Select filters and sync to URL params for shareable, refresh-persistent views. Save any filter expression with a rename footer; saved searches appear as a dedicated group in the mention popover and in the command palette, so views built in one surface are reachable from anywhere. Pinned saved searches sit at the top of both lists for zero-click recall.
323
+
312
324
  #### Monitoring
313
325
  Real-time agent log streaming via Server-Sent Events. Filter by task or event type, click entries to jump to task details, and auto-pause polling when the tab is hidden (Page Visibility API).
314
326
 
@@ -511,12 +523,13 @@ All 14 features shipped across three layers:
511
523
  |----------|---------|
512
524
  | **Documents** (5) | File attachments, preprocessing (5 formats), agent context injection, document browser, output generation |
513
525
  | **Agent Intelligence** (6) | Multi-agent routing, autonomous loops, multi-agent swarm, AI assist→workflows, agent self-improvement, workflow context batching |
514
- | **Agent Profiles** (2) | Agent profile catalog (21 profiles), workflow blueprints (8 templates) |
526
+ | **Agent Profiles** (2) | Agent profile catalog (<!-- STAT:builtinProfiles -->21<!-- /STAT --> profiles), workflow blueprints (<!-- STAT:workflowBlueprints -->13<!-- /STAT --> templates) |
515
527
  | **UI Enhancement** (13) | Ambient approvals, learned context UX, micro-visualizations, command palette, operational surface, profile surface, accessibility, UI density, kanban operations, board persistence, detail view redesign, playbook documentation, workflow UX overhaul |
516
528
  | **Platform** (8) | Scheduled prompt loops, tool permissions, provider runtimes, OpenAI Codex runtime, cross-provider profiles, parallel fork/join, tool permission presets, npm publish (deferred) |
517
529
  | **Runtime Quality** (2) | SDK runtime hardening, E2E test automation |
518
530
  | **Governance** (3) | Usage metering ledger, spend budget guardrails, cost & usage dashboard |
519
- | **Chat** (6) | Chat data layer, chat engine (5-tier context, CRUD tools), API routes (SSE streaming), UI shell, message rendering (Quick Access pills), input composer (tool catalog, model selector) |
531
+ | **Chat** (10) | Chat data layer, chat engine (5-tier context, CRUD tools), API routes (SSE streaming), UI shell, message rendering (Quick Access pills), input composer (tool catalog, model selector), skill composition (multi-skill with conflict detection), filter namespace (`#key:value` grammar), pinned + saved searches, conversation templates |
532
+ | **Platform Hardening** (2) | Runtime validation hardening (MCP-tool runtime-id validation with safe fallbacks), upgrade detection (hourly upstream poll + guided merge sessions) |
520
533
  | **Environment** (11) | Environment scanner, cache, dashboard, git checkpoint manager, sync engine, project onboarding, templates, cross-project comparison, skill portfolio, health scoring, agent profile from environment |
521
534
  | **Living Book** (5) | Content merge (chapters → playbook), author's notes, reading paths, markdown pipeline, self-updating chapters |
522
535
 
package/dist/cli.js CHANGED
@@ -154,6 +154,9 @@ function bootstrapStagentDatabase(sqlite2) {
154
154
  status TEXT DEFAULT 'planned' NOT NULL,
155
155
  assigned_agent TEXT,
156
156
  agent_profile TEXT,
157
+ effective_runtime_id TEXT,
158
+ effective_model_id TEXT,
159
+ runtime_fallback_reason TEXT,
157
160
  priority INTEGER DEFAULT 2 NOT NULL,
158
161
  result TEXT,
159
162
  session_id TEXT,
@@ -385,6 +388,9 @@ function bootstrapStagentDatabase(sqlite2) {
385
388
  };
386
389
  addColumnIfMissing(`ALTER TABLE tasks ADD COLUMN agent_profile TEXT;`);
387
390
  sqlite2.exec(`CREATE INDEX IF NOT EXISTS idx_tasks_agent_profile ON tasks(agent_profile);`);
391
+ addColumnIfMissing(`ALTER TABLE tasks ADD COLUMN effective_runtime_id TEXT;`);
392
+ addColumnIfMissing(`ALTER TABLE tasks ADD COLUMN effective_model_id TEXT;`);
393
+ addColumnIfMissing(`ALTER TABLE tasks ADD COLUMN runtime_fallback_reason TEXT;`);
388
394
  addColumnIfMissing(`ALTER TABLE tasks ADD COLUMN workflow_id TEXT REFERENCES workflows(id);`);
389
395
  sqlite2.exec(`CREATE INDEX IF NOT EXISTS idx_tasks_workflow_id ON tasks(workflow_id);`);
390
396
  addColumnIfMissing(`ALTER TABLE tasks ADD COLUMN schedule_id TEXT REFERENCES schedules(id);`);
@@ -408,6 +414,8 @@ function bootstrapStagentDatabase(sqlite2) {
408
414
  addColumnIfMissing(`ALTER TABLE documents ADD COLUMN source TEXT DEFAULT 'upload';`);
409
415
  addColumnIfMissing(`ALTER TABLE documents ADD COLUMN conversation_id TEXT REFERENCES conversations(id);`);
410
416
  addColumnIfMissing(`ALTER TABLE documents ADD COLUMN message_id TEXT;`);
417
+ addColumnIfMissing(`ALTER TABLE conversations ADD COLUMN active_skill_id TEXT;`);
418
+ addColumnIfMissing(`ALTER TABLE conversations ADD COLUMN active_skill_ids TEXT DEFAULT '[]';`);
411
419
  addColumnIfMissing(`ALTER TABLE workflows ADD COLUMN resume_at INTEGER;`);
412
420
  sqlite2.exec(`CREATE INDEX IF NOT EXISTS idx_documents_source ON documents(source);`);
413
421
  sqlite2.exec(`CREATE INDEX IF NOT EXISTS idx_documents_conversation_id ON documents(conversation_id);`);
@@ -520,6 +528,8 @@ function bootstrapStagentDatabase(sqlite2) {
520
528
  status TEXT DEFAULT 'active' NOT NULL,
521
529
  session_id TEXT,
522
530
  context_scope TEXT,
531
+ active_skill_id TEXT,
532
+ active_skill_ids TEXT DEFAULT '[]',
523
533
  created_at INTEGER NOT NULL,
524
534
  updated_at INTEGER NOT NULL,
525
535
  FOREIGN KEY (project_id) REFERENCES projects(id) ON UPDATE NO ACTION ON DELETE NO ACTION
@@ -1012,6 +1022,20 @@ function markAllMigrationsApplied(sqlite2, migrationsFolder, migrationsTable = "
1012
1022
  var __dirname = dirname2(fileURLToPath(import.meta.url));
1013
1023
  var appDir = join3(__dirname, "..");
1014
1024
  var launchCwd = process.cwd();
1025
+ var _envLocalPath = join3(launchCwd, ".env.local");
1026
+ if (existsSync2(_envLocalPath)) {
1027
+ for (const line of readFileSync(_envLocalPath, "utf-8").split("\n")) {
1028
+ const trimmed = line.trim();
1029
+ if (!trimmed || trimmed.startsWith("#")) continue;
1030
+ const eqIdx = trimmed.indexOf("=");
1031
+ if (eqIdx === -1) continue;
1032
+ const key = trimmed.slice(0, eqIdx).trim();
1033
+ const val = trimmed.slice(eqIdx + 1).trim().replace(/^(['"])(.*)\1$/, "$2");
1034
+ if (key && !(key in process.env)) {
1035
+ process.env[key] = val;
1036
+ }
1037
+ }
1038
+ }
1015
1039
  var pkg = JSON.parse(readFileSync(join3(appDir, "package.json"), "utf-8"));
1016
1040
  function getHelpText() {
1017
1041
  const dir = getStagentDataDir();
@@ -1,29 +1,159 @@
1
1
  {
2
- "generated": "2026-04-08T20:00:00Z",
3
- "summary": {
4
- "totalFeatures": 86,
5
- "coveredFeatures": 85,
6
- "gapCount": 1,
7
- "unusedScreenshotCount": 0,
8
- "brokenReferences": 0,
9
- "orphanedImages": 0
10
- },
2
+ "generated": "2026-04-16T05:57:41Z",
11
3
  "gaps": [
12
4
  {
13
- "feature": "tables-document-import",
14
- "category": "Structured Data",
15
- "screenshots": [],
16
- "journeyCoverage": ["work-use"],
17
- "suggestedPersona": "work",
18
- "note": "Import wizard has no dedicated screenshot. The feature is referenced narratively in the Work journey at Step 7, but a dedicated capture is blocked by the Tables list being empty (no seed data). Residual gap — revisit after seeding sample tables."
5
+ "feature": "ai-assist-workflow-creation",
6
+ "category": "Agent Intelligence",
7
+ "screenshots": [
8
+ "dashboard-create-form-ai-assist.png",
9
+ "dashboard-create-form-ai-applied.png",
10
+ "dashboard-create-form-ai-breakdown.png",
11
+ "dashboard-workflow-confirm.png"
12
+ ],
13
+ "journeyCoverage": [],
14
+ "suggestedPersona": "power-user"
15
+ },
16
+ {
17
+ "feature": "autonomous-loop-execution",
18
+ "category": "Schedules",
19
+ "screenshots": [
20
+ "schedules-detail.png"
21
+ ],
22
+ "journeyCoverage": [],
23
+ "suggestedPersona": "power-user"
24
+ },
25
+ {
26
+ "feature": "chat-composition-ui-v1",
27
+ "category": "Chat",
28
+ "screenshots": [
29
+ "chat-skills-tab.png"
30
+ ],
31
+ "journeyCoverage": [],
32
+ "suggestedPersona": "personal"
33
+ },
34
+ {
35
+ "feature": "chat-dedup-variant-tolerance",
36
+ "category": "Chat",
37
+ "screenshots": [
38
+ "chat-conversation.png"
39
+ ],
40
+ "journeyCoverage": [],
41
+ "suggestedPersona": "personal"
42
+ },
43
+ {
44
+ "feature": "chat-file-mentions",
45
+ "category": "Chat",
46
+ "screenshots": [
47
+ "chat-mentions-popover.png",
48
+ "chat-entities-tab.png"
49
+ ],
50
+ "journeyCoverage": [],
51
+ "suggestedPersona": "personal"
52
+ },
53
+ {
54
+ "feature": "chat-settings-tool",
55
+ "category": "Chat",
56
+ "screenshots": [
57
+ "chat-tools-tab.png"
58
+ ],
59
+ "journeyCoverage": [],
60
+ "suggestedPersona": "personal"
61
+ },
62
+ {
63
+ "feature": "chat-skill-composition",
64
+ "category": "Agent Intelligence",
65
+ "screenshots": [
66
+ "chat-skills-tab.png",
67
+ "chat-slash-popover.png"
68
+ ],
69
+ "journeyCoverage": [],
70
+ "suggestedPersona": "power-user"
71
+ },
72
+ {
73
+ "feature": "instance-bootstrap",
74
+ "category": "Platform/Runtime",
75
+ "screenshots": [
76
+ "settings-instance.png"
77
+ ],
78
+ "journeyCoverage": [],
79
+ "suggestedPersona": "developer"
80
+ },
81
+ {
82
+ "feature": "multi-agent-swarm",
83
+ "category": "Agent Intelligence",
84
+ "screenshots": [
85
+ "dashboard-create-form-ai-breakdown.png"
86
+ ],
87
+ "journeyCoverage": [],
88
+ "suggestedPersona": "power-user"
89
+ },
90
+ {
91
+ "feature": "task-definition-ai",
92
+ "category": "Agent Intelligence",
93
+ "screenshots": [
94
+ "dashboard-create-form-ai-assist.png",
95
+ "dashboard-create-form-empty.png",
96
+ "dashboard-create-form-filled.png"
97
+ ],
98
+ "journeyCoverage": [],
99
+ "suggestedPersona": "power-user"
100
+ },
101
+ {
102
+ "feature": "upgrade-detection",
103
+ "category": "Platform/Runtime",
104
+ "screenshots": [
105
+ "settings-instance.png"
106
+ ],
107
+ "journeyCoverage": [],
108
+ "suggestedPersona": "developer"
109
+ }
110
+ ],
111
+ "unusedScreenshots": [
112
+ "analytics-list.png",
113
+ "chat-actions-tab.png",
114
+ "chat-conversation.png",
115
+ "chat-entities-tab.png",
116
+ "chat-mentions-popover.png",
117
+ "chat-model-picker.png",
118
+ "chat-search-filter.png",
119
+ "chat-skills-tab.png",
120
+ "chat-slash-popover.png",
121
+ "chat-tools-tab.png",
122
+ "dashboard-below-fold.png",
123
+ "dashboard-create-form-ai-applied.png",
124
+ "dashboard-create-form-ai-assist.png",
125
+ "dashboard-create-form-ai-breakdown.png",
126
+ "dashboard-create-form-empty.png",
127
+ "dashboard-create-form-filled.png",
128
+ "dashboard-workflow-confirm.png",
129
+ "schedules-create-form-empty.png",
130
+ "schedules-create-form-filled.png",
131
+ "schedules-detail.png",
132
+ "settings-browser-tools.png",
133
+ "settings-channels-add-form.png",
134
+ "settings-instance.png",
135
+ "settings-ollama-connected.png",
136
+ "settings-ollama.png",
137
+ "tables-detail-details.png",
138
+ "tables-detail-triggers.png",
139
+ "tables-detail.png",
140
+ "trust-tier-popover.png",
141
+ "workflows-create-form-delay.png"
142
+ ],
143
+ "contentMismatches": [
144
+ {
145
+ "journey": "work-use.md",
146
+ "step": "Step 14",
147
+ "screenshot": "inbox-expanded.png",
148
+ "severity": "WRONG",
149
+ "issue": "Shows task detail page, not expanded inbox notification. Needs recapture."
19
150
  }
20
151
  ],
21
- "brokenReferences": [],
22
- "orphanedImages": [],
23
- "notes": [
24
- "Closed 3 of 4 prior gaps: book-content-merge, book-reading-paths, database-snapshot-backup.",
25
- "Closed 14 prior broken references — journey docs now reference only fixtures that exist in public/readme/.",
26
- "Cleared 20 orphaned images by overwriting public/readme/ with the fresh screengrab set.",
27
- "Added 4 new feature entries to reflect schedule-orchestration-v2, workflow-step-delays, bulk-row-enrichment, instance-bootstrap/upgrade-session/license-metering."
28
- ]
29
- }
152
+ "summary": {
153
+ "totalFeatures": 50,
154
+ "coveredFeatures": 39,
155
+ "gapCount": 11,
156
+ "unusedScreenshotCount": 30,
157
+ "contentMismatchCount": 1
158
+ }
159
+ }
@@ -1 +1 @@
1
- 2026-04-08T20:00:00Z
1
+ 2026-04-16T06:32:25Z
@@ -4,9 +4,9 @@ category: "feature-reference"
4
4
  section: "agent-intelligence"
5
5
  route: "cross-cutting"
6
6
  tags: [ai-assist, routing, autonomous, swarm, self-improvement, context, parallel, episodic-memory, handoffs]
7
- features: ["task-definition-ai", "multi-agent-routing", "autonomous-loop-execution", "multi-agent-swarm", "agent-self-improvement", "workflow-context-batching", "parallel-research-fork-join", "agent-episodic-memory", "agent-async-handoffs"]
7
+ features: ["task-definition-ai", "multi-agent-routing", "autonomous-loop-execution", "multi-agent-swarm", "agent-self-improvement", "workflow-context-batching", "parallel-research-fork-join", "agent-episodic-memory", "agent-async-handoffs", "chat-skill-composition"]
8
8
  screengrabCount: 0
9
- lastUpdated: "2026-03-31"
9
+ lastUpdated: "2026-04-15"
10
10
  ---
11
11
 
12
12
  # Agent Intelligence
@@ -65,6 +65,16 @@ Agents can hand off work to other agents asynchronously through a message bus:
65
65
 
66
66
  This enables multi-agent workflows where a researcher discovers a code issue and hands it off to the code reviewer without requiring a pre-built workflow definition.
67
67
 
68
+ ### Skill Composition
69
+
70
+ Chat conversations on capable runtimes can run multiple skills simultaneously, layering specialized behaviors (research, code review, document drafting) onto a single session. The composition engine enforces three guardrails:
71
+
72
+ - **Capability gating** — only runtimes that advertise `supportsSkillComposition` accept more than one active skill; others fall back to single-skill mode with a visible hint.
73
+ - **Conflict heuristic** — new skills whose tools or instructions overlap with an active one trigger a confirmation dialog before the swap is applied.
74
+ - **Prompt-budget eviction** — when the combined skill prompts approach the model's context budget, the oldest low-priority skill is evicted automatically so the conversation stays responsive.
75
+
76
+ The active stack persists on the conversation row (`conversations.active_skill_ids`), and the `mergeActiveSkillIds` helper keeps updates atomic across concurrent activations. See the [Chat](./chat.md) feature doc for the user-facing flow.
77
+
68
78
  ### Workflow Context Batching
69
79
 
70
80
  In multi-step workflows, context from earlier steps is batched and forwarded to downstream steps. This prevents information loss across the workflow and ensures each step has the full picture of prior results.
@@ -3,10 +3,10 @@ title: "Chat"
3
3
  category: "feature-reference"
4
4
  section: "chat"
5
5
  route: "/chat"
6
- tags: ["chat", "conversation", "ai", "tool-catalog", "mentions", "channels", "bidirectional"]
7
- features: ["chat-data-layer", "chat-engine", "chat-api-routes", "chat-ui-shell", "chat-message-rendering", "chat-input-composer", "bidirectional-channel-chat"]
6
+ tags: ["chat", "conversation", "ai", "tool-catalog", "mentions", "channels", "bidirectional", "skills", "templates", "filters", "saved-searches"]
7
+ features: ["chat-data-layer", "chat-engine", "chat-api-routes", "chat-ui-shell", "chat-message-rendering", "chat-input-composer", "bidirectional-channel-chat", "chat-skill-composition", "chat-composition-ui-v1", "chat-conversation-templates", "chat-filter-namespace", "chat-pinned-saved-searches", "saved-search-polish-v1"]
8
8
  screengrabCount: 4
9
- lastUpdated: "2026-03-31"
9
+ lastUpdated: "2026-04-15"
10
10
  ---
11
11
 
12
12
  # Chat
@@ -18,10 +18,10 @@ The Chat page is your AI-powered command center for everything in your workspace
18
18
  ![Chat tool catalog](../screengrabs/chat-list.png)
19
19
  *Tool catalog with hero heading, category tabs (Explore / Create / Debug / Automate), Smart Picks row, and conversation sidebar*
20
20
 
21
- ![Model selector](../screengrabs/chat-model-selector.png)
21
+ ![Model selector](../screengrabs/chat-model-picker.png)
22
22
  *Model selector dropdown showing Claude and Codex models organized by provider with cost tiers*
23
23
 
24
- ![Create category tab](../screengrabs/chat-create-tab.png)
24
+ ![Create category tab](../screengrabs/chat-actions-tab.png)
25
25
  *Create category selected, showing prompts for spinning up tasks, workflows, and projects*
26
26
 
27
27
  ![Active conversation](../screengrabs/chat-conversation.png)
@@ -61,6 +61,41 @@ Every chat starts a new conversation that is saved automatically. Your conversat
61
61
 
62
62
  When bidirectional chat is enabled on a Slack or Telegram delivery channel, messages sent to Stagent from those platforms create conversations visible in the Chat sidebar. The same chat engine handles both web and channel conversations, including tool access, permission handling, and multi-turn context.
63
63
 
64
+ ### Skill Composition
65
+
66
+ On runtimes that support multiple active skills, you can stack specialized behaviors onto a single conversation. Open the slash (`/`) popover and switch to the **Skills** tab — each skill card has an **+ Add** button. Active skills show a badge, and the header reads "N of M active" so you always know where you stand against the runtime's cap (`maxActiveSkills`).
67
+
68
+ - **Modes** — add a skill in `replace` mode to swap it in, or `add` mode to layer it on top of the current stack.
69
+ - **Conflict heuristic** — if a new skill clashes with one already active (overlapping tool needs, contradictory instructions), a confirmation dialog surfaces the conflict so you can choose which to keep.
70
+ - **Prompt-budget eviction** — when the active skill set approaches the model's context budget, the oldest or lowest-priority skill is evicted automatically and shown in a lightweight toast.
71
+ - **Capability gating** — runtimes that do not support composition (currently gated by `RuntimeFeatures.supportsSkillComposition`) render the Skills tab read-only with a "composition disabled on this runtime" hint.
72
+
73
+ The currently active skills are persisted on the conversation itself (`conversations.active_skill_ids`) so re-opening a conversation restores the exact same stack.
74
+
75
+ ### Conversation Templates
76
+
77
+ Rather than starting every conversation from a blank prompt, you can kick one off from a saved blueprint. Three entry points:
78
+
79
+ - **Empty-state button** — the chat hero shows a "Start from template" button when no conversation is active.
80
+ - **Slash command** — type `/new-from-template` in the composer to open the picker inline.
81
+ - **Command palette** — press `⌘K` and pick the **Templates** group to browse by name.
82
+
83
+ Each template resolves its opening prompt from the blueprint's optional `chatPrompt` field (falling back to the first step's prompt template if `chatPrompt` is not set). Variables in the prompt are filled in at launch so the conversation opens already primed with context.
84
+
85
+ ### Filter Namespace
86
+
87
+ Type `#` in the chat search, the `@` popover, or the Skills popover to filter by namespace. Values can be double-quoted to include spaces — for example, `#scope:"customer support"` matches only entries whose scope equals that phrase. Supported qualifiers include `#scope:`, `#type:`, and surface-specific keys. The same `FilterInput` component powers the `/documents` list page and the `⌘K` palette, so the syntax is identical everywhere.
88
+
89
+ ### Saved Searches
90
+
91
+ Frequently used filter + query combinations can be pinned and reused:
92
+
93
+ - **Save a view** — run any search, then click **Save view** in the footer to name and pin it.
94
+ - **Reuse from the palette** — `⌘K` shows a **Saved** group at the top; pick one to re-apply instantly.
95
+ - **Reuse from mentions** — the `@` popover also surfaces saved searches in a dedicated group for in-composer reuse.
96
+
97
+ Saved searches round-trip via `GET/PUT /api/settings/chat/saved-searches`, and the `cleanFilterInput()` helper strips any mention-trigger residue (`@`, `#`, `/`) so a pinned query stays clean no matter where you saved it from.
98
+
64
99
  ### Streaming Responses
65
100
 
66
101
  Responses stream in token by token with a blinking cursor. Markdown formatting -- headings, lists, code blocks with syntax highlighting, tables, and links -- renders as the text streams in. Code blocks include a copy button and language label.
@@ -15,7 +15,7 @@ Track spend across providers and monitor token consumption with the cost and usa
15
15
 
16
16
  ## Screenshots
17
17
 
18
- ![Cost and usage dashboard with spend breakdown](../screengrabs/cost-usage-list.png)
18
+ ![Cost and usage dashboard with spend breakdown](../screengrabs/costs-list.png)
19
19
  *The cost and usage dashboard showing spend metrics, provider breakdown, and budget pacing indicators.*
20
20
 
21
21
  ![Cost and usage below fold](../screengrabs/cost-usage-below-fold.png)
@@ -4,9 +4,9 @@ category: "feature-reference"
4
4
  section: "documents"
5
5
  route: "/documents"
6
6
  tags: [documents, upload, preprocessing, pdf, office, text-extraction, agent-context]
7
- features: ["document-manager", "file-attachment-data-layer", "document-preprocessing", "agent-document-context", "document-output-generation"]
7
+ features: ["document-manager", "file-attachment-data-layer", "document-preprocessing", "agent-document-context", "document-output-generation", "chat-filter-namespace", "chat-pinned-saved-searches"]
8
8
  screengrabCount: 2
9
- lastUpdated: "2026-03-31"
9
+ lastUpdated: "2026-04-15"
10
10
  ---
11
11
 
12
12
  # Documents
@@ -26,6 +26,9 @@ The Document Library is where you upload, manage, and organize files that agents
26
26
  ### Table and Grid Views
27
27
  Toggle between a table view for dense scanning (file name, type, size, processing status, timestamps) and a grid view with visual cards. Both views support selection for bulk operations.
28
28
 
29
+ ### FilterInput and Saved Searches
30
+ The `/documents` list page is the reference consumer for the shared **FilterInput** component. Type `#type:pdf` or `#scope:"legal review"` to filter by namespace — double-quoted values cleanly handle phrases with spaces. Combine filters with a free-text search, then click **Save view** in the footer to pin the combination as a saved search. Saved searches are available across surfaces (Chat, Tables, Documents) via the `⌘K` palette **Saved** group.
31
+
29
32
  ### Upload Dialog with Drag-and-Drop
30
33
  The upload dialog accepts files via drag-and-drop or file picker. A visual indicator shows supported file types. Multiple files can be uploaded in a single batch.
31
34
 
@@ -4,9 +4,9 @@ category: "feature-reference"
4
4
  section: "inbox-notifications"
5
5
  route: "/inbox"
6
6
  tags: [inbox, notifications, permissions, approval, human-in-the-loop, toast, handoffs, agent-messages]
7
- features: ["inbox-notifications", "ambient-approval-toast", "content-handling", "agent-async-handoffs"]
7
+ features: ["inbox-notifications", "ambient-approval-toast", "content-handling", "agent-async-handoffs", "upgrade-detection", "upgrade-session"]
8
8
  screengrabCount: 2
9
- lastUpdated: "2026-03-31"
9
+ lastUpdated: "2026-04-15"
10
10
  ---
11
11
 
12
12
  # Inbox & Notifications
@@ -41,6 +41,14 @@ When an agent requests permission to use a tool, a "Permission Required" notific
41
41
  ### Agent Handoff Approvals
42
42
  When one agent hands off work to another via the async message bus, a handoff notification appears in the inbox. You can approve the handoff to let the receiving agent proceed, or deny it to stop the chain. Governance gates enforce chain depth limits and prevent self-handoffs.
43
43
 
44
+ ### Agent Questions (AskUserQuestion)
45
+
46
+ When an agent needs a direct answer from you — for example, to disambiguate between two valid paths during an upgrade merge — it uses the **AskUserQuestion** tool. These surface in the inbox as question notifications with a typed reply box (rendered by the `QuestionReplyActions` branch of the permission-response view). Submit a short answer inline and the agent resumes from where it paused. Questions are distinct from permission requests: there is no "Approve / Deny," only the reply field.
47
+
48
+ ### Upgrade Failure Notifications
49
+
50
+ If the hourly upgrade-detection poller fails three consecutive times (network error, unreachable remote, etc.), a persistent notification is posted to the inbox so the issue does not go silent. The three-strike dedup prevents a flood — only the first sustained failure raises a notification, and it clears automatically once the poller succeeds again.
51
+
44
52
  ### Ambient Approval Toasts
45
53
  For quick permission grants, ambient toasts appear at the edge of the screen. You can approve or deny without navigating to the inbox, keeping your workflow uninterrupted.
46
54
 
@@ -3,10 +3,10 @@ title: "Keyboard Navigation"
3
3
  category: "feature-reference"
4
4
  section: "keyboard-navigation"
5
5
  route: "cross-cutting"
6
- tags: [keyboard, command-palette, accessibility, aria, a11y, navigation]
7
- features: ["command-palette-enhancement", "accessibility", "keyboard-shortcut-system"]
6
+ tags: [keyboard, command-palette, accessibility, aria, a11y, navigation, templates, saved-searches, slash-commands]
7
+ features: ["command-palette-enhancement", "accessibility", "keyboard-shortcut-system", "chat-conversation-templates", "chat-pinned-saved-searches", "saved-search-polish-v1"]
8
8
  screengrabCount: 2
9
- lastUpdated: "2026-03-31"
9
+ lastUpdated: "2026-04-15"
10
10
  ---
11
11
 
12
12
  # Keyboard Navigation
@@ -31,6 +31,15 @@ Activated with **Meta+K** (Cmd+K on macOS, Ctrl+K on other platforms), the comma
31
31
  - **Cross-entity search** -- type to search across projects, tasks, workflows, documents, and schedules in a single unified list.
32
32
  - **Keyboard navigation** -- arrow keys to browse results, Enter to select, Escape to dismiss.
33
33
  - **Action shortcuts** -- create new tasks, projects, or workflows directly from the palette.
34
+ - **Templates group** -- browse conversation templates generated from workflow blueprints; pick one to open a pre-primed chat.
35
+ - **Saved group** -- recall pinned search + filter combinations across Chat, Documents, and Tables. Saved searches round-trip through a settings endpoint and refetch automatically when new ones are added.
36
+
37
+ ### Slash Commands
38
+
39
+ In addition to the palette, the Chat composer recognizes slash commands for fast actions:
40
+
41
+ - `/new-from-template` -- open the conversation template picker inline without leaving the composer.
42
+ - Additional slash commands live alongside the `/` popover tabs (Actions, Skills, Tools, Entities).
34
43
 
35
44
  ### Focus-Visible Rings
36
45
 
@@ -4,9 +4,9 @@ category: "feature-reference"
4
4
  section: "provider-runtimes"
5
5
  route: "cross-cutting"
6
6
  tags: [claude, codex, runtime, oauth, websocket, mcp, providers, ollama, anthropic-direct, openai-direct, smart-router]
7
- features: ["provider-runtime-abstraction", "openai-codex-app-server", "cross-provider-profile-compatibility", "ollama-runtime-provider", "anthropic-direct-runtime", "openai-direct-runtime", "smart-runtime-router"]
7
+ features: ["provider-runtime-abstraction", "openai-codex-app-server", "cross-provider-profile-compatibility", "ollama-runtime-provider", "anthropic-direct-runtime", "openai-direct-runtime", "smart-runtime-router", "runtime-validation-hardening", "runtime-capability-matrix"]
8
8
  screengrabCount: 2
9
- lastUpdated: "2026-03-31"
9
+ lastUpdated: "2026-04-15"
10
10
  ---
11
11
 
12
12
  # Provider Runtimes
@@ -86,6 +86,20 @@ The smart router automatically selects the best runtime for each task based on m
86
86
 
87
87
  The default selection is "Auto (recommended)" which lets the router decide. You can always override with a specific runtime in task, schedule, or workflow forms.
88
88
 
89
+ ### Runtime Capability Matrix
90
+
91
+ Each runtime advertises its capabilities through a central matrix used by the rest of the app to decide whether to show a feature, gate it, or substitute a fallback. The most visible flags today:
92
+
93
+ - **`supportsSkillComposition`** — whether the runtime accepts multiple concurrent skills on a single conversation. Gates the Chat Skills tab multi-activation behavior.
94
+ - **`maxActiveSkills`** — hard cap on the active skill stack. The Chat composer shows "N of M active" against this value.
95
+ - **`hasNativeSkills`** / **`stagentInjectsSkills`** / **`autoLoadsInstructions`** — decide whether Stagent should inject SKILL.md or trust the runtime's native loader, preventing duplicated context on Codex and Claude.
96
+
97
+ Reading this matrix before wiring a feature is the canonical way to answer "should Stagent do X, or trust the runtime to do X."
98
+
99
+ ### Runtime Validation Hardening
100
+
101
+ The MCP task-tools surface now validates every incoming `runtimeId` before dispatching work — unknown IDs are rejected at the boundary rather than crashing downstream. This protects the runtime registry from malformed chat-tool calls and surfaces bad configurations with a clean error message instead of a stack trace.
102
+
89
103
  ### Cross-Provider Profile Compatibility
90
104
 
91
105
  Agent profiles are defined independently of the provider runtime. A profile specifies behavioral traits -- system prompt, tool preferences, stop conditions -- that translate cleanly to any of the five runtimes. Switching the runtime dropdown on a task preserves the selected profile and its configuration.
@@ -6,7 +6,7 @@ route: "/settings"
6
6
  tags: ["settings", "configuration", "auth", "runtime", "browser-tools", "permissions", "budget", "ollama", "channels", "instance", "upgrade"]
7
7
  features: ["session-management", "tool-permission-persistence", "tool-permission-presets", "browser-use", "spend-budget-guardrails", "settings-interactive-controls", "ollama-runtime-provider", "multi-channel-delivery", "bidirectional-channel-chat", "database-snapshot-backup", "instance-bootstrap", "upgrade-detection", "upgrade-session", "instance-license-metering"]
8
8
  screengrabCount: 11
9
- lastUpdated: "2026-04-08"
9
+ lastUpdated: "2026-04-15"
10
10
  ---
11
11
 
12
12
  # Settings
@@ -187,7 +187,7 @@ When `STAGENT_DEV_MODE=true` is set in `.env.local` or the `.git/stagent-dev-mod
187
187
  An hourly scheduled poll runs `git fetch` against the upstream remote and compares `HEAD` to `origin/main`. When upstream is ahead, the sidebar shows a small **Upgrade available** badge next to Settings and the Instance card surfaces a "New version available" card with the number of commits behind. Detection is `git`-based rather than GitHub REST to avoid rate limits. Three consecutive poll failures escalate to a persistent notification.
188
188
 
189
189
  ### Upgrade Session
190
- Clicking **Start upgrade** opens the upgrade session as a right-side sheet — not a full-page navigation, so you can glance back at your workspace while the upgrade runs. The session is backed by a task row with the `upgrade-assistant` profile, so it reuses all the existing execution infrastructure: fire-and-forget launch, canUseTool approval caching, SSE log streaming, and conflict resolution via the pending-approval host. If merge conflicts occur, a 3-card cluster (Keep mine / Take theirs / Show diff) appears inline and you resolve them without leaving the sheet.
190
+ Clicking **Start upgrade** opens the upgrade session as a right-side sheet — not a full-page navigation, so you can glance back at your workspace while the upgrade runs. The session is backed by a task row with the `upgrade-assistant` profile, so it reuses all the existing execution infrastructure: fire-and-forget launch, canUseTool approval caching, SSE log streaming, and conflict resolution via the pending-approval host. If merge conflicts occur, a 3-card cluster (Keep mine / Take theirs / Show diff) appears inline and you resolve them without leaving the sheet. When the assistant needs a direct answer (e.g., to disambiguate a conflict), it now calls **AskUserQuestion**, which renders a typed reply field via the inbox's `QuestionReplyActions` branch — you answer in-place and the assistant resumes. The `upgrade-assistant` profile explicitly allowlists AskUserQuestion so it is not gated behind a generic permission prompt.
191
191
 
192
192
  ### Footer Upgrade Button
193
193
  A subtle **Upgrade** button appears in the sidebar footer once an upgrade is available — the same surface that shows trust tier and the command palette shortcut. Clicking it opens the same upgrade session sheet from any page without navigating to Settings first.
@@ -3,10 +3,10 @@ title: "Shared Components"
3
3
  category: "feature-reference"
4
4
  section: "shared-components"
5
5
  route: "cross-cutting"
6
- tags: [components, page-shell, detail-pane, status-chip, filter-bar, data-table, reusable]
7
- features: ["shared-component-library", "page-shell", "detail-pane", "status-chip", "filter-bar", "view-switcher"]
6
+ tags: [components, page-shell, detail-pane, status-chip, filter-bar, filter-input, data-table, reusable]
7
+ features: ["shared-component-library", "page-shell", "detail-pane", "status-chip", "filter-bar", "view-switcher", "chat-filter-namespace"]
8
8
  screengrabCount: 0
9
- lastUpdated: "2026-03-31"
9
+ lastUpdated: "2026-04-15"
10
10
  ---
11
11
 
12
12
  # Shared Components
@@ -31,6 +31,10 @@ Five status chip families that map to entity lifecycle states. Each chip renders
31
31
 
32
32
  Horizontal filter strip placed below page headers. Supports multiple filter types (select, search, date range) and displays an active filter count badge. Filters persist in URL search params for shareable filtered views.
33
33
 
34
+ ### FilterInput
35
+
36
+ Typed input used for namespace-aware filtering (`#scope:`, `#type:`, and similar qualifiers). Supports double-quoted values so phrases with spaces parse correctly — e.g. `#scope:"customer support"`. Used by Chat search, the `@` / `/` popovers, the `/documents` list page, and the `⌘K` palette, giving every surface the same filter syntax. Paired with the `cleanFilterInput()` helper, which strips mention-trigger residue (`@`, `#`, `/`) when a pinned saved search is reapplied.
37
+
34
38
  ### ViewSwitcher
35
39
 
36
40
  Toggle between saved view modes on a per-surface basis. Common modes include table view and grid/card view. The active view preference persists in local storage.
@@ -6,7 +6,7 @@ route: "/tables"
6
6
  tags: [tables, structured-data, spreadsheet, charts, triggers, templates, import, export, formulas]
7
7
  features: ["tables-data-layer", "tables-list-page", "tables-spreadsheet-editor", "tables-document-import", "tables-template-gallery", "tables-agent-integration", "tables-chat-queries", "tables-computed-columns", "tables-cross-joins", "tables-agent-charts", "tables-workflow-triggers", "tables-nl-creation", "tables-export", "tables-versioning", "bulk-row-enrichment"]
8
8
  screengrabCount: 8
9
- lastUpdated: "2026-04-08"
9
+ lastUpdated: "2026-04-15"
10
10
  ---
11
11
 
12
12
  # Tables
@@ -38,6 +38,8 @@ Tables is Stagent's structured data system -- a built-in spreadsheet-meets-datab
38
38
  ### Table and Grid Views
39
39
  Browse all your tables from the `/tables` list page. Toggle between a compact table view and a visual grid view. Use the filter bar to narrow by category or search by name. Click any table to open it.
40
40
 
41
+ The filter bar uses the shared **FilterInput** component and the `#namespace:value` syntax (double-quote values that contain spaces, e.g. `#type:"customer list"`). Saved filter + query combinations can be pinned as **saved searches** and recalled from the `⌘K` palette under the **Saved** group — useful for recurring table views like "open orders" or "stale leads." See the [Documents](./documents.md) page for a cross-surface reference implementation.
42
+
41
43
  ### Create Tables
42
44
  Open the create dialog to define a new table with a name, description, and columns. The inline column builder lets you set each column's name, type, and whether it is required -- all before the table is saved. Supported column types include text, number, date, boolean, select (dropdown), URL, email, and computed.
43
45
 
@@ -4,9 +4,9 @@ category: "feature-reference"
4
4
  section: "tool-permissions"
5
5
  route: "cross-cutting"
6
6
  tags: [permissions, trust, safety, approval, human-in-the-loop, presets]
7
- features: ["tool-permission-persistence", "tool-permission-presets", "ambient-approval-toast"]
7
+ features: ["tool-permission-persistence", "tool-permission-presets", "ambient-approval-toast", "upgrade-session"]
8
8
  screengrabCount: 1
9
- lastUpdated: "2026-03-31"
9
+ lastUpdated: "2026-04-15"
10
10
  ---
11
11
 
12
12
  # Tool Permissions
@@ -46,6 +46,10 @@ Before executing a task, the runtime performs a permission pre-check against the
46
46
 
47
47
  When a tool request exceeds the current trust tier and has not been persisted, a notification is created in the inbox. You can approve or deny from the Inbox or from the task detail view, keeping the agent paused until a decision is made.
48
48
 
49
+ ### AskUserQuestion Tool
50
+
51
+ A special tool — `AskUserQuestion` — lets agents ask you for direct input rather than request permission. Instead of an Approve / Deny pair, the inbox notification renders a typed reply box (the `QuestionReplyActions` branch of the permission response view). This is the primitive behind the upgrade assistant's conflict resolution flow: when the merge hits an ambiguous decision, the upgrade profile asks a targeted question and waits for your reply before proceeding. `AskUserQuestion` is never auto-approved and is explicitly allowlisted on the `upgrade-assistant` profile.
52
+
49
53
  ### Ambient Approval Toast
50
54
 
51
55
  For quick permission grants without navigating away from the current context, ambient toast notifications appear when an agent requests a tool. You can approve directly from the toast, maintaining workflow continuity.