Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .agents/setup
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ if [[ "$(node -p 'process.versions.node.split(".")[0]')" != "$major" ]]; then
fi
pin="$(node -p 'JSON.parse(require("node:fs").readFileSync("package.json", "utf8")).packageManager || "pnpm"')"
manager="${pin%%@*}"
corepack enable
if ! corepack enable >/dev/null 2>&1; then
shims="$HOME/.local/bin"
mkdir -p "$shims"
corepack enable --install-directory "$shims"
export PATH="$shims:$PATH"
fi
if [[ "$pin" == *@* ]]; then
corepack prepare "$pin" --activate
fi
Expand Down
3 changes: 2 additions & 1 deletion .agents/skills/verify-dms-database/journeys/extending.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ export const journeys = guarded([
const accounts = tableOf(schemas.body, "vault", "accounts");
const instances = await db(ctx, "shop instances", "GET", "/tables/instances?schema=shop");
const none = await db(ctx, "demo instances", "GET", "/tables/instances?schema=demo");
const fields = pick(orders, "fields");
await ctx.verify("the introspection", [
check("orders has its declared columns", ["_id", "number", "customer_id", "status", "total", "created_at"].every((name) => isRow(pick(orders, "fields")) && name in (/** @type {Record<string, unknown>} */ (pick(orders, "fields")))), pick(orders, "fields")),
check("orders has its declared columns", ["_id", "number", "customer_id", "status", "total", "created_at"].every((name) => isRow(fields) && name in fields), fields),
check("orders has the indexes number, customer_id and the status_created group", JSON.stringify(Object.keys(pick(orders, "indexes") ?? {}).sort()) === JSON.stringify(["customer_id", "number", "status_created"]), pick(orders, "indexes")),
check("orders points to customers through customer_id", list(orders, "relations").some((relation) => text(relation, "fromField") === "customer_id" && text(relation, "toTable") === "customers"), pick(orders, "relations")),
check("accounts carries hashed, encrypted and localized modifiers on their fields", JSON.stringify(pick(accounts, "modifiers")) === JSON.stringify({ password: ["HashModifier"], card_number: ["EncryptionModifier"], display_name: ["LocalizationModifier"] }), pick(accounts, "modifiers")),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { db, isRow, isText, list, pick } from "../../database.mjs";
* @typedef {import("../../database.mjs").Row} Row
*/

const STAGED_CLASSES = /** @type {[string, abstract new (...args: never[]) => object][]} */ ([
/** @type {[string, abstract new (...args: never[]) => object][]} */
const STAGED_CLASSES = [
["Schema", Schema],
["SchemaInstance", SchemaInstance],
["Table", Table],
Expand All @@ -17,7 +18,7 @@ const STAGED_CLASSES = /** @type {[string, abstract new (...args: never[]) => ob
["Datum", Datum],
["Query", Query],
["ValueProxy", ValueProxy],
]);
];

/**
* The query console's wire form of a staged value: a staged object travels as its class and stages, the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"useDefineForClassFields": true,
"types": ["node"],
"skipLibCheck": true
"types": ["node"]
},
"include": ["./src/**/*.ts"]
}
2 changes: 1 addition & 1 deletion .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"releaseName": "v${version}"
},
"hooks": {
"before:init": ["pnpm lint", "pnpm format:check"],
"before:init": ["pnpm typecheck", "pnpm lint", "pnpm format:check"],
"after:bump": "git add CHANGELOG.md"
},
"plugins": {
Expand Down
4 changes: 4 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ Verify a boundary against the imports a developer or agent would plausibly write
| String-keyed object tables are read through own keys only | `antelopejs/no-inherited-key-lookup` |
| A type guard checks each member it narrows to; keys with `Object.hasOwn` | `antelopejs/no-presence-only-type-guard` |
| A type guard checks the nested elements and values it claims | review; no tool |
| `Object.assign` writes no `unknown`, `any` or mistyped value over a field | `antelopejs/no-unsafe-object-assign` |
| Every file type-aware lint reads is listed by a tsconfig | `antelopejs/require-tsconfig-include` |
| Params ≤ 5, function ≤ 120 lines, file ≤ 500 lines, depth ≤ 4, complexity ≤ 20 | `eslint/max-*`, `eslint/complexity` |
| Cleanup preserves declarations, runtime exports and DMS auto-imports | `antelopejs-api-diff <base-ref>` |
Expand All @@ -128,6 +129,9 @@ Verify a boundary against the imports a developer or agent would plausibly write
| A CI gate reads `needs.<id>` only of jobs in its `needs` | `antelopejs-sync --check` |
| Entry-only rules exempt no tracked outsider | `antelopejs-sync --check` |
| A DMS layer's `build/backend-boundary.ts` is the pack's plugin | `antelopejs-sync --check` |
| No `skipLibCheck` in the root tsconfig or one `typecheck` or `build` uses | Reported by `antelopejs-sync` (note only) |
| `build` skips the lib check only over what `typecheck` checks | Reported by `antelopejs-sync` (note only) |
| `release` runs `typecheck` | Reported by `antelopejs-sync` (note only) |
| A test names the wrong implementation it catches | review; no tool |

<!-- antelopejs-guardrails:end -->
Loading
Loading