@nanocollective/roster 0.1.0-alpha.24 → 0.1.0-alpha.25

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/cli.js CHANGED
@@ -140,7 +140,7 @@ async function createApp(spec2, opts = {}) {
140
140
  res.end(
141
141
  page(
142
142
  `${app.slug} created`,
143
- "The private key went straight into the repository's secrets and was never written to disk. You can close this tab; the terminal has the next step."
143
+ "Its keys are saved in the repository's secrets. You can close this tab; the terminal has the next step."
144
144
  )
145
145
  );
146
146
  finish(() => resolve6(app));
@@ -210,7 +210,8 @@ async function open(url) {
210
210
  // src/lib/install.ts
211
211
  import { existsSync, readFileSync } from "fs";
212
212
  import { join } from "path";
213
- function installTargets(ws, org, parseYaml, handle, spec2) {
213
+ function installTargets(ws, org, parseYaml, handle, spec2, scope = "private") {
214
+ if (scope === "public") return [...new Set(spec2.worksIn)];
214
215
  const peers = [];
215
216
  for (const s of org.staff ?? []) {
216
217
  if (s.handle === handle) continue;
@@ -222,7 +223,8 @@ function installTargets(ws, org, parseYaml, handle, spec2) {
222
223
  } catch {
223
224
  }
224
225
  }
225
- return [.../* @__PURE__ */ new Set([spec2.brain, ...spec2.worksIn, ...peers])];
226
+ const ops = org.org ? [`${org.org}/${ws.opsName}`] : [];
227
+ return [.../* @__PURE__ */ new Set([spec2.brain, ...ops, ...spec2.worksIn, ...peers])];
226
228
  }
227
229
  function installUrl(slug, targetId, repoIds = []) {
228
230
  const base2 = `https://github.com/apps/${encodeURIComponent(slug)}/installations/new`;
@@ -538,7 +540,14 @@ async function appCommand(argv) {
538
540
  `);
539
541
  return 2;
540
542
  }
541
- const targets = installTargets(ws, org, parseYaml, handle, spec2);
543
+ const targets = installTargets(
544
+ ws,
545
+ org,
546
+ parseYaml,
547
+ handle,
548
+ spec2,
549
+ opts.public ? "public" : "private"
550
+ );
542
551
  const existing = await api(`/apps/${name}`);
543
552
  if (existing.ok) {
544
553
  const install2 = await preselectedInstall(existing.data?.slug ?? name, org.org, targets);
@@ -6480,7 +6489,14 @@ async function portalCommand(argv) {
6480
6489
  res.end(JSON.stringify({ error: `staff.yaml declares no ${payload.scope} app` }));
6481
6490
  return;
6482
6491
  }
6483
- const targets = installTargets(ws, org, parseYaml, entry.handle, spec2);
6492
+ const targets = installTargets(
6493
+ ws,
6494
+ org,
6495
+ parseYaml,
6496
+ entry.handle,
6497
+ spec2,
6498
+ isPublic ? "public" : "private"
6499
+ );
6484
6500
  const existing = await api(`/apps/${name}`);
6485
6501
  if (existing.ok) {
6486
6502
  const install = await preselectedInstall(existing.data?.slug ?? name, org.org, targets);
@@ -6817,7 +6833,7 @@ async function portalCommand(argv) {
6817
6833
  });
6818
6834
  res.writeHead(200, { "content-type": "text/html; charset=utf-8" });
6819
6835
  res.end(
6820
- `<body style="font:15px/1.6 system-ui;max-width:34rem;margin:14vh auto;padding:0 1.4rem"><h1 style="font-size:1.3rem">${app.slug} created</h1><p>Its id and private key went straight into ${pending.brain}'s secrets. The key was never written to disk.</p><p><b>It still has to be installed</b>, and granted every tracker this staff member writes to \u2014 not just their own.</p><p>Close this tab; the portal has the link.</p></body>`
6836
+ `<body style="font:15px/1.6 system-ui;max-width:34rem;margin:14vh auto;padding:0 1.4rem"><h1 style="font-size:1.3rem">${app.slug} created</h1><p>Its keys are saved in ${pending.brain}'s secrets.</p><p><b>Next: install it.</b> Go back to the portal and press Install.</p><p>You can close this tab.</p></body>`
6821
6837
  );
6822
6838
  }).catch((err) => {
6823
6839
  appResults.set(state, { ok: false, error: err.message });
@@ -45,8 +45,9 @@ hand. roster says so if it happens.
45
45
  ## 3. Confirm the App's install
46
46
 
47
47
  **Do:** press **Install it** in the portal, or open the link `roster app` prints. The page opens
48
- with the organisation and the repos this staff member needs already selected: its brain, each
49
- peer's tracker, and the product repos. Check the list and confirm.
48
+ with the organisation and the repos this staff member needs already selected: its brain, the
49
+ ops repo (every run checks it out first), each peer's tracker, and the product repos. Check the
50
+ list and confirm. Choosing **All repositories** instead also works.
50
51
 
51
52
  **Why not automated:** installing is a grant of access to specific repositories, and GitHub asks
52
53
  a person to confirm it. That is correct and should not be worked around.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanocollective/roster",
3
- "version": "0.1.0-alpha.24",
3
+ "version": "0.1.0-alpha.25",
4
4
  "description": "An agent-run org, powered by GitHub. Scaffold AI staff members whose brain is a repo.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -27,8 +27,7 @@ export function appPanel(opts) {
27
27
  }),
28
28
  el("p", {
29
29
  textContent:
30
- "A tab opens, GitHub asks you to confirm, and the App's id and private key go straight " +
31
- "into the repo's secrets. The key is held in memory and never written to disk.",
30
+ "A GitHub tab opens. Confirm there, then come back here to install it.",
32
31
  }),
33
32
  );
34
33