@lobu/runtime-device 24.5.0 → 24.7.0

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.
Files changed (33) hide show
  1. package/dist/component.json +1 -1
  2. package/dist/dependencies.bun.lock +32 -17
  3. package/npm-shrinkwrap.json +140 -89
  4. package/package.json +2 -1
  5. package/vendor/cli/dist/bundled-skills/lobu/SKILL.md +57 -9
  6. package/vendor/cli/dist/commands/_lib/view-bundler.js +9 -1
  7. package/vendor/cli/dist/connectors/linkedin-identity.ts +43 -0
  8. package/vendor/cli/dist/connectors/linkedin.ts +154 -3
  9. package/vendor/cli/dist/connectors/x-like-follow.ts +329 -0
  10. package/vendor/cli/dist/connectors/x.ts +709 -80
  11. package/vendor/cli/dist/internal/connector-compiler.js +3 -1
  12. package/vendor/cli/dist/runtime-components.json +4 -4
  13. package/vendor/cli/package.json +2 -1
  14. package/vendor/connector-sdk/package.json +1 -1
  15. package/vendor/connector-worker/dist/compile/index.d.ts +4 -3
  16. package/vendor/connector-worker/dist/compile/index.js +6 -3
  17. package/vendor/connector-worker/package.json +1 -1
  18. package/vendor/core/dist/contracts/tools/view-host.d.ts +7 -0
  19. package/vendor/core/dist/contracts/tools/view-host.js +28 -0
  20. package/vendor/core/dist/contracts/tools/view-runtime.d.ts +2 -4
  21. package/vendor/core/dist/contracts/tools/view-runtime.js +19 -7
  22. package/vendor/core/package.json +11 -1
  23. package/vendor/views/dist/api.d.ts +290 -0
  24. package/vendor/views/dist/api.js +714 -0
  25. package/vendor/views/dist/bridge.d.ts +157 -0
  26. package/vendor/views/dist/bridge.js +372 -0
  27. package/vendor/views/dist/components.d.ts +172 -0
  28. package/vendor/views/dist/components.js +376 -0
  29. package/vendor/views/dist/index.d.ts +13 -0
  30. package/vendor/views/dist/index.js +3 -0
  31. package/vendor/views/dist/native.d.ts +327 -0
  32. package/vendor/views/dist/native.js +57 -0
  33. package/vendor/views/package.json +53 -0
@@ -0,0 +1,327 @@
1
+ /** Public prop contracts for the native components built by Owletto.
2
+ * Implementations are supplied by the host artifact, using the shell's React. */
3
+ import { type ComponentType, type ReactNode, type ComponentProps } from "react";
4
+ import type { ValueFormat } from "@lobu/core/json-template";
5
+ export interface ViewEntity {
6
+ id: number | string | null;
7
+ name: string;
8
+ entity_type: string;
9
+ parent_id?: number | null;
10
+ slug: string;
11
+ parent_slug?: string | null;
12
+ parent_entity_type?: string | null;
13
+ domain?: string;
14
+ organization_id?: string;
15
+ metadata?: Record<string, unknown>;
16
+ relationships?: Record<string, Array<{
17
+ id: number;
18
+ name: string;
19
+ slug: string;
20
+ entity_type: string;
21
+ }>>;
22
+ created_at?: string;
23
+ total_content?: number | null;
24
+ active_connections?: number | null;
25
+ automations_count?: number | null;
26
+ children_count?: number | null;
27
+ parent_name?: string | null;
28
+ }
29
+ export interface SchemaProperty {
30
+ type?: string;
31
+ title?: string;
32
+ description?: string;
33
+ enum?: Array<string | number>;
34
+ readOnly?: boolean;
35
+ format?: string;
36
+ items?: SchemaProperty;
37
+ minItems?: number;
38
+ maxItems?: number;
39
+ properties?: Record<string, SchemaProperty>;
40
+ required?: string[];
41
+ "x-image"?: boolean;
42
+ "x-email"?: boolean;
43
+ "x-table-column"?: boolean;
44
+ "x-table-label"?: string;
45
+ "x-currency"?: boolean;
46
+ "x-link-entity-type"?: string;
47
+ "x-link-lookup-field"?: string;
48
+ /** Display labels keyed by stringified enum value. */
49
+ "x-enum-labels"?: Record<string, string>;
50
+ /** Omitted from schema-driven field lists without clearing the stored value. */
51
+ "x-hidden"?: boolean;
52
+ "x-measure"?: unknown;
53
+ "x-dimension"?: unknown;
54
+ }
55
+ interface MetadataTableProperty {
56
+ title?: string;
57
+ description?: string;
58
+ enum?: string[];
59
+ format?: string;
60
+ "x-table-column"?: boolean;
61
+ "x-table-label"?: string;
62
+ "x-image"?: boolean;
63
+ "x-link-entity-type"?: string;
64
+ "x-link-lookup-field"?: string;
65
+ "x-currency"?: boolean;
66
+ "x-hidden"?: boolean;
67
+ "x-enum-labels"?: Record<string, string>;
68
+ }
69
+ export interface EntityTableSchema {
70
+ properties?: Record<string, MetadataTableProperty>;
71
+ "x-table-relationships"?: Array<{
72
+ relationship_type: string;
73
+ label: string;
74
+ }>;
75
+ }
76
+ export interface EntityTableViewProps {
77
+ entities: ViewEntity[];
78
+ owner: string;
79
+ schema?: EntityTableSchema;
80
+ entityTypeIcon?: string;
81
+ isDerived: boolean;
82
+ measureColumns: string[];
83
+ linkedEntityLookups: Record<string, Record<string, {
84
+ slug: string;
85
+ entity_type: string;
86
+ name: string;
87
+ }>>;
88
+ hasAnyParents: boolean;
89
+ sorting: Array<{
90
+ id: string;
91
+ desc: boolean;
92
+ }>;
93
+ onSortingChange: (update: Array<{
94
+ id: string;
95
+ desc: boolean;
96
+ }> | ((previous: Array<{
97
+ id: string;
98
+ desc: boolean;
99
+ }>) => Array<{
100
+ id: string;
101
+ desc: boolean;
102
+ }>)) => void;
103
+ visibleColumns?: string[];
104
+ /** Columns the header's picker offers; no picker without it. */
105
+ columnChoices?: {
106
+ field: string;
107
+ label: string;
108
+ }[];
109
+ onVisibleColumnsChange?: (visible: string[]) => void;
110
+ page: number;
111
+ pageSize: number;
112
+ totalCount: number;
113
+ hasMore: boolean;
114
+ pageTitle: string;
115
+ onPrevPage: () => void;
116
+ onNextPage: () => void;
117
+ }
118
+ export interface SpecField {
119
+ key: string;
120
+ prop: SchemaProperty;
121
+ /** Overrides the schema label (derived columns keep their source names). */
122
+ label?: string;
123
+ /** Right-aligned digits for scanning measures. */
124
+ numeric?: boolean;
125
+ }
126
+ export interface SpecSheetContext {
127
+ ownerSlug: string;
128
+ orgContext?: {
129
+ organizationId?: string | null;
130
+ slug?: string | null;
131
+ };
132
+ controls?: Record<string, {
133
+ set_by?: string | null;
134
+ set_at?: string;
135
+ note?: string | null;
136
+ }>;
137
+ /** Opens an object-array field in the peek pane; without it the count is plain text. */
138
+ openField?: (field: SpecField) => void;
139
+ /** The field the peek pane shows now. */
140
+ openFieldKey?: string;
141
+ /** Fields with unsaved edits. */
142
+ dirtyKeys?: readonly string[];
143
+ }
144
+ /** Controlled collection page. Reads and actions remain with its caller. */
145
+ export interface EntityListPageProps {
146
+ title: ReactNode;
147
+ actions?: ReactNode;
148
+ controls?: ReactNode;
149
+ table?: EntityTableViewProps;
150
+ /** Overrides the table, including for generic SQL/TypeScript rows. */
151
+ children?: ReactNode;
152
+ loading?: boolean;
153
+ error?: string | null;
154
+ onRetry?: () => void;
155
+ empty?: ReactNode;
156
+ }
157
+ /** Shared record body; callers provide activity, views and authorized actions. */
158
+ export interface EntityRecordPageProps {
159
+ entity: ViewEntity;
160
+ owner: string;
161
+ schema?: EntityTableSchema;
162
+ title?: ReactNode;
163
+ actions?: ReactNode;
164
+ details?: ReactNode;
165
+ summary?: ReactNode;
166
+ children?: ReactNode;
167
+ /** Content mode keeps the header and lets children own the body layout. */
168
+ layout?: "record" | "content";
169
+ }
170
+ /** Saved identities are resolved through the visiting user's existing reads.
171
+ * Authored names, status and callbacks are never accepted as identity. */
172
+ interface LiveReference {
173
+ mode: "live";
174
+ workspace: string;
175
+ appearance?: "inline" | "row";
176
+ }
177
+ export interface AutomationReferenceProps extends LiveReference {
178
+ automationId: string;
179
+ }
180
+ export interface AgentReferenceProps extends LiveReference {
181
+ agentId: string;
182
+ }
183
+ export interface ConnectorReferenceProps extends LiveReference {
184
+ connectorKey: string;
185
+ connectionId?: number;
186
+ }
187
+ export interface JsonDiffProps {
188
+ before: Record<string, unknown> | null;
189
+ after: Record<string, unknown> | null;
190
+ }
191
+ /** Read-only native definition body. Pass a saved object or an authored snapshot.
192
+ * No fetching, code execution, saving or approval is performed by the body. */
193
+ export interface DefinitionProps {
194
+ value: Record<string, unknown>;
195
+ }
196
+ export interface NativeComponentProps {
197
+ AutomationDefinition: DefinitionProps;
198
+ AgentDefinition: DefinitionProps;
199
+ ConnectorDefinition: DefinitionProps;
200
+ AutomationReference: AutomationReferenceProps;
201
+ AgentReference: AgentReferenceProps;
202
+ ConnectorReference: ConnectorReferenceProps;
203
+ JsonDiff: JsonDiffProps;
204
+ EntityListPage: EntityListPageProps;
205
+ EntityRecordPage: EntityRecordPageProps;
206
+ EntityTableView: EntityTableViewProps;
207
+ RecordSpecSheet: {
208
+ fields: SpecField[];
209
+ values: Record<string, unknown>;
210
+ context: SpecSheetContext;
211
+ fieldLimit?: number;
212
+ };
213
+ SchemaValue: {
214
+ value: unknown;
215
+ prop?: SchemaProperty;
216
+ format?: ValueFormat;
217
+ resolveLink?: (raw: string) => {
218
+ label: string;
219
+ to: string;
220
+ } | undefined;
221
+ empty?: ReactNode;
222
+ className?: string;
223
+ };
224
+ EntityAvatar: {
225
+ metadata: Record<string, unknown> | null | undefined;
226
+ metadataSchema: Record<string, unknown> | null | undefined;
227
+ name: string;
228
+ typeIcon?: string | null;
229
+ className?: string;
230
+ iconClassName?: string;
231
+ initialsFallback?: boolean;
232
+ };
233
+ Button: ComponentProps<"button"> & {
234
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null;
235
+ size?: "default" | "sm" | "lg" | "icon" | null;
236
+ asChild?: boolean;
237
+ };
238
+ Badge: ComponentProps<"span"> & {
239
+ variant?: "default" | "secondary" | "destructive" | "outline";
240
+ };
241
+ Tabs: {
242
+ defaultValue: string;
243
+ children?: ReactNode;
244
+ };
245
+ TabsList: {
246
+ label?: string;
247
+ children?: ReactNode;
248
+ };
249
+ TabsTrigger: {
250
+ value: string;
251
+ children?: ReactNode;
252
+ };
253
+ TabsContent: {
254
+ value: string;
255
+ children?: ReactNode;
256
+ };
257
+ }
258
+ export type NativeComponents = {
259
+ [K in keyof NativeComponentProps]: ComponentType<NativeComponentProps[K]>;
260
+ };
261
+ export declare const NATIVE_COMPONENT_NAMES: readonly ["AutomationDefinition", "AgentDefinition", "ConnectorDefinition", "AutomationReference", "AgentReference", "ConnectorReference", "JsonDiff", "EntityListPage", "EntityRecordPage", "EntityTableView", "RecordSpecSheet", "SchemaValue", "EntityAvatar", "Button", "Badge", "Tabs", "TabsList", "TabsTrigger", "TabsContent"];
262
+ export declare const NATIVE_COMPONENT_GLOBAL = "__lobuViewNative";
263
+ export declare const EntityListPage: ComponentType<EntityListPageProps>;
264
+ export declare const EntityRecordPage: ComponentType<EntityRecordPageProps>;
265
+ export declare const EntityTableView: ComponentType<EntityTableViewProps>;
266
+ export declare const RecordSpecSheet: ComponentType<{
267
+ fields: SpecField[];
268
+ values: Record<string, unknown>;
269
+ context: SpecSheetContext;
270
+ fieldLimit?: number;
271
+ }>;
272
+ export declare const SchemaValue: ComponentType<{
273
+ value: unknown;
274
+ prop?: SchemaProperty;
275
+ format?: ValueFormat;
276
+ resolveLink?: (raw: string) => {
277
+ label: string;
278
+ to: string;
279
+ } | undefined;
280
+ empty?: ReactNode;
281
+ className?: string;
282
+ }>;
283
+ export declare const EntityAvatar: ComponentType<{
284
+ metadata: Record<string, unknown> | null | undefined;
285
+ metadataSchema: Record<string, unknown> | null | undefined;
286
+ name: string;
287
+ typeIcon?: string | null;
288
+ className?: string;
289
+ iconClassName?: string;
290
+ initialsFallback?: boolean;
291
+ }>;
292
+ export declare const Button: ComponentType<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
293
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null;
294
+ size?: "default" | "sm" | "lg" | "icon" | null;
295
+ asChild?: boolean;
296
+ }>;
297
+ export declare const Badge: ComponentType<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & {
298
+ variant?: "default" | "secondary" | "destructive" | "outline";
299
+ }>;
300
+ export declare const Tabs: ComponentType<{
301
+ defaultValue: string;
302
+ children?: ReactNode;
303
+ }>;
304
+ export declare const TabsList: ComponentType<{
305
+ label?: string;
306
+ children?: ReactNode;
307
+ }>;
308
+ export declare const TabsTrigger: ComponentType<{
309
+ value: string;
310
+ children?: ReactNode;
311
+ }>;
312
+ export declare const TabsContent: ComponentType<{
313
+ value: string;
314
+ children?: ReactNode;
315
+ }>;
316
+ export declare const AutomationReference: ComponentType<AutomationReferenceProps>;
317
+ export declare const AgentReference: ComponentType<AgentReferenceProps>;
318
+ export declare const ConnectorReference: ComponentType<ConnectorReferenceProps>;
319
+ export declare const JsonDiff: ComponentType<JsonDiffProps>;
320
+ /** Instructions, sources, triggers, outputs and code from an Automation snapshot. */
321
+ export declare const AutomationDefinition: ComponentType<DefinitionProps>;
322
+ /** Identity and settings from an Agent snapshot, using the native editor fields. */
323
+ export declare const AgentDefinition: ComponentType<DefinitionProps>;
324
+ /** Connector capabilities, schemas and source from a definition snapshot. */
325
+ export declare const ConnectorDefinition: ComponentType<DefinitionProps>;
326
+ export {};
327
+ //# sourceMappingURL=native.d.ts.map
@@ -0,0 +1,57 @@
1
+ /** Public prop contracts for the native components built by Owletto.
2
+ * Implementations are supplied by the host artifact, using the shell's React. */
3
+ import { createElement, } from "react";
4
+ export const NATIVE_COMPONENT_NAMES = [
5
+ "AutomationDefinition",
6
+ "AgentDefinition",
7
+ "ConnectorDefinition",
8
+ "AutomationReference",
9
+ "AgentReference",
10
+ "ConnectorReference",
11
+ "JsonDiff",
12
+ "EntityListPage",
13
+ "EntityRecordPage",
14
+ "EntityTableView",
15
+ "RecordSpecSheet",
16
+ "SchemaValue",
17
+ "EntityAvatar",
18
+ "Button",
19
+ "Badge",
20
+ "Tabs",
21
+ "TabsList",
22
+ "TabsTrigger",
23
+ "TabsContent",
24
+ ];
25
+ export const NATIVE_COMPONENT_GLOBAL = "__lobuViewNative";
26
+ function native(name) {
27
+ return function NativeComponent(props) {
28
+ const registry = globalThis.__lobuViewNative;
29
+ const component = registry?.[name];
30
+ if (!component)
31
+ throw new Error(`Native component ${name} is unavailable in this host runtime.`);
32
+ return createElement(component, props);
33
+ };
34
+ }
35
+ export const EntityListPage = native("EntityListPage");
36
+ export const EntityRecordPage = native("EntityRecordPage");
37
+ export const EntityTableView = native("EntityTableView");
38
+ export const RecordSpecSheet = native("RecordSpecSheet");
39
+ export const SchemaValue = native("SchemaValue");
40
+ export const EntityAvatar = native("EntityAvatar");
41
+ export const Button = native("Button");
42
+ export const Badge = native("Badge");
43
+ export const Tabs = native("Tabs");
44
+ export const TabsList = native("TabsList");
45
+ export const TabsTrigger = native("TabsTrigger");
46
+ export const TabsContent = native("TabsContent");
47
+ export const AutomationReference = native("AutomationReference");
48
+ export const AgentReference = native("AgentReference");
49
+ export const ConnectorReference = native("ConnectorReference");
50
+ export const JsonDiff = native("JsonDiff");
51
+ /** Instructions, sources, triggers, outputs and code from an Automation snapshot. */
52
+ export const AutomationDefinition = native("AutomationDefinition");
53
+ /** Identity and settings from an Agent snapshot, using the native editor fields. */
54
+ export const AgentDefinition = native("AgentDefinition");
55
+ /** Connector capabilities, schemas and source from a definition snapshot. */
56
+ export const ConnectorDefinition = native("ConnectorDefinition");
57
+ //# sourceMappingURL=native.js.map
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@lobu/views",
3
+ "version": "24.7.0",
4
+ "description": "Authoring runtime for Lobu views — React modules rendered in the sandboxed MCP Apps frame",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": {
11
+ "types": "./dist/index.d.ts",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "require": {
15
+ "types": "./dist/index.d.ts",
16
+ "default": "./dist/index.js"
17
+ }
18
+ },
19
+ "./components": {
20
+ "import": {
21
+ "types": "./dist/components.d.ts",
22
+ "default": "./dist/components.js"
23
+ },
24
+ "require": {
25
+ "types": "./dist/components.d.ts",
26
+ "default": "./dist/components.js"
27
+ }
28
+ }
29
+ },
30
+ "files": [
31
+ "dist",
32
+ "!**/*.map"
33
+ ],
34
+ "dependencies": {
35
+ "@lobu/core": "file:../core"
36
+ },
37
+ "peerDependencies": {
38
+ "react": "^19.0.0",
39
+ "react-dom": "^19.0.0"
40
+ },
41
+ "engines": {
42
+ "node": ">=18"
43
+ },
44
+ "license": "Apache-2.0",
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/lobu-ai/lobu.git",
48
+ "directory": "packages/views"
49
+ },
50
+ "publishConfig": {
51
+ "access": "public"
52
+ }
53
+ }