lemma-sdk 0.2.34 → 0.2.36

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 (68) hide show
  1. package/README.md +112 -114
  2. package/dist/browser/lemma-client.js +176 -14
  3. package/dist/namespaces/integrations.d.ts +10 -2
  4. package/dist/namespaces/integrations.js +17 -2
  5. package/dist/openapi_client/index.d.ts +10 -2
  6. package/dist/openapi_client/index.js +1 -0
  7. package/dist/openapi_client/models/DatastoreDataType.d.ts +2 -0
  8. package/dist/openapi_client/models/DatastoreDataType.js +2 -0
  9. package/dist/openapi_client/models/FeedbackCategory.d.ts +7 -0
  10. package/dist/openapi_client/models/FeedbackCategory.js +12 -0
  11. package/dist/openapi_client/models/FlowRunEntity.d.ts +1 -0
  12. package/dist/openapi_client/models/IntegrationHelperAgentRequest.d.ts +13 -0
  13. package/dist/openapi_client/models/IntegrationHelperAgentResponse.d.ts +25 -0
  14. package/dist/openapi_client/models/OperationDetail.d.ts +3 -0
  15. package/dist/openapi_client/models/OperationDetailsBatchRequest.d.ts +9 -0
  16. package/dist/openapi_client/models/OperationDetailsBatchRequest.js +1 -0
  17. package/dist/openapi_client/models/OperationDetailsBatchResponse.d.ts +18 -0
  18. package/dist/openapi_client/models/OperationDetailsBatchResponse.js +1 -0
  19. package/dist/openapi_client/models/OperationDiscoverResponse.d.ts +26 -0
  20. package/dist/openapi_client/models/OperationDiscoverResponse.js +1 -0
  21. package/dist/openapi_client/models/OperationSummary.d.ts +3 -0
  22. package/dist/openapi_client/models/OrganizationCreateRequest.d.ts +2 -0
  23. package/dist/openapi_client/models/OrganizationInvitationRequest.d.ts +1 -0
  24. package/dist/openapi_client/models/OrganizationInvitationResponse.d.ts +3 -0
  25. package/dist/openapi_client/models/OrganizationMessageResponse.d.ts +1 -0
  26. package/dist/openapi_client/models/OrganizationResponse.d.ts +2 -0
  27. package/dist/openapi_client/models/OrganizationSlugAvailabilityResponse.d.ts +7 -0
  28. package/dist/openapi_client/models/OrganizationSlugAvailabilityResponse.js +1 -0
  29. package/dist/openapi_client/models/ReportFeedbackRequest.d.ts +30 -0
  30. package/dist/openapi_client/models/ReportFeedbackRequest.js +1 -0
  31. package/dist/openapi_client/models/ReportFeedbackResponse.d.ts +29 -0
  32. package/dist/openapi_client/models/ReportFeedbackResponse.js +1 -0
  33. package/dist/openapi_client/models/WorkflowInstallListResponse.d.ts +4 -0
  34. package/dist/openapi_client/models/WorkflowInstallListResponse.js +1 -0
  35. package/dist/openapi_client/services/AgentToolsService.d.ts +20 -0
  36. package/dist/openapi_client/services/AgentToolsService.js +36 -0
  37. package/dist/openapi_client/services/ApplicationsService.d.ts +10 -9
  38. package/dist/openapi_client/services/ApplicationsService.js +11 -10
  39. package/dist/openapi_client/services/IntegrationsService.d.ts +3 -2
  40. package/dist/openapi_client/services/IntegrationsService.js +4 -2
  41. package/dist/openapi_client/services/OrganizationsService.d.ts +18 -0
  42. package/dist/openapi_client/services/OrganizationsService.js +40 -0
  43. package/dist/openapi_client/services/WorkflowsService.d.ts +10 -0
  44. package/dist/openapi_client/services/WorkflowsService.js +21 -0
  45. package/dist/react/index.d.ts +14 -0
  46. package/dist/react/index.js +7 -0
  47. package/dist/react/sql-utils.d.ts +8 -0
  48. package/dist/react/sql-utils.js +62 -0
  49. package/dist/react/useCreateFolder.d.ts +22 -0
  50. package/dist/react/useCreateFolder.js +47 -0
  51. package/dist/react/useDatastoreQuery.d.ts +22 -0
  52. package/dist/react/useDatastoreQuery.js +67 -0
  53. package/dist/react/useDeleteFile.d.ts +19 -0
  54. package/dist/react/useDeleteFile.js +51 -0
  55. package/dist/react/useGlobalSearch.d.ts +62 -0
  56. package/dist/react/useGlobalSearch.js +170 -0
  57. package/dist/react/useRecordAggregates.d.ts +35 -0
  58. package/dist/react/useRecordAggregates.js +126 -0
  59. package/dist/react/useTaskSession.js +3 -2
  60. package/dist/react/useUpdateFile.d.ts +29 -0
  61. package/dist/react/useUpdateFile.js +51 -0
  62. package/dist/react/useUploadFile.d.ts +24 -0
  63. package/dist/react/useUploadFile.js +46 -0
  64. package/package.json +1 -1
  65. package/dist/openapi_client/models/AppDescriptorResponse.d.ts +0 -5
  66. package/dist/openapi_client/models/OperationListResponse.d.ts +0 -6
  67. /package/dist/openapi_client/models/{AppDescriptorResponse.js → IntegrationHelperAgentRequest.js} +0 -0
  68. /package/dist/openapi_client/models/{OperationListResponse.js → IntegrationHelperAgentResponse.js} +0 -0
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Lemma TypeScript SDK
2
2
 
3
- `lemma-sdk` is the headless TypeScript SDK for Lemma. Use `lemma-sdk` for the core client, `lemma-sdk/react` for hooks and auth primitives, and the Lemma shadcn registry for stock UI blocks.
3
+ `lemma-sdk` is the headless TypeScript SDK for Lemma. Use `lemma-sdk` for the core client and shared helpers, and use `lemma-sdk/react` as the main app-building surface for hooks and auth primitives.
4
4
 
5
- `AuthGuard` intentionally stays in `lemma-sdk/react`. Stock assistant, table, workflow, agent, member, and function UI lives in the registry.
5
+ `AuthGuard` intentionally stays in `lemma-sdk/react`. The product direction remains hooks-first and shell-agnostic, and the registry ships stock Lemma UI blocks when you want installable assistant, records, file, workflow, collaboration, or shell surfaces.
6
6
 
7
7
  ## Install
8
8
 
@@ -10,7 +10,7 @@
10
10
  npm install lemma-sdk
11
11
  ```
12
12
 
13
- If your app uses shadcn/ui, configure the Lemma registry with:
13
+ If your app wants stock Lemma UI installs, configure the registry with:
14
14
 
15
15
  ```bash
16
16
  npx lemma-sdk init-shadcn
@@ -74,10 +74,10 @@ import {
74
74
  | Area | Hooks | Stability | Use when |
75
75
  | --- | --- | --- | --- |
76
76
  | Auth | `AuthGuard`, `useAuth`, `useCurrentUser`, `usePodAccess` | Stable | Gate an app, read signed-in user state, or request pod access. |
77
- | Tables | `useTables`, `useTable`, `useRecords`, `useRecord`, `useJoinedRecords`, `useRelatedRecords`, `useReverseRelatedRecords`, `useReferencingRecords` | Stable | Build custom table browsers, details views, related-record views, and relational reads. |
77
+ | Tables | `useTables`, `useTable`, `useRecords`, `useRecord`, `useJoinedRecords`, `useRelatedRecords`, `useReverseRelatedRecords`, `useReferencingRecords`, `useDatastoreQuery`, `useRecordAggregates` | Stable | Build custom table browsers, details views, related-record views, raw SQL-backed reads, and chart/KPI queries. |
78
78
  | Record mutations | `useCreateRecord`, `useUpdateRecord`, `useDeleteRecord`, `useBulkRecords` | Stable | Create, update, delete, or bulk-delete rows from headless UI. Function-backed mutations via `createVia`/`updateVia` options. |
79
79
  | Record forms | `useRecordSchema`, `useRecordForm`, `useForeignKeyOptions`, `useSchemaForm` | Stable | Render schema-driven record forms, enum fields, and foreign-key selectors. `useRecordForm` is the canonical table-bound form hook; `useSchemaForm` remains available for raw JSON-schema flows. |
80
- | Files | `useFiles`, `useFile`, `useFileSearch`, `useFileTree`, `useFilePreview` | Stable | Browse datastore folders, resolve file metadata, search indexed files, load directory trees, and preview converted or raw file content. |
80
+ | Files | `useFiles`, `useFile`, `useUploadFile`, `useUpdateFile`, `useDeleteFile`, `useCreateFolder`, `useFileSearch`, `useFileTree`, `useFilePreview`, `useGlobalSearch` | Stable | Browse datastore folders, mutate file state, search indexed files, load directory trees, preview content, and compose multi-source desk search. |
81
81
  | Assistant | `useConversations`, `useConversation`, `useConversationMessages`, `useAssistantRun`, `useAssistantSession`, `useAssistantRuntime`, `useAssistantController` | Stable except controller/runtime | Build custom chat, conversation lists, streaming output, and final-output views. |
82
82
  | Agents | `useAgentRun`, `useAgentRuns`, `useAgentInputSchema`, `useTaskSession` | Stable except raw session | Start agent tasks, submit follow-up input, read task history, and inspect input/output schemas. |
83
83
  | Workflows | `useWorkflowStart`, `useWorkflowRun`, `useWorkflowRuns`, `useWorkflowResume` | Stable | Start, poll, resume, cancel, retry, and inspect workflow runs. |
@@ -85,6 +85,13 @@ import {
85
85
  | Functions | `useFunctionRun`, `useFunctionRuns`, `useFunctionSession` | Stable except raw session | Run functions, poll function runs, and list function history. |
86
86
  | Members and org | `useMembers`, `useAddPodMember`, `useUpdatePodMemberRole`, `useRemovePodMember`, `useOrganizationMembers` | Stable | Read pod and organization members, add existing org members into a pod, update pod roles, and remove pod access. The current checked-in client does not yet expose direct email-to-pod invites. |
87
87
 
88
+ ### Headless Helpers
89
+
90
+ Alongside hooks, `lemma-sdk` exports shared headless helpers for common desk logic:
91
+
92
+ - record display helpers: `formatRecordDisplayValue`, `humanizeRecordFieldName`, `detectRecordStatusColumn`
93
+ - form/schema helpers: `buildRecordSchemaFields`, `buildSchemaFormFields`
94
+
88
95
  ### Common Hook Shapes
89
96
 
90
97
  For business-facing examples and a decision guide mapping "I want to..." to the right hook, see [docs/hooks-guide.md](docs/hooks-guide.md).
@@ -209,9 +216,9 @@ function WorkflowButton({ client }: { client: LemmaClient }) {
209
216
  }
210
217
  ```
211
218
 
212
- ## Shadcn Registry
219
+ ## Registry
213
220
 
214
- Lemma UI lives in the registry, not in `lemma-sdk/react`.
221
+ The registry is optional UI scaffolding for teams that want stock Lemma blocks on top of the headless SDK.
215
222
 
216
223
  After running `npx lemma-sdk init-shadcn`, install blocks like:
217
224
 
@@ -221,32 +228,21 @@ npx shadcn@latest add @lemma/lemma-detail-panel
221
228
  npx shadcn@latest add @lemma/lemma-record-form
222
229
  npx shadcn@latest add @lemma/lemma-global-search
223
230
  npx shadcn@latest add @lemma/lemma-file-browser
224
- npx shadcn@latest add @lemma/lemma-file-viewer
225
231
  npx shadcn@latest add @lemma/lemma-document-workspace
226
- npx shadcn@latest add @lemma/lemma-document-creator
227
- npx shadcn@latest add @lemma/lemma-document-viewer
228
- npx shadcn@latest add @lemma/lemma-document-editor
229
- npx shadcn@latest add @lemma/lemma-members
230
232
  npx shadcn@latest add @lemma/lemma-comments
231
- npx shadcn@latest add @lemma/lemma-insights
232
233
  npx shadcn@latest add @lemma/lemma-assistant-experience
233
234
  ```
234
235
 
235
- Those commands are representative. The registry currently ships 22 canonical blocks.
236
-
237
- Current registry items:
236
+ The registry currently ships 19 canonical blocks:
238
237
 
239
238
  | Area | Items |
240
239
  | --- | --- |
241
- | Assistant | `lemma-assistant-experience` |
242
- | Navigation | `lemma-breadcrumbs`, `lemma-global-search`, `lemma-page-tree` |
243
- | Records | `lemma-records-view`, `lemma-detail-panel`, `lemma-record-form`, `lemma-status-flow` |
244
- | Files | `lemma-file-browser`, `lemma-file-viewer` |
245
- | Documents | `lemma-document-workspace`, `lemma-document-creator`, `lemma-document-viewer`, `lemma-document-editor`, `lemma-markdown-editor` |
246
- | People | `lemma-members`, `lemma-notification-bell`, `lemma-user-menu` |
247
- | Analytics | `lemma-insights` |
248
- | Collaboration | `lemma-activity-feed`, `lemma-comments` |
249
- | Automation | `lemma-workflow-runner` |
240
+ | Core operator blocks | `lemma-records-view`, `lemma-detail-panel`, `lemma-record-form`, `lemma-status-flow` |
241
+ | Search, files, and pages | `lemma-global-search`, `lemma-breadcrumbs`, `lemma-file-browser`, `lemma-markdown-editor`, `lemma-page-tree`, `lemma-document-workspace` |
242
+ | Collaboration and analytics | `lemma-comments`, `lemma-activity-feed`, `lemma-insights`, `lemma-action-surface`, `lemma-workflow-runner` |
243
+ | Assistant and shell | `lemma-assistant-experience`, `lemma-members`, `lemma-notification-bell`, `lemma-user-menu` |
244
+
245
+ Registry blocks now install against a shared `lemma-ui` primitive layer that ships with this registry. Consumers no longer need a pre-existing app-local `@/components/ui/*` shadcn tree just to use Lemma blocks.
250
246
 
251
247
  The registry is currently served from jsDelivr against this public repo:
252
248
 
@@ -261,54 +257,44 @@ Blocks that install a CSS file, such as records view, should be imported by your
261
257
  @import "@/styles/lemma-records-view.css";
262
258
  ```
263
259
 
264
- ### Records Workspace Customization
265
-
266
- The records blocks are meant to be configured with props before you reach for a fork.
267
-
268
- `lemma-records-view` supports:
269
-
270
- - `preset="triage" | "issues" | "crm" | "docs"` for opinionated defaults without installing duplicate workflow blocks
271
- - `defaultView` and `availableViews` across `grid`, `list`, `grouped`, `kanban`, `linear`, `calendar`, `timeline`, and `matrix`
272
- - `tableName`, `visibleColumns`, and `hiddenFields` for schema-aware display
273
- - `pinnedColumns`, `columnWidths`, `columnLabels`, `primaryField`, `defaultSort`, and `paginationMode` for stronger operator-table defaults
274
- - `groupBy`, `calendarField`, `timelineField`, `matrixRowsBy`, and `matrixColumnsBy` for consolidated view configuration
275
- - `renderCell` and `renderCard` for custom record rendering
276
- - `foreignKeyLabels` for human-readable FK values in cards, detail views, and create/edit forms
277
- - `detailTabs`, `detailFieldGroups`, `detailRelatedRecords`, `detailSectionLabels`, and `detailSectionVisibility` for canonical detail composition
278
- - `quickActions`, `bulkActions`, `detailActions`, `quickActionMode`, and `onQuickActionSuccess` for direct, function, or workflow-backed actions
279
- - `onCreateOptions` and `onUpdateOptions` for function-backed mutations, including conditional field and section visibility in the create sheet
280
- - `createMode="sheet" | "modal" | "page"` and `detailMode="sheet" | "modal" | "page" | "inline"` for app-specific interaction patterns
281
- - `headerActions`, `emptyState`, `onRecordClick`, `renderFilesTab`, `renderCommentsTab`, and `renderActivityTab` for app-specific extensions
282
- - `appearance="default" | "minimal" | "borderless" | "contained"` and `density="compact" | "comfortable" | "spacious"` for host-level block chrome; `minimal` is the cardless mode
283
-
284
- `lemma-detail-panel` supports:
285
-
286
- - standalone record detail rendering outside the full records workspace, using the same canonical detail internals as `lemma-records-view`
287
- - `mode`, `variant`, and `layout` controls for embedded, sheet, modal, or full-page use
288
- - built-in detail tabs plus custom `tabs`, `relatedRecords`, and `renderFiles` / `renderComments` / `renderActivity` sections
289
- - direct, function-backed, and workflow-aware `actions`, plus `updateVia` / `updateFunctionName` for inline edits
290
- - shared `appearance`, `density`, and `radius` controls for use in inline, sheet, modal, or page layouts
291
-
292
- `lemma-record-form` supports:
293
-
294
- - `mode="inline" | "modal" | "sheet"`
295
- - `submitVia="direct" | "function"` and `submitFunctionName`
296
- - `submitFunctionInput` when the backing function expects a different payload shape
297
- - `hiddenFields`, `visibleFields`, `fieldOrder`, and `fieldGroups`
298
- - searchable FK inputs through the shared `record-form-fields` control layer
299
- - `fieldVisibility` and `sectionVisibility` for conditional forms
300
- - `foreignKeyLabels` for FK select labels
301
- - `initialValues`, `onSuccess`, and `onClose`
302
- - `appearance`, `density`, and `radius` using the same values as `lemma-records-view`
303
-
304
- `lemma-insights` supports:
305
-
306
- - table-backed count, sum, average, and grouped chart cards
307
- - bar, line, area, pie, and funnel charts with count/sum/avg aggregation
308
- - `aggregationMode="client" | "function"` with optional `aggregateFunctionName` for shared server-side aggregation
309
- - chart descriptions, value/category formatters, limits, sorting, empty states, and optional footers
310
- - function-backed stats and charts
311
- - shared `appearance`, `density`, `radius`, and card-column controls
260
+ Core registry blocks:
261
+
262
+ - `lemma-records-view` for a lean records browser by default, with explicit workspace presets for grid, list, grouped, kanban, and linear operator flows
263
+ - `lemma-detail-panel` for standalone record detail rendering with shared records-detail internals
264
+ - `lemma-record-form` for schema-aware create and edit flows with searchable foreign-key controls
265
+ - `lemma-status-flow` for interactive status transitions and lifecycle display
266
+ - `lemma-global-search` for a stock command-bar style omnibox
267
+ - `lemma-file-browser` and `lemma-document-workspace` for file browsing, editing, preview, and document-native workflows
268
+ - `lemma-comments`, `lemma-activity-feed`, and `lemma-insights` for collaboration and reporting
269
+ - `lemma-action-surface` and `lemma-workflow-runner` for long-running actions and workflow history
270
+ - `lemma-assistant-experience`, `lemma-members`, `lemma-notification-bell`, and `lemma-user-menu` for assistant and shell surfaces
271
+
272
+ ### Block Defaults
273
+
274
+ The registry now treats generic blocks as read-first and low-chrome by default.
275
+
276
+ - base blocks should render useful data without assuming a full workspace shell
277
+ - presets are the place for opinionated operator UX such as inline detail, multi-view boards, and heavier toolbars
278
+ - `appearance`, `density`, and `radius` remain available as local override props on major blocks, but they are optional; prefer setting visual defaults in your app shell or wrapper components instead of passing them everywhere
279
+
280
+ `lemma-records-view` now defaults to:
281
+
282
+ - one explicit view instead of an inferred multi-view workspace
283
+ - no search bar unless you opt in through `chrome.search` or pass search config
284
+ - no filter launcher unless you opt in through `chrome.filters` or provide default filters
285
+ - no create button unless you opt in through `chrome.create` or pass create config
286
+ - no row-selection chrome unless you opt in through `chrome.selection` or provide bulk actions
287
+ - `detailMode="sheet"` for the base block, with inline detail reserved for explicit presets or explicit props
288
+ - no schema-name heuristics that silently promote a table into `kanban` or `linear`
289
+
290
+ For records workspaces, the split is:
291
+
292
+ - use the base block for simple table/list browsing
293
+ - pass `availableViews` only when you want a view switcher
294
+ - pass `chrome={{ search: true, filters: true, create: true, viewSwitcher: true, selection: true }}` when you want workspace controls on the base block
295
+ - use `preset="triage" | "issues" | "crm" | "docs"` when you want a stock operator workspace
296
+
297
+ `lemma-members` now defaults to a read-only membership list. Add management behavior explicitly with `allowAdd`, `allowRoleEdit`, and `allowRemove`.
312
298
 
313
299
  `lemma-global-search` supports:
314
300
 
@@ -318,80 +304,81 @@ The records blocks are meant to be configured with props before you reach for a
318
304
  - `minQueryLength`, `debounceMs`, `appearance`, `density`, trigger label, and placeholder customization
319
305
  - assistant handoff by `assistantName`, with optional query/results message shaping and conversation routing
320
306
 
321
- Navigation blocks support:
322
-
323
- - route, record, and file-path breadcrumb builders through `lemma-breadcrumbs`
324
- - self-referential page hierarchies through `lemma-page-tree`, with selection, expansion, and create/reorder hooks
325
-
326
- File blocks support:
327
-
328
- - datastore folder navigation and path breadcrumbs through `lemma-file-browser`
329
- - pod-level file browsing and search, not only record-linked attachments
330
- - upload, download, search, rename, move, folder creation, picker mode, and composition-friendly link actions
331
- - selection-aware file browsing so `lemma-file-browser` can drive a paired workspace preview
332
- - image, PDF, text, markdown, converted HTML, metadata, and breadcrumb-aware previews through `lemma-file-viewer`
333
-
334
307
  Document blocks support:
335
308
 
336
- - Notion/Coda-style block documents through `lemma-document-workspace`, with Tiptap JSON content, page/modal modes, title and summary chrome, file/reference/assistant blocks, save state, metadata, backlinks, and assistant-context rails
337
- - docstore-native creation through `lemma-document-workspace` or the simpler `lemma-document-creator`, with folder targeting, title/summary setup, pod-file metadata, and `mode="page" | "modal"`
338
- - long-form reading surfaces through `lemma-document-workspace` or `lemma-document-viewer`, with full-page and modal presentation, metadata, backlinks, references, and assistant-context rails
339
- - long-form authoring through `lemma-document-workspace` or `lemma-document-editor`, with full-page and modal presentation, title/summary chrome, save-state affordances, outline, references, and assistant-context rails
340
- - a clean separation between richer document UX and the lower-level pod file workspace, while keeping pod files as the primary document store and avoiding embedded-first document editing
309
+ - Notion/Coda-style block documents through `lemma-document-workspace`, with ProseKit JSON content, page/modal modes, title and summary chrome, file/reference/assistant blocks, save state, metadata, backlinks, and assistant-context rails
310
+ - pod-file-native creation, reading, editing, and preview through one workspace, with folder targeting, title/summary setup, pod-file metadata, and `mode="page" | "modal"`
311
+ - non-document file previews through the same workspace, including image, PDF, text, markdown, converted HTML, and download fallback behavior
312
+ - records and attachments should pass pod file paths into `lemma-document-workspace`; records should not own document bodies directly
341
313
 
342
314
  People blocks support:
343
315
 
344
316
  - `LemmaMemberChip`, `LemmaAvatarGroup`, `LemmaMemberSelect`, and `LemmaUserField`
345
- - a stock `LemmaMembers` admin workspace for pod membership, role changes, removal, and add-from-organization flows via `organizationId`, `allowAdd`, `allowRoleEdit`, and `allowRemove`
317
+ - a stock `LemmaMembers` surface that is read-only by default, and upgrades into a membership admin workspace only when `allowAdd`, `allowRoleEdit`, or `allowRemove` are enabled
346
318
  - pod member labels for owner, creator, assignee, participant, and author fields
347
319
  - searchable member picking backed by `useMembers`
348
320
 
349
321
  Workflow primitives support:
350
322
 
351
323
  - lifecycle/status rendering and transitions through `lemma-status-flow`
352
- - read-only tracker layouts and compact step progress through `lemma-status-flow`
353
- - workflow run inspection through `lemma-workflow-runner`
354
- - reusable history and collaboration surfaces through `lemma-activity-feed` and `lemma-comments`
355
- - table-backed defaults with escape hatches for custom action payloads and render slots
324
+ - direct, function-backed, workflow-backed, and agent-backed launches through `lemma-action-surface`
325
+ - inline, row, and panel presentation modes for long-running actions with inspectable progress
326
+ - native workflow run inspection through `lemma-workflow-runner`
327
+
328
+ Navigation and file blocks support:
329
+
330
+ - route, record, and file-path breadcrumb builders through `lemma-breadcrumbs`
331
+ - native pod-file hierarchy navigation through `lemma-page-tree`
332
+ - datastore folder navigation, upload, rename, move, folder creation, picker mode, and delete handling through `lemma-file-browser`
333
+ - write, preview, and split modes through `lemma-markdown-editor`
356
334
 
357
- `lemma-markdown-editor` supports:
335
+ Collaboration and analytics blocks support:
358
336
 
359
- - write, preview, and split modes
360
- - controlled and uncontrolled values
361
- - GitHub-flavored markdown preview via `react-markdown` and `remark-gfm`
362
- - a lightweight interim editing lane for plain markdown notes beside the richer block-native `lemma-document-workspace`
337
+ - record-scoped discussion through `lemma-comments`
338
+ - unified audit and history timelines through `lemma-activity-feed`
339
+ - dashboard-style stat cards and charts through `lemma-insights`
363
340
 
364
341
  Assistant blocks support:
365
342
 
366
343
  - assistant-name-first configuration through `assistantName`
367
344
  - shared `appearance` and `density` controls on the assistant experience surface
368
345
  - `chromeStyle`, `statusPlacement`, `radius`, model picker, conversation list, and render overrides for deeper customization
369
-
370
- Shell blocks support:
371
-
372
- - `lemma-notification-bell` for unread counts, popover inboxes, and mark-as-read flows
373
- - `lemma-user-menu` for current-user presentation, custom menu actions, and sign-out affordances
346
+ - bounded default heights for `page` and `side-panel` modes so the message viewport scrolls instead of stretching with content; pass `className="h-full min-h-0"` inside an explicit-height parent when you want a fill-layout assistant like inbox CRM
374
347
 
375
348
  ```tsx
376
349
  import { LemmaRecordsView } from "@/components/lemma/lemma-records-view";
350
+ import { LemmaAssistantExperience } from "@/components/lemma/assistant/assistant-experience";
351
+ import { LemmaActionSurface } from "@/components/lemma/lemma-action-surface";
377
352
  import { LemmaGlobalSearch } from "@/components/lemma/lemma-global-search";
378
353
 
354
+ <LemmaRecordsView
355
+ client={client}
356
+ podId={podId}
357
+ tableName="tickets"
358
+ />;
359
+
379
360
  <LemmaRecordsView
380
361
  client={client}
381
362
  podId={podId}
382
363
  tableName="deals"
383
- preset="crm"
364
+ defaultView="list"
365
+ availableViews={["list", "grid"]}
366
+ chrome={{ search: true, filters: true, create: true, viewSwitcher: true, selection: true }}
384
367
  hiddenFields={["id", "created_at", "updated_at"]}
385
368
  foreignKeyLabels={{ company_id: "name" }}
386
- appearance="minimal"
387
- density="compact"
388
- createMode="sheet"
389
369
  onCreateOptions={{
390
370
  submitVia: "function",
391
371
  submitFunctionName: "create-deal",
392
372
  }}
393
373
  />;
394
374
 
375
+ <LemmaRecordsView
376
+ client={client}
377
+ podId={podId}
378
+ tableName="deals"
379
+ preset="crm"
380
+ />;
381
+
395
382
  <LemmaGlobalSearch
396
383
  client={client}
397
384
  podId={podId}
@@ -413,8 +400,19 @@ import { LemmaGlobalSearch } from "@/components/lemma/lemma-global-search";
413
400
  }}
414
401
  minQueryLength={3}
415
402
  debounceMs={450}
416
- appearance="minimal"
417
- density="compact"
403
+ />;
404
+
405
+ <LemmaActionSurface
406
+ client={client}
407
+ podId={podId}
408
+ label="Run triage"
409
+ kind="workflow"
410
+ workflowName="triage-lead"
411
+ />;
412
+
413
+ <LemmaAssistantExperience
414
+ client={client}
415
+ assistantName="sales-copilot"
418
416
  />;
419
417
  ```
420
418
 
@@ -455,14 +453,14 @@ npm run build
455
453
  npm run registry:build
456
454
  ```
457
455
 
458
- To build the canonical example desk:
456
+ To build the single local sandbox app:
459
457
 
460
458
  ```bash
461
459
  cd examples/inbox-crm
462
460
  npm run build
463
461
  ```
464
462
 
465
- `examples/inbox-crm` now mirrors the kept registry surface only. Its local `src/components/lemma` folder is a copied install target of the current canonical registry blocks, and `src/main.tsx` demonstrates those blocks in one routed operator desk.
463
+ `examples/inbox-crm` is the only kept example app in this repo. It is a local sandbox for visualizing the current direction, not a promise that every copied component inside it is a published registry block.
466
464
 
467
465
  This repo includes:
468
466
 
@@ -2675,19 +2675,27 @@ exports.IconsService = IconsService;
2675
2675
  "use strict";
2676
2676
  Object.defineProperty(exports, "__esModule", { value: true });
2677
2677
  exports.IntegrationsNamespace = void 0;
2678
+ const AgentToolsService_js_1 = require("./openapi_client/services/AgentToolsService.js");
2678
2679
  const ApplicationsService_js_1 = require("./openapi_client/services/ApplicationsService.js");
2679
2680
  const IntegrationsService_js_1 = require("./openapi_client/services/IntegrationsService.js");
2680
2681
  class IntegrationsNamespace {
2681
2682
  constructor(client) {
2682
2683
  this.client = client;
2683
2684
  this.operations = {
2684
- list: (applicationId) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationOperationList(applicationId)),
2685
+ discover: (applicationId, options = {}) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationOperationDiscover(applicationId, options.query, options.limit ?? 100)),
2686
+ list: async (applicationId, options = {}) => {
2687
+ const response = await this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationOperationDiscover(applicationId, options.query, options.limit ?? 100));
2688
+ return response.items ?? [];
2689
+ },
2685
2690
  get: (applicationId, operationName) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationOperationDetail(applicationId, operationName)),
2691
+ details: (applicationId, operationNames) => {
2692
+ const body = { operation_names: operationNames };
2693
+ return this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationOperationDetailsBatch(applicationId, body));
2694
+ },
2686
2695
  execute: (applicationId, operationName, payload, accountId) => {
2687
2696
  const body = { payload, account_id: accountId };
2688
2697
  return this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationOperationExecute(applicationId, operationName, body));
2689
2698
  },
2690
- descriptor: (applicationId) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationDescriptor(applicationId)),
2691
2699
  };
2692
2700
  this.triggers = {
2693
2701
  list: (options = {}) => this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationTriggerList(options.applicationId, options.search, options.limit ?? 100, options.pageToken)),
@@ -2706,6 +2714,13 @@ class IntegrationsNamespace {
2706
2714
  get(applicationId) {
2707
2715
  return this.client.request(() => ApplicationsService_js_1.ApplicationsService.applicationGet(applicationId));
2708
2716
  }
2717
+ helperAgent(goal, appNames) {
2718
+ const body = {
2719
+ app_names: appNames,
2720
+ goal,
2721
+ };
2722
+ return this.client.request(() => AgentToolsService_js_1.AgentToolsService.toolIntegrationHelperAgent(body));
2723
+ }
2709
2724
  createConnectRequest(applicationId) {
2710
2725
  const payload = { application_id: applicationId };
2711
2726
  return this.client.request(() => IntegrationsService_js_1.IntegrationsService.integrationConnectRequestCreate(payload));
@@ -2713,6 +2728,89 @@ class IntegrationsNamespace {
2713
2728
  }
2714
2729
  exports.IntegrationsNamespace = IntegrationsNamespace;
2715
2730
 
2731
+ },
2732
+ "./openapi_client/services/AgentToolsService.js": function (module, exports, require) {
2733
+ "use strict";
2734
+ Object.defineProperty(exports, "__esModule", { value: true });
2735
+ exports.AgentToolsService = void 0;
2736
+ const OpenAPI_js_1 = require("./openapi_client/core/OpenAPI.js");
2737
+ const request_js_1 = require("./openapi_client/core/request.js");
2738
+ class AgentToolsService {
2739
+ /**
2740
+ * Integration Helper Agent
2741
+ * Plan how to use one or more integration applications for a goal and return recommended operations.
2742
+ * @param requestBody
2743
+ * @returns IntegrationHelperAgentResponse Successful Response
2744
+ * @throws ApiError
2745
+ */
2746
+ static toolIntegrationHelperAgent(requestBody) {
2747
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2748
+ method: 'POST',
2749
+ url: '/tools/integration-helper-agent',
2750
+ body: requestBody,
2751
+ mediaType: 'application/json',
2752
+ errors: {
2753
+ 422: `Validation Error`,
2754
+ },
2755
+ });
2756
+ }
2757
+ /**
2758
+ * Report Feedback
2759
+ * Record a maintainer-facing feedback report about system issues, skill issues, incorrect knowledge, or other unexpected behavior.
2760
+ * @param requestBody
2761
+ * @returns ReportFeedbackResponse Successful Response
2762
+ * @throws ApiError
2763
+ */
2764
+ static toolReportFeedback(requestBody) {
2765
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2766
+ method: 'POST',
2767
+ url: '/tools/report-feedback',
2768
+ body: requestBody,
2769
+ mediaType: 'application/json',
2770
+ errors: {
2771
+ 422: `Validation Error`,
2772
+ },
2773
+ });
2774
+ }
2775
+ /**
2776
+ * Web Search
2777
+ * Run a raw web search and return structured results.
2778
+ * @param requestBody
2779
+ * @returns WebSearchResponse Successful Response
2780
+ * @throws ApiError
2781
+ */
2782
+ static toolWebSearch(requestBody) {
2783
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2784
+ method: 'POST',
2785
+ url: '/tools/web-search',
2786
+ body: requestBody,
2787
+ mediaType: 'application/json',
2788
+ errors: {
2789
+ 422: `Validation Error`,
2790
+ },
2791
+ });
2792
+ }
2793
+ /**
2794
+ * Web Search Agent
2795
+ * Run the multi-step web search agent and return a synthesized answer.
2796
+ * @param requestBody
2797
+ * @returns WebSearchAgentResponse Successful Response
2798
+ * @throws ApiError
2799
+ */
2800
+ static toolWebSearchAgent(requestBody) {
2801
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2802
+ method: 'POST',
2803
+ url: '/tools/web-search-agent',
2804
+ body: requestBody,
2805
+ mediaType: 'application/json',
2806
+ errors: {
2807
+ 422: `Validation Error`,
2808
+ },
2809
+ });
2810
+ }
2811
+ }
2812
+ exports.AgentToolsService = AgentToolsService;
2813
+
2716
2814
  },
2717
2815
  "./openapi_client/services/ApplicationsService.js": function (module, exports, require) {
2718
2816
  "use strict";
@@ -2806,15 +2904,14 @@ class ApplicationsService {
2806
2904
  });
2807
2905
  }
2808
2906
  /**
2809
- * List Application Operations
2907
+ * Discover Application Operations
2810
2908
  * @param applicationId
2811
2909
  * @param query
2812
2910
  * @param limit
2813
- * @param pageToken
2814
- * @returns OperationListResponse Successful Response
2911
+ * @returns OperationDiscoverResponse Successful Response
2815
2912
  * @throws ApiError
2816
2913
  */
2817
- static applicationOperationList(applicationId, query, limit = 100, pageToken) {
2914
+ static applicationOperationDiscover(applicationId, query, limit = 100) {
2818
2915
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2819
2916
  method: 'GET',
2820
2917
  url: '/integrations/applications/{application_id}/operations',
@@ -2824,7 +2921,6 @@ class ApplicationsService {
2824
2921
  query: {
2825
2922
  'query': query,
2826
2923
  'limit': limit,
2827
- 'page_token': pageToken,
2828
2924
  },
2829
2925
  errors: {
2830
2926
  422: `Validation Error`,
@@ -2832,18 +2928,21 @@ class ApplicationsService {
2832
2928
  });
2833
2929
  }
2834
2930
  /**
2835
- * Get Application Descriptor
2931
+ * Get Application Operation Details In Batch
2836
2932
  * @param applicationId
2837
- * @returns AppDescriptorResponse Successful Response
2933
+ * @param requestBody
2934
+ * @returns OperationDetailsBatchResponse Successful Response
2838
2935
  * @throws ApiError
2839
2936
  */
2840
- static applicationDescriptor(applicationId) {
2937
+ static applicationOperationDetailsBatch(applicationId, requestBody) {
2841
2938
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
2842
- method: 'GET',
2843
- url: '/integrations/applications/{application_id}/operations/descriptor',
2939
+ method: 'POST',
2940
+ url: '/integrations/applications/{application_id}/operations/details',
2844
2941
  path: {
2845
2942
  'application_id': applicationId,
2846
2943
  },
2944
+ body: requestBody,
2945
+ mediaType: 'application/json',
2847
2946
  errors: {
2848
2947
  422: `Validation Error`,
2849
2948
  },
@@ -3005,15 +3104,17 @@ class IntegrationsService {
3005
3104
  * OAuth Callback
3006
3105
  * Handle OAuth callback and complete account connection. This endpoint is public and uses state parameter for security.
3007
3106
  * @param error
3008
- * @returns AccountResponseSchema Successful Response
3107
+ * @param format
3108
+ * @returns string Successful Response
3009
3109
  * @throws ApiError
3010
3110
  */
3011
- static integrationOauthCallback(error) {
3111
+ static integrationOauthCallback(error, format) {
3012
3112
  return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3013
3113
  method: 'GET',
3014
3114
  url: '/integrations/connect-requests/oauth/callback',
3015
3115
  query: {
3016
3116
  'error': error,
3117
+ 'format': format,
3017
3118
  },
3018
3119
  errors: {
3019
3120
  422: `Validation Error`,
@@ -3207,6 +3308,46 @@ class OrganizationsService {
3207
3308
  },
3208
3309
  });
3209
3310
  }
3311
+ /**
3312
+ * Check Organization Slug Availability
3313
+ * Check whether an organization slug is available
3314
+ * @param slug
3315
+ * @returns OrganizationSlugAvailabilityResponse Successful Response
3316
+ * @throws ApiError
3317
+ */
3318
+ static orgSlugAvailability(slug) {
3319
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3320
+ method: 'GET',
3321
+ url: '/organizations/slug-availability',
3322
+ query: {
3323
+ 'slug': slug,
3324
+ },
3325
+ errors: {
3326
+ 422: `Validation Error`,
3327
+ },
3328
+ });
3329
+ }
3330
+ /**
3331
+ * Get Suggested Organizations
3332
+ * Get auto-join organizations matching the current user's email domain
3333
+ * @param limit
3334
+ * @param pageToken
3335
+ * @returns OrganizationListResponse Successful Response
3336
+ * @throws ApiError
3337
+ */
3338
+ static orgSuggested(limit = 100, pageToken) {
3339
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
3340
+ method: 'GET',
3341
+ url: '/organizations/suggested',
3342
+ query: {
3343
+ 'limit': limit,
3344
+ 'page_token': pageToken,
3345
+ },
3346
+ errors: {
3347
+ 422: `Validation Error`,
3348
+ },
3349
+ });
3350
+ }
3210
3351
  /**
3211
3352
  * Get Organization
3212
3353
  * Get organization details
@@ -5091,6 +5232,27 @@ class WorkflowsService {
5091
5232
  },
5092
5233
  });
5093
5234
  }
5235
+ /**
5236
+ * List Workflow Installs
5237
+ * List the current user's installations for a workflow.
5238
+ * @param podId
5239
+ * @param workflowName
5240
+ * @returns WorkflowInstallListResponse Successful Response
5241
+ * @throws ApiError
5242
+ */
5243
+ static workflowInstallList(podId, workflowName) {
5244
+ return (0, request_js_1.request)(OpenAPI_js_1.OpenAPI, {
5245
+ method: 'GET',
5246
+ url: '/pods/{pod_id}/workflows/{workflow_name}/installs',
5247
+ path: {
5248
+ 'pod_id': podId,
5249
+ 'workflow_name': workflowName,
5250
+ },
5251
+ errors: {
5252
+ 422: `Validation Error`,
5253
+ },
5254
+ });
5255
+ }
5094
5256
  /**
5095
5257
  * Uninstall Workflow
5096
5258
  * Remove a previously created workflow installation binding.