@growthub/cli 0.13.2 → 0.13.5
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/metadata-graph/route.js +184 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/refresh-sources/route.js +24 -2
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/route.js +14 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/sandbox-agent-auth/login/route.js +74 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/sandbox-agent-auth/logout/route.js +67 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/sandbox-agent-auth/status/route.js +77 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/sandbox-run/route.js +72 -4
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/data-model/components/AgentSwarmPanel.jsx +326 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/data-model/components/DataModelShell.jsx +123 -27
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/data-model/components/OrchestrationGraphEmptyCanvas.jsx +6 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/data-model/components/OrchestrationNodeConfigPanel.jsx +224 -1
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/data-model/components/OrchestrationRunTracePanel.jsx +754 -92
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/data-model/components/SandboxAgentAuthPanel.jsx +224 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/data-model/components/SandboxRunPanel.jsx +32 -1
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/data-model/components/WorkspaceGraphInspectorPanel.jsx +226 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/globals.css +530 -9
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/page.jsx +8 -1
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/settings/integrations/page.jsx +10 -7
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/workflows/RunSetupPanel.jsx +261 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/workflows/WorkflowSurface.jsx +119 -9
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/workspace-builder.jsx +779 -138
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/workspace-rail.jsx +91 -14
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/docs/sandbox-environment-primitive.md +35 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/orchestration-agent-swarm.js +923 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/orchestration-graph-runner.js +28 -3
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/orchestration-graph.js +216 -5
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/orchestration-run-console.js +412 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/orchestration-run-inputs.js +366 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/orchestration-run-trace.js +34 -3
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/sandbox-agent-auth-eligibility.js +50 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/sandbox-agent-auth-redaction.js +64 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/sandbox-agent-auth.js +665 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/sandbox-agent-host-catalog.js +168 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-chart-values.js +595 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-data-model.js +164 -7
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-helper.js +11 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-metadata-graph.js +646 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-metadata-selectors.js +249 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-metadata-store.js +1186 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-schema.js +111 -1
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/kit.json +14 -0
- package/package.json +1 -1
|
@@ -46,7 +46,25 @@ const KNOWN_CHART_TYPES = ["bar-vertical", "bar-horizontal", "line", "pie", "sum
|
|
|
46
46
|
const KNOWN_FILTER_OPERATORS = ["eq", "ne", "contains", "gt", "lt", "isEmpty", "isNotEmpty"];
|
|
47
47
|
const KNOWN_FILTER_CONJUNCTIONS = ["and", "or"];
|
|
48
48
|
const KNOWN_SORT_DIRECTIONS = ["asc", "desc"];
|
|
49
|
-
|
|
49
|
+
// Aggregation vocabulary kept in sync with `lib/workspace-chart-values.js`.
|
|
50
|
+
// V1 charts use the first five; the Twenty-style row-presence operations
|
|
51
|
+
// (countAll/countEmpty/countNotEmpty/countUnique, percentEmpty/percentNotEmpty)
|
|
52
|
+
// are valid both as `yAxis.aggregation` (legacy key) and `yAxis.operation`
|
|
53
|
+
// (preferred key going forward). The validator accepts both for back-compat.
|
|
54
|
+
const KNOWN_AGGREGATIONS = [
|
|
55
|
+
"sum",
|
|
56
|
+
"avg",
|
|
57
|
+
"count",
|
|
58
|
+
"countAll",
|
|
59
|
+
"countEmpty",
|
|
60
|
+
"countNotEmpty",
|
|
61
|
+
"countUnique",
|
|
62
|
+
"percentEmpty",
|
|
63
|
+
"percentNotEmpty",
|
|
64
|
+
"min",
|
|
65
|
+
"max"
|
|
66
|
+
];
|
|
67
|
+
const KNOWN_DATE_GRANULARITIES = ["day", "week", "month", "quarter", "year"];
|
|
50
68
|
const KNOWN_SANDBOX_RUNTIMES = ["python", "node", "bash"];
|
|
51
69
|
/** Where execution is delegated: locally (process / agent-host CLI) or to a scheduler webhook (Supabase Edge, QStash, Vercel cron hitting your URL, etc.). */
|
|
52
70
|
const KNOWN_SANDBOX_RUN_LOCALITY = ["local", "serverless"];
|
|
@@ -612,12 +630,26 @@ function validateChartAxis(axis, path, errors) {
|
|
|
612
630
|
if (axis.aggregation !== undefined && !KNOWN_AGGREGATIONS.includes(axis.aggregation)) {
|
|
613
631
|
errors.push(`${path}.aggregation must be one of ${KNOWN_AGGREGATIONS.join(", ")}`);
|
|
614
632
|
}
|
|
633
|
+
// `operation` is the Twenty-style preferred key; accepted in addition to
|
|
634
|
+
// `aggregation` so older configs round-trip cleanly.
|
|
635
|
+
if (axis.operation !== undefined && !KNOWN_AGGREGATIONS.includes(axis.operation)) {
|
|
636
|
+
errors.push(`${path}.operation must be one of ${KNOWN_AGGREGATIONS.join(", ")}`);
|
|
637
|
+
}
|
|
615
638
|
if (axis.groupBy !== undefined && typeof axis.groupBy !== "string") {
|
|
616
639
|
errors.push(`${path}.groupBy must be a string`);
|
|
617
640
|
}
|
|
618
641
|
if (axis.omitZero !== undefined && typeof axis.omitZero !== "boolean") {
|
|
619
642
|
errors.push(`${path}.omitZero must be a boolean`);
|
|
620
643
|
}
|
|
644
|
+
if (axis.cumulative !== undefined && typeof axis.cumulative !== "boolean") {
|
|
645
|
+
errors.push(`${path}.cumulative must be a boolean`);
|
|
646
|
+
}
|
|
647
|
+
if (axis.splitMultiValueFields !== undefined && typeof axis.splitMultiValueFields !== "boolean") {
|
|
648
|
+
errors.push(`${path}.splitMultiValueFields must be a boolean`);
|
|
649
|
+
}
|
|
650
|
+
if (axis.dateGranularity !== undefined && !KNOWN_DATE_GRANULARITIES.includes(axis.dateGranularity)) {
|
|
651
|
+
errors.push(`${path}.dateGranularity must be one of ${KNOWN_DATE_GRANULARITIES.join(", ")}`);
|
|
652
|
+
}
|
|
621
653
|
if (axis.min !== undefined && typeof axis.min !== "string" && typeof axis.min !== "number") {
|
|
622
654
|
errors.push(`${path}.min must be a string or number`);
|
|
623
655
|
}
|
|
@@ -635,12 +667,33 @@ function validateChartStyle(style, path, errors) {
|
|
|
635
667
|
if (style.colors !== undefined && typeof style.colors !== "string") {
|
|
636
668
|
errors.push(`${path}.colors must be a string`);
|
|
637
669
|
}
|
|
670
|
+
if (style.manualColor !== undefined && typeof style.manualColor !== "string") {
|
|
671
|
+
errors.push(`${path}.manualColor must be a string`);
|
|
672
|
+
}
|
|
638
673
|
if (style.axisName !== undefined && typeof style.axisName !== "string") {
|
|
639
674
|
errors.push(`${path}.axisName must be a string`);
|
|
640
675
|
}
|
|
641
676
|
if (style.dataLabels !== undefined && typeof style.dataLabels !== "boolean") {
|
|
642
677
|
errors.push(`${path}.dataLabels must be a boolean`);
|
|
643
678
|
}
|
|
679
|
+
if (style.legend !== undefined && typeof style.legend !== "boolean") {
|
|
680
|
+
errors.push(`${path}.legend must be a boolean`);
|
|
681
|
+
}
|
|
682
|
+
if (style.stacked !== undefined && typeof style.stacked !== "boolean") {
|
|
683
|
+
errors.push(`${path}.stacked must be a boolean`);
|
|
684
|
+
}
|
|
685
|
+
if (style.compact !== undefined && typeof style.compact !== "boolean") {
|
|
686
|
+
errors.push(`${path}.compact must be a boolean`);
|
|
687
|
+
}
|
|
688
|
+
if (style.prefix !== undefined && typeof style.prefix !== "string") {
|
|
689
|
+
errors.push(`${path}.prefix must be a string`);
|
|
690
|
+
}
|
|
691
|
+
if (style.suffix !== undefined && typeof style.suffix !== "string") {
|
|
692
|
+
errors.push(`${path}.suffix must be a string`);
|
|
693
|
+
}
|
|
694
|
+
if (style.centerValue !== undefined && typeof style.centerValue !== "string") {
|
|
695
|
+
errors.push(`${path}.centerValue must be a string`);
|
|
696
|
+
}
|
|
644
697
|
}
|
|
645
698
|
|
|
646
699
|
function validateWidgetConfig(kind, config, path, errors) {
|
|
@@ -1003,6 +1056,63 @@ function validateSandboxEnvironmentRow(row, path, errors) {
|
|
|
1003
1056
|
errors.push(`${path}.${traceField} must be a string when present`);
|
|
1004
1057
|
}
|
|
1005
1058
|
}
|
|
1059
|
+
// Sandbox Local Agent Auth Onboarding V1 — governance for the safe auth
|
|
1060
|
+
// metadata fields stamped by the auth helper / API routes.
|
|
1061
|
+
const KNOWN_AGENT_AUTH_STATUSES_INLINE = [
|
|
1062
|
+
"active",
|
|
1063
|
+
"reachable",
|
|
1064
|
+
"stale",
|
|
1065
|
+
"missing",
|
|
1066
|
+
"checking",
|
|
1067
|
+
"unknown"
|
|
1068
|
+
];
|
|
1069
|
+
if (row.agentAuthStatus !== undefined && row.agentAuthStatus !== "" && row.agentAuthStatus !== null) {
|
|
1070
|
+
const authStatus = String(row.agentAuthStatus).trim().toLowerCase();
|
|
1071
|
+
if (!KNOWN_AGENT_AUTH_STATUSES_INLINE.includes(authStatus)) {
|
|
1072
|
+
errors.push(`${path}.agentAuthStatus must be one of ${KNOWN_AGENT_AUTH_STATUSES_INLINE.join(", ")}`);
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
for (const authField of [
|
|
1076
|
+
"agentAuthProvider",
|
|
1077
|
+
"agentAuthLastChecked",
|
|
1078
|
+
"agentAuthLastMessage",
|
|
1079
|
+
"agentAuthLastLoginUrl"
|
|
1080
|
+
]) {
|
|
1081
|
+
const value = row[authField];
|
|
1082
|
+
if (value !== undefined && value !== null && value !== "" && typeof value !== "string") {
|
|
1083
|
+
errors.push(`${path}.${authField} must be a string when present`);
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
if (
|
|
1087
|
+
row.agentAuthLastExitCode !== undefined
|
|
1088
|
+
&& row.agentAuthLastExitCode !== null
|
|
1089
|
+
&& row.agentAuthLastExitCode !== ""
|
|
1090
|
+
) {
|
|
1091
|
+
const code = Number(row.agentAuthLastExitCode);
|
|
1092
|
+
if (!Number.isFinite(code)) {
|
|
1093
|
+
errors.push(`${path}.agentAuthLastExitCode must be a finite number when present`);
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
// Defensive: refuse to ever persist token-shaped field names on a sandbox
|
|
1097
|
+
// row. The helper only writes the SAFE_ROW_PATCH_FIELDS whitelist, but
|
|
1098
|
+
// this guard catches any out-of-band PATCH that tries to stash a secret.
|
|
1099
|
+
const FORBIDDEN_AUTH_ROW_FIELDS = [
|
|
1100
|
+
"token",
|
|
1101
|
+
"apiKey",
|
|
1102
|
+
"authToken",
|
|
1103
|
+
"accessToken",
|
|
1104
|
+
"refreshToken",
|
|
1105
|
+
"bearer",
|
|
1106
|
+
"password",
|
|
1107
|
+
"secret",
|
|
1108
|
+
"sessionKey",
|
|
1109
|
+
"claudeToken"
|
|
1110
|
+
];
|
|
1111
|
+
for (const forbidden of FORBIDDEN_AUTH_ROW_FIELDS) {
|
|
1112
|
+
if (Object.prototype.hasOwnProperty.call(row, forbidden)) {
|
|
1113
|
+
errors.push(`${path}.${forbidden} is not allowed on a sandbox row — auth secrets must stay in the local CLI's own store`);
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1006
1116
|
}
|
|
1007
1117
|
|
|
1008
1118
|
const NAV_FOLDERS_OBJECT_ID = "nav-folders";
|
|
@@ -88,9 +88,22 @@
|
|
|
88
88
|
"apps/workspace/app/api/workspace/resolvers/route.js",
|
|
89
89
|
"apps/workspace/app/api/workspace/sandbox-adapters/route.js",
|
|
90
90
|
"apps/workspace/app/api/workspace/sandbox-run/route.js",
|
|
91
|
+
"apps/workspace/app/api/workspace/sandbox-agent-auth/status/route.js",
|
|
92
|
+
"apps/workspace/app/api/workspace/sandbox-agent-auth/login/route.js",
|
|
93
|
+
"apps/workspace/app/api/workspace/sandbox-agent-auth/logout/route.js",
|
|
91
94
|
"apps/workspace/app/api/settings/integrations/route.js",
|
|
92
95
|
"apps/workspace/lib/workspace-schema.js",
|
|
93
96
|
"apps/workspace/lib/workspace-config.js",
|
|
97
|
+
"apps/workspace/lib/workspace-chart-values.js",
|
|
98
|
+
"apps/workspace/lib/workspace-metadata-store.js",
|
|
99
|
+
"apps/workspace/lib/workspace-metadata-graph.js",
|
|
100
|
+
"apps/workspace/lib/workspace-metadata-selectors.js",
|
|
101
|
+
"apps/workspace/app/api/workspace/metadata-graph/route.js",
|
|
102
|
+
"apps/workspace/app/data-model/components/WorkspaceGraphInspectorPanel.jsx",
|
|
103
|
+
"apps/workspace/lib/sandbox-agent-auth.js",
|
|
104
|
+
"apps/workspace/lib/sandbox-agent-auth-eligibility.js",
|
|
105
|
+
"apps/workspace/lib/sandbox-agent-auth-redaction.js",
|
|
106
|
+
"apps/workspace/lib/sandbox-agent-host-catalog.js",
|
|
94
107
|
"apps/workspace/lib/domain/portal.js",
|
|
95
108
|
"apps/workspace/lib/domain/integrations.js",
|
|
96
109
|
"apps/workspace/lib/adapters/env.js",
|
|
@@ -115,6 +128,7 @@
|
|
|
115
128
|
"apps/workspace/app/data-model/page.jsx",
|
|
116
129
|
"apps/workspace/app/data-model/components/DataModelShell.jsx",
|
|
117
130
|
"apps/workspace/app/data-model/components/HelperSidecar.jsx",
|
|
131
|
+
"apps/workspace/app/data-model/components/SandboxAgentAuthPanel.jsx",
|
|
118
132
|
"apps/workspace/app/views/[viewId]/page.jsx",
|
|
119
133
|
"apps/workspace/lib/adapters/payments/index.js",
|
|
120
134
|
"apps/workspace/lib/adapters/persistence/index.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@growthub/cli",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.5",
|
|
4
4
|
"description": "CLI control plane for Growthub Local and Agent Workspace as Code: export, fork, inspect, operate, sync, and optionally activate governed AI workspaces.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|