@axiom-lattice/core 4.2.8 → 4.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -8,12 +8,12 @@ import { BaseLanguageModelInput, LanguageModelLike } from '@langchain/core/langu
8
8
  import { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';
9
9
  import { ChatResult } from '@langchain/core/outputs';
10
10
  import * as _axiom_lattice_protocols from '@axiom-lattice/protocols';
11
- import { LLMConfig, SemanticMetricsServerConfig, MetricMeta, MetricQueryResult, DataSource, SemanticMetricsQueryRequest, SemanticMetricsQueryResponse, TableQueryRequest, TableQueryResponse, ExecuteSqlQueryRequest, ExecuteSqlQueryResponse, MetricsServerType, MetricsServerConfig, ToolConfig, ToolExecutor, AgentConfig, MiddlewareType, GraphBuildOptions, MessageChunk, MessageChunkType, QueueLatticeProtocol, QueueConfig, QueueClient, QueueResult, ScheduleLatticeProtocol, ScheduleConfig, ScheduleClient, ScheduleStorage, TaskHandler, ScheduleOnceOptions, ScheduleCronOptions, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TrustedRunContext, QueuedExecutionMode, ThreadStore, AssistantStore, SkillStore, CollectionStore, WorkspaceStore, ProjectStore, DatabaseConfigStore, MetricsServerConfigStore, McpServerConfigStore, UserStore, TenantStore, UserTenantLinkStore, WorkflowTrackingStore, EvalStore, ChannelInstallationStore, BindingRegistry, MenuRegistry, A2AApiKeyStore, TaskStore, SharedResourceStore, ConnectionStore, TaskWorkItemStore, AgentWebAppStore, CapabilityBundleStore, ProjectRoomStore, ProjectMembershipStore, ProjectBotMembershipStore, ProjectRoomMessageStore, ProjectRoomReadStateStore, VectorStoreProvider, Thread, CreateThreadRequest, Assistant, CreateAssistantRequest, AgentWebApp, CreateAgentWebAppInput, AgentWebAppStorePatch, AgentWebAppUpdateOptions, Project, CreateProjectRequest, UpdateProjectRequest, UpdateProjectCapabilityBundlesResult, CapabilityBundle, InternalCreateCapabilityBundleInput, InternalUpdateCapabilityBundleInput, CapabilityBundleDeleteResult, Skill, CreateSkillRequest, SkillStoreContext, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, User, CreateUserRequest, UpdateUserRequest, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationInput, UpdateChannelInstallationRequest, Binding, CreateBindingInput, BindingMutablePatch, BindingListParams, A2AApiKeyRecord, CreateA2AApiKeyInput, A2AApiKeyEntry, TaskMutationSnapshot, CreateTaskRequest, TaskItem, TaskListFilter, TaskDependentListQuery, UpdateTaskRequest, Collection, CreateCollectionRequest, UpdateCollectionRequest, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, ProjectRoom, ProjectMembership, ProjectBotMembership, ProjectRoomMessage, ProjectHumanRole, ProjectMembershipMutationResult, ProjectRoomReadState, STTModelLatticeProtocol, STTConfig, STTClient, TranscriptionResult, LoggerLatticeProtocol, LoggerConfig, LoggerClient, LoggerContext, SkillConfig, SkillClient, PluginSkillDefinition, McpTool, ResourceResolver, ResourceAddress, ShareVisibility, CreateShareRequest, ChannelAdapter, InterruptPolicy, ProjectTaskLifecycleAction, TaskBeliefState, PluginMeta, Plugin, PluginMetaOutput, CapabilityPreview, CreateCapabilityBundleInput, UpdateCapabilityBundleInput, InternalStateField, InternalInput, InternalNode, InternalAgentNode, InternalMapNode, InternalDSL, ConnectionEntry } from '@axiom-lattice/protocols';
11
+ import { LLMConfig, SemanticMetricsServerConfig, MetricMeta, MetricQueryResult, DataSource, SemanticMetricsQueryRequest, SemanticMetricsQueryResponse, TableQueryRequest, TableQueryResponse, ExecuteSqlQueryRequest, ExecuteSqlQueryResponse, MetricsServerType, MetricsServerConfig, ToolConfig, ToolExecutor, AgentConfig, MiddlewareType, GraphBuildOptions, MessageChunk, MessageChunkType, QueueLatticeProtocol, QueueConfig, QueueClient, QueueResult, ScheduleLatticeProtocol, ScheduleConfig, ScheduleClient, ScheduleStorage, TaskHandler, ScheduleOnceOptions, ScheduleCronOptions, ScheduledTaskDefinition, ScheduledTaskStatus, ScheduleExecutionType, TrustedRunContext, QueuedExecutionMode, ThreadStore, AssistantStore, SkillStore, CollectionStore, WorkspaceStore, ProjectStore, DatabaseConfigStore, MetricsServerConfigStore, McpServerConfigStore, UserStore, TenantStore, UserTenantLinkStore, WorkflowTrackingStore, EvalStore, ChannelInstallationStore, BindingRegistry, MenuRegistry, A2AApiKeyStore, OpenAuditStore, TaskStore, SharedResourceStore, ConnectionStore, TaskWorkItemStore, AgentWebAppStore, CapabilityBundleStore, ProjectRoomStore, ProjectMembershipStore, ProjectBotMembershipStore, ProjectRoomMessageStore, ProjectRoomReadStateStore, VectorStoreProvider, Thread, CreateThreadRequest, Assistant, CreateAssistantRequest, AgentWebApp, CreateAgentWebAppInput, AgentWebAppStorePatch, AgentWebAppUpdateOptions, Project, CreateProjectRequest, UpdateProjectRequest, UpdateProjectCapabilityBundlesResult, CapabilityBundle, InternalCreateCapabilityBundleInput, InternalUpdateCapabilityBundleInput, CapabilityBundleDeleteResult, Skill, CreateSkillRequest, SkillStoreContext, DatabaseConfigEntry, CreateDatabaseConfigRequest, UpdateDatabaseConfigRequest, User, CreateUserRequest, UpdateUserRequest, Tenant, CreateTenantRequest, UpdateTenantRequest, UserTenantLink, CreateUserTenantLinkRequest, UpdateUserTenantLinkRequest, ChannelInstallation, ChannelInstallationType, CreateChannelInstallationInput, UpdateChannelInstallationRequest, Binding, CreateBindingInput, BindingMutablePatch, BindingListParams, A2AApiKeyRecord, CreateA2AApiKeyInput, UpdateA2AApiKeyInput, A2AApiKeyEntry, OpenAuditAppendInput, OpenAuditQuery, OpenAuditRecord, TaskMutationSnapshot, CreateTaskRequest, TaskItem, TaskListFilter, TaskDependentListQuery, UpdateTaskRequest, Collection, CreateCollectionRequest, UpdateCollectionRequest, MenuItem, CreateMenuItemInput, UpdateMenuItemInput, ProjectRoom, ProjectMembership, ProjectBotMembership, ProjectRoomMessage, ProjectHumanRole, ProjectMembershipMutationResult, ProjectRoomReadState, STTModelLatticeProtocol, STTConfig, STTClient, TranscriptionResult, LoggerLatticeProtocol, LoggerConfig, LoggerClient, LoggerContext, SkillConfig, SkillClient, PluginSkillDefinition, McpTool, ResourceResolver, ResourceAddress, ShareVisibility, OpenGrant, CreateShareRequest, ChannelAdapter, InterruptPolicy, ProjectTaskLifecycleAction, TaskBeliefState, PluginMeta, Plugin, PluginMetaOutput, SandboxPluginManifest, SandboxPluginToolDef, SandboxPluginDiagnostic, CapabilityPreview, CreateCapabilityBundleInput, UpdateCapabilityBundleInput, InternalStateField, InternalInput, InternalNode, InternalAgentNode, InternalMapNode, InternalDSL, ConnectionEntry } from '@axiom-lattice/protocols';
12
12
  export { _axiom_lattice_protocols as Protocols };
13
13
  export { AgentConfig, AgentType, GraphBuildOptions, MemoryType, ProjectRoomTrustedRunContext, QueuedExecutionMode, TrustedRunContext, parseQueuedExecutionMode, parseTrustedRunContext } from '@axiom-lattice/protocols';
14
14
  import * as langchain from 'langchain';
15
15
  import { ReactAgent, AgentMiddleware } from 'langchain';
16
- import z, { z as z$1 } from 'zod';
16
+ import z, { z as z$1, ZodTypeAny } from 'zod';
17
17
  import { BaseStore, BaseCheckpointSaver } from '@langchain/langgraph-checkpoint';
18
18
  import * as _langchain_core_tools from '@langchain/core/tools';
19
19
  import { StructuredTool, DynamicStructuredTool } from '@langchain/core/tools';
@@ -2870,6 +2870,7 @@ type StoreTypeMap = {
2870
2870
  channelBinding: BindingRegistry;
2871
2871
  menu: MenuRegistry;
2872
2872
  a2aApiKey: A2AApiKeyStore;
2873
+ openAudit: OpenAuditStore;
2873
2874
  task: TaskStore;
2874
2875
  sharedResource: SharedResourceStore;
2875
2876
  connection: ConnectionStore;
@@ -3774,6 +3775,7 @@ declare class InMemoryA2AApiKeyStore implements A2AApiKeyStore {
3774
3775
  offset?: number;
3775
3776
  }): Promise<A2AApiKeyRecord[]>;
3776
3777
  create(input: CreateA2AApiKeyInput): Promise<A2AApiKeyRecord>;
3778
+ update(id: string, input: UpdateA2AApiKeyInput): Promise<A2AApiKeyRecord>;
3777
3779
  disable(id: string): Promise<A2AApiKeyRecord>;
3778
3780
  enable(id: string): Promise<A2AApiKeyRecord>;
3779
3781
  rotate(id: string): Promise<A2AApiKeyRecord>;
@@ -3781,6 +3783,18 @@ declare class InMemoryA2AApiKeyStore implements A2AApiKeyStore {
3781
3783
  loadIntoMap(): Promise<Map<string, A2AApiKeyEntry>>;
3782
3784
  }
3783
3785
 
3786
+ /**
3787
+ * In-memory Open audit store (default when no persistent store is configured).
3788
+ */
3789
+
3790
+ declare class InMemoryOpenAuditStore implements OpenAuditStore {
3791
+ private records;
3792
+ append(record: OpenAuditAppendInput): Promise<void>;
3793
+ query(params: OpenAuditQuery): Promise<OpenAuditRecord[]>;
3794
+ /** Test/inspection helper. */
3795
+ all(): OpenAuditRecord[];
3796
+ }
3797
+
3784
3798
  /**
3785
3799
  * In-Memory Thread Message Queue Store
3786
3800
  *
@@ -6090,6 +6104,7 @@ interface SharePayload {
6090
6104
  createdBy: string;
6091
6105
  expiresAt: Date | null;
6092
6106
  maxAccess: number | null;
6107
+ openGrants?: OpenGrant[];
6093
6108
  revoked: boolean;
6094
6109
  }
6095
6110
  /**
@@ -9481,6 +9496,540 @@ declare function serializePluginMeta(plugin: Plugin): PluginMetaOutput;
9481
9496
 
9482
9497
  declare const BUILTIN_PLUGINS: Plugin[];
9483
9498
 
9499
+ /**
9500
+ * Convert a restricted JSON Schema subset into a zod schema.
9501
+ *
9502
+ * Supported: object (properties/required/description), array (items),
9503
+ * string (enum), number, integer, boolean, description.
9504
+ *
9505
+ * @param schema - A restricted JSON Schema object. Nested `properties` and
9506
+ * `items` are converted recursively.
9507
+ * @returns A zod schema equivalent to the supported JSON Schema subset.
9508
+ * @throws Error when the input is not an object or an unsupported type is encountered.
9509
+ *
9510
+ * @example
9511
+ * ```ts
9512
+ * const zod = jsonSchemaToZod({
9513
+ * type: "object",
9514
+ * properties: { city: { type: "string" } },
9515
+ * required: ["city"],
9516
+ * });
9517
+ * zod.parse({ city: "SH" }); // { city: "SH" }
9518
+ * ```
9519
+ */
9520
+ declare function jsonSchemaToZod(schema: unknown): ZodTypeAny;
9521
+
9522
+ /**
9523
+ * Inputs required to validate one sandbox plugin manifest.
9524
+ *
9525
+ * @property raw - Parsed JSON manifest content, untyped until validated.
9526
+ * @property dirName - Name of the plugin directory; must equal `raw.type`.
9527
+ * @property reservedTypes - Global plugin types that tenant plugins may not shadow.
9528
+ * @property knownTypes - Plugin types already defined for the tenant.
9529
+ * @property handlerExists - Probe returning whether a relative handler path exists.
9530
+ * @property rawSizeBytes - Optional manifest byte size for the size limit check.
9531
+ */
9532
+ interface ValidateManifestArgs {
9533
+ raw: unknown;
9534
+ dirName: string;
9535
+ reservedTypes: Set<string>;
9536
+ knownTypes: Set<string>;
9537
+ handlerExists: (relativePath: string) => boolean;
9538
+ rawSizeBytes?: number;
9539
+ }
9540
+ /**
9541
+ * Outcome of validating a sandbox plugin manifest.
9542
+ *
9543
+ * @property manifest - Normalized manifest, absent when a fatal error occurred.
9544
+ * @property tools - Accepted tools after per-tool validation and normalization.
9545
+ * @property diagnostics - Structured errors/warnings collected during validation.
9546
+ */
9547
+ interface ManifestValidationResult {
9548
+ manifest?: SandboxPluginManifest;
9549
+ tools: SandboxPluginToolDef[];
9550
+ diagnostics: SandboxPluginDiagnostic[];
9551
+ }
9552
+ /**
9553
+ * Validate and normalize a sandbox plugin manifest.
9554
+ *
9555
+ * Fatal errors (bad schemaVersion/type/version/size) return no `manifest`.
9556
+ * Per-tool problems are dropped from `tools` with a diagnostic so the rest of
9557
+ * the plugin can still load.
9558
+ *
9559
+ * @param args - Raw manifest plus load context: the containing directory name,
9560
+ * the reserved global plugin types, the types already known for the tenant,
9561
+ * a handler-existence probe, and an optional raw byte size.
9562
+ * @returns A result containing the normalized `manifest` (absent on fatal
9563
+ * errors), the accepted `tools`, and all structured `diagnostics`.
9564
+ * @example
9565
+ * ```ts
9566
+ * const result = validateSandboxPluginManifest({
9567
+ * raw: JSON.parse(source),
9568
+ * dirName: "weather",
9569
+ * reservedTypes: new Set(["metrics"]),
9570
+ * knownTypes: new Set(),
9571
+ * handlerExists: (p) => files.includes(p),
9572
+ * });
9573
+ * if (result.manifest) install(result.manifest, result.tools);
9574
+ * ```
9575
+ */
9576
+ declare function validateSandboxPluginManifest(args: ValidateManifestArgs): ManifestValidationResult;
9577
+
9578
+ /** Run-scoped identity used to resolve a sandbox. */
9579
+ interface SandboxRunConfig {
9580
+ /** Tenant that owns the run. */
9581
+ tenantId?: string;
9582
+ /** Assistant executing the run. */
9583
+ assistantId?: string;
9584
+ /** Conversation thread for the run. */
9585
+ threadId?: string;
9586
+ /** Workspace that scopes the run. */
9587
+ workspaceId?: string;
9588
+ /** Project that scopes the run. */
9589
+ projectId?: string;
9590
+ }
9591
+ /**
9592
+ * Resolves a `SandboxInstance` for the given run identity.
9593
+ *
9594
+ * @param config - Run-scoped identity used to select the sandbox
9595
+ * @returns The resolved sandbox instance
9596
+ */
9597
+ type SandboxResolver = (config: SandboxRunConfig) => Promise<SandboxInstance>;
9598
+ /**
9599
+ * Minimal `getSandboxFromConfig` shape used to build a resolver.
9600
+ *
9601
+ * @param config - Full sandbox run configuration
9602
+ * @returns The resolved sandbox instance
9603
+ */
9604
+ type GetSandboxFromConfig = (config: RunSandboxConfig) => Promise<SandboxInstance>;
9605
+ /**
9606
+ * Build a {@link SandboxResolver} from a `getSandboxFromConfig`-style function.
9607
+ * Forces project isolation, matching `SandboxSkillStore`.
9608
+ *
9609
+ * @param getSandboxFromConfig - Provider function that maps a full run config to a sandbox
9610
+ * @returns A resolver that maps a {@link SandboxRunConfig} onto `getSandboxFromConfig`
9611
+ */
9612
+ declare function createSandboxResolver(getSandboxFromConfig: GetSandboxFromConfig): SandboxResolver;
9613
+
9614
+ /** Dependencies required to resolve a tenant sandbox for plugin execution. */
9615
+ interface SandboxPluginExecutorDeps {
9616
+ /** Resolves the sandbox instance that hosts the tenant plugin. */
9617
+ resolveSandbox: SandboxResolver;
9618
+ /** Optional structured logger seam (pino-compatible). */
9619
+ logger?: {
9620
+ info: (fields: Record<string, unknown>, message?: string) => void;
9621
+ };
9622
+ }
9623
+ /** Arguments for a single sandbox plugin handler invocation. */
9624
+ interface SandboxPluginInvokeArgs {
9625
+ /** Authoritative plugin manifest identifying the plugin root directory. */
9626
+ manifest: SandboxPluginManifest;
9627
+ /** Handler file path, relative to the plugin directory. */
9628
+ handler: string;
9629
+ /** Tool input payload passed to the handler. */
9630
+ input: unknown;
9631
+ /** Single connection payload, written as the envelope's `connection` field. */
9632
+ connection?: Record<string, unknown>;
9633
+ /**
9634
+ * Multiple connection payloads, written as the envelope's `connections`
9635
+ * field; the first entry's config is also written as `connection`.
9636
+ */
9637
+ connections?: Array<{
9638
+ key: string;
9639
+ config: Record<string, unknown>;
9640
+ }>;
9641
+ /** String context forwarded to the handler as `PLUGIN_CONTEXT`. */
9642
+ context: Record<string, string>;
9643
+ /** Optional run identity override used to resolve the sandbox. */
9644
+ runConfig?: SandboxRunConfig;
9645
+ /** Execution timeout in milliseconds. */
9646
+ timeoutMs?: number;
9647
+ /** Maximum serialized result size before truncation, in bytes. */
9648
+ maxResultBytes?: number;
9649
+ }
9650
+ /** Normalized outcome of a sandbox plugin handler invocation. */
9651
+ interface SandboxPluginResult {
9652
+ /** Whether the handler reported success. */
9653
+ ok: boolean;
9654
+ /** Parsed or plain-text handler result when `ok` is true. */
9655
+ result?: unknown;
9656
+ /** Error message when `ok` is false. */
9657
+ error?: string;
9658
+ /** Process exit code returned by the sandbox shell. */
9659
+ exitCode: number;
9660
+ /** Wall-clock duration of the invocation in milliseconds. */
9661
+ durationMs: number;
9662
+ /** Raw stdout captured from the handler. */
9663
+ stdout: string;
9664
+ /** Raw stderr captured from the handler (currently always empty). */
9665
+ stderr: string;
9666
+ }
9667
+ /**
9668
+ * Executes tenant sandbox plugin handlers via the tenant sandbox shell.
9669
+ *
9670
+ * Contract: input/context travel as base64 JSON env vars when input is small;
9671
+ * large input is written to `input.json` and connection credentials are always
9672
+ * written to `connection.json` under a per-call temp dir as an
9673
+ * `{ connection?, connections? }` envelope. The handler writes its result to
9674
+ * stdout as `{ ok, result }` or plain text. Node never evaluates handler code.
9675
+ */
9676
+ declare class SandboxPluginExecutor {
9677
+ private readonly deps;
9678
+ /**
9679
+ * @param deps - Sandbox resolver and optional logger
9680
+ */
9681
+ constructor(deps: SandboxPluginExecutorDeps);
9682
+ /**
9683
+ * Invoke a plugin handler inside the tenant sandbox shell.
9684
+ *
9685
+ * Resolves the sandbox, injects small input as a base64 env var (or writes a
9686
+ * temp `input.json` for large input), writes connection credentials to a temp
9687
+ * `connection.json` as an `{ connection?, connections? }` envelope, runs the
9688
+ * handler with `node`, and normalizes stdout into a
9689
+ * {@link SandboxPluginResult}. Per-call temp dirs are cleaned up best-effort
9690
+ * in all cases, including setup failures.
9691
+ *
9692
+ * @param args - Invocation arguments including manifest, handler, and input
9693
+ * @returns The normalized handler result, exit code, timing, and raw stdout
9694
+ * @throws When `args.handler` is not a safe relative path
9695
+ */
9696
+ invoke(args: SandboxPluginInvokeArgs): Promise<SandboxPluginResult>;
9697
+ }
9698
+
9699
+ /** Arguments accepted by {@link compileSandboxPlugin}. */
9700
+ interface CompileSandboxPluginArgs {
9701
+ /** Validated manifest describing the tenant plugin and its tools. */
9702
+ manifest: SandboxPluginManifest;
9703
+ /** Executor that proxies handler invocations into the tenant sandbox. */
9704
+ executor: SandboxPluginExecutor;
9705
+ /** Tenant that owns the plugin; used for the source tag and fallback identity. */
9706
+ tenantId: string;
9707
+ }
9708
+ /**
9709
+ * Compile a validated manifest into a normal `Plugin` whose tools proxy into
9710
+ * the tenant sandbox through {@link SandboxPluginExecutor}.
9711
+ *
9712
+ * @param args - Manifest, executor, and owning tenant
9713
+ * @returns A `Plugin` with sandbox-proxied tools, source tag, and connection hooks
9714
+ *
9715
+ * @example
9716
+ * ```ts
9717
+ * const plugin = compileSandboxPlugin({ manifest, executor, tenantId: "t1" });
9718
+ * // plugin.meta.source === "sandbox:t1/weather"
9719
+ * // plugin.middleware({}).tools -> one proxy per manifest.tools entry
9720
+ * ```
9721
+ *
9722
+ * @remarks
9723
+ * - Tool calls resolve connection credentials through
9724
+ * `resolveSandboxPluginConnections` at execution time via
9725
+ * `exeConfig.configurable.runConfig`.
9726
+ * - The returned middleware is a LangChain middleware whose `tools` are one
9727
+ * proxy per manifest tool; handler code is never evaluated in Node.
9728
+ */
9729
+ declare function compileSandboxPlugin(args: CompileSandboxPluginArgs): Plugin;
9730
+
9731
+ /**
9732
+ * Tenant plugin catalog snapshot produced by {@link TenantPluginCatalog.ensureLoaded}.
9733
+ *
9734
+ * @property tenantId - Tenant that owns the catalog snapshot.
9735
+ * @property hash - Content hash of the validated manifests and their relative file paths; empty when the sandbox was unavailable.
9736
+ * @property plugins - Compiled plugins ready to register for the tenant.
9737
+ * @property diagnostics - Structured load/validation diagnostics for the snapshot.
9738
+ */
9739
+ interface TenantPlugins {
9740
+ tenantId: string;
9741
+ hash: string;
9742
+ plugins: Plugin[];
9743
+ diagnostics: SandboxPluginDiagnostic[];
9744
+ }
9745
+ /**
9746
+ * Dependencies for {@link TenantPluginCatalog}.
9747
+ *
9748
+ * @property resolveSandbox - Resolves the sandbox volume holding tenant plugin files.
9749
+ * @property executor - Executor shared with compiled proxy tools.
9750
+ * @property reservedTypes - Returns global plugin types tenant plugins may not shadow.
9751
+ * @property hashTtlMs - Cache time-to-live in milliseconds before re-hashing; defaults to 30s.
9752
+ * @property now - Injectable clock for tests; defaults to `Date.now`.
9753
+ * @property logger - Optional structured logger for reload diagnostics.
9754
+ */
9755
+ interface TenantPluginCatalogDeps {
9756
+ resolveSandbox: SandboxResolver;
9757
+ executor: SandboxPluginExecutor;
9758
+ reservedTypes: () => Set<string>;
9759
+ hashTtlMs?: number;
9760
+ now?: () => number;
9761
+ logger?: CatalogLogger;
9762
+ }
9763
+ /**
9764
+ * Minimal structured logger seam (pino-compatible).
9765
+ *
9766
+ * @property info - Log at info level with optional structured fields and message.
9767
+ */
9768
+ interface CatalogLogger {
9769
+ info: (fields: Record<string, unknown>, message?: string) => void;
9770
+ }
9771
+ /**
9772
+ * Lazily load, validate, and compile tenant plugins from the sandbox volume.
9773
+ *
9774
+ * The catalog reads a single recursive listing of `<PLUGINS_ROOT>`, finds each
9775
+ * top-level plugin directory, validates its `plugin.json`, and compiles the
9776
+ * accepted manifests into normal `Plugin` objects whose tools proxy back into
9777
+ * the tenant sandbox. Results are cached per tenant and keyed by a content hash
9778
+ * of the manifests plus their relative file paths; a failed sandbox resolution
9779
+ * or listing yields an empty result with a diagnostic rather than throwing, so
9780
+ * callers can degrade gracefully.
9781
+ *
9782
+ * @example
9783
+ * ```ts
9784
+ * const catalog = new TenantPluginCatalog({ resolveSandbox, executor, reservedTypes });
9785
+ * const { plugins, diagnostics } = await catalog.ensureLoaded(tenantId);
9786
+ * ```
9787
+ *
9788
+ * @remarks
9789
+ * - `ensureLoaded` is single-flight per tenant: concurrent calls share one load.
9790
+ * - Remote providers do not populate file size/mtime, so the cache key is a hash
9791
+ * of the raw manifest content and each plugin's sorted relative file paths.
9792
+ * Editing a handler's *content* without changing its path or bumping the
9793
+ * manifest `version` will not change the hash. Any code change must bump
9794
+ * `version` or call {@link TenantPluginCatalog.reload}.
9795
+ */
9796
+ declare class TenantPluginCatalog {
9797
+ private readonly deps;
9798
+ private cache;
9799
+ private inflight;
9800
+ /**
9801
+ * @param deps - Sandbox resolver, executor, reserved types, and cache/logger seams
9802
+ */
9803
+ constructor(deps: TenantPluginCatalogDeps);
9804
+ /**
9805
+ * Return the last loaded snapshot for a tenant without touching the sandbox.
9806
+ *
9807
+ * @param tenantId - Tenant whose cached snapshot to return
9808
+ * @returns The cached snapshot, or `undefined` when the tenant has not loaded
9809
+ */
9810
+ getCached(tenantId: string): TenantPlugins | undefined;
9811
+ /**
9812
+ * Drop the cached snapshot for a tenant.
9813
+ *
9814
+ * @param tenantId - Tenant whose cache entry to remove
9815
+ * @returns Nothing
9816
+ */
9817
+ invalidate(tenantId: string): void;
9818
+ /**
9819
+ * Invalidate and immediately reload a tenant's plugin catalog.
9820
+ *
9821
+ * Waits for any in-flight load for the tenant to settle before invalidating,
9822
+ * so a stale load cannot overwrite the fresh result produced here.
9823
+ *
9824
+ * @param tenantId - Tenant to reload
9825
+ * @returns The freshly loaded catalog snapshot
9826
+ */
9827
+ reload(tenantId: string): Promise<TenantPlugins>;
9828
+ /**
9829
+ * Load the tenant catalog, reusing the TTL cache or an in-flight load.
9830
+ *
9831
+ * @param tenantId - Tenant to load plugins for
9832
+ * @returns The cached or freshly loaded catalog snapshot
9833
+ *
9834
+ * @remarks
9835
+ * Once the TTL expires the catalog re-lists the volume and recomputes the
9836
+ * hash. When the hash is unchanged the previously compiled plugins are reused
9837
+ * without recompiling. Because handler *content* is not part of the hash, any
9838
+ * code change must bump the manifest `version` or call
9839
+ * {@link TenantPluginCatalog.reload}.
9840
+ */
9841
+ ensureLoaded(tenantId: string): Promise<TenantPlugins>;
9842
+ /**
9843
+ * The executor shared with compiled proxy tools (test/invoke seam).
9844
+ *
9845
+ * @returns The executor supplied to the catalog dependencies
9846
+ */
9847
+ getExecutor(): SandboxPluginExecutor;
9848
+ /**
9849
+ * Read a file inside a tenant plugin directory (e.g. `plugin.json`).
9850
+ *
9851
+ * @param tenantId - Tenant that owns the plugin
9852
+ * @param type - Plugin type (directory name); must match the kebab-case type pattern
9853
+ * @param relPath - Safe path relative to the plugin directory
9854
+ * @returns The file contents as a string
9855
+ * @throws Error when `type` is not a valid plugin type or `relPath` is unsafe
9856
+ */
9857
+ readPluginFile(tenantId: string, type: string, relPath: string): Promise<string>;
9858
+ /**
9859
+ * Write a plugin manifest and handler files into the tenant volume.
9860
+ *
9861
+ * All types and handler paths are validated before any sandbox write, so an
9862
+ * unsafe path rejects without mutating the volume. Only the parent directory
9863
+ * of each handler is created.
9864
+ *
9865
+ * @param tenantId - Tenant that owns the plugin
9866
+ * @param type - Plugin type (directory name); must match the kebab-case type pattern
9867
+ * @param manifest - Manifest object serialized as pretty-printed JSON
9868
+ * @param handlers - Map of safe handler paths (relative to the plugin dir) to file contents
9869
+ * @returns Nothing once all files are written
9870
+ * @throws Error when `type` or any handler path is unsafe
9871
+ */
9872
+ writePlugin(tenantId: string, type: string, manifest: unknown, handlers: Record<string, string>): Promise<void>;
9873
+ /**
9874
+ * Delete an entire tenant plugin directory.
9875
+ *
9876
+ * @param tenantId - Tenant that owns the plugin
9877
+ * @param type - Plugin type (directory name) to delete; must match the kebab-case type pattern
9878
+ * @returns Nothing once the directory is removed
9879
+ * @throws Error when `type` is not a valid plugin type
9880
+ */
9881
+ deletePlugin(tenantId: string, type: string): Promise<void>;
9882
+ /**
9883
+ * Current timestamp from the injected clock.
9884
+ *
9885
+ * @returns Milliseconds since epoch
9886
+ */
9887
+ private now;
9888
+ /**
9889
+ * Build an empty catalog carrying a single diagnostic.
9890
+ *
9891
+ * @param tenantId - Tenant that owns the snapshot
9892
+ * @param code - Diagnostic code (e.g. `SANDBOX_UNAVAILABLE`)
9893
+ * @param err - Failure that produced the empty snapshot
9894
+ * @returns An empty catalog snapshot with the given diagnostic
9895
+ */
9896
+ private emptyCatalog;
9897
+ /**
9898
+ * Reject plugin types that could escape or alias the plugin root.
9899
+ *
9900
+ * @param type - Plugin type to validate
9901
+ * @throws Error when `type` does not match the kebab-case type pattern
9902
+ */
9903
+ private assertSafeType;
9904
+ /**
9905
+ * Reject relative paths that could escape the plugin directory.
9906
+ *
9907
+ * @param value - Relative path to validate
9908
+ * @param kind - Human-readable label used in the error message
9909
+ * @throws Error when `value` is unsafe
9910
+ */
9911
+ private assertSafeRelativePath;
9912
+ /**
9913
+ * Perform the sandbox read, validation, compilation, and caching for a tenant.
9914
+ *
9915
+ * Sandbox resolution failure only is reported as `SANDBOX_UNAVAILABLE`; a
9916
+ * failed recursive listing yields `PLUGINS_LIST_FAILED`, a missing manifest
9917
+ * yields `MANIFEST_READ`, and a per-plugin compile throw yields
9918
+ * `PLUGIN_COMPILE_FAILED` without discarding the rest of the catalog.
9919
+ *
9920
+ * @param tenantId - Tenant to load plugins for
9921
+ * @returns The loaded snapshot
9922
+ */
9923
+ private load;
9924
+ }
9925
+
9926
+ /**
9927
+ * Union global and tenant plugins; tenant entries win on `meta.type` collision.
9928
+ *
9929
+ * @param global - Plugins registered process-wide
9930
+ * @param tenant - Plugins compiled from the tenant sandbox volume
9931
+ * @returns A deduplicated plugin list keyed by `meta.type`
9932
+ */
9933
+ declare function mergePluginSources(global: Plugin[], tenant: Plugin[]): Plugin[];
9934
+ /**
9935
+ * Skills collected from the enabled plugin set.
9936
+ *
9937
+ * @property pluginSkills - Skill definitions keyed by skill name.
9938
+ * @property pluginSkillOwners - Owning plugin type keyed by skill name.
9939
+ */
9940
+ interface MergedPluginSkills {
9941
+ pluginSkills: Record<string, PluginSkillDefinition>;
9942
+ pluginSkillOwners: Record<string, string>;
9943
+ }
9944
+ /**
9945
+ * Collect skills from enabled plugins (global ∪ tenant), tenant wins on name collision.
9946
+ *
9947
+ * @param enabledTypes - Plugin types enabled for the agent
9948
+ * @param global - Plugins registered process-wide
9949
+ * @param tenant - Plugins compiled from the tenant sandbox volume
9950
+ * @returns The merged skill definitions and their owning plugin types
9951
+ */
9952
+ declare function mergePluginSkills(enabledTypes: Set<string>, global: Plugin[], tenant: Plugin[]): MergedPluginSkills;
9953
+ /**
9954
+ * Resolve connections selected by a sandbox plugin config at execution time.
9955
+ * Uses the tenant-scoped ConnectionRegistry; never reads credentials from
9956
+ * process state.
9957
+ *
9958
+ * @param type - Plugin type owning the connections
9959
+ * @param config - Plugin configuration from the agent middleware config
9960
+ * @param runConfig - Run-scoped identity used to resolve connections
9961
+ * @returns The first resolved connection and the full resolved connection list
9962
+ */
9963
+ declare function resolveSandboxPluginConnections(type: string, config: Record<string, unknown>, runConfig: SandboxRunConfig): Promise<{
9964
+ connection?: Record<string, unknown>;
9965
+ connections?: Array<{
9966
+ key: string;
9967
+ config: Record<string, unknown>;
9968
+ }>;
9969
+ }>;
9970
+
9971
+ /**
9972
+ * Process-wide tenant plugin catalog.
9973
+ *
9974
+ * Lazily constructed. Falls back to an empty catalog when no sandbox manager is
9975
+ * configured (e.g. unit tests), so agent builds degrade instead of throwing.
9976
+ *
9977
+ * @returns The shared {@link TenantPluginCatalog} instance
9978
+ * @remarks
9979
+ * The empty fallback is deliberately not cached: only a catalog built against a
9980
+ * real manager is stored. This lets a sandbox manager configured later still be
9981
+ * picked up on a subsequent call.
9982
+ */
9983
+ declare function getSandboxPluginCatalog(): TenantPluginCatalog;
9984
+ /**
9985
+ * Test seam: inject a catalog instance.
9986
+ *
9987
+ * @param instance - Catalog to install process-wide, or `null` to reset
9988
+ * @returns Nothing
9989
+ */
9990
+ declare function setSandboxPluginCatalog(instance: TenantPluginCatalog | null): void;
9991
+
9992
+ /**
9993
+ * Plugin skill definition resolved together with its owning plugin type.
9994
+ *
9995
+ * @property pluginType - Plugin that owns the skill (matches `PluginMeta.type`).
9996
+ * @property definition - Versioned skill content and resources.
9997
+ */
9998
+ interface ResolvedPluginSkill {
9999
+ pluginType: string;
10000
+ definition: PluginSkillDefinition;
10001
+ }
10002
+ /**
10003
+ * Resolve an enabled plugin skill through the tenant sandbox catalog.
10004
+ *
10005
+ * Looks up the tenant's compiled plugins, finds the plugin whose
10006
+ * `meta.type === owner`, and returns its `skills[skillName]` definition.
10007
+ * Never throws: a missing catalog, sandbox, or tenant yields `undefined` so
10008
+ * callers can fall back to their existing "not found" behavior.
10009
+ *
10010
+ * @param tenantId - Tenant that owns the sandbox plugin volume
10011
+ * @param owner - Plugin type expected to own the skill
10012
+ * @param skillName - Skill key within the plugin
10013
+ * @returns The tenant plugin skill definition, or `undefined` when unresolved
10014
+ */
10015
+ declare function resolveTenantPluginSkill(tenantId: string, owner: string, skillName: string): Promise<PluginSkillDefinition | undefined>;
10016
+ /**
10017
+ * Resolve an enabled plugin skill, global registry first and tenant catalog second.
10018
+ *
10019
+ * The global `PluginRegistry` entry wins when its recorded owner matches and its
10020
+ * definition is the exact enabled bundle, preserving the existing global
10021
+ * behavior. Only when that global lookup misses does this consult the tenant
10022
+ * sandbox catalog, letting sandbox-authored tenant plugins be loaded through the
10023
+ * same skill tooling.
10024
+ *
10025
+ * @param owner - Owning plugin type from the enabled plugin skill map
10026
+ * @param skillName - Skill key to resolve
10027
+ * @param enabledDefinition - Enabled bundle that must match for the global path
10028
+ * @param tenantId - Run-scoped tenant used to load the tenant plugin catalog
10029
+ * @returns The resolved owner and definition, or `undefined` when unavailable
10030
+ */
10031
+ declare function resolveEnabledPluginSkill(owner: string | undefined, skillName: string, enabledDefinition: PluginSkillDefinition | undefined, tenantId: string | undefined): Promise<ResolvedPluginSkill | undefined>;
10032
+
9484
10033
  /** Stable failure codes emitted when capability bundles cannot be composed. */
9485
10034
  type CapabilityBundleMergeErrorCode = "CAPABILITY_BUNDLE_DUPLICATE_ID" | "CAPABILITY_BUNDLE_EMPTY_ALLOWED_TOOLS" | "CAPABILITY_BUNDLE_INVALID_CONFIG" | "CAPABILITY_BUNDLE_NULL_VALUE" | "CAPABILITY_BUNDLE_UNSAFE_KEY";
9486
10035
  /** Describes invalid capability bundle input rejected by the pure merger. */
@@ -10540,4 +11089,4 @@ declare function parseDirectRoomType(projectId: string): "human" | "bot" | null;
10540
11089
  */
10541
11090
  declare function isDirectRoom(projectId: string): boolean;
10542
11091
 
10543
- export { AGENT_TASK_EVENT, type AddMessageParams, type AddMessageResult, Agent, type AgentClient, type AgentExecutor, AgentInstanceManager, type AgentLattice, AgentLatticeManager, type AgentLifecycleEventName, AgentManager, type AgentStreamExecutor, type AgentTaskCompletionInput, type AgentThreadInterface, type ApproveInterruptedTaskInput, BUILTIN_PLUGINS, BUILTIN_SKILLS, type BackendFactory, type BackendProtocol, type BufferStats, CAPABILITY_TOOL_NAME_CONFLICT, type CacheEntry, type CalibrationProbe, CapabilityBundleMergeError, type CapabilityBundleMergeErrorCode, CapabilityBundleMerger, CapabilityBundleValidationError, type CapabilityBundleValidationErrorCode, type CapabilityGuardDenialCode, type CapabilityResourceSelector, type CapabilityToolMetadata, CapabilityToolNameConflictError, CapabilityToolRegistry, type CaseRunResult, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, CollectionLatticeManager, type ColumnInfo, CompositeBackend, type ConflictItem, type ConnectAllChannelsOptions, ConnectionRegistry, ConsoleLoggerClient, type CreateSandboxProviderConfig, type CronFields, CustomMetricsClient, type CustomMiddlewareFactory, CustomMiddlewareRegistry, DEFAULT_CALIBRATION_PROBES, type DatabaseConfig, type DatabaseType, DaytonaInstance, DaytonaProvider, type DaytonaProviderConfig, DefaultScheduleClient, DelegatedScopeNotQueueableError, type DeleteResult, DependencyResolver, DuplicateProjectRoomMessageIdempotencyKeyError, E2BInstance, E2BProvider, type E2BProviderConfig, EMPTY_CONTENT_WARNING, type EditResult, type EmbeddingsInfo, type EmbeddingsLatticeInterface, EmbeddingsLatticeManager, type EnsureMicrosandboxInput, type EvalRunService, type ExportBundle, type ExportContext, type ExportJob, type ExportableEntity, type ExportableEntityDefinition, ExportableEntityRegistry, type ExportableFile, type ExportableTypeInfo, type ExternalDependencyInterruption, type FileData, type FileInfo, FileSystemSkillStore, type FileSystemSkillStoreOptions, FilesystemBackend, type FsEntry, type GrepMatch, type IMessageQueueStore, type IMetricsServerClient, type ISqlDatabase, IdRemapper, type ImportApplyResolution, type ImportApplyResult, type ImportEntityResult, type ImportEntityStatus, type ImportPreviewResult, InMemoryA2AApiKeyStore, InMemoryAgentWebAppStore, InMemoryAssistantStore, InMemoryBindingStore, InMemoryCapabilityBundleStore, InMemoryChannelInstallationStore, InMemoryChunkBuffer, InMemoryCollectionStore, InMemoryDatabaseConfigStore, InMemoryMailboxStore, InMemoryMenuStore, InMemoryProjectBotMembershipStore, InMemoryProjectMembershipStore, InMemoryProjectRoomCoordinator, InMemoryProjectRoomMessageStore, InMemoryProjectRoomReadStateStore, InMemoryProjectRoomStore, InMemoryTaskListStore, InMemoryTaskStore, InMemoryTenantStore, InMemoryThreadMessageQueueStore, InMemoryThreadStore, InMemoryUserStore, InMemoryUserTenantLinkStore, type InsertionItem, type JudgeVerdict, LINE_NUMBER_WIDTH, type LangGraphStateChecker, type LatticeAgentStepConfig, LatticeEval, type LatticeEvalBatchReport, type LatticeEvalCase, type LatticeEvalCaseType, type LatticeEvalCaseWithTemplate, type LatticeEvalConfig, type LatticeEvalLogEvent, type LatticeEvalLogLevel, LatticeEvalProject, type LatticeEvalProjectType, type LatticeEvalResult, type LatticeEvalRubric, LatticeEvalSuite, type LatticeEvalSuiteType, type LatticeEvalTemplate, type LifecycleResult, type LifecycleWarning, LocalSandboxInstance, LocalSandboxProvider, type LocalSandboxProviderConfig, type LoggerLattice, LoggerLatticeManager, MAX_LINE_LENGTH, MAX_PACK_ENTRIES, MAX_PACK_FILE_BYTES, MAX_PACK_TOTAL_BYTES, type MailboxMessage, type MailboxStore, type McpLatticeInterface, McpLatticeManager, type McpServerInfo, MemoryBackend, MemoryLatticeManager, MemoryQueueClient, MemoryScheduleStorage, type MessageCompletedEvent, type MessageContent, type MessageContentPart, type MessageContentValue, type MessageFailedEvent, type MessageInterruptedEvent, type MessageLike, type MessageStartedEvent, MessageType, MetricsServerManager, MicrosandboxRemoteInstance, MicrosandboxRemoteProvider, type MicrosandboxRemoteProviderClient, type MicrosandboxRemoteProviderConfig, MicrosandboxServiceClient, type MicrosandboxServiceClientConfig, type MicrosandboxShellExecInput, type ModelConfig, type ModelLatticeInterface, ModelLatticeManager, MysqlDatabase, type OutputType, PACK_DIRECTORY_TIMEOUT_SECONDS, type PackSourceInfo, type PendingMessage, PersonalAssistantConfig, PinoLoggerClient, PluginRegistry, type PostProcessTaskMutationResponseInput, PostgresDatabase, type PreviewError, ProjectBotMembershipIdConflictError, ProjectMutationMutex, type ProjectMutationScope, ProjectRoomMessageIdConflictError, type ProjectTaskAdmissionListener, type ProjectTaskAdmissionNotification, ProjectTaskAdmissionNotifier, type ProjectTaskAdmissionNotifierOptions, type ProjectTaskAssignmentScope, ProjectTaskOwnerPolicy, type ProjectTaskOwnerPolicyCode, ProjectTaskOwnerPolicyError, type ProjectTaskReassignmentAuthorization, type ProjectTaskReassignmentAuthorizationInput, type ProjectTaskReassignmentAuthorizer, type ProjectTaskReassignmentThreadValidationInput, type ProjectTaskReassignmentThreadValidator, type ProjectTaskRosterScope, PrometheusClient, type QueryResult, type QueueLattice, QueueLatticeManager, type QueueMessage, QueueMode, type QueuePendingEvent, type QueueScope, type ReassignProjectTaskInput, type ReconcileTaskDescriptionInput, type RejectInterruptedTaskInput, RemoteSandboxInstance, RemoteSandboxProvider, type RemoteSandboxProviderConfig, type ReplyReadyEvent, type Resolution, type ResolutionAction, type ResolveAgentFn, type ResolvedConfig, type ResumeTaskResult, type RoomAgentMessageCallbackFailure, type RoomAgentMessageCommitted, type RoomAgentMessageInput, RoomAgentMessageService, type RoomAgentReplyInput, type RunSandboxConfig, type RuntimeModelConfig, type RuntimeSkillSelection, SAFE_PATH_COMPONENT, type STTModelInfo, STTModelLattice, type STTModelLatticeInterface, STTModelLatticeManager, type SandboxFileInfo, type SandboxFileService, SandboxFilesystem, type SandboxGrepMatch, type SandboxInstance, type SandboxIsolationLevel, SandboxLatticeManager, type SandboxManagerProtocol, type SandboxProvider, type SandboxProviderFactory, type SandboxProviderType, type SandboxShellService, SandboxSkillStore, type SandboxSkillStoreOptions, type SandboxVolumeDefinition, type ScheduleLattice, ScheduleLatticeManager, type SchedulerMiddlewareOptions, SemanticMetricsClient, type SharePayload, SimpleMemoryVectorStore, type SkillLattice, SkillLatticeManager, type SkillMeta, type SkillResource, SqlDatabaseManager, type StartLifecycleResult, type StartTaskExecutionInput, type StateAndStore, StateBackend, StoreBackend, type StoreLattice, StoreLatticeManager, type StoreType, type StoreTypeMap, type SubmitTaskReviewInput, TASK_RESPONSE_FINAL_WARNING_LIMIT, TASK_RESPONSE_PRIOR_WARNING_LIMIT, TASK_RESPONSE_SCALAR_MAX_BYTES, TOOL_RESULT_TOKEN_LIMIT, TRUNCATION_GUIDANCE, type TableInfo, type TableSchema, type TaskAgentInvocation, type TaskEvent, type TaskExecutionFailure, type TaskExecutionResult, type TaskExecutionServiceDeps, type TaskExecutionSuccess, type TaskLifecycleListener, type TaskLifecycleNotification, TaskLifecycleNotifier, TaskLifecycleService, type TaskLifecycleServiceDeps, type TaskListStore, type TaskResponseParseResult, type TaskSpec, TaskStatus, type TaskUpdatable, TeamAgentGraphBuilder, type TeamConfig, type TeamMiddlewareOptions, type TeamTask, type TeammateSpec, type TeammateToolsOptions, type ThreadBuffer, type ThreadBufferConfig, type ThreadBusyEvent, type ThreadIdleEvent, type ThreadInfo, type ThreadQueueConfig, type ThreadState, ThreadStatus, type ThreadStatusChangedEvent, TokenCache, type ToolDefinition, type ToolLattice, ToolLatticeManager, type TrustedAgentMessageDispatcher, type TrustedMessageOptions, type UnknownToolHandlerConfig, type VectorStoreLatticeInterface, VectorStoreLatticeManager, type VectorStoreProviderLattice, VectorStoreProviderManager, VolumeFilesystem, type VolumeFsClient, type WorkflowValidationError, type WriteResult, abortWorkflowRun, agentInstanceManager, agentLatticeManager, appendReconciliationWarning, buildGrepResultsDict, buildInput, buildNamedVolumeName, buildRemotePackDirectoryCommand, buildSandboxMetadataEnv, buildSkillFile, buildStateAnnotation, buildTableName, buildTaskMutationFallback, buildTaskNormalizationFallback, checkEmptyContent, clearEncryptionKeyCache, clearEvalRunService, collectionLatticeManager, compileInternal, compileWorkflow, computeSandboxName, configureStores, connectAllChannels, createAgentNode, createAgentTeam, createCapabilityGuardMiddleware, createExecuteSqlQueryTool, createFileData, createInfoSqlTool, createListMetricsDataSourcesTool, createListMetricsServersTool, createListTablesSqlTool, createMapNode, createModelSelectorMiddleware, createNodeHandler, createProjectRoomMiddleware, createProjectTaskOwnerPolicy, createProjectTaskReassignmentAuthorizer, createQueryCheckerSqlTool, createQueryMetricDefinitionTool, createQueryMetricsListTool, createQuerySemanticMetricDataTool, createQuerySqlTool, createQueryTableDefinitionTool, createQueryTablesListTool, createResourceAddress, createSandboxProvider, createSchedulerMiddleware, createSemanticMetricsMiddleware, createSharePayload, createTaskExecutionService, createTaskLifecycleService, createTaskMiddleware, createTeamMiddleware, createTeammateTools, createTrustedAgentMessageDispatcher, createUnknownToolHandlerMiddleware, createWidgetMiddleware, decrypt, describeCronExpression, documentLearningPlugin, documentParserPlugin, embeddingsLatticeManager, encrypt, ensureBuiltinAgentsForTenant, ensurePluginSkillInSandbox, evaluateLatticeCaseWithLogs, eventBus, eventBus as eventBusDefault, extractFetcherError, extractOutput, fileDataToString, formatContentWithLineNumbers, formatGrepMatches, formatGrepResults, formatReadResponse, generateDirectBotProjectId, generateDirectHumanProjectId, generateToken, getAgentClient, getAgentConfig, getAllAgentConfigs, getAllBuiltInSkillMetas, getAllToolDefinitions, getBindingRegistry, getBuiltInSkillContent, getBuiltInSkillMeta, getBuiltInSkillNames, getCheckpointSaver, getChunkBuffer, getCollectionEntryCount, getEmbeddingsClient, getEmbeddingsLattice, getEncryptionKey, getEvalRunService, getLoggerLattice, getMenuRegistry, getModelLattice, getNextCronTime, getOrCreateCollectionVectorStore, getPluginSkillManifestVersion, getQueueLattice, getRuntimeCapabilityConfig, getRuntimeSkillSelection, getSTTClient, getSTTClientWithTenant, getSTTModelLattice, getSandBoxManager, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, getVectorStoreProvider, getWorkflowSignal, globSearchFiles, grepMatchesFromFiles, grepSearchFiles, hasChunkBuffer, hasDelegatedWorkerToken, hasRuntimeCapabilityPolicy, invokeWithRetry, isBuiltInSkill, isDirectRoom, isPluginSkillAuthorizedInSandbox, isPluginSkillManagedInSandbox, isProjectLifecycleTask, isUsingDefaultKey, isValidCronExpression, isValidSandboxName, isValidSkillName, listCollectionEntries, listSandboxProviderTypes, loggerLatticeManager, mcpManager, mergeCapabilityBundles, metricsServerManager, modelLatticeManager, normalizeSandboxName, ownTaskResponseField, parallelLimit, parseCronExpression, parseDirectRoomType, parseExternalDependency, parseJudgeVerdict, parsePackSize, parseSkillFrontmatter, parseTaskResponse, parseYaml, performStringReplacement, postProcessTaskMutationResponse, projectMutationMutex, projectRoomPlugin, projectTaskAdmissionNotifier, queueLatticeManager, registerAgentLattice, registerAgentLatticeWithTenant, registerAgentLattices, registerCheckpointSaver, registerChunkBuffer, registerEmbeddingsLattice, registerExistingTool, registerLoggerLattice, registerModelLattice, registerQueueLattice, registerSTTModelLattice, registerSandboxProviderType, registerScheduleLattice, registerStoreLattice, registerTeammateAgent, registerToolLattice, registerVectorStoreLattice, registerVectorStoreProvider, registerWorkflowRun, removeCollectionVectorStore, renderTemplate, resolveJudgeModelKey, resolvePath, runRemotePackDirectory, safeTaskResponseId, sandboxLatticeManager, sanitizeToolCallId, scheduleLatticeManager, semanticMetricsPlugin, serializePluginMeta, serializeTaskMutationSuccess, serializeTaskNormalizationFallback, serializeTaskReadResponse, setBindingRegistry, setEvalRunService, setMenuRegistry, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, sttModelLatticeManager, taskLifecycleNotifier, toJsonSchema, toSafeStateExpr, toolLatticeManager, truncateIfTooLong, unregisterTeammateAgent, unregisterWorkflowRun, updateFileData, validateAgentInput, validateCapabilityBundleInput, validateDSL, validateEncryptionKey, validatePackSourcePath, validatePath, validateRelativePath, validateSkillName, validateToolInput, vectorStoreLatticeManager, vectorStoreProviderManager };
11092
+ export { AGENT_TASK_EVENT, type AddMessageParams, type AddMessageResult, Agent, type AgentClient, type AgentExecutor, AgentInstanceManager, type AgentLattice, AgentLatticeManager, type AgentLifecycleEventName, AgentManager, type AgentStreamExecutor, type AgentTaskCompletionInput, type AgentThreadInterface, type ApproveInterruptedTaskInput, BUILTIN_PLUGINS, BUILTIN_SKILLS, type BackendFactory, type BackendProtocol, type BufferStats, CAPABILITY_TOOL_NAME_CONFLICT, type CacheEntry, type CalibrationProbe, CapabilityBundleMergeError, type CapabilityBundleMergeErrorCode, CapabilityBundleMerger, CapabilityBundleValidationError, type CapabilityBundleValidationErrorCode, type CapabilityGuardDenialCode, type CapabilityResourceSelector, type CapabilityToolMetadata, CapabilityToolNameConflictError, CapabilityToolRegistry, type CaseRunResult, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, CollectionLatticeManager, type ColumnInfo, type CompileSandboxPluginArgs, CompositeBackend, type ConflictItem, type ConnectAllChannelsOptions, ConnectionRegistry, ConsoleLoggerClient, type CreateSandboxProviderConfig, type CronFields, CustomMetricsClient, type CustomMiddlewareFactory, CustomMiddlewareRegistry, DEFAULT_CALIBRATION_PROBES, type DatabaseConfig, type DatabaseType, DaytonaInstance, DaytonaProvider, type DaytonaProviderConfig, DefaultScheduleClient, DelegatedScopeNotQueueableError, type DeleteResult, DependencyResolver, DuplicateProjectRoomMessageIdempotencyKeyError, E2BInstance, E2BProvider, type E2BProviderConfig, EMPTY_CONTENT_WARNING, type EditResult, type EmbeddingsInfo, type EmbeddingsLatticeInterface, EmbeddingsLatticeManager, type EnsureMicrosandboxInput, type EvalRunService, type ExportBundle, type ExportContext, type ExportJob, type ExportableEntity, type ExportableEntityDefinition, ExportableEntityRegistry, type ExportableFile, type ExportableTypeInfo, type ExternalDependencyInterruption, type FileData, type FileInfo, FileSystemSkillStore, type FileSystemSkillStoreOptions, FilesystemBackend, type FsEntry, type GrepMatch, type IMessageQueueStore, type IMetricsServerClient, type ISqlDatabase, IdRemapper, type ImportApplyResolution, type ImportApplyResult, type ImportEntityResult, type ImportEntityStatus, type ImportPreviewResult, InMemoryA2AApiKeyStore, InMemoryAgentWebAppStore, InMemoryAssistantStore, InMemoryBindingStore, InMemoryCapabilityBundleStore, InMemoryChannelInstallationStore, InMemoryChunkBuffer, InMemoryCollectionStore, InMemoryDatabaseConfigStore, InMemoryMailboxStore, InMemoryMenuStore, InMemoryOpenAuditStore, InMemoryProjectBotMembershipStore, InMemoryProjectMembershipStore, InMemoryProjectRoomCoordinator, InMemoryProjectRoomMessageStore, InMemoryProjectRoomReadStateStore, InMemoryProjectRoomStore, InMemoryTaskListStore, InMemoryTaskStore, InMemoryTenantStore, InMemoryThreadMessageQueueStore, InMemoryThreadStore, InMemoryUserStore, InMemoryUserTenantLinkStore, type InsertionItem, type JudgeVerdict, LINE_NUMBER_WIDTH, type LangGraphStateChecker, type LatticeAgentStepConfig, LatticeEval, type LatticeEvalBatchReport, type LatticeEvalCase, type LatticeEvalCaseType, type LatticeEvalCaseWithTemplate, type LatticeEvalConfig, type LatticeEvalLogEvent, type LatticeEvalLogLevel, LatticeEvalProject, type LatticeEvalProjectType, type LatticeEvalResult, type LatticeEvalRubric, LatticeEvalSuite, type LatticeEvalSuiteType, type LatticeEvalTemplate, type LifecycleResult, type LifecycleWarning, LocalSandboxInstance, LocalSandboxProvider, type LocalSandboxProviderConfig, type LoggerLattice, LoggerLatticeManager, MAX_LINE_LENGTH, MAX_PACK_ENTRIES, MAX_PACK_FILE_BYTES, MAX_PACK_TOTAL_BYTES, type MailboxMessage, type MailboxStore, type ManifestValidationResult, type McpLatticeInterface, McpLatticeManager, type McpServerInfo, MemoryBackend, MemoryLatticeManager, MemoryQueueClient, MemoryScheduleStorage, type MergedPluginSkills, type MessageCompletedEvent, type MessageContent, type MessageContentPart, type MessageContentValue, type MessageFailedEvent, type MessageInterruptedEvent, type MessageLike, type MessageStartedEvent, MessageType, MetricsServerManager, MicrosandboxRemoteInstance, MicrosandboxRemoteProvider, type MicrosandboxRemoteProviderClient, type MicrosandboxRemoteProviderConfig, MicrosandboxServiceClient, type MicrosandboxServiceClientConfig, type MicrosandboxShellExecInput, type ModelConfig, type ModelLatticeInterface, ModelLatticeManager, MysqlDatabase, type OutputType, PACK_DIRECTORY_TIMEOUT_SECONDS, type PackSourceInfo, type PendingMessage, PersonalAssistantConfig, PinoLoggerClient, PluginRegistry, type PostProcessTaskMutationResponseInput, PostgresDatabase, type PreviewError, ProjectBotMembershipIdConflictError, ProjectMutationMutex, type ProjectMutationScope, ProjectRoomMessageIdConflictError, type ProjectTaskAdmissionListener, type ProjectTaskAdmissionNotification, ProjectTaskAdmissionNotifier, type ProjectTaskAdmissionNotifierOptions, type ProjectTaskAssignmentScope, ProjectTaskOwnerPolicy, type ProjectTaskOwnerPolicyCode, ProjectTaskOwnerPolicyError, type ProjectTaskReassignmentAuthorization, type ProjectTaskReassignmentAuthorizationInput, type ProjectTaskReassignmentAuthorizer, type ProjectTaskReassignmentThreadValidationInput, type ProjectTaskReassignmentThreadValidator, type ProjectTaskRosterScope, PrometheusClient, type QueryResult, type QueueLattice, QueueLatticeManager, type QueueMessage, QueueMode, type QueuePendingEvent, type QueueScope, type ReassignProjectTaskInput, type ReconcileTaskDescriptionInput, type RejectInterruptedTaskInput, RemoteSandboxInstance, RemoteSandboxProvider, type RemoteSandboxProviderConfig, type ReplyReadyEvent, type Resolution, type ResolutionAction, type ResolveAgentFn, type ResolvedConfig, type ResolvedPluginSkill, type ResumeTaskResult, type RoomAgentMessageCallbackFailure, type RoomAgentMessageCommitted, type RoomAgentMessageInput, RoomAgentMessageService, type RoomAgentReplyInput, type RunSandboxConfig, type RuntimeModelConfig, type RuntimeSkillSelection, SAFE_PATH_COMPONENT, type STTModelInfo, STTModelLattice, type STTModelLatticeInterface, STTModelLatticeManager, type SandboxFileInfo, type SandboxFileService, SandboxFilesystem, type SandboxGrepMatch, type SandboxInstance, type SandboxIsolationLevel, SandboxLatticeManager, type SandboxManagerProtocol, SandboxPluginExecutor, type SandboxPluginExecutorDeps, type SandboxPluginInvokeArgs, type SandboxPluginResult, type SandboxProvider, type SandboxProviderFactory, type SandboxProviderType, type SandboxResolver, type SandboxRunConfig, type SandboxShellService, SandboxSkillStore, type SandboxSkillStoreOptions, type SandboxVolumeDefinition, type ScheduleLattice, ScheduleLatticeManager, type SchedulerMiddlewareOptions, SemanticMetricsClient, type SharePayload, SimpleMemoryVectorStore, type SkillLattice, SkillLatticeManager, type SkillMeta, type SkillResource, SqlDatabaseManager, type StartLifecycleResult, type StartTaskExecutionInput, type StateAndStore, StateBackend, StoreBackend, type StoreLattice, StoreLatticeManager, type StoreType, type StoreTypeMap, type SubmitTaskReviewInput, TASK_RESPONSE_FINAL_WARNING_LIMIT, TASK_RESPONSE_PRIOR_WARNING_LIMIT, TASK_RESPONSE_SCALAR_MAX_BYTES, TOOL_RESULT_TOKEN_LIMIT, TRUNCATION_GUIDANCE, type TableInfo, type TableSchema, type TaskAgentInvocation, type TaskEvent, type TaskExecutionFailure, type TaskExecutionResult, type TaskExecutionServiceDeps, type TaskExecutionSuccess, type TaskLifecycleListener, type TaskLifecycleNotification, TaskLifecycleNotifier, TaskLifecycleService, type TaskLifecycleServiceDeps, type TaskListStore, type TaskResponseParseResult, type TaskSpec, TaskStatus, type TaskUpdatable, TeamAgentGraphBuilder, type TeamConfig, type TeamMiddlewareOptions, type TeamTask, type TeammateSpec, type TeammateToolsOptions, TenantPluginCatalog, type TenantPluginCatalogDeps, type TenantPlugins, type ThreadBuffer, type ThreadBufferConfig, type ThreadBusyEvent, type ThreadIdleEvent, type ThreadInfo, type ThreadQueueConfig, type ThreadState, ThreadStatus, type ThreadStatusChangedEvent, TokenCache, type ToolDefinition, type ToolLattice, ToolLatticeManager, type TrustedAgentMessageDispatcher, type TrustedMessageOptions, type UnknownToolHandlerConfig, type ValidateManifestArgs, type VectorStoreLatticeInterface, VectorStoreLatticeManager, type VectorStoreProviderLattice, VectorStoreProviderManager, VolumeFilesystem, type VolumeFsClient, type WorkflowValidationError, type WriteResult, abortWorkflowRun, agentInstanceManager, agentLatticeManager, appendReconciliationWarning, buildGrepResultsDict, buildInput, buildNamedVolumeName, buildRemotePackDirectoryCommand, buildSandboxMetadataEnv, buildSkillFile, buildStateAnnotation, buildTableName, buildTaskMutationFallback, buildTaskNormalizationFallback, checkEmptyContent, clearEncryptionKeyCache, clearEvalRunService, collectionLatticeManager, compileInternal, compileSandboxPlugin, compileWorkflow, computeSandboxName, configureStores, connectAllChannels, createAgentNode, createAgentTeam, createCapabilityGuardMiddleware, createExecuteSqlQueryTool, createFileData, createInfoSqlTool, createListMetricsDataSourcesTool, createListMetricsServersTool, createListTablesSqlTool, createMapNode, createModelSelectorMiddleware, createNodeHandler, createProjectRoomMiddleware, createProjectTaskOwnerPolicy, createProjectTaskReassignmentAuthorizer, createQueryCheckerSqlTool, createQueryMetricDefinitionTool, createQueryMetricsListTool, createQuerySemanticMetricDataTool, createQuerySqlTool, createQueryTableDefinitionTool, createQueryTablesListTool, createResourceAddress, createSandboxProvider, createSandboxResolver, createSchedulerMiddleware, createSemanticMetricsMiddleware, createSharePayload, createTaskExecutionService, createTaskLifecycleService, createTaskMiddleware, createTeamMiddleware, createTeammateTools, createTrustedAgentMessageDispatcher, createUnknownToolHandlerMiddleware, createWidgetMiddleware, decrypt, describeCronExpression, documentLearningPlugin, documentParserPlugin, embeddingsLatticeManager, encrypt, ensureBuiltinAgentsForTenant, ensurePluginSkillInSandbox, evaluateLatticeCaseWithLogs, eventBus, eventBus as eventBusDefault, extractFetcherError, extractOutput, fileDataToString, formatContentWithLineNumbers, formatGrepMatches, formatGrepResults, formatReadResponse, generateDirectBotProjectId, generateDirectHumanProjectId, generateToken, getAgentClient, getAgentConfig, getAllAgentConfigs, getAllBuiltInSkillMetas, getAllToolDefinitions, getBindingRegistry, getBuiltInSkillContent, getBuiltInSkillMeta, getBuiltInSkillNames, getCheckpointSaver, getChunkBuffer, getCollectionEntryCount, getEmbeddingsClient, getEmbeddingsLattice, getEncryptionKey, getEvalRunService, getLoggerLattice, getMenuRegistry, getModelLattice, getNextCronTime, getOrCreateCollectionVectorStore, getPluginSkillManifestVersion, getQueueLattice, getRuntimeCapabilityConfig, getRuntimeSkillSelection, getSTTClient, getSTTClientWithTenant, getSTTModelLattice, getSandBoxManager, getSandboxPluginCatalog, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, getVectorStoreProvider, getWorkflowSignal, globSearchFiles, grepMatchesFromFiles, grepSearchFiles, hasChunkBuffer, hasDelegatedWorkerToken, hasRuntimeCapabilityPolicy, invokeWithRetry, isBuiltInSkill, isDirectRoom, isPluginSkillAuthorizedInSandbox, isPluginSkillManagedInSandbox, isProjectLifecycleTask, isUsingDefaultKey, isValidCronExpression, isValidSandboxName, isValidSkillName, jsonSchemaToZod, listCollectionEntries, listSandboxProviderTypes, loggerLatticeManager, mcpManager, mergeCapabilityBundles, mergePluginSkills, mergePluginSources, metricsServerManager, modelLatticeManager, normalizeSandboxName, ownTaskResponseField, parallelLimit, parseCronExpression, parseDirectRoomType, parseExternalDependency, parseJudgeVerdict, parsePackSize, parseSkillFrontmatter, parseTaskResponse, parseYaml, performStringReplacement, postProcessTaskMutationResponse, projectMutationMutex, projectRoomPlugin, projectTaskAdmissionNotifier, queueLatticeManager, registerAgentLattice, registerAgentLatticeWithTenant, registerAgentLattices, registerCheckpointSaver, registerChunkBuffer, registerEmbeddingsLattice, registerExistingTool, registerLoggerLattice, registerModelLattice, registerQueueLattice, registerSTTModelLattice, registerSandboxProviderType, registerScheduleLattice, registerStoreLattice, registerTeammateAgent, registerToolLattice, registerVectorStoreLattice, registerVectorStoreProvider, registerWorkflowRun, removeCollectionVectorStore, renderTemplate, resolveEnabledPluginSkill, resolveJudgeModelKey, resolvePath, resolveSandboxPluginConnections, resolveTenantPluginSkill, runRemotePackDirectory, safeTaskResponseId, sandboxLatticeManager, sanitizeToolCallId, scheduleLatticeManager, semanticMetricsPlugin, serializePluginMeta, serializeTaskMutationSuccess, serializeTaskNormalizationFallback, serializeTaskReadResponse, setBindingRegistry, setEvalRunService, setMenuRegistry, setSandboxPluginCatalog, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, sttModelLatticeManager, taskLifecycleNotifier, toJsonSchema, toSafeStateExpr, toolLatticeManager, truncateIfTooLong, unregisterTeammateAgent, unregisterWorkflowRun, updateFileData, validateAgentInput, validateCapabilityBundleInput, validateDSL, validateEncryptionKey, validatePackSourcePath, validatePath, validateRelativePath, validateSandboxPluginManifest, validateSkillName, validateToolInput, vectorStoreLatticeManager, vectorStoreProviderManager };