@axiom-lattice/core 2.1.76 → 2.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +258 -0
- package/dist/index.d.mts +521 -29
- package/dist/index.d.ts +521 -29
- package/dist/index.js +330 -22
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +329 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -3233,40 +3233,161 @@ declare class InMemoryUserTenantLinkStore implements UserTenantLinkStore {
|
|
|
3233
3233
|
}
|
|
3234
3234
|
|
|
3235
3235
|
/**
|
|
3236
|
-
*
|
|
3236
|
+
* In-memory implementation of {@link ChannelInstallationStore}.
|
|
3237
3237
|
*
|
|
3238
|
-
*
|
|
3239
|
-
*
|
|
3238
|
+
* Stores per-tenant channel installation configurations (Lark app credentials,
|
|
3239
|
+
* Slack bot tokens, etc.). Each installation defines how a specific external
|
|
3240
|
+
* app instance connects to Axiom Lattice, including fallback agent and
|
|
3241
|
+
* `rejectWhenNoBinding` behavior.
|
|
3242
|
+
*
|
|
3243
|
+
* @example
|
|
3244
|
+
* ```ts
|
|
3245
|
+
* import { InMemoryChannelInstallationStore } from "@axiom-lattice/core";
|
|
3246
|
+
*
|
|
3247
|
+
* const store = new InMemoryChannelInstallationStore();
|
|
3248
|
+
* await store.createInstallation("tenant-a", "install-1", {
|
|
3249
|
+
* channel: "lark",
|
|
3250
|
+
* name: "Production Bot",
|
|
3251
|
+
* config: { appId: "cli_xxx", appSecret: "secret" },
|
|
3252
|
+
* fallbackAgentId: "agent-1",
|
|
3253
|
+
* rejectWhenNoBinding: false,
|
|
3254
|
+
* });
|
|
3255
|
+
* ```
|
|
3256
|
+
*
|
|
3257
|
+
* @see {@link ChannelInstallationStore} — Protocol interface
|
|
3258
|
+
* @see {@link InMemoryBindingStore} — Companion binding store
|
|
3240
3259
|
*/
|
|
3241
3260
|
|
|
3242
3261
|
declare class InMemoryChannelInstallationStore implements ChannelInstallationStore {
|
|
3243
3262
|
private installations;
|
|
3263
|
+
/**
|
|
3264
|
+
* Retrieves a channel installation by its unique ID.
|
|
3265
|
+
*
|
|
3266
|
+
* @param installationId - The installation identifier
|
|
3267
|
+
* @returns The {@link ChannelInstallation} or `null` if not found
|
|
3268
|
+
*/
|
|
3244
3269
|
getInstallationById(installationId: string): Promise<ChannelInstallation | null>;
|
|
3270
|
+
/**
|
|
3271
|
+
* Lists all channel installations for a tenant, optionally filtered by channel type.
|
|
3272
|
+
*
|
|
3273
|
+
* @param tenantId - Tenant identifier
|
|
3274
|
+
* @param channel - Optional channel type filter (`"lark"`, `"email"`, `"slack"`)
|
|
3275
|
+
* @returns Array of matching {@link ChannelInstallation} objects
|
|
3276
|
+
*/
|
|
3245
3277
|
getInstallationsByTenant(tenantId: string, channel?: ChannelInstallationType): Promise<ChannelInstallation[]>;
|
|
3278
|
+
/**
|
|
3279
|
+
* Creates a new channel installation for a tenant.
|
|
3280
|
+
*
|
|
3281
|
+
* @param tenantId - Tenant identifier
|
|
3282
|
+
* @param installationId - Unique installation ID (caller-defined)
|
|
3283
|
+
* @param data - {@link CreateChannelInstallationRequest} containing channel type, name, config, and fallback settings
|
|
3284
|
+
* @returns The created {@link ChannelInstallation}
|
|
3285
|
+
*/
|
|
3246
3286
|
createInstallation(tenantId: string, installationId: string, data: CreateChannelInstallationRequest): Promise<ChannelInstallation>;
|
|
3287
|
+
/**
|
|
3288
|
+
* Updates an existing channel installation. Config fields are shallow-merged.
|
|
3289
|
+
*
|
|
3290
|
+
* @param tenantId - Tenant identifier (used for isolation check)
|
|
3291
|
+
* @param installationId - Installation ID to update
|
|
3292
|
+
* @param updates - {@link UpdateChannelInstallationRequest} with fields to patch
|
|
3293
|
+
* @returns The updated {@link ChannelInstallation} or `null` if not found or tenant mismatch
|
|
3294
|
+
*/
|
|
3247
3295
|
updateInstallation(tenantId: string, installationId: string, updates: UpdateChannelInstallationRequest): Promise<ChannelInstallation | null>;
|
|
3296
|
+
/**
|
|
3297
|
+
* Deletes a channel installation.
|
|
3298
|
+
*
|
|
3299
|
+
* @param tenantId - Tenant identifier (used for isolation check)
|
|
3300
|
+
* @param installationId - Installation ID to delete
|
|
3301
|
+
* @returns `true` if deleted, `false` if not found or tenant mismatch
|
|
3302
|
+
*/
|
|
3248
3303
|
deleteInstallation(tenantId: string, installationId: string): Promise<boolean>;
|
|
3304
|
+
/**
|
|
3305
|
+
* Clears all in-memory installations. Primarily used in tests.
|
|
3306
|
+
*/
|
|
3249
3307
|
clear(): void;
|
|
3250
3308
|
}
|
|
3251
3309
|
|
|
3252
3310
|
/**
|
|
3253
|
-
*
|
|
3311
|
+
* In-memory implementation of {@link BindingRegistry}.
|
|
3312
|
+
*
|
|
3313
|
+
* Stores sender-to-agent bindings that bridge external channel identities (Lark open_id,
|
|
3314
|
+
* Slack userId, email address, etc.) to Axiom Lattice agents and threads.
|
|
3315
|
+
*
|
|
3316
|
+
* During `MessageRouter.dispatch()`, the router calls {@link resolve} to determine
|
|
3317
|
+
* which agent should handle an inbound message. The binding also controls thread
|
|
3318
|
+
* lifecycle via {@link Binding.threadMode}:
|
|
3319
|
+
*
|
|
3320
|
+
* - `"fixed"` — All messages from this sender reuse the same `threadId`.
|
|
3321
|
+
* - `"per_conversation"` — Each conversation creates a new thread.
|
|
3322
|
+
*
|
|
3323
|
+
* @example
|
|
3324
|
+
* ```ts
|
|
3325
|
+
* import { InMemoryBindingStore, setBindingRegistry } from "@axiom-lattice/core";
|
|
3254
3326
|
*
|
|
3255
|
-
*
|
|
3256
|
-
*
|
|
3327
|
+
* const store = new InMemoryBindingStore();
|
|
3328
|
+
* setBindingRegistry(store);
|
|
3329
|
+
*
|
|
3330
|
+
* const binding = await store.create({
|
|
3331
|
+
* channel: "slack",
|
|
3332
|
+
* channelInstallationId: "install-1",
|
|
3333
|
+
* tenantId: "tenant-a",
|
|
3334
|
+
* senderId: "U12345",
|
|
3335
|
+
* agentId: "agent-1",
|
|
3336
|
+
* threadMode: "fixed",
|
|
3337
|
+
* });
|
|
3338
|
+
* ```
|
|
3339
|
+
*
|
|
3340
|
+
* @see {@link BindingRegistry} — Protocol interface
|
|
3341
|
+
* @see {@link setBindingRegistry} — Global registration
|
|
3342
|
+
* @see {@link manageBindingSchema} — Agent tool for dynamic binding management
|
|
3257
3343
|
*/
|
|
3258
3344
|
|
|
3259
3345
|
declare class InMemoryBindingStore implements BindingRegistry {
|
|
3260
3346
|
private bindings;
|
|
3347
|
+
/**
|
|
3348
|
+
* Resolves a binding for the given sender across a specific channel installation.
|
|
3349
|
+
*
|
|
3350
|
+
* Called by `MessageRouter.dispatch()` during inbound message processing.
|
|
3351
|
+
* Matches on `channel + senderId + channelInstallationId + tenantId` and
|
|
3352
|
+
* requires `enabled === true`.
|
|
3353
|
+
*
|
|
3354
|
+
* @param params - Resolution parameters
|
|
3355
|
+
* @returns The matching {@link Binding} or `null` if none found.
|
|
3356
|
+
*/
|
|
3261
3357
|
resolve(params: {
|
|
3262
3358
|
channel: string;
|
|
3263
3359
|
senderId: string;
|
|
3264
3360
|
channelInstallationId: string;
|
|
3265
3361
|
tenantId: string;
|
|
3266
3362
|
}): Promise<Binding | null>;
|
|
3363
|
+
/**
|
|
3364
|
+
* Creates a new sender-to-agent binding.
|
|
3365
|
+
*
|
|
3366
|
+
* @param input - {@link CreateBindingInput} defining channel, sender, target agent, and thread mode.
|
|
3367
|
+
* @returns The newly created {@link Binding}.
|
|
3368
|
+
*/
|
|
3267
3369
|
create(input: CreateBindingInput): Promise<Binding>;
|
|
3370
|
+
/**
|
|
3371
|
+
* Updates an existing binding (e.g. changing the target agent or thread mode).
|
|
3372
|
+
*
|
|
3373
|
+
* @param id - Binding ID
|
|
3374
|
+
* @param patch - Partial {@link Binding} fields to update
|
|
3375
|
+
* @returns The updated {@link Binding}
|
|
3376
|
+
* @throws {Error} If the binding does not exist
|
|
3377
|
+
*/
|
|
3268
3378
|
update(id: string, patch: Partial<Binding>): Promise<Binding>;
|
|
3379
|
+
/**
|
|
3380
|
+
* Deletes a binding by ID.
|
|
3381
|
+
*
|
|
3382
|
+
* @param id - Binding ID
|
|
3383
|
+
*/
|
|
3269
3384
|
delete(id: string): Promise<void>;
|
|
3385
|
+
/**
|
|
3386
|
+
* Lists bindings filtered by tenant and optional channel/agent/installation.
|
|
3387
|
+
*
|
|
3388
|
+
* @param params - Filter and pagination parameters
|
|
3389
|
+
* @returns Array of matching {@link Binding} objects
|
|
3390
|
+
*/
|
|
3270
3391
|
list(params: {
|
|
3271
3392
|
channel?: string;
|
|
3272
3393
|
agentId?: string;
|
|
@@ -3275,10 +3396,25 @@ declare class InMemoryBindingStore implements BindingRegistry {
|
|
|
3275
3396
|
limit?: number;
|
|
3276
3397
|
offset?: number;
|
|
3277
3398
|
}): Promise<Binding[]>;
|
|
3399
|
+
/**
|
|
3400
|
+
* Bulk-imports bindings.
|
|
3401
|
+
*
|
|
3402
|
+
* @param bindings - Array of {@link CreateBindingInput}
|
|
3403
|
+
* @returns Array of created {@link Binding} objects
|
|
3404
|
+
*/
|
|
3278
3405
|
import(bindings: CreateBindingInput[]): Promise<Binding[]>;
|
|
3406
|
+
/**
|
|
3407
|
+
* Exports all bindings for a tenant.
|
|
3408
|
+
*
|
|
3409
|
+
* @param params - Filter by tenantId
|
|
3410
|
+
* @returns Array of {@link Binding} objects
|
|
3411
|
+
*/
|
|
3279
3412
|
export(params: {
|
|
3280
3413
|
tenantId: string;
|
|
3281
3414
|
}): Promise<Binding[]>;
|
|
3415
|
+
/**
|
|
3416
|
+
* Clears all in-memory bindings. Primarily used in tests.
|
|
3417
|
+
*/
|
|
3282
3418
|
clear(): void;
|
|
3283
3419
|
}
|
|
3284
3420
|
|
|
@@ -4266,7 +4402,42 @@ declare function buildSandboxMetadataEnv(config?: RunSandboxConfig): Record<stri
|
|
|
4266
4402
|
|
|
4267
4403
|
declare function buildNamedVolumeName(prefix: "s" | "a" | "p", ...parts: Array<string | undefined>): string;
|
|
4268
4404
|
|
|
4405
|
+
/**
|
|
4406
|
+
* Sets the global {@link BindingRegistry} instance used by the channel message router.
|
|
4407
|
+
*
|
|
4408
|
+
* The registry resolves which agent/thread should handle an inbound message from an
|
|
4409
|
+
* external channel (Lark, Slack, Email, etc.). It is queried during
|
|
4410
|
+
* `MessageRouter.dispatch()` to map a sender ID to a binding.
|
|
4411
|
+
*
|
|
4412
|
+
* @example
|
|
4413
|
+
* ```ts
|
|
4414
|
+
* import { configureStores, setBindingRegistry, getStoreLattice } from "@axiom-lattice/core";
|
|
4415
|
+
* import { PostgreSQLBindingStore } from "@axiom-lattice/pg-stores";
|
|
4416
|
+
*
|
|
4417
|
+
* await configureStores({
|
|
4418
|
+
* channelBinding: new PostgreSQLBindingStore({ pool }),
|
|
4419
|
+
* });
|
|
4420
|
+
*
|
|
4421
|
+
* const bindingStore = getStoreLattice("default", "channelBinding").store as BindingRegistry;
|
|
4422
|
+
* setBindingRegistry(bindingStore);
|
|
4423
|
+
* ```
|
|
4424
|
+
*
|
|
4425
|
+
* @param r - A {@link BindingRegistry} implementation (e.g. `InMemoryBindingStore` or `PostgreSQLBindingStore`)
|
|
4426
|
+
* @see {@link getBindingRegistry}
|
|
4427
|
+
* @see {@link InMemoryBindingStore}
|
|
4428
|
+
*/
|
|
4269
4429
|
declare function setBindingRegistry(r: BindingRegistry): void;
|
|
4430
|
+
/**
|
|
4431
|
+
* Returns the globally registered {@link BindingRegistry}.
|
|
4432
|
+
*
|
|
4433
|
+
* Must be called **after** {@link setBindingRegistry}. The registry is used by
|
|
4434
|
+
* `MessageRouter.dispatch()` in `packages/gateway` to look up the agent binding
|
|
4435
|
+
* for an incoming channel message.
|
|
4436
|
+
*
|
|
4437
|
+
* @returns The active {@link BindingRegistry} instance.
|
|
4438
|
+
* @throws {Error} If the registry has not been initialized.
|
|
4439
|
+
* @see {@link setBindingRegistry}
|
|
4440
|
+
*/
|
|
4270
4441
|
declare function getBindingRegistry(): BindingRegistry;
|
|
4271
4442
|
|
|
4272
4443
|
/**
|
|
@@ -5515,12 +5686,18 @@ declare class AgentManager {
|
|
|
5515
5686
|
}, return_agent_state?: boolean): Promise<unknown>;
|
|
5516
5687
|
}
|
|
5517
5688
|
|
|
5689
|
+
/** Execution state of a thread. */
|
|
5518
5690
|
declare enum ThreadStatus {
|
|
5519
5691
|
IDLE = "idle",
|
|
5520
5692
|
BUSY = "busy",
|
|
5521
5693
|
INTERRUPTED = "interrupted",
|
|
5522
5694
|
ERROR = "error"
|
|
5523
5695
|
}
|
|
5696
|
+
/**
|
|
5697
|
+
* Snapshot of a thread's current state including queue and status.
|
|
5698
|
+
*
|
|
5699
|
+
* Used for recovery, monitoring, and external queries about thread health.
|
|
5700
|
+
*/
|
|
5524
5701
|
interface ThreadState {
|
|
5525
5702
|
threadId: string;
|
|
5526
5703
|
assistantId: string;
|
|
@@ -5534,6 +5711,25 @@ interface ThreadState {
|
|
|
5534
5711
|
pendingMessages: PendingMessage[];
|
|
5535
5712
|
pendingCount: number;
|
|
5536
5713
|
}
|
|
5714
|
+
/**
|
|
5715
|
+
* Message payload passed to {@link Agent.addMessage}.
|
|
5716
|
+
*
|
|
5717
|
+
* Supports both a legacy single-message format (`input.message`) and a
|
|
5718
|
+
* multi-message format (`input.messages[]` for mixed human/system messages).
|
|
5719
|
+
*
|
|
5720
|
+
* @example
|
|
5721
|
+
* ```ts
|
|
5722
|
+
* // Legacy single message
|
|
5723
|
+
* await agent.addMessage({ input: { message: "Hello" } });
|
|
5724
|
+
*
|
|
5725
|
+
* // Multi-message format
|
|
5726
|
+
* await agent.addMessage({
|
|
5727
|
+
* input: {
|
|
5728
|
+
* messages: [{ role: "human", content: "Hello" }, { role: "system", content: "Context" }]
|
|
5729
|
+
* }
|
|
5730
|
+
* });
|
|
5731
|
+
* ```
|
|
5732
|
+
*/
|
|
5537
5733
|
interface QueueMessage {
|
|
5538
5734
|
input: {
|
|
5539
5735
|
message?: string;
|
|
@@ -5543,6 +5739,7 @@ interface QueueMessage {
|
|
|
5543
5739
|
command?: CommandParams<any>;
|
|
5544
5740
|
custom_run_config?: any;
|
|
5545
5741
|
}
|
|
5742
|
+
/** Emitted when a thread transitions between {@link ThreadStatus} values. */
|
|
5546
5743
|
interface ThreadStatusChangedEvent {
|
|
5547
5744
|
type: "thread:status:changed";
|
|
5548
5745
|
tenantId: string;
|
|
@@ -5557,7 +5754,26 @@ interface ThreadStatusChangedEvent {
|
|
|
5557
5754
|
pendingCount?: number;
|
|
5558
5755
|
};
|
|
5559
5756
|
}
|
|
5560
|
-
|
|
5757
|
+
/**
|
|
5758
|
+
* Union of all lifecycle event names emitted by {@link Agent}.
|
|
5759
|
+
*
|
|
5760
|
+
* Used with {@link Agent.subscribe} / {@link Agent.subscribeOnce} to listen
|
|
5761
|
+
* for agent state changes. Events are automatically namespaced as
|
|
5762
|
+
* `{eventName}:{tenantId}:{threadId}`.
|
|
5763
|
+
*
|
|
5764
|
+
* | Event | Fires when |
|
|
5765
|
+
* |-------|-----------|
|
|
5766
|
+
* | `message:started` | An individual message begins processing |
|
|
5767
|
+
* | `message:completed` | An individual message finishes processing |
|
|
5768
|
+
* | `message:interrupted` | A message was interrupted (e.g. human approval) |
|
|
5769
|
+
* | `message:failed` | A message execution threw an error |
|
|
5770
|
+
* | `thread:busy` | The thread starts processing its queue |
|
|
5771
|
+
* | `thread:idle` | The thread has no more pending messages |
|
|
5772
|
+
* | `queue:pending` | A new message was added to the queue |
|
|
5773
|
+
* | `reply:ready` | Agent execution finished, AI response is available |
|
|
5774
|
+
*/
|
|
5775
|
+
type AgentLifecycleEventName = 'message:started' | 'message:completed' | 'message:interrupted' | 'message:failed' | 'thread:busy' | 'thread:idle' | 'queue:pending' | 'reply:ready';
|
|
5776
|
+
/** Emitted when the agent starts processing a queued message. */
|
|
5561
5777
|
interface MessageStartedEvent {
|
|
5562
5778
|
type: 'message:started';
|
|
5563
5779
|
messageId: string;
|
|
@@ -5565,6 +5781,12 @@ interface MessageStartedEvent {
|
|
|
5565
5781
|
timestamp: Date;
|
|
5566
5782
|
queueMode?: QueueMode;
|
|
5567
5783
|
}
|
|
5784
|
+
/**
|
|
5785
|
+
* Emitted when the agent finishes processing a queued message.
|
|
5786
|
+
*
|
|
5787
|
+
* The {@link state} field contains a LangGraph {@link StateSnapshot} which
|
|
5788
|
+
* includes the full conversation history in `state.values.messages`.
|
|
5789
|
+
*/
|
|
5568
5790
|
interface MessageCompletedEvent {
|
|
5569
5791
|
type: 'message:completed';
|
|
5570
5792
|
messageId: string;
|
|
@@ -5572,23 +5794,27 @@ interface MessageCompletedEvent {
|
|
|
5572
5794
|
duration?: number;
|
|
5573
5795
|
state?: any;
|
|
5574
5796
|
}
|
|
5797
|
+
/** Emitted when message processing throws an unrecoverable error. */
|
|
5575
5798
|
interface MessageFailedEvent {
|
|
5576
5799
|
type: 'message:failed';
|
|
5577
5800
|
messageId: string;
|
|
5578
5801
|
error: string;
|
|
5579
5802
|
timestamp: Date;
|
|
5580
5803
|
}
|
|
5804
|
+
/** Emitted when the thread has drained its queue and returned to idle. */
|
|
5581
5805
|
interface ThreadIdleEvent {
|
|
5582
5806
|
type: 'thread:idle';
|
|
5583
5807
|
timestamp: Date;
|
|
5584
5808
|
pendingCount: number;
|
|
5585
5809
|
state?: any;
|
|
5586
5810
|
}
|
|
5811
|
+
/** Emitted when a thread transitions from idle to busy (queue processing started). */
|
|
5587
5812
|
interface ThreadBusyEvent {
|
|
5588
5813
|
type: 'thread:busy';
|
|
5589
5814
|
timestamp: Date;
|
|
5590
5815
|
messageId?: string;
|
|
5591
5816
|
}
|
|
5817
|
+
/** Emitted when a message is enqueued but not yet processing. */
|
|
5592
5818
|
interface QueuePendingEvent {
|
|
5593
5819
|
type: 'queue:pending';
|
|
5594
5820
|
messageId: string;
|
|
@@ -5598,6 +5824,12 @@ interface QueuePendingEvent {
|
|
|
5598
5824
|
isHighPriority: boolean;
|
|
5599
5825
|
}
|
|
5600
5826
|
|
|
5827
|
+
/**
|
|
5828
|
+
* Parameters that uniquely identify an agent thread instance.
|
|
5829
|
+
*
|
|
5830
|
+
* Used by {@link AgentInstanceManager.getAgent} to create or retrieve
|
|
5831
|
+
* the {@link Agent} instance for a given tenant/assistant/thread combination.
|
|
5832
|
+
*/
|
|
5601
5833
|
interface AgentThreadInterface {
|
|
5602
5834
|
assistant_id: string;
|
|
5603
5835
|
thread_id: string;
|
|
@@ -5606,6 +5838,9 @@ interface AgentThreadInterface {
|
|
|
5606
5838
|
project_id?: string;
|
|
5607
5839
|
custom_run_config?: any;
|
|
5608
5840
|
}
|
|
5841
|
+
/**
|
|
5842
|
+
* Record of an async task tracked by the agent (e.g. sub-agent executions).
|
|
5843
|
+
*/
|
|
5609
5844
|
interface AsyncTaskRecord {
|
|
5610
5845
|
taskId: string;
|
|
5611
5846
|
assistantId: string;
|
|
@@ -5614,6 +5849,42 @@ interface AsyncTaskRecord {
|
|
|
5614
5849
|
createdAt: number;
|
|
5615
5850
|
completedAt?: number;
|
|
5616
5851
|
}
|
|
5852
|
+
/**
|
|
5853
|
+
* Per-tenant agent thread instance with message queue, streaming, and lifecycle events.
|
|
5854
|
+
*
|
|
5855
|
+
* Each `Agent` instance is tied to a specific `(tenant_id, assistant_id, thread_id)`
|
|
5856
|
+
* tuple. It wraps a LangGraph runnable and manages:
|
|
5857
|
+
*
|
|
5858
|
+
* - **Message queue** — Messages are enqueued via {@link addMessage} and processed
|
|
5859
|
+
* sequentially according to the thread's {@link QueueMode} (COLLECT, FOLLOWUP, STEER).
|
|
5860
|
+
* - **Streaming** — Output chunks are buffered via {@link ChunkBuffer} and consumed
|
|
5861
|
+
* through {@link chunkStream}.
|
|
5862
|
+
* - **Lifecycle events** — Emits namespaced events (`message:completed`, `reply:ready`,
|
|
5863
|
+
* `thread:idle`, etc.) via a global {@link EventBus}.
|
|
5864
|
+
* - **Abort / Resume** — Supports graceful interruption and recovery after restart.
|
|
5865
|
+
*
|
|
5866
|
+
* Instances are created and managed by {@link AgentInstanceManager}. Do not
|
|
5867
|
+
* construct directly — use `agentInstanceManager.getAgent(params)`.
|
|
5868
|
+
*
|
|
5869
|
+
* @example
|
|
5870
|
+
* ```ts
|
|
5871
|
+
* const agent = agentInstanceManager.getAgent({
|
|
5872
|
+
* assistant_id: "agent-1",
|
|
5873
|
+
* thread_id: "thread-abc",
|
|
5874
|
+
* tenant_id: "tenant-x",
|
|
5875
|
+
* });
|
|
5876
|
+
*
|
|
5877
|
+
* // Subscribe to completion
|
|
5878
|
+
* agent.subscribeOnce("message:completed", (evt) => {
|
|
5879
|
+
* console.log("Agent finished:", evt.state);
|
|
5880
|
+
* });
|
|
5881
|
+
*
|
|
5882
|
+
* // Enqueue a message
|
|
5883
|
+
* const result = await agent.addMessage({
|
|
5884
|
+
* input: { message: "Hello!" },
|
|
5885
|
+
* });
|
|
5886
|
+
* ```
|
|
5887
|
+
*/
|
|
5617
5888
|
declare class Agent {
|
|
5618
5889
|
private queueStore;
|
|
5619
5890
|
private stateChecker;
|
|
@@ -5628,13 +5899,37 @@ declare class Agent {
|
|
|
5628
5899
|
queueMode: ThreadQueueConfig;
|
|
5629
5900
|
private isWaitingForQueueEnd;
|
|
5630
5901
|
asyncTasks: AsyncTaskRecord[];
|
|
5902
|
+
/**
|
|
5903
|
+
* Constructs an Agent instance.
|
|
5904
|
+
*
|
|
5905
|
+
* Prefer {@link AgentInstanceManager.getAgent} over direct construction — it
|
|
5906
|
+
* ensures a single instance per thread.
|
|
5907
|
+
*
|
|
5908
|
+
* @param params - {@link AgentThreadInterface}
|
|
5909
|
+
*/
|
|
5631
5910
|
constructor({ assistant_id, thread_id, tenant_id, workspace_id, project_id, custom_run_config, }: AgentThreadInterface);
|
|
5632
5911
|
private getHumanPendingContent;
|
|
5633
5912
|
/**
|
|
5634
5913
|
* Initialize with message queue store
|
|
5635
5914
|
*/
|
|
5636
5915
|
setQueueStore(store: IMessageQueueStore): void;
|
|
5916
|
+
/**
|
|
5917
|
+
* Push a chunk into the streaming buffer for this thread.
|
|
5918
|
+
*
|
|
5919
|
+
* Consumers read chunks via {@link chunkStream}.
|
|
5920
|
+
*
|
|
5921
|
+
* @param content - The message chunk to buffer
|
|
5922
|
+
*/
|
|
5637
5923
|
addChunk(content: MessageChunk): Promise<void>;
|
|
5924
|
+
/**
|
|
5925
|
+
* Returns an async iterator over new chunks since the given message ID.
|
|
5926
|
+
*
|
|
5927
|
+
* Used by SSE endpoints to stream agent output to clients in real time.
|
|
5928
|
+
*
|
|
5929
|
+
* @param message_id - The client message ID to start streaming from
|
|
5930
|
+
* @param stopTypes - Optional chunk types that terminate the stream
|
|
5931
|
+
* @returns An async iterable yielding {@link MessageChunk} objects
|
|
5932
|
+
*/
|
|
5638
5933
|
chunkStream(message_id: string, stopTypes?: MessageChunkType[]): {
|
|
5639
5934
|
[Symbol.asyncIterator]: () => AsyncGenerator<MessageChunk, void, unknown>;
|
|
5640
5935
|
};
|
|
@@ -5652,22 +5947,50 @@ declare class Agent {
|
|
|
5652
5947
|
private getQueueStore;
|
|
5653
5948
|
private getDefaultQueueConfig;
|
|
5654
5949
|
/**
|
|
5655
|
-
*
|
|
5950
|
+
* Override the thread's queue processing mode.
|
|
5951
|
+
*
|
|
5952
|
+
* @param config - Partial {@link ThreadQueueConfig} (e.g. `{ mode: QueueMode.FOLLOWUP }`)
|
|
5656
5953
|
*/
|
|
5657
5954
|
setQueueConfig(config: Partial<ThreadQueueConfig>): Promise<void>;
|
|
5658
5955
|
/**
|
|
5659
|
-
*
|
|
5956
|
+
* Abort any ongoing queue processing without clearing the queue.
|
|
5957
|
+
*
|
|
5958
|
+
* Used internally by STEER mode to interrupt the current execution so the
|
|
5959
|
+
* steer message can be processed next. For a full abort that also clears
|
|
5960
|
+
* pending messages, use {@link abort}.
|
|
5961
|
+
*
|
|
5962
|
+
* @see {@link abort}
|
|
5660
5963
|
*/
|
|
5661
5964
|
stopQueueProcessor(): void;
|
|
5662
5965
|
/**
|
|
5663
|
-
*
|
|
5664
|
-
*
|
|
5665
|
-
*
|
|
5966
|
+
* Enqueue a message for this thread.
|
|
5967
|
+
*
|
|
5968
|
+
* Messages are always queued; the queue processor starts automatically if idle.
|
|
5969
|
+
* Returns immediately with the message ID — execution is asynchronous.
|
|
5970
|
+
*
|
|
5971
|
+
* **Queue modes** (via the optional `mode` param):
|
|
5972
|
+
* - `COLLECT` (default) — Batch multiple pending messages into one agent call.
|
|
5973
|
+
* - `FOLLOWUP` — Process messages one at a time in order.
|
|
5974
|
+
* - `STEER` — High-priority, inserted at queue head, interrupts current processing.
|
|
5666
5975
|
*
|
|
5667
|
-
* Supports both legacy
|
|
5668
|
-
*
|
|
5669
|
-
*
|
|
5670
|
-
*
|
|
5976
|
+
* **Format**: Supports both `input.message` (legacy string) and `input.messages[]`
|
|
5977
|
+
* (array of `{ role, content }` objects). The array form takes precedence.
|
|
5978
|
+
*
|
|
5979
|
+
* The `custom_run_config` field is round-tripped through the queue and emitted
|
|
5980
|
+
* back in {@link ReplyReadyEvent}, enabling callers to attach routing metadata
|
|
5981
|
+
* (e.g. `_replyTarget` for channel reply).
|
|
5982
|
+
*
|
|
5983
|
+
* @param queueMessage - The message to enqueue
|
|
5984
|
+
* @param mode - Optional queue mode override (defaults to thread's current mode)
|
|
5985
|
+
* @returns `{ queued: true, executed: false, messageId }` — execution happens asynchronously
|
|
5986
|
+
*
|
|
5987
|
+
* @example
|
|
5988
|
+
* ```ts
|
|
5989
|
+
* await agent.addMessage({
|
|
5990
|
+
* input: { message: "Hello" },
|
|
5991
|
+
* custom_run_config: { _replyTarget: { adapterChannel: "lark", rawTarget: { chatId: "xxx" } } },
|
|
5992
|
+
* });
|
|
5993
|
+
* ```
|
|
5671
5994
|
*/
|
|
5672
5995
|
addMessage(queueMessage: QueueMessage, mode?: QueueMode): Promise<{
|
|
5673
5996
|
queued: boolean;
|
|
@@ -5675,8 +5998,13 @@ declare class Agent {
|
|
|
5675
5998
|
executed: boolean;
|
|
5676
5999
|
}>;
|
|
5677
6000
|
/**
|
|
5678
|
-
* Start queue processor if not already running
|
|
5679
|
-
*
|
|
6001
|
+
* Start the queue processor if it is not already running.
|
|
6002
|
+
*
|
|
6003
|
+
* Called automatically by {@link addMessage} and {@link resumeTask}.
|
|
6004
|
+
* Safe to call externally — it is a no-op if processing is already active.
|
|
6005
|
+
*
|
|
6006
|
+
* Emits `thread:busy` before starting, and starts the {@link waitingForQueueEnd}
|
|
6007
|
+
* loop with a fresh {@link AbortController}.
|
|
5680
6008
|
*/
|
|
5681
6009
|
startQueueProcessorIfNeeded(): Promise<void>;
|
|
5682
6010
|
/**
|
|
@@ -5687,24 +6015,56 @@ declare class Agent {
|
|
|
5687
6015
|
* Add reminder message for interrupted tasks
|
|
5688
6016
|
*/
|
|
5689
6017
|
private addReminderMessage;
|
|
6018
|
+
/**
|
|
6019
|
+
* Returns a LangGraph StateSnapshot for this thread.
|
|
6020
|
+
*
|
|
6021
|
+
* Includes `state.values.messages` (full conversation history) and
|
|
6022
|
+
* `state.tasks` / `state.next` (execution progress).
|
|
6023
|
+
*/
|
|
5690
6024
|
getCurrentState(): Promise<_langchain_langgraph.StateSnapshot>;
|
|
6025
|
+
/**
|
|
6026
|
+
* Returns the conversation history as normalized message objects.
|
|
6027
|
+
*
|
|
6028
|
+
* Filters to `human`, `ai`, and `tool` message types. Each entry has
|
|
6029
|
+
* `{ id, role, content }` plus any LangChain kwargs.
|
|
6030
|
+
*
|
|
6031
|
+
* @returns Array of message objects with `id`, `role`, and `content`
|
|
6032
|
+
*/
|
|
5691
6033
|
getCurrentMessages(): Promise<{
|
|
5692
6034
|
id: string | undefined;
|
|
5693
6035
|
role: _langchain_core_messages.MessageType;
|
|
5694
6036
|
content: string | (langchain.ContentBlock | langchain.ContentBlock.Text)[];
|
|
5695
6037
|
}[]>;
|
|
5696
6038
|
get_draw_graph(): Promise<string>;
|
|
6039
|
+
/**
|
|
6040
|
+
* Determine the current thread execution status.
|
|
6041
|
+
*
|
|
6042
|
+
* Checks LangGraph's `state.tasks` for interrupts and `state.next` for
|
|
6043
|
+
* pending steps.
|
|
6044
|
+
*
|
|
6045
|
+
* @returns {@link ThreadStatus} — `IDLE`, `BUSY`, or `INTERRUPTED`
|
|
6046
|
+
*/
|
|
5697
6047
|
getRunStatus(): Promise<ThreadStatus>;
|
|
5698
6048
|
/**
|
|
5699
|
-
* Resume
|
|
5700
|
-
*
|
|
5701
|
-
*
|
|
6049
|
+
* Resume processing after a server restart.
|
|
6050
|
+
*
|
|
6051
|
+
* Resets any stuck "processing" messages back to "pending" and restarts the
|
|
6052
|
+
* queue processor. Skips threads that are in `INTERRUPTED` state (the
|
|
6053
|
+
* interruption was intentional).
|
|
6054
|
+
*
|
|
6055
|
+
* Called during gateway startup to recover threads that were mid-execution
|
|
6056
|
+
* when the server went down.
|
|
5702
6057
|
*/
|
|
5703
6058
|
resumeTask(): Promise<void>;
|
|
5704
6059
|
/**
|
|
5705
|
-
*
|
|
5706
|
-
*
|
|
5707
|
-
*
|
|
6060
|
+
* Fully abort all activity on this thread.
|
|
6061
|
+
*
|
|
6062
|
+
* Aborts any in-flight agent execution (via {@link AbortController}) and
|
|
6063
|
+
* clears all pending and processing messages from the queue. Also marks
|
|
6064
|
+
* the chunk buffer thread as aborted so streaming consumers can detect it.
|
|
6065
|
+
*
|
|
6066
|
+
* Unlike {@link stopQueueProcessor}, this is a destructive abort — the
|
|
6067
|
+
* queue is drained.
|
|
5708
6068
|
*/
|
|
5709
6069
|
abort(): Promise<void>;
|
|
5710
6070
|
/**
|
|
@@ -5712,25 +6072,59 @@ declare class Agent {
|
|
|
5712
6072
|
*/
|
|
5713
6073
|
isAborted(): boolean;
|
|
5714
6074
|
/**
|
|
5715
|
-
* Subscribe to lifecycle
|
|
5716
|
-
*
|
|
6075
|
+
* Subscribe to a lifecycle event for this specific thread.
|
|
6076
|
+
*
|
|
6077
|
+
* Event names are namespaced as `{eventName}:{tenantId}:{threadId}` so
|
|
6078
|
+
* listeners only receive events for this agent instance.
|
|
6079
|
+
*
|
|
6080
|
+
* @param eventName - One of {@link AgentLifecycleEventName}
|
|
6081
|
+
* @param callback - Handler receiving the event data payload
|
|
6082
|
+
*
|
|
6083
|
+
* @example
|
|
6084
|
+
* ```ts
|
|
6085
|
+
* agent.subscribe("message:completed", (evt) => {
|
|
6086
|
+
* console.log("AI response:", evt.state?.values?.messages);
|
|
6087
|
+
* });
|
|
6088
|
+
* ```
|
|
5717
6089
|
*/
|
|
5718
6090
|
subscribe(eventName: AgentLifecycleEventName, callback: (data: any) => void): void;
|
|
5719
6091
|
/**
|
|
5720
|
-
*
|
|
6092
|
+
* Remove a previously registered event listener.
|
|
6093
|
+
*
|
|
6094
|
+
* @param eventName - The event that was subscribed to
|
|
6095
|
+
* @param callback - The same function reference used in {@link subscribe}
|
|
5721
6096
|
*/
|
|
5722
6097
|
unsubscribe(eventName: AgentLifecycleEventName, callback: (data: any) => void): void;
|
|
5723
6098
|
/**
|
|
5724
|
-
* Subscribe to lifecycle
|
|
6099
|
+
* Subscribe to a lifecycle event once — the listener is removed after the
|
|
6100
|
+
* first invocation.
|
|
6101
|
+
*
|
|
6102
|
+
* Ideal for one-shot async patterns (e.g. waiting for `reply:ready` before
|
|
6103
|
+
* sending a channel reply).
|
|
6104
|
+
*
|
|
6105
|
+
* @param eventName - One of {@link AgentLifecycleEventName}
|
|
6106
|
+
* @param callback - Handler receiving the event data payload
|
|
5725
6107
|
*/
|
|
5726
6108
|
subscribeOnce(eventName: AgentLifecycleEventName, callback: (data: any) => void): void;
|
|
5727
6109
|
/**
|
|
5728
6110
|
* Publish lifecycle event (internal use)
|
|
5729
6111
|
*/
|
|
5730
6112
|
private publish;
|
|
6113
|
+
/**
|
|
6114
|
+
* Track a sub-agent async task spawned by this agent.
|
|
6115
|
+
*
|
|
6116
|
+
* Tasks are monitored by the agent task consumer in `packages/gateway`
|
|
6117
|
+
* and their status can be polled via {@link getAsyncTasks}.
|
|
6118
|
+
*/
|
|
5731
6119
|
addAsyncTask(task: AsyncTaskRecord): void;
|
|
5732
6120
|
getAsyncTasks(): AsyncTaskRecord[];
|
|
5733
6121
|
getAsyncTask(taskId: string): AsyncTaskRecord | undefined;
|
|
6122
|
+
/**
|
|
6123
|
+
* Update the status of a tracked async task.
|
|
6124
|
+
*
|
|
6125
|
+
* Terminal states (`completed`, `failed`, `cancelled`) automatically
|
|
6126
|
+
* set `completedAt` to the current timestamp.
|
|
6127
|
+
*/
|
|
5734
6128
|
updateAsyncTaskStatus(taskId: string, status: AsyncTaskRecord['status']): void;
|
|
5735
6129
|
}
|
|
5736
6130
|
|
|
@@ -5830,6 +6224,104 @@ declare function validateEncryptionKey(): void;
|
|
|
5830
6224
|
*/
|
|
5831
6225
|
declare function clearEncryptionKeyCache(): void;
|
|
5832
6226
|
|
|
6227
|
+
/**
|
|
6228
|
+
* Factory function type for creating custom middleware instances.
|
|
6229
|
+
*
|
|
6230
|
+
* Receives the raw `config` object from the database (excluding the `key` field)
|
|
6231
|
+
* and returns a LangChain `AgentMiddleware` instance, either synchronously or asynchronously.
|
|
6232
|
+
*
|
|
6233
|
+
* @example
|
|
6234
|
+
* ```ts
|
|
6235
|
+
* const factory: CustomMiddlewareFactory = (config) =>
|
|
6236
|
+
* createMiddleware({
|
|
6237
|
+
* name: "MyMiddleware",
|
|
6238
|
+
* wrapModelCall: async (request, handler) => {
|
|
6239
|
+
* console.log(`[${config.logLevel}] Model call`);
|
|
6240
|
+
* return handler(request);
|
|
6241
|
+
* },
|
|
6242
|
+
* });
|
|
6243
|
+
* ```
|
|
6244
|
+
*/
|
|
6245
|
+
type CustomMiddlewareFactory = (config: Record<string, any>) => Promise<AgentMiddleware> | AgentMiddleware;
|
|
6246
|
+
/**
|
|
6247
|
+
* Global registry for external applications to register custom middleware factories.
|
|
6248
|
+
*
|
|
6249
|
+
* Applications write their own middleware (auth, audit, custom tools, etc.) without
|
|
6250
|
+
* modifying core source code. Once registered, middleware can be enabled per-agent via
|
|
6251
|
+
* the database config using `type: "custom"` in the agent's `graphDefinition.middleware` array.
|
|
6252
|
+
*
|
|
6253
|
+
* @example Register and use
|
|
6254
|
+
* ```ts
|
|
6255
|
+
* // 1. App startup — register a factory
|
|
6256
|
+
* CustomMiddlewareRegistry.register("audit-logger", (config) =>
|
|
6257
|
+
* createMiddleware({
|
|
6258
|
+
* name: "AuditLogger",
|
|
6259
|
+
* wrapModelCall: async (r, h) => { console.log("audit:", config.level); return h(r); },
|
|
6260
|
+
* }),
|
|
6261
|
+
* );
|
|
6262
|
+
*
|
|
6263
|
+
* // 2. Database config for an agent
|
|
6264
|
+
* // {
|
|
6265
|
+
* // "id": "mw-001",
|
|
6266
|
+
* // "type": "custom",
|
|
6267
|
+
* // "enabled": true,
|
|
6268
|
+
* // "config": { "key": "audit-logger", "level": "debug" }
|
|
6269
|
+
* // }
|
|
6270
|
+
* ```
|
|
6271
|
+
*
|
|
6272
|
+
* @remarks
|
|
6273
|
+
* - Register factories **before** building agents (typically at app startup).
|
|
6274
|
+
* - Duplicate keys overwrite previous registrations.
|
|
6275
|
+
* - Unregistered keys are skipped with a console warning at agent build time.
|
|
6276
|
+
*/
|
|
6277
|
+
declare class CustomMiddlewareRegistry {
|
|
6278
|
+
private static factories;
|
|
6279
|
+
/**
|
|
6280
|
+
* Register a custom middleware factory under the given key.
|
|
6281
|
+
*
|
|
6282
|
+
* The key is referenced by `config.key` in the database middleware configuration.
|
|
6283
|
+
* When an agent is built, the framework looks up this key and calls the factory
|
|
6284
|
+
* with the remaining config fields.
|
|
6285
|
+
*
|
|
6286
|
+
* @param key - Unique identifier, referenced in database config as `config.key`
|
|
6287
|
+
* @param factory - Function that receives config (minus `key`) and returns an AgentMiddleware
|
|
6288
|
+
*
|
|
6289
|
+
* @example
|
|
6290
|
+
* ```ts
|
|
6291
|
+
* CustomMiddlewareRegistry.register("my-logger", (config) =>
|
|
6292
|
+
* createMiddleware({ name: "Logger", beforeAgent: async () => { ... } }),
|
|
6293
|
+
* );
|
|
6294
|
+
* ```
|
|
6295
|
+
*/
|
|
6296
|
+
static register(key: string, factory: CustomMiddlewareFactory): void;
|
|
6297
|
+
/**
|
|
6298
|
+
* Remove a previously registered factory.
|
|
6299
|
+
*
|
|
6300
|
+
* @param key - The factory key to unregister
|
|
6301
|
+
* @returns `true` if a factory was removed, `false` if the key was not found
|
|
6302
|
+
*/
|
|
6303
|
+
static unregister(key: string): boolean;
|
|
6304
|
+
/**
|
|
6305
|
+
* Look up a factory by key.
|
|
6306
|
+
*
|
|
6307
|
+
* @param key - The factory key
|
|
6308
|
+
* @returns The factory function, or `undefined` if not registered
|
|
6309
|
+
*/
|
|
6310
|
+
static get(key: string): CustomMiddlewareFactory | undefined;
|
|
6311
|
+
/**
|
|
6312
|
+
* Check whether a factory is registered under the given key.
|
|
6313
|
+
*
|
|
6314
|
+
* @param key - The factory key to check
|
|
6315
|
+
*/
|
|
6316
|
+
static has(key: string): boolean;
|
|
6317
|
+
/**
|
|
6318
|
+
* Get all currently registered factory keys.
|
|
6319
|
+
*
|
|
6320
|
+
* @returns Array of registered key strings
|
|
6321
|
+
*/
|
|
6322
|
+
static list(): string[];
|
|
6323
|
+
}
|
|
6324
|
+
|
|
5833
6325
|
/**
|
|
5834
6326
|
* Create middleware that provides widget rendering capabilities.
|
|
5835
6327
|
*
|
|
@@ -5916,4 +6408,4 @@ interface UnknownToolHandlerConfig {
|
|
|
5916
6408
|
*/
|
|
5917
6409
|
declare function createUnknownToolHandlerMiddleware(config?: UnknownToolHandlerConfig): AgentMiddleware;
|
|
5918
6410
|
|
|
5919
|
-
export { AGENT_TASK_EVENT, type AddMessageParams, Agent, type AgentClient, type AgentExecutor, AgentInstanceManager, type AgentLattice, AgentLatticeManager, type AgentLifecycleEventName, AgentManager, type AgentStreamExecutor, type AgentThreadInterface, BUILTIN_SKILLS, type BackendFactory, type BackendProtocol, type BufferStats, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, type ColumnInfo, CompositeBackend, ConsoleLoggerClient, type CreateProcessingAgentParams, type CreateSandboxProviderConfig, type CronFields, CustomMetricsClient, type DatabaseConfig, type DatabaseType, DaytonaInstance, DaytonaProvider, type DaytonaProviderConfig, DefaultScheduleClient, E2BInstance, E2BProvider, type E2BProviderConfig, EMPTY_CONTENT_WARNING, type EditResult, type EmbeddingsLatticeInterface, EmbeddingsLatticeManager, type EnsureMicrosandboxInput, type FileData, type FileInfo, FileSystemSkillStore, type FileSystemSkillStoreOptions, FilesystemBackend, type FsEntry, type GrepMatch, type IMessageQueueStore, type IMetricsServerClient, type ISqlDatabase, InMemoryAssistantStore, InMemoryBindingStore, InMemoryChannelInstallationStore, InMemoryChunkBuffer, InMemoryDatabaseConfigStore, InMemoryMailboxStore, InMemoryTaskListStore, InMemoryTenantStore, InMemoryThreadMessageQueueStore, InMemoryThreadStore, InMemoryUserStore, InMemoryUserTenantLinkStore, LINE_NUMBER_WIDTH, type LangGraphStateChecker, type LoggerLattice, LoggerLatticeManager, MAX_LINE_LENGTH, type MailboxMessage, type MailboxStore, type McpLatticeInterface, McpLatticeManager, type McpServerInfo, MemoryBackend, MemoryLatticeManager, MemoryQueueClient, MemoryScheduleStorage, type MessageCompletedEvent, type MessageFailedEvent, type MessageStartedEvent, MessageType, MetricsServerManager, MicrosandboxRemoteInstance, MicrosandboxRemoteProvider, type MicrosandboxRemoteProviderClient, type MicrosandboxRemoteProviderConfig, MicrosandboxServiceClient, type MicrosandboxServiceClientConfig, type MicrosandboxShellExecInput, type ModelConfig, type ModelLatticeInterface, ModelLatticeManager, MysqlDatabase, type PendingMessage, PinoLoggerClient, PostgresDatabase, PrometheusClient, type QueryResult, type QueueLattice, QueueLatticeManager, QueueMode, type QueuePendingEvent, RemoteSandboxInstance, RemoteSandboxProvider, type RemoteSandboxProviderConfig, type RunSandboxConfig, type RuntimeModelConfig, type SandboxFileInfo, type SandboxFileService, SandboxFilesystem, type SandboxInstance, type SandboxIsolationLevel, SandboxLatticeManager, type SandboxManagerProtocol, type SandboxProvider, type SandboxShellService, SandboxSkillStore, type SandboxSkillStoreOptions, type SandboxVolumeDefinition, type ScheduleLattice, ScheduleLatticeManager, type SchedulerMiddlewareOptions, SemanticMetricsClient, type SkillLattice, SkillLatticeManager, type SkillMeta, type SkillResource, SqlDatabaseManager, type StateAndStore, StateBackend, StoreBackend, type StoreLattice, StoreLatticeManager, type StoreType, type StoreTypeMap, TOOL_RESULT_TOKEN_LIMIT, TRUNCATION_GUIDANCE, type TableInfo, type TableSchema, type TaskEvent, type TaskListStore, 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, type ToolDefinition, type ToolLattice, ToolLatticeManager, type TopologyEdge, type UnknownToolHandlerConfig, type VectorStoreLatticeInterface, VectorStoreLatticeManager, VolumeFilesystem, type VolumeFsClient, type WriteResult, agentInstanceManager, agentLatticeManager, buildGrepResultsDict, buildNamedVolumeName, buildSandboxMetadataEnv, buildSkillFile, checkEmptyContent, clearEncryptionKeyCache, computeSandboxName, configureStores, createAgentTeam, createExecuteSqlQueryTool, createFileData, createInfoSqlTool, createListMetricsDataSourcesTool, createListMetricsServersTool, createListTablesSqlTool, createModelSelectorMiddleware, createProcessingAgent, createQueryCheckerSqlTool, createQueryMetricDefinitionTool, createQueryMetricsListTool, createQuerySemanticMetricDataTool, createQuerySqlTool, createQueryTableDefinitionTool, createQueryTablesListTool, createSandboxProvider, createSchedulerMiddleware, createTeamMiddleware, createTeammateTools, createUnknownToolHandlerMiddleware, createWidgetMiddleware, decrypt, describeCronExpression, embeddingsLatticeManager, encrypt, ensureBuiltinAgentsForTenant, eventBus, eventBus as eventBusDefault, extractFetcherError, fileDataToString, formatContentWithLineNumbers, formatGrepMatches, formatGrepResults, formatReadResponse, getAgentClient, getAgentConfig, getAllAgentConfigs, getAllBuiltInSkillMetas, getAllToolDefinitions, getBindingRegistry, getBuiltInSkillContent, getBuiltInSkillMeta, getBuiltInSkillNames, getCheckpointSaver, getChunkBuffer, getEmbeddingsClient, getEmbeddingsLattice, getEncryptionKey, getLoggerLattice, getModelLattice, getNextCronTime, getQueueLattice, getSandBoxManager, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, globSearchFiles, grepMatchesFromFiles, grepSearchFiles, hasChunkBuffer, isBuiltInSkill, isUsingDefaultKey, isValidCronExpression, isValidSandboxName, isValidSkillName, loggerLatticeManager, mcpManager, metricsServerManager, modelLatticeManager, normalizeSandboxName, parseCronExpression, parseSkillFrontmatter, performStringReplacement, queueLatticeManager, registerAgentLattice, registerAgentLatticeWithTenant, registerAgentLattices, registerCheckpointSaver, registerChunkBuffer, registerEmbeddingsLattice, registerExistingTool, registerLoggerLattice, registerModelLattice, registerQueueLattice, registerScheduleLattice, registerStoreLattice, registerTeammateAgent, registerToolLattice, registerVectorStoreLattice, sandboxLatticeManager, sanitizeToolCallId, scheduleLatticeManager, setBindingRegistry, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, toolLatticeManager, truncateIfTooLong, unregisterTeammateAgent, updateFileData, validateAgentInput, validateEncryptionKey, validatePath, validateSkillName, validateToolInput, vectorStoreLatticeManager };
|
|
6411
|
+
export { AGENT_TASK_EVENT, type AddMessageParams, Agent, type AgentClient, type AgentExecutor, AgentInstanceManager, type AgentLattice, AgentLatticeManager, type AgentLifecycleEventName, AgentManager, type AgentStreamExecutor, type AgentThreadInterface, BUILTIN_SKILLS, type BackendFactory, type BackendProtocol, type BufferStats, type Chunk, ChunkBuffer, ChunkBufferLatticeManager, type ColumnInfo, CompositeBackend, ConsoleLoggerClient, type CreateProcessingAgentParams, type CreateSandboxProviderConfig, type CronFields, CustomMetricsClient, type CustomMiddlewareFactory, CustomMiddlewareRegistry, type DatabaseConfig, type DatabaseType, DaytonaInstance, DaytonaProvider, type DaytonaProviderConfig, DefaultScheduleClient, E2BInstance, E2BProvider, type E2BProviderConfig, EMPTY_CONTENT_WARNING, type EditResult, type EmbeddingsLatticeInterface, EmbeddingsLatticeManager, type EnsureMicrosandboxInput, type FileData, type FileInfo, FileSystemSkillStore, type FileSystemSkillStoreOptions, FilesystemBackend, type FsEntry, type GrepMatch, type IMessageQueueStore, type IMetricsServerClient, type ISqlDatabase, InMemoryAssistantStore, InMemoryBindingStore, InMemoryChannelInstallationStore, InMemoryChunkBuffer, InMemoryDatabaseConfigStore, InMemoryMailboxStore, InMemoryTaskListStore, InMemoryTenantStore, InMemoryThreadMessageQueueStore, InMemoryThreadStore, InMemoryUserStore, InMemoryUserTenantLinkStore, LINE_NUMBER_WIDTH, type LangGraphStateChecker, type LoggerLattice, LoggerLatticeManager, MAX_LINE_LENGTH, type MailboxMessage, type MailboxStore, type McpLatticeInterface, McpLatticeManager, type McpServerInfo, MemoryBackend, MemoryLatticeManager, MemoryQueueClient, MemoryScheduleStorage, type MessageCompletedEvent, type MessageFailedEvent, type MessageStartedEvent, MessageType, MetricsServerManager, MicrosandboxRemoteInstance, MicrosandboxRemoteProvider, type MicrosandboxRemoteProviderClient, type MicrosandboxRemoteProviderConfig, MicrosandboxServiceClient, type MicrosandboxServiceClientConfig, type MicrosandboxShellExecInput, type ModelConfig, type ModelLatticeInterface, ModelLatticeManager, MysqlDatabase, type PendingMessage, PinoLoggerClient, PostgresDatabase, PrometheusClient, type QueryResult, type QueueLattice, QueueLatticeManager, QueueMode, type QueuePendingEvent, RemoteSandboxInstance, RemoteSandboxProvider, type RemoteSandboxProviderConfig, type RunSandboxConfig, type RuntimeModelConfig, type SandboxFileInfo, type SandboxFileService, SandboxFilesystem, type SandboxInstance, type SandboxIsolationLevel, SandboxLatticeManager, type SandboxManagerProtocol, type SandboxProvider, type SandboxShellService, SandboxSkillStore, type SandboxSkillStoreOptions, type SandboxVolumeDefinition, type ScheduleLattice, ScheduleLatticeManager, type SchedulerMiddlewareOptions, SemanticMetricsClient, type SkillLattice, SkillLatticeManager, type SkillMeta, type SkillResource, SqlDatabaseManager, type StateAndStore, StateBackend, StoreBackend, type StoreLattice, StoreLatticeManager, type StoreType, type StoreTypeMap, TOOL_RESULT_TOKEN_LIMIT, TRUNCATION_GUIDANCE, type TableInfo, type TableSchema, type TaskEvent, type TaskListStore, 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, type ToolDefinition, type ToolLattice, ToolLatticeManager, type TopologyEdge, type UnknownToolHandlerConfig, type VectorStoreLatticeInterface, VectorStoreLatticeManager, VolumeFilesystem, type VolumeFsClient, type WriteResult, agentInstanceManager, agentLatticeManager, buildGrepResultsDict, buildNamedVolumeName, buildSandboxMetadataEnv, buildSkillFile, checkEmptyContent, clearEncryptionKeyCache, computeSandboxName, configureStores, createAgentTeam, createExecuteSqlQueryTool, createFileData, createInfoSqlTool, createListMetricsDataSourcesTool, createListMetricsServersTool, createListTablesSqlTool, createModelSelectorMiddleware, createProcessingAgent, createQueryCheckerSqlTool, createQueryMetricDefinitionTool, createQueryMetricsListTool, createQuerySemanticMetricDataTool, createQuerySqlTool, createQueryTableDefinitionTool, createQueryTablesListTool, createSandboxProvider, createSchedulerMiddleware, createTeamMiddleware, createTeammateTools, createUnknownToolHandlerMiddleware, createWidgetMiddleware, decrypt, describeCronExpression, embeddingsLatticeManager, encrypt, ensureBuiltinAgentsForTenant, eventBus, eventBus as eventBusDefault, extractFetcherError, fileDataToString, formatContentWithLineNumbers, formatGrepMatches, formatGrepResults, formatReadResponse, getAgentClient, getAgentConfig, getAllAgentConfigs, getAllBuiltInSkillMetas, getAllToolDefinitions, getBindingRegistry, getBuiltInSkillContent, getBuiltInSkillMeta, getBuiltInSkillNames, getCheckpointSaver, getChunkBuffer, getEmbeddingsClient, getEmbeddingsLattice, getEncryptionKey, getLoggerLattice, getModelLattice, getNextCronTime, getQueueLattice, getSandBoxManager, getScheduleLattice, getStoreLattice, getToolClient, getToolDefinition, getToolLattice, getVectorStoreClient, getVectorStoreLattice, globSearchFiles, grepMatchesFromFiles, grepSearchFiles, hasChunkBuffer, isBuiltInSkill, isUsingDefaultKey, isValidCronExpression, isValidSandboxName, isValidSkillName, loggerLatticeManager, mcpManager, metricsServerManager, modelLatticeManager, normalizeSandboxName, parseCronExpression, parseSkillFrontmatter, performStringReplacement, queueLatticeManager, registerAgentLattice, registerAgentLatticeWithTenant, registerAgentLattices, registerCheckpointSaver, registerChunkBuffer, registerEmbeddingsLattice, registerExistingTool, registerLoggerLattice, registerModelLattice, registerQueueLattice, registerScheduleLattice, registerStoreLattice, registerTeammateAgent, registerToolLattice, registerVectorStoreLattice, sandboxLatticeManager, sanitizeToolCallId, scheduleLatticeManager, setBindingRegistry, skillLatticeManager, sqlDatabaseManager, storeLatticeManager, toolLatticeManager, truncateIfTooLong, unregisterTeammateAgent, updateFileData, validateAgentInput, validateEncryptionKey, validatePath, validateSkillName, validateToolInput, vectorStoreLatticeManager };
|