@axiom-lattice/gateway 10.1.0 → 10.2.0
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/{a2a-standard-NOAVPYXJ.mjs → a2a-standard-OANCQYQ2.mjs} +8 -4
- package/dist/a2a-standard-OANCQYQ2.mjs.map +1 -0
- package/dist/{chunk-A7YNAU5L.mjs → chunk-4XWI7U3L.mjs} +106 -1
- package/dist/chunk-4XWI7U3L.mjs.map +1 -0
- package/dist/{chunk-PHWGCRW2.mjs → chunk-67CDUQM3.mjs} +16 -2
- package/dist/chunk-67CDUQM3.mjs.map +1 -0
- package/dist/{chunk-T2HIWZGP.mjs → chunk-BIMO2ILH.mjs} +1 -1
- package/dist/chunk-BIMO2ILH.mjs.map +1 -0
- package/dist/embed/{embed-page-AgentDetailSideApp-5L5GY5TY.js → embed-page-AgentDetailSideApp-WAATX6D3.js} +1 -1
- package/dist/embed/{embed-page-AgentGovernanceWorkbench-RKNSCQUM.js → embed-page-AgentGovernanceWorkbench-MOIYXL5S.js} +1 -1
- package/dist/embed/{embed-page-LangfuseDashboard-QHWHMJVB.js → embed-page-LangfuseDashboard-7ZWWE45Q.js} +1 -1
- package/dist/embed/{embed-page-MessageGraph-HDJYCYZV.js → embed-page-MessageGraph-JG554SNZ.js} +1 -1
- package/dist/embed/{embed-page-ReactChart-KJS73V5Q.js → embed-page-ReactChart-WHOMS6I6.js} +1 -1
- package/dist/embed/{embed-page-ReactInfographic-677NVKOU.js → embed-page-ReactInfographic-5P36JLSX.js} +1 -1
- package/dist/embed/{embed-page-SkillFlow-ULY3XZ3A.js → embed-page-SkillFlow-RP54B2A5.js} +1 -1
- package/dist/embed/{embed-page-TasksSideApp-X2YZGU7K.js → embed-page-TasksSideApp-6TCN3T73.js} +1 -1
- package/dist/embed/{embed-page-ThreadMaintenancePanel-N5IFOOFT.js → embed-page-ThreadMaintenancePanel-WNWYNASM.js} +1 -1
- package/dist/embed/{embed-page-TopologyRuntimeView-LZTSYJE5.js → embed-page-TopologyRuntimeView-UMC4XOUL.js} +1 -1
- package/dist/embed/{embed-page-WorkflowAutomationView-KIKV62O2.js → embed-page-WorkflowAutomationView-PUOPYYGB.js} +1 -1
- package/dist/embed/embed-page-all-NEJVJ4G7.js +1 -0
- package/dist/embed/{embed-page-architectureDiagram-VXUJARFQ-TYJ3NO2K.js → embed-page-architectureDiagram-VXUJARFQ-THUN2PFL.js} +1 -1
- package/dist/embed/embed-page-aspnet-SRK67AH2.js +1 -0
- package/dist/embed/{embed-page-blockDiagram-VD42YOAC-L4J3TZWR.js → embed-page-blockDiagram-VD42YOAC-K7OX6LIO.js} +1 -1
- package/dist/embed/{embed-page-c4Diagram-YG6GDRKO-CP2IXU3Z.js → embed-page-c4Diagram-YG6GDRKO-DJDAF5AO.js} +1 -1
- package/dist/embed/embed-page-chunk-4GCFDWE7.js +6997 -0
- package/dist/embed/{embed-page-chunk-3FNSGFP2.js → embed-page-chunk-5EENS2J7.js} +16 -16
- package/dist/embed/{embed-page-chunk-3XPHW2C7.js → embed-page-chunk-5O5IKZOC.js} +1 -1
- package/dist/embed/{embed-page-chunk-DQJVWZOB.js → embed-page-chunk-A2AHDN6K.js} +1 -1
- package/dist/embed/embed-page-chunk-AFYXBC77.js +217 -0
- package/dist/embed/{embed-page-chunk-F5QVZLK5.js → embed-page-chunk-DTRFJLVZ.js} +1 -1
- package/dist/embed/embed-page-chunk-ESQ5V77Q.js +1 -0
- package/dist/embed/{embed-page-chunk-2VJ7T35I.js → embed-page-chunk-FD2PRLMW.js} +1 -1
- package/dist/embed/{embed-page-chunk-KXVXKWED.js → embed-page-chunk-G2RO6IBN.js} +1 -1
- package/dist/embed/{embed-page-chunk-BBIV2YA2.js → embed-page-chunk-G6UTU7IC.js} +1 -1
- package/dist/embed/{embed-page-chunk-7GLQRV3J.js → embed-page-chunk-J5AHS4PO.js} +1 -1
- package/dist/embed/{embed-page-chunk-5WWOKLDB.js → embed-page-chunk-JUZPOR5Y.js} +1 -1
- package/dist/embed/{embed-page-chunk-5HWN5HSA.js → embed-page-chunk-ML6AVDQQ.js} +1 -1
- package/dist/embed/{embed-page-chunk-YBP3MD23.js → embed-page-chunk-OBN4XHZP.js} +1 -1
- package/dist/embed/{embed-page-chunk-NVFNRWRN.js → embed-page-chunk-PLNJRORR.js} +1 -1
- package/dist/embed/{embed-page-chunk-FF2HNPMW.js → embed-page-chunk-QRFTGCB2.js} +1 -1
- package/dist/embed/{embed-page-chunk-4BPMGDDV.js → embed-page-chunk-RU45VIPM.js} +1 -1
- package/dist/embed/{embed-page-chunk-AEDAOTEO.js → embed-page-chunk-SQ4GANYE.js} +1 -1
- package/dist/embed/embed-page-chunk-TZPX2O54.js +7 -0
- package/dist/embed/{embed-page-chunk-YJUCDIYK.js → embed-page-chunk-V7R2Y72J.js} +1 -1
- package/dist/embed/{embed-page-chunk-XSKDYUNQ.js → embed-page-chunk-VY6MAPHR.js} +1 -1
- package/dist/embed/{embed-page-chunk-WK77HIEN.js → embed-page-chunk-WFUFTRWA.js} +1 -1
- package/dist/embed/{embed-page-chunk-7CJDHJEH.js → embed-page-chunk-XKGF5D6L.js} +1 -1
- package/dist/embed/{embed-page-chunk-WWXRO4ZL.js → embed-page-chunk-XSKNS3LY.js} +1 -1
- package/dist/embed/{embed-page-chunk-DI5UAV2I.js → embed-page-chunk-ZVTX7OVB.js} +1 -1
- package/dist/embed/embed-page-classDiagram-2ON5EDUG-VYHHMIKZ.js +1 -0
- package/dist/embed/embed-page-classDiagram-v2-WZHVMYZB-5AISLXUF.js +1 -0
- package/dist/embed/{embed-page-code-highlighter-4XNLEZAM.js → embed-page-code-highlighter-ZZBZ7CEQ.js} +1 -1
- package/dist/embed/embed-page-cshtml-ZY7LJSTH.js +1 -0
- package/dist/embed/{embed-page-dagre-6UL2VRFP-LTZ2DVVO.js → embed-page-dagre-6UL2VRFP-UQFZMKYW.js} +1 -1
- package/dist/embed/{embed-page-diagram-PSM6KHXK-JHYXSMCB.js → embed-page-diagram-PSM6KHXK-4IKXWNA4.js} +1 -1
- package/dist/embed/{embed-page-diagram-QEK2KX5R-2YGDFFTU.js → embed-page-diagram-QEK2KX5R-245T32UF.js} +1 -1
- package/dist/embed/{embed-page-diagram-S2PKOQOG-6EW6MDJW.js → embed-page-diagram-S2PKOQOG-BOA5MJA5.js} +1 -1
- package/dist/embed/embed-page-en-5E2A4Q7G.js +1 -0
- package/dist/embed/embed-page-en-AEJHFSAV.js +1 -0
- package/dist/embed/{embed-page-en-3Z4N5KXB.js → embed-page-en-QULE3S6E.js} +1 -1
- package/dist/embed/{embed-page-erDiagram-Q2GNP2WA-KSUS6MHW.js → embed-page-erDiagram-Q2GNP2WA-S4J4SQPR.js} +1 -1
- package/dist/embed/{embed-page-flowDiagram-NV44I4VS-AYXRDKAJ.js → embed-page-flowDiagram-NV44I4VS-ZFIJXKMW.js} +1 -1
- package/dist/embed/{embed-page-ganttDiagram-JELNMOA3-AV7N2N3T.js → embed-page-ganttDiagram-JELNMOA3-7MSIEWL4.js} +1 -1
- package/dist/embed/{embed-page-gitGraphDiagram-NY62KEGX-IBVOXVO5.js → embed-page-gitGraphDiagram-NY62KEGX-F6KE6PZK.js} +1 -1
- package/dist/embed/embed-page-infoDiagram-WHAUD3N6-FQMKXERB.js +2 -0
- package/dist/embed/{embed-page-journeyDiagram-XKPGCS4Q-3GILI7Y4.js → embed-page-journeyDiagram-XKPGCS4Q-6VTW6GQ3.js} +1 -1
- package/dist/embed/{embed-page-kanban-definition-3W4ZIXB7-UGO3J7IH.js → embed-page-kanban-definition-3W4ZIXB7-7IZYCLQZ.js} +1 -1
- package/dist/embed/{embed-page-mermaid-QZJOSGTZ.js → embed-page-mermaid-O5AJMXHC.js} +2 -2
- package/dist/embed/{embed-page-mindmap-definition-VGOIOE7T-VXXZJS3Z.js → embed-page-mindmap-definition-VGOIOE7T-GKTOT34A.js} +1 -1
- package/dist/embed/{embed-page-pieDiagram-ADFJNKIX-ZFAWYA2N.js → embed-page-pieDiagram-ADFJNKIX-VDPALO42.js} +1 -1
- package/dist/embed/{embed-page-requirementDiagram-UZGBJVZJ-2QBINXR7.js → embed-page-requirementDiagram-UZGBJVZJ-LTZH6RTD.js} +1 -1
- package/dist/embed/{embed-page-sequenceDiagram-WL72ISMW-3MGTESG4.js → embed-page-sequenceDiagram-WL72ISMW-LV6Q4SHW.js} +1 -1
- package/dist/embed/{embed-page-stateDiagram-FKZM4ZOC-W6VPIMB5.js → embed-page-stateDiagram-FKZM4ZOC-U4NHQDNP.js} +1 -1
- package/dist/embed/embed-page-stateDiagram-v2-4FDKWEC3-G3EWQCOW.js +1 -0
- package/dist/embed/{embed-page-tsx-LGDDERM2.js → embed-page-tsx-PNW7N5T4.js} +1 -1
- package/dist/embed/{embed-page-xychartDiagram-PRI3JC2R-7XKT4R7V.js → embed-page-xychartDiagram-PRI3JC2R-VZSIXBFK.js} +1 -1
- package/dist/embed/embed-page-zh-EZHTNARQ.js +1 -0
- package/dist/embed/embed-page-zh-TOINMHLQ.js +1 -0
- package/dist/embed/{embed-page-zh-GXE63PQ7.js → embed-page-zh-WT752BVZ.js} +1 -1
- package/dist/embed/embed-page.js +1 -1
- package/dist/embed/mcp-app-page.js +32 -32
- package/dist/index.d.mts +145 -1
- package/dist/index.d.ts +145 -1
- package/dist/index.js +8154 -1466
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7093 -491
- package/dist/index.mjs.map +1 -1
- package/dist/{mcp-app-shares-SHPBJQXS.mjs → mcp-app-shares-VN6G3LNW.mjs} +2 -2
- package/dist/{mcp-apps-QVUK6UBA.mjs → mcp-apps-MZECSNN2.mjs} +2 -2
- package/package.json +11 -7
- package/dist/a2a-standard-NOAVPYXJ.mjs.map +0 -1
- package/dist/chunk-A7YNAU5L.mjs.map +0 -1
- package/dist/chunk-PHWGCRW2.mjs.map +0 -1
- package/dist/chunk-T2HIWZGP.mjs.map +0 -1
- package/dist/embed/embed-page-all-JEPF6WHD.js +0 -1
- package/dist/embed/embed-page-aspnet-GIV4ESY6.js +0 -1
- package/dist/embed/embed-page-chunk-54M4265G.js +0 -211
- package/dist/embed/embed-page-chunk-5QZRLAW2.js +0 -7
- package/dist/embed/embed-page-chunk-MVT6CPWE.js +0 -6986
- package/dist/embed/embed-page-chunk-ZQQFWEWO.js +0 -1
- package/dist/embed/embed-page-classDiagram-2ON5EDUG-MHNSVPAN.js +0 -1
- package/dist/embed/embed-page-classDiagram-v2-WZHVMYZB-QCMEVMYH.js +0 -1
- package/dist/embed/embed-page-cshtml-RYMZMLKB.js +0 -1
- package/dist/embed/embed-page-en-2S7Q4NKN.js +0 -1
- package/dist/embed/embed-page-infoDiagram-WHAUD3N6-ZULKOSOZ.js +0 -2
- package/dist/embed/embed-page-stateDiagram-v2-4FDKWEC3-QYJ47QBY.js +0 -1
- package/dist/embed/embed-page-zh-GX6IEO57.js +0 -1
- /package/dist/embed/{embed-page-chunk-UH47IEAR.js → embed-page-chunk-34FVRFPW.js} +0 -0
- /package/dist/{mcp-app-shares-SHPBJQXS.mjs.map → mcp-app-shares-VN6G3LNW.mjs.map} +0 -0
- /package/dist/{mcp-apps-QVUK6UBA.mjs.map → mcp-apps-MZECSNN2.mjs.map} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as http from 'http';
|
|
2
|
-
import { ProjectRoomMessage, ProjectBotMembership, ProjectMembership, TaskItem, ChannelAdapter, InboundMessage, Binding, BindingRegistry, ChannelInstallationStore, DispatchResult, ModelProviderStore, UserTenantLinkStore, LLMConfig, ModelProviderPublicEntry, TenantModelCatalog, CreateModelProviderRequest, UpdateModelProviderRequest, ModelDiscoveryResult, ModelProviderProbeRequest, ModelProviderProbeResult, ModelSelection, ProjectRoomEventScope, ProjectRoomBusinessEventDraft, ProjectRoomScopedBusinessEvent, ProjectRoomBusinessEvent, ProjectRoomEventSubscription, TaskStore, ProjectRoomStore, ProjectBotMembershipStore, ThreadStore, Thread, ProjectRoom, ProjectStore, Project, ObservabilityDashboardInput, ObservabilityDashboardResult, TaskWorkItemStore, TenantStore, OutboxStore, A2AApiKeyStore, AssistantStore, A2AApiKeyEntry, A2AAuthContext, Assistant, OpenGrant, A2AApiKeyRecord, LeaseStore, CheckpointMaintenance, LoggerType, PinoFileOptions } from '@axiom-lattice/protocols';
|
|
2
|
+
import { ProjectRoomMessage, ProjectBotMembership, ProjectMembership, TaskItem, PlatformSettingsProvider, PlatformSettingsStore, PlatformSettingsSnapshot, PlatformSettingsDocument, EffectivePlatformSettings, PlatformBrandingSettings, ResolvedPlatformBranding, ChannelAdapter, InboundMessage, Binding, BindingRegistry, ChannelInstallationStore, DispatchResult, ModelProviderStore, UserTenantLinkStore, LLMConfig, ModelProviderPublicEntry, TenantModelCatalog, CreateModelProviderRequest, UpdateModelProviderRequest, ModelDiscoveryResult, ModelProviderProbeRequest, ModelProviderProbeResult, ModelSelection, ProjectRoomEventScope, ProjectRoomBusinessEventDraft, ProjectRoomScopedBusinessEvent, ProjectRoomBusinessEvent, ProjectRoomEventSubscription, TaskStore, ProjectRoomStore, ProjectBotMembershipStore, ThreadStore, Thread, ProjectRoom, ProjectStore, Project, ObservabilityDashboardInput, ObservabilityDashboardResult, TaskWorkItemStore, TenantStore, OutboxStore, A2AApiKeyStore, AssistantStore, A2AApiKeyEntry, A2AAuthContext, Assistant, OpenGrant, A2AApiKeyRecord, LeaseStore, CheckpointMaintenance, LoggerType, PinoFileOptions } from '@axiom-lattice/protocols';
|
|
3
3
|
import { TrustedAgentMessageDispatcher, TrustedMessageOptions, TaskLifecycleListener, AgentRunJsonObject, TrustedRunContext, AgentRunRecord, TaskLifecycleService, IAgentRunLedger, ObservabilityProvider, ObservabilityTraceContext, AppendLog, TaskLivenessProbe, TaskRunRegistry, AgentLifecycleTapEvent, AgentLifecycleEventName, AgentThreadInterface, AgentCheckpointTip, ExecuteRunInput, ExecuteRunResult, AgentRunSource, AgentRunStatus, ThreadRunLeaseHandle } from '@axiom-lattice/core';
|
|
4
4
|
export { TaskLivenessProbe } from '@axiom-lattice/core';
|
|
5
5
|
import * as fastify from 'fastify';
|
|
@@ -56,6 +56,142 @@ interface ProjectRoomRealtimePublisher {
|
|
|
56
56
|
}): void;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
/** Outbox topic carrying cross-replica platform settings invalidation. */
|
|
60
|
+
declare const PLATFORM_SETTINGS_CHANGED_TOPIC = "platform.settings.changed";
|
|
61
|
+
/** Payload published when the settings document changes. */
|
|
62
|
+
interface PlatformSettingsChangedEvent {
|
|
63
|
+
topic: typeof PLATFORM_SETTINGS_CHANGED_TOPIC;
|
|
64
|
+
version: number;
|
|
65
|
+
}
|
|
66
|
+
/** Best-effort publisher for a committed settings change. */
|
|
67
|
+
type PlatformSettingsChangedPublisher = (event: PlatformSettingsChangedEvent) => Promise<void> | void;
|
|
68
|
+
/** Receives a snapshot after a successful local update or reload. */
|
|
69
|
+
type PlatformSettingsChangeListener = (snapshot: PlatformSettingsSnapshot) => void;
|
|
70
|
+
/** Result of an update attempt, distinguishing a committed change from a no-op. */
|
|
71
|
+
interface PlatformSettingsUpdateResult {
|
|
72
|
+
snapshot: PlatformSettingsSnapshot;
|
|
73
|
+
/** False when the merged document equals the current sanitized document. */
|
|
74
|
+
changed: boolean;
|
|
75
|
+
}
|
|
76
|
+
/** Sanitized branding settings plus their document version and audit metadata. */
|
|
77
|
+
interface PlatformBrandingSettingsSnapshot {
|
|
78
|
+
version: number;
|
|
79
|
+
branding: PlatformBrandingSettings;
|
|
80
|
+
updatedBy?: string;
|
|
81
|
+
updatedAt?: Date;
|
|
82
|
+
}
|
|
83
|
+
/** Dependencies and optional side-effect hooks for the service. */
|
|
84
|
+
interface PlatformSettingsServiceDeps {
|
|
85
|
+
store: PlatformSettingsStore;
|
|
86
|
+
env: Record<string, string | undefined>;
|
|
87
|
+
onChange?: PlatformSettingsChangeListener | PlatformSettingsChangeListener[];
|
|
88
|
+
publishChanged?: PlatformSettingsChangedPublisher;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Merges code defaults, environment fallbacks, and the persisted platform
|
|
92
|
+
* settings document into one cached, versioned effective snapshot.
|
|
93
|
+
*
|
|
94
|
+
* The service is the only layer that reads the settings environment variables;
|
|
95
|
+
* business code consumes the resolved values through the
|
|
96
|
+
* {@link PlatformSettingsProvider} interface.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* const service = new PlatformSettingsService({ store, env: process.env });
|
|
101
|
+
* await service.load();
|
|
102
|
+
* service.getEffective().auth.emailCompletionEnabled;
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* @remarks
|
|
106
|
+
* - `load()` is non-throwing and falls back to defaults/env on startup failure.
|
|
107
|
+
* - `reload()` throws after a store failure but keeps the last good snapshot.
|
|
108
|
+
* - Writes use the store's version compare-and-swap and validate every field.
|
|
109
|
+
* - Notifying listeners and publishing the outbox event are best-effort.
|
|
110
|
+
*/
|
|
111
|
+
declare class PlatformSettingsService implements PlatformSettingsProvider {
|
|
112
|
+
private readonly store;
|
|
113
|
+
private readonly envLayer;
|
|
114
|
+
private readonly listeners;
|
|
115
|
+
private readonly publishChanged?;
|
|
116
|
+
private rawDocument;
|
|
117
|
+
private snapshot;
|
|
118
|
+
private lastError;
|
|
119
|
+
constructor(deps: PlatformSettingsServiceDeps);
|
|
120
|
+
/**
|
|
121
|
+
* Reads the persisted record and caches the effective snapshot.
|
|
122
|
+
*
|
|
123
|
+
* Never throws: a failure leaves the defaults/env snapshot in place and is
|
|
124
|
+
* exposed through {@link getLastError}.
|
|
125
|
+
*/
|
|
126
|
+
load(): Promise<void>;
|
|
127
|
+
/**
|
|
128
|
+
* Reads the persisted record and caches the effective snapshot.
|
|
129
|
+
*
|
|
130
|
+
* The previous snapshot and raw document are preserved when the store read
|
|
131
|
+
* fails; the failure is re-thrown so the caller can log it.
|
|
132
|
+
*/
|
|
133
|
+
reload(): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* Reloads the record, typically after a peer replica publishes a change.
|
|
136
|
+
*/
|
|
137
|
+
invalidate(): Promise<void>;
|
|
138
|
+
/**
|
|
139
|
+
* Merges a patch over the current raw document, validates it, persists it
|
|
140
|
+
* with version compare-and-swap, then refreshes the cache.
|
|
141
|
+
*
|
|
142
|
+
* @param documentPatch Partial document to merge (undefined leaf removes an
|
|
143
|
+
* override).
|
|
144
|
+
* @param expectedVersion Version the caller last observed.
|
|
145
|
+
* @param updatedBy Optional admin identifier recorded on the row.
|
|
146
|
+
* @returns The new effective snapshot.
|
|
147
|
+
* @throws {PlatformSettingsValidationError} When a field is invalid.
|
|
148
|
+
* @throws {PlatformSettingsVersionConflictError} When the version is stale.
|
|
149
|
+
*/
|
|
150
|
+
update(documentPatch: PlatformSettingsDocument, expectedVersion: number, updatedBy?: string): Promise<PlatformSettingsSnapshot>;
|
|
151
|
+
/**
|
|
152
|
+
* Like {@link update} but also reports whether anything was committed.
|
|
153
|
+
*
|
|
154
|
+
* A patch that merges back to the current sanitized document is a no-op: the
|
|
155
|
+
* version is not bumped and no listener, outbox event, or audit row fires.
|
|
156
|
+
*/
|
|
157
|
+
updateWithResult(documentPatch: PlatformSettingsDocument, expectedVersion: number, updatedBy?: string): Promise<PlatformSettingsUpdateResult>;
|
|
158
|
+
/** Returns the cached effective settings and provenance. */
|
|
159
|
+
getSnapshot(): PlatformSettingsSnapshot;
|
|
160
|
+
/** Returns the cached effective settings. */
|
|
161
|
+
getEffective(): EffectivePlatformSettings;
|
|
162
|
+
/** Returns the cached invite defaults. */
|
|
163
|
+
getInviteDefaults(): EffectivePlatformSettings["invite"];
|
|
164
|
+
/** Returns the cached rate limit and quota values. */
|
|
165
|
+
getRateLimits(): EffectivePlatformSettings["rateLimits"];
|
|
166
|
+
/** Returns sanitized branding settings plus the document version metadata. */
|
|
167
|
+
getBrandingSettings(): PlatformBrandingSettingsSnapshot;
|
|
168
|
+
/**
|
|
169
|
+
* Resolves the branding for a request host.
|
|
170
|
+
*
|
|
171
|
+
* The host is normalized (lowercase, no port, no trailing dot) and matched
|
|
172
|
+
* exactly against configured domains. Domain branding is merged over the
|
|
173
|
+
* platform default; unknown hosts get the default brand.
|
|
174
|
+
*/
|
|
175
|
+
getBrandingForHost(host: string): ResolvedPlatformBranding;
|
|
176
|
+
/** Registers a listener invoked after a successful update or reload. */
|
|
177
|
+
onChange(listener: PlatformSettingsChangeListener): void;
|
|
178
|
+
/** Returns the last store failure observed by `load()`, if any. */
|
|
179
|
+
getLastError(): unknown;
|
|
180
|
+
private read;
|
|
181
|
+
/**
|
|
182
|
+
* Replaces the cache from a store record.
|
|
183
|
+
*
|
|
184
|
+
* Never regresses on an older version so a delayed or duplicated outbox
|
|
185
|
+
* event cannot roll the snapshot (or raw document) backwards.
|
|
186
|
+
*
|
|
187
|
+
* @returns Whether the effective version changed.
|
|
188
|
+
*/
|
|
189
|
+
private applyRecord;
|
|
190
|
+
private buildSnapshot;
|
|
191
|
+
private notify;
|
|
192
|
+
private publish;
|
|
193
|
+
}
|
|
194
|
+
|
|
59
195
|
declare class ChannelAdapterRegistry {
|
|
60
196
|
private adapters;
|
|
61
197
|
register(adapter: ChannelAdapter): void;
|
|
@@ -1423,6 +1559,14 @@ interface LatticeRouteResult {
|
|
|
1423
1559
|
projectRoomRealtimeRuntime?: ProjectRoomRealtimeRuntime;
|
|
1424
1560
|
/** Always-present controller used by the outbox poller to reconcile foreign changes. */
|
|
1425
1561
|
modelProviderController: ModelProviderController;
|
|
1562
|
+
/** Process-wide settings service used by the outbox poller to invalidate peers. */
|
|
1563
|
+
platformSettingsService: PlatformSettingsService;
|
|
1564
|
+
/**
|
|
1565
|
+
* Resolves once the deployment-level OIDC guard has evaluated env and
|
|
1566
|
+
* store-backed providers. Callers should await it before listening so a
|
|
1567
|
+
* misconfigured deployment fails startup.
|
|
1568
|
+
*/
|
|
1569
|
+
oidcDeploymentGuard?: Promise<void>;
|
|
1426
1570
|
}
|
|
1427
1571
|
|
|
1428
1572
|
declare const defaultSwaggerConfig: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as http from 'http';
|
|
2
|
-
import { ProjectRoomMessage, ProjectBotMembership, ProjectMembership, TaskItem, ChannelAdapter, InboundMessage, Binding, BindingRegistry, ChannelInstallationStore, DispatchResult, ModelProviderStore, UserTenantLinkStore, LLMConfig, ModelProviderPublicEntry, TenantModelCatalog, CreateModelProviderRequest, UpdateModelProviderRequest, ModelDiscoveryResult, ModelProviderProbeRequest, ModelProviderProbeResult, ModelSelection, ProjectRoomEventScope, ProjectRoomBusinessEventDraft, ProjectRoomScopedBusinessEvent, ProjectRoomBusinessEvent, ProjectRoomEventSubscription, TaskStore, ProjectRoomStore, ProjectBotMembershipStore, ThreadStore, Thread, ProjectRoom, ProjectStore, Project, ObservabilityDashboardInput, ObservabilityDashboardResult, TaskWorkItemStore, TenantStore, OutboxStore, A2AApiKeyStore, AssistantStore, A2AApiKeyEntry, A2AAuthContext, Assistant, OpenGrant, A2AApiKeyRecord, LeaseStore, CheckpointMaintenance, LoggerType, PinoFileOptions } from '@axiom-lattice/protocols';
|
|
2
|
+
import { ProjectRoomMessage, ProjectBotMembership, ProjectMembership, TaskItem, PlatformSettingsProvider, PlatformSettingsStore, PlatformSettingsSnapshot, PlatformSettingsDocument, EffectivePlatformSettings, PlatformBrandingSettings, ResolvedPlatformBranding, ChannelAdapter, InboundMessage, Binding, BindingRegistry, ChannelInstallationStore, DispatchResult, ModelProviderStore, UserTenantLinkStore, LLMConfig, ModelProviderPublicEntry, TenantModelCatalog, CreateModelProviderRequest, UpdateModelProviderRequest, ModelDiscoveryResult, ModelProviderProbeRequest, ModelProviderProbeResult, ModelSelection, ProjectRoomEventScope, ProjectRoomBusinessEventDraft, ProjectRoomScopedBusinessEvent, ProjectRoomBusinessEvent, ProjectRoomEventSubscription, TaskStore, ProjectRoomStore, ProjectBotMembershipStore, ThreadStore, Thread, ProjectRoom, ProjectStore, Project, ObservabilityDashboardInput, ObservabilityDashboardResult, TaskWorkItemStore, TenantStore, OutboxStore, A2AApiKeyStore, AssistantStore, A2AApiKeyEntry, A2AAuthContext, Assistant, OpenGrant, A2AApiKeyRecord, LeaseStore, CheckpointMaintenance, LoggerType, PinoFileOptions } from '@axiom-lattice/protocols';
|
|
3
3
|
import { TrustedAgentMessageDispatcher, TrustedMessageOptions, TaskLifecycleListener, AgentRunJsonObject, TrustedRunContext, AgentRunRecord, TaskLifecycleService, IAgentRunLedger, ObservabilityProvider, ObservabilityTraceContext, AppendLog, TaskLivenessProbe, TaskRunRegistry, AgentLifecycleTapEvent, AgentLifecycleEventName, AgentThreadInterface, AgentCheckpointTip, ExecuteRunInput, ExecuteRunResult, AgentRunSource, AgentRunStatus, ThreadRunLeaseHandle } from '@axiom-lattice/core';
|
|
4
4
|
export { TaskLivenessProbe } from '@axiom-lattice/core';
|
|
5
5
|
import * as fastify from 'fastify';
|
|
@@ -56,6 +56,142 @@ interface ProjectRoomRealtimePublisher {
|
|
|
56
56
|
}): void;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
/** Outbox topic carrying cross-replica platform settings invalidation. */
|
|
60
|
+
declare const PLATFORM_SETTINGS_CHANGED_TOPIC = "platform.settings.changed";
|
|
61
|
+
/** Payload published when the settings document changes. */
|
|
62
|
+
interface PlatformSettingsChangedEvent {
|
|
63
|
+
topic: typeof PLATFORM_SETTINGS_CHANGED_TOPIC;
|
|
64
|
+
version: number;
|
|
65
|
+
}
|
|
66
|
+
/** Best-effort publisher for a committed settings change. */
|
|
67
|
+
type PlatformSettingsChangedPublisher = (event: PlatformSettingsChangedEvent) => Promise<void> | void;
|
|
68
|
+
/** Receives a snapshot after a successful local update or reload. */
|
|
69
|
+
type PlatformSettingsChangeListener = (snapshot: PlatformSettingsSnapshot) => void;
|
|
70
|
+
/** Result of an update attempt, distinguishing a committed change from a no-op. */
|
|
71
|
+
interface PlatformSettingsUpdateResult {
|
|
72
|
+
snapshot: PlatformSettingsSnapshot;
|
|
73
|
+
/** False when the merged document equals the current sanitized document. */
|
|
74
|
+
changed: boolean;
|
|
75
|
+
}
|
|
76
|
+
/** Sanitized branding settings plus their document version and audit metadata. */
|
|
77
|
+
interface PlatformBrandingSettingsSnapshot {
|
|
78
|
+
version: number;
|
|
79
|
+
branding: PlatformBrandingSettings;
|
|
80
|
+
updatedBy?: string;
|
|
81
|
+
updatedAt?: Date;
|
|
82
|
+
}
|
|
83
|
+
/** Dependencies and optional side-effect hooks for the service. */
|
|
84
|
+
interface PlatformSettingsServiceDeps {
|
|
85
|
+
store: PlatformSettingsStore;
|
|
86
|
+
env: Record<string, string | undefined>;
|
|
87
|
+
onChange?: PlatformSettingsChangeListener | PlatformSettingsChangeListener[];
|
|
88
|
+
publishChanged?: PlatformSettingsChangedPublisher;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Merges code defaults, environment fallbacks, and the persisted platform
|
|
92
|
+
* settings document into one cached, versioned effective snapshot.
|
|
93
|
+
*
|
|
94
|
+
* The service is the only layer that reads the settings environment variables;
|
|
95
|
+
* business code consumes the resolved values through the
|
|
96
|
+
* {@link PlatformSettingsProvider} interface.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* ```ts
|
|
100
|
+
* const service = new PlatformSettingsService({ store, env: process.env });
|
|
101
|
+
* await service.load();
|
|
102
|
+
* service.getEffective().auth.emailCompletionEnabled;
|
|
103
|
+
* ```
|
|
104
|
+
*
|
|
105
|
+
* @remarks
|
|
106
|
+
* - `load()` is non-throwing and falls back to defaults/env on startup failure.
|
|
107
|
+
* - `reload()` throws after a store failure but keeps the last good snapshot.
|
|
108
|
+
* - Writes use the store's version compare-and-swap and validate every field.
|
|
109
|
+
* - Notifying listeners and publishing the outbox event are best-effort.
|
|
110
|
+
*/
|
|
111
|
+
declare class PlatformSettingsService implements PlatformSettingsProvider {
|
|
112
|
+
private readonly store;
|
|
113
|
+
private readonly envLayer;
|
|
114
|
+
private readonly listeners;
|
|
115
|
+
private readonly publishChanged?;
|
|
116
|
+
private rawDocument;
|
|
117
|
+
private snapshot;
|
|
118
|
+
private lastError;
|
|
119
|
+
constructor(deps: PlatformSettingsServiceDeps);
|
|
120
|
+
/**
|
|
121
|
+
* Reads the persisted record and caches the effective snapshot.
|
|
122
|
+
*
|
|
123
|
+
* Never throws: a failure leaves the defaults/env snapshot in place and is
|
|
124
|
+
* exposed through {@link getLastError}.
|
|
125
|
+
*/
|
|
126
|
+
load(): Promise<void>;
|
|
127
|
+
/**
|
|
128
|
+
* Reads the persisted record and caches the effective snapshot.
|
|
129
|
+
*
|
|
130
|
+
* The previous snapshot and raw document are preserved when the store read
|
|
131
|
+
* fails; the failure is re-thrown so the caller can log it.
|
|
132
|
+
*/
|
|
133
|
+
reload(): Promise<void>;
|
|
134
|
+
/**
|
|
135
|
+
* Reloads the record, typically after a peer replica publishes a change.
|
|
136
|
+
*/
|
|
137
|
+
invalidate(): Promise<void>;
|
|
138
|
+
/**
|
|
139
|
+
* Merges a patch over the current raw document, validates it, persists it
|
|
140
|
+
* with version compare-and-swap, then refreshes the cache.
|
|
141
|
+
*
|
|
142
|
+
* @param documentPatch Partial document to merge (undefined leaf removes an
|
|
143
|
+
* override).
|
|
144
|
+
* @param expectedVersion Version the caller last observed.
|
|
145
|
+
* @param updatedBy Optional admin identifier recorded on the row.
|
|
146
|
+
* @returns The new effective snapshot.
|
|
147
|
+
* @throws {PlatformSettingsValidationError} When a field is invalid.
|
|
148
|
+
* @throws {PlatformSettingsVersionConflictError} When the version is stale.
|
|
149
|
+
*/
|
|
150
|
+
update(documentPatch: PlatformSettingsDocument, expectedVersion: number, updatedBy?: string): Promise<PlatformSettingsSnapshot>;
|
|
151
|
+
/**
|
|
152
|
+
* Like {@link update} but also reports whether anything was committed.
|
|
153
|
+
*
|
|
154
|
+
* A patch that merges back to the current sanitized document is a no-op: the
|
|
155
|
+
* version is not bumped and no listener, outbox event, or audit row fires.
|
|
156
|
+
*/
|
|
157
|
+
updateWithResult(documentPatch: PlatformSettingsDocument, expectedVersion: number, updatedBy?: string): Promise<PlatformSettingsUpdateResult>;
|
|
158
|
+
/** Returns the cached effective settings and provenance. */
|
|
159
|
+
getSnapshot(): PlatformSettingsSnapshot;
|
|
160
|
+
/** Returns the cached effective settings. */
|
|
161
|
+
getEffective(): EffectivePlatformSettings;
|
|
162
|
+
/** Returns the cached invite defaults. */
|
|
163
|
+
getInviteDefaults(): EffectivePlatformSettings["invite"];
|
|
164
|
+
/** Returns the cached rate limit and quota values. */
|
|
165
|
+
getRateLimits(): EffectivePlatformSettings["rateLimits"];
|
|
166
|
+
/** Returns sanitized branding settings plus the document version metadata. */
|
|
167
|
+
getBrandingSettings(): PlatformBrandingSettingsSnapshot;
|
|
168
|
+
/**
|
|
169
|
+
* Resolves the branding for a request host.
|
|
170
|
+
*
|
|
171
|
+
* The host is normalized (lowercase, no port, no trailing dot) and matched
|
|
172
|
+
* exactly against configured domains. Domain branding is merged over the
|
|
173
|
+
* platform default; unknown hosts get the default brand.
|
|
174
|
+
*/
|
|
175
|
+
getBrandingForHost(host: string): ResolvedPlatformBranding;
|
|
176
|
+
/** Registers a listener invoked after a successful update or reload. */
|
|
177
|
+
onChange(listener: PlatformSettingsChangeListener): void;
|
|
178
|
+
/** Returns the last store failure observed by `load()`, if any. */
|
|
179
|
+
getLastError(): unknown;
|
|
180
|
+
private read;
|
|
181
|
+
/**
|
|
182
|
+
* Replaces the cache from a store record.
|
|
183
|
+
*
|
|
184
|
+
* Never regresses on an older version so a delayed or duplicated outbox
|
|
185
|
+
* event cannot roll the snapshot (or raw document) backwards.
|
|
186
|
+
*
|
|
187
|
+
* @returns Whether the effective version changed.
|
|
188
|
+
*/
|
|
189
|
+
private applyRecord;
|
|
190
|
+
private buildSnapshot;
|
|
191
|
+
private notify;
|
|
192
|
+
private publish;
|
|
193
|
+
}
|
|
194
|
+
|
|
59
195
|
declare class ChannelAdapterRegistry {
|
|
60
196
|
private adapters;
|
|
61
197
|
register(adapter: ChannelAdapter): void;
|
|
@@ -1423,6 +1559,14 @@ interface LatticeRouteResult {
|
|
|
1423
1559
|
projectRoomRealtimeRuntime?: ProjectRoomRealtimeRuntime;
|
|
1424
1560
|
/** Always-present controller used by the outbox poller to reconcile foreign changes. */
|
|
1425
1561
|
modelProviderController: ModelProviderController;
|
|
1562
|
+
/** Process-wide settings service used by the outbox poller to invalidate peers. */
|
|
1563
|
+
platformSettingsService: PlatformSettingsService;
|
|
1564
|
+
/**
|
|
1565
|
+
* Resolves once the deployment-level OIDC guard has evaluated env and
|
|
1566
|
+
* store-backed providers. Callers should await it before listening so a
|
|
1567
|
+
* misconfigured deployment fails startup.
|
|
1568
|
+
*/
|
|
1569
|
+
oidcDeploymentGuard?: Promise<void>;
|
|
1426
1570
|
}
|
|
1427
1571
|
|
|
1428
1572
|
declare const defaultSwaggerConfig: {
|