Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
9a6d645
feat: add core and space migration packages
jgpruitt May 28, 2026
573c7f2
memory search takes effective tree access as arg
jgpruitt May 28, 2026
ddb32b3
most tables modeled
jgpruitt May 28, 2026
4f914f6
runtime calculation of tree access
jgpruitt May 28, 2026
5d7fda1
fix database migrations and diagnostics
jgpruitt May 28, 2026
7fb4485
split core idempotent migrations
jgpruitt May 28, 2026
0e96b44
docs: clarify principal agent names
jgpruitt May 28, 2026
434ed29
shorten principal kind values
jgpruitt May 28, 2026
40e0e7b
chore: make provision scripts a separate thing from incrementals
jgpruitt May 29, 2026
4109fdf
chore: simplify extension creation
jgpruitt May 29, 2026
ace4b16
fix check script web asset generation
jgpruitt May 29, 2026
374e943
chore: format space migration imports
jgpruitt May 29, 2026
d765c31
run migrations when version is current
jgpruitt May 29, 2026
94e6a47
remove core shard migration
jgpruitt May 29, 2026
6d8e092
tune group member indexes
jgpruitt May 29, 2026
91b9a9d
chore: reduce indexes on core.tree_access
jgpruitt May 29, 2026
1e4aa0d
cover principal name indexes
jgpruitt May 29, 2026
3086657
simplify principal name indexes
jgpruitt May 29, 2026
546d931
test: real-DB integration tests for core/space migrations (+ templati…
cevian Jun 1, 2026
aab04e6
test: cover agent_tree_access owner-clamp dedup (the max)
cevian Jun 1, 2026
3a9552e
test: auto-reclaim orphaned integration-test schemas before test:db
cevian Jun 1, 2026
2f2bda8
refactor: merge core + space into one @memory.build/database package
cevian Jun 2, 2026
1497c8f
refactor(database): extract shared test-utils into one internal module
cevian Jun 2, 2026
1329123
refactor(database): extract shared migration runner into migrate/kit.ts
cevian Jun 2, 2026
7c99fb6
feat(database): add auth schema migration unit (better-auth-shaped)
cevian Jun 2, 2026
a0405cb
test(database): run test:db suites at -P 2, not -P 4
cevian Jun 2, 2026
d51754d
refactor(database): drop shard/pgdog routing from space migrations
cevian Jun 2, 2026
0cc0c6e
refactor(accounts): drop OAuth-token storage + encryption subsystem (…
cevian Jun 3, 2026
3d780fb
feat(database): add core control-plane SQL functions
cevian Jun 3, 2026
f7d6f4e
feat(engine): add core control-plane TS layer (createCoreDB)
cevian Jun 3, 2026
9aaf496
feat(engine): add space data-plane TS layer (createSpaceDB)
cevian Jun 3, 2026
b1fc0d2
refactor(engine): rename core/space DB layers to *Store
cevian Jun 3, 2026
a4a6f4f
feat(database): add auth schema SQL functions
cevian Jun 3, 2026
52d2d64
feat(auth): add authStore runtime layer (packages/auth)
cevian Jun 3, 2026
a961997
refactor(database): add provisionSpace(tx) for caller-transaction pro…
cevian Jun 3, 2026
b7d83c0
feat(server): add provisionUser — atomic first-login provisioning
cevian Jun 3, 2026
9592725
feat(server): boot-migrate auth+core on a single postgres.js pool (Ph…
cevian Jun 3, 2026
5023110
feat(auth): device-flow consent via status (pending/approved/denied)
cevian Jun 3, 2026
453cb74
feat(server): cut OAuth login over to the auth schema + authStore
cevian Jun 3, 2026
f345652
feat(server): add /api/v1/memory/rpc endpoint + authenticateSpace (4C-0)
cevian Jun 3, 2026
ee6a6d7
feat(server): wire memory.* RPC onto spaceStore (4C-1)
cevian Jun 3, 2026
e598ad6
feat(core): add management read/list/delete primitives (4C-2a)
cevian Jun 3, 2026
c52af34
feat(server): space management + user RPC on the core model (4C-2b)
cevian Jun 3, 2026
8e508d6
feat(worker): cut the embedding worker over to the space model (4D)
cevian Jun 3, 2026
7522040
docs(todo): worker write-back should call space SQL functions
cevian Jun 4, 2026
f81a459
feat(core): space.list on the user endpoint + transitive space admin …
cevian Jun 4, 2026
5dcd486
feat(core): space.create on the user endpoint (4E-S2)
cevian Jun 4, 2026
ca94588
feat(core): space.rename + space.delete on the user endpoint (4E-S3)
cevian Jun 4, 2026
2f766c9
feat(server): group.listForMember allows an agent's owner (4E-S4)
cevian Jun 4, 2026
71ca63c
feat(client): memory + user clients; principal-centric roster (4E-C)
cevian Jun 4, 2026
a7ee775
feat(cli): space-centric credential + client foundation (4E-CLI-1)
cevian Jun 4, 2026
23702e1
feat(cli): whoami method + login space-selection (4E-CLI-2)
cevian Jun 4, 2026
9daeedf
feat(cli): me space command group (4E-CLI-3)
cevian Jun 4, 2026
a9b1f8d
feat(cli): memory commands on memoryClient + top-level aliases (4E-CL…
cevian Jun 4, 2026
5a73ab2
feat(cli): me group + me access command groups (4E-CLI-5a)
cevian Jun 4, 2026
0fa8340
feat(cli): me agent + new-model me apikey (4E-CLI-5b)
cevian Jun 4, 2026
b9dd6c1
feat(cli): me mcp on the memory client (session or key + space) (4E-C…
cevian Jun 4, 2026
ebc999c
feat(cli): retire the engine client; remove legacy command groups (4E…
cevian Jun 4, 2026
6efc9c2
docs(todo): note me apikey create UX when agent not in space
cevian Jun 4, 2026
f67ce34
feat(server): remove legacy engine + accounts RPC endpoints (5A)
cevian Jun 4, 2026
1867760
feat: delete the accounts package (5B)
cevian Jun 4, 2026
3e99a21
feat(engine): trim packages/engine to core + space (5C)
cevian Jun 4, 2026
345c3a2
feat(client): drop the legacy engine + accounts clients; web on memor…
cevian Jun 4, 2026
215fb0b
feat(protocol): relocate memory schemas to ./memory; delete engine + …
cevian Jun 4, 2026
abd9083
chore: rename ENGINE_*/WORKER_ENGINE_* env vars; drop dead master-key…
cevian Jun 4, 2026
8176874
chore: tidy residual engine naming (5F follow-up)
cevian Jun 4, 2026
e81391a
docs: update CLAUDE.md to the post-migration design
cevian Jun 5, 2026
76b2b95
docs(todo): track four untracked follow-ups
cevian Jun 5, 2026
1df4d3b
feat(memory): user-facing tree-path normalization + ~ home directories
cevian Jun 5, 2026
bd26c6e
docs: start DECISIONS_FOR_REVIEW.md; record ~-home resolution
cevian Jun 5, 2026
1c6ae4a
feat(memory): dot is the canonical tree-path separator; home displays…
cevian Jun 5, 2026
64bd05f
feat(worker): move embedding write-back into space SQL functions
cevian Jun 5, 2026
b0027e4
fix(worker): release_embedding resets vt so rate-limited rows retry p…
cevian Jun 5, 2026
3a96aef
docs(todo): batch the embedding write-back to cut DB round-trips
cevian Jun 5, 2026
6152bcd
docs: defer space-delete owner flag — move from TODO to DECISIONS_FOR…
cevian Jun 5, 2026
7c45955
feat(cli): apikey-create hint + enforce space/core import boundary (c…
cevian Jun 5, 2026
8ed9bce
feat(core): grant owner@home at join + SHARE namespace constant (INV-1)
cevian Jun 5, 2026
96a18d0
feat(core): space_invitation table + redeem/create/list/revoke (INV-2)
cevian Jun 5, 2026
aa34633
feat(server): redeem space invitations on verified login (INV-3)
cevian Jun 5, 2026
a237b19
feat(server): space invitations + require admin for roster mutations …
cevian Jun 5, 2026
592cf37
feat(cli): me space invite/list/revoke + client invite namespace (INV-5)
cevian Jun 5, 2026
4cd4cbe
docs(todo): mark space invitations built; track deferred email delive…
cevian Jun 5, 2026
b9b96c4
refactor(server): member-accessible principal.resolve/lookup; princip…
cevian Jun 5, 2026
3341b23
feat(server): space creator gets owner@home + owner@share + admin, no…
cevian Jun 5, 2026
0b7e1c9
feat(server): default memory.create tree to the shared root (share), …
cevian Jun 5, 2026
8719da1
docs(claude): document the access model — home/share, creator grants,…
cevian Jun 5, 2026
bb43224
refactor(server): drop the space-manager concept from grant authority
cevian Jun 5, 2026
ef09c53
style(mcp): biome formatting (ternary indentation in server.ts)
cevian Jun 5, 2026
ce1d0a9
feat(cli): store the session token in the OS keychain with a file fal…
cevian Jun 5, 2026
2a5e1b8
refactor(cli): split non-secret config into config.yaml; credentials.…
cevian Jun 5, 2026
f6b896e
docs: move "api keys for users" from TODO to DECISIONS_FOR_REVIEW
cevian Jun 5, 2026
6a0ab47
docs: add REDESIGN.md and a differences report vs. the implementation
cevian Jun 5, 2026
92db241
feat(api-key): make API keys global, not space-scoped
cevian Jun 6, 2026
e4f2a82
docs: restructure REDESIGN_DIFFERENCES TL;DR + record the access-fn d…
cevian Jun 6, 2026
95dc6e8
docs: record auth-schema decision (keep separate; no cross-schema FK)
cevian Jun 6, 2026
e1cbd83
docs: adjudicate item B (tree provisioning) — keep current, for UX
cevian Jun 6, 2026
f515906
docs: adjudicate item E (API endpoints) — keep current
cevian Jun 6, 2026
dc560ea
feat(core): enforce the last-admin safeguard (effective-admin)
cevian Jun 6, 2026
777f702
feat(cli): add `me group mine` to list your own groups
cevian Jun 6, 2026
e859141
feat(cli): accept `revoke` as an alias for `me apikey delete`
cevian Jun 6, 2026
543a2ce
test: run the suite against ghost by default, parallelized (--paralle…
cevian Jun 8, 2026
47cb4c7
test(e2e): real CLI→server→ghost end-to-end suite (+ enabling fixes)
cevian Jun 8, 2026
570a713
feat(cli): MCP install defaults to your login session, not an api key
cevian Jun 8, 2026
2c1ebaf
feat(auth): rolling sessions (7d, daily refresh, no cap) — better-aut…
cevian Jun 8, 2026
ca73c3a
feat(claude-plugin): make api_key optional, fall back to the login se…
cevian Jun 8, 2026
259d0b1
feat(claude-plugin): make space optional too, fall back to active space
cevian Jun 9, 2026
44dbf5e
fix(cli): default capture/import paths under `share` so sessions can …
cevian Jun 9, 2026
6e16188
fix(cli): allow ~ (and lenient forms) in import --tree-root
cevian Jun 9, 2026
b4e66da
feat(claude-plugin): nest captures by project, aligned with the impor…
cevian Jun 9, 2026
778110f
refactor(cli): share project-slug derivation between hook and import
cevian Jun 9, 2026
7c7820b
feat(claude-plugin): align capture metadata with the import schema
cevian Jun 9, 2026
0dd46db
fix(search): honor orderBy on unranked search; default newest-first
cevian Jun 9, 2026
5ca9bce
docs(todo): track adding behavior tests for all search modes/params
cevian Jun 9, 2026
94f45b8
feat(claude-plugin): capture via the import path (Stop/SessionEnd tra…
cevian Jun 9, 2026
14e0411
docs(decisions): record the Claude Code capture-hook change
cevian Jun 9, 2026
b95997c
test(importers): assert hook capture and `me import` are cross-idempo…
cevian Jun 9, 2026
73dcad8
test(e2e): full-stack cross-idempotency of the capture hook and `me i…
cevian Jun 9, 2026
2520ead
feat(memory): require an explicit tree on create/batchCreate
cevian Jun 9, 2026
f069b95
docs: update for the principals/spaces model
cevian Jun 9, 2026
ae4f215
fix(server): update Dockerfile for the auth rename + new workspaces
cevian Jun 9, 2026
68bd448
fix(server): temporarily fall back to ENGINE_DATABASE_URL
cevian Jun 10, 2026
2da543f
feat(cli): me claude install drives the full plugin by default
cevian Jun 10, 2026
d7712be
fix(server): route memory.search tree filter to lquery/ltxtquery
cevian Jun 10, 2026
e483a2d
docs: add dev quick-start to DEVELOPMENT.md
cevian Jun 10, 2026
acda431
test(e2e): cover import backfilling pre-hook-install work
cevian Jun 10, 2026
b23f5c0
test(e2e): wire e2e into check and fix stale tree-less creates
cevian Jun 10, 2026
8ef7e4c
feat(cli): add `me claude init` setup command
cevian Jun 10, 2026
f6e7791
feat(cli): me claude init records project memory location in CLAUDE.md
cevian Jun 10, 2026
e9296ce
fix(cli): canonical dot tree paths + always-consult instruction in CL…
cevian Jun 10, 2026
cafb982
feat(cli): me claude init step selection (multiselect + --skip flags)
cevian Jun 10, 2026
e648a62
fix(cli): clearer instructions in me claude init step multiselect
cevian Jun 10, 2026
c3da4e3
style(cli): dim the instruction hint in me claude init multiselect
cevian Jun 10, 2026
10a64d4
fix(server): batch create skips duplicate explicit ids instead of err…
cevian Jun 10, 2026
2473208
feat(cli): `me import` source group + git history importer
cevian Jun 10, 2026
76cf996
feat(server): re-migrate all existing space schemas at boot
cevian Jun 10, 2026
faa9d0f
feat(server): conditional upsert in create_memory; drop the importer'…
cevian Jun 10, 2026
dd40a64
perf(server): set-based batch_create_memory — one statement per chunk
cevian Jun 10, 2026
28d95b9
fix(cli): scope `me claude init` transcript import to the current pro…
cevian Jun 10, 2026
527ea7b
fix(cli): announce each `me claude init` step before it runs
cevian Jun 10, 2026
65670c9
perf(cli): prune claude transcript discovery by project directory name
cevian Jun 10, 2026
0d804d6
docs: record the `me import` reorganization in DECISIONS_FOR_REVIEW
cevian Jun 10, 2026
141f09a
feat(cli): point a freshly logged-in user at `me claude init`
cevian Jun 10, 2026
36a9d56
feat(cli): `me claude init` offers to install the Claude Code plugin
cevian Jun 10, 2026
40fbbb3
docs: add a quick-start-against-dev flow to DEVELOPMENT.md
cevian Jun 10, 2026
295374a
fix(test): scope the boot test's SPACE_SCHEMA_PREFIX to its own suite
cevian Jun 10, 2026
dcdd60c
ci: run tests through the shared scripts (test:unit / test:db)
cevian Jun 11, 2026
3c08acf
fix(db): serialize extension creation behind one database-wide lock
cevian Jun 11, 2026
0fcb1ff
ci: TEST_CI disables test skips; lighter default `check`
cevian Jun 11, 2026
1a8a3f0
docs: verification runs against the local me-postgres container
cevian Jun 11, 2026
a56148f
chore: default test scripts to local Postgres; ghost is explicit-only
cevian Jun 11, 2026
b0655e0
docs(readme): quick start is `me login` + `me claude init`; rest move…
cevian Jun 11, 2026
77a6a16
feat(cli): me import git-hook installs a post-commit hook for git his…
cevian Jun 11, 2026
153da22
feat(cli): me claude init shows a checkmark for already-done steps
cevian Jun 11, 2026
e766214
fix(cli): no stray guide line between consecutive init ✓ lines
cevian Jun 11, 2026
7b0625d
feat(cli): closing guidance after me claude init
cevian Jun 11, 2026
52c948e
fix(cli): init outro example prompts name memory engine / me memories
cevian Jun 11, 2026
30397fc
fix(db): mark auth lookup functions strict
jgpruitt Jun 15, 2026
914cd31
fix(db): mark core and space lookups strict
jgpruitt Jun 15, 2026
02bd387
fix(database): make enforce_last_admin triggers deferred constraint t…
cevian Jun 16, 2026
3a0ef08
feat(cli): group me claude init by source with a backfill/ongoing recap
cevian Jun 16, 2026
549582d
fix(database): report transitive admins in list_space_principals
cevian Jun 16, 2026
bef81e8
fix(database): pin a group to its own space in add_principal_to_space
cevian Jun 16, 2026
1d2f9ce
feat(access): give agents a real home nested under their owner
cevian Jun 16, 2026
609cc55
feat(core): require explicit space membership; groups no longer confe…
cevian Jun 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
119 changes: 25 additions & 94 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,9 @@
# Required
# -----------------------------------------------------------------------------

# PostgreSQL connection string for the accounts database
# (stores identities, orgs, engines, sessions, API keys)
ACCOUNTS_DATABASE_URL=postgres://postgres:postgres@localhost:5432/me

# 32-byte hex key for encrypting API keys at rest
# Generate with: openssl rand -hex 32
ACCOUNTS_MASTER_KEY=

# PostgreSQL connection string for the engine database
# (stores memories — each engine gets its own schema)
ENGINE_DATABASE_URL=postgres://postgres:postgres@localhost:5432/me
# PostgreSQL connection string for the application database. One database holds
# the auth + core control plane and every per-space me_<slug> schema.
DATABASE_URL=postgres://postgres:postgres@localhost:5432/me

# Public base URL for OAuth callbacks
API_BASE_URL=http://localhost:3000
Expand Down Expand Up @@ -51,8 +43,9 @@ GOOGLE_CLIENT_SECRET=
# Raise for memory.batchCreate-heavy workloads (e.g. transcript imports).
# MAX_REQUEST_BODY_BYTES=

# Schema name in the accounts database
# ACCOUNTS_SCHEMA=accounts
# Schema names
# AUTH_SCHEMA=auth
# CORE_SCHEMA=core

# Cron schedule for cleaning up expired device authorizations (UTC)
# DEVICE_FLOW_CLEANUP_CRON=*/15 * * * *
Expand All @@ -73,60 +66,20 @@ GOOGLE_CLIENT_SECRET=
# LOGFIRE_SCRUBBING=false

# -----------------------------------------------------------------------------
# Optional — Accounts Database Connection Pool
# -----------------------------------------------------------------------------

# Maximum connections in pool
# ACCOUNTS_POOL_MAX=10

# Close idle pooled connections after N seconds
# ACCOUNTS_POOL_IDLE_REAP_SECONDS=300

# Max connection lifetime in seconds (0 = forever)
# ACCOUNTS_POOL_MAX_LIFETIME=0

# Timeout for establishing new connections (seconds)
# ACCOUNTS_POOL_CONNECTION_TIMEOUT=30

# PostgreSQL statement timeout for accounts DB transactions
# ACCOUNTS_STATEMENT_TIMEOUT=25s

# PostgreSQL lock wait timeout for accounts DB transactions
# ACCOUNTS_LOCK_TIMEOUT=5s

# PostgreSQL transaction timeout for accounts DB transactions
# ACCOUNTS_TRANSACTION_TIMEOUT=30s

# PostgreSQL idle-in-transaction timeout for accounts DB transactions
# ACCOUNTS_IDLE_IN_TRANSACTION_SESSION_TIMEOUT=30s

# -----------------------------------------------------------------------------
# Optional — Engine Database Connection Pool
# Optional — Database Connection Pool
# -----------------------------------------------------------------------------

# Maximum connections in pool
# ENGINE_POOL_MAX=20
# DB_POOL_MAX=20

# Close idle pooled connections after N seconds
# ENGINE_POOL_IDLE_REAP_SECONDS=300
# DB_POOL_IDLE_REAP_SECONDS=300

# Max connection lifetime in seconds (0 = forever)
# ENGINE_POOL_MAX_LIFETIME=0
# DB_POOL_MAX_LIFETIME=0

# Timeout for establishing new connections (seconds)
# ENGINE_POOL_CONNECTION_TIMEOUT=30

# PostgreSQL statement timeout for engine DB transactions
# ENGINE_STATEMENT_TIMEOUT=25s

# PostgreSQL lock wait timeout for engine DB transactions
# ENGINE_LOCK_TIMEOUT=5s

# PostgreSQL transaction timeout for engine DB transactions
# ENGINE_TRANSACTION_TIMEOUT=30s

# PostgreSQL idle-in-transaction timeout for engine DB transactions
# ENGINE_IDLE_IN_TRANSACTION_SESSION_TIMEOUT=30s
# DB_POOL_CONNECTION_TIMEOUT=30

# -----------------------------------------------------------------------------
# Optional — Embedding
Expand Down Expand Up @@ -163,45 +116,23 @@ GOOGLE_CLIENT_SECRET=
# Max error backoff (ms)
# WORKER_MAX_BACKOFF_MS=60000

# Engine re-discovery interval (ms)
# Space re-discovery interval (ms)
# WORKER_REFRESH_INTERVAL_MS=60000

# -----------------------------------------------------------------------------
# Optional — Embedding Worker Engine Database
# Optional — Embedding Worker Database Pool
# -----------------------------------------------------------------------------
# The embedding worker uses a dedicated pool. Each setting defaults to the
# corresponding application-pool value (or DATABASE_URL) when unset.

# PostgreSQL connection string for embedding worker engine traffic.
# Defaults to ENGINE_DATABASE_URL when unset.
# WORKER_ENGINE_DATABASE_URL=postgres://postgres:postgres@localhost:5432/me

# Maximum connections in the dedicated embedding worker engine pool.
# Defaults to max(WORKER_COUNT, 1) when unset.
# WORKER_ENGINE_POOL_MAX=2

# Close idle embedding worker engine connections after N seconds.
# Defaults to ENGINE_POOL_IDLE_REAP_SECONDS when unset.
# WORKER_ENGINE_POOL_IDLE_REAP_SECONDS=300

# Max embedding worker engine connection lifetime in seconds (0 = forever).
# Defaults to ENGINE_POOL_MAX_LIFETIME when unset.
# WORKER_ENGINE_POOL_MAX_LIFETIME=0

# Timeout for establishing embedding worker engine connections (seconds).
# Defaults to ENGINE_POOL_CONNECTION_TIMEOUT when unset.
# WORKER_ENGINE_POOL_CONNECTION_TIMEOUT=30

# PostgreSQL statement timeout for embedding worker engine DB transactions
# Defaults to ENGINE_STATEMENT_TIMEOUT when unset.
# WORKER_ENGINE_STATEMENT_TIMEOUT=25s

# PostgreSQL lock wait timeout for embedding worker engine DB transactions
# Defaults to ENGINE_LOCK_TIMEOUT when unset.
# WORKER_ENGINE_LOCK_TIMEOUT=5s

# PostgreSQL transaction timeout for embedding worker engine DB transactions
# Defaults to ENGINE_TRANSACTION_TIMEOUT when unset.
# WORKER_ENGINE_TRANSACTION_TIMEOUT=30s
# WORKER_DATABASE_URL=postgres://postgres:postgres@localhost:5432/me
# WORKER_DB_POOL_MAX=2
# WORKER_DB_POOL_IDLE_REAP_SECONDS=300
# WORKER_DB_POOL_MAX_LIFETIME=0
# WORKER_DB_POOL_CONNECTION_TIMEOUT=30

# PostgreSQL idle-in-transaction timeout for embedding worker engine DB transactions
# Defaults to ENGINE_IDLE_IN_TRANSACTION_SESSION_TIMEOUT when unset.
# WORKER_ENGINE_IDLE_IN_TRANSACTION_SESSION_TIMEOUT=30s
# Per-transaction timeouts for the worker pool (default to built-in values).
# WORKER_DB_STATEMENT_TIMEOUT=25s
# WORKER_DB_LOCK_TIMEOUT=5s
# WORKER_DB_TRANSACTION_TIMEOUT=30s
# WORKER_DB_IDLE_IN_TRANSACTION_SESSION_TIMEOUT=30s
28 changes: 26 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ on:
jobs:
ci:
runs-on: ubuntu-latest
env:
# TEST_CI disables conditional test skips: every gated suite runs, and
# missing prerequisites fail loudly instead of skipping silently. The
# OpenAI key drives the live embedding suite; a fork PR (no secrets)
# therefore fails rather than silently testing less.
TEST_CI: "1"
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

steps:
- uses: actions/checkout@v6
Expand All @@ -25,10 +32,19 @@ jobs:
- name: Typecheck
run: ./bun run typecheck
- name: Test (unit)
run: find packages -name '*.test.ts' ! -name '*.integration.test.ts' -print0 | xargs -0 ./bun test
# Same script (and process model — --parallel) as local runs, so CI
# can't diverge from what developers verify against.
run: ./bun run test:unit

integration:
runs-on: ubuntu-latest
env:
# See the ci job for TEST_CI semantics. The e2e suite needs the database
# URL (the container below) and a real OpenAI key for its embedding
# worker (a few thousand text-embedding-3-small tokens per run).
TEST_CI: "1"
TEST_DATABASE_URL: postgresql://postgres@127.0.0.1:5432/postgres
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

steps:
- uses: actions/checkout@v6
Expand All @@ -51,6 +67,14 @@ jobs:
sleep 1
done
- name: Test (integration)
run: find packages -name '*.integration.test.ts' -print0 | xargs -0 ./bun test
# Same script (and process model — --parallel) as local runs; the
# suites default to postgresql://postgres@127.0.0.1:5432/postgres,
# which is the container above. The schema cleaner that test:db runs
# first is a no-op against the fresh container.
run: ./bun run test:db
- name: Test (e2e)
# Real CLI subprocesses against a real in-process server and the
# container above, with real OpenAI embeddings.
run: ./bun run test:e2e
- name: Stop Postgres
run: docker stop me-postgres
3 changes: 2 additions & 1 deletion .github/workflows/deploy-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ on:
- packages/embedding/**
- packages/worker/**
- packages/protocol/**
- packages/accounts/**
- packages/auth/**
- packages/database/**
- scripts/**
- package.json
- bun.lock
Expand Down
Loading
Loading