@vibesdotdev/docs 0.0.0-stage → 1.0.0-rc.2
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 +18 -0
- package/README.md +74 -2
- package/dist/cli/cli.plugin.d.ts +14 -0
- package/dist/cli/cli.plugin.d.ts.map +1 -0
- package/dist/cli/cli.plugin.js +57 -0
- package/dist/cli/cli.plugin.js.map +1 -0
- package/dist/cli/commands/docs.list.command.descriptor.d.ts +33 -0
- package/dist/cli/commands/docs.list.command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/docs.list.command.descriptor.js +34 -0
- package/dist/cli/commands/docs.list.command.descriptor.js.map +1 -0
- package/dist/cli/commands/docs.list.command.impl.d.ts +25 -0
- package/dist/cli/commands/docs.list.command.impl.d.ts.map +1 -0
- package/dist/cli/commands/docs.list.command.impl.js +87 -0
- package/dist/cli/commands/docs.list.command.impl.js.map +1 -0
- package/dist/cli/commands/docs.show.command.descriptor.d.ts +44 -0
- package/dist/cli/commands/docs.show.command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/docs.show.command.descriptor.js +48 -0
- package/dist/cli/commands/docs.show.command.descriptor.js.map +1 -0
- package/dist/cli/commands/docs.show.command.impl.d.ts +26 -0
- package/dist/cli/commands/docs.show.command.impl.d.ts.map +1 -0
- package/dist/cli/commands/docs.show.command.impl.js +82 -0
- package/dist/cli/commands/docs.show.command.impl.js.map +1 -0
- package/dist/cli/commands/generate/docs.generate.cli-command.descriptor.d.ts +4 -0
- package/dist/cli/commands/generate/docs.generate.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/generate/docs.generate.cli-command.descriptor.js +58 -0
- package/dist/cli/commands/generate/docs.generate.cli-command.descriptor.js.map +1 -0
- package/dist/cli/commands/generate/docs.generate.cli-command.impl.d.ts +24 -0
- package/dist/cli/commands/generate/docs.generate.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/commands/generate/docs.generate.cli-command.impl.js +283 -0
- package/dist/cli/commands/generate/docs.generate.cli-command.impl.js.map +1 -0
- package/dist/cli/commands/man/man.cli-command.descriptor.d.ts +4 -0
- package/dist/cli/commands/man/man.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/man/man.cli-command.descriptor.js +32 -0
- package/dist/cli/commands/man/man.cli-command.descriptor.js.map +1 -0
- package/dist/cli/commands/man/man.cli-command.impl.d.ts +23 -0
- package/dist/cli/commands/man/man.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/commands/man/man.cli-command.impl.js +22 -0
- package/dist/cli/commands/man/man.cli-command.impl.js.map +1 -0
- package/dist/cli/commands/open/docs.open.cli-command.descriptor.d.ts +4 -0
- package/dist/cli/commands/open/docs.open.cli-command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/open/docs.open.cli-command.descriptor.js +18 -0
- package/dist/cli/commands/open/docs.open.cli-command.descriptor.js.map +1 -0
- package/dist/cli/commands/open/docs.open.cli-command.impl.d.ts +14 -0
- package/dist/cli/commands/open/docs.open.cli-command.impl.d.ts.map +1 -0
- package/dist/cli/commands/open/docs.open.cli-command.impl.js +52 -0
- package/dist/cli/commands/open/docs.open.cli-command.impl.js.map +1 -0
- package/dist/cli/commands/search.command.descriptor.d.ts +36 -0
- package/dist/cli/commands/search.command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/search.command.descriptor.js +35 -0
- package/dist/cli/commands/search.command.descriptor.js.map +1 -0
- package/dist/cli/commands/search.command.impl.d.ts +25 -0
- package/dist/cli/commands/search.command.impl.d.ts.map +1 -0
- package/dist/cli/commands/search.command.impl.js +113 -0
- package/dist/cli/commands/search.command.impl.js.map +1 -0
- package/dist/cli/directives/card.d.ts +11 -0
- package/dist/cli/directives/card.d.ts.map +1 -0
- package/dist/cli/directives/card.js +18 -0
- package/dist/cli/directives/card.js.map +1 -0
- package/dist/cli/directives/descriptor.d.ts +11 -0
- package/dist/cli/directives/descriptor.d.ts.map +1 -0
- package/dist/cli/directives/descriptor.js +20 -0
- package/dist/cli/directives/descriptor.js.map +1 -0
- package/dist/cli/directives/endpoint.d.ts +8 -0
- package/dist/cli/directives/endpoint.d.ts.map +1 -0
- package/dist/cli/directives/endpoint.js +31 -0
- package/dist/cli/directives/endpoint.js.map +1 -0
- package/dist/cli/directives/index.d.ts +9 -0
- package/dist/cli/directives/index.d.ts.map +1 -0
- package/dist/cli/directives/index.js +37 -0
- package/dist/cli/directives/index.js.map +1 -0
- package/dist/cli/directives/install.d.ts +12 -0
- package/dist/cli/directives/install.d.ts.map +1 -0
- package/dist/cli/directives/install.js +27 -0
- package/dist/cli/directives/install.js.map +1 -0
- package/dist/cli/directives/shell.d.ts +10 -0
- package/dist/cli/directives/shell.d.ts.map +1 -0
- package/dist/cli/directives/shell.js +16 -0
- package/dist/cli/directives/shell.js.map +1 -0
- package/dist/cli/directives/usage.d.ts +9 -0
- package/dist/cli/directives/usage.d.ts.map +1 -0
- package/dist/cli/directives/usage.js +13 -0
- package/dist/cli/directives/usage.js.map +1 -0
- package/dist/cli/docs/docs.cli.docs.descriptor.d.ts +22 -0
- package/dist/cli/docs/docs.cli.docs.descriptor.d.ts.map +1 -0
- package/dist/cli/docs/docs.cli.docs.descriptor.js +92 -0
- package/dist/cli/docs/docs.cli.docs.descriptor.js.map +1 -0
- package/dist/cli/docs.cli-group.descriptor.d.ts +4 -0
- package/dist/cli/docs.cli-group.descriptor.d.ts.map +1 -0
- package/dist/cli/docs.cli-group.descriptor.js +11 -0
- package/dist/cli/docs.cli-group.descriptor.js.map +1 -0
- package/dist/client/citations.d.ts +11 -0
- package/dist/client/citations.d.ts.map +1 -0
- package/dist/client/citations.js +197 -0
- package/dist/client/citations.js.map +1 -0
- package/dist/client/docs-client.d.ts +51 -0
- package/dist/client/docs-client.d.ts.map +1 -0
- package/dist/client/docs-client.js +298 -0
- package/dist/client/docs-client.js.map +1 -0
- package/dist/client/index.d.ts +12 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +13 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/types.d.ts +26 -0
- package/dist/client/types.d.ts.map +1 -0
- package/dist/client/types.js +2 -0
- package/dist/client/types.js.map +1 -0
- package/dist/config/docs.svelte.config.descriptor.d.ts +50 -0
- package/dist/config/docs.svelte.config.descriptor.d.ts.map +1 -0
- package/dist/config/docs.svelte.config.descriptor.js +46 -0
- package/dist/config/docs.svelte.config.descriptor.js.map +1 -0
- package/dist/config/documents.source-refresh.config.descriptor.d.ts +41 -0
- package/dist/config/documents.source-refresh.config.descriptor.d.ts.map +1 -0
- package/dist/config/documents.source-refresh.config.descriptor.js +39 -0
- package/dist/config/documents.source-refresh.config.descriptor.js.map +1 -0
- package/dist/directives/index.d.ts +4 -0
- package/dist/directives/index.d.ts.map +1 -0
- package/dist/directives/index.js +3 -0
- package/dist/directives/index.js.map +1 -0
- package/dist/directives/registry.d.ts +31 -0
- package/dist/directives/registry.d.ts.map +1 -0
- package/dist/directives/registry.js +65 -0
- package/dist/directives/registry.js.map +1 -0
- package/dist/directives/types.d.ts +33 -0
- package/dist/directives/types.d.ts.map +1 -0
- package/dist/directives/types.js +2 -0
- package/dist/directives/types.js.map +1 -0
- package/dist/docs/agent-voice.docs.descriptor.d.ts +30 -0
- package/dist/docs/agent-voice.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/agent-voice.docs.descriptor.js +107 -0
- package/dist/docs/agent-voice.docs.descriptor.js.map +1 -0
- package/dist/docs/charts.usage.docs.descriptor.d.ts +27 -0
- package/dist/docs/charts.usage.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/charts.usage.docs.descriptor.js +90 -0
- package/dist/docs/charts.usage.docs.descriptor.js.map +1 -0
- package/dist/docs/command-palette.actions.docs.descriptor.d.ts +25 -0
- package/dist/docs/command-palette.actions.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/command-palette.actions.docs.descriptor.js +80 -0
- package/dist/docs/command-palette.actions.docs.descriptor.js.map +1 -0
- package/dist/docs/docs.directives.docs.descriptor.d.ts +22 -0
- package/dist/docs/docs.directives.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/docs.directives.docs.descriptor.js +104 -0
- package/dist/docs/docs.directives.docs.descriptor.js.map +1 -0
- package/dist/docs/docs.topics.docs.descriptor.d.ts +22 -0
- package/dist/docs/docs.topics.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/docs.topics.docs.descriptor.js +90 -0
- package/dist/docs/docs.topics.docs.descriptor.js.map +1 -0
- package/dist/docs/fleet-pairing-direct.docs.descriptor.d.ts +30 -0
- package/dist/docs/fleet-pairing-direct.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/fleet-pairing-direct.docs.descriptor.js +93 -0
- package/dist/docs/fleet-pairing-direct.docs.descriptor.js.map +1 -0
- package/dist/docs/fleet-pairing-mdns.docs.descriptor.d.ts +30 -0
- package/dist/docs/fleet-pairing-mdns.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/fleet-pairing-mdns.docs.descriptor.js +88 -0
- package/dist/docs/fleet-pairing-mdns.docs.descriptor.js.map +1 -0
- package/dist/docs/fleet-pairing-platform.docs.descriptor.d.ts +30 -0
- package/dist/docs/fleet-pairing-platform.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/fleet-pairing-platform.docs.descriptor.js +101 -0
- package/dist/docs/fleet-pairing-platform.docs.descriptor.js.map +1 -0
- package/dist/docs/fleet-pairing.docs.descriptor.d.ts +28 -0
- package/dist/docs/fleet-pairing.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/fleet-pairing.docs.descriptor.js +89 -0
- package/dist/docs/fleet-pairing.docs.descriptor.js.map +1 -0
- package/dist/docs/getting-started-cli.docs.descriptor.d.ts +4 -0
- package/dist/docs/getting-started-cli.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/getting-started-cli.docs.descriptor.js +141 -0
- package/dist/docs/getting-started-cli.docs.descriptor.js.map +1 -0
- package/dist/docs/getting-started.concepts.docs.descriptor.d.ts +4 -0
- package/dist/docs/getting-started.concepts.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/getting-started.concepts.docs.descriptor.js +100 -0
- package/dist/docs/getting-started.concepts.docs.descriptor.js.map +1 -0
- package/dist/docs/getting-started.docs.descriptor.d.ts +4 -0
- package/dist/docs/getting-started.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/getting-started.docs.descriptor.js +63 -0
- package/dist/docs/getting-started.docs.descriptor.js.map +1 -0
- package/dist/docs/getting-started.first-query.docs.descriptor.d.ts +4 -0
- package/dist/docs/getting-started.first-query.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/getting-started.first-query.docs.descriptor.js +95 -0
- package/dist/docs/getting-started.first-query.docs.descriptor.js.map +1 -0
- package/dist/docs/guided-flows.flows.docs.descriptor.d.ts +22 -0
- package/dist/docs/guided-flows.flows.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/guided-flows.flows.docs.descriptor.js +114 -0
- package/dist/docs/guided-flows.flows.docs.descriptor.js.map +1 -0
- package/dist/docs/runtime-rpc-relay.docs.descriptor.d.ts +19 -0
- package/dist/docs/runtime-rpc-relay.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/runtime-rpc-relay.docs.descriptor.js +140 -0
- package/dist/docs/runtime-rpc-relay.docs.descriptor.js.map +1 -0
- package/dist/docs/tutorials.ai-text-generation.docs.descriptor.d.ts +4 -0
- package/dist/docs/tutorials.ai-text-generation.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/tutorials.ai-text-generation.docs.descriptor.js +115 -0
- package/dist/docs/tutorials.ai-text-generation.docs.descriptor.js.map +1 -0
- package/dist/docs/tutorials.build-an-app.docs.descriptor.d.ts +4 -0
- package/dist/docs/tutorials.build-an-app.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/tutorials.build-an-app.docs.descriptor.js +172 -0
- package/dist/docs/tutorials.build-an-app.docs.descriptor.js.map +1 -0
- package/dist/docs/tutorials.crud-collection.docs.descriptor.d.ts +4 -0
- package/dist/docs/tutorials.crud-collection.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/tutorials.crud-collection.docs.descriptor.js +142 -0
- package/dist/docs/tutorials.crud-collection.docs.descriptor.js.map +1 -0
- package/dist/docs/tutorials.docs.descriptor.d.ts +4 -0
- package/dist/docs/tutorials.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/tutorials.docs.descriptor.js +52 -0
- package/dist/docs/tutorials.docs.descriptor.js.map +1 -0
- package/dist/docs/tutorials.runtime-plugin.docs.descriptor.d.ts +4 -0
- package/dist/docs/tutorials.runtime-plugin.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/tutorials.runtime-plugin.docs.descriptor.js +121 -0
- package/dist/docs/tutorials.runtime-plugin.docs.descriptor.js.map +1 -0
- package/dist/docs.plugin.d.ts +12 -0
- package/dist/docs.plugin.d.ts.map +1 -0
- package/dist/docs.plugin.js +118 -0
- package/dist/docs.plugin.js.map +1 -0
- package/dist/documents/documents.cloud.plugin.d.ts +3 -0
- package/dist/documents/documents.cloud.plugin.d.ts.map +1 -0
- package/dist/documents/documents.cloud.plugin.js +26 -0
- package/dist/documents/documents.cloud.plugin.js.map +1 -0
- package/dist/documents/documents.consumer.plugin.d.ts +3 -0
- package/dist/documents/documents.consumer.plugin.d.ts.map +1 -0
- package/dist/documents/documents.consumer.plugin.js +26 -0
- package/dist/documents/documents.consumer.plugin.js.map +1 -0
- package/dist/documents/documents.plugin.d.ts +3 -0
- package/dist/documents/documents.plugin.d.ts.map +1 -0
- package/dist/documents/documents.plugin.js +33 -0
- package/dist/documents/documents.plugin.js.map +1 -0
- package/dist/documents/docx/client.d.ts +56 -0
- package/dist/documents/docx/client.d.ts.map +1 -0
- package/dist/documents/docx/client.js +90 -0
- package/dist/documents/docx/client.js.map +1 -0
- package/dist/documents/docx/extract.d.ts +12 -0
- package/dist/documents/docx/extract.d.ts.map +1 -0
- package/dist/documents/docx/extract.js +62 -0
- package/dist/documents/docx/extract.js.map +1 -0
- package/dist/documents/docx/generator.d.ts +49 -0
- package/dist/documents/docx/generator.d.ts.map +1 -0
- package/dist/documents/docx/generator.js +101 -0
- package/dist/documents/docx/generator.js.map +1 -0
- package/dist/documents/docx/index.d.ts +19 -0
- package/dist/documents/docx/index.d.ts.map +1 -0
- package/dist/documents/docx/index.js +16 -0
- package/dist/documents/docx/index.js.map +1 -0
- package/dist/documents/docx/kinds.d.ts +10 -0
- package/dist/documents/docx/kinds.d.ts.map +1 -0
- package/dist/documents/docx/kinds.js +11 -0
- package/dist/documents/docx/kinds.js.map +1 -0
- package/dist/documents/docx/plugin/docx.plugin.d.ts +9 -0
- package/dist/documents/docx/plugin/docx.plugin.d.ts.map +1 -0
- package/dist/documents/docx/plugin/docx.plugin.js +35 -0
- package/dist/documents/docx/plugin/docx.plugin.js.map +1 -0
- package/dist/documents/docx/schemas/generator.d.ts +10 -0
- package/dist/documents/docx/schemas/generator.d.ts.map +1 -0
- package/dist/documents/docx/schemas/generator.js +2 -0
- package/dist/documents/docx/schemas/generator.js.map +1 -0
- package/dist/documents/docx/schemas/index.d.ts +4 -0
- package/dist/documents/docx/schemas/index.d.ts.map +1 -0
- package/dist/documents/docx/schemas/index.js +2 -0
- package/dist/documents/docx/schemas/index.js.map +1 -0
- package/dist/documents/docx/schemas/runtime.d.ts +68 -0
- package/dist/documents/docx/schemas/runtime.d.ts.map +1 -0
- package/dist/documents/docx/schemas/runtime.js +30 -0
- package/dist/documents/docx/schemas/runtime.js.map +1 -0
- package/dist/documents/docx/schemas/template-registry.d.ts +21 -0
- package/dist/documents/docx/schemas/template-registry.d.ts.map +1 -0
- package/dist/documents/docx/schemas/template-registry.js +2 -0
- package/dist/documents/docx/schemas/template-registry.js.map +1 -0
- package/dist/documents/docx/templates/index.d.ts +3 -0
- package/dist/documents/docx/templates/index.d.ts.map +1 -0
- package/dist/documents/docx/templates/index.js +2 -0
- package/dist/documents/docx/templates/index.js.map +1 -0
- package/dist/documents/docx/templates/loader.d.ts +20 -0
- package/dist/documents/docx/templates/loader.d.ts.map +1 -0
- package/dist/documents/docx/templates/loader.js +36 -0
- package/dist/documents/docx/templates/loader.js.map +1 -0
- package/dist/documents/docx/templates/types.d.ts +2 -0
- package/dist/documents/docx/templates/types.d.ts.map +1 -0
- package/dist/documents/docx/templates/types.js +2 -0
- package/dist/documents/docx/templates/types.js.map +1 -0
- package/dist/documents/index.d.ts +4 -0
- package/dist/documents/index.d.ts.map +1 -0
- package/dist/documents/index.js +4 -0
- package/dist/documents/index.js.map +1 -0
- package/dist/documents/outline/parse-outline.d.ts +132 -0
- package/dist/documents/outline/parse-outline.d.ts.map +1 -0
- package/dist/documents/outline/parse-outline.js +246 -0
- package/dist/documents/outline/parse-outline.js.map +1 -0
- package/dist/documents/plugin.d.ts +3 -0
- package/dist/documents/plugin.d.ts.map +1 -0
- package/dist/documents/plugin.js +13 -0
- package/dist/documents/plugin.js.map +1 -0
- package/dist/documents/presentations/capabilities/index.d.ts +3 -0
- package/dist/documents/presentations/capabilities/index.d.ts.map +1 -0
- package/dist/documents/presentations/capabilities/index.js +3 -0
- package/dist/documents/presentations/capabilities/index.js.map +1 -0
- package/dist/documents/presentations/capabilities/presentations.directory.impl.consumer.worker.d.ts +333 -0
- package/dist/documents/presentations/capabilities/presentations.directory.impl.consumer.worker.d.ts.map +1 -0
- package/dist/documents/presentations/capabilities/presentations.directory.impl.consumer.worker.js +101 -0
- package/dist/documents/presentations/capabilities/presentations.directory.impl.consumer.worker.js.map +1 -0
- package/dist/documents/presentations/capabilities/presentations.directory.kind.d.ts +65 -0
- package/dist/documents/presentations/capabilities/presentations.directory.kind.d.ts.map +1 -0
- package/dist/documents/presentations/capabilities/presentations.directory.kind.js +152 -0
- package/dist/documents/presentations/capabilities/presentations.directory.kind.js.map +1 -0
- package/dist/documents/presentations/capabilities/presentations.surface.kind.d.ts +68 -0
- package/dist/documents/presentations/capabilities/presentations.surface.kind.d.ts.map +1 -0
- package/dist/documents/presentations/capabilities/presentations.surface.kind.js +100 -0
- package/dist/documents/presentations/capabilities/presentations.surface.kind.js.map +1 -0
- package/dist/documents/presentations/client/contracts.d.ts +20 -0
- package/dist/documents/presentations/client/contracts.d.ts.map +1 -0
- package/dist/documents/presentations/client/contracts.js +2 -0
- package/dist/documents/presentations/client/contracts.js.map +1 -0
- package/dist/documents/presentations/client/index.d.ts +5 -0
- package/dist/documents/presentations/client/index.d.ts.map +1 -0
- package/dist/documents/presentations/client/index.js +5 -0
- package/dist/documents/presentations/client/index.js.map +1 -0
- package/dist/documents/presentations/client/presentations.runtime-client.descriptor.d.ts +4 -0
- package/dist/documents/presentations/client/presentations.runtime-client.descriptor.d.ts.map +1 -0
- package/dist/documents/presentations/client/presentations.runtime-client.descriptor.js +13 -0
- package/dist/documents/presentations/client/presentations.runtime-client.descriptor.js.map +1 -0
- package/dist/documents/presentations/client/presentations.runtime-client.impl.d.ts +711 -0
- package/dist/documents/presentations/client/presentations.runtime-client.impl.d.ts.map +1 -0
- package/dist/documents/presentations/client/presentations.runtime-client.impl.js +72 -0
- package/dist/documents/presentations/client/presentations.runtime-client.impl.js.map +1 -0
- package/dist/documents/presentations/docs/presentations.docs.descriptor.d.ts +4 -0
- package/dist/documents/presentations/docs/presentations.docs.descriptor.d.ts.map +1 -0
- package/dist/documents/presentations/docs/presentations.docs.descriptor.js +54 -0
- package/dist/documents/presentations/docs/presentations.docs.descriptor.js.map +1 -0
- package/dist/documents/presentations/index.d.ts +8 -0
- package/dist/documents/presentations/index.d.ts.map +1 -0
- package/dist/documents/presentations/index.js +8 -0
- package/dist/documents/presentations/index.js.map +1 -0
- package/dist/documents/presentations/presentations.consumer.plugin.d.ts +4 -0
- package/dist/documents/presentations/presentations.consumer.plugin.d.ts.map +1 -0
- package/dist/documents/presentations/presentations.consumer.plugin.js +16 -0
- package/dist/documents/presentations/presentations.consumer.plugin.js.map +1 -0
- package/dist/documents/presentations/presentations.plugin.d.ts +3 -0
- package/dist/documents/presentations/presentations.plugin.d.ts.map +1 -0
- package/dist/documents/presentations/presentations.plugin.js +48 -0
- package/dist/documents/presentations/presentations.plugin.js.map +1 -0
- package/dist/documents/presentations/review-read-authority.d.ts +117 -0
- package/dist/documents/presentations/review-read-authority.d.ts.map +1 -0
- package/dist/documents/presentations/review-read-authority.js +74 -0
- package/dist/documents/presentations/review-read-authority.js.map +1 -0
- package/dist/documents/presentations/schemas/index.d.ts +5 -0
- package/dist/documents/presentations/schemas/index.d.ts.map +1 -0
- package/dist/documents/presentations/schemas/index.js +5 -0
- package/dist/documents/presentations/schemas/index.js.map +1 -0
- package/dist/documents/presentations/schemas/owner.d.ts +28 -0
- package/dist/documents/presentations/schemas/owner.d.ts.map +1 -0
- package/dist/documents/presentations/schemas/owner.js +18 -0
- package/dist/documents/presentations/schemas/owner.js.map +1 -0
- package/dist/documents/presentations/schemas/request.d.ts +325 -0
- package/dist/documents/presentations/schemas/request.d.ts.map +1 -0
- package/dist/documents/presentations/schemas/request.js +169 -0
- package/dist/documents/presentations/schemas/request.js.map +1 -0
- package/dist/documents/presentations/schemas/review.d.ts +154 -0
- package/dist/documents/presentations/schemas/review.d.ts.map +1 -0
- package/dist/documents/presentations/schemas/review.js +83 -0
- package/dist/documents/presentations/schemas/review.js.map +1 -0
- package/dist/documents/presentations/schemas/surface.d.ts +315 -0
- package/dist/documents/presentations/schemas/surface.d.ts.map +1 -0
- package/dist/documents/presentations/schemas/surface.js +125 -0
- package/dist/documents/presentations/schemas/surface.js.map +1 -0
- package/dist/documents/presentations/state-machine.d.ts +36 -0
- package/dist/documents/presentations/state-machine.d.ts.map +1 -0
- package/dist/documents/presentations/state-machine.js +158 -0
- package/dist/documents/presentations/state-machine.js.map +1 -0
- package/dist/documents/presentations/storage/index.d.ts +3 -0
- package/dist/documents/presentations/storage/index.d.ts.map +1 -0
- package/dist/documents/presentations/storage/index.js +3 -0
- package/dist/documents/presentations/storage/index.js.map +1 -0
- package/dist/documents/presentations/storage/owner-app.d.ts +12 -0
- package/dist/documents/presentations/storage/owner-app.d.ts.map +1 -0
- package/dist/documents/presentations/storage/owner-app.js +43 -0
- package/dist/documents/presentations/storage/owner-app.js.map +1 -0
- package/dist/documents/presentations/storage/owner-transforms.d.ts +476 -0
- package/dist/documents/presentations/storage/owner-transforms.d.ts.map +1 -0
- package/dist/documents/presentations/storage/owner-transforms.js +77 -0
- package/dist/documents/presentations/storage/owner-transforms.js.map +1 -0
- package/dist/documents/presentations/storage/records.d.ts +227 -0
- package/dist/documents/presentations/storage/records.d.ts.map +1 -0
- package/dist/documents/presentations/storage/records.js +145 -0
- package/dist/documents/presentations/storage/records.js.map +1 -0
- package/dist/documents/presentations/tools/presentations.tool.descriptor.d.ts +543 -0
- package/dist/documents/presentations/tools/presentations.tool.descriptor.d.ts.map +1 -0
- package/dist/documents/presentations/tools/presentations.tool.descriptor.js +47 -0
- package/dist/documents/presentations/tools/presentations.tool.descriptor.js.map +1 -0
- package/dist/documents/presentations/tools/presentations.tool.impl.consumer.d.ts +8 -0
- package/dist/documents/presentations/tools/presentations.tool.impl.consumer.d.ts.map +1 -0
- package/dist/documents/presentations/tools/presentations.tool.impl.consumer.js +68 -0
- package/dist/documents/presentations/tools/presentations.tool.impl.consumer.js.map +1 -0
- package/dist/documents/presentations/tools/presentations.tool.schemas.d.ts +504 -0
- package/dist/documents/presentations/tools/presentations.tool.schemas.d.ts.map +1 -0
- package/dist/documents/presentations/tools/presentations.tool.schemas.js +76 -0
- package/dist/documents/presentations/tools/presentations.tool.schemas.js.map +1 -0
- package/dist/documents/render/grid.d.ts +96 -0
- package/dist/documents/render/grid.d.ts.map +1 -0
- package/dist/documents/render/grid.js +115 -0
- package/dist/documents/render/grid.js.map +1 -0
- package/dist/documents/render/index.d.ts +2 -0
- package/dist/documents/render/index.d.ts.map +1 -0
- package/dist/documents/render/index.js +2 -0
- package/dist/documents/render/index.js.map +1 -0
- package/dist/documents/render/render.impl.cloud.d.ts +25 -0
- package/dist/documents/render/render.impl.cloud.d.ts.map +1 -0
- package/dist/documents/render/render.impl.cloud.js +245 -0
- package/dist/documents/render/render.impl.cloud.js.map +1 -0
- package/dist/documents/render/render.impl.consumer.d.ts +35 -0
- package/dist/documents/render/render.impl.consumer.d.ts.map +1 -0
- package/dist/documents/render/render.impl.consumer.js +104 -0
- package/dist/documents/render/render.impl.consumer.js.map +1 -0
- package/dist/documents/render/render.interface.d.ts +147 -0
- package/dist/documents/render/render.interface.d.ts.map +1 -0
- package/dist/documents/render/render.interface.js +90 -0
- package/dist/documents/render/render.interface.js.map +1 -0
- package/dist/documents/schemas/ai-service-binding.schema.d.ts +11 -0
- package/dist/documents/schemas/ai-service-binding.schema.d.ts.map +1 -0
- package/dist/documents/schemas/ai-service-binding.schema.js +8 -0
- package/dist/documents/schemas/ai-service-binding.schema.js.map +1 -0
- package/dist/documents/schemas/document-read.schema.d.ts +107 -0
- package/dist/documents/schemas/document-read.schema.d.ts.map +1 -0
- package/dist/documents/schemas/document-read.schema.js +124 -0
- package/dist/documents/schemas/document-read.schema.js.map +1 -0
- package/dist/documents/schemas/document-view.schema.d.ts +74 -0
- package/dist/documents/schemas/document-view.schema.d.ts.map +1 -0
- package/dist/documents/schemas/document-view.schema.js +66 -0
- package/dist/documents/schemas/document-view.schema.js.map +1 -0
- package/dist/documents/schemas/index.d.ts +3 -0
- package/dist/documents/schemas/index.d.ts.map +1 -0
- package/dist/documents/schemas/index.js +3 -0
- package/dist/documents/schemas/index.js.map +1 -0
- package/dist/documents/schemas/page-cache.schema.d.ts +29 -0
- package/dist/documents/schemas/page-cache.schema.d.ts.map +1 -0
- package/dist/documents/schemas/page-cache.schema.js +50 -0
- package/dist/documents/schemas/page-cache.schema.js.map +1 -0
- package/dist/documents/storage/index.d.ts +3 -0
- package/dist/documents/storage/index.d.ts.map +1 -0
- package/dist/documents/storage/index.js +2 -0
- package/dist/documents/storage/index.js.map +1 -0
- package/dist/documents/storage/page-cache.descriptor.d.ts +17 -0
- package/dist/documents/storage/page-cache.descriptor.d.ts.map +1 -0
- package/dist/documents/storage/page-cache.descriptor.js +45 -0
- package/dist/documents/storage/page-cache.descriptor.js.map +1 -0
- package/dist/documents/tools/descriptors.d.ts +248 -0
- package/dist/documents/tools/descriptors.d.ts.map +1 -0
- package/dist/documents/tools/descriptors.js +78 -0
- package/dist/documents/tools/descriptors.js.map +1 -0
- package/dist/documents/tools/document-read-loop-guard.d.ts +61 -0
- package/dist/documents/tools/document-read-loop-guard.d.ts.map +1 -0
- package/dist/documents/tools/document-read-loop-guard.js +314 -0
- package/dist/documents/tools/document-read-loop-guard.js.map +1 -0
- package/dist/documents/tools/document-read.impl.d.ts +77 -0
- package/dist/documents/tools/document-read.impl.d.ts.map +1 -0
- package/dist/documents/tools/document-read.impl.js +1139 -0
- package/dist/documents/tools/document-read.impl.js.map +1 -0
- package/dist/documents/tools/document-view.impl.d.ts +45 -0
- package/dist/documents/tools/document-view.impl.d.ts.map +1 -0
- package/dist/documents/tools/document-view.impl.js +168 -0
- package/dist/documents/tools/document-view.impl.js.map +1 -0
- package/dist/documents/tools/index.d.ts +3 -0
- package/dist/documents/tools/index.d.ts.map +1 -0
- package/dist/documents/tools/index.js +6 -0
- package/dist/documents/tools/index.js.map +1 -0
- package/dist/documents/tools/source-refresh.d.ts +33 -0
- package/dist/documents/tools/source-refresh.d.ts.map +1 -0
- package/dist/documents/tools/source-refresh.js +127 -0
- package/dist/documents/tools/source-refresh.js.map +1 -0
- package/dist/documents/tools/unavailable.impl.d.ts +5 -0
- package/dist/documents/tools/unavailable.impl.d.ts.map +1 -0
- package/dist/documents/tools/unavailable.impl.js +12 -0
- package/dist/documents/tools/unavailable.impl.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/descriptors/vibes-platform.prompt.descriptor.d.ts +113 -0
- package/dist/prompts/descriptors/vibes-platform.prompt.descriptor.d.ts.map +1 -0
- package/dist/prompts/descriptors/vibes-platform.prompt.descriptor.js +35 -0
- package/dist/prompts/descriptors/vibes-platform.prompt.descriptor.js.map +1 -0
- package/dist/render/ansi.d.ts +86 -0
- package/dist/render/ansi.d.ts.map +1 -0
- package/dist/render/ansi.js +125 -0
- package/dist/render/ansi.js.map +1 -0
- package/dist/render/frontmatter.d.ts +21 -0
- package/dist/render/frontmatter.d.ts.map +1 -0
- package/dist/render/frontmatter.js +57 -0
- package/dist/render/frontmatter.js.map +1 -0
- package/dist/render/index.d.ts +10 -0
- package/dist/render/index.d.ts.map +1 -0
- package/dist/render/index.js +6 -0
- package/dist/render/index.js.map +1 -0
- package/dist/render/parse.d.ts +29 -0
- package/dist/render/parse.d.ts.map +1 -0
- package/dist/render/parse.js +145 -0
- package/dist/render/parse.js.map +1 -0
- package/dist/render/sections.d.ts +24 -0
- package/dist/render/sections.d.ts.map +1 -0
- package/dist/render/sections.js +76 -0
- package/dist/render/sections.js.map +1 -0
- package/dist/render/terminal.d.ts +15 -0
- package/dist/render/terminal.d.ts.map +1 -0
- package/dist/render/terminal.js +293 -0
- package/dist/render/terminal.js.map +1 -0
- package/dist/runbooks/index.d.ts +4 -0
- package/dist/runbooks/index.d.ts.map +1 -0
- package/dist/runbooks/index.js +3 -0
- package/dist/runbooks/index.js.map +1 -0
- package/dist/runbooks/runbooks.plugin.d.ts +3 -0
- package/dist/runbooks/runbooks.plugin.d.ts.map +1 -0
- package/dist/runbooks/runbooks.plugin.js +3 -0
- package/dist/runbooks/runbooks.plugin.js.map +1 -0
- package/dist/schemas/citations.schema.d.ts +21 -0
- package/dist/schemas/citations.schema.d.ts.map +1 -0
- package/dist/schemas/citations.schema.js +17 -0
- package/dist/schemas/citations.schema.js.map +1 -0
- package/dist/schemas/index.d.ts +4 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +3 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/topic.schema.d.ts +179 -0
- package/dist/schemas/topic.schema.d.ts.map +1 -0
- package/dist/schemas/topic.schema.js +15 -0
- package/dist/schemas/topic.schema.js.map +1 -0
- package/dist/svelte/build/highlight.d.ts +33 -0
- package/dist/svelte/build/highlight.d.ts.map +1 -0
- package/dist/svelte/build/highlight.js +95 -0
- package/dist/svelte/build/topic-index.d.ts +96 -0
- package/dist/svelte/build/topic-index.d.ts.map +1 -0
- package/dist/svelte/build/topic-index.js +247 -0
- package/dist/svelte/context.d.ts +12 -0
- package/dist/svelte/context.d.ts.map +1 -0
- package/dist/svelte/context.js +16 -0
- package/dist/svelte/docs-origin.d.ts +14 -0
- package/dist/svelte/docs-origin.d.ts.map +1 -0
- package/dist/svelte/docs-origin.js +49 -0
- package/dist/svelte/docs-svelte.plugin.d.ts +121 -0
- package/dist/svelte/docs-svelte.plugin.d.ts.map +1 -0
- package/dist/svelte/docs-svelte.plugin.js +35 -0
- package/dist/svelte/documents/presentations/components/PresentationMonitor.svelte +261 -0
- package/dist/svelte/documents/presentations/components/PresentationMonitor.svelte.d.ts +16 -0
- package/dist/svelte/documents/presentations/components/PresentationMonitor.svelte.d.ts.map +1 -0
- package/dist/svelte/documents/presentations/index.d.ts +3 -0
- package/dist/svelte/documents/presentations/index.d.ts.map +1 -0
- package/dist/svelte/documents/presentations/index.js +2 -0
- package/dist/svelte/documents/presentations/monitor-state.d.ts +17 -0
- package/dist/svelte/documents/presentations/monitor-state.d.ts.map +1 -0
- package/dist/svelte/documents/presentations/monitor-state.js +38 -0
- package/dist/svelte/index.d.ts +20 -0
- package/dist/svelte/index.d.ts.map +1 -0
- package/dist/svelte/index.js +16 -0
- package/dist/svelte/loaders.d.ts +57 -0
- package/dist/svelte/loaders.d.ts.map +1 -0
- package/dist/svelte/loaders.js +74 -0
- package/dist/svelte/state.svelte.d.ts +366 -0
- package/dist/svelte/state.svelte.d.ts.map +1 -0
- package/dist/svelte/state.svelte.js +155 -0
- package/dist/svelte/styles.css +8 -0
- package/dist/svelte/tool-widgets/DocsToolCard.svelte +41 -0
- package/dist/svelte/tool-widgets/DocsToolCard.svelte.d.ts +5 -0
- package/dist/svelte/tool-widgets/DocsToolCard.svelte.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/DocumentReadToolCard.svelte +28 -0
- package/dist/svelte/tool-widgets/DocumentReadToolCard.svelte.d.ts +8 -0
- package/dist/svelte/tool-widgets/DocumentReadToolCard.svelte.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/PresentationsToolCard.svelte +25 -0
- package/dist/svelte/tool-widgets/PresentationsToolCard.svelte.d.ts +8 -0
- package/dist/svelte/tool-widgets/PresentationsToolCard.svelte.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/RunbookToolCard.svelte +29 -0
- package/dist/svelte/tool-widgets/RunbookToolCard.svelte.d.ts +8 -0
- package/dist/svelte/tool-widgets/RunbookToolCard.svelte.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/index.d.ts +7 -0
- package/dist/svelte/tool-widgets/index.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/index.js +5 -0
- package/dist/svelte/tool-widgets/models.d.ts +47 -0
- package/dist/svelte/tool-widgets/models.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/models.js +112 -0
- package/dist/svelte/ui/DocViewer.svelte +122 -0
- package/dist/svelte/ui/DocViewer.svelte.d.ts +17 -0
- package/dist/svelte/ui/DocViewer.svelte.d.ts.map +1 -0
- package/dist/svelte/ui/DocsLoader.svelte +37 -0
- package/dist/svelte/ui/DocsLoader.svelte.d.ts +21 -0
- package/dist/svelte/ui/DocsLoader.svelte.d.ts.map +1 -0
- package/dist/svelte/ui/DocsSearch.svelte +129 -0
- package/dist/svelte/ui/DocsSearch.svelte.d.ts +15 -0
- package/dist/svelte/ui/DocsSearch.svelte.d.ts.map +1 -0
- package/dist/svelte/ui/directives/Card.svelte +61 -0
- package/dist/svelte/ui/directives/Card.svelte.d.ts +8 -0
- package/dist/svelte/ui/directives/Card.svelte.d.ts.map +1 -0
- package/dist/svelte/ui/directives/Descriptor.svelte +73 -0
- package/dist/svelte/ui/directives/Descriptor.svelte.d.ts +8 -0
- package/dist/svelte/ui/directives/Descriptor.svelte.d.ts.map +1 -0
- package/dist/svelte/ui/directives/DirectiveDispatch.svelte +45 -0
- package/dist/svelte/ui/directives/DirectiveDispatch.svelte.d.ts +8 -0
- package/dist/svelte/ui/directives/DirectiveDispatch.svelte.d.ts.map +1 -0
- package/dist/svelte/ui/directives/Endpoint.svelte +68 -0
- package/dist/svelte/ui/directives/Endpoint.svelte.d.ts +8 -0
- package/dist/svelte/ui/directives/Endpoint.svelte.d.ts.map +1 -0
- package/dist/svelte/ui/directives/Install.svelte +112 -0
- package/dist/svelte/ui/directives/Install.svelte.d.ts +8 -0
- package/dist/svelte/ui/directives/Install.svelte.d.ts.map +1 -0
- package/dist/svelte/ui/directives/Shell.svelte +32 -0
- package/dist/svelte/ui/directives/Shell.svelte.d.ts +8 -0
- package/dist/svelte/ui/directives/Shell.svelte.d.ts.map +1 -0
- package/dist/svelte/ui/directives/Usage.svelte +14 -0
- package/dist/svelte/ui/directives/Usage.svelte.d.ts +8 -0
- package/dist/svelte/ui/directives/Usage.svelte.d.ts.map +1 -0
- package/dist/svelte/ui/help/HelpDialog.svelte +210 -0
- package/dist/svelte/ui/help/HelpDialog.svelte.d.ts +11 -0
- package/dist/svelte/ui/help/HelpDialog.svelte.d.ts.map +1 -0
- package/dist/svelte/ui/help/HelpIcon.svelte +83 -0
- package/dist/svelte/ui/help/HelpIcon.svelte.d.ts +16 -0
- package/dist/svelte/ui/help/HelpIcon.svelte.d.ts.map +1 -0
- package/dist/svelte/ui/markdown/CodeBlock.svelte +125 -0
- package/dist/svelte/ui/markdown/CodeBlock.svelte.d.ts +8 -0
- package/dist/svelte/ui/markdown/CodeBlock.svelte.d.ts.map +1 -0
- package/dist/svelte/ui/markdown/MarkdownView.svelte +319 -0
- package/dist/svelte/ui/markdown/MarkdownView.svelte.d.ts +9 -0
- package/dist/svelte/ui/markdown/MarkdownView.svelte.d.ts.map +1 -0
- package/dist/tools/docs.descriptor.d.ts +48 -0
- package/dist/tools/docs.descriptor.d.ts.map +1 -0
- package/dist/tools/docs.descriptor.js +23 -0
- package/dist/tools/docs.descriptor.js.map +1 -0
- package/dist/tools/docs.impl.d.ts +7 -0
- package/dist/tools/docs.impl.d.ts.map +1 -0
- package/dist/tools/docs.impl.js +67 -0
- package/dist/tools/docs.impl.js.map +1 -0
- package/dist/tools/schemas.d.ts +43 -0
- package/dist/tools/schemas.d.ts.map +1 -0
- package/dist/tools/schemas.js +30 -0
- package/dist/tools/schemas.js.map +1 -0
- package/dist/tui/docs-tui.plugin.d.ts +3 -0
- package/dist/tui/docs-tui.plugin.d.ts.map +1 -0
- package/dist/tui/docs-tui.plugin.js +18 -0
- package/dist/tui/docs-tui.plugin.js.map +1 -0
- package/dist/tui/index.d.ts +2 -0
- package/dist/tui/index.d.ts.map +1 -0
- package/dist/tui/index.js +2 -0
- package/dist/tui/index.js.map +1 -0
- package/dist/tui/tui/docs-explorer.impl.consumer.d.ts +38 -0
- package/dist/tui/tui/docs-explorer.impl.consumer.d.ts.map +1 -0
- package/dist/tui/tui/docs-explorer.impl.consumer.js +334 -0
- package/dist/tui/tui/docs-explorer.impl.consumer.js.map +1 -0
- package/dist/tui/tui/docs-explorer.tui.descriptor.d.ts +13 -0
- package/dist/tui/tui/docs-explorer.tui.descriptor.d.ts.map +1 -0
- package/dist/tui/tui/docs-explorer.tui.descriptor.js +29 -0
- package/dist/tui/tui/docs-explorer.tui.descriptor.js.map +1 -0
- package/package.json +450 -4
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Foveated grid-geometry planner — pure, cloud-safe (no `node:*`, no deps).
|
|
3
|
+
*
|
|
4
|
+
* A SCHEMA read on a large/dense architectural sheet (e.g. a 34×44" E-size plan
|
|
5
|
+
* packing 6 small millwork details) fails when the page is rendered as ONE
|
|
6
|
+
* downscaled full-page image: each titled detail/elevation cell lands at ~800px,
|
|
7
|
+
* its text is illegible, and the structured extract returns ZERO rows. The fix is
|
|
8
|
+
* to split the page into a few square-ish HIGH-DPI cells, extract each, and merge.
|
|
9
|
+
*
|
|
10
|
+
* This module owns only the small geometry: given the full-page pixel size, choose
|
|
11
|
+
* a square-ish grid (`cols`×`rows`) bounded by a total-cell cap, and enumerate the
|
|
12
|
+
* cells. The actual per-cell pixel/DPI math lives INSIDE the render container
|
|
13
|
+
* (`apps/ai-web/containers/pdf-render/server.mjs#renderGridCell`), where the page's
|
|
14
|
+
* true point size is known — the worker only passes the `(col,row,cols,rows,overlap)`
|
|
15
|
+
* descriptor. We deliberately do NOT reuse `@vibesdotdev/ai`'s `planDescribeZoomGrid`:
|
|
16
|
+
* it works in PDF-point space and its public barrel re-exports `runVisionOcr`, which
|
|
17
|
+
* would drag the AI generation/logging graph into this package's cloud bundle. The
|
|
18
|
+
* geometry we need is tiny, so we replicate it here instead.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Longest-edge threshold (px) above which a low-row full-page extract is treated
|
|
22
|
+
* as "downscale-capped and possibly illegible" → eligible for foveation.
|
|
23
|
+
*/
|
|
24
|
+
export declare const FOVEATE_MIN_LONGEST_EDGE_PX = 1600;
|
|
25
|
+
/**
|
|
26
|
+
* Minimum row count from a full-page extract to consider the page "already
|
|
27
|
+
* legible" and skip foveation. < this on a large page triggers the grid read.
|
|
28
|
+
*/
|
|
29
|
+
export declare const FOVEATE_MIN_HEALTHY_ROWS = 3;
|
|
30
|
+
/**
|
|
31
|
+
* Full-page pixels each grid cell maps to when choosing the grid shape. Smaller →
|
|
32
|
+
* MORE cells → the container renders each at a higher effective DPI (legibility).
|
|
33
|
+
* Tuned with FOVEATE_MAX_CELLS so an E-size sheet lands at ~6 cells (≈2×3 / 3×2).
|
|
34
|
+
*/
|
|
35
|
+
export declare const FOVEATE_TARGET_CELL_PX = 900;
|
|
36
|
+
/**
|
|
37
|
+
* Hard cap on total cells per page. MUST cover a real detail sheet: an ARCH-D
|
|
38
|
+
* (36×24") interior-elevation sheet packs its details in a 3×2 grid (6 details) —
|
|
39
|
+
* measured on the Horizon Bay IFP set. At the old cap of 4, a 2400×1600 full-page
|
|
40
|
+
* render planned a 2×2 grid that sliced each detail across two cells (garbled
|
|
41
|
+
* extraction); 6 lets it plan the correct 3×2 so each cell ≈ one detail.
|
|
42
|
+
*
|
|
43
|
+
* Cost: 6 cells × ~20s serialized ≈ 120s, but the container renders all cells from
|
|
44
|
+
* ONE source fetch and the vision extracts run concurrently (CONCURRENCY=4 in
|
|
45
|
+
* foveatedExtract), so wall-clock is ~2 batches; the per-tool budget is 150s.
|
|
46
|
+
*/
|
|
47
|
+
export declare const FOVEATE_MAX_CELLS = 6;
|
|
48
|
+
/** Default fractional overlap between adjacent cells (≈8%). */
|
|
49
|
+
export declare const FOVEATE_DEFAULT_OVERLAP = 0.08;
|
|
50
|
+
export interface GridDimensions {
|
|
51
|
+
cols: number;
|
|
52
|
+
rows: number;
|
|
53
|
+
}
|
|
54
|
+
export interface GridCellDescriptor {
|
|
55
|
+
/** 0-based column (left → right). */
|
|
56
|
+
col: number;
|
|
57
|
+
/** 0-based row (top → bottom). */
|
|
58
|
+
row: number;
|
|
59
|
+
/** Grid column count. */
|
|
60
|
+
cols: number;
|
|
61
|
+
/** Grid row count. */
|
|
62
|
+
rows: number;
|
|
63
|
+
/** Fractional overlap added around each cell. */
|
|
64
|
+
overlap: number;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Choose a square-ish grid for a page of the given pixel size.
|
|
68
|
+
*
|
|
69
|
+
* Rule: `cols ≈ round(width / FOVEATE_TARGET_CELL_PX)` (likewise rows), each at
|
|
70
|
+
* least 1, then scale the grid DOWN proportionally if `cols*rows` exceeds
|
|
71
|
+
* `maxCells` so cells stay square-ish while honoring the cost cap. A tiny page
|
|
72
|
+
* (≤ target on both edges) yields a 1×1 grid (no foveation benefit).
|
|
73
|
+
*/
|
|
74
|
+
export declare function planFoveationGrid(pageWidthPx: number, pageHeightPx: number, maxCells?: number, targetCellPx?: number): GridDimensions;
|
|
75
|
+
/**
|
|
76
|
+
* Enumerate every cell of a `cols`×`rows` grid in row-major order, each carrying
|
|
77
|
+
* the full grid descriptor the renderer needs to crop it.
|
|
78
|
+
*/
|
|
79
|
+
export declare function enumerateGridCells(grid: GridDimensions, overlap?: number): GridCellDescriptor[];
|
|
80
|
+
/**
|
|
81
|
+
* Decide whether a page should be foveated after a full-page extract.
|
|
82
|
+
*
|
|
83
|
+
* True only when the full-page extract returned FEW rows (< healthyRows) AND the
|
|
84
|
+
* page is large enough to have been downscale-capped (longest edge ≥ threshold).
|
|
85
|
+
* A page that already yields healthy rows, or a small/simple page, is left alone.
|
|
86
|
+
*/
|
|
87
|
+
export declare function shouldFoveate(fullPageRowCount: number, pageWidthPx: number | undefined, pageHeightPx: number | undefined, opts?: {
|
|
88
|
+
minHealthyRows?: number;
|
|
89
|
+
minLongestEdgePx?: number;
|
|
90
|
+
}): boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Are two grid cells adjacent (or the same cell)? Used to scope the cross-cell
|
|
93
|
+
* duplicate flag to seams where overlap could legitimately double-read a row.
|
|
94
|
+
*/
|
|
95
|
+
export declare function cellsAreAdjacent(a: GridCellDescriptor, b: GridCellDescriptor): boolean;
|
|
96
|
+
//# sourceMappingURL=grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../src/documents/render/grid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;GAGG;AACH,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC,+DAA+D;AAC/D,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAE5C,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,kBAAkB;IAClC,qCAAqC;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,OAAO,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAChC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,QAAQ,GAAE,MAA0B,EACpC,YAAY,GAAE,MAA+B,GAC3C,cAAc,CAkBhB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CACjC,IAAI,EAAE,cAAc,EACpB,OAAO,GAAE,MAAgC,GACvC,kBAAkB,EAAE,CAWtB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC5B,gBAAgB,EAAE,MAAM,EACxB,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,IAAI,GAAE;IAAE,cAAc,CAAC,EAAE,MAAM,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAO,GAC/D,OAAO,CAMT;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAEtF"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Foveated grid-geometry planner — pure, cloud-safe (no `node:*`, no deps).
|
|
3
|
+
*
|
|
4
|
+
* A SCHEMA read on a large/dense architectural sheet (e.g. a 34×44" E-size plan
|
|
5
|
+
* packing 6 small millwork details) fails when the page is rendered as ONE
|
|
6
|
+
* downscaled full-page image: each titled detail/elevation cell lands at ~800px,
|
|
7
|
+
* its text is illegible, and the structured extract returns ZERO rows. The fix is
|
|
8
|
+
* to split the page into a few square-ish HIGH-DPI cells, extract each, and merge.
|
|
9
|
+
*
|
|
10
|
+
* This module owns only the small geometry: given the full-page pixel size, choose
|
|
11
|
+
* a square-ish grid (`cols`×`rows`) bounded by a total-cell cap, and enumerate the
|
|
12
|
+
* cells. The actual per-cell pixel/DPI math lives INSIDE the render container
|
|
13
|
+
* (`apps/ai-web/containers/pdf-render/server.mjs#renderGridCell`), where the page's
|
|
14
|
+
* true point size is known — the worker only passes the `(col,row,cols,rows,overlap)`
|
|
15
|
+
* descriptor. We deliberately do NOT reuse `@vibesdotdev/ai`'s `planDescribeZoomGrid`:
|
|
16
|
+
* it works in PDF-point space and its public barrel re-exports `runVisionOcr`, which
|
|
17
|
+
* would drag the AI generation/logging graph into this package's cloud bundle. The
|
|
18
|
+
* geometry we need is tiny, so we replicate it here instead.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Longest-edge threshold (px) above which a low-row full-page extract is treated
|
|
22
|
+
* as "downscale-capped and possibly illegible" → eligible for foveation.
|
|
23
|
+
*/
|
|
24
|
+
export const FOVEATE_MIN_LONGEST_EDGE_PX = 1600;
|
|
25
|
+
/**
|
|
26
|
+
* Minimum row count from a full-page extract to consider the page "already
|
|
27
|
+
* legible" and skip foveation. < this on a large page triggers the grid read.
|
|
28
|
+
*/
|
|
29
|
+
export const FOVEATE_MIN_HEALTHY_ROWS = 3;
|
|
30
|
+
/**
|
|
31
|
+
* Full-page pixels each grid cell maps to when choosing the grid shape. Smaller →
|
|
32
|
+
* MORE cells → the container renders each at a higher effective DPI (legibility).
|
|
33
|
+
* Tuned with FOVEATE_MAX_CELLS so an E-size sheet lands at ~6 cells (≈2×3 / 3×2).
|
|
34
|
+
*/
|
|
35
|
+
export const FOVEATE_TARGET_CELL_PX = 900;
|
|
36
|
+
/**
|
|
37
|
+
* Hard cap on total cells per page. MUST cover a real detail sheet: an ARCH-D
|
|
38
|
+
* (36×24") interior-elevation sheet packs its details in a 3×2 grid (6 details) —
|
|
39
|
+
* measured on the Horizon Bay IFP set. At the old cap of 4, a 2400×1600 full-page
|
|
40
|
+
* render planned a 2×2 grid that sliced each detail across two cells (garbled
|
|
41
|
+
* extraction); 6 lets it plan the correct 3×2 so each cell ≈ one detail.
|
|
42
|
+
*
|
|
43
|
+
* Cost: 6 cells × ~20s serialized ≈ 120s, but the container renders all cells from
|
|
44
|
+
* ONE source fetch and the vision extracts run concurrently (CONCURRENCY=4 in
|
|
45
|
+
* foveatedExtract), so wall-clock is ~2 batches; the per-tool budget is 150s.
|
|
46
|
+
*/
|
|
47
|
+
export const FOVEATE_MAX_CELLS = 6;
|
|
48
|
+
/** Default fractional overlap between adjacent cells (≈8%). */
|
|
49
|
+
export const FOVEATE_DEFAULT_OVERLAP = 0.08;
|
|
50
|
+
/**
|
|
51
|
+
* Choose a square-ish grid for a page of the given pixel size.
|
|
52
|
+
*
|
|
53
|
+
* Rule: `cols ≈ round(width / FOVEATE_TARGET_CELL_PX)` (likewise rows), each at
|
|
54
|
+
* least 1, then scale the grid DOWN proportionally if `cols*rows` exceeds
|
|
55
|
+
* `maxCells` so cells stay square-ish while honoring the cost cap. A tiny page
|
|
56
|
+
* (≤ target on both edges) yields a 1×1 grid (no foveation benefit).
|
|
57
|
+
*/
|
|
58
|
+
export function planFoveationGrid(pageWidthPx, pageHeightPx, maxCells = FOVEATE_MAX_CELLS, targetCellPx = FOVEATE_TARGET_CELL_PX) {
|
|
59
|
+
const safeW = Number.isFinite(pageWidthPx) && pageWidthPx > 0 ? pageWidthPx : 1;
|
|
60
|
+
const safeH = Number.isFinite(pageHeightPx) && pageHeightPx > 0 ? pageHeightPx : 1;
|
|
61
|
+
const cap = Math.max(1, Math.floor(maxCells));
|
|
62
|
+
const target = targetCellPx > 0 ? targetCellPx : FOVEATE_TARGET_CELL_PX;
|
|
63
|
+
let cols = Math.max(1, Math.round(safeW / target));
|
|
64
|
+
let rows = Math.max(1, Math.round(safeH / target));
|
|
65
|
+
// Honor the total-cell cap while keeping cells as square as possible: shrink
|
|
66
|
+
// the longer grid dimension first until cols*rows ≤ cap.
|
|
67
|
+
while (cols * rows > cap) {
|
|
68
|
+
if (cols >= rows && cols > 1)
|
|
69
|
+
cols -= 1;
|
|
70
|
+
else if (rows > 1)
|
|
71
|
+
rows -= 1;
|
|
72
|
+
else
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
return { cols, rows };
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Enumerate every cell of a `cols`×`rows` grid in row-major order, each carrying
|
|
79
|
+
* the full grid descriptor the renderer needs to crop it.
|
|
80
|
+
*/
|
|
81
|
+
export function enumerateGridCells(grid, overlap = FOVEATE_DEFAULT_OVERLAP) {
|
|
82
|
+
const cols = Math.max(1, Math.floor(grid.cols));
|
|
83
|
+
const rows = Math.max(1, Math.floor(grid.rows));
|
|
84
|
+
const clampedOverlap = Math.min(0.35, Math.max(0, overlap));
|
|
85
|
+
const cells = [];
|
|
86
|
+
for (let row = 0; row < rows; row++) {
|
|
87
|
+
for (let col = 0; col < cols; col++) {
|
|
88
|
+
cells.push({ col, row, cols, rows, overlap: clampedOverlap });
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return cells;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Decide whether a page should be foveated after a full-page extract.
|
|
95
|
+
*
|
|
96
|
+
* True only when the full-page extract returned FEW rows (< healthyRows) AND the
|
|
97
|
+
* page is large enough to have been downscale-capped (longest edge ≥ threshold).
|
|
98
|
+
* A page that already yields healthy rows, or a small/simple page, is left alone.
|
|
99
|
+
*/
|
|
100
|
+
export function shouldFoveate(fullPageRowCount, pageWidthPx, pageHeightPx, opts = {}) {
|
|
101
|
+
const minHealthy = opts.minHealthyRows ?? FOVEATE_MIN_HEALTHY_ROWS;
|
|
102
|
+
const minEdge = opts.minLongestEdgePx ?? FOVEATE_MIN_LONGEST_EDGE_PX;
|
|
103
|
+
if (fullPageRowCount >= minHealthy)
|
|
104
|
+
return false;
|
|
105
|
+
const longest = Math.max(pageWidthPx ?? 0, pageHeightPx ?? 0);
|
|
106
|
+
return longest >= minEdge;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Are two grid cells adjacent (or the same cell)? Used to scope the cross-cell
|
|
110
|
+
* duplicate flag to seams where overlap could legitimately double-read a row.
|
|
111
|
+
*/
|
|
112
|
+
export function cellsAreAdjacent(a, b) {
|
|
113
|
+
return Math.abs(a.col - b.col) <= 1 && Math.abs(a.row - b.row) <= 1;
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=grid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.js","sourceRoot":"","sources":["../../../src/documents/render/grid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,CAAC;AAEhD;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AAE1C;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAEnC,+DAA+D;AAC/D,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAoB5C;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAChC,WAAmB,EACnB,YAAoB,EACpB,WAAmB,iBAAiB,EACpC,eAAuB,sBAAsB;IAE7C,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAChF,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IACnF,MAAM,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mBAAmB,EACnB,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/documents/render/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cloud-scope DocumentRenderer implementation.
|
|
3
|
+
*
|
|
4
|
+
* Routes PDF rendering requests through the PdfRenderer Cloudflare Container
|
|
5
|
+
* Durable Object bound as `PDF_RENDERER` in ai-web's wrangler config.
|
|
6
|
+
* The Container wraps a Node.js HTTP server (apps/ai-web/containers/pdf-render/
|
|
7
|
+
* server.mjs) that uses pdftoppm (poppler-utils) to rasterise PDF pages and
|
|
8
|
+
* return base64-encoded PNG bytes.
|
|
9
|
+
*
|
|
10
|
+
* Calling pattern:
|
|
11
|
+
* ns = runtime.getBinding('PDF_RENDERER', PdfRendererNamespaceSchema)
|
|
12
|
+
* id = ns.idFromName('pdf-render') // stable singleton for this worker
|
|
13
|
+
* stub = ns.get(id)
|
|
14
|
+
* stub.fetch('http://container/render', { method: 'POST', body: JSON.stringify({...}) })
|
|
15
|
+
*
|
|
16
|
+
* The Container base class routes the stub.fetch call to the container's HTTP
|
|
17
|
+
* server on its defaultPort (8080) — the 'http://container/' hostname is a
|
|
18
|
+
* Cloudflare convention for container-backed DOs.
|
|
19
|
+
*/
|
|
20
|
+
import { type VibesRuntime } from '@vibesdotdev/kernel';
|
|
21
|
+
import type { DocumentRenderer } from './render.interface.ts';
|
|
22
|
+
/** The cloud renderer for the runtime a tool call was handed (a `DocumentRendererFactory`). */
|
|
23
|
+
export declare function createCloudDocumentRenderer(runtime: VibesRuntime): DocumentRenderer;
|
|
24
|
+
export default createCloudDocumentRenderer;
|
|
25
|
+
//# sourceMappingURL=render.impl.cloud.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.impl.cloud.d.ts","sourceRoot":"","sources":["../../../src/documents/render/render.impl.cloud.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAA2E,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIjI,OAAO,KAAK,EACX,gBAAgB,EAQhB,MAAM,uBAAuB,CAAC;AAqP/B,+FAA+F;AAC/F,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,YAAY,GAAG,gBAAgB,CAEnF;AAED,eAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cloud-scope DocumentRenderer implementation.
|
|
3
|
+
*
|
|
4
|
+
* Routes PDF rendering requests through the PdfRenderer Cloudflare Container
|
|
5
|
+
* Durable Object bound as `PDF_RENDERER` in ai-web's wrangler config.
|
|
6
|
+
* The Container wraps a Node.js HTTP server (apps/ai-web/containers/pdf-render/
|
|
7
|
+
* server.mjs) that uses pdftoppm (poppler-utils) to rasterise PDF pages and
|
|
8
|
+
* return base64-encoded PNG bytes.
|
|
9
|
+
*
|
|
10
|
+
* Calling pattern:
|
|
11
|
+
* ns = runtime.getBinding('PDF_RENDERER', PdfRendererNamespaceSchema)
|
|
12
|
+
* id = ns.idFromName('pdf-render') // stable singleton for this worker
|
|
13
|
+
* stub = ns.get(id)
|
|
14
|
+
* stub.fetch('http://container/render', { method: 'POST', body: JSON.stringify({...}) })
|
|
15
|
+
*
|
|
16
|
+
* The Container base class routes the stub.fetch call to the container's HTTP
|
|
17
|
+
* server on its defaultPort (8080) — the 'http://container/' hostname is a
|
|
18
|
+
* Cloudflare convention for container-backed DOs.
|
|
19
|
+
*/
|
|
20
|
+
import * as z from 'zod/v4';
|
|
21
|
+
import { CapabilityError, isCapabilityError, settleNow, valueFreeFailure, settle } from '@vibesdotdev/kernel';
|
|
22
|
+
import { serviceOrigin } from '@vibesdotdev/infra-core/service';
|
|
23
|
+
import { AIServiceBindingSchema } from "../schemas/ai-service-binding.schema.js";
|
|
24
|
+
import { DocumentOutlineSheetSchema, RenderPageClipInputSchema, RenderGridCellsInputSchema, DocumentOutlineInputSchema, createRenderPageClipResponseSchema, createDocumentOutlineMetadataSchema, RenderedGridCellSchema } from "./render.interface.js";
|
|
25
|
+
import { buildOutlineFromPages } from "../outline/parse-outline.js";
|
|
26
|
+
const LegacyOutlineSheetSchema = DocumentOutlineSheetSchema.extend({ page: DocumentOutlineSheetSchema.shape.page.default(0), number: DocumentOutlineSheetSchema.shape.number.default(''), title: DocumentOutlineSheetSchema.shape.title.default('') });
|
|
27
|
+
const RawOutlinePageSchema = z.object({ page: z.number(), text: z.string() });
|
|
28
|
+
const PdfRendererNamespaceMethodsSchema = z.object({ idFromName: z.function(), get: z.function() });
|
|
29
|
+
/**
|
|
30
|
+
* The `PDF_RENDERER` binding's owning schema for `runtime.getBinding`. It
|
|
31
|
+
* admits the namespace itself, never a copy, so its methods keep their receiver.
|
|
32
|
+
*/
|
|
33
|
+
const PdfRendererNamespaceSchema = z.custom((value) => PdfRendererNamespaceMethodsSchema.safeParse(value).success);
|
|
34
|
+
const ContainerRenderBodySchema = RenderPageClipInputSchema.omit({ clip: true, maxEdge: true }).extend({ clip: RenderPageClipInputSchema.shape.clipFrac, maxDim: RenderPageClipInputSchema.shape.maxEdge, gridCells: RenderGridCellsInputSchema.shape.cells.optional() });
|
|
35
|
+
/**
|
|
36
|
+
* Remote pdf-render on ai-web. The origin is the declared `ai` `infra/service`
|
|
37
|
+
* internal origin in the handed runtime's configured service environment
|
|
38
|
+
* (rc04 §2.4) — no origin env, no literal default; an undeclared service
|
|
39
|
+
* fails `NOT_FOUND` `service-undeclared`. Bindings and the service token come
|
|
40
|
+
* from the same runtime.
|
|
41
|
+
*/
|
|
42
|
+
async function callRemotePdfRender(runtime, body, path = '/render') {
|
|
43
|
+
const binding = runtime.getBinding('AI_INTERNAL', AIServiceBindingSchema) ??
|
|
44
|
+
runtime.getBinding('AI_SERVICE', AIServiceBindingSchema);
|
|
45
|
+
const credential = await runtime.resolveCredential({
|
|
46
|
+
source: 'secret',
|
|
47
|
+
key: 'VIBES_INTERNAL_SERVICE_TOKEN'
|
|
48
|
+
});
|
|
49
|
+
// Only an absent credential yields an unauthenticated call; any other failure propagates.
|
|
50
|
+
if (!credential.ok && credential.error.reason !== 'credential-not-set')
|
|
51
|
+
throw credential.error;
|
|
52
|
+
const token = credential.ok ? credential.value.trim() : '';
|
|
53
|
+
const origin = (await serviceOrigin(runtime, 'ai', 'internal')).replace(/\/+$/, '');
|
|
54
|
+
const url = `${origin}/api/internal/pdf-render`;
|
|
55
|
+
const headers = token
|
|
56
|
+
? { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` }
|
|
57
|
+
: { 'Content-Type': 'application/json' };
|
|
58
|
+
const reqInit = {
|
|
59
|
+
method: 'POST',
|
|
60
|
+
headers,
|
|
61
|
+
body: JSON.stringify({ path, body })
|
|
62
|
+
};
|
|
63
|
+
const fetched = await settle(() => binding ? binding.fetch(url, reqInit) : fetch(url, reqInit));
|
|
64
|
+
if (!fetched.ok) {
|
|
65
|
+
if (isCapabilityError(fetched.cause))
|
|
66
|
+
throw fetched.cause;
|
|
67
|
+
throw new CapabilityError('PDF rendering service unavailable.', 'UNAVAILABLE', { reason: 'pdf-render-service-unavailable', cause: valueFreeFailure(fetched.cause) });
|
|
68
|
+
}
|
|
69
|
+
const response = fetched.value;
|
|
70
|
+
if (!response.ok)
|
|
71
|
+
throw new CapabilityError('PDF rendering service refused the request.', 'UNAVAILABLE', { reason: 'pdf-render-service-failed', details: { status: response.status } });
|
|
72
|
+
return response;
|
|
73
|
+
}
|
|
74
|
+
async function callContainer(runtime, body, path = '/render') {
|
|
75
|
+
// The CF container fetches the source over HTTP — it cannot resolve a
|
|
76
|
+
// providerId/path ref (which resolveSourceUrl turns into a non-fetchable
|
|
77
|
+
// vibes-storage:// URL). Fail with a clear, self-correcting message instead of
|
|
78
|
+
// the container's opaque "fetch failed" 500.
|
|
79
|
+
const src = body.sourceUrl;
|
|
80
|
+
if (!/^https?:\/\//i.test(src)) {
|
|
81
|
+
// Domain-neutral on purpose: this package is public framework and this string
|
|
82
|
+
// is MODEL-FACING. Naming one customer's tool here tells every other consumer
|
|
83
|
+
// to call a tool they do not have.
|
|
84
|
+
throw new CapabilityError('Document rendering requires a fetchable HTTP source URL.', 'INVALID_INPUT', { reason: 'pdf-render-source-invalid' });
|
|
85
|
+
}
|
|
86
|
+
const ns = runtime.getBinding('PDF_RENDERER', PdfRendererNamespaceSchema);
|
|
87
|
+
if (ns) {
|
|
88
|
+
// Use a stable singleton name so all requests within a colo share one
|
|
89
|
+
// container instance (the Container DO manages lifecycle and sleep/wake).
|
|
90
|
+
const id = ns.idFromName('pdf-render');
|
|
91
|
+
const stub = ns.get(id);
|
|
92
|
+
// 'http://container/' is the Cloudflare convention for routing stub.fetch()
|
|
93
|
+
// to the container's HTTP server (Container.defaultPort = 8080).
|
|
94
|
+
const fetched = await settle(() => stub.fetch(`http://container${path}`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(body) }));
|
|
95
|
+
if (!fetched.ok) {
|
|
96
|
+
if (isCapabilityError(fetched.cause))
|
|
97
|
+
throw fetched.cause;
|
|
98
|
+
throw new CapabilityError('PDF container unavailable.', 'UNAVAILABLE', { reason: 'pdf-render-container-unavailable', cause: valueFreeFailure(fetched.cause) });
|
|
99
|
+
}
|
|
100
|
+
const response = fetched.value;
|
|
101
|
+
if (!response.ok)
|
|
102
|
+
throw new CapabilityError('PDF container refused the request.', 'UNAVAILABLE', { reason: 'pdf-render-container-failed', details: { status: response.status } });
|
|
103
|
+
return response;
|
|
104
|
+
}
|
|
105
|
+
// When PDF_RENDERER is not bound in-process (e.g. chat-web running document.view/read),
|
|
106
|
+
// delegate to ai-web via AI_SERVICE/AI_INTERNAL or HTTP.
|
|
107
|
+
return callRemotePdfRender(runtime, body, path);
|
|
108
|
+
}
|
|
109
|
+
async function callContainerRender(runtime, body) {
|
|
110
|
+
const response = await callContainer(runtime, body);
|
|
111
|
+
const admitted = await settle(async () => createRenderPageClipResponseSchema(runtime, 'pdf-render-invalid-response').parse(await response.json()));
|
|
112
|
+
if (admitted.ok)
|
|
113
|
+
return admitted.value;
|
|
114
|
+
if (isCapabilityError(admitted.cause))
|
|
115
|
+
throw admitted.cause;
|
|
116
|
+
throw new CapabilityError('PDF render response is invalid.', 'INTERNAL', { reason: 'pdf-render-invalid-response', cause: valueFreeFailure(admitted.cause) });
|
|
117
|
+
}
|
|
118
|
+
class CloudDocumentRenderer {
|
|
119
|
+
runtime;
|
|
120
|
+
constructor(runtime) {
|
|
121
|
+
this.runtime = runtime;
|
|
122
|
+
}
|
|
123
|
+
async renderPageClip(input) {
|
|
124
|
+
const body = {
|
|
125
|
+
sourceUrl: input.sourceUrl,
|
|
126
|
+
page: input.page
|
|
127
|
+
};
|
|
128
|
+
if (input.clip) {
|
|
129
|
+
body.clip = {
|
|
130
|
+
x: input.clip.x,
|
|
131
|
+
y: input.clip.y,
|
|
132
|
+
w: input.clip.width,
|
|
133
|
+
h: input.clip.height
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
if (input.clipFrac) {
|
|
137
|
+
body.clipFrac = input.clipFrac;
|
|
138
|
+
}
|
|
139
|
+
if (input.dpi !== undefined) {
|
|
140
|
+
body.dpi = input.dpi;
|
|
141
|
+
}
|
|
142
|
+
if (input.maxEdge !== undefined) {
|
|
143
|
+
body.maxDim = input.maxEdge;
|
|
144
|
+
}
|
|
145
|
+
if (input.gridCell) {
|
|
146
|
+
body.gridCell = input.gridCell;
|
|
147
|
+
}
|
|
148
|
+
return callContainerRender(this.runtime, body);
|
|
149
|
+
}
|
|
150
|
+
async renderOverview(input) {
|
|
151
|
+
// page=0 signals the render server to render the full page at overview DPI.
|
|
152
|
+
const body = {
|
|
153
|
+
sourceUrl: input.sourceUrl,
|
|
154
|
+
page: 0
|
|
155
|
+
};
|
|
156
|
+
if (input.dpi !== undefined) {
|
|
157
|
+
body.dpi = input.dpi;
|
|
158
|
+
}
|
|
159
|
+
return callContainerRender(this.runtime, body);
|
|
160
|
+
}
|
|
161
|
+
async renderGridCells(input) {
|
|
162
|
+
// ONE container call → ONE source fetch → all cells cropped from it. This is
|
|
163
|
+
// the SharePoint-safe path: a pre-auth download token is rejected (401) when
|
|
164
|
+
// fetched repeatedly/concurrently, so foveation must not fetch per cell.
|
|
165
|
+
const raw = await callContainer(this.runtime, {
|
|
166
|
+
sourceUrl: input.sourceUrl,
|
|
167
|
+
page: input.page,
|
|
168
|
+
gridCells: input.cells
|
|
169
|
+
});
|
|
170
|
+
const imageSchema = createRenderPageClipResponseSchema(this.runtime, 'pdf-render-grid-cell-invalid');
|
|
171
|
+
const cellSchema = z.preprocess(value => {
|
|
172
|
+
const admitted = settleNow(() => ({ ...RenderedGridCellSchema.pick({ col: true, row: true }).parse(value), ...imageSchema.parse(value) }));
|
|
173
|
+
if (admitted.ok)
|
|
174
|
+
return admitted.value;
|
|
175
|
+
const failure = isCapabilityError(admitted.cause) ? admitted.cause : new CapabilityError('PDF grid cell is invalid.', 'INTERNAL', { reason: 'pdf-render-grid-cell-invalid', cause: valueFreeFailure(admitted.cause) });
|
|
176
|
+
settleNow(() => this.runtime.diagnostics.error('PDF grid cell refused', { scope: 'docs', plugin: 'docs', error: failure }));
|
|
177
|
+
return undefined;
|
|
178
|
+
}, RenderedGridCellSchema.optional());
|
|
179
|
+
const decoded = await settle(async () => z.object({ cells: z.array(cellSchema) }).parse(await raw.json()));
|
|
180
|
+
if (!decoded.ok) {
|
|
181
|
+
if (isCapabilityError(decoded.cause))
|
|
182
|
+
throw decoded.cause;
|
|
183
|
+
throw new CapabilityError('PDF grid response is invalid.', 'INTERNAL', { reason: 'pdf-render-grid-invalid-response', cause: valueFreeFailure(decoded.cause) });
|
|
184
|
+
}
|
|
185
|
+
return decoded.value.cells.filter(cell => cell !== undefined);
|
|
186
|
+
}
|
|
187
|
+
async outline(input) {
|
|
188
|
+
const response = await callContainer(this.runtime, { sourceUrl: input.sourceUrl }, '/outline');
|
|
189
|
+
const admitted = await settle(async () => {
|
|
190
|
+
const raw = await response.json();
|
|
191
|
+
const metadata = createDocumentOutlineMetadataSchema(this.runtime).parse(raw);
|
|
192
|
+
const sheetSchema = z.preprocess(value => {
|
|
193
|
+
const sheet = settleNow(() => LegacyOutlineSheetSchema.omit({ garbled: true }).parse(value));
|
|
194
|
+
if (sheet.ok) {
|
|
195
|
+
const garbled = settleNow(() => LegacyOutlineSheetSchema.pick({ garbled: true }).parse(value));
|
|
196
|
+
if (garbled.ok)
|
|
197
|
+
return { ...sheet.value, ...garbled.value };
|
|
198
|
+
const failure = isCapabilityError(garbled.cause) ? garbled.cause : new CapabilityError('Document outline metadata is invalid.', 'INTERNAL', { reason: 'pdf-render-metadata-invalid', cause: valueFreeFailure(garbled.cause) });
|
|
199
|
+
settleNow(() => this.runtime.diagnostics.error('Document outline metadata refused', { scope: 'docs', plugin: 'docs', error: failure }));
|
|
200
|
+
return sheet.value;
|
|
201
|
+
}
|
|
202
|
+
const failure = isCapabilityError(sheet.cause) ? sheet.cause : new CapabilityError('PDF outline sheet is invalid.', 'INTERNAL', { reason: 'pdf-render-outline-sheet-invalid', cause: valueFreeFailure(sheet.cause) });
|
|
203
|
+
settleNow(() => this.runtime.diagnostics.error('PDF outline sheet refused', { scope: 'docs', plugin: 'docs', error: failure }));
|
|
204
|
+
return undefined;
|
|
205
|
+
}, LegacyOutlineSheetSchema.optional());
|
|
206
|
+
const legacy = z.object({ sheets: z.array(sheetSchema) }).safeParse(raw);
|
|
207
|
+
if (legacy.success) {
|
|
208
|
+
const sheets = legacy.data.sheets.filter(sheet => sheet !== undefined).map(sheet => {
|
|
209
|
+
const result = { page: sheet.page, number: sheet.number, title: sheet.title };
|
|
210
|
+
if (sheet.garbled)
|
|
211
|
+
result.garbled = true;
|
|
212
|
+
return result;
|
|
213
|
+
});
|
|
214
|
+
if (sheets.length > 0)
|
|
215
|
+
return { ...metadata, sheets };
|
|
216
|
+
}
|
|
217
|
+
const pageSchema = z.preprocess(value => {
|
|
218
|
+
const page = settleNow(() => RawOutlinePageSchema.parse(value));
|
|
219
|
+
if (page.ok)
|
|
220
|
+
return page.value;
|
|
221
|
+
const failure = isCapabilityError(page.cause) ? page.cause : new CapabilityError('PDF outline page is invalid.', 'INTERNAL', { reason: 'pdf-render-outline-page-invalid', cause: valueFreeFailure(page.cause) });
|
|
222
|
+
settleNow(() => this.runtime.diagnostics.error('PDF outline page refused', { scope: 'docs', plugin: 'docs', error: failure }));
|
|
223
|
+
return undefined;
|
|
224
|
+
}, RawOutlinePageSchema.optional());
|
|
225
|
+
const pages = z.object({ pages: z.array(pageSchema) }).safeParse(raw);
|
|
226
|
+
if (!pages.success) {
|
|
227
|
+
if (legacy.success && legacy.data.sheets.length === 0 && z.object({ pages: z.undefined().optional() }).safeParse(raw).success)
|
|
228
|
+
return buildOutlineFromPages({ ...metadata, pages: [] });
|
|
229
|
+
throw new CapabilityError('PDF outline response is invalid.', 'INTERNAL', { reason: 'pdf-render-outline-invalid-response', cause: valueFreeFailure(pages.error) });
|
|
230
|
+
}
|
|
231
|
+
return buildOutlineFromPages({ ...metadata, pages: pages.data.pages.filter(page => page !== undefined) });
|
|
232
|
+
});
|
|
233
|
+
if (admitted.ok)
|
|
234
|
+
return admitted.value;
|
|
235
|
+
if (isCapabilityError(admitted.cause))
|
|
236
|
+
throw admitted.cause;
|
|
237
|
+
throw new CapabilityError('PDF outline response is invalid.', 'INTERNAL', { reason: 'pdf-render-outline-invalid-response', cause: valueFreeFailure(admitted.cause) });
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
/** The cloud renderer for the runtime a tool call was handed (a `DocumentRendererFactory`). */
|
|
241
|
+
export function createCloudDocumentRenderer(runtime) {
|
|
242
|
+
return new CloudDocumentRenderer(runtime);
|
|
243
|
+
}
|
|
244
|
+
export default createCloudDocumentRenderer;
|
|
245
|
+
//# sourceMappingURL=render.impl.cloud.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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AAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,SAAS,CAAC,EAAE,CAAC,CAAC;QAC3G,CAAC,CAAC,CAAC;QACH,IAAI,QAAQ,CAAC,EAAE;YAAE,OAAO,QAAQ,CAAC,KAAK,CAAC;QACvC,IAAI,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,MAAM,QAAQ,CAAC,KAAK,CAAC;QAC5D,MAAM,IAAI,eAAe,CAAC,kCAAkC,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,qCAAqC,EAAE,KAAK,EAAE,gBAAgB,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvK,CAAC;CAED;AAED,+FAA+F;AAC/F,MAAM,UAAU,2BAA2B,CAAC,OAAqB;IAChE,OAAO,IAAI,qBAAqB,CAAC,OAAO,CAAC,CAAC;AAC3C,CAAC;AAED,eAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consumer-scope DocumentRenderer implementation.
|
|
3
|
+
*
|
|
4
|
+
* Delegates page rendering to the PDF-OCR drainer process via HTTP.
|
|
5
|
+
* The drainer runs mupdf (native) and accepts internal render requests
|
|
6
|
+
* on its `/internal/render` endpoint.
|
|
7
|
+
*
|
|
8
|
+
* TODO(WS0): Wire VIBES_PDF_RENDER_ORIGIN in wrangler.toml / vibes config
|
|
9
|
+
* for the consumer environment. The drainer already exposes the endpoint;
|
|
10
|
+
* this impl just needs the origin bound.
|
|
11
|
+
*
|
|
12
|
+
* TODO(WS0): The drainer `/internal/render` request/response contract:
|
|
13
|
+
* POST ${VIBES_PDF_RENDER_ORIGIN}/internal/render
|
|
14
|
+
* Content-Type: application/json
|
|
15
|
+
* Body: { sourceUrl: string, page: number, clip?: { x, y, width, height }, dpi?: number }
|
|
16
|
+
* Response: { pngBase64: string }
|
|
17
|
+
*
|
|
18
|
+
* For renderOverview:
|
|
19
|
+
* POST ${VIBES_PDF_RENDER_ORIGIN}/internal/render
|
|
20
|
+
* Body: { sourceUrl: string, page: 0, dpi?: number } // page=0 = full overview
|
|
21
|
+
* Response: { pngBase64: string }
|
|
22
|
+
*/
|
|
23
|
+
import { type VibesRuntime } from '@vibesdotdev/kernel';
|
|
24
|
+
import type { DocumentRenderer, RenderOverviewInput, RenderPageClipInput, RenderPageClipOutput, RenderGridCellsInput, RenderedGridCell, DocumentOutlineInput, DocumentOutlineOutput } from './render.interface.ts';
|
|
25
|
+
export declare class ConsumerDocumentRenderer implements DocumentRenderer {
|
|
26
|
+
private runtime;
|
|
27
|
+
constructor(runtime: VibesRuntime);
|
|
28
|
+
renderPageClip(input: RenderPageClipInput): Promise<RenderPageClipOutput>;
|
|
29
|
+
renderOverview(input: RenderOverviewInput): Promise<RenderPageClipOutput>;
|
|
30
|
+
renderGridCells(input: RenderGridCellsInput): Promise<RenderedGridCell[]>;
|
|
31
|
+
outline(_input: DocumentOutlineInput): Promise<DocumentOutlineOutput>;
|
|
32
|
+
}
|
|
33
|
+
export declare function createConsumerDocumentRenderer(runtime: VibesRuntime): DocumentRenderer;
|
|
34
|
+
export default createConsumerDocumentRenderer;
|
|
35
|
+
//# sourceMappingURL=render.impl.consumer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.impl.consumer.d.ts","sourceRoot":"","sources":["../../../src/documents/render/render.impl.consumer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAgE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGtH,OAAO,KAAK,EACX,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,MAAM,uBAAuB,CAAC;AAmC/B,qBAAa,wBAAyB,YAAW,gBAAgB;IACpD,OAAO,CAAC,OAAO;gBAAP,OAAO,EAAE,YAAY;IAEnC,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAczE,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAWzE,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAWzE,OAAO,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAM3E;AAED,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,YAAY,GAAG,gBAAgB,CAEtF;AAED,eAAe,8BAA8B,CAAC"}
|