@engenty/wizards-runtime 0.0.0-stage → 0.7.5
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 +110 -0
- package/README.md +214 -2
- package/apps/runtime/dist/agents/architect.js +444 -0
- package/apps/runtime/dist/agents/studio-assistant.js +883 -0
- package/apps/runtime/dist/agents/subscription.js +207 -0
- package/apps/runtime/dist/agents/thought.js +21 -0
- package/apps/runtime/dist/agents/website.js +480 -0
- package/apps/runtime/dist/app.js +359 -0
- package/apps/runtime/dist/apple/wizards-apple +0 -0
- package/apps/runtime/dist/assistant/browser.js +26 -0
- package/apps/runtime/dist/assistant/docs.js +158 -0
- package/apps/runtime/dist/assistant/knows.js +353 -0
- package/apps/runtime/dist/assistant/primer.js +26 -0
- package/apps/runtime/dist/assistant/runs.js +24 -0
- package/apps/runtime/dist/auth/account.js +175 -0
- package/apps/runtime/dist/auth/device.js +112 -0
- package/apps/runtime/dist/auth/index.js +358 -0
- package/apps/runtime/dist/auth/keys.js +55 -0
- package/apps/runtime/dist/auth/local-ticket.js +26 -0
- package/apps/runtime/dist/authoring/example.js +74 -0
- package/apps/runtime/dist/authoring/guide.js +433 -0
- package/apps/runtime/dist/authoring/ops.js +117 -0
- package/apps/runtime/dist/browser/fast/action-space.js +160 -0
- package/apps/runtime/dist/browser/fast/classifier.js +91 -0
- package/apps/runtime/dist/browser/fast/decide.js +171 -0
- package/apps/runtime/dist/browser/fast/driver.js +141 -0
- package/apps/runtime/dist/browser/fast/instructions.js +33 -0
- package/apps/runtime/dist/browser/fast/run.js +249 -0
- package/apps/runtime/dist/browser/fast/span-picker.js +153 -0
- package/apps/runtime/dist/browser/fast/text-helper.js +178 -0
- package/apps/runtime/dist/browser/snapshot.js +335 -0
- package/apps/runtime/dist/cli/account.js +385 -0
- package/apps/runtime/dist/cli/autostart.js +182 -0
- package/apps/runtime/dist/cli/autoupdate.js +221 -0
- package/apps/runtime/dist/cli/clients.js +44 -0
- package/apps/runtime/dist/cli/connect.js +540 -0
- package/apps/runtime/dist/cli/environment.js +93 -0
- package/apps/runtime/dist/cli/exec.js +45 -0
- package/apps/runtime/dist/cli/features.js +50 -0
- package/apps/runtime/dist/cli/home.js +88 -0
- package/apps/runtime/dist/cli/install-env.js +33 -0
- package/apps/runtime/dist/cli/machine.js +107 -0
- package/apps/runtime/dist/cli/main.js +222 -0
- package/apps/runtime/dist/cli/mcp.js +136 -0
- package/apps/runtime/dist/cli/menu.js +202 -0
- package/apps/runtime/dist/cli/processes.js +72 -0
- package/apps/runtime/dist/cli/report.js +66 -0
- package/apps/runtime/dist/cli/setup.js +335 -0
- package/apps/runtime/dist/cli/start.js +276 -0
- package/apps/runtime/dist/cli/status.js +203 -0
- package/apps/runtime/dist/cli/ui.js +59 -0
- package/apps/runtime/dist/cli/uninstall-main.js +20 -0
- package/apps/runtime/dist/cli/uninstall.js +231 -0
- package/apps/runtime/dist/cli/update.js +86 -0
- package/apps/runtime/dist/cli/validate.js +75 -0
- package/apps/runtime/dist/cli/versions.js +123 -0
- package/apps/runtime/dist/connectors/builtin.js +86 -0
- package/apps/runtime/dist/connectors/external.js +409 -0
- package/apps/runtime/dist/connectors/gmail.js +107 -0
- package/apps/runtime/dist/connectors/imap.js +261 -0
- package/apps/runtime/dist/connectors/index.js +325 -0
- package/apps/runtime/dist/connectors/mail.js +72 -0
- package/apps/runtime/dist/connectors/outlook.js +90 -0
- package/apps/runtime/dist/connectors/plugin-connections.js +343 -0
- package/apps/runtime/dist/connectors/via-account.js +65 -0
- package/apps/runtime/dist/credits/credits.js +100 -0
- package/apps/runtime/dist/credits/estimate.js +152 -0
- package/apps/runtime/dist/db/adopt.js +149 -0
- package/apps/runtime/dist/db/client.js +173 -0
- package/apps/runtime/dist/db/control-schema.js +133 -0
- package/apps/runtime/dist/db/migrations/control/0000_last_absorbing_man.sql +47 -0
- package/apps/runtime/dist/db/migrations/control/0001_gorgeous_nicolaos.sql +41 -0
- package/apps/runtime/dist/db/migrations/control/0002_secret_penance.sql +1 -0
- package/apps/runtime/dist/db/migrations/control/0003_nasty_mordo.sql +3 -0
- package/apps/runtime/dist/db/migrations/control/0004_breezy_eddie_brock.sql +6 -0
- package/apps/runtime/dist/db/migrations/control/0005_chilly_oracle.sql +1 -0
- package/apps/runtime/dist/db/migrations/control/0006_sleepy_mojo.sql +1 -0
- package/apps/runtime/dist/db/migrations/control/0007_common_the_hand.sql +15 -0
- package/apps/runtime/dist/db/migrations/control/0008_runner.sql +8 -0
- package/apps/runtime/dist/db/migrations/control/0009_plugin_claim.sql +9 -0
- package/apps/runtime/dist/db/migrations/control/0010_tan_snowbird.sql +6 -0
- package/apps/runtime/dist/db/migrations/control/meta/0000_snapshot.json +311 -0
- package/apps/runtime/dist/db/migrations/control/meta/0001_snapshot.json +599 -0
- package/apps/runtime/dist/db/migrations/control/meta/0002_snapshot.json +607 -0
- package/apps/runtime/dist/db/migrations/control/meta/0003_snapshot.json +311 -0
- package/apps/runtime/dist/db/migrations/control/meta/0004_snapshot.json +350 -0
- package/apps/runtime/dist/db/migrations/control/meta/0005_snapshot.json +358 -0
- package/apps/runtime/dist/db/migrations/control/meta/0006_snapshot.json +365 -0
- package/apps/runtime/dist/db/migrations/control/meta/0007_snapshot.json +460 -0
- package/apps/runtime/dist/db/migrations/control/meta/0008_snapshot.json +505 -0
- package/apps/runtime/dist/db/migrations/control/meta/0009_snapshot.json +561 -0
- package/apps/runtime/dist/db/migrations/control/meta/0010_snapshot.json +600 -0
- package/apps/runtime/dist/db/migrations/control/meta/_journal.json +83 -0
- package/apps/runtime/dist/db/migrations/tenant/0000_eminent_freak.sql +188 -0
- package/apps/runtime/dist/db/migrations/tenant/0001_salty_master_chief.sql +1 -0
- package/apps/runtime/dist/db/migrations/tenant/0002_cloudy_firebird.sql +1 -0
- package/apps/runtime/dist/db/migrations/tenant/0003_brown_warbound.sql +52 -0
- package/apps/runtime/dist/db/migrations/tenant/0004_romantic_nocturne.sql +6 -0
- package/apps/runtime/dist/db/migrations/tenant/0005_reflective_forgotten_one.sql +2 -0
- package/apps/runtime/dist/db/migrations/tenant/0006_hard_war_machine.sql +30 -0
- package/apps/runtime/dist/db/migrations/tenant/0007_space_data.sql +43 -0
- package/apps/runtime/dist/db/migrations/tenant/0008_run_event_note.sql +1 -0
- package/apps/runtime/dist/db/migrations/tenant/0009_knowledge.sql +104 -0
- package/apps/runtime/dist/db/migrations/tenant/0010_plugin_connection.sql +15 -0
- package/apps/runtime/dist/db/migrations/tenant/0011_runners.sql +2 -0
- package/apps/runtime/dist/db/migrations/tenant/0012_assistant_chat.sql +40 -0
- package/apps/runtime/dist/db/migrations/tenant/0013_run_origin.sql +1 -0
- package/apps/runtime/dist/db/migrations/tenant/0014_run_answer.sql +2 -0
- package/apps/runtime/dist/db/migrations/tenant/0015_device_calls.sql +13 -0
- package/apps/runtime/dist/db/migrations/tenant/0016_even_trish_tilby.sql +12 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0000_snapshot.json +1323 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0001_snapshot.json +1330 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0002_snapshot.json +1337 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0003_snapshot.json +1605 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0004_snapshot.json +1645 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0005_snapshot.json +1659 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0006_snapshot.json +1696 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0007_snapshot.json +2012 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0008_snapshot.json +2019 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0009_snapshot.json +2837 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0010_snapshot.json +2942 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0011_snapshot.json +2956 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0012_snapshot.json +3132 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0013_snapshot.json +3139 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0014_snapshot.json +3154 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0015_snapshot.json +3243 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/0016_snapshot.json +3326 -0
- package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +125 -0
- package/apps/runtime/dist/db/schema.js +602 -0
- package/apps/runtime/dist/debug.js +196 -0
- package/apps/runtime/dist/docs/dev/index.md +41 -0
- package/apps/runtime/dist/docs/dev/meta.json +7 -0
- package/apps/runtime/dist/docs/dev/plugins/connections.md +74 -0
- package/apps/runtime/dist/docs/dev/plugins/events.md +89 -0
- package/apps/runtime/dist/docs/dev/plugins/examples.md +101 -0
- package/apps/runtime/dist/docs/dev/plugins/index.md +78 -0
- package/apps/runtime/dist/docs/dev/plugins/layout.md +90 -0
- package/apps/runtime/dist/docs/dev/plugins/meta.json +28 -0
- package/apps/runtime/dist/docs/dev/plugins/quick-start.md +94 -0
- package/apps/runtime/dist/docs/dev/plugins/reference.md +348 -0
- package/apps/runtime/dist/docs/dev/plugins/reloading.md +76 -0
- package/apps/runtime/dist/docs/dev/plugins/routes.md +185 -0
- package/apps/runtime/dist/docs/dev/plugins/runners.md +230 -0
- package/apps/runtime/dist/docs/dev/plugins/server.md +281 -0
- package/apps/runtime/dist/docs/dev/plugins/shipping.md +79 -0
- package/apps/runtime/dist/docs/dev/plugins/space.md +297 -0
- package/apps/runtime/dist/docs/dev/plugins/starters.md +70 -0
- package/apps/runtime/dist/docs/dev/plugins/studio.md +363 -0
- package/apps/runtime/dist/docs/dev/plugins/styling.md +129 -0
- package/apps/runtime/dist/docs/dev/plugins/tables.md +104 -0
- package/apps/runtime/dist/docs/dev/plugins/tools.md +139 -0
- package/apps/runtime/dist/docs/dev/wizard-format.md +125 -0
- package/apps/runtime/dist/docs/meta.json +3 -0
- package/apps/runtime/dist/docs/user/ai-apps.md +112 -0
- package/apps/runtime/dist/docs/user/assistant.md +77 -0
- package/apps/runtime/dist/docs/user/build-a-wizard.md +116 -0
- package/apps/runtime/dist/docs/user/command-line.md +83 -0
- package/apps/runtime/dist/docs/user/connectors.md +90 -0
- package/apps/runtime/dist/docs/user/create-account.md +52 -0
- package/apps/runtime/dist/docs/user/data.md +66 -0
- package/apps/runtime/dist/docs/user/first-start.md +60 -0
- package/apps/runtime/dist/docs/user/index.md +49 -0
- package/apps/runtime/dist/docs/user/install.md +123 -0
- package/apps/runtime/dist/docs/user/local-only.md +42 -0
- package/apps/runtime/dist/docs/user/meta.json +32 -0
- package/apps/runtime/dist/docs/user/models.md +156 -0
- package/apps/runtime/dist/docs/user/plugins.md +71 -0
- package/apps/runtime/dist/docs/user/run.md +98 -0
- package/apps/runtime/dist/docs/user/server.md +52 -0
- package/apps/runtime/dist/docs/user/space.md +126 -0
- package/apps/runtime/dist/docs/user/steps.md +220 -0
- package/apps/runtime/dist/docs/user/test-and-share.md +224 -0
- package/apps/runtime/dist/docs/user/troubleshooting.md +67 -0
- package/apps/runtime/dist/docs/user/wordpress.md +121 -0
- package/apps/runtime/dist/documents/parse.js +246 -0
- package/apps/runtime/dist/engenty/connections-external/build-connector.js +193 -0
- package/apps/runtime/dist/engenty/connections-external/errors.js +11 -0
- package/apps/runtime/dist/engenty/connections-external/import-service.js +270 -0
- package/apps/runtime/dist/engenty/connections-external/importer/classify.js +34 -0
- package/apps/runtime/dist/engenty/connections-external/importer/map-auth.js +185 -0
- package/apps/runtime/dist/engenty/connections-external/importer/normalize-mcp.js +63 -0
- package/apps/runtime/dist/engenty/connections-external/importer/normalize-openapi.js +130 -0
- package/apps/runtime/dist/engenty/connections-external/invoke/http-invoker.js +143 -0
- package/apps/runtime/dist/engenty/connections-external/invoke/mcp-client.js +143 -0
- package/apps/runtime/dist/engenty/connections-external/net/guarded-fetch.js +119 -0
- package/apps/runtime/dist/engenty/connections-external/oauth-dcr.js +88 -0
- package/apps/runtime/dist/engenty/connections-external/registry-client.js +336 -0
- package/apps/runtime/dist/engenty/connections-external/registry-source.js +82 -0
- package/apps/runtime/dist/engenty/connections-external/types.js +7 -0
- package/apps/runtime/dist/engenty/connections-github/connector.js +209 -0
- package/apps/runtime/dist/engenty/connections-google/connectors/calendar.js +381 -0
- package/apps/runtime/dist/engenty/connections-google/connectors/contacts.js +94 -0
- package/apps/runtime/dist/engenty/connections-google/connectors/drive.js +290 -0
- package/apps/runtime/dist/engenty/connections-google/connectors/gmail.js +567 -0
- package/apps/runtime/dist/engenty/connections-google/definitions.js +11 -0
- package/apps/runtime/dist/engenty/connections-google/shared.js +73 -0
- package/apps/runtime/dist/engenty/connections-hubspot/connector.js +140 -0
- package/apps/runtime/dist/engenty/connections-microsoft/action.js +17 -0
- package/apps/runtime/dist/engenty/connections-microsoft/graph.js +114 -0
- package/apps/runtime/dist/engenty/connections-microsoft/onedrive.js +286 -0
- package/apps/runtime/dist/engenty/connections-microsoft/outlook.js +492 -0
- package/apps/runtime/dist/engenty/connections-s3/s3.js +328 -0
- package/apps/runtime/dist/engenty/connections-sdk/files-capability.js +86 -0
- package/apps/runtime/dist/engenty/connections-sdk/oauth2.js +150 -0
- package/apps/runtime/dist/engenty/connections-sdk/registry.js +89 -0
- package/apps/runtime/dist/engenty/connections-sdk/storage-capability.js +84 -0
- package/apps/runtime/dist/engenty/connections-sdk/types.js +30 -0
- package/apps/runtime/dist/engenty/connections-slack/connector.js +360 -0
- package/apps/runtime/dist/engenty/csv-import/csv-matrix.js +178 -0
- package/apps/runtime/dist/engenty/csv-import/import-sources.js +87 -0
- package/apps/runtime/dist/engenty/csv-import/parse-csv.js +129 -0
- package/apps/runtime/dist/engenty/csv-import/serialize-csv.js +20 -0
- package/apps/runtime/dist/engenty/csv-import/types.js +1 -0
- package/apps/runtime/dist/engenty/csv-import/xlsx-workbook.js +159 -0
- package/apps/runtime/dist/engenty/doc-converter/interface.js +9 -0
- package/apps/runtime/dist/engenty/doc-converter/page-break.js +92 -0
- package/apps/runtime/dist/engenty/doc-converter/providers/local/index.js +72 -0
- package/apps/runtime/dist/engenty/document-scanner/schemas/classifier.js +30 -0
- package/apps/runtime/dist/engenty/document-scanner/schemas/index.js +4 -0
- package/apps/runtime/dist/engenty/document-scanner/schemas/invoice.js +73 -0
- package/apps/runtime/dist/engenty/document-scanner/schemas/receipt.js +63 -0
- package/apps/runtime/dist/engenty/document-scanner/schemas/shared.js +40 -0
- package/apps/runtime/dist/engenty/search-index/chunks.js +164 -0
- package/apps/runtime/dist/engenty/search-index/contracts.js +9 -0
- package/apps/runtime/dist/engenty/shims/connections-sdk.js +39 -0
- package/apps/runtime/dist/engenty/shims/plugin-sdk.js +1 -0
- package/apps/runtime/dist/engenty/shims/web-ingest.js +19 -0
- package/apps/runtime/dist/engenty/web-ingest/ssrf.js +277 -0
- package/apps/runtime/dist/engine/asks.js +82 -0
- package/apps/runtime/dist/engine/decide.js +82 -0
- package/apps/runtime/dist/engine/device.js +194 -0
- package/apps/runtime/dist/engine/events.js +128 -0
- package/apps/runtime/dist/engine/input.js +208 -0
- package/apps/runtime/dist/engine/owner.js +32 -0
- package/apps/runtime/dist/engine/prepare.js +90 -0
- package/apps/runtime/dist/engine/push.js +58 -0
- package/apps/runtime/dist/engine/requirements.js +355 -0
- package/apps/runtime/dist/engine/resources.js +198 -0
- package/apps/runtime/dist/engine/runner.js +970 -0
- package/apps/runtime/dist/engine/steps.js +1000 -0
- package/apps/runtime/dist/engine/surface.js +91 -0
- package/apps/runtime/dist/engine/template.js +240 -0
- package/apps/runtime/dist/engine/types.js +4 -0
- package/apps/runtime/dist/env.js +295 -0
- package/apps/runtime/dist/features.js +123 -0
- package/apps/runtime/dist/files/blobs.js +22 -0
- package/apps/runtime/dist/files/objects.js +86 -0
- package/apps/runtime/dist/files/storage.js +120 -0
- package/apps/runtime/dist/files/web-images.js +101 -0
- package/apps/runtime/dist/film/project.js +257 -0
- package/apps/runtime/dist/film/skills.js +91 -0
- package/apps/runtime/dist/film/sounds.js +122 -0
- package/apps/runtime/dist/film/step.js +289 -0
- package/apps/runtime/dist/film/tools.js +99 -0
- package/apps/runtime/dist/geocode.js +58 -0
- package/apps/runtime/dist/harness/antigravity.js +129 -0
- package/apps/runtime/dist/harness/apple.js +270 -0
- package/apps/runtime/dist/harness/claude.js +147 -0
- package/apps/runtime/dist/harness/codex.js +229 -0
- package/apps/runtime/dist/harness/cursor.js +93 -0
- package/apps/runtime/dist/harness/env.js +124 -0
- package/apps/runtime/dist/harness/index.js +95 -0
- package/apps/runtime/dist/harness/model.js +279 -0
- package/apps/runtime/dist/harness/prompt.js +121 -0
- package/apps/runtime/dist/harness/terminal.js +194 -0
- package/apps/runtime/dist/harness/types.js +7 -0
- package/apps/runtime/dist/index.js +113 -0
- package/apps/runtime/dist/limits.js +81 -0
- package/apps/runtime/dist/link-preview.js +60 -0
- package/apps/runtime/dist/log.js +106 -0
- package/apps/runtime/dist/manage.js +249 -0
- package/apps/runtime/dist/mcp/auth.js +161 -0
- package/apps/runtime/dist/mcp/bridge.js +59 -0
- package/apps/runtime/dist/mcp/flow-app.js +97 -0
- package/apps/runtime/dist/mcp/handler.js +54 -0
- package/apps/runtime/dist/mcp/scopes.js +14 -0
- package/apps/runtime/dist/mcp/seen.js +65 -0
- package/apps/runtime/dist/mcp/tools.js +572 -0
- package/apps/runtime/dist/media/conversation.js +167 -0
- package/apps/runtime/dist/media/ffmpeg.js +121 -0
- package/apps/runtime/dist/media/generate.js +120 -0
- package/apps/runtime/dist/media/marking.js +121 -0
- package/apps/runtime/dist/media/transcribe.js +198 -0
- package/apps/runtime/dist/model-errors.js +42 -0
- package/apps/runtime/dist/models.js +1164 -0
- package/apps/runtime/dist/plugin.js +61 -0
- package/apps/runtime/dist/plugins/channels.js +78 -0
- package/apps/runtime/dist/plugins/claims.js +56 -0
- package/apps/runtime/dist/plugins/discovery.js +155 -0
- package/apps/runtime/dist/plugins/events.js +63 -0
- package/apps/runtime/dist/plugins/jobs.js +64 -0
- package/apps/runtime/dist/plugins/loader.js +508 -0
- package/apps/runtime/dist/plugins/migrations.js +69 -0
- package/apps/runtime/dist/plugins/pro-keys.js +34 -0
- package/apps/runtime/dist/plugins/pro-state.js +83 -0
- package/apps/runtime/dist/plugins/pro.js +310 -0
- package/apps/runtime/dist/plugins/public.js +44 -0
- package/apps/runtime/dist/plugins/registry.js +122 -0
- package/apps/runtime/dist/plugins/runs.js +210 -0
- package/apps/runtime/dist/render/browser-path.js +54 -0
- package/apps/runtime/dist/render/chromium.js +98 -0
- package/apps/runtime/dist/render/convert.js +158 -0
- package/apps/runtime/dist/render/downloads.js +299 -0
- package/apps/runtime/dist/render/guard.js +25 -0
- package/apps/runtime/dist/render/shaped.js +137 -0
- package/apps/runtime/dist/routes/api.js +440 -0
- package/apps/runtime/dist/routes/debug.js +42 -0
- package/apps/runtime/dist/routes/delivery.js +90 -0
- package/apps/runtime/dist/routes/internal.js +81 -0
- package/apps/runtime/dist/routes/lang.js +25 -0
- package/apps/runtime/dist/routes/marketplace.js +43 -0
- package/apps/runtime/dist/routes/plugin-public.js +113 -0
- package/apps/runtime/dist/routes/plugins.js +212 -0
- package/apps/runtime/dist/routes/runs.js +1422 -0
- package/apps/runtime/dist/routes/studio.js +1629 -0
- package/apps/runtime/dist/routes/wizard-stream.js +30 -0
- package/apps/runtime/dist/running.js +39 -0
- package/apps/runtime/dist/sandbox/docker.js +75 -0
- package/apps/runtime/dist/sandbox/index.js +23 -0
- package/apps/runtime/dist/sandbox/types.js +1 -0
- package/apps/runtime/dist/secrets/crypto.js +28 -0
- package/apps/runtime/dist/secrets/signing.js +52 -0
- package/apps/runtime/dist/secrets/vault.js +59 -0
- package/apps/runtime/dist/services/access.js +88 -0
- package/apps/runtime/dist/services/api.js +248 -0
- package/apps/runtime/dist/services/architect.js +95 -0
- package/apps/runtime/dist/services/assistant-chats.js +311 -0
- package/apps/runtime/dist/services/brand.js +85 -0
- package/apps/runtime/dist/services/cloud.js +456 -0
- package/apps/runtime/dist/services/draft-events.js +27 -0
- package/apps/runtime/dist/services/engenty-shapes.js +71 -0
- package/apps/runtime/dist/services/errors.js +29 -0
- package/apps/runtime/dist/services/files.js +178 -0
- package/apps/runtime/dist/services/knowledge-model.js +559 -0
- package/apps/runtime/dist/services/knowledge.js +721 -0
- package/apps/runtime/dist/services/links.js +16 -0
- package/apps/runtime/dist/services/marketplace.js +492 -0
- package/apps/runtime/dist/services/onboarding.js +152 -0
- package/apps/runtime/dist/services/package-file.js +82 -0
- package/apps/runtime/dist/services/package.js +170 -0
- package/apps/runtime/dist/services/profile.js +51 -0
- package/apps/runtime/dist/services/project-files.js +439 -0
- package/apps/runtime/dist/services/project-index.js +707 -0
- package/apps/runtime/dist/services/projects.js +387 -0
- package/apps/runtime/dist/services/relevance.js +58 -0
- package/apps/runtime/dist/services/runners.js +178 -0
- package/apps/runtime/dist/services/runs.js +524 -0
- package/apps/runtime/dist/services/shares.js +130 -0
- package/apps/runtime/dist/services/site.js +270 -0
- package/apps/runtime/dist/services/space-categories.js +861 -0
- package/apps/runtime/dist/services/space-data.js +792 -0
- package/apps/runtime/dist/services/space-origin.js +207 -0
- package/apps/runtime/dist/services/spaces.js +656 -0
- package/apps/runtime/dist/services/translations.js +306 -0
- package/apps/runtime/dist/services/widgets.js +34 -0
- package/apps/runtime/dist/services/wizard-icon.js +157 -0
- package/apps/runtime/dist/services/wizards.js +420 -0
- package/apps/runtime/dist/settings.js +16 -0
- package/apps/runtime/dist/store/errors.js +4 -0
- package/apps/runtime/dist/store/index.js +299 -0
- package/apps/runtime/dist/store/shared-lists.js +123 -0
- package/apps/runtime/dist/tenants/control.js +238 -0
- package/apps/runtime/dist/tenants/tenant.js +26 -0
- package/apps/runtime/dist/texts.js +207 -0
- package/apps/runtime/dist/tools/browser.js +703 -0
- package/apps/runtime/dist/tools/connector.js +204 -0
- package/apps/runtime/dist/tools/index.js +291 -0
- package/apps/runtime/dist/tools/mail.js +104 -0
- package/apps/runtime/dist/tools/net-guard.js +170 -0
- package/apps/runtime/dist/tools/pages.js +81 -0
- package/apps/runtime/dist/tools/plugin.js +180 -0
- package/apps/runtime/dist/tools/project.js +154 -0
- package/apps/runtime/dist/tools/shared.js +69 -0
- package/apps/runtime/dist/tools/store.js +238 -0
- package/apps/runtime/dist/update.js +113 -0
- package/apps/runtime/dist/widgets/bundle.js +99 -0
- package/apps/runtime/dist/widgets/render.js +329 -0
- package/apps/runtime/dist/widgets/runtime.js +108 -0
- package/apps/runtime/dist/widgets/script.js +30 -0
- package/apps/runtime/dist/widgets/step.js +223 -0
- package/apps/web/dist/ai-labels/ai-black.svg +20 -0
- package/apps/web/dist/ai-labels/ai-generated-black.svg +31 -0
- package/apps/web/dist/ai-labels/ai-generated-white.svg +32 -0
- package/apps/web/dist/ai-labels/ai-modified-black.svg +30 -0
- package/apps/web/dist/ai-labels/ai-modified-white.svg +31 -0
- package/apps/web/dist/ai-labels/ai-white.svg +21 -0
- package/apps/web/dist/assets/AboutDialog-D4mvc-zu.js +1 -0
- package/apps/web/dist/assets/ChangelogDialog-DLqpJsF6.js +1 -0
- package/apps/web/dist/assets/ChatView-3laypRcE.js +10 -0
- package/apps/web/dist/assets/EditorPage-BalA5U2Y.js +3 -0
- package/apps/web/dist/assets/FlowPreview-CusP7ci9.js +1 -0
- package/apps/web/dist/assets/Harness-BrP-ENHg.css +1 -0
- package/apps/web/dist/assets/Harness-iYLtOLaK.js +16 -0
- package/apps/web/dist/assets/NewWizardChannels-CbwJ9A56.js +1 -0
- package/apps/web/dist/assets/NewWizardPage-BOBYiB9i.js +7 -0
- package/apps/web/dist/assets/OnboardingPage-CUwCiVIr.js +1 -0
- package/apps/web/dist/assets/ProjectPage-Bb16MdYG.js +1 -0
- package/apps/web/dist/assets/PublicRunner-BCt7Q6C-.js +1 -0
- package/apps/web/dist/assets/ReadOnly-kIHX2TEy.js +1 -0
- package/apps/web/dist/assets/RunDrawer-hZ9oeSXu.js +4 -0
- package/apps/web/dist/assets/RunnerView-DUS9fPmx.js +1 -0
- package/apps/web/dist/assets/SettingsPage-BzwR50fi.js +1 -0
- package/apps/web/dist/assets/SetupPage-gAp7rPxp.js +1 -0
- package/apps/web/dist/assets/SharePage-DqZWHva_.js +1 -0
- package/apps/web/dist/assets/changelog-DugmCNSf.js +1 -0
- package/apps/web/dist/assets/engenty-eXZ-EAwd.js +1 -0
- package/apps/web/dist/assets/esm-DXeMu8Lb.js +7 -0
- package/apps/web/dist/assets/fluffy-engenty-ClRou7yu.js +456 -0
- package/apps/web/dist/assets/index-AfUa8xKD.css +1 -0
- package/apps/web/dist/assets/index-C5Sm7tTR.js +14 -0
- package/apps/web/dist/assets/jsx-runtime-BNakU3Ej.js +1 -0
- package/apps/web/dist/assets/lock-R_CfU0Xo.js +1 -0
- package/apps/web/dist/assets/oss-credits-cZ9NUaLZ.js +1 -0
- package/apps/web/dist/assets/pdfmake-Cx9scTbD.js +228 -0
- package/apps/web/dist/assets/phone-CgrIS4_-.js +1 -0
- package/apps/web/dist/assets/preload-helper-CNEI7N0N.js +1 -0
- package/apps/web/dist/assets/qr-scanner-worker.min-CJaXo3yu.js +98 -0
- package/apps/web/dist/assets/qr-scanner.min-C_UI0gH-.js +1 -0
- package/apps/web/dist/assets/rolldown-runtime-hePW80VL.js +1 -0
- package/apps/web/dist/assets/settings-menu-2IMOOlLl.js +1 -0
- package/apps/web/dist/assets/ui-dzGvc3xk.js +137 -0
- package/apps/web/dist/assets/upload-BSuTilFF.js +1 -0
- package/apps/web/dist/assets/vfs_fonts-DllDSYt1.js +1 -0
- package/apps/web/dist/embed.js +266 -0
- package/apps/web/dist/favicon.svg +1 -0
- package/apps/web/dist/icons/apple-touch-icon.png +0 -0
- package/apps/web/dist/icons/icon-192.png +0 -0
- package/apps/web/dist/icons/icon-512.png +0 -0
- package/apps/web/dist/icons/icon-maskable-512.png +0 -0
- package/apps/web/dist/index.html +48 -0
- package/apps/web/dist/install.sh +577 -0
- package/apps/web/dist/manifest.webmanifest +21 -0
- package/apps/web/dist/mcp/flow.html +980 -0
- package/apps/web/dist/sw.js +15 -0
- package/bin/wizards.mjs +288 -0
- package/modules/README.md +15 -0
- package/node_modules/@engenty/wizards/dist/plugin/index.d.ts +1150 -0
- package/node_modules/@engenty/wizards/dist/plugin/index.js +4 -0
- package/node_modules/@engenty/wizards/dist/plugin/studio.d.ts +322 -0
- package/node_modules/@engenty/wizards/dist/plugin/studio.js +4 -0
- package/node_modules/@engenty/wizards/dist/plugin/thread.d.ts +174 -0
- package/node_modules/@engenty/wizards/dist/plugin/thread.js +821 -0
- package/node_modules/@engenty/wizards/package.json +11 -0
- package/node_modules/@engenty-wizards/shared/dist/assistant.d.ts +174 -0
- package/node_modules/@engenty-wizards/shared/dist/assistant.js +65 -0
- package/node_modules/@engenty-wizards/shared/dist/changes.d.ts +22 -0
- package/node_modules/@engenty-wizards/shared/dist/changes.js +61 -0
- package/node_modules/@engenty-wizards/shared/dist/connectors.d.ts +77 -0
- package/node_modules/@engenty-wizards/shared/dist/connectors.js +2 -0
- package/node_modules/@engenty-wizards/shared/dist/decision.d.ts +76 -0
- package/node_modules/@engenty-wizards/shared/dist/decision.js +147 -0
- package/node_modules/@engenty-wizards/shared/dist/definition.d.ts +2922 -0
- package/node_modules/@engenty-wizards/shared/dist/definition.js +1920 -0
- package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns-format.d.ts +5 -0
- package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns-format.js +132 -0
- package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns-value.d.ts +11 -0
- package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns-value.js +209 -0
- package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns.d.ts +532 -0
- package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns.js +217 -0
- package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/index.d.ts +3 -0
- package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/index.js +3 -0
- package/node_modules/@engenty-wizards/shared/dist/engenty/search-index/catalog-lexical.d.ts +14 -0
- package/node_modules/@engenty-wizards/shared/dist/engenty/search-index/catalog-lexical.js +166 -0
- package/node_modules/@engenty-wizards/shared/dist/engenty/search-index/catalog-rank.d.ts +33 -0
- package/node_modules/@engenty-wizards/shared/dist/engenty/search-index/catalog-rank.js +99 -0
- package/node_modules/@engenty-wizards/shared/dist/feature-flags.d.ts +78 -0
- package/node_modules/@engenty-wizards/shared/dist/feature-flags.js +70 -0
- package/node_modules/@engenty-wizards/shared/dist/features.d.ts +41 -0
- package/node_modules/@engenty-wizards/shared/dist/features.js +89 -0
- package/node_modules/@engenty-wizards/shared/dist/fit.d.ts +71 -0
- package/node_modules/@engenty-wizards/shared/dist/fit.js +382 -0
- package/node_modules/@engenty-wizards/shared/dist/json-schema.d.ts +14 -0
- package/node_modules/@engenty-wizards/shared/dist/json-schema.js +66 -0
- package/node_modules/@engenty-wizards/shared/dist/knowledge.d.ts +199 -0
- package/node_modules/@engenty-wizards/shared/dist/knowledge.js +68 -0
- package/node_modules/@engenty-wizards/shared/dist/marketplace-entry.d.ts +35 -0
- package/node_modules/@engenty-wizards/shared/dist/marketplace-entry.js +107 -0
- package/node_modules/@engenty-wizards/shared/dist/marketplace-search.d.ts +20 -0
- package/node_modules/@engenty-wizards/shared/dist/marketplace-search.js +136 -0
- package/node_modules/@engenty-wizards/shared/dist/marketplace.d.ts +227 -0
- package/node_modules/@engenty-wizards/shared/dist/marketplace.js +354 -0
- package/node_modules/@engenty-wizards/shared/dist/merge.d.ts +7 -0
- package/node_modules/@engenty-wizards/shared/dist/merge.js +40 -0
- package/node_modules/@engenty-wizards/shared/dist/numbers.d.ts +24 -0
- package/node_modules/@engenty-wizards/shared/dist/numbers.js +54 -0
- package/node_modules/@engenty-wizards/shared/dist/projects.d.ts +224 -0
- package/node_modules/@engenty-wizards/shared/dist/projects.js +319 -0
- package/node_modules/@engenty-wizards/shared/dist/providers.d.ts +101 -0
- package/node_modules/@engenty-wizards/shared/dist/providers.js +390 -0
- package/node_modules/@engenty-wizards/shared/dist/run.d.ts +680 -0
- package/node_modules/@engenty-wizards/shared/dist/run.js +620 -0
- package/node_modules/@engenty-wizards/shared/dist/runner-texts.d.ts +546 -0
- package/node_modules/@engenty-wizards/shared/dist/runner-texts.js +523 -0
- package/node_modules/@engenty-wizards/shared/dist/runners.d.ts +93 -0
- package/node_modules/@engenty-wizards/shared/dist/runners.js +146 -0
- package/node_modules/@engenty-wizards/shared/dist/shape.d.ts +102 -0
- package/node_modules/@engenty-wizards/shared/dist/shape.js +318 -0
- package/node_modules/@engenty-wizards/shared/dist/space-data.d.ts +89 -0
- package/node_modules/@engenty-wizards/shared/dist/space-data.js +47 -0
- package/node_modules/@engenty-wizards/shared/dist/store.d.ts +117 -0
- package/node_modules/@engenty-wizards/shared/dist/store.js +81 -0
- package/node_modules/@engenty-wizards/shared/dist/surface.d.ts +115 -0
- package/node_modules/@engenty-wizards/shared/dist/surface.js +442 -0
- package/node_modules/@engenty-wizards/shared/dist/texts.d.ts +45 -0
- package/node_modules/@engenty-wizards/shared/dist/texts.js +54 -0
- package/node_modules/@engenty-wizards/shared/dist/translation.d.ts +23 -0
- package/node_modules/@engenty-wizards/shared/dist/translation.js +154 -0
- package/node_modules/@engenty-wizards/shared/dist/wizard-package.d.ts +48 -0
- package/node_modules/@engenty-wizards/shared/dist/wizard-package.js +49 -0
- package/node_modules/@engenty-wizards/shared/dist/workspace.d.ts +16 -0
- package/node_modules/@engenty-wizards/shared/dist/workspace.js +51 -0
- package/node_modules/@engenty-wizards/shared/package.json +10 -0
- package/package.json +77 -4
- package/plugin/.claude-plugin/plugin.json +9 -0
- package/plugin/.mcp.json +8 -0
- package/plugin/commands/wizard.md +8 -0
- package/plugin/skills/build-wizard/SKILL.md +27 -0
- package/plugin/skills/use-wizard/SKILL.md +18 -0
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { type Lang, type WizardDefinition } from "./definition.js";
|
|
2
|
+
import { type Gap, type Texts } from "./texts.js";
|
|
3
|
+
/**
|
|
4
|
+
* The marketplace: wizards anyone can start from. What an entry is sorted by — formats, industry,
|
|
5
|
+
* use case — and what follows from its definition: the AI capabilities it needs, how much a
|
|
6
|
+
* person has to fill in, and how expensive a run is.
|
|
7
|
+
*/
|
|
8
|
+
export declare const MARKETPLACE_LANGS: readonly ["de", "en"];
|
|
9
|
+
export type MarketplaceLang = (typeof MARKETPLACE_LANGS)[number];
|
|
10
|
+
/** What comes out of a run. */
|
|
11
|
+
export declare const ITEM_FORMAT_IDS: readonly ["text", "document", "table", "image", "video", "audio", "dashboard"];
|
|
12
|
+
export type ItemFormat = (typeof ITEM_FORMAT_IDS)[number];
|
|
13
|
+
export declare const INDUSTRY_IDS: readonly ["any", "trades", "gastronomy", "hospitality", "realEstate", "retail", "health", "professional", "agency", "events", "publicSector"];
|
|
14
|
+
export type Industry = (typeof INDUSTRY_IDS)[number];
|
|
15
|
+
export declare const USE_CASE_IDS: readonly ["marketing", "sales", "accounting", "service", "research", "hr", "operations", "website", "visuals", "inquiries", "advice"];
|
|
16
|
+
export type UseCase = (typeof USE_CASE_IDS)[number];
|
|
17
|
+
/**
|
|
18
|
+
* What the models and tools behind a wizard must be able to do. `film`: a film the installed
|
|
19
|
+
* client makes, only on a computer with Claude Code, on its subscription.
|
|
20
|
+
*/
|
|
21
|
+
export declare const CAPABILITY_IDS: readonly ["text", "web", "browser", "documents", "image", "video", "speech", "listening", "code", "connectors", "film"];
|
|
22
|
+
export type Capability = (typeof CAPABILITY_IDS)[number];
|
|
23
|
+
export declare const COST_TIER_IDS: readonly ["low", "medium", "high"];
|
|
24
|
+
export type CostTier = (typeof COST_TIER_IDS)[number];
|
|
25
|
+
/**
|
|
26
|
+
* The plan a wizard needs. Free runs on what every runtime has; Pro needs plugins, which come
|
|
27
|
+
* with the Pro and Team plans of engenty.ai.
|
|
28
|
+
*/
|
|
29
|
+
export declare const MARKETPLACE_PLAN_IDS: readonly ["free", "pro"];
|
|
30
|
+
export type MarketplacePlan = (typeof MARKETPLACE_PLAN_IDS)[number];
|
|
31
|
+
/** What a marketplace label belongs to: a facet, a cost tier, a plan. */
|
|
32
|
+
export type MarketGroup = "format" | "industry" | "useCase" | "capability" | "cost" | "plan" | "outline";
|
|
33
|
+
declare const MARKET_EN: {
|
|
34
|
+
readonly "format.text": "Text";
|
|
35
|
+
readonly "format.document": "Document (PDF, Word)";
|
|
36
|
+
readonly "format.table": "Table";
|
|
37
|
+
readonly "format.image": "Image";
|
|
38
|
+
readonly "format.video": "Video";
|
|
39
|
+
readonly "format.audio": "Audio";
|
|
40
|
+
readonly "format.dashboard": "Dashboard";
|
|
41
|
+
readonly "industry.any": "Any industry";
|
|
42
|
+
readonly "industry.trades": "Trades";
|
|
43
|
+
readonly "industry.gastronomy": "Food service";
|
|
44
|
+
readonly "industry.hospitality": "Hotels & tourism";
|
|
45
|
+
readonly "industry.realEstate": "Real estate";
|
|
46
|
+
readonly "industry.retail": "Retail";
|
|
47
|
+
readonly "industry.health": "Health";
|
|
48
|
+
readonly "industry.professional": "Professional services";
|
|
49
|
+
readonly "industry.agency": "Agency & marketing";
|
|
50
|
+
readonly "industry.events": "Events";
|
|
51
|
+
readonly "industry.publicSector": "Associations & public sector";
|
|
52
|
+
readonly "useCase.marketing": "Marketing & social media";
|
|
53
|
+
readonly "useCase.sales": "Offers & sales";
|
|
54
|
+
readonly "useCase.accounting": "Accounting & receipts";
|
|
55
|
+
readonly "useCase.service": "Customer service";
|
|
56
|
+
readonly "useCase.research": "Research & analysis";
|
|
57
|
+
readonly "useCase.hr": "HR & applications";
|
|
58
|
+
readonly "useCase.operations": "Planning & operations";
|
|
59
|
+
readonly "useCase.website": "Website helpers";
|
|
60
|
+
readonly "useCase.visuals": "Images & video";
|
|
61
|
+
readonly "useCase.inquiries": "Inquiries & bookings";
|
|
62
|
+
readonly "useCase.advice": "Advice & pricing";
|
|
63
|
+
readonly "capability.text": "Writes text";
|
|
64
|
+
readonly "capability.web": "Web search";
|
|
65
|
+
readonly "capability.browser": "Drives a browser";
|
|
66
|
+
readonly "capability.documents": "Reads documents & photos";
|
|
67
|
+
readonly "capability.image": "Makes images";
|
|
68
|
+
readonly "capability.video": "Makes video";
|
|
69
|
+
readonly "capability.speech": "Speech output";
|
|
70
|
+
readonly "capability.listening": "Understands voice notes";
|
|
71
|
+
readonly "capability.code": "Runs code";
|
|
72
|
+
readonly "capability.connectors": "Connected accounts & systems";
|
|
73
|
+
readonly "capability.film": "Films with Claude Code (on your subscription)";
|
|
74
|
+
readonly "cost.low": "low cost";
|
|
75
|
+
readonly "cost.medium": "medium cost";
|
|
76
|
+
readonly "cost.high": "high cost";
|
|
77
|
+
readonly "plan.free": "Free";
|
|
78
|
+
readonly "plan.pro": "Pro";
|
|
79
|
+
readonly "outline.otherwise": "otherwise";
|
|
80
|
+
readonly "outline.and": "{first} and {second}";
|
|
81
|
+
readonly "outline.with": "with {name}";
|
|
82
|
+
readonly "outline.without": "without {name}";
|
|
83
|
+
readonly "outline.contains": "{name} contains {value}";
|
|
84
|
+
};
|
|
85
|
+
type MarketKey = keyof typeof MARKET_EN;
|
|
86
|
+
export declare const MARKET_TEXTS: Texts<MarketKey>;
|
|
87
|
+
/** The label of a facet value, a cost tier or a plan in a language; its id where it has none. */
|
|
88
|
+
export declare function marketLabel(group: MarketGroup, id: string, lang: Lang, params?: Record<string, Gap | undefined>): string;
|
|
89
|
+
/** A label in every language, for search: a person may type either. */
|
|
90
|
+
export declare const marketLabels: (group: MarketGroup, id: string) => string[];
|
|
91
|
+
/** The formats a run hands over, read from what the result step offers. */
|
|
92
|
+
export declare function formatsOf(def: WizardDefinition): ItemFormat[];
|
|
93
|
+
/** The capabilities a definition needs, read from its steps. */
|
|
94
|
+
export declare function capabilitiesOf(def: WizardDefinition): Capability[];
|
|
95
|
+
/** The plugins a definition's steps use, by id: a runtime without one of them cannot run it. */
|
|
96
|
+
export declare function pluginsOf(def: WizardDefinition): string[];
|
|
97
|
+
/** The plan a wizard needs: Pro as soon as it uses a plugin. */
|
|
98
|
+
export declare const planOf: (plugins: readonly string[]) => MarketplacePlan;
|
|
99
|
+
/** What a person does in a run, and about how long the whole run takes. */
|
|
100
|
+
export interface Effort {
|
|
101
|
+
/** Fields to fill in, the required ones of them. */
|
|
102
|
+
fields: number;
|
|
103
|
+
required: number;
|
|
104
|
+
/** Stops where the person looks at a result before it goes on. */
|
|
105
|
+
reviews: number;
|
|
106
|
+
/** Minutes from start to result: filling in, plus the time the steps work. */
|
|
107
|
+
minutes: number;
|
|
108
|
+
}
|
|
109
|
+
export declare function effortOf(def: WizardDefinition): Effort;
|
|
110
|
+
/** How expensive a run is, where no price in credits is known: by what it makes and uses. */
|
|
111
|
+
export declare function costTierOf(capabilities: Capability[]): CostTier;
|
|
112
|
+
/** One entry as the marketplace lists it, in a language. */
|
|
113
|
+
export interface MarketplaceSummary {
|
|
114
|
+
id: string;
|
|
115
|
+
/** Goes up whenever the entry changes. */
|
|
116
|
+
revision: number;
|
|
117
|
+
/** Of everything the entry is made of, every language and file: changes with any of it. */
|
|
118
|
+
hash: string;
|
|
119
|
+
/** When the entry last changed, ISO 8601. */
|
|
120
|
+
updatedAt: string;
|
|
121
|
+
/** One of the entries an app keeps for offline use without being asked. */
|
|
122
|
+
starter: boolean;
|
|
123
|
+
/** The language of `title` and `pitch`; the entry's own where it is not translated. */
|
|
124
|
+
language: MarketplaceLang;
|
|
125
|
+
title: string;
|
|
126
|
+
pitch: string;
|
|
127
|
+
/** What people ask for when they mean this entry: searched, never shown. */
|
|
128
|
+
terms: string[];
|
|
129
|
+
avatar: string;
|
|
130
|
+
formats: ItemFormat[];
|
|
131
|
+
industries: Industry[];
|
|
132
|
+
useCases: UseCase[];
|
|
133
|
+
capabilities: Capability[];
|
|
134
|
+
effort: Effort;
|
|
135
|
+
costTier: CostTier;
|
|
136
|
+
steps: number;
|
|
137
|
+
/** The definition version the entry's wizard is written in (`DEFINITION_VERSION`). */
|
|
138
|
+
version: number;
|
|
139
|
+
/**
|
|
140
|
+
* The plugins its wizard uses, by id (`pluginsOf`). A marketplace older than this field leaves
|
|
141
|
+
* it out: read it as none.
|
|
142
|
+
*/
|
|
143
|
+
plugins?: string[];
|
|
144
|
+
/** The plan it needs (`planOf`); left out by an older marketplace: free. */
|
|
145
|
+
plan?: MarketplacePlan;
|
|
146
|
+
/**
|
|
147
|
+
* The plugin's own starter this entry shows in the catalog, `<plugin id>.<starter id>`: a
|
|
148
|
+
* runtime with that plugin lists the plugin's starter instead.
|
|
149
|
+
*/
|
|
150
|
+
pluginStarter?: string;
|
|
151
|
+
}
|
|
152
|
+
/** What a search narrows by, besides its words. */
|
|
153
|
+
export interface MarketplaceFilters {
|
|
154
|
+
useCase?: UseCase;
|
|
155
|
+
industry?: Industry;
|
|
156
|
+
format?: ItemFormat;
|
|
157
|
+
capability?: Capability;
|
|
158
|
+
plan?: MarketplacePlan;
|
|
159
|
+
}
|
|
160
|
+
/** Per option of a filter: the entries it would leave, with the other filters as they are. */
|
|
161
|
+
export interface MarketplaceFacets {
|
|
162
|
+
useCase: Partial<Record<UseCase, number>>;
|
|
163
|
+
industry: Partial<Record<Industry, number>>;
|
|
164
|
+
format: Partial<Record<ItemFormat, number>>;
|
|
165
|
+
/** Optional: a marketplace older than this filter leaves it out. */
|
|
166
|
+
capability?: Partial<Record<Capability, number>>;
|
|
167
|
+
/** Optional: a marketplace older than this filter leaves it out. */
|
|
168
|
+
plan?: Partial<Record<MarketplacePlan, number>>;
|
|
169
|
+
}
|
|
170
|
+
/** A page of a search: the entries, best first, how many there are, and the filters' counts. */
|
|
171
|
+
export interface MarketplacePage<T extends MarketplaceSummary = MarketplaceSummary> {
|
|
172
|
+
entries: T[];
|
|
173
|
+
total: number;
|
|
174
|
+
/** Every published entry, before words and filters. */
|
|
175
|
+
all: number;
|
|
176
|
+
facets: MarketplaceFacets;
|
|
177
|
+
}
|
|
178
|
+
/** One entry with its wizard in a language: what an app starts a wizard from. */
|
|
179
|
+
export interface MarketplaceItem extends MarketplaceSummary {
|
|
180
|
+
/** The wizard as written; an app reads it with its own schema. */
|
|
181
|
+
definition: unknown;
|
|
182
|
+
/** The workspace it starts with: path → base64. */
|
|
183
|
+
files: Record<string, string>;
|
|
184
|
+
}
|
|
185
|
+
/** Everything of an entry, every language: what an app keeps for offline use. */
|
|
186
|
+
export interface MarketplaceExport extends MarketplaceSummary {
|
|
187
|
+
texts: {
|
|
188
|
+
language: MarketplaceLang;
|
|
189
|
+
title: string;
|
|
190
|
+
pitch: string;
|
|
191
|
+
definition: unknown;
|
|
192
|
+
/** Written by a model, not by a person. */
|
|
193
|
+
machine: boolean;
|
|
194
|
+
}[];
|
|
195
|
+
/** path → base64 */
|
|
196
|
+
files: Record<string, string>;
|
|
197
|
+
}
|
|
198
|
+
/** What an app compares with what it keeps: an entry changed where its hash differs. */
|
|
199
|
+
export interface MarketplaceSyncItem {
|
|
200
|
+
id: string;
|
|
201
|
+
hash: string;
|
|
202
|
+
updatedAt: string;
|
|
203
|
+
}
|
|
204
|
+
/** One entry as the app shows it: the summary, read against this app. */
|
|
205
|
+
export interface MarketplaceEntry extends MarketplaceSummary {
|
|
206
|
+
/** A run's price in credits and what it rarely exceeds; null where it is not worked out. */
|
|
207
|
+
credits: {
|
|
208
|
+
credits: number;
|
|
209
|
+
high: number;
|
|
210
|
+
} | null;
|
|
211
|
+
/** False: this app is older than the entry and would read its wizard wrongly. */
|
|
212
|
+
usable: boolean;
|
|
213
|
+
/** The person keeps it for offline use. */
|
|
214
|
+
starred: boolean;
|
|
215
|
+
/** What it needs that this runtime has no model for: a wizard made from it would not start. */
|
|
216
|
+
missing: Capability[];
|
|
217
|
+
/** What only some of its paths need and this runtime has no model for: it runs the other ways. */
|
|
218
|
+
optional: Capability[];
|
|
219
|
+
/** It comes with a plugin of this app, not from the marketplace: the plugin's id and name. */
|
|
220
|
+
plugin?: {
|
|
221
|
+
id: string;
|
|
222
|
+
name: string;
|
|
223
|
+
};
|
|
224
|
+
/** The plugins it needs that this app does not have: a wizard made from it would not run. */
|
|
225
|
+
needs?: string[];
|
|
226
|
+
}
|
|
227
|
+
export {};
|
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
import { LANGS, pluginToolOf, } from "./definition.js";
|
|
2
|
+
import { textOf } from "./texts.js";
|
|
3
|
+
/**
|
|
4
|
+
* The marketplace: wizards anyone can start from. What an entry is sorted by — formats, industry,
|
|
5
|
+
* use case — and what follows from its definition: the AI capabilities it needs, how much a
|
|
6
|
+
* person has to fill in, and how expensive a run is.
|
|
7
|
+
*/
|
|
8
|
+
export const MARKETPLACE_LANGS = ["de", "en"];
|
|
9
|
+
/** What comes out of a run. */
|
|
10
|
+
export const ITEM_FORMAT_IDS = [
|
|
11
|
+
"text",
|
|
12
|
+
"document",
|
|
13
|
+
"table",
|
|
14
|
+
"image",
|
|
15
|
+
"video",
|
|
16
|
+
"audio",
|
|
17
|
+
"dashboard",
|
|
18
|
+
];
|
|
19
|
+
export const INDUSTRY_IDS = [
|
|
20
|
+
"any",
|
|
21
|
+
"trades",
|
|
22
|
+
"gastronomy",
|
|
23
|
+
"hospitality",
|
|
24
|
+
"realEstate",
|
|
25
|
+
"retail",
|
|
26
|
+
"health",
|
|
27
|
+
"professional",
|
|
28
|
+
"agency",
|
|
29
|
+
"events",
|
|
30
|
+
"publicSector",
|
|
31
|
+
];
|
|
32
|
+
export const USE_CASE_IDS = [
|
|
33
|
+
"marketing",
|
|
34
|
+
"sales",
|
|
35
|
+
"accounting",
|
|
36
|
+
"service",
|
|
37
|
+
"research",
|
|
38
|
+
"hr",
|
|
39
|
+
"operations",
|
|
40
|
+
"website",
|
|
41
|
+
"visuals",
|
|
42
|
+
"inquiries",
|
|
43
|
+
"advice",
|
|
44
|
+
];
|
|
45
|
+
/**
|
|
46
|
+
* What the models and tools behind a wizard must be able to do. `film`: a film the installed
|
|
47
|
+
* client makes, only on a computer with Claude Code, on its subscription.
|
|
48
|
+
*/
|
|
49
|
+
export const CAPABILITY_IDS = [
|
|
50
|
+
"text",
|
|
51
|
+
"web",
|
|
52
|
+
"browser",
|
|
53
|
+
"documents",
|
|
54
|
+
"image",
|
|
55
|
+
"video",
|
|
56
|
+
"speech",
|
|
57
|
+
"listening",
|
|
58
|
+
"code",
|
|
59
|
+
"connectors",
|
|
60
|
+
"film",
|
|
61
|
+
];
|
|
62
|
+
export const COST_TIER_IDS = ["low", "medium", "high"];
|
|
63
|
+
/**
|
|
64
|
+
* The plan a wizard needs. Free runs on what every runtime has; Pro needs plugins, which come
|
|
65
|
+
* with the Pro and Team plans of engenty.ai.
|
|
66
|
+
*/
|
|
67
|
+
export const MARKETPLACE_PLAN_IDS = ["free", "pro"];
|
|
68
|
+
const MARKET_EN = {
|
|
69
|
+
"format.text": "Text",
|
|
70
|
+
"format.document": "Document (PDF, Word)",
|
|
71
|
+
"format.table": "Table",
|
|
72
|
+
"format.image": "Image",
|
|
73
|
+
"format.video": "Video",
|
|
74
|
+
"format.audio": "Audio",
|
|
75
|
+
"format.dashboard": "Dashboard",
|
|
76
|
+
"industry.any": "Any industry",
|
|
77
|
+
"industry.trades": "Trades",
|
|
78
|
+
"industry.gastronomy": "Food service",
|
|
79
|
+
"industry.hospitality": "Hotels & tourism",
|
|
80
|
+
"industry.realEstate": "Real estate",
|
|
81
|
+
"industry.retail": "Retail",
|
|
82
|
+
"industry.health": "Health",
|
|
83
|
+
"industry.professional": "Professional services",
|
|
84
|
+
"industry.agency": "Agency & marketing",
|
|
85
|
+
"industry.events": "Events",
|
|
86
|
+
"industry.publicSector": "Associations & public sector",
|
|
87
|
+
"useCase.marketing": "Marketing & social media",
|
|
88
|
+
"useCase.sales": "Offers & sales",
|
|
89
|
+
"useCase.accounting": "Accounting & receipts",
|
|
90
|
+
"useCase.service": "Customer service",
|
|
91
|
+
"useCase.research": "Research & analysis",
|
|
92
|
+
"useCase.hr": "HR & applications",
|
|
93
|
+
"useCase.operations": "Planning & operations",
|
|
94
|
+
"useCase.website": "Website helpers",
|
|
95
|
+
"useCase.visuals": "Images & video",
|
|
96
|
+
"useCase.inquiries": "Inquiries & bookings",
|
|
97
|
+
"useCase.advice": "Advice & pricing",
|
|
98
|
+
"capability.text": "Writes text",
|
|
99
|
+
"capability.web": "Web search",
|
|
100
|
+
"capability.browser": "Drives a browser",
|
|
101
|
+
"capability.documents": "Reads documents & photos",
|
|
102
|
+
"capability.image": "Makes images",
|
|
103
|
+
"capability.video": "Makes video",
|
|
104
|
+
"capability.speech": "Speech output",
|
|
105
|
+
"capability.listening": "Understands voice notes",
|
|
106
|
+
"capability.code": "Runs code",
|
|
107
|
+
"capability.connectors": "Connected accounts & systems",
|
|
108
|
+
"capability.film": "Films with Claude Code (on your subscription)",
|
|
109
|
+
"cost.low": "low cost",
|
|
110
|
+
"cost.medium": "medium cost",
|
|
111
|
+
"cost.high": "high cost",
|
|
112
|
+
"plan.free": "Free",
|
|
113
|
+
"plan.pro": "Pro",
|
|
114
|
+
"outline.otherwise": "otherwise",
|
|
115
|
+
"outline.and": "{first} and {second}",
|
|
116
|
+
"outline.with": "with {name}",
|
|
117
|
+
"outline.without": "without {name}",
|
|
118
|
+
"outline.contains": "{name} contains {value}",
|
|
119
|
+
};
|
|
120
|
+
const MARKET_DE = {
|
|
121
|
+
"format.text": "Text",
|
|
122
|
+
"format.document": "Dokument (PDF, Word)",
|
|
123
|
+
"format.table": "Tabelle",
|
|
124
|
+
"format.image": "Bild",
|
|
125
|
+
"format.video": "Video",
|
|
126
|
+
"format.audio": "Audio",
|
|
127
|
+
"format.dashboard": "Dashboard",
|
|
128
|
+
"industry.any": "Jede Branche",
|
|
129
|
+
"industry.trades": "Handwerk",
|
|
130
|
+
"industry.gastronomy": "Gastronomie",
|
|
131
|
+
"industry.hospitality": "Hotel & Tourismus",
|
|
132
|
+
"industry.realEstate": "Immobilien",
|
|
133
|
+
"industry.retail": "Handel",
|
|
134
|
+
"industry.health": "Gesundheit",
|
|
135
|
+
"industry.professional": "Kanzlei & Beratung",
|
|
136
|
+
"industry.agency": "Agentur & Marketing",
|
|
137
|
+
"industry.events": "Veranstaltungen",
|
|
138
|
+
"industry.publicSector": "Vereine & Öffentliches",
|
|
139
|
+
"useCase.marketing": "Marketing & Social Media",
|
|
140
|
+
"useCase.sales": "Angebote & Verkauf",
|
|
141
|
+
"useCase.accounting": "Buchhaltung & Belege",
|
|
142
|
+
"useCase.service": "Kundenservice",
|
|
143
|
+
"useCase.research": "Recherche & Analyse",
|
|
144
|
+
"useCase.hr": "Personal & Bewerbungen",
|
|
145
|
+
"useCase.operations": "Planung & Abläufe",
|
|
146
|
+
"useCase.website": "Helfer für die Website",
|
|
147
|
+
"useCase.visuals": "Bilder & Video",
|
|
148
|
+
"useCase.inquiries": "Anfragen & Termine",
|
|
149
|
+
"useCase.advice": "Beratung & Preise",
|
|
150
|
+
"capability.text": "Text schreiben",
|
|
151
|
+
"capability.web": "Websuche",
|
|
152
|
+
"capability.browser": "Browser bedienen",
|
|
153
|
+
"capability.documents": "Dokumente & Fotos lesen",
|
|
154
|
+
"capability.image": "Bilder erzeugen",
|
|
155
|
+
"capability.video": "Videos erzeugen",
|
|
156
|
+
"capability.speech": "Sprachausgabe",
|
|
157
|
+
"capability.listening": "Sprachnotizen verstehen",
|
|
158
|
+
"capability.code": "Code ausführen",
|
|
159
|
+
"capability.connectors": "Verbundene Konten & Systeme",
|
|
160
|
+
"capability.film": "Filme mit Claude Code (auf deinem Abo)",
|
|
161
|
+
"cost.low": "günstig",
|
|
162
|
+
"cost.medium": "mittel",
|
|
163
|
+
"cost.high": "teuer",
|
|
164
|
+
"plan.free": "Kostenlos",
|
|
165
|
+
"plan.pro": "Pro",
|
|
166
|
+
"outline.otherwise": "sonst",
|
|
167
|
+
"outline.and": "{first} und {second}",
|
|
168
|
+
"outline.with": "mit {name}",
|
|
169
|
+
"outline.without": "ohne {name}",
|
|
170
|
+
"outline.contains": "{name} enthält {value}",
|
|
171
|
+
};
|
|
172
|
+
export const MARKET_TEXTS = { en: MARKET_EN, de: MARKET_DE };
|
|
173
|
+
/** The label of a facet value, a cost tier or a plan in a language; its id where it has none. */
|
|
174
|
+
export function marketLabel(group, id, lang, params) {
|
|
175
|
+
const key = `${group}.${id}`;
|
|
176
|
+
return key in MARKET_EN ? textOf(MARKET_TEXTS, key, lang, params) : id;
|
|
177
|
+
}
|
|
178
|
+
/** A label in every language, for search: a person may type either. */
|
|
179
|
+
export const marketLabels = (group, id) => LANGS.map((lang) => marketLabel(group, id, lang));
|
|
180
|
+
const FORMAT_OF = {
|
|
181
|
+
pdf: "document",
|
|
182
|
+
docx: "document",
|
|
183
|
+
xlsx: "table",
|
|
184
|
+
csv: "table",
|
|
185
|
+
png: "image",
|
|
186
|
+
mp4: "video",
|
|
187
|
+
mp3: "audio",
|
|
188
|
+
md: "text",
|
|
189
|
+
txt: "text",
|
|
190
|
+
};
|
|
191
|
+
/** The formats a run hands over, read from what the result step offers. */
|
|
192
|
+
export function formatsOf(def) {
|
|
193
|
+
const found = new Set();
|
|
194
|
+
for (const step of def.steps) {
|
|
195
|
+
if (step.type === "generate" && step.asset === "dashboard") {
|
|
196
|
+
found.add("dashboard");
|
|
197
|
+
}
|
|
198
|
+
if (step.type === "result") {
|
|
199
|
+
for (const d of step.deliverables) {
|
|
200
|
+
const from = def.steps.find((s) => s.id === d.from);
|
|
201
|
+
for (const f of d.formats) {
|
|
202
|
+
const format = FORMAT_OF[f];
|
|
203
|
+
// A dashboard's PNG or PDF is still the dashboard.
|
|
204
|
+
if (format && !(from?.type === "generate" && from.asset === "dashboard")) {
|
|
205
|
+
found.add(format);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
if (!found.size) {
|
|
212
|
+
found.add("text");
|
|
213
|
+
}
|
|
214
|
+
return ITEM_FORMAT_IDS.filter((f) => found.has(f));
|
|
215
|
+
}
|
|
216
|
+
/** The capabilities a definition needs, read from its steps. */
|
|
217
|
+
export function capabilitiesOf(def) {
|
|
218
|
+
const found = new Set();
|
|
219
|
+
for (const step of def.steps) {
|
|
220
|
+
if (step.type === "page") {
|
|
221
|
+
for (const field of step.fields) {
|
|
222
|
+
if (field.kind === "image" || field.kind === "file") {
|
|
223
|
+
found.add("documents");
|
|
224
|
+
}
|
|
225
|
+
if (field.kind === "audio") {
|
|
226
|
+
found.add("listening");
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
else if (step.type === "agent") {
|
|
231
|
+
// A call runs no model: it needs nothing but its plugin.
|
|
232
|
+
if (step.call) {
|
|
233
|
+
continue;
|
|
234
|
+
}
|
|
235
|
+
found.add("text");
|
|
236
|
+
for (const tool of step.tools) {
|
|
237
|
+
if (tool === "web_search" || tool === "web_fetch") {
|
|
238
|
+
found.add("web");
|
|
239
|
+
}
|
|
240
|
+
else if (tool === "browser") {
|
|
241
|
+
found.add("browser");
|
|
242
|
+
}
|
|
243
|
+
else if (tool === "sandbox") {
|
|
244
|
+
found.add("code");
|
|
245
|
+
}
|
|
246
|
+
else if (tool === "image") {
|
|
247
|
+
found.add("image");
|
|
248
|
+
}
|
|
249
|
+
else if (tool === "http") {
|
|
250
|
+
found.add("connectors");
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
if (step.mcp?.length || step.connections?.length) {
|
|
254
|
+
found.add("connectors");
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
else if (step.type === "generate") {
|
|
258
|
+
if (step.asset === "image") {
|
|
259
|
+
found.add("image");
|
|
260
|
+
}
|
|
261
|
+
else if (step.asset === "video") {
|
|
262
|
+
found.add("video");
|
|
263
|
+
}
|
|
264
|
+
else if (step.asset === "voice") {
|
|
265
|
+
found.add("speech");
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
found.add("text");
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
else if (step.type === "film") {
|
|
272
|
+
found.add("film");
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
if (def.connections?.length) {
|
|
276
|
+
found.add("connectors");
|
|
277
|
+
}
|
|
278
|
+
return CAPABILITY_IDS.filter((c) => found.has(c));
|
|
279
|
+
}
|
|
280
|
+
/** The plugins a definition's steps use, by id: a runtime without one of them cannot run it. */
|
|
281
|
+
export function pluginsOf(def) {
|
|
282
|
+
const found = new Set();
|
|
283
|
+
for (const step of def.steps) {
|
|
284
|
+
if (step.type === "agent") {
|
|
285
|
+
for (const tool of step.call ? [...step.tools, step.call.tool] : step.tools) {
|
|
286
|
+
const of = pluginToolOf(tool);
|
|
287
|
+
if (of) {
|
|
288
|
+
found.add(of.plugin);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return [...found].sort();
|
|
294
|
+
}
|
|
295
|
+
/** The plan a wizard needs: Pro as soon as it uses a plugin. */
|
|
296
|
+
export const planOf = (plugins) => plugins.length ? "pro" : "free";
|
|
297
|
+
const WORK_SECONDS = { agent: 25, tools: 70, browser: 150, image: 30, video: 120, voice: 20 };
|
|
298
|
+
export function effortOf(def) {
|
|
299
|
+
let fields = 0;
|
|
300
|
+
let required = 0;
|
|
301
|
+
let reviews = 0;
|
|
302
|
+
let seconds = 0;
|
|
303
|
+
for (const step of def.steps) {
|
|
304
|
+
if (step.type === "page") {
|
|
305
|
+
fields += step.fields.length;
|
|
306
|
+
required += step.fields.filter((f) => f.required).length;
|
|
307
|
+
seconds += step.fields.length * 15;
|
|
308
|
+
}
|
|
309
|
+
else if (step.type === "review") {
|
|
310
|
+
reviews += 1;
|
|
311
|
+
seconds += 30;
|
|
312
|
+
}
|
|
313
|
+
else if (step.type === "agent" && step.call) {
|
|
314
|
+
seconds += 1;
|
|
315
|
+
}
|
|
316
|
+
else if (step.type === "agent") {
|
|
317
|
+
seconds += step.tools.includes("browser")
|
|
318
|
+
? WORK_SECONDS.browser
|
|
319
|
+
: step.tools.length || step.mcp?.length || step.connections?.length
|
|
320
|
+
? WORK_SECONDS.tools
|
|
321
|
+
: WORK_SECONDS.agent;
|
|
322
|
+
}
|
|
323
|
+
else if (step.type === "generate") {
|
|
324
|
+
// "each" makes one result per entry; three stands in for a number nobody knows yet.
|
|
325
|
+
const times = step.each ? 3 : 1;
|
|
326
|
+
seconds +=
|
|
327
|
+
times *
|
|
328
|
+
(step.asset === "image"
|
|
329
|
+
? WORK_SECONDS.image
|
|
330
|
+
: step.asset === "video"
|
|
331
|
+
? WORK_SECONDS.video
|
|
332
|
+
: step.asset === "voice"
|
|
333
|
+
? WORK_SECONDS.voice
|
|
334
|
+
: WORK_SECONDS.agent);
|
|
335
|
+
}
|
|
336
|
+
else if (step.type === "widget" && step.video) {
|
|
337
|
+
seconds += 60;
|
|
338
|
+
}
|
|
339
|
+
else if (step.type === "film") {
|
|
340
|
+
// A client writing a film from a style kit: ten minutes to half an hour (2026-10 tests).
|
|
341
|
+
seconds += 25 * 60;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
return { fields, required, reviews, minutes: Math.max(1, Math.round(seconds / 60)) };
|
|
345
|
+
}
|
|
346
|
+
/** How expensive a run is, where no price in credits is known: by what it makes and uses. */
|
|
347
|
+
export function costTierOf(capabilities) {
|
|
348
|
+
if (capabilities.includes("video")) {
|
|
349
|
+
return "high";
|
|
350
|
+
}
|
|
351
|
+
return capabilities.some((c) => c === "image" || c === "browser" || c === "speech")
|
|
352
|
+
? "medium"
|
|
353
|
+
: "low";
|
|
354
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WizardDefinition } from "./definition.js";
|
|
2
|
+
/**
|
|
3
|
+
* Three-way merge, step by step, of a draft edited in the studio (`local`) with one written
|
|
4
|
+
* elsewhere meanwhile (`remote`), both starting from `base`. What the studio changed, added or
|
|
5
|
+
* removed wins; everything else is taken from `remote`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function mergeDrafts(base: WizardDefinition, local: WizardDefinition, remote: WizardDefinition): WizardDefinition;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const META = ["title", "description", "avatar", "intro", "lists", "connections"];
|
|
2
|
+
const same = (a, b) => JSON.stringify(a) === JSON.stringify(b);
|
|
3
|
+
/**
|
|
4
|
+
* Three-way merge, step by step, of a draft edited in the studio (`local`) with one written
|
|
5
|
+
* elsewhere meanwhile (`remote`), both starting from `base`. What the studio changed, added or
|
|
6
|
+
* removed wins; everything else is taken from `remote`.
|
|
7
|
+
*/
|
|
8
|
+
export function mergeDrafts(base, local, remote) {
|
|
9
|
+
const merged = { ...remote };
|
|
10
|
+
for (const key of META) {
|
|
11
|
+
if (!same(local[key], base[key])) {
|
|
12
|
+
Object.assign(merged, { [key]: local[key] });
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const baseSteps = new Map(base.steps.map((s) => [s.id, s]));
|
|
16
|
+
const localIds = new Set(local.steps.map((s) => s.id));
|
|
17
|
+
// Removed in the studio: gone, unless the other side changed it meanwhile.
|
|
18
|
+
const steps = remote.steps.filter((s) => {
|
|
19
|
+
const before = baseSteps.get(s.id);
|
|
20
|
+
return localIds.has(s.id) || !before || !same(before, s);
|
|
21
|
+
});
|
|
22
|
+
local.steps.forEach((step, i) => {
|
|
23
|
+
const before = baseSteps.get(step.id);
|
|
24
|
+
if (before && same(before, step)) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const at = steps.findIndex((s) => s.id === step.id);
|
|
28
|
+
if (at !== -1) {
|
|
29
|
+
steps[at] = step;
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
// New in the studio: after the step it follows there.
|
|
33
|
+
const prev = local.steps
|
|
34
|
+
.slice(0, i)
|
|
35
|
+
.reverse()
|
|
36
|
+
.find((p) => steps.some((s) => s.id === p.id));
|
|
37
|
+
steps.splice(prev ? steps.findIndex((s) => s.id === prev.id) + 1 : 0, 0, step);
|
|
38
|
+
});
|
|
39
|
+
return { ...merged, steps };
|
|
40
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Numbers as people write and read them: what a phone's number pad, a table cell or a document
|
|
3
|
+
* gives, and an amount or a file's size as a page shows it. The server, the studio and the runner read and
|
|
4
|
+
* show them the same way.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A number as a person types it: digits with at most one decimal mark, a point or a comma
|
|
8
|
+
* alike, as a phone's number pad gives it in either language (`1.5`, `1,5`, `89,90`). There are
|
|
9
|
+
* no thousands separators: `1.234` and `1,234` are 1.234, and anything with two marks
|
|
10
|
+
* (`1.234,50`, `1.234.567`) is no number, since only the writer's language could say which mark
|
|
11
|
+
* is which. Text that is not typed (a document, a website) is read by a model into numbers
|
|
12
|
+
* before it gets here. With `units`, what stands around the number is dropped (`38 h`,
|
|
13
|
+
* `19 %`); without, anything but the number makes it none. Null where there is no number.
|
|
14
|
+
*/
|
|
15
|
+
export declare function readNumber(value: unknown, opts?: {
|
|
16
|
+
units?: boolean;
|
|
17
|
+
}): number | null;
|
|
18
|
+
/**
|
|
19
|
+
* A file's size for a list, in decimal units as the operating systems show them: `1 KB` for
|
|
20
|
+
* anything below a kilobyte but nothing (`0 KB`), `340 KB`, `2.4 MB`, `1.2 GB`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function formatBytes(bytes: number): string;
|
|
23
|
+
/** An amount in a currency, as the language writes it (`1.234,50 €`); an unknown currency code as `1234.50 XYZ`. */
|
|
24
|
+
export declare function formatMoney(amount: number, currency: string, locale: string): string;
|