@crewx/sdk 0.9.0-rc.20 → 0.9.0-rc.200
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/account/auth-client.d.ts +61 -0
- package/dist/account/auth-json-v2.d.ts +1 -0
- package/dist/account/auth-json.d.ts +30 -0
- package/dist/account/config.d.ts +37 -0
- package/dist/account/env-bootstrap.d.ts +11 -0
- package/dist/account/errors.d.ts +24 -0
- package/dist/account/index.d.ts +12 -0
- package/dist/account/index.js +2 -0
- package/dist/account/session-manager.d.ts +47 -0
- package/dist/activity-log/builder.d.ts +59 -6
- package/dist/agent/agent-list-view.d.ts +19 -0
- package/dist/agent-interceptor/chain.d.ts +25 -0
- package/dist/agent-interceptor/index.d.ts +6 -0
- package/dist/agent-interceptor/model-runner.d.ts +19 -0
- package/dist/agent-interceptor/program-runner.d.ts +13 -0
- package/dist/agent-interceptor/protocol.d.ts +68 -0
- package/dist/agent-interceptor/run-stop.d.ts +3 -0
- package/dist/agent-interceptor/schema.d.ts +267 -0
- package/dist/agent-interceptor/types.d.ts +88 -0
- package/dist/app/app-files/args.d.ts +12 -0
- package/dist/app/app-files/errors.d.ts +6 -0
- package/dist/app/app-files/index.d.ts +35 -0
- package/dist/app/app-files/lock.d.ts +26 -0
- package/dist/app/app-files/root.d.ts +22 -0
- package/dist/app/app-files/store.d.ts +48 -0
- package/dist/app/app-files/write.child.d.ts +1 -0
- package/dist/app/app.d.ts +168 -0
- package/dist/app/backend-env.d.ts +3 -0
- package/dist/app/content-media-types.d.ts +2 -0
- package/dist/app/context.d.ts +2 -0
- package/dist/app/entry.d.ts +9 -0
- package/dist/app/frame.d.ts +55 -0
- package/dist/app/index.d.ts +20 -0
- package/dist/app/index.js +13 -0
- package/dist/app/job-bridge.child.d.ts +1 -0
- package/dist/app/job-bridge.d.ts +67 -0
- package/dist/app/job-bridge.drain.child.d.ts +1 -0
- package/dist/app/job-bridge.example.d.ts +11 -0
- package/dist/app/job-contract.d.ts +40 -0
- package/dist/app/job-wire.d.ts +149 -0
- package/dist/app/protocol.d.ts +9 -0
- package/dist/app/runtime.d.ts +23 -0
- package/dist/app/schedule-contract.d.ts +59 -0
- package/dist/app/tool-mode.d.ts +3 -0
- package/dist/app-artifact-policy/check.d.ts +2 -0
- package/dist/app-artifact-policy/contract.d.ts +54 -0
- package/dist/app-artifact-policy/helper.d.ts +15 -0
- package/dist/app-artifact-policy/index.d.ts +3 -0
- package/dist/app-artifact-policy/index.js +18 -0
- package/dist/app-artifact-policy/paths.d.ts +24 -0
- package/dist/app-artifact-policy/scan.d.ts +47 -0
- package/dist/app-ui/index.d.ts +95 -0
- package/dist/app-ui/index.js +1 -0
- package/dist/attachment-receive/index.d.ts +76 -0
- package/dist/attachment-receive/index.js +2 -0
- package/dist/boxing/box.types.d.ts +4 -0
- package/dist/config/canonicalize-agent-options.d.ts +2 -0
- package/dist/config/default-agent-models.d.ts +11 -0
- package/dist/config/global-settings.d.ts +33 -0
- package/dist/config/migrate-grok-mode.d.ts +6 -0
- package/dist/config/model-compat.d.ts +31 -0
- package/dist/config/models.generated.d.ts +38 -0
- package/dist/config/models.remote.d.ts +1 -0
- package/dist/config/overdrive.d.ts +7 -0
- package/dist/config/pricing.d.ts +6 -3
- package/dist/config/pricing.generated.d.ts +4 -0
- package/dist/config/pricing.types.d.ts +4 -0
- package/dist/config/timeout.config.d.ts +4 -0
- package/dist/config/wi-boards.d.ts +19 -0
- package/dist/context/GoalLoader.d.ts +6 -0
- package/dist/context-budget/continuity.d.ts +64 -0
- package/dist/context-budget/fixed-slot-shrink.d.ts +97 -0
- package/dist/context-budget/index.d.ts +168 -0
- package/dist/conversation/index.d.ts +1 -1
- package/dist/conversation/sqlite-provider.d.ts +6 -3
- package/dist/conversation/to-template-messages.d.ts +9 -0
- package/dist/conversation/types.d.ts +86 -1
- package/dist/desktop/command-runner.d.ts +4 -0
- package/dist/desktop/default-adapters.d.ts +4 -0
- package/dist/desktop/global-install.d.ts +19 -0
- package/dist/desktop/index.d.ts +3 -0
- package/dist/desktop/index.js +3 -0
- package/dist/desktop/install.d.ts +5 -0
- package/dist/desktop/lnk.d.ts +22 -0
- package/dist/desktop/manifest.d.ts +21 -0
- package/dist/desktop/types.d.ts +67 -0
- package/dist/desktop/version.d.ts +1 -0
- package/dist/desktop/windows-paths.d.ts +21 -0
- package/dist/desktop/wrapper.d.ts +18 -0
- package/dist/esm/account/index.js +2 -0
- package/dist/esm/app/index.js +13 -0
- package/dist/esm/app-artifact-policy/index.js +18 -0
- package/dist/esm/attachment-receive/index.js +2 -0
- package/dist/esm/desktop/index.js +3 -0
- package/dist/esm/history-snapshot/index.js +16 -0
- package/dist/esm/index.js +1362 -224
- package/dist/esm/node/index.js +2 -0
- package/dist/esm/plugins/index.js +532 -214
- package/dist/esm/process/index.js +1 -0
- package/dist/esm/publish/index.js +2 -0
- package/dist/esm/repository/index.js +792 -207
- package/dist/esm/skills/index.js +2 -0
- package/dist/esm/testing/index.js +1 -1
- package/dist/events/types.d.ts +44 -0
- package/dist/facade/Crewx.d.ts +78 -5
- package/dist/facade/task-ticket.d.ts +14 -0
- package/dist/highlight/thread-highlight-prompt.d.ts +2 -0
- package/dist/highlight/thread-highlighter.d.ts +326 -0
- package/dist/history-snapshot/index.d.ts +82 -0
- package/dist/history-snapshot/index.js +16 -0
- package/dist/index.browser.d.ts +26 -1
- package/dist/index.browser.js +6 -2
- package/dist/index.d.ts +165 -18
- package/dist/index.js +1362 -224
- package/dist/internal/console-decoder.d.ts +38 -0
- package/dist/internal/windows-spawn.d.ts +10 -0
- package/dist/layout/types.d.ts +18 -1
- package/dist/lifecycle/process-lease.d.ts +80 -0
- package/dist/lifecycle/process-owner.d.ts +20 -0
- package/dist/lifecycle/task-heartbeat.d.ts +41 -0
- package/dist/lifecycle/task-stop.d.ts +112 -0
- package/dist/lifecycle/update-admission.d.ts +45 -0
- package/dist/local-server/base-url.d.ts +18 -0
- package/dist/local-server/index.d.ts +8 -0
- package/dist/local-server/opencode.d.ts +8 -0
- package/dist/local-server/probe.d.ts +3 -0
- package/dist/local-server/runtime.d.ts +26 -0
- package/dist/local-server/types.d.ts +43 -0
- package/dist/mcp-app/agent-access.d.ts +33 -0
- package/dist/mcp-app/app-handoff.d.ts +109 -0
- package/dist/mcp-app/app-icon-read.d.ts +7 -0
- package/dist/mcp-app/app-job-bridge.d.ts +30 -0
- package/dist/mcp-app/app-job-bridge.example.d.ts +36 -0
- package/dist/mcp-app/app-job.d.ts +168 -0
- package/dist/mcp-app/app-schedule.d.ts +85 -0
- package/dist/mcp-app/apps-context.d.ts +32 -0
- package/dist/mcp-app/bundle-provenance.d.ts +3 -0
- package/dist/mcp-app/candidate-registration.d.ts +4 -0
- package/dist/mcp-app/card-handler.d.ts +7 -0
- package/dist/mcp-app/catalog.d.ts +7 -0
- package/dist/mcp-app/content-channel.d.ts +86 -0
- package/dist/mcp-app/content-declarations.d.ts +31 -0
- package/dist/mcp-app/dev-checks.d.ts +31 -0
- package/dist/mcp-app/diagnostic-reason.d.ts +3 -0
- package/dist/mcp-app/discovery.d.ts +164 -0
- package/dist/mcp-app/errors.d.ts +7 -0
- package/dist/mcp-app/index.d.ts +46 -0
- package/dist/mcp-app/installed-app-ref.d.ts +25 -0
- package/dist/mcp-app/model-context.d.ts +29 -0
- package/dist/mcp-app/node-app-discovery-fs.d.ts +23 -0
- package/dist/mcp-app/product-bundle-assets.d.ts +27 -0
- package/dist/mcp-app/product-bundle-loader.d.ts +53 -0
- package/dist/mcp-app/projection.d.ts +14 -0
- package/dist/mcp-app/prompt-cards.d.ts +28 -0
- package/dist/mcp-app/registry.d.ts +28 -0
- package/dist/mcp-app/skill-backend.d.ts +141 -0
- package/dist/mcp-app/state-set.d.ts +9 -0
- package/dist/mcp-app/types.d.ts +501 -0
- package/dist/mcp-app/view-call.d.ts +7 -0
- package/dist/mcp-app/workspace-app-assets.d.ts +42 -0
- package/dist/mcp-app/workspace-app-scan-cache.d.ts +27 -0
- package/dist/mcp-app/workspace-snapshot.d.ts +81 -0
- package/dist/migrations/0011_far_black_tarantula.sql +1 -0
- package/dist/migrations/0012_blue_turbo.sql +23 -0
- package/dist/migrations/0013_hesitant_adam_destine.sql +15 -0
- package/dist/migrations/0014_organic_mongu.sql +73 -0
- package/dist/migrations/0015_panoramic_gorilla_man.sql +71 -0
- package/dist/migrations/0016_fuzzy_hemingway.sql +14 -0
- package/dist/migrations/0017_project_stage_sdk_migration.sql +29 -0
- package/dist/migrations/0018_bored_jackal.sql +33 -0
- package/dist/migrations/0019_backfill_task_thread_ids.sql +74 -0
- package/dist/migrations/0020_useful_iron_lad.sql +55 -0
- package/dist/migrations/0021_dashing_peter_quill.sql +51 -0
- package/dist/migrations/0022_wandering_bucky.sql +1 -0
- package/dist/migrations/0023_red_payback.sql +1 -0
- package/dist/migrations/0024_storage_metadata.sql +262 -0
- package/dist/migrations/0025_task_heartbeat.sql +8 -0
- package/dist/migrations/0025_thread_app_instance_ledger.sql +2 -0
- package/dist/migrations/0026_mcp_action_source.sql +47 -0
- package/dist/migrations/0027_task_stop_scope_cleanup.sql +5 -0
- package/dist/migrations/0027_ui_instance_active_unique.sql +2 -0
- package/dist/migrations/0029_nice_rhino.sql +1 -0
- package/dist/migrations/0031_petite_arclight.sql +6 -0
- package/dist/migrations/0032_ui_instance_opened_by.sql +1 -0
- package/dist/migrations/0033_thread_creator_boundary_guard.sql +38 -0
- package/dist/migrations/0034_keen_fallen_one.sql +36 -0
- package/dist/migrations/0035_request_log_daily.sql +11 -0
- package/dist/migrations/0036_ui_definition_archive.sql +8 -0
- package/dist/migrations/0037_ui_instance_agent_open_request.sql +1 -0
- package/dist/migrations/0038_task_rating.sql +3 -0
- package/dist/migrations/0039_aspiring_purifiers.sql +9 -0
- package/dist/migrations/0040_task_provider_inputs.sql +53 -0
- package/dist/migrations/0041_tranquil_vivisector.sql +54 -0
- package/dist/migrations/0042_breezy_blue_shield.sql +31 -0
- package/dist/migrations/0043_nervous_darkstar.sql +1 -0
- package/dist/migrations/0044_military_galactus.sql +8 -0
- package/dist/migrations/0045_task_pid_started_at.sql +1 -0
- package/dist/migrations/0046_acoustic_karnak.sql +49 -0
- package/dist/migrations/0047_doc_sync_connect_requests.sql +18 -0
- package/dist/migrations/0048_smart_gertrude_yorkes.sql +47 -0
- package/dist/migrations/meta/0011_snapshot.json +1342 -0
- package/dist/migrations/meta/0012_snapshot.json +1494 -0
- package/dist/migrations/meta/0013_snapshot.json +1592 -0
- package/dist/migrations/meta/0014_snapshot.json +1975 -0
- package/dist/migrations/meta/0015_snapshot.json +2315 -0
- package/dist/migrations/meta/0016_snapshot.json +2419 -0
- package/dist/migrations/meta/0017_snapshot.json +2419 -0
- package/dist/migrations/meta/0018_snapshot.json +2570 -0
- package/dist/migrations/meta/0020_snapshot.json +2895 -0
- package/dist/migrations/meta/0021_snapshot.json +3031 -0
- package/dist/migrations/meta/0022_snapshot.json +3039 -0
- package/dist/migrations/meta/0023_snapshot.json +3047 -0
- package/dist/migrations/meta/0029_snapshot.json +3206 -0
- package/dist/migrations/meta/0031_snapshot.json +3251 -0
- package/dist/migrations/meta/0034_snapshot.json +3473 -0
- package/dist/migrations/meta/0035_snapshot.json +3547 -0
- package/dist/migrations/meta/0036_snapshot.json +3591 -0
- package/dist/migrations/meta/0037_snapshot.json +3598 -0
- package/dist/migrations/meta/0038_snapshot.json +3626 -0
- package/dist/migrations/meta/0039_snapshot.json +3684 -0
- package/dist/migrations/meta/0040_snapshot.json +3759 -0
- package/dist/migrations/meta/0041_snapshot.json +4156 -0
- package/dist/migrations/meta/0042_snapshot.json +4383 -0
- package/dist/migrations/meta/0043_snapshot.json +4390 -0
- package/dist/migrations/meta/0044_snapshot.json +4435 -0
- package/dist/migrations/meta/0045_snapshot.json +4442 -0
- package/dist/migrations/meta/0046_snapshot.json +4733 -0
- package/dist/migrations/meta/0047_snapshot.json +4832 -0
- package/dist/migrations/meta/0048_snapshot.json +5128 -0
- package/dist/migrations/meta/_journal.json +266 -0
- package/dist/node/index.d.ts +1 -0
- package/dist/node/index.js +2 -0
- package/dist/paths.d.ts +1 -0
- package/dist/plugin/types.d.ts +1 -0
- package/dist/plugins/index.d.ts +1 -1
- package/dist/plugins/index.js +532 -214
- package/dist/plugins/sqlite-tracing.d.ts +46 -0
- package/dist/process/index.d.ts +2 -0
- package/dist/process/index.js +1 -0
- package/dist/process/process-control.d.ts +74 -0
- package/dist/prompt/tag-names.d.ts +22 -0
- package/dist/provider/acp/adapter.d.ts +37 -2
- package/dist/provider/acp/adapters/antigravity-account.d.ts +4 -0
- package/dist/provider/acp/completion-observer.d.ts +24 -0
- package/dist/provider/acp/connection.d.ts +69 -3
- package/dist/provider/acp/index.d.ts +3 -3
- package/dist/provider/acp/meta.d.ts +11 -0
- package/dist/provider/acp/register.d.ts +1 -0
- package/dist/provider/acp/runtime.d.ts +1 -0
- package/dist/provider/acp/types.d.ts +31 -4
- package/dist/provider/bridge.browser.d.ts +3 -0
- package/dist/provider/bridge.d.ts +25 -3
- package/dist/provider/classify-task-error.d.ts +2 -0
- package/dist/provider/claude-agent-env.d.ts +1 -0
- package/dist/provider/cli/adapter.types.d.ts +26 -2
- package/dist/provider/cli/adapters/agent-call.util.d.ts +1 -1
- package/dist/provider/cli/adapters/antigravity-stream.d.ts +27 -0
- package/dist/provider/cli/adapters/antigravity.d.ts +1 -0
- package/dist/provider/cli/adapters/cli-knob.util.d.ts +7 -0
- package/dist/provider/cli/adapters/codex-item.d.ts +1 -0
- package/dist/provider/cli/adapters/event-timestamp.util.d.ts +1 -0
- package/dist/provider/cli/adapters/grok.d.ts +2 -0
- package/dist/provider/cli/adapters/index.d.ts +5 -0
- package/dist/provider/cli/index.d.ts +3 -2
- package/dist/provider/cli/meta.d.ts +5 -0
- package/dist/provider/cli/protocol-envelope.d.ts +3 -0
- package/dist/provider/errors.d.ts +5 -1
- package/dist/provider/idle-watchdog.d.ts +19 -0
- package/dist/provider/models.d.ts +17 -12
- package/dist/provider/order.d.ts +1 -1
- package/dist/provider/parse-usage.d.ts +6 -0
- package/dist/provider/provider-selection.d.ts +8 -0
- package/dist/provider/redact-technical-message.d.ts +1 -0
- package/dist/provider/task-error.types.d.ts +17 -0
- package/dist/provider-account/accounts.d.ts +15 -0
- package/dist/provider-account/antigravity-acp/auth.d.ts +29 -0
- package/dist/provider-account/antigravity-acp/browser.d.ts +4 -0
- package/dist/provider-account/antigravity-acp/install.d.ts +42 -0
- package/dist/provider-account/antigravity-acp/lease.d.ts +23 -0
- package/dist/provider-account/antigravity-acp/lifecycle.d.ts +76 -0
- package/dist/provider-account/antigravity-acp/manifest.d.ts +76 -0
- package/dist/provider-account/antigravity-acp/profile.d.ts +4 -0
- package/dist/provider-account/capabilities.d.ts +6 -0
- package/dist/provider-account/index.d.ts +13 -0
- package/dist/provider-account/registry.d.ts +30 -0
- package/dist/provider-account/types.d.ts +47 -0
- package/dist/publish/constants.d.ts +6 -0
- package/dist/publish/errors.d.ts +7 -0
- package/dist/publish/index.d.ts +55 -0
- package/dist/publish/index.js +2 -0
- package/dist/publish/manifest.d.ts +47 -0
- package/dist/publish/marketplace-api.constants.d.ts +1 -0
- package/dist/publish/pack.d.ts +6 -0
- package/dist/publish/scan.d.ts +10 -0
- package/dist/publish/secrets.d.ts +6 -0
- package/dist/publish/upload.d.ts +19 -0
- package/dist/remote/execution-profile.d.ts +9 -0
- package/dist/remote/index.d.ts +1 -0
- package/dist/remote/types.d.ts +28 -0
- package/dist/repository/agent-send-history.repository.d.ts +23 -0
- package/dist/repository/agent-suggestion.repository.d.ts +34 -0
- package/dist/repository/base-sqlite-repository.d.ts +1 -0
- package/dist/repository/common-code.repository.d.ts +45 -0
- package/dist/repository/db.d.ts +13 -1
- package/dist/repository/index.d.ts +62 -6
- package/dist/repository/index.js +792 -207
- package/dist/repository/logs-db.d.ts +12 -0
- package/dist/repository/notification.repository.d.ts +58 -0
- package/dist/repository/project.repository.d.ts +90 -0
- package/dist/repository/public-task-answer.d.ts +24 -0
- package/dist/repository/request-log-mover.d.ts +70 -0
- package/dist/repository/request-log.repository.d.ts +7 -3
- package/dist/repository/run-columns.d.ts +10 -0
- package/dist/repository/run-history.repository.d.ts +112 -0
- package/dist/repository/schedule-run.repository.d.ts +103 -0
- package/dist/repository/sidebar-tab.repository.d.ts +86 -0
- package/dist/repository/storage-metadata.repository.d.ts +64 -0
- package/dist/repository/task-log-migration.d.ts +74 -0
- package/dist/repository/task-log.repository.d.ts +47 -0
- package/dist/repository/task-status.d.ts +21 -0
- package/dist/repository/task.repository.d.ts +330 -8
- package/dist/repository/thread-history.repository.d.ts +193 -0
- package/dist/repository/thread-origin-verdict.d.ts +27 -0
- package/dist/repository/thread-title.types.d.ts +29 -0
- package/dist/repository/thread.repository.d.ts +134 -5
- package/dist/repository/usage-backfill.d.ts +62 -0
- package/dist/repository/usage-from-logs.d.ts +22 -0
- package/dist/repository/workflow-anchor-kinds.d.ts +4 -0
- package/dist/repository/workspace.repository.d.ts +3 -0
- package/dist/route/decide.d.ts +54 -0
- package/dist/route/eligibility.d.ts +11 -0
- package/dist/route/errors.d.ts +11 -0
- package/dist/route/index.d.ts +14 -0
- package/dist/route/runner.d.ts +15 -0
- package/dist/route/sqlite-store.d.ts +17 -0
- package/dist/route/store.d.ts +45 -0
- package/dist/route/strategies.d.ts +4 -0
- package/dist/route/types.d.ts +212 -0
- package/dist/schema/agent-send-history.d.ts +85 -0
- package/dist/schema/agent-suggestions.d.ts +199 -0
- package/dist/schema/common-codes.d.ts +216 -0
- package/dist/schema/doc-sync-connect-requests.d.ts +140 -0
- package/dist/schema/doc-sync-links.d.ts +481 -0
- package/dist/schema/index.d.ts +21 -0
- package/dist/schema/model-routes.d.ts +581 -0
- package/dist/schema/notifications.d.ts +303 -0
- package/dist/schema/projects.d.ts +610 -0
- package/dist/schema/request-log-daily.d.ts +151 -0
- package/dist/schema/run-column-backfill.d.ts +81 -0
- package/dist/schema/schedule-runs.d.ts +451 -0
- package/dist/schema/sidebar-tabs.d.ts +466 -0
- package/dist/schema/storage-metadata.d.ts +181 -0
- package/dist/schema/task-log-events.d.ts +119 -0
- package/dist/schema/task-provider-inputs.d.ts +100 -0
- package/dist/schema/tasks.d.ts +1172 -1
- package/dist/schema/thread-creator-unverified.d.ts +45 -0
- package/dist/schema/thread-history.d.ts +734 -0
- package/dist/schema/threads.d.ts +59 -0
- package/dist/schema/ui-action-receipts.d.ts +358 -0
- package/dist/schema/ui-definition-archive.d.ts +63 -0
- package/dist/schema/ui-instance-repins.d.ts +222 -0
- package/dist/schema/ui-instances.d.ts +324 -0
- package/dist/schema/workspaces.d.ts +17 -0
- package/dist/skills/index.d.ts +15 -0
- package/dist/skills/index.js +2 -0
- package/dist/skills/types.d.ts +18 -0
- package/dist/task-log/anchor-child-tasks.d.ts +7 -0
- package/dist/task-log/delegation-trailer.d.ts +34 -0
- package/dist/template/engine.d.ts +2 -2
- package/dist/template/helpers/exec.browser.d.ts +4 -3
- package/dist/template/helpers/exec.d.ts +4 -3
- package/dist/template/helpers/format-conversation.d.ts +1 -0
- package/dist/template/types.d.ts +20 -0
- package/dist/testing/index.js +1 -1
- package/dist/types/index.d.ts +3493 -93
- package/dist/types/task-log.types.d.ts +6 -1
- package/dist/ui-card/index.d.ts +2 -0
- package/dist/ui-card/legacy-card-parser.d.ts +11 -0
- package/dist/ui-instance/definition.d.ts +6 -0
- package/dist/ui-instance/errors.d.ts +18 -0
- package/dist/ui-instance/index.d.ts +11 -0
- package/dist/ui-instance/json.d.ts +19 -0
- package/dist/ui-instance/lineage.d.ts +24 -0
- package/dist/ui-instance/runtime.d.ts +19 -0
- package/dist/ui-instance/store.d.ts +216 -0
- package/dist/ui-instance/types.d.ts +384 -0
- package/dist/ui-plugin/app-icon.d.ts +50 -0
- package/dist/ui-plugin/app-manifest.d.ts +64 -0
- package/dist/ui-plugin/csp.d.ts +28 -0
- package/dist/ui-plugin/index.d.ts +8 -0
- package/dist/ui-plugin/limits.d.ts +27 -0
- package/dist/ui-plugin/manifest.d.ts +3 -0
- package/dist/ui-plugin/types.d.ts +220 -0
- package/dist/ui-plugin/validator.d.ts +18 -0
- package/dist/utils/crewx-executable.d.ts +76 -0
- package/dist/utils/crewx-home.d.ts +1 -0
- package/dist/utils/env-defaults.d.ts +3 -0
- package/dist/utils/id.d.ts +1 -1
- package/dist/utils/local-identity.d.ts +2 -0
- package/dist/utils/runner-env.d.ts +3 -0
- package/dist/utils/timestamp.d.ts +1 -0
- package/dist/utils/workspace.d.ts +1 -0
- package/dist/wi/create.d.ts +48 -0
- package/dist/wi/select.d.ts +20 -0
- package/package.json +83 -3
- package/templates/agents/default.yaml +311 -128
- package/templates/documents/crewx-manual.md +138 -138
- package/templates/documents/crewx-quick-guide.md +8 -7
- package/templates/workflows/wi-default-flow.yaml +65 -0
- package/templates/workflows/wi-plan-flow.yaml +140 -0
|
@@ -1,24 +1,38 @@
|
|
|
1
1
|
import type { ProviderQueryOptions, ProviderUsage } from '../bridge.js';
|
|
2
2
|
import type { TaskLogEntry } from '../../types/task-log.types.js';
|
|
3
|
+
import type { ModelTier } from '../../config/models.generated.js';
|
|
3
4
|
import { ProviderError } from '../errors.js';
|
|
5
|
+
export interface ParseEventContext {
|
|
6
|
+
readonly rowIndex: number;
|
|
7
|
+
readonly state: Map<string, unknown>;
|
|
8
|
+
}
|
|
4
9
|
export interface CliProviderAdapter {
|
|
5
10
|
readonly command: string;
|
|
11
|
+
readonly maxInitialInputBytes?: number;
|
|
12
|
+
createSessionId?(): string;
|
|
13
|
+
extractSessionId?(line: string): string | null;
|
|
6
14
|
readonly meta?: {
|
|
7
15
|
displayName?: string;
|
|
8
16
|
models?: Array<{
|
|
9
17
|
id: string;
|
|
10
18
|
name?: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
contextWindowTokens?: number;
|
|
21
|
+
tier?: ModelTier;
|
|
11
22
|
}>;
|
|
12
23
|
defaultTimeoutMs?: {
|
|
13
24
|
query?: number;
|
|
14
25
|
execute?: number;
|
|
15
26
|
};
|
|
27
|
+
defaultIdleMs?: number;
|
|
28
|
+
defaultResumeTimeoutMs?: number;
|
|
16
29
|
capabilities?: {
|
|
17
30
|
resume?: boolean;
|
|
18
31
|
image?: boolean;
|
|
19
32
|
audio?: boolean;
|
|
20
33
|
mcp?: boolean;
|
|
21
34
|
loadSession?: boolean;
|
|
35
|
+
usageCompleteness?: boolean;
|
|
22
36
|
};
|
|
23
37
|
};
|
|
24
38
|
buildArgs(message: string, options: ProviderQueryOptions, isExecute: boolean): {
|
|
@@ -27,14 +41,24 @@ export interface CliProviderAdapter {
|
|
|
27
41
|
env?: Record<string, string>;
|
|
28
42
|
};
|
|
29
43
|
extractText(stdout: string): string;
|
|
44
|
+
extractPartialText?(stdout: string): string | undefined;
|
|
30
45
|
extractFailure?(line: string): Error | null;
|
|
31
|
-
interpretExit?(code: number, stderr: string): Error | null;
|
|
46
|
+
interpretExit?(code: number, stderr: string, stdout?: string): Error | null;
|
|
32
47
|
parseResultMeta?(stdout: string): {
|
|
33
48
|
usage?: ProviderUsage | null;
|
|
34
49
|
model?: string | null;
|
|
35
50
|
};
|
|
36
|
-
parseEvent?(line: string, timestamp?: string): TaskLogEntry[];
|
|
51
|
+
parseEvent?(line: string, timestamp?: string, context?: ParseEventContext): TaskLogEntry[];
|
|
37
52
|
suppressOutputLine?(line: string): boolean;
|
|
53
|
+
observeRateLimit?(line: string): ProviderRateLimitWindows | undefined;
|
|
54
|
+
}
|
|
55
|
+
export interface ProviderRateLimitWindow {
|
|
56
|
+
utilization: number;
|
|
57
|
+
resetsAt: number;
|
|
58
|
+
}
|
|
59
|
+
export interface ProviderRateLimitWindows {
|
|
60
|
+
five_hour?: ProviderRateLimitWindow;
|
|
61
|
+
seven_day?: ProviderRateLimitWindow;
|
|
38
62
|
}
|
|
39
63
|
export declare class RateLimitError extends ProviderError {
|
|
40
64
|
readonly name = "RateLimitError";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { TaskLogEntry } from '../../../types/task-log.types';
|
|
2
2
|
export declare function isAgentCallCommand(command: string): boolean;
|
|
3
|
-
export declare function parseAgentCall(timestamp: string, command: string): TaskLogEntry;
|
|
3
|
+
export declare function parseAgentCall(timestamp: string, command: string, toolUseId?: string): TaskLogEntry;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type JsonRecord = Record<string, unknown>;
|
|
2
|
+
export type AntigravityStreamEvent = {
|
|
3
|
+
kind: 'init';
|
|
4
|
+
envelope: JsonRecord;
|
|
5
|
+
init: JsonRecord;
|
|
6
|
+
} | {
|
|
7
|
+
kind: 'step_update';
|
|
8
|
+
envelope: JsonRecord;
|
|
9
|
+
step: JsonRecord;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'result';
|
|
12
|
+
envelope: JsonRecord;
|
|
13
|
+
result: JsonRecord;
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'legacy_result';
|
|
16
|
+
envelope: JsonRecord;
|
|
17
|
+
result: JsonRecord;
|
|
18
|
+
} | {
|
|
19
|
+
kind: 'agy_error';
|
|
20
|
+
envelope: JsonRecord;
|
|
21
|
+
error: unknown;
|
|
22
|
+
};
|
|
23
|
+
export declare function parseAntigravityLine(line: string): AntigravityStreamEvent | undefined;
|
|
24
|
+
export declare function isAntigravityProtocolLine(line: string): boolean;
|
|
25
|
+
export declare function isAntigravityMetadataOnlyLine(line: string): boolean;
|
|
26
|
+
export declare function parseAntigravityStream(stdout: string): AntigravityStreamEvent[];
|
|
27
|
+
export {};
|
|
@@ -6,3 +6,10 @@ export declare function codexModeArgs(mode?: string): string[];
|
|
|
6
6
|
export declare function codexResumeModeArgs(mode?: string): string[];
|
|
7
7
|
export declare function codexEffortArgs(effort?: string): string[];
|
|
8
8
|
export declare function claudeModeArgs(mode?: string): string[];
|
|
9
|
+
export declare function claudeEffortArgs(effort?: string): string[];
|
|
10
|
+
export declare function grokModeArgs(mode?: string): string[];
|
|
11
|
+
export declare function grokAlwaysApproveArgs(alwaysApprove?: unknown): string[];
|
|
12
|
+
export declare function grokSandboxArgs(sandbox?: unknown, onWarning?: (message: string) => void): string[];
|
|
13
|
+
export declare function grokEffortArgs(effort?: string): string[];
|
|
14
|
+
export declare function antigravityModeArgs(mode?: string): string[];
|
|
15
|
+
export declare function antigravityEffortArgs(effort?: string): string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isCodexDisplaySkippedStart(value: unknown): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveEventTimestamp(parsed: unknown, fallbackTs: string): string;
|
|
@@ -5,6 +5,11 @@ export { copilotAdapter } from './copilot.js';
|
|
|
5
5
|
export { codexAdapter } from './codex.js';
|
|
6
6
|
export { opencodeAdapter } from './opencode.js';
|
|
7
7
|
export { antigravityAdapter } from './antigravity.js';
|
|
8
|
+
export { grokAdapter } from './grok.js';
|
|
8
9
|
export { isAgentCallCommand, parseAgentCall } from './agent-call.util.js';
|
|
9
10
|
export declare const BUILTIN_ADAPTERS: Record<string, CliProviderAdapter>;
|
|
10
11
|
export declare function parseStdoutEvent(timestamp: string, message: string, providerId?: string): TaskLogEntry[];
|
|
12
|
+
export interface LogParseSession {
|
|
13
|
+
parse(timestamp: string, message: string, rowIndex: number): TaskLogEntry[];
|
|
14
|
+
}
|
|
15
|
+
export declare function createLogParseSession(providerId?: string): LogParseSession;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { BUILTIN_ADAPTERS, parseStdoutEvent, claudeAdapter, copilotAdapter, codexAdapter, opencodeAdapter, antigravityAdapter, isAgentCallCommand, parseAgentCall, } from './adapters/index.js';
|
|
2
|
-
export type { CliProviderAdapter } from './adapter.types.js';
|
|
1
|
+
export { BUILTIN_ADAPTERS, parseStdoutEvent, createLogParseSession, claudeAdapter, copilotAdapter, codexAdapter, opencodeAdapter, antigravityAdapter, grokAdapter, isAgentCallCommand, parseAgentCall, } from './adapters/index.js';
|
|
2
|
+
export type { CliProviderAdapter, ParseEventContext } from './adapter.types.js';
|
|
3
3
|
export { RateLimitError } from './adapter.types.js';
|
|
4
|
+
export type { LogParseSession } from './adapters/index.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AcpProviderMetaResult } from '../acp/meta.js';
|
|
2
|
+
import type { ModelTier } from '../../config/models.generated.js';
|
|
2
3
|
import type { CliProviderAdapter } from './adapter.types.js';
|
|
3
4
|
export declare function queryOpencodeModels(): Promise<Array<{
|
|
4
5
|
id: string;
|
|
@@ -6,6 +7,10 @@ export declare function queryOpencodeModels(): Promise<Array<{
|
|
|
6
7
|
export declare function cliAdapterMetaToProviderMeta(key: string, adapter: CliProviderAdapter, overrideModels?: Array<{
|
|
7
8
|
id: string;
|
|
8
9
|
name?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
contextWindowTokens?: number;
|
|
12
|
+
tier?: ModelTier;
|
|
13
|
+
recommended?: boolean;
|
|
9
14
|
}>): AcpProviderMetaResult | null;
|
|
10
15
|
export declare function queryAllCliProviderMetas(options?: {
|
|
11
16
|
includeOpencodeRuntimeModels?: boolean;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare function shouldSkipRawStdoutJsonFallback(message: string, providerId?: string): boolean;
|
|
2
|
+
export declare function isProtocolOnlyText(text: string, providerId?: string): boolean;
|
|
3
|
+
export declare function isMetadataOnlyProtocolLine(message: string, providerId: string): boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type ProviderErrorKind = 'transient' | 'permanent' | 'config';
|
|
2
|
-
export type ProviderErrorCode = 'QUOTA_EXHAUSTED' | 'RATE_LIMITED' | 'EMPTY_OUTPUT' | 'AUTH_REQUIRED' | 'MODEL_UNAVAILABLE' | 'TIMEOUT_IDLE' | 'TIMEOUT_TOTAL' | 'PROVIDER_NOT_FOUND' | 'INVALID_PROVIDER_FORMAT' | 'PROVIDER_CRASHED' | 'UNKNOWN';
|
|
2
|
+
export type ProviderErrorCode = 'QUOTA_EXHAUSTED' | 'RATE_LIMITED' | 'EMPTY_OUTPUT' | 'AUTH_REQUIRED' | 'MODEL_UNAVAILABLE' | 'TIMEOUT_IDLE' | 'TIMEOUT_TOTAL' | 'TIMEOUT_RESUME' | 'PROVIDER_NOT_FOUND' | 'INVALID_PROVIDER_FORMAT' | 'PROVIDER_CRASHED' | 'UNKNOWN';
|
|
3
3
|
export interface ProviderErrorOptions {
|
|
4
4
|
code?: ProviderErrorCode;
|
|
5
5
|
kind?: ProviderErrorKind;
|
|
@@ -10,6 +10,7 @@ export declare class ProviderError extends Error {
|
|
|
10
10
|
readonly code: ProviderErrorCode;
|
|
11
11
|
readonly kind?: ProviderErrorKind;
|
|
12
12
|
readonly retryAfterMs?: number;
|
|
13
|
+
stdout?: string;
|
|
13
14
|
constructor(message: string, providerStr: string, options?: ProviderErrorOptions);
|
|
14
15
|
}
|
|
15
16
|
export declare class IdleTimeoutError extends ProviderError {
|
|
@@ -18,3 +19,6 @@ export declare class IdleTimeoutError extends ProviderError {
|
|
|
18
19
|
export declare class TotalTimeoutError extends ProviderError {
|
|
19
20
|
constructor(message: string, providerStr: string);
|
|
20
21
|
}
|
|
22
|
+
export declare class ResumeTimeoutError extends ProviderError {
|
|
23
|
+
constructor(message: string, providerStr: string);
|
|
24
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface IdleWatchdogOptions {
|
|
2
|
+
timeoutMs: number;
|
|
3
|
+
onIdle: () => void;
|
|
4
|
+
now?: () => number;
|
|
5
|
+
}
|
|
6
|
+
export declare class IdleWatchdog {
|
|
7
|
+
private readonly timeoutMs;
|
|
8
|
+
private readonly onIdleCb;
|
|
9
|
+
private readonly now;
|
|
10
|
+
private timer;
|
|
11
|
+
private lastActivity;
|
|
12
|
+
private settled;
|
|
13
|
+
constructor(options: IdleWatchdogOptions);
|
|
14
|
+
start(): void;
|
|
15
|
+
refresh(): void;
|
|
16
|
+
stop(): void;
|
|
17
|
+
private scheduleCheck;
|
|
18
|
+
private fireIdle;
|
|
19
|
+
}
|
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
import { type ModelCatalogEntry, type ProviderCatalogEntry, type ProviderModeEntry, type ProviderModelOverride } from '../config/models.generated.js';
|
|
2
|
-
|
|
1
|
+
import { type ModelCatalogEntry, type ModelTier, type ProviderCatalogEntry, type ProviderDefaultProfile, type ProviderModeEntry, type ProviderModelOverride } from '../config/models.generated.js';
|
|
2
|
+
import type { ModelApiPricing } from '../config/pricing.types.js';
|
|
3
|
+
export type { ModelTier, ModelCatalogEntry, ProviderCatalogEntry, ProviderDefaultProfile, ProviderDefaults, ProviderModeEntry, ProviderOptionSpec, ProviderModelOverride, } from '../config/models.generated.js';
|
|
4
|
+
export type ModelMergeEntry = {
|
|
5
|
+
id: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
contextWindowTokens?: number;
|
|
9
|
+
tier?: ModelTier;
|
|
10
|
+
recommended?: boolean;
|
|
11
|
+
apiPricing?: ModelApiPricing;
|
|
12
|
+
};
|
|
3
13
|
export declare function setModelsOverride(providers: Record<string, ProviderCatalogEntry | ModelCatalogEntry[]>): void;
|
|
4
14
|
export declare function clearModelsOverride(): void;
|
|
15
|
+
export declare function setModelsDefaultsOverride(providers: Record<string, ProviderDefaultProfile>): void;
|
|
16
|
+
export declare function clearModelsDefaultsOverride(): void;
|
|
5
17
|
export declare function getProviderModels(provider: string): ModelCatalogEntry[];
|
|
6
18
|
export declare function getProviderCatalog(provider: string): ProviderCatalogEntry;
|
|
19
|
+
export declare function getProviderDefaultProfile(provider: string): ProviderDefaultProfile | undefined;
|
|
7
20
|
export declare function getProviderModes(provider: string): ProviderModeEntry[];
|
|
8
21
|
export declare function getProviderEffort(provider: string, model?: string): string[];
|
|
9
22
|
export declare function getProviderModelOverrides(provider: string): Record<string, ProviderModelOverride>;
|
|
@@ -11,13 +24,5 @@ export declare function getClaudeModels(): ModelCatalogEntry[];
|
|
|
11
24
|
export declare function getCodexModels(): ModelCatalogEntry[];
|
|
12
25
|
export declare function getCopilotModels(): ModelCatalogEntry[];
|
|
13
26
|
export declare function getAntigravityModels(): ModelCatalogEntry[];
|
|
14
|
-
export declare function mergeModels(a:
|
|
15
|
-
|
|
16
|
-
name?: string;
|
|
17
|
-
}>, b: Array<{
|
|
18
|
-
id: string;
|
|
19
|
-
name?: string;
|
|
20
|
-
}>): Array<{
|
|
21
|
-
id: string;
|
|
22
|
-
name?: string;
|
|
23
|
-
}>;
|
|
27
|
+
export declare function mergeModels(a: ModelMergeEntry[], b: ModelMergeEntry[]): ModelMergeEntry[];
|
|
28
|
+
export declare function withApiPricing(models: ModelMergeEntry[]): ModelMergeEntry[];
|
package/dist/provider/order.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const PROVIDER_ORDER: readonly ["codex", "claude", "opencode", "antigravity", "copilot"];
|
|
1
|
+
export declare const PROVIDER_ORDER: readonly ["codex", "claude", "grok", "opencode", "antigravity", "copilot"];
|
|
2
2
|
export declare function providerRank(id: string): number;
|
|
3
3
|
export declare function compareProviders(a: string, b: string): number;
|
|
4
4
|
export declare function normalizeProviderId(provider?: string): string;
|
|
@@ -3,4 +3,10 @@ export interface ParsedUsage {
|
|
|
3
3
|
outputTokens: number;
|
|
4
4
|
cachedInputTokens: number;
|
|
5
5
|
}
|
|
6
|
+
export interface ClaudePartialUsage {
|
|
7
|
+
inputTokens: number;
|
|
8
|
+
cachedInputTokens: number;
|
|
9
|
+
model?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function parseClaudePartialUsage(stdout: string): ClaudePartialUsage | undefined;
|
|
6
12
|
export declare function parseUsage(stdout: string): ParsedUsage | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CliProviderAdapter } from './cli/adapter.types.js';
|
|
2
|
+
export declare function lookupCliAdapter(providerStr: string): CliProviderAdapter | undefined;
|
|
3
|
+
export type ProviderAvailabilityDeps = {
|
|
4
|
+
lookupAdapter?: (providerStr: string) => CliProviderAdapter | undefined;
|
|
5
|
+
env?: NodeJS.ProcessEnv;
|
|
6
|
+
};
|
|
7
|
+
export declare function isProviderAvailable(providerStr: string, deps?: ProviderAvailabilityDeps): boolean;
|
|
8
|
+
export declare function selectAvailableProvider(providers: string | string[], deps?: ProviderAvailabilityDeps): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function redactTechnicalMessage(value: unknown): string | undefined;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type TaskErrorCode = 'USAGE_LIMITED' | 'CONTEXT_WINDOW_EXCEEDED' | 'INPUT_TOO_LARGE' | 'MODEL_NOT_SUPPORTED' | 'MODEL_AT_CAPACITY' | 'AUTH_REQUIRED' | 'CLI_NOT_AVAILABLE' | 'CLI_UPDATE_REQUIRED' | 'AGENT_NOT_FOUND' | 'PERMISSION_OR_TRUST' | 'TIMEOUT_OR_STUCK' | 'NETWORK_OR_PROVIDER_TRANSIENT' | 'PROVIDER_CONFIGURATION' | 'AGENT_MODE_RESTRICTED' | 'PROCESS_FAILED';
|
|
2
|
+
export interface TaskErrorMeta {
|
|
3
|
+
resetAt?: string | number;
|
|
4
|
+
model?: string;
|
|
5
|
+
cliName?: string;
|
|
6
|
+
envKey?: string;
|
|
7
|
+
upstreamType?: string;
|
|
8
|
+
upstreamCode?: string | number;
|
|
9
|
+
mode?: string;
|
|
10
|
+
referenceId?: string;
|
|
11
|
+
technicalMessage?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface TaskErrorProjection {
|
|
14
|
+
errorCode: TaskErrorCode | null;
|
|
15
|
+
errorProvider: string | null;
|
|
16
|
+
errorMeta?: TaskErrorMeta;
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type AddedAiAccount, type AiAccountEnvPlan, type AiAccountInvocation, type AiAccountProvider, type AiAccountSummary, type ResolvedAiAccount, type ResolveAiAccountInput } from './types';
|
|
2
|
+
export declare function aiAccountEnvPlan(provider: AiAccountProvider, namedDir?: string): AiAccountEnvPlan;
|
|
3
|
+
export declare function applyAiAccountEnv(base: NodeJS.ProcessEnv, plan: AiAccountEnvPlan): NodeJS.ProcessEnv;
|
|
4
|
+
export declare function listAiAccounts(provider: string): AiAccountSummary[];
|
|
5
|
+
export declare function addAiAccount(provider: string, label: string): AddedAiAccount;
|
|
6
|
+
export declare function removeAiAccount(id: string): {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
provider: AiAccountProvider;
|
|
10
|
+
removedAt: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function setActiveAiAccount(provider: string, id: string): void;
|
|
13
|
+
export declare function getLoginInvocation(id: string, provider?: string): AiAccountInvocation;
|
|
14
|
+
export declare function getStatusInvocation(id: string, provider?: string): AiAccountInvocation;
|
|
15
|
+
export declare function resolveAiAccountForRun(input: ResolveAiAccountInput): ResolvedAiAccount | undefined;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AcpConnection } from '../../provider/acp/connection.js';
|
|
2
|
+
import type { AcpLineInterceptor } from '../../provider/acp/adapter.js';
|
|
3
|
+
import type { InitializeResponse } from '../../provider/acp/types.js';
|
|
4
|
+
import { AiAccountError } from '../types.js';
|
|
5
|
+
import type { AiAccountErrorCode } from '../types.js';
|
|
6
|
+
export type AntigravityAuthPromptMode = 'interactive' | 'noninteractive';
|
|
7
|
+
export interface AntigravityAuthPromptObserver {
|
|
8
|
+
readonly mode: AntigravityAuthPromptMode;
|
|
9
|
+
readonly interceptLine: AcpLineInterceptor;
|
|
10
|
+
readonly authorizationUrl: string | null;
|
|
11
|
+
readonly failureCode: 'ACCOUNT_NOT_SIGNED_IN' | 'ACCOUNT_LOGIN_FAILED' | 'ACCOUNT_LOGIN_UNSUPPORTED_POLICY' | null;
|
|
12
|
+
readonly browserSuppressionObserved: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface CreateAntigravityAuthPromptObserverOptions {
|
|
15
|
+
mode: AntigravityAuthPromptMode;
|
|
16
|
+
controller: AbortController;
|
|
17
|
+
onAuthorizationUrl?: (url: string) => void;
|
|
18
|
+
onBrowserSuppression?: () => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function parseAntigravityAuthorizationUrl(value: string): string;
|
|
21
|
+
export declare function redactOAuthText(value: string): string;
|
|
22
|
+
export declare function createAntigravityAuthPromptObserver(options: CreateAntigravityAuthPromptObserverOptions): AntigravityAuthPromptObserver;
|
|
23
|
+
export declare function validateAntigravityInitialize(result: InitializeResponse | null | undefined, options?: {
|
|
24
|
+
requireLogout?: boolean;
|
|
25
|
+
}): asserts result is InitializeResponse;
|
|
26
|
+
export declare function authenticateAntigravityAcpConnection(connection: AcpConnection, observer: AntigravityAuthPromptObserver, options?: {
|
|
27
|
+
signal?: AbortSignal;
|
|
28
|
+
}): Promise<void>;
|
|
29
|
+
export declare function accountError(code: AiAccountErrorCode): AiAccountError;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const ANTIGRAVITY_BROWSER_SUPPRESSION_MARKER = "__CREWX_AGY_BROWSER_SUPPRESSED__";
|
|
2
|
+
export declare const ANTIGRAVITY_BROWSER_SUPPRESSION_SCRIPT = "#!/bin/sh\nprintf '%s\\n' '__CREWX_AGY_BROWSER_SUPPRESSED__' >&2\nexit 0\n";
|
|
3
|
+
export declare function createBrowserSuppressionHelper(directory: string): string;
|
|
4
|
+
export declare function isSupportedBrowserHelperPath(helperPath: string): boolean;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type AiAccountProvider } from '../types';
|
|
2
|
+
import { type AntigravityAcpDistribution } from './manifest';
|
|
3
|
+
export type AiAccountRuntimeStatusReason = 'unsupported_platform' | 'not_installed' | 'digest_mismatch' | 'helper_path_unsupported';
|
|
4
|
+
export interface AiAccountRuntimeStatus {
|
|
5
|
+
installed: boolean;
|
|
6
|
+
version?: string;
|
|
7
|
+
platformSupported: boolean;
|
|
8
|
+
reason?: AiAccountRuntimeStatusReason;
|
|
9
|
+
}
|
|
10
|
+
export type AiAccountRuntimeInstallPhase = 'download' | 'verify' | 'extract' | 'finalize';
|
|
11
|
+
export interface AiAccountRuntimeInstallProgress {
|
|
12
|
+
phase: AiAccountRuntimeInstallPhase;
|
|
13
|
+
receivedBytes?: number;
|
|
14
|
+
totalBytes?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface InstallAiAccountRuntimeOptions {
|
|
17
|
+
signal?: AbortSignal;
|
|
18
|
+
onProgress?: (progress: AiAccountRuntimeInstallProgress) => void;
|
|
19
|
+
}
|
|
20
|
+
export interface TrustedAiAccountRuntimePaths {
|
|
21
|
+
command: string;
|
|
22
|
+
args: string[];
|
|
23
|
+
harnessPath: string;
|
|
24
|
+
browserHelper: string;
|
|
25
|
+
browserSetting: string;
|
|
26
|
+
version: string;
|
|
27
|
+
}
|
|
28
|
+
export interface RuntimeInstallDependencies {
|
|
29
|
+
homeDir: string;
|
|
30
|
+
distribution: AntigravityAcpDistribution;
|
|
31
|
+
fetcher: typeof fetch;
|
|
32
|
+
}
|
|
33
|
+
export declare function getAiAccountRuntimeStatus(provider: AiAccountProvider): AiAccountRuntimeStatus;
|
|
34
|
+
export declare function installAiAccountRuntime(provider: AiAccountProvider, options?: InstallAiAccountRuntimeOptions): Promise<AiAccountRuntimeStatus & {
|
|
35
|
+
installed: true;
|
|
36
|
+
}>;
|
|
37
|
+
export declare function resolveInstalledAiAccountRuntime(provider: AiAccountProvider): TrustedAiAccountRuntimePaths;
|
|
38
|
+
export declare function getAiAccountRuntimeStatusAt(provider: AiAccountProvider, homeDir: string, platform: string, architecture: string, distributionOverride?: AntigravityAcpDistribution): AiAccountRuntimeStatus;
|
|
39
|
+
export declare function resolveInstalledAiAccountRuntimeAt(provider: AiAccountProvider, homeDir: string, distribution: AntigravityAcpDistribution): TrustedAiAccountRuntimePaths;
|
|
40
|
+
export declare function installAiAccountRuntimeWithDependencies(provider: AiAccountProvider, options: InstallAiAccountRuntimeOptions, dependencies: RuntimeInstallDependencies): Promise<AiAccountRuntimeStatus & {
|
|
41
|
+
installed: true;
|
|
42
|
+
}>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type AntigravityAuthRecord = Readonly<{
|
|
2
|
+
epoch: string;
|
|
3
|
+
state: 'stable' | 'login';
|
|
4
|
+
}>;
|
|
5
|
+
export type AntigravityProfileLeaseErrorCode = 'INVALID_PROFILE_DIR' | 'INVALID_TASK_ID' | 'AUTH_REQUIRED' | 'AUTH_INCOMPLETE' | 'AUTH_RECORD_INVALID' | 'AUTH_EPOCH_CHANGED' | 'AUTH_EPOCH_MISMATCH' | 'AUTHENTICATION_NOT_BEGUN' | 'PROFILE_BUSY' | 'LOCK_INVALID' | 'LOCK_UNVERIFIABLE' | 'OWNERSHIP_MISMATCH' | 'LEASE_RELEASED' | 'IO_ERROR';
|
|
6
|
+
export declare class AntigravityProfileLeaseError extends Error {
|
|
7
|
+
readonly code: AntigravityProfileLeaseErrorCode;
|
|
8
|
+
constructor(code: AntigravityProfileLeaseErrorCode, message: string, cause?: unknown);
|
|
9
|
+
}
|
|
10
|
+
export type AntigravityRunLease = Readonly<{
|
|
11
|
+
epoch: string;
|
|
12
|
+
release: () => Promise<void>;
|
|
13
|
+
}>;
|
|
14
|
+
export type AntigravityExclusiveProfileLease = Readonly<{
|
|
15
|
+
beginAuthentication: () => Promise<string>;
|
|
16
|
+
commitAuthentication: (epoch: string) => Promise<void>;
|
|
17
|
+
commitLogout: (epoch: string) => Promise<void>;
|
|
18
|
+
release: () => Promise<void>;
|
|
19
|
+
}>;
|
|
20
|
+
export declare function readAuthRecord(accountDir: string): Promise<AntigravityAuthRecord | null>;
|
|
21
|
+
export declare function acquireRunLease(accountDir: string, taskId: string): Promise<AntigravityRunLease>;
|
|
22
|
+
export declare function acquireExclusiveProfileLease(accountDir: string): Promise<AntigravityExclusiveProfileLease>;
|
|
23
|
+
export declare function assertProfileIdle(accountDir: string): Promise<void>;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { AcpConnection } from '../../provider/acp/connection.js';
|
|
2
|
+
import type { AcpConnectionOptions } from '../../provider/acp/connection.js';
|
|
3
|
+
import type { AcpSpawnConfig } from '../../provider/acp/adapter.js';
|
|
4
|
+
import { removeAiAccount } from '../accounts.js';
|
|
5
|
+
import { type TrustedAiAccountRuntimePaths } from './install.js';
|
|
6
|
+
import { type AiAccountErrorCode, type ResolvedAiAccount } from '../types.js';
|
|
7
|
+
export type AiAccountRuntimeKind = 'native' | 'acp';
|
|
8
|
+
export type AiAccountState = 'signed-in' | 'signed-out' | 'runtime-missing' | 'login-in-progress' | 'login-incomplete' | 'error';
|
|
9
|
+
export type AntigravityAccountErrorCode = AiAccountErrorCode;
|
|
10
|
+
export interface AiAccountStatus {
|
|
11
|
+
accountId: string;
|
|
12
|
+
state: AiAccountState;
|
|
13
|
+
authEpoch?: string;
|
|
14
|
+
runtimeVersion?: string;
|
|
15
|
+
code?: AntigravityAccountErrorCode;
|
|
16
|
+
}
|
|
17
|
+
export interface AiAccountLoginResult {
|
|
18
|
+
state: 'signed-in';
|
|
19
|
+
authEpoch: string;
|
|
20
|
+
browserSuppressionObserved: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface AiAccountLoginHandle {
|
|
23
|
+
readonly accountId: string;
|
|
24
|
+
readonly authorizationUrl: Promise<string | null>;
|
|
25
|
+
readonly done: Promise<AiAccountLoginResult>;
|
|
26
|
+
cancel(): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
export interface AiAccountRunBinding {
|
|
29
|
+
readonly accountId: string;
|
|
30
|
+
readonly runtime: 'acp';
|
|
31
|
+
readonly runtimeVersion: string;
|
|
32
|
+
readonly authEpoch: string;
|
|
33
|
+
readonly spawn: AcpSpawnConfig;
|
|
34
|
+
readonly env: Record<string, string>;
|
|
35
|
+
readonly unsetEnv: string[];
|
|
36
|
+
readonly unsetEnvPrefixes: string[];
|
|
37
|
+
release(): Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
export interface AiAccountResumeMetadata {
|
|
40
|
+
authEpoch?: string;
|
|
41
|
+
runtime?: string;
|
|
42
|
+
runtimeVersion?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface AntigravityAccountServiceDependencies {
|
|
45
|
+
resolveRuntime?: () => TrustedAiAccountRuntimePaths;
|
|
46
|
+
createConnection?: (options: AcpConnectionOptions) => AcpConnection;
|
|
47
|
+
}
|
|
48
|
+
export interface AiAccountLifecycleOptions {
|
|
49
|
+
signal?: AbortSignal;
|
|
50
|
+
timeoutMs?: number;
|
|
51
|
+
}
|
|
52
|
+
export declare function createAntigravityAccountService(dependencies?: AntigravityAccountServiceDependencies): {
|
|
53
|
+
getAiAccountStatus: (accountId: string, options?: AiAccountLifecycleOptions) => Promise<AiAccountStatus>;
|
|
54
|
+
startAiAccountLogin: (accountId: string, options?: AiAccountLifecycleOptions) => Promise<AiAccountLoginHandle>;
|
|
55
|
+
logoutAiAccount: (accountId: string) => Promise<void>;
|
|
56
|
+
assertAiAccountIdle: (accountId: string) => Promise<void>;
|
|
57
|
+
withAiAccountExclusive: <T>(accountId: string, operation: () => T | Promise<T>) => Promise<T>;
|
|
58
|
+
removeAiAccountGuarded: (accountId: string) => Promise<ReturnType<typeof removeAiAccount>>;
|
|
59
|
+
bindAiAccountRun: (input: {
|
|
60
|
+
account: ResolvedAiAccount;
|
|
61
|
+
taskId: string;
|
|
62
|
+
resume?: AiAccountResumeMetadata;
|
|
63
|
+
}) => Promise<AiAccountRunBinding>;
|
|
64
|
+
};
|
|
65
|
+
export declare const getAiAccountStatus: (accountId: string, options?: AiAccountLifecycleOptions) => Promise<AiAccountStatus>;
|
|
66
|
+
export declare const startAiAccountLogin: (accountId: string, options?: AiAccountLifecycleOptions) => Promise<AiAccountLoginHandle>;
|
|
67
|
+
export declare const logoutAiAccount: (accountId: string) => Promise<void>;
|
|
68
|
+
export declare const assertAiAccountIdle: (accountId: string) => Promise<void>;
|
|
69
|
+
export declare const withAiAccountExclusive: <T>(accountId: string, operation: () => T | Promise<T>) => Promise<T>;
|
|
70
|
+
export declare const removeAiAccountGuarded: (accountId: string) => Promise<ReturnType<typeof removeAiAccount>>;
|
|
71
|
+
export declare const bindAiAccountRun: (input: {
|
|
72
|
+
account: ResolvedAiAccount;
|
|
73
|
+
taskId: string;
|
|
74
|
+
resume?: AiAccountResumeMetadata;
|
|
75
|
+
}) => Promise<AiAccountRunBinding>;
|
|
76
|
+
export declare function requireActiveAiAccountRunBinding(value: unknown): AiAccountRunBinding;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export declare const ANTIGRAVITY_ACP_VERSION: "1.4.3";
|
|
2
|
+
export interface AntigravityAcpDistribution {
|
|
3
|
+
platform: 'darwin' | 'linux' | 'win32';
|
|
4
|
+
architecture: 'arm64' | 'x64';
|
|
5
|
+
archiveUrl: string;
|
|
6
|
+
command: string;
|
|
7
|
+
args: readonly string[];
|
|
8
|
+
sha256: string;
|
|
9
|
+
archiveBytes?: number;
|
|
10
|
+
expectedMembers: readonly string[];
|
|
11
|
+
supported: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const ANTIGRAVITY_ACP_DISTRIBUTIONS: {
|
|
14
|
+
readonly 'darwin-arm64': {
|
|
15
|
+
readonly platform: "darwin";
|
|
16
|
+
readonly architecture: "arm64";
|
|
17
|
+
readonly archiveUrl: "https://dl.google.com/agy-extensions/releases/macos/agy-acp-server-1.4.3-darwin-arm64.zip";
|
|
18
|
+
readonly command: "./agy_acp_server.par";
|
|
19
|
+
readonly args: readonly [];
|
|
20
|
+
readonly sha256: "c57db0a9b8b712daa9c3c17cdb990a61842ea569f279e8bd79d7aa85a303b20b";
|
|
21
|
+
readonly archiveBytes: 114147623;
|
|
22
|
+
readonly expectedMembers: readonly ["agy_acp_server.par", "localharness_external"];
|
|
23
|
+
readonly supported: true;
|
|
24
|
+
};
|
|
25
|
+
readonly 'darwin-x64': {
|
|
26
|
+
readonly platform: "darwin";
|
|
27
|
+
readonly architecture: "x64";
|
|
28
|
+
readonly archiveUrl: "https://dl.google.com/agy-extensions/releases/macos/agy-acp-server-1.4.3-darwin-x86_64.zip";
|
|
29
|
+
readonly command: "./agy_acp_server.par";
|
|
30
|
+
readonly args: readonly [];
|
|
31
|
+
readonly sha256: "9392dbbdad7f0663dbfb5a0bf641297b0cf80d2ee9cd2d49a616bbbc7378731d";
|
|
32
|
+
readonly expectedMembers: readonly ["agy_acp_server.par", "localharness_external"];
|
|
33
|
+
readonly supported: true;
|
|
34
|
+
};
|
|
35
|
+
readonly 'linux-x64': {
|
|
36
|
+
readonly platform: "linux";
|
|
37
|
+
readonly architecture: "x64";
|
|
38
|
+
readonly archiveUrl: "https://dl.google.com/agy-extensions/releases/linux/agy-acp-server-1.4.3-linux-x86_64.zip";
|
|
39
|
+
readonly command: "./agy_acp_server.par";
|
|
40
|
+
readonly args: readonly ["--uid="];
|
|
41
|
+
readonly sha256: "0634ce5306ba92c932945455e7a83fda78e2d99c33fa8aa6ee0566206a382714";
|
|
42
|
+
readonly expectedMembers: readonly ["agy_acp_server.par", "localharness_external"];
|
|
43
|
+
readonly supported: true;
|
|
44
|
+
};
|
|
45
|
+
readonly 'linux-arm64': {
|
|
46
|
+
readonly platform: "linux";
|
|
47
|
+
readonly architecture: "arm64";
|
|
48
|
+
readonly archiveUrl: "https://dl.google.com/agy-extensions/releases/linux/agy-acp-server-1.4.3-linux-arm64.zip";
|
|
49
|
+
readonly command: "./agy_acp_server.par";
|
|
50
|
+
readonly args: readonly ["--uid="];
|
|
51
|
+
readonly sha256: "05c153443b0b1175151c760eeddea538950bc9843e317d54786a1f03670182bc";
|
|
52
|
+
readonly expectedMembers: readonly ["agy_acp_server.par", "localharness_external"];
|
|
53
|
+
readonly supported: true;
|
|
54
|
+
};
|
|
55
|
+
readonly 'win32-x64': {
|
|
56
|
+
readonly platform: "win32";
|
|
57
|
+
readonly architecture: "x64";
|
|
58
|
+
readonly archiveUrl: "https://dl.google.com/agy-extensions/releases/windows/agy-acp-server-1.4.3-windows-x86_64.zip";
|
|
59
|
+
readonly command: "./agy_acp_server.exe";
|
|
60
|
+
readonly args: readonly [];
|
|
61
|
+
readonly sha256: "54c2e16378d9a4952e1da70e355f3c33c4f284308d6de48ab3e6e34a127bd325";
|
|
62
|
+
readonly expectedMembers: readonly [];
|
|
63
|
+
readonly supported: false;
|
|
64
|
+
};
|
|
65
|
+
readonly 'win32-arm64': {
|
|
66
|
+
readonly platform: "win32";
|
|
67
|
+
readonly architecture: "arm64";
|
|
68
|
+
readonly archiveUrl: "https://dl.google.com/agy-extensions/releases/windows/agy-acp-server-1.4.3-windows-arm64.zip";
|
|
69
|
+
readonly command: "./agy_acp_server.exe";
|
|
70
|
+
readonly args: readonly [];
|
|
71
|
+
readonly sha256: "fcd46431ad33d3b510ce0b98fe7b43d095bd8b3f1c363ee2d57faa7ee981c7bb";
|
|
72
|
+
readonly expectedMembers: readonly [];
|
|
73
|
+
readonly supported: false;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export declare function getAntigravityAcpDistribution(platform: string, architecture: string): AntigravityAcpDistribution | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AiAccountEnvPlan } from '../types';
|
|
2
|
+
export declare const ANTIGRAVITY_ACCOUNT_STRIPPED_ENV: readonly ["GEMINI_API_KEY", "GOOGLE_API_KEY", "GOOGLE_APPLICATION_CREDENTIALS", "GOOGLE_CLOUD_PROJECT", "GOOGLE_CLOUD_LOCATION", "GOOGLE_CLOUD_QUOTA_PROJECT", "GOOGLE_GENAI_USE_VERTEXAI", "GCLOUD_PROJECT", "CLOUDSDK_CORE_PROJECT", "AGY_ADC_AUTH", "GEMINI_BASE_URL", "JETSKI_OAUTH_TOKEN"];
|
|
3
|
+
export declare const ANTIGRAVITY_ACCOUNT_STRIPPED_ENV_PREFIXES: readonly ["AGY_ACP_"];
|
|
4
|
+
export declare function antigravityAccountEnvPlan(accountDir: string): AiAccountEnvPlan;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { addAiAccount, applyAiAccountEnv, aiAccountEnvPlan, getLoginInvocation, getStatusInvocation, listAiAccounts, removeAiAccount, resolveAiAccountForRun, setActiveAiAccount, } from './accounts';
|
|
2
|
+
export { getAiAccountCapabilities } from './capabilities';
|
|
3
|
+
export { ANTIGRAVITY_ACCOUNT_STRIPPED_ENV, ANTIGRAVITY_ACCOUNT_STRIPPED_ENV_PREFIXES, antigravityAccountEnvPlan, } from './antigravity-acp/profile';
|
|
4
|
+
export { ANTIGRAVITY_ACP_DISTRIBUTIONS, ANTIGRAVITY_ACP_VERSION, } from './antigravity-acp/manifest';
|
|
5
|
+
export { getAiAccountRuntimeStatus, installAiAccountRuntime, } from './antigravity-acp/install';
|
|
6
|
+
export type { AiAccountRuntimeInstallPhase, AiAccountRuntimeInstallProgress, AiAccountRuntimeStatus, AiAccountRuntimeStatusReason, InstallAiAccountRuntimeOptions, } from './antigravity-acp/install';
|
|
7
|
+
export type { AntigravityAcpDistribution } from './antigravity-acp/manifest';
|
|
8
|
+
export { assertAiAccountIdle, bindAiAccountRun, getAiAccountStatus, logoutAiAccount, removeAiAccountGuarded, startAiAccountLogin, withAiAccountExclusive, } from './antigravity-acp/lifecycle';
|
|
9
|
+
export type { AiAccountLifecycleOptions, AiAccountLoginHandle, AiAccountLoginResult, AiAccountResumeMetadata, AiAccountRunBinding, AiAccountRuntimeKind, AiAccountState, AiAccountStatus, AntigravityAccountErrorCode, } from './antigravity-acp/lifecycle';
|
|
10
|
+
export { defaultAiAccountDir, loadProviderAccountsRegistry, providerAccountsRegistryPath, providerAccountsRoot, } from './registry';
|
|
11
|
+
export type { ProviderAccountsRegistry, RemovedAiAccount, StoredAiAccount, } from './registry';
|
|
12
|
+
export { AI_ACCOUNT_PROVIDERS, AiAccountError, CLAUDE_ACCOUNT_STRIPPED_ENV, DEFAULT_AI_ACCOUNT_ID, } from './types';
|
|
13
|
+
export type { AddedAiAccount, AiAccountEnvPlan, AiAccountErrorCode, AiAccountInvocation, AiAccountLoginKind, AiAccountProvider, AiAccountRuntime, AiAccountSummary, ResolveAiAccountInput, ResolvedAiAccount, } from './types';
|