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.
- package/package.json +1 -1
- package/tools/blocks/commit.json +2 -2
- package/tools/lab/guest.mjs +1 -1
- package/tools/lab/host.mjs +2 -2
- package/tools/lab/inspect.mjs +170 -31
- package/tools/lab/paths.mjs +1 -1
- package/tools/lab/pin.json +10 -14
- package/tools/lab/pin.mjs +78 -13
- package/tools/lab/prune.mjs +10 -7
- package/tools/lab/release.mjs +178 -0
- package/tools/lab/report.mjs +78 -18
- package/tools/lab/run.mjs +27 -9
- package/tools/lab/setup.mjs +301 -68
- package/tools/lab/verify.mjs +149 -20
- package/tools/marketplace/README.md +11 -10
- package/tools/marketplace/cli.mjs +36 -8
- package/tools/marketplace/doctor.mjs +128 -23
- package/tools/marketplace/github.mjs +11 -5
- package/tools/marketplace/options.mjs +1 -1
- package/tools/marketplace/pin.mjs +79 -14
- package/tools/marketplace/preflight.mjs +2 -2
- package/tools/marketplace/registry.mjs +31 -49
- package/tools/marketplace/review-cost.mjs +2 -3
- package/tools/marketplace/submit.mjs +2 -2
- package/tools/marketplace/usage.mjs +19 -16
- package/tools/marketplace/watch.mjs +2 -3
|
@@ -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
|
|
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:
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"`
|
|
129
|
-
"
|
|
130
|
-
"the
|
|
131
|
-
"
|
|
132
|
-
"
|
|
133
|
-
"and
|
|
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
|
|
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}` }
|