@openagt/dashboard 0.9.0 → 0.11.0
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/README.md +9 -17
- package/dist/built-in.d.ts +45 -16
- package/dist/built-in.d.ts.map +1 -1
- package/dist/built-in.js +95 -32
- package/dist/built-in.js.map +1 -1
- package/dist/cli.d.ts +4 -10
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +11 -67
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +2 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -4
- package/dist/client.js.map +1 -1
- package/dist/daemon-runtime.d.ts +12 -12
- package/dist/daemon-runtime.d.ts.map +1 -1
- package/dist/daemon-runtime.js +97 -37
- package/dist/daemon-runtime.js.map +1 -1
- package/dist/daemon.d.ts +3 -14
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +15 -26
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard/bridge-endpoints.d.ts +5 -5
- package/dist/dashboard/bridge-endpoints.js +5 -5
- package/dist/dashboard/http.d.ts +1 -1
- package/dist/dashboard/http.js +1 -1
- package/dist/dashboard/machine-call.d.ts +10 -0
- package/dist/dashboard/machine-call.d.ts.map +1 -0
- package/dist/dashboard/machine-call.js +86 -0
- package/dist/dashboard/machine-call.js.map +1 -0
- package/dist/dashboard/relay-endpoints.d.ts +26 -17
- package/dist/dashboard/relay-endpoints.d.ts.map +1 -1
- package/dist/dashboard/relay-endpoints.js +70 -27
- package/dist/dashboard/relay-endpoints.js.map +1 -1
- package/dist/dashboard/remote-run.d.ts +77 -32
- package/dist/dashboard/remote-run.d.ts.map +1 -1
- package/dist/dashboard/remote-run.js +120 -42
- package/dist/dashboard/remote-run.js.map +1 -1
- package/dist/dashboard/rpc-serve.d.ts +19 -25
- package/dist/dashboard/rpc-serve.d.ts.map +1 -1
- package/dist/dashboard/rpc-serve.js +11 -22
- package/dist/dashboard/rpc-serve.js.map +1 -1
- package/dist/dashboard/screen.d.ts +53 -0
- package/dist/dashboard/screen.d.ts.map +1 -0
- package/dist/dashboard/screen.js +175 -0
- package/dist/dashboard/screen.js.map +1 -0
- package/dist/dashboard/server.d.ts +18 -19
- package/dist/dashboard/server.d.ts.map +1 -1
- package/dist/dashboard/server.js +52 -81
- package/dist/dashboard/server.js.map +1 -1
- package/dist/dashboard/start-branch.d.ts +32 -0
- package/dist/dashboard/start-branch.d.ts.map +1 -0
- package/dist/dashboard/start-branch.js +47 -0
- package/dist/dashboard/start-branch.js.map +1 -0
- package/dist/dashboard/types.d.ts +6 -14
- package/dist/dashboard/types.d.ts.map +1 -1
- package/dist/dashboard/web-start-endpoints.d.ts +2 -2
- package/dist/dashboard/web-start-endpoints.js +1 -1
- package/dist/dashboard-bundle/assets/main-9Xb8Ao4p.css +2 -0
- package/dist/dashboard-bundle/assets/main-DTyyQ0jM.js +140 -0
- package/dist/dashboard-bundle/assets/{module-v213KWfH.js → module-DKd-4BTU.js} +4 -4
- package/dist/dashboard-bundle/host/module.js +1 -1
- package/dist/dashboard-bundle/index.html +3 -3
- package/dist/dashboard-rpc/context.d.ts +4 -4
- package/dist/dashboard-rpc/context.js +5 -5
- package/dist/dashboard-rpc/context.js.map +1 -1
- package/dist/dashboard-rpc/control.d.ts +1 -1
- package/dist/dashboard-rpc/control.js +7 -7
- package/dist/dashboard-rpc/control.js.map +1 -1
- package/dist/dashboard-rpc/events.d.ts +1 -1
- package/dist/dashboard-rpc/events.js +1 -1
- package/dist/dashboard-rpc/index.d.ts +2 -1
- package/dist/dashboard-rpc/index.d.ts.map +1 -1
- package/dist/dashboard-rpc/index.js +5 -3
- package/dist/dashboard-rpc/index.js.map +1 -1
- package/dist/dashboard-rpc/machines.d.ts +52 -0
- package/dist/dashboard-rpc/machines.d.ts.map +1 -0
- package/dist/dashboard-rpc/machines.js +82 -0
- package/dist/dashboard-rpc/machines.js.map +1 -0
- package/dist/dashboard-rpc/modules.d.ts +1 -1
- package/dist/dashboard-rpc/modules.js +2 -2
- package/dist/dashboard-rpc/modules.js.map +1 -1
- package/dist/dashboard-rpc/projects.d.ts +2 -0
- package/dist/dashboard-rpc/projects.d.ts.map +1 -1
- package/dist/dashboard-rpc/projects.js +10 -2
- package/dist/dashboard-rpc/projects.js.map +1 -1
- package/dist/dashboard-rpc/reads.d.ts +3 -4
- package/dist/dashboard-rpc/reads.d.ts.map +1 -1
- package/dist/dashboard-rpc/reads.js +5 -6
- package/dist/dashboard-rpc/reads.js.map +1 -1
- package/dist/dashboard-rpc/relay-agent.d.ts +3 -3
- package/dist/dashboard-rpc/relay-agent.js +3 -3
- package/dist/dashboard-rpc/relay-dispatch.d.ts +4 -4
- package/dist/dashboard-rpc/relay-dispatch.d.ts.map +1 -1
- package/dist/dashboard-rpc/relay-dispatch.js +7 -7
- package/dist/dashboard-rpc/relay-dispatch.js.map +1 -1
- package/dist/dashboard-rpc/skills.d.ts +80 -0
- package/dist/dashboard-rpc/skills.d.ts.map +1 -0
- package/dist/dashboard-rpc/skills.js +84 -0
- package/dist/dashboard-rpc/skills.js.map +1 -0
- package/dist/dashboard-rpc/test-context.js +1 -1
- package/dist/dashboard-rpc/test-context.js.map +1 -1
- package/dist/events.d.ts +4 -3
- package/dist/events.d.ts.map +1 -1
- package/dist/loopback-host.d.ts +3 -5
- package/dist/loopback-host.d.ts.map +1 -1
- package/dist/loopback-host.js +3 -5
- package/dist/loopback-host.js.map +1 -1
- package/dist/machine-link.d.ts +21 -0
- package/dist/machine-link.d.ts.map +1 -0
- package/dist/machine-link.js +20 -0
- package/dist/machine-link.js.map +1 -0
- package/dist/module-server.d.ts +1 -1
- package/dist/module-types/dashboard/components/ui/switch.d.ts +7 -0
- package/dist/module-types/dashboard/lib/draft-handoff.d.ts +5 -9
- package/dist/module-types/dashboard/module/index.d.ts +46 -0
- package/dist/module-types/src/built-in.d.ts +45 -16
- package/dist/module-types/src/client.d.ts +2 -1
- package/dist/module-types/src/dashboard/bridge-endpoints.d.ts +5 -5
- package/dist/module-types/src/dashboard/http.d.ts +1 -1
- package/dist/module-types/src/dashboard/machine-call.d.ts +9 -0
- package/dist/module-types/src/dashboard/remote-run.d.ts +77 -32
- package/dist/module-types/src/dashboard/rpc-serve.d.ts +19 -25
- package/dist/module-types/src/dashboard/start-branch.d.ts +31 -0
- package/dist/module-types/src/dashboard/types.d.ts +6 -14
- package/dist/module-types/src/dashboard-rpc/context.d.ts +4 -4
- package/dist/module-types/src/dashboard-rpc/control.d.ts +1 -1
- package/dist/module-types/src/dashboard-rpc/events.d.ts +1 -1
- package/dist/module-types/src/dashboard-rpc/index.d.ts +2 -1
- package/dist/module-types/src/dashboard-rpc/machines.d.ts +51 -0
- package/dist/module-types/src/dashboard-rpc/modules.d.ts +1 -1
- package/dist/module-types/src/dashboard-rpc/projects.d.ts +2 -0
- package/dist/module-types/src/dashboard-rpc/reads.d.ts +3 -4
- package/dist/module-types/src/dashboard-rpc/relay-agent.d.ts +3 -3
- package/dist/module-types/src/dashboard-rpc/skills.d.ts +79 -0
- package/dist/module-types/src/events.d.ts +4 -3
- package/dist/module-types/src/loopback-host.d.ts +3 -5
- package/dist/module-types/src/machine-link.d.ts +20 -0
- package/dist/module-types/src/openagent-dir.d.ts +3 -5
- package/dist/module-types/src/project-commands.d.ts +4 -0
- package/dist/module-types/src/project-hooks.d.ts +8 -5
- package/dist/module-types/src/project-modules.d.ts +8 -6
- package/dist/module-types/src/registry.d.ts +59 -16
- package/dist/module-types/src/repository-address.d.ts +22 -0
- package/dist/module-types/src/screens.d.ts +13 -0
- package/dist/module-types/src/store/agent-store.d.ts +2 -2
- package/dist/module-types/src/store/branches.d.ts +1 -1
- package/dist/module-types/src/store/git-host.d.ts +1 -1
- package/dist/module-types/src/store/queue.d.ts +1 -1
- package/dist/module-types/src/store/runs.d.ts +1 -1
- package/dist/module-types/src/store/tickets.d.ts +1 -1
- package/dist/module-types/src/version.d.ts +1 -0
- package/dist/openagent-dir.d.ts +3 -5
- package/dist/openagent-dir.d.ts.map +1 -1
- package/dist/openagent-dir.js +3 -5
- package/dist/openagent-dir.js.map +1 -1
- package/dist/package-services.d.ts +27 -0
- package/dist/package-services.d.ts.map +1 -0
- package/dist/package-services.js +62 -0
- package/dist/package-services.js.map +1 -0
- package/dist/project-commands.d.ts +4 -0
- package/dist/project-commands.d.ts.map +1 -1
- package/dist/project-commands.js.map +1 -1
- package/dist/project-hooks.d.ts +8 -5
- package/dist/project-hooks.d.ts.map +1 -1
- package/dist/project-hooks.js +9 -6
- package/dist/project-hooks.js.map +1 -1
- package/dist/project-modules.d.ts +8 -6
- package/dist/project-modules.d.ts.map +1 -1
- package/dist/project-modules.js +7 -13
- package/dist/project-modules.js.map +1 -1
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +1 -2
- package/dist/project.js.map +1 -1
- package/dist/registry.d.ts +59 -16
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +91 -20
- package/dist/registry.js.map +1 -1
- package/dist/repository-address.d.ts +23 -0
- package/dist/repository-address.d.ts.map +1 -0
- package/dist/repository-address.js +38 -0
- package/dist/repository-address.js.map +1 -0
- package/dist/screens.d.ts +14 -0
- package/dist/screens.d.ts.map +1 -0
- package/dist/screens.js +40 -0
- package/dist/screens.js.map +1 -0
- package/dist/store/agent-store.d.ts +2 -2
- package/dist/store/agent-store.d.ts.map +1 -1
- package/dist/store/branches.d.ts +1 -1
- package/dist/store/branches.js +1 -1
- package/dist/store/git-host.d.ts +1 -1
- package/dist/store/git-host.js +2 -2
- package/dist/store/git-host.js.map +1 -1
- package/dist/store/queue.d.ts +1 -1
- package/dist/store/queue.js +1 -1
- package/dist/store/runs.d.ts +1 -1
- package/dist/store/runs.js +1 -1
- package/dist/store/test-branches.d.ts +0 -8
- package/dist/store/test-branches.d.ts.map +1 -1
- package/dist/store/test-branches.js +0 -24
- package/dist/store/test-branches.js.map +1 -1
- package/dist/store/tickets.d.ts +1 -1
- package/dist/store/tickets.js +1 -1
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +26 -0
- package/dist/version.js.map +1 -0
- package/package.json +19 -13
- package/dist/dashboard-bundle/assets/main-B98UOA3_.js +0 -140
- package/dist/dashboard-bundle/assets/main-ByRjbCiA.css +0 -2
- package/dist/dashboard-rpc/devices.d.ts +0 -9
- package/dist/dashboard-rpc/devices.d.ts.map +0 -1
- package/dist/dashboard-rpc/devices.js +0 -12
- package/dist/dashboard-rpc/devices.js.map +0 -1
- package/dist/install.d.ts +0 -31
- package/dist/install.d.ts.map +0 -1
- package/dist/install.js +0 -54
- package/dist/install.js.map +0 -1
- package/dist/module-types/src/dashboard-rpc/devices.d.ts +0 -8
- package/dist/module-types/src/openagent-gitignore.d.ts +0 -11
- package/dist/openagent-gitignore.d.ts +0 -12
- package/dist/openagent-gitignore.d.ts.map +0 -1
- package/dist/openagent-gitignore.js +0 -19
- package/dist/openagent-gitignore.js.map +0 -1
package/README.md
CHANGED
|
@@ -14,18 +14,13 @@ cd ~/code/my-repo
|
|
|
14
14
|
openagent # serves the dashboard at http://127.0.0.1:4200
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
## The CLI is
|
|
17
|
+
## The CLI is three options and no verbs
|
|
18
18
|
|
|
19
19
|
```
|
|
20
20
|
openagent Serve the dashboard in the foreground. Ctrl+C closes it; the
|
|
21
21
|
agents it started go on to their own end.
|
|
22
22
|
|
|
23
23
|
--port <n> Dashboard port (default: 4200).
|
|
24
|
-
--host <addr> Bind address (default: 127.0.0.1). A non-loopback address
|
|
25
|
-
exposes the dashboard to your network and generates a shared
|
|
26
|
-
token; the printed URL carries it, and any request without it
|
|
27
|
-
gets 401. Exposing the daemon to the network is a security
|
|
28
|
-
decision.
|
|
29
24
|
-h, --help Show this help.
|
|
30
25
|
-v, --version Print the version.
|
|
31
26
|
```
|
|
@@ -51,9 +46,9 @@ document whose `id` names the agent it began. From there the agent belongs to wh
|
|
|
51
46
|
line started. Adding a project writes these three lines into the file, so a new project, an
|
|
52
47
|
empty folder included, starts an agent with nothing typed by hand. They are a default: a line
|
|
53
48
|
already there is kept, and any of them can be changed or deleted. A line finds its tools in the
|
|
54
|
-
|
|
49
|
+
packages the dashboard brings first, `agent-runner` and `agent-scheduler` among them, then in the project's installed ones;
|
|
55
50
|
nothing is downloaded to run a line. A project with no `start` line cannot start an agent from
|
|
56
|
-
the dashboard, and the dashboard says so. `npx agent-scheduler init`, run in the project, writes
|
|
51
|
+
the dashboard, and the dashboard says so. `npx @openagt/agent-scheduler@0.1 init`, run in the project, writes
|
|
57
52
|
the scheduler's `open` and `close` lines (they start it when the dashboard opens and stop it
|
|
58
53
|
when it closes), keeping any line already there. The file's keys are `open`, `close`, `start`, `resume` and `check`; any other key
|
|
59
54
|
is refused and the whole file ignored.
|
|
@@ -76,11 +71,12 @@ The `check` line is what the launcher runs before a Start, with the picked codin
|
|
|
76
71
|
out: said in red) and `warnings` (said in amber), each line naming its own fix. A project
|
|
77
72
|
with no `check` line shows nothing there.
|
|
78
73
|
|
|
79
|
-
A package's own settings are no hook. The scheduler's
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
`agent-scheduler offset`, `switch
|
|
74
|
+
A package's own settings are no hook. The scheduler's are the scheduler package's own part of
|
|
75
|
+
the dashboard: its Automations page holds a switch, a pace, a number of agents at once and a
|
|
76
|
+
publish pick per scheduled command, its Settings section holds how far past the quota boundary
|
|
77
|
+
it may start unattended work, and the handle on the usage bar is its stop line. That part reads
|
|
78
|
+
them with `agent-scheduler status` and saves them with `agent-scheduler offset`, `switch`,
|
|
79
|
+
`pace`, `agents` and `publish`.
|
|
84
80
|
|
|
85
81
|
The dashboard is a **projection of the agent's own files**. The agent's tool keeps the
|
|
86
82
|
agent's card (`<id>.json`) and diary (`<id>.jsonl`) under `.openagent/` in the agent's
|
|
@@ -116,10 +112,6 @@ needs only its lines carried home.
|
|
|
116
112
|
- `dashboard/` — the browser app: a Vite SPA the daemon serves as static files,
|
|
117
113
|
talking back over plain HTTP. See [its README](./dashboard/README.md).
|
|
118
114
|
|
|
119
|
-
A `LOGIC.md` sits beside every source file and directory, describing the business
|
|
120
|
-
logic it implements, in prose written to be read instead of the code.
|
|
121
|
-
[`LOGIC.md`](./LOGIC.md) at the package root is the place to start.
|
|
122
|
-
|
|
123
115
|
## Status
|
|
124
116
|
|
|
125
117
|
Pre-release, published from the `0.x` line. There are no users to keep compatible,
|
package/dist/built-in.d.ts
CHANGED
|
@@ -1,38 +1,67 @@
|
|
|
1
1
|
import type { CleanupReport } from './dashboard/types.js';
|
|
2
2
|
import { type ProjectPackage, type ProvidedCommand, type ProvidedCommandLookup } from '@openagt/agent-data';
|
|
3
3
|
/**
|
|
4
|
-
* The packages OpenAgent
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
4
|
+
* The packages OpenAgent brings, by name: dependencies of OpenAgent itself, resolved from its
|
|
5
|
+
* own install, so a project installs nothing for them and an empty folder starts an agent and
|
|
6
|
+
* shows it. Each comes through the same contract as any package: a module by its `./dashboard`
|
|
7
|
+
* export, a provider of a kind of data and the writer of its hook lines by its `openagent` key.
|
|
8
|
+
* These two lists are the one place OpenAgent names a package. One of these names among a
|
|
9
|
+
* project's own dependencies is not read: OpenAgent's copy, and the rules below for which
|
|
10
|
+
* project has it, are the only ones.
|
|
10
11
|
*/
|
|
12
|
+
/** The packages every project has: an agent cannot start, be shown or be put on a git host without them, and the door to this computer and the servers it installed OpenAgent on are no project's to pick. */
|
|
11
13
|
export declare const BUILT_IN_PACKAGES: readonly string[];
|
|
12
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* The packages a project has once it picked them (#2023). A skill's package is the project's
|
|
16
|
+
* when the project holds the skill's text where the coding agents read it
|
|
17
|
+
* (`.claude/skills/<name>/SKILL.md`, `.agents/skills/<name>/SKILL.md`): the rule the launcher
|
|
18
|
+
* already lists a project's commands by, so deleting the skill's folder takes its page away. A
|
|
19
|
+
* tool with no skill text (the scheduler) is the project's when one of the project's hook lines
|
|
20
|
+
* runs it.
|
|
21
|
+
*/
|
|
22
|
+
export declare const PICKED_PACKAGES: readonly string[];
|
|
23
|
+
/** Every name OpenAgent brings itself. */
|
|
24
|
+
export declare const OWN_PACKAGE_NAMES: readonly string[];
|
|
25
|
+
/** Every package OpenAgent brings, resolved from its own install, once; one that is not installed is skipped. */
|
|
13
26
|
export declare function builtInPackages(): Promise<ProjectPackage[]>;
|
|
14
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* The packages OpenAgent brings to the project at `root`: the ones every project has, and
|
|
29
|
+
* each picked one the project has by its rule (see {@link PICKED_PACKAGES}). Read off the
|
|
30
|
+
* project's files each time, so a skill written or deleted a moment ago counts at once.
|
|
31
|
+
*/
|
|
32
|
+
export declare function builtInPackagesOf(root: string): Promise<ProjectPackage[]>;
|
|
33
|
+
/** The project's own installed packages, less the names OpenAgent brings itself. */
|
|
34
|
+
export declare function ownPackages(root: string): Promise<ProjectPackage[]>;
|
|
35
|
+
/**
|
|
36
|
+
* The services of the packages every project has: a package declares
|
|
37
|
+
* `"openagent": { "service": "<command>" }`, and `<command> serve` runs for as long as OpenAgent
|
|
38
|
+
* runs (`package-services.ts`). Only those packages: a service is this computer's, and a package
|
|
39
|
+
* a project picked is that project's.
|
|
40
|
+
*/
|
|
41
|
+
export declare function builtInServices(): Promise<ProvidedCommand[]>;
|
|
42
|
+
/** The directories the commands of OpenAgent's packages sit in: what a hook line's PATH gains after the project's own installed tools. */
|
|
15
43
|
export declare function builtInBinDirs(): Promise<string[]>;
|
|
16
|
-
/** What provides `kind` in the project at `root`:
|
|
44
|
+
/** What provides `kind` in the project at `root`: a package the project installed for it, else one OpenAgent brings to this project. */
|
|
17
45
|
export declare function lookupProvided(root: string, kind: string): Promise<ProvidedCommandLookup>;
|
|
18
46
|
/** {@link lookupProvided}'s command, for a caller that only needs to run it. */
|
|
19
47
|
export declare function providedCommand(root: string, kind: string): Promise<ProvidedCommand | undefined>;
|
|
20
|
-
/** Whether `command` comes from a
|
|
21
|
-
export declare function isBuiltIn(
|
|
48
|
+
/** Whether `command` comes from a package OpenAgent brings: one the project did not install. */
|
|
49
|
+
export declare function isBuiltIn(command: ProvidedCommand): boolean;
|
|
22
50
|
/**
|
|
23
51
|
* Have every package that writes hook lines write its own into the project at `root`: a package
|
|
24
52
|
* declares `"openagent": { "hooks": "<command>" }`, and `<command> init`, run in the project,
|
|
25
53
|
* writes its lines into the project's hooks file, keeping every line already there. The project's
|
|
26
|
-
* own packages are asked, then the
|
|
27
|
-
*
|
|
54
|
+
* own packages are asked, then the ones OpenAgent brings to it. Answers one line per package
|
|
55
|
+
* that could not write, in words.
|
|
28
56
|
*/
|
|
29
57
|
export declare function writeHookLines(root: string): Promise<string[]>;
|
|
30
58
|
/**
|
|
31
59
|
* Have every package that declares a clean-up remove what it left in the project at `root`: a
|
|
32
60
|
* package declares `"openagent": { "cleanup": "<command>" }`, and `<command> cleanup`, run in the
|
|
33
|
-
* project, answers `{ ok: true, removed, kept }`. The project's own packages are asked, then
|
|
34
|
-
*
|
|
35
|
-
*
|
|
61
|
+
* project, answers `{ ok: true, removed, kept }`. The project's own packages are asked, then
|
|
62
|
+
* every package OpenAgent brings, also one this project no longer has (what it left stays its
|
|
63
|
+
* own to remove), each whatever the one before answered. A package that refuses, fails or answers
|
|
64
|
+
* something else is one line in `failed`, in words.
|
|
36
65
|
*/
|
|
37
66
|
export declare function runCleanups(root: string): Promise<CleanupReport>;
|
|
38
67
|
//# sourceMappingURL=built-in.d.ts.map
|
package/dist/built-in.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"built-in.d.ts","sourceRoot":"","sources":["../src/built-in.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"built-in.d.ts","sourceRoot":"","sources":["../src/built-in.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,E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AM,EAAE,CAAC,CAQpE;AAED;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAkBtE"}
|
package/dist/built-in.js
CHANGED
|
@@ -1,25 +1,40 @@
|
|
|
1
|
-
import { realpath } from 'node:fs/promises';
|
|
1
|
+
import { readFile, realpath, stat } from 'node:fs/promises';
|
|
2
2
|
import { createRequire } from 'node:module';
|
|
3
3
|
import { dirname, join } from 'node:path';
|
|
4
|
-
import {
|
|
4
|
+
import { SKILLS_DIRS } from './project-commands.js';
|
|
5
|
+
import { readProjectHooks } from './project-hooks.js';
|
|
6
|
+
import { declaring, lineRuns, lookupProvidedCommand, packageBins, projectPackages, readManifest, runPackageCommand } from '@openagt/agent-data';
|
|
5
7
|
/**
|
|
6
|
-
* The packages OpenAgent
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* The packages OpenAgent brings, by name: dependencies of OpenAgent itself, resolved from its
|
|
9
|
+
* own install, so a project installs nothing for them and an empty folder starts an agent and
|
|
10
|
+
* shows it. Each comes through the same contract as any package: a module by its `./dashboard`
|
|
11
|
+
* export, a provider of a kind of data and the writer of its hook lines by its `openagent` key.
|
|
12
|
+
* These two lists are the one place OpenAgent names a package. One of these names among a
|
|
13
|
+
* project's own dependencies is not read: OpenAgent's copy, and the rules below for which
|
|
14
|
+
* project has it, are the only ones.
|
|
12
15
|
*/
|
|
13
|
-
|
|
16
|
+
/** The packages every project has: an agent cannot start, be shown or be put on a git host without them, and the door to this computer and the servers it installed OpenAgent on are no project's to pick. */
|
|
17
|
+
export const BUILT_IN_PACKAGES = ['@openagt/files', '@openagt/remote-access', '@openagt/servers', '@openagt/skill-branches', '@openagt/skill-github', '@openagt/skill-logs', '@openagt/agent-runner'];
|
|
18
|
+
/**
|
|
19
|
+
* The packages a project has once it picked them (#2023). A skill's package is the project's
|
|
20
|
+
* when the project holds the skill's text where the coding agents read it
|
|
21
|
+
* (`.claude/skills/<name>/SKILL.md`, `.agents/skills/<name>/SKILL.md`): the rule the launcher
|
|
22
|
+
* already lists a project's commands by, so deleting the skill's folder takes its page away. A
|
|
23
|
+
* tool with no skill text (the scheduler) is the project's when one of the project's hook lines
|
|
24
|
+
* runs it.
|
|
25
|
+
*/
|
|
26
|
+
export const PICKED_PACKAGES = ['@openagt/skill-tickets', '@openagt/skill-queue', '@openagt/skill-orchestration', '@openagt/skill-browser', '@openagt/agent-scheduler'];
|
|
27
|
+
/** Every name OpenAgent brings itself. */
|
|
28
|
+
export const OWN_PACKAGE_NAMES = [...BUILT_IN_PACKAGES, ...PICKED_PACKAGES];
|
|
14
29
|
let resolved;
|
|
15
|
-
/**
|
|
30
|
+
/** Every package OpenAgent brings, resolved from its own install, once; one that is not installed is skipped. */
|
|
16
31
|
export function builtInPackages() {
|
|
17
|
-
return (resolved ??=
|
|
32
|
+
return (resolved ??= resolveOwn());
|
|
18
33
|
}
|
|
19
|
-
async function
|
|
34
|
+
async function resolveOwn() {
|
|
20
35
|
const require = createRequire(import.meta.url);
|
|
21
36
|
const packages = [];
|
|
22
|
-
for (const name of
|
|
37
|
+
for (const name of OWN_PACKAGE_NAMES) {
|
|
23
38
|
let manifestPath;
|
|
24
39
|
try {
|
|
25
40
|
manifestPath = require.resolve(`${name}/package.json`);
|
|
@@ -29,12 +44,63 @@ async function resolveBuiltIn() {
|
|
|
29
44
|
}
|
|
30
45
|
const dir = await realpath(dirname(manifestPath)).catch(() => undefined);
|
|
31
46
|
const manifest = dir ? await readManifest(join(dir, 'package.json')) : undefined;
|
|
32
|
-
if (dir
|
|
33
|
-
|
|
47
|
+
if (!dir || !manifest)
|
|
48
|
+
continue;
|
|
49
|
+
const skill = /^name:[ \t]*([a-z0-9][a-z0-9-]*)[ \t]*$/m.exec(/^---\r?\n([\s\S]*?)\r?\n---/.exec(await readFile(join(dir, 'SKILL.md'), 'utf8').catch(() => ''))?.[1] ?? '')?.[1];
|
|
50
|
+
packages.push({ name, dir, manifest, picked: PICKED_PACKAGES.includes(name), ...(skill !== undefined ? { skill } : {}) });
|
|
34
51
|
}
|
|
35
52
|
return packages;
|
|
36
53
|
}
|
|
37
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* The packages OpenAgent brings to the project at `root`: the ones every project has, and
|
|
56
|
+
* each picked one the project has by its rule (see {@link PICKED_PACKAGES}). Read off the
|
|
57
|
+
* project's files each time, so a skill written or deleted a moment ago counts at once.
|
|
58
|
+
*/
|
|
59
|
+
export async function builtInPackagesOf(root) {
|
|
60
|
+
const packages = [];
|
|
61
|
+
let lines;
|
|
62
|
+
for (const pkg of await (resolved ??= resolveOwn())) {
|
|
63
|
+
if (pkg.picked) {
|
|
64
|
+
if (pkg.skill !== undefined ? !(await holdsSkill(root, pkg.skill)) : !runsOneOf((lines ??= await hookLines(root)), pkg))
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
packages.push(pkg);
|
|
68
|
+
}
|
|
69
|
+
return packages;
|
|
70
|
+
}
|
|
71
|
+
/** Whether the project holds the text of the skill `name`, in one of the folders the coding agents read. */
|
|
72
|
+
async function holdsSkill(root, name) {
|
|
73
|
+
for (const dir of SKILLS_DIRS)
|
|
74
|
+
if (await stat(join(root, dir, name, 'SKILL.md')).then(s => s.isFile(), () => false))
|
|
75
|
+
return true;
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
/** Every line of the project's hooks file. */
|
|
79
|
+
async function hookLines(root) {
|
|
80
|
+
const hooks = await readProjectHooks(root).catch(() => undefined);
|
|
81
|
+
if (!hooks)
|
|
82
|
+
return [];
|
|
83
|
+
return [...hooks.open, ...hooks.close, hooks.start, hooks.resume, hooks.check].filter((line) => typeof line === 'string');
|
|
84
|
+
}
|
|
85
|
+
/** Whether one of `lines` runs the package: see `lineRuns`. */
|
|
86
|
+
function runsOneOf(lines, pkg) {
|
|
87
|
+
const tool = { name: pkg.name, commands: Object.keys(packageBins(pkg.name, pkg.manifest.bin, pkg.dir)) };
|
|
88
|
+
return lines.some(line => lineRuns(line, tool));
|
|
89
|
+
}
|
|
90
|
+
/** The project's own installed packages, less the names OpenAgent brings itself. */
|
|
91
|
+
export async function ownPackages(root) {
|
|
92
|
+
return (await projectPackages(root)).filter(pkg => !OWN_PACKAGE_NAMES.includes(pkg.name));
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* The services of the packages every project has: a package declares
|
|
96
|
+
* `"openagent": { "service": "<command>" }`, and `<command> serve` runs for as long as OpenAgent
|
|
97
|
+
* runs (`package-services.ts`). Only those packages: a service is this computer's, and a package
|
|
98
|
+
* a project picked is that project's.
|
|
99
|
+
*/
|
|
100
|
+
export async function builtInServices() {
|
|
101
|
+
return declaring((await (resolved ??= resolveOwn())).filter(pkg => !pkg.picked), 'service');
|
|
102
|
+
}
|
|
103
|
+
/** The directories the commands of OpenAgent's packages sit in: what a hook line's PATH gains after the project's own installed tools. */
|
|
38
104
|
export async function builtInBinDirs() {
|
|
39
105
|
const dirs = new Set();
|
|
40
106
|
for (const { name, dir, manifest } of await builtInPackages()) {
|
|
@@ -43,30 +109,27 @@ export async function builtInBinDirs() {
|
|
|
43
109
|
}
|
|
44
110
|
return [...dirs];
|
|
45
111
|
}
|
|
46
|
-
/** What provides `kind` in the project at `root`:
|
|
112
|
+
/** What provides `kind` in the project at `root`: a package the project installed for it, else one OpenAgent brings to this project. */
|
|
47
113
|
export async function lookupProvided(root, kind) {
|
|
48
|
-
return lookupProvidedCommand(root, kind, await
|
|
114
|
+
return lookupProvidedCommand(root, kind, await builtInPackagesOf(root), OWN_PACKAGE_NAMES);
|
|
49
115
|
}
|
|
50
116
|
/** {@link lookupProvided}'s command, for a caller that only needs to run it. */
|
|
51
117
|
export async function providedCommand(root, kind) {
|
|
52
118
|
return (await lookupProvided(root, kind)).command;
|
|
53
119
|
}
|
|
54
|
-
/** Whether `command` comes from a
|
|
55
|
-
export
|
|
56
|
-
|
|
57
|
-
return false;
|
|
58
|
-
return (await builtInPackages()).some(pkg => pkg.name === command.package);
|
|
120
|
+
/** Whether `command` comes from a package OpenAgent brings: one the project did not install. */
|
|
121
|
+
export function isBuiltIn(command) {
|
|
122
|
+
return OWN_PACKAGE_NAMES.includes(command.package);
|
|
59
123
|
}
|
|
60
124
|
/**
|
|
61
125
|
* Have every package that writes hook lines write its own into the project at `root`: a package
|
|
62
126
|
* declares `"openagent": { "hooks": "<command>" }`, and `<command> init`, run in the project,
|
|
63
127
|
* writes its lines into the project's hooks file, keeping every line already there. The project's
|
|
64
|
-
* own packages are asked, then the
|
|
65
|
-
*
|
|
128
|
+
* own packages are asked, then the ones OpenAgent brings to it. Answers one line per package
|
|
129
|
+
* that could not write, in words.
|
|
66
130
|
*/
|
|
67
131
|
export async function writeHookLines(root) {
|
|
68
|
-
const
|
|
69
|
-
const packages = [...own, ...(await builtInPackages()).filter(pkg => !own.some(o => o.name === pkg.name))];
|
|
132
|
+
const packages = [...(await ownPackages(root)), ...(await builtInPackagesOf(root))];
|
|
70
133
|
const failed = [];
|
|
71
134
|
for (const command of declaring(packages, 'hooks')) {
|
|
72
135
|
const result = await runPackageCommand(root, command, ['init']);
|
|
@@ -78,13 +141,13 @@ export async function writeHookLines(root) {
|
|
|
78
141
|
/**
|
|
79
142
|
* Have every package that declares a clean-up remove what it left in the project at `root`: a
|
|
80
143
|
* package declares `"openagent": { "cleanup": "<command>" }`, and `<command> cleanup`, run in the
|
|
81
|
-
* project, answers `{ ok: true, removed, kept }`. The project's own packages are asked, then
|
|
82
|
-
*
|
|
83
|
-
*
|
|
144
|
+
* project, answers `{ ok: true, removed, kept }`. The project's own packages are asked, then
|
|
145
|
+
* every package OpenAgent brings, also one this project no longer has (what it left stays its
|
|
146
|
+
* own to remove), each whatever the one before answered. A package that refuses, fails or answers
|
|
147
|
+
* something else is one line in `failed`, in words.
|
|
84
148
|
*/
|
|
85
149
|
export async function runCleanups(root) {
|
|
86
|
-
const
|
|
87
|
-
const packages = [...own, ...(await builtInPackages()).filter(pkg => !own.some(o => o.name === pkg.name))];
|
|
150
|
+
const packages = [...(await ownPackages(root)), ...(await builtInPackages())];
|
|
88
151
|
const report = { removed: [], kept: [], failed: [] };
|
|
89
152
|
for (const command of declaring(packages, 'cleanup')) {
|
|
90
153
|
const result = await runPackageCommand(root, command, ['cleanup']);
|
package/dist/built-in.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"built-in.js","sourceRoot":"","sources":["../src/built-in.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"built-in.js","sourceRoot":"","sources":["../src/built-in.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,qBAAqB,EAAE,WAAW,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAyE,MAAM,qBAAqB,CAAA;AAEtN;;;;;;;;GAQG;AAEH,8MAA8M;AAC9M,MAAM,CAAC,MAAM,iBAAiB,GAAsB,CAAC,gBAAgB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,uBAAuB,CAAC,CAAA;AAExN;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAsB,CAAC,wBAAwB,EAAE,sBAAsB,EAAE,8BAA8B,EAAE,wBAAwB,EAAE,0BAA0B,CAAC,CAAA;AAE1L,0CAA0C;AA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AAE,CAAC,CAAC,EAAE,CAAA;AACrH,CAAC"}
|
package/dist/cli.d.ts
CHANGED
|
@@ -4,26 +4,20 @@ export interface CliIO {
|
|
|
4
4
|
out: (line: string) => void;
|
|
5
5
|
err: (line: string) => void;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
/** What the CLI itself accepts: four options, no verbs (D4). */
|
|
7
|
+
/** What the CLI itself accepts: three options, no verbs (D4). */
|
|
9
8
|
export interface CliArgs {
|
|
10
9
|
help: boolean;
|
|
11
10
|
version: boolean;
|
|
12
11
|
/** `--port <n>`: the port the dashboard binds. Default {@link DEFAULT_DAEMON_PORT}; `0` is ephemeral. */
|
|
13
12
|
port?: number;
|
|
14
|
-
/**
|
|
15
|
-
* `--host <addr>` (#1051): the dashboard's bind address. Default loopback; a non-loopback
|
|
16
|
-
* address exposes it to the network and gates every route behind the generated shared token.
|
|
17
|
-
*/
|
|
18
|
-
host?: string;
|
|
19
13
|
error?: string;
|
|
20
14
|
}
|
|
21
15
|
/**
|
|
22
16
|
* Parse argv (without the node/script prefix). Pure and testable.
|
|
23
17
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
18
|
+
* Three options and nothing else: `--port` because it is the one thing a browser cannot be asked
|
|
19
|
+
* and a dashboard cannot serve about itself; `--help` and `--version` because a command with
|
|
20
|
+
* options owes the user both. The command runs no agent (#1774): a run is started
|
|
27
21
|
* from the dashboard, by the project's own start hook.
|
|
28
22
|
*/
|
|
29
23
|
export declare function parseArgs(argv: string[]): CliArgs;
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0D,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAK/G,gEAAgE;AAChE,MAAM,WAAW,KAAK;IACpB,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3B,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5B;AAwBD,iEAAiE;AACjE,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,OAAO,CAAA;IAChB,yGAAyG;IACzG,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAyBjD;AAED,wBAAsB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,GAAE,KAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CAiBnF;AA6BD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,GAAE;IAAE,WAAW,CAAC,EAAE,cAAc,CAAA;CAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAaxG"}
|
package/dist/cli.js
CHANGED
|
@@ -1,36 +1,11 @@
|
|
|
1
|
-
import { readFileSync } from 'node:fs';
|
|
2
|
-
import { dirname, join } from 'node:path';
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
4
1
|
import { checkForUpdate, formatUpdateStatus, nodeVersionFetcher } from './update-check.js';
|
|
5
|
-
import {
|
|
6
|
-
import { ensureDaemonToken } from './registry.js';
|
|
2
|
+
import { runDaemon, DEFAULT_DAEMON_PORT } from './daemon.js';
|
|
7
3
|
import { errorMessage } from './error-message.js';
|
|
4
|
+
import { openagentVersion } from './version.js';
|
|
8
5
|
const defaultIO = {
|
|
9
6
|
out: line => process.stdout.write(line + '\n'),
|
|
10
7
|
err: line => process.stderr.write(line + '\n'),
|
|
11
8
|
};
|
|
12
|
-
/**
|
|
13
|
-
* The CLI version, read from the package's own `package.json` at runtime (#312).
|
|
14
|
-
* The compiled entry lives one level under the package root (`dist/` or
|
|
15
|
-
* `dist-test/`), so its `package.json` is always `../package.json`. Cached after
|
|
16
|
-
* the first read; falls back to `unknown` if the file is somehow unreadable.
|
|
17
|
-
*/
|
|
18
|
-
let cachedVersion;
|
|
19
|
-
export function openagentVersion() {
|
|
20
|
-
if (cachedVersion !== undefined)
|
|
21
|
-
return cachedVersion;
|
|
22
|
-
try {
|
|
23
|
-
const pkgPath = join(dirname(fileURLToPath(import.meta.url)), '..', 'package.json');
|
|
24
|
-
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
25
|
-
// `unknown`, not `0.0.0`: the packages are unreleased and legitimately versioned `0.0.0`, so a
|
|
26
|
-
// numeric fallback would make a failed read indistinguishable from a correct one (#312).
|
|
27
|
-
cachedVersion = pkg.version ?? 'unknown';
|
|
28
|
-
}
|
|
29
|
-
catch {
|
|
30
|
-
cachedVersion = 'unknown';
|
|
31
|
-
}
|
|
32
|
-
return cachedVersion;
|
|
33
|
-
}
|
|
34
9
|
const HELP = `OpenAgent — turnkey AI orchestration that wraps a coding agent (Claude Code or Codex).
|
|
35
10
|
|
|
36
11
|
Usage:
|
|
@@ -39,22 +14,20 @@ Usage:
|
|
|
39
14
|
|
|
40
15
|
Options:
|
|
41
16
|
--port <n> Dashboard port (default: 4200).
|
|
42
|
-
--host <addr> Bind address (default: 127.0.0.1, localhost only). A non-loopback
|
|
43
|
-
address (e.g. 0.0.0.0) exposes the dashboard to your network and
|
|
44
|
-
generates a shared token; the printed URL carries it, and any request
|
|
45
|
-
without it gets 401. Exposing a process spawner to the network is a
|
|
46
|
-
security decision (#806).
|
|
47
17
|
-h, --help Show this help.
|
|
48
18
|
-v, --version Print the version.
|
|
49
19
|
|
|
20
|
+
The dashboard listens on this computer only. A phone, or another computer's OpenAgent, gets in
|
|
21
|
+
from its Settings page: Devices.
|
|
22
|
+
|
|
50
23
|
Everything else is the dashboard: it shows a project's runs from their files, and starts one
|
|
51
24
|
through the project's own start hook (.openagent/hooks.yml), which names the tool that runs it.`;
|
|
52
25
|
/**
|
|
53
26
|
* Parse argv (without the node/script prefix). Pure and testable.
|
|
54
27
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
28
|
+
* Three options and nothing else: `--port` because it is the one thing a browser cannot be asked
|
|
29
|
+
* and a dashboard cannot serve about itself; `--help` and `--version` because a command with
|
|
30
|
+
* options owes the user both. The command runs no agent (#1774): a run is started
|
|
58
31
|
* from the dashboard, by the project's own start hook.
|
|
59
32
|
*/
|
|
60
33
|
export function parseArgs(argv) {
|
|
@@ -75,19 +48,12 @@ export function parseArgs(argv) {
|
|
|
75
48
|
if (Number.isInteger(n) && n >= 0)
|
|
76
49
|
opts.port = n;
|
|
77
50
|
else
|
|
78
|
-
opts.error
|
|
79
|
-
break;
|
|
80
|
-
}
|
|
81
|
-
case '--host': {
|
|
82
|
-
const value = argv[++i];
|
|
83
|
-
if (value === undefined)
|
|
84
|
-
opts.error = 'invalid --host: missing address';
|
|
85
|
-
else
|
|
86
|
-
opts.host = value;
|
|
51
|
+
opts.error ??= 'invalid --port: must be a non-negative integer';
|
|
87
52
|
break;
|
|
88
53
|
}
|
|
89
54
|
default:
|
|
90
|
-
|
|
55
|
+
// The first thing that could not be read is the one told: what follows an unknown option is its value, not a command.
|
|
56
|
+
opts.error ??= arg.startsWith('-') ? `unknown option: ${arg}` : `unknown command: ${arg}`;
|
|
91
57
|
}
|
|
92
58
|
}
|
|
93
59
|
return opts;
|
|
@@ -118,19 +84,11 @@ export async function runCli(argv, io = defaultIO) {
|
|
|
118
84
|
async function runForegroundDaemonCmd(args, io) {
|
|
119
85
|
const cwd = process.cwd();
|
|
120
86
|
const port = args.port ?? DEFAULT_DAEMON_PORT;
|
|
121
|
-
const host = args.host;
|
|
122
|
-
// #1051: pre-generate the shared token for a non-loopback bind so onListening (sync) can print
|
|
123
|
-
// the reachable URL; runDaemon reuses the same persisted token.
|
|
124
|
-
const token = host !== undefined && !isLoopbackHost(host) ? await ensureDaemonToken() : undefined;
|
|
125
87
|
try {
|
|
126
88
|
await runDaemon(cwd, {
|
|
127
89
|
port,
|
|
128
|
-
...(host !== undefined ? { host } : {}),
|
|
129
90
|
onListening: state => {
|
|
130
91
|
io.out(`◆ dashboard running: ${state.url}`);
|
|
131
|
-
if (!isLoopbackHost(state.host ?? DEFAULT_DAEMON_HOST)) {
|
|
132
|
-
printNonLoopbackAccess(io, state.host ?? DEFAULT_DAEMON_HOST, state.url, token);
|
|
133
|
-
}
|
|
134
92
|
io.out(' Ctrl+C to stop the dashboard. Server logs stream below.');
|
|
135
93
|
// #312 asks bare `openagent` to print the commands + version too. onListening is sync and
|
|
136
94
|
// runDaemon then blocks until signalled, so this is fire-and-forget by necessity: the
|
|
@@ -145,20 +103,6 @@ async function runForegroundDaemonCmd(args, io) {
|
|
|
145
103
|
}
|
|
146
104
|
return 0;
|
|
147
105
|
}
|
|
148
|
-
/**
|
|
149
|
-
* The loud one-line warning and the token-bearing URL printed on any non-loopback daemon bind
|
|
150
|
-
* (#1051). A daemon that spawns processes is code execution for anyone who reaches the port, and
|
|
151
|
-
* the shared token is the only guard, so this says so before the daemon is left running. The bound
|
|
152
|
-
* host is a bind-all like `0.0.0.0`, so the user swaps it for the machine's actual reachable
|
|
153
|
-
* address (a Tailscale/LAN hostname); the token rides the URL for the first hop, then the cookie.
|
|
154
|
-
*/
|
|
155
|
-
function printNonLoopbackAccess(io, host, url, token) {
|
|
156
|
-
io.err(`⚠ SECURITY: bound to ${host} (non-loopback). This exposes code execution to your network; the shared token is the only guard (#1051).`);
|
|
157
|
-
if (!token)
|
|
158
|
-
return;
|
|
159
|
-
io.out(` Open with the token (swap ${host} for this machine's reachable address, e.g. a Tailscale hostname):`);
|
|
160
|
-
io.out(` ${url}/?token=${token}`);
|
|
161
|
-
}
|
|
162
106
|
/**
|
|
163
107
|
* The startup footer every dashboard path prints (#312): where prompts come from, the version,
|
|
164
108
|
* and then — once npm answers — whether that version is the latest.
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,kBAAkB,EAAuB,MAAM,mBAAmB,CAAA;AAC/G,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAQ/C,MAAM,SAAS,GAAU;IACvB,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;IAC9C,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC;CAC/C,CAAA;AAED,MAAM,IAAI,GAAG;;;;;;;;;;;;;;;gGAemF,CAAA;AAWhG;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,IAAc;IACtC,MAAM,IAAI,GAAY,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,CAAA;IACrD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAE,CAAA;QACpB,QAAQ,GAAG,EAAE,CAAC;YACZ,KAAK,QAAQ,CAAC;YACd,KAAK,IAAI;gBACP,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;gBAChB,MAAK;YACP,KAAK,WAAW,CAAC;YACjB,KAAK,I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AE;QACb,MAAM,IAAI,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAA;QACvC,IAAI,IAAI;YAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IACxB,CAAC,CAAC;SACD,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;AACpB,CAAC"}
|
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { DRIVERS, DRIVER_LABELS, isDriverName, driverFromImpl, type DriverName } from './driver-names.js';
|
|
2
2
|
export { PUBLISH_LABELS, isPublishPick, offeredPublishPicks, publishPickIn, type PublishPick } from './publish-levels.js';
|
|
3
3
|
export { formatOpenAgentEvent } from './terminal.js';
|
|
4
|
+
export { foldScreenRows } from './screens.js';
|
|
4
5
|
export { formatBytes } from './format-bytes.js';
|
|
5
6
|
export { errorMessage } from './error-message.js';
|
|
6
7
|
export { pickedIds } from './events.js';
|
|
@@ -10,7 +11,7 @@ export { interventionKey, activityKey } from './dashboard/keys.js';
|
|
|
10
11
|
export { SeenTracker } from './dashboard/keyed-watcher.js';
|
|
11
12
|
export type { ProjectionRead } from './dashboard/projects.js';
|
|
12
13
|
export { NOTIFICATION_DEFAULTS, MAX_SPEND_OFFSET, notifies, browserNotifyEnabled, notifyCategoryEnabled, type NotifyCategory } from './preference-defaults.js';
|
|
13
|
-
export {
|
|
14
|
+
export { parseMachineLink } from './machine-link.js';
|
|
14
15
|
export { bridgeChoiceRequest } from './dashboard/bridge-question.js';
|
|
15
16
|
export { cloudRunState, cloudRunActive, CLOUD_SESSION_WINDOW_MS, type CloudRunState } from './cloud-run-state.js';
|
|
16
17
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,E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/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EACL,WAAW,EACX,WAAW,EACX,KAAK,WAAW,EAChB,KAAK,UAAU,GAChB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAGlD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAIlE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9J,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AAEpE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,uBAAuB,EAAE,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAA"}
|
package/dist/client.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
export { DRIVERS, DRIVER_LABELS, isDriverName, driverFromImpl } from './driver-names.js';
|
|
6
6
|
export { PUBLISH_LABELS, isPublishPick, offeredPublishPicks, publishPickIn } from './publish-levels.js';
|
|
7
7
|
export { formatOpenAgentEvent } from './terminal.js';
|
|
8
|
+
export { foldScreenRows } from './screens.js';
|
|
8
9
|
export { formatBytes } from './format-bytes.js';
|
|
9
10
|
export { errorMessage } from './error-message.js';
|
|
10
11
|
export { pickedIds } from './events.js';
|
|
@@ -19,10 +20,8 @@ export { interventionKey, activityKey } from './dashboard/keys.js';
|
|
|
19
20
|
// git host reach take an empty backlog for a real one. Pure, and its only import is a type.
|
|
20
21
|
export { SeenTracker } from './dashboard/keyed-watcher.js';
|
|
21
22
|
export { NOTIFICATION_DEFAULTS, MAX_SPEND_OFFSET, notifies, browserNotifyEnabled, notifyCategoryEnabled } from './preference-defaults.js';
|
|
22
|
-
//
|
|
23
|
-
|
|
24
|
-
// kept its own looser copy, which answered `false` for every 127.0.0.0/8 address but the first.
|
|
25
|
-
export { isLoopbackHost } from './loopback-host.js';
|
|
23
|
+
// How a pasted machine link is read, so the dialog and the daemon read a paste the same way.
|
|
24
|
+
export { parseMachineLink } from './machine-link.js';
|
|
26
25
|
// A bridged question as the gate panel renders it (#1554): pure, so the client projects it itself.
|
|
27
26
|
export { bridgeChoiceRequest } from './dashboard/bridge-question.js';
|
|
28
27
|
// What a web run's cloud side is doing, from its record (#1668): pure, so every surface derives the same word.
|