@seliseblocks/cli-os 0.2.3 → 0.2.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/AI_USAGE_GUIDE.md +560 -560
- package/LICENSE +21 -21
- package/README.md +173 -173
- package/bin/run.js +2 -2
- package/dist/commands/auth/idp/create.d.ts +7 -0
- package/dist/commands/auth/idp/create.js +22 -3
- package/dist/commands/auth/idp/update.d.ts +7 -0
- package/dist/commands/auth/idp/update.js +22 -3
- package/dist/commands/new/web.js +4 -0
- package/dist/index.js +692 -672
- package/dist/lib/scaffold-web/app-core.js +6 -1
- package/dist/lib/scaffold-web/blocks-lib.js +36 -2
- package/dist/skills/blocks-data-gateway-configuration/SKILL.md +204 -204
- package/dist/skills/blocks-data-gateway-crud/SKILL.md +223 -223
- package/dist/skills/blocks-data-storage/SKILL.md +253 -253
- package/dist/skills/blocks-data-storage/flows/object-management.md +124 -124
- package/dist/skills/blocks-frontend-local-https/SKILL.md +100 -100
- package/dist/skills/blocks-iam-access-control/SKILL.md +49 -49
- package/dist/skills/blocks-iam-access-control/flows/feature-gating.md +38 -38
- package/dist/skills/blocks-iam-access-control/flows/manage-roles-permissions.md +110 -110
- package/dist/skills/blocks-iam-account/SKILL.md +169 -169
- package/dist/skills/blocks-iam-mfa/SKILL.md +124 -124
- package/dist/skills/blocks-iam-organizations/SKILL.md +43 -43
- package/dist/skills/blocks-iam-organizations/flows/admin-mutations.md +89 -89
- package/dist/skills/blocks-iam-organizations/flows/read-and-switch.md +57 -57
- package/dist/skills/blocks-iam-sso-oidc-configuration/SKILL.md +105 -89
- package/dist/skills/blocks-iam-sso-oidc-implementation/SKILL.md +80 -80
- package/dist/skills/blocks-iam-users/SKILL.md +131 -131
- package/dist/skills/blocks-localization-configuration/SKILL.md +149 -149
- package/dist/skills/blocks-localization-implementation/SKILL.md +63 -63
- package/dist/skills/blocks-mail/SKILL.md +95 -95
- package/dist/skills/blocks-notification/SKILL.md +69 -69
- package/dist/skills/blocks-notifier/SKILL.md +107 -107
- package/dist/skills/blocks-onboarding/SKILL.md +78 -78
- package/dist/skills/blocks-release-deployment/SKILL.md +81 -81
- package/dist/skills/blocks-secrets/SKILL.md +81 -81
- package/dist/skills/blocks-storage-configuration/SKILL.md +93 -93
- package/dist/skills/lint.mjs +168 -168
- package/package.json +47 -47
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: blocks-secrets
|
|
3
|
-
description: "Save and retrieve arbitrary named secret values (e.g. captcha provider config, third-party API keys) for a SELISE Blocks project via the blocks CLI's `secrets get`/`secrets save` commands, project-scoped with an impersonated project token. CLI-only surface, no SDK equivalent by design. Storage is generic key/value — shape depends entirely on the secret key, not fixed per type. Use for saving/rotating a secret's key-value pairs or reading one back. `get`'s response is the raw, unredacted value — treat CLI output as sensitive."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Blocks Secrets
|
|
7
|
-
|
|
8
|
-
This skill manages **generic tenant secret storage** — arbitrary named secret values scoped to a project, via the `blocks secrets *` CLI. It is not tied to any one feature: a project can store a `captcha` secret, an `smtp` secret, or anything else under whatever `secretKey` name it chooses. The shape of the stored value is a flat, caller-defined JSON object (`--key-value-pairs`) — there is no fixed schema across secrets.
|
|
9
|
-
|
|
10
|
-
**CLI-only, no SDK path, by explicit design.** There is no `@seliseblocks/client` method anywhere for reading or writing tenant secrets (the SDK's only "secret" surfaces are unrelated: MFA enrollment secrets and OIDC `clientSecret`). If a user wants to store or fetch a project secret, `blocks secrets get`/`blocks secrets save` is the only path — don't suggest an SDK call for this.
|
|
11
|
-
|
|
12
|
-
**Prerequisite:** a project is selected (`blocks use <tenantId>`). If login/project state is unknown, run the blocks-onboarding skill first.
|
|
13
|
-
|
|
14
|
-
## Command family
|
|
15
|
-
|
|
16
|
-
Both commands require an **impersonated project token** — there is no account-token path, consistent with `storage config *` and other project-scoped admin surfaces.
|
|
17
|
-
|
|
18
|
-
| Command | What it does |
|
|
19
|
-
|---|---|
|
|
20
|
-
| `blocks secrets get <secretKey>` | `<secretKey>` positional, or `--secret-key` (required if no positional). Also takes `--page-number` (default `0`) / `--page-size` (default `10`). Read-only. Response is untyped and printed as-is — **not redacted** (see Gotchas). |
|
|
21
|
-
| `blocks secrets save` | Upsert — create or update. Mutating; standard `--dry-run`/`--yes` discipline applies. |
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
blocks secrets get captcha --json
|
|
25
|
-
blocks secrets get --secret-key captcha --page-size 25 --json
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
The `secretKey` positional argument wins over `--secret-key` if both are somehow given; only one is required. The paging flags imply the response can be a paged list of items filed under that `secretKey`, not necessarily a single flat value — confirm actual shape from what the call returns rather than assuming a single-object response.
|
|
29
|
-
|
|
30
|
-
## `secrets save` — fields
|
|
31
|
-
|
|
32
|
-
`save` builds its request body from `--body`/`--file` (a raw JSON object, applied first) merged with these convenience flags (applied second, so they win if both are given):
|
|
33
|
-
|
|
34
|
-
| Flag | Body field |
|
|
35
|
-
|---|---|
|
|
36
|
-
| `--secret-key` | `secretKey` |
|
|
37
|
-
| `--item-id` | `itemId` |
|
|
38
|
-
| `--key-value-pairs` | `keyValuePairs` |
|
|
39
|
-
|
|
40
|
-
`--key-value-pairs` takes a JSON **object** string (e.g. `'{"isEnable":"true"}'`) — the CLI rejects arrays or non-objects with `--key-value-pairs must be a JSON object`. Unset convenience flags are dropped, so they never overwrite a field already present in `--body`/`--file`.
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
blocks secrets save --secret-key captcha \
|
|
44
|
-
--key-value-pairs '{"isEnable":"true","provider":"recaptcha","captchaKey":"...","captchaSecret":"..."}' \
|
|
45
|
-
--dry-run --json
|
|
46
|
-
|
|
47
|
-
blocks secrets save --secret-key captcha \
|
|
48
|
-
--key-value-pairs '{"isEnable":"true","provider":"recaptcha","captchaKey":"...","captchaSecret":"..."}' \
|
|
49
|
-
--yes --json
|
|
50
|
-
|
|
51
|
-
# Update an existing secret record
|
|
52
|
-
blocks secrets save --secret-key captcha --item-id <itemId> --key-value-pairs '{...}' --yes --json
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
`save` is create-or-update in one command: omit `--item-id` to create, pass it to update. The captcha example above is only an illustration — `--key-value-pairs` accepts whatever fields the caller's `secretKey` namespace needs.
|
|
56
|
-
|
|
57
|
-
## `--dry-run` before `--yes` — always
|
|
58
|
-
|
|
59
|
-
`save` follows the standard `blocks` mutation discipline: passing neither `--dry-run` nor `--yes` drops into an interactive "Type 'yes' to continue" prompt, which is not viable in a scripted/agent context — always pass one explicitly.
|
|
60
|
-
|
|
61
|
-
- `--dry-run` short-circuits **before** the confirmation prompt and **before any network call**: it prints the resolved request, with a redacted body, and returns.
|
|
62
|
-
- `--yes` skips the interactive prompt and sends the real request.
|
|
63
|
-
|
|
64
|
-
The dry-run preview's redaction is narrow: it walks `keyValuePairs` only, and replaces the *value* of any entry whose *key* matches a secret-shaped pattern (case-insensitive, e.g. ends in "key," or contains "secret"/"password") with `"***"`. It does **not** touch `secretKey`/`itemId` at the top level, and does **not** touch anything injected via `--body`/`--file` outside `keyValuePairs`. This redaction is preview-only — it never changes what is actually sent when `--yes` is used, and it has no effect on `secrets get`'s response or on the live response from `save` itself.
|
|
65
|
-
|
|
66
|
-
## Gotchas (secret-handling — read before running either command)
|
|
67
|
-
|
|
68
|
-
- **`get`'s response is raw and completely unredacted.** The command applies zero masking — the result is passed straight through and printed verbatim. There is no masked/redacted variant of this command. Whatever is stored under that `secretKey` comes back in full, as-is. Treat the output as sensitive: don't repeat the value back to the user beyond what they explicitly asked for, don't paste it into chat/logs/tickets, and never write it into a file that could get committed.
|
|
69
|
-
- **`save`'s live response is also unredacted.** The dry-run preview masks secret-shaped `keyValuePairs` keys, but that's a preview-only convenience. The actual request always sends plaintext values, and whatever comes back is written unredacted too — if the API echoes the saved value back, handle that response with the same care as `get`'s.
|
|
70
|
-
- **This is generic storage, not a captcha-specific feature.** `--key-value-pairs` is a flat JSON object whose fields are entirely defined by whoever picked the `secretKey` — there's no schema registry. Don't assume `isEnable`/`provider`/`captchaKey`/`captchaSecret` apply to a secret that isn't actually a captcha config.
|
|
71
|
-
- **Impersonated project token only, no account-token path.** Both commands require a selected project (`blocks use <tenantId>`) first — same pattern as `storage config *`.
|
|
72
|
-
- **No SDK equivalent exists.** Don't reach for `@seliseblocks/client` for this; the CLI is the only surface, by design.
|
|
73
|
-
- **`save` is upsert, not two verbs.** Whether a call creates or updates is decided by the presence of `--item-id`, not by a different command name.
|
|
74
|
-
|
|
75
|
-
## Example trigger prompts
|
|
76
|
-
|
|
77
|
-
- "Save our reCAPTCHA settings as a project secret." → `secrets save --secret-key captcha --key-value-pairs '{...}' --dry-run --json`, confirm, then re-run with `--yes`.
|
|
78
|
-
- "What's stored under the `captcha` secret?" → `secrets get captcha --json` — tell the user the raw stored value will be printed, and don't restate it beyond what they asked for.
|
|
79
|
-
- "Rotate the captcha secret key." → `secrets save --secret-key captcha --item-id <itemId> --key-value-pairs '{...}' --yes --json` (update path — need the existing `itemId`, typically from a prior `secrets get`).
|
|
80
|
-
- "Is there a way to list every secret in the project?" → there's no list-all; `secrets get` requires a `secretKey` and pages within it (`--page-number`/`--page-size`), it doesn't enumerate unknown keys.
|
|
81
|
-
- "Can I read this from my frontend app with the SDK?" → no — `blocks secrets *` is CLI/admin-only; don't scaffold an SDK call, and never put a secret value into frontend code or a committed `.env` file.
|
|
1
|
+
---
|
|
2
|
+
name: blocks-secrets
|
|
3
|
+
description: "Save and retrieve arbitrary named secret values (e.g. captcha provider config, third-party API keys) for a SELISE Blocks project via the blocks CLI's `secrets get`/`secrets save` commands, project-scoped with an impersonated project token. CLI-only surface, no SDK equivalent by design. Storage is generic key/value — shape depends entirely on the secret key, not fixed per type. Use for saving/rotating a secret's key-value pairs or reading one back. `get`'s response is the raw, unredacted value — treat CLI output as sensitive."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Blocks Secrets
|
|
7
|
+
|
|
8
|
+
This skill manages **generic tenant secret storage** — arbitrary named secret values scoped to a project, via the `blocks secrets *` CLI. It is not tied to any one feature: a project can store a `captcha` secret, an `smtp` secret, or anything else under whatever `secretKey` name it chooses. The shape of the stored value is a flat, caller-defined JSON object (`--key-value-pairs`) — there is no fixed schema across secrets.
|
|
9
|
+
|
|
10
|
+
**CLI-only, no SDK path, by explicit design.** There is no `@seliseblocks/client` method anywhere for reading or writing tenant secrets (the SDK's only "secret" surfaces are unrelated: MFA enrollment secrets and OIDC `clientSecret`). If a user wants to store or fetch a project secret, `blocks secrets get`/`blocks secrets save` is the only path — don't suggest an SDK call for this.
|
|
11
|
+
|
|
12
|
+
**Prerequisite:** a project is selected (`blocks use <tenantId>`). If login/project state is unknown, run the blocks-onboarding skill first.
|
|
13
|
+
|
|
14
|
+
## Command family
|
|
15
|
+
|
|
16
|
+
Both commands require an **impersonated project token** — there is no account-token path, consistent with `storage config *` and other project-scoped admin surfaces.
|
|
17
|
+
|
|
18
|
+
| Command | What it does |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `blocks secrets get <secretKey>` | `<secretKey>` positional, or `--secret-key` (required if no positional). Also takes `--page-number` (default `0`) / `--page-size` (default `10`). Read-only. Response is untyped and printed as-is — **not redacted** (see Gotchas). |
|
|
21
|
+
| `blocks secrets save` | Upsert — create or update. Mutating; standard `--dry-run`/`--yes` discipline applies. |
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
blocks secrets get captcha --json
|
|
25
|
+
blocks secrets get --secret-key captcha --page-size 25 --json
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The `secretKey` positional argument wins over `--secret-key` if both are somehow given; only one is required. The paging flags imply the response can be a paged list of items filed under that `secretKey`, not necessarily a single flat value — confirm actual shape from what the call returns rather than assuming a single-object response.
|
|
29
|
+
|
|
30
|
+
## `secrets save` — fields
|
|
31
|
+
|
|
32
|
+
`save` builds its request body from `--body`/`--file` (a raw JSON object, applied first) merged with these convenience flags (applied second, so they win if both are given):
|
|
33
|
+
|
|
34
|
+
| Flag | Body field |
|
|
35
|
+
|---|---|
|
|
36
|
+
| `--secret-key` | `secretKey` |
|
|
37
|
+
| `--item-id` | `itemId` |
|
|
38
|
+
| `--key-value-pairs` | `keyValuePairs` |
|
|
39
|
+
|
|
40
|
+
`--key-value-pairs` takes a JSON **object** string (e.g. `'{"isEnable":"true"}'`) — the CLI rejects arrays or non-objects with `--key-value-pairs must be a JSON object`. Unset convenience flags are dropped, so they never overwrite a field already present in `--body`/`--file`.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
blocks secrets save --secret-key captcha \
|
|
44
|
+
--key-value-pairs '{"isEnable":"true","provider":"recaptcha","captchaKey":"...","captchaSecret":"..."}' \
|
|
45
|
+
--dry-run --json
|
|
46
|
+
|
|
47
|
+
blocks secrets save --secret-key captcha \
|
|
48
|
+
--key-value-pairs '{"isEnable":"true","provider":"recaptcha","captchaKey":"...","captchaSecret":"..."}' \
|
|
49
|
+
--yes --json
|
|
50
|
+
|
|
51
|
+
# Update an existing secret record
|
|
52
|
+
blocks secrets save --secret-key captcha --item-id <itemId> --key-value-pairs '{...}' --yes --json
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`save` is create-or-update in one command: omit `--item-id` to create, pass it to update. The captcha example above is only an illustration — `--key-value-pairs` accepts whatever fields the caller's `secretKey` namespace needs.
|
|
56
|
+
|
|
57
|
+
## `--dry-run` before `--yes` — always
|
|
58
|
+
|
|
59
|
+
`save` follows the standard `blocks` mutation discipline: passing neither `--dry-run` nor `--yes` drops into an interactive "Type 'yes' to continue" prompt, which is not viable in a scripted/agent context — always pass one explicitly.
|
|
60
|
+
|
|
61
|
+
- `--dry-run` short-circuits **before** the confirmation prompt and **before any network call**: it prints the resolved request, with a redacted body, and returns.
|
|
62
|
+
- `--yes` skips the interactive prompt and sends the real request.
|
|
63
|
+
|
|
64
|
+
The dry-run preview's redaction is narrow: it walks `keyValuePairs` only, and replaces the *value* of any entry whose *key* matches a secret-shaped pattern (case-insensitive, e.g. ends in "key," or contains "secret"/"password") with `"***"`. It does **not** touch `secretKey`/`itemId` at the top level, and does **not** touch anything injected via `--body`/`--file` outside `keyValuePairs`. This redaction is preview-only — it never changes what is actually sent when `--yes` is used, and it has no effect on `secrets get`'s response or on the live response from `save` itself.
|
|
65
|
+
|
|
66
|
+
## Gotchas (secret-handling — read before running either command)
|
|
67
|
+
|
|
68
|
+
- **`get`'s response is raw and completely unredacted.** The command applies zero masking — the result is passed straight through and printed verbatim. There is no masked/redacted variant of this command. Whatever is stored under that `secretKey` comes back in full, as-is. Treat the output as sensitive: don't repeat the value back to the user beyond what they explicitly asked for, don't paste it into chat/logs/tickets, and never write it into a file that could get committed.
|
|
69
|
+
- **`save`'s live response is also unredacted.** The dry-run preview masks secret-shaped `keyValuePairs` keys, but that's a preview-only convenience. The actual request always sends plaintext values, and whatever comes back is written unredacted too — if the API echoes the saved value back, handle that response with the same care as `get`'s.
|
|
70
|
+
- **This is generic storage, not a captcha-specific feature.** `--key-value-pairs` is a flat JSON object whose fields are entirely defined by whoever picked the `secretKey` — there's no schema registry. Don't assume `isEnable`/`provider`/`captchaKey`/`captchaSecret` apply to a secret that isn't actually a captcha config.
|
|
71
|
+
- **Impersonated project token only, no account-token path.** Both commands require a selected project (`blocks use <tenantId>`) first — same pattern as `storage config *`.
|
|
72
|
+
- **No SDK equivalent exists.** Don't reach for `@seliseblocks/client` for this; the CLI is the only surface, by design.
|
|
73
|
+
- **`save` is upsert, not two verbs.** Whether a call creates or updates is decided by the presence of `--item-id`, not by a different command name.
|
|
74
|
+
|
|
75
|
+
## Example trigger prompts
|
|
76
|
+
|
|
77
|
+
- "Save our reCAPTCHA settings as a project secret." → `secrets save --secret-key captcha --key-value-pairs '{...}' --dry-run --json`, confirm, then re-run with `--yes`.
|
|
78
|
+
- "What's stored under the `captcha` secret?" → `secrets get captcha --json` — tell the user the raw stored value will be printed, and don't restate it beyond what they asked for.
|
|
79
|
+
- "Rotate the captcha secret key." → `secrets save --secret-key captcha --item-id <itemId> --key-value-pairs '{...}' --yes --json` (update path — need the existing `itemId`, typically from a prior `secrets get`).
|
|
80
|
+
- "Is there a way to list every secret in the project?" → there's no list-all; `secrets get` requires a `secretKey` and pages within it (`--page-number`/`--page-size`), it doesn't enumerate unknown keys.
|
|
81
|
+
- "Can I read this from my frontend app with the SDK?" → no — `blocks secrets *` is CLI/admin-only; don't scaffold an SDK call, and never put a secret value into frontend code or a committed `.env` file.
|
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: blocks-storage-configuration
|
|
3
|
-
description: "Configure which storage provider (Azure Blob, S3-compatible object storage, or local/SFTP storage) backs a SELISE Blocks project's file object tree: named configurations with host, port, credentials, region/endpoint or connection string, and strategy, via the blocks CLI ('storage config get/list/save/delete'). CLI-only, project-scoped admin surface. Use to create, inspect, rotate, switch, or delete provider configurations; file/directory/object operations belong to blocks-data-storage."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Blocks Storage — Configuration
|
|
7
|
-
|
|
8
|
-
This skill manages the **storage configuration record itself** — which cloud provider (or local/SFTP storage) a named configuration points at, and the connection details needed to reach it. It does not upload, download, browse, share, version, move, or trash objects; those runtime concerns belong to blocks-data-storage.
|
|
9
|
-
|
|
10
|
-
**CLI-only, no SDK path.** There is no `@seliseblocks/client` method for reading or writing a storage configuration's own fields. Runtime storage calls select an existing record by `configurationName`. If the user wants to manipulate a file/directory or its access policies, hand off to blocks-data-storage.
|
|
11
|
-
|
|
12
|
-
**Prerequisite:** a project is selected (`blocks use <tenantId>`). If login/project state is unknown, run the blocks-onboarding skill first.
|
|
13
|
-
|
|
14
|
-
## Command family
|
|
15
|
-
|
|
16
|
-
All four commands require an **impersonated project token** — there is no account-token path for this surface, consistent with other project-scoped admin commands (`secrets *`, `data config *`, etc.).
|
|
17
|
-
|
|
18
|
-
| Command | Notes |
|
|
19
|
-
|---|---|
|
|
20
|
-
| `blocks storage config list` | No parameters beyond the selected project. Read-only. |
|
|
21
|
-
| `blocks storage config get <name>` | `<name>` (positional) or `--name` (required if no positional arg). Read-only. |
|
|
22
|
-
| `blocks storage config save` | Upsert — create or update a configuration. Mutating. |
|
|
23
|
-
| `blocks storage config delete <name>` | `<name>` (positional) or `--name` (required if no positional arg). Mutating. |
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
blocks storage config list --json
|
|
27
|
-
blocks storage config get Default --json
|
|
28
|
-
blocks storage config get --name Default --json
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## `storage config save` — fields
|
|
32
|
-
|
|
33
|
-
`save` builds its request body from `--body`/`--file` (a raw JSON object, spread first) merged with these convenience flags (later, so they win if both are given):
|
|
34
|
-
|
|
35
|
-
| Flag | Body field |
|
|
36
|
-
|---|---|
|
|
37
|
-
| `--name` | `name` |
|
|
38
|
-
| `--item-id` | `itemId` |
|
|
39
|
-
| `--strategy` | `storageStrategy` |
|
|
40
|
-
| `--host` | `host` |
|
|
41
|
-
| `--port` | `port` |
|
|
42
|
-
| `--region-endpoint` | `cloudStorageRegionEndPoint` |
|
|
43
|
-
| `--connection-string` | `connectionString` |
|
|
44
|
-
| `--access-key` | `accessKey` |
|
|
45
|
-
| `--secret-key` | `secretKey` |
|
|
46
|
-
| `--username` | `userName` |
|
|
47
|
-
| `--password` | `password` |
|
|
48
|
-
| `--remote-base-path` | `remoteBasePath` |
|
|
49
|
-
| `--update` (boolean) | `updateRequest` |
|
|
50
|
-
|
|
51
|
-
Unset flags are dropped (`compact`), so they never overwrite fields already present in a `--body`/`--file` payload. `save` is a create-or-update in one command, not two separate verbs — pass `--item-id` (and typically `--update`) when modifying an existing configuration, omit it to create a new one.
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
blocks storage config save --name Default --strategy AzureBlob \
|
|
55
|
-
--host mystorageaccount.blob.core.windows.net --region-endpoint eu-west-1 \
|
|
56
|
-
--access-key <key> --secret-key <secret> --dry-run --json
|
|
57
|
-
blocks storage config save --name Default --strategy AzureBlob \
|
|
58
|
-
--host mystorageaccount.blob.core.windows.net --region-endpoint eu-west-1 \
|
|
59
|
-
--access-key <key> --secret-key <secret> --yes --json
|
|
60
|
-
|
|
61
|
-
# Update an existing configuration
|
|
62
|
-
blocks storage config save --item-id <id> --update --connection-string "<new connection string>" --dry-run --json
|
|
63
|
-
blocks storage config save --item-id <id> --update --connection-string "<new connection string>" --yes --json
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## `--dry-run` before `--yes` — always
|
|
67
|
-
|
|
68
|
-
Both mutating commands (`save`, `delete`) follow the standard `blocks` mutation discipline: `--dry-run` prints what would be sent and returns without calling the API; `--yes` skips the interactive confirmation prompt and sends the request for real. Omitting both drops into an interactive "Type 'yes' to continue" prompt — not viable in a scripted/agent context, so always pass one or the other explicitly.
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
blocks storage config delete Default --dry-run --json
|
|
72
|
-
blocks storage config delete Default --yes --json
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
`save`'s dry-run output redacts secret-shaped fields before printing (`accessKey`, `connectionString`, `password`, `secretKey` become `"***"`) — this redaction is **dry-run-preview only**, it does not change what's actually sent when you run with `--yes`, and it doesn't apply to `get`/`list` responses (see Gotchas).
|
|
76
|
-
|
|
77
|
-
## Gotchas
|
|
78
|
-
|
|
79
|
-
- **`get`/`list` are not redacted.** Only `save --dry-run`'s own preview output redacts `accessKey`/`connectionString`/`password`/`secretKey`. If a `get`/`list` response ever echoes credential fields back, treat that output as sensitive — don't paste it into logs, tickets, or chat verbatim.
|
|
80
|
-
- **`save` is upsert, not separate create/update commands.** Whether a call creates or updates is determined by whether `--item-id` is present, not by a different command name.
|
|
81
|
-
- **This is provider configuration, not object management.** `blocks storage config *` never touches file bytes, directory hierarchy, versions, trash, sharing, or ACLs. Those belong to **blocks-data-storage**, using a `configurationName` that a storage config already defines.
|
|
82
|
-
- **No positional-or-flag ambiguity trap:** `get`/`delete` accept the configuration name as either the first positional argument or `--name`; only one is required, not both.
|
|
83
|
-
- **Impersonated project token only.** Like `secrets *` and `data config *`, none of these four commands run against the account token — a project must be selected first (`blocks use <tenantId>`).
|
|
84
|
-
|
|
85
|
-
## Example trigger prompts
|
|
86
|
-
|
|
87
|
-
- "Set up Azure Blob storage for this project." → `storage config save --strategy AzureBlob ...`.
|
|
88
|
-
- "What storage configurations exist on this project?" → `storage config list`.
|
|
89
|
-
- "Show me the `Default` storage configuration." → `storage config get Default`.
|
|
90
|
-
- "Rotate the access key on our storage config." → `storage config save --item-id <id> --update --access-key <new key> ...`.
|
|
91
|
-
- "Switch this project to local storage." → `storage config save --strategy <local strategy value> --host ... --port ...` (confirm the exact strategy value expected by the project rather than guessing).
|
|
92
|
-
- "Delete this storage configuration, we don't use it anymore." → `storage config delete <name>`.
|
|
93
|
-
- "How do I actually upload a file once storage is configured?" → hand off to **blocks-data-storage**, not this skill.
|
|
1
|
+
---
|
|
2
|
+
name: blocks-storage-configuration
|
|
3
|
+
description: "Configure which storage provider (Azure Blob, S3-compatible object storage, or local/SFTP storage) backs a SELISE Blocks project's file object tree: named configurations with host, port, credentials, region/endpoint or connection string, and strategy, via the blocks CLI ('storage config get/list/save/delete'). CLI-only, project-scoped admin surface. Use to create, inspect, rotate, switch, or delete provider configurations; file/directory/object operations belong to blocks-data-storage."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Blocks Storage — Configuration
|
|
7
|
+
|
|
8
|
+
This skill manages the **storage configuration record itself** — which cloud provider (or local/SFTP storage) a named configuration points at, and the connection details needed to reach it. It does not upload, download, browse, share, version, move, or trash objects; those runtime concerns belong to blocks-data-storage.
|
|
9
|
+
|
|
10
|
+
**CLI-only, no SDK path.** There is no `@seliseblocks/client` method for reading or writing a storage configuration's own fields. Runtime storage calls select an existing record by `configurationName`. If the user wants to manipulate a file/directory or its access policies, hand off to blocks-data-storage.
|
|
11
|
+
|
|
12
|
+
**Prerequisite:** a project is selected (`blocks use <tenantId>`). If login/project state is unknown, run the blocks-onboarding skill first.
|
|
13
|
+
|
|
14
|
+
## Command family
|
|
15
|
+
|
|
16
|
+
All four commands require an **impersonated project token** — there is no account-token path for this surface, consistent with other project-scoped admin commands (`secrets *`, `data config *`, etc.).
|
|
17
|
+
|
|
18
|
+
| Command | Notes |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `blocks storage config list` | No parameters beyond the selected project. Read-only. |
|
|
21
|
+
| `blocks storage config get <name>` | `<name>` (positional) or `--name` (required if no positional arg). Read-only. |
|
|
22
|
+
| `blocks storage config save` | Upsert — create or update a configuration. Mutating. |
|
|
23
|
+
| `blocks storage config delete <name>` | `<name>` (positional) or `--name` (required if no positional arg). Mutating. |
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
blocks storage config list --json
|
|
27
|
+
blocks storage config get Default --json
|
|
28
|
+
blocks storage config get --name Default --json
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## `storage config save` — fields
|
|
32
|
+
|
|
33
|
+
`save` builds its request body from `--body`/`--file` (a raw JSON object, spread first) merged with these convenience flags (later, so they win if both are given):
|
|
34
|
+
|
|
35
|
+
| Flag | Body field |
|
|
36
|
+
|---|---|
|
|
37
|
+
| `--name` | `name` |
|
|
38
|
+
| `--item-id` | `itemId` |
|
|
39
|
+
| `--strategy` | `storageStrategy` |
|
|
40
|
+
| `--host` | `host` |
|
|
41
|
+
| `--port` | `port` |
|
|
42
|
+
| `--region-endpoint` | `cloudStorageRegionEndPoint` |
|
|
43
|
+
| `--connection-string` | `connectionString` |
|
|
44
|
+
| `--access-key` | `accessKey` |
|
|
45
|
+
| `--secret-key` | `secretKey` |
|
|
46
|
+
| `--username` | `userName` |
|
|
47
|
+
| `--password` | `password` |
|
|
48
|
+
| `--remote-base-path` | `remoteBasePath` |
|
|
49
|
+
| `--update` (boolean) | `updateRequest` |
|
|
50
|
+
|
|
51
|
+
Unset flags are dropped (`compact`), so they never overwrite fields already present in a `--body`/`--file` payload. `save` is a create-or-update in one command, not two separate verbs — pass `--item-id` (and typically `--update`) when modifying an existing configuration, omit it to create a new one.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
blocks storage config save --name Default --strategy AzureBlob \
|
|
55
|
+
--host mystorageaccount.blob.core.windows.net --region-endpoint eu-west-1 \
|
|
56
|
+
--access-key <key> --secret-key <secret> --dry-run --json
|
|
57
|
+
blocks storage config save --name Default --strategy AzureBlob \
|
|
58
|
+
--host mystorageaccount.blob.core.windows.net --region-endpoint eu-west-1 \
|
|
59
|
+
--access-key <key> --secret-key <secret> --yes --json
|
|
60
|
+
|
|
61
|
+
# Update an existing configuration
|
|
62
|
+
blocks storage config save --item-id <id> --update --connection-string "<new connection string>" --dry-run --json
|
|
63
|
+
blocks storage config save --item-id <id> --update --connection-string "<new connection string>" --yes --json
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## `--dry-run` before `--yes` — always
|
|
67
|
+
|
|
68
|
+
Both mutating commands (`save`, `delete`) follow the standard `blocks` mutation discipline: `--dry-run` prints what would be sent and returns without calling the API; `--yes` skips the interactive confirmation prompt and sends the request for real. Omitting both drops into an interactive "Type 'yes' to continue" prompt — not viable in a scripted/agent context, so always pass one or the other explicitly.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
blocks storage config delete Default --dry-run --json
|
|
72
|
+
blocks storage config delete Default --yes --json
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
`save`'s dry-run output redacts secret-shaped fields before printing (`accessKey`, `connectionString`, `password`, `secretKey` become `"***"`) — this redaction is **dry-run-preview only**, it does not change what's actually sent when you run with `--yes`, and it doesn't apply to `get`/`list` responses (see Gotchas).
|
|
76
|
+
|
|
77
|
+
## Gotchas
|
|
78
|
+
|
|
79
|
+
- **`get`/`list` are not redacted.** Only `save --dry-run`'s own preview output redacts `accessKey`/`connectionString`/`password`/`secretKey`. If a `get`/`list` response ever echoes credential fields back, treat that output as sensitive — don't paste it into logs, tickets, or chat verbatim.
|
|
80
|
+
- **`save` is upsert, not separate create/update commands.** Whether a call creates or updates is determined by whether `--item-id` is present, not by a different command name.
|
|
81
|
+
- **This is provider configuration, not object management.** `blocks storage config *` never touches file bytes, directory hierarchy, versions, trash, sharing, or ACLs. Those belong to **blocks-data-storage**, using a `configurationName` that a storage config already defines.
|
|
82
|
+
- **No positional-or-flag ambiguity trap:** `get`/`delete` accept the configuration name as either the first positional argument or `--name`; only one is required, not both.
|
|
83
|
+
- **Impersonated project token only.** Like `secrets *` and `data config *`, none of these four commands run against the account token — a project must be selected first (`blocks use <tenantId>`).
|
|
84
|
+
|
|
85
|
+
## Example trigger prompts
|
|
86
|
+
|
|
87
|
+
- "Set up Azure Blob storage for this project." → `storage config save --strategy AzureBlob ...`.
|
|
88
|
+
- "What storage configurations exist on this project?" → `storage config list`.
|
|
89
|
+
- "Show me the `Default` storage configuration." → `storage config get Default`.
|
|
90
|
+
- "Rotate the access key on our storage config." → `storage config save --item-id <id> --update --access-key <new key> ...`.
|
|
91
|
+
- "Switch this project to local storage." → `storage config save --strategy <local strategy value> --host ... --port ...` (confirm the exact strategy value expected by the project rather than guessing).
|
|
92
|
+
- "Delete this storage configuration, we don't use it anymore." → `storage config delete <name>`.
|
|
93
|
+
- "How do I actually upload a file once storage is configured?" → hand off to **blocks-data-storage**, not this skill.
|