@capybara-hq/plugin-sdk 0.1.0-rc.17 → 0.1.0-rc.19
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/agent-docs/extension-points/context.md +15 -0
- package/agent-docs/extensions.md +1 -0
- package/dist/context.d.ts +40 -0
- package/dist/context.js +2 -0
- package/dist/device-protocol.d.ts +8 -0
- package/dist/device-protocol.js +10 -0
- package/dist/extension-point.d.ts +2 -0
- package/dist/extension-point.js +3 -0
- package/dist/hooks.d.ts +40 -3
- package/dist/hooks.js +5 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/permissions.d.ts +1 -1
- package/dist/permissions.js +3 -0
- package/dist/theme-tokens.generated.js +5 -0
- package/dist/tool.d.ts +15 -0
- package/dist/tool.js +8 -0
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Authoring: extension point context
|
|
2
|
+
|
|
3
|
+
<!-- generated:extension-point -->
|
|
4
|
+
- Name: `context` (a ref is `context@<major>`)
|
|
5
|
+
- Adds text to the model's context at run start in conversations of orgs that enable it.
|
|
6
|
+
- Providers: several
|
|
7
|
+
- Enabled per org: yes
|
|
8
|
+
- Brokered by the platform: yes (extensions use it only through `ctx`)
|
|
9
|
+
<!-- /generated -->
|
|
10
|
+
|
|
11
|
+
Contract: ContextProvider (`context.ts`)
|
|
12
|
+
|
|
13
|
+
Return the text the model should see at the start of a run, or null. The kernel calls every provider enabled in the org once per run, only in `chat` conversations (not evals or sub-agents), with the run's source, the trigger account and its org role, the conversation owner and the tool keys. A call is limited to 2 seconds and 32 KB of text and fails open: a timeout or error adds nothing and the run goes on. The text is recorded in the conversation log only when its hash changes.
|
|
14
|
+
|
|
15
|
+
See `extensions` for the rules every extension follows.
|
package/agent-docs/extensions.md
CHANGED
|
@@ -80,6 +80,7 @@ look like `channel@1`: name and major version. The registered points:
|
|
|
80
80
|
| `connector` | multi | no | Speaks one protocol (MCP, OpenAPI) to external systems and exposes their tools to agents. |
|
|
81
81
|
| `file-preview` | multi | yes | Renders previews of files of given types in the conversation UI. |
|
|
82
82
|
| `web-search` | multi | yes | Searches the web for the WebSearch tool; each org picks a default provider. |
|
|
83
|
+
| `context` | multi | yes | Adds text to the model's context at run start in conversations of orgs that enable it. |
|
|
83
84
|
| `web-fetch` | multi | yes | Fetches and extracts web pages for the WebFetch tool; each org picks a default provider. |
|
|
84
85
|
<!-- /generated -->
|
|
85
86
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ConversationSource } from "./tool.js";
|
|
2
|
+
/**
|
|
3
|
+
* What the kernel passes to a `context@1` provider at the start of a run. The provider returns the
|
|
4
|
+
* text it wants the model to see, or null.
|
|
5
|
+
*/
|
|
6
|
+
export interface ContextRequest {
|
|
7
|
+
orgId: string;
|
|
8
|
+
/** The run's trigger account (the person whose message started the run). */
|
|
9
|
+
accountId: string;
|
|
10
|
+
agentId: string;
|
|
11
|
+
agentName: string;
|
|
12
|
+
conversationId: string;
|
|
13
|
+
runId: string;
|
|
14
|
+
/** Where the conversation comes from. */
|
|
15
|
+
source: ConversationSource;
|
|
16
|
+
/** The trigger account's role in the org. */
|
|
17
|
+
role: "owner" | "admin" | "member" | "guest";
|
|
18
|
+
/** The conversation's owner (`conversations.account_id`); `accountId` is the run's trigger account. */
|
|
19
|
+
ownerAccountId: string;
|
|
20
|
+
ownerName: string;
|
|
21
|
+
/** Keys of the tools the agent has in this run. */
|
|
22
|
+
tools: string[];
|
|
23
|
+
/** The provider's effective config for the org. */
|
|
24
|
+
config: unknown;
|
|
25
|
+
/** Aborts when the call runs past {@link CONTEXT_LIMITS}.timeoutMs or the run is aborted. */
|
|
26
|
+
signal: AbortSignal;
|
|
27
|
+
}
|
|
28
|
+
/** The text a provider adds to the model's context, or null for nothing. */
|
|
29
|
+
export type ContextResult = {
|
|
30
|
+
text: string;
|
|
31
|
+
} | null;
|
|
32
|
+
/** The `context@1` contract: an extension that adds text to the model's context at run start. */
|
|
33
|
+
export interface ContextProvider {
|
|
34
|
+
provide(req: ContextRequest): Promise<ContextResult>;
|
|
35
|
+
}
|
|
36
|
+
/** Limits on one `provide` call: the time it may take and the bytes of text the kernel keeps. */
|
|
37
|
+
export declare const CONTEXT_LIMITS: {
|
|
38
|
+
readonly timeoutMs: 2000;
|
|
39
|
+
readonly maxBytes: 32768;
|
|
40
|
+
};
|
package/dist/context.js
ADDED
|
@@ -35,6 +35,14 @@ export interface DeviceLocalPolicySummary {
|
|
|
35
35
|
allowedDomains: string[];
|
|
36
36
|
remoteGrants: DeviceRemoteGrants;
|
|
37
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* The first line of the kernel's background task launch command (`Bash` `run_in_background`), a
|
|
40
|
+
* shell comment. A device kills what a foreground exec leaves running once the exec ends; an exec
|
|
41
|
+
* whose command starts with this line detaches a task on purpose, and its processes are left alone.
|
|
42
|
+
*/
|
|
43
|
+
export declare const BACKGROUND_LAUNCH_LINE = "# capybara: background task launch";
|
|
44
|
+
/** Whether an exec's command is a background task launch ({@link BACKGROUND_LAUNCH_LINE}). */
|
|
45
|
+
export declare function isBackgroundLaunch(command: string): boolean;
|
|
38
46
|
/** The most blocked hosts an exec result reports; the parser cuts longer lists. */
|
|
39
47
|
export declare const MAX_NETWORK_BLOCKED_HOSTS = 20;
|
|
40
48
|
/** First frame from the device after the WebSocket opens. */
|
package/dist/device-protocol.js
CHANGED
|
@@ -17,6 +17,16 @@ const DEVICE_OPS = [
|
|
|
17
17
|
"policy",
|
|
18
18
|
];
|
|
19
19
|
const DEVICE_FEATURES = ["networkReport", "policyOp", "tiers"];
|
|
20
|
+
/**
|
|
21
|
+
* The first line of the kernel's background task launch command (`Bash` `run_in_background`), a
|
|
22
|
+
* shell comment. A device kills what a foreground exec leaves running once the exec ends; an exec
|
|
23
|
+
* whose command starts with this line detaches a task on purpose, and its processes are left alone.
|
|
24
|
+
*/
|
|
25
|
+
export const BACKGROUND_LAUNCH_LINE = "# capybara: background task launch";
|
|
26
|
+
/** Whether an exec's command is a background task launch ({@link BACKGROUND_LAUNCH_LINE}). */
|
|
27
|
+
export function isBackgroundLaunch(command) {
|
|
28
|
+
return command === BACKGROUND_LAUNCH_LINE || command.startsWith(`${BACKGROUND_LAUNCH_LINE}\n`);
|
|
29
|
+
}
|
|
20
30
|
/** The most blocked hosts an exec result reports; the parser cuts longer lists. */
|
|
21
31
|
export const MAX_NETWORK_BLOCKED_HOSTS = 20;
|
|
22
32
|
/** The most hosts a `policy` op's `add` / `remove` or an exec's `grants` may carry. */
|
|
@@ -31,6 +31,8 @@ export declare const CHANNEL_EXTENSION_POINT = "channel@1";
|
|
|
31
31
|
export declare const IDENTITY_SOURCE_EXTENSION_POINT = "identity-source@1";
|
|
32
32
|
/** Directory sync extension point ref (see `directory.ts`). */
|
|
33
33
|
export declare const DIRECTORY_EXTENSION_POINT = "directory@1";
|
|
34
|
+
/** Context provider extension point ref (see `context.ts`). */
|
|
35
|
+
export declare const CONTEXT_EXTENSION_POINT = "context@1";
|
|
34
36
|
/** Parses an extension point ref; throws when the format is invalid. */
|
|
35
37
|
export declare function parseExtensionPoint(ref: string): {
|
|
36
38
|
name: string;
|
package/dist/extension-point.js
CHANGED
|
@@ -20,6 +20,7 @@ export const EXTENSION_POINTS = {
|
|
|
20
20
|
connector: info([1], "Speaks one protocol (MCP, OpenAPI) to external systems and exposes their tools to agents.", "multi", true),
|
|
21
21
|
"file-preview": info([1], "Renders previews of files of given types in the conversation UI.", "multi", false, true),
|
|
22
22
|
"web-search": info([1], "Searches the web for the WebSearch tool; each org picks a default provider.", "multi", true, true, "org-default"),
|
|
23
|
+
context: info([1], "Adds text to the model's context at run start in conversations of orgs that enable it.", "multi", true, true),
|
|
23
24
|
"web-fetch": info([1], "Fetches and extracts web pages for the WebFetch tool; each org picks a default provider.", "multi", true, true, "org-default"),
|
|
24
25
|
};
|
|
25
26
|
/** Cardinality of the registered extension points (derived from EXTENSION_POINTS). */
|
|
@@ -32,6 +33,8 @@ export const CHANNEL_EXTENSION_POINT = "channel@1";
|
|
|
32
33
|
export const IDENTITY_SOURCE_EXTENSION_POINT = "identity-source@1";
|
|
33
34
|
/** Directory sync extension point ref (see `directory.ts`). */
|
|
34
35
|
export const DIRECTORY_EXTENSION_POINT = "directory@1";
|
|
36
|
+
/** Context provider extension point ref (see `context.ts`). */
|
|
37
|
+
export const CONTEXT_EXTENSION_POINT = "context@1";
|
|
35
38
|
/** Parses an extension point ref; throws when the format is invalid. */
|
|
36
39
|
export function parseExtensionPoint(ref) {
|
|
37
40
|
const m = /^([a-z][a-z0-9-]*)@(\d+)$/.exec(ref);
|
package/dist/hooks.d.ts
CHANGED
|
@@ -4,7 +4,9 @@ import type { ContentBlock, ModelRequest, ModelUsage } from "./model.js";
|
|
|
4
4
|
* `HOOK_MOUNT_POINTS` (`session.*`, `agent.preStep`) stay reserved: they validate in a manifest but
|
|
5
5
|
* cannot be registered yet.
|
|
6
6
|
*/
|
|
7
|
-
export declare const HOOKS_AVAILABLE: readonly ["model.request", "model.response", "tool.preExecute", "tool.postExecute", "usage.report"];
|
|
7
|
+
export declare const HOOKS_AVAILABLE: readonly ["model.request", "model.response", "tool.preExecute", "tool.postExecute", "usage.report", "org.member_removed", "agent.deleted", "org.deleted"];
|
|
8
|
+
/** Lifecycle mount points: observe-only notices that something was removed. */
|
|
9
|
+
export declare const LIFECYCLE_HOOKS: readonly ["org.member_removed", "agent.deleted", "org.deleted"];
|
|
8
10
|
/** A mount point that `ctx.hooks.on` accepts. */
|
|
9
11
|
export type AvailableHook = (typeof HOOKS_AVAILABLE)[number];
|
|
10
12
|
/** Where a sub-agent was dispatched from: the parent conversation, its run and the `Agent` call. */
|
|
@@ -201,6 +203,34 @@ export interface UsageReportPayload {
|
|
|
201
203
|
usage: ModelUsage;
|
|
202
204
|
occurredAt: string;
|
|
203
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* `org.member_removed`: an account left the org (offboarding: removed by an admin, left on its own,
|
|
208
|
+
* or offboarded by a directory sync). Lifecycle hooks are delivered durably, after the removal
|
|
209
|
+
* committed, through a queue, at least once per plugin that declares the mount in
|
|
210
|
+
* `permissions.hooks`, whether or not the org has the plugin enabled and whether or not the org's
|
|
211
|
+
* effective config of the plugin is valid (`call.config` is the platform deployment config): they
|
|
212
|
+
* exist so a plugin can delete the data it holds. Handlers must be idempotent. The payload carries
|
|
213
|
+
* ids only.
|
|
214
|
+
*/
|
|
215
|
+
export interface OrgMemberRemovedPayload {
|
|
216
|
+
orgId: string;
|
|
217
|
+
accountId: string;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* `agent.deleted`: an agent was deleted. Delivered like {@link OrgMemberRemovedPayload} (durably, at
|
|
221
|
+
* least once, regardless of org enablement or config validity; ids only).
|
|
222
|
+
*/
|
|
223
|
+
export interface AgentDeletedPayload {
|
|
224
|
+
orgId: string;
|
|
225
|
+
agentId: string;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* `org.deleted`: an org was deleted. Delivered like {@link OrgMemberRemovedPayload} (durably, at
|
|
229
|
+
* least once, regardless of org enablement or config validity; ids only).
|
|
230
|
+
*/
|
|
231
|
+
export interface OrgDeletedPayload {
|
|
232
|
+
orgId: string;
|
|
233
|
+
}
|
|
204
234
|
/** Payload type of each mount point. */
|
|
205
235
|
export interface HookPayloads {
|
|
206
236
|
"model.request": ModelRequestHookPayload;
|
|
@@ -208,6 +238,9 @@ export interface HookPayloads {
|
|
|
208
238
|
"tool.preExecute": ToolPreHookPayload;
|
|
209
239
|
"tool.postExecute": ToolPostHookPayload;
|
|
210
240
|
"usage.report": UsageReportPayload;
|
|
241
|
+
"org.member_removed": OrgMemberRemovedPayload;
|
|
242
|
+
"agent.deleted": AgentDeletedPayload;
|
|
243
|
+
"org.deleted": OrgDeletedPayload;
|
|
211
244
|
}
|
|
212
245
|
/**
|
|
213
246
|
* What a hook returns: nothing, or `{ deny: reason }`. A deny only takes effect for a `policy` hook
|
|
@@ -223,12 +256,16 @@ export type HookVerdict = void | {
|
|
|
223
256
|
* extension's effective deployment config for the payload's org (the platform's config with the
|
|
224
257
|
* org's copy applied to the overridable fields, or `ctx.config` while the org follows it); the
|
|
225
258
|
* kernel always passes it, and never calls a hook for an org where that config is not valid
|
|
226
|
-
* (observe hooks are skipped, policy hooks deny).
|
|
259
|
+
* (observe hooks are skipped, policy hooks deny). Lifecycle hooks ({@link LIFECYCLE_HOOKS}) are the
|
|
260
|
+
* exception: they get the platform deployment config and are always called.
|
|
227
261
|
*/
|
|
228
262
|
export type HookHandler<K extends AvailableHook> = (payload: HookPayloads[K], signal: AbortSignal, call?: HookCall) => Promise<HookVerdict> | HookVerdict;
|
|
229
263
|
/** The per-call context of a hook handler (see {@link HookHandler}). */
|
|
230
264
|
export interface HookCall {
|
|
231
|
-
/**
|
|
265
|
+
/**
|
|
266
|
+
* The extension's effective deployment config for the payload's org (lifecycle hooks: the
|
|
267
|
+
* platform deployment config).
|
|
268
|
+
*/
|
|
232
269
|
config: unknown;
|
|
233
270
|
}
|
|
234
271
|
/**
|
package/dist/hooks.js
CHANGED
|
@@ -9,6 +9,11 @@ export const HOOKS_AVAILABLE = [
|
|
|
9
9
|
"tool.preExecute",
|
|
10
10
|
"tool.postExecute",
|
|
11
11
|
"usage.report",
|
|
12
|
+
"org.member_removed",
|
|
13
|
+
"agent.deleted",
|
|
14
|
+
"org.deleted",
|
|
12
15
|
];
|
|
16
|
+
/** Lifecycle mount points: observe-only notices that something was removed. */
|
|
17
|
+
export const LIFECYCLE_HOOKS = ["org.member_removed", "agent.deleted", "org.deleted"];
|
|
13
18
|
/** Mount points where a `policy` hook may deny the call. */
|
|
14
19
|
export const POLICY_HOOKS = ["model.request", "tool.preExecute"];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.1.0-rc.
|
|
1
|
+
export declare const SDK_VERSION = "0.1.0-rc.19";
|
|
2
2
|
export * from "./agent-template.js";
|
|
3
3
|
export * from "./bootstrap.js";
|
|
4
4
|
export * from "./cards.js";
|
|
@@ -8,6 +8,7 @@ export * from "./client-section.js";
|
|
|
8
8
|
export * from "./config-ui.js";
|
|
9
9
|
export * from "./connector.js";
|
|
10
10
|
export * from "./connector-auth.js";
|
|
11
|
+
export * from "./context.js";
|
|
11
12
|
export * from "./ctx.js";
|
|
12
13
|
export * from "./define-extension.js";
|
|
13
14
|
export * from "./dev-hosts.js";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.1.0-rc.
|
|
1
|
+
export const SDK_VERSION = "0.1.0-rc.19";
|
|
2
2
|
export * from "./agent-template.js";
|
|
3
3
|
export * from "./bootstrap.js";
|
|
4
4
|
export * from "./cards.js";
|
|
@@ -8,6 +8,7 @@ export * from "./client-section.js";
|
|
|
8
8
|
export * from "./config-ui.js";
|
|
9
9
|
export * from "./connector.js";
|
|
10
10
|
export * from "./connector-auth.js";
|
|
11
|
+
export * from "./context.js";
|
|
11
12
|
export * from "./ctx.js";
|
|
12
13
|
export * from "./define-extension.js";
|
|
13
14
|
export * from "./dev-hosts.js";
|
package/dist/permissions.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export interface ExtensionPermissions {
|
|
|
62
62
|
setupChecks?: string[];
|
|
63
63
|
}
|
|
64
64
|
/** hook 挂载点(封闭列表,见总设计 2.4)。 */
|
|
65
|
-
export declare const HOOK_MOUNT_POINTS: readonly ["session.start", "session.end", "agent.preStep", "model.request", "model.response", "tool.preExecute", "tool.postExecute", "usage.report"];
|
|
65
|
+
export declare const HOOK_MOUNT_POINTS: readonly ["session.start", "session.end", "agent.preStep", "model.request", "model.response", "tool.preExecute", "tool.postExecute", "usage.report", "org.member_removed", "agent.deleted", "org.deleted"];
|
|
66
66
|
/** hook 挂载点名。 */
|
|
67
67
|
export type HookMountPoint = (typeof HOOK_MOUNT_POINTS)[number];
|
|
68
68
|
/** A platform API not declared in the manifest was used. */
|
package/dist/permissions.js
CHANGED
|
@@ -12,6 +12,9 @@ export const HOOK_MOUNT_POINTS = [
|
|
|
12
12
|
"tool.preExecute",
|
|
13
13
|
"tool.postExecute",
|
|
14
14
|
"usage.report",
|
|
15
|
+
"org.member_removed",
|
|
16
|
+
"agent.deleted",
|
|
17
|
+
"org.deleted",
|
|
15
18
|
];
|
|
16
19
|
const HOOKS = new Set(HOOK_MOUNT_POINTS);
|
|
17
20
|
/** A platform API not declared in the manifest was used. */
|
|
@@ -125,6 +125,11 @@ export const THEME_CONTRAST = [
|
|
|
125
125
|
["muted", "raised", 4.5],
|
|
126
126
|
["muted", "selected", 4.5],
|
|
127
127
|
["muted", "hover", 4.5],
|
|
128
|
+
["ink", "hover", 4.5, "panel"],
|
|
129
|
+
["ink", "selected", 4.5, "panel"],
|
|
130
|
+
["muted", "hover", 4.5, "panel"],
|
|
131
|
+
["fail", "selected", 4.5, "panel"],
|
|
132
|
+
["accent", "selected", 3, "panel"],
|
|
128
133
|
["disabled", "bg", 3],
|
|
129
134
|
["disabled", "panel", 3],
|
|
130
135
|
["disabled", "hover", 3],
|
package/dist/tool.d.ts
CHANGED
|
@@ -7,6 +7,10 @@ export interface ToolAnnotations {
|
|
|
7
7
|
openWorldHint?: boolean;
|
|
8
8
|
requiresUserInteraction?: boolean;
|
|
9
9
|
}
|
|
10
|
+
/** Where a conversation comes from; a tool may limit itself to some of these. */
|
|
11
|
+
export declare const CONVERSATION_SOURCES: readonly ["web", "channel_dm", "channel_group", "subagent"];
|
|
12
|
+
/** A conversation source (see {@link CONVERSATION_SOURCES}). */
|
|
13
|
+
export type ConversationSource = (typeof CONVERSATION_SOURCES)[number];
|
|
10
14
|
export interface ToolSpec {
|
|
11
15
|
name: string;
|
|
12
16
|
description: string;
|
|
@@ -33,6 +37,11 @@ export interface ToolSpec {
|
|
|
33
37
|
* model and not part of the definition fingerprint.
|
|
34
38
|
*/
|
|
35
39
|
keyArgs?: string[];
|
|
40
|
+
/**
|
|
41
|
+
* The conversation sources this tool is offered in; absent = every source. A non-empty list of
|
|
42
|
+
* {@link CONVERSATION_SOURCES}.
|
|
43
|
+
*/
|
|
44
|
+
sources?: ConversationSource[];
|
|
36
45
|
}
|
|
37
46
|
/** Longest {@link ToolSpec.title}, in code points. */
|
|
38
47
|
export declare const TOOL_TITLE_MAX = 80;
|
|
@@ -137,6 +146,12 @@ export interface ToolCallContext {
|
|
|
137
146
|
* always passes it.
|
|
138
147
|
*/
|
|
139
148
|
config?: unknown;
|
|
149
|
+
/** Where the conversation comes from. The kernel always passes it. */
|
|
150
|
+
source?: ConversationSource;
|
|
151
|
+
/** The conversation's owner (`conversations.account_id`). The kernel always passes it; `accountId` stays the run's trigger account. */
|
|
152
|
+
ownerAccountId?: string;
|
|
153
|
+
/** The trigger account's role in the org. The kernel always passes it. */
|
|
154
|
+
role?: "owner" | "admin" | "member" | "guest";
|
|
140
155
|
}
|
|
141
156
|
export type ToolHandler = (input: unknown, ctx: ToolCallContext) => Promise<ToolResult | InputRequired>;
|
|
142
157
|
/**
|
package/dist/tool.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { checkParamValue } from "./model-params.js";
|
|
2
2
|
import { isHttpUrl } from "./url.js";
|
|
3
|
+
/** Where a conversation comes from; a tool may limit itself to some of these. */
|
|
4
|
+
export const CONVERSATION_SOURCES = ["web", "channel_dm", "channel_group", "subagent"];
|
|
3
5
|
/** Longest {@link ToolSpec.title}, in code points. */
|
|
4
6
|
export const TOOL_TITLE_MAX = 80;
|
|
5
7
|
/** Most {@link ToolSpec.keyArgs}. */
|
|
@@ -93,6 +95,12 @@ export function validateToolSpec(spec) {
|
|
|
93
95
|
out.push('defaultPolicy must be "allow" or "ask"');
|
|
94
96
|
if (typeof spec?.inputSchema === "object" && spec.inputSchema !== null)
|
|
95
97
|
out.push(...validateToolPresentation(spec));
|
|
98
|
+
const sources = spec?.sources;
|
|
99
|
+
if (sources !== undefined &&
|
|
100
|
+
(!Array.isArray(sources) ||
|
|
101
|
+
sources.length === 0 ||
|
|
102
|
+
sources.some((s) => !CONVERSATION_SOURCES.includes(s))))
|
|
103
|
+
out.push(`sources must be a non-empty list of ${CONVERSATION_SOURCES.join(", ")}`);
|
|
96
104
|
return out;
|
|
97
105
|
}
|
|
98
106
|
const SCHEMA_KEYS = {
|