@cuna_labs/cli 0.1.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/LICENSE +201 -0
- package/NOTICE +9 -0
- package/README.md +169 -0
- package/THIRD_PARTY_NOTICES.md +29 -0
- package/dist/api/capability-evidence.d.ts +19 -0
- package/dist/api/capability-evidence.d.ts.map +1 -0
- package/dist/api/capability-evidence.js +38 -0
- package/dist/api/capability-evidence.js.map +1 -0
- package/dist/api/client.d.ts +167 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +937 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/contracts.d.ts +345 -0
- package/dist/api/contracts.d.ts.map +1 -0
- package/dist/api/contracts.js +976 -0
- package/dist/api/contracts.js.map +1 -0
- package/dist/api/execution-workspaces.d.ts +17 -0
- package/dist/api/execution-workspaces.d.ts.map +1 -0
- package/dist/api/execution-workspaces.js +46 -0
- package/dist/api/execution-workspaces.js.map +1 -0
- package/dist/api/http.d.ts +76 -0
- package/dist/api/http.d.ts.map +1 -0
- package/dist/api/http.js +838 -0
- package/dist/api/http.js.map +1 -0
- package/dist/api/managed-executions.d.ts +37 -0
- package/dist/api/managed-executions.d.ts.map +1 -0
- package/dist/api/managed-executions.js +80 -0
- package/dist/api/managed-executions.js.map +1 -0
- package/dist/api/observer-v2-schema.d.ts +206 -0
- package/dist/api/observer-v2-schema.d.ts.map +1 -0
- package/dist/api/observer-v2-schema.js +264 -0
- package/dist/api/observer-v2-schema.js.map +1 -0
- package/dist/api/observer-v2.d.ts +33 -0
- package/dist/api/observer-v2.d.ts.map +1 -0
- package/dist/api/observer-v2.js +60 -0
- package/dist/api/observer-v2.js.map +1 -0
- package/dist/api/owner-observe-grants-v2-schema.d.ts +678 -0
- package/dist/api/owner-observe-grants-v2-schema.d.ts.map +1 -0
- package/dist/api/owner-observe-grants-v2-schema.js +887 -0
- package/dist/api/owner-observe-grants-v2-schema.js.map +1 -0
- package/dist/api/owner-observe-grants-v2.d.ts +268 -0
- package/dist/api/owner-observe-grants-v2.d.ts.map +1 -0
- package/dist/api/owner-observe-grants-v2.js +604 -0
- package/dist/api/owner-observe-grants-v2.js.map +1 -0
- package/dist/api/provider-v2-schema.d.ts +293 -0
- package/dist/api/provider-v2-schema.d.ts.map +1 -0
- package/dist/api/provider-v2-schema.js +381 -0
- package/dist/api/provider-v2-schema.js.map +1 -0
- package/dist/api/provider-v2.d.ts +55 -0
- package/dist/api/provider-v2.d.ts.map +1 -0
- package/dist/api/provider-v2.js +54 -0
- package/dist/api/provider-v2.js.map +1 -0
- package/dist/api/remote-workspace.d.ts +29 -0
- package/dist/api/remote-workspace.d.ts.map +1 -0
- package/dist/api/remote-workspace.js +62 -0
- package/dist/api/remote-workspace.js.map +1 -0
- package/dist/api/supervisor-live-update.d.ts +248 -0
- package/dist/api/supervisor-live-update.d.ts.map +1 -0
- package/dist/api/supervisor-live-update.js +434 -0
- package/dist/api/supervisor-live-update.js.map +1 -0
- package/dist/api/terminal-reason.d.ts +5 -0
- package/dist/api/terminal-reason.d.ts.map +1 -0
- package/dist/api/terminal-reason.js +12 -0
- package/dist/api/terminal-reason.js.map +1 -0
- package/dist/auth/browser-handoff.d.ts +59 -0
- package/dist/auth/browser-handoff.d.ts.map +1 -0
- package/dist/auth/browser-handoff.js +33 -0
- package/dist/auth/browser-handoff.js.map +1 -0
- package/dist/auth/browser.d.ts +11 -0
- package/dist/auth/browser.d.ts.map +1 -0
- package/dist/auth/browser.js +47 -0
- package/dist/auth/browser.js.map +1 -0
- package/dist/auth/human-client.d.ts +39 -0
- package/dist/auth/human-client.d.ts.map +1 -0
- package/dist/auth/human-client.js +66 -0
- package/dist/auth/human-client.js.map +1 -0
- package/dist/auth/human-contracts.d.ts +52 -0
- package/dist/auth/human-contracts.d.ts.map +1 -0
- package/dist/auth/human-contracts.js +229 -0
- package/dist/auth/human-contracts.js.map +1 -0
- package/dist/auth/human-session.d.ts +48 -0
- package/dist/auth/human-session.d.ts.map +1 -0
- package/dist/auth/human-session.js +902 -0
- package/dist/auth/human-session.js.map +1 -0
- package/dist/auth/onboarding-state.d.ts +31 -0
- package/dist/auth/onboarding-state.d.ts.map +1 -0
- package/dist/auth/onboarding-state.js +52 -0
- package/dist/auth/onboarding-state.js.map +1 -0
- package/dist/auth/pkce.d.ts +15 -0
- package/dist/auth/pkce.d.ts.map +1 -0
- package/dist/auth/pkce.js +19 -0
- package/dist/auth/pkce.js.map +1 -0
- package/dist/bin/cuna.d.ts +3 -0
- package/dist/bin/cuna.d.ts.map +1 -0
- package/dist/bin/cuna.js +4 -0
- package/dist/bin/cuna.js.map +1 -0
- package/dist/build-identity.d.ts +20 -0
- package/dist/build-identity.d.ts.map +1 -0
- package/dist/build-identity.js +77 -0
- package/dist/build-identity.js.map +1 -0
- package/dist/cli/command-help.d.ts +9 -0
- package/dist/cli/command-help.d.ts.map +1 -0
- package/dist/cli/command-help.js +324 -0
- package/dist/cli/command-help.js.map +1 -0
- package/dist/cli/help.d.ts +40 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/help.js +256 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/output.d.ts +28 -0
- package/dist/cli/output.d.ts.map +1 -0
- package/dist/cli/output.js +95 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/cli/parser.d.ts +65 -0
- package/dist/cli/parser.d.ts.map +1 -0
- package/dist/cli/parser.js +294 -0
- package/dist/cli/parser.js.map +1 -0
- package/dist/cli/process-entrypoint.d.ts +18 -0
- package/dist/cli/process-entrypoint.d.ts.map +1 -0
- package/dist/cli/process-entrypoint.js +26 -0
- package/dist/cli/process-entrypoint.js.map +1 -0
- package/dist/cli/run.d.ts +114 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +1969 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/commands/commands.d.ts +74 -0
- package/dist/commands/commands.d.ts.map +1 -0
- package/dist/commands/commands.js +2814 -0
- package/dist/commands/commands.js.map +1 -0
- package/dist/config/config.d.ts +86 -0
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/config.js +323 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/infra-contract-witness.d.ts +29 -0
- package/dist/config/infra-contract-witness.d.ts.map +1 -0
- package/dist/config/infra-contract-witness.js +30 -0
- package/dist/config/infra-contract-witness.js.map +1 -0
- package/dist/core/browser-url.d.ts +2 -0
- package/dist/core/browser-url.d.ts.map +1 -0
- package/dist/core/browser-url.js +20 -0
- package/dist/core/browser-url.js.map +1 -0
- package/dist/core/deployed-wire-compatibility.d.ts +15 -0
- package/dist/core/deployed-wire-compatibility.d.ts.map +1 -0
- package/dist/core/deployed-wire-compatibility.js +15 -0
- package/dist/core/deployed-wire-compatibility.js.map +1 -0
- package/dist/core/errors.d.ts +59 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +82 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/exit-codes.d.ts +68 -0
- package/dist/core/exit-codes.d.ts.map +1 -0
- package/dist/core/exit-codes.js +84 -0
- package/dist/core/exit-codes.js.map +1 -0
- package/dist/core/instant.d.ts +60 -0
- package/dist/core/instant.d.ts.map +1 -0
- package/dist/core/instant.js +90 -0
- package/dist/core/instant.js.map +1 -0
- package/dist/core/namespace.d.ts +171 -0
- package/dist/core/namespace.d.ts.map +1 -0
- package/dist/core/namespace.js +227 -0
- package/dist/core/namespace.js.map +1 -0
- package/dist/core/observation-budget.d.ts +185 -0
- package/dist/core/observation-budget.d.ts.map +1 -0
- package/dist/core/observation-budget.js +209 -0
- package/dist/core/observation-budget.js.map +1 -0
- package/dist/core/product-web.d.ts +81 -0
- package/dist/core/product-web.d.ts.map +1 -0
- package/dist/core/product-web.js +87 -0
- package/dist/core/product-web.js.map +1 -0
- package/dist/core/validation.d.ts +90 -0
- package/dist/core/validation.d.ts.map +1 -0
- package/dist/core/validation.js +199 -0
- package/dist/core/validation.js.map +1 -0
- package/dist/credentials/contracts.d.ts +82 -0
- package/dist/credentials/contracts.d.ts.map +1 -0
- package/dist/credentials/contracts.js +2 -0
- package/dist/credentials/contracts.js.map +1 -0
- package/dist/credentials/errors.d.ts +19 -0
- package/dist/credentials/errors.d.ts.map +1 -0
- package/dist/credentials/errors.js +16 -0
- package/dist/credentials/errors.js.map +1 -0
- package/dist/credentials/index.d.ts +6 -0
- package/dist/credentials/index.d.ts.map +1 -0
- package/dist/credentials/index.js +6 -0
- package/dist/credentials/index.js.map +1 -0
- package/dist/credentials/local-session.d.ts +101 -0
- package/dist/credentials/local-session.d.ts.map +1 -0
- package/dist/credentials/local-session.js +839 -0
- package/dist/credentials/local-session.js.map +1 -0
- package/dist/credentials/secret-material.d.ts +17 -0
- package/dist/credentials/secret-material.d.ts.map +1 -0
- package/dist/credentials/secret-material.js +49 -0
- package/dist/credentials/secret-material.js.map +1 -0
- package/dist/credentials/vault.d.ts +41 -0
- package/dist/credentials/vault.d.ts.map +1 -0
- package/dist/credentials/vault.js +719 -0
- package/dist/credentials/vault.js.map +1 -0
- package/dist/daemon/endpoint.d.ts +29 -0
- package/dist/daemon/endpoint.d.ts.map +1 -0
- package/dist/daemon/endpoint.js +66 -0
- package/dist/daemon/endpoint.js.map +1 -0
- package/dist/daemon/journal.d.ts +62 -0
- package/dist/daemon/journal.d.ts.map +1 -0
- package/dist/daemon/journal.js +299 -0
- package/dist/daemon/journal.js.map +1 -0
- package/dist/daemon/lease.d.ts +25 -0
- package/dist/daemon/lease.d.ts.map +1 -0
- package/dist/daemon/lease.js +94 -0
- package/dist/daemon/lease.js.map +1 -0
- package/dist/daemon/lifecycle.d.ts +14 -0
- package/dist/daemon/lifecycle.d.ts.map +1 -0
- package/dist/daemon/lifecycle.js +29 -0
- package/dist/daemon/lifecycle.js.map +1 -0
- package/dist/daemon/protocol.d.ts +65 -0
- package/dist/daemon/protocol.d.ts.map +1 -0
- package/dist/daemon/protocol.js +194 -0
- package/dist/daemon/protocol.js.map +1 -0
- package/dist/daemon/supervisor.d.ts +29 -0
- package/dist/daemon/supervisor.d.ts.map +1 -0
- package/dist/daemon/supervisor.js +87 -0
- package/dist/daemon/supervisor.js.map +1 -0
- package/dist/daemon/views.d.ts +31 -0
- package/dist/daemon/views.d.ts.map +1 -0
- package/dist/daemon/views.js +86 -0
- package/dist/daemon/views.js.map +1 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/journey/api-effects.d.ts +59 -0
- package/dist/journey/api-effects.d.ts.map +1 -0
- package/dist/journey/api-effects.js +386 -0
- package/dist/journey/api-effects.js.map +1 -0
- package/dist/journey/derived-identity.d.ts +91 -0
- package/dist/journey/derived-identity.d.ts.map +1 -0
- package/dist/journey/derived-identity.js +123 -0
- package/dist/journey/derived-identity.js.map +1 -0
- package/dist/journey/index.d.ts +6 -0
- package/dist/journey/index.d.ts.map +1 -0
- package/dist/journey/index.js +6 -0
- package/dist/journey/index.js.map +1 -0
- package/dist/journey/intent.d.ts +36 -0
- package/dist/journey/intent.d.ts.map +1 -0
- package/dist/journey/intent.js +191 -0
- package/dist/journey/intent.js.map +1 -0
- package/dist/journey/orchestrator.d.ts +140 -0
- package/dist/journey/orchestrator.d.ts.map +1 -0
- package/dist/journey/orchestrator.js +415 -0
- package/dist/journey/orchestrator.js.map +1 -0
- package/dist/journey/provider-launch-intent.d.ts +12 -0
- package/dist/journey/provider-launch-intent.d.ts.map +1 -0
- package/dist/journey/provider-launch-intent.js +40 -0
- package/dist/journey/provider-launch-intent.js.map +1 -0
- package/dist/journey/remote-workspace.d.ts +34 -0
- package/dist/journey/remote-workspace.d.ts.map +1 -0
- package/dist/journey/remote-workspace.js +91 -0
- package/dist/journey/remote-workspace.js.map +1 -0
- package/dist/journey/root-entry.d.ts +56 -0
- package/dist/journey/root-entry.d.ts.map +1 -0
- package/dist/journey/root-entry.js +19 -0
- package/dist/journey/root-entry.js.map +1 -0
- package/dist/journey/selection.d.ts +165 -0
- package/dist/journey/selection.d.ts.map +1 -0
- package/dist/journey/selection.js +565 -0
- package/dist/journey/selection.js.map +1 -0
- package/dist/journey/session-failure.d.ts +4 -0
- package/dist/journey/session-failure.d.ts.map +1 -0
- package/dist/journey/session-failure.js +28 -0
- package/dist/journey/session-failure.js.map +1 -0
- package/dist/journey/workspace-effects.d.ts +30 -0
- package/dist/journey/workspace-effects.d.ts.map +1 -0
- package/dist/journey/workspace-effects.js +348 -0
- package/dist/journey/workspace-effects.js.map +1 -0
- package/dist/local-actions/broker.d.ts +32 -0
- package/dist/local-actions/broker.d.ts.map +1 -0
- package/dist/local-actions/broker.js +400 -0
- package/dist/local-actions/broker.js.map +1 -0
- package/dist/local-actions/browser-action.d.ts +78 -0
- package/dist/local-actions/browser-action.d.ts.map +1 -0
- package/dist/local-actions/browser-action.js +307 -0
- package/dist/local-actions/browser-action.js.map +1 -0
- package/dist/local-actions/callback-relay.d.ts +45 -0
- package/dist/local-actions/callback-relay.d.ts.map +1 -0
- package/dist/local-actions/callback-relay.js +265 -0
- package/dist/local-actions/callback-relay.js.map +1 -0
- package/dist/local-actions/clipboard.d.ts +3 -0
- package/dist/local-actions/clipboard.d.ts.map +1 -0
- package/dist/local-actions/clipboard.js +18 -0
- package/dist/local-actions/clipboard.js.map +1 -0
- package/dist/local-actions/contracts.d.ts +63 -0
- package/dist/local-actions/contracts.d.ts.map +1 -0
- package/dist/local-actions/contracts.js +18 -0
- package/dist/local-actions/contracts.js.map +1 -0
- package/dist/local-actions/desktop-presentation.d.ts +141 -0
- package/dist/local-actions/desktop-presentation.d.ts.map +1 -0
- package/dist/local-actions/desktop-presentation.js +253 -0
- package/dist/local-actions/desktop-presentation.js.map +1 -0
- package/dist/local-actions/device-selection.d.ts +43 -0
- package/dist/local-actions/device-selection.d.ts.map +1 -0
- package/dist/local-actions/device-selection.js +154 -0
- package/dist/local-actions/device-selection.js.map +1 -0
- package/dist/local-actions/executor.d.ts +49 -0
- package/dist/local-actions/executor.d.ts.map +1 -0
- package/dist/local-actions/executor.js +329 -0
- package/dist/local-actions/executor.js.map +1 -0
- package/dist/local-actions/file-transfers.d.ts +141 -0
- package/dist/local-actions/file-transfers.d.ts.map +1 -0
- package/dist/local-actions/file-transfers.js +446 -0
- package/dist/local-actions/file-transfers.js.map +1 -0
- package/dist/local-actions/foreground-notifications.d.ts +45 -0
- package/dist/local-actions/foreground-notifications.d.ts.map +1 -0
- package/dist/local-actions/foreground-notifications.js +163 -0
- package/dist/local-actions/foreground-notifications.js.map +1 -0
- package/dist/local-actions/git-signing.d.ts +39 -0
- package/dist/local-actions/git-signing.d.ts.map +1 -0
- package/dist/local-actions/git-signing.js +135 -0
- package/dist/local-actions/git-signing.js.map +1 -0
- package/dist/local-actions/index.d.ts +19 -0
- package/dist/local-actions/index.d.ts.map +1 -0
- package/dist/local-actions/index.js +19 -0
- package/dist/local-actions/index.js.map +1 -0
- package/dist/local-actions/local-service-actions.d.ts +87 -0
- package/dist/local-actions/local-service-actions.d.ts.map +1 -0
- package/dist/local-actions/local-service-actions.js +347 -0
- package/dist/local-actions/local-service-actions.js.map +1 -0
- package/dist/local-actions/loopback.d.ts +5 -0
- package/dist/local-actions/loopback.d.ts.map +1 -0
- package/dist/local-actions/loopback.js +15 -0
- package/dist/local-actions/loopback.js.map +1 -0
- package/dist/local-actions/policy-store.d.ts +7 -0
- package/dist/local-actions/policy-store.d.ts.map +1 -0
- package/dist/local-actions/policy-store.js +70 -0
- package/dist/local-actions/policy-store.js.map +1 -0
- package/dist/local-actions/policy.d.ts +21 -0
- package/dist/local-actions/policy.d.ts.map +1 -0
- package/dist/local-actions/policy.js +43 -0
- package/dist/local-actions/policy.js.map +1 -0
- package/dist/local-actions/private-port-forward.d.ts +36 -0
- package/dist/local-actions/private-port-forward.d.ts.map +1 -0
- package/dist/local-actions/private-port-forward.js +154 -0
- package/dist/local-actions/private-port-forward.js.map +1 -0
- package/dist/local-actions/provider-mcp-config.d.ts +101 -0
- package/dist/local-actions/provider-mcp-config.d.ts.map +1 -0
- package/dist/local-actions/provider-mcp-config.js +166 -0
- package/dist/local-actions/provider-mcp-config.js.map +1 -0
- package/dist/local-actions/providers.d.ts +12 -0
- package/dist/local-actions/providers.d.ts.map +1 -0
- package/dist/local-actions/providers.js +42 -0
- package/dist/local-actions/providers.js.map +1 -0
- package/dist/local-actions/schemas.d.ts +4 -0
- package/dist/local-actions/schemas.d.ts.map +1 -0
- package/dist/local-actions/schemas.js +314 -0
- package/dist/local-actions/schemas.js.map +1 -0
- package/dist/local-actions/sensitive-consent.d.ts +32 -0
- package/dist/local-actions/sensitive-consent.d.ts.map +1 -0
- package/dist/local-actions/sensitive-consent.js +47 -0
- package/dist/local-actions/sensitive-consent.js.map +1 -0
- package/dist/machines/command-launch.d.ts +17 -0
- package/dist/machines/command-launch.d.ts.map +1 -0
- package/dist/machines/command-launch.js +52 -0
- package/dist/machines/command-launch.js.map +1 -0
- package/dist/machines/execution-receipt.d.ts +18 -0
- package/dist/machines/execution-receipt.d.ts.map +1 -0
- package/dist/machines/execution-receipt.js +87 -0
- package/dist/machines/execution-receipt.js.map +1 -0
- package/dist/machines/executions-screen.d.ts +6 -0
- package/dist/machines/executions-screen.d.ts.map +1 -0
- package/dist/machines/executions-screen.js +410 -0
- package/dist/machines/executions-screen.js.map +1 -0
- package/dist/machines/explorer.d.ts +75 -0
- package/dist/machines/explorer.d.ts.map +1 -0
- package/dist/machines/explorer.js +1726 -0
- package/dist/machines/explorer.js.map +1 -0
- package/dist/machines/live-supervisor-update.d.ts +325 -0
- package/dist/machines/live-supervisor-update.d.ts.map +1 -0
- package/dist/machines/live-supervisor-update.js +513 -0
- package/dist/machines/live-supervisor-update.js.map +1 -0
- package/dist/machines/machine-first.d.ts +123 -0
- package/dist/machines/machine-first.d.ts.map +1 -0
- package/dist/machines/machine-first.js +119 -0
- package/dist/machines/machine-first.js.map +1 -0
- package/dist/machines/opencode-supervisor.d.ts +51 -0
- package/dist/machines/opencode-supervisor.d.ts.map +1 -0
- package/dist/machines/opencode-supervisor.js +124 -0
- package/dist/machines/opencode-supervisor.js.map +1 -0
- package/dist/machines/pagination.d.ts +4 -0
- package/dist/machines/pagination.d.ts.map +1 -0
- package/dist/machines/pagination.js +7 -0
- package/dist/machines/pagination.js.map +1 -0
- package/dist/machines/provider-availability.d.ts +42 -0
- package/dist/machines/provider-availability.d.ts.map +1 -0
- package/dist/machines/provider-availability.js +82 -0
- package/dist/machines/provider-availability.js.map +1 -0
- package/dist/machines/provider-screen.d.ts +12 -0
- package/dist/machines/provider-screen.d.ts.map +1 -0
- package/dist/machines/provider-screen.js +129 -0
- package/dist/machines/provider-screen.js.map +1 -0
- package/dist/machines/session-actionability.d.ts +86 -0
- package/dist/machines/session-actionability.d.ts.map +1 -0
- package/dist/machines/session-actionability.js +125 -0
- package/dist/machines/session-actionability.js.map +1 -0
- package/dist/machines/session-visibility.d.ts +139 -0
- package/dist/machines/session-visibility.d.ts.map +1 -0
- package/dist/machines/session-visibility.js +109 -0
- package/dist/machines/session-visibility.js.map +1 -0
- package/dist/platform/adapter.d.ts +62 -0
- package/dist/platform/adapter.d.ts.map +1 -0
- package/dist/platform/adapter.js +240 -0
- package/dist/platform/adapter.js.map +1 -0
- package/dist/platform/support.d.ts +12 -0
- package/dist/platform/support.d.ts.map +1 -0
- package/dist/platform/support.js +25 -0
- package/dist/platform/support.js.map +1 -0
- package/dist/pty/contracts.d.ts +45 -0
- package/dist/pty/contracts.d.ts.map +1 -0
- package/dist/pty/contracts.js +2 -0
- package/dist/pty/contracts.js.map +1 -0
- package/dist/pty/evidence-gate.d.ts +14 -0
- package/dist/pty/evidence-gate.d.ts.map +1 -0
- package/dist/pty/evidence-gate.js +35 -0
- package/dist/pty/evidence-gate.js.map +1 -0
- package/dist/pty/index.d.ts +5 -0
- package/dist/pty/index.d.ts.map +1 -0
- package/dist/pty/index.js +5 -0
- package/dist/pty/index.js.map +1 -0
- package/dist/pty/node-host-terminal.d.ts +14 -0
- package/dist/pty/node-host-terminal.d.ts.map +1 -0
- package/dist/pty/node-host-terminal.js +173 -0
- package/dist/pty/node-host-terminal.js.map +1 -0
- package/dist/pty/node-process.d.ts +26 -0
- package/dist/pty/node-process.d.ts.map +1 -0
- package/dist/pty/node-process.js +102 -0
- package/dist/pty/node-process.js.map +1 -0
- package/dist/runtime/api-terminal-control-plane.d.ts +7 -0
- package/dist/runtime/api-terminal-control-plane.d.ts.map +1 -0
- package/dist/runtime/api-terminal-control-plane.js +95 -0
- package/dist/runtime/api-terminal-control-plane.js.map +1 -0
- package/dist/runtime/backoff.d.ts +17 -0
- package/dist/runtime/backoff.d.ts.map +1 -0
- package/dist/runtime/backoff.js +61 -0
- package/dist/runtime/backoff.js.map +1 -0
- package/dist/runtime/boundary.d.ts +171 -0
- package/dist/runtime/boundary.d.ts.map +1 -0
- package/dist/runtime/boundary.js +1858 -0
- package/dist/runtime/boundary.js.map +1 -0
- package/dist/runtime/capability-gate.d.ts +25 -0
- package/dist/runtime/capability-gate.d.ts.map +1 -0
- package/dist/runtime/capability-gate.js +77 -0
- package/dist/runtime/capability-gate.js.map +1 -0
- package/dist/runtime/contracts.d.ts +25 -0
- package/dist/runtime/contracts.d.ts.map +1 -0
- package/dist/runtime/contracts.js +66 -0
- package/dist/runtime/contracts.js.map +1 -0
- package/dist/runtime/errors.d.ts +20 -0
- package/dist/runtime/errors.d.ts.map +1 -0
- package/dist/runtime/errors.js +22 -0
- package/dist/runtime/errors.js.map +1 -0
- package/dist/runtime/index.d.ts +9 -0
- package/dist/runtime/index.d.ts.map +1 -0
- package/dist/runtime/index.js +9 -0
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/node-foreground-session.d.ts +50 -0
- package/dist/runtime/node-foreground-session.d.ts.map +1 -0
- package/dist/runtime/node-foreground-session.js +431 -0
- package/dist/runtime/node-foreground-session.js.map +1 -0
- package/dist/runtime/node-websocket-connector.d.ts +6 -0
- package/dist/runtime/node-websocket-connector.d.ts.map +1 -0
- package/dist/runtime/node-websocket-connector.js +344 -0
- package/dist/runtime/node-websocket-connector.js.map +1 -0
- package/dist/runtime/observer-screen.d.ts +6 -0
- package/dist/runtime/observer-screen.d.ts.map +1 -0
- package/dist/runtime/observer-screen.js +144 -0
- package/dist/runtime/observer-screen.js.map +1 -0
- package/dist/runtime/owner-grant-operations.d.ts +136 -0
- package/dist/runtime/owner-grant-operations.d.ts.map +1 -0
- package/dist/runtime/owner-grant-operations.js +216 -0
- package/dist/runtime/owner-grant-operations.js.map +1 -0
- package/dist/runtime/owner-grants-screen.d.ts +40 -0
- package/dist/runtime/owner-grants-screen.d.ts.map +1 -0
- package/dist/runtime/owner-grants-screen.js +987 -0
- package/dist/runtime/owner-grants-screen.js.map +1 -0
- package/dist/runtime/terminal-transport.d.ts +85 -0
- package/dist/runtime/terminal-transport.d.ts.map +1 -0
- package/dist/runtime/terminal-transport.js +152 -0
- package/dist/runtime/terminal-transport.js.map +1 -0
- package/dist/sync/continuous-sync-supervisor.d.ts +107 -0
- package/dist/sync/continuous-sync-supervisor.d.ts.map +1 -0
- package/dist/sync/continuous-sync-supervisor.js +1117 -0
- package/dist/sync/continuous-sync-supervisor.js.map +1 -0
- package/dist/sync/index.d.ts +9 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +9 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/journal.d.ts +57 -0
- package/dist/sync/journal.d.ts.map +1 -0
- package/dist/sync/journal.js +685 -0
- package/dist/sync/journal.js.map +1 -0
- package/dist/sync/revisions.d.ts +118 -0
- package/dist/sync/revisions.d.ts.map +1 -0
- package/dist/sync/revisions.js +364 -0
- package/dist/sync/revisions.js.map +1 -0
- package/dist/sync/supervisor.d.ts +107 -0
- package/dist/sync/supervisor.d.ts.map +1 -0
- package/dist/sync/supervisor.js +246 -0
- package/dist/sync/supervisor.js.map +1 -0
- package/dist/sync/workspace-sync-client.d.ts +18 -0
- package/dist/sync/workspace-sync-client.d.ts.map +1 -0
- package/dist/sync/workspace-sync-client.js +150 -0
- package/dist/sync/workspace-sync-client.js.map +1 -0
- package/dist/sync/workspace-sync-coordinator.d.ts +76 -0
- package/dist/sync/workspace-sync-coordinator.d.ts.map +1 -0
- package/dist/sync/workspace-sync-coordinator.js +621 -0
- package/dist/sync/workspace-sync-coordinator.js.map +1 -0
- package/dist/sync/workspace-sync-product-service.d.ts +79 -0
- package/dist/sync/workspace-sync-product-service.d.ts.map +1 -0
- package/dist/sync/workspace-sync-product-service.js +398 -0
- package/dist/sync/workspace-sync-product-service.js.map +1 -0
- package/dist/sync/workspace-sync-protocol.d.ts +145 -0
- package/dist/sync/workspace-sync-protocol.d.ts.map +1 -0
- package/dist/sync/workspace-sync-protocol.js +347 -0
- package/dist/sync/workspace-sync-protocol.js.map +1 -0
- package/dist/terminal/appbar.d.ts +40 -0
- package/dist/terminal/appbar.d.ts.map +1 -0
- package/dist/terminal/appbar.js +55 -0
- package/dist/terminal/appbar.js.map +1 -0
- package/dist/terminal/cell-width.d.ts +3 -0
- package/dist/terminal/cell-width.d.ts.map +1 -0
- package/dist/terminal/cell-width.js +53 -0
- package/dist/terminal/cell-width.js.map +1 -0
- package/dist/terminal/codec.d.ts +107 -0
- package/dist/terminal/codec.d.ts.map +1 -0
- package/dist/terminal/codec.js +538 -0
- package/dist/terminal/codec.js.map +1 -0
- package/dist/terminal/foreground.d.ts +135 -0
- package/dist/terminal/foreground.d.ts.map +1 -0
- package/dist/terminal/foreground.js +2097 -0
- package/dist/terminal/foreground.js.map +1 -0
- package/dist/terminal/generated/terminal-wire-v1.d.ts +26 -0
- package/dist/terminal/generated/terminal-wire-v1.d.ts.map +1 -0
- package/dist/terminal/generated/terminal-wire-v1.js +27 -0
- package/dist/terminal/generated/terminal-wire-v1.js.map +1 -0
- package/dist/terminal/mode.d.ts +33 -0
- package/dist/terminal/mode.d.ts.map +1 -0
- package/dist/terminal/mode.js +99 -0
- package/dist/terminal/mode.js.map +1 -0
- package/dist/terminal/passthrough.d.ts +47 -0
- package/dist/terminal/passthrough.d.ts.map +1 -0
- package/dist/terminal/passthrough.js +666 -0
- package/dist/terminal/passthrough.js.map +1 -0
- package/dist/terminal/resume.d.ts +58 -0
- package/dist/terminal/resume.d.ts.map +1 -0
- package/dist/terminal/resume.js +185 -0
- package/dist/terminal/resume.js.map +1 -0
- package/dist/terminal/viewport.d.ts +93 -0
- package/dist/terminal/viewport.d.ts.map +1 -0
- package/dist/terminal/viewport.js +266 -0
- package/dist/terminal/viewport.js.map +1 -0
- package/dist/terminal/workbench.d.ts +32 -0
- package/dist/terminal/workbench.d.ts.map +1 -0
- package/dist/terminal/workbench.js +316 -0
- package/dist/terminal/workbench.js.map +1 -0
- package/dist/terminal/xterm-vte.d.ts +49 -0
- package/dist/terminal/xterm-vte.d.ts.map +1 -0
- package/dist/terminal/xterm-vte.js +602 -0
- package/dist/terminal/xterm-vte.js.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +3 -0
- package/dist/version.js.map +1 -0
- package/dist/workspace/binding-path.d.ts +17 -0
- package/dist/workspace/binding-path.d.ts.map +1 -0
- package/dist/workspace/binding-path.js +91 -0
- package/dist/workspace/binding-path.js.map +1 -0
- package/dist/workspace/binding-store.d.ts +107 -0
- package/dist/workspace/binding-store.d.ts.map +1 -0
- package/dist/workspace/binding-store.js +783 -0
- package/dist/workspace/binding-store.js.map +1 -0
- package/dist/workspace/binding.d.ts +35 -0
- package/dist/workspace/binding.d.ts.map +1 -0
- package/dist/workspace/binding.js +70 -0
- package/dist/workspace/binding.js.map +1 -0
- package/dist/workspace/errors.d.ts +4 -0
- package/dist/workspace/errors.d.ts.map +1 -0
- package/dist/workspace/errors.js +19 -0
- package/dist/workspace/errors.js.map +1 -0
- package/dist/workspace/exclusion.d.ts +21 -0
- package/dist/workspace/exclusion.d.ts.map +1 -0
- package/dist/workspace/exclusion.js +243 -0
- package/dist/workspace/exclusion.js.map +1 -0
- package/dist/workspace/index.d.ts +8 -0
- package/dist/workspace/index.d.ts.map +1 -0
- package/dist/workspace/index.js +8 -0
- package/dist/workspace/index.js.map +1 -0
- package/dist/workspace/lifecycle.d.ts +56 -0
- package/dist/workspace/lifecycle.d.ts.map +1 -0
- package/dist/workspace/lifecycle.js +94 -0
- package/dist/workspace/lifecycle.js.map +1 -0
- package/dist/workspace/manifest.d.ts +47 -0
- package/dist/workspace/manifest.d.ts.map +1 -0
- package/dist/workspace/manifest.js +243 -0
- package/dist/workspace/manifest.js.map +1 -0
- package/dist/workspace/paths.d.ts +14 -0
- package/dist/workspace/paths.d.ts.map +1 -0
- package/dist/workspace/paths.js +67 -0
- package/dist/workspace/paths.js.map +1 -0
- package/dist/workspace/schema.d.ts +15 -0
- package/dist/workspace/schema.d.ts.map +1 -0
- package/dist/workspace/schema.js +33 -0
- package/dist/workspace/schema.js.map +1 -0
- package/dist/workspace/selection-screen.d.ts +4 -0
- package/dist/workspace/selection-screen.d.ts.map +1 -0
- package/dist/workspace/selection-screen.js +216 -0
- package/dist/workspace/selection-screen.js.map +1 -0
- package/dist/workspace/selection-service.d.ts +16 -0
- package/dist/workspace/selection-service.d.ts.map +1 -0
- package/dist/workspace/selection-service.js +65 -0
- package/dist/workspace/selection-service.js.map +1 -0
- package/node_modules/@xterm/headless/README.md +31 -0
- package/node_modules/@xterm/headless/lib-headless/xterm-headless.js +2 -0
- package/node_modules/@xterm/headless/lib-headless/xterm-headless.js.map +1 -0
- package/node_modules/@xterm/headless/lib-headless/xterm-headless.mjs +46 -0
- package/node_modules/@xterm/headless/lib-headless/xterm-headless.mjs.map +7 -0
- package/node_modules/@xterm/headless/package.json +29 -0
- package/node_modules/@xterm/headless/typings/xterm-headless.d.ts +1385 -0
- package/package.json +75 -0
package/dist/cli/help.js
ADDED
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { exitCodeHelpSection } from "../core/exit-codes.js";
|
|
2
|
+
import { brandedEnvironmentNames } from "../core/namespace.js";
|
|
3
|
+
import { API_KEYS_URL } from "../core/product-web.js";
|
|
4
|
+
import { CLI_ROUTE_REGISTRY } from "./parser.js";
|
|
5
|
+
// Help is the only place most users learn a variable name, so it is derived
|
|
6
|
+
// from the same authority the resolver reads. A hand-written name here would go
|
|
7
|
+
// stale exactly when the accepted set changes, which is the one moment it must
|
|
8
|
+
// not.
|
|
9
|
+
const API_KEY_NAMES = brandedEnvironmentNames("API_KEY").join(" or ");
|
|
10
|
+
// Same reason, one layer up: the exit code is the entire contract for a caller
|
|
11
|
+
// that is not a human, so the list below is projected from `EXIT_CODES` rather
|
|
12
|
+
// than typed out beside it. A hand-written copy here would have kept printing
|
|
13
|
+
// `7` for an unserved operation after that case moved to `8`.
|
|
14
|
+
const EXIT_CODES_SECTION = exitCodeHelpSection();
|
|
15
|
+
/**
|
|
16
|
+
* What a newcomer sees from bare `cuna` and from `cuna --help`.
|
|
17
|
+
*
|
|
18
|
+
* WHY THIS EXISTS. The full surface below is 105 lines, 23 of them an exit-code
|
|
19
|
+
* table, and the first usable command appears on line 9. Measured on the same
|
|
20
|
+
* build: the whole of `cuna --help` contained ZERO `http(s)://` matches, so a
|
|
21
|
+
* user who needs browser sign-in still needs a safe browser-link next
|
|
22
|
+
* step rather than a platform-specific promise.
|
|
23
|
+
*
|
|
24
|
+
* NOTHING WAS DELETED. Every line that used to be here is still in `FULL_HELP`,
|
|
25
|
+
* reachable as `cuna help --all`, and `cuna <command> --help` is untouched.
|
|
26
|
+
*
|
|
27
|
+
* THE UNAVAILABILITY CLAIMS BELOW ARE MEASURED FROM THIS TREE, not guessed, and
|
|
28
|
+
* they are deliberately stated as properties of the BUILD rather than of a
|
|
29
|
+
* platform:
|
|
30
|
+
*
|
|
31
|
+
* - interactive commands use the pure-JavaScript encrypted browser-link
|
|
32
|
+
* session store. Alternative credential backends are deliberately absent
|
|
33
|
+
* from the distributable package, rather than present as an inactive fallback.
|
|
34
|
+
* - the automatic journey and exact foreground attach are composed by
|
|
35
|
+
* `runCli` before the generic command dispatcher. Their local
|
|
36
|
+
* implementation is present, while each invocation still fails closed
|
|
37
|
+
* unless the live producer proves the required capabilities and state.
|
|
38
|
+
*
|
|
39
|
+
* What is NOT claimed here: that browser sign-in is currently enabled by every
|
|
40
|
+
* configured deployment. `cuna doctor` measures local encrypted storage, and
|
|
41
|
+
* its opt-in remote probe measures the browser-login bootstrap separately.
|
|
42
|
+
*/
|
|
43
|
+
const PROVIDER_LABELS = Object.freeze({
|
|
44
|
+
claude: "Open Claude Code in a machine",
|
|
45
|
+
codex: "Open Codex in a machine",
|
|
46
|
+
opencode: "Open OpenCode in a machine",
|
|
47
|
+
});
|
|
48
|
+
const CURRENT_PROVIDER_COMMANDS = Object.freeze(CLI_ROUTE_REGISTRY
|
|
49
|
+
.map((route) => route.key)
|
|
50
|
+
.filter((key) => Object.hasOwn(PROVIDER_LABELS, key)));
|
|
51
|
+
/** Commands printed by first-run help, ending in the guided root journey. */
|
|
52
|
+
export const FIRST_RUN_TRANSCRIPT = Object.freeze([
|
|
53
|
+
Object.freeze(["login"]),
|
|
54
|
+
Object.freeze([]),
|
|
55
|
+
]);
|
|
56
|
+
/**
|
|
57
|
+
* Render primary discovery as the intersection of this build's provider routes
|
|
58
|
+
* and the caller's set.
|
|
59
|
+
*
|
|
60
|
+
* WHAT THE DEFAULT MEANS. Help is rendered offline, before any credential or
|
|
61
|
+
* capability request, so the only authority available to it is this build's
|
|
62
|
+
* route registry. The default therefore lists every ROUTED provider and makes
|
|
63
|
+
* no claim at all about what the server currently serves. It is not a
|
|
64
|
+
* capability filter, and the earlier comment here claimed it was one: it said
|
|
65
|
+
* this call "keeps OpenCode hidden until both halves actually exist" while
|
|
66
|
+
* production's only call site is `renderShortHelp()` with no argument, whose
|
|
67
|
+
* default is derived from the same registry it filters — a tautology that
|
|
68
|
+
* could never hide anything.
|
|
69
|
+
*
|
|
70
|
+
* The parameter is still real, and narrower than the default: a caller holding
|
|
71
|
+
* a live capability snapshot may pass the subset it proves. Nothing in this
|
|
72
|
+
* package does that today.
|
|
73
|
+
*/
|
|
74
|
+
export function renderShortHelp(routedProviderCommands = CURRENT_PROVIDER_COMMANDS) {
|
|
75
|
+
const routed = new Set(routedProviderCommands);
|
|
76
|
+
const providerLines = CURRENT_PROVIDER_COMMANDS
|
|
77
|
+
.filter((command) => routed.has(command))
|
|
78
|
+
.map((command) => ` cuna ${command} [PATH]${" ".repeat(Math.max(1, 18 - command.length))}${PROVIDER_LABELS[command]}`)
|
|
79
|
+
.join("\n");
|
|
80
|
+
return `Cuna CLI
|
|
81
|
+
|
|
82
|
+
Open a machine, pick an agent, keep working.
|
|
83
|
+
|
|
84
|
+
Start here:
|
|
85
|
+
cuna Choose a machine, agent, and session
|
|
86
|
+
cuna machines Browse machines and the sessions inside them
|
|
87
|
+
${providerLines}
|
|
88
|
+
|
|
89
|
+
First run:
|
|
90
|
+
1. Run \`cuna login\`, approve in the browser, and paste the displayed login code
|
|
91
|
+
2. Run \`cuna\` to enter an attached provider terminal
|
|
92
|
+
|
|
93
|
+
Diagnose this installation:
|
|
94
|
+
cuna doctor Report platform, runtime, and encrypted local session-store state
|
|
95
|
+
cuna version Show the CLI version, build digest, and protocol range
|
|
96
|
+
cuna config get Show effective, redacted configuration
|
|
97
|
+
cuna self-test --offline Verify the installed CLI without network access
|
|
98
|
+
|
|
99
|
+
Advanced and automation:
|
|
100
|
+
cuna help --all Every command, option, and exit code
|
|
101
|
+
cuna <command> --help Help for one command
|
|
102
|
+
`;
|
|
103
|
+
}
|
|
104
|
+
export const SHORT_HELP = renderShortHelp();
|
|
105
|
+
/**
|
|
106
|
+
* The marker legend, printed immediately above the reference.
|
|
107
|
+
*
|
|
108
|
+
* Without it the bracketed word reads as a status, and a status is exactly what
|
|
109
|
+
* this CLI cannot know before it asks. Naming the authority in the same breath
|
|
110
|
+
* is the whole repair.
|
|
111
|
+
*/
|
|
112
|
+
export const COMMAND_REFERENCE_LEGEND = ` [routed] this build dispatches the command
|
|
113
|
+
[reserved] this build accepts the name and refuses
|
|
114
|
+
Neither marker is a server answer. Run \`cuna capabilities\` for what the
|
|
115
|
+
server currently proves for your account, machine, or AgentSession.
|
|
116
|
+
`;
|
|
117
|
+
/** One generated line per semantic parser route; tests parse these markers. */
|
|
118
|
+
export const COMPLETE_COMMAND_REFERENCE = CLI_ROUTE_REGISTRY
|
|
119
|
+
.map((route) => ` [${route.dispatch}] ${route.key} :: cuna ${route.syntax}\n ${route.summary}`)
|
|
120
|
+
.join("\n");
|
|
121
|
+
export const FULL_HELP = `Cuna CLI
|
|
122
|
+
|
|
123
|
+
Run cloud development agents from your local command line through public Cuna contracts.
|
|
124
|
+
|
|
125
|
+
Usage:
|
|
126
|
+
cuna <command> [options]
|
|
127
|
+
|
|
128
|
+
Available now:
|
|
129
|
+
signup Create a waitlist-only Cuna account in the browser
|
|
130
|
+
login Sign in through the browser and paste the durable login code
|
|
131
|
+
whoami Show account context; reuse the encrypted session
|
|
132
|
+
access status Print the same line whoami prints, as record access.status
|
|
133
|
+
logout Revoke the login-code family server-first;
|
|
134
|
+
reuse the encrypted session automatically
|
|
135
|
+
capabilities Inspect current server capability truth
|
|
136
|
+
machines Browse machines and their AgentSessions
|
|
137
|
+
machines list List owned Cuna machines
|
|
138
|
+
machines create [options] Create a machine when server-advertised
|
|
139
|
+
machines start|pause|resume|stop ID Change lifecycle when server-advertised
|
|
140
|
+
machines update-supervisor ID Update a stopped OpenCode terminal supervisor
|
|
141
|
+
machines live-update-supervisor ID Update a running terminal supervisor in place;
|
|
142
|
+
reports one custody line per AgentSession
|
|
143
|
+
machines live-update-status ID Read what one in-place update did; sends nothing
|
|
144
|
+
machines delete ID Delete when server-advertised
|
|
145
|
+
records list List redacted account activity records
|
|
146
|
+
account show Show the public account identity
|
|
147
|
+
observe --project PROJECT_ID Observe an authorized shared session read-only
|
|
148
|
+
share --project PROJECT_ID Grant or revoke a member's read-only view, and start or stop live sharing
|
|
149
|
+
workspace show Show assignment or waitlist state
|
|
150
|
+
usage show Show authoritative workspace estimates
|
|
151
|
+
authorizations list --machine ID List active credential injection rules
|
|
152
|
+
api-keys create --name NAME --yes Create an API key and print its secret once
|
|
153
|
+
api-keys list List API-key metadata without secret values
|
|
154
|
+
api-keys revoke ID --yes Revoke one API key when server-advertised
|
|
155
|
+
agent-sessions list --machine ID List child agent processes
|
|
156
|
+
agent-sessions create --machine ID --workspace-binding-id ID --workspace-generation N
|
|
157
|
+
Create a workspace-bound child when server-advertised
|
|
158
|
+
agent-sessions get ID Read one child process
|
|
159
|
+
agent-sessions rename ID --name NAME Rename one child process
|
|
160
|
+
agent-sessions terminate ID Terminate when server-advertised
|
|
161
|
+
config get Show effective, redacted configuration
|
|
162
|
+
self-test --offline Verify the installed CLI without network access
|
|
163
|
+
doctor Report platform, runtime, and encrypted local session-store state
|
|
164
|
+
|
|
165
|
+
Foreground terminal attach (the server must grant terminal_connections.create):
|
|
166
|
+
connect SESSION_ID [SESSION_ID...] Attach 1-4 exact cloud sessions in this terminal
|
|
167
|
+
agent-sessions attach SESSION_ID Attach one exact cloud session in this terminal
|
|
168
|
+
agent logout --agent-session ID Sign Claude Code or Codex out of one exact AgentSession
|
|
169
|
+
claude --agent-session SESSION_ID Attach one exact Claude Code child
|
|
170
|
+
codex --agent-session SESSION_ID Attach one exact Codex child
|
|
171
|
+
opencode --agent-session SESSION_ID Attach one exact OpenCode child
|
|
172
|
+
These routes exist in this build. That is the whole of what the [routed]
|
|
173
|
+
marker in the complete reference below claims about them.
|
|
174
|
+
Each invocation still re-reads an AgentSession-scoped capability snapshot and
|
|
175
|
+
refuses, changing nothing, when the server does not grant
|
|
176
|
+
terminal_connections.create for that exact session. \`cuna capabilities --scope
|
|
177
|
+
agent_session --resource-id ID\` shows the same answer before you attach.
|
|
178
|
+
JSON and redirected output fail closed. Nested SSH/tmux and TERM=dumb use a
|
|
179
|
+
one-session byte-preserving plain fallback with no appbar; set
|
|
180
|
+
CUNA_TERMINAL_MODE=plain for accessibility or diagnosis.
|
|
181
|
+
Ctrl+C detaches locally in one press. Use Ctrl+] c to send Ctrl+C to the agent.
|
|
182
|
+
Background daemon and local companion behavior are absent from this build.
|
|
183
|
+
|
|
184
|
+
Automatic local-to-cloud journey:
|
|
185
|
+
claude [PATH] [--machine NAME | --new] [--no-sync] [--new-session]
|
|
186
|
+
[--auth-mode interactive_login|credential_binding]
|
|
187
|
+
[--credential-binding ID]
|
|
188
|
+
codex [PATH] [--machine NAME | --new] [--no-sync] [--new-session]
|
|
189
|
+
[--auth-mode interactive_login|credential_binding]
|
|
190
|
+
[--credential-binding ID]
|
|
191
|
+
opencode [PATH] [--machine NAME | --new] [--no-sync] [--new-session]
|
|
192
|
+
[--auth-mode interactive_login]
|
|
193
|
+
Cuna validates the complete command before effects, selects only from fresh
|
|
194
|
+
machine capability evidence, reconciles creation by a caller-known request ID,
|
|
195
|
+
binds and synchronizes the exact workspace generation, selects or creates one
|
|
196
|
+
exact AgentSession, waits for child readiness, and then attaches this terminal.
|
|
197
|
+
Ambiguous, stale, cancelled, or unknown outcomes fail closed without silently
|
|
198
|
+
choosing a target or retrying with a second identity.
|
|
199
|
+
--credential-binding ID is required exactly when --auth-mode is credential_binding.
|
|
200
|
+
OpenCode is interactive-only: after Cuna attaches its remote terminal, use
|
|
201
|
+
/connect to choose and sign in to a provider, then /models to choose a model.
|
|
202
|
+
Cuna does not broker an OpenCode device-sign-in page. Provider credentials remain
|
|
203
|
+
in that AgentSession and are never copied from Codex or another provider store.
|
|
204
|
+
Use --agent-session SESSION_ID to bypass reconciliation and attach one exact child;
|
|
205
|
+
it cannot be combined with PATH, --machine, --new, --new-session, --no-sync,
|
|
206
|
+
--auth-mode, or --credential-binding.
|
|
207
|
+
|
|
208
|
+
Reserved and fail-closed in this build:
|
|
209
|
+
shell, background daemon, local companion
|
|
210
|
+
|
|
211
|
+
Complete command reference:
|
|
212
|
+
${COMMAND_REFERENCE_LEGEND}
|
|
213
|
+
${COMPLETE_COMMAND_REFERENCE}
|
|
214
|
+
|
|
215
|
+
Compatibility aliases (advanced only):
|
|
216
|
+
cuna --help Alias for primary help
|
|
217
|
+
cuna --help --all Alias for complete help
|
|
218
|
+
cuna --version Alias for cuna version
|
|
219
|
+
|
|
220
|
+
Global options:
|
|
221
|
+
--json Emit versioned JSON records
|
|
222
|
+
--profile NAME Select one user profile
|
|
223
|
+
--base-url URL Override the API origin (custom origins require a development profile)
|
|
224
|
+
--config-file PATH Select the user configuration file
|
|
225
|
+
--timeout-ms N Bound each API request (100..120000)
|
|
226
|
+
--no-color Disable color (output is color-independent by default)
|
|
227
|
+
--help Show help (add it after any command for that command's help)
|
|
228
|
+
--version Show the CLI version
|
|
229
|
+
|
|
230
|
+
Exit codes:
|
|
231
|
+
${EXIT_CODES_SECTION}
|
|
232
|
+
This is the complete set this build can return. One reachable path per code is
|
|
233
|
+
documented under "Exit codes" in the README.
|
|
234
|
+
|
|
235
|
+
Authentication:
|
|
236
|
+
Create an automation credential at ${API_KEYS_URL}.
|
|
237
|
+
Use cuna signup for waitlist-only enrollment. It never assigns compute or starts billing.
|
|
238
|
+
Use cuna login for a browser-assisted interactive session. The CLI opens the
|
|
239
|
+
browser flow, then exchanges the pasted code immediately; it does not open a local callback listener. Paste the exact high-entropy
|
|
240
|
+
cuna_login_ code shown once by the page. Cuna stores it using AES-256-GCM with
|
|
241
|
+
a separate user-only key file and exchanges it for short-lived access in each
|
|
242
|
+
process. Compromise of the same OS account can read both files and defeats this layer.
|
|
243
|
+
${API_KEY_NAMES} selects explicit automation mode and never falls
|
|
244
|
+
back to browser login. Both spellings are accepted and both admit every key brand the
|
|
245
|
+
service has issued; the first one that is SET wins, even when its value is unusable.
|
|
246
|
+
|
|
247
|
+
Canonical install:
|
|
248
|
+
npm install --global ./cuna_labs-cli-0.1.0.tgz
|
|
249
|
+
`;
|
|
250
|
+
/**
|
|
251
|
+
* The root topic. Bare \`cuna\` and \`cuna --help\` answer with the short
|
|
252
|
+
* orientation; \`cuna help --all\` and \`cuna --help --all\` answer with the
|
|
253
|
+
* complete surface. Per-command help is unaffected.
|
|
254
|
+
*/
|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;;IAO/C,aAAa;;;;;;CAMhB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Writable } from "node:stream";
|
|
2
|
+
import type { CunaError } from "../core/errors.js";
|
|
3
|
+
export interface CliStreams {
|
|
4
|
+
readonly stdout: Writable;
|
|
5
|
+
readonly stderr: Writable;
|
|
6
|
+
readonly stdoutIsTTY: boolean;
|
|
7
|
+
readonly stdinIsTTY: boolean;
|
|
8
|
+
/** Optional because injected test streams predate the preview link gate. */
|
|
9
|
+
readonly stderrIsTTY?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface OutputWriter {
|
|
12
|
+
readonly structured: boolean;
|
|
13
|
+
success(command: string, data: unknown, human: string): void;
|
|
14
|
+
error(command: string, error: CunaError): void;
|
|
15
|
+
text(value: string): void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Human terminal output is a trust boundary. Preserve only the two layout
|
|
19
|
+
* controls emitted deliberately by Cuna; render every other C0/C1/Unicode
|
|
20
|
+
* format control visibly so API data and error text cannot execute ANSI/OSC,
|
|
21
|
+
* alter the title/clipboard, or spoof text direction.
|
|
22
|
+
*/
|
|
23
|
+
export declare function sanitizeHumanTerminalOutput(value: string): string;
|
|
24
|
+
export declare function createOutputWriter(input: {
|
|
25
|
+
readonly streams: CliStreams;
|
|
26
|
+
readonly json: boolean;
|
|
27
|
+
}): OutputWriter;
|
|
28
|
+
//# sourceMappingURL=output.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/cli/output.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,KAAK,EAAE,SAAS,EAAmB,MAAM,mBAAmB,CAAC;AAIpE,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,4EAA4E;IAC5E,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7D,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IAC/C,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAMD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAqBjE;AAwBD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IACxC,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;CACxB,GAAG,YAAY,CA8Cf"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { containsCredentialValue } from "../core/namespace.js";
|
|
2
|
+
import { OUTPUT_SCHEMA_VERSION } from "../version.js";
|
|
3
|
+
function writeLine(stream, value) {
|
|
4
|
+
stream.write(value.endsWith("\n") ? value : `${value}\n`);
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Human terminal output is a trust boundary. Preserve only the two layout
|
|
8
|
+
* controls emitted deliberately by Cuna; render every other C0/C1/Unicode
|
|
9
|
+
* format control visibly so API data and error text cannot execute ANSI/OSC,
|
|
10
|
+
* alter the title/clipboard, or spoof text direction.
|
|
11
|
+
*/
|
|
12
|
+
export function sanitizeHumanTerminalOutput(value) {
|
|
13
|
+
let result = "";
|
|
14
|
+
for (const character of value) {
|
|
15
|
+
if (character === "\n" || character === "\t") {
|
|
16
|
+
result += character;
|
|
17
|
+
continue;
|
|
18
|
+
}
|
|
19
|
+
const codePoint = character.codePointAt(0) ?? 0;
|
|
20
|
+
if (codePoint <= 0x1f ||
|
|
21
|
+
(codePoint >= 0x7f && codePoint <= 0x9f) ||
|
|
22
|
+
/\p{Cf}/u.test(character)) {
|
|
23
|
+
result += codePoint <= 0xff
|
|
24
|
+
? `\\x${codePoint.toString(16).padStart(2, "0")}`
|
|
25
|
+
: `\\u{${codePoint.toString(16)}}`;
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
result += character;
|
|
29
|
+
}
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
function sanitizeSingleLineHumanOutput(value) {
|
|
33
|
+
return sanitizeHumanTerminalOutput(value).replaceAll("\n", "\\n").replaceAll("\t", "\\t");
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Render one `details` entry for a human terminal.
|
|
37
|
+
*
|
|
38
|
+
* `details` distinguishes failures that otherwise print identically: thirteen
|
|
39
|
+
* distinct configuration faults share one message, and an HTTP 403 carries the
|
|
40
|
+
* `request_id` support asks for. JSON mode has always emitted it; human mode
|
|
41
|
+
* dropped it entirely, so the operator saw the same unactionable sentence.
|
|
42
|
+
*
|
|
43
|
+
* Values here originate partly from the service, so this is a print sink for
|
|
44
|
+
* service-controlled bytes and is held to the same rule as every other one.
|
|
45
|
+
*/
|
|
46
|
+
function renderErrorDetail(value) {
|
|
47
|
+
const rendered = Array.isArray(value)
|
|
48
|
+
? value.map((item) => String(item)).join(", ")
|
|
49
|
+
: String(value);
|
|
50
|
+
return containsCredentialValue(rendered) ? "[redacted credential]" : rendered;
|
|
51
|
+
}
|
|
52
|
+
export function createOutputWriter(input) {
|
|
53
|
+
const structured = input.json || !input.streams.stdoutIsTTY;
|
|
54
|
+
const writer = {
|
|
55
|
+
structured,
|
|
56
|
+
success(command, data, human) {
|
|
57
|
+
if (structured) {
|
|
58
|
+
writeLine(input.streams.stdout, JSON.stringify({ schema_version: OUTPUT_SCHEMA_VERSION, type: "result", command, data }));
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
writeLine(input.streams.stdout, sanitizeHumanTerminalOutput(human));
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
error(command, error) {
|
|
65
|
+
if (structured) {
|
|
66
|
+
writeLine(input.streams.stderr, JSON.stringify({
|
|
67
|
+
schema_version: OUTPUT_SCHEMA_VERSION,
|
|
68
|
+
type: "error",
|
|
69
|
+
command,
|
|
70
|
+
error: {
|
|
71
|
+
code: error.code,
|
|
72
|
+
message: error.message,
|
|
73
|
+
retryable: error.retryable,
|
|
74
|
+
...(error.hint === undefined ? {} : { hint: error.hint }),
|
|
75
|
+
...(error.details === undefined ? {} : { details: error.details }),
|
|
76
|
+
},
|
|
77
|
+
}));
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
writeLine(input.streams.stderr, sanitizeSingleLineHumanOutput(`Error [${error.code}]: ${error.message}`));
|
|
81
|
+
for (const [key, value] of Object.entries(error.details ?? {})) {
|
|
82
|
+
writeLine(input.streams.stderr, sanitizeSingleLineHumanOutput(` ${key}: ${renderErrorDetail(value)}`));
|
|
83
|
+
}
|
|
84
|
+
if (error.hint !== undefined) {
|
|
85
|
+
writeLine(input.streams.stderr, sanitizeSingleLineHumanOutput(`Next: ${error.hint}`));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
text(value) {
|
|
90
|
+
writeLine(input.streams.stdout, sanitizeHumanTerminalOutput(value));
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
return Object.freeze(writer);
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/cli/output.ts"],"names":[],"mappings":"AAGA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M,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export type OptionValue = string | boolean;
|
|
2
|
+
export interface ParsedInvocation {
|
|
3
|
+
readonly command: string | undefined;
|
|
4
|
+
readonly operands: readonly string[];
|
|
5
|
+
readonly options: Readonly<Record<string, OptionValue>>;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* What THIS BUILD does with a command name. Never what the server allows.
|
|
9
|
+
*
|
|
10
|
+
* `routed` — the preflight switch in `commands/commands.ts` dispatches this
|
|
11
|
+
* leaf in this build.
|
|
12
|
+
* `reserved` — the name is accepted for compatibility and refuses.
|
|
13
|
+
*
|
|
14
|
+
* This vocabulary is deliberately DISJOINT from `CapabilityAvailability` in
|
|
15
|
+
* `src/api/contracts.ts` (`supported | unsupported | temporarily_unavailable |
|
|
16
|
+
* unknown`). That enum is the server's answer about one capability at one
|
|
17
|
+
* moment. This field is a compile-time constant computed with no network call,
|
|
18
|
+
* so it cannot know that answer.
|
|
19
|
+
*
|
|
20
|
+
* The two were spelled the same word until 2026-08-29, and `cuna help --all`
|
|
21
|
+
* consequently stamped `[supported]` on `machines.start`, every
|
|
22
|
+
* `agent-sessions` action, every terminal path, `usage`, `workspace`,
|
|
23
|
+
* `authorizations` and `api_keys.list` — while a live `cuna capabilities`
|
|
24
|
+
* listed none of them. One word, two authorities, and the offline one won on
|
|
25
|
+
* screen. `test/progressive-command-disclosure.test.mjs` now fails if the two
|
|
26
|
+
* vocabularies ever intersect again.
|
|
27
|
+
*/
|
|
28
|
+
export type CliRouteDispatch = "routed" | "reserved";
|
|
29
|
+
/**
|
|
30
|
+
* One semantic leaf accepted by the CLI preflight/dispatch boundary.
|
|
31
|
+
*
|
|
32
|
+
* The tokenizer deliberately remains generic: it must parse an invocation
|
|
33
|
+
* before the command layer can return a precise usage error. Discovery still
|
|
34
|
+
* needs a closed world, however, so help and its tests consume this registry
|
|
35
|
+
* rather than maintaining a second handwritten command census.
|
|
36
|
+
*/
|
|
37
|
+
export interface CliRouteDefinition {
|
|
38
|
+
readonly key: string;
|
|
39
|
+
readonly command: string;
|
|
40
|
+
readonly action?: string;
|
|
41
|
+
readonly operandMode: "exact" | "free";
|
|
42
|
+
readonly syntax: string;
|
|
43
|
+
readonly argv: readonly string[];
|
|
44
|
+
readonly summary: string;
|
|
45
|
+
readonly dispatch: CliRouteDispatch;
|
|
46
|
+
}
|
|
47
|
+
/** The closed discovery projection of the command preflight switch. */
|
|
48
|
+
export declare const CLI_ROUTE_REGISTRY: readonly CliRouteDefinition[];
|
|
49
|
+
/**
|
|
50
|
+
* Resolve an invocation to one admitted semantic leaf.
|
|
51
|
+
*
|
|
52
|
+
* Exact command leaves accept no positional operand. Action leaves consume
|
|
53
|
+
* their registered first operand and leave IDs/names to the command-specific
|
|
54
|
+
* validator. Only provider PATH journeys and `connect` intentionally admit
|
|
55
|
+
* free positional operands. Consequently, adding a switch branch cannot make
|
|
56
|
+
* a new command or subaction executable until it is registered here.
|
|
57
|
+
*/
|
|
58
|
+
export declare function resolveCliRoute(parsed: ParsedInvocation): CliRouteDefinition | undefined;
|
|
59
|
+
/** Fail closed before the command preflight switch can admit an unregistered leaf. */
|
|
60
|
+
export declare function assertRegisteredCliRoute(parsed: ParsedInvocation): CliRouteDefinition;
|
|
61
|
+
export declare function parseArgv(argv: readonly string[]): ParsedInvocation;
|
|
62
|
+
export declare function stringOption(parsed: ParsedInvocation, name: string): string | undefined;
|
|
63
|
+
export declare function booleanOption(parsed: ParsedInvocation, name: string): boolean;
|
|
64
|
+
export declare function rejectUnknownOptions(parsed: ParsedInvocation, allowed: readonly string[]): void;
|
|
65
|
+
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/cli/parser.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,CA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