okengine 0.18.4 → 0.19.0
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/AGENTS.md +18 -10
- package/README.md +2 -2
- package/package.json +51 -50
- package/site/content/docs/ai/index.mdx +25 -6
- package/site/content/docs/ai/llms-txt.mdx +1 -1
- package/site/content/docs/ai/meta.json +1 -1
- package/site/content/docs/ai/skills.mdx +4 -1
- package/site/content/docs/ai/try-it.mdx +58 -0
- package/site/content/docs/client/auth.mdx +208 -0
- package/site/content/docs/client/calling.mdx +451 -0
- package/site/content/docs/client/index.mdx +209 -0
- package/site/content/docs/client/live.mdx +234 -0
- package/site/content/docs/client/meta.json +5 -0
- package/site/content/docs/client/react.mdx +249 -0
- package/site/content/docs/elements/ai/agents.mdx +232 -0
- package/site/content/docs/elements/ai/index.mdx +341 -0
- package/site/content/docs/elements/ai/mcp.mdx +275 -0
- package/site/content/docs/elements/ai/meta.json +5 -0
- package/site/content/docs/elements/ai/models.mdx +283 -0
- package/site/content/docs/elements/ai/prompts.mdx +256 -0
- package/site/content/docs/elements/channel/email.mdx +266 -0
- package/site/content/docs/elements/channel/index.mdx +344 -0
- package/site/content/docs/elements/channel/meta.json +5 -0
- package/site/content/docs/elements/channel/push.mdx +218 -0
- package/site/content/docs/elements/channel/receipts.mdx +206 -0
- package/site/content/docs/elements/channel/sms.mdx +264 -0
- package/site/content/docs/elements/channel/whatsapp.mdx +220 -0
- package/site/content/docs/elements/clock/index.mdx +300 -0
- package/site/content/docs/elements/clock/meta.json +5 -0
- package/site/content/docs/elements/clock/schedules.mdx +508 -0
- package/site/content/docs/elements/clock/sleep.mdx +445 -0
- package/site/content/docs/elements/flow/consumers.mdx +707 -0
- package/site/content/docs/elements/flow/http.mdx +1080 -0
- package/site/content/docs/elements/flow/index.mdx +618 -0
- package/site/content/docs/elements/flow/meta.json +5 -0
- package/site/content/docs/elements/flow/routing.mdx +559 -0
- package/site/content/docs/elements/flow/workflows.mdx +640 -0
- package/site/content/docs/elements/gate/auth.mdx +371 -0
- package/site/content/docs/elements/gate/authorization.mdx +298 -0
- package/site/content/docs/elements/gate/index.mdx +418 -0
- package/site/content/docs/elements/gate/meta.json +5 -0
- package/site/content/docs/elements/gate/rate-limits.mdx +365 -0
- package/site/content/docs/elements/gate/rls.mdx +303 -0
- package/site/content/docs/elements/gate/tenancy.mdx +372 -0
- package/site/content/docs/elements/index.mdx +52 -11
- package/site/content/docs/elements/signal/broadcast.mdx +517 -0
- package/site/content/docs/elements/signal/index.mdx +352 -0
- package/site/content/docs/elements/signal/live.mdx +590 -0
- package/site/content/docs/elements/signal/meta.json +5 -0
- package/site/content/docs/elements/signal/once.mdx +596 -0
- package/site/content/docs/elements/store/files.mdx +659 -0
- package/site/content/docs/elements/store/index.mdx +310 -0
- package/site/content/docs/elements/store/kv.mdx +629 -0
- package/site/content/docs/elements/store/meta.json +5 -0
- package/site/content/docs/elements/store/search.mdx +946 -0
- package/site/content/docs/elements/store/sql.mdx +937 -0
- package/site/content/docs/elements/vault/config.mdx +256 -0
- package/site/content/docs/elements/vault/index.mdx +356 -0
- package/site/content/docs/elements/vault/meta.json +5 -0
- package/site/content/docs/elements/vault/rotation.mdx +273 -0
- package/site/content/docs/elements/vault/secrets.mdx +285 -0
- package/site/content/docs/index.mdx +78 -30
- package/site/content/docs/meta.json +11 -8
- package/site/content/docs/plugins/cors.mdx +2 -1
- package/site/content/docs/plugins/csrf.mdx +4 -1
- package/site/content/docs/plugins/headers.mdx +2 -1
- package/site/content/docs/plugins/ip-allowlist.mdx +2 -1
- package/site/content/docs/plugins/magic-link.mdx +6 -0
- package/site/content/docs/plugins/maintenance-mode.mdx +2 -1
- package/site/content/docs/plugins/oauth.mdx +1 -1
- package/site/content/docs/plugins/otp.mdx +12 -1
- package/site/content/docs/plugins/passkey.mdx +39 -15
- package/site/content/docs/plugins/two-factor.mdx +91 -34
- package/site/content/docs/plugins/username.mdx +1 -1
- package/site/content/docs/recipes/caddy.mdx +3 -3
- package/site/content/docs/recipes/index.mdx +18 -28
- package/site/content/docs/recipes/mailpit.mdx +1 -1
- package/site/content/docs/recipes/meilisearch.mdx +3 -3
- package/site/content/docs/recipes/meta.json +1 -4
- package/site/content/docs/recipes/nginx.mdx +2 -2
- package/site/content/docs/recipes/openrouter.mdx +283 -0
- package/site/content/docs/recipes/pgdog.mdx +3 -3
- package/site/content/docs/recipes/postgres.mdx +1 -2
- package/site/content/docs/recipes/rustfs.mdx +2 -2
- package/site/content/docs/recipes/traefik.mdx +3 -3
- package/site/content/docs/reference/cli.mdx +231 -0
- package/site/content/docs/reference/configuration.mdx +30 -10
- package/site/content/docs/reference/environment-variables.mdx +93 -20
- package/site/content/docs/reference/errors.mdx +132 -29
- package/site/content/docs/reference/fx.mdx +137 -73
- package/site/content/docs/reference/index.mdx +13 -21
- package/site/content/docs/reference/meta.json +4 -5
- package/site/content/docs/reference/okid.mdx +42 -17
- package/site/content/docs/reference/plugins.mdx +4 -3
- package/site/content/docs/reference/security.mdx +197 -0
- package/site/content/docs/understand/meta.json +5 -0
- package/site/content/docs/understand/the-anatomy.mdx +132 -0
- package/site/content/docs/understand/the-model.mdx +32 -0
- package/site/content/docs/understand/the-problem.mdx +74 -0
- package/site/content/docs/understand/the-vocabulary.mdx +26 -0
- package/src/auth/api-keys.ts +2 -1
- package/src/auth/bindings.ts +64 -16
- package/src/auth/gate-auth.test.ts +6 -1
- package/src/auth/identity.ts +152 -5
- package/src/auth/index.ts +29 -0
- package/src/auth/invites.ts +2 -1
- package/src/auth/method-context.ts +41 -0
- package/src/auth/oauth-as/crypto.ts +2 -1
- package/src/auth/oauth-as/stores.ts +2 -1
- package/src/auth/operator.ts +2 -1
- package/src/auth/sessions-jwt.test.ts +77 -0
- package/src/auth/sessions.ts +20 -4
- package/src/auth/tenants.ts +3 -2
- package/src/auth/two-factor-challenge.test.ts +61 -0
- package/src/auth/two-factor-challenge.ts +284 -0
- package/src/auth/verification.ts +5 -0
- package/src/bench/REPORT.md +49 -0
- package/src/bench/g03-signal-once.bench.ts +1 -1
- package/src/bench/g10-observability-contention.bench.ts +1 -1
- package/src/bench/g17-hybrid-search.bench.ts +572 -0
- package/src/bench/load-app.ts +2 -10
- package/src/cli/ai-setup/ai-setup.test.ts +331 -42
- package/src/cli/ai-setup/apply.ts +294 -52
- package/src/cli/ai-setup/catalog.ts +238 -1342
- package/src/cli/ai-setup/index.ts +14 -99
- package/src/cli/ai-setup/prompts.ts +60 -443
- package/src/cli/ask-seed.test.ts +96 -0
- package/src/cli/ask-seed.ts +82 -0
- package/src/cli/ask-vault-gaps.test.ts +84 -0
- package/src/cli/ask-vault-gaps.ts +146 -0
- package/src/cli/build.ts +2 -2
- package/src/cli/client-add.test.ts +26 -1
- package/src/cli/client-add.ts +106 -27
- package/src/cli/competitor-mention-removal.test.ts +1 -1
- package/src/cli/db-seed.ts +2 -0
- package/src/cli/db.ts +150 -11
- package/src/cli/dev.ts +119 -211
- package/src/cli/docker-clean.ts +2 -2
- package/src/cli/docker-cli.test.ts +1 -1
- package/src/cli/doctor-diff.ts +4 -2
- package/src/cli/doctor-pii.test.ts +1 -1
- package/src/cli/doctor.ts +14 -1
- package/src/cli/hero-meta.test.ts +4 -2
- package/src/cli/load-config.images.test.ts +8 -10
- package/src/cli/load-config.ts +1 -1
- package/src/cli/registry.ts +22 -10
- package/src/cli/replay.ts +3 -1
- package/src/cli/start.ts +1 -1
- package/src/cli/tui/keys.ts +2 -3
- package/src/client/auth/cookies.ts +74 -0
- package/src/client/auth/create-auth-client.ts +636 -0
- package/src/client/auth/denials.ts +99 -0
- package/src/client/auth/session.ts +283 -0
- package/src/client/auth.test.ts +251 -0
- package/src/client/auth.ts +39 -114
- package/src/client/create-with-session.ts +245 -0
- package/src/client/create.ts +51 -5
- package/src/client/index.ts +11 -1
- package/src/client/live.ts +11 -79
- package/src/client/notes-contract.test.ts +5 -10
- package/src/client/sse.ts +137 -0
- package/src/client/stream.ts +147 -0
- package/src/client/transport.test.ts +32 -0
- package/src/client/transport.ts +123 -26
- package/src/client/types.ts +118 -14
- package/src/client-react/index.ts +185 -24
- package/src/client-react/use-live-query.ts +13 -3
- package/src/compiler/aot.test.ts +7 -4
- package/src/compiler/effects-embed.test.ts +56 -0
- package/src/compiler/effects-fetch.test.ts +43 -0
- package/src/compiler/effects-infer.ts +58 -2
- package/src/compiler/extract.test.ts +258 -44
- package/src/compiler/extract.ts +566 -48
- package/src/compiler/fixtures/skyport/src/flows/bookings/index.ts +7 -4
- package/src/compiler/fixtures/skyport/src/flows/bookings/signals.ts +2 -8
- package/src/compiler/fixtures/skyport.expected.json +4 -4
- package/src/compiler/fixtures/triggers/five-triggers.ts +14 -10
- package/src/compiler/response.ts +2 -2
- package/src/compiler/search-writer-isolation.test.ts +40 -0
- package/src/config/index.ts +11 -0
- package/src/console/server/app.ts +17 -23
- package/src/console/server/bind.ts +4 -0
- package/src/console/server/console.test.ts +2 -2
- package/src/console/server/flows-invoke.test.ts +50 -34
- package/src/console/server/flows.ts +436 -255
- package/src/console/server/runs-ingest.test.ts +6 -3
- package/src/console/server/serve.ts +1 -1
- package/src/console/server/signals.test.ts +1 -5
- package/src/console/server/signals.ts +8 -6
- package/src/console/server/state.ts +6 -1
- package/src/console/server/store.ts +1 -1
- package/src/console/ui-next/dist/assets/FileExportIcon-Ck-5od4R.js +1 -0
- package/src/console/ui-next/dist/assets/MoreHorizontalCircle01Icon-gMNGsE37.js +1 -0
- package/src/console/ui-next/dist/assets/PlusSignIcon-CwG3nxfu.js +1 -0
- package/src/console/ui-next/dist/assets/UnavailableIcon-D9cvHVPr.js +1 -0
- package/src/console/ui-next/dist/assets/UserIcon-DaE2PB5_.js +1 -0
- package/src/console/ui-next/dist/assets/access-page-DFeymU07.js +4 -0
- package/src/console/ui-next/dist/assets/agent-disclosure-U1rdfblp.js +1 -0
- package/src/console/ui-next/dist/assets/cache-glyph-BeFJeqBG.js +1 -0
- package/src/console/ui-next/dist/assets/call-pii-button-CVAONPii.js +1 -0
- package/src/console/ui-next/dist/assets/collapsible-D2A6NJ-3.js +1 -0
- package/src/console/ui-next/dist/assets/copy-inline-button-CAYD18cr.js +1 -0
- package/src/console/ui-next/dist/assets/dagre.esm-B1_XeuLP.js +1 -0
- package/src/console/ui-next/dist/assets/detail-header-DVWNjWjg.js +1 -0
- package/src/console/ui-next/dist/assets/dropdown-menu-4h2LOVXM.js +1 -0
- package/src/console/ui-next/dist/assets/duration-tone-Cgk_h5ja.js +9 -0
- package/src/console/ui-next/dist/assets/element-icons-BI8cJgdh.js +1 -0
- package/src/console/ui-next/dist/assets/explorer-empty-CJs5A-wm.js +1 -0
- package/src/console/ui-next/dist/assets/flows-page-Dss7941e.js +1 -0
- package/src/console/ui-next/dist/assets/highlighted-json-MYZQtRnw.js +154 -0
- package/src/console/ui-next/dist/assets/http-method-Jrh39p7A.js +1 -0
- package/src/console/ui-next/dist/assets/index-D0zS5rKO.css +2 -0
- package/src/console/ui-next/dist/assets/index-DXP2dBIF.js +63 -0
- package/src/console/ui-next/dist/assets/observability-page-HvolXxTI.js +4 -0
- package/src/console/ui-next/dist/assets/react-dom-Ddte4I-Q.js +9 -0
- package/src/console/ui-next/dist/assets/replica-lag-CSh2dzrb.js +18 -0
- package/src/console/ui-next/dist/assets/request-meta-BatF8KrK.js +1 -0
- package/src/console/ui-next/dist/assets/shortcut-keys-3ILd8oGn.js +1 -0
- package/src/console/ui-next/dist/assets/{sql-BskegiFM.js → sql-BsFa4tDR.js} +1 -1
- package/src/console/ui-next/dist/assets/store-page-eiKiHnNe.js +41 -0
- package/src/console/ui-next/dist/assets/trace-detail-sheet-CZkMeKS-.js +2 -0
- package/src/console/ui-next/dist/assets/tree-expand-toggle-CW8y5A2h.js +55 -0
- package/src/console/ui-next/dist/assets/units-page-B_RWJrEO.js +1 -0
- package/src/console/ui-next/dist/assets/{use-vault-list-uk4WVboC.js → use-vault-list-CT4-gajj.js} +1 -1
- package/src/console/ui-next/dist/assets/vault-page-CWrg-A68.js +2 -0
- package/src/console/ui-next/dist/assets/xyflow-CSyC6ryz.css +1 -0
- package/src/console/ui-next/dist/assets/xyflow-yApv7D4e.js +7 -0
- package/src/console/ui-next/dist/index.html +6 -13
- package/src/console/ui-next/seed-invoke-host.ts +21 -18
- package/src/console/ui-next/src/client.ts +7 -2
- package/src/console/ui-next/src/features/flows/graph/element-map.ts +2 -0
- package/src/console/ui-next/src/features/flows/traces/effect-kind.ts +12 -2
- package/src/console/ui-next/src/features/flows/traces/effect-summary.ts +4 -0
- package/src/console/ui-next/src/features/flows/traces/trace-detail-sheet.tsx +8 -0
- package/src/console/ui-next/src/features/flows/traces/waterfall-bars.ts +4 -0
- package/src/console/ui-next/src/features/flows/traces/waterfall-tooltip.ts +9 -3
- package/src/console/ui-next/src/features/store/detail/reveal-cell.tsx +7 -11
- package/src/console/ui-next/src/features/store/detail/store-row-detail-sheet.tsx +2 -2
- package/src/console/ui-next/src/features/store/lib/fields-from-table.ts +2 -0
- package/src/console/ui-next/src/features/store/lib/grid-model.test.ts +25 -1
- package/src/console/ui-next/src/features/store/lib/grid-model.ts +36 -1
- package/src/console/ui-next/src/features/store/query/query-results.tsx +3 -3
- package/src/console/ui-next/src/features/units/detail/effects-summary.tsx +2 -0
- package/src/console/ui-next/src/features/units/lib/call-read-safe.ts +3 -1
- package/src/console/ui-next/src/features/units/lib/fields-from-schema.ts +6 -0
- package/src/docker/ai-model-status.test.ts +1 -12
- package/src/docker/ai-model-status.ts +10 -38
- package/src/docker/compose-up.test.ts +100 -0
- package/src/docker/compose-up.ts +292 -0
- package/src/docker/compose.ts +4 -14
- package/src/docker/derive.ts +9 -34
- package/src/docker/docker.test.ts +16 -261
- package/src/docker/images-config.test.ts +13 -25
- package/src/docker/index.ts +1 -24
- package/src/docker/recipes/index.ts +0 -23
- package/src/docker/recipes/pgdog.ts +6 -4
- package/src/docker/stack-id.test.ts +2 -2
- package/src/docker/stack-id.ts +0 -1
- package/src/docker/types.ts +2 -2
- package/src/drivers/ai-anthropic.ts +10 -0
- package/src/drivers/ai-openai-compatible.ts +34 -7
- package/src/drivers/ai-providers.test.ts +0 -107
- package/src/drivers/ai-stream.test.ts +0 -34
- package/src/drivers/ai-types.ts +17 -8
- package/src/drivers/channel-fcm.ts +6 -1
- package/src/drivers/channel-msegat.ts +6 -1
- package/src/drivers/channel-resend.ts +5 -1
- package/src/drivers/channel-smtp.ts +5 -1
- package/src/drivers/channel-sndr.ts +10 -1
- package/src/drivers/channel-taqnyat-mail.ts +5 -1
- package/src/drivers/channel-taqnyat-whatsapp.ts +6 -1
- package/src/drivers/channel-taqnyat.ts +6 -1
- package/src/drivers/channel-types.ts +10 -0
- package/src/drivers/channel-unifonic.ts +6 -1
- package/src/drivers/channel-wa-cloud.ts +6 -1
- package/src/drivers/channel-webpush.ts +6 -1
- package/src/drivers/external.ts +33 -0
- package/src/drivers/index.ts +0 -10
- package/src/drivers/meilisearch.ts +6 -0
- package/src/drivers/oauth-types.ts +4 -0
- package/src/drivers/postgres.test.ts +74 -3
- package/src/drivers/postgres.ts +175 -6
- package/src/drivers/signal-types.ts +5 -5
- package/src/drivers/types.ts +7 -0
- package/src/drivers/vault-types.ts +5 -0
- package/src/elements/ai/declare.ts +17 -4
- package/src/elements/ai/eval.ts +1 -1
- package/src/elements/ai/mcp-http.ts +1 -1
- package/src/elements/ai/pii.ts +1 -1
- package/src/elements/ai/providers.test.ts +289 -0
- package/src/elements/ai/providers.ts +169 -0
- package/src/elements/ai/runtime.ts +68 -5
- package/src/elements/ai/schema.ts +2 -2
- package/src/elements/ai.test.ts +7 -7
- package/src/elements/ai.ts +17 -1
- package/src/elements/channel/runtime.ts +105 -12
- package/src/elements/clock/cron-fields.test.ts +144 -0
- package/src/elements/clock/cron-fields.ts +185 -0
- package/src/elements/clock/declare.ts +247 -3
- package/src/elements/clock.ts +21 -1
- package/src/elements/index.ts +15 -0
- package/src/elements/signal/chaos-child.ts +1 -2
- package/src/elements/signal/declare.ts +65 -37
- package/src/elements/signal/delivery-modes.test.ts +11 -31
- package/src/elements/signal/dry-run-replay.test.ts +1 -7
- package/src/elements/signal/dry-run-write-isolation.test.ts +1 -7
- package/src/elements/signal/key-ordering.test.ts +6 -26
- package/src/elements/signal/lease-reclaim.test.ts +2 -6
- package/src/elements/signal/optional-emit.test.ts +6 -9
- package/src/elements/signal/order-lifecycle.test.ts +4 -17
- package/src/elements/signal/orphan-messages.test.ts +4 -15
- package/src/elements/signal/reconcile.test.ts +2 -2
- package/src/elements/signal/runtime.ts +1 -1
- package/src/elements/signal/schema-emit.test.ts +4 -8
- package/src/elements/signal.test.ts +24 -49
- package/src/elements/signal.ts +9 -2
- package/src/elements/store/domain-ddl.test.ts +1 -1
- package/src/elements/store/live-http.test.ts +9 -4
- package/src/elements/store/prepare-row.test.ts +123 -0
- package/src/elements/store/resource.ts +43 -12
- package/src/elements/store/schema-decl.ts +117 -0
- package/src/elements/store/search-backfill.ts +205 -0
- package/src/elements/store/search-bind.ts +66 -0
- package/src/elements/store/search-bm25.ts +78 -0
- package/src/elements/store/search-ddl.ts +156 -0
- package/src/elements/store/search-embed-flow.ts +141 -0
- package/src/elements/store/search-errors.ts +34 -0
- package/src/elements/store/search-fusion.ts +112 -0
- package/src/elements/store/search-lsh.ts +179 -0
- package/src/elements/store/search-runtime.ts +300 -0
- package/src/elements/store/search.test.ts +144 -0
- package/src/elements/store/sql-session.test.ts +1 -0
- package/src/elements/store/sql-session.ts +83 -3
- package/src/elements/store/table.ts +23 -2
- package/src/elements/store/upsert-app.test.ts +1 -3
- package/src/elements/store.ts +50 -0
- package/src/full.ts +4 -2
- package/src/http.ts +4 -1
- package/src/i18n/catalogs/ar.ts +14 -6
- package/src/i18n/catalogs/en.ts +14 -6
- package/src/index.ts +6 -1
- package/src/kernel/adopt-barrel-fresh.test.ts +7 -7
- package/src/kernel/adopt-routes.ts +9 -1
- package/src/kernel/app-auth.ts +5 -0
- package/src/kernel/app.ts +102 -9
- package/src/kernel/auto-cache.test.ts +6 -12
- package/src/kernel/auto-registry.test.ts +3 -3
- package/src/kernel/boot-bind/ai.test.ts +22 -19
- package/src/kernel/boot-bind/ai.ts +5 -43
- package/src/kernel/boot-bind/clock.ts +23 -5
- package/src/kernel/boot-bind/honor-config.test.ts +4 -4
- package/src/kernel/boot.test.ts +11 -6
- package/src/kernel/boot.ts +66 -16
- package/src/kernel/boundary-contract.ts +93 -0
- package/src/kernel/budget.test.ts +1 -1
- package/src/kernel/call.ts +89 -0
- package/src/kernel/capability.ts +6 -0
- package/src/kernel/client-descriptor.ts +123 -0
- package/src/kernel/clock-timezone.test.ts +80 -0
- package/src/kernel/correlation.test.ts +1 -1
- package/src/kernel/dry-run.ts +11 -8
- package/src/kernel/effects-stamping.test.ts +42 -9
- package/src/kernel/effects.test.ts +4 -2
- package/src/kernel/effects.ts +51 -9
- package/src/kernel/errors-channel.ts +17 -0
- package/src/kernel/errors-live-resume.ts +3 -2
- package/src/kernel/errors-tenant.ts +7 -4
- package/src/kernel/errors.registry-helpers.ts +96 -0
- package/src/kernel/errors.registry.test.ts +139 -25
- package/src/kernel/errors.ts +102 -23
- package/src/kernel/external-effects.test.ts +196 -0
- package/src/kernel/flow.test.ts +13 -4
- package/src/kernel/flow.ts +69 -71
- package/src/kernel/fx-ask-telemetry.test.ts +2 -2
- package/src/kernel/fx-dead-letters.test.ts +3 -3
- package/src/kernel/fx-fetch.ts +55 -0
- package/src/kernel/fx-live-stream.ts +2 -2
- package/src/kernel/fx-live.test.ts +8 -8
- package/src/kernel/fx.test.ts +17 -11
- package/src/kernel/fx.ts +180 -57
- package/src/kernel/horizontal-child.ts +1 -1
- package/src/kernel/http-query.test.ts +3 -6
- package/src/kernel/index.ts +13 -3
- package/src/kernel/instance-id.ts +1 -1
- package/src/kernel/instances.test.ts +40 -0
- package/src/kernel/instances.ts +47 -9
- package/src/kernel/live-http.test.ts +6 -7
- package/src/kernel/live-http.ts +6 -2
- package/src/kernel/live-resume.test.ts +1 -1
- package/src/kernel/mcp-tool.test.ts +3 -3
- package/src/kernel/on.ts +98 -4
- package/src/kernel/pipeline.test.ts +12 -15
- package/src/kernel/plugin-elements.test.ts +1 -1
- package/src/kernel/stamp-http.test.ts +3 -3
- package/src/kernel/triggers.ts +210 -95
- package/src/kernel-entry.ts +0 -1
- package/src/manifest/diff.ts +11 -1
- package/src/manifest/fixtures/skyport.excerpt.json +1 -1
- package/src/manifest/types.ts +46 -2
- package/src/mcp/docs-index.ts +3 -3
- package/src/mcp/docs-mcp.test.ts +2 -2
- package/src/mcp/docs-tools.ts +1 -1
- package/src/okid.test.ts +56 -0
- package/src/okid.ts +55 -11
- package/src/plugins/anonymous.ts +8 -4
- package/src/plugins/auth/shared.ts +27 -3
- package/src/plugins/auth-delivery.mailpit.integration.test.ts +1 -1
- package/src/plugins/auth-methods.security.test.ts +561 -23
- package/src/plugins/config-source.ts +1 -1
- package/src/plugins/csrf.test.ts +65 -0
- package/src/plugins/index.ts +2 -0
- package/src/plugins/magic-link.ts +36 -16
- package/src/plugins/oauth/shared.ts +3 -1
- package/src/plugins/oauth.ts +22 -14
- package/src/plugins/otp.ts +37 -21
- package/src/plugins/passkey-webauthn.ts +9 -6
- package/src/plugins/passkey.ts +98 -26
- package/src/plugins/pre-account-hijack.test.ts +223 -0
- package/src/plugins/two-factor.ts +466 -37
- package/src/plugins/username.ts +19 -7
- package/src/release/build-lib.ts +1 -0
- package/src/release/limits.ts +2 -2
- package/src/release/measure.ts +1 -1
- package/src/runs/collect.test.ts +0 -2
- package/src/runtime/json-code-block.test.ts +250 -20
- package/src/runtime/json-code-block.ts +1261 -41
- package/src/term.test.ts +1 -1
- package/src/test/create-test-app.test.ts +12 -12
- package/src/test/live-signals.test.ts +6 -6
- package/src/test/provisions.integration.test.ts +10 -14
- package/src/test/reset-element-registries.ts +1 -1
- package/src/test/tenant-isolation.test.ts +12 -6
- package/site/content/docs/deployment/docker-swarm.mdx +0 -164
- package/site/content/docs/deployment/docker.mdx +0 -227
- package/site/content/docs/deployment/index.mdx +0 -83
- package/site/content/docs/deployment/kubernetes.mdx +0 -176
- package/site/content/docs/deployment/meta.json +0 -5
- package/site/content/docs/deployment/reverse-proxy.mdx +0 -234
- package/site/content/docs/elements/ai.mdx +0 -385
- package/site/content/docs/elements/channel.mdx +0 -346
- package/site/content/docs/elements/clock.mdx +0 -244
- package/site/content/docs/elements/flow.mdx +0 -420
- package/site/content/docs/elements/gate.mdx +0 -436
- package/site/content/docs/elements/signal.mdx +0 -380
- package/site/content/docs/elements/store.mdx +0 -1099
- package/site/content/docs/elements/vault.mdx +0 -405
- package/site/content/docs/get-started/basic-usage.mdx +0 -173
- package/site/content/docs/get-started/index.mdx +0 -43
- package/site/content/docs/get-started/installation.mdx +0 -220
- package/site/content/docs/get-started/introduction.mdx +0 -132
- package/site/content/docs/get-started/meta.json +0 -13
- package/site/content/docs/get-started/project-structure.mdx +0 -925
- package/site/content/docs/get-started/testing.mdx +0 -328
- package/site/content/docs/get-started/why.mdx +0 -162
- package/site/content/docs/recipes/llama-cpp.mdx +0 -151
- package/site/content/docs/recipes/ollama.mdx +0 -142
- package/site/content/docs/recipes/sglang.mdx +0 -105
- package/site/content/docs/recipes/vllm.mdx +0 -106
- package/site/content/docs/reference/cli.md +0 -232
- package/site/content/docs/reference/client.mdx +0 -469
- package/site/content/docs/reference/security.md +0 -74
- package/src/cli/ai-setup/detect-ollama.ts +0 -213
- package/src/cli/ai-setup/recommend.test.ts +0 -225
- package/src/cli/ai-setup/recommend.ts +0 -225
- package/src/cli/dev-controls.test.ts +0 -122
- package/src/cli/dev-controls.ts +0 -164
- package/src/cli/tui/DevLive.tsx +0 -126
- package/src/console/ui-next/dist/assets/access-page-De7Lc2JC.js +0 -4
- package/src/console/ui-next/dist/assets/agent-disclosure-BP0Y0Sux.js +0 -1
- package/src/console/ui-next/dist/assets/cache-glyph-B5X-NM0-.js +0 -1
- package/src/console/ui-next/dist/assets/call-pii-button-ChAUiLo9.js +0 -1
- package/src/console/ui-next/dist/assets/collapsible-DGnOM2ph.js +0 -1
- package/src/console/ui-next/dist/assets/copy-inline-button-DBHhgHKP.js +0 -1
- package/src/console/ui-next/dist/assets/dagre.esm-ZwcdTuZZ.js +0 -1
- package/src/console/ui-next/dist/assets/detail-header-DhHM1iaZ.js +0 -1
- package/src/console/ui-next/dist/assets/dropdown-menu-_NjTEo5_.js +0 -1
- package/src/console/ui-next/dist/assets/duration-tone-sC3lGABz.js +0 -9
- package/src/console/ui-next/dist/assets/element-icons-BVXtRyd3.js +0 -1
- package/src/console/ui-next/dist/assets/explorer-empty-2uIhBu0_.js +0 -1
- package/src/console/ui-next/dist/assets/flows-page-RGy7VEA_.js +0 -1
- package/src/console/ui-next/dist/assets/highlighted-json-Awq7gYdu.js +0 -154
- package/src/console/ui-next/dist/assets/http-method-_UHM2ODJ.js +0 -1
- package/src/console/ui-next/dist/assets/index-Ck88Jmv8.css +0 -2
- package/src/console/ui-next/dist/assets/index-_rgpdVzo.js +0 -66
- package/src/console/ui-next/dist/assets/link-BX6Vqztd.js +0 -1
- package/src/console/ui-next/dist/assets/observability-page-Ds6pcnh-.js +0 -4
- package/src/console/ui-next/dist/assets/preload-helper-oH4irX4C.js +0 -1
- package/src/console/ui-next/dist/assets/react-D8E3mtu1.js +0 -1
- package/src/console/ui-next/dist/assets/react-dom-Bph1y7z7.js +0 -9
- package/src/console/ui-next/dist/assets/replica-lag-DKRrbvdo.js +0 -18
- package/src/console/ui-next/dist/assets/request-meta-DV0ywz7t.js +0 -1
- package/src/console/ui-next/dist/assets/shortcut-JQIZlWfm.js +0 -1
- package/src/console/ui-next/dist/assets/shortcut-keys-DKxNTe_m.js +0 -1
- package/src/console/ui-next/dist/assets/skeleton-D-czQJT6.js +0 -1
- package/src/console/ui-next/dist/assets/store-page-02xOiqIK.js +0 -41
- package/src/console/ui-next/dist/assets/trace-detail-sheet-B09O8rA6.js +0 -2
- package/src/console/ui-next/dist/assets/tree-expand-toggle-BtyhmWb4.js +0 -55
- package/src/console/ui-next/dist/assets/units-page-4rHOePuE.js +0 -1
- package/src/console/ui-next/dist/assets/useMutation-B8EO02Ej.js +0 -1
- package/src/console/ui-next/dist/assets/useRender-BE2A9BWC.js +0 -1
- package/src/console/ui-next/dist/assets/vault-page-DISPgxLM.js +0 -2
- package/src/console/ui-next/dist/assets/xyflow-D7n4g6go.js +0 -7
- package/src/console/ui-next/dist/assets/xyflow-DZ0Ws1xk.css +0 -1
- package/src/docker/ollama-pull.ts +0 -232
- package/src/docker/recipes/llama-cpp.ts +0 -298
- package/src/docker/recipes/ollama.ts +0 -44
- package/src/docker/recipes/sglang.ts +0 -55
- package/src/docker/recipes/vllm.ts +0 -44
- package/src/drivers/ai-ollama-tools.integration.test.ts +0 -109
- package/src/drivers/ai-ollama.integration.test.ts +0 -184
- package/src/drivers/ai-ollama.ts +0 -389
- package/src/drivers/ollama.ts +0 -14
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "Ollama"
|
|
3
|
-
description: "Fully supported local AI alternative — OKE_AI_URL, pinned ≥ 0.17.1, loopback-only publish, library models only."
|
|
4
|
-
icon: "Bot"
|
|
5
|
-
source: "docs/spec/unified-theory.md"
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
Ollama remains a **fully supported** local model server (not deprecated). The
|
|
9
|
-
default local pin is [llama.cpp](/docs/recipes/llama-cpp); choose Ollama when you
|
|
10
|
-
want its library pull UX. Pin `images.ai` and set `drivers.ai` to `ollama`.
|
|
11
|
-
|
|
12
|
-
<Callout title="The one rule">
|
|
13
|
-
Pin ≥ `0.17.1` (never `latest`), publish only on loopback, and load models only from Ollama’s
|
|
14
|
-
library — never arbitrary untrusted GGUF via `/api/create`.
|
|
15
|
-
</Callout>
|
|
16
|
-
|
|
17
|
-
## Quick start
|
|
18
|
-
|
|
19
|
-
<Steps>
|
|
20
|
-
|
|
21
|
-
<Step>
|
|
22
|
-
### Pin driver + image
|
|
23
|
-
|
|
24
|
-
```typescript title="oke.config.ts"
|
|
25
|
-
drivers: {
|
|
26
|
-
ai: { dev: "ollama", test: "mock", prod: "ollama" }, // or set prod deliberately
|
|
27
|
-
},
|
|
28
|
-
images: {
|
|
29
|
-
ai: "ollama/ollama:0.32.13", // never :latest — floor 0.17.1 (CVE-2026-7482)
|
|
30
|
-
},
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Or run `oke ai setup --provider ollama --yes`.
|
|
34
|
-
|
|
35
|
-
</Step>
|
|
36
|
-
|
|
37
|
-
<Step>
|
|
38
|
-
### Env written by the stack
|
|
39
|
-
|
|
40
|
-
```bash title=".env.local"
|
|
41
|
-
OKE_AI_URL=http://127.0.0.1:11434
|
|
42
|
-
OKE_AI_MODEL=qwen3.5:9b
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Host publish is `127.0.0.1:11434:11434`. Inside the container
|
|
46
|
-
`OLLAMA_HOST=0.0.0.0:11434` so Docker networking works.
|
|
47
|
-
|
|
48
|
-
</Step>
|
|
49
|
-
|
|
50
|
-
<Step>
|
|
51
|
-
### Boot pulls against the container API
|
|
52
|
-
|
|
53
|
-
After compose is healthy, `oke dev -d` shows `OKE_AI_MODEL` in the hero / Docker
|
|
54
|
-
summary, POSTs `/api/pull` to **this container’s**
|
|
55
|
-
loopback URL when the recipe is Ollama — never a host `ollama` CLI.
|
|
56
|
-
|
|
57
|
-
</Step>
|
|
58
|
-
|
|
59
|
-
</Steps>
|
|
60
|
-
|
|
61
|
-
## Security (hard requirements)
|
|
62
|
-
|
|
63
|
-
| Control | Requirement |
|
|
64
|
-
| -------------- | -------------------------------------------------------------------------- |
|
|
65
|
-
| Host publish | `127.0.0.1:11434:11434` only — never `0.0.0.0` |
|
|
66
|
-
| Image pin | Explicit tag ≥ **0.17.1** (CVE-2026-7482); never `latest` |
|
|
67
|
-
| Model source | [Ollama library](https://ollama.com/library) only |
|
|
68
|
-
| Untrusted GGUF | **Forbidden** — `/api/create` with crafted files is the CVE-2026-7482 path |
|
|
69
|
-
|
|
70
|
-
Ollama and llama.cpp share GGUF-parser risk; Ollama also has its own Go loader
|
|
71
|
-
CVE. Network exposure of `:11434` turns that into a remote attack.
|
|
72
|
-
|
|
73
|
-
<Callout type="warn" title="Host `ollama` CLI is unrelated">
|
|
74
|
-
A host `ollama pull` often talks to a separately installed daemon. Trust boot ensure against
|
|
75
|
-
`OKE_AI_URL`.
|
|
76
|
-
</Callout>
|
|
77
|
-
|
|
78
|
-
## Required env
|
|
79
|
-
|
|
80
|
-
| Variable | Required? | Meaning |
|
|
81
|
-
| -------------------------------------------- | ----------------- | ------------------------------------------------------------------ |
|
|
82
|
-
| `OKE_AI_URL` | **Yes** in docker | Base URL — `oke boot: ollama driver needs OKE_AI_URL` when missing |
|
|
83
|
-
| `OKE_AI_MODEL` | Recommended | Model tag to pull/serve (default `qwen3.5:9b`) |
|
|
84
|
-
| `OLLAMA_HOST` | Set by recipe | `0.0.0.0:11434` inside the container |
|
|
85
|
-
| `OKE_AI_VISION_MODEL` / `OKE_AI_EMBED_MODEL` | Optional | Written by `oke ai setup` for logical models |
|
|
86
|
-
|
|
87
|
-
## Data and backup
|
|
88
|
-
|
|
89
|
-
| Volume | Path | What it stores |
|
|
90
|
-
| --------- | --------------- | -------------------------------------- |
|
|
91
|
-
| `ai-data` | `/root/.ollama` | Pulled model weights + Ollama metadata |
|
|
92
|
-
|
|
93
|
-
## Production note
|
|
94
|
-
|
|
95
|
-
Local Ollama is for docker/dev (and air-gapped prod you deliberately choose).
|
|
96
|
-
For multi-user GPU self-hosting see [vLLM](/docs/recipes/vllm) /
|
|
97
|
-
[SGLang](/docs/recipes/sglang). Cloud drivers stay separate.
|
|
98
|
-
|
|
99
|
-
PII egress rules treat `ollama` as local — see [AI · PII](/docs/elements/ai).
|
|
100
|
-
|
|
101
|
-
## What the recipe configures
|
|
102
|
-
|
|
103
|
-
| Field | Value |
|
|
104
|
-
| -------------- | ---------------------------------------------- |
|
|
105
|
-
| Container port | `11434` |
|
|
106
|
-
| Host publish | `127.0.0.1:11434:11434` |
|
|
107
|
-
| Entrypoint | Image default (`ollama serve`) |
|
|
108
|
-
| Healthcheck | `ollama list`, every 5s, 24 retries, 10s start |
|
|
109
|
-
| Connection URL | `http://host:11434` |
|
|
110
|
-
| Model pull | Host-side `POST /api/pull` after healthy |
|
|
111
|
-
|
|
112
|
-
## Troubleshooting
|
|
113
|
-
|
|
114
|
-
<Accordions>
|
|
115
|
-
<Accordion title="oke boot: ollama driver needs OKE_AI_URL">
|
|
116
|
-
|
|
117
|
-
Docker mode expects `OKE_AI_URL` from `.env.local` when `images.ai` is pinned.
|
|
118
|
-
Locally the default is `http://127.0.0.1:11434`. Prefer `oke ai setup` to wire everything
|
|
119
|
-
in one pass.
|
|
120
|
-
|
|
121
|
-
</Accordion>
|
|
122
|
-
<Accordion title="Model missing / I already ran ollama pull on the host">
|
|
123
|
-
|
|
124
|
-
The host CLI likely filled a **different** Ollama. Check `GET $OKE_AI_URL/api/tags`,
|
|
125
|
-
then recreate with `oke dev -d`.
|
|
126
|
-
|
|
127
|
-
</Accordion>
|
|
128
|
-
</Accordions>
|
|
129
|
-
|
|
130
|
-
## Learn more
|
|
131
|
-
|
|
132
|
-
- [llama.cpp](/docs/recipes/llama-cpp) — default local AI
|
|
133
|
-
- [AI](/docs/elements/ai) — `fx.ask`, prompts, evals
|
|
134
|
-
- [CLI · oke ai setup](/docs/reference/cli) — non-interactive provider wiring
|
|
135
|
-
|
|
136
|
-
## Next
|
|
137
|
-
|
|
138
|
-
<Cards>
|
|
139
|
-
<Card title="llama.cpp" description="Default local AI." href="/docs/recipes/llama-cpp" />
|
|
140
|
-
<Card title="Meilisearch" description="Full-text index peer." href="/docs/recipes/meilisearch" />
|
|
141
|
-
<Card title="AI" description="Prompts, models, guardrails." href="/docs/elements/ai" />
|
|
142
|
-
</Cards>
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "SGLang"
|
|
3
|
-
description: "Production-tier self-hosted inference for structured and agent workloads on GPU."
|
|
4
|
-
icon: "Cpu"
|
|
5
|
-
source: "docs/spec/unified-theory.md"
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
SGLang is for **structured generation and agent-heavy workloads on real GPU
|
|
9
|
-
hardware** when you self-host inference. Prefer a managed provider for most
|
|
10
|
-
production apps. For general multi-user serving, prefer [vLLM](/docs/recipes/vllm).
|
|
11
|
-
|
|
12
|
-
<Callout title="The one rule">
|
|
13
|
-
Pin an explicit runtime tag (never `latest`), publish only on loopback, and pick SGLang only when
|
|
14
|
-
structured / agent throughput is the reason you self-host.
|
|
15
|
-
</Callout>
|
|
16
|
-
|
|
17
|
-
## Quick start
|
|
18
|
-
|
|
19
|
-
<Steps>
|
|
20
|
-
|
|
21
|
-
<Step>
|
|
22
|
-
### Pin driver + image
|
|
23
|
-
|
|
24
|
-
```typescript title="oke.config.ts"
|
|
25
|
-
drivers: {
|
|
26
|
-
ai: { dev: "openai-compatible", test: "mock", prod: "openai-compatible" },
|
|
27
|
-
},
|
|
28
|
-
images: {
|
|
29
|
-
ai: "lmsysorg/sglang:v0.5.17-runtime", // never :latest
|
|
30
|
-
},
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Or `oke ai setup --provider sglang --yes`.
|
|
34
|
-
|
|
35
|
-
</Step>
|
|
36
|
-
|
|
37
|
-
<Step>
|
|
38
|
-
### Env + GPU
|
|
39
|
-
|
|
40
|
-
```bash title=".env.local"
|
|
41
|
-
OKE_AI_URL=http://127.0.0.1:30000/v1
|
|
42
|
-
OKE_AI_MODEL=Qwen/Qwen3-0.6B
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Same NVIDIA reservation pattern as vLLM (`ipc: host` + device reservation).
|
|
46
|
-
|
|
47
|
-
</Step>
|
|
48
|
-
|
|
49
|
-
<Step>
|
|
50
|
-
### Decision matrix
|
|
51
|
-
|
|
52
|
-
| Workload | Recipe |
|
|
53
|
-
| -------------------------------- | -------------------------------------------------------------------------------- |
|
|
54
|
-
| Single-user / dev | [llama.cpp](/docs/recipes/llama-cpp) (default) or [Ollama](/docs/recipes/ollama) |
|
|
55
|
-
| Multi-user GPU serving | [vLLM](/docs/recipes/vllm) |
|
|
56
|
-
| Structured / agent GPU workloads | **SGLang** (this recipe) |
|
|
57
|
-
| Managed cloud | Anthropic / OpenAI / … |
|
|
58
|
-
|
|
59
|
-
</Step>
|
|
60
|
-
|
|
61
|
-
</Steps>
|
|
62
|
-
|
|
63
|
-
## Security
|
|
64
|
-
|
|
65
|
-
| Control | Requirement |
|
|
66
|
-
| ------------ | ---------------------------------------------- |
|
|
67
|
-
| Host publish | `127.0.0.1:30000:30000` only — never `0.0.0.0` |
|
|
68
|
-
| Image pin | Explicit version tag — never `latest` |
|
|
69
|
-
| Model source | Trusted Hugging Face repos / your own weights |
|
|
70
|
-
|
|
71
|
-
## What the recipe configures
|
|
72
|
-
|
|
73
|
-
| Field | Value |
|
|
74
|
-
| -------------- | ----------------------------------------------------- |
|
|
75
|
-
| Container port | `30000` |
|
|
76
|
-
| Host publish | `127.0.0.1:30000:30000` |
|
|
77
|
-
| `ipc` | `host` |
|
|
78
|
-
| GPU | `deploy.resources.reservations.devices` (nvidia, all) |
|
|
79
|
-
| Healthcheck | `GET /health`, long start period for model load |
|
|
80
|
-
| Connection URL | `http://host:30000/v1` |
|
|
81
|
-
|
|
82
|
-
## Troubleshooting
|
|
83
|
-
|
|
84
|
-
<Accordions>
|
|
85
|
-
<Accordion title="GPU not visible / container exits">
|
|
86
|
-
|
|
87
|
-
Install the NVIDIA Container Toolkit. Without a GPU, use
|
|
88
|
-
[llama.cpp](/docs/recipes/llama-cpp) for local smoke tests.
|
|
89
|
-
|
|
90
|
-
</Accordion>
|
|
91
|
-
</Accordions>
|
|
92
|
-
|
|
93
|
-
## Learn more
|
|
94
|
-
|
|
95
|
-
- [vLLM](/docs/recipes/vllm) — general production GPU serving
|
|
96
|
-
- [llama.cpp](/docs/recipes/llama-cpp) — default local AI
|
|
97
|
-
- [AI](/docs/elements/ai) — drivers and `fx.ask`
|
|
98
|
-
|
|
99
|
-
## Next
|
|
100
|
-
|
|
101
|
-
<Cards>
|
|
102
|
-
<Card title="vLLM" description="General multi-user GPU serving." href="/docs/recipes/vllm" />
|
|
103
|
-
<Card title="llama.cpp" description="Default local AI." href="/docs/recipes/llama-cpp" />
|
|
104
|
-
<Card title="AI" description="Prompts and guardrails." href="/docs/elements/ai" />
|
|
105
|
-
</Cards>
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "vLLM"
|
|
3
|
-
description: "Production-tier self-hosted inference — OpenAI-compatible GPU serving when you run inference yourself."
|
|
4
|
-
icon: "Cpu"
|
|
5
|
-
source: "docs/spec/unified-theory.md"
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
vLLM is for **multi-user / production concurrency on real GPU hardware** when
|
|
9
|
-
you choose to self-host inference instead of a managed provider. Driver id stays
|
|
10
|
-
`openai-compatible`. Most apps should prefer Anthropic / OpenAI / … in prod.
|
|
11
|
-
|
|
12
|
-
<Callout title="The one rule">
|
|
13
|
-
Pin an explicit image tag (never `latest`), publish only on loopback, and treat this as “I run
|
|
14
|
-
production inference myself” — not the default create path.
|
|
15
|
-
</Callout>
|
|
16
|
-
|
|
17
|
-
## Quick start
|
|
18
|
-
|
|
19
|
-
<Steps>
|
|
20
|
-
|
|
21
|
-
<Step>
|
|
22
|
-
### Pin driver + image
|
|
23
|
-
|
|
24
|
-
```typescript title="oke.config.ts"
|
|
25
|
-
drivers: {
|
|
26
|
-
ai: { dev: "openai-compatible", test: "mock", prod: "openai-compatible" },
|
|
27
|
-
},
|
|
28
|
-
images: {
|
|
29
|
-
ai: "vllm/vllm-openai:v0.27.1", // never :latest
|
|
30
|
-
},
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Or `oke ai setup --provider vllm --yes`.
|
|
34
|
-
|
|
35
|
-
</Step>
|
|
36
|
-
|
|
37
|
-
<Step>
|
|
38
|
-
### Env + GPU
|
|
39
|
-
|
|
40
|
-
```bash title=".env.local"
|
|
41
|
-
OKE_AI_URL=http://127.0.0.1:8000/v1
|
|
42
|
-
OKE_AI_MODEL=Qwen/Qwen3-0.6B
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
The recipe sets `ipc: host` and an NVIDIA device reservation. Host needs the
|
|
46
|
-
NVIDIA Container Toolkit.
|
|
47
|
-
|
|
48
|
-
</Step>
|
|
49
|
-
|
|
50
|
-
<Step>
|
|
51
|
-
### Decide deliberately
|
|
52
|
-
|
|
53
|
-
| Path | When |
|
|
54
|
-
| ------------------------------------ | -------------------------------------------- |
|
|
55
|
-
| Managed provider | Default for most production apps |
|
|
56
|
-
| **vLLM** (this recipe) | Self-hosted multi-user GPU serving |
|
|
57
|
-
| [SGLang](/docs/recipes/sglang) | Self-hosted structured / agent GPU workloads |
|
|
58
|
-
| [llama.cpp](/docs/recipes/llama-cpp) | Single-user / dev (default local) |
|
|
59
|
-
|
|
60
|
-
</Step>
|
|
61
|
-
|
|
62
|
-
</Steps>
|
|
63
|
-
|
|
64
|
-
## Security
|
|
65
|
-
|
|
66
|
-
| Control | Requirement |
|
|
67
|
-
| ------------ | --------------------------------------------- |
|
|
68
|
-
| Host publish | `127.0.0.1:8000:8000` only — never `0.0.0.0` |
|
|
69
|
-
| Image pin | Explicit version tag — never `latest` |
|
|
70
|
-
| Model source | Trusted Hugging Face repos / your own weights |
|
|
71
|
-
|
|
72
|
-
## What the recipe configures
|
|
73
|
-
|
|
74
|
-
| Field | Value |
|
|
75
|
-
| -------------- | ----------------------------------------------------- |
|
|
76
|
-
| Container port | `8000` |
|
|
77
|
-
| Host publish | `127.0.0.1:8000:8000` |
|
|
78
|
-
| `ipc` | `host` |
|
|
79
|
-
| GPU | `deploy.resources.reservations.devices` (nvidia, all) |
|
|
80
|
-
| Healthcheck | `GET /health`, long start period for model load |
|
|
81
|
-
| Connection URL | `http://host:8000/v1` |
|
|
82
|
-
|
|
83
|
-
## Troubleshooting
|
|
84
|
-
|
|
85
|
-
<Accordions>
|
|
86
|
-
<Accordion title="GPU not visible / container exits">
|
|
87
|
-
|
|
88
|
-
Install the NVIDIA Container Toolkit on the host. CPU-only hosts should use
|
|
89
|
-
[llama.cpp](/docs/recipes/llama-cpp) or [Ollama](/docs/recipes/ollama) instead.
|
|
90
|
-
|
|
91
|
-
</Accordion>
|
|
92
|
-
</Accordions>
|
|
93
|
-
|
|
94
|
-
## Learn more
|
|
95
|
-
|
|
96
|
-
- [llama.cpp](/docs/recipes/llama-cpp) — default local AI
|
|
97
|
-
- [SGLang](/docs/recipes/sglang) — structured / agent GPU path
|
|
98
|
-
- [AI](/docs/elements/ai) — drivers and `fx.ask`
|
|
99
|
-
|
|
100
|
-
## Next
|
|
101
|
-
|
|
102
|
-
<Cards>
|
|
103
|
-
<Card title="SGLang" description="Agent / structured GPU serving." href="/docs/recipes/sglang" />
|
|
104
|
-
<Card title="llama.cpp" description="Default local AI." href="/docs/recipes/llama-cpp" />
|
|
105
|
-
<Card title="AI" description="Prompts and guardrails." href="/docs/elements/ai" />
|
|
106
|
-
</Cards>
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: "CLI Reference"
|
|
3
|
-
description: "oke and create-oke — everyday commands and flags."
|
|
4
|
-
icon: "Terminal"
|
|
5
|
-
source: "docs/cli.md"
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
### Commands
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
bun add okengine # ONE package (project)
|
|
12
|
-
bun install -g okengine # global `oke` on PATH
|
|
13
|
-
|
|
14
|
-
oke # interactive TUI (TTY) — Dashboard · Dev · Database · Docker · Navigator
|
|
15
|
-
oke --tui # force TUI even when other args were passed
|
|
16
|
-
oke --help # command list (also what bare `oke` prints when non-TTY / CI)
|
|
17
|
-
|
|
18
|
-
oke dev # watch · hot reload · Console :6533 · app :6530 · MCP :6535 · docs MCP :6536
|
|
19
|
-
# → always Docker Compose under docker/ + host Bun
|
|
20
|
-
# → regenerates flows/generated.ts when the flows tree changes
|
|
21
|
-
# → client types + domain schema push on save
|
|
22
|
-
# → Console UI hot-reloads from source (okengine checkout; no bun run build)
|
|
23
|
-
oke dev --no-db-push # opt out of auto oke db push on schema input save
|
|
24
|
-
oke dev -d store.sql,signal # optional role filter (still Compose; requires Docker)
|
|
25
|
-
oke test # bun test with PGLite posture (NODE_ENV=test, OKE_PGLITE_URL=memory://)
|
|
26
|
-
# → does not start Docker Compose
|
|
27
|
-
oke mode # removed — prints error; use oke dev (Compose) / oke test (PGLite)
|
|
28
|
-
|
|
29
|
-
oke start # runs exactly what production runs (this is the Docker CMD)
|
|
30
|
-
oke doctor # verify secrets, ports, drivers, tenancy, schema drift, FD headroom,
|
|
31
|
-
# CDC outbox backlog/retention, live fan-out pressure
|
|
32
|
-
oke console claim-code # print setup claim code from .oke/claim-code (after Console boot)
|
|
33
|
-
# → `bun run dev:console` boots kernel + Vite with a fixed
|
|
34
|
-
# operator (`dev@oke.dev` / `Okengine123!`) — Sign in (prefilled)
|
|
35
|
-
# → `bun run dev:console:seed` same + keel PM (all 8 elements) + ~80 traces
|
|
36
|
-
# + 500+ tasks + full CRUD / custom HTTP (GET·POST·PUT·PATCH·DELETE·HEAD·QUERY)
|
|
37
|
-
# + app Gate auth / oke_* system tables
|
|
38
|
-
# (form/github→tasks.create→notify chain, work-management
|
|
39
|
-
# SQL/KV/files/index; `oke_console` is Console operators);
|
|
40
|
-
# click Traces row → highlight chain on the radial hub;
|
|
41
|
-
# click a unit / element disc → 1-hop neighborhood + filter runs;
|
|
42
|
-
# Replay → waterfall playhead + chain pulse on the graph)
|
|
43
|
-
# → `bun run dev:console:fresh` / `:fresh:seed` — claim from scratch
|
|
44
|
-
# (no fixed operator; claim code printed in the boot log)
|
|
45
|
-
# → after `bun run test:console:setup`, open the HTML report:
|
|
46
|
-
# `bun run test:console:setup:report` (trace + screenshots + video)
|
|
47
|
-
oke stack # preview resolved images/tags/ports — writes nothing
|
|
48
|
-
|
|
49
|
-
oke schema generate # core + plugin stubs → .oke/schema/oke.ts (--check in CI)
|
|
50
|
-
oke db push # domain schema.ts → live DB (dev; drizzle-kit)
|
|
51
|
-
oke db generate # versioned SQL under drizzle/ (review)
|
|
52
|
-
oke db migrate # apply migrations (explicit; never auto in prod)
|
|
53
|
-
oke db seed # this app's defineSeed (name + essential + env) — standard CLI path
|
|
54
|
-
oke db seed --env prod --force # CI: skip prod confirmation prompt
|
|
55
|
-
oke db studio # drizzle-kit Studio (long-running)
|
|
56
|
-
oke vault set STRIPE_KEY # also: list · import .env · key rotate
|
|
57
|
-
oke client add <url> # types for a separate frontend repo
|
|
58
|
-
|
|
59
|
-
oke docker # docker/Dockerfile + docker-compose.yml (prod-grade; 4 CPU / 8 GiB budget)
|
|
60
|
-
oke docker --split # layered compose.yml + compose.<role>.yml + compose.prod.yml
|
|
61
|
-
oke docker --stack # docker-stack.yml for docker stack deploy
|
|
62
|
-
oke docker --cpus 8 --memory 16 # override host budget used for deploy.resources
|
|
63
|
-
oke docker --no-prod # skip readiness / deploy / resource budget
|
|
64
|
-
oke docker clean # TTY: pick oke-dev-* projects → down -v (containers, networks, volumes)
|
|
65
|
-
oke docker clean --yes # non-TTY: current project only
|
|
66
|
-
oke docker clean --all --yes # non-TTY: every oke-dev-* project on this machine
|
|
67
|
-
oke images pin # tags → digests in oke.images.lock
|
|
68
|
-
|
|
69
|
-
oke build --target edge # < 16 kB kernel profile
|
|
70
|
-
oke eval # run prompt eval sets; fails CI on regression
|
|
71
|
-
oke ai setup # configure AI driver + models (TTY wizard or flags)
|
|
72
|
-
oke branch prod --at "yesterday" # fork journaled state into a sandbox
|
|
73
|
-
oke replay --request-id <id> # re-invoke a past Flow from a Runs WideEvent (dry-run if send/ask)
|
|
74
|
-
oke privacy erase --subject <id> # crypto-shredding: deletes the key, not the terabytes
|
|
75
|
-
oke upgrade # run codemods for a breaking change, print the diff
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
`oke replay` loads a Runs WideEvent by id and re-enters the Flow with stored
|
|
79
|
-
input. Defaults to dry-run when the ledger has `send` / `ask` (pass `--live`
|
|
80
|
-
to override). Needs a build that persisted `WideEvent.input`. Console Traces
|
|
81
|
-
Replay (`POST /console/traces/replay`) uses the same `runReplay` path.
|
|
82
|
-
|
|
83
|
-
`oke dev` request lines print the WideEvent / run id after the timestamp.
|
|
84
|
-
Paste it into Traces or `oke replay --request-id`.
|
|
85
|
-
|
|
86
|
-
`oke dev` bridges host-app WideEvents into Console Traces: the CLI starts
|
|
87
|
-
Console first, mints a loopback ingest secret, and sets `OKE_RUNS_INGEST_URL` /
|
|
88
|
-
`OKE_RUNS_INGEST_SECRET` on the host child so every recorded run POSTs to
|
|
89
|
-
`POST /console/runs/ingest`. Console appends into its own runs store (live
|
|
90
|
-
`feedRun` → PII-masked `projectRun` for `GET /console/runs` and
|
|
91
|
-
`/console/live`). `listRuns` also reads host Parquet at `.oke/runs`, so
|
|
92
|
-
Traces survive a Console restart. Production recording stays opt-in —
|
|
93
|
-
`oke start` does not enable the bridge; set `oke({ runs })` or
|
|
94
|
-
`drivers.runs` explicitly. `oke replay` reads the same `.oke/runs` tree.
|
|
95
|
-
|
|
96
|
-
In development, app, Console, MCP, and docs MCP prefer the canonical ports and move upward
|
|
97
|
-
when occupied. Docker infrastructure uses stable per-project offsets in disjoint ranges for
|
|
98
|
-
each built-in service, preventing one service's offset port from overlapping another's.
|
|
99
|
-
|
|
100
|
-
Bare `oke` on a TTY opens an Ink interactive shell (optional deps `ink` +
|
|
101
|
-
`react`). The viewport is cleared before render so boot logs never sit above the
|
|
102
|
-
frame. Chrome matches `oke dev`: green OKE wordmark on Dashboard, green active
|
|
103
|
-
tabs, cyan focus rows. Panels cover live ports (App / Console / MCP / Docs MCP),
|
|
104
|
-
Dev start/stop/attach with live logs, Database action cards (including Studio),
|
|
105
|
-
Docker compose status, and a Manifest navigator. **Tab** / **←→** (on the tab
|
|
106
|
-
strip) switch panels; **↑↓** navigate inside a panel; **Esc** returns to the tab
|
|
107
|
-
strip, then confirms quit when a managed `oke dev` is running; **1–5** jump
|
|
108
|
-
panels from any focus. Press `/` for the **command palette** (Tab autofill,
|
|
109
|
-
Enter runs `oke …`; status shows in the global footer). If `oke dev` is already
|
|
110
|
-
running, the TUI shows **Connected** via `.oke/dev.json` + port probes and will
|
|
111
|
-
not spawn a second stack. Non-TTY / CI keeps the classic help listing
|
|
112
|
-
(`EXIT_USAGE`).
|
|
113
|
-
|
|
114
|
-
`oke dev` always starts Compose (requires a running Docker daemon). Boot chrome
|
|
115
|
-
prints immediately (wordmark + Starting + profile), then streams background work
|
|
116
|
-
(compose up, vault, per-service health, AI probe). Status ● is green ready ·
|
|
117
|
-
yellow pending/loading · red error · dim idle. After bind, Backend · Console ·
|
|
118
|
-
MCP · Docs MCP each get a box (URL + one-line purpose). Compose health keeps polling
|
|
119
|
-
(`docker compose ps -a`); AI ● tracks model phase while the AI container is up.
|
|
120
|
-
Boot does not wait for the model to become ready. A successful session writes
|
|
121
|
-
`.oke/dev.json` (pid · ports · startedAt) and clears it on stop. Durable local
|
|
122
|
-
markers live in `.oke/state.json` — not in the session lock. Console session signing uses
|
|
123
|
-
`.oke/console.secret` (or `OKE_CONSOLE_SECRET`); that is not a Vault secret.
|
|
124
|
-
|
|
125
|
-
On a TTY, Ink keyboard controls stay active after boot (`useInput` — same
|
|
126
|
-
shortcuts as before). Press `r` to clear the log pane and reprint the latest
|
|
127
|
-
board.
|
|
128
|
-
|
|
129
|
-
| Key | Action |
|
|
130
|
-
| --- | ----------------------------------- |
|
|
131
|
-
| `?` | help |
|
|
132
|
-
| `r` | refresh — clear logs, show latest ● |
|
|
133
|
-
| `s` | `oke db seed` |
|
|
134
|
-
| `q` | quit `oke dev` |
|
|
135
|
-
| `u` | compose up (whole stack) |
|
|
136
|
-
| `x` | compose stop (whole stack) |
|
|
137
|
-
|
|
138
|
-
Compose stays quiet unless it fails. Process-local boot notices print once under
|
|
139
|
-
the hero (not once per process).
|
|
140
|
-
|
|
141
|
-
`oke test` sets `NODE_ENV=test` and `OKE_PGLITE_URL=memory://` when unset, checks
|
|
142
|
-
that `@electric-sql/pglite` resolves, then forwards argv to `bun test`.
|
|
143
|
-
|
|
144
|
-
`oke mode` and `oke dev --local` / `-l` are removed — they exit with an error.
|
|
145
|
-
Rename the env keys in `oke.config.ts` to `dev` / `test` / `prod`.
|
|
146
|
-
|
|
147
|
-
### create-oke
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
bunx create-oke@latest my-app # TTY: template → recommended / reuse / customize
|
|
151
|
-
bunx create-oke@latest my-app --template advanced
|
|
152
|
-
bunx create-oke@latest my-app --yes # non-interactive recommended defaults
|
|
153
|
-
bunx create-oke@latest my-app --sql postgres
|
|
154
|
-
bunx create-oke@latest my-app --ai # AI model wizard before install
|
|
155
|
-
bunx create-oke@latest my-app --no-ai
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
On a TTY: pick **standard** or **advanced**, then recommended defaults or
|
|
159
|
-
customize. Customize walks **Docker-first** facets once (including `store.index`
|
|
160
|
-
with a `none` opt-out), then **AI setup**: Recommended (llama.cpp) · Customize ·
|
|
161
|
-
Off. Writes user-global `~/.oke/create-defaults.json` (reuse only when `template`
|
|
162
|
-
matches). Recommended / customize also ask locales, PgDog, and reverse proxy
|
|
163
|
-
(Caddy / Traefik / nginx / No); **reuse** applies the saved answers without
|
|
164
|
-
re-asking. Flags: `--locales`, `--pgdog` / `--no-pgdog`, `--proxy` /
|
|
165
|
-
`--no-proxy`. Non-TTY / `--yes` / explicit `--template` never prompt.
|
|
166
|
-
|
|
167
|
-
### Additional commands
|
|
168
|
-
|
|
169
|
-
```bash
|
|
170
|
-
oke doctor --diff # CI gate: undeclared Manifest contract breaks
|
|
171
|
-
oke doctor --json # -j JSON on stdout; hints on stderr (agents / MCP)
|
|
172
|
-
oke stack --json # -j
|
|
173
|
-
oke images list # recipe · image · tag · digest · size (--json|-j)
|
|
174
|
-
oke gates list # Module:Action catalogue (--json|-j)
|
|
175
|
-
oke console claim-code # first-admin claim from .oke/claim-code (--json|-j)
|
|
176
|
-
oke ai setup --provider llama-cpp --yes # default local AI
|
|
177
|
-
oke ai setup --provider ollama --yes # fully supported alternative
|
|
178
|
-
# TTY: llama.cpp / Ollama → banner · tiers · manual; vLLM / SGLang / cloud → model
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
### Shell completion
|
|
182
|
-
|
|
183
|
-
Generated from the command registry — not a hand-maintained script:
|
|
184
|
-
|
|
185
|
-
```bash
|
|
186
|
-
eval "$(oke completion bash)"
|
|
187
|
-
eval "$(oke completion zsh)"
|
|
188
|
-
oke completion fish | source
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
### Short flags
|
|
192
|
-
|
|
193
|
-
Long form is canonical in docs; short form is convenience only. Shared letters follow git’s pattern (different meanings on different subcommands — e.g. `-c` is `--check` on `schema generate`, `--config` on `stack` / `docker` / `images`).
|
|
194
|
-
|
|
195
|
-
| Long | Short | Where |
|
|
196
|
-
| -------------------- | ----- | -------------------------------------------------------------------- |
|
|
197
|
-
| `--docker` | `-d` | `dev` (optional Compose **role filter**) |
|
|
198
|
-
| `--no-db-push` | | `dev` |
|
|
199
|
-
| `--prod` | `-p` | `docker` |
|
|
200
|
-
| `--yes` | `-y` | `docker clean` |
|
|
201
|
-
| `--all` | | `docker clean` |
|
|
202
|
-
| `--port` | `-p` | `start` |
|
|
203
|
-
| `--check` | `-c` | `schema generate` |
|
|
204
|
-
| `--config` | `-c` | `stack`, `docker`, `images`, `db *` (drizzle) |
|
|
205
|
-
| `--apply` | `-a` | `upgrade` |
|
|
206
|
-
| `--at` | `-a` | `branch` |
|
|
207
|
-
| `--after` | `-a` | `doctor --diff` |
|
|
208
|
-
| `--target` | `-t` | `build` |
|
|
209
|
-
| `--diff` | | `doctor` |
|
|
210
|
-
| `--json` | `-j` | `doctor`, `stack`, `images list`, `gates list`, `console claim-code` |
|
|
211
|
-
| `--manifest` | `-m` | most Manifest readers |
|
|
212
|
-
| `--entry` | `-e` | `dev`, `start`, `build`, `replay` |
|
|
213
|
-
| `--request-id` | `-r` | `replay` |
|
|
214
|
-
| `--dry-run` | | `replay` |
|
|
215
|
-
| `--live` | | `replay` |
|
|
216
|
-
| `--out` / `--outdir` | `-o` | writers |
|
|
217
|
-
| `--subject` | `-s` | `privacy erase` |
|
|
218
|
-
| `--before` | `-b` | `doctor --diff` |
|
|
219
|
-
| `--base` | `-B` | `doctor --diff` |
|
|
220
|
-
| `--env` | | `db *` (`dev` \| `test` \| `prod`) |
|
|
221
|
-
| `--force` | | `db seed` |
|
|
222
|
-
| `--local` / `-l` | | **removed** on `dev` (use `oke test`) |
|
|
223
|
-
|
|
224
|
-
### Exit codes
|
|
225
|
-
|
|
226
|
-
| Exit | Meaning |
|
|
227
|
-
| ----- | ------------------------------------- |
|
|
228
|
-
| **0** | success |
|
|
229
|
-
| **1** | usage / validation |
|
|
230
|
-
| **2** | runtime / environment / check failure |
|
|
231
|
-
|
|
232
|
-
`oke help` prints the same flag and exit-code tables.
|