@nekro-nxt/contracts 0.5.0 → 0.6.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/index.mjs +1044 -99
- package/dist/index.mjs.map +1 -1
- package/lib/types/community.d.ts +9 -0
- package/lib/types/community.d.ts.map +1 -1
- package/lib/types/config-schema.d.ts +16 -2
- package/lib/types/config-schema.d.ts.map +1 -1
- package/lib/types/credentials.d.ts +328 -0
- package/lib/types/credentials.d.ts.map +1 -0
- package/lib/types/domain.d.ts +11 -2
- package/lib/types/domain.d.ts.map +1 -1
- package/lib/types/extension-capabilities.d.ts +54 -2
- package/lib/types/extension-capabilities.d.ts.map +1 -1
- package/lib/types/extension-ui.d.ts +42 -0
- package/lib/types/extension-ui.d.ts.map +1 -1
- package/lib/types/host-api.d.ts +2304 -218
- package/lib/types/host-api.d.ts.map +1 -1
- package/lib/types/index.d.ts +3 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/linked-accounts.d.ts +100 -0
- package/lib/types/linked-accounts.d.ts.map +1 -0
- package/lib/types/response-timing.d.ts +60 -0
- package/lib/types/response-timing.d.ts.map +1 -0
- package/lib/types/runtime-compatibility.d.ts +2 -2
- package/package.json +1 -1
- package/src/community.ts +7 -0
- package/src/config-schema.ts +33 -2
- package/src/credentials.ts +260 -0
- package/src/domain.ts +15 -2
- package/src/extension-capabilities.ts +70 -3
- package/src/extension-ui.ts +3 -0
- package/src/host-api.ts +681 -85
- package/src/index.ts +3 -0
- package/src/linked-accounts.ts +77 -0
- package/src/management-api.ts +1 -1
- package/src/response-timing.ts +77 -0
package/dist/index.mjs
CHANGED
|
@@ -21,7 +21,13 @@ const MessageDeliverySummarySchema = z.object({
|
|
|
21
21
|
action: z.string().max(120).optional(),
|
|
22
22
|
retcode: z.number().int().safe().optional()
|
|
23
23
|
}).strict()).max(20),
|
|
24
|
-
omittedIssues: z.number().int().nonnegative().optional()
|
|
24
|
+
omittedIssues: z.number().int().nonnegative().optional(),
|
|
25
|
+
/** Extensions that changed the message before it was sent, the content they produced and what they appended. */
|
|
26
|
+
processing: z.object({
|
|
27
|
+
processedBy: z.array(z.string()),
|
|
28
|
+
parts: z.array(z.unknown()).optional(),
|
|
29
|
+
followUps: z.array(z.string()).optional()
|
|
30
|
+
}).strict().optional()
|
|
25
31
|
}).strict();
|
|
26
32
|
const brandedId = (prefix, brand) => z.string().regex(new RegExp(`^${prefix}_[0-9A-Za-z]+$`), `${brand} has an invalid format.`).brand(brand);
|
|
27
33
|
const AgentIdSchema = brandedId("agt", "AgentId");
|
|
@@ -47,6 +53,8 @@ const HostUiPageInstanceIdSchema = brandedId("hup", "HostUiPageInstanceId");
|
|
|
47
53
|
const AuthoringTaskIdSchema = brandedId("aut", "AuthoringTaskId");
|
|
48
54
|
const AuthoringAttemptIdSchema = brandedId("aua", "AuthoringAttemptId");
|
|
49
55
|
const SubConversationIdSchema = brandedId("cnv", "SubConversationId");
|
|
56
|
+
const CredentialIdSchema = brandedId("crd", "CredentialId");
|
|
57
|
+
const LinkedAccountIdSchema = brandedId("acc", "LinkedAccountId");
|
|
50
58
|
const AdapterActivityKeySchema = z.string().trim().min(1).max(128).regex(/^[a-z][a-z0-9]*(?:[.-][a-z0-9]+)*$/u, "Adapter activity key has an invalid format.");
|
|
51
59
|
const PromptTextSegmentSchema = z.object({
|
|
52
60
|
type: z.literal("text"),
|
|
@@ -257,8 +265,9 @@ const messagePartsSearchText = (parts) => parts.flatMap((part) => {
|
|
|
257
265
|
* product form can render and the Host can validate without executing Schema callbacks.
|
|
258
266
|
*
|
|
259
267
|
* Supported nodes: object (dict), string, number, natural, percent, boolean, const, union of consts (enum) and
|
|
260
|
-
* array of primitives. `meta.role: 'secret'` marks a write-only credential. NekroNXT reads
|
|
261
|
-
* `hint` (help text), `advanced` (collapsed by default)
|
|
268
|
+
* array of primitives. `meta.role: 'secret'` marks a write-only credential. NekroNXT reads four extra meta keys:
|
|
269
|
+
* `hint` (help text), `advanced` (collapsed by default), `visibleWhen` (show only when a sibling equals a value) and
|
|
270
|
+
* `agentWritable: false` (only an administrator may change the field, in the console).
|
|
262
271
|
*/
|
|
263
272
|
const CONFIG_SCHEMA_MAX_BYTES = 64 * 1024;
|
|
264
273
|
const DescriptionSchema = z.union([z.string(), z.record(z.string(), z.string())]);
|
|
@@ -278,6 +287,8 @@ const ConfigSchemaMetaSchema = z.object({
|
|
|
278
287
|
}).optional(),
|
|
279
288
|
advanced: z.boolean().optional(),
|
|
280
289
|
group: z.string().max(40).optional(),
|
|
290
|
+
/** `false` keeps the field out of the agent's reach: only an administrator changes it, in the console. */
|
|
291
|
+
agentWritable: z.boolean().optional(),
|
|
281
292
|
visibleWhen: z.object({
|
|
282
293
|
key: z.string().min(1).max(64),
|
|
283
294
|
equals: JsonValueSchema
|
|
@@ -322,6 +333,11 @@ const EMPTY_CONFIG_SCHEMA = {
|
|
|
322
333
|
type: "object",
|
|
323
334
|
dict: {}
|
|
324
335
|
};
|
|
336
|
+
const configFieldLevel = (field, networkFields) => {
|
|
337
|
+
if (field.adminOnly) return "admin";
|
|
338
|
+
if (field.kind === "secret") return "secret";
|
|
339
|
+
return (networkFields instanceof Set ? networkFields : new Set(networkFields)).has(field.key) ? "network" : "normal";
|
|
340
|
+
};
|
|
325
341
|
const configDescription = (meta) => {
|
|
326
342
|
const description = meta?.description;
|
|
327
343
|
if (typeof description === "string") return description;
|
|
@@ -360,9 +376,12 @@ const configFields = (document) => Object.entries(document.dict).map(([key, node
|
|
|
360
376
|
advanced: node.meta?.advanced === true,
|
|
361
377
|
...node.meta?.group === void 0 ? {} : { group: node.meta.group },
|
|
362
378
|
...options === void 0 ? {} : { options },
|
|
379
|
+
adminOnly: node.meta?.agentWritable === false,
|
|
363
380
|
node
|
|
364
381
|
};
|
|
365
382
|
});
|
|
383
|
+
/** Fields declared `meta.agentWritable: false`. */
|
|
384
|
+
const adminOnlyConfigKeys = (document) => configFields(document).filter((field) => field.adminOnly).map((field) => field.key);
|
|
366
385
|
const configSecretKeys = (document) => configFields(document).filter((field) => field.kind === "secret").map((field) => field.key);
|
|
367
386
|
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
368
387
|
const sameJson = (left, right) => JSON.stringify(left) === JSON.stringify(right);
|
|
@@ -516,7 +535,8 @@ const fieldMeta = (title, options = {}) => ({
|
|
|
516
535
|
...options.default === void 0 ? {} : { default: options.default },
|
|
517
536
|
...options.required === void 0 ? {} : { required: options.required },
|
|
518
537
|
...options.advanced === void 0 ? {} : { advanced: options.advanced },
|
|
519
|
-
...options.group === void 0 ? {} : { group: options.group }
|
|
538
|
+
...options.group === void 0 ? {} : { group: options.group },
|
|
539
|
+
...options.agentWritable === void 0 ? {} : { agentWritable: options.agentWritable }
|
|
520
540
|
});
|
|
521
541
|
/** Builds serialized Schemastery documents without depending on the Schemastery runtime. */
|
|
522
542
|
const configSchema = {
|
|
@@ -568,8 +588,12 @@ const configSchema = {
|
|
|
568
588
|
* ships; never reuse a level for a different meaning. Level 7 is Manifest V7 (host instance + agent attachments); level 8 adds the asset library, image info, tool result
|
|
569
589
|
* images, the search index and host-layer model calls. Level 9 adds the structured logger and explicit chat commands. Level 10 adds version lineage, the data version with its
|
|
570
590
|
* migration hook and administrator-only commands. Level 11 lists the pictures of an inbound message to inbound hooks.
|
|
591
|
+
* Level 12 adds credential placeholders (`secrets.placeholder`) that `http.fetch` fills for the credential's domains.
|
|
592
|
+
* Level 13 adds outbound processing (`harness.onOutbound`, `permissions.agent.outbound`).
|
|
571
593
|
*/
|
|
572
|
-
const EXTENSION_SDK_LEVEL =
|
|
594
|
+
const EXTENSION_SDK_LEVEL = 13;
|
|
595
|
+
/** Outbound processing needs this level; packages that declare `permissions.agent.outbound` declare it. */
|
|
596
|
+
const EXTENSION_OUTBOUND_SDK_LEVEL = 13;
|
|
573
597
|
/** Lineage, `dataVersion` and administrator-only commands need this level; packages that carry them declare it. */
|
|
574
598
|
const EXTENSION_GOVERNANCE_SDK_LEVEL = 10;
|
|
575
599
|
/**
|
|
@@ -600,6 +624,14 @@ const EXTENSION_SDK_RELEASES = [
|
|
|
600
624
|
{
|
|
601
625
|
level: 11,
|
|
602
626
|
version: "0.6.0"
|
|
627
|
+
},
|
|
628
|
+
{
|
|
629
|
+
level: 12,
|
|
630
|
+
version: "0.7.0"
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
level: 13,
|
|
634
|
+
version: "0.7.0"
|
|
603
635
|
}
|
|
604
636
|
];
|
|
605
637
|
/** The oldest NekroNXT version that supports `level`; undefined for a level no release supports yet. */
|
|
@@ -659,6 +691,21 @@ const ExtensionInboundHookCapabilitySchema = z.object({
|
|
|
659
691
|
mayForceTrigger: z.boolean(),
|
|
660
692
|
timeoutMs: z.number().int().min(100).max(EXTENSION_INBOUND_HOOK_MAX_TIMEOUT_MS)
|
|
661
693
|
}).strict();
|
|
694
|
+
const EXTENSION_OUTBOUND_MAX_TIMEOUT_MS = 15e3;
|
|
695
|
+
/**
|
|
696
|
+
* Outbound processing of the agent's own messages. `read` sees each message after it was delivered; `transform` may
|
|
697
|
+
* replace its content or append messages before it is sent; `cancel` may stop it. `onTimeout` decides what happens
|
|
698
|
+
* when the handler times out or throws before sending: `send` (default) sends the message as it is.
|
|
699
|
+
*/
|
|
700
|
+
const ExtensionOutboundCapabilitySchema = z.object({
|
|
701
|
+
read: z.literal(true).optional(),
|
|
702
|
+
transform: z.literal(true).optional(),
|
|
703
|
+
cancel: z.literal(true).optional(),
|
|
704
|
+
timeoutMs: z.number().int().min(100).max(EXTENSION_OUTBOUND_MAX_TIMEOUT_MS),
|
|
705
|
+
onTimeout: z.enum(["send", "cancel"]).optional()
|
|
706
|
+
}).strict().refine((value) => value.read === true || value.transform === true || value.cancel === true, "outbound 至少声明 read、transform 或 cancel 中的一项。");
|
|
707
|
+
/** Whether the extension takes part before sending (and so in the agent's processing order). */
|
|
708
|
+
const outboundProcessesBeforeSend = (outbound) => outbound?.transform === true || outbound?.cancel === true;
|
|
662
709
|
const EXTENSION_JOB_MAX_RUNTIME = 50;
|
|
663
710
|
const ExtensionDeclaredJobSchema = z.object({
|
|
664
711
|
id: z.string().trim().regex(/^[a-z0-9][a-z0-9-]{0,39}$/u, "定时任务 id 只能使用小写字母、数字和连字符。"),
|
|
@@ -721,8 +768,15 @@ const ExtensionModelsCapabilitySchema = z.object({
|
|
|
721
768
|
maxCallsPerMinute: z.number().int().min(1).max(120),
|
|
722
769
|
maxOutputTokens: z.number().int().min(64).max(EXTENSION_LLM_MAX_OUTPUT_TOKENS)
|
|
723
770
|
}).strict();
|
|
724
|
-
/**
|
|
725
|
-
|
|
771
|
+
/**
|
|
772
|
+
* A header or environment value: literal text, the current value of a `meta.role: 'secret'` config field, or a named
|
|
773
|
+
* credential (by id or name) that the agent may use.
|
|
774
|
+
*/
|
|
775
|
+
const ExtensionMcpValueSchema = z.union([
|
|
776
|
+
z.string().max(4096),
|
|
777
|
+
z.object({ secret: z.string().trim().min(1).max(64) }).strict(),
|
|
778
|
+
z.object({ credential: z.string().trim().min(1).max(64) }).strict()
|
|
779
|
+
]);
|
|
726
780
|
/** Becomes the model-facing tool prefix `mcp__<name>__`. */
|
|
727
781
|
const ExtensionMcpServerNameSchema = z.string().regex(/^[A-Za-z0-9_-]{1,32}$/u);
|
|
728
782
|
const McpValueMapSchema = z.record(z.string().regex(/^[A-Za-z_][A-Za-z0-9_-]{0,127}$/u), ExtensionMcpValueSchema).refine((value) => Object.keys(value).length <= 32, "最多 32 项。").default({});
|
|
@@ -747,7 +801,9 @@ const ExtensionMcpCapabilitySchema = z.object({ servers: z.array(ExtensionMcpSer
|
|
|
747
801
|
const McpFormValueSchema = z.object({
|
|
748
802
|
name: z.string().regex(/^[A-Za-z_][A-Za-z0-9_-]{0,127}$/u, "名称只能包含字母、数字、下划线和连字符。"),
|
|
749
803
|
value: z.string().max(4096),
|
|
750
|
-
secret: z.boolean().default(false)
|
|
804
|
+
secret: z.boolean().default(false),
|
|
805
|
+
/** Takes the value from this named credential instead; `value` and `secret` are then ignored. */
|
|
806
|
+
credential: z.string().trim().min(1).max(64).optional()
|
|
751
807
|
}).strict();
|
|
752
808
|
const McpServerFormSchema = z.discriminatedUnion("transport", [z.object({
|
|
753
809
|
transport: z.literal("streamable-http"),
|
|
@@ -762,7 +818,7 @@ const McpServerFormSchema = z.discriminatedUnion("transport", [z.object({
|
|
|
762
818
|
env: z.array(McpFormValueSchema).max(32).default([])
|
|
763
819
|
}).strict()]);
|
|
764
820
|
/** Secret config fields an MCP declaration reads. */
|
|
765
|
-
const mcpSecretFields = (mcp) => [...new Set((mcp?.servers ?? []).flatMap((server) => Object.values(server.transport === "stdio" ? server.env : server.headers).flatMap((value) => typeof value === "string" ? [] : [value.secret])))];
|
|
821
|
+
const mcpSecretFields = (mcp) => [...new Set((mcp?.servers ?? []).flatMap((server) => Object.values(server.transport === "stdio" ? server.env : server.headers).flatMap((value) => typeof value === "string" || !("secret" in value) ? [] : [value.secret])))];
|
|
766
822
|
/** What a server connects to; changing it needs a new approval, unlike its credentials. */
|
|
767
823
|
const mcpTarget = (server) => server.transport === "stdio" ? JSON.stringify([
|
|
768
824
|
"stdio",
|
|
@@ -787,6 +843,7 @@ const ExtensionCapabilitiesSchema = z.object({
|
|
|
787
843
|
models: ExtensionModelsCapabilitySchema.optional(),
|
|
788
844
|
history: z.object({ read: z.literal(true) }).strict().optional(),
|
|
789
845
|
inboundHook: ExtensionInboundHookCapabilitySchema.optional(),
|
|
846
|
+
outbound: ExtensionOutboundCapabilitySchema.optional(),
|
|
790
847
|
jobs: ExtensionJobsCapabilitySchema.optional(),
|
|
791
848
|
platform: ExtensionPlatformCapabilitySchema.optional(),
|
|
792
849
|
llm: ExtensionLlmCapabilitySchema.optional(),
|
|
@@ -850,6 +907,9 @@ const extensionCapabilitiesExpand = (previous, next) => {
|
|
|
850
907
|
const hook = next.inboundHook;
|
|
851
908
|
const previousHook = previous?.inboundHook;
|
|
852
909
|
if (hook !== void 0 && (previousHook === void 0 || hook.reads === "all" && previousHook.reads === "triggered" || hook.mayHide && !previousHook.mayHide || hook.mayForceTrigger && !previousHook.mayForceTrigger)) return true;
|
|
910
|
+
const outbound = next.outbound;
|
|
911
|
+
const previousOutbound = previous?.outbound;
|
|
912
|
+
if (outbound !== void 0 && (previousOutbound === void 0 || outbound.read === true && previousOutbound.read !== true || outbound.transform === true && previousOutbound.transform !== true || outbound.cancel === true && previousOutbound.cancel !== true || outbound.onTimeout === "cancel" && previousOutbound.onTimeout !== "cancel")) return true;
|
|
853
913
|
if (next.jobs?.runtime !== void 0 && (previous?.jobs?.runtime === void 0 || next.jobs.runtime.maxActive > previous.jobs.runtime.maxActive)) return true;
|
|
854
914
|
const previousMcp = new Set((previous?.mcp?.servers ?? []).map(mcpTarget));
|
|
855
915
|
if ((next.mcp?.servers ?? []).some((server) => !previousMcp.has(mcpTarget(server)))) return true;
|
|
@@ -934,6 +994,29 @@ const summarizeExtensionCapabilities = (capabilities, options = {}) => {
|
|
|
934
994
|
...effects === "" ? {} : { detail: `可以${effects}` }
|
|
935
995
|
});
|
|
936
996
|
}
|
|
997
|
+
const outbound = capabilities.outbound;
|
|
998
|
+
if (outbound !== void 0) {
|
|
999
|
+
if (outbound.transform === true) items.push({
|
|
1000
|
+
key: "outbound.transform",
|
|
1001
|
+
risk: "high",
|
|
1002
|
+
label: "在智能体的消息发出前修改内容或追加消息"
|
|
1003
|
+
});
|
|
1004
|
+
if (outbound.cancel === true) items.push({
|
|
1005
|
+
key: "outbound.cancel",
|
|
1006
|
+
risk: "high",
|
|
1007
|
+
label: "取消智能体要发出的消息"
|
|
1008
|
+
});
|
|
1009
|
+
if (outbound.read === true) items.push({
|
|
1010
|
+
key: "outbound.read",
|
|
1011
|
+
risk: "sensitive",
|
|
1012
|
+
label: "查看智能体发出的每条消息"
|
|
1013
|
+
});
|
|
1014
|
+
if (outbound.onTimeout === "cancel" && (outbound.transform === true || outbound.cancel === true)) items.push({
|
|
1015
|
+
key: "outbound.onTimeout",
|
|
1016
|
+
risk: "high",
|
|
1017
|
+
label: "这个扩展出错时,智能体的消息会发不出去"
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
937
1020
|
const jobs = capabilities.jobs;
|
|
938
1021
|
if (jobs?.declared !== void 0 && jobs.declared.length > 0) items.push({
|
|
939
1022
|
key: "jobs.declared",
|
|
@@ -1382,6 +1465,10 @@ const requiredExtensionSdkLevel = (permissions) => {
|
|
|
1382
1465
|
permissions?.host?.index === void 0 && permissions?.agent?.index === void 0 ? void 0 : "检索索引",
|
|
1383
1466
|
permissions?.host?.models === void 0 ? void 0 : "本机层模型调用"
|
|
1384
1467
|
].filter((name) => name !== void 0);
|
|
1468
|
+
if (permissions?.agent?.outbound !== void 0) return {
|
|
1469
|
+
level: 13,
|
|
1470
|
+
capabilities: ["出站处理"]
|
|
1471
|
+
};
|
|
1385
1472
|
return level8.length > 0 ? {
|
|
1386
1473
|
level: 8,
|
|
1387
1474
|
capabilities: [...new Set(level8)]
|
|
@@ -1812,6 +1899,262 @@ const hostLogStreamEventSchema = z.discriminatedUnion("type", [
|
|
|
1812
1899
|
})
|
|
1813
1900
|
]);
|
|
1814
1901
|
//#endregion
|
|
1902
|
+
//#region src/credentials.ts
|
|
1903
|
+
/**
|
|
1904
|
+
* Named credentials (智能体扩展配置与凭据 C1–C5): one entry is added once and reused by extensions, MCP servers and
|
|
1905
|
+
* commands. The value is write-only; every view below carries metadata only. Accounts on platforms such as GitHub are
|
|
1906
|
+
* linked accounts (`linked-accounts.ts`), granted per agent, not credentials.
|
|
1907
|
+
*/
|
|
1908
|
+
const CREDENTIAL_NAME_MAX_CHARS = 64;
|
|
1909
|
+
const CREDENTIAL_DESCRIPTION_MAX_CHARS = 500;
|
|
1910
|
+
const CREDENTIAL_VALUE_MAX_CHARS = 16384;
|
|
1911
|
+
/** Values shorter than this are not hidden from tool results; the form warns when one is saved. */
|
|
1912
|
+
const CREDENTIAL_REDACTABLE_MIN_CHARS = 8;
|
|
1913
|
+
/** How a credential reaches code: `request` only as a placeholder filled by `nxt.http.fetch`; `program` as the value. */
|
|
1914
|
+
const CredentialUsageSchema = z.enum(["request", "program"]);
|
|
1915
|
+
/** Agents that may use a credential: every agent, or the listed ones. */
|
|
1916
|
+
const CredentialAgentScopeSchema = z.union([z.object({ all: z.literal(true) }).strict(), z.object({ agentIds: z.array(AgentIdSchema).max(256) }).strict()]);
|
|
1917
|
+
/** Shown in redaction markers (`[凭据:名称]`), so brackets and control characters are not allowed. */
|
|
1918
|
+
const CredentialNameSchema = z.string().trim().min(1, "名称不能为空。").max(64, `名称最多 64 个字符。`).regex(/^[^\u0000-\u001f\u007f[\]]+$/u, "名称不能包含方括号或控制字符。");
|
|
1919
|
+
const CredentialDescriptionSchema = z.string().trim().max(500, `说明最多 500 个字符。`);
|
|
1920
|
+
const CredentialDomainsSchema = z.array(ExtensionNetworkDomainSchema).max(32);
|
|
1921
|
+
/**
|
|
1922
|
+
* Names a credential's environment variable cannot take: the shell, the tools' own configuration, and the variables
|
|
1923
|
+
* linked accounts give commands (`GH_TOKEN` and the `gh` settings).
|
|
1924
|
+
*/
|
|
1925
|
+
const RESERVED_COMMAND_ENV = /* @__PURE__ */ new Set([
|
|
1926
|
+
"PATH",
|
|
1927
|
+
"HOME",
|
|
1928
|
+
"USER",
|
|
1929
|
+
"LOGNAME",
|
|
1930
|
+
"SHELL",
|
|
1931
|
+
"PWD",
|
|
1932
|
+
"OLDPWD",
|
|
1933
|
+
"TMPDIR",
|
|
1934
|
+
"TEMP",
|
|
1935
|
+
"TMP",
|
|
1936
|
+
"LANG",
|
|
1937
|
+
"TERM",
|
|
1938
|
+
"NODE_OPTIONS",
|
|
1939
|
+
"NODE_PATH",
|
|
1940
|
+
"GH_TOKEN",
|
|
1941
|
+
"GH_CONFIG_DIR",
|
|
1942
|
+
"GH_PROMPT_DISABLED",
|
|
1943
|
+
"GH_NO_UPDATE_NOTIFIER",
|
|
1944
|
+
"GH_NO_EXTENSION_UPDATE_NOTIFIER",
|
|
1945
|
+
"GIT_TERMINAL_PROMPT",
|
|
1946
|
+
"GIT_CONFIG_COUNT"
|
|
1947
|
+
]);
|
|
1948
|
+
const RESERVED_COMMAND_ENV_PREFIXES = [
|
|
1949
|
+
"LC_",
|
|
1950
|
+
"LD_",
|
|
1951
|
+
"DYLD_",
|
|
1952
|
+
"GIT_CONFIG_",
|
|
1953
|
+
"NEKRO_",
|
|
1954
|
+
"DSH_"
|
|
1955
|
+
];
|
|
1956
|
+
/** The environment variable a program credential reaches commands under. */
|
|
1957
|
+
const CredentialEnvNameSchema = z.string().trim().max(64).regex(/^[A-Z_][A-Z0-9_]*$/u, "环境变量名只能使用大写字母、数字和下划线,且不能以数字开头。").refine((name) => !RESERVED_COMMAND_ENV.has(name) && !RESERVED_COMMAND_ENV_PREFIXES.some((prefix) => name.startsWith(prefix)), "这个环境变量名由系统使用,请换一个。");
|
|
1958
|
+
const CredentialValueSchema = z.string().min(1).max(CREDENTIAL_VALUE_MAX_CHARS);
|
|
1959
|
+
/** What uses one credential right now: extension secret fields bound to it and agents whose commands receive it. */
|
|
1960
|
+
const CredentialUsersSchema = z.object({
|
|
1961
|
+
extensions: z.array(z.object({
|
|
1962
|
+
extensionId: ExtensionIdSchema,
|
|
1963
|
+
name: z.string(),
|
|
1964
|
+
/** Agents whose own configuration binds it; empty when only the host configuration does. */
|
|
1965
|
+
agentIds: z.array(AgentIdSchema),
|
|
1966
|
+
host: z.boolean()
|
|
1967
|
+
}).strict()),
|
|
1968
|
+
/** Agents with commands enabled whose commands receive it. */
|
|
1969
|
+
commandAgents: z.array(AgentIdSchema)
|
|
1970
|
+
}).strict();
|
|
1971
|
+
const CredentialViewSchema = z.object({
|
|
1972
|
+
id: CredentialIdSchema,
|
|
1973
|
+
name: CredentialNameSchema,
|
|
1974
|
+
description: z.string(),
|
|
1975
|
+
usage: CredentialUsageSchema,
|
|
1976
|
+
domains: z.array(z.string()),
|
|
1977
|
+
agentScope: CredentialAgentScopeSchema,
|
|
1978
|
+
autoUse: z.boolean(),
|
|
1979
|
+
/** Program credentials: the environment variable agents' commands receive it under, or `null` when they do not. */
|
|
1980
|
+
envName: z.string().nullable(),
|
|
1981
|
+
/** Agents an administrator let use it while automatic use is off. */
|
|
1982
|
+
approvedAgentIds: z.array(AgentIdSchema),
|
|
1983
|
+
/** False when the stored value is too short to hide from tool results, or cannot be read. */
|
|
1984
|
+
redactable: z.boolean(),
|
|
1985
|
+
/** False when the stored value cannot be read any more; the entry stays so it can be replaced. */
|
|
1986
|
+
available: z.boolean(),
|
|
1987
|
+
usedBy: CredentialUsersSchema,
|
|
1988
|
+
createdAt: z.number().int().nonnegative(),
|
|
1989
|
+
updatedAt: z.number().int().nonnegative(),
|
|
1990
|
+
lastUsedAt: z.number().int().nonnegative().nullable()
|
|
1991
|
+
}).strict();
|
|
1992
|
+
/** A model provider listed with the credentials; `open` lets agents and extensions call it through the host. */
|
|
1993
|
+
const ModelProviderAccessSchema = z.object({
|
|
1994
|
+
provider: z.string().min(1),
|
|
1995
|
+
name: z.string(),
|
|
1996
|
+
open: z.boolean()
|
|
1997
|
+
}).strict();
|
|
1998
|
+
/**
|
|
1999
|
+
* An agent asked for a credential that does not exist yet. The settings link pre-fills the add form; saving a
|
|
2000
|
+
* credential with this name wakes the agent in the channel it asked from.
|
|
2001
|
+
*/
|
|
2002
|
+
const CredentialRequestViewSchema = z.object({
|
|
2003
|
+
id: z.string().min(1).max(64),
|
|
2004
|
+
name: CredentialNameSchema,
|
|
2005
|
+
purpose: z.string(),
|
|
2006
|
+
domains: z.array(z.string()),
|
|
2007
|
+
usage: CredentialUsageSchema,
|
|
2008
|
+
agentId: AgentIdSchema,
|
|
2009
|
+
channelId: ChannelIdSchema.nullable(),
|
|
2010
|
+
createdAt: z.number().int().nonnegative(),
|
|
2011
|
+
/** Settings route that opens the add form pre-filled, see {@link credentialRequestRoute}. */
|
|
2012
|
+
route: z.string()
|
|
2013
|
+
}).strict();
|
|
2014
|
+
const CredentialsViewSchema = z.object({
|
|
2015
|
+
credentials: z.array(CredentialViewSchema),
|
|
2016
|
+
modelProviders: z.array(ModelProviderAccessSchema),
|
|
2017
|
+
requests: z.array(CredentialRequestViewSchema)
|
|
2018
|
+
}).strict();
|
|
2019
|
+
const CreateCredentialRequestSchema = z.object({
|
|
2020
|
+
name: CredentialNameSchema,
|
|
2021
|
+
description: CredentialDescriptionSchema.default(""),
|
|
2022
|
+
agentScope: CredentialAgentScopeSchema.default({ all: true }),
|
|
2023
|
+
autoUse: z.boolean().default(true),
|
|
2024
|
+
usage: CredentialUsageSchema.default("request"),
|
|
2025
|
+
domains: CredentialDomainsSchema.default([]),
|
|
2026
|
+
/** Program credentials only. */
|
|
2027
|
+
envName: CredentialEnvNameSchema.optional(),
|
|
2028
|
+
value: CredentialValueSchema,
|
|
2029
|
+
/** The agent request this form was opened from, if any. */
|
|
2030
|
+
requestId: z.string().min(1).max(64).optional()
|
|
2031
|
+
}).strict();
|
|
2032
|
+
/** Metadata changes; omitted fields keep their value. */
|
|
2033
|
+
const UpdateCredentialRequestSchema = z.object({
|
|
2034
|
+
name: CredentialNameSchema.optional(),
|
|
2035
|
+
description: CredentialDescriptionSchema.optional(),
|
|
2036
|
+
usage: CredentialUsageSchema.optional(),
|
|
2037
|
+
domains: CredentialDomainsSchema.optional(),
|
|
2038
|
+
agentScope: CredentialAgentScopeSchema.optional(),
|
|
2039
|
+
autoUse: z.boolean().optional(),
|
|
2040
|
+
/** `null` stops giving it to commands; only program credentials take one. */
|
|
2041
|
+
envName: CredentialEnvNameSchema.nullable().optional(),
|
|
2042
|
+
/** Replaces the agents allowed to use it while automatic use is off, for example to withdraw an approval. */
|
|
2043
|
+
approvedAgentIds: z.array(AgentIdSchema).max(256).optional()
|
|
2044
|
+
}).strict();
|
|
2045
|
+
const ReplaceCredentialValueRequestSchema = z.object({ value: CredentialValueSchema }).strict();
|
|
2046
|
+
/** Removing a credential that is in use needs `confirm`; without it the result lists who uses it. */
|
|
2047
|
+
const RemoveCredentialRequestSchema = z.object({ confirm: z.boolean().default(false) }).strict();
|
|
2048
|
+
const RemoveCredentialResultSchema = z.discriminatedUnion("removed", [z.object({
|
|
2049
|
+
removed: z.literal(true),
|
|
2050
|
+
view: CredentialsViewSchema
|
|
2051
|
+
}).strict(), z.object({
|
|
2052
|
+
removed: z.literal(false),
|
|
2053
|
+
usedBy: CredentialUsersSchema
|
|
2054
|
+
}).strict()]);
|
|
2055
|
+
const CredentialConsumerKindSchema = z.enum([
|
|
2056
|
+
"extension",
|
|
2057
|
+
"command",
|
|
2058
|
+
"mcp",
|
|
2059
|
+
"model"
|
|
2060
|
+
]);
|
|
2061
|
+
/** One recorded use. The newest 500 per credential are kept, none older than 90 days. */
|
|
2062
|
+
const CredentialUseSchema = z.object({
|
|
2063
|
+
at: z.number().int().nonnegative(),
|
|
2064
|
+
agentId: AgentIdSchema.nullable(),
|
|
2065
|
+
channelId: ChannelIdSchema.nullable(),
|
|
2066
|
+
requesterMemberId: z.string().nullable(),
|
|
2067
|
+
consumerKind: CredentialConsumerKindSchema,
|
|
2068
|
+
consumerId: z.string(),
|
|
2069
|
+
/** Extension display name or MCP server name, when it is still known. */
|
|
2070
|
+
consumerName: z.string().nullable(),
|
|
2071
|
+
targetHost: z.string().nullable()
|
|
2072
|
+
}).strict();
|
|
2073
|
+
const CredentialUsesViewSchema = z.object({ uses: z.array(CredentialUseSchema) }).strict();
|
|
2074
|
+
const SetModelProviderAccessRequestSchema = z.object({ open: z.boolean() }).strict();
|
|
2075
|
+
/**
|
|
2076
|
+
* The settings route that opens the add form pre-filled from an agent's request: the credential section with `add=1`
|
|
2077
|
+
* plus `name`, `purpose`, `domains` (comma separated), `usage` and `request` (the request id) as query parameters.
|
|
2078
|
+
*/
|
|
2079
|
+
const credentialRequestRoute = (request) => {
|
|
2080
|
+
const query = new URLSearchParams({
|
|
2081
|
+
add: "1",
|
|
2082
|
+
name: request.name,
|
|
2083
|
+
request: request.id,
|
|
2084
|
+
usage: request.usage
|
|
2085
|
+
});
|
|
2086
|
+
if (request.purpose !== "") query.set("purpose", request.purpose);
|
|
2087
|
+
if (request.domains.length > 0) query.set("domains", request.domains.join(","));
|
|
2088
|
+
return `/settings/credentials?${query.toString()}`;
|
|
2089
|
+
};
|
|
2090
|
+
/** Secret fields of an extension configuration layer bound to a named credential, by field. */
|
|
2091
|
+
const BoundCredentialsSchema = z.record(z.string(), CredentialIdSchema);
|
|
2092
|
+
/** Binds secret fields to named credentials; `null` removes the binding and leaves the field unset. */
|
|
2093
|
+
const CredentialBindingsRequestSchema = z.record(z.string(), CredentialIdSchema.nullable());
|
|
2094
|
+
//#endregion
|
|
2095
|
+
//#region src/linked-accounts.ts
|
|
2096
|
+
/**
|
|
2097
|
+
* Linked accounts (设置 → 关联账号): third-party accounts that agents' commands act as. The library only keeps them;
|
|
2098
|
+
* an agent's commands receive an account only through its `commandAccounts` grant (命令账号授权 A1、A2). Tokens are
|
|
2099
|
+
* write-only; every view below carries metadata only.
|
|
2100
|
+
*/
|
|
2101
|
+
/** Platforms the host can link accounts of; each grant names one account per platform. */
|
|
2102
|
+
const LinkedAccountPlatformIdSchema = z.enum(["github"]);
|
|
2103
|
+
/** How an account is added: a typed token, or the token of a login the platform's local CLI holds (read once). */
|
|
2104
|
+
const LinkedAccountMethodSchema = z.enum(["token", "gh-login"]);
|
|
2105
|
+
/** A login the local `gh` holds, offered as a quick way to link a GitHub account. */
|
|
2106
|
+
const LocalGithubLoginSchema = z.object({
|
|
2107
|
+
login: z.string().trim().min(1),
|
|
2108
|
+
active: z.boolean()
|
|
2109
|
+
}).strict();
|
|
2110
|
+
const tokenFields = {
|
|
2111
|
+
method: z.literal("token"),
|
|
2112
|
+
token: z.string().trim().min(1).max(512)
|
|
2113
|
+
};
|
|
2114
|
+
const ghLoginFields = {
|
|
2115
|
+
method: z.literal("gh-login"),
|
|
2116
|
+
login: z.string().trim().min(1).max(128)
|
|
2117
|
+
};
|
|
2118
|
+
/** Where a token comes from: typed, or read once from a login of the platform's local CLI. */
|
|
2119
|
+
const LinkedAccountTokenSourceSchema = z.discriminatedUnion("method", [z.object(tokenFields).strict(), z.object(ghLoginFields).strict()]);
|
|
2120
|
+
const LinkedAccountViewSchema = z.object({
|
|
2121
|
+
id: LinkedAccountIdSchema,
|
|
2122
|
+
platform: LinkedAccountPlatformIdSchema,
|
|
2123
|
+
/** The account name on the platform, as the platform reported it when the token was verified. */
|
|
2124
|
+
login: z.string(),
|
|
2125
|
+
/** Token scopes where the platform reports them (GitHub classic tokens); `null` otherwise. */
|
|
2126
|
+
scopes: z.array(z.string()).nullable(),
|
|
2127
|
+
source: LinkedAccountMethodSchema,
|
|
2128
|
+
/** False when the stored token cannot be read any more; the account stays so it can be replaced or removed. */
|
|
2129
|
+
available: z.boolean(),
|
|
2130
|
+
/** Agents whose capabilities grant this account. */
|
|
2131
|
+
grantedAgentIds: z.array(AgentIdSchema),
|
|
2132
|
+
createdAt: z.number().int().nonnegative(),
|
|
2133
|
+
updatedAt: z.number().int().nonnegative(),
|
|
2134
|
+
lastUsedAt: z.number().int().nonnegative().nullable()
|
|
2135
|
+
}).strict();
|
|
2136
|
+
/** Links an account: the platform plus how its token is given. */
|
|
2137
|
+
const AddLinkedAccountRequestSchema = z.discriminatedUnion("method", [z.object({
|
|
2138
|
+
platform: LinkedAccountPlatformIdSchema,
|
|
2139
|
+
...tokenFields
|
|
2140
|
+
}).strict(), z.object({
|
|
2141
|
+
platform: LinkedAccountPlatformIdSchema,
|
|
2142
|
+
...ghLoginFields
|
|
2143
|
+
}).strict()]);
|
|
2144
|
+
/** A new token for an account; it must belong to the same account on the platform. */
|
|
2145
|
+
const ReplaceLinkedAccountTokenRequestSchema = LinkedAccountTokenSourceSchema;
|
|
2146
|
+
/** Removing a granted account needs `confirm`; without it the result lists the agents it is granted to. */
|
|
2147
|
+
const RemoveLinkedAccountRequestSchema = z.object({ confirm: z.boolean().default(false) }).strict();
|
|
2148
|
+
/** One recorded use: an agent's command environment carried the account. Newest 500 per account, none over 90 days. */
|
|
2149
|
+
const LinkedAccountUseSchema = z.object({
|
|
2150
|
+
at: z.number().int().nonnegative(),
|
|
2151
|
+
agentId: AgentIdSchema.nullable(),
|
|
2152
|
+
channelId: ChannelIdSchema.nullable(),
|
|
2153
|
+
consumerKind: z.enum(["command"]),
|
|
2154
|
+
consumerId: z.string()
|
|
2155
|
+
}).strict();
|
|
2156
|
+
const LinkedAccountUsesViewSchema = z.object({ uses: z.array(LinkedAccountUseSchema) }).strict();
|
|
2157
|
+
//#endregion
|
|
1815
2158
|
//#region src/runtime-compatibility.ts
|
|
1816
2159
|
const RuntimeCompatibilityDiagnosticSchema = z.object({
|
|
1817
2160
|
objectKind: z.enum([
|
|
@@ -1852,6 +2195,86 @@ const HostUpgradeSummarySchema = z.object({
|
|
|
1852
2195
|
diagnostics: z.array(RuntimeCompatibilityDiagnosticSchema)
|
|
1853
2196
|
}).strict();
|
|
1854
2197
|
//#endregion
|
|
2198
|
+
//#region src/response-timing.ts
|
|
2199
|
+
/** Bounds of the numeric response timing settings; the host rejects values outside them. */
|
|
2200
|
+
const RESPONSE_TIMING_LIMITS = {
|
|
2201
|
+
waitMaxQuietSeconds: {
|
|
2202
|
+
min: 5,
|
|
2203
|
+
max: 300
|
|
2204
|
+
},
|
|
2205
|
+
waitMaxTotalSeconds: {
|
|
2206
|
+
min: 10,
|
|
2207
|
+
max: 900
|
|
2208
|
+
},
|
|
2209
|
+
debounceSeconds: {
|
|
2210
|
+
min: 0,
|
|
2211
|
+
max: 30
|
|
2212
|
+
},
|
|
2213
|
+
debounceMaxSeconds: {
|
|
2214
|
+
min: 1,
|
|
2215
|
+
max: 120
|
|
2216
|
+
},
|
|
2217
|
+
debounceMaxMessages: {
|
|
2218
|
+
min: 1,
|
|
2219
|
+
max: 20
|
|
2220
|
+
},
|
|
2221
|
+
attentionSeconds: {
|
|
2222
|
+
min: 5,
|
|
2223
|
+
max: 600
|
|
2224
|
+
},
|
|
2225
|
+
midWakesPerMinute: {
|
|
2226
|
+
min: 1,
|
|
2227
|
+
max: 30
|
|
2228
|
+
}
|
|
2229
|
+
};
|
|
2230
|
+
const bounded = (key) => z.number().int().min(RESPONSE_TIMING_LIMITS[key].min).max(RESPONSE_TIMING_LIMITS[key].max).optional();
|
|
2231
|
+
/**
|
|
2232
|
+
* Per-binding timing of when the agent speaks (Decision 2026-10-31 响应时机与智能响应). Every field is optional: an
|
|
2233
|
+
* omitted one uses {@link RESPONSE_TIMING_DEFAULTS}. Waiting applies to every policy that answers messages; the rest
|
|
2234
|
+
* only to `smart`.
|
|
2235
|
+
*/
|
|
2236
|
+
const ResponseTimingSettingsSchema = z.object({
|
|
2237
|
+
/** The agent may end a turn with `waiting-for-more` and be woken when the speaker goes quiet. */
|
|
2238
|
+
waitEnabled: z.boolean().optional(),
|
|
2239
|
+
/** Longest quiet period one wait may ask for. */
|
|
2240
|
+
waitMaxQuietSeconds: bounded("waitMaxQuietSeconds"),
|
|
2241
|
+
/** Longest the agent may keep waiting for one person, counted from the first wait. */
|
|
2242
|
+
waitMaxTotalSeconds: bounded("waitMaxTotalSeconds"),
|
|
2243
|
+
/** Smart: wait for the speaker to stay quiet this long before a turn starts; 0 starts at once. */
|
|
2244
|
+
debounceSeconds: bounded("debounceSeconds"),
|
|
2245
|
+
/** Smart: start anyway once this long has passed since the first message. */
|
|
2246
|
+
debounceMaxSeconds: bounded("debounceMaxSeconds"),
|
|
2247
|
+
/** Smart: start anyway once this many messages from the speaker are collected. */
|
|
2248
|
+
debounceMaxMessages: bounded("debounceMaxMessages"),
|
|
2249
|
+
/** Smart: a message that contains the agent's name or an alias wakes it. */
|
|
2250
|
+
nameWake: z.boolean().optional(),
|
|
2251
|
+
/** Smart: after someone talks with the agent, their next messages wake it for a while. */
|
|
2252
|
+
attentionWake: z.boolean().optional(),
|
|
2253
|
+
attentionSeconds: bounded("attentionSeconds"),
|
|
2254
|
+
/** Smart: name and attention wakes per channel per minute; strong signals are never limited. */
|
|
2255
|
+
midWakesPerMinute: bounded("midWakesPerMinute")
|
|
2256
|
+
}).strict();
|
|
2257
|
+
const RESPONSE_TIMING_DEFAULTS = {
|
|
2258
|
+
waitEnabled: true,
|
|
2259
|
+
waitMaxQuietSeconds: 60,
|
|
2260
|
+
waitMaxTotalSeconds: 120,
|
|
2261
|
+
debounceSeconds: 3,
|
|
2262
|
+
debounceMaxSeconds: 30,
|
|
2263
|
+
debounceMaxMessages: 5,
|
|
2264
|
+
nameWake: true,
|
|
2265
|
+
attentionWake: true,
|
|
2266
|
+
attentionSeconds: 60,
|
|
2267
|
+
midWakesPerMinute: 3
|
|
2268
|
+
};
|
|
2269
|
+
/** Shortest quiet period a wait may ask for, whatever the channel allows. */
|
|
2270
|
+
const RESPONSE_WAIT_MIN_QUIET_SECONDS = 5;
|
|
2271
|
+
const resolveResponseTiming = (settings) => ({
|
|
2272
|
+
...RESPONSE_TIMING_DEFAULTS,
|
|
2273
|
+
...Object.fromEntries(Object.entries(settings ?? {}).filter(([, value]) => value !== void 0))
|
|
2274
|
+
});
|
|
2275
|
+
/** Extra names that wake the agent in smart mode; the display name always counts too. */
|
|
2276
|
+
const AgentAliasesSchema = z.array(z.string().trim().min(1).max(32)).max(16).transform((aliases) => [...new Set(aliases)]);
|
|
2277
|
+
//#endregion
|
|
1855
2278
|
//#region src/management-api.ts
|
|
1856
2279
|
const NonEmptyStringSchema$1 = z.string().trim().min(1);
|
|
1857
2280
|
const Base64UrlSchema = z.string().regex(/^[A-Za-z0-9_-]+$/u);
|
|
@@ -1935,7 +2358,7 @@ const ClientNotificationSchema = z.object({
|
|
|
1935
2358
|
title: z.string().trim().min(1).max(80),
|
|
1936
2359
|
body: z.string().trim().min(1).max(240),
|
|
1937
2360
|
occurredAt: z.number().int().nonnegative(),
|
|
1938
|
-
route: z.string().regex(/^\/(?:(?:live|channels|agents|workshop|wiring|settings|community|apps|work|connections|users|extensions)(?:\/[^?#]*)?)?$/u).optional()
|
|
2361
|
+
route: z.string().regex(/^\/(?:(?:live|channels|agents|workshop|wiring|settings|community|apps|work|connections|users|extensions)(?:\/[^?#]*)?)?(?:\?[^#]*)?$/u).optional()
|
|
1939
2362
|
}).strict();
|
|
1940
2363
|
const MANAGEMENT_PAIR_PROOF_PREFIX = "nxt-management-pair-v1";
|
|
1941
2364
|
const managementPairProofMessage = (input) => [
|
|
@@ -2182,6 +2605,14 @@ const CommunityExtensionDetailSchema = CommunityExtensionSummarySchema.extend({
|
|
|
2182
2605
|
}).nullable()
|
|
2183
2606
|
});
|
|
2184
2607
|
/**
|
|
2608
|
+
* 本机缓存的社区目录读取附带的时间:`fetchedAt` 是这份内容从社区取回的时间;`stale` 表示社区这次没能读取,
|
|
2609
|
+
* 返回的是较早的一份。
|
|
2610
|
+
*/
|
|
2611
|
+
const CommunityFreshnessSchema = z.object({
|
|
2612
|
+
fetchedAt: z.number().int().nonnegative(),
|
|
2613
|
+
stale: z.boolean()
|
|
2614
|
+
});
|
|
2615
|
+
/**
|
|
2185
2616
|
* 发布时随包提交的条目信息(作者自己写的介绍)。首次发布用于建条目;之后提供了哪项就覆盖哪项,未提供的保持不变。
|
|
2186
2617
|
*/
|
|
2187
2618
|
const COMMUNITY_LISTING_LIMITS = {
|
|
@@ -3016,16 +3447,19 @@ const ImageUnderstandingPolicyApiSchema = z.object({
|
|
|
3016
3447
|
maxTokens: z.number().int().min(256).max(8192)
|
|
3017
3448
|
}).strict()])
|
|
3018
3449
|
}).strict();
|
|
3019
|
-
const CommandAccountServiceSchema = z.enum(["github"]);
|
|
3020
3450
|
const CommandAccountUsageSchema = z.enum([
|
|
3021
3451
|
"read",
|
|
3022
3452
|
"issues",
|
|
3023
3453
|
"pull-requests",
|
|
3024
3454
|
"push"
|
|
3025
3455
|
]);
|
|
3456
|
+
/**
|
|
3457
|
+
* One linked account the agent's commands act as, at most one per platform (`service`). Grants saved before linked
|
|
3458
|
+
* accounts name the account without its `acc_` prefix; both forms resolve to the same account.
|
|
3459
|
+
*/
|
|
3026
3460
|
const CommandAccountGrantSchema = z.object({
|
|
3027
|
-
service:
|
|
3028
|
-
accountId: NonEmptyStringSchema.max(
|
|
3461
|
+
service: LinkedAccountPlatformIdSchema,
|
|
3462
|
+
accountId: NonEmptyStringSchema.max(72),
|
|
3029
3463
|
/** Told to the agent as guidance, not enforced; empty gives no hint. */
|
|
3030
3464
|
usage: z.array(CommandAccountUsageSchema).max(4).default([])
|
|
3031
3465
|
}).strict();
|
|
@@ -3043,7 +3477,7 @@ const AgentCapabilitiesSchema = z.object({
|
|
|
3043
3477
|
/** Network for commands; absent in older clients means on. */
|
|
3044
3478
|
commandNetwork: z.boolean().default(true),
|
|
3045
3479
|
communityFeedbackAuto: z.boolean().default(false),
|
|
3046
|
-
/**
|
|
3480
|
+
/** Linked accounts this agent's commands act as, one per platform; absent in older clients means none. */
|
|
3047
3481
|
commandAccounts: z.array(CommandAccountGrantSchema).max(8).default([]),
|
|
3048
3482
|
/**
|
|
3049
3483
|
* What the agent may do with extensions without the console: `manual` only develops and test-runs, `confirm` asks
|
|
@@ -3055,10 +3489,21 @@ const AgentCapabilitiesSchema = z.object({
|
|
|
3055
3489
|
"autonomous"
|
|
3056
3490
|
]).default("manual"),
|
|
3057
3491
|
/** Whose requests make the agent develop or change extensions: anyone in the channel, or administrators only. */
|
|
3058
|
-
extensionRequesters: z.enum(["everyone", "admins"]).default("everyone")
|
|
3492
|
+
extensionRequesters: z.enum(["everyone", "admins"]).default("everyone"),
|
|
3493
|
+
/**
|
|
3494
|
+
* Whose requests make the agent change extension configuration. With `everyone`, members may only have it change
|
|
3495
|
+
* ordinary fields of its own configuration; network fields, the host layer and credentials still need an
|
|
3496
|
+
* administrator.
|
|
3497
|
+
*/
|
|
3498
|
+
extensionConfigRequesters: z.enum(["everyone", "admins"]).default("admins")
|
|
3059
3499
|
}).strict();
|
|
3060
3500
|
const DynamicClientApprovalPolicySchema = z.enum(["manual", "automatic"]);
|
|
3061
|
-
const NotificationEventKeySchema = z.enum([
|
|
3501
|
+
const NotificationEventKeySchema = z.enum([
|
|
3502
|
+
"dynamic-client-approval-requested",
|
|
3503
|
+
"community-feedback-update",
|
|
3504
|
+
"credential-requested",
|
|
3505
|
+
"extension-notification"
|
|
3506
|
+
]);
|
|
3062
3507
|
const NotificationSettingsViewSchema = z.object({
|
|
3063
3508
|
revision: z.number().int().positive().optional(),
|
|
3064
3509
|
system: z.object({ enabled: z.boolean() }).strict(),
|
|
@@ -3069,7 +3514,9 @@ const NotificationSettingsViewSchema = z.object({
|
|
|
3069
3514
|
}).strict(),
|
|
3070
3515
|
events: z.object({
|
|
3071
3516
|
"dynamic-client-approval-requested": z.boolean(),
|
|
3072
|
-
"community-feedback-update": z.boolean().default(true)
|
|
3517
|
+
"community-feedback-update": z.boolean().default(true),
|
|
3518
|
+
"credential-requested": z.boolean().default(true),
|
|
3519
|
+
"extension-notification": z.boolean().default(true)
|
|
3073
3520
|
}).strict()
|
|
3074
3521
|
}).strict();
|
|
3075
3522
|
const UpdateNotificationSettingsRequestSchema = z.object({
|
|
@@ -3083,7 +3530,9 @@ const UpdateNotificationSettingsRequestSchema = z.object({
|
|
|
3083
3530
|
}).strict(),
|
|
3084
3531
|
events: z.object({
|
|
3085
3532
|
"dynamic-client-approval-requested": z.boolean(),
|
|
3086
|
-
"community-feedback-update": z.boolean().optional()
|
|
3533
|
+
"community-feedback-update": z.boolean().optional(),
|
|
3534
|
+
"credential-requested": z.boolean().optional(),
|
|
3535
|
+
"extension-notification": z.boolean().optional()
|
|
3087
3536
|
}).strict()
|
|
3088
3537
|
}).strict().refine((value) => !(value.bark.deviceKey !== void 0 && value.bark.clearDeviceKey === true), {
|
|
3089
3538
|
message: "不能同时更新并清除 Bark Device Key。",
|
|
@@ -3097,13 +3546,99 @@ const ClientNotificationFeedResponseSchema = z.object({
|
|
|
3097
3546
|
cursor: z.number().int().nonnegative(),
|
|
3098
3547
|
notifications: z.array(ClientNotificationSchema)
|
|
3099
3548
|
}).strict();
|
|
3549
|
+
/** Which model writes one kind of compaction summary: that kind's default, or a model chosen for this agent. */
|
|
3550
|
+
const AgentCompactionModelChoiceSchema = z.discriminatedUnion("mode", [z.object({ mode: z.literal("follow") }).strict(), z.object({
|
|
3551
|
+
mode: z.literal("custom"),
|
|
3552
|
+
model: AgentModelSchema
|
|
3553
|
+
}).strict()]);
|
|
3554
|
+
/**
|
|
3555
|
+
* In-session compaction follows the main model by default, so the replayed conversation hits the provider's cache;
|
|
3556
|
+
* compaction into a new session follows the host's compaction model.
|
|
3557
|
+
*/
|
|
3558
|
+
const AgentCompactionPolicySchema = z.object({
|
|
3559
|
+
inSession: AgentCompactionModelChoiceSchema,
|
|
3560
|
+
newSession: AgentCompactionModelChoiceSchema
|
|
3561
|
+
}).strict();
|
|
3562
|
+
/** The host's idle compaction threshold, summary model and wait limit. */
|
|
3563
|
+
const CompactionSettingsSchema = z.object({
|
|
3564
|
+
/** Minimum context occupancy for idle rollover; older settings inherit 50%. */
|
|
3565
|
+
idleThresholdPercent: z.number().int().min(1).max(100).default(50),
|
|
3566
|
+
newSessionModel: z.discriminatedUnion("mode", [z.object({ mode: z.literal("main") }).strict(), z.object({
|
|
3567
|
+
mode: z.literal("custom"),
|
|
3568
|
+
model: AgentModelSchema
|
|
3569
|
+
}).strict()]),
|
|
3570
|
+
/** Past this the new session starts with a fallback note instead of a summary. */
|
|
3571
|
+
timeoutSeconds: z.number().int().min(30).max(900)
|
|
3572
|
+
}).strict();
|
|
3573
|
+
const DEFAULT_COMPACTION_SETTINGS = {
|
|
3574
|
+
idleThresholdPercent: 50,
|
|
3575
|
+
newSessionModel: { mode: "main" },
|
|
3576
|
+
timeoutSeconds: 180
|
|
3577
|
+
};
|
|
3578
|
+
const FALLBACK_MODEL_LIMIT = 3;
|
|
3579
|
+
/**
|
|
3580
|
+
* Models an agent switches to, in order, when its main model has used up its quota or stays unavailable after the
|
|
3581
|
+
* usual retries. Empty leaves the main model alone, as before fallback models existed.
|
|
3582
|
+
*/
|
|
3583
|
+
const AgentFallbackModelsSchema = z.array(AgentModelSchema).max(3).refine((models) => new Set(models.map((model) => `${model.provider}\0${model.model}`)).size === models.length, "备用模型不能重复。");
|
|
3584
|
+
/** Why a channel conversation left its main model. */
|
|
3585
|
+
const ModelFallbackReasonSchema = z.enum([
|
|
3586
|
+
"quota",
|
|
3587
|
+
"rate-limit",
|
|
3588
|
+
"unavailable"
|
|
3589
|
+
]);
|
|
3590
|
+
/** How long a model that failed is passed over before conversations try it again. */
|
|
3591
|
+
const ModelFallbackSettingsSchema = z.object({
|
|
3592
|
+
/** After rate limits, server errors, timeouts or empty replies that outlasted the usual retries. */
|
|
3593
|
+
unavailableCooldownMinutes: z.number().int().min(1).max(240),
|
|
3594
|
+
/** After the quota or balance ran out. */
|
|
3595
|
+
quotaCooldownMinutes: z.number().int().min(5).max(1440)
|
|
3596
|
+
}).strict();
|
|
3597
|
+
const DEFAULT_MODEL_FALLBACK_SETTINGS = {
|
|
3598
|
+
unavailableCooldownMinutes: 10,
|
|
3599
|
+
quotaCooldownMinutes: 60
|
|
3600
|
+
};
|
|
3601
|
+
/** The name an agent passes to open a sub-conversation on its main model; no candidate may take it. */
|
|
3602
|
+
const SUB_CONVERSATION_MAIN_MODEL = "主模型";
|
|
3603
|
+
const SUB_CONVERSATION_MODEL_LIMITS = {
|
|
3604
|
+
candidates: 8,
|
|
3605
|
+
name: 20,
|
|
3606
|
+
guidance: 200
|
|
3607
|
+
};
|
|
3608
|
+
/**
|
|
3609
|
+
* Models an agent may open sub-conversations with, each named so the agent can pick it and described so it knows
|
|
3610
|
+
* when to. Without a `default`, a sub-conversation opened without naming a model follows the main model.
|
|
3611
|
+
*/
|
|
3612
|
+
const AgentSubConversationModelsSchema = z.object({
|
|
3613
|
+
candidates: z.array(z.object({
|
|
3614
|
+
name: z.string().trim().min(1, "请填写子对话模型的名称。").max(SUB_CONVERSATION_MODEL_LIMITS.name).regex(/^[^\s,,、]+(?: [^\s,,、]+)*$/u, "子对话模型的名称不能含换行、逗号或顿号。").refine((name) => name !== SUB_CONVERSATION_MAIN_MODEL, `「${SUB_CONVERSATION_MAIN_MODEL}」是保留名称。`),
|
|
3615
|
+
model: AgentModelSchema,
|
|
3616
|
+
guidance: z.string().trim().max(SUB_CONVERSATION_MODEL_LIMITS.guidance)
|
|
3617
|
+
}).strict()).max(SUB_CONVERSATION_MODEL_LIMITS.candidates),
|
|
3618
|
+
default: z.string().trim().min(1).optional()
|
|
3619
|
+
}).strict().superRefine((policy, context) => {
|
|
3620
|
+
const names = policy.candidates.map((candidate) => candidate.name);
|
|
3621
|
+
if (new Set(names).size !== names.length) context.addIssue({
|
|
3622
|
+
code: "custom",
|
|
3623
|
+
message: "子对话模型的名称不能重复。"
|
|
3624
|
+
});
|
|
3625
|
+
if (policy.default !== void 0 && !names.includes(policy.default)) context.addIssue({
|
|
3626
|
+
code: "custom",
|
|
3627
|
+
message: "默认的子对话模型不在候选里。"
|
|
3628
|
+
});
|
|
3629
|
+
});
|
|
3630
|
+
const NO_SUB_CONVERSATION_MODELS = { candidates: [] };
|
|
3100
3631
|
const AgentRevisionRequestContentSchema = z.object({
|
|
3101
3632
|
displayName: z.string().trim().min(1).max(80),
|
|
3102
3633
|
persona: z.string().max(64 * 1024).default(""),
|
|
3103
3634
|
personaDocument: PromptDocumentV1Schema.optional(),
|
|
3104
3635
|
model: AgentModelSchema,
|
|
3105
3636
|
imagePolicy: ImageUnderstandingPolicyApiSchema.optional(),
|
|
3106
|
-
dynamicClientApprovalPolicy: DynamicClientApprovalPolicySchema.optional()
|
|
3637
|
+
dynamicClientApprovalPolicy: DynamicClientApprovalPolicySchema.optional(),
|
|
3638
|
+
compaction: AgentCompactionPolicySchema.optional(),
|
|
3639
|
+
subConversationModels: AgentSubConversationModelsSchema.optional(),
|
|
3640
|
+
fallbackModels: AgentFallbackModelsSchema.optional(),
|
|
3641
|
+
aliases: AgentAliasesSchema.optional()
|
|
3107
3642
|
}).strict();
|
|
3108
3643
|
const validatePersonaDocumentProjection = (value, context) => {
|
|
3109
3644
|
if (value.personaDocument !== void 0 && promptDocumentPlainText(value.personaDocument) !== value.persona) context.addIssue({
|
|
@@ -3130,11 +3665,13 @@ const UpdateAgentCapabilitiesRequestSchema = AgentCapabilitiesSchema.partial().e
|
|
|
3130
3665
|
"confirm",
|
|
3131
3666
|
"autonomous"
|
|
3132
3667
|
]).optional(),
|
|
3133
|
-
extensionRequesters: z.enum(["everyone", "admins"]).optional()
|
|
3668
|
+
extensionRequesters: z.enum(["everyone", "admins"]).optional(),
|
|
3669
|
+
extensionConfigRequesters: z.enum(["everyone", "admins"]).optional()
|
|
3134
3670
|
}).strict().refine((value) => Object.values(value).some((entry) => entry !== void 0), "至少提供一个能力。");
|
|
3135
3671
|
const TriggerPolicySchema = z.enum([
|
|
3136
3672
|
"always",
|
|
3137
3673
|
"mentioned-or-replied",
|
|
3674
|
+
"smart",
|
|
3138
3675
|
"command",
|
|
3139
3676
|
"observe-only"
|
|
3140
3677
|
]);
|
|
@@ -3143,6 +3680,16 @@ const WorkTreeOrderSchema = z.object({
|
|
|
3143
3680
|
channelIdsByAgent: z.record(AgentIdSchema, z.array(ChannelIdSchema)),
|
|
3144
3681
|
unboundChannelIds: z.array(ChannelIdSchema)
|
|
3145
3682
|
}).strict();
|
|
3683
|
+
/** The group key of 「未接线」 in `collapsedGroupIds`; agent groups use the agent id. */
|
|
3684
|
+
const UNBOUND_CHANNEL_GROUP_ID = "unbound";
|
|
3685
|
+
/**
|
|
3686
|
+
* How the console arranges its channel list: pinned channels in their order and the groups it has collapsed. Shared
|
|
3687
|
+
* by every device signed in to the console; it never changes bindings.
|
|
3688
|
+
*/
|
|
3689
|
+
const ChannelListViewSchema = z.object({
|
|
3690
|
+
pinnedChannelIds: z.array(ChannelIdSchema).max(200),
|
|
3691
|
+
collapsedGroupIds: z.array(z.union([AgentIdSchema, z.literal(UNBOUND_CHANNEL_GROUP_ID)])).max(500)
|
|
3692
|
+
}).strict();
|
|
3146
3693
|
const SnapshotMessagePartSchema = z.discriminatedUnion("type", [
|
|
3147
3694
|
z.object({
|
|
3148
3695
|
type: z.literal("text"),
|
|
@@ -3236,11 +3783,23 @@ const HostSnapshotMessageSchema = z.object({
|
|
|
3236
3783
|
extensions: z.array(z.string()),
|
|
3237
3784
|
problems: z.array(z.string()).optional()
|
|
3238
3785
|
}).strict().optional(),
|
|
3786
|
+
/** Extensions that processed the agent's message before it was sent; `followUp` marks a message one appended. */
|
|
3787
|
+
outboundProcessing: z.object({
|
|
3788
|
+
extensions: z.array(z.string()),
|
|
3789
|
+
rewritten: z.boolean(),
|
|
3790
|
+
followUp: z.literal(true).optional()
|
|
3791
|
+
}).strict().optional(),
|
|
3239
3792
|
/** A scheduled task came due: a Host fact shown as a notice, not a member message. */
|
|
3240
3793
|
scheduledTask: z.object({
|
|
3241
3794
|
label: z.string(),
|
|
3242
3795
|
extensionName: z.string().optional(),
|
|
3243
3796
|
note: z.string().optional()
|
|
3797
|
+
}).strict().optional(),
|
|
3798
|
+
/** The agent finished waiting for someone to finish speaking: a Host fact shown as a notice. */
|
|
3799
|
+
responseWait: z.object({
|
|
3800
|
+
displayName: z.string().optional(),
|
|
3801
|
+
cause: z.enum(["quiet", "limit"]),
|
|
3802
|
+
waitedSeconds: z.number().int().nonnegative()
|
|
3244
3803
|
}).strict().optional()
|
|
3245
3804
|
}).strict();
|
|
3246
3805
|
const HostConnectionEventSchema = z.object({
|
|
@@ -3317,6 +3876,7 @@ const ChannelRuntimePhaseSchema = z.enum([
|
|
|
3317
3876
|
"idle",
|
|
3318
3877
|
"thinking",
|
|
3319
3878
|
"using-tool",
|
|
3879
|
+
"compacting",
|
|
3320
3880
|
"waiting-input",
|
|
3321
3881
|
"unavailable"
|
|
3322
3882
|
]);
|
|
@@ -3340,11 +3900,13 @@ const channelRuntimeToolFields = {
|
|
|
3340
3900
|
inputPreview: z.string().optional(),
|
|
3341
3901
|
resultPreview: z.string().optional(),
|
|
3342
3902
|
wroteToChannel: z.boolean().optional(),
|
|
3903
|
+
/** `cancelled`: an extension stopped the message before it was sent. */
|
|
3343
3904
|
deliveryState: z.enum([
|
|
3344
3905
|
"sent",
|
|
3345
3906
|
"partially-sent",
|
|
3346
3907
|
"failed",
|
|
3347
|
-
"unknown"
|
|
3908
|
+
"unknown",
|
|
3909
|
+
"cancelled"
|
|
3348
3910
|
]).optional(),
|
|
3349
3911
|
durationMs: z.number().int().nonnegative().optional()
|
|
3350
3912
|
};
|
|
@@ -3516,6 +4078,18 @@ const ChannelRuntimeProjectionSchema = z.object({
|
|
|
3516
4078
|
episodeId: EpisodeIdSchema.optional(),
|
|
3517
4079
|
phase: ChannelRuntimePhaseSchema,
|
|
3518
4080
|
summary: z.string(),
|
|
4081
|
+
/** A compaction under way: inside the current session, or before a new session opens. */
|
|
4082
|
+
compaction: z.object({
|
|
4083
|
+
kind: z.enum(["in-session", "new-session"]),
|
|
4084
|
+
startedAt: z.number().int().nonnegative()
|
|
4085
|
+
}).strict().optional(),
|
|
4086
|
+
/** The conversation runs on a fallback model; it tries the main model again at a new message after `retryMainAt`. */
|
|
4087
|
+
modelFallback: z.object({
|
|
4088
|
+
model: AgentModelSchema,
|
|
4089
|
+
reason: ModelFallbackReasonSchema,
|
|
4090
|
+
since: z.number().int().nonnegative(),
|
|
4091
|
+
retryMainAt: z.number().int().nonnegative()
|
|
4092
|
+
}).strict().optional(),
|
|
3519
4093
|
pendingInjectCount: z.number().int().nonnegative(),
|
|
3520
4094
|
occupancy: ChannelRuntimeOccupancySchema.optional(),
|
|
3521
4095
|
cache: ChannelRuntimeCacheSchema.optional(),
|
|
@@ -3667,6 +4241,8 @@ const SubConversationSchema = z.object({
|
|
|
3667
4241
|
/** What it handed back to the channel's conversation when it ended. */
|
|
3668
4242
|
summary: z.string().max(4e3).optional(),
|
|
3669
4243
|
authoringTaskId: AuthoringTaskIdSchema.optional(),
|
|
4244
|
+
/** The model a model-driven sub-conversation talks in; absent for scripts and ones opened before it was kept. */
|
|
4245
|
+
model: AgentModelSchema.optional(),
|
|
3670
4246
|
createdAt: z.number().int().nonnegative(),
|
|
3671
4247
|
closedAt: z.number().int().nonnegative().optional()
|
|
3672
4248
|
}).strict();
|
|
@@ -3848,7 +4424,8 @@ const AttentionItemSchema = z.object({
|
|
|
3848
4424
|
"agent-model-unavailable",
|
|
3849
4425
|
"agent-vision-unavailable",
|
|
3850
4426
|
"logs-unavailable",
|
|
3851
|
-
"community-feedback"
|
|
4427
|
+
"community-feedback",
|
|
4428
|
+
"extension-update"
|
|
3852
4429
|
]),
|
|
3853
4430
|
severity: z.enum([
|
|
3854
4431
|
"critical",
|
|
@@ -3863,7 +4440,8 @@ const AttentionItemSchema = z.object({
|
|
|
3863
4440
|
"connection",
|
|
3864
4441
|
"agent",
|
|
3865
4442
|
"logs",
|
|
3866
|
-
"community-feedback"
|
|
4443
|
+
"community-feedback",
|
|
4444
|
+
"extension-update"
|
|
3867
4445
|
]),
|
|
3868
4446
|
id: NonEmptyStringSchema
|
|
3869
4447
|
}).strict(),
|
|
@@ -3884,7 +4462,8 @@ const AttentionItemSchema = z.object({
|
|
|
3884
4462
|
"open-connection",
|
|
3885
4463
|
"open-agent",
|
|
3886
4464
|
"open-logs",
|
|
3887
|
-
"open-community-feedback"
|
|
4465
|
+
"open-community-feedback",
|
|
4466
|
+
"open-extension-updates"
|
|
3888
4467
|
]),
|
|
3889
4468
|
label: z.string().min(1).max(40)
|
|
3890
4469
|
}).strict(),
|
|
@@ -4016,39 +4595,31 @@ const CodeRunAvailabilitySchema = z.object({
|
|
|
4016
4595
|
const GithubCliAvailabilitySchema = CodeRunAvailabilitySchema;
|
|
4017
4596
|
/** The optional headless Chromium that loads and checks creation candidates when no page is open. */
|
|
4018
4597
|
const VerificationBrowserAvailabilitySchema = CodeRunAvailabilitySchema;
|
|
4019
|
-
/**
|
|
4020
|
-
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
service: CommandAccountServiceSchema,
|
|
4026
|
-
/** The account name on the service. */
|
|
4027
|
-
login: NonEmptyStringSchema,
|
|
4028
|
-
source: z.enum(["token", "gh-login"]),
|
|
4029
|
-
/** Token scopes where the service reports them (classic tokens); absent for fine-grained tokens. */
|
|
4030
|
-
scopes: z.array(z.string()).optional(),
|
|
4031
|
-
createdAt: z.number().int().nonnegative(),
|
|
4032
|
-
usedBy: z.array(AgentIdSchema)
|
|
4033
|
-
}).strict();
|
|
4034
|
-
/** A login the local `gh` holds, offered as a quick way to add an account. */
|
|
4035
|
-
const LocalGithubLoginSchema = z.object({
|
|
4036
|
-
login: NonEmptyStringSchema,
|
|
4037
|
-
active: z.boolean()
|
|
4598
|
+
/** A platform's own program that linked accounts work through, such as the GitHub CLI. */
|
|
4599
|
+
const LinkedAccountPlatformToolSchema = z.object({
|
|
4600
|
+
/** The runtime download routes it is managed by (`downloadGithubCli`, `removeGithubCli`). */
|
|
4601
|
+
id: z.enum(["github-cli"]),
|
|
4602
|
+
name: z.string(),
|
|
4603
|
+
availability: GithubCliAvailabilitySchema
|
|
4038
4604
|
}).strict();
|
|
4039
|
-
|
|
4040
|
-
|
|
4605
|
+
/** 设置 → 关联账号: every platform the host supports, with its accounts and tools. */
|
|
4606
|
+
const LinkedAccountsViewSchema = z.object({
|
|
4607
|
+
platforms: z.array(z.object({
|
|
4608
|
+
id: LinkedAccountPlatformIdSchema,
|
|
4609
|
+
name: z.string(),
|
|
4610
|
+
addMethods: z.array(LinkedAccountMethodSchema),
|
|
4611
|
+
tool: LinkedAccountPlatformToolSchema.optional(),
|
|
4612
|
+
accounts: z.array(LinkedAccountViewSchema)
|
|
4613
|
+
}).strict()),
|
|
4041
4614
|
/** Logins found in the local GitHub CLI; empty when it is missing or not logged in. */
|
|
4042
|
-
|
|
4615
|
+
localGithubLogins: z.array(LocalGithubLoginSchema)
|
|
4043
4616
|
}).strict();
|
|
4044
|
-
const
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
token: NonEmptyStringSchema.max(512)
|
|
4617
|
+
const RemoveLinkedAccountResultSchema = z.discriminatedUnion("removed", [z.object({
|
|
4618
|
+
removed: z.literal(true),
|
|
4619
|
+
view: LinkedAccountsViewSchema
|
|
4048
4620
|
}).strict(), z.object({
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
login: NonEmptyStringSchema.max(128)
|
|
4621
|
+
removed: z.literal(false),
|
|
4622
|
+
grantedAgentIds: z.array(AgentIdSchema)
|
|
4052
4623
|
}).strict()]);
|
|
4053
4624
|
/** An extension action an agent asked an administrator to confirm, or one it took on its own. */
|
|
4054
4625
|
const ExtensionRequestSchema = z.object({
|
|
@@ -4093,7 +4664,15 @@ const HostSnapshotSchema = z.object({
|
|
|
4093
4664
|
id: NonEmptyStringSchema,
|
|
4094
4665
|
name: z.string(),
|
|
4095
4666
|
description: z.string().optional(),
|
|
4096
|
-
inputModalities: z.array(z.string()).optional()
|
|
4667
|
+
inputModalities: z.array(z.string()).optional(),
|
|
4668
|
+
/** Selectable thinking levels, least to most; absent when the model offers no choice. */
|
|
4669
|
+
reasoning: z.object({
|
|
4670
|
+
efforts: z.array(z.object({
|
|
4671
|
+
id: NonEmptyStringSchema,
|
|
4672
|
+
name: z.string()
|
|
4673
|
+
}).strict()).min(1),
|
|
4674
|
+
defaultEffort: NonEmptyStringSchema.optional()
|
|
4675
|
+
}).strict().optional()
|
|
4097
4676
|
}).strict()),
|
|
4098
4677
|
capabilityAvailability: z.object({
|
|
4099
4678
|
subagents: z.object({ available: z.boolean() }).strict(),
|
|
@@ -4121,8 +4700,6 @@ const HostSnapshotSchema = z.object({
|
|
|
4121
4700
|
}).strict(),
|
|
4122
4701
|
connectionAdapters: z.array(AdapterConnectionDescriptorSchema),
|
|
4123
4702
|
notificationSettings: NotificationSettingsViewSchema,
|
|
4124
|
-
/** Optional in older hosts, which have no account library. */
|
|
4125
|
-
commandAccounts: z.array(CommandAccountSchema).optional(),
|
|
4126
4703
|
agents: z.array(z.object({
|
|
4127
4704
|
id: AgentIdSchema,
|
|
4128
4705
|
displayName: z.string(),
|
|
@@ -4132,6 +4709,19 @@ const HostSnapshotSchema = z.object({
|
|
|
4132
4709
|
capabilities: AgentCapabilitiesSchema,
|
|
4133
4710
|
imagePolicy: ImageUnderstandingPolicyApiSchema,
|
|
4134
4711
|
dynamicClientApprovalPolicy: DynamicClientApprovalPolicySchema,
|
|
4712
|
+
/** Optional for older hosts, whose agents always follow both defaults. */
|
|
4713
|
+
compaction: AgentCompactionPolicySchema.optional(),
|
|
4714
|
+
/** Optional for older hosts, whose agents offer no candidates. */
|
|
4715
|
+
subConversationModels: AgentSubConversationModelsSchema.optional(),
|
|
4716
|
+
/** Optional for older hosts, whose agents have no fallback models. */
|
|
4717
|
+
fallbackModels: AgentFallbackModelsSchema.optional(),
|
|
4718
|
+
/** Optional for older hosts, whose agents have no aliases. */
|
|
4719
|
+
aliases: AgentAliasesSchema.optional(),
|
|
4720
|
+
/**
|
|
4721
|
+
* Enabled extensions that process the agent's messages before they are sent, in the order they run. Absent
|
|
4722
|
+
* when none does.
|
|
4723
|
+
*/
|
|
4724
|
+
outboundOrder: z.array(ExtensionIdSchema).optional(),
|
|
4135
4725
|
imageDiagnostics: z.object({
|
|
4136
4726
|
route: z.object({
|
|
4137
4727
|
mode: z.enum([
|
|
@@ -4200,6 +4790,8 @@ const HostSnapshotSchema = z.object({
|
|
|
4200
4790
|
/** Absent means `observe`. */
|
|
4201
4791
|
localAgentMessages: z.enum(["observe", "trigger"]).optional(),
|
|
4202
4792
|
activityTriggerOverrides: ActivityTriggerOverridesSchema.default({}),
|
|
4793
|
+
/** Absent on older hosts; missing keys use the defaults. */
|
|
4794
|
+
responseTiming: ResponseTimingSettingsSchema.optional(),
|
|
4203
4795
|
boundAt: z.number().int().safe().nonnegative()
|
|
4204
4796
|
}).strict())
|
|
4205
4797
|
}).strict()),
|
|
@@ -4208,6 +4800,10 @@ const HostSnapshotSchema = z.object({
|
|
|
4208
4800
|
channelIdsByAgent: {},
|
|
4209
4801
|
unboundChannelIds: []
|
|
4210
4802
|
}),
|
|
4803
|
+
channelListView: ChannelListViewSchema.default({
|
|
4804
|
+
pinnedChannelIds: [],
|
|
4805
|
+
collapsedGroupIds: []
|
|
4806
|
+
}),
|
|
4211
4807
|
messages: z.array(HostSnapshotMessageSchema),
|
|
4212
4808
|
connections: z.array(z.object({
|
|
4213
4809
|
id: ConnectionIdSchema,
|
|
@@ -4215,6 +4811,7 @@ const HostSnapshotSchema = z.object({
|
|
|
4215
4811
|
alias: ConnectionAliasOutputSchema.optional(),
|
|
4216
4812
|
activityTriggerDefaults: z.array(AdapterActivityKeySchema).default([]),
|
|
4217
4813
|
configuredSecrets: z.array(z.string()).optional(),
|
|
4814
|
+
boundCredentials: BoundCredentialsSchema.optional(),
|
|
4218
4815
|
status: z.object({
|
|
4219
4816
|
state: z.enum([
|
|
4220
4817
|
"stopped",
|
|
@@ -4378,6 +4975,7 @@ const HostSnapshotSchema = z.object({
|
|
|
4378
4975
|
/** Secret fields are removed; `configuredSecrets` lists those the Host stores. */
|
|
4379
4976
|
config: JsonValueSchema,
|
|
4380
4977
|
configuredSecrets: z.array(z.string()).optional(),
|
|
4978
|
+
boundCredentials: BoundCredentialsSchema.optional(),
|
|
4381
4979
|
activatedAt: z.number().int().safe().nonnegative(),
|
|
4382
4980
|
runtime: z.object({
|
|
4383
4981
|
status: z.enum([
|
|
@@ -4411,6 +5009,7 @@ const HostSnapshotSchema = z.object({
|
|
|
4411
5009
|
/** Secret fields are removed; `configuredSecrets` lists those the Host stores. */
|
|
4412
5010
|
config: JsonValueSchema.default({}),
|
|
4413
5011
|
configuredSecrets: z.array(z.string()).optional(),
|
|
5012
|
+
boundCredentials: BoundCredentialsSchema.optional(),
|
|
4414
5013
|
runtime: z.object({
|
|
4415
5014
|
status: z.enum([
|
|
4416
5015
|
"active",
|
|
@@ -4603,6 +5202,8 @@ const DshPluginCatalogEntrySchema = z.object({
|
|
|
4603
5202
|
"tarball",
|
|
4604
5203
|
"imported"
|
|
4605
5204
|
]).optional(),
|
|
5205
|
+
/** Published by the DSH maintainers on npm for the DSH release this build runs. */
|
|
5206
|
+
official: z.boolean().optional(),
|
|
4606
5207
|
installedAt: z.number().int().safe().nonnegative().optional(),
|
|
4607
5208
|
clientUiDetected: z.boolean().optional(),
|
|
4608
5209
|
hostUi: DshNxtHostUiSchema.optional(),
|
|
@@ -4614,6 +5215,8 @@ const DshPluginCatalogEntrySchema = z.object({
|
|
|
4614
5215
|
suggestedScope: z.enum(["host", "agent"]),
|
|
4615
5216
|
selectedScope: z.enum(["host", "agent"]).optional(),
|
|
4616
5217
|
config: JsonValueSchema,
|
|
5218
|
+
/** Host services this official entry declared and received; known once it has loaded. */
|
|
5219
|
+
grantedServices: z.array(NonEmptyStringSchema).optional(),
|
|
4617
5220
|
activations: z.array(z.object({
|
|
4618
5221
|
targetKey: NonEmptyStringSchema,
|
|
4619
5222
|
target: z.enum(["host", "agent"]),
|
|
@@ -4622,18 +5225,24 @@ const DshPluginCatalogEntrySchema = z.object({
|
|
|
4622
5225
|
diagnostic: z.object({
|
|
4623
5226
|
status: z.enum([
|
|
4624
5227
|
"active",
|
|
5228
|
+
"pending",
|
|
4625
5229
|
"load-failed",
|
|
4626
5230
|
"restore-failed",
|
|
4627
5231
|
"dispose-failed"
|
|
4628
5232
|
]),
|
|
4629
5233
|
phase: z.enum([
|
|
4630
5234
|
"import",
|
|
5235
|
+
"dependency",
|
|
4631
5236
|
"apply",
|
|
4632
5237
|
"update",
|
|
4633
5238
|
"dispose",
|
|
4634
5239
|
"restore"
|
|
4635
5240
|
]),
|
|
4636
5241
|
message: z.string().optional(),
|
|
5242
|
+
/** Services a pending entry still waits for. */
|
|
5243
|
+
waitingFor: z.array(NonEmptyStringSchema).optional(),
|
|
5244
|
+
/** The waited-for services this entry can never receive, since only official plugins get them. */
|
|
5245
|
+
restrictedServices: z.array(NonEmptyStringSchema).optional(),
|
|
4637
5246
|
observedAt: z.number().int().safe().nonnegative()
|
|
4638
5247
|
}).optional()
|
|
4639
5248
|
}).strict())
|
|
@@ -4780,19 +5389,23 @@ const HostSseEventSchema = z.discriminatedUnion("event", [
|
|
|
4780
5389
|
]);
|
|
4781
5390
|
/** Request content a model accepts; `image` enables native vision for agents using the model. */
|
|
4782
5391
|
const LlmModelInputModalitiesSchema = z.array(z.enum(["text", "image"])).min(1);
|
|
5392
|
+
/** Thinking levels a model offers, least to most; the ids are the adapter's own. */
|
|
5393
|
+
const LlmModelReasoningEffortsSchema = z.array(NonEmptyStringSchema).min(1);
|
|
4783
5394
|
const LlmProviderModelSchema = z.object({
|
|
4784
5395
|
id: NonEmptyStringSchema,
|
|
4785
5396
|
name: NonEmptyStringSchema,
|
|
4786
5397
|
contextWindow: z.number().int().positive().optional(),
|
|
4787
5398
|
maxTokens: z.number().int().positive().optional(),
|
|
4788
|
-
inputModalities: LlmModelInputModalitiesSchema.optional()
|
|
5399
|
+
inputModalities: LlmModelInputModalitiesSchema.optional(),
|
|
5400
|
+
reasoningEfforts: LlmModelReasoningEffortsSchema.optional()
|
|
4789
5401
|
}).strict();
|
|
4790
5402
|
const LlmDiscoveredModelSchema = z.object({
|
|
4791
5403
|
id: NonEmptyStringSchema,
|
|
4792
5404
|
name: NonEmptyStringSchema.optional(),
|
|
4793
5405
|
contextWindow: z.number().int().positive().optional(),
|
|
4794
5406
|
maxTokens: z.number().int().positive().optional(),
|
|
4795
|
-
inputModalities: LlmModelInputModalitiesSchema.optional()
|
|
5407
|
+
inputModalities: LlmModelInputModalitiesSchema.optional(),
|
|
5408
|
+
reasoningEfforts: LlmModelReasoningEffortsSchema.optional()
|
|
4796
5409
|
}).strict();
|
|
4797
5410
|
const LlmProviderCredentialSchema = z.object({
|
|
4798
5411
|
configured: z.boolean(),
|
|
@@ -4830,7 +5443,62 @@ const LlmProviderViewSchema = z.object({
|
|
|
4830
5443
|
/** The provider's adapter can list the models its endpoint offers. */
|
|
4831
5444
|
discoverable: z.boolean(),
|
|
4832
5445
|
/** `null` when the current configuration was never tested; absent from hosts that do not record tests. */
|
|
4833
|
-
lastTest: LlmProviderTestResultSchema.nullable().optional()
|
|
5446
|
+
lastTest: LlmProviderTestResultSchema.nullable().optional(),
|
|
5447
|
+
/** Present when the provider can sign in with a subscription account instead of an API key. */
|
|
5448
|
+
subscription: z.object({
|
|
5449
|
+
label: NonEmptyStringSchema,
|
|
5450
|
+
/** The route uses the signed-in account rather than an API key. */
|
|
5451
|
+
active: z.boolean(),
|
|
5452
|
+
accountLabel: z.string().nullable()
|
|
5453
|
+
}).strict().optional()
|
|
5454
|
+
}).strict();
|
|
5455
|
+
const SubscriptionStatusSchema = z.object({
|
|
5456
|
+
provider: NonEmptyStringSchema,
|
|
5457
|
+
label: NonEmptyStringSchema,
|
|
5458
|
+
usageUrl: z.url(),
|
|
5459
|
+
available: z.boolean(),
|
|
5460
|
+
mode: z.enum([
|
|
5461
|
+
"unconfigured",
|
|
5462
|
+
"api-key",
|
|
5463
|
+
"subscription"
|
|
5464
|
+
]),
|
|
5465
|
+
activeAccountId: z.string().nullable(),
|
|
5466
|
+
accounts: z.array(z.object({
|
|
5467
|
+
id: NonEmptyStringSchema,
|
|
5468
|
+
label: NonEmptyStringSchema,
|
|
5469
|
+
email: z.string().nullable(),
|
|
5470
|
+
createdAt: z.number().int().nonnegative()
|
|
5471
|
+
}).strict()),
|
|
5472
|
+
login: z.object({
|
|
5473
|
+
id: NonEmptyStringSchema,
|
|
5474
|
+
status: z.enum([
|
|
5475
|
+
"running",
|
|
5476
|
+
"authorized",
|
|
5477
|
+
"cancelled",
|
|
5478
|
+
"failed"
|
|
5479
|
+
]),
|
|
5480
|
+
notices: z.array(z.object({
|
|
5481
|
+
message: z.string(),
|
|
5482
|
+
url: z.string().optional(),
|
|
5483
|
+
code: z.string().optional()
|
|
5484
|
+
}).strict()),
|
|
5485
|
+
prompt: z.object({
|
|
5486
|
+
id: NonEmptyStringSchema,
|
|
5487
|
+
kind: z.enum([
|
|
5488
|
+
"text",
|
|
5489
|
+
"secret",
|
|
5490
|
+
"select"
|
|
5491
|
+
]),
|
|
5492
|
+
message: z.string(),
|
|
5493
|
+
placeholder: z.string().optional(),
|
|
5494
|
+
options: z.array(z.object({
|
|
5495
|
+
id: z.string(),
|
|
5496
|
+
label: z.string(),
|
|
5497
|
+
description: z.string().optional()
|
|
5498
|
+
}).strict()).optional()
|
|
5499
|
+
}).strict().nullable(),
|
|
5500
|
+
error: z.string().nullable()
|
|
5501
|
+
}).strict().nullable()
|
|
4834
5502
|
}).strict();
|
|
4835
5503
|
const LlmProviderSettingsSchema = z.object({
|
|
4836
5504
|
writable: z.boolean(),
|
|
@@ -4883,6 +5551,8 @@ const defineContract = (contract) => ({
|
|
|
4883
5551
|
parseError: (input) => contract.error.parse(input)
|
|
4884
5552
|
});
|
|
4885
5553
|
const agentParam = z.object({ agentId: AgentIdSchema }).strict();
|
|
5554
|
+
const credentialParam = z.object({ credentialId: CredentialIdSchema }).strict();
|
|
5555
|
+
const linkedAccountParam = z.object({ accountId: LinkedAccountIdSchema }).strict();
|
|
4886
5556
|
const agentRevisionParam = z.object({
|
|
4887
5557
|
agentId: AgentIdSchema,
|
|
4888
5558
|
revisionId: AgentRevisionIdSchema
|
|
@@ -4893,7 +5563,11 @@ const AgentRevisionChangedFieldSchema = z.enum([
|
|
|
4893
5563
|
"model",
|
|
4894
5564
|
"capabilities",
|
|
4895
5565
|
"imagePolicy",
|
|
4896
|
-
"approvalPolicy"
|
|
5566
|
+
"approvalPolicy",
|
|
5567
|
+
"compaction",
|
|
5568
|
+
"subConversationModels",
|
|
5569
|
+
"fallbackModels",
|
|
5570
|
+
"aliases"
|
|
4897
5571
|
]);
|
|
4898
5572
|
const AgentRevisionHistorySchema = z.object({
|
|
4899
5573
|
agentId: AgentIdSchema,
|
|
@@ -5039,6 +5713,38 @@ const AdministratorSchema = z.object({
|
|
|
5039
5713
|
addedAt: z.number().int().nonnegative()
|
|
5040
5714
|
}).strict();
|
|
5041
5715
|
const extensionParam = z.object({ extensionId: ExtensionIdSchema }).strict();
|
|
5716
|
+
const ExtensionConfigVersionSourceSchema = z.enum([
|
|
5717
|
+
"console",
|
|
5718
|
+
"agent",
|
|
5719
|
+
"chat-admin",
|
|
5720
|
+
"revert",
|
|
5721
|
+
"auto-revert"
|
|
5722
|
+
]);
|
|
5723
|
+
/**
|
|
5724
|
+
* One saved state of an extension's host configuration or of one agent's configuration. Versions are numbered per
|
|
5725
|
+
* extension, layer and agent; reverting writes an old one again as a new version. Secret fields only show whether
|
|
5726
|
+
* they were set and which named credential they were bound to.
|
|
5727
|
+
*/
|
|
5728
|
+
const ExtensionConfigVersionSchema = z.object({
|
|
5729
|
+
id: z.number().int().positive(),
|
|
5730
|
+
extensionId: ExtensionIdSchema,
|
|
5731
|
+
layer: z.enum(["host", "agent"]),
|
|
5732
|
+
agentId: AgentIdSchema.nullable(),
|
|
5733
|
+
version: z.number().int().positive(),
|
|
5734
|
+
config: JsonValueSchema,
|
|
5735
|
+
configuredSecrets: z.array(z.string()).optional(),
|
|
5736
|
+
boundCredentials: z.record(z.string(), CredentialIdSchema).optional(),
|
|
5737
|
+
source: ExtensionConfigVersionSourceSchema,
|
|
5738
|
+
actorAgentId: AgentIdSchema.nullable(),
|
|
5739
|
+
requesterMemberId: z.string().nullable(),
|
|
5740
|
+
reason: z.string().nullable(),
|
|
5741
|
+
createdAt: z.number().int().nonnegative()
|
|
5742
|
+
}).strict();
|
|
5743
|
+
const extensionConfigVersionParam = z.object({
|
|
5744
|
+
extensionId: ExtensionIdSchema,
|
|
5745
|
+
/** Decimal text of the version id; the path builder only takes strings. */
|
|
5746
|
+
versionId: z.string().regex(/^[1-9]\d{0,15}$/u)
|
|
5747
|
+
}).strict();
|
|
5042
5748
|
const dshPluginPackageParam = z.object({ packageId: DshPluginPackageIdSchema }).strict();
|
|
5043
5749
|
const dshPluginEntryParam = z.object({ entryId: DshPluginEntryIdSchema }).strict();
|
|
5044
5750
|
const extensionRevisionParam = z.object({
|
|
@@ -5281,13 +5987,25 @@ const HostApiContracts = {
|
|
|
5281
5987
|
response: z.object({
|
|
5282
5988
|
task: AuthoringTaskSummarySchema,
|
|
5283
5989
|
attempts: z.array(AuthoringAttemptSummarySchema),
|
|
5284
|
-
/**
|
|
5285
|
-
|
|
5990
|
+
/**
|
|
5991
|
+
* Test configuration of this task's dynamic runs: fields of the latest candidate the user can type, which
|
|
5992
|
+
* credentials are set, the user's values and the values the agent provided.
|
|
5993
|
+
*/
|
|
5994
|
+
testConfig: z.object({
|
|
5286
5995
|
fields: z.array(z.object({
|
|
5287
5996
|
key: z.string(),
|
|
5288
|
-
title: z.string()
|
|
5997
|
+
title: z.string(),
|
|
5998
|
+
kind: z.enum([
|
|
5999
|
+
"secret",
|
|
6000
|
+
"string",
|
|
6001
|
+
"number"
|
|
6002
|
+
])
|
|
5289
6003
|
}).strict()),
|
|
5290
|
-
configured: z.array(z.string())
|
|
6004
|
+
configured: z.array(z.string()),
|
|
6005
|
+
values: z.record(z.string(), z.union([z.string(), z.number()])),
|
|
6006
|
+
agentValues: z.record(z.string(), JsonValueSchema),
|
|
6007
|
+
/** Secret fields bound to a named credential, by the user or else by the agent. */
|
|
6008
|
+
boundCredentials: BoundCredentialsSchema.optional()
|
|
5291
6009
|
}).strict().optional(),
|
|
5292
6010
|
events: z.array(z.object({
|
|
5293
6011
|
sequence: z.number().int().positive(),
|
|
@@ -5334,12 +6052,22 @@ const HostApiContracts = {
|
|
|
5334
6052
|
response: AuthoringTaskSummarySchema,
|
|
5335
6053
|
error: HostApiErrorSchema
|
|
5336
6054
|
}),
|
|
5337
|
-
|
|
6055
|
+
setAuthoringTestConfig: defineContract({
|
|
5338
6056
|
method: "PUT",
|
|
5339
6057
|
path: "/api/authoring/tasks/:taskId/test-secrets",
|
|
5340
6058
|
params: authoringTaskParam,
|
|
5341
|
-
request: z.object({
|
|
5342
|
-
|
|
6059
|
+
request: z.object({
|
|
6060
|
+
secrets: z.record(z.string(), z.string().max(8192)),
|
|
6061
|
+
/** Text and number values; an empty string goes back to the agent's value or the default. */
|
|
6062
|
+
values: z.record(z.string(), z.union([z.string().max(8192), z.number()])).optional(),
|
|
6063
|
+
/** Secret fields to bind to named credentials instead of a typed value; `null` leaves the field unset. */
|
|
6064
|
+
credentialBindings: CredentialBindingsRequestSchema.optional()
|
|
6065
|
+
}).strict(),
|
|
6066
|
+
response: z.object({
|
|
6067
|
+
configured: z.array(z.string()),
|
|
6068
|
+
values: z.record(z.string(), z.union([z.string(), z.number()])),
|
|
6069
|
+
boundCredentials: BoundCredentialsSchema.optional()
|
|
6070
|
+
}).strict(),
|
|
5343
6071
|
error: HostApiErrorSchema
|
|
5344
6072
|
}),
|
|
5345
6073
|
deleteAuthoringTask: defineContract({
|
|
@@ -5544,7 +6272,9 @@ const HostApiContracts = {
|
|
|
5544
6272
|
processingFeedback: z.enum(["auto", "off"]).optional(),
|
|
5545
6273
|
/** Messages from another local agent's account: `observe` keeps them as context unless they @ this agent. */
|
|
5546
6274
|
localAgentMessages: z.enum(["observe", "trigger"]).optional(),
|
|
5547
|
-
activityTriggerOverrides: ActivityTriggerOverridesSchema.optional()
|
|
6275
|
+
activityTriggerOverrides: ActivityTriggerOverridesSchema.optional(),
|
|
6276
|
+
/** Omitted keeps the binding's current timing; `{}` resets every field to its default. */
|
|
6277
|
+
responseTiming: ResponseTimingSettingsSchema.optional()
|
|
5548
6278
|
}).strict(),
|
|
5549
6279
|
response: z.object({
|
|
5550
6280
|
channelId: ChannelIdSchema,
|
|
@@ -5554,6 +6284,7 @@ const HostApiContracts = {
|
|
|
5554
6284
|
processingFeedback: z.enum(["auto", "off"]).default("auto"),
|
|
5555
6285
|
localAgentMessages: z.enum(["observe", "trigger"]).optional(),
|
|
5556
6286
|
activityTriggerOverrides: ActivityTriggerOverridesSchema.default({}),
|
|
6287
|
+
responseTiming: ResponseTimingSettingsSchema.optional(),
|
|
5557
6288
|
boundAt: z.number().int().safe().nonnegative()
|
|
5558
6289
|
}).strict(),
|
|
5559
6290
|
error: HostApiErrorSchema
|
|
@@ -5579,6 +6310,23 @@ const HostApiContracts = {
|
|
|
5579
6310
|
response: WorkTreeOrderSchema,
|
|
5580
6311
|
error: HostApiErrorSchema
|
|
5581
6312
|
}),
|
|
6313
|
+
getChannelListView: defineContract({
|
|
6314
|
+
method: "GET",
|
|
6315
|
+
path: "/api/channel-list-view",
|
|
6316
|
+
params: EmptyParamsSchema,
|
|
6317
|
+
request: NoRequestBodySchema,
|
|
6318
|
+
response: ChannelListViewSchema,
|
|
6319
|
+
error: HostApiErrorSchema
|
|
6320
|
+
}),
|
|
6321
|
+
updateChannelListView: defineContract({
|
|
6322
|
+
invalidatesSnapshot: true,
|
|
6323
|
+
method: "PUT",
|
|
6324
|
+
path: "/api/channel-list-view",
|
|
6325
|
+
params: EmptyParamsSchema,
|
|
6326
|
+
request: ChannelListViewSchema,
|
|
6327
|
+
response: ChannelListViewSchema,
|
|
6328
|
+
error: HostApiErrorSchema
|
|
6329
|
+
}),
|
|
5582
6330
|
listChannelMessages: defineContract({
|
|
5583
6331
|
method: "GET",
|
|
5584
6332
|
path: "/api/channels/:channelId/messages",
|
|
@@ -5824,6 +6572,39 @@ const HostApiContracts = {
|
|
|
5824
6572
|
response: MessagePacingSettingsSchema,
|
|
5825
6573
|
error: HostApiErrorSchema
|
|
5826
6574
|
}),
|
|
6575
|
+
getCompactionSettings: defineContract({
|
|
6576
|
+
method: "GET",
|
|
6577
|
+
path: "/api/settings/compaction",
|
|
6578
|
+
params: EmptyParamsSchema,
|
|
6579
|
+
request: NoRequestBodySchema,
|
|
6580
|
+
response: CompactionSettingsSchema,
|
|
6581
|
+
error: HostApiErrorSchema
|
|
6582
|
+
}),
|
|
6583
|
+
updateCompactionSettings: defineContract({
|
|
6584
|
+
invalidatesSnapshot: true,
|
|
6585
|
+
method: "PUT",
|
|
6586
|
+
path: "/api/settings/compaction",
|
|
6587
|
+
params: EmptyParamsSchema,
|
|
6588
|
+
request: CompactionSettingsSchema,
|
|
6589
|
+
response: CompactionSettingsSchema,
|
|
6590
|
+
error: HostApiErrorSchema
|
|
6591
|
+
}),
|
|
6592
|
+
getModelFallbackSettings: defineContract({
|
|
6593
|
+
method: "GET",
|
|
6594
|
+
path: "/api/settings/model-fallback",
|
|
6595
|
+
params: EmptyParamsSchema,
|
|
6596
|
+
request: NoRequestBodySchema,
|
|
6597
|
+
response: ModelFallbackSettingsSchema,
|
|
6598
|
+
error: HostApiErrorSchema
|
|
6599
|
+
}),
|
|
6600
|
+
updateModelFallbackSettings: defineContract({
|
|
6601
|
+
method: "PUT",
|
|
6602
|
+
path: "/api/settings/model-fallback",
|
|
6603
|
+
params: EmptyParamsSchema,
|
|
6604
|
+
request: ModelFallbackSettingsSchema,
|
|
6605
|
+
response: ModelFallbackSettingsSchema,
|
|
6606
|
+
error: HostApiErrorSchema
|
|
6607
|
+
}),
|
|
5827
6608
|
getUpgradeBackupSettings: defineContract({
|
|
5828
6609
|
method: "GET",
|
|
5829
6610
|
path: "/api/settings/upgrade-backup",
|
|
@@ -5929,39 +6710,116 @@ const HostApiContracts = {
|
|
|
5929
6710
|
response: VerificationBrowserAvailabilitySchema,
|
|
5930
6711
|
error: HostApiErrorSchema
|
|
5931
6712
|
}),
|
|
5932
|
-
|
|
6713
|
+
getLinkedAccounts: defineContract({
|
|
6714
|
+
method: "GET",
|
|
6715
|
+
path: "/api/settings/linked-accounts",
|
|
6716
|
+
params: EmptyParamsSchema,
|
|
6717
|
+
request: NoRequestBodySchema,
|
|
6718
|
+
response: LinkedAccountsViewSchema,
|
|
6719
|
+
error: HostApiErrorSchema
|
|
6720
|
+
}),
|
|
6721
|
+
addLinkedAccount: defineContract({
|
|
6722
|
+
invalidatesSnapshot: true,
|
|
6723
|
+
method: "POST",
|
|
6724
|
+
path: "/api/settings/linked-accounts",
|
|
6725
|
+
params: EmptyParamsSchema,
|
|
6726
|
+
request: AddLinkedAccountRequestSchema,
|
|
6727
|
+
response: LinkedAccountsViewSchema,
|
|
6728
|
+
error: HostApiErrorSchema
|
|
6729
|
+
}),
|
|
6730
|
+
replaceLinkedAccountToken: defineContract({
|
|
6731
|
+
invalidatesSnapshot: true,
|
|
6732
|
+
method: "PUT",
|
|
6733
|
+
path: "/api/settings/linked-accounts/:accountId/token",
|
|
6734
|
+
params: linkedAccountParam,
|
|
6735
|
+
request: ReplaceLinkedAccountTokenRequestSchema,
|
|
6736
|
+
response: LinkedAccountsViewSchema,
|
|
6737
|
+
error: HostApiErrorSchema
|
|
6738
|
+
}),
|
|
6739
|
+
removeLinkedAccount: defineContract({
|
|
6740
|
+
invalidatesSnapshot: true,
|
|
6741
|
+
method: "POST",
|
|
6742
|
+
path: "/api/settings/linked-accounts/:accountId/remove",
|
|
6743
|
+
params: linkedAccountParam,
|
|
6744
|
+
request: RemoveLinkedAccountRequestSchema,
|
|
6745
|
+
response: RemoveLinkedAccountResultSchema,
|
|
6746
|
+
error: HostApiErrorSchema
|
|
6747
|
+
}),
|
|
6748
|
+
getLinkedAccountUses: defineContract({
|
|
6749
|
+
method: "GET",
|
|
6750
|
+
path: "/api/settings/linked-accounts/:accountId/uses",
|
|
6751
|
+
params: linkedAccountParam,
|
|
6752
|
+
request: NoRequestBodySchema,
|
|
6753
|
+
response: LinkedAccountUsesViewSchema,
|
|
6754
|
+
error: HostApiErrorSchema
|
|
6755
|
+
}),
|
|
6756
|
+
getCredentials: defineContract({
|
|
5933
6757
|
method: "GET",
|
|
5934
|
-
path: "/api/settings/
|
|
6758
|
+
path: "/api/settings/credentials",
|
|
5935
6759
|
params: EmptyParamsSchema,
|
|
5936
6760
|
request: NoRequestBodySchema,
|
|
5937
|
-
response:
|
|
6761
|
+
response: CredentialsViewSchema,
|
|
5938
6762
|
error: HostApiErrorSchema
|
|
5939
6763
|
}),
|
|
5940
|
-
|
|
6764
|
+
createCredential: defineContract({
|
|
5941
6765
|
invalidatesSnapshot: true,
|
|
5942
6766
|
method: "POST",
|
|
5943
|
-
path: "/api/settings/
|
|
6767
|
+
path: "/api/settings/credentials",
|
|
5944
6768
|
params: EmptyParamsSchema,
|
|
5945
|
-
request:
|
|
5946
|
-
response:
|
|
6769
|
+
request: CreateCredentialRequestSchema,
|
|
6770
|
+
response: CredentialsViewSchema,
|
|
5947
6771
|
error: HostApiErrorSchema
|
|
5948
6772
|
}),
|
|
5949
|
-
|
|
6773
|
+
updateCredential: defineContract({
|
|
6774
|
+
invalidatesSnapshot: true,
|
|
6775
|
+
method: "PATCH",
|
|
6776
|
+
path: "/api/settings/credentials/:credentialId",
|
|
6777
|
+
params: credentialParam,
|
|
6778
|
+
request: UpdateCredentialRequestSchema,
|
|
6779
|
+
response: CredentialsViewSchema,
|
|
6780
|
+
error: HostApiErrorSchema
|
|
6781
|
+
}),
|
|
6782
|
+
replaceCredentialValue: defineContract({
|
|
5950
6783
|
invalidatesSnapshot: true,
|
|
5951
6784
|
method: "PUT",
|
|
5952
|
-
path: "/api/settings/
|
|
5953
|
-
params:
|
|
5954
|
-
request:
|
|
5955
|
-
response:
|
|
6785
|
+
path: "/api/settings/credentials/:credentialId/value",
|
|
6786
|
+
params: credentialParam,
|
|
6787
|
+
request: ReplaceCredentialValueRequestSchema,
|
|
6788
|
+
response: CredentialsViewSchema,
|
|
5956
6789
|
error: HostApiErrorSchema
|
|
5957
6790
|
}),
|
|
5958
|
-
|
|
6791
|
+
removeCredential: defineContract({
|
|
5959
6792
|
invalidatesSnapshot: true,
|
|
6793
|
+
method: "POST",
|
|
6794
|
+
path: "/api/settings/credentials/:credentialId/remove",
|
|
6795
|
+
params: credentialParam,
|
|
6796
|
+
request: RemoveCredentialRequestSchema,
|
|
6797
|
+
response: RemoveCredentialResultSchema,
|
|
6798
|
+
error: HostApiErrorSchema
|
|
6799
|
+
}),
|
|
6800
|
+
getCredentialUses: defineContract({
|
|
6801
|
+
method: "GET",
|
|
6802
|
+
path: "/api/settings/credentials/:credentialId/uses",
|
|
6803
|
+
params: credentialParam,
|
|
6804
|
+
request: NoRequestBodySchema,
|
|
6805
|
+
response: CredentialUsesViewSchema,
|
|
6806
|
+
error: HostApiErrorSchema
|
|
6807
|
+
}),
|
|
6808
|
+
dismissCredentialRequest: defineContract({
|
|
5960
6809
|
method: "DELETE",
|
|
5961
|
-
path: "/api/settings/
|
|
5962
|
-
params: z.object({
|
|
6810
|
+
path: "/api/settings/credentials/requests/:requestId",
|
|
6811
|
+
params: z.object({ requestId: NonEmptyStringSchema.max(64) }).strict(),
|
|
5963
6812
|
request: NoRequestBodySchema,
|
|
5964
|
-
response:
|
|
6813
|
+
response: CredentialsViewSchema,
|
|
6814
|
+
error: HostApiErrorSchema
|
|
6815
|
+
}),
|
|
6816
|
+
setModelProviderAccess: defineContract({
|
|
6817
|
+
invalidatesSnapshot: true,
|
|
6818
|
+
method: "PUT",
|
|
6819
|
+
path: "/api/settings/credentials/model-providers/:provider",
|
|
6820
|
+
params: z.object({ provider: NonEmptyStringSchema.max(128) }).strict(),
|
|
6821
|
+
request: SetModelProviderAccessRequestSchema,
|
|
6822
|
+
response: CredentialsViewSchema,
|
|
5965
6823
|
error: HostApiErrorSchema
|
|
5966
6824
|
}),
|
|
5967
6825
|
getChannelMemberNotes: defineContract({
|
|
@@ -6479,22 +7337,27 @@ const HostApiContracts = {
|
|
|
6479
7337
|
official: z.enum(["1"]).optional(),
|
|
6480
7338
|
/** 排序方式,默认最近更新;游标只在同一种排序下有效。 */
|
|
6481
7339
|
sort: CommunityExtensionSortSchema.optional(),
|
|
6482
|
-
cursor: z.string().max(200).optional()
|
|
7340
|
+
cursor: z.string().max(200).optional(),
|
|
7341
|
+
/** 跳过本机缓存,重新向社区读取。 */
|
|
7342
|
+
refresh: z.enum(["1"]).optional()
|
|
6483
7343
|
}).strict(),
|
|
6484
7344
|
request: NoRequestBodySchema,
|
|
6485
7345
|
response: z.object({
|
|
6486
7346
|
items: z.array(CommunityExtensionSummarySchema),
|
|
6487
7347
|
nextCursor: z.string().nullable()
|
|
6488
|
-
}).strict(),
|
|
7348
|
+
}).extend(CommunityFreshnessSchema.shape).strict(),
|
|
6489
7349
|
error: HostApiErrorSchema
|
|
6490
7350
|
}),
|
|
6491
7351
|
getCommunityExtension: defineContract({
|
|
6492
7352
|
timeoutMs: 3e4,
|
|
6493
7353
|
method: "GET",
|
|
6494
7354
|
path: "/api/community/extensions/:extensionId",
|
|
6495
|
-
params: z.object({
|
|
7355
|
+
params: z.object({
|
|
7356
|
+
extensionId: ExtensionIdSchema,
|
|
7357
|
+
refresh: z.enum(["1"]).optional()
|
|
7358
|
+
}).strict(),
|
|
6496
7359
|
request: NoRequestBodySchema,
|
|
6497
|
-
response: CommunityExtensionDetailSchema,
|
|
7360
|
+
response: CommunityExtensionDetailSchema.extend(CommunityFreshnessSchema.shape),
|
|
6498
7361
|
error: HostApiErrorSchema
|
|
6499
7362
|
}),
|
|
6500
7363
|
/** 下载社区发布并按包摘要校验,结果与本地文件导入的检查相同,再经 `commitExtensionImport` 确认。 */
|
|
@@ -6626,22 +7489,27 @@ const HostApiContracts = {
|
|
|
6626
7489
|
query: z.string().trim().min(1).max(200).optional(),
|
|
6627
7490
|
tag: z.string().trim().min(1).max(40).optional(),
|
|
6628
7491
|
official: z.literal("1").optional(),
|
|
6629
|
-
cursor: z.string().min(1).max(500).optional()
|
|
7492
|
+
cursor: z.string().min(1).max(500).optional(),
|
|
7493
|
+
/** 跳过本机缓存,重新向社区读取。 */
|
|
7494
|
+
refresh: z.enum(["1"]).optional()
|
|
6630
7495
|
}).strict(),
|
|
6631
7496
|
request: NoRequestBodySchema,
|
|
6632
7497
|
response: z.object({
|
|
6633
7498
|
items: z.array(CommunityPersonaSummarySchema),
|
|
6634
7499
|
nextCursor: z.string().nullable()
|
|
6635
|
-
}).strict(),
|
|
7500
|
+
}).extend(CommunityFreshnessSchema.shape).strict(),
|
|
6636
7501
|
error: HostApiErrorSchema
|
|
6637
7502
|
}),
|
|
6638
7503
|
getCommunityPersona: defineContract({
|
|
6639
7504
|
timeoutMs: 3e4,
|
|
6640
7505
|
method: "GET",
|
|
6641
7506
|
path: "/api/community/personas/:personaId",
|
|
6642
|
-
params: z.object({
|
|
7507
|
+
params: z.object({
|
|
7508
|
+
personaId: CommunityPersonaIdSchema,
|
|
7509
|
+
refresh: z.enum(["1"]).optional()
|
|
7510
|
+
}).strict(),
|
|
6643
7511
|
request: NoRequestBodySchema,
|
|
6644
|
-
response: CommunityPersonaDetailSchema,
|
|
7512
|
+
response: CommunityPersonaDetailSchema.extend(CommunityFreshnessSchema.shape),
|
|
6645
7513
|
error: HostApiErrorSchema
|
|
6646
7514
|
}),
|
|
6647
7515
|
/**
|
|
@@ -6818,6 +7686,46 @@ const HostApiContracts = {
|
|
|
6818
7686
|
response: LlmProviderSettingsSchema,
|
|
6819
7687
|
error: HostApiErrorSchema
|
|
6820
7688
|
}),
|
|
7689
|
+
llmSubscriptionStatus: defineContract({
|
|
7690
|
+
method: "GET",
|
|
7691
|
+
path: "/api/llm/subscriptions/:provider",
|
|
7692
|
+
params: llmProviderParam,
|
|
7693
|
+
request: NoRequestBodySchema,
|
|
7694
|
+
response: SubscriptionStatusSchema,
|
|
7695
|
+
error: HostApiErrorSchema
|
|
7696
|
+
}),
|
|
7697
|
+
llmSubscriptionAction: defineContract({
|
|
7698
|
+
invalidatesSnapshot: true,
|
|
7699
|
+
method: "POST",
|
|
7700
|
+
path: "/api/llm/subscriptions/:provider",
|
|
7701
|
+
params: llmProviderParam,
|
|
7702
|
+
request: z.discriminatedUnion("action", [
|
|
7703
|
+
z.object({
|
|
7704
|
+
action: z.literal("use-subscription"),
|
|
7705
|
+
expectedRevision: z.number().int().nonnegative()
|
|
7706
|
+
}).strict(),
|
|
7707
|
+
z.object({ action: z.enum(["login", "cancel"]) }).strict(),
|
|
7708
|
+
z.object({
|
|
7709
|
+
action: z.literal("answer"),
|
|
7710
|
+
promptId: NonEmptyStringSchema,
|
|
7711
|
+
value: z.string().max(4096)
|
|
7712
|
+
}).strict(),
|
|
7713
|
+
z.object({
|
|
7714
|
+
action: z.enum(["activate", "remove"]),
|
|
7715
|
+
accountId: NonEmptyStringSchema
|
|
7716
|
+
}).strict(),
|
|
7717
|
+
z.object({
|
|
7718
|
+
action: z.literal("rename"),
|
|
7719
|
+
accountId: NonEmptyStringSchema,
|
|
7720
|
+
label: z.string().min(1).max(80)
|
|
7721
|
+
}).strict()
|
|
7722
|
+
]),
|
|
7723
|
+
response: z.object({
|
|
7724
|
+
status: SubscriptionStatusSchema,
|
|
7725
|
+
revocationConfirmed: z.boolean().optional()
|
|
7726
|
+
}).strict(),
|
|
7727
|
+
error: HostApiErrorSchema
|
|
7728
|
+
}),
|
|
6821
7729
|
llmDiscoverModels: defineContract({
|
|
6822
7730
|
method: "POST",
|
|
6823
7731
|
path: "/api/llm/discover-models",
|
|
@@ -7183,6 +8091,7 @@ const HostApiContracts = {
|
|
|
7183
8091
|
extensionRevisionId: ExtensionRevisionIdSchema,
|
|
7184
8092
|
config: JsonValueSchema,
|
|
7185
8093
|
configuredSecrets: z.array(z.string()).optional(),
|
|
8094
|
+
boundCredentials: BoundCredentialsSchema.optional(),
|
|
7186
8095
|
activatedAt: z.number().int().safe().nonnegative()
|
|
7187
8096
|
}).strict().optional(),
|
|
7188
8097
|
pending: ExtensionActivationTransitionSchema.optional()
|
|
@@ -7202,6 +8111,16 @@ const HostApiContracts = {
|
|
|
7202
8111
|
}).strict(),
|
|
7203
8112
|
error: HostApiErrorSchema
|
|
7204
8113
|
}),
|
|
8114
|
+
putAgentOutboundOrder: defineContract({
|
|
8115
|
+
invalidatesSnapshot: true,
|
|
8116
|
+
method: "PUT",
|
|
8117
|
+
path: "/api/agents/:agentId/outbound-order",
|
|
8118
|
+
params: agentParam,
|
|
8119
|
+
/** Every enabled extension that processes the agent's messages before sending, in the new order. */
|
|
8120
|
+
request: z.object({ extensionIds: z.array(ExtensionIdSchema).max(64) }).strict(),
|
|
8121
|
+
response: z.object({ extensionIds: z.array(ExtensionIdSchema) }).strict(),
|
|
8122
|
+
error: HostApiErrorSchema
|
|
8123
|
+
}),
|
|
7205
8124
|
updateExtensionActivationConfig: defineContract({
|
|
7206
8125
|
invalidatesSnapshot: true,
|
|
7207
8126
|
method: "PUT",
|
|
@@ -7210,11 +8129,14 @@ const HostApiContracts = {
|
|
|
7210
8129
|
request: z.object({
|
|
7211
8130
|
config: JsonValueSchema,
|
|
7212
8131
|
/** Write-only credential drafts keyed by secret field; an absent or empty draft keeps the stored one. */
|
|
7213
|
-
secrets: z.record(z.string(), z.string().max(8192)).optional()
|
|
8132
|
+
secrets: z.record(z.string(), z.string().max(8192)).optional(),
|
|
8133
|
+
/** Secret fields to bind to named credentials instead of a typed value; a field takes one or the other. */
|
|
8134
|
+
credentialBindings: CredentialBindingsRequestSchema.optional()
|
|
7214
8135
|
}).strict(),
|
|
7215
8136
|
response: z.object({
|
|
7216
8137
|
config: JsonValueSchema,
|
|
7217
|
-
configuredSecrets: z.array(z.string()).optional()
|
|
8138
|
+
configuredSecrets: z.array(z.string()).optional(),
|
|
8139
|
+
boundCredentials: BoundCredentialsSchema.optional()
|
|
7218
8140
|
}).strict(),
|
|
7219
8141
|
error: HostApiErrorSchema
|
|
7220
8142
|
}),
|
|
@@ -7227,14 +8149,37 @@ const HostApiContracts = {
|
|
|
7227
8149
|
request: z.object({
|
|
7228
8150
|
config: JsonValueSchema,
|
|
7229
8151
|
/** Write-only credential drafts keyed by secret field; an absent or empty draft keeps the stored one. */
|
|
7230
|
-
secrets: z.record(z.string(), z.string().max(8192)).optional()
|
|
8152
|
+
secrets: z.record(z.string(), z.string().max(8192)).optional(),
|
|
8153
|
+
/** Secret fields to bind to named credentials instead of a typed value; a field takes one or the other. */
|
|
8154
|
+
credentialBindings: CredentialBindingsRequestSchema.optional()
|
|
7231
8155
|
}).strict(),
|
|
7232
8156
|
response: z.object({
|
|
7233
8157
|
config: JsonValueSchema,
|
|
7234
|
-
configuredSecrets: z.array(z.string()).optional()
|
|
8158
|
+
configuredSecrets: z.array(z.string()).optional(),
|
|
8159
|
+
boundCredentials: BoundCredentialsSchema.optional()
|
|
7235
8160
|
}).strict(),
|
|
7236
8161
|
error: HostApiErrorSchema
|
|
7237
8162
|
}),
|
|
8163
|
+
/** Configuration history of one extension, newest first: the host layer and every agent's configuration. */
|
|
8164
|
+
getExtensionConfigVersions: defineContract({
|
|
8165
|
+
method: "GET",
|
|
8166
|
+
path: "/api/extensions/:extensionId/config-versions",
|
|
8167
|
+
params: extensionParam,
|
|
8168
|
+
request: NoRequestBodySchema,
|
|
8169
|
+
response: z.object({ versions: z.array(ExtensionConfigVersionSchema) }).strict(),
|
|
8170
|
+
error: HostApiErrorSchema
|
|
8171
|
+
}),
|
|
8172
|
+
/** Writes an earlier configuration again as a new version of the same layer (and agent). */
|
|
8173
|
+
revertExtensionConfig: defineContract({
|
|
8174
|
+
invalidatesSnapshot: true,
|
|
8175
|
+
timeoutMs: 3e5,
|
|
8176
|
+
method: "POST",
|
|
8177
|
+
path: "/api/extensions/:extensionId/config-versions/:versionId/revert",
|
|
8178
|
+
params: extensionConfigVersionParam,
|
|
8179
|
+
request: z.object({ reason: z.string().trim().max(500).optional() }).strict(),
|
|
8180
|
+
response: z.object({ version: ExtensionConfigVersionSchema }).strict(),
|
|
8181
|
+
error: HostApiErrorSchema
|
|
8182
|
+
}),
|
|
7238
8183
|
installHostExtension: defineContract({
|
|
7239
8184
|
invalidatesSnapshot: true,
|
|
7240
8185
|
timeoutMs: 3e5,
|
|
@@ -7666,9 +8611,9 @@ const buildValidatedHostApiPath = (contract, input) => {
|
|
|
7666
8611
|
const consumed = /* @__PURE__ */ new Set();
|
|
7667
8612
|
const pathname = contract.path.replace(pathParameterPattern, (_placeholder, key) => {
|
|
7668
8613
|
const value = params[key];
|
|
7669
|
-
if (typeof value !== "string") throw new TypeError(`Host API path parameter ${key} must be a string.`);
|
|
8614
|
+
if (typeof value !== "string" && typeof value !== "number") throw new TypeError(`Host API path parameter ${key} must be a string or number.`);
|
|
7670
8615
|
consumed.add(key);
|
|
7671
|
-
return encodeURIComponent(value);
|
|
8616
|
+
return encodeURIComponent(String(value));
|
|
7672
8617
|
});
|
|
7673
8618
|
const query = new URLSearchParams();
|
|
7674
8619
|
for (const [key, value] of Object.entries(params)) {
|
|
@@ -7686,6 +8631,6 @@ function buildHostApiPath(name, input) {
|
|
|
7686
8631
|
return buildValidatedHostApiPath(HostApiContracts[name], input);
|
|
7687
8632
|
}
|
|
7688
8633
|
//#endregion
|
|
7689
|
-
export { ACTIVITY_MAX_BUCKETS, ACTIVITY_MAX_WINDOW_MS, ACTIVITY_MIN_BUCKET_MS, ActivityQuerySchema, AdapterActivityKeySchema, AddCommandAccountRequestSchema, AdministratorSchema, AdmissionIdSchema, AgentAppearanceSchema, AgentIdSchema, AgentRevisionChangedFieldSchema, AgentRevisionHistorySchema, AgentRevisionIdSchema, AssetIdSchema, AttentionItemSchema, AttentionListSchema, AuthoringAttemptIdSchema, AuthoringTaskIdSchema, CHANNEL_COMPOSER_MAX_ATTACHMENTS, CHANNEL_COMPOSER_MAX_BYTES, CHANNEL_UNREAD_COUNT_CAP, COMMAND_DEFAULT_TIMEOUT_SECONDS, COMMAND_MAX_PROGRESS_REPLIES, COMMAND_MAX_TIMEOUT_SECONDS, COMMUNITY_EXTENSION_SORTS, COMMUNITY_FEEDBACK_STATUSES, COMMUNITY_FEEDBACK_STATUS_LABELS, COMMUNITY_LISTING_LIMITS, COMMUNITY_OFFICIAL_HANDLE, COMMUNITY_PERSONA_AVATAR_MAX_BYTES, COMMUNITY_PERSONA_AVATAR_TYPES, COMMUNITY_PERSONA_MAX_LENGTH, COMMUNITY_RATING_BADGES, COMMUNITY_RATING_BADGE_LIMIT, COMMUNITY_RATING_DIMENSIONS, COMMUNITY_RATING_DIMENSION_LABELS, COMMUNITY_REVIEWER_NAME, COMMUNITY_REVIEW_DIMENSION_LABELS, COMMUNITY_REVIEW_STATUSES, CONFIG_SCHEMA_MAX_BYTES, ChannelActivitySeriesSchema, ChannelActivitySummarySchema, ChannelContextPolicySchema, ChannelContextPolicyViewSchema, ChannelEventIdSchema, ChannelFactSseDataSchema, ChannelFactSseItemSchema, ChannelIdSchema, ChannelMemberIdSchema, ChannelMemberNotesViewSchema, ChannelMemoryActivitySchema, ChannelPendingContextSchema, ChannelPromptViewSchema, ChannelRuntimeCacheSampleSchema, ChannelRuntimeCacheSchema, ChannelRuntimeContextSchema, ChannelRuntimeInputSchema, ChannelRuntimeOccupancySchema, ChannelRuntimePerformanceSampleSchema, ChannelRuntimePerformanceSchema, ChannelRuntimePhaseSchema, ChannelRuntimeProjectionSchema, ChannelRuntimeSseDataSchema, ChannelRuntimeStepSchema, ChannelRuntimeToolSchema, ChannelRuntimeTurnSchema, ChannelRuntimeUsageSchema, ClientNotificationFeedResponseSchema, ClientNotificationSchema, CodeRunAvailabilitySchema, CommandAccountSchema, CommandAccountServiceSchema, CommandAccountUsageSchema, CommandAccountsViewSchema, CommandCatalogEntrySchema, CommandDefinitionSchema, CommandExecutionIdentitySchema, CommandExecutionRecordSchema, CommandParameterSchema, CommandPermissionSchema, CommandPolicySchema, CommandReplySchema, CommandResultSchema, CommunityAccountSchema, CommunityEndpointSchema, CommunityEnvironmentSchema, CommunityExtensionDetailSchema, CommunityExtensionSortSchema, CommunityExtensionSummarySchema, CommunityFeedbackAffectedSchema, CommunityFeedbackChangesSchema, CommunityFeedbackConfirmSchema, CommunityFeedbackCreateSchema, CommunityFeedbackDiagnosticEntrySchema, CommunityFeedbackDiagnosticsSchema, CommunityFeedbackDigestSchema, CommunityFeedbackDraftIdSchema, CommunityFeedbackDraftInputSchema, CommunityFeedbackDraftSchema, CommunityFeedbackDraftStateSchema, CommunityFeedbackDraftUpdateSchema, CommunityFeedbackEventDataSchema, CommunityFeedbackEventSchema, CommunityFeedbackExcerptSchema, CommunityFeedbackExtensionDiagnosticSchema, CommunityFeedbackIdSchema, CommunityFeedbackItemSchema, CommunityFeedbackKindSchema, CommunityFeedbackLabelsSchema, CommunityFeedbackLastPayloadSchema, CommunityFeedbackLinkSchema, CommunityFeedbackListSchema, CommunityFeedbackLocalListSchema, CommunityFeedbackMessageInputSchema, CommunityFeedbackMessageSchema, CommunityFeedbackPayloadSchema, CommunityFeedbackRefSchema, CommunityFeedbackReopenSchema, CommunityFeedbackSchema, CommunityFeedbackSettingsSchema, CommunityFeedbackSettingsUpdateSchema, CommunityFeedbackSnapshotSchema, CommunityFeedbackStatusSchema, CommunityFeedbackSummarySchema, CommunityFeedbackSupplementSchema, CommunityFeedbackTargetSchema, CommunityFeedbackTransitionSchema, CommunityFeedbackVisibilitySchema, CommunityFeedbackWithdrawSchema, CommunityInstalledItemSchema, CommunityInstalledSchema, CommunityListingInputSchema, CommunityMyExtensionSchema, CommunityMyPersonaSchema, CommunityMyPersonasSchema, CommunityPermissionItemSchema, CommunityPersonaDetailSchema, CommunityPersonaIdSchema, CommunityPersonaReviewStatusSchema, CommunityPersonaRevisionIdSchema, CommunityPersonaSummarySchema, CommunityRatingSchema, CommunityReleaseIdSchema, CommunityReleaseSchema, CommunityReviewReportSchema, CommunityReviewStatusSchema, CommunitySourceSchema, CommunityStatusSchema, CommunitySyncItemSchema, CommunitySyncSchema, ConfigSchemaDocumentSchema, ConfigSchemaMetaSchema, ConfigSchemaNodeSchema, ConnectionEventIdSchema, ConnectionIdSchema, ConnectionPanelRoleSchema, ConnectionTestResultSchema, DEFAULT_CHANNEL_CONTEXT_POLICY, DEFAULT_MESSAGE_PACING, DEFAULT_SUB_CONVERSATION_RETENTION, DshCredentialRefSchema, DshCredentialViewSchema, DshCredentialsChangedSseDataSchema, DshNxtHostUiSchema, DshPluginCatalogEntrySchema, DshPluginEntryIdSchema, DshPluginOperationSseDataSchema, DshPluginPackageIdSchema, DshSettingsChangedSseDataSchema, DshSettingsMutationRequestSchema, DshSettingsNamespaceSchema, DshSettingsPathOperationSchema, DshSettingsPathSchema, DynamicChangedSseDataSchema, DynamicClientApprovalPolicySchema, EMPTY_CONFIG_SCHEMA, EMPTY_EXTENSION_PERMISSIONS, EMPTY_EXTENSION_UI_CONTRIBUTIONS, EXTENSION_ASSET_LIBRARY_DEFAULT_QUOTA_BYTES, EXTENSION_ASSET_LIBRARY_MAX_QUOTA_BYTES, EXTENSION_CONTEXT_DYNAMIC_MAX_CHARS, EXTENSION_CONTEXT_STATIC_MAX_CHARS, EXTENSION_DATA_HOOK_PERMISSIONS, EXTENSION_GOVERNANCE_SDK_LEVEL, EXTENSION_INBOUND_HOOK_MAX_TIMEOUT_MS, EXTENSION_INDEX_MAX_FILTERS, EXTENSION_INDEX_MAX_TEXT_FIELDS, EXTENSION_JOB_MAX_RUNTIME, EXTENSION_LLM_MAX_CALLS_PER_TURN, EXTENSION_LLM_MAX_OUTPUT_TOKENS, EXTENSION_MODEL_MAX_CALLS_PER_MINUTE, EXTENSION_PROVIDES, EXTENSION_SDK_BASE_LEVEL, EXTENSION_SDK_LEVEL, EXTENSION_SDK_RELEASES, EXTENSION_STORAGE_DEFAULT_QUOTA_BYTES, EXTENSION_STORAGE_MAX_QUOTA_BYTES, EXTENSION_STORAGE_SCOPES, EpisodeHandoffIdSchema, EpisodeIdSchema, ExtensionActivationTransitionSchema, ExtensionAssetLibraryCapabilitySchema, ExtensionAssetsCapabilitySchema, ExtensionCapabilitiesSchema, ExtensionConfigDeclarationSchema, ExtensionContextContributionSchema, ExtensionDataMigrationInputSchema, ExtensionDataPackageInspectionSchema, ExtensionDataPreviewSchema, ExtensionDataSourceSchema, ExtensionDataStateSchema, ExtensionDeclaredJobSchema, ExtensionIdSchema, ExtensionImportInspectionSchema, ExtensionInboundHookCapabilitySchema, ExtensionIndexCapabilitySchema, ExtensionIndexCollectionSchema, ExtensionJobsCapabilitySchema, ExtensionLayeredConfigSchema, ExtensionLineageNodeSchema, ExtensionLineageSchema, ExtensionLlmCapabilitySchema, ExtensionMcpCapabilitySchema, ExtensionMcpServerNameSchema, ExtensionMcpServerSchema, ExtensionMcpValueSchema, ExtensionModelsCapabilitySchema, ExtensionNetworkCapabilitySchema, ExtensionNetworkDomainSchema, ExtensionPanelAnchorSchema, ExtensionPanelDeclarationSchema, ExtensionPermissionRequirementSchema, ExtensionPermissionsSchema, ExtensionPlatformCapabilitySchema, ExtensionProvideSchema, ExtensionRequestSchema, ExtensionRequiresSchema, ExtensionRevisionIdSchema, ExtensionStorageCapabilitySchema, ExtensionStorageScopeSchema, ExtensionUiContributionsSchema, GithubCliAvailabilitySchema, HOST_PAGE_DEFAULT_RAIL_ORDER, HOST_UI_KIT_COMPONENT_NAMES, HostApiContracts, HostApiErrorSchema, HostConnectionEventSchema, HostIconNameSchema, HostLayerCapabilitiesSchema, HostPageContributionSchema, HostPageIconSchema, HostSnapshotMessageSchema, HostSnapshotSchema, HostSseEventSchema, HostSseStatusDataSchema, HostSyncCursorSchema, HostUiKitComponentNameSchema, HostUiNavigationGroupSchema, HostUiNavigationItemSchema, HostUiNavigationModelSchema, HostUiNetworkOriginSchema, HostUiOwnerSchema, HostUiPageEntrySchema, HostUiPageGeometryEvidenceSchema, HostUiPageInstanceIdSchema, HostUiPagePreferencesSchema, HostUiPermissionDeclarationSchema, HostUiPermissionSchema, HostUpgradeSummarySchema, INSECURE_HTTP_MANAGEMENT_PAIR_PROOF_PREFIX, ImageUnderstandingPolicyApiSchema, InsecureHttpManagementChallengeResponseSchema, InstanceDescriptorSchema, InstanceDescriptorWireSchema, JsonValueSchema, LlmDiscoveredModelSchema, LlmModelInputModalitiesSchema, LlmProviderCredentialSchema, LlmProviderModelSchema, LlmProviderSettingsSchema, LlmProviderTestResultSchema, LlmProviderViewSchema, LocalGithubLoginSchema, LogicalMessageIdSchema, MANAGEMENT_PAIR_PROOF_PREFIX, ManagementChallengeResponseSchema, ManagementDeviceEnrollmentRequestSchema, ManagementDeviceEnrollmentResponseSchema, ManagementDeviceIdSchema, ManagementDeviceViewSchema, ManagementSessionRequestSchema, ManagementSessionResponseSchema, McpServerFormSchema, MessageDeliverySummarySchema, MessagePacingSchema, MessagePacingSettingsSchema, MessagePartSchema, MessagePartsSchema, MessageRendererContributionSchema, NonEmptyMessagePartsSchema, NotificationEventKeySchema, NotificationSettingsViewSchema, OutboundIntentIdSchema, PANEL_ANCHOR_LAYER, PROMPT_DOCUMENT_MAX_PLAIN_TEXT_LENGTH, PROMPT_DOCUMENT_MAX_REFERENCES, PanelContributionSchema, PanelDensitySchema, PhysicalDeliveryIdSchema, PlatformIdentityIdSchema, PlatformUserListResponseSchema, ProductUpdateStatusSchema, PromptDocumentV1Schema, PromptSegmentSchema, RICH_EXTENSION_MAX_BYTES, RetrievalModeSchema, RetrievalStatusSchema, RichExtensionSchema, RichKindSchema, RichTargetUrlSchema, RuntimeCompatibilityDiagnosticSchema, ScheduledTaskIdSchema, ScheduledTaskSchema, ServerInstanceIdSchema, SubConversationIdSchema, SubConversationRetentionSchema, SubConversationSchema, SubConversationSettingsSchema, TestBarkNotificationRequestSchema, ToolViewContributionSchema, ToolViewDensitySchema, UpdateNotificationSettingsRequestSchema, UpgradeBackupModeSchema, UpgradeBackupSettingsSchema, VerificationBrowserAvailabilitySchema, WorkTreeOrderSchema, activityDurationMs, agentPermissionDeclaration, buildHostApiContractPath, buildHostApiPath, commandNameOf, commandUsage, communityPersonaReviewLabel, communityPublisherLabel, communityReviewLabel, configDescription, configFieldKind, configFields, configSchema, configSecretKeys, extensionCapabilitiesExpand, extensionSdkVersion, formatLogMessage, hostLayerAsCapabilities, hostLogDebugLeaseSchema, hostLogDebugRequestSchema, hostLogEntrySchema, hostLogLevelSchema, hostLogPageSchema, hostLogQuerySchema, hostLogScopeSchema, hostLogSettingsSchema, hostLogSettingsUpdateSchema, hostLogSourceKindSchema, hostLogSourceSchema, hostLogStatusSchema, hostLogStreamEventSchema, hostPageRailOrder, hostPermissionDeclaration, insecureHttpManagementPairProofMessage, managementPairProofMessage, mcpSecretFields, messagePartAssetId, messagePartAssetIds, messagePartImageAssetIds, messagePartsSearchText, normalizePromptDocument, parseCommandArguments, parseConfigValue, parseJsonValue, parseMessageParts, promptDocumentFromText, promptDocumentPlainText, recognizeCommand, requiredExtensionSdkLevel, richPartContextText, summarizeExtensionCapabilities, tokenizeCommand, undeliveredCommandReplies, validateConfigValue };
|
|
8634
|
+
export { ACTIVITY_MAX_BUCKETS, ACTIVITY_MAX_WINDOW_MS, ACTIVITY_MIN_BUCKET_MS, ActivityQuerySchema, AdapterActivityKeySchema, AddLinkedAccountRequestSchema, AdministratorSchema, AdmissionIdSchema, AgentAliasesSchema, AgentAppearanceSchema, AgentCompactionModelChoiceSchema, AgentCompactionPolicySchema, AgentFallbackModelsSchema, AgentIdSchema, AgentRevisionChangedFieldSchema, AgentRevisionHistorySchema, AgentRevisionIdSchema, AgentSubConversationModelsSchema, AssetIdSchema, AttentionItemSchema, AttentionListSchema, AuthoringAttemptIdSchema, AuthoringTaskIdSchema, BoundCredentialsSchema, CHANNEL_COMPOSER_MAX_ATTACHMENTS, CHANNEL_COMPOSER_MAX_BYTES, CHANNEL_UNREAD_COUNT_CAP, COMMAND_DEFAULT_TIMEOUT_SECONDS, COMMAND_MAX_PROGRESS_REPLIES, COMMAND_MAX_TIMEOUT_SECONDS, COMMUNITY_EXTENSION_SORTS, COMMUNITY_FEEDBACK_STATUSES, COMMUNITY_FEEDBACK_STATUS_LABELS, COMMUNITY_LISTING_LIMITS, COMMUNITY_OFFICIAL_HANDLE, COMMUNITY_PERSONA_AVATAR_MAX_BYTES, COMMUNITY_PERSONA_AVATAR_TYPES, COMMUNITY_PERSONA_MAX_LENGTH, COMMUNITY_RATING_BADGES, COMMUNITY_RATING_BADGE_LIMIT, COMMUNITY_RATING_DIMENSIONS, COMMUNITY_RATING_DIMENSION_LABELS, COMMUNITY_REVIEWER_NAME, COMMUNITY_REVIEW_DIMENSION_LABELS, COMMUNITY_REVIEW_STATUSES, CONFIG_SCHEMA_MAX_BYTES, CREDENTIAL_DESCRIPTION_MAX_CHARS, CREDENTIAL_NAME_MAX_CHARS, CREDENTIAL_REDACTABLE_MIN_CHARS, CREDENTIAL_VALUE_MAX_CHARS, ChannelActivitySeriesSchema, ChannelActivitySummarySchema, ChannelContextPolicySchema, ChannelContextPolicyViewSchema, ChannelEventIdSchema, ChannelFactSseDataSchema, ChannelFactSseItemSchema, ChannelIdSchema, ChannelListViewSchema, ChannelMemberIdSchema, ChannelMemberNotesViewSchema, ChannelMemoryActivitySchema, ChannelPendingContextSchema, ChannelPromptViewSchema, ChannelRuntimeCacheSampleSchema, ChannelRuntimeCacheSchema, ChannelRuntimeContextSchema, ChannelRuntimeInputSchema, ChannelRuntimeOccupancySchema, ChannelRuntimePerformanceSampleSchema, ChannelRuntimePerformanceSchema, ChannelRuntimePhaseSchema, ChannelRuntimeProjectionSchema, ChannelRuntimeSseDataSchema, ChannelRuntimeStepSchema, ChannelRuntimeToolSchema, ChannelRuntimeTurnSchema, ChannelRuntimeUsageSchema, ClientNotificationFeedResponseSchema, ClientNotificationSchema, CodeRunAvailabilitySchema, CommandAccountUsageSchema, CommandCatalogEntrySchema, CommandDefinitionSchema, CommandExecutionIdentitySchema, CommandExecutionRecordSchema, CommandParameterSchema, CommandPermissionSchema, CommandPolicySchema, CommandReplySchema, CommandResultSchema, CommunityAccountSchema, CommunityEndpointSchema, CommunityEnvironmentSchema, CommunityExtensionDetailSchema, CommunityExtensionSortSchema, CommunityExtensionSummarySchema, CommunityFeedbackAffectedSchema, CommunityFeedbackChangesSchema, CommunityFeedbackConfirmSchema, CommunityFeedbackCreateSchema, CommunityFeedbackDiagnosticEntrySchema, CommunityFeedbackDiagnosticsSchema, CommunityFeedbackDigestSchema, CommunityFeedbackDraftIdSchema, CommunityFeedbackDraftInputSchema, CommunityFeedbackDraftSchema, CommunityFeedbackDraftStateSchema, CommunityFeedbackDraftUpdateSchema, CommunityFeedbackEventDataSchema, CommunityFeedbackEventSchema, CommunityFeedbackExcerptSchema, CommunityFeedbackExtensionDiagnosticSchema, CommunityFeedbackIdSchema, CommunityFeedbackItemSchema, CommunityFeedbackKindSchema, CommunityFeedbackLabelsSchema, CommunityFeedbackLastPayloadSchema, CommunityFeedbackLinkSchema, CommunityFeedbackListSchema, CommunityFeedbackLocalListSchema, CommunityFeedbackMessageInputSchema, CommunityFeedbackMessageSchema, CommunityFeedbackPayloadSchema, CommunityFeedbackRefSchema, CommunityFeedbackReopenSchema, CommunityFeedbackSchema, CommunityFeedbackSettingsSchema, CommunityFeedbackSettingsUpdateSchema, CommunityFeedbackSnapshotSchema, CommunityFeedbackStatusSchema, CommunityFeedbackSummarySchema, CommunityFeedbackSupplementSchema, CommunityFeedbackTargetSchema, CommunityFeedbackTransitionSchema, CommunityFeedbackVisibilitySchema, CommunityFeedbackWithdrawSchema, CommunityFreshnessSchema, CommunityInstalledItemSchema, CommunityInstalledSchema, CommunityListingInputSchema, CommunityMyExtensionSchema, CommunityMyPersonaSchema, CommunityMyPersonasSchema, CommunityPermissionItemSchema, CommunityPersonaDetailSchema, CommunityPersonaIdSchema, CommunityPersonaReviewStatusSchema, CommunityPersonaRevisionIdSchema, CommunityPersonaSummarySchema, CommunityRatingSchema, CommunityReleaseIdSchema, CommunityReleaseSchema, CommunityReviewReportSchema, CommunityReviewStatusSchema, CommunitySourceSchema, CommunityStatusSchema, CommunitySyncItemSchema, CommunitySyncSchema, CompactionSettingsSchema, ConfigSchemaDocumentSchema, ConfigSchemaMetaSchema, ConfigSchemaNodeSchema, ConnectionEventIdSchema, ConnectionIdSchema, ConnectionPanelRoleSchema, ConnectionTestResultSchema, CreateCredentialRequestSchema, CredentialAgentScopeSchema, CredentialBindingsRequestSchema, CredentialConsumerKindSchema, CredentialDescriptionSchema, CredentialDomainsSchema, CredentialEnvNameSchema, CredentialIdSchema, CredentialNameSchema, CredentialRequestViewSchema, CredentialUsageSchema, CredentialUseSchema, CredentialUsersSchema, CredentialUsesViewSchema, CredentialValueSchema, CredentialViewSchema, CredentialsViewSchema, DEFAULT_CHANNEL_CONTEXT_POLICY, DEFAULT_COMPACTION_SETTINGS, DEFAULT_MESSAGE_PACING, DEFAULT_MODEL_FALLBACK_SETTINGS, DEFAULT_SUB_CONVERSATION_RETENTION, DshCredentialRefSchema, DshCredentialViewSchema, DshCredentialsChangedSseDataSchema, DshNxtHostUiSchema, DshPluginCatalogEntrySchema, DshPluginEntryIdSchema, DshPluginOperationSseDataSchema, DshPluginPackageIdSchema, DshSettingsChangedSseDataSchema, DshSettingsMutationRequestSchema, DshSettingsNamespaceSchema, DshSettingsPathOperationSchema, DshSettingsPathSchema, DynamicChangedSseDataSchema, DynamicClientApprovalPolicySchema, EMPTY_CONFIG_SCHEMA, EMPTY_EXTENSION_PERMISSIONS, EMPTY_EXTENSION_UI_CONTRIBUTIONS, EXTENSION_ASSET_LIBRARY_DEFAULT_QUOTA_BYTES, EXTENSION_ASSET_LIBRARY_MAX_QUOTA_BYTES, EXTENSION_CONTEXT_DYNAMIC_MAX_CHARS, EXTENSION_CONTEXT_STATIC_MAX_CHARS, EXTENSION_DATA_HOOK_PERMISSIONS, EXTENSION_GOVERNANCE_SDK_LEVEL, EXTENSION_INBOUND_HOOK_MAX_TIMEOUT_MS, EXTENSION_INDEX_MAX_FILTERS, EXTENSION_INDEX_MAX_TEXT_FIELDS, EXTENSION_JOB_MAX_RUNTIME, EXTENSION_LLM_MAX_CALLS_PER_TURN, EXTENSION_LLM_MAX_OUTPUT_TOKENS, EXTENSION_MODEL_MAX_CALLS_PER_MINUTE, EXTENSION_OUTBOUND_MAX_TIMEOUT_MS, EXTENSION_OUTBOUND_SDK_LEVEL, EXTENSION_PROVIDES, EXTENSION_SDK_BASE_LEVEL, EXTENSION_SDK_LEVEL, EXTENSION_SDK_RELEASES, EXTENSION_STORAGE_DEFAULT_QUOTA_BYTES, EXTENSION_STORAGE_MAX_QUOTA_BYTES, EXTENSION_STORAGE_SCOPES, EpisodeHandoffIdSchema, EpisodeIdSchema, ExtensionActivationTransitionSchema, ExtensionAssetLibraryCapabilitySchema, ExtensionAssetsCapabilitySchema, ExtensionCapabilitiesSchema, ExtensionConfigDeclarationSchema, ExtensionConfigVersionSchema, ExtensionConfigVersionSourceSchema, ExtensionContextContributionSchema, ExtensionDataMigrationInputSchema, ExtensionDataPackageInspectionSchema, ExtensionDataPreviewSchema, ExtensionDataSourceSchema, ExtensionDataStateSchema, ExtensionDeclaredJobSchema, ExtensionIdSchema, ExtensionImportInspectionSchema, ExtensionInboundHookCapabilitySchema, ExtensionIndexCapabilitySchema, ExtensionIndexCollectionSchema, ExtensionJobsCapabilitySchema, ExtensionLayeredConfigSchema, ExtensionLineageNodeSchema, ExtensionLineageSchema, ExtensionLlmCapabilitySchema, ExtensionMcpCapabilitySchema, ExtensionMcpServerNameSchema, ExtensionMcpServerSchema, ExtensionMcpValueSchema, ExtensionModelsCapabilitySchema, ExtensionNetworkCapabilitySchema, ExtensionNetworkDomainSchema, ExtensionOutboundCapabilitySchema, ExtensionPanelAnchorSchema, ExtensionPanelDeclarationSchema, ExtensionPermissionRequirementSchema, ExtensionPermissionsSchema, ExtensionPlatformCapabilitySchema, ExtensionProvideSchema, ExtensionRequestSchema, ExtensionRequiresSchema, ExtensionRevisionIdSchema, ExtensionStorageCapabilitySchema, ExtensionStorageScopeSchema, ExtensionUiContributionsSchema, FALLBACK_MODEL_LIMIT, GithubCliAvailabilitySchema, HOST_PAGE_DEFAULT_RAIL_ORDER, HOST_UI_KIT_COMPONENT_NAMES, HostApiContracts, HostApiErrorSchema, HostConnectionEventSchema, HostIconNameSchema, HostLayerCapabilitiesSchema, HostPageContributionSchema, HostPageIconSchema, HostSnapshotMessageSchema, HostSnapshotSchema, HostSseEventSchema, HostSseStatusDataSchema, HostSyncCursorSchema, HostUiKitComponentNameSchema, HostUiNavigationGroupSchema, HostUiNavigationItemSchema, HostUiNavigationModelSchema, HostUiNetworkOriginSchema, HostUiOwnerSchema, HostUiPageEntrySchema, HostUiPageGeometryEvidenceSchema, HostUiPageInstanceIdSchema, HostUiPagePreferencesSchema, HostUiPermissionDeclarationSchema, HostUiPermissionSchema, HostUpgradeSummarySchema, INSECURE_HTTP_MANAGEMENT_PAIR_PROOF_PREFIX, ImageUnderstandingPolicyApiSchema, InsecureHttpManagementChallengeResponseSchema, InstanceDescriptorSchema, InstanceDescriptorWireSchema, JsonValueSchema, LinkedAccountIdSchema, LinkedAccountMethodSchema, LinkedAccountPlatformIdSchema, LinkedAccountPlatformToolSchema, LinkedAccountTokenSourceSchema, LinkedAccountUseSchema, LinkedAccountUsesViewSchema, LinkedAccountViewSchema, LinkedAccountsViewSchema, LlmDiscoveredModelSchema, LlmModelInputModalitiesSchema, LlmModelReasoningEffortsSchema, LlmProviderCredentialSchema, LlmProviderModelSchema, LlmProviderSettingsSchema, LlmProviderTestResultSchema, LlmProviderViewSchema, LocalGithubLoginSchema, LogicalMessageIdSchema, MANAGEMENT_PAIR_PROOF_PREFIX, ManagementChallengeResponseSchema, ManagementDeviceEnrollmentRequestSchema, ManagementDeviceEnrollmentResponseSchema, ManagementDeviceIdSchema, ManagementDeviceViewSchema, ManagementSessionRequestSchema, ManagementSessionResponseSchema, McpServerFormSchema, MessageDeliverySummarySchema, MessagePacingSchema, MessagePacingSettingsSchema, MessagePartSchema, MessagePartsSchema, MessageRendererContributionSchema, ModelFallbackReasonSchema, ModelFallbackSettingsSchema, ModelProviderAccessSchema, NO_SUB_CONVERSATION_MODELS, NonEmptyMessagePartsSchema, NotificationEventKeySchema, NotificationSettingsViewSchema, OutboundIntentIdSchema, PANEL_ANCHOR_LAYER, PROMPT_DOCUMENT_MAX_PLAIN_TEXT_LENGTH, PROMPT_DOCUMENT_MAX_REFERENCES, PanelContributionSchema, PanelDensitySchema, PhysicalDeliveryIdSchema, PlatformIdentityIdSchema, PlatformUserListResponseSchema, ProductUpdateStatusSchema, PromptDocumentV1Schema, PromptSegmentSchema, RESPONSE_TIMING_DEFAULTS, RESPONSE_TIMING_LIMITS, RESPONSE_WAIT_MIN_QUIET_SECONDS, RICH_EXTENSION_MAX_BYTES, RemoveCredentialRequestSchema, RemoveCredentialResultSchema, RemoveLinkedAccountRequestSchema, RemoveLinkedAccountResultSchema, ReplaceCredentialValueRequestSchema, ReplaceLinkedAccountTokenRequestSchema, ResponseTimingSettingsSchema, RetrievalModeSchema, RetrievalStatusSchema, RichExtensionSchema, RichKindSchema, RichTargetUrlSchema, RuntimeCompatibilityDiagnosticSchema, SUB_CONVERSATION_MAIN_MODEL, SUB_CONVERSATION_MODEL_LIMITS, ScheduledTaskIdSchema, ScheduledTaskSchema, ServerInstanceIdSchema, SetModelProviderAccessRequestSchema, SubConversationIdSchema, SubConversationRetentionSchema, SubConversationSchema, SubConversationSettingsSchema, SubscriptionStatusSchema, TestBarkNotificationRequestSchema, ToolViewContributionSchema, ToolViewDensitySchema, UNBOUND_CHANNEL_GROUP_ID, UpdateCredentialRequestSchema, UpdateNotificationSettingsRequestSchema, UpgradeBackupModeSchema, UpgradeBackupSettingsSchema, VerificationBrowserAvailabilitySchema, WorkTreeOrderSchema, activityDurationMs, adminOnlyConfigKeys, agentPermissionDeclaration, buildHostApiContractPath, buildHostApiPath, commandNameOf, commandUsage, communityPersonaReviewLabel, communityPublisherLabel, communityReviewLabel, configDescription, configFieldKind, configFieldLevel, configFields, configSchema, configSecretKeys, credentialRequestRoute, extensionCapabilitiesExpand, extensionSdkVersion, formatLogMessage, hostLayerAsCapabilities, hostLogDebugLeaseSchema, hostLogDebugRequestSchema, hostLogEntrySchema, hostLogLevelSchema, hostLogPageSchema, hostLogQuerySchema, hostLogScopeSchema, hostLogSettingsSchema, hostLogSettingsUpdateSchema, hostLogSourceKindSchema, hostLogSourceSchema, hostLogStatusSchema, hostLogStreamEventSchema, hostPageRailOrder, hostPermissionDeclaration, insecureHttpManagementPairProofMessage, managementPairProofMessage, mcpSecretFields, messagePartAssetId, messagePartAssetIds, messagePartImageAssetIds, messagePartsSearchText, normalizePromptDocument, outboundProcessesBeforeSend, parseCommandArguments, parseConfigValue, parseJsonValue, parseMessageParts, promptDocumentFromText, promptDocumentPlainText, recognizeCommand, requiredExtensionSdkLevel, resolveResponseTiming, richPartContextText, summarizeExtensionCapabilities, tokenizeCommand, undeliveredCommandReplies, validateConfigValue };
|
|
7690
8635
|
|
|
7691
8636
|
//# sourceMappingURL=index.mjs.map
|