@openspecui/core 3.6.1 → 3.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/document-translation-CvUxMOPl.mjs +44 -0
- package/dist/document-translation-VavI1QOl.d.mts +140 -0
- package/dist/document-translation.d.mts +2 -0
- package/dist/document-translation.mjs +3 -0
- package/dist/hosted-app-BqJw9WgW.d.mts +43 -0
- package/dist/{hosted-app-DFFffbJc.mjs → hosted-app-Du65UHRo.mjs} +24 -3
- package/dist/hosted-app.d.mts +2 -2
- package/dist/hosted-app.mjs +2 -2
- package/dist/index.d.mts +96 -428
- package/dist/index.mjs +141 -75
- package/dist/markdown-facts.d.mts +1 -1
- package/dist/markdown-facts.mjs +1 -1
- package/dist/{markdown-reading-D36W693c.d.mts → markdown-reading-BC6uFgx0.d.mts} +10 -2
- package/dist/{markdown-reading-CrchEfoW.mjs → markdown-reading-CsL1q84q.mjs} +23 -4
- package/dist/markdown-reading.d.mts +3 -3
- package/dist/markdown-reading.mjs +3 -3
- package/dist/{notifications-CCV2bgWG.d.mts → notifications-Clq2bq-i.d.mts} +3 -3
- package/dist/{notifications-fD-V5hyP.mjs → notifications-DXOoOJ3m.mjs} +2 -2
- package/dist/notifications.d.mts +2 -2
- package/dist/notifications.mjs +3 -3
- package/dist/{openspec-annotations-CJmYcfAu.d.mts → openspec-annotations-DKP1Uuho.d.mts} +2 -2
- package/dist/{openspec-annotations-BMy9nWUe.mjs → openspec-annotations-D_xQqQOB.mjs} +2 -2
- package/dist/openspec-annotations.d.mts +3 -3
- package/dist/openspec-annotations.mjs +3 -3
- package/dist/{openspec-projection-DWqBxedv.mjs → openspec-projection-DLGD1JFD.mjs} +2 -2
- package/dist/openspec-projection-DgnEag63.d.mts +52 -0
- package/dist/openspec-projection.d.mts +5 -4
- package/dist/openspec-projection.mjs +4 -4
- package/dist/opsx-display-path.d.mts +1 -1
- package/dist/opsx-display-path.mjs +1 -1
- package/dist/opsx-entity-B_Od4N3r.mjs +144 -0
- package/dist/opsx-entity-BhvuPO8B.d.mts +453 -0
- package/dist/opsx-entity.d.mts +3 -0
- package/dist/opsx-entity.mjs +3 -0
- package/dist/opsx-schema-detail-Bh-aNaSk.mjs +114 -0
- package/dist/opsx-schema-detail-SFENVa0g.d.mts +12 -0
- package/dist/opsx-schema-detail.d.mts +4 -0
- package/dist/opsx-schema-detail.mjs +3 -0
- package/dist/{openspec-projection-DmB448No.d.mts → schemas-DZwT0am4.d.mts} +1 -50
- package/dist/{sounds-B0sH3QwE.d.mts → sounds-PZqzoKxJ.d.mts} +4 -4
- package/dist/sounds.d.mts +1 -1
- package/dist/sounds.mjs +1 -1
- package/dist/{terminal-audio-UEv3j655.mjs → terminal-audio-BiQ9qJJW.mjs} +1 -1
- package/dist/{terminal-audio-qSc6nZUI.d.mts → terminal-audio-Ci4x-tyQ.d.mts} +1 -1
- package/dist/terminal-audio.d.mts +2 -2
- package/dist/terminal-audio.mjs +2 -2
- package/dist/terminal-control.d.mts +2 -2
- package/dist/terminal-control.mjs +1 -1
- package/dist/terminal-invocation.d.mts +1 -1
- package/dist/terminal-invocation.mjs +1 -1
- package/dist/terminal-theme.d.mts +1 -1
- package/dist/terminal-theme.mjs +1 -1
- package/package.json +51 -3
- package/dist/hosted-app-DZrYivji.d.mts +0 -31
- /package/dist/{markdown-facts-BmSmZmpB.mjs → markdown-facts-BFqXdPfN.mjs} +0 -0
- /package/dist/{markdown-facts-f3kXnqXb.d.mts → markdown-facts-DxElzSsp.d.mts} +0 -0
- /package/dist/{opsx-display-path-D4KLYRXQ.mjs → opsx-display-path-BHEPZsJx.mjs} +0 -0
- /package/dist/{opsx-display-path-CkV9sq_j.d.mts → opsx-display-path-BKUYCqwP.d.mts} +0 -0
- /package/dist/{sounds-BzNKMW05.mjs → sounds-Ctm3QEtf.mjs} +0 -0
- /package/dist/{terminal-control-Bxois59k.mjs → terminal-control-CMkG-o9C.mjs} +0 -0
- /package/dist/{terminal-invocation-BRCuSBjE.mjs → terminal-invocation-CX1LDM89.mjs} +0 -0
- /package/dist/{terminal-invocation-BCqjtd4p.d.mts → terminal-invocation-owPZDVJF.d.mts} +0 -0
- /package/dist/{terminal-theme-CIv3YMfi.mjs → terminal-theme-BOGPIiVm.mjs} +0 -0
- /package/dist/{terminal-theme-lPZGfVA_.d.mts → terminal-theme-DdhVuegL.d.mts} +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/document-translation.ts
|
|
4
|
+
const DOCUMENT_TRANSLATION_DISPLAY_MODES = ["direct", "bilingual"];
|
|
5
|
+
const DocumentTranslationDisplayModeSchema = z.enum(DOCUMENT_TRANSLATION_DISPLAY_MODES);
|
|
6
|
+
const DocumentTranslationConfigSchema = z.object({
|
|
7
|
+
enabled: z.boolean().default(false),
|
|
8
|
+
targetLanguage: z.string().min(1).default("zh"),
|
|
9
|
+
displayMode: DocumentTranslationDisplayModeSchema.default("direct"),
|
|
10
|
+
cacheEnabled: z.boolean().default(false)
|
|
11
|
+
});
|
|
12
|
+
const DEFAULT_TRANSLATION_CACHE_ENTRY_LIMIT = 1e4;
|
|
13
|
+
const MIN_TRANSLATION_CACHE_ENTRY_LIMIT = 100;
|
|
14
|
+
const MAX_TRANSLATION_CACHE_ENTRY_LIMIT = 2e5;
|
|
15
|
+
const TRANSLATION_CACHE_POLICY_VERSION = 2;
|
|
16
|
+
const TranslationCacheSettingsSchema = z.object({ entryLimit: z.number().int().min(MIN_TRANSLATION_CACHE_ENTRY_LIMIT).max(MAX_TRANSLATION_CACHE_ENTRY_LIMIT).default(DEFAULT_TRANSLATION_CACHE_ENTRY_LIMIT) });
|
|
17
|
+
const TranslationCacheEntrySchema = z.object({
|
|
18
|
+
key: z.string().min(1),
|
|
19
|
+
keyHash: z.string().min(1),
|
|
20
|
+
sourceText: z.string(),
|
|
21
|
+
translatedText: z.string(),
|
|
22
|
+
targetNodesJson: z.string().optional(),
|
|
23
|
+
sourceLanguage: z.string().min(1),
|
|
24
|
+
targetLanguage: z.string().min(1),
|
|
25
|
+
placeholderTopologyHash: z.string().min(1),
|
|
26
|
+
attributeTopologyHash: z.string().min(1),
|
|
27
|
+
displayPolicyVersion: z.number().int().positive(),
|
|
28
|
+
createdAt: z.number().int().nonnegative(),
|
|
29
|
+
lastAccessedAt: z.number().int().nonnegative()
|
|
30
|
+
});
|
|
31
|
+
const TranslationCacheWriteInputSchema = TranslationCacheEntrySchema.omit({
|
|
32
|
+
createdAt: true,
|
|
33
|
+
lastAccessedAt: true
|
|
34
|
+
});
|
|
35
|
+
const TranslationCacheReadInputSchema = z.object({ keyHash: z.string().min(1) });
|
|
36
|
+
const TranslationCacheStatsSchema = z.object({
|
|
37
|
+
enabled: z.boolean(),
|
|
38
|
+
entryLimit: z.number().int().positive(),
|
|
39
|
+
entries: z.number().int().nonnegative(),
|
|
40
|
+
databasePath: z.string().optional()
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
export { MAX_TRANSLATION_CACHE_ENTRY_LIMIT as a, TranslationCacheEntrySchema as c, TranslationCacheStatsSchema as d, TranslationCacheWriteInputSchema as f, DocumentTranslationDisplayModeSchema as i, TranslationCacheReadInputSchema as l, DOCUMENT_TRANSLATION_DISPLAY_MODES as n, MIN_TRANSLATION_CACHE_ENTRY_LIMIT as o, DocumentTranslationConfigSchema as r, TRANSLATION_CACHE_POLICY_VERSION as s, DEFAULT_TRANSLATION_CACHE_ENTRY_LIMIT as t, TranslationCacheSettingsSchema as u };
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/document-translation.d.ts
|
|
4
|
+
declare const DOCUMENT_TRANSLATION_DISPLAY_MODES: readonly ["direct", "bilingual"];
|
|
5
|
+
declare const DocumentTranslationDisplayModeSchema: z.ZodEnum<["direct", "bilingual"]>;
|
|
6
|
+
type DocumentTranslationDisplayMode = z.infer<typeof DocumentTranslationDisplayModeSchema>;
|
|
7
|
+
declare const DocumentTranslationConfigSchema: z.ZodObject<{
|
|
8
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
9
|
+
targetLanguage: z.ZodDefault<z.ZodString>;
|
|
10
|
+
displayMode: z.ZodDefault<z.ZodEnum<["direct", "bilingual"]>>;
|
|
11
|
+
cacheEnabled: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
targetLanguage: string;
|
|
15
|
+
displayMode: "direct" | "bilingual";
|
|
16
|
+
cacheEnabled: boolean;
|
|
17
|
+
}, {
|
|
18
|
+
enabled?: boolean | undefined;
|
|
19
|
+
targetLanguage?: string | undefined;
|
|
20
|
+
displayMode?: "direct" | "bilingual" | undefined;
|
|
21
|
+
cacheEnabled?: boolean | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
type DocumentTranslationConfig = z.infer<typeof DocumentTranslationConfigSchema>;
|
|
24
|
+
declare const DEFAULT_TRANSLATION_CACHE_ENTRY_LIMIT = 10000;
|
|
25
|
+
declare const MIN_TRANSLATION_CACHE_ENTRY_LIMIT = 100;
|
|
26
|
+
declare const MAX_TRANSLATION_CACHE_ENTRY_LIMIT = 200000;
|
|
27
|
+
declare const TRANSLATION_CACHE_POLICY_VERSION = 2;
|
|
28
|
+
declare const TranslationCacheSettingsSchema: z.ZodObject<{
|
|
29
|
+
entryLimit: z.ZodDefault<z.ZodNumber>;
|
|
30
|
+
}, "strip", z.ZodTypeAny, {
|
|
31
|
+
entryLimit: number;
|
|
32
|
+
}, {
|
|
33
|
+
entryLimit?: number | undefined;
|
|
34
|
+
}>;
|
|
35
|
+
type TranslationCacheSettings = z.infer<typeof TranslationCacheSettingsSchema>;
|
|
36
|
+
declare const TranslationCacheEntrySchema: z.ZodObject<{
|
|
37
|
+
key: z.ZodString;
|
|
38
|
+
keyHash: z.ZodString;
|
|
39
|
+
sourceText: z.ZodString;
|
|
40
|
+
translatedText: z.ZodString;
|
|
41
|
+
targetNodesJson: z.ZodOptional<z.ZodString>;
|
|
42
|
+
sourceLanguage: z.ZodString;
|
|
43
|
+
targetLanguage: z.ZodString;
|
|
44
|
+
placeholderTopologyHash: z.ZodString;
|
|
45
|
+
attributeTopologyHash: z.ZodString;
|
|
46
|
+
displayPolicyVersion: z.ZodNumber;
|
|
47
|
+
createdAt: z.ZodNumber;
|
|
48
|
+
lastAccessedAt: z.ZodNumber;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
targetLanguage: string;
|
|
51
|
+
key: string;
|
|
52
|
+
keyHash: string;
|
|
53
|
+
sourceText: string;
|
|
54
|
+
translatedText: string;
|
|
55
|
+
sourceLanguage: string;
|
|
56
|
+
placeholderTopologyHash: string;
|
|
57
|
+
attributeTopologyHash: string;
|
|
58
|
+
displayPolicyVersion: number;
|
|
59
|
+
createdAt: number;
|
|
60
|
+
lastAccessedAt: number;
|
|
61
|
+
targetNodesJson?: string | undefined;
|
|
62
|
+
}, {
|
|
63
|
+
targetLanguage: string;
|
|
64
|
+
key: string;
|
|
65
|
+
keyHash: string;
|
|
66
|
+
sourceText: string;
|
|
67
|
+
translatedText: string;
|
|
68
|
+
sourceLanguage: string;
|
|
69
|
+
placeholderTopologyHash: string;
|
|
70
|
+
attributeTopologyHash: string;
|
|
71
|
+
displayPolicyVersion: number;
|
|
72
|
+
createdAt: number;
|
|
73
|
+
lastAccessedAt: number;
|
|
74
|
+
targetNodesJson?: string | undefined;
|
|
75
|
+
}>;
|
|
76
|
+
type TranslationCacheEntry = z.infer<typeof TranslationCacheEntrySchema>;
|
|
77
|
+
declare const TranslationCacheWriteInputSchema: z.ZodObject<Omit<{
|
|
78
|
+
key: z.ZodString;
|
|
79
|
+
keyHash: z.ZodString;
|
|
80
|
+
sourceText: z.ZodString;
|
|
81
|
+
translatedText: z.ZodString;
|
|
82
|
+
targetNodesJson: z.ZodOptional<z.ZodString>;
|
|
83
|
+
sourceLanguage: z.ZodString;
|
|
84
|
+
targetLanguage: z.ZodString;
|
|
85
|
+
placeholderTopologyHash: z.ZodString;
|
|
86
|
+
attributeTopologyHash: z.ZodString;
|
|
87
|
+
displayPolicyVersion: z.ZodNumber;
|
|
88
|
+
createdAt: z.ZodNumber;
|
|
89
|
+
lastAccessedAt: z.ZodNumber;
|
|
90
|
+
}, "createdAt" | "lastAccessedAt">, "strip", z.ZodTypeAny, {
|
|
91
|
+
targetLanguage: string;
|
|
92
|
+
key: string;
|
|
93
|
+
keyHash: string;
|
|
94
|
+
sourceText: string;
|
|
95
|
+
translatedText: string;
|
|
96
|
+
sourceLanguage: string;
|
|
97
|
+
placeholderTopologyHash: string;
|
|
98
|
+
attributeTopologyHash: string;
|
|
99
|
+
displayPolicyVersion: number;
|
|
100
|
+
targetNodesJson?: string | undefined;
|
|
101
|
+
}, {
|
|
102
|
+
targetLanguage: string;
|
|
103
|
+
key: string;
|
|
104
|
+
keyHash: string;
|
|
105
|
+
sourceText: string;
|
|
106
|
+
translatedText: string;
|
|
107
|
+
sourceLanguage: string;
|
|
108
|
+
placeholderTopologyHash: string;
|
|
109
|
+
attributeTopologyHash: string;
|
|
110
|
+
displayPolicyVersion: number;
|
|
111
|
+
targetNodesJson?: string | undefined;
|
|
112
|
+
}>;
|
|
113
|
+
type TranslationCacheWriteInput = z.infer<typeof TranslationCacheWriteInputSchema>;
|
|
114
|
+
declare const TranslationCacheReadInputSchema: z.ZodObject<{
|
|
115
|
+
keyHash: z.ZodString;
|
|
116
|
+
}, "strip", z.ZodTypeAny, {
|
|
117
|
+
keyHash: string;
|
|
118
|
+
}, {
|
|
119
|
+
keyHash: string;
|
|
120
|
+
}>;
|
|
121
|
+
type TranslationCacheReadInput = z.infer<typeof TranslationCacheReadInputSchema>;
|
|
122
|
+
declare const TranslationCacheStatsSchema: z.ZodObject<{
|
|
123
|
+
enabled: z.ZodBoolean;
|
|
124
|
+
entryLimit: z.ZodNumber;
|
|
125
|
+
entries: z.ZodNumber;
|
|
126
|
+
databasePath: z.ZodOptional<z.ZodString>;
|
|
127
|
+
}, "strip", z.ZodTypeAny, {
|
|
128
|
+
enabled: boolean;
|
|
129
|
+
entries: number;
|
|
130
|
+
entryLimit: number;
|
|
131
|
+
databasePath?: string | undefined;
|
|
132
|
+
}, {
|
|
133
|
+
enabled: boolean;
|
|
134
|
+
entries: number;
|
|
135
|
+
entryLimit: number;
|
|
136
|
+
databasePath?: string | undefined;
|
|
137
|
+
}>;
|
|
138
|
+
type TranslationCacheStats = z.infer<typeof TranslationCacheStatsSchema>;
|
|
139
|
+
//#endregion
|
|
140
|
+
export { TranslationCacheStatsSchema as _, DocumentTranslationDisplayMode as a, MIN_TRANSLATION_CACHE_ENTRY_LIMIT as c, TranslationCacheEntrySchema as d, TranslationCacheReadInput as f, TranslationCacheStats as g, TranslationCacheSettingsSchema as h, DocumentTranslationConfigSchema as i, TRANSLATION_CACHE_POLICY_VERSION as l, TranslationCacheSettings as m, DOCUMENT_TRANSLATION_DISPLAY_MODES as n, DocumentTranslationDisplayModeSchema as o, TranslationCacheReadInputSchema as p, DocumentTranslationConfig as r, MAX_TRANSLATION_CACHE_ENTRY_LIMIT as s, DEFAULT_TRANSLATION_CACHE_ENTRY_LIMIT as t, TranslationCacheEntry as u, TranslationCacheWriteInput as v, TranslationCacheWriteInputSchema as y };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { _ as TranslationCacheStatsSchema, a as DocumentTranslationDisplayMode, c as MIN_TRANSLATION_CACHE_ENTRY_LIMIT, d as TranslationCacheEntrySchema, f as TranslationCacheReadInput, g as TranslationCacheStats, h as TranslationCacheSettingsSchema, i as DocumentTranslationConfigSchema, l as TRANSLATION_CACHE_POLICY_VERSION, m as TranslationCacheSettings, n as DOCUMENT_TRANSLATION_DISPLAY_MODES, o as DocumentTranslationDisplayModeSchema, p as TranslationCacheReadInputSchema, r as DocumentTranslationConfig, s as MAX_TRANSLATION_CACHE_ENTRY_LIMIT, t as DEFAULT_TRANSLATION_CACHE_ENTRY_LIMIT, u as TranslationCacheEntry, v as TranslationCacheWriteInput, y as TranslationCacheWriteInputSchema } from "./document-translation-VavI1QOl.mjs";
|
|
2
|
+
export { DEFAULT_TRANSLATION_CACHE_ENTRY_LIMIT, DOCUMENT_TRANSLATION_DISPLAY_MODES, DocumentTranslationConfig, DocumentTranslationConfigSchema, DocumentTranslationDisplayMode, DocumentTranslationDisplayModeSchema, MAX_TRANSLATION_CACHE_ENTRY_LIMIT, MIN_TRANSLATION_CACHE_ENTRY_LIMIT, TRANSLATION_CACHE_POLICY_VERSION, TranslationCacheEntry, TranslationCacheEntrySchema, TranslationCacheReadInput, TranslationCacheReadInputSchema, TranslationCacheSettings, TranslationCacheSettingsSchema, TranslationCacheStats, TranslationCacheStatsSchema, TranslationCacheWriteInput, TranslationCacheWriteInputSchema };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { a as MAX_TRANSLATION_CACHE_ENTRY_LIMIT, c as TranslationCacheEntrySchema, d as TranslationCacheStatsSchema, f as TranslationCacheWriteInputSchema, i as DocumentTranslationDisplayModeSchema, l as TranslationCacheReadInputSchema, n as DOCUMENT_TRANSLATION_DISPLAY_MODES, o as MIN_TRANSLATION_CACHE_ENTRY_LIMIT, r as DocumentTranslationConfigSchema, s as TRANSLATION_CACHE_POLICY_VERSION, t as DEFAULT_TRANSLATION_CACHE_ENTRY_LIMIT, u as TranslationCacheSettingsSchema } from "./document-translation-CvUxMOPl.mjs";
|
|
2
|
+
|
|
3
|
+
export { DEFAULT_TRANSLATION_CACHE_ENTRY_LIMIT, DOCUMENT_TRANSLATION_DISPLAY_MODES, DocumentTranslationConfigSchema, DocumentTranslationDisplayModeSchema, MAX_TRANSLATION_CACHE_ENTRY_LIMIT, MIN_TRANSLATION_CACHE_ENTRY_LIMIT, TRANSLATION_CACHE_POLICY_VERSION, TranslationCacheEntrySchema, TranslationCacheReadInputSchema, TranslationCacheSettingsSchema, TranslationCacheStatsSchema, TranslationCacheWriteInputSchema };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
//#region src/hosted-app.d.ts
|
|
2
|
+
declare const OFFICIAL_APP_BASE_URL = "https://app.openspecui.com";
|
|
3
|
+
declare const HOSTED_SHELL_PROTOCOL_VERSION = 1;
|
|
4
|
+
declare const OPENSPECUI_RUNTIME_CAPABILITIES: readonly ["notifications.subscribe", "config.notifications"];
|
|
5
|
+
type OpenSpecUIRuntimeCapability = (typeof OPENSPECUI_RUNTIME_CAPABILITIES)[number];
|
|
6
|
+
interface HostedBackendHealthResponse {
|
|
7
|
+
status: 'ok';
|
|
8
|
+
projectDir: string;
|
|
9
|
+
projectName: string;
|
|
10
|
+
watcherEnabled: boolean;
|
|
11
|
+
openspecuiVersion: string;
|
|
12
|
+
hostedShellProtocolVersion: typeof HOSTED_SHELL_PROTOCOL_VERSION;
|
|
13
|
+
embeddedUiUrl: string;
|
|
14
|
+
runtimeCapabilities: readonly OpenSpecUIRuntimeCapability[];
|
|
15
|
+
}
|
|
16
|
+
interface BackendHealthPayloadInput {
|
|
17
|
+
projectDir: string;
|
|
18
|
+
projectName: string;
|
|
19
|
+
watcherEnabled: boolean;
|
|
20
|
+
openspecuiVersion: string;
|
|
21
|
+
embeddedUiUrl: string;
|
|
22
|
+
}
|
|
23
|
+
declare function normalizeHostedAppBaseUrl(input: string): string;
|
|
24
|
+
declare function resolveHostedAppBaseUrl(options: {
|
|
25
|
+
override?: string | null;
|
|
26
|
+
configured?: string | null;
|
|
27
|
+
}): string;
|
|
28
|
+
declare function normalizeEmbeddedUiUrl(input: string): string;
|
|
29
|
+
declare function isSupportedEmbeddedUiUrl(input: string): boolean;
|
|
30
|
+
declare function buildHostedLaunchUrl(options: {
|
|
31
|
+
baseUrl: string;
|
|
32
|
+
apiBaseUrl: string;
|
|
33
|
+
}): string;
|
|
34
|
+
declare function buildEmbeddedUiLaunchUrl(options: {
|
|
35
|
+
embeddedUiUrl: string;
|
|
36
|
+
apiBaseUrl: string;
|
|
37
|
+
sessionId: string;
|
|
38
|
+
}): string;
|
|
39
|
+
declare function buildBackendHealthPayload(input: BackendHealthPayloadInput): HostedBackendHealthResponse;
|
|
40
|
+
declare function isBackendHealthRuntimeMetadata(value: unknown): value is HostedBackendHealthResponse;
|
|
41
|
+
declare function isHostedBackendHealthResponse(value: unknown): value is HostedBackendHealthResponse;
|
|
42
|
+
//#endregion
|
|
43
|
+
export { OPENSPECUI_RUNTIME_CAPABILITIES as a, buildEmbeddedUiLaunchUrl as c, isHostedBackendHealthResponse as d, isSupportedEmbeddedUiUrl as f, resolveHostedAppBaseUrl as h, OFFICIAL_APP_BASE_URL as i, buildHostedLaunchUrl as l, normalizeHostedAppBaseUrl as m, HOSTED_SHELL_PROTOCOL_VERSION as n, OpenSpecUIRuntimeCapability as o, normalizeEmbeddedUiUrl as p, HostedBackendHealthResponse as r, buildBackendHealthPayload as s, BackendHealthPayloadInput as t, isBackendHealthRuntimeMetadata as u };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
//#region src/hosted-app.ts
|
|
2
2
|
const OFFICIAL_APP_BASE_URL = "https://app.openspecui.com";
|
|
3
3
|
const HOSTED_SHELL_PROTOCOL_VERSION = 1;
|
|
4
|
+
const OPENSPECUI_RUNTIME_CAPABILITIES = ["notifications.subscribe", "config.notifications"];
|
|
4
5
|
function isRecord(value) {
|
|
5
6
|
return typeof value === "object" && value !== null;
|
|
6
7
|
}
|
|
@@ -65,10 +66,30 @@ function buildEmbeddedUiLaunchUrl(options) {
|
|
|
65
66
|
url.searchParams.set("session", options.sessionId);
|
|
66
67
|
return url.toString();
|
|
67
68
|
}
|
|
68
|
-
function
|
|
69
|
+
function buildBackendHealthPayload(input) {
|
|
70
|
+
return {
|
|
71
|
+
status: "ok",
|
|
72
|
+
projectDir: input.projectDir,
|
|
73
|
+
projectName: input.projectName,
|
|
74
|
+
watcherEnabled: input.watcherEnabled,
|
|
75
|
+
openspecuiVersion: input.openspecuiVersion,
|
|
76
|
+
hostedShellProtocolVersion: HOSTED_SHELL_PROTOCOL_VERSION,
|
|
77
|
+
embeddedUiUrl: input.embeddedUiUrl,
|
|
78
|
+
runtimeCapabilities: OPENSPECUI_RUNTIME_CAPABILITIES
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function hasRequiredRuntimeCapabilities(value) {
|
|
82
|
+
if (!Array.isArray(value)) return false;
|
|
83
|
+
const capabilities = new Set(value);
|
|
84
|
+
return OPENSPECUI_RUNTIME_CAPABILITIES.every((capability) => capabilities.has(capability));
|
|
85
|
+
}
|
|
86
|
+
function isBackendHealthRuntimeMetadata(value) {
|
|
69
87
|
if (!isRecord(value)) return false;
|
|
70
|
-
return value.status === "ok" && typeof value.projectDir === "string" && typeof value.projectName === "string" && typeof value.watcherEnabled === "boolean" && typeof value.openspecuiVersion === "string" && value.hostedShellProtocolVersion === HOSTED_SHELL_PROTOCOL_VERSION && typeof value.embeddedUiUrl === "string" &&
|
|
88
|
+
return value.status === "ok" && typeof value.projectDir === "string" && typeof value.projectName === "string" && typeof value.watcherEnabled === "boolean" && typeof value.openspecuiVersion === "string" && value.hostedShellProtocolVersion === HOSTED_SHELL_PROTOCOL_VERSION && typeof value.embeddedUiUrl === "string" && hasRequiredRuntimeCapabilities(value.runtimeCapabilities);
|
|
89
|
+
}
|
|
90
|
+
function isHostedBackendHealthResponse(value) {
|
|
91
|
+
return isBackendHealthRuntimeMetadata(value) && isSupportedEmbeddedUiUrl(value.embeddedUiUrl);
|
|
71
92
|
}
|
|
72
93
|
|
|
73
94
|
//#endregion
|
|
74
|
-
export {
|
|
95
|
+
export { buildEmbeddedUiLaunchUrl as a, isHostedBackendHealthResponse as c, normalizeHostedAppBaseUrl as d, resolveHostedAppBaseUrl as f, buildBackendHealthPayload as i, isSupportedEmbeddedUiUrl as l, OFFICIAL_APP_BASE_URL as n, buildHostedLaunchUrl as o, OPENSPECUI_RUNTIME_CAPABILITIES as r, isBackendHealthRuntimeMetadata as s, HOSTED_SHELL_PROTOCOL_VERSION as t, normalizeEmbeddedUiUrl as u };
|
package/dist/hosted-app.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
export { HOSTED_SHELL_PROTOCOL_VERSION, HostedBackendHealthResponse, OFFICIAL_APP_BASE_URL, buildEmbeddedUiLaunchUrl, buildHostedLaunchUrl, isHostedBackendHealthResponse, isSupportedEmbeddedUiUrl, normalizeEmbeddedUiUrl, normalizeHostedAppBaseUrl, resolveHostedAppBaseUrl };
|
|
1
|
+
import { a as OPENSPECUI_RUNTIME_CAPABILITIES, c as buildEmbeddedUiLaunchUrl, d as isHostedBackendHealthResponse, f as isSupportedEmbeddedUiUrl, h as resolveHostedAppBaseUrl, i as OFFICIAL_APP_BASE_URL, l as buildHostedLaunchUrl, m as normalizeHostedAppBaseUrl, n as HOSTED_SHELL_PROTOCOL_VERSION, o as OpenSpecUIRuntimeCapability, p as normalizeEmbeddedUiUrl, r as HostedBackendHealthResponse, s as buildBackendHealthPayload, t as BackendHealthPayloadInput, u as isBackendHealthRuntimeMetadata } from "./hosted-app-BqJw9WgW.mjs";
|
|
2
|
+
export { BackendHealthPayloadInput, HOSTED_SHELL_PROTOCOL_VERSION, HostedBackendHealthResponse, OFFICIAL_APP_BASE_URL, OPENSPECUI_RUNTIME_CAPABILITIES, OpenSpecUIRuntimeCapability, buildBackendHealthPayload, buildEmbeddedUiLaunchUrl, buildHostedLaunchUrl, isBackendHealthRuntimeMetadata, isHostedBackendHealthResponse, isSupportedEmbeddedUiUrl, normalizeEmbeddedUiUrl, normalizeHostedAppBaseUrl, resolveHostedAppBaseUrl };
|
package/dist/hosted-app.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as buildEmbeddedUiLaunchUrl, c as isHostedBackendHealthResponse, d as normalizeHostedAppBaseUrl, f as resolveHostedAppBaseUrl, i as buildBackendHealthPayload, l as isSupportedEmbeddedUiUrl, n as OFFICIAL_APP_BASE_URL, o as buildHostedLaunchUrl, r as OPENSPECUI_RUNTIME_CAPABILITIES, s as isBackendHealthRuntimeMetadata, t as HOSTED_SHELL_PROTOCOL_VERSION, u as normalizeEmbeddedUiUrl } from "./hosted-app-Du65UHRo.mjs";
|
|
2
2
|
|
|
3
|
-
export { HOSTED_SHELL_PROTOCOL_VERSION, OFFICIAL_APP_BASE_URL, buildEmbeddedUiLaunchUrl, buildHostedLaunchUrl, isHostedBackendHealthResponse, isSupportedEmbeddedUiUrl, normalizeEmbeddedUiUrl, normalizeHostedAppBaseUrl, resolveHostedAppBaseUrl };
|
|
3
|
+
export { HOSTED_SHELL_PROTOCOL_VERSION, OFFICIAL_APP_BASE_URL, OPENSPECUI_RUNTIME_CAPABILITIES, buildBackendHealthPayload, buildEmbeddedUiLaunchUrl, buildHostedLaunchUrl, isBackendHealthRuntimeMetadata, isHostedBackendHealthResponse, isSupportedEmbeddedUiUrl, normalizeEmbeddedUiUrl, normalizeHostedAppBaseUrl, resolveHostedAppBaseUrl };
|