@dreamlake/dreamlake-cli 0.88.1 → 0.89.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/access.d.ts +83 -0
- package/dist/api/access.js +77 -0
- package/dist/api/agent.d.ts +156 -0
- package/dist/api/agent.js +111 -0
- package/dist/api/browser.d.ts +90 -0
- package/dist/api/browser.js +102 -0
- package/dist/api/client.d.ts +53 -0
- package/dist/api/client.js +102 -0
- package/dist/api/common.d.ts +28 -0
- package/dist/api/common.js +16 -0
- package/dist/api/content.d.ts +195 -0
- package/dist/api/content.js +147 -0
- package/dist/api/execution.d.ts +84 -0
- package/dist/api/execution.js +73 -0
- package/dist/api/http.d.ts +19 -0
- package/dist/api/http.js +66 -0
- package/dist/api/index.d.ts +2330 -0
- package/dist/api/index.js +114 -0
- package/dist/api/infra.d.ts +2 -0
- package/dist/api/infra.js +2 -0
- package/dist/api/jobs.d.ts +2 -0
- package/dist/api/jobs.js +2 -0
- package/dist/api/layout.d.ts +2 -0
- package/dist/api/layout.js +2 -0
- package/dist/api/library-edit.d.ts +3 -0
- package/dist/api/library-edit.js +3 -0
- package/dist/api/library-manifest.d.ts +2 -0
- package/dist/api/library-manifest.js +2 -0
- package/dist/api/note-character-plan.d.ts +2 -0
- package/dist/api/note-character-plan.js +2 -0
- package/dist/api/note-editing.d.ts +2 -0
- package/dist/api/note-editing.js +2 -0
- package/dist/api/note-edits.d.ts +21 -0
- package/dist/api/note-edits.js +10 -0
- package/dist/api/note-events.d.ts +5 -0
- package/dist/api/note-events.js +11 -0
- package/dist/api/note-files.d.ts +75 -0
- package/dist/api/note-files.js +65 -0
- package/dist/api/note-html-read.d.ts +2 -0
- package/dist/api/note-html-read.js +2 -0
- package/dist/api/note-html.d.ts +2 -0
- package/dist/api/note-html.js +2 -0
- package/dist/api/note-toc.d.ts +2 -0
- package/dist/api/note-toc.js +2 -0
- package/dist/api/notes.d.ts +304 -0
- package/dist/api/notes.js +181 -0
- package/dist/api/open-resources.d.ts +27 -0
- package/dist/api/open-resources.js +102 -0
- package/dist/api/ownership.d.ts +12 -0
- package/dist/api/ownership.js +24 -0
- package/dist/api/platform.d.ts +83 -0
- package/dist/api/platform.js +56 -0
- package/dist/api/presigned-transfer.d.ts +2 -0
- package/dist/api/presigned-transfer.js +2 -0
- package/dist/api/registered-runs.d.ts +48 -0
- package/dist/api/registered-runs.js +33 -0
- package/dist/api/sessions.d.ts +299 -0
- package/dist/api/sessions.js +105 -0
- package/dist/api/storage.d.ts +46 -0
- package/dist/api/storage.js +34 -0
- package/dist/api/streams.d.ts +18 -0
- package/dist/api/streams.js +70 -0
- package/dist/api/vault.d.ts +93 -0
- package/dist/api/vault.js +79 -0
- package/dist/api/workspace.d.ts +180 -0
- package/dist/api/workspace.js +146 -0
- package/dist/cli/agent-identity.d.ts +4 -0
- package/dist/cli/agent-identity.js +21 -0
- package/dist/cli/agents/identity.d.ts +50 -0
- package/dist/cli/agents/identity.js +105 -0
- package/dist/cli/agents/index.d.ts +31 -0
- package/dist/cli/agents/index.js +580 -0
- package/dist/cli/agents/manage.d.ts +43 -0
- package/dist/cli/agents/manage.js +376 -0
- package/dist/cli/agents/spec.d.ts +104 -0
- package/dist/cli/agents/spec.js +280 -0
- package/dist/cli/agents/web.d.ts +7 -0
- package/dist/cli/agents/web.js +109 -0
- package/dist/cli/artifact/incremental.d.ts +21 -0
- package/dist/cli/artifact/incremental.js +80 -0
- package/dist/cli/artifact/index.d.ts +52 -0
- package/dist/cli/artifact/index.js +405 -0
- package/dist/cli/artifact/meta.d.ts +69 -0
- package/dist/cli/artifact/meta.js +189 -0
- package/dist/cli/auth/commands.d.ts +29 -0
- package/dist/cli/auth/commands.js +327 -0
- package/dist/cli/auth/constants.d.ts +13 -0
- package/dist/cli/auth/constants.js +18 -0
- package/dist/cli/auth/credentials.d.ts +37 -0
- package/dist/cli/auth/credentials.js +155 -0
- package/dist/cli/auth/device-flow.d.ts +32 -0
- package/dist/cli/auth/device-flow.js +154 -0
- package/dist/cli/auth/device-secret.d.ts +6 -0
- package/dist/cli/auth/device-secret.js +26 -0
- package/dist/cli/auth/machine.d.ts +15 -0
- package/dist/cli/auth/machine.js +126 -0
- package/dist/cli/auth/materialized.d.ts +32 -0
- package/dist/cli/auth/materialized.js +102 -0
- package/dist/cli/auth/migrate.d.ts +10 -0
- package/dist/cli/auth/migrate.js +75 -0
- package/dist/cli/client.d.ts +102 -0
- package/dist/cli/client.js +206 -0
- package/dist/cli/collection-list.d.ts +3 -0
- package/dist/cli/collection-list.js +25 -0
- package/dist/cli/compat/ctx.d.ts +26 -0
- package/dist/cli/compat/ctx.js +76 -0
- package/dist/cli/compat/dreamdb-wasm-embedded.d.ts +2 -0
- package/dist/cli/compat/dreamdb-wasm-embedded.js +8 -0
- package/dist/cli/compat/dreamdb-wasm.d.ts +1 -0
- package/dist/cli/compat/dreamdb-wasm.js +26 -0
- package/dist/cli/compat/dreamdb.d.ts +112 -0
- package/dist/cli/compat/dreamdb.js +219 -0
- package/dist/cli/compat/flags.d.ts +2 -0
- package/dist/cli/compat/flags.js +13 -0
- package/dist/cli/compat/http.d.ts +23 -0
- package/dist/cli/compat/http.js +137 -0
- package/dist/cli/compat/presignedTransfer.d.ts +139 -0
- package/dist/cli/compat/presignedTransfer.js +580 -0
- package/dist/cli/compat/s3-backend.d.ts +73 -0
- package/dist/cli/compat/s3-backend.js +132 -0
- package/dist/cli/config.d.ts +22 -0
- package/dist/cli/config.js +96 -0
- package/dist/cli/connection/dto.d.ts +159 -0
- package/dist/cli/connection/dto.js +497 -0
- package/dist/cli/connection/index.d.ts +50 -0
- package/dist/cli/connection/index.js +413 -0
- package/dist/cli/connection/oauth.d.ts +23 -0
- package/dist/cli/connection/oauth.js +290 -0
- package/dist/cli/connection/write.d.ts +47 -0
- package/dist/cli/connection/write.js +573 -0
- package/dist/cli/create/index.d.ts +19 -0
- package/dist/cli/create/index.js +209 -0
- package/dist/cli/declare/index.d.ts +29 -0
- package/dist/cli/declare/index.js +304 -0
- package/dist/cli/delete/index.d.ts +18 -0
- package/dist/cli/delete/index.js +232 -0
- package/dist/cli/download/index.d.ts +9 -0
- package/dist/cli/download/index.js +128 -0
- package/dist/cli/env/compose.d.ts +88 -0
- package/dist/cli/env/compose.js +402 -0
- package/dist/cli/env/index.d.ts +176 -0
- package/dist/cli/env/index.js +1011 -0
- package/dist/cli/experiments/index.d.ts +11 -0
- package/dist/cli/experiments/index.js +168 -0
- package/dist/cli/glob.d.ts +1 -0
- package/dist/cli/glob.js +45 -0
- package/dist/cli/graphql-helpers.d.ts +23 -0
- package/dist/cli/graphql-helpers.js +42 -0
- package/dist/cli/graphql.d.ts +10 -0
- package/dist/cli/graphql.js +47 -0
- package/dist/cli/help-examples.generated.d.ts +1 -0
- package/dist/cli/help-examples.generated.js +192 -0
- package/dist/cli/helpers.d.ts +8 -0
- package/dist/cli/helpers.js +106 -0
- package/dist/cli/hosts/api.d.ts +29 -0
- package/dist/cli/hosts/api.js +54 -0
- package/dist/cli/hosts/bootstrap-source.d.ts +1 -0
- package/dist/cli/hosts/bootstrap-source.js +2 -0
- package/dist/cli/hosts/catalog.d.ts +26 -0
- package/dist/cli/hosts/catalog.js +55 -0
- package/dist/cli/hosts/config.d.ts +45 -0
- package/dist/cli/hosts/config.js +179 -0
- package/dist/cli/hosts/credentials.d.ts +19 -0
- package/dist/cli/hosts/credentials.js +173 -0
- package/dist/cli/hosts/enroll.d.ts +17 -0
- package/dist/cli/hosts/enroll.js +109 -0
- package/dist/cli/hosts/enrollments.d.ts +25 -0
- package/dist/cli/hosts/enrollments.js +54 -0
- package/dist/cli/hosts/index.d.ts +6 -0
- package/dist/cli/hosts/index.js +279 -0
- package/dist/cli/hosts/inventory.d.ts +40 -0
- package/dist/cli/hosts/inventory.js +91 -0
- package/dist/cli/hosts/lifecycle.d.ts +15 -0
- package/dist/cli/hosts/lifecycle.js +108 -0
- package/dist/cli/hosts/metrics-source.d.ts +12 -0
- package/dist/cli/hosts/metrics-source.js +89 -0
- package/dist/cli/hosts/observations.d.ts +39 -0
- package/dist/cli/hosts/observations.js +102 -0
- package/dist/cli/hosts/remote.d.ts +5 -0
- package/dist/cli/hosts/remote.js +66 -0
- package/dist/cli/hosts/ssh.d.ts +63 -0
- package/dist/cli/hosts/ssh.js +276 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +288 -0
- package/dist/cli/infra/api.d.ts +95 -0
- package/dist/cli/infra/api.js +291 -0
- package/dist/cli/infra/index.d.ts +5 -0
- package/dist/cli/infra/index.js +102 -0
- package/dist/cli/infra/move.d.ts +15 -0
- package/dist/cli/infra/move.js +123 -0
- package/dist/cli/infra/transfer.d.ts +15 -0
- package/dist/cli/infra/transfer.js +280 -0
- package/dist/cli/jobs/api.d.ts +69 -0
- package/dist/cli/jobs/api.js +121 -0
- package/dist/cli/jobs/index.d.ts +5 -0
- package/dist/cli/jobs/index.js +140 -0
- package/dist/cli/lakeshore/index.d.ts +98 -0
- package/dist/cli/lakeshore/index.js +502 -0
- package/dist/cli/launch/index.d.ts +43 -0
- package/dist/cli/launch/index.js +270 -0
- package/dist/cli/layout/index.d.ts +2 -0
- package/dist/cli/layout/index.js +44 -0
- package/dist/cli/layout/transport.d.ts +12 -0
- package/dist/cli/layout/transport.js +70 -0
- package/dist/cli/library/add.d.ts +60 -0
- package/dist/cli/library/add.js +348 -0
- package/dist/cli/library/cache.d.ts +26 -0
- package/dist/cli/library/cache.js +88 -0
- package/dist/cli/library/config.d.ts +75 -0
- package/dist/cli/library/config.js +198 -0
- package/dist/cli/library/digest.d.ts +5 -0
- package/dist/cli/library/digest.js +19 -0
- package/dist/cli/library/discover.d.ts +87 -0
- package/dist/cli/library/discover.js +534 -0
- package/dist/cli/library/freshness.d.ts +35 -0
- package/dist/cli/library/freshness.js +109 -0
- package/dist/cli/library/generation.d.ts +35 -0
- package/dist/cli/library/generation.js +211 -0
- package/dist/cli/library/index.d.ts +2 -0
- package/dist/cli/library/index.js +36 -0
- package/dist/cli/library/info.d.ts +69 -0
- package/dist/cli/library/info.js +311 -0
- package/dist/cli/library/list.d.ts +33 -0
- package/dist/cli/library/list.js +86 -0
- package/dist/cli/library/manifest.d.ts +81 -0
- package/dist/cli/library/manifest.js +200 -0
- package/dist/cli/library/manifestCache.d.ts +45 -0
- package/dist/cli/library/manifestCache.js +169 -0
- package/dist/cli/library/pull.d.ts +30 -0
- package/dist/cli/library/pull.js +438 -0
- package/dist/cli/library/push.d.ts +72 -0
- package/dist/cli/library/push.js +642 -0
- package/dist/cli/library/rm.d.ts +31 -0
- package/dist/cli/library/rm.js +200 -0
- package/dist/cli/library/search.d.ts +18 -0
- package/dist/cli/library/search.js +181 -0
- package/dist/cli/library/stat.d.ts +15 -0
- package/dist/cli/library/stat.js +127 -0
- package/dist/cli/library/tools.d.ts +104 -0
- package/dist/cli/library/tools.js +163 -0
- package/dist/cli/library/wire.d.ts +47 -0
- package/dist/cli/library/wire.js +120 -0
- package/dist/cli/list/index.d.ts +26 -0
- package/dist/cli/list/index.js +256 -0
- package/dist/cli/notes/character-plan.d.ts +22 -0
- package/dist/cli/notes/character-plan.js +232 -0
- package/dist/cli/notes/document.d.ts +73 -0
- package/dist/cli/notes/document.js +306 -0
- package/dist/cli/notes/edit-commands.d.ts +106 -0
- package/dist/cli/notes/edit-commands.js +623 -0
- package/dist/cli/notes/editing.d.ts +81 -0
- package/dist/cli/notes/editing.js +305 -0
- package/dist/cli/notes/events.d.ts +36 -0
- package/dist/cli/notes/events.js +54 -0
- package/dist/cli/notes/files-commands.d.ts +120 -0
- package/dist/cli/notes/files-commands.js +554 -0
- package/dist/cli/notes/html-read.d.ts +9 -0
- package/dist/cli/notes/html-read.js +90 -0
- package/dist/cli/notes/html.d.ts +73 -0
- package/dist/cli/notes/html.js +381 -0
- package/dist/cli/notes/index.d.ts +123 -0
- package/dist/cli/notes/index.js +1303 -0
- package/dist/cli/notes/linger.d.ts +59 -0
- package/dist/cli/notes/linger.js +339 -0
- package/dist/cli/notes/media-commands.d.ts +5 -0
- package/dist/cli/notes/media-commands.js +51 -0
- package/dist/cli/notes/move-command.d.ts +83 -0
- package/dist/cli/notes/move-command.js +259 -0
- package/dist/cli/notes/rm-command.d.ts +22 -0
- package/dist/cli/notes/rm-command.js +110 -0
- package/dist/cli/notes/select-command.d.ts +12 -0
- package/dist/cli/notes/select-command.js +84 -0
- package/dist/cli/notes/suggest-diff.d.ts +56 -0
- package/dist/cli/notes/suggest-diff.js +311 -0
- package/dist/cli/notes/toc.d.ts +38 -0
- package/dist/cli/notes/toc.js +144 -0
- package/dist/cli/notes/transfer-command.d.ts +6 -0
- package/dist/cli/notes/transfer-command.js +9 -0
- package/dist/cli/notes/version-commands.d.ts +19 -0
- package/dist/cli/notes/version-commands.js +178 -0
- package/dist/cli/nymph/index.d.ts +74 -0
- package/dist/cli/nymph/index.js +349 -0
- package/dist/cli/org/index.d.ts +34 -0
- package/dist/cli/org/index.js +341 -0
- package/dist/cli/ownership/index.d.ts +12 -0
- package/dist/cli/ownership/index.js +122 -0
- package/dist/cli/ownership/metadata-transfer.d.ts +20 -0
- package/dist/cli/ownership/metadata-transfer.js +159 -0
- package/dist/cli/page/index.d.ts +58 -0
- package/dist/cli/page/index.js +387 -0
- package/dist/cli/pipeline/index.d.ts +69 -0
- package/dist/cli/pipeline/index.js +604 -0
- package/dist/cli/progress.d.ts +60 -0
- package/dist/cli/progress.js +276 -0
- package/dist/cli/project/attachments.d.ts +10 -0
- package/dist/cli/project/attachments.js +39 -0
- package/dist/cli/project/grants.d.ts +10 -0
- package/dist/cli/project/grants.js +39 -0
- package/dist/cli/project/index.d.ts +8 -0
- package/dist/cli/project/index.js +92 -0
- package/dist/cli/project/move.d.ts +57 -0
- package/dist/cli/project/move.js +242 -0
- package/dist/cli/project/output.d.ts +2 -0
- package/dist/cli/project/output.js +29 -0
- package/dist/cli/project/stream.d.ts +55 -0
- package/dist/cli/project/stream.js +207 -0
- package/dist/cli/project/transfer-preview.d.ts +8 -0
- package/dist/cli/project/transfer-preview.js +10 -0
- package/dist/cli/prompt.d.ts +1 -0
- package/dist/cli/prompt.js +17 -0
- package/dist/cli/provider/dreamdir.d.ts +52 -0
- package/dist/cli/provider/dreamdir.js +138 -0
- package/dist/cli/provider/index.d.ts +4 -0
- package/dist/cli/provider/index.js +419 -0
- package/dist/cli/provider/jump-worker.d.ts +9 -0
- package/dist/cli/provider/jump-worker.js +141 -0
- package/dist/cli/provider/lifecycle.d.ts +149 -0
- package/dist/cli/provider/lifecycle.js +1390 -0
- package/dist/cli/provider/machine.d.ts +17 -0
- package/dist/cli/provider/machine.js +116 -0
- package/dist/cli/provider/ssh.d.ts +105 -0
- package/dist/cli/provider/ssh.js +305 -0
- package/dist/cli/provider/terraform.d.ts +140 -0
- package/dist/cli/provider/terraform.js +288 -0
- package/dist/cli/providers/index.d.ts +18 -0
- package/dist/cli/providers/index.js +422 -0
- package/dist/cli/python.d.ts +61 -0
- package/dist/cli/python.js +255 -0
- package/dist/cli/queues/index.d.ts +33 -0
- package/dist/cli/queues/index.js +248 -0
- package/dist/cli/queues/slurm.d.ts +10 -0
- package/dist/cli/queues/slurm.js +134 -0
- package/dist/cli/resources.d.ts +72 -0
- package/dist/cli/resources.js +137 -0
- package/dist/cli/run/index.d.ts +15 -0
- package/dist/cli/run/index.js +163 -0
- package/dist/cli/run/input.d.ts +34 -0
- package/dist/cli/run/input.js +135 -0
- package/dist/cli/run/recovery.d.ts +2 -0
- package/dist/cli/run/recovery.js +18 -0
- package/dist/cli/run/setup.d.ts +3 -0
- package/dist/cli/run/setup.js +62 -0
- package/dist/cli/runconfig/index.d.ts +12 -0
- package/dist/cli/runconfig/index.js +130 -0
- package/dist/cli/runnable/index.d.ts +35 -0
- package/dist/cli/runnable/index.js +575 -0
- package/dist/cli/runnable/path.d.ts +115 -0
- package/dist/cli/runnable/path.js +288 -0
- package/dist/cli/runnable/run.d.ts +91 -0
- package/dist/cli/runnable/run.js +239 -0
- package/dist/cli/runnable/upload.d.ts +43 -0
- package/dist/cli/runnable/upload.js +342 -0
- package/dist/cli/runnable/worker.d.ts +1 -0
- package/dist/cli/runnable/worker.js +44 -0
- package/dist/cli/schemas/workflow-spec.schema.json +335 -0
- package/dist/cli/self-update/index.d.ts +5 -0
- package/dist/cli/self-update/index.js +107 -0
- package/dist/cli/self-update/install.d.ts +60 -0
- package/dist/cli/self-update/install.js +428 -0
- package/dist/cli/self-update/paths.d.ts +40 -0
- package/dist/cli/self-update/paths.js +87 -0
- package/dist/cli/self-update/releases.d.ts +41 -0
- package/dist/cli/self-update/releases.js +153 -0
- package/dist/cli/self-update/settings.d.ts +16 -0
- package/dist/cli/self-update/settings.js +68 -0
- package/dist/cli/self-update/update.d.ts +18 -0
- package/dist/cli/self-update/update.js +241 -0
- package/dist/cli/service-accounts/index.d.ts +3 -0
- package/dist/cli/service-accounts/index.js +149 -0
- package/dist/cli/session-affiliation.d.ts +26 -0
- package/dist/cli/session-affiliation.js +135 -0
- package/dist/cli/sessions/affiliation.d.ts +8 -0
- package/dist/cli/sessions/affiliation.js +66 -0
- package/dist/cli/sessions/api.d.ts +55 -0
- package/dist/cli/sessions/api.js +88 -0
- package/dist/cli/sessions/control.d.ts +6 -0
- package/dist/cli/sessions/control.js +159 -0
- package/dist/cli/sessions/conversation.d.ts +15 -0
- package/dist/cli/sessions/conversation.js +118 -0
- package/dist/cli/sessions/index.d.ts +2 -0
- package/dist/cli/sessions/index.js +209 -0
- package/dist/cli/sessions/managed.d.ts +39 -0
- package/dist/cli/sessions/managed.js +63 -0
- package/dist/cli/sessions/redaction.d.ts +2 -0
- package/dist/cli/sessions/redaction.js +11 -0
- package/dist/cli/sessions/runner/exec.d.ts +108 -0
- package/dist/cli/sessions/runner/exec.js +335 -0
- package/dist/cli/sessions/runner/journal.d.ts +26 -0
- package/dist/cli/sessions/runner/journal.js +49 -0
- package/dist/cli/sessions/runner/native.d.ts +48 -0
- package/dist/cli/sessions/runner/native.js +170 -0
- package/dist/cli/sessions/runner/pod.d.ts +30 -0
- package/dist/cli/sessions/runner/pod.js +129 -0
- package/dist/cli/sessions/runner/serve.d.ts +85 -0
- package/dist/cli/sessions/runner/serve.js +558 -0
- package/dist/cli/sessions/sync.d.ts +47 -0
- package/dist/cli/sessions/sync.js +80 -0
- package/dist/cli/sessions/transport.d.ts +14 -0
- package/dist/cli/sessions/transport.js +116 -0
- package/dist/cli/share.d.ts +15 -0
- package/dist/cli/share.js +139 -0
- package/dist/cli/skill/catalog.d.ts +141 -0
- package/dist/cli/skill/catalog.js +442 -0
- package/dist/cli/skill/files.d.ts +89 -0
- package/dist/cli/skill/files.js +264 -0
- package/dist/cli/skill/index.d.ts +268 -0
- package/dist/cli/skill/index.js +1216 -0
- package/dist/cli/skill/manifest.d.ts +30 -0
- package/dist/cli/skill/manifest.js +101 -0
- package/dist/cli/skill/prefs.d.ts +9 -0
- package/dist/cli/skill/prefs.js +32 -0
- package/dist/cli/skill/reminders.d.ts +15 -0
- package/dist/cli/skill/reminders.js +105 -0
- package/dist/cli/skill/tar.d.ts +17 -0
- package/dist/cli/skill/tar.js +195 -0
- package/dist/cli/snapshot/index.d.ts +24 -0
- package/dist/cli/snapshot/index.js +146 -0
- package/dist/cli/source/access.d.ts +45 -0
- package/dist/cli/source/access.js +563 -0
- package/dist/cli/source/control.d.ts +103 -0
- package/dist/cli/source/control.js +546 -0
- package/dist/cli/source/delete.d.ts +89 -0
- package/dist/cli/source/delete.js +463 -0
- package/dist/cli/source/index.d.ts +288 -0
- package/dist/cli/source/index.js +1348 -0
- package/dist/cli/source/share.d.ts +65 -0
- package/dist/cli/source/share.js +530 -0
- package/dist/cli/source/upload.d.ts +62 -0
- package/dist/cli/source/upload.js +258 -0
- package/dist/cli/source/write.d.ts +77 -0
- package/dist/cli/source/write.js +335 -0
- package/dist/cli/spawn.d.ts +28 -0
- package/dist/cli/spawn.js +81 -0
- package/dist/cli/target.d.ts +22 -0
- package/dist/cli/target.js +85 -0
- package/dist/cli/tasks/index.d.ts +38 -0
- package/dist/cli/tasks/index.js +365 -0
- package/dist/cli/team/index.d.ts +37 -0
- package/dist/cli/team/index.js +407 -0
- package/dist/cli/telemetry.d.ts +23 -0
- package/dist/cli/telemetry.js +262 -0
- package/dist/cli/telemetryJournal.d.ts +26 -0
- package/dist/cli/telemetryJournal.js +104 -0
- package/dist/cli/update/index.d.ts +21 -0
- package/dist/cli/update/index.js +284 -0
- package/dist/cli/upload/index.d.ts +11 -0
- package/dist/cli/upload/index.js +261 -0
- package/dist/cli/upload/kinds.d.ts +10 -0
- package/dist/cli/upload/kinds.js +85 -0
- package/dist/cli/upload/multipart.d.ts +21 -0
- package/dist/cli/upload/multipart.js +248 -0
- package/dist/cli/vault/affected-preview.d.ts +15 -0
- package/dist/cli/vault/affected-preview.js +38 -0
- package/dist/cli/vault/cloud.d.ts +55 -0
- package/dist/cli/vault/cloud.js +287 -0
- package/dist/cli/vault/format.d.ts +18 -0
- package/dist/cli/vault/format.js +104 -0
- package/dist/cli/vault/hostCredentials.d.ts +21 -0
- package/dist/cli/vault/hostCredentials.js +71 -0
- package/dist/cli/vault/hostSupersessions.d.ts +18 -0
- package/dist/cli/vault/hostSupersessions.js +68 -0
- package/dist/cli/vault/import.d.ts +3 -0
- package/dist/cli/vault/import.js +79 -0
- package/dist/cli/vault/index.d.ts +14 -0
- package/dist/cli/vault/index.js +225 -0
- package/dist/cli/vault/keys.d.ts +5 -0
- package/dist/cli/vault/keys.js +165 -0
- package/dist/cli/vault/kms.d.ts +6 -0
- package/dist/cli/vault/kms.js +169 -0
- package/dist/cli/vault/list.d.ts +13 -0
- package/dist/cli/vault/list.js +60 -0
- package/dist/cli/vault/listView.d.ts +21 -0
- package/dist/cli/vault/listView.js +123 -0
- package/dist/cli/vault/managementMetadata.d.ts +2 -0
- package/dist/cli/vault/managementMetadata.js +23 -0
- package/dist/cli/vault/mutations.d.ts +8 -0
- package/dist/cli/vault/mutations.js +151 -0
- package/dist/cli/vault/otp.d.ts +6 -0
- package/dist/cli/vault/otp.js +62 -0
- package/dist/cli/vault/otpIntent.d.ts +23 -0
- package/dist/cli/vault/otpIntent.js +76 -0
- package/dist/cli/vault/passImport.d.ts +25 -0
- package/dist/cli/vault/passImport.js +129 -0
- package/dist/cli/vault/passOtp.d.ts +51 -0
- package/dist/cli/vault/passOtp.js +101 -0
- package/dist/cli/vault/passStore.d.ts +26 -0
- package/dist/cli/vault/passStore.js +134 -0
- package/dist/cli/vault/passwordCommand.d.ts +39 -0
- package/dist/cli/vault/passwordCommand.js +101 -0
- package/dist/cli/vault/passwordProbe.d.ts +27 -0
- package/dist/cli/vault/passwordProbe.js +282 -0
- package/dist/cli/vault/passwordRotation.d.ts +9 -0
- package/dist/cli/vault/passwordRotation.js +273 -0
- package/dist/cli/vault/rotationApi.d.ts +13 -0
- package/dist/cli/vault/rotationApi.js +58 -0
- package/dist/cli/vault/rotationCommand.d.ts +2 -0
- package/dist/cli/vault/rotationCommand.js +75 -0
- package/dist/cli/vault/rotationEngine.d.ts +19 -0
- package/dist/cli/vault/rotationEngine.js +65 -0
- package/dist/cli/vault/rotationHelperSource.d.ts +2 -0
- package/dist/cli/vault/rotationHelperSource.js +3 -0
- package/dist/cli/vault/rotationInput.d.ts +11 -0
- package/dist/cli/vault/rotationInput.js +48 -0
- package/dist/cli/vault/rotationJournal.d.ts +16 -0
- package/dist/cli/vault/rotationJournal.js +183 -0
- package/dist/cli/vault/rotationKeys.d.ts +4 -0
- package/dist/cli/vault/rotationKeys.js +48 -0
- package/dist/cli/vault/rotationPrepare.d.ts +17 -0
- package/dist/cli/vault/rotationPrepare.js +108 -0
- package/dist/cli/vault/rotationRemote.d.ts +33 -0
- package/dist/cli/vault/rotationRemote.js +156 -0
- package/dist/cli/vault/rotationState.d.ts +42 -0
- package/dist/cli/vault/rotationState.js +115 -0
- package/dist/cli/vault/rotationTransport.d.ts +18 -0
- package/dist/cli/vault/rotationTransport.js +71 -0
- package/dist/cli/vault/sshSource.d.ts +18 -0
- package/dist/cli/vault/sshSource.js +196 -0
- package/dist/cli/vault/sshSync.d.ts +17 -0
- package/dist/cli/vault/sshSync.js +224 -0
- package/dist/cli/vault/sshTransfer.d.ts +22 -0
- package/dist/cli/vault/sshTransfer.js +140 -0
- package/dist/cli/vault/terraformState.d.ts +66 -0
- package/dist/cli/vault/terraformState.js +252 -0
- package/dist/cli/vault/terraformStateCommand.d.ts +2 -0
- package/dist/cli/vault/terraformStateCommand.js +61 -0
- package/dist/cli/vault/tree.d.ts +43 -0
- package/dist/cli/vault/tree.js +292 -0
- package/dist/cli/version.d.ts +1 -0
- package/dist/cli/version.js +9 -0
- package/dist/cli/workflow/index.d.ts +76 -0
- package/dist/cli/workflow/index.js +826 -0
- package/dist/cli/workflow/validate.d.ts +19 -0
- package/dist/cli/workflow/validate.js +353 -0
- package/dist/package.json +1 -0
- package/package.json +28 -10
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
import { type DreamlakeOpts } from "../compat/ctx.js";
|
|
3
|
+
export interface PageStatus {
|
|
4
|
+
workspace_id: string;
|
|
5
|
+
running: boolean;
|
|
6
|
+
page_url: string;
|
|
7
|
+
recent_errors?: unknown[];
|
|
8
|
+
dev_log_tail?: string;
|
|
9
|
+
}
|
|
10
|
+
/** One relayed SSE event. `data` is whatever the server sent, parsed if JSON. */
|
|
11
|
+
export interface PageEvent {
|
|
12
|
+
event: string;
|
|
13
|
+
data: any;
|
|
14
|
+
}
|
|
15
|
+
export interface PageGenerateOpts extends DreamlakeOpts {
|
|
16
|
+
description?: string;
|
|
17
|
+
skills?: string;
|
|
18
|
+
maxTurns?: string;
|
|
19
|
+
systemPrompt?: string;
|
|
20
|
+
json?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface PageEditOpts extends DreamlakeOpts {
|
|
23
|
+
workspaceId?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
json?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface PageStatusOpts extends DreamlakeOpts {
|
|
28
|
+
workspaceId?: string;
|
|
29
|
+
json?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface PageDeleteOpts extends DreamlakeOpts {
|
|
32
|
+
workspaceId?: string;
|
|
33
|
+
yes?: boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Parse an SSE byte stream into events.
|
|
37
|
+
*
|
|
38
|
+
* Hand-rolled rather than using an EventSource client because this is a POST
|
|
39
|
+
* with a body, and EventSource only does GET.
|
|
40
|
+
*
|
|
41
|
+
* Lines starting with ':' are comments — the server's `: connected` greeting and
|
|
42
|
+
* its keepalive pings — and carry no event.
|
|
43
|
+
*/
|
|
44
|
+
export declare function parseSse(body: ReadableStream<Uint8Array>): AsyncGenerator<PageEvent>;
|
|
45
|
+
/**
|
|
46
|
+
* Translate `--skills` into what the API expects.
|
|
47
|
+
*
|
|
48
|
+
* Omitted leaves the upstream default alone; `none` disables skills entirely
|
|
49
|
+
* (a JSON null, which is meaningfully different from omitting the field).
|
|
50
|
+
*/
|
|
51
|
+
export declare function parseSkills(v?: string): string[] | string | null | undefined;
|
|
52
|
+
/** Human label for a tool call. Falls back to the bare name when detail is empty. */
|
|
53
|
+
export declare function describeTool(name: string, detail?: string): string;
|
|
54
|
+
export declare function runDreamlakePageGenerate(opts?: PageGenerateOpts): Promise<number>;
|
|
55
|
+
export declare function runDreamlakePageEdit(opts?: PageEditOpts): Promise<number>;
|
|
56
|
+
export declare function runDreamlakePageStatus(opts?: PageStatusOpts): Promise<number>;
|
|
57
|
+
export declare function runDreamlakePageDelete(opts?: PageDeleteOpts): Promise<number>;
|
|
58
|
+
export declare function registerPageCommand(program: Command): void;
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
// `dreamlake page ...` — drive the page agent through dreamlake-server.
|
|
2
|
+
//
|
|
3
|
+
// Pages are generated review/labeling UIs. Each one runs in its own container
|
|
4
|
+
// behind a vite dev server, so an edit applies over HMR: there is no build step
|
|
5
|
+
// and the page URL never changes.
|
|
6
|
+
//
|
|
7
|
+
// page generate --description <text> (SSE, streams progress)
|
|
8
|
+
// page edit --workspace-id <id> --description <text> (SSE, streams progress)
|
|
9
|
+
// page status --workspace-id <id>
|
|
10
|
+
// page delete --workspace-id <id>
|
|
11
|
+
//
|
|
12
|
+
// Generating takes 60-120 s and editing 30-100 s, so progress is rendered as
|
|
13
|
+
// events arrive rather than after a final payload. Progress goes to stderr and
|
|
14
|
+
// only the outcome to stdout, so piping stdout stays useful.
|
|
15
|
+
import { HttpError } from "../client.js";
|
|
16
|
+
import { emitJson, fail, ok, warn } from "../helpers.js";
|
|
17
|
+
import { resolveCtx } from "../compat/ctx.js";
|
|
18
|
+
import { withConnFlags } from "../compat/flags.js";
|
|
19
|
+
import { requireToken } from "../compat/http.js";
|
|
20
|
+
import { confirm } from "../prompt.js";
|
|
21
|
+
// ─── helpers ─────────────────────────────────────────────────────────────────
|
|
22
|
+
/**
|
|
23
|
+
* Parse an SSE byte stream into events.
|
|
24
|
+
*
|
|
25
|
+
* Hand-rolled rather than using an EventSource client because this is a POST
|
|
26
|
+
* with a body, and EventSource only does GET.
|
|
27
|
+
*
|
|
28
|
+
* Lines starting with ':' are comments — the server's `: connected` greeting and
|
|
29
|
+
* its keepalive pings — and carry no event.
|
|
30
|
+
*/
|
|
31
|
+
export async function* parseSse(body) {
|
|
32
|
+
const reader = body.getReader();
|
|
33
|
+
const decoder = new TextDecoder();
|
|
34
|
+
let buf = "";
|
|
35
|
+
let eventType = "";
|
|
36
|
+
let dataLines = [];
|
|
37
|
+
try {
|
|
38
|
+
for (;;) {
|
|
39
|
+
const { done, value } = await reader.read();
|
|
40
|
+
if (done)
|
|
41
|
+
break;
|
|
42
|
+
buf += decoder.decode(value, { stream: true });
|
|
43
|
+
let nl;
|
|
44
|
+
while ((nl = buf.indexOf("\n")) !== -1) {
|
|
45
|
+
const line = buf.slice(0, nl).replace(/\r$/, "");
|
|
46
|
+
buf = buf.slice(nl + 1);
|
|
47
|
+
if (line === "") {
|
|
48
|
+
if (eventType) {
|
|
49
|
+
const raw = dataLines.join("\n");
|
|
50
|
+
let data = raw;
|
|
51
|
+
try {
|
|
52
|
+
data = raw ? JSON.parse(raw) : null;
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
/* keep the raw text */
|
|
56
|
+
}
|
|
57
|
+
yield { event: eventType, data };
|
|
58
|
+
}
|
|
59
|
+
eventType = "";
|
|
60
|
+
dataLines = [];
|
|
61
|
+
}
|
|
62
|
+
else if (line.startsWith(":")) {
|
|
63
|
+
// comment / keepalive
|
|
64
|
+
}
|
|
65
|
+
else if (line.startsWith("event:")) {
|
|
66
|
+
eventType = line.slice(6).trim();
|
|
67
|
+
}
|
|
68
|
+
else if (line.startsWith("data:")) {
|
|
69
|
+
dataLines.push(line.slice(5).replace(/^ /, ""));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
finally {
|
|
75
|
+
await reader.cancel().catch(() => { });
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Translate `--skills` into what the API expects.
|
|
80
|
+
*
|
|
81
|
+
* Omitted leaves the upstream default alone; `none` disables skills entirely
|
|
82
|
+
* (a JSON null, which is meaningfully different from omitting the field).
|
|
83
|
+
*/
|
|
84
|
+
export function parseSkills(v) {
|
|
85
|
+
if (v === undefined)
|
|
86
|
+
return undefined;
|
|
87
|
+
const t = v.trim();
|
|
88
|
+
if (t === "none")
|
|
89
|
+
return null;
|
|
90
|
+
if (t === "all")
|
|
91
|
+
return "all";
|
|
92
|
+
return t.split(",").map((s) => s.trim()).filter(Boolean);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* POST to one of the SSE endpoints and render progress as events arrive.
|
|
96
|
+
*
|
|
97
|
+
* Generate and edit differ only in URL, body, and what they print at the end,
|
|
98
|
+
* so the streaming, error mapping, and terminal-event handling live here.
|
|
99
|
+
* Returns null once it has reported a failure, so callers just exit 1.
|
|
100
|
+
*/
|
|
101
|
+
async function streamPageRun(url, token, body, opts, onStart) {
|
|
102
|
+
let res;
|
|
103
|
+
try {
|
|
104
|
+
res = await fetch(url, {
|
|
105
|
+
method: "POST",
|
|
106
|
+
headers: {
|
|
107
|
+
"Content-Type": "application/json",
|
|
108
|
+
Accept: "text/event-stream",
|
|
109
|
+
Authorization: `Bearer ${token}`,
|
|
110
|
+
},
|
|
111
|
+
body: JSON.stringify(body),
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
catch (e) {
|
|
115
|
+
fail(`request failed: ${e.message}`);
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
if (!res.ok) {
|
|
119
|
+
const text = await res.text().catch(() => "");
|
|
120
|
+
// 409 is not a transport problem: someone else is mid-edit on this page.
|
|
121
|
+
// Say so rather than inviting a retry that would only fail again.
|
|
122
|
+
if (res.status === 409) {
|
|
123
|
+
fail("that page is already being edited — wait for that edit to finish");
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
fail(new HttpError(res.status, text).message);
|
|
127
|
+
}
|
|
128
|
+
return null;
|
|
129
|
+
}
|
|
130
|
+
if (!res.body) {
|
|
131
|
+
fail("server returned no stream");
|
|
132
|
+
return null;
|
|
133
|
+
}
|
|
134
|
+
const collected = [];
|
|
135
|
+
let result = null;
|
|
136
|
+
let streamError = null;
|
|
137
|
+
const started = Date.now();
|
|
138
|
+
for await (const ev of parseSse(res.body)) {
|
|
139
|
+
// Always announced, in both modes: on generate this carries the page URL,
|
|
140
|
+
// and it arrives long before the page is finished. onStart writes to
|
|
141
|
+
// stderr, so --json output on stdout stays pure.
|
|
142
|
+
if (ev.event === "start")
|
|
143
|
+
onStart?.(ev.data);
|
|
144
|
+
if (opts.json) {
|
|
145
|
+
collected.push(ev);
|
|
146
|
+
}
|
|
147
|
+
else if (ev.event === "tool") {
|
|
148
|
+
const secs = ((Date.now() - started) / 1000).toFixed(0);
|
|
149
|
+
process.stderr.write(` ${secs.padStart(4)}s ${describeTool(ev.data?.name, ev.data?.detail)}\n`);
|
|
150
|
+
}
|
|
151
|
+
else if (ev.event === "text") {
|
|
152
|
+
const text = String(ev.data?.text ?? "").trim();
|
|
153
|
+
if (text)
|
|
154
|
+
process.stderr.write(`\n${text}\n\n`);
|
|
155
|
+
}
|
|
156
|
+
// Terminal events are recorded whatever the output mode. Anything else is
|
|
157
|
+
// ignored, so the server can add event types without breaking older CLIs.
|
|
158
|
+
if (ev.event === "result")
|
|
159
|
+
result = ev.data;
|
|
160
|
+
if (ev.event === "error")
|
|
161
|
+
streamError = String(ev.data?.message ?? "stream failed");
|
|
162
|
+
}
|
|
163
|
+
if (opts.json)
|
|
164
|
+
emitJson(collected);
|
|
165
|
+
if (streamError) {
|
|
166
|
+
if (!opts.json)
|
|
167
|
+
fail(streamError);
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
if (!result) {
|
|
171
|
+
if (!opts.json) {
|
|
172
|
+
fail("stream ended without a result — it may still be running server-side");
|
|
173
|
+
}
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
if (result.is_error) {
|
|
177
|
+
// The agent ran but reported failure; its text explains what is still broken.
|
|
178
|
+
if (!opts.json) {
|
|
179
|
+
if (result.text)
|
|
180
|
+
process.stderr.write(`\n${String(result.text).trim()}\n\n`);
|
|
181
|
+
fail("the agent could not complete this run");
|
|
182
|
+
}
|
|
183
|
+
return null;
|
|
184
|
+
}
|
|
185
|
+
return { result, events: collected };
|
|
186
|
+
}
|
|
187
|
+
/** Human label for a tool call. Falls back to the bare name when detail is empty. */
|
|
188
|
+
export function describeTool(name, detail) {
|
|
189
|
+
const short = (name ?? "").replace(/^mcp__dlpage__/, "");
|
|
190
|
+
const labels = {
|
|
191
|
+
container_exec: "run",
|
|
192
|
+
read_dev_log: "check compile errors",
|
|
193
|
+
read_page_errors: "check runtime errors",
|
|
194
|
+
};
|
|
195
|
+
const label = labels[short] ?? short;
|
|
196
|
+
return detail ? `${label} ${detail}` : label;
|
|
197
|
+
}
|
|
198
|
+
// ─── page generate ───────────────────────────────────────────────────────────
|
|
199
|
+
export async function runDreamlakePageGenerate(opts = {}) {
|
|
200
|
+
if (!opts.description) {
|
|
201
|
+
fail("--description is required");
|
|
202
|
+
return 1;
|
|
203
|
+
}
|
|
204
|
+
let maxTurns;
|
|
205
|
+
if (opts.maxTurns !== undefined) {
|
|
206
|
+
maxTurns = Number(opts.maxTurns);
|
|
207
|
+
if (!Number.isInteger(maxTurns) || maxTurns < 1) {
|
|
208
|
+
fail("--max-turns must be a positive integer");
|
|
209
|
+
return 1;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
const ctx = resolveCtx(opts);
|
|
213
|
+
const token = requireToken(ctx);
|
|
214
|
+
if (!token)
|
|
215
|
+
return 1;
|
|
216
|
+
// Only send what was asked for: the server has its own defaults, and an
|
|
217
|
+
// explicit undefined would serialize away anyway.
|
|
218
|
+
const body = { prompt: opts.description };
|
|
219
|
+
const skills = parseSkills(opts.skills);
|
|
220
|
+
if (skills !== undefined)
|
|
221
|
+
body.skills = skills;
|
|
222
|
+
if (maxTurns !== undefined)
|
|
223
|
+
body.max_turns = maxTurns;
|
|
224
|
+
if (opts.systemPrompt !== undefined)
|
|
225
|
+
body.system_prompt = opts.systemPrompt;
|
|
226
|
+
const outcome = await streamPageRun(`${ctx.remote}/pages/generate/stream`, token, body, opts,
|
|
227
|
+
// The URL is known before the agent starts working, so print it now — the
|
|
228
|
+
// page can be opened and watched while it is still being built.
|
|
229
|
+
(data) => {
|
|
230
|
+
const id = data?.workspace_id ?? "?";
|
|
231
|
+
process.stderr.write(` page ${id}\n ${data?.page_url ?? ""}\n\n`);
|
|
232
|
+
});
|
|
233
|
+
if (!outcome)
|
|
234
|
+
return 1;
|
|
235
|
+
if (!opts.json) {
|
|
236
|
+
ok(`generated in ${outcome.result.num_turns ?? "?"} turns`);
|
|
237
|
+
process.stdout.write(`${outcome.result.workspace_id ?? ""}\n`);
|
|
238
|
+
process.stdout.write(`${outcome.result.page_url ?? ""}\n`);
|
|
239
|
+
}
|
|
240
|
+
return 0;
|
|
241
|
+
}
|
|
242
|
+
// ─── page edit ───────────────────────────────────────────────────────────────
|
|
243
|
+
export async function runDreamlakePageEdit(opts = {}) {
|
|
244
|
+
// Commander enforces these with requiredOption; checked again because the
|
|
245
|
+
// function is also called directly (tests, and any future programmatic use).
|
|
246
|
+
if (!opts.workspaceId) {
|
|
247
|
+
fail("--workspace-id is required");
|
|
248
|
+
return 1;
|
|
249
|
+
}
|
|
250
|
+
if (!opts.description) {
|
|
251
|
+
fail("--description is required");
|
|
252
|
+
return 1;
|
|
253
|
+
}
|
|
254
|
+
const ctx = resolveCtx(opts);
|
|
255
|
+
const token = requireToken(ctx);
|
|
256
|
+
if (!token)
|
|
257
|
+
return 1;
|
|
258
|
+
const outcome = await streamPageRun(`${ctx.remote}/pages/${encodeURIComponent(opts.workspaceId)}/edit/stream`, token, { prompt: opts.description }, opts);
|
|
259
|
+
if (!outcome)
|
|
260
|
+
return 1;
|
|
261
|
+
if (!opts.json) {
|
|
262
|
+
ok(`edited in ${outcome.result.num_turns ?? "?"} turns → ${outcome.result.page_url ?? ""}`);
|
|
263
|
+
}
|
|
264
|
+
return 0;
|
|
265
|
+
}
|
|
266
|
+
// ─── page status ─────────────────────────────────────────────────────────────
|
|
267
|
+
export async function runDreamlakePageStatus(opts = {}) {
|
|
268
|
+
if (!opts.workspaceId) {
|
|
269
|
+
fail("--workspace-id is required");
|
|
270
|
+
return 1;
|
|
271
|
+
}
|
|
272
|
+
const ctx = resolveCtx(opts);
|
|
273
|
+
const token = requireToken(ctx);
|
|
274
|
+
if (!token)
|
|
275
|
+
return 1;
|
|
276
|
+
const url = `${ctx.remote}/pages/${encodeURIComponent(opts.workspaceId)}/status`;
|
|
277
|
+
let res;
|
|
278
|
+
try {
|
|
279
|
+
res = await fetch(url, { headers: { Authorization: `Bearer ${token}` } });
|
|
280
|
+
}
|
|
281
|
+
catch (e) {
|
|
282
|
+
fail(`request failed: ${e.message}`);
|
|
283
|
+
return 1;
|
|
284
|
+
}
|
|
285
|
+
if (!res.ok) {
|
|
286
|
+
const text = await res.text().catch(() => "");
|
|
287
|
+
fail(new HttpError(res.status, text).message);
|
|
288
|
+
return 1;
|
|
289
|
+
}
|
|
290
|
+
const status = (await res.json());
|
|
291
|
+
if (opts.json) {
|
|
292
|
+
emitJson(status);
|
|
293
|
+
return 0;
|
|
294
|
+
}
|
|
295
|
+
// `running: false` is normal, not an error: containers stop after 30 minutes
|
|
296
|
+
// idle and wake on the next request in about two seconds.
|
|
297
|
+
ok(`${status.workspace_id} ${status.running ? "running" : "stopped (wakes on next request)"}`);
|
|
298
|
+
process.stdout.write(` ${status.page_url}\n`);
|
|
299
|
+
const errs = status.recent_errors ?? [];
|
|
300
|
+
if (errs.length)
|
|
301
|
+
warn(`${errs.length} recent browser error(s) — pass --json to inspect`);
|
|
302
|
+
return 0;
|
|
303
|
+
}
|
|
304
|
+
// ─── page delete ─────────────────────────────────────────────────────────────
|
|
305
|
+
export async function runDreamlakePageDelete(opts = {}) {
|
|
306
|
+
if (!opts.workspaceId) {
|
|
307
|
+
fail("--workspace-id is required");
|
|
308
|
+
return 1;
|
|
309
|
+
}
|
|
310
|
+
if (!opts.yes) {
|
|
311
|
+
// Deleting stops the container and removes the page's files; the URL stops
|
|
312
|
+
// working for anything that has it embedded. There is no undo.
|
|
313
|
+
const proceed = await confirm(`Delete page '${opts.workspaceId}'?`, false);
|
|
314
|
+
if (!proceed) {
|
|
315
|
+
process.stdout.write("Cancelled.\n");
|
|
316
|
+
return 0;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
const ctx = resolveCtx(opts);
|
|
320
|
+
const token = requireToken(ctx);
|
|
321
|
+
if (!token)
|
|
322
|
+
return 1;
|
|
323
|
+
const url = `${ctx.remote}/pages/${encodeURIComponent(opts.workspaceId)}`;
|
|
324
|
+
let res;
|
|
325
|
+
try {
|
|
326
|
+
res = await fetch(url, {
|
|
327
|
+
method: "DELETE",
|
|
328
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
catch (e) {
|
|
332
|
+
fail(`request failed: ${e.message}`);
|
|
333
|
+
return 1;
|
|
334
|
+
}
|
|
335
|
+
if (!res.ok) {
|
|
336
|
+
const text = await res.text().catch(() => "");
|
|
337
|
+
if (res.status === 404) {
|
|
338
|
+
fail(`page '${opts.workspaceId}' not found`);
|
|
339
|
+
return 1;
|
|
340
|
+
}
|
|
341
|
+
fail(new HttpError(res.status, text).message);
|
|
342
|
+
return 1;
|
|
343
|
+
}
|
|
344
|
+
ok(`deleted page ${opts.workspaceId}`);
|
|
345
|
+
return 0;
|
|
346
|
+
}
|
|
347
|
+
// ─── registration ────────────────────────────────────────────────────────────
|
|
348
|
+
export function registerPageCommand(program) {
|
|
349
|
+
const page = program
|
|
350
|
+
.command("page")
|
|
351
|
+
.description("generate, edit, and inspect hosted pages")
|
|
352
|
+
.addHelpText("after", `
|
|
353
|
+
Examples:
|
|
354
|
+
$ dreamlake page generate --description "a review page with a video player and a label form"
|
|
355
|
+
$ dreamlake page status --workspace-id 24f311c966d2
|
|
356
|
+
$ dreamlake page edit --workspace-id 24f311c966d2 --description "make the layout two columns"
|
|
357
|
+
$ dreamlake page delete --workspace-id 24f311c966d2
|
|
358
|
+
|
|
359
|
+
Generating runs for 60-120 s and editing for 30-100 s. Progress is printed to
|
|
360
|
+
stderr while the agent works, and generate prints the page URL as soon as it is
|
|
361
|
+
known, before the page is finished. The page updates live, so there is nothing
|
|
362
|
+
to build or publish afterwards and its URL never changes.`);
|
|
363
|
+
withConnFlags(page
|
|
364
|
+
.command("generate")
|
|
365
|
+
.description("generate a new page from a description; streams progress")
|
|
366
|
+
.requiredOption("--description <text>", "what to build, in plain language")
|
|
367
|
+
.option("--skills <list>", "'all', comma-separated skill names, or 'none'")
|
|
368
|
+
.option("--max-turns <n>", "maximum agent turns (default 40)")
|
|
369
|
+
.option("--system-prompt <text>", "extra system prompt for the agent")
|
|
370
|
+
.option("--json", "emit every relayed event as JSON")).action(async (opts) => process.exit(await runDreamlakePageGenerate(opts)));
|
|
371
|
+
withConnFlags(page
|
|
372
|
+
.command("edit")
|
|
373
|
+
.description("edit a page with a natural-language description; streams progress")
|
|
374
|
+
.requiredOption("--workspace-id <id>", "page id")
|
|
375
|
+
.requiredOption("--description <text>", "what to change, in plain language")
|
|
376
|
+
.option("--json", "emit every relayed event as JSON")).action(async (opts) => process.exit(await runDreamlakePageEdit(opts)));
|
|
377
|
+
withConnFlags(page
|
|
378
|
+
.command("status")
|
|
379
|
+
.description("show a page's container state and recent errors")
|
|
380
|
+
.requiredOption("--workspace-id <id>", "page id")
|
|
381
|
+
.option("--json", "emit raw JSON")).action(async (opts) => process.exit(await runDreamlakePageStatus(opts)));
|
|
382
|
+
withConnFlags(page
|
|
383
|
+
.command("delete")
|
|
384
|
+
.description("delete a page — stops its container and removes its files")
|
|
385
|
+
.requiredOption("--workspace-id <id>", "page id")
|
|
386
|
+
.option("--yes", "skip confirmation prompt")).action(async (opts) => process.exit(await runDreamlakePageDelete(opts)));
|
|
387
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
export declare function runPipelineList(opts: {
|
|
3
|
+
namespace?: string;
|
|
4
|
+
kind?: string;
|
|
5
|
+
json?: boolean;
|
|
6
|
+
}): Promise<number>;
|
|
7
|
+
export declare function runPipelineCreate(name: string, opts: {
|
|
8
|
+
namespace?: string;
|
|
9
|
+
file?: string;
|
|
10
|
+
source?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
tags?: string;
|
|
13
|
+
message?: string;
|
|
14
|
+
kind?: string;
|
|
15
|
+
json?: boolean;
|
|
16
|
+
}): Promise<number>;
|
|
17
|
+
export declare function runPipelineShow(name: string, opts: {
|
|
18
|
+
namespace?: string;
|
|
19
|
+
json?: boolean;
|
|
20
|
+
}): Promise<number>;
|
|
21
|
+
export declare function runPipelineUpdate(name: string, opts: {
|
|
22
|
+
namespace?: string;
|
|
23
|
+
rename?: string;
|
|
24
|
+
file?: string;
|
|
25
|
+
source?: string;
|
|
26
|
+
description?: string;
|
|
27
|
+
tags?: string;
|
|
28
|
+
message?: string;
|
|
29
|
+
json?: boolean;
|
|
30
|
+
}): Promise<number>;
|
|
31
|
+
export declare function runPipelineDelete(name: string, opts: {
|
|
32
|
+
namespace?: string;
|
|
33
|
+
yes?: boolean;
|
|
34
|
+
}): Promise<number>;
|
|
35
|
+
export declare function runVersionList(name: string, opts: {
|
|
36
|
+
namespace?: string;
|
|
37
|
+
json?: boolean;
|
|
38
|
+
}): Promise<number>;
|
|
39
|
+
export declare function runVersionShow(name: string, hash: string, opts: {
|
|
40
|
+
namespace?: string;
|
|
41
|
+
json?: boolean;
|
|
42
|
+
}): Promise<number>;
|
|
43
|
+
export declare function runNodeList(name: string, hash: string, opts: {
|
|
44
|
+
namespace?: string;
|
|
45
|
+
json?: boolean;
|
|
46
|
+
}): Promise<number>;
|
|
47
|
+
export declare function runNodeShow(name: string, hash: string, nodeId: string, opts: {
|
|
48
|
+
namespace?: string;
|
|
49
|
+
json?: boolean;
|
|
50
|
+
}): Promise<number>;
|
|
51
|
+
export declare function runNodeState(name: string, hash: string, nodeId: string, opts: {
|
|
52
|
+
namespace?: string;
|
|
53
|
+
status: string;
|
|
54
|
+
error?: string;
|
|
55
|
+
artifacts?: string;
|
|
56
|
+
startedAt?: string;
|
|
57
|
+
endedAt?: string;
|
|
58
|
+
}): Promise<number>;
|
|
59
|
+
export declare function runWorkspaceUpload(opts: {
|
|
60
|
+
workspaceId: string;
|
|
61
|
+
dist: string;
|
|
62
|
+
source?: string;
|
|
63
|
+
json?: boolean;
|
|
64
|
+
}): Promise<number>;
|
|
65
|
+
export declare function runWorkspaceHost(opts: {
|
|
66
|
+
dist: string;
|
|
67
|
+
json?: boolean;
|
|
68
|
+
}): Promise<number>;
|
|
69
|
+
export declare function registerPipelineCommand(program: Command): void;
|