@cryptiklemur/lattice 0.0.0 → 1.2.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 (53) hide show
  1. package/.github/workflows/release.yml +4 -4
  2. package/.releaserc.json +2 -1
  3. package/client/src/components/auth/PassphrasePrompt.tsx +70 -70
  4. package/client/src/components/mesh/NodeBadge.tsx +24 -24
  5. package/client/src/components/mesh/PairingDialog.tsx +281 -281
  6. package/client/src/components/panels/FileBrowser.tsx +241 -241
  7. package/client/src/components/panels/StickyNotes.tsx +187 -187
  8. package/client/src/components/project-settings/ProjectMemory.tsx +471 -0
  9. package/client/src/components/project-settings/ProjectSettingsView.tsx +6 -0
  10. package/client/src/components/settings/Appearance.tsx +151 -151
  11. package/client/src/components/settings/MeshStatus.tsx +145 -145
  12. package/client/src/components/settings/SettingsView.tsx +57 -57
  13. package/client/src/components/setup/SetupWizard.tsx +750 -750
  14. package/client/src/components/sidebar/AddProjectModal.tsx +432 -0
  15. package/client/src/components/sidebar/ProjectRail.tsx +8 -4
  16. package/client/src/components/sidebar/SettingsSidebar.tsx +2 -1
  17. package/client/src/components/ui/ErrorBoundary.tsx +56 -56
  18. package/client/src/hooks/useSidebar.ts +16 -0
  19. package/client/src/router.tsx +453 -391
  20. package/client/src/stores/sidebar.ts +28 -0
  21. package/client/vite.config.ts +20 -20
  22. package/package.json +1 -1
  23. package/server/src/daemon.ts +1 -0
  24. package/server/src/handlers/chat.ts +194 -194
  25. package/server/src/handlers/fs.ts +159 -0
  26. package/server/src/handlers/memory.ts +179 -0
  27. package/server/src/handlers/settings.ts +114 -109
  28. package/shared/src/messages.ts +97 -2
  29. package/shared/src/project-settings.ts +1 -1
  30. package/themes/amoled.json +20 -20
  31. package/themes/ayu-light.json +9 -9
  32. package/themes/catppuccin-latte.json +9 -9
  33. package/themes/catppuccin-mocha.json +9 -9
  34. package/themes/clay-light.json +10 -10
  35. package/themes/clay.json +10 -10
  36. package/themes/dracula.json +9 -9
  37. package/themes/everforest-light.json +9 -9
  38. package/themes/everforest.json +9 -9
  39. package/themes/github-light.json +9 -9
  40. package/themes/gruvbox-dark.json +9 -9
  41. package/themes/gruvbox-light.json +9 -9
  42. package/themes/monokai.json +9 -9
  43. package/themes/nord-light.json +9 -9
  44. package/themes/nord.json +9 -9
  45. package/themes/one-dark.json +9 -9
  46. package/themes/one-light.json +9 -9
  47. package/themes/rose-pine-dawn.json +9 -9
  48. package/themes/rose-pine.json +9 -9
  49. package/themes/solarized-dark.json +9 -9
  50. package/themes/solarized-light.json +9 -9
  51. package/themes/tokyo-night-light.json +9 -9
  52. package/themes/tokyo-night.json +9 -9
  53. package/.serena/project.yml +0 -138
@@ -15,9 +15,10 @@ jobs:
15
15
  release:
16
16
  name: Release
17
17
  runs-on: ubuntu-latest
18
+ environment: npm
18
19
  steps:
19
20
  - name: Checkout
20
- uses: actions/checkout@v4
21
+ uses: actions/checkout@v5
21
22
  with:
22
23
  fetch-depth: 0
23
24
 
@@ -27,10 +28,9 @@ jobs:
27
28
  bun-version: latest
28
29
 
29
30
  - name: Setup Node.js
30
- uses: actions/setup-node@v4
31
+ uses: actions/setup-node@v5
31
32
  with:
32
- node-version: 22
33
- registry-url: https://registry.npmjs.org
33
+ node-version: 24
34
34
 
35
35
  - name: Install dependencies
36
36
  run: bun install --frozen-lockfile
package/.releaserc.json CHANGED
@@ -22,7 +22,8 @@
22
22
  [
23
23
  "@semantic-release/npm",
24
24
  {
25
- "pkgRoot": "."
25
+ "pkgRoot": ".",
26
+ "npmPublish": true
26
27
  }
27
28
  ],
28
29
  [
@@ -1,70 +1,70 @@
1
- import { useState } from "react";
2
-
3
- export function PassphrasePrompt() {
4
- var [passphrase, setPassphrase] = useState("");
5
- var [error, setError] = useState("");
6
- var [loading, setLoading] = useState(false);
7
-
8
- function handleSubmit(e: React.FormEvent) {
9
- e.preventDefault();
10
- setError("");
11
- setLoading(true);
12
-
13
- fetch("/auth", {
14
- method: "POST",
15
- headers: { "Content-Type": "application/json" },
16
- body: JSON.stringify({ passphrase }),
17
- })
18
- .then(function (res) {
19
- if (res.ok) {
20
- window.location.reload();
21
- } else {
22
- setError("Invalid passphrase.");
23
- setLoading(false);
24
- }
25
- })
26
- .catch(function () {
27
- setError("Connection error.");
28
- setLoading(false);
29
- });
30
- }
31
-
32
- return (
33
- <div className="min-h-screen bg-base-100 flex items-center justify-center">
34
- <div className="card bg-base-200 border border-base-300 w-full max-w-[340px] shadow-xl">
35
- <div className="card-body p-10">
36
- <h1 className="text-[15px] font-bold tracking-[0.12em] uppercase text-base-content/60 mb-7">
37
- Lattice
38
- </h1>
39
- <form onSubmit={handleSubmit} className="flex flex-col gap-4">
40
- <fieldset className="fieldset">
41
- <legend className="fieldset-legend text-[11px] uppercase tracking-[0.1em] text-base-content/40">
42
- Passphrase
43
- </legend>
44
- <input
45
- id="passphrase"
46
- type="password"
47
- value={passphrase}
48
- onChange={function (e) { setPassphrase(e.target.value); }}
49
- autoFocus
50
- autoComplete="current-password"
51
- disabled={loading}
52
- className="input input-bordered w-full bg-base-100 text-base-content text-[14px]"
53
- />
54
- </fieldset>
55
- <button
56
- type="submit"
57
- disabled={loading}
58
- className={"btn btn-primary w-full mt-1 " + (loading ? "cursor-not-allowed" : "")}
59
- >
60
- {loading ? "Authenticating..." : "Authenticate"}
61
- </button>
62
- {error && (
63
- <p className="text-[12px] text-error text-center">{error}</p>
64
- )}
65
- </form>
66
- </div>
67
- </div>
68
- </div>
69
- );
70
- }
1
+ import { useState } from "react";
2
+
3
+ export function PassphrasePrompt() {
4
+ var [passphrase, setPassphrase] = useState("");
5
+ var [error, setError] = useState("");
6
+ var [loading, setLoading] = useState(false);
7
+
8
+ function handleSubmit(e: React.FormEvent) {
9
+ e.preventDefault();
10
+ setError("");
11
+ setLoading(true);
12
+
13
+ fetch("/auth", {
14
+ method: "POST",
15
+ headers: { "Content-Type": "application/json" },
16
+ body: JSON.stringify({ passphrase }),
17
+ })
18
+ .then(function (res) {
19
+ if (res.ok) {
20
+ window.location.reload();
21
+ } else {
22
+ setError("Invalid passphrase.");
23
+ setLoading(false);
24
+ }
25
+ })
26
+ .catch(function () {
27
+ setError("Connection error.");
28
+ setLoading(false);
29
+ });
30
+ }
31
+
32
+ return (
33
+ <div className="min-h-screen bg-base-100 flex items-center justify-center">
34
+ <div className="card bg-base-200 border border-base-300 w-full max-w-[340px] shadow-xl">
35
+ <div className="card-body p-10">
36
+ <h1 className="text-[15px] font-bold tracking-[0.12em] uppercase text-base-content/60 mb-7">
37
+ Lattice
38
+ </h1>
39
+ <form onSubmit={handleSubmit} className="flex flex-col gap-4">
40
+ <fieldset className="fieldset">
41
+ <legend className="fieldset-legend text-[11px] uppercase tracking-[0.1em] text-base-content/40">
42
+ Passphrase
43
+ </legend>
44
+ <input
45
+ id="passphrase"
46
+ type="password"
47
+ value={passphrase}
48
+ onChange={function (e) { setPassphrase(e.target.value); }}
49
+ autoFocus
50
+ autoComplete="current-password"
51
+ disabled={loading}
52
+ className="input input-bordered w-full bg-base-100 text-base-content text-[14px]"
53
+ />
54
+ </fieldset>
55
+ <button
56
+ type="submit"
57
+ disabled={loading}
58
+ className={"btn btn-primary w-full mt-1 " + (loading ? "cursor-not-allowed" : "")}
59
+ >
60
+ {loading ? "Authenticating..." : "Authenticate"}
61
+ </button>
62
+ {error && (
63
+ <p className="text-[12px] text-error text-center">{error}</p>
64
+ )}
65
+ </form>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ );
70
+ }
@@ -1,24 +1,24 @@
1
- import type { NodeInfo } from "@lattice/shared";
2
-
3
- interface NodeBadgeProps {
4
- node: NodeInfo;
5
- }
6
-
7
- export function NodeBadge(props: NodeBadgeProps) {
8
- var initials = props.node.name.slice(0, 2).toUpperCase();
9
-
10
- return (
11
- <span
12
- title={props.node.name + (props.node.online ? " (online)" : " (offline)")}
13
- className="inline-flex items-center gap-[3px] px-[5px] py-[1px] rounded-full bg-base-300 border border-base-content/15 text-[10px] font-semibold text-base-content/40 tracking-[0.03em] flex-shrink-0"
14
- >
15
- <span
16
- className={
17
- "w-[5px] h-[5px] rounded-full flex-shrink-0 inline-block " +
18
- (props.node.online ? "bg-success" : "bg-base-content/30")
19
- }
20
- />
21
- {initials}
22
- </span>
23
- );
24
- }
1
+ import type { NodeInfo } from "@lattice/shared";
2
+
3
+ interface NodeBadgeProps {
4
+ node: NodeInfo;
5
+ }
6
+
7
+ export function NodeBadge(props: NodeBadgeProps) {
8
+ var initials = props.node.name.slice(0, 2).toUpperCase();
9
+
10
+ return (
11
+ <span
12
+ title={props.node.name + (props.node.online ? " (online)" : " (offline)")}
13
+ className="inline-flex items-center gap-[3px] px-[5px] py-[1px] rounded-full bg-base-300 border border-base-content/15 text-[10px] font-semibold text-base-content/40 tracking-[0.03em] flex-shrink-0"
14
+ >
15
+ <span
16
+ className={
17
+ "w-[5px] h-[5px] rounded-full flex-shrink-0 inline-block " +
18
+ (props.node.online ? "bg-success" : "bg-base-content/30")
19
+ }
20
+ />
21
+ {initials}
22
+ </span>
23
+ );
24
+ }