aiongg
55f823c4fa
Typed schema for Kysely: scripts/gen-db-types.ts writes src/db/types.ts from a freshly migrated SQLite database (checked by pnpm check); DB is the typed interface; main./temp. table names in Kysely queries are rewritten on Postgres as raw statements are
2026-11-21 20:09:11 +00:00
aiongg
cdad9b309a
Portable SQL helpers (src/db/portable.ts) with tests on both dialects; pnpm test:pg:suite runs the SQLite suite on a throwaway Postgres: a test preload redirects connectDb on SQLite paths to per-path databases copied from a migrated template, dropped at exit, a reporter prints totals and failures per file; sqliteOnly skips for tests that need SQLite itself
2026-11-21 18:28:03 +00:00
aiongg
6d32ef9d17
Merge D2: schema translator, schema.pg.sql, migration under lock
...
# Conflicts:
# package.json
# tsconfig.json
2026-11-21 17:58:12 +00:00
aiongg
7e268b01ba
Postgres schema: src/db/pg-schema.ts translates schema.sql and the added columns and indexes into src/schema.pg.sql with a strict allowlist (bigint identity keys, identity rowid on rowid tables, text COLLATE "C", citext for NOCASE, tsvector columns with GIN for FTS5, hand-written plpgsql triggers pinned to their SQLite text, compat functions instr/julianday/json_valid/group_concat); pnpm check fails when the file is stale; applyPgSchema runs it under pg_advisory_xact_lock; scripts/pg-schema-compare.ts lists the differences from the SQLite schema
2026-11-21 17:57:16 +00:00
aiongg
4940e4d6ab
Postgres engine for the Db handle: PostgresDialect on pg.Pool (pool size per process role, TLS verify-full to remote hosts, statement_timeout startup parameter, node:sqlite value shapes), reads as REPEATABLE READ READ ONLY snapshots, writes as READ COMMITTED under one advisory writer lock with lock_timeout, ? and :name rewritten to $n, query events on both backends; AUTOCRAFT_DB_URL selects Postgres (refused when AUTOCRAFT_DB differs); isLockTimeout/isConflict; scripts/pg-test.sh throwaway Postgres in Docker and pnpm test:pg; scripts/latency-proxy.ts; testDb helper and Postgres behaviour tests
2026-11-21 17:54:05 +00:00
aiongg
99cd1cd07d
Async codemod for the Db interface: awaits database calls and calls of functions that become async to a fixpoint over the program (TypeScript 5 as the ts5 tool dependency), rewrites BEGIN IMMEDIATE/BEGIN blocks into db.write/db.read, array callbacks into sequential helpers (src/async-seq.ts), and the API to Db/Statement, script, inTransaction, for await, connectDb/openDb; reports residue and read-then-write candidates per subsystem (scripts/codemod-async-report.md, from main). test/no-floating-promises.test.ts fails on unawaited promise statements outside test/floating-promises.allow
2026-11-21 16:41:31 +00:00
aiongg
96b265e331
Db interface (src/db/index.ts) for the SQLite and Postgres backends; kysely and pg dependencies
2026-11-21 16:19:07 +00:00
aiongg
c77b23a302
Rename the server admin CLI to autocraft-server; document the MCP Connector, Task Runner login, long-polling claims, model call queue and Manual only
2026-11-20 02:17:48 +00:00
aiongg
7372c7ba48
Long-lived token: read the token from a rendered terminal screen and check it with one model call before saving
2026-11-05 14:07:50 +00:00
aiongg
e0d23bb2ec
Add flowchart screenshot script and regenerate the README image
2026-11-03 19:27:26 +00:00
aiongg
6fbfa83941
Generate stage tables in the docs from the registry
2026-11-03 19:25:32 +00:00
aiongg
9b57ff2168
Pin pnpm 11.28.10: 11.12.0 is marked broken
2026-11-03 17:52:21 +00:00
aiongg
4dd4d93800
Rename remaining craft-auto names to autocraft (command, env vars, paths, key label)
2026-11-03 16:48:10 +00:00
aiongg
5ff5de75e0
Package name: autocraft
2026-11-03 16:37:12 +00:00
aiongg
27beaca62d
License: MIT OR Apache-2.0
2026-11-03 16:20:25 +00:00
aiongg
d6bcf1b8f1
Validate every GraphQL document against GitHub's schema in tests
2026-11-03 05:52:03 +00:00
aiongg
16e1356e8a
Deploy into releases with an atomic symlink switch; snapshot and pause sync first; units load the settings as the app user; checks after restart; commit from .source-commit; pin pnpm
2026-11-03 03:01:39 +00:00
aiongg
09ccdd6932
Similar items and semantic search from local sentence embeddings
...
craft-auto embed embeds new and changed tracked items with bge-small-en-v1.5
(int8 ONNX, CPU) into item_embeddings. The dashboard keeps the vectors in
memory and serves /api/similar/<repo>/<n> and /api/search?mode=semantic; the
Item page shows a Similar items panel and the search box gets a meaning toggle
(Alt+M).
2026-11-02 18:55:13 +00:00
aiongg
e57f3b75d0
Switch to TypeScript on Node 24 with node:sqlite
2026-11-02 14:36:17 +00:00