Skip to content
Closed
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
2 changes: 1 addition & 1 deletion apps/loopover-ui/content/docs/ams-config-precedence.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,5 @@ goal-spec override.
## See also

- [`packages/loopover-miner/docs/miner-goal-spec.md`](https://github.com/JSONbored/loopover/blob/main/packages/loopover-miner/docs/miner-goal-spec.md) — goal-spec field reference
- [`packages/loopover-miner/docs/env-reference.md`](https://github.com/JSONbored/loopover/blob/main/packages/loopover-miner/docs/env-reference.md) — generated operator env list
- [AMS environment variable reference](/docs/ams-env-reference) — generated operator env list
- ORB's `.loopover.yml` precedence (`yml > DB > defaults`) in [Self-hosting configuration](/docs/self-hosting-configuration) — analogous documentation style, different runtime
24 changes: 24 additions & 0 deletions apps/loopover-ui/content/docs/ams-env-reference.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: AMS environment variable reference
description: Every LOOPOVER_MINER_* / MINER_* env var the miner reads, where it's first referenced in code, and its default -- generated from source, never hand-copied.
---

import { AMS_ENV_REFERENCE_MARKDOWN } from "@/lib/ams-env-reference";

AMS's environment-variable reference: every `LOOPOVER_MINER_*` / `MINER_*` var the miner reads,
where it's first referenced in code, and its default. This is the AMS-side counterpart to
[Self-hosting configuration](/docs/self-hosting-configuration)'s generated env reference — see
the [AMS deployment guide](/docs/ams-deployment) and [AMS config
precedence](/docs/ams-config-precedence) for how these variables fit into the broader
laptop/fleet setup and precedence model.

<Callout variant="note">
This table is generated from `env.NAME` reads (and the `resolveLocalStoreDbPath` /
`LOOPOVER_MINER_*_DB` per-store override pattern) under
`packages/loopover-miner/{bin,lib,scripts}`. It intentionally includes names, first source
references, and defaults only, never example values — and it's checked for drift in CI
(`npm run miner:env-reference:check`), so a new `LOOPOVER_MINER_*`/`MINER_*` read that isn't
reflected here fails the build until this reference is regenerated.
</Callout>

<CodeBlock filename="AMS env vars" code={AMS_ENV_REFERENCE_MARKDOWN} />
2 changes: 1 addition & 1 deletion apps/loopover-ui/content/docs/ams-operations-runbook.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,6 @@ store filename.

- [AMS deployment guide](/docs/ams-deployment) — laptop vs fleet, volumes, systemd, scaling rules
- [`packages/loopover-miner/README.md`](https://github.com/JSONbored/loopover/blob/main/packages/loopover-miner/README.md#local-storage) — store inventory
- [`packages/loopover-miner/docs/env-reference.md`](https://github.com/JSONbored/loopover/blob/main/packages/loopover-miner/docs/env-reference.md) — per-store path overrides
- [AMS environment variable reference](/docs/ams-env-reference) — per-store path overrides
- [`packages/loopover-miner/docs/coding-agent-driver.md`](https://github.com/JSONbored/loopover/blob/main/packages/loopover-miner/docs/coding-agent-driver.md) — attempt log semantics
- [`packages/loopover-miner/docs/discovery-plane-operator-guide.md`](https://github.com/JSONbored/loopover/blob/main/packages/loopover-miner/docs/discovery-plane-operator-guide.md) — optional hosted plane (distinct from local ledger ops)
1 change: 1 addition & 0 deletions apps/loopover-ui/src/components/site/docs-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export const docsNav: DocsGroup[] = [
{ to: "/docs/ams-unattended-scheduling", label: "Unattended scheduling" },
{ to: "/docs/ams-sizing", label: "Resource sizing" },
{ to: "/docs/ams-config-precedence", label: "Config precedence" },
{ to: "/docs/ams-env-reference", label: "Env var reference" },
],
},
],
Expand Down
199 changes: 199 additions & 0 deletions apps/loopover-ui/src/lib/ams-env-reference.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
// Generated by scripts/generate-env-reference.mjs (npm run miner:env-reference). Do not edit manually.
export type MinerEnvReferenceRow = {
name: string;
firstReference: string;
defaultValue: string | null;
};

export const AMS_ENV_REFERENCE_ROWS: MinerEnvReferenceRow[] = [
{
name: "LOOPOVER_MINER_AMS_COLLECTOR_TOKEN",
firstReference: "lib/orb-export.js",
defaultValue: "",
},
{
name: "LOOPOVER_MINER_AMS_COLLECTOR_URL",
firstReference: "lib/orb-export.js",
defaultValue: "",
},
{
name: "LOOPOVER_MINER_AMS_OAUTH_CLIENT_ID",
firstReference: "lib/oauth-device-flow.js",
defaultValue: "",
},
{
name: "LOOPOVER_MINER_AMS_POLICY_PATH",
firstReference: "lib/ams-policy.js",
defaultValue: null,
},
{
name: "LOOPOVER_MINER_ATTEMPT_LOG_DB",
firstReference: "lib/attempt-log.js",
defaultValue: null,
},
{
name: "LOOPOVER_MINER_CLAIM_LEDGER_DB",
firstReference: "lib/claim-ledger.js",
defaultValue: null,
},
{
name: "LOOPOVER_MINER_CONFIG_DIR",
firstReference: "lib/deny-hook-synthesis.js",
defaultValue: "",
},
{
name: "LOOPOVER_MINER_DENY_HOOK_SYNTHESIS_DB",
firstReference: "lib/deny-hook-synthesis.js",
defaultValue: "",
},
{
name: "LOOPOVER_MINER_EVENT_LEDGER_DB",
firstReference: "lib/event-ledger.js",
defaultValue: null,
},
{
name: "LOOPOVER_MINER_GOVERNOR_LEDGER_DB",
firstReference: "lib/governor-ledger.js",
defaultValue: "",
},
{
name: "LOOPOVER_MINER_GOVERNOR_STATE_DB",
firstReference: "lib/governor-state.js",
defaultValue: null,
},
{
name: "LOOPOVER_MINER_KILL_SWITCH",
firstReference: "lib/config-precedence.js",
defaultValue: "",
},
{
name: "LOOPOVER_MINER_LOG_LEVEL",
firstReference: "lib/logger.js",
defaultValue: "",
},
{
name: "LOOPOVER_MINER_NO_UPDATE_CHECK",
firstReference: "lib/update-check.js",
defaultValue: "",
},
{
name: "LOOPOVER_MINER_ORB_EXPORT_DB",
firstReference: "lib/orb-export.js",
defaultValue: "",
},
{
name: "LOOPOVER_MINER_PLAN_STORE_DB",
firstReference: "lib/plan-store.js",
defaultValue: "",
},
{
name: "LOOPOVER_MINER_POLICY_DOC_CACHE_DB",
firstReference: "lib/policy-doc-cache.js",
defaultValue: null,
},
{
name: "LOOPOVER_MINER_POLICY_VERDICT_CACHE_DB",
firstReference: "lib/policy-verdict-cache.js",
defaultValue: null,
},
{
name: "LOOPOVER_MINER_PORTFOLIO_QUEUE_DB",
firstReference: "lib/portfolio-queue.js",
defaultValue: null,
},
{
name: "LOOPOVER_MINER_PREDICTION_LEDGER_DB",
firstReference: "lib/prediction-ledger.js",
defaultValue: "",
},
{
name: "LOOPOVER_MINER_RANKED_CANDIDATES_DB",
firstReference: "lib/ranked-candidates.js",
defaultValue: null,
},
{
name: "LOOPOVER_MINER_REPLAY_SNAPSHOT_DB",
firstReference: "lib/replay-snapshot.js",
defaultValue: null,
},
{
name: "LOOPOVER_MINER_REPO_CLONE_DIR",
firstReference: "lib/repo-clone.js",
defaultValue: "",
},
{
name: "LOOPOVER_MINER_RUN_STATE_DB",
firstReference: "lib/run-state.js",
defaultValue: null,
},
{
name: "LOOPOVER_MINER_SENTRY_DSN",
firstReference: "lib/sentry.js",
defaultValue: null,
},
{
name: "LOOPOVER_MINER_SENTRY_ENVIRONMENT",
firstReference: "lib/sentry.js",
defaultValue: "production",
},
{
name: "LOOPOVER_MINER_VERSION",
firstReference: "lib/version.js",
defaultValue: "",
},
{
name: "LOOPOVER_MINER_WORKTREE_ALLOCATOR_DB",
firstReference: "lib/worktree-allocator.js",
defaultValue: "",
},
{
name: "LOOPOVER_MINER_WORKTREE_DIR",
firstReference: "lib/worktree-allocator.js",
defaultValue: "",
},
{
name: "MINER_CODING_AGENT_PROVIDER",
firstReference: "lib/laptop-init.js",
defaultValue: null,
},
];

export const AMS_ENV_REFERENCE_MARKDOWN = [
"# loopover-miner environment variable reference",
"",
"Generated by `npm run miner:env-reference`. Do not edit manually.",
"",
"| Name | First reference | Default |",
"| --- | --- | --- |",
'| `LOOPOVER_MINER_AMS_COLLECTOR_TOKEN` | `lib/orb-export.js` | `""` |',
'| `LOOPOVER_MINER_AMS_COLLECTOR_URL` | `lib/orb-export.js` | `""` |',
'| `LOOPOVER_MINER_AMS_OAUTH_CLIENT_ID` | `lib/oauth-device-flow.js` | `""` |',
"| `LOOPOVER_MINER_AMS_POLICY_PATH` | `lib/ams-policy.js` | (none) |",
"| `LOOPOVER_MINER_ATTEMPT_LOG_DB` | `lib/attempt-log.js` | (none) |",
"| `LOOPOVER_MINER_CLAIM_LEDGER_DB` | `lib/claim-ledger.js` | (none) |",
'| `LOOPOVER_MINER_CONFIG_DIR` | `lib/deny-hook-synthesis.js` | `""` |',
'| `LOOPOVER_MINER_DENY_HOOK_SYNTHESIS_DB` | `lib/deny-hook-synthesis.js` | `""` |',
"| `LOOPOVER_MINER_EVENT_LEDGER_DB` | `lib/event-ledger.js` | (none) |",
'| `LOOPOVER_MINER_GOVERNOR_LEDGER_DB` | `lib/governor-ledger.js` | `""` |',
"| `LOOPOVER_MINER_GOVERNOR_STATE_DB` | `lib/governor-state.js` | (none) |",
'| `LOOPOVER_MINER_KILL_SWITCH` | `lib/config-precedence.js` | `""` |',
'| `LOOPOVER_MINER_LOG_LEVEL` | `lib/logger.js` | `""` |',
'| `LOOPOVER_MINER_NO_UPDATE_CHECK` | `lib/update-check.js` | `""` |',
'| `LOOPOVER_MINER_ORB_EXPORT_DB` | `lib/orb-export.js` | `""` |',
'| `LOOPOVER_MINER_PLAN_STORE_DB` | `lib/plan-store.js` | `""` |',
"| `LOOPOVER_MINER_POLICY_DOC_CACHE_DB` | `lib/policy-doc-cache.js` | (none) |",
"| `LOOPOVER_MINER_POLICY_VERDICT_CACHE_DB` | `lib/policy-verdict-cache.js` | (none) |",
"| `LOOPOVER_MINER_PORTFOLIO_QUEUE_DB` | `lib/portfolio-queue.js` | (none) |",
'| `LOOPOVER_MINER_PREDICTION_LEDGER_DB` | `lib/prediction-ledger.js` | `""` |',
"| `LOOPOVER_MINER_RANKED_CANDIDATES_DB` | `lib/ranked-candidates.js` | (none) |",
"| `LOOPOVER_MINER_REPLAY_SNAPSHOT_DB` | `lib/replay-snapshot.js` | (none) |",
'| `LOOPOVER_MINER_REPO_CLONE_DIR` | `lib/repo-clone.js` | `""` |',
"| `LOOPOVER_MINER_RUN_STATE_DB` | `lib/run-state.js` | (none) |",
"| `LOOPOVER_MINER_SENTRY_DSN` | `lib/sentry.js` | (none) |",
'| `LOOPOVER_MINER_SENTRY_ENVIRONMENT` | `lib/sentry.js` | `"production"` |',
'| `LOOPOVER_MINER_VERSION` | `lib/version.js` | `""` |',
'| `LOOPOVER_MINER_WORKTREE_ALLOCATOR_DB` | `lib/worktree-allocator.js` | `""` |',
'| `LOOPOVER_MINER_WORKTREE_DIR` | `lib/worktree-allocator.js` | `""` |',
"| `MINER_CODING_AGENT_PROVIDER` | `lib/laptop-init.js` | (none) |",
"",
].join("\n");
21 changes: 21 additions & 0 deletions apps/loopover-ui/src/routeTree.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import { Route as DocsAmsUnattendedSchedulingRouteImport } from './routes/docs.a
import { Route as DocsAmsSizingRouteImport } from './routes/docs.ams-sizing'
import { Route as DocsAmsOperationsRunbookRouteImport } from './routes/docs.ams-operations-runbook'
import { Route as DocsAmsObservabilityRouteImport } from './routes/docs.ams-observability'
import { Route as DocsAmsEnvReferenceRouteImport } from './routes/docs.ams-env-reference'
import { Route as DocsAmsDeploymentRouteImport } from './routes/docs.ams-deployment'
import { Route as DocsAmsConfigPrecedenceRouteImport } from './routes/docs.ams-config-precedence'
import { Route as DocsAiSummariesRouteImport } from './routes/docs.ai-summaries'
Expand Down Expand Up @@ -356,6 +357,11 @@ const DocsAmsObservabilityRoute = DocsAmsObservabilityRouteImport.update({
path: '/ams-observability',
getParentRoute: () => DocsRoute,
} as any)
const DocsAmsEnvReferenceRoute = DocsAmsEnvReferenceRouteImport.update({
id: '/ams-env-reference',
path: '/ams-env-reference',
getParentRoute: () => DocsRoute,
} as any)
const DocsAmsDeploymentRoute = DocsAmsDeploymentRouteImport.update({
id: '/ams-deployment',
path: '/ams-deployment',
Expand Down Expand Up @@ -475,6 +481,7 @@ export interface FileRoutesByFullPath {
'/docs/ai-summaries': typeof DocsAiSummariesRoute
'/docs/ams-config-precedence': typeof DocsAmsConfigPrecedenceRoute
'/docs/ams-deployment': typeof DocsAmsDeploymentRoute
'/docs/ams-env-reference': typeof DocsAmsEnvReferenceRoute
'/docs/ams-observability': typeof DocsAmsObservabilityRoute
'/docs/ams-operations-runbook': typeof DocsAmsOperationsRunbookRoute
'/docs/ams-sizing': typeof DocsAmsSizingRoute
Expand Down Expand Up @@ -544,6 +551,7 @@ export interface FileRoutesByTo {
'/docs/ai-summaries': typeof DocsAiSummariesRoute
'/docs/ams-config-precedence': typeof DocsAmsConfigPrecedenceRoute
'/docs/ams-deployment': typeof DocsAmsDeploymentRoute
'/docs/ams-env-reference': typeof DocsAmsEnvReferenceRoute
'/docs/ams-observability': typeof DocsAmsObservabilityRoute
'/docs/ams-operations-runbook': typeof DocsAmsOperationsRunbookRoute
'/docs/ams-sizing': typeof DocsAmsSizingRoute
Expand Down Expand Up @@ -617,6 +625,7 @@ export interface FileRoutesById {
'/docs/ai-summaries': typeof DocsAiSummariesRoute
'/docs/ams-config-precedence': typeof DocsAmsConfigPrecedenceRoute
'/docs/ams-deployment': typeof DocsAmsDeploymentRoute
'/docs/ams-env-reference': typeof DocsAmsEnvReferenceRoute
'/docs/ams-observability': typeof DocsAmsObservabilityRoute
'/docs/ams-operations-runbook': typeof DocsAmsOperationsRunbookRoute
'/docs/ams-sizing': typeof DocsAmsSizingRoute
Expand Down Expand Up @@ -691,6 +700,7 @@ export interface FileRouteTypes {
| '/docs/ai-summaries'
| '/docs/ams-config-precedence'
| '/docs/ams-deployment'
| '/docs/ams-env-reference'
| '/docs/ams-observability'
| '/docs/ams-operations-runbook'
| '/docs/ams-sizing'
Expand Down Expand Up @@ -760,6 +770,7 @@ export interface FileRouteTypes {
| '/docs/ai-summaries'
| '/docs/ams-config-precedence'
| '/docs/ams-deployment'
| '/docs/ams-env-reference'
| '/docs/ams-observability'
| '/docs/ams-operations-runbook'
| '/docs/ams-sizing'
Expand Down Expand Up @@ -832,6 +843,7 @@ export interface FileRouteTypes {
| '/docs/ai-summaries'
| '/docs/ams-config-precedence'
| '/docs/ams-deployment'
| '/docs/ams-env-reference'
| '/docs/ams-observability'
| '/docs/ams-operations-runbook'
| '/docs/ams-sizing'
Expand Down Expand Up @@ -1257,6 +1269,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof DocsAmsObservabilityRouteImport
parentRoute: typeof DocsRoute
}
'/docs/ams-env-reference': {
id: '/docs/ams-env-reference'
path: '/ams-env-reference'
fullPath: '/docs/ams-env-reference'
preLoaderRoute: typeof DocsAmsEnvReferenceRouteImport
parentRoute: typeof DocsRoute
}
'/docs/ams-deployment': {
id: '/docs/ams-deployment'
path: '/ams-deployment'
Expand Down Expand Up @@ -1438,6 +1457,7 @@ interface DocsRouteChildren {
DocsAiSummariesRoute: typeof DocsAiSummariesRoute
DocsAmsConfigPrecedenceRoute: typeof DocsAmsConfigPrecedenceRoute
DocsAmsDeploymentRoute: typeof DocsAmsDeploymentRoute
DocsAmsEnvReferenceRoute: typeof DocsAmsEnvReferenceRoute
DocsAmsObservabilityRoute: typeof DocsAmsObservabilityRoute
DocsAmsOperationsRunbookRoute: typeof DocsAmsOperationsRunbookRoute
DocsAmsSizingRoute: typeof DocsAmsSizingRoute
Expand Down Expand Up @@ -1484,6 +1504,7 @@ const DocsRouteChildren: DocsRouteChildren = {
DocsAiSummariesRoute: DocsAiSummariesRoute,
DocsAmsConfigPrecedenceRoute: DocsAmsConfigPrecedenceRoute,
DocsAmsDeploymentRoute: DocsAmsDeploymentRoute,
DocsAmsEnvReferenceRoute: DocsAmsEnvReferenceRoute,
DocsAmsObservabilityRoute: DocsAmsObservabilityRoute,
DocsAmsOperationsRunbookRoute: DocsAmsOperationsRunbookRoute,
DocsAmsSizingRoute: DocsAmsSizingRoute,
Expand Down
53 changes: 53 additions & 0 deletions apps/loopover-ui/src/routes/docs.ams-env-reference.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { createFileRoute, notFound } from "@tanstack/react-router";
import { Suspense } from "react";

import { DocsPage } from "@/components/site/docs-page";
import { docsClientLoader } from "@/lib/docs-client-loader";

// Rendered from content/docs/ams-env-reference.mdx via fumadocs-mdx's browser entry
// (docsClientLoader), through the existing DocsPage/Callout/CodeBlock primitives --
// not fumadocs-ui's bundled components. See docs-source.ts's comment for why the
// loader below resolves only a plain, serializable path string. The .mdx content
// itself imports AMS_ENV_REFERENCE_MARKDOWN from @/lib/ams-env-reference (generated by
// packages/loopover-miner/scripts/generate-env-reference.mjs, drift-checked in CI),
// the same pattern docs.self-hosting-configuration.tsx uses for
// SELFHOST_ENV_REFERENCE_MARKDOWN.
export const Route = createFileRoute("/docs/ams-env-reference")({
loader: async () => {
const { docsSource } = await import("@/lib/docs-source");
const page = docsSource.getPage(["ams-env-reference"]);
if (!page) throw notFound();
return { path: page.path, title: page.data.title, description: page.data.description };
},
head: () => ({
meta: [
{ title: "AMS environment variable reference — LoopOver docs" },
{
name: "description",
content:
"Every LOOPOVER_MINER_* / MINER_* env var the miner reads, where it's first referenced in code, and its default -- generated from source, never hand-copied.",
},
{ property: "og:title", content: "AMS environment variable reference — LoopOver docs" },
{
property: "og:description",
content:
"Every LOOPOVER_MINER_* / MINER_* env var the miner reads, where it's first referenced in code, and its default -- generated from source, never hand-copied.",
},
{ property: "og:url", content: "/docs/ams-env-reference" },
],
links: [{ rel: "canonical", href: "/docs/ams-env-reference" }],
}),
component: AmsEnvReference,
});

function AmsEnvReference() {
const { path, title, description } = Route.useLoaderData();
const Content = docsClientLoader.getComponent(path);
return (
<DocsPage eyebrow="Maintainers" title={title} description={description}>
<Suspense fallback={<p className="text-token-sm text-muted-foreground">Loading…</p>}>
<Content />
</Suspense>
</DocsPage>
);
}
Loading
Loading