export { U as UserError } from './errors-BcVE1wZB.js'; import { R as ResourceErrorInfo, a as ResourceExecutionResult, P as ProjectRuntimeContext, C as CreateWebhookEndpointInput, W as WebhookRequestOptions, b as WebhookEndpointWithSecret, c as WebhookDeleteResult, d as WebhookEndpoint, e as WebhookEndpointList, f as WebhookEventListOptions, g as WebhookEventPage, h as WebhookSecretResetResult, i as WebhookTestResult, U as UpdateWebhookEndpointInput, S as SkillFile, D as DeploymentContext, j as DeploymentRunResult$1, k as DeploymentInfo$1, l as DeploymentListFilter, m as DeploymentListResult, n as ResourceState, B as BackendRuntimeInput, o as RuntimeFeedbackSink, M as ModelInfo, p as ProviderAdapter, q as MemoryStoreInfo, r as BatchCreateMemoryInput, s as BatchCreateMemoryResult, t as CreateMemoryInput, u as MemoryInfo, v as CreateMemoryStoreInput, w as MemoryDeleteResult, x as MemoryProviderCapabilities, y as MemoryVersionInfo, z as MemoryListOptions, A as MemoryPage, E as MemoryListItem, F as MemoryStoreListOptions, G as MemoryVersionListOptions, H as UpdateMemoryInput, I as UpdateMemoryStoreInput, J as ResourcePlanResult, K as ResourceSyncMode, L as DestructivePolicy, N as RemoteResource, O as UsageQueryOptions, Q as UsageSummaryRequest, T as UsageSummaryResponse, V as UsageTrendRequest, X as UsageTrendResponse, Y as StateBackend, Z as StateScope, _ as IStateManager, $ as StateFile } from './resource-runtime-CsFE89Yu.js'; export { a0 as LoadedProjectConfig, a1 as MemoryContentPrecondition, a2 as MemoryMetadata, a3 as MemoryPrefixInfo, a4 as MemoryVersionOperation, a5 as ResourceActionResult, a6 as ResourceErrorPhase, a7 as ResourceExecutionOptions, a8 as ResourceExecutionOutcome, a9 as ResourcePlanScope, aa as ResourceRefreshResult, ab as ResourceResultDetail, ac as ResourceRuntimeOptions, ad as ResourceSyncRun, ae as RuntimeFeedbackEvent, af as StateManager, ag as UsageBreakdown, ah as UsageDimension, ai as UsageGranularity, aj as UsageMetric, ak as UsageModelMetrics, al as UsageModelRow, am as UsageSummary, an as UsageTimeRange, ao as UsageToolMetrics, ap as UsageToolRow, aq as UsageTotal, ar as UsageTrend, as as UsageTrendDimension, at as UsageTrendPoint, au as WebhookDelivery, av as WebhookEvent, aw as WebhookEventData, ax as WebhookEventWithDelivery, ay as createProjectRuntime, az as decideDestructive, aA as executePlannedProject, aB as importResource, aC as planProjectContext, aD as planProjectWithStateBackend, aE as readProjectRuntime, aF as resolveProjectConfig, aG as resolveProjectConfigFromObject, aH as syncProjectResourcesWithStateBackend, aI as writeProjectRuntime } from './resource-runtime-CsFE89Yu.js'; import { P as ProjectConfig, R as ResolvedProjectConfig, a as ProviderSessionInfo, M as ManagedAgentProviderCapabilities, D as DeploymentRunInfo, S as SessionResourceInfo, b as ProviderSkillInfo, c as SkillDownloadInfo, d as SkillVersionInfo, A as AgentVersionListOptions, e as AgentPage, f as AgentListOptions, g as DeploymentRunPage, E as EnvironmentListOptions, h as EnvironmentPage, F as FileListOptions, i as FilePage, j as SessionResourceListOptions, k as SessionResourcePage, l as SkillVersionListOptions, m as SkillVersionPage, n as SkillListOptions, o as SkillPage, V as VaultListOptions, p as VaultPage, q as SessionResourceMountInput, r as SessionEventInput, s as SessionEventSendResult, t as SessionUpdateInput, u as AgentDecl, v as SkillDecl, w as EnvironmentDecl, x as VaultDecl, y as SessionResourceDecl, z as ProviderSessionEventList, B as EventListOptions, C as SessionFilter, G as EventStreamOptions, H as ProviderSessionEvent, I as SessionBindings, J as SessionGithubRepositoryResource, K as SessionThreadListOptions, L as SessionThreadPage } from './session-thread-K0mtKer0.js'; export { N as CredentialDecl, O as CredentialInjectionLocation, Q as CredentialNetworking, T as CursorListOptions, U as CursorPage, W as DeploymentDecl, X as ManagedAgentOperationAuth, Y as ManagedAgentOperationCapability, Z as MemoryStoreDecl, _ as SessionEventFormat, $ as SessionListResult, a0 as SessionMemoryStoreResource, a1 as SessionMemoryStoreResourceDecl, a2 as SessionThread, a3 as VaultCredentialInfo } from './session-thread-K0mtKer0.js'; import { D as Diagnostic, R as ResourceType, P as PlannedAction, A as AgentDefinition, a as AgentReadiness, b as AgentWithReadiness, C as CloudAgent, c as CloudEnvironment, d as CloudVault, e as AgentSyncRun, f as ResourceAddress } from './dto-CIYO4YQw.js'; export { g as ActionType, h as ActionTypeSchema, i as AgentDefinitionSchema, j as AgentDriftSeverity, k as AgentDriftSeveritySchema, l as AgentModel, m as AgentModelSchema, n as AgentReadinessSchema, o as AgentReadinessStatus, p as AgentReadinessStatusSchema, q as AgentRecoveryAction, r as AgentRecoveryActionSchema, s as AgentSkillRef, t as AgentSkillRefSchema, u as AgentSyncReason, v as AgentSyncReasonSchema, w as AgentSyncResult, x as AgentSyncResultSchema, y as AgentSyncRunSchema, z as AgentSyncStatus, B as AgentSyncStatusSchema, E as AgentWithReadinessSchema, F as CloudAgentSchema, G as CloudEnvironmentSchema, H as CloudVaultSchema, I as CreateSessionRequest, J as CreateSessionRequestSchema, K as CreateSessionResponse, L as CreateSessionResponseSchema, M as DiagnosticSchema, N as DiagnosticSeverity, O as DiagnosticSeveritySchema, Q as DriftKind, S as DriftKindSchema, T as GetSessionRequest, U as GetSessionRequestSchema, V as KNOWN_SESSION_EVENT_TYPES, W as KnownSessionEventType, X as ListCloudAgentsResponse, Y as ListCloudAgentsResponseSchema, Z as ListCloudEnvironmentsResponse, _ as ListCloudEnvironmentsResponseSchema, $ as ListSessionEventsRequest, a0 as ListSessionEventsRequestSchema, a1 as ListSessionEventsResponse, a2 as ListSessionEventsResponseSchema, a3 as ListSessionsRequest, a4 as ListSessionsRequestSchema, a5 as ListSessionsResponse, a6 as ListSessionsResponseSchema, a7 as PlanReadinessImpact, a8 as PlanReadinessImpactSchema, a9 as PlannedActionSchema, aa as ResourceAddressSchema, ab as ResourceTypeSchema, ac as SendEventRequest, ad as SendEventRequestSchema, ae as SendEventResponse, af as SendEventResponseSchema, ag as Session, ah as SessionAgent, ai as SessionAgentSchema, aj as SessionContentBlock, ak as SessionContentBlockSchema, al as SessionEvent, am as SessionEventSchema, an as SessionEventType, ao as SessionEventTypeName, ap as SessionEventTypeSchema, aq as SessionSchema } from './dto-CIYO4YQw.js'; import { P as ProviderFileInfo } from './file-Cj5-Vx27.js'; import 'zod'; /** Only structured resource operations throw this class. Legacy callers keep original exceptions. */ declare class ResourceRuntimeError extends Error { readonly info: ResourceErrorInfo; readonly execution?: ResourceExecutionResult; constructor(message: string, info: ResourceErrorInfo, options?: { cause?: unknown; execution?: ResourceExecutionResult; }); } declare class ApiError extends Error { readonly statusCode: number; readonly responseBody: string; constructor(statusCode: number, responseBody: string, prefix: string); static isNotFound(err: unknown): boolean; } declare class ConflictError extends ApiError { } type FetchLike = (input: string | URL | Request, init?: RequestInit) => Promise; /** Install the fetch implementation used by all provider clients; pass undefined to reset. */ declare function setDefaultFetch(fetchImpl: FetchLike | undefined): void; /** Provider-only context for workspace APIs; contains no project config or state. */ type ManagedApiContext = Pick; interface CreateManagedApiContextInput { /** Already-resolved provider configuration; credentials are supplied by the host. */ providers: Record; } /** Validate provider configuration and create adapters without file or network I/O. */ declare function createManagedApiContext(input: CreateManagedApiContextInput): ManagedApiContext; interface ResolveBailianApiBaseUrlOptions { /** An HTTP(S) origin or a URL already ending in /api/v1/agentstudio. */ baseUrl?: string; /** Used to construct the Beijing workspace endpoint when baseUrl is absent. */ workspaceId?: string; } /** Normalize workspace API endpoints without changing BailianClient's verbatim baseUrl contract. */ declare function resolveBailianApiBaseUrl(options: ResolveBailianApiBaseUrlOptions): string; declare function createRemoteWebhookEndpoint(ctx: ManagedApiContext, input: CreateWebhookEndpointInput, options?: WebhookRequestOptions): Promise; declare function listRemoteWebhookEndpoints(ctx: ManagedApiContext, options?: WebhookRequestOptions): Promise; declare function getRemoteWebhookEndpoint(ctx: ManagedApiContext, id: string, options?: WebhookRequestOptions): Promise; declare function updateRemoteWebhookEndpoint(ctx: ManagedApiContext, id: string, input: UpdateWebhookEndpointInput, options?: WebhookRequestOptions): Promise; declare function deleteRemoteWebhookEndpoint(ctx: ManagedApiContext, id: string, options?: WebhookRequestOptions): Promise; declare function enableRemoteWebhookEndpoint(ctx: ManagedApiContext, id: string, options?: WebhookRequestOptions): Promise; declare function disableRemoteWebhookEndpoint(ctx: ManagedApiContext, id: string, options?: WebhookRequestOptions): Promise; declare function testRemoteWebhookEndpoint(ctx: ManagedApiContext, id: string, options?: WebhookRequestOptions): Promise; declare function resetRemoteWebhookSecret(ctx: ManagedApiContext, id: string, options?: WebhookRequestOptions): Promise; declare function listRemoteWebhookEvents(ctx: ManagedApiContext, id: string, options?: WebhookEventListOptions): Promise; interface ValidateProjectConfigOptions { /** Providers to capability-check. Defaults to the config's target providers. */ providers?: string[]; } /** Full config validation: cross-references + provider capabilities. Used by `agents validate`/plan/apply. */ declare function validateProjectConfig(config: ProjectConfig, options?: ValidateProjectConfigOptions): Diagnostic[]; /** * Reference checks only (no provider capabilities). The low-level primitive for hosts * that must NOT run provider capability rules — e.g. webui playbooks use server-only MCP * (no tools.mcp), which the Bailian capability check would wrongly flag. */ declare function collectConfigReferences(config: ProjectConfig): Diagnostic[]; interface ProjectSourceInspection { diagnostics: Diagnostic[]; redacted_source: string; sensitive_literals: string[]; } /** Validates a complete agents.yaml source and produces a display-safe copy. */ declare function inspectProjectSource(source: string, configPath: string): Promise; interface SyncProjectOptions { /** Provider to read remote resources from (single provider, not "all"). */ provider: string; /** Resource types to export. Defaults to ["vault"]. */ types?: ResourceType[]; /** When set, preserve the raw providers block from this config file in output. */ configPath?: string; } interface SecretPlaceholder { vaultName: string; credentialName: string; envVar: string; } interface SyncProjectResult { /** The assembled config object (version + providers + resource groups). */ config: Record; /** Serialized yaml, aligned with the plan/apply config format. */ yaml: string; /** Count of exported resources per type. */ counts: Record; /** Downloaded skill files, keyed by skill name → extracted SkillFile[]. */ skillFiles?: Map; /** Vault credential secret placeholders that need user input. */ secretPlaceholders?: SecretPlaceholder[]; } /** * Pick the provider to sync from when --provider is omitted. * Requires an on-disk config with an unambiguous default. */ declare function resolveSyncProvider(config: Pick, explicitProvider?: string): string; /** * Reverse-export a provider's remote resources WITHOUT a `agents.yaml`. The adapter * is built from environment variables (e.g. ANTHROPIC_API_KEY), making this the * first-run entry point: bootstrap a config from a remote account before any * local file exists. The emitted `providers` block uses `${ENV}` placeholders. */ declare function syncProviderResourcesFromEnv(opts: SyncProjectOptions): Promise; /** * Reverse-export using credentials from an existing project config/runtime context. */ declare function syncProviderResourcesFromContext(ctx: ProjectRuntimeContext, opts: SyncProjectOptions): Promise; interface MigrateOptions { fromPath: string; toPath: string; } interface MigrateResult { added: Record; skipped: Record; yaml: string; } /** * Migrate resources from a synced.yaml into an existing agents.yaml. * * - Uses the target agents.yaml's provider (from `defaults.provider` or the first provider key) * - Appends resources that don't already exist (by YAML key) * - Skips resources whose key already exists in the target * - Replaces the `provider` field on each migrated resource with the target provider */ declare function migrateConfig(opts: MigrateOptions): Promise; /** * The deployment-execution seam: trigger a run and read deployment status. The * deployment runtime drives a configured deployment exclusively through this * surface. The wide {@link import("./interface.ts").ProviderAdapter} structurally * satisfies it; create/update/delete of deployments live in {@link ResourceCrudAdapter}. */ interface DeploymentRunAdapter { runDeployment(ctx: DeploymentContext): Promise; getDeployment(ctx: DeploymentContext): Promise; listDeployments?(filter?: DeploymentListFilter): Promise; pauseDeployment?(ctx: DeploymentContext): Promise; unpauseDeployment?(ctx: DeploymentContext): Promise; } interface DeploymentSummary { name: string; provider: string; remoteId: string | null; scheduleExpression: string; agent: string; state: ResourceState; } interface DeploymentBindings { agentId: string; environmentId: string; vaultIds: string[]; memoryStoreIds: string[]; } interface DeploymentInfo { id: string | null; status: string; paused_reason?: { type: string; error?: { type: string; }; }; schedule?: { expression: string; timezone?: string; }; attributes?: Record; } interface DeploymentDetail { name: string; provider: string; info: DeploymentInfo; bindings: DeploymentBindings; } interface DeploymentRunResult { run_id?: string; session_id: string | null; error?: { type: string; message: string; }; } interface DeploymentRun { name: string; provider: string; result: DeploymentRunResult; } declare function listRemoteDeploymentsForContext(ctx: ProjectRuntimeContext, provider: string, filter?: DeploymentListFilter): Promise; declare function listDeploymentsForContext(ctx: ProjectRuntimeContext, providerFilter?: string): DeploymentSummary[]; declare function getDeploymentDetailsForContext(ctx: ProjectRuntimeContext, name: string, adapter?: Pick, resolvedProvider?: string): Promise; declare function runDeploymentForContext(ctx: ProjectRuntimeContext, name: string, adapter?: Pick, resolvedProvider?: string): Promise; declare function pauseDeploymentForContext(ctx: ProjectRuntimeContext, name: string, paused: boolean, resolvedProvider?: string): Promise; declare function getDeploymentRuntimeProviderForContext(ctx: ProjectRuntimeContext, name: string, overrideProvider?: string): string; interface ManagedApiTarget { provider?: string; } declare function listRemoteAgents(ctx: ProjectRuntimeContext, options?: ManagedApiTarget & AgentListOptions): Promise; declare function getRemoteAgent(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget & { version?: number; signal?: AbortSignal; }): Promise<{ id: string; name?: string | undefined; description?: string | null | undefined; model?: unknown; system?: string | undefined; tools?: unknown; skills?: unknown; mcp_servers?: unknown; metadata?: Record | undefined; version?: number | undefined; type?: string | undefined; workspace_id?: string | undefined; created_at?: string | undefined; updated_at?: string | undefined; archived_at?: string | null | undefined; attributes?: Record | undefined; }>; declare function listRemoteAgentVersions(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget & AgentVersionListOptions): Promise; declare function listRemoteEnvironments(ctx: ProjectRuntimeContext, options?: ManagedApiTarget & EnvironmentListOptions): Promise; declare function getRemoteEnvironment(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget): Promise<{ id: string; name?: string | undefined; description?: string | null | undefined; config?: unknown; metadata?: Record | undefined; scope?: string | undefined; version?: number | undefined; type?: string | undefined; workspace_id?: string | undefined; created_at?: string | undefined; updated_at?: string | undefined; archived_at?: string | null | undefined; attributes?: Record | undefined; }>; declare function listRemoteVaults(ctx: ProjectRuntimeContext, options?: ManagedApiTarget & VaultListOptions): Promise; declare function getRemoteVault(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget): Promise<{ id: string; display_name?: string | undefined; metadata?: Record | undefined; type?: string | undefined; created_at?: string | null | undefined; updated_at?: string | null | undefined; archived_at?: string | null | undefined; attributes?: Record | undefined; }>; declare function listRemoteSkills(ctx: ProjectRuntimeContext, options?: ManagedApiTarget & SkillListOptions): Promise; declare function getRemoteSkill(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget): Promise; declare function listRemoteSkillVersions(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget & SkillVersionListOptions): Promise; declare function getRemoteSkillVersion(ctx: ProjectRuntimeContext, id: string, version: string, options?: ManagedApiTarget): Promise; declare function getRemoteSkillDownloadInfo(ctx: ProjectRuntimeContext, id: string, version: string, options?: ManagedApiTarget): Promise; declare function downloadRemoteSkill(ctx: ProjectRuntimeContext, id: string, version: string, options?: ManagedApiTarget): Promise; declare function listRemoteFiles(ctx: ProjectRuntimeContext, options?: ManagedApiTarget & FileListOptions): Promise; declare function downloadRemoteFile(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget): Promise; declare function updateRemoteSession(ctx: ProjectRuntimeContext, id: string, input: SessionUpdateInput, options?: ManagedApiTarget): Promise; declare function archiveRemoteSession(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget): Promise; declare function mountRemoteSessionResource(ctx: ManagedApiContext, sessionId: string, input: SessionResourceMountInput, options?: ManagedApiTarget): Promise; declare function listRemoteSessionResources(ctx: ManagedApiContext, sessionId: string, options?: ManagedApiTarget & SessionResourceListOptions): Promise; declare function getRemoteSessionResource(ctx: ManagedApiContext, sessionId: string, resourceId: string, options?: ManagedApiTarget): Promise; declare function unmountRemoteSessionResource(ctx: ManagedApiContext, sessionId: string, resourceId: string, options?: ManagedApiTarget): Promise; declare function sendRemoteSessionEvents(ctx: ProjectRuntimeContext, id: string, events: SessionEventInput[], options?: ManagedApiTarget): Promise; declare function listRemoteDeployments(ctx: ProjectRuntimeContext, options?: ManagedApiTarget & DeploymentListFilter): Promise; declare function getRemoteDeployment(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget): Promise; declare function runRemoteDeployment(ctx: ProjectRuntimeContext, id: string, options?: ManagedApiTarget): Promise; declare function setRemoteDeploymentPaused(ctx: ProjectRuntimeContext, id: string, paused: boolean, options?: ManagedApiTarget): Promise; declare function listRemoteDeploymentRuns(ctx: ProjectRuntimeContext, deploymentId: string, options?: ManagedApiTarget & { limit?: number; page?: string; }): Promise; declare function getRemoteDeploymentRun(ctx: ProjectRuntimeContext, runId: string, options?: ManagedApiTarget): Promise; declare function getManagedAgentProviderCapabilities(provider: string): ManagedAgentProviderCapabilities; interface VaultCredentialCreateOptions { provider?: string; refresh?: boolean; quiet?: boolean; /** Set false only for an offline preview; create always requires the remote duplicate check. */ checkRemote?: boolean; } interface VaultCredentialCreatePlan { provider: string; vault: string; vaultRemoteId: string; credential: string; remoteChecked: boolean; reuseRemote: boolean; remoteCredentialId?: string; } interface VaultCredentialCreateResult extends VaultCredentialCreatePlan { credentialId: string; adopted: boolean; } declare function planVaultCredentialCreate(ctx: ProjectRuntimeContext, vaultName: string, credentialName: string, options?: VaultCredentialCreateOptions): Promise; declare function planVaultCredentialCreateWithStateBackend(input: BackendRuntimeInput, vaultName: string, credentialName: string, options?: VaultCredentialCreateOptions): Promise; declare function createVaultCredential(ctx: ProjectRuntimeContext, vaultName: string, credentialName: string, options?: VaultCredentialCreateOptions): Promise; declare function createVaultCredentialWithStateBackend(input: BackendRuntimeInput, vaultName: string, credentialName: string, options?: VaultCredentialCreateOptions): Promise; type DestroyResourceStatus = "success" | "failed" | "blocked" | "skipped"; type DestroyResourceResultReason = "destroyed" | "reference_removed" | "already_gone" | "cascade_required" | "provider_missing" | "failed" | "skipped"; interface DestroyResourceResult { resource: ResourceState; status: DestroyResourceStatus; reason: DestroyResourceResultReason; error?: string; cascaded?: boolean; } interface DestroyPlanResult { resources: ResourceState[]; defaultMemoryStores: DestroyDefaultMemoryStorePlan[]; executionContext: ProjectRuntimeContext; } interface DestroyDefaultMemoryStorePlan { agentName: string; provider: string; identityId: string | null; templateId: string | null; deleteOnDestroy: boolean; memoryStoreId?: string; } interface DestroyDefaultMemoryStoreResult extends DestroyDefaultMemoryStorePlan { status: "retained" | "deleted" | "already_gone" | "failed"; memoryStoreId?: string; error?: string; } interface DestroyProjectOptions { cascade?: boolean; onFeedback?: RuntimeFeedbackSink; onResourceStart?: (resource: ResourceState) => void; onResourceResult?: (result: DestroyResourceResult) => void; onCascadeRequired?: (result: DestroyResourceResult) => boolean | Promise; /** Override bounded cleanup backoff, primarily for deterministic tests. */ defaultMemoryStoreRetryDelaysMs?: number[]; } interface DestroyProjectResult extends DestroyPlanResult { results: DestroyResourceResult[]; defaultMemoryStoreResults: DestroyDefaultMemoryStoreResult[]; destroyed: number; partial: boolean; } declare function planDestroyProjectContext(ctx: ProjectRuntimeContext): DestroyPlanResult; declare function destroyPlannedProjectResources(planned: DestroyPlanResult, options?: DestroyProjectOptions): Promise; interface ProviderModelInfo { id: string; display_name: string; source: string; is_enabled: boolean; is_new: boolean; price_factor?: number; efforts?: string[]; default_effort?: string; } interface ProviderModelListing { provider: string; supportsDynamicListing: boolean; models: ProviderModelInfo[]; } /** * The model-listing seam: enumerate a provider's available models. Optional — * only providers with dynamic model discovery implement it. The wide * {@link import("../providers/interface.ts").ProviderAdapter} structurally satisfies it. */ interface ModelListAdapter { listModels?(): Promise; } /** * Context-first entry point: list models from a pre-built providers Map. * No file I/O is performed — the caller supplies the provider adapters. */ declare function listProviderModelsForContext(providers: ReadonlyMap, providerFilter?: string): Promise; declare function listProviderNames(): string[]; declare function listMemoryStores(providers: ReadonlyMap, provider: string, options?: MemoryStoreListOptions): Promise>; declare function getMemoryProviderCapabilities(providers: ReadonlyMap, provider: string): MemoryProviderCapabilities; declare function createMemoryStore(providers: ReadonlyMap, provider: string, input: CreateMemoryStoreInput): Promise; declare function deleteMemoryStore(providers: ReadonlyMap, provider: string, id: string): Promise; declare function getMemoryStore(providers: ReadonlyMap, provider: string, id: string): Promise; declare function updateMemoryStore(providers: ReadonlyMap, provider: string, id: string, input: UpdateMemoryStoreInput): Promise; declare function archiveMemoryStore(providers: ReadonlyMap, provider: string, id: string): Promise; declare function createMemory(providers: ReadonlyMap, provider: string, storeId: string, input: CreateMemoryInput): Promise; declare function batchCreateMemories(providers: ReadonlyMap, provider: string, storeId: string, input: BatchCreateMemoryInput): Promise; declare function listMemories(providers: ReadonlyMap, provider: string, storeId: string, options?: MemoryListOptions): Promise>; declare function getMemory(providers: ReadonlyMap, provider: string, storeId: string, memoryId: string): Promise; declare function updateMemory(providers: ReadonlyMap, provider: string, storeId: string, memoryId: string, input: UpdateMemoryInput): Promise; declare function deleteMemory(providers: ReadonlyMap, provider: string, storeId: string, memoryId: string, expected?: string): Promise; declare function listMemoryVersions(providers: ReadonlyMap, provider: string, storeId: string, options?: MemoryVersionListOptions): Promise>; declare function getMemoryVersion(providers: ReadonlyMap, provider: string, storeId: string, versionId: string): Promise; declare function redactMemoryVersion(providers: ReadonlyMap, provider: string, storeId: string, versionId: string): Promise; interface AgentSkillBuildInput { kind: "official" | "custom"; /** Skill code/id for official skills. */ code?: string; version?: string; /** Name + source for custom (managed) skills. */ name?: string; source?: string; description?: string; } interface AgentMcpBuildInput { serverName: string; serverType: "official" | "url" | "http"; serverUrl?: string; defaultEnabled?: boolean; /** Per-tool overrides; omitted or empty uses defaultEnabled for every tool. */ tools?: Array<{ name: string; enabled?: boolean; }>; } interface AgentBuildInput { name?: string; description?: string; model?: AgentDecl["model"]; instructions?: string; environment?: string; vault?: string; provider?: string; builtinTools?: string[]; skills?: AgentSkillBuildInput[]; mcp?: AgentMcpBuildInput[]; metadata?: Record; } interface BuiltAgent { agent: AgentDecl; /** Custom skills referenced by the agent, to be merged into config.skills. */ customSkills: Record; } /** * Construct a normalized AgentDecl by overlaying neutral override fields onto an * optional base agent. Owns the provider-specific encoding of tools/mcp/skills so * callers (e.g. a WebUI catalog) don't hand-assemble core's config shapes. */ declare function buildAgentDecl(base: AgentDecl | undefined, input: AgentBuildInput): BuiltAgent; interface AgentResourcePlan { agentId: string; provider: string; fingerprint: string; actions: PlannedAction[]; diagnostics: Diagnostic[]; destructiveActions: PlannedAction[]; planned: ResourcePlanResult; } interface AgentResourcePlanOptions { refresh?: boolean; quiet?: boolean; onFeedback?: RuntimeFeedbackSink; /** Strict Agent runtime closure; excludes downstream resources such as deployments. */ scope?: "runtime"; mode?: AgentResourceSyncMode; } type AgentResourceSyncMode = ResourceSyncMode; interface AgentResourceSyncOptions extends AgentResourcePlanOptions { policy?: DestructivePolicy; confirm?: (actions: PlannedAction[]) => boolean | Promise; /** Refuse execution when a fresh plan no longer matches the plan shown to the user. */ expectedPlanFingerprint?: string; } /** * List RAW cloud agents from the provider — the actual remote objects, not the local * config agents that `listAgents` returns. This is what the resource center needs to * surface same-name duplicates and identity-stamp drift (metadata.playbook vs agents.*) that * the local view can't see. Resolves the single configured provider (or `options.provider`) * and delegates to the adapter's optional `listAgents`; returns [] if unsupported. */ declare function listCloudAgents(ctx: ProjectRuntimeContext, options?: { provider?: string; prefix?: string; limit?: number; }): Promise; /** * List RAW cloud environments — the shared base sandboxes (networking + packages) that * sessions run inside. Not tied to any playbook/agent. Delegates to the adapter's optional * `listEnvironments`; returns [] if unsupported. */ declare function listCloudEnvironments(ctx: ProjectRuntimeContext, options?: { provider?: string; limit?: number; }): Promise; /** Create a cloud environment directly (used by the webui entry-check base-env provisioning). */ declare function createCloudEnvironment(ctx: ProjectRuntimeContext, name: string, decl: EnvironmentDecl, options?: { provider?: string; }): Promise; /** Delete a cloud environment by remote id (used by the webui resource center). */ declare function deleteCloudEnvironment(ctx: ProjectRuntimeContext, id: string, options?: { provider?: string; }): Promise; /** * List RAW cloud vaults — the shared credential stores bound to sessions via `vault_ids`. * Not tied to any playbook/agent. Delegates to the adapter's optional `listVaults`; returns [] * if unsupported. */ declare function listCloudVaults(ctx: ProjectRuntimeContext, options?: { provider?: string; limit?: number; }): Promise; /** Create a cloud vault (+ its credentials) directly, for the webui's user-supplied-key flow. */ declare function createCloudVault(ctx: ProjectRuntimeContext, name: string, decl: VaultDecl, options?: { provider?: string; }): Promise; /** Delete a cloud vault by remote id (used by the webui resource center). */ declare function deleteCloudVault(ctx: ProjectRuntimeContext, id: string, options?: { provider?: string; }): Promise; /** Archive a cloud agent (soft delete → status=archived). Used by the resource center's * archive action; the bailian adapter maps this to POST /agents/{id}/archive. */ declare function archiveCloudAgent(ctx: ProjectRuntimeContext, id: string, options?: { provider?: string; }): Promise; declare function getAgent(ctx: ProjectRuntimeContext, agentId: string): AgentDefinition; declare function listAgentsWithReadiness(ctx: ProjectRuntimeContext, options?: { refresh?: boolean; }): Promise; declare function isAgentRunnable(readiness: AgentReadiness): boolean; declare function planAgentResources(ctx: ProjectRuntimeContext, agentId: string, options?: AgentResourcePlanOptions): Promise; declare function planAgentResourcesWithStateBackend(input: BackendRuntimeInput, agentId: string, options?: AgentResourcePlanOptions): Promise; declare function syncAgentResourcesWithStateBackend(input: BackendRuntimeInput, agentId: string, options?: AgentResourceSyncOptions): Promise; interface SessionCreateOptions { /** Explicit provider Identity id. Overrides the declared defaults.identity reference. */ identityId?: string; environment?: string; /** * Explicit remote environment id. When set, it is bound directly (bypassing the * config-name → state resolution), letting callers that already hold a provider * environment id (e.g. the webui) pin the sandbox without declaring it in config. * Takes precedence over `environment` / the agent's declared environment. */ environmentId?: string; /** Tunnel name referencing `tunnels.` in config. */ tunnel?: string; /** Explicit remote tunnel id. Takes precedence over `tunnel` / the agent's declared tunnel. */ tunnelId?: string; vault?: string; /** * Explicit remote vault ids. When set, they are bound directly (bypassing the * config-name → state resolution), letting callers that already hold provider * vault ids (e.g. the webui) bind a user-supplied credential vault without * declaring it in config. Takes precedence over `vault` / the agent's vault. */ vaultIds?: string[]; memoryStores?: string[]; /** Uploaded files to mount as session resources, so the task can read the user's files. */ files?: { fileId: string; mountPath: string; }[]; /** Explicit resources override the resources declared on the agent. */ resources?: SessionResourceDecl[]; title?: string; provider?: string; metadata?: Record; /** Session-level environment variables. Supported by Bailian and Qoder. */ environmentVariables?: Record; } /** Validate user-provided Session resources without loading a project or credentials. */ declare function parseSessionResources(input: unknown): SessionResourceDecl[]; declare function resolveSessionProvider(agentName: string, config: ProjectConfig, overrideProvider?: string): string; interface SessionRuntimeTarget { agent?: string; provider?: string; } interface SessionRuntimeCreateOptions extends SessionCreateOptions, SessionRuntimeTarget { } interface SessionRuntimeRunOptions extends SessionRuntimeCreateOptions { stream?: EventStreamOptions; pollIntervalMs?: number; pollTimeoutMs?: number; } interface SessionRuntimeSendOptions extends SessionRuntimeTarget { stream?: EventStreamOptions; pollIntervalMs?: number; pollTimeoutMs?: number; } interface CreatedSessionRun { agentName: string; provider: string; session: ProviderSessionInfo; } interface StreamingSessionRun extends CreatedSessionRun { events: AsyncIterable; } interface CollectedSessionEvents { eventId?: string; terminalStatus: string; result: ProviderSessionEventList; } interface SessionSummary { session: ProviderSessionInfo; provider: string; agentId?: string; agentName?: string; } interface SessionSummaryList { provider: string; summaries: SessionSummary[]; hasMore: boolean; nextPage?: string; } declare function isTerminalSessionStatus(status: string | undefined): boolean; declare function createSessionForAgent(ctx: ProjectRuntimeContext, options?: SessionRuntimeCreateOptions): Promise; declare function startSessionRun(ctx: ProjectRuntimeContext, prompt: string, options?: SessionRuntimeRunOptions): Promise; declare function sendSessionMessageStreaming(ctx: ProjectRuntimeContext, sessionId: string, message: string, options?: SessionRuntimeSendOptions): Promise>; declare function startSessionRunPolling(ctx: ProjectRuntimeContext, prompt: string, options?: SessionRuntimeRunOptions): Promise; declare function sendSessionMessagePolling(ctx: ProjectRuntimeContext, sessionId: string, message: string, options?: SessionRuntimeSendOptions): Promise; declare function listSessionSummaries(ctx: ProjectRuntimeContext, options?: SessionRuntimeTarget & { filter?: SessionFilter; }): Promise; declare function getSession(ctx: ProjectRuntimeContext, sessionId: string, provider?: string): Promise; declare function deleteSession(ctx: ProjectRuntimeContext, sessionId: string, provider?: string): Promise; declare function listSessionEvents(ctx: ProjectRuntimeContext, sessionId: string, options?: SessionRuntimeTarget & EventListOptions): Promise; /** * Upload a file's raw bytes to the resolved provider's Files API and return its metadata. * Content-based (no filesystem) so server contexts can forward browser uploads directly. */ declare function uploadFile(ctx: ProjectRuntimeContext, content: Uint8Array, filename: string, options?: SessionRuntimeTarget & { mimeType?: string; purpose?: string; }): Promise; /** Delete a previously uploaded file by id from the resolved provider's Files API. */ declare function deleteFile(ctx: ProjectRuntimeContext, id: string, options?: SessionRuntimeTarget): Promise; /** Fetch a single file's metadata (incl. scan `status`), to gate session binding on availability. */ declare function getFileInfo(ctx: ProjectRuntimeContext, id: string, options?: SessionRuntimeTarget): Promise; /** Resolve a short-lived presigned download URL for a file (e.g. an agent-delivered artifact). */ declare function getFileDownloadUrl(ctx: ProjectRuntimeContext, id: string, options?: SessionRuntimeTarget): Promise<{ url: string; expires_at?: string; }>; /** List workspace user-uploaded files (newest first) from the resolved provider's Files API. * Returns [] when the provider lacks file listing (graceful degradation, mirrors cloud listing). */ declare function listFiles(ctx: ProjectRuntimeContext, options?: SessionRuntimeTarget): Promise>; /** List skills (newest first) from the resolved provider's Skills API. `source` selects the * catalog: "custom" (workspace-uploaded, the default) or "official" (the built-in catalog). * Returns [] when the provider lacks skill listing (graceful degradation, mirrors cloud listing). */ declare function listSkills(ctx: ProjectRuntimeContext, options?: SessionRuntimeTarget & { source?: "custom" | "official"; }): Promise; /** Fetch a single skill's metadata (incl. scan `status`), to poll create → active. */ declare function getSkillInfo(ctx: ProjectRuntimeContext, id: string, options?: SessionRuntimeTarget): Promise; /** Create a skill from an uploaded zip's file_id (non-blocking; returns initial scan status). */ declare function createSkillFromFileId(ctx: ProjectRuntimeContext, fileId: string, options?: SessionRuntimeTarget): Promise; /** Delete a custom skill by id from the resolved provider's Skills API. */ declare function deleteSkill(ctx: ProjectRuntimeContext, id: string, options?: SessionRuntimeTarget): Promise; /** * Subscribe to a session's event stream by id. Providers with native cursor support receive * `after_id` directly; providers without it resume by replaying paginated history and polling * for new events with event-id de-duplication. */ declare function streamSessionEvents(ctx: ProjectRuntimeContext, sessionId: string, options?: SessionRuntimeTarget & EventStreamOptions): AsyncIterable; /** Files as carried by `SessionBindings.files` — only `mount_path` matters for the hint. */ interface MountedFile { mount_path: string; } /** Resolve the provider path used for a mounted Git repository. */ declare function resolveRepositoryMountPath(provider: string, resource: SessionGithubRepositoryResource): string; /** Prepend the file-mount hint to a prompt. Returns the prompt unchanged when there are no files. */ declare function prependFileHint(prompt: string, files: MountedFile[] | undefined, provider: string): string; /** 将 prompt 内 ⟦file:mountPath⟧ 占位符替换为 provider 感知的真实 sandbox 路径 */ declare function rewriteFileMentions(prompt: string, provider: string): string; /** 发送给 provider 前统一处理:先替换 mention 占位符,再 prepend 文件 hint */ declare function preparePromptForProvider(prompt: string, files: MountedFile[] | undefined, provider: string): string; /** Prepare only the first user message for a newly created Session. */ declare function prepareInitialSessionPrompt(prompt: string, bindings: SessionBindings, provider: string): string; /** * Resolve a provider's config block from environment variables (actual values, not * `${ENV}` placeholders). Throws when a required field's env var is unset. Used both * by `buildProviderFromEnv` and by servers that assemble a raw project config object * (e.g. the server) and feed it through `resolveProjectConfigFromObject`. */ declare function resolveProviderConfigFromEnv(providerName: string): Record; declare const AGENTS_CONFIG_PROVIDERS: readonly ["bailian", "qoder", "ark", "claude"]; type ProviderConfigProvider = (typeof AGENTS_CONFIG_PROVIDERS)[number]; declare const AGENTS_PROVIDER_FIELDS: Record; type ProviderConfig = { AGENTS_PROVIDER: ProviderConfigProvider; [key: string]: string; }; declare function providerConfigPath(): string; /** Active provider after bootstrap — defaults to bailian when unset. */ declare function resolveActiveProvider(): ProviderConfigProvider; /** Whether the current process env has all required fields for the active provider. */ declare function areRuntimeCredentialsReady(): boolean; /** Load the nearest `.env` walking up from `startDir` (at most 10 levels). */ declare function loadDotEnv(startDir?: string): string | undefined; /** Apply config.json provider fields to `process.env`. With `force: false`, only unset vars are filled. */ declare function applyProviderConfigToEnv(config: ProviderConfig, { force }?: { force?: boolean; }): void; /** Load ~/.agents/config.json into `process.env`. Bootstrap passes `{ force: true }` so config.json wins. */ declare function loadProviderConfigIntoEnvSync(options?: { force?: boolean; }): void; /** Async variant for servers that prefer non-blocking I/O at startup. */ declare function loadProviderConfigIntoEnv(options?: { force?: boolean; }): Promise; /** * Runtime credential bootstrap: * 1. `.env` (and pre-set shell env) — lowest priority for provider fields * 2. `~/.agents/config.json` — highest priority; overrides conflicting provider fields */ declare function bootstrapRuntimeCredentialsSync(startDir?: string): void; declare function bootstrapRuntimeCredentials(startDir?: string): Promise; /** List child Agent executions. Bailian's main thrd_* is not returned by this endpoint. */ declare function listSessionThreads(ctx: ManagedApiContext, sessionId: string, options?: SessionRuntimeTarget & SessionThreadListOptions): Promise; /** Query a child Agent's history without starting a separate stream or changing the active Session. */ declare function listSessionThreadEvents(ctx: ManagedApiContext, sessionId: string, threadId: string, options?: SessionRuntimeTarget & EventListOptions): Promise; interface UsageRuntimeOptions extends UsageQueryOptions { /** Explicit provider; required when more than one provider is configured. */ provider?: string; } /** * Aggregated usage for one dimension (app-control usage.summary). Model and tool * details are returned by the same call, so callers render both tables from one * response instead of issuing per-table requests. */ declare function getUsageSummary(ctx: ManagedApiContext, request: UsageSummaryRequest, options?: UsageRuntimeOptions): Promise; /** * Bucketed usage trend (app-control usage.trend) for `workspace`/`agent`. * Each page carries the same `total/models/tools` views plus a `next_page_token` * cursor; callers follow the cursor instead of assuming a fixed page count. */ declare function getUsageTrend(ctx: ManagedApiContext, request: UsageTrendRequest, options?: UsageRuntimeOptions): Promise; declare function parseStateAddress(address: string, options?: { requireProvider?: boolean; }): ResourceAddress; interface LocalFileStateBackendOptions { configPath?: string; statePath?: string; } declare class LocalFileStateBackend implements StateBackend { private readonly configPath?; private readonly statePath?; constructor(options?: LocalFileStateBackendOptions); read(scope: StateScope, fn: (state: IStateManager) => Promise | T): Promise; write(scope: StateScope, fn: (state: IStateManager) => Promise | T): Promise; getStatePath(_scope: StateScope): string; } /** * In-memory implementation of IStateManager. * Does not perform file I/O. Hosts may supply a persistence callback for `save()`. * Suitable for WebUI, testing, or ephemeral scenarios. */ declare class InMemoryStateManager implements IStateManager { private readonly onSave?; private saves; private state; private index; private constructor(); private buildIndex; static fromJSON(data: StateFile, onSave?: (snapshot: StateFile) => void | Promise): InMemoryStateManager; static empty(onSave?: (snapshot: StateFile) => void | Promise): InMemoryStateManager; /** Detached snapshot suitable for host storage; preserves the SDK state format. */ toJSON(): StateFile; getResource(address: ResourceAddress): ResourceState | undefined; setResource(resource: ResourceState): void; removeResource(address: ResourceAddress): void; listResources(): ResourceState[]; findResource(query: { type: string; name: string; provider?: string; }): ResourceState | undefined; getStateFile(): StateFile; save(): Promise; } /** Normalize a skill zip and extract its entries to SkillFile[]. */ declare function extractSkillZipFiles(raw: Buffer): Promise; interface SkillSourceInspection { name: string; sourcePath: string; files: SkillFile[]; } /** Inspect and normalize a local Skill directory, zip, or single SKILL.md. */ declare function inspectSkillSource(source: string, options?: { basePath?: string; }): Promise; export { AGENTS_CONFIG_PROVIDERS, AGENTS_PROVIDER_FIELDS, type AgentBuildInput, AgentDefinition, AgentListOptions, type AgentMcpBuildInput, AgentPage, AgentReadiness, type AgentResourcePlan, type AgentResourcePlanOptions, type AgentResourceSyncMode, type AgentResourceSyncOptions, type AgentSkillBuildInput, AgentSyncRun, AgentVersionListOptions, AgentWithReadiness, ApiError, BackendRuntimeInput, BatchCreateMemoryInput, BatchCreateMemoryResult, CloudAgent, CloudEnvironment, CloudVault, type CollectedSessionEvents, ConflictError, type CreateManagedApiContextInput, CreateMemoryInput, CreateMemoryStoreInput, CreateWebhookEndpointInput, DeploymentInfo$1 as DeploymentInfo, DeploymentListFilter, DeploymentListResult, DeploymentRunInfo, DeploymentRunPage, DeploymentRunResult$1 as DeploymentRunResult, type DestroyDefaultMemoryStoreResult, type DestroyResourceResult, DestructivePolicy, Diagnostic, EnvironmentDecl, EnvironmentListOptions, EnvironmentPage, EventListOptions, EventStreamOptions, type FetchLike, FileListOptions, FilePage, IStateManager, InMemoryStateManager, LocalFileStateBackend, ManagedAgentProviderCapabilities, type ManagedApiContext, type ManagedApiTarget, MemoryDeleteResult, MemoryInfo, MemoryListItem, MemoryListOptions, MemoryPage, MemoryProviderCapabilities, MemoryStoreInfo, MemoryStoreListOptions, MemoryVersionInfo, MemoryVersionListOptions, type MigrateOptions, type MigrateResult, PlannedAction, ProjectConfig, ProjectRuntimeContext, type ProjectSourceInspection, type ProviderConfig, type ProviderConfigProvider, ProviderFileInfo, ProviderSessionEvent, ProviderSessionEventList, ProviderSessionInfo, ProviderSkillInfo, type ResolveBailianApiBaseUrlOptions, ResolvedProjectConfig, ResourceAddress, ResourceErrorInfo, ResourceExecutionResult, ResourcePlanResult, ResourceRuntimeError, ResourceState, ResourceSyncMode, ResourceType, RuntimeFeedbackSink, type SecretPlaceholder, SessionEventInput, SessionEventSendResult, SessionFilter, SessionResourceDecl, SessionResourceInfo, SessionResourceListOptions, SessionResourceMountInput, SessionResourcePage, SessionThreadListOptions, SessionThreadPage, SessionUpdateInput, SkillDecl, SkillDownloadInfo, SkillFile, SkillListOptions, SkillPage, type SkillSourceInspection, SkillVersionInfo, SkillVersionListOptions, SkillVersionPage, StateBackend, StateFile, StateScope, type SyncProjectOptions, type SyncProjectResult, UpdateMemoryInput, UpdateMemoryStoreInput, UpdateWebhookEndpointInput, UsageQueryOptions, type UsageRuntimeOptions, UsageSummaryRequest, UsageSummaryResponse, UsageTrendRequest, UsageTrendResponse, type ValidateProjectConfigOptions, type VaultCredentialCreateOptions, type VaultCredentialCreatePlan, type VaultCredentialCreateResult, VaultDecl, VaultListOptions, VaultPage, WebhookDeleteResult, WebhookEndpoint, WebhookEndpointList, WebhookEndpointWithSecret, WebhookEventListOptions, WebhookEventPage, WebhookRequestOptions, WebhookSecretResetResult, WebhookTestResult, applyProviderConfigToEnv, archiveCloudAgent, archiveMemoryStore, archiveRemoteSession, areRuntimeCredentialsReady, batchCreateMemories, bootstrapRuntimeCredentials, bootstrapRuntimeCredentialsSync, buildAgentDecl, collectConfigReferences, createCloudEnvironment, createCloudVault, createManagedApiContext, createMemory, createMemoryStore, createRemoteWebhookEndpoint, createSessionForAgent, createSkillFromFileId, createVaultCredential, createVaultCredentialWithStateBackend, deleteCloudEnvironment, deleteCloudVault, deleteFile, deleteMemory, deleteMemoryStore, deleteRemoteWebhookEndpoint, deleteSession, deleteSkill, destroyPlannedProjectResources, disableRemoteWebhookEndpoint, downloadRemoteFile, downloadRemoteSkill, enableRemoteWebhookEndpoint, extractSkillZipFiles, getAgent, getDeploymentDetailsForContext, getDeploymentRuntimeProviderForContext, getFileDownloadUrl, getFileInfo, getManagedAgentProviderCapabilities, getMemory, getMemoryProviderCapabilities, getMemoryStore, getMemoryVersion, getRemoteAgent, getRemoteDeployment, getRemoteDeploymentRun, getRemoteEnvironment, getRemoteSessionResource, getRemoteSkill, getRemoteSkillDownloadInfo, getRemoteSkillVersion, getRemoteVault, getRemoteWebhookEndpoint, getSession, getSkillInfo, getUsageSummary, getUsageTrend, inspectProjectSource, inspectSkillSource, isAgentRunnable, isTerminalSessionStatus, listAgentsWithReadiness, listCloudAgents, listCloudEnvironments, listCloudVaults, listDeploymentsForContext, listFiles, listMemories, listMemoryStores, listMemoryVersions, listProviderModelsForContext, listProviderNames, listRemoteAgentVersions, listRemoteAgents, listRemoteDeploymentRuns, listRemoteDeployments, listRemoteDeploymentsForContext, listRemoteEnvironments, listRemoteFiles, listRemoteSessionResources, listRemoteSkillVersions, listRemoteSkills, listRemoteVaults, listRemoteWebhookEndpoints, listRemoteWebhookEvents, listSessionEvents, listSessionSummaries, listSessionThreadEvents, listSessionThreads, listSkills, loadDotEnv, loadProviderConfigIntoEnv, loadProviderConfigIntoEnvSync, migrateConfig, mountRemoteSessionResource, parseSessionResources, parseStateAddress, pauseDeploymentForContext, planAgentResources, planAgentResourcesWithStateBackend, planDestroyProjectContext, planVaultCredentialCreate, planVaultCredentialCreateWithStateBackend, prepareInitialSessionPrompt, preparePromptForProvider, prependFileHint, providerConfigPath, redactMemoryVersion, resetRemoteWebhookSecret, resolveActiveProvider, resolveBailianApiBaseUrl, resolveProviderConfigFromEnv, resolveRepositoryMountPath, resolveSessionProvider, resolveSyncProvider, rewriteFileMentions, runDeploymentForContext, runRemoteDeployment, sendRemoteSessionEvents, sendSessionMessagePolling, sendSessionMessageStreaming, setDefaultFetch, setRemoteDeploymentPaused, startSessionRun, startSessionRunPolling, streamSessionEvents, syncAgentResourcesWithStateBackend, syncProviderResourcesFromContext, syncProviderResourcesFromEnv, testRemoteWebhookEndpoint, unmountRemoteSessionResource, updateMemory, updateMemoryStore, updateRemoteSession, updateRemoteWebhookEndpoint, uploadFile, validateProjectConfig };