@tutti-os/workspace-app-center 0.0.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/LICENSE +202 -0
- package/README.md +5 -0
- package/dist/chunk-3Z2WIHMP.js +7 -0
- package/dist/chunk-3Z2WIHMP.js.map +1 -0
- package/dist/chunk-FENSLRNH.js +690 -0
- package/dist/chunk-FENSLRNH.js.map +1 -0
- package/dist/chunk-LBSZLLZK.js +94 -0
- package/dist/chunk-LBSZLLZK.js.map +1 -0
- package/dist/chunk-VLUZD2IT.js +15 -0
- package/dist/chunk-VLUZD2IT.js.map +1 -0
- package/dist/contracts/index.d.ts +158 -0
- package/dist/contracts/index.js +11 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/core/index.d.ts +16 -0
- package/dist/core/index.js +42 -0
- package/dist/core/index.js.map +1 -0
- package/dist/i18n/index.d.ts +18 -0
- package/dist/i18n/index.js +574 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/index-Bert0Egy.d.ts +71 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/ui/index.d.ts +88 -0
- package/dist/ui/index.js +1619 -0
- package/dist/ui/index.js.map +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { WorkspaceAppManifest, WorkspaceAppStatusTone, WorkspaceAppRuntimeStatus, WorkspaceAppRuntimeState, WorkspaceAppRecord, WorkspaceAppFactoryJobStatus, AppCenterViewModel, WorkspaceAppCatalogEntry, WorkspaceAppInstallRecord } from './contracts/index.js';
|
|
2
|
+
|
|
3
|
+
declare const workspaceAppIdPattern: RegExp;
|
|
4
|
+
declare function isWorkspaceAppId(value: string): boolean;
|
|
5
|
+
declare function normalizeWorkspaceAppId(value: string): string;
|
|
6
|
+
declare function createWorkspaceAppIdentity(input: {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
}): string;
|
|
9
|
+
|
|
10
|
+
type WorkspaceAppManifestValidationIssueCode = "manifest.notObject" | "manifest.schemaVersion" | "manifest.appId" | "manifest.name" | "manifest.version" | "manifest.description" | "manifest.icon" | "manifest.runtime" | "manifest.window" | "manifest.author" | "manifest.tags" | "manifest.localizationInfo";
|
|
11
|
+
interface WorkspaceAppManifestValidationIssue {
|
|
12
|
+
readonly code: WorkspaceAppManifestValidationIssueCode;
|
|
13
|
+
readonly path: string;
|
|
14
|
+
readonly message: string;
|
|
15
|
+
}
|
|
16
|
+
interface WorkspaceAppManifestValidationResult {
|
|
17
|
+
readonly manifest?: WorkspaceAppManifest;
|
|
18
|
+
readonly issues: readonly WorkspaceAppManifestValidationIssue[];
|
|
19
|
+
readonly valid: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare function validateWorkspaceAppManifest(value: unknown): WorkspaceAppManifestValidationResult;
|
|
22
|
+
|
|
23
|
+
interface WorkspaceAppStatusPresentation {
|
|
24
|
+
readonly labelKey: string;
|
|
25
|
+
readonly pulse: boolean;
|
|
26
|
+
readonly tone: WorkspaceAppStatusTone;
|
|
27
|
+
}
|
|
28
|
+
declare function mapWorkspaceAppRuntimeStatus(value: unknown): WorkspaceAppRuntimeStatus;
|
|
29
|
+
declare function normalizeWorkspaceAppRuntimeState(state: Omit<WorkspaceAppRuntimeState, "status"> & {
|
|
30
|
+
readonly status?: unknown;
|
|
31
|
+
}): WorkspaceAppRuntimeState;
|
|
32
|
+
declare function resolveWorkspaceAppStatusPresentation(status: WorkspaceAppRuntimeStatus): WorkspaceAppStatusPresentation;
|
|
33
|
+
|
|
34
|
+
interface CreateAppCenterViewModelInput {
|
|
35
|
+
readonly apps: readonly WorkspaceAppRecord[];
|
|
36
|
+
readonly factoryJobs?: readonly WorkspaceAppFactoryJobInput[];
|
|
37
|
+
readonly locale?: string | null;
|
|
38
|
+
readonly replaceableIconAppIds?: readonly string[];
|
|
39
|
+
readonly runtimeStates?: readonly WorkspaceAppRuntimeState[];
|
|
40
|
+
}
|
|
41
|
+
interface WorkspaceAppFactoryJobInput {
|
|
42
|
+
readonly agentSessionId?: string | null;
|
|
43
|
+
readonly appId?: string | null;
|
|
44
|
+
readonly displayName: string;
|
|
45
|
+
readonly failureReason?: string | null;
|
|
46
|
+
readonly jobId: string;
|
|
47
|
+
readonly prompt: string;
|
|
48
|
+
readonly provider?: string | null;
|
|
49
|
+
readonly publishedVersion?: string | null;
|
|
50
|
+
readonly status: WorkspaceAppFactoryJobStatus;
|
|
51
|
+
readonly updatedAtUnixMs: number;
|
|
52
|
+
readonly validationResult?: Record<string, unknown> | null;
|
|
53
|
+
}
|
|
54
|
+
declare function createAppCenterViewModel({ apps, factoryJobs, locale, replaceableIconAppIds, runtimeStates }: CreateAppCenterViewModelInput): AppCenterViewModel;
|
|
55
|
+
declare function resolveWorkspaceAppCatalogMetadata(input: {
|
|
56
|
+
readonly catalog?: Pick<WorkspaceAppCatalogEntry, "localizations"> | null;
|
|
57
|
+
readonly locale?: string | null;
|
|
58
|
+
readonly manifest: Pick<WorkspaceAppRecord["manifest"], "description" | "name" | "tags">;
|
|
59
|
+
}): {
|
|
60
|
+
readonly description: string;
|
|
61
|
+
readonly name: string;
|
|
62
|
+
readonly tags: readonly string[];
|
|
63
|
+
};
|
|
64
|
+
declare function createWorkspaceAppRecord(input: {
|
|
65
|
+
readonly catalog?: WorkspaceAppCatalogEntry | null;
|
|
66
|
+
readonly category?: string | null;
|
|
67
|
+
readonly createdAtUnixMs?: number | null;
|
|
68
|
+
readonly install?: WorkspaceAppInstallRecord | null;
|
|
69
|
+
}): WorkspaceAppRecord;
|
|
70
|
+
|
|
71
|
+
export { type CreateAppCenterViewModelInput as C, type WorkspaceAppFactoryJobInput as W, type WorkspaceAppManifestValidationIssue as a, type WorkspaceAppManifestValidationIssueCode as b, type WorkspaceAppManifestValidationResult as c, type WorkspaceAppStatusPresentation as d, createAppCenterViewModel as e, createWorkspaceAppIdentity as f, createWorkspaceAppRecord as g, normalizeWorkspaceAppRuntimeState as h, isWorkspaceAppId as i, resolveWorkspaceAppStatusPresentation as j, mapWorkspaceAppRuntimeStatus as m, normalizeWorkspaceAppId as n, resolveWorkspaceAppCatalogMetadata as r, validateWorkspaceAppManifest as v, workspaceAppIdPattern as w };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { AppCenterViewModel, WorkspaceAppCardViewModel, WorkspaceAppCatalogEntry, WorkspaceAppCatalogLocalization, WorkspaceAppCatalogSource, WorkspaceAppCatalogSourceKind, WorkspaceAppFactoryJobStatus, WorkspaceAppFactoryJobViewModel, WorkspaceAppInstallRecord, WorkspaceAppManifest, WorkspaceAppManifestAuthor, WorkspaceAppManifestIcon, WorkspaceAppManifestLocalizationFile, WorkspaceAppManifestLocalizationInfo, WorkspaceAppManifestRuntime, WorkspaceAppManifestSchemaVersion, WorkspaceAppManifestWindow, WorkspaceAppManifestWindowMinimizeBehavior, WorkspaceAppPrimaryAction, WorkspaceAppRecord, WorkspaceAppRuntimeError, WorkspaceAppRuntimeState, WorkspaceAppRuntimeStatus, WorkspaceAppStatusTone, workspaceAppManifestSchemaVersion, workspaceAppRuntimeStatuses } 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, j as resolveWorkspaceAppStatusPresentation, v as validateWorkspaceAppManifest, w as workspaceAppIdPattern } from './index-Bert0Egy.js';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
workspaceAppRuntimeStatuses
|
|
3
|
+
} from "./chunk-VLUZD2IT.js";
|
|
4
|
+
import {
|
|
5
|
+
createAppCenterViewModel,
|
|
6
|
+
createWorkspaceAppIdentity,
|
|
7
|
+
createWorkspaceAppRecord,
|
|
8
|
+
isWorkspaceAppId,
|
|
9
|
+
mapWorkspaceAppRuntimeStatus,
|
|
10
|
+
normalizeWorkspaceAppId,
|
|
11
|
+
normalizeWorkspaceAppRuntimeState,
|
|
12
|
+
resolveWorkspaceAppStatusPresentation,
|
|
13
|
+
validateWorkspaceAppManifest,
|
|
14
|
+
workspaceAppIdPattern
|
|
15
|
+
} from "./chunk-FENSLRNH.js";
|
|
16
|
+
import {
|
|
17
|
+
workspaceAppManifestSchemaVersion
|
|
18
|
+
} from "./chunk-3Z2WIHMP.js";
|
|
19
|
+
import "./chunk-LBSZLLZK.js";
|
|
20
|
+
export {
|
|
21
|
+
createAppCenterViewModel,
|
|
22
|
+
createWorkspaceAppIdentity,
|
|
23
|
+
createWorkspaceAppRecord,
|
|
24
|
+
isWorkspaceAppId,
|
|
25
|
+
mapWorkspaceAppRuntimeStatus,
|
|
26
|
+
normalizeWorkspaceAppId,
|
|
27
|
+
normalizeWorkspaceAppRuntimeState,
|
|
28
|
+
resolveWorkspaceAppStatusPresentation,
|
|
29
|
+
validateWorkspaceAppManifest,
|
|
30
|
+
workspaceAppIdPattern,
|
|
31
|
+
workspaceAppManifestSchemaVersion,
|
|
32
|
+
workspaceAppRuntimeStatuses
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { WorkspaceAppCardViewModel, AppCenterViewModel } from '../contracts/index.js';
|
|
3
|
+
import { AppCenterI18nRuntime } from '../i18n/index.js';
|
|
4
|
+
import '@tutti-os/ui-i18n-runtime';
|
|
5
|
+
|
|
6
|
+
interface AppCenterFactoryProviderOption {
|
|
7
|
+
readonly disabled?: boolean;
|
|
8
|
+
readonly disabledReason?: string;
|
|
9
|
+
readonly iconUrl?: string | null;
|
|
10
|
+
readonly label: string;
|
|
11
|
+
readonly provider: string;
|
|
12
|
+
}
|
|
13
|
+
interface AppCenterFactoryModelOption {
|
|
14
|
+
readonly label: string;
|
|
15
|
+
readonly value: string;
|
|
16
|
+
}
|
|
17
|
+
interface AppCenterFactoryReasoningOption {
|
|
18
|
+
readonly label: string;
|
|
19
|
+
readonly value: string;
|
|
20
|
+
}
|
|
21
|
+
interface AppCenterFactoryPermissionOption {
|
|
22
|
+
readonly label: string;
|
|
23
|
+
readonly semantic?: string | null;
|
|
24
|
+
readonly value: string;
|
|
25
|
+
}
|
|
26
|
+
interface AppCenterFactoryProviderConfiguration {
|
|
27
|
+
readonly defaultModel?: string | null;
|
|
28
|
+
readonly defaultPermissionModeId?: string | null;
|
|
29
|
+
readonly defaultReasoningEffort?: string | null;
|
|
30
|
+
readonly modelOptions: readonly AppCenterFactoryModelOption[];
|
|
31
|
+
readonly permissionModeOptions: readonly AppCenterFactoryPermissionOption[];
|
|
32
|
+
readonly reasoningEffortOptions: readonly AppCenterFactoryReasoningOption[];
|
|
33
|
+
}
|
|
34
|
+
interface AppCenterHostActions {
|
|
35
|
+
readonly cancelFactoryJob?: (jobId: string) => Promise<void> | void;
|
|
36
|
+
readonly createFactoryJob?: (input: {
|
|
37
|
+
displayName: string;
|
|
38
|
+
model?: string;
|
|
39
|
+
permissionModeId?: string;
|
|
40
|
+
provider?: string;
|
|
41
|
+
prompt: string;
|
|
42
|
+
reasoningEffort?: string;
|
|
43
|
+
}) => Promise<void> | void;
|
|
44
|
+
readonly deleteApp?: (appId: string, appName: string) => Promise<void> | void;
|
|
45
|
+
readonly deleteFactoryJob?: (jobId: string) => Promise<void> | void;
|
|
46
|
+
readonly exportApp?: (appId: string) => Promise<void> | void;
|
|
47
|
+
readonly fixFactoryJob?: (jobId: string, prompt: string) => Promise<void> | void;
|
|
48
|
+
readonly importApp?: () => Promise<void> | void;
|
|
49
|
+
readonly installApp?: (appId: string) => Promise<void> | void;
|
|
50
|
+
readonly openApp?: (appId: string) => Promise<void> | void;
|
|
51
|
+
readonly openAppFolder?: (appId: string) => Promise<void> | void;
|
|
52
|
+
readonly openAppPackageFolder?: (appId: string) => Promise<void> | void;
|
|
53
|
+
readonly openFactoryJobAgentSession?: (agentSessionId: string, provider?: string | null) => Promise<void> | void;
|
|
54
|
+
readonly modifyAppWithAgent?: (jobId: string, agentSessionId: string, provider?: string | null) => Promise<void> | void;
|
|
55
|
+
readonly publishFactoryJob?: (jobId: string) => Promise<void> | void;
|
|
56
|
+
readonly replaceAppIcon?: (appId: string) => Promise<void> | void;
|
|
57
|
+
readonly retryFactoryValidation?: (jobId: string) => Promise<void> | void;
|
|
58
|
+
readonly retryApp?: (appId: string) => Promise<void> | void;
|
|
59
|
+
readonly updateApp?: (appId: string, trigger: "badge_button" | "primary_action") => Promise<void> | void;
|
|
60
|
+
readonly uninstallApp?: (appId: string) => Promise<void> | void;
|
|
61
|
+
}
|
|
62
|
+
interface AppCardProps {
|
|
63
|
+
readonly actions: AppCenterHostActions;
|
|
64
|
+
readonly app: WorkspaceAppCardViewModel;
|
|
65
|
+
readonly className?: string;
|
|
66
|
+
readonly copy: AppCenterI18nRuntime;
|
|
67
|
+
}
|
|
68
|
+
declare function AppCard({ actions, app, className, copy }: AppCardProps): ReactElement;
|
|
69
|
+
|
|
70
|
+
type AppCenterAppTab = "recommended" | "my";
|
|
71
|
+
interface AppCenterPanelProps {
|
|
72
|
+
readonly actions: AppCenterHostActions;
|
|
73
|
+
readonly activeAppTab?: AppCenterAppTab;
|
|
74
|
+
readonly catalogStatus?: "failed" | "loading";
|
|
75
|
+
readonly className?: string;
|
|
76
|
+
readonly copy: AppCenterI18nRuntime;
|
|
77
|
+
readonly defaultAgentProvider?: string | null;
|
|
78
|
+
readonly errorMessage?: string;
|
|
79
|
+
readonly loadProviderConfiguration?: (provider: string) => Promise<AppCenterFactoryProviderConfiguration>;
|
|
80
|
+
readonly onActiveAppTabChange?: (tab: AppCenterAppTab) => void;
|
|
81
|
+
readonly providerErrorMessage?: string | null;
|
|
82
|
+
readonly providerLoading?: boolean;
|
|
83
|
+
readonly providerOptions?: readonly AppCenterFactoryProviderOption[];
|
|
84
|
+
readonly viewModel: AppCenterViewModel;
|
|
85
|
+
}
|
|
86
|
+
declare function AppCenterPanel({ actions, activeAppTab: controlledActiveAppTab, catalogStatus, className, copy, defaultAgentProvider, errorMessage, loadProviderConfiguration, onActiveAppTabChange, providerErrorMessage, providerLoading, providerOptions, viewModel }: AppCenterPanelProps): ReactElement;
|
|
87
|
+
|
|
88
|
+
export { AppCard, type AppCardProps, type AppCenterHostActions, AppCenterPanel, type AppCenterPanelProps };
|