@saadnvd1/agent-os 0.3.770 → 0.3.777

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 (89) hide show
  1. package/app/api/live-shares/[id]/route.ts +72 -0
  2. package/app/api/live-shares/route.test.ts +45 -0
  3. package/app/api/live-shares/route.ts +40 -0
  4. package/app/api/sessions/[id]/artifacts/[artifactId]/compare/route.ts +41 -0
  5. package/app/api/shares/preview/route.ts +6 -1
  6. package/app/api/shares/route.test.ts +51 -0
  7. package/app/page.tsx +6 -0
  8. package/components/Artifacts/ArtifactActions.tsx +27 -3
  9. package/components/Artifacts/ArtifactPreview.tsx +27 -12
  10. package/components/Artifacts/Compare/DiffView.tsx +116 -0
  11. package/components/Artifacts/Compare/SideBySide.tsx +60 -0
  12. package/components/Artifacts/Compare/VersionPicker.tsx +47 -0
  13. package/components/Artifacts/Compare/index.tsx +191 -0
  14. package/components/Chat/ChatPanel.tsx +6 -0
  15. package/components/Chat/EventRow.tsx +6 -0
  16. package/components/Chat/Messages.tsx +6 -0
  17. package/components/Chat/ShareFromHere.tsx +39 -0
  18. package/components/CommandPalette/CommandPalette.tsx +5 -4
  19. package/components/CommandPalette/CommandsBody.tsx +97 -131
  20. package/components/CommandPalette/PaletteRows.tsx +79 -0
  21. package/components/CommandPalette/PaletteTabs.tsx +51 -0
  22. package/components/CommandPalette/conversations/ConversationSearch.tsx +13 -11
  23. package/components/CommandPalette/useAppCommands.ts +14 -0
  24. package/components/CommandPalette/useConversationRows.ts +55 -0
  25. package/components/Live/GuestPromptCard.tsx +64 -0
  26. package/components/Live/InviteDialog.tsx +225 -0
  27. package/components/Live/LiveChip.tsx +109 -0
  28. package/components/Live/LivePanel.tsx +81 -0
  29. package/components/Live/LobbyCard.tsx +64 -0
  30. package/components/Pane/MobileTabBar.tsx +8 -0
  31. package/components/Pane/PaneMenu.tsx +10 -0
  32. package/components/SessionList/SessionRowMenu.tsx +6 -0
  33. package/components/SessionList/useSessionSwitching.ts +2 -2
  34. package/components/Share/MessageList.tsx +87 -0
  35. package/components/Share/RangePicker.tsx +59 -0
  36. package/components/Share/ShareDialog.tsx +113 -52
  37. package/components/Shares/SharedLinksPanel.tsx +51 -0
  38. package/data/live/index.ts +2 -0
  39. package/data/live/keys.ts +4 -0
  40. package/data/live/queries.ts +81 -0
  41. package/data/session-artifacts/keys.ts +2 -0
  42. package/data/session-artifacts/queries.ts +25 -0
  43. package/data/shares/queries.ts +11 -0
  44. package/hooks/usePaletteCommands.ts +4 -1
  45. package/lib/artifacts/actions.ts +11 -1
  46. package/lib/artifacts/compare/compareVersions.ts +66 -0
  47. package/lib/artifacts/compare/diff.ts +178 -0
  48. package/lib/artifacts/compare/extractText.ts +64 -0
  49. package/lib/artifacts/compare/index.ts +11 -0
  50. package/lib/artifacts/compare/types.ts +44 -0
  51. package/lib/artifacts/match.ts +64 -0
  52. package/lib/artifacts/store.ts +39 -10
  53. package/lib/artifacts/tools.ts +9 -4
  54. package/lib/artifacts/versions.ts +2 -1
  55. package/lib/chat/events.ts +4 -1
  56. package/lib/chat/registry.ts +10 -0
  57. package/lib/connect/control-api.ts +44 -0
  58. package/lib/db/migrations/20261029T1400_live_shares.ts +42 -0
  59. package/lib/live/clean.ts +54 -0
  60. package/lib/live/frames.ts +132 -0
  61. package/lib/live/inbox.ts +225 -0
  62. package/lib/live/publisher.ts +84 -0
  63. package/lib/live/ring.ts +61 -0
  64. package/lib/live/runtime.ts +51 -0
  65. package/lib/live/service.ts +318 -0
  66. package/lib/live/socket.ts +293 -0
  67. package/lib/live/store.ts +149 -0
  68. package/lib/live/types.ts +39 -0
  69. package/lib/palette/registry.ts +71 -17
  70. package/lib/palette/sections.ts +143 -0
  71. package/lib/palette/tabs.ts +21 -0
  72. package/lib/palette/usage.ts +81 -0
  73. package/lib/security/demo.ts +3 -0
  74. package/lib/share/connect.ts +24 -0
  75. package/lib/share/markdown.ts +3 -0
  76. package/lib/share/range.ts +189 -0
  77. package/lib/share/redact.ts +23 -1
  78. package/lib/share/render.tsx +3 -0
  79. package/lib/share/secret-patterns.ts +77 -0
  80. package/lib/share/service.ts +64 -19
  81. package/lib/share/snapshot.ts +39 -2
  82. package/lib/share/styles.ts +2 -0
  83. package/lib/share/view.ts +11 -0
  84. package/lib/sidebar/row-menu.ts +2 -0
  85. package/package.json +1 -1
  86. package/server.ts +2 -0
  87. package/stores/liveUi.ts +17 -0
  88. package/stores/palette.ts +13 -11
  89. package/stores/shareUi.ts +6 -1
package/stores/palette.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  import { proxy, ref } from "valtio";
2
- import { PaletteRegistry, type PaletteCommand } from "@/lib/palette/registry";
2
+ import {
3
+ PaletteRegistry,
4
+ type PaletteCommand,
5
+ type PaletteTab,
6
+ } from "@/lib/palette/registry";
3
7
 
4
8
  // A one-off choice in the palette (which project, which machine), in place
5
9
  // of its commands. ⌘1-9 picks the first nine.
@@ -8,20 +12,18 @@ export interface PalettePicker {
8
12
  items: PaletteCommand[];
9
13
  }
10
14
 
11
- export type PaletteMode = "commands" | "conversations";
12
-
13
15
  export const paletteUi = proxy<{
14
16
  open: boolean;
15
17
  picker: PalettePicker | null;
16
- mode: PaletteMode;
17
- // What was typed when the mode changed, so the other mode starts with it.
18
+ tab: PaletteTab;
19
+ // What was typed when the tab changed, so a body that mounts starts with it.
18
20
  query: string;
19
- }>({ open: false, picker: null, mode: "commands", query: "" });
21
+ }>({ open: false, picker: null, tab: "all", query: "" });
20
22
 
21
23
  export const paletteActions = {
22
24
  open: () => {
23
25
  paletteUi.picker = null;
24
- paletteUi.mode = "commands";
26
+ paletteUi.tab = "all";
25
27
  paletteUi.query = "";
26
28
  paletteUi.open = true;
27
29
  },
@@ -29,17 +31,17 @@ export const paletteActions = {
29
31
  paletteUi.open = open;
30
32
  if (!open) {
31
33
  paletteUi.picker = null;
32
- paletteUi.mode = "commands";
34
+ paletteUi.tab = "all";
33
35
  paletteUi.query = "";
34
36
  }
35
37
  },
36
- setMode: (mode: PaletteMode, query = "") => {
38
+ setTab: (tab: PaletteTab, query = "") => {
37
39
  paletteUi.picker = null;
38
- paletteUi.mode = mode;
40
+ paletteUi.tab = tab;
39
41
  paletteUi.query = query;
40
42
  },
41
43
  pick: (placeholder: string, items: PaletteCommand[]) => {
42
- paletteUi.mode = "commands";
44
+ paletteUi.tab = "all";
43
45
  paletteUi.picker = ref({
44
46
  placeholder,
45
47
  items: items.map((c, i) => (i < 9 ? { ...c, hint: `⌘${i + 1}` } : c)),
package/stores/shareUi.ts CHANGED
@@ -5,7 +5,12 @@ import type { ShareTarget } from "@/data/shares";
5
5
  // menu, the pane or the artifact card.
6
6
  // A page's version, when it has more than one, is named in the title; the
7
7
  // share is of that exact version.
8
- export type ShareUiTarget = ShareTarget & { title: string; version?: number };
8
+ // A chat share can start from one message ("Share from here").
9
+ export type ShareUiTarget = ShareTarget & {
10
+ title: string;
11
+ version?: number;
12
+ fromId?: string;
13
+ };
9
14
 
10
15
  export const shareUi = proxy<{
11
16
  target: ShareUiTarget | null;