@axiom-lattice/core 4.2.3 → 4.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1825,6 +1825,22 @@ declare class AgentLatticeManager extends BaseLatticeManager<AgentLattice> {
1825
1825
  * 获取Lattice类型前缀
1826
1826
  */
1827
1827
  protected getLatticeType(): string;
1828
+ /**
1829
+ * Suffix that identifies ephemeral general-purpose subagent assistants.
1830
+ *
1831
+ * The subagents middleware (deep_agent_new) registers a runtime agent
1832
+ * `{assistant_id}-general-purpose` in the process that executes the task.
1833
+ * Other processes (e.g. the Gateway serving thread state/messages) never see
1834
+ * that in-memory registration, so lattice lookups for the suffixed key fall
1835
+ * back to the parent assistant's lattice.
1836
+ */
1837
+ private static readonly GENERAL_PURPOSE_SUFFIX;
1838
+ /**
1839
+ * Returns the parent assistant key for a `{parent}-general-purpose` key, or
1840
+ * `null` when the key is not a suffixed GP key (including the bare
1841
+ * `general-purpose` key itself).
1842
+ */
1843
+ private generalPurposeParentKey;
1828
1844
  /**
1829
1845
  * 带租户注册Agent Lattice
1830
1846
  * @param tenantId 租户ID
@@ -1833,16 +1849,44 @@ declare class AgentLatticeManager extends BaseLatticeManager<AgentLattice> {
1833
1849
  registerLatticeWithTenant(tenantId: string, config: AgentConfig): void;
1834
1850
  /**
1835
1851
  * 带租户获取AgentLattice
1852
+ *
1853
+ * @remarks
1854
+ * For unregistered `{parent}-general-purpose` keys (ephemeral subagent
1855
+ * assistants created by the subagents middleware), this falls back to the
1856
+ * parent assistant's lattice so that read paths (thread state/messages)
1857
+ * resolve in processes where the runtime GP registration is absent.
1858
+ * {@link hasAgentLatticeWithTenant} stays strict.
1859
+ *
1836
1860
  * @param tenantId 租户ID
1837
1861
  * @param key Lattice键名
1838
1862
  */
1839
1863
  getAgentLatticeWithTenant(tenantId: string, key: string): AgentLattice | undefined;
1840
1864
  /**
1841
1865
  * 带租户检查Lattice是否存在
1866
+ *
1867
+ * @remarks
1868
+ * Deliberately strict: `{parent}-general-purpose` keys are NOT covered by
1869
+ * the read fallback. The subagents middleware relies on this check to decide
1870
+ * whether to register the real GP runtime agent; a permissive check would
1871
+ * skip that registration and silently run the parent graph for GP tasks.
1872
+ *
1842
1873
  * @param tenantId 租户ID
1843
1874
  * @param key Lattice键名
1844
1875
  */
1845
1876
  hasAgentLatticeWithTenant(tenantId: string, key: string): boolean;
1877
+ /**
1878
+ * 异步获取AgentLattice(内存未命中时尝试从store加载)
1879
+ *
1880
+ * @remarks
1881
+ * Mirrors {@link getAgentLatticeWithTenant}'s general-purpose fallback: an
1882
+ * unregistered `{parent}-general-purpose` key resolves to the parent
1883
+ * assistant's lattice. This is the lookup used by `getAgentClientAsync`,
1884
+ * which backs Gateway thread state/message reads for GP subagent threads.
1885
+ *
1886
+ * @param tenantId 租户ID
1887
+ * @param key Lattice键名
1888
+ */
1889
+ getOrLoadWithTenant(tenantId: string, key: string): Promise<AgentLattice | undefined>;
1846
1890
  /**
1847
1891
  * 带租户移除Lattice
1848
1892
  * @param tenantId 租户ID
package/dist/index.d.ts CHANGED
@@ -1825,6 +1825,22 @@ declare class AgentLatticeManager extends BaseLatticeManager<AgentLattice> {
1825
1825
  * 获取Lattice类型前缀
1826
1826
  */
1827
1827
  protected getLatticeType(): string;
1828
+ /**
1829
+ * Suffix that identifies ephemeral general-purpose subagent assistants.
1830
+ *
1831
+ * The subagents middleware (deep_agent_new) registers a runtime agent
1832
+ * `{assistant_id}-general-purpose` in the process that executes the task.
1833
+ * Other processes (e.g. the Gateway serving thread state/messages) never see
1834
+ * that in-memory registration, so lattice lookups for the suffixed key fall
1835
+ * back to the parent assistant's lattice.
1836
+ */
1837
+ private static readonly GENERAL_PURPOSE_SUFFIX;
1838
+ /**
1839
+ * Returns the parent assistant key for a `{parent}-general-purpose` key, or
1840
+ * `null` when the key is not a suffixed GP key (including the bare
1841
+ * `general-purpose` key itself).
1842
+ */
1843
+ private generalPurposeParentKey;
1828
1844
  /**
1829
1845
  * 带租户注册Agent Lattice
1830
1846
  * @param tenantId 租户ID
@@ -1833,16 +1849,44 @@ declare class AgentLatticeManager extends BaseLatticeManager<AgentLattice> {
1833
1849
  registerLatticeWithTenant(tenantId: string, config: AgentConfig): void;
1834
1850
  /**
1835
1851
  * 带租户获取AgentLattice
1852
+ *
1853
+ * @remarks
1854
+ * For unregistered `{parent}-general-purpose` keys (ephemeral subagent
1855
+ * assistants created by the subagents middleware), this falls back to the
1856
+ * parent assistant's lattice so that read paths (thread state/messages)
1857
+ * resolve in processes where the runtime GP registration is absent.
1858
+ * {@link hasAgentLatticeWithTenant} stays strict.
1859
+ *
1836
1860
  * @param tenantId 租户ID
1837
1861
  * @param key Lattice键名
1838
1862
  */
1839
1863
  getAgentLatticeWithTenant(tenantId: string, key: string): AgentLattice | undefined;
1840
1864
  /**
1841
1865
  * 带租户检查Lattice是否存在
1866
+ *
1867
+ * @remarks
1868
+ * Deliberately strict: `{parent}-general-purpose` keys are NOT covered by
1869
+ * the read fallback. The subagents middleware relies on this check to decide
1870
+ * whether to register the real GP runtime agent; a permissive check would
1871
+ * skip that registration and silently run the parent graph for GP tasks.
1872
+ *
1842
1873
  * @param tenantId 租户ID
1843
1874
  * @param key Lattice键名
1844
1875
  */
1845
1876
  hasAgentLatticeWithTenant(tenantId: string, key: string): boolean;
1877
+ /**
1878
+ * 异步获取AgentLattice(内存未命中时尝试从store加载)
1879
+ *
1880
+ * @remarks
1881
+ * Mirrors {@link getAgentLatticeWithTenant}'s general-purpose fallback: an
1882
+ * unregistered `{parent}-general-purpose` key resolves to the parent
1883
+ * assistant's lattice. This is the lookup used by `getAgentClientAsync`,
1884
+ * which backs Gateway thread state/message reads for GP subagent threads.
1885
+ *
1886
+ * @param tenantId 租户ID
1887
+ * @param key Lattice键名
1888
+ */
1889
+ getOrLoadWithTenant(tenantId: string, key: string): Promise<AgentLattice | undefined>;
1846
1890
  /**
1847
1891
  * 带租户移除Lattice
1848
1892
  * @param tenantId 租户ID