@axiom-lattice/protocols 4.6.1 → 4.7.1

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/protocols@4.6.1 build /home/runner/work/agentic/agentic/packages/protocols
2
+ > @axiom-lattice/protocols@4.7.1 build /home/runner/work/agentic/agentic/packages/protocols
3
3
  > tsup src/index.ts --format cjs,esm --dts --sourcemap
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,13 +8,13 @@
8
8
  CLI Target: es2020
9
9
  CJS Build start
10
10
  ESM Build start
11
- ESM dist/index.mjs 42.09 KB
12
- ESM dist/index.mjs.map 185.97 KB
13
- ESM ⚡️ Build success in 316ms
14
- CJS dist/index.js 46.85 KB
15
- CJS dist/index.js.map 189.74 KB
16
- CJS ⚡️ Build success in 347ms
11
+ CJS dist/index.js 48.09 KB
12
+ CJS dist/index.js.map 193.07 KB
13
+ CJS ⚡️ Build success in 508ms
14
+ ESM dist/index.mjs 42.99 KB
15
+ ESM dist/index.mjs.map 189.15 KB
16
+ ESM ⚡️ Build success in 504ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 12182ms
19
- DTS dist/index.d.ts 244.47 KB
20
- DTS dist/index.d.mts 244.47 KB
18
+ DTS ⚡️ Build success in 14202ms
19
+ DTS dist/index.d.ts 251.25 KB
20
+ DTS dist/index.d.mts 251.25 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,71 @@
1
1
  # @axiom-lattice/protocols
2
2
 
3
+ ## 4.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - bb2614f: Chating composer height, plugin connection-secret encryption, and manage_task compact cards.
8
+
9
+ - react-sdk: keep the Chating composer input from collapsing after a run. In slot mode (Chating always passes an array `slotConfig`) the Sender input is a `contentEditable` whose height comes from `autoSize`; without a `minRows` the empty editor lost its placeholder-driven line box once streaming ended and collapsed to zero height on some platforms (e.g. Windows Chrome), leaving the input unreachable while the footer stayed visible. Pass `autoSize={{ minRows: 1, maxRows: 8 }}` like `ProjectRoomComposer`.
10
+ - protocols/core: add `ConnectionEntry.secretFields`, plus `connectionSecretFields` / `encryptConfigFields` / `decryptConfigFields`.
11
+ - local-stores/pg-stores: encrypt the declared secret fields on save and decrypt on read, so the API and runtime consumers always receive real values. Existing plaintext rows read unchanged and convert on their next save (PG migration v188).
12
+ - gateway: plugin builder self-test discovery + secret redaction.
13
+ - core: `manage_task` `add_activity` now returns the target task alongside the activity (`{ success, data, task }`), so UIs can show which task an activity was written to.
14
+ - react-sdk: every `manage_task` action renders a compact chip in the chat stream and reveals its full card on hover. Fixes `get` and `add_activity`, which previously rendered no UI at all.
15
+
16
+ ## 4.7.0
17
+
18
+ ### Minor Changes
19
+
20
+ - 360f9e9: Age-based retention/pruning for the durable outbox.
21
+
22
+ - `OutboxStore.pruneOlderThan(olderThanMs)` (InMemory + PostgreSQL).
23
+ - Gateway `OutboxRetentionJob` prunes `lattice_outbox` rows older than `AXIOM_OUTBOX_RETENTION_HOURS` (default 24h; `0`/invalid disables), after startup and every 6h. Safe because pollers read only new rows and history is not replayed. See ADR-161.
24
+
25
+ - eafaac8: Multi-gateway (PostgreSQL-only) coordination primitives — Plans 1 & 2.
26
+
27
+ **Plan 1 — replica identity + distributed leases**
28
+
29
+ - `getReplicaId()` stable per-process replica identity (`AXIOM_REPLICA_ID` or `hostname:pid`).
30
+ - `LeaseStore` / `LeaseRecord` protocol, `InMemoryLeaseStore` (registered as the default `"lease"` store), and `PostgreSQLLeaseStore` (migration v185 `lattice_leases`; atomic self-expiring upsert).
31
+ - `withLease(store, key, ownerLabel, fn)` — distributed critical-section helper with a unique per-invocation holder, bounded acquisition, heartbeat, and release-in-finally.
32
+
33
+ **Plan 2 — atomic thread-message-queue claim + lease**
34
+
35
+ - `ClaimMessagesOptions` and `IMessageQueueStore.claimPendingMessages` / `reclaimExpiredProcessing`.
36
+ - PostgreSQL migration v186 adds `locked_by` / `locked_at` / `lease_expires_at`; claim is an atomic `UPDATE … WHERE id IN (SELECT … FOR UPDATE SKIP LOCKED)` so concurrent Gateway replicas receive disjoint sets.
37
+ - In-memory and local SQLite implementations match the same semantics.
38
+
39
+ No existing behavior changes: the legacy `markProcessing` path is untouched; `Agent` is not yet rewired to the new claim (that is a follow-up plan).
40
+
41
+ - 396ad50: Multi-gateway (PostgreSQL-only) Plan 9 — durable outbox + cross-replica task notifications.
42
+
43
+ - `OutboxStore` / `OutboxEvent`: append-only durable event log (`append` / `listAfter` / `latestId`), InMemory + PostgreSQL (`lattice_outbox`, migration v187).
44
+ - `TaskLifecycleNotifier` / `ProjectTaskAdmissionNotifier`: `publish` keeps its existing local delivery and best-effort appends to the outbox (`originReplicaId`); new `setOutbox` + `deliverFromOutbox`.
45
+ - `OutboxPoller`: per-replica cursor poller that delivers only **foreign** outbox rows to local listeners (skips its own origin), so a peer's task lifecycle/admission events reach every replica.
46
+ - Gateway startup installs the outbox on both notifiers and starts the poller.
47
+ - e2e scenario 7: replica A publishes a lifecycle event; replica B receives it via the outbox; A receives its own exactly once (no double delivery). `pnpm e2e:multi-replica` now 7/7.
48
+
49
+ Deferred: scheduler startup restore/gating, Project Room realtime backplane, thread→replica streaming affinity.
50
+
51
+ - d4429f1: Project Room realtime across replicas via the durable outbox.
52
+
53
+ - `ProjectRoomEventBroker` gains `setBroadcastHook` + `ingestForeignEvent`; locally published events are mirrored to the outbox (topic `room-event`) and foreign ones are delivered to local subscribers without touching the local replay ring. A bounded, cross-replica `sourceKey` dedupe set (shared by local publish and foreign ingest) collapses the N-replica duplicate projections to one delivery.
54
+ - Gateway wires the broker hook → outbox and the poller → broker ingest; the multi-replica e2e scenario 8 proves a subscriber on replica B receives an event published on replica A.
55
+ - REST remains the authority; SSE carries low-latency invalidation. See ADR-160.
56
+
57
+ - 6080389: Scheduler exactly-once across replicas (claim-before-execute).
58
+
59
+ - `ScheduleStorage.claimScheduledRun(taskId)` atomically transitions `pending -> running` (Memory/Local/PostgreSQL implementations).
60
+ - `DefaultScheduleClient.executeTask` claims before running the handler, so a fire armed on multiple replicas executes only once (losers skip). Retry/CRON-rearm paths re-set `PENDING`, so later fires are claimable. See ADR-158.
61
+
62
+ - 7ecbd01: Recover scheduled tasks stuck `running` after a crash.
63
+
64
+ - `ScheduleStorage.requeueStaleRunning(olderThanMs)` requeues `running` tasks older than a threshold back to `pending` (Memory/Local/PostgreSQL).
65
+ - `DefaultScheduleClient.restore()` requeues stale `running` schedules (30-minute heuristic) before re-arming, so a CRON schedule is no longer permanently stalled by a crash that left an unsettled claim. See ADR-158.
66
+
67
+ - 5f3d14b: Multi-replica agent-run SSE affinity: clients send `x-axiom-affinity: <threadId>` on run/resume/abort, the gateway advertises `x-axiom-replica`, and a bounded safety net returns `AFFINITY_MISS` (error frame / `409`) when another replica is confirmed to own the thread — replacing silent empty/hung streams on a mis-route. Deliberately no auto-reload on stream end (ADR-026).
68
+
3
69
  ## 4.6.1
4
70
 
5
71
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -744,6 +744,22 @@ interface ScheduleStorage {
744
744
  * Update task
745
745
  */
746
746
  update(taskId: string, updates: Partial<ScheduledTaskDefinition>): Promise<void>;
747
+ /**
748
+ * Atomically claims one due fire by transitioning the task `pending -> running`.
749
+ *
750
+ * @param taskId Task to claim.
751
+ * @returns True when this caller won the claim (task was `pending`); false if
752
+ * another replica already claimed it or it is not pending.
753
+ */
754
+ claimScheduledRun(taskId: string): Promise<boolean>;
755
+ /**
756
+ * Requeues `running` tasks whose `updatedAt` is older than `olderThanMs` back
757
+ * to `pending` (recovery after a crash that left a claim unsettled).
758
+ *
759
+ * @param olderThanMs Age threshold in milliseconds.
760
+ * @returns The number of tasks requeued.
761
+ */
762
+ requeueStaleRunning(olderThanMs: number): Promise<number>;
747
763
  /**
748
764
  * Delete task
749
765
  */
@@ -2393,14 +2409,50 @@ interface ConnectionEntry {
2393
2409
  name: string;
2394
2410
  description?: string;
2395
2411
  config: Record<string, unknown>;
2412
+ /**
2413
+ * Names of config fields that hold secrets (API keys, passwords, tokens).
2414
+ *
2415
+ * Stores persist this list alongside the entry and use it to encrypt those
2416
+ * config values at rest on write and transparently decrypt them on read.
2417
+ * `config` in a returned entry is always the decrypted, real value — callers
2418
+ * (gateway API, runtime plugin resolution) never see ciphertext.
2419
+ *
2420
+ * Absent/empty means the entry has no encrypted fields (e.g. legacy rows or
2421
+ * connection types whose schema defines no password fields).
2422
+ */
2423
+ secretFields?: string[];
2396
2424
  createdAt: string;
2397
2425
  updatedAt: string;
2398
2426
  }
2399
2427
  interface ConnectionStore {
2400
2428
  listByTenant(tenantId: string): Promise<ConnectionEntry[]>;
2429
+ /**
2430
+ * List a tenant's connections of one plugin type.
2431
+ *
2432
+ * `config` in the returned entries is decrypted — implementations decrypt the
2433
+ * fields named by each entry's `secretFields` before returning.
2434
+ */
2401
2435
  listByType(tenantId: string, type: string): Promise<ConnectionEntry[]>;
2436
+ /**
2437
+ * Read one connection by key.
2438
+ *
2439
+ * `config` in the returned entry is decrypted (see `listByType`).
2440
+ */
2402
2441
  getByKey(tenantId: string, type: string, key: string): Promise<ConnectionEntry | null>;
2442
+ /**
2443
+ * Create a connection.
2444
+ *
2445
+ * Implementations encrypt the `secretFields` of `config` at rest; the
2446
+ * returned entry carries the plaintext `config` the caller supplied.
2447
+ */
2403
2448
  create(entry: Omit<ConnectionEntry, "id" | "createdAt" | "updatedAt">): Promise<ConnectionEntry>;
2449
+ /**
2450
+ * Update a connection.
2451
+ *
2452
+ * When `updates.config` is present, the effective secret fields are
2453
+ * `updates.secretFields ?? existing.secretFields`; those fields are
2454
+ * re-encrypted before persistence.
2455
+ */
2404
2456
  update(tenantId: string, type: string, key: string, updates: Partial<ConnectionEntry>): Promise<ConnectionEntry | null>;
2405
2457
  delete(tenantId: string, type: string, key: string): Promise<boolean>;
2406
2458
  }
@@ -6396,6 +6448,84 @@ interface UserPushSubscriptionStore {
6396
6448
  delete(tenantId: string, userId: string, endpoint: string): Promise<boolean>;
6397
6449
  }
6398
6450
 
6451
+ /** One held distributed lease. */
6452
+ interface LeaseRecord {
6453
+ /** Lease key (e.g. `task-run:<taskId>`); unique across replicas. */
6454
+ key: string;
6455
+ /** Replica (holder) currently owning the key. */
6456
+ holder: string;
6457
+ /** ISO timestamp the current holder acquired it. */
6458
+ acquiredAt: string;
6459
+ /** ISO timestamp after which the lease is considered free. */
6460
+ expiresAt: string;
6461
+ }
6462
+ /**
6463
+ * Cross-replica lease store used for mutual exclusion, run ownership, and
6464
+ * leader election. There is no Redis in this deployment: the reference
6465
+ * implementation is PostgreSQL-backed, but the contract is transport-neutral.
6466
+ *
6467
+ * @remarks
6468
+ * - `tryAcquire` is atomic: exactly one concurrent caller wins for a free or
6469
+ * expired key.
6470
+ * - Leases are advisory. A holder that stops heartbeating loses the key at
6471
+ * `expiresAt`; callers doing non-idempotent work MUST re-check ownership or
6472
+ * use CAS-protected writes.
6473
+ */
6474
+ interface LeaseStore {
6475
+ /**
6476
+ * Atomically acquires `key` for `holder` for `ttlMs` when the key is free or
6477
+ * its lease has expired (a holder may also re-acquire its own expired lease).
6478
+ * @returns `true` when `holder` owns the lease after the call.
6479
+ */
6480
+ tryAcquire(key: string, holder: string, ttlMs: number): Promise<boolean>;
6481
+ /**
6482
+ * Extends a lease already held by `holder`.
6483
+ * @returns `false` when the key is not held by `holder` (lost or taken).
6484
+ */
6485
+ renew(key: string, holder: string, ttlMs: number): Promise<boolean>;
6486
+ /**
6487
+ * Releases a lease held by `holder`.
6488
+ * @returns `true` when a lease held by `holder` was removed.
6489
+ */
6490
+ release(key: string, holder: string): Promise<boolean>;
6491
+ /** Reads the live lease for `key`, or `null` when free/expired/absent. */
6492
+ get(key: string): Promise<LeaseRecord | null>;
6493
+ }
6494
+
6495
+ /** One durable outbox event, totally ordered by `id`. */
6496
+ interface OutboxEvent {
6497
+ /** Monotonic id (an integer serialized as a string). */
6498
+ id: string;
6499
+ /** Logical channel, e.g. `task-lifecycle`. */
6500
+ topic: string;
6501
+ /** JSON-safe payload delivered to local listeners. */
6502
+ payload: unknown;
6503
+ /** Replica that authored the event (skipped by its own poller). */
6504
+ originReplicaId: string;
6505
+ /** ISO timestamp. */
6506
+ createdAt: string;
6507
+ }
6508
+ /** Append-only durable event log used to fan process-local notifications across replicas. */
6509
+ interface OutboxStore {
6510
+ /** Appends one event and returns it (with its assigned id). */
6511
+ append(input: {
6512
+ topic: string;
6513
+ payload: unknown;
6514
+ originReplicaId: string;
6515
+ }): Promise<OutboxEvent>;
6516
+ /** Returns up to `limit` events with `id > cursor` (ascending); `null` cursor = from the start. */
6517
+ listAfter(cursor: string | null, limit: number): Promise<OutboxEvent[]>;
6518
+ /** Returns the newest id, or null when empty (used to skip history on poller start). */
6519
+ latestId(): Promise<string | null>;
6520
+ /**
6521
+ * Deletes events older than `olderThanMs`.
6522
+ *
6523
+ * @param olderThanMs Age threshold in milliseconds.
6524
+ * @returns The number of rows deleted.
6525
+ */
6526
+ pruneOlderThan(olderThanMs: number): Promise<number>;
6527
+ }
6528
+
6399
6529
  /** A safely extracted value from an own enumerable data-property descriptor. */
6400
6530
  interface DescriptorDataValue {
6401
6531
  ok: true;
@@ -6568,7 +6698,7 @@ interface ProjectRoomEventSubscription {
6568
6698
  /** The narrow broker contract consumed by realtime publishers and services. */
6569
6699
  interface ProjectRoomEventBrokerProtocol {
6570
6700
  readonly epoch: string;
6571
- publish(scope: ProjectRoomEventScope, draft: ProjectRoomBusinessEventDraft): ProjectRoomScopedBusinessEvent;
6701
+ publish(scope: ProjectRoomEventScope, draft: ProjectRoomBusinessEventDraft, sourceKey?: string): ProjectRoomScopedBusinessEvent;
6572
6702
  subscribe(scope: ProjectRoomEventScope, afterEventId: string | undefined, listener: (event: ProjectRoomBusinessEvent) => void): ProjectRoomEventSubscription;
6573
6703
  close(): void;
6574
6704
  }
@@ -7382,4 +7512,31 @@ interface RunScope {
7382
7512
  */
7383
7513
  declare function resolveRunScope(runConfig: unknown): RunScope;
7384
7514
 
7385
- export { type A2AApiKeyEntry, type A2AApiKeyRecord, type A2AApiKeyStore, type A2AAuthContext, type A2ARemoteAgentConfig, type AgentClient, type AgentConfig, type AgentConfigWithTools, type AgentLatticeProtocol, type AgentMenuConfig, type AgentMiddlewareConfig, type AgentRunConfig, AgentType, type AgentWebApp, type AgentWebAppAppearance, type AgentWebAppBootstrap, type AgentWebAppCalloutWidget, type AgentWebAppError, type AgentWebAppErrorCode, type AgentWebAppFeatures, type AgentWebAppGenUIBlock, type AgentWebAppIdentityAssurance, type AgentWebAppIdentityConfig, type AgentWebAppIdentityPolicy, type AgentWebAppInterrupt, type AgentWebAppIssuerConfig, type AgentWebAppQuickPrompt, type AgentWebAppRuntimeMessage, type AgentWebAppRuntimeThread, type AgentWebAppScope, type AgentWebAppStatus, type AgentWebAppStore, type AgentWebAppStorePatch, type AgentWebAppStreamEvent, type AgentWebAppStreamProjectionContext, type AgentWebAppTableWidget, type AgentWebAppThreadMetadata, type AgentWebAppUpdateOptions, type Assistant, type AssistantMessage, type AssistantStore, type Attachment, type AvailableModule, type BaseLatticeProtocol, type BaseMessage, type Binding, type BindingListParams, type BindingMutablePatch, type BindingRegistry, type BootstrapFilesConfig, type BrowserMiddlewareConfig, type Callback, type CapabilityBundle, type CapabilityBundleDeleteResult, type CapabilityBundleStore, type CapabilityBundleUpdateConflict, type CapabilityFieldSource, type CapabilityOverride, type CapabilityPreview, type CapabilityPreviewIssue, type CapabilityRuntime, type ChannelAdapter, type ChannelBindingMigrationConflict, ChannelBindingMigrationConflictError, type ChannelInstallation, type ChannelInstallationStore, type ChannelInstallationType, type ClawMiddlewareConfig, type CodeEvalMiddlewareConfig, type Collection, type CollectionField, type CollectionFieldType, type CollectionMiddlewareConfig, type CollectionSchema, type CollectionStore, type ConnectionEntry, type ConnectionStore, type ConversationRecord, type CreateA2AApiKeyInput, type CreateAgentWebAppInput, type CreateAssistantRequest, type CreateBindingInput, type CreateCapabilityBundleInput, type CreateChannelInstallationInput, type CreateChannelInstallationRequest, type CreateCollectionRequest, type CreateConversationInput, type CreateDatabaseConfigRequest, type CreateEvalCaseRequest, type CreateEvalProjectRequest, type CreateEvalRunRequest, type CreateEvalSuiteRequest, type CreateMcpServerConfigRequest, type CreateMenuItemInput, type CreateMetricsServerConfigRequest, type CreateModelProviderRequest, type CreateProjectRequest, type CreateRunStepRequest, type CreateShareRequest, type CreateSkillRequest, type CreateTaskRequest, type CreateTenantRequest, type CreateThreadRequest, type CreateUserRequest, type CreateUserTenantLinkRequest, type CreateWorkItemIfAbsentRequest, type CreateWorkItemRequest, type CreateWorkflowRunRequest, type CreateWorkspaceRequest, type CustomMenuConfig, type DataSource, type DatabaseConfig, type DatabaseConfigEntry, type DatabaseConfigStore, type DatabaseType, type DeepAgentConfig, type DescriptorDataValue, type DeveloperMessage, type DiscoveredModel, type DispatchResult, DuplicateChannelBindingSubjectError, EXECUTION_RESULT_EVENT_KEY_PATTERN, EXECUTION_RESULT_EVENT_KEY_PATTERN_SOURCE, EXECUTION_RESULT_EVENT_KEY_PREFIX, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type EvalCase, type EvalProject, type EvalProjectReport, type EvalRun, type EvalRunResult, type EvalStore, type EvalSuite, type ExecuteSqlQueryRequest, type ExecuteSqlQueryResponse, type ExpectedCapabilityBundleRevisions, type FileMenuConfig, type FilterCondition, type GraphBuildOptions, type HtmlMenuConfig, type IConversationStore, type ID, type InboundMessage, type InternalAgentNode, type InternalBaseNode, type InternalCreateCapabilityBundleInput, type InternalDSL, type InternalEdge, type InternalInput, type InternalInputNode, type InternalMapNode, type InternalNode, type InternalNodeConfig, type InternalOutput, type InternalState, type InternalStateField, type InternalTerminalNode, type InternalUpdateCapabilityBundleInput, type InterruptMessage, type InterruptPolicy, InvalidProjectCapabilityBundleConfigError, type LLMConfig, type LarkChannelInstallationConfig, type LatticeError, type LatticeEventBus, type LatticeMessage, type LocalA2AProviderId, type LocalA2AProviderState, type LocalA2AProviderStatus, type LocalA2ATemplateDefinition, type LocalRuntimeConfig, type LoggerClient, type LoggerConfig, type LoggerContext, type LoggerLatticeProtocol, LoggerType, MAX_PENDING_EXECUTION_RESULTS_LIMIT, type McpAppMenuConfig, type McpClient, type McpClientOptions, type McpConnectionStatus, type McpLatticeMessage, type McpLatticeProtocol, McpMessageType, type McpServerConfig, type McpServerConfigEntry, type McpServerConfigStore, type McpStats, type McpTool, type McpToolResult, type McpTransportType, type McpUiCsp, type McpUiDisplayMode, type McpUiPermissions, type McpUiRef, type McpUiResourcePayload, type MemoryClient, type MemoryConfig, type MemoryLatticeProtocol, MemoryType, type MenuContentConfig, type MenuContentType, type MenuItem, type MenuRegistry, type MenuTarget, type Message, type MessageChunk, type MessageChunkType, MessageChunkTypes, type MessageContext, type MessageMiddleware, type MetricColumn, type MetricDataPoint, type MetricMeta, type MetricQueryResult, type MetricsMiddlewareConfig, type MetricsServerConfig, type MetricsServerConfigEntry, type MetricsServerConfigStore, type MetricsServerType, type MiddlewareType, type ModelDiscoveryResult, type ModelLatticeProtocol, type ModelProviderApiStyle, type ModelProviderEntry, type ModelProviderErrorCode, type ModelProviderLlmProvider, type ModelProviderModelEntry, type ModelProviderProbeRequest, type ModelProviderProbeResult, type ModelProviderPublicEntry, type ModelProviderStatus, type ModelProviderStore, type ModelProviderUpstreamErrorCode, type ModelProviderWireProtocol, type ModelSelection, type OpenAuditAppendInput, type OpenAuditQuery, type OpenAuditRecord, type OpenAuditStore, type OpenCapabilitySource, type OpenCatalog, type OpenCatalogDomain, type OpenCatalogItem, type OpenCredentialKind, type OpenExecutionContext, type OpenExecutionResult, type OpenGrant, type OutboundMessage, PROJECT_ROOM_TASK_DELEGATED_LABEL, PROJECT_ROOM_TASK_DELEGATED_SEPARATOR, PROJECT_ROOM_USER_CHANNEL_PROJECT, PROJECT_TASK_LIFECYCLE_ACTIONS, type PaginatedResult, type PaginationParams, type PinoFileOptions, type Plugin, type PluginConnection, type PluginConnectionFieldSchema, type PluginConnectionTestResult, type PluginContext, type PluginDiscoveredResource, type PluginMeta, type PluginMetaOutput, type PluginMiddlewareFactory, type PluginSkillDefinition, type PluginSkillResource, type PluginStandardConnectionConfig, type PluginToolMeta, type PluginToolUi, type PluginUiResource, type ProcessingAgentConfig, type Project, type ProjectBotMembership, type ProjectBotMembershipStatus, type ProjectBotMembershipStore, type ProjectBotRole, type ProjectCapabilityConfig, type ProjectFilter, type ProjectHumanRole, type ProjectKind, type ProjectLifecycleEventCursor, type ProjectLifecycleEventQuery, type ProjectMembership, type ProjectMembershipMutationResult, type ProjectMembershipStatus, type ProjectMembershipStore, type ProjectRoom, ProjectRoomBrokerCapacityError, type ProjectRoomBusinessEvent, type ProjectRoomBusinessEventDraft, type ProjectRoomControlEvent, ProjectRoomCursorError, type ProjectRoomEventBrokerProtocol, type ProjectRoomEventId, type ProjectRoomEventOf, type ProjectRoomEventScope, type ProjectRoomEventSubscription, type ProjectRoomMembershipAffectedEvent, type ProjectRoomMembershipChangedEvent, type ProjectRoomMention, type ProjectRoomMessage, type ProjectRoomMessageAuthor, type ProjectRoomMessageCreatedEvent, type ProjectRoomMessageCursor, type ProjectRoomMessageSource, type ProjectRoomMessageStore, type ProjectRoomPublicBotMembership, type ProjectRoomPublicMembership, type ProjectRoomPublicMessage, type ProjectRoomReadChangedEvent, type ProjectRoomReadState, type ProjectRoomReadStateStore, type ProjectRoomRealtimeActor, type ProjectRoomRosterChangedEvent, type ProjectRoomScopedBusinessEvent, type ProjectRoomSseWritable, type ProjectRoomStore, type ProjectRoomTaskChangedEvent, type ProjectRoomThreadMetadata, type ProjectRoomTrustedRunContext, type ProjectStore, type ProjectTaskLifecycleAction, ProjectTaskStoreUnsupportedError, type ProjectTaskThreadMetadata, type ProjectTaskTrustedRunContext, type ProjectTaskWorkItemStore, type ProviderModelInput, type PublicChannelInstallationType, type QueryParams, type QueryResultFormat, type QueryWorkflowRunsOptions, type QueryWorkflowRunsResult, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type QueuedExecutionMode, type ReactAgentConfig, type ReplyTarget, type ResourceAddress, type ResourceResolver, type Result, type RunScope, type RunStep, type STTClient, type STTConfig, type STTModelLatticeProtocol, type SandboxMiddlewareConfig, type SandboxPluginConnectionDef, type SandboxPluginDiagnostic, type SandboxPluginManifest, type SandboxPluginToolDef, type ScheduleClient, type ScheduleConfig, type ScheduleCronOptions, ScheduleExecutionType, type ScheduleLatticeProtocol, type ScheduleOnceOptions, type ScheduleStorage, ScheduleType, type ScheduledTaskDefinition, ScheduledTaskStatus, type SchedulerMiddlewareConfig, type SemanticMetricsFilter, type SemanticMetricsQueryRequest, type SemanticMetricsQueryResponse, type SemanticMetricsServerConfig, type ShareRecord, type ShareResult, type ShareVisibility, type SharedResourceStore, type Skill, type SkillClient, type SkillClientType, type SkillConfig, type SkillLatticeProtocol, type SkillStore, type SkillStoreContext, type SqlMiddlewareConfig, type StepStatus, type StepType, type StorageType, type SystemMessage, type TableQueryRequest, type TableQueryResponse, type TaskBeliefDiagnosticCode, type TaskBeliefEntry, type TaskBeliefParseFailure, type TaskBeliefParseResult, type TaskBeliefParseSuccess, type TaskBeliefState, type TaskDependentListQuery, type TaskFileRef, type TaskHandler, type TaskItem, type TaskListFilter, type TaskMutationSnapshot, type TaskStore, type TaskWorkItem, type TaskWorkItemListFilter, type TaskWorkItemStore, type TeamAgentConfig, type TeamTeammateConfig, type Tenant, type TenantModelCatalog, type TenantModelPublicEntry, type TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, type ThreadStore, type Timestamp, type ToolCall, type ToolCallUi, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type TopologyEdge, type TranscriptionResult, type TrustedRunContext, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UpdateA2AApiKeyInput, type UpdateAgentWebAppInput, type UpdateCapabilityBundleInput, type UpdateChannelInstallationRequest, type UpdateCollectionRequest, type UpdateDatabaseConfigRequest, type UpdateMcpServerConfigRequest, type UpdateMenuItemInput, type UpdateMetricsServerConfigRequest, type UpdateModelProviderRequest, type UpdateProjectCapabilityBundlesResult, type UpdateProjectRequest, type UpdateRunStepRequest, type UpdateTaskRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkflowRunRequest, type UpdateWorkspaceRequest, type User, type UserMessage, type UserPushSubscription, type UserPushSubscriptionStore, type UserStatus, type UserStore, type UserTenantLink, type UserTenantLinkStore, type UserTenantRole, type VectorStoreConfig, type VectorStoreCreateParams, type VectorStoreLatticeProtocol, type VectorStoreProvider, WORKSPACE_PUBLIC_ROOM_PROJECT_PREFIX, type WechatChannelInstallationConfig, type WorkflowAgentConfig, type WorkflowRun, type WorkflowRunStatus, type WorkflowTrackingStore, type Workspace, type WorkspaceStore, type YamlAgentStep, type YamlMapStep, type YamlParallelBlock, type YamlTopLevelStep, type YamlWorkflow, assertGenericProjectConfig, createAgentWebAppStreamProjectionContext, descriptorDataValue, effectiveGrants, firstNonEmptyString, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isMcpUiRef, isProcessingAgentConfig, isProjectRoomEventId, isTeamAgentConfig, isWorkflowAgentConfig, isWorkspacePublicRoomProjectId, normalizeTaskMetadataScalar, parseAgentWebAppGenUIBlock, parseMcpUiRef, parseModelKey, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, projectAgentWebAppChunk, projectRoomUserEventScope, replaceTaskBeliefState, requireProjectTaskWorkItemStore, resolveRunScope, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, taskBeliefStatesEqual, toModelKey, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
7515
+ /**
7516
+ * Request header carrying the per-thread affinity key (the thread id).
7517
+ *
7518
+ * A multi-replica ingress hashes this header (consistently) so every
7519
+ * execution-driving request for a thread lands on the replica that owns its
7520
+ * process-local chunk buffer. Inert when no affinity is configured.
7521
+ */
7522
+ declare const AGENT_AFFINITY_HEADER = "x-axiom-affinity";
7523
+ /** Response header advertising the replica (`getReplicaId()`) that served a request. */
7524
+ declare const REPLICA_HEADER = "x-axiom-replica";
7525
+ /** Response header echoing back the received `x-axiom-affinity` value (diagnostics). */
7526
+ declare const AFFINITY_ECHO_HEADER = "x-axiom-affinity-echo";
7527
+ /** Builds the echo response header from a request's raw affinity value, or `{}` when absent/empty. */
7528
+ declare function affinityEchoHeaders(value: string | string[] | undefined): Record<string, string>;
7529
+ /** Terminal error code emitted when a run is confirmed owned by another replica. */
7530
+ declare const AFFINITY_MISS_CODE = "AFFINITY_MISS";
7531
+ /**
7532
+ * Builds the request headers that pin a request to a thread's owner replica.
7533
+ * Returns an empty object when no thread id is available.
7534
+ */
7535
+ declare function threadAffinityHeaders(threadId: string | undefined): Record<string, string>;
7536
+ /**
7537
+ * One terminal error chunk telling the client the run is owned elsewhere.
7538
+ * Reuses the existing `error` chunk type; clients surface it via their error branch.
7539
+ */
7540
+ declare function buildAffinityMissChunk(owner: string, threadId: string): MessageChunk;
7541
+
7542
+ export { type A2AApiKeyEntry, type A2AApiKeyRecord, type A2AApiKeyStore, type A2AAuthContext, type A2ARemoteAgentConfig, AFFINITY_ECHO_HEADER, AFFINITY_MISS_CODE, AGENT_AFFINITY_HEADER, type AgentClient, type AgentConfig, type AgentConfigWithTools, type AgentLatticeProtocol, type AgentMenuConfig, type AgentMiddlewareConfig, type AgentRunConfig, AgentType, type AgentWebApp, type AgentWebAppAppearance, type AgentWebAppBootstrap, type AgentWebAppCalloutWidget, type AgentWebAppError, type AgentWebAppErrorCode, type AgentWebAppFeatures, type AgentWebAppGenUIBlock, type AgentWebAppIdentityAssurance, type AgentWebAppIdentityConfig, type AgentWebAppIdentityPolicy, type AgentWebAppInterrupt, type AgentWebAppIssuerConfig, type AgentWebAppQuickPrompt, type AgentWebAppRuntimeMessage, type AgentWebAppRuntimeThread, type AgentWebAppScope, type AgentWebAppStatus, type AgentWebAppStore, type AgentWebAppStorePatch, type AgentWebAppStreamEvent, type AgentWebAppStreamProjectionContext, type AgentWebAppTableWidget, type AgentWebAppThreadMetadata, type AgentWebAppUpdateOptions, type Assistant, type AssistantMessage, type AssistantStore, type Attachment, type AvailableModule, type BaseLatticeProtocol, type BaseMessage, type Binding, type BindingListParams, type BindingMutablePatch, type BindingRegistry, type BootstrapFilesConfig, type BrowserMiddlewareConfig, type Callback, type CapabilityBundle, type CapabilityBundleDeleteResult, type CapabilityBundleStore, type CapabilityBundleUpdateConflict, type CapabilityFieldSource, type CapabilityOverride, type CapabilityPreview, type CapabilityPreviewIssue, type CapabilityRuntime, type ChannelAdapter, type ChannelBindingMigrationConflict, ChannelBindingMigrationConflictError, type ChannelInstallation, type ChannelInstallationStore, type ChannelInstallationType, type ClawMiddlewareConfig, type CodeEvalMiddlewareConfig, type Collection, type CollectionField, type CollectionFieldType, type CollectionMiddlewareConfig, type CollectionSchema, type CollectionStore, type ConnectionEntry, type ConnectionStore, type ConversationRecord, type CreateA2AApiKeyInput, type CreateAgentWebAppInput, type CreateAssistantRequest, type CreateBindingInput, type CreateCapabilityBundleInput, type CreateChannelInstallationInput, type CreateChannelInstallationRequest, type CreateCollectionRequest, type CreateConversationInput, type CreateDatabaseConfigRequest, type CreateEvalCaseRequest, type CreateEvalProjectRequest, type CreateEvalRunRequest, type CreateEvalSuiteRequest, type CreateMcpServerConfigRequest, type CreateMenuItemInput, type CreateMetricsServerConfigRequest, type CreateModelProviderRequest, type CreateProjectRequest, type CreateRunStepRequest, type CreateShareRequest, type CreateSkillRequest, type CreateTaskRequest, type CreateTenantRequest, type CreateThreadRequest, type CreateUserRequest, type CreateUserTenantLinkRequest, type CreateWorkItemIfAbsentRequest, type CreateWorkItemRequest, type CreateWorkflowRunRequest, type CreateWorkspaceRequest, type CustomMenuConfig, type DataSource, type DatabaseConfig, type DatabaseConfigEntry, type DatabaseConfigStore, type DatabaseType, type DeepAgentConfig, type DescriptorDataValue, type DeveloperMessage, type DiscoveredModel, type DispatchResult, DuplicateChannelBindingSubjectError, EXECUTION_RESULT_EVENT_KEY_PATTERN, EXECUTION_RESULT_EVENT_KEY_PATTERN_SOURCE, EXECUTION_RESULT_EVENT_KEY_PREFIX, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type EvalCase, type EvalProject, type EvalProjectReport, type EvalRun, type EvalRunResult, type EvalStore, type EvalSuite, type ExecuteSqlQueryRequest, type ExecuteSqlQueryResponse, type ExpectedCapabilityBundleRevisions, type FileMenuConfig, type FilterCondition, type GraphBuildOptions, type HtmlMenuConfig, type IConversationStore, type ID, type InboundMessage, type InternalAgentNode, type InternalBaseNode, type InternalCreateCapabilityBundleInput, type InternalDSL, type InternalEdge, type InternalInput, type InternalInputNode, type InternalMapNode, type InternalNode, type InternalNodeConfig, type InternalOutput, type InternalState, type InternalStateField, type InternalTerminalNode, type InternalUpdateCapabilityBundleInput, type InterruptMessage, type InterruptPolicy, InvalidProjectCapabilityBundleConfigError, type LLMConfig, type LarkChannelInstallationConfig, type LatticeError, type LatticeEventBus, type LatticeMessage, type LeaseRecord, type LeaseStore, type LocalA2AProviderId, type LocalA2AProviderState, type LocalA2AProviderStatus, type LocalA2ATemplateDefinition, type LocalRuntimeConfig, type LoggerClient, type LoggerConfig, type LoggerContext, type LoggerLatticeProtocol, LoggerType, MAX_PENDING_EXECUTION_RESULTS_LIMIT, type McpAppMenuConfig, type McpClient, type McpClientOptions, type McpConnectionStatus, type McpLatticeMessage, type McpLatticeProtocol, McpMessageType, type McpServerConfig, type McpServerConfigEntry, type McpServerConfigStore, type McpStats, type McpTool, type McpToolResult, type McpTransportType, type McpUiCsp, type McpUiDisplayMode, type McpUiPermissions, type McpUiRef, type McpUiResourcePayload, type MemoryClient, type MemoryConfig, type MemoryLatticeProtocol, MemoryType, type MenuContentConfig, type MenuContentType, type MenuItem, type MenuRegistry, type MenuTarget, type Message, type MessageChunk, type MessageChunkType, MessageChunkTypes, type MessageContext, type MessageMiddleware, type MetricColumn, type MetricDataPoint, type MetricMeta, type MetricQueryResult, type MetricsMiddlewareConfig, type MetricsServerConfig, type MetricsServerConfigEntry, type MetricsServerConfigStore, type MetricsServerType, type MiddlewareType, type ModelDiscoveryResult, type ModelLatticeProtocol, type ModelProviderApiStyle, type ModelProviderEntry, type ModelProviderErrorCode, type ModelProviderLlmProvider, type ModelProviderModelEntry, type ModelProviderProbeRequest, type ModelProviderProbeResult, type ModelProviderPublicEntry, type ModelProviderStatus, type ModelProviderStore, type ModelProviderUpstreamErrorCode, type ModelProviderWireProtocol, type ModelSelection, type OpenAuditAppendInput, type OpenAuditQuery, type OpenAuditRecord, type OpenAuditStore, type OpenCapabilitySource, type OpenCatalog, type OpenCatalogDomain, type OpenCatalogItem, type OpenCredentialKind, type OpenExecutionContext, type OpenExecutionResult, type OpenGrant, type OutboundMessage, type OutboxEvent, type OutboxStore, PROJECT_ROOM_TASK_DELEGATED_LABEL, PROJECT_ROOM_TASK_DELEGATED_SEPARATOR, PROJECT_ROOM_USER_CHANNEL_PROJECT, PROJECT_TASK_LIFECYCLE_ACTIONS, type PaginatedResult, type PaginationParams, type PinoFileOptions, type Plugin, type PluginConnection, type PluginConnectionFieldSchema, type PluginConnectionTestResult, type PluginContext, type PluginDiscoveredResource, type PluginMeta, type PluginMetaOutput, type PluginMiddlewareFactory, type PluginSkillDefinition, type PluginSkillResource, type PluginStandardConnectionConfig, type PluginToolMeta, type PluginToolUi, type PluginUiResource, type ProcessingAgentConfig, type Project, type ProjectBotMembership, type ProjectBotMembershipStatus, type ProjectBotMembershipStore, type ProjectBotRole, type ProjectCapabilityConfig, type ProjectFilter, type ProjectHumanRole, type ProjectKind, type ProjectLifecycleEventCursor, type ProjectLifecycleEventQuery, type ProjectMembership, type ProjectMembershipMutationResult, type ProjectMembershipStatus, type ProjectMembershipStore, type ProjectRoom, ProjectRoomBrokerCapacityError, type ProjectRoomBusinessEvent, type ProjectRoomBusinessEventDraft, type ProjectRoomControlEvent, ProjectRoomCursorError, type ProjectRoomEventBrokerProtocol, type ProjectRoomEventId, type ProjectRoomEventOf, type ProjectRoomEventScope, type ProjectRoomEventSubscription, type ProjectRoomMembershipAffectedEvent, type ProjectRoomMembershipChangedEvent, type ProjectRoomMention, type ProjectRoomMessage, type ProjectRoomMessageAuthor, type ProjectRoomMessageCreatedEvent, type ProjectRoomMessageCursor, type ProjectRoomMessageSource, type ProjectRoomMessageStore, type ProjectRoomPublicBotMembership, type ProjectRoomPublicMembership, type ProjectRoomPublicMessage, type ProjectRoomReadChangedEvent, type ProjectRoomReadState, type ProjectRoomReadStateStore, type ProjectRoomRealtimeActor, type ProjectRoomRosterChangedEvent, type ProjectRoomScopedBusinessEvent, type ProjectRoomSseWritable, type ProjectRoomStore, type ProjectRoomTaskChangedEvent, type ProjectRoomThreadMetadata, type ProjectRoomTrustedRunContext, type ProjectStore, type ProjectTaskLifecycleAction, ProjectTaskStoreUnsupportedError, type ProjectTaskThreadMetadata, type ProjectTaskTrustedRunContext, type ProjectTaskWorkItemStore, type ProviderModelInput, type PublicChannelInstallationType, type QueryParams, type QueryResultFormat, type QueryWorkflowRunsOptions, type QueryWorkflowRunsResult, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type QueuedExecutionMode, REPLICA_HEADER, type ReactAgentConfig, type ReplyTarget, type ResourceAddress, type ResourceResolver, type Result, type RunScope, type RunStep, type STTClient, type STTConfig, type STTModelLatticeProtocol, type SandboxMiddlewareConfig, type SandboxPluginConnectionDef, type SandboxPluginDiagnostic, type SandboxPluginManifest, type SandboxPluginToolDef, type ScheduleClient, type ScheduleConfig, type ScheduleCronOptions, ScheduleExecutionType, type ScheduleLatticeProtocol, type ScheduleOnceOptions, type ScheduleStorage, ScheduleType, type ScheduledTaskDefinition, ScheduledTaskStatus, type SchedulerMiddlewareConfig, type SemanticMetricsFilter, type SemanticMetricsQueryRequest, type SemanticMetricsQueryResponse, type SemanticMetricsServerConfig, type ShareRecord, type ShareResult, type ShareVisibility, type SharedResourceStore, type Skill, type SkillClient, type SkillClientType, type SkillConfig, type SkillLatticeProtocol, type SkillStore, type SkillStoreContext, type SqlMiddlewareConfig, type StepStatus, type StepType, type StorageType, type SystemMessage, type TableQueryRequest, type TableQueryResponse, type TaskBeliefDiagnosticCode, type TaskBeliefEntry, type TaskBeliefParseFailure, type TaskBeliefParseResult, type TaskBeliefParseSuccess, type TaskBeliefState, type TaskDependentListQuery, type TaskFileRef, type TaskHandler, type TaskItem, type TaskListFilter, type TaskMutationSnapshot, type TaskStore, type TaskWorkItem, type TaskWorkItemListFilter, type TaskWorkItemStore, type TeamAgentConfig, type TeamTeammateConfig, type Tenant, type TenantModelCatalog, type TenantModelPublicEntry, type TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, type ThreadStore, type Timestamp, type ToolCall, type ToolCallUi, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type TopologyEdge, type TranscriptionResult, type TrustedRunContext, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UpdateA2AApiKeyInput, type UpdateAgentWebAppInput, type UpdateCapabilityBundleInput, type UpdateChannelInstallationRequest, type UpdateCollectionRequest, type UpdateDatabaseConfigRequest, type UpdateMcpServerConfigRequest, type UpdateMenuItemInput, type UpdateMetricsServerConfigRequest, type UpdateModelProviderRequest, type UpdateProjectCapabilityBundlesResult, type UpdateProjectRequest, type UpdateRunStepRequest, type UpdateTaskRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkflowRunRequest, type UpdateWorkspaceRequest, type User, type UserMessage, type UserPushSubscription, type UserPushSubscriptionStore, type UserStatus, type UserStore, type UserTenantLink, type UserTenantLinkStore, type UserTenantRole, type VectorStoreConfig, type VectorStoreCreateParams, type VectorStoreLatticeProtocol, type VectorStoreProvider, WORKSPACE_PUBLIC_ROOM_PROJECT_PREFIX, type WechatChannelInstallationConfig, type WorkflowAgentConfig, type WorkflowRun, type WorkflowRunStatus, type WorkflowTrackingStore, type Workspace, type WorkspaceStore, type YamlAgentStep, type YamlMapStep, type YamlParallelBlock, type YamlTopLevelStep, type YamlWorkflow, affinityEchoHeaders, assertGenericProjectConfig, buildAffinityMissChunk, createAgentWebAppStreamProjectionContext, descriptorDataValue, effectiveGrants, firstNonEmptyString, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isMcpUiRef, isProcessingAgentConfig, isProjectRoomEventId, isTeamAgentConfig, isWorkflowAgentConfig, isWorkspacePublicRoomProjectId, normalizeTaskMetadataScalar, parseAgentWebAppGenUIBlock, parseMcpUiRef, parseModelKey, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, projectAgentWebAppChunk, projectRoomUserEventScope, replaceTaskBeliefState, requireProjectTaskWorkItemStore, resolveRunScope, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, taskBeliefStatesEqual, threadAffinityHeaders, toModelKey, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
package/dist/index.d.ts CHANGED
@@ -744,6 +744,22 @@ interface ScheduleStorage {
744
744
  * Update task
745
745
  */
746
746
  update(taskId: string, updates: Partial<ScheduledTaskDefinition>): Promise<void>;
747
+ /**
748
+ * Atomically claims one due fire by transitioning the task `pending -> running`.
749
+ *
750
+ * @param taskId Task to claim.
751
+ * @returns True when this caller won the claim (task was `pending`); false if
752
+ * another replica already claimed it or it is not pending.
753
+ */
754
+ claimScheduledRun(taskId: string): Promise<boolean>;
755
+ /**
756
+ * Requeues `running` tasks whose `updatedAt` is older than `olderThanMs` back
757
+ * to `pending` (recovery after a crash that left a claim unsettled).
758
+ *
759
+ * @param olderThanMs Age threshold in milliseconds.
760
+ * @returns The number of tasks requeued.
761
+ */
762
+ requeueStaleRunning(olderThanMs: number): Promise<number>;
747
763
  /**
748
764
  * Delete task
749
765
  */
@@ -2393,14 +2409,50 @@ interface ConnectionEntry {
2393
2409
  name: string;
2394
2410
  description?: string;
2395
2411
  config: Record<string, unknown>;
2412
+ /**
2413
+ * Names of config fields that hold secrets (API keys, passwords, tokens).
2414
+ *
2415
+ * Stores persist this list alongside the entry and use it to encrypt those
2416
+ * config values at rest on write and transparently decrypt them on read.
2417
+ * `config` in a returned entry is always the decrypted, real value — callers
2418
+ * (gateway API, runtime plugin resolution) never see ciphertext.
2419
+ *
2420
+ * Absent/empty means the entry has no encrypted fields (e.g. legacy rows or
2421
+ * connection types whose schema defines no password fields).
2422
+ */
2423
+ secretFields?: string[];
2396
2424
  createdAt: string;
2397
2425
  updatedAt: string;
2398
2426
  }
2399
2427
  interface ConnectionStore {
2400
2428
  listByTenant(tenantId: string): Promise<ConnectionEntry[]>;
2429
+ /**
2430
+ * List a tenant's connections of one plugin type.
2431
+ *
2432
+ * `config` in the returned entries is decrypted — implementations decrypt the
2433
+ * fields named by each entry's `secretFields` before returning.
2434
+ */
2401
2435
  listByType(tenantId: string, type: string): Promise<ConnectionEntry[]>;
2436
+ /**
2437
+ * Read one connection by key.
2438
+ *
2439
+ * `config` in the returned entry is decrypted (see `listByType`).
2440
+ */
2402
2441
  getByKey(tenantId: string, type: string, key: string): Promise<ConnectionEntry | null>;
2442
+ /**
2443
+ * Create a connection.
2444
+ *
2445
+ * Implementations encrypt the `secretFields` of `config` at rest; the
2446
+ * returned entry carries the plaintext `config` the caller supplied.
2447
+ */
2403
2448
  create(entry: Omit<ConnectionEntry, "id" | "createdAt" | "updatedAt">): Promise<ConnectionEntry>;
2449
+ /**
2450
+ * Update a connection.
2451
+ *
2452
+ * When `updates.config` is present, the effective secret fields are
2453
+ * `updates.secretFields ?? existing.secretFields`; those fields are
2454
+ * re-encrypted before persistence.
2455
+ */
2404
2456
  update(tenantId: string, type: string, key: string, updates: Partial<ConnectionEntry>): Promise<ConnectionEntry | null>;
2405
2457
  delete(tenantId: string, type: string, key: string): Promise<boolean>;
2406
2458
  }
@@ -6396,6 +6448,84 @@ interface UserPushSubscriptionStore {
6396
6448
  delete(tenantId: string, userId: string, endpoint: string): Promise<boolean>;
6397
6449
  }
6398
6450
 
6451
+ /** One held distributed lease. */
6452
+ interface LeaseRecord {
6453
+ /** Lease key (e.g. `task-run:<taskId>`); unique across replicas. */
6454
+ key: string;
6455
+ /** Replica (holder) currently owning the key. */
6456
+ holder: string;
6457
+ /** ISO timestamp the current holder acquired it. */
6458
+ acquiredAt: string;
6459
+ /** ISO timestamp after which the lease is considered free. */
6460
+ expiresAt: string;
6461
+ }
6462
+ /**
6463
+ * Cross-replica lease store used for mutual exclusion, run ownership, and
6464
+ * leader election. There is no Redis in this deployment: the reference
6465
+ * implementation is PostgreSQL-backed, but the contract is transport-neutral.
6466
+ *
6467
+ * @remarks
6468
+ * - `tryAcquire` is atomic: exactly one concurrent caller wins for a free or
6469
+ * expired key.
6470
+ * - Leases are advisory. A holder that stops heartbeating loses the key at
6471
+ * `expiresAt`; callers doing non-idempotent work MUST re-check ownership or
6472
+ * use CAS-protected writes.
6473
+ */
6474
+ interface LeaseStore {
6475
+ /**
6476
+ * Atomically acquires `key` for `holder` for `ttlMs` when the key is free or
6477
+ * its lease has expired (a holder may also re-acquire its own expired lease).
6478
+ * @returns `true` when `holder` owns the lease after the call.
6479
+ */
6480
+ tryAcquire(key: string, holder: string, ttlMs: number): Promise<boolean>;
6481
+ /**
6482
+ * Extends a lease already held by `holder`.
6483
+ * @returns `false` when the key is not held by `holder` (lost or taken).
6484
+ */
6485
+ renew(key: string, holder: string, ttlMs: number): Promise<boolean>;
6486
+ /**
6487
+ * Releases a lease held by `holder`.
6488
+ * @returns `true` when a lease held by `holder` was removed.
6489
+ */
6490
+ release(key: string, holder: string): Promise<boolean>;
6491
+ /** Reads the live lease for `key`, or `null` when free/expired/absent. */
6492
+ get(key: string): Promise<LeaseRecord | null>;
6493
+ }
6494
+
6495
+ /** One durable outbox event, totally ordered by `id`. */
6496
+ interface OutboxEvent {
6497
+ /** Monotonic id (an integer serialized as a string). */
6498
+ id: string;
6499
+ /** Logical channel, e.g. `task-lifecycle`. */
6500
+ topic: string;
6501
+ /** JSON-safe payload delivered to local listeners. */
6502
+ payload: unknown;
6503
+ /** Replica that authored the event (skipped by its own poller). */
6504
+ originReplicaId: string;
6505
+ /** ISO timestamp. */
6506
+ createdAt: string;
6507
+ }
6508
+ /** Append-only durable event log used to fan process-local notifications across replicas. */
6509
+ interface OutboxStore {
6510
+ /** Appends one event and returns it (with its assigned id). */
6511
+ append(input: {
6512
+ topic: string;
6513
+ payload: unknown;
6514
+ originReplicaId: string;
6515
+ }): Promise<OutboxEvent>;
6516
+ /** Returns up to `limit` events with `id > cursor` (ascending); `null` cursor = from the start. */
6517
+ listAfter(cursor: string | null, limit: number): Promise<OutboxEvent[]>;
6518
+ /** Returns the newest id, or null when empty (used to skip history on poller start). */
6519
+ latestId(): Promise<string | null>;
6520
+ /**
6521
+ * Deletes events older than `olderThanMs`.
6522
+ *
6523
+ * @param olderThanMs Age threshold in milliseconds.
6524
+ * @returns The number of rows deleted.
6525
+ */
6526
+ pruneOlderThan(olderThanMs: number): Promise<number>;
6527
+ }
6528
+
6399
6529
  /** A safely extracted value from an own enumerable data-property descriptor. */
6400
6530
  interface DescriptorDataValue {
6401
6531
  ok: true;
@@ -6568,7 +6698,7 @@ interface ProjectRoomEventSubscription {
6568
6698
  /** The narrow broker contract consumed by realtime publishers and services. */
6569
6699
  interface ProjectRoomEventBrokerProtocol {
6570
6700
  readonly epoch: string;
6571
- publish(scope: ProjectRoomEventScope, draft: ProjectRoomBusinessEventDraft): ProjectRoomScopedBusinessEvent;
6701
+ publish(scope: ProjectRoomEventScope, draft: ProjectRoomBusinessEventDraft, sourceKey?: string): ProjectRoomScopedBusinessEvent;
6572
6702
  subscribe(scope: ProjectRoomEventScope, afterEventId: string | undefined, listener: (event: ProjectRoomBusinessEvent) => void): ProjectRoomEventSubscription;
6573
6703
  close(): void;
6574
6704
  }
@@ -7382,4 +7512,31 @@ interface RunScope {
7382
7512
  */
7383
7513
  declare function resolveRunScope(runConfig: unknown): RunScope;
7384
7514
 
7385
- export { type A2AApiKeyEntry, type A2AApiKeyRecord, type A2AApiKeyStore, type A2AAuthContext, type A2ARemoteAgentConfig, type AgentClient, type AgentConfig, type AgentConfigWithTools, type AgentLatticeProtocol, type AgentMenuConfig, type AgentMiddlewareConfig, type AgentRunConfig, AgentType, type AgentWebApp, type AgentWebAppAppearance, type AgentWebAppBootstrap, type AgentWebAppCalloutWidget, type AgentWebAppError, type AgentWebAppErrorCode, type AgentWebAppFeatures, type AgentWebAppGenUIBlock, type AgentWebAppIdentityAssurance, type AgentWebAppIdentityConfig, type AgentWebAppIdentityPolicy, type AgentWebAppInterrupt, type AgentWebAppIssuerConfig, type AgentWebAppQuickPrompt, type AgentWebAppRuntimeMessage, type AgentWebAppRuntimeThread, type AgentWebAppScope, type AgentWebAppStatus, type AgentWebAppStore, type AgentWebAppStorePatch, type AgentWebAppStreamEvent, type AgentWebAppStreamProjectionContext, type AgentWebAppTableWidget, type AgentWebAppThreadMetadata, type AgentWebAppUpdateOptions, type Assistant, type AssistantMessage, type AssistantStore, type Attachment, type AvailableModule, type BaseLatticeProtocol, type BaseMessage, type Binding, type BindingListParams, type BindingMutablePatch, type BindingRegistry, type BootstrapFilesConfig, type BrowserMiddlewareConfig, type Callback, type CapabilityBundle, type CapabilityBundleDeleteResult, type CapabilityBundleStore, type CapabilityBundleUpdateConflict, type CapabilityFieldSource, type CapabilityOverride, type CapabilityPreview, type CapabilityPreviewIssue, type CapabilityRuntime, type ChannelAdapter, type ChannelBindingMigrationConflict, ChannelBindingMigrationConflictError, type ChannelInstallation, type ChannelInstallationStore, type ChannelInstallationType, type ClawMiddlewareConfig, type CodeEvalMiddlewareConfig, type Collection, type CollectionField, type CollectionFieldType, type CollectionMiddlewareConfig, type CollectionSchema, type CollectionStore, type ConnectionEntry, type ConnectionStore, type ConversationRecord, type CreateA2AApiKeyInput, type CreateAgentWebAppInput, type CreateAssistantRequest, type CreateBindingInput, type CreateCapabilityBundleInput, type CreateChannelInstallationInput, type CreateChannelInstallationRequest, type CreateCollectionRequest, type CreateConversationInput, type CreateDatabaseConfigRequest, type CreateEvalCaseRequest, type CreateEvalProjectRequest, type CreateEvalRunRequest, type CreateEvalSuiteRequest, type CreateMcpServerConfigRequest, type CreateMenuItemInput, type CreateMetricsServerConfigRequest, type CreateModelProviderRequest, type CreateProjectRequest, type CreateRunStepRequest, type CreateShareRequest, type CreateSkillRequest, type CreateTaskRequest, type CreateTenantRequest, type CreateThreadRequest, type CreateUserRequest, type CreateUserTenantLinkRequest, type CreateWorkItemIfAbsentRequest, type CreateWorkItemRequest, type CreateWorkflowRunRequest, type CreateWorkspaceRequest, type CustomMenuConfig, type DataSource, type DatabaseConfig, type DatabaseConfigEntry, type DatabaseConfigStore, type DatabaseType, type DeepAgentConfig, type DescriptorDataValue, type DeveloperMessage, type DiscoveredModel, type DispatchResult, DuplicateChannelBindingSubjectError, EXECUTION_RESULT_EVENT_KEY_PATTERN, EXECUTION_RESULT_EVENT_KEY_PATTERN_SOURCE, EXECUTION_RESULT_EVENT_KEY_PREFIX, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type EvalCase, type EvalProject, type EvalProjectReport, type EvalRun, type EvalRunResult, type EvalStore, type EvalSuite, type ExecuteSqlQueryRequest, type ExecuteSqlQueryResponse, type ExpectedCapabilityBundleRevisions, type FileMenuConfig, type FilterCondition, type GraphBuildOptions, type HtmlMenuConfig, type IConversationStore, type ID, type InboundMessage, type InternalAgentNode, type InternalBaseNode, type InternalCreateCapabilityBundleInput, type InternalDSL, type InternalEdge, type InternalInput, type InternalInputNode, type InternalMapNode, type InternalNode, type InternalNodeConfig, type InternalOutput, type InternalState, type InternalStateField, type InternalTerminalNode, type InternalUpdateCapabilityBundleInput, type InterruptMessage, type InterruptPolicy, InvalidProjectCapabilityBundleConfigError, type LLMConfig, type LarkChannelInstallationConfig, type LatticeError, type LatticeEventBus, type LatticeMessage, type LocalA2AProviderId, type LocalA2AProviderState, type LocalA2AProviderStatus, type LocalA2ATemplateDefinition, type LocalRuntimeConfig, type LoggerClient, type LoggerConfig, type LoggerContext, type LoggerLatticeProtocol, LoggerType, MAX_PENDING_EXECUTION_RESULTS_LIMIT, type McpAppMenuConfig, type McpClient, type McpClientOptions, type McpConnectionStatus, type McpLatticeMessage, type McpLatticeProtocol, McpMessageType, type McpServerConfig, type McpServerConfigEntry, type McpServerConfigStore, type McpStats, type McpTool, type McpToolResult, type McpTransportType, type McpUiCsp, type McpUiDisplayMode, type McpUiPermissions, type McpUiRef, type McpUiResourcePayload, type MemoryClient, type MemoryConfig, type MemoryLatticeProtocol, MemoryType, type MenuContentConfig, type MenuContentType, type MenuItem, type MenuRegistry, type MenuTarget, type Message, type MessageChunk, type MessageChunkType, MessageChunkTypes, type MessageContext, type MessageMiddleware, type MetricColumn, type MetricDataPoint, type MetricMeta, type MetricQueryResult, type MetricsMiddlewareConfig, type MetricsServerConfig, type MetricsServerConfigEntry, type MetricsServerConfigStore, type MetricsServerType, type MiddlewareType, type ModelDiscoveryResult, type ModelLatticeProtocol, type ModelProviderApiStyle, type ModelProviderEntry, type ModelProviderErrorCode, type ModelProviderLlmProvider, type ModelProviderModelEntry, type ModelProviderProbeRequest, type ModelProviderProbeResult, type ModelProviderPublicEntry, type ModelProviderStatus, type ModelProviderStore, type ModelProviderUpstreamErrorCode, type ModelProviderWireProtocol, type ModelSelection, type OpenAuditAppendInput, type OpenAuditQuery, type OpenAuditRecord, type OpenAuditStore, type OpenCapabilitySource, type OpenCatalog, type OpenCatalogDomain, type OpenCatalogItem, type OpenCredentialKind, type OpenExecutionContext, type OpenExecutionResult, type OpenGrant, type OutboundMessage, PROJECT_ROOM_TASK_DELEGATED_LABEL, PROJECT_ROOM_TASK_DELEGATED_SEPARATOR, PROJECT_ROOM_USER_CHANNEL_PROJECT, PROJECT_TASK_LIFECYCLE_ACTIONS, type PaginatedResult, type PaginationParams, type PinoFileOptions, type Plugin, type PluginConnection, type PluginConnectionFieldSchema, type PluginConnectionTestResult, type PluginContext, type PluginDiscoveredResource, type PluginMeta, type PluginMetaOutput, type PluginMiddlewareFactory, type PluginSkillDefinition, type PluginSkillResource, type PluginStandardConnectionConfig, type PluginToolMeta, type PluginToolUi, type PluginUiResource, type ProcessingAgentConfig, type Project, type ProjectBotMembership, type ProjectBotMembershipStatus, type ProjectBotMembershipStore, type ProjectBotRole, type ProjectCapabilityConfig, type ProjectFilter, type ProjectHumanRole, type ProjectKind, type ProjectLifecycleEventCursor, type ProjectLifecycleEventQuery, type ProjectMembership, type ProjectMembershipMutationResult, type ProjectMembershipStatus, type ProjectMembershipStore, type ProjectRoom, ProjectRoomBrokerCapacityError, type ProjectRoomBusinessEvent, type ProjectRoomBusinessEventDraft, type ProjectRoomControlEvent, ProjectRoomCursorError, type ProjectRoomEventBrokerProtocol, type ProjectRoomEventId, type ProjectRoomEventOf, type ProjectRoomEventScope, type ProjectRoomEventSubscription, type ProjectRoomMembershipAffectedEvent, type ProjectRoomMembershipChangedEvent, type ProjectRoomMention, type ProjectRoomMessage, type ProjectRoomMessageAuthor, type ProjectRoomMessageCreatedEvent, type ProjectRoomMessageCursor, type ProjectRoomMessageSource, type ProjectRoomMessageStore, type ProjectRoomPublicBotMembership, type ProjectRoomPublicMembership, type ProjectRoomPublicMessage, type ProjectRoomReadChangedEvent, type ProjectRoomReadState, type ProjectRoomReadStateStore, type ProjectRoomRealtimeActor, type ProjectRoomRosterChangedEvent, type ProjectRoomScopedBusinessEvent, type ProjectRoomSseWritable, type ProjectRoomStore, type ProjectRoomTaskChangedEvent, type ProjectRoomThreadMetadata, type ProjectRoomTrustedRunContext, type ProjectStore, type ProjectTaskLifecycleAction, ProjectTaskStoreUnsupportedError, type ProjectTaskThreadMetadata, type ProjectTaskTrustedRunContext, type ProjectTaskWorkItemStore, type ProviderModelInput, type PublicChannelInstallationType, type QueryParams, type QueryResultFormat, type QueryWorkflowRunsOptions, type QueryWorkflowRunsResult, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type QueuedExecutionMode, type ReactAgentConfig, type ReplyTarget, type ResourceAddress, type ResourceResolver, type Result, type RunScope, type RunStep, type STTClient, type STTConfig, type STTModelLatticeProtocol, type SandboxMiddlewareConfig, type SandboxPluginConnectionDef, type SandboxPluginDiagnostic, type SandboxPluginManifest, type SandboxPluginToolDef, type ScheduleClient, type ScheduleConfig, type ScheduleCronOptions, ScheduleExecutionType, type ScheduleLatticeProtocol, type ScheduleOnceOptions, type ScheduleStorage, ScheduleType, type ScheduledTaskDefinition, ScheduledTaskStatus, type SchedulerMiddlewareConfig, type SemanticMetricsFilter, type SemanticMetricsQueryRequest, type SemanticMetricsQueryResponse, type SemanticMetricsServerConfig, type ShareRecord, type ShareResult, type ShareVisibility, type SharedResourceStore, type Skill, type SkillClient, type SkillClientType, type SkillConfig, type SkillLatticeProtocol, type SkillStore, type SkillStoreContext, type SqlMiddlewareConfig, type StepStatus, type StepType, type StorageType, type SystemMessage, type TableQueryRequest, type TableQueryResponse, type TaskBeliefDiagnosticCode, type TaskBeliefEntry, type TaskBeliefParseFailure, type TaskBeliefParseResult, type TaskBeliefParseSuccess, type TaskBeliefState, type TaskDependentListQuery, type TaskFileRef, type TaskHandler, type TaskItem, type TaskListFilter, type TaskMutationSnapshot, type TaskStore, type TaskWorkItem, type TaskWorkItemListFilter, type TaskWorkItemStore, type TeamAgentConfig, type TeamTeammateConfig, type Tenant, type TenantModelCatalog, type TenantModelPublicEntry, type TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, type ThreadStore, type Timestamp, type ToolCall, type ToolCallUi, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type TopologyEdge, type TranscriptionResult, type TrustedRunContext, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UpdateA2AApiKeyInput, type UpdateAgentWebAppInput, type UpdateCapabilityBundleInput, type UpdateChannelInstallationRequest, type UpdateCollectionRequest, type UpdateDatabaseConfigRequest, type UpdateMcpServerConfigRequest, type UpdateMenuItemInput, type UpdateMetricsServerConfigRequest, type UpdateModelProviderRequest, type UpdateProjectCapabilityBundlesResult, type UpdateProjectRequest, type UpdateRunStepRequest, type UpdateTaskRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkflowRunRequest, type UpdateWorkspaceRequest, type User, type UserMessage, type UserPushSubscription, type UserPushSubscriptionStore, type UserStatus, type UserStore, type UserTenantLink, type UserTenantLinkStore, type UserTenantRole, type VectorStoreConfig, type VectorStoreCreateParams, type VectorStoreLatticeProtocol, type VectorStoreProvider, WORKSPACE_PUBLIC_ROOM_PROJECT_PREFIX, type WechatChannelInstallationConfig, type WorkflowAgentConfig, type WorkflowRun, type WorkflowRunStatus, type WorkflowTrackingStore, type Workspace, type WorkspaceStore, type YamlAgentStep, type YamlMapStep, type YamlParallelBlock, type YamlTopLevelStep, type YamlWorkflow, assertGenericProjectConfig, createAgentWebAppStreamProjectionContext, descriptorDataValue, effectiveGrants, firstNonEmptyString, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isMcpUiRef, isProcessingAgentConfig, isProjectRoomEventId, isTeamAgentConfig, isWorkflowAgentConfig, isWorkspacePublicRoomProjectId, normalizeTaskMetadataScalar, parseAgentWebAppGenUIBlock, parseMcpUiRef, parseModelKey, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, projectAgentWebAppChunk, projectRoomUserEventScope, replaceTaskBeliefState, requireProjectTaskWorkItemStore, resolveRunScope, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, taskBeliefStatesEqual, toModelKey, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
7515
+ /**
7516
+ * Request header carrying the per-thread affinity key (the thread id).
7517
+ *
7518
+ * A multi-replica ingress hashes this header (consistently) so every
7519
+ * execution-driving request for a thread lands on the replica that owns its
7520
+ * process-local chunk buffer. Inert when no affinity is configured.
7521
+ */
7522
+ declare const AGENT_AFFINITY_HEADER = "x-axiom-affinity";
7523
+ /** Response header advertising the replica (`getReplicaId()`) that served a request. */
7524
+ declare const REPLICA_HEADER = "x-axiom-replica";
7525
+ /** Response header echoing back the received `x-axiom-affinity` value (diagnostics). */
7526
+ declare const AFFINITY_ECHO_HEADER = "x-axiom-affinity-echo";
7527
+ /** Builds the echo response header from a request's raw affinity value, or `{}` when absent/empty. */
7528
+ declare function affinityEchoHeaders(value: string | string[] | undefined): Record<string, string>;
7529
+ /** Terminal error code emitted when a run is confirmed owned by another replica. */
7530
+ declare const AFFINITY_MISS_CODE = "AFFINITY_MISS";
7531
+ /**
7532
+ * Builds the request headers that pin a request to a thread's owner replica.
7533
+ * Returns an empty object when no thread id is available.
7534
+ */
7535
+ declare function threadAffinityHeaders(threadId: string | undefined): Record<string, string>;
7536
+ /**
7537
+ * One terminal error chunk telling the client the run is owned elsewhere.
7538
+ * Reuses the existing `error` chunk type; clients surface it via their error branch.
7539
+ */
7540
+ declare function buildAffinityMissChunk(owner: string, threadId: string): MessageChunk;
7541
+
7542
+ export { type A2AApiKeyEntry, type A2AApiKeyRecord, type A2AApiKeyStore, type A2AAuthContext, type A2ARemoteAgentConfig, AFFINITY_ECHO_HEADER, AFFINITY_MISS_CODE, AGENT_AFFINITY_HEADER, type AgentClient, type AgentConfig, type AgentConfigWithTools, type AgentLatticeProtocol, type AgentMenuConfig, type AgentMiddlewareConfig, type AgentRunConfig, AgentType, type AgentWebApp, type AgentWebAppAppearance, type AgentWebAppBootstrap, type AgentWebAppCalloutWidget, type AgentWebAppError, type AgentWebAppErrorCode, type AgentWebAppFeatures, type AgentWebAppGenUIBlock, type AgentWebAppIdentityAssurance, type AgentWebAppIdentityConfig, type AgentWebAppIdentityPolicy, type AgentWebAppInterrupt, type AgentWebAppIssuerConfig, type AgentWebAppQuickPrompt, type AgentWebAppRuntimeMessage, type AgentWebAppRuntimeThread, type AgentWebAppScope, type AgentWebAppStatus, type AgentWebAppStore, type AgentWebAppStorePatch, type AgentWebAppStreamEvent, type AgentWebAppStreamProjectionContext, type AgentWebAppTableWidget, type AgentWebAppThreadMetadata, type AgentWebAppUpdateOptions, type Assistant, type AssistantMessage, type AssistantStore, type Attachment, type AvailableModule, type BaseLatticeProtocol, type BaseMessage, type Binding, type BindingListParams, type BindingMutablePatch, type BindingRegistry, type BootstrapFilesConfig, type BrowserMiddlewareConfig, type Callback, type CapabilityBundle, type CapabilityBundleDeleteResult, type CapabilityBundleStore, type CapabilityBundleUpdateConflict, type CapabilityFieldSource, type CapabilityOverride, type CapabilityPreview, type CapabilityPreviewIssue, type CapabilityRuntime, type ChannelAdapter, type ChannelBindingMigrationConflict, ChannelBindingMigrationConflictError, type ChannelInstallation, type ChannelInstallationStore, type ChannelInstallationType, type ClawMiddlewareConfig, type CodeEvalMiddlewareConfig, type Collection, type CollectionField, type CollectionFieldType, type CollectionMiddlewareConfig, type CollectionSchema, type CollectionStore, type ConnectionEntry, type ConnectionStore, type ConversationRecord, type CreateA2AApiKeyInput, type CreateAgentWebAppInput, type CreateAssistantRequest, type CreateBindingInput, type CreateCapabilityBundleInput, type CreateChannelInstallationInput, type CreateChannelInstallationRequest, type CreateCollectionRequest, type CreateConversationInput, type CreateDatabaseConfigRequest, type CreateEvalCaseRequest, type CreateEvalProjectRequest, type CreateEvalRunRequest, type CreateEvalSuiteRequest, type CreateMcpServerConfigRequest, type CreateMenuItemInput, type CreateMetricsServerConfigRequest, type CreateModelProviderRequest, type CreateProjectRequest, type CreateRunStepRequest, type CreateShareRequest, type CreateSkillRequest, type CreateTaskRequest, type CreateTenantRequest, type CreateThreadRequest, type CreateUserRequest, type CreateUserTenantLinkRequest, type CreateWorkItemIfAbsentRequest, type CreateWorkItemRequest, type CreateWorkflowRunRequest, type CreateWorkspaceRequest, type CustomMenuConfig, type DataSource, type DatabaseConfig, type DatabaseConfigEntry, type DatabaseConfigStore, type DatabaseType, type DeepAgentConfig, type DescriptorDataValue, type DeveloperMessage, type DiscoveredModel, type DispatchResult, DuplicateChannelBindingSubjectError, EXECUTION_RESULT_EVENT_KEY_PATTERN, EXECUTION_RESULT_EVENT_KEY_PATTERN_SOURCE, EXECUTION_RESULT_EVENT_KEY_PREFIX, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type EvalCase, type EvalProject, type EvalProjectReport, type EvalRun, type EvalRunResult, type EvalStore, type EvalSuite, type ExecuteSqlQueryRequest, type ExecuteSqlQueryResponse, type ExpectedCapabilityBundleRevisions, type FileMenuConfig, type FilterCondition, type GraphBuildOptions, type HtmlMenuConfig, type IConversationStore, type ID, type InboundMessage, type InternalAgentNode, type InternalBaseNode, type InternalCreateCapabilityBundleInput, type InternalDSL, type InternalEdge, type InternalInput, type InternalInputNode, type InternalMapNode, type InternalNode, type InternalNodeConfig, type InternalOutput, type InternalState, type InternalStateField, type InternalTerminalNode, type InternalUpdateCapabilityBundleInput, type InterruptMessage, type InterruptPolicy, InvalidProjectCapabilityBundleConfigError, type LLMConfig, type LarkChannelInstallationConfig, type LatticeError, type LatticeEventBus, type LatticeMessage, type LeaseRecord, type LeaseStore, type LocalA2AProviderId, type LocalA2AProviderState, type LocalA2AProviderStatus, type LocalA2ATemplateDefinition, type LocalRuntimeConfig, type LoggerClient, type LoggerConfig, type LoggerContext, type LoggerLatticeProtocol, LoggerType, MAX_PENDING_EXECUTION_RESULTS_LIMIT, type McpAppMenuConfig, type McpClient, type McpClientOptions, type McpConnectionStatus, type McpLatticeMessage, type McpLatticeProtocol, McpMessageType, type McpServerConfig, type McpServerConfigEntry, type McpServerConfigStore, type McpStats, type McpTool, type McpToolResult, type McpTransportType, type McpUiCsp, type McpUiDisplayMode, type McpUiPermissions, type McpUiRef, type McpUiResourcePayload, type MemoryClient, type MemoryConfig, type MemoryLatticeProtocol, MemoryType, type MenuContentConfig, type MenuContentType, type MenuItem, type MenuRegistry, type MenuTarget, type Message, type MessageChunk, type MessageChunkType, MessageChunkTypes, type MessageContext, type MessageMiddleware, type MetricColumn, type MetricDataPoint, type MetricMeta, type MetricQueryResult, type MetricsMiddlewareConfig, type MetricsServerConfig, type MetricsServerConfigEntry, type MetricsServerConfigStore, type MetricsServerType, type MiddlewareType, type ModelDiscoveryResult, type ModelLatticeProtocol, type ModelProviderApiStyle, type ModelProviderEntry, type ModelProviderErrorCode, type ModelProviderLlmProvider, type ModelProviderModelEntry, type ModelProviderProbeRequest, type ModelProviderProbeResult, type ModelProviderPublicEntry, type ModelProviderStatus, type ModelProviderStore, type ModelProviderUpstreamErrorCode, type ModelProviderWireProtocol, type ModelSelection, type OpenAuditAppendInput, type OpenAuditQuery, type OpenAuditRecord, type OpenAuditStore, type OpenCapabilitySource, type OpenCatalog, type OpenCatalogDomain, type OpenCatalogItem, type OpenCredentialKind, type OpenExecutionContext, type OpenExecutionResult, type OpenGrant, type OutboundMessage, type OutboxEvent, type OutboxStore, PROJECT_ROOM_TASK_DELEGATED_LABEL, PROJECT_ROOM_TASK_DELEGATED_SEPARATOR, PROJECT_ROOM_USER_CHANNEL_PROJECT, PROJECT_TASK_LIFECYCLE_ACTIONS, type PaginatedResult, type PaginationParams, type PinoFileOptions, type Plugin, type PluginConnection, type PluginConnectionFieldSchema, type PluginConnectionTestResult, type PluginContext, type PluginDiscoveredResource, type PluginMeta, type PluginMetaOutput, type PluginMiddlewareFactory, type PluginSkillDefinition, type PluginSkillResource, type PluginStandardConnectionConfig, type PluginToolMeta, type PluginToolUi, type PluginUiResource, type ProcessingAgentConfig, type Project, type ProjectBotMembership, type ProjectBotMembershipStatus, type ProjectBotMembershipStore, type ProjectBotRole, type ProjectCapabilityConfig, type ProjectFilter, type ProjectHumanRole, type ProjectKind, type ProjectLifecycleEventCursor, type ProjectLifecycleEventQuery, type ProjectMembership, type ProjectMembershipMutationResult, type ProjectMembershipStatus, type ProjectMembershipStore, type ProjectRoom, ProjectRoomBrokerCapacityError, type ProjectRoomBusinessEvent, type ProjectRoomBusinessEventDraft, type ProjectRoomControlEvent, ProjectRoomCursorError, type ProjectRoomEventBrokerProtocol, type ProjectRoomEventId, type ProjectRoomEventOf, type ProjectRoomEventScope, type ProjectRoomEventSubscription, type ProjectRoomMembershipAffectedEvent, type ProjectRoomMembershipChangedEvent, type ProjectRoomMention, type ProjectRoomMessage, type ProjectRoomMessageAuthor, type ProjectRoomMessageCreatedEvent, type ProjectRoomMessageCursor, type ProjectRoomMessageSource, type ProjectRoomMessageStore, type ProjectRoomPublicBotMembership, type ProjectRoomPublicMembership, type ProjectRoomPublicMessage, type ProjectRoomReadChangedEvent, type ProjectRoomReadState, type ProjectRoomReadStateStore, type ProjectRoomRealtimeActor, type ProjectRoomRosterChangedEvent, type ProjectRoomScopedBusinessEvent, type ProjectRoomSseWritable, type ProjectRoomStore, type ProjectRoomTaskChangedEvent, type ProjectRoomThreadMetadata, type ProjectRoomTrustedRunContext, type ProjectStore, type ProjectTaskLifecycleAction, ProjectTaskStoreUnsupportedError, type ProjectTaskThreadMetadata, type ProjectTaskTrustedRunContext, type ProjectTaskWorkItemStore, type ProviderModelInput, type PublicChannelInstallationType, type QueryParams, type QueryResultFormat, type QueryWorkflowRunsOptions, type QueryWorkflowRunsResult, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type QueuedExecutionMode, REPLICA_HEADER, type ReactAgentConfig, type ReplyTarget, type ResourceAddress, type ResourceResolver, type Result, type RunScope, type RunStep, type STTClient, type STTConfig, type STTModelLatticeProtocol, type SandboxMiddlewareConfig, type SandboxPluginConnectionDef, type SandboxPluginDiagnostic, type SandboxPluginManifest, type SandboxPluginToolDef, type ScheduleClient, type ScheduleConfig, type ScheduleCronOptions, ScheduleExecutionType, type ScheduleLatticeProtocol, type ScheduleOnceOptions, type ScheduleStorage, ScheduleType, type ScheduledTaskDefinition, ScheduledTaskStatus, type SchedulerMiddlewareConfig, type SemanticMetricsFilter, type SemanticMetricsQueryRequest, type SemanticMetricsQueryResponse, type SemanticMetricsServerConfig, type ShareRecord, type ShareResult, type ShareVisibility, type SharedResourceStore, type Skill, type SkillClient, type SkillClientType, type SkillConfig, type SkillLatticeProtocol, type SkillStore, type SkillStoreContext, type SqlMiddlewareConfig, type StepStatus, type StepType, type StorageType, type SystemMessage, type TableQueryRequest, type TableQueryResponse, type TaskBeliefDiagnosticCode, type TaskBeliefEntry, type TaskBeliefParseFailure, type TaskBeliefParseResult, type TaskBeliefParseSuccess, type TaskBeliefState, type TaskDependentListQuery, type TaskFileRef, type TaskHandler, type TaskItem, type TaskListFilter, type TaskMutationSnapshot, type TaskStore, type TaskWorkItem, type TaskWorkItemListFilter, type TaskWorkItemStore, type TeamAgentConfig, type TeamTeammateConfig, type Tenant, type TenantModelCatalog, type TenantModelPublicEntry, type TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, type ThreadStore, type Timestamp, type ToolCall, type ToolCallUi, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type TopologyEdge, type TranscriptionResult, type TrustedRunContext, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UpdateA2AApiKeyInput, type UpdateAgentWebAppInput, type UpdateCapabilityBundleInput, type UpdateChannelInstallationRequest, type UpdateCollectionRequest, type UpdateDatabaseConfigRequest, type UpdateMcpServerConfigRequest, type UpdateMenuItemInput, type UpdateMetricsServerConfigRequest, type UpdateModelProviderRequest, type UpdateProjectCapabilityBundlesResult, type UpdateProjectRequest, type UpdateRunStepRequest, type UpdateTaskRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkflowRunRequest, type UpdateWorkspaceRequest, type User, type UserMessage, type UserPushSubscription, type UserPushSubscriptionStore, type UserStatus, type UserStore, type UserTenantLink, type UserTenantLinkStore, type UserTenantRole, type VectorStoreConfig, type VectorStoreCreateParams, type VectorStoreLatticeProtocol, type VectorStoreProvider, WORKSPACE_PUBLIC_ROOM_PROJECT_PREFIX, type WechatChannelInstallationConfig, type WorkflowAgentConfig, type WorkflowRun, type WorkflowRunStatus, type WorkflowTrackingStore, type Workspace, type WorkspaceStore, type YamlAgentStep, type YamlMapStep, type YamlParallelBlock, type YamlTopLevelStep, type YamlWorkflow, affinityEchoHeaders, assertGenericProjectConfig, buildAffinityMissChunk, createAgentWebAppStreamProjectionContext, descriptorDataValue, effectiveGrants, firstNonEmptyString, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isMcpUiRef, isProcessingAgentConfig, isProjectRoomEventId, isTeamAgentConfig, isWorkflowAgentConfig, isWorkspacePublicRoomProjectId, normalizeTaskMetadataScalar, parseAgentWebAppGenUIBlock, parseMcpUiRef, parseModelKey, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, projectAgentWebAppChunk, projectRoomUserEventScope, replaceTaskBeliefState, requireProjectTaskWorkItemStore, resolveRunScope, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, taskBeliefStatesEqual, threadAffinityHeaders, toModelKey, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };