@dreamlake/dreamlake-cli 0.88.0 → 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,44 @@
|
|
|
1
|
+
// Versioned, stdlib-only adapter. Its bytes are part of the ordinary tracked-run
|
|
2
|
+
// manifest/fingerprint: editing it must never silently recover an older request.
|
|
3
|
+
export const UDF_WORKER = String.raw `import contextlib
|
|
4
|
+
import hashlib
|
|
5
|
+
import inspect
|
|
6
|
+
import json
|
|
7
|
+
import os
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
import platform
|
|
10
|
+
import socket
|
|
11
|
+
import sys
|
|
12
|
+
|
|
13
|
+
binding = json.loads(sys.argv[1])
|
|
14
|
+
inputs = json.loads(sys.argv[2])
|
|
15
|
+
report = {"protocol": "dreamlake-registered-udf-v1",
|
|
16
|
+
"bindingDigest": hashlib.sha256(sys.argv[1].encode("utf-8")).hexdigest(),
|
|
17
|
+
"worker": {"hostname": socket.gethostname(), "pid": os.getpid()},
|
|
18
|
+
"runtime": {"implementation": platform.python_implementation(),
|
|
19
|
+
"pythonVersion": platform.python_version(), "executable": sys.executable}}
|
|
20
|
+
try:
|
|
21
|
+
source = Path(binding["delivery"]["path"]).read_bytes()
|
|
22
|
+
digest = hashlib.sha256(source).hexdigest()
|
|
23
|
+
if digest != binding["codeDigest"]:
|
|
24
|
+
raise ValueError("registered source digest mismatch")
|
|
25
|
+
report["verifiedCodeDigest"] = digest
|
|
26
|
+
module, function = binding["entrypoint"].split(":")
|
|
27
|
+
scope = {"__name__": module, "__file__": binding["sourceFile"],
|
|
28
|
+
"__package__": module.rpartition(".")[0]}
|
|
29
|
+
with contextlib.redirect_stdout(sys.stderr):
|
|
30
|
+
exec(compile(source, binding["sourceFile"], "exec"), scope)
|
|
31
|
+
result = scope[function](*inputs["args"], **inputs["kwargs"])
|
|
32
|
+
if inspect.isawaitable(result) or inspect.isgenerator(result) or inspect.isasyncgen(result):
|
|
33
|
+
raise TypeError("this bridge accepts synchronous JSON-returning UDFs only")
|
|
34
|
+
report.update({"status": "succeeded", "result": result})
|
|
35
|
+
encoded = json.dumps(report, ensure_ascii=True, allow_nan=False)
|
|
36
|
+
if len(encoded.encode("utf-8")) > 131072:
|
|
37
|
+
raise ValueError("UDF result exceeds 128 KiB")
|
|
38
|
+
except BaseException as error:
|
|
39
|
+
report.pop("result", None)
|
|
40
|
+
report.update({"status": "failed", "error": {"type": type(error).__name__, "message": str(error)[:4096]}})
|
|
41
|
+
encoded = json.dumps(report, ensure_ascii=True, allow_nan=False)
|
|
42
|
+
print("DREAMLAKE_UDF_V1 " + encoded, flush=True)
|
|
43
|
+
sys.exit(0 if report["status"] == "succeeded" else 1)
|
|
44
|
+
`;
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://docs.dreamlake.ai/workflows/workflow-spec.schema.json",
|
|
4
|
+
"title": "DreamLake WorkflowSpec v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["version", "name", "stages", "nodes", "edges"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"version": { "const": 1 },
|
|
10
|
+
"name": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]{0,63}$" },
|
|
11
|
+
"description": { "type": "string", "maxLength": 2000 },
|
|
12
|
+
"stages": {
|
|
13
|
+
"type": "array", "minItems": 1, "maxItems": 32,
|
|
14
|
+
"items": { "$ref": "#/$defs/stage" }
|
|
15
|
+
},
|
|
16
|
+
"nodes": {
|
|
17
|
+
"type": "array", "maxItems": 200,
|
|
18
|
+
"items": { "$ref": "#/$defs/node" }
|
|
19
|
+
},
|
|
20
|
+
"edges": {
|
|
21
|
+
"type": "array", "maxItems": 400,
|
|
22
|
+
"items": { "$ref": "#/$defs/edge" }
|
|
23
|
+
},
|
|
24
|
+
"defaults": {
|
|
25
|
+
"type": "object", "additionalProperties": false,
|
|
26
|
+
"properties": {
|
|
27
|
+
"model": { "type": "string" },
|
|
28
|
+
"provider": { "type": "string" },
|
|
29
|
+
"queue": { "type": "string" }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"$defs": {
|
|
34
|
+
"id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]{0,63}$" },
|
|
35
|
+
"portName": { "type": "string", "pattern": "^[a-z0-9][a-z0-9_-]{0,31}$" },
|
|
36
|
+
"duration": { "type": "string", "pattern": "^[0-9]+(ms|s|m|h)$" },
|
|
37
|
+
"dataType": {
|
|
38
|
+
"enum": ["artifact", "file", "directory", "table", "dataset", "model", "metrics", "samples"]
|
|
39
|
+
},
|
|
40
|
+
"collectionType": { "enum": ["samples", "table", "directory"] },
|
|
41
|
+
"permission": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"pattern": "^[a-z][a-z0-9_-]*\\.[a-z][a-z0-9_-]*\\.[a-z][a-z0-9_-]*(:[A-Za-z0-9@/_.*-]+)?$",
|
|
44
|
+
"description": "domain.resource.verb[:scope] — verbs read|create|update|delete + registered custom verbs (release, run, submit, consume). Tool access goes in uda.tools, never here."
|
|
45
|
+
},
|
|
46
|
+
"port": {
|
|
47
|
+
"type": "object", "required": ["name", "type"], "additionalProperties": false,
|
|
48
|
+
"properties": {
|
|
49
|
+
"name": { "$ref": "#/$defs/portName" },
|
|
50
|
+
"type": { "$ref": "#/$defs/dataType" },
|
|
51
|
+
"collect": { "type": "boolean", "description": "input ports only — accept >=1 same-type edges as an ordered collection" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"stage": {
|
|
55
|
+
"type": "object", "required": ["id", "title"], "additionalProperties": false,
|
|
56
|
+
"properties": {
|
|
57
|
+
"id": { "$ref": "#/$defs/id" },
|
|
58
|
+
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
59
|
+
"detail": { "type": "string", "maxLength": 2000 }
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"providerRef": {
|
|
63
|
+
"type": "object", "additionalProperties": false,
|
|
64
|
+
"properties": {
|
|
65
|
+
"provider": { "type": "string" },
|
|
66
|
+
"launcher": { "enum": ["SSH", "SLURM", "EC2", "GCE", "Kube"] },
|
|
67
|
+
"kwargs": { "type": "object" },
|
|
68
|
+
"instance_type": { "type": "string" },
|
|
69
|
+
"image_id": { "type": "string" },
|
|
70
|
+
"image": { "type": "string" },
|
|
71
|
+
"partition": { "type": "string" },
|
|
72
|
+
"time_limit": { "type": "string" },
|
|
73
|
+
"resources": {
|
|
74
|
+
"type": "object", "additionalProperties": false,
|
|
75
|
+
"properties": {
|
|
76
|
+
"cpu": { "type": "integer", "minimum": 0 },
|
|
77
|
+
"gpu": { "type": "integer", "minimum": 0 },
|
|
78
|
+
"mem": { "type": "string" }
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"runner": { "enum": ["process", "docker"] },
|
|
82
|
+
"dispatch": { "enum": ["direct", "daemon"] }
|
|
83
|
+
},
|
|
84
|
+
"not": { "required": ["provider", "launcher"] }
|
|
85
|
+
},
|
|
86
|
+
"outputBinding": {
|
|
87
|
+
"type": "object", "required": ["kind", "pathTemplate"], "additionalProperties": false,
|
|
88
|
+
"properties": {
|
|
89
|
+
"kind": { "enum": ["dataset", "artifact", "node", "bindr"] },
|
|
90
|
+
"project": { "type": "string" },
|
|
91
|
+
"pathTemplate": { "type": "string", "maxLength": 256 }
|
|
92
|
+
},
|
|
93
|
+
"if": { "properties": { "kind": { "enum": ["dataset", "node", "bindr"] } } },
|
|
94
|
+
"then": { "required": ["kind", "pathTemplate", "project"] }
|
|
95
|
+
},
|
|
96
|
+
"retryPolicy": {
|
|
97
|
+
"type": "object", "required": ["max_attempts"], "additionalProperties": false,
|
|
98
|
+
"properties": {
|
|
99
|
+
"max_attempts": { "type": "integer", "minimum": 1, "maximum": 10 },
|
|
100
|
+
"retry_on": { "enum": ["all", "transient"] },
|
|
101
|
+
"backoff": {
|
|
102
|
+
"type": "object", "additionalProperties": false,
|
|
103
|
+
"properties": {
|
|
104
|
+
"initial": { "$ref": "#/$defs/duration" },
|
|
105
|
+
"factor": { "type": "number", "minimum": 1 },
|
|
106
|
+
"max": { "$ref": "#/$defs/duration" }
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"executionCompute": {
|
|
112
|
+
"type": "object", "additionalProperties": false,
|
|
113
|
+
"properties": {
|
|
114
|
+
"retry": { "$ref": "#/$defs/retryPolicy" },
|
|
115
|
+
"timeout": { "$ref": "#/$defs/duration" },
|
|
116
|
+
"cache": {
|
|
117
|
+
"type": "object", "required": ["enabled"], "additionalProperties": false,
|
|
118
|
+
"properties": {
|
|
119
|
+
"enabled": { "type": "boolean" },
|
|
120
|
+
"version": { "type": "string", "maxLength": 64 }
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"executionUda": {
|
|
126
|
+
"type": "object", "additionalProperties": false,
|
|
127
|
+
"description": "cache is FORBIDDEN on uda — agent runs are non-deterministic",
|
|
128
|
+
"properties": {
|
|
129
|
+
"retry": { "$ref": "#/$defs/retryPolicy" },
|
|
130
|
+
"timeout": { "$ref": "#/$defs/duration" }
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"nodeCommon": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"required": ["id", "kind", "stageId", "title"],
|
|
136
|
+
"properties": {
|
|
137
|
+
"id": { "$ref": "#/$defs/id" },
|
|
138
|
+
"stageId": { "$ref": "#/$defs/id" },
|
|
139
|
+
"title": { "type": "string", "minLength": 1, "maxLength": 120 },
|
|
140
|
+
"detail": { "type": "string", "maxLength": 2000 },
|
|
141
|
+
"inputs": { "type": "array", "maxItems": 8, "items": { "$ref": "#/$defs/port" } },
|
|
142
|
+
"outputs": { "type": "array", "maxItems": 8, "items": { "$ref": "#/$defs/port" } },
|
|
143
|
+
"outputBinding": { "$ref": "#/$defs/outputBinding" }
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"node": {
|
|
147
|
+
"allOf": [{ "$ref": "#/$defs/nodeCommon" }],
|
|
148
|
+
"oneOf": [
|
|
149
|
+
{ "$ref": "#/$defs/computeNode" },
|
|
150
|
+
{ "$ref": "#/$defs/udaNode" },
|
|
151
|
+
{ "$ref": "#/$defs/samplerNode" },
|
|
152
|
+
{ "$ref": "#/$defs/controlNode" }
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
"computeNode": {
|
|
156
|
+
"type": "object", "required": ["kind", "compute"],
|
|
157
|
+
"properties": {
|
|
158
|
+
"kind": { "const": "compute" },
|
|
159
|
+
"compute": {
|
|
160
|
+
"type": "object", "required": ["udf"], "additionalProperties": false,
|
|
161
|
+
"properties": {
|
|
162
|
+
"udf": { "type": "string", "pattern": "^[a-z0-9_]+(\\.[a-z0-9_]+)+$" },
|
|
163
|
+
"params": { "type": "object", "maxProperties": 64 },
|
|
164
|
+
"provider": { "$ref": "#/$defs/providerRef" },
|
|
165
|
+
"dispatch": { "enum": ["direct", "daemon"] }
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"execution": { "$ref": "#/$defs/executionCompute" }
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"udaNode": {
|
|
172
|
+
"type": "object", "required": ["kind", "uda"],
|
|
173
|
+
"properties": {
|
|
174
|
+
"kind": { "const": "uda" },
|
|
175
|
+
"uda": {
|
|
176
|
+
"type": "object", "required": ["instructions", "permissions"], "additionalProperties": false,
|
|
177
|
+
"properties": {
|
|
178
|
+
"instructions": { "type": "string", "minLength": 1, "maxLength": 8000 },
|
|
179
|
+
"description": { "type": "string", "maxLength": 500 },
|
|
180
|
+
"model": { "type": "string" },
|
|
181
|
+
"tools": { "type": "array", "maxItems": 32, "items": { "type": "string" } },
|
|
182
|
+
"permissions": { "type": "array", "items": { "$ref": "#/$defs/permission" } },
|
|
183
|
+
"max_turns": { "type": "integer", "minimum": 1, "maximum": 1000 },
|
|
184
|
+
"output_schema": { "type": "object" },
|
|
185
|
+
"provider": { "$ref": "#/$defs/providerRef" },
|
|
186
|
+
"queue": { "$ref": "#/$defs/id" }
|
|
187
|
+
},
|
|
188
|
+
"oneOf": [
|
|
189
|
+
{ "required": ["provider"], "not": { "required": ["queue"] } },
|
|
190
|
+
{ "required": ["queue"], "not": { "required": ["provider"] } }
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
"execution": { "$ref": "#/$defs/executionUda" }
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"samplerNode": {
|
|
197
|
+
"type": "object", "required": ["kind", "sampler"],
|
|
198
|
+
"properties": {
|
|
199
|
+
"kind": { "const": "sampler" },
|
|
200
|
+
"inputs": {
|
|
201
|
+
"type": "array", "minItems": 1, "maxItems": 1,
|
|
202
|
+
"items": {
|
|
203
|
+
"type": "object", "required": ["name", "type"],
|
|
204
|
+
"properties": { "type": { "$ref": "#/$defs/collectionType" } }
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"outputs": { "type": "array", "maxItems": 0, "description": "derived — do not declare" },
|
|
208
|
+
"sampler": {
|
|
209
|
+
"oneOf": [
|
|
210
|
+
{
|
|
211
|
+
"type": "object", "required": ["strategy", "fraction"], "additionalProperties": false,
|
|
212
|
+
"properties": {
|
|
213
|
+
"strategy": { "const": "bernoulli" },
|
|
214
|
+
"fraction": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 },
|
|
215
|
+
"min_size": { "type": "integer", "minimum": 1 },
|
|
216
|
+
"seed": { "type": "integer", "minimum": 0, "maximum": 4294967295 }
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"type": "object", "required": ["strategy", "size"], "additionalProperties": false,
|
|
221
|
+
"properties": {
|
|
222
|
+
"strategy": { "const": "random_n" },
|
|
223
|
+
"size": { "type": "integer", "minimum": 1 },
|
|
224
|
+
"with_replacement": { "type": "boolean" },
|
|
225
|
+
"seed": { "type": "integer", "minimum": 0, "maximum": 4294967295 }
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"type": "object", "required": ["strategy", "stratify_by"], "additionalProperties": false,
|
|
230
|
+
"properties": {
|
|
231
|
+
"strategy": { "const": "stratified" },
|
|
232
|
+
"stratify_by": { "type": "string", "minLength": 1 },
|
|
233
|
+
"fraction": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 },
|
|
234
|
+
"fractions": {
|
|
235
|
+
"type": "object", "maxProperties": 256,
|
|
236
|
+
"additionalProperties": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }
|
|
237
|
+
},
|
|
238
|
+
"min_size": { "type": "integer", "minimum": 1 },
|
|
239
|
+
"seed": { "type": "integer", "minimum": 0, "maximum": 4294967295 }
|
|
240
|
+
},
|
|
241
|
+
"oneOf": [
|
|
242
|
+
{ "required": ["fraction"], "not": { "required": ["fractions"] } },
|
|
243
|
+
{ "required": ["fractions"], "not": { "required": ["fraction"] } }
|
|
244
|
+
]
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"type": "object", "required": ["strategy", "size"], "additionalProperties": false,
|
|
248
|
+
"properties": {
|
|
249
|
+
"strategy": { "const": "first_n" },
|
|
250
|
+
"size": { "type": "integer", "minimum": 1 }
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"controlNode": {
|
|
258
|
+
"type": "object", "required": ["kind", "control"],
|
|
259
|
+
"properties": {
|
|
260
|
+
"kind": { "const": "control" },
|
|
261
|
+
"inputs": { "type": "array", "minItems": 1, "maxItems": 1 },
|
|
262
|
+
"outputs": { "type": "array", "maxItems": 0, "description": "derived — do not declare" },
|
|
263
|
+
"control": {
|
|
264
|
+
"oneOf": [
|
|
265
|
+
{
|
|
266
|
+
"type": "object", "required": ["type", "expression"], "additionalProperties": false,
|
|
267
|
+
"properties": {
|
|
268
|
+
"type": { "const": "condition" },
|
|
269
|
+
"expression": { "type": "string", "minLength": 1, "maxLength": 2000 }
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"type": "object", "required": ["type", "cases"], "additionalProperties": false,
|
|
274
|
+
"properties": {
|
|
275
|
+
"type": { "const": "switch" },
|
|
276
|
+
"cases": {
|
|
277
|
+
"type": "array", "minItems": 1, "maxItems": 16,
|
|
278
|
+
"items": {
|
|
279
|
+
"type": "object", "required": ["name", "expression"], "additionalProperties": false,
|
|
280
|
+
"properties": {
|
|
281
|
+
"name": {
|
|
282
|
+
"allOf": [
|
|
283
|
+
{ "$ref": "#/$defs/portName" },
|
|
284
|
+
{ "not": { "enum": ["default", "in"] } }
|
|
285
|
+
]
|
|
286
|
+
},
|
|
287
|
+
"expression": { "type": "string", "minLength": 1, "maxLength": 2000 }
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"type": "object", "required": ["type", "mode", "until", "max_iterations"], "additionalProperties": false,
|
|
295
|
+
"properties": {
|
|
296
|
+
"type": { "const": "loop" },
|
|
297
|
+
"mode": { "const": "while" },
|
|
298
|
+
"until": { "type": "string", "minLength": 1, "maxLength": 2000 },
|
|
299
|
+
"max_iterations": { "type": "integer", "minimum": 1, "maximum": 1000 }
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"type": "object", "required": ["type", "mode", "over"], "additionalProperties": false,
|
|
304
|
+
"properties": {
|
|
305
|
+
"type": { "const": "loop" },
|
|
306
|
+
"mode": { "const": "foreach" },
|
|
307
|
+
"over": { "type": "string", "minLength": 1 },
|
|
308
|
+
"max_concurrency": { "type": "integer", "minimum": 1, "maximum": 256 }
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"type": "object", "required": ["type"], "additionalProperties": false,
|
|
313
|
+
"properties": {
|
|
314
|
+
"type": { "const": "approval" },
|
|
315
|
+
"approvers": { "type": "array", "maxItems": 32, "items": { "type": "string" } },
|
|
316
|
+
"message": { "type": "string", "maxLength": 2000 },
|
|
317
|
+
"timeout_s": { "type": "integer", "minimum": 60 }
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
]
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
"edge": {
|
|
325
|
+
"type": "object", "required": ["id", "from", "to"], "additionalProperties": false,
|
|
326
|
+
"properties": {
|
|
327
|
+
"id": { "$ref": "#/$defs/id" },
|
|
328
|
+
"from": { "$ref": "#/$defs/id" },
|
|
329
|
+
"fromPort": { "$ref": "#/$defs/portName" },
|
|
330
|
+
"to": { "$ref": "#/$defs/id" },
|
|
331
|
+
"toPort": { "$ref": "#/$defs/portName" }
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
export { maybeCheckForUpdates } from "./update.js";
|
|
3
|
+
export declare function registerInstallCommand(program: Command): void;
|
|
4
|
+
/** `dreamlake doctor` — read-only install diagnostics, no network. */
|
|
5
|
+
export declare function registerDoctorCommand(program: Command): void;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// Commander wiring for the self-updating native install.
|
|
2
|
+
import { installedVersion, installWarnings, performInstall, shadowingBinary } from "./install.js";
|
|
3
|
+
import { binDir, isNativeInstall, launcherPath, versionsDir } from "./paths.js";
|
|
4
|
+
import { CHANNELS, isChannel } from "./releases.js";
|
|
5
|
+
import { activeChannel, pinnedVersion, writeSettings } from "./settings.js";
|
|
6
|
+
import { runUpdate, updateStatus } from "./update.js";
|
|
7
|
+
import { remindAfterInstall } from "../skill/reminders.js";
|
|
8
|
+
import { VERSION } from "../version.js";
|
|
9
|
+
export { maybeCheckForUpdates } from "./update.js";
|
|
10
|
+
export function registerInstallCommand(program) {
|
|
11
|
+
program
|
|
12
|
+
.command("install")
|
|
13
|
+
.description("install or re-install the native binary under ~/.local")
|
|
14
|
+
.argument("[target]", `${CHANNELS.join(" | ")} | version (default: saved channel)`)
|
|
15
|
+
.action(async (target) => {
|
|
16
|
+
try {
|
|
17
|
+
// install.sh always runs us from a throwaway download, so "you are
|
|
18
|
+
// now a native install" is only news when the user invoked this
|
|
19
|
+
// themselves from an npm or from-source copy.
|
|
20
|
+
const converting = !isNativeInstall() && process.env.DREAMLAKE_BOOTSTRAP !== "1";
|
|
21
|
+
const result = await performInstall(target);
|
|
22
|
+
process.stdout.write(`Installed dreamlake ${result.version} → ${result.launcher}\n`);
|
|
23
|
+
if (converting) {
|
|
24
|
+
process.stdout.write("This is now a native install under ~/.local; the copy you ran this from is untouched.\n");
|
|
25
|
+
}
|
|
26
|
+
if (result.pinned) {
|
|
27
|
+
process.stdout.write(`Pinned to ${result.pinned} — auto-update is paused until you run \`dreamlake self-update channel latest\`.\n`);
|
|
28
|
+
}
|
|
29
|
+
for (const line of installWarnings(result))
|
|
30
|
+
process.stderr.write(`${line}\n`);
|
|
31
|
+
if (result.pathAdvice)
|
|
32
|
+
process.stdout.write(`${result.pathAdvice}\n`);
|
|
33
|
+
if (!result.launcherConflict)
|
|
34
|
+
remindAfterInstall(result.version);
|
|
35
|
+
// A conflicting launcher means nothing usable was installed, so it
|
|
36
|
+
// must not exit 0 and let install.sh print a tick. Being shadowed
|
|
37
|
+
// on PATH is different: the install itself succeeded and the fix is
|
|
38
|
+
// one command, so warn and exit clean.
|
|
39
|
+
process.exit(result.launcherConflict ? 1 : 0);
|
|
40
|
+
}
|
|
41
|
+
catch (err) {
|
|
42
|
+
process.stderr.write(`Install failed: ${err.message}\n`);
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
// Not `update` — that belongs to `dreamlake update bindr|dataset|project`.
|
|
47
|
+
const update = program
|
|
48
|
+
.command("self-update")
|
|
49
|
+
.description("update the CLI itself to the newest release on your channel")
|
|
50
|
+
.argument("[target]", `${CHANNELS.join(" | ")} | version (default: saved channel)`)
|
|
51
|
+
.option("--background", "silent detached run, used by the auto-updater", false)
|
|
52
|
+
.option("--status", "show version, channel, and last auto-update check", false)
|
|
53
|
+
.action(async (target, opts) => {
|
|
54
|
+
if (opts.status) {
|
|
55
|
+
process.stdout.write(`${updateStatus()}\n`);
|
|
56
|
+
process.exit(0);
|
|
57
|
+
}
|
|
58
|
+
process.exit(await runUpdate({ target, background: opts.background }));
|
|
59
|
+
});
|
|
60
|
+
update
|
|
61
|
+
.command("channel")
|
|
62
|
+
.description(`show or set the release channel (${CHANNELS.join(", ")})`)
|
|
63
|
+
.argument("[name]", CHANNELS.join(" | "))
|
|
64
|
+
.action((name) => {
|
|
65
|
+
if (!name) {
|
|
66
|
+
process.stdout.write(`${activeChannel()}\n`);
|
|
67
|
+
process.exit(0);
|
|
68
|
+
}
|
|
69
|
+
if (!isChannel(name)) {
|
|
70
|
+
process.stderr.write(`Unknown channel "${name}" — expected ${CHANNELS.join(" or ")}.\n`);
|
|
71
|
+
process.exit(1);
|
|
72
|
+
}
|
|
73
|
+
const had = pinnedVersion();
|
|
74
|
+
// Choosing a channel is how you get off a pin — otherwise the new
|
|
75
|
+
// channel would be set but never followed.
|
|
76
|
+
writeSettings({ channel: name, pinned: null });
|
|
77
|
+
process.stdout.write(`Release channel set to ${name}.`);
|
|
78
|
+
process.stdout.write(had ? ` Unpinned from ${had}.` : "");
|
|
79
|
+
process.stdout.write(" Run `dreamlake self-update` to apply.\n");
|
|
80
|
+
process.exit(0);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
/** `dreamlake doctor` — read-only install diagnostics, no network. */
|
|
84
|
+
export function registerDoctorCommand(program) {
|
|
85
|
+
program
|
|
86
|
+
.command("doctor")
|
|
87
|
+
.description("print install and auto-update diagnostics")
|
|
88
|
+
.action(() => {
|
|
89
|
+
const shadow = shadowingBinary();
|
|
90
|
+
const lines = [
|
|
91
|
+
`dreamlake ${VERSION}`,
|
|
92
|
+
`executable: ${process.execPath}`,
|
|
93
|
+
`launcher: ${launcherPath()}`,
|
|
94
|
+
`versions: ${versionsDir()}`,
|
|
95
|
+
`linked: ${installedVersion() ?? "(none — the launcher is not ours; `dreamlake` may resolve elsewhere)"}`,
|
|
96
|
+
`native: ${isNativeInstall() ? "yes" : "no"}`,
|
|
97
|
+
`on PATH: ${shadow ?? `${launcherPath()} (ours)`}`,
|
|
98
|
+
"",
|
|
99
|
+
updateStatus(),
|
|
100
|
+
];
|
|
101
|
+
if (shadow) {
|
|
102
|
+
lines.push("", `A different dreamlake is earlier on your PATH, so it is the one that runs:`, ` ${shadow}`, `Remove it (npm uninstall -g @dreamlake/dreamlake-cli, if that is where it`, `came from), or put ${binDir()} ahead of it in PATH.`);
|
|
103
|
+
}
|
|
104
|
+
process.stdout.write(`${lines.join("\n")}\n`);
|
|
105
|
+
process.exit(0);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { compareVersions, type Channel } from "./releases.js";
|
|
2
|
+
export interface InstallResult {
|
|
3
|
+
version: string;
|
|
4
|
+
/** Previous version the launcher pointed at, if any. */
|
|
5
|
+
previous: string | null;
|
|
6
|
+
launcher: string;
|
|
7
|
+
/** Set when ~/.local/bin is not yet on PATH and we edited a shell rc. */
|
|
8
|
+
pathAdvice: string | null;
|
|
9
|
+
/** Set when the version is frozen rather than following a channel. */
|
|
10
|
+
pinned: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* A different `dreamlake` that the current PATH resolves to first, so the
|
|
13
|
+
* install has no visible effect until it is dealt with.
|
|
14
|
+
*/
|
|
15
|
+
shadowedBy: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* Set when something we did not create already occupies the launcher
|
|
18
|
+
* path, so `dreamlake` on PATH will NOT be the version just installed.
|
|
19
|
+
* Callers must surface this — reporting a clean success here is how a
|
|
20
|
+
* user ends up with `command not found` after a green checkmark.
|
|
21
|
+
*/
|
|
22
|
+
launcherConflict: string | null;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Resolve a user-supplied target into a concrete version. Accepts a channel
|
|
26
|
+
* name or an exact version; a channel also becomes the saved default for
|
|
27
|
+
* future auto-updates, matching how the install target picks your channel.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveTarget(target?: string): Promise<{
|
|
30
|
+
version: string;
|
|
31
|
+
channel: Channel | null;
|
|
32
|
+
}>;
|
|
33
|
+
/** Version the launcher currently resolves to, or null. */
|
|
34
|
+
export declare function installedVersion(): string | null;
|
|
35
|
+
/**
|
|
36
|
+
* The `dreamlake` the user's current PATH would actually run, when that is
|
|
37
|
+
* something other than the launcher we manage.
|
|
38
|
+
*
|
|
39
|
+
* Without this an install onto a machine that already has a `dreamlake`
|
|
40
|
+
* earlier in PATH — an old npm global, a `npm link`, the retired Python
|
|
41
|
+
* console script — looks like it worked and then silently keeps running the
|
|
42
|
+
* old one. `command not found` at least tells you something is wrong; this
|
|
43
|
+
* failure mode tells you nothing at all.
|
|
44
|
+
*/
|
|
45
|
+
export declare function shadowingBinary(): string | null;
|
|
46
|
+
export interface InstallOptions {
|
|
47
|
+
/** Unattended run by the detached auto-updater: no progress output (it
|
|
48
|
+
* has no terminal of its own to draw on), and yield to anything the
|
|
49
|
+
* user did explicitly while the download was in flight. */
|
|
50
|
+
background?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export declare function performInstall(target?: string, opts?: InstallOptions): Promise<InstallResult>;
|
|
53
|
+
/**
|
|
54
|
+
* Lines describing anything that stops the install being the plain success
|
|
55
|
+
* it looks like. Empty when all is well.
|
|
56
|
+
*/
|
|
57
|
+
export declare function installWarnings(result: InstallResult): string[];
|
|
58
|
+
/** Newest version available on `channel`, or null when the check fails. */
|
|
59
|
+
export declare function latestAvailable(channel: Channel): Promise<string | null>;
|
|
60
|
+
export { compareVersions };
|