@allbluecn/kernel 0.4.0 → 0.5.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/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { B as dumpModules, G as resolvePluginOrder, H as generateAssemblyFiles, U as parseProfileImports, V as generateAssemblyCode } from "./src-D4_fdvW_.js";
2
+ import { G as generateAssemblyFiles, J as resolvePluginOrder, K as parseProfileImports, U as dumpModules, W as generateAssemblyCode } from "./src-Dj40IFvX.js";
3
3
  import { parseArgs } from "node:util";
4
4
  import { pathToFileURL } from "node:url";
5
5
  import { dirname, relative, resolve } from "node:path";
package/dist/index.d.ts CHANGED
@@ -2036,14 +2036,28 @@ declare const DEFAULT_CATEGORIES: CategoryFrequencies;
2036
2036
  declare function normalizeCategoryFrequencies(raw: unknown): CategoryFrequencies;
2037
2037
  declare function isInDndWindow(prefs: Pick<NotificationPreferences, 'dndEnabled' | 'dndStart' | 'dndEnd'>, now: string): boolean;
2038
2038
  //#endregion
2039
+ //#region src/contract/modules/registry.d.ts
2040
+ declare class ModuleRegistry {
2041
+ private modules;
2042
+ register(mod: AllBlueModule): void;
2043
+ getModule(id: string): AllBlueModule | undefined;
2044
+ getAll(): AllBlueModule[];
2045
+ getAICommands(): AICommandDef[];
2046
+ getSearchFields(): {
2047
+ module: string;
2048
+ type: string;
2049
+ fields: string[];
2050
+ }[];
2051
+ }
2052
+ declare const moduleRegistry: ModuleRegistry;
2053
+ //#endregion
2039
2054
  //#region src/contract/types/prototype.d.ts
2040
- declare const DEVICE_SIZES: readonly ['mobile', 'tablet', 'desktop'];
2041
- type DeviceSize = typeof DEVICE_SIZES[number];
2042
- type DeviceType = {
2043
- size: DeviceSize;
2044
- label: string;
2045
- icon: string;
2055
+ declare const DEVICE_SIZES: {
2056
+ readonly desktop: null;
2057
+ readonly tablet: 768;
2058
+ readonly mobile: 375;
2046
2059
  };
2060
+ type DeviceType = keyof typeof DEVICE_SIZES;
2047
2061
  type CanvasElement = {
2048
2062
  id: string;
2049
2063
  type: string;
@@ -2051,33 +2065,99 @@ type CanvasElement = {
2051
2065
  y: number;
2052
2066
  width: number;
2053
2067
  height: number;
2054
- props: Record<string, unknown>;
2068
+ zIndex: number;
2069
+ props?: Record<string, unknown>;
2055
2070
  overrides?: Record<string, unknown>;
2071
+ style: Record<string, unknown>;
2056
2072
  children?: CanvasElement[];
2057
2073
  };
2058
- type ComponentCategory = 'basic' | 'layout' | 'data' | 'feedback' | 'navigation' | 'media' | 'form' | 'other';
2059
- type ComponentSource = 'builtin' | 'custom' | 'imported';
2060
- type EditableFieldType = 'text' | 'number' | 'boolean' | 'select' | 'color' | 'image' | 'json' | 'richtext';
2074
+ type ComponentCategory = 'icons' | 'basic' | 'content' | 'template';
2075
+ type ComponentSource = 'builtin' | 'npm' | 'custom';
2076
+ type EditableFieldType = 'text' | 'textarea' | 'number' | 'select' | 'color';
2061
2077
  type EditablePropField = {
2062
2078
  key: string;
2063
2079
  label: string;
2064
2080
  type: EditableFieldType;
2065
- default?: unknown;
2081
+ placeholder?: string;
2066
2082
  options?: {
2067
2083
  label: string;
2068
- value: unknown;
2084
+ value: string;
2069
2085
  }[];
2070
2086
  };
2087
+ type ResizeMode = 'both' | 'horizontal' | 'vertical' | 'none';
2088
+ type ResizeDirection = 'n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw';
2071
2089
  type PrototypeComponentConfig = {
2072
2090
  type: string;
2091
+ name: string;
2092
+ source: ComponentSource;
2073
2093
  category: ComponentCategory;
2074
- label: string;
2075
- icon: string;
2094
+ defaultWidth: number;
2095
+ defaultHeight: number;
2076
2096
  defaultProps: Record<string, unknown>;
2077
- editableFields: EditablePropField[];
2078
- source: ComponentSource;
2097
+ defaultStyle: Record<string, unknown>;
2098
+ editableProps?: EditablePropField[];
2099
+ commentTemplate?: string;
2100
+ resizeMode?: ResizeMode;
2101
+ resizeHandles?: ResizeDirection[];
2102
+ npmPackage?: string;
2103
+ componentPath?: string;
2104
+ description?: string;
2079
2105
  };
2080
- type ResizeDirection = 'n' | 's' | 'e' | 'w' | 'ne' | 'nw' | 'se' | 'sw';
2081
- type ResizeMode = 'strict' | 'free';
2082
2106
  //#endregion
2083
- export { ADAPTER_KINDS, ADAPTER_KIND_VALUES, type AICommandContext, type AICommandDef, type AICommandHandler, type AICommandResult, type ActivationResult, AdapterKind, type AiAdapter, AiModelMeta, AiProviderMeta, AiProviderRow, type AiQuota, type AllBlueModule, type AnalyticsQuery, type AnalyticsResult, type AnalyticsService, type AssembleInput, type AssemblyFiles, type AuditLogEntry, type AuditQuery, type AuditService, type AutomationRule, type AutomationService, type AvatarConfig, type AvatarPart, type BillingService, BillingUnavailableError, type CLIAgentInfo, type CanvasElement, CategoryFrequencies, type CheckoutParams, type ComplianceJobSummary, type ComplianceService, type ComponentCategory, type ComponentSource, type CustomDashboard, DEFAULT_CATEGORIES, DEFAULT_WATCHED_DEPENDENCIES, DEPENDENCY_CATEGORIES, DEPENDENCY_PRIORITIES, type DEVICE_SIZES, DND_STICKY_THRESHOLD, DependencyCategory, DependencyPriority, DependencySeed, DependencyUsage, type DeveloperLogEntry, type DeviceType, type DocumentTemplate, type DocumentVersion, type EditableFieldType, type EditablePropField, type EntityDef, type EntityUpdateEvent, FEATURE_KEYS, type FeatureContribution, type FeatureKey, type FeatureMeta, FeatureRegistry, type GlobalSearchService, type HostSession, type HostedAiChatParams, type HostedAiChatResult, HostedAiError, type HostedAiModel, type HostedAiService, type InvoiceInfo, LOAD_MORE_STEP, LOBE_ICON_MAP, type LicenseInfo, type LicenseIssueParams, type LicenseIssueResult, type LicenseService, type LicenseStatus, MODEL_CAPABILITY_OPTIONS, MODEL_TABS, type Middleware, ModelCapability, ModelTab, NOTIFICATION_CATEGORIES, NOTIFICATION_FREQUENCIES, NotificationCategory, NotificationFrequency, NotificationItem, NotificationListResult, NotificationPreferences, NotificationSsePayload, NotificationSseValue, OSS_BASE_FEATURES, PROVIDER_BADGE_STYLES, PROVIDER_CATEGORIES, PROVIDER_CATEGORY_VALUES, type ParsedUA, type PermissionLevel, type PermissionsService, type PlanFeatures, PlanFeaturesSchema, type PlanInfo, type PluginContributions, type PluginDefinition, type PluginRouteContext, type PortalSessionParams, type PrismaContribution, type PrismaSeam, type ProEdition, type ProFeature, type ProModule, type ProServiceMap, type ProfileDefinition, type PrototypeComponentConfig, ProviderCategory, type QueryFactoryMap, RESOURCE_KEYS, type RealtimeTransport, type RefDisplay, type Reference, type ReferenceDisplayFn, type ResizeDirection, type ResizeMode, type ResolveResult, type ResolvedRef, type ResourceKey, type ResourceMeta, ResourceRegistry, type ResourceSnapshot, type ResourceSnapshots, type RoleDefinition, type RouteContribution, SEED_AI_PROVIDERS, type SearchParams, type SearchResult, type SeatCheckResult, SeatsExceededError, type ServerSeam, type SettingsTabContribution, type ShapeType, type SsoProvider, type SsoService, type SubscriptionInfo, SyncDependencyResult, type TemplatesService, ThirdPartyDependencyRow, type UiSlotContributions, UnreadSnapshotPayload, UpdateDependencyInput, VIRTUALIZE_THRESHOLD, type VersionHistoryService, VersionStatus, WebhookSignatureError, definePlugin, defineProfile, dumpModules, formatParsedUA, generateAssemblyCode, generateAssemblyFiles, getClientIp, getServerSeam, isInDndWindow, isOssFeature, isResourceDefined, normalizeCategoryFrequencies, parseProfileImports, parseUserAgent, registerPrismaSeam, registerServerSeam, resolveImportSpecifiers, resolveIpLocation, resolvePluginOrder };
2107
+ //#region src/contract/types/outline.d.ts
2108
+ interface OutlineNode {
2109
+ id: string;
2110
+ label: string;
2111
+ type: "container" | "atom";
2112
+ elementId: string;
2113
+ children: OutlineNode[];
2114
+ }
2115
+ //#endregion
2116
+ //#region src/contract/types/prd.d.ts
2117
+ interface PRD {
2118
+ id: string;
2119
+ name: string;
2120
+ icon: string;
2121
+ description?: string | null;
2122
+ prdTags?: {
2123
+ tag: {
2124
+ id: string;
2125
+ name: string;
2126
+ color: number;
2127
+ };
2128
+ }[];
2129
+ }
2130
+ interface PRDDetail extends PRD {
2131
+ createdAt: Date;
2132
+ updatedAt: Date;
2133
+ }
2134
+ interface PRDVersionBase {
2135
+ id: string;
2136
+ versionLabel: string;
2137
+ notes: string | null;
2138
+ createdAt: string;
2139
+ updatedAt?: string | null;
2140
+ }
2141
+ interface PRDVersionWithPages extends PRDVersionBase {
2142
+ pageVersions: {
2143
+ pageId: string;
2144
+ pageName: string;
2145
+ type?: "folder" | "page";
2146
+ parentId?: string | null;
2147
+ version: number;
2148
+ pageVersionId?: string | null;
2149
+ canvas?: any;
2150
+ content?: any;
2151
+ isPlaceholder?: boolean;
2152
+ }[];
2153
+ }
2154
+ interface PRDVersionWithSemver extends PRDVersionBase {
2155
+ major: number;
2156
+ minor: number;
2157
+ patch: number;
2158
+ }
2159
+ declare const ICON_MAP: Record<string, React.ComponentType<{
2160
+ className?: string;
2161
+ }>>;
2162
+ //#endregion
2163
+ export { ADAPTER_KINDS, ADAPTER_KIND_VALUES, type AICommandContext, type AICommandDef, type AICommandHandler, type AICommandResult, type ActivationResult, AdapterKind, type AiAdapter, AiModelMeta, AiProviderMeta, AiProviderRow, type AiQuota, type AllBlueModule, type AnalyticsQuery, type AnalyticsResult, type AnalyticsService, type AssembleInput, type AssemblyFiles, type AuditLogEntry, type AuditQuery, type AuditService, type AutomationRule, type AutomationService, type AvatarConfig, type AvatarPart, type BillingService, BillingUnavailableError, type CLIAgentInfo, type CanvasElement, CategoryFrequencies, type CheckoutParams, type ComplianceJobSummary, type ComplianceService, type ComponentCategory, type ComponentSource, type CustomDashboard, DEFAULT_CATEGORIES, DEFAULT_WATCHED_DEPENDENCIES, DEPENDENCY_CATEGORIES, DEPENDENCY_PRIORITIES, DEVICE_SIZES, DND_STICKY_THRESHOLD, DependencyCategory, DependencyPriority, DependencySeed, DependencyUsage, type DeveloperLogEntry, type DeviceType, type DocumentTemplate, type DocumentVersion, type EditableFieldType, type EditablePropField, type EntityDef, type EntityUpdateEvent, FEATURE_KEYS, type FeatureContribution, type FeatureKey, type FeatureMeta, FeatureRegistry, type GlobalSearchService, type HostSession, type HostedAiChatParams, type HostedAiChatResult, HostedAiError, type HostedAiModel, type HostedAiService, ICON_MAP, type InvoiceInfo, LOAD_MORE_STEP, LOBE_ICON_MAP, type LicenseInfo, type LicenseIssueParams, type LicenseIssueResult, type LicenseService, type LicenseStatus, MODEL_CAPABILITY_OPTIONS, MODEL_TABS, type Middleware, ModelCapability, ModelTab, NOTIFICATION_CATEGORIES, NOTIFICATION_FREQUENCIES, NotificationCategory, NotificationFrequency, NotificationItem, NotificationListResult, NotificationPreferences, NotificationSsePayload, NotificationSseValue, OSS_BASE_FEATURES, type OutlineNode, type PRD, type PRDDetail, type PRDVersionWithPages, type PRDVersionWithSemver, PROVIDER_BADGE_STYLES, PROVIDER_CATEGORIES, PROVIDER_CATEGORY_VALUES, type ParsedUA, type PermissionLevel, type PermissionsService, type PlanFeatures, PlanFeaturesSchema, type PlanInfo, type PluginContributions, type PluginDefinition, type PluginRouteContext, type PortalSessionParams, type PrismaContribution, type PrismaSeam, type ProEdition, type ProFeature, type ProModule, type ProServiceMap, type ProfileDefinition, type PrototypeComponentConfig, ProviderCategory, type QueryFactoryMap, RESOURCE_KEYS, type RealtimeTransport, type RefDisplay, type Reference, type ReferenceDisplayFn, type ResizeDirection, type ResizeMode, type ResolveResult, type ResolvedRef, type ResourceKey, type ResourceMeta, ResourceRegistry, type ResourceSnapshot, type ResourceSnapshots, type RoleDefinition, type RouteContribution, SEED_AI_PROVIDERS, type SearchParams, type SearchResult, type SeatCheckResult, SeatsExceededError, type ServerSeam, type SettingsTabContribution, type ShapeType, type SsoProvider, type SsoService, type SubscriptionInfo, SyncDependencyResult, type TemplatesService, ThirdPartyDependencyRow, type UiSlotContributions, UnreadSnapshotPayload, UpdateDependencyInput, VIRTUALIZE_THRESHOLD, type VersionHistoryService, VersionStatus, WebhookSignatureError, definePlugin, defineProfile, dumpModules, formatParsedUA, generateAssemblyCode, generateAssemblyFiles, getClientIp, getServerSeam, isInDndWindow, isOssFeature, isResourceDefined, moduleRegistry, normalizeCategoryFrequencies, parseProfileImports, parseUserAgent, registerPrismaSeam, registerServerSeam, resolveImportSpecifiers, resolveIpLocation, resolvePluginOrder };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { A as DND_STICKY_THRESHOLD, B as dumpModules, C as ADAPTER_KIND_VALUES, D as PROVIDER_CATEGORIES, E as MODEL_TABS, F as registerServerSeam, G as resolvePluginOrder, H as generateAssemblyFiles, I as HostedAiError, K as defineProfile, L as BillingUnavailableError, M as VIRTUALIZE_THRESHOLD, N as getServerSeam, O as PROVIDER_CATEGORY_VALUES, P as registerPrismaSeam, R as SeatsExceededError, S as ADAPTER_KINDS, T as MODEL_CAPABILITY_OPTIONS, U as parseProfileImports, V as generateAssemblyCode, W as resolveImportSpecifiers, _ as resolveIpLocation, a as NOTIFICATION_FREQUENCIES, b as DEPENDENCY_PRIORITIES, c as isResourceDefined, d as FeatureRegistry, f as OSS_BASE_FEATURES, g as getClientIp, h as parseUserAgent, i as NOTIFICATION_CATEGORIES, j as LOAD_MORE_STEP, k as PROVIDER_BADGE_STYLES, l as PlanFeaturesSchema, m as formatParsedUA, n as isInDndWindow, o as RESOURCE_KEYS, p as isOssFeature, q as definePlugin, r as normalizeCategoryFrequencies, s as ResourceRegistry, t as DEFAULT_CATEGORIES, u as FEATURE_KEYS, v as DEFAULT_WATCHED_DEPENDENCIES, w as LOBE_ICON_MAP, x as SEED_AI_PROVIDERS, y as DEPENDENCY_CATEGORIES, z as WebhookSignatureError } from "./src-D4_fdvW_.js";
2
- export { ADAPTER_KINDS, ADAPTER_KIND_VALUES, BillingUnavailableError, DEFAULT_CATEGORIES, DEFAULT_WATCHED_DEPENDENCIES, DEPENDENCY_CATEGORIES, DEPENDENCY_PRIORITIES, DND_STICKY_THRESHOLD, FEATURE_KEYS, FeatureRegistry, HostedAiError, LOAD_MORE_STEP, LOBE_ICON_MAP, MODEL_CAPABILITY_OPTIONS, MODEL_TABS, NOTIFICATION_CATEGORIES, NOTIFICATION_FREQUENCIES, OSS_BASE_FEATURES, PROVIDER_BADGE_STYLES, PROVIDER_CATEGORIES, PROVIDER_CATEGORY_VALUES, PlanFeaturesSchema, RESOURCE_KEYS, ResourceRegistry, SEED_AI_PROVIDERS, SeatsExceededError, VIRTUALIZE_THRESHOLD, WebhookSignatureError, definePlugin, defineProfile, dumpModules, formatParsedUA, generateAssemblyCode, generateAssemblyFiles, getClientIp, getServerSeam, isInDndWindow, isOssFeature, isResourceDefined, normalizeCategoryFrequencies, parseProfileImports, parseUserAgent, registerPrismaSeam, registerServerSeam, resolveImportSpecifiers, resolveIpLocation, resolvePluginOrder };
1
+ import { A as PROVIDER_CATEGORIES, B as BillingUnavailableError, C as DEPENDENCY_PRIORITIES, D as LOBE_ICON_MAP, E as ADAPTER_KIND_VALUES, F as VIRTUALIZE_THRESHOLD, G as generateAssemblyFiles, H as WebhookSignatureError, I as getServerSeam, J as resolvePluginOrder, K as parseProfileImports, L as registerPrismaSeam, M as PROVIDER_BADGE_STYLES, N as DND_STICKY_THRESHOLD, O as MODEL_CAPABILITY_OPTIONS, P as LOAD_MORE_STEP, R as registerServerSeam, S as DEPENDENCY_CATEGORIES, T as ADAPTER_KINDS, U as dumpModules, V as SeatsExceededError, W as generateAssemblyCode, X as definePlugin, Y as defineProfile, _ as formatParsedUA, a as isInDndWindow, b as resolveIpLocation, c as NOTIFICATION_FREQUENCIES, d as isResourceDefined, f as PlanFeaturesSchema, g as isOssFeature, h as OSS_BASE_FEATURES, i as DEFAULT_CATEGORIES, j as PROVIDER_CATEGORY_VALUES, k as MODEL_TABS, l as RESOURCE_KEYS, m as FeatureRegistry, n as DEVICE_SIZES, o as normalizeCategoryFrequencies, p as FEATURE_KEYS, q as resolveImportSpecifiers, r as moduleRegistry, s as NOTIFICATION_CATEGORIES, t as ICON_MAP, u as ResourceRegistry, v as parseUserAgent, w as SEED_AI_PROVIDERS, x as DEFAULT_WATCHED_DEPENDENCIES, y as getClientIp, z as HostedAiError } from "./src-Dj40IFvX.js";
2
+ export { ADAPTER_KINDS, ADAPTER_KIND_VALUES, BillingUnavailableError, DEFAULT_CATEGORIES, DEFAULT_WATCHED_DEPENDENCIES, DEPENDENCY_CATEGORIES, DEPENDENCY_PRIORITIES, DEVICE_SIZES, DND_STICKY_THRESHOLD, FEATURE_KEYS, FeatureRegistry, HostedAiError, ICON_MAP, LOAD_MORE_STEP, LOBE_ICON_MAP, MODEL_CAPABILITY_OPTIONS, MODEL_TABS, NOTIFICATION_CATEGORIES, NOTIFICATION_FREQUENCIES, OSS_BASE_FEATURES, PROVIDER_BADGE_STYLES, PROVIDER_CATEGORIES, PROVIDER_CATEGORY_VALUES, PlanFeaturesSchema, RESOURCE_KEYS, ResourceRegistry, SEED_AI_PROVIDERS, SeatsExceededError, VIRTUALIZE_THRESHOLD, WebhookSignatureError, definePlugin, defineProfile, dumpModules, formatParsedUA, generateAssemblyCode, generateAssemblyFiles, getClientIp, getServerSeam, isInDndWindow, isOssFeature, isResourceDefined, moduleRegistry, normalizeCategoryFrequencies, parseProfileImports, parseUserAgent, registerPrismaSeam, registerServerSeam, resolveImportSpecifiers, resolveIpLocation, resolvePluginOrder };