@saadnvd1/agent-os 0.3.845 → 0.3.851

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 (80) hide show
  1. package/README.md +6 -0
  2. package/app/api/approvals/route.ts +5 -1
  3. package/app/api/health/config/route.ts +2 -0
  4. package/app/api/updates/run/route.ts +7 -3
  5. package/app/globals.css +6 -0
  6. package/components/Audits/AuditsPanel.tsx +42 -35
  7. package/components/Chat/quote-selection.test.ts +6 -0
  8. package/components/Chat/quote-selection.ts +13 -10
  9. package/components/Devices/ConnectCard.tsx +52 -56
  10. package/components/Devices/DeviceGroupRow.tsx +65 -0
  11. package/components/Devices/DeviceRow.tsx +2 -2
  12. package/components/Devices/DevicesPanel.tsx +63 -49
  13. package/components/Devices/NetworkSection.tsx +29 -26
  14. package/components/Devices/TailscaleCard.tsx +9 -10
  15. package/components/Devices/group.test.ts +66 -0
  16. package/components/Devices/group.ts +67 -0
  17. package/components/Health/HealthPanel.tsx +5 -81
  18. package/components/Health/MachineChecks.tsx +20 -0
  19. package/components/Health/SweepRuns.tsx +46 -51
  20. package/components/Health/Thresholds.tsx +50 -0
  21. package/components/Merge/GlobalMergeSection.tsx +5 -6
  22. package/components/Merge/MergeApprovalToggle.tsx +20 -14
  23. package/components/Merge/MergeSettingsFields.tsx +0 -2
  24. package/components/Merge/WorktreeSweepSection.tsx +15 -34
  25. package/components/Models/AgentRoleCard.tsx +7 -7
  26. package/components/Models/ModelSelect.tsx +14 -3
  27. package/components/Models/ModelsSection.tsx +42 -37
  28. package/components/Models/ProviderCard.tsx +1 -1
  29. package/components/Models/RoleModelSelect.tsx +15 -3
  30. package/components/Models/SubagentModels.tsx +60 -45
  31. package/components/PhoneNotify/PhoneNotifyForm.tsx +6 -13
  32. package/components/Recipes/RecipesPanel.tsx +20 -9
  33. package/components/Recipes/RunHistory.tsx +1 -1
  34. package/components/Schedules/SchedulesPanel.tsx +12 -10
  35. package/components/Settings/AppWideLimits.tsx +2 -2
  36. package/components/Settings/{NoApprovalsSection.test.ts → ApprovalsSection.test.ts} +61 -22
  37. package/components/Settings/ApprovalsSection.tsx +93 -0
  38. package/components/Settings/ExperimentsSection.test.ts +20 -4
  39. package/components/Settings/ExperimentsSection.tsx +54 -34
  40. package/components/Settings/GeneralSection.tsx +39 -0
  41. package/components/Settings/ListSection.test.ts +85 -0
  42. package/components/Settings/ListSection.tsx +132 -0
  43. package/components/Settings/NotificationsSection.tsx +31 -29
  44. package/components/Settings/PickerSetting.tsx +5 -1
  45. package/components/Settings/SettingRow.tsx +13 -8
  46. package/components/Settings/SettingsDialog.test.ts +31 -4
  47. package/components/Settings/SettingsDialog.tsx +22 -17
  48. package/components/Settings/ValueLabel.tsx +31 -0
  49. package/components/Settings/settings-fields.test.ts +81 -2
  50. package/components/Settings/settings-fields.tsx +27 -27
  51. package/components/Shares/SharedLinksPanel.tsx +11 -14
  52. package/components/Updates/AutoUpdates.tsx +12 -8
  53. package/components/Updates/UpdateActions.tsx +18 -3
  54. package/components/Updates/UpdateToast.test.ts +17 -0
  55. package/components/Updates/UpdateToast.tsx +15 -5
  56. package/components/Updates/UpdatesSection.tsx +27 -18
  57. package/components/Workspaces/WorkspaceSettings.test.ts +5 -5
  58. package/components/Workspaces/WorkspaceSettings.tsx +0 -2
  59. package/components/ui/switch.tsx +1 -1
  60. package/content/whats-new.json +24 -0
  61. package/data/approvals/index.ts +2 -2
  62. package/data/health/index.ts +3 -0
  63. package/hooks/useAutoSave.ts +18 -5
  64. package/hooks/useReloadWhenUpdated.ts +9 -0
  65. package/hooks/useSettingsUrl.ts +6 -3
  66. package/lib/approvals/describe.ts +64 -0
  67. package/lib/health/config.ts +70 -17
  68. package/lib/models/providers.ts +1 -1
  69. package/lib/recipes/settle.ts +22 -0
  70. package/lib/settings-url.ts +14 -2
  71. package/lib/updates/banner.ts +12 -2
  72. package/lib/updates/request.ts +29 -0
  73. package/lib/updates/run.ts +24 -5
  74. package/lib/updates/view.ts +3 -0
  75. package/package.json +1 -1
  76. package/scripts/autodeploy +25 -3
  77. package/scripts/autodeploy.test.ts +47 -0
  78. package/components/Settings/NoApprovalsSection.tsx +0 -103
  79. package/components/Settings/SettingToggle.tsx +0 -36
  80. package/components/Settings/SetupSection.tsx +0 -46
@@ -1,103 +0,0 @@
1
- "use client";
2
-
3
- import { useState } from "react";
4
- import { Button } from "@/components/ui/button";
5
- import { SettingToggle } from "@/components/Settings/SettingToggle";
6
- import { useApprovalsModeQuery, useSetApprovalsMode } from "@/data/approvals";
7
-
8
- // What it switches off, said plainly before it can be switched on.
9
- export const NO_APPROVALS_WARNING = [
10
- "Every ask is approved the moment it is raised, hard lines included: public posts and messages, money, irreversible or destructive changes, credentials.",
11
- "A PR stuck failing its gates, with no CI, or too big to review still merges.",
12
- "Brakes stop holding new starts. Plan-only tasks still wait for approve_plan.",
13
- "Every agent AgentOS starts runs with its permission prompts off, and prompts already waiting are allowed.",
14
- ];
15
-
16
- export function NoApprovalsSection() {
17
- const { data, isPending, isError, error } = useApprovalsModeQuery();
18
- const set = useSetApprovalsMode();
19
- const [confirming, setConfirming] = useState(false);
20
-
21
- if (isPending)
22
- return <div className="bg-muted/40 h-16 animate-pulse rounded-lg" />;
23
- if (isError)
24
- return <p className="text-destructive text-sm">{error.message}</p>;
25
-
26
- return (
27
- <div className="space-y-3">
28
- <SettingToggle
29
- title="No approvals"
30
- detail="Shuts off every approval AgentOS would otherwise wait on, and every agent's permission prompts. Off by default."
31
- checked={data.on}
32
- onChange={(on) => {
33
- if (on) setConfirming(true);
34
- else set.mutate(false);
35
- }}
36
- />
37
- {confirming && !data.on && (
38
- <div
39
- role="alertdialog"
40
- aria-label="Turn on No approvals"
41
- className="rounded-lg border border-red-500/20 bg-red-500/10 p-3"
42
- >
43
- <p className="mb-2 text-sm font-medium text-red-400">
44
- Turn on No approvals?
45
- </p>
46
- <ul className="text-muted-foreground mb-3 list-disc space-y-1 pl-5 text-xs">
47
- {NO_APPROVALS_WARNING.map((line) => (
48
- <li key={line}>{line}</li>
49
- ))}
50
- <li>
51
- Terminals already running in an agent other than Claude keep
52
- asking until they are restarted. Each approval made for you is
53
- logged below.
54
- </li>
55
- </ul>
56
- <div className="flex gap-2">
57
- <Button
58
- size="sm"
59
- variant="destructive"
60
- disabled={set.isPending}
61
- onClick={() =>
62
- set.mutate(true, { onSuccess: () => setConfirming(false) })
63
- }
64
- >
65
- {set.isPending ? "Turning on..." : "Turn on No approvals"}
66
- </Button>
67
- <Button
68
- size="sm"
69
- variant="ghost"
70
- disabled={set.isPending}
71
- onClick={() => setConfirming(false)}
72
- >
73
- Cancel
74
- </Button>
75
- </div>
76
- </div>
77
- )}
78
- {set.error && (
79
- <p className="text-destructive text-xs">{set.error.message}</p>
80
- )}
81
- <div>
82
- <p className="mb-1 text-sm font-medium">Approved for you</p>
83
- {data.audit.length === 0 ? (
84
- <p className="text-muted-foreground text-xs">Nothing yet.</p>
85
- ) : (
86
- <ul className="space-y-1">
87
- {data.audit.map((row) => (
88
- <li key={row.id} className="text-xs">
89
- <span className="text-muted-foreground">
90
- {row.at} · {row.source} ·{" "}
91
- </span>
92
- {row.subject}
93
- {row.detail ? (
94
- <span className="text-muted-foreground"> ({row.detail})</span>
95
- ) : null}
96
- </li>
97
- ))}
98
- </ul>
99
- )}
100
- </div>
101
- </div>
102
- );
103
- }
@@ -1,36 +0,0 @@
1
- "use client";
2
-
3
- import { Switch } from "@/components/ui/switch";
4
-
5
- // One labelled switch on a Settings page; a locked one says so.
6
- export function SettingToggle({
7
- title,
8
- detail,
9
- checked,
10
- locked,
11
- onChange,
12
- }: {
13
- title: string;
14
- detail: string;
15
- checked: boolean;
16
- locked?: boolean;
17
- onChange: (on: boolean) => void;
18
- }) {
19
- return (
20
- <label className="bg-muted/40 flex items-start gap-3 rounded-lg px-3 py-2.5">
21
- <div className="min-w-0 flex-1">
22
- <p className="text-sm font-medium">{title}</p>
23
- <p className="text-muted-foreground text-xs">
24
- {detail}
25
- {locked ? " Can't be changed from here." : ""}
26
- </p>
27
- </div>
28
- <Switch
29
- checked={checked}
30
- disabled={locked}
31
- onCheckedChange={onChange}
32
- className="mt-0.5"
33
- />
34
- </label>
35
- );
36
- }
@@ -1,46 +0,0 @@
1
- "use client";
2
-
3
- import { Button } from "@/components/ui/button";
4
- import { HealthList } from "@/components/Welcome/HealthList";
5
- import { AgentList } from "@/components/Welcome/AgentList";
6
- import { ReachRow } from "@/components/Reach/ReachRow";
7
- import { OwnerNameRow } from "./OwnerNameRow";
8
- import { settingsUiActions } from "@/stores/settingsUi";
9
- import { welcomeUiActions } from "@/stores/welcomeUi";
10
-
11
- // What this machine has for running AgentOS and agents, and the first-run setup again.
12
- export function SetupSection() {
13
- return (
14
- <div className="flex flex-col gap-4">
15
- <OwnerNameRow />
16
- <div className="bg-muted/40 flex items-center gap-3 rounded-lg px-3 py-2.5">
17
- <div className="min-w-0 flex-1">
18
- <p className="text-sm font-medium">First-run setup</p>
19
- <p className="text-muted-foreground text-xs">
20
- Agents, your first project, and a first session.
21
- </p>
22
- </div>
23
- <Button
24
- size="sm"
25
- variant="outline"
26
- className="min-h-11 sm:min-h-8"
27
- onClick={() => {
28
- settingsUiActions.close();
29
- welcomeUiActions.open("agents");
30
- }}
31
- >
32
- Run setup again
33
- </Button>
34
- </div>
35
- <div className="flex flex-col gap-2">
36
- <h3 className="text-sm font-medium">Health</h3>
37
- <HealthList />
38
- <ReachRow />
39
- </div>
40
- <div className="flex flex-col gap-2">
41
- <h3 className="text-sm font-medium">Agents on this machine</h3>
42
- <AgentList />
43
- </div>
44
- </div>
45
- );
46
- }