@tutti-os/workspace-app-center 0.0.9 → 0.0.11
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/chunk-5SANC3S6.js +1857 -0
- package/dist/chunk-5SANC3S6.js.map +1 -0
- package/dist/{chunk-VLUZD2IT.js → chunk-PD2WLRHE.js} +3 -2
- package/dist/chunk-PD2WLRHE.js.map +1 -0
- package/dist/{chunk-QSAEUGFC.js → chunk-UBERYRMA.js} +1 -1
- package/dist/chunk-UBERYRMA.js.map +1 -0
- package/dist/contracts/index.d.ts +154 -155
- package/dist/contracts/index.js +2 -2
- package/dist/core/index.d.ts +216 -3
- package/dist/core/index.js +8 -2
- package/dist/i18n/index.js +4 -2
- package/dist/i18n/index.js.map +1 -1
- package/dist/{index-Bert0Egy.d.ts → index-B1t4jDvQ.d.ts} +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -3
- package/dist/ui/index.d.ts +3 -3
- package/dist/ui/index.js +13 -2
- package/dist/ui/index.js.map +1 -1
- package/dist/viewModel-BEb0vvYM.d.ts +175 -0
- package/package.json +3 -3
- package/dist/chunk-QSAEUGFC.js.map +0 -1
- package/dist/chunk-VLUZD2IT.js.map +0 -1
- package/dist/chunk-XDDBJJGP.js +0 -691
- package/dist/chunk-XDDBJJGP.js.map +0 -1
|
@@ -1,158 +1,157 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
interface WorkspaceAppManifestIcon {
|
|
4
|
-
readonly type: "asset";
|
|
5
|
-
readonly src: string;
|
|
6
|
-
}
|
|
7
|
-
interface WorkspaceAppManifestRuntime {
|
|
8
|
-
readonly bootstrap: string;
|
|
9
|
-
readonly healthcheckPath: string;
|
|
10
|
-
}
|
|
11
|
-
type WorkspaceAppManifestWindowMinimizeBehavior = "hibernate" | "keep-mounted";
|
|
12
|
-
interface WorkspaceAppManifestWindow {
|
|
13
|
-
readonly minimizeBehavior?: WorkspaceAppManifestWindowMinimizeBehavior;
|
|
14
|
-
readonly minHeight?: number;
|
|
15
|
-
readonly minWidth?: number;
|
|
16
|
-
}
|
|
17
|
-
interface WorkspaceAppManifestAuthor {
|
|
18
|
-
readonly name: string;
|
|
19
|
-
readonly url?: string;
|
|
20
|
-
}
|
|
21
|
-
interface WorkspaceAppManifestLocalizationInfo {
|
|
22
|
-
readonly defaultLocale: string;
|
|
23
|
-
readonly additionalLocales?: readonly WorkspaceAppManifestLocalizationFile[];
|
|
24
|
-
}
|
|
25
|
-
interface WorkspaceAppManifestLocalizationFile {
|
|
26
|
-
readonly locale: string;
|
|
27
|
-
readonly file: string;
|
|
28
|
-
}
|
|
29
|
-
interface WorkspaceAppManifest {
|
|
30
|
-
readonly schemaVersion: WorkspaceAppManifestSchemaVersion;
|
|
31
|
-
readonly appId: string;
|
|
32
|
-
readonly name: string;
|
|
33
|
-
readonly version: string;
|
|
34
|
-
readonly description: string;
|
|
35
|
-
readonly icon?: WorkspaceAppManifestIcon;
|
|
36
|
-
readonly runtime: WorkspaceAppManifestRuntime;
|
|
37
|
-
readonly window?: WorkspaceAppManifestWindow;
|
|
38
|
-
readonly author?: WorkspaceAppManifestAuthor;
|
|
39
|
-
readonly tags?: readonly string[];
|
|
40
|
-
readonly localizationInfo?: WorkspaceAppManifestLocalizationInfo;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
type WorkspaceAppCatalogSourceKind = "bundled" | "local" | "remote";
|
|
44
|
-
interface WorkspaceAppCatalogSource {
|
|
45
|
-
readonly id?: string;
|
|
46
|
-
readonly kind: WorkspaceAppCatalogSourceKind;
|
|
47
|
-
readonly label?: string;
|
|
48
|
-
}
|
|
49
|
-
interface WorkspaceAppCatalogLocalization {
|
|
50
|
-
readonly locale: string;
|
|
51
|
-
readonly name?: string | null;
|
|
52
|
-
readonly description?: string | null;
|
|
53
|
-
readonly tags?: readonly string[];
|
|
54
|
-
}
|
|
55
|
-
interface WorkspaceAppCatalogEntry {
|
|
56
|
-
readonly localizations?: readonly WorkspaceAppCatalogLocalization[];
|
|
57
|
-
readonly manifest: WorkspaceAppManifest;
|
|
58
|
-
readonly source?: WorkspaceAppCatalogSource;
|
|
59
|
-
}
|
|
60
|
-
interface WorkspaceAppInstallRecord {
|
|
61
|
-
readonly appId: string;
|
|
62
|
-
readonly installedAt?: string | null;
|
|
63
|
-
readonly updatedAt?: string | null;
|
|
64
|
-
readonly catalogSourceId?: string | null;
|
|
65
|
-
}
|
|
66
|
-
interface WorkspaceAppRecord {
|
|
67
|
-
readonly availableIconUrl?: string | null;
|
|
68
|
-
readonly availableVersion?: string | null;
|
|
69
|
-
readonly catalog?: WorkspaceAppCatalogEntry | null;
|
|
70
|
-
readonly category?: string | null;
|
|
71
|
-
readonly createdAtUnixMs?: number | null;
|
|
72
|
-
readonly install?: WorkspaceAppInstallRecord | null;
|
|
73
|
-
readonly manifest: WorkspaceAppManifest;
|
|
74
|
-
readonly updateAvailable?: boolean;
|
|
75
|
-
}
|
|
1
|
+
import { w as WorkspaceAppRuntimeStatus, f as WorkspaceAppFactoryJobStatus } from '../viewModel-BEb0vvYM.js';
|
|
2
|
+
export { A as AppCenterViewModel, W as WorkspaceAppActionContext, a as WorkspaceAppCardViewModel, b as WorkspaceAppCatalogEntry, c as WorkspaceAppCatalogLocalization, d as WorkspaceAppCatalogSource, e as WorkspaceAppCatalogSourceKind, g as WorkspaceAppFactoryJobViewModel, h as WorkspaceAppInstallRecord, i as WorkspaceAppManifest, j as WorkspaceAppManifestAuthor, k as WorkspaceAppManifestIcon, l as WorkspaceAppManifestLocalizationFile, m as WorkspaceAppManifestLocalizationInfo, n as WorkspaceAppManifestReferences, o as WorkspaceAppManifestRuntime, p as WorkspaceAppManifestSchemaVersion, q as WorkspaceAppManifestWindow, r as WorkspaceAppManifestWindowMinimizeBehavior, s as WorkspaceAppPrimaryAction, t as WorkspaceAppRecord, u as WorkspaceAppRuntimeError, v as WorkspaceAppRuntimeState, x as WorkspaceAppStatusTone, y as workspaceAppManifestSchemaVersion, z as workspaceAppRuntimeStatuses } from '../viewModel-BEb0vvYM.js';
|
|
76
3
|
|
|
77
|
-
|
|
78
|
-
type
|
|
79
|
-
interface
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
readonly
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
readonly
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
4
|
+
type WorkspaceAppCenterRuntimeStatus = WorkspaceAppRuntimeStatus;
|
|
5
|
+
type WorkspaceAppCenterSource = "builtin" | "generated" | "imported";
|
|
6
|
+
interface WorkspaceAppCenterLocalization {
|
|
7
|
+
locale: string;
|
|
8
|
+
name?: string | null;
|
|
9
|
+
description?: string | null;
|
|
10
|
+
tags: readonly string[];
|
|
11
|
+
}
|
|
12
|
+
type WorkspaceAppCenterCliStatus = "none" | "pending" | "active" | "warning" | "error";
|
|
13
|
+
interface WorkspaceAppCenterCliIssue {
|
|
14
|
+
code: string;
|
|
15
|
+
message: string;
|
|
16
|
+
path?: string | null;
|
|
17
|
+
}
|
|
18
|
+
interface WorkspaceAppCenterCliState {
|
|
19
|
+
active: boolean;
|
|
20
|
+
issues: readonly WorkspaceAppCenterCliIssue[];
|
|
21
|
+
scope?: string | null;
|
|
22
|
+
status: WorkspaceAppCenterCliStatus;
|
|
23
|
+
}
|
|
24
|
+
interface WorkspaceAppCenterReferencesState {
|
|
25
|
+
searchSupported: boolean;
|
|
26
|
+
}
|
|
27
|
+
interface WorkspaceAppCenterApp {
|
|
28
|
+
availableIconUrl?: string | null;
|
|
29
|
+
availableVersion?: string | null;
|
|
30
|
+
description?: string | null;
|
|
31
|
+
installationId?: string | null;
|
|
32
|
+
runtimeId?: string | null;
|
|
33
|
+
appId: string;
|
|
34
|
+
createdAtUnixMs: number;
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
exportable: boolean;
|
|
37
|
+
failureReason?: string | null;
|
|
38
|
+
iconUrl?: string | null;
|
|
39
|
+
installed: boolean;
|
|
40
|
+
lastError?: string | null;
|
|
41
|
+
cli?: WorkspaceAppCenterCliState;
|
|
42
|
+
localizations?: readonly WorkspaceAppCenterLocalization[];
|
|
43
|
+
minimizeBehavior: WorkspaceAppMinimizeBehavior;
|
|
44
|
+
name: string;
|
|
45
|
+
references: WorkspaceAppCenterReferencesState;
|
|
46
|
+
runtimeStatus: WorkspaceAppCenterRuntimeStatus;
|
|
47
|
+
source: WorkspaceAppCenterSource;
|
|
48
|
+
stateRevision: number;
|
|
49
|
+
tags?: readonly string[];
|
|
50
|
+
updateAvailable?: boolean;
|
|
51
|
+
launchUrl?: string | null;
|
|
52
|
+
version?: string | null;
|
|
53
|
+
windowMinHeight?: number | null;
|
|
54
|
+
windowMinWidth?: number | null;
|
|
55
|
+
}
|
|
56
|
+
type WorkspaceAppMinimizeBehavior = "hibernate" | "keep-mounted";
|
|
57
|
+
type WorkspaceAppCenterCatalogStatus = "disabled" | "failed" | "loading" | "ready";
|
|
58
|
+
interface WorkspaceAppCenterSnapshot {
|
|
59
|
+
apps: readonly WorkspaceAppCenterApp[];
|
|
60
|
+
catalogLastError?: string | null;
|
|
61
|
+
catalogStatus: WorkspaceAppCenterCatalogStatus;
|
|
62
|
+
catalogUpdatedAtUnixMs?: number | null;
|
|
63
|
+
}
|
|
64
|
+
interface WorkspaceAppFactoryJob {
|
|
65
|
+
agentSessionId?: string | null;
|
|
66
|
+
appId?: string | null;
|
|
67
|
+
createdAtUnixMs: number;
|
|
68
|
+
description?: string | null;
|
|
69
|
+
displayName: string;
|
|
70
|
+
failureReason?: string | null;
|
|
71
|
+
jobId: string;
|
|
72
|
+
model?: string | null;
|
|
73
|
+
prompt: string;
|
|
74
|
+
provider?: string | null;
|
|
75
|
+
reasoningEffort?: string | null;
|
|
76
|
+
publishedVersion?: string | null;
|
|
77
|
+
status: WorkspaceAppFactoryJobStatus;
|
|
78
|
+
updatedAtUnixMs: number;
|
|
79
|
+
validationResult?: Record<string, unknown> | null;
|
|
80
|
+
workspaceId: string;
|
|
81
|
+
}
|
|
82
|
+
interface WorkspaceAppFactorySnapshot {
|
|
83
|
+
jobs: readonly WorkspaceAppFactoryJob[];
|
|
84
|
+
}
|
|
85
|
+
interface WorkspaceAppFactoryModelOption {
|
|
86
|
+
label: string;
|
|
87
|
+
value: string;
|
|
88
|
+
}
|
|
89
|
+
interface WorkspaceAppFactoryReasoningOption {
|
|
90
|
+
label: string;
|
|
91
|
+
value: string;
|
|
92
|
+
}
|
|
93
|
+
interface WorkspaceAppFactoryPermissionOption {
|
|
94
|
+
label: string;
|
|
95
|
+
semantic?: string | null;
|
|
96
|
+
value: string;
|
|
97
|
+
}
|
|
98
|
+
interface WorkspaceAppFactoryProviderConfiguration {
|
|
99
|
+
defaultModel?: string | null;
|
|
100
|
+
defaultPermissionModeId?: string | null;
|
|
101
|
+
defaultReasoningEffort?: string | null;
|
|
102
|
+
modelOptions: readonly WorkspaceAppFactoryModelOption[];
|
|
103
|
+
permissionModeOptions: readonly WorkspaceAppFactoryPermissionOption[];
|
|
104
|
+
reasoningEffortOptions: readonly WorkspaceAppFactoryReasoningOption[];
|
|
105
|
+
}
|
|
106
|
+
type WorkspaceAppCenterLoadStatus = "idle" | "loading" | "ready" | "unavailable";
|
|
107
|
+
interface WorkspaceAppCenterStoreState {
|
|
108
|
+
apps: WorkspaceAppCenterApp[];
|
|
109
|
+
catalogLastError: string | null;
|
|
110
|
+
catalogStatus: WorkspaceAppCenterCatalogStatus;
|
|
111
|
+
catalogUpdatedAtUnixMs: number | null;
|
|
112
|
+
error: string | null;
|
|
113
|
+
factoryJobs: WorkspaceAppFactoryJob[];
|
|
114
|
+
loadStatus: WorkspaceAppCenterLoadStatus;
|
|
115
|
+
openingFolderAppId: string | null;
|
|
116
|
+
revision: number;
|
|
117
|
+
viewStateByWorkspaceId: Record<string, WorkspaceAppCenterViewState | undefined>;
|
|
118
|
+
workspaceId: string | null;
|
|
119
|
+
}
|
|
120
|
+
type WorkspaceAppCenterAppTab = "my" | "recommended";
|
|
121
|
+
interface WorkspaceAppCenterViewState {
|
|
122
|
+
activeAppTab: WorkspaceAppCenterAppTab;
|
|
123
|
+
}
|
|
124
|
+
type WorkspaceAppCenterReadableStoreState = Readonly<WorkspaceAppCenterStoreState>;
|
|
125
|
+
interface WorkspaceAppCenterGateway {
|
|
126
|
+
installWorkspaceApp(workspaceId: string, appId: string): Promise<WorkspaceAppCenterSnapshot>;
|
|
127
|
+
launchWorkspaceApp(workspaceId: string, appId: string): Promise<WorkspaceAppCenterSnapshot>;
|
|
128
|
+
deleteWorkspaceApp(workspaceId: string, appId: string): Promise<WorkspaceAppCenterSnapshot>;
|
|
129
|
+
listWorkspaceApps(workspaceId: string): Promise<WorkspaceAppCenterSnapshot>;
|
|
130
|
+
refreshWorkspaceAppCatalog(workspaceId: string): Promise<WorkspaceAppCenterSnapshot>;
|
|
131
|
+
uninstallWorkspaceApp(workspaceId: string, appId: string): Promise<WorkspaceAppCenterSnapshot>;
|
|
132
|
+
retryWorkspaceApp(workspaceId: string, appId: string): Promise<WorkspaceAppCenterSnapshot>;
|
|
133
|
+
rollbackWorkspaceApp(workspaceId: string, appId: string, version: string): Promise<WorkspaceAppCenterSnapshot>;
|
|
134
|
+
listWorkspaceAppFactoryJobs(workspaceId: string): Promise<WorkspaceAppFactorySnapshot>;
|
|
135
|
+
createWorkspaceAppFactoryJob(workspaceId: string, input: {
|
|
136
|
+
displayName: string;
|
|
137
|
+
model?: string;
|
|
138
|
+
permissionModeId?: string;
|
|
139
|
+
prompt: string;
|
|
140
|
+
provider?: string;
|
|
141
|
+
reasoningEffort?: string;
|
|
142
|
+
}): Promise<WorkspaceAppFactorySnapshot>;
|
|
143
|
+
cancelWorkspaceAppFactoryJob(workspaceId: string, jobId: string): Promise<WorkspaceAppFactorySnapshot>;
|
|
144
|
+
deleteWorkspaceAppFactoryJob(workspaceId: string, jobId: string): Promise<WorkspaceAppFactorySnapshot>;
|
|
145
|
+
retryWorkspaceAppFactoryJobValidation(workspaceId: string, jobId: string): Promise<WorkspaceAppFactorySnapshot>;
|
|
146
|
+
fixWorkspaceAppFactoryJob(workspaceId: string, jobId: string, input: {
|
|
147
|
+
prompt: string;
|
|
148
|
+
}): Promise<WorkspaceAppFactorySnapshot>;
|
|
149
|
+
prepareWorkspaceAppFactoryJobModification(workspaceId: string, jobId: string): Promise<WorkspaceAppFactorySnapshot>;
|
|
150
|
+
publishWorkspaceAppFactoryJob(workspaceId: string, jobId: string): Promise<{
|
|
151
|
+
appSnapshot: WorkspaceAppCenterSnapshot;
|
|
152
|
+
factorySnapshot: WorkspaceAppFactorySnapshot;
|
|
153
|
+
}>;
|
|
154
|
+
startEnabledWorkspaceApps(workspaceId: string): Promise<WorkspaceAppCenterSnapshot>;
|
|
156
155
|
}
|
|
157
156
|
|
|
158
|
-
export { type
|
|
157
|
+
export { type WorkspaceAppCenterApp, type WorkspaceAppCenterAppTab, type WorkspaceAppCenterCatalogStatus, type WorkspaceAppCenterCliIssue, type WorkspaceAppCenterCliState, type WorkspaceAppCenterCliStatus, type WorkspaceAppCenterGateway, type WorkspaceAppCenterLoadStatus, type WorkspaceAppCenterLocalization, type WorkspaceAppCenterReadableStoreState, type WorkspaceAppCenterReferencesState, type WorkspaceAppCenterRuntimeStatus, type WorkspaceAppCenterSnapshot, type WorkspaceAppCenterSource, type WorkspaceAppCenterStoreState, type WorkspaceAppCenterViewState, type WorkspaceAppFactoryJob, WorkspaceAppFactoryJobStatus, type WorkspaceAppFactoryModelOption, type WorkspaceAppFactoryPermissionOption, type WorkspaceAppFactoryProviderConfiguration, type WorkspaceAppFactoryReasoningOption, type WorkspaceAppFactorySnapshot, type WorkspaceAppMinimizeBehavior, WorkspaceAppRuntimeStatus };
|
package/dist/contracts/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
workspaceAppRuntimeStatuses
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-PD2WLRHE.js";
|
|
4
4
|
import {
|
|
5
5
|
workspaceAppManifestSchemaVersion
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-UBERYRMA.js";
|
|
7
7
|
export {
|
|
8
8
|
workspaceAppManifestSchemaVersion,
|
|
9
9
|
workspaceAppRuntimeStatuses
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,5 +1,218 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { WorkspaceAppCenterGateway, WorkspaceAppCenterApp, WorkspaceAppFactoryJob, WorkspaceAppCenterStoreState, WorkspaceAppCenterReadableStoreState, WorkspaceAppCenterViewState, WorkspaceAppCenterSnapshot, WorkspaceAppFactorySnapshot } from '../contracts/index.js';
|
|
2
|
+
export { C as CreateAppCenterViewModelInput, W as WorkspaceAppFactoryJobInput, a as WorkspaceAppManifestValidationIssue, b as WorkspaceAppManifestValidationIssueCode, c as WorkspaceAppManifestValidationResult, d as WorkspaceAppStatusPresentation, e as createAppCenterViewModel, f as createWorkspaceAppIdentity, g as createWorkspaceAppRecord, i as isWorkspaceAppId, m as mapWorkspaceAppRuntimeStatus, n as normalizeWorkspaceAppId, h as normalizeWorkspaceAppRuntimeState, r as resolveWorkspaceAppCatalogMetadata, j as resolveWorkspaceAppStatusPresentation, v as validateWorkspaceAppManifest, w as workspaceAppIdPattern } from '../index-B1t4jDvQ.js';
|
|
3
|
+
import { A as AppCenterViewModel } from '../viewModel-BEb0vvYM.js';
|
|
4
|
+
|
|
5
|
+
type WorkspaceAppCenterOperation = "app_center.refresh" | "app_center.refresh_catalog" | "app_center.start_workspace_updates" | "app_factory.prepare_modification" | "app_factory.publish" | "workspace_app.delete" | "workspace_app.export" | "workspace_app.import" | "workspace_app.install" | "workspace_app.prepare_launch" | "workspace_app.refresh_install_state" | "workspace_app.refresh_launch_wait_state" | "workspace_app.replace_icon" | "workspace_app.retry" | "workspace_app.start_enabled" | "workspace_app.update";
|
|
6
|
+
type WorkspaceAppCenterUiAction = "delete_app" | "export_app" | "import_app" | "install_app" | "open_app" | "prepare_factory_job_modification" | "publish_factory_job" | "refresh_install_state" | "refresh_launch_wait_state" | "replace_app_icon" | "retry_app" | "update_app";
|
|
7
|
+
interface WorkspaceAppCenterOperationDetails {
|
|
8
|
+
appId?: string;
|
|
9
|
+
jobId?: string;
|
|
10
|
+
operation: WorkspaceAppCenterOperation;
|
|
11
|
+
uiAction?: WorkspaceAppCenterUiAction;
|
|
12
|
+
workspaceId: string;
|
|
13
|
+
}
|
|
14
|
+
interface WorkspaceAppCenterRefreshDiscard {
|
|
15
|
+
currentSequence: number;
|
|
16
|
+
itemCount?: number;
|
|
17
|
+
operation: "app_center.refresh" | "app_center.refresh_catalog";
|
|
18
|
+
sequence: number;
|
|
19
|
+
snapshotKind: "apps" | "catalog_apps" | "factory_jobs";
|
|
20
|
+
workspaceId: string;
|
|
21
|
+
}
|
|
22
|
+
interface WorkspaceAppCenterControllerHooks {
|
|
23
|
+
onAppDeleted?: (app: WorkspaceAppCenterApp | null) => void;
|
|
24
|
+
onAppInstallFailed?: (input: {
|
|
25
|
+
app: WorkspaceAppCenterApp | null;
|
|
26
|
+
appId: string;
|
|
27
|
+
failureReason: string | null;
|
|
28
|
+
}) => void;
|
|
29
|
+
onAppInstalled?: (app: WorkspaceAppCenterApp) => void;
|
|
30
|
+
onAppRuntimeFailed?: (input: {
|
|
31
|
+
app: WorkspaceAppCenterApp;
|
|
32
|
+
failureReason: string | null;
|
|
33
|
+
}) => void;
|
|
34
|
+
onAppStopped?: (input: {
|
|
35
|
+
app: WorkspaceAppCenterApp;
|
|
36
|
+
runDurationMs: number | null;
|
|
37
|
+
}) => void;
|
|
38
|
+
onAppUninstalled?: (app: WorkspaceAppCenterApp | null) => void;
|
|
39
|
+
onAppUpdated?: (input: {
|
|
40
|
+
app: WorkspaceAppCenterApp | undefined;
|
|
41
|
+
trigger: "badge_button" | "primary_action";
|
|
42
|
+
}) => void;
|
|
43
|
+
onCatalogRefreshed?: (input: {
|
|
44
|
+
appCount: number | null;
|
|
45
|
+
errorReason: string | null;
|
|
46
|
+
success: boolean;
|
|
47
|
+
}) => void;
|
|
48
|
+
onCloseWorkspaceAppViews?: (input: {
|
|
49
|
+
appIds: readonly string[];
|
|
50
|
+
workspaceId: string;
|
|
51
|
+
}) => void;
|
|
52
|
+
onFactoryJobCreated?: (job: WorkspaceAppFactoryJob | null) => void;
|
|
53
|
+
onFactorySnapshotApplied?: (input: {
|
|
54
|
+
nextJobs: readonly WorkspaceAppFactoryJob[];
|
|
55
|
+
previousJobs: readonly WorkspaceAppFactoryJob[];
|
|
56
|
+
workspaceId: string;
|
|
57
|
+
}) => void;
|
|
58
|
+
onOperationFailure?: (input: {
|
|
59
|
+
details: WorkspaceAppCenterOperationDetails;
|
|
60
|
+
error: unknown;
|
|
61
|
+
toastMessage: string;
|
|
62
|
+
}) => void;
|
|
63
|
+
onRefreshDiscard?: (input: WorkspaceAppCenterRefreshDiscard) => void;
|
|
64
|
+
}
|
|
65
|
+
interface WorkspaceAppCenterControllerDependencies {
|
|
66
|
+
appOpenLaunchWaitTimeoutMs?: number;
|
|
67
|
+
catalogLoadingRefreshDelayMs?: number;
|
|
68
|
+
formatError: (error: unknown, details?: WorkspaceAppCenterOperationDetails) => string;
|
|
69
|
+
gateway: WorkspaceAppCenterGateway;
|
|
70
|
+
getErrorReason?: (error: unknown) => string | null;
|
|
71
|
+
hooks?: WorkspaceAppCenterControllerHooks;
|
|
72
|
+
installRefreshDelayMs?: number;
|
|
73
|
+
now?: () => number;
|
|
74
|
+
store?: WorkspaceAppCenterStoreState;
|
|
75
|
+
}
|
|
76
|
+
declare function createWorkspaceAppCenterStoreState(): WorkspaceAppCenterStoreState;
|
|
77
|
+
|
|
78
|
+
declare abstract class WorkspaceAppCenterControllerBase {
|
|
79
|
+
readonly store: WorkspaceAppCenterStoreState;
|
|
80
|
+
protected readonly dependencies: WorkspaceAppCenterControllerDependencies;
|
|
81
|
+
protected readonly listeners: Set<() => void>;
|
|
82
|
+
protected catalogRefreshTimer: ReturnType<typeof setTimeout> | null;
|
|
83
|
+
protected installRefreshTimers: Map<string, NodeJS.Timeout>;
|
|
84
|
+
protected pendingFactoryPublishKeys: Set<string>;
|
|
85
|
+
protected pendingInstallKeys: Set<string>;
|
|
86
|
+
protected pendingInstallReportKeys: Set<string>;
|
|
87
|
+
protected appLoadSequence: number;
|
|
88
|
+
protected factoryLoadSequence: number;
|
|
89
|
+
protected pollingWorkspaceId: string | null;
|
|
90
|
+
constructor(dependencies: WorkspaceAppCenterControllerDependencies);
|
|
91
|
+
get readableStore(): WorkspaceAppCenterReadableStoreState;
|
|
92
|
+
consumeError(): string | null;
|
|
93
|
+
subscribe(listener: () => void): () => void;
|
|
94
|
+
beginWorkspacePolling(workspaceId: string): void;
|
|
95
|
+
endWorkspacePolling(workspaceId: string): void;
|
|
96
|
+
getViewState(workspaceId: string, restoredState?: WorkspaceAppCenterViewState | null): WorkspaceAppCenterViewState;
|
|
97
|
+
setViewState(input: {
|
|
98
|
+
state: Partial<WorkspaceAppCenterViewState>;
|
|
99
|
+
workspaceId: string;
|
|
100
|
+
}): void;
|
|
101
|
+
setOperationError(error: unknown, details: WorkspaceAppCenterOperationDetails): void;
|
|
102
|
+
setUnavailableError(error: unknown, details: WorkspaceAppCenterOperationDetails): void;
|
|
103
|
+
protected clearCatalogRefreshTimer(): void;
|
|
104
|
+
protected clearInstallRefreshTimer(workspaceId: string, appId: string): void;
|
|
105
|
+
protected clearInstallRefreshTimers(): void;
|
|
106
|
+
protected recordOperationFailure(error: unknown, toastMessage: string, details: WorkspaceAppCenterOperationDetails): void;
|
|
107
|
+
protected bumpRevision(): void;
|
|
108
|
+
protected closeWorkspaceAppViews(workspaceId: string, appIds: readonly string[]): void;
|
|
109
|
+
protected getErrorReason(error: unknown): string | null;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
declare abstract class WorkspaceAppCenterControllerState extends WorkspaceAppCenterControllerBase {
|
|
113
|
+
abstract refresh(workspaceId: string): Promise<void>;
|
|
114
|
+
applySnapshot(workspaceId: string, snapshot: WorkspaceAppCenterSnapshot): void;
|
|
115
|
+
applyFactorySnapshot(workspaceId: string, snapshot: WorkspaceAppFactorySnapshot): void;
|
|
116
|
+
applyAppUpdate(input: {
|
|
117
|
+
app: WorkspaceAppCenterApp;
|
|
118
|
+
failureReason?: string | null;
|
|
119
|
+
startedAtUnixMs?: number | null;
|
|
120
|
+
workspaceId: string;
|
|
121
|
+
}): void;
|
|
122
|
+
applyAppSnapshot(workspaceId: string, nextApp: WorkspaceAppCenterApp, options?: {
|
|
123
|
+
installFailureReason?: string | null;
|
|
124
|
+
}): void;
|
|
125
|
+
applyFactoryJobUpdate(workspaceId: string, job: WorkspaceAppFactoryJob): void;
|
|
126
|
+
protected scheduleInstallRefresh(workspaceId: string, appId: string): void;
|
|
127
|
+
protected markAppStarting(appId: string): void;
|
|
128
|
+
protected markLaunchWaitTimedOut(input: {
|
|
129
|
+
appId: string;
|
|
130
|
+
workspaceId: string;
|
|
131
|
+
}): void;
|
|
132
|
+
protected resolveLaunchableApp(input: {
|
|
133
|
+
appId: string;
|
|
134
|
+
workspaceId: string;
|
|
135
|
+
}): WorkspaceAppCenterApp | null;
|
|
136
|
+
protected markAppInstalling(appId: string, options?: {
|
|
137
|
+
preserveInstalled?: boolean;
|
|
138
|
+
}): void;
|
|
139
|
+
protected markEnabledAppsStarting(): void;
|
|
140
|
+
protected isPendingInstallSettled(installKey: string, app: WorkspaceAppCenterApp): boolean;
|
|
141
|
+
private mergeSnapshotAppsByStateRevision;
|
|
142
|
+
private scheduleCatalogLoadingRefresh;
|
|
143
|
+
private withPendingInstallState;
|
|
144
|
+
private refreshInstallState;
|
|
145
|
+
private settlePendingInstallReport;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
declare function createWorkspaceAppCenterController(dependencies: WorkspaceAppCenterControllerDependencies): WorkspaceAppCenterController;
|
|
149
|
+
declare class WorkspaceAppCenterController extends WorkspaceAppCenterControllerState {
|
|
150
|
+
installApp(input: {
|
|
151
|
+
appId: string;
|
|
152
|
+
workspaceId: string;
|
|
153
|
+
}): Promise<void>;
|
|
154
|
+
prepareAppLaunch(input: {
|
|
155
|
+
appId: string;
|
|
156
|
+
workspaceId: string;
|
|
157
|
+
}): Promise<WorkspaceAppCenterApp | null>;
|
|
158
|
+
createFactoryJob(input: {
|
|
159
|
+
displayName: string;
|
|
160
|
+
model?: string;
|
|
161
|
+
permissionModeId?: string;
|
|
162
|
+
provider?: string;
|
|
163
|
+
prompt: string;
|
|
164
|
+
reasoningEffort?: string;
|
|
165
|
+
workspaceId: string;
|
|
166
|
+
}): Promise<void>;
|
|
167
|
+
cancelFactoryJob(input: {
|
|
168
|
+
jobId: string;
|
|
169
|
+
workspaceId: string;
|
|
170
|
+
}): Promise<void>;
|
|
171
|
+
deleteFactoryJob(input: {
|
|
172
|
+
jobId: string;
|
|
173
|
+
workspaceId: string;
|
|
174
|
+
}): Promise<void>;
|
|
175
|
+
deleteApp(input: {
|
|
176
|
+
appId: string;
|
|
177
|
+
workspaceId: string;
|
|
178
|
+
}): Promise<void>;
|
|
179
|
+
retryFactoryValidation(input: {
|
|
180
|
+
jobId: string;
|
|
181
|
+
workspaceId: string;
|
|
182
|
+
}): Promise<void>;
|
|
183
|
+
fixFactoryJob(input: {
|
|
184
|
+
jobId: string;
|
|
185
|
+
prompt: string;
|
|
186
|
+
workspaceId: string;
|
|
187
|
+
}): Promise<void>;
|
|
188
|
+
prepareFactoryJobModification(input: {
|
|
189
|
+
jobId: string;
|
|
190
|
+
workspaceId: string;
|
|
191
|
+
}): Promise<WorkspaceAppFactoryJob | null>;
|
|
192
|
+
publishFactoryJob(input: {
|
|
193
|
+
jobId: string;
|
|
194
|
+
workspaceId: string;
|
|
195
|
+
}): Promise<WorkspaceAppFactoryJob | null>;
|
|
196
|
+
refresh(workspaceId: string): Promise<void>;
|
|
197
|
+
refreshCatalog(workspaceId: string): Promise<void>;
|
|
198
|
+
startEnabledApps(workspaceId: string): Promise<void>;
|
|
199
|
+
uninstallApp(input: {
|
|
200
|
+
appId: string;
|
|
201
|
+
workspaceId: string;
|
|
202
|
+
}): Promise<void>;
|
|
203
|
+
updateApp(input: {
|
|
204
|
+
appId: string;
|
|
205
|
+
trigger: "badge_button" | "primary_action";
|
|
206
|
+
workspaceId: string;
|
|
207
|
+
}): Promise<void>;
|
|
208
|
+
retryApp(input: {
|
|
209
|
+
appId: string;
|
|
210
|
+
workspaceId: string;
|
|
211
|
+
}): Promise<void>;
|
|
212
|
+
private waitForLaunchableApp;
|
|
213
|
+
private refreshLaunchWaitState;
|
|
214
|
+
private shouldAbortLaunchWait;
|
|
215
|
+
}
|
|
3
216
|
|
|
4
217
|
declare function sortMyAppsByCreatedDesc(apps: readonly AppCenterViewModel["apps"][number][]): AppCenterViewModel["apps"];
|
|
5
218
|
declare function sortRecommendedApps(apps: readonly AppCenterViewModel["apps"][number][]): AppCenterViewModel["apps"];
|
|
@@ -13,4 +226,4 @@ declare const DEFAULT_APP_FACTORY_PROVIDER = "codex";
|
|
|
13
226
|
declare function resolveDefaultAppFactoryProvider(options: readonly AppFactoryProviderDefaultOption[], preferredProvider?: string | null): string;
|
|
14
227
|
declare function resolveSelectedAppFactoryProvider(currentProvider: string, options: readonly AppFactoryProviderDefaultOption[], preferredProvider?: string | null): string;
|
|
15
228
|
|
|
16
|
-
export { type AppFactoryProviderDefaultOption, DEFAULT_APP_FACTORY_PROVIDER, resolveDefaultAppFactoryProvider, resolveSelectedAppFactoryProvider, sortMyAppsByCreatedDesc, sortRecommendedApps, sortRecommendedAppsForAllTab };
|
|
229
|
+
export { type AppFactoryProviderDefaultOption, DEFAULT_APP_FACTORY_PROVIDER, WorkspaceAppCenterController, type WorkspaceAppCenterControllerDependencies, type WorkspaceAppCenterControllerHooks, type WorkspaceAppCenterOperation, type WorkspaceAppCenterOperationDetails, type WorkspaceAppCenterRefreshDiscard, type WorkspaceAppCenterUiAction, createWorkspaceAppCenterController, createWorkspaceAppCenterStoreState, resolveDefaultAppFactoryProvider, resolveSelectedAppFactoryProvider, sortMyAppsByCreatedDesc, sortRecommendedApps, sortRecommendedAppsForAllTab };
|
package/dist/core/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
+
WorkspaceAppCenterController,
|
|
2
3
|
createAppCenterViewModel,
|
|
4
|
+
createWorkspaceAppCenterController,
|
|
5
|
+
createWorkspaceAppCenterStoreState,
|
|
3
6
|
createWorkspaceAppIdentity,
|
|
4
7
|
createWorkspaceAppRecord,
|
|
5
8
|
isWorkspaceAppId,
|
|
@@ -10,8 +13,8 @@ import {
|
|
|
10
13
|
resolveWorkspaceAppStatusPresentation,
|
|
11
14
|
validateWorkspaceAppManifest,
|
|
12
15
|
workspaceAppIdPattern
|
|
13
|
-
} from "../chunk-
|
|
14
|
-
import "../chunk-
|
|
16
|
+
} from "../chunk-5SANC3S6.js";
|
|
17
|
+
import "../chunk-UBERYRMA.js";
|
|
15
18
|
import {
|
|
16
19
|
DEFAULT_APP_FACTORY_PROVIDER,
|
|
17
20
|
resolveDefaultAppFactoryProvider,
|
|
@@ -22,7 +25,10 @@ import {
|
|
|
22
25
|
} from "../chunk-LBSZLLZK.js";
|
|
23
26
|
export {
|
|
24
27
|
DEFAULT_APP_FACTORY_PROVIDER,
|
|
28
|
+
WorkspaceAppCenterController,
|
|
25
29
|
createAppCenterViewModel,
|
|
30
|
+
createWorkspaceAppCenterController,
|
|
31
|
+
createWorkspaceAppCenterStoreState,
|
|
26
32
|
createWorkspaceAppIdentity,
|
|
27
33
|
createWorkspaceAppRecord,
|
|
28
34
|
isWorkspaceAppId,
|
package/dist/i18n/index.js
CHANGED
|
@@ -276,7 +276,8 @@ var appCenterEn = {
|
|
|
276
276
|
preparing: "Preparing",
|
|
277
277
|
running: "Running",
|
|
278
278
|
starting: "Starting",
|
|
279
|
-
stopping: "Stopping"
|
|
279
|
+
stopping: "Stopping",
|
|
280
|
+
unavailable: "Unavailable"
|
|
280
281
|
},
|
|
281
282
|
title: "Applications"
|
|
282
283
|
};
|
|
@@ -542,7 +543,8 @@ var appCenterZhCN = {
|
|
|
542
543
|
preparing: "\u51C6\u5907\u4E2D",
|
|
543
544
|
running: "\u8FD0\u884C\u4E2D",
|
|
544
545
|
starting: "\u542F\u52A8\u4E2D",
|
|
545
|
-
stopping: "\u505C\u6B62\u4E2D"
|
|
546
|
+
stopping: "\u505C\u6B62\u4E2D",
|
|
547
|
+
unavailable: "\u4E0D\u53EF\u7528"
|
|
546
548
|
},
|
|
547
549
|
title: "\u5E94\u7528"
|
|
548
550
|
};
|