pgserve 2.1.3 → 2.2.1
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/CHANGELOG.md +96 -0
- package/README.md +105 -1
- package/bin/autopg-wrapper.cjs +16 -0
- package/bin/pgserve-wrapper.cjs +32 -6
- package/bin/postgres-server.js +56 -0
- package/console/README.md +131 -0
- package/console/api.js +173 -0
- package/console/app.jsx +483 -0
- package/console/colors_and_type.css +227 -0
- package/console/components.jsx +167 -0
- package/console/console.css +1666 -0
- package/console/data.jsx +350 -0
- package/console/index.html +31 -0
- package/console/screens/databases.jsx +5 -0
- package/console/screens/health.jsx +5 -0
- package/console/screens/ingress.jsx +5 -0
- package/console/screens/optimizer.jsx +5 -0
- package/console/screens/rlm-sim.jsx +5 -0
- package/console/screens/rlm-trace.jsx +5 -0
- package/console/screens/security.jsx +5 -0
- package/console/screens/settings.jsx +611 -0
- package/console/screens/sql.jsx +5 -0
- package/console/screens/sync.jsx +5 -0
- package/console/screens/tables.jsx +5 -0
- package/console/tweaks-panel.jsx +425 -0
- package/package.json +14 -2
- package/scripts/postinstall.cjs +60 -0
- package/src/cli-config.cjs +310 -0
- package/src/cli-install.cjs +112 -11
- package/src/cli-restart.cjs +228 -0
- package/src/cli-ui.cjs +580 -0
- package/src/cluster.js +43 -38
- package/src/postgres.js +141 -19
- package/src/settings-loader.cjs +235 -0
- package/src/settings-migrate.cjs +212 -0
- package/src/settings-pg-args.cjs +146 -0
- package/src/settings-schema.cjs +422 -0
- package/src/settings-validator.cjs +416 -0
- package/src/settings-writer.cjs +288 -0
- package/src/upgrade/index.js +65 -0
- package/src/upgrade/runner.js +23 -0
- package/src/upgrade/steps/binary-cache-flush.js +67 -0
- package/src/upgrade/steps/consumer-signal.js +40 -0
- package/src/upgrade/steps/env-refresh.js +89 -0
- package/src/upgrade/steps/health-validate.js +53 -0
- package/src/upgrade/steps/plpgsql-resolve.js +66 -0
- package/src/upgrade/steps/port-reconcile.js +52 -0
- package/.claude/context/windows-debug.md +0 -119
- package/.genie/AGENTS.md +0 -15
- package/.genie/agents/README.md +0 -110
- package/.genie/agents/analyze.md +0 -176
- package/.genie/agents/forge.md +0 -290
- package/.genie/agents/garbage-cleaner.md +0 -324
- package/.genie/agents/garbage-collector.md +0 -596
- package/.genie/agents/github-issue-gc.md +0 -618
- package/.genie/agents/review.md +0 -380
- package/.genie/agents/semantic-analyzer/find-duplicates.md +0 -90
- package/.genie/agents/semantic-analyzer/find-orphans.md +0 -99
- package/.genie/agents/semantic-analyzer.md +0 -101
- package/.genie/agents/update.md +0 -182
- package/.genie/agents/wish.md +0 -357
- package/.genie/brainstorms/pgserve-v2/DESIGN.md +0 -174
- package/.genie/code/AGENTS.md +0 -694
- package/.genie/code/agents/audit/risk.md +0 -173
- package/.genie/code/agents/audit/security.md +0 -189
- package/.genie/code/agents/audit.md +0 -145
- package/.genie/code/agents/challenge.md +0 -230
- package/.genie/code/agents/change-reviewer.md +0 -295
- package/.genie/code/agents/code-garbage-collector.md +0 -425
- package/.genie/code/agents/code-quality.md +0 -410
- package/.genie/code/agents/commit-suggester.md +0 -255
- package/.genie/code/agents/commit.md +0 -124
- package/.genie/code/agents/consensus.md +0 -204
- package/.genie/code/agents/daily-standup.md +0 -722
- package/.genie/code/agents/docgen.md +0 -48
- package/.genie/code/agents/explore.md +0 -79
- package/.genie/code/agents/fix.md +0 -100
- package/.genie/code/agents/git/commit-advisory.md +0 -219
- package/.genie/code/agents/git/workflows/issue.md +0 -244
- package/.genie/code/agents/git/workflows/pr.md +0 -179
- package/.genie/code/agents/git/workflows/release.md +0 -460
- package/.genie/code/agents/git/workflows/report.md +0 -342
- package/.genie/code/agents/git.md +0 -432
- package/.genie/code/agents/implementor.md +0 -161
- package/.genie/code/agents/install.md +0 -515
- package/.genie/code/agents/issue-creator.md +0 -344
- package/.genie/code/agents/polish.md +0 -116
- package/.genie/code/agents/qa.md +0 -653
- package/.genie/code/agents/refactor.md +0 -294
- package/.genie/code/agents/release.md +0 -1129
- package/.genie/code/agents/roadmap.md +0 -885
- package/.genie/code/agents/tests.md +0 -557
- package/.genie/code/agents/tracer.md +0 -50
- package/.genie/code/agents/update/upstream-update.md +0 -85
- package/.genie/code/agents/update/versions/generic-update.md +0 -305
- package/.genie/code/agents/vibe.md +0 -1317
- package/.genie/code/spells/agent-configuration.md +0 -58
- package/.genie/code/spells/automated-rc-publishing.md +0 -106
- package/.genie/code/spells/branch-tracker-guidance.md +0 -28
- package/.genie/code/spells/debug.md +0 -320
- package/.genie/code/spells/emoji-naming-convention.md +0 -303
- package/.genie/code/spells/evidence-storage.md +0 -26
- package/.genie/code/spells/file-naming-rules.md +0 -35
- package/.genie/code/spells/forge-code-blueprints.md +0 -195
- package/.genie/code/spells/genie-integration.md +0 -153
- package/.genie/code/spells/publishing-protocol.md +0 -61
- package/.genie/code/spells/team-consultation-protocol.md +0 -284
- package/.genie/code/spells/tool-requirements.md +0 -20
- package/.genie/code/spells/triad-maintenance-protocol.md +0 -154
- package/.genie/code/teams/tech-council/council.md +0 -328
- package/.genie/code/teams/tech-council/jt.md +0 -352
- package/.genie/code/teams/tech-council/nayr.md +0 -305
- package/.genie/code/teams/tech-council/oettam.md +0 -375
- package/.genie/neurons/README.md +0 -193
- package/.genie/neurons/forge.md +0 -106
- package/.genie/neurons/genie.md +0 -63
- package/.genie/neurons/review.md +0 -106
- package/.genie/neurons/wish.md +0 -104
- package/.genie/product/README.md +0 -20
- package/.genie/product/cli-automation.md +0 -359
- package/.genie/product/environment.md +0 -60
- package/.genie/product/mission.md +0 -60
- package/.genie/product/roadmap.md +0 -44
- package/.genie/product/tech-stack.md +0 -34
- package/.genie/product/templates/context-template.md +0 -218
- package/.genie/product/templates/qa-done-report-template.md +0 -68
- package/.genie/product/templates/review-report-template.md +0 -89
- package/.genie/product/templates/wish-template.md +0 -120
- package/.genie/scripts/helpers/analyze-commit.js +0 -195
- package/.genie/scripts/helpers/bullet-counter.js +0 -194
- package/.genie/scripts/helpers/bullet-find.js +0 -289
- package/.genie/scripts/helpers/bullet-id.js +0 -244
- package/.genie/scripts/helpers/check-secrets.js +0 -237
- package/.genie/scripts/helpers/count-tokens.js +0 -200
- package/.genie/scripts/helpers/create-frontmatter.js +0 -456
- package/.genie/scripts/helpers/detect-markers.js +0 -293
- package/.genie/scripts/helpers/detect-todos.js +0 -267
- package/.genie/scripts/helpers/detect-unlabeled-blocks.js +0 -135
- package/.genie/scripts/helpers/embeddings.js +0 -344
- package/.genie/scripts/helpers/find-empty-sections.js +0 -158
- package/.genie/scripts/helpers/index.js +0 -319
- package/.genie/scripts/helpers/validate-frontmatter.js +0 -578
- package/.genie/scripts/helpers/validate-links.js +0 -207
- package/.genie/scripts/helpers/validate-paths.js +0 -373
- package/.genie/spells/README.md +0 -9
- package/.genie/spells/ace-protocol.md +0 -118
- package/.genie/spells/ask-one-at-a-time.md +0 -175
- package/.genie/spells/backup-analyzer.md +0 -542
- package/.genie/spells/blocker.md +0 -12
- package/.genie/spells/break-things-move-fast.md +0 -56
- package/.genie/spells/context-candidates.md +0 -72
- package/.genie/spells/context-critic.md +0 -51
- package/.genie/spells/defer-to-expertise.md +0 -278
- package/.genie/spells/delegate-dont-do.md +0 -292
- package/.genie/spells/error-investigation-protocol.md +0 -328
- package/.genie/spells/evidence-based-completion.md +0 -273
- package/.genie/spells/experiment.md +0 -65
- package/.genie/spells/file-creation-protocol.md +0 -229
- package/.genie/spells/forge-integration.md +0 -281
- package/.genie/spells/forge-orchestration.md +0 -514
- package/.genie/spells/gather-context.md +0 -18
- package/.genie/spells/global-health-check.md +0 -34
- package/.genie/spells/global-noop-roundtrip.md +0 -25
- package/.genie/spells/install-genie.md +0 -1232
- package/.genie/spells/install.md +0 -82
- package/.genie/spells/investigate-before-commit.md +0 -112
- package/.genie/spells/know-yourself.md +0 -288
- package/.genie/spells/learn.md +0 -828
- package/.genie/spells/mcp-diagnostic-protocol.md +0 -246
- package/.genie/spells/mcp-first.md +0 -124
- package/.genie/spells/multi-step-execution.md +0 -67
- package/.genie/spells/orchestration-boundary-protocol.md +0 -256
- package/.genie/spells/orchestrator-not-implementor.md +0 -189
- package/.genie/spells/prompt.md +0 -746
- package/.genie/spells/reflect.md +0 -404
- package/.genie/spells/routing-decision-matrix.md +0 -368
- package/.genie/spells/run-in-parallel.md +0 -12
- package/.genie/spells/session-state-updater-example.md +0 -196
- package/.genie/spells/session-state-updater.md +0 -220
- package/.genie/spells/track-long-running-tasks.md +0 -133
- package/.genie/spells/troubleshoot-infrastructure.md +0 -176
- package/.genie/spells/upgrade-genie.md +0 -415
- package/.genie/spells/url-presentation-protocol.md +0 -301
- package/.genie/spells/wish-initiation.md +0 -158
- package/.genie/spells/wish-issue-linkage.md +0 -410
- package/.genie/spells/wish-lifecycle.md +0 -100
- package/.genie/state/provider-status.json +0 -3
- package/.genie/state/version.json +0 -16
- package/.genie/wishes/canonical-pgserve-pm2-supervision/WISH.md +0 -290
- package/.genie/wishes/pgserve-v2/BRIEF-from-genie-pgserve.md +0 -99
- package/.genie/wishes/pgserve-v2/WISH.md +0 -442
- package/.genie/wishes/release-system-genie-pattern/WISH.md +0 -268
- package/.genie/wishes/release-system-genie-pattern/validation.md +0 -205
- package/.gitguardian.yaml +0 -29
- package/.gitguardianignore +0 -16
- package/.github/workflows/ci.yml +0 -122
- package/.github/workflows/release.yml +0 -289
- package/.github/workflows/version.yml +0 -228
- package/.husky/pre-commit +0 -2
- package/AGENTS.md +0 -433
- package/CLAUDE.md +0 -1
- package/Makefile +0 -285
- package/assets/icon.ico +0 -0
- package/bun.lock +0 -435
- package/bunfig.toml +0 -28
- package/ecosystem.config.cjs +0 -23
- package/eslint.config.js +0 -63
- package/examples/multi-tenant-demo.js +0 -104
- package/install.sh +0 -123
- package/knip.json +0 -9
- package/tests/audit.test.js +0 -189
- package/tests/backpressure.test.js +0 -167
- package/tests/benchmarks/runner.js +0 -1197
- package/tests/benchmarks/vector-generator.js +0 -368
- package/tests/cli-install.test.js +0 -322
- package/tests/control-db.test.js +0 -285
- package/tests/daemon-args.test.js +0 -86
- package/tests/daemon-control.test.js +0 -171
- package/tests/daemon-fingerprint-integration.test.js +0 -111
- package/tests/daemon-pr24-regression.test.js +0 -198
- package/tests/fingerprint.test.js +0 -263
- package/tests/fixtures/240-orphan-seed.sql +0 -30
- package/tests/multi-tenant.test.js +0 -374
- package/tests/orphan-cleanup.test.js +0 -390
- package/tests/pg-version-regex.test.js +0 -129
- package/tests/quick-bench.js +0 -135
- package/tests/router-handshake-retry.test.js +0 -119
- package/tests/router-handshake-watchdog.test.js +0 -110
- package/tests/sdk.test.js +0 -71
- package/tests/stale-postmaster-pid.test.js +0 -85
- package/tests/stress-test.js +0 -439
- package/tests/sync-perf-test.js +0 -150
- package/tests/tcp-listen.test.js +0 -368
- package/tests/tenancy.test.js +0 -403
- package/tests/wrapper-supervision.test.js +0 -107
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* autopg upgrade — idempotent migration orchestrator.
|
|
3
|
+
*
|
|
4
|
+
* Runs 6 steps in order, each safe to re-run any number of times:
|
|
5
|
+
* 1. port-reconcile — ensure pgserve listens on canonical port (8432)
|
|
6
|
+
* 2. binary-cache-flush — verify binary version matches PINNED_PG_VERSION
|
|
7
|
+
* 3. plpgsql-resolve — DROP+CREATE plpgsql per DB to refresh .so path
|
|
8
|
+
* 4. env-refresh — regenerate ~/.autopg/<app>.env URLs
|
|
9
|
+
* 5. consumer-signal — touch ~/.autopg/state/upgrade.signal
|
|
10
|
+
* 6. health-validate — pg_isready + per-DB plpgsql smoke test
|
|
11
|
+
*
|
|
12
|
+
* Patches the upgrade-path hole left by autopg-v22 partial roll-out.
|
|
13
|
+
* See: .genie/wishes/autopg-upgrade-command/WISH.md
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { runStep } from './runner.js';
|
|
17
|
+
import * as portReconcile from './steps/port-reconcile.js';
|
|
18
|
+
import * as binaryCacheFlush from './steps/binary-cache-flush.js';
|
|
19
|
+
import * as plpgsqlResolve from './steps/plpgsql-resolve.js';
|
|
20
|
+
import * as envRefresh from './steps/env-refresh.js';
|
|
21
|
+
import * as consumerSignal from './steps/consumer-signal.js';
|
|
22
|
+
import * as healthValidate from './steps/health-validate.js';
|
|
23
|
+
|
|
24
|
+
export const STEPS = [
|
|
25
|
+
{ name: 'port-reconcile', impl: portReconcile },
|
|
26
|
+
{ name: 'binary-cache-flush', impl: binaryCacheFlush },
|
|
27
|
+
{ name: 'plpgsql-resolve', impl: plpgsqlResolve },
|
|
28
|
+
{ name: 'env-refresh', impl: envRefresh },
|
|
29
|
+
{ name: 'consumer-signal', impl: consumerSignal },
|
|
30
|
+
{ name: 'health-validate', impl: healthValidate },
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
export async function upgrade(options = {}) {
|
|
34
|
+
const { quiet = false, dryRun = false, skipSteps = [] } = options;
|
|
35
|
+
const log = (msg) => { if (!quiet) process.stderr.write(`${msg}\n`); };
|
|
36
|
+
const warn = (msg) => process.stderr.write(`${msg}\n`);
|
|
37
|
+
|
|
38
|
+
log(`autopg upgrade starting (dryRun=${dryRun}, quiet=${quiet})`);
|
|
39
|
+
|
|
40
|
+
const results = [];
|
|
41
|
+
for (const step of STEPS) {
|
|
42
|
+
if (skipSteps.includes(step.name)) {
|
|
43
|
+
log(`[${step.name}] SKIP (excluded by --skip-steps)`);
|
|
44
|
+
results.push({ name: step.name, status: 'SKIP', detail: 'excluded' });
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
try {
|
|
48
|
+
const result = await runStep(step.name, step.impl, { dryRun, log, warn });
|
|
49
|
+
results.push(result);
|
|
50
|
+
} catch (err) {
|
|
51
|
+
warn(`[${step.name}] FAIL: ${err.message}`);
|
|
52
|
+
results.push({ name: step.name, status: 'FAIL', detail: err.message });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const failed = results.filter((r) => r.status === 'FAIL');
|
|
57
|
+
const summary = `autopg upgrade complete: ${results.length - failed.length}/${results.length} steps OK`;
|
|
58
|
+
log(summary);
|
|
59
|
+
if (failed.length > 0) {
|
|
60
|
+
warn(`Failed steps: ${failed.map((r) => r.name).join(', ')}`);
|
|
61
|
+
warn('Re-run `autopg upgrade` after addressing the above.');
|
|
62
|
+
return { ok: false, results, summary };
|
|
63
|
+
}
|
|
64
|
+
return { ok: true, results, summary };
|
|
65
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Step runner — wraps each step with consistent logging + error capture.
|
|
3
|
+
*
|
|
4
|
+
* A step module exports `{ name, plan(ctx), execute(ctx) }`:
|
|
5
|
+
* - plan(ctx) → string describing what would happen (dry-run output)
|
|
6
|
+
* - execute(ctx) → { status: 'OK'|'SKIP'|'FAIL', detail: string }
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export async function runStep(name, stepImpl, { dryRun, log, warn }) {
|
|
10
|
+
if (typeof stepImpl.plan !== 'function' || typeof stepImpl.execute !== 'function') {
|
|
11
|
+
throw new Error(`step ${name} missing plan() or execute()`);
|
|
12
|
+
}
|
|
13
|
+
if (dryRun) {
|
|
14
|
+
const planned = await stepImpl.plan({ log, warn });
|
|
15
|
+
log(`[${name}] DRY-RUN: ${planned}`);
|
|
16
|
+
return { name, status: 'DRY-RUN', detail: planned };
|
|
17
|
+
}
|
|
18
|
+
const result = await stepImpl.execute({ log, warn });
|
|
19
|
+
const status = result.status || 'OK';
|
|
20
|
+
const detail = result.detail || '';
|
|
21
|
+
log(`[${name}] ${status}: ${detail}`);
|
|
22
|
+
return { name, status, detail };
|
|
23
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Step 2 — Binary cache flush against PINNED_PG_VERSION.
|
|
3
|
+
* Re-downloads if version marker missing or mismatch. Idempotent.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import fs from 'node:fs';
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
9
|
+
|
|
10
|
+
export const name = 'binary-cache-flush';
|
|
11
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
12
|
+
|
|
13
|
+
function getAutopgRoot() {
|
|
14
|
+
return process.env.AUTOPG_CONFIG_DIR || process.env.PGSERVE_CONFIG_DIR || `${process.env.HOME}/.autopg`;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function getBinaryCacheDir() {
|
|
18
|
+
return path.join(getAutopgRoot(), 'bin', `${process.platform}-${process.arch}`);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function getPinnedVersion() {
|
|
22
|
+
try {
|
|
23
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '..', '..', '..', 'package.json'), 'utf8'));
|
|
24
|
+
if (pkg.autopg && pkg.autopg.pinnedPgVersion) return pkg.autopg.pinnedPgVersion;
|
|
25
|
+
} catch { /* fall through */ }
|
|
26
|
+
return process.env.AUTOPG_PINNED_PG_VERSION || '18.3';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function readVersionMarker(cacheDir) {
|
|
30
|
+
try { return fs.readFileSync(path.join(cacheDir, '.version'), 'utf8').trim(); } catch { return null; }
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export async function plan() {
|
|
34
|
+
const cacheDir = getBinaryCacheDir();
|
|
35
|
+
const pinned = getPinnedVersion();
|
|
36
|
+
const marker = readVersionMarker(cacheDir);
|
|
37
|
+
if (!fs.existsSync(path.join(cacheDir, 'bin', 'postgres'))) {
|
|
38
|
+
return `binary missing at ${cacheDir} — would trigger download for PG ${pinned}`;
|
|
39
|
+
}
|
|
40
|
+
if (marker !== pinned) return `version drift (cached=${marker || 'unknown'}, pinned=${pinned}) — would re-download`;
|
|
41
|
+
return `binary present and matches pinned ${pinned}, no action needed`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export async function execute({ log, warn }) {
|
|
45
|
+
const cacheDir = getBinaryCacheDir();
|
|
46
|
+
const pinned = getPinnedVersion();
|
|
47
|
+
const marker = readVersionMarker(cacheDir);
|
|
48
|
+
const binaryExists = fs.existsSync(path.join(cacheDir, 'bin', 'postgres'));
|
|
49
|
+
|
|
50
|
+
if (binaryExists && marker === pinned) return { status: 'SKIP', detail: `binary OK (PG ${pinned})` };
|
|
51
|
+
|
|
52
|
+
let downloadFn;
|
|
53
|
+
try {
|
|
54
|
+
const postgres = await import('../../postgres.js');
|
|
55
|
+
downloadFn = postgres.ensureBinary || postgres.downloadBinary || postgres.installBinary;
|
|
56
|
+
} catch { /* postgres module not loadable here */ }
|
|
57
|
+
|
|
58
|
+
if (!downloadFn) {
|
|
59
|
+
warn(`binary needs refresh (pinned=${pinned}, cached=${marker || 'missing'}) but autopg postgres module not exposing download API`);
|
|
60
|
+
warn(`operator action: rerun \`bun install -g @automagik/autopg@latest\``);
|
|
61
|
+
return { status: 'FAIL', detail: 'binary refresh needs autopg npm reinstall' };
|
|
62
|
+
}
|
|
63
|
+
log(`re-downloading PG ${pinned} into ${cacheDir}`);
|
|
64
|
+
await downloadFn({ version: pinned, targetDir: cacheDir });
|
|
65
|
+
fs.writeFileSync(path.join(cacheDir, '.version'), pinned, { mode: 0o644 });
|
|
66
|
+
return { status: 'OK', detail: `binary refreshed to PG ${pinned}` };
|
|
67
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Step 5 — Consumer reconnect signal. Touches ~/.autopg/state/upgrade.signal
|
|
3
|
+
* with epoch + autopg version. Consumers (omni-api, genie-serve) opt-in via fs.watch.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import fs from 'node:fs';
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
9
|
+
|
|
10
|
+
export const name = 'consumer-signal';
|
|
11
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
12
|
+
|
|
13
|
+
function getAutopgRoot() {
|
|
14
|
+
return process.env.AUTOPG_CONFIG_DIR || process.env.PGSERVE_CONFIG_DIR || `${process.env.HOME}/.autopg`;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function getAutopgVersion() {
|
|
18
|
+
try {
|
|
19
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, '..', '..', '..', 'package.json'), 'utf8'));
|
|
20
|
+
return pkg.version || 'unknown';
|
|
21
|
+
} catch { return 'unknown'; }
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export async function plan() {
|
|
25
|
+
return `would write upgrade signal at ${path.join(getAutopgRoot(), 'state', 'upgrade.signal')}`;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export async function execute() {
|
|
29
|
+
const signalDir = path.join(getAutopgRoot(), 'state');
|
|
30
|
+
fs.mkdirSync(signalDir, { recursive: true });
|
|
31
|
+
const payload = {
|
|
32
|
+
timestamp: new Date().toISOString(),
|
|
33
|
+
epoch_ms: Date.now(),
|
|
34
|
+
autopg_version: getAutopgVersion(),
|
|
35
|
+
canonical_port: 8432,
|
|
36
|
+
};
|
|
37
|
+
const signalPath = path.join(signalDir, 'upgrade.signal');
|
|
38
|
+
fs.writeFileSync(signalPath, `${JSON.stringify(payload, null, 2)}\n`, { mode: 0o644 });
|
|
39
|
+
return { status: 'OK', detail: `signal written at ${signalPath}` };
|
|
40
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Step 4 — App env file refresh. Regenerates ~/.autopg/<name>.env with
|
|
3
|
+
* canonical port. Verifies SCRAM cred works; warns if rotation needed.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import fs from 'node:fs';
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import { execSync } from 'node:child_process';
|
|
9
|
+
|
|
10
|
+
export const name = 'env-refresh';
|
|
11
|
+
const CANONICAL_PORT = 8432;
|
|
12
|
+
|
|
13
|
+
function getAutopgRoot() {
|
|
14
|
+
return process.env.AUTOPG_CONFIG_DIR || process.env.PGSERVE_CONFIG_DIR || `${process.env.HOME}/.autopg`;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function listAppEnvFiles() {
|
|
18
|
+
const root = getAutopgRoot();
|
|
19
|
+
if (!fs.existsSync(root)) return [];
|
|
20
|
+
return fs.readdirSync(root)
|
|
21
|
+
.filter((f) => f.endsWith('.env') && !f.startsWith('.'))
|
|
22
|
+
.map((f) => path.join(root, f));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function parseEnv(content) {
|
|
26
|
+
const out = {};
|
|
27
|
+
for (const line of content.split('\n')) {
|
|
28
|
+
const m = line.match(/^([A-Z_][A-Z0-9_]*)=(.*)$/);
|
|
29
|
+
if (m) out[m[1]] = m[2].replace(/^"(.*)"$/, '$1');
|
|
30
|
+
}
|
|
31
|
+
return out;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function buildUrl({ user, password, port, db }) {
|
|
35
|
+
const enc = (s) => encodeURIComponent(s);
|
|
36
|
+
return `postgresql://${enc(user)}:${enc(password)}@127.0.0.1:${port}/${db}`;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function tryConnect(url) {
|
|
40
|
+
try {
|
|
41
|
+
execSync(`psql ${JSON.stringify(url)} -At -c "SELECT 1"`, { stdio: 'pipe', env: process.env });
|
|
42
|
+
return true;
|
|
43
|
+
} catch { return false; }
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export async function plan() {
|
|
47
|
+
const files = listAppEnvFiles();
|
|
48
|
+
if (files.length === 0) return 'no app .env files found in autopg root';
|
|
49
|
+
return `would verify+rewrite ${files.length} env file(s): ${files.map((f) => path.basename(f)).join(', ')}`;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export async function execute({ warn }) {
|
|
53
|
+
const files = listAppEnvFiles();
|
|
54
|
+
if (files.length === 0) return { status: 'SKIP', detail: 'no .env files' };
|
|
55
|
+
|
|
56
|
+
let updated = 0, valid = 0;
|
|
57
|
+
for (const file of files) {
|
|
58
|
+
try {
|
|
59
|
+
const content = fs.readFileSync(file, 'utf8');
|
|
60
|
+
const env = parseEnv(content);
|
|
61
|
+
const url = env.DATABASE_URL || env.PG_URL || env.POSTGRES_URL;
|
|
62
|
+
if (!url) {
|
|
63
|
+
warn(`[env-refresh] ${path.basename(file)}: no DATABASE_URL key`);
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
const parsed = new URL(url);
|
|
67
|
+
const newUrl = buildUrl({
|
|
68
|
+
user: decodeURIComponent(parsed.username),
|
|
69
|
+
password: decodeURIComponent(parsed.password),
|
|
70
|
+
port: CANONICAL_PORT,
|
|
71
|
+
db: parsed.pathname.replace(/^\//, ''),
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
if (tryConnect(newUrl)) {
|
|
75
|
+
valid++;
|
|
76
|
+
if (newUrl !== url) {
|
|
77
|
+
const newContent = content.replace(/^(DATABASE_URL|PG_URL|POSTGRES_URL)=.*/m, `$1=${newUrl}`);
|
|
78
|
+
fs.writeFileSync(file, newContent, { mode: 0o600 });
|
|
79
|
+
updated++;
|
|
80
|
+
}
|
|
81
|
+
} else {
|
|
82
|
+
warn(`[env-refresh] ${path.basename(file)}: SCRAM cred fails — rotate via \`autopg rotate <app>\``);
|
|
83
|
+
}
|
|
84
|
+
} catch (err) {
|
|
85
|
+
warn(`[env-refresh] ${path.basename(file)} failed: ${err.message}`);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return { status: 'OK', detail: `validated ${valid}/${files.length}, rewrote ${updated}` };
|
|
89
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Step 6 — Health validation. pg_isready + per-DB plpgsql smoke test.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { execSync } from 'node:child_process';
|
|
6
|
+
|
|
7
|
+
export const name = 'health-validate';
|
|
8
|
+
const CANONICAL_PORT = 8432;
|
|
9
|
+
const SYSTEM_DBS = new Set(['template0', 'template1']);
|
|
10
|
+
|
|
11
|
+
function pgIsReady() {
|
|
12
|
+
try { execSync(`pg_isready -h 127.0.0.1 -p ${CANONICAL_PORT}`, { stdio: 'pipe' }); return true; }
|
|
13
|
+
catch { return false; }
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function listAllDbs() {
|
|
17
|
+
const env = { ...process.env, PGPASSWORD: process.env.PGPASSWORD || 'postgres' };
|
|
18
|
+
const out = execSync(
|
|
19
|
+
`psql -h 127.0.0.1 -p ${CANONICAL_PORT} -U postgres -At -c "SELECT datname FROM pg_database WHERE NOT datistemplate"`,
|
|
20
|
+
{ env, stdio: ['ignore', 'pipe', 'pipe'] },
|
|
21
|
+
).toString().trim();
|
|
22
|
+
return out ? out.split('\n').filter(Boolean) : [];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function plpgsqlSmoke(db) {
|
|
26
|
+
try {
|
|
27
|
+
const env = { ...process.env, PGPASSWORD: process.env.PGPASSWORD || 'postgres' };
|
|
28
|
+
execSync(
|
|
29
|
+
`psql -h 127.0.0.1 -p ${CANONICAL_PORT} -U postgres -d ${db} -At -c "DO \\$\\$ BEGIN RAISE NOTICE 'ok'; END; \\$\\$"`,
|
|
30
|
+
{ env, stdio: 'pipe' },
|
|
31
|
+
);
|
|
32
|
+
return true;
|
|
33
|
+
} catch { return false; }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export async function plan() {
|
|
37
|
+
return `would check pg_isready on :${CANONICAL_PORT} + plpgsql smoke test in each user DB`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export async function execute({ warn }) {
|
|
41
|
+
if (!pgIsReady()) return { status: 'FAIL', detail: `pg_isready failed on port ${CANONICAL_PORT}` };
|
|
42
|
+
let dbs;
|
|
43
|
+
try { dbs = listAllDbs(); } catch (err) { return { status: 'FAIL', detail: `cannot list DBs: ${err.message}` }; }
|
|
44
|
+
|
|
45
|
+
let pass = 0, fail = 0;
|
|
46
|
+
for (const db of dbs) {
|
|
47
|
+
if (SYSTEM_DBS.has(db)) continue;
|
|
48
|
+
if (plpgsqlSmoke(db)) pass++;
|
|
49
|
+
else { fail++; warn(`[health-validate] plpgsql smoke FAIL in ${db}`); }
|
|
50
|
+
}
|
|
51
|
+
if (fail > 0) return { status: 'FAIL', detail: `${pass}/${pass + fail} DBs healthy; ${fail} failure(s)` };
|
|
52
|
+
return { status: 'OK', detail: `pg_isready OK, plpgsql healthy in ${pass}/${pass} DBs` };
|
|
53
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Step 3 — plpgsql extension re-resolve.
|
|
3
|
+
* DROP+CREATE plpgsql per user DB to refresh `.so` path against current $libdir.
|
|
4
|
+
* Skips DBs with user-owned plpgsql functions (CASCADE would drop them).
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { execSync } from 'node:child_process';
|
|
8
|
+
|
|
9
|
+
export const name = 'plpgsql-resolve';
|
|
10
|
+
const CANONICAL_PORT = 8432;
|
|
11
|
+
const SYSTEM_DBS = new Set(['postgres', 'template0', 'template1']);
|
|
12
|
+
|
|
13
|
+
function pgQuery({ db, sql, captureStdout = false }) {
|
|
14
|
+
const env = { ...process.env, PGPASSWORD: process.env.PGPASSWORD || 'postgres' };
|
|
15
|
+
const cmd = `psql -h 127.0.0.1 -p ${CANONICAL_PORT} -U postgres -d ${db} -At -c ${JSON.stringify(sql)}`;
|
|
16
|
+
return captureStdout
|
|
17
|
+
? execSync(cmd, { env, stdio: ['ignore', 'pipe', 'pipe'] }).toString().trim()
|
|
18
|
+
: execSync(cmd, { env, stdio: 'pipe' });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function listUserDbs() {
|
|
22
|
+
const out = pgQuery({
|
|
23
|
+
db: 'postgres',
|
|
24
|
+
sql: "SELECT datname FROM pg_database WHERE NOT datistemplate AND datname != 'postgres' ORDER BY datname",
|
|
25
|
+
captureStdout: true,
|
|
26
|
+
});
|
|
27
|
+
return out ? out.split('\n').filter(Boolean) : [];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function hasUserOwnedPlpgsqlFunctions(db) {
|
|
31
|
+
const out = pgQuery({
|
|
32
|
+
db,
|
|
33
|
+
sql: "SELECT count(*) FROM pg_proc p JOIN pg_language l ON p.prolang = l.oid WHERE l.lanname = 'plpgsql' AND p.proowner != 10",
|
|
34
|
+
captureStdout: true,
|
|
35
|
+
});
|
|
36
|
+
return parseInt(out, 10) > 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export async function plan() {
|
|
40
|
+
let dbs;
|
|
41
|
+
try { dbs = listUserDbs(); } catch (err) { return `cannot enumerate DBs: ${err.message}`; }
|
|
42
|
+
return `would DROP+CREATE plpgsql in ${dbs.length} user DB(s): ${dbs.join(', ')}`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export async function execute({ warn }) {
|
|
46
|
+
let dbs;
|
|
47
|
+
try { dbs = listUserDbs(); } catch (err) { return { status: 'FAIL', detail: `cannot enumerate DBs: ${err.message}` }; }
|
|
48
|
+
if (dbs.length === 0) return { status: 'SKIP', detail: 'no user DBs to refresh' };
|
|
49
|
+
|
|
50
|
+
let refreshed = 0, skipped = 0;
|
|
51
|
+
for (const db of dbs) {
|
|
52
|
+
if (SYSTEM_DBS.has(db)) { skipped++; continue; }
|
|
53
|
+
try {
|
|
54
|
+
if (hasUserOwnedPlpgsqlFunctions(db)) {
|
|
55
|
+
warn(`[plpgsql-resolve] skip ${db}: user-owned plpgsql functions present (DROP CASCADE would lose them)`);
|
|
56
|
+
skipped++; continue;
|
|
57
|
+
}
|
|
58
|
+
pgQuery({ db, sql: 'DROP EXTENSION IF EXISTS plpgsql CASCADE; CREATE EXTENSION plpgsql' });
|
|
59
|
+
refreshed++;
|
|
60
|
+
} catch (err) {
|
|
61
|
+
warn(`[plpgsql-resolve] ${db} failed: ${err.message}`);
|
|
62
|
+
skipped++;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return { status: 'OK', detail: `refreshed ${refreshed} DB(s), skipped ${skipped}` };
|
|
66
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Step 1 — Port reconciliation. Ensures pgserve listens on canonical 8432.
|
|
3
|
+
* If running on a different port, stop and relaunch on 8432. Idempotent.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { execSync } from 'node:child_process';
|
|
7
|
+
import fs from 'node:fs';
|
|
8
|
+
import path from 'node:path';
|
|
9
|
+
|
|
10
|
+
export const name = 'port-reconcile';
|
|
11
|
+
const CANONICAL_PORT = 8432;
|
|
12
|
+
|
|
13
|
+
function readPostmasterPid(dataDir) {
|
|
14
|
+
try {
|
|
15
|
+
const content = fs.readFileSync(path.join(dataDir, 'postmaster.pid'), 'utf8');
|
|
16
|
+
const lines = content.trim().split('\n');
|
|
17
|
+
return { pid: parseInt(lines[0], 10), port: parseInt(lines[3], 10) };
|
|
18
|
+
} catch {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function getDataDir() {
|
|
24
|
+
return process.env.PGSERVE_DATA || `${process.env.HOME}/.pgserve/data`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export async function plan() {
|
|
28
|
+
const info = readPostmasterPid(getDataDir());
|
|
29
|
+
if (!info) return 'no running pgserve detected — nothing to reconcile';
|
|
30
|
+
if (info.port === CANONICAL_PORT) return `already on port ${CANONICAL_PORT}, no action needed`;
|
|
31
|
+
return `would stop pgserve PID ${info.pid} (port ${info.port}) and relaunch on ${CANONICAL_PORT}`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export async function execute({ log, warn }) {
|
|
35
|
+
const info = readPostmasterPid(getDataDir());
|
|
36
|
+
if (!info) return { status: 'SKIP', detail: 'no running pgserve' };
|
|
37
|
+
if (info.port === CANONICAL_PORT) return { status: 'SKIP', detail: `already on ${CANONICAL_PORT}` };
|
|
38
|
+
|
|
39
|
+
log(`stopping pgserve PID ${info.pid} (port ${info.port})`);
|
|
40
|
+
try {
|
|
41
|
+
execSync(`pm2 restart pgserve --update-env -- --port ${CANONICAL_PORT}`, { stdio: 'pipe' });
|
|
42
|
+
return { status: 'OK', detail: `pm2 restart pgserve on port ${CANONICAL_PORT}` };
|
|
43
|
+
} catch (pm2Err) {
|
|
44
|
+
warn(`pm2 restart failed (${pm2Err.message}) — falling back to direct pg_ctl`);
|
|
45
|
+
try {
|
|
46
|
+
execSync(`pg_ctl -D ${getDataDir()} -m fast stop`, { stdio: 'pipe' });
|
|
47
|
+
return { status: 'OK', detail: `stopped pgserve; relaunch via pm2 or autopg install` };
|
|
48
|
+
} catch (ctlErr) {
|
|
49
|
+
throw new Error(`port reconcile failed: pm2 (${pm2Err.message}) and pg_ctl (${ctlErr.message})`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
# Windows Debug Context
|
|
2
|
-
|
|
3
|
-
## RESOLVED (2025-12-12)
|
|
4
|
-
|
|
5
|
-
The Windows router binding issue has been fixed. See "Solution Applied" below.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Original Issue
|
|
10
|
-
PostgreSQL starts successfully on port 9432, but the router/proxy on port 8432 was NOT listening.
|
|
11
|
-
Clients could not connect because 8432 wasn't bound.
|
|
12
|
-
|
|
13
|
-
## Root Causes Found
|
|
14
|
-
|
|
15
|
-
### 1. `reusePort: true` - Linux-only feature (PRIMARY CAUSE)
|
|
16
|
-
**Location:** `src/cluster.js:75`
|
|
17
|
-
|
|
18
|
-
The cluster mode uses `Bun.listen({ reusePort: true })` which maps to `SO_REUSEPORT`.
|
|
19
|
-
This socket option is Linux-only and **silently fails on Windows**.
|
|
20
|
-
|
|
21
|
-
### 2. Auto-enabled cluster mode on multi-core Windows systems
|
|
22
|
-
**Location:** `bin/pglite-server.js:106`
|
|
23
|
-
|
|
24
|
-
Windows systems with multiple CPU cores automatically entered cluster mode,
|
|
25
|
-
triggering the `reusePort` failure.
|
|
26
|
-
|
|
27
|
-
### 3. TCP port opens before PostgreSQL ready for protocol handshakes
|
|
28
|
-
**Location:** `src/postgres.js:803-821`
|
|
29
|
-
|
|
30
|
-
PostgreSQL was marked "ready" when TCP port opened, but it wasn't actually
|
|
31
|
-
ready for protocol-level handshakes. Admin pool connection timed out.
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## Solution Applied
|
|
36
|
-
|
|
37
|
-
### Fix 1: Disable cluster mode on Windows
|
|
38
|
-
**File:** `bin/pglite-server.js:98-108`
|
|
39
|
-
```javascript
|
|
40
|
-
const isWindows = os.platform() === 'win32';
|
|
41
|
-
cluster: cpuCount > 1 && !isWindows,
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### Fix 2: Add platform check to reusePort
|
|
45
|
-
**File:** `src/cluster.js:72-76`
|
|
46
|
-
```javascript
|
|
47
|
-
const isWindows = os.platform() === 'win32';
|
|
48
|
-
this.server = Bun.listen({
|
|
49
|
-
reusePort: !isWindows, // SO_REUSEPORT only works on Linux/macOS
|
|
50
|
-
...
|
|
51
|
-
});
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### Fix 3: Add port binding verification
|
|
55
|
-
**File:** `src/cluster.js:99-102`
|
|
56
|
-
```javascript
|
|
57
|
-
if (!this.server || !this.server.port) {
|
|
58
|
-
throw new Error(`Failed to bind to port ${this.port} - reusePort may not be supported`);
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### Fix 4: Add Windows readiness delay
|
|
63
|
-
**File:** `src/postgres.js:813-817`
|
|
64
|
-
```javascript
|
|
65
|
-
if (isWindows) {
|
|
66
|
-
await Bun.sleep(2000); // 2 second delay for Windows
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### Fix 5: Increase admin pool retry for Windows
|
|
71
|
-
**File:** `src/postgres.js:598-599`
|
|
72
|
-
```javascript
|
|
73
|
-
const maxRetries = isWindows ? 10 : 5;
|
|
74
|
-
const baseDelay = isWindows ? 2000 : 1000;
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
## Verification
|
|
80
|
-
|
|
81
|
-
After applying fixes, server runs correctly on Windows:
|
|
82
|
-
- Router: `127.0.0.1:7432` ✅
|
|
83
|
-
- PostgreSQL: `127.0.0.1:8432` ✅
|
|
84
|
-
- Database auto-provisioning: ✅
|
|
85
|
-
- Query execution: ✅
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
Server started successfully!
|
|
89
|
-
|
|
90
|
-
Endpoint: postgresql://127.0.0.1:7432/<database>
|
|
91
|
-
Mode: In-memory (ephemeral)
|
|
92
|
-
PostgreSQL: Port 8432 (internal)
|
|
93
|
-
Auto-create: Enabled
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## Test Commands (Run from Windows)
|
|
99
|
-
```cmd
|
|
100
|
-
# Build binary
|
|
101
|
-
bun build --compile bin/pglite-server.js --outfile dist/pgserve-windows-x64.exe
|
|
102
|
-
|
|
103
|
-
# Start server
|
|
104
|
-
dist\pgserve-windows-x64.exe
|
|
105
|
-
|
|
106
|
-
# Check ports are listening (should see BOTH)
|
|
107
|
-
netstat -an | findstr "LISTEN" | findstr "8432 9432"
|
|
108
|
-
|
|
109
|
-
# Test connection
|
|
110
|
-
psql postgresql://localhost:8432/testdb
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## Related Files
|
|
116
|
-
- `bin/pglite-server.js` - Entry point, cluster mode decision
|
|
117
|
-
- `src/cluster.js` - Cluster mode with reusePort
|
|
118
|
-
- `src/router.js` - Single-process mode (works on Windows)
|
|
119
|
-
- `src/postgres.js` - PostgreSQL startup and admin pool
|
package/.genie/AGENTS.md
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Base
|
|
3
|
-
label: 🧞 Base
|
|
4
|
-
description: Global agents (orchestration, QA, analysis, maintenance)
|
|
5
|
-
github_url: https://github.com/namastexlabs/automagik-genie/tree/main/.genie
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
> **Shared rules in `~/.claude/rules/agent-bible.md`. Read it.**
|
|
9
|
-
|
|
10
|
-
# Base Genie Agents
|
|
11
|
-
|
|
12
|
-
**Global agents available across all collectives.**
|
|
13
|
-
|
|
14
|
-
For complete orchestration framework and instructions, see:
|
|
15
|
-
@AGENTS.md
|