@dreamlake/dreamlake-cli 0.88.1 → 0.90.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 +54 -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 +2362 -0
- package/dist/api/index.js +116 -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 +102 -0
- package/dist/api/note-files.js +107 -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-linger.d.ts +83 -0
- package/dist/api/note-linger.js +270 -0
- package/dist/api/note-presence.d.ts +82 -0
- package/dist/api/note-presence.js +72 -0
- package/dist/api/note-toc.d.ts +2 -0
- package/dist/api/note-toc.js +2 -0
- package/dist/api/notes.d.ts +329 -0
- package/dist/api/notes.js +209 -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/api-transport.d.ts +5 -0
- package/dist/cli/notes/api-transport.js +20 -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 +97 -0
- package/dist/cli/notes/files-commands.js +548 -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 +1300 -0
- package/dist/cli/notes/linger.d.ts +4 -0
- package/dist/cli/notes/linger.js +96 -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 +63 -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,11 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
interface Options {
|
|
3
|
+
namespace: string;
|
|
4
|
+
json?: boolean;
|
|
5
|
+
apply?: boolean;
|
|
6
|
+
expectedRevision?: string;
|
|
7
|
+
instanceId?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function runExperiments(action: "workspaces" | "binding" | "connect" | "disconnect", opts: Options, selection?: string): Promise<number>;
|
|
10
|
+
export declare function registerExperimentsCommand(program: Command): void;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
import { HttpError, requestJson } from "../client.js";
|
|
2
|
+
import { resolveRemote, resolveToken } from "../config.js";
|
|
3
|
+
import { emitJson, fail } from "../helpers.js";
|
|
4
|
+
class BindingError extends Error {
|
|
5
|
+
code;
|
|
6
|
+
remediation;
|
|
7
|
+
constructor(code, message, remediation) {
|
|
8
|
+
super(message);
|
|
9
|
+
this.code = code;
|
|
10
|
+
this.remediation = remediation;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
const invalid = () => new BindingError("EXPERIMENTS_INVALID_RESPONSE", "Invalid binding API response; no change was confirmed.", "Check matching CLI and server versions, then inspect the binding.");
|
|
14
|
+
function object(value) {
|
|
15
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
16
|
+
throw invalid();
|
|
17
|
+
return value;
|
|
18
|
+
}
|
|
19
|
+
function string(value) { if (typeof value !== "string" || !value)
|
|
20
|
+
throw invalid(); return value; }
|
|
21
|
+
function revision(value) {
|
|
22
|
+
if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 0)
|
|
23
|
+
throw invalid();
|
|
24
|
+
return value;
|
|
25
|
+
}
|
|
26
|
+
// Deliberate allowlists: never print arbitrary server fields or echoed credentials.
|
|
27
|
+
function listing(value) {
|
|
28
|
+
const v = object(value);
|
|
29
|
+
if (!Array.isArray(v.workspaces))
|
|
30
|
+
throw invalid();
|
|
31
|
+
return { instanceId: string(v.instanceId), workspaces: v.workspaces.map(raw => {
|
|
32
|
+
const w = object(raw);
|
|
33
|
+
return { namespaceId: string(w.namespaceId), slug: string(w.slug), ...(typeof w.name === "string" ? { name: w.name } : {}) };
|
|
34
|
+
}) };
|
|
35
|
+
}
|
|
36
|
+
function state(value) {
|
|
37
|
+
const v = object(value);
|
|
38
|
+
const out = { binding: null, revision: revision(v.revision), status: string(v.status) };
|
|
39
|
+
if (v.binding !== null) {
|
|
40
|
+
const b = object(v.binding);
|
|
41
|
+
if (typeof b.enabled !== "boolean")
|
|
42
|
+
throw invalid();
|
|
43
|
+
out.binding = { _id: string(b._id), revision: revision(b.revision), enabled: b.enabled,
|
|
44
|
+
instanceId: string(b.instanceId), namespaceId: string(b.namespaceId),
|
|
45
|
+
verifiedAt: string(b.verifiedAt), updatedAt: string(b.updatedAt) };
|
|
46
|
+
if (out.binding.revision !== out.revision)
|
|
47
|
+
throw invalid();
|
|
48
|
+
}
|
|
49
|
+
return out;
|
|
50
|
+
}
|
|
51
|
+
function expected(opts) {
|
|
52
|
+
if (opts.expectedRevision === undefined) {
|
|
53
|
+
if (opts.apply)
|
|
54
|
+
throw new BindingError("EXPERIMENTS_REVISION_REQUIRED", "--apply requires --expected-revision from a reviewed preview.", "Preview the operation, review its target, then apply using that revision.");
|
|
55
|
+
return undefined;
|
|
56
|
+
}
|
|
57
|
+
if (!/^(0|[1-9][0-9]*)$/.test(opts.expectedRevision) || !Number.isSafeInteger(Number(opts.expectedRevision))) {
|
|
58
|
+
throw new BindingError("EXPERIMENTS_INVALID_REVISION", "--expected-revision must be a nonnegative safe integer.", "Use the revision returned by binding or a fresh preview.");
|
|
59
|
+
}
|
|
60
|
+
return Number(opts.expectedRevision);
|
|
61
|
+
}
|
|
62
|
+
function context(opts) {
|
|
63
|
+
const token = resolveToken();
|
|
64
|
+
if (!token)
|
|
65
|
+
throw new BindingError("EXPERIMENTS_AUTH_REQUIRED", "DreamLake login is required.", "Run dreamlake login for the intended environment.");
|
|
66
|
+
return { remote: resolveRemote(), token, path: `/integrations/dash/ns/${encodeURIComponent(opts.namespace)}` };
|
|
67
|
+
}
|
|
68
|
+
function error(err, opts) {
|
|
69
|
+
let e;
|
|
70
|
+
if (err instanceof BindingError)
|
|
71
|
+
e = err;
|
|
72
|
+
else if (err instanceof HttpError) {
|
|
73
|
+
let code = "EXPERIMENTS_REQUEST_FAILED";
|
|
74
|
+
try {
|
|
75
|
+
const body = JSON.parse(err.body);
|
|
76
|
+
const candidate = body?.error?.code ?? body?.code;
|
|
77
|
+
if (typeof candidate === "string" && /^EXPERIMENTS_[A-Z0-9_]+$/.test(candidate))
|
|
78
|
+
code = candidate;
|
|
79
|
+
}
|
|
80
|
+
catch { /* Do not reflect upstream bodies. */ }
|
|
81
|
+
const remediation = err.status === 401 ? "Run dreamlake login for the intended environment." :
|
|
82
|
+
err.status === 403 ? "Ask a DreamLake organization owner to manage the binding; Dash authorization is also required." :
|
|
83
|
+
err.status === 409 ? "Refresh the workspace list and binding, review a new preview, then apply its current revision." :
|
|
84
|
+
err.status === 404 ? "Check the namespace and whether this deployment includes the binding API." :
|
|
85
|
+
"Check the managed Dash integration configuration and retry discovery before applying.";
|
|
86
|
+
e = new BindingError(code, `DreamLake rejected the request (HTTP ${err.status}).`, remediation);
|
|
87
|
+
}
|
|
88
|
+
else
|
|
89
|
+
e = new BindingError("EXPERIMENTS_REQUEST_FAILED", "Unable to complete the binding request; no change was confirmed.", "Check connectivity, then inspect the current binding before retrying a write.");
|
|
90
|
+
if (opts.json)
|
|
91
|
+
emitJson({ ok: false, error: { code: e.code, message: e.message, remediation: e.remediation } });
|
|
92
|
+
else
|
|
93
|
+
fail(`${e.code}: ${e.message} ${e.remediation}`);
|
|
94
|
+
return 1;
|
|
95
|
+
}
|
|
96
|
+
export async function runExperiments(action, opts, selection) {
|
|
97
|
+
try {
|
|
98
|
+
const expectedRevision = expected(opts);
|
|
99
|
+
if (action === "connect" && opts.apply && !opts.instanceId)
|
|
100
|
+
throw new BindingError("EXPERIMENTS_INSTANCE_REQUIRED", "Applying a binding requires --instance-id from the reviewed preview.", "Use target.instanceId and target.namespaceId from the preview; do not infer the instance.");
|
|
101
|
+
const c = context(opts);
|
|
102
|
+
const read = (suffix) => requestJson(c.remote, `${c.path}/${suffix}`, { token: c.token, redirect: "error" });
|
|
103
|
+
if (action === "workspaces") {
|
|
104
|
+
emitJson({ ok: true, namespace: opts.namespace, ...listing(await read("workspaces")) });
|
|
105
|
+
return 0;
|
|
106
|
+
}
|
|
107
|
+
const current = state(await read("binding"));
|
|
108
|
+
if (action === "binding") {
|
|
109
|
+
emitJson({ ok: true, namespace: opts.namespace, ...current });
|
|
110
|
+
return 0;
|
|
111
|
+
}
|
|
112
|
+
if (expectedRevision !== undefined && expectedRevision !== current.revision) {
|
|
113
|
+
throw new BindingError("EXPERIMENTS_BINDING_CONFLICT", "The binding revision changed.", "Inspect and review a fresh preview; do not automatically retry with a new revision.");
|
|
114
|
+
}
|
|
115
|
+
let target = null;
|
|
116
|
+
if (action === "connect") {
|
|
117
|
+
const available = listing(await read("workspaces"));
|
|
118
|
+
const matches = available.workspaces.filter(w => w.namespaceId === selection || w.slug === selection);
|
|
119
|
+
if (matches.length !== 1)
|
|
120
|
+
throw new BindingError(matches.length ? "EXPERIMENTS_WORKSPACE_AMBIGUOUS" : "EXPERIMENTS_WORKSPACE_NOT_VERIFIED", matches.length ? "Workspace selection is ambiguous." : "Workspace is not in the verified eligible list.", "Run experiments workspaces and select a unique namespaceId or slug from its result.");
|
|
121
|
+
target = { instanceId: available.instanceId, ...matches[0] };
|
|
122
|
+
if (opts.instanceId !== undefined && opts.instanceId !== target.instanceId)
|
|
123
|
+
throw new BindingError("EXPERIMENTS_BINDING_SERVICE_MISMATCH", "The managed Dash instance differs from the reviewed selection.", "Refresh discovery and review a new preview before applying.");
|
|
124
|
+
if (opts.apply && selection !== target.namespaceId)
|
|
125
|
+
throw new BindingError("EXPERIMENTS_STABLE_ID_REQUIRED", "Applying a binding requires the verified namespaceId, not a slug.", "Use target.namespaceId from the reviewed preview with --apply and its expected revision.");
|
|
126
|
+
}
|
|
127
|
+
if (!opts.apply) {
|
|
128
|
+
emitJson({ ok: true, mode: "preview", action, namespace: opts.namespace, expectedRevision: current.revision,
|
|
129
|
+
current, target, remoteDataRetained: true, remediation: "Review this target, then repeat with --apply --expected-revision <revision>." });
|
|
130
|
+
return 0;
|
|
131
|
+
}
|
|
132
|
+
const result = state(await requestJson(c.remote, `${c.path}/binding`, { token: c.token, redirect: "error",
|
|
133
|
+
method: action === "connect" ? "PUT" : "DELETE",
|
|
134
|
+
...(target ? { json: { namespaceId: target.namespaceId, instanceId: target.instanceId, expectedRevision } } : { query: { expectedRevision } }),
|
|
135
|
+
}));
|
|
136
|
+
if (target && (!result.binding?.enabled || result.binding.namespaceId !== target.namespaceId ||
|
|
137
|
+
result.binding.instanceId !== target.instanceId || result.revision !== expectedRevision + 1))
|
|
138
|
+
throw invalid();
|
|
139
|
+
if (!target && (result.binding?.enabled || result.revision !== (current.binding ? expectedRevision + 1 : 0)))
|
|
140
|
+
throw invalid();
|
|
141
|
+
emitJson({ ok: true, mode: "applied", action, namespace: opts.namespace, ...result, remoteDataRetained: true });
|
|
142
|
+
return 0;
|
|
143
|
+
}
|
|
144
|
+
catch (err) {
|
|
145
|
+
return error(err, opts);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
export function registerExperimentsCommand(program) {
|
|
149
|
+
const command = program.command("experiments").description("discover and explicitly bind an existing managed Dash workspace (JSON receipts)");
|
|
150
|
+
for (const action of ["workspaces", "binding", "connect", "disconnect"]) {
|
|
151
|
+
const sub = command.command(action)
|
|
152
|
+
.description({ workspaces: "list verified eligible Dash organization workspaces", binding: "inspect the current binding and revision", connect: "preview a workspace binding; --apply commits it", disconnect: "preview detaching; remote experiments and SDK access are retained" }[action])
|
|
153
|
+
.requiredOption("--namespace <slug>", "DreamLake organization namespace")
|
|
154
|
+
.option("--json", "emit structured JSON, including errors (success receipts are always JSON)");
|
|
155
|
+
if (action === "connect")
|
|
156
|
+
sub.argument("<workspace>", "verified Dash namespaceId or unique slug");
|
|
157
|
+
if (action === "connect")
|
|
158
|
+
sub.option("--instance-id <id>", "reviewed managed instance ID; required with --apply");
|
|
159
|
+
if (action === "connect" || action === "disconnect")
|
|
160
|
+
sub
|
|
161
|
+
.option("--apply", "apply the reviewed operation (default: preview only)")
|
|
162
|
+
.option("--expected-revision <number>", "reviewed binding revision; required with --apply");
|
|
163
|
+
sub.action(async (...args) => {
|
|
164
|
+
const opts = args[action === "connect" ? 1 : 0];
|
|
165
|
+
process.exitCode = await runExperiments(action, opts, action === "connect" ? args[0] : undefined);
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function matchGlob(name: string, pattern: string): boolean;
|
package/dist/cli/glob.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// Minimal fnmatch-style glob matching — zero-dependency replacement for
|
|
2
|
+
// Python's `fnmatch.fnmatch`, which dreamlake-py uses to match episodes
|
|
3
|
+
// by node path and bindrs by name.
|
|
4
|
+
//
|
|
5
|
+
// Supports `*` (any run), `?` (single char), and `[seq]` / `[!seq]`
|
|
6
|
+
// character classes. Case-sensitive (POSIX fnmatch semantics).
|
|
7
|
+
function translate(pattern) {
|
|
8
|
+
let re = "";
|
|
9
|
+
let i = 0;
|
|
10
|
+
while (i < pattern.length) {
|
|
11
|
+
const c = pattern[i++];
|
|
12
|
+
if (c === "*") {
|
|
13
|
+
re += ".*";
|
|
14
|
+
}
|
|
15
|
+
else if (c === "?") {
|
|
16
|
+
re += ".";
|
|
17
|
+
}
|
|
18
|
+
else if (c === "[") {
|
|
19
|
+
let j = i;
|
|
20
|
+
if (pattern[j] === "!")
|
|
21
|
+
j++;
|
|
22
|
+
if (pattern[j] === "]")
|
|
23
|
+
j++;
|
|
24
|
+
while (j < pattern.length && pattern[j] !== "]")
|
|
25
|
+
j++;
|
|
26
|
+
if (j >= pattern.length) {
|
|
27
|
+
re += "\\[";
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
let stuff = pattern.slice(i, j).replace(/\\/g, "\\\\");
|
|
31
|
+
i = j + 1;
|
|
32
|
+
if (stuff.startsWith("!"))
|
|
33
|
+
stuff = "^" + stuff.slice(1);
|
|
34
|
+
re += `[${stuff}]`;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
re += c.replace(/[.+^${}()|\\]/g, "\\$&");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return new RegExp(`^${re}$`);
|
|
42
|
+
}
|
|
43
|
+
export function matchGlob(name, pattern) {
|
|
44
|
+
return translate(pattern).test(name);
|
|
45
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Resolve an org slug to {id,name}, or null if not found. */
|
|
2
|
+
export declare function resolveOrg(slug: string): Promise<{
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
} | null>;
|
|
6
|
+
/**
|
|
7
|
+
* Resolve a user reference (email or name) to a userId via the global
|
|
8
|
+
* searchUsers query. Exact email match wins; multiple matches → error
|
|
9
|
+
* listing them; zero → error.
|
|
10
|
+
*/
|
|
11
|
+
export declare function resolveUserId(ref: string): Promise<string>;
|
|
12
|
+
export interface TeamRef {
|
|
13
|
+
id: string;
|
|
14
|
+
slug: string;
|
|
15
|
+
name: string;
|
|
16
|
+
orgId: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Resolve (orgSlug, teamSlug) → team. Team slugs are unique only within an
|
|
20
|
+
* org, and the API has no teamBySlug query, so we list the org's teams and
|
|
21
|
+
* match by slug. Returns null if either the org or the team is not found.
|
|
22
|
+
*/
|
|
23
|
+
export declare function resolveTeam(orgSlug: string, teamSlug: string): Promise<TeamRef | null>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Shared GraphQL resolution helpers for org/team commands: turn the
|
|
2
|
+
// slugs / emails users type into the ids the GraphQL API wants.
|
|
3
|
+
import { gql } from "./graphql.js";
|
|
4
|
+
/** Resolve an org slug to {id,name}, or null if not found. */
|
|
5
|
+
export async function resolveOrg(slug) {
|
|
6
|
+
const data = await gql(`query($slug:String!){ organizationBySlug(slug:$slug){ id name } }`, { slug });
|
|
7
|
+
return data.organizationBySlug;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Resolve a user reference (email or name) to a userId via the global
|
|
11
|
+
* searchUsers query. Exact email match wins; multiple matches → error
|
|
12
|
+
* listing them; zero → error.
|
|
13
|
+
*/
|
|
14
|
+
export async function resolveUserId(ref) {
|
|
15
|
+
const data = await gql(`query($kw:String!){ searchUsers(keyword:$kw, limit:10){ id name email } }`, { kw: ref });
|
|
16
|
+
const users = data.searchUsers ?? [];
|
|
17
|
+
if (users.length === 0)
|
|
18
|
+
throw new Error(`no user matches '${ref}'`);
|
|
19
|
+
const exact = users.filter((u) => u.email?.toLowerCase() === ref.toLowerCase());
|
|
20
|
+
if (exact.length === 1)
|
|
21
|
+
return exact[0].id;
|
|
22
|
+
if (users.length > 1) {
|
|
23
|
+
const list = users.map((u) => ` ${u.email ?? "?"} (${u.name ?? "?"})`).join("\n");
|
|
24
|
+
throw new Error(`'${ref}' is ambiguous — ${users.length} matches. Use an exact email:\n${list}`);
|
|
25
|
+
}
|
|
26
|
+
return users[0].id;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Resolve (orgSlug, teamSlug) → team. Team slugs are unique only within an
|
|
30
|
+
* org, and the API has no teamBySlug query, so we list the org's teams and
|
|
31
|
+
* match by slug. Returns null if either the org or the team is not found.
|
|
32
|
+
*/
|
|
33
|
+
export async function resolveTeam(orgSlug, teamSlug) {
|
|
34
|
+
const org = await resolveOrg(orgSlug);
|
|
35
|
+
if (!org)
|
|
36
|
+
return null;
|
|
37
|
+
const data = await gql(`query($orgId:ID!){ organizationTeams(orgId:$orgId){ id slug name } }`, { orgId: org.id });
|
|
38
|
+
const team = (data.organizationTeams ?? []).find((t) => t.slug === teamSlug);
|
|
39
|
+
if (!team)
|
|
40
|
+
return null;
|
|
41
|
+
return { id: team.id, slug: team.slug, name: team.name, orgId: org.id };
|
|
42
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class GraphQLClientError extends Error {
|
|
2
|
+
}
|
|
3
|
+
/**
|
|
4
|
+
* Run a GraphQL query/mutation against {server}/graphql with the saved
|
|
5
|
+
* token. Throws GraphQLClientError on transport errors or a non-empty
|
|
6
|
+
* `errors` array (messages joined). Returns the `data` payload.
|
|
7
|
+
*/
|
|
8
|
+
export declare function gql<T = unknown>(query: string, variables?: Record<string, unknown>, opts?: {
|
|
9
|
+
timeoutMs?: number;
|
|
10
|
+
}): Promise<T>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Minimal GraphQL client. Organization/team operations live on the
|
|
2
|
+
// dreamlake-server GraphQL endpoint (POST {server}/graphql) rather than
|
|
3
|
+
// the REST routes the rest of the CLI uses — same bearer token, same host.
|
|
4
|
+
import { resolveRemote, resolveToken } from "./config.js";
|
|
5
|
+
export class GraphQLClientError extends Error {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Run a GraphQL query/mutation against {server}/graphql with the saved
|
|
9
|
+
* token. Throws GraphQLClientError on transport errors or a non-empty
|
|
10
|
+
* `errors` array (messages joined). Returns the `data` payload.
|
|
11
|
+
*/
|
|
12
|
+
export async function gql(query, variables = {}, opts = {}) {
|
|
13
|
+
const token = resolveToken();
|
|
14
|
+
if (!token) {
|
|
15
|
+
throw new GraphQLClientError("not authenticated. run 'dreamlake login' first");
|
|
16
|
+
}
|
|
17
|
+
const remote = resolveRemote();
|
|
18
|
+
let res;
|
|
19
|
+
try {
|
|
20
|
+
res = await fetch(`${remote}/graphql`, {
|
|
21
|
+
method: "POST",
|
|
22
|
+
headers: {
|
|
23
|
+
"Content-Type": "application/json",
|
|
24
|
+
Authorization: `Bearer ${token}`,
|
|
25
|
+
},
|
|
26
|
+
body: JSON.stringify({ query, variables }),
|
|
27
|
+
signal: AbortSignal.timeout(opts.timeoutMs ?? 30000),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
catch (err) {
|
|
31
|
+
throw new GraphQLClientError(`request failed: ${err.message}`);
|
|
32
|
+
}
|
|
33
|
+
let body;
|
|
34
|
+
try {
|
|
35
|
+
body = (await res.json());
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
throw new GraphQLClientError(`(${res.status}) non-JSON response`);
|
|
39
|
+
}
|
|
40
|
+
if (body.errors && body.errors.length > 0) {
|
|
41
|
+
throw new GraphQLClientError(body.errors.map((e) => e.message).join("; "));
|
|
42
|
+
}
|
|
43
|
+
if (!res.ok) {
|
|
44
|
+
throw new GraphQLClientError(`(${res.status}) request failed`);
|
|
45
|
+
}
|
|
46
|
+
return body.data;
|
|
47
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const helpExamples: Record<string, string>;
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
// Generated by docs/scripts/gen-help-examples.mjs. Edit docs code blocks with cli-help metadata.
|
|
2
|
+
export const helpExamples = {
|
|
3
|
+
"agents list": "dreamlake agents list --namespace my-workspace\n# Stable text, even in a terminal; redirected output also defaults to text.\ndreamlake agents list --namespace my-workspace --plain\n# Prefixes match the beginning of a scoped agent name or registry ID.\ndreamlake agents list --prefix my_repo. --project research",
|
|
4
|
+
"agents show": "dreamlake agents show my_repo.tri --namespace my-workspace",
|
|
5
|
+
"agents edit": "dreamlake agents edit my_repo.tri --namespace my-workspace\n# Browser form: follow the localhost URL printed by the command.\ndreamlake agents edit my_repo.tri --namespace my-workspace --web",
|
|
6
|
+
"telemetry": "dreamlake telemetry disable --quiet\ndreamlake telemetry status\ndreamlake telemetry enable --quiet",
|
|
7
|
+
"artifact push": "dreamlake artifact push ./dashboard.html --id q1-dashboard\n# Edit the file, then repeat the same command to upload only new chunks.\n\n# Compatibility with older self-hosted viewers:\ndreamlake artifact push ./dashboard.html --id q1-dashboard --full",
|
|
8
|
+
"artifact meta set": "# At push time:\ndreamlake artifact push ./report.html --id q1-dashboard \\\n --description \"Revenue, churn and pipeline for the quarter\" \\\n --cover ./cover.png\n\n# Or after the fact, for an artifact that already exists:\ndreamlake artifact meta set q1-dashboard --description \"Revenue, churn and pipeline\"\ndreamlake artifact meta set q1-dashboard --cover ./cover.png\ndreamlake artifact meta show q1-dashboard\n\n# Back to the automatic description / the generated cover:\ndreamlake artifact meta set q1-dashboard --clear-description --clear-cover",
|
|
9
|
+
"artifact share": "# Find the dashboard you already uploaded; no new version is needed.\ndreamlake artifact list\nARTIFACT=\"q1-dashboard\" # Replace with the id from list.\ndreamlake artifact share get \"$ARTIFACT\"\n\n# Give signed-in recipients read access, then verify the returned link.\ndreamlake artifact share create \"$ARTIFACT\"\ndreamlake artifact share get \"$ARTIFACT\"\n\n# When link access is no longer needed, revoke it and verify.\ndreamlake artifact share revoke \"$ARTIFACT\"\ndreamlake artifact share get \"$ARTIFACT\"",
|
|
10
|
+
"artifact visibility": "ARTIFACT=\"q1-dashboard\" # Your existing artifact id.\ndreamlake artifact visibility \"$ARTIFACT\" public\ndreamlake artifact visibility \"$ARTIFACT\" private",
|
|
11
|
+
"hosts": "dreamlake hosts\ndreamlake hosts --all\ndreamlake hosts -h\ndreamlake hosts list -h",
|
|
12
|
+
"nymph": "dreamlake nymph\ndreamlake nymph --json",
|
|
13
|
+
"nymph setup": "dreamlake nymph setup --name alice/computers/laptop --lakeshore-id CONNECTION_ID",
|
|
14
|
+
"nymph config": "dreamlake nymph config --name alice/computers/laptop",
|
|
15
|
+
"nymph config set": "dreamlake nymph config set --name alice/computers/laptop --poll-seconds 30 --max-invocations 4",
|
|
16
|
+
"nymph access show": "dreamlake nymph access show --name alice/computers/laptop",
|
|
17
|
+
"nymph access grant": "dreamlake nymph access grant upload --name alice/computers/laptop\ndreamlake nymph access grant command-execution --name alice/computers/laptop",
|
|
18
|
+
"nymph access revoke": "dreamlake nymph access revoke upload --name alice/computers/laptop\ndreamlake nymph access revoke command-execution --name alice/computers/laptop",
|
|
19
|
+
"nymph restart": "dreamlake nymph restart --name alice/computers/laptop",
|
|
20
|
+
"experiments workspaces": "dreamlake experiments workspaces --namespace fortyfive --json",
|
|
21
|
+
"experiments binding": "dreamlake experiments binding --namespace fortyfive --json",
|
|
22
|
+
"experiments connect": "dreamlake experiments connect research --namespace fortyfive --json\n# Apply only after reviewing the preview. Use its actual revision, not this example's 0.\ndreamlake experiments connect \"$DASH_NAMESPACE_ID\" --namespace fortyfive --instance-id \"$DASH_INSTANCE_ID\" --apply --expected-revision 0 --json",
|
|
23
|
+
"experiments disconnect": "dreamlake experiments disconnect --namespace fortyfive --json\n# Replace 1 with the revision returned by this preview.\ndreamlake experiments disconnect --namespace fortyfive --apply --expected-revision 1 --json",
|
|
24
|
+
"hosts list": "dreamlake hosts list\ndreamlake hosts list --namespace geyang --group workstations\ndreamlake hosts list --json\ndreamlake hosts list --all",
|
|
25
|
+
"hosts status": "dreamlake hosts status geyang/workstations/worker\ndreamlake hosts status HOST_ID --namespace geyang --json\ndreamlake hosts status 'geyang/workstations/*' --page 2 --page-size 100 --json",
|
|
26
|
+
"hosts lifecycle": "dreamlake hosts lifecycle HOST_ID --namespace geyang --json",
|
|
27
|
+
"hosts archive": "dreamlake hosts archive HOST_ID --namespace geyang --request-id archive-example-1 --expected-revision 0 --json",
|
|
28
|
+
"hosts restore": "dreamlake hosts restore HOST_ID --namespace geyang --request-id restore-example-1 --expected-revision 1 --json",
|
|
29
|
+
"hosts enrollments": "dreamlake hosts enrollments geyang/workstations/worker\ndreamlake hosts enrollments HOST_ID --namespace geyang --json",
|
|
30
|
+
"hosts metrics": "dreamlake hosts metrics geyang/workstations/worker --enrollment ENROLLMENT_ID\ndreamlake hosts metrics HOST_ID --namespace geyang --enrollment ENROLLMENT_ID --resolution 60 --json",
|
|
31
|
+
"hosts check": "dreamlake hosts check geyang/workstations/worker --enrollment ENROLLMENT_ID --action ssh\ndreamlake hosts check HOST_ID --namespace geyang --enrollment ENROLLMENT_ID --action tracked-run --json",
|
|
32
|
+
"hosts enroll": "# Human-readable output (default).\ndreamlake hosts enroll --local --name geyang/dev/my-mac\n# Structured output for scripts.\ndreamlake hosts enroll --local --name geyang/dev/my-mac --json",
|
|
33
|
+
"hosts create": "dreamlake hosts create geyang/PROVIDER_ID --host-name geyang/dev/worker \\\n --layer development --request-id create-worker-01",
|
|
34
|
+
"hosts power": "dreamlake hosts power geyang/dev/worker\ndreamlake hosts power HOST_ID --namespace geyang --json",
|
|
35
|
+
"hosts start": "dreamlake hosts start geyang/dev/worker --enrollment ENROLLMENT_ID \\\n --request-id start-worker-01",
|
|
36
|
+
"hosts stop": "dreamlake hosts stop geyang/dev/worker --enrollment ENROLLMENT_ID \\\n --request-id stop-worker-01",
|
|
37
|
+
"hosts restart": "dreamlake hosts restart geyang/dev/worker --enrollment ENROLLMENT_ID \\\n --request-id restart-worker-01",
|
|
38
|
+
"hosts terminate": "dreamlake hosts terminate geyang/dev/worker --enrollment ENROLLMENT_ID \\\n --request-id terminate-worker-01 --volumes delete-on-termination",
|
|
39
|
+
"ssh": "dreamlake ssh geyang/dev/worker\ndreamlake ssh HOST_ID --namespace geyang --enrollment ENROLLMENT_ID",
|
|
40
|
+
"hosts ssh": "dreamlake hosts ssh geyang/dev/worker --duration 1800",
|
|
41
|
+
"exec": "dreamlake exec geyang/dev/worker -- uname -a\ndreamlake exec geyang/dev/worker --timeout 30 -- sh -c 'printf \"%s\\n\" \"$HOME\"'",
|
|
42
|
+
"hosts exec": "dreamlake hosts exec geyang/dev/worker -- python3 -c 'print(\"hello\")'",
|
|
43
|
+
"infra list": "dreamlake infra list --namespace fortyfive --project dreamlake-infra --json",
|
|
44
|
+
"infra status": "dreamlake infra status da8e49cf-1b37-446f-9494-9620faf3192d --json",
|
|
45
|
+
"infra connect": "dreamlake infra connect da8e49cf-1b37-446f-9494-9620faf3192d",
|
|
46
|
+
"infra history": "dreamlake infra history da8e49cf-1b37-446f-9494-9620faf3192d --json",
|
|
47
|
+
"infra events": "dreamlake infra events da8e49cf-1b37-446f-9494-9620faf3192d --after 0 --json",
|
|
48
|
+
"infra create": "dreamlake infra create analytics --namespace fortyfive --project dreamlake-infra \\\n --environment production --repository https://github.com/example/repo \\\n --directory infra/analytics --path infra/analytics/production --json",
|
|
49
|
+
"infra move": "# Save one reviewed move; no location changes occur during preview.\ndreamlake infra move da8e49cf-1b37-446f-9494-9620faf3192d \\\n --namespace fortyfive --project dreamlake-infra --dry-run --out stack-move.json\n# Execute the exact saved intent and optimistic concurrency checks.\ndreamlake infra move da8e49cf-1b37-446f-9494-9620faf3192d \\\n --request-file stack-move.json --confirm --json\n# Path-only move: same namespace/project, new place in its resource tree.\ndreamlake infra move da8e49cf-1b37-446f-9494-9620faf3192d \\\n --namespace fortyfive --project dreamlake-infra \\\n --destination-path platform/aws/analytics --dry-run --out stack-path.json",
|
|
50
|
+
"infra transfer plan": "dreamlake infra transfer plan 616658fd-531c-4bb9-8f52-7ebcbaa350b9 \\\n --namespace fortyfive --project dreamlake-infra \\\n --out stack-transfer.json",
|
|
51
|
+
"infra transfer create": "dreamlake infra transfer create 616658fd-531c-4bb9-8f52-7ebcbaa350b9 \\\n --request-file stack-transfer.json --confirm --accept-if-authorized",
|
|
52
|
+
"infra transfer status": "dreamlake infra transfer status 616658fd-531c-4bb9-8f52-7ebcbaa350b1 \\\n --out stack-transfer-acceptance.json",
|
|
53
|
+
"infra transfer accept": "dreamlake infra transfer accept 616658fd-531c-4bb9-8f52-7ebcbaa350b1 \\\n --request-file stack-transfer-acceptance.json --confirm",
|
|
54
|
+
"jobs register": "dreamlake jobs register --namespace geyang --name train-baseline \\\n --host 0123456789abcdef01234567 --request-id train-baseline-01",
|
|
55
|
+
"jobs report": "dreamlake jobs report 89abcdef0123456789abcdef --namespace geyang --state running\ndreamlake jobs report 89abcdef0123456789abcdef --namespace geyang \\\n --state succeeded --exit-code 0\ndreamlake jobs report fedcba9876543210fedcba98 --namespace geyang \\\n --state failed --exit-code 7 --message 'Training process exited with an error'",
|
|
56
|
+
"jobs list": "dreamlake jobs list --namespace geyang\ndreamlake jobs list --namespace geyang --host 0123456789abcdef01234567 --state running\ndreamlake jobs list --namespace geyang --page 2 --page-size 50 --json",
|
|
57
|
+
"jobs status": "dreamlake jobs status 89abcdef0123456789abcdef --namespace geyang\ndreamlake jobs status 89abcdef0123456789abcdef --namespace geyang --json",
|
|
58
|
+
"layout pages": "# Use the endpoint of your explicitly enabled local debugging session.\ndreamlake layout pages --cdp http://127.0.0.1:9222",
|
|
59
|
+
"layout list": "dreamlake layout list --cdp http://127.0.0.1:9222 --page PAGE_ID",
|
|
60
|
+
"layout inspect": "dreamlake layout inspect --cdp http://127.0.0.1:9222 --page PAGE_ID --layout LAYOUT_ID",
|
|
61
|
+
"layout resolve": "dreamlake layout resolve request.json --cdp http://127.0.0.1:9222 --page PAGE_ID --layout LAYOUT_ID",
|
|
62
|
+
"layout apply": "dreamlake layout apply request.json --cdp http://127.0.0.1:9222 --page PAGE_ID --layout LAYOUT_ID",
|
|
63
|
+
"machine": "dreamlake machine self\ndreamlake machine host 0123456789abcdef01234567\ndreamlake machine project 0123456789abcdef01234567",
|
|
64
|
+
"auth identity": "dreamlake auth identity\ndreamlake --identity machine profile\ndreamlake --identity user profile",
|
|
65
|
+
"notes files list": "dreamlake notes files list --note release-plan\ndreamlake notes files list 'assets/*.png' --note release-plan --limit 50\ndreamlake notes files list --note release-plan --json",
|
|
66
|
+
"notes media upload": "dreamlake notes media upload ./diagram.png\nIMAGE_URL=$(dreamlake notes media upload ./diagram.png)",
|
|
67
|
+
"notes files write": "dreamlake notes files write config.json --text '{\"enabled\":true}' --note \"$NOTE_ID\" --idempotency-key config-initial-1",
|
|
68
|
+
"notes files cp": "dreamlake notes files cp config.json config-copy.json --note \"$NOTE_ID\" --idempotency-key config-copy-1",
|
|
69
|
+
"notes files status": "# OPERATION_ID is the ID from the original response.\ndreamlake notes files status \"$OPERATION_ID\" --note \"$NOTE_ID\" --json",
|
|
70
|
+
"notes files reconcile": "dreamlake notes files reconcile \"$OPERATION_ID\" --note \"$NOTE_ID\" --json",
|
|
71
|
+
"notes files cancel": "dreamlake notes files cancel \"$OPERATION_ID\" --note \"$NOTE_ID\" --json",
|
|
72
|
+
"notes visit": "# Reuse the task's DREAMLAKE_AGENT_ID and DREAMLAKE_AGENT_NAME.\nNOTE_ID=release-plan\ndreamlake notes visit \"$NOTE_ID\"",
|
|
73
|
+
"notes presence": "# Read the participant roster without joining. Text is the default.\nNOTE_ID=release-plan\ndreamlake notes presence \"$NOTE_ID\"",
|
|
74
|
+
"notes select": "export DREAMLAKE_AGENT_ID=\"review-session-42\"\nexport DREAMLAKE_AGENT_NAME=\"Codex\"\nNOTE_ID=\"your-note-id\"\ndreamlake notes select --text \"The next step is tested in simulation.\" --note \"$NOTE_ID\"\n# Select the last occurrence of a repeated passage.\ndreamlake notes select --text \"simulation\" --note \"$NOTE_ID\" -o -1",
|
|
75
|
+
"notes rm": "# Read it first and confirm it is the note you mean.\ndreamlake notes read NOTE_ID\n# Asks for confirmation, showing the title and owning namespace.\ndreamlake notes rm NOTE_ID\n# Scripts and agents: skip the prompt and take a JSON receipt.\ndreamlake notes rm NOTE_ID --yes --json\n# Afterwards a read reports not found.\ndreamlake notes read NOTE_ID",
|
|
76
|
+
"notes patch": "set -euo pipefail\ndreamlake notes create \"Patch tutorial\" --text 'Hello world.' > created.txt\nNOTE_ID=$(sed -n 's/^ id //p' created.txt)\ndreamlake notes read \"$NOTE_ID\" > baseline.txt\n# Normal reads print note, hash, and revision before the source.\nBASE=$(sed -n '3s/^revision: //p' baseline.txt)\ndreamlake notes patch \"$NOTE_ID\" --base-revision \"$BASE\" > receipt.txt <<'PATCH'\n@@ chars 0:12 @@\n~ Hello [-world-]{+team+}.\nPATCH\nACK=$(sed -n '3s/^revision: //p' receipt.txt)\ndreamlake notes read \"$NOTE_ID\" --if-match \"$ACK\"\n# Expect Hello team. Inspect the result; do not repeat a successful patch.",
|
|
77
|
+
"notes append": "dreamlake notes append \"$NOTE_ID\" --file addition.md --base-revision \"$BASE\" --json\n# ACK is the revision in the successful append receipt.\ndreamlake notes read \"$NOTE_ID\" --at \"$ACK\"",
|
|
78
|
+
"notes insert": "dreamlake notes insert --note \"$NOTE_ID\" --ind 0 --text 'Review: ' \\\n --base-revision \"$BASE\" --json\n# ACK is the revision returned by the insertion receipt.\ndreamlake notes read \"$NOTE_ID\" --at \"$ACK\"",
|
|
79
|
+
"notes delete": "dreamlake notes delete 'obsolete paragraph' --note \"$NOTE_ID\" \\\n --base-revision \"$BASE\" --json\n# Pin verification to the receipt's acknowledged revision.\ndreamlake notes read \"$NOTE_ID\" --at \"$ACK\"",
|
|
80
|
+
"notes write": "dreamlake notes read \"$NOTE_ID\" --json > baseline.json\nBASE=$(jq -er .revision baseline.json)\njq -jr .content baseline.json > draft.md\n# Edit draft.md without changing the saved original baseline.\ndreamlake notes write \"$NOTE_ID\" --file draft.md --base-revision \"$BASE\" --json\n# ACK is the successful write receipt's revision.\ndreamlake notes read \"$NOTE_ID\" --at \"$ACK\"",
|
|
81
|
+
"notes": "# Find a note and read it directly.\ndreamlake notes search \"release plan\"\ndreamlake notes read release-plan\n\n# Preview a unique wording change, apply it, then read back.\ndreamlake notes replace \"Draft checklist\" --text \"Ready for review\" --note release-plan --dry-run\ndreamlake notes replace \"Draft checklist\" --text \"Ready for review\" --note release-plan\ndreamlake notes read release-plan\n\n# Create a private note from a Markdown file.\ndreamlake notes create \"Release plan\" --file release-plan.md",
|
|
82
|
+
"notes list": "dreamlake notes list --limit 10\ndreamlake notes list --shared\ndreamlake notes list --namespace acme",
|
|
83
|
+
"notes search": "dreamlake notes search \"release plan\"\ndreamlake notes search deploy --namespace acme --json",
|
|
84
|
+
"notes create": "dreamlake notes create \"Release plan\" --text \"Draft checklist\"\nprintf '# Release plan\\n' | dreamlake notes create \"Release plan\" --file - --json",
|
|
85
|
+
"notes read": "dreamlake notes read release-plan\ndreamlake notes read release-plan --since \"10 minutes ago\" --format diff\n# Reuse a stable agent identity for this task.\nexport DREAMLAKE_AGENT_ID=release-reviewer-a\nexport DREAMLAKE_AGENT_NAME=\"Release reviewer A\"\ndreamlake notes read release-plan --linger\n# Ctrl-C stops following.\n\nExample notifications:\n+ @alice joined\n+ Reviewer (agent) joined\n* Reviewer (agent) read the note\n* Reviewer (agent) edited the note\n* @alice selected \"## The center\"\n- @alice left",
|
|
86
|
+
"notes projects": "dreamlake notes projects 000000000000000000000001 --namespace acme",
|
|
87
|
+
"notes move": "# Standalone cross-namespace Note transfer is unavailable (exit 3).\ndreamlake notes move NOTE_ID --to-namespace my-org --project shared-research --dry-run\n# Add a project association within the note's CURRENT workspace.\ndreamlake notes move NOTE_ID --to-namespace current-workspace --project research --dry-run\n# Apply only an executable same-workspace preview.\ndreamlake notes move NOTE_ID --to-namespace current-workspace --project research\n# Relocate the note to an existing folder of one project (CLI 0.87.0+).\ndreamlake notes move NOTE_ID --namespace acme --project research --folder reports/2026 --dry-run",
|
|
88
|
+
"notes diff": "NOTE_ID=release-plan\ndreamlake notes read \"$NOTE_ID\" --json > baseline.json\nHASH=$(jq -er .hash baseline.json)\ndreamlake notes diff \"$NOTE_ID\" --since \"$HASH\" --format diff",
|
|
89
|
+
"notes sections": "dreamlake notes sections release-plan\ndreamlake notes sections release-plan --json",
|
|
90
|
+
"notes share": "# Find the release plan and inspect its source and current sharing.\ndreamlake notes search \"release plan\"\nNOTE=\"release-plan\" # Replace with the id or slug from search.\ndreamlake notes read \"$NOTE\"\ndreamlake notes share get \"$NOTE\"\n\n# Give signed-in recipients read access, then verify the returned link.\ndreamlake notes share create \"$NOTE\" --role read\ndreamlake notes share get \"$NOTE\"\n\n# When link access is no longer needed, revoke it and verify.\ndreamlake notes share revoke \"$NOTE\"\ndreamlake notes share get \"$NOTE\"",
|
|
91
|
+
"notes visibility": "NOTE=\"release-plan\" # Your existing note id or slug.\ndreamlake notes visibility \"$NOTE\" public\ndreamlake notes visibility \"$NOTE\" private",
|
|
92
|
+
"notes share revoke": "NOTE=\"release-plan\" # Your existing note id or slug.\ndreamlake notes share revoke \"$NOTE\" --revoke-accepted",
|
|
93
|
+
"notes share access": "NOTE=\"release-plan\" # Your existing note id or slug.\n# List acceptance records and stored roles as a readable table.\ndreamlake notes share access \"$NOTE\"",
|
|
94
|
+
"notes share remove": "NOTE=\"release-plan\" # Your existing note id or slug.\nUSER_ID=\"user-id-from-access-list\"\ndreamlake notes share remove \"$NOTE\" \"$USER_ID\"",
|
|
95
|
+
"notes suggest-diff": "# Review a change as a new private note.\ndreamlake notes suggest-diff before.md after.md --user \"Docs review\" \\\n | dreamlake notes create \"Redline: release plan\" --file -\n# Propose edits inside the note itself; refuses changes it cannot express.\ndreamlake notes suggest-diff current.md edited.md --in-place --user \"$DREAMLAKE_AGENT_NAME\" > proposal.md\n# Count insertions, deletions, replacements and changed code blocks.\ndreamlake notes suggest-diff before.md after.md --json | jq .stats",
|
|
96
|
+
"notes transfer": "dreamlake notes transfer NOTE_ID --namespace alice --to acme \\\n --dry-run --out note-transfer.json\n# Submit the exact reviewed file; the authorized destination member accepts separately.\ndreamlake notes transfer NOTE_ID --namespace alice --to acme \\\n --confirm --request-file note-transfer.json\n# If you also have destination acceptance authority:\ndreamlake notes transfer NOTE_ID --namespace alice --to acme \\\n --confirm --request-file note-transfer.json --accept-if-authorized --wait",
|
|
97
|
+
"notes tag": "# Save the current content on the existing Note.\ndreamlake note tag NOTE_ID end-of-day --namespace my-org --summary \"Reviewed today's actions\"\n# Require the hash retained from a reviewed full read (not its opaque revision).\ndreamlake note tag NOTE_ID reviewed --hash sha256:CONTENT_HASH --json\n# Connect this checkpoint to an earlier version in the same Note.\ndreamlake note tag NOTE_ID next-checkpoint --parent VERSION_ID\n# Read and validate without creating a version.\ndreamlake note tag NOTE_ID preview --dry-run --json",
|
|
98
|
+
"notes hist": "dreamlake note hist NOTE_ID --namespace my-org --json\n# Continue with nextCursor returned by the previous page.\ndreamlake note hist NOTE_ID --before VERSION_ID --json",
|
|
99
|
+
"ownership transfer": "dreamlake ownership transfer artifact ARTIFACT_ID --namespace alice --to acme \\\n --dry-run --out artifact-transfer.json\n# Review the full access inventory and blockers, then submit that exact file.\ndreamlake ownership transfer artifact ARTIFACT_ID --namespace alice --to acme \\\n --confirm --request-file artifact-transfer.json --accept-if-authorized --wait\n# Scene resources use the canonical env adapter, only if advertised and enabled.\ndreamlake ownership transfer scene SCENE_ID --namespace alice --to acme --dry-run\n# Pipeline requires the separately advertised metadata adapter.\ndreamlake ownership transfer pipeline PIPELINE_ID --namespace alice --to acme \\\n --dry-run --out pipeline-transfer.json\n# Source requires its own enabled metadata-only capability.\ndreamlake ownership transfer source SOURCE_ID --namespace alice --to acme \\\n --dry-run --out source-transfer.json",
|
|
100
|
+
"ownership capabilities": "dreamlake ownership capabilities --namespace acme",
|
|
101
|
+
"ownership list": "dreamlake ownership list --namespace acme --direction incoming\ndreamlake ownership list --namespace acme --direction outgoing",
|
|
102
|
+
"ownership preview": "dreamlake ownership preview request.json --namespace acme",
|
|
103
|
+
"ownership create": "dreamlake ownership create reviewed-request.json --namespace acme",
|
|
104
|
+
"ownership status": "dreamlake ownership status 000000000000000000000001 --namespace acme",
|
|
105
|
+
"ownership accept": "dreamlake ownership accept 000000000000000000000001 --namespace acme",
|
|
106
|
+
"ownership reject": "dreamlake ownership reject 000000000000000000000001 --namespace acme",
|
|
107
|
+
"ownership cancel": "dreamlake ownership cancel 000000000000000000000001 --namespace acme",
|
|
108
|
+
"ownership inspect": "dreamlake ownership inspect <resource-id> --type project --namespace acme",
|
|
109
|
+
"ownership manifest": "dreamlake ownership manifest <resource-id> --type source --namespace acme",
|
|
110
|
+
"ownership restore": "dreamlake ownership restore <resource-id> --type project --namespace acme",
|
|
111
|
+
"project transfer-preview": "dreamlake project transfer-preview dreamlake --namespace geyang --to-namespace fortyfive\n# Explicitly include only reviewed Notes already filed in this project.\ndreamlake project transfer-preview dreamlake --namespace geyang --to-namespace fortyfive --include-note NOTE_ID --json",
|
|
112
|
+
"ownership snapshot": "dreamlake ownership snapshot 000000000000000000000001 --namespace acme",
|
|
113
|
+
"ownership snapshot-cleanup": "# Inspect eligibility without deleting anything (the default).\ndreamlake ownership snapshot-cleanup 000000000000000000000001 --namespace acme\n# Delete only after server retention and recovery checks pass.\ndreamlake ownership snapshot-cleanup 000000000000000000000001 --namespace acme --execute",
|
|
114
|
+
"project move": "# Save a read-only streaming review with its stable request/key.\ndreamlake project move research --namespace personal --to acme --dry-run --out project-move-review.json\n# Confirm that exact saved review; the recipient must accept separately.\ndreamlake project move research --namespace personal --to acme --confirm --request-file project-move-review.json\n# Accept only with verified destination namespace authority, then wait a bounded time.\ndreamlake project move research --namespace personal --to acme --confirm --request-file project-move-review.json --accept-if-authorized --wait",
|
|
115
|
+
"project inspect": "dreamlake project inspect research --namespace acme",
|
|
116
|
+
"project grants": "dreamlake project grants research --namespace acme",
|
|
117
|
+
"project grant": "dreamlake project grant research --namespace acme --user teammate --role WRITE\ndreamlake project grant research --namespace acme --team TEAM_ID --role READ",
|
|
118
|
+
"project revoke": "dreamlake project grants research --namespace acme\ndreamlake project revoke research GRANT_ID --namespace acme",
|
|
119
|
+
"project attach": "dreamlake project attach research --namespace acme --type note --resource \"$NOTE_ID\"",
|
|
120
|
+
"project detach": "dreamlake project detach research --namespace acme --type note --resource \"$NOTE_ID\"",
|
|
121
|
+
"provider create": "dreamlake provider create -n aws-demo --provider aws-jump-worker --json\n# Read the generated AGENT.md and terraform/ENROLLMENT.md.\n# Fill terraform/terraform.tfvars.json and terraform/backend.json explicitly.\ndreamlake provider create -n aws-demo --continue --json",
|
|
122
|
+
"provider plan": "# Requires the selected backend and authorized AWS read access.\ndreamlake provider plan -n aws-demo --json",
|
|
123
|
+
"provider machine": "dreamlake provider machine status -n aws-dev --account 123456789012 --json\ndreamlake provider machine start -n aws-dev --account 123456789012 --yes\ndreamlake provider machine terminal -n aws-dev --account 123456789012\ndreamlake provider machine stop -n aws-dev --account 123456789012 --yes",
|
|
124
|
+
"providers launch-server": "dreamlake providers launch-server team/0123456789abcdef01234567 \\\n --enrollment 1123456789abcdef01234567 \\\n --role-arn arn:aws:iam::123456789012:role/user-launch \\\n --region us-east-1 --revision 2 --request-id bind-launch-server-01 --json",
|
|
125
|
+
"providers instances launch": "dreamlake providers instances launch team/333333333333333333333333 --service-account 0123456789abcdef01234567 --host-name team/dev/worker --unix-user dreamlake-agent --request-id worker-01 --json",
|
|
126
|
+
"providers nodes": "dreamlake providers nodes team/333333333333333333333333 --json",
|
|
127
|
+
"providers instances logs": "dreamlake providers instances logs team/333333333333333333333333 --instance POD_NAME --tail 100 --json",
|
|
128
|
+
"providers instances terminate": "dreamlake providers instances terminate team/333333333333333333333333 --instance POD_NAME --request-id kube-delete-01 --json",
|
|
129
|
+
"queues slurm clusters": "dreamlake queues slurm clusters --namespace geyang",
|
|
130
|
+
"queues slurm jobs": "dreamlake queues slurm jobs CLUSTER_ID --namespace geyang\ndreamlake queues slurm jobs CLUSTER_ID --namespace geyang --details\ndreamlake queues slurm jobs CLUSTER_ID --namespace geyang --json",
|
|
131
|
+
"runnable run": "dreamlake runnable run udf/NAMESPACE/NAME@FULL_SHA256 \\\n --target NAMESPACE/GROUP/HOST --enrollment-id ENROLLMENT_ID \\\n --request-id YOUR_STABLE_REQUEST_ID --inputs inputs.json --json",
|
|
132
|
+
"runnable receipt": "dreamlake runnable receipt NAMESPACE/RUN_ID --json",
|
|
133
|
+
"runnable register": "dreamlake runnable register .dreamrc --dry-run\ndreamlake runnable register .dreamrc --namespace acme",
|
|
134
|
+
"scene push": "dreamlake scene push ./cartpole # name defaults to the dir name\ndreamlake scene push ./scenes/cassie \\\n --name cassie --entry scene.mjcf \\\n --title \"Agility Cassie\" --visibility public\n# A composed scene whose stack still references local layers is refused —\n# push the layers as scenes first, or push anyway with marked provenance.\ndreamlake scene push ./kitchen-g1 --push-layers\ndreamlake scene push ./kitchen-g1 --allow-local",
|
|
135
|
+
"scene compose": "dreamlake scene compose # stack: ./dreamlake.layers.json\ndreamlake scene compose ./kitchen-g1/dreamlake.layers.json -o ./composed\ndreamlake scene compose --force # write into a non-empty out dir",
|
|
136
|
+
"service-accounts": "dreamlake service-accounts create my-team --name dreamfs-worker --description \"DreamFS development daemon\"\ndreamlake service-accounts list my-team\ndreamlake service-accounts show my-team/0123456789abcdef01234567",
|
|
137
|
+
"service-accounts create": "dreamlake service-accounts create my-team --name dreamfs-worker --description \"DreamFS development daemon\"",
|
|
138
|
+
"service-accounts list": "dreamlake service-accounts list my-team --page 1 --page-size 50 --json",
|
|
139
|
+
"service-accounts show": "dreamlake service-accounts show my-team/0123456789abcdef01234567 --json",
|
|
140
|
+
"service-accounts project-grants": "dreamlake service-accounts project-grants set my-team/0123456789abcdef01234567 --project 111111111111111111111111 --role READ\ndreamlake service-accounts project-grants remove my-team/0123456789abcdef01234567 --project 111111111111111111111111",
|
|
141
|
+
"service-accounts project-grants set": "dreamlake service-accounts project-grants set my-team/0123456789abcdef01234567 --project 111111111111111111111111 --role READ",
|
|
142
|
+
"service-accounts project-grants remove": "dreamlake service-accounts project-grants remove my-team/0123456789abcdef01234567 --project 111111111111111111111111",
|
|
143
|
+
"service-accounts host-grants": "dreamlake service-accounts host-grants set my-team/0123456789abcdef01234567 --host 222222222222222222222222 --read --use\ndreamlake service-accounts host-grants remove my-team/0123456789abcdef01234567 --host 222222222222222222222222",
|
|
144
|
+
"service-accounts host-grants set": "dreamlake service-accounts host-grants set my-team/0123456789abcdef01234567 --host 222222222222222222222222 --read --use",
|
|
145
|
+
"service-accounts host-grants remove": "dreamlake service-accounts host-grants remove my-team/0123456789abcdef01234567 --host 222222222222222222222222",
|
|
146
|
+
"service-accounts bind": "dreamlake service-accounts bind my-team/0123456789abcdef01234567 --enrollment 444444444444444444444444",
|
|
147
|
+
"service-accounts revoke": "dreamlake service-accounts revoke my-team/0123456789abcdef01234567",
|
|
148
|
+
"sessions visibility": "dreamlake sessions visibility <saved-id> --namespace <personal-namespace> --visibility private",
|
|
149
|
+
"sessions register": "dreamlake sessions register --provider codex --session <native-uuid> --cwd /absolute/repository --json\n# Explicit private override for a new registration:\ndreamlake sessions register --provider claude --session <native-uuid> --cwd /absolute/repository --visibility private --json",
|
|
150
|
+
"sessions link": "dreamlake sessions link SESSION_ID --namespace geyang \\\n --resource-namespace fortyfive --note NOTE_ID --json\ndreamlake sessions link SESSION_ID --namespace geyang \\\n --resource-namespace fortyfive --artifact loss-plot --json",
|
|
151
|
+
"sessions unlink": "dreamlake sessions unlink SESSION_ID --namespace geyang \\\n --resource-namespace fortyfive --artifact loss-plot --json",
|
|
152
|
+
"sessions resources": "dreamlake sessions resources SESSION_ID --namespace geyang --page-size 25 --json",
|
|
153
|
+
"sessions": "dreamlake sessions targets --namespace geyang\ndreamlake sessions list --namespace geyang",
|
|
154
|
+
"sessions targets": "dreamlake sessions targets --namespace geyang --json",
|
|
155
|
+
"sessions resume": "dreamlake sessions resume 01a13cbc-d4a7-7893-81cc-39696769c454 \\\n --namespace geyang --target TARGET_ID \\\n --cwd /home/ubuntu/workspace-3",
|
|
156
|
+
"sessions create": "dreamlake sessions create --namespace geyang \\\n --target TARGET_ID \\\n --cwd /home/ubuntu/workspace-3 \\\n --codex-session 01a13cbc-d4a7-7893-81cc-39696769c454 \\\n --name 'Workspace 3' --json",
|
|
157
|
+
"sessions list": "dreamlake sessions list --namespace geyang --json",
|
|
158
|
+
"sessions show": "dreamlake sessions show SESSION_ID --namespace geyang --json",
|
|
159
|
+
"sessions open": "dreamlake sessions open SESSION_ID --namespace geyang",
|
|
160
|
+
"sessions status": "dreamlake sessions status SESSION_ID --namespace geyang --json",
|
|
161
|
+
"sessions start": "dreamlake sessions start SESSION_ID --namespace geyang --json",
|
|
162
|
+
"sessions reconnect": "dreamlake sessions reconnect SESSION_ID --namespace geyang",
|
|
163
|
+
"sessions stop": "dreamlake sessions stop SESSION_ID --namespace geyang --yes --json",
|
|
164
|
+
"sessions sync": "dreamlake sessions sync --namespace geyang --target TARGET_ID --json\ndreamlake sessions sync --namespace geyang --all --json",
|
|
165
|
+
"sessions upload-conversation": "dreamlake sessions upload-conversation SESSION_ID --namespace geyang \\\n --file /absolute/path/to/conversation.jsonl --json",
|
|
166
|
+
"sessions serve": "dreamlake sessions serve\n# Handle one command and exit (useful in scripts and tests):\ndreamlake sessions serve --once --json",
|
|
167
|
+
"sessions runners": "dreamlake sessions runners",
|
|
168
|
+
"sessions control start": "dreamlake sessions control start --provider claude --repo /abs/repo --isolation worktree --branch feat/x --permission workspace-write --prompt \"Run the tests and report\" --name \"Test runner\"\n# Reuse the checkout as is, headless:\ndreamlake sessions control start --provider codex --repo /abs/repo --isolation repo --permission read-only --mode headless --prompt \"Summarize open TODOs\"",
|
|
169
|
+
"sessions control send": "dreamlake sessions control send <session-id> \"Please rebase on main and rerun CI\"\n# A headless turn for a session registered elsewhere needs an explicit ceiling:\ndreamlake sessions control send <session-id> \"Summarize your state\" --permission read-only",
|
|
170
|
+
"sessions control broadcast": "dreamlake sessions control broadcast \"Stop and summarize your state\" --session <id-1> <id-2>",
|
|
171
|
+
"sessions control resume": "dreamlake sessions control resume <session-id> --prompt \"Continue\"",
|
|
172
|
+
"sessions control stop": "dreamlake sessions control stop <session-id> --yes",
|
|
173
|
+
"sessions control status": "dreamlake sessions control status <session-id>\ndreamlake sessions control sync <session-id>\ndreamlake sessions control subagents <session-id>",
|
|
174
|
+
"sessions control list": "dreamlake sessions control list --session <session-id>\ndreamlake sessions control wait <command-id> --wait 120\ndreamlake sessions control cancel <command-id>",
|
|
175
|
+
"sessions archive": "dreamlake sessions rename <session-id> \"Flaky test hunt\"\ndreamlake sessions archive <session-id>\ndreamlake sessions unarchive <session-id>",
|
|
176
|
+
"sessions chat": "dreamlake sessions chat \"Which of my sessions need attention?\"\n# Allow lifecycle and messaging tools this turn:\ndreamlake sessions chat --control \"Send 'rebase on main' to the two Claude sessions working on notes\"",
|
|
177
|
+
"sessions tool-calls": "dreamlake sessions tool-calls <conversation-id>",
|
|
178
|
+
"dreamlake": "# Guided agent setup: choose agent and scope, install dreamlake-cli offline\ndreamlake init\n# Install more skills from the public release\ndreamlake skill install dreamlake-notes\n# Keep installed skills current\ndreamlake skill update",
|
|
179
|
+
"init": "dreamlake init\ndreamlake init --agent codex\ndreamlake init --agent claude --global",
|
|
180
|
+
"skill": "dreamlake skill list\ndreamlake skill install dreamlake-notes\ndreamlake skill update\ndreamlake skill remove dreamlake-notes",
|
|
181
|
+
"skill list": "dreamlake skill list\n# Fetch the latest catalog and show it next to the installed versions\ndreamlake skill list --refresh\ndreamlake skill list --agent codex --json",
|
|
182
|
+
"skill install": "# The embedded dreamlake-cli skill; offline when it matches the release\ndreamlake skill install dreamlake-cli\n# A catalog skill plus whatever it requires, from the latest release\ndreamlake skill install dreamlake-notes --agent codex\n# Replace files you edited with the release copies\ndreamlake skill install dreamlake-notes --force",
|
|
183
|
+
"skill update": "# Every skill with a manifest in the selected scope\ndreamlake skill update\ndreamlake skill update dreamlake-cli --global\n# Overwrite edited files; retired files you edited are still kept\ndreamlake skill update dreamlake-notes --force\n# Go back to an older release, or replace a copy whose version cannot be ordered\ndreamlake skill update dreamlake-notes --allow-downgrade",
|
|
184
|
+
"skill remove": "dreamlake skill remove dreamlake-notes\ndreamlake skill remove dreamlake-notes --agent codex --global --json",
|
|
185
|
+
"vault cloud import": "# No --file: list standard candidate paths without opening their contents.\ndreamlake vault cloud import --provider aws -p alice/aws/dev\n# Explicit selections: preview names, sizes and profile metadata, without upload.\ndreamlake vault cloud import --provider aws -p alice/aws/dev \\\n --file \"$HOME/.aws/config\" --file \"$HOME/.aws/credentials\"\n# Repeat the selection with --apply to upload.\ndreamlake vault cloud import --provider aws -p alice/aws/dev \\\n --file \"$HOME/.aws/config\" --file \"$HOME/.aws/credentials\" --apply\ndreamlake vault cloud import --provider gcp -p alice/gcp/dev \\\n --file /private/config/service-account.json --apply",
|
|
186
|
+
"vault cloud restore": "# Preview checks metadata and destination without retrieving the secret.\ndreamlake vault cloud restore -n alice/aws/dev/credentials \\\n --to '~/.aws/credentials'\n# Write only after explicit --apply; existing files additionally need --overwrite.\ndreamlake vault cloud restore -n alice/aws/dev/credentials \\\n --to '~/.aws/credentials' --apply",
|
|
187
|
+
"vault list": "# Interactive on a terminal; JSON when piped or redirected.\ndreamlake vault list -p alice\n# Always emit metadata JSON.\ndreamlake vault list -p alice --to-json",
|
|
188
|
+
"vault delete": "# Use a disposable entry and its current metadata revision.\ndreamlake vault --scope org:000000000000000000000001 delete \\\n --name acme/test-entry --if-match 1",
|
|
189
|
+
"vault terraform backend": "chmod 600 ./backend-reference.json\ndreamlake vault terraform backend --file ./backend-reference.json --name alice/terraform/aws-demo\n# Upload only after explicitly selecting the file and destination.\ndreamlake vault terraform backend --file ./backend-reference.json --name alice/terraform/aws-demo --apply --request-id aws-demo-backend-001",
|
|
190
|
+
"vault terraform backup": "dreamlake vault terraform backup --file /private/aws-demo.snapshot.json --prefix alice/terraform/backups\n# This is an explicit upload of this selected sensitive file.\ndreamlake vault terraform backup --file /private/aws-demo.snapshot.json --prefix alice/terraform/backups --apply --request-id aws-demo-snapshot-001",
|
|
191
|
+
"vault terraform restore": "dreamlake vault terraform restore --name alice/terraform/backups/state-SHA256 --if-match 1 --current-state /private/current.snapshot.json --to /private/recovery/candidate.snapshot.json\n# Explicitly write the verified candidate into a new file.\ndreamlake vault terraform restore --name alice/terraform/backups/state-SHA256 --if-match 1 --current-state /private/current.snapshot.json --to /private/recovery/candidate.snapshot.json --apply"
|
|
192
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function ok(line: string): void;
|
|
2
|
+
export declare function warn(line: string): void;
|
|
3
|
+
export declare function fail(line: string): void;
|
|
4
|
+
export declare function splitCsv(raw: string | undefined): string[];
|
|
5
|
+
export declare function renderTable(rows: Record<string, unknown>[], cols: string[]): string;
|
|
6
|
+
export declare function emitJson(value: unknown): void;
|
|
7
|
+
export declare function loadStructuredFile(filePath: string): Record<string, unknown>;
|
|
8
|
+
export declare function humanSize(bytes: number): string;
|