@supacloud/cli 0.87.1 → 0.90.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.
- package/README.md +45 -15
- package/dist/index.js +584 -93
- package/dist/shared/tools/app-tools.d.ts +2 -0
- package/dist/shared/tools/application-schemas.d.ts +42 -5
- package/dist/shared/tools/application-tools.d.ts +8 -1
- package/dist/shared/tools/developer-experience-tools.d.ts +26 -0
- package/dist/shared/tools/developer-experience-tools.test.d.ts +1 -0
- package/package.json +7 -7
- package/skills/supacloud/references/command-map.md +4 -4
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ApplicationDeployRequest } from "@supacloud/delivery";
|
|
1
2
|
import { type ToolServer } from "../tool-server";
|
|
2
3
|
import { type AppManifest } from "./app-tool-export";
|
|
3
4
|
declare const REMOTE_APP_ACTIONS: {
|
|
@@ -53,6 +54,7 @@ export interface AppToolArguments {
|
|
|
53
54
|
source_environment_id?: string;
|
|
54
55
|
mutation_id?: string;
|
|
55
56
|
approved_migration_digest?: string;
|
|
57
|
+
web?: ApplicationDeployRequest["web"];
|
|
56
58
|
branch_ref?: string;
|
|
57
59
|
branch_name?: string;
|
|
58
60
|
data_mode?: "schema_only" | "full_clone";
|
|
@@ -152,7 +152,8 @@ export declare const ApplicationPromotionPlanSchema: import("typebox").TObject<{
|
|
|
152
152
|
execution_performed: import("typebox").TLiteral<false>;
|
|
153
153
|
data_recovery: import("typebox").TLiteral<"separate-required">;
|
|
154
154
|
}>;
|
|
155
|
-
export declare const
|
|
155
|
+
export declare const ApplicationDeployRequestSchema: import("typebox").TObject<{
|
|
156
|
+
mutation_id: import("typebox").TString;
|
|
156
157
|
release_id: import("typebox").TString;
|
|
157
158
|
configuration_id: import("typebox").TOptional<import("typebox").TString>;
|
|
158
159
|
configuration_write: import("typebox").TOptional<import("typebox").TObject<{
|
|
@@ -168,15 +169,22 @@ export declare const ApplicationReleaseRequestSchema: import("typebox").TObject<
|
|
|
168
169
|
}>>;
|
|
169
170
|
}>;
|
|
170
171
|
}>>;
|
|
171
|
-
activation_id: import("typebox").TOptional<import("typebox").TString>;
|
|
172
|
-
expected_activation_id: import("typebox").TOptional<import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>>;
|
|
173
172
|
expected_plan_sha256: import("typebox").TOptional<import("typebox").TString>;
|
|
173
|
+
approved_migration_digest: import("typebox").TOptional<import("typebox").TString>;
|
|
174
|
+
web: import("typebox").TOptional<import("typebox").TObject<{
|
|
175
|
+
deployment_id: import("typebox").TString;
|
|
176
|
+
release_id: import("typebox").TString;
|
|
177
|
+
expected_active_release_id: import("typebox").TString;
|
|
178
|
+
expected_activation_id: import("typebox").TString;
|
|
179
|
+
mutation_id: import("typebox").TString;
|
|
180
|
+
}>>;
|
|
174
181
|
}>;
|
|
175
|
-
export declare const
|
|
176
|
-
schema: import("typebox").TLiteral<"supacloud.application-
|
|
182
|
+
export declare const ApplicationDeployResultSchema: import("typebox").TObject<{
|
|
183
|
+
schema: import("typebox").TLiteral<"supacloud.application-deploy.v1">;
|
|
177
184
|
project_ref: import("typebox").TString;
|
|
178
185
|
application_id: import("typebox").TString;
|
|
179
186
|
environment_id: import("typebox").TString;
|
|
187
|
+
mutation_id: import("typebox").TString;
|
|
180
188
|
release_id: import("typebox").TString;
|
|
181
189
|
configuration_id: import("typebox").TString;
|
|
182
190
|
activation_id: import("typebox").TString;
|
|
@@ -185,4 +193,33 @@ export declare const ApplicationReleaseResultSchema: import("typebox").TObject<{
|
|
|
185
193
|
action: import("typebox").TUnion<[import("typebox").TLiteral<"activate">, import("typebox").TLiteral<"no-op">]>;
|
|
186
194
|
replayed: import("typebox").TBoolean;
|
|
187
195
|
execution_performed: import("typebox").TBoolean;
|
|
196
|
+
backend_receipt: import("typebox").TObject<{
|
|
197
|
+
schema: import("typebox").TLiteral<"supacloud.application-backend-receipt.v1">;
|
|
198
|
+
project_ref: import("typebox").TString;
|
|
199
|
+
application_id: import("typebox").TString;
|
|
200
|
+
environment_id: import("typebox").TString;
|
|
201
|
+
release_id: import("typebox").TString;
|
|
202
|
+
manifest_sha256: import("typebox").TString;
|
|
203
|
+
mutation_id: import("typebox").TString;
|
|
204
|
+
plan_sha256: import("typebox").TString;
|
|
205
|
+
backup_id: import("typebox").TUnion<[import("typebox").TString, import("typebox").TNull]>;
|
|
206
|
+
before_ledger_digest: import("typebox").TString;
|
|
207
|
+
after_ledger_digest: import("typebox").TString;
|
|
208
|
+
applied_versions: import("typebox").TArray<import("typebox").TString>;
|
|
209
|
+
schema_reloaded: import("typebox").TBoolean;
|
|
210
|
+
postgrest_healthy: import("typebox").TBoolean;
|
|
211
|
+
}>;
|
|
212
|
+
web: import("typebox").TOptional<import("typebox").TObject<{
|
|
213
|
+
deployment_id: import("typebox").TString;
|
|
214
|
+
release_id: import("typebox").TString;
|
|
215
|
+
activation_id: import("typebox").TString;
|
|
216
|
+
replayed: import("typebox").TBoolean;
|
|
217
|
+
}>>;
|
|
218
|
+
}>;
|
|
219
|
+
export declare const ApplicationDeployWebRequestSchema: import("typebox").TObject<{
|
|
220
|
+
deployment_id: import("typebox").TString;
|
|
221
|
+
release_id: import("typebox").TString;
|
|
222
|
+
expected_active_release_id: import("typebox").TString;
|
|
223
|
+
expected_activation_id: import("typebox").TString;
|
|
224
|
+
mutation_id: import("typebox").TString;
|
|
188
225
|
}>;
|
|
@@ -9,7 +9,7 @@ export declare const APPLICATION_TOOL_SCHEMA: {
|
|
|
9
9
|
ttl_seconds: Type.TOptional<Type.TInteger>;
|
|
10
10
|
wait: Type.TOptional<Type.TBoolean>;
|
|
11
11
|
timeout_seconds: Type.TOptional<Type.TInteger>;
|
|
12
|
-
action: Type.TEnum<("list_releases" | "get_release" | "upload_release" | "activate_release" | "logs" | "get_runtime" | "get_deployment_evidence" | "get_configuration" | "get_release_transfer_plan" | "get_promotion_plan" | "get_promotion_status" | "get_rollback_snapshot" | "get_history" | "get_deploy_plan" | "get_preview_plan" | "list_previews" | "get_preview" | "put_configuration" | "
|
|
12
|
+
action: Type.TEnum<("list_releases" | "get_release" | "upload_release" | "activate_release" | "logs" | "get_runtime" | "get_deployment_evidence" | "get_configuration" | "get_release_transfer_plan" | "get_promotion_plan" | "get_promotion_status" | "get_rollback_snapshot" | "get_history" | "get_deploy_plan" | "get_preview_plan" | "list_previews" | "get_preview" | "put_configuration" | "deploy_application" | "transfer_release" | "promote_application" | "reconcile_promotion" | "create_preview" | "reconcile_preview" | "cleanup_preview" | "deploy_release" | "rollback_release" | "reconcile_activation" | "retire_activation")[]>;
|
|
13
13
|
ref: Type.TString;
|
|
14
14
|
id: Type.TString;
|
|
15
15
|
environment_id: Type.TOptional<Type.TString>;
|
|
@@ -19,6 +19,13 @@ export declare const APPLICATION_TOOL_SCHEMA: {
|
|
|
19
19
|
configuration_path: Type.TOptional<Type.TString>;
|
|
20
20
|
configuration_write: Type.TOptional<Type.TUnknown>;
|
|
21
21
|
manifest_path: Type.TOptional<Type.TString>;
|
|
22
|
+
web: Type.TOptional<Type.TObject<{
|
|
23
|
+
deployment_id: Type.TString;
|
|
24
|
+
release_id: Type.TString;
|
|
25
|
+
expected_active_release_id: Type.TString;
|
|
26
|
+
expected_activation_id: Type.TString;
|
|
27
|
+
mutation_id: Type.TString;
|
|
28
|
+
}>>;
|
|
22
29
|
release_id: Type.TOptional<Type.TString>;
|
|
23
30
|
source_ref: Type.TOptional<Type.TString>;
|
|
24
31
|
source_release_id: Type.TOptional<Type.TString>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ResolvedContext } from "../context";
|
|
2
|
+
import type { ToolSchema } from "../schema";
|
|
3
|
+
import { type ToolServer } from "../tool-server";
|
|
4
|
+
export interface DeveloperExperienceOptions {
|
|
5
|
+
cwd?: string;
|
|
6
|
+
activeContext?: ResolvedContext;
|
|
7
|
+
}
|
|
8
|
+
interface PackageManifest {
|
|
9
|
+
scripts?: Record<string, unknown>;
|
|
10
|
+
dependencies?: Record<string, unknown>;
|
|
11
|
+
devDependencies?: Record<string, unknown>;
|
|
12
|
+
}
|
|
13
|
+
export declare const initToolSchema: ToolSchema;
|
|
14
|
+
export declare const environmentToolSchema: ToolSchema;
|
|
15
|
+
declare function outputDirectoryFor(manifest: PackageManifest): string;
|
|
16
|
+
declare function profileNameFromFile(name: string): string | null;
|
|
17
|
+
declare function statusMissing(context: ResolvedContext): string[];
|
|
18
|
+
declare function deployMissing(context: ResolvedContext): string[];
|
|
19
|
+
export declare function registerDeveloperExperienceTools(server: ToolServer, options?: DeveloperExperienceOptions): void;
|
|
20
|
+
export declare const __internal: {
|
|
21
|
+
outputDirectoryFor: typeof outputDirectoryFor;
|
|
22
|
+
profileNameFromFile: typeof profileNameFromFile;
|
|
23
|
+
statusMissing: typeof statusMissing;
|
|
24
|
+
deployMissing: typeof deployMissing;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supacloud/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.90.0",
|
|
4
4
|
"description": "Project-scoped CLI for SupaCloud users",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"directory": "packages/cli"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@supacloud/compiler": "^0.44.
|
|
56
|
-
"@supacloud/delivery": "0.
|
|
57
|
-
"@supacloud/db": "0.16.
|
|
58
|
-
"typebox": "1.3.
|
|
55
|
+
"@supacloud/compiler": "^0.44.1",
|
|
56
|
+
"@supacloud/delivery": "0.15.0",
|
|
57
|
+
"@supacloud/db": "0.16.1",
|
|
58
|
+
"typebox": "1.3.36"
|
|
59
59
|
},
|
|
60
60
|
"overrides": {
|
|
61
|
-
"@supacloud/contracts": "0.8.
|
|
62
|
-
"@supacloud/delivery": "0.
|
|
61
|
+
"@supacloud/contracts": "0.8.1",
|
|
62
|
+
"@supacloud/delivery": "0.15.0",
|
|
63
63
|
"@graphql-tools/utils": "^12.0.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
@@ -23,9 +23,9 @@ Load this reference when selecting a command surface or when a user asks an AI t
|
|
|
23
23
|
| Inspect or back up a remote database | `supabase db_pull`, `migration_list`, `db_dump`, `gen_types` | Requires explicit PostgreSQL DSN; redact it |
|
|
24
24
|
| Replay the release-canary fixture stage receipt | `release release_canary_fixture_stage_replay` | Dual-bind Management project context and that project's service-role application origin; accepts only the exact subject/request UUID pair and a strict idempotent receipt |
|
|
25
25
|
| Disable a staged release-canary fixture | `release release_canary_fixture_disable_replay` | Uses the fixed disable RPC once, accepts idempotent false/true receipts, then queries the existing pending RPC with issuer/subject and requires authoritative JSON `false`; fixture binding comes from the strict disable receipt |
|
|
26
|
-
| Rebind release scope manifest to upstream base commit | `release scope_rebind` | Local action;
|
|
27
|
-
| Inspect release scope manifest and git alignment | `release scope_inspect` | Local action;
|
|
28
|
-
| Scaffold a new canonical release scope manifest | `release scope_create` | Local action; outputs
|
|
26
|
+
| Rebind release scope manifest to upstream base commit | `release scope_rebind` | Local maintenance action; requires the exact `--environment_id`, updates only scopes bound to that environment, supports `--dry_run`/`--task`, and recalculates `scope_sha256` |
|
|
27
|
+
| Inspect release scope manifest and git alignment | `release scope_inspect` | Local maintenance action; requires the exact `--environment_id`, rejects legacy or cross-environment scopes, returns canonical hash, and checks alignment with HEAD / origin/main |
|
|
28
|
+
| Scaffold a new canonical release scope manifest | `release scope_create` | Local maintenance action; requires `--environment_id` and outputs a current-main-bound scope with sorted functions, migrations, and environment identity |
|
|
29
29
|
| Preview/apply migrations remotely | `supabase push` | Always dry-run first; production needs explicit approval |
|
|
30
30
|
| Mark proven-equivalent historical migrations as applied | `database baseline_migrations` | Dry-run, schema-equivalence proof, backup, explicit approval |
|
|
31
31
|
| Inspect auth users or generate a controlled login link | `auth list_users`, `auth get_user`, `auth generate_link` | User reads are bounded; generation supports only `magiclink`, `recovery`, and `invite`, requires production confirmation, and returns only a validated action URL |
|
|
@@ -51,7 +51,7 @@ until a project-scoped context is resolved.
|
|
|
51
51
|
- `secrets`: project secret management; never print values after write.
|
|
52
52
|
- `queue`, `task_events`, `diagnostics`: asynchronous workload operations and bounded diagnostics.
|
|
53
53
|
- `gateway`: project route/config/rebuild operations.
|
|
54
|
-
- `release`: local release scope
|
|
54
|
+
- `release`: local release scope maintenance (`scope_rebind`, `scope_inspect`, `scope_create`), verified backup/PostgREST lifecycle controls, plus production-confirmed, non-retried, strict release-canary fixture stage and disable replay actions. Scope maintenance is not a prerequisite for the normal `supacloud --env <name> deploy` flow.
|
|
55
55
|
- `ai`: inspect or install this packaged Skill.
|
|
56
56
|
|
|
57
57
|
## Safe inspection pattern
|