@cbartens/bkit 5.0.3 → 5.2.0
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/.bkit/README.md +14 -10
- package/.bkit/core/.agents/docs.md +1 -0
- package/.bkit/core/.agents/plugins/bkit/hooks/bkit-gateguard.cjs +93 -0
- package/.bkit/core/.agents/plugins/bkit/hooks/bkit-guardrails.cjs +137 -0
- package/.bkit/core/.agents/plugins/bkit/hooks/bkit-readguard.cjs +72 -0
- package/.bkit/core/.agents/rules.md +10 -6
- package/.bkit/core/.agents/shortcuts.md +73 -0
- package/.bkit/core/.agents/skills.md +5 -3
- package/.bkit/core/.bkit/LICENSE.md +18 -140
- package/.bkit/core/.bkit/README.md +13 -9
- package/.bkit/core/.bkit/cloud.md +12 -15
- package/.bkit/core/.bkit/comparison.md +68 -16
- package/.bkit/core/.bkit/install.md +36 -11
- package/.bkit/core/.bkit/jsonl.md +0 -1
- package/.bkit/core/.bkit/prompts.md +83 -81
- package/.bkit/core/.bkit/providers.md +110 -28
- package/.bkit/core/.bkit/templates.md +42 -13
- package/.bkit/core/.bkit/workflows.md +64 -42
- package/.bkit/core/.claude/hooks/bkit-gateguard.cjs +4 -3
- package/.bkit/core/.claude/hooks/bkit-readguard.cjs +60 -0
- package/.bkit/core/.codex/hooks/bkit-gateguard.cjs +8 -6
- package/.bkit/core/.codex/hooks/bkit-readguard.cjs +58 -0
- package/.bkit/core/.cursor/hooks/bkit-guardrails.cjs +12 -19
- package/.bkit/core/.cursor/hooks/bkit-readguard.cjs +59 -0
- package/.bkit/core/.opencode/plugin/bkit-gateguard.js +73 -22
- package/.bkit/core/.opencode/plugin/bkit-readguard.js +126 -0
- package/.bkit/core/AGENTS.md +11 -0
- package/.bkit/core/docs/templates/bkit-audit-adoption.md +2 -2
- package/.bkit/core/docs/templates/bkit-plan.md +6 -3
- package/.bkit/core/engine/checks/after/auth.ts +32 -0
- package/.bkit/core/engine/checks/after/github.ts +4 -4
- package/.bkit/core/engine/checks/after/index.ts +36 -50
- package/.bkit/core/engine/checks/after/managed.ts +44 -1
- package/.bkit/core/engine/checks/before/index.ts +5 -4
- package/.bkit/core/engine/checks/before/mcp.ts +60 -54
- package/.bkit/core/engine/checks/status-holes.ts +1 -1
- package/.bkit/core/engine/checks/tips/catalogue.ts +356 -0
- package/.bkit/core/engine/checks/tips/detect.ts +144 -0
- package/.bkit/core/engine/checks/tips/index.ts +174 -0
- package/.bkit/core/engine/cli.ts +82 -18
- package/.bkit/core/engine/commands/install/check.ts +2 -0
- package/.bkit/core/engine/commands/install/doctor.ts +14 -1
- package/.bkit/core/engine/commands/install/install.ts +59 -9
- package/.bkit/core/engine/commands/install/uninstall.ts +59 -34
- package/.bkit/core/engine/commands/install/upgrade.ts +30 -28
- package/.bkit/core/engine/commands/launch.ts +33 -11
- package/.bkit/core/engine/commands/tips.ts +16 -0
- package/.bkit/core/engine/commands/workflow/prs.ts +20 -2
- package/.bkit/core/engine/commands/workflow/runs.ts +82 -18
- package/.bkit/core/engine/commands/workflow/runtime.ts +12 -0
- package/.bkit/core/engine/commands/workflow/steps.ts +1 -0
- package/.bkit/core/engine/commands/workflow/tests.ts +647 -4
- package/.bkit/core/engine/commands/workflow/workstreams.ts +4 -4
- package/.bkit/core/engine/install/cloud-env.ts +7 -21
- package/.bkit/core/engine/install/hosts.ts +21 -0
- package/.bkit/core/engine/install/managed-block.ts +36 -0
- package/.bkit/core/engine/install/manifest.ts +83 -5
- package/.bkit/core/engine/install/modules/antigravity.ts +266 -0
- package/.bkit/core/engine/install/modules/claude.ts +6 -6
- package/.bkit/core/engine/install/modules/cloud.ts +2 -2
- package/.bkit/core/engine/install/modules/codex.ts +8 -5
- package/.bkit/core/engine/install/modules/core.ts +30 -10
- package/.bkit/core/engine/install/modules/cursor.ts +6 -6
- package/.bkit/core/engine/install/modules/index.ts +33 -6
- package/.bkit/core/engine/install/modules/opencode.ts +4 -4
- package/.bkit/core/engine/install/payload-links.ts +6 -10
- package/.bkit/core/engine/install/placeholders.ts +1 -1
- package/.bkit/core/engine/install/version-file.ts +17 -9
- package/.bkit/core/engine/install/write.ts +68 -1
- package/.bkit/core/engine/ledgers/telemetry.ts +0 -2
- package/.bkit/core/engine/render/hosts.ts +174 -1
- package/.bkit/core/engine/render/models.ts +10 -0
- package/.bkit/core/engine/shared/package-roots.ts +8 -10
- package/.bkit/core/hooks/antigravity-hook.js +67 -0
- package/.bkit/core/hooks/gateguard-edit-payload.js +4 -4
- package/.bkit/core/hooks/gateguard-engine.js +16 -6
- package/.bkit/core/hooks/guardrails-read.js +23 -0
- package/.bkit/core/hooks/readguard-engine.js +259 -0
- package/.bkit/core/hooks/readguard-payload.js +67 -0
- package/.bkit/core/prompts/bkit-audit-generate.md +2 -1
- package/.bkit/core/prompts/bkit-build-challenge-1.md +2 -1
- package/.bkit/core/prompts/bkit-build-challenge-2.md +2 -1
- package/.bkit/core/prompts/bkit-build-challenge-reconcile.md +2 -1
- package/.bkit/core/prompts/bkit-build-challenge-remediate.md +2 -1
- package/.bkit/core/prompts/bkit-build-challenge-tests.md +2 -1
- package/.bkit/core/prompts/bkit-build-install-skills.md +7 -5
- package/.bkit/core/prompts/bkit-build-plan-current.md +2 -1
- package/.bkit/core/prompts/bkit-build-plan-execute.md +6 -2
- package/.bkit/core/prompts/bkit-build-plan-gaps-remediate.md +2 -1
- package/.bkit/core/prompts/bkit-build-plan-verify.md +12 -4
- package/.bkit/core/prompts/bkit-build-summary.md +2 -1
- package/.bkit/core/prompts/bkit-debug-abort-handover.md +2 -1
- package/.bkit/core/prompts/bkit-debug-failure-diagnose.md +2 -1
- package/.bkit/core/prompts/bkit-debug-failure-remediate.md +2 -1
- package/.bkit/core/prompts/bkit-debug-failure-soak.md +2 -1
- package/.bkit/core/prompts/bkit-debug-summary.md +2 -1
- package/.bkit/core/prompts/bkit-design-brainstorm-ideate-1.md +2 -1
- package/.bkit/core/prompts/bkit-design-brainstorm-ideate-2.md +2 -1
- package/.bkit/core/prompts/bkit-design-brainstorm-ideate-3.md +2 -1
- package/.bkit/core/prompts/bkit-design-generate.md +10 -5
- package/.bkit/core/prompts/bkit-design-organise.md +2 -1
- package/.bkit/core/prompts/bkit-design-review-1.md +2 -1
- package/.bkit/core/prompts/bkit-design-review-2.md +2 -1
- package/.bkit/core/prompts/bkit-design-spike.md +2 -1
- package/.bkit/core/prompts/bkit-design-summary.md +2 -1
- package/.bkit/core/prompts/bkit-design-update.md +2 -1
- package/.bkit/core/prompts/bkit-plan-complexity-check.md +2 -1
- package/.bkit/core/prompts/bkit-plan-complexity-split.md +4 -3
- package/.bkit/core/prompts/bkit-plan-generate.md +2 -1
- package/.bkit/core/prompts/bkit-plan-review-1.md +2 -1
- package/.bkit/core/prompts/bkit-plan-review-2.md +2 -1
- package/.bkit/core/prompts/bkit-plan-review-3.md +2 -1
- package/.bkit/core/prompts/bkit-plan-scope-check-1.md +3 -2
- package/.bkit/core/prompts/bkit-plan-scope-check-2.md +3 -2
- package/.bkit/core/prompts/bkit-plan-summary.md +2 -1
- package/.bkit/core/prompts/bkit-plan-update.md +3 -2
- package/.bkit/core/prompts/bkit-ship-conflict-resolve.md +2 -1
- package/.bkit/core/prompts/bkit-ship-deferred-sweep.md +2 -1
- package/.bkit/core/prompts/bkit-ship-summary.md +2 -1
- package/.bkit/core/prompts/bkit-ship-update-docs.md +2 -1
- package/.bkit/core/prompts/bkit-utility-compress-markdown.md +2 -1
- package/.bkit/core/prompts/bkit-utility-update-decisions.md +2 -1
- package/.bkit/core/prompts/bkit-utility-update-deferrals.md +2 -1
- package/.bkit/core/prompts/bkit-utility-update-documentation.md +2 -1
- package/.bkit/core/prompts/bkit-utility-update-failures.md +2 -1
- package/.bkit/core/prompts/bkit-utility-update-knowledge.md +2 -1
- package/.bkit/core/prompts/bkit-utility-update-roadmap.md +4 -3
- package/.bkit/core/workflows/bkit-auto.md +1 -1
- package/.bkit/core/workflows/bkit-build.md +35 -21
- package/.bkit/core/workflows/bkit-debug.md +31 -22
- package/.bkit/core/workflows/bkit-design.md +83 -38
- package/.bkit/core/workflows/bkit-plan.md +10 -2
- package/.bkit/core/workflows/bkit-ship.md +10 -2
- package/.bkit/shared/.agents/plugins/bkit/hooks.json +36 -0
- package/.bkit/shared/.agents/plugins/bkit/plugin.json +5 -0
- package/.bkit/shared/.claude/settings.json +19 -0
- package/.bkit/shared/.codex/hooks.json +21 -0
- package/.bkit/shared/.cursor/hooks.json +6 -1
- package/.bkit/shared/.opencode/opencode.json +1 -1
- package/.bkit/shared/GEMINI.md +11 -0
- package/.bkit/shared/docs/deployments.md +1 -1
- package/.bkit/shared/docs/security.md +3 -3
- package/.bkit/shared/docs/testing.md +12 -1
- package/.bkit/templates/.github/dependabot.yml +6 -0
- package/.bkit/templates/.github/renovate.json5 +3 -3
- package/.bkit/templates/.github/workflows/bkit-ci.yml +24 -13
- package/.bkit/templates/.github/workflows/bkit-cloud.yml +5 -5
- package/.bkit/templates/.prettierignore +4 -1
- package/.bkit/templates/context/bkit-expo.md +22 -13
- package/.bkit/templates/context/bkit-github.md +20 -6
- package/.bkit/templates/context/bkit-inngest.md +10 -4
- package/.bkit/templates/context/bkit-maestro.md +5 -5
- package/.bkit/templates/context/bkit-playwright.md +3 -3
- package/.bkit/templates/context/bkit-sentry.md +6 -5
- package/.bkit/templates/context/bkit-stripe.md +31 -8
- package/.bkit/templates/scripts/ci/check-accepted-divergences.mjs +65 -19
- package/.bkit/templates/scripts/ci/check-accepted-divergences.test.mjs +34 -0
- package/.bkit/templates/scripts/ci/lanes/resolve-push-base.mjs +33 -12
- package/.bkit/templates/scripts/ci/lanes/resolve-push-base.test.mjs +54 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-pre-push.sh +2 -2
- package/.bkit/templates/scripts/launchd/bkit-launchd-env.sh +76 -6
- package/.bkit/templates/slop-scan.config.json +10 -3
- package/CHANGELOG.md +62 -0
- package/LICENSE.md +21 -161
- package/README.md +66 -35
- package/dist/checks/after/auth.js +28 -0
- package/dist/checks/after/github.js +4 -4
- package/dist/checks/after/index.js +29 -45
- package/dist/checks/after/managed.js +41 -1
- package/dist/checks/before/index.js +5 -4
- package/dist/checks/before/mcp.js +53 -53
- package/dist/checks/status-holes.js +1 -1
- package/dist/checks/tips/catalogue.js +297 -0
- package/dist/checks/tips/detect.js +130 -0
- package/dist/checks/tips/index.js +146 -0
- package/dist/cli.js +68 -17
- package/dist/commands/install/check.js +2 -0
- package/dist/commands/install/doctor.js +9 -1
- package/dist/commands/install/install.js +49 -8
- package/dist/commands/install/uninstall.js +61 -34
- package/dist/commands/install/upgrade.js +31 -33
- package/dist/commands/launch.js +27 -11
- package/dist/commands/tips.js +10 -0
- package/dist/commands/workflow/prs.js +13 -1
- package/dist/commands/workflow/runs.js +74 -18
- package/dist/commands/workflow/runtime.js +8 -0
- package/dist/commands/workflow/steps.js +1 -0
- package/dist/commands/workflow/tests.js +541 -4
- package/dist/commands/workflow/workstreams.js +4 -4
- package/dist/install/cloud-env.js +3 -14
- package/dist/install/hosts.js +22 -0
- package/dist/install/managed-block.js +36 -0
- package/dist/install/manifest.js +79 -4
- package/dist/install/modules/antigravity.js +225 -0
- package/dist/install/modules/claude.js +6 -6
- package/dist/install/modules/cloud.js +2 -2
- package/dist/install/modules/codex.js +8 -5
- package/dist/install/modules/core.js +21 -6
- package/dist/install/modules/cursor.js +6 -6
- package/dist/install/modules/index.js +17 -6
- package/dist/install/modules/opencode.js +4 -4
- package/dist/install/payload-links.js +5 -5
- package/dist/install/placeholders.js +1 -1
- package/dist/install/version-file.js +12 -3
- package/dist/install/write.js +61 -2
- package/dist/render/hosts.js +149 -1
- package/dist/render/models.js +9 -0
- package/dist/shared/package-roots.js +8 -11
- package/package.json +8 -8
- package/.bkit/core/LICENSE.md +0 -149
- package/.bkit/shared/LICENSE.md +0 -22
- package/.bkit/templates/LICENSE.md +0 -22
|
@@ -12,11 +12,15 @@
|
|
|
12
12
|
* is not an ancestor of HEAD (a force-push rewrote the branch), the base falls back to
|
|
13
13
|
* `event.before`.
|
|
14
14
|
*
|
|
15
|
-
* Usage: node scripts/ci/lanes/resolve-push-base.mjs
|
|
16
|
-
*
|
|
15
|
+
* Usage: node scripts/ci/lanes/resolve-push-base.mjs
|
|
16
|
+
* (env: GH_TOKEN, REPO, BRANCH, BEFORE_SHA, WORKFLOW_FILE; optional SOURCE_FILE)
|
|
17
|
+
* Output: the base SHA on stdout; the chosen source (`last-green-run`, `event-before`, ...) on
|
|
18
|
+
* stderr, and in SOURCE_FILE when that env var names a file. Exit 0 always — every
|
|
19
|
+
* failure (gh, git, unparseable output) falls back to `event.before`, itself a valid base.
|
|
17
20
|
*/
|
|
18
21
|
|
|
19
22
|
import { spawnSync } from "node:child_process";
|
|
23
|
+
import fs from "node:fs";
|
|
20
24
|
import { pathToFileURL } from "node:url";
|
|
21
25
|
|
|
22
26
|
/** The workflow whose runs establish the base. Set WORKFLOW_FILE if your CI file has another name. */
|
|
@@ -69,30 +73,47 @@ function lastGreenPushSha(repo, branch, now = new Date()) {
|
|
|
69
73
|
);
|
|
70
74
|
return "";
|
|
71
75
|
}
|
|
76
|
+
// Unparseable output throws; main() catches it and falls back to event.before.
|
|
72
77
|
return newestRunSha(JSON.parse(stdout || "[]"));
|
|
73
78
|
}
|
|
74
79
|
|
|
80
|
+
/** True only when `sha` is an ancestor of HEAD; any git failure is "not an ancestor" (logged). */
|
|
75
81
|
function isAncestorOfHead(sha) {
|
|
76
82
|
const { status, error } = spawnSync("git", ["merge-base", "--is-ancestor", sha, "HEAD"], {
|
|
77
83
|
stdio: "ignore",
|
|
78
84
|
});
|
|
79
|
-
if (error) throw error;
|
|
80
85
|
// 0 = ancestor. 1 = not an ancestor. 128 = the SHA is not in this clone (a force-push dropped
|
|
81
86
|
// it from the branch), which is also "not an ancestor". Anything else is a real git failure.
|
|
82
|
-
if (status === 0) return true;
|
|
83
|
-
if (status === 1 || status === 128) return false;
|
|
84
|
-
|
|
87
|
+
if (!error && status === 0) return true;
|
|
88
|
+
if (!error && (status === 1 || status === 128)) return false;
|
|
89
|
+
const reason = error ? error.message : `git exited ${status}`;
|
|
90
|
+
console.error(
|
|
91
|
+
`[resolve-push-base] cannot test ancestry of ${sha} (${reason}) — using event.before`,
|
|
92
|
+
);
|
|
93
|
+
return false;
|
|
85
94
|
}
|
|
86
95
|
|
|
87
96
|
export function main(env) {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
97
|
+
let result;
|
|
98
|
+
try {
|
|
99
|
+
result = choosePushBase({
|
|
100
|
+
lastGreenSha: lastGreenPushSha(env.REPO, env.BRANCH),
|
|
101
|
+
beforeSha: env.BEFORE_SHA,
|
|
102
|
+
isAncestor: isAncestorOfHead,
|
|
103
|
+
});
|
|
104
|
+
} catch (err) {
|
|
105
|
+
console.error(`[resolve-push-base] unexpected failure (${err.message}) — using event.before`);
|
|
106
|
+
result = { base: env.BEFORE_SHA ?? "", source: "event-before (resolver failed)" };
|
|
107
|
+
}
|
|
108
|
+
const { base, source } = result;
|
|
94
109
|
console.error(`[resolve-push-base] base=${base || "(none)"} source=${source}`);
|
|
95
110
|
process.stdout.write(`${base}\n`);
|
|
111
|
+
if (env.SOURCE_FILE) {
|
|
112
|
+
// Callback form: a failed write is logged and never changes the exit code.
|
|
113
|
+
fs.writeFile(env.SOURCE_FILE, `${source}\n`, (err) => {
|
|
114
|
+
if (err) console.error(`[resolve-push-base] could not write SOURCE_FILE (${err.message})`);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
96
117
|
}
|
|
97
118
|
|
|
98
119
|
if (import.meta.url === pathToFileURL(process.argv[1] ?? "").href) main(process.env);
|
|
@@ -8,8 +8,40 @@
|
|
|
8
8
|
* Exit: 0 = all tests passed, 1 = at least one test failed.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import { spawnSync } from "node:child_process";
|
|
12
|
+
import fs from "node:fs";
|
|
13
|
+
import os from "node:os";
|
|
14
|
+
import path from "node:path";
|
|
15
|
+
import { fileURLToPath } from "node:url";
|
|
11
16
|
import { choosePushBase, newestRunSha } from "./resolve-push-base.mjs";
|
|
12
17
|
|
|
18
|
+
const SCRIPT = fileURLToPath(new URL("./resolve-push-base.mjs", import.meta.url));
|
|
19
|
+
|
|
20
|
+
/** Run the script with fake `gh` / `git` binaries first on PATH. */
|
|
21
|
+
function runWithFakes({ gh, git }) {
|
|
22
|
+
const dir = fs.mkdtempSync(path.join(os.tmpdir(), "push-base-"));
|
|
23
|
+
try {
|
|
24
|
+
fs.writeFileSync(path.join(dir, "gh"), `#!/bin/sh\n${gh}\n`, { mode: 0o755 });
|
|
25
|
+
fs.writeFileSync(path.join(dir, "git"), `#!/bin/sh\n${git}\n`, { mode: 0o755 });
|
|
26
|
+
const sourceFile = path.join(dir, "source");
|
|
27
|
+
const r = spawnSync(process.execPath, [SCRIPT], {
|
|
28
|
+
encoding: "utf8",
|
|
29
|
+
env: {
|
|
30
|
+
...process.env,
|
|
31
|
+
PATH: `${dir}${path.delimiter}${process.env.PATH}`,
|
|
32
|
+
REPO: "o/r",
|
|
33
|
+
BRANCH: "dev",
|
|
34
|
+
BEFORE_SHA: "b".repeat(40),
|
|
35
|
+
SOURCE_FILE: sourceFile,
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
const source = fs.existsSync(sourceFile) ? fs.readFileSync(sourceFile, "utf8").trim() : "";
|
|
39
|
+
return { status: r.status, stdout: r.stdout.trim(), source };
|
|
40
|
+
} finally {
|
|
41
|
+
fs.rmSync(dir, { recursive: true, force: true });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
13
45
|
let passed = 0;
|
|
14
46
|
let failed = 0;
|
|
15
47
|
|
|
@@ -82,5 +114,27 @@ test("no usable run → empty sha (the caller falls back to event.before)", () =
|
|
|
82
114
|
assert(newestRunSha([{ run_number: "x", head_sha: "a" }, { head_sha: 3 }]) === "", "malformed");
|
|
83
115
|
});
|
|
84
116
|
|
|
117
|
+
const RUNS = `echo '[{"run_number":1,"head_sha":"${"a".repeat(40)}"}]'`;
|
|
118
|
+
|
|
119
|
+
test("a git failure while testing ancestry exits 0 with event.before", () => {
|
|
120
|
+
const r = runWithFakes({ gh: RUNS, git: "exit 3" });
|
|
121
|
+
assert(r.status === 0, `exit ${r.status}`);
|
|
122
|
+
assert(r.stdout === "b".repeat(40), r.stdout);
|
|
123
|
+
assert(r.source.startsWith("event-before"), r.source);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
test("unparseable gh output exits 0 with event.before", () => {
|
|
127
|
+
const r = runWithFakes({ gh: "echo 'not json'", git: "exit 0" });
|
|
128
|
+
assert(r.status === 0, `exit ${r.status}`);
|
|
129
|
+
assert(r.stdout === "b".repeat(40), r.stdout);
|
|
130
|
+
assert(r.source.startsWith("event-before"), r.source);
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
test("a green ancestor run reports last-green-run as the source", () => {
|
|
134
|
+
const r = runWithFakes({ gh: RUNS, git: "exit 0" });
|
|
135
|
+
assert(r.status === 0 && r.stdout === "a".repeat(40), JSON.stringify(r));
|
|
136
|
+
assert(r.source === "last-green-run", r.source);
|
|
137
|
+
});
|
|
138
|
+
|
|
85
139
|
console.log(`\n${passed} passed, ${failed} failed`);
|
|
86
140
|
process.exit(failed > 0 ? 1 : 0);
|
|
@@ -12,8 +12,8 @@ if [ -f "$CAP_DOC" ]; then
|
|
|
12
12
|
CAP_CHANGED=$(git diff --name-only "$CAP_SHA..HEAD" -- '*.ts' '*.tsx' 2>/dev/null | wc -l | tr -d ' ')
|
|
13
13
|
if [ "${CAP_CHANGED:-0}" -gt 0 ]; then
|
|
14
14
|
echo "[pre-push] NOTE: $CAP_DOC diagrams were built at $CAP_SHA; $CAP_CHANGED source files changed since." >&2
|
|
15
|
-
echo "[pre-push] Refresh
|
|
16
|
-
echo "[pre-push]
|
|
15
|
+
echo "[pre-push] Refresh + commit docs-only: pnpm graph:update && pnpm graph:rollup" >&2
|
|
16
|
+
echo "[pre-push] Land it with 'bkit [skip ci]'. CI enforces 'pnpm graph:check' on dev pushes." >&2
|
|
17
17
|
fi
|
|
18
18
|
fi
|
|
19
19
|
fi
|
|
@@ -3,27 +3,56 @@
|
|
|
3
3
|
# bkit install does not write this file and does not overwrite a copy.
|
|
4
4
|
# Adapt the env file path to your machine setup.
|
|
5
5
|
#
|
|
6
|
-
#
|
|
6
|
+
# Syncs the BKIT_* keys of an env file into launchd with `launchctl setenv`, so GUI
|
|
7
7
|
# apps launched from the Dock or Spotlight — which never run the login shell or
|
|
8
8
|
# direnv — see the BKIT_* tokens. Logs key names only, never values.
|
|
9
|
-
|
|
9
|
+
#
|
|
10
|
+
# - Only BKIT_* keys are loaded; other keys are skipped.
|
|
11
|
+
# - An empty value (KEY="") unsets the key.
|
|
12
|
+
# - Loaded key names are recorded in a state file next to the env file
|
|
13
|
+
# (.launchd-loaded-keys, mode 600). A recorded key that is gone from the env file
|
|
14
|
+
# is unset on the next run, so removing a key revokes it.
|
|
15
|
+
# - A failing key is logged and does not stop the others; the exit status is 1 if any failed.
|
|
16
|
+
#
|
|
17
|
+
# `launchctl setenv` exposes every loaded value to every app started in this login
|
|
18
|
+
# session, not only the apps that need it.
|
|
19
|
+
set -u
|
|
10
20
|
|
|
11
21
|
LOG_FILE="${BKIT_LAUNCHD_LOG:-$HOME/Library/Logs/bkit-launchd.log}"
|
|
12
22
|
mkdir -p "$(dirname "$LOG_FILE")" 2>/dev/null || true
|
|
13
23
|
exec >> "$LOG_FILE" 2>&1
|
|
14
24
|
|
|
15
25
|
ENV_FILE="${1:-${BKIT_LAUNCHD_ENV:-$HOME/.config/bkit/launchd.env}}"
|
|
26
|
+
STATE_FILE="${BKIT_LAUNCHD_STATE:-$(dirname "$ENV_FILE")/.launchd-loaded-keys}"
|
|
27
|
+
|
|
28
|
+
log() {
|
|
29
|
+
echo "$(date '+%Y-%m-%d %H:%M:%S') [bkit-launchd] $*"
|
|
30
|
+
}
|
|
16
31
|
|
|
17
32
|
if [ ! -f "$ENV_FILE" ]; then
|
|
18
|
-
|
|
33
|
+
log "env file not found at $ENV_FILE — skipping"
|
|
19
34
|
exit 0
|
|
20
35
|
fi
|
|
21
36
|
|
|
22
37
|
if ! command -v launchctl >/dev/null 2>&1; then
|
|
23
|
-
|
|
38
|
+
log "launchctl not found — skipping"
|
|
24
39
|
exit 0
|
|
25
40
|
fi
|
|
26
41
|
|
|
42
|
+
failed=0
|
|
43
|
+
wanted=" " # keys set from the env file this run, space-delimited
|
|
44
|
+
retry="" # keys whose unsetenv failed, kept in the state file for the next run
|
|
45
|
+
|
|
46
|
+
unset_key() {
|
|
47
|
+
if launchctl unsetenv "$1"; then
|
|
48
|
+
log "unsetenv $1 ($2)"
|
|
49
|
+
else
|
|
50
|
+
log "unsetenv $1 FAILED"
|
|
51
|
+
retry="$retry $1"
|
|
52
|
+
failed=1
|
|
53
|
+
fi
|
|
54
|
+
}
|
|
55
|
+
|
|
27
56
|
while IFS= read -r line || [ -n "$line" ]; do
|
|
28
57
|
case "$line" in
|
|
29
58
|
"" | "#"*) continue ;;
|
|
@@ -37,6 +66,11 @@ while IFS= read -r line || [ -n "$line" ]; do
|
|
|
37
66
|
val="${line#*=}"
|
|
38
67
|
case "$key" in
|
|
39
68
|
"" | *[!A-Za-z0-9_]*) continue ;;
|
|
69
|
+
BKIT_*) ;;
|
|
70
|
+
*)
|
|
71
|
+
log "skip $key (not a BKIT_ key)"
|
|
72
|
+
continue
|
|
73
|
+
;;
|
|
40
74
|
esac
|
|
41
75
|
case "$val" in
|
|
42
76
|
\"*\")
|
|
@@ -48,6 +82,42 @@ while IFS= read -r line || [ -n "$line" ]; do
|
|
|
48
82
|
val="${val%\'}"
|
|
49
83
|
;;
|
|
50
84
|
esac
|
|
51
|
-
|
|
52
|
-
|
|
85
|
+
if [ -z "$val" ]; then
|
|
86
|
+
unset_key "$key" "empty value"
|
|
87
|
+
continue
|
|
88
|
+
fi
|
|
89
|
+
if launchctl setenv "$key" "$val"; then
|
|
90
|
+
log "setenv $key"
|
|
91
|
+
else
|
|
92
|
+
log "setenv $key FAILED"
|
|
93
|
+
failed=1
|
|
94
|
+
fi
|
|
95
|
+
wanted="$wanted$key "
|
|
53
96
|
done < "$ENV_FILE"
|
|
97
|
+
|
|
98
|
+
if [ -f "$STATE_FILE" ]; then
|
|
99
|
+
while IFS= read -r prior || [ -n "$prior" ]; do
|
|
100
|
+
case "$prior" in
|
|
101
|
+
"" | *[!A-Za-z0-9_]*) continue ;;
|
|
102
|
+
BKIT_*) ;;
|
|
103
|
+
*) continue ;;
|
|
104
|
+
esac
|
|
105
|
+
case "$wanted" in
|
|
106
|
+
*" $prior "*) ;;
|
|
107
|
+
*) unset_key "$prior" "removed from env file" ;;
|
|
108
|
+
esac
|
|
109
|
+
done < "$STATE_FILE"
|
|
110
|
+
fi
|
|
111
|
+
|
|
112
|
+
(
|
|
113
|
+
umask 077
|
|
114
|
+
for k in $wanted $retry; do
|
|
115
|
+
printf '%s\n' "$k"
|
|
116
|
+
done > "$STATE_FILE"
|
|
117
|
+
) || {
|
|
118
|
+
log "could not write $STATE_FILE"
|
|
119
|
+
failed=1
|
|
120
|
+
}
|
|
121
|
+
chmod 600 "$STATE_FILE" 2>/dev/null || true
|
|
122
|
+
|
|
123
|
+
[ "$failed" -eq 0 ] || exit 1
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
|
-
"files": [".opencode/plugin/bkit-gateguard.js"],
|
|
84
|
+
"files": [".opencode/plugin/bkit-gateguard.js", ".opencode/plugin/bkit-readguard.js"],
|
|
85
85
|
"rules": {
|
|
86
86
|
"defensive.empty-catch": {
|
|
87
87
|
"enabled": false
|
|
@@ -93,7 +93,13 @@
|
|
|
93
93
|
"**/.claude/hooks/bkit-gateguard.cjs",
|
|
94
94
|
"**/.cursor/hooks/bkit-gateguard.cjs",
|
|
95
95
|
"**/.codex/hooks/bkit-gateguard.cjs",
|
|
96
|
-
"**/.
|
|
96
|
+
"**/.agents/plugins/bkit/hooks/bkit-gateguard.cjs",
|
|
97
|
+
"**/.opencode/plugin/bkit-gateguard.js",
|
|
98
|
+
"**/.claude/hooks/bkit-readguard.cjs",
|
|
99
|
+
"**/.cursor/hooks/bkit-readguard.cjs",
|
|
100
|
+
"**/.codex/hooks/bkit-readguard.cjs",
|
|
101
|
+
"**/.agents/plugins/bkit/hooks/bkit-readguard.cjs",
|
|
102
|
+
"**/.opencode/plugin/bkit-readguard.js"
|
|
97
103
|
],
|
|
98
104
|
"rules": {
|
|
99
105
|
"structure.duplicate-function-signatures": {
|
|
@@ -105,7 +111,8 @@
|
|
|
105
111
|
"files": [
|
|
106
112
|
"**/.claude/hooks/bkit-guardrails.cjs",
|
|
107
113
|
"**/.cursor/hooks/bkit-guardrails.cjs",
|
|
108
|
-
"**/.codex/hooks/bkit-guardrails.cjs"
|
|
114
|
+
"**/.codex/hooks/bkit-guardrails.cjs",
|
|
115
|
+
"**/.agents/plugins/bkit/hooks/bkit-guardrails.cjs"
|
|
109
116
|
],
|
|
110
117
|
"rules": {
|
|
111
118
|
"defensive.empty-catch": {
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,68 @@ Format: `## [version] — YYYY-MM-DD`
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## [Unreleased]
|
|
10
|
+
|
|
11
|
+
## [5.2.0] — 2026-10-15
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **Test-first build** (#554). Every plan task carries a `**Test first:**` line naming its tests (file + test name, `;`-separated) or `n/a` with a reason; plan scope-check flags a missing, malformed or unjustified line. `bkit tests red` runs one test file through the consumer's `bkit:test:file` script and records a red only when the named test ran and failed (refusals: `no-report`, `not-run`, `passed`, `skipped`, `exit-mismatch`). `bkit tests green` runs before plan-verify: each planned test has a red, is unchanged since, and passes now. `bkit:test:file` is consumer-declared (one test file, JUnit to `$BKIT_TEST_REPORT`); until it exists the `test-file-script-missing` advisory fires and `/bkit-build` reports test-first as not enforced.
|
|
16
|
+
- **`/bkit-design` grills the human first** (#548). New Step 3 (Grill) asks decision questions in numbered rounds, each with a recommended answer, until nothing is left, the human says stop, or 10 rounds; unanswered questions are recorded as "assumed, not confirmed". Answers go to `design-grill-{RUN}.md` and `design-input-{RUN}.md`; design-generate follows settled answers and records any departure as a Decisions row plus an open question. `grill=false` skips it; waiting on the human does not count toward the one-hour limit; `design` is removed from the manual `bkit-cloud.yml` choices. Steps 3-11 are renumbered 4-12.
|
|
17
|
+
- **`bkit tips`** (#543). Lists what the repo has not set up yet (tracker, tokens, templates, cost settings), most useful first, each with an instruction to paste to the agent. Every workflow appends its most relevant tip under `## Setup Tips`; `bkit install` / `check` / `doctor` list all firing tips in `.bkit/advisories.md`. Tips reuse advisory checks, so one `bkit.ignoreAdvisories` entry silences both. Local only; always exits 0.
|
|
18
|
+
- **ReadGuard hook** (#550), advisory, all five hosts: re-reading lines already read in the same conversation from an unchanged file → told to use the earlier output. Covers read-tool calls and plain `cat` / `sed -n` / `head` / `tail`; resets after a conversation summary on Claude Code, Cursor, Codex and opencode 1.x.
|
|
19
|
+
- **Reading rules** (#550). `.agents/rules.md` gains Language server first, Narrow text search first, Code reads and Command output; every prompt header carries a one-line Code reads reminder.
|
|
20
|
+
- **`bkit-managed-duplicate` advisory** (#553). `bkit check` names any managed file holding a copy of its block outside `bkit:start` / `bkit:end`.
|
|
21
|
+
- **GitHub Release per tag.** The release workflow creates one with the version's `CHANGELOG.md` block as notes plus an npmjs version link. A tag with no `CHANGELOG.md` block fails before `npm publish`.
|
|
22
|
+
- **Antigravity gates secret reads.** `bkit-guardrails.cjs` also runs on `view_file` (`hooks.json` matcher `view_file|run_command`): `*.pem` / `*.p12` / `id_rsa` → deny, `.env` / `.env.*` → ask (`.env.example` allowed) — same rules as Cursor via shared hook part `guardrails-read.js`. 5.1.0 installs get the matcher on `bkit upgrade`.
|
|
23
|
+
- **`/bkit-design` Grill runs headless.** `bkit runtime detect` / `assert` report `runtimeHeadless` (true for `GITHUB_ACTION`, `CLOUD_CURSOR`, `UNKNOWN`; `BKIT_RUNTIME` overrides). Headless → Grill asks nothing and records each recommended answer as `Assumed, not confirmed`, so a design dispatch from an older copied `bkit-cloud.yml` no longer stalls.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- **Licence: MIT, for everything.** bkit is free for any use, commercial included, under the MIT licence; it replaces the PolyForm Noncommercial / Small Business pair and the MIT-0 shared and template folders. The per-folder `LICENSE.md` files in `.bkit/core/`, `.bkit/shared/` and `.bkit/templates/` are gone; the root `LICENSE.md` covers the package, and install writes the same MIT text to `.bkit/LICENSE.md`. The managed marker no longer names a licence (``bkit:managed vX.Y.Z — do not edit; run `bkit upgrade` to refresh``), and `bkit upgrade` restamps every one and removes the stale `.bkit/templates/LICENSE.md` copy. Contributions no longer need a CLA: a pull request is licensed under MIT.
|
|
28
|
+
- **Cloud setup sets no compaction threshold** (#549). `CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=70` is no longer added; `.bkit/cloud.md` points to `autoCompactWindow` in `.claude/settings.json`, and `.bkit/providers.md` § Context compaction lists the setting per host and the floor below which a subagent gets killed. New rule: logs, errors and database reads prefer an enabled context-fetch block or the provider's CLI over MCP.
|
|
29
|
+
- **Dependency updater templates wait 7 days.** Renovate `minimumReleaseAge` is `7 days` (was `1 day`); Dependabot gets a 7-day `cooldown`.
|
|
30
|
+
- **Context-fetch templates bound their output** (#550): log tails, caps, time windows and type filters at the source.
|
|
31
|
+
- **Templates and scripts** (#551). `resolve-push-base.mjs` falls back to `event.before` on any `gh` / `git` failure and reports its source; `check-accepted-divergences` scans the workflow-level `concurrency` block and names steps starting with `id:` or `run:`; the launchd loader unsets removed keys, treats an empty value as unset, and keeps loading after one failure.
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- **Antigravity hooks never ran** (#550). Hook commands now resolve the script from the plugin folder too, a shared `antigravity-hook.js` converts Antigravity's hook format, and advisories are delivered by blocking the call once and allowing the retry. Upgrade migration: unedited 5.1.0 Antigravity hook drivers are replaced (`docs/migrations.md`).
|
|
36
|
+
- **`bkit upgrade` creates files a newer release adds** to an installed Codex, opencode or Antigravity host (#550).
|
|
37
|
+
- **Install no longer appends a second bkit copy** below an older unmarked one (#553); it warns and skips. Remove the old copy above `bkit:start` by hand.
|
|
38
|
+
- **GateGuard** remembers warnings per session and agent, so a Claude Code subagent gets its own checklist (#550); OpenCode `patch` / `apply_patch` edits are checked per named file, and deny mode blocks (#551); gate-config detection drops `pyproject.toml`, `setup.cfg` and `tox.ini` and adds mypy, pylint, pytest, rustfmt, clippy and jest JSON variants (#551).
|
|
39
|
+
- **`bkit check`** no longer counts missing `.bkit/core` / `.bkit/shared` view links as drift, so a fresh clone or worktree can push (#551).
|
|
40
|
+
- **Install / uninstall** (#551): the second preflight run after install writes fails on its blockers; a targeted uninstall dry run lists the mirror files and the `.bkit/version` update.
|
|
41
|
+
- **`bkit-debug`** re-checks for an open PR (any base) right before close (#551).
|
|
42
|
+
- **`bkit runs revalidate --repo` / `runs gate --snapshot`** run every `gh` call and the dev ancestry check against the named repo (#551).
|
|
43
|
+
- **`bkit opencode`** warns when OpenCode 2.0's shared background server is already running (#551).
|
|
44
|
+
- **GitHub tracker token wording** (#543): advisory and cloud setup text no longer say the GitHub tracker needs no token; the shipped GitHub MCP server sends `BKIT_GH_TOKEN`.
|
|
45
|
+
- **MCP advisories match what install writes.** `mcp-missing-server-*` requires only the tracker's own server (`none` → none), so a fresh `--tracker=linear` / `--tracker=none` install no longer advises adding `github`. `mcp-extra-server-linear` also checks `.opencode/opencode.json` `mcp`; `github` is never flagged as extra (the phase workflows' `gh` fallback uses it).
|
|
46
|
+
- **CLI help and the bare `bkit install` error** name every host and `--auto` variant (`--antigravity`, `--auto=opencode`).
|
|
47
|
+
- **`bkit uninstall`** reports already-missing files as `absent:` and counts them as `already absent: N`, separate from `preserved`.
|
|
48
|
+
- **Docs:** design step numbers in `.bkit/prompts.md` / `.bkit/workflows.md` follow the Grill renumbering; `.bkit/cloud.md` drops `design` from manual dispatch; `.bkit/comparison.md` lists Grill; `.bkit/install.md` lists antigravity among drift-gated hosts; `.bkit/jsonl.md` drops the never-written `sweepVerdict` field.
|
|
49
|
+
- **Packaging:** `npm pack` and `pnpm pack` ship the same test-free tarball (exclusions in `.bkit/core/engine/.npmignore`).
|
|
50
|
+
|
|
51
|
+
## [5.1.0] — 2026-10-13
|
|
52
|
+
|
|
53
|
+
### Added
|
|
54
|
+
|
|
55
|
+
- **Google Antigravity host support** (#534). bkit installs into Antigravity as a workspace plugin under `.agents/plugins/bkit/` — `plugin.json`, one workflow skill per command (`skills/bkit-*/SKILL.md`), the subagent prompts (`agents/`), and `hooks.json` with the GateGuard / guardrails hooks — plus the root `GEMINI.md` workspace-rule redirect. Antigravity has no native subagent tool, so renders rewrite the in-session invocation to `view_file .agents/plugins/bkit/agents/<name>.md` and map the tool vocabulary to Antigravity's names (`view_file`, `write_to_file`, `replace_file_content`, `run_command`, `grep_search`, `list_dir`, …). `--antigravity` composes with every other host flag. Codex renders into `.agents/skills/`, so the Antigravity host owns `.agents/plugins/bkit/` exclusively (one writer per directory); a new `antigravity-codex-skill-overlap` advisory fires when both hosts are installed and names the plugin skills as the ones to invoke in Antigravity. `AGENTS.md`, `.bkit/providers.md`, `.bkit/install.md`, `README.md`, `.bkit/comparison.md` and the capability register document the host, and `prompts.md` gains the `Google` model column and `Antigravity` effort column.
|
|
56
|
+
- **`.agents/shortcuts.md` — opt-in lite prompts** (#541). Five copy-paste prompts run a phase's steps and subagents without the full workflow's ceremony, each pointing at the phase workflow as inspiration (never a command file) with an `[INSERT]` slot. They skip the gates, worktree isolation, PR, CI and audit trail — full workflow when in doubt, lite only when clearly enough. Wired into the core agent files, the uninstall list, `.agents/docs.md` and the roadmap utility.
|
|
57
|
+
|
|
58
|
+
### Changed
|
|
59
|
+
|
|
60
|
+
- **Every phase summary offers a plain-English explanation.** The build, debug, design, plan and ship summaries close by asking whether you want the summary restated in plain English, and restate it on request; the wording policy lands in `.bkit/wording.md`.
|
|
61
|
+
- **Installed skills are treated as untrusted, and skill sources are gated** (#342). `.agents/rules.md` extends the external-input rule to skill content; `.agents/skills.md` and the `bkit-build-install-skills` prompt accept only an official publisher, or a skill with >= 1000 installs and >= 100 repo stars, install one named `<owner/repo>@<skill>` (a bare repo would pull the whole catalog), and never execute bundled scripts. `docs/security.md` records the threat model.
|
|
62
|
+
- **The CI template gates the capability register** (#444). The shipped `bkit-ci.yml` and bkit's own workflow gain a Check Capability Register step (`graphifyy[sql]==0.9.50`, pinned via `uv`, push events only, self-skipping without the wrapper), and the pre-push guard notice names it. `.bkit/templates.md` corrects the graphify doctrine: graphify ships an MCP server (`graphify-mcp`) but stays unwired — snapshot-dated answers lose to Serena, which cannot go stale.
|
|
63
|
+
- **Install snippets name the four opencode providers.** README, `.bkit/install.md` and the install paste block list `openrouter`, `ollama`, `opencode-zen`, `opencode-go` wherever they show `--opencode=<provider>`; README drops the stale "free local models" claims — no local provider exists since the allowlist cut to four hosted / gateway providers.
|
|
64
|
+
|
|
65
|
+
### Fixed
|
|
66
|
+
|
|
67
|
+
- **`bkit runs gate|revalidate --repo` resolves the PR from the named repo** (#533). The command resolved the PR from the checkout's git remote and ignored `--repo`, so a cross-repo caller could get a verdict for a same-numbered PR in the wrong repository — including a false exit 0. `--repo` now threads into the `gh pr view` probe at both call sites, and each resolved repo is logged so a disagreement with the checkout is visible.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
9
71
|
## [5.0.3] — 2026-10-12
|
|
10
72
|
|
|
11
73
|
### Fixed
|
package/LICENSE.md
CHANGED
|
@@ -1,161 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
24
|
-
|
|
25
|
-
## Acceptance
|
|
26
|
-
|
|
27
|
-
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
28
|
-
|
|
29
|
-
## Copyright License
|
|
30
|
-
|
|
31
|
-
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
|
|
32
|
-
|
|
33
|
-
## Distribution License
|
|
34
|
-
|
|
35
|
-
The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
|
|
36
|
-
|
|
37
|
-
## Notices
|
|
38
|
-
|
|
39
|
-
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
|
|
40
|
-
|
|
41
|
-
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
42
|
-
|
|
43
|
-
## Changes and New Works License
|
|
44
|
-
|
|
45
|
-
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
46
|
-
|
|
47
|
-
## Patent License
|
|
48
|
-
|
|
49
|
-
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
50
|
-
|
|
51
|
-
## Noncommercial Purposes
|
|
52
|
-
|
|
53
|
-
Any noncommercial purpose is a permitted purpose.
|
|
54
|
-
|
|
55
|
-
## Personal Uses
|
|
56
|
-
|
|
57
|
-
Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
|
|
58
|
-
|
|
59
|
-
## Noncommercial Organizations
|
|
60
|
-
|
|
61
|
-
Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
|
|
62
|
-
|
|
63
|
-
## Fair Use
|
|
64
|
-
|
|
65
|
-
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
66
|
-
|
|
67
|
-
## No Other Rights
|
|
68
|
-
|
|
69
|
-
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
70
|
-
|
|
71
|
-
## Patent Defense
|
|
72
|
-
|
|
73
|
-
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
74
|
-
|
|
75
|
-
## Violations
|
|
76
|
-
|
|
77
|
-
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
78
|
-
|
|
79
|
-
## No Liability
|
|
80
|
-
|
|
81
|
-
_**As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.**_
|
|
82
|
-
|
|
83
|
-
## Definitions
|
|
84
|
-
|
|
85
|
-
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
86
|
-
|
|
87
|
-
**You** refers to the individual or entity agreeing to these terms.
|
|
88
|
-
|
|
89
|
-
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
90
|
-
|
|
91
|
-
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
92
|
-
|
|
93
|
-
**Use** means anything you do with the software requiring one of your licenses.
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
# PolyForm Small Business License 1.0.0
|
|
98
|
-
|
|
99
|
-
<https://polyformproject.org/licenses/small-business/1.0.0>
|
|
100
|
-
|
|
101
|
-
## Acceptance
|
|
102
|
-
|
|
103
|
-
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
104
|
-
|
|
105
|
-
## Copyright License
|
|
106
|
-
|
|
107
|
-
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
|
|
108
|
-
|
|
109
|
-
## Distribution License
|
|
110
|
-
|
|
111
|
-
The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
|
|
112
|
-
|
|
113
|
-
## Notices
|
|
114
|
-
|
|
115
|
-
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
|
|
116
|
-
|
|
117
|
-
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
118
|
-
|
|
119
|
-
## Changes and New Works License
|
|
120
|
-
|
|
121
|
-
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
122
|
-
|
|
123
|
-
## Patent License
|
|
124
|
-
|
|
125
|
-
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
126
|
-
|
|
127
|
-
## Fair Use
|
|
128
|
-
|
|
129
|
-
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
130
|
-
|
|
131
|
-
## Small Business
|
|
132
|
-
|
|
133
|
-
Use of the software for the benefit of your company is use for a permitted purpose if your company has fewer than 100 total individuals working as employees and independent contractors, and less than 1,000,000 USD (2019) total revenue in the prior tax year. Adjust this revenue threshold for inflation according to the United States Bureau of Labor Statistics' consumer price index for all urban consumers, U.S. city average, for all items, not seasonally adjusted, with 1982–1984=100 reference base.
|
|
134
|
-
|
|
135
|
-
## No Other Rights
|
|
136
|
-
|
|
137
|
-
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
138
|
-
|
|
139
|
-
## Patent Defense
|
|
140
|
-
|
|
141
|
-
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
142
|
-
|
|
143
|
-
## Violations
|
|
144
|
-
|
|
145
|
-
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
146
|
-
|
|
147
|
-
## No Liability
|
|
148
|
-
|
|
149
|
-
_**As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.**_
|
|
150
|
-
|
|
151
|
-
## Definitions
|
|
152
|
-
|
|
153
|
-
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
154
|
-
|
|
155
|
-
**You** refers to the individual or entity agreeing to these terms.
|
|
156
|
-
|
|
157
|
-
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
158
|
-
|
|
159
|
-
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
160
|
-
|
|
161
|
-
**Use** means anything you do with the software requiring one of your licenses.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Christian Bartens
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|