@circuitwall/jarela 1.9.0 → 1.9.1

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 (57) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +2 -2
  3. package/.next/standalone/.next/build-manifest.json +2 -2
  4. package/.next/standalone/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  6. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  7. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/_not-found.html +2 -2
  16. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  17. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  18. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  19. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  20. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  21. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  22. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  23. package/.next/standalone/.next/server/app/page.js +30057 -29350
  24. package/.next/standalone/.next/server/app/page.js.map +1 -1
  25. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  26. package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  27. package/.next/standalone/.next/server/app-paths-manifest.json +2 -2
  28. package/.next/standalone/.next/server/chunks/8954.js +35 -0
  29. package/.next/standalone/.next/server/chunks/8954.js.map +1 -1
  30. package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
  31. package/.next/standalone/.next/server/pages/404.html +2 -2
  32. package/.next/standalone/.next/server/pages/500.html +1 -1
  33. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  34. package/.next/standalone/.next/static/chunks/{9476-ea25d4553680515b.js → 1998-31a617131197a83a.js} +53 -2
  35. package/.next/standalone/.next/static/chunks/1998-31a617131197a83a.js.map +1 -0
  36. package/.next/standalone/.next/static/chunks/{2747-d06d5caf7bca15e5.js → 2747-4a6287cacd57d231.js} +36 -1
  37. package/.next/standalone/.next/static/chunks/2747-4a6287cacd57d231.js.map +1 -0
  38. package/.next/standalone/.next/static/chunks/app/{page-a9dcc924ad127090.js → page-cd662565eba5ef59.js} +675 -4
  39. package/.next/standalone/.next/static/chunks/app/page-cd662565eba5ef59.js.map +1 -0
  40. package/.next/standalone/.next/static/css/11aaed27d2989cc1.css +5 -0
  41. package/.next/standalone/.next/static/css/11aaed27d2989cc1.css.map +1 -0
  42. package/.next/standalone/package.json +1 -1
  43. package/CHANGELOG.md +24 -0
  44. package/README.md +6 -0
  45. package/api/client.ts +57 -0
  46. package/api/types.ts +81 -1
  47. package/components/tools/LangChainPackagesPanel.tsx +469 -0
  48. package/components/tools/ToolsPanel.tsx +21 -2
  49. package/hooks/usePackages.ts +111 -0
  50. package/package.json +1 -1
  51. package/.next/standalone/.next/static/chunks/2747-d06d5caf7bca15e5.js.map +0 -1
  52. package/.next/standalone/.next/static/chunks/9476-ea25d4553680515b.js.map +0 -1
  53. package/.next/standalone/.next/static/chunks/app/page-a9dcc924ad127090.js.map +0 -1
  54. package/.next/standalone/.next/static/css/fb519215ea1c4fd8.css +0 -5
  55. package/.next/standalone/.next/static/css/fb519215ea1c4fd8.css.map +0 -1
  56. /package/.next/standalone/.next/static/{TE5LAkHzp2Kipn0ypeCyH → tTk-KuLcT7O-E0z6PdMmO}/_buildManifest.js +0 -0
  57. /package/.next/standalone/.next/static/{TE5LAkHzp2Kipn0ypeCyH → tTk-KuLcT7O-E0z6PdMmO}/_ssgManifest.js +0 -0
@@ -89,7 +89,7 @@ function useTheme() {
89
89
 
90
90
  /***/ }),
91
91
 
92
- /***/ 9197:
92
+ /***/ 5123:
93
93
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
94
94
 
95
95
  "use strict";
@@ -20506,6 +20506,673 @@ function buildIssueHref(query) {
20506
20506
  return url.toString();
20507
20507
  }
20508
20508
 
20509
+ // EXTERNAL MODULE: ./node_modules/lucide-react/dist/esm/icons/package.mjs
20510
+ var icons_package = __webpack_require__(3089);
20511
+ ;// ./hooks/usePackages.ts
20512
+ /* __next_internal_client_entry_do_not_use__ usePackages auto */
20513
+
20514
+ function usePackages() {
20515
+ const [loadResult, setLoadResult] = (0,react.useState)(null);
20516
+ const [manifests, setManifests] = (0,react.useState)([]);
20517
+ const [pending, setPending] = (0,react.useState)([]);
20518
+ const [loading, setLoading] = (0,react.useState)(false);
20519
+ const refresh = (0,react.useCallback)(async ()=>{
20520
+ setLoading(true);
20521
+ try {
20522
+ const [load, mfs, pend] = await Promise.all([
20523
+ client/* api */.FH.packages.list(),
20524
+ client/* api */.FH.packages.listManifests(),
20525
+ client/* api */.FH.packages.listPending()
20526
+ ]);
20527
+ setLoadResult(load);
20528
+ setManifests(mfs);
20529
+ setPending(pend);
20530
+ } finally{
20531
+ setLoading(false);
20532
+ }
20533
+ }, []);
20534
+ (0,react.useEffect)(()=>{
20535
+ void refresh();
20536
+ }, [
20537
+ refresh
20538
+ ]);
20539
+ const install = (0,react.useCallback)(async (spec, version)=>{
20540
+ const res = await client/* api */.FH.packages.install(spec, version);
20541
+ await refresh();
20542
+ return res;
20543
+ }, [
20544
+ refresh
20545
+ ]);
20546
+ const approveInstall = (0,react.useCallback)(async (id)=>{
20547
+ const res = await client/* api */.FH.packages.approveInstall(id);
20548
+ await refresh();
20549
+ return res;
20550
+ }, [
20551
+ refresh
20552
+ ]);
20553
+ const denyInstall = (0,react.useCallback)(async (id)=>{
20554
+ await client/* api */.FH.packages.denyInstall(id);
20555
+ await refresh();
20556
+ }, [
20557
+ refresh
20558
+ ]);
20559
+ const createManifest = (0,react.useCallback)(async (data)=>{
20560
+ await client/* api */.FH.packages.createManifest(data);
20561
+ await refresh();
20562
+ }, [
20563
+ refresh
20564
+ ]);
20565
+ const updateManifest = (0,react.useCallback)(async (name, data)=>{
20566
+ await client/* api */.FH.packages.updateManifest(name, data);
20567
+ await refresh();
20568
+ }, [
20569
+ refresh
20570
+ ]);
20571
+ const deleteManifest = (0,react.useCallback)(async (name)=>{
20572
+ await client/* api */.FH.packages.deleteManifest(name);
20573
+ await refresh();
20574
+ }, [
20575
+ refresh
20576
+ ]);
20577
+ const reload = (0,react.useCallback)(async ()=>{
20578
+ const res = await client/* api */.FH.packages.reload();
20579
+ setLoadResult(res);
20580
+ }, []);
20581
+ return {
20582
+ loadResult,
20583
+ manifests,
20584
+ pending,
20585
+ loading,
20586
+ refresh,
20587
+ install,
20588
+ approveInstall,
20589
+ denyInstall,
20590
+ createManifest,
20591
+ updateManifest,
20592
+ deleteManifest,
20593
+ reload
20594
+ };
20595
+ }
20596
+
20597
+ ;// ./components/tools/LangChainPackagesPanel.tsx
20598
+ /* __next_internal_client_entry_do_not_use__ LangChainPackagesPanel auto */
20599
+
20600
+
20601
+
20602
+
20603
+ const CATEGORIES = [
20604
+ "Memory",
20605
+ "Documents",
20606
+ "Files",
20607
+ "Shell",
20608
+ "Web",
20609
+ "Images",
20610
+ "Voice",
20611
+ "Schedule",
20612
+ "Atlassian",
20613
+ "JiraAlign",
20614
+ "GitHub",
20615
+ "Mail",
20616
+ "Calendar",
20617
+ "Config",
20618
+ "Agent"
20619
+ ];
20620
+ const CAPABILITIES = [
20621
+ "read",
20622
+ "write",
20623
+ "execute"
20624
+ ];
20625
+ const EMPTY_FORM = {
20626
+ name: "",
20627
+ package: "",
20628
+ exportName: "",
20629
+ category: "Web",
20630
+ capability: "execute",
20631
+ requiredEnv: ""
20632
+ };
20633
+ function LangChainPackagesPanel() {
20634
+ const { loadResult, manifests, pending, loading, refresh, install, approveInstall, denyInstall, createManifest, deleteManifest, reload } = usePackages();
20635
+ const [installSpec, setInstallSpec] = (0,react.useState)("");
20636
+ const [installVersion, setInstallVersion] = (0,react.useState)("");
20637
+ const [installing, setInstalling] = (0,react.useState)(false);
20638
+ const [installNotice, setInstallNotice] = (0,react.useState)(null);
20639
+ const [form, setForm] = (0,react.useState)(EMPTY_FORM);
20640
+ const [savingManifest, setSavingManifest] = (0,react.useState)(false);
20641
+ const errorRows = (0,react.useMemo)(()=>loadResult?.errors ?? [], [
20642
+ loadResult
20643
+ ]);
20644
+ const skippedRows = (0,react.useMemo)(()=>loadResult?.skipped ?? [], [
20645
+ loadResult
20646
+ ]);
20647
+ async function handleInstall(e) {
20648
+ e.preventDefault();
20649
+ if (!installSpec.trim()) return;
20650
+ setInstalling(true);
20651
+ setInstallNotice(null);
20652
+ try {
20653
+ const res = await install(installSpec.trim(), installVersion.trim() || undefined);
20654
+ if (res.status === "pending") {
20655
+ setInstallNotice(`Publisher "${res.publisher}" not in allowlist — pending approval below.`);
20656
+ } else {
20657
+ setInstallNotice(`Installed ${res.resolvedPackage}@${res.installedVersion ?? "?"} (${res.tools.length} tool${res.tools.length === 1 ? "" : "s"} found).`);
20658
+ setInstallSpec("");
20659
+ setInstallVersion("");
20660
+ }
20661
+ } catch (e) {
20662
+ pushErrorToast({
20663
+ title: "Install failed",
20664
+ error: e,
20665
+ context: {
20666
+ panel: "packages",
20667
+ action: "install",
20668
+ spec: installSpec
20669
+ }
20670
+ });
20671
+ } finally{
20672
+ setInstalling(false);
20673
+ }
20674
+ }
20675
+ async function handleApprove(id) {
20676
+ try {
20677
+ await approveInstall(id);
20678
+ } catch (e) {
20679
+ pushErrorToast({
20680
+ title: "Approval failed",
20681
+ error: e,
20682
+ context: {
20683
+ panel: "packages",
20684
+ action: "approve",
20685
+ id
20686
+ }
20687
+ });
20688
+ }
20689
+ }
20690
+ async function handleDeny(id) {
20691
+ try {
20692
+ await denyInstall(id);
20693
+ } catch (e) {
20694
+ pushErrorToast({
20695
+ title: "Deny failed",
20696
+ error: e,
20697
+ context: {
20698
+ panel: "packages",
20699
+ action: "deny",
20700
+ id
20701
+ }
20702
+ });
20703
+ }
20704
+ }
20705
+ async function handleCreateManifest(e) {
20706
+ e.preventDefault();
20707
+ if (!form.name.trim() || !form.package.trim()) return;
20708
+ setSavingManifest(true);
20709
+ try {
20710
+ const requiredEnv = form.requiredEnv.split(",").map((s)=>s.trim()).filter(Boolean);
20711
+ await createManifest({
20712
+ name: form.name.trim(),
20713
+ package: form.package.trim(),
20714
+ export: form.exportName.trim() || undefined,
20715
+ category: form.category,
20716
+ capability: form.capability,
20717
+ requiredEnv: requiredEnv.length > 0 ? requiredEnv : undefined
20718
+ });
20719
+ setForm(EMPTY_FORM);
20720
+ } catch (e) {
20721
+ pushErrorToast({
20722
+ title: "Couldn't create manifest",
20723
+ error: e,
20724
+ context: {
20725
+ panel: "packages",
20726
+ action: "create-manifest",
20727
+ name: form.name
20728
+ }
20729
+ });
20730
+ } finally{
20731
+ setSavingManifest(false);
20732
+ }
20733
+ }
20734
+ async function handleDeleteManifest(record) {
20735
+ if (true) {
20736
+ if (!window.confirm(`Delete manifest "${record.name}"?`)) return;
20737
+ }
20738
+ try {
20739
+ await deleteManifest(record.name);
20740
+ } catch (e) {
20741
+ pushErrorToast({
20742
+ title: "Couldn't delete manifest",
20743
+ error: e,
20744
+ context: {
20745
+ panel: "packages",
20746
+ action: "delete-manifest",
20747
+ name: record.name
20748
+ }
20749
+ });
20750
+ }
20751
+ }
20752
+ async function handleReload() {
20753
+ try {
20754
+ await reload();
20755
+ } catch (e) {
20756
+ pushErrorToast({
20757
+ title: "Reload failed",
20758
+ error: e,
20759
+ context: {
20760
+ panel: "packages",
20761
+ action: "reload"
20762
+ }
20763
+ });
20764
+ }
20765
+ }
20766
+ return /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
20767
+ className: "p-4 space-y-5",
20768
+ children: [
20769
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("header", {
20770
+ className: "space-y-1",
20771
+ children: [
20772
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("h2", {
20773
+ className: "text-sm font-semibold text-fg",
20774
+ children: "LangChain packages"
20775
+ }),
20776
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("p", {
20777
+ className: "text-xs text-fg-faint",
20778
+ children: [
20779
+ "Hot-load vanilla LangChain tool packages from npm without a rebuild. Trusted publishers (",
20780
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("code", {
20781
+ className: "font-mono text-[11px]",
20782
+ children: "@langchain/"
20783
+ }),
20784
+ ",",
20785
+ " ",
20786
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("code", {
20787
+ className: "font-mono text-[11px]",
20788
+ children: "@circuitwall/"
20789
+ }),
20790
+ ",",
20791
+ " ",
20792
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("code", {
20793
+ className: "font-mono text-[11px]",
20794
+ children: "langchain"
20795
+ }),
20796
+ ") install immediately; everything else waits for approval below."
20797
+ ]
20798
+ }),
20799
+ loadResult?.packagesDir && /*#__PURE__*/ (0,jsx_runtime.jsx)("p", {
20800
+ className: "text-[11px] text-fg-faint font-mono",
20801
+ children: loadResult.packagesDir
20802
+ })
20803
+ ]
20804
+ }),
20805
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("section", {
20806
+ className: "space-y-2",
20807
+ children: [
20808
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
20809
+ className: "flex items-center gap-2",
20810
+ children: [
20811
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("h3", {
20812
+ className: "text-sm font-semibold text-fg flex-1",
20813
+ children: "Install from npm"
20814
+ }),
20815
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("button", {
20816
+ type: "button",
20817
+ onClick: handleReload,
20818
+ className: "shrink-0 rounded-md border border-border px-2.5 py-1.5 text-xs text-fg-muted hover:text-fg hover:bg-surface-2 inline-flex items-center gap-1.5",
20819
+ "aria-label": "Reload installed packages",
20820
+ children: [
20821
+ /*#__PURE__*/ (0,jsx_runtime.jsx)(refresh_cw/* default */.A, {
20822
+ className: "w-3.5 h-3.5"
20823
+ }),
20824
+ " Reload"
20825
+ ]
20826
+ })
20827
+ ]
20828
+ }),
20829
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("form", {
20830
+ onSubmit: handleInstall,
20831
+ className: "grid gap-2 md:grid-cols-[minmax(0,1fr)_140px_auto]",
20832
+ children: [
20833
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("input", {
20834
+ type: "text",
20835
+ value: installSpec,
20836
+ onChange: (e)=>setInstallSpec(e.target.value),
20837
+ placeholder: "@langchain/community",
20838
+ className: "rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-fg outline-none focus:border-fg-faint",
20839
+ "aria-label": "Package spec"
20840
+ }),
20841
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("input", {
20842
+ type: "text",
20843
+ value: installVersion,
20844
+ onChange: (e)=>setInstallVersion(e.target.value),
20845
+ placeholder: "version (optional)",
20846
+ className: "rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-fg outline-none focus:border-fg-faint",
20847
+ "aria-label": "Version"
20848
+ }),
20849
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("button", {
20850
+ type: "submit",
20851
+ disabled: installing || !installSpec.trim(),
20852
+ className: "rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-fg hover:bg-surface-3 disabled:opacity-50 disabled:cursor-not-allowed",
20853
+ children: installing ? "Installing…" : "Install"
20854
+ })
20855
+ ]
20856
+ }),
20857
+ installNotice && /*#__PURE__*/ (0,jsx_runtime.jsx)("p", {
20858
+ className: "text-xs text-fg-muted",
20859
+ children: installNotice
20860
+ })
20861
+ ]
20862
+ }),
20863
+ pending.length > 0 && /*#__PURE__*/ (0,jsx_runtime.jsxs)("section", {
20864
+ className: "space-y-2",
20865
+ children: [
20866
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("h3", {
20867
+ className: "text-sm font-semibold text-fg",
20868
+ children: [
20869
+ "Pending approvals (",
20870
+ pending.length,
20871
+ ")"
20872
+ ]
20873
+ }),
20874
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("ul", {
20875
+ className: "space-y-2",
20876
+ children: pending.map((p)=>/*#__PURE__*/ (0,jsx_runtime.jsx)("li", {
20877
+ className: "rounded-lg border border-border bg-surface-2 px-3 py-2.5",
20878
+ children: /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
20879
+ className: "flex items-start gap-3",
20880
+ children: [
20881
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
20882
+ className: "flex-1 min-w-0",
20883
+ children: [
20884
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
20885
+ className: "text-sm font-mono text-fg",
20886
+ children: [
20887
+ p.spec,
20888
+ p.version ? `@${p.version}` : ""
20889
+ ]
20890
+ }),
20891
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("p", {
20892
+ className: "text-xs text-fg-muted mt-0.5",
20893
+ children: [
20894
+ "Publisher",
20895
+ " ",
20896
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("span", {
20897
+ className: "font-mono",
20898
+ children: p.publisher
20899
+ }),
20900
+ " \xb7 ",
20901
+ p.reason
20902
+ ]
20903
+ })
20904
+ ]
20905
+ }),
20906
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
20907
+ className: "flex gap-1.5 shrink-0",
20908
+ children: [
20909
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("button", {
20910
+ type: "button",
20911
+ onClick: ()=>handleApprove(p.id),
20912
+ className: "rounded-md border border-border px-2 py-1.5 text-xs text-fg-muted hover:text-fg hover:bg-surface-3 inline-flex items-center gap-1",
20913
+ "aria-label": `Approve ${p.spec}`,
20914
+ children: [
20915
+ /*#__PURE__*/ (0,jsx_runtime.jsx)(check/* default */.A, {
20916
+ className: "w-3.5 h-3.5"
20917
+ }),
20918
+ " Approve"
20919
+ ]
20920
+ }),
20921
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("button", {
20922
+ type: "button",
20923
+ onClick: ()=>handleDeny(p.id),
20924
+ className: "rounded-md border border-border px-2 py-1.5 text-xs text-fg-muted hover:text-fg hover:bg-surface-3 inline-flex items-center gap-1",
20925
+ "aria-label": `Deny ${p.spec}`,
20926
+ children: [
20927
+ /*#__PURE__*/ (0,jsx_runtime.jsx)(x/* default */.A, {
20928
+ className: "w-3.5 h-3.5"
20929
+ }),
20930
+ " Deny"
20931
+ ]
20932
+ })
20933
+ ]
20934
+ })
20935
+ ]
20936
+ })
20937
+ }, p.id))
20938
+ })
20939
+ ]
20940
+ }),
20941
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("section", {
20942
+ className: "space-y-2 pt-3 border-t border-border",
20943
+ children: [
20944
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("h3", {
20945
+ className: "text-sm font-semibold text-fg",
20946
+ children: "Tool manifests"
20947
+ }),
20948
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("p", {
20949
+ className: "text-xs text-fg-faint",
20950
+ children: [
20951
+ "A manifest maps an exported class from an installed npm package to a built-in category. Surfaced under",
20952
+ " ",
20953
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("code", {
20954
+ className: "font-mono text-[11px]",
20955
+ children: "/api/v1/tools"
20956
+ }),
20957
+ " after a reload."
20958
+ ]
20959
+ }),
20960
+ loading && /*#__PURE__*/ (0,jsx_runtime.jsx)("p", {
20961
+ className: "text-fg-faint text-sm py-3 text-center",
20962
+ children: "Loading…"
20963
+ }),
20964
+ !loading && manifests.length === 0 && /*#__PURE__*/ (0,jsx_runtime.jsx)("p", {
20965
+ className: "text-xs text-fg-faint py-2",
20966
+ children: "No manifests yet. Add one below."
20967
+ }),
20968
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("ul", {
20969
+ className: "space-y-2",
20970
+ children: manifests.map((r)=>/*#__PURE__*/ (0,jsx_runtime.jsx)("li", {
20971
+ className: "rounded-lg border border-border bg-surface-2 px-3 py-2.5",
20972
+ children: /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
20973
+ className: "flex items-start gap-3",
20974
+ children: [
20975
+ /*#__PURE__*/ (0,jsx_runtime.jsx)(icons_package/* default */.A, {
20976
+ className: "w-4 h-4 text-fg-faint mt-0.5 shrink-0"
20977
+ }),
20978
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
20979
+ className: "flex-1 min-w-0",
20980
+ children: [
20981
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
20982
+ className: "flex items-baseline gap-2 flex-wrap",
20983
+ children: [
20984
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("span", {
20985
+ className: "text-sm font-semibold text-fg",
20986
+ children: r.name
20987
+ }),
20988
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("span", {
20989
+ className: "text-[11px] text-fg-faint",
20990
+ children: [
20991
+ r.manifest.category,
20992
+ " \xb7 ",
20993
+ r.manifest.capability
20994
+ ]
20995
+ })
20996
+ ]
20997
+ }),
20998
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("p", {
20999
+ className: "text-xs text-fg-muted mt-0.5 font-mono break-all",
21000
+ children: [
21001
+ r.manifest.package,
21002
+ "#",
21003
+ r.manifest.export
21004
+ ]
21005
+ }),
21006
+ r.manifest.requiredEnv && r.manifest.requiredEnv.length > 0 && /*#__PURE__*/ (0,jsx_runtime.jsxs)("p", {
21007
+ className: "text-[11px] text-fg-faint mt-1",
21008
+ children: [
21009
+ "env: ",
21010
+ r.manifest.requiredEnv.join(", ")
21011
+ ]
21012
+ })
21013
+ ]
21014
+ }),
21015
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("button", {
21016
+ type: "button",
21017
+ onClick: ()=>handleDeleteManifest(r),
21018
+ className: "rounded-md border border-border px-2 py-1.5 text-xs text-fg-muted hover:text-fg hover:bg-surface-3 shrink-0",
21019
+ "aria-label": `Delete manifest ${r.name}`,
21020
+ children: /*#__PURE__*/ (0,jsx_runtime.jsx)(trash_2/* default */.A, {
21021
+ className: "w-3.5 h-3.5"
21022
+ })
21023
+ })
21024
+ ]
21025
+ })
21026
+ }, r.name))
21027
+ }),
21028
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("form", {
21029
+ onSubmit: handleCreateManifest,
21030
+ className: "rounded-lg border border-border bg-surface-2 p-3 space-y-2",
21031
+ children: [
21032
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("h4", {
21033
+ className: "text-xs font-semibold text-fg-muted uppercase tracking-wide",
21034
+ children: "Add manifest"
21035
+ }),
21036
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
21037
+ className: "grid gap-2 md:grid-cols-2",
21038
+ children: [
21039
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("input", {
21040
+ type: "text",
21041
+ value: form.name,
21042
+ onChange: (e)=>setForm({
21043
+ ...form,
21044
+ name: e.target.value
21045
+ }),
21046
+ placeholder: "name (e.g. tavily)",
21047
+ className: "rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-fg outline-none focus:border-fg-faint",
21048
+ "aria-label": "Manifest name"
21049
+ }),
21050
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("input", {
21051
+ type: "text",
21052
+ value: form.package,
21053
+ onChange: (e)=>setForm({
21054
+ ...form,
21055
+ package: e.target.value
21056
+ }),
21057
+ placeholder: "package (e.g. @langchain/community/tools/tavily_search)",
21058
+ className: "rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-fg outline-none focus:border-fg-faint",
21059
+ "aria-label": "Package import path"
21060
+ }),
21061
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("input", {
21062
+ type: "text",
21063
+ value: form.exportName,
21064
+ onChange: (e)=>setForm({
21065
+ ...form,
21066
+ exportName: e.target.value
21067
+ }),
21068
+ placeholder: "export (default: default)",
21069
+ className: "rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-fg outline-none focus:border-fg-faint",
21070
+ "aria-label": "Export name"
21071
+ }),
21072
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("input", {
21073
+ type: "text",
21074
+ value: form.requiredEnv,
21075
+ onChange: (e)=>setForm({
21076
+ ...form,
21077
+ requiredEnv: e.target.value
21078
+ }),
21079
+ placeholder: "required env, comma-separated",
21080
+ className: "rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-fg outline-none focus:border-fg-faint",
21081
+ "aria-label": "Required env vars"
21082
+ }),
21083
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("select", {
21084
+ value: form.category,
21085
+ onChange: (e)=>setForm({
21086
+ ...form,
21087
+ category: e.target.value
21088
+ }),
21089
+ className: "rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-fg outline-none focus:border-fg-faint",
21090
+ "aria-label": "Category",
21091
+ children: CATEGORIES.map((c)=>/*#__PURE__*/ (0,jsx_runtime.jsx)("option", {
21092
+ value: c,
21093
+ children: c
21094
+ }, c))
21095
+ }),
21096
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("select", {
21097
+ value: form.capability,
21098
+ onChange: (e)=>setForm({
21099
+ ...form,
21100
+ capability: e.target.value
21101
+ }),
21102
+ className: "rounded-md border border-border bg-surface-2 px-3 py-2 text-sm text-fg outline-none focus:border-fg-faint",
21103
+ "aria-label": "Capability",
21104
+ children: CAPABILITIES.map((c)=>/*#__PURE__*/ (0,jsx_runtime.jsx)("option", {
21105
+ value: c,
21106
+ children: c
21107
+ }, c))
21108
+ })
21109
+ ]
21110
+ }),
21111
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("div", {
21112
+ className: "flex justify-end",
21113
+ children: /*#__PURE__*/ (0,jsx_runtime.jsx)("button", {
21114
+ type: "submit",
21115
+ disabled: savingManifest || !form.name.trim() || !form.package.trim(),
21116
+ className: "rounded-md border border-border bg-surface-2 px-3 py-1.5 text-xs text-fg hover:bg-surface-3 disabled:opacity-50 disabled:cursor-not-allowed",
21117
+ children: savingManifest ? "Saving…" : "Add manifest"
21118
+ })
21119
+ })
21120
+ ]
21121
+ })
21122
+ ]
21123
+ }),
21124
+ (errorRows.length > 0 || skippedRows.length > 0) && /*#__PURE__*/ (0,jsx_runtime.jsxs)("section", {
21125
+ className: "space-y-2 pt-3 border-t border-border",
21126
+ children: [
21127
+ /*#__PURE__*/ (0,jsx_runtime.jsxs)("div", {
21128
+ className: "flex items-center gap-2",
21129
+ children: [
21130
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("h3", {
21131
+ className: "text-sm font-semibold text-fg flex-1",
21132
+ children: "Load status"
21133
+ }),
21134
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("button", {
21135
+ type: "button",
21136
+ onClick: refresh,
21137
+ className: "shrink-0 rounded-md border border-border px-2.5 py-1.5 text-xs text-fg-muted hover:text-fg hover:bg-surface-2",
21138
+ children: "Refresh"
21139
+ })
21140
+ ]
21141
+ }),
21142
+ errorRows.length > 0 && /*#__PURE__*/ (0,jsx_runtime.jsx)("ul", {
21143
+ className: "space-y-1",
21144
+ children: errorRows.map((e)=>/*#__PURE__*/ (0,jsx_runtime.jsxs)("li", {
21145
+ className: "rounded border border-red-500/40 bg-red-500/10 px-2 py-1.5 text-xs text-fg",
21146
+ children: [
21147
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("span", {
21148
+ className: "font-mono",
21149
+ children: e.manifest
21150
+ }),
21151
+ ": ",
21152
+ e.error
21153
+ ]
21154
+ }, e.manifest))
21155
+ }),
21156
+ skippedRows.length > 0 && /*#__PURE__*/ (0,jsx_runtime.jsx)("ul", {
21157
+ className: "space-y-1",
21158
+ children: skippedRows.map((s)=>/*#__PURE__*/ (0,jsx_runtime.jsxs)("li", {
21159
+ className: "rounded border border-border bg-surface-2 px-2 py-1.5 text-xs text-fg-muted",
21160
+ children: [
21161
+ /*#__PURE__*/ (0,jsx_runtime.jsx)("span", {
21162
+ className: "font-mono",
21163
+ children: s.manifest
21164
+ }),
21165
+ " skipped — ",
21166
+ s.reason
21167
+ ]
21168
+ }, s.manifest))
21169
+ })
21170
+ ]
21171
+ })
21172
+ ]
21173
+ });
21174
+ }
21175
+
20509
21176
  ;// ./components/tools/ToolsPanel.tsx
20510
21177
  /* __next_internal_client_entry_do_not_use__ ToolsPanel auto */
20511
21178
 
@@ -20515,8 +21182,10 @@ function buildIssueHref(query) {
20515
21182
 
20516
21183
 
20517
21184
 
21185
+
20518
21186
  const SUBS = [
20519
21187
  "builtin",
21188
+ "packages",
20520
21189
  "documents",
20521
21190
  "memory",
20522
21191
  "mcp",
@@ -20525,6 +21194,7 @@ const SUBS = [
20525
21194
  ];
20526
21195
  const ToolsPanel_SUB_TITLES = {
20527
21196
  builtin: "Built-in",
21197
+ packages: "LangChain packages",
20528
21198
  documents: "Documents",
20529
21199
  memory: "Memory",
20530
21200
  mcp: "MCP servers",
@@ -20563,6 +21233,7 @@ function ToolsPanel() {
20563
21233
  className: "flex-1 min-h-0 overflow-auto",
20564
21234
  children: [
20565
21235
  active === "builtin" && /*#__PURE__*/ (0,jsx_runtime.jsx)(BuiltinToolsPanel, {}),
21236
+ active === "packages" && /*#__PURE__*/ (0,jsx_runtime.jsx)(LangChainPackagesPanel, {}),
20566
21237
  active === "documents" && /*#__PURE__*/ (0,jsx_runtime.jsx)(DocumentsPanel, {}),
20567
21238
  active === "memory" && /*#__PURE__*/ (0,jsx_runtime.jsx)(MemoryPanel, {}),
20568
21239
  active === "mcp" && /*#__PURE__*/ (0,jsx_runtime.jsx)(MCPPanel, {}),
@@ -27835,7 +28506,7 @@ function AppShell() {
27835
28506
  /***/ 9852:
27836
28507
  /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
27837
28508
 
27838
- Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9197));
28509
+ Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 5123));
27839
28510
  ;
27840
28511
  Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2283));
27841
28512
 
@@ -27845,9 +28516,9 @@ Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_re
27845
28516
  },
27846
28517
  /******/ __webpack_require__ => { // webpackRuntimeModules
27847
28518
  /******/ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
27848
- /******/ __webpack_require__.O(0, [1973,4502,9476,2747,8441,3457,7358], () => (__webpack_exec__(9852)));
28519
+ /******/ __webpack_require__.O(0, [1973,4502,1998,2747,8441,3457,7358], () => (__webpack_exec__(9852)));
27849
28520
  /******/ var __webpack_exports__ = __webpack_require__.O();
27850
28521
  /******/ _N_E = __webpack_exports__;
27851
28522
  /******/ }
27852
28523
  ]);
27853
- //# sourceMappingURL=page-a9dcc924ad127090.js.map
28524
+ //# sourceMappingURL=page-cd662565eba5ef59.js.map