@axiom-lattice/protocols 7.8.1 → 7.9.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 +130 -0
- package/dist/index.d.mts +70 -2
- package/dist/index.d.ts +70 -2
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/AgentWebAppStoreProtocol.ts +10 -0
- package/src/ChannelInstallationStoreProtocol.ts +22 -1
- package/src/PlatformSettingsProtocol.ts +22 -0
- package/src/ThreadStoreProtocol.ts +22 -0
- package/src/__tests__/PlatformSettingsProtocol.test.ts +14 -0
- package/src/__tests__/agent-web-app-types.test.ts +2 -1
package/package.json
CHANGED
|
@@ -29,6 +29,9 @@ export interface AgentWebAppQuickPrompt {
|
|
|
29
29
|
text: string;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
/** Default fallback when a web app has no explicit `appearance.locale`. */
|
|
33
|
+
export type AgentWebAppLocale = "en-US" | "zh-CN";
|
|
34
|
+
|
|
32
35
|
/** Optional display customization for an Agent Web App. */
|
|
33
36
|
export interface AgentWebAppAppearance {
|
|
34
37
|
title?: string;
|
|
@@ -36,6 +39,13 @@ export interface AgentWebAppAppearance {
|
|
|
36
39
|
primaryColor?: string;
|
|
37
40
|
/** Up to 6 quick-start suggestions for the chat empty state. */
|
|
38
41
|
quickPrompts?: AgentWebAppQuickPrompt[];
|
|
42
|
+
/**
|
|
43
|
+
* UI locale for the embedded chat. `AgentChatApp` renders the Console chat
|
|
44
|
+
* stack, whose copy is owned by the SDK's i18n layer; this field lets a
|
|
45
|
+
* publication pin that language independently of any host page. Absent = the
|
|
46
|
+
* host's own locale or `en-US` (same as today).
|
|
47
|
+
*/
|
|
48
|
+
locale?: AgentWebAppLocale;
|
|
39
49
|
}
|
|
40
50
|
|
|
41
51
|
/** Identity assurance levels reported by the runtime. */
|
|
@@ -78,6 +78,22 @@ export interface ChannelInstallation<TConfig = unknown> {
|
|
|
78
78
|
config: TConfig;
|
|
79
79
|
enabled: boolean;
|
|
80
80
|
fallbackAgentId?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Optional execution workspace for messages routed through this
|
|
83
|
+
* installation's fallback agent.
|
|
84
|
+
*
|
|
85
|
+
* Fallback routing has no persisted binding, so the installation is the only
|
|
86
|
+
* place that can carry the scope into the Agent run.
|
|
87
|
+
*/
|
|
88
|
+
workspaceId?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Optional execution project for messages routed through this installation's
|
|
91
|
+
* fallback agent.
|
|
92
|
+
*
|
|
93
|
+
* When set, sandbox creation mounts `/project` as a named volume and the run
|
|
94
|
+
* is project-scoped instead of falling back to the process-wide default.
|
|
95
|
+
*/
|
|
96
|
+
projectId?: string;
|
|
81
97
|
rejectWhenNoBinding: boolean;
|
|
82
98
|
createdAt: Date;
|
|
83
99
|
updatedAt: Date;
|
|
@@ -90,6 +106,8 @@ export interface CreateChannelInstallationInput {
|
|
|
90
106
|
config: Record<string, unknown>;
|
|
91
107
|
enabled?: boolean;
|
|
92
108
|
fallbackAgentId?: string;
|
|
109
|
+
workspaceId?: string;
|
|
110
|
+
projectId?: string;
|
|
93
111
|
rejectWhenNoBinding?: boolean;
|
|
94
112
|
}
|
|
95
113
|
|
|
@@ -108,7 +126,10 @@ export interface UpdateChannelInstallationRequest {
|
|
|
108
126
|
name?: string;
|
|
109
127
|
config?: Record<string, unknown>;
|
|
110
128
|
enabled?: boolean;
|
|
111
|
-
|
|
129
|
+
/** `null` clears the stored fallback agent; omitting the field leaves it unchanged. */
|
|
130
|
+
fallbackAgentId?: string | null;
|
|
131
|
+
workspaceId?: string;
|
|
132
|
+
projectId?: string;
|
|
112
133
|
rejectWhenNoBinding?: boolean;
|
|
113
134
|
}
|
|
114
135
|
|
|
@@ -133,6 +133,19 @@ export interface PlatformSettingsDocument {
|
|
|
133
133
|
policies?: Record<string, PlatformRateLimitPolicyOverride>;
|
|
134
134
|
/** PATCH-only command: remove platform overrides for these policies. */
|
|
135
135
|
resetPolicies?: string[];
|
|
136
|
+
/**
|
|
137
|
+
* @deprecated Use `execution.maxActiveRunTasksPerTenant`.
|
|
138
|
+
* Legacy reads and writes are still accepted and normalized onto the
|
|
139
|
+
* `execution` leaf until this key is removed.
|
|
140
|
+
*/
|
|
141
|
+
maxActiveRunTasksPerTenant?: number | null;
|
|
142
|
+
};
|
|
143
|
+
execution?: {
|
|
144
|
+
/** Maximum concurrent runs executed by one worker process (per process). */
|
|
145
|
+
maxConcurrentRunsPerWorker?: number;
|
|
146
|
+
/** Maximum running runs per tenant; `null` = unlimited. */
|
|
147
|
+
maxRunningRunsPerTenant?: number | null;
|
|
148
|
+
/** Maximum active run tasks per tenant; `null` = unlimited. */
|
|
136
149
|
maxActiveRunTasksPerTenant?: number | null;
|
|
137
150
|
};
|
|
138
151
|
branding?: PlatformBrandingSettings;
|
|
@@ -154,6 +167,10 @@ export interface EffectivePlatformSettings {
|
|
|
154
167
|
openAgentPerMinute: number;
|
|
155
168
|
a2aJsonRpcPerMinute: number;
|
|
156
169
|
a2aJsonRpcIpPerMinute: number;
|
|
170
|
+
};
|
|
171
|
+
execution: {
|
|
172
|
+
maxConcurrentRunsPerWorker: number;
|
|
173
|
+
maxRunningRunsPerTenant: number | null;
|
|
157
174
|
maxActiveRunTasksPerTenant: number | null;
|
|
158
175
|
};
|
|
159
176
|
}
|
|
@@ -176,6 +193,7 @@ export interface PlatformSettingsProvider {
|
|
|
176
193
|
getEffective(): EffectivePlatformSettings;
|
|
177
194
|
getInviteDefaults(): EffectivePlatformSettings["invite"];
|
|
178
195
|
getRateLimits(): EffectivePlatformSettings["rateLimits"];
|
|
196
|
+
getExecution(): EffectivePlatformSettings["execution"];
|
|
179
197
|
/** Platform-only policy overrides; absent for consumers that do not need them. */
|
|
180
198
|
getRateLimitPolicyOverrides?(): Record<string, PlatformRateLimitPolicyOverride>;
|
|
181
199
|
}
|
|
@@ -220,6 +238,10 @@ export const PLATFORM_SETTINGS_DEFAULTS = {
|
|
|
220
238
|
openAgentPerMinute: 2_000,
|
|
221
239
|
a2aJsonRpcPerMinute: 600,
|
|
222
240
|
a2aJsonRpcIpPerMinute: 300,
|
|
241
|
+
},
|
|
242
|
+
execution: {
|
|
243
|
+
maxConcurrentRunsPerWorker: 10,
|
|
244
|
+
maxRunningRunsPerTenant: null,
|
|
223
245
|
maxActiveRunTasksPerTenant: null,
|
|
224
246
|
},
|
|
225
247
|
} as const satisfies EffectivePlatformSettings;
|
|
@@ -65,6 +65,14 @@ export interface CreateThreadRequest {
|
|
|
65
65
|
expiresAt?: Date;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
/** Latest known sender for a channel installation. */
|
|
69
|
+
export interface ChannelSenderSummary {
|
|
70
|
+
senderId: string;
|
|
71
|
+
displayName?: string;
|
|
72
|
+
lastSeenAt: Date;
|
|
73
|
+
lastThreadId: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
68
76
|
/**
|
|
69
77
|
* ThreadStore interface
|
|
70
78
|
* Provides CRUD operations for thread data
|
|
@@ -159,6 +167,20 @@ export interface ThreadStore {
|
|
|
159
167
|
tenantId: string,
|
|
160
168
|
query?: ThreadMonitorQuery
|
|
161
169
|
): Promise<{ records: ThreadMonitorRecord[]; total: number }>;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* List the latest known sender per channel installation.
|
|
173
|
+
*
|
|
174
|
+
* @param tenantId Tenant scope.
|
|
175
|
+
* @param channelInstallationId Channel installation to inspect.
|
|
176
|
+
* @param limit Maximum number of senders to return (clamped to 1..200).
|
|
177
|
+
* @returns Senders ordered by most recent activity.
|
|
178
|
+
*/
|
|
179
|
+
listChannelSenders(
|
|
180
|
+
tenantId: string,
|
|
181
|
+
channelInstallationId: string,
|
|
182
|
+
limit: number
|
|
183
|
+
): Promise<ChannelSenderSummary[]>;
|
|
162
184
|
}
|
|
163
185
|
|
|
164
186
|
/** Derived monitor kind for a persisted thread. */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PLATFORM_SETTINGS_DEFAULTS } from "../PlatformSettingsProtocol";
|
|
2
|
+
|
|
3
|
+
describe("execution defaults", () => {
|
|
4
|
+
it("defaults to 10 per worker and unlimited tenant caps", () => {
|
|
5
|
+
expect(PLATFORM_SETTINGS_DEFAULTS.execution).toEqual({
|
|
6
|
+
maxConcurrentRunsPerWorker: 10,
|
|
7
|
+
maxRunningRunsPerTenant: null,
|
|
8
|
+
maxActiveRunTasksPerTenant: null,
|
|
9
|
+
});
|
|
10
|
+
expect(PLATFORM_SETTINGS_DEFAULTS.rateLimits).not.toHaveProperty(
|
|
11
|
+
"maxActiveRunTasksPerTenant",
|
|
12
|
+
);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
@@ -92,7 +92,8 @@ type AgentWebAppBootstrapAppearanceKeys =
|
|
|
92
92
|
| "title"
|
|
93
93
|
| "welcomeMessage"
|
|
94
94
|
| "primaryColor"
|
|
95
|
-
| "quickPrompts"
|
|
95
|
+
| "quickPrompts"
|
|
96
|
+
| "locale";
|
|
96
97
|
|
|
97
98
|
type _BootstrapHasExactTopLevelKeys = Expect<
|
|
98
99
|
Equal<keyof AgentWebAppBootstrap, AgentWebAppBootstrapKeys>
|