grain-tools 0.10.16 → 0.10.17
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.
- package/dist/connection-setup.html +79 -9
- package/dist/credential-page.html +54 -2
- package/dist/mcp-app.html +0 -21
- package/dist/web-app.html +407 -197
- package/out/server/standalone.js +327 -198
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -12745,7 +12745,10 @@ function ConnectionSetupPage({
|
|
|
12745
12745
|
/* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: "Connection failed" }),
|
|
12746
12746
|
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: error })
|
|
12747
12747
|
] }),
|
|
12748
|
-
tested && !error && /* @__PURE__ */ jsxRuntimeExports.
|
|
12748
|
+
tested && !error && /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "grain-connection-success", role: "status", children: [
|
|
12749
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { "aria-hidden": "true", children: "✓ " }),
|
|
12750
|
+
"Connection test successful."
|
|
12751
|
+
] }),
|
|
12749
12752
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grain-connection-grid", children: [
|
|
12750
12753
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grain-connection-field", children: [
|
|
12751
12754
|
/* @__PURE__ */ jsxRuntimeExports.jsx("label", { htmlFor: "grain-connection-type", children: "Database type" }),
|
|
@@ -12833,7 +12836,10 @@ function ConnectionSetupPage({
|
|
|
12833
12836
|
] })
|
|
12834
12837
|
] }),
|
|
12835
12838
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grain-connection-footer", children: [
|
|
12836
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
12839
|
+
tested && !error ? /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "grain-connection-success", children: [
|
|
12840
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { "aria-hidden": "true", children: "✓ " }),
|
|
12841
|
+
"Connection test successful."
|
|
12842
|
+
] }) : error ? /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "grain-connection-footer-error", children: error }) : /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "Grain will test the connection before saving it." }),
|
|
12837
12843
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "grain-connection-actions", children: [
|
|
12838
12844
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
12839
12845
|
"button",
|
|
@@ -12940,7 +12946,12 @@ function ConnectionSetupApp() {
|
|
|
12940
12946
|
if (saved)
|
|
12941
12947
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("main", { className: "grain-setup-state", role: "status", children: [
|
|
12942
12948
|
/* @__PURE__ */ jsxRuntimeExports.jsx("h1", { children: "Saved." }),
|
|
12943
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "Go back to your agent
|
|
12949
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "Go back to your agent, and it will retry." }),
|
|
12950
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("p", { className: "grain-setup-workspace", children: [
|
|
12951
|
+
"To run queries yourself, run ",
|
|
12952
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("code", { children: "grain ui" }),
|
|
12953
|
+
" in a terminal to open the Grain workspace (Beta). The workspace is in beta and may be unstable."
|
|
12954
|
+
] })
|
|
12944
12955
|
] });
|
|
12945
12956
|
if (!state || !actions)
|
|
12946
12957
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("main", { className: "grain-setup-state", role: "status", children: /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: message }) });
|
|
@@ -12949,13 +12960,11 @@ function ConnectionSetupApp() {
|
|
|
12949
12960
|
{
|
|
12950
12961
|
value: {
|
|
12951
12962
|
mode: "standalone",
|
|
12952
|
-
sendMessage: () =>
|
|
12953
|
-
},
|
|
12963
|
+
sendMessage: () => void 0,
|
|
12954
12964
|
callServerTool: async () => {
|
|
12955
12965
|
throw new Error("Unavailable");
|
|
12956
12966
|
},
|
|
12957
|
-
onMessage: () => () =>
|
|
12958
|
-
},
|
|
12967
|
+
onMessage: () => () => void 0,
|
|
12959
12968
|
isReady: true
|
|
12960
12969
|
},
|
|
12961
12970
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -13129,11 +13138,18 @@ clientExports.createRoot(document.getElementById("root")).render(/* @__PURE__ */
|
|
|
13129
13138
|
margin: 5px 0 0;
|
|
13130
13139
|
}
|
|
13131
13140
|
.grain-connection-success {
|
|
13132
|
-
color: var(--
|
|
13133
|
-
|
|
13141
|
+
color: var(--vscode-testing-iconPassed, var(--sp-success));
|
|
13142
|
+
border: 1px solid var(--vscode-testing-iconPassed, var(--sp-success));
|
|
13143
|
+
background: color-mix(in srgb, var(--sp-success) 8%, var(--grain-surface));
|
|
13134
13144
|
padding: 10px 14px;
|
|
13135
13145
|
border-radius: var(--grain-radius-sm);
|
|
13136
13146
|
}
|
|
13147
|
+
.grain-connection-footer .grain-connection-success {
|
|
13148
|
+
color: var(--vscode-testing-iconPassed, var(--sp-success));
|
|
13149
|
+
}
|
|
13150
|
+
.grain-connection-footer-error {
|
|
13151
|
+
color: var(--vscode-errorForeground, var(--sp-error));
|
|
13152
|
+
}
|
|
13137
13153
|
.grain-connection-page :is(button, input, select, summary):focus-visible {
|
|
13138
13154
|
outline: 2px solid var(--grain-accent);
|
|
13139
13155
|
outline-offset: 2px;
|
|
@@ -17468,6 +17484,31 @@ body {
|
|
|
17468
17484
|
.sp-web-sidebar-header .sp-web-sidebar-title {
|
|
17469
17485
|
flex: 1;
|
|
17470
17486
|
}
|
|
17487
|
+
.sp-web-section-toggle,
|
|
17488
|
+
.sp-web-agent-session-toggle {
|
|
17489
|
+
border: 0;
|
|
17490
|
+
background: transparent;
|
|
17491
|
+
color: var(--grain-ink);
|
|
17492
|
+
font: inherit;
|
|
17493
|
+
text-align: left;
|
|
17494
|
+
cursor: pointer;
|
|
17495
|
+
}
|
|
17496
|
+
.sp-web-section-toggle {
|
|
17497
|
+
padding: 0;
|
|
17498
|
+
}
|
|
17499
|
+
.sp-web-agent-session-toggle {
|
|
17500
|
+
width: 100%;
|
|
17501
|
+
padding: 7px 9px;
|
|
17502
|
+
color: var(--grain-ink-muted);
|
|
17503
|
+
font-size: 11px;
|
|
17504
|
+
}
|
|
17505
|
+
.sp-web-section-toggle:focus-visible,
|
|
17506
|
+
.sp-web-agent-session-toggle:focus-visible {
|
|
17507
|
+
outline: 1px solid var(--grain-accent);
|
|
17508
|
+
}
|
|
17509
|
+
[aria-current='page'].sp-web-connection-item {
|
|
17510
|
+
background: var(--grain-surface-raised);
|
|
17511
|
+
}
|
|
17471
17512
|
.sp-web-section-add,
|
|
17472
17513
|
.sp-web-sidebar-close {
|
|
17473
17514
|
display: inline-flex;
|
|
@@ -17659,6 +17700,14 @@ body {
|
|
|
17659
17700
|
gap: 4px;
|
|
17660
17701
|
padding: 18px 24px 14px;
|
|
17661
17702
|
}
|
|
17703
|
+
.sp-web-query-heading h1 {
|
|
17704
|
+
margin: 0;
|
|
17705
|
+
font-size: 22px;
|
|
17706
|
+
}
|
|
17707
|
+
.sp-web-query-provenance {
|
|
17708
|
+
color: var(--grain-ink-muted);
|
|
17709
|
+
font-size: 11px;
|
|
17710
|
+
}
|
|
17662
17711
|
.sp-web-query-heading input,
|
|
17663
17712
|
.sp-web-query-heading textarea {
|
|
17664
17713
|
width: 100%;
|
|
@@ -17874,6 +17923,18 @@ body {
|
|
|
17874
17923
|
.sp-web-connection-detail p {
|
|
17875
17924
|
color: var(--grain-ink-muted);
|
|
17876
17925
|
}
|
|
17926
|
+
.sp-web-connection-detail .sp-web-connection-test-success {
|
|
17927
|
+
color: var(--vscode-testing-iconPassed, var(--sp-success));
|
|
17928
|
+
}
|
|
17929
|
+
.sp-web-connection-detail .sp-web-connection-test-error {
|
|
17930
|
+
color: var(--vscode-errorForeground, var(--sp-error));
|
|
17931
|
+
}
|
|
17932
|
+
.sp-web-connection-delete-confirm {
|
|
17933
|
+
margin-top: 16px;
|
|
17934
|
+
}
|
|
17935
|
+
.sp-web-connection-delete-confirm p {
|
|
17936
|
+
color: var(--grain-ink);
|
|
17937
|
+
}
|
|
17877
17938
|
.sp-web-connection-actions {
|
|
17878
17939
|
display: flex;
|
|
17879
17940
|
gap: 8px;
|
|
@@ -17913,6 +17974,15 @@ body {
|
|
|
17913
17974
|
.grain-connection-readonly {
|
|
17914
17975
|
grid-template-columns: 1fr;
|
|
17915
17976
|
}
|
|
17977
|
+
}
|
|
17978
|
+
|
|
17979
|
+
.grain-setup-workspace {
|
|
17980
|
+
color: var(--grain-ink-muted);
|
|
17981
|
+
font-size: 13px;
|
|
17982
|
+
}
|
|
17983
|
+
|
|
17984
|
+
.grain-setup-workspace code {
|
|
17985
|
+
font-family: var(--grain-font-mono);
|
|
17916
17986
|
}</style>
|
|
17917
17987
|
</head>
|
|
17918
17988
|
<body>
|
|
@@ -4351,6 +4351,31 @@ body {
|
|
|
4351
4351
|
.sp-web-sidebar-header .sp-web-sidebar-title {
|
|
4352
4352
|
flex: 1;
|
|
4353
4353
|
}
|
|
4354
|
+
.sp-web-section-toggle,
|
|
4355
|
+
.sp-web-agent-session-toggle {
|
|
4356
|
+
border: 0;
|
|
4357
|
+
background: transparent;
|
|
4358
|
+
color: var(--grain-ink);
|
|
4359
|
+
font: inherit;
|
|
4360
|
+
text-align: left;
|
|
4361
|
+
cursor: pointer;
|
|
4362
|
+
}
|
|
4363
|
+
.sp-web-section-toggle {
|
|
4364
|
+
padding: 0;
|
|
4365
|
+
}
|
|
4366
|
+
.sp-web-agent-session-toggle {
|
|
4367
|
+
width: 100%;
|
|
4368
|
+
padding: 7px 9px;
|
|
4369
|
+
color: var(--grain-ink-muted);
|
|
4370
|
+
font-size: 11px;
|
|
4371
|
+
}
|
|
4372
|
+
.sp-web-section-toggle:focus-visible,
|
|
4373
|
+
.sp-web-agent-session-toggle:focus-visible {
|
|
4374
|
+
outline: 1px solid var(--grain-accent);
|
|
4375
|
+
}
|
|
4376
|
+
[aria-current='page'].sp-web-connection-item {
|
|
4377
|
+
background: var(--grain-surface-raised);
|
|
4378
|
+
}
|
|
4354
4379
|
.sp-web-section-add,
|
|
4355
4380
|
.sp-web-sidebar-close {
|
|
4356
4381
|
display: inline-flex;
|
|
@@ -4542,6 +4567,14 @@ body {
|
|
|
4542
4567
|
gap: 4px;
|
|
4543
4568
|
padding: 18px 24px 14px;
|
|
4544
4569
|
}
|
|
4570
|
+
.sp-web-query-heading h1 {
|
|
4571
|
+
margin: 0;
|
|
4572
|
+
font-size: 22px;
|
|
4573
|
+
}
|
|
4574
|
+
.sp-web-query-provenance {
|
|
4575
|
+
color: var(--grain-ink-muted);
|
|
4576
|
+
font-size: 11px;
|
|
4577
|
+
}
|
|
4545
4578
|
.sp-web-query-heading input,
|
|
4546
4579
|
.sp-web-query-heading textarea {
|
|
4547
4580
|
width: 100%;
|
|
@@ -4757,6 +4790,18 @@ body {
|
|
|
4757
4790
|
.sp-web-connection-detail p {
|
|
4758
4791
|
color: var(--grain-ink-muted);
|
|
4759
4792
|
}
|
|
4793
|
+
.sp-web-connection-detail .sp-web-connection-test-success {
|
|
4794
|
+
color: var(--vscode-testing-iconPassed, var(--sp-success));
|
|
4795
|
+
}
|
|
4796
|
+
.sp-web-connection-detail .sp-web-connection-test-error {
|
|
4797
|
+
color: var(--vscode-errorForeground, var(--sp-error));
|
|
4798
|
+
}
|
|
4799
|
+
.sp-web-connection-delete-confirm {
|
|
4800
|
+
margin-top: 16px;
|
|
4801
|
+
}
|
|
4802
|
+
.sp-web-connection-delete-confirm p {
|
|
4803
|
+
color: var(--grain-ink);
|
|
4804
|
+
}
|
|
4760
4805
|
.sp-web-connection-actions {
|
|
4761
4806
|
display: flex;
|
|
4762
4807
|
gap: 8px;
|
|
@@ -4917,11 +4962,18 @@ body {
|
|
|
4917
4962
|
margin: 5px 0 0;
|
|
4918
4963
|
}
|
|
4919
4964
|
.grain-connection-success {
|
|
4920
|
-
color: var(--
|
|
4921
|
-
|
|
4965
|
+
color: var(--vscode-testing-iconPassed, var(--sp-success));
|
|
4966
|
+
border: 1px solid var(--vscode-testing-iconPassed, var(--sp-success));
|
|
4967
|
+
background: color-mix(in srgb, var(--sp-success) 8%, var(--grain-surface));
|
|
4922
4968
|
padding: 10px 14px;
|
|
4923
4969
|
border-radius: var(--grain-radius-sm);
|
|
4924
4970
|
}
|
|
4971
|
+
.grain-connection-footer .grain-connection-success {
|
|
4972
|
+
color: var(--vscode-testing-iconPassed, var(--sp-success));
|
|
4973
|
+
}
|
|
4974
|
+
.grain-connection-footer-error {
|
|
4975
|
+
color: var(--vscode-errorForeground, var(--sp-error));
|
|
4976
|
+
}
|
|
4925
4977
|
.grain-connection-page :is(button, input, select, summary):focus-visible {
|
|
4926
4978
|
outline: 2px solid var(--grain-accent);
|
|
4927
4979
|
outline-offset: 2px;
|
package/dist/mcp-app.html
CHANGED
|
@@ -73210,7 +73210,6 @@ const DataGrid = reactExports.forwardRef(function DataGrid2({
|
|
|
73210
73210
|
nativeTheme = false,
|
|
73211
73211
|
disableFilters = false,
|
|
73212
73212
|
autoSizeStrategy,
|
|
73213
|
-
fillWidth = false,
|
|
73214
73213
|
onCellDoubleClick
|
|
73215
73214
|
}, ref) {
|
|
73216
73215
|
const trackUi = useTrackUi();
|
|
@@ -73379,21 +73378,6 @@ const DataGrid = reactExports.forwardRef(function DataGrid2({
|
|
|
73379
73378
|
}),
|
|
73380
73379
|
[data, getNodeValue, copyIncludesHeaders]
|
|
73381
73380
|
);
|
|
73382
|
-
const userResizedRef = reactExports.useRef(false);
|
|
73383
|
-
const fillSpareWidth = reactExports.useCallback((e2) => {
|
|
73384
|
-
if (userResizedRef.current) return;
|
|
73385
|
-
const body = e2.api.getHorizontalPixelRange?.();
|
|
73386
|
-
const columns = (e2.api.getAllDisplayedColumns?.() ?? []).filter((c) => !c.getPinned());
|
|
73387
|
-
if (!body || columns.length === 0) return;
|
|
73388
|
-
const used = columns.reduce((sum2, c) => sum2 + c.getActualWidth(), 0);
|
|
73389
|
-
if (used < body.right - body.left) e2.api.sizeColumnsToFit();
|
|
73390
|
-
}, []);
|
|
73391
|
-
const noteUserResize = reactExports.useCallback((e2) => {
|
|
73392
|
-
if (e2.source === "uiColumnResized" && e2.finished) userResizedRef.current = true;
|
|
73393
|
-
}, []);
|
|
73394
|
-
reactExports.useEffect(() => {
|
|
73395
|
-
userResizedRef.current = false;
|
|
73396
|
-
}, [data?.columns]);
|
|
73397
73381
|
const columnDefs = reactExports.useMemo(() => {
|
|
73398
73382
|
if (!data?.columns) return [];
|
|
73399
73383
|
const isInRange = (rowIndex, displayedColIndex) => {
|
|
@@ -73578,11 +73562,6 @@ const DataGrid = reactExports.forwardRef(function DataGrid2({
|
|
|
73578
73562
|
onGridReady: (p2) => {
|
|
73579
73563
|
apiRef.current = p2.api;
|
|
73580
73564
|
},
|
|
73581
|
-
...fillWidth ? {
|
|
73582
|
-
onFirstDataRendered: fillSpareWidth,
|
|
73583
|
-
onGridSizeChanged: fillSpareWidth,
|
|
73584
|
-
onColumnResized: noteUserResize
|
|
73585
|
-
} : {},
|
|
73586
73565
|
rowData: data.rows,
|
|
73587
73566
|
columnDefs,
|
|
73588
73567
|
defaultColDef: {
|