@reopt-ai/opt-devtool 1.0.0 → 1.0.2
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/CHANGELOG.md +22 -0
- package/README.md +11 -2
- package/dist/brandapp/index.cjs +457 -363
- package/dist/brandapp/index.d.cts +80 -81
- package/dist/brandapp/index.d.ts +80 -81
- package/dist/brandapp/index.js +451 -361
- package/dist/datagrid/index.cjs +170 -180
- package/dist/datagrid/index.d.cts +9 -11
- package/dist/datagrid/index.d.ts +9 -11
- package/dist/datagrid/index.js +167 -179
- package/dist/editor/index.cjs +209 -228
- package/dist/editor/index.d.cts +9 -11
- package/dist/editor/index.d.ts +9 -11
- package/dist/editor/index.js +206 -227
- package/dist/harness/index.cjs +5 -12
- package/dist/harness/index.d.cts +14 -16
- package/dist/harness/index.d.ts +14 -16
- package/dist/harness/index.js +1 -11
- package/dist/harness-CJZXBH3w.js +528 -0
- package/dist/harness-CPOp9Wlj.cjs +582 -0
- package/dist/index.cjs +3619 -3782
- package/dist/index.d.cts +9 -17
- package/dist/index.d.ts +9 -17
- package/dist/index.js +3611 -3781
- package/dist/provider-Cjg2rSYG.js +110 -0
- package/dist/provider-H53ZWHCo.cjs +161 -0
- package/dist/theme/index.cjs +298 -12
- package/dist/theme/index.d.cts +26 -28
- package/dist/theme/index.d.ts +26 -28
- package/dist/theme/index.js +294 -11
- package/dist/theme-isolate-BOo3J259.js +42 -0
- package/dist/theme-isolate-D9AMkYrD.cjs +53 -0
- package/dist/types-BKmW0EBr.js +4 -0
- package/dist/types-Bz4DijhU.cjs +9 -0
- package/dist/types-D_lNT2Nr.d.cts +91 -0
- package/dist/types-D_lNT2Nr.d.ts +91 -0
- package/dist/ui/index.cjs +4 -8
- package/dist/ui/index.d.cts +3 -2
- package/dist/ui/index.d.ts +3 -2
- package/dist/ui/index.js +1 -7
- package/package.json +4 -4
- package/dist/chunk-4MJKIAXH.cjs +0 -65
- package/dist/chunk-5HRIQSVF.js +0 -32
- package/dist/chunk-6AGUYGVT.cjs +0 -77
- package/dist/chunk-EQPETYJJ.cjs +0 -32
- package/dist/chunk-H3F2WACS.cjs +0 -568
- package/dist/chunk-N7YO56TN.cjs +0 -25
- package/dist/chunk-SQ3E3QLA.cjs +0 -253
- package/dist/chunk-SW2FF6EV.js +0 -568
- package/dist/chunk-UJSIQF3A.js +0 -25
- package/dist/chunk-UQY5I3WS.js +0 -253
- package/dist/chunk-YCYIUFB4.js +0 -65
- package/dist/chunk-Z2KFRHSI.js +0 -77
- package/dist/index-Bakx4o8Z.d.cts +0 -91
- package/dist/index-Bakx4o8Z.d.ts +0 -91
|
@@ -1,95 +1,94 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
|
|
2
|
+
export type BrandappDevtoolStatus = "connected" | "configured" | "missing" | "warning" | "error" | "unknown";
|
|
3
|
+
export interface BrandappDevtoolEnvVar {
|
|
4
|
+
name: string;
|
|
5
|
+
present: boolean;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
scope?: "server" | "client" | "both";
|
|
8
|
+
maskedValue?: string;
|
|
9
|
+
note?: string;
|
|
9
10
|
}
|
|
10
|
-
interface BrandappDevtoolFeature {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
export interface BrandappDevtoolFeature {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
status: BrandappDevtoolStatus;
|
|
15
|
+
detail?: string;
|
|
15
16
|
}
|
|
16
|
-
interface BrandappDevtoolRoute {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
export interface BrandappDevtoolRoute {
|
|
18
|
+
path: string;
|
|
19
|
+
method?: string;
|
|
20
|
+
status?: BrandappDevtoolStatus;
|
|
21
|
+
statusCode?: number;
|
|
22
|
+
latencyMs?: number;
|
|
23
|
+
description?: string;
|
|
24
|
+
lastCheckedAt?: string | number;
|
|
24
25
|
}
|
|
25
|
-
interface BrandappDevtoolEavEntity {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
export interface BrandappDevtoolEavEntity {
|
|
27
|
+
id: string;
|
|
28
|
+
name?: string;
|
|
29
|
+
label?: string;
|
|
30
|
+
attributeCount?: number;
|
|
31
|
+
recordCount?: number;
|
|
32
|
+
synced?: boolean;
|
|
32
33
|
}
|
|
33
|
-
interface BrandappDevtoolEavState {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
export interface BrandappDevtoolEavState {
|
|
35
|
+
status?: BrandappDevtoolStatus;
|
|
36
|
+
schemaHash?: string;
|
|
37
|
+
lockfileHash?: string;
|
|
38
|
+
lastSyncAt?: string | number;
|
|
39
|
+
entities?: BrandappDevtoolEavEntity[];
|
|
39
40
|
}
|
|
40
|
-
interface BrandappDevtoolAuthState {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
export interface BrandappDevtoolAuthState {
|
|
42
|
+
status?: BrandappDevtoolStatus;
|
|
43
|
+
provider?: string;
|
|
44
|
+
session?: "authenticated" | "anonymous" | "loading" | "unknown";
|
|
45
|
+
userId?: string;
|
|
46
|
+
organizationId?: string;
|
|
47
|
+
callbackPath?: string;
|
|
47
48
|
}
|
|
48
|
-
interface BrandappDevtoolAiState {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
export interface BrandappDevtoolAiState {
|
|
50
|
+
status?: BrandappDevtoolStatus;
|
|
51
|
+
routePath?: string;
|
|
52
|
+
defaultModel?: string;
|
|
53
|
+
models?: string[];
|
|
54
|
+
creditBalance?: number;
|
|
54
55
|
}
|
|
55
|
-
interface BrandappDevtoolSnapshot {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
56
|
+
export interface BrandappDevtoolSnapshot {
|
|
57
|
+
brandappId?: string | null;
|
|
58
|
+
clientId?: string | null;
|
|
59
|
+
sdkVersion?: string | null;
|
|
60
|
+
baseUrl?: string | null;
|
|
61
|
+
environment?: string | null;
|
|
62
|
+
updatedAt?: string | number;
|
|
63
|
+
auth?: BrandappDevtoolAuthState;
|
|
64
|
+
ai?: BrandappDevtoolAiState;
|
|
65
|
+
eav?: BrandappDevtoolEavState;
|
|
66
|
+
env?: BrandappDevtoolEnvVar[];
|
|
67
|
+
features?: BrandappDevtoolFeature[];
|
|
68
|
+
routes?: BrandappDevtoolRoute[];
|
|
69
|
+
notes?: string[];
|
|
69
70
|
}
|
|
70
|
-
interface UseBrandappDevtoolBridgeOptions {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
export interface UseBrandappDevtoolBridgeOptions {
|
|
72
|
+
id: string;
|
|
73
|
+
label: string;
|
|
74
|
+
order?: number;
|
|
75
|
+
/**
|
|
76
|
+
* Controlled snapshot. When provided, this prop is authoritative and
|
|
77
|
+
* returned `inspect` / `clear` callbacks do not mutate local bridge state.
|
|
78
|
+
*/
|
|
79
|
+
snapshot?: BrandappDevtoolSnapshot | null;
|
|
79
80
|
}
|
|
80
|
-
interface RegisteredBrandappDevtoolBridge {
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
export interface RegisteredBrandappDevtoolBridge {
|
|
82
|
+
inspect: (snapshot: BrandappDevtoolSnapshot) => void;
|
|
83
|
+
clear: () => void;
|
|
83
84
|
}
|
|
84
85
|
/** Summarize required Brandapp env vars for status badges and diagnostics. */
|
|
85
|
-
declare function getBrandappRequiredEnvSummary(env: readonly BrandappDevtoolEnvVar[] | undefined): {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
export declare function getBrandappRequiredEnvSummary(env: readonly BrandappDevtoolEnvVar[] | undefined): {
|
|
87
|
+
total: number;
|
|
88
|
+
present: number;
|
|
89
|
+
missing: string[];
|
|
89
90
|
};
|
|
90
91
|
/** Resolve the top-level Brandapp snapshot status from all reported signals. */
|
|
91
|
-
declare function getBrandappSnapshotStatus(snapshot: BrandappDevtoolSnapshot): BrandappDevtoolStatus;
|
|
92
|
+
export declare function getBrandappSnapshotStatus(snapshot: BrandappDevtoolSnapshot): BrandappDevtoolStatus;
|
|
92
93
|
/** Register a Brandapp SDK integration panel in opt-devtool. */
|
|
93
|
-
declare function useBrandappDevtoolBridge({ id, label, order, snapshot: controlledSnapshot
|
|
94
|
-
|
|
95
|
-
export { type BrandappDevtoolAiState, type BrandappDevtoolAuthState, type BrandappDevtoolEavEntity, type BrandappDevtoolEavState, type BrandappDevtoolEnvVar, type BrandappDevtoolFeature, type BrandappDevtoolRoute, type BrandappDevtoolSnapshot, type BrandappDevtoolStatus, type RegisteredBrandappDevtoolBridge, type UseBrandappDevtoolBridgeOptions, getBrandappRequiredEnvSummary, getBrandappSnapshotStatus, useBrandappDevtoolBridge };
|
|
94
|
+
export declare function useBrandappDevtoolBridge({ id, label, order, snapshot: controlledSnapshot }: UseBrandappDevtoolBridgeOptions): RegisteredBrandappDevtoolBridge;
|
package/dist/brandapp/index.d.ts
CHANGED
|
@@ -1,95 +1,94 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
|
|
2
|
+
export type BrandappDevtoolStatus = "connected" | "configured" | "missing" | "warning" | "error" | "unknown";
|
|
3
|
+
export interface BrandappDevtoolEnvVar {
|
|
4
|
+
name: string;
|
|
5
|
+
present: boolean;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
scope?: "server" | "client" | "both";
|
|
8
|
+
maskedValue?: string;
|
|
9
|
+
note?: string;
|
|
9
10
|
}
|
|
10
|
-
interface BrandappDevtoolFeature {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
export interface BrandappDevtoolFeature {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
status: BrandappDevtoolStatus;
|
|
15
|
+
detail?: string;
|
|
15
16
|
}
|
|
16
|
-
interface BrandappDevtoolRoute {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
export interface BrandappDevtoolRoute {
|
|
18
|
+
path: string;
|
|
19
|
+
method?: string;
|
|
20
|
+
status?: BrandappDevtoolStatus;
|
|
21
|
+
statusCode?: number;
|
|
22
|
+
latencyMs?: number;
|
|
23
|
+
description?: string;
|
|
24
|
+
lastCheckedAt?: string | number;
|
|
24
25
|
}
|
|
25
|
-
interface BrandappDevtoolEavEntity {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
export interface BrandappDevtoolEavEntity {
|
|
27
|
+
id: string;
|
|
28
|
+
name?: string;
|
|
29
|
+
label?: string;
|
|
30
|
+
attributeCount?: number;
|
|
31
|
+
recordCount?: number;
|
|
32
|
+
synced?: boolean;
|
|
32
33
|
}
|
|
33
|
-
interface BrandappDevtoolEavState {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
export interface BrandappDevtoolEavState {
|
|
35
|
+
status?: BrandappDevtoolStatus;
|
|
36
|
+
schemaHash?: string;
|
|
37
|
+
lockfileHash?: string;
|
|
38
|
+
lastSyncAt?: string | number;
|
|
39
|
+
entities?: BrandappDevtoolEavEntity[];
|
|
39
40
|
}
|
|
40
|
-
interface BrandappDevtoolAuthState {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
export interface BrandappDevtoolAuthState {
|
|
42
|
+
status?: BrandappDevtoolStatus;
|
|
43
|
+
provider?: string;
|
|
44
|
+
session?: "authenticated" | "anonymous" | "loading" | "unknown";
|
|
45
|
+
userId?: string;
|
|
46
|
+
organizationId?: string;
|
|
47
|
+
callbackPath?: string;
|
|
47
48
|
}
|
|
48
|
-
interface BrandappDevtoolAiState {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
export interface BrandappDevtoolAiState {
|
|
50
|
+
status?: BrandappDevtoolStatus;
|
|
51
|
+
routePath?: string;
|
|
52
|
+
defaultModel?: string;
|
|
53
|
+
models?: string[];
|
|
54
|
+
creditBalance?: number;
|
|
54
55
|
}
|
|
55
|
-
interface BrandappDevtoolSnapshot {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
56
|
+
export interface BrandappDevtoolSnapshot {
|
|
57
|
+
brandappId?: string | null;
|
|
58
|
+
clientId?: string | null;
|
|
59
|
+
sdkVersion?: string | null;
|
|
60
|
+
baseUrl?: string | null;
|
|
61
|
+
environment?: string | null;
|
|
62
|
+
updatedAt?: string | number;
|
|
63
|
+
auth?: BrandappDevtoolAuthState;
|
|
64
|
+
ai?: BrandappDevtoolAiState;
|
|
65
|
+
eav?: BrandappDevtoolEavState;
|
|
66
|
+
env?: BrandappDevtoolEnvVar[];
|
|
67
|
+
features?: BrandappDevtoolFeature[];
|
|
68
|
+
routes?: BrandappDevtoolRoute[];
|
|
69
|
+
notes?: string[];
|
|
69
70
|
}
|
|
70
|
-
interface UseBrandappDevtoolBridgeOptions {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
export interface UseBrandappDevtoolBridgeOptions {
|
|
72
|
+
id: string;
|
|
73
|
+
label: string;
|
|
74
|
+
order?: number;
|
|
75
|
+
/**
|
|
76
|
+
* Controlled snapshot. When provided, this prop is authoritative and
|
|
77
|
+
* returned `inspect` / `clear` callbacks do not mutate local bridge state.
|
|
78
|
+
*/
|
|
79
|
+
snapshot?: BrandappDevtoolSnapshot | null;
|
|
79
80
|
}
|
|
80
|
-
interface RegisteredBrandappDevtoolBridge {
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
export interface RegisteredBrandappDevtoolBridge {
|
|
82
|
+
inspect: (snapshot: BrandappDevtoolSnapshot) => void;
|
|
83
|
+
clear: () => void;
|
|
83
84
|
}
|
|
84
85
|
/** Summarize required Brandapp env vars for status badges and diagnostics. */
|
|
85
|
-
declare function getBrandappRequiredEnvSummary(env: readonly BrandappDevtoolEnvVar[] | undefined): {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
export declare function getBrandappRequiredEnvSummary(env: readonly BrandappDevtoolEnvVar[] | undefined): {
|
|
87
|
+
total: number;
|
|
88
|
+
present: number;
|
|
89
|
+
missing: string[];
|
|
89
90
|
};
|
|
90
91
|
/** Resolve the top-level Brandapp snapshot status from all reported signals. */
|
|
91
|
-
declare function getBrandappSnapshotStatus(snapshot: BrandappDevtoolSnapshot): BrandappDevtoolStatus;
|
|
92
|
+
export declare function getBrandappSnapshotStatus(snapshot: BrandappDevtoolSnapshot): BrandappDevtoolStatus;
|
|
92
93
|
/** Register a Brandapp SDK integration panel in opt-devtool. */
|
|
93
|
-
declare function useBrandappDevtoolBridge({ id, label, order, snapshot: controlledSnapshot
|
|
94
|
-
|
|
95
|
-
export { type BrandappDevtoolAiState, type BrandappDevtoolAuthState, type BrandappDevtoolEavEntity, type BrandappDevtoolEavState, type BrandappDevtoolEnvVar, type BrandappDevtoolFeature, type BrandappDevtoolRoute, type BrandappDevtoolSnapshot, type BrandappDevtoolStatus, type RegisteredBrandappDevtoolBridge, type UseBrandappDevtoolBridgeOptions, getBrandappRequiredEnvSummary, getBrandappSnapshotStatus, useBrandappDevtoolBridge };
|
|
94
|
+
export declare function useBrandappDevtoolBridge({ id, label, order, snapshot: controlledSnapshot }: UseBrandappDevtoolBridgeOptions): RegisteredBrandappDevtoolBridge;
|