@nanocollective/roster 0.1.0-alpha.9 → 0.1.0-beta.10
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 +6 -0
- package/dist/cli.js +4189 -1971
- package/dist/worker/assets/assets/css/base.css +327 -0
- package/dist/worker/assets/assets/css/brain.css +116 -0
- package/dist/worker/assets/assets/css/diff.css +33 -0
- package/dist/worker/assets/assets/css/graph.css +39 -0
- package/dist/worker/assets/assets/css/health.css +75 -0
- package/dist/worker/assets/assets/css/home.css +114 -0
- package/dist/worker/assets/assets/css/inbox.css +199 -0
- package/dist/worker/assets/assets/css/layout.css +181 -0
- package/dist/worker/assets/assets/css/markdown.css +96 -0
- package/dist/worker/assets/assets/css/runs.css +13 -0
- package/dist/worker/assets/assets/css/search.css +48 -0
- package/dist/worker/assets/assets/css/setup.css +194 -0
- package/dist/worker/assets/assets/js/api.js +191 -0
- package/dist/worker/assets/assets/js/app.js +500 -0
- package/dist/worker/assets/assets/js/dialog.js +196 -0
- package/dist/worker/assets/assets/js/dom.js +131 -0
- package/dist/worker/assets/assets/js/homesort.js +174 -0
- package/dist/worker/assets/assets/js/icons.js +142 -0
- package/dist/worker/assets/assets/js/inflight.js +18 -0
- package/dist/worker/assets/assets/js/lightbox.js +273 -0
- package/dist/worker/assets/assets/js/md.js +406 -0
- package/dist/worker/assets/assets/js/mdedit.js +84 -0
- package/dist/worker/assets/assets/js/mention.js +264 -0
- package/dist/worker/assets/assets/js/readiness.js +70 -0
- package/dist/worker/assets/assets/js/refresh.js +197 -0
- package/dist/worker/assets/assets/js/router.js +20 -0
- package/dist/worker/assets/assets/js/search.js +366 -0
- package/dist/worker/assets/assets/js/state.js +213 -0
- package/dist/worker/assets/assets/js/textdiff.js +96 -0
- package/dist/worker/assets/assets/js/views/app.js +145 -0
- package/dist/worker/assets/assets/js/views/brain.js +260 -0
- package/dist/worker/assets/assets/js/views/changed.js +157 -0
- package/dist/worker/assets/assets/js/views/checklist.js +115 -0
- package/dist/worker/assets/assets/js/views/credential.js +84 -0
- package/dist/worker/assets/assets/js/views/docs.js +174 -0
- package/dist/worker/assets/assets/js/views/files.js +139 -0
- package/dist/worker/assets/assets/js/views/graph.js +436 -0
- package/dist/worker/assets/assets/js/views/health.js +304 -0
- package/dist/worker/assets/assets/js/views/hire.js +593 -0
- package/dist/worker/assets/assets/js/views/home.js +621 -0
- package/dist/worker/assets/assets/js/views/inbox.js +1558 -0
- package/dist/worker/assets/assets/js/views/memory.js +150 -0
- package/dist/worker/assets/assets/js/views/org.js +195 -0
- package/dist/worker/assets/assets/js/views/orgedit.js +240 -0
- package/dist/worker/assets/assets/js/views/paste.js +216 -0
- package/dist/worker/assets/assets/js/views/prompt.js +457 -0
- package/dist/worker/assets/assets/js/views/repos.js +97 -0
- package/dist/worker/assets/assets/js/views/runonce.js +94 -0
- package/dist/worker/assets/assets/js/views/runs.js +182 -0
- package/dist/worker/assets/assets/js/views/setup.js +557 -0
- package/dist/worker/assets/assets/js/views/staff.js +291 -0
- package/dist/worker/assets/assets/js/views/todo.js +62 -0
- package/dist/worker/assets/assets/js/yaml.js +134 -0
- package/dist/worker/assets/docs-images/brain.jpg +0 -0
- package/dist/worker/assets/docs-images/home.jpg +0 -0
- package/dist/worker/assets/docs-images/org.jpg +0 -0
- package/dist/worker/assets/docs-images/prompt.jpg +0 -0
- package/dist/worker/assets/docs-images/setup-org.jpg +0 -0
- package/dist/worker/assets/docs-images/setup-plan.jpg +0 -0
- package/dist/worker/assets/docs-images/staff.jpg +0 -0
- package/dist/worker/assets/index.html +82 -0
- package/dist/worker/index.js +5143 -0
- package/docs/README.md +2 -2
- package/docs/architecture.md +23 -4
- package/docs/charters/analyst.md +65 -0
- package/docs/charters/community.md +63 -0
- package/docs/charters/designer.md +65 -0
- package/docs/charters/devops.md +65 -0
- package/docs/charters/pm.md +70 -0
- package/docs/charters/qa.md +65 -0
- package/docs/charters/writer.md +63 -0
- package/docs/commands.md +36 -9
- package/docs/concepts.md +34 -21
- package/docs/cost.md +3 -3
- package/docs/developing.md +28 -10
- package/docs/doctor-codes.md +3 -1
- package/docs/export.md +2 -0
- package/docs/getting-started.md +49 -29
- package/docs/hosting.md +114 -43
- package/docs/images/brain.jpg +0 -0
- package/docs/images/home.jpg +0 -0
- package/docs/images/org.jpg +0 -0
- package/docs/images/prompt.jpg +0 -0
- package/docs/images/staff.jpg +0 -0
- package/docs/manual-steps.md +3 -2
- package/docs/memory.md +2 -1
- package/docs/org-yaml.md +3 -0
- package/docs/portal.md +144 -45
- package/docs/prompts.md +6 -0
- package/docs/security.md +70 -11
- package/docs/session-workflow.md +24 -6
- package/docs/staff-yaml.md +21 -2
- package/docs/upgrading.md +3 -3
- package/docs/writing-a-charter.md +19 -6
- package/package.json +4 -3
- package/templates/brain/.github/workflows/%%STAFF%%-daily.yaml +20 -1
- package/templates/brain/.github/workflows/%%STAFF%%-mention.yaml +53 -13
- package/templates/brain/CHARTER.md +2 -2
- package/templates/brain/STATE.md +16 -0
- package/templates/brain/memory/INDEX.md +1 -1
- package/templates/brain/staff.yaml +4 -1
- package/templates/briefs/amend.md +4 -3
- package/templates/briefs/priorities.md +46 -0
- package/templates/ops/.github/workflows/session.yaml +150 -3
- package/templates/ops/compose.mjs +35 -8
- package/templates/ops/org/operating.md +29 -10
- package/templates/ops/org/voice.md +2 -1
- package/templates/ops/prompts/daily.md +51 -14
- package/templates/ops/prompts/mention.md +24 -2
- package/templates/ops/run-record.mjs +5 -3
- package/templates/ops/status-week.mjs +169 -0
- package/templates/portal/css/base.css +49 -0
- package/templates/portal/css/health.css +14 -1
- package/templates/portal/css/home.css +114 -0
- package/templates/portal/css/inbox.css +21 -4
- package/templates/portal/css/layout.css +35 -3
- package/templates/portal/css/markdown.css +19 -0
- package/templates/portal/css/search.css +48 -0
- package/templates/portal/css/setup.css +79 -4
- package/templates/portal/index.html +15 -9
- package/templates/portal/js/api.js +60 -4
- package/templates/portal/js/app.js +125 -7
- package/templates/portal/js/dialog.js +36 -0
- package/templates/portal/js/homesort.js +174 -0
- package/templates/portal/js/icons.js +41 -0
- package/templates/portal/js/inflight.js +18 -0
- package/templates/portal/js/md.js +5 -2
- package/templates/portal/js/mdedit.js +84 -0
- package/templates/portal/js/readiness.js +70 -0
- package/templates/portal/js/refresh.js +10 -2
- package/templates/portal/js/search.js +366 -0
- package/templates/portal/js/state.js +11 -5
- package/templates/portal/js/views/app.js +1 -2
- package/templates/portal/js/views/brain.js +1 -1
- package/templates/portal/js/views/checklist.js +19 -4
- package/templates/portal/js/views/credential.js +42 -51
- package/templates/portal/js/views/health.js +11 -6
- package/templates/portal/js/views/hire.js +593 -0
- package/templates/portal/js/views/home.js +621 -0
- package/templates/portal/js/views/inbox.js +237 -68
- package/templates/portal/js/views/org.js +31 -111
- package/templates/portal/js/views/orgedit.js +240 -0
- package/templates/portal/js/views/paste.js +111 -66
- package/templates/portal/js/views/prompt.js +94 -40
- package/templates/portal/js/views/repos.js +10 -10
- package/templates/portal/js/views/runs.js +21 -4
- package/templates/portal/js/views/setup.js +130 -163
- package/templates/portal/js/views/staff.js +181 -301
- package/templates/portal/js/views/todo.js +62 -0
|
@@ -6,88 +6,79 @@
|
|
|
6
6
|
import { getCredential, storeCredential } from "../api.js";
|
|
7
7
|
import { el } from "../dom.js";
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
box
|
|
9
|
+
/** @param opts.bare drawn inside a step that already has a title. `onStatus(done)` hears whether one is stored. */
|
|
10
|
+
export function credentialPanel(opts = {}) {
|
|
11
|
+
const box = el("div", { className: opts.bare ? "" : "manual" });
|
|
12
|
+
if (!opts.bare) box.append(el("b", { textContent: "Agent credential" }));
|
|
12
13
|
const body = el("div");
|
|
13
14
|
box.append(body);
|
|
14
|
-
body.append(el("p", { className: "sub", textContent: "
|
|
15
|
+
body.append(el("p", { className: "sub", textContent: "Checking…" }));
|
|
15
16
|
|
|
16
17
|
getCredential()
|
|
17
|
-
.then((c) =>
|
|
18
|
+
.then((c) => {
|
|
19
|
+
opts.onStatus?.(Boolean(c.stored ?? c.orgSecret));
|
|
20
|
+
draw(body, c, opts);
|
|
21
|
+
})
|
|
18
22
|
.catch((err) => body.replaceChildren(el("p", { className: "err", textContent: String(err.message || err) })));
|
|
19
23
|
return box;
|
|
20
24
|
}
|
|
21
25
|
|
|
22
|
-
function draw(body, c) {
|
|
26
|
+
function draw(body, c, opts = {}) {
|
|
23
27
|
body.replaceChildren();
|
|
24
|
-
if (c.howTo) body.append(el("p", { textContent: "Where to get one: " + c.howTo }));
|
|
25
28
|
|
|
26
|
-
if (!c.brains.length) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
className: "sub",
|
|
30
|
-
textContent:
|
|
31
|
-
"Nothing reads it until somebody is hired, so this box opens once there is a staff " +
|
|
32
|
-
"member. It is asked for once, not once per hire.",
|
|
33
|
-
}),
|
|
34
|
-
);
|
|
29
|
+
if (!(c.brains ?? []).length) {
|
|
30
|
+
// Inside a step, the step's own hint already says when this opens.
|
|
31
|
+
if (!opts.bare) body.append(el("p", { className: "sub", textContent: "Available after your first hire. You only add it once." }));
|
|
35
32
|
return;
|
|
36
33
|
}
|
|
37
34
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
body.append(
|
|
50
|
-
el("p", {
|
|
51
|
-
className: "sub",
|
|
52
|
-
textContent:
|
|
53
|
-
(c.plan.mode === "org"
|
|
54
|
-
? "Stored as one org secret, " + c.name + ", shared with " + c.brains.join(", ") + ". "
|
|
55
|
-
: "Stored as " + c.name + " on each of " + c.brains.join(", ") + ", because " + c.plan.reason + ". ") +
|
|
56
|
-
"It goes to gh on standard input and is never written to disk.",
|
|
57
|
-
}),
|
|
35
|
+
const form = el("div", { className: "credform" });
|
|
36
|
+
const input = el("input", { type: "password", placeholder: "Paste it here", autocomplete: "off", className: "textfield" });
|
|
37
|
+
const go = el("button", { className: "btn primary", textContent: "Save" });
|
|
38
|
+
const out = el("div");
|
|
39
|
+
form.append(
|
|
40
|
+
...(c.howTo ? [el("p", { className: "sub", textContent: "To get one, " + c.howTo })] : []),
|
|
41
|
+
input,
|
|
42
|
+
el("div", { className: "row" }, [go]),
|
|
43
|
+
out,
|
|
58
44
|
);
|
|
59
45
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
46
|
+
// Stored already, on the org or on every brain repo: say so, and keep replacing it one click away.
|
|
47
|
+
if (c.stored ?? c.orgSecret) {
|
|
48
|
+
const replace = el("button", { className: "ghbtn", textContent: "Replace it" });
|
|
49
|
+
replace.onclick = () => {
|
|
50
|
+
replace.remove();
|
|
51
|
+
form.hidden = false;
|
|
52
|
+
input.focus?.();
|
|
53
|
+
};
|
|
54
|
+
form.hidden = true;
|
|
55
|
+
body.append(el("p", { className: "okline", textContent: "✓ Stored as " + c.name + "." }), replace, form);
|
|
56
|
+
} else {
|
|
57
|
+
body.append(form);
|
|
58
|
+
}
|
|
65
59
|
|
|
66
60
|
go.onclick = async () => {
|
|
67
|
-
const value = input.value.trim();
|
|
61
|
+
const value = String(input.value ?? "").trim();
|
|
68
62
|
if (!value) {
|
|
69
|
-
input.focus();
|
|
63
|
+
input.focus?.();
|
|
70
64
|
return;
|
|
71
65
|
}
|
|
72
66
|
go.disabled = true;
|
|
73
|
-
|
|
67
|
+
go.textContent = "Saving…";
|
|
74
68
|
try {
|
|
75
69
|
const r = await storeCredential(value, false);
|
|
76
70
|
input.value = "";
|
|
77
71
|
if (!r.ok) throw new Error(r.error);
|
|
72
|
+
opts.onStatus?.(true);
|
|
78
73
|
out.replaceChildren(
|
|
79
|
-
...(r.fellBack ? [el("p", { className: "
|
|
80
|
-
el("p", {
|
|
81
|
-
textContent:
|
|
82
|
-
r.mode === "org"
|
|
83
|
-
? "Stored once for the org, shared with " + r.repos.length + " brains."
|
|
84
|
-
: "Stored on " + r.repos.join(", ") + ".",
|
|
85
|
-
}),
|
|
74
|
+
...(r.fellBack ? [el("p", { className: "sub", textContent: "Saved on each repo instead: " + r.fellBack })] : []),
|
|
75
|
+
el("p", { className: "okline", textContent: "✓ Saved." }),
|
|
86
76
|
);
|
|
87
77
|
} catch (err) {
|
|
88
78
|
out.replaceChildren(el("p", { className: "err", textContent: String(err.message || err) }));
|
|
89
79
|
} finally {
|
|
90
80
|
go.disabled = false;
|
|
81
|
+
go.textContent = "Save";
|
|
91
82
|
}
|
|
92
83
|
};
|
|
93
84
|
}
|
|
@@ -7,7 +7,7 @@ import { inline } from "../md.js";
|
|
|
7
7
|
import { render } from "../router.js";
|
|
8
8
|
import { S, staff } from "../state.js";
|
|
9
9
|
import { checklist } from "./checklist.js";
|
|
10
|
-
import {
|
|
10
|
+
import { amendSheet } from "./prompt.js";
|
|
11
11
|
import { runOnce } from "./runonce.js";
|
|
12
12
|
|
|
13
13
|
const DAYS = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
@@ -75,7 +75,7 @@ export function viewHealth(m) {
|
|
|
75
75
|
}
|
|
76
76
|
if ((rig.missingSurfaces ?? []).length) {
|
|
77
77
|
g.append(kv("Surfaces", esc(rig.missingSurfaces.length + " missing"),
|
|
78
|
-
rig.missingSurfaces.join(", ") + " — declared in staff.yaml, not
|
|
78
|
+
rig.missingSurfaces.join(", ") + " — declared in staff.yaml, not in the repo", true));
|
|
79
79
|
}
|
|
80
80
|
m.append(g);
|
|
81
81
|
|
|
@@ -141,6 +141,8 @@ function memoryProblems({ body, actions, say }, s) {
|
|
|
141
141
|
);
|
|
142
142
|
if (!s.problems.length) return;
|
|
143
143
|
|
|
144
|
+
const list = el("div", { className: "card hlist" });
|
|
145
|
+
body.append(list);
|
|
144
146
|
for (const p of s.problems) {
|
|
145
147
|
const { row, body: text } = finding(
|
|
146
148
|
p.level === "error" ? "error" : "warning",
|
|
@@ -158,7 +160,7 @@ function memoryProblems({ body, actions, say }, s) {
|
|
|
158
160
|
}
|
|
159
161
|
acts.append(status);
|
|
160
162
|
text.append(acts);
|
|
161
|
-
|
|
163
|
+
list.append(row);
|
|
162
164
|
}
|
|
163
165
|
|
|
164
166
|
/* The portal's one power over an agent is that it acts as the human, so "fix this" is an
|
|
@@ -235,13 +237,16 @@ async function promptProblems({ body, say }, s) {
|
|
|
235
237
|
/* Worst first, and each one carrying the sentence that fixes it. Knowing there is a problem
|
|
236
238
|
is the hard part; writing the paragraph that asks for the change is not. */
|
|
237
239
|
const rank = { error: 0, warning: 1, note: 2 };
|
|
240
|
+
const list = el("div", { className: "card hlist" });
|
|
241
|
+
body.append(list);
|
|
238
242
|
for (const p of [...problems].sort((a, b) => (rank[a.level] ?? 3) - (rank[b.level] ?? 3))) {
|
|
239
243
|
const { row, body: text } = finding(p.level, { text: p.title }, [(p.kinds ?? []).join(", ")]);
|
|
240
244
|
text.append(el("p", { textContent: p.detail }));
|
|
241
245
|
|
|
242
246
|
const note = el("span", { className: "meta" });
|
|
243
|
-
const fix = el("button", { className: "ghbtn", textContent: "
|
|
244
|
-
fix.onclick = () =>
|
|
247
|
+
const fix = el("button", { className: "ghbtn", textContent: "Fix this with your AI" });
|
|
248
|
+
fix.onclick = () =>
|
|
249
|
+
amendSheet({ handle: s.handle, name: s.name, kind: p.kind, want: p.want, title: p.title, detail: p.detail });
|
|
245
250
|
const actions = el("div", { className: "row facts" }, [fix]);
|
|
246
251
|
if (p.path) {
|
|
247
252
|
const go = el("button", { className: "ghbtn", textContent: "Open the file" });
|
|
@@ -256,7 +261,7 @@ async function promptProblems({ body, say }, s) {
|
|
|
256
261
|
}
|
|
257
262
|
actions.append(note);
|
|
258
263
|
text.append(actions);
|
|
259
|
-
|
|
264
|
+
list.append(row);
|
|
260
265
|
}
|
|
261
266
|
}
|
|
262
267
|
|