@axiom-lattice/protocols 2.1.12 → 2.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
 
2
- > @axiom-lattice/protocols@2.1.12 build /home/runner/work/agentic/agentic/packages/protocols
2
+ > @axiom-lattice/protocols@2.1.14 build /home/runner/work/agentic/agentic/packages/protocols
3
3
  > tsup src/index.ts --format cjs,esm --dts --sourcemap
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,13 +8,13 @@
8
8
  CLI Target: es2020
9
9
  CJS Build start
10
10
  ESM Build start
11
- CJS dist/index.js 5.02 KB
12
- CJS dist/index.js.map 29.27 KB
13
- CJS ⚡️ Build success in 53ms
14
- ESM dist/index.mjs 3.54 KB
15
- ESM dist/index.mjs.map 28.33 KB
16
- ESM ⚡️ Build success in 53ms
11
+ CJS dist/index.js 5.20 KB
12
+ CJS dist/index.js.map 31.18 KB
13
+ CJS ⚡️ Build success in 99ms
14
+ ESM dist/index.mjs 3.67 KB
15
+ ESM dist/index.mjs.map 30.14 KB
16
+ ESM ⚡️ Build success in 98ms
17
17
  DTS Build start
18
- DTS ⚡️ Build success in 2898ms
19
- DTS dist/index.d.ts 42.21 KB
20
- DTS dist/index.d.mts 42.21 KB
18
+ DTS ⚡️ Build success in 2604ms
19
+ DTS dist/index.d.ts 50.87 KB
20
+ DTS dist/index.d.mts 50.87 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @axiom-lattice/protocols
2
2
 
3
+ ## 2.1.14
4
+
5
+ ### Patch Changes
6
+
7
+ - faf1bad: update team and more
8
+
9
+ ## 2.1.13
10
+
11
+ ### Patch Changes
12
+
13
+ - cefb4e1: extend agent
14
+
3
15
  ## 2.1.12
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -122,7 +122,8 @@ interface ModelLatticeProtocol extends BaseLatticeProtocol<LLMConfig, BaseChatMo
122
122
  */
123
123
  declare enum AgentType {
124
124
  REACT = "react",
125
- DEEP_AGENT = "deep_agent"
125
+ DEEP_AGENT = "deep_agent",
126
+ TEAM = "team"
126
127
  }
127
128
  /**
128
129
  * Runtime configuration that will be injected into LangGraphRunnableConfig.configurable
@@ -142,6 +143,12 @@ interface BaseAgentConfig {
142
143
  name: string;
143
144
  description: string;
144
145
  prompt: string;
146
+ /**
147
+ * Key of the parent agent to inherit configuration from.
148
+ * When set, unspecified fields are inherited from the parent agent's config.
149
+ * Child's explicitly set fields override the parent's.
150
+ */
151
+ extendsAgent?: string;
145
152
  schema?: ZodObject<any, any, any, any, any>;
146
153
  modelKey?: string;
147
154
  /**
@@ -167,8 +174,7 @@ interface BrowserMiddlewareConfig {
167
174
  headless: boolean;
168
175
  }
169
176
  interface SqlMiddlewareConfig {
170
- databaseKey?: string;
171
- connectionString?: string;
177
+ databaseKeys?: string[];
172
178
  }
173
179
  type MiddlewareType = "filesystem" | "code_eval" | "browser" | "sql" | "skill" | "http" | "custom";
174
180
  interface AgentMiddlewareConfig {
@@ -195,15 +201,54 @@ interface DeepAgentConfig extends BaseAgentConfig {
195
201
  subAgents?: string[];
196
202
  internalSubAgents?: AgentConfig[];
197
203
  }
204
+ /**
205
+ * Team teammate configuration -- describes an available teammate.
206
+ */
207
+ interface TeamTeammateConfig {
208
+ /** Unique name for this teammate (used as agent ID) */
209
+ name: string;
210
+ /** Role category (e.g. "research", "writing", "review") */
211
+ role: string;
212
+ /** Human-readable description of what this teammate does */
213
+ description: string;
214
+ /** Tool keys this teammate has access to */
215
+ tools?: string[];
216
+ /** Custom system prompt for this teammate */
217
+ prompt?: string;
218
+ /** Model key override for this teammate */
219
+ modelKey?: string;
220
+ }
221
+ /**
222
+ * TEAM agent configuration -- a team lead that dynamically creates teammates.
223
+ * Teammates are created on-the-fly from create_team tool input (name, role, description).
224
+ */
225
+ interface TeamAgentConfig extends BaseAgentConfig {
226
+ type: AgentType.TEAM;
227
+ /** Tool keys available to the team lead */
228
+ tools?: string[];
229
+ /** Maximum number of teammates running concurrently */
230
+ maxConcurrency?: number;
231
+ /**
232
+ * Schedule lattice key for polling task list / mailbox.
233
+ * When set, teammates use ScheduleLattice for periodic polling instead of event-driven wait.
234
+ */
235
+ scheduleLatticeKey?: string;
236
+ /** Poll interval in ms when using schedule lattice (default: 5000) */
237
+ pollIntervalMs?: number;
238
+ }
239
+ /**
240
+ * Type guard to check if config is TeamAgentConfig
241
+ */
242
+ declare function isTeamAgentConfig(config: AgentConfig): config is TeamAgentConfig;
198
243
  /**
199
244
  * Agent configuration union type
200
245
  * Different agent types have different configuration options
201
246
  */
202
- type AgentConfig = ReactAgentConfig | DeepAgentConfig;
247
+ type AgentConfig = ReactAgentConfig | DeepAgentConfig | TeamAgentConfig;
203
248
  /**
204
249
  * Agent configuration with tools property
205
250
  */
206
- type AgentConfigWithTools = ReactAgentConfig | DeepAgentConfig;
251
+ type AgentConfigWithTools = ReactAgentConfig | DeepAgentConfig | TeamAgentConfig;
207
252
  /**
208
253
  * Type guard to check if config has tools property
209
254
  */
@@ -1530,6 +1575,254 @@ interface McpStats {
1530
1575
  lastCallTimestamp: number;
1531
1576
  }
1532
1577
 
1578
+ /**
1579
+ * WorkspaceStoreProtocol
1580
+ *
1581
+ * Workspace and Project store protocol definitions
1582
+ * for the Axiom Lattice framework
1583
+ */
1584
+ type StorageType = "sandbox" | "filesystem";
1585
+ /**
1586
+ * Workspace type definition
1587
+ */
1588
+ interface Workspace {
1589
+ id: string;
1590
+ tenantId: string;
1591
+ name: string;
1592
+ description?: string;
1593
+ storageType: StorageType;
1594
+ createdAt: Date;
1595
+ updatedAt: Date;
1596
+ }
1597
+ /**
1598
+ * Create workspace request type
1599
+ */
1600
+ interface CreateWorkspaceRequest {
1601
+ name: string;
1602
+ description?: string;
1603
+ storageType: StorageType;
1604
+ }
1605
+ /**
1606
+ * Update workspace request type
1607
+ */
1608
+ interface UpdateWorkspaceRequest {
1609
+ name?: string;
1610
+ description?: string;
1611
+ storageType?: StorageType;
1612
+ }
1613
+ /**
1614
+ * WorkspaceStore interface
1615
+ * Provides CRUD operations for workspace data
1616
+ */
1617
+ interface WorkspaceStore {
1618
+ getAllWorkspaces(tenantId: string): Promise<Workspace[]>;
1619
+ getWorkspaceById(tenantId: string, id: string): Promise<Workspace | null>;
1620
+ createWorkspace(tenantId: string, id: string, data: CreateWorkspaceRequest): Promise<Workspace>;
1621
+ updateWorkspace(tenantId: string, id: string, updates: UpdateWorkspaceRequest): Promise<Workspace | null>;
1622
+ deleteWorkspace(tenantId: string, id: string): Promise<boolean>;
1623
+ }
1624
+ /**
1625
+ * Project type definition
1626
+ */
1627
+ interface Project {
1628
+ id: string;
1629
+ tenantId: string;
1630
+ workspaceId: string;
1631
+ name: string;
1632
+ description?: string;
1633
+ createdAt: Date;
1634
+ updatedAt: Date;
1635
+ }
1636
+ /**
1637
+ * Create project request type
1638
+ */
1639
+ interface CreateProjectRequest {
1640
+ name: string;
1641
+ description?: string;
1642
+ }
1643
+ /**
1644
+ * Update project request type
1645
+ */
1646
+ interface UpdateProjectRequest {
1647
+ name?: string;
1648
+ description?: string;
1649
+ }
1650
+ /**
1651
+ * ProjectStore interface
1652
+ * Provides CRUD operations for project data
1653
+ */
1654
+ interface ProjectStore {
1655
+ getProjectsByWorkspace(tenantId: string, workspaceId: string): Promise<Project[]>;
1656
+ getProjectById(tenantId: string, id: string): Promise<Project | null>;
1657
+ createProject(tenantId: string, workspaceId: string, id: string, data: CreateProjectRequest): Promise<Project>;
1658
+ updateProject(tenantId: string, id: string, updates: UpdateProjectRequest): Promise<Project | null>;
1659
+ deleteProject(tenantId: string, id: string): Promise<boolean>;
1660
+ }
1661
+
1662
+ /**
1663
+ * DatabaseConfigStoreProtocol
1664
+ *
1665
+ * Database configuration store protocol for the Axiom Lattice framework
1666
+ * Provides standardized interfaces for database connection config management
1667
+ */
1668
+ /**
1669
+ * Supported database types
1670
+ */
1671
+ type DatabaseType = 'postgres' | 'mysql' | 'sqlite';
1672
+ /**
1673
+ * Database connection configuration
1674
+ */
1675
+ interface DatabaseConfig {
1676
+ type: DatabaseType;
1677
+ host?: string;
1678
+ port?: number;
1679
+ database: string;
1680
+ user?: string;
1681
+ password?: string;
1682
+ connectionString?: string;
1683
+ ssl?: boolean;
1684
+ }
1685
+ /**
1686
+ * Database configuration entry stored in the store
1687
+ */
1688
+ interface DatabaseConfigEntry {
1689
+ /**
1690
+ * Unique identifier for the configuration
1691
+ */
1692
+ id: string;
1693
+ /**
1694
+ * Tenant identifier for multi-tenant isolation
1695
+ */
1696
+ tenantId: string;
1697
+ /**
1698
+ * Business key for the configuration (unique within tenant)
1699
+ */
1700
+ key: string;
1701
+ /**
1702
+ * Database connection configuration (password already decrypted)
1703
+ */
1704
+ config: DatabaseConfig;
1705
+ /**
1706
+ * Optional friendly name
1707
+ */
1708
+ name?: string;
1709
+ /**
1710
+ * Optional description
1711
+ */
1712
+ description?: string;
1713
+ /**
1714
+ * Creation timestamp
1715
+ */
1716
+ createdAt: Date;
1717
+ /**
1718
+ * Last update timestamp
1719
+ */
1720
+ updatedAt: Date;
1721
+ }
1722
+ /**
1723
+ * Request to create a new database configuration
1724
+ */
1725
+ interface CreateDatabaseConfigRequest {
1726
+ /**
1727
+ * Business key for the configuration (unique within tenant)
1728
+ */
1729
+ key: string;
1730
+ /**
1731
+ * Database connection configuration
1732
+ */
1733
+ config: DatabaseConfig;
1734
+ /**
1735
+ * Optional friendly name
1736
+ */
1737
+ name?: string;
1738
+ /**
1739
+ * Optional description
1740
+ */
1741
+ description?: string;
1742
+ }
1743
+ /**
1744
+ * Request to update an existing database configuration
1745
+ */
1746
+ interface UpdateDatabaseConfigRequest {
1747
+ /**
1748
+ * Business key for the configuration
1749
+ */
1750
+ key?: string;
1751
+ /**
1752
+ * Database connection configuration
1753
+ */
1754
+ config?: DatabaseConfig;
1755
+ /**
1756
+ * Optional friendly name
1757
+ */
1758
+ name?: string;
1759
+ /**
1760
+ * Optional description
1761
+ */
1762
+ description?: string;
1763
+ }
1764
+ /**
1765
+ * DatabaseConfigStore interface
1766
+ * Provides CRUD operations for database configuration data
1767
+ */
1768
+ interface DatabaseConfigStore {
1769
+ /**
1770
+ * Get all database configurations for a tenant
1771
+ * @param tenantId - Tenant identifier
1772
+ * @returns Array of all database configurations
1773
+ */
1774
+ getAllConfigs(tenantId: string): Promise<DatabaseConfigEntry[]>;
1775
+ /**
1776
+ * Get all database configurations across all tenants
1777
+ * @returns Array of all database configurations
1778
+ */
1779
+ getAllConfigsWithoutTenant(): Promise<DatabaseConfigEntry[]>;
1780
+ /**
1781
+ * Get database configuration by ID
1782
+ * @param tenantId - Tenant identifier
1783
+ * @param id - Configuration identifier
1784
+ * @returns Configuration if found, null otherwise
1785
+ */
1786
+ getConfigById(tenantId: string, id: string): Promise<DatabaseConfigEntry | null>;
1787
+ /**
1788
+ * Get database configuration by business key
1789
+ * @param tenantId - Tenant identifier
1790
+ * @param key - Business key
1791
+ * @returns Configuration if found, null otherwise
1792
+ */
1793
+ getConfigByKey(tenantId: string, key: string): Promise<DatabaseConfigEntry | null>;
1794
+ /**
1795
+ * Create a new database configuration
1796
+ * @param tenantId - Tenant identifier
1797
+ * @param id - Configuration identifier
1798
+ * @param data - Configuration creation data
1799
+ * @returns Created configuration
1800
+ */
1801
+ createConfig(tenantId: string, id: string, data: CreateDatabaseConfigRequest): Promise<DatabaseConfigEntry>;
1802
+ /**
1803
+ * Update an existing database configuration
1804
+ * @param tenantId - Tenant identifier
1805
+ * @param id - Configuration identifier
1806
+ * @param updates - Partial configuration data to update
1807
+ * @returns Updated configuration if found, null otherwise
1808
+ */
1809
+ updateConfig(tenantId: string, id: string, updates: Partial<UpdateDatabaseConfigRequest>): Promise<DatabaseConfigEntry | null>;
1810
+ /**
1811
+ * Delete a database configuration by ID
1812
+ * @param tenantId - Tenant identifier
1813
+ * @param id - Configuration identifier
1814
+ * @returns true if deleted, false otherwise
1815
+ */
1816
+ deleteConfig(tenantId: string, id: string): Promise<boolean>;
1817
+ /**
1818
+ * Check if configuration exists
1819
+ * @param tenantId - Tenant identifier
1820
+ * @param id - Configuration identifier
1821
+ * @returns true if configuration exists, false otherwise
1822
+ */
1823
+ hasConfig(tenantId: string, id: string): Promise<boolean>;
1824
+ }
1825
+
1533
1826
  /**
1534
1827
  * 通用类型定义
1535
1828
  *
@@ -1593,4 +1886,4 @@ type Timestamp = number;
1593
1886
  */
1594
1887
  type Callback<T = any, R = void> = (data: T) => R | Promise<R>;
1595
1888
 
1596
- export { type AgentClient, type AgentConfig, type AgentConfigWithTools, type AgentLatticeProtocol, type AgentMiddlewareConfig, type AgentRunConfig, AgentType, type Assistant, type AssistantMessage, type AssistantStore, type AvailableModule, type BaseLatticeProtocol, type BaseMessage, type BrowserMiddlewareConfig, type Callback, type CodeEvalMiddlewareConfig, type CreateAssistantRequest, type CreateSkillRequest, type CreateThreadRequest, type DeepAgentConfig, type DeveloperMessage, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type FilterCondition, type GraphBuildOptions, type ID, type InterruptMessage, type LLMConfig, type LatticeError, type LatticeEventBus, type LatticeMessage, type LoggerClient, type LoggerConfig, type LoggerContext, type LoggerLatticeProtocol, LoggerType, type McpClient, type McpClientOptions, type McpConnectionStatus, type McpLatticeMessage, type McpLatticeProtocol, McpMessageType, type McpServerConfig, type McpStats, type McpTool, type McpToolResult, type McpTransportType, type MemoryClient, type MemoryConfig, type MemoryLatticeProtocol, MemoryType, type Message, type MessageChunk, type MiddlewareType, type ModelLatticeProtocol, type PaginatedResult, type PaginationParams, type PinoFileOptions, type QueryParams, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type ReactAgentConfig, type Result, type SandboxMiddlewareConfig, type ScheduleClient, type ScheduleConfig, type ScheduleCronOptions, ScheduleExecutionType, type ScheduleLatticeProtocol, type ScheduleOnceOptions, type ScheduleStorage, ScheduleType, type ScheduledTaskDefinition, ScheduledTaskStatus, type Skill, type SkillClient, type SkillClientType, type SkillConfig, type SkillLatticeProtocol, type SkillStore, type SqlMiddlewareConfig, type SystemMessage, type TaskHandler, type Thread, type ThreadStore, type Timestamp, type ToolCall, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UserMessage, type VectorStoreConfig, type VectorStoreLatticeProtocol, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isDeepAgentConfig };
1889
+ export { type AgentClient, type AgentConfig, type AgentConfigWithTools, type AgentLatticeProtocol, type AgentMiddlewareConfig, type AgentRunConfig, AgentType, type Assistant, type AssistantMessage, type AssistantStore, type AvailableModule, type BaseLatticeProtocol, type BaseMessage, type BrowserMiddlewareConfig, type Callback, type CodeEvalMiddlewareConfig, type CreateAssistantRequest, type CreateDatabaseConfigRequest, type CreateProjectRequest, type CreateSkillRequest, type CreateThreadRequest, type CreateWorkspaceRequest, type DatabaseConfig, type DatabaseConfigEntry, type DatabaseConfigStore, type DatabaseType, type DeepAgentConfig, type DeveloperMessage, type EmbeddingsConfig, type EmbeddingsLatticeProtocol, type FilterCondition, type GraphBuildOptions, type ID, type InterruptMessage, type LLMConfig, type LatticeError, type LatticeEventBus, type LatticeMessage, type LoggerClient, type LoggerConfig, type LoggerContext, type LoggerLatticeProtocol, LoggerType, type McpClient, type McpClientOptions, type McpConnectionStatus, type McpLatticeMessage, type McpLatticeProtocol, McpMessageType, type McpServerConfig, type McpStats, type McpTool, type McpToolResult, type McpTransportType, type MemoryClient, type MemoryConfig, type MemoryLatticeProtocol, MemoryType, type Message, type MessageChunk, type MiddlewareType, type ModelLatticeProtocol, type PaginatedResult, type PaginationParams, type PinoFileOptions, type Project, type ProjectStore, type QueryParams, type QueueClient, type QueueConfig, type QueueLatticeProtocol, type QueueResult, QueueType, type ReactAgentConfig, type Result, type SandboxMiddlewareConfig, type ScheduleClient, type ScheduleConfig, type ScheduleCronOptions, ScheduleExecutionType, type ScheduleLatticeProtocol, type ScheduleOnceOptions, type ScheduleStorage, ScheduleType, type ScheduledTaskDefinition, ScheduledTaskStatus, type Skill, type SkillClient, type SkillClientType, type SkillConfig, type SkillLatticeProtocol, type SkillStore, type SqlMiddlewareConfig, type StorageType, type SystemMessage, type TaskHandler, type TeamAgentConfig, type TeamTeammateConfig, type Thread, type ThreadStore, type Timestamp, type ToolCall, type ToolConfig, type ToolExecutor, type ToolLatticeProtocol, type ToolMessage, type UIComponent, UIComponentType, type UIConfig, type UILatticeProtocol, type UpdateDatabaseConfigRequest, type UpdateProjectRequest, type UpdateWorkspaceRequest, type UserMessage, type VectorStoreConfig, type VectorStoreLatticeProtocol, type Workspace, type WorkspaceStore, getSubAgentsFromConfig, getToolsFromConfig, hasTools, isDeepAgentConfig, isTeamAgentConfig };