fnloom 0.0.0-stage → 0.1.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 +162 -2
- package/package.json +77 -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 +66 -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 +109 -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 +12 -0
- package/packages/cli/src/io.ts +32 -0
- package/packages/cli/src/live.ts +66 -0
- package/packages/cli/src/local.ts +94 -0
- package/packages/cli/src/main.ts +6 -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 +93 -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/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 +302 -0
- package/scripts/start.ts +110 -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/claude/client/FleetPage.vue +132 -0
- package/systems/claude/client/NewSessionForm.vue +62 -0
- package/systems/claude/client/SessionList.vue +64 -0
- package/systems/claude/client/SessionPage.vue +199 -0
- package/systems/claude/client/TaskList.vue +61 -0
- package/systems/claude/client/fakes.ts +186 -0
- package/systems/claude/client/host.ts +23 -0
- package/systems/claude/client/index.ts +15 -0
- package/systems/claude/client/logic.ts +270 -0
- package/systems/claude/client/state.ts +344 -0
- package/systems/claude/package.json +23 -0
- package/systems/claude/server/agent-sdk.ts +379 -0
- package/systems/claude/server/driver.ts +153 -0
- package/systems/claude/server/env.ts +64 -0
- package/systems/claude/server/fake-driver.ts +112 -0
- package/systems/claude/server/fleet.ts +376 -0
- package/systems/claude/server/impl.ts +568 -0
- package/systems/claude/server/index.ts +8 -0
- package/systems/claude/server/main.ts +38 -0
- package/systems/claude/server/preview.ts +76 -0
- package/systems/claude/server/questions.ts +117 -0
- package/systems/claude/server/transcript.ts +83 -0
- package/systems/claude/shared/index.ts +262 -0
- package/systems/claude/shared/session.ts +284 -0
- package/systems/claude/shared/shapes.ts +106 -0
- package/systems/claude/system.json +18 -0
- package/systems/claude/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/database/package.json +25 -0
- package/systems/database/server/author.ts +41 -0
- package/systems/database/server/authoring.ts +322 -0
- package/systems/database/server/catalog.ts +117 -0
- package/systems/database/server/compile.ts +332 -0
- package/systems/database/server/dialects.ts +17 -0
- package/systems/database/server/drivers/database.ts +71 -0
- package/systems/database/server/drivers/index.ts +23 -0
- package/systems/database/server/drivers/postgres.ts +157 -0
- package/systems/database/server/drivers/sqlite.ts +151 -0
- package/systems/database/server/drivers/sqlserver.ts +176 -0
- package/systems/database/server/env.ts +35 -0
- package/systems/database/server/fixture.ts +169 -0
- package/systems/database/server/impl.ts +793 -0
- package/systems/database/server/index.ts +7 -0
- package/systems/database/server/instance.ts +398 -0
- package/systems/database/server/main.ts +47 -0
- package/systems/database/server/pick.ts +97 -0
- package/systems/database/server/queries.ts +390 -0
- package/systems/database/server/results.ts +39 -0
- package/systems/database/server/schema.ts +59 -0
- package/systems/database/server/table-fns.ts +237 -0
- package/systems/database/server/types.ts +253 -0
- package/systems/database/shared/index.ts +544 -0
- package/systems/database/shared/shapes.ts +413 -0
- package/systems/database/system.json +14 -0
- package/systems/database/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/web/client/ReadView.vue +110 -0
- package/systems/web/client/SearchView.vue +215 -0
- package/systems/web/client/StatusChip.vue +38 -0
- package/systems/web/client/fakes.ts +48 -0
- package/systems/web/client/index.ts +15 -0
- package/systems/web/client/view.ts +131 -0
- package/systems/web/package.json +22 -0
- package/systems/web/server/chrome.ts +121 -0
- package/systems/web/server/crawl.ts +333 -0
- package/systems/web/server/env.ts +63 -0
- package/systems/web/server/guard.ts +60 -0
- package/systems/web/server/http.ts +89 -0
- package/systems/web/server/impl.ts +203 -0
- package/systems/web/server/index.ts +71 -0
- package/systems/web/server/loader.ts +104 -0
- package/systems/web/server/main.ts +70 -0
- package/systems/web/server/mentions.ts +111 -0
- package/systems/web/server/problem.ts +72 -0
- package/systems/web/server/renderer.ts +243 -0
- package/systems/web/server/robots.ts +75 -0
- package/systems/web/server/searches.ts +29 -0
- package/systems/web/server/tavily.ts +144 -0
- package/systems/web/server/testing.ts +165 -0
- package/systems/web/server/uploads.ts +33 -0
- package/systems/web/shared/index.ts +343 -0
- package/systems/web/shared/urls.ts +60 -0
- package/systems/web/system.json +15 -0
- package/systems/web/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,626 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The planner the agent loop calls before every LLM call. It picks the session's chat mode and contextor (the
|
|
3
|
+
* session's override, else the agent payload's, else build 1's), measures the fixed part (the instructions with the
|
|
4
|
+
* mode's guide, the mode's tools, the current exchange), trims the current exchange when even that doesn't fit (the
|
|
5
|
+
* hub's blocks on the person's message first, then older tool results, then the newest one) or refuses with a plain
|
|
6
|
+
* message, asks the contextor for a selection within what is left, renders it with the mode, and checks the request's
|
|
7
|
+
* estimate against the budget. `maxTokens` and `contextWindow` go on every request. A session's system message lists,
|
|
8
|
+
* after the instructions, the systems its first turn found available (`fixedRegion`), the same every step so it caches.
|
|
9
|
+
*
|
|
10
|
+
* The agent's injected section (`{{injectedContext}}`, `injected.ts`) is part of the fixed region: worked out once at
|
|
11
|
+
* the start of a turn and kept for every step of it, counted in the fixed part, its items treated as loaded by every
|
|
12
|
+
* contextor and their fns among the agent's starting tools. At each new turn it is worked out again, and the session's
|
|
13
|
+
* `FixedRegionStamp` rewritten, only when the region's text changed (a system off, an approval, an admin's switch).
|
|
14
|
+
*/
|
|
15
|
+
import { plainDeferred } from '@aeye/schema';
|
|
16
|
+
import type { Logger } from '@ayepi/log';
|
|
17
|
+
import {
|
|
18
|
+
ChatModeConfig, compositeKey, ContextorConfig, DEFAULT_CHAT_MODE, DEFAULT_CONTEXTOR, flow, mapConcurrent, ModelChoice, namesModel, QualifiedName, type ActorId, type RunId, type AnnouncedSystem, type Exposure, type InjectedReport, type FnBlock, type FnRecord, type FnRefusal, type LlmMessage, type ModelFnNames, type ModelInfo,
|
|
19
|
+
type Json, type Session, type SessionId, type SelectionReport, type Turn, type TurnId,
|
|
20
|
+
} from '@harness/core';
|
|
21
|
+
import { LlmPayloadType, parseValue, type LlmPayload } from '@harness/sdk';
|
|
22
|
+
import type { Catalog } from '../catalog/index.ts';
|
|
23
|
+
import type { ModelResolver } from '../execution/models.ts';
|
|
24
|
+
import { systemsNow, systemsPrompt } from '../chat/announce.ts';
|
|
25
|
+
import { citationsPrompt } from '../chat/cite-rule.ts';
|
|
26
|
+
import { MODE_RANK } from '../fns/index.ts';
|
|
27
|
+
import type { HubStore } from '../store/index.ts';
|
|
28
|
+
import { budgetPlan } from './budget.ts';
|
|
29
|
+
import { CONTEXTORS } from './contextors.ts';
|
|
30
|
+
import { closeOpenCalls, exchanges, isPersonMessage, namedIn, personWords, shorten, textOf } from './history.ts';
|
|
31
|
+
import type {
|
|
32
|
+
BudgetPlan, CallPlan, CallProtocol, ChatMode, ChosenContext, ChosenFn, Contextor, ContextorDeps, ContextorInput, DraftInput, ExposedTo, ModeChoice, ModeContext, ModelCallOut, ModelLimitsService, Overflow,
|
|
33
|
+
ModeTool, PlanInput, PlannedPrompt, PromptPlanner, RenderedIteration, Selection, TokenEstimates, TokenEstimator,
|
|
34
|
+
} from './index.ts';
|
|
35
|
+
import { AUTO_MODEL } from './limits.ts';
|
|
36
|
+
import { fitInjected, fixedHash, gatherInjected, injectedFns, injectedShown, injectedTemplate, placeInjected, type InjectedGather } from './injected.ts';
|
|
37
|
+
import { PLAIN_EXAMPLES, promptExamples, spelled, type ExampleWriter, type ExamplesMode } from './examples.ts';
|
|
38
|
+
import { CHAT_MODES, modeNames } from './modes.ts';
|
|
39
|
+
import { broughtWords, contextBlock, earlierBlock, moreContext, type BroughtFnLines, type BroughtWords } from './render.ts';
|
|
40
|
+
import { MESSAGE_FRAMING } from './tokens.ts';
|
|
41
|
+
import { fnRefusal, readsAsMissing, refusalOf, usable } from './views.ts';
|
|
42
|
+
import type { AccessScope } from '../access/index.ts';
|
|
43
|
+
|
|
44
|
+
/** A prompt that cannot be made small enough for its model. Its message says both numbers in plain words. */
|
|
45
|
+
export class PromptTooLarge extends Error implements Overflow {
|
|
46
|
+
readonly report: Overflow['report'];
|
|
47
|
+
|
|
48
|
+
constructor(overflow: Overflow) {
|
|
49
|
+
super(overflow.message);
|
|
50
|
+
this.name = 'PromptTooLarge';
|
|
51
|
+
this.report = overflow.report;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** The chat mode and contextor a run uses: the session's, else the agent's, else build 1's. Defaults are filled in. */
|
|
56
|
+
export function modeChoice(session: Pick<Session, 'mode' | 'contextor'> | undefined, payload: Pick<LlmPayload, 'mode' | 'contextor'>): ModeChoice {
|
|
57
|
+
return {
|
|
58
|
+
mode: ChatModeConfig.parse(session?.mode ?? payload.mode ?? DEFAULT_CHAT_MODE),
|
|
59
|
+
contextor: ContextorConfig.parse(session?.contextor ?? payload.contextor ?? DEFAULT_CONTEXTOR),
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** How a prompt in a chat mode, speaking a protocol, shows fns' examples (`promptExamples`). */
|
|
64
|
+
export function examplesMode(mode: 'tools' | 'static', protocol: CallProtocol): ExamplesMode {
|
|
65
|
+
return mode === 'tools' ? 'tools' : protocol === 'text' ? 'text' : 'static';
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** Build the mode of a config. */
|
|
69
|
+
export function chatModeOf(config: ChatModeConfig, deps: ContextorDeps): ChatMode {
|
|
70
|
+
switch (config.type) {
|
|
71
|
+
case 'tools': return CHAT_MODES.tools(config, deps);
|
|
72
|
+
case 'static': return CHAT_MODES.static(config, deps);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** Build the contextor of a config. */
|
|
77
|
+
export function contextorOf(config: ContextorConfig, deps: ContextorDeps): Contextor {
|
|
78
|
+
switch (config.type) {
|
|
79
|
+
case 'plain': return CONTEXTORS.plain(config, deps);
|
|
80
|
+
case 'suggest': return CONTEXTORS.suggest(config, deps);
|
|
81
|
+
case 'graph': return CONTEXTORS.graph(config, deps);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** Context in the order a prompt shows it: a parent before its children, a chain in order, else by activation. */
|
|
86
|
+
export function contextOrder(chosen: readonly ChosenContext[]): ChosenContext[] {
|
|
87
|
+
const byName = new Map(chosen.map((c) => [c.record.name, c]));
|
|
88
|
+
const out: ChosenContext[] = [];
|
|
89
|
+
const placed = new Set<string>();
|
|
90
|
+
const place = (item: ChosenContext, path: Set<string>): void => {
|
|
91
|
+
if (placed.has(item.record.name) || path.has(item.record.name)) return;
|
|
92
|
+
path.add(item.record.name);
|
|
93
|
+
const before = [item.record.decl.parent, ...chosen.filter((c) => c.record.decl.next === item.record.name).map((c) => c.record.name)];
|
|
94
|
+
for (const name of before) { const first = name === undefined ? undefined : byName.get(name); if (first !== undefined) place(first, path); }
|
|
95
|
+
placed.add(item.record.name);
|
|
96
|
+
out.push(item);
|
|
97
|
+
};
|
|
98
|
+
for (const item of chosen) place(item, new Set());
|
|
99
|
+
return out;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** What blocks each fn the shown context brings, as `fnRefusal` says it (undefined for one that can be used). */
|
|
103
|
+
export type BroughtBlocks = ReadonlyMap<string, FnBlock | undefined>;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* A context item's brought fns as its block tells them: `added` only when this step's tools have them, `blocked` with
|
|
107
|
+
* the hub's reason when they can't be used now, `waiting` for the rest; one that reads as missing (unseen, not for the
|
|
108
|
+
* model) is not named at all.
|
|
109
|
+
*/
|
|
110
|
+
export function broughtLines(fns: readonly string[], inTools: ReadonlySet<string>, blocks: BroughtBlocks, words?: BroughtWords): BroughtFnLines {
|
|
111
|
+
const added: string[] = [];
|
|
112
|
+
const waiting: string[] = [];
|
|
113
|
+
const blocked: FnRefusal[] = [];
|
|
114
|
+
for (const fn of fns) {
|
|
115
|
+
const block = blocks.get(fn);
|
|
116
|
+
if (inTools.has(fn)) added.push(fn);
|
|
117
|
+
else if (block === undefined) waiting.push(fn);
|
|
118
|
+
else if (!readsAsMissing(block)) blocked.push(refusalOf(fn, block));
|
|
119
|
+
}
|
|
120
|
+
return { added, waiting, blocked, ...(words === undefined ? {} : { words }) };
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* The system message's text after the instructions: its fixed part (`fixedRegion`), context, earlier summaries, fn
|
|
125
|
+
* cards. Each context block names the fns it brings for what they are this step (`broughtLines`), from `held`, in the
|
|
126
|
+
* chat mode's `words` (`broughtWords`: in the tools, or cards run by name in the static toolset).
|
|
127
|
+
*/
|
|
128
|
+
export function contextRegion(fixed: string, selection: Pick<Selection, 'context' | 'earlier' | 'fns'>, systemEnd: string, held: BroughtBlocks = new Map(), words?: BroughtWords): string {
|
|
129
|
+
const ordered = contextOrder(selection.context);
|
|
130
|
+
const inTools = new Set<string>(selection.fns.filter((f) => f.detail !== 'listed').map((f) => f.view.record.name));
|
|
131
|
+
const blocks = ordered.filter((c) => c.detail !== 'listed').map((c) => contextBlock({
|
|
132
|
+
name: c.record.name, title: c.record.decl.title, detail: c.detail, text: c.text, fns: broughtLines(c.record.decl.fns, inTools, held, words), ...(c.choices === undefined ? {} : { choices: c.choices }),
|
|
133
|
+
}));
|
|
134
|
+
const listed = moreContext(ordered.filter((c) => c.detail === 'listed').map((c) => c.record));
|
|
135
|
+
return [fixed, ...blocks, listed, ...selection.earlier.map(earlierBlock), systemEnd].filter((part) => part !== '').join('\n\n');
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* What the system message always has after the instructions: the `<systems>` list, then the mode's guide, then the
|
|
140
|
+
* citation rule when the chat had citations on at its first turn (`citations`, from `chat/cite-rule.ts`). The list is
|
|
141
|
+
* the set snapshotted at the chat's first turn (`Session.announcedSystems.prompt`), in name order, never the set as it
|
|
142
|
+
* is now, so the prompt stays the same and caches; what changes later is told in the person's messages.
|
|
143
|
+
*/
|
|
144
|
+
export function fixedRegion(systems: readonly AnnouncedSystem[], guide: string, citations = '', detail: 'full' | 'summary' = 'full'): string {
|
|
145
|
+
return [systemsPrompt(systems, detail), guide, citations].filter((part) => part !== '').join('\n\n');
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** What the planner uses. */
|
|
149
|
+
export interface PlannerDeps extends ContextorDeps {
|
|
150
|
+
readonly store: HubStore;
|
|
151
|
+
readonly catalog: ContextorDeps['catalog'] & Pick<Catalog, 'entries' | 'modelNames' | 'availability'>;
|
|
152
|
+
readonly limits: Pick<ModelLimitsService, 'resolve'>;
|
|
153
|
+
readonly tokens: TokenEstimates;
|
|
154
|
+
/** The chat models the hub AI can call now (for whether a model takes native tools). */
|
|
155
|
+
readonly models: () => Promise<readonly ModelInfo[]>;
|
|
156
|
+
/** Which model a choice means (for previews, which have no agent run to ask). */
|
|
157
|
+
readonly resolver: Pick<ModelResolver, 'resolve'>;
|
|
158
|
+
readonly log: Logger;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/** One planning, inside the planner. */
|
|
162
|
+
interface Planning {
|
|
163
|
+
readonly session: Session | undefined;
|
|
164
|
+
readonly user: ActorId;
|
|
165
|
+
readonly turn: Turn | undefined;
|
|
166
|
+
readonly agent: FnRecord;
|
|
167
|
+
readonly model: string;
|
|
168
|
+
readonly instructions: string;
|
|
169
|
+
readonly transcript: readonly LlmMessage[];
|
|
170
|
+
readonly cached: SelectionReport | undefined;
|
|
171
|
+
/** Whether to keep the selection on the session (not for previews). */
|
|
172
|
+
readonly keep: boolean;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** An agent's injected section for one turn: its text, the context it shows and the fns it brings, and its report. */
|
|
176
|
+
interface InjectedPart {
|
|
177
|
+
readonly text: string;
|
|
178
|
+
readonly tokens: number;
|
|
179
|
+
/** Context items the section shows: already in the prompt, for every contextor. */
|
|
180
|
+
readonly shown: readonly QualifiedName[];
|
|
181
|
+
/** The fns its shown items bring: among the agent's starting tools. */
|
|
182
|
+
readonly fns: readonly QualifiedName[];
|
|
183
|
+
readonly cut: ReadonlyArray<{ what: string; why: string }>;
|
|
184
|
+
readonly report: InjectedReport | undefined;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/** An agent that takes no injected section (`injected: 'none'`). */
|
|
188
|
+
const NO_INJECTED: InjectedPart = { text: '', tokens: 0, shown: [], fns: [], cut: [], report: undefined };
|
|
189
|
+
|
|
190
|
+
/** The injected section as far as reading goes: done (none, or kept for this turn), or its items to fit. */
|
|
191
|
+
type Injecting = { readonly part: InjectedPart } | { readonly gathered: InjectedGather };
|
|
192
|
+
|
|
193
|
+
/** The planner. */
|
|
194
|
+
export class HubPromptPlanner implements PromptPlanner {
|
|
195
|
+
readonly #deps: PlannerDeps;
|
|
196
|
+
/** Each turn's injected section (by session, turn, agent and model), so every step of a turn sends the same fixed region. */
|
|
197
|
+
readonly #sections = new Map<string, InjectedPart>();
|
|
198
|
+
|
|
199
|
+
constructor(deps: PlannerDeps) {
|
|
200
|
+
this.#deps = deps;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
plan(input: PlanInput): Promise<PlannedPrompt> {
|
|
204
|
+
return this.#plan({
|
|
205
|
+
session: input.session, user: input.turn.user.id, turn: input.turn, agent: input.agent, model: input.model, instructions: input.instructions,
|
|
206
|
+
transcript: input.transcript, cached: input.cached, keep: true,
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
interpret(call: ModelCallOut, prompt: PlannedPrompt): Promise<CallPlan> {
|
|
211
|
+
return prompt.mode.interpret(call, prompt.rendered, { session: prompt.session, access: prompt.access });
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
async exposed(exposures: readonly Exposure[], to: ExposedTo): Promise<string> {
|
|
215
|
+
const chosen: ChosenFn[] = [];
|
|
216
|
+
for (const exposure of exposures) {
|
|
217
|
+
const view = await this.#deps.views.view(exposure.fn);
|
|
218
|
+
if (view !== undefined && usable(view.record, to.session, to.access)) chosen.push({ view, detail: exposure.detail, activation: 1 });
|
|
219
|
+
}
|
|
220
|
+
if (chosen.length === 0) return '';
|
|
221
|
+
const { mode, ctx } = await this.#mode(to.session, to.agent, to.model);
|
|
222
|
+
return mode.exposed(chosen, ctx);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/** The mode a session's agent uses with a model, and what it renders with. */
|
|
226
|
+
async #mode(session: Session | undefined, agent: FnRecord, model: string): Promise<{ mode: ChatMode; ctx: ModeContext; payload: LlmPayload; choice: ModeChoice; info: ModelInfo | undefined }> {
|
|
227
|
+
const payload = parseValue(LlmPayloadType, agent.decl.payload);
|
|
228
|
+
const choice = modeChoice(session, payload);
|
|
229
|
+
const mode = chatModeOf(choice.mode, this.#deps);
|
|
230
|
+
const info = (await this.#deps.models()).find((m) => namesModel(model, m));
|
|
231
|
+
const nativeTools = info?.capabilities.includes('tools') ?? true;
|
|
232
|
+
// the one fn name: every fn this prompt names is spelled as the model calls it in this mode
|
|
233
|
+
const names = modeNames(mode.type, await this.#deps.catalog.modelNames());
|
|
234
|
+
const protocol = mode.protocol(nativeTools);
|
|
235
|
+
// examples that aren't a tool's own: as the model would send them here (static `run`, or the fn's tool once loaded)
|
|
236
|
+
const writer = promptExamples(examplesMode(mode.type, protocol), names, info);
|
|
237
|
+
// an agent that takes its injected section at summary (a small window) takes the systems list and static tools brief too
|
|
238
|
+
const brief = payload.injected !== undefined && payload.injected !== 'none' && payload.injected.detail === 'summary';
|
|
239
|
+
return { mode, ctx: { estimator: await this.#deps.tokens.forModel(model), protocol, names, writer, ...(brief ? { brief } : {}) }, payload, choice, info };
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
async writeArgs(to: ExposedTo, calls: ReadonlyArray<{ readonly fn: QualifiedName; readonly args: Json }>): Promise<string[]> {
|
|
243
|
+
const { ctx } = await this.#mode(to.session, to.agent, to.model);
|
|
244
|
+
const writer = ctx.writer ?? PLAIN_EXAMPLES;
|
|
245
|
+
const views = await mapConcurrent(calls, (call) => this.#deps.views.view(call.fn));
|
|
246
|
+
return calls.map((call, index) => { const view = views[index]; return view === undefined ? JSON.stringify(call.args) : writer.args(view, call.args); });
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
async writerForRun(run: { readonly parent?: RunId | undefined; readonly user: { readonly id: ActorId } }): Promise<ExampleWriter | undefined> {
|
|
250
|
+
if (run.parent === undefined) return undefined;
|
|
251
|
+
const parent = await this.#deps.store.table('runs').get(run.parent);
|
|
252
|
+
const agent = parent === undefined ? undefined : await this.#deps.catalog.fn(parent.fn);
|
|
253
|
+
if (parent === undefined || agent === undefined) return undefined;
|
|
254
|
+
let payload: LlmPayload;
|
|
255
|
+
try {
|
|
256
|
+
payload = parseValue(LlmPayloadType, agent.decl.payload);
|
|
257
|
+
} catch {
|
|
258
|
+
// not an agent: a hub fn called from code
|
|
259
|
+
return undefined;
|
|
260
|
+
}
|
|
261
|
+
const session = parent.session === undefined ? undefined : await this.#deps.store.table('sessions').get(parent.session);
|
|
262
|
+
const metadata = await this.#deps.resolver.resolve(session?.model ?? ModelChoice.optional().parse(payload.model));
|
|
263
|
+
return this.writer({ session, agent, model: metadata.model ?? AUTO_MODEL, access: await this.#deps.access(run.user.id) }, false);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
async writer(to: ExposedTo, protect = true): Promise<ExampleWriter> {
|
|
267
|
+
const { mode, ctx, info } = await this.#mode(to.session, to.agent, to.model);
|
|
268
|
+
return protect ? ctx.writer ?? PLAIN_EXAMPLES : promptExamples(examplesMode(mode.type, ctx.protocol), ctx.names ?? modeNames(mode.type), info, false);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
async names(to: ExposedTo): Promise<ModelFnNames> {
|
|
272
|
+
const { ctx } = await this.#mode(to.session, to.agent, to.model);
|
|
273
|
+
return ctx.names ?? modeNames('tools');
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
async settled(input: { model: string; estimate: number; actual: number | undefined; used: readonly QualifiedName[] }): Promise<void> {
|
|
277
|
+
if (input.actual !== undefined && input.actual > 0 && input.model !== AUTO_MODEL) await this.#deps.tokens.observe(input.model, input.estimate, input.actual);
|
|
278
|
+
if (new Set(input.used).size >= 2) await this.#deps.graph.learn(input.used);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
async preview(sessionId: SessionId, text: string, by: ActorId): Promise<SelectionReport> {
|
|
282
|
+
const session = await this.#deps.store.table('sessions').get(sessionId);
|
|
283
|
+
if (session === undefined) throw new Error(`no session ${sessionId}`);
|
|
284
|
+
const agent = await this.#deps.catalog.fn(session.agent);
|
|
285
|
+
if (agent === undefined) throw new Error(`${session.agent} no longer exists`);
|
|
286
|
+
const payload = parseValue(LlmPayloadType, agent.decl.payload);
|
|
287
|
+
const metadata = await this.#deps.resolver.resolve(session.model ?? ModelChoice.optional().parse(payload.model));
|
|
288
|
+
const planned = await this.#plan({
|
|
289
|
+
session, user: by, turn: undefined, agent, model: metadata.model ?? AUTO_MODEL, instructions: payload.instructions,
|
|
290
|
+
transcript: [...session.transcript, { role: 'user', content: text }], cached: undefined, keep: false,
|
|
291
|
+
});
|
|
292
|
+
return planned.report;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
draft(input: DraftInput): Promise<PlannedPrompt> {
|
|
296
|
+
return this.#plan({ ...input, turn: undefined, cached: undefined, keep: false });
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
async #plan(planning: Planning): Promise<PlannedPrompt> {
|
|
300
|
+
const { session, agent, model } = planning;
|
|
301
|
+
// a call left without a reply (its turn stopped before it came back) gets one in the request: providers refuse a
|
|
302
|
+
// conversation holding an unanswered call, which would otherwise stop the chat for good
|
|
303
|
+
const all = exchanges(closeOpenCalls(planning.transcript));
|
|
304
|
+
const currentExchange = all.at(-1);
|
|
305
|
+
const history = all.slice(0, -1);
|
|
306
|
+
// what the prompt is built from, each read as soon as what it needs is known
|
|
307
|
+
const { chosen: { mode, ctx, payload, choice }, view, access, systems, tools, asked, injecting } = await flow()
|
|
308
|
+
.step('chosen', () => this.#mode(session, agent, model))
|
|
309
|
+
.step('view', () => this.#deps.limits.resolve(model))
|
|
310
|
+
.step('access', () => this.#deps.access(planning.user))
|
|
311
|
+
.step('asked', () => this.#asked(planning.turn, currentExchange?.messages ?? []))
|
|
312
|
+
.step('systems', ['access'], ({ access: scope }) => this.#systems(session, scope))
|
|
313
|
+
.step('tools', ['chosen'], ({ chosen: { mode: chatMode, ctx: modeCtx } }) => chatMode.fixedTools(modeCtx))
|
|
314
|
+
.step('injecting', ['chosen', 'access'], ({ chosen: { mode: chatMode, payload: agentPayload }, access: scope }) => this.#gather(planning, chatMode, agentPayload, scope))
|
|
315
|
+
.run();
|
|
316
|
+
const { estimator } = ctx;
|
|
317
|
+
const contextor = contextorOf(choice.contextor, this.#deps);
|
|
318
|
+
const guide = fixedRegion(systems, mode.guide(ctx), citationsPrompt(session), ctx.brief === true ? 'summary' : 'full');
|
|
319
|
+
const rest = MESSAGE_FRAMING + (guide === '' ? 0 : estimator.text(`\n\n${guide}`)) + tools.reduce((sum, t) => sum + estimator.tool(t.spec), 0);
|
|
320
|
+
// an agent that declares no `maxOutput` still gets a bound (`HARNESS_AGENT_MAX_OUTPUT`): a stuck model stops there
|
|
321
|
+
const cap = this.#deps.settings.HARNESS_AGENT_MAX_OUTPUT;
|
|
322
|
+
const maxOutput = payload.maxOutput ?? (cap > 0 ? cap : undefined);
|
|
323
|
+
const reserve = budgetPlan(view.limits, 0, this.#deps.settings.HARNESS_PROMPT_MARGIN, maxOutput);
|
|
324
|
+
// the injected section takes room from history and context, never from the current exchange: at most a share of what
|
|
325
|
+
// the model leaves after the rest of the fixed part, worked out from the model alone so it stays the same each turn
|
|
326
|
+
const bare = estimator.text(planning.instructions) + rest;
|
|
327
|
+
const share = Math.floor(this.#deps.settings.HARNESS_INJECTED_SHARE * Math.max(0, reserve.available - bare));
|
|
328
|
+
const injected = await this.#injectedPart(planning, injecting, { mode, ctx, payload, guide, room: share });
|
|
329
|
+
const instructions = placeInjected(planning.instructions, injected.text);
|
|
330
|
+
const head = estimator.text(instructions) + rest;
|
|
331
|
+
const fitted = this.#fitCurrent(currentExchange?.messages ?? [], reserve, head, estimator, model);
|
|
332
|
+
const plan = budgetPlan(view.limits, head + estimator.messages(fitted.messages), this.#deps.settings.HARNESS_PROMPT_MARGIN, maxOutput);
|
|
333
|
+
const query = currentExchange?.user ?? '';
|
|
334
|
+
// the fns the mode's own tools replace are never shown
|
|
335
|
+
const shown = (names: readonly string[]): string[] => names.filter((name) => !mode.replaces.has(name));
|
|
336
|
+
const inSection = new Set<string>(injected.shown);
|
|
337
|
+
const notInjected = (names: readonly string[]): string[] => names.filter((name) => !inSection.has(name));
|
|
338
|
+
|
|
339
|
+
const input = {
|
|
340
|
+
session, user: planning.user, access, turn: planning.turn?.id, agent, payload, query, history, current: fitted.messages,
|
|
341
|
+
// injected items are in the prompt already, so no contextor shows them again; the fns they bring are starting tools
|
|
342
|
+
always: { context: notInjected(payload.context), fns: shown([...payload.tools, ...injected.fns]) },
|
|
343
|
+
loaded: { context: notInjected(session?.context ?? []), fns: shown(session?.tools ?? []) },
|
|
344
|
+
...asked, asked: { context: notInjected(asked.asked.context), fns: shown(asked.asked.fns) }, person: planning.turn?.user, injected: injected.shown,
|
|
345
|
+
mode, ctx, plan, cached: planning.cached,
|
|
346
|
+
};
|
|
347
|
+
let selection = await this.#forTurn(await contextor.select(input), session, query);
|
|
348
|
+
let rendered = await spoken(await mode.render(selection, ctx));
|
|
349
|
+
let assembled = await this.#assemble(instructions, guide, selection, mode, rendered, estimator, await this.#held(selection, session, access));
|
|
350
|
+
// the parts' estimates can add up to less than the whole's: choose again with less room for the optional parts
|
|
351
|
+
// (the overshoot taken off, at least doubling each time) until it fits; refused only once no optional room is left
|
|
352
|
+
const room = Math.max(0, plan.flexible);
|
|
353
|
+
let taken = 0;
|
|
354
|
+
for (let tries = 0; assembled.estimate > plan.available; tries++) {
|
|
355
|
+
if (tries >= this.#deps.settings.HARNESS_MAX_RESELECTS || taken >= room) throw this.#tooLarge(model, assembled.estimate, plan, selection);
|
|
356
|
+
taken = Math.min(room, Math.max(taken * 2, taken + assembled.estimate - plan.available));
|
|
357
|
+
const tighter: BudgetPlan = { ...plan, flexible: plan.flexible - taken };
|
|
358
|
+
selection = await this.#forTurn(await contextor.select({ ...input, plan: tighter }), session, query);
|
|
359
|
+
rendered = await spoken(await mode.render(selection, ctx));
|
|
360
|
+
assembled = await this.#assemble(instructions, guide, selection, mode, rendered, estimator, await this.#held(selection, session, access));
|
|
361
|
+
}
|
|
362
|
+
const report: SelectionReport = {
|
|
363
|
+
...selection.report, mode: choice.mode.type, contextor: choice.contextor.type,
|
|
364
|
+
budget: { ...selection.report.budget, estimate: assembled.estimate, cut: [...injected.cut, ...fitted.cut, ...selection.report.budget.cut] },
|
|
365
|
+
...(injected.report === undefined ? {} : { injected: injected.report }),
|
|
366
|
+
};
|
|
367
|
+
if (report.budget.cut.length > 0) this.#deps.log.info('contextor.cut', { model, cut: report.budget.cut.map((c) => `${c.what}: ${c.why}`) });
|
|
368
|
+
this.#deps.log.debug('contextor.planned', { model, mode: choice.mode.type, contextor: choice.contextor.type, estimate: assembled.estimate, available: plan.available, window: view.limits.contextWindow });
|
|
369
|
+
if (planning.keep && session !== undefined && planning.turn !== undefined && choice.contextor.type === 'graph') await this.#keep(session.id, planning.turn.id, report);
|
|
370
|
+
return {
|
|
371
|
+
model, instructions: rendered.names.text(injectedTemplate(planning.instructions)), injectedContext: injected.text, context: assembled.context, messages: assembled.messages, tools: rendered.tools, maxTokens: plan.output + plan.reasoning, contextWindow: view.limits.contextWindow,
|
|
372
|
+
estimate: assembled.estimate, rendered, report, mode, ctx, session, access: input.access, ...(selection.considered === undefined ? {} : { considered: selection.considered }),
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* A selection as this turn shows it: only the fns the chat's fn mode allows (none at all in `none`; in `auto` all,
|
|
378
|
+
* since each call is asked about), each card with the examples most relevant to the turn.
|
|
379
|
+
*/
|
|
380
|
+
async #forTurn(selection: Selection, session: Session | undefined, query: string): Promise<Selection> {
|
|
381
|
+
const fns = this.#deps.fns;
|
|
382
|
+
if (fns === undefined) return selection;
|
|
383
|
+
const mode = session?.fnMode;
|
|
384
|
+
let chosen = mode === 'none' ? [] : selection.fns;
|
|
385
|
+
if (mode === 'read' || mode === 'write' || mode === 'delete') {
|
|
386
|
+
const modes = await fns.modes(chosen.map((fn) => fn.view.record.name));
|
|
387
|
+
chosen = chosen.filter((fn) => MODE_RANK[modes.get(fn.view.record.name) ?? 'write'] <= MODE_RANK[mode]);
|
|
388
|
+
}
|
|
389
|
+
const withExamples = await Promise.all(chosen.map(async (fn): Promise<ChosenFn> => (fn.detail === 'listed' ? fn : { ...fn, examples: await fns.examples(fn.view.record, query) })));
|
|
390
|
+
return { ...selection, fns: withExamples };
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* The systems a session's system prompt lists: its first turn's snapshot; before there is one (a preview), the set
|
|
395
|
+
* available now. An agent outside a chat gets none.
|
|
396
|
+
*/
|
|
397
|
+
async #systems(session: Session | undefined, access: AccessScope): Promise<readonly AnnouncedSystem[]> {
|
|
398
|
+
if (session === undefined) return [];
|
|
399
|
+
return session.announcedSystems?.prompt ?? (await systemsNow(this.#deps.store, access, session)).on;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/** What blocks each fn the selection's shown context brings (`fnRefusal`), for its blocks to say only what is true. */
|
|
403
|
+
async #held(selection: Selection, session: Session | undefined, access: AccessScope): Promise<BroughtBlocks> {
|
|
404
|
+
const names = new Set(selection.context.filter((c) => c.detail !== 'listed').flatMap((c) => c.record.decl.fns));
|
|
405
|
+
const records = await mapConcurrent(names, (name) => this.#deps.catalog.fn(name));
|
|
406
|
+
return new Map<string, FnBlock | undefined>([...names].map((name, index) => [name, fnRefusal(records[index], session, access)]));
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* The system region, the messages and the request's estimate. Out to the model, every fn the instructions, the region
|
|
411
|
+
* and the messages name (the hub's blocks on a person's message, results, background results, refusals) is spelled as
|
|
412
|
+
* the model calls it here, after one lookup of every name they hold (the tail and tools already are, `spoken`).
|
|
413
|
+
*/
|
|
414
|
+
async #assemble(instructions: string, guide: string, selection: Selection, mode: ChatMode, rendered: Awaited<ReturnType<ChatMode['render']>>, estimator: TokenEstimator, held: BroughtBlocks) {
|
|
415
|
+
const { names } = rendered;
|
|
416
|
+
const region = contextRegion(guide, selection, rendered.systemEnd, held, broughtWords(mode.type, rendered.protocol));
|
|
417
|
+
await names.learn([instructions, region, ...selection.linear.flatMap(messageTexts)]);
|
|
418
|
+
// its fns spelled, then its examples (kept from the speller) written as they are
|
|
419
|
+
const context = spelled(names, region);
|
|
420
|
+
const messages: LlmMessage[] = [...selection.linear.map((message) => spokenMessage(message, names)), ...(rendered.tail === undefined ? [] : [{ role: 'system' as const, content: plainDeferred(rendered.tail) }])];
|
|
421
|
+
const system = context === '' ? instructions : `${instructions}\n\n${context}`;
|
|
422
|
+
const estimate = estimator.message({ role: 'system', content: system }) + rendered.tools.reduce((sum, t) => sum + estimator.tool(t.spec), 0) + estimator.messages(messages);
|
|
423
|
+
return { context, messages, estimate };
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* The current exchange within `room` tokens: whole, else without the hub's blocks on the person's message, else with
|
|
428
|
+
* older tool results shortened, else with the newest shortened too; refused when even the person's words won't fit.
|
|
429
|
+
* `room` is what the budget leaves after the instructions, the mode's guide and its tools (`head`).
|
|
430
|
+
*/
|
|
431
|
+
#fitCurrent(messages: readonly LlmMessage[], reserve: BudgetPlan, head: number, estimator: TokenEstimator, model: string): { messages: LlmMessage[]; cut: Array<{ what: string; why: string }> } {
|
|
432
|
+
const room = reserve.available - head;
|
|
433
|
+
const cut: Array<{ what: string; why: string }> = [];
|
|
434
|
+
let current = [...messages];
|
|
435
|
+
const fits = (): boolean => estimator.messages(current) <= room;
|
|
436
|
+
if (fits()) return { messages: current, cut };
|
|
437
|
+
current = current.map((m) => (isPersonMessage(m) && typeof m.content === 'string' ? { ...m, content: personWords(m.content) } : m));
|
|
438
|
+
cut.push({ what: 'the hub\'s notes on the message', why: 'left out to fit the model\'s window' });
|
|
439
|
+
if (fits()) return { messages: current, cut };
|
|
440
|
+
const results = current.flatMap((m, i) => (m.role === 'tool' || (m.role === 'user' && !isPersonMessage(m)) ? [i] : []));
|
|
441
|
+
const newest = results.at(-1);
|
|
442
|
+
for (const i of results.slice(0, -1)) current[i] = shortenMessage(current[i], this.#deps.settings.HARNESS_OLD_RESULT_CHARS);
|
|
443
|
+
if (results.length > 1) cut.push({ what: `${results.length - 1} earlier tool results of this turn`, why: 'shortened to fit' });
|
|
444
|
+
if (fits()) return { messages: current, cut };
|
|
445
|
+
if (newest !== undefined) {
|
|
446
|
+
let chars = textOf(current[newest] ?? { role: 'tool', content: '' }).length;
|
|
447
|
+
while (!fits() && chars > this.#deps.settings.HARNESS_MIN_RESULT_CHARS) {
|
|
448
|
+
chars = Math.max(this.#deps.settings.HARNESS_MIN_RESULT_CHARS, Math.floor(chars / 2));
|
|
449
|
+
current[newest] = shortenMessage(messages[newest], chars);
|
|
450
|
+
}
|
|
451
|
+
cut.push({ what: 'the newest tool result', why: 'shortened to fit' });
|
|
452
|
+
if (fits()) return { messages: current, cut };
|
|
453
|
+
}
|
|
454
|
+
const words = estimator.messages(current);
|
|
455
|
+
const fit = Math.max(0, room);
|
|
456
|
+
throw new PromptTooLarge({
|
|
457
|
+
message: `This message is about ${words.toLocaleString('en-US')} tokens; ${model} takes ${fit.toLocaleString('en-US')} here. Shorten it or pick a model with a larger window.`,
|
|
458
|
+
report: { window: reserve.limits.contextWindow, output: reserve.output, reasoning: reserve.reasoning, margin: reserve.margin, fixed: head + words, pools: emptyPools(), estimate: head + words, cut },
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
#tooLarge(model: string, estimate: number, plan: BudgetPlan, selection: Selection): PromptTooLarge {
|
|
463
|
+
return new PromptTooLarge({
|
|
464
|
+
message: `This prompt is about ${estimate.toLocaleString('en-US')} tokens; ${model} takes ${plan.available.toLocaleString('en-US')} here. Shorten the message or pick a model with a larger window.`,
|
|
465
|
+
report: { ...selection.report.budget, estimate },
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/**
|
|
470
|
+
* What the agent's injected section is made of (`gatherInjected`: a dynamic item is written by its system), or the
|
|
471
|
+
* section itself when there is none or this turn's is kept already. Read alongside the rest of the prompt's parts.
|
|
472
|
+
*/
|
|
473
|
+
async #gather(planning: Planning, mode: ChatMode, payload: LlmPayload, access: AccessScope): Promise<Injecting> {
|
|
474
|
+
if (payload.injected === 'none') return { part: NO_INJECTED };
|
|
475
|
+
const key = this.#sectionKey(planning);
|
|
476
|
+
const kept = key === undefined ? undefined : this.#sections.get(key);
|
|
477
|
+
if (kept !== undefined) return { part: kept };
|
|
478
|
+
const { session, turn, agent } = planning;
|
|
479
|
+
const gathered = await gatherInjected(
|
|
480
|
+
{ store: this.#deps.store, catalog: this.#deps.catalog, dynamic: this.#deps.dynamic, fns: this.#deps.fns, parallel: this.#deps.settings.HARNESS_CONTEXT_PARALLEL },
|
|
481
|
+
{ agent, session, access, user: planning.user, person: turn?.user, mode: mode.type },
|
|
482
|
+
);
|
|
483
|
+
return { gathered };
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/** The key a turn's injected section is kept under for its steps; undefined when it is not kept (a preview, a run outside a chat). */
|
|
487
|
+
#sectionKey(planning: Planning): string | undefined {
|
|
488
|
+
const { session, turn, agent, model } = planning;
|
|
489
|
+
return planning.keep && session !== undefined && turn !== undefined ? compositeKey(session.id, turn.id, agent.name, model) : undefined;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* The agent's injected section for this turn (`injected.ts`): what reaches it, fitted to its detail and within its
|
|
494
|
+
* cap and `room`, with fn names as the model calls them here. Worked out once per turn and kept for its steps. At a
|
|
495
|
+
* turn's first step the fixed region's hash is compared with the session's stamp, and the stamp rewritten only when
|
|
496
|
+
* the region changed: then the report says so (`rebuilt`, with the items added and dropped) and the change is
|
|
497
|
+
* logged. A turn already stamped (the hub restarted mid-turn) keeps the items it was built with; changes wait for
|
|
498
|
+
* the next turn. The stamp is the session's own agent's; another agent run in the chat keeps its section for the
|
|
499
|
+
* turn in memory only. Previews and runs outside a chat work it out fresh and keep nothing.
|
|
500
|
+
*/
|
|
501
|
+
async #injectedPart(planning: Planning, injecting: Injecting, at: { mode: ChatMode; ctx: ModeContext; payload: LlmPayload; guide: string; room: number }): Promise<InjectedPart> {
|
|
502
|
+
if ('part' in injecting) return injecting.part;
|
|
503
|
+
const { gathered } = injecting;
|
|
504
|
+
const taken = at.payload.injected === undefined || at.payload.injected === 'none' ? { detail: 'full' as const } : at.payload.injected;
|
|
505
|
+
const { session, turn, agent } = planning;
|
|
506
|
+
const key = this.#sectionKey(planning);
|
|
507
|
+
// the stamp is the session's own agent's: another agent run in the chat (a sub-agent) works its section out alone
|
|
508
|
+
const own = key !== undefined && session?.agent === agent.name;
|
|
509
|
+
const stamp = own ? session.fixed : undefined;
|
|
510
|
+
const sameTurn = stamp !== undefined && turn !== undefined && stamp.at === turn.id;
|
|
511
|
+
const items = sameTurn ? gathered.items.filter((item) => stamp.injected.includes(item.name)) : gathered.items;
|
|
512
|
+
const names = at.ctx.names ?? modeNames(at.mode.type);
|
|
513
|
+
// the names the items' texts hold are looked up in one batch before they are spelled
|
|
514
|
+
await names.learn(items.flatMap((item) => [item.title, item.full, item.summary]));
|
|
515
|
+
const fitted = fitInjected(items, {
|
|
516
|
+
detail: taken.detail ?? 'full', room: Math.min(taken.maxTokens ?? Number.POSITIVE_INFINITY, at.room), estimator: at.ctx.estimator, render: (text) => names.text(text),
|
|
517
|
+
});
|
|
518
|
+
const placed = fitted.placed.map((p) => p.item.name);
|
|
519
|
+
let rebuilt: InjectedReport['rebuilt'];
|
|
520
|
+
if (own && turn !== undefined) {
|
|
521
|
+
const hash = fixedHash(`${placeInjected(planning.instructions, fitted.text)}\n\n${at.guide}`);
|
|
522
|
+
if (stamp?.hash !== hash) {
|
|
523
|
+
await this.#deps.store.table('sessions').update(session.id, { fixed: { hash, injected: placed, at: turn.id } });
|
|
524
|
+
if (stamp !== undefined) {
|
|
525
|
+
rebuilt = { added: placed.filter((name) => !stamp.injected.includes(name)), dropped: stamp.injected.filter((name) => !placed.includes(name)) };
|
|
526
|
+
this.#deps.log.info('contextor.fixed-rebuilt', { session: session.id, turn: turn.id, agent: agent.name, ...rebuilt });
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
const part: InjectedPart = {
|
|
531
|
+
text: fitted.text, tokens: fitted.tokens, shown: injectedShown(fitted.placed), fns: injectedFns(fitted.placed), cut: fitted.cut,
|
|
532
|
+
report: {
|
|
533
|
+
tokens: fitted.tokens,
|
|
534
|
+
items: fitted.placed.map((p) => ({ name: p.item.name, detail: p.detail, tokens: p.tokens })),
|
|
535
|
+
leftOut: [...gathered.leftOut, ...fitted.noFit].map((left) => ({ name: left.name, why: left.why, reason: left.reason })),
|
|
536
|
+
...(rebuilt === undefined ? {} : { rebuilt }),
|
|
537
|
+
},
|
|
538
|
+
};
|
|
539
|
+
if (key !== undefined) {
|
|
540
|
+
this.#sections.set(key, part);
|
|
541
|
+
for (const old of this.#sections.keys()) {
|
|
542
|
+
if (this.#sections.size <= this.#deps.settings.HARNESS_INJECTED_STEPS) break;
|
|
543
|
+
this.#sections.delete(old);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
return part;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
/** What the current message asks for: its `/command` context (with each command's args), and the fns its person names (`fs/bash`, `@` mentions). */
|
|
550
|
+
async #asked(turn: Turn | undefined, current: readonly LlmMessage[]): Promise<Pick<ContextorInput, 'asked' | 'commands'>> {
|
|
551
|
+
const row = turn?.message === undefined ? undefined : await this.#deps.store.table('messages').get(turn.message);
|
|
552
|
+
const commands = (row?.parts ?? []).flatMap((part) => (part.type === 'command' ? [part] : []));
|
|
553
|
+
const context = commands.map((part) => part.context);
|
|
554
|
+
const person = current.find(isPersonMessage);
|
|
555
|
+
const named = person === undefined ? [] : namedIn(personWords(textOf(person)));
|
|
556
|
+
const parsed = named.flatMap((name) => { const one = QualifiedName.safeParse(name); return one.success ? [one.data] : []; });
|
|
557
|
+
const records = await mapConcurrent(parsed, (name) => this.#deps.catalog.fn(name));
|
|
558
|
+
const fns = parsed.filter((_name, index) => records[index] !== undefined);
|
|
559
|
+
return { asked: { context, fns }, commands: new Map(commands.map((part) => [part.context, part.args])) };
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
/** Keep a graph selection on the session, for the next cycle's `selectedBefore`. */
|
|
563
|
+
async #keep(session: SessionId, turn: TurnId, report: SelectionReport): Promise<void> {
|
|
564
|
+
await this.#deps.store.table('sessions').update(session, { selection: { turn, items: [...report.context, ...report.fns], at: this.#deps.clock() } });
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* A rendered iteration as the model reads it: its tools' descriptions and its trailing card message with every fn they
|
|
570
|
+
* name spelled as the model calls it here (`ModelFnNames.text`). The system region is spelled when it is assembled.
|
|
571
|
+
*/
|
|
572
|
+
export async function spoken(rendered: RenderedIteration): Promise<RenderedIteration> {
|
|
573
|
+
const { names } = rendered;
|
|
574
|
+
// every name the tools and the tail hold, looked up in one batch first
|
|
575
|
+
await names.learn([
|
|
576
|
+
rendered.tail, ...rendered.tools.flatMap((tool) => [tool.description, tool.instructions, tool.spec.description, ...schemaDescriptions(tool.spec.parameters)]),
|
|
577
|
+
]);
|
|
578
|
+
const tools = rendered.tools.map((tool): ModeTool => ({
|
|
579
|
+
...tool,
|
|
580
|
+
description: names.text(tool.description),
|
|
581
|
+
...(tool.instructions === undefined ? {} : { instructions: names.text(tool.instructions) }),
|
|
582
|
+
spec: {
|
|
583
|
+
...tool.spec,
|
|
584
|
+
...(tool.spec.description === undefined ? {} : { description: names.text(tool.spec.description) }),
|
|
585
|
+
parameters: spokenSchema(tool.spec.parameters, names),
|
|
586
|
+
},
|
|
587
|
+
}));
|
|
588
|
+
return { ...rendered, tools, ...(rendered.tail === undefined ? {} : { tail: names.text(rendered.tail) }) };
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
/** The `description` texts of a JSON schema, at any depth (a field's own words, which may name fns). */
|
|
592
|
+
function schemaDescriptions(schema: Json): string[] {
|
|
593
|
+
if (Array.isArray(schema)) return schema.flatMap(schemaDescriptions);
|
|
594
|
+
if (schema === null || typeof schema !== 'object') return [];
|
|
595
|
+
return Object.entries(schema).flatMap(([key, value]) => (key === 'description' && typeof value === 'string' ? [value] : schemaDescriptions(value)));
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
/** A JSON schema with its `description` texts spelled for the model; patterns, enums and defaults are left as they are. */
|
|
599
|
+
function spokenSchema(schema: Json, names: ModelFnNames): Json {
|
|
600
|
+
if (Array.isArray(schema)) return schema.map((item) => spokenSchema(item, names));
|
|
601
|
+
if (schema === null || typeof schema !== 'object') return schema;
|
|
602
|
+
return Object.fromEntries(Object.entries(schema).map(([key, value]) => [key, key === 'description' && typeof value === 'string' ? names.text(value) : spokenSchema(value, names)]));
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
/** The texts of a message the hub spells (a person's, a tool's or a system message; the model's own words stay its own). */
|
|
606
|
+
function messageTexts(message: LlmMessage): string[] {
|
|
607
|
+
if (message.role === 'assistant') return [];
|
|
608
|
+
return typeof message.content === 'string' ? [message.content] : message.content.flatMap((part) => (part.type === 'text' ? [part.content] : []));
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
/** A message with every fn its text names spelled as the model calls it here (after `learn` over `messageTexts`). */
|
|
612
|
+
function spokenMessage(message: LlmMessage, names: ModelFnNames): LlmMessage {
|
|
613
|
+
if (message.role === 'assistant') return message;
|
|
614
|
+
if (typeof message.content === 'string') return { ...message, content: spelled(names, message.content) };
|
|
615
|
+
return { ...message, content: message.content.map((part) => (part.type === 'text' ? { ...part, content: spelled(names, part.content) } : part)) };
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
/** A message with its text shortened to `max` characters (string content only). */
|
|
619
|
+
function shortenMessage(message: LlmMessage | undefined, max: number): LlmMessage {
|
|
620
|
+
if (message === undefined) return { role: 'tool', content: '' };
|
|
621
|
+
return typeof message.content === 'string' ? { ...message, content: shorten(message.content, max) } : message;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
function emptyPools() {
|
|
625
|
+
return { history: { asked: 0, got: 0 }, context: { asked: 0, got: 0 }, fns: { asked: 0, got: 0 } };
|
|
626
|
+
}
|