-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcloud-connection-ui.ts
More file actions
89 lines (84 loc) · 3.02 KB
/
Copy pathcloud-connection-ui.ts
File metadata and controls
89 lines (84 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
/**
* Cloud Connection — SDUI surface (metadata, not React).
*
* The binding UI ships WITH the plugin as page + navigation metadata
* (ADR-0029 K2: capability plugins contribute their own Setup entries;
* cloud ADR-0008 / console-SDUI direction: new console surfaces are
* metadata-first). The only React involved is the registered
* `cloud-connection:panel` widget — the device-code state machine — which
* the console registers once as a reusable primitive; everything else
* (page shell, nav placement, labels) is server-driven and can evolve
* without a console release.
*/
import type { Page } from '@objectstack/spec/ui';
/** Setup page hosting the binding panel widget. */
export const CloudConnectionSettingsPage: Page = {
name: 'cloud_connection_settings',
label: 'Cloud Connection',
type: 'app',
template: 'default',
kind: 'full',
isDefault: false,
regions: [
{
name: 'header',
width: 'full',
components: [
{
type: 'page:header',
properties: {
title: 'Cloud Connection',
subtitle:
'Connect this runtime to an ObjectStack control plane to browse your '
+ 'organization\'s private packages and install them here.',
icon: 'cloud',
},
},
],
},
{
name: 'main',
width: 'large',
components: [
{
// Registered console widget — the RFC 8628 device-code
// state machine (status → start → user-code display →
// poll → bound / disconnect). Talks to the same-origin
// /api/v1/cloud-connection/* routes this plugin mounts.
type: 'cloud-connection:panel',
properties: {},
},
],
},
],
};
/** Setup-nav contribution: System group, after the marketplace entries. */
export const CLOUD_CONNECTION_NAV_CONTRIBUTIONS = [
{
app: 'setup',
group: 'group_apps',
priority: 200,
items: [
{
id: 'nav_cloud_connection',
type: 'page',
pageName: 'cloud_connection_settings',
label: 'Cloud Connection',
icon: 'cloud',
},
],
},
];
/** Manifest bundle the plugin registers so the page + nav reach the kernel. */
export const CLOUD_CONNECTION_UI_BUNDLE = {
id: 'com.objectstack.cloud-connection.ui',
namespace: 'sys',
version: '0.1.0',
type: 'plugin',
scope: 'system',
name: 'Cloud Connection UI',
description: 'Setup page + navigation for binding this runtime to a control plane.',
pages: [CloudConnectionSettingsPage],
navigationContributions: CLOUD_CONNECTION_NAV_CONTRIBUTIONS,
};