@axiom-lattice/protocols 4.2.0 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +213 -20
- package/dist/index.d.ts +213 -20
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/A2AApiKeyStoreProtocol.ts +18 -0
- package/src/A2AProtocol.ts +3 -11
- package/src/OpenProtocol.ts +125 -0
- package/src/PluginProtocol.ts +19 -0
- package/src/ProjectRoomMessageStoreProtocol.ts +4 -1
- package/src/SandboxPluginProtocol.ts +62 -0
- package/src/SandboxResourceProtocol.ts +5 -0
- package/src/__tests__/a2a-types.test.ts +0 -6
- package/src/__tests__/open-grants.test.ts +29 -0
- package/src/index.ts +3 -0
package/dist/index.d.ts
CHANGED
|
@@ -4610,30 +4610,120 @@ interface ChannelAdapter<TConfig = unknown> {
|
|
|
4610
4610
|
}
|
|
4611
4611
|
|
|
4612
4612
|
/**
|
|
4613
|
-
*
|
|
4614
|
-
*
|
|
4613
|
+
* OpenProtocol — contracts for the Open API surface (unified external
|
|
4614
|
+
* capability invocation). See docs/superpowers/specs/2026-09-07-open-platform-api-design.md.
|
|
4615
4615
|
*/
|
|
4616
|
+
/** Authorization grant: default-deny; a grant covers one capability domain. */
|
|
4617
|
+
interface OpenGrant {
|
|
4618
|
+
domain: string;
|
|
4619
|
+
/**
|
|
4620
|
+
* Action names (kb: ["search"]) or instance ids (agent: [assistantId]).
|
|
4621
|
+
* Absent/empty = every action in the domain.
|
|
4622
|
+
*/
|
|
4623
|
+
items?: string[];
|
|
4624
|
+
selector?: {
|
|
4625
|
+
sandbox?: "self";
|
|
4626
|
+
};
|
|
4627
|
+
}
|
|
4628
|
+
/** Execution context synthesized from a verified credential — never from the caller. */
|
|
4629
|
+
interface OpenExecutionContext {
|
|
4630
|
+
tenantId: string;
|
|
4631
|
+
projectId: string;
|
|
4632
|
+
/** Addressing only, not an authorization dimension (see design §6.2). */
|
|
4633
|
+
workspaceId?: string;
|
|
4634
|
+
/** Synthesized runConfig (mirrors the Agent path, incl. _resolvedConnections). */
|
|
4635
|
+
runConfig: Record<string, unknown>;
|
|
4636
|
+
}
|
|
4637
|
+
interface OpenExecutionResult {
|
|
4638
|
+
content: Array<{
|
|
4639
|
+
type: "text";
|
|
4640
|
+
text: string;
|
|
4641
|
+
}>;
|
|
4642
|
+
isError?: boolean;
|
|
4643
|
+
}
|
|
4644
|
+
/**
|
|
4645
|
+
* Effective grants for the Open door, derived from a key record.
|
|
4646
|
+
*
|
|
4647
|
+
* Backward compatibility with pre-grants A2A keys:
|
|
4648
|
+
* - explicit grants win;
|
|
4649
|
+
* - otherwise assistantIds become an agent-domain grant;
|
|
4650
|
+
* - legacy "empty assistantIds = all exposed agents" maps to a bare agent grant.
|
|
4651
|
+
*
|
|
4652
|
+
* The A2A door keeps reading assistantIds directly and never consults this —
|
|
4653
|
+
* existing A2A behavior is unchanged by construction.
|
|
4654
|
+
*/
|
|
4655
|
+
declare function effectiveGrants(record: {
|
|
4656
|
+
grants?: OpenGrant[];
|
|
4657
|
+
assistantIds?: string[];
|
|
4658
|
+
}): OpenGrant[];
|
|
4659
|
+
/** Where an exposed capability comes from. */
|
|
4660
|
+
type OpenCapabilitySource = "builtin" | "plugin" | "agent";
|
|
4661
|
+
/** A selectable grant item: an action name or an instance id. */
|
|
4662
|
+
interface OpenCatalogItem {
|
|
4663
|
+
/** Grant item value: action name (kb → "search") or instance id (agent → assistantId). */
|
|
4664
|
+
id: string;
|
|
4665
|
+
/** Full MCP tool name when this item is exclusively exposed (informational). */
|
|
4666
|
+
toolName: string;
|
|
4667
|
+
label: string;
|
|
4668
|
+
description?: string;
|
|
4669
|
+
annotations?: {
|
|
4670
|
+
readOnlyHint: boolean;
|
|
4671
|
+
destructiveHint: boolean;
|
|
4672
|
+
};
|
|
4673
|
+
}
|
|
4674
|
+
interface OpenCatalogDomain {
|
|
4675
|
+
domain: string;
|
|
4676
|
+
label: string;
|
|
4677
|
+
source: OpenCapabilitySource;
|
|
4678
|
+
/** Display-only scope hint (defaults to tenant-wide). */
|
|
4679
|
+
scopeKind?: "tenant" | "workspace" | "project";
|
|
4680
|
+
/** How grant items are chosen: per-action or per-instance. */
|
|
4681
|
+
itemKind: "action" | "instance";
|
|
4682
|
+
items: OpenCatalogItem[];
|
|
4683
|
+
}
|
|
4684
|
+
/** Full grantable capability catalog for a tenant (drives the key picker). */
|
|
4685
|
+
interface OpenCatalog {
|
|
4686
|
+
domains: OpenCatalogDomain[];
|
|
4687
|
+
}
|
|
4688
|
+
type OpenCredentialKind = "api_key" | "sandbox_token" | "browser_token";
|
|
4689
|
+
/** Append-only audit input; the writer is responsible for redacting args. */
|
|
4690
|
+
interface OpenAuditAppendInput {
|
|
4691
|
+
tenantId: string;
|
|
4692
|
+
credentialId: string;
|
|
4693
|
+
credentialKind: OpenCredentialKind;
|
|
4694
|
+
projectId: string;
|
|
4695
|
+
domain: string;
|
|
4696
|
+
action: string;
|
|
4697
|
+
args: unknown;
|
|
4698
|
+
status: "ok" | "error";
|
|
4699
|
+
errorCode?: string;
|
|
4700
|
+
durationMs: number;
|
|
4701
|
+
}
|
|
4702
|
+
interface OpenAuditRecord extends OpenAuditAppendInput {
|
|
4703
|
+
id: string;
|
|
4704
|
+
createdAt: Date;
|
|
4705
|
+
}
|
|
4706
|
+
interface OpenAuditQuery {
|
|
4707
|
+
tenantId: string;
|
|
4708
|
+
credentialId?: string;
|
|
4709
|
+
domain?: string;
|
|
4710
|
+
status?: "ok" | "error";
|
|
4711
|
+
/** ISO timestamps; inclusive from / exclusive to. */
|
|
4712
|
+
from?: string;
|
|
4713
|
+
to?: string;
|
|
4714
|
+
limit?: number;
|
|
4715
|
+
offset?: number;
|
|
4716
|
+
}
|
|
4717
|
+
interface OpenAuditStore {
|
|
4718
|
+
append(record: OpenAuditAppendInput): Promise<void>;
|
|
4719
|
+
/** Tenant-scoped, newest-first. */
|
|
4720
|
+
query(params: OpenAuditQuery): Promise<OpenAuditRecord[]>;
|
|
4721
|
+
}
|
|
4616
4722
|
|
|
4617
4723
|
/**
|
|
4618
4724
|
* Per-agent A2A exposure configuration — controls whether an agent is
|
|
4619
4725
|
* reachable over A2A and which skills are advertised on its AgentCard.
|
|
4620
4726
|
*/
|
|
4621
|
-
interface A2AExposure {
|
|
4622
|
-
/** Whether this agent is exposed over the A2A protocol */
|
|
4623
|
-
enabled: boolean;
|
|
4624
|
-
/** Skills advertised on the AgentCard; defaults to a single generic skill when omitted */
|
|
4625
|
-
skills?: Array<{
|
|
4626
|
-
id: string;
|
|
4627
|
-
name: string;
|
|
4628
|
-
description: string;
|
|
4629
|
-
tags?: string[];
|
|
4630
|
-
examples?: string[];
|
|
4631
|
-
}>;
|
|
4632
|
-
/** Supported input modes (MIME types); defaults to text modes when omitted */
|
|
4633
|
-
inputModes?: string[];
|
|
4634
|
-
/** Supported output modes (MIME types); defaults to text modes when omitted */
|
|
4635
|
-
outputModes?: string[];
|
|
4636
|
-
}
|
|
4637
4727
|
/**
|
|
4638
4728
|
* In-memory API key entry used for request authentication.
|
|
4639
4729
|
* Empty/undefined assistantIds means all exposed agents in the tenant.
|
|
@@ -4643,6 +4733,8 @@ interface A2AApiKeyEntry {
|
|
|
4643
4733
|
tenantId: string;
|
|
4644
4734
|
projectId: string;
|
|
4645
4735
|
assistantIds?: string[];
|
|
4736
|
+
/** Open-door grants; the agent whitelist derives from the agent-domain items. */
|
|
4737
|
+
grants?: OpenGrant[];
|
|
4646
4738
|
}
|
|
4647
4739
|
/**
|
|
4648
4740
|
* Authentication context attached to an incoming A2A request after key validation.
|
|
@@ -4671,6 +4763,11 @@ interface A2AApiKeyRecord {
|
|
|
4671
4763
|
projectId: string;
|
|
4672
4764
|
/** Assistant whitelist; empty/undefined = all exposed agents in the tenant */
|
|
4673
4765
|
assistantIds?: string[];
|
|
4766
|
+
/**
|
|
4767
|
+
* Open-door authorization grants (A2A door keeps reading assistantIds).
|
|
4768
|
+
* Absent/empty → derived via effectiveGrants() legacy semantics.
|
|
4769
|
+
*/
|
|
4770
|
+
grants?: OpenGrant[];
|
|
4674
4771
|
label?: string;
|
|
4675
4772
|
enabled: boolean;
|
|
4676
4773
|
createdAt: Date;
|
|
@@ -4682,8 +4779,16 @@ interface CreateA2AApiKeyInput {
|
|
|
4682
4779
|
projectId: string;
|
|
4683
4780
|
/** Assistant whitelist; empty/undefined = all exposed agents in the tenant */
|
|
4684
4781
|
assistantIds?: string[];
|
|
4782
|
+
/** Open-door grants (see OpenProtocol); absent → legacy derivation */
|
|
4783
|
+
grants?: OpenGrant[];
|
|
4685
4784
|
label?: string;
|
|
4686
4785
|
}
|
|
4786
|
+
interface UpdateA2AApiKeyInput {
|
|
4787
|
+
label?: string;
|
|
4788
|
+
projectId?: string;
|
|
4789
|
+
assistantIds?: string[];
|
|
4790
|
+
grants?: OpenGrant[];
|
|
4791
|
+
}
|
|
4687
4792
|
interface A2AApiKeyStore {
|
|
4688
4793
|
/** Look up a key record by its bearer token value (for auth). */
|
|
4689
4794
|
findByKey(key: string): Promise<A2AApiKeyRecord | null>;
|
|
@@ -4705,6 +4810,8 @@ interface A2AApiKeyStore {
|
|
|
4705
4810
|
rotate(id: string): Promise<A2AApiKeyRecord>;
|
|
4706
4811
|
/** Delete a key permanently. */
|
|
4707
4812
|
delete(id: string): Promise<void>;
|
|
4813
|
+
/** Update mutable fields of an existing key (label, grants, projectId, assistantIds). */
|
|
4814
|
+
update(id: string, input: UpdateA2AApiKeyInput): Promise<A2AApiKeyRecord>;
|
|
4708
4815
|
/** Bulk load all active keys into a lookup Map (used at startup). */
|
|
4709
4816
|
loadIntoMap(): Promise<Map<string, A2AApiKeyEntry>>;
|
|
4710
4817
|
}
|
|
@@ -5372,7 +5479,10 @@ interface ProjectRoomMessageStore {
|
|
|
5372
5479
|
createIdempotent(input: Omit<ProjectRoomMessage, "createdAt"> & {
|
|
5373
5480
|
idempotencyKey: string;
|
|
5374
5481
|
}): Promise<ProjectRoomMessage>;
|
|
5375
|
-
/**
|
|
5482
|
+
/**
|
|
5483
|
+
* Lists messages strictly before an optional cursor, up to the requested limit.
|
|
5484
|
+
* Individually invalid persisted rows are skipped (and logged) instead of failing the whole read.
|
|
5485
|
+
*/
|
|
5376
5486
|
list(input: {
|
|
5377
5487
|
tenantId: string;
|
|
5378
5488
|
roomId: string;
|
|
@@ -5830,6 +5940,8 @@ interface ShareRecord {
|
|
|
5830
5940
|
passwordHash: string | null;
|
|
5831
5941
|
expiresAt: Date | null;
|
|
5832
5942
|
maxAccess: number | null;
|
|
5943
|
+
/** Extra Open-door grants appended to sandbox tokens (V1: kb read-only). */
|
|
5944
|
+
openGrants?: OpenGrant[];
|
|
5833
5945
|
accessCount: number;
|
|
5834
5946
|
revoked: boolean;
|
|
5835
5947
|
createdAt: Date;
|
|
@@ -5844,6 +5956,8 @@ interface CreateShareRequest {
|
|
|
5844
5956
|
title?: string;
|
|
5845
5957
|
expiresAt?: string;
|
|
5846
5958
|
maxAccess?: number;
|
|
5959
|
+
/** Extra Open-door grants for sandbox tokens minted for this share. */
|
|
5960
|
+
openGrants?: OpenGrant[];
|
|
5847
5961
|
}
|
|
5848
5962
|
/** Response returned to clients after a share is created. */
|
|
5849
5963
|
interface ShareResult {
|
|
@@ -5929,6 +6043,16 @@ interface PluginConnection {
|
|
|
5929
6043
|
interface PluginToolMeta {
|
|
5930
6044
|
name: string;
|
|
5931
6045
|
description: string;
|
|
6046
|
+
/** When true, this tool surfaces on the Open API (MCP) surface. */
|
|
6047
|
+
expose?: boolean;
|
|
6048
|
+
}
|
|
6049
|
+
/** Open-surface exposure entry with MCP annotation hints. */
|
|
6050
|
+
interface PluginOpenExposeTool {
|
|
6051
|
+
name: string;
|
|
6052
|
+
/** MCP readOnlyHint — pure query, no side effects. */
|
|
6053
|
+
readOnly?: boolean;
|
|
6054
|
+
/** MCP destructiveHint — may cause irreversible changes. */
|
|
6055
|
+
destructive?: boolean;
|
|
5932
6056
|
}
|
|
5933
6057
|
/**
|
|
5934
6058
|
* A text file included in a plugin skill bundle.
|
|
@@ -5987,6 +6111,14 @@ interface PluginMeta {
|
|
|
5987
6111
|
icon?: string;
|
|
5988
6112
|
/** 工具清单(可选,middleware 能自动提取时不需要写) */
|
|
5989
6113
|
tools?: PluginToolMeta[];
|
|
6114
|
+
/**
|
|
6115
|
+
* Open 面(MCP)暴露的工具名清单——独立于 tools 声明,一行即生长。
|
|
6116
|
+
* 声明后 OpenCredentialService 的 grants 匹配 domain=<meta.type>。
|
|
6117
|
+
*
|
|
6118
|
+
* 条目可为字符串(默认 readOnly=false, destructive=false)或带注解对象,
|
|
6119
|
+
* 注解映射到 MCP annotations(readOnlyHint / destructiveHint)。
|
|
6120
|
+
*/
|
|
6121
|
+
openExpose?: Array<string | PluginOpenExposeTool>;
|
|
5990
6122
|
/**
|
|
5991
6123
|
* 中间件配置 schema(用于 agent 配置面板)。新的 connection-backed
|
|
5992
6124
|
* plugins use `connections: string[]` and optional `connectAll?: boolean`.
|
|
@@ -6109,6 +6241,67 @@ interface Plugin {
|
|
|
6109
6241
|
stores?: Record<string, object | (() => object)>;
|
|
6110
6242
|
}
|
|
6111
6243
|
|
|
6244
|
+
/**
|
|
6245
|
+
* A single tool contributed by a sandbox-authored tenant plugin.
|
|
6246
|
+
*
|
|
6247
|
+
* @property name - Tool name exposed to the LLM (validated `^[a-zA-Z0-9_-]{1,64}$`).
|
|
6248
|
+
* @property description - Tool description.
|
|
6249
|
+
* @property schema - Restricted JSON Schema subset describing the tool input.
|
|
6250
|
+
* @property handler - Safe relative path (within the plugin directory) to a JS file.
|
|
6251
|
+
*/
|
|
6252
|
+
interface SandboxPluginToolDef {
|
|
6253
|
+
name: string;
|
|
6254
|
+
description: string;
|
|
6255
|
+
schema: Record<string, unknown>;
|
|
6256
|
+
handler: string;
|
|
6257
|
+
expose?: boolean;
|
|
6258
|
+
readOnly?: boolean;
|
|
6259
|
+
destructive?: boolean;
|
|
6260
|
+
timeoutMs?: number;
|
|
6261
|
+
maxResultBytes?: number;
|
|
6262
|
+
}
|
|
6263
|
+
/**
|
|
6264
|
+
* Connection capability contributed by a sandbox plugin. `test`/`discover`
|
|
6265
|
+
* point at handler files relative to the plugin directory.
|
|
6266
|
+
*/
|
|
6267
|
+
interface SandboxPluginConnectionDef {
|
|
6268
|
+
fields: PluginConnectionFieldSchema[];
|
|
6269
|
+
test?: {
|
|
6270
|
+
handler: string;
|
|
6271
|
+
};
|
|
6272
|
+
discover?: {
|
|
6273
|
+
handler: string;
|
|
6274
|
+
};
|
|
6275
|
+
resourceLabel?: string;
|
|
6276
|
+
}
|
|
6277
|
+
/**
|
|
6278
|
+
* Authoritative declarative definition of a tenant plugin, stored at
|
|
6279
|
+
* `/root/.agents/plugins/<type>/plugin.json`.
|
|
6280
|
+
*/
|
|
6281
|
+
interface SandboxPluginManifest {
|
|
6282
|
+
schemaVersion: 1;
|
|
6283
|
+
type: string;
|
|
6284
|
+
name: string;
|
|
6285
|
+
description: string;
|
|
6286
|
+
version: string;
|
|
6287
|
+
icon?: string;
|
|
6288
|
+
category?: string;
|
|
6289
|
+
configSchema?: Record<string, unknown>;
|
|
6290
|
+
defaultConfig?: Record<string, unknown>;
|
|
6291
|
+
connection?: SandboxPluginConnectionDef;
|
|
6292
|
+
tools: SandboxPluginToolDef[];
|
|
6293
|
+
skills?: Record<string, PluginSkillDefinition>;
|
|
6294
|
+
agents?: Record<string, AgentConfig>;
|
|
6295
|
+
}
|
|
6296
|
+
/** Structured load/validation feedback surfaced to authors and operators. */
|
|
6297
|
+
interface SandboxPluginDiagnostic {
|
|
6298
|
+
level: "error" | "warning";
|
|
6299
|
+
code: string;
|
|
6300
|
+
pluginType?: string;
|
|
6301
|
+
tool?: string;
|
|
6302
|
+
message: string;
|
|
6303
|
+
}
|
|
6304
|
+
|
|
6112
6305
|
/**
|
|
6113
6306
|
* 通用类型定义
|
|
6114
6307
|
*
|
|
@@ -6222,4 +6415,4 @@ declare function parseTrustedRunContext(value: unknown): TrustedRunContext;
|
|
|
6222
6415
|
*/
|
|
6223
6416
|
declare function parseQueuedExecutionMode(value: unknown): QueuedExecutionMode;
|
|
6224
6417
|
|
|
6225
|
-
export { type A2AApiKeyEntry, type A2AApiKeyRecord, type A2AApiKeyStore, type A2AAuthContext, type A2AExposure, type A2ARemoteAgentConfig, type AgentClient, type AgentConfig, type AgentConfigWithTools, type AgentLatticeProtocol, type AgentMenuConfig, type AgentMiddlewareConfig, type AgentRunConfig, AgentType, type AgentWebApp, type AgentWebAppAppearance, type AgentWebAppBootstrap, type AgentWebAppCalloutWidget, type AgentWebAppError, type AgentWebAppErrorCode, type AgentWebAppFeatures, type AgentWebAppGenUIBlock, type AgentWebAppIdentityAssurance, type AgentWebAppIdentityConfig, type AgentWebAppIdentityPolicy, type AgentWebAppInterrupt, type AgentWebAppIssuerConfig, type AgentWebAppRuntimeMessage, type AgentWebAppRuntimeThread, type AgentWebAppScope, type AgentWebAppStatus, type AgentWebAppStore, type AgentWebAppStorePatch, type AgentWebAppStreamEvent, type AgentWebAppStreamProjectionContext, type AgentWebAppTableWidget, type AgentWebAppThreadMetadata, type AgentWebAppUpdateOptions, type Assistant, type AssistantMessage, type AssistantStore, type Attachment, type AvailableModule, type BaseLatticeProtocol, type BaseMessage, type Binding, type BindingListParams, type BindingMutablePatch, type BindingRegistry, type BootstrapFilesConfig, type BrowserMiddlewareConfig, type Callback, type CapabilityBundle, type CapabilityBundleDeleteResult, type CapabilityBundleStore, type CapabilityBundleUpdateConflict, type CapabilityFieldSource, type CapabilityOverride, type CapabilityPreview, type CapabilityPreviewIssue, type CapabilityRuntime, type ChannelAdapter, type ChannelBindingMigrationConflict, ChannelBindingMigrationConflictError, type ChannelInstallation, type ChannelInstallationStore, type ChannelInstallationType, type ClawMiddlewareConfig, type CodeEvalMiddlewareConfig, type Collection, type CollectionField, type CollectionFieldType, type CollectionMiddlewareConfig, type CollectionSchema, type CollectionStore, type ConnectionEntry, type ConnectionStore, type ConversationRecord, type CreateA2AApiKeyInput, type CreateAgentWebAppInput, type CreateAssistantRequest, type CreateBindingInput, type CreateCapabilityBundleInput, type CreateChannelInstallationInput, type CreateChannelInstallationRequest, type CreateCollectionRequest, type CreateConversationInput, type CreateDatabaseConfigRequest, type CreateEvalCaseRequest, type CreateEvalProjectRequest, type CreateEvalRunRequest, type CreateEvalSuiteRequest, type CreateMcpServerConfigRequest, type CreateMenuItemInput, type CreateMetricsServerConfigRequest, type CreateProjectRequest, type CreateRunStepRequest, type CreateShareRequest, type CreateSkillRequest, type CreateTaskRequest, type CreateTenantRequest, type CreateThreadRequest, type CreateUserRequest, type CreateUserTenantLinkRequest, type CreateWorkItemIfAbsentRequest, type CreateWorkItemRequest, type CreateWorkflowRunRequest, type CreateWorkspaceRequest, type CustomMenuConfig, type DataSource, type DatabaseConfig, type DatabaseConfigEntry, type DatabaseConfigStore, type DatabaseType, type DeepAgentConfig, type DescriptorDataValue, type DeveloperMessage, type DispatchResult, DuplicateChannelBindingSubjectError, EXECUTION_RESULT_EVENT_KEY_PATTERN, EXECUTION_RESULT_EVENT_KEY_PATTERN_SOURCE, EXECUTION_RESULT_EVENT_KEY_PREFIX, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type EvalCase, type EvalProject, type EvalProjectReport, type EvalRun, type EvalRunResult, type EvalStore, type EvalSuite, type ExecuteSqlQueryRequest, type ExecuteSqlQueryResponse, type ExpectedCapabilityBundleRevisions, type FilterCondition, type GraphBuildOptions, type HtmlMenuConfig, type IConversationStore, type ID, type InboundMessage, type InternalAgentNode, type InternalBaseNode, type InternalCreateCapabilityBundleInput, type InternalDSL, type InternalEdge, type InternalInput, type InternalInputNode, type InternalMapNode, type InternalNode, type InternalNodeConfig, type InternalOutput, type InternalState, type InternalStateField, type InternalTerminalNode, type InternalUpdateCapabilityBundleInput, type InterruptMessage, type InterruptPolicy, InvalidProjectCapabilityBundleConfigError, type LLMConfig, type LarkChannelInstallationConfig, type LatticeError, type LatticeEventBus, type LatticeMessage, type LocalA2AProviderId, type LocalA2AProviderState, type LocalA2AProviderStatus, type LocalA2ATemplateDefinition, type LocalRuntimeConfig, type LoggerClient, type LoggerConfig, type LoggerContext, type LoggerLatticeProtocol, LoggerType, MAX_PENDING_EXECUTION_RESULTS_LIMIT, type McpClient, type McpClientOptions, type McpConnectionStatus, type McpLatticeMessage, type McpLatticeProtocol, McpMessageType, type McpServerConfig, type McpServerConfigEntry, type McpServerConfigStore, type McpStats, type McpTool, type McpToolResult, type McpTransportType, type MemoryClient, type MemoryConfig, type MemoryLatticeProtocol, MemoryType, type MenuContentConfig, type MenuContentType, type MenuItem, type MenuRegistry, type MenuTarget, type Message, type MessageChunk, type MessageChunkType, MessageChunkTypes, type MessageContext, type MessageMiddleware, type MetricColumn, type MetricDataPoint, type MetricMeta, type MetricQueryResult, type MetricsMiddlewareConfig, type MetricsServerConfig, type MetricsServerConfigEntry, type MetricsServerConfigStore, type MetricsServerType, type MiddlewareType, type ModelLatticeProtocol, type OutboundMessage, PROJECT_ROOM_USER_CHANNEL_PROJECT, PROJECT_TASK_LIFECYCLE_ACTIONS, type PaginatedResult, type PaginationParams, type PinoFileOptions, type Plugin, type PluginConnection, type PluginConnectionFieldSchema, type PluginConnectionTestResult, type PluginContext, type PluginDiscoveredResource, type PluginMeta, type PluginMetaOutput, type PluginMiddlewareFactory, type PluginSkillDefinition, type PluginSkillResource, type PluginStandardConnectionConfig, type PluginToolMeta, type ProcessingAgentConfig, type Project, type ProjectBotMembership, type ProjectBotMembershipStatus, type ProjectBotMembershipStore, type ProjectBotRole, type ProjectCapabilityConfig, type ProjectFilter, type ProjectHumanRole, type ProjectKind, type ProjectLifecycleEventCursor, type ProjectLifecycleEventQuery, type ProjectMembership, type ProjectMembershipMutationResult, type ProjectMembershipStatus, type ProjectMembershipStore, type ProjectRoom, ProjectRoomBrokerCapacityError, type ProjectRoomBusinessEvent, type ProjectRoomBusinessEventDraft, type ProjectRoomControlEvent, ProjectRoomCursorError, type ProjectRoomEventBrokerProtocol, type ProjectRoomEventId, type ProjectRoomEventOf, type ProjectRoomEventScope, type ProjectRoomEventSubscription, type ProjectRoomMembershipAffectedEvent, type ProjectRoomMembershipChangedEvent, type ProjectRoomMention, type ProjectRoomMessage, type ProjectRoomMessageAuthor, type ProjectRoomMessageCreatedEvent, type ProjectRoomMessageCursor, type ProjectRoomMessageSource, type ProjectRoomMessageStore, type ProjectRoomPublicBotMembership, type ProjectRoomPublicMembership, type ProjectRoomPublicMessage, type ProjectRoomReadChangedEvent, type ProjectRoomReadState, type ProjectRoomReadStateStore, type ProjectRoomRealtimeActor, type ProjectRoomRosterChangedEvent, type ProjectRoomScopedBusinessEvent, type ProjectRoomSseWritable, type ProjectRoomStore, type ProjectRoomTaskChangedEvent, type ProjectRoomThreadMetadata, type ProjectRoomTrustedRunContext, type ProjectStore, type ProjectTaskLifecycleAction, ProjectTaskStoreUnsupportedError, type ProjectTaskThreadMetadata, type ProjectTaskTrustedRunContext, type ProjectTaskWorkItemStore, type PublicChannelInstallationType, type QueryParams, type QueryResultFormat, type QueryWorkflowRunsOptions, type QueryWorkflowRunsResult, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type QueuedExecutionMode, type ReactAgentConfig, type ReplyTarget, type ResourceAddress, type ResourceResolver, type Result, type RunStep, type STTClient, type STTConfig, type STTModelLatticeProtocol, type SandboxMiddlewareConfig, type ScheduleClient, type ScheduleConfig, type ScheduleCronOptions, ScheduleExecutionType, type ScheduleLatticeProtocol, type ScheduleOnceOptions, type ScheduleStorage, ScheduleType, type ScheduledTaskDefinition, ScheduledTaskStatus, type SchedulerMiddlewareConfig, type SemanticMetricsFilter, type SemanticMetricsQueryRequest, type SemanticMetricsQueryResponse, type SemanticMetricsServerConfig, type ShareRecord, type ShareResult, type ShareVisibility, type SharedResourceStore, type Skill, type SkillClient, type SkillClientType, type SkillConfig, type SkillLatticeProtocol, type SkillStore, type SkillStoreContext, type SqlMiddlewareConfig, type StepStatus, type StepType, type StorageType, type SystemMessage, type TableQueryRequest, type TableQueryResponse, type TaskBeliefDiagnosticCode, type TaskBeliefEntry, type TaskBeliefParseFailure, type TaskBeliefParseResult, type TaskBeliefParseSuccess, type TaskBeliefState, type TaskDependentListQuery, type TaskFileRef, type TaskHandler, type TaskItem, type TaskListFilter, type TaskMutationSnapshot, type TaskStore, type TaskWorkItem, type TaskWorkItemListFilter, type TaskWorkItemStore, type TeamAgentConfig, type TeamTeammateConfig, type Tenant, type TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, type ThreadStore, type Timestamp, type ToolCall, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type TopologyEdge, type TranscriptionResult, type TrustedRunContext, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UpdateAgentWebAppInput, type UpdateCapabilityBundleInput, type UpdateChannelInstallationRequest, type UpdateCollectionRequest, type UpdateDatabaseConfigRequest, type UpdateMcpServerConfigRequest, type UpdateMenuItemInput, type UpdateMetricsServerConfigRequest, type UpdateProjectCapabilityBundlesResult, type UpdateProjectRequest, type UpdateRunStepRequest, type UpdateTaskRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkflowRunRequest, type UpdateWorkspaceRequest, type User, type UserMessage, type UserStatus, type UserStore, type UserTenantLink, type UserTenantLinkStore, type UserTenantRole, type VectorStoreConfig, type VectorStoreCreateParams, type VectorStoreLatticeProtocol, type VectorStoreProvider, type WechatChannelInstallationConfig, type WorkflowAgentConfig, type WorkflowRun, type WorkflowRunStatus, type WorkflowTrackingStore, type Workspace, type WorkspaceStore, type YamlAgentStep, type YamlMapStep, type YamlParallelBlock, type YamlTopLevelStep, type YamlWorkflow, assertGenericProjectConfig, createAgentWebAppStreamProjectionContext, descriptorDataValue, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isProcessingAgentConfig, isProjectRoomEventId, isTeamAgentConfig, isWorkflowAgentConfig, parseAgentWebAppGenUIBlock, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, projectAgentWebAppChunk, projectRoomUserEventScope, replaceTaskBeliefState, requireProjectTaskWorkItemStore, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, taskBeliefStatesEqual, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
|
|
6418
|
+
export { type A2AApiKeyEntry, type A2AApiKeyRecord, type A2AApiKeyStore, type A2AAuthContext, type A2ARemoteAgentConfig, type AgentClient, type AgentConfig, type AgentConfigWithTools, type AgentLatticeProtocol, type AgentMenuConfig, type AgentMiddlewareConfig, type AgentRunConfig, AgentType, type AgentWebApp, type AgentWebAppAppearance, type AgentWebAppBootstrap, type AgentWebAppCalloutWidget, type AgentWebAppError, type AgentWebAppErrorCode, type AgentWebAppFeatures, type AgentWebAppGenUIBlock, type AgentWebAppIdentityAssurance, type AgentWebAppIdentityConfig, type AgentWebAppIdentityPolicy, type AgentWebAppInterrupt, type AgentWebAppIssuerConfig, type AgentWebAppRuntimeMessage, type AgentWebAppRuntimeThread, type AgentWebAppScope, type AgentWebAppStatus, type AgentWebAppStore, type AgentWebAppStorePatch, type AgentWebAppStreamEvent, type AgentWebAppStreamProjectionContext, type AgentWebAppTableWidget, type AgentWebAppThreadMetadata, type AgentWebAppUpdateOptions, type Assistant, type AssistantMessage, type AssistantStore, type Attachment, type AvailableModule, type BaseLatticeProtocol, type BaseMessage, type Binding, type BindingListParams, type BindingMutablePatch, type BindingRegistry, type BootstrapFilesConfig, type BrowserMiddlewareConfig, type Callback, type CapabilityBundle, type CapabilityBundleDeleteResult, type CapabilityBundleStore, type CapabilityBundleUpdateConflict, type CapabilityFieldSource, type CapabilityOverride, type CapabilityPreview, type CapabilityPreviewIssue, type CapabilityRuntime, type ChannelAdapter, type ChannelBindingMigrationConflict, ChannelBindingMigrationConflictError, type ChannelInstallation, type ChannelInstallationStore, type ChannelInstallationType, type ClawMiddlewareConfig, type CodeEvalMiddlewareConfig, type Collection, type CollectionField, type CollectionFieldType, type CollectionMiddlewareConfig, type CollectionSchema, type CollectionStore, type ConnectionEntry, type ConnectionStore, type ConversationRecord, type CreateA2AApiKeyInput, type CreateAgentWebAppInput, type CreateAssistantRequest, type CreateBindingInput, type CreateCapabilityBundleInput, type CreateChannelInstallationInput, type CreateChannelInstallationRequest, type CreateCollectionRequest, type CreateConversationInput, type CreateDatabaseConfigRequest, type CreateEvalCaseRequest, type CreateEvalProjectRequest, type CreateEvalRunRequest, type CreateEvalSuiteRequest, type CreateMcpServerConfigRequest, type CreateMenuItemInput, type CreateMetricsServerConfigRequest, type CreateProjectRequest, type CreateRunStepRequest, type CreateShareRequest, type CreateSkillRequest, type CreateTaskRequest, type CreateTenantRequest, type CreateThreadRequest, type CreateUserRequest, type CreateUserTenantLinkRequest, type CreateWorkItemIfAbsentRequest, type CreateWorkItemRequest, type CreateWorkflowRunRequest, type CreateWorkspaceRequest, type CustomMenuConfig, type DataSource, type DatabaseConfig, type DatabaseConfigEntry, type DatabaseConfigStore, type DatabaseType, type DeepAgentConfig, type DescriptorDataValue, type DeveloperMessage, type DispatchResult, DuplicateChannelBindingSubjectError, EXECUTION_RESULT_EVENT_KEY_PATTERN, EXECUTION_RESULT_EVENT_KEY_PATTERN_SOURCE, EXECUTION_RESULT_EVENT_KEY_PREFIX, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type EvalCase, type EvalProject, type EvalProjectReport, type EvalRun, type EvalRunResult, type EvalStore, type EvalSuite, type ExecuteSqlQueryRequest, type ExecuteSqlQueryResponse, type ExpectedCapabilityBundleRevisions, type FilterCondition, type GraphBuildOptions, type HtmlMenuConfig, type IConversationStore, type ID, type InboundMessage, type InternalAgentNode, type InternalBaseNode, type InternalCreateCapabilityBundleInput, type InternalDSL, type InternalEdge, type InternalInput, type InternalInputNode, type InternalMapNode, type InternalNode, type InternalNodeConfig, type InternalOutput, type InternalState, type InternalStateField, type InternalTerminalNode, type InternalUpdateCapabilityBundleInput, type InterruptMessage, type InterruptPolicy, InvalidProjectCapabilityBundleConfigError, type LLMConfig, type LarkChannelInstallationConfig, type LatticeError, type LatticeEventBus, type LatticeMessage, type LocalA2AProviderId, type LocalA2AProviderState, type LocalA2AProviderStatus, type LocalA2ATemplateDefinition, type LocalRuntimeConfig, type LoggerClient, type LoggerConfig, type LoggerContext, type LoggerLatticeProtocol, LoggerType, MAX_PENDING_EXECUTION_RESULTS_LIMIT, type McpClient, type McpClientOptions, type McpConnectionStatus, type McpLatticeMessage, type McpLatticeProtocol, McpMessageType, type McpServerConfig, type McpServerConfigEntry, type McpServerConfigStore, type McpStats, type McpTool, type McpToolResult, type McpTransportType, type MemoryClient, type MemoryConfig, type MemoryLatticeProtocol, MemoryType, type MenuContentConfig, type MenuContentType, type MenuItem, type MenuRegistry, type MenuTarget, type Message, type MessageChunk, type MessageChunkType, MessageChunkTypes, type MessageContext, type MessageMiddleware, type MetricColumn, type MetricDataPoint, type MetricMeta, type MetricQueryResult, type MetricsMiddlewareConfig, type MetricsServerConfig, type MetricsServerConfigEntry, type MetricsServerConfigStore, type MetricsServerType, type MiddlewareType, type ModelLatticeProtocol, type OpenAuditAppendInput, type OpenAuditQuery, type OpenAuditRecord, type OpenAuditStore, type OpenCapabilitySource, type OpenCatalog, type OpenCatalogDomain, type OpenCatalogItem, type OpenCredentialKind, type OpenExecutionContext, type OpenExecutionResult, type OpenGrant, type OutboundMessage, PROJECT_ROOM_USER_CHANNEL_PROJECT, PROJECT_TASK_LIFECYCLE_ACTIONS, type PaginatedResult, type PaginationParams, type PinoFileOptions, type Plugin, type PluginConnection, type PluginConnectionFieldSchema, type PluginConnectionTestResult, type PluginContext, type PluginDiscoveredResource, type PluginMeta, type PluginMetaOutput, type PluginMiddlewareFactory, type PluginSkillDefinition, type PluginSkillResource, type PluginStandardConnectionConfig, type PluginToolMeta, type ProcessingAgentConfig, type Project, type ProjectBotMembership, type ProjectBotMembershipStatus, type ProjectBotMembershipStore, type ProjectBotRole, type ProjectCapabilityConfig, type ProjectFilter, type ProjectHumanRole, type ProjectKind, type ProjectLifecycleEventCursor, type ProjectLifecycleEventQuery, type ProjectMembership, type ProjectMembershipMutationResult, type ProjectMembershipStatus, type ProjectMembershipStore, type ProjectRoom, ProjectRoomBrokerCapacityError, type ProjectRoomBusinessEvent, type ProjectRoomBusinessEventDraft, type ProjectRoomControlEvent, ProjectRoomCursorError, type ProjectRoomEventBrokerProtocol, type ProjectRoomEventId, type ProjectRoomEventOf, type ProjectRoomEventScope, type ProjectRoomEventSubscription, type ProjectRoomMembershipAffectedEvent, type ProjectRoomMembershipChangedEvent, type ProjectRoomMention, type ProjectRoomMessage, type ProjectRoomMessageAuthor, type ProjectRoomMessageCreatedEvent, type ProjectRoomMessageCursor, type ProjectRoomMessageSource, type ProjectRoomMessageStore, type ProjectRoomPublicBotMembership, type ProjectRoomPublicMembership, type ProjectRoomPublicMessage, type ProjectRoomReadChangedEvent, type ProjectRoomReadState, type ProjectRoomReadStateStore, type ProjectRoomRealtimeActor, type ProjectRoomRosterChangedEvent, type ProjectRoomScopedBusinessEvent, type ProjectRoomSseWritable, type ProjectRoomStore, type ProjectRoomTaskChangedEvent, type ProjectRoomThreadMetadata, type ProjectRoomTrustedRunContext, type ProjectStore, type ProjectTaskLifecycleAction, ProjectTaskStoreUnsupportedError, type ProjectTaskThreadMetadata, type ProjectTaskTrustedRunContext, type ProjectTaskWorkItemStore, type PublicChannelInstallationType, type QueryParams, type QueryResultFormat, type QueryWorkflowRunsOptions, type QueryWorkflowRunsResult, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type QueuedExecutionMode, type ReactAgentConfig, type ReplyTarget, type ResourceAddress, type ResourceResolver, type Result, type RunStep, type STTClient, type STTConfig, type STTModelLatticeProtocol, type SandboxMiddlewareConfig, type SandboxPluginConnectionDef, type SandboxPluginDiagnostic, type SandboxPluginManifest, type SandboxPluginToolDef, type ScheduleClient, type ScheduleConfig, type ScheduleCronOptions, ScheduleExecutionType, type ScheduleLatticeProtocol, type ScheduleOnceOptions, type ScheduleStorage, ScheduleType, type ScheduledTaskDefinition, ScheduledTaskStatus, type SchedulerMiddlewareConfig, type SemanticMetricsFilter, type SemanticMetricsQueryRequest, type SemanticMetricsQueryResponse, type SemanticMetricsServerConfig, type ShareRecord, type ShareResult, type ShareVisibility, type SharedResourceStore, type Skill, type SkillClient, type SkillClientType, type SkillConfig, type SkillLatticeProtocol, type SkillStore, type SkillStoreContext, type SqlMiddlewareConfig, type StepStatus, type StepType, type StorageType, type SystemMessage, type TableQueryRequest, type TableQueryResponse, type TaskBeliefDiagnosticCode, type TaskBeliefEntry, type TaskBeliefParseFailure, type TaskBeliefParseResult, type TaskBeliefParseSuccess, type TaskBeliefState, type TaskDependentListQuery, type TaskFileRef, type TaskHandler, type TaskItem, type TaskListFilter, type TaskMutationSnapshot, type TaskStore, type TaskWorkItem, type TaskWorkItemListFilter, type TaskWorkItemStore, type TeamAgentConfig, type TeamTeammateConfig, type Tenant, type TenantStatus, type TenantStore, type TestMcpServerToolsResponse, type Thread, type ThreadStore, type Timestamp, type ToolCall, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type TopologyEdge, type TranscriptionResult, type TrustedRunContext, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UpdateA2AApiKeyInput, type UpdateAgentWebAppInput, type UpdateCapabilityBundleInput, type UpdateChannelInstallationRequest, type UpdateCollectionRequest, type UpdateDatabaseConfigRequest, type UpdateMcpServerConfigRequest, type UpdateMenuItemInput, type UpdateMetricsServerConfigRequest, type UpdateProjectCapabilityBundlesResult, type UpdateProjectRequest, type UpdateRunStepRequest, type UpdateTaskRequest, type UpdateTenantRequest, type UpdateUserRequest, type UpdateUserTenantLinkRequest, type UpdateWorkflowRunRequest, type UpdateWorkspaceRequest, type User, type UserMessage, type UserStatus, type UserStore, type UserTenantLink, type UserTenantLinkStore, type UserTenantRole, type VectorStoreConfig, type VectorStoreCreateParams, type VectorStoreLatticeProtocol, type VectorStoreProvider, type WechatChannelInstallationConfig, type WorkflowAgentConfig, type WorkflowRun, type WorkflowRunStatus, type WorkflowTrackingStore, type Workspace, type WorkspaceStore, type YamlAgentStep, type YamlMapStep, type YamlParallelBlock, type YamlTopLevelStep, type YamlWorkflow, assertGenericProjectConfig, createAgentWebAppStreamProjectionContext, descriptorDataValue, effectiveGrants, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isA2ARemoteAgentConfig, isDeepAgentConfig, isExecutionResultEventKey, isProcessingAgentConfig, isProjectRoomEventId, isTeamAgentConfig, isWorkflowAgentConfig, parseAgentWebAppGenUIBlock, parseProjectRoomEventId, parseQueuedExecutionMode, parseTaskBeliefState, parseTrustedRunContext, projectAgentWebAppChunk, projectRoomUserEventScope, replaceTaskBeliefState, requireProjectTaskWorkItemStore, snapshotExactArray, snapshotExactRecord, snapshotProjectRoomBotMembershipRealtime, snapshotProjectRoomMembershipRealtime, snapshotProjectRoomMessageRealtime, taskBeliefStatesEqual, toProjectRoomPublicBotMembership, toProjectRoomPublicMembership, toProjectRoomPublicMessage };
|
package/dist/index.js
CHANGED
|
@@ -45,6 +45,7 @@ __export(index_exports, {
|
|
|
45
45
|
assertGenericProjectConfig: () => assertGenericProjectConfig,
|
|
46
46
|
createAgentWebAppStreamProjectionContext: () => createAgentWebAppStreamProjectionContext,
|
|
47
47
|
descriptorDataValue: () => descriptorDataValue,
|
|
48
|
+
effectiveGrants: () => effectiveGrants,
|
|
48
49
|
getSubAgentsFromConfig: () => getSubAgentsFromConfig,
|
|
49
50
|
getToolsFromConfig: () => getToolsFromConfig,
|
|
50
51
|
hasTools: () => hasTools,
|
|
@@ -935,6 +936,15 @@ function parseQueuedExecutionMode(value) {
|
|
|
935
936
|
if (value !== "followup") throw new Error("Invalid queued execution mode");
|
|
936
937
|
return value;
|
|
937
938
|
}
|
|
939
|
+
|
|
940
|
+
// src/OpenProtocol.ts
|
|
941
|
+
function effectiveGrants(record) {
|
|
942
|
+
if (record.grants && record.grants.length > 0) return record.grants;
|
|
943
|
+
if (record.assistantIds && record.assistantIds.length > 0) {
|
|
944
|
+
return [{ domain: "agent", items: record.assistantIds }];
|
|
945
|
+
}
|
|
946
|
+
return [{ domain: "agent" }];
|
|
947
|
+
}
|
|
938
948
|
// Annotate the CommonJS export names for ESM import in node:
|
|
939
949
|
0 && (module.exports = {
|
|
940
950
|
AgentType,
|
|
@@ -962,6 +972,7 @@ function parseQueuedExecutionMode(value) {
|
|
|
962
972
|
assertGenericProjectConfig,
|
|
963
973
|
createAgentWebAppStreamProjectionContext,
|
|
964
974
|
descriptorDataValue,
|
|
975
|
+
effectiveGrants,
|
|
965
976
|
getSubAgentsFromConfig,
|
|
966
977
|
getToolsFromConfig,
|
|
967
978
|
hasTools,
|