@nekro-nxt/contracts 0.3.0 → 0.4.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 +469 -18
- package/dist/index.mjs.map +1 -1
- package/lib/types/extension-capabilities.d.ts +102 -3
- package/lib/types/extension-capabilities.d.ts.map +1 -1
- package/lib/types/extension-ui.d.ts +82 -3
- package/lib/types/extension-ui.d.ts.map +1 -1
- package/lib/types/host-api.d.ts +1676 -273
- package/lib/types/host-api.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/extension-capabilities.ts +152 -8
- package/src/extension-ui.ts +40 -0
- package/src/host-api.ts +374 -15
package/dist/index.mjs
CHANGED
|
@@ -524,9 +524,32 @@ const configSchema = {
|
|
|
524
524
|
/**
|
|
525
525
|
* Host capability level this build implements. A Revision that declares `requires.sdk` above it is rejected at
|
|
526
526
|
* import with an "upgrade NekroNXT" message instead of an opaque schema error. Bump when a Manifest capability
|
|
527
|
-
* ships; never reuse a level for a different meaning. Level 7 is Manifest V7 (host instance + agent attachments)
|
|
527
|
+
* 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
|
|
528
|
+
* images, the search index and host-layer model calls.
|
|
528
529
|
*/
|
|
529
|
-
const EXTENSION_SDK_LEVEL =
|
|
530
|
+
const EXTENSION_SDK_LEVEL = 8;
|
|
531
|
+
/**
|
|
532
|
+
* The first NekroNXT version of each capability level, so users read "needs NekroNXT 0.5.0" rather than a level
|
|
533
|
+
* number. Add the row for a new level in the change that raises EXTENSION_SDK_LEVEL; a test keeps the two in step.
|
|
534
|
+
*/
|
|
535
|
+
const EXTENSION_SDK_RELEASES = [
|
|
536
|
+
{
|
|
537
|
+
level: 6,
|
|
538
|
+
version: "0.3.0"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
level: 7,
|
|
542
|
+
version: "0.4.0"
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
level: 8,
|
|
546
|
+
version: "0.5.0"
|
|
547
|
+
}
|
|
548
|
+
];
|
|
549
|
+
/** The oldest NekroNXT version that supports `level`; undefined for a level no release supports yet. */
|
|
550
|
+
const extensionSdkVersion = (level) => EXTENSION_SDK_RELEASES.find((release) => release.level >= level)?.version;
|
|
551
|
+
/** Manifest V7 itself; extensions that use nothing newer need this level. */
|
|
552
|
+
const EXTENSION_SDK_BASE_LEVEL = 7;
|
|
530
553
|
const ExtensionRequiresSchema = z.object({ sdk: z.number().int().min(1).max(1e3) }).strict();
|
|
531
554
|
/** `api.example.com` or `*.example.com` (subdomains only); lower-case DNS labels, no scheme, port or path. */
|
|
532
555
|
const ExtensionNetworkDomainSchema = z.string().trim().toLowerCase().max(253).regex(/^(\*\.)?(?=.{1,253}$)([a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)(\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)+$/u, { message: "网络域名必须是 api.example.com 或 *.example.com 形式,不含协议、端口和路径。" });
|
|
@@ -603,6 +626,45 @@ const ExtensionPlatformCapabilitySchema = z.object({
|
|
|
603
626
|
/** Adapters whose raw API passthrough the extension may call. */
|
|
604
627
|
raw: z.array(AdapterKeySchema).max(8).default([])
|
|
605
628
|
}).strict();
|
|
629
|
+
const EXTENSION_ASSET_LIBRARY_DEFAULT_QUOTA_BYTES = 2 * 1024 * 1024 * 1024;
|
|
630
|
+
const EXTENSION_ASSET_LIBRARY_MAX_QUOTA_BYTES = 32 * 1024 * 1024 * 1024;
|
|
631
|
+
const ExtensionAssetLibraryCapabilitySchema = z.object({ quotaBytes: z.number().int().min(1024 * 1024).max(EXTENSION_ASSET_LIBRARY_MAX_QUOTA_BYTES).optional() }).strict();
|
|
632
|
+
/**
|
|
633
|
+
* `write` creates Assets in the current channel; `library` keeps Assets in the extension's own library so they can be
|
|
634
|
+
* used in any channel later.
|
|
635
|
+
*/
|
|
636
|
+
const ExtensionAssetsCapabilitySchema = z.object({
|
|
637
|
+
write: z.literal(true).optional(),
|
|
638
|
+
library: ExtensionAssetLibraryCapabilitySchema.optional()
|
|
639
|
+
}).strict().refine((value) => value.write !== void 0 || value.library !== void 0, "assets 至少声明 write 或 library。");
|
|
640
|
+
const IndexNameSchema = z.string().trim().regex(/^[a-z][a-z0-9_]{0,31}$/u, "索引、字段和过滤项名称只能使用小写字母、数字和下划线,以字母开头。");
|
|
641
|
+
const EXTENSION_INDEX_MAX_TEXT_FIELDS = 4;
|
|
642
|
+
const EXTENSION_INDEX_MAX_FILTERS = 4;
|
|
643
|
+
/**
|
|
644
|
+
* One searchable collection. Text fields are matched by keywords (and vectors when the Host has them enabled); weights
|
|
645
|
+
* rank keyword matches. Filter fields hold short keyword values, possibly several per document.
|
|
646
|
+
*/
|
|
647
|
+
const ExtensionIndexCollectionSchema = z.object({
|
|
648
|
+
name: IndexNameSchema,
|
|
649
|
+
fields: z.array(z.object({
|
|
650
|
+
name: IndexNameSchema,
|
|
651
|
+
weight: z.number().min(.1).max(10).default(1)
|
|
652
|
+
}).strict()).min(1).max(4),
|
|
653
|
+
filters: z.array(IndexNameSchema).max(4).default([])
|
|
654
|
+
}).strict().superRefine((value, context) => {
|
|
655
|
+
const names = [...value.fields.map(({ name }) => name), ...value.filters];
|
|
656
|
+
if (new Set(names).size !== names.length) context.addIssue({
|
|
657
|
+
code: "custom",
|
|
658
|
+
message: "同一索引里的字段与过滤项不能重名。"
|
|
659
|
+
});
|
|
660
|
+
});
|
|
661
|
+
const ExtensionIndexCapabilitySchema = z.object({ collections: z.array(ExtensionIndexCollectionSchema).min(1).max(4).refine((value) => new Set(value.map(({ name }) => name)).size === value.length, "索引名称不能重复。") }).strict();
|
|
662
|
+
const EXTENSION_MODEL_MAX_CALLS_PER_MINUTE = 120;
|
|
663
|
+
/** Calls to a model the user picks from the Host's configured models, with images allowed; host layer only. */
|
|
664
|
+
const ExtensionModelsCapabilitySchema = z.object({
|
|
665
|
+
maxCallsPerMinute: z.number().int().min(1).max(120),
|
|
666
|
+
maxOutputTokens: z.number().int().min(64).max(EXTENSION_LLM_MAX_OUTPUT_TOKENS)
|
|
667
|
+
}).strict();
|
|
606
668
|
/** A header or environment value: literal text, or the current value of a `meta.role: 'secret'` config field. */
|
|
607
669
|
const ExtensionMcpValueSchema = z.union([z.string().max(4096), z.object({ secret: z.string().trim().min(1).max(64) }).strict()]);
|
|
608
670
|
/** Becomes the model-facing tool prefix `mcp__<name>__`. */
|
|
@@ -663,7 +725,10 @@ const mcpTarget = (server) => server.transport === "stdio" ? JSON.stringify([
|
|
|
663
725
|
const ExtensionCapabilitiesSchema = z.object({
|
|
664
726
|
network: ExtensionNetworkCapabilitySchema.optional(),
|
|
665
727
|
storage: ExtensionStorageCapabilitySchema.optional(),
|
|
666
|
-
assets:
|
|
728
|
+
assets: ExtensionAssetsCapabilitySchema.optional(),
|
|
729
|
+
index: ExtensionIndexCapabilitySchema.optional(),
|
|
730
|
+
/** Host layer only; the agent layer uses `llm`, which runs on the agent's own model. */
|
|
731
|
+
models: ExtensionModelsCapabilitySchema.optional(),
|
|
667
732
|
history: z.object({ read: z.literal(true) }).strict().optional(),
|
|
668
733
|
inboundHook: ExtensionInboundHookCapabilitySchema.optional(),
|
|
669
734
|
jobs: ExtensionJobsCapabilitySchema.optional(),
|
|
@@ -678,7 +743,12 @@ const ExtensionCapabilitiesSchema = z.object({
|
|
|
678
743
|
*/
|
|
679
744
|
const HostLayerCapabilitiesSchema = z.object({
|
|
680
745
|
network: ExtensionNetworkCapabilitySchema.optional(),
|
|
681
|
-
storage: z.object({ quotaBytes: z.number().int().min(1024).max(EXTENSION_STORAGE_MAX_QUOTA_BYTES).optional() }).strict().optional()
|
|
746
|
+
storage: z.object({ quotaBytes: z.number().int().min(1024).max(EXTENSION_STORAGE_MAX_QUOTA_BYTES).optional() }).strict().optional(),
|
|
747
|
+
/** The same library agent attachments use; the host instance lists and imports into it. */
|
|
748
|
+
assets: z.object({ library: ExtensionAssetLibraryCapabilitySchema }).strict().optional(),
|
|
749
|
+
/** The same collections agent attachments declare; pages search and maintain them. */
|
|
750
|
+
index: ExtensionIndexCapabilitySchema.optional(),
|
|
751
|
+
models: ExtensionModelsCapabilitySchema.optional()
|
|
682
752
|
}).strict();
|
|
683
753
|
/** Host-layer capabilities in the agent-capability shape, so digests, expansion and summaries share one implementation. */
|
|
684
754
|
const hostLayerAsCapabilities = (host) => host === void 0 || Object.keys(host).length === 0 ? void 0 : {
|
|
@@ -686,7 +756,10 @@ const hostLayerAsCapabilities = (host) => host === void 0 || Object.keys(host).l
|
|
|
686
756
|
...host.storage === void 0 ? {} : { storage: {
|
|
687
757
|
scopes: ["shared"],
|
|
688
758
|
...host.storage.quotaBytes === void 0 ? {} : { quotaBytes: host.storage.quotaBytes }
|
|
689
|
-
} }
|
|
759
|
+
} },
|
|
760
|
+
...host.assets === void 0 ? {} : { assets: { library: host.assets.library } },
|
|
761
|
+
...host.index === void 0 ? {} : { index: host.index },
|
|
762
|
+
...host.models === void 0 ? {} : { models: host.models }
|
|
690
763
|
};
|
|
691
764
|
const NETWORK_MODE_RANK = {
|
|
692
765
|
domains: 0,
|
|
@@ -710,7 +783,9 @@ const extensionCapabilitiesExpand = (previous, next) => {
|
|
|
710
783
|
if (next === void 0) return false;
|
|
711
784
|
if (networkExpands(previous?.network, next.network)) return true;
|
|
712
785
|
if (next.storage?.scopes.some((scope) => !(previous?.storage?.scopes ?? []).includes(scope))) return true;
|
|
713
|
-
if (next.assets !== void 0 && previous?.assets === void 0) return true;
|
|
786
|
+
if (next.assets?.write !== void 0 && previous?.assets?.write === void 0) return true;
|
|
787
|
+
if (next.assets?.library !== void 0 && previous?.assets?.library === void 0) return true;
|
|
788
|
+
if (next.models !== void 0 && (previous?.models === void 0 || next.models.maxCallsPerMinute > previous.models.maxCallsPerMinute || next.models.maxOutputTokens > previous.models.maxOutputTokens)) return true;
|
|
714
789
|
if (next.history !== void 0 && previous?.history === void 0) return true;
|
|
715
790
|
const platformKey = ({ adapter, action }) => `${adapter}:${action}`;
|
|
716
791
|
const previousActions = new Set((previous?.platform?.actions ?? []).map(platformKey));
|
|
@@ -725,6 +800,7 @@ const extensionCapabilitiesExpand = (previous, next) => {
|
|
|
725
800
|
if (next.llm !== void 0 && (previous?.llm === void 0 || next.llm.maxCallsPerTurn > previous.llm.maxCallsPerTurn || next.llm.maxOutputTokens > previous.llm.maxOutputTokens)) return true;
|
|
726
801
|
return false;
|
|
727
802
|
};
|
|
803
|
+
const formatLibraryQuota = (bytes) => bytes >= 1024 * 1024 * 1024 ? `${+(bytes / 1024 / 1024 / 1024).toFixed(1)} GB` : `${Math.round(bytes / 1024 / 1024)} MB`;
|
|
728
804
|
/**
|
|
729
805
|
* User-facing summary of declared capabilities, in a stable order, for approval and inspection pages. `layer: 'host'`
|
|
730
806
|
* phrases host-layer capabilities (passed through {@link hostLayerAsCapabilities}) for the host instance.
|
|
@@ -764,11 +840,29 @@ const summarizeExtensionCapabilities = (capabilities, options = {}) => {
|
|
|
764
840
|
label: shared ? "保存数据,并在启用它的智能体之间共享" : "为这个智能体保存数据"
|
|
765
841
|
});
|
|
766
842
|
}
|
|
767
|
-
if (capabilities.assets !== void 0) items.push({
|
|
843
|
+
if (capabilities.assets?.write !== void 0) items.push({
|
|
768
844
|
key: "assets",
|
|
769
845
|
risk: "normal",
|
|
770
846
|
label: "在当前频道生成图片或文件"
|
|
771
847
|
});
|
|
848
|
+
if (capabilities.assets?.library !== void 0) items.push({
|
|
849
|
+
key: "assets.library",
|
|
850
|
+
risk: "sensitive",
|
|
851
|
+
label: "把频道里的图片收进扩展资源库,之后可以在其他频道使用",
|
|
852
|
+
detail: `最多 ${formatLibraryQuota(capabilities.assets.library.quotaBytes ?? 2147483648)}`
|
|
853
|
+
});
|
|
854
|
+
if (capabilities.index !== void 0) items.push({
|
|
855
|
+
key: "index",
|
|
856
|
+
risk: "normal",
|
|
857
|
+
label: "建立可搜索的索引",
|
|
858
|
+
detail: capabilities.index.collections.map(({ name }) => name).join("、")
|
|
859
|
+
});
|
|
860
|
+
if (capabilities.models !== void 0) items.push({
|
|
861
|
+
key: "models",
|
|
862
|
+
risk: "sensitive",
|
|
863
|
+
label: "使用本机已配置的模型,可以发送图片",
|
|
864
|
+
detail: `每分钟最多 ${capabilities.models.maxCallsPerMinute} 次,计入所选模型的用量`
|
|
865
|
+
});
|
|
772
866
|
if (capabilities.history !== void 0) items.push({
|
|
773
867
|
key: "history",
|
|
774
868
|
risk: "normal",
|
|
@@ -1014,7 +1108,21 @@ const ExtensionPermissionsSchema = z.object({
|
|
|
1014
1108
|
networkOrigins: z.array(HostUiNetworkOriginSchema).max(32).default([]),
|
|
1015
1109
|
host: HostLayerCapabilitiesSchema.optional(),
|
|
1016
1110
|
agent: ExtensionCapabilitiesSchema.optional()
|
|
1017
|
-
}).strict().superRefine(checkBrowserPermissions)
|
|
1111
|
+
}).strict().superRefine(checkBrowserPermissions).superRefine((value, context) => {
|
|
1112
|
+
if (value.agent?.models !== void 0) context.addIssue({
|
|
1113
|
+
code: "custom",
|
|
1114
|
+
path: ["agent", "models"],
|
|
1115
|
+
message: "models 只能在 permissions.host 中声明;智能体层使用 llm 调用智能体自己的模型。"
|
|
1116
|
+
});
|
|
1117
|
+
for (const collection of value.agent?.index?.collections ?? []) {
|
|
1118
|
+
const host = value.host?.index?.collections.find(({ name }) => name === collection.name);
|
|
1119
|
+
if (host !== void 0 && JSON.stringify(host) !== JSON.stringify(collection)) context.addIssue({
|
|
1120
|
+
code: "custom",
|
|
1121
|
+
path: ["agent", "index"],
|
|
1122
|
+
message: `索引 ${collection.name} 在 permissions.host 与 permissions.agent 中的定义不一致。`
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1125
|
+
});
|
|
1018
1126
|
const EMPTY_EXTENSION_PERMISSIONS = {
|
|
1019
1127
|
permissions: [],
|
|
1020
1128
|
networkOrigins: []
|
|
@@ -1206,6 +1314,26 @@ const EXTENSION_DATA_HOOK_PERMISSIONS = {
|
|
|
1206
1314
|
useConnection: "connections.read",
|
|
1207
1315
|
useChannelRuntime: "runtime.read"
|
|
1208
1316
|
};
|
|
1317
|
+
/**
|
|
1318
|
+
* The capability level a set of permissions needs: Manifest V7 itself, or the level that introduced the newest
|
|
1319
|
+
* capability it declares. Packaging and import compare it with `requires.sdk`, so an extension cannot claim a level
|
|
1320
|
+
* too old for what it uses.
|
|
1321
|
+
*/
|
|
1322
|
+
const requiredExtensionSdkLevel = (permissions) => {
|
|
1323
|
+
const level8 = [
|
|
1324
|
+
permissions?.host?.assets === void 0 ? void 0 : "扩展资源库",
|
|
1325
|
+
permissions?.agent?.assets?.library === void 0 ? void 0 : "扩展资源库",
|
|
1326
|
+
permissions?.host?.index === void 0 && permissions?.agent?.index === void 0 ? void 0 : "检索索引",
|
|
1327
|
+
permissions?.host?.models === void 0 ? void 0 : "本机层模型调用"
|
|
1328
|
+
].filter((name) => name !== void 0);
|
|
1329
|
+
return level8.length > 0 ? {
|
|
1330
|
+
level: 8,
|
|
1331
|
+
capabilities: [...new Set(level8)]
|
|
1332
|
+
} : {
|
|
1333
|
+
level: 7,
|
|
1334
|
+
capabilities: []
|
|
1335
|
+
};
|
|
1336
|
+
};
|
|
1209
1337
|
//#endregion
|
|
1210
1338
|
//#region src/runtime-compatibility.ts
|
|
1211
1339
|
const RuntimeCompatibilityDiagnosticSchema = z.object({
|
|
@@ -1980,7 +2108,11 @@ const AgentCapabilitiesSchema = z.object({
|
|
|
1980
2108
|
developmentShell: z.boolean(),
|
|
1981
2109
|
unrestrictedFileAccess: z.boolean(),
|
|
1982
2110
|
/** Absent in older clients means on. */
|
|
1983
|
-
scheduledTasks: z.boolean().default(true)
|
|
2111
|
+
scheduledTasks: z.boolean().default(true),
|
|
2112
|
+
/** Tools are called from one TypeScript program (`run_code`); takes effect only with `developmentShell`. */
|
|
2113
|
+
codeRun: z.boolean().default(false),
|
|
2114
|
+
/** Network for commands; absent in older clients means on. */
|
|
2115
|
+
commandNetwork: z.boolean().default(true)
|
|
1984
2116
|
}).strict();
|
|
1985
2117
|
const DynamicClientApprovalPolicySchema = z.enum(["manual", "automatic"]);
|
|
1986
2118
|
const NotificationEventKeySchema = z.enum(["dynamic-client-approval-requested"]);
|
|
@@ -2038,7 +2170,11 @@ const CreateAgentRequestSchema = AgentRevisionRequestContentSchema.extend({ capa
|
|
|
2038
2170
|
const ReviseAgentRequestSchema = AgentRevisionRequestContentSchema.extend({ expectedCurrentRevisionId: AgentRevisionIdSchema }).superRefine((value, context) => {
|
|
2039
2171
|
validatePersonaDocumentProjection(value, context);
|
|
2040
2172
|
});
|
|
2041
|
-
const UpdateAgentCapabilitiesRequestSchema = AgentCapabilitiesSchema.partial().extend({
|
|
2173
|
+
const UpdateAgentCapabilitiesRequestSchema = AgentCapabilitiesSchema.partial().extend({
|
|
2174
|
+
scheduledTasks: z.boolean().optional(),
|
|
2175
|
+
codeRun: z.boolean().optional(),
|
|
2176
|
+
commandNetwork: z.boolean().optional()
|
|
2177
|
+
}).strict().refine((value) => Object.values(value).some((entry) => entry !== void 0), "至少提供一个能力。");
|
|
2042
2178
|
const TriggerPolicySchema = z.enum([
|
|
2043
2179
|
"always",
|
|
2044
2180
|
"mentioned-or-replied",
|
|
@@ -2225,7 +2361,7 @@ const ChannelRuntimeUsageSchema = z.object({
|
|
|
2225
2361
|
cacheWriteTokens: z.number().int().nonnegative().optional(),
|
|
2226
2362
|
reasoningTokens: z.number().int().nonnegative().optional()
|
|
2227
2363
|
}).strict();
|
|
2228
|
-
const
|
|
2364
|
+
const channelRuntimeToolFields = {
|
|
2229
2365
|
callId: NonEmptyStringSchema,
|
|
2230
2366
|
name: NonEmptyStringSchema,
|
|
2231
2367
|
displayName: NonEmptyStringSchema,
|
|
@@ -2244,6 +2380,13 @@ const ChannelRuntimeToolSchema = z.object({
|
|
|
2244
2380
|
"unknown"
|
|
2245
2381
|
]).optional(),
|
|
2246
2382
|
durationMs: z.number().int().nonnegative().optional()
|
|
2383
|
+
};
|
|
2384
|
+
const ChannelRuntimeToolSchema = z.object({
|
|
2385
|
+
...channelRuntimeToolFields,
|
|
2386
|
+
/** Source of a `run_code` program. */
|
|
2387
|
+
code: z.string().optional(),
|
|
2388
|
+
/** Tools a `run_code` program called, in the order they started. */
|
|
2389
|
+
children: z.array(z.object(channelRuntimeToolFields).strict()).optional()
|
|
2247
2390
|
}).strict();
|
|
2248
2391
|
const ChannelRuntimeStepSchema = z.object({
|
|
2249
2392
|
step: z.number().int().nonnegative(),
|
|
@@ -2309,7 +2452,9 @@ const ChannelRuntimeOccupancySchema = z.object({
|
|
|
2309
2452
|
systemTokens: z.number().int().nonnegative(),
|
|
2310
2453
|
toolsTokens: z.number().int().nonnegative(),
|
|
2311
2454
|
messageTokens: z.number().int().nonnegative()
|
|
2312
|
-
}).strict().optional()
|
|
2455
|
+
}).strict().optional(),
|
|
2456
|
+
/** Pictures in the conversation; their tokens are not in the breakdown, so they make up most of the rest. */
|
|
2457
|
+
imageCount: z.number().int().nonnegative().optional()
|
|
2313
2458
|
}).strict();
|
|
2314
2459
|
const ChannelRuntimeCacheSampleSchema = z.object({
|
|
2315
2460
|
turn: z.number().int().nonnegative(),
|
|
@@ -2363,6 +2508,41 @@ const ChannelRuntimePerformanceSchema = z.object({
|
|
|
2363
2508
|
samples: z.array(ChannelRuntimePerformanceSampleSchema)
|
|
2364
2509
|
}).strict()
|
|
2365
2510
|
}).strict();
|
|
2511
|
+
/** What the agent remembered or looked up, newest first; the admin sees it, the model does not. */
|
|
2512
|
+
const ChannelMemoryActivitySchema = z.discriminatedUnion("kind", [
|
|
2513
|
+
z.object({
|
|
2514
|
+
kind: z.literal("backlog-folded"),
|
|
2515
|
+
at: z.number().nonnegative().optional(),
|
|
2516
|
+
foldedCount: z.number().int().nonnegative(),
|
|
2517
|
+
shownCount: z.number().int().nonnegative(),
|
|
2518
|
+
foldedImageCount: z.number().int().nonnegative()
|
|
2519
|
+
}).strict(),
|
|
2520
|
+
z.object({
|
|
2521
|
+
kind: z.literal("history-search"),
|
|
2522
|
+
at: z.number().nonnegative().optional(),
|
|
2523
|
+
query: z.string(),
|
|
2524
|
+
hits: z.number().int().nonnegative(),
|
|
2525
|
+
sender: z.string().optional()
|
|
2526
|
+
}).strict(),
|
|
2527
|
+
z.object({
|
|
2528
|
+
kind: z.literal("notes-updated"),
|
|
2529
|
+
at: z.number().nonnegative().optional(),
|
|
2530
|
+
revision: z.number().int().nonnegative(),
|
|
2531
|
+
chars: z.number().int().nonnegative()
|
|
2532
|
+
}).strict(),
|
|
2533
|
+
z.object({
|
|
2534
|
+
kind: z.literal("member-notes-updated"),
|
|
2535
|
+
at: z.number().nonnegative().optional(),
|
|
2536
|
+
memberId: z.string(),
|
|
2537
|
+
name: z.string().optional(),
|
|
2538
|
+
chars: z.number().int().nonnegative()
|
|
2539
|
+
}).strict(),
|
|
2540
|
+
z.object({
|
|
2541
|
+
kind: z.literal("idle-review"),
|
|
2542
|
+
at: z.number().nonnegative().optional(),
|
|
2543
|
+
quietMinutes: z.number().int().nonnegative()
|
|
2544
|
+
}).strict()
|
|
2545
|
+
]);
|
|
2366
2546
|
const ChannelRuntimeProjectionSchema = z.object({
|
|
2367
2547
|
channelId: ChannelIdSchema,
|
|
2368
2548
|
agentId: AgentIdSchema.optional(),
|
|
@@ -2373,6 +2553,7 @@ const ChannelRuntimeProjectionSchema = z.object({
|
|
|
2373
2553
|
occupancy: ChannelRuntimeOccupancySchema.optional(),
|
|
2374
2554
|
cache: ChannelRuntimeCacheSchema.optional(),
|
|
2375
2555
|
performance: ChannelRuntimePerformanceSchema.optional(),
|
|
2556
|
+
memory: z.array(ChannelMemoryActivitySchema).optional(),
|
|
2376
2557
|
turns: z.array(ChannelRuntimeTurnSchema)
|
|
2377
2558
|
}).strict();
|
|
2378
2559
|
const ChannelRuntimeSseDataSchema = ChannelRuntimeProjectionSchema.extend({
|
|
@@ -2410,10 +2591,9 @@ const ChannelRuntimeContextSchema = z.object({
|
|
|
2410
2591
|
toolCount: z.number().int().nonnegative()
|
|
2411
2592
|
}).strict())
|
|
2412
2593
|
}).strict();
|
|
2413
|
-
|
|
2414
|
-
const ChannelPromptViewSchema = z.object({
|
|
2594
|
+
const ChannelPromptPartSchema = z.object({
|
|
2415
2595
|
document: PromptDocumentV1Schema,
|
|
2416
|
-
/**
|
|
2596
|
+
/** Notes only: the agent may not rewrite them. */
|
|
2417
2597
|
locked: z.boolean(),
|
|
2418
2598
|
/** 0 before the first save; send it back as `expectedRevision`. */
|
|
2419
2599
|
revision: z.number().int().nonnegative(),
|
|
@@ -2427,6 +2607,119 @@ const ChannelPromptViewSchema = z.object({
|
|
|
2427
2607
|
updatedAt: z.number().int().nonnegative()
|
|
2428
2608
|
}).strict())
|
|
2429
2609
|
}).strict();
|
|
2610
|
+
/**
|
|
2611
|
+
* What the agent answering a channel reads about it, each part with recent earlier versions to restore: the admin's
|
|
2612
|
+
* instructions (system prompt) and the agent's own notes (runtime context).
|
|
2613
|
+
*/
|
|
2614
|
+
const ChannelPromptViewSchema = z.object({
|
|
2615
|
+
instructions: ChannelPromptPartSchema,
|
|
2616
|
+
notes: ChannelPromptPartSchema
|
|
2617
|
+
}).strict();
|
|
2618
|
+
/**
|
|
2619
|
+
* How much of a channel's unread backlog reaches the agent at once, and when it looks back on its own. Uncertain
|
|
2620
|
+
* trade-offs stay per channel: a busy meme group and a long tabletop session want different budgets.
|
|
2621
|
+
*/
|
|
2622
|
+
const ChannelContextPolicySchema = z.object({
|
|
2623
|
+
/** Text characters of a backlog read message by message; older messages collapse into one line. 0: no limit. */
|
|
2624
|
+
backlogTextChars: z.number().int().nonnegative().max(1e6),
|
|
2625
|
+
/** Backlog images shown as pictures, newest first; the rest stay references the agent can open. */
|
|
2626
|
+
backlogImages: z.number().int().nonnegative().max(20),
|
|
2627
|
+
/** Quiet minutes after which the agent reviews the conversation and updates its notes. 0: off. */
|
|
2628
|
+
idleReviewMinutes: z.number().int().nonnegative().max(1440)
|
|
2629
|
+
}).strict();
|
|
2630
|
+
const DEFAULT_CHANNEL_CONTEXT_POLICY = Object.freeze({
|
|
2631
|
+
backlogTextChars: 4e4,
|
|
2632
|
+
backlogImages: 6,
|
|
2633
|
+
idleReviewMinutes: 45
|
|
2634
|
+
});
|
|
2635
|
+
const ChannelContextPolicyViewSchema = z.object({
|
|
2636
|
+
policy: ChannelContextPolicySchema,
|
|
2637
|
+
defaults: ChannelContextPolicySchema,
|
|
2638
|
+
/** False while the channel follows the defaults. */
|
|
2639
|
+
custom: z.boolean()
|
|
2640
|
+
}).strict();
|
|
2641
|
+
/** Whether a newer release exists on the build's own channel; development builds are never compared. */
|
|
2642
|
+
const ProductUpdateStatusSchema = z.object({
|
|
2643
|
+
channel: z.enum([
|
|
2644
|
+
"stable",
|
|
2645
|
+
"preview",
|
|
2646
|
+
"development"
|
|
2647
|
+
]),
|
|
2648
|
+
currentVersion: z.string(),
|
|
2649
|
+
/** Short commit of a release build. */
|
|
2650
|
+
currentCommit: z.string().optional(),
|
|
2651
|
+
state: z.enum([
|
|
2652
|
+
"unknown",
|
|
2653
|
+
"up-to-date",
|
|
2654
|
+
"available",
|
|
2655
|
+
"failed",
|
|
2656
|
+
"unsupported"
|
|
2657
|
+
]),
|
|
2658
|
+
latest: z.object({
|
|
2659
|
+
version: z.string(),
|
|
2660
|
+
commit: z.string().optional(),
|
|
2661
|
+
url: z.string().url(),
|
|
2662
|
+
publishedAt: z.number().int().nonnegative().optional()
|
|
2663
|
+
}).strict().optional(),
|
|
2664
|
+
checkedAt: z.number().int().nonnegative().optional(),
|
|
2665
|
+
error: z.string().optional(),
|
|
2666
|
+
autoCheck: z.boolean()
|
|
2667
|
+
}).strict();
|
|
2668
|
+
/** Pause between consecutive messages an agent sends to one channel; longer messages wait a little longer. */
|
|
2669
|
+
const MessagePacingSchema = z.enum([
|
|
2670
|
+
"off",
|
|
2671
|
+
"fast",
|
|
2672
|
+
"normal",
|
|
2673
|
+
"slow"
|
|
2674
|
+
]);
|
|
2675
|
+
const DEFAULT_MESSAGE_PACING = "normal";
|
|
2676
|
+
const MessagePacingSettingsSchema = z.object({ pacing: MessagePacingSchema }).strict();
|
|
2677
|
+
/** `keyword`: SQLite keyword search only; `builtin`: keywords fused with the built-in semantic model. */
|
|
2678
|
+
const RetrievalModeSchema = z.enum(["keyword", "builtin"]);
|
|
2679
|
+
/** Search used by extension indexes (表情包与扩展素材能力 §6.4). */
|
|
2680
|
+
const RetrievalStatusSchema = z.object({
|
|
2681
|
+
mode: RetrievalModeSchema,
|
|
2682
|
+
builtin: z.object({
|
|
2683
|
+
model: z.string(),
|
|
2684
|
+
/** False where no inference runtime is published for this system and processor. */
|
|
2685
|
+
supported: z.boolean(),
|
|
2686
|
+
downloadBytes: z.number().int().nonnegative(),
|
|
2687
|
+
install: z.discriminatedUnion("state", [
|
|
2688
|
+
z.object({ state: z.literal("not-installed") }).strict(),
|
|
2689
|
+
z.object({
|
|
2690
|
+
state: z.literal("downloading"),
|
|
2691
|
+
receivedBytes: z.number().int().nonnegative(),
|
|
2692
|
+
totalBytes: z.number().int().nonnegative()
|
|
2693
|
+
}).strict(),
|
|
2694
|
+
z.object({ state: z.literal("installed") }).strict(),
|
|
2695
|
+
z.object({
|
|
2696
|
+
state: z.literal("failed"),
|
|
2697
|
+
error: z.string()
|
|
2698
|
+
}).strict()
|
|
2699
|
+
])
|
|
2700
|
+
}).strict(),
|
|
2701
|
+
vectors: z.object({
|
|
2702
|
+
documents: z.number().int().nonnegative(),
|
|
2703
|
+
embedded: z.number().int().nonnegative(),
|
|
2704
|
+
state: z.enum([
|
|
2705
|
+
"idle",
|
|
2706
|
+
"running",
|
|
2707
|
+
"ready"
|
|
2708
|
+
]),
|
|
2709
|
+
error: z.string().optional()
|
|
2710
|
+
}).strict()
|
|
2711
|
+
}).strict();
|
|
2712
|
+
/** What the agent keeps about individual members of one channel; each note comes with that member's messages. */
|
|
2713
|
+
const ChannelMemberNotesViewSchema = z.object({
|
|
2714
|
+
notes: z.array(z.object({
|
|
2715
|
+
memberId: ChannelMemberIdSchema,
|
|
2716
|
+
displayName: z.string().optional(),
|
|
2717
|
+
text: z.string(),
|
|
2718
|
+
updatedBy: z.enum(["admin", "agent"]),
|
|
2719
|
+
updatedAt: z.number().int().nonnegative()
|
|
2720
|
+
}).strict()),
|
|
2721
|
+
maxChars: z.number().int().positive()
|
|
2722
|
+
}).strict();
|
|
2430
2723
|
const AdapterConnectionCreationSchema = z.object({
|
|
2431
2724
|
mode: z.enum(["schema-form", "qr-login"]),
|
|
2432
2725
|
actionLabel: z.string().trim().min(1).optional(),
|
|
@@ -2455,7 +2748,8 @@ const AdapterConnectionDescriptorSchema = z.object({
|
|
|
2455
2748
|
"internal",
|
|
2456
2749
|
"direct",
|
|
2457
2750
|
"group"
|
|
2458
|
-
])).optional()
|
|
2751
|
+
])).optional(),
|
|
2752
|
+
directedAt: z.enum(["member", "message"]).optional()
|
|
2459
2753
|
}).strict()),
|
|
2460
2754
|
features: z.object({ processingFeedback: z.object({ channelKinds: z.array(z.enum(["direct", "group"])).min(1) }).strict().optional() }).strict(),
|
|
2461
2755
|
diagnostics: z.object({
|
|
@@ -2665,6 +2959,27 @@ const ScheduledTaskSchema = z.object({
|
|
|
2665
2959
|
lastFiredAt: z.number().int().safe().optional(),
|
|
2666
2960
|
createdAt: z.number().int().safe()
|
|
2667
2961
|
}).strict();
|
|
2962
|
+
/** The Node that runs `run_code` programs, and the download the desktop app offers when there is none. */
|
|
2963
|
+
const CodeRunAvailabilitySchema = z.object({
|
|
2964
|
+
available: z.boolean(),
|
|
2965
|
+
source: z.enum([
|
|
2966
|
+
"host",
|
|
2967
|
+
"system",
|
|
2968
|
+
"downloaded"
|
|
2969
|
+
]).optional(),
|
|
2970
|
+
version: z.string().optional(),
|
|
2971
|
+
download: z.object({
|
|
2972
|
+
version: z.string(),
|
|
2973
|
+
state: z.enum([
|
|
2974
|
+
"idle",
|
|
2975
|
+
"downloading",
|
|
2976
|
+
"failed"
|
|
2977
|
+
]),
|
|
2978
|
+
receivedBytes: z.number().int().nonnegative().optional(),
|
|
2979
|
+
totalBytes: z.number().int().nonnegative().optional(),
|
|
2980
|
+
error: z.string().optional()
|
|
2981
|
+
}).strict().optional()
|
|
2982
|
+
}).strict();
|
|
2668
2983
|
const HostSnapshotSchema = z.object({
|
|
2669
2984
|
upgrade: HostUpgradeSummarySchema.optional(),
|
|
2670
2985
|
cursor: HostSyncCursorSchema,
|
|
@@ -2688,6 +3003,13 @@ const HostSnapshotSchema = z.object({
|
|
|
2688
3003
|
}).strict()),
|
|
2689
3004
|
capabilityAvailability: z.object({
|
|
2690
3005
|
subagents: z.object({ available: z.boolean() }).strict(),
|
|
3006
|
+
/** Optional in older hosts, which never offer `run_code`. */
|
|
3007
|
+
codeRun: CodeRunAvailabilitySchema.optional(),
|
|
3008
|
+
/** What this host can confine for commands beyond file writes; optional in older hosts. */
|
|
3009
|
+
commandConfinement: z.object({
|
|
3010
|
+
readScope: z.boolean(),
|
|
3011
|
+
networkControl: z.boolean()
|
|
3012
|
+
}).strict().optional(),
|
|
2691
3013
|
webSearch: z.object({
|
|
2692
3014
|
provider: z.literal("deepseek-official"),
|
|
2693
3015
|
available: z.boolean(),
|
|
@@ -2868,7 +3190,7 @@ const HostSnapshotSchema = z.object({
|
|
|
2868
3190
|
/** 扩展包自带图标的读取路径(同源、按摘要寻址、可长期缓存);没有图标时缺省。 */
|
|
2869
3191
|
iconUrl: z.string().regex(/^\/api\/extensions\/[^/]+\/revisions\/[^/]+\/icon\/[a-f0-9]{64}\.(?:svg|png|webp)$/u).optional(),
|
|
2870
3192
|
createdAt: z.number().int().safe().nonnegative(),
|
|
2871
|
-
/**
|
|
3193
|
+
/** 从社区安装的版本的来源;本机保存与文件导入没有来源。 */
|
|
2872
3194
|
source: CommunitySourceSchema.optional(),
|
|
2873
3195
|
provides: z.array(ExtensionProvideSchema),
|
|
2874
3196
|
/** Whether this Revision can be enabled for agents (agent-layer contributions or capabilities). */
|
|
@@ -3915,7 +4237,9 @@ const HostApiContracts = {
|
|
|
3915
4237
|
path: "/api/channels/:channelId/prompt",
|
|
3916
4238
|
params: channelParam,
|
|
3917
4239
|
request: z.object({
|
|
4240
|
+
kind: z.enum(["instructions", "notes"]),
|
|
3918
4241
|
document: PromptDocumentV1Schema,
|
|
4242
|
+
/** Notes only; ignored for instructions. */
|
|
3919
4243
|
locked: z.boolean(),
|
|
3920
4244
|
/** The revision the edit started from; a newer stored revision rejects the save. */
|
|
3921
4245
|
expectedRevision: z.number().int().nonnegative()
|
|
@@ -3923,6 +4247,133 @@ const HostApiContracts = {
|
|
|
3923
4247
|
response: ChannelPromptViewSchema,
|
|
3924
4248
|
error: HostApiErrorSchema
|
|
3925
4249
|
}),
|
|
4250
|
+
getProductUpdates: defineContract({
|
|
4251
|
+
method: "GET",
|
|
4252
|
+
path: "/api/product/updates",
|
|
4253
|
+
params: EmptyParamsSchema,
|
|
4254
|
+
request: NoRequestBodySchema,
|
|
4255
|
+
response: ProductUpdateStatusSchema,
|
|
4256
|
+
error: HostApiErrorSchema
|
|
4257
|
+
}),
|
|
4258
|
+
checkProductUpdates: defineContract({
|
|
4259
|
+
method: "POST",
|
|
4260
|
+
path: "/api/product/updates/check",
|
|
4261
|
+
params: EmptyParamsSchema,
|
|
4262
|
+
request: NoRequestBodySchema,
|
|
4263
|
+
response: ProductUpdateStatusSchema,
|
|
4264
|
+
error: HostApiErrorSchema
|
|
4265
|
+
}),
|
|
4266
|
+
updateProductUpdateSettings: defineContract({
|
|
4267
|
+
method: "PUT",
|
|
4268
|
+
path: "/api/product/updates/settings",
|
|
4269
|
+
params: EmptyParamsSchema,
|
|
4270
|
+
request: z.object({ autoCheck: z.boolean() }).strict(),
|
|
4271
|
+
response: ProductUpdateStatusSchema,
|
|
4272
|
+
error: HostApiErrorSchema
|
|
4273
|
+
}),
|
|
4274
|
+
getMessagePacingSettings: defineContract({
|
|
4275
|
+
method: "GET",
|
|
4276
|
+
path: "/api/settings/message-pacing",
|
|
4277
|
+
params: EmptyParamsSchema,
|
|
4278
|
+
request: NoRequestBodySchema,
|
|
4279
|
+
response: MessagePacingSettingsSchema,
|
|
4280
|
+
error: HostApiErrorSchema
|
|
4281
|
+
}),
|
|
4282
|
+
updateMessagePacingSettings: defineContract({
|
|
4283
|
+
method: "PUT",
|
|
4284
|
+
path: "/api/settings/message-pacing",
|
|
4285
|
+
params: EmptyParamsSchema,
|
|
4286
|
+
request: MessagePacingSettingsSchema,
|
|
4287
|
+
response: MessagePacingSettingsSchema,
|
|
4288
|
+
error: HostApiErrorSchema
|
|
4289
|
+
}),
|
|
4290
|
+
getRetrievalStatus: defineContract({
|
|
4291
|
+
method: "GET",
|
|
4292
|
+
path: "/api/settings/retrieval",
|
|
4293
|
+
params: EmptyParamsSchema,
|
|
4294
|
+
request: NoRequestBodySchema,
|
|
4295
|
+
response: RetrievalStatusSchema,
|
|
4296
|
+
error: HostApiErrorSchema
|
|
4297
|
+
}),
|
|
4298
|
+
updateRetrievalMode: defineContract({
|
|
4299
|
+
method: "PUT",
|
|
4300
|
+
path: "/api/settings/retrieval",
|
|
4301
|
+
params: EmptyParamsSchema,
|
|
4302
|
+
request: z.object({ mode: RetrievalModeSchema }).strict(),
|
|
4303
|
+
response: RetrievalStatusSchema,
|
|
4304
|
+
error: HostApiErrorSchema
|
|
4305
|
+
}),
|
|
4306
|
+
downloadRetrievalModel: defineContract({
|
|
4307
|
+
method: "POST",
|
|
4308
|
+
path: "/api/settings/retrieval/model/download",
|
|
4309
|
+
params: EmptyParamsSchema,
|
|
4310
|
+
request: NoRequestBodySchema,
|
|
4311
|
+
response: RetrievalStatusSchema,
|
|
4312
|
+
error: HostApiErrorSchema
|
|
4313
|
+
}),
|
|
4314
|
+
removeRetrievalModel: defineContract({
|
|
4315
|
+
method: "DELETE",
|
|
4316
|
+
path: "/api/settings/retrieval/model",
|
|
4317
|
+
params: EmptyParamsSchema,
|
|
4318
|
+
request: NoRequestBodySchema,
|
|
4319
|
+
response: RetrievalStatusSchema,
|
|
4320
|
+
error: HostApiErrorSchema
|
|
4321
|
+
}),
|
|
4322
|
+
downloadCodeRunNode: defineContract({
|
|
4323
|
+
invalidatesSnapshot: true,
|
|
4324
|
+
method: "POST",
|
|
4325
|
+
path: "/api/runtimes/code-run-node/download",
|
|
4326
|
+
params: EmptyParamsSchema,
|
|
4327
|
+
request: NoRequestBodySchema,
|
|
4328
|
+
response: CodeRunAvailabilitySchema,
|
|
4329
|
+
error: HostApiErrorSchema
|
|
4330
|
+
}),
|
|
4331
|
+
removeCodeRunNode: defineContract({
|
|
4332
|
+
invalidatesSnapshot: true,
|
|
4333
|
+
method: "DELETE",
|
|
4334
|
+
path: "/api/runtimes/code-run-node",
|
|
4335
|
+
params: EmptyParamsSchema,
|
|
4336
|
+
request: NoRequestBodySchema,
|
|
4337
|
+
response: CodeRunAvailabilitySchema,
|
|
4338
|
+
error: HostApiErrorSchema
|
|
4339
|
+
}),
|
|
4340
|
+
getChannelMemberNotes: defineContract({
|
|
4341
|
+
method: "GET",
|
|
4342
|
+
path: "/api/channels/:channelId/member-notes",
|
|
4343
|
+
params: channelParam,
|
|
4344
|
+
request: NoRequestBodySchema,
|
|
4345
|
+
response: ChannelMemberNotesViewSchema,
|
|
4346
|
+
error: HostApiErrorSchema
|
|
4347
|
+
}),
|
|
4348
|
+
updateChannelMemberNote: defineContract({
|
|
4349
|
+
method: "PUT",
|
|
4350
|
+
path: "/api/channels/:channelId/member-notes/:memberId",
|
|
4351
|
+
params: z.object({
|
|
4352
|
+
channelId: ChannelIdSchema,
|
|
4353
|
+
memberId: ChannelMemberIdSchema
|
|
4354
|
+
}).strict(),
|
|
4355
|
+
/** An empty text forgets the member. */
|
|
4356
|
+
request: z.object({ text: z.string().max(2e3) }).strict(),
|
|
4357
|
+
response: ChannelMemberNotesViewSchema,
|
|
4358
|
+
error: HostApiErrorSchema
|
|
4359
|
+
}),
|
|
4360
|
+
getChannelContextPolicy: defineContract({
|
|
4361
|
+
method: "GET",
|
|
4362
|
+
path: "/api/channels/:channelId/context-policy",
|
|
4363
|
+
params: channelParam,
|
|
4364
|
+
request: NoRequestBodySchema,
|
|
4365
|
+
response: ChannelContextPolicyViewSchema,
|
|
4366
|
+
error: HostApiErrorSchema
|
|
4367
|
+
}),
|
|
4368
|
+
updateChannelContextPolicy: defineContract({
|
|
4369
|
+
method: "PUT",
|
|
4370
|
+
path: "/api/channels/:channelId/context-policy",
|
|
4371
|
+
params: channelParam,
|
|
4372
|
+
/** `null` returns the channel to the defaults. */
|
|
4373
|
+
request: z.object({ policy: ChannelContextPolicySchema.nullable() }).strict(),
|
|
4374
|
+
response: ChannelContextPolicyViewSchema,
|
|
4375
|
+
error: HostApiErrorSchema
|
|
4376
|
+
}),
|
|
3926
4377
|
resetChannelContext: defineContract({
|
|
3927
4378
|
invalidatesSnapshot: true,
|
|
3928
4379
|
method: "POST",
|
|
@@ -5252,6 +5703,6 @@ function buildHostApiPath(name, input) {
|
|
|
5252
5703
|
return buildValidatedHostApiPath(HostApiContracts[name], input);
|
|
5253
5704
|
}
|
|
5254
5705
|
//#endregion
|
|
5255
|
-
export { ACTIVITY_MAX_BUCKETS, ACTIVITY_MAX_WINDOW_MS, ACTIVITY_MIN_BUCKET_MS, ActivityQuerySchema, AdapterActivityKeySchema, AdmissionIdSchema, AgentAppearanceSchema, AgentIdSchema, AgentRevisionChangedFieldSchema, AgentRevisionHistorySchema, AgentRevisionIdSchema, AssetIdSchema, AttentionItemSchema, AttentionListSchema, AuthoringAttemptIdSchema, AuthoringTaskIdSchema, CHANNEL_UNREAD_COUNT_CAP, COMMUNITY_EXTENSION_SORTS, 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, ChannelEventIdSchema, ChannelFactSseDataSchema, ChannelFactSseItemSchema, ChannelIdSchema, ChannelMemberIdSchema, ChannelPendingContextSchema, ChannelPromptViewSchema, ChannelRuntimeCacheSampleSchema, ChannelRuntimeCacheSchema, ChannelRuntimeContextSchema, ChannelRuntimeInputSchema, ChannelRuntimeOccupancySchema, ChannelRuntimePerformanceSampleSchema, ChannelRuntimePerformanceSchema, ChannelRuntimePhaseSchema, ChannelRuntimeProjectionSchema, ChannelRuntimeSseDataSchema, ChannelRuntimeStepSchema, ChannelRuntimeToolSchema, ChannelRuntimeTurnSchema, ChannelRuntimeUsageSchema, ClientNotificationFeedResponseSchema, ClientNotificationSchema, CommunityAccountSchema, CommunityEndpointSchema, CommunityEnvironmentSchema, CommunityExtensionDetailSchema, CommunityExtensionSortSchema, CommunityExtensionSummarySchema, CommunityInstalledItemSchema, CommunityInstalledSchema, CommunityListingInputSchema, CommunityMyExtensionSchema, CommunityMyPersonaSchema, CommunityMyPersonasSchema, CommunityPermissionItemSchema, CommunityPersonaDetailSchema, CommunityPersonaIdSchema, CommunityPersonaReviewStatusSchema, CommunityPersonaRevisionIdSchema, CommunityPersonaSummarySchema, CommunityRatingSchema, CommunityReleaseIdSchema, CommunityReleaseSchema, CommunityReviewReportSchema, CommunityReviewStatusSchema, CommunitySourceSchema, CommunityStatusSchema, ConfigSchemaDocumentSchema, ConfigSchemaMetaSchema, ConfigSchemaNodeSchema, ConnectionEventIdSchema, ConnectionIdSchema, ConnectionPanelRoleSchema, ConnectionTestResultSchema, 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_CONTEXT_DYNAMIC_MAX_CHARS, EXTENSION_CONTEXT_STATIC_MAX_CHARS, EXTENSION_DATA_HOOK_PERMISSIONS, EXTENSION_INBOUND_HOOK_MAX_TIMEOUT_MS, EXTENSION_JOB_MAX_RUNTIME, EXTENSION_LLM_MAX_CALLS_PER_TURN, EXTENSION_LLM_MAX_OUTPUT_TOKENS, EXTENSION_PROVIDES, EXTENSION_SDK_LEVEL, EXTENSION_STORAGE_DEFAULT_QUOTA_BYTES, EXTENSION_STORAGE_MAX_QUOTA_BYTES, EXTENSION_STORAGE_SCOPES, EpisodeHandoffIdSchema, EpisodeIdSchema, ExtensionActivationTransitionSchema, ExtensionCapabilitiesSchema, ExtensionConfigDeclarationSchema, ExtensionContextContributionSchema, ExtensionDeclaredJobSchema, ExtensionIdSchema, ExtensionImportInspectionSchema, ExtensionInboundHookCapabilitySchema, ExtensionJobsCapabilitySchema, ExtensionLayeredConfigSchema, ExtensionLlmCapabilitySchema, ExtensionMcpCapabilitySchema, ExtensionMcpServerNameSchema, ExtensionMcpServerSchema, ExtensionMcpValueSchema, ExtensionNetworkCapabilitySchema, ExtensionNetworkDomainSchema, ExtensionPanelAnchorSchema, ExtensionPanelDeclarationSchema, ExtensionPermissionRequirementSchema, ExtensionPermissionsSchema, ExtensionPlatformCapabilitySchema, ExtensionProvideSchema, ExtensionRequiresSchema, ExtensionRevisionIdSchema, ExtensionStorageCapabilitySchema, ExtensionStorageScopeSchema, ExtensionUiContributionsSchema, 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, LogicalMessageIdSchema, MANAGEMENT_PAIR_PROOF_PREFIX, ManagementChallengeResponseSchema, ManagementDeviceEnrollmentRequestSchema, ManagementDeviceEnrollmentResponseSchema, ManagementDeviceIdSchema, ManagementDeviceViewSchema, ManagementSessionRequestSchema, ManagementSessionResponseSchema, McpServerFormSchema, 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, PromptDocumentV1Schema, PromptSegmentSchema, RICH_EXTENSION_MAX_BYTES, RichExtensionSchema, RichKindSchema, RichTargetUrlSchema, RuntimeCompatibilityDiagnosticSchema, ScheduledTaskIdSchema, ScheduledTaskSchema, ServerInstanceIdSchema, TestBarkNotificationRequestSchema, ToolViewContributionSchema, ToolViewDensitySchema, UpdateNotificationSettingsRequestSchema, WorkTreeOrderSchema, activityDurationMs, agentPermissionDeclaration, buildHostApiContractPath, buildHostApiPath, communityPersonaReviewLabel, communityPublisherLabel, communityReviewLabel, configDescription, configFieldKind, configFields, configSchema, configSecretKeys, extensionCapabilitiesExpand, hostLayerAsCapabilities, hostPageRailOrder, hostPermissionDeclaration, insecureHttpManagementPairProofMessage, managementPairProofMessage, mcpSecretFields, messagePartAssetId, messagePartAssetIds, messagePartsSearchText, normalizePromptDocument, parseConfigValue, parseJsonValue, parseMessageParts, promptDocumentFromText, promptDocumentPlainText, richPartContextText, summarizeExtensionCapabilities, validateConfigValue };
|
|
5706
|
+
export { ACTIVITY_MAX_BUCKETS, ACTIVITY_MAX_WINDOW_MS, ACTIVITY_MIN_BUCKET_MS, ActivityQuerySchema, AdapterActivityKeySchema, AdmissionIdSchema, AgentAppearanceSchema, AgentIdSchema, AgentRevisionChangedFieldSchema, AgentRevisionHistorySchema, AgentRevisionIdSchema, AssetIdSchema, AttentionItemSchema, AttentionListSchema, AuthoringAttemptIdSchema, AuthoringTaskIdSchema, CHANNEL_UNREAD_COUNT_CAP, COMMUNITY_EXTENSION_SORTS, 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, CommunityAccountSchema, CommunityEndpointSchema, CommunityEnvironmentSchema, CommunityExtensionDetailSchema, CommunityExtensionSortSchema, CommunityExtensionSummarySchema, CommunityInstalledItemSchema, CommunityInstalledSchema, CommunityListingInputSchema, CommunityMyExtensionSchema, CommunityMyPersonaSchema, CommunityMyPersonasSchema, CommunityPermissionItemSchema, CommunityPersonaDetailSchema, CommunityPersonaIdSchema, CommunityPersonaReviewStatusSchema, CommunityPersonaRevisionIdSchema, CommunityPersonaSummarySchema, CommunityRatingSchema, CommunityReleaseIdSchema, CommunityReleaseSchema, CommunityReviewReportSchema, CommunityReviewStatusSchema, CommunitySourceSchema, CommunityStatusSchema, ConfigSchemaDocumentSchema, ConfigSchemaMetaSchema, ConfigSchemaNodeSchema, ConnectionEventIdSchema, ConnectionIdSchema, ConnectionPanelRoleSchema, ConnectionTestResultSchema, DEFAULT_CHANNEL_CONTEXT_POLICY, DEFAULT_MESSAGE_PACING, 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_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, ExtensionDeclaredJobSchema, ExtensionIdSchema, ExtensionImportInspectionSchema, ExtensionInboundHookCapabilitySchema, ExtensionIndexCapabilitySchema, ExtensionIndexCollectionSchema, ExtensionJobsCapabilitySchema, ExtensionLayeredConfigSchema, ExtensionLlmCapabilitySchema, ExtensionMcpCapabilitySchema, ExtensionMcpServerNameSchema, ExtensionMcpServerSchema, ExtensionMcpValueSchema, ExtensionModelsCapabilitySchema, ExtensionNetworkCapabilitySchema, ExtensionNetworkDomainSchema, ExtensionPanelAnchorSchema, ExtensionPanelDeclarationSchema, ExtensionPermissionRequirementSchema, ExtensionPermissionsSchema, ExtensionPlatformCapabilitySchema, ExtensionProvideSchema, ExtensionRequiresSchema, ExtensionRevisionIdSchema, ExtensionStorageCapabilitySchema, ExtensionStorageScopeSchema, ExtensionUiContributionsSchema, 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, LogicalMessageIdSchema, MANAGEMENT_PAIR_PROOF_PREFIX, ManagementChallengeResponseSchema, ManagementDeviceEnrollmentRequestSchema, ManagementDeviceEnrollmentResponseSchema, ManagementDeviceIdSchema, ManagementDeviceViewSchema, ManagementSessionRequestSchema, ManagementSessionResponseSchema, McpServerFormSchema, 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, TestBarkNotificationRequestSchema, ToolViewContributionSchema, ToolViewDensitySchema, UpdateNotificationSettingsRequestSchema, WorkTreeOrderSchema, activityDurationMs, agentPermissionDeclaration, buildHostApiContractPath, buildHostApiPath, communityPersonaReviewLabel, communityPublisherLabel, communityReviewLabel, configDescription, configFieldKind, configFields, configSchema, configSecretKeys, extensionCapabilitiesExpand, extensionSdkVersion, hostLayerAsCapabilities, hostPageRailOrder, hostPermissionDeclaration, insecureHttpManagementPairProofMessage, managementPairProofMessage, mcpSecretFields, messagePartAssetId, messagePartAssetIds, messagePartsSearchText, normalizePromptDocument, parseConfigValue, parseJsonValue, parseMessageParts, promptDocumentFromText, promptDocumentPlainText, requiredExtensionSdkLevel, richPartContextText, summarizeExtensionCapabilities, validateConfigValue };
|
|
5256
5707
|
|
|
5257
5708
|
//# sourceMappingURL=index.mjs.map
|