@cbartens/bkit 5.2.4 → 5.3.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 +26 -11
- package/.bkit/core/.agents/context.md +1 -1
- package/.bkit/core/.agents/docs.md +1 -1
- package/.bkit/core/.agents/plugins/bkit/hooks/bkit-guardrails.cjs +1 -1
- package/.bkit/core/.agents/rules.md +11 -0
- package/.bkit/core/.bkit/README.md +25 -10
- package/.bkit/core/.bkit/cloud.md +9 -8
- package/.bkit/core/.bkit/comparison.md +68 -345
- package/.bkit/core/.bkit/install.md +12 -6
- package/.bkit/core/.bkit/lite.md +73 -0
- package/.bkit/core/.bkit/pipeline.md +345 -0
- package/.bkit/core/.bkit/prompts.md +88 -73
- package/.bkit/core/.bkit/providers.md +41 -22
- package/.bkit/core/.bkit/templates.md +106 -17
- package/.bkit/core/.bkit/trackers.md +47 -1
- package/.bkit/core/.bkit/workflows.md +44 -43
- package/.bkit/core/.claude/hooks/bkit-guardrails.cjs +1 -1
- package/.bkit/core/.codex/hooks/bkit-guardrails.cjs +7 -4
- package/.bkit/core/.cursor/hooks/bkit-guardrails.cjs +8 -5
- package/.bkit/core/docs/templates/bkit-audit-adoption.md +1 -1
- package/.bkit/core/docs/templates/bkit-audit-dependencies.md +14 -10
- package/.bkit/core/docs/templates/bkit-audit-llm.md +20 -14
- package/.bkit/core/docs/templates/bkit-audit-prompts.md +2 -2
- package/.bkit/core/docs/templates/bkit-audit-red-team.md +10 -8
- package/.bkit/core/docs/templates/bkit-audit-security.md +3 -3
- package/.bkit/core/docs/templates/bkit-audit-testing.md +4 -3
- package/.bkit/core/docs/templates/bkit-plan.md +8 -6
- package/.bkit/core/engine/checks/after/auth.ts +9 -9
- package/.bkit/core/engine/checks/after/ci-yml.ts +14 -12
- package/.bkit/core/engine/checks/after/github.ts +29 -120
- package/.bkit/core/engine/checks/after/index.ts +2 -2
- package/.bkit/core/engine/checks/after/managed.ts +8 -28
- package/.bkit/core/engine/checks/after/tools.ts +3 -15
- package/.bkit/core/engine/checks/before/context-fetch.ts +1 -21
- package/.bkit/core/engine/checks/before/index.ts +7 -43
- package/.bkit/core/engine/checks/before/mcp.ts +17 -8
- package/.bkit/core/engine/checks/before/repo.ts +9 -12
- package/.bkit/core/engine/checks/status-holes.ts +4 -5
- package/.bkit/core/engine/checks/tips/catalogue.ts +60 -24
- package/.bkit/core/engine/checks/tips/detect.ts +45 -2
- package/.bkit/core/engine/checks/tips/index.ts +37 -8
- package/.bkit/core/engine/cli.ts +39 -16
- package/.bkit/core/engine/commands/analysis.ts +36 -26
- package/.bkit/core/engine/commands/comply.ts +17 -16
- package/.bkit/core/engine/commands/harvest.ts +12 -12
- package/.bkit/core/engine/commands/install/doctor.ts +57 -28
- package/.bkit/core/engine/commands/install/install.ts +62 -126
- package/.bkit/core/engine/commands/install/uninstall.ts +191 -33
- package/.bkit/core/engine/commands/install/upgrade.ts +49 -43
- package/.bkit/core/engine/commands/lib.ts +35 -10
- package/.bkit/core/engine/commands/tips.ts +8 -5
- package/.bkit/core/engine/commands/workflow/branches.ts +4 -4
- package/.bkit/core/engine/commands/workflow/counters.ts +21 -12
- package/.bkit/core/engine/commands/workflow/fids.ts +46 -0
- package/.bkit/core/engine/commands/workflow/ledgers.ts +3 -1
- package/.bkit/core/engine/commands/workflow/prs.ts +4 -2
- package/.bkit/core/engine/commands/workflow/repo.ts +2 -2
- package/.bkit/core/engine/commands/workflow/roadmap.ts +4 -3
- package/.bkit/core/engine/commands/workflow/runs.ts +8 -7
- package/.bkit/core/engine/commands/workflow/steps.ts +1 -0
- package/.bkit/core/engine/commands/workflow/tests.ts +17 -5
- package/.bkit/core/engine/commands/workflow/workflows.ts +15 -14
- package/.bkit/core/engine/commands/workflow/workstreams.ts +2 -1
- package/.bkit/core/engine/commands/workflow/worktrees.ts +13 -5
- package/.bkit/core/engine/install/cloud-env.ts +10 -31
- package/.bkit/core/engine/install/manifest.ts +14 -7
- package/.bkit/core/engine/install/modules/antigravity.ts +15 -26
- package/.bkit/core/engine/install/modules/claude.ts +20 -28
- package/.bkit/core/engine/install/modules/cloud.ts +5 -2
- package/.bkit/core/engine/install/modules/codex.ts +15 -29
- package/.bkit/core/engine/install/modules/core.ts +91 -70
- package/.bkit/core/engine/install/modules/cursor.ts +6 -20
- package/.bkit/core/engine/install/modules/index.ts +7 -1
- package/.bkit/core/engine/install/modules/opencode.ts +48 -70
- package/.bkit/core/engine/install/network-allowlist.ts +73 -0
- package/.bkit/core/engine/install/placeholders.ts +3 -18
- package/.bkit/core/engine/install/write.ts +59 -12
- package/.bkit/core/engine/ledgers/telemetry.ts +6 -4
- package/.bkit/core/engine/render/hosts.ts +47 -67
- package/.bkit/core/engine/render/models.ts +29 -11
- package/.bkit/core/engine/shared/branches.ts +13 -0
- package/.bkit/core/engine/shared/egress.ts +3 -3
- package/.bkit/core/engine/shared/json.ts +18 -1
- package/.bkit/core/engine/shared/package-json.ts +63 -0
- package/.bkit/core/engine/shared/package-roots.ts +0 -10
- package/.bkit/core/engine/shared/protected-paths.ts +5 -130
- package/.bkit/core/engine/shared/settings.ts +36 -0
- package/.bkit/core/hooks/antigravity-hook.js +1 -0
- package/.bkit/core/hooks/guardrails-shell.js +186 -40
- package/.bkit/core/hooks/guardrails-tiers.js +5 -78
- package/.bkit/core/prompts/bkit-audit-generate.md +60 -7
- package/.bkit/core/prompts/bkit-build-challenge-1.md +1 -1
- package/.bkit/core/prompts/bkit-build-challenge-2.md +1 -1
- package/.bkit/core/prompts/bkit-build-challenge-reconcile.md +1 -1
- package/.bkit/core/prompts/bkit-build-challenge-remediate.md +1 -1
- package/.bkit/core/prompts/bkit-build-challenge-tests.md +1 -1
- package/.bkit/core/prompts/bkit-build-install-skills.md +1 -1
- package/.bkit/core/prompts/bkit-build-plan-current.md +1 -1
- package/.bkit/core/prompts/bkit-build-plan-execute.md +4 -4
- package/.bkit/core/prompts/bkit-build-plan-gaps-remediate.md +1 -1
- package/.bkit/core/prompts/bkit-build-plan-verify.md +2 -2
- package/.bkit/core/prompts/bkit-debug-abort-handover.md +1 -1
- package/.bkit/core/prompts/bkit-debug-failure-diagnose.md +1 -1
- package/.bkit/core/prompts/bkit-debug-failure-remediate.md +1 -1
- package/.bkit/core/prompts/bkit-debug-failure-reproduce.md +78 -0
- package/.bkit/core/prompts/bkit-debug-failure-soak.md +1 -1
- package/.bkit/core/prompts/bkit-debug-summary.md +3 -3
- package/.bkit/core/prompts/bkit-design-spike.md +1 -1
- package/.bkit/core/prompts/bkit-design-summary.md +2 -2
- package/.bkit/core/prompts/bkit-design-update.md +1 -1
- package/.bkit/core/prompts/bkit-plan-complexity-check.md +1 -1
- package/.bkit/core/prompts/bkit-plan-generate.md +1 -1
- package/.bkit/core/prompts/bkit-plan-scope-check-1.md +1 -1
- package/.bkit/core/prompts/bkit-plan-scope-check-2.md +1 -1
- package/.bkit/core/prompts/bkit-plan-summary.md +1 -1
- package/.bkit/core/prompts/bkit-plan-update.md +1 -1
- package/.bkit/core/prompts/bkit-ship-conflict-resolve.md +1 -1
- package/.bkit/core/prompts/bkit-ship-deferred-sweep.md +1 -1
- package/.bkit/core/prompts/bkit-ship-update-docs.md +1 -1
- package/.bkit/core/prompts/bkit-utility-update-decisions.md +9 -2
- package/.bkit/core/prompts/bkit-utility-update-deferrals.md +9 -2
- package/.bkit/core/prompts/bkit-utility-update-documentation.md +2 -1
- package/.bkit/core/prompts/bkit-utility-update-failures.md +9 -2
- package/.bkit/core/prompts/bkit-utility-update-knowledge.md +9 -2
- package/.bkit/core/prompts/bkit-utility-update-roadmap.md +11 -4
- package/.bkit/core/workflows/bkit-build.md +3 -3
- package/.bkit/core/workflows/bkit-debug.md +69 -33
- package/.bkit/core/workflows/bkit-design.md +2 -2
- package/.bkit/core/workflows/bkit-plan.md +11 -4
- package/.bkit/core/workflows/bkit-ship.md +5 -5
- package/.bkit/shared/.claude/bkit-cloud.md +46 -13
- package/.bkit/shared/.claude/settings.json +18 -0
- package/.bkit/shared/.cursor/mcp.json +2 -1
- package/.bkit/shared/.opencode/opencode.json +19 -1
- package/.bkit/shared/docs/deployments.md +20 -4
- package/.bkit/shared/docs/security.md +8 -6
- package/.bkit/shared/docs/testing.md +9 -5
- package/.bkit/templates/.cursor/Dockerfile +30 -16
- package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-bug.yml +78 -0
- package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-change.yml +91 -0
- package/.bkit/templates/.github/ISSUE_TEMPLATE/bkit-idea.yml +56 -0
- package/.bkit/templates/.github/renovate.json5 +91 -12
- package/.bkit/templates/.github/workflows/bkit-ci.yml +66 -53
- package/.bkit/templates/.github/workflows/bkit-cloud.yml +3 -1
- package/.bkit/templates/.github/workflows/bkit-renovate.yml +8 -1
- package/.bkit/templates/.github/workflows/bkit-trivy.yml +67 -0
- package/.bkit/templates/.husky/pre-push +8 -3
- package/.bkit/templates/.oxlintrc.json +21 -0
- package/.bkit/templates/docs/capabilities.md +1 -1
- package/.bkit/templates/scripts/ci/check-capstone.mjs +176 -0
- package/.bkit/templates/scripts/ci/check-capstone.test.mjs +311 -0
- package/.bkit/templates/scripts/graphify/bkit-graph-eager.py +2 -2
- package/.bkit/templates/scripts/graphify/bkit-graph-imports.py +43 -20
- package/.bkit/templates/scripts/graphify/bkit-graph-pre-push.sh +33 -11
- package/.bkit/templates/scripts/graphify/bkit-graph-repair.py +3 -2
- package/.bkit/templates/scripts/graphify/bkit-graphify-rollup.py +5 -5
- package/.bkit/templates/scripts/graphify/bkit-graphify.sh +79 -19
- package/CHANGELOG.md +50 -3
- package/README.md +258 -129
- package/dist/checks/after/auth.js +10 -11
- package/dist/checks/after/ci-yml.js +11 -14
- package/dist/checks/after/github.js +32 -125
- package/dist/checks/after/index.js +3 -2
- package/dist/checks/after/managed.js +8 -24
- package/dist/checks/after/tools.js +3 -16
- package/dist/checks/before/context-fetch.js +1 -21
- package/dist/checks/before/index.js +6 -42
- package/dist/checks/before/mcp.js +14 -9
- package/dist/checks/before/repo.js +8 -11
- package/dist/checks/status-holes.js +5 -6
- package/dist/checks/tips/catalogue.js +51 -18
- package/dist/checks/tips/detect.js +41 -2
- package/dist/checks/tips/index.js +25 -5
- package/dist/cli.js +34 -14
- package/dist/commands/analysis.js +21 -5
- package/dist/commands/comply.js +20 -18
- package/dist/commands/harvest.js +12 -13
- package/dist/commands/install/doctor.js +55 -23
- package/dist/commands/install/install.js +62 -118
- package/dist/commands/install/uninstall.js +165 -31
- package/dist/commands/install/upgrade.js +46 -39
- package/dist/commands/lib.js +32 -10
- package/dist/commands/tips.js +6 -3
- package/dist/commands/workflow/branches.js +3 -5
- package/dist/commands/workflow/counters.js +17 -7
- package/dist/commands/workflow/fids.js +39 -0
- package/dist/commands/workflow/ledgers.js +3 -1
- package/dist/commands/workflow/prs.js +3 -3
- package/dist/commands/workflow/repo.js +2 -2
- package/dist/commands/workflow/roadmap.js +4 -4
- package/dist/commands/workflow/runs.js +5 -5
- package/dist/commands/workflow/steps.js +1 -0
- package/dist/commands/workflow/tests.js +16 -3
- package/dist/commands/workflow/workflows.js +15 -15
- package/dist/commands/workflow/workstreams.js +2 -1
- package/dist/commands/workflow/worktrees.js +4 -5
- package/dist/install/cloud-env.js +10 -23
- package/dist/install/manifest.js +14 -7
- package/dist/install/modules/antigravity.js +15 -26
- package/dist/install/modules/claude.js +17 -21
- package/dist/install/modules/cloud.js +6 -2
- package/dist/install/modules/codex.js +15 -29
- package/dist/install/modules/core.js +82 -63
- package/dist/install/modules/cursor.js +6 -9
- package/dist/install/modules/index.js +6 -1
- package/dist/install/modules/opencode.js +41 -72
- package/dist/install/network-allowlist.js +62 -0
- package/dist/install/placeholders.js +3 -16
- package/dist/install/write.js +55 -15
- package/dist/ledgers/telemetry.js +5 -4
- package/dist/render/hosts.js +30 -55
- package/dist/render/models.js +20 -9
- package/dist/shared/branches.js +11 -0
- package/dist/shared/egress.js +0 -2
- package/dist/shared/json.js +14 -0
- package/dist/shared/package-json.js +61 -0
- package/dist/shared/package-roots.js +0 -8
- package/dist/shared/protected-paths.js +5 -122
- package/dist/shared/settings.js +18 -1
- package/package.json +21 -17
- package/.bkit/core/.agents/shortcuts.md +0 -73
|
@@ -17,9 +17,11 @@
|
|
|
17
17
|
import { execFileSync } from "node:child_process";
|
|
18
18
|
import * as fs from "node:fs";
|
|
19
19
|
import * as path from "node:path";
|
|
20
|
+
import { readJsonFile } from "../shared/json.js";
|
|
20
21
|
import { getPkgRoot } from "../shared/package-roots.js";
|
|
21
22
|
import { isMirrorPath } from "../shared/protected-paths.js";
|
|
22
23
|
import {
|
|
24
|
+
gitEnv,
|
|
23
25
|
resolveGitSha,
|
|
24
26
|
resolveRepoSlug,
|
|
25
27
|
type TelemetryEnvelope,
|
|
@@ -72,6 +74,7 @@ export const realGitAdapter: GitAdapter = {
|
|
|
72
74
|
try {
|
|
73
75
|
const output = execFileSync("git", ["diff", "--name-only", `${parentSha}..HEAD`], {
|
|
74
76
|
cwd,
|
|
77
|
+
env: gitEnv(),
|
|
75
78
|
encoding: "utf8",
|
|
76
79
|
stdio: ["ignore", "pipe", "ignore"],
|
|
77
80
|
});
|
|
@@ -89,6 +92,7 @@ export const realGitAdapter: GitAdapter = {
|
|
|
89
92
|
try {
|
|
90
93
|
return execFileSync("git", ["log", "-1", "--format=%s"], {
|
|
91
94
|
cwd,
|
|
95
|
+
env: gitEnv(),
|
|
92
96
|
encoding: "utf8",
|
|
93
97
|
stdio: ["ignore", "pipe", "ignore"],
|
|
94
98
|
}).trim();
|
|
@@ -342,23 +346,20 @@ export function formatComplianceSummary(violations: Violation[]): string {
|
|
|
342
346
|
* running bkit package's root). Returns "0.0.0" on any read/parse error (fail-open).
|
|
343
347
|
*/
|
|
344
348
|
export function readBkitVersion(searchFrom?: string): string {
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
}
|
|
356
|
-
const parent = path.dirname(dir);
|
|
357
|
-
if (parent === dir) break;
|
|
358
|
-
dir = parent;
|
|
349
|
+
// Walk up looking for a package.json with a `version` field; stop at the filesystem root.
|
|
350
|
+
let dir = path.resolve(searchFrom ?? getPkgRoot());
|
|
351
|
+
for (let i = 0; i < 8; i++) {
|
|
352
|
+
const candidate = path.join(dir, "package.json");
|
|
353
|
+
if (fs.existsSync(candidate)) {
|
|
354
|
+
const read = readJsonFile(candidate);
|
|
355
|
+
// Fail-open: a package.json that cannot be read ends the search with the default.
|
|
356
|
+
if (!read.ok || read.value === null) return "0.0.0";
|
|
357
|
+
const pkg = read.value as { version?: string };
|
|
358
|
+
if (typeof pkg.version === "string") return pkg.version;
|
|
359
359
|
}
|
|
360
|
-
|
|
361
|
-
|
|
360
|
+
const parent = path.dirname(dir);
|
|
361
|
+
if (parent === dir) break;
|
|
362
|
+
dir = parent;
|
|
362
363
|
}
|
|
363
364
|
return "0.0.0";
|
|
364
365
|
}
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
// - The prune gate is byte-for-byte CONTENT, never identity.
|
|
15
15
|
// - The central store ACCUMULATES across runs (never cleared) and holds every
|
|
16
16
|
// DISTINCT row, deduped by content only. It is never rewritten from the fold. It is
|
|
17
|
-
//
|
|
18
|
-
// fold it.
|
|
17
|
+
// gitignored (private consumer content), so it is the only record of pruned consumer
|
|
18
|
+
// friction; readers fold it.
|
|
19
19
|
// - Malformed consumer lines are NEVER pruned (not ours to delete).
|
|
20
20
|
// - Grep-able [bkit-harvest] log lines.
|
|
21
21
|
// - Relies on the tolerant `parse` for half-written tails.
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
// copy -> fsync -> verify -> prune; a crash at any point re-copies idempotently on the
|
|
25
25
|
// next run.
|
|
26
26
|
//
|
|
27
|
-
// Consumers are listed in `
|
|
27
|
+
// Consumers are listed in `harvest/consumers.md` (one absolute path per line).
|
|
28
28
|
// See DE-34 for the shared-entrypoint + crash-isolation contract.
|
|
29
29
|
|
|
30
30
|
import * as fs from "node:fs";
|
|
@@ -36,6 +36,7 @@ import {
|
|
|
36
36
|
type FoldedState,
|
|
37
37
|
type TelemetryEvent,
|
|
38
38
|
} from "../ledgers/telemetry.js";
|
|
39
|
+
import { parseJson } from "../shared/json.js";
|
|
39
40
|
|
|
40
41
|
// ---------------------------------------------------------------------------
|
|
41
42
|
// Constants
|
|
@@ -52,7 +53,7 @@ export const HARVEST_PRUNE_FILES = ["friction.jsonl"] as const;
|
|
|
52
53
|
/** Files to COUNT-ONLY from each consumer's `docs/` directory (metadata only). */
|
|
53
54
|
export const HARVEST_COUNT_FILES = ["deferrals.jsonl", "failures.jsonl"] as const;
|
|
54
55
|
/** Path (relative to bkit repo root) for the consumers list. */
|
|
55
|
-
export const CONSUMERS_FILE = "
|
|
56
|
+
export const CONSUMERS_FILE = "harvest/consumers.md";
|
|
56
57
|
/**
|
|
57
58
|
* Destination directory in bkit for harvested data. Repo root, NOT under `.bkit/`
|
|
58
59
|
* (bkit's managed/installed surface).
|
|
@@ -91,11 +92,11 @@ export interface HarvestResult {
|
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
// ---------------------------------------------------------------------------
|
|
94
|
-
// Read consumer list from `
|
|
95
|
+
// Read consumer list from `harvest/consumers.md`
|
|
95
96
|
// ---------------------------------------------------------------------------
|
|
96
97
|
|
|
97
98
|
/**
|
|
98
|
-
* Read the list of consumer repo root paths from `
|
|
99
|
+
* Read the list of consumer repo root paths from `harvest/consumers.md`.
|
|
99
100
|
* Returns an array of absolute paths (non-empty lines, comments stripped).
|
|
100
101
|
*/
|
|
101
102
|
export function readConsumerPaths(bkitRoot: string): string[] {
|
|
@@ -256,13 +257,12 @@ export function pruneConsumerFile(
|
|
|
256
257
|
|
|
257
258
|
for (const line of raw.split("\n")) {
|
|
258
259
|
if (line.trim() === "") continue;
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
event = JSON.parse(line.trim()) as TelemetryEvent;
|
|
262
|
-
} catch {
|
|
260
|
+
const parsed = parseJson(line.trim());
|
|
261
|
+
if (!parsed.ok) {
|
|
263
262
|
kept.push(line); // malformed — never ours to delete
|
|
264
263
|
continue;
|
|
265
264
|
}
|
|
265
|
+
const event = parsed.value as TelemetryEvent;
|
|
266
266
|
if (durable.rows.has(canonicalRow(stampRepo(event, consumerSlug)))) {
|
|
267
267
|
removed++;
|
|
268
268
|
continue;
|
|
@@ -304,7 +304,7 @@ function fsyncFile(filePath: string): void {
|
|
|
304
304
|
// ---------------------------------------------------------------------------
|
|
305
305
|
|
|
306
306
|
/**
|
|
307
|
-
* Run harvest across all consumers listed in `
|
|
307
|
+
* Run harvest across all consumers listed in `harvest/consumers.md`.
|
|
308
308
|
* Deduplicates the store by row content after collecting all rows.
|
|
309
309
|
*/
|
|
310
310
|
export function runHarvest(bkitRoot: string): HarvestResult {
|
|
@@ -391,7 +391,7 @@ export function runHarvest(bkitRoot: string): HarvestResult {
|
|
|
391
391
|
);
|
|
392
392
|
if (totalPruned > 0) {
|
|
393
393
|
console.error(
|
|
394
|
-
`[bkit-harvest] ${totalPruned} row(s) now exist ONLY in ${HARVEST_DEST_DIR}/ —
|
|
394
|
+
`[bkit-harvest] ${totalPruned} row(s) now exist ONLY in ${HARVEST_DEST_DIR}/ (gitignored) — back it up to make them durable.`,
|
|
395
395
|
);
|
|
396
396
|
}
|
|
397
397
|
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
import * as path from "node:path";
|
|
6
|
-
import {
|
|
7
|
-
detectOpencodeProvider,
|
|
8
|
-
detectOpencodeProviders,
|
|
9
|
-
getInstallingVersion,
|
|
10
|
-
} from "./install.js";
|
|
6
|
+
import { detectOpencodeProvider, detectOpencodeProviders } from "./install.js";
|
|
11
7
|
import { type ModuleFlag } from "../../cli.js";
|
|
12
8
|
import { OPENCODE_PROVIDERS } from "../../shared/egress.js";
|
|
9
|
+
import { readJsonFile } from "../../shared/json.js";
|
|
13
10
|
import { LOG_PREFIX, setLogPrefix } from "../../shared/log-prefix.js";
|
|
11
|
+
import { readInstallingVersion } from "../../shared/package-json.js";
|
|
14
12
|
import { getCoreRoot, getSharedRoot, getTemplatesRoot } from "../../shared/package-roots.js";
|
|
15
13
|
import { runPreflight } from "../../checks/before/index.js";
|
|
16
14
|
import {
|
|
@@ -22,11 +20,47 @@ import type { SuppressionNote } from "../../checks/after/suppression.js";
|
|
|
22
20
|
import { collectTips } from "../../checks/tips/index.js";
|
|
23
21
|
import { parseDotenv } from "../../install/cloud-env.js";
|
|
24
22
|
import { detectInstalledHostModules } from "../../install/hosts.js";
|
|
23
|
+
import { parseFrontmatter } from "../../render/hosts.js";
|
|
24
|
+
|
|
25
|
+
/** One distinct opencode model pin and how many agent files carry it. */
|
|
26
|
+
export interface OpencodeModelPin {
|
|
27
|
+
model: string;
|
|
28
|
+
agents: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The `model:` pins in the frontmatter of `.opencode/agents/*.md` — where bkit renders the
|
|
33
|
+
* opencode per-agent pins — grouped by model, most-used first (ties by model id). `[]` when
|
|
34
|
+
* the directory is absent or no agent carries a pin.
|
|
35
|
+
*/
|
|
36
|
+
export function readOpencodeModelPins(cwd: string): OpencodeModelPin[] {
|
|
37
|
+
const agentsDir = path.join(cwd, ".opencode", "agents");
|
|
38
|
+
if (!fs.existsSync(agentsDir)) return [];
|
|
39
|
+
const counts = new Map<string, number>();
|
|
40
|
+
for (const name of fs.readdirSync(agentsDir)) {
|
|
41
|
+
if (!name.endsWith(".md")) continue;
|
|
42
|
+
const content = fs.readFileSync(path.join(agentsDir, name), "utf-8");
|
|
43
|
+
const fm = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
44
|
+
const model = fm ? parseFrontmatter(fm[1]).get("model")?.trim() : undefined;
|
|
45
|
+
if (model) counts.set(model, (counts.get(model) ?? 0) + 1);
|
|
46
|
+
}
|
|
47
|
+
return [...counts]
|
|
48
|
+
.map(([model, agents]) => ({ model, agents }))
|
|
49
|
+
.sort((a, b) => b.agents - a.agents || a.model.localeCompare(b.model));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** `model: <id>` for one distinct pin, else `models: <id> (N agents), …`. */
|
|
53
|
+
export function formatOpencodeModelPins(pins: readonly OpencodeModelPin[]): string {
|
|
54
|
+
if (pins.length === 0) return "model: none pinned in .opencode/agents/";
|
|
55
|
+
if (pins.length === 1) return `model: ${pins[0].model}`;
|
|
56
|
+
const list = pins.map((p) => `${p.model} (${p.agents} agent${p.agents === 1 ? "" : "s"})`);
|
|
57
|
+
return `models: ${list.join(", ")}`;
|
|
58
|
+
}
|
|
25
59
|
|
|
26
60
|
/**
|
|
27
61
|
* `bkit status` — read-only host/provider status.
|
|
28
|
-
* Reports current host+provider sampled from .
|
|
29
|
-
*
|
|
62
|
+
* Reports current host+provider sampled from .claude/, .cursor/, package.json and the
|
|
63
|
+
* opencode agent model pins in .opencode/agents/. Writes nothing.
|
|
30
64
|
*/
|
|
31
65
|
export function runStatus(cwd: string, logPrefix: string): void {
|
|
32
66
|
console.log(`${logPrefix} Host/provider status (read-only — no writes)`);
|
|
@@ -38,13 +72,11 @@ export function runStatus(cwd: string, logPrefix: string): void {
|
|
|
38
72
|
const claudeSettingsPath = path.join(claudeDir, "settings.json");
|
|
39
73
|
let claudeModel = "claude (default)";
|
|
40
74
|
if (claudePresent && fs.existsSync(claudeSettingsPath)) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
};
|
|
75
|
+
// Best-effort: an unreadable settings file keeps the default label.
|
|
76
|
+
const read = readJsonFile(claudeSettingsPath);
|
|
77
|
+
if (read.ok && typeof read.value === "object" && read.value !== null) {
|
|
78
|
+
const settings = read.value as { model?: string };
|
|
45
79
|
if (settings.model) claudeModel = settings.model;
|
|
46
|
-
} catch {
|
|
47
|
-
// best-effort
|
|
48
80
|
}
|
|
49
81
|
}
|
|
50
82
|
console.log(
|
|
@@ -63,22 +95,19 @@ export function runStatus(cwd: string, logPrefix: string): void {
|
|
|
63
95
|
const activeOpencodeProvider = detectOpencodeProvider(cwd);
|
|
64
96
|
// All installed providers.
|
|
65
97
|
const allOpencodeProviders = detectOpencodeProviders(cwd);
|
|
66
|
-
|
|
98
|
+
// bkit pins models per agent in .opencode/agents/*.md frontmatter; opencode.json carries
|
|
99
|
+
// only the consumer's optional top-level default `model`.
|
|
100
|
+
let opencodeModel = formatOpencodeModelPins(readOpencodeModelPins(cwd));
|
|
67
101
|
const opencodeJsonPath = path.join(opencodeDir, "opencode.json");
|
|
68
102
|
if (opencodePresent && fs.existsSync(opencodeJsonPath)) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
};
|
|
74
|
-
if (cfg.model
|
|
75
|
-
|
|
76
|
-
if (opencodeModel === "unknown" && cfg.models) {
|
|
77
|
-
const modelKeys = Object.keys(cfg.models);
|
|
78
|
-
if (modelKeys.length > 0) opencodeModel = `${modelKeys.length} model(s) configured`;
|
|
103
|
+
const read = readJsonFile(opencodeJsonPath);
|
|
104
|
+
if (!read.ok || read.value === null || typeof read.value !== "object") {
|
|
105
|
+
opencodeModel += "; opencode.json: parse-error";
|
|
106
|
+
} else {
|
|
107
|
+
const cfg = read.value as { model?: unknown };
|
|
108
|
+
if (typeof cfg.model === "string" && cfg.model) {
|
|
109
|
+
opencodeModel += `; default model: ${cfg.model}`;
|
|
79
110
|
}
|
|
80
|
-
} catch {
|
|
81
|
-
opencodeModel = "parse-error";
|
|
82
111
|
}
|
|
83
112
|
}
|
|
84
113
|
let opencodeProviderDisplay: string;
|
|
@@ -103,7 +132,7 @@ export function runStatus(cwd: string, logPrefix: string): void {
|
|
|
103
132
|
const antigravityPresent = detectInstalledHostModules(cwd).has("antigravity");
|
|
104
133
|
|
|
105
134
|
const opencodeStatus = opencodePresent
|
|
106
|
-
? `INSTALLED (${providerLabel}: ${opencodeProviderDisplay} /
|
|
135
|
+
? `INSTALLED (${providerLabel}: ${opencodeProviderDisplay} / ${opencodeModel})`
|
|
107
136
|
: "absent (run: bkit install --opencode=<provider>)";
|
|
108
137
|
console.log(`${logPrefix} opencode: ${opencodeStatus}`);
|
|
109
138
|
console.log(
|
|
@@ -168,7 +197,7 @@ export async function runDoctor(
|
|
|
168
197
|
writeAdvisoriesArtifact(allFindings, {
|
|
169
198
|
cwd: process.cwd(),
|
|
170
199
|
mode: "doctor",
|
|
171
|
-
version:
|
|
200
|
+
version: readInstallingVersion(),
|
|
172
201
|
logPrefix: LOG_PREFIX,
|
|
173
202
|
suppressed,
|
|
174
203
|
tips,
|
|
@@ -5,14 +5,15 @@ import * as fs from "node:fs";
|
|
|
5
5
|
import * as path from "node:path";
|
|
6
6
|
import { OPENCODE_PROVIDERS } from "../../shared/egress.js";
|
|
7
7
|
import { type ModuleFlag, type CloudVariant } from "../../cli.js";
|
|
8
|
-
import {
|
|
8
|
+
import { readInstallingVersion } from "../../shared/package-json.js";
|
|
9
9
|
import { type ModuleContext, dispatchModules } from "../../install/modules/index.js";
|
|
10
10
|
import {
|
|
11
11
|
type IssueTracker,
|
|
12
12
|
DEFAULT_ISSUE_TRACKER,
|
|
13
|
-
parseIssueTracker,
|
|
14
13
|
type ModuleName,
|
|
15
14
|
} from "../../install/manifest.js";
|
|
15
|
+
import { parseJson, readJsonFile } from "../../shared/json.js";
|
|
16
|
+
import { readBkitConfig } from "../../shared/settings.js";
|
|
16
17
|
import { LOG_PREFIX, setLogPrefix } from "../../shared/log-prefix.js";
|
|
17
18
|
import type { ParsedArgs } from "../../cli.js";
|
|
18
19
|
import { detectInstalledModules, reportCheckDrift } from "./check.js";
|
|
@@ -37,7 +38,7 @@ import {
|
|
|
37
38
|
} from "../../render/models.js";
|
|
38
39
|
import { getBkitDocsRoot } from "../../shared/package-roots.js";
|
|
39
40
|
import type { WriteSet } from "../../install/write.js";
|
|
40
|
-
import { type UninstallContext, runUninstall } from "./uninstall.js";
|
|
41
|
+
import { type UninstallContext, removeUnusedTrackerMcpEntries, runUninstall } from "./uninstall.js";
|
|
41
42
|
|
|
42
43
|
// ---------------------------------------------------------------------------
|
|
43
44
|
// Staging scratch area
|
|
@@ -86,24 +87,6 @@ export function requireOpencodeProvider(cwd: string, context: string): string {
|
|
|
86
87
|
return detected;
|
|
87
88
|
}
|
|
88
89
|
|
|
89
|
-
/**
|
|
90
|
-
* Read the installing bkit version from the package root's package.json.
|
|
91
|
-
* Returns "0.0.0" when unreadable (e.g. dev tree without a package.json at the
|
|
92
|
-
* resolved root) — keeps the advisories artifact informational, not fatal.
|
|
93
|
-
*/
|
|
94
|
-
export function getInstallingVersion(): string {
|
|
95
|
-
try {
|
|
96
|
-
const pkgJsonPath = path.join(getPkgRoot(), "package.json");
|
|
97
|
-
if (fs.existsSync(pkgJsonPath)) {
|
|
98
|
-
const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8")) as { version?: string };
|
|
99
|
-
return pkg.version ?? "0.0.0";
|
|
100
|
-
}
|
|
101
|
-
} catch {
|
|
102
|
-
return "0.0.0"; // best-effort: unreadable/garbled package.json
|
|
103
|
-
}
|
|
104
|
-
return "0.0.0";
|
|
105
|
-
}
|
|
106
|
-
|
|
107
90
|
/**
|
|
108
91
|
* Render a resolved module set back into valid CLI flags for
|
|
109
92
|
* recovery-hint text. Skips core (implicit) and spells opt-ins with their value flags.
|
|
@@ -163,37 +146,19 @@ export function validateCloudTrackerMatch(
|
|
|
163
146
|
* smuggle an unsupported provider into the render path.
|
|
164
147
|
*/
|
|
165
148
|
export function detectOpencodeProvider(cwd: string): string | null {
|
|
166
|
-
const
|
|
167
|
-
if (
|
|
168
|
-
try {
|
|
169
|
-
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8")) as {
|
|
170
|
-
bkit?: { opencodeProvider?: unknown };
|
|
171
|
-
};
|
|
172
|
-
const stored = pkg.bkit?.opencodeProvider;
|
|
173
|
-
if (
|
|
174
|
-
typeof stored === "string" &&
|
|
175
|
-
(OPENCODE_PROVIDERS as readonly string[]).includes(stored)
|
|
176
|
-
) {
|
|
177
|
-
return stored;
|
|
178
|
-
}
|
|
179
|
-
} catch {
|
|
180
|
-
// unparseable package.json — fall through to opencode.json detection
|
|
181
|
-
}
|
|
182
|
-
}
|
|
149
|
+
const stored = readBkitConfig(cwd).opencodeProvider;
|
|
150
|
+
if (stored !== null) return stored;
|
|
183
151
|
const jsonPath = path.join(cwd, ".opencode", "opencode.json");
|
|
184
152
|
if (!fs.existsSync(jsonPath)) return null;
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
}
|
|
195
|
-
} catch {
|
|
196
|
-
return null; // unparseable opencode.json — fall back to the default provider
|
|
153
|
+
// Unparseable opencode.json — fall back to the default provider.
|
|
154
|
+
const read = readJsonFile(jsonPath);
|
|
155
|
+
if (!read.ok || typeof read.value !== "object" || read.value === null) return null;
|
|
156
|
+
const cfg = read.value as { provider?: Record<string, unknown> };
|
|
157
|
+
if (cfg.provider && typeof cfg.provider === "object") {
|
|
158
|
+
const first = Object.keys(cfg.provider)[0];
|
|
159
|
+
if (!first) return null;
|
|
160
|
+
// Zen's opencode.json block is keyed by the built-in id `opencode`, not the CLI key.
|
|
161
|
+
return first === "opencode" ? "opencode-zen" : first;
|
|
197
162
|
}
|
|
198
163
|
return null;
|
|
199
164
|
}
|
|
@@ -204,23 +169,7 @@ export function detectOpencodeProvider(cwd: string): string | null {
|
|
|
204
169
|
* the field is absent.
|
|
205
170
|
*/
|
|
206
171
|
export function detectOpencodeProviders(cwd: string): string[] {
|
|
207
|
-
|
|
208
|
-
if (!fs.existsSync(pkgPath)) return [];
|
|
209
|
-
try {
|
|
210
|
-
const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf-8")) as {
|
|
211
|
-
bkit?: { opencodeProviders?: unknown };
|
|
212
|
-
};
|
|
213
|
-
const arr = pkg.bkit?.opencodeProviders;
|
|
214
|
-
if (Array.isArray(arr)) {
|
|
215
|
-
return arr.filter(
|
|
216
|
-
(v): v is string =>
|
|
217
|
-
typeof v === "string" && (OPENCODE_PROVIDERS as readonly string[]).includes(v),
|
|
218
|
-
);
|
|
219
|
-
}
|
|
220
|
-
} catch {
|
|
221
|
-
// unparseable — return empty
|
|
222
|
-
}
|
|
223
|
-
return [];
|
|
172
|
+
return readBkitConfig(cwd).opencodeProviders;
|
|
224
173
|
}
|
|
225
174
|
|
|
226
175
|
/**
|
|
@@ -297,24 +246,8 @@ export async function runInstall(
|
|
|
297
246
|
// already-recorded tracker.
|
|
298
247
|
// Resolved BEFORE preflight: preflight's tracker-dependent detectors grade the tracker
|
|
299
248
|
// this run INSTALLS, not the one on disk from the previous run. Read-only — no writes here.
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
const consumerPkgPath = path.join(process.cwd(), "package.json");
|
|
303
|
-
if (fs.existsSync(consumerPkgPath)) {
|
|
304
|
-
try {
|
|
305
|
-
const pkg = JSON.parse(fs.readFileSync(consumerPkgPath, "utf-8")) as Record<
|
|
306
|
-
string,
|
|
307
|
-
unknown
|
|
308
|
-
>;
|
|
309
|
-
const bkitField = pkg.bkit as Record<string, unknown> | undefined;
|
|
310
|
-
const stored = parseIssueTracker(bkitField?.issueTracker);
|
|
311
|
-
if (stored !== null) issueTracker = stored;
|
|
312
|
-
} catch {
|
|
313
|
-
// non-fatal — keep default
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
if (tracker !== null) issueTracker = tracker;
|
|
317
|
-
}
|
|
249
|
+
const recordedTracker: IssueTracker = readBkitConfig(process.cwd()).issueTracker;
|
|
250
|
+
const issueTracker: IssueTracker = tracker ?? recordedTracker;
|
|
318
251
|
|
|
319
252
|
// --- Phase 1: Preflight (read-only, before any writes) ---
|
|
320
253
|
// Must run BEFORE resolveTokens to short-circuit cleanly on blockers.
|
|
@@ -332,7 +265,7 @@ export async function runInstall(
|
|
|
332
265
|
writeAdvisoriesArtifact(blockers, {
|
|
333
266
|
cwd: process.cwd(),
|
|
334
267
|
mode: "upgrade",
|
|
335
|
-
version:
|
|
268
|
+
version: readInstallingVersion(),
|
|
336
269
|
logPrefix: LOG_PREFIX,
|
|
337
270
|
});
|
|
338
271
|
return;
|
|
@@ -447,36 +380,40 @@ export async function runInstall(
|
|
|
447
380
|
if (fs.existsSync(consumerPkgPath2)) {
|
|
448
381
|
try {
|
|
449
382
|
const raw = fs.readFileSync(consumerPkgPath2, "utf-8");
|
|
450
|
-
|
|
451
|
-
const
|
|
452
|
-
if (
|
|
453
|
-
|
|
454
|
-
bkit
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
383
|
+
// A package.json that is not JSON is left as-is (the preflight blocker reports it).
|
|
384
|
+
const parsed = parseJson(raw);
|
|
385
|
+
if (parsed.ok) {
|
|
386
|
+
const pkg = parsed.value as Record<string, unknown>;
|
|
387
|
+
const bkit = (pkg.bkit ?? {}) as Record<string, unknown>;
|
|
388
|
+
if (persistTracker) bkit.issueTracker = tracker;
|
|
389
|
+
if (persistProvider) {
|
|
390
|
+
bkit.opencodeProvider = opencodeProvider; // active (drives agent frontmatter)
|
|
391
|
+
// Update providers array (deduped).
|
|
392
|
+
const existingArr: string[] = Array.isArray(bkit.opencodeProviders)
|
|
393
|
+
? [...(bkit.opencodeProviders as string[])]
|
|
394
|
+
: [];
|
|
395
|
+
if (!existingArr.includes(opencodeProvider!)) {
|
|
396
|
+
existingArr.push(opencodeProvider!);
|
|
397
|
+
}
|
|
398
|
+
bkit.opencodeProviders = existingArr;
|
|
461
399
|
}
|
|
462
|
-
bkit
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
JSON.stringify(pkg, null, indent) + trailingNewline,
|
|
471
|
-
"utf-8",
|
|
472
|
-
);
|
|
473
|
-
if (persistTracker) {
|
|
474
|
-
console.log(`${LOG_PREFIX} Set bkit.issueTracker = "${tracker}" in package.json`);
|
|
475
|
-
}
|
|
476
|
-
if (persistProvider) {
|
|
477
|
-
console.log(
|
|
478
|
-
`${LOG_PREFIX} Set bkit.opencodeProvider = "${opencodeProvider}" and updated bkit.opencodeProviders in package.json`,
|
|
400
|
+
pkg.bkit = bkit;
|
|
401
|
+
const indentMatch = raw.match(/\n([ \t]+)"/);
|
|
402
|
+
const indent = indentMatch ? indentMatch[1] : " ";
|
|
403
|
+
const trailingNewline = raw.endsWith("\n") ? "\n" : "";
|
|
404
|
+
fs.writeFileSync(
|
|
405
|
+
consumerPkgPath2,
|
|
406
|
+
JSON.stringify(pkg, null, indent) + trailingNewline,
|
|
407
|
+
"utf-8",
|
|
479
408
|
);
|
|
409
|
+
if (persistTracker) {
|
|
410
|
+
console.log(`${LOG_PREFIX} Set bkit.issueTracker = "${tracker}" in package.json`);
|
|
411
|
+
}
|
|
412
|
+
if (persistProvider) {
|
|
413
|
+
console.log(
|
|
414
|
+
`${LOG_PREFIX} Set bkit.opencodeProvider = "${opencodeProvider}" and updated bkit.opencodeProviders in package.json`,
|
|
415
|
+
);
|
|
416
|
+
}
|
|
480
417
|
}
|
|
481
418
|
} catch {
|
|
482
419
|
// non-fatal
|
|
@@ -484,6 +421,13 @@ export async function runInstall(
|
|
|
484
421
|
}
|
|
485
422
|
}
|
|
486
423
|
|
|
424
|
+
// Tracker switch: drop the bkit MCP entries the new tracker does not use, while each still
|
|
425
|
+
// equals bkit's template (an edited one stays, with a warning). Runs before dispatch so the
|
|
426
|
+
// `.bkit/version` hashes core records cover the final file content.
|
|
427
|
+
if (!dryRun && tracker !== null && tracker !== recordedTracker) {
|
|
428
|
+
removeUnusedTrackerMcpEntries(process.cwd(), tracker, dryRun, ws, LOG_PREFIX);
|
|
429
|
+
}
|
|
430
|
+
|
|
487
431
|
const ctx: ModuleContext = {
|
|
488
432
|
dryRun,
|
|
489
433
|
tokens,
|
|
@@ -500,7 +444,7 @@ export async function runInstall(
|
|
|
500
444
|
issueTracker,
|
|
501
445
|
cloudVariant,
|
|
502
446
|
// Stamped into every rendered agent + command as the managed-version marker.
|
|
503
|
-
version:
|
|
447
|
+
version: readInstallingVersion(),
|
|
504
448
|
// Full host set for this run: dispatched ∪ already-on-disk. Read by the Antigravity
|
|
505
449
|
// module to warn when Codex is also installed (both hosts' `bkit-*` workflow skills
|
|
506
450
|
// then surface in Antigravity's skill selector).
|
|
@@ -559,16 +503,8 @@ export async function runInstall(
|
|
|
559
503
|
// Runs for both install AND check — detectors are read-only, so check produces
|
|
560
504
|
// the same advisory set as install would emit against the same filesystem state.
|
|
561
505
|
// Changelog version-delta header (A7): surface what changed in the installed version.
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
if (fs.existsSync(pkgJsonPath)) {
|
|
565
|
-
const pkg = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8")) as { version?: string };
|
|
566
|
-
const deltaHeader = readChangelogVersionDelta(pkg.version ?? "");
|
|
567
|
-
if (deltaHeader) console.log(deltaHeader);
|
|
568
|
-
}
|
|
569
|
-
} catch (err) {
|
|
570
|
-
void err; // Non-fatal — changelog header is informational
|
|
571
|
-
}
|
|
506
|
+
const deltaHeader = readChangelogVersionDelta(readInstallingVersion());
|
|
507
|
+
if (deltaHeader) console.log(deltaHeader);
|
|
572
508
|
const suppressed: SuppressionNote[] = [];
|
|
573
509
|
const postFindings = runPostInstallCheck(ctx.advisories, process.cwd(), suppressed);
|
|
574
510
|
if (postWriteBlockers.length > 0) {
|
|
@@ -589,7 +525,7 @@ export async function runInstall(
|
|
|
589
525
|
writeAdvisoriesArtifact(postFindings, {
|
|
590
526
|
cwd: process.cwd(),
|
|
591
527
|
mode: upgradeReport ? "upgrade" : dryRun ? "check" : "install",
|
|
592
|
-
version:
|
|
528
|
+
version: readInstallingVersion(),
|
|
593
529
|
logPrefix: LOG_PREFIX,
|
|
594
530
|
suppressed,
|
|
595
531
|
tips,
|