@lotics/cli 0.76.0 → 0.83.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/dist/client.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { KnowledgeUpgradeEntry, ModifiedArtifact, PackageContentBinding, UpgradeResolutions } from "@lotics/shared/schemas/packages";
1
2
  /**
2
3
  * The error message for a non-ok response. A genuine JSON error (a 4xx carrying
3
4
  * a `message`) surfaces verbatim; a non-JSON body (a gateway HTML page), any
@@ -43,14 +44,6 @@ export interface WorkspaceInfo {
43
44
  default_currency: string;
44
45
  organization_id: string;
45
46
  created_at: string;
46
- /**
47
- * Whether this is a throwaway app-package dev workspace (set with
48
- * `lotics workspace create <name> --dev`). Gates the destructive package
49
- * dev/sync scaffold + the server-side `package reset`. Optional because the
50
- * list endpoint only carries it once the server serializes `is_dev`; an absent
51
- * value is treated as non-dev by the guard (fail closed).
52
- */
53
- is_dev?: boolean;
54
47
  }
55
48
  export interface ToolExecuteResult {
56
49
  result: unknown;
@@ -73,28 +66,33 @@ export interface FileUploadResult {
73
66
  error: string;
74
67
  }>;
75
68
  }
76
- /**
77
- * A materialized app package's binding — alias → this workspace's concrete id,
78
- * one string-map per namespace. Mirrors the server's `bindingSchema`. The
79
- * `workflows` map is the entity-lifecycle table-workflow ROW ledger (an artifact
80
- * registry, not a schema binding), carried in the same shape. The CLI never
81
- * interprets these maps — it round-trips them verbatim between `extract` (which
82
- * emits the origin workspace's) and `adopt` (which replays it onto the app).
83
- */
84
- export interface PackageBinding {
85
- entities: Record<string, string>;
86
- fields: Record<string, string>;
87
- options: Record<string, string>;
88
- templates: Record<string, string>;
89
- roles: Record<string, string>;
90
- workflows: Record<string, string>;
91
- }
92
- /** One finding from a bespoke→package extraction (`extractAppPackage`). */
69
+ /** One finding from a package publish/release extract. */
93
70
  export interface ExtractFinding {
94
71
  severity: "error" | "warning" | "info";
95
72
  area: string;
96
73
  message: string;
97
74
  }
75
+ /** A package's kind — a full app blueprint, or a standalone content package. */
76
+ export type PackageKind = "app" | "content";
77
+ /** One workspace's installation of a package's content (the standalone anchor). */
78
+ export interface ContentInstallation {
79
+ id: string;
80
+ workspace_id: string;
81
+ package_id: string;
82
+ package_version: number;
83
+ /** Set when the content arrived bundled with an app install; null for a standalone content package. */
84
+ app_id: string | null;
85
+ /** The namespaced content binding: `knowledge` (alias → `kdc_` id) + `templates` (alias → `tmpl_` id). */
86
+ binding: PackageContentBinding;
87
+ installed_by: string | null;
88
+ created_at: string;
89
+ updated_at: string;
90
+ }
91
+ /** Advisory knowledge warnings surfaced by install/upgrade (never block). */
92
+ export interface KnowledgeWarnings {
93
+ /** `knowledge_expects` doc names with no matching workspace doc. */
94
+ missing_expected_docs: string[];
95
+ }
98
96
  export declare const API_BASE_URL: string;
99
97
  export declare class LoticsClient {
100
98
  private apiKey;
@@ -121,16 +119,9 @@ export declare class LoticsClient {
121
119
  /** The workspace id the client targets (the `x-workspace-id` header), if resolved. */
122
120
  getWorkspaceId(): string | undefined;
123
121
  listWorkspaces(): Promise<WorkspaceInfo[]>;
124
- /**
125
- * Resolve one workspace's info by id from the org's workspace list (the only
126
- * API-key-accessible source carrying `is_dev`). Returns null when the
127
- * workspace isn't visible to these credentials.
128
- */
129
- getWorkspaceInfo(id: string): Promise<WorkspaceInfo | null>;
130
122
  createWorkspace(body: {
131
123
  name: string;
132
124
  timezone?: string;
133
- is_dev?: boolean;
134
125
  }): Promise<WorkspaceInfo>;
135
126
  deleteWorkspace(id: string): Promise<{
136
127
  id: string;
@@ -222,24 +213,94 @@ export declare class LoticsClient {
222
213
  current_version_id: string | null;
223
214
  }>;
224
215
  /**
225
- * Install an app package version into the current workspace — scaffolds the
226
- * data model, deploys the package bundle, materializes its
227
- * queries/workflows/agents, and pins the installation. Returns the resulting
228
- * installation app. `version` omitted installs the latest published version.
216
+ * Install a package version into the current workspace — ONE endpoint,
217
+ * kind-branched into a discriminated response (`kind`). An `app` package
218
+ * scaffolds the data model / deploys / materializes and returns the installation
219
+ * app (+ advisory knowledge warnings); a `content` package installs only its
220
+ * doc corpus and returns the installation row. `bind_to` (content only)
221
+ * resolves a name collision by adopting an existing same-named doc as
222
+ * package-managed. `version` omitted installs the latest published version.
229
223
  */
230
- installAppPackage(package_id: string, body: {
224
+ installPackage(package_id: string, body: {
231
225
  version?: number;
226
+ /** Content-kind only: consent to adopt a same-named workspace doc on a knowledge collision. */
227
+ bind_to?: Record<string, string>;
228
+ /** App-kind only: per-knob config overrides applied over the contract defaults at install. */
232
229
  config?: Record<string, string | number | boolean>;
233
230
  }): Promise<{
234
- id: string;
235
- name: string;
236
- workspace_id: string;
237
- package_id: string | null;
238
- package_version: number | null;
239
- current_version_id: string | null;
231
+ kind: "app";
232
+ app: {
233
+ id: string;
234
+ name: string;
235
+ workspace_id: string;
236
+ package_id: string | null;
237
+ package_version: number | null;
238
+ current_version_id: string | null;
239
+ };
240
+ knowledge_warnings: KnowledgeWarnings;
241
+ } | {
242
+ kind: "content";
243
+ installation: ContentInstallation;
244
+ warnings: KnowledgeWarnings;
245
+ }>;
246
+ /**
247
+ * Uninstall a standalone content package — delete the installation row. By
248
+ * default the package-bound docs are ARCHIVED; `keep_content` retains them as
249
+ * ordinary workspace docs. Admin-only. Backs `lotics uninstall`.
250
+ */
251
+ uninstallContentPackage(installation_id: string, opts?: {
252
+ keep_content?: boolean;
253
+ }): Promise<{
254
+ installation_id: string;
255
+ archived_doc_ids: string[];
256
+ archived_template_ids: string[];
257
+ deleted: true;
240
258
  }>;
241
259
  /**
242
- * Uninstall a package installation (backs `lotics package uninstall`). Does
260
+ * Preview upgrading a standalone content installation the knowledge namespace's
261
+ * per-alias `entries` (added/changed/removed/drifted + a `modified` flag) plus the
262
+ * consent-requiring `templates` (a template the target changed whose live content
263
+ * was locally edited; a clean one auto-updates and is absent). No writes.
264
+ * Admin-only.
265
+ */
266
+ previewContentInstallationUpgrade(installation_id: string, opts?: {
267
+ version?: number;
268
+ }): Promise<{
269
+ installation_id: string;
270
+ package_id: string;
271
+ from_version: number;
272
+ to_version: number;
273
+ changelog: string | null;
274
+ update_available: boolean;
275
+ entries: KnowledgeUpgradeEntry[];
276
+ templates: ModifiedArtifact[];
277
+ }>;
278
+ /**
279
+ * Apply a standalone content upgrade — propagate the target version's content per
280
+ * the resolutions (`knowledge`: a modified change/removal or drift needs consent;
281
+ * `templates`: a locally-edited changed template takes revert|keep), then advance
282
+ * the pin + binding. Returns the updated installation row. Admin-only.
283
+ */
284
+ applyContentInstallationUpgrade(installation_id: string, body: {
285
+ version?: number;
286
+ resolutions?: UpgradeResolutions;
287
+ }): Promise<ContentInstallation>;
288
+ /**
289
+ * List a workspace's package-managed knowledge installations, each folded with
290
+ * registry status (name, kind, official badge, latest version, update-available).
291
+ * Member-accessible (workspace-scoped); backs the settings "Managed by" badge.
292
+ */
293
+ listContentInstallations(workspace_id: string): Promise<Array<ContentInstallation & {
294
+ package_registry: {
295
+ name: string;
296
+ kind: PackageKind;
297
+ is_official: boolean;
298
+ latest_version: number;
299
+ update_available: boolean;
300
+ } | null;
301
+ }>>;
302
+ /**
303
+ * Uninstall a package installation (backs `lotics uninstall`). Does
243
304
  * everything DELETE does plus archives the installation's lifecycle
244
305
  * artifacts; with `archive_tables` it also archives the scaffolded entity
245
306
  * tables — refused server-side unless this installation created them
@@ -263,12 +324,13 @@ export declare class LoticsClient {
263
324
  config: Record<string, string | number | boolean>;
264
325
  }>;
265
326
  /**
266
- * Retire (or `undo` un-retire) a registry package (backs `lotics package
267
- * retire`). Retiring refuses NEW installs and hides the package from
268
- * non-owning orgs; existing installations keep working and may still upgrade.
269
- * Owner-org admin-only.
327
+ * Retire (or `undo` un-retire) a registry package (backs `lotics app
328
+ * unpublish` the endpoint/audit action keep the `retire` name to avoid API
329
+ * churn). Retiring refuses NEW installs and hides the package from non-owning
330
+ * orgs; existing installations keep working and may still upgrade. Owner-org
331
+ * admin-only.
270
332
  */
271
- retireAppPackage(package_id: string, body: {
333
+ retirePackage(package_id: string, body: {
272
334
  undo: boolean;
273
335
  }): Promise<{
274
336
  id: string;
@@ -282,57 +344,18 @@ export declare class LoticsClient {
282
344
  * app becomes a normal bespoke app and can no longer be upgraded. Returns the
283
345
  * resulting app.
284
346
  */
285
- ejectAppPackage(app_id: string): Promise<{
347
+ ejectPackage(app_id: string): Promise<{
286
348
  id: string;
287
349
  name: string;
288
350
  workspace_id: string;
289
351
  current_version_id: string | null;
290
352
  }>;
291
- /**
292
- * Extract a DRAFT app package from an existing bespoke app — the promotion
293
- * read (docs/app_packages.md § Promotion). Pure: nothing is written. Returns
294
- * the alias-keyed draft `contract` (opaque to the CLI — the server is the
295
- * validating authority), the origin workspace's `binding` (which doubles as
296
- * the adopt binding), a findings `report` (any `error` ⇒ not publishable
297
- * as-is), and the file-backed `template_files` the CLI must stage into the
298
- * project at their `bytes_ref` paths. Backs `lotics package extract`.
299
- * Admin-only.
300
- */
301
- extractAppPackage(app_id: string): Promise<{
302
- contract: unknown;
303
- binding: PackageBinding;
304
- report: ExtractFinding[];
305
- template_files: Array<{
306
- bytes_ref: string;
307
- file_id: string;
308
- filename: string;
309
- }>;
310
- }>;
311
- /**
312
- * Adopt a published package onto an EXISTING (bespoke or ejected) app — the
313
- * final promotion step. The workspace already holds the concrete objects, so
314
- * nothing is scaffolded or rewritten: the server verifies the `binding` is
315
- * complete, live, and FAITHFUL to the version's contract, then writes only the
316
- * installation pin (the app becomes installation #1, upgradeable again). A
317
- * ConflictError names the aliases that diverge. `version` omitted adopts the
318
- * latest. Backs `lotics package adopt`. Admin-only.
319
- */
320
- adoptAppPackage(app_id: string, body: {
321
- package_id: string;
322
- version?: number;
323
- binding: PackageBinding;
324
- }): Promise<{
325
- id: string;
326
- name: string;
327
- package_id: string | null;
328
- package_version: number | null;
329
- }>;
330
353
  /**
331
354
  * Fleet upgrade — bring every installation of a package across the CALLER'S
332
355
  * org to the target version (latest when omitted) in one call. Hands-off
333
356
  * applies only where the preview is clean; installations with breaking/
334
357
  * drift/modified-core findings are skipped and reported for the normal
335
- * per-installation consent flow. Backs `lotics package fleet-upgrade`.
358
+ * per-installation consent flow. Backs `lotics upgrade <package_id>` (fleet).
336
359
  * Admin-only; org-scoped (no workspace header needed).
337
360
  */
338
361
  /**
@@ -340,13 +363,13 @@ export declare class LoticsClient {
340
363
  * adopts targeting it; pinned installations keep running. Owner-org
341
364
  * admin-only. Backs `lotics package yank`.
342
365
  */
343
- yankAppPackageVersion(package_id: string, version: number, yanked: boolean): Promise<{
366
+ yankPackageVersion(package_id: string, version: number, yanked: boolean): Promise<{
344
367
  package_id: string;
345
368
  version: number;
346
369
  yanked_at: string | null;
347
370
  latest_version: number;
348
371
  }>;
349
- fleetUpgradeAppPackage(package_id: string, body: {
372
+ fleetUpgradePackage(package_id: string, body: {
350
373
  version?: number;
351
374
  }): Promise<{
352
375
  package_id: string;
@@ -367,31 +390,14 @@ export declare class LoticsClient {
367
390
  }>;
368
391
  }>;
369
392
  /**
370
- * Create a registry app package the Lotics-owned, workspace-agnostic
371
- * blueprint. `lotics package publish` calls this on first publish (when the
372
- * local manifest has no `package_id`), then publishes version 1 against the
373
- * returned id. Admin-only.
374
- */
375
- createAppPackage(body: {
376
- name: string;
377
- description?: string | null;
378
- }): Promise<{
379
- id: string;
380
- name: string;
381
- description: string | null;
382
- latest_version: number;
383
- is_official: boolean;
384
- created_at: string;
385
- updated_at: string;
386
- }>;
387
- /**
388
- * Fetch a registry app package's metadata (incl. `latest_version` and the
389
- * Lotics-backed `is_official` trust badge). Admin-only; cross-tenant by id.
393
+ * Fetch a registry app package's metadata (incl. `kind`, `latest_version` and
394
+ * the Lotics-backed `is_official` trust badge). Admin-only; cross-tenant by id.
390
395
  */
391
- getAppPackage(package_id: string): Promise<{
396
+ getPackage(package_id: string): Promise<{
392
397
  id: string;
393
398
  name: string;
394
399
  description: string | null;
400
+ kind: PackageKind;
395
401
  latest_version: number;
396
402
  is_official: boolean;
397
403
  retired_at: string | null;
@@ -401,7 +407,7 @@ export declare class LoticsClient {
401
407
  updated_at: string;
402
408
  }>;
403
409
  /** Version history newest-first (no contract payloads) — backs `lotics package show`. Admin-only. */
404
- listAppPackageVersions(package_id: string): Promise<{
410
+ listPackageVersions(package_id: string): Promise<{
405
411
  versions: Array<{
406
412
  version: number;
407
413
  changelog: string | null;
@@ -410,27 +416,6 @@ export declare class LoticsClient {
410
416
  created_at: string;
411
417
  }>;
412
418
  }>;
413
- /**
414
- * Publish a new immutable package version — multipart upload of the alias-keyed
415
- * contract (JSON) + the prebuilt code bundle (a gzipped tarball carrying
416
- * `source.tar.gz` + `dist.tar.gz` members). The server validates the contract +
417
- * bundle, then allocates the next monotonic version. The `contract` is opaque
418
- * JSON to the transport (the server is the validating authority). Admin-only.
419
- */
420
- publishAppPackageVersion(package_id: string, args: {
421
- contract: unknown;
422
- bundle: Buffer;
423
- changelog?: string | null;
424
- /** 'dev' = dev-loop publish: pinned by the dev installation, never the installable latest. */
425
- channel?: "release" | "dev";
426
- }): Promise<{
427
- id: string;
428
- package_id: string;
429
- version: number;
430
- bundle_r2_prefix: string;
431
- changelog: string | null;
432
- created_at: string;
433
- }>;
434
419
  /**
435
420
  * Upgrade a package installation to a newer published version — extends the
436
421
  * binding additively, re-materializes the target version's
@@ -438,17 +423,18 @@ export declare class LoticsClient {
438
423
  * package artifacts, and bumps the pin. `version` omitted upgrades to the
439
424
  * latest. Returns the resulting app. Admin-only.
440
425
  */
441
- upgradeAppPackage(app_id: string, body: {
426
+ upgradePackage(app_id: string, body: {
442
427
  version?: number;
443
428
  /**
444
- * Per preview finding: drifted binding entries (`<namespace>.<alias>`)
445
- * take `"recreate"` or `{ bind_to: "<id>" }`; locally modified
446
- * artifacts (`<kind>.<alias>`) take `"revert"` or `"keep"`. Required
447
- * for every finding anything unresolved refuses the upgrade.
429
+ * ONE map, one namespaced grammar, per preview finding: a drifted binding
430
+ * entry (`<namespace>.<alias>`) takes `"recreate"` or `{ bind_to }`; a
431
+ * modified artifact (`<kind>.<alias>`) takes `"revert"` or `"keep"`; a
432
+ * bundled knowledge doc (`knowledge.<alias>`) takes
433
+ * `apply|keep|archive|recreate|unbind` or `{ bind_to: "<kdc_id>" }`; and
434
+ * `roles.<alias> = { bind_to: "<grp_id>" }` re-points a LIVE role.
435
+ * Required for every finding — anything unresolved refuses the upgrade.
448
436
  */
449
- resolutions?: Record<string, "recreate" | "revert" | "keep" | {
450
- bind_to: string;
451
- }>;
437
+ resolutions?: UpgradeResolutions;
452
438
  }): Promise<{
453
439
  id: string;
454
440
  name: string;
@@ -462,7 +448,7 @@ export declare class LoticsClient {
462
448
  * breaking contract changes, the binding drift report, and the modified-core
463
449
  * report — with no writes. Admin-only.
464
450
  */
465
- previewAppPackageUpgrade(app_id: string, opts?: {
451
+ previewPackageUpgrade(app_id: string, opts?: {
466
452
  version?: number;
467
453
  }): Promise<{
468
454
  app_id: string;
@@ -480,6 +466,9 @@ export declare class LoticsClient {
480
466
  from: string;
481
467
  to: string;
482
468
  }>;
469
+ changed: {
470
+ templates: string[];
471
+ };
483
472
  };
484
473
  drift: Array<{
485
474
  namespace: string;
@@ -489,21 +478,14 @@ export declare class LoticsClient {
489
478
  modified: Array<{
490
479
  kind: string;
491
480
  alias: string;
481
+ baseline_unknown?: boolean;
492
482
  }>;
493
- }>;
494
- /**
495
- * Re-bind a package role to a different workspace group (the current group
496
- * still exists). Re-materializes at the pinned version; refuses over
497
- * modified-core findings. Admin-only.
498
- */
499
- rebindAppPackageRole(app_id: string, body: {
500
- role_alias: string;
501
- group_id: string;
502
- }): Promise<{
503
- app_id: string;
504
- role_alias: string;
505
- group_id: string;
506
- previous_group_id: string | null;
483
+ /**
484
+ * Bundled package-managed knowledge docs the version bump adds/changes/
485
+ * removes/drifts the app-install analogue of a standalone knowledge
486
+ * upgrade's `entries`. Consent-requiring docs resolve via `knowledge.<alias>` resolutions.
487
+ */
488
+ knowledge: KnowledgeUpgradeEntry[];
507
489
  }>;
508
490
  /**
509
491
  * Workspace-wide dangling-reference sweep — active app/workflow artifacts
@@ -524,10 +506,12 @@ export declare class LoticsClient {
524
506
  * binding drift, and locally modified core artifacts. Read-only; backs
525
507
  * `lotics package doctor`. Admin-only.
526
508
  */
527
- getAppPackageHealth(app_id: string): Promise<{
509
+ getPackageHealth(app_id: string): Promise<{
528
510
  app_id: string;
529
511
  package_id: string;
530
512
  package_name: string;
513
+ /** The author's origin copy (installation #1) — doctor frames modified core as staged release work, not drift. */
514
+ is_origin: boolean;
531
515
  installed_version: number;
532
516
  latest_version: number;
533
517
  update_available: boolean;
@@ -540,20 +524,106 @@ export declare class LoticsClient {
540
524
  kind: string;
541
525
  alias: string;
542
526
  }>;
527
+ /** Package-managed knowledge docs whose bound id no longer resolves (recreate/unbind at upgrade). */
528
+ knowledge_drift: Array<{
529
+ alias: string;
530
+ name: string;
531
+ doc_id: string | null;
532
+ }>;
533
+ /** Package-managed knowledge docs the workspace edited since install (apply/keep at upgrade). */
534
+ knowledge_modified: Array<{
535
+ alias: string;
536
+ name: string;
537
+ doc_id: string | null;
538
+ }>;
539
+ /** `knowledge_expects` names the package's agents route to but it does not own (advisory). */
540
+ missing_expected_docs: string[];
543
541
  }>;
544
542
  /**
545
- * Reset a package installation in a DEV workspace drop the package-owned
546
- * scaffolded tables and re-scaffold clean. Hard-gated server-side to dev
547
- * workspaces (a non-dev workspace is refused). Returns the resulting app.
548
- * Admin-only.
543
+ * Preview a release the dry run behind `lotics app release`. Runs the
544
+ * binding-aware extract of the origin (aliases stable through the app's current
545
+ * binding) and reports the next version number, the new + changed aliases, and
546
+ * any extract findings (an `error` blocks the apply). No writes. Admin,
547
+ * owning-org only.
549
548
  */
550
- resetAppPackage(app_id: string): Promise<{
551
- id: string;
552
- name: string;
553
- workspace_id: string;
554
- package_id: string | null;
555
- package_version: number | null;
556
- current_version_id: string | null;
549
+ previewPackageRelease(app_id: string): Promise<{
550
+ package_id: string;
551
+ version: number;
552
+ added_aliases: string[];
553
+ changed_artifacts: string[];
554
+ findings: ExtractFinding[];
555
+ }>;
556
+ /**
557
+ * Release — snapshot the origin app into the next registry version. The server
558
+ * binding-aware-extracts it, repackages its deployed source + dist as the
559
+ * bundle, publishes the next `release`-channel version with the changelog, and
560
+ * re-pins the origin. Error findings from extract surface as a 409. Admin,
561
+ * owning-org only. Backs `lotics app release --yes`.
562
+ */
563
+ releasePackage(app_id: string, body: {
564
+ changelog: string;
565
+ }): Promise<{
566
+ package_id: string;
567
+ version: number;
568
+ added_aliases: string[];
569
+ changed_artifacts: string[];
570
+ }>;
571
+ /**
572
+ * Dry-run preview of a first-release — the `GET` behind `lotics app publish`
573
+ * (no `--yes`), the publish-side analogue of `previewPackageRelease`. The
574
+ * server runs the same fresh-alias extract + `src/` scan the apply runs
575
+ * (through any `renames`) and returns the package name it would mint, the
576
+ * auto-minted RENAMABLE aliases (the exact `--rename` keys), and the extract
577
+ * findings (an `error` blocks the apply). No writes. Admin-only.
578
+ */
579
+ previewPublishAppPackage(app_id: string, opts?: {
580
+ renames?: Array<{
581
+ from: string;
582
+ to: string;
583
+ }>;
584
+ /** alias → doc_id for the app's package-managed knowledge (from its manifest). */
585
+ knowledge?: Array<{
586
+ alias: string;
587
+ doc_id: string;
588
+ }>;
589
+ }): Promise<{
590
+ app_id: string;
591
+ package_name: string;
592
+ renamable_aliases: {
593
+ entities: string[];
594
+ fields: string[];
595
+ options: string[];
596
+ roles: string[];
597
+ templates: string[];
598
+ workflows: string[];
599
+ };
600
+ findings: ExtractFinding[];
601
+ }>;
602
+ /**
603
+ * First-release apply — mint a package from a BESPOKE app and publish v1 in one
604
+ * call (the `POST` behind `lotics app publish --yes`). The server extracts an
605
+ * alias-keyed contract from the app (fresh aliases; `renames` fixes them before
606
+ * v1 freezes), creates the registry package (name/description from the app),
607
+ * publishes v1 from the app's deployed source + dist, and pins the origin as
608
+ * installation #1. Error findings from extract surface as a 409. An
609
+ * already-linked app must use `releasePackage` instead. Admin-only. Backs
610
+ * `lotics app publish <app_id>`.
611
+ */
612
+ publishAppAsPackage(app_id: string, body: {
613
+ renames?: Array<{
614
+ from: string;
615
+ to: string;
616
+ }>;
617
+ changelog?: string | null;
618
+ /** alias → doc_id for the app's package-managed knowledge (from its manifest). */
619
+ knowledge?: Array<{
620
+ alias: string;
621
+ doc_id: string;
622
+ }>;
623
+ }): Promise<{
624
+ package_id: string;
625
+ version: number;
626
+ app_id: string;
557
627
  }>;
558
628
  /**
559
629
  * Resolve the display name + fields (incl. select options) of the given tables