@growthub/cli 0.14.10 → 0.14.11
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/add-ons/[providerId]/callback/route.js +35 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/add-ons/[providerId]/failure/route.js +35 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/add-ons/[providerId]/schedule/route.js +423 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/add-ons/providers/[providerId]/connect/route.js +78 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/add-ons/providers/[providerId]/credentials/route.js +276 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/add-ons/providers/[providerId]/products/[productId]/resources/route.js +173 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/add-ons/providers/[providerId]/products/sync/route.js +347 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/add-ons/providers/[providerId]/sync/route.js +293 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/add-ons/upstash/provider/connect/route.js +7 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/add-ons/upstash/provider/sync/route.js +7 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/add-ons/upstash/sync/route.js +197 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/apps/route.js +1 -1
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/metadata-graph/route.js +1 -49
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/sandbox-run/route.js +3 -20
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/test-api-record/route.js +3 -20
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/workflow/publish/route.js +407 -290
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/api/workspace/workflows/[providerId]/route.js +209 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/components/WorkspaceAddOnsMarketplace.jsx +806 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/data-model/components/ApiRegistryActionCard.jsx +141 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/data-model/components/CeoCockpit.jsx +15 -3
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/data-model/components/HelperSidecar.jsx +42 -5
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/data-model/components/OrchestrationGraphCanvas.jsx +5 -1
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/data-model/components/OrchestrationNodeConfigPanel.jsx +86 -20
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/data-model/components/ScheduleCockpit.jsx +363 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/data-model/components/helper-commands.js +8 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/globals.css +322 -1
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/page.jsx +2 -2
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/settings/add-ons/add-ons-client.jsx +197 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/settings/add-ons/page.jsx +23 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/settings/settings-shell.jsx +1 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/workflows/WorkflowSurface.jsx +734 -61
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/app/workspace-rail.jsx +15 -10
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/env-status.js +2 -7
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/orchestration-graph-runner.js +2 -19
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/sandbox-serverless-flow.js +8 -4
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/schedule-cockpit-console.js +287 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/scheduler-orchestration.js +449 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/server-secrets.js +77 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/serverless-readiness.js +583 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-add-on-callback.js +63 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-add-on-scheduler.js +519 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-add-ons.js +957 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-config.js +607 -63
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-data-model.js +21 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/lib/workspace-operator-auth.js +32 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/public/integrations/upstash/provider.png +0 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/public/integrations/upstash/qstash.png +0 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/public/integrations/upstash/redis.png +0 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/public/integrations/upstash/search.png +0 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/public/integrations/upstash/vector.png +0 -0
- package/assets/worker-kits/growthub-custom-workspace-starter-v1/apps/workspace/scripts/scheduler-ingress-smoke.mjs +26 -0
- package/package.json +1 -1
|
@@ -895,6 +895,27 @@ const OBJECT_TYPE_PRESETS = {
|
|
|
895
895
|
"version",
|
|
896
896
|
"runLocality",
|
|
897
897
|
"schedulerRegistryId",
|
|
898
|
+
"schedulerProviderId",
|
|
899
|
+
"schedulerProductId",
|
|
900
|
+
"schedulerRegion",
|
|
901
|
+
"scheduleId",
|
|
902
|
+
"schedulerCron",
|
|
903
|
+
"schedulerTriggerInput",
|
|
904
|
+
"schedulerDestination",
|
|
905
|
+
"schedulerCallbackUrl",
|
|
906
|
+
"schedulerFailureCallbackUrl",
|
|
907
|
+
"schedulerInstalledAt",
|
|
908
|
+
"schedulerPaused",
|
|
909
|
+
"schedulerPausedAt",
|
|
910
|
+
"schedulerResumedAt",
|
|
911
|
+
"lastScheduledRunStatus",
|
|
912
|
+
"lastScheduledRunMessageId",
|
|
913
|
+
"lastScheduledRunAttemptedAt",
|
|
914
|
+
"lastScheduledRunSucceededAt",
|
|
915
|
+
"lastScheduledRunFailedAt",
|
|
916
|
+
"lastScheduledRunFailureReason",
|
|
917
|
+
"lastScheduledRunBodyPreview",
|
|
918
|
+
"lastScheduledRunRetries",
|
|
898
919
|
"runtime",
|
|
899
920
|
"adapter",
|
|
900
921
|
"agentHost",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mutation access boundary — single hook for operator/admin authorization on
|
|
3
|
+
* high-impact governed workspace mutations (schedule install/uninstall, provider
|
|
4
|
+
* sync, product sync). These routes can spend provider credentials, create/delete
|
|
5
|
+
* remote infrastructure, and mutate workspace config, so they must sit behind the
|
|
6
|
+
* SAME boundary as any governed write.
|
|
7
|
+
*
|
|
8
|
+
* In the open-source starter kit this is intentionally a NO-OP: the kit is
|
|
9
|
+
* local/dev-only unless the host application wraps these routes. Hosted
|
|
10
|
+
* deployments (e.g. Agency Portal / private) replace this with a real check —
|
|
11
|
+
* session/role, the same middleware that guards `/api/workspace`, or an app-scope
|
|
12
|
+
* gate — WITHOUT changing any route: every mutation route calls this one function.
|
|
13
|
+
*
|
|
14
|
+
* Returns { ok: true } when allowed, or { ok: false, status, error } to reject.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
function requireWorkspaceOperator(_request) {
|
|
18
|
+
// Starter kit: no built-in auth. Host app is responsible for protecting these
|
|
19
|
+
// routes (reverse proxy, middleware, or platform auth). Set
|
|
20
|
+
// GROWTHUB_REQUIRE_OPERATOR_AUTH=true with no provider configured to hard-block
|
|
21
|
+
// mutations on an unprotected public deployment.
|
|
22
|
+
if (String(process.env.GROWTHUB_REQUIRE_OPERATOR_AUTH || "").trim() === "true") {
|
|
23
|
+
return {
|
|
24
|
+
ok: false,
|
|
25
|
+
status: 403,
|
|
26
|
+
error: "operator authorization required but no operator auth provider is configured for this deployment",
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return { ok: true };
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { requireWorkspaceOperator };
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const baseUrl = (process.argv[2] || "http://localhost:3000").replace(/\/+$/, "");
|
|
4
|
+
|
|
5
|
+
const routes = [
|
|
6
|
+
"/api/workspace/workflows/upstash",
|
|
7
|
+
"/api/workspace/add-ons/upstash/callback",
|
|
8
|
+
"/api/workspace/add-ons/upstash/failure",
|
|
9
|
+
];
|
|
10
|
+
|
|
11
|
+
const methods = ["HEAD", "OPTIONS"];
|
|
12
|
+
|
|
13
|
+
let failed = false;
|
|
14
|
+
|
|
15
|
+
for (const route of routes) {
|
|
16
|
+
for (const method of methods) {
|
|
17
|
+
const response = await fetch(`${baseUrl}${route}`, { method, redirect: "manual" });
|
|
18
|
+
const ok = method === "HEAD"
|
|
19
|
+
? response.status === 200
|
|
20
|
+
: response.status === 204 && String(response.headers.get("allow") || "").includes("POST");
|
|
21
|
+
console.log(`${method} ${route} -> ${response.status}${ok ? "" : " FAIL"}`);
|
|
22
|
+
if (!ok) failed = true;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (failed) process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@growthub/cli",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.11",
|
|
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": {
|