@openagt/dashboard 0.56.0 → 0.58.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 +19 -1
- package/dist/built-in.d.ts +9 -0
- package/dist/built-in.d.ts.map +1 -1
- package/dist/built-in.js +19 -1
- package/dist/built-in.js.map +1 -1
- package/dist/cli/skills.d.ts +7 -9
- package/dist/cli/skills.d.ts.map +1 -1
- package/dist/cli/skills.js +25 -22
- package/dist/cli/skills.js.map +1 -1
- package/dist/client.d.ts +3 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +3 -0
- package/dist/client.js.map +1 -1
- package/dist/clone-project.d.ts +10 -8
- package/dist/clone-project.d.ts.map +1 -1
- package/dist/clone-project.js +36 -47
- package/dist/clone-project.js.map +1 -1
- package/dist/cloud-scratch-refs.d.ts +9 -1
- package/dist/cloud-scratch-refs.d.ts.map +1 -1
- package/dist/cloud-scratch-refs.js +9 -2
- package/dist/cloud-scratch-refs.js.map +1 -1
- package/dist/daemon-runtime.d.ts.map +1 -1
- package/dist/daemon-runtime.js +37 -5
- package/dist/daemon-runtime.js.map +1 -1
- package/dist/daemon-services.d.ts.map +1 -1
- package/dist/daemon-services.js +4 -2
- package/dist/daemon-services.js.map +1 -1
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +7 -0
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard/copy-logins.d.ts +1 -1
- package/dist/dashboard/copy-logins.d.ts.map +1 -1
- package/dist/dashboard/copy-logins.js +9 -6
- package/dist/dashboard/copy-logins.js.map +1 -1
- package/dist/dashboard/git-hosts.d.ts +3 -3
- package/dist/dashboard/git-hosts.d.ts.map +1 -1
- package/dist/dashboard/git-hosts.js +3 -2
- package/dist/dashboard/git-hosts.js.map +1 -1
- package/dist/dashboard/index.d.ts +1 -1
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/logins-sync.d.ts +25 -1
- package/dist/dashboard/logins-sync.d.ts.map +1 -1
- package/dist/dashboard/logins-sync.js +78 -15
- package/dist/dashboard/logins-sync.js.map +1 -1
- package/dist/dashboard/overview.d.ts +4 -2
- package/dist/dashboard/overview.d.ts.map +1 -1
- package/dist/dashboard/overview.js +7 -3
- package/dist/dashboard/overview.js.map +1 -1
- package/dist/dashboard/person.d.ts +13 -12
- package/dist/dashboard/person.d.ts.map +1 -1
- package/dist/dashboard/person.js +7 -21
- package/dist/dashboard/person.js.map +1 -1
- package/dist/dashboard/projects.d.ts.map +1 -1
- package/dist/dashboard/projects.js +5 -1
- package/dist/dashboard/projects.js.map +1 -1
- package/dist/dashboard/repos.d.ts +75 -0
- package/dist/dashboard/repos.d.ts.map +1 -0
- package/dist/dashboard/repos.js +142 -0
- package/dist/dashboard/repos.js.map +1 -0
- package/dist/dashboard/send-skills.d.ts +12 -1
- package/dist/dashboard/send-skills.d.ts.map +1 -1
- package/dist/dashboard/send-skills.js +11 -3
- package/dist/dashboard/send-skills.js.map +1 -1
- package/dist/dashboard/start-branch.d.ts.map +1 -1
- package/dist/dashboard/start-branch.js +5 -3
- package/dist/dashboard/start-branch.js.map +1 -1
- package/dist/dashboard/types.d.ts +26 -15
- package/dist/dashboard/types.d.ts.map +1 -1
- package/dist/dashboard-bundle/assets/host/module-Jq6JDNSB.js +1 -0
- package/dist/dashboard-bundle/assets/main-BIyFp6td.js +152 -0
- package/dist/dashboard-bundle/assets/main-C_ohUWaY.css +2 -0
- package/dist/dashboard-bundle/assets/module-Cqcyno9w.js +19 -0
- package/dist/dashboard-bundle/index.html +19 -4
- package/dist/dashboard-rpc/agents.d.ts +64 -0
- package/dist/dashboard-rpc/agents.d.ts.map +1 -0
- package/dist/dashboard-rpc/agents.js +137 -0
- package/dist/dashboard-rpc/agents.js.map +1 -0
- package/dist/dashboard-rpc/backup.d.ts +36 -0
- package/dist/dashboard-rpc/backup.d.ts.map +1 -0
- package/dist/dashboard-rpc/backup.js +62 -0
- package/dist/dashboard-rpc/backup.js.map +1 -0
- package/dist/dashboard-rpc/copied-logins.d.ts +1 -1
- package/dist/dashboard-rpc/copied-logins.d.ts.map +1 -1
- package/dist/dashboard-rpc/copied-logins.js +7 -7
- package/dist/dashboard-rpc/copied-logins.js.map +1 -1
- package/dist/dashboard-rpc/hosted-repos.d.ts +42 -0
- package/dist/dashboard-rpc/hosted-repos.d.ts.map +1 -0
- package/dist/dashboard-rpc/hosted-repos.js +74 -0
- package/dist/dashboard-rpc/hosted-repos.js.map +1 -0
- package/dist/dashboard-rpc/index.d.ts +3 -2
- package/dist/dashboard-rpc/index.d.ts.map +1 -1
- package/dist/dashboard-rpc/index.js +6 -3
- package/dist/dashboard-rpc/index.js.map +1 -1
- package/dist/dashboard-rpc/logins.d.ts +3 -33
- package/dist/dashboard-rpc/logins.d.ts.map +1 -1
- package/dist/dashboard-rpc/logins.js +8 -51
- package/dist/dashboard-rpc/logins.js.map +1 -1
- package/dist/dashboard-rpc/modules.d.ts +4 -3
- package/dist/dashboard-rpc/modules.d.ts.map +1 -1
- package/dist/dashboard-rpc/modules.js +6 -5
- package/dist/dashboard-rpc/modules.js.map +1 -1
- package/dist/dashboard-rpc/person.d.ts +34 -1
- package/dist/dashboard-rpc/person.d.ts.map +1 -1
- package/dist/dashboard-rpc/person.js +49 -8
- package/dist/dashboard-rpc/person.js.map +1 -1
- package/dist/dashboard-rpc/personal-folder.d.ts +19 -2
- package/dist/dashboard-rpc/personal-folder.d.ts.map +1 -1
- package/dist/dashboard-rpc/personal-folder.js +24 -6
- package/dist/dashboard-rpc/personal-folder.js.map +1 -1
- package/dist/dashboard-rpc/project-agent-data.d.ts +12 -0
- package/dist/dashboard-rpc/project-agent-data.d.ts.map +1 -1
- package/dist/dashboard-rpc/project-agent-data.js +17 -2
- package/dist/dashboard-rpc/project-agent-data.js.map +1 -1
- package/dist/dashboard-rpc/projects.d.ts +63 -10
- package/dist/dashboard-rpc/projects.d.ts.map +1 -1
- package/dist/dashboard-rpc/projects.js +103 -23
- package/dist/dashboard-rpc/projects.js.map +1 -1
- package/dist/dashboard-rpc/reads.d.ts +1 -1
- package/dist/dashboard-rpc/reads.d.ts.map +1 -1
- package/dist/dashboard-rpc/reads.js +6 -2
- package/dist/dashboard-rpc/reads.js.map +1 -1
- package/dist/dashboard-rpc/runs-changed.d.ts.map +1 -1
- package/dist/dashboard-rpc/runs-changed.js +9 -3
- package/dist/dashboard-rpc/runs-changed.js.map +1 -1
- package/dist/dashboard-rpc/send-as.d.ts +42 -0
- package/dist/dashboard-rpc/send-as.d.ts.map +1 -0
- package/dist/dashboard-rpc/send-as.js +78 -0
- package/dist/dashboard-rpc/send-as.js.map +1 -0
- package/dist/dashboard-rpc/skills.d.ts +2 -1
- package/dist/dashboard-rpc/skills.d.ts.map +1 -1
- package/dist/dashboard-rpc/skills.js +6 -4
- package/dist/dashboard-rpc/skills.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/module-types/dashboard/components/ui/confirm-dialog.d.ts +5 -1
- package/dist/module-types/dashboard/components/ui/popup-placement.d.ts +5 -0
- package/dist/module-types/dashboard/components/ui/row-item.d.ts +1 -2
- package/dist/module-types/dashboard/lib/route.d.ts +3 -3
- package/dist/module-types/dashboard/module/index.d.ts +18 -3
- package/dist/module-types/src/built-in.d.ts +9 -0
- package/dist/module-types/src/client.d.ts +3 -0
- package/dist/module-types/src/clone-project.d.ts +10 -8
- package/dist/module-types/src/dashboard/git-hosts.d.ts +3 -3
- package/dist/module-types/src/dashboard/logins-sync.d.ts +25 -1
- package/dist/module-types/src/dashboard/overview.d.ts +4 -2
- package/dist/module-types/src/dashboard/person.d.ts +13 -12
- package/dist/module-types/src/dashboard/repos.d.ts +74 -0
- package/dist/module-types/src/dashboard/send-skills.d.ts +12 -1
- package/dist/module-types/src/dashboard/types.d.ts +26 -15
- package/dist/module-types/src/dashboard-rpc/agents.d.ts +63 -0
- package/dist/module-types/src/dashboard-rpc/backup.d.ts +35 -0
- package/dist/module-types/src/dashboard-rpc/copied-logins.d.ts +1 -1
- package/dist/module-types/src/dashboard-rpc/hosted-repos.d.ts +41 -0
- package/dist/module-types/src/dashboard-rpc/index.d.ts +3 -2
- package/dist/module-types/src/dashboard-rpc/logins.d.ts +3 -33
- package/dist/module-types/src/dashboard-rpc/modules.d.ts +4 -3
- package/dist/module-types/src/dashboard-rpc/person.d.ts +34 -1
- package/dist/module-types/src/dashboard-rpc/personal-folder.d.ts +19 -2
- package/dist/module-types/src/dashboard-rpc/project-agent-data.d.ts +12 -0
- package/dist/module-types/src/dashboard-rpc/projects.d.ts +63 -10
- package/dist/module-types/src/dashboard-rpc/reads.d.ts +1 -1
- package/dist/module-types/src/dashboard-rpc/send-as.d.ts +41 -0
- package/dist/module-types/src/dashboard-rpc/skills.d.ts +2 -1
- package/dist/module-types/src/index.d.ts +1 -1
- package/dist/module-types/src/project-address.d.ts +8 -1
- package/dist/module-types/src/project-hooks.d.ts +12 -2
- package/dist/module-types/src/project-modules.d.ts +6 -0
- package/dist/module-types/src/project-skills/catalogue.d.ts +6 -9
- package/dist/module-types/src/registry.d.ts +13 -0
- package/dist/module-types/src/store/agent-store.d.ts +14 -0
- package/dist/module-types/src/store/branches.d.ts +7 -0
- package/dist/module-types/src/store/git-host.d.ts +1 -3
- package/dist/module-types/src/typed-repository.d.ts +16 -0
- package/dist/project-address.d.ts +8 -1
- package/dist/project-address.d.ts.map +1 -1
- package/dist/project-address.js +11 -4
- package/dist/project-address.js.map +1 -1
- package/dist/project-hooks.d.ts +12 -2
- package/dist/project-hooks.d.ts.map +1 -1
- package/dist/project-hooks.js +9 -2
- package/dist/project-hooks.js.map +1 -1
- package/dist/project-modules.d.ts +6 -0
- package/dist/project-modules.d.ts.map +1 -1
- package/dist/project-modules.js +13 -1
- package/dist/project-modules.js.map +1 -1
- package/dist/project-skills/catalogue.d.ts +6 -9
- package/dist/project-skills/catalogue.d.ts.map +1 -1
- package/dist/project-skills/catalogue.js +9 -8
- package/dist/project-skills/catalogue.js.map +1 -1
- package/dist/registry.d.ts +13 -0
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +43 -2
- package/dist/registry.js.map +1 -1
- package/dist/sessions-home.d.ts +11 -0
- package/dist/sessions-home.d.ts.map +1 -0
- package/dist/sessions-home.js +41 -0
- package/dist/sessions-home.js.map +1 -0
- package/dist/store/agent-store.d.ts +14 -0
- package/dist/store/agent-store.d.ts.map +1 -1
- package/dist/store/agent-store.js.map +1 -1
- package/dist/store/branches.d.ts +7 -0
- package/dist/store/branches.d.ts.map +1 -1
- package/dist/store/branches.js +37 -2
- package/dist/store/branches.js.map +1 -1
- package/dist/store/git-host.d.ts +1 -3
- package/dist/store/git-host.d.ts.map +1 -1
- package/dist/store/git-host.js +0 -14
- package/dist/store/git-host.js.map +1 -1
- package/dist/typed-repository.d.ts +17 -0
- package/dist/typed-repository.d.ts.map +1 -0
- package/dist/typed-repository.js +29 -0
- package/dist/typed-repository.js.map +1 -0
- package/dist/website/assets/entries/{entry-client-routing.C33s8xOY.js → entry-client-routing.CvPemUV2.js} +2 -2
- package/dist/website/assets/entries/{pages_go-to-dashboard.C3OBfFYB.js → pages_go-to-dashboard.CUCqKDCh.js} +1 -1
- package/dist/website/banner/index.html +1 -1
- package/dist/website/go-to-dashboard/index.html +3 -3
- package/dist/website/index.html +1 -1
- package/dist/website/press/index.html +1 -1
- package/package.json +21 -21
- package/dist/dashboard-bundle/assets/host/module-BMyNrbiB.js +0 -1
- package/dist/dashboard-bundle/assets/main-BK8YIg7v.js +0 -152
- package/dist/dashboard-bundle/assets/main-mnNPGbsz.css +0 -2
- package/dist/dashboard-bundle/assets/module-DY3Aigsz.js +0 -19
|
@@ -1,13 +1,30 @@
|
|
|
1
|
+
import { type SendAsHost } from './send-as.js';
|
|
2
|
+
export type { SendAsHost } from './send-as.js';
|
|
1
3
|
import { type PersonalFolderShown } from '../personal-folder-shown.js';
|
|
2
4
|
export interface PersonalFolderView extends PersonalFolderShown {
|
|
3
5
|
/** Commits made here that have not reached the repository yet. */
|
|
4
6
|
unsent: number;
|
|
5
7
|
/** The projects of this computer that keep their agent data in it, by name. */
|
|
6
8
|
projects: string[];
|
|
9
|
+
/** The login of OpenAgent's account it is sent as, when it syncs. */
|
|
10
|
+
account?: string;
|
|
11
|
+
/** OpenAgent's accounts at each host: what it may be sent as. */
|
|
12
|
+
hosts: SendAsHost[];
|
|
7
13
|
}
|
|
8
14
|
export declare function onPersonalFolder(): Promise<PersonalFolderView>;
|
|
9
|
-
/**
|
|
10
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Sync the personal folder with the person's repository, sent as `login`, one of OpenAgent's
|
|
17
|
+
* accounts at its host: what it has comes in, every record here goes out. Never as the person's
|
|
18
|
+
* own login: with no account there, nothing is sent.
|
|
19
|
+
*/
|
|
20
|
+
export declare function sendSyncPersonalFolder(typed: string, login?: string): Promise<{
|
|
21
|
+
ok: true;
|
|
22
|
+
} | {
|
|
23
|
+
ok: false;
|
|
24
|
+
error: string;
|
|
25
|
+
}>;
|
|
26
|
+
/** Send the personal folder as another of OpenAgent's accounts from now on. */
|
|
27
|
+
export declare function sendPersonalFolderAs(login: string): Promise<{
|
|
11
28
|
ok: true;
|
|
12
29
|
} | {
|
|
13
30
|
ok: false;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type SendAsHost } from './send-as.js';
|
|
1
2
|
import { type PersonalFolderShown } from '../personal-folder-shown.js';
|
|
2
3
|
/** One kind of the project's data the skills keep: how many, and the skill that keeps them. */
|
|
3
4
|
export interface KeptData {
|
|
@@ -14,6 +15,17 @@ export interface ProjectAgentData {
|
|
|
14
15
|
/** Whether the project has a remote to keep its data on. */
|
|
15
16
|
canShare: boolean;
|
|
16
17
|
kept: KeptData[];
|
|
18
|
+
/** The login of OpenAgent's account it is sent as, while shared. */
|
|
19
|
+
account?: string;
|
|
20
|
+
/** OpenAgent's accounts at the remote's host: what it may be sent as. None for a remote that asks no login. */
|
|
21
|
+
accounts?: SendAsHost;
|
|
17
22
|
}
|
|
18
23
|
/** Where the project's agent data is and what is kept; `null` for a project with no folder on this computer. */
|
|
19
24
|
export declare function onProjectAgentData(projectId: string): Promise<ProjectAgentData | null>;
|
|
25
|
+
/** Send the shared project's data as another of OpenAgent's accounts from now on. */
|
|
26
|
+
export declare function sendProjectDataAs(projectId: string, login: string): Promise<{
|
|
27
|
+
ok: true;
|
|
28
|
+
} | {
|
|
29
|
+
ok: false;
|
|
30
|
+
error: string;
|
|
31
|
+
}>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type ProjectCommand } from '../project-commands.js';
|
|
2
|
+
import { type HostedRepo } from './hosted-repos.js';
|
|
2
3
|
import { type StartReadiness } from '../project-hooks.js';
|
|
3
4
|
import { type StartFromPick } from '../registry.js';
|
|
5
|
+
import { type FoundRepo } from '../dashboard/repos.js';
|
|
4
6
|
import { type PickDirectoryResult } from '../pick-directory.js';
|
|
5
7
|
import type { ProjectSummary } from '../dashboard/projects.js';
|
|
6
8
|
import type { OwnProject } from '../dashboard/elsewhere.js';
|
|
7
|
-
import type { AddProjectResult,
|
|
9
|
+
import type { AddProjectResult, RemoveProjectResult, StartedInResult } from '../dashboard/types.js';
|
|
8
10
|
export declare function onProjects(): Promise<ProjectSummary[]>;
|
|
9
11
|
/**
|
|
10
12
|
* This computer's own projects, for another computer of the person's that lists them beside its
|
|
@@ -17,11 +19,9 @@ export declare function onOwnProjects(): Promise<OwnProject[]>;
|
|
|
17
19
|
* Projects list. Like `sendStart` this needs the daemon (it spawns git + writes the shared
|
|
18
20
|
* registry), so it calls the daemon's own `addProject` closure off the wired dashboard context.
|
|
19
21
|
* Returns the daemon's {@link AddProjectResult}.
|
|
20
|
-
*
|
|
21
|
-
* `share` is the person's answer, asked before the add: whether the agents' records may go to the
|
|
22
|
-
* repository's remote. Nothing is pushed for a project added with `false`.
|
|
22
|
+
* The agents' records stay on this machine; the project's Agent data page shares them later.
|
|
23
23
|
*/
|
|
24
|
-
export declare function sendAddProject(path: string
|
|
24
|
+
export declare function sendAddProject(path: string): Promise<AddProjectResult>;
|
|
25
25
|
/**
|
|
26
26
|
* A second `openagent` started while this dashboard listens on its port (#2141): it serves
|
|
27
27
|
* nothing itself, and hands over the folder it was started in, if it is in a repository. The
|
|
@@ -47,7 +47,7 @@ export declare function onCloneTarget(address: string): Promise<{
|
|
|
47
47
|
* folder is then added as {@link sendAddProject} adds one. A folder already there with this
|
|
48
48
|
* repository in it is added as it is. The answer says where the project is.
|
|
49
49
|
*/
|
|
50
|
-
export declare function sendAddProjectFromAddress(address: string
|
|
50
|
+
export declare function sendAddProjectFromAddress(address: string): Promise<AddProjectResult>;
|
|
51
51
|
/**
|
|
52
52
|
* Remove a project from the dashboard: it leaves the Projects list. Nothing in its folder is
|
|
53
53
|
* deleted unless `files` is true: then what OpenAgent left there is removed too, and the answer
|
|
@@ -63,7 +63,7 @@ export declare function sendRemoveProject(projectId: string, files: boolean): Pr
|
|
|
63
63
|
* where they were; off, back to the personal folder. A project with no remote has nothing to
|
|
64
64
|
* share with, and is refused.
|
|
65
65
|
*/
|
|
66
|
-
export declare function sendShareRecords(projectId: string, on: boolean): Promise<{
|
|
66
|
+
export declare function sendShareRecords(projectId: string, on: boolean, login?: string): Promise<{
|
|
67
67
|
ok: true;
|
|
68
68
|
} | {
|
|
69
69
|
ok: false;
|
|
@@ -76,11 +76,64 @@ export declare function sendShareRecords(projectId: string, on: boolean): Promis
|
|
|
76
76
|
* comes back as `path: null`.
|
|
77
77
|
*/
|
|
78
78
|
export declare function sendPickProjectDirectory(): Promise<PickDirectoryResult>;
|
|
79
|
+
/** The repos on this computer that are not projects yet, the ones at the git hosts not here, and whether a folder can be added to look in. */
|
|
80
|
+
export interface ReposRead {
|
|
81
|
+
repos: FoundRepo[];
|
|
82
|
+
/** The repositories OpenAgent's accounts and the owners the person named have at the hosts, none of them on this computer: picked, one is cloned. */
|
|
83
|
+
hosted: HostedRepo[];
|
|
84
|
+
/** The look through this computer was cut short, and one with more time is on its way: the picker asks again shortly. */
|
|
85
|
+
reposLoading: boolean;
|
|
86
|
+
/** The hosts are being asked: the picker asks again shortly. */
|
|
87
|
+
hostedLoading: boolean;
|
|
88
|
+
/** This computer can show a folder dialog, so the picker offers "Search another folder…". */
|
|
89
|
+
canAddFolder: boolean;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The repos a new session can start in besides the projects (Rom's "a project is a sticky repo"):
|
|
93
|
+
* every repository the daemon's crawl found on this computer, less those that are projects
|
|
94
|
+
* already. The kept list, so the picker opens at once; an old one is crawled again behind it.
|
|
95
|
+
*/
|
|
96
|
+
export declare function onRepos(): Promise<ReposRead>;
|
|
97
|
+
/** Settings › Repos: where repos are looked for, on this computer and at the git hosts. */
|
|
98
|
+
export interface RepoSources {
|
|
99
|
+
/** The folders the person added, looked in beside the home folder. */
|
|
100
|
+
folders: string[];
|
|
101
|
+
/** The users and organizations at a git host whose repositories are listed, as `<host>/<name>`. */
|
|
102
|
+
owners: string[];
|
|
103
|
+
}
|
|
104
|
+
export declare function onRepoSources(): Promise<RepoSources>;
|
|
105
|
+
/** List one more user's or organization's repositories: `vikejs`, `github.com/vikejs` or its page's address. GitHub when no host is named. */
|
|
106
|
+
export declare function sendAddRepoOwner(typed: string): Promise<{
|
|
107
|
+
ok: true;
|
|
108
|
+
} | {
|
|
109
|
+
ok: false;
|
|
110
|
+
error: string;
|
|
111
|
+
}>;
|
|
112
|
+
/** Stop listing an owner's repositories. */
|
|
113
|
+
export declare function sendRemoveRepoOwner(owner: string): Promise<{
|
|
114
|
+
ok: true;
|
|
115
|
+
} | {
|
|
116
|
+
ok: false;
|
|
117
|
+
error: string;
|
|
118
|
+
}>;
|
|
119
|
+
/** Stop looking for repos in a folder the person added. */
|
|
120
|
+
export declare function sendRemoveRepoFolder(folder: string): Promise<{
|
|
121
|
+
ok: true;
|
|
122
|
+
} | {
|
|
123
|
+
ok: false;
|
|
124
|
+
error: string;
|
|
125
|
+
}>;
|
|
79
126
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
127
|
+
* "Search another folder…": the OS folder dialog, and the folder picked joins those the crawl
|
|
128
|
+
* looks in, which then runs again before the answer. A dismissed dialog adds nothing.
|
|
82
129
|
*/
|
|
83
|
-
export declare function
|
|
130
|
+
export declare function sendAddRepoFolder(): Promise<{
|
|
131
|
+
ok: true;
|
|
132
|
+
added: boolean;
|
|
133
|
+
} | {
|
|
134
|
+
ok: false;
|
|
135
|
+
error: string;
|
|
136
|
+
}>;
|
|
84
137
|
/** What the launcher offers for a project: its commands, and whether a run can be started here at all. */
|
|
85
138
|
export interface ProjectLauncher {
|
|
86
139
|
commands: ProjectCommand[];
|
|
@@ -167,7 +167,7 @@ export declare function onDocs(projectId: string): Promise<WorkspaceDoc[]>;
|
|
|
167
167
|
export declare function onQueue(): Promise<ProjectQueue[]>;
|
|
168
168
|
/** The cross-project Overview (#437): what is running now, the queue size, and recent projects. */
|
|
169
169
|
export declare function onOverview(): Promise<Overview>;
|
|
170
|
-
/** Recent sessions pooled across every project (#shared-shell), newest first, for the home rail. */
|
|
170
|
+
/** Recent sessions pooled across every project and the sessions with no project (#shared-shell), newest first, for the home rail. */
|
|
171
171
|
export declare function onRecentAgents(): Promise<RecentAgent[]>;
|
|
172
172
|
/**
|
|
173
173
|
* The cross-project interventions queue (#632, Queue #624): open PRs that need review, newest first,
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type GitRunner, type RemoteAccount } from '@openagt/agent-data';
|
|
2
|
+
/** OpenAgent's accounts at one host: what a "Send as" select offers. */
|
|
3
|
+
export interface SendAsHost {
|
|
4
|
+
host: string;
|
|
5
|
+
/** The logins GitHub still takes, by name. */
|
|
6
|
+
logins: string[];
|
|
7
|
+
/** The one runs use, picked first where none is named yet. */
|
|
8
|
+
runs?: string;
|
|
9
|
+
}
|
|
10
|
+
/** OpenAgent's accounts at each host a package answers for. */
|
|
11
|
+
export declare function accountsByHost(): Promise<SendAsHost[]>;
|
|
12
|
+
/** What a repository at `host` keeps to be sent as `login`: what its git host's package says of that account, kept a few minutes. */
|
|
13
|
+
export declare function remoteAccount(host: string, login?: string): Promise<{
|
|
14
|
+
ok: true;
|
|
15
|
+
account: RemoteAccount;
|
|
16
|
+
} | {
|
|
17
|
+
ok: false;
|
|
18
|
+
error: string;
|
|
19
|
+
}>;
|
|
20
|
+
/** The account a repository at a typed address is cloned as: the one runs use at its host; none where OpenAgent has none there. */
|
|
21
|
+
export declare function cloneAccountFor(typed: string): Promise<RemoteAccount | undefined>;
|
|
22
|
+
/** The host the repository at `root` has its origin on; none for no origin, or one in a folder on this disk. */
|
|
23
|
+
export declare function originHost(root: string): Promise<string | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* The account a repository's own branches are sent as by a press of the person's (the Skills
|
|
26
|
+
* page's Send, the clean-up of Claude Code web's branches): the one kept for it at its Share
|
|
27
|
+
* switch, else the one runs use at its host. Nothing for a remote that is a folder on this disk,
|
|
28
|
+
* which asks no login.
|
|
29
|
+
*/
|
|
30
|
+
export declare function originAccountOf(root: string): Promise<{
|
|
31
|
+
ok: true;
|
|
32
|
+
account?: RemoteAccount;
|
|
33
|
+
} | {
|
|
34
|
+
ok: false;
|
|
35
|
+
error: string;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* git for the repository at `root`, its talks with origin going as {@link originAccountOf} says:
|
|
39
|
+
* never as the person's own login. With no account to go as, those talks are refused in words.
|
|
40
|
+
*/
|
|
41
|
+
export declare function originGit(root: string): Promise<GitRunner>;
|
|
@@ -20,7 +20,6 @@ export interface ProjectSkills {
|
|
|
20
20
|
/** The list's groups; `ticked` says whether a group's skills are ticked in a project that has none yet. */
|
|
21
21
|
groups: {
|
|
22
22
|
title: string;
|
|
23
|
-
ticked: boolean;
|
|
24
23
|
skills: ProjectSkill[];
|
|
25
24
|
}[];
|
|
26
25
|
/** The branch agents start from, by its name: the remote's default branch, else the branch the folder is on. Absent where there is none. */
|
|
@@ -40,6 +39,8 @@ export interface ProjectSkills {
|
|
|
40
39
|
branch?: string;
|
|
41
40
|
/** Whether the branch the folder is on has every waiting skill: an agent started from it has them now. */
|
|
42
41
|
local: boolean;
|
|
42
|
+
/** Every skill the project holds, by name, as a run's checkout has them: the list's, and the project's own; what the launcher's Skills menu offers per session. */
|
|
43
|
+
held: string[];
|
|
43
44
|
}
|
|
44
45
|
/** The project's skills; `null` when the project is unknown here. */
|
|
45
46
|
export declare function onProjectSkills(projectId: string): Promise<ProjectSkills | null>;
|
|
@@ -36,5 +36,5 @@ export type { ProjectError, ProjectErrorCode } from './project-errors.js';
|
|
|
36
36
|
export type { ProjectQueue } from './dashboard/queue.js';
|
|
37
37
|
export type { QuotaView } from './dashboard/quota.js';
|
|
38
38
|
export type { Ticket } from './store/tickets.js';
|
|
39
|
-
export type { AgentWorktree, CleanupReport
|
|
39
|
+
export type { AgentWorktree, CleanupReport } from './dashboard/types.js';
|
|
40
40
|
export type { CardPlace, CardWidth, OverviewLayouts } from './overview-layout.js';
|
|
@@ -6,6 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const OVERVIEW_SEGMENT = "overview";
|
|
8
8
|
export declare const SETTINGS_SEGMENT = "settings";
|
|
9
|
+
/**
|
|
10
|
+
* The id the sessions with no project go by where a project's id would be, and their address:
|
|
11
|
+
* `/session` is the "New agent session" page with no project, `/session/<agentId>` one of those
|
|
12
|
+
* sessions. A project's id always ends in `-<hash>`, so no project has it, and no project's
|
|
13
|
+
* address or module's page takes the word.
|
|
14
|
+
*/
|
|
15
|
+
export declare const SESSIONS_ID = "session";
|
|
9
16
|
/**
|
|
10
17
|
* Whether a segment can name a page a module adds (#1774): a lowercase letter, then lowercase
|
|
11
18
|
* letters and digits, and not a word the dashboard keeps. Whichever module claims the segment gets
|
|
@@ -13,7 +20,7 @@ export declare const SETTINGS_SEGMENT = "settings";
|
|
|
13
20
|
* that adds it.
|
|
14
21
|
*/
|
|
15
22
|
export declare function isPageSegment(segment: string): boolean;
|
|
16
|
-
/** Each registered project's address, and the project an address or an id names. */
|
|
23
|
+
/** Each registered project's address, and the project an address or an id names; the sessions with no project's too ({@link SESSIONS_ID}). */
|
|
17
24
|
export interface ProjectAddresses {
|
|
18
25
|
/** The project's address: its name, or its id where the name cannot be one. An unknown id is its own address. */
|
|
19
26
|
addressOf(projectId: string): string;
|
|
@@ -59,7 +59,7 @@ export interface RunHooksOptions {
|
|
|
59
59
|
* goes there. Never throws.
|
|
60
60
|
*/
|
|
61
61
|
export declare function runProjectHooks(cwd: string, kind: HookKind, opts?: RunHooksOptions): Promise<void>;
|
|
62
|
-
/** What a `start` line is given: the prompt, and the coding agent, model, publish level branch to start from
|
|
62
|
+
/** What a `start` line is given: the prompt, and the coding agent, model, publish level, branch to start from, pull request's branch and repos when the person picked them. */
|
|
63
63
|
export interface StartHookInput {
|
|
64
64
|
prompt: string;
|
|
65
65
|
driver?: string;
|
|
@@ -72,6 +72,16 @@ export interface StartHookInput {
|
|
|
72
72
|
base?: string;
|
|
73
73
|
/** The branch the run's pull request goes into; the repository's default branch when absent. */
|
|
74
74
|
prBase?: string;
|
|
75
|
+
/** The folders of the repos a session with no project has as context: one per line in `REPOS`. */
|
|
76
|
+
repos?: readonly string[];
|
|
77
|
+
/** The account at the git host the session works as, by its login: in the environment, as `nameRun` is, so no line has to carry it. */
|
|
78
|
+
account?: string;
|
|
79
|
+
/** The agent the session is on, by its id: in the environment the same way. */
|
|
80
|
+
agent?: string;
|
|
81
|
+
/** The session's picks of skills, in the environment the same way: names on top of its agent's, names of its agent's left out, and which of the project's own stay (`none`, or names). */
|
|
82
|
+
skillsOn?: readonly string[];
|
|
83
|
+
skillsOff?: readonly string[];
|
|
84
|
+
projectSkills?: 'none' | readonly string[];
|
|
75
85
|
/**
|
|
76
86
|
* Whether the run is given a short name by a small model (the person's setting). `false` reaches
|
|
77
87
|
* the run's own tool through the environment rather than the line, so no project's `hooks.yml`
|
|
@@ -112,7 +122,7 @@ export type RunHookResult = {
|
|
|
112
122
|
};
|
|
113
123
|
/**
|
|
114
124
|
* Run the project's `start` line: the prompt in `PROMPT`, the picks in `DRIVER`, `MODEL`, `EFFORT`,
|
|
115
|
-
* `PUBLISH`, `BASE` and `
|
|
125
|
+
* `PUBLISH`, `BASE`, `PR_BASE` and `REPOS` (one folder per line) when made. The line answers one JSON document on stdout whose `id` names the
|
|
116
126
|
* run it started, and whose `driver` may name the coding agent that runs it.
|
|
117
127
|
*/
|
|
118
128
|
export declare function runStartHook(cwd: string, input: StartHookInput, opts?: Omit<RunHooksOptions, 'log'>): Promise<RunHookResult>;
|
|
@@ -65,6 +65,12 @@ input?: string): Promise<ModuleCommandResult>;
|
|
|
65
65
|
* by name.
|
|
66
66
|
*/
|
|
67
67
|
export declare function readProjectModules(root: string): Promise<ProjectModule[]>;
|
|
68
|
+
/**
|
|
69
|
+
* The modules whose pages and cards the project shows: {@link readProjectModules}, less the logs
|
|
70
|
+
* package's where the project did not pick its skill (`built-in.ts`). The others' commands still
|
|
71
|
+
* run there.
|
|
72
|
+
*/
|
|
73
|
+
export declare function readProjectPages(root: string): Promise<ProjectModule[]>;
|
|
68
74
|
/** The one module of this project that `name` names, or undefined. */
|
|
69
75
|
export declare function findProjectModule(root: string, name: string): Promise<ProjectModule | undefined>;
|
|
70
76
|
/**
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The skills a project can pick on the dashboard's Skills page (#2023), in its groups
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* project.
|
|
2
|
+
* The skills a project can pick on the dashboard's Skills page (#2023), in its groups. None is
|
|
3
|
+
* ticked the first time: the person picks what the project needs. The skills every run gets by
|
|
4
|
+
* default are not here (the branches skill, and the ones its command names): they come with every
|
|
5
|
+
* run, with nothing written in the project.
|
|
7
6
|
*
|
|
8
7
|
* Each skill's text is its own package's `SKILL.md`, read from this package's install, so the
|
|
9
8
|
* dashboard carries the texts of the versions it was published with.
|
|
@@ -11,8 +10,6 @@
|
|
|
11
10
|
export interface SkillGroup {
|
|
12
11
|
title: string;
|
|
13
12
|
skills: readonly string[];
|
|
14
|
-
/** Whether the group's skills are ticked in a project that has none of them yet. */
|
|
15
|
-
ticked: boolean;
|
|
16
13
|
}
|
|
17
14
|
export declare const GROUPS: readonly SkillGroup[];
|
|
18
15
|
/** Every skill of the list, in its order. */
|
|
@@ -20,8 +17,8 @@ export declare const SKILL_NAMES: readonly string[];
|
|
|
20
17
|
/**
|
|
21
18
|
* The scheduler's skill: written, it also gets the two lines that start the scheduler while the
|
|
22
19
|
* dashboard is open, in the project's hooks file, which is this machine's and outside git; deleted,
|
|
23
|
-
* it takes them out.
|
|
24
|
-
*
|
|
20
|
+
* it takes them out. Every automation starts switched off, so the scheduler starts no agent until
|
|
21
|
+
* a person says so.
|
|
25
22
|
*/
|
|
26
23
|
export declare const SCHEDULER = "scheduler";
|
|
27
24
|
/** One skill as the dashboard carries it. */
|
|
@@ -149,6 +149,11 @@ export interface Preferences {
|
|
|
149
149
|
* listed starts from its main branch**, so the default stores nothing.
|
|
150
150
|
*/
|
|
151
151
|
startFrom?: Record<string, StartFromPick>;
|
|
152
|
+
/**
|
|
153
|
+
* The agent a run started from the launcher is on, by its id (`~/.openagent/agents/<id>.json`).
|
|
154
|
+
* The launcher's "Agent" pick writes it. **Absent = the default agent.**
|
|
155
|
+
*/
|
|
156
|
+
agent?: string;
|
|
152
157
|
/**
|
|
153
158
|
* Where a run started from the launcher goes: a saved machine, by its id. The "Run on" pick
|
|
154
159
|
* writes it, and the page picks it again at its next opening. **Absent = this machine.** A
|
|
@@ -240,6 +245,8 @@ export interface Registry {
|
|
|
240
245
|
name?: string;
|
|
241
246
|
/** The computers the person removed, the newest last (computers-sync.ts). */
|
|
242
247
|
forgotten?: ForgottenMachine[];
|
|
248
|
+
/** The folders the person added to look for repos in, besides the home folder (dashboard/repos.ts), absolute. */
|
|
249
|
+
repoFolders?: string[];
|
|
243
250
|
}
|
|
244
251
|
/** A read/write handle for the user preferences, wired into the dashboard's context by the daemon. */
|
|
245
252
|
export interface PreferencesStore {
|
|
@@ -320,6 +327,12 @@ export declare function addProject(path: string, addedAt: string, fs?: RegistryF
|
|
|
320
327
|
* a project whose folder is gone is removed like any other.
|
|
321
328
|
*/
|
|
322
329
|
export declare function removeProject(id: string, fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<ProjectRecord | undefined>;
|
|
330
|
+
/** The folders the person added to look for repos in (dashboard/repos.ts). Forgiving, like {@link listProjects}. */
|
|
331
|
+
export declare function listRepoFolders(fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<string[]>;
|
|
332
|
+
/** Add a folder to look for repos in, by its absolute path; one already there is not added again. */
|
|
333
|
+
export declare function addRepoFolder(folder: string, fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<void>;
|
|
334
|
+
/** Stop looking for repos in a folder the person added; one not there changes nothing. */
|
|
335
|
+
export declare function removeRepoFolder(folder: string, fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<void>;
|
|
323
336
|
/** The user's dashboard preferences (#410), or `{}` when none are stored. */
|
|
324
337
|
export declare function readPreferences(fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<Preferences>;
|
|
325
338
|
/** Persist the dashboard preferences (#410), sanitized, preserving the project list. */
|
|
@@ -69,6 +69,20 @@ export interface AgentMeta {
|
|
|
69
69
|
gitAccount?: string;
|
|
70
70
|
/** The branch the run's pull request goes into, written on the card by the tool that runs it; absent, the repository's default branch. */
|
|
71
71
|
prBase?: string;
|
|
72
|
+
/**
|
|
73
|
+
* The repos a session with no project has as context, written on the card by the tool that runs
|
|
74
|
+
* it: each one's name, which its copy's folder in the session's folder has, and the folder it was copied from.
|
|
75
|
+
*/
|
|
76
|
+
repos?: {
|
|
77
|
+
name: string;
|
|
78
|
+
from: string;
|
|
79
|
+
}[];
|
|
80
|
+
/** The agent the run is on, by its id, written on the card by the tool that runs it; absent, the default agent. */
|
|
81
|
+
agent?: string;
|
|
82
|
+
/** The session's picks of skills, written on the card by the tool that runs it: names on top of its agent's, names of its agent's left out, which of the project's own stayed in its checkout (`none`, or names; absent, every one). */
|
|
83
|
+
skillsOn?: string[];
|
|
84
|
+
skillsOff?: string[];
|
|
85
|
+
projectSkills?: 'none' | string[];
|
|
72
86
|
/**
|
|
73
87
|
* How far the run takes its work when its agent finishes: `commit`, `branch`, `pr` or `merge`,
|
|
74
88
|
* the level it was started at or last given. Written on the card by the tool that runs it;
|
|
@@ -174,6 +174,13 @@ export declare function parseCheckouts(output: unknown): Checkout[];
|
|
|
174
174
|
export declare function parseBranchStates(output: unknown): BranchState[];
|
|
175
175
|
/** The counts read back from a provider's `ahead`: the objects with a branch and every verdict; anything else is no answer. */
|
|
176
176
|
export declare function parseBranchesAhead(output: unknown): BranchAhead[];
|
|
177
|
+
/**
|
|
178
|
+
* The folders of the sessions with no project, as checkouts with no branch: where each run works,
|
|
179
|
+
* the agent's files and its live card, for the reads that find a run by its checkout. Nothing
|
|
180
|
+
* provides them: the folders are the sessions home's own (`@openagt/agent-data`), read off the
|
|
181
|
+
* disk. Every act on a branch is refused, and a folder is removed only with its work dropped.
|
|
182
|
+
*/
|
|
183
|
+
export declare function sessionFolders(home: string): BranchesSource;
|
|
177
184
|
/**
|
|
178
185
|
* The production {@link BranchesReader}: the project's provider, looked up among the packages the project has (`built-in.ts`),
|
|
179
186
|
* one source per project kept while the same command provides — so the cache holds across the
|
|
@@ -48,7 +48,7 @@ export interface GitHostHome {
|
|
|
48
48
|
url: string;
|
|
49
49
|
name: string;
|
|
50
50
|
}
|
|
51
|
-
/**
|
|
51
|
+
/** A person's account at the git host: what a card shows of them. */
|
|
52
52
|
export interface GitHostPerson {
|
|
53
53
|
login: string;
|
|
54
54
|
name?: string;
|
|
@@ -102,8 +102,6 @@ export interface GitHostSource {
|
|
|
102
102
|
merge(number: number): Promise<MergeOutcome>;
|
|
103
103
|
/** The project's page on the git host; `undefined` when the provider cannot tell (no remote there). */
|
|
104
104
|
home(): Promise<GitHostHome | undefined>;
|
|
105
|
-
/** Who is signed in at the git host; `undefined` when nobody is, or the provider cannot tell. */
|
|
106
|
-
me(): Promise<GitHostPerson | undefined>;
|
|
107
105
|
/** The accounts behind these commit emails, each with its email; an email the host knows no account for is left out. */
|
|
108
106
|
people(emails: readonly string[]): Promise<(GitHostPerson & {
|
|
109
107
|
email: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a person typed as a repository's address, read: `github.com/you/shop`, the same with
|
|
3
|
+
* `https://` before it, `ssh://git@github.com/you/shop.git`, or `git@github.com:you/shop.git`.
|
|
4
|
+
* Undefined for anything else: a folder on this disk, another kind of address, a name that could
|
|
5
|
+
* be read as an option or lead out of the folder projects are cloned into. Pure, so the page can
|
|
6
|
+
* tell an address from a search word as it is typed, before the daemon is asked anything.
|
|
7
|
+
*/
|
|
8
|
+
export interface TypedRepository {
|
|
9
|
+
/** What git is given. */
|
|
10
|
+
url: string;
|
|
11
|
+
/** The repository's one name on every machine: see `addressOfRemote`. */
|
|
12
|
+
address: string;
|
|
13
|
+
/** The repository's own name, the last part of its path, in the letters typed. */
|
|
14
|
+
name: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function typedRepository(typed: string): TypedRepository | undefined;
|
|
@@ -6,6 +6,13 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const OVERVIEW_SEGMENT = "overview";
|
|
8
8
|
export declare const SETTINGS_SEGMENT = "settings";
|
|
9
|
+
/**
|
|
10
|
+
* The id the sessions with no project go by where a project's id would be, and their address:
|
|
11
|
+
* `/session` is the "New agent session" page with no project, `/session/<agentId>` one of those
|
|
12
|
+
* sessions. A project's id always ends in `-<hash>`, so no project has it, and no project's
|
|
13
|
+
* address or module's page takes the word.
|
|
14
|
+
*/
|
|
15
|
+
export declare const SESSIONS_ID = "session";
|
|
9
16
|
/**
|
|
10
17
|
* Whether a segment can name a page a module adds (#1774): a lowercase letter, then lowercase
|
|
11
18
|
* letters and digits, and not a word the dashboard keeps. Whichever module claims the segment gets
|
|
@@ -13,7 +20,7 @@ export declare const SETTINGS_SEGMENT = "settings";
|
|
|
13
20
|
* that adds it.
|
|
14
21
|
*/
|
|
15
22
|
export declare function isPageSegment(segment: string): boolean;
|
|
16
|
-
/** Each registered project's address, and the project an address or an id names. */
|
|
23
|
+
/** Each registered project's address, and the project an address or an id names; the sessions with no project's too ({@link SESSIONS_ID}). */
|
|
17
24
|
export interface ProjectAddresses {
|
|
18
25
|
/** The project's address: its name, or its id where the name cannot be one. An unknown id is its own address. */
|
|
19
26
|
addressOf(projectId: string): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-address.d.ts","sourceRoot":"","sources":["../src/project-address.ts"],"names":[],"mappings":"AAUA;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,aAAa,CAAA;AAC1C,eAAO,MAAM,gBAAgB,aAAa,CAAA;AAE1C;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,
|
|
1
|
+
{"version":3,"file":"project-address.d.ts","sourceRoot":"","sources":["../src/project-address.ts"],"names":[],"mappings":"AAUA;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,aAAa,CAAA;AAC1C,eAAO,MAAM,gBAAgB,aAAa,CAAA;AAE1C;;;;;GAKG;AACH,eAAO,MAAM,WAAW,YAAY,CAAA;AAEpC;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,8IAA8I;AAC9I,MAAM,WAAW,gBAAgB;IAC/B,iHAAiH;IACjH,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAA;IACpC,0FAA0F;IAC1F,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;CAC/C;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,gBAAgB,CAe9G;AAED,gGAAgG;AAChG,eAAO,MAAM,WAAW,EAAE,gBAA2C,CAAA"}
|
package/dist/project-address.js
CHANGED
|
@@ -15,6 +15,13 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export const OVERVIEW_SEGMENT = 'overview';
|
|
17
17
|
export const SETTINGS_SEGMENT = 'settings';
|
|
18
|
+
/**
|
|
19
|
+
* The id the sessions with no project go by where a project's id would be, and their address:
|
|
20
|
+
* `/session` is the "New agent session" page with no project, `/session/<agentId>` one of those
|
|
21
|
+
* sessions. A project's id always ends in `-<hash>`, so no project has it, and no project's
|
|
22
|
+
* address or module's page takes the word.
|
|
23
|
+
*/
|
|
24
|
+
export const SESSIONS_ID = 'session';
|
|
18
25
|
/**
|
|
19
26
|
* Whether a segment can name a page a module adds (#1774): a lowercase letter, then lowercase
|
|
20
27
|
* letters and digits, and not a word the dashboard keeps. Whichever module claims the segment gets
|
|
@@ -22,7 +29,7 @@ export const SETTINGS_SEGMENT = 'settings';
|
|
|
22
29
|
* that adds it.
|
|
23
30
|
*/
|
|
24
31
|
export function isPageSegment(segment) {
|
|
25
|
-
return /^[a-z][a-z0-9]*$/.test(segment) && segment !== OVERVIEW_SEGMENT && segment !== SETTINGS_SEGMENT;
|
|
32
|
+
return /^[a-z][a-z0-9]*$/.test(segment) && segment !== OVERVIEW_SEGMENT && segment !== SETTINGS_SEGMENT && segment !== SESSIONS_ID;
|
|
26
33
|
}
|
|
27
34
|
/**
|
|
28
35
|
* The addresses of the registered projects, in the registry's order, beside the pages' words.
|
|
@@ -32,9 +39,9 @@ export function isPageSegment(segment) {
|
|
|
32
39
|
* no address in use.
|
|
33
40
|
*/
|
|
34
41
|
export function projectAddresses(projectIds, pageWords) {
|
|
35
|
-
const taken = new Set([OVERVIEW_SEGMENT, SETTINGS_SEGMENT, ...pageWords, ...projectIds]);
|
|
36
|
-
const byId = new Map();
|
|
37
|
-
const byAddress = new Map();
|
|
42
|
+
const taken = new Set([OVERVIEW_SEGMENT, SETTINGS_SEGMENT, SESSIONS_ID, ...pageWords, ...projectIds]);
|
|
43
|
+
const byId = new Map([[SESSIONS_ID, SESSIONS_ID]]);
|
|
44
|
+
const byAddress = new Map([[SESSIONS_ID, SESSIONS_ID]]);
|
|
38
45
|
for (const id of projectIds) {
|
|
39
46
|
const name = nameOf(id);
|
|
40
47
|
const address = name && !taken.has(name) ? name : id;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-address.js","sourceRoot":"","sources":["../src/project-address.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,2DAA2D;AAC3D,EAAE;AACF,gGAAgG;AAChG,8FAA8F;AAC9F,2FAA2F;AAC3F,+FAA+F;AAC/F,EAAE;AACF,2EAA2E;AAE3E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAA;AAC1C,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAA;AAE1C;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,OAAO,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,OAAO,KAAK,gBAAgB,IAAI,OAAO,KAAK,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"project-address.js","sourceRoot":"","sources":["../src/project-address.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,2DAA2D;AAC3D,EAAE;AACF,gGAAgG;AAChG,8FAA8F;AAC9F,2FAA2F;AAC3F,+FAA+F;AAC/F,EAAE;AACF,2EAA2E;AAE3E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAA;AAC1C,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAA;AAE1C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,SAAS,CAAA;AAEpC;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,OAAO,kBAAk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C1F,CAAA;AACH,CAAC;AAED,gGAAgG;AAChG,MAAM,CAAC,MAAM,WAAW,GAAqB,gBAAgB,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AAErE,4FAA4F;AAC5F,SAAS,MAAM,CAAC,SAAiB;IAC/B,MAAM,IAAI,GAAG,SAAS,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;IACvC,OAAO,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;AACjD,CAAC"}
|
package/dist/project-hooks.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export interface RunHooksOptions {
|
|
|
59
59
|
* goes there. Never throws.
|
|
60
60
|
*/
|
|
61
61
|
export declare function runProjectHooks(cwd: string, kind: HookKind, opts?: RunHooksOptions): Promise<void>;
|
|
62
|
-
/** What a `start` line is given: the prompt, and the coding agent, model, publish level branch to start from
|
|
62
|
+
/** What a `start` line is given: the prompt, and the coding agent, model, publish level, branch to start from, pull request's branch and repos when the person picked them. */
|
|
63
63
|
export interface StartHookInput {
|
|
64
64
|
prompt: string;
|
|
65
65
|
driver?: string;
|
|
@@ -72,6 +72,16 @@ export interface StartHookInput {
|
|
|
72
72
|
base?: string;
|
|
73
73
|
/** The branch the run's pull request goes into; the repository's default branch when absent. */
|
|
74
74
|
prBase?: string;
|
|
75
|
+
/** The folders of the repos a session with no project has as context: one per line in `REPOS`. */
|
|
76
|
+
repos?: readonly string[];
|
|
77
|
+
/** The account at the git host the session works as, by its login: in the environment, as `nameRun` is, so no line has to carry it. */
|
|
78
|
+
account?: string;
|
|
79
|
+
/** The agent the session is on, by its id: in the environment the same way. */
|
|
80
|
+
agent?: string;
|
|
81
|
+
/** The session's picks of skills, in the environment the same way: names on top of its agent's, names of its agent's left out, and which of the project's own stay (`none`, or names). */
|
|
82
|
+
skillsOn?: readonly string[];
|
|
83
|
+
skillsOff?: readonly string[];
|
|
84
|
+
projectSkills?: 'none' | readonly string[];
|
|
75
85
|
/**
|
|
76
86
|
* Whether the run is given a short name by a small model (the person's setting). `false` reaches
|
|
77
87
|
* the run's own tool through the environment rather than the line, so no project's `hooks.yml`
|
|
@@ -112,7 +122,7 @@ export type RunHookResult = {
|
|
|
112
122
|
};
|
|
113
123
|
/**
|
|
114
124
|
* Run the project's `start` line: the prompt in `PROMPT`, the picks in `DRIVER`, `MODEL`, `EFFORT`,
|
|
115
|
-
* `PUBLISH`, `BASE` and `
|
|
125
|
+
* `PUBLISH`, `BASE`, `PR_BASE` and `REPOS` (one folder per line) when made. The line answers one JSON document on stdout whose `id` names the
|
|
116
126
|
* run it started, and whose `driver` may name the coding agent that runs it.
|
|
117
127
|
*/
|
|
118
128
|
export declare function runStartHook(cwd: string, input: StartHookInput, opts?: Omit<RunHooksOptions, 'log'>): Promise<RunHookResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-hooks.d.ts","sourceRoot":"","sources":["../src/project-hooks.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"project-hooks.d.ts","sourceRoot":"","sources":["../src/project-hooks.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;GAYG;AAEH,iEAAiE;AACjE,eAAO,MAAM,kBAAkB,yBAA+B,CAAA;AAE9D,6EAA6E;AAC7E,eAAO,MAAM,eAAe,QAAS,CAAA;AAErC,yIAAyI;AACzI,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;AAEvC;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAA;AAK5C,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAKD;;;GAGG;AAC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