fnloom 0.0.1 → 0.2.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/LICENSE +201 -0
- package/README.md +174 -3
- package/package.json +70 -4
- package/packages/build/package.json +31 -0
- package/packages/build/src/build-system.ts +186 -0
- package/packages/build/src/builder.ts +225 -0
- package/packages/build/src/context.ts +2 -0
- package/packages/build/src/files.ts +73 -0
- package/packages/build/src/folder.ts +52 -0
- package/packages/build/src/index.ts +20 -0
- package/packages/build/src/scan.ts +82 -0
- package/packages/build/src/tests.ts +138 -0
- package/packages/build/tsconfig.json +6 -0
- package/packages/cli/bin/harness.mjs +17 -0
- package/packages/cli/package.json +27 -0
- package/packages/cli/src/catalog.ts +35 -0
- package/packages/cli/src/cli.ts +83 -0
- package/packages/cli/src/command.ts +112 -0
- package/packages/cli/src/commands/available.ts +107 -0
- package/packages/cli/src/commands/build.ts +57 -0
- package/packages/cli/src/commands/data.ts +36 -0
- package/packages/cli/src/commands/install.ts +167 -0
- package/packages/cli/src/commands/manage.ts +104 -0
- package/packages/cli/src/commands/mcp.ts +198 -0
- package/packages/cli/src/commands/new.ts +139 -0
- package/packages/cli/src/commands/pack.ts +37 -0
- package/packages/cli/src/commands/start.ts +22 -0
- package/packages/cli/src/commands/test.ts +57 -0
- package/packages/cli/src/files.ts +5 -0
- package/packages/cli/src/hub-client.ts +84 -0
- package/packages/cli/src/hub.ts +169 -0
- package/packages/cli/src/index.ts +13 -0
- package/packages/cli/src/io.ts +32 -0
- package/packages/cli/src/live.ts +66 -0
- package/packages/cli/src/local.ts +100 -0
- package/packages/cli/src/main.ts +6 -0
- package/packages/cli/src/premade.ts +80 -0
- package/packages/cli/src/testing.ts +216 -0
- package/packages/cli/tsconfig.json +6 -0
- package/packages/core/package.json +21 -0
- package/packages/core/src/access.ts +97 -0
- package/packages/core/src/admin.ts +90 -0
- package/packages/core/src/api-index.ts +26 -0
- package/packages/core/src/approvals.ts +229 -0
- package/packages/core/src/auto-pair.ts +47 -0
- package/packages/core/src/changes.ts +61 -0
- package/packages/core/src/checks.ts +93 -0
- package/packages/core/src/claims.ts +98 -0
- package/packages/core/src/compare.ts +47 -0
- package/packages/core/src/config-secrets.ts +28 -0
- package/packages/core/src/connections.ts +193 -0
- package/packages/core/src/context-files.ts +179 -0
- package/packages/core/src/context-graph.ts +270 -0
- package/packages/core/src/csv.ts +33 -0
- package/packages/core/src/data.ts +176 -0
- package/packages/core/src/decisions.ts +98 -0
- package/packages/core/src/flow.ts +225 -0
- package/packages/core/src/fn-block.ts +51 -0
- package/packages/core/src/fn-facts.ts +533 -0
- package/packages/core/src/fn-renames.ts +102 -0
- package/packages/core/src/gin-a.ts +185 -0
- package/packages/core/src/gin-record.ts +142 -0
- package/packages/core/src/gin.ts +104 -0
- package/packages/core/src/grants.ts +84 -0
- package/packages/core/src/graph-kinds.ts +44 -0
- package/packages/core/src/graph.ts +95 -0
- package/packages/core/src/https.ts +35 -0
- package/packages/core/src/identity.ts +38 -0
- package/packages/core/src/image-embeddings.ts +96 -0
- package/packages/core/src/index.ts +129 -0
- package/packages/core/src/inject.ts +104 -0
- package/packages/core/src/issues.ts +137 -0
- package/packages/core/src/labels.ts +96 -0
- package/packages/core/src/lifecycle.ts +237 -0
- package/packages/core/src/link.ts +491 -0
- package/packages/core/src/llm.ts +167 -0
- package/packages/core/src/manifest.ts +657 -0
- package/packages/core/src/mcp-servers.ts +134 -0
- package/packages/core/src/media-types.ts +145 -0
- package/packages/core/src/mention-search.ts +27 -0
- package/packages/core/src/metrics.ts +91 -0
- package/packages/core/src/model-calls.ts +223 -0
- package/packages/core/src/model-names.ts +704 -0
- package/packages/core/src/modes.ts +325 -0
- package/packages/core/src/objects.ts +15 -0
- package/packages/core/src/owner-runs.ts +89 -0
- package/packages/core/src/package.ts +195 -0
- package/packages/core/src/partial.ts +69 -0
- package/packages/core/src/people-only.ts +52 -0
- package/packages/core/src/pickers.ts +31 -0
- package/packages/core/src/ports.ts +14 -0
- package/packages/core/src/primitives.ts +287 -0
- package/packages/core/src/programs.ts +155 -0
- package/packages/core/src/query.ts +264 -0
- package/packages/core/src/records/actors.ts +188 -0
- package/packages/core/src/records/announced.ts +39 -0
- package/packages/core/src/records/chat.ts +279 -0
- package/packages/core/src/records/citations.ts +126 -0
- package/packages/core/src/records/compare.ts +97 -0
- package/packages/core/src/records/content.ts +196 -0
- package/packages/core/src/records/injections.ts +146 -0
- package/packages/core/src/records/mcps.ts +115 -0
- package/packages/core/src/records/runs.ts +280 -0
- package/packages/core/src/records/spend.ts +158 -0
- package/packages/core/src/records/systems.ts +298 -0
- package/packages/core/src/records/tables.ts +164 -0
- package/packages/core/src/registries.ts +229 -0
- package/packages/core/src/remote-auth.ts +111 -0
- package/packages/core/src/resource-forms.ts +218 -0
- package/packages/core/src/resources.ts +166 -0
- package/packages/core/src/review-summary.ts +69 -0
- package/packages/core/src/run.ts +312 -0
- package/packages/core/src/sensitivity.ts +101 -0
- package/packages/core/src/sso.ts +268 -0
- package/packages/core/src/status.ts +158 -0
- package/packages/core/src/suggestions.ts +228 -0
- package/packages/core/src/system-events.ts +47 -0
- package/packages/core/src/system-pages.ts +72 -0
- package/packages/core/src/system-parts.ts +51 -0
- package/packages/core/src/system-providers.ts +163 -0
- package/packages/core/src/urls.ts +50 -0
- package/packages/core/src/validation.ts +39 -0
- package/packages/core/src/versions.ts +52 -0
- package/packages/core/src/visuals.ts +478 -0
- package/packages/core/src/web.ts +965 -0
- package/packages/core/src/widgets-v1.ts +73 -0
- package/packages/core/src/widgets.ts +427 -0
- package/packages/core/tsconfig.json +5 -0
- package/packages/hub/context/asking.md +16 -0
- package/packages/hub/context/attached_files.md +27 -0
- package/packages/hub/context/background_runs.md +14 -0
- package/packages/hub/context/earlier_chats.md +16 -0
- package/packages/hub/context/examples.md +13 -0
- package/packages/hub/context/finding_fns.md +18 -0
- package/packages/hub/context/images.md +24 -0
- package/packages/hub/context/later.md +27 -0
- package/packages/hub/context/limits.md +13 -0
- package/packages/hub/context/memory.md +38 -0
- package/packages/hub/context/resources.md +21 -0
- package/packages/hub/context/saved_fns.md +28 -0
- package/packages/hub/context/undo.md +20 -0
- package/packages/hub/package.json +55 -0
- package/packages/hub/src/access/create.ts +29 -0
- package/packages/hub/src/access/hits.ts +57 -0
- package/packages/hub/src/access/index.ts +119 -0
- package/packages/hub/src/access/scope.ts +133 -0
- package/packages/hub/src/access/service.ts +171 -0
- package/packages/hub/src/api/admin-ops.ts +410 -0
- package/packages/hub/src/api/auth.ts +286 -0
- package/packages/hub/src/api/client-address.ts +55 -0
- package/packages/hub/src/api/connect.ts +45 -0
- package/packages/hub/src/api/dual.ts +103 -0
- package/packages/hub/src/api/events.ts +185 -0
- package/packages/hub/src/api/files.ts +209 -0
- package/packages/hub/src/api/hash.ts +23 -0
- package/packages/hub/src/api/http.ts +171 -0
- package/packages/hub/src/api/https.ts +125 -0
- package/packages/hub/src/api/identities.ts +246 -0
- package/packages/hub/src/api/index.ts +94 -0
- package/packages/hub/src/api/injections.ts +256 -0
- package/packages/hub/src/api/mime.ts +31 -0
- package/packages/hub/src/api/person-ops.ts +153 -0
- package/packages/hub/src/api/push.ts +97 -0
- package/packages/hub/src/api/reads.ts +145 -0
- package/packages/hub/src/api/secrets.ts +71 -0
- package/packages/hub/src/api/serve.ts +280 -0
- package/packages/hub/src/api/signed.ts +66 -0
- package/packages/hub/src/api/sso-route.ts +73 -0
- package/packages/hub/src/api/sso.ts +382 -0
- package/packages/hub/src/api/system-parts.ts +97 -0
- package/packages/hub/src/api/testing/issuer.ts +128 -0
- package/packages/hub/src/api/testing/rig.ts +272 -0
- package/packages/hub/src/api/tls.ts +383 -0
- package/packages/hub/src/api/web/access.ts +84 -0
- package/packages/hub/src/api/web/admin.ts +90 -0
- package/packages/hub/src/api/web/auth.ts +103 -0
- package/packages/hub/src/api/web/build3.ts +44 -0
- package/packages/hub/src/api/web/build4.ts +24 -0
- package/packages/hub/src/api/web/build5.ts +120 -0
- package/packages/hub/src/api/web/chat.ts +144 -0
- package/packages/hub/src/api/web/content.ts +42 -0
- package/packages/hub/src/api/web/context.ts +41 -0
- package/packages/hub/src/api/web/contextor.ts +37 -0
- package/packages/hub/src/api/web/data.ts +33 -0
- package/packages/hub/src/api/web/explorer.ts +22 -0
- package/packages/hub/src/api/web/find.ts +50 -0
- package/packages/hub/src/api/web/graph.ts +17 -0
- package/packages/hub/src/api/web/https.ts +18 -0
- package/packages/hub/src/api/web/identity.ts +18 -0
- package/packages/hub/src/api/web/images.ts +18 -0
- package/packages/hub/src/api/web/inbox.ts +35 -0
- package/packages/hub/src/api/web/index.ts +137 -0
- package/packages/hub/src/api/web/injections.ts +22 -0
- package/packages/hub/src/api/web/mcps.ts +32 -0
- package/packages/hub/src/api/web/metrics.ts +24 -0
- package/packages/hub/src/api/web/models.ts +21 -0
- package/packages/hub/src/api/web/outside-images.ts +32 -0
- package/packages/hub/src/api/web/packaging.ts +31 -0
- package/packages/hub/src/api/web/pages.ts +55 -0
- package/packages/hub/src/api/web/people.ts +92 -0
- package/packages/hub/src/api/web/pickers.ts +115 -0
- package/packages/hub/src/api/web/resources.ts +42 -0
- package/packages/hub/src/api/web/review.ts +119 -0
- package/packages/hub/src/api/web/runs.ts +94 -0
- package/packages/hub/src/api/web/settings.ts +35 -0
- package/packages/hub/src/api/web/systems.ts +83 -0
- package/packages/hub/src/api/web/tables.ts +31 -0
- package/packages/hub/src/api/web/versions.ts +17 -0
- package/packages/hub/src/api/web/visibility.ts +47 -0
- package/packages/hub/src/boot/admin-fns.ts +78 -0
- package/packages/hub/src/boot/admin-secrets.ts +140 -0
- package/packages/hub/src/boot/env.ts +170 -0
- package/packages/hub/src/boot/hub-context.ts +39 -0
- package/packages/hub/src/boot/hub-fns.ts +549 -0
- package/packages/hub/src/boot/hub-groups.ts +34 -0
- package/packages/hub/src/boot/identity.ts +66 -0
- package/packages/hub/src/boot/index.ts +191 -0
- package/packages/hub/src/boot/info.ts +22 -0
- package/packages/hub/src/boot/keys.ts +60 -0
- package/packages/hub/src/boot/log.ts +31 -0
- package/packages/hub/src/boot/modules.ts +277 -0
- package/packages/hub/src/boot/person-fns.ts +78 -0
- package/packages/hub/src/boot/read-fns.ts +73 -0
- package/packages/hub/src/boot/services.ts +156 -0
- package/packages/hub/src/boot/start.ts +246 -0
- package/packages/hub/src/bus/memory.ts +60 -0
- package/packages/hub/src/bus.ts +80 -0
- package/packages/hub/src/catalog/api-index.ts +72 -0
- package/packages/hub/src/catalog/availability.ts +210 -0
- package/packages/hub/src/catalog/catalog.ts +1062 -0
- package/packages/hub/src/catalog/definitions.ts +19 -0
- package/packages/hub/src/catalog/fixtures.ts +82 -0
- package/packages/hub/src/catalog/fn-names.ts +128 -0
- package/packages/hub/src/catalog/index.ts +126 -0
- package/packages/hub/src/catalog/injections.ts +90 -0
- package/packages/hub/src/catalog/scope.ts +86 -0
- package/packages/hub/src/catalog/serial.ts +10 -0
- package/packages/hub/src/catalog/signature.ts +69 -0
- package/packages/hub/src/catalog/versions.ts +110 -0
- package/packages/hub/src/chat/announce.ts +145 -0
- package/packages/hub/src/chat/cache.ts +50 -0
- package/packages/hub/src/chat/chat.ts +72 -0
- package/packages/hub/src/chat/cite-rule.ts +64 -0
- package/packages/hub/src/chat/cites.ts +236 -0
- package/packages/hub/src/chat/compare.ts +290 -0
- package/packages/hub/src/chat/deliveries.ts +187 -0
- package/packages/hub/src/chat/deps.ts +69 -0
- package/packages/hub/src/chat/enrich.ts +601 -0
- package/packages/hub/src/chat/env.ts +33 -0
- package/packages/hub/src/chat/errors.ts +38 -0
- package/packages/hub/src/chat/files.ts +72 -0
- package/packages/hub/src/chat/index.ts +259 -0
- package/packages/hub/src/chat/mention-requests.ts +49 -0
- package/packages/hub/src/chat/mention-search.ts +64 -0
- package/packages/hub/src/chat/mentions.ts +274 -0
- package/packages/hub/src/chat/notifications.ts +278 -0
- package/packages/hub/src/chat/people.ts +59 -0
- package/packages/hub/src/chat/presence.ts +48 -0
- package/packages/hub/src/chat/reply.ts +23 -0
- package/packages/hub/src/chat/sessions.ts +306 -0
- package/packages/hub/src/chat/shown.ts +158 -0
- package/packages/hub/src/chat/state.ts +270 -0
- package/packages/hub/src/chat/streams.ts +92 -0
- package/packages/hub/src/chat/suggestions.ts +383 -0
- package/packages/hub/src/chat/support.ts +144 -0
- package/packages/hub/src/chat/testing.ts +488 -0
- package/packages/hub/src/chat/turns.ts +586 -0
- package/packages/hub/src/chat/undo.ts +177 -0
- package/packages/hub/src/connections/create.ts +25 -0
- package/packages/hub/src/connections/env.ts +14 -0
- package/packages/hub/src/connections/index.ts +86 -0
- package/packages/hub/src/connections/service.ts +536 -0
- package/packages/hub/src/contextor/brought.ts +64 -0
- package/packages/hub/src/contextor/budget.ts +74 -0
- package/packages/hub/src/contextor/calibration.ts +35 -0
- package/packages/hub/src/contextor/choose.ts +116 -0
- package/packages/hub/src/contextor/contextors.ts +550 -0
- package/packages/hub/src/contextor/crawl.ts +252 -0
- package/packages/hub/src/contextor/create.ts +113 -0
- package/packages/hub/src/contextor/dynamic.ts +102 -0
- package/packages/hub/src/contextor/env.ts +83 -0
- package/packages/hub/src/contextor/examples.ts +204 -0
- package/packages/hub/src/contextor/fns.ts +147 -0
- package/packages/hub/src/contextor/graph.ts +137 -0
- package/packages/hub/src/contextor/history.ts +211 -0
- package/packages/hub/src/contextor/index.ts +524 -0
- package/packages/hub/src/contextor/injected.ts +401 -0
- package/packages/hub/src/contextor/limits.ts +168 -0
- package/packages/hub/src/contextor/links.ts +67 -0
- package/packages/hub/src/contextor/modes.ts +520 -0
- package/packages/hub/src/contextor/planner.ts +626 -0
- package/packages/hub/src/contextor/render.ts +531 -0
- package/packages/hub/src/contextor/score.ts +93 -0
- package/packages/hub/src/contextor/testing.ts +161 -0
- package/packages/hub/src/contextor/tokens.ts +102 -0
- package/packages/hub/src/contextor/views.ts +171 -0
- package/packages/hub/src/contextor/xml.ts +140 -0
- package/packages/hub/src/data/create.ts +45 -0
- package/packages/hub/src/data/env.ts +16 -0
- package/packages/hub/src/data/fields.ts +71 -0
- package/packages/hub/src/data/fns.ts +50 -0
- package/packages/hub/src/data/index.ts +50 -0
- package/packages/hub/src/data/service.ts +348 -0
- package/packages/hub/src/execution/agent.ts +1381 -0
- package/packages/hub/src/execution/ai.ts +408 -0
- package/packages/hub/src/execution/channel.ts +38 -0
- package/packages/hub/src/execution/claims.ts +103 -0
- package/packages/hub/src/execution/create.ts +261 -0
- package/packages/hub/src/execution/deadlines.ts +74 -0
- package/packages/hub/src/execution/deciders.ts +60 -0
- package/packages/hub/src/execution/env.ts +28 -0
- package/packages/hub/src/execution/errors.ts +103 -0
- package/packages/hub/src/execution/executors.ts +246 -0
- package/packages/hub/src/execution/gateway.ts +209 -0
- package/packages/hub/src/execution/handlers.ts +154 -0
- package/packages/hub/src/execution/hub-fns.ts +50 -0
- package/packages/hub/src/execution/index.ts +244 -0
- package/packages/hub/src/execution/interactions.ts +65 -0
- package/packages/hub/src/execution/ledger.ts +168 -0
- package/packages/hub/src/execution/limits.ts +175 -0
- package/packages/hub/src/execution/link-handlers.ts +142 -0
- package/packages/hub/src/execution/media.ts +240 -0
- package/packages/hub/src/execution/models.ts +42 -0
- package/packages/hub/src/execution/policies.ts +371 -0
- package/packages/hub/src/execution/ports.ts +159 -0
- package/packages/hub/src/execution/providers.ts +106 -0
- package/packages/hub/src/execution/queues.ts +161 -0
- package/packages/hub/src/execution/runs.ts +1237 -0
- package/packages/hub/src/execution/scope.ts +152 -0
- package/packages/hub/src/execution/spend.ts +75 -0
- package/packages/hub/src/execution/stream-guard.ts +138 -0
- package/packages/hub/src/execution/testing.ts +490 -0
- package/packages/hub/src/execution/time.ts +36 -0
- package/packages/hub/src/execution/tools.ts +84 -0
- package/packages/hub/src/execution/wire.ts +99 -0
- package/packages/hub/src/execution/wording.ts +38 -0
- package/packages/hub/src/fns/auto.ts +109 -0
- package/packages/hub/src/fns/client-logs.ts +83 -0
- package/packages/hub/src/fns/costs.ts +139 -0
- package/packages/hub/src/fns/create.ts +140 -0
- package/packages/hub/src/fns/decided.ts +313 -0
- package/packages/hub/src/fns/env.ts +23 -0
- package/packages/hub/src/fns/examples.ts +184 -0
- package/packages/hub/src/fns/facts.ts +251 -0
- package/packages/hub/src/fns/gate.ts +40 -0
- package/packages/hub/src/fns/index.ts +149 -0
- package/packages/hub/src/fns/search.ts +351 -0
- package/packages/hub/src/graph/graph.ts +667 -0
- package/packages/hub/src/graph/source.ts +42 -0
- package/packages/hub/src/index/batch.ts +96 -0
- package/packages/hub/src/index/context-sections.ts +51 -0
- package/packages/hub/src/index/embedders.ts +242 -0
- package/packages/hub/src/index/env.ts +25 -0
- package/packages/hub/src/index/image-setting.ts +55 -0
- package/packages/hub/src/index/images.ts +43 -0
- package/packages/hub/src/index/index.ts +168 -0
- package/packages/hub/src/index/indexer.ts +663 -0
- package/packages/hub/src/index/search.ts +168 -0
- package/packages/hub/src/index/sectioners.ts +209 -0
- package/packages/hub/src/index/sectioning.ts +57 -0
- package/packages/hub/src/index/suggester.ts +65 -0
- package/packages/hub/src/index/testing.ts +113 -0
- package/packages/hub/src/index.ts +19 -0
- package/packages/hub/src/link/auto-pair.ts +225 -0
- package/packages/hub/src/link/build.ts +216 -0
- package/packages/hub/src/link/config-secrets.ts +171 -0
- package/packages/hub/src/link/config.ts +140 -0
- package/packages/hub/src/link/connections.ts +139 -0
- package/packages/hub/src/link/describer.ts +29 -0
- package/packages/hub/src/link/env.ts +42 -0
- package/packages/hub/src/link/events.ts +123 -0
- package/packages/hub/src/link/gate.ts +117 -0
- package/packages/hub/src/link/grants.ts +346 -0
- package/packages/hub/src/link/handlers.ts +301 -0
- package/packages/hub/src/link/index.ts +232 -0
- package/packages/hub/src/link/install.ts +92 -0
- package/packages/hub/src/link/keys.ts +32 -0
- package/packages/hub/src/link/lifecycle.ts +520 -0
- package/packages/hub/src/link/migrate-api.ts +210 -0
- package/packages/hub/src/link/migrate.ts +44 -0
- package/packages/hub/src/link/output.ts +63 -0
- package/packages/hub/src/link/owner-runs.ts +313 -0
- package/packages/hub/src/link/package/data.ts +53 -0
- package/packages/hub/src/link/package/format.ts +126 -0
- package/packages/hub/src/link/package/index.ts +9 -0
- package/packages/hub/src/link/package/zip.ts +137 -0
- package/packages/hub/src/link/packages.ts +180 -0
- package/packages/hub/src/link/pairing.ts +503 -0
- package/packages/hub/src/link/process.ts +98 -0
- package/packages/hub/src/link/reads.ts +91 -0
- package/packages/hub/src/link/resources.ts +166 -0
- package/packages/hub/src/link/review-summary.ts +279 -0
- package/packages/hub/src/link/rig.ts +335 -0
- package/packages/hub/src/link/router.ts +118 -0
- package/packages/hub/src/link/services.ts +294 -0
- package/packages/hub/src/link/status.ts +126 -0
- package/packages/hub/src/link/supervisor.ts +547 -0
- package/packages/hub/src/link/systems.ts +101 -0
- package/packages/hub/src/link/tokens.ts +30 -0
- package/packages/hub/src/main.ts +19 -0
- package/packages/hub/src/mcp/calls.ts +153 -0
- package/packages/hub/src/mcp/create.ts +51 -0
- package/packages/hub/src/mcp/endpoints.ts +206 -0
- package/packages/hub/src/mcp/env.ts +19 -0
- package/packages/hub/src/mcp/fns.ts +23 -0
- package/packages/hub/src/mcp/index.ts +76 -0
- package/packages/hub/src/mcp/registry.ts +150 -0
- package/packages/hub/src/mcp/scopes.ts +218 -0
- package/packages/hub/src/mcp/sources.ts +154 -0
- package/packages/hub/src/mcp/tokens.ts +72 -0
- package/packages/hub/src/mcp/tools.ts +173 -0
- package/packages/hub/src/metrics/calls.ts +123 -0
- package/packages/hub/src/metrics/create.ts +15 -0
- package/packages/hub/src/metrics/fn-metrics.ts +97 -0
- package/packages/hub/src/metrics/index.ts +58 -0
- package/packages/hub/src/metrics/rollup.ts +188 -0
- package/packages/hub/src/models/create.ts +65 -0
- package/packages/hub/src/models/decide.ts +134 -0
- package/packages/hub/src/models/gateway.ts +102 -0
- package/packages/hub/src/models/index.ts +82 -0
- package/packages/hub/src/models/pinned.ts +10 -0
- package/packages/hub/src/models/remote.ts +386 -0
- package/packages/hub/src/models/roles.ts +160 -0
- package/packages/hub/src/models/structured.ts +30 -0
- package/packages/hub/src/query/columns.ts +55 -0
- package/packages/hub/src/query/contexts.ts +102 -0
- package/packages/hub/src/query/env.ts +17 -0
- package/packages/hub/src/query/evaluate.ts +181 -0
- package/packages/hub/src/query/index.ts +32 -0
- package/packages/hub/src/query/service.ts +64 -0
- package/packages/hub/src/query/sources.ts +344 -0
- package/packages/hub/src/query/sql-source.ts +93 -0
- package/packages/hub/src/resources/browse.ts +131 -0
- package/packages/hub/src/resources/content.ts +183 -0
- package/packages/hub/src/resources/context.ts +405 -0
- package/packages/hub/src/resources/converters.ts +78 -0
- package/packages/hub/src/resources/create.ts +88 -0
- package/packages/hub/src/resources/env.ts +24 -0
- package/packages/hub/src/resources/fetch.ts +140 -0
- package/packages/hub/src/resources/fns.ts +172 -0
- package/packages/hub/src/resources/forms.ts +285 -0
- package/packages/hub/src/resources/images.ts +182 -0
- package/packages/hub/src/resources/index.ts +186 -0
- package/packages/hub/src/resources/library.ts +228 -0
- package/packages/hub/src/resources/models.ts +116 -0
- package/packages/hub/src/resources/pdf-pages.ts +455 -0
- package/packages/hub/src/resources/raw.ts +108 -0
- package/packages/hub/src/resources/reader.ts +224 -0
- package/packages/hub/src/resources/rules.ts +110 -0
- package/packages/hub/src/resources/sqlite-files.ts +140 -0
- package/packages/hub/src/resources/storage.ts +40 -0
- package/packages/hub/src/resources/testing.ts +292 -0
- package/packages/hub/src/store/always-for.ts +46 -0
- package/packages/hub/src/store/auxTables.ts +97 -0
- package/packages/hub/src/store/codec.ts +109 -0
- package/packages/hub/src/store/db.ts +137 -0
- package/packages/hub/src/store/env.ts +13 -0
- package/packages/hub/src/store/errors.ts +36 -0
- package/packages/hub/src/store/fixtures.ts +53 -0
- package/packages/hub/src/store/fn-renames.ts +72 -0
- package/packages/hub/src/store/hybrid.ts +130 -0
- package/packages/hub/src/store/index.ts +231 -0
- package/packages/hub/src/store/lists.ts +172 -0
- package/packages/hub/src/store/migrate-fn-names.ts +135 -0
- package/packages/hub/src/store/migrate.ts +121 -0
- package/packages/hub/src/store/ports.ts +163 -0
- package/packages/hub/src/store/query.ts +166 -0
- package/packages/hub/src/store/records.ts +119 -0
- package/packages/hub/src/store/rows.ts +105 -0
- package/packages/hub/src/store/schema.ts +184 -0
- package/packages/hub/src/store/sqlite.ts +136 -0
- package/packages/hub/src/store/table.ts +113 -0
- package/packages/hub/src/store/text.ts +92 -0
- package/packages/hub/src/store/vectors.ts +232 -0
- package/packages/hub/src/tables/env.ts +15 -0
- package/packages/hub/src/tables/fns.ts +29 -0
- package/packages/hub/src/tables/index.ts +45 -0
- package/packages/hub/src/tables/migrate.ts +105 -0
- package/packages/hub/src/tables/service.ts +245 -0
- package/packages/hub/src/testing.ts +128 -0
- package/packages/hub/tsconfig.json +6 -0
- package/packages/sdk/AUTHORING.md +25228 -0
- package/packages/sdk/package.json +58 -0
- package/packages/sdk/src/a-gin.ts +132 -0
- package/packages/sdk/src/agent.ts +121 -0
- package/packages/sdk/src/authoring.ts +546 -0
- package/packages/sdk/src/build.ts +97 -0
- package/packages/sdk/src/chat-prompt.ts +202 -0
- package/packages/sdk/src/claims.ts +20 -0
- package/packages/sdk/src/client-runtime.ts +514 -0
- package/packages/sdk/src/client.ts +672 -0
- package/packages/sdk/src/ctx.ts +659 -0
- package/packages/sdk/src/declare.ts +480 -0
- package/packages/sdk/src/fn.ts +514 -0
- package/packages/sdk/src/gin.ts +245 -0
- package/packages/sdk/src/hub.ts +1065 -0
- package/packages/sdk/src/impl.ts +35 -0
- package/packages/sdk/src/index.ts +87 -0
- package/packages/sdk/src/links.ts +35 -0
- package/packages/sdk/src/manifest.ts +372 -0
- package/packages/sdk/src/page-parts.ts +153 -0
- package/packages/sdk/src/program/env.ts +29 -0
- package/packages/sdk/src/program/index.ts +13 -0
- package/packages/sdk/src/program/lookups.ts +82 -0
- package/packages/sdk/src/program/runtime.ts +576 -0
- package/packages/sdk/src/program/tools.ts +268 -0
- package/packages/sdk/src/providers.ts +77 -0
- package/packages/sdk/src/refs.ts +161 -0
- package/packages/sdk/src/relative-dates.ts +197 -0
- package/packages/sdk/src/remote-auth.ts +113 -0
- package/packages/sdk/src/resources.ts +28 -0
- package/packages/sdk/src/results.ts +47 -0
- package/packages/sdk/src/server/address.ts +167 -0
- package/packages/sdk/src/server/asks.ts +111 -0
- package/packages/sdk/src/server/assets.ts +47 -0
- package/packages/sdk/src/server/authored-names.ts +79 -0
- package/packages/sdk/src/server/calls.ts +260 -0
- package/packages/sdk/src/server/content.ts +124 -0
- package/packages/sdk/src/server/context-check.ts +214 -0
- package/packages/sdk/src/server/context-files.ts +244 -0
- package/packages/sdk/src/server/data.ts +90 -0
- package/packages/sdk/src/server/env.ts +144 -0
- package/packages/sdk/src/server/fake-hub-fns.ts +124 -0
- package/packages/sdk/src/server/fake-hub-widgets.ts +67 -0
- package/packages/sdk/src/server/fake-models.ts +89 -0
- package/packages/sdk/src/server/fake-records.ts +217 -0
- package/packages/sdk/src/server/files.ts +118 -0
- package/packages/sdk/src/server/host.ts +742 -0
- package/packages/sdk/src/server/hosted-network-guard.ts +18 -0
- package/packages/sdk/src/server/index.ts +220 -0
- package/packages/sdk/src/server/journal.ts +131 -0
- package/packages/sdk/src/server/js-yaml.d.ts +19 -0
- package/packages/sdk/src/server/keys.ts +148 -0
- package/packages/sdk/src/server/link.ts +93 -0
- package/packages/sdk/src/server/live.ts +22 -0
- package/packages/sdk/src/server/llm-wire.ts +647 -0
- package/packages/sdk/src/server/llm.ts +555 -0
- package/packages/sdk/src/server/log.ts +108 -0
- package/packages/sdk/src/server/manifest-state.ts +113 -0
- package/packages/sdk/src/server/mcp-caller.ts +15 -0
- package/packages/sdk/src/server/mcp-prompts.ts +54 -0
- package/packages/sdk/src/server/mcp-resources.ts +130 -0
- package/packages/sdk/src/server/mcp.ts +194 -0
- package/packages/sdk/src/server/owner-runs.ts +109 -0
- package/packages/sdk/src/server/package.ts +141 -0
- package/packages/sdk/src/server/pairing.ts +97 -0
- package/packages/sdk/src/server/process.ts +53 -0
- package/packages/sdk/src/server/providers.ts +180 -0
- package/packages/sdk/src/server/proxy.ts +196 -0
- package/packages/sdk/src/server/renderers.ts +28 -0
- package/packages/sdk/src/server/resources.ts +89 -0
- package/packages/sdk/src/server/results.ts +121 -0
- package/packages/sdk/src/server/run.ts +492 -0
- package/packages/sdk/src/server/runs.ts +103 -0
- package/packages/sdk/src/server/runtime.ts +597 -0
- package/packages/sdk/src/server/socket-guard.ts +162 -0
- package/packages/sdk/src/server/state.ts +112 -0
- package/packages/sdk/src/server/supervise.ts +257 -0
- package/packages/sdk/src/server/table.ts +490 -0
- package/packages/sdk/src/server/testing.ts +883 -0
- package/packages/sdk/src/server/types.ts +26 -0
- package/packages/sdk/src/server/wire.ts +172 -0
- package/packages/sdk/src/status.ts +50 -0
- package/packages/sdk/src/system.ts +459 -0
- package/packages/sdk/src/testing/context.ts +48 -0
- package/packages/sdk/src/testing/env.ts +28 -0
- package/packages/sdk/src/testing/fixtures/NoteCard.vue +17 -0
- package/packages/sdk/src/testing/fixtures/context/guide.md +12 -0
- package/packages/sdk/src/testing/hub.ts +294 -0
- package/packages/sdk/src/testing/index.ts +30 -0
- package/packages/sdk/src/testing/models.ts +192 -0
- package/packages/sdk/src/testing/openrouter.ts +94 -0
- package/packages/sdk/src/testing/preview.ts +207 -0
- package/packages/sdk/src/testing/scratch.ts +58 -0
- package/packages/sdk/src/testing/shots.ts +17 -0
- package/packages/sdk/src/util.ts +35 -0
- package/packages/sdk/src/widget-check.ts +182 -0
- package/packages/sdk/src/widget-schema.ts +251 -0
- package/packages/sdk/src/widgets.ts +386 -0
- package/packages/sdk/src/zod-gin.ts +213 -0
- package/packages/sdk/tsconfig.json +6 -0
- package/packages/web/dist/assets/ActorSettingsView-BuMYRDqv.js +2 -0
- package/packages/web/dist/assets/ActorSettingsView-GTxPZw8N.css +1 -0
- package/packages/web/dist/assets/AdminLayout-1hbRPV3d.css +1 -0
- package/packages/web/dist/assets/AdminLayout-sLjVTrmV.js +2 -0
- package/packages/web/dist/assets/ApiServiceForm-BrMTU-7u.js +2 -0
- package/packages/web/dist/assets/ApiServiceForm-BxprSaAq.css +1 -0
- package/packages/web/dist/assets/ApiServiceView-BMF2zD6Q.js +2 -0
- package/packages/web/dist/assets/ApiServiceView-BVmdRCjR.css +1 -0
- package/packages/web/dist/assets/ApiServicesView-BTLV6c8n.css +1 -0
- package/packages/web/dist/assets/ApiServicesView-bjLAWO_j.js +2 -0
- package/packages/web/dist/assets/AppPage-BBzZ0Pru.css +1 -0
- package/packages/web/dist/assets/AppPage-DSzDKCFz.js +2 -0
- package/packages/web/dist/assets/AutoPairPicker-ClF4nB0n.css +1 -0
- package/packages/web/dist/assets/AutoPairPicker-nV38ALjl.js +2 -0
- package/packages/web/dist/assets/BrowserFrame-Bic7U7jN.js +2 -0
- package/packages/web/dist/assets/BrowserFrame-BzEdhmsF.css +1 -0
- package/packages/web/dist/assets/ChartVisual-BnFG9aFi.css +1 -0
- package/packages/web/dist/assets/ChartVisual-DWw7WsfN.js +11 -0
- package/packages/web/dist/assets/ChatPage-7Yebk7rl.js +4 -0
- package/packages/web/dist/assets/ChatPage-CbsRmktV.css +1 -0
- package/packages/web/dist/assets/CodeViewer-D6A30AJ9.css +1 -0
- package/packages/web/dist/assets/CodeViewer-xHS3Xah9.js +5 -0
- package/packages/web/dist/assets/ConfigWithCustom-C74DTXuy.css +1 -0
- package/packages/web/dist/assets/ConfigWithCustom-DreTUdf0.js +3 -0
- package/packages/web/dist/assets/ConfirmDialog-DjQUzNqk.js +2 -0
- package/packages/web/dist/assets/ConfirmDialog-oABDbIMz.css +1 -0
- package/packages/web/dist/assets/ConnectPage-CfRDrXvJ.js +2 -0
- package/packages/web/dist/assets/ConnectPage-Zz1nFbcn.css +1 -0
- package/packages/web/dist/assets/ContextItemPage-B6rJG3OT.js +2 -0
- package/packages/web/dist/assets/ContextItemPage-BRsWxOmu.css +1 -0
- package/packages/web/dist/assets/ContextPage-CloIZ_2y.js +2 -0
- package/packages/web/dist/assets/ContextPage-rYKxjiVI.css +1 -0
- package/packages/web/dist/assets/ContextRow-Byz_7HG-.css +1 -0
- package/packages/web/dist/assets/ContextRow-Dvv8CTFk.js +2 -0
- package/packages/web/dist/assets/DataPage-CLgJtQwS.css +1 -0
- package/packages/web/dist/assets/DataPage-wSIoGcb5.js +2 -0
- package/packages/web/dist/assets/DataTypePage-Ba_zBV4b.js +4 -0
- package/packages/web/dist/assets/DataTypePage-Cr238Hx_.css +1 -0
- package/packages/web/dist/assets/DesignPage-BFC4A-wO.css +1 -0
- package/packages/web/dist/assets/DesignPage-DidMUX8m.js +49 -0
- package/packages/web/dist/assets/ExplorePage-DJmOOIhs.css +1 -0
- package/packages/web/dist/assets/ExplorePage-MUyVydVB.js +2 -0
- package/packages/web/dist/assets/FactList-CeAbKajD.js +2 -0
- package/packages/web/dist/assets/FactList-DuDPr7n7.css +1 -0
- package/packages/web/dist/assets/FnList-BCnb4kOB.css +1 -0
- package/packages/web/dist/assets/FnList-CjQRwYaT.js +2 -0
- package/packages/web/dist/assets/FnPill-BNIWrqXN.css +1 -0
- package/packages/web/dist/assets/FnPill-BshAvm2I.js +2 -0
- package/packages/web/dist/assets/FnView-B8MGAOoB.js +2 -0
- package/packages/web/dist/assets/FnView-BBFbPAQz.css +1 -0
- package/packages/web/dist/assets/FnsView-CeqIoaBT.js +2 -0
- package/packages/web/dist/assets/FnsView-D575syq-.css +1 -0
- package/packages/web/dist/assets/GinExprView-DYVUwZrd.js +4 -0
- package/packages/web/dist/assets/GinExprView-dqtf5BKF.css +1 -0
- package/packages/web/dist/assets/GinForm-CVEsGoBo.css +1 -0
- package/packages/web/dist/assets/GinForm-D3mwMRTQ.js +2 -0
- package/packages/web/dist/assets/GinTypeView-B5CGqWvh.css +1 -0
- package/packages/web/dist/assets/GinTypeView-C0YifSmE.js +2 -0
- package/packages/web/dist/assets/GinValueView-HfEPq9le.js +4 -0
- package/packages/web/dist/assets/GinValueView-zhWn-X48.css +1 -0
- package/packages/web/dist/assets/GraphPage-ySnuA4Hp.js +2 -0
- package/packages/web/dist/assets/GraphPanel-B9jxpJfb.css +1 -0
- package/packages/web/dist/assets/GraphPanel-Cy5-KGo1.js +2 -0
- package/packages/web/dist/assets/HubPicker-C_vA752L.js +2 -0
- package/packages/web/dist/assets/InboxApprovals-DcPCCmZ5.js +2 -0
- package/packages/web/dist/assets/InboxApprovals-DmC94LNf.css +1 -0
- package/packages/web/dist/assets/InboxPage-C2DT2nuF.js +2 -0
- package/packages/web/dist/assets/InjectedList-BgxdlaHJ.css +1 -0
- package/packages/web/dist/assets/InjectedList-CJsEFEbz.js +2 -0
- package/packages/web/dist/assets/InstallDialog-C9GDoUI2.js +2 -0
- package/packages/web/dist/assets/InstallDialog-yWLZK_zN.css +1 -0
- package/packages/web/dist/assets/InstanceTypes-D8Jcxn70.js +2 -0
- package/packages/web/dist/assets/InstanceTypes-DAowwLB7.css +1 -0
- package/packages/web/dist/assets/InstanceView-CuBD3JPU.css +1 -0
- package/packages/web/dist/assets/InstanceView-p7tMaylE.js +2 -0
- package/packages/web/dist/assets/ItemHistory-CUGa8b6s.js +2 -0
- package/packages/web/dist/assets/ItemHistory-Czzpyiud.css +1 -0
- package/packages/web/dist/assets/LimitsView-DlPW-cLw.css +1 -0
- package/packages/web/dist/assets/LimitsView-DsZG6u5P.js +2 -0
- package/packages/web/dist/assets/ListSearch-BK4p7Nxa.js +2 -0
- package/packages/web/dist/assets/ListSearch-CdxSo6UW.css +1 -0
- package/packages/web/dist/assets/LlmCallDetails-2yQftCqd.js +2 -0
- package/packages/web/dist/assets/LlmCallDetails-gymdroc_.css +1 -0
- package/packages/web/dist/assets/LlmCallsView-B1yHEIBG.css +1 -0
- package/packages/web/dist/assets/LlmCallsView-DOHX3r0K.js +2 -0
- package/packages/web/dist/assets/LoadState-C4VYnFly.css +1 -0
- package/packages/web/dist/assets/LoadState-DeXfLvYv.js +2 -0
- package/packages/web/dist/assets/McpDialog-BSCt_jWB.css +1 -0
- package/packages/web/dist/assets/McpDialog-CA_0WKWF.js +2 -0
- package/packages/web/dist/assets/McpServerForm-CAG8Wp2N.js +2 -0
- package/packages/web/dist/assets/McpServerForm-DsHaf5Um.css +1 -0
- package/packages/web/dist/assets/McpServerView-7I76EznB.css +1 -0
- package/packages/web/dist/assets/McpServerView-CD8qw6W_.js +2 -0
- package/packages/web/dist/assets/McpServersView-DNycG35u.js +2 -0
- package/packages/web/dist/assets/McpView-CC2oNOMa.js +2 -0
- package/packages/web/dist/assets/McpView-W5PhGI4_.css +1 -0
- package/packages/web/dist/assets/McpsView-CwJvyyxV.js +2 -0
- package/packages/web/dist/assets/McpsView-yH-K4ifd.css +1 -0
- package/packages/web/dist/assets/MemoryDialog-CpfIsygL.css +1 -0
- package/packages/web/dist/assets/MemoryDialog-Dbvh5uLq.js +2 -0
- package/packages/web/dist/assets/ModelCallsView-B__CIDge.css +1 -0
- package/packages/web/dist/assets/ModelCallsView-RvnW3EBP.js +2 -0
- package/packages/web/dist/assets/ModelPicker-5BC8W10p.css +1 -0
- package/packages/web/dist/assets/ModelPicker-DcjwQFHC.js +2 -0
- package/packages/web/dist/assets/ModelsView-C_iN19xt.js +2 -0
- package/packages/web/dist/assets/ModelsView-DjD8H9vc.css +1 -0
- package/packages/web/dist/assets/NotFoundPage-CeSwzTV-.js +2 -0
- package/packages/web/dist/assets/NotFoundPage-ZUNomG9O.css +1 -0
- package/packages/web/dist/assets/PairPage-Bs2KuRjC.css +1 -0
- package/packages/web/dist/assets/PairPage-TEXPpsqi.js +2 -0
- package/packages/web/dist/assets/PanelHost-BkrFAnPa.js +2 -0
- package/packages/web/dist/assets/PanelHost-_z5RyAnS.css +1 -0
- package/packages/web/dist/assets/PeopleView-CJ8yArTh.css +1 -0
- package/packages/web/dist/assets/PeopleView-D1QGPYp7.js +2 -0
- package/packages/web/dist/assets/PoliciesView-BU1fudNF.js +2 -0
- package/packages/web/dist/assets/PoliciesView-yVE8d8mj.css +1 -0
- package/packages/web/dist/assets/RefusalList-B3OBAsYc.css +1 -0
- package/packages/web/dist/assets/RefusalList-DQoyUoPG.js +2 -0
- package/packages/web/dist/assets/RemoteAuthFields-Dm44vz2t.css +1 -0
- package/packages/web/dist/assets/RemoteAuthFields-nxGWfmhf.js +2 -0
- package/packages/web/dist/assets/ResourceViewer-A9ZSaLUH.css +1 -0
- package/packages/web/dist/assets/ResourceViewer-Po24y4pj.js +2 -0
- package/packages/web/dist/assets/ResourcesPage-YluNBqIv.js +2 -0
- package/packages/web/dist/assets/ResourcesPage-mr0U0l6U.css +1 -0
- package/packages/web/dist/assets/ResultGrid-CuUQyTjW.css +1 -0
- package/packages/web/dist/assets/ResultGrid-uoq4yUYj.js +2 -0
- package/packages/web/dist/assets/ReviewSummaryStrip-B3ZQs5wR.css +1 -0
- package/packages/web/dist/assets/ReviewSummaryStrip-k3HevESg.js +2 -0
- package/packages/web/dist/assets/ReviewView-79Z5rU1v.js +3 -0
- package/packages/web/dist/assets/ReviewView-CxbVjz_R.css +1 -0
- package/packages/web/dist/assets/RuleRow-CG_XCvUu.css +1 -0
- package/packages/web/dist/assets/RuleRow-CoXDA-SH.js +2 -0
- package/packages/web/dist/assets/RunCard-CBSGdwdQ.js +2 -0
- package/packages/web/dist/assets/RunCard-CfyRaDLS.css +1 -0
- package/packages/web/dist/assets/RunDetails-CGhQQ6OI.js +2 -0
- package/packages/web/dist/assets/RunDetails-CHHCWGrP.css +1 -0
- package/packages/web/dist/assets/RunDot-Ch_45985.js +2 -0
- package/packages/web/dist/assets/RunDot-CkNUsFwg.css +1 -0
- package/packages/web/dist/assets/RunPage-C_t20pB7.js +2 -0
- package/packages/web/dist/assets/RunPage-Cq6UV6h-.css +1 -0
- package/packages/web/dist/assets/RunProgress-Bq2yc7Il.css +1 -0
- package/packages/web/dist/assets/RunProgress-VrZUHUEC.js +2 -0
- package/packages/web/dist/assets/RunsView-Dz9Xsvu5.js +2 -0
- package/packages/web/dist/assets/RunsView-fBMrETRF.css +1 -0
- package/packages/web/dist/assets/ServiceRows-6BU4-MeL.css +1 -0
- package/packages/web/dist/assets/ServiceRows-DNzDiutg.js +2 -0
- package/packages/web/dist/assets/SettingsPage-CykfuYj1.js +3 -0
- package/packages/web/dist/assets/SettingsPage-t03BqXw8.css +1 -0
- package/packages/web/dist/assets/SignInPage-Djx-M-0U.css +1 -0
- package/packages/web/dist/assets/SignInPage-DrXZ1sG2.js +2 -0
- package/packages/web/dist/assets/StatusBadge-Dpb9uG5e.js +2 -0
- package/packages/web/dist/assets/SystemConfig-72qKRkUk.js +2 -0
- package/packages/web/dist/assets/SystemConfig-CDtMyVWy.css +1 -0
- package/packages/web/dist/assets/SystemPageHost-BeZ-6N0-.css +1 -0
- package/packages/web/dist/assets/SystemPageHost-DLNg2FYK.js +2 -0
- package/packages/web/dist/assets/SystemView-C8ScHUe2.css +1 -0
- package/packages/web/dist/assets/SystemView-Es5wtkYU.js +2 -0
- package/packages/web/dist/assets/SystemsView-B6HEL9VS.css +1 -0
- package/packages/web/dist/assets/SystemsView-CeuSFhlF.js +2 -0
- package/packages/web/dist/assets/TableViewer-1Jf5BNat.css +1 -0
- package/packages/web/dist/assets/TableViewer-BQ7bYLOP.js +6 -0
- package/packages/web/dist/assets/ThemePicker-C2nJ21Vd.js +2 -0
- package/packages/web/dist/assets/TurnTree-CORdfTHj.js +2 -0
- package/packages/web/dist/assets/TurnTree-CPivE4sF.css +1 -0
- package/packages/web/dist/assets/UserMessage-BtECa8ka.css +1 -0
- package/packages/web/dist/assets/UserMessage-qyc8dG5D.js +9 -0
- package/packages/web/dist/assets/ValueVisual-D5Rw7PlS.css +1 -0
- package/packages/web/dist/assets/ValueVisual-aXEUaQ5Y.js +2 -0
- package/packages/web/dist/assets/WidgetView-BZyDyYRI.js +3 -0
- package/packages/web/dist/assets/WidgetView-DQUDeFkB.css +1 -0
- package/packages/web/dist/assets/_plugin-vue_export-helper-BDNMzG2s.js +1 -0
- package/packages/web/dist/assets/abap-CLvhMVsD.js +2 -0
- package/packages/web/dist/assets/abnfDiagram-S7VZAUFO-CzFPJy4G.js +2 -0
- package/packages/web/dist/assets/actionscript-3-Cs6JJXT5.js +2 -0
- package/packages/web/dist/assets/ada-X3Y2mlq2.js +2 -0
- package/packages/web/dist/assets/ahk-DwADkxyd.js +2 -0
- package/packages/web/dist/assets/ahk2-_6rzW9BS.js +2 -0
- package/packages/web/dist/assets/angular-html-wiqevbIE.js +2 -0
- package/packages/web/dist/assets/angular-ts-C32iChAu.js +2 -0
- package/packages/web/dist/assets/apache-U0d_L8uA.js +2 -0
- package/packages/web/dist/assets/apex-KFGFyKwG.js +2 -0
- package/packages/web/dist/assets/apl-Bl61Unn0.js +2 -0
- package/packages/web/dist/assets/applescript-CCn79oCD.js +2 -0
- package/packages/web/dist/assets/ara-4CJ0cIlV.js +2 -0
- package/packages/web/dist/assets/architecture-WOLXFQ4H-_l4nRfFJ.js +1 -0
- package/packages/web/dist/assets/architectureDiagram-YGSQEFNW-CMpVysh5.js +37 -0
- package/packages/web/dist/assets/asciidoc-SCjQUq34.js +2 -0
- package/packages/web/dist/assets/asm-Cmm7eHzH.js +2 -0
- package/packages/web/dist/assets/astro-CojMNcHO.js +2 -0
- package/packages/web/dist/assets/awk-BWXHIvNe.js +2 -0
- package/packages/web/dist/assets/ballerina-B7ZEbQpA.js +2 -0
- package/packages/web/dist/assets/bat-qdxAdBWQ.js +2 -0
- package/packages/web/dist/assets/beancount-C2IN4Vk8.js +2 -0
- package/packages/web/dist/assets/berry-DKpUyyne.js +2 -0
- package/packages/web/dist/assets/bibtex-Ci_nEsc7.js +2 -0
- package/packages/web/dist/assets/bicep-CUHmPFLl.js +2 -0
- package/packages/web/dist/assets/bird2-CYIUgYqB.js +2 -0
- package/packages/web/dist/assets/blade-CRk3fo4p.js +2 -0
- package/packages/web/dist/assets/blockDiagram-APKKGZFW-Jua4t10S.js +141 -0
- package/packages/web/dist/assets/bpmnIcons-APHXDYXF-C0jbCElo.js +2 -0
- package/packages/web/dist/assets/browser-BHOqNy7R.js +9 -0
- package/packages/web/dist/assets/browsers-BSc3bW3l.js +2 -0
- package/packages/web/dist/assets/bsl-_VjlB9mv.js +2 -0
- package/packages/web/dist/assets/c-CiNtTPN_.js +2 -0
- package/packages/web/dist/assets/c3-D0apG41V.js +2 -0
- package/packages/web/dist/assets/c4Diagram-KJ2TOQU5-08x9w6G9.js +39 -0
- package/packages/web/dist/assets/cadence-CQ2zXKGN.js +2 -0
- package/packages/web/dist/assets/cairo-DLTphjLi.js +2 -0
- package/packages/web/dist/assets/chapel-D5ik6Ccv.js +2 -0
- package/packages/web/dist/assets/chunk-2Q5K7J3B-C1jixKkw.js +2 -0
- package/packages/web/dist/assets/chunk-5VM5RSS4-ZNzvKenW.js +16 -0
- package/packages/web/dist/assets/chunk-6MUBBAK2-BHXbrulB.js +3 -0
- package/packages/web/dist/assets/chunk-AXFCVDMN-CI0arS1F.js +63 -0
- package/packages/web/dist/assets/chunk-BG4553SI-DGn4S0JL.js +130 -0
- package/packages/web/dist/assets/chunk-DQASFODM-ClbbgMVy.js +11 -0
- package/packages/web/dist/assets/chunk-DUW6YSOI-Dgx8z5s3.js +2 -0
- package/packages/web/dist/assets/chunk-HFQBQIA3-BNltuj9p.js +2 -0
- package/packages/web/dist/assets/chunk-J5ZVWO5B-oDCd-gWO.js +2 -0
- package/packages/web/dist/assets/chunk-JWPE2WC7-DVXcaiue.js +2 -0
- package/packages/web/dist/assets/chunk-KQLB2F66-DsHe5EtY.js +3 -0
- package/packages/web/dist/assets/chunk-KS47KZWR-BZg3mYeD.js +2 -0
- package/packages/web/dist/assets/chunk-LEVMRMFU-paszafIt.js +2 -0
- package/packages/web/dist/assets/chunk-M57EVK23-qYz6TUV4.js +2 -0
- package/packages/web/dist/assets/chunk-NGNAAXSQ-DI_UYJZ4.js +137 -0
- package/packages/web/dist/assets/chunk-OY52VR5R-Ct_YDCfL.js +89 -0
- package/packages/web/dist/assets/chunk-QB3YPZ4I-i7-AWGNa.js +214 -0
- package/packages/web/dist/assets/chunk-R3KSYZAL-DW0WB_9q.js +2 -0
- package/packages/web/dist/assets/chunk-STOXU5M4-D5Gd-wq9.js +73 -0
- package/packages/web/dist/assets/chunk-TU62E6Q5-WtwDME_1.js +2 -0
- package/packages/web/dist/assets/chunk-X4PVCEUW-YYhMSieL.js +2 -0
- package/packages/web/dist/assets/chunk-XXDRQBXY-i7MKP1NY.js +2 -0
- package/packages/web/dist/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +2 -0
- package/packages/web/dist/assets/clarity-CtfBBspg.js +2 -0
- package/packages/web/dist/assets/classDiagram-v2-L25IHNXF-d25-M1pJ.js +218 -0
- package/packages/web/dist/assets/clojure-DqKBuwfJ.js +2 -0
- package/packages/web/dist/assets/cmake-Bj61d0ZC.js +2 -0
- package/packages/web/dist/assets/cobol-BRB8FTbz.js +2 -0
- package/packages/web/dist/assets/codeowners-C8r90Shi.js +2 -0
- package/packages/web/dist/assets/codeql-oeQT6MSM.js +2 -0
- package/packages/web/dist/assets/coffee-B1WQFatZ.js +2 -0
- package/packages/web/dist/assets/common-lisp-Cv5bFMCO.js +2 -0
- package/packages/web/dist/assets/coq-CGaSfhwR.js +2 -0
- package/packages/web/dist/assets/core-DdF778CY.js +13 -0
- package/packages/web/dist/assets/cose-bilkent-JH36ORCC-CYLhHv3W.js +2 -0
- package/packages/web/dist/assets/cpp-CxyntmKf.js +2 -0
- package/packages/web/dist/assets/crystal-CayBj_Aw.js +2 -0
- package/packages/web/dist/assets/csharp-dmMxLVLW.js +2 -0
- package/packages/web/dist/assets/css-CB_fh0k2.js +2 -0
- package/packages/web/dist/assets/csv-Dx-8-gkx.js +2 -0
- package/packages/web/dist/assets/cue-CE9AQfxI.js +2 -0
- package/packages/web/dist/assets/cynefin-EF2NZ3EQ-BOE_VX_3.js +1 -0
- package/packages/web/dist/assets/cynefinDiagram-L36ESFBY-cDLwrPve.js +63 -0
- package/packages/web/dist/assets/cypher-ClKdZ_lG.js +2 -0
- package/packages/web/dist/assets/cytoscape.esm-DpfQbjy7.js +322 -0
- package/packages/web/dist/assets/d-qD-0Kul2.js +2 -0
- package/packages/web/dist/assets/d3-scale-CElPUUud.js +2 -0
- package/packages/web/dist/assets/d3-selection-COWvaQNI.js +2 -0
- package/packages/web/dist/assets/dagre-SPEB5RXH-ChUYszsQ.js +5 -0
- package/packages/web/dist/assets/dart-CHZY9Xhz.js +2 -0
- package/packages/web/dist/assets/dax-BkyTk9wS.js +2 -0
- package/packages/web/dist/assets/desktop-Dlh5hvp9.js +2 -0
- package/packages/web/dist/assets/diagram-3B7GL73J-C4RMi43c.js +201 -0
- package/packages/web/dist/assets/diagram-DNEMPZML-COQGGiEP.js +25 -0
- package/packages/web/dist/assets/diagram-L3MUGCDN-mowv9Itp.js +42 -0
- package/packages/web/dist/assets/diagram-LA4NIPWU-hNJQSGhv.js +25 -0
- package/packages/web/dist/assets/diagram-MHCOC4E2-Dp-COOAx.js +4 -0
- package/packages/web/dist/assets/diagram-XPFHEONP-D2wzCykS.js +31 -0
- package/packages/web/dist/assets/diff-woXpYk--.js +2 -0
- package/packages/web/dist/assets/dist-DdXDFcej.js +2 -0
- package/packages/web/dist/assets/docker-IyjqRm3v.js +2 -0
- package/packages/web/dist/assets/dotenv-CuH5my32.js +2 -0
- package/packages/web/dist/assets/dream-maker-DW3nJb8Q.js +2 -0
- package/packages/web/dist/assets/ebnfDiagram-UZSYDL2S-5WCudwet.js +2 -0
- package/packages/web/dist/assets/edge-6p6a27tD.js +2 -0
- package/packages/web/dist/assets/elixir-fXwtrlGU.js +2 -0
- package/packages/web/dist/assets/elk-XV6XMXQE-BknTcAbm.js +28 -0
- package/packages/web/dist/assets/elm-rUi9A3mh.js +2 -0
- package/packages/web/dist/assets/emacs-lisp-DR2vtWaj.js +2 -0
- package/packages/web/dist/assets/engine-javascript-C30F4iNc.js +142 -0
- package/packages/web/dist/assets/erDiagram-EYBAPDEH-UOE6iZ1t.js +100 -0
- package/packages/web/dist/assets/erb-BvmuIdN-.js +2 -0
- package/packages/web/dist/assets/erlang-Cphh6RMH.js +2 -0
- package/packages/web/dist/assets/eventmodeling-K75KTNOO-CIs2h_8S.js +1 -0
- package/packages/web/dist/assets/export-BwFkEtcm.js +15 -0
- package/packages/web/dist/assets/fennel-DQxkIbk2.js +2 -0
- package/packages/web/dist/assets/fish-BJitypiv.js +2 -0
- package/packages/web/dist/assets/flowDiagram-MALGAFMO-CQLEuZ0I.js +1 -0
- package/packages/web/dist/assets/fluent-C03EYrpw.js +2 -0
- package/packages/web/dist/assets/fn-modal-DqcxUhOQ.js +2 -0
- package/packages/web/dist/assets/fn-notices-BYaH6IoA.js +2 -0
- package/packages/web/dist/assets/fn-notices-Da4tVHqJ.css +1 -0
- package/packages/web/dist/assets/formats-DI__ADVG.js +2 -0
- package/packages/web/dist/assets/fortran-fixed-form-DEKoE2YW.js +2 -0
- package/packages/web/dist/assets/fortran-free-form-CYNrtFtB.js +2 -0
- package/packages/web/dist/assets/fsharp-D13ZGOAj.js +2 -0
- package/packages/web/dist/assets/ganttDiagram-23REXITY-KBK93CXW.js +293 -0
- package/packages/web/dist/assets/gdresource-xMC7jr7x.js +2 -0
- package/packages/web/dist/assets/gdscript-DYvRD3hg.js +2 -0
- package/packages/web/dist/assets/gdshader-CBce3t8t.js +2 -0
- package/packages/web/dist/assets/genie-CV2tkWYe.js +2 -0
- package/packages/web/dist/assets/gherkin-DExj1W_8.js +2 -0
- package/packages/web/dist/assets/git-commit-BSykSTBG.js +2 -0
- package/packages/web/dist/assets/git-rebase-B09wAERM.js +2 -0
- package/packages/web/dist/assets/gitGraph-VSP46ZUC-Dwmw1QLM.js +1 -0
- package/packages/web/dist/assets/gitGraphDiagram-STJD7YCW-B2T13-ZJ.js +107 -0
- package/packages/web/dist/assets/gleam-CSRkHgEL.js +2 -0
- package/packages/web/dist/assets/glimmer-js-CpWvy9gf.js +2 -0
- package/packages/web/dist/assets/glimmer-ts-BAH8Czr9.js +2 -0
- package/packages/web/dist/assets/glsl-CVY0WJyt.js +2 -0
- package/packages/web/dist/assets/gn-CAXYAgV-.js +2 -0
- package/packages/web/dist/assets/gnuplot-7GGW24-e.js +2 -0
- package/packages/web/dist/assets/go-rLFTqkRN.js +2 -0
- package/packages/web/dist/assets/graphlib-DS17s2tU.js +2 -0
- package/packages/web/dist/assets/graphql-CDPCtuoQ.js +2 -0
- package/packages/web/dist/assets/groovy-CacY0gHj.js +2 -0
- package/packages/web/dist/assets/hack-CLEpeEqq.js +2 -0
- package/packages/web/dist/assets/haml-Bvpgs3uG.js +2 -0
- package/packages/web/dist/assets/handlebars-vXY9zmj1.js +2 -0
- package/packages/web/dist/assets/haskell-D8IpX4py.js +2 -0
- package/packages/web/dist/assets/haxe-C8oCnwJJ.js +2 -0
- package/packages/web/dist/assets/hcl-Dh228itO.js +2 -0
- package/packages/web/dist/assets/hjson-CxZEssPk.js +2 -0
- package/packages/web/dist/assets/hlsl-Cvrh5tZx.js +2 -0
- package/packages/web/dist/assets/html-CKMeXkCW.js +2 -0
- package/packages/web/dist/assets/html-derivative-C8trdkzI.js +2 -0
- package/packages/web/dist/assets/http-UJwVfHv3.js +2 -0
- package/packages/web/dist/assets/hurl-7erhC4fM.js +2 -0
- package/packages/web/dist/assets/hxml-Dcm88srW.js +2 -0
- package/packages/web/dist/assets/hy-CZbG8q4J.js +2 -0
- package/packages/web/dist/assets/imba-DsUTQ-LC.js +2 -0
- package/packages/web/dist/assets/index-Bv42jNvr.js +4 -0
- package/packages/web/dist/assets/index-CSisx5mi.css +1 -0
- package/packages/web/dist/assets/info-OHQRW6UA-Ob4q-Ec6.js +1 -0
- package/packages/web/dist/assets/infoDiagram-KBXO4MBG-CGQ6MwL3.js +3 -0
- package/packages/web/dist/assets/ini-B5eOa1yu.js +2 -0
- package/packages/web/dist/assets/ishikawaDiagram-M35NCXHK-CuoxiCk-.js +71 -0
- package/packages/web/dist/assets/java-DGv6_9mf.js +2 -0
- package/packages/web/dist/assets/javascript-wyDA4Fnk.js +2 -0
- package/packages/web/dist/assets/jinja-CRKn4_DT.js +2 -0
- package/packages/web/dist/assets/jison-C5fjf-e-.js +2 -0
- package/packages/web/dist/assets/journeyDiagram-OPLOXDXO-zEDEMkq6.js +140 -0
- package/packages/web/dist/assets/json-B_qwZ7m_.js +2 -0
- package/packages/web/dist/assets/json5-BR5RXkoi.js +2 -0
- package/packages/web/dist/assets/jsonc-CYpm1nAK.js +2 -0
- package/packages/web/dist/assets/jsonl-CmCQp5Yx.js +2 -0
- package/packages/web/dist/assets/jsonnet-CJTPZ8u_.js +2 -0
- package/packages/web/dist/assets/jssm-DXw9l8Rf.js +2 -0
- package/packages/web/dist/assets/jsx-Ba8EQqYd.js +2 -0
- package/packages/web/dist/assets/julia-mJS6zhvp.js +2 -0
- package/packages/web/dist/assets/just-n_L73pBN.js +2 -0
- package/packages/web/dist/assets/kanban-definition-BZKZHSQY-q5yqVxKo.js +90 -0
- package/packages/web/dist/assets/katex-MEuSR36T.js +258 -0
- package/packages/web/dist/assets/kdl-CsD5j6eV.js +2 -0
- package/packages/web/dist/assets/kotlin-DhhofPvG.js +2 -0
- package/packages/web/dist/assets/kusto-C7mF5XQf.js +2 -0
- package/packages/web/dist/assets/labels-BhJpmLWA.js +2 -0
- package/packages/web/dist/assets/langs-CVIiVMBh.js +3 -0
- package/packages/web/dist/assets/latex-0iQGLWul.js +2 -0
- package/packages/web/dist/assets/layout-DQKldU13.js +2 -0
- package/packages/web/dist/assets/lean-CewbzKMR.js +2 -0
- package/packages/web/dist/assets/less-DVTAwKKz.js +2 -0
- package/packages/web/dist/assets/liquid-B8kEVR50.js +2 -0
- package/packages/web/dist/assets/live-kTMxmy8I.js +2 -0
- package/packages/web/dist/assets/llvm-DqHOMS-s.js +2 -0
- package/packages/web/dist/assets/log-BNLmms1o.js +2 -0
- package/packages/web/dist/assets/logo-Cluzi2Zq.js +2 -0
- package/packages/web/dist/assets/lua-BDnDZ8k4.js +2 -0
- package/packages/web/dist/assets/luau-VGWVLoqX.js +2 -0
- package/packages/web/dist/assets/made-DYU0Ohi4.js +2 -0
- package/packages/web/dist/assets/make-Dixweg8N.js +2 -0
- package/packages/web/dist/assets/markdown-BYOwaDjH.js +2 -0
- package/packages/web/dist/assets/marko-Bk0_iGvT.js +2 -0
- package/packages/web/dist/assets/matlab-D7qyCx1q.js +2 -0
- package/packages/web/dist/assets/mdc-DhizV3YK.js +2 -0
- package/packages/web/dist/assets/mdx-DQZ5AkYe.js +2 -0
- package/packages/web/dist/assets/mermaid-BxpfTIzt.js +2 -0
- package/packages/web/dist/assets/mermaid-parser.core-BGN5zmcs.js +8 -0
- package/packages/web/dist/assets/mermaid.core-BNF3dRf5.js +45 -0
- package/packages/web/dist/assets/metrics-Cio5ykX6.js +2 -0
- package/packages/web/dist/assets/mindmap-definition-I2QAS2VK-CoiSJ4W4.js +99 -0
- package/packages/web/dist/assets/mipsasm-BMqwQI7S.js +2 -0
- package/packages/web/dist/assets/mojo-fg40_ntQ.js +2 -0
- package/packages/web/dist/assets/moonbit-D9W784E_.js +2 -0
- package/packages/web/dist/assets/move-BYnGhZoM.js +2 -0
- package/packages/web/dist/assets/narrat-_X_XdTYD.js +2 -0
- package/packages/web/dist/assets/nextflow-CSgcYZcx.js +2 -0
- package/packages/web/dist/assets/nextflow-groovy-D7IRt6Pp.js +2 -0
- package/packages/web/dist/assets/nginx-DoalMtUh.js +2 -0
- package/packages/web/dist/assets/nim-DdsQnl3h.js +2 -0
- package/packages/web/dist/assets/nix-IvuFDN5E.js +2 -0
- package/packages/web/dist/assets/now-40JhSjx0.js +2 -0
- package/packages/web/dist/assets/nsis-CjNLYCLg.js +2 -0
- package/packages/web/dist/assets/nushell--0fT3PI1.js +2 -0
- package/packages/web/dist/assets/objective-c-D1A_Heim.js +2 -0
- package/packages/web/dist/assets/objective-cpp-BsSzOQcm.js +2 -0
- package/packages/web/dist/assets/ocaml-O90oeIOV.js +2 -0
- package/packages/web/dist/assets/odin-B1RWQWA5.js +2 -0
- package/packages/web/dist/assets/openscad-BUDT5pXO.js +2 -0
- package/packages/web/dist/assets/org-B2d-Pz26.js +2 -0
- package/packages/web/dist/assets/packet-JDAUHWVQ-kID5-AEG.js +1 -0
- package/packages/web/dist/assets/pascal-4ZHwLPI5.js +2 -0
- package/packages/web/dist/assets/pdf-YwugTw7Y.js +55 -0
- package/packages/web/dist/assets/pdf.worker.min-CIqJB0yW.mjs +28 -0
- package/packages/web/dist/assets/pdf.worker.min-UqOn5EDC.js +2 -0
- package/packages/web/dist/assets/pegDiagram-FD4XPPHP-DvO7r8qd.js +2 -0
- package/packages/web/dist/assets/perl-CpJxFnsT.js +2 -0
- package/packages/web/dist/assets/php-CG5ES-ob.js +2 -0
- package/packages/web/dist/assets/pie-XZMESJXO-By0gro0O.js +1 -0
- package/packages/web/dist/assets/pieDiagram-J4AKIIQI-f_Jeo_8D.js +40 -0
- package/packages/web/dist/assets/pkl-ot-7Btpt.js +2 -0
- package/packages/web/dist/assets/plsql-DGHpHOYJ.js +2 -0
- package/packages/web/dist/assets/po-BiJDBrnU.js +2 -0
- package/packages/web/dist/assets/polar-C7UOKdEL.js +2 -0
- package/packages/web/dist/assets/postcss-BXeXVLqQ.js +2 -0
- package/packages/web/dist/assets/powerquery-DNMTfnFr.js +2 -0
- package/packages/web/dist/assets/powershell-QtSnmXcu.js +2 -0
- package/packages/web/dist/assets/preload-helper-7y9sWmk5.js +1 -0
- package/packages/web/dist/assets/prisma-DMgNhnYS.js +2 -0
- package/packages/web/dist/assets/problems-BZY0Dwif.js +2 -0
- package/packages/web/dist/assets/prolog-iXnhIJG7.js +2 -0
- package/packages/web/dist/assets/proto-DB4EqR-F.js +2 -0
- package/packages/web/dist/assets/pug-b31sGWmp.js +2 -0
- package/packages/web/dist/assets/puppet-CDv2pdJW.js +2 -0
- package/packages/web/dist/assets/purescript-9MfHhQsQ.js +2 -0
- package/packages/web/dist/assets/push-payload-D5efGCzd.js +402 -0
- package/packages/web/dist/assets/python-gzcpVVnB.js +2 -0
- package/packages/web/dist/assets/qml-Dd7VLkrA.js +2 -0
- package/packages/web/dist/assets/qmldir-DCQb3MpD.js +2 -0
- package/packages/web/dist/assets/qss-Fe1Jh2GI.js +2 -0
- package/packages/web/dist/assets/quadrantDiagram-XTYBLID2-Cr6SWkGn.js +8 -0
- package/packages/web/dist/assets/r-yyMNTq5r.js +2 -0
- package/packages/web/dist/assets/racket-DcIDlBhZ.js +2 -0
- package/packages/web/dist/assets/radar-ABXABTNO-yHosJs_M.js +1 -0
- package/packages/web/dist/assets/railroad-I3PHUGI6-C-LR5A-v.js +1 -0
- package/packages/web/dist/assets/railroad-abnf-LNEFI6M7-DjGnF9uf.js +1 -0
- package/packages/web/dist/assets/railroad-ebnf-DWYD2UWJ-BgsDVMJk.js +1 -0
- package/packages/web/dist/assets/railroad-peg-JR7BVNR7-DkSNpypW.js +1 -0
- package/packages/web/dist/assets/railroadDiagram-MRQ6NCDL-BdGdKtFJ.js +2 -0
- package/packages/web/dist/assets/raku-B3gFvitq.js +2 -0
- package/packages/web/dist/assets/razor-B0rzWF9b.js +2 -0
- package/packages/web/dist/assets/rbs-C0MpOrj4.js +2 -0
- package/packages/web/dist/assets/record-edits-CveFEsal.js +2 -0
- package/packages/web/dist/assets/reg-CRGYupPL.js +2 -0
- package/packages/web/dist/assets/regexp-DYMieNym.js +2 -0
- package/packages/web/dist/assets/rel-BtDbiS_P.js +2 -0
- package/packages/web/dist/assets/remote-config-BkaarDf3.js +2 -0
- package/packages/web/dist/assets/requirementDiagram-Y7LWUY3S-ImkACz5a.js +85 -0
- package/packages/web/dist/assets/review-CGUGvRV9.js +4 -0
- package/packages/web/dist/assets/riscv-Ckw8ddFX.js +2 -0
- package/packages/web/dist/assets/rolldown-runtime-COiEfhsA.js +1 -0
- package/packages/web/dist/assets/ron-VUp2lXgN.js +2 -0
- package/packages/web/dist/assets/rosmsg-CAekHB0j.js +2 -0
- package/packages/web/dist/assets/rough.esm-Dy-Kn_BL.js +2 -0
- package/packages/web/dist/assets/routes-qP_j74V5.js +4 -0
- package/packages/web/dist/assets/rst-BtnuOAUZ.js +2 -0
- package/packages/web/dist/assets/ruby-Dx9fBFuB.js +2 -0
- package/packages/web/dist/assets/runs-k76usGfd.js +2 -0
- package/packages/web/dist/assets/runtime-core.esm-bundler-wlpNGAAZ.js +4 -0
- package/packages/web/dist/assets/rust-DpiIf5JO.js +2 -0
- package/packages/web/dist/assets/sankeyDiagram-WGJFYUXA-Crpx7BLQ.js +41 -0
- package/packages/web/dist/assets/sas-CYVU3X7O.js +2 -0
- package/packages/web/dist/assets/sass-DXrisJhu.js +2 -0
- package/packages/web/dist/assets/scala-BiFt_7mu.js +2 -0
- package/packages/web/dist/assets/scheme-DQCgrYNe.js +2 -0
- package/packages/web/dist/assets/scss-BAOTDanj.js +2 -0
- package/packages/web/dist/assets/sdbl-bTVj8UrX.js +2 -0
- package/packages/web/dist/assets/sequenceDiagram-5NDRBG5M-Ch5L-aWg.js +170 -0
- package/packages/web/dist/assets/shaderlab-TOUzSsQk.js +2 -0
- package/packages/web/dist/assets/shared-DTpYDMc_.js +2 -0
- package/packages/web/dist/assets/shellscript-DUxm18QR.js +2 -0
- package/packages/web/dist/assets/shellsession-DphNsVk1.js +2 -0
- package/packages/web/dist/assets/size-BwnshyOe.js +2 -0
- package/packages/web/dist/assets/sizeCapture-INFHLROL-3uHXrFqA.js +2 -0
- package/packages/web/dist/assets/smalltalk-BHpQb5nM.js +2 -0
- package/packages/web/dist/assets/smithy-Dgaz7aur.js +2 -0
- package/packages/web/dist/assets/solidity-Bj7E1mRn.js +2 -0
- package/packages/web/dist/assets/sources-Bm-TrxhL.js +2 -0
- package/packages/web/dist/assets/soy-BprueKgI.js +2 -0
- package/packages/web/dist/assets/sparql-D_iOobhT.js +2 -0
- package/packages/web/dist/assets/splunk-BC2Px7Mm.js +2 -0
- package/packages/web/dist/assets/sql-D4n2TlMc.js +2 -0
- package/packages/web/dist/assets/src-DLK1P7oz.js +43 -0
- package/packages/web/dist/assets/ssh-config-BgfXC-Er.js +2 -0
- package/packages/web/dist/assets/stata-D3X-un4D.js +2 -0
- package/packages/web/dist/assets/state-CjE-qA2w.js +2 -0
- package/packages/web/dist/assets/state-J8VdpZXA.css +1 -0
- package/packages/web/dist/assets/stateDiagram-v2-FJ4FJNEA-8fpbogV7.js +292 -0
- package/packages/web/dist/assets/stores-BMEvTe-I.js +2 -0
- package/packages/web/dist/assets/stylus-B6D30XZt.js +2 -0
- package/packages/web/dist/assets/surrealql-5--I0FKd.js +2 -0
- package/packages/web/dist/assets/svelte-DlUga76i.js +2 -0
- package/packages/web/dist/assets/swift-CyEgAFGc.js +2 -0
- package/packages/web/dist/assets/swimlanes-UMQ2AFYF-2-xKzyRO.js +2 -0
- package/packages/web/dist/assets/swimlanesDiagram-OMPLPG4O-DHJrYwQz.js +9 -0
- package/packages/web/dist/assets/system-verilog-Dh5ihWbf.js +2 -0
- package/packages/web/dist/assets/systemd-BxMlprV5.js +2 -0
- package/packages/web/dist/assets/systems-DIp94AET.js +2 -0
- package/packages/web/dist/assets/table-LcEs15kL.js +4 -0
- package/packages/web/dist/assets/talonscript-CohzipZa.js +2 -0
- package/packages/web/dist/assets/tasl-DMoTqEGO.js +2 -0
- package/packages/web/dist/assets/tcl-CZd0xW_V.js +2 -0
- package/packages/web/dist/assets/templ-SgILQMBm.js +2 -0
- package/packages/web/dist/assets/terraform-DswuEJGm.js +2 -0
- package/packages/web/dist/assets/tex-B_j0g-0C.js +2 -0
- package/packages/web/dist/assets/timeline-definition-SEUHKTQE-Czq0i_qO.js +121 -0
- package/packages/web/dist/assets/toml-CcmNWLt0.js +2 -0
- package/packages/web/dist/assets/treeView-D4JQ5SDB-B3NKij_H.js +1 -0
- package/packages/web/dist/assets/treemap-SAJKECNS-Dt7uNpkP.js +1 -0
- package/packages/web/dist/assets/ts-tags-Bb2M6NRT.js +2 -0
- package/packages/web/dist/assets/tsv-sltzmVWM.js +2 -0
- package/packages/web/dist/assets/tsx-D2H2cqPj.js +2 -0
- package/packages/web/dist/assets/turtle-ByJddavk.js +2 -0
- package/packages/web/dist/assets/twig-DqWgw3C7.js +2 -0
- package/packages/web/dist/assets/types-D1t1HqPm.js +2 -0
- package/packages/web/dist/assets/typescript-DVfyLS1i.js +2 -0
- package/packages/web/dist/assets/typespec-BGhR2SqG.js +2 -0
- package/packages/web/dist/assets/typst-Cs7gYQVT.js +2 -0
- package/packages/web/dist/assets/ui-C7ZH_6oC.css +1 -0
- package/packages/web/dist/assets/ui-W12UYhVu.js +17 -0
- package/packages/web/dist/assets/url-BIg5IhGs.js +2 -0
- package/packages/web/dist/assets/usecaseDiagram-AFA6YXN4-D3m4xj4y.js +329 -0
- package/packages/web/dist/assets/v-DBj4K9d_.js +2 -0
- package/packages/web/dist/assets/vala-zf12oZj6.js +2 -0
- package/packages/web/dist/assets/vb-DOwzaHZ0.js +2 -0
- package/packages/web/dist/assets/vennDiagram-NNMJR3RB-DeIkukMz.js +35 -0
- package/packages/web/dist/assets/verilog-B2gwz-sJ.js +2 -0
- package/packages/web/dist/assets/vhdl-BroJfC0k.js +2 -0
- package/packages/web/dist/assets/viml-DvXPmvsu.js +2 -0
- package/packages/web/dist/assets/vue-D0OpHdq8.js +2 -0
- package/packages/web/dist/assets/vue-html-DYZahZaV.js +2 -0
- package/packages/web/dist/assets/vue-vine-BsFhbSla.js +2 -0
- package/packages/web/dist/assets/vyper-CgoNMtux.js +2 -0
- package/packages/web/dist/assets/wardley-7MLQ67FV-DSzBQKe8.js +1 -0
- package/packages/web/dist/assets/wardleyDiagram-S7YFUSEH-ef9ee0JD.js +79 -0
- package/packages/web/dist/assets/wasm-ByWQv1Qj.js +2 -0
- package/packages/web/dist/assets/wenyan-C8pVoKbM.js +2 -0
- package/packages/web/dist/assets/wgsl-BsKzXJz4.js +2 -0
- package/packages/web/dist/assets/widget-host-BCf6Tlt5.js +2 -0
- package/packages/web/dist/assets/widgets-CrbkovMT.js +2 -0
- package/packages/web/dist/assets/wikitext-ClFFjSW2.js +2 -0
- package/packages/web/dist/assets/wit-DdvCle-K.js +2 -0
- package/packages/web/dist/assets/wolfram-DLL8P-h_.js +2 -0
- package/packages/web/dist/assets/xml-Cz9mX3j0.js +2 -0
- package/packages/web/dist/assets/xsl-fJeiXJlj.js +2 -0
- package/packages/web/dist/assets/xychartDiagram-GGNKY7IX-CuWtZyN1.js +8 -0
- package/packages/web/dist/assets/yaml-BtwsWWqX.js +2 -0
- package/packages/web/dist/assets/zenscript-BnlCZFoB.js +2 -0
- package/packages/web/dist/assets/zig-CMLA9XwU.js +2 -0
- package/packages/web/dist/favicon.svg +1 -0
- package/packages/web/dist/icons/apple-touch-icon.png +0 -0
- package/packages/web/dist/icons/icon-192.png +0 -0
- package/packages/web/dist/icons/icon-512.png +0 -0
- package/packages/web/dist/icons/maskable-512.png +0 -0
- package/packages/web/dist/index.html +95 -0
- package/packages/web/dist/offline.html +39 -0
- package/packages/web/dist/screenshots/narrow.png +0 -0
- package/packages/web/dist/screenshots/wide.png +0 -0
- package/packages/web/dist/sw.js +2 -0
- package/packages/web/dist/zod-config.js +7 -0
- package/packages/web/package.json +25 -0
- package/premade/claude.zip +0 -0
- package/premade/database.zip +0 -0
- package/premade/web.zip +0 -0
- package/scripts/dev-env.ts +30 -0
- package/scripts/hub-client.ts +2 -0
- package/scripts/release/link.cjs +73 -0
- package/scripts/run-stack.ts +98 -0
- package/scripts/stack.ts +317 -0
- package/scripts/start.ts +120 -0
- package/scripts/supervise.ts +98 -0
- package/systems/api/package.json +20 -0
- package/systems/api/server/authoring.ts +348 -0
- package/systems/api/server/env.ts +16 -0
- package/systems/api/server/guard.ts +44 -0
- package/systems/api/server/http.ts +274 -0
- package/systems/api/server/impl.ts +233 -0
- package/systems/api/server/index.ts +10 -0
- package/systems/api/server/main.ts +27 -0
- package/systems/api/server/openapi.ts +51 -0
- package/systems/api/server/program.ts +158 -0
- package/systems/api/server/services.ts +121 -0
- package/systems/api/shared/http.ts +61 -0
- package/systems/api/shared/index.ts +244 -0
- package/systems/api/system.json +9 -0
- package/systems/api/tsconfig.json +6 -0
- package/systems/code/package.json +20 -0
- package/systems/code/server/authoring.ts +233 -0
- package/systems/code/server/env.ts +13 -0
- package/systems/code/server/impl.ts +128 -0
- package/systems/code/server/index.ts +5 -0
- package/systems/code/server/main.ts +27 -0
- package/systems/code/shared/index.ts +130 -0
- package/systems/code/system.json +9 -0
- package/systems/code/tsconfig.json +6 -0
- package/systems/embedder/package.json +19 -0
- package/systems/embedder/server/env.ts +27 -0
- package/systems/embedder/server/http.ts +154 -0
- package/systems/embedder/server/impl.ts +104 -0
- package/systems/embedder/server/index.ts +22 -0
- package/systems/embedder/server/main.ts +37 -0
- package/systems/embedder/server/provider.ts +60 -0
- package/systems/embedder/shared/index.ts +74 -0
- package/systems/embedder/system.json +9 -0
- package/systems/embedder/tsconfig.json +6 -0
- package/systems/fs/client/BashView.vue +165 -0
- package/systems/fs/client/ChangesView.vue +132 -0
- package/systems/fs/client/DiffBody.vue +95 -0
- package/systems/fs/client/DiffView.vue +73 -0
- package/systems/fs/client/EntryInput.vue +102 -0
- package/systems/fs/client/InstallView.vue +72 -0
- package/systems/fs/client/OutputBlock.vue +65 -0
- package/systems/fs/client/bash.ts +40 -0
- package/systems/fs/client/changes.ts +87 -0
- package/systems/fs/client/diff.ts +151 -0
- package/systems/fs/client/fakes.ts +58 -0
- package/systems/fs/client/index.ts +19 -0
- package/systems/fs/client/preview/Preview.vue +70 -0
- package/systems/fs/client/preview/index.html +12 -0
- package/systems/fs/client/preview/main.ts +9 -0
- package/systems/fs/client/preview/shots.ts +71 -0
- package/systems/fs/client/rerun.ts +36 -0
- package/systems/fs/context/authoring/index.md +42 -0
- package/systems/fs/context/authoring/parts/actions.md +56 -0
- package/systems/fs/context/authoring/parts/actions.reference.md +90 -0
- package/systems/fs/context/authoring/parts/calling.md +71 -0
- package/systems/fs/context/authoring/parts/calling.reference.md +134 -0
- package/systems/fs/context/authoring/parts/client.md +273 -0
- package/systems/fs/context/authoring/parts/client.reference/client.md +638 -0
- package/systems/fs/context/authoring/parts/client.reference/fnpillprops.md +141 -0
- package/systems/fs/context/authoring/parts/client.reference/resultview.md +619 -0
- package/systems/fs/context/authoring/parts/client.reference.md +24 -0
- package/systems/fs/context/authoring/parts/context.md +119 -0
- package/systems/fs/context/authoring/parts/context.reference.md +458 -0
- package/systems/fs/context/authoring/parts/contract.md +167 -0
- package/systems/fs/context/authoring/parts/contract.reference.md +286 -0
- package/systems/fs/context/authoring/parts/core-types/access-ts.md +39 -0
- package/systems/fs/context/authoring/parts/core-types/admin-ts.md +41 -0
- package/systems/fs/context/authoring/parts/core-types/api-index-ts.md +28 -0
- package/systems/fs/context/authoring/parts/core-types/approvals-ts.md +494 -0
- package/systems/fs/context/authoring/parts/core-types/auto-pair-ts.md +28 -0
- package/systems/fs/context/authoring/parts/core-types/checks-ts.md +42 -0
- package/systems/fs/context/authoring/parts/core-types/claims-ts.md +26 -0
- package/systems/fs/context/authoring/parts/core-types/config-secrets-ts.md +24 -0
- package/systems/fs/context/authoring/parts/core-types/connections-ts.md +178 -0
- package/systems/fs/context/authoring/parts/core-types/context-files-ts.md +103 -0
- package/systems/fs/context/authoring/parts/core-types/context-graph-ts.md +22 -0
- package/systems/fs/context/authoring/parts/core-types/contextdecl.md +477 -0
- package/systems/fs/context/authoring/parts/core-types/data-ts.md +236 -0
- package/systems/fs/context/authoring/parts/core-types/decisions-ts.md +52 -0
- package/systems/fs/context/authoring/parts/core-types/fn-block-ts.md +31 -0
- package/systems/fs/context/authoring/parts/core-types/fn-facts-ts.md +228 -0
- package/systems/fs/context/authoring/parts/core-types/gin-ts.md +24 -0
- package/systems/fs/context/authoring/parts/core-types/grants-ts.md +55 -0
- package/systems/fs/context/authoring/parts/core-types/lifecycle-ts.md +658 -0
- package/systems/fs/context/authoring/parts/core-types/link-ts.md +410 -0
- package/systems/fs/context/authoring/parts/core-types/llm-ts.md +268 -0
- package/systems/fs/context/authoring/parts/core-types/manifest.md +460 -0
- package/systems/fs/context/authoring/parts/core-types/manifestpatch.md +519 -0
- package/systems/fs/context/authoring/parts/core-types/mention-search-ts.md +29 -0
- package/systems/fs/context/authoring/parts/core-types/model-calls-ts.md +200 -0
- package/systems/fs/context/authoring/parts/core-types/model-names-ts.md +31 -0
- package/systems/fs/context/authoring/parts/core-types/modes-ts.md +89 -0
- package/systems/fs/context/authoring/parts/core-types/owner-runs-ts.md +47 -0
- package/systems/fs/context/authoring/parts/core-types/package-ts.md +83 -0
- package/systems/fs/context/authoring/parts/core-types/primitives-ts.md +170 -0
- package/systems/fs/context/authoring/parts/core-types/query-ts.md +50 -0
- package/systems/fs/context/authoring/parts/core-types/records-actors-ts.md +259 -0
- package/systems/fs/context/authoring/parts/core-types/records-chat-ts.md +217 -0
- package/systems/fs/context/authoring/parts/core-types/records-content-ts.md +24 -0
- package/systems/fs/context/authoring/parts/core-types/records-runs-ts.md +24 -0
- package/systems/fs/context/authoring/parts/core-types/records-systems-ts.md +69 -0
- package/systems/fs/context/authoring/parts/core-types/registries-ts.md +376 -0
- package/systems/fs/context/authoring/parts/core-types/remote-auth-ts.md +60 -0
- package/systems/fs/context/authoring/parts/core-types/resources-ts.md +250 -0
- package/systems/fs/context/authoring/parts/core-types/run-ts.md +425 -0
- package/systems/fs/context/authoring/parts/core-types/sensitivity-ts.md +52 -0
- package/systems/fs/context/authoring/parts/core-types/system-events-ts.md +90 -0
- package/systems/fs/context/authoring/parts/core-types/system-pages-ts.md +50 -0
- package/systems/fs/context/authoring/parts/core-types/system-providers-ts.md +46 -0
- package/systems/fs/context/authoring/parts/core-types/validation-ts.md +45 -0
- package/systems/fs/context/authoring/parts/core-types/visuals-ts.md +107 -0
- package/systems/fs/context/authoring/parts/core-types/web-ts.md +22 -0
- package/systems/fs/context/authoring/parts/core-types/widgets-ts.md +299 -0
- package/systems/fs/context/authoring/parts/core-types.md +164 -0
- package/systems/fs/context/authoring/parts/ctx.md +94 -0
- package/systems/fs/context/authoring/parts/ctx.reference/fnctx.md +516 -0
- package/systems/fs/context/authoring/parts/ctx.reference/hubai.md +309 -0
- package/systems/fs/context/authoring/parts/ctx.reference.md +21 -0
- package/systems/fs/context/authoring/parts/data.md +162 -0
- package/systems/fs/context/authoring/parts/data.reference.md +119 -0
- package/systems/fs/context/authoring/parts/examples/client-findview-vue.md +77 -0
- package/systems/fs/context/authoring/parts/examples/client-index-ts.md +48 -0
- package/systems/fs/context/authoring/parts/examples/client-notecard-vue.md +43 -0
- package/systems/fs/context/authoring/parts/examples/client-noteinput-vue.md +73 -0
- package/systems/fs/context/authoring/parts/examples/client-notespage-vue.md +82 -0
- package/systems/fs/context/authoring/parts/examples/client-reviewform-vue.md +57 -0
- package/systems/fs/context/authoring/parts/examples/client-wordcount-vue.md +58 -0
- package/systems/fs/context/authoring/parts/examples/package-json.md +40 -0
- package/systems/fs/context/authoring/parts/examples/server-env-ts.md +40 -0
- package/systems/fs/context/authoring/parts/examples/server-impl-ts.md +323 -0
- package/systems/fs/context/authoring/parts/examples/server-index-ts.md +34 -0
- package/systems/fs/context/authoring/parts/examples/server-main-ts.md +57 -0
- package/systems/fs/context/authoring/parts/examples/server-notes-test-ts.md +95 -0
- package/systems/fs/context/authoring/parts/examples/shared-index-ts.md +310 -0
- package/systems/fs/context/authoring/parts/examples/system-json.md +36 -0
- package/systems/fs/context/authoring/parts/examples/systems-fs-shared-index-ts-lines-1-189.md +214 -0
- package/systems/fs/context/authoring/parts/examples/systems-fs-shared-index-ts-lines-190-370.md +202 -0
- package/systems/fs/context/authoring/parts/examples/systems-fs-shared-index-ts-lines-371-533.md +183 -0
- package/systems/fs/context/authoring/parts/examples/tsconfig-json.md +27 -0
- package/systems/fs/context/authoring/parts/examples.md +76 -0
- package/systems/fs/context/authoring/parts/fns.md +225 -0
- package/systems/fs/context/authoring/parts/fns.reference/fillclaims.md +267 -0
- package/systems/fs/context/authoring/parts/fns.reference/fn.md +530 -0
- package/systems/fs/context/authoring/parts/fns.reference.md +21 -0
- package/systems/fs/context/authoring/parts/folder.md +472 -0
- package/systems/fs/context/authoring/parts/gin.md +122 -0
- package/systems/fs/context/authoring/parts/gin.reference.md +483 -0
- package/systems/fs/context/authoring/parts/handlers-progress.md +100 -0
- package/systems/fs/context/authoring/parts/handlers-progress.reference.md +197 -0
- package/systems/fs/context/authoring/parts/hooks.md +56 -0
- package/systems/fs/context/authoring/parts/hooks.reference.md +110 -0
- package/systems/fs/context/authoring/parts/hub/hub-auto-pair-revoke.md +189 -0
- package/systems/fs/context/authoring/parts/hub/hub-fns-load.md +470 -0
- package/systems/fs/context/authoring/parts/hub/hub-run-background.md +562 -0
- package/systems/fs/context/authoring/parts/hub/kinds-of-hub.md +95 -0
- package/systems/fs/context/authoring/parts/hub.md +45 -0
- package/systems/fs/context/authoring/parts/hub.reference.md +476 -0
- package/systems/fs/context/authoring/parts/internals/manifestof.md +721 -0
- package/systems/fs/context/authoring/parts/internals/permissionargs.md +652 -0
- package/systems/fs/context/authoring/parts/internals/usagefromwire.md +257 -0
- package/systems/fs/context/authoring/parts/internals.md +39 -0
- package/systems/fs/context/authoring/parts/kinds-agents.md +278 -0
- package/systems/fs/context/authoring/parts/kinds-agents.reference/authoringsession.md +195 -0
- package/systems/fs/context/authoring/parts/kinds-agents.reference/kind.md +496 -0
- package/systems/fs/context/authoring/parts/kinds-agents.reference.md +21 -0
- package/systems/fs/context/authoring/parts/lifecycle.md +89 -0
- package/systems/fs/context/authoring/parts/lifecycle.reference.md +60 -0
- package/systems/fs/context/authoring/parts/mentions.md +76 -0
- package/systems/fs/context/authoring/parts/mentions.reference.md +105 -0
- package/systems/fs/context/authoring/parts/mistakes.md +465 -0
- package/systems/fs/context/authoring/parts/named-types.md +97 -0
- package/systems/fs/context/authoring/parts/named-types.reference.md +168 -0
- package/systems/fs/context/authoring/parts/outcomes.md +120 -0
- package/systems/fs/context/authoring/parts/outcomes.reference.md +287 -0
- package/systems/fs/context/authoring/parts/owner-runs.md +62 -0
- package/systems/fs/context/authoring/parts/owner-runs.reference.md +224 -0
- package/systems/fs/context/authoring/parts/packaging.md +201 -0
- package/systems/fs/context/authoring/parts/packaging.reference.md +206 -0
- package/systems/fs/context/authoring/parts/providers.md +63 -0
- package/systems/fs/context/authoring/parts/providers.reference.md +88 -0
- package/systems/fs/context/authoring/parts/remote.md +63 -0
- package/systems/fs/context/authoring/parts/remote.reference.md +175 -0
- package/systems/fs/context/authoring/parts/resources.md +58 -0
- package/systems/fs/context/authoring/parts/resources.reference.md +130 -0
- package/systems/fs/context/authoring/parts/server.md +120 -0
- package/systems/fs/context/authoring/parts/server.reference.md +569 -0
- package/systems/fs/context/authoring/parts/settings-attachments.md +55 -0
- package/systems/fs/context/authoring/parts/settings-attachments.reference.md +100 -0
- package/systems/fs/context/authoring/parts/start.md +67 -0
- package/systems/fs/context/authoring/parts/state-forms.md +103 -0
- package/systems/fs/context/authoring/parts/state-forms.reference.md +32 -0
- package/systems/fs/context/authoring/parts/testing.md +160 -0
- package/systems/fs/context/authoring/parts/testing.reference/fakehub.md +396 -0
- package/systems/fs/context/authoring/parts/testing.reference/memoryjournal.md +539 -0
- package/systems/fs/context/authoring/parts/testing.reference/toolcall.md +509 -0
- package/systems/fs/context/authoring/parts/testing.reference.md +24 -0
- package/systems/fs/context/authoring/parts/widgets.md +165 -0
- package/systems/fs/context/authoring/parts/widgets.reference/hub-visuals.md +623 -0
- package/systems/fs/context/authoring/parts/widgets.reference/sourcecompatible.md +150 -0
- package/systems/fs/context/authoring/parts/widgets.reference.md +21 -0
- package/systems/fs/context/authoring/topics/begin.md +37 -0
- package/systems/fs/context/authoring/topics/client.md +25 -0
- package/systems/fs/context/authoring/topics/declare.md +40 -0
- package/systems/fs/context/authoring/topics/examples.md +25 -0
- package/systems/fs/context/authoring/topics/fns.md +37 -0
- package/systems/fs/context/authoring/topics/server.md +40 -0
- package/systems/fs/context/authoring/topics/types.md +28 -0
- package/systems/fs/package.json +28 -0
- package/systems/fs/server/authoring.ts +103 -0
- package/systems/fs/server/builds.ts +101 -0
- package/systems/fs/server/changes.ts +430 -0
- package/systems/fs/server/commands.ts +133 -0
- package/systems/fs/server/documents.ts +96 -0
- package/systems/fs/server/env.ts +123 -0
- package/systems/fs/server/files.ts +218 -0
- package/systems/fs/server/git.ts +99 -0
- package/systems/fs/server/hosting.ts +742 -0
- package/systems/fs/server/impl.ts +451 -0
- package/systems/fs/server/index.ts +151 -0
- package/systems/fs/server/loader.ts +47 -0
- package/systems/fs/server/main.ts +143 -0
- package/systems/fs/server/mentions.ts +176 -0
- package/systems/fs/server/network-guard.ts +10 -0
- package/systems/fs/server/paths.ts +148 -0
- package/systems/fs/server/problem.ts +26 -0
- package/systems/fs/server/resources.ts +236 -0
- package/systems/fs/server/reveal.ts +33 -0
- package/systems/fs/server/run-tests.ts +17 -0
- package/systems/fs/server/runner.ts +221 -0
- package/systems/fs/server/safe.ts +83 -0
- package/systems/fs/server/search.ts +214 -0
- package/systems/fs/server/sections.ts +17 -0
- package/systems/fs/server/sensitive.ts +560 -0
- package/systems/fs/server/shell.ts +255 -0
- package/systems/fs/server/snapshots.ts +119 -0
- package/systems/fs/server/stale.ts +92 -0
- package/systems/fs/server/testing.ts +256 -0
- package/systems/fs/server/tests.ts +203 -0
- package/systems/fs/server/tree.ts +44 -0
- package/systems/fs/server/walk.ts +82 -0
- package/systems/fs/shared/format.ts +29 -0
- package/systems/fs/shared/hosting.ts +65 -0
- package/systems/fs/shared/index.ts +533 -0
- package/systems/fs/system.json +10 -0
- package/systems/fs/tsconfig.json +6 -0
- package/systems/google-calendar/package.json +18 -0
- package/systems/google-calendar/server/calendar.ts +164 -0
- package/systems/google-calendar/server/connector.ts +73 -0
- package/systems/google-calendar/server/env.ts +25 -0
- package/systems/google-calendar/server/fake.ts +127 -0
- package/systems/google-calendar/server/google.ts +234 -0
- package/systems/google-calendar/server/impl.ts +140 -0
- package/systems/google-calendar/server/index.ts +7 -0
- package/systems/google-calendar/server/main.ts +29 -0
- package/systems/google-calendar/shared/index.ts +198 -0
- package/systems/google-calendar/system.json +9 -0
- package/systems/google-calendar/tsconfig.json +6 -0
- package/systems/input/client/FieldInput.vue +118 -0
- package/systems/input/client/FormCard.vue +223 -0
- package/systems/input/client/form.ts +152 -0
- package/systems/input/client/host.ts +13 -0
- package/systems/input/client/index.ts +28 -0
- package/systems/input/package.json +22 -0
- package/systems/input/server/authoring.ts +240 -0
- package/systems/input/server/env.ts +17 -0
- package/systems/input/server/impl.ts +177 -0
- package/systems/input/server/index.ts +4 -0
- package/systems/input/server/main.ts +31 -0
- package/systems/input/shared/forms.ts +106 -0
- package/systems/input/shared/index.ts +389 -0
- package/systems/input/system.json +10 -0
- package/systems/input/tsconfig.json +6 -0
- package/systems/mcp/package.json +21 -0
- package/systems/mcp/server/dial.ts +102 -0
- package/systems/mcp/server/elicitation.ts +103 -0
- package/systems/mcp/server/env.ts +27 -0
- package/systems/mcp/server/fixtures/stdio-server.ts +8 -0
- package/systems/mcp/server/impl.ts +190 -0
- package/systems/mcp/server/index.ts +10 -0
- package/systems/mcp/server/instance.ts +442 -0
- package/systems/mcp/server/main.ts +42 -0
- package/systems/mcp/server/mirror.ts +179 -0
- package/systems/mcp/server/oauth.ts +163 -0
- package/systems/mcp/server/schema.ts +56 -0
- package/systems/mcp/server/server-link.ts +216 -0
- package/systems/mcp/shared/index.ts +130 -0
- package/systems/mcp/shared/shapes.ts +42 -0
- package/systems/mcp/system.json +10 -0
- package/systems/mcp/tsconfig.json +6 -0
- package/systems/ollama/client/ServersPage.vue +242 -0
- package/systems/ollama/client/index.ts +13 -0
- package/systems/ollama/client/logic.ts +108 -0
- package/systems/ollama/package.json +22 -0
- package/systems/ollama/server/api.ts +106 -0
- package/systems/ollama/server/detect.ts +59 -0
- package/systems/ollama/server/env.ts +43 -0
- package/systems/ollama/server/fakes.ts +212 -0
- package/systems/ollama/server/impl.ts +362 -0
- package/systems/ollama/server/index.ts +10 -0
- package/systems/ollama/server/install.ts +348 -0
- package/systems/ollama/server/main.ts +67 -0
- package/systems/ollama/server/models.ts +93 -0
- package/systems/ollama/server/provider.ts +42 -0
- package/systems/ollama/server/serve.ts +315 -0
- package/systems/ollama/shared/index.ts +178 -0
- package/systems/ollama/shared/schemas.ts +258 -0
- package/systems/ollama/system.json +11 -0
- package/systems/ollama/tsconfig.json +6 -0
- package/systems/schedule/client/AgendaList.vue +74 -0
- package/systems/schedule/client/AllSchedulesPage.vue +129 -0
- package/systems/schedule/client/CalendarGrid.vue +155 -0
- package/systems/schedule/client/CalendarPage.vue +203 -0
- package/systems/schedule/client/ChangeResult.vue +23 -0
- package/systems/schedule/client/FiringResult.vue +45 -0
- package/systems/schedule/client/ScheduleCard.vue +63 -0
- package/systems/schedule/client/ScheduleForm.vue +227 -0
- package/systems/schedule/client/ScheduleListResult.vue +36 -0
- package/systems/schedule/client/SchedulePage.vue +342 -0
- package/systems/schedule/client/ScheduleResult.vue +23 -0
- package/systems/schedule/client/host.ts +31 -0
- package/systems/schedule/client/index.ts +29 -0
- package/systems/schedule/client/logic.ts +655 -0
- package/systems/schedule/client/results.ts +114 -0
- package/systems/schedule/client/state.ts +372 -0
- package/systems/schedule/package.json +27 -0
- package/systems/schedule/server/args.ts +137 -0
- package/systems/schedule/server/authoring.ts +202 -0
- package/systems/schedule/server/env.ts +32 -0
- package/systems/schedule/server/fns.ts +791 -0
- package/systems/schedule/server/impl.ts +52 -0
- package/systems/schedule/server/index.ts +10 -0
- package/systems/schedule/server/kind.ts +48 -0
- package/systems/schedule/server/main.ts +33 -0
- package/systems/schedule/server/store.ts +195 -0
- package/systems/schedule/server/summary.ts +184 -0
- package/systems/schedule/server/timer.ts +893 -0
- package/systems/schedule/shared/index.ts +376 -0
- package/systems/schedule/shared/types.ts +264 -0
- package/systems/schedule/shared/when.ts +395 -0
- package/systems/schedule/shared/zoned.ts +44 -0
- package/systems/schedule/system.json +15 -0
- package/systems/schedule/tsconfig.json +6 -0
- package/systems/template/README.md +46 -0
- package/systems/template/client/index.ts +16 -0
- package/systems/template/client/vue-shim.d.ts +13 -0
- package/systems/template/package.json +20 -0
- package/systems/template/server/env.ts +19 -0
- package/systems/template/server/impl.ts +58 -0
- package/systems/template/server/index.ts +13 -0
- package/systems/template/server/main.ts +30 -0
- package/systems/template/shared/index.ts +81 -0
- package/systems/template/system.json +15 -0
- package/systems/template/tsconfig.json +6 -0
- package/systems/widgets/client/ProposalCard.vue +83 -0
- package/systems/widgets/client/SavedWidget.vue +35 -0
- package/systems/widgets/client/WidgetsPage.vue +112 -0
- package/systems/widgets/client/index.ts +19 -0
- package/systems/widgets/client/proposal.ts +52 -0
- package/systems/widgets/package.json +23 -0
- package/systems/widgets/server/authoring.ts +261 -0
- package/systems/widgets/server/env.ts +21 -0
- package/systems/widgets/server/impl.ts +252 -0
- package/systems/widgets/server/index.ts +6 -0
- package/systems/widgets/server/main.ts +32 -0
- package/systems/widgets/server/run.ts +104 -0
- package/systems/widgets/shared/index.ts +194 -0
- package/systems/widgets/system.json +10 -0
- package/systems/widgets/tsconfig.json +6 -0
- package/tsconfig.base.json +30 -0
|
@@ -0,0 +1,893 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The schedule system's timer (docs/plans/schedule-system.md, "Durability across restarts", "When a firing happens",
|
|
3
|
+
* "What the owner is told"). It keeps each schedule's next firing on an `@ayepi/work` queue on SQLite in the
|
|
4
|
+
* instance's data folder (one delayed `due` item per schedule, at the planned instant) and, when one is due, starts the
|
|
5
|
+
* schedule fn as its owner with `ctx.runs.start` (key `schedule:<fn>@<instant>`, so a doubled start is the same run).
|
|
6
|
+
*
|
|
7
|
+
* - **Reconcile** at start and on `fns` events: every schedule fn from `ctx.runs.kindFns`, each one's next firing
|
|
8
|
+
* queued from the last instant it handled (so firings that fell due while the system was down come due at once).
|
|
9
|
+
* - **Catching up** when a firing is due: every firing since the last one handled is due now; the latest runs (late)
|
|
10
|
+
* when it is on time, or within the grace window with `missed: 'latest'`; the rest are recorded as missed, and told
|
|
11
|
+
* as one notice (folded into the latest's when it runs).
|
|
12
|
+
* - **Overlap**: a firing due while the last still runs is skipped (default), queued (at most one waits) or replaces it.
|
|
13
|
+
* - **Approvals**: a firing whose target waits for approval waits until its next firing or `SCHEDULE_APPROVAL_WAIT`
|
|
14
|
+
* (then `expired`), or is refused at once when the admin's `approvals` says so.
|
|
15
|
+
* - **Limits**: schedules per person and firings per person per day are refused with the reason; the gap between times
|
|
16
|
+
* is the kind's check.
|
|
17
|
+
* - **Records and notices**: each firing is a `schedule/Firing` record of its owner's with its one-line summary; the
|
|
18
|
+
* owner is told by the rules in `summary.ts`, after the record is written, keyed per schedule.
|
|
19
|
+
*
|
|
20
|
+
* The kind's run (`runFiring`) is part of the timer too: it runs in this process, so it hands the timer the result,
|
|
21
|
+
* the waits for approval and a way to cancel its target, with no round trip.
|
|
22
|
+
*/
|
|
23
|
+
import { ApiError, DISCONNECTED_STATUS } from '@ayepi/core';
|
|
24
|
+
import { sqliteBackend } from '@ayepi/sqlite';
|
|
25
|
+
import { createWork, defineWork, WorkDelayError } from '@ayepi/work';
|
|
26
|
+
import { splitName, type Json, type QualifiedName, type RunId, type RunStatus, type SystemEvent } from '@harness/core';
|
|
27
|
+
import type { KindFn, SystemImpl } from '@harness/sdk';
|
|
28
|
+
import { kindRunLookups } from '@harness/sdk/program';
|
|
29
|
+
import { mkdirSync } from 'node:fs';
|
|
30
|
+
import { resolve } from 'node:path';
|
|
31
|
+
import { limitsOf, schedule, type Limits, type ScheduleContract } from '../shared/index.ts';
|
|
32
|
+
import { FiringShape, SchedulePayload, type Fire, type FiringStatus, type PreviousFiring } from '../shared/types.ts';
|
|
33
|
+
import { clockWords, dayWords, firingsBetween, fromOccurrenceKey, nextFirings, occurrenceKey, type Occurrence } from '../shared/when.ts';
|
|
34
|
+
import { localNow, localString, zonedTime } from '../shared/zoned.ts';
|
|
35
|
+
import { ArgsFailed, evaluateArgs } from './args.ts';
|
|
36
|
+
import type { ScheduleSettings } from './env.ts';
|
|
37
|
+
import { TimerStore, type EndReason, type FiringRow, type ScheduleRow } from './store.ts';
|
|
38
|
+
import { spanWords, summaryLine, tells, titleOf, toneOf } from './summary.ts';
|
|
39
|
+
|
|
40
|
+
type Impl = SystemImpl<ScheduleContract['defs']>;
|
|
41
|
+
/** The system context the timer acts in (lifecycle, events). */
|
|
42
|
+
export type ScheduleCtx = Parameters<NonNullable<NonNullable<Impl['lifecycle']>['started']>>[0];
|
|
43
|
+
/** A schedule fn's run context. */
|
|
44
|
+
export type ScheduleRunCtx = Parameters<Impl['kinds']['schedule']['run']>[2];
|
|
45
|
+
/** A schedule fn as `kindFns` lists it. */
|
|
46
|
+
export type ScheduleFn = KindFn<typeof schedule.kinds.schedule>;
|
|
47
|
+
/** What the kind's run returns. */
|
|
48
|
+
type RunOutcome = Awaited<ReturnType<Impl['kinds']['schedule']['run']>>;
|
|
49
|
+
|
|
50
|
+
/** The timer's queue: its work system and the two kinds of item on it. */
|
|
51
|
+
type TimerQueue = ReturnType<Timer['createQueue']>;
|
|
52
|
+
|
|
53
|
+
/** Where the time comes from: the wall clock, or a test's. */
|
|
54
|
+
export interface Clock {
|
|
55
|
+
now(): number;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** The wall clock. */
|
|
59
|
+
export const systemClock: Clock = { now: () => Date.now() };
|
|
60
|
+
|
|
61
|
+
const MINUTE = 60_000;
|
|
62
|
+
const DAY = 24 * 60 * MINUTE;
|
|
63
|
+
|
|
64
|
+
/** How far back the per-day firing limit counts. */
|
|
65
|
+
const PER_DAY = DAY;
|
|
66
|
+
/** Local firing rows are forgotten this long after they settled and were told (their records stay in the hub). */
|
|
67
|
+
const KEEP_ROWS = 3 * DAY;
|
|
68
|
+
/** How often a schedule's old firing records are pruned at most. */
|
|
69
|
+
const PRUNE_EVERY = DAY;
|
|
70
|
+
/** How far back `fns` events look for changed schedules (clocks of the hub and this system may differ a little). */
|
|
71
|
+
const SYNC_MARGIN = MINUTE;
|
|
72
|
+
/** A start of a firing that did not answer in time. */
|
|
73
|
+
class StartTimedOut extends Error {}
|
|
74
|
+
|
|
75
|
+
/** A firing's run's way to stop its target, in this process. */
|
|
76
|
+
interface Handle {
|
|
77
|
+
cancel(reason: EndReason): Promise<void>;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** What the timer is built from. */
|
|
81
|
+
export interface TimerDeps {
|
|
82
|
+
readonly settings: ScheduleSettings;
|
|
83
|
+
readonly clock?: Clock;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** Schedule fns' payloads, read by the zod shapes (with their defaults and brands), once per listed fn. */
|
|
87
|
+
const payloads = new WeakMap<ScheduleFn, SchedulePayload>();
|
|
88
|
+
|
|
89
|
+
/** A schedule fn's payload as the zod shapes read it. */
|
|
90
|
+
function payloadOf(fn: ScheduleFn): SchedulePayload;
|
|
91
|
+
function payloadOf(fn: ScheduleFn | undefined): SchedulePayload | undefined;
|
|
92
|
+
function payloadOf(fn: ScheduleFn | undefined): SchedulePayload | undefined {
|
|
93
|
+
if (fn === undefined) { return undefined; }
|
|
94
|
+
let payload = payloads.get(fn);
|
|
95
|
+
if (payload === undefined) {
|
|
96
|
+
payload = SchedulePayload.parse(fn.payload);
|
|
97
|
+
payloads.set(fn, payload);
|
|
98
|
+
}
|
|
99
|
+
return payload;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** The id of a planned firing's row (and its start key's tail). */
|
|
103
|
+
const plannedId = (fn: string, at: number): string => `${fn}@${String(at)}`;
|
|
104
|
+
|
|
105
|
+
/** The local name of a schedule fn, for its page's path. */
|
|
106
|
+
const localOf = (fn: QualifiedName): string => splitName(fn).local;
|
|
107
|
+
|
|
108
|
+
/** A firing's day and time as people read them: "Mon, Nov 30 9:00 am". */
|
|
109
|
+
function whenWords(key: string): string {
|
|
110
|
+
const { day, time } = fromOccurrenceKey(key);
|
|
111
|
+
return time === undefined ? dayWords(day) : `${dayWords(day)} ${clockWords(time)}`;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** Whether a hub error refuses (it won't start, whatever is retried), and why; `undefined` for an unreachable hub. */
|
|
115
|
+
function refusalOf(error: unknown): { message: string; code: string } | undefined {
|
|
116
|
+
if (error instanceof ApiError && error.status !== DISCONNECTED_STATUS && error.status >= 400 && error.status < 500) {
|
|
117
|
+
return { message: error.message, code: error.code };
|
|
118
|
+
}
|
|
119
|
+
return undefined;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** A run's settled status as a firing's. */
|
|
123
|
+
function firingStatusOf(status: RunStatus): FiringStatus | undefined {
|
|
124
|
+
switch (status) {
|
|
125
|
+
case 'done': return 'ran';
|
|
126
|
+
case 'failed': case 'invalid-input': return 'failed';
|
|
127
|
+
case 'cancelled': case 'undone': return 'cancelled';
|
|
128
|
+
case 'awaiting-approval': case 'queued': case 'running': case 'waiting': case 'paused': return undefined;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** The timer: its store, its queue, the schedules it knows, and the firings running in this process. */
|
|
133
|
+
export class Timer {
|
|
134
|
+
readonly #settings: ScheduleSettings;
|
|
135
|
+
readonly #clock: Clock;
|
|
136
|
+
#store: TimerStore | undefined;
|
|
137
|
+
#work: TimerQueue | undefined;
|
|
138
|
+
#ctx: ScheduleCtx | undefined;
|
|
139
|
+
#limits: Limits = limitsOf({});
|
|
140
|
+
/** The schedule fns, as `kindFns` last listed them. */
|
|
141
|
+
readonly #fns = new Map<string, ScheduleFn>();
|
|
142
|
+
/** Running firings' handles, by firing id. */
|
|
143
|
+
readonly #handles = new Map<string, Handle>();
|
|
144
|
+
/** One chain of work per schedule, so its firings, settles and changes never interleave. */
|
|
145
|
+
readonly #chains = new Map<string, Promise<void>>();
|
|
146
|
+
/** When `kindFns` was last read whole or since. */
|
|
147
|
+
#syncedAt: number | undefined;
|
|
148
|
+
|
|
149
|
+
constructor(deps: TimerDeps) {
|
|
150
|
+
this.#settings = deps.settings;
|
|
151
|
+
this.#clock = deps.clock ?? systemClock;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/** The limits now in force (the config with its defaults). */
|
|
155
|
+
get limits(): Limits {
|
|
156
|
+
return this.#limits;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/** The store, once started. */
|
|
160
|
+
get store(): TimerStore {
|
|
161
|
+
if (this.#store === undefined) { throw new Error('The schedule timer has not started.'); }
|
|
162
|
+
return this.#store;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/** The schedule fns the timer knows, by name. */
|
|
166
|
+
known(fn: string): ScheduleFn | undefined {
|
|
167
|
+
return this.#fns.get(fn);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/** Every schedule fn the timer knows (as `kindFns` last listed them), removed ones left out, by name. */
|
|
171
|
+
schedules(): ScheduleFn[] {
|
|
172
|
+
return [...this.#fns.values()].filter((fn) => !fn.removed).sort((a, b) => a.fn.localeCompare(b.fn));
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** What the timer keeps of a schedule (its last firing that ran, for `previous`; how many ran), once started. */
|
|
176
|
+
row(fn: string): ScheduleRow | undefined {
|
|
177
|
+
return this.#store?.schedule(fn);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** The config changed (or was first given): the limits follow it. */
|
|
181
|
+
configure(ctx: ScheduleCtx): void {
|
|
182
|
+
this.#ctx = ctx;
|
|
183
|
+
this.#limits = limitsOf(ctx.config);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// ─── life ───────────────────────────────────────────────────────────────────
|
|
187
|
+
|
|
188
|
+
/** The queue on the store's SQLite file: `due` firings and `expire` waits for approval. */
|
|
189
|
+
createQueue(store: TimerStore) {
|
|
190
|
+
const due = defineWork('due', async (input: { fn: string; at: number }, ctx) => {
|
|
191
|
+
await this.#safely('due', () => this.#due(input.fn, input.at));
|
|
192
|
+
return ctx.void();
|
|
193
|
+
}, { retry: { attempts: 1 } });
|
|
194
|
+
const expire = defineWork('expire', async (input: { id: string }, ctx) => {
|
|
195
|
+
await this.#safely('expire', () => this.#expire(input.id));
|
|
196
|
+
return ctx.void();
|
|
197
|
+
}, { retry: { attempts: 1 } });
|
|
198
|
+
const backend = sqliteBackend(store.db, { prefix: 'work_', now: () => this.#clock.now() });
|
|
199
|
+
const work = createWork({
|
|
200
|
+
work: [due, expire] as const,
|
|
201
|
+
queue: backend.queue, store: backend.store, pubsub: backend.pubsub,
|
|
202
|
+
now: () => this.#clock.now(),
|
|
203
|
+
pollInterval: this.#settings.SCHEDULE_POLL,
|
|
204
|
+
autoStart: false,
|
|
205
|
+
onError: (error, phase) => { this.#ctx?.log.warn('schedule.work', { phase, error: error instanceof Error ? error.message : String(error) }); },
|
|
206
|
+
});
|
|
207
|
+
return { work, due, expire };
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/** Open the store and queue (once), reconcile every schedule, and start the queue. Every (re)connect calls it. */
|
|
211
|
+
async start(ctx: ScheduleCtx): Promise<void> {
|
|
212
|
+
this.configure(ctx);
|
|
213
|
+
if (this.#store === undefined) {
|
|
214
|
+
mkdirSync(ctx.dataDir, { recursive: true });
|
|
215
|
+
this.#store = new TimerStore(resolve(ctx.dataDir, this.#settings.SCHEDULE_DB));
|
|
216
|
+
this.#work = this.createQueue(this.#store);
|
|
217
|
+
}
|
|
218
|
+
await this.reconcile(ctx);
|
|
219
|
+
this.#work?.work.start();
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** Checkpoint the store's write-ahead log, so a copy of the data folder is whole. */
|
|
223
|
+
checkpoint(): void {
|
|
224
|
+
this.#store?.db.pragma('wal_checkpoint(TRUNCATE)');
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/** Stop the queue and close the store. */
|
|
228
|
+
async stop(): Promise<void> {
|
|
229
|
+
await this.#work?.work.stop();
|
|
230
|
+
this.#work = undefined;
|
|
231
|
+
this.#store?.close();
|
|
232
|
+
this.#store = undefined;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/** Every schedule fn read again, each one's next firing queued, and what the system missed while it was down. */
|
|
236
|
+
async reconcile(ctx: ScheduleCtx): Promise<void> {
|
|
237
|
+
this.configure(ctx);
|
|
238
|
+
const store = this.store;
|
|
239
|
+
const now = this.#clock.now();
|
|
240
|
+
const listed = await this.#list(ctx);
|
|
241
|
+
this.#fns.clear();
|
|
242
|
+
for (const fn of listed) { this.#fns.set(fn.fn, fn); }
|
|
243
|
+
this.#syncedAt = now;
|
|
244
|
+
for (const fn of listed) {
|
|
245
|
+
await this.#chain(fn.fn, () => this.#adopt(fn, ctx, false));
|
|
246
|
+
}
|
|
247
|
+
for (const row of store.schedules()) {
|
|
248
|
+
if (!this.#fns.has(row.fn)) { store.removeSchedule(row.fn); }
|
|
249
|
+
}
|
|
250
|
+
// firings still marked going with no run of theirs here: the hub may still restart them; past a while they're lost
|
|
251
|
+
for (const row of store.allActive()) {
|
|
252
|
+
if (!this.#handles.has(row.id) && now - row.created > this.#settings.SCHEDULE_LOST_AFTER) {
|
|
253
|
+
await this.#chain(row.fn, () => this.#settle(row.id, { status: 'failed', reason: 'It was lost when the schedule system restarted.' }));
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
// settled firings whose telling wasn't decided (the system stopped between the record and the notice)
|
|
257
|
+
for (const row of store.untold()) {
|
|
258
|
+
await this.#chain(row.fn, () => this.#tell(row.id, false));
|
|
259
|
+
}
|
|
260
|
+
store.forgetBefore(now - KEEP_ROWS);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/** Fns came, went or changed: the schedules among them are read again and planned again. */
|
|
264
|
+
async fnsChanged(event: Extract<SystemEvent, { type: 'fns' }>, ctx: ScheduleCtx): Promise<void> {
|
|
265
|
+
this.configure(ctx);
|
|
266
|
+
if (this.#store === undefined) { return; }
|
|
267
|
+
for (const name of event.removed) {
|
|
268
|
+
if (this.#fns.has(name)) { await this.#chain(name, () => { this.#forget(name); return Promise.resolve(); }); }
|
|
269
|
+
}
|
|
270
|
+
const since = this.#syncedAt === undefined ? undefined : this.#syncedAt - SYNC_MARGIN;
|
|
271
|
+
const now = this.#clock.now();
|
|
272
|
+
const listed = await this.#list(ctx, since);
|
|
273
|
+
this.#syncedAt = now;
|
|
274
|
+
for (const fn of listed) {
|
|
275
|
+
if (fn.removed) {
|
|
276
|
+
await this.#chain(fn.fn, () => { this.#forget(fn.fn); return Promise.resolve(); });
|
|
277
|
+
continue;
|
|
278
|
+
}
|
|
279
|
+
const before = this.#fns.get(fn.fn);
|
|
280
|
+
this.#fns.set(fn.fn, fn);
|
|
281
|
+
await this.#chain(fn.fn, () => this.#adopt(fn, ctx, before !== undefined && before.version !== fn.version));
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/** Every schedule fn, a page at a time (only those changed or removed since a time, when given). */
|
|
286
|
+
async #list(ctx: ScheduleCtx, changedSince?: number): Promise<ScheduleFn[]> {
|
|
287
|
+
const out: ScheduleFn[] = [];
|
|
288
|
+
let cursor: string | undefined;
|
|
289
|
+
do {
|
|
290
|
+
const page = await ctx.runs.kindFns(schedule.kinds.schedule, {
|
|
291
|
+
...(changedSince === undefined ? {} : { changedSince }),
|
|
292
|
+
...(cursor === undefined ? {} : { cursor }),
|
|
293
|
+
});
|
|
294
|
+
out.push(...page.items);
|
|
295
|
+
cursor = page.cursor;
|
|
296
|
+
} while (cursor !== undefined);
|
|
297
|
+
return out;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* A schedule fn the timer reads: its row made or brought up to date, and its next firing queued. A new one starts
|
|
302
|
+
* from now (or from its last firing record, when this data folder lost its row); a changed one from now, so firings
|
|
303
|
+
* its new times put in the past are not "missed".
|
|
304
|
+
*/
|
|
305
|
+
async #adopt(fn: ScheduleFn, ctx: ScheduleCtx, changedLive: boolean): Promise<void> {
|
|
306
|
+
const store = this.store;
|
|
307
|
+
const now = this.#clock.now();
|
|
308
|
+
let row = store.schedule(fn.fn);
|
|
309
|
+
if (row === undefined) {
|
|
310
|
+
const last = await this.#lastRecorded(fn, ctx);
|
|
311
|
+
row = store.putSchedule({ fn: fn.fn, owner: fn.owner, version: fn.version, lastAt: last?.at ?? now, count: last?.count ?? 0 });
|
|
312
|
+
} else if (row.version !== fn.version || row.owner !== fn.owner) {
|
|
313
|
+
row = store.putSchedule({ ...row, owner: fn.owner, version: fn.version, lastAt: changedLive ? Math.max(row.lastAt, now) : row.lastAt });
|
|
314
|
+
}
|
|
315
|
+
this.#plan(fn, row);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/** The latest firing record of a schedule, when the timer has no row for it (a lost data folder). */
|
|
319
|
+
async #lastRecorded(fn: ScheduleFn, ctx: ScheduleCtx): Promise<{ at: number; count: number } | undefined> {
|
|
320
|
+
try {
|
|
321
|
+
const page = await ctx.data.find(schedule.types.Firing, { query: { filters: [{ field: 'schedule', op: 'is', value: fn.fn }], sort: [{ field: 'at', dir: 'desc' }], limit: 1 } });
|
|
322
|
+
const last = page.items[0];
|
|
323
|
+
return last === undefined ? undefined : { at: last.value.at, count: 0 };
|
|
324
|
+
} catch (error) {
|
|
325
|
+
ctx.log.warn('schedule.history.unread', { fn: fn.fn, error: error instanceof Error ? error.message : String(error) });
|
|
326
|
+
return undefined;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/** A schedule removed: its queued firing dropped (the queue item finds no row) and its row forgotten; its firings stay. */
|
|
331
|
+
#forget(fn: string): void {
|
|
332
|
+
this.#fns.delete(fn);
|
|
333
|
+
this.store.removeSchedule(fn);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Queue the schedule's next firing after the last instant it handled (or after its pause ends): one `due` item at
|
|
338
|
+
* that instant, unless that one is queued already. A paused schedule with no end day queues nothing.
|
|
339
|
+
*/
|
|
340
|
+
#plan(fn: ScheduleFn, row: ScheduleRow): void {
|
|
341
|
+
const payload = payloadOf(fn);
|
|
342
|
+
const paused = payload.paused;
|
|
343
|
+
let from = row.lastAt + 1;
|
|
344
|
+
if (paused !== undefined) {
|
|
345
|
+
if (paused.until === undefined) { this.store.putSchedule({ ...row, plannedAt: undefined }); return; }
|
|
346
|
+
from = Math.max(from, zonedTime(paused.until, 0, payload.zone));
|
|
347
|
+
}
|
|
348
|
+
const next = nextFirings(payload.when, payload.zone, from, 1)[0];
|
|
349
|
+
if (next === undefined) { this.store.putSchedule({ ...row, plannedAt: undefined }); return; }
|
|
350
|
+
if (row.plannedAt === next.at) { return; }
|
|
351
|
+
this.store.putSchedule({ ...row, plannedAt: next.at });
|
|
352
|
+
const work = this.#work;
|
|
353
|
+
if (work !== undefined) { work.work.enqueue(work.due({ fn: fn.fn, at: next.at }), { runAt: next.at }); }
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// ─── firings ────────────────────────────────────────────────────────────────
|
|
357
|
+
|
|
358
|
+
/** A queued firing is due: unless it is stale (the schedule changed or went), catch up on it. */
|
|
359
|
+
async #due(fn: string, at: number): Promise<void> {
|
|
360
|
+
await this.#chain(fn, async () => {
|
|
361
|
+
const row = this.#store?.schedule(fn);
|
|
362
|
+
const kindFn = this.#fns.get(fn);
|
|
363
|
+
if (row === undefined || kindFn === undefined || row.plannedAt !== at) { return; }
|
|
364
|
+
await this.#catchUp(kindFn, row);
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Every firing from the last one handled up to now: the latest starts when it is on time (or within the grace
|
|
370
|
+
* window, with `missed: 'latest'`), the rest are recorded as missed. While the hub can't be reached the item waits
|
|
371
|
+
* and tries again (`WorkDelayError`), until the grace window passes.
|
|
372
|
+
*/
|
|
373
|
+
async #catchUp(fn: ScheduleFn, row: ScheduleRow): Promise<void> {
|
|
374
|
+
const ctx = this.#ctxOrDelay();
|
|
375
|
+
const payload = payloadOf(fn);
|
|
376
|
+
const now = this.#clock.now();
|
|
377
|
+
const pausedUntil = payload.paused === undefined ? undefined : payload.paused.until === undefined ? Number.POSITIVE_INFINITY : zonedTime(payload.paused.until, 0, payload.zone);
|
|
378
|
+
const due = firingsBetween(payload.when, payload.zone, row.lastAt + 1, now + 1, 10_000)
|
|
379
|
+
.filter((firing) => pausedUntil === undefined || firing.at >= pausedUntil);
|
|
380
|
+
const latest = due.at(-1);
|
|
381
|
+
if (latest === undefined) { this.#plan(fn, this.store.schedule(fn.fn) ?? row); return; }
|
|
382
|
+
const earlier = due.slice(0, -1);
|
|
383
|
+
const late = now - latest.at;
|
|
384
|
+
const runs = late <= this.#settings.SCHEDULE_ON_TIME || (payload.missed === 'latest' && late <= this.#limits.grace);
|
|
385
|
+
const missed = runs ? earlier : due;
|
|
386
|
+
const missedReason = (occurrence: Occurrence): string => payload.missed === 'latest'
|
|
387
|
+
? `It couldn't start within ${spanWords(this.#limits.grace)} of ${whenWords(occurrence.key)}, so it was missed.`
|
|
388
|
+
: `It couldn't start on time (${whenWords(occurrence.key)}), and missed runs don't run late.`;
|
|
389
|
+
for (const occurrence of missed) {
|
|
390
|
+
await this.#recordNoRun(fn, occurrence, 'missed', missedReason(occurrence), ctx);
|
|
391
|
+
}
|
|
392
|
+
if (missed.length > 0) {
|
|
393
|
+
// handled up to the last missed one, so a retry of the latest doesn't record them again
|
|
394
|
+
this.store.updateSchedule(fn.fn, (current) => ({ ...current, lastAt: Math.max(current.lastAt, missed.at(-1)?.at ?? current.lastAt) }));
|
|
395
|
+
}
|
|
396
|
+
if (runs) {
|
|
397
|
+
const started = await this.#fire(fn, latest, ctx, { missedBefore: earlier.length });
|
|
398
|
+
if (started === 'retry') {
|
|
399
|
+
throw new WorkDelayError({ delay: this.#settings.SCHEDULE_RETRY });
|
|
400
|
+
}
|
|
401
|
+
} else if (missed.length > 0) {
|
|
402
|
+
await this.#tellMissed(fn, missed, ctx);
|
|
403
|
+
}
|
|
404
|
+
const current = this.store.updateSchedule(fn.fn, (r) => ({ ...r, lastAt: Math.max(r.lastAt, latest.at) }));
|
|
405
|
+
if (current !== undefined) { this.#plan(fn, current); }
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
/** The timer's context, or a wait: nothing can start before the system is connected. */
|
|
409
|
+
#ctxOrDelay(): ScheduleCtx {
|
|
410
|
+
if (this.#ctx === undefined) { throw new WorkDelayError({ delay: this.#settings.SCHEDULE_RETRY }); }
|
|
411
|
+
return this.#ctx;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Start one firing as the schedule's owner, after its limits and the overlap rule. `retry` when the hub couldn't be
|
|
416
|
+
* reached; the firing is then not recorded yet.
|
|
417
|
+
*/
|
|
418
|
+
async #fire(fn: ScheduleFn, occurrence: Occurrence, ctx: ScheduleCtx, options: { missedBefore: number }): Promise<'started' | 'retry' | 'held'> {
|
|
419
|
+
const store = this.store;
|
|
420
|
+
const payload = payloadOf(fn);
|
|
421
|
+
const now = this.#clock.now();
|
|
422
|
+
const limit = this.#limitProblem(fn, now);
|
|
423
|
+
if (limit !== undefined) {
|
|
424
|
+
await this.#recordNoRun(fn, occurrence, 'refused', limit, ctx);
|
|
425
|
+
return 'held';
|
|
426
|
+
}
|
|
427
|
+
const active = store.active(fn.fn);
|
|
428
|
+
if (active !== undefined && !(await this.#expiredNow(active, now))) {
|
|
429
|
+
if (payload.overlap === 'skip') {
|
|
430
|
+
await this.#recordNoRun(fn, occurrence, 'skipped', `The run before it (${whenWords(active.value.key)}) was still going.`, ctx, active.run);
|
|
431
|
+
return 'held';
|
|
432
|
+
}
|
|
433
|
+
if (payload.overlap === 'queue') {
|
|
434
|
+
const row = store.schedule(fn.fn);
|
|
435
|
+
const waiting = row?.queued;
|
|
436
|
+
if (waiting !== undefined) {
|
|
437
|
+
await this.#recordNoRun(fn, { at: waiting.at, key: waiting.key, ...fromOccurrenceKey(waiting.key) }, 'skipped', `A later run took its place in the queue behind ${whenWords(active.value.key)}.`, ctx, active.run);
|
|
438
|
+
}
|
|
439
|
+
store.updateSchedule(fn.fn, (r) => ({ ...r, queued: { at: occurrence.at, key: occurrence.key } }));
|
|
440
|
+
return 'held';
|
|
441
|
+
}
|
|
442
|
+
// replace: the running one is cancelled, and this one starts
|
|
443
|
+
await this.#handles.get(active.id)?.cancel('replaced');
|
|
444
|
+
}
|
|
445
|
+
const id = plannedId(fn.fn, occurrence.at);
|
|
446
|
+
const existing = store.firing(id);
|
|
447
|
+
if (existing === undefined || existing.run === undefined) {
|
|
448
|
+
store.putFiring({
|
|
449
|
+
id, fn: fn.fn, owner: fn.owner, at: occurrence.at, status: 'running', missed: options.missedBefore, byPerson: false, told: false, created: now,
|
|
450
|
+
value: { schedule: fn.fn, version: fn.version, at: occurrence.at, key: occurrence.key, manual: false, status: 'running', notified: false },
|
|
451
|
+
...(existing?.record === undefined ? {} : { record: existing.record }),
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
try {
|
|
455
|
+
const started = await this.#withTimeout(ctx.runs.start(fn, {
|
|
456
|
+
// the schedule fn's `at` is a gin timestamp, whose wire form is ISO text
|
|
457
|
+
args: { at: new Date(occurrence.at).toISOString() }, key: `schedule:${id}`, priority: 'background',
|
|
458
|
+
...(payload.maxSpend === undefined ? {} : { maxSpend: payload.maxSpend }),
|
|
459
|
+
}));
|
|
460
|
+
store.updateFiring(id, (row) => ({ ...row, run: row.run ?? started.run }));
|
|
461
|
+
ctx.log.info('schedule.started', { fn: fn.fn, at: occurrence.at, run: started.run });
|
|
462
|
+
// a run the hub ended before it answered (its args refused, say) sent its settled event before the firing knew
|
|
463
|
+
// its run: settled here from the status the start gave, so it is recorded and told all the same
|
|
464
|
+
const ended = firingStatusOf(started.status);
|
|
465
|
+
if (ended !== undefined && !this.#handles.has(id) && (store.firing(id)?.status === 'running')) {
|
|
466
|
+
store.updateFiring(id, (row) => ({ ...row, value: { ...row.value, run: row.value.run ?? started.run } }));
|
|
467
|
+
await this.#settle(id, { status: ended, reason: started.status === 'invalid-input' ? 'The hub refused the args it was started with, so it never ran.' : `Its run ended at once (${started.status}).` });
|
|
468
|
+
}
|
|
469
|
+
return 'started';
|
|
470
|
+
} catch (error) {
|
|
471
|
+
const refused = refusalOf(error);
|
|
472
|
+
if (refused === undefined) {
|
|
473
|
+
// the hub couldn't be reached (or didn't answer): the same key is the same run, so trying again is safe
|
|
474
|
+
if (store.firing(id)?.record === undefined) { store.removeFiring(id); }
|
|
475
|
+
ctx.log.warn('schedule.start.unreachable', { fn: fn.fn, at: occurrence.at, error: error instanceof Error ? error.message : String(error) });
|
|
476
|
+
return 'retry';
|
|
477
|
+
}
|
|
478
|
+
store.removeFiring(id);
|
|
479
|
+
await this.#recordNoRun(fn, occurrence, 'refused', `The hub refused to start it: ${refused.message}`, ctx, undefined, refused.code);
|
|
480
|
+
return 'held';
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/** A firing's start, or `StartTimedOut` when the hub doesn't answer in time. */
|
|
485
|
+
async #withTimeout<T>(work: Promise<T>): Promise<T> {
|
|
486
|
+
let timer: ReturnType<typeof setTimeout> | undefined;
|
|
487
|
+
const timeout = new Promise<never>((_resolve, reject) => {
|
|
488
|
+
timer = setTimeout(() => { reject(new StartTimedOut('The hub did not answer in time.')); }, this.#settings.SCHEDULE_START_TIMEOUT);
|
|
489
|
+
});
|
|
490
|
+
try {
|
|
491
|
+
return await Promise.race([work, timeout]);
|
|
492
|
+
} finally {
|
|
493
|
+
clearTimeout(timer);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/** Why a firing can't start under the limits: its owner has too many schedules, or too many firings today. */
|
|
498
|
+
#limitProblem(fn: ScheduleFn, now: number): string | undefined {
|
|
499
|
+
const limits = this.#limits;
|
|
500
|
+
const theirs = [...this.#fns.values()].filter((other) => other.owner === fn.owner && !other.removed).sort((a, b) => a.updatedAt - b.updatedAt || a.fn.localeCompare(b.fn));
|
|
501
|
+
if (theirs.length > limits.perPerson && theirs.findIndex((other) => other.fn === fn.fn) >= limits.perPerson) {
|
|
502
|
+
return `Its owner has ${String(theirs.length)} schedules, more than the ${String(limits.perPerson)} one person may have, so the newest don't run.`;
|
|
503
|
+
}
|
|
504
|
+
if (this.store.startedSince(fn.owner, now - PER_DAY) >= limits.firingsPerDay) {
|
|
505
|
+
return `Its owner's schedules ran ${String(limits.firingsPerDay)} times in the last day, the most one person's may.`;
|
|
506
|
+
}
|
|
507
|
+
return undefined;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/** A firing waiting for approval past its time gives up now (and stops blocking the next one). */
|
|
511
|
+
async #expiredNow(active: FiringRow, now: number): Promise<boolean> {
|
|
512
|
+
if (active.status !== 'waiting' || active.until === undefined || active.until > now) { return false; }
|
|
513
|
+
const handle = this.#handles.get(active.id);
|
|
514
|
+
if (handle !== undefined) { await handle.cancel('expired'); }
|
|
515
|
+
return true;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/** A firing that never became a run (missed, skipped, refused): recorded, and told by the rules. */
|
|
519
|
+
async #recordNoRun(fn: ScheduleFn, occurrence: Occurrence, status: 'missed' | 'skipped' | 'refused', reason: string, ctx: ScheduleCtx, waitedOn?: RunId, code?: string): Promise<void> {
|
|
520
|
+
const store = this.store;
|
|
521
|
+
const id = `${fn.fn}@${String(occurrence.at)}:${status}`;
|
|
522
|
+
const summary = summaryLine({ status, target: payloadOf(fn).fn, reason });
|
|
523
|
+
const row = store.putFiring({
|
|
524
|
+
id, fn: fn.fn, owner: fn.owner, at: occurrence.at, status, missed: 0, byPerson: false, told: false, created: this.#clock.now(),
|
|
525
|
+
value: { schedule: fn.fn, version: fn.version, at: occurrence.at, key: occurrence.key, manual: false, status, summary, notified: false, ...(waitedOn === undefined ? {} : { run: waitedOn }) },
|
|
526
|
+
});
|
|
527
|
+
await this.#saveRecord(row, ctx);
|
|
528
|
+
if (status === 'refused') {
|
|
529
|
+
await this.#tell(id, false);
|
|
530
|
+
if (code === 'OWNER_GONE') { await this.#tellAdminsOnce(fn, reason, ctx); }
|
|
531
|
+
} else if (status === 'skipped') {
|
|
532
|
+
store.updateFiring(id, (r) => ({ ...r, told: true }));
|
|
533
|
+
}
|
|
534
|
+
// missed ones are told together by the caller (or folded into the latest's notice)
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/** The admins hear once that a schedule's owner is gone (its firings are refused). */
|
|
538
|
+
async #tellAdminsOnce(fn: ScheduleFn, reason: string, ctx: ScheduleCtx): Promise<void> {
|
|
539
|
+
const row = this.store.schedule(fn.fn);
|
|
540
|
+
if (row?.adminsTold === reason) { return; }
|
|
541
|
+
await ctx.notifyAdmins({ title: `${fn.title} can't run`, body: `${fn.fn} runs as its owner, who can no longer use the hub. ${reason}` });
|
|
542
|
+
this.store.updateSchedule(fn.fn, (r) => ({ ...r, adminsTold: reason }));
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
/** Missed firings found together: one notice ("… missed 3 runs"), unless the schedule says never. */
|
|
546
|
+
async #tellMissed(fn: ScheduleFn, missed: readonly Occurrence[], ctx: ScheduleCtx): Promise<void> {
|
|
547
|
+
const store = this.store;
|
|
548
|
+
const ids = missed.map((occurrence) => `${fn.fn}@${String(occurrence.at)}:missed`);
|
|
549
|
+
const last = missed.at(-1);
|
|
550
|
+
if (last === undefined) { return; }
|
|
551
|
+
if (tells({ notify: payloadOf(fn).notify, status: 'missed', manual: false })) {
|
|
552
|
+
const body = missed.length === 1
|
|
553
|
+
? `It couldn't start in time for ${whenWords(last.key)}.`
|
|
554
|
+
: `It couldn't start in time for ${String(missed.length)} runs, the last on ${whenWords(last.key)}.`;
|
|
555
|
+
await this.#notify(fn, ctx, {
|
|
556
|
+
title: titleOf(fn.title, 'missed', missed.length), body, tone: 'info',
|
|
557
|
+
link: { page: schedule.page.item, path: [localOf(fn.fn)], query: { firing: last.key } },
|
|
558
|
+
});
|
|
559
|
+
for (const id of ids) {
|
|
560
|
+
const row = store.updateFiring(id, (r) => ({ ...r, told: true, value: { ...r.value, notified: true } }));
|
|
561
|
+
if (row !== undefined) { await this.#saveRecord(row, ctx); }
|
|
562
|
+
}
|
|
563
|
+
return;
|
|
564
|
+
}
|
|
565
|
+
for (const id of ids) { store.updateFiring(id, (r) => ({ ...r, told: true })); }
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
// ─── the kind's run ─────────────────────────────────────────────────────────
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* A run of a schedule fn: the timer's firing (`at` given) or "run now" (`at` absent). Works out the args from the
|
|
572
|
+
* program over `fire` and `previous`, calls the target as the run's child, follows it through a wait for approval,
|
|
573
|
+
* and records the firing with its summary. Only its owner runs it: a schedule runs as the person who made it.
|
|
574
|
+
*/
|
|
575
|
+
async runFiring(payload: SchedulePayload, at: number | undefined, ctx: ScheduleRunCtx): Promise<RunOutcome> {
|
|
576
|
+
const fn = ctx.run.fn;
|
|
577
|
+
const kindFn = this.#fns.get(fn);
|
|
578
|
+
if (kindFn !== undefined && ctx.run.user.id !== kindFn.owner) {
|
|
579
|
+
return ctx.fail('caller', `${fn} runs only as its owner, who made it. To have it run as you, copy it into a schedule of your own.`);
|
|
580
|
+
}
|
|
581
|
+
const store = this.store;
|
|
582
|
+
const now = this.#clock.now();
|
|
583
|
+
const manual = at === undefined;
|
|
584
|
+
const plannedAt = at ?? now;
|
|
585
|
+
const id = manual ? `${fn}@run:${ctx.run.id}` : plannedId(fn, plannedAt);
|
|
586
|
+
const key = store.firing(id)?.value.key ?? this.#keyAt(payload, plannedAt);
|
|
587
|
+
const schedRow = store.schedule(fn);
|
|
588
|
+
const late = manual ? 0 : Math.max(0, now - plannedAt);
|
|
589
|
+
const base = store.firing(id);
|
|
590
|
+
let row = store.putFiring({
|
|
591
|
+
id, fn, owner: ctx.run.user.id, at: plannedAt, status: 'running', missed: base?.missed ?? 0, byPerson: false, told: false, created: base?.created ?? now,
|
|
592
|
+
run: ctx.run.id, ...(base?.record === undefined ? {} : { record: base.record }),
|
|
593
|
+
value: { schedule: fn, version: kindFn?.version ?? schedRow?.version ?? 1, at: plannedAt, key, manual, status: 'running', run: ctx.run.id, startedAt: now, notified: false },
|
|
594
|
+
});
|
|
595
|
+
store.updateSchedule(fn, (r) => ({ ...r, count: r.count + 1 }));
|
|
596
|
+
const { day, time } = fromOccurrenceKey(key);
|
|
597
|
+
const fire: Fire = { at: plannedAt, local: localString(plannedAt, payload.zone), day, ...(time === undefined ? {} : { time }), zone: payload.zone, count: schedRow?.count ?? 0, late, manual };
|
|
598
|
+
// one save at a time, in order, for the run's person. Saved by the system outside the run, naming its owner: the
|
|
599
|
+
// schedule fn's mode is its target's, and a fn declared `read` (a reminder) may not save records in its run
|
|
600
|
+
let saving: Promise<unknown> = Promise.resolve();
|
|
601
|
+
const save = (change: (r: FiringRow) => FiringRow): Promise<void> => {
|
|
602
|
+
const next = store.updateFiring(id, change);
|
|
603
|
+
if (next === undefined) { return Promise.resolve(); }
|
|
604
|
+
row = next;
|
|
605
|
+
const system = this.#ctx;
|
|
606
|
+
// read again when its turn comes, so a save queued behind the first updates the record that one made
|
|
607
|
+
const latest = (): FiringRow => store.firing(id) ?? next;
|
|
608
|
+
saving = saving.then(() => (system === undefined ? this.#saveRecord(latest(), undefined, ctx) : this.#saveRecord(latest(), system))).catch((error: unknown) => { ctx.log.warn('schedule.record.failed', { id, error: error instanceof Error ? error.message : String(error) }); });
|
|
609
|
+
return saving.then(() => undefined);
|
|
610
|
+
};
|
|
611
|
+
const finish = async (status: FiringStatus, summary: string, extra: Partial<FiringShape> = {}): Promise<void> => {
|
|
612
|
+
await save((r) => ({ ...r, status, value: { ...r.value, ...extra, status, summary, endedAt: this.#clock.now() } }));
|
|
613
|
+
};
|
|
614
|
+
|
|
615
|
+
// the args, from the program over `fire` and `previous`, checked again against the target as it is now
|
|
616
|
+
let input: Json;
|
|
617
|
+
try {
|
|
618
|
+
const lookups = kindRunLookups(ctx);
|
|
619
|
+
const target = await lookups.fn(payload.fn);
|
|
620
|
+
if (target === undefined) { throw new ArgsFailed(`${payload.fn} is no longer a fn its owner can run.`); }
|
|
621
|
+
input = await evaluateArgs(payload.args, target, payload.fn, lookups, { fire, previous: schedRow?.previous }, ctx.signal);
|
|
622
|
+
} catch (error) {
|
|
623
|
+
if (!(error instanceof ArgsFailed)) { throw error; }
|
|
624
|
+
const summary = summaryLine({ status: 'failed', target: payload.fn, reason: error.message });
|
|
625
|
+
await finish('failed', summary);
|
|
626
|
+
return ctx.fail('caller', error.message);
|
|
627
|
+
}
|
|
628
|
+
await save((r) => ({ ...r, value: { ...r.value, args: input } }));
|
|
629
|
+
|
|
630
|
+
const call = ctx.call(payload.fn, input, { key: 'target' });
|
|
631
|
+
this.#handles.set(id, {
|
|
632
|
+
cancel: async (reason) => {
|
|
633
|
+
store.updateFiring(id, (r) => ({ ...r, reason }));
|
|
634
|
+
await call.cancel();
|
|
635
|
+
},
|
|
636
|
+
});
|
|
637
|
+
let doneText: string | undefined;
|
|
638
|
+
const unwatch = call.watch((update) => {
|
|
639
|
+
if (update.type !== 'status') { return; }
|
|
640
|
+
if (update.status === 'done' && update.text !== undefined) { doneText = update.text.one; }
|
|
641
|
+
if (update.status === 'awaiting-approval') { void this.#awaiting(id, payload, plannedAt, save, ctx); }
|
|
642
|
+
if (update.status === 'running' && store.firing(id)?.status === 'waiting') {
|
|
643
|
+
void save((r) => ({ ...r, status: 'running', until: undefined, value: { ...r.value, status: 'running' } }));
|
|
644
|
+
}
|
|
645
|
+
});
|
|
646
|
+
const settled = await call.settled;
|
|
647
|
+
unwatch();
|
|
648
|
+
this.#handles.delete(id);
|
|
649
|
+
await saving;
|
|
650
|
+
const reason = store.firing(id)?.reason;
|
|
651
|
+
const byPerson = ctx.signal.aborted;
|
|
652
|
+
switch (settled.status) {
|
|
653
|
+
case 'done': {
|
|
654
|
+
await finish('ran', summaryLine({ status: 'ran', target: payload.fn, result: settled.result, doneText, late, onTime: this.#settings.SCHEDULE_ON_TIME }));
|
|
655
|
+
this.#ran(fn, { at: plannedAt, status: 'ran', result: settled.result });
|
|
656
|
+
return ctx.done(settled.result);
|
|
657
|
+
}
|
|
658
|
+
case 'failed': {
|
|
659
|
+
await finish('failed', summaryLine({ status: 'failed', target: payload.fn, reason: settled.error.message, late, onTime: this.#settings.SCHEDULE_ON_TIME }));
|
|
660
|
+
this.#ran(fn, { at: plannedAt, status: 'failed' });
|
|
661
|
+
return ctx.fail(settled.error.class, settled.error.message, settled.error.code === undefined ? {} : { code: settled.error.code });
|
|
662
|
+
}
|
|
663
|
+
case 'cancelled': {
|
|
664
|
+
const status: FiringStatus = reason === 'expired' ? 'expired' : reason === 'refused' ? 'refused' : 'cancelled';
|
|
665
|
+
const words = this.#endWords(reason, payload, store.firing(id) ?? row);
|
|
666
|
+
store.updateFiring(id, (r) => ({ ...r, byPerson }));
|
|
667
|
+
await finish(status, summaryLine({ status, target: payload.fn, reason: words }));
|
|
668
|
+
return ctx.cancelled();
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
/** Why a firing's run ended when the schedule's rules ended it, in words. */
|
|
674
|
+
#endWords(reason: EndReason | undefined, payload: SchedulePayload, row: FiringRow): string | undefined {
|
|
675
|
+
switch (reason) {
|
|
676
|
+
case 'expired': return row.until !== undefined && row.until === nextFirings(payload.when, payload.zone, row.at + 1, 1)[0]?.at
|
|
677
|
+
? `It waited for approval to run ${payload.fn} until its next run was due.`
|
|
678
|
+
: `It waited ${spanWords(this.#settings.SCHEDULE_APPROVAL_WAIT)} for approval to run ${payload.fn}.`;
|
|
679
|
+
case 'refused': return `It needed approval to run ${payload.fn}, and scheduled runs that need approval are refused here: a policy that allows it lets it run.`;
|
|
680
|
+
case 'replaced': return 'The next run replaced it.';
|
|
681
|
+
case undefined: return undefined;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
/** A firing's target waits for approval: refused at once when the admin says so, else it waits until its next firing or the wait's end. */
|
|
686
|
+
async #awaiting(id: string, payload: SchedulePayload, plannedAt: number, save: (change: (r: FiringRow) => FiringRow) => Promise<void>, ctx: ScheduleRunCtx): Promise<void> {
|
|
687
|
+
if (this.#limits.approvals === 'refuse') {
|
|
688
|
+
await this.#handles.get(id)?.cancel('refused');
|
|
689
|
+
return;
|
|
690
|
+
}
|
|
691
|
+
const now = this.#clock.now();
|
|
692
|
+
const next = nextFirings(payload.when, payload.zone, plannedAt + 1, 1)[0]?.at;
|
|
693
|
+
const until = Math.min(next ?? Number.POSITIVE_INFINITY, now + this.#settings.SCHEDULE_APPROVAL_WAIT);
|
|
694
|
+
await save((r) => ({ ...r, status: 'waiting', until, value: { ...r.value, status: 'waiting' } }));
|
|
695
|
+
const work = this.#work;
|
|
696
|
+
if (work !== undefined) { work.work.enqueue(work.expire({ id }), { runAt: until }); }
|
|
697
|
+
ctx.log.info('schedule.waiting', { id, until });
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
/** A wait for approval reached its end: the firing gives up (its run is cancelled, and it is recorded as expired). */
|
|
701
|
+
async #expire(id: string): Promise<void> {
|
|
702
|
+
const row = this.#store?.firing(id);
|
|
703
|
+
if (row?.status !== 'waiting' || row.until === undefined || row.until > this.#clock.now()) { return; }
|
|
704
|
+
const handle = this.#handles.get(id);
|
|
705
|
+
if (handle !== undefined) { await handle.cancel('expired'); return; }
|
|
706
|
+
// its run is no longer in this process (a restart): recorded as expired, and told
|
|
707
|
+
await this.#chain(row.fn, () => this.#settle(id, { status: 'expired', reason: 'It waited for approval past its time.' }));
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
/** The firing ran or failed: `previous` for the next one, and a refusal may be told again. */
|
|
711
|
+
#ran(fn: string, previous: PreviousFiring): void {
|
|
712
|
+
this.store.updateSchedule(fn, (r) => ({ ...r, previous, ...(previous.status === 'ran' ? { refused: undefined, adminsTold: undefined } : {}) }));
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
/** The key of a "run now" at an instant: its day and minute in the schedule's zone (its day alone with no times). */
|
|
716
|
+
#keyAt(payload: SchedulePayload, at: number): ReturnType<typeof occurrenceKey> {
|
|
717
|
+
const { day, minute } = localNow(at, payload.zone);
|
|
718
|
+
const hasTimes = (payload.when.times ?? []).length > 0 || (payload.when.include ?? []).some((key) => key.length > 10);
|
|
719
|
+
const time = `${String(Math.floor(minute / 60)).padStart(2, '0')}:${String(minute % 60).padStart(2, '0')}`;
|
|
720
|
+
return occurrenceKey(day, hasTimes || minute > 0 ? time : undefined);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
// ─── settling and telling ───────────────────────────────────────────────────
|
|
724
|
+
|
|
725
|
+
/** A run settled (the hub's `run` event): its firing is told by the rules, and a firing queued behind it starts. */
|
|
726
|
+
async settled(event: Extract<SystemEvent, { type: 'run' }>, ctx: ScheduleCtx): Promise<void> {
|
|
727
|
+
if (event.update.type !== 'status' || this.#store === undefined) { return; }
|
|
728
|
+
const status = firingStatusOf(event.update.status);
|
|
729
|
+
if (status === undefined) { return; }
|
|
730
|
+
const row = this.#store.firingByRun(event.run);
|
|
731
|
+
if (row === undefined) { return; }
|
|
732
|
+
this.configure(ctx);
|
|
733
|
+
const text = event.update.text?.one;
|
|
734
|
+
await this.#chain(row.fn, async () => {
|
|
735
|
+
const current = this.store.firing(row.id);
|
|
736
|
+
if (current === undefined) { return; }
|
|
737
|
+
if (current.status === 'running' || current.status === 'waiting') {
|
|
738
|
+
// its run ended without this process recording it (a restart): what the hub says
|
|
739
|
+
await this.#settle(current.id, { status, reason: text });
|
|
740
|
+
}
|
|
741
|
+
await this.#tell(current.id, event.notified ?? false);
|
|
742
|
+
await this.#startQueued(row.fn, ctx);
|
|
743
|
+
await this.#prune(row.fn, ctx);
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
/** A firing whose run this process no longer follows, settled from what is known, recorded and told. */
|
|
748
|
+
async #settle(id: string, outcome: { status: FiringStatus; reason?: string | undefined }): Promise<void> {
|
|
749
|
+
const row = this.store.updateFiring(id, (r) => {
|
|
750
|
+
const summary = summaryLine({ status: outcome.status, target: payloadOf(this.#fns.get(r.fn))?.fn ?? r.fn, reason: outcome.reason });
|
|
751
|
+
return { ...r, status: outcome.status, until: undefined, value: { ...r.value, status: outcome.status, summary, endedAt: this.#clock.now() } };
|
|
752
|
+
});
|
|
753
|
+
if (row === undefined) { return; }
|
|
754
|
+
const ctx = this.#ctx;
|
|
755
|
+
if (ctx !== undefined) { await this.#saveRecord(row, ctx); }
|
|
756
|
+
await this.#tell(id, false);
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
/** The firing queued behind the one that just settled (overlap `queue`) starts now, late. */
|
|
760
|
+
async #startQueued(fn: string, ctx: ScheduleCtx): Promise<void> {
|
|
761
|
+
const row = this.store.schedule(fn);
|
|
762
|
+
const kindFn = this.#fns.get(fn);
|
|
763
|
+
if (row?.queued === undefined || kindFn === undefined || this.store.active(fn) !== undefined) { return; }
|
|
764
|
+
const queued = row.queued;
|
|
765
|
+
this.store.putSchedule({ ...row, queued: undefined });
|
|
766
|
+
const occurrence: Occurrence = { at: queued.at, key: queued.key, ...fromOccurrenceKey(queued.key) };
|
|
767
|
+
if (await this.#fire(kindFn, occurrence, ctx, { missedBefore: 0 }) === 'retry') {
|
|
768
|
+
// the hub went away meanwhile: it is queued again for when it is back
|
|
769
|
+
this.store.updateSchedule(fn, (r) => ({ ...r, queued }));
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Tell the owner about a settled firing, by the rules (`tells`), once: after its record is written, keyed per
|
|
775
|
+
* schedule (a newer notice replaces an unread one), linking to its run (or to the schedule's page at that firing).
|
|
776
|
+
*/
|
|
777
|
+
async #tell(id: string, notifiedByRun: boolean): Promise<void> {
|
|
778
|
+
const store = this.store;
|
|
779
|
+
const row = store.firing(id);
|
|
780
|
+
const ctx = this.#ctx;
|
|
781
|
+
if (row === undefined || row.told || ctx === undefined) { return; }
|
|
782
|
+
const fn = this.#fns.get(row.fn);
|
|
783
|
+
const reason = row.value.summary;
|
|
784
|
+
const schedRow = store.schedule(row.fn);
|
|
785
|
+
const tell = fn !== undefined && tells({
|
|
786
|
+
notify: payloadOf(fn).notify, status: row.status, manual: row.value.manual, notifiedByRun, byPerson: row.byPerson,
|
|
787
|
+
refusedBefore: schedRow?.refused, reason,
|
|
788
|
+
});
|
|
789
|
+
if (!tell) {
|
|
790
|
+
// a run that told its person itself (a reminder): the owner was notified of this firing, by its run
|
|
791
|
+
const told = store.updateFiring(id, (r) => ({ ...r, told: true, ...(notifiedByRun && row.status === 'ran' ? { value: { ...r.value, notified: true } } : {}) }));
|
|
792
|
+
if (notifiedByRun && row.status === 'ran' && told !== undefined) { await this.#saveRecord(told, ctx); }
|
|
793
|
+
return;
|
|
794
|
+
}
|
|
795
|
+
const missed = row.missed;
|
|
796
|
+
const body = missed > 0
|
|
797
|
+
? `Missed ${String(missed)} ${missed === 1 ? 'run' : 'runs'} before this one. ${row.value.summary ?? ''}`.trim()
|
|
798
|
+
: row.value.summary ?? titleOf(fn.title, row.status);
|
|
799
|
+
await this.#notify(fn, ctx, {
|
|
800
|
+
title: titleOf(fn.title, row.status), body, tone: toneOf(row.status),
|
|
801
|
+
link: row.value.run !== undefined && row.status !== 'skipped' && row.status !== 'refused'
|
|
802
|
+
? { run: row.value.run }
|
|
803
|
+
: { page: schedule.page.item, path: [localOf(fn.fn)], query: { firing: row.value.key } },
|
|
804
|
+
});
|
|
805
|
+
if (row.status === 'refused' && reason !== undefined) { store.updateSchedule(row.fn, (r) => ({ ...r, refused: reason })); }
|
|
806
|
+
const told = store.updateFiring(id, (r) => ({ ...r, told: true, value: { ...r.value, notified: true } }));
|
|
807
|
+
if (told !== undefined) { await this.#saveRecord(told, ctx); }
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
/** One notice to a schedule's owner, with the second link to its history and its key. */
|
|
811
|
+
async #notify(fn: ScheduleFn, ctx: ScheduleCtx, notice: Pick<Parameters<ScheduleCtx['runs']['notify']>[1], 'title' | 'body' | 'tone' | 'link'>): Promise<void> {
|
|
812
|
+
try {
|
|
813
|
+
await ctx.runs.notify(fn, {
|
|
814
|
+
...notice,
|
|
815
|
+
also: { label: 'History', link: { page: schedule.page.item, path: [localOf(fn.fn)], query: { tab: 'history' } } },
|
|
816
|
+
key: `schedule:${fn.fn}`,
|
|
817
|
+
});
|
|
818
|
+
} catch (error) {
|
|
819
|
+
ctx.log.warn('schedule.notify.failed', { fn: fn.fn, error: error instanceof Error ? error.message : String(error) });
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
// ─── records ────────────────────────────────────────────────────────────────
|
|
824
|
+
|
|
825
|
+
/**
|
|
826
|
+
* A firing's record saved: in its run, as the run's person; outside one, as the system, naming the owner of a new
|
|
827
|
+
* record (an existing one keeps its owner).
|
|
828
|
+
*/
|
|
829
|
+
async #saveRecord(row: FiringRow, ctx: ScheduleCtx | undefined, run?: ScheduleRunCtx): Promise<void> {
|
|
830
|
+
const value = FiringShape.parse(row.value);
|
|
831
|
+
if (run !== undefined) {
|
|
832
|
+
const saved = await run.data.save(schedule.types.Firing, value, row.record === undefined ? {} : { id: row.record });
|
|
833
|
+
this.store.updateFiring(row.id, (r) => ({ ...r, record: saved.id }));
|
|
834
|
+
return;
|
|
835
|
+
}
|
|
836
|
+
if (ctx === undefined) { return; }
|
|
837
|
+
try {
|
|
838
|
+
const saved = await ctx.data.save(schedule.types.Firing, value, row.record === undefined ? { owner: row.owner } : { id: row.record });
|
|
839
|
+
this.store.updateFiring(row.id, (r) => ({ ...r, record: saved.id }));
|
|
840
|
+
} catch (error) {
|
|
841
|
+
ctx.log.warn('schedule.record.failed', { id: row.id, error: error instanceof Error ? error.message : String(error) });
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
/** A schedule's firing records beyond the newest `keep.perSchedule`, or older than `keep.days`, removed (at most daily). */
|
|
846
|
+
async #prune(fn: string, ctx: ScheduleCtx): Promise<void> {
|
|
847
|
+
const row = this.store.schedule(fn);
|
|
848
|
+
const now = this.#clock.now();
|
|
849
|
+
if (row === undefined || (row.prunedAt !== undefined && now - row.prunedAt < PRUNE_EVERY)) { return; }
|
|
850
|
+
this.store.putSchedule({ ...row, prunedAt: now });
|
|
851
|
+
const { perSchedule, days } = this.#limits.keep;
|
|
852
|
+
const cutoff = now - days * DAY;
|
|
853
|
+
try {
|
|
854
|
+
let seen = 0;
|
|
855
|
+
let cursor: string | undefined;
|
|
856
|
+
do {
|
|
857
|
+
const page = await ctx.data.find(schedule.types.Firing, {
|
|
858
|
+
query: { filters: [{ field: 'schedule', op: 'is', value: fn }], sort: [{ field: 'at', dir: 'desc' }], limit: 100, ...(cursor === undefined ? {} : { cursor }) },
|
|
859
|
+
});
|
|
860
|
+
for (const record of page.items) {
|
|
861
|
+
seen += 1;
|
|
862
|
+
if (seen > perSchedule || record.value.at < cutoff) { await ctx.data.remove(schedule.types.Firing, record.id); }
|
|
863
|
+
}
|
|
864
|
+
cursor = page.cursor;
|
|
865
|
+
} while (cursor !== undefined);
|
|
866
|
+
} catch (error) {
|
|
867
|
+
ctx.log.warn('schedule.prune.failed', { fn, error: error instanceof Error ? error.message : String(error) });
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
// ─── plumbing ───────────────────────────────────────────────────────────────
|
|
872
|
+
|
|
873
|
+
/** Run work for one schedule after the work already chained for it. */
|
|
874
|
+
#chain(fn: string, work: () => Promise<void>): Promise<void> {
|
|
875
|
+
const before = this.#chains.get(fn) ?? Promise.resolve();
|
|
876
|
+
const next = before.then(work, work);
|
|
877
|
+
const kept = next.catch(() => undefined);
|
|
878
|
+
this.#chains.set(fn, kept);
|
|
879
|
+
void kept.then(() => { if (this.#chains.get(fn) === kept) { this.#chains.delete(fn); } });
|
|
880
|
+
return next;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
/** A queue handler's work, its failures logged (a wait is passed on to the queue). */
|
|
884
|
+
async #safely(what: string, work: () => Promise<void>): Promise<void> {
|
|
885
|
+
try {
|
|
886
|
+
await work();
|
|
887
|
+
} catch (error) {
|
|
888
|
+
if (error instanceof WorkDelayError) { throw error; }
|
|
889
|
+
this.#ctx?.log.error('schedule.work.failed', { what, error: error instanceof Error ? error.message : String(error) }, error);
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
|