@tutti-os/workspace-app-center 0.0.9 → 0.0.10
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-INI5PAWK.js +1742 -0
- package/dist/chunk-INI5PAWK.js.map +1 -0
- package/dist/contracts/index.d.ts +147 -155
- package/dist/core/index.d.ts +216 -3
- package/dist/core/index.js +7 -1
- package/dist/{index-Bert0Egy.d.ts → index-DtpWU9o1.d.ts} +2 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/dist/ui/index.d.ts +2 -2
- package/dist/viewModel-D0XZxZmO.d.ts +158 -0
- package/package.json +3 -3
- package/dist/chunk-XDDBJJGP.js +0 -691
- package/dist/chunk-XDDBJJGP.js.map +0 -1
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-DtpWU9o1.js';
|
|
3
|
+
import { A as AppCenterViewModel } from '../viewModel-D0XZxZmO.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.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" | "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,7 +13,7 @@ import {
|
|
|
10
13
|
resolveWorkspaceAppStatusPresentation,
|
|
11
14
|
validateWorkspaceAppManifest,
|
|
12
15
|
workspaceAppIdPattern
|
|
13
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-INI5PAWK.js";
|
|
14
17
|
import "../chunk-QSAEUGFC.js";
|
|
15
18
|
import {
|
|
16
19
|
DEFAULT_APP_FACTORY_PROVIDER,
|
|
@@ -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,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import './contracts/index.js';
|
|
2
|
+
import { h as WorkspaceAppManifest, v as WorkspaceAppStatusTone, u as WorkspaceAppRuntimeStatus, t as WorkspaceAppRuntimeState, r as WorkspaceAppRecord, e as WorkspaceAppFactoryJobStatus, A as AppCenterViewModel, a as WorkspaceAppCatalogEntry, g as WorkspaceAppInstallRecord } from './viewModel-D0XZxZmO.js';
|
|
2
3
|
|
|
3
4
|
declare const workspaceAppIdPattern: RegExp;
|
|
4
5
|
declare function isWorkspaceAppId(value: string): boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { WorkspaceAppCenterApp, WorkspaceAppCenterAppTab, WorkspaceAppCenterCatalogStatus, WorkspaceAppCenterCliIssue, WorkspaceAppCenterCliState, WorkspaceAppCenterCliStatus, WorkspaceAppCenterGateway, WorkspaceAppCenterLoadStatus, WorkspaceAppCenterLocalization, WorkspaceAppCenterReadableStoreState, WorkspaceAppCenterRuntimeStatus, WorkspaceAppCenterSnapshot, WorkspaceAppCenterSource, WorkspaceAppCenterStoreState, WorkspaceAppCenterViewState, WorkspaceAppFactoryJob, WorkspaceAppFactoryModelOption, WorkspaceAppFactoryPermissionOption, WorkspaceAppFactoryProviderConfiguration, WorkspaceAppFactoryReasoningOption, WorkspaceAppFactorySnapshot, WorkspaceAppMinimizeBehavior } from './contracts/index.js';
|
|
2
|
+
export { A as AppCenterViewModel, W as WorkspaceAppCardViewModel, a as WorkspaceAppCatalogEntry, b as WorkspaceAppCatalogLocalization, c as WorkspaceAppCatalogSource, d as WorkspaceAppCatalogSourceKind, e as WorkspaceAppFactoryJobStatus, f as WorkspaceAppFactoryJobViewModel, g as WorkspaceAppInstallRecord, h as WorkspaceAppManifest, i as WorkspaceAppManifestAuthor, j as WorkspaceAppManifestIcon, k as WorkspaceAppManifestLocalizationFile, l as WorkspaceAppManifestLocalizationInfo, m as WorkspaceAppManifestRuntime, n as WorkspaceAppManifestSchemaVersion, o as WorkspaceAppManifestWindow, p as WorkspaceAppManifestWindowMinimizeBehavior, q as WorkspaceAppPrimaryAction, r as WorkspaceAppRecord, s as WorkspaceAppRuntimeError, t as WorkspaceAppRuntimeState, u as WorkspaceAppRuntimeStatus, v as WorkspaceAppStatusTone, w as workspaceAppManifestSchemaVersion, x as workspaceAppRuntimeStatuses } from './viewModel-D0XZxZmO.js';
|
|
3
|
+
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, j as resolveWorkspaceAppStatusPresentation, v as validateWorkspaceAppManifest, w as workspaceAppIdPattern } from './index-DtpWU9o1.js';
|
package/dist/index.js
CHANGED
package/dist/ui/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { WorkspaceAppCardViewModel, AppCenterViewModel } from '../
|
|
2
|
+
import { W as WorkspaceAppCardViewModel, A as AppCenterViewModel } from '../viewModel-D0XZxZmO.js';
|
|
3
3
|
import { AppCenterI18nRuntime } from '../i18n/index.js';
|
|
4
4
|
import '@tutti-os/ui-i18n-runtime';
|
|
5
5
|
|
|
@@ -86,4 +86,4 @@ interface AppCenterPanelProps {
|
|
|
86
86
|
}
|
|
87
87
|
declare function AppCenterPanel({ actions, activeAppTab: controlledActiveAppTab, catalogStatus, className, copy, defaultAgentProvider, errorMessage, loadProviderConfiguration, onActiveAppTabChange, providerErrorMessage, providerLoading, providerOptions, viewModel }: AppCenterPanelProps): ReactElement;
|
|
88
88
|
|
|
89
|
-
export { AppCard, type AppCardProps, type AppCenterHostActions, AppCenterPanel, type AppCenterPanelProps };
|
|
89
|
+
export { AppCard, type AppCardProps, type AppCenterAppTab, type AppCenterFactoryProviderConfiguration, type AppCenterFactoryProviderOption, type AppCenterHostActions, AppCenterPanel, type AppCenterPanelProps };
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
declare const workspaceAppRuntimeStatuses: readonly ["idle", "installing", "preparing", "starting", "running", "failed", "stopping"];
|
|
2
|
+
type WorkspaceAppRuntimeStatus = (typeof workspaceAppRuntimeStatuses)[number];
|
|
3
|
+
interface WorkspaceAppRuntimeError {
|
|
4
|
+
readonly code?: string;
|
|
5
|
+
readonly message: string;
|
|
6
|
+
}
|
|
7
|
+
interface WorkspaceAppRuntimeState {
|
|
8
|
+
readonly appId: string;
|
|
9
|
+
readonly status: WorkspaceAppRuntimeStatus;
|
|
10
|
+
readonly error?: WorkspaceAppRuntimeError | null;
|
|
11
|
+
readonly startedAt?: string | null;
|
|
12
|
+
readonly updatedAt?: string | null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare const workspaceAppManifestSchemaVersion = "tutti.app.manifest.v1";
|
|
16
|
+
type WorkspaceAppManifestSchemaVersion = typeof workspaceAppManifestSchemaVersion;
|
|
17
|
+
interface WorkspaceAppManifestIcon {
|
|
18
|
+
readonly type: "asset";
|
|
19
|
+
readonly src: string;
|
|
20
|
+
}
|
|
21
|
+
interface WorkspaceAppManifestRuntime {
|
|
22
|
+
readonly bootstrap: string;
|
|
23
|
+
readonly healthcheckPath: string;
|
|
24
|
+
}
|
|
25
|
+
type WorkspaceAppManifestWindowMinimizeBehavior = "hibernate" | "keep-mounted";
|
|
26
|
+
interface WorkspaceAppManifestWindow {
|
|
27
|
+
readonly minimizeBehavior?: WorkspaceAppManifestWindowMinimizeBehavior;
|
|
28
|
+
readonly minHeight?: number;
|
|
29
|
+
readonly minWidth?: number;
|
|
30
|
+
}
|
|
31
|
+
interface WorkspaceAppManifestAuthor {
|
|
32
|
+
readonly name: string;
|
|
33
|
+
readonly url?: string;
|
|
34
|
+
}
|
|
35
|
+
interface WorkspaceAppManifestLocalizationInfo {
|
|
36
|
+
readonly defaultLocale: string;
|
|
37
|
+
readonly additionalLocales?: readonly WorkspaceAppManifestLocalizationFile[];
|
|
38
|
+
}
|
|
39
|
+
interface WorkspaceAppManifestLocalizationFile {
|
|
40
|
+
readonly locale: string;
|
|
41
|
+
readonly file: string;
|
|
42
|
+
}
|
|
43
|
+
interface WorkspaceAppManifest {
|
|
44
|
+
readonly schemaVersion: WorkspaceAppManifestSchemaVersion;
|
|
45
|
+
readonly appId: string;
|
|
46
|
+
readonly name: string;
|
|
47
|
+
readonly version: string;
|
|
48
|
+
readonly description: string;
|
|
49
|
+
readonly icon?: WorkspaceAppManifestIcon;
|
|
50
|
+
readonly runtime: WorkspaceAppManifestRuntime;
|
|
51
|
+
readonly window?: WorkspaceAppManifestWindow;
|
|
52
|
+
readonly author?: WorkspaceAppManifestAuthor;
|
|
53
|
+
readonly tags?: readonly string[];
|
|
54
|
+
readonly localizationInfo?: WorkspaceAppManifestLocalizationInfo;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
type WorkspaceAppCatalogSourceKind = "bundled" | "local" | "remote";
|
|
58
|
+
interface WorkspaceAppCatalogSource {
|
|
59
|
+
readonly id?: string;
|
|
60
|
+
readonly kind: WorkspaceAppCatalogSourceKind;
|
|
61
|
+
readonly label?: string;
|
|
62
|
+
}
|
|
63
|
+
interface WorkspaceAppCatalogLocalization {
|
|
64
|
+
readonly locale: string;
|
|
65
|
+
readonly name?: string | null;
|
|
66
|
+
readonly description?: string | null;
|
|
67
|
+
readonly tags?: readonly string[];
|
|
68
|
+
}
|
|
69
|
+
interface WorkspaceAppCatalogEntry {
|
|
70
|
+
readonly localizations?: readonly WorkspaceAppCatalogLocalization[];
|
|
71
|
+
readonly manifest: WorkspaceAppManifest;
|
|
72
|
+
readonly source?: WorkspaceAppCatalogSource;
|
|
73
|
+
}
|
|
74
|
+
interface WorkspaceAppInstallRecord {
|
|
75
|
+
readonly appId: string;
|
|
76
|
+
readonly installedAt?: string | null;
|
|
77
|
+
readonly updatedAt?: string | null;
|
|
78
|
+
readonly catalogSourceId?: string | null;
|
|
79
|
+
}
|
|
80
|
+
interface WorkspaceAppRecord {
|
|
81
|
+
readonly availableIconUrl?: string | null;
|
|
82
|
+
readonly availableVersion?: string | null;
|
|
83
|
+
readonly catalog?: WorkspaceAppCatalogEntry | null;
|
|
84
|
+
readonly category?: string | null;
|
|
85
|
+
readonly createdAtUnixMs?: number | null;
|
|
86
|
+
readonly install?: WorkspaceAppInstallRecord | null;
|
|
87
|
+
readonly manifest: WorkspaceAppManifest;
|
|
88
|
+
readonly updateAvailable?: boolean;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
type WorkspaceAppStatusTone = "neutral" | "blue" | "green" | "amber" | "red";
|
|
92
|
+
type WorkspaceAppPrimaryAction = "install" | "open" | "retry" | "update" | "none";
|
|
93
|
+
interface WorkspaceAppCardViewModel {
|
|
94
|
+
readonly id: string;
|
|
95
|
+
readonly name: string;
|
|
96
|
+
readonly createdAtUnixMs: number | null;
|
|
97
|
+
readonly description?: string;
|
|
98
|
+
readonly version?: string;
|
|
99
|
+
readonly availableVersion?: string;
|
|
100
|
+
readonly category?: string | null;
|
|
101
|
+
readonly updateAvailable: boolean;
|
|
102
|
+
readonly icon?: {
|
|
103
|
+
readonly type: "asset";
|
|
104
|
+
readonly src: string;
|
|
105
|
+
};
|
|
106
|
+
readonly tags: readonly string[];
|
|
107
|
+
readonly installed: boolean;
|
|
108
|
+
readonly status: WorkspaceAppRuntimeStatus;
|
|
109
|
+
readonly statusLabelKey: string;
|
|
110
|
+
readonly statusTone: WorkspaceAppStatusTone;
|
|
111
|
+
readonly statusPulse: boolean;
|
|
112
|
+
readonly primaryAction: WorkspaceAppPrimaryAction;
|
|
113
|
+
readonly sourceKind: WorkspaceAppCatalogSourceKind;
|
|
114
|
+
readonly canOpen: boolean;
|
|
115
|
+
readonly canOpenFolder: boolean;
|
|
116
|
+
readonly canOpenPackageFolder: boolean;
|
|
117
|
+
readonly canExport: boolean;
|
|
118
|
+
readonly canDelete: boolean;
|
|
119
|
+
readonly canReplaceIcon: boolean;
|
|
120
|
+
readonly canOpenFactorySession: boolean;
|
|
121
|
+
readonly canPublishFactoryUpdate: boolean;
|
|
122
|
+
readonly canUninstall: boolean;
|
|
123
|
+
readonly canRetry: boolean;
|
|
124
|
+
readonly canUpdate: boolean;
|
|
125
|
+
readonly errorMessage?: string;
|
|
126
|
+
readonly factoryAgentSessionId?: string | null;
|
|
127
|
+
readonly factoryJobId?: string | null;
|
|
128
|
+
readonly factoryProvider?: string | null;
|
|
129
|
+
}
|
|
130
|
+
interface AppCenterViewModel {
|
|
131
|
+
readonly apps: readonly WorkspaceAppCardViewModel[];
|
|
132
|
+
readonly factoryJobs?: readonly WorkspaceAppFactoryJobViewModel[];
|
|
133
|
+
readonly installedCount: number;
|
|
134
|
+
readonly runningCount: number;
|
|
135
|
+
readonly failedCount: number;
|
|
136
|
+
readonly empty: boolean;
|
|
137
|
+
}
|
|
138
|
+
type WorkspaceAppFactoryJobStatus = "canceled" | "failed" | "generating" | "preparing" | "published" | "queued" | "ready" | "validating";
|
|
139
|
+
interface WorkspaceAppFactoryJobViewModel {
|
|
140
|
+
readonly id: string;
|
|
141
|
+
readonly agentSessionId?: string | null;
|
|
142
|
+
readonly appId?: string | null;
|
|
143
|
+
readonly title: string;
|
|
144
|
+
readonly prompt: string;
|
|
145
|
+
readonly provider?: string | null;
|
|
146
|
+
readonly status: WorkspaceAppFactoryJobStatus;
|
|
147
|
+
readonly statusLabelKey: string;
|
|
148
|
+
readonly canCancel: boolean;
|
|
149
|
+
readonly canDelete: boolean;
|
|
150
|
+
readonly canFix: boolean;
|
|
151
|
+
readonly canOpenAgentSession: boolean;
|
|
152
|
+
readonly canPublish: boolean;
|
|
153
|
+
readonly canRetryValidation: boolean;
|
|
154
|
+
readonly failureReason?: string | null;
|
|
155
|
+
readonly updatedAtUnixMs: number;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export { type AppCenterViewModel as A, type WorkspaceAppCardViewModel as W, type WorkspaceAppCatalogEntry as a, type WorkspaceAppCatalogLocalization as b, type WorkspaceAppCatalogSource as c, type WorkspaceAppCatalogSourceKind as d, type WorkspaceAppFactoryJobStatus as e, type WorkspaceAppFactoryJobViewModel as f, type WorkspaceAppInstallRecord as g, type WorkspaceAppManifest as h, type WorkspaceAppManifestAuthor as i, type WorkspaceAppManifestIcon as j, type WorkspaceAppManifestLocalizationFile as k, type WorkspaceAppManifestLocalizationInfo as l, type WorkspaceAppManifestRuntime as m, type WorkspaceAppManifestSchemaVersion as n, type WorkspaceAppManifestWindow as o, type WorkspaceAppManifestWindowMinimizeBehavior as p, type WorkspaceAppPrimaryAction as q, type WorkspaceAppRecord as r, type WorkspaceAppRuntimeError as s, type WorkspaceAppRuntimeState as t, type WorkspaceAppRuntimeStatus as u, type WorkspaceAppStatusTone as v, workspaceAppManifestSchemaVersion as w, workspaceAppRuntimeStatuses as x };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tutti-os/workspace-app-center",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"directory": "packages/workspace/app-center"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@tutti-os/ui-i18n-runtime": "0.0.
|
|
40
|
-
"@tutti-os/ui-system": "0.0.
|
|
39
|
+
"@tutti-os/ui-i18n-runtime": "0.0.10",
|
|
40
|
+
"@tutti-os/ui-system": "0.0.10"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^24.0.1",
|