@growthub/cli 0.13.6 → 0.13.8
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/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/helper/query/route.js +98 -34
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/metadata-graph/route.js +1 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/swarm-condition/route.js +106 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/components/WorkspaceActivationPanel.jsx +189 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/components/WorkspaceContributionGraph.jsx +119 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/components/WorkspaceHelperSetupModal.jsx +357 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/components/WorkspaceLensPanel.jsx +488 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/components/WorkspaceLensWalkthrough.jsx +69 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/data-model/components/HelperSidecar.jsx +37 -2
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/data-model/components/NangoConnectionPanel.jsx +37 -2
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/globals.css +437 -26
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/workflows/WorkflowSurface.jsx +44 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/workspace-builder.jsx +592 -41
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/workspace-lens/page.jsx +76 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/workspace-rail.jsx +148 -4
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-activation.js +1559 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-data-model.js +3 -3
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-helper-apply.js +24 -8
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-metadata-store.js +82 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/kit.json +8 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/templates/seeded-configs/project-management.config.json +4 -4
- package/dist/index.js +5224 -5225
- package/package.json +1 -1
|
@@ -437,9 +437,8 @@ function deriveManualObjectTable(object, options = {}) {
|
|
|
437
437
|
// Helper-owned hidden objects — system-managed, never surfaced in the
|
|
438
438
|
// user-facing Data Model picker / object list / dynamic title.
|
|
439
439
|
//
|
|
440
|
-
// - `workspace-helper-sandbox` backs the helper
|
|
441
|
-
//
|
|
442
|
-
// interact with it only through the helper Setup tab.
|
|
440
|
+
// - `workspace-helper-sandbox` backs the helper widget sandbox config.
|
|
441
|
+
// Users interact with it through helper setup, not as a business object.
|
|
443
442
|
// - `nav-folders` backs the Custom Folders Navigation module rendered
|
|
444
443
|
// in the workspace rail (between the tab toggles and the Home / Chat
|
|
445
444
|
// body). Users create, rename, drag, and add items entirely from the
|
|
@@ -448,6 +447,7 @@ function deriveManualObjectTable(object, options = {}) {
|
|
|
448
447
|
const HIDDEN_HELPER_OBJECT_IDS = new Set([
|
|
449
448
|
"workspace-helper-sandbox",
|
|
450
449
|
"nav-folders",
|
|
450
|
+
"workspace-ui-cache",
|
|
451
451
|
]);
|
|
452
452
|
|
|
453
453
|
/**
|
|
@@ -216,15 +216,31 @@ function applyProposalToConfig(currentConfig, proposal) {
|
|
|
216
216
|
case "dataModel.object.create": {
|
|
217
217
|
const dm = config.dataModel ? { ...config.dataModel } : {};
|
|
218
218
|
const objects = Array.isArray(dm.objects) ? [...dm.objects] : [];
|
|
219
|
+
const objectPayload = proposal.payload.object && typeof proposal.payload.object === "object"
|
|
220
|
+
? proposal.payload.object
|
|
221
|
+
: proposal.payload;
|
|
222
|
+
const normalizedColumns = Array.isArray(objectPayload.columns)
|
|
223
|
+
? objectPayload.columns.map((column) => typeof column === "string" ? column : column?.id).filter(Boolean)
|
|
224
|
+
: [];
|
|
225
|
+
const columnFieldSettings = Array.isArray(objectPayload.columns)
|
|
226
|
+
? objectPayload.columns.reduce((acc, column) => {
|
|
227
|
+
if (!column || typeof column === "string" || !column.id) return acc;
|
|
228
|
+
const { id, ...settings } = column;
|
|
229
|
+
if (Object.keys(settings).length > 0) acc[id] = settings;
|
|
230
|
+
return acc;
|
|
231
|
+
}, {})
|
|
232
|
+
: {};
|
|
219
233
|
const newObj = {
|
|
220
|
-
id:
|
|
221
|
-
label:
|
|
222
|
-
objectType:
|
|
223
|
-
columns:
|
|
224
|
-
rows: [],
|
|
225
|
-
binding:
|
|
226
|
-
...(
|
|
227
|
-
...(
|
|
234
|
+
id: objectPayload.id || `obj-${Date.now().toString(36)}`,
|
|
235
|
+
label: objectPayload.label || "Untitled Object",
|
|
236
|
+
objectType: objectPayload.objectType || "custom",
|
|
237
|
+
columns: normalizedColumns,
|
|
238
|
+
rows: Array.isArray(objectPayload.rows) ? objectPayload.rows : [],
|
|
239
|
+
binding: objectPayload.binding || { mode: "manual", source: "Data Model" },
|
|
240
|
+
...(objectPayload.relations ? { relations: objectPayload.relations } : {}),
|
|
241
|
+
...((objectPayload.fieldSettings || Object.keys(columnFieldSettings).length > 0)
|
|
242
|
+
? { fieldSettings: { ...columnFieldSettings, ...(objectPayload.fieldSettings || {}) } }
|
|
243
|
+
: {}),
|
|
228
244
|
};
|
|
229
245
|
dm.objects = [...objects, newObj];
|
|
230
246
|
config.dataModel = dm;
|
|
@@ -941,6 +941,83 @@ function deriveWorkspaceWorkflowActionMetadataItems(workflowNodeItems) {
|
|
|
941
941
|
return { items, warnings: [] };
|
|
942
942
|
}
|
|
943
943
|
|
|
944
|
+
/**
|
|
945
|
+
* Workspace PROVENANCE metadata.
|
|
946
|
+
*
|
|
947
|
+
* Surfaces the `provenance` block of a seeded workspace template (e.g.
|
|
948
|
+
* the Project Management seed) as safe booleans + strings so the customer
|
|
949
|
+
* activation layer can derive setup state without re-parsing the config.
|
|
950
|
+
* The block intentionally only echoes non-secret descriptors:
|
|
951
|
+
*
|
|
952
|
+
* - template slug (e.g. "project-management")
|
|
953
|
+
* - template kind (e.g. "workspace-template")
|
|
954
|
+
* - privacy descriptor (e.g. "sanitized-no-secrets-no-provider-data")
|
|
955
|
+
* - booleans: has provider api-registry row, has any configured
|
|
956
|
+
* connectionId, has any persisted source records, has at least one
|
|
957
|
+
* seeded workflow row, has at least one seeded dashboard.
|
|
958
|
+
*
|
|
959
|
+
* Returns a single-item list so the metadata store can stay shape-stable
|
|
960
|
+
* even when no provenance block exists.
|
|
961
|
+
*/
|
|
962
|
+
function deriveWorkspaceProvenanceMetadataItems(workspaceConfig, workspaceSourceRecords) {
|
|
963
|
+
const safeConfig = isPlainObject(workspaceConfig) ? workspaceConfig : {};
|
|
964
|
+
const provenance = isPlainObject(safeConfig.provenance) ? safeConfig.provenance : null;
|
|
965
|
+
const objects = Array.isArray(safeConfig.dataModel?.objects) ? safeConfig.dataModel.objects : [];
|
|
966
|
+
let apiRegistryRows = 0;
|
|
967
|
+
let nangoRows = 0;
|
|
968
|
+
let connectionsConfigured = 0;
|
|
969
|
+
let sandboxRows = 0;
|
|
970
|
+
for (const object of objects) {
|
|
971
|
+
if (!isPlainObject(object)) continue;
|
|
972
|
+
const rows = Array.isArray(object.rows) ? object.rows : [];
|
|
973
|
+
if (object.objectType === "api-registry") {
|
|
974
|
+
apiRegistryRows += rows.length;
|
|
975
|
+
for (const row of rows) {
|
|
976
|
+
if (!isPlainObject(row)) continue;
|
|
977
|
+
if (safeString(row.connectorKind).trim().toLowerCase() === "nango") nangoRows += 1;
|
|
978
|
+
const raw = row.connectionIds ?? row.connectionId;
|
|
979
|
+
if (Array.isArray(raw)) {
|
|
980
|
+
if (raw.some((entry) => safeString(entry).trim())) connectionsConfigured += 1;
|
|
981
|
+
} else if (safeString(raw).trim()) {
|
|
982
|
+
connectionsConfigured += 1;
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
if (object.objectType === "sandbox-environment") {
|
|
987
|
+
sandboxRows += rows.length;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
let sourceRecordKeys = 0;
|
|
991
|
+
if (isPlainObject(workspaceSourceRecords)) {
|
|
992
|
+
for (const value of Object.values(workspaceSourceRecords)) {
|
|
993
|
+
if (!isPlainObject(value)) continue;
|
|
994
|
+
const count = Number.isFinite(value.recordCount)
|
|
995
|
+
? Number(value.recordCount)
|
|
996
|
+
: Array.isArray(value.records) ? value.records.length : 0;
|
|
997
|
+
if (count > 0) sourceRecordKeys += 1;
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
return {
|
|
1001
|
+
items: [{
|
|
1002
|
+
kind: "workspaceProvenance",
|
|
1003
|
+
id: safeString(provenance?.template).trim() || "blank",
|
|
1004
|
+
metadataId: stableId("provenance", safeString(provenance?.template).trim() || "blank"),
|
|
1005
|
+
template: safeString(provenance?.template).trim() || "blank",
|
|
1006
|
+
templateKind: safeString(provenance?.templateKind).trim(),
|
|
1007
|
+
privacy: safeString(provenance?.privacy).trim(),
|
|
1008
|
+
mirrors: safeString(provenance?.mirrors).trim(),
|
|
1009
|
+
hasProvenance: Boolean(provenance),
|
|
1010
|
+
apiRegistryRows,
|
|
1011
|
+
nangoRows,
|
|
1012
|
+
connectionsConfigured,
|
|
1013
|
+
sandboxRows,
|
|
1014
|
+
hydratedSourceRecordKeys: sourceRecordKeys,
|
|
1015
|
+
hasSeededDashboard: Array.isArray(safeConfig.dashboards) && safeConfig.dashboards.length > 0
|
|
1016
|
+
}],
|
|
1017
|
+
warnings: []
|
|
1018
|
+
};
|
|
1019
|
+
}
|
|
1020
|
+
|
|
944
1021
|
/**
|
|
945
1022
|
* Worker kit metadata.
|
|
946
1023
|
*
|
|
@@ -1073,6 +1150,9 @@ function buildWorkspaceMetadataStore({
|
|
|
1073
1150
|
const workerKits = deriveWorkspaceWorkerKitMetadataItems(safeConfig);
|
|
1074
1151
|
warnings.push(...workerKits.warnings);
|
|
1075
1152
|
|
|
1153
|
+
const provenance = deriveWorkspaceProvenanceMetadataItems(safeConfig, safeSourceRecords);
|
|
1154
|
+
warnings.push(...provenance.warnings);
|
|
1155
|
+
|
|
1076
1156
|
const pipelineHealth = deriveWorkspacePipelineHealthMetadataItems(sandboxes.items, runs.items);
|
|
1077
1157
|
warnings.push(...pipelineHealth.warnings);
|
|
1078
1158
|
|
|
@@ -1098,6 +1178,7 @@ function buildWorkspaceMetadataStore({
|
|
|
1098
1178
|
runs: runs.items,
|
|
1099
1179
|
outputArtifacts: runs.outputArtifacts,
|
|
1100
1180
|
workerKits: workerKits.items,
|
|
1181
|
+
provenance: provenance.items,
|
|
1101
1182
|
pipelineHealth: pipelineHealth.items,
|
|
1102
1183
|
warnings
|
|
1103
1184
|
};
|
|
@@ -1181,6 +1262,7 @@ export {
|
|
|
1181
1262
|
deriveWorkspaceRunRecordMetadataItems,
|
|
1182
1263
|
deriveWorkspaceRunMetadataItems,
|
|
1183
1264
|
deriveWorkspaceWorkerKitMetadataItems,
|
|
1265
|
+
deriveWorkspaceProvenanceMetadataItems,
|
|
1184
1266
|
deriveWorkspacePipelineHealthMetadataItems,
|
|
1185
1267
|
isSecretKey
|
|
1186
1268
|
};
|
|
@@ -81,6 +81,13 @@
|
|
|
81
81
|
"apps/workspace/app/page.jsx",
|
|
82
82
|
"apps/workspace/app/globals.css",
|
|
83
83
|
"apps/workspace/app/workspace-builder.jsx",
|
|
84
|
+
"apps/workspace/app/workspace-rail.jsx",
|
|
85
|
+
"apps/workspace/app/components/WorkspaceActivationPanel.jsx",
|
|
86
|
+
"apps/workspace/app/components/WorkspaceLensPanel.jsx",
|
|
87
|
+
"apps/workspace/app/components/WorkspaceContributionGraph.jsx",
|
|
88
|
+
"apps/workspace/app/components/WorkspaceLensWalkthrough.jsx",
|
|
89
|
+
"apps/workspace/app/workspace-lens/page.jsx",
|
|
90
|
+
"apps/workspace/lib/workspace-activation.js",
|
|
84
91
|
"apps/workspace/app/settings/integrations/page.jsx",
|
|
85
92
|
"apps/workspace/app/api/workspace/route.js",
|
|
86
93
|
"apps/workspace/app/api/workspace/refresh-sources/route.js",
|
|
@@ -100,6 +107,7 @@
|
|
|
100
107
|
"apps/workspace/lib/workspace-metadata-graph.js",
|
|
101
108
|
"apps/workspace/lib/workspace-metadata-selectors.js",
|
|
102
109
|
"apps/workspace/app/api/workspace/metadata-graph/route.js",
|
|
110
|
+
"apps/workspace/app/api/workspace/swarm-condition/route.js",
|
|
103
111
|
"apps/workspace/app/data-model/components/WorkspaceGraphInspectorPanel.jsx",
|
|
104
112
|
"apps/workspace/lib/sandbox-agent-auth.js",
|
|
105
113
|
"apps/workspace/lib/sandbox-agent-auth-eligibility.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"nangoMode",
|
|
32
32
|
"nangoEnvironment"
|
|
33
33
|
],
|
|
34
|
-
"
|
|
34
|
+
"rows": [
|
|
35
35
|
{
|
|
36
36
|
"integrationId": "asana-active-tasks",
|
|
37
37
|
"authRef": "NANGO_SECRET_KEY",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"entityType",
|
|
87
87
|
"description"
|
|
88
88
|
],
|
|
89
|
-
"
|
|
89
|
+
"rows": [
|
|
90
90
|
{
|
|
91
91
|
"Name": "Active project tasks",
|
|
92
92
|
"registryId": "asana-active-tasks",
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"orchestrationConfig",
|
|
147
147
|
"description"
|
|
148
148
|
],
|
|
149
|
-
"
|
|
149
|
+
"rows": [
|
|
150
150
|
{
|
|
151
151
|
"Name": "project-active-tasks-workflow",
|
|
152
152
|
"lifecycleStatus": "draft",
|
|
@@ -194,7 +194,7 @@
|
|
|
194
194
|
"tabs": [
|
|
195
195
|
{
|
|
196
196
|
"id": "tab-project-tasks",
|
|
197
|
-
"
|
|
197
|
+
"name": "Active Tasks",
|
|
198
198
|
"widgets": [
|
|
199
199
|
{
|
|
200
200
|
"id": "project-active-tasks-view",
|