@stigmer/react 3.11.1-dev.20260812192248 → 3.12.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 (168) hide show
  1. package/activity/useRecentActivity.d.ts +3 -2
  2. package/activity/useRecentActivity.d.ts.map +1 -1
  3. package/activity/useRecentActivity.js +3 -2
  4. package/activity/useRecentActivity.js.map +1 -1
  5. package/agent/AgentDetailView.d.ts +2 -12
  6. package/agent/AgentDetailView.d.ts.map +1 -1
  7. package/agent/AgentDetailView.js +10 -42
  8. package/agent/AgentDetailView.js.map +1 -1
  9. package/agent/internal/agentToInput.d.ts.map +1 -1
  10. package/agent/internal/agentToInput.js +0 -8
  11. package/agent/internal/agentToInput.js.map +1 -1
  12. package/dependency-graph/DependencyTreeNode.d.ts.map +1 -1
  13. package/dependency-graph/DependencyTreeNode.js +1 -7
  14. package/dependency-graph/DependencyTreeNode.js.map +1 -1
  15. package/dependency-graph/types.d.ts +8 -20
  16. package/dependency-graph/types.d.ts.map +1 -1
  17. package/dependency-graph/useDependencyGraph.d.ts.map +1 -1
  18. package/dependency-graph/useDependencyGraph.js +2 -20
  19. package/dependency-graph/useDependencyGraph.js.map +1 -1
  20. package/index.d.ts +0 -2
  21. package/index.d.ts.map +1 -1
  22. package/index.js +0 -6
  23. package/index.js.map +1 -1
  24. package/library/useExportResource.d.ts +3 -4
  25. package/library/useExportResource.d.ts.map +1 -1
  26. package/library/useExportResource.js +1 -1
  27. package/library/useExportResource.js.map +1 -1
  28. package/manifest/EditResourceYamlDialog.d.ts.map +1 -1
  29. package/manifest/EditResourceYamlDialog.js.map +1 -1
  30. package/package.json +4 -4
  31. package/src/activity/useRecentActivity.ts +3 -2
  32. package/src/agent/AgentDetailView.tsx +6 -130
  33. package/src/agent/internal/__tests__/agentToInput.test.ts +2 -11
  34. package/src/agent/internal/agentToInput.ts +0 -11
  35. package/src/dependency-graph/DependencyTreeNode.tsx +1 -7
  36. package/src/dependency-graph/__tests__/useDependencyGraph.test.ts +18 -34
  37. package/src/dependency-graph/types.ts +8 -20
  38. package/src/dependency-graph/useDependencyGraph.ts +2 -22
  39. package/src/index.ts +0 -82
  40. package/src/library/useExportResource.ts +3 -4
  41. package/src/manifest/EditResourceYamlDialog.tsx +1 -2
  42. package/src/manifest/__tests__/ApplyManifestDialog.test.tsx +2 -2
  43. package/src/manifest/__tests__/EditResourceYamlDialog.test.tsx +9 -9
  44. package/styles.css +1 -1
  45. package/workflow/CanvasTransitionEdge.d.ts +1 -1
  46. package/datastore/CollectionRecordsBrowser.d.ts +0 -34
  47. package/datastore/CollectionRecordsBrowser.d.ts.map +0 -1
  48. package/datastore/CollectionRecordsBrowser.js +0 -226
  49. package/datastore/CollectionRecordsBrowser.js.map +0 -1
  50. package/datastore/CollectionSchemaView.d.ts +0 -29
  51. package/datastore/CollectionSchemaView.d.ts.map +0 -1
  52. package/datastore/CollectionSchemaView.js +0 -93
  53. package/datastore/CollectionSchemaView.js.map +0 -1
  54. package/datastore/DatastoreDetailView.d.ts +0 -44
  55. package/datastore/DatastoreDetailView.d.ts.map +0 -1
  56. package/datastore/DatastoreDetailView.js +0 -76
  57. package/datastore/DatastoreDetailView.js.map +0 -1
  58. package/datastore/DatastoreSyncReport.d.ts +0 -19
  59. package/datastore/DatastoreSyncReport.d.ts.map +0 -1
  60. package/datastore/DatastoreSyncReport.js +0 -45
  61. package/datastore/DatastoreSyncReport.js.map +0 -1
  62. package/datastore/DeleteDatastoreDialog.d.ts +0 -35
  63. package/datastore/DeleteDatastoreDialog.d.ts.map +0 -1
  64. package/datastore/DeleteDatastoreDialog.js +0 -90
  65. package/datastore/DeleteDatastoreDialog.js.map +0 -1
  66. package/datastore/FieldValueControl.d.ts +0 -55
  67. package/datastore/FieldValueControl.d.ts.map +0 -1
  68. package/datastore/FieldValueControl.js +0 -138
  69. package/datastore/FieldValueControl.js.map +0 -1
  70. package/datastore/RecordFilterBuilder.d.ts +0 -37
  71. package/datastore/RecordFilterBuilder.d.ts.map +0 -1
  72. package/datastore/RecordFilterBuilder.js +0 -122
  73. package/datastore/RecordFilterBuilder.js.map +0 -1
  74. package/datastore/RecordFormPanel.d.ts +0 -45
  75. package/datastore/RecordFormPanel.d.ts.map +0 -1
  76. package/datastore/RecordFormPanel.js +0 -215
  77. package/datastore/RecordFormPanel.js.map +0 -1
  78. package/datastore/index.d.ts +0 -43
  79. package/datastore/index.d.ts.map +0 -1
  80. package/datastore/index.js +0 -22
  81. package/datastore/index.js.map +0 -1
  82. package/datastore/recordFilter.d.ts +0 -62
  83. package/datastore/recordFilter.d.ts.map +0 -1
  84. package/datastore/recordFilter.js +0 -104
  85. package/datastore/recordFilter.js.map +0 -1
  86. package/datastore/recordValues.d.ts +0 -85
  87. package/datastore/recordValues.d.ts.map +0 -1
  88. package/datastore/recordValues.js +0 -282
  89. package/datastore/recordValues.js.map +0 -1
  90. package/datastore/useDatastore.d.ts +0 -39
  91. package/datastore/useDatastore.d.ts.map +0 -1
  92. package/datastore/useDatastore.js +0 -44
  93. package/datastore/useDatastore.js.map +0 -1
  94. package/datastore/useDatastoreCount.d.ts +0 -50
  95. package/datastore/useDatastoreCount.d.ts.map +0 -1
  96. package/datastore/useDatastoreCount.js +0 -27
  97. package/datastore/useDatastoreCount.js.map +0 -1
  98. package/datastore/useDatastoreDescription.d.ts +0 -54
  99. package/datastore/useDatastoreDescription.d.ts.map +0 -1
  100. package/datastore/useDatastoreDescription.js +0 -50
  101. package/datastore/useDatastoreDescription.js.map +0 -1
  102. package/datastore/useDatastoreList.d.ts +0 -57
  103. package/datastore/useDatastoreList.d.ts.map +0 -1
  104. package/datastore/useDatastoreList.js +0 -29
  105. package/datastore/useDatastoreList.js.map +0 -1
  106. package/datastore/useDatastoreSearch.d.ts +0 -19
  107. package/datastore/useDatastoreSearch.d.ts.map +0 -1
  108. package/datastore/useDatastoreSearch.js +0 -22
  109. package/datastore/useDatastoreSearch.js.map +0 -1
  110. package/datastore/useDeleteDatastore.d.ts +0 -53
  111. package/datastore/useDeleteDatastore.d.ts.map +0 -1
  112. package/datastore/useDeleteDatastore.js +0 -40
  113. package/datastore/useDeleteDatastore.js.map +0 -1
  114. package/datastore/useDeleteRecord.d.ts +0 -34
  115. package/datastore/useDeleteRecord.d.ts.map +0 -1
  116. package/datastore/useDeleteRecord.js +0 -43
  117. package/datastore/useDeleteRecord.js.map +0 -1
  118. package/datastore/useInsertRecord.d.ts +0 -50
  119. package/datastore/useInsertRecord.d.ts.map +0 -1
  120. package/datastore/useInsertRecord.js +0 -55
  121. package/datastore/useInsertRecord.js.map +0 -1
  122. package/datastore/useRecordCollection.d.ts +0 -104
  123. package/datastore/useRecordCollection.d.ts.map +0 -1
  124. package/datastore/useRecordCollection.js +0 -136
  125. package/datastore/useRecordCollection.js.map +0 -1
  126. package/datastore/useRecordList.d.ts +0 -66
  127. package/datastore/useRecordList.d.ts.map +0 -1
  128. package/datastore/useRecordList.js +0 -58
  129. package/datastore/useRecordList.js.map +0 -1
  130. package/datastore/useUpdateRecord.d.ts +0 -52
  131. package/datastore/useUpdateRecord.d.ts.map +0 -1
  132. package/datastore/useUpdateRecord.js +0 -55
  133. package/datastore/useUpdateRecord.js.map +0 -1
  134. package/src/agent/__tests__/AgentDetailView.datastores.test.tsx +0 -166
  135. package/src/datastore/CollectionRecordsBrowser.tsx +0 -571
  136. package/src/datastore/CollectionSchemaView.tsx +0 -247
  137. package/src/datastore/DatastoreDetailView.tsx +0 -201
  138. package/src/datastore/DatastoreSyncReport.tsx +0 -105
  139. package/src/datastore/DeleteDatastoreDialog.tsx +0 -202
  140. package/src/datastore/FieldValueControl.tsx +0 -289
  141. package/src/datastore/RecordFilterBuilder.tsx +0 -422
  142. package/src/datastore/RecordFormPanel.tsx +0 -432
  143. package/src/datastore/__tests__/CollectionRecordsBrowser.test.tsx +0 -245
  144. package/src/datastore/__tests__/DeleteDatastoreDialog.test.tsx +0 -133
  145. package/src/datastore/__tests__/FieldValueControl.test.tsx +0 -160
  146. package/src/datastore/__tests__/RecordFilterBuilder.test.tsx +0 -155
  147. package/src/datastore/__tests__/RecordFormPanel.test.tsx +0 -227
  148. package/src/datastore/__tests__/recordFilter.test.ts +0 -169
  149. package/src/datastore/__tests__/recordMutations.test.tsx +0 -195
  150. package/src/datastore/__tests__/recordValues.test.ts +0 -359
  151. package/src/datastore/__tests__/schemaAndSyncViews.test.tsx +0 -142
  152. package/src/datastore/__tests__/useDatastoreDescription.test.tsx +0 -143
  153. package/src/datastore/__tests__/useRecordCollection.test.tsx +0 -250
  154. package/src/datastore/__tests__/useRecordList.test.tsx +0 -85
  155. package/src/datastore/index.ts +0 -111
  156. package/src/datastore/recordFilter.ts +0 -154
  157. package/src/datastore/recordValues.ts +0 -327
  158. package/src/datastore/useDatastore.ts +0 -67
  159. package/src/datastore/useDatastoreCount.ts +0 -69
  160. package/src/datastore/useDatastoreDescription.ts +0 -90
  161. package/src/datastore/useDatastoreList.ts +0 -79
  162. package/src/datastore/useDatastoreSearch.ts +0 -39
  163. package/src/datastore/useDeleteDatastore.ts +0 -87
  164. package/src/datastore/useDeleteRecord.ts +0 -77
  165. package/src/datastore/useInsertRecord.ts +0 -92
  166. package/src/datastore/useRecordCollection.ts +0 -256
  167. package/src/datastore/useRecordList.ts +0 -131
  168. package/src/datastore/useUpdateRecord.ts +0 -95
@@ -14,7 +14,7 @@ import type { CanvasTransitionEdgeData } from "./workflow-graph-conversions.js";
14
14
  *
15
15
  * @since T15 (Visual Canvas Editor), T06 (Branch Highlighting)
16
16
  */
17
- export declare const CanvasTransitionEdge: import("react").NamedExoticComponent<Pick<import("@xyflow/react").Edge<Record<string, unknown>, string | undefined>, "id" | "source" | "type" | "data" | "target" | "style" | "selected" | "selectable" | "deletable" | "animated"> & import("@xyflow/system").EdgePosition & import("@xyflow/react").EdgeLabelOptions & {
17
+ export declare const CanvasTransitionEdge: import("react").NamedExoticComponent<Pick<import("@xyflow/react").Edge<Record<string, unknown>, string | undefined>, "id" | "source" | "data" | "target" | "type" | "style" | "selected" | "selectable" | "deletable" | "animated"> & import("@xyflow/system").EdgePosition & import("@xyflow/react").EdgeLabelOptions & {
18
18
  sourceHandleId?: string | null;
19
19
  targetHandleId?: string | null;
20
20
  markerStart?: string;
@@ -1,34 +0,0 @@
1
- import { type DatastoreSpec } from "@stigmer/protos/ai/stigmer/agentic/datastore/v1/spec_pb";
2
- /** Props for {@link CollectionRecordsBrowser}. */
3
- export interface CollectionRecordsBrowserProps {
4
- /** Organization slug. */
5
- readonly org: string;
6
- /** Datastore slug. */
7
- readonly datastoreSlug: string;
8
- /** The datastore spec — collections and fields drive the grid columns. */
9
- readonly spec: DatastoreSpec;
10
- /** Additional CSS classes for the root container. */
11
- readonly className?: string;
12
- }
13
- /**
14
- * The records browser (DD-008 SD-3): collection selector, partition
15
- * picker, schema-aware filter builder, typed-cell grid, RPC-paged
16
- * navigation, and verb-gated write affordances — the console surface
17
- * that absorbs the Supabase-dashboard capability the datastore
18
- * primitive retires.
19
- *
20
- * Authorization is rendered as the two layers it is:
21
- * - Write affordances gate on `describeDatastore`'s per-collection
22
- * effective verbs (projections, never authority — the server's
23
- * record layer stays the enforcer).
24
- * - **The denied state is a first-class render**, driven primarily by
25
- * empty access lists (deny-by-default renders as empty access, never
26
- * an error) with a caught reach-level `PERMISSION_DENIED` as the
27
- * defensive branch. Both show the relayable message plus operator
28
- * guidance — never a silently empty grid.
29
- *
30
- * All visual properties flow through `--stgm-*` design tokens.
31
- * Zero Console dependencies — safe for platform builder embedding.
32
- */
33
- export declare function CollectionRecordsBrowser({ org, datastoreSlug, spec, className, }: CollectionRecordsBrowserProps): import("react/jsx-runtime").JSX.Element | null;
34
- //# sourceMappingURL=CollectionRecordsBrowser.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CollectionRecordsBrowser.d.ts","sourceRoot":"","sources":["../../src/datastore/CollectionRecordsBrowser.tsx"],"names":[],"mappings":"AAMA,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,yDAAyD,CAAC;AAwBjE,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C,yBAAyB;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,sBAAsB;IACtB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,qDAAqD;IACrD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAID;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,GAAG,EACH,aAAa,EACb,IAAI,EACJ,SAAS,GACV,EAAE,6BAA6B,kDA6F/B"}
@@ -1,226 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useCallback, useMemo, useState } from "react";
4
- import { cn } from "@stigmer/theme";
5
- import { timestampDate } from "@bufbuild/protobuf/wkt";
6
- import { getUserMessage, isPermissionDenied } from "@stigmer/sdk";
7
- import { DatastoreVerb, FieldType, } from "@stigmer/protos/ai/stigmer/agentic/datastore/v1/spec_pb";
8
- import { TruncatedText } from "../internal/truncated-text.js";
9
- import { ResourceTable } from "../resource-workbench/components/ResourceTable.js";
10
- import { ConfirmDialog } from "../resource-detail/ConfirmDialog.js";
11
- import { useConfirmAction } from "../resource-detail/useConfirmAction.js";
12
- import { toast } from "../feedback/toast.js";
13
- import { FIELD_INPUT_CLASSES } from "./FieldValueControl.js";
14
- import { RecordFilterBuilder } from "./RecordFilterBuilder.js";
15
- import { RecordFormPanel } from "./RecordFormPanel.js";
16
- import { buildRecordFilter } from "./recordFilter.js";
17
- import { formatFieldValue, formatSystemTimestamp, isSortableField, } from "./recordValues.js";
18
- import { useDatastoreDescription } from "./useDatastoreDescription.js";
19
- import { useRecordCollection } from "./useRecordCollection.js";
20
- import { useDeleteRecord } from "./useDeleteRecord.js";
21
- const PAGE_SIZE = 25;
22
- /**
23
- * The records browser (DD-008 SD-3): collection selector, partition
24
- * picker, schema-aware filter builder, typed-cell grid, RPC-paged
25
- * navigation, and verb-gated write affordances — the console surface
26
- * that absorbs the Supabase-dashboard capability the datastore
27
- * primitive retires.
28
- *
29
- * Authorization is rendered as the two layers it is:
30
- * - Write affordances gate on `describeDatastore`'s per-collection
31
- * effective verbs (projections, never authority — the server's
32
- * record layer stays the enforcer).
33
- * - **The denied state is a first-class render**, driven primarily by
34
- * empty access lists (deny-by-default renders as empty access, never
35
- * an error) with a caught reach-level `PERMISSION_DENIED` as the
36
- * defensive branch. Both show the relayable message plus operator
37
- * guidance — never a silently empty grid.
38
- *
39
- * All visual properties flow through `--stgm-*` design tokens.
40
- * Zero Console dependencies — safe for platform builder embedding.
41
- */
42
- export function CollectionRecordsBrowser({ org, datastoreSlug, spec, className, }) {
43
- const collections = spec.collections;
44
- const [collectionName, setCollectionName] = useState(collections[0]?.name ?? "");
45
- const collection = collections.find((c) => c.name === collectionName);
46
- const description = useDatastoreDescription(org, datastoreSlug);
47
- const [partition, setPartition] = useState("default");
48
- // Filter, sort, and page state — per collection selection.
49
- const [conditions, setConditions] = useState([]);
50
- const [sort, setSort] = useState(null);
51
- const [page, setPage] = useState(1);
52
- const selectCollection = useCallback((name) => {
53
- setCollectionName(name);
54
- setConditions([]);
55
- setSort(null);
56
- setPage(1);
57
- }, []);
58
- const selectPartition = useCallback((name) => {
59
- setPartition(name);
60
- setPage(1);
61
- }, []);
62
- const applyConditions = useCallback((next) => {
63
- setConditions(next);
64
- setPage(1);
65
- }, []);
66
- if (collections.length === 0) {
67
- return (_jsx("p", { className: cn("stg:px-3 stg:py-6 stg:text-center stg:text-sm stg:text-muted-foreground", className), children: "This datastore declares no collections." }));
68
- }
69
- if (!collection)
70
- return null;
71
- const collectionAccess = description.description?.collections.find((c) => c.name === collection.name);
72
- return (_jsxs("div", { className: cn("stg:flex stg:flex-col stg:gap-3", className), children: [_jsxs("div", { className: "stg:flex stg:flex-wrap stg:items-center stg:gap-2", children: [_jsxs("label", { className: "stg:flex stg:items-center stg:gap-1.5 stg:text-xs stg:font-medium stg:text-muted-foreground", children: ["Collection", _jsx("select", { className: cn(FIELD_INPUT_CLASSES, "stg:w-auto"), value: collectionName, onChange: (e) => selectCollection(e.target.value), children: collections.map((c) => (_jsx("option", { value: c.name, children: c.name }, c.name))) })] }), _jsxs("label", { className: "stg:flex stg:items-center stg:gap-1.5 stg:text-xs stg:font-medium stg:text-muted-foreground", children: ["Partition", _jsx("select", { className: cn(FIELD_INPUT_CLASSES, "stg:w-auto"), value: partition, onChange: (e) => selectPartition(e.target.value), children: description.partitions.map((p) => (_jsx("option", { value: p, children: p }, p))) })] })] }), _jsx(RecordsPane, { org: org, datastoreSlug: datastoreSlug, collection: collection, partition: partition, conditions: conditions, onConditionsChange: applyConditions, sort: sort, onSortChange: setSort, page: page, onPageChange: setPage, access: collectionAccess, describeError: description.error, describeLoaded: description.description !== null })] }));
73
- }
74
- // ---------------------------------------------------------------------------
75
- // The per-collection pane: denied panel or grid
76
- // ---------------------------------------------------------------------------
77
- function RecordsPane({ org, datastoreSlug, collection, partition, conditions, onConditionsChange, sort, onSortChange, page, onPageChange, access, describeError, describeLoaded, }) {
78
- const verbs = useMemo(() => {
79
- const set = new Set();
80
- for (const grant of access?.access ?? [])
81
- set.add(grant.verb);
82
- return set;
83
- }, [access]);
84
- const canRead = verbs.has(DatastoreVerb.read);
85
- const canInsert = verbs.has(DatastoreVerb.insert);
86
- const canUpdate = verbs.has(DatastoreVerb.update);
87
- const canDelete = verbs.has(DatastoreVerb.delete);
88
- // The caller's column-level read access (empty means every field): a
89
- // field-restricted read grant returns only these fields, so the grid
90
- // and the filter builder narrow to them — no permanently-empty
91
- // columns, no filter the server would refuse (DD-008 invariant 2).
92
- const readableFields = useMemo(() => access?.access.find((a) => a.verb === DatastoreVerb.read)?.readableFields ?? [], [access]);
93
- const scope = { org, datastore: datastoreSlug, collection: collection.name, partition };
94
- const filter = useMemo(() => buildRecordFilter(conditions), [conditions]);
95
- const columns = useMemo(() => buildRecordColumns(collection, readableFields), [collection, readableFields]);
96
- // Fetch only once read access is confirmed — the denied panel is the
97
- // primary render for deny-by-default, not a failed query.
98
- const records = useRecordCollection({
99
- org: describeLoaded && canRead ? org : null,
100
- datastore: datastoreSlug,
101
- collection: collection.name,
102
- partition,
103
- filter,
104
- page,
105
- pageSize: PAGE_SIZE,
106
- sort,
107
- onSortChange,
108
- columns,
109
- });
110
- // Row actions and write panel state.
111
- const [formOpen, setFormOpen] = useState(false);
112
- const [editing, setEditing] = useState(null);
113
- const { confirmState, confirm, handleConfirm, handleCancel } = useConfirmAction();
114
- const deleteRecord = useDeleteRecord();
115
- const openInsert = useCallback(() => {
116
- setEditing(null);
117
- setFormOpen(true);
118
- }, []);
119
- const openEdit = useCallback((record) => {
120
- setEditing(record);
121
- setFormOpen(true);
122
- }, []);
123
- // Deps narrowed to the specific stable callbacks used (DD-010).
124
- const deleteRecordFn = deleteRecord.deleteRecord;
125
- const refetchRecords = records.refetch;
126
- const collectionName = collection.name;
127
- const handleDelete = useCallback(async (record) => {
128
- const ok = await confirm({
129
- title: "Delete record?",
130
- description: `Record ${record.id} will be permanently deleted.`,
131
- confirmLabel: "Delete",
132
- variant: "destructive",
133
- });
134
- if (!ok)
135
- return;
136
- try {
137
- await deleteRecordFn({
138
- org,
139
- datastore: datastoreSlug,
140
- collection: collectionName,
141
- partition,
142
- id: record.id,
143
- });
144
- toast.success("Record deleted");
145
- refetchRecords();
146
- }
147
- catch (err) {
148
- toast.error(getUserMessage(err));
149
- }
150
- }, [confirm, deleteRecordFn, refetchRecords, org, datastoreSlug, collectionName, partition]);
151
- // --- Denied states (DD-008 SD-3): first-class renders ---------------------
152
- if (describeError && isPermissionDenied(describeError)) {
153
- return _jsx(DeniedPanel, { message: getUserMessage(describeError) });
154
- }
155
- if (describeLoaded && !canRead) {
156
- return (_jsx(DeniedPanel, { message: `You do not have record access to “${collection.name}”.` }));
157
- }
158
- if (records.error && isPermissionDenied(records.error)) {
159
- return _jsx(DeniedPanel, { message: getUserMessage(records.error) });
160
- }
161
- const totalPages = Math.max(records.totalPages, 1);
162
- return (_jsxs("div", { className: "stg:flex stg:flex-col stg:gap-3", children: [_jsxs("div", { className: "stg:flex stg:flex-wrap stg:items-center stg:gap-2", children: [_jsx(RecordFilterBuilder, { collection: collection, readableFields: readableFields, conditions: conditions, onChange: onConditionsChange, className: "stg:min-w-0 stg:flex-1" }), canInsert && (_jsx("button", { type: "button", onClick: openInsert, className: cn("stg:shrink-0 stg:rounded-md stg:bg-primary stg:px-3 stg:py-1.5 stg:text-xs stg:font-medium stg:text-primary-foreground", "stg:hover:bg-primary-hover", "stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"), children: "Insert record" }))] }), records.error ? (_jsx("div", { role: "alert", className: "stg:rounded-md stg:border stg:border-destructive stg:bg-card stg:px-3 stg:py-2 stg:text-sm stg:text-destructive", children: getUserMessage(records.error) })) : records.isLoading ? (_jsx("div", { className: "stg:rounded-lg stg:border stg:border-border stg:px-3 stg:py-6 stg:text-center stg:text-sm stg:text-muted-foreground", children: "Loading records\u2026" })) : records.records.length === 0 ? (_jsx("div", { className: "stg:rounded-lg stg:border stg:border-border stg:px-3 stg:py-6 stg:text-center stg:text-sm stg:text-muted-foreground", children: conditions.length > 0
163
- ? "No records match the current filters."
164
- : `No records in “${collection.name}” yet.` })) : (records.table && (_jsx("div", { className: "stg:overflow-x-auto stg:rounded-lg stg:border stg:border-border", children: _jsx(ResourceTable, { table: records.table, "aria-label": `Records in ${collection.name}`, renderRowAction: canUpdate || canDelete
165
- ? (record) => (_jsx(RowActions, { record: record, canUpdate: canUpdate, canDelete: canDelete, onEdit: openEdit, onDelete: handleDelete }))
166
- : undefined }) }))), _jsxs("div", { className: "stg:flex stg:items-center stg:justify-between stg:text-xs stg:text-muted-foreground", children: [_jsxs("span", { children: [records.total, " record", records.total === 1 ? "" : "s"] }), _jsxs("div", { className: "stg:flex stg:items-center stg:gap-2", children: [_jsx("button", { type: "button", onClick: () => onPageChange(page - 1), disabled: page <= 1, className: paginationButtonClass, children: "Previous" }), _jsxs("span", { children: ["Page ", page, " of ", totalPages] }), _jsx("button", { type: "button", onClick: () => onPageChange(page + 1), disabled: page >= totalPages, className: paginationButtonClass, children: "Next" })] })] }), _jsx(RecordFormPanel, { open: formOpen, onOpenChange: setFormOpen, scope: scope, collection: collection, record: editing, onSaved: () => records.refetch() }), _jsx(ConfirmDialog, { state: confirmState, onConfirm: handleConfirm, onCancel: handleCancel })] }));
167
- }
168
- const paginationButtonClass = cn("stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2 stg:py-1 stg:text-xs stg:font-medium stg:text-foreground", "stg:hover:bg-accent stg:hover:text-accent-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-1 stg:focus-visible:ring-ring", "stg:disabled:pointer-events-none stg:disabled:opacity-50");
169
- // ---------------------------------------------------------------------------
170
- // Denied panel — an explanation, never an empty grid
171
- // ---------------------------------------------------------------------------
172
- function DeniedPanel({ message }) {
173
- return (_jsxs("div", { role: "status", className: "stg:flex stg:flex-col stg:items-center stg:gap-2 stg:rounded-lg stg:border stg:border-border stg:bg-muted stg:px-4 stg:py-8 stg:text-center", children: [_jsx("p", { className: "stg:text-sm stg:font-medium stg:text-foreground", children: message }), _jsxs("p", { className: "stg:max-w-md stg:text-xs stg:text-muted-foreground", children: ["Record access is granted by the datastore's authorization block. To gain access, add a role binding for your principal or set a", " ", _jsx("code", { className: "stg:font-mono", children: "default_role" }), " in the datastore YAML, with the verbs you need granted on this collection."] })] }));
174
- }
175
- // ---------------------------------------------------------------------------
176
- // Columns: typed cells from FieldDeclaration + system columns
177
- // ---------------------------------------------------------------------------
178
- /**
179
- * Grid columns for a collection: declared fields with typed cells, then
180
- * `created_at` (visible by default). The remaining system columns
181
- * (`id`, `updated_at`, `created_by`) stay out of the default grid —
182
- * they are shown in the record form's read-only summary; a column
183
- * toggle is recorded growth.
184
- *
185
- * `readableFields` narrows the declared columns to the caller's
186
- * column-level read access (empty means every field): a hidden field's
187
- * cells would be permanently empty, which reads as missing data rather
188
- * than restricted access.
189
- */
190
- function buildRecordColumns(collection, readableFields) {
191
- const readable = readableFields.length > 0 ? new Set(readableFields) : null;
192
- const declaredColumns = readable === null
193
- ? collection.fields
194
- : collection.fields.filter((field) => readable.has(field.name));
195
- const fieldColumns = declaredColumns.map((field) => ({
196
- id: field.name,
197
- header: field.name,
198
- sortable: isSortableField(field),
199
- cell: (record) => (_jsx(TypedCell, { value: formatFieldValue(field.type, record.fields?.[field.name]), numeric: field.type === FieldType.integer || field.type === FieldType.number, mono: field.type === FieldType.json })),
200
- }));
201
- return [
202
- ...fieldColumns,
203
- {
204
- id: "created_at",
205
- header: "created_at",
206
- sortable: true,
207
- cell: (record) => (_jsx(TypedCell, { value: record.createdAt
208
- ? formatSystemTimestamp(timestampDate(record.createdAt).toISOString())
209
- : "", mono: true })),
210
- },
211
- ];
212
- }
213
- function TypedCell({ value, numeric, mono, }) {
214
- // TruncatedText's overflow gating supersedes the old hand-rolled
215
- // 80-character slice + conditional title: CSS truncates the cell and the
216
- // tooltip opens only when the value is actually clipped.
217
- return (_jsx(TruncatedText, { text: value, className: cn("stg:block stg:max-w-xs", numeric && "stg:text-right stg:tabular-nums", mono && "stg:font-mono") }));
218
- }
219
- // ---------------------------------------------------------------------------
220
- // Row actions
221
- // ---------------------------------------------------------------------------
222
- function RowActions({ record, canUpdate, canDelete, onEdit, onDelete, }) {
223
- return (_jsxs("div", { className: "stg:flex stg:items-center stg:gap-1", children: [canUpdate && (_jsx("button", { type: "button", onClick: () => onEdit(record), "aria-label": `Edit record ${record.id}`, className: rowActionClass, children: "Edit" })), canDelete && (_jsx("button", { type: "button", onClick: () => onDelete(record), "aria-label": `Delete record ${record.id}`, className: cn(rowActionClass, "stg:text-destructive stg:hover:text-destructive"), children: "Delete" }))] }));
224
- }
225
- const rowActionClass = cn("stg:rounded-md stg:px-1.5 stg:py-0.5 stg:text-xs stg:font-medium stg:text-muted-foreground", "stg:hover:bg-accent stg:hover:text-foreground", "stg:focus-visible:outline-none stg:focus-visible:ring-1 stg:focus-visible:ring-ring");
226
- //# sourceMappingURL=CollectionRecordsBrowser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CollectionRecordsBrowser.js","sourceRoot":"","sources":["../../src/datastore/CollectionRecordsBrowser.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EACL,aAAa,EACb,SAAS,GAGV,MAAM,yDAAyD,CAAC;AAKjE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,mDAAmD,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAA6B,MAAM,mBAAmB,CAAC;AACjF,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAwB,MAAM,0BAA0B,CAAC;AACrF,O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AqB,CAAC,aAAa,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;oBACtE,CAAC,CAAC,EAAE,EAER,IAAI,SACJ,CACH;SACF;KACF,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,EACjB,KAAK,EACL,OAAO,EACP,IAAI,GAKL;IACC,iEAAiE;IACjE,yEAAyE;IACzE,yDAAyD;IACzD,OAAO,CACL,KAAC,aAAa,IACZ,IAAI,EAAE,KAAK,EACX,SAAS,EAAE,EAAE,CACX,wBAAwB,EACxB,OAAO,IAAI,iCAAiC,EAC5C,IAAI,IAAI,eAAe,CACxB,GACD,CACH,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,cAAc;AACd,8EAA8E;AAE9E,SAAS,UAAU,CAAC,EAClB,MAAM,EACN,SAAS,EACT,SAAS,EACT,MAAM,EACN,QAAQ,GAOT;IACC,OAAO,CACL,eAAK,SAAS,EAAC,qCAAqC,aACjD,SAAS,IAAI,CACZ,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,gBACjB,eAAe,MAAM,CAAC,EAAE,EAAE,EACtC,SAAS,EAAE,cAAc,qBAGlB,CACV,EACA,SAAS,IAAI,CACZ,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,gBACnB,iBAAiB,MAAM,CAAC,EAAE,EAAE,EACxC,SAAS,EAAE,EAAE,CAAC,cAAc,EAAE,iDAAiD,CAAC,uBAGzE,CACV,IACG,CACP,CAAC;AACJ,CAAC;AAED,MAAM,cAAc,GAAG,EAAE,CACvB,4FAA4F,EAC5F,+CAA+C,EAC/C,qFAAqF,CACtF,CAAC"}
@@ -1,29 +0,0 @@
1
- import { type DatastoreSpec, type DatastoreSubject } from "@stigmer/protos/ai/stigmer/agentic/datastore/v1/spec_pb";
2
- /** Props for {@link CollectionSchemaView}. */
3
- export interface CollectionSchemaViewProps {
4
- /** The datastore spec — the authoritative source for structure (DD-008 SD-5). */
5
- readonly spec: DatastoreSpec;
6
- /** Additional CSS classes for the root container. */
7
- readonly className?: string;
8
- }
9
- /**
10
- * Structural view of a datastore's declared schema, rendered from the
11
- * loaded resource spec: per-collection typed field tables, the declared
12
- * constraints with their authored messages (the operator's own copy —
13
- * the same bytes agents relay), and the authorization block summary
14
- * (roles, bindings, `default_role` — operator-facing state the
15
- * describe projection deliberately excludes).
16
- *
17
- * Read-only by design: schema changes go through YAML apply, the one
18
- * write path for structure.
19
- *
20
- * All visual properties flow through `--stgm-*` design tokens.
21
- * Zero Console dependencies — safe for platform builder embedding.
22
- */
23
- export declare function CollectionSchemaView({ spec, className }: CollectionSchemaViewProps): import("react/jsx-runtime").JSX.Element;
24
- /**
25
- * Plain kind+value rendering of a datastore subject (DD-008 SD-3: the
26
- * grant system is the privacy boundary; display is honest).
27
- */
28
- export declare function formatSubject(subject: DatastoreSubject | undefined): string;
29
- //# sourceMappingURL=CollectionSchemaView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CollectionSchemaView.d.ts","sourceRoot":"","sources":["../../src/datastore/CollectionSchemaView.tsx"],"names":[],"mappings":"AAKA,OAAO,EAIL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACtB,MAAM,yDAAyD,CAAC;AAIjE,8CAA8C;AAC9C,MAAM,WAAW,yBAAyB;IACxC,iFAAiF;IACjF,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,qDAAqD;IACrD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,yBAAyB,2CASlF;AA0ED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,gBAAgB,GAAG,SAAS,GAAG,MAAM,CAa3E"}
@@ -1,93 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { cn } from "@stigmer/theme";
4
- import { toJson } from "@bufbuild/protobuf";
5
- import { ValueSchema } from "@bufbuild/protobuf/wkt";
6
- import { FieldType, } from "@stigmer/protos/ai/stigmer/agentic/datastore/v1/spec_pb";
7
- import { Section } from "../resource-detail/Section.js";
8
- import { formatFieldValue } from "./recordValues.js";
9
- /**
10
- * Structural view of a datastore's declared schema, rendered from the
11
- * loaded resource spec: per-collection typed field tables, the declared
12
- * constraints with their authored messages (the operator's own copy —
13
- * the same bytes agents relay), and the authorization block summary
14
- * (roles, bindings, `default_role` — operator-facing state the
15
- * describe projection deliberately excludes).
16
- *
17
- * Read-only by design: schema changes go through YAML apply, the one
18
- * write path for structure.
19
- *
20
- * All visual properties flow through `--stgm-*` design tokens.
21
- * Zero Console dependencies — safe for platform builder embedding.
22
- */
23
- export function CollectionSchemaView({ spec, className }) {
24
- return (_jsxs("div", { className: cn("stg:flex stg:flex-col stg:gap-6", className), children: [_jsx(AuthorizationSummary, { authorization: spec.authorization, timezone: spec.timezone }), spec.collections.map((coll) => (_jsx(CollectionSchema, { collection: coll }, coll.name)))] }));
25
- }
26
- // ---------------------------------------------------------------------------
27
- // Authorization block summary
28
- // ---------------------------------------------------------------------------
29
- function AuthorizationSummary({ authorization, timezone, }) {
30
- const roles = authorization?.roles ?? [];
31
- const bindings = authorization?.bindings ?? [];
32
- const defaultRole = authorization?.defaultRole ?? "";
33
- return (_jsx(Section, { title: "Authorization", children: _jsxs("div", { className: "stg:flex stg:flex-col stg:gap-3 stg:p-3 stg:text-sm", children: [_jsxs("div", { className: "stg:flex stg:flex-wrap stg:items-center stg:gap-2", children: [_jsx("span", { className: "stg:text-xs stg:font-medium stg:text-muted-foreground", children: "Roles" }), roles.length === 0 ? (_jsx("span", { className: "stg:text-xs stg:text-muted-foreground", children: "none declared" })) : (roles.map((r) => (_jsx("span", { className: "stg:rounded-full stg:bg-muted stg:px-2 stg:py-0.5 stg:text-xs stg:font-medium stg:text-foreground", children: r.name }, r.name))))] }), _jsxs("div", { className: "stg:flex stg:flex-wrap stg:items-center stg:gap-2", children: [_jsx("span", { className: "stg:text-xs stg:font-medium stg:text-muted-foreground", children: "Default role" }), defaultRole ? (_jsx("span", { className: "stg:rounded-full stg:bg-muted stg:px-2 stg:py-0.5 stg:text-xs stg:font-medium stg:text-foreground", children: defaultRole })) : (_jsx("span", { className: "stg:text-xs stg:text-muted-foreground", children: "none \u2014 unbound callers are denied" }))] }), bindings.length > 0 && (_jsxs("div", { className: "stg:flex stg:flex-col stg:gap-1", children: [_jsxs("span", { className: "stg:text-xs stg:font-medium stg:text-muted-foreground", children: ["Bindings (", bindings.length, ")"] }), _jsx("ul", { className: "stg:flex stg:flex-col stg:gap-0.5", children: bindings.map((b, i) => (_jsxs("li", { className: "stg:text-xs stg:text-foreground", children: [_jsx("code", { className: "stg:font-mono", children: formatSubject(b.subject) }), _jsx("span", { className: "stg:text-muted-foreground", children: " \u2192 " }), b.role] }, i))) })] })), timezone && (_jsxs("div", { className: "stg:flex stg:items-center stg:gap-2", children: [_jsx("span", { className: "stg:text-xs stg:font-medium stg:text-muted-foreground", children: "Timezone" }), _jsx("span", { className: "stg:text-xs stg:text-foreground", children: timezone })] }))] }) }));
34
- }
35
- /**
36
- * Plain kind+value rendering of a datastore subject (DD-008 SD-3: the
37
- * grant system is the privacy boundary; display is honest).
38
- */
39
- export function formatSubject(subject) {
40
- switch (subject?.kind.case) {
41
- case "channelSender": {
42
- const s = subject.kind.value;
43
- return `${s.senderKind}:${s.value}`;
44
- }
45
- case "principal": {
46
- const p = subject.kind.value;
47
- return `${p.kind}/${p.id}`;
48
- }
49
- default:
50
- return "unknown";
51
- }
52
- }
53
- // ---------------------------------------------------------------------------
54
- // Per-collection schema
55
- // ---------------------------------------------------------------------------
56
- const CONSTRAINT_KIND_LABELS = {
57
- uniques: "unique",
58
- checks: "check",
59
- exists: "exists",
60
- notExists: "not exists",
61
- };
62
- function CollectionSchema({ collection }) {
63
- const constraints = [
64
- ...collection.uniques.map((c) => ({
65
- kind: CONSTRAINT_KIND_LABELS.uniques,
66
- name: c.name,
67
- fields: c.fields.join(", "),
68
- message: c.message,
69
- })),
70
- ...collection.checks.map((c) => ({
71
- kind: CONSTRAINT_KIND_LABELS.checks,
72
- name: c.name,
73
- fields: "",
74
- message: c.message,
75
- })),
76
- ...collection.exists.map((c) => ({
77
- kind: CONSTRAINT_KIND_LABELS.exists,
78
- name: c.name,
79
- fields: c.collection,
80
- message: c.message,
81
- })),
82
- ...collection.notExists.map((c) => ({
83
- kind: CONSTRAINT_KIND_LABELS.notExists,
84
- name: c.name,
85
- fields: c.collection,
86
- message: c.message,
87
- })),
88
- ];
89
- return (_jsx(Section, { title: collection.name, count: collection.fields.length, children: _jsxs("div", { className: "stg:flex stg:flex-col", children: [collection.description && (_jsx("p", { className: "stg:border-b stg:border-border stg:px-3 stg:py-2 stg:text-xs stg:text-muted-foreground", children: collection.description })), _jsxs("table", { className: "stg:w-full stg:text-left stg:text-xs", children: [_jsx("thead", { children: _jsxs("tr", { className: "stg:border-b stg:border-border stg:text-muted-foreground", children: [_jsx("th", { scope: "col", className: "stg:px-3 stg:py-2 stg:font-medium", children: "Field" }), _jsx("th", { scope: "col", className: "stg:px-3 stg:py-2 stg:font-medium", children: "Type" }), _jsx("th", { scope: "col", className: "stg:px-3 stg:py-2 stg:font-medium", children: "Required" }), _jsx("th", { scope: "col", className: "stg:px-3 stg:py-2 stg:font-medium", children: "Default" }), _jsx("th", { scope: "col", className: "stg:px-3 stg:py-2 stg:font-medium", children: "Description" })] }) }), _jsx("tbody", { children: collection.fields.map((f) => (_jsxs("tr", { className: "stg:border-b stg:border-border stg:last:border-b-0", children: [_jsx("td", { className: "stg:px-3 stg:py-2 stg:font-mono stg:text-foreground", children: f.name }), _jsxs("td", { className: "stg:px-3 stg:py-2 stg:text-foreground", children: [FieldType[f.type], f.enumValues.length > 0 && (_jsxs("span", { className: "stg:text-muted-foreground", children: [" ", "(", f.enumValues.join(" | "), ")"] }))] }), _jsx("td", { className: "stg:px-3 stg:py-2 stg:text-muted-foreground", children: f.required ? "yes" : "" }), _jsx("td", { className: "stg:px-3 stg:py-2 stg:font-mono stg:text-muted-foreground", children: f.default !== undefined
90
- ? formatFieldValue(f.type, toJson(ValueSchema, f.default))
91
- : "" }), _jsx("td", { className: "stg:px-3 stg:py-2 stg:text-muted-foreground", children: f.description })] }, f.name))) })] }), constraints.length > 0 && (_jsxs("div", { className: "stg:border-t stg:border-border", children: [_jsx("h4", { className: "stg:px-3 stg:pt-2 stg:text-xs stg:font-medium stg:uppercase stg:tracking-wider stg:text-muted-foreground", children: "Constraints" }), _jsx("ul", { className: "stg:flex stg:flex-col stg:gap-1 stg:p-3", children: constraints.map((c) => (_jsxs("li", { className: "stg:flex stg:flex-wrap stg:items-baseline stg:gap-2 stg:text-xs", children: [_jsx("span", { className: "stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:font-medium stg:text-muted-foreground", children: c.kind }), _jsx("code", { className: "stg:font-mono stg:text-foreground", children: c.name }), c.fields && _jsxs("span", { className: "stg:text-muted-foreground", children: ["(", c.fields, ")"] }), c.message && (_jsxs("span", { className: "stg:text-muted-foreground", children: ["\u2014 \u201C", c.message, "\u201D"] }))] }, `${c.kind}:${c.name}`))) })] }))] }) }));
92
- }
93
- //# sourceMappingURL=CollectionSchemaView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CollectionSchemaView.js","sourceRoot":"","sources":["../../src/datastore/CollectionSchemaView.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACL,SAAS,GAKV,MAAM,yDAAyD,CAAC;AACjE,OAAO,E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@@
1
- import type { Datastore } from "@stigmer/protos/ai/stigmer/agentic/datastore/v1/api_pb";
2
- import type { DetailAction } from "../resource-detail/types.js";
3
- /** The detail view's tabs. */
4
- export type DatastoreDetailTab = "overview" | "records";
5
- /** Props for {@link DatastoreDetailView}. */
6
- export interface DatastoreDetailViewProps {
7
- /** Organization slug. */
8
- readonly org: string;
9
- /** Datastore slug. */
10
- readonly slug: string;
11
- /** Primary action rendered as a visible button. */
12
- readonly primaryAction?: DetailAction;
13
- /** Overflow actions (Edit YAML / Export / Delete — assembled at the page level). */
14
- readonly actions?: readonly DetailAction[];
15
- /** Called when the datastore loads or reloads (e.g. breadcrumb label sync). */
16
- readonly onResourceLoad?: (datastore: Datastore) => void;
17
- /** Initial tab for uncontrolled usage. @default "overview" */
18
- readonly defaultTab?: DatastoreDetailTab;
19
- /** Controlled active tab. Uncontrolled (internal state) when omitted. */
20
- readonly activeTab?: DatastoreDetailTab;
21
- /** Tab-change callback for controlled usage. */
22
- readonly onTabChange?: (tab: DatastoreDetailTab) => void;
23
- /** Additional CSS classes for the root container. */
24
- readonly className?: string;
25
- }
26
- /**
27
- * Self-contained detail view for a Datastore — the Library-resource
28
- * home (DD-008 SD-1): an **Overview** tab (schema, authorization
29
- * summary, and the sync-report health strip — all from the loaded
30
- * resource, the authoritative source for structure and health) and a
31
- * **Records** tab (the browser, whose caller-effective verbs come from
32
- * `describeDatastore`). No version-history affordance —
33
- * `is_versioned: false` (DD-003).
34
- *
35
- * Handles loading, error, and not-found states automatically.
36
- * Zero Console dependencies — safe for platform builder embedding.
37
- * All visual properties flow through `--stgm-*` design tokens.
38
- */
39
- export declare function DatastoreDetailView({ org, slug, primaryAction, actions, onResourceLoad, defaultTab, activeTab, onTabChange, className, }: DatastoreDetailViewProps): import("react/jsx-runtime").JSX.Element;
40
- /** Database-cylinder icon shared by the detail view's states. */
41
- export declare function DatastoreIcon({ className }: {
42
- readonly className?: string;
43
- }): import("react/jsx-runtime").JSX.Element;
44
- //# sourceMappingURL=DatastoreDetailView.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DatastoreDetailView.d.ts","sourceRoot":"","sources":["../../src/datastore/DatastoreDetailView.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wDAAwD,CAAC;AAGxF,OAAO,KAAK,EAAE,YAAY,EAAsB,MAAM,6BAA6B,CAAC;AAMpF,8BAA8B;AAC9B,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,SAAS,CAAC;AAExD,6CAA6C;AAC7C,MAAM,WAAW,wBAAwB;IACvC,yBAAyB;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,sBAAsB;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,QAAQ,CAAC,aAAa,CAAC,EAAE,YAAY,CAAC;IACtC,oFAAoF;IACpF,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,YAAY,EAAE,CAAC;IAC3C,+EAA+E;IAC/E,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAC;IACzD,8DAA8D;IAC9D,QAAQ,CAAC,UAAU,CAAC,EAAE,kBAAkB,CAAC;IACzC,yEAAyE;IACzE,QAAQ,CAAC,SAAS,CAAC,EAAE,kBAAkB,CAAC;IACxC,gDAAgD;IAChD,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,kBAAkB,KAAK,IAAI,CAAC;IACzD,qDAAqD;IACrD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,GAAG,EACH,IAAI,EACJ,aAAa,EACb,OAAO,EACP,cAAc,EACd,UAAuB,EACvB,SAAS,EACT,WAAW,EACX,SAAS,GACV,EAAE,wBAAwB,2CA+D1B;AAyDD,iEAAiE;AACjE,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,2CAiB3E"}
@@ -1,76 +0,0 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useEffect, useState } from "react";
4
- import { cn } from "@stigmer/theme";
5
- import { timestampDate } from "@bufbuild/protobuf/wkt";
6
- import { ErrorMessage } from "../error/ErrorMessage.js";
7
- import { ResourceDetailShell } from "../resource-detail/ResourceDetailShell.js";
8
- import { CollectionRecordsBrowser } from "./CollectionRecordsBrowser.js";
9
- import { CollectionSchemaView } from "./CollectionSchemaView.js";
10
- import { DatastoreSyncReport } from "./DatastoreSyncReport.js";
11
- import { useDatastore } from "./useDatastore.js";
12
- /**
13
- * Self-contained detail view for a Datastore — the Library-resource
14
- * home (DD-008 SD-1): an **Overview** tab (schema, authorization
15
- * summary, and the sync-report health strip — all from the loaded
16
- * resource, the authoritative source for structure and health) and a
17
- * **Records** tab (the browser, whose caller-effective verbs come from
18
- * `describeDatastore`). No version-history affordance —
19
- * `is_versioned: false` (DD-003).
20
- *
21
- * Handles loading, error, and not-found states automatically.
22
- * Zero Console dependencies — safe for platform builder embedding.
23
- * All visual properties flow through `--stgm-*` design tokens.
24
- */
25
- export function DatastoreDetailView({ org, slug, primaryAction, actions, onResourceLoad, defaultTab = "overview", activeTab, onTabChange, className, }) {
26
- const { datastore, isLoading, error, refetch } = useDatastore(org, slug);
27
- const [internalTab, setInternalTab] = useState(defaultTab);
28
- const tab = activeTab ?? internalTab;
29
- const setTab = onTabChange ?? setInternalTab;
30
- useEffect(() => {
31
- if (datastore)
32
- onResourceLoad?.(datastore);
33
- }, [datastore, onResourceLoad]);
34
- if (isLoading)
35
- return _jsx(LoadingSkeleton, { className: className });
36
- if (error)
37
- return _jsx(ErrorMessage, { error: error, retry: refetch, className: className });
38
- if (!datastore)
39
- return _jsx(NotFoundState, { className: className });
40
- const meta = datastore.metadata;
41
- const spec = datastore.spec;
42
- const status = datastore.status;
43
- const specAudit = status?.audit?.specAudit;
44
- const headerMeta = {
45
- name: meta?.name || meta?.slug || "Untitled",
46
- id: meta?.id || "",
47
- org: meta?.org,
48
- slug: meta?.slug,
49
- description: spec?.description,
50
- icon: _jsx(DatastoreIcon, { className: "stg:size-6 stg:text-muted-foreground" }),
51
- createdAt: specAudit?.createdAt ? timestampDate(specAudit.createdAt) : null,
52
- updatedAt: specAudit?.updatedAt ? timestampDate(specAudit.updatedAt) : null,
53
- };
54
- return (_jsx(ResourceDetailShell, { header: headerMeta, primaryAction: primaryAction, actions: actions, tabs: [
55
- { id: "overview", label: "Overview" },
56
- { id: "records", label: "Records" },
57
- ], activeTab: tab, onTabChange: (id) => setTab(id), tabsAriaLabel: "Datastore sections", className: className, children: tab === "overview" ? (_jsxs("div", { className: "stg:flex stg:flex-col stg:gap-6", children: [status && _jsx(DatastoreSyncReport, { status: status }), spec && _jsx(CollectionSchemaView, { spec: spec })] })) : (spec &&
58
- meta && (_jsx(CollectionRecordsBrowser, { org: meta.org, datastoreSlug: meta.slug, spec: spec }))) }));
59
- }
60
- // ---------------------------------------------------------------------------
61
- // Non-happy states
62
- // ---------------------------------------------------------------------------
63
- function LoadingSkeleton({ className }) {
64
- return (_jsxs("div", { className: cn("stg:flex stg:flex-col stg:gap-6", className), "aria-busy": "true", "aria-label": "Loading datastore details", children: [_jsxs("div", { className: "stg:flex stg:items-start stg:gap-3", children: [_jsx("div", { className: "stg:mt-1 stg:size-6 stg:shrink-0 stg:animate-pulse stg:rounded stg:bg-muted" }), _jsxs("div", { className: "stg:flex-1 stg:space-y-2", children: [_jsx("div", { className: "stg:h-5 stg:w-48 stg:animate-pulse stg:rounded stg:bg-muted" }), _jsx("div", { className: "stg:h-3 stg:w-64 stg:animate-pulse stg:rounded stg:bg-muted" })] })] }), _jsxs("div", { className: "stg:space-y-2", children: [_jsx("div", { className: "stg:h-3 stg:w-28 stg:animate-pulse stg:rounded stg:bg-muted" }), _jsx("div", { className: "stg:animate-pulse stg:rounded-lg stg:border stg:border-border stg:bg-muted-faint", style: { height: "160px" } })] }), _jsxs("div", { className: "stg:space-y-2", children: [_jsx("div", { className: "stg:h-3 stg:w-20 stg:animate-pulse stg:rounded stg:bg-muted" }), _jsx("div", { className: "stg:animate-pulse stg:rounded-lg stg:border stg:border-border stg:bg-muted-faint", style: { height: "240px" } })] })] }));
65
- }
66
- function NotFoundState({ className }) {
67
- return (_jsxs("div", { role: "status", className: cn("stg:flex stg:flex-col stg:items-center stg:gap-2 stg:py-12 stg:text-center", className), children: [_jsx(DatastoreIcon, { className: "stg:size-10 stg:text-muted-foreground-faint" }), _jsx("p", { className: "stg:text-sm stg:font-medium stg:text-muted-foreground", children: "Datastore not found" }), _jsx("p", { className: "stg:text-xs stg:text-muted-foreground-subtle", children: "This datastore doesn't exist or you don't have access to it." })] }));
68
- }
69
- // ---------------------------------------------------------------------------
70
- // Icon (inline SVG — no icon-library dependency)
71
- // ---------------------------------------------------------------------------
72
- /** Database-cylinder icon shared by the detail view's states. */
73
- export function DatastoreIcon({ className }) {
74
- return (_jsxs("svg", { className: className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [_jsx("ellipse", { cx: "12", cy: "5", rx: "8", ry: "3" }), _jsx("path", { d: "M4 5v6c0 1.66 3.58 3 8 3s8-1.34 8-3V5" }), _jsx("path", { d: "M4 11v6c0 1.66 3.58 3 8 3s8-1.34 8-3v-6" })] }));
75
- }
76
- //# sourceMappingURL=DatastoreDetailView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DatastoreDetailView.js","sourceRoot":"","sources":["../../src/datastore/DatastoreDetailView.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,EAAE,EAAE,MAAM,gBAA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SAAS,EAAE,EAAE,CAAC,4EAA4E,EAAE,SAAS,CAAC,aAEtG,KAAC,aAAa,IAAC,SAAS,EAAC,6CAA6C,GAAG,EACzE,YAAG,SAAS,EAAC,uDAAuD,oCAAwB,EAC5F,YAAG,SAAS,EAAC,8CAA8C,6EAEvD,IACA,CACP,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,iDAAiD;AACjD,8EAA8E;AAE9E,iEAAiE;AACjE,MAAM,UAAU,aAAa,CAAC,EAAE,SAAS,EAAmC;IAC1E,OAAO,CACL,eACE,SAAS,EAAE,SAAS,EACpB,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,iBACV,MAAM,aAElB,kBAAS,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,GAAG,EACxC,eAAM,CAAC,EAAC,uCAAuC,GAAG,EAClD,eAAM,CAAC,EAAC,yCAAyC,GAAG,IAChD,CACP,CAAC;AACJ,CAAC"}
@@ -1,19 +0,0 @@
1
- import { type DatastoreStatus } from "@stigmer/protos/ai/stigmer/agentic/datastore/v1/status_pb";
2
- /** Props for {@link DatastoreSyncReport}. */
3
- export interface DatastoreSyncReportProps {
4
- /** The datastore status — the authoritative source for health (DD-008 SD-5). */
5
- readonly status: DatastoreStatus;
6
- /** Additional CSS classes for the root container. */
7
- readonly className?: string;
8
- }
9
- /**
10
- * The Overview health strip: projects `DatastoreStatus` — last apply
11
- * outcome, per-collection materialization state, and record counts —
12
- * so the operator can confirm an apply landed without leaving the
13
- * console (the cutover choreography's verification surface, DD-009).
14
- *
15
- * All visual properties flow through `--stgm-*` design tokens.
16
- * Zero Console dependencies — safe for platform builder embedding.
17
- */
18
- export declare function DatastoreSyncReport({ status, className }: DatastoreSyncReportProps): import("react/jsx-runtime").JSX.Element;
19
- //# sourceMappingURL=DatastoreSyncReport.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DatastoreSyncReport.d.ts","sourceRoot":"","sources":["../../src/datastore/DatastoreSyncReport.tsx"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,2DAA2D,CAAC;AAInE,6CAA6C;AAC7C,MAAM,WAAW,wBAAwB;IACvC,gFAAgF;IAChF,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAC;IACjC,qDAAqD;IACrD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,wBAAwB,2CA6ClF"}