wizards 0.7.3 → 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/README.md +4 -4
- package/bin/wizards.mjs +95 -26
- package/{apps/web/dist/install.sh → install.sh} +23 -5
- package/package.json +2 -58
- package/apps/runtime/dist/agents/architect.js +0 -444
- package/apps/runtime/dist/agents/studio-assistant.js +0 -883
- package/apps/runtime/dist/agents/subscription.js +0 -207
- package/apps/runtime/dist/agents/thought.js +0 -21
- package/apps/runtime/dist/agents/website.js +0 -480
- package/apps/runtime/dist/app.js +0 -359
- package/apps/runtime/dist/apple/wizards-apple +0 -0
- package/apps/runtime/dist/assistant/browser.js +0 -26
- package/apps/runtime/dist/assistant/docs.js +0 -158
- package/apps/runtime/dist/assistant/knows.js +0 -353
- package/apps/runtime/dist/assistant/primer.js +0 -26
- package/apps/runtime/dist/assistant/runs.js +0 -24
- package/apps/runtime/dist/auth/account.js +0 -175
- package/apps/runtime/dist/auth/device.js +0 -112
- package/apps/runtime/dist/auth/index.js +0 -358
- package/apps/runtime/dist/auth/keys.js +0 -55
- package/apps/runtime/dist/auth/local-ticket.js +0 -26
- package/apps/runtime/dist/authoring/example.js +0 -74
- package/apps/runtime/dist/authoring/guide.js +0 -433
- package/apps/runtime/dist/authoring/ops.js +0 -117
- package/apps/runtime/dist/browser/fast/action-space.js +0 -160
- package/apps/runtime/dist/browser/fast/classifier.js +0 -91
- package/apps/runtime/dist/browser/fast/decide.js +0 -171
- package/apps/runtime/dist/browser/fast/driver.js +0 -141
- package/apps/runtime/dist/browser/fast/instructions.js +0 -33
- package/apps/runtime/dist/browser/fast/run.js +0 -249
- package/apps/runtime/dist/browser/fast/span-picker.js +0 -153
- package/apps/runtime/dist/browser/fast/text-helper.js +0 -178
- package/apps/runtime/dist/browser/snapshot.js +0 -335
- package/apps/runtime/dist/cli/account.js +0 -385
- package/apps/runtime/dist/cli/autostart.js +0 -182
- package/apps/runtime/dist/cli/autoupdate.js +0 -221
- package/apps/runtime/dist/cli/clients.js +0 -44
- package/apps/runtime/dist/cli/connect.js +0 -539
- package/apps/runtime/dist/cli/environment.js +0 -93
- package/apps/runtime/dist/cli/exec.js +0 -45
- package/apps/runtime/dist/cli/features.js +0 -50
- package/apps/runtime/dist/cli/home.js +0 -88
- package/apps/runtime/dist/cli/install-env.js +0 -33
- package/apps/runtime/dist/cli/machine.js +0 -106
- package/apps/runtime/dist/cli/main.js +0 -222
- package/apps/runtime/dist/cli/mcp.js +0 -136
- package/apps/runtime/dist/cli/menu.js +0 -202
- package/apps/runtime/dist/cli/processes.js +0 -72
- package/apps/runtime/dist/cli/report.js +0 -66
- package/apps/runtime/dist/cli/setup.js +0 -335
- package/apps/runtime/dist/cli/start.js +0 -276
- package/apps/runtime/dist/cli/status.js +0 -203
- package/apps/runtime/dist/cli/ui.js +0 -59
- package/apps/runtime/dist/cli/uninstall-main.js +0 -20
- package/apps/runtime/dist/cli/uninstall.js +0 -231
- package/apps/runtime/dist/cli/update.js +0 -86
- package/apps/runtime/dist/cli/validate.js +0 -75
- package/apps/runtime/dist/cli/versions.js +0 -106
- package/apps/runtime/dist/connectors/builtin.js +0 -86
- package/apps/runtime/dist/connectors/external.js +0 -409
- package/apps/runtime/dist/connectors/gmail.js +0 -107
- package/apps/runtime/dist/connectors/imap.js +0 -261
- package/apps/runtime/dist/connectors/index.js +0 -325
- package/apps/runtime/dist/connectors/mail.js +0 -72
- package/apps/runtime/dist/connectors/outlook.js +0 -90
- package/apps/runtime/dist/connectors/plugin-connections.js +0 -343
- package/apps/runtime/dist/connectors/via-account.js +0 -65
- package/apps/runtime/dist/credits/credits.js +0 -100
- package/apps/runtime/dist/credits/estimate.js +0 -152
- package/apps/runtime/dist/db/adopt.js +0 -149
- package/apps/runtime/dist/db/client.js +0 -173
- package/apps/runtime/dist/db/control-schema.js +0 -133
- package/apps/runtime/dist/db/migrations/control/0000_last_absorbing_man.sql +0 -47
- package/apps/runtime/dist/db/migrations/control/0001_gorgeous_nicolaos.sql +0 -41
- package/apps/runtime/dist/db/migrations/control/0002_secret_penance.sql +0 -1
- package/apps/runtime/dist/db/migrations/control/0003_nasty_mordo.sql +0 -3
- package/apps/runtime/dist/db/migrations/control/0004_breezy_eddie_brock.sql +0 -6
- package/apps/runtime/dist/db/migrations/control/0005_chilly_oracle.sql +0 -1
- package/apps/runtime/dist/db/migrations/control/0006_sleepy_mojo.sql +0 -1
- package/apps/runtime/dist/db/migrations/control/0007_common_the_hand.sql +0 -15
- package/apps/runtime/dist/db/migrations/control/0008_runner.sql +0 -8
- package/apps/runtime/dist/db/migrations/control/0009_plugin_claim.sql +0 -9
- package/apps/runtime/dist/db/migrations/control/0010_tan_snowbird.sql +0 -6
- package/apps/runtime/dist/db/migrations/control/meta/0000_snapshot.json +0 -311
- package/apps/runtime/dist/db/migrations/control/meta/0001_snapshot.json +0 -599
- package/apps/runtime/dist/db/migrations/control/meta/0002_snapshot.json +0 -607
- package/apps/runtime/dist/db/migrations/control/meta/0003_snapshot.json +0 -311
- package/apps/runtime/dist/db/migrations/control/meta/0004_snapshot.json +0 -350
- package/apps/runtime/dist/db/migrations/control/meta/0005_snapshot.json +0 -358
- package/apps/runtime/dist/db/migrations/control/meta/0006_snapshot.json +0 -365
- package/apps/runtime/dist/db/migrations/control/meta/0007_snapshot.json +0 -460
- package/apps/runtime/dist/db/migrations/control/meta/0008_snapshot.json +0 -505
- package/apps/runtime/dist/db/migrations/control/meta/0009_snapshot.json +0 -561
- package/apps/runtime/dist/db/migrations/control/meta/0010_snapshot.json +0 -600
- package/apps/runtime/dist/db/migrations/control/meta/_journal.json +0 -83
- package/apps/runtime/dist/db/migrations/tenant/0000_eminent_freak.sql +0 -188
- package/apps/runtime/dist/db/migrations/tenant/0001_salty_master_chief.sql +0 -1
- package/apps/runtime/dist/db/migrations/tenant/0002_cloudy_firebird.sql +0 -1
- package/apps/runtime/dist/db/migrations/tenant/0003_brown_warbound.sql +0 -52
- package/apps/runtime/dist/db/migrations/tenant/0004_romantic_nocturne.sql +0 -6
- package/apps/runtime/dist/db/migrations/tenant/0005_reflective_forgotten_one.sql +0 -2
- package/apps/runtime/dist/db/migrations/tenant/0006_hard_war_machine.sql +0 -30
- package/apps/runtime/dist/db/migrations/tenant/0007_space_data.sql +0 -43
- package/apps/runtime/dist/db/migrations/tenant/0008_run_event_note.sql +0 -1
- package/apps/runtime/dist/db/migrations/tenant/0009_knowledge.sql +0 -104
- package/apps/runtime/dist/db/migrations/tenant/0010_plugin_connection.sql +0 -15
- package/apps/runtime/dist/db/migrations/tenant/0011_runners.sql +0 -2
- package/apps/runtime/dist/db/migrations/tenant/0012_assistant_chat.sql +0 -40
- package/apps/runtime/dist/db/migrations/tenant/0013_run_origin.sql +0 -1
- package/apps/runtime/dist/db/migrations/tenant/0014_run_answer.sql +0 -2
- package/apps/runtime/dist/db/migrations/tenant/0015_device_calls.sql +0 -13
- package/apps/runtime/dist/db/migrations/tenant/0016_even_trish_tilby.sql +0 -12
- package/apps/runtime/dist/db/migrations/tenant/meta/0000_snapshot.json +0 -1323
- package/apps/runtime/dist/db/migrations/tenant/meta/0001_snapshot.json +0 -1330
- package/apps/runtime/dist/db/migrations/tenant/meta/0002_snapshot.json +0 -1337
- package/apps/runtime/dist/db/migrations/tenant/meta/0003_snapshot.json +0 -1605
- package/apps/runtime/dist/db/migrations/tenant/meta/0004_snapshot.json +0 -1645
- package/apps/runtime/dist/db/migrations/tenant/meta/0005_snapshot.json +0 -1659
- package/apps/runtime/dist/db/migrations/tenant/meta/0006_snapshot.json +0 -1696
- package/apps/runtime/dist/db/migrations/tenant/meta/0007_snapshot.json +0 -2012
- package/apps/runtime/dist/db/migrations/tenant/meta/0008_snapshot.json +0 -2019
- package/apps/runtime/dist/db/migrations/tenant/meta/0009_snapshot.json +0 -2837
- package/apps/runtime/dist/db/migrations/tenant/meta/0010_snapshot.json +0 -2942
- package/apps/runtime/dist/db/migrations/tenant/meta/0011_snapshot.json +0 -2956
- package/apps/runtime/dist/db/migrations/tenant/meta/0012_snapshot.json +0 -3132
- package/apps/runtime/dist/db/migrations/tenant/meta/0013_snapshot.json +0 -3139
- package/apps/runtime/dist/db/migrations/tenant/meta/0014_snapshot.json +0 -3154
- package/apps/runtime/dist/db/migrations/tenant/meta/0015_snapshot.json +0 -3243
- package/apps/runtime/dist/db/migrations/tenant/meta/0016_snapshot.json +0 -3326
- package/apps/runtime/dist/db/migrations/tenant/meta/_journal.json +0 -125
- package/apps/runtime/dist/db/schema.js +0 -602
- package/apps/runtime/dist/debug.js +0 -196
- package/apps/runtime/dist/docs/dev/index.md +0 -41
- package/apps/runtime/dist/docs/dev/meta.json +0 -7
- package/apps/runtime/dist/docs/dev/plugins/connections.md +0 -74
- package/apps/runtime/dist/docs/dev/plugins/events.md +0 -89
- package/apps/runtime/dist/docs/dev/plugins/examples.md +0 -101
- package/apps/runtime/dist/docs/dev/plugins/index.md +0 -78
- package/apps/runtime/dist/docs/dev/plugins/layout.md +0 -90
- package/apps/runtime/dist/docs/dev/plugins/meta.json +0 -28
- package/apps/runtime/dist/docs/dev/plugins/quick-start.md +0 -94
- package/apps/runtime/dist/docs/dev/plugins/reference.md +0 -348
- package/apps/runtime/dist/docs/dev/plugins/reloading.md +0 -76
- package/apps/runtime/dist/docs/dev/plugins/routes.md +0 -185
- package/apps/runtime/dist/docs/dev/plugins/runners.md +0 -230
- package/apps/runtime/dist/docs/dev/plugins/server.md +0 -281
- package/apps/runtime/dist/docs/dev/plugins/shipping.md +0 -79
- package/apps/runtime/dist/docs/dev/plugins/space.md +0 -297
- package/apps/runtime/dist/docs/dev/plugins/starters.md +0 -70
- package/apps/runtime/dist/docs/dev/plugins/studio.md +0 -363
- package/apps/runtime/dist/docs/dev/plugins/styling.md +0 -129
- package/apps/runtime/dist/docs/dev/plugins/tables.md +0 -104
- package/apps/runtime/dist/docs/dev/plugins/tools.md +0 -139
- package/apps/runtime/dist/docs/dev/wizard-format.md +0 -121
- package/apps/runtime/dist/docs/meta.json +0 -3
- package/apps/runtime/dist/docs/user/ai-apps.md +0 -112
- package/apps/runtime/dist/docs/user/assistant.md +0 -77
- package/apps/runtime/dist/docs/user/build-a-wizard.md +0 -116
- package/apps/runtime/dist/docs/user/command-line.md +0 -83
- package/apps/runtime/dist/docs/user/connectors.md +0 -90
- package/apps/runtime/dist/docs/user/create-account.md +0 -52
- package/apps/runtime/dist/docs/user/data.md +0 -66
- package/apps/runtime/dist/docs/user/first-start.md +0 -55
- package/apps/runtime/dist/docs/user/index.md +0 -49
- package/apps/runtime/dist/docs/user/install.md +0 -121
- package/apps/runtime/dist/docs/user/local-only.md +0 -42
- package/apps/runtime/dist/docs/user/meta.json +0 -32
- package/apps/runtime/dist/docs/user/models.md +0 -156
- package/apps/runtime/dist/docs/user/plugins.md +0 -71
- package/apps/runtime/dist/docs/user/run.md +0 -98
- package/apps/runtime/dist/docs/user/server.md +0 -52
- package/apps/runtime/dist/docs/user/space.md +0 -126
- package/apps/runtime/dist/docs/user/steps.md +0 -220
- package/apps/runtime/dist/docs/user/test-and-share.md +0 -224
- package/apps/runtime/dist/docs/user/troubleshooting.md +0 -67
- package/apps/runtime/dist/docs/user/wordpress.md +0 -121
- package/apps/runtime/dist/documents/parse.js +0 -246
- package/apps/runtime/dist/engenty/connections-external/build-connector.js +0 -193
- package/apps/runtime/dist/engenty/connections-external/errors.js +0 -11
- package/apps/runtime/dist/engenty/connections-external/import-service.js +0 -270
- package/apps/runtime/dist/engenty/connections-external/importer/classify.js +0 -34
- package/apps/runtime/dist/engenty/connections-external/importer/map-auth.js +0 -185
- package/apps/runtime/dist/engenty/connections-external/importer/normalize-mcp.js +0 -63
- package/apps/runtime/dist/engenty/connections-external/importer/normalize-openapi.js +0 -130
- package/apps/runtime/dist/engenty/connections-external/invoke/http-invoker.js +0 -143
- package/apps/runtime/dist/engenty/connections-external/invoke/mcp-client.js +0 -143
- package/apps/runtime/dist/engenty/connections-external/net/guarded-fetch.js +0 -119
- package/apps/runtime/dist/engenty/connections-external/oauth-dcr.js +0 -88
- package/apps/runtime/dist/engenty/connections-external/registry-client.js +0 -336
- package/apps/runtime/dist/engenty/connections-external/registry-source.js +0 -82
- package/apps/runtime/dist/engenty/connections-external/types.js +0 -7
- package/apps/runtime/dist/engenty/connections-github/connector.js +0 -209
- package/apps/runtime/dist/engenty/connections-google/connectors/calendar.js +0 -381
- package/apps/runtime/dist/engenty/connections-google/connectors/contacts.js +0 -94
- package/apps/runtime/dist/engenty/connections-google/connectors/drive.js +0 -290
- package/apps/runtime/dist/engenty/connections-google/connectors/gmail.js +0 -567
- package/apps/runtime/dist/engenty/connections-google/definitions.js +0 -11
- package/apps/runtime/dist/engenty/connections-google/shared.js +0 -73
- package/apps/runtime/dist/engenty/connections-hubspot/connector.js +0 -140
- package/apps/runtime/dist/engenty/connections-microsoft/action.js +0 -17
- package/apps/runtime/dist/engenty/connections-microsoft/graph.js +0 -114
- package/apps/runtime/dist/engenty/connections-microsoft/onedrive.js +0 -286
- package/apps/runtime/dist/engenty/connections-microsoft/outlook.js +0 -492
- package/apps/runtime/dist/engenty/connections-s3/s3.js +0 -328
- package/apps/runtime/dist/engenty/connections-sdk/files-capability.js +0 -86
- package/apps/runtime/dist/engenty/connections-sdk/oauth2.js +0 -150
- package/apps/runtime/dist/engenty/connections-sdk/registry.js +0 -89
- package/apps/runtime/dist/engenty/connections-sdk/storage-capability.js +0 -84
- package/apps/runtime/dist/engenty/connections-sdk/types.js +0 -30
- package/apps/runtime/dist/engenty/connections-slack/connector.js +0 -360
- package/apps/runtime/dist/engenty/csv-import/csv-matrix.js +0 -178
- package/apps/runtime/dist/engenty/csv-import/import-sources.js +0 -87
- package/apps/runtime/dist/engenty/csv-import/parse-csv.js +0 -129
- package/apps/runtime/dist/engenty/csv-import/serialize-csv.js +0 -20
- package/apps/runtime/dist/engenty/csv-import/types.js +0 -1
- package/apps/runtime/dist/engenty/csv-import/xlsx-workbook.js +0 -159
- package/apps/runtime/dist/engenty/doc-converter/interface.js +0 -9
- package/apps/runtime/dist/engenty/doc-converter/page-break.js +0 -92
- package/apps/runtime/dist/engenty/doc-converter/providers/local/index.js +0 -72
- package/apps/runtime/dist/engenty/document-scanner/schemas/classifier.js +0 -30
- package/apps/runtime/dist/engenty/document-scanner/schemas/index.js +0 -4
- package/apps/runtime/dist/engenty/document-scanner/schemas/invoice.js +0 -73
- package/apps/runtime/dist/engenty/document-scanner/schemas/receipt.js +0 -63
- package/apps/runtime/dist/engenty/document-scanner/schemas/shared.js +0 -40
- package/apps/runtime/dist/engenty/search-index/chunks.js +0 -164
- package/apps/runtime/dist/engenty/search-index/contracts.js +0 -9
- package/apps/runtime/dist/engenty/shims/connections-sdk.js +0 -39
- package/apps/runtime/dist/engenty/shims/plugin-sdk.js +0 -1
- package/apps/runtime/dist/engenty/shims/web-ingest.js +0 -19
- package/apps/runtime/dist/engenty/web-ingest/ssrf.js +0 -277
- package/apps/runtime/dist/engine/asks.js +0 -82
- package/apps/runtime/dist/engine/decide.js +0 -82
- package/apps/runtime/dist/engine/device.js +0 -194
- package/apps/runtime/dist/engine/events.js +0 -128
- package/apps/runtime/dist/engine/input.js +0 -208
- package/apps/runtime/dist/engine/owner.js +0 -32
- package/apps/runtime/dist/engine/prepare.js +0 -90
- package/apps/runtime/dist/engine/push.js +0 -58
- package/apps/runtime/dist/engine/requirements.js +0 -355
- package/apps/runtime/dist/engine/resources.js +0 -198
- package/apps/runtime/dist/engine/runner.js +0 -970
- package/apps/runtime/dist/engine/steps.js +0 -1000
- package/apps/runtime/dist/engine/surface.js +0 -91
- package/apps/runtime/dist/engine/template.js +0 -240
- package/apps/runtime/dist/engine/types.js +0 -4
- package/apps/runtime/dist/env.js +0 -295
- package/apps/runtime/dist/features.js +0 -123
- package/apps/runtime/dist/files/blobs.js +0 -22
- package/apps/runtime/dist/files/objects.js +0 -86
- package/apps/runtime/dist/files/storage.js +0 -120
- package/apps/runtime/dist/files/web-images.js +0 -101
- package/apps/runtime/dist/film/project.js +0 -257
- package/apps/runtime/dist/film/skills.js +0 -91
- package/apps/runtime/dist/film/sounds.js +0 -122
- package/apps/runtime/dist/film/step.js +0 -289
- package/apps/runtime/dist/film/tools.js +0 -99
- package/apps/runtime/dist/geocode.js +0 -58
- package/apps/runtime/dist/harness/apple.js +0 -269
- package/apps/runtime/dist/harness/claude.js +0 -147
- package/apps/runtime/dist/harness/codex.js +0 -229
- package/apps/runtime/dist/harness/cursor.js +0 -93
- package/apps/runtime/dist/harness/env.js +0 -124
- package/apps/runtime/dist/harness/gemini.js +0 -126
- package/apps/runtime/dist/harness/index.js +0 -95
- package/apps/runtime/dist/harness/model.js +0 -271
- package/apps/runtime/dist/harness/prompt.js +0 -121
- package/apps/runtime/dist/harness/terminal.js +0 -194
- package/apps/runtime/dist/harness/types.js +0 -7
- package/apps/runtime/dist/index.js +0 -113
- package/apps/runtime/dist/limits.js +0 -81
- package/apps/runtime/dist/link-preview.js +0 -60
- package/apps/runtime/dist/log.js +0 -106
- package/apps/runtime/dist/manage.js +0 -249
- package/apps/runtime/dist/mcp/auth.js +0 -161
- package/apps/runtime/dist/mcp/bridge.js +0 -59
- package/apps/runtime/dist/mcp/flow-app.js +0 -97
- package/apps/runtime/dist/mcp/handler.js +0 -54
- package/apps/runtime/dist/mcp/scopes.js +0 -14
- package/apps/runtime/dist/mcp/seen.js +0 -65
- package/apps/runtime/dist/mcp/tools.js +0 -572
- package/apps/runtime/dist/media/conversation.js +0 -167
- package/apps/runtime/dist/media/ffmpeg.js +0 -121
- package/apps/runtime/dist/media/generate.js +0 -120
- package/apps/runtime/dist/media/marking.js +0 -121
- package/apps/runtime/dist/media/transcribe.js +0 -198
- package/apps/runtime/dist/model-errors.js +0 -42
- package/apps/runtime/dist/models.js +0 -1106
- package/apps/runtime/dist/plugin.js +0 -61
- package/apps/runtime/dist/plugins/channels.js +0 -78
- package/apps/runtime/dist/plugins/claims.js +0 -56
- package/apps/runtime/dist/plugins/discovery.js +0 -155
- package/apps/runtime/dist/plugins/events.js +0 -63
- package/apps/runtime/dist/plugins/jobs.js +0 -64
- package/apps/runtime/dist/plugins/loader.js +0 -501
- package/apps/runtime/dist/plugins/migrations.js +0 -69
- package/apps/runtime/dist/plugins/pro-keys.js +0 -34
- package/apps/runtime/dist/plugins/pro-state.js +0 -83
- package/apps/runtime/dist/plugins/pro.js +0 -310
- package/apps/runtime/dist/plugins/public.js +0 -44
- package/apps/runtime/dist/plugins/registry.js +0 -122
- package/apps/runtime/dist/plugins/runs.js +0 -210
- package/apps/runtime/dist/render/browser-path.js +0 -54
- package/apps/runtime/dist/render/chromium.js +0 -98
- package/apps/runtime/dist/render/convert.js +0 -158
- package/apps/runtime/dist/render/downloads.js +0 -299
- package/apps/runtime/dist/render/guard.js +0 -25
- package/apps/runtime/dist/render/shaped.js +0 -137
- package/apps/runtime/dist/routes/api.js +0 -440
- package/apps/runtime/dist/routes/debug.js +0 -42
- package/apps/runtime/dist/routes/delivery.js +0 -90
- package/apps/runtime/dist/routes/internal.js +0 -81
- package/apps/runtime/dist/routes/lang.js +0 -25
- package/apps/runtime/dist/routes/marketplace.js +0 -43
- package/apps/runtime/dist/routes/plugin-public.js +0 -113
- package/apps/runtime/dist/routes/plugins.js +0 -212
- package/apps/runtime/dist/routes/runs.js +0 -1422
- package/apps/runtime/dist/routes/studio.js +0 -1600
- package/apps/runtime/dist/routes/wizard-stream.js +0 -30
- package/apps/runtime/dist/running.js +0 -39
- package/apps/runtime/dist/sandbox/docker.js +0 -75
- package/apps/runtime/dist/sandbox/index.js +0 -23
- package/apps/runtime/dist/sandbox/types.js +0 -1
- package/apps/runtime/dist/secrets/crypto.js +0 -28
- package/apps/runtime/dist/secrets/signing.js +0 -52
- package/apps/runtime/dist/secrets/vault.js +0 -59
- package/apps/runtime/dist/services/access.js +0 -88
- package/apps/runtime/dist/services/api.js +0 -248
- package/apps/runtime/dist/services/architect.js +0 -95
- package/apps/runtime/dist/services/assistant-chats.js +0 -311
- package/apps/runtime/dist/services/brand.js +0 -85
- package/apps/runtime/dist/services/cloud.js +0 -456
- package/apps/runtime/dist/services/draft-events.js +0 -27
- package/apps/runtime/dist/services/engenty-shapes.js +0 -71
- package/apps/runtime/dist/services/errors.js +0 -29
- package/apps/runtime/dist/services/files.js +0 -178
- package/apps/runtime/dist/services/knowledge-model.js +0 -559
- package/apps/runtime/dist/services/knowledge.js +0 -721
- package/apps/runtime/dist/services/links.js +0 -16
- package/apps/runtime/dist/services/marketplace.js +0 -492
- package/apps/runtime/dist/services/onboarding.js +0 -152
- package/apps/runtime/dist/services/package-file.js +0 -82
- package/apps/runtime/dist/services/package.js +0 -170
- package/apps/runtime/dist/services/profile.js +0 -51
- package/apps/runtime/dist/services/project-files.js +0 -439
- package/apps/runtime/dist/services/project-index.js +0 -707
- package/apps/runtime/dist/services/projects.js +0 -387
- package/apps/runtime/dist/services/relevance.js +0 -58
- package/apps/runtime/dist/services/runners.js +0 -178
- package/apps/runtime/dist/services/runs.js +0 -524
- package/apps/runtime/dist/services/shares.js +0 -130
- package/apps/runtime/dist/services/site.js +0 -270
- package/apps/runtime/dist/services/space-categories.js +0 -861
- package/apps/runtime/dist/services/space-data.js +0 -792
- package/apps/runtime/dist/services/space-origin.js +0 -207
- package/apps/runtime/dist/services/spaces.js +0 -656
- package/apps/runtime/dist/services/translations.js +0 -306
- package/apps/runtime/dist/services/widgets.js +0 -34
- package/apps/runtime/dist/services/wizard-icon.js +0 -157
- package/apps/runtime/dist/services/wizards.js +0 -420
- package/apps/runtime/dist/settings.js +0 -16
- package/apps/runtime/dist/store/errors.js +0 -4
- package/apps/runtime/dist/store/index.js +0 -299
- package/apps/runtime/dist/store/shared-lists.js +0 -123
- package/apps/runtime/dist/tenants/control.js +0 -238
- package/apps/runtime/dist/tenants/tenant.js +0 -26
- package/apps/runtime/dist/texts.js +0 -203
- package/apps/runtime/dist/tools/browser.js +0 -703
- package/apps/runtime/dist/tools/connector.js +0 -204
- package/apps/runtime/dist/tools/index.js +0 -291
- package/apps/runtime/dist/tools/mail.js +0 -104
- package/apps/runtime/dist/tools/net-guard.js +0 -170
- package/apps/runtime/dist/tools/pages.js +0 -81
- package/apps/runtime/dist/tools/plugin.js +0 -180
- package/apps/runtime/dist/tools/project.js +0 -154
- package/apps/runtime/dist/tools/shared.js +0 -69
- package/apps/runtime/dist/tools/store.js +0 -238
- package/apps/runtime/dist/update.js +0 -113
- package/apps/runtime/dist/widgets/bundle.js +0 -99
- package/apps/runtime/dist/widgets/render.js +0 -329
- package/apps/runtime/dist/widgets/runtime.js +0 -108
- package/apps/runtime/dist/widgets/script.js +0 -30
- package/apps/runtime/dist/widgets/step.js +0 -223
- package/apps/web/dist/ai-labels/ai-black.svg +0 -20
- package/apps/web/dist/ai-labels/ai-generated-black.svg +0 -31
- package/apps/web/dist/ai-labels/ai-generated-white.svg +0 -32
- package/apps/web/dist/ai-labels/ai-modified-black.svg +0 -30
- package/apps/web/dist/ai-labels/ai-modified-white.svg +0 -31
- package/apps/web/dist/ai-labels/ai-white.svg +0 -21
- package/apps/web/dist/assets/AboutDialog--aZOfowz.js +0 -1
- package/apps/web/dist/assets/ChangelogDialog-CcMXT8l9.js +0 -1
- package/apps/web/dist/assets/ChatView-BqK5nH84.js +0 -10
- package/apps/web/dist/assets/EditorPage-BRZmuMsK.js +0 -3
- package/apps/web/dist/assets/FlowPreview-CpA_aX8t.js +0 -1
- package/apps/web/dist/assets/Harness-BrP-ENHg.css +0 -1
- package/apps/web/dist/assets/Harness-C8demwfW.js +0 -16
- package/apps/web/dist/assets/NewWizardChannels-vph1mN1m.js +0 -1
- package/apps/web/dist/assets/NewWizardPage-u1BIy4q9.js +0 -7
- package/apps/web/dist/assets/OnboardingPage-BR3FmORm.js +0 -1
- package/apps/web/dist/assets/ProjectPage-BWN0iO0X.js +0 -1
- package/apps/web/dist/assets/PublicRunner-CohatW8Y.js +0 -1
- package/apps/web/dist/assets/ReadOnly-rQGZBuzb.js +0 -1
- package/apps/web/dist/assets/RunDrawer-Cs8XqQUo.js +0 -4
- package/apps/web/dist/assets/RunnerView-B85O0i1h.js +0 -1
- package/apps/web/dist/assets/SettingsPage-CM6HfO-O.js +0 -1
- package/apps/web/dist/assets/SetupPage-BpAobBc4.js +0 -1
- package/apps/web/dist/assets/SharePage-CbmAN4M4.js +0 -1
- package/apps/web/dist/assets/changelog-BBR59khF.js +0 -1
- package/apps/web/dist/assets/engenty-eXZ-EAwd.js +0 -1
- package/apps/web/dist/assets/esm-CY-A_13f.js +0 -7
- package/apps/web/dist/assets/fluffy-engenty-ClRou7yu.js +0 -456
- package/apps/web/dist/assets/index-C7HL_Fjz.js +0 -14
- package/apps/web/dist/assets/index-Co9Yr23e.css +0 -1
- package/apps/web/dist/assets/jsx-runtime-BNakU3Ej.js +0 -1
- package/apps/web/dist/assets/lock--JFmtLDU.js +0 -1
- package/apps/web/dist/assets/oss-credits-BJrR7BR1.js +0 -1
- package/apps/web/dist/assets/pdfmake-Cx9scTbD.js +0 -228
- package/apps/web/dist/assets/phone-DMtADQ4-.js +0 -1
- package/apps/web/dist/assets/preload-helper-CNEI7N0N.js +0 -1
- package/apps/web/dist/assets/qr-scanner-worker.min-CJaXo3yu.js +0 -98
- package/apps/web/dist/assets/qr-scanner.min-C_UI0gH-.js +0 -1
- package/apps/web/dist/assets/rolldown-runtime-hePW80VL.js +0 -1
- package/apps/web/dist/assets/settings-menu-Dac4JUiM.js +0 -1
- package/apps/web/dist/assets/ui-CTXSFCzc.js +0 -137
- package/apps/web/dist/assets/upload-Bcpc3mDn.js +0 -1
- package/apps/web/dist/assets/vfs_fonts-DllDSYt1.js +0 -1
- package/apps/web/dist/embed.js +0 -266
- package/apps/web/dist/favicon.svg +0 -1
- 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 +0 -48
- package/apps/web/dist/manifest.webmanifest +0 -21
- package/apps/web/dist/mcp/flow.html +0 -980
- package/apps/web/dist/sw.js +0 -15
- package/modules/README.md +0 -15
- package/node_modules/@engenty-wizards/plugin-sdk/dist/index.d.ts +0 -1150
- package/node_modules/@engenty-wizards/plugin-sdk/dist/index.js +0 -4
- package/node_modules/@engenty-wizards/plugin-sdk/dist/studio.d.ts +0 -322
- package/node_modules/@engenty-wizards/plugin-sdk/dist/studio.js +0 -4
- package/node_modules/@engenty-wizards/plugin-sdk/dist/thread.d.ts +0 -174
- package/node_modules/@engenty-wizards/plugin-sdk/dist/thread.js +0 -821
- package/node_modules/@engenty-wizards/plugin-sdk/package.json +0 -11
- package/node_modules/@engenty-wizards/shared/dist/assistant.d.ts +0 -174
- package/node_modules/@engenty-wizards/shared/dist/assistant.js +0 -65
- package/node_modules/@engenty-wizards/shared/dist/changes.d.ts +0 -22
- package/node_modules/@engenty-wizards/shared/dist/changes.js +0 -61
- package/node_modules/@engenty-wizards/shared/dist/connectors.d.ts +0 -77
- package/node_modules/@engenty-wizards/shared/dist/connectors.js +0 -2
- package/node_modules/@engenty-wizards/shared/dist/decision.d.ts +0 -76
- package/node_modules/@engenty-wizards/shared/dist/decision.js +0 -147
- package/node_modules/@engenty-wizards/shared/dist/definition.d.ts +0 -2922
- package/node_modules/@engenty-wizards/shared/dist/definition.js +0 -1920
- package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns-format.d.ts +0 -5
- package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns-format.js +0 -132
- package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns-value.d.ts +0 -11
- package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns-value.js +0 -209
- package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns.d.ts +0 -532
- package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/columns.js +0 -217
- package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/index.d.ts +0 -3
- package/node_modules/@engenty-wizards/shared/dist/engenty/data-tables/index.js +0 -3
- package/node_modules/@engenty-wizards/shared/dist/engenty/search-index/catalog-lexical.d.ts +0 -14
- package/node_modules/@engenty-wizards/shared/dist/engenty/search-index/catalog-lexical.js +0 -166
- package/node_modules/@engenty-wizards/shared/dist/engenty/search-index/catalog-rank.d.ts +0 -33
- package/node_modules/@engenty-wizards/shared/dist/engenty/search-index/catalog-rank.js +0 -99
- package/node_modules/@engenty-wizards/shared/dist/feature-flags.d.ts +0 -78
- package/node_modules/@engenty-wizards/shared/dist/feature-flags.js +0 -70
- package/node_modules/@engenty-wizards/shared/dist/features.d.ts +0 -41
- package/node_modules/@engenty-wizards/shared/dist/features.js +0 -89
- package/node_modules/@engenty-wizards/shared/dist/fit.d.ts +0 -71
- package/node_modules/@engenty-wizards/shared/dist/fit.js +0 -382
- package/node_modules/@engenty-wizards/shared/dist/json-schema.d.ts +0 -14
- package/node_modules/@engenty-wizards/shared/dist/json-schema.js +0 -66
- package/node_modules/@engenty-wizards/shared/dist/knowledge.d.ts +0 -199
- package/node_modules/@engenty-wizards/shared/dist/knowledge.js +0 -68
- package/node_modules/@engenty-wizards/shared/dist/marketplace-entry.d.ts +0 -35
- package/node_modules/@engenty-wizards/shared/dist/marketplace-entry.js +0 -107
- package/node_modules/@engenty-wizards/shared/dist/marketplace-search.d.ts +0 -20
- package/node_modules/@engenty-wizards/shared/dist/marketplace-search.js +0 -136
- package/node_modules/@engenty-wizards/shared/dist/marketplace.d.ts +0 -227
- package/node_modules/@engenty-wizards/shared/dist/marketplace.js +0 -354
- package/node_modules/@engenty-wizards/shared/dist/merge.d.ts +0 -7
- package/node_modules/@engenty-wizards/shared/dist/merge.js +0 -40
- package/node_modules/@engenty-wizards/shared/dist/numbers.d.ts +0 -24
- package/node_modules/@engenty-wizards/shared/dist/numbers.js +0 -54
- package/node_modules/@engenty-wizards/shared/dist/projects.d.ts +0 -224
- package/node_modules/@engenty-wizards/shared/dist/projects.js +0 -319
- package/node_modules/@engenty-wizards/shared/dist/providers.d.ts +0 -101
- package/node_modules/@engenty-wizards/shared/dist/providers.js +0 -390
- package/node_modules/@engenty-wizards/shared/dist/run.d.ts +0 -679
- package/node_modules/@engenty-wizards/shared/dist/run.js +0 -618
- package/node_modules/@engenty-wizards/shared/dist/runner-texts.d.ts +0 -546
- package/node_modules/@engenty-wizards/shared/dist/runner-texts.js +0 -523
- package/node_modules/@engenty-wizards/shared/dist/runners.d.ts +0 -93
- package/node_modules/@engenty-wizards/shared/dist/runners.js +0 -146
- package/node_modules/@engenty-wizards/shared/dist/shape.d.ts +0 -102
- package/node_modules/@engenty-wizards/shared/dist/shape.js +0 -318
- package/node_modules/@engenty-wizards/shared/dist/space-data.d.ts +0 -89
- package/node_modules/@engenty-wizards/shared/dist/space-data.js +0 -47
- package/node_modules/@engenty-wizards/shared/dist/store.d.ts +0 -117
- package/node_modules/@engenty-wizards/shared/dist/store.js +0 -81
- package/node_modules/@engenty-wizards/shared/dist/surface.d.ts +0 -115
- package/node_modules/@engenty-wizards/shared/dist/surface.js +0 -442
- package/node_modules/@engenty-wizards/shared/dist/texts.d.ts +0 -45
- package/node_modules/@engenty-wizards/shared/dist/texts.js +0 -54
- package/node_modules/@engenty-wizards/shared/dist/translation.d.ts +0 -23
- package/node_modules/@engenty-wizards/shared/dist/translation.js +0 -154
- package/node_modules/@engenty-wizards/shared/dist/wizard-package.d.ts +0 -48
- package/node_modules/@engenty-wizards/shared/dist/wizard-package.js +0 -49
- package/node_modules/@engenty-wizards/shared/dist/workspace.d.ts +0 -16
- package/node_modules/@engenty-wizards/shared/dist/workspace.js +0 -51
- package/node_modules/@engenty-wizards/shared/package.json +0 -10
- package/plugin/.claude-plugin/plugin.json +0 -9
- package/plugin/.mcp.json +0 -8
- package/plugin/commands/wizard.md +0 -8
- package/plugin/skills/build-wizard/SKILL.md +0 -27
- package/plugin/skills/use-wizard/SKILL.md +0 -18
|
@@ -1,289 +0,0 @@
|
|
|
1
|
-
import { spawn } from "node:child_process";
|
|
2
|
-
import { existsSync } from "node:fs";
|
|
3
|
-
import { readFile, rm, stat } from "node:fs/promises";
|
|
4
|
-
import { isAbsolute, join, normalize } from "node:path";
|
|
5
|
-
import { note as runNote } from "@engenty-wizards/shared/run";
|
|
6
|
-
import { StepError } from "../engine/types.js";
|
|
7
|
-
import { CLAUDE_BIN, claudeEnv } from "../harness/claude.js";
|
|
8
|
-
import { failureOf } from "../harness/model.js";
|
|
9
|
-
import { openBridge } from "../mcp/bridge.js";
|
|
10
|
-
import { saidOf } from "../model-errors.js";
|
|
11
|
-
import { filmClient } from "../models.js";
|
|
12
|
-
import { prepareFilmFolder, savedSession, saveSession } from "./project.js";
|
|
13
|
-
import { runHyperframes } from "./tools.js";
|
|
14
|
-
/**
|
|
15
|
-
* A film step: the installed client (Claude Code) works in the film's folder with the skills,
|
|
16
|
-
* the style kit, the brand and the run's material, and writes the film as code. Its shell runs
|
|
17
|
-
* in the client's sandbox — writes only inside the folder, no network; HyperFrames (render,
|
|
18
|
-
* snapshots, checks) runs outside it, through the `hyperframes` tool of this step, limited to
|
|
19
|
-
* the folder. The final render is the runtime's, not the client's. A run that stops (a limit,
|
|
20
|
-
* a crash) keeps the folder and the client's session: the next attempt picks up from there.
|
|
21
|
-
*/
|
|
22
|
-
/** What the client may run through the tool; everything that reaches the network stays out. */
|
|
23
|
-
const ALLOWED = new Set([
|
|
24
|
-
"lint",
|
|
25
|
-
"check",
|
|
26
|
-
"validate",
|
|
27
|
-
"inspect",
|
|
28
|
-
"snapshot",
|
|
29
|
-
"render",
|
|
30
|
-
"compositions",
|
|
31
|
-
"timeline",
|
|
32
|
-
"info",
|
|
33
|
-
"keyframes",
|
|
34
|
-
"compare",
|
|
35
|
-
"grade-compare",
|
|
36
|
-
"beats",
|
|
37
|
-
"normalize-audio",
|
|
38
|
-
"media-treatment",
|
|
39
|
-
"transcribe",
|
|
40
|
-
"docs",
|
|
41
|
-
]);
|
|
42
|
-
/** The longest a film may take the client before the step gives up. */
|
|
43
|
-
const LIMIT_MS = 3 * 60 * 60_000;
|
|
44
|
-
function hyperframesTool(root, signal) {
|
|
45
|
-
return {
|
|
46
|
-
name: "hyperframes",
|
|
47
|
-
description: "Runs the HyperFrames CLI in the film folder: lint, check, snapshot, render, inspect, timeline, transcribe, keyframes, compare, docs and the like. Paths are relative to the folder. Returns what it printed.",
|
|
48
|
-
inputSchema: {
|
|
49
|
-
type: "object",
|
|
50
|
-
properties: {
|
|
51
|
-
args: {
|
|
52
|
-
type: "array",
|
|
53
|
-
items: { type: "string" },
|
|
54
|
-
description: 'The arguments, e.g. ["snapshot", "film", "--at", "1,4,8"].',
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
required: ["args"],
|
|
58
|
-
},
|
|
59
|
-
async execute(input) {
|
|
60
|
-
const args = (input.args ?? []);
|
|
61
|
-
if (!args.length || !args.every((a) => typeof a === "string")) {
|
|
62
|
-
return "args: a list of strings, the subcommand first.";
|
|
63
|
-
}
|
|
64
|
-
const [cmd] = args;
|
|
65
|
-
if (!ALLOWED.has(cmd)) {
|
|
66
|
-
return `"${cmd}" is not available here. Available: ${[...ALLOWED].join(", ")}.`;
|
|
67
|
-
}
|
|
68
|
-
// Every path stays inside the folder.
|
|
69
|
-
for (const a of args) {
|
|
70
|
-
const value = a.includes("=") && a.startsWith("-") ? a.slice(a.indexOf("=") + 1) : a;
|
|
71
|
-
if (isAbsolute(value) || normalize(value).startsWith("..")) {
|
|
72
|
-
return `"${a}" leaves the film folder.`;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
const extra = cmd === "transcribe" ? ["--no-runtime-install"] : [];
|
|
76
|
-
const { code, out } = await runHyperframes([...args, ...extra], {
|
|
77
|
-
cwd: root,
|
|
78
|
-
signal,
|
|
79
|
-
timeoutMs: 20 * 60_000,
|
|
80
|
-
});
|
|
81
|
-
return `exit ${code}\n${out.slice(-6000)}`;
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
/** Lines of a failed render worth reading: what failed and why, not the progress bars. */
|
|
86
|
-
function renderProblem(out) {
|
|
87
|
-
const lines = out
|
|
88
|
-
.split("\n")
|
|
89
|
-
.map((l) => l.trim())
|
|
90
|
-
.filter((l) => /✗|fail|error|blocked|warning|cannot|undefined/i.test(l) && l.length < 600);
|
|
91
|
-
return (lines.join("\n") || out.slice(-800)).slice(0, 2500);
|
|
92
|
-
}
|
|
93
|
-
/** How many times a failed final render goes back to the client to be fixed. */
|
|
94
|
-
const RENDER_FIXES = 2;
|
|
95
|
-
export async function runFilmStep(step, ctx) {
|
|
96
|
-
const found = await filmClient(step.model ?? "standard");
|
|
97
|
-
if ("problem" in found) {
|
|
98
|
-
throw new StepError(found.problem);
|
|
99
|
-
}
|
|
100
|
-
const { client, alias } = found;
|
|
101
|
-
await ctx.emit("info", { code: "filmSetup" });
|
|
102
|
-
const { root, brief } = await prepareFilmFolder(step, ctx);
|
|
103
|
-
const resume = await savedSession(root);
|
|
104
|
-
await ctx.emit("info", resume ? { code: "filmResume" } : { code: "filmClient", params: { client: client.name } });
|
|
105
|
-
const limit = AbortSignal.any([ctx.signal, AbortSignal.timeout(LIMIT_MS)]);
|
|
106
|
-
const bridge = openBridge([hyperframesTool(root, limit)]);
|
|
107
|
-
/** One turn of the client in the folder; returns its final event. */
|
|
108
|
-
const turn = async (prompt, session) => {
|
|
109
|
-
const args = [
|
|
110
|
-
"-p",
|
|
111
|
-
"--output-format",
|
|
112
|
-
"stream-json",
|
|
113
|
-
"--verbose",
|
|
114
|
-
"--model",
|
|
115
|
-
alias,
|
|
116
|
-
"--setting-sources",
|
|
117
|
-
"project",
|
|
118
|
-
"--strict-mcp-config",
|
|
119
|
-
"--mcp-config",
|
|
120
|
-
JSON.stringify({ mcpServers: { film: { type: "http", url: bridge.url } } }),
|
|
121
|
-
// The shell writes only inside the folder and has no network.
|
|
122
|
-
"--settings",
|
|
123
|
-
JSON.stringify({
|
|
124
|
-
sandbox: { enabled: true, autoAllowBashIfSandboxed: true, allowUnsandboxedCommands: false },
|
|
125
|
-
}),
|
|
126
|
-
"--allowedTools",
|
|
127
|
-
[
|
|
128
|
-
"Bash",
|
|
129
|
-
"Read(./**)",
|
|
130
|
-
"Edit(./**)",
|
|
131
|
-
"Write(./**)",
|
|
132
|
-
"Glob",
|
|
133
|
-
"Grep",
|
|
134
|
-
"Task",
|
|
135
|
-
"TodoWrite",
|
|
136
|
-
"TaskCreate",
|
|
137
|
-
"TaskUpdate",
|
|
138
|
-
"TaskList",
|
|
139
|
-
"TaskGet",
|
|
140
|
-
"Skill",
|
|
141
|
-
"mcp__film",
|
|
142
|
-
].join(","),
|
|
143
|
-
"--disallowedTools",
|
|
144
|
-
"WebFetch,WebSearch",
|
|
145
|
-
];
|
|
146
|
-
if (step.effort) {
|
|
147
|
-
args.push("--effort", step.effort);
|
|
148
|
-
}
|
|
149
|
-
if (session) {
|
|
150
|
-
args.push("--resume", session);
|
|
151
|
-
}
|
|
152
|
-
let last = null;
|
|
153
|
-
let stderr = "";
|
|
154
|
-
await new Promise((resolve, reject) => {
|
|
155
|
-
void (async () => {
|
|
156
|
-
const child = spawn(CLAUDE_BIN, args, {
|
|
157
|
-
cwd: root,
|
|
158
|
-
env: await claudeEnv(),
|
|
159
|
-
stdio: ["pipe", "pipe", "pipe"],
|
|
160
|
-
signal: limit,
|
|
161
|
-
});
|
|
162
|
-
let buffer = "";
|
|
163
|
-
let lastLook = 0;
|
|
164
|
-
let lastTask = "";
|
|
165
|
-
const subjects = [];
|
|
166
|
-
const task = async (now) => {
|
|
167
|
-
if (now && now !== lastTask) {
|
|
168
|
-
lastTask = now;
|
|
169
|
-
await ctx.emit("tool", { code: "filmTask", params: { task: now.slice(0, 90) } });
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
const onEvent = async (event) => {
|
|
173
|
-
if (event.session_id && event.type === "system") {
|
|
174
|
-
await saveSession(root, event.session_id);
|
|
175
|
-
}
|
|
176
|
-
if (event.type === "result") {
|
|
177
|
-
last = event;
|
|
178
|
-
}
|
|
179
|
-
for (const part of event.message?.content ?? []) {
|
|
180
|
-
if (part.type !== "tool_use") {
|
|
181
|
-
continue;
|
|
182
|
-
}
|
|
183
|
-
const input = part.input ?? {};
|
|
184
|
-
// What the client is on, as its own task list says; else a look at its frames.
|
|
185
|
-
if (part.name === "TodoWrite") {
|
|
186
|
-
const todos = (input.todos ?? []);
|
|
187
|
-
await task(todos.find((t) => t.status === "in_progress")?.content);
|
|
188
|
-
}
|
|
189
|
-
else if (part.name === "TaskCreate") {
|
|
190
|
-
subjects.push(String(input.subject ?? ""));
|
|
191
|
-
}
|
|
192
|
-
else if (part.name === "TaskUpdate" && input.status === "in_progress") {
|
|
193
|
-
const id = Number(input.taskId);
|
|
194
|
-
await task(typeof input.subject === "string" ? input.subject : subjects[id - 1] || undefined);
|
|
195
|
-
}
|
|
196
|
-
else if (part.name === "mcp__film__hyperframes" &&
|
|
197
|
-
input.args?.[0] === "snapshot" &&
|
|
198
|
-
Date.now() - lastLook > 60_000) {
|
|
199
|
-
lastLook = Date.now();
|
|
200
|
-
await ctx.emit("tool", { code: "filmLooks" });
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
child.stdout.on("data", (chunk) => {
|
|
205
|
-
buffer += String(chunk);
|
|
206
|
-
let nl = buffer.indexOf("\n");
|
|
207
|
-
while (nl >= 0) {
|
|
208
|
-
const line = buffer.slice(0, nl).trim();
|
|
209
|
-
buffer = buffer.slice(nl + 1);
|
|
210
|
-
nl = buffer.indexOf("\n");
|
|
211
|
-
if (line.startsWith("{")) {
|
|
212
|
-
try {
|
|
213
|
-
void onEvent(JSON.parse(line)).catch(() => { });
|
|
214
|
-
}
|
|
215
|
-
catch {
|
|
216
|
-
// not a line of the stream
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
child.stderr.on("data", (chunk) => {
|
|
222
|
-
stderr = (stderr + String(chunk)).slice(-4000);
|
|
223
|
-
});
|
|
224
|
-
child.on("error", reject);
|
|
225
|
-
child.on("close", () => resolve());
|
|
226
|
-
child.stdin.end(prompt);
|
|
227
|
-
})().catch(reject);
|
|
228
|
-
}).catch((err) => {
|
|
229
|
-
if (ctx.signal.aborted) {
|
|
230
|
-
throw err;
|
|
231
|
-
}
|
|
232
|
-
throw new StepError(runNote("filmClientStopped", { name: client.name, detail: err.message }));
|
|
233
|
-
});
|
|
234
|
-
const result = last;
|
|
235
|
-
if (!result || result.is_error) {
|
|
236
|
-
const detail = String(result?.result ?? (stderr.trim() || "no result")).slice(0, 400);
|
|
237
|
-
const failure = failureOf(client, detail);
|
|
238
|
-
throw new StepError(runNote("filmWorkSaved", { problem: saidOf(failure) }));
|
|
239
|
-
}
|
|
240
|
-
return result;
|
|
241
|
-
};
|
|
242
|
-
const out = join(root, "film", "renders", "film.mp4");
|
|
243
|
-
let summary = "";
|
|
244
|
-
try {
|
|
245
|
-
// A review's note asks for a change: the film's code is there, so it is edited, not redone.
|
|
246
|
-
const note = ctx.state.notes[step.id]?.trim();
|
|
247
|
-
const prompt = resume && note
|
|
248
|
-
? `The person watched the film and asks for this change:\n\n${note}\n\nChange the film in film/ accordingly — keep what they did not mention — check the frames again, and end with a short summary of what you changed.`
|
|
249
|
-
: resume
|
|
250
|
-
? "Carry on with the film where you stopped. Read PROGRESS.md and the folder to see where that was, then finish it."
|
|
251
|
-
: `Make the film BRIEF.md asks for, following CLAUDE.md.\n\n${brief}`;
|
|
252
|
-
const first = await turn(prompt, resume);
|
|
253
|
-
summary = typeof first.result === "string" ? first.result.trim() : "";
|
|
254
|
-
// The final render is ours: it does not depend on the client still running. What fails
|
|
255
|
-
// goes back to the client, which fixes its code.
|
|
256
|
-
for (let attempt = 0;; attempt++) {
|
|
257
|
-
if (!existsSync(join(root, "film", "index.html"))) {
|
|
258
|
-
throw new StepError(`${client.name} hat keinen Film hinterlassen.`);
|
|
259
|
-
}
|
|
260
|
-
await ctx.emit("info", { code: "videoRendering" });
|
|
261
|
-
await rm(out, { force: true });
|
|
262
|
-
const render = await runHyperframes(["render", "film", "-o", "film/renders/film.mp4", "--crf", "23", "--quiet"], { cwd: root, signal: ctx.signal, timeoutMs: 30 * 60_000 });
|
|
263
|
-
if (render.code === 0 && existsSync(out) && (await stat(out)).size > 0) {
|
|
264
|
-
break;
|
|
265
|
-
}
|
|
266
|
-
const problem = renderProblem(render.out);
|
|
267
|
-
if (attempt >= RENDER_FIXES) {
|
|
268
|
-
throw new StepError(runNote("filmRenderFailed", { detail: problem.slice(0, 400) }));
|
|
269
|
-
}
|
|
270
|
-
await ctx.emit("tool", { code: "filmFix" });
|
|
271
|
-
const fixed = await turn(`The final render of film/ failed:\n\n${problem}\n\nFind the cause in the composition's code, fix it, run \`check\` and a draft render through the hyperframes tool until both pass, and end with one line on what you fixed.`, await savedSession(root));
|
|
272
|
-
if (typeof fixed.result === "string" && fixed.result.trim()) {
|
|
273
|
-
summary = `${summary}\n\n${fixed.result.trim()}`.trim();
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
finally {
|
|
278
|
-
bridge.close();
|
|
279
|
-
}
|
|
280
|
-
const ref = await ctx.saveAsset({
|
|
281
|
-
stepId: step.id,
|
|
282
|
-
kind: "video",
|
|
283
|
-
mime: "video/mp4",
|
|
284
|
-
name: `${step.id}.mp4`,
|
|
285
|
-
data: new Uint8Array(await readFile(out)),
|
|
286
|
-
ai: "generated",
|
|
287
|
-
});
|
|
288
|
-
return { text: summary.slice(0, 3000), assets: [ref], at: new Date().toISOString() };
|
|
289
|
-
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { spawn } from "node:child_process";
|
|
2
|
-
import { existsSync } from "node:fs";
|
|
3
|
-
import { mkdir } from "node:fs/promises";
|
|
4
|
-
import { dirname, join } from "node:path";
|
|
5
|
-
import { env } from "../env.js";
|
|
6
|
-
/**
|
|
7
|
-
* The HyperFrames CLI (github.com/heygen-com/hyperframes, Apache 2.0): renders a composition of
|
|
8
|
-
* HTML, CSS and JS to MP4 frame by frame in headless Chrome. Installed once into the data folder
|
|
9
|
-
* on the first film, pinned to a version; Chrome comes with it on its first render.
|
|
10
|
-
*/
|
|
11
|
-
export const HYPERFRAMES_VERSION = "0.8.137";
|
|
12
|
-
const home = join(env.dataDir, "tools", `hyperframes-${HYPERFRAMES_VERSION}`);
|
|
13
|
-
const entry = join(home, "node_modules", "hyperframes", "bin", "hyperframes.mjs");
|
|
14
|
-
let installing = null;
|
|
15
|
-
/** Terminal colour codes. */
|
|
16
|
-
const ANSI = new RegExp(`${String.fromCharCode(27)}\\[[0-9;]*m`, "g");
|
|
17
|
-
/** The CLI's entry script; installs it on first use. */
|
|
18
|
-
export function hyperframesEntry() {
|
|
19
|
-
if (existsSync(entry)) {
|
|
20
|
-
return Promise.resolve(entry);
|
|
21
|
-
}
|
|
22
|
-
installing ??= install().finally(() => {
|
|
23
|
-
installing = null;
|
|
24
|
-
});
|
|
25
|
-
return installing;
|
|
26
|
-
}
|
|
27
|
-
async function install() {
|
|
28
|
-
await mkdir(home, { recursive: true });
|
|
29
|
-
// npm sits next to the node that runs us; else the one on PATH.
|
|
30
|
-
const local = join(dirname(process.execPath), "npm");
|
|
31
|
-
const npm = existsSync(local) ? local : "npm";
|
|
32
|
-
const { code, out } = await spawnText(npm, [
|
|
33
|
-
"install",
|
|
34
|
-
"--prefix",
|
|
35
|
-
home,
|
|
36
|
-
"--no-audit",
|
|
37
|
-
"--no-fund",
|
|
38
|
-
"--loglevel",
|
|
39
|
-
"error",
|
|
40
|
-
`hyperframes@${HYPERFRAMES_VERSION}`,
|
|
41
|
-
], { cwd: home, timeoutMs: 10 * 60_000 });
|
|
42
|
-
if (code !== 0 || !existsSync(entry)) {
|
|
43
|
-
throw new Error(`HyperFrames could not be installed: ${out.slice(-400)}`);
|
|
44
|
-
}
|
|
45
|
-
return entry;
|
|
46
|
-
}
|
|
47
|
-
/** What the CLI and the renderer see: no keys of ours, no telemetry. */
|
|
48
|
-
function cliEnv() {
|
|
49
|
-
const pass = ["PATH", "HOME", "USER", "LOGNAME", "LANG", "TMPDIR", "SHELL"];
|
|
50
|
-
const out = {};
|
|
51
|
-
for (const k of pass) {
|
|
52
|
-
if (process.env[k]) {
|
|
53
|
-
out[k] = process.env[k];
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
// ffmpeg as the runtime finds it, first on the PATH.
|
|
57
|
-
if (env.ffmpegPath.includes("/")) {
|
|
58
|
-
out.PATH = `${dirname(env.ffmpegPath)}:${out.PATH ?? ""}`;
|
|
59
|
-
}
|
|
60
|
-
out.HYPERFRAMES_NO_TELEMETRY = "1";
|
|
61
|
-
out.HYPERFRAMES_SKIP_SKILLS = "1";
|
|
62
|
-
return out;
|
|
63
|
-
}
|
|
64
|
-
/** Runs `hyperframes <args>` in a project folder and returns what it printed (the tail). */
|
|
65
|
-
export async function runHyperframes(args, opts) {
|
|
66
|
-
const cli = await hyperframesEntry();
|
|
67
|
-
return spawnText(process.execPath, [cli, ...args], {
|
|
68
|
-
cwd: opts.cwd,
|
|
69
|
-
signal: opts.signal,
|
|
70
|
-
timeoutMs: opts.timeoutMs ?? 20 * 60_000,
|
|
71
|
-
env: cliEnv(),
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
function spawnText(bin, args, opts) {
|
|
75
|
-
return new Promise((resolve) => {
|
|
76
|
-
let out = "";
|
|
77
|
-
const child = spawn(bin, args, {
|
|
78
|
-
cwd: opts.cwd,
|
|
79
|
-
env: opts.env ?? cliEnv(),
|
|
80
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
81
|
-
signal: opts.signal,
|
|
82
|
-
});
|
|
83
|
-
const keep = (d) => {
|
|
84
|
-
out = (out + String(d)).slice(-30_000);
|
|
85
|
-
};
|
|
86
|
-
child.stdout.on("data", keep);
|
|
87
|
-
child.stderr.on("data", keep);
|
|
88
|
-
const timer = setTimeout(() => child.kill("SIGTERM"), opts.timeoutMs);
|
|
89
|
-
child.on("error", (err) => {
|
|
90
|
-
clearTimeout(timer);
|
|
91
|
-
resolve({ code: 1, out: `${out}\n${err.message}` });
|
|
92
|
-
});
|
|
93
|
-
child.on("close", (code) => {
|
|
94
|
-
clearTimeout(timer);
|
|
95
|
-
// Colours and progress bars mean nothing to a model reading this.
|
|
96
|
-
resolve({ code: code ?? 1, out: out.replace(ANSI, "") });
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { env } from "./env.js";
|
|
2
|
-
const cache = new Map();
|
|
3
|
-
let queue = Promise.resolve();
|
|
4
|
-
let lastCall = 0;
|
|
5
|
-
/** "Herrengasse 16, 8010 Graz" from a reverse-geocoding answer; null when it names nothing. */
|
|
6
|
-
export function placeLabel(result) {
|
|
7
|
-
const a = result.address;
|
|
8
|
-
if (!a) {
|
|
9
|
-
return result.display_name?.split(",").slice(0, 3).join(",").trim() || null;
|
|
10
|
-
}
|
|
11
|
-
const street = [a.road ?? a.pedestrian ?? a.footway ?? a.path, a.house_number]
|
|
12
|
-
.filter(Boolean)
|
|
13
|
-
.join(" ");
|
|
14
|
-
const town = a.city ?? a.town ?? a.village ?? a.municipality ?? a.hamlet ?? a.county;
|
|
15
|
-
const place = [a.postcode, town].filter(Boolean).join(" ");
|
|
16
|
-
return [street, place].filter(Boolean).join(", ") || null;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* The address of a position, when the server has a geocoder (`GEOCODER_URL`). Calls go out one
|
|
20
|
-
* at a time and at most one a second — what a public Nominatim asks of its users.
|
|
21
|
-
*/
|
|
22
|
-
export function reverseGeocode(lat, lng, language = "en") {
|
|
23
|
-
if (!env.geocoderUrl) {
|
|
24
|
-
return Promise.resolve(null);
|
|
25
|
-
}
|
|
26
|
-
// ~10 m: the same spot asked twice is one call.
|
|
27
|
-
const key = `${lat.toFixed(4)},${lng.toFixed(4)},${language}`;
|
|
28
|
-
if (cache.has(key)) {
|
|
29
|
-
return Promise.resolve(cache.get(key) ?? null);
|
|
30
|
-
}
|
|
31
|
-
const call = queue.then(async () => {
|
|
32
|
-
await new Promise((r) => setTimeout(r, Math.max(0, lastCall + 1000 - Date.now())));
|
|
33
|
-
lastCall = Date.now();
|
|
34
|
-
try {
|
|
35
|
-
const url = new URL(env.geocoderUrl);
|
|
36
|
-
url.searchParams.set("format", "jsonv2");
|
|
37
|
-
url.searchParams.set("lat", String(lat));
|
|
38
|
-
url.searchParams.set("lon", String(lng));
|
|
39
|
-
url.searchParams.set("zoom", "18");
|
|
40
|
-
url.searchParams.set("addressdetails", "1");
|
|
41
|
-
const res = await fetch(url, {
|
|
42
|
-
headers: { "accept-language": language, "user-agent": `engenty-wizards (${env.appUrl})` },
|
|
43
|
-
signal: AbortSignal.timeout(4000),
|
|
44
|
-
});
|
|
45
|
-
const label = res.ok ? placeLabel((await res.json())) : null;
|
|
46
|
-
if (cache.size > 500) {
|
|
47
|
-
cache.clear();
|
|
48
|
-
}
|
|
49
|
-
cache.set(key, label);
|
|
50
|
-
return label;
|
|
51
|
-
}
|
|
52
|
-
catch {
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
queue = call;
|
|
57
|
-
return call;
|
|
58
|
-
}
|