@elizaos/plugin-task-coordinator 2.0.3-beta.2 → 2.0.3-beta.3
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/assets/hero.png +0 -0
- package/dist/AgentTabsSection.d.ts +16 -0
- package/dist/AgentTabsSection.d.ts.map +1 -0
- package/dist/AgentTabsSection.js +169 -0
- package/dist/AgentTabsSection.js.map +1 -0
- package/dist/CodingAgentControlChip.d.ts +2 -0
- package/dist/CodingAgentControlChip.d.ts.map +1 -0
- package/dist/CodingAgentControlChip.js +73 -0
- package/dist/CodingAgentControlChip.js.map +1 -0
- package/dist/CodingAgentSettingsSection.d.ts +2 -0
- package/dist/CodingAgentSettingsSection.d.ts.map +1 -0
- package/dist/CodingAgentSettingsSection.js +379 -0
- package/dist/CodingAgentSettingsSection.js.map +1 -0
- package/dist/CodingAgentTasksPanel.d.ts +4 -0
- package/dist/CodingAgentTasksPanel.d.ts.map +1 -0
- package/dist/CodingAgentTasksPanel.interact.d.ts +2 -0
- package/dist/CodingAgentTasksPanel.interact.d.ts.map +1 -0
- package/dist/CodingAgentTasksPanel.interact.js +46 -0
- package/dist/CodingAgentTasksPanel.interact.js.map +1 -0
- package/dist/CodingAgentTasksPanel.js +740 -0
- package/dist/CodingAgentTasksPanel.js.map +1 -0
- package/dist/GitHubConnectionCard.d.ts +2 -0
- package/dist/GitHubConnectionCard.d.ts.map +1 -0
- package/dist/GitHubConnectionCard.js +172 -0
- package/dist/GitHubConnectionCard.js.map +1 -0
- package/dist/GlobalPrefsSection.d.ts +10 -0
- package/dist/GlobalPrefsSection.d.ts.map +1 -0
- package/dist/GlobalPrefsSection.js +166 -0
- package/dist/GlobalPrefsSection.js.map +1 -0
- package/dist/LlmProviderSection.d.ts +10 -0
- package/dist/LlmProviderSection.d.ts.map +1 -0
- package/dist/LlmProviderSection.js +161 -0
- package/dist/LlmProviderSection.js.map +1 -0
- package/dist/ModelConfigSection.d.ts +15 -0
- package/dist/ModelConfigSection.d.ts.map +1 -0
- package/dist/ModelConfigSection.js +86 -0
- package/dist/ModelConfigSection.js.map +1 -0
- package/dist/OrchestratorView.d.ts +20 -0
- package/dist/OrchestratorView.d.ts.map +1 -0
- package/dist/OrchestratorView.js +231 -0
- package/dist/OrchestratorView.js.map +1 -0
- package/dist/OrchestratorWorkbench.d.ts +32 -0
- package/dist/OrchestratorWorkbench.d.ts.map +1 -0
- package/dist/OrchestratorWorkbench.js +3200 -0
- package/dist/OrchestratorWorkbench.js.map +1 -0
- package/dist/PtyConsoleBase.d.ts +9 -0
- package/dist/PtyConsoleBase.d.ts.map +1 -0
- package/dist/PtyConsoleBase.js +174 -0
- package/dist/PtyConsoleBase.js.map +1 -0
- package/dist/PtyConsoleDrawer.d.ts +10 -0
- package/dist/PtyConsoleDrawer.d.ts.map +1 -0
- package/dist/PtyConsoleDrawer.js +77 -0
- package/dist/PtyConsoleDrawer.js.map +1 -0
- package/dist/PtyConsoleSidePanel.d.ts +8 -0
- package/dist/PtyConsoleSidePanel.d.ts.map +1 -0
- package/dist/PtyConsoleSidePanel.js +9 -0
- package/dist/PtyConsoleSidePanel.js.map +1 -0
- package/dist/PtyTerminalPane.d.ts +10 -0
- package/dist/PtyTerminalPane.d.ts.map +1 -0
- package/dist/PtyTerminalPane.js +147 -0
- package/dist/PtyTerminalPane.js.map +1 -0
- package/dist/TaskCardList.d.ts +76 -0
- package/dist/TaskCardList.d.ts.map +1 -0
- package/dist/TaskCardList.js +327 -0
- package/dist/TaskCardList.js.map +1 -0
- package/dist/TaskCoordinatorView.d.ts +20 -0
- package/dist/TaskCoordinatorView.d.ts.map +1 -0
- package/dist/TaskCoordinatorView.js +146 -0
- package/dist/TaskCoordinatorView.js.map +1 -0
- package/dist/__e2e__/dashboard-fixture.d.ts +9 -0
- package/dist/__e2e__/dashboard-fixture.d.ts.map +1 -0
- package/dist/__e2e__/dashboard-fixture.js +123 -0
- package/dist/__e2e__/dashboard-fixture.js.map +1 -0
- package/dist/api/coding-agents-auth-sanitize.d.ts +23 -0
- package/dist/api/coding-agents-auth-sanitize.d.ts.map +1 -0
- package/dist/api/coding-agents-auth-sanitize.js +22 -0
- package/dist/api/coding-agents-auth-sanitize.js.map +1 -0
- package/dist/api/coding-agents-preflight-normalize.d.ts +29 -0
- package/dist/api/coding-agents-preflight-normalize.d.ts.map +1 -0
- package/dist/api/coding-agents-preflight-normalize.js +20 -0
- package/dist/api/coding-agents-preflight-normalize.js.map +1 -0
- package/dist/coding-agent-settings-shared.d.ts +42 -0
- package/dist/coding-agent-settings-shared.d.ts.map +1 -0
- package/dist/coding-agent-settings-shared.js +121 -0
- package/dist/coding-agent-settings-shared.js.map +1 -0
- package/dist/components/OrchestratorSpatialView.d.ts +56 -0
- package/dist/components/OrchestratorSpatialView.d.ts.map +1 -0
- package/dist/components/OrchestratorSpatialView.js +501 -0
- package/dist/components/OrchestratorSpatialView.js.map +1 -0
- package/dist/components/TaskCoordinatorSpatialView.d.ts +59 -0
- package/dist/components/TaskCoordinatorSpatialView.d.ts.map +1 -0
- package/dist/components/TaskCoordinatorSpatialView.js +294 -0
- package/dist/components/TaskCoordinatorSpatialView.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +286 -0
- package/dist/index.js.map +1 -0
- package/dist/orchestrator-capabilities.d.ts +3 -0
- package/dist/orchestrator-capabilities.d.ts.map +1 -0
- package/dist/orchestrator-capabilities.js +136 -0
- package/dist/orchestrator-capabilities.js.map +1 -0
- package/dist/orchestrator-command.d.ts +39 -0
- package/dist/orchestrator-command.d.ts.map +1 -0
- package/dist/orchestrator-command.js +52 -0
- package/dist/orchestrator-command.js.map +1 -0
- package/dist/orchestrator-diff.d.ts +19 -0
- package/dist/orchestrator-diff.d.ts.map +1 -0
- package/dist/orchestrator-diff.helpers.d.ts +18 -0
- package/dist/orchestrator-diff.helpers.d.ts.map +1 -0
- package/dist/orchestrator-diff.helpers.js +76 -0
- package/dist/orchestrator-diff.helpers.js.map +1 -0
- package/dist/orchestrator-diff.js +119 -0
- package/dist/orchestrator-diff.js.map +1 -0
- package/dist/orchestrator-markdown.d.ts +5 -0
- package/dist/orchestrator-markdown.d.ts.map +1 -0
- package/dist/orchestrator-markdown.helpers.d.ts +2 -0
- package/dist/orchestrator-markdown.helpers.d.ts.map +1 -0
- package/dist/orchestrator-markdown.helpers.js +21 -0
- package/dist/orchestrator-markdown.helpers.js.map +1 -0
- package/dist/orchestrator-markdown.js +199 -0
- package/dist/orchestrator-markdown.js.map +1 -0
- package/dist/orchestrator-params.d.ts +8 -0
- package/dist/orchestrator-params.d.ts.map +1 -0
- package/dist/orchestrator-params.js +27 -0
- package/dist/orchestrator-params.js.map +1 -0
- package/dist/orchestrator-plan.d.ts +5 -0
- package/dist/orchestrator-plan.d.ts.map +1 -0
- package/dist/orchestrator-plan.js +95 -0
- package/dist/orchestrator-plan.js.map +1 -0
- package/dist/orchestrator-reasoning.d.ts +21 -0
- package/dist/orchestrator-reasoning.d.ts.map +1 -0
- package/dist/orchestrator-reasoning.js +105 -0
- package/dist/orchestrator-reasoning.js.map +1 -0
- package/dist/orchestrator-stream.d.ts +15 -0
- package/dist/orchestrator-stream.d.ts.map +1 -0
- package/dist/orchestrator-stream.helpers.d.ts +89 -0
- package/dist/orchestrator-stream.helpers.d.ts.map +1 -0
- package/dist/orchestrator-stream.helpers.js +361 -0
- package/dist/orchestrator-stream.helpers.js.map +1 -0
- package/dist/orchestrator-stream.js +307 -0
- package/dist/orchestrator-stream.js.map +1 -0
- package/dist/pty-status-dots.d.ts +2 -0
- package/dist/pty-status-dots.d.ts.map +1 -0
- package/dist/pty-status-dots.js +6 -0
- package/dist/pty-status-dots.js.map +1 -0
- package/dist/register-slots.d.ts +20 -0
- package/dist/register-slots.d.ts.map +1 -0
- package/dist/register-slots.js +50 -0
- package/dist/register-slots.js.map +1 -0
- package/dist/register-terminal-view.d.ts +21 -0
- package/dist/register-terminal-view.d.ts.map +1 -0
- package/dist/register-terminal-view.js +46 -0
- package/dist/register-terminal-view.js.map +1 -0
- package/dist/register.d.ts +2 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/register.js +23 -0
- package/dist/register.js.map +1 -0
- package/dist/session-hydration.d.ts +2 -0
- package/dist/session-hydration.d.ts.map +1 -0
- package/dist/session-hydration.js +9 -0
- package/dist/session-hydration.js.map +1 -0
- package/dist/task-coordinator-view-bundle.d.ts +4 -0
- package/dist/task-coordinator-view-bundle.d.ts.map +1 -0
- package/dist/task-coordinator-view-bundle.js +9 -0
- package/dist/task-coordinator-view-bundle.js.map +1 -0
- package/dist/ui.d.ts +2 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +13 -0
- package/dist/ui.js.map +1 -0
- package/dist/view-format.d.ts +25 -0
- package/dist/view-format.d.ts.map +1 -0
- package/dist/view-format.js +64 -0
- package/dist/view-format.js.map +1 -0
- package/dist/views/bundle.js +1383 -0
- package/dist/views/bundle.js.map +1 -0
- package/package.json +7 -6
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Bot, ListChecks, Terminal } from "lucide-react";
|
|
3
|
+
import { createRoot } from "react-dom/client";
|
|
4
|
+
import {
|
|
5
|
+
TaskCard,
|
|
6
|
+
TaskCountChip,
|
|
7
|
+
TaskEmptyState,
|
|
8
|
+
TaskListHeader,
|
|
9
|
+
TaskMetaChip
|
|
10
|
+
} from "../TaskCardList.js";
|
|
11
|
+
const t = (_k, v) => String(v?.defaultValue ?? _k);
|
|
12
|
+
function chips(sessions, decisions, age) {
|
|
13
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14
|
+
sessions > 0 ? /* @__PURE__ */ jsx(TaskMetaChip, { icon: /* @__PURE__ */ jsx(Bot, { className: "h-3 w-3" }), children: `${sessions} sessions` }) : null,
|
|
15
|
+
decisions > 0 ? /* @__PURE__ */ jsx(TaskMetaChip, { icon: /* @__PURE__ */ jsx(ListChecks, { className: "h-3 w-3" }), children: `${decisions} decisions` }) : null,
|
|
16
|
+
/* @__PURE__ */ jsx(TaskMetaChip, { icon: /* @__PURE__ */ jsx(Terminal, { className: "h-3 w-3" }), children: "coding" }),
|
|
17
|
+
/* @__PURE__ */ jsx("span", { className: "text-2xs text-muted/80", children: age })
|
|
18
|
+
] });
|
|
19
|
+
}
|
|
20
|
+
const TASKS = [
|
|
21
|
+
{
|
|
22
|
+
id: "a1",
|
|
23
|
+
title: "Refactor the auth pipeline",
|
|
24
|
+
subtitle: "Collapse the three login paths into one validated entry.",
|
|
25
|
+
status: "active",
|
|
26
|
+
sessions: 2,
|
|
27
|
+
decisions: 5,
|
|
28
|
+
age: "2m ago"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: "a2",
|
|
32
|
+
title: "Fix the flaky test suite",
|
|
33
|
+
subtitle: "Reclaim the orphaned pglite port before each batch.",
|
|
34
|
+
status: "validating",
|
|
35
|
+
sessions: 1,
|
|
36
|
+
decisions: 3,
|
|
37
|
+
age: "8m ago"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: "a3",
|
|
41
|
+
title: "Wire the x402 earnings binding",
|
|
42
|
+
subtitle: "Record app-scoped payment earnings on settle.",
|
|
43
|
+
status: "waiting_on_user",
|
|
44
|
+
sessions: 1,
|
|
45
|
+
decisions: 1,
|
|
46
|
+
age: "21m ago"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
id: "a4",
|
|
50
|
+
title: "Ship the homepage downloads gate",
|
|
51
|
+
subtitle: "Use the effective release so eliza.app always gets assets.",
|
|
52
|
+
status: "done",
|
|
53
|
+
sessions: 3,
|
|
54
|
+
decisions: 7,
|
|
55
|
+
age: "1h ago",
|
|
56
|
+
forked: true
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: "a5",
|
|
60
|
+
title: "Migrate Neon \u2192 Railway",
|
|
61
|
+
subtitle: "Cut over DB + cache with parity validation.",
|
|
62
|
+
status: "failed",
|
|
63
|
+
sessions: 2,
|
|
64
|
+
decisions: 4,
|
|
65
|
+
age: "3h ago"
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
function Dashboard() {
|
|
69
|
+
return /* @__PURE__ */ jsxs("div", { className: "relative mx-auto flex w-full max-w-4xl flex-col gap-3 px-4 py-4", children: [
|
|
70
|
+
/* @__PURE__ */ jsx(
|
|
71
|
+
TaskListHeader,
|
|
72
|
+
{
|
|
73
|
+
icon: /* @__PURE__ */ jsx(ListChecks, { className: "h-5 w-5" }),
|
|
74
|
+
title: "Orchestrator",
|
|
75
|
+
counts: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
76
|
+
/* @__PURE__ */ jsx(TaskCountChip, { value: 5, label: "total" }),
|
|
77
|
+
/* @__PURE__ */ jsx(TaskCountChip, { value: 1, label: "active", tone: "active" }),
|
|
78
|
+
/* @__PURE__ */ jsx(TaskCountChip, { value: 1, label: "done", tone: "accent" })
|
|
79
|
+
] })
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2.5", children: TASKS.map((task) => /* @__PURE__ */ jsx(
|
|
83
|
+
TaskCard,
|
|
84
|
+
{
|
|
85
|
+
id: task.id,
|
|
86
|
+
title: task.title,
|
|
87
|
+
subtitle: task.subtitle,
|
|
88
|
+
status: task.status,
|
|
89
|
+
forked: task.forked,
|
|
90
|
+
chips: chips(task.sessions, task.decisions, task.age),
|
|
91
|
+
onOpen: () => {
|
|
92
|
+
},
|
|
93
|
+
t
|
|
94
|
+
},
|
|
95
|
+
task.id
|
|
96
|
+
)) })
|
|
97
|
+
] });
|
|
98
|
+
}
|
|
99
|
+
function EmptyDashboard() {
|
|
100
|
+
return /* @__PURE__ */ jsxs("div", { className: "mx-auto flex w-full max-w-4xl flex-col gap-3 px-4 py-4", children: [
|
|
101
|
+
/* @__PURE__ */ jsx(
|
|
102
|
+
TaskListHeader,
|
|
103
|
+
{
|
|
104
|
+
icon: /* @__PURE__ */ jsx(ListChecks, { className: "h-5 w-5" }),
|
|
105
|
+
title: "Orchestrator",
|
|
106
|
+
counts: /* @__PURE__ */ jsx(TaskCountChip, { value: 0, label: "total" })
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
/* @__PURE__ */ jsx(
|
|
110
|
+
TaskEmptyState,
|
|
111
|
+
{
|
|
112
|
+
title: "No tasks yet",
|
|
113
|
+
hint: "Ask in chat to start a coding task and it will appear here."
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
] });
|
|
117
|
+
}
|
|
118
|
+
const root = createRoot(document.getElementById("root"));
|
|
119
|
+
const params = new URLSearchParams(window.location.search);
|
|
120
|
+
root.render(
|
|
121
|
+
/* @__PURE__ */ jsx("div", { "data-testid": "dashboard-fixture", className: "min-h-screen bg-bg text-txt", children: params.has("empty") ? /* @__PURE__ */ jsx(EmptyDashboard, {}) : /* @__PURE__ */ jsx(Dashboard, {}) })
|
|
122
|
+
);
|
|
123
|
+
//# sourceMappingURL=dashboard-fixture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/__e2e__/dashboard-fixture.tsx"],"sourcesContent":["/**\n * Render-only fixture for the redesigned orchestrator dashboard. Mounts the real\n * shared card primitives (TaskListHeader, TaskCard, TaskMetaChip, TaskEmptyState)\n * with deterministic data so the esbuild + playwright harness can screenshot the\n * actual components — no app server, no data layer. The agent-surface hook is\n * stubbed by the runner's esbuild resolver.\n */\n\nimport { Bot, GitBranch, ListChecks, Terminal } from \"lucide-react\";\nimport { createRoot } from \"react-dom/client\";\nimport {\n TaskCard,\n TaskCountChip,\n TaskEmptyState,\n TaskListHeader,\n TaskMetaChip,\n} from \"../TaskCardList.js\";\n\nconst t = (_k: string, v?: Record<string, unknown>) =>\n String(v?.defaultValue ?? _k);\n\nfunction chips(sessions: number, decisions: number, age: string) {\n return (\n <>\n {sessions > 0 ? (\n <TaskMetaChip icon={<Bot className=\"h-3 w-3\" />}>\n {`${sessions} sessions`}\n </TaskMetaChip>\n ) : null}\n {decisions > 0 ? (\n <TaskMetaChip icon={<ListChecks className=\"h-3 w-3\" />}>\n {`${decisions} decisions`}\n </TaskMetaChip>\n ) : null}\n <TaskMetaChip icon={<Terminal className=\"h-3 w-3\" />}>coding</TaskMetaChip>\n <span className=\"text-2xs text-muted/80\">{age}</span>\n </>\n );\n}\n\nconst TASKS = [\n {\n id: \"a1\",\n title: \"Refactor the auth pipeline\",\n subtitle: \"Collapse the three login paths into one validated entry.\",\n status: \"active\",\n sessions: 2,\n decisions: 5,\n age: \"2m ago\",\n },\n {\n id: \"a2\",\n title: \"Fix the flaky test suite\",\n subtitle: \"Reclaim the orphaned pglite port before each batch.\",\n status: \"validating\",\n sessions: 1,\n decisions: 3,\n age: \"8m ago\",\n },\n {\n id: \"a3\",\n title: \"Wire the x402 earnings binding\",\n subtitle: \"Record app-scoped payment earnings on settle.\",\n status: \"waiting_on_user\",\n sessions: 1,\n decisions: 1,\n age: \"21m ago\",\n },\n {\n id: \"a4\",\n title: \"Ship the homepage downloads gate\",\n subtitle: \"Use the effective release so eliza.app always gets assets.\",\n status: \"done\",\n sessions: 3,\n decisions: 7,\n age: \"1h ago\",\n forked: true,\n },\n {\n id: \"a5\",\n title: \"Migrate Neon → Railway\",\n subtitle: \"Cut over DB + cache with parity validation.\",\n status: \"failed\",\n sessions: 2,\n decisions: 4,\n age: \"3h ago\",\n },\n];\n\nfunction Dashboard() {\n return (\n <div className=\"relative mx-auto flex w-full max-w-4xl flex-col gap-3 px-4 py-4\">\n <TaskListHeader\n icon={<ListChecks className=\"h-5 w-5\" />}\n title=\"Orchestrator\"\n counts={\n <>\n <TaskCountChip value={5} label=\"total\" />\n <TaskCountChip value={1} label=\"active\" tone=\"active\" />\n <TaskCountChip value={1} label=\"done\" tone=\"accent\" />\n </>\n }\n />\n <div className=\"flex flex-col gap-2.5\">\n {TASKS.map((task) => (\n <TaskCard\n key={task.id}\n id={task.id}\n title={task.title}\n subtitle={task.subtitle}\n status={task.status}\n forked={task.forked}\n chips={chips(task.sessions, task.decisions, task.age)}\n onOpen={() => {}}\n t={t}\n />\n ))}\n </div>\n </div>\n );\n}\n\nfunction EmptyDashboard() {\n return (\n <div className=\"mx-auto flex w-full max-w-4xl flex-col gap-3 px-4 py-4\">\n <TaskListHeader\n icon={<ListChecks className=\"h-5 w-5\" />}\n title=\"Orchestrator\"\n counts={<TaskCountChip value={0} label=\"total\" />}\n />\n <TaskEmptyState\n title=\"No tasks yet\"\n hint=\"Ask in chat to start a coding task and it will appear here.\"\n />\n </div>\n );\n}\n\nconst root = createRoot(document.getElementById(\"root\") as HTMLElement);\nconst params = new URLSearchParams(window.location.search);\nroot.render(\n <div data-testid=\"dashboard-fixture\" className=\"min-h-screen bg-bg text-txt\">\n {params.has(\"empty\") ? <EmptyDashboard /> : <Dashboard />}\n </div>,\n);\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whitelist / scheme-validate a `triggerAuth()` response from
|
|
3
|
+
* `coding-agent-adapters` before forwarding it to the browser.
|
|
4
|
+
*
|
|
5
|
+
* The adapter's response shape is typed as `unknown` upstream and
|
|
6
|
+
* could in principle carry access tokens, refresh tokens, or other
|
|
7
|
+
* internal secrets in unexpected fields. The HTTP route must only
|
|
8
|
+
* surface the fields the UI actually renders, and must reject any
|
|
9
|
+
* URL whose scheme isn't plain http(s) to prevent a malicious or
|
|
10
|
+
* compromised adapter from smuggling a `javascript:` / `data:` /
|
|
11
|
+
* `file:` URL into an `<a href>`.
|
|
12
|
+
*
|
|
13
|
+
* Extracted into its own module so the sanitizer is unit-testable
|
|
14
|
+
* without spinning up the whole HTTP server.
|
|
15
|
+
*/
|
|
16
|
+
export interface SanitizedAuthResult {
|
|
17
|
+
launched?: boolean;
|
|
18
|
+
url?: string;
|
|
19
|
+
deviceCode?: string;
|
|
20
|
+
instructions?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function sanitizeAuthResult(input: unknown): SanitizedAuthResult;
|
|
23
|
+
//# sourceMappingURL=coding-agents-auth-sanitize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coding-agents-auth-sanitize.d.ts","sourceRoot":"","sources":["../../src/api/coding-agents-auth-sanitize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,CAkBtE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function sanitizeAuthResult(input) {
|
|
2
|
+
if (!input || typeof input !== "object") return {};
|
|
3
|
+
const r = input;
|
|
4
|
+
const out = {};
|
|
5
|
+
if (typeof r.launched === "boolean") out.launched = r.launched;
|
|
6
|
+
if (typeof r.url === "string") {
|
|
7
|
+
try {
|
|
8
|
+
const parsed = new URL(r.url);
|
|
9
|
+
if (parsed.protocol === "http:" || parsed.protocol === "https:") {
|
|
10
|
+
out.url = r.url;
|
|
11
|
+
}
|
|
12
|
+
} catch {
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
if (typeof r.deviceCode === "string") out.deviceCode = r.deviceCode;
|
|
16
|
+
if (typeof r.instructions === "string") out.instructions = r.instructions;
|
|
17
|
+
return out;
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
sanitizeAuthResult
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=coding-agents-auth-sanitize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/api/coding-agents-auth-sanitize.ts"],"sourcesContent":["/**\n * Whitelist / scheme-validate a `triggerAuth()` response from\n * `coding-agent-adapters` before forwarding it to the browser.\n *\n * The adapter's response shape is typed as `unknown` upstream and\n * could in principle carry access tokens, refresh tokens, or other\n * internal secrets in unexpected fields. The HTTP route must only\n * surface the fields the UI actually renders, and must reject any\n * URL whose scheme isn't plain http(s) to prevent a malicious or\n * compromised adapter from smuggling a `javascript:` / `data:` /\n * `file:` URL into an `<a href>`.\n *\n * Extracted into its own module so the sanitizer is unit-testable\n * without spinning up the whole HTTP server.\n */\n\nexport interface SanitizedAuthResult {\n launched?: boolean;\n url?: string;\n deviceCode?: string;\n instructions?: string;\n}\n\nexport function sanitizeAuthResult(input: unknown): SanitizedAuthResult {\n if (!input || typeof input !== \"object\") return {};\n const r = input as Record<string, unknown>;\n const out: SanitizedAuthResult = {};\n if (typeof r.launched === \"boolean\") out.launched = r.launched;\n if (typeof r.url === \"string\") {\n try {\n const parsed = new URL(r.url);\n if (parsed.protocol === \"http:\" || parsed.protocol === \"https:\") {\n out.url = r.url;\n }\n } catch {\n // Malformed URL — drop it. The UI falls back to `instructions`.\n }\n }\n if (typeof r.deviceCode === \"string\") out.deviceCode = r.deviceCode;\n if (typeof r.instructions === \"string\") out.instructions = r.instructions;\n return out;\n}\n"],"mappings":"AAuBO,SAAS,mBAAmB,OAAqC;AACtE,MAAI,CAAC,SAAS,OAAO,UAAU,SAAU,QAAO,CAAC;AACjD,QAAM,IAAI;AACV,QAAM,MAA2B,CAAC;AAClC,MAAI,OAAO,EAAE,aAAa,UAAW,KAAI,WAAW,EAAE;AACtD,MAAI,OAAO,EAAE,QAAQ,UAAU;AAC7B,QAAI;AACF,YAAM,SAAS,IAAI,IAAI,EAAE,GAAG;AAC5B,UAAI,OAAO,aAAa,WAAW,OAAO,aAAa,UAAU;AAC/D,YAAI,MAAM,EAAE;AAAA,MACd;AAAA,IACF,QAAQ;AAAA,IAER;AAAA,EACF;AACA,MAAI,OAAO,EAAE,eAAe,SAAU,KAAI,aAAa,EAAE;AACzD,MAAI,OAAO,EAAE,iBAAiB,SAAU,KAAI,eAAe,EAAE;AAC7D,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalize the `auth` field on a coding-agent preflight row so the
|
|
3
|
+
* server-side response shape matches the client type declared in
|
|
4
|
+
* `packages/app-core/src/api/client-types-cloud.ts`:
|
|
5
|
+
*
|
|
6
|
+
* auth?: {
|
|
7
|
+
* status: "authenticated" | "unauthenticated" | "unknown";
|
|
8
|
+
* method?: string;
|
|
9
|
+
* detail?: string;
|
|
10
|
+
* loginHint?: string;
|
|
11
|
+
* };
|
|
12
|
+
*
|
|
13
|
+
* The upstream `coding-agent-adapters` package types the auth field
|
|
14
|
+
* as `unknown`. Before this normalizer, the route handlers just cast
|
|
15
|
+
* the raw value to `Record<string, unknown>` and forwarded it, which
|
|
16
|
+
* meant a shape drift in the adapter would silently break the UI's
|
|
17
|
+
* `needsAuth` check (`preflightByAgent[agent]?.auth?.status === "unauthenticated"`).
|
|
18
|
+
* TypeScript would still compile, but the Authenticate button would
|
|
19
|
+
* never render. Normalizing at the boundary pins the contract.
|
|
20
|
+
*/
|
|
21
|
+
export type PreflightAuthStatus = "authenticated" | "unauthenticated" | "unknown";
|
|
22
|
+
export interface NormalizedPreflightAuth {
|
|
23
|
+
status: PreflightAuthStatus;
|
|
24
|
+
method?: string;
|
|
25
|
+
detail?: string;
|
|
26
|
+
loginHint?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare function normalizePreflightAuth(raw: unknown): NormalizedPreflightAuth | undefined;
|
|
29
|
+
//# sourceMappingURL=coding-agents-preflight-normalize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coding-agents-preflight-normalize.d.ts","sourceRoot":"","sources":["../../src/api/coding-agents-preflight-normalize.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,MAAM,mBAAmB,GAC3B,eAAe,GACf,iBAAiB,GACjB,SAAS,CAAC;AAEd,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,OAAO,GACX,uBAAuB,GAAG,SAAS,CAmBrC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function normalizePreflightAuth(raw) {
|
|
2
|
+
if (!raw || typeof raw !== "object") return void 0;
|
|
3
|
+
const r = raw;
|
|
4
|
+
const rawStatus = typeof r.status === "string" ? r.status : "";
|
|
5
|
+
let status;
|
|
6
|
+
if (rawStatus === "authenticated" || rawStatus === "unauthenticated") {
|
|
7
|
+
status = rawStatus;
|
|
8
|
+
} else {
|
|
9
|
+
status = "unknown";
|
|
10
|
+
}
|
|
11
|
+
const out = { status };
|
|
12
|
+
if (typeof r.method === "string") out.method = r.method;
|
|
13
|
+
if (typeof r.detail === "string") out.detail = r.detail;
|
|
14
|
+
if (typeof r.loginHint === "string") out.loginHint = r.loginHint;
|
|
15
|
+
return out;
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
normalizePreflightAuth
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=coding-agents-preflight-normalize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/api/coding-agents-preflight-normalize.ts"],"sourcesContent":["/**\n * Normalize the `auth` field on a coding-agent preflight row so the\n * server-side response shape matches the client type declared in\n * `packages/app-core/src/api/client-types-cloud.ts`:\n *\n * auth?: {\n * status: \"authenticated\" | \"unauthenticated\" | \"unknown\";\n * method?: string;\n * detail?: string;\n * loginHint?: string;\n * };\n *\n * The upstream `coding-agent-adapters` package types the auth field\n * as `unknown`. Before this normalizer, the route handlers just cast\n * the raw value to `Record<string, unknown>` and forwarded it, which\n * meant a shape drift in the adapter would silently break the UI's\n * `needsAuth` check (`preflightByAgent[agent]?.auth?.status === \"unauthenticated\"`).\n * TypeScript would still compile, but the Authenticate button would\n * never render. Normalizing at the boundary pins the contract.\n */\n\nexport type PreflightAuthStatus =\n | \"authenticated\"\n | \"unauthenticated\"\n | \"unknown\";\n\nexport interface NormalizedPreflightAuth {\n status: PreflightAuthStatus;\n method?: string;\n detail?: string;\n loginHint?: string;\n}\n\nexport function normalizePreflightAuth(\n raw: unknown,\n): NormalizedPreflightAuth | undefined {\n if (!raw || typeof raw !== \"object\") return undefined;\n const r = raw as Record<string, unknown>;\n const rawStatus = typeof r.status === \"string\" ? r.status : \"\";\n let status: PreflightAuthStatus;\n if (rawStatus === \"authenticated\" || rawStatus === \"unauthenticated\") {\n status = rawStatus;\n } else {\n // Unknown or missing status → \"unknown\". This keeps the contract\n // tight while still surfacing *something* to the UI (the agent\n // tab will render without the Authenticate button, matching the\n // pre-feature behavior for adapters that don't report auth).\n status = \"unknown\";\n }\n const out: NormalizedPreflightAuth = { status };\n if (typeof r.method === \"string\") out.method = r.method;\n if (typeof r.detail === \"string\") out.detail = r.detail;\n if (typeof r.loginHint === \"string\") out.loginHint = r.loginHint;\n return out;\n}\n"],"mappings":"AAiCO,SAAS,uBACd,KACqC;AACrC,MAAI,CAAC,OAAO,OAAO,QAAQ,SAAU,QAAO;AAC5C,QAAM,IAAI;AACV,QAAM,YAAY,OAAO,EAAE,WAAW,WAAW,EAAE,SAAS;AAC5D,MAAI;AACJ,MAAI,cAAc,mBAAmB,cAAc,mBAAmB;AACpE,aAAS;AAAA,EACX,OAAO;AAKL,aAAS;AAAA,EACX;AACA,QAAM,MAA+B,EAAE,OAAO;AAC9C,MAAI,OAAO,EAAE,WAAW,SAAU,KAAI,SAAS,EAAE;AACjD,MAAI,OAAO,EAAE,WAAW,SAAU,KAAI,SAAS,EAAE;AACjD,MAAI,OAAO,EAAE,cAAc,SAAU,KAAI,YAAY,EAAE;AACvD,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types, constants, and fallback model lists for the Coding
|
|
3
|
+
* Agent settings sub-components. Extracted out of
|
|
4
|
+
* `CodingAgentSettingsSection.tsx` to keep that file under the
|
|
5
|
+
* project's ~500 LOC guideline.
|
|
6
|
+
*/
|
|
7
|
+
export type AgentTab = "elizaos" | "pi-agent" | "opencode" | "claude" | "codex";
|
|
8
|
+
export type ApprovalPreset = "readonly" | "standard" | "permissive" | "autonomous";
|
|
9
|
+
export type AgentSelectionStrategy = "fixed" | "ranked";
|
|
10
|
+
export type CodingAccountStrategy = "priority" | "round-robin" | "least-used" | "quota-aware";
|
|
11
|
+
export type LlmProvider = "subscription" | "api_keys" | "cloud";
|
|
12
|
+
export declare const AGENT_TABS: AgentTab[];
|
|
13
|
+
export declare const CODING_ACCOUNT_STRATEGIES: readonly CodingAccountStrategy[];
|
|
14
|
+
export declare const CODING_ACCOUNT_STRATEGY_OPTIONS: {
|
|
15
|
+
value: CodingAccountStrategy;
|
|
16
|
+
labelKey: string;
|
|
17
|
+
defaultLabel: string;
|
|
18
|
+
}[];
|
|
19
|
+
export declare function isCodingAccountStrategy(value: unknown): value is CodingAccountStrategy;
|
|
20
|
+
export declare const APPROVAL_PRESETS: {
|
|
21
|
+
value: ApprovalPreset;
|
|
22
|
+
labelKey: string;
|
|
23
|
+
descKey: string;
|
|
24
|
+
}[];
|
|
25
|
+
export interface ModelOption {
|
|
26
|
+
value: string;
|
|
27
|
+
label: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const AGENT_PROVIDER_MAP: Record<AgentTab, string>;
|
|
30
|
+
export declare const FALLBACK_MODELS: Record<string, ModelOption[]>;
|
|
31
|
+
export declare const AGENT_LABELS: Record<AgentTab, string>;
|
|
32
|
+
/** Map full adapter names from the preflight API to short tab keys. */
|
|
33
|
+
export declare const ADAPTER_NAME_TO_TAB: Record<string, AgentTab>;
|
|
34
|
+
export declare const ENV_PREFIX: Record<AgentTab, string>;
|
|
35
|
+
export interface AuthResult {
|
|
36
|
+
agent: AgentTab;
|
|
37
|
+
launched?: boolean;
|
|
38
|
+
url?: string;
|
|
39
|
+
deviceCode?: string;
|
|
40
|
+
instructions: string;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=coding-agent-settings-shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coding-agent-settings-shared.d.ts","sourceRoot":"","sources":["../src/coding-agent-settings-shared.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC;AAChF,MAAM,MAAM,cAAc,GACtB,UAAU,GACV,UAAU,GACV,YAAY,GACZ,YAAY,CAAC;AACjB,MAAM,MAAM,sBAAsB,GAAG,OAAO,GAAG,QAAQ,CAAC;AACxD,MAAM,MAAM,qBAAqB,GAC7B,UAAU,GACV,aAAa,GACb,YAAY,GACZ,aAAa,CAAC;AAClB,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG,UAAU,GAAG,OAAO,CAAC;AAEhE,eAAO,MAAM,UAAU,EAAE,QAAQ,EAMhC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,SAAS,qBAAqB,EAKrE,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE;IAC5C,KAAK,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB,EAqBA,CAAC;AAEF,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,qBAAqB,CAKhC;AAED,eAAO,MAAM,gBAAgB,EAAE;IAC7B,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,EAqBA,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAMvD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,CAYzD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAMjD,CAAC;AAEF,uEAAuE;AACvE,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAaxD,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAM/C,CAAC;AAEF,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,QAAQ,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
const AGENT_TABS = [
|
|
2
|
+
"elizaos",
|
|
3
|
+
"pi-agent",
|
|
4
|
+
"opencode",
|
|
5
|
+
"claude",
|
|
6
|
+
"codex"
|
|
7
|
+
];
|
|
8
|
+
const CODING_ACCOUNT_STRATEGIES = [
|
|
9
|
+
"least-used",
|
|
10
|
+
"round-robin",
|
|
11
|
+
"priority",
|
|
12
|
+
"quota-aware"
|
|
13
|
+
];
|
|
14
|
+
const CODING_ACCOUNT_STRATEGY_OPTIONS = [
|
|
15
|
+
{
|
|
16
|
+
value: "least-used",
|
|
17
|
+
labelKey: "codingagentsettingssection.AccountStrategyLeastUsed",
|
|
18
|
+
defaultLabel: "Least Used"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
value: "round-robin",
|
|
22
|
+
labelKey: "codingagentsettingssection.AccountStrategyRoundRobin",
|
|
23
|
+
defaultLabel: "Round Robin"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
value: "priority",
|
|
27
|
+
labelKey: "codingagentsettingssection.AccountStrategyPriority",
|
|
28
|
+
defaultLabel: "Priority"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
value: "quota-aware",
|
|
32
|
+
labelKey: "codingagentsettingssection.AccountStrategyQuotaAware",
|
|
33
|
+
defaultLabel: "Quota Aware"
|
|
34
|
+
}
|
|
35
|
+
];
|
|
36
|
+
function isCodingAccountStrategy(value) {
|
|
37
|
+
return typeof value === "string" && CODING_ACCOUNT_STRATEGIES.includes(value);
|
|
38
|
+
}
|
|
39
|
+
const APPROVAL_PRESETS = [
|
|
40
|
+
{
|
|
41
|
+
value: "readonly",
|
|
42
|
+
labelKey: "codingagentsettingssection.PresetReadOnly",
|
|
43
|
+
descKey: "codingagentsettingssection.PresetReadOnlyDesc"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
value: "standard",
|
|
47
|
+
labelKey: "mediasettingssection.Standard",
|
|
48
|
+
descKey: "codingagentsettingssection.PresetStandardDesc"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
value: "permissive",
|
|
52
|
+
labelKey: "codingagentsettingssection.PresetPermissive",
|
|
53
|
+
descKey: "codingagentsettingssection.PresetPermissiveDesc"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
value: "autonomous",
|
|
57
|
+
labelKey: "codingagentsettingssection.PresetAutonomous",
|
|
58
|
+
descKey: "codingagentsettingssection.PresetAutonomousDesc"
|
|
59
|
+
}
|
|
60
|
+
];
|
|
61
|
+
const AGENT_PROVIDER_MAP = {
|
|
62
|
+
elizaos: "cerebras",
|
|
63
|
+
"pi-agent": "cerebras",
|
|
64
|
+
claude: "anthropic",
|
|
65
|
+
codex: "openai",
|
|
66
|
+
opencode: "cerebras"
|
|
67
|
+
};
|
|
68
|
+
const FALLBACK_MODELS = {
|
|
69
|
+
anthropic: [
|
|
70
|
+
{ value: "claude-opus-4-7", label: "Claude Opus 4.7" },
|
|
71
|
+
{ value: "claude-sonnet-4-6", label: "Claude Sonnet 4.6" },
|
|
72
|
+
{ value: "claude-haiku-4-5-20251001", label: "Claude Haiku 4.5" }
|
|
73
|
+
],
|
|
74
|
+
openai: [
|
|
75
|
+
{ value: "o3", label: "o3" },
|
|
76
|
+
{ value: "o4-mini", label: "o4-mini" },
|
|
77
|
+
{ value: "gpt-4o", label: "GPT-4o" }
|
|
78
|
+
],
|
|
79
|
+
cerebras: [{ value: "gpt-oss-120b", label: "gpt-oss-120b" }]
|
|
80
|
+
};
|
|
81
|
+
const AGENT_LABELS = {
|
|
82
|
+
elizaos: "elizaOS",
|
|
83
|
+
"pi-agent": "Pi Agent",
|
|
84
|
+
claude: "Claude",
|
|
85
|
+
codex: "Codex",
|
|
86
|
+
opencode: "OpenCode"
|
|
87
|
+
};
|
|
88
|
+
const ADAPTER_NAME_TO_TAB = {
|
|
89
|
+
"claude code": "claude",
|
|
90
|
+
eliza: "elizaos",
|
|
91
|
+
"eliza os": "elizaos",
|
|
92
|
+
elizaos: "elizaos",
|
|
93
|
+
"openai codex": "codex",
|
|
94
|
+
"open code": "opencode",
|
|
95
|
+
opencode: "opencode",
|
|
96
|
+
pi: "pi-agent",
|
|
97
|
+
"pi agent": "pi-agent",
|
|
98
|
+
"pi-agent": "pi-agent",
|
|
99
|
+
claude: "claude",
|
|
100
|
+
codex: "codex"
|
|
101
|
+
};
|
|
102
|
+
const ENV_PREFIX = {
|
|
103
|
+
elizaos: "ELIZA_ELIZAOS",
|
|
104
|
+
"pi-agent": "ELIZA_PI_AGENT",
|
|
105
|
+
claude: "ELIZA_CLAUDE",
|
|
106
|
+
codex: "ELIZA_CODEX",
|
|
107
|
+
opencode: "ELIZA_OPENCODE"
|
|
108
|
+
};
|
|
109
|
+
export {
|
|
110
|
+
ADAPTER_NAME_TO_TAB,
|
|
111
|
+
AGENT_LABELS,
|
|
112
|
+
AGENT_PROVIDER_MAP,
|
|
113
|
+
AGENT_TABS,
|
|
114
|
+
APPROVAL_PRESETS,
|
|
115
|
+
CODING_ACCOUNT_STRATEGIES,
|
|
116
|
+
CODING_ACCOUNT_STRATEGY_OPTIONS,
|
|
117
|
+
ENV_PREFIX,
|
|
118
|
+
FALLBACK_MODELS,
|
|
119
|
+
isCodingAccountStrategy
|
|
120
|
+
};
|
|
121
|
+
//# sourceMappingURL=coding-agent-settings-shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/coding-agent-settings-shared.ts"],"sourcesContent":["/**\n * Shared types, constants, and fallback model lists for the Coding\n * Agent settings sub-components. Extracted out of\n * `CodingAgentSettingsSection.tsx` to keep that file under the\n * project's ~500 LOC guideline.\n */\n\nexport type AgentTab = \"elizaos\" | \"pi-agent\" | \"opencode\" | \"claude\" | \"codex\";\nexport type ApprovalPreset =\n | \"readonly\"\n | \"standard\"\n | \"permissive\"\n | \"autonomous\";\nexport type AgentSelectionStrategy = \"fixed\" | \"ranked\";\nexport type CodingAccountStrategy =\n | \"priority\"\n | \"round-robin\"\n | \"least-used\"\n | \"quota-aware\";\nexport type LlmProvider = \"subscription\" | \"api_keys\" | \"cloud\";\n\nexport const AGENT_TABS: AgentTab[] = [\n \"elizaos\",\n \"pi-agent\",\n \"opencode\",\n \"claude\",\n \"codex\",\n];\n\nexport const CODING_ACCOUNT_STRATEGIES: readonly CodingAccountStrategy[] = [\n \"least-used\",\n \"round-robin\",\n \"priority\",\n \"quota-aware\",\n];\n\nexport const CODING_ACCOUNT_STRATEGY_OPTIONS: {\n value: CodingAccountStrategy;\n labelKey: string;\n defaultLabel: string;\n}[] = [\n {\n value: \"least-used\",\n labelKey: \"codingagentsettingssection.AccountStrategyLeastUsed\",\n defaultLabel: \"Least Used\",\n },\n {\n value: \"round-robin\",\n labelKey: \"codingagentsettingssection.AccountStrategyRoundRobin\",\n defaultLabel: \"Round Robin\",\n },\n {\n value: \"priority\",\n labelKey: \"codingagentsettingssection.AccountStrategyPriority\",\n defaultLabel: \"Priority\",\n },\n {\n value: \"quota-aware\",\n labelKey: \"codingagentsettingssection.AccountStrategyQuotaAware\",\n defaultLabel: \"Quota Aware\",\n },\n];\n\nexport function isCodingAccountStrategy(\n value: unknown,\n): value is CodingAccountStrategy {\n return (\n typeof value === \"string\" &&\n CODING_ACCOUNT_STRATEGIES.includes(value as CodingAccountStrategy)\n );\n}\n\nexport const APPROVAL_PRESETS: {\n value: ApprovalPreset;\n labelKey: string;\n descKey: string;\n}[] = [\n {\n value: \"readonly\",\n labelKey: \"codingagentsettingssection.PresetReadOnly\",\n descKey: \"codingagentsettingssection.PresetReadOnlyDesc\",\n },\n {\n value: \"standard\",\n labelKey: \"mediasettingssection.Standard\",\n descKey: \"codingagentsettingssection.PresetStandardDesc\",\n },\n {\n value: \"permissive\",\n labelKey: \"codingagentsettingssection.PresetPermissive\",\n descKey: \"codingagentsettingssection.PresetPermissiveDesc\",\n },\n {\n value: \"autonomous\",\n labelKey: \"codingagentsettingssection.PresetAutonomous\",\n descKey: \"codingagentsettingssection.PresetAutonomousDesc\",\n },\n];\n\nexport interface ModelOption {\n value: string;\n label: string;\n}\n\nexport const AGENT_PROVIDER_MAP: Record<AgentTab, string> = {\n elizaos: \"cerebras\",\n \"pi-agent\": \"cerebras\",\n claude: \"anthropic\",\n codex: \"openai\",\n opencode: \"cerebras\",\n};\n\nexport const FALLBACK_MODELS: Record<string, ModelOption[]> = {\n anthropic: [\n { value: \"claude-opus-4-7\", label: \"Claude Opus 4.7\" },\n { value: \"claude-sonnet-4-6\", label: \"Claude Sonnet 4.6\" },\n { value: \"claude-haiku-4-5-20251001\", label: \"Claude Haiku 4.5\" },\n ],\n openai: [\n { value: \"o3\", label: \"o3\" },\n { value: \"o4-mini\", label: \"o4-mini\" },\n { value: \"gpt-4o\", label: \"GPT-4o\" },\n ],\n cerebras: [{ value: \"gpt-oss-120b\", label: \"gpt-oss-120b\" }],\n};\n\nexport const AGENT_LABELS: Record<AgentTab, string> = {\n elizaos: \"elizaOS\",\n \"pi-agent\": \"Pi Agent\",\n claude: \"Claude\",\n codex: \"Codex\",\n opencode: \"OpenCode\",\n};\n\n/** Map full adapter names from the preflight API to short tab keys. */\nexport const ADAPTER_NAME_TO_TAB: Record<string, AgentTab> = {\n \"claude code\": \"claude\",\n eliza: \"elizaos\",\n \"eliza os\": \"elizaos\",\n elizaos: \"elizaos\",\n \"openai codex\": \"codex\",\n \"open code\": \"opencode\",\n opencode: \"opencode\",\n pi: \"pi-agent\",\n \"pi agent\": \"pi-agent\",\n \"pi-agent\": \"pi-agent\",\n claude: \"claude\",\n codex: \"codex\",\n};\n\nexport const ENV_PREFIX: Record<AgentTab, string> = {\n elizaos: \"ELIZA_ELIZAOS\",\n \"pi-agent\": \"ELIZA_PI_AGENT\",\n claude: \"ELIZA_CLAUDE\",\n codex: \"ELIZA_CODEX\",\n opencode: \"ELIZA_OPENCODE\",\n};\n\nexport interface AuthResult {\n agent: AgentTab;\n launched?: boolean;\n url?: string;\n deviceCode?: string;\n instructions: string;\n}\n"],"mappings":"AAqBO,MAAM,aAAyB;AAAA,EACpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,4BAA8D;AAAA,EACzE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,kCAIP;AAAA,EACJ;AAAA,IACE,OAAO;AAAA,IACP,UAAU;AAAA,IACV,cAAc;AAAA,EAChB;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,UAAU;AAAA,IACV,cAAc;AAAA,EAChB;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,UAAU;AAAA,IACV,cAAc;AAAA,EAChB;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,UAAU;AAAA,IACV,cAAc;AAAA,EAChB;AACF;AAEO,SAAS,wBACd,OACgC;AAChC,SACE,OAAO,UAAU,YACjB,0BAA0B,SAAS,KAA8B;AAErE;AAEO,MAAM,mBAIP;AAAA,EACJ;AAAA,IACE,OAAO;AAAA,IACP,UAAU;AAAA,IACV,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,UAAU;AAAA,IACV,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,UAAU;AAAA,IACV,SAAS;AAAA,EACX;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,UAAU;AAAA,IACV,SAAS;AAAA,EACX;AACF;AAOO,MAAM,qBAA+C;AAAA,EAC1D,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,UAAU;AACZ;AAEO,MAAM,kBAAiD;AAAA,EAC5D,WAAW;AAAA,IACT,EAAE,OAAO,mBAAmB,OAAO,kBAAkB;AAAA,IACrD,EAAE,OAAO,qBAAqB,OAAO,oBAAoB;AAAA,IACzD,EAAE,OAAO,6BAA6B,OAAO,mBAAmB;AAAA,EAClE;AAAA,EACA,QAAQ;AAAA,IACN,EAAE,OAAO,MAAM,OAAO,KAAK;AAAA,IAC3B,EAAE,OAAO,WAAW,OAAO,UAAU;AAAA,IACrC,EAAE,OAAO,UAAU,OAAO,SAAS;AAAA,EACrC;AAAA,EACA,UAAU,CAAC,EAAE,OAAO,gBAAgB,OAAO,eAAe,CAAC;AAC7D;AAEO,MAAM,eAAyC;AAAA,EACpD,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,UAAU;AACZ;AAGO,MAAM,sBAAgD;AAAA,EAC3D,eAAe;AAAA,EACf,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,UAAU;AAAA,EACV,IAAI;AAAA,EACJ,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,OAAO;AACT;AAEO,MAAM,aAAuC;AAAA,EAClD,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,UAAU;AACZ;","names":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OrchestratorSpatialView — the task-orchestration workbench authored once with
|
|
3
|
+
* the spatial vocabulary, so it renders correctly wherever it is displayed:
|
|
4
|
+
*
|
|
5
|
+
* - GUI / XR — mounted in `<SpatialSurface>` (DOM; XR scales up).
|
|
6
|
+
* - TUI — rendered to real terminal lines by the agent terminal, via
|
|
7
|
+
* `registerSpatialTerminalView` (see `register-terminal-view.tsx`).
|
|
8
|
+
*
|
|
9
|
+
* It is purely presentational (a typed snapshot + an action callback in,
|
|
10
|
+
* primitives out) and imports only the cross-modality primitives plus a
|
|
11
|
+
* type-only view of the orchestrator records from `@elizaos/ui`, so it is safe
|
|
12
|
+
* to render in the Node agent process where the terminal lives (no host runtime
|
|
13
|
+
* import — the `import type` is erased).
|
|
14
|
+
*
|
|
15
|
+
* Two modes:
|
|
16
|
+
* - list — paginated task threads with status, priority, session counts, and
|
|
17
|
+
* cost; the workbench landing.
|
|
18
|
+
* - detail — drill-down for one thread: sessions, decisions, artifacts, events,
|
|
19
|
+
* transcripts, pending user inputs, and plan steps.
|
|
20
|
+
*/
|
|
21
|
+
import type { CodingAgentOrchestratorStatus, CodingAgentPendingDecisionRecord, CodingAgentTaskThread, CodingAgentTaskThreadDetail } from "@elizaos/ui";
|
|
22
|
+
/** One plan step distilled from a thread's current plan, for display. */
|
|
23
|
+
export interface OrchestratorPlanStep {
|
|
24
|
+
id: string;
|
|
25
|
+
label: string;
|
|
26
|
+
state: "pending" | "active" | "done" | "blocked";
|
|
27
|
+
}
|
|
28
|
+
/** The full snapshot the workbench renders from. `detail` is present only when a
|
|
29
|
+
* thread is open; absent means the list landing. */
|
|
30
|
+
export interface OrchestratorSnapshot {
|
|
31
|
+
status: CodingAgentOrchestratorStatus | null;
|
|
32
|
+
/** The current page of task threads (server-paginated). */
|
|
33
|
+
threads: CodingAgentTaskThread[];
|
|
34
|
+
/** True when more threads exist beyond this page. */
|
|
35
|
+
hasMore: boolean;
|
|
36
|
+
/** The open thread's drill-down, or null on the list landing. */
|
|
37
|
+
detail: CodingAgentTaskThreadDetail | null;
|
|
38
|
+
/** Plan steps distilled for the open thread. */
|
|
39
|
+
planSteps: OrchestratorPlanStep[];
|
|
40
|
+
/** Pending user inputs awaiting a human on the open thread. */
|
|
41
|
+
pendingInputs: CodingAgentPendingDecisionRecord[];
|
|
42
|
+
loading?: boolean;
|
|
43
|
+
error?: string | null;
|
|
44
|
+
}
|
|
45
|
+
export interface OrchestratorSpatialViewProps {
|
|
46
|
+
snapshot: OrchestratorSnapshot;
|
|
47
|
+
/**
|
|
48
|
+
* Dispatch by agent id. List: `open:<taskId>`, `pause-all`, `resume-all`,
|
|
49
|
+
* `refresh`. Detail: `back`, `pause`, `resume`, `validate`, `fork`,
|
|
50
|
+
* `delete`, `archive`, `reopen`, `restart`, `add-agent`, `copy-link`,
|
|
51
|
+
* `priority:<low|normal|high|urgent>`, `stop-session:<sessionId>`.
|
|
52
|
+
*/
|
|
53
|
+
onAction?: (action: string) => void;
|
|
54
|
+
}
|
|
55
|
+
export declare function OrchestratorSpatialView({ snapshot, onAction, }: OrchestratorSpatialViewProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
//# sourceMappingURL=OrchestratorSpatialView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrchestratorSpatialView.d.ts","sourceRoot":"","sources":["../../src/components/OrchestratorSpatialView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EACV,6BAA6B,EAC7B,gCAAgC,EAKhC,qBAAqB,EACrB,2BAA2B,EAE5B,MAAM,aAAa,CAAC;AAgBrB,yEAAyE;AACzE,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;CAClD;AAED;oDACoD;AACpD,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,6BAA6B,GAAG,IAAI,CAAC;IAC7C,2DAA2D;IAC3D,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,qDAAqD;IACrD,OAAO,EAAE,OAAO,CAAC;IACjB,iEAAiE;IACjE,MAAM,EAAE,2BAA2B,GAAG,IAAI,CAAC;IAC3C,gDAAgD;IAChD,SAAS,EAAE,oBAAoB,EAAE,CAAC;IAClC,+DAA+D;IAC/D,aAAa,EAAE,gCAAgC,EAAE,CAAC;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAsFD,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,oBAAoB,CAAC;IAC/B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,QAAQ,GACT,EAAE,4BAA4B,2CAsB9B"}
|