@openagt/dashboard 0.33.0 → 0.34.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/dist/built-in.d.ts.map +1 -1
- package/dist/built-in.js +2 -3
- package/dist/built-in.js.map +1 -1
- package/dist/dashboard/send-skills.js +1 -1
- package/dist/dashboard/send-skills.js.map +1 -1
- package/dist/dashboard/start-branch.js +1 -1
- package/dist/dashboard/start-branch.js.map +1 -1
- package/dist/dashboard-bundle/assets/{main-BJEMTscF.js → main-Bmnmb8kW.js} +13 -13
- package/dist/dashboard-bundle/assets/main-vGm5VAD9.css +2 -0
- package/dist/dashboard-bundle/assets/module-Bl9E9F3x.js +14 -0
- package/dist/dashboard-bundle/host/module.js +1 -1
- package/dist/dashboard-bundle/index.html +3 -3
- package/dist/dashboard-rpc/skills.d.ts +3 -4
- package/dist/dashboard-rpc/skills.d.ts.map +1 -1
- package/dist/dashboard-rpc/skills.js +4 -1
- package/dist/dashboard-rpc/skills.js.map +1 -1
- package/dist/module-types/src/dashboard-rpc/skills.d.ts +3 -4
- package/dist/module-types/src/project-commands.d.ts +0 -2
- package/dist/module-types/src/project-skills/apply.d.ts +35 -0
- package/dist/module-types/src/project-skills/branch.d.ts +29 -0
- package/dist/module-types/src/project-skills/catalogue.d.ts +39 -0
- package/dist/module-types/src/project-skills/change.d.ts +29 -0
- package/dist/module-types/src/project-skills/commit.d.ts +16 -0
- package/dist/module-types/src/project-skills/project.d.ts +42 -0
- package/dist/module-types/src/project-skills/skill-file.d.ts +16 -0
- package/dist/project-commands.d.ts +0 -2
- package/dist/project-commands.d.ts.map +1 -1
- package/dist/project-commands.js +1 -9
- package/dist/project-commands.js.map +1 -1
- package/dist/project-skills/apply.d.ts +36 -0
- package/dist/project-skills/apply.d.ts.map +1 -0
- package/dist/project-skills/apply.js +89 -0
- package/dist/project-skills/apply.js.map +1 -0
- package/dist/project-skills/branch.d.ts +30 -0
- package/dist/project-skills/branch.d.ts.map +1 -0
- package/dist/project-skills/branch.js +82 -0
- package/dist/project-skills/branch.js.map +1 -0
- package/dist/project-skills/catalogue.d.ts +40 -0
- package/dist/project-skills/catalogue.d.ts.map +1 -0
- package/dist/project-skills/catalogue.js +39 -0
- package/dist/project-skills/catalogue.js.map +1 -0
- package/dist/project-skills/change.d.ts +30 -0
- package/dist/project-skills/change.d.ts.map +1 -0
- package/dist/project-skills/change.js +29 -0
- package/dist/project-skills/change.js.map +1 -0
- package/dist/project-skills/commit.d.ts +17 -0
- package/dist/project-skills/commit.d.ts.map +1 -0
- package/dist/project-skills/commit.js +40 -0
- package/dist/project-skills/commit.js.map +1 -0
- package/dist/project-skills/project.d.ts +43 -0
- package/dist/project-skills/project.d.ts.map +1 -0
- package/dist/project-skills/project.js +60 -0
- package/dist/project-skills/project.js.map +1 -0
- package/dist/project-skills/skill-file.d.ts +17 -0
- package/dist/project-skills/skill-file.d.ts.map +1 -0
- package/dist/project-skills/skill-file.js +39 -0
- package/dist/project-skills/skill-file.js.map +1 -0
- package/dist/project-skills/test-project.d.ts +6 -0
- package/dist/project-skills/test-project.d.ts.map +1 -0
- package/dist/project-skills/test-project.js +31 -0
- package/dist/project-skills/test-project.js.map +1 -0
- package/package.json +32 -15
- package/dist/dashboard-bundle/assets/main-aHhLUwxc.css +0 -2
- package/dist/dashboard-bundle/assets/module-D7LI75mm.js +0 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,$t as t,A as n,At as r,B as i,Bt as a,Ct as o,Dt as s,E as c,F as l,Ft as u,G as d,Gt as f,H as p,Hn as m,Ht as h,I as g,In as _,It as v,J as y,K as b,L as x,Ln as S,Lt as C,M as w,Mt as T,N as E,O as D,Ot as O,P as k,Pt as A,Q as j,R as M,Rn as N,Rt as P,St as F,T as I,Tt as L,U as R,V as z,Vt as B,W as V,Wn as H,Wt as U,X as W,Y as G,Z as K,Zt as q,a as J,c as Y,d as X,dt as Z,f as Q,ft as $,g as ee,h as te,i as ne,in as re,it as ie,j as ae,k as oe,kt as se,l as ce,ln as le,m as ue,n as de,nn as fe,nt as pe,o as me,on as he,p as ge,pt as _e,q as ve,r as ye,rn as be,rt as xe,s as Se,st as Ce,t as we,tn as Te,u as Ee,w as De,wt as Oe,z as ke,zt as Ae}from"../assets/module-
|
|
1
|
+
import{$ as e,$t as t,A as n,At as r,B as i,Bt as a,Ct as o,Dt as s,E as c,F as l,Ft as u,G as d,Gt as f,H as p,Hn as m,Ht as h,I as g,In as _,It as v,J as y,K as b,L as x,Ln as S,Lt as C,M as w,Mt as T,N as E,O as D,Ot as O,P as k,Pt as A,Q as j,R as M,Rn as N,Rt as P,St as F,T as I,Tt as L,U as R,V as z,Vt as B,W as V,Wn as H,Wt as U,X as W,Y as G,Z as K,Zt as q,a as J,c as Y,d as X,dt as Z,f as Q,ft as $,g as ee,h as te,i as ne,in as re,it as ie,j as ae,k as oe,kt as se,l as ce,ln as le,m as ue,n as de,nn as fe,nt as pe,o as me,on as he,p as ge,pt as _e,q as ve,r as ye,rn as be,rt as xe,s as Se,st as Ce,t as we,tn as Te,u as Ee,w as De,wt as Oe,z as ke,zt as Ae}from"../assets/module-Bl9E9F3x.js";export{Z as AddMachineDialog,pe as Badge,_ as Button,G as Card,W as CardContent,K as CardHeader,j as CardTitle,e as CardTitleLink,xe as Checkbox,ie as ConfirmDialog,oe as ContextMenu,n as ContextMenuTrigger,$ as Dialog,ae as DiffStat,O as DropdownMenu,se as DropdownMenuCheckboxItem,r as DropdownMenuContent,T as DropdownMenuItem,A as DropdownMenuSeparator,u as DropdownMenuSub,v as DropdownMenuSubContent,C as DropdownMenuSubTrigger,P as DropdownMenuTrigger,I as FileIcon,U as Input,X as InviteDialog,z as Label,ee as LinkActions,H as MAX_SPEND_OFFSET,Ce as Markdown,we as ModuleHostContext,c as PaneActions,D as PaneTitle,Y as Pieces,E as Popover,k as PopoverContent,l as PopoverTrigger,Q as QrCode,a as RadioGroup,B as RadioGroupItem,h as RadioGroupOption,w as RangeSlider,Ae as ScrollArea,g as Select,x as SelectContent,M as SelectItem,ke as SelectTrigger,i as SelectValue,o as Separator,ge as SettingsRow,ue as SettingsSection,te as SettingsSelectRow,F as Skeleton,De as StartAgentButton,y as Switch,p as Table,R as TableBody,V as TableCell,d as TableHead,b as TableHeader,ve as TableRow,_e as Textarea,Oe as Tooltip,L as TooltipContent,s as TooltipTrigger,S as buttonVariants,N as cn,de as defineModule,t as forgetRemembered,be as formatAge,re as formatDateTime,he as formatDuration,le as formatRelative,ye as moduleHost,J as pathsIn,m as reachedByLine,f as useAction,q as useCodingAgents,me as useFileNames,ce as useHighlighted,Te as useLoaded,ne as useModuleHost,Ee as useNarrow,fe as usePolled,Se as useSchedule};
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"@openagt/dashboard/module": "/host/module.js"
|
|
28
28
|
}
|
|
29
29
|
}</script>
|
|
30
|
-
<script type="module" crossorigin src="/assets/main-
|
|
30
|
+
<script type="module" crossorigin src="/assets/main-Bmnmb8kW.js"></script>
|
|
31
31
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-QTnfLwEv.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="/assets/react-CZI7_Jkm.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="/assets/react-dom-cJyBB_A4.js">
|
|
34
34
|
<link rel="modulepreload" crossorigin href="/assets/client-CbBRB9m4.js">
|
|
35
35
|
<link rel="modulepreload" crossorigin href="/assets/jsx-runtime-By8HlURe.js">
|
|
36
|
-
<link rel="modulepreload" crossorigin href="/assets/module-
|
|
37
|
-
<link rel="stylesheet" crossorigin href="/assets/main-
|
|
36
|
+
<link rel="modulepreload" crossorigin href="/assets/module-Bl9E9F3x.js">
|
|
37
|
+
<link rel="stylesheet" crossorigin href="/assets/main-vGm5VAD9.css">
|
|
38
38
|
</head>
|
|
39
39
|
<body>
|
|
40
40
|
<div id="root"></div>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { type Standing } from '
|
|
1
|
+
import { type Standing } from '../project-skills/project.js';
|
|
2
2
|
import { type SendSkillsResult } from '../dashboard/send-skills.js';
|
|
3
3
|
export type { SendSkillsResult } from '../dashboard/send-skills.js';
|
|
4
4
|
/**
|
|
5
|
-
* A project's skills, as the dashboard shows and changes them (#2023): the
|
|
6
|
-
*
|
|
7
|
-
* the two cannot drift apart. A project has a skill when the skill's text is in its folder; the
|
|
5
|
+
* A project's skills, as the dashboard shows and changes them (#2023): the list with ticks of the
|
|
6
|
+
* skills a project picks beyond the defaults. A project has a skill when the skill's text is in its folder; the
|
|
8
7
|
* dashboard writes and deletes those files, and sends them where agents start from.
|
|
9
8
|
*/
|
|
10
9
|
/** One skill of the list, as it stands in the project. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/dashboard-rpc/skills.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/dashboard-rpc/skills.ts"],"names":[],"mappings":"AAIA,OAAO,EAAe,KAAK,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AAEzE,OAAO,EAA6B,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAM9F,YAAY,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE;;;;GAIG;AAEH,0DAA0D;AAC1D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAA;IACnB,+HAA+H;IAC/H,QAAQ,EAAE,QAAQ,CAAA;IAClB,wIAAwI;IACxI,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,aAAa;IAC5B,2GAA2G;IAC3G,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,YAAY,EAAE,CAAA;KAAE,EAAE,CAAA;IACpE,4IAA4I;IAC5I,WAA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,wBAAsB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CASrG"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { nodeGitRunner } from '@openagt/agent-data';
|
|
2
|
-
import {
|
|
2
|
+
import { skillsOn, uncommittedSkills } from '../project-skills/branch.js';
|
|
3
|
+
import { carriedSkills, GROUPS } from '../project-skills/catalogue.js';
|
|
4
|
+
import { applyChange, isKnown } from '../project-skills/change.js';
|
|
5
|
+
import { readProject } from '../project-skills/project.js';
|
|
3
6
|
import { cachedPrView } from '../dashboard/pull-requests.js';
|
|
4
7
|
import { sendSkills, SKILLS_BRANCH } from '../dashboard/send-skills.js';
|
|
5
8
|
import { waitingSkills } from '../dashboard/start-branch.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/dashboard-rpc/skills.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/dashboard-rpc/skills.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,EAAE,WAAW,EAAiB,MAAM,8BAA8B,CAAA;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAC5D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAyB,MAAM,6BAA6B,CAAA;AAC9F,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,C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G,MAAM,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IACxK,OAAO,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAA;AAC7B,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { type Standing } from '
|
|
1
|
+
import { type Standing } from '../project-skills/project.js';
|
|
2
2
|
import { type SendSkillsResult } from '../dashboard/send-skills.js';
|
|
3
3
|
export type { SendSkillsResult } from '../dashboard/send-skills.js';
|
|
4
4
|
/**
|
|
5
|
-
* A project's skills, as the dashboard shows and changes them (#2023): the
|
|
6
|
-
*
|
|
7
|
-
* the two cannot drift apart. A project has a skill when the skill's text is in its folder; the
|
|
5
|
+
* A project's skills, as the dashboard shows and changes them (#2023): the list with ticks of the
|
|
6
|
+
* skills a project picks beyond the defaults. A project has a skill when the skill's text is in its folder; the
|
|
8
7
|
* dashboard writes and deletes those files, and sends them where agents start from.
|
|
9
8
|
*/
|
|
10
9
|
/** One skill of the list, as it stands in the project. */
|
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
* something (the tickets, the queue) is not a command: typed alone it starts an agent with
|
|
6
6
|
* nothing to do, so the launcher does not list it.
|
|
7
7
|
*/
|
|
8
|
-
/** Where coding agents read a project's skills: Claude Code's folder, and the shared one Codex reads. */
|
|
9
|
-
export declare const SKILLS_DIRS: readonly ['.claude/skills', '.agents/skills'];
|
|
10
8
|
/** One skill as the launcher shows it. */
|
|
11
9
|
export interface ProjectCommand {
|
|
12
10
|
/** What is typed after the slash: the skill's folder name. */
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Writing and deleting a project's skills (#2023). A skill is one tracked file,
|
|
3
|
+
* `.agents/skills/<name>/SKILL.md`, where Codex reads it, and one tracked link,
|
|
4
|
+
* `.claude/skills/<name>`, pointing at that folder, where Claude Code reads it: the way the
|
|
5
|
+
* OpenAgent repository itself holds its skills. Nothing else is written: no `package.json`, no
|
|
6
|
+
* install, so a Node project, a PHP project and an empty folder get exactly the same.
|
|
7
|
+
*/
|
|
8
|
+
/** What one write or delete touched, as paths from the project's root: what a commit of it holds. */
|
|
9
|
+
export interface Touched {
|
|
10
|
+
paths: string[];
|
|
11
|
+
/** A place that was left as it is, and why: something there that OpenAgent did not write. */
|
|
12
|
+
left: {
|
|
13
|
+
path: string;
|
|
14
|
+
reason: string;
|
|
15
|
+
}[];
|
|
16
|
+
}
|
|
17
|
+
/** Write (or write again) the text of skill `name` and its link. */
|
|
18
|
+
export declare function writeSkill(root: string, name: string): Promise<Touched>;
|
|
19
|
+
/** Delete the text of skill `name` and its link. A folder that holds more than the text keeps the rest. */
|
|
20
|
+
export declare function removeSkill(root: string, name: string): Promise<Touched>;
|
|
21
|
+
/** What switching the scheduler answered. */
|
|
22
|
+
export type SchedulerOutcome = {
|
|
23
|
+
ok: true;
|
|
24
|
+
changed: boolean;
|
|
25
|
+
} | {
|
|
26
|
+
ok: false;
|
|
27
|
+
error: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Switch the scheduler on or off for this project on this machine: its two lines in the project's
|
|
31
|
+
* hooks file, which is outside git. Switching it off also stops one that is running, since nothing
|
|
32
|
+
* else would. Switching it on in a folder with no `.openagent/` makes the folder a project first,
|
|
33
|
+
* exactly as a dashboard's "Add project" does, since the hooks file lives there.
|
|
34
|
+
*/
|
|
35
|
+
export declare function setScheduler(root: string, on: boolean): Promise<SchedulerOutcome>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type GitRunner } from '@openagt/agent-data';
|
|
2
|
+
import { type CommitOutcome } from './commit.js';
|
|
3
|
+
/**
|
|
4
|
+
* A project's skills as git has them (#2023): which are on a branch, and which stand written or
|
|
5
|
+
* deleted in the folder with no commit yet. An agent's checkout starts from a branch, so a skill
|
|
6
|
+
* written into the folder reaches agents only once it is on that branch; until then a dashboard
|
|
7
|
+
* says it is waiting, and offers the commit.
|
|
8
|
+
*/
|
|
9
|
+
/** Which skills are on a branch: asked by name. */
|
|
10
|
+
export interface OnBranch {
|
|
11
|
+
has(name: string): boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The skills on `ref`, in either folder: a text there, or a link named as the skill (where it
|
|
15
|
+
* leads is the project's own business). Read with one listing of the two folders. Where the
|
|
16
|
+
* listing fails, or a skills folder is itself a link to somewhere the listing does not show, the
|
|
17
|
+
* answer is that every skill is there: a skill is said to be waiting only when that is known.
|
|
18
|
+
*/
|
|
19
|
+
export declare function skillsOn(root: string, ref: string, git?: GitRunner): Promise<OnBranch>;
|
|
20
|
+
/** The paths git may hold for `names`, from the project's root: each text, each link, and a text in a folder of Claude Code's own where there is no link. */
|
|
21
|
+
export declare function skillPaths(root: string, names: readonly string[]): Promise<string[]>;
|
|
22
|
+
/** The skills whose files stand written, changed or deleted in the folder with no commit yet, in the list's order. */
|
|
23
|
+
export declare function uncommittedSkills(root: string, git?: GitRunner): Promise<string[]>;
|
|
24
|
+
/**
|
|
25
|
+
* One commit of skill files that stand uncommitted, and nothing else. With `names`, the files of
|
|
26
|
+
* those skills alone: what a dashboard commits after a change. Without, every uncommitted file of
|
|
27
|
+
* the list's skills. Never a push.
|
|
28
|
+
*/
|
|
29
|
+
export declare function commitSkills(root: string, names?: readonly string[], git?: GitRunner): Promise<CommitOutcome>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The skills a project can pick in the dashboard's Skills list (#2023), in its groups, with what
|
|
3
|
+
* is ticked the first time. Every group is ticked except the skills that are useless until something of
|
|
4
|
+
* their own is set up. The skills every run gets by default are not here (the branches skill,
|
|
5
|
+
* and the ones `@openagt/start` names): they come with every run, with nothing written in the
|
|
6
|
+
* project.
|
|
7
|
+
*
|
|
8
|
+
* Each skill's text is its own package's `SKILL.md`, read from this package's install, so the
|
|
9
|
+
* dashboard carries the texts of the versions it was published with.
|
|
10
|
+
*/
|
|
11
|
+
export interface SkillGroup {
|
|
12
|
+
title: string;
|
|
13
|
+
skills: readonly string[];
|
|
14
|
+
/** Whether the group's skills are ticked in a project that has none of them yet. */
|
|
15
|
+
ticked: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const GROUPS: readonly SkillGroup[];
|
|
18
|
+
/** Every skill of the list, in its order. */
|
|
19
|
+
export declare const SKILL_NAMES: readonly string[];
|
|
20
|
+
/**
|
|
21
|
+
* The scheduler's skill: written, it also gets the two lines that start the scheduler while the
|
|
22
|
+
* dashboard is open, in the project's hooks file, which is this machine's and outside git; deleted,
|
|
23
|
+
* it takes them out. Ticked by default: every automation starts switched off, so the scheduler
|
|
24
|
+
* starts no agent until a person says so.
|
|
25
|
+
*/
|
|
26
|
+
export declare const SCHEDULER = "scheduler";
|
|
27
|
+
/** One skill as the dashboard carries it. */
|
|
28
|
+
export interface CarriedSkill {
|
|
29
|
+
name: string;
|
|
30
|
+
/** The package the text is from, and its version: what a written text is stamped with. */
|
|
31
|
+
package: string;
|
|
32
|
+
version: string;
|
|
33
|
+
/** The whole `SKILL.md`. */
|
|
34
|
+
text: string;
|
|
35
|
+
/** The `description` of its front matter, in one line. */
|
|
36
|
+
description: string;
|
|
37
|
+
}
|
|
38
|
+
/** Every skill of the list with its text, read once from this package's own install. */
|
|
39
|
+
export declare function carriedSkills(): Promise<Map<string, CarriedSkill>>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** One change to a project's skills, from the dashboard's Skills list or its Update button. */
|
|
2
|
+
export interface Change {
|
|
3
|
+
/** Skills to write: a new one, or one written again over what is there. */
|
|
4
|
+
write?: readonly string[];
|
|
5
|
+
/** Skills to delete. */
|
|
6
|
+
remove?: readonly string[];
|
|
7
|
+
}
|
|
8
|
+
export interface Changed {
|
|
9
|
+
written: string[];
|
|
10
|
+
removed: string[];
|
|
11
|
+
/** Every tracked path the change wrote or deleted, from the project's root: what its commit holds. */
|
|
12
|
+
paths: string[];
|
|
13
|
+
/** What was left as it is, and why. */
|
|
14
|
+
left: {
|
|
15
|
+
path: string;
|
|
16
|
+
reason: string;
|
|
17
|
+
}[];
|
|
18
|
+
/** The scheduler after the change, when the change wrote or deleted its skill; `error` when it could not be switched. */
|
|
19
|
+
scheduler?: {
|
|
20
|
+
on: boolean;
|
|
21
|
+
changed: boolean;
|
|
22
|
+
} | {
|
|
23
|
+
on: boolean;
|
|
24
|
+
error: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/** Whether `name` is a skill of the list. */
|
|
28
|
+
export declare function isKnown(name: string): boolean;
|
|
29
|
+
export declare function applyChange(root: string, change: Change): Promise<Changed>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type GitRunner } from '@openagt/agent-data';
|
|
2
|
+
/**
|
|
3
|
+
* The one commit of a change to a project's skills (#2023): only the skill files it wrote or
|
|
4
|
+
* deleted, on the branch the person is on, and nothing else they have open. Never a push: the person pushes, or
|
|
5
|
+
* opens a pull request where the default branch is protected.
|
|
6
|
+
*/
|
|
7
|
+
export type CommitOutcome = {
|
|
8
|
+
ok: true;
|
|
9
|
+
committed: boolean;
|
|
10
|
+
commit?: string;
|
|
11
|
+
} | {
|
|
12
|
+
ok: false;
|
|
13
|
+
error: string;
|
|
14
|
+
};
|
|
15
|
+
/** Commit what stands at `paths` (from the project's root) under `message`: a file written, a file deleted. Nothing changed there is no commit. */
|
|
16
|
+
export declare function commitPaths(root: string, paths: readonly string[], message: string, git?: GitRunner): Promise<CommitOutcome>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type GitRunner } from '@openagt/agent-data';
|
|
2
|
+
import { type CarriedSkill } from './catalogue.js';
|
|
3
|
+
/**
|
|
4
|
+
* What a project has, read off its files (#2023): a project has a skill when the skill's text is
|
|
5
|
+
* in it, where the coding agents read it. Nothing else is asked: no `package.json`, no list kept
|
|
6
|
+
* anywhere. A folder deleted by hand is a skill removed.
|
|
7
|
+
*/
|
|
8
|
+
/** Where a skill's text is written, and where it is linked for Claude Code. Codex reads the first. */
|
|
9
|
+
export declare const TEXTS_DIR = ".agents/skills";
|
|
10
|
+
export declare const LINKS_DIR = ".claude/skills";
|
|
11
|
+
/**
|
|
12
|
+
* How a skill stands in a project:
|
|
13
|
+
* - `absent`: the project does not hold it.
|
|
14
|
+
* - `current`: its text is the one the dashboard carries.
|
|
15
|
+
* - `newer`: the dashboard carries a newer text than the one the project was given.
|
|
16
|
+
* - `changed`: the project's text was changed by hand since it was written.
|
|
17
|
+
* - `own`: the project holds a text under this name that OpenAgent did not write (no stamp).
|
|
18
|
+
* - `ahead`: the project's text is from a newer OpenAgent than this one.
|
|
19
|
+
*/
|
|
20
|
+
export type Standing = 'absent' | 'current' | 'newer' | 'changed' | 'own' | 'ahead';
|
|
21
|
+
export interface SkillState {
|
|
22
|
+
name: string;
|
|
23
|
+
standing: Standing;
|
|
24
|
+
/** The file the project's text is in, from the project's root; absent when the project holds none. */
|
|
25
|
+
file?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ProjectState {
|
|
28
|
+
skills: SkillState[];
|
|
29
|
+
/** Whether the folder is a git repository. */
|
|
30
|
+
git: boolean;
|
|
31
|
+
/** Whether a dashboard knows the folder as a project: its `.openagent/` is there. */
|
|
32
|
+
activated: boolean;
|
|
33
|
+
/** Whether the project has a remote named `origin`. */
|
|
34
|
+
remote: boolean;
|
|
35
|
+
/** Whether that remote is on GitHub, the one git host there is a skill for. */
|
|
36
|
+
github: boolean;
|
|
37
|
+
}
|
|
38
|
+
/** How the project's text of one skill stands against the one the dashboard carries. */
|
|
39
|
+
export declare function standingOf(file: string, carried: CarriedSkill): Exclude<Standing, 'absent'>;
|
|
40
|
+
export declare function readProject(root: string, git?: GitRunner): Promise<ProjectState>;
|
|
41
|
+
/** The skills a project holds, by name. */
|
|
42
|
+
export declare function held(state: ProjectState): string[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A skill's text as the dashboard writes it into a project: the package's `SKILL.md`, with the
|
|
3
|
+
* version it is from stamped into its front matter as `metadata.version`. The stamp is what lets a
|
|
4
|
+
* later dashboard tell three things apart when a project's text is not the one it carries:
|
|
5
|
+
* the project's is older (a newer text is there to take), the project's was changed by hand (it is
|
|
6
|
+
* never written over unasked), or the reader itself is the older one (it says nothing).
|
|
7
|
+
*/
|
|
8
|
+
/** `text` with `version` stamped at the end of its front matter. A text with no front matter is given one. */
|
|
9
|
+
export declare function stamped(text: string, version: string): string;
|
|
10
|
+
/** A written file read back: the version it was stamped with, when it has a stamp, and the text without it. */
|
|
11
|
+
export declare function unstamped(file: string): {
|
|
12
|
+
version?: string;
|
|
13
|
+
text: string;
|
|
14
|
+
};
|
|
15
|
+
/** Whether version `a` is older than `b`, by their numbers: `0.1.2` is older than `0.1.10`. Anything that is not three numbers compares as equal. */
|
|
16
|
+
export declare function olderThan(a: string, b: string): boolean;
|
|
@@ -5,8 +5,6 @@
|
|
|
5
5
|
* something (the tickets, the queue) is not a command: typed alone it starts an agent with
|
|
6
6
|
* nothing to do, so the launcher does not list it.
|
|
7
7
|
*/
|
|
8
|
-
/** Where coding agents read a project's skills: Claude Code's folder, and the shared one Codex reads. */
|
|
9
|
-
export declare const SKILLS_DIRS: readonly ['.claude/skills', '.agents/skills'];
|
|
10
8
|
/** One skill as the launcher shows it. */
|
|
11
9
|
export interface ProjectCommand {
|
|
12
10
|
/** What is typed after the slash: the skill's folder name. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-commands.d.ts","sourceRoot":"","sources":["../src/project-commands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"project-commands.d.ts","sourceRoot":"","sources":["../src/project-commands.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AAEH,0CAA0C;AAC1C,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,2LAA2L;IAC3L,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,qIAAqI;IACrI,IAAI,CAAC,EAAE,IAAI,CAAA;CACZ;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAqBhF"}
|
package/dist/project-commands.js
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import { readdir, readFile } from 'node:fs/promises';
|
|
2
2
|
import { join } from 'node:path';
|
|
3
3
|
import { parse as parseYaml } from 'yaml';
|
|
4
|
-
|
|
5
|
-
* A project's commands (#1774): the skills written to be run by a person, read off the folders
|
|
6
|
-
* the coding agents read them from. OpenAgent ships no prompt text; what a project can be
|
|
7
|
-
* asked to do is what its own command skills say. A skill that teaches the agent how to do
|
|
8
|
-
* something (the tickets, the queue) is not a command: typed alone it starts an agent with
|
|
9
|
-
* nothing to do, so the launcher does not list it.
|
|
10
|
-
*/
|
|
11
|
-
/** Where coding agents read a project's skills: Claude Code's folder, and the shared one Codex reads. */
|
|
12
|
-
export const SKILLS_DIRS = ['.claude/skills', '.agents/skills'];
|
|
4
|
+
import { SKILLS_DIRS } from '@openagt/agent-data';
|
|
13
5
|
/**
|
|
14
6
|
* The project's commands, by name: the skills whose front matter says
|
|
15
7
|
* `disable-model-invocation: true`, written to be run by a person or a runner and never picked
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-commands.js","sourceRoot":"","sources":["../src/project-commands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,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
|
1
|
+
/**
|
|
2
|
+
* Writing and deleting a project's skills (#2023). A skill is one tracked file,
|
|
3
|
+
* `.agents/skills/<name>/SKILL.md`, where Codex reads it, and one tracked link,
|
|
4
|
+
* `.claude/skills/<name>`, pointing at that folder, where Claude Code reads it: the way the
|
|
5
|
+
* OpenAgent repository itself holds its skills. Nothing else is written: no `package.json`, no
|
|
6
|
+
* install, so a Node project, a PHP project and an empty folder get exactly the same.
|
|
7
|
+
*/
|
|
8
|
+
/** What one write or delete touched, as paths from the project's root: what a commit of it holds. */
|
|
9
|
+
export interface Touched {
|
|
10
|
+
paths: string[];
|
|
11
|
+
/** A place that was left as it is, and why: something there that OpenAgent did not write. */
|
|
12
|
+
left: {
|
|
13
|
+
path: string;
|
|
14
|
+
reason: string;
|
|
15
|
+
}[];
|
|
16
|
+
}
|
|
17
|
+
/** Write (or write again) the text of skill `name` and its link. */
|
|
18
|
+
export declare function writeSkill(root: string, name: string): Promise<Touched>;
|
|
19
|
+
/** Delete the text of skill `name` and its link. A folder that holds more than the text keeps the rest. */
|
|
20
|
+
export declare function removeSkill(root: string, name: string): Promise<Touched>;
|
|
21
|
+
/** What switching the scheduler answered. */
|
|
22
|
+
export type SchedulerOutcome = {
|
|
23
|
+
ok: true;
|
|
24
|
+
changed: boolean;
|
|
25
|
+
} | {
|
|
26
|
+
ok: false;
|
|
27
|
+
error: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Switch the scheduler on or off for this project on this machine: its two lines in the project's
|
|
31
|
+
* hooks file, which is outside git. Switching it off also stops one that is running, since nothing
|
|
32
|
+
* else would. Switching it on in a folder with no `.openagent/` makes the folder a project first,
|
|
33
|
+
* exactly as a dashboard's "Add project" does, since the hooks file lives there.
|
|
34
|
+
*/
|
|
35
|
+
export declare function setScheduler(root: string, on: boolean): Promise<SchedulerOutcome>;
|
|
36
|
+
//# sourceMappingURL=apply.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../src/project-skills/apply.ts"],"names":[],"mappings":"AAQA;;;;;;GAMG;AAEH,qGAAqG;AACrG,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,6FAA6F;IAC7F,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CACzC;AAWD,oEAAoE;AACpE,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAsB7E;AAED,2GAA2G;AAC3G,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAkB9E;AAED,6CAA6C;AAC7C,MAAM,MAAM,gBAAgB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE5F;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAavF"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { lstat, mkdir, realpath, rm, rmdir, symlink, writeFile } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { gitReason, installProject } from '@openagt/agent-data';
|
|
4
|
+
import { initHooks, removeHooks, stopScheduler } from '@openagt/skill-scheduler';
|
|
5
|
+
import { carriedSkills } from './catalogue.js';
|
|
6
|
+
import { LINKS_DIR, TEXTS_DIR } from './project.js';
|
|
7
|
+
import { stamped } from './skill-file.js';
|
|
8
|
+
const kindOf = async (path) => {
|
|
9
|
+
const entry = await lstat(path).catch(() => undefined);
|
|
10
|
+
if (!entry)
|
|
11
|
+
return 'none';
|
|
12
|
+
return entry.isSymbolicLink() ? 'link' : entry.isDirectory() ? 'directory' : 'other';
|
|
13
|
+
};
|
|
14
|
+
/** The link made for Claude Code: relative, so it holds in every clone and every checkout that keeps links. */
|
|
15
|
+
const linkTarget = (name) => `../../${TEXTS_DIR}/${name}`;
|
|
16
|
+
/** Write (or write again) the text of skill `name` and its link. */
|
|
17
|
+
export async function writeSkill(root, name) {
|
|
18
|
+
const skill = (await carriedSkills()).get(name);
|
|
19
|
+
if (!skill)
|
|
20
|
+
throw new Error(`no skill ${name}`);
|
|
21
|
+
const touched = { paths: [], left: [] };
|
|
22
|
+
const file = `${TEXTS_DIR}/${name}/SKILL.md`;
|
|
23
|
+
await mkdir(join(root, TEXTS_DIR, name), { recursive: true });
|
|
24
|
+
await writeFile(join(root, file), stamped(skill.text, skill.version));
|
|
25
|
+
touched.paths.push(file);
|
|
26
|
+
const link = `${LINKS_DIR}/${name}`;
|
|
27
|
+
const kind = await kindOf(join(root, link));
|
|
28
|
+
if (kind === 'none') {
|
|
29
|
+
await mkdir(join(root, LINKS_DIR), { recursive: true });
|
|
30
|
+
// A real link, also on Windows: git tracks a link, and a junction is none to it.
|
|
31
|
+
const made = await symlink(linkTarget(name), join(root, link), 'dir').then(() => true, () => false);
|
|
32
|
+
if (made)
|
|
33
|
+
touched.paths.push(link);
|
|
34
|
+
else
|
|
35
|
+
touched.left.push({ path: link, reason: 'the link could not be made: Claude Code does not have this skill' });
|
|
36
|
+
}
|
|
37
|
+
else if ((await realpath(join(root, link)).catch(() => undefined)) !== (await realpath(join(root, TEXTS_DIR, name)))) {
|
|
38
|
+
// Anything that does not lead to the text just written: a folder of the project's own, a link to somewhere else.
|
|
39
|
+
touched.left.push({ path: link, reason: kind === 'link' ? 'a link to somewhere else' : 'not a link: Claude Code reads what is there' });
|
|
40
|
+
}
|
|
41
|
+
return touched;
|
|
42
|
+
}
|
|
43
|
+
/** Delete the text of skill `name` and its link. A folder that holds more than the text keeps the rest. */
|
|
44
|
+
export async function removeSkill(root, name) {
|
|
45
|
+
const touched = { paths: [], left: [] };
|
|
46
|
+
const link = `${LINKS_DIR}/${name}`;
|
|
47
|
+
const kind = await kindOf(join(root, link));
|
|
48
|
+
if (kind === 'link') {
|
|
49
|
+
await rm(join(root, link));
|
|
50
|
+
touched.paths.push(link);
|
|
51
|
+
}
|
|
52
|
+
for (const dir of kind === 'directory' ? [TEXTS_DIR, LINKS_DIR] : [TEXTS_DIR]) {
|
|
53
|
+
const folder = `${dir}/${name}`;
|
|
54
|
+
const file = `${folder}/SKILL.md`;
|
|
55
|
+
if ((await kindOf(join(root, file))) === 'none')
|
|
56
|
+
continue;
|
|
57
|
+
await rm(join(root, file));
|
|
58
|
+
touched.paths.push(file);
|
|
59
|
+
// rmdir, never a recursive remove: a file a person put beside the text keeps the folder.
|
|
60
|
+
if (!(await rmdir(join(root, folder)).then(() => true, () => false)))
|
|
61
|
+
touched.left.push({ path: folder, reason: 'it holds other files' });
|
|
62
|
+
}
|
|
63
|
+
return touched;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Switch the scheduler on or off for this project on this machine: its two lines in the project's
|
|
67
|
+
* hooks file, which is outside git. Switching it off also stops one that is running, since nothing
|
|
68
|
+
* else would. Switching it on in a folder with no `.openagent/` makes the folder a project first,
|
|
69
|
+
* exactly as a dashboard's "Add project" does, since the hooks file lives there.
|
|
70
|
+
*/
|
|
71
|
+
export async function setScheduler(root, on) {
|
|
72
|
+
if (!on) {
|
|
73
|
+
const removed = await removeHooks(root);
|
|
74
|
+
if (!removed.ok)
|
|
75
|
+
return { ok: false, error: `${removed.file}: ${removed.detail ?? 'unreadable'}` };
|
|
76
|
+
// The line that stops the scheduler when the dashboard closes just went: one that is running is stopped now.
|
|
77
|
+
if (removed.removed.length > 0)
|
|
78
|
+
await stopScheduler(root).catch(() => { });
|
|
79
|
+
return { ok: true, changed: removed.removed.length > 0 };
|
|
80
|
+
}
|
|
81
|
+
const installed = await installProject(root);
|
|
82
|
+
if (!installed.ok)
|
|
83
|
+
return { ok: false, error: gitReason(new Error(installed.error)) };
|
|
84
|
+
const written = await initHooks(root);
|
|
85
|
+
if (!written.ok)
|
|
86
|
+
return { ok: false, error: `${written.file}: ${written.detail ?? written.reason}` };
|
|
87
|
+
return { ok: true, changed: written.added.length > 0 };
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=apply.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply.js","sourceRoot":"","sources":["../../src/project-skills/apply.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACxF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAiBzC,MAAM,MAAM,GAAG,KAAK,EAAE,IAAY,EAAoD,EAAE;IACtF,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAA;IACtD,IAAI,CAAC,KAAK;QAAE,OAAO,MAAM,CAAA;IACzB,OAAO,KAAK,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAA;AACtF,CAAC,CAAA;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E,CAAA;QAClG,6GAA6G;QAC7G,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC;YAAE,MAAM,aAAa,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;QACzE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAA;IAC1D,CAAC;IACD,MAAM,SAAS,GAAG,MAAM,cAAc,CAAC,IAAI,CAAC,CAAA;IAC5C,IAAI,CAAC,SAAS,CAAC,EAAE;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAA;IACrF,MAAM,OAAO,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,CAAA;IACrC,IAAI,CAAC,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,EAAE,EAAE,CAAA;IACpG,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAA;AACxD,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type GitRunner } from '@openagt/agent-data';
|
|
2
|
+
import { type CommitOutcome } from './commit.js';
|
|
3
|
+
/**
|
|
4
|
+
* A project's skills as git has them (#2023): which are on a branch, and which stand written or
|
|
5
|
+
* deleted in the folder with no commit yet. An agent's checkout starts from a branch, so a skill
|
|
6
|
+
* written into the folder reaches agents only once it is on that branch; until then a dashboard
|
|
7
|
+
* says it is waiting, and offers the commit.
|
|
8
|
+
*/
|
|
9
|
+
/** Which skills are on a branch: asked by name. */
|
|
10
|
+
export interface OnBranch {
|
|
11
|
+
has(name: string): boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The skills on `ref`, in either folder: a text there, or a link named as the skill (where it
|
|
15
|
+
* leads is the project's own business). Read with one listing of the two folders. Where the
|
|
16
|
+
* listing fails, or a skills folder is itself a link to somewhere the listing does not show, the
|
|
17
|
+
* answer is that every skill is there: a skill is said to be waiting only when that is known.
|
|
18
|
+
*/
|
|
19
|
+
export declare function skillsOn(root: string, ref: string, git?: GitRunner): Promise<OnBranch>;
|
|
20
|
+
/** The paths git may hold for `names`, from the project's root: each text, each link, and a text in a folder of Claude Code's own where there is no link. */
|
|
21
|
+
export declare function skillPaths(root: string, names: readonly string[]): Promise<string[]>;
|
|
22
|
+
/** The skills whose files stand written, changed or deleted in the folder with no commit yet, in the list's order. */
|
|
23
|
+
export declare function uncommittedSkills(root: string, git?: GitRunner): Promise<string[]>;
|
|
24
|
+
/**
|
|
25
|
+
* One commit of skill files that stand uncommitted, and nothing else. With `names`, the files of
|
|
26
|
+
* those skills alone: what a dashboard commits after a change. Without, every uncommitted file of
|
|
27
|
+
* the list's skills. Never a push.
|
|
28
|
+
*/
|
|
29
|
+
export declare function commitSkills(root: string, names?: readonly string[], git?: GitRunner): Promise<CommitOutcome>;
|
|
30
|
+
//# sourceMappingURL=branch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branch.d.ts","sourceRoot":"","sources":["../../src/project-skills/branch.ts"],"names":[],"mappings":"AAEA,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEnE,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,aAAa,CAAA;AAG7D;;;;;GAKG;AAEH,mDAAmD;AACnD,MAAM,WAAW,QAAQ;IACvB,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;CAC3B;AAKD;;;;;GAKG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,SAA2B,GAAG,OAAO,CAAC,QAAQ,CAAC,CAmB7G;AAgBD,6JAA6J;AAC7J,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAS1F;AAED,sHAAsH;AACtH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,SAA2B,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAMzG;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,SAAS,MAAM,EAAgB,EAAE,GAAG,GAAE,SAA2B,GAAG,OAAO,CAAC,aAAa,CAAC,CAEjJ"}
|