@saadnvd1/agent-os 0.3.819 → 0.3.821
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/client-config/route.test.ts +3 -1
- package/app/api/owner/route.test.ts +27 -0
- package/app/api/owner/route.ts +17 -0
- package/app/api/workspaces/[id]/orchestrator/rules/[ruleId]/route.ts +2 -2
- package/app/api/workspaces/[id]/orchestrator/rules/presence.ts +1 -1
- package/app/api/workspaces/[id]/orchestrator/rules/route.ts +2 -2
- package/app/api/workspaces/[id]/orchestrator/tools/route.ts +6 -1
- package/app/api/worktree-sweep/route.ts +2 -2
- package/components/Chat/EventRow.tsx +5 -2
- package/components/Chat/Messages.tsx +9 -2
- package/components/SessionList/statusDot.test.ts +1 -1
- package/components/Settings/OwnerNameRow.tsx +55 -0
- package/components/Settings/SetupSection.tsx +2 -0
- package/content/whats-new.json +8 -0
- package/data/client-config/queries.ts +3 -0
- package/data/owner/mutations.ts +19 -0
- package/lib/approvals/enable.ts +2 -1
- package/lib/artifacts/tools.ts +2 -1
- package/lib/away/brief.ts +2 -1
- package/lib/away/run.ts +5 -4
- package/lib/away/sweep.ts +2 -1
- package/lib/chat/runner.ts +2 -1
- package/lib/chat/turns.ts +1 -1
- package/lib/config/client-config-types.ts +2 -0
- package/lib/config/client-config.ts +2 -0
- package/lib/learning-cards/analyze.ts +2 -1
- package/lib/models/plan-step.ts +2 -1
- package/lib/orchestrator/approval-carry.ts +2 -1
- package/lib/orchestrator/armed.ts +9 -8
- package/lib/orchestrator/ask-heads.ts +2 -1
- package/lib/orchestrator/ask-tool.ts +6 -5
- package/lib/orchestrator/asks.ts +6 -4
- package/lib/orchestrator/brakes.ts +3 -2
- package/lib/orchestrator/brief.ts +61 -50
- package/lib/orchestrator/cross.ts +2 -1
- package/lib/orchestrator/describe.ts +5 -2
- package/lib/orchestrator/digest.ts +4 -3
- package/lib/orchestrator/escalate.ts +7 -6
- package/lib/orchestrator/external-gates.ts +5 -4
- package/lib/orchestrator/held-asks.ts +2 -2
- package/lib/orchestrator/held.ts +3 -2
- package/lib/orchestrator/mcp-servers.ts +1 -1
- package/lib/orchestrator/pause.ts +4 -3
- package/lib/orchestrator/questions.ts +2 -1
- package/lib/orchestrator/recipe-tools.ts +5 -4
- package/lib/orchestrator/review.ts +4 -3
- package/lib/orchestrator/rules.ts +2 -1
- package/lib/orchestrator/serve.ts +1 -1
- package/lib/orchestrator/shell-guard.ts +4 -4
- package/lib/orchestrator/signoff.test-helpers.ts +1 -1
- package/lib/orchestrator/signoff.ts +10 -7
- package/lib/orchestrator/sweep-arm.ts +2 -1
- package/lib/orchestrator/tool-names.ts +1 -1
- package/lib/orchestrator/tool-schemas.ts +13 -13
- package/lib/orchestrator/tools.ts +21 -21
- package/lib/owner-label.ts +25 -0
- package/lib/owner.ts +21 -0
- package/lib/project-add/index.ts +2 -1
- package/lib/schedules/index.ts +2 -1
- package/lib/session-logs/gather.ts +3 -2
- package/lib/tasks/queue.ts +3 -1
- package/lib/tasks/start.ts +3 -1
- package/package.json +1 -1
package/lib/schedules/index.ts
CHANGED
|
@@ -29,6 +29,7 @@ import {
|
|
|
29
29
|
type ScheduleRun,
|
|
30
30
|
} from "./store";
|
|
31
31
|
import { isPaused } from "../orchestrator/pause";
|
|
32
|
+
import { ownerUi } from "../owner";
|
|
32
33
|
|
|
33
34
|
export * from "./store";
|
|
34
35
|
export { schedulesEnabled, startScheduler, tick } from "./scheduler";
|
|
@@ -52,7 +53,7 @@ function creatorOf(s: Schedule): ScheduleView["createdBy"] {
|
|
|
52
53
|
const creator = s.created_by_session_id
|
|
53
54
|
? getSessionRow(s.created_by_session_id)
|
|
54
55
|
: null;
|
|
55
|
-
if (!creator) return { kind: "saad", name:
|
|
56
|
+
if (!creator) return { kind: "saad", name: ownerUi(true) };
|
|
56
57
|
return creator.role === "orchestrator"
|
|
57
58
|
? { kind: "orchestrator", name: "Orchestrator" }
|
|
58
59
|
: { kind: "session", name: creator.name };
|
|
@@ -20,6 +20,7 @@ import { PLAN_FILE } from "../models/plan-step";
|
|
|
20
20
|
import { estimateCost, rowModel } from "../usage/cost";
|
|
21
21
|
import { sessionPath } from "../session-url";
|
|
22
22
|
import type { LogData, LogEvent, LogUsageRow } from "./build";
|
|
23
|
+
import { ownerUi } from "../owner";
|
|
23
24
|
|
|
24
25
|
const expandHome = (p: string) => p.replace(/^~/, os.homedir());
|
|
25
26
|
|
|
@@ -146,7 +147,7 @@ function askEvents(id: string): LogEvent[] {
|
|
|
146
147
|
return rows.flatMap((a): LogEvent[] => {
|
|
147
148
|
const raised: LogEvent = {
|
|
148
149
|
at: a.created_at,
|
|
149
|
-
text: `Escalated to
|
|
150
|
+
text: `Escalated to ${ownerUi()} (${a.kind})`,
|
|
150
151
|
sha: a.sha,
|
|
151
152
|
quote: a.title,
|
|
152
153
|
detail: a.detail || null,
|
|
@@ -156,7 +157,7 @@ function askEvents(id: string): LogEvent[] {
|
|
|
156
157
|
raised,
|
|
157
158
|
{
|
|
158
159
|
at: a.resolved_at,
|
|
159
|
-
text:
|
|
160
|
+
text: `${ownerUi(true)} ${a.status === "approved" ? "approved" : a.status === "declined" ? "declined" : "answered"}`,
|
|
160
161
|
sha: a.sha,
|
|
161
162
|
quote: a.title,
|
|
162
163
|
detail: a.answer,
|
package/lib/tasks/queue.ts
CHANGED
|
@@ -68,6 +68,7 @@ export type {
|
|
|
68
68
|
StartOutcome,
|
|
69
69
|
} from "./queue-types";
|
|
70
70
|
import { setTask } from "../db/session-parts";
|
|
71
|
+
import { owner } from "../owner";
|
|
71
72
|
export { afterMet, hasFinished, resolveAfter, slotState } from "./queue-rows";
|
|
72
73
|
export { findQueued, listQueue, queuedView } from "./queue-view";
|
|
73
74
|
export { tickOnce, tickQueue, tickQueueSoon } from "./queue-tick";
|
|
@@ -234,7 +235,8 @@ export async function startQueuedForOrchestrator(
|
|
|
234
235
|
outcome: "held",
|
|
235
236
|
text,
|
|
236
237
|
});
|
|
237
|
-
if (isPaused(workspaceId))
|
|
238
|
+
if (isPaused(workspaceId))
|
|
239
|
+
return held(`the orchestrator is paused by ${owner()}`);
|
|
238
240
|
if (isRemoteHost(r.host_id ?? project.host_id))
|
|
239
241
|
return held(
|
|
240
242
|
"it runs on another machine, and the orchestrator starts tasks on this one only"
|
package/lib/tasks/start.ts
CHANGED
|
@@ -41,6 +41,7 @@ import {
|
|
|
41
41
|
startSetup,
|
|
42
42
|
} from "../sessions/setup-progress";
|
|
43
43
|
import { recordSetup, setupNote, setupOutcome, type TaskSetup } from "./setup";
|
|
44
|
+
import { owner } from "../owner";
|
|
44
45
|
|
|
45
46
|
const execFileAsync = promisify(execFile);
|
|
46
47
|
|
|
@@ -62,7 +63,8 @@ export function launchHold(sessionId: string): string | null {
|
|
|
62
63
|
.get(sessionId, sessionId, sessionId) as
|
|
63
64
|
{ workspace_id: string } | undefined;
|
|
64
65
|
if (!row) return null;
|
|
65
|
-
if (isPaused(row.workspace_id))
|
|
66
|
+
if (isPaused(row.workspace_id))
|
|
67
|
+
return `the orchestrator is paused by ${owner()}`;
|
|
66
68
|
const window = brakesEnabled() ? windowRefusal(readUsage()) : null;
|
|
67
69
|
return window ? `held by the brakes: ${window}` : null;
|
|
68
70
|
}
|