Skip to content

The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.

feat(store): list or unlist a package with one flag; unlist 18 Jev demos (#122)

Dee7807cce2fe2c
diff --git a/cli/scripts/lib/dshRegistry.mjs b/cli/scripts/lib/dshRegistry.mjs
index 6464c0828..b45f38d3c 100644
--- a/cli/scripts/lib/dshRegistry.mjs
+++ b/cli/scripts/lib/dshRegistry.mjs
@@ -35,6 +35,9 @@ function readStoreDir(storeDir, strict) {
if (strict && (manifest.spec !== 1 || manifest.id !== `autonomous/${name}` || (manifest.kind ?? 'agent') !== (plural === 'agents' ? 'agent' : 'viewer'))) throw new Error(`Invalid package identity: ${dir}`)
let facts = {}
try { facts = JSON.parse(readFileSync(join(dir, 'store.json'), 'utf8')) } catch (error) { if (strict) throw error; facts = {} }
+ // `"listed": false` unlists a package: its code stays in the repo, checked like any other, and it
+ // is left out of the registry and the published catalog. Delete the flag to list it again.
+ if (facts.listed === false) continue
out.push(storeEntry(`store/${plural}/${name}`, manifest, facts))
}
}
diff --git a/cli/src/dsh/registry.spec.ts b/cli/src/dsh/registry.spec.ts
index eeabc25f6..4ba06ac33 100644
--- a/cli/src/dsh/registry.spec.ts
+++ b/cli/src/dsh/registry.spec.ts
@@ -15,7 +15,7 @@ import {
// @ts-expect-error — plain ESM with no declaration file, imported to hold the build to the runtime
const build = await import('../../scripts/lib/dshRegistry.mjs') as {
storeEntry: typeof storeEntry
- readDshRegistry: (storeDir: string | URL) => unknown[]
+ readDshRegistry: (storeDir: string | URL, options?: { strict?: boolean }) => unknown[]
}
const write = (path: string, body: string): void => {
@@ -101,6 +101,24 @@ describe('reading a store tree', () => {
expect(readStoreDir(join(store, 'missing'))).toEqual([])
})
+ it('`"listed": false` in store.json takes a package off the shelf and keeps its folder: runtime and build agree', () => {
+ write(join(store, 'agents', 'shelved', 'harness.json'), JSON.stringify({ spec: 1, id: 'autonomous/shelved', name: 'Shelved', engine: 'claude' }))
+ write(join(store, 'agents', 'shelved', 'store.json'), JSON.stringify({ license: 'MIT', listed: false }))
+ write(join(store, 'agents', 'said-so', 'harness.json'), JSON.stringify({ spec: 1, id: 'autonomous/said-so', name: 'Said so', engine: 'claude' }))
+ write(join(store, 'agents', 'said-so', 'store.json'), JSON.stringify({ listed: true }))
+ // The publishing build reads strictly: an unlisted package is still left out, not refused.
+ expect((build.readDshRegistry(store, { strict: true }) as Array<{ id: string }>).map((entry) => entry.id)).toEqual(['autonomous/said-so'])
+ fixture()
+ const ids = (readStoreDir(store) as Array<Record<string, unknown>>).map((entry) => entry.id)
+ expect(ids).toContain('autonomous/said-so')
+ expect(ids).not.toContain('autonomous/shelved')
+ // The flag is the store's business, not a fact of the entry.
+ expect((readStoreDir(store) as Array<Record<string, unknown>>).find((entry) => entry.id === 'autonomous/said-so')).not.toHaveProperty('listed')
+ expect((build.readDshRegistry(store) as Array<{ id: string }>).map((entry) => entry.id)).toEqual([...ids, 'acme/thing'])
+ expect(StoreFactsSchema.parse({ listed: false })).toEqual({ listed: false })
+ expect(StoreFactsSchema.safeParse({ listed: 'no' }).success).toBe(false)
+ })
+
it('reads the outside entries, skipping stray files, links to nothing and malformed JSON', () => {
fixture()
write(join(store, 'registry', 'acme', 'broken.json'), '{nope')
diff --git a/cli/src/dsh/registry.ts b/cli/src/dsh/registry.ts
index 07a531e9a..d4622ad97 100644
--- a/cli/src/dsh/registry.ts
+++ b/cli/src/dsh/registry.ts
@@ -91,6 +91,11 @@ export const StoreFactsSchema = z.strictObject({
tagline: z.string().min(1).max(80).optional(),
screenshots: z.array(z.string().url().max(2048)).max(8).optional(),
examples: z.array(StoreExampleSchema.strict()).max(8).optional(),
+ /**
+ * `false` unlists the package: the folder and its code stay in the repo and keep passing every
+ * check, and the package is left out of the registry and the published catalog. Absent means listed.
+ */
+ listed: z.boolean().optional(),
})
export type StoreFacts = z.infer<typeof StoreFactsSchema>
@@ -119,7 +124,7 @@ export function storeEntry(path: string, manifest: Record<string, unknown>, fact
return entry
}
-/** Every `store/<agents|viewers>/<name>` folder with a manifest, as registry entries. */
+/** Every listed `store/<agents|viewers>/<name>` folder with a manifest, as registry entries. */
export function readStoreDir(storeDir: string): unknown[] {
const out: unknown[] = []
for (const [plural] of STORE_KINDS) {
@@ -131,6 +136,9 @@ export function readStoreDir(storeDir: string): unknown[] {
try { manifest = JSON.parse(readFileSync(join(dir, 'harness.json'), 'utf8')) as Record<string, unknown> } catch { continue }
let facts: Record<string, unknown> = {}
try { facts = JSON.parse(readFileSync(join(dir, 'store.json'), 'utf8')) as Record<string, unknown> } catch { facts = {} }
+ // `"listed": false` unlists a package: its code stays in the repo, checked like any other, and it
+ // is left out of the registry and the published catalog. Delete the flag to list it again.
+ if (facts.listed === false) continue
out.push(storeEntry(`store/${plural}/${name}`, manifest, facts))
}
}
diff --git a/cli/src/dsh/store.spec.ts b/cli/src/dsh/store.spec.ts
index eeb9f1599..1978561c3 100644
--- a/cli/src/dsh/store.spec.ts
+++ b/cli/src/dsh/store.spec.ts
@@ -17,13 +17,18 @@ import { resolveInstallSource } from './install.js'
const ROOT = fileURLToPath(new URL('../../../', import.meta.url))
const STORE = join(ROOT, 'store')
-function storeFolders(): { folder: string; kind: 'agent' | 'viewer'; name: string; dir: string }[] {
- const out: { folder: string; kind: 'agent' | 'viewer'; name: string; dir: string }[] = []
+/** `"listed": false` in store.json keeps a package's code in the repo and takes it off the shelf. */
+function isListed(dir: string): boolean {
+ try { return (JSON.parse(readFileSync(join(dir, 'store.json'), 'utf8')) as { listed?: unknown }).listed !== false } catch { return true }
+}
+
+function storeFolders(): { folder: string; kind: 'agent' | 'viewer'; name: string; dir: string; listed: boolean }[] {
+ const out: { folder: string; kind: 'agent' | 'viewer'; name: string; dir: string; listed: boolean }[] = []
for (const [plural, kind] of STORE_KINDS) {
const base = join(STORE, plural)
for (const name of readdirSync(base).sort()) {
const dir = join(base, name)
- if (statSync(dir).isDirectory()) out.push({ folder: `store/${plural}/${name}`, kind, name, dir })
+ if (statSync(dir).isDirectory()) out.push({ folder: `store/${plural}/${name}`, kind, name, dir, listed: isListed(dir) })
}
}
return out
@@ -34,15 +39,18 @@ describe('the built-in shelf (store/)', () => {
const registry = bundledDshRegistry()
const folders = storeFolders()
- it('has agents and viewers, and every folder is in the registry exactly once', () => {
+ it('has agents and viewers, and every listed folder is in the registry exactly once', () => {
expect(folders.filter((f) => f.kind === 'agent').length).toBeGreaterThan(0)
expect(folders.filter((f) => f.kind === 'viewer').length).toBeGreaterThan(0)
const ids = registry.map((entry) => entry.id)
expect(new Set(ids).size).toBe(ids.length)
- for (const { name } of folders) expect(ids, name).toContain(`autonomous/${name}`)
+ for (const { name, listed } of folders) {
+ if (listed) expect(ids, name).toContain(`autonomous/${name}`)
+ else expect(ids, `${name} is unlisted`).not.toContain(`autonomous/${name}`)
+ }
})
- for (const { folder, kind, name, dir } of folders) {
+ for (const { folder, kind, name, dir, listed } of folders) {
describe(folder, () => {
const read = readDshManifest(dir)
@@ -70,8 +78,9 @@ describe('the built-in shelf (store/)', () => {
expect(readFileSync(join(dir, 'README.md'), 'utf8')).toMatch(/Credit and stewardship/)
})
- it('is listed from this folder, saying what the manifest says', () => {
+ it(listed ? 'is listed from this folder, saying what the manifest says' : 'is unlisted: kept in the repo, absent from the registry', () => {
if (!read.ok) return
+ if (!listed) { expect(registry.find((row) => row.id === read.manifest.id)).toBeUndefined(); return }
const entry = registry.find((row) => row.id === read.manifest.id)!
const m = read.manifest
expect(entry).toMatchObject({ repo: HARNESS_MONOREPO, ref: 'main', path: folder, verified: true, tier: dshTier(m) })
diff --git a/store/README.md b/store/README.md
index 87fccbf78..02cd46254 100644
--- a/store/README.md
+++ b/store/README.md
@@ -260,6 +260,28 @@ HARNESS_STORE_REF=my-branch harness start # the shelf from a
A package that outgrows its folder, or whose upstream maintainers want it, moves to a repository of
its own and gets an entry in `registry/` instead. Nothing changes for the people who installed it.
+### Unlisting a package
+
+A package that is not ready for people, or no longer meets the bar, is unlisted, not deleted. One
+flag in its `store.json` does it:
+
+```json
+{ "tagline": "…", "listed": false }
+```
+
+```sh
+node store/tools/listing.mjs # every package, listed or UNLISTED
+node store/tools/listing.mjs unlist jev-pong # take it off the shelf
+node store/tools/listing.mjs list jev-pong # put it back (the flag is removed)
+```
+
+An unlisted package keeps its folder, its history and its tests, and the rules above still hold for
+it, so it does not rot. It is left out of the registry the CLI bakes in and of the catalog the Store
+publishes, so nobody is offered it and `harness dsh install autonomous/<name>` no longer finds it.
+Someone who already installed it keeps their copy. It still installs from a working tree with
+`harness dsh install "$PWD/store/agents/<name>" --link`. The change goes live like any other: merge
+to `main` and the catalog is published again.
+
## The store in the app
The app's start page has a door to the store: every harness as a card, and a page per harness — its
diff --git a/store/agents/jev-archer/store.json b/store/agents/jev-archer/store.json
index 55a16ba6e..c185698b8 100644
--- a/store/agents/jev-archer/store.json
+++ b/store/agents/jev-archer/store.json
@@ -9,5 +9,6 @@
"image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-archer/range-at-dusk.jpg",
"caption": "Jev's Day on the Range — a fast decision model tracking the sliding target and planting the bullseye on each shot"
}
- ]
+ ],
+ "listed": false
}
diff --git a/store/agents/jev-arena/store.json b/store/agents/jev-arena/store.json
index 255f005be..ea49cc4ec 100644
--- a/store/agents/jev-arena/store.json
+++ b/store/agents/jev-arena/store.json
@@ -9,5 +9,6 @@
"image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-arena/grid-world.jpg",
"caption": "The Vault Heist · a tight maze where Jev's probability bars visibly shift at each turn"
}
- ]
+ ],
+ "listed": false
}
diff --git a/store/agents/jev-blocks/store.json b/store/agents/jev-blocks/store.json
index f61f735c4..960b0411b 100644
--- a/store/agents/jev-blocks/store.json
+++ b/store/agents/jev-blocks/store.json
@@ -13,5 +13,6 @@
"prompt": "Draw a custom starting board in blocks.json that is one I piece away from clearing four lines, keep gravity low, and tell Jev to go for four. Report whether it takes the four-line clear.",
"caption": "A hand-drawn board to test whether Jev sees the four-line clear"
}
- ]
+ ],
+ "listed": false
}
diff --git a/store/agents/jev-browser/store.json b/store/agents/jev-browser/store.json
index a21de69f2..30f751d29 100644
--- a/store/agents/jev-browser/store.json
+++ b/store/agents/jev-browser/store.json
@@ -14,5 +14,6 @@
"image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-browser/pick-the-flight.jpg",
"caption": "Step mode: the page text Jev reads on the right, its chosen element ringed on the page"
}
- ]
+ ],
+ "listed": false
}
diff --git a/store/agents/jev-catcher/store.json b/store/agents/jev-catcher/store.json
index 1abc6530e..512212a24 100644
--- a/store/agents/jev-catcher/store.json
+++ b/store/agents/jev-catcher/store.json
@@ -9,5 +9,6 @@
"image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-catcher/ballpark.jpg",
"caption": "Jev's Day at the Field — a fast decision model sliding the glove to catch every pop fly on each tick"
}
- ]
+ ],
+ "listed": false
}
diff --git a/store/agents/jev-compactor/store.json b/store/agents/jev-compactor/store.json
index 738cf520f..9171df3aa 100644
--- a/store/agents/jev-compactor/store.json
+++ b/store/agents/jev-compactor/store.json
@@ -14,5 +14,6 @@
"image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-compactor/own-transcript.jpg",
"caption": "Your own transcript: what Jev would cut, and how much it would save"
}
- ]
+ ],
+ "listed": false
}
diff --git a/store/agents/jev-conductor/store.json b/store/agents/jev-conductor/store.json
index 292fafed2..fa53cee79 100644
--- a/store/agents/jev-conductor/store.json
+++ b/store/agents/jev-conductor/store.json
@@ -10,5 +10,6 @@
"image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-conductor/piano-roll.jpg",
"caption": "Jev in Blue — a slow, moody jazz improvisation"
}
- ]
+ ],
+ "listed": false
}
diff --git a/store/agents/jev-duel/store.json b/store/agents/jev-duel/store.json
index 9bb89d5fa..3abb1c2af 100644
--- a/store/agents/jev-duel/store.json
+++ b/store/agents/jev-duel/store.json
@@ -10,5 +10,6 @@
"image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-duel/reversi-war.jpg",
"caption": "The Quiet War — patience vs greed on a 6x6 board"
}
- ]
+ ],
+ "listed": false
}
diff --git a/store/agents/jev-firehose/store.json b/store/agents/jev-firehose/store.json
index c729ba037..f2ca1722a 100644
--- a/store/agents/jev-firehose/store.json
+++ b/store/agents/jev-firehose/store.json
@@ -18,5 +18,6 @@
"image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-firehose/your-own-messages.jpg",
"caption": "Your own messages: triaged once, handed back as triage.csv"
}
- ]
+ ],
+ "listed": false
}
diff --git a/store/agents/jev-fps/store.json b/store/agents/jev-fps/store.json
index 89ccd5331..1cccc2eeb 100644
--- a/store/agents/jev-fps/store.json
+++ b/store/agents/jev-fps/store.json
@@ -14,5 +14,6 @@
"image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-fps/pillar-hall.jpg",
"caption": "A stress test for a decision model: more demons, more speed, the same nine decisions a second"
}
- ]
+ ],
+ "listed": false
}
diff --git a/store/agents/jev-guard/store.json b/store/agents/jev-guard/store.json
index 7c73c4bf8..cc5cc4e24 100644
--- a/store/agents/jev-guard/store.json
+++ b/store/agents/jev-guard/store.json
@@ -10,5 +10,6 @@
"image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-guard/review-console.jpg",
"caption": "Ship it green — Jev guarding your fix, run by run"
}
- ]
+ ],
+ "listed": false
}
diff --git a/store/agents/jev-lander/store.json b/store/agents/jev-lander/store.json
index ad1e72087..641de595d 100644
--- a/store/agents/jev-lander/store.json
+++ b/store/agents/jev-lander/store.json
@@ -9,5 +9,6 @@
"image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-lander/soft-landing.jpg",
"caption": "Jev's Landing — a fast decision model flying a booster down to a soft touchdown on every tick"
}
- ]
+ ],
+ "listed": false
}
diff --git a/store/agents/jev-launcher/store.json b/store/agents/jev-launcher/store.json
index 12fd77bee..7c31608bd 100644
--- a/store/agents/jev-launcher/store.json
+++ b/store/agents/jev-launcher/store.json
@@ -9,5 +9,6 @@
"image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-launcher/ranked-as-you-type.jpg",
"caption": "Jev's Palette — a fast decision model ranking launch targets live, per keystroke"
}
- ]
+ ],
+ "listed": false
}
diff --git a/store/agents/jev-pendulum/store.json b/store/agents/jev-pendulum/store.json
index 439e0597d..e5611fe6e 100644
--- a/store/agents/jev-pendulum/store.json
+++ b/store/agents/jev-pendulum/store.json
@@ -9,5 +9,6 @@
"image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-pendulum/balancing-rig.jpg",
"caption": "Jev's Balancing Act — a fast decision model keeping a rod upright, and losing it at high gravity"
}
- ]
+ ],
+ "listed": false
}
diff --git a/store/agents/jev-pong/store.json b/store/agents/jev-pong/store.json
index 54c7ae06d..f344cad20 100644
--- a/store/agents/jev-pong/store.json
+++ b/store/agents/jev-pong/store.json
@@ -9,5 +9,6 @@
"image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-pong/neon-rally.jpg",
"caption": "Jev's Rally — a fast decision model chasing a ball that speeds up with every return"
}
- ]
+ ],
+ "listed": false
}
diff --git a/store/agents/jev-shopper/store.json b/store/agents/jev-shopper/store.json
index a0ea3e9b2..7c779c6de 100644
--- a/store/agents/jev-shopper/store.json
+++ b/store/agents/jev-shopper/store.json
@@ -9,5 +9,6 @@
"image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-shopper/price-board.jpg",
"caption": "Jev's Shop — a fast decision model calling the best buy on every live price tick"
}
- ]
+ ],
+ "listed": false
}
diff --git a/store/agents/jev-slalom/store.json b/store/agents/jev-slalom/store.json
index de7a9636b..323131169 100644
--- a/store/agents/jev-slalom/store.json
+++ b/store/agents/jev-slalom/store.json
@@ -9,5 +9,6 @@
"image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-slalom/slope.jpg",
"caption": "Jev's Run — a fast decision model carving a slalom line and threading each gate on every tick"
}
- ]
+ ],
+ "listed": false
}
diff --git a/store/agents/jev-trader/store.json b/store/agents/jev-trader/store.json
index 2c539c5b4..6d1ae6b9f 100644
--- a/store/agents/jev-trader/store.json
+++ b/store/agents/jev-trader/store.json
@@ -9,5 +9,6 @@
"image": "https://raw.githubusercontent.com/autonomous-ai/openharness/main/store/showcase/jev-trader/paper-desk.jpg",
"caption": "Jev's Desk — a decision model trading a synthetic market, tick by tick"
}
- ]
+ ],
+ "listed": false
}
diff --git a/store/tools/jev-kit/check-store-facts.mjs b/store/tools/jev-kit/check-store-facts.mjs
index c7984347a..4791e4518 100644
--- a/store/tools/jev-kit/check-store-facts.mjs
+++ b/store/tools/jev-kit/check-store-facts.mjs
@@ -24,7 +24,7 @@ for (const name of names.sort()) {
need(typeof m.description === 'string' && m.description.length <= 300, `harness.json description is ${m.description?.length} chars (max 300)`)
need(typeof m.category === 'string' && m.category.length <= 24, 'harness.json category must be <= 24 chars')
const f = JSON.parse(readFileSync(join(dir, 'store.json'), 'utf8'))
- const allowed = ['homepage', 'upstream', 'license', 'tagline', 'screenshots', 'examples']
+ const allowed = ['homepage', 'upstream', 'license', 'tagline', 'screenshots', 'examples', 'listed']
for (const k of Object.keys(f)) need(allowed.includes(k), `store.json has an unknown key "${k}"`)
for (const k of ['homepage', 'upstream']) if (f[k] !== undefined) need(isUrl(f[k]), `store.json ${k} must be a URL`)
need(f.tagline === undefined || (f.tagline.length >= 1 && f.tagline.length <= 80), `store.json tagline is ${f.tagline?.length} chars (max 80)`)
diff --git a/store/tools/listing.mjs b/store/tools/listing.mjs
new file mode 100644
index 000000000..faea510ee
--- /dev/null
+++ b/store/tools/listing.mjs
@@ -0,0 +1,65 @@
+#!/usr/bin/env node
+// List or unlist a built-in package without touching its code.
+//
+// node store/tools/listing.mjs show every package and whether it is listed
+// node store/tools/listing.mjs unlist <name> ... take packages off the shelf ("listed": false in store.json)
+// node store/tools/listing.mjs list <name> ... put them back (the flag is removed)
+//
+// An unlisted package keeps its folder under store/ and keeps passing every check. It is left out
+// of the registry the CLI bakes in and of the catalog the Store publishes, so nobody is offered it.
+// The change goes live the usual way: merge to main and the catalog is published again.
+import { existsSync, readdirSync, readFileSync, statSync, writeFileSync } from 'node:fs'
+import { dirname, join } from 'node:path'
+import { fileURLToPath } from 'node:url'
+
+const STORE = dirname(dirname(fileURLToPath(import.meta.url)))
+
+export function packages(store = STORE) {
+ const out = []
+ for (const plural of ['agents', 'viewers']) {
+ let names = []
+ try { names = readdirSync(join(store, plural)).sort() } catch { continue }
+ for (const name of names) {
+ const dir = join(store, plural, name)
+ if (name.startsWith('.') || !statSync(dir).isDirectory() || !existsSync(join(dir, 'harness.json'))) continue
+ let facts = {}
+ try { facts = JSON.parse(readFileSync(join(dir, 'store.json'), 'utf8')) } catch { /* no facts yet */ }
+ out.push({ name, plural, dir, listed: facts.listed !== false })
+ }
+ }
+ return out
+}
+
+/** Set or clear the flag on one package. Returns 'changed', 'same' or 'missing'. */
+export function setListed(name, listed, store = STORE) {
+ const pkg = packages(store).find((p) => p.name === name)
+ if (!pkg) return 'missing'
+ if (pkg.listed === listed) return 'same'
+ const file = join(pkg.dir, 'store.json')
+ let facts = {}
+ try { facts = JSON.parse(readFileSync(file, 'utf8')) } catch { /* a package with no facts yet gets a file */ }
+ if (listed) delete facts.listed
+ else facts.listed = false
+ writeFileSync(file, JSON.stringify(facts, null, 2) + '\n')
+ return 'changed'
+}
+
+if (process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1]) {
+ const [verb, ...names] = process.argv.slice(2)
+ if (!verb) {
+ const all = packages()
+ for (const p of all) console.log(`${p.listed ? 'listed ' : 'UNLISTED'} ${p.plural}/${p.name}`)
+ console.log(`${all.filter((p) => p.listed).length} listed, ${all.filter((p) => !p.listed).length} unlisted`)
+ } else if ((verb === 'list' || verb === 'unlist') && names.length) {
+ let bad = 0
+ for (const name of names) {
+ const got = setListed(name, verb === 'list')
+ if (got === 'missing') bad++
+ console.log(`${got === 'missing' ? 'no such package' : got === 'same' ? `already ${verb}ed` : `${verb}ed`} ${name}`)
+ }
+ process.exit(bad ? 1 : 0)
+ } else {
+ console.error('usage: node store/tools/listing.mjs [list|unlist <name> ...]')
+ process.exit(2)
+ }
+}