salvage 2026-11-06: uncommitted work from src/mosaic-stack-rocko-147 (disk cleanup #824)
This commit is contained in:
1 parent
8686c7e84c
commit
38c334dfe1
5 files changed
+29
-4
No files matched your search
@@ -592,3 +592,21 @@ Mapping JSON contains `models`,
|
||||
`families` and optional per-role `instances` selections. Jason checks and installs
|
||||
the output in Mos's window with the PM run idle; re-pin in that same window.
|
||||
Never migrate the live file from an agent session.
|
||||
|
||||
|
||||
### Local project records (`mosaic project`)
|
||||
|
||||
`mosaic project init <business> <project>` creates the declared project's
|
||||
separate local record repository, with layout version 1, package-validated JSON
|
||||
templates, Markdown spec/docs and its first commit authored as the business's
|
||||
human. Init refuses an agent environment, an undeclared project or a non-empty
|
||||
directory. No bus or remote is involved.
|
||||
|
||||
`mosaic project check <business> <project>` validates project metadata, every
|
||||
record, filename/ID agreement and the fixed layout, naming each problem. It
|
||||
exits 0 when valid, 2 for project/record problems, 3 for configuration problems
|
||||
and 4 for usage. The optional business project `repo` is a normalized absolute
|
||||
record-repository path; the default is
|
||||
`<dataRoot>/projects/<business>/<project>/`. `root` remains the code checkout.
|
||||
The package README describes schemas and the shared agent record writer; agent
|
||||
writes never enter `spec/`, never absorb pending edits and refuse remotes.
|
||||
@@ -176,11 +176,15 @@ export function validateBusinessDocument(document, file, { rolesDir }) {
|
||||
for (const [id, entry] of Object.entries(document.projects)) {
|
||||
requireId(id, `${file} project id`);
|
||||
requireObject(entry, `${file} projects.${id}`);
|
||||
rejectUnknownKeys(entry, ["root"], `${file} projects.${id}`);
|
||||
rejectUnknownKeys(entry, ["root", "repo"], `${file} projects.${id}`);
|
||||
if (typeof entry.root !== "string" || !isAbsolute(entry.root) || normalize(entry.root) !== entry.root || entry.root.includes("\0")) {
|
||||
refuse(`${file} projects.${id}.root must be a normalized absolute path`);
|
||||
}
|
||||
projects[id] = { root: entry.root };
|
||||
if (Object.hasOwn(entry, "repo") && (typeof entry.repo !== "string" || !isAbsolute(entry.repo) ||
|
||||
normalize(entry.repo) !== entry.repo || entry.repo.includes("\0"))) {
|
||||
refuse(`${file} projects.${id}.repo must be a normalized absolute path`);
|
||||
}
|
||||
projects[id] = { root: entry.root, ...(Object.hasOwn(entry, "repo") ? { repo: entry.repo } : {}) };
|
||||
}
|
||||
|
||||
const tracker = checkTracker(document.tracker, file);
|
||||
|
||||
@@ -13,6 +13,7 @@ import { join } from "node:path";
|
||||
import { createInterface } from "node:readline/promises";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { BINDING_NAME } from "../../discord/src/binding.mjs";
|
||||
import { projectCommand, PROJECT_USAGE } from "./project.mjs";
|
||||
import { limitsCommand, LIMITS_USAGE } from "./limits.mjs";
|
||||
import { CliError } from "./errors.mjs";
|
||||
import { bootConfig, loadSystem, socketPath } from "./config.mjs";
|
||||
@@ -28,6 +29,7 @@ import { SeatError } from "../../seat/src/seat.mjs";
|
||||
|
||||
export const USAGE = `usage:
|
||||
${LIMITS_USAGE}
|
||||
${PROJECT_USAGE}
|
||||
mosaic inbox [--business <id>] [--json] [--tester]
|
||||
mosaic decide <decision> <option> [--note <text>] [--yes] [--business <id>]
|
||||
mosaic tasks [--business <id>] [--json] [--tester]
|
||||
@@ -395,6 +397,7 @@ export async function main(argv, io = { env: process.env, stdin: process.stdin,
|
||||
if (argv.length === 0) return app(io, deps);
|
||||
const [verb, ...rest] = argv;
|
||||
if (["inbox", "decide", "tasks", "agents", "trail"].includes(verb)) return human(verb, rest, io, deps);
|
||||
if (verb === "project") return projectCommand(rest, io, deps);
|
||||
if (verb === "limits") return limitsCommand(rest,io,p=>callFor(p,io,deps));
|
||||
if (verb === "talk") return talk(rest, io, deps);
|
||||
if (verb === "follow") return talk(rest, io, deps, true);
|
||||
|
||||
+1
-1
@@ -30,6 +30,6 @@ if [ "${1:-}" = business ]; then
|
||||
exec node "$REPO/packages/business/src/cli.mjs" "$@"
|
||||
fi
|
||||
case "${1:-}" in
|
||||
limits|inbox|decide|tasks|agents|trail|talk|stop|launches|bus) exec node "$REPO/packages/cli/src/cli.mjs" "$@" ;;
|
||||
project|limits|inbox|decide|tasks|agents|trail|talk|stop|launches|bus) exec node "$REPO/packages/cli/src/cli.mjs" "$@" ;;
|
||||
esac
|
||||
exec node "$REPO/packages/seat/src/cli.mjs" "$@"
|
||||
@@ -23,7 +23,7 @@ copy_root() { [[ "$ID" =~ ^[0-9a-f]{40}$ ]] || die '--copy must be a full 40-cha
|
||||
COPY_PATHS=(
|
||||
scripts/mosaic scripts/mosaic-config.mjs
|
||||
adapters roles RELEASE package.json package-lock.json
|
||||
packages/bus/src packages/bus/schema.sql packages/business/src packages/cli/src
|
||||
packages/bus/src packages/bus/schema.sql packages/business/src packages/cli/src packages/project
|
||||
packages/conversation/src packages/discord/src packages/discord/bin packages/discord/extension packages/harness/src
|
||||
packages/seat/src packages/tasks/src packages/tasks/fields.json packages/tasks/requirements.json
|
||||
packages/webui/src packages/webui/README.md packages/cli/README.md
|
||||
|
||||
Reference in new issue
Block a user