omakit 0.6.8 → 0.6.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.
@@ -2,7 +2,7 @@
2
2
  import { readFileSync } from "node:fs"
3
3
  import { join } from "node:path"
4
4
  import { pathToFileURL } from "node:url"
5
- import { requirePin } from "./pin.mjs"
5
+ import { requirePin, updateLabel as updateLabelOf } from "./pin.mjs"
6
6
  import { token, issue, parseIssueUrl, compareCommits } from "./github.mjs"
7
7
  import { discoverWatchIssues, repositoryFor } from "./watch.mjs"
8
8
  import { repositorySlug } from "./registry.mjs"
@@ -12,8 +12,7 @@ import { submissionContract } from "./form.mjs"
12
12
  export async function reviewPolicy(repoRoot) {
13
13
  const { dir } = requirePin(repoRoot)
14
14
  const policy = await import(pathToFileURL(join(dir, "scripts/security-baseline-policy.mjs")).href)
15
- const approval = readFileSync(join(dir, "scripts/approve-plugin-update.mjs"), "utf8")
16
- const updateLabel = approval.match(/for \(const required of \["([^"]+)"/)?.[1]
15
+ const updateLabel = updateLabelOf(readFileSync(join(dir, "scripts/approve-plugin-update.mjs"), "utf8"))
17
16
  if (!updateLabel) throw new Error("cannot read the update issue label from the pin")
18
17
  const manual = policy.currentSecurityBaselinePolicy.maintainerVerificationOutcome
19
18
  return { automated: policy.securityBaselineOutcome([], []), manual, updateLabel, reviewLabel: `security-${manual}` }
@@ -14,7 +14,7 @@
14
14
  import { resolveSubject, SubjectError } from "../subject/resolve.mjs"
15
15
  import { requirePin } from "./pin.mjs"
16
16
  import { submissionContract, newerCommitChoice, resolveCategory, resolveTags, tagSlug } from "./form.mjs"
17
- import { idUniverse, checkIdentity, listingOf, baselineFigures, figure, liveRegistry, registrySourceDetail, catalogPresentation, defaultPresentation } from "./registry.mjs"
17
+ import { idUniverse, checkIdentity, listingOf, baselineFigures, figure, liveRegistry, registrySourceDetail, catalogBuilderText, catalogPresentation, defaultPresentation } from "./registry.mjs"
18
18
  import { readTree } from "./tree.mjs"
19
19
  import { inspectTree } from "./plugin.mjs"
20
20
  import { findAgentControl, REMEDY as AGENT_CONTROL_REMEDY } from "./agent-control.mjs"
@@ -283,7 +283,7 @@ export async function submitPreflight(options) {
283
283
  error.usage = missing
284
284
  throw error
285
285
  }
286
- const defaults = defaultPresentation(catalogPresentation(pinDir), tree.manifest?.kinds)
286
+ const defaults = defaultPresentation(catalogPresentation(catalogBuilderText(pinDir)), tree.manifest?.kinds)
287
287
  const answers = await options.chooser({ contract, defaults, missing: missing.missing })
288
288
  if (answers?.category) chosenCategory = answers.category
289
289
  if (answers?.tags) chosenTags = answers.tags
@@ -111,26 +111,29 @@ export const COMMANDS = Object.freeze([
111
111
  },
112
112
  {
113
113
  signature: [
114
- "omakit lab prove <suite> [--runs <n>] [--json] [--out <file>]",
115
- "omakit lab inspect [--verify] [--json] [--out <file>]",
114
+ "omakit lab prove <suite> [--runs <n>] [--offline] [--json] [--out <file>]",
115
+ "omakit lab inspect [--verify] [--offline] [--json] [--out <file>]",
116
116
  "omakit lab setup [--from <file>] [--toolchain <dir>] [--plugins] [--yes]",
117
117
  "omakit lab prune [--keep-iso] [--records] [--yes] [--json]",
118
118
  ],
119
119
  lines: [
120
- "Prove a suite in a disposable Omarchy guest, never on the desktop: the",
121
- "pinned 4.0.3 release booted from an immutable verified base, a fresh",
122
- "overlay per run, the guest's installed omarchy package read and printed",
123
- "before the suite, the document written with that identity. `prove` boots",
124
- "nothing until the base, the host and the suite's files are there, and",
125
- "names what is missing, what it takes, and the one command; it fetches",
126
- "nothing. `inspect` is read-only: the pinned release, its exact size,",
127
- "digest and signer, what is on disk and verified, what the host lacks.",
128
- "`setup` is the only path that fetches bytes: one consent naming the",
129
- "exact size and destination (--yes for an agent), a resumable GET of",
130
- "the pinned URL or a copy of --from, verified against the pinned SHA-256",
131
- "and the Omarchy signature before anything boots it, then one base built",
132
- "by the pinned omarchy-iso toolchain, whose checkout --toolchain records",
133
- "and which setup never fetches. `prune` frees the lab cache and says how",
120
+ "Prove a suite in a disposable Omarchy guest, never on the desktop: an",
121
+ "Omarchy release booted from an immutable verified base, a fresh overlay",
122
+ "per run, the guest's installed omarchy package read and printed before",
123
+ "the suite, the document written with that identity. Every action but",
124
+ "prune reads Omarchy's release list and says when a newer release is out",
125
+ "(--offline skips it). `prove` boots nothing until the base, the host",
126
+ "and the suite's files are there, and names what is missing, what it",
127
+ "takes, and the one command; it runs the base there, behind or not.",
128
+ "`inspect` writes nothing: the newest release, its size, digest and",
129
+ "signer, what is on disk and verified, what the host lacks. `setup` is",
130
+ "the only path that fetches bytes: it prepares the newest release, with",
131
+ "one consent naming the exact size and destination (--yes for an agent),",
132
+ "a resumable GET or a copy of --from, verified against the published",
133
+ "SHA-256 and the Omarchy signature omakit ships before anything boots it,",
134
+ "then one base built by the pinned omarchy-iso toolchain, whose checkout",
135
+ "--toolchain records and which setup never fetches; the old base stays",
136
+ "until the new one verifies. `prune` frees the lab cache and says how",
134
137
  "much. docs/LAB.md is the contract. Suites: run, store, weigh,",
135
138
  "weigh-evidence.",
136
139
  ],
@@ -21,7 +21,7 @@
21
21
  import { join } from "node:path"
22
22
  import { pathToFileURL } from "node:url"
23
23
  import { readFileSync } from "node:fs"
24
- import { MARKETPLACE_PIN, requirePin } from "./pin.mjs"
24
+ import { MARKETPLACE_PIN, requirePin, validatedLabel } from "./pin.mjs"
25
25
  import { authenticatedUser, repositoryIssues, defaultBranchHead, issue, issueComments, parseIssueUrl, token, GitHubError } from "./github.mjs"
26
26
  import { liveRegistry } from "./registry.mjs"
27
27
  import { reviewPolicy, validatedDocumentationDiff } from "./review-cost.mjs"
@@ -266,8 +266,7 @@ export function validationComment(comments, feedback = []) {
266
266
  */
267
267
  export async function marketplaceLabels(pinDir) {
268
268
  const policy = await import(pathToFileURL(join(pinDir, "scripts/security-baseline-policy.mjs")).href)
269
- const approval = readFileSync(join(pinDir, "scripts/approve-submission.mjs"), "utf8")
270
- const validated = approval.match(/for \(const required of \["submission", "([^"]+)"/)?.[1]
269
+ const validated = validatedLabel(readFileSync(join(pinDir, "scripts/approve-submission.mjs"), "utf8"))
271
270
  if (!validated) throw new Error("cannot read the validated label from the pin")
272
271
  const manual = policy.currentSecurityBaselinePolicy.maintainerVerificationOutcome
273
272
  return { blocking: [...policy.securityBaselineBlockingLabels], validated, reviewRequired: `security-${manual}` }