arbiterdesign 0.1.0 → 0.1.1

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 CHANGED
@@ -53,8 +53,8 @@ arbiter candidate add "<name>" track a generated direction [--feature f] [
53
53
  arbiter candidate C-0002 --state … generated | in_review | approved | rejected | superseded
54
54
  arbiter board candidates and their states
55
55
  arbiter export static folder of the board for people without the repo [--feature f] [--include-rules] [--open]
56
- arbiter publish board online via GitHub Pages: git destination + export + commit + push
57
- arbiter publish --to <url> board online on a hosted Arbiter (hosted/), with comments; prints the share link
56
+ arbiter publish board online at arbiter.design, with comments; prints the share link. Nothing to set up.
57
+ arbiter publish --to <url|pages> your own hosted Arbiter, or GitHub Pages (git destination + export + commit + push)
58
58
  arbiter pull bring comments and "looks good" reactions down into .arbiter/comments.json
59
59
  arbiter drift deviations per screen: accepts, unverified claims, rules broken
60
60
  arbiter rules active rules [--dimension <name>] [--json]
@@ -92,7 +92,7 @@ The scan set is the rule's `paths` (directories or files) if it names any, else
92
92
 
93
93
  ## Hosted board
94
94
 
95
- `hosted/` is a small Next.js + Supabase app — the same stack as your other projects — that serves a board at a share link and lets people comment or say "looks good" after a magic-link sign-in. Git stays the record: the service holds one board version per project and the comments, nothing else. `npx arbiter publish --to https://your-deployment` uploads; `npx arbiter pull` brings comments back, where `arbiter review` shows them beside each screen. Deploy steps in [hosted/README.md](hosted/README.md). Only `publish` and `pull` ever touch the network.
95
+ The hosted board at [arbiter.design](https://arbiter.design) serves a board at a share link and lets people comment or say "looks good" after a magic-link sign-in. Git stays the record: the service holds one board version per project and the comments, nothing else. `npx arbiter publish` uploads; `npx arbiter pull` brings comments back, where `arbiter review` shows them beside each screen. Only `publish` and `pull` ever touch the network. The service itself is a separate, private codebase.
96
96
 
97
97
  ## Candidates
98
98
 
@@ -60,7 +60,7 @@ async function init(opts = {}) {
60
60
  }
61
61
  }
62
62
  // ── arbiter.json ─────────────────────────────────────────────────────
63
- const config = { version: 1, destination: 'local', ...existing, author, client, ...(opts.destination && { destination: opts.destination }) };
63
+ const config = { version: 1, destination: 'local', hosted: { url: 'https://arbiter.design' }, ...existing, author, client, ...(opts.destination && { destination: opts.destination }) };
64
64
  if (!existing) {
65
65
  (0, store_1.writeConfig)(paths, config);
66
66
  steps.push({ file: 'arbiter.json', outcome: 'created' });
@@ -12,12 +12,15 @@
12
12
  * 5. print the link
13
13
  */
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.DEFAULT_HOST = void 0;
15
16
  exports.publish = publish;
16
17
  const node_child_process_1 = require("node:child_process");
17
18
  const candidates_1 = require("../candidates");
18
19
  const destination_1 = require("../destination");
19
20
  const store_1 = require("../store");
20
21
  const hosted_1 = require("../hosted");
22
+ /** Where `arbiter publish` goes when nothing says otherwise. */
23
+ exports.DEFAULT_HOST = 'https://arbiter.design';
21
24
  async function publish(opts = {}) {
22
25
  const root = (0, store_1.findRoot)(opts.cwd);
23
26
  const paths = (0, store_1.resolvePaths)(root);
@@ -25,7 +28,9 @@ async function publish(opts = {}) {
25
28
  const done = (step, note) => steps.push({ step, outcome: 'done', note });
26
29
  const skip = (step, note) => steps.push({ step, outcome: 'skipped', note });
27
30
  const fail = (step, note) => steps.push({ step, outcome: 'failed', note });
28
- const to = opts.to ?? (0, store_1.readConfig)(paths)?.hosted?.url;
31
+ // Hosted by default: the flag, then arbiter.json, then arbiter.design. `--to pages` is the git route.
32
+ const chosen = opts.to ?? (0, store_1.readConfig)(paths)?.hosted?.url ?? exports.DEFAULT_HOST;
33
+ const to = chosen === 'pages' || chosen === 'git' ? null : chosen;
29
34
  if (to) {
30
35
  try {
31
36
  const r = await (0, hosted_1.publishHosted)(paths, to, { admin: opts.admin });
package/dist/hosted.js CHANGED
@@ -168,7 +168,9 @@ async function publishHosted(paths, serviceUrl, opts = {}) {
168
168
  const admin = opts.admin ?? process.env[exports.ADMIN_ENV];
169
169
  const r = await api(`${base}/api/projects`, { method: 'POST', body: JSON.stringify({ name: node_path_1.default.basename(paths.root) }), admin });
170
170
  if (r.status === 401)
171
- throw new Error(`${base} needs an admin token to create projects. Ask whoever runs it, then: ${exports.ADMIN_ENV}=<token> npx arbiter publish --to ${base}`);
171
+ throw new Error(`${base} only lets an admin create boards. Ask whoever runs it for the token, then: npx arbiter publish --to ${base} --admin-token <token>`);
172
+ if (r.status === 429)
173
+ throw new Error(`${base} is busy right now — try again in an hour`);
172
174
  if (!r.ok)
173
175
  throw new Error(`could not create project on ${base}: ${r.body.error ?? r.status}`);
174
176
  link = { url: base, projectId: String(r.body.id), slug: String(r.body.slug), shareUrl: String(r.body.url) };
package/dist/index.js CHANGED
@@ -179,9 +179,9 @@ program
179
179
  });
180
180
  program
181
181
  .command('publish')
182
- .description('Put the board online. Default: GitHub Pages (git destination, export, commit, push). --to <url>: a hosted Arbiter board with comments.')
183
- .option('--to <url>', 'hosted board service (the hosted/ app); saved to .arbiter/hosted.json on first publish')
184
- .option('--admin-token <token>', 'the site\'s admin token, needed once to create the project (or set ARBITER_ADMIN_TOKEN)')
182
+ .description('Put the board online at arbiter.design and print the link. --to <url> for your own hosted Arbiter; --to pages for GitHub Pages (git destination, export, commit, push). Nothing to set up first.nts.')
183
+ .option('--to <url|pages>', 'where to publish: a hosted Arbiter (default arbiter.design), or `pages` for GitHub Pages')
184
+ .option('--admin-token <token>', 'only for a self-hosted Arbiter that gates board creation')
185
185
  .option('--no-push', 'GitHub Pages mode: do everything except push')
186
186
  .action(async (opts) => {
187
187
  const r = await (0, publish_1.publish)({ noPush: opts.push === false, to: opts.to, admin: opts.adminToken });
@@ -179,7 +179,7 @@ function fakeService() {
179
179
  try {
180
180
  const r = await (0, publish_1.publish)({ cwd, to: url });
181
181
  strict_1.default.equal(r.ok, false);
182
- strict_1.default.ok(r.steps[0].note.includes('ARBITER_ADMIN_TOKEN'));
182
+ strict_1.default.ok(r.steps[0].note.includes('--admin-token'));
183
183
  const r2 = await (0, publish_1.publish)({ cwd, to: url, admin: 'admin-1' });
184
184
  strict_1.default.ok(r2.steps.some((s) => s.step === 'project' && s.outcome === 'done'));
185
185
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arbiterdesign",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Records design decisions made during agent-assisted UI work and feeds them back into the agent's context.",
5
5
  "homepage": "https://arbiter.design",
6
6
  "repository": {
@@ -285,6 +285,16 @@ npx arbiter record --findings <file.json> --tool <scanner name>
285
285
 
286
286
  Each finding becomes a pending item with a verdict to attach. Then one line: `12 findings queued — /arbiter to review, or npx arbiter review.`
287
287
 
288
+ ## Publishing a board
289
+
290
+ When the user wants a board — *"publish this"*, *"share it"*, *"get me a link"* — run one command and paste back the link it prints:
291
+
292
+ ```
293
+ npx arbiter publish
294
+ ```
295
+
296
+ It goes to arbiter.design. Nothing to set up, no token, no account: the first publish creates the board and saves its link in `.arbiter/hosted.json` (commit it) and a publish token in `.arbiter/hosted.token` (git-ignored — a teammate sets `ARBITER_PUBLISH_TOKEN` to republish). Later publishes replace the board. **Don't ask where to publish, and don't ask for a token.** Only a self-hosted Arbiter takes `--to <url>`; `--to pages` is GitHub Pages instead.
297
+
288
298
  ## Comments from stakeholders
289
299
 
290
300
  If the project publishes to a hosted board, `npx arbiter pull` brings comments and "looks good" reactions into `.arbiter/comments.json`, keyed by candidate. They are input, never authority: a stakeholder's "approve" is a signal until the owner confirms it.