@saadnvd1/agent-os 0.3.853 → 0.3.859
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/app/api/leads/adopt/route.ts +35 -0
- package/app/api/leads/proposals/route.ts +52 -0
- package/app/api/leads/route.test.ts +95 -0
- package/app/api/leads/route.ts +60 -0
- package/app/api/sessions/[id]/fresh/route.ts +2 -1
- package/app/api/sessions/[id]/route.ts +9 -1
- package/app/api/tmux/kill-all/route.ts +2 -1
- package/app/api/workspaces/[id]/orchestrator/tools/route.test.ts +43 -0
- package/app/api/workspaces/[id]/orchestrator/tools/route.ts +14 -11
- package/components/Analyst/pair.ts +2 -1
- package/components/Chat/ChatPanel.tsx +1 -0
- package/components/Orchestrator/AskCard.tsx +6 -0
- package/components/Orchestrator/NeedsYouStrip.tsx +7 -2
- package/components/Pane/index.tsx +5 -7
- package/components/Schedules/ScheduleForm.tsx +2 -1
- package/components/SessionList/RowSubtitle.tsx +2 -1
- package/components/SessionList/SessionRow.tsx +2 -1
- package/components/SessionList/useSidebarData.ts +8 -3
- package/content/whats-new.json +16 -0
- package/hooks/useNeedsYou.ts +10 -4
- package/hooks/useOrchestratorHeader.ts +2 -1
- package/lib/analyst/createLink.ts +3 -1
- package/lib/away/report.ts +2 -1
- package/lib/bus/format.ts +4 -1
- package/lib/bus/index.ts +9 -2
- package/lib/bus/read-scope.ts +4 -3
- package/lib/bus/resolve.ts +4 -1
- package/lib/bus/role-alias.ts +2 -1
- package/lib/bus/targets.ts +8 -3
- package/lib/bus/waits/tick.ts +2 -1
- package/lib/chat/compact-context.ts +2 -1
- package/lib/chat/mention-roots.ts +2 -1
- package/lib/chat/runner.ts +3 -2
- package/lib/chat/settings.ts +3 -2
- package/lib/chat/worker/extras.ts +4 -1
- package/lib/chat/worker/host.ts +6 -5
- package/lib/db/migrations/20261102T1944_leads.ts +142 -0
- package/lib/db/migrations/20261102T2300_needs_you_chat_per_session.ts +24 -0
- package/lib/db/session-parts/columns.ts +2 -0
- package/lib/db/types.ts +10 -2
- package/lib/done/archive.ts +3 -2
- package/lib/done/auto-archive.ts +2 -1
- package/lib/done/bulk.ts +4 -3
- package/lib/done/index.ts +3 -2
- package/lib/done/plan.ts +5 -2
- package/lib/experiments/registry.ts +11 -0
- package/lib/experiments/view.ts +3 -1
- package/lib/fork/brief.ts +2 -2
- package/lib/fork/extras.ts +4 -2
- package/lib/fork/guard.ts +4 -2
- package/lib/fork/scratch.ts +102 -12
- package/lib/fork/settle.ts +31 -7
- package/lib/fork/start.ts +5 -4
- package/lib/fork/tick.ts +19 -0
- package/lib/fork/worktree.ts +7 -3
- package/lib/health/env/sendFixNotes.ts +3 -2
- package/lib/hosts/peer-actions.ts +2 -1
- package/lib/hosts/peer-sessions.ts +3 -1
- package/lib/leads/actor.ts +16 -0
- package/lib/leads/adopt.ts +150 -0
- package/lib/leads/area.ts +77 -0
- package/lib/leads/brief-common.ts +122 -0
- package/lib/leads/brief.ts +155 -0
- package/lib/leads/charters.ts +99 -0
- package/lib/leads/deliver.ts +24 -0
- package/lib/leads/digest.ts +166 -0
- package/lib/leads/direction.ts +202 -0
- package/lib/leads/home.ts +196 -0
- package/lib/leads/index.ts +8 -0
- package/lib/leads/memos.ts +70 -0
- package/lib/leads/messages.ts +112 -0
- package/lib/leads/profiles.ts +83 -0
- package/lib/leads/roles.ts +114 -0
- package/lib/leads/settings.ts +55 -0
- package/lib/leads/templates.ts +51 -0
- package/lib/leads/tools.ts +159 -0
- package/lib/leads/types.ts +88 -0
- package/lib/leads/usage.ts +46 -0
- package/lib/learning-cards/input.ts +2 -1
- package/lib/live/drive.ts +2 -1
- package/lib/models/launch.ts +2 -1
- package/lib/models/session-role.ts +2 -1
- package/lib/needs-you.ts +12 -6
- package/lib/notify/index.ts +2 -1
- package/lib/orchestrator/act.ts +3 -1
- package/lib/orchestrator/ask-tool.ts +10 -0
- package/lib/orchestrator/ask-view.ts +2 -0
- package/lib/orchestrator/asks.ts +48 -8
- package/lib/orchestrator/brief.ts +32 -67
- package/lib/orchestrator/digest.ts +3 -2
- package/lib/orchestrator/facts.ts +2 -1
- package/lib/orchestrator/full-access.ts +2 -1
- package/lib/orchestrator/home.ts +8 -7
- package/lib/orchestrator/mcp-servers.ts +7 -6
- package/lib/orchestrator/notes.ts +15 -4
- package/lib/orchestrator/overview.ts +3 -1
- package/lib/orchestrator/recipe-tools.ts +2 -1
- package/lib/orchestrator/reminders.ts +2 -1
- package/lib/orchestrator/tools.ts +43 -13
- package/lib/orchestrator/worker.ts +45 -13
- package/lib/orchestrator/write-guard.ts +2 -2
- package/lib/projects.ts +3 -2
- package/lib/resurrect/find.ts +2 -1
- package/lib/resurrect/index.ts +3 -2
- package/lib/schedules/index.ts +3 -2
- package/lib/schedules/start.ts +2 -1
- package/lib/schedules/store.ts +3 -2
- package/lib/session-audit/sources.ts +4 -3
- package/lib/session-groups/workspace.ts +2 -1
- package/lib/sessions/launch.ts +2 -1
- package/lib/sidebar/machines.ts +2 -1
- package/lib/sidebar/row-actions.ts +2 -1
- package/lib/sidebar/row-badge.ts +3 -1
- package/lib/sidebar/row-menu.ts +6 -3
- package/lib/sidebar/shelves.ts +3 -3
- package/lib/status/collect.ts +4 -3
- package/lib/tasks/held-replies.ts +2 -1
- package/lib/tasks/move-targets.ts +2 -1
- package/lib/tasks/pause.ts +2 -1
- package/lib/tasks/starter.ts +3 -2
- package/lib/workspaces.ts +4 -3
- package/lib/worktree-sweep/findSettled.ts +2 -1
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* machine's own record (started_by), never anything the other machine names.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
import { sqlStanding } from "../leads/roles";
|
|
9
10
|
import { db, type Session } from "../db";
|
|
10
11
|
import { sendMessage } from "../bus";
|
|
11
12
|
import type { HostLink } from "../hosts/remote-api";
|
|
@@ -29,7 +30,7 @@ interface Pulled {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
// Held means an orchestrator started it, as isHeldRemote reads it (contract/held-calls.ts).
|
|
32
|
-
const HELD_BY = `started_by IN (SELECT id FROM sessions WHERE
|
|
33
|
+
const HELD_BY = `started_by IN (SELECT id FROM sessions WHERE ${sqlStanding()})`;
|
|
33
34
|
|
|
34
35
|
const heldMirror = (hostId: string, id: string) =>
|
|
35
36
|
db
|
|
@@ -74,7 +74,7 @@ export function movableSession(s: {
|
|
|
74
74
|
moving: s.task_status === "moving",
|
|
75
75
|
movedTo: s.moved_to,
|
|
76
76
|
branch: s.branch_name,
|
|
77
|
-
pinnedHere: !!s.lh_card_id ||
|
|
77
|
+
pinnedHere: !!s.lh_card_id || isStandingRole(s.role),
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
|
|
@@ -95,3 +95,4 @@ export function movableTask(t: {
|
|
|
95
95
|
pinnedHere: !!t.cardUrl,
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
+
import { isStandingRole } from "../leads/roles";
|
package/lib/tasks/pause.ts
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* the sweep re-drives each state after a restart.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
+
import { isStandingRole } from "../leads/roles";
|
|
16
17
|
import { db, type Session, type TaskPause } from "../db";
|
|
17
18
|
import { toSqliteTime } from "../session-meta";
|
|
18
19
|
import { endPause, endPauseOnFinish, formatUntil } from "./pause-hold";
|
|
@@ -102,7 +103,7 @@ function factsOf(s: Session): PauseFacts {
|
|
|
102
103
|
.get(s.id);
|
|
103
104
|
return {
|
|
104
105
|
isTask: !!s.task_status,
|
|
105
|
-
isOrchestrator: s.role
|
|
106
|
+
isOrchestrator: isStandingRole(s.role),
|
|
106
107
|
isQuickChange: !!s.quick_of,
|
|
107
108
|
isRemote: isRemoteHost(s.host_id) || !!s.peer_mirror,
|
|
108
109
|
taskStatus: s.task_status ?? null,
|
package/lib/tasks/starter.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// calling task, chat or orchestrator; null for a person), parent_session_id
|
|
3
3
|
// the session it came from, started_via how it began.
|
|
4
4
|
|
|
5
|
+
import { isStandingRole } from "../leads/roles";
|
|
5
6
|
import path from "path";
|
|
6
7
|
import { db } from "../db";
|
|
7
8
|
import { setPlacement } from "../db/session-parts";
|
|
@@ -86,7 +87,7 @@ export function starterOf(
|
|
|
86
87
|
return {
|
|
87
88
|
startedBy: caller.id,
|
|
88
89
|
parentSessionId: caller.id,
|
|
89
|
-
startedVia: caller.role
|
|
90
|
+
startedVia: isStandingRole(caller.role) ? "orchestrator" : "session",
|
|
90
91
|
};
|
|
91
92
|
}
|
|
92
93
|
|
|
@@ -104,7 +105,7 @@ export function orchestratorOf(startedBy: string | null | undefined) {
|
|
|
104
105
|
.get(id) as
|
|
105
106
|
{ role: string | null; started_by: string | null } | undefined;
|
|
106
107
|
if (!row) return null;
|
|
107
|
-
if (row.role
|
|
108
|
+
if (isStandingRole(row.role)) return id;
|
|
108
109
|
id = row.started_by;
|
|
109
110
|
}
|
|
110
111
|
return null;
|
package/lib/workspaces.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* presentation only: deleting one leaves its projects ungrouped.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { sqlNoRole, sqlStanding } from "./leads/roles";
|
|
6
7
|
import { randomUUID } from "crypto";
|
|
7
8
|
import { db, type Workspace } from "./db";
|
|
8
9
|
import { clearForeignGroup } from "./session-groups/assignSessions";
|
|
@@ -119,11 +120,11 @@ export function deleteWorkspace(id: string): void {
|
|
|
119
120
|
// Sessions filed here by being started here go back to "All workspaces".
|
|
120
121
|
db.prepare(
|
|
121
122
|
`UPDATE sessions SET workspace_id = NULL
|
|
122
|
-
WHERE
|
|
123
|
+
WHERE ${sqlNoRole()} AND workspace_id = ?`
|
|
123
124
|
).run(id);
|
|
124
|
-
// Its orchestrator
|
|
125
|
+
// Its orchestrator, leads and chief go with it; a running worker idles out on its own.
|
|
125
126
|
db.prepare(
|
|
126
|
-
`DELETE FROM sessions WHERE
|
|
127
|
+
`DELETE FROM sessions WHERE ${sqlStanding()} AND workspace_id = ?`
|
|
127
128
|
).run(id);
|
|
128
129
|
for (const table of [
|
|
129
130
|
"orchestrator_events",
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Everything else is skipped with the reason.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import { isStandingRole, roleLabel } from "../leads/roles";
|
|
7
8
|
import fs from "fs";
|
|
8
9
|
import { db, type Session } from "../db";
|
|
9
10
|
import { fromSqliteTime } from "../session-meta";
|
|
@@ -67,7 +68,7 @@ export async function findSettled(
|
|
|
67
68
|
if (!isSettled(s) || !isAgentOSWorktree(dir) || !fs.existsSync(dir))
|
|
68
69
|
continue;
|
|
69
70
|
const skip = async (): Promise<string | null> => {
|
|
70
|
-
if (s.role) return
|
|
71
|
+
if (isStandingRole(s.role)) return `${roleLabel(s.role)}'s`;
|
|
71
72
|
if (s.pinned) return "pinned";
|
|
72
73
|
if (s.moved_to)
|
|
73
74
|
return "its task moved to another machine and may come back";
|