@crewx/sdk 0.9.0-rc.23 → 0.9.0-rc.230
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-install/dependencies.d.ts +30 -0
- package/dist/app-install/errors.d.ts +9 -0
- package/dist/app-install/index.d.ts +9 -0
- package/dist/app-install/index.js +7 -0
- package/dist/app-install/process.d.ts +33 -0
- package/dist/app-install/runtime-env.d.ts +2 -0
- package/dist/app-install/verify.d.ts +10 -0
- package/dist/app-sync/continuation.d.ts +67 -0
- package/dist/app-sync/coordinator.d.ts +92 -0
- package/dist/app-sync/create-ledger.d.ts +27 -0
- package/dist/app-sync/index.d.ts +9 -0
- package/dist/app-sync/index.js +390 -0
- package/dist/app-sync/scope.d.ts +35 -0
- package/dist/app-sync/session-fence.d.ts +26 -0
- package/dist/app-sync/sqlite-store.d.ts +237 -0
- package/dist/app-sync/types.d.ts +855 -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 +13 -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 +9 -3
- package/dist/conversation/to-template-messages.d.ts +12 -2
- package/dist/conversation/types.d.ts +94 -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/app-install/index.js +7 -0
- package/dist/esm/app-sync/index.js +390 -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 +1450 -224
- package/dist/esm/node/index.js +2 -0
- package/dist/esm/plugins/index.js +604 -219
- package/dist/esm/process/index.js +1 -0
- package/dist/esm/publish/index.js +2 -0
- package/dist/esm/repository/index.js +863 -211
- 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 +108 -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 +84 -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 +175 -20
- package/dist/index.js +1450 -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/0049_blue_sleepwalker.sql +25 -0
- package/dist/migrations/0050_rapid_black_cat.sql +89 -0
- package/dist/migrations/0051_lying_sinister_six.sql +1 -0
- package/dist/migrations/0052_lying_gambit.sql +33 -0
- package/dist/migrations/0053_smart_shriek.sql +172 -0
- package/dist/migrations/0054_lying_surge.sql +63 -0
- package/dist/migrations/0055_curious_talkback.sql +92 -0
- package/dist/migrations/0056_stale_menace.sql +14 -0
- package/dist/migrations/0057_eager_captain_flint.sql +18 -0
- package/dist/migrations/0058_thread_branches.sql +37 -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/0049_snapshot.json +5165 -0
- package/dist/migrations/meta/0050_snapshot.json +5717 -0
- package/dist/migrations/meta/0051_snapshot.json +5725 -0
- package/dist/migrations/meta/0052_snapshot.json +5930 -0
- package/dist/migrations/meta/0053_snapshot.json +6780 -0
- package/dist/migrations/meta/0054_snapshot.json +6784 -0
- package/dist/migrations/meta/0055_snapshot.json +6896 -0
- package/dist/migrations/meta/0056_snapshot.json +6971 -0
- package/dist/migrations/meta/0057_snapshot.json +6971 -0
- package/dist/migrations/meta/0058_snapshot.json +7227 -0
- package/dist/migrations/meta/_journal.json +336 -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 +604 -219
- 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 +23 -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 +28 -4
- 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 +35 -7
- 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/claude-task-events.d.ts +48 -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/adapters/opencode-data-dir.d.ts +17 -0
- package/dist/provider/cli/adapters/opencode.d.ts +1 -0
- package/dist/provider/cli/builtin-allow.d.ts +6 -0
- package/dist/provider/cli/index.d.ts +3 -2
- package/dist/provider/cli/meta.d.ts +18 -1
- package/dist/provider/cli/protocol-envelope.d.ts +3 -0
- package/dist/provider/errors.d.ts +11 -1
- package/dist/provider/idle-watchdog.d.ts +19 -0
- package/dist/provider/model-ladder.d.ts +8 -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/safe-opencode-text.d.ts +2 -0
- package/dist/provider/task-error.types.d.ts +20 -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 +63 -6
- package/dist/repository/index.js +863 -211
- 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 +87 -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 +329 -8
- package/dist/repository/thread-branch.repository.d.ts +106 -0
- 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 +56 -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 +18 -0
- package/dist/route/store.d.ts +48 -0
- package/dist/route/strategies.d.ts +4 -0
- package/dist/route/types.d.ts +440 -0
- package/dist/schema/agent-send-history.d.ts +85 -0
- package/dist/schema/agent-suggestions.d.ts +199 -0
- package/dist/schema/app-sync.d.ts +2533 -0
- package/dist/schema/common-codes.d.ts +216 -0
- package/dist/schema/doc-create-dispatches.d.ts +101 -0
- package/dist/schema/doc-sync-connect-requests.d.ts +140 -0
- package/dist/schema/doc-sync-links.d.ts +556 -0
- package/dist/schema/index.d.ts +24 -0
- package/dist/schema/model-routes.d.ts +638 -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-branches.d.ts +424 -0
- 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/claude-background-task.d.ts +30 -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 +3325 -84
- 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 +221 -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 +97 -3
- package/templates/agents/default.yaml +319 -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
|
@@ -0,0 +1,855 @@
|
|
|
1
|
+
import type { AppSyncScopeDefinition } from './scope.js';
|
|
2
|
+
export declare const APP_SYNC_APP_ID: "workout-log";
|
|
3
|
+
export declare const APP_SYNC_SCOPE_VERSION: "workout-log.records.v1";
|
|
4
|
+
export declare const APP_SYNC_LOCAL_RECORD_LIMIT = 500;
|
|
5
|
+
export declare const APP_SYNC_PAGE_SIZE = 100;
|
|
6
|
+
export declare const APP_SYNC_FRONT_MATTER_MAX_BYTES: number;
|
|
7
|
+
export declare const APP_SYNC_CONTINUATION_MIN_INTERVAL_MS = 60000;
|
|
8
|
+
export declare const APP_SYNC_CONTINUATION_MAX_PAGE_SIZE = 200;
|
|
9
|
+
export declare const DOC001_CREATE_LIMIT_PER_WINDOW = 20;
|
|
10
|
+
export declare const DOC001_CREATE_WINDOW_MS = 60000;
|
|
11
|
+
export type AppSyncStatus = 'local_only' | 'consent_required' | 'checking' | 'syncing' | 'synced' | 'partial' | 'offline' | 'revoked' | 'unavailable' | 'stopping';
|
|
12
|
+
export type AppSyncResultStatus = 'waiting' | 'processing' | 'synced' | 'failed' | 'conflict' | 'blocked' | 'excluded' | 'deleted';
|
|
13
|
+
export type AppSyncJobStatus = 'waiting' | 'processing' | 'completed' | 'failed' | 'conflict' | 'blocked' | 'invalidated' | 'deleted';
|
|
14
|
+
export interface AppSyncEligibility {
|
|
15
|
+
readonly featureEnabled: boolean;
|
|
16
|
+
readonly ownerAllowlisted: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface AppSyncSessionState {
|
|
19
|
+
readonly authenticated: boolean;
|
|
20
|
+
readonly accountKey: string | null;
|
|
21
|
+
}
|
|
22
|
+
export interface AppSyncOperationContext {
|
|
23
|
+
readonly session: AppSyncSessionState;
|
|
24
|
+
readonly eligibility: AppSyncEligibility;
|
|
25
|
+
readonly appVersion: string;
|
|
26
|
+
}
|
|
27
|
+
export interface AppSyncBinding {
|
|
28
|
+
readonly bindingId: string;
|
|
29
|
+
readonly accountKey: string;
|
|
30
|
+
readonly workspaceId: string;
|
|
31
|
+
readonly appId: typeof APP_SYNC_APP_ID;
|
|
32
|
+
readonly rootSegments: readonly string[];
|
|
33
|
+
readonly grantId: string | null;
|
|
34
|
+
readonly grantGeneration: number | null;
|
|
35
|
+
readonly scopeVersion: string | null;
|
|
36
|
+
readonly status: AppSyncStatus;
|
|
37
|
+
readonly createdAt: number;
|
|
38
|
+
readonly updatedAt: number;
|
|
39
|
+
}
|
|
40
|
+
export interface AppSyncBindingInput {
|
|
41
|
+
readonly session: AppSyncSessionState;
|
|
42
|
+
readonly eligibility: AppSyncEligibility;
|
|
43
|
+
readonly workspaceId: string;
|
|
44
|
+
readonly resolvedRootSegments: readonly string[];
|
|
45
|
+
}
|
|
46
|
+
export interface AppSyncGrantInvalidation {
|
|
47
|
+
readonly bindingId: string;
|
|
48
|
+
readonly session: AppSyncSessionState;
|
|
49
|
+
readonly grantId: string;
|
|
50
|
+
readonly generation: number;
|
|
51
|
+
}
|
|
52
|
+
export interface AppSyncScopeSelectors {
|
|
53
|
+
readonly exactFiles: readonly ['exercises.md'];
|
|
54
|
+
readonly directFolders: readonly ['routines', 'workouts'];
|
|
55
|
+
readonly suffix: '.md';
|
|
56
|
+
readonly maxDepth: 1;
|
|
57
|
+
}
|
|
58
|
+
export interface AppSyncFileEntry {
|
|
59
|
+
readonly ref: string;
|
|
60
|
+
readonly isSymlink: boolean;
|
|
61
|
+
readonly staysWithinRoot: boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface AppSyncFileRead {
|
|
64
|
+
readonly markdown: string;
|
|
65
|
+
readonly isSymlink: boolean;
|
|
66
|
+
readonly staysWithinRoot: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface AppSyncFilePage {
|
|
69
|
+
readonly entries: readonly AppSyncFileEntry[];
|
|
70
|
+
readonly nextCursor: string | null;
|
|
71
|
+
}
|
|
72
|
+
export interface AppSyncWorkspacePort {
|
|
73
|
+
listAllowedFiles(input: {
|
|
74
|
+
readonly rootSegments: readonly string[];
|
|
75
|
+
readonly selectors: AppSyncScopeSelectors;
|
|
76
|
+
readonly cursor: string | null;
|
|
77
|
+
readonly pageSize: number;
|
|
78
|
+
readonly signal: AbortSignal;
|
|
79
|
+
}): Promise<AppSyncFilePage>;
|
|
80
|
+
readFile(input: {
|
|
81
|
+
readonly rootSegments: readonly string[];
|
|
82
|
+
readonly ref: string;
|
|
83
|
+
readonly signal: AbortSignal;
|
|
84
|
+
}): Promise<AppSyncFileRead>;
|
|
85
|
+
}
|
|
86
|
+
export interface AppSyncGrant {
|
|
87
|
+
readonly grantId: string;
|
|
88
|
+
readonly appId: string;
|
|
89
|
+
readonly generation: number;
|
|
90
|
+
readonly scopeVersion: string;
|
|
91
|
+
readonly scope: AppSyncScopeDefinition;
|
|
92
|
+
}
|
|
93
|
+
export interface AppSyncGrantSnapshot {
|
|
94
|
+
readonly appId: string;
|
|
95
|
+
readonly available: boolean;
|
|
96
|
+
readonly status: 'active' | 'revoked' | 'none';
|
|
97
|
+
readonly grant: AppSyncGrant | null;
|
|
98
|
+
}
|
|
99
|
+
export interface AppSyncRemoteDocument {
|
|
100
|
+
readonly docId: string;
|
|
101
|
+
readonly currentRevision: number;
|
|
102
|
+
readonly markdownVersion: string;
|
|
103
|
+
readonly markdown: string;
|
|
104
|
+
readonly appGrantId: string;
|
|
105
|
+
readonly appGrantGeneration: number;
|
|
106
|
+
}
|
|
107
|
+
export interface AppSyncOperationFence {
|
|
108
|
+
readonly accountKey: string;
|
|
109
|
+
readonly sessionEpoch: number;
|
|
110
|
+
readonly bindingId: string;
|
|
111
|
+
readonly workspaceId: string;
|
|
112
|
+
readonly rootFingerprint: string;
|
|
113
|
+
readonly grantId: string;
|
|
114
|
+
readonly grantGeneration: number;
|
|
115
|
+
readonly scopeVersion: typeof APP_SYNC_SCOPE_VERSION;
|
|
116
|
+
readonly signal: AbortSignal;
|
|
117
|
+
assertCurrent(): void;
|
|
118
|
+
}
|
|
119
|
+
export interface AppSyncGrantDoc {
|
|
120
|
+
readonly docId: string;
|
|
121
|
+
readonly ref: string;
|
|
122
|
+
readonly title: string;
|
|
123
|
+
readonly currentRevision: number;
|
|
124
|
+
readonly markdownVersion: string;
|
|
125
|
+
readonly updatedAt: string;
|
|
126
|
+
readonly appGrantGeneration: number;
|
|
127
|
+
readonly needsReattach: boolean;
|
|
128
|
+
}
|
|
129
|
+
export interface AppSyncGrantDocsPage {
|
|
130
|
+
readonly appId: typeof APP_SYNC_APP_ID;
|
|
131
|
+
readonly grantId: string;
|
|
132
|
+
readonly generation: number;
|
|
133
|
+
readonly scopeVersion: typeof APP_SYNC_SCOPE_VERSION;
|
|
134
|
+
readonly listedAt: string;
|
|
135
|
+
readonly items: readonly AppSyncGrantDoc[];
|
|
136
|
+
readonly nextCursor: string | null;
|
|
137
|
+
}
|
|
138
|
+
export interface AppSyncDeletedRef {
|
|
139
|
+
readonly refHash: string;
|
|
140
|
+
readonly deletedAt: string;
|
|
141
|
+
}
|
|
142
|
+
export interface AppSyncDeletedRefsPage {
|
|
143
|
+
readonly appId: typeof APP_SYNC_APP_ID;
|
|
144
|
+
readonly grantId: string;
|
|
145
|
+
readonly generation: number;
|
|
146
|
+
readonly listedAt: string;
|
|
147
|
+
readonly items: readonly AppSyncDeletedRef[];
|
|
148
|
+
readonly nextCursor: string | null;
|
|
149
|
+
}
|
|
150
|
+
export interface AppSyncCreateResult {
|
|
151
|
+
readonly docId: string;
|
|
152
|
+
readonly currentRevision: number;
|
|
153
|
+
readonly markdownVersion: string;
|
|
154
|
+
readonly appGrantId: string;
|
|
155
|
+
readonly appGrantGeneration: number;
|
|
156
|
+
readonly replayed: boolean;
|
|
157
|
+
readonly reattached?: boolean;
|
|
158
|
+
}
|
|
159
|
+
export type DocCreateDispatchSource = 'human' | 'app_create' | 'app_reattach';
|
|
160
|
+
export interface DocCreateDispatchInput {
|
|
161
|
+
readonly accountKey: string;
|
|
162
|
+
readonly requestId: string;
|
|
163
|
+
readonly source: DocCreateDispatchSource;
|
|
164
|
+
readonly now: number;
|
|
165
|
+
}
|
|
166
|
+
export type AppSyncSendDecision = {
|
|
167
|
+
readonly ok: true;
|
|
168
|
+
} | {
|
|
169
|
+
readonly ok: false;
|
|
170
|
+
readonly retryAt: number;
|
|
171
|
+
};
|
|
172
|
+
export type AppSyncSendGate = (() => AppSyncSendDecision) & {
|
|
173
|
+
readonly calls: number;
|
|
174
|
+
};
|
|
175
|
+
export type DocCreateLedgerPeek = {
|
|
176
|
+
readonly available: true;
|
|
177
|
+
readonly remaining: number;
|
|
178
|
+
} | {
|
|
179
|
+
readonly available: false;
|
|
180
|
+
readonly retryAt: number;
|
|
181
|
+
};
|
|
182
|
+
export interface DocCreateLedger {
|
|
183
|
+
peek(accountKey: string, now: number): DocCreateLedgerPeek;
|
|
184
|
+
reserve(input: DocCreateDispatchInput): AppSyncSendDecision;
|
|
185
|
+
reserveForced(input: DocCreateDispatchInput): void;
|
|
186
|
+
prune(now: number): number;
|
|
187
|
+
}
|
|
188
|
+
export interface AppSyncRemote {
|
|
189
|
+
readonly capabilities?: {
|
|
190
|
+
readonly dispatchGate?: true;
|
|
191
|
+
};
|
|
192
|
+
readGrant(input: {
|
|
193
|
+
readonly accountKey: string;
|
|
194
|
+
readonly appId: typeof APP_SYNC_APP_ID;
|
|
195
|
+
readonly signal: AbortSignal;
|
|
196
|
+
readonly fence?: AppSyncOperationFence;
|
|
197
|
+
}): Promise<AppSyncGrantSnapshot>;
|
|
198
|
+
createGrantedDocument(input: {
|
|
199
|
+
readonly accountKey: string;
|
|
200
|
+
readonly appId: typeof APP_SYNC_APP_ID;
|
|
201
|
+
readonly ref: string;
|
|
202
|
+
readonly requestId: string;
|
|
203
|
+
readonly markdown: string;
|
|
204
|
+
readonly appVersion: string;
|
|
205
|
+
readonly appGrant: {
|
|
206
|
+
readonly grantId: string;
|
|
207
|
+
readonly generation: number;
|
|
208
|
+
};
|
|
209
|
+
readonly signal: AbortSignal;
|
|
210
|
+
readonly fence?: AppSyncOperationFence;
|
|
211
|
+
readonly dispatchGate?: AppSyncSendGate;
|
|
212
|
+
}): Promise<AppSyncCreateResult>;
|
|
213
|
+
readDocument(input: {
|
|
214
|
+
readonly accountKey: string;
|
|
215
|
+
readonly docId: string;
|
|
216
|
+
readonly signal: AbortSignal;
|
|
217
|
+
readonly fence?: AppSyncOperationFence;
|
|
218
|
+
}): Promise<AppSyncRemoteDocument>;
|
|
219
|
+
listGrantDocs?(input: {
|
|
220
|
+
readonly accountKey: string;
|
|
221
|
+
readonly appId: typeof APP_SYNC_APP_ID;
|
|
222
|
+
readonly grantId: string;
|
|
223
|
+
readonly generation: number;
|
|
224
|
+
readonly cursor: string | null;
|
|
225
|
+
readonly limit: number;
|
|
226
|
+
readonly signal: AbortSignal;
|
|
227
|
+
readonly fence: AppSyncOperationFence;
|
|
228
|
+
}): Promise<AppSyncGrantDocsPage>;
|
|
229
|
+
listDeletedRefs?(input: {
|
|
230
|
+
readonly accountKey: string;
|
|
231
|
+
readonly appId: typeof APP_SYNC_APP_ID;
|
|
232
|
+
readonly grantId: string;
|
|
233
|
+
readonly generation: number;
|
|
234
|
+
readonly cursor: string | null;
|
|
235
|
+
readonly limit: number;
|
|
236
|
+
readonly signal: AbortSignal;
|
|
237
|
+
readonly fence: AppSyncOperationFence;
|
|
238
|
+
}): Promise<AppSyncDeletedRefsPage>;
|
|
239
|
+
}
|
|
240
|
+
export interface AppSyncCreationJob {
|
|
241
|
+
readonly jobId: string;
|
|
242
|
+
readonly bindingId: string;
|
|
243
|
+
readonly accountKey: string;
|
|
244
|
+
readonly grantId: string;
|
|
245
|
+
readonly grantGeneration: number;
|
|
246
|
+
readonly ref: string;
|
|
247
|
+
readonly requestId: string;
|
|
248
|
+
readonly fingerprint: string;
|
|
249
|
+
readonly operationKind?: 'create' | 'reattach';
|
|
250
|
+
readonly documentId?: string | null;
|
|
251
|
+
readonly status: AppSyncJobStatus;
|
|
252
|
+
readonly attempts: number;
|
|
253
|
+
readonly nextAttemptAt: number;
|
|
254
|
+
readonly createdAt: number;
|
|
255
|
+
readonly updatedAt: number;
|
|
256
|
+
}
|
|
257
|
+
export type AppSyncCreationClaim = Pick<AppSyncCreationJob, 'jobId' | 'attempts' | 'nextAttemptAt'>;
|
|
258
|
+
export interface AppSyncResult {
|
|
259
|
+
readonly bindingId: string;
|
|
260
|
+
readonly accountKey: string;
|
|
261
|
+
readonly ref: string;
|
|
262
|
+
readonly grantId: string;
|
|
263
|
+
readonly grantGeneration: number;
|
|
264
|
+
readonly sourceFingerprint: string | null;
|
|
265
|
+
readonly syncedFingerprint: string | null;
|
|
266
|
+
readonly documentId: string | null;
|
|
267
|
+
readonly status: AppSyncResultStatus;
|
|
268
|
+
readonly errorCode: string | null;
|
|
269
|
+
readonly nextAttemptAt: number;
|
|
270
|
+
readonly attempts: number;
|
|
271
|
+
readonly updatedAt: number;
|
|
272
|
+
}
|
|
273
|
+
export type AppSyncControlRequestKind = 'connect' | 'revoke';
|
|
274
|
+
export type AppSyncControlRequestState = 'pending' | 'unknown' | 'confirmed' | 'failed';
|
|
275
|
+
export type AppSyncControlResolution = 'remote' | 'human';
|
|
276
|
+
export interface AppSyncControlRequest {
|
|
277
|
+
readonly requestId: string;
|
|
278
|
+
readonly bindingId: string;
|
|
279
|
+
readonly accountKey: string;
|
|
280
|
+
readonly appId: typeof APP_SYNC_APP_ID;
|
|
281
|
+
readonly workspaceId: string;
|
|
282
|
+
readonly rootFingerprint: string;
|
|
283
|
+
readonly kind: AppSyncControlRequestKind;
|
|
284
|
+
readonly state: AppSyncControlRequestState;
|
|
285
|
+
readonly grantId: string | null;
|
|
286
|
+
readonly generation: number | null;
|
|
287
|
+
readonly createdAt: number;
|
|
288
|
+
readonly updatedAt: number;
|
|
289
|
+
readonly resolvedAt: number | null;
|
|
290
|
+
readonly resolution: AppSyncControlResolution | null;
|
|
291
|
+
readonly resolutionId: string | null;
|
|
292
|
+
}
|
|
293
|
+
export interface AppSyncControlRequestIdentity {
|
|
294
|
+
readonly bindingId: string;
|
|
295
|
+
readonly session: AppSyncSessionState;
|
|
296
|
+
readonly workspaceId: string;
|
|
297
|
+
readonly resolvedRootSegments: readonly string[];
|
|
298
|
+
}
|
|
299
|
+
export interface AppSyncBeginControlRequest extends AppSyncControlRequestIdentity {
|
|
300
|
+
readonly requestId: string;
|
|
301
|
+
readonly kind: AppSyncControlRequestKind;
|
|
302
|
+
readonly grantId?: string | null;
|
|
303
|
+
readonly generation?: number | null;
|
|
304
|
+
}
|
|
305
|
+
export interface AppSyncControlRequestHandle extends AppSyncControlRequestIdentity {
|
|
306
|
+
readonly requestId: string;
|
|
307
|
+
}
|
|
308
|
+
export interface AppSyncResolveControlRequest extends AppSyncControlRequestHandle {
|
|
309
|
+
readonly outcome: 'confirmed' | 'failed';
|
|
310
|
+
readonly resolution: AppSyncControlResolution;
|
|
311
|
+
readonly resolutionId: string;
|
|
312
|
+
readonly observedGrant?: AppSyncGrant | null;
|
|
313
|
+
}
|
|
314
|
+
export interface AppSyncCounts {
|
|
315
|
+
readonly N: number;
|
|
316
|
+
readonly S: number;
|
|
317
|
+
readonly P: number;
|
|
318
|
+
readonly I: number;
|
|
319
|
+
readonly F: number;
|
|
320
|
+
readonly C: number;
|
|
321
|
+
readonly B: number;
|
|
322
|
+
readonly D: number;
|
|
323
|
+
}
|
|
324
|
+
export interface AppSyncSnapshot {
|
|
325
|
+
readonly binding: AppSyncBinding | null;
|
|
326
|
+
readonly status: AppSyncStatus;
|
|
327
|
+
readonly counts: AppSyncCounts;
|
|
328
|
+
readonly results: readonly AppSyncResult[];
|
|
329
|
+
}
|
|
330
|
+
export interface AppSyncDocumentOutcome {
|
|
331
|
+
readonly status: 'synced' | 'waiting' | 'processing' | 'conflict' | 'failed' | 'blocked';
|
|
332
|
+
readonly syncedFingerprint?: string;
|
|
333
|
+
readonly errorCode?: string;
|
|
334
|
+
readonly retryAt?: number;
|
|
335
|
+
readonly dispatch: 'none' | 'attempted';
|
|
336
|
+
}
|
|
337
|
+
export type AppSyncBeforeDispatchResult = {
|
|
338
|
+
readonly ok: true;
|
|
339
|
+
readonly markdown: string;
|
|
340
|
+
readonly fingerprint: string;
|
|
341
|
+
} | {
|
|
342
|
+
readonly ok: false;
|
|
343
|
+
readonly reason: 'session_stale' | 'grant_stale' | 'control_request_pending' | 'deleted' | 'unsafe' | 'missing' | 'read_error' | 'out_of_scope';
|
|
344
|
+
};
|
|
345
|
+
export interface AppSyncDocumentPort {
|
|
346
|
+
attachCreated(input: {
|
|
347
|
+
readonly binding: AppSyncBinding;
|
|
348
|
+
readonly grant: AppSyncGrant;
|
|
349
|
+
readonly ref: string;
|
|
350
|
+
readonly document: AppSyncRemoteDocument;
|
|
351
|
+
readonly localMarkdown: string;
|
|
352
|
+
readonly sourceFingerprint: string;
|
|
353
|
+
readonly signal: AbortSignal;
|
|
354
|
+
}): Promise<AppSyncDocumentOutcome>;
|
|
355
|
+
reconcileExisting(input: {
|
|
356
|
+
readonly binding: AppSyncBinding;
|
|
357
|
+
readonly grant: AppSyncGrant;
|
|
358
|
+
readonly ref: string;
|
|
359
|
+
readonly document: AppSyncRemoteDocument;
|
|
360
|
+
readonly localMarkdown: string;
|
|
361
|
+
readonly sourceFingerprint: string;
|
|
362
|
+
readonly signal: AbortSignal;
|
|
363
|
+
readonly beforeDispatch: () => Promise<AppSyncBeforeDispatchResult>;
|
|
364
|
+
}): Promise<AppSyncDocumentOutcome>;
|
|
365
|
+
suspendBinding(input: {
|
|
366
|
+
readonly binding: AppSyncBinding;
|
|
367
|
+
readonly grantId: string | null;
|
|
368
|
+
readonly generation: number | null;
|
|
369
|
+
readonly reason: 'logout' | 'account_switch' | 'revoked' | 'regranted' | 'scope_mismatch' | 'ineligible' | 'auth_required' | 'revoke_pending';
|
|
370
|
+
}): Promise<void>;
|
|
371
|
+
inspectContinuation?(input: {
|
|
372
|
+
readonly binding: AppSyncBinding;
|
|
373
|
+
readonly grant: AppSyncGrant;
|
|
374
|
+
readonly ref: string;
|
|
375
|
+
readonly fence: AppSyncOperationFence;
|
|
376
|
+
}): Promise<AppSyncDocumentInspection>;
|
|
377
|
+
applyContinuation?(input: AppSyncContinuationEffect): Promise<AppSyncContinuationApplyResult>;
|
|
378
|
+
}
|
|
379
|
+
export interface AppSyncDocumentBaseline {
|
|
380
|
+
readonly revision: number;
|
|
381
|
+
readonly markdownVersion: string;
|
|
382
|
+
}
|
|
383
|
+
export type AppSyncDocumentInspection = {
|
|
384
|
+
readonly exists: false;
|
|
385
|
+
readonly localVersion: null;
|
|
386
|
+
readonly localFingerprint: null;
|
|
387
|
+
readonly markdown: null;
|
|
388
|
+
readonly baseline: AppSyncDocumentBaseline | null;
|
|
389
|
+
} | {
|
|
390
|
+
readonly exists: true;
|
|
391
|
+
readonly localVersion: string;
|
|
392
|
+
readonly localFingerprint: string;
|
|
393
|
+
readonly markdown: string;
|
|
394
|
+
readonly baseline: AppSyncDocumentBaseline | null;
|
|
395
|
+
};
|
|
396
|
+
export type AppSyncContinuationSourceCheck = {
|
|
397
|
+
readonly ok: true;
|
|
398
|
+
readonly localVersion: string;
|
|
399
|
+
readonly markdown: string;
|
|
400
|
+
readonly fingerprint: string;
|
|
401
|
+
} | {
|
|
402
|
+
readonly ok: false;
|
|
403
|
+
readonly reason: 'stale' | 'unsafe' | 'out_of_scope' | 'session_stale' | 'deleted';
|
|
404
|
+
};
|
|
405
|
+
export type AppSyncContinuationEffect = {
|
|
406
|
+
readonly kind: 'attach_equal';
|
|
407
|
+
readonly binding: AppSyncBinding;
|
|
408
|
+
readonly grant: AppSyncGrant;
|
|
409
|
+
readonly ref: string;
|
|
410
|
+
readonly document: AppSyncRemoteDocument;
|
|
411
|
+
readonly expectedLocalVersion: string;
|
|
412
|
+
readonly expectedLocalFingerprint: string;
|
|
413
|
+
readonly fence: AppSyncOperationFence;
|
|
414
|
+
} | {
|
|
415
|
+
readonly kind: 'create_absent' | 'cas_pull';
|
|
416
|
+
readonly binding: AppSyncBinding;
|
|
417
|
+
readonly grant: AppSyncGrant;
|
|
418
|
+
readonly ref: string;
|
|
419
|
+
readonly document: AppSyncRemoteDocument;
|
|
420
|
+
readonly expectedLocalVersion: null | string;
|
|
421
|
+
readonly fence: AppSyncOperationFence;
|
|
422
|
+
} | {
|
|
423
|
+
readonly kind: 'conditional_save';
|
|
424
|
+
readonly binding: AppSyncBinding;
|
|
425
|
+
readonly grant: AppSyncGrant;
|
|
426
|
+
readonly ref: string;
|
|
427
|
+
readonly documentId: string;
|
|
428
|
+
readonly expectedLocalVersion: string;
|
|
429
|
+
readonly expectedRemoteRevision: number;
|
|
430
|
+
readonly expectedRemoteFingerprint: string;
|
|
431
|
+
readonly markdown: string;
|
|
432
|
+
readonly markdownFingerprint: string;
|
|
433
|
+
readonly needsReattach: boolean;
|
|
434
|
+
readonly fence: AppSyncOperationFence;
|
|
435
|
+
readonly beforeDispatch: () => Promise<AppSyncContinuationSourceCheck>;
|
|
436
|
+
};
|
|
437
|
+
export type AppSyncContinuationApplyResult = {
|
|
438
|
+
readonly status: 'applied';
|
|
439
|
+
readonly dispatch: 'none' | 'attempted';
|
|
440
|
+
} | {
|
|
441
|
+
readonly status: 'stale_local';
|
|
442
|
+
readonly dispatch: 'none' | 'attempted';
|
|
443
|
+
} | {
|
|
444
|
+
readonly status: 'conflict';
|
|
445
|
+
readonly dispatch: 'attempted';
|
|
446
|
+
readonly errorCode?: string;
|
|
447
|
+
} | {
|
|
448
|
+
readonly status: 'deferred';
|
|
449
|
+
readonly dispatch: 'none';
|
|
450
|
+
readonly retryAt?: number;
|
|
451
|
+
readonly errorCode?: string;
|
|
452
|
+
} | {
|
|
453
|
+
readonly status: 'failed';
|
|
454
|
+
readonly dispatch: 'none' | 'attempted';
|
|
455
|
+
readonly errorCode: string;
|
|
456
|
+
readonly retryAt?: number;
|
|
457
|
+
};
|
|
458
|
+
export type AppSyncConflictPreservationStatus = 'pending' | 'ready' | 'failed';
|
|
459
|
+
export type AppSyncConflictState = 'open' | 'resolving' | 'superseded' | 'resolved' | 'kept_both' | 'purging';
|
|
460
|
+
export type AppSyncConflictChoice = 'keep_local' | 'use_cloud' | 'keep_both';
|
|
461
|
+
export interface AppSyncConflict {
|
|
462
|
+
readonly conflictId: string;
|
|
463
|
+
readonly bindingId: string;
|
|
464
|
+
readonly accountKey: string;
|
|
465
|
+
readonly workspaceId: string;
|
|
466
|
+
readonly rootFingerprint: string;
|
|
467
|
+
readonly grantId: string;
|
|
468
|
+
readonly grantGeneration: number;
|
|
469
|
+
readonly scopeVersion: typeof APP_SYNC_SCOPE_VERSION;
|
|
470
|
+
readonly ref: string;
|
|
471
|
+
readonly documentId: string;
|
|
472
|
+
readonly localVersion: string;
|
|
473
|
+
readonly localFingerprint: string;
|
|
474
|
+
readonly baselineRevision: number | null;
|
|
475
|
+
readonly baselineFingerprint: string | null;
|
|
476
|
+
readonly remoteRevision: number;
|
|
477
|
+
readonly remoteFingerprint: string;
|
|
478
|
+
readonly needsReattach: boolean;
|
|
479
|
+
readonly vaultHandle: string | null;
|
|
480
|
+
readonly preservationStatus: AppSyncConflictPreservationStatus;
|
|
481
|
+
readonly state: AppSyncConflictState;
|
|
482
|
+
readonly supersededBy: string | null;
|
|
483
|
+
readonly resolutionRequestId: string | null;
|
|
484
|
+
readonly resolutionChoice: AppSyncConflictChoice | null;
|
|
485
|
+
readonly cleanupPending: boolean;
|
|
486
|
+
readonly createdAt: number;
|
|
487
|
+
readonly updatedAt: number;
|
|
488
|
+
}
|
|
489
|
+
export interface AppSyncConflictResolutionInput {
|
|
490
|
+
readonly bindingId: string;
|
|
491
|
+
readonly session: AppSyncSessionState;
|
|
492
|
+
readonly eligibility: AppSyncEligibility;
|
|
493
|
+
readonly expectedSessionEpoch: number;
|
|
494
|
+
readonly workspaceId: string;
|
|
495
|
+
readonly resolvedRootSegments: readonly string[];
|
|
496
|
+
readonly conflictId: string;
|
|
497
|
+
readonly requestId: string;
|
|
498
|
+
readonly humanIdentity: string;
|
|
499
|
+
readonly appVersion: string;
|
|
500
|
+
readonly choice: AppSyncConflictChoice;
|
|
501
|
+
readonly expectedLocalVersion: string;
|
|
502
|
+
readonly expectedRemoteRevision: number;
|
|
503
|
+
readonly expectedRemoteFingerprint: string;
|
|
504
|
+
}
|
|
505
|
+
export interface AppSyncConflictResolutionResult {
|
|
506
|
+
readonly status: 'resolved' | 'kept_both';
|
|
507
|
+
readonly conflict: AppSyncConflictSummary;
|
|
508
|
+
readonly cleanupPending: boolean;
|
|
509
|
+
}
|
|
510
|
+
export type AppSyncConflictSummary = Omit<AppSyncConflict, 'vaultHandle'> & {
|
|
511
|
+
readonly sessionEpoch: number;
|
|
512
|
+
};
|
|
513
|
+
export interface AppSyncConflictArchiveInput {
|
|
514
|
+
readonly bindingId: string;
|
|
515
|
+
readonly session: AppSyncSessionState;
|
|
516
|
+
readonly eligibility: AppSyncEligibility;
|
|
517
|
+
readonly expectedSessionEpoch: number;
|
|
518
|
+
readonly workspaceId: string;
|
|
519
|
+
readonly resolvedRootSegments: readonly string[];
|
|
520
|
+
readonly conflictId: string;
|
|
521
|
+
}
|
|
522
|
+
export interface AppSyncConflictArchive {
|
|
523
|
+
readonly conflictId: string;
|
|
524
|
+
readonly localVersion: string;
|
|
525
|
+
readonly localFingerprint: string;
|
|
526
|
+
readonly remoteRevision: number;
|
|
527
|
+
readonly remoteFingerprint: string;
|
|
528
|
+
readonly markdown: string;
|
|
529
|
+
}
|
|
530
|
+
export interface AppSyncAccountDataPurgeInput {
|
|
531
|
+
readonly bindingId: string;
|
|
532
|
+
readonly session: AppSyncSessionState;
|
|
533
|
+
readonly expectedSessionEpoch: number;
|
|
534
|
+
readonly workspaceId: string;
|
|
535
|
+
readonly resolvedRootSegments: readonly string[];
|
|
536
|
+
readonly requestId: string;
|
|
537
|
+
readonly humanIdentity: string;
|
|
538
|
+
readonly intent: 'device_account_data_deleted';
|
|
539
|
+
}
|
|
540
|
+
export interface AppSyncAccountDataPurgeResult {
|
|
541
|
+
readonly requestId: string;
|
|
542
|
+
readonly status: 'purged' | 'cleanup_pending';
|
|
543
|
+
readonly remainingArchiveCount: number;
|
|
544
|
+
}
|
|
545
|
+
export interface AppSyncConflictVaultPort {
|
|
546
|
+
preserve(input: {
|
|
547
|
+
readonly accountKey: string;
|
|
548
|
+
readonly conflictId: string;
|
|
549
|
+
readonly markdown: string;
|
|
550
|
+
readonly fingerprint: string;
|
|
551
|
+
readonly fence: AppSyncOperationFence;
|
|
552
|
+
}): Promise<{
|
|
553
|
+
readonly handle: string;
|
|
554
|
+
readonly fingerprint: string;
|
|
555
|
+
}>;
|
|
556
|
+
read(input: {
|
|
557
|
+
readonly accountKey: string;
|
|
558
|
+
readonly handle: string;
|
|
559
|
+
readonly expectedFingerprint: string;
|
|
560
|
+
readonly fence: AppSyncOperationFence;
|
|
561
|
+
}): Promise<{
|
|
562
|
+
readonly markdown: string;
|
|
563
|
+
readonly fingerprint: string;
|
|
564
|
+
}>;
|
|
565
|
+
remove(input: {
|
|
566
|
+
readonly accountKey: string;
|
|
567
|
+
readonly handle: string;
|
|
568
|
+
readonly fence: AppSyncOperationFence;
|
|
569
|
+
}): Promise<void>;
|
|
570
|
+
}
|
|
571
|
+
export interface AppSyncContinuationCapability {
|
|
572
|
+
readonly store: AppSyncStore & AppSyncContinuationStore;
|
|
573
|
+
readonly conflictVault: AppSyncConflictVaultPort;
|
|
574
|
+
readonly pageSize?: number;
|
|
575
|
+
}
|
|
576
|
+
export interface AppSyncListConflictsInput {
|
|
577
|
+
readonly bindingId: string;
|
|
578
|
+
readonly session: AppSyncSessionState;
|
|
579
|
+
readonly eligibility: AppSyncEligibility;
|
|
580
|
+
readonly workspaceId: string;
|
|
581
|
+
readonly resolvedRootSegments: readonly string[];
|
|
582
|
+
}
|
|
583
|
+
export interface AppSyncDiscoveryCheckpoint {
|
|
584
|
+
readonly bindingId: string;
|
|
585
|
+
readonly accountKey: string;
|
|
586
|
+
readonly workspaceId: string;
|
|
587
|
+
readonly rootFingerprint: string;
|
|
588
|
+
readonly grantId: string;
|
|
589
|
+
readonly grantGeneration: number;
|
|
590
|
+
readonly scopeVersion: typeof APP_SYNC_SCOPE_VERSION;
|
|
591
|
+
readonly lastCycleStartedAt: number | null;
|
|
592
|
+
readonly cycleStartedAt: number | null;
|
|
593
|
+
readonly docsCursor: string | null;
|
|
594
|
+
readonly docsComplete: boolean;
|
|
595
|
+
readonly deletedCursor: string | null;
|
|
596
|
+
readonly deletedComplete: boolean;
|
|
597
|
+
readonly updatedAt: number;
|
|
598
|
+
}
|
|
599
|
+
export interface AppSyncPendingDiscovery {
|
|
600
|
+
readonly bindingId: string;
|
|
601
|
+
readonly accountKey: string;
|
|
602
|
+
readonly grantId: string;
|
|
603
|
+
readonly grantGeneration: number;
|
|
604
|
+
readonly ref: string;
|
|
605
|
+
readonly docId: string;
|
|
606
|
+
readonly listedRevision: number;
|
|
607
|
+
readonly listedFingerprint: string;
|
|
608
|
+
readonly appGrantGeneration: number;
|
|
609
|
+
readonly needsReattach: boolean;
|
|
610
|
+
readonly needsReconcile: boolean;
|
|
611
|
+
readonly status: 'waiting' | 'processing' | 'failed' | 'invalidated';
|
|
612
|
+
readonly errorCode: string | null;
|
|
613
|
+
readonly attempts: number;
|
|
614
|
+
readonly updatedAt: number;
|
|
615
|
+
}
|
|
616
|
+
export interface AppSyncContinuationStore {
|
|
617
|
+
getDiscoveryCheckpoint(bindingId: string): AppSyncDiscoveryCheckpoint | undefined;
|
|
618
|
+
beginDiscoveryCycle(input: {
|
|
619
|
+
readonly binding: AppSyncBinding;
|
|
620
|
+
readonly fence: AppSyncOperationFence;
|
|
621
|
+
readonly now: number;
|
|
622
|
+
}): AppSyncDiscoveryCheckpoint | null;
|
|
623
|
+
resetDiscoveryCycle(input: {
|
|
624
|
+
readonly binding: AppSyncBinding;
|
|
625
|
+
readonly fence: AppSyncOperationFence;
|
|
626
|
+
readonly now: number;
|
|
627
|
+
}): void;
|
|
628
|
+
commitGrantDocsPage(input: {
|
|
629
|
+
readonly binding: AppSyncBinding;
|
|
630
|
+
readonly fence: AppSyncOperationFence;
|
|
631
|
+
readonly items: readonly AppSyncGrantDoc[];
|
|
632
|
+
readonly expectedCursor: string | null;
|
|
633
|
+
readonly nextCursor: string | null;
|
|
634
|
+
readonly now: number;
|
|
635
|
+
}): void;
|
|
636
|
+
commitDeletedRefsPage(input: {
|
|
637
|
+
readonly binding: AppSyncBinding;
|
|
638
|
+
readonly fence: AppSyncOperationFence;
|
|
639
|
+
readonly items: readonly AppSyncDeletedRef[];
|
|
640
|
+
readonly expectedCursor: string | null;
|
|
641
|
+
readonly nextCursor: string | null;
|
|
642
|
+
readonly now: number;
|
|
643
|
+
}): void;
|
|
644
|
+
listPendingDiscoveries(bindingId: string, grantId: string, generation: number, limit?: number): AppSyncPendingDiscovery[];
|
|
645
|
+
getPendingDiscovery(bindingId: string, grantId: string, generation: number, ref: string): AppSyncPendingDiscovery | undefined;
|
|
646
|
+
updatePendingDiscovery(input: {
|
|
647
|
+
readonly bindingId: string;
|
|
648
|
+
readonly grantId: string;
|
|
649
|
+
readonly generation: number;
|
|
650
|
+
readonly ref: string;
|
|
651
|
+
readonly fence: AppSyncOperationFence;
|
|
652
|
+
readonly patch: Partial<Pick<AppSyncPendingDiscovery, 'listedRevision' | 'listedFingerprint' | 'docId' | 'appGrantGeneration' | 'needsReattach' | 'needsReconcile' | 'status' | 'errorCode' | 'attempts'>>;
|
|
653
|
+
readonly now: number;
|
|
654
|
+
}): void;
|
|
655
|
+
completePendingDiscovery(input: {
|
|
656
|
+
readonly bindingId: string;
|
|
657
|
+
readonly grantId: string;
|
|
658
|
+
readonly generation: number;
|
|
659
|
+
readonly ref: string;
|
|
660
|
+
readonly fence: AppSyncOperationFence;
|
|
661
|
+
}): void;
|
|
662
|
+
recordKnownDeletion(input: {
|
|
663
|
+
readonly binding: AppSyncBinding;
|
|
664
|
+
readonly grant: AppSyncGrant;
|
|
665
|
+
readonly ref: string;
|
|
666
|
+
readonly refHash: string;
|
|
667
|
+
readonly documentId: string;
|
|
668
|
+
readonly fence: AppSyncOperationFence;
|
|
669
|
+
readonly now: number;
|
|
670
|
+
}): void;
|
|
671
|
+
recordContinuationOutcome(input: {
|
|
672
|
+
readonly binding: AppSyncBinding;
|
|
673
|
+
readonly grant: AppSyncGrant;
|
|
674
|
+
readonly ref: string;
|
|
675
|
+
readonly sourceFingerprint: string | null;
|
|
676
|
+
readonly syncedFingerprint: string | null;
|
|
677
|
+
readonly documentId: string | null;
|
|
678
|
+
readonly status: AppSyncResultStatus;
|
|
679
|
+
readonly errorCode: string | null;
|
|
680
|
+
readonly fence: AppSyncOperationFence;
|
|
681
|
+
readonly now: number;
|
|
682
|
+
}): void;
|
|
683
|
+
enqueueReattachJob(input: {
|
|
684
|
+
readonly binding: AppSyncBinding;
|
|
685
|
+
readonly grant: AppSyncGrant;
|
|
686
|
+
readonly ref: string;
|
|
687
|
+
readonly documentId: string;
|
|
688
|
+
readonly fingerprint: string;
|
|
689
|
+
readonly requestId: string;
|
|
690
|
+
readonly jobId: string;
|
|
691
|
+
readonly now: number;
|
|
692
|
+
readonly fence: AppSyncOperationFence;
|
|
693
|
+
}): AppSyncCreationJob;
|
|
694
|
+
putConflict(input: {
|
|
695
|
+
readonly conflict: AppSyncConflict;
|
|
696
|
+
readonly fence: AppSyncOperationFence;
|
|
697
|
+
}): AppSyncConflict;
|
|
698
|
+
rebindConflict(input: {
|
|
699
|
+
readonly conflictId: string;
|
|
700
|
+
readonly grant: AppSyncGrant;
|
|
701
|
+
readonly needsReattach: boolean;
|
|
702
|
+
readonly fence: AppSyncOperationFence;
|
|
703
|
+
readonly now: number;
|
|
704
|
+
}): AppSyncConflict;
|
|
705
|
+
supersedeOpenConflicts(input: {
|
|
706
|
+
readonly bindingId: string;
|
|
707
|
+
readonly ref: string;
|
|
708
|
+
readonly supersededBy: string;
|
|
709
|
+
readonly fence: AppSyncOperationFence;
|
|
710
|
+
readonly now: number;
|
|
711
|
+
}): void;
|
|
712
|
+
getConflict(conflictId: string): AppSyncConflict | undefined;
|
|
713
|
+
listConflicts(bindingId: string): AppSyncConflict[];
|
|
714
|
+
beginConflictResolution(input: {
|
|
715
|
+
readonly conflictId: string;
|
|
716
|
+
readonly requestId: string;
|
|
717
|
+
readonly humanIdentity: string;
|
|
718
|
+
readonly choice: AppSyncConflictChoice;
|
|
719
|
+
readonly expectedLocalVersion: string;
|
|
720
|
+
readonly expectedRemoteRevision: number;
|
|
721
|
+
readonly expectedRemoteFingerprint: string;
|
|
722
|
+
readonly fence: AppSyncOperationFence;
|
|
723
|
+
readonly now: number;
|
|
724
|
+
}): void;
|
|
725
|
+
finishConflictResolution(input: {
|
|
726
|
+
readonly conflictId: string;
|
|
727
|
+
readonly requestId: string;
|
|
728
|
+
readonly choice: AppSyncConflictChoice;
|
|
729
|
+
readonly fence: AppSyncOperationFence;
|
|
730
|
+
readonly now: number;
|
|
731
|
+
}): AppSyncConflict;
|
|
732
|
+
abortConflictResolution(input: {
|
|
733
|
+
readonly conflictId: string;
|
|
734
|
+
readonly requestId: string;
|
|
735
|
+
readonly state: 'stale' | 'failed';
|
|
736
|
+
readonly errorCode: string;
|
|
737
|
+
readonly fence: AppSyncOperationFence;
|
|
738
|
+
readonly now: number;
|
|
739
|
+
}): void;
|
|
740
|
+
markConflictResolutionUnknown(input: {
|
|
741
|
+
readonly conflictId: string;
|
|
742
|
+
readonly requestId: string;
|
|
743
|
+
readonly fence: AppSyncOperationFence;
|
|
744
|
+
readonly now: number;
|
|
745
|
+
}): void;
|
|
746
|
+
finishConflictArchiveCleanup(input: {
|
|
747
|
+
readonly conflictId: string;
|
|
748
|
+
readonly fence: AppSyncOperationFence;
|
|
749
|
+
readonly now: number;
|
|
750
|
+
}): void;
|
|
751
|
+
markConflictPurging(input: {
|
|
752
|
+
readonly conflictId: string;
|
|
753
|
+
readonly fence: AppSyncOperationFence;
|
|
754
|
+
readonly now: number;
|
|
755
|
+
}): AppSyncConflict;
|
|
756
|
+
deletePurgedConflict(input: {
|
|
757
|
+
readonly conflictId: string;
|
|
758
|
+
readonly expectedVaultHandle: string | null;
|
|
759
|
+
readonly fence: AppSyncOperationFence;
|
|
760
|
+
readonly now: number;
|
|
761
|
+
}): void;
|
|
762
|
+
beginAccountDataPurge(input: {
|
|
763
|
+
readonly requestId: string;
|
|
764
|
+
readonly binding: AppSyncBinding;
|
|
765
|
+
readonly humanIdentity: string;
|
|
766
|
+
readonly fence: AppSyncOperationFence;
|
|
767
|
+
readonly now: number;
|
|
768
|
+
}): void;
|
|
769
|
+
finishAccountDataPurge(input: {
|
|
770
|
+
readonly requestId: string;
|
|
771
|
+
readonly binding: AppSyncBinding;
|
|
772
|
+
readonly fence: AppSyncOperationFence;
|
|
773
|
+
readonly now: number;
|
|
774
|
+
}): void;
|
|
775
|
+
getAccountDataPurge(requestId: string): {
|
|
776
|
+
readonly requestId: string;
|
|
777
|
+
readonly bindingId: string;
|
|
778
|
+
readonly accountKey: string;
|
|
779
|
+
readonly workspaceId: string;
|
|
780
|
+
readonly rootFingerprint: string;
|
|
781
|
+
readonly humanIdentity: string;
|
|
782
|
+
readonly state: 'pending' | 'complete';
|
|
783
|
+
} | undefined;
|
|
784
|
+
}
|
|
785
|
+
export interface AppSyncCreationBudget {
|
|
786
|
+
runCreate<T>(input: {
|
|
787
|
+
readonly accountKey: string;
|
|
788
|
+
readonly signal: AbortSignal;
|
|
789
|
+
readonly dispatch: () => Promise<T>;
|
|
790
|
+
}): Promise<{
|
|
791
|
+
readonly status: 'dispatched';
|
|
792
|
+
readonly value: T;
|
|
793
|
+
} | {
|
|
794
|
+
readonly status: 'deferred';
|
|
795
|
+
readonly retryAt: number;
|
|
796
|
+
}>;
|
|
797
|
+
}
|
|
798
|
+
export interface AppSyncStore {
|
|
799
|
+
bind(input: {
|
|
800
|
+
readonly bindingId: string;
|
|
801
|
+
readonly accountKey: string;
|
|
802
|
+
readonly workspaceId: string;
|
|
803
|
+
readonly appId: typeof APP_SYNC_APP_ID;
|
|
804
|
+
readonly rootSegments: readonly string[];
|
|
805
|
+
readonly now: number;
|
|
806
|
+
}): AppSyncBinding;
|
|
807
|
+
getBinding(bindingId: string): AppSyncBinding | undefined;
|
|
808
|
+
getBindingForAccountApp(accountKey: string, appId: typeof APP_SYNC_APP_ID): AppSyncBinding | undefined;
|
|
809
|
+
beginControlRequest(input: AppSyncControlRequest): AppSyncControlRequest;
|
|
810
|
+
getControlRequest(requestId: string): AppSyncControlRequest | undefined;
|
|
811
|
+
getPendingControlRequest(bindingId: string): AppSyncControlRequest | undefined;
|
|
812
|
+
getConfirmedRevoke(bindingId: string, grantId: string, generation: number): AppSyncControlRequest | undefined;
|
|
813
|
+
updateControlRequest(requestId: string, patch: {
|
|
814
|
+
readonly state: AppSyncControlRequestState;
|
|
815
|
+
readonly grantId: string | null;
|
|
816
|
+
readonly generation: number | null;
|
|
817
|
+
readonly resolution: AppSyncControlResolution | null;
|
|
818
|
+
readonly resolutionId: string | null;
|
|
819
|
+
readonly resolvedAt: number | null;
|
|
820
|
+
readonly now: number;
|
|
821
|
+
}): AppSyncControlRequest;
|
|
822
|
+
updateBinding(bindingId: string, patch: Partial<Pick<AppSyncBinding, 'grantId' | 'grantGeneration' | 'scopeVersion' | 'status'>>, now: number): void;
|
|
823
|
+
enqueueCreation(input: {
|
|
824
|
+
readonly jobId: string;
|
|
825
|
+
readonly requestId: string;
|
|
826
|
+
readonly bindingId: string;
|
|
827
|
+
readonly accountKey: string;
|
|
828
|
+
readonly grantId: string;
|
|
829
|
+
readonly grantGeneration: number;
|
|
830
|
+
readonly ref: string;
|
|
831
|
+
readonly fingerprint: string;
|
|
832
|
+
readonly now: number;
|
|
833
|
+
}): AppSyncCreationJob;
|
|
834
|
+
listRunnableCreations(bindingId: string, grantId: string, generation: number, now: number): AppSyncCreationJob[];
|
|
835
|
+
claimCreation(jobId: string, now: number, leaseMs: number): AppSyncCreationJob | undefined;
|
|
836
|
+
deferCreation?(claim: AppSyncCreationClaim, nextAttemptAt: number, now: number): boolean;
|
|
837
|
+
updateCreation(jobId: string, patch: {
|
|
838
|
+
readonly status: AppSyncJobStatus;
|
|
839
|
+
readonly nextAttemptAt: number;
|
|
840
|
+
readonly now: number;
|
|
841
|
+
}): void;
|
|
842
|
+
releaseProcessingCreations(bindingId: string, grantId: string, generation: number, now: number): void;
|
|
843
|
+
invalidateGrantJobs(bindingId: string, grantId: string, generation: number, now: number): void;
|
|
844
|
+
upsertResult(input: Omit<AppSyncResult, 'updatedAt' | 'nextAttemptAt' | 'attempts'> & {
|
|
845
|
+
readonly updatedAt: number;
|
|
846
|
+
readonly nextAttemptAt?: number;
|
|
847
|
+
readonly attempts?: number;
|
|
848
|
+
}): void;
|
|
849
|
+
getResult(bindingId: string, ref: string): AppSyncResult | undefined;
|
|
850
|
+
listResults(bindingId: string): AppSyncResult[];
|
|
851
|
+
hasDeletedRef(accountKey: string, appId: typeof APP_SYNC_APP_ID, refHash: string): boolean;
|
|
852
|
+
suppressDeletedRef(accountKey: string, appId: typeof APP_SYNC_APP_ID, refHash: string, now: number): void;
|
|
853
|
+
countDeletedRefs(accountKey: string, appId: typeof APP_SYNC_APP_ID): number;
|
|
854
|
+
listBindingsForAccount(accountKey: string): AppSyncBinding[];
|
|
855
|
+
}
|