@kizenapps/cli 1.13.0-1bb4c57 → 1.13.0-poc-bcd37de
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 +238 -11
- package/dist/index.css +2 -0
- package/dist/index.css.map +1 -0
- package/dist/index.js +806 -164
- package/dist/index.js.map +1 -1
- package/dist/viewer/assets/{AppDetailPage-CGrukEIj.js → AppDetailPage-CsAJGeXG.js} +1 -1
- package/dist/viewer/assets/CodeStepsPage-Dd84cmbe.js +1 -0
- package/dist/viewer/assets/{ConfigurationPage-CI0pRNJ0.js → ConfigurationPage-DUiOAiMK.js} +1 -1
- package/dist/viewer/assets/CredentialsContext-p3i8s7a6.js +1 -0
- package/dist/viewer/assets/{DevSidebar-BFsoIbMt.js → DevSidebar-CkLpkWSy.js} +1 -1
- package/dist/viewer/assets/{SandboxPage-Dyb8i7vf.js → SandboxPage-D3Qdh_0M.js} +1 -1
- package/dist/viewer/assets/{SecretsPage-g2FF7d-B.js → SecretsPage-CQVPedWl.js} +1 -1
- package/dist/viewer/assets/{WhenBadge-DKz8ukwo.js → WhenBadge-CV5t88Iv.js} +1 -1
- package/dist/viewer/assets/api-C4R44YCL.js +11 -0
- package/dist/viewer/assets/{bootstrapQuery-DTAPKOf-.js → bootstrapQuery-WnoB2iya.js} +1 -1
- package/dist/viewer/assets/index-B1r1yKD-.js +5 -0
- package/dist/viewer/assets/{useCompleteSetup-QS3W9RRO.js → useCompleteSetup-BgC9V-FN.js} +4 -4
- package/dist/viewer/assets/{usePluginConfig--4sAyik4.js → usePluginConfig-mg5WevIz.js} +1 -1
- package/dist/viewer/index.html +4 -4
- package/package.json +3 -2
- package/dist/viewer/assets/CodeStepsPage-Cu9UiRy9.js +0 -1
- package/dist/viewer/assets/CredentialsContext-Cwl_xyt_.js +0 -1
- package/dist/viewer/assets/api--pW2v3sH.js +0 -11
- package/dist/viewer/assets/index-GvAPdgKb.js +0 -5
package/README.md
CHANGED
|
@@ -57,9 +57,7 @@ The wizard first asks where the plugin should live (the current directory, or a
|
|
|
57
57
|
|
|
58
58
|
> **Fill in Description and Business ID.** Both are labelled optional in the wizard, but `create` writes them into `kizen.json` as empty strings and the bundler rejects an empty `description` or `developer_business_id` — so a plugin created with those fields skipped fails `appbuilder build` until you edit `kizen.json` by hand. This is tracked internally (KZN-17594); until that fix lands, treat both as required.
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
`create` writes `kizen.json`, `src/`, `releaseNotes/`, a placeholder `src/thumbnail.png` (512×512, colored from the `api_name`), the templates for the artifacts you picked, and the Copilot review files described under [`appbuilder create`](#appbuilder-create). It adds both `.kizenapp/` and `.copilot-docs/` to `.gitignore`.
|
|
60
|
+
`create` writes `kizen.json`, `src/`, `releaseNotes/`, and adds `.kizenapp/` to `.gitignore`.
|
|
63
61
|
|
|
64
62
|
### 2. Set up credentials
|
|
65
63
|
|
|
@@ -104,19 +102,25 @@ Writes `.kizenapp/bundle.json` — the same artifact `dev` serves — after runn
|
|
|
104
102
|
|
|
105
103
|
### `appbuilder create`
|
|
106
104
|
|
|
107
|
-
Scaffolds a new Kizen plugin project. Interactive
|
|
105
|
+
Scaffolds a new Kizen plugin project. Interactive; no flags. See [Quickstart](#1-scaffold-a-plugin) for the fields it collects.
|
|
108
106
|
|
|
109
|
-
|
|
107
|
+
### `appbuilder setup-claude`
|
|
110
108
|
|
|
111
|
-
|
|
109
|
+
Installs or refreshes the Claude Code skill for building custom blocks (`.claude/skills/kizen-custom-block/SKILL.md`) in the plugin in the current directory. `appbuilder create` writes the skill once; run `setup-claude` in an existing plugin to add it, or after upgrading the CLI to pick up the bundled version.
|
|
112
110
|
|
|
113
|
-
|
|
111
|
+
```sh
|
|
112
|
+
appbuilder setup-claude [--dry-run]
|
|
113
|
+
```
|
|
114
114
|
|
|
115
115
|
| Flag | Default | Purpose |
|
|
116
116
|
| ----------- | ------- | ----------------------------------------------- |
|
|
117
|
-
| `--dry-run` | off |
|
|
117
|
+
| `--dry-run` | off | Report what would change without writing files. |
|
|
118
|
+
|
|
119
|
+
It also installs the skill's design guide (`.claude/skills/kizen-custom-block/design.md`), which tells the agent how to make blocks match native dashlets, and the Kizen data helper library (`src/lib/kizenData.js`) that block scripts import to read records and apply the dashboard's date and team filters. The library goes under the `entry` directory from `kizen.json` (`<entry>/lib/kizenData.js`, one per entry in a multi-plugin `kizen.json`), and under `src/` when `kizen.json` has no usable `entry`. `appbuilder create` writes it to `src/lib/kizenData.js`.
|
|
118
120
|
|
|
119
|
-
|
|
121
|
+
It prints one line per file (`created`, `updated` or `unchanged`) and a one-line summary. These files are managed by the CLI, so local edits to them, including edits to `kizenData.js`, are replaced when they're `updated`. Don't edit `kizenData.js`; put your own helpers in another file under `src/lib/`. It only writes these files and never touches the `.github/` Copilot files or block code. It fails with exit code 1 when there's no `kizen.json` in the current directory.
|
|
122
|
+
|
|
123
|
+
`block push` adds the warning `Claude files managed by appbuilder are out of date; run appbuilder setup-claude` when the plugin has the skill and any managed file (the skill, its design guide or `kizenData.js`) is missing or differs from the bundled one. The warning never fails the push.
|
|
120
124
|
|
|
121
125
|
### `appbuilder build`
|
|
122
126
|
|
|
@@ -124,8 +128,6 @@ Reads the plugin in the current directory, validates it against the same rules e
|
|
|
124
128
|
|
|
125
129
|
If validation finds any errors (for example an `api_name` containing hyphens, which the platform rejects) the build fails and prints each issue grouped by file. Fix the reported issues and re-run.
|
|
126
130
|
|
|
127
|
-
Automation step configs are validated the same way — parameter data types, secrets that must be declared in the manifest's `base_config.secrets`, fields removed from the publish contract, and `runtime` — against the list of automation data types bundled in `@kizenapps/packager`. The Plugin Wizard applies the same rules at publish, against the live list read from the target environment, so a build that passes locally is expected to publish clean.
|
|
128
|
-
|
|
129
131
|
### `appbuilder dev`
|
|
130
132
|
|
|
131
133
|
Starts the dev server and opens the viewer. Watches your plugin directory and rebuilds + hot-reloads the viewer on every change. Each rebuild runs the same validation as `build`.
|
|
@@ -186,6 +188,230 @@ Prints every valid icon name accepted by toolbar items, pages, and adornments, o
|
|
|
186
188
|
appbuilder icons | grep calendar
|
|
187
189
|
```
|
|
188
190
|
|
|
191
|
+
### `appbuilder block export`
|
|
192
|
+
|
|
193
|
+
Packages the plugin in the current directory (same validation and minification as `build`) and prints one block as pretty JSON — exactly what the Custom Block (AI Coded) dashlet's paste editor accepts. Nothing is written to `.kizenapp`.
|
|
194
|
+
|
|
195
|
+
```sh
|
|
196
|
+
appbuilder block export [api_name] [--copy]
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
| Argument / flag | Default | Purpose |
|
|
200
|
+
| --------------- | ----------------------- | ---------------------------------------------------------------------- |
|
|
201
|
+
| `[api_name]` | the plugin's only block | Block to export. Required when the plugin has more than one block. |
|
|
202
|
+
| `--copy` | off | Also copy the JSON to the clipboard; a one-line status goes to stderr. |
|
|
203
|
+
|
|
204
|
+
Only the block JSON goes to stdout, so it can be piped or redirected (`appbuilder block export > block.json`). Validation warnings and errors go to stderr. The command fails with a non-zero exit code if validation fails, the block can't be found or is ambiguous, or the packaged block would be rejected by the paste editor (for example a block with no `script.js`, a non-positive-integer `min_w`, or a `min_w` greater than its `max_w`).
|
|
205
|
+
|
|
206
|
+
The JSON carries only the sizes the block's `config.json` writes: `min_w`, `max_w`, `min_h`, `max_h`, `default_w` and `default_h`. Sizes it leaves out are left out of the JSON too, rather than filled with packager defaults. `default_w` and `default_h` are the starting size, in grid columns and rows, of a dashlet created from the block. Each size that is set must be a positive integer, each `min_*` must be no greater than its `max_*`, and each `default_*` must fall within whichever of its `min_*` and `max_*` are set (for example `min_w` ≤ `default_w` ≤ `max_w`). Otherwise the export fails as `invalid_block` naming the field.
|
|
207
|
+
|
|
208
|
+
### `appbuilder block push`
|
|
209
|
+
|
|
210
|
+
Packages the plugin in the current directory (same validation as `block export`) and writes one block into a Custom Block (AI Coded) dashlet on a Kizen dashboard, homepage or chart group: it updates an existing dashlet or creates a new one. Card chrome (background, border, radius, shadow) comes from the dashboard's style settings, like native dashlets.
|
|
211
|
+
|
|
212
|
+
```sh
|
|
213
|
+
appbuilder block push [api_name] [flags]
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Interactive by default: pick credentials, the block, the surface (dashboard, homepage or chart group), the dashboard, then whether to update an existing custom code dashlet or create a new one, and confirm. Pushing to a production environment (`go`, `fmo`) asks you to type `y`. In a TTY, `--yes` skips the confirm prompt only when the headless write gate would apply, so `go` and `fmo` still ask for a typed `y` unless `--allow-production` is also passed; `--dry-run` shows the plan without writing. A dashlet edited in Kizen since the last push still prompts before overwriting unless `--force` is passed.
|
|
217
|
+
|
|
218
|
+
It runs headless when stdin or stdout is not a TTY, or when `--json` is passed. `--yes` never selects the mode. Headless runs never prompt: anything that would be a question fails with `needs_choice` and lists the choices.
|
|
219
|
+
|
|
220
|
+
| Argument / flag | Default | Purpose |
|
|
221
|
+
| -------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------- |
|
|
222
|
+
| `[api_name]` | the plugin's only block | Block to push. Required when the plugin has more than one block. |
|
|
223
|
+
| `-c, --credentials <path>` | see resolution below | Credentials JSON file to use |
|
|
224
|
+
| `--profile <name>` | see resolution below | Stored credential profile to use |
|
|
225
|
+
| `--dashboard <id>` | the remembered target | Dashboard, homepage or chart group to push to |
|
|
226
|
+
| `--dashlet <id>` | matched by push history or name | Existing custom code dashlet to update. Needs `--dashboard`; can't be used with `--create`. |
|
|
227
|
+
| `--create` | off | Create a new dashlet instead of updating one |
|
|
228
|
+
| `--dry-run` | off | Resolve everything and print the request without writing |
|
|
229
|
+
| `--yes` | off | Write without asking. Headless runs without it are dry runs. |
|
|
230
|
+
| `--allow-production` | off | Allow headless writes to `go` / `fmo` |
|
|
231
|
+
| `--force` | off | Overwrite a dashlet that was edited in Kizen since the last push |
|
|
232
|
+
| `--forget` | off | Clear the remembered target for this block before resolving |
|
|
233
|
+
| `--json` | off | Print a JSON result to stdout (forces headless); the human summary goes to stderr |
|
|
234
|
+
|
|
235
|
+
**Credentials** resolve in this order: `-c`, then `--profile`, then the project's active profile from `.kizenapp/config.json`, then the only loadable stored profile; several profiles without a choice is `needs_choice`. A project set to local browser-only credentials must pass `-c` or `--profile`. The credentials file must name a valid `environment` (`go`, `fmo`, `staging`, `integration`, `test1`); a missing or invalid one is refused with `credentials_invalid` rather than defaulting to production. Empty `apiKey`, `userId` or `businessId` are refused the same way.
|
|
236
|
+
|
|
237
|
+
**Write gating (headless).** `--dry-run` is always a dry run. Without `--yes` the run is a dry run too, and stderr says `Dry run only: pass --yes to write.` With `--yes`, `go` and `fmo` also need `--allow-production` (else `production_requires_flag`). If the target dashlet was pushed from here before and its content has since been changed in Kizen, both dry runs and writes stop with `drift_detected` unless `--force` is passed.
|
|
238
|
+
|
|
239
|
+
**Remembered target.** A successful write records the target in `.kizenapp/pushes.json` (kept gitignored): one entry per environment, business, plugin and block. Pushing the block somewhere else replaces the entry. With no `--dashboard`, the next push goes to the remembered dashlet. If that dashboard or dashlet is gone, the push fails with `remembered_target_missing` and never silently creates a new one. When only the dashlet is gone the failure lists the dashboard's target `choices`, and `--create` adds a new block there; otherwise pass `--dashboard <id>` to choose another target, or `--forget` to clear it (honored in dry runs too; the result then carries `"forgotten": true`). A missing `pushes.json` just means nothing is remembered yet; one that can't be read, isn't valid JSON, or isn't a JSON array fails the push with `local_error` before anything is written, so fix or delete it.
|
|
240
|
+
|
|
241
|
+
**Size.** A dashlet created by `push` starts `default_w` columns wide, or `min_w` when there's no `default_w`, or 6 when neither is set. Its height works the same way with `default_h`, then `min_h`, then 3 rows. That size is clamped into whichever of `min_*`/`max_*` the block's `config.json` sets, then into the grid (2 to 12 columns, 1 to 99 rows). The pushed content carries exactly the sizes `config.json` writes, the same as `block export`. Updating an existing dashlet never changes its layout or size.
|
|
242
|
+
|
|
243
|
+
**Matching.** With `--dashboard` and neither `--dashlet` nor `--create`, the push updates the dashlet recorded in `.kizenapp/pushes.json` for that dashboard, else the single custom code dashlet named `appbuilder:<plugin_api_name>/<block_api_name>` (the name given to every dashlet `push` creates). No match, or several, is `needs_choice`.
|
|
244
|
+
|
|
245
|
+
#### JSON output
|
|
246
|
+
|
|
247
|
+
With `--json`, every result is one pretty-printed JSON object on stdout, and the human summary goes to stderr. Headless without `--json` prints human text instead: success and dry-run output on stdout, errors on stderr. A dry run:
|
|
248
|
+
|
|
249
|
+
```json
|
|
250
|
+
{
|
|
251
|
+
"ok": true,
|
|
252
|
+
"applied": false,
|
|
253
|
+
"dryRun": true,
|
|
254
|
+
"reason": "no_yes",
|
|
255
|
+
"action": "update",
|
|
256
|
+
"environment": "staging",
|
|
257
|
+
"businessId": "b0c6…",
|
|
258
|
+
"dashboard": { "id": "5f1e…", "name": "Sales overview", "type": "dashboard" },
|
|
259
|
+
"dashletId": "9a2d…",
|
|
260
|
+
"url": "https://v2.staging.kizen.com/dashboard/5f1e…",
|
|
261
|
+
"resolvedBy": "remembered",
|
|
262
|
+
"block": {
|
|
263
|
+
"pluginApiName": "my_plugin",
|
|
264
|
+
"apiName": "pipeline_summary",
|
|
265
|
+
"name": "Pipeline summary"
|
|
266
|
+
},
|
|
267
|
+
"method": "PATCH",
|
|
268
|
+
"path": "/dashboards/5f1e…/dashlet/9a2d…",
|
|
269
|
+
"body": { "config": { "…": "…" } },
|
|
270
|
+
"warnings": []
|
|
271
|
+
}
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
`reason` is `flag` (`--dry-run`) or `no_yes` (headless without `--yes`). `action` is `create` or `update`, `method` is `POST` or `PATCH`, and `dashletId` is `null` for a create. `resolvedBy` is `flag`, `remembered`, `push_map` or `name`. `dashboard.type` is `dashboard`, `homepage` or `chart_group`.
|
|
275
|
+
|
|
276
|
+
An applied write:
|
|
277
|
+
|
|
278
|
+
```json
|
|
279
|
+
{
|
|
280
|
+
"ok": true,
|
|
281
|
+
"applied": true,
|
|
282
|
+
"dryRun": false,
|
|
283
|
+
"action": "created",
|
|
284
|
+
"environment": "staging",
|
|
285
|
+
"businessId": "b0c6…",
|
|
286
|
+
"dashboard": { "id": "5f1e…", "name": "Sales overview", "type": "dashboard" },
|
|
287
|
+
"dashletId": "c41b…",
|
|
288
|
+
"url": "https://v2.staging.kizen.com/dashboard/5f1e…",
|
|
289
|
+
"refresh": {
|
|
290
|
+
"dashboardId": "5f1e…",
|
|
291
|
+
"script": "await window.__kizenCustomBlocks?.refresh('5f1e…')"
|
|
292
|
+
},
|
|
293
|
+
"resolvedBy": "flag",
|
|
294
|
+
"block": {
|
|
295
|
+
"pluginApiName": "my_plugin",
|
|
296
|
+
"apiName": "pipeline_summary",
|
|
297
|
+
"name": "Pipeline summary"
|
|
298
|
+
},
|
|
299
|
+
"remembered": true,
|
|
300
|
+
"warnings": []
|
|
301
|
+
}
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
`action` is `created` or `updated`. `remembered` is `false` (with a warning) when `.kizenapp/pushes.json` couldn't be written; the push itself still succeeded.
|
|
305
|
+
|
|
306
|
+
`refresh` is only on applied writes, and only when the dashboard id is a uuid; otherwise it's left out. `script` is exactly `await window.__kizenCustomBlocks?.refresh('<dashboardId>')`. Run it in a Kizen tab that already has `url` open to refetch that dashboard in place instead of reloading the page. The hook is registered on dashboards, homepages and chart groups. When it's available on the page, the script resolves to `{ refreshed: true, dashboardId }`. Otherwise it resolves to `undefined`: that browser's localStorage doesn't have `kizen-flag-custom-code-blocks` set to `'true'`, or the page is an older Kizen build without the hook. `refreshed: true` means the dashboard query was invalidated, not that the target was on screen, which is why the agent matches the tab by `url` and screenshots afterwards. Human output prints the same script on a `Refresh an open tab:` line after the URL.
|
|
307
|
+
|
|
308
|
+
A failure exits 1:
|
|
309
|
+
|
|
310
|
+
```json
|
|
311
|
+
{
|
|
312
|
+
"ok": false,
|
|
313
|
+
"code": "needs_choice",
|
|
314
|
+
"message": "Choose a block to update on \"Sales overview\", or create a new one; pass --dashlet <id> or --create.",
|
|
315
|
+
"choice": "target",
|
|
316
|
+
"choices": [
|
|
317
|
+
{
|
|
318
|
+
"value": "9a2d…",
|
|
319
|
+
"label": "Pipeline summary",
|
|
320
|
+
"args": ["--dashboard", "5f1e…", "--dashlet", "9a2d…"],
|
|
321
|
+
"pushKey": "appbuilder:my_plugin/pipeline_summary",
|
|
322
|
+
"isFromThisPlugin": true
|
|
323
|
+
},
|
|
324
|
+
{ "value": "new", "label": "Create a new block", "args": ["--dashboard", "5f1e…", "--create"] }
|
|
325
|
+
]
|
|
326
|
+
}
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
Optional failure fields: `choice` (`profile`, `block`, `dashboard` or `target`) and `choices` with `needs_choice`, `remembered_target_missing` and a `--dashlet` that is `not_found`; `issues` (the packager's validation issues) with `validation_failed`; `field` with `invalid_block`; `hint` with `auth_failed` and `forbidden`. Each choice's `args` are the exact CLI arguments that select it, to be appended to the command (dashboard choices also carry `surface` and `canEdit`).
|
|
330
|
+
|
|
331
|
+
| Code | Meaning |
|
|
332
|
+
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
333
|
+
| `needs_choice` | A profile, block, dashboard or target must be chosen; see `choice` and `choices` |
|
|
334
|
+
| `validation_failed` | The plugin failed validation |
|
|
335
|
+
| `invalid_block` | The plugin has no blocks, or the block would be rejected (`field` names the problem) |
|
|
336
|
+
| `credentials_invalid` | No usable credentials, or the file's `environment` is missing or invalid |
|
|
337
|
+
| `auth_failed` | Kizen rejected the credentials |
|
|
338
|
+
| `forbidden` | The credentials can't access the dashboard |
|
|
339
|
+
| `not_found` | The dashboard, or the `--dashlet` on it, doesn't exist |
|
|
340
|
+
| `remembered_target_missing` | The remembered dashboard or dashlet is gone; nothing is created without `--create` |
|
|
341
|
+
| `drift_detected` | The dashlet was edited in Kizen since the last push; `--force` overwrites |
|
|
342
|
+
| `production_requires_flag` | `--yes` against `go` / `fmo` without `--allow-production` |
|
|
343
|
+
| `usage_error` | Conflicting flags (`--dashlet` with `--create`, `--dashlet` without `--dashboard`), or a non-custom-code `--dashlet` |
|
|
344
|
+
| `network_error` | Kizen couldn't be reached |
|
|
345
|
+
| `api_error` | Any other Kizen API failure |
|
|
346
|
+
| `local_error` | A local failure that isn't a validation error: no `kizen.json`, packaging, reading `.kizenapp/pushes.json`, or writing it for `--forget` |
|
|
347
|
+
|
|
348
|
+
### `appbuilder block targets`
|
|
349
|
+
|
|
350
|
+
Lists where a block can be pushed: the business's dashboards and homepages plus its custom objects, or with `--object` one custom object's chart groups. Always headless.
|
|
351
|
+
|
|
352
|
+
The CLI honors `HTTP_PROXY`/`HTTPS_PROXY` and `NO_PROXY` on Node versions that support it (24.14+, or with `NODE_USE_ENV_PROXY=1` set).
|
|
353
|
+
|
|
354
|
+
`customObjects` is sorted by name and ends with Contacts (`"fetchUrl": "client"`) when the CLI can look up the business's contacts object; Kizen doesn't list Contacts with the other custom objects, so if that lookup fails the row is silently left out. `--object <contacts id>` lists Contacts' chart groups like any other object's.
|
|
355
|
+
|
|
356
|
+
| Flag | Default | Purpose |
|
|
357
|
+
| -------------------------- | ------------------- | --------------------------------------------------------- |
|
|
358
|
+
| `-c, --credentials <path>` | as for `block push` | Credentials JSON file to use |
|
|
359
|
+
| `--profile <name>` | as for `block push` | Stored credential profile to use |
|
|
360
|
+
| `--object <id>` | — | List the chart groups of this custom object (or Contacts) |
|
|
361
|
+
| `--json` | off | Print JSON instead of tables |
|
|
362
|
+
|
|
363
|
+
```json
|
|
364
|
+
{
|
|
365
|
+
"ok": true,
|
|
366
|
+
"environment": "staging",
|
|
367
|
+
"businessId": "b0c6…",
|
|
368
|
+
"surfaces": {
|
|
369
|
+
"dashboard": [
|
|
370
|
+
{
|
|
371
|
+
"id": "5f1e…",
|
|
372
|
+
"name": "Sales overview",
|
|
373
|
+
"type": "dashboard",
|
|
374
|
+
"dashletsCount": 4,
|
|
375
|
+
"employeeAccess": "Owner",
|
|
376
|
+
"hidden": false,
|
|
377
|
+
"canEdit": true
|
|
378
|
+
}
|
|
379
|
+
],
|
|
380
|
+
"homepage": []
|
|
381
|
+
},
|
|
382
|
+
"customObjects": [
|
|
383
|
+
{ "id": "71d0…", "objectName": "Deals", "fetchUrl": "pipeline" },
|
|
384
|
+
{ "id": "c3a9…", "objectName": "Contacts", "fetchUrl": "client" }
|
|
385
|
+
]
|
|
386
|
+
}
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
With `--object <id>` the shape is `{ ok, environment, businessId, object: { id, objectName, fetchUrl } | null, surfaces: { chart_group: [...] } }`. `canEdit` is `true` for `Owner`, `Admin` or `Edit` access and `null` when Kizen reports no access level. Failures use the same shape and codes as `block push`.
|
|
390
|
+
|
|
391
|
+
#### Agent loop
|
|
392
|
+
|
|
393
|
+
The sequence a coding agent follows to build a block and put it on a dashboard. After upgrading the CLI, run `appbuilder setup-claude` so the agent's skill matches the new commands.
|
|
394
|
+
|
|
395
|
+
```sh
|
|
396
|
+
appbuilder block export <api_name>
|
|
397
|
+
appbuilder block targets --json
|
|
398
|
+
appbuilder block targets --object <object_id> --json # chart groups only
|
|
399
|
+
appbuilder block push <api_name> --dashboard <id> --json # needs_choice → choices (existing blocks + new)
|
|
400
|
+
appbuilder block push <api_name> --dashboard <id> [--dashlet <id> | --create] --dry-run --json
|
|
401
|
+
appbuilder block push <api_name> --dashboard <id> [--dashlet <id> | --create] --yes --json
|
|
402
|
+
# change requests: edit, re-validate, then
|
|
403
|
+
appbuilder block push <api_name> --yes --json # remembered target, zero questions
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
After each applied push, an agent that can drive the user's browser refreshes the open tab instead of reloading it: find the tab whose origin and path match `url`, run `refresh.script` there, and check that the block rendered. If the script returns `undefined`, the hook isn't available on that page, so navigate the tab to `url` instead. If no tab has `url` open, open it in a new one. `refresh` is absent when the dashboard id isn't a uuid; navigate to `url` in that case.
|
|
407
|
+
|
|
408
|
+
Guardrails:
|
|
409
|
+
|
|
410
|
+
- Never pass `--allow-production` unless the user named production.
|
|
411
|
+
- Stop on `drift_detected` and ask the user before retrying with `--force`.
|
|
412
|
+
- On `needs_choice`, ask the user using `choices` (labels to show, `args` to append).
|
|
413
|
+
- On `remembered_target_missing`, ask whether to `--create` a new block rather than creating one.
|
|
414
|
+
|
|
189
415
|
## Reference
|
|
190
416
|
|
|
191
417
|
### Environment variables
|
|
@@ -207,6 +433,7 @@ Prod follows the same order minus step 3: `PLUGIN_WIZARD_URL`, then **`PLUGIN_WI
|
|
|
207
433
|
| ------------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
|
208
434
|
| `bundle.json` | The packaged, minified, validated plugin bundle the viewer loads. |
|
|
209
435
|
| `config.json` | Per-project preferences: credential mode, active profile name, last viewed path, encryption target. |
|
|
436
|
+
| `pushes.json` | The remembered `block push` targets: one dashlet per environment, business, plugin and block. |
|
|
210
437
|
| `.chrome/` | The dedicated Chromium user-data directory for the viewer — cookies and session state included. |
|
|
211
438
|
| `venv/` | The Python virtualenv used to execute code steps locally. Rebuilt when its interpreter is too old for the bundled requirements. |
|
|
212
439
|
|
package/dist/index.css
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.hello-frame{padding:16px;font-family:system-ui,sans-serif}.hello-frame__title{margin:0 0 8px;font-size:16px}.hello-frame__body{margin:0;color:#555}.hello-block{padding:16px;font-family:system-ui,sans-serif;background:#f8fafc;border-radius:6px}.hello-block__title{margin:0 0 8px;font-size:16px}.hello-block__body{margin:0;color:#555}.hello-page{padding:24px;font-family:system-ui,sans-serif}.hello-page__title{margin:0 0 8px;font-size:20px}.hello-page__body{margin:0 0 16px;color:#555}.hello-page__loading{margin:0;color:#94a3b8}.hello-page__actions{display:flex;gap:8px}.hello-page__button{padding:6px 12px;font:inherit;color:#0f172a;background:#e2e8f0;border:0;border-radius:4px;cursor:pointer}.hello-page__button:hover{background:#cbd5e1}
|
|
2
|
+
/*# sourceMappingURL=index.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["raw:/Users/keegan/Developer/app-builder/src/templates/artifacts/floatingFrames/helloFrame/styles.css","raw:/Users/keegan/Developer/app-builder/src/templates/artifacts/blocks/helloBlock/styles.css","raw:/Users/keegan/Developer/app-builder/src/templates/artifacts/pages/helloPage/styles.css"],"sourcesContent":["/* Packaged as the frame's `css` and injected when it renders. Keep class\n names specific to this artifact so they can't collide with another one. */\n\n.hello-frame {\n padding: 16px;\n font-family: system-ui, sans-serif;\n}\n\n.hello-frame__title {\n margin: 0 0 8px;\n font-size: 16px;\n}\n\n.hello-frame__body {\n margin: 0;\n color: #555;\n}\n","/* Packaged as the block's `styles` and injected when it renders. */\n\n.hello-block {\n padding: 16px;\n font-family: system-ui, sans-serif;\n background: #f8fafc;\n border-radius: 6px;\n}\n\n.hello-block__title {\n margin: 0 0 8px;\n font-size: 16px;\n}\n\n.hello-block__body {\n margin: 0;\n color: #555;\n}\n","/* Packaged as the page's `css` and injected when the page renders. */\n\n.hello-page {\n padding: 24px;\n font-family: system-ui, sans-serif;\n}\n\n.hello-page__title {\n margin: 0 0 8px;\n font-size: 20px;\n}\n\n.hello-page__body {\n margin: 0 0 16px;\n color: #555;\n}\n\n.hello-page__loading {\n margin: 0;\n color: #94a3b8;\n}\n\n.hello-page__actions {\n display: flex;\n gap: 8px;\n}\n\n.hello-page__button {\n padding: 6px 12px;\n font: inherit;\n color: #0f172a;\n background: #e2e8f0;\n border: 0;\n border-radius: 4px;\n cursor: pointer;\n}\n\n.hello-page__button:hover {\n background: #cbd5e1;\n}\n"],"mappings":"AAGA,CAAC,YAHD,QAIW,KACT,YAAa,SAAS,CAAE,UAC1B,CAEA,CAAC,mBARD,OASU,EAAE,EAAE,IACZ,UAAW,IACb,CAEA,CAAC,kBAbD,OAcU,EACR,MAAO,IACT,CCdA,CAAC,YAFD,QAGW,KACT,YAAa,SAAS,CAAE,WACxB,WAAY,QALd,cAMiB,GACjB,CAEA,CAAC,mBATD,OAUU,EAAE,EAAE,IACZ,UAAW,IACb,CAEA,CAAC,kBAdD,OAeU,EACR,MAAO,IACT,CCfA,CAAC,WAFD,QAGW,KACT,YAAa,SAAS,CAAE,UAC1B,CAEA,CAAC,kBAPD,OAQU,EAAE,EAAE,IACZ,UAAW,IACb,CAEA,CAAC,iBAZD,OAaU,EAAE,EAAE,KACZ,MAAO,IACT,CAEA,CAAC,oBAjBD,OAkBU,EACR,MAAO,OACT,CAEA,CAAC,oBACC,QAAS,KACT,IAAK,GACP,CAEA,CAAC,mBA3BD,QA4BW,IAAI,KACb,KAAM,QACN,MAAO,QACP,WAAY,QACZ,OAAQ,EAhCV,cAiCiB,IACf,OAAQ,OACV,CAEA,CAVC,kBAUkB,OACjB,WAAY,OACd","names":[]}
|