@nekro-nxt/contracts 0.6.0 → 0.7.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 +403 -109
- package/dist/index.mjs.map +1 -1
- package/lib/types/extension-capabilities.d.ts +98 -4
- package/lib/types/extension-capabilities.d.ts.map +1 -1
- package/lib/types/extension-ui.d.ts +75 -6
- package/lib/types/extension-ui.d.ts.map +1 -1
- package/lib/types/host-api.d.ts +1329 -524
- package/lib/types/host-api.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/extension-capabilities.ts +191 -6
- package/src/extension-ui.ts +13 -1
- package/src/host-api.ts +244 -96
package/src/host-api.ts
CHANGED
|
@@ -315,7 +315,7 @@ export const ImageUnderstandingPolicyApiSchema = z
|
|
|
315
315
|
restoreAfterCompaction: z
|
|
316
316
|
.object({
|
|
317
317
|
recentMessages: z.number().int().min(1).max(100),
|
|
318
|
-
maxImages: z.number().int().min(
|
|
318
|
+
maxImages: z.number().int().min(0).max(50),
|
|
319
319
|
})
|
|
320
320
|
.strict(),
|
|
321
321
|
})
|
|
@@ -365,6 +365,8 @@ const AgentCapabilitiesSchema = z
|
|
|
365
365
|
/** Network for commands; absent in older clients means on. */
|
|
366
366
|
commandNetwork: z.boolean().default(true),
|
|
367
367
|
communityFeedbackAuto: z.boolean().default(false),
|
|
368
|
+
/** Voice messages reach the agent with a transcript (附加功能 F10). */
|
|
369
|
+
voiceTranscription: z.boolean().default(false),
|
|
368
370
|
/** Linked accounts this agent's commands act as, one per platform; absent in older clients means none. */
|
|
369
371
|
commandAccounts: z.array(CommandAccountGrantSchema).max(8).default([]),
|
|
370
372
|
/**
|
|
@@ -621,6 +623,7 @@ const UpdateAgentCapabilitiesRequestSchema = AgentCapabilitiesSchema.partial()
|
|
|
621
623
|
codeRun: z.boolean().optional(),
|
|
622
624
|
commandNetwork: z.boolean().optional(),
|
|
623
625
|
communityFeedbackAuto: z.boolean().optional(),
|
|
626
|
+
voiceTranscription: z.boolean().optional(),
|
|
624
627
|
commandAccounts: z.array(CommandAccountGrantSchema).max(8).optional(),
|
|
625
628
|
extensionAutonomy: z.enum(['manual', 'confirm', 'autonomous']).optional(),
|
|
626
629
|
extensionRequesters: z.enum(['everyone', 'admins']).optional(),
|
|
@@ -726,6 +729,8 @@ export const HostSnapshotMessageSchema = z
|
|
|
726
729
|
trigger: z.enum(['default', 'suppress', 'force']),
|
|
727
730
|
hidden: z.boolean(),
|
|
728
731
|
annotation: z.string().optional(),
|
|
732
|
+
/** What NekroNXT itself added for the agent, such as the transcript of a voice message. */
|
|
733
|
+
hostAnnotations: z.array(z.object({ label: z.string(), text: z.string() }).strict()).optional(),
|
|
729
734
|
extensions: z.array(z.string()),
|
|
730
735
|
problems: z.array(z.string()).optional(),
|
|
731
736
|
})
|
|
@@ -860,6 +865,12 @@ export const ChannelRuntimeUsageSchema = z
|
|
|
860
865
|
})
|
|
861
866
|
.strict()
|
|
862
867
|
|
|
868
|
+
/** The latest progress a running extension tool reported. */
|
|
869
|
+
export const ChannelRuntimeToolProgressSchema = z
|
|
870
|
+
.object({ text: z.string().min(1).max(200), fraction: z.number().min(0).max(1).optional() })
|
|
871
|
+
.strict()
|
|
872
|
+
export type ChannelRuntimeToolProgress = z.output<typeof ChannelRuntimeToolProgressSchema>
|
|
873
|
+
|
|
863
874
|
const channelRuntimeToolFields = {
|
|
864
875
|
callId: NonEmptyStringSchema,
|
|
865
876
|
name: NonEmptyStringSchema,
|
|
@@ -871,6 +882,8 @@ const channelRuntimeToolFields = {
|
|
|
871
882
|
/** `cancelled`: an extension stopped the message before it was sent. */
|
|
872
883
|
deliveryState: z.enum(['sent', 'partially-sent', 'failed', 'unknown', 'cancelled']).optional(),
|
|
873
884
|
durationMs: z.number().int().nonnegative().optional(),
|
|
885
|
+
/** Set while the tool runs and has reported progress. */
|
|
886
|
+
progress: ChannelRuntimeToolProgressSchema.optional(),
|
|
874
887
|
}
|
|
875
888
|
|
|
876
889
|
export const ChannelRuntimeToolSchema = z
|
|
@@ -1208,6 +1221,20 @@ export const ChannelContextPolicyViewSchema = z
|
|
|
1208
1221
|
|
|
1209
1222
|
export type ChannelContextPolicyView = z.output<typeof ChannelContextPolicyViewSchema>
|
|
1210
1223
|
|
|
1224
|
+
/** One desktop installer of a release; `urls` lists the sources to try in order. */
|
|
1225
|
+
export const ProductDownloadSchema = z
|
|
1226
|
+
.object({
|
|
1227
|
+
platform: z.enum(['mac', 'win', 'linux']),
|
|
1228
|
+
arch: z.enum(['arm64', 'x64']),
|
|
1229
|
+
name: z.string().min(1),
|
|
1230
|
+
size: z.number().int().positive(),
|
|
1231
|
+
sha256: z.string().regex(/^[a-f0-9]{64}$/u),
|
|
1232
|
+
urls: z.array(z.string().url()).min(1),
|
|
1233
|
+
})
|
|
1234
|
+
.strict()
|
|
1235
|
+
|
|
1236
|
+
export type ProductDownload = z.output<typeof ProductDownloadSchema>
|
|
1237
|
+
|
|
1211
1238
|
/** Whether a newer release exists on the build's own channel; development builds are never compared. */
|
|
1212
1239
|
export const ProductUpdateStatusSchema = z
|
|
1213
1240
|
.object({
|
|
@@ -1222,6 +1249,8 @@ export const ProductUpdateStatusSchema = z
|
|
|
1222
1249
|
commit: z.string().optional(),
|
|
1223
1250
|
url: z.string().url(),
|
|
1224
1251
|
publishedAt: z.number().int().nonnegative().optional(),
|
|
1252
|
+
/** Desktop installers of this release; the desktop app downloads its own and checks size and digest. */
|
|
1253
|
+
downloads: z.array(ProductDownloadSchema).optional(),
|
|
1225
1254
|
})
|
|
1226
1255
|
.strict()
|
|
1227
1256
|
.optional(),
|
|
@@ -1282,30 +1311,10 @@ export const SubConversationSettingsSchema = z.object({ retention: SubConversati
|
|
|
1282
1311
|
export const RetrievalModeSchema = z.enum(['keyword', 'builtin'])
|
|
1283
1312
|
export type RetrievalMode = z.output<typeof RetrievalModeSchema>
|
|
1284
1313
|
|
|
1285
|
-
/** Search used by extension indexes (表情包与扩展素材能力 §6.4). */
|
|
1314
|
+
/** Search used by extension indexes (表情包与扩展素材能力 §6.4); the model itself is the `retrieval` add-on. */
|
|
1286
1315
|
export const RetrievalStatusSchema = z
|
|
1287
1316
|
.object({
|
|
1288
1317
|
mode: RetrievalModeSchema,
|
|
1289
|
-
builtin: z
|
|
1290
|
-
.object({
|
|
1291
|
-
model: z.string(),
|
|
1292
|
-
/** False where no inference runtime is published for this system and processor. */
|
|
1293
|
-
supported: z.boolean(),
|
|
1294
|
-
downloadBytes: z.number().int().nonnegative(),
|
|
1295
|
-
install: z.discriminatedUnion('state', [
|
|
1296
|
-
z.object({ state: z.literal('not-installed') }).strict(),
|
|
1297
|
-
z
|
|
1298
|
-
.object({
|
|
1299
|
-
state: z.literal('downloading'),
|
|
1300
|
-
receivedBytes: z.number().int().nonnegative(),
|
|
1301
|
-
totalBytes: z.number().int().nonnegative(),
|
|
1302
|
-
})
|
|
1303
|
-
.strict(),
|
|
1304
|
-
z.object({ state: z.literal('installed') }).strict(),
|
|
1305
|
-
z.object({ state: z.literal('failed'), error: z.string() }).strict(),
|
|
1306
|
-
]),
|
|
1307
|
-
})
|
|
1308
|
-
.strict(),
|
|
1309
1318
|
vectors: z
|
|
1310
1319
|
.object({
|
|
1311
1320
|
documents: z.number().int().nonnegative(),
|
|
@@ -1541,6 +1550,14 @@ export const AttentionItemSchema = z
|
|
|
1541
1550
|
label: z.string().min(1).max(40),
|
|
1542
1551
|
})
|
|
1543
1552
|
.strict(),
|
|
1553
|
+
/**
|
|
1554
|
+
* The shared cause several items come from: a connection (its outage and the deliveries it failed) or an agent
|
|
1555
|
+
* (its failed turns and unusable models). Dismissing by cause keeps it quiet until the cause recovers.
|
|
1556
|
+
*/
|
|
1557
|
+
cause: z
|
|
1558
|
+
.object({ key: z.string().min(1).max(200), label: z.string().min(1).max(120) })
|
|
1559
|
+
.strict()
|
|
1560
|
+
.optional(),
|
|
1544
1561
|
occurredAt: z.number().int().safe().nonnegative(),
|
|
1545
1562
|
})
|
|
1546
1563
|
.strict()
|
|
@@ -1661,42 +1678,128 @@ export const ScheduledTaskSchema = z
|
|
|
1661
1678
|
|
|
1662
1679
|
export type ScheduledTask = z.output<typeof ScheduledTaskSchema>
|
|
1663
1680
|
|
|
1664
|
-
/**
|
|
1665
|
-
export const
|
|
1681
|
+
/** Programs and models NekroNXT installs on request (附加功能); `<data root>/runtimes`, left out of backups. */
|
|
1682
|
+
export const AddonIdSchema = z.enum(['media', 'speech', 'retrieval', 'node', 'github-cli', 'browser'])
|
|
1683
|
+
export type AddonId = z.output<typeof AddonIdSchema>
|
|
1684
|
+
|
|
1685
|
+
/** `extension`: used by extensions; `agent`: used by agents' commands; `host`: used by NekroNXT itself. */
|
|
1686
|
+
export const AddonGroupSchema = z.enum(['extension', 'agent', 'host'])
|
|
1687
|
+
export type AddonGroup = z.output<typeof AddonGroupSchema>
|
|
1688
|
+
|
|
1689
|
+
/**
|
|
1690
|
+
* `installed`: downloaded and ready; `available`: usable without installing (bundled, found on this device, cloud);
|
|
1691
|
+
* `needs-config`: usable once configured (cloud).
|
|
1692
|
+
*/
|
|
1693
|
+
export const AddonStateSchema = z.enum([
|
|
1694
|
+
'not-installed',
|
|
1695
|
+
'installing',
|
|
1696
|
+
'installed',
|
|
1697
|
+
'failed',
|
|
1698
|
+
'unsupported',
|
|
1699
|
+
'available',
|
|
1700
|
+
'needs-config',
|
|
1701
|
+
])
|
|
1702
|
+
export type AddonState = z.output<typeof AddonStateSchema>
|
|
1703
|
+
|
|
1704
|
+
const AddonProgressSchema = z
|
|
1666
1705
|
.object({
|
|
1667
|
-
|
|
1668
|
-
|
|
1706
|
+
receivedBytes: z.number().int().nonnegative(),
|
|
1707
|
+
totalBytes: z.number().int().nonnegative().optional(),
|
|
1708
|
+
})
|
|
1709
|
+
.strict()
|
|
1710
|
+
|
|
1711
|
+
/** One way an add-on can be provided, such as a program found on this device or one NekroNXT downloads. */
|
|
1712
|
+
export const AddonProviderStatusSchema = z
|
|
1713
|
+
.object({
|
|
1714
|
+
id: NonEmptyStringSchema,
|
|
1715
|
+
title: NonEmptyStringSchema,
|
|
1716
|
+
summary: z.string(),
|
|
1717
|
+
state: AddonStateSchema,
|
|
1718
|
+
/** `bundled`: installed with NekroNXT; `system`: found on this device; `downloaded`: fetched by NekroNXT. */
|
|
1719
|
+
source: z.enum(['bundled', 'system', 'downloaded', 'cloud']).optional(),
|
|
1720
|
+
/** The installed version, or the one an install fetches. */
|
|
1669
1721
|
version: z.string().optional(),
|
|
1670
|
-
|
|
1722
|
+
resources: z
|
|
1671
1723
|
.object({
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1724
|
+
/** Approximate for this system and processor. */
|
|
1725
|
+
downloadBytes: z.number().int().nonnegative().optional(),
|
|
1726
|
+
/** Measured from its own folder after install. */
|
|
1727
|
+
installedBytes: z.number().int().nonnegative().optional(),
|
|
1728
|
+
memoryBytes: z.number().int().nonnegative().optional(),
|
|
1729
|
+
/** Short differences worth comparing, such as languages or speed. */
|
|
1730
|
+
notes: z.array(z.string()).default([]),
|
|
1677
1731
|
})
|
|
1678
|
-
.strict()
|
|
1679
|
-
|
|
1732
|
+
.strict(),
|
|
1733
|
+
/** One entry per component that carries its own license. */
|
|
1734
|
+
licenses: z
|
|
1735
|
+
.array(z.object({ component: z.string().optional(), name: NonEmptyStringSchema, url: z.url() }).strict())
|
|
1736
|
+
.default([]),
|
|
1737
|
+
/** Where downloads come from, for display. */
|
|
1738
|
+
sources: z.array(z.string()).default([]),
|
|
1739
|
+
progress: AddonProgressSchema.optional(),
|
|
1740
|
+
error: z.string().optional(),
|
|
1741
|
+
/** Other add-ons it needs to work. */
|
|
1742
|
+
dependsOn: z.array(AddonIdSchema).default([]),
|
|
1743
|
+
installable: z.boolean(),
|
|
1744
|
+
removable: z.boolean(),
|
|
1680
1745
|
})
|
|
1681
1746
|
.strict()
|
|
1747
|
+
export type AddonProviderStatus = z.output<typeof AddonProviderStatusSchema>
|
|
1682
1748
|
|
|
1683
|
-
|
|
1749
|
+
/** One add-on (a capability) as 设置 → 附加功能 shows it; the registry on the server is its only source. */
|
|
1750
|
+
export const AddonStatusSchema = z
|
|
1751
|
+
.object({
|
|
1752
|
+
id: AddonIdSchema,
|
|
1753
|
+
group: AddonGroupSchema,
|
|
1754
|
+
title: NonEmptyStringSchema,
|
|
1755
|
+
summary: z.string(),
|
|
1756
|
+
/** Who relies on it, as labels people recognise. */
|
|
1757
|
+
usedBy: z.array(z.string()),
|
|
1758
|
+
/** The selected provider's state, or, while none can be used, the one closest to usable. */
|
|
1759
|
+
state: AddonStateSchema,
|
|
1760
|
+
progress: AddonProgressSchema.optional(),
|
|
1761
|
+
/** The provider in use; absent while none can be used. */
|
|
1762
|
+
selected: NonEmptyStringSchema.optional(),
|
|
1763
|
+
/** In declared order; providers that do not exist on this device are left out. */
|
|
1764
|
+
providers: z.array(AddonProviderStatusSchema),
|
|
1765
|
+
})
|
|
1766
|
+
.strict()
|
|
1767
|
+
export type AddonStatus = z.output<typeof AddonStatusSchema>
|
|
1684
1768
|
|
|
1685
|
-
/**
|
|
1686
|
-
export const
|
|
1687
|
-
export type
|
|
1769
|
+
/** Languages speech recognition can be asked for; `auto` lets the provider tell. */
|
|
1770
|
+
export const SpeechLanguageSchema = z.enum(['auto', 'zh', 'en', 'ja', 'ko', 'yue'])
|
|
1771
|
+
export type SpeechLanguage = z.output<typeof SpeechLanguageSchema>
|
|
1772
|
+
|
|
1773
|
+
/** The cloud provider of the `speech` add-on: a provider from 设置 → 模型 and the transcription model it serves. */
|
|
1774
|
+
export const SpeechCloudSettingsSchema = z
|
|
1775
|
+
.object({
|
|
1776
|
+
provider: NonEmptyStringSchema,
|
|
1777
|
+
model: z.string().trim().min(1).max(200),
|
|
1778
|
+
/** Used when a caller does not name a language. */
|
|
1779
|
+
language: SpeechLanguageSchema.optional(),
|
|
1780
|
+
})
|
|
1781
|
+
.strict()
|
|
1782
|
+
export type SpeechCloudSettings = z.output<typeof SpeechCloudSettingsSchema>
|
|
1783
|
+
|
|
1784
|
+
export const SpeechSettingsSchema = z
|
|
1785
|
+
.object({
|
|
1786
|
+
cloud: SpeechCloudSettingsSchema.nullable(),
|
|
1787
|
+
/** Configured providers with an OpenAI-compatible address, the ones cloud transcription can use. */
|
|
1788
|
+
providers: z.array(z.object({ provider: NonEmptyStringSchema, displayName: z.string() }).strict()),
|
|
1789
|
+
})
|
|
1790
|
+
.strict()
|
|
1791
|
+
export type SpeechSettings = z.output<typeof SpeechSettingsSchema>
|
|
1688
1792
|
|
|
1689
|
-
/**
|
|
1690
|
-
export const
|
|
1691
|
-
export type
|
|
1793
|
+
/** Whether a capability that needs an add-on can run now; details live in `addons`. */
|
|
1794
|
+
export const AddonAvailabilitySchema = z.object({ available: z.boolean() }).strict()
|
|
1795
|
+
export type AddonAvailability = z.output<typeof AddonAvailabilitySchema>
|
|
1692
1796
|
|
|
1693
1797
|
/** A platform's own program that linked accounts work through, such as the GitHub CLI. */
|
|
1694
1798
|
export const LinkedAccountPlatformToolSchema = z
|
|
1695
1799
|
.object({
|
|
1696
|
-
/** The
|
|
1800
|
+
/** The add-on it is installed as (`AddonStatus.id`). */
|
|
1697
1801
|
id: z.enum(['github-cli']),
|
|
1698
1802
|
name: z.string(),
|
|
1699
|
-
availability: GithubCliAvailabilitySchema,
|
|
1700
1803
|
})
|
|
1701
1804
|
.strict()
|
|
1702
1805
|
|
|
@@ -1735,7 +1838,7 @@ export const ExtensionRequestSchema = z
|
|
|
1735
1838
|
channelId: ChannelIdSchema.nullable(),
|
|
1736
1839
|
extensionId: ExtensionIdSchema.nullable(),
|
|
1737
1840
|
summary: z.string(),
|
|
1738
|
-
status: z.enum(['pending', 'approved', 'rejected', 'expired', 'completed', 'failed']),
|
|
1841
|
+
status: z.enum(['pending', 'approved', 'rejected', 'expired', 'completed', 'failed', 'superseded', 'withdrawn']),
|
|
1739
1842
|
autonomous: z.boolean(),
|
|
1740
1843
|
resultMessage: z.string().nullable(),
|
|
1741
1844
|
decidedBy: z.string().nullable(),
|
|
@@ -1787,12 +1890,14 @@ export const HostSnapshotSchema = z
|
|
|
1787
1890
|
capabilityAvailability: z
|
|
1788
1891
|
.object({
|
|
1789
1892
|
subagents: z.object({ available: z.boolean() }).strict(),
|
|
1790
|
-
/**
|
|
1791
|
-
codeRun:
|
|
1792
|
-
/**
|
|
1793
|
-
githubCli:
|
|
1794
|
-
/**
|
|
1795
|
-
verificationBrowser:
|
|
1893
|
+
/** The `node` add-on that `run_code` needs. */
|
|
1894
|
+
codeRun: AddonAvailabilitySchema.optional(),
|
|
1895
|
+
/** The `github-cli` add-on that commands use with a GitHub account. */
|
|
1896
|
+
githubCli: AddonAvailabilitySchema.optional(),
|
|
1897
|
+
/** The `browser` add-on that checks candidates when no page is open. */
|
|
1898
|
+
verificationBrowser: AddonAvailabilitySchema.optional(),
|
|
1899
|
+
/** The `speech` add-on that voice message transcription needs. */
|
|
1900
|
+
speechRecognition: AddonAvailabilitySchema.optional(),
|
|
1796
1901
|
/** What this host can confine for commands beyond file writes; optional in older hosts. */
|
|
1797
1902
|
commandConfinement: z.object({ readScope: z.boolean(), networkControl: z.boolean() }).strict().optional(),
|
|
1798
1903
|
webSearch: z
|
|
@@ -2224,6 +2329,7 @@ export const HostSnapshotSchema = z
|
|
|
2224
2329
|
authoringTasks: z.array(AuthoringTaskSummarySchema).default([]),
|
|
2225
2330
|
/** Open sub-conversations, and the most recently ended ones of each channel. */
|
|
2226
2331
|
subConversations: z.array(SubConversationSchema).default([]),
|
|
2332
|
+
addons: z.array(AddonStatusSchema).default([]),
|
|
2227
2333
|
scheduledTasks: z.array(ScheduledTaskSchema).default([]),
|
|
2228
2334
|
/** Extension requests waiting for an administrator. */
|
|
2229
2335
|
extensionRequests: z.array(ExtensionRequestSchema).default([]),
|
|
@@ -2352,6 +2458,8 @@ export const DshPluginCatalogEntrySchema = z
|
|
|
2352
2458
|
installSource: z.enum(['registry', 'tarball', 'imported']).optional(),
|
|
2353
2459
|
/** Published by the DSH maintainers on npm for the DSH release this build runs. */
|
|
2354
2460
|
official: z.boolean().optional(),
|
|
2461
|
+
/** Third-party installed plugins: whether an administrator allowed them to submit images to the model. */
|
|
2462
|
+
imageSubmission: z.boolean().optional(),
|
|
2355
2463
|
installedAt: z.number().int().safe().nonnegative().optional(),
|
|
2356
2464
|
clientUiDetected: z.boolean().optional(),
|
|
2357
2465
|
hostUi: DshNxtHostUiSchema.optional(),
|
|
@@ -2765,6 +2873,22 @@ const agentExtensionParam = z.object({ agentId: AgentIdSchema, extensionId: Exte
|
|
|
2765
2873
|
|
|
2766
2874
|
const PermissionApprovalSchema = z.object({ permissionDigest: z.string().regex(/^[a-f0-9]{64}$/u) }).strict()
|
|
2767
2875
|
|
|
2876
|
+
/**
|
|
2877
|
+
* What keeps a version from being cleaned up: in use, enabled for an agent, released to a community, kept by hand,
|
|
2878
|
+
* the start of a branch, the base of an open revision, needed by 回到上一个版本, or named by a pending request.
|
|
2879
|
+
*/
|
|
2880
|
+
export const ExtensionRevisionProtectionSchema = z.enum([
|
|
2881
|
+
'installed',
|
|
2882
|
+
'active',
|
|
2883
|
+
'released',
|
|
2884
|
+
'kept',
|
|
2885
|
+
'branch',
|
|
2886
|
+
'revising',
|
|
2887
|
+
'undo',
|
|
2888
|
+
'request',
|
|
2889
|
+
])
|
|
2890
|
+
export type ExtensionRevisionProtection = z.output<typeof ExtensionRevisionProtectionSchema>
|
|
2891
|
+
|
|
2768
2892
|
/** One version of one line in the lineage view of an extension family. */
|
|
2769
2893
|
export const ExtensionLineageNodeSchema = z
|
|
2770
2894
|
.object({
|
|
@@ -2776,6 +2900,10 @@ export const ExtensionLineageNodeSchema = z
|
|
|
2776
2900
|
createdAt: z.number().int().nonnegative(),
|
|
2777
2901
|
current: z.boolean(),
|
|
2778
2902
|
releaseNumbers: z.array(z.number().int().positive()),
|
|
2903
|
+
/** Marked by an administrator to keep. */
|
|
2904
|
+
kept: z.boolean(),
|
|
2905
|
+
/** Why the version cannot be cleaned up; absent when it can. */
|
|
2906
|
+
protectedBy: ExtensionRevisionProtectionSchema.optional(),
|
|
2779
2907
|
})
|
|
2780
2908
|
.strict()
|
|
2781
2909
|
|
|
@@ -3838,74 +3966,55 @@ export const HostApiContracts = {
|
|
|
3838
3966
|
response: RetrievalStatusSchema,
|
|
3839
3967
|
error: HostApiErrorSchema,
|
|
3840
3968
|
}),
|
|
3841
|
-
|
|
3842
|
-
method: '
|
|
3843
|
-
path: '/api/settings/
|
|
3844
|
-
params: EmptyParamsSchema,
|
|
3845
|
-
request: NoRequestBodySchema,
|
|
3846
|
-
response: RetrievalStatusSchema,
|
|
3847
|
-
error: HostApiErrorSchema,
|
|
3848
|
-
}),
|
|
3849
|
-
removeRetrievalModel: defineContract({
|
|
3850
|
-
method: 'DELETE',
|
|
3851
|
-
path: '/api/settings/retrieval/model',
|
|
3969
|
+
getSpeechSettings: defineContract({
|
|
3970
|
+
method: 'GET',
|
|
3971
|
+
path: '/api/settings/speech',
|
|
3852
3972
|
params: EmptyParamsSchema,
|
|
3853
3973
|
request: NoRequestBodySchema,
|
|
3854
|
-
response:
|
|
3974
|
+
response: SpeechSettingsSchema,
|
|
3855
3975
|
error: HostApiErrorSchema,
|
|
3856
3976
|
}),
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
path: '/api/runtimes/code-run-node/download',
|
|
3977
|
+
updateSpeechSettings: defineContract({
|
|
3978
|
+
method: 'PUT',
|
|
3979
|
+
path: '/api/settings/speech',
|
|
3861
3980
|
params: EmptyParamsSchema,
|
|
3862
|
-
request:
|
|
3863
|
-
response:
|
|
3981
|
+
request: z.object({ cloud: SpeechCloudSettingsSchema.nullable() }).strict(),
|
|
3982
|
+
response: SpeechSettingsSchema,
|
|
3864
3983
|
error: HostApiErrorSchema,
|
|
3865
3984
|
}),
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
path: '/api/runtimes/code-run-node',
|
|
3985
|
+
listAddons: defineContract({
|
|
3986
|
+
method: 'GET',
|
|
3987
|
+
path: '/api/addons',
|
|
3870
3988
|
params: EmptyParamsSchema,
|
|
3871
3989
|
request: NoRequestBodySchema,
|
|
3872
|
-
response:
|
|
3990
|
+
response: z.object({ addons: z.array(AddonStatusSchema) }).strict(),
|
|
3873
3991
|
error: HostApiErrorSchema,
|
|
3874
3992
|
}),
|
|
3875
|
-
|
|
3993
|
+
installAddonProvider: defineContract({
|
|
3876
3994
|
invalidatesSnapshot: true,
|
|
3877
3995
|
method: 'POST',
|
|
3878
|
-
path: '/api/
|
|
3879
|
-
params:
|
|
3996
|
+
path: '/api/addons/:id/providers/:provider/install',
|
|
3997
|
+
params: z.object({ id: AddonIdSchema, provider: NonEmptyStringSchema }).strict(),
|
|
3880
3998
|
request: NoRequestBodySchema,
|
|
3881
|
-
response:
|
|
3999
|
+
response: AddonStatusSchema,
|
|
3882
4000
|
error: HostApiErrorSchema,
|
|
3883
4001
|
}),
|
|
3884
|
-
|
|
4002
|
+
removeAddonProvider: defineContract({
|
|
3885
4003
|
invalidatesSnapshot: true,
|
|
3886
4004
|
method: 'DELETE',
|
|
3887
|
-
path: '/api/
|
|
3888
|
-
params:
|
|
3889
|
-
request: NoRequestBodySchema,
|
|
3890
|
-
response: GithubCliAvailabilitySchema,
|
|
3891
|
-
error: HostApiErrorSchema,
|
|
3892
|
-
}),
|
|
3893
|
-
downloadVerificationBrowser: defineContract({
|
|
3894
|
-
invalidatesSnapshot: true,
|
|
3895
|
-
method: 'POST',
|
|
3896
|
-
path: '/api/runtimes/verification-browser/download',
|
|
3897
|
-
params: EmptyParamsSchema,
|
|
4005
|
+
path: '/api/addons/:id/providers/:provider',
|
|
4006
|
+
params: z.object({ id: AddonIdSchema, provider: NonEmptyStringSchema }).strict(),
|
|
3898
4007
|
request: NoRequestBodySchema,
|
|
3899
|
-
response:
|
|
4008
|
+
response: AddonStatusSchema,
|
|
3900
4009
|
error: HostApiErrorSchema,
|
|
3901
4010
|
}),
|
|
3902
|
-
|
|
4011
|
+
selectAddonProvider: defineContract({
|
|
3903
4012
|
invalidatesSnapshot: true,
|
|
3904
|
-
method: '
|
|
3905
|
-
path: '/api/
|
|
3906
|
-
params:
|
|
3907
|
-
request:
|
|
3908
|
-
response:
|
|
4013
|
+
method: 'PUT',
|
|
4014
|
+
path: '/api/addons/:id/selection',
|
|
4015
|
+
params: z.object({ id: AddonIdSchema }).strict(),
|
|
4016
|
+
request: z.object({ provider: NonEmptyStringSchema }).strict(),
|
|
4017
|
+
response: AddonStatusSchema,
|
|
3909
4018
|
error: HostApiErrorSchema,
|
|
3910
4019
|
}),
|
|
3911
4020
|
getLinkedAccounts: defineContract({
|
|
@@ -4294,6 +4403,14 @@ export const HostApiContracts = {
|
|
|
4294
4403
|
response: z.object({ disabled: z.literal(true) }).strict(),
|
|
4295
4404
|
error: HostApiErrorSchema,
|
|
4296
4405
|
}),
|
|
4406
|
+
setDshPluginImageSubmission: defineContract({
|
|
4407
|
+
method: 'PUT',
|
|
4408
|
+
path: '/api/dsh/plugin-installs/:packageId/image-submission',
|
|
4409
|
+
params: dshPluginPackageParam,
|
|
4410
|
+
request: z.object({ allowed: z.boolean() }).strict(),
|
|
4411
|
+
response: z.object({ allowed: z.boolean() }).strict(),
|
|
4412
|
+
error: HostApiErrorSchema,
|
|
4413
|
+
}),
|
|
4297
4414
|
removeDshPluginPackage: defineContract({
|
|
4298
4415
|
invalidatesSnapshot: true,
|
|
4299
4416
|
method: 'DELETE',
|
|
@@ -5508,6 +5625,20 @@ export const HostApiContracts = {
|
|
|
5508
5625
|
response: z.object({ dismissed: z.literal(true), revision: z.string().min(1) }).strict(),
|
|
5509
5626
|
error: HostApiErrorSchema,
|
|
5510
5627
|
}),
|
|
5628
|
+
dismissAttentionBatch: defineContract({
|
|
5629
|
+
method: 'POST',
|
|
5630
|
+
path: '/api/attention/dismiss',
|
|
5631
|
+
params: EmptyParamsSchema,
|
|
5632
|
+
request: z
|
|
5633
|
+
.object({
|
|
5634
|
+
ids: z.array(z.string().min(1).max(200)).max(200),
|
|
5635
|
+
/** Causes to keep quiet until they recover; new items of these causes are not shown meanwhile. */
|
|
5636
|
+
causes: z.array(z.string().min(1).max(200)).max(200),
|
|
5637
|
+
})
|
|
5638
|
+
.strict(),
|
|
5639
|
+
response: z.object({ dismissed: z.literal(true), revision: z.string().min(1) }).strict(),
|
|
5640
|
+
error: HostApiErrorSchema,
|
|
5641
|
+
}),
|
|
5511
5642
|
getChannelPending: defineContract({
|
|
5512
5643
|
method: 'GET',
|
|
5513
5644
|
path: '/api/channels/:channelId/pending',
|
|
@@ -5622,6 +5753,23 @@ export const HostApiContracts = {
|
|
|
5622
5753
|
response: ExtensionLineageSchema,
|
|
5623
5754
|
error: HostApiErrorSchema,
|
|
5624
5755
|
}),
|
|
5756
|
+
setExtensionRevisionKept: defineContract({
|
|
5757
|
+
method: 'POST',
|
|
5758
|
+
path: '/api/extensions/:extensionId/revisions/:revisionId/keep',
|
|
5759
|
+
params: z.object({ extensionId: ExtensionIdSchema, revisionId: ExtensionRevisionIdSchema }).strict(),
|
|
5760
|
+
request: z.object({ kept: z.boolean() }).strict(),
|
|
5761
|
+
response: z.object({ kept: z.boolean() }).strict(),
|
|
5762
|
+
error: HostApiErrorSchema,
|
|
5763
|
+
}),
|
|
5764
|
+
deleteExtensionRevisions: defineContract({
|
|
5765
|
+
invalidatesSnapshot: true,
|
|
5766
|
+
method: 'POST',
|
|
5767
|
+
path: '/api/extensions/:extensionId/revisions/delete',
|
|
5768
|
+
params: extensionParam,
|
|
5769
|
+
request: z.object({ revisionIds: z.array(ExtensionRevisionIdSchema).min(1).max(200) }).strict(),
|
|
5770
|
+
response: z.object({ deleted: z.number().int().nonnegative() }).strict(),
|
|
5771
|
+
error: HostApiErrorSchema,
|
|
5772
|
+
}),
|
|
5625
5773
|
branchExtension: defineContract({
|
|
5626
5774
|
invalidatesSnapshot: true,
|
|
5627
5775
|
timeoutMs: 300_000,
|