@lotics/cli 0.86.1 → 0.87.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/cli",
3
- "version": "0.86.1",
3
+ "version": "0.87.0",
4
4
  "description": "Lotics SDK and CLI for AI agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,221 +0,0 @@
1
- import { LoticsClient, type ExtractFinding } from "./client.js";
2
- import { type UpgradeResolutions } from "@lotics/shared/schemas/packages";
3
- /**
4
- * Read the local APP project's manifest (`package.json#lotics.app_id` +
5
- * `lotics.knowledge`) — what `lotics app pull` writes. `lotics app publish` /
6
- * `release` run from a pulled app project resolve the app id from it, and
7
- * `publish` forwards the package-managed knowledge declaration to the server
8
- * (agents reference docs by free text, so the author declares which the package
9
- * owns). Returns null when the dir has no package.json. `app_id` is null when the
10
- * manifest is a package/non-app project.
11
- */
12
- export declare function readLocalAppManifest(projectDir: string): {
13
- app_id: string | null;
14
- knowledge: Array<{
15
- alias: string;
16
- doc_id: string;
17
- }>;
18
- } | null;
19
- /** Parse repeated `--rename old=new` flags into `{ from, to }[]` (first-publish alias fixes). */
20
- export declare function parseRenameFlags(renames: string[]): Array<{
21
- from: string;
22
- to: string;
23
- }>;
24
- /**
25
- * Render a package-extract report grouped by severity (errors, then warnings,
26
- * then info), one ` [<severity>] <area>: <message>` line each, and classify
27
- * whether any `error` finding is present. Shared by the release preview display.
28
- * Pure — the command prints `lines` to stderr and gates on `hasError`.
29
- */
30
- export declare function formatExtractReport(report: ExtractFinding[]): {
31
- lines: string[];
32
- hasError: boolean;
33
- };
34
- /**
35
- * Parse repeated `--resolve <key>=<value>` flags into the ONE namespaced
36
- * resolutions map every upgrade wire takes. Keys pass through verbatim — a
37
- * drifted binding entry (`<namespace>.<alias>`), a modified artifact
38
- * (`<kind>.<alias>`), a bundled/standalone knowledge doc (`knowledge.<alias>`),
39
- * or a live-role re-point (`roles.<alias>`). A value that is one of the
40
- * resolution verbs stays a verb; anything else is a `{ bind_to }` id. The
41
- * server validates value-kind against what each key resolves.
42
- */
43
- export declare function parseResolveFlags(resolve: string[]): UpgradeResolutions;
44
- /**
45
- * Health check: version pin vs. registry latest + binding drift. Exits
46
- * non-zero when drift is found so scripts can gate on it.
47
- */
48
- export declare function packageDoctor(client: LoticsClient, args: {
49
- app_id?: string;
50
- }): Promise<void>;
51
- /**
52
- * Preview-then-apply an app-installation upgrade. Prints the additive plan +
53
- * informational removals + any bundled-knowledge changes; refuses (exit 1, with
54
- * the exact --resolve syntax) while any binding drift, modified core artifact, or
55
- * consent-requiring bundled-knowledge doc lacks a resolution.
56
- *
57
- * `--resolve` speaks ONE namespaced grammar, passed to the server verbatim: a
58
- * drifted binding entry (`<namespace>.<alias>`), a modified artifact
59
- * (`<kind>.<alias>`), a bundled knowledge doc (`knowledge.<alias>` —
60
- * apply|keep|archive|recreate|unbind), or a live-role re-point
61
- * (`roles.<alias>=<grp_id>`). `--bind-to` consents an added-knowledge-doc name
62
- * collision; `--apply-all` accepts the package's version for every
63
- * consent-requiring knowledge doc (overwriting local edits).
64
- */
65
- export declare function packageUpgrade(client: LoticsClient, args: {
66
- app_id: string;
67
- version?: number;
68
- resolve: string[];
69
- bindTo: string[];
70
- applyAll: boolean;
71
- }): Promise<void>;
72
- /**
73
- * `lotics package show <package_id>` — registry metadata + version history
74
- * (trust badge, retirement, per-version channel/yank/changelog). The read
75
- * surface for "what is this package and what shipped when". Kind-agnostic — a
76
- * content package shows here the same way.
77
- */
78
- export declare function packageShow(client: LoticsClient, args: {
79
- package_id: string;
80
- }): Promise<void>;
81
- /**
82
- * CLEAN BREAK for an explicit `pci_` argument on `upgrade` / `uninstall`: the
83
- * `pci_` resource id is retired from human sight — content installs are addressed
84
- * by their PACKAGE id. Prints a loud redirect, best-effort resolving the `pci_`
85
- * back to its package id (via list-content) so the exact command is spelled out.
86
- * The header prints synchronously first, so the redirect is observable even when
87
- * the best-effort resolution can't reach the registry.
88
- */
89
- export declare function redirectContentPciForm(client: LoticsClient, pci_id: string, verb: "upgrade" | "uninstall"): Promise<never>;
90
- /**
91
- * `lotics upgrade <apg_>` — the package-id upgrade path, kind-branched. `kind` is a
92
- * DERIVED display hint (`contractHasAppSurface`): `'content'` means no app surface.
93
- * - a CONTENT package upgrades THIS workspace's standalone content installation
94
- * (resolved from the package id — the anchor is unique per workspace, so the
95
- * `pci_` never surfaces), through the same content review gate.
96
- * - an APP-surface package FLEET-upgrades every installation across the org
97
- * (unchanged) — the resolve/bind/apply-all flags don't apply to a fleet run.
98
- */
99
- export declare function packageUpgradeByPackageId(client: LoticsClient, args: {
100
- package_id: string;
101
- version?: number;
102
- resolve: string[];
103
- bindTo: string[];
104
- applyAll: boolean;
105
- }): Promise<void>;
106
- /** Parse repeated `--bind-to alias=kdc_id` flags into an alias → doc-id consent map. */
107
- export declare function parseBindToFlags(bindTo: string[]): Record<string, string>;
108
- export declare function packageInstall(client: LoticsClient, args: {
109
- package_id: string;
110
- version?: number;
111
- /** Content-kind only: adopt a same-named workspace doc on a knowledge collision. */
112
- bind_to?: Record<string, string>;
113
- /** App-kind only: per-knob config overrides applied over the contract defaults. */
114
- config?: Record<string, string | number | boolean>;
115
- }): Promise<void>;
116
- /**
117
- * `lotics uninstall <app_id|package_id>` — ONE top-level command over both
118
- * installation kinds, dispatched by the id form (mirrors `lotics upgrade`):
119
- * - a package id (`apg_`) → THIS workspace's STANDALONE CONTENT installation
120
- * (content installs are addressed by package id, UNIQUE per workspace, so the
121
- * `pci_` resource id never surfaces): deletes the row and (unless
122
- * `--keep-content`) archives its package-bound docs AND templates, listing each
123
- * archived id.
124
- * - anything else (an `app_id`) → an APP installation: archives its workflow
125
- * artifacts and — with `--archive-tables` — the scaffolded entity tables
126
- * (provenance- + reference-gated server-side).
127
- * A flag used on the wrong path is a loud error, never silently ignored.
128
- */
129
- export declare function packageUninstall(client: LoticsClient, args: {
130
- id: string;
131
- keep_content: boolean;
132
- archive_tables: boolean;
133
- }): Promise<void>;
134
- /**
135
- * `lotics package list-content` — list the selected workspace's STANDALONE
136
- * content installations (an app-bundled corpus rides its app's
137
- * `binding.knowledge` and shows on the Apps surface instead), each with its
138
- * registry status. The what-is-installed listing: each row leads with the PACKAGE
139
- * id — the address for `lotics upgrade <package_id>` / `lotics uninstall
140
- * <package_id>` (the `pci_` resource id stays hidden).
141
- */
142
- export declare function packageListContent(client: LoticsClient): Promise<void>;
143
- export declare function packageEject(client: LoticsClient, args: {
144
- app_id: string;
145
- }): Promise<void>;
146
- /** `--config key=value` (install): inferred types, server-validated. */
147
- export declare function parseInstallConfigFlags(config: string[]): Record<string, string | number | boolean>;
148
- /**
149
- * `lotics package config <app_id>` — show the installation's effective config;
150
- * with `--set key=value` (repeatable) partial-merge edits, each value parsed by
151
- * the knob's current type. No `--set` prints the values.
152
- */
153
- export declare function packageConfig(client: LoticsClient, args: {
154
- app_id: string;
155
- sets: string[];
156
- }): Promise<void>;
157
- /**
158
- * `lotics app unpublish <app_id|package_id> [--undo]` — take a published package
159
- * off the shelf (or `--undo` restore it): new installs refuse it and it hides
160
- * from other orgs, while existing installations keep working and may still
161
- * upgrade. Given an app id (an installation of the package) it resolves the
162
- * package from the app; a package id targets it directly. Owner-org admin-only.
163
- */
164
- export declare function appUnpublish(client: LoticsClient, args: {
165
- id: string;
166
- undo: boolean;
167
- }): Promise<void>;
168
- /**
169
- * `lotics app publish [app_id|.] [--rename old=new ...] [-m <changelog>] [--yes]` —
170
- * FIRST-RELEASE a bespoke app as a package (docs/packages.md § Promotion). Nothing
171
- * starts as a package. Mirrors `app release`'s preview→apply UX: it first shows the
172
- * dry-run preview (GET, no writes) — the package name, the auto-minted RENAMABLE
173
- * aliases (the exact `--rename` keys, so v1's frozen aliases are inspected first,
174
- * never a blind publish), and the extract findings — then APPLIES only with
175
- * `--yes` (else exits 1 with the re-run hint). On apply the server extracts the
176
- * contract, creates the registry package, publishes v1 from the DEPLOYED source +
177
- * dist, and pins the origin as installation #1. `--rename old=new` fixes an
178
- * auto-minted alias before v1 freezes it; an `error` finding blocks the apply. An
179
- * already-linked app releases with `lotics app release` instead. The app id is the
180
- * positional (`.`/omitted → resolved from the local app project manifest).
181
- */
182
- export declare function appPublish(client: LoticsClient, args: {
183
- app_id?: string;
184
- renames: string[];
185
- changelog?: string;
186
- yes: boolean;
187
- projectDir?: string;
188
- }): Promise<void>;
189
- /**
190
- * `lotics app release [app_id|.] -m <changelog> [--yes]` — snapshot an
191
- * adopted/installed origin app into its next registry version (docs/packages.md
192
- * § Promotion). The origin is the permanent working copy; a release binding-aware-
193
- * extracts it (stable aliases), repackages its DEPLOYED source + dist as the
194
- * bundle, publishes the next version, and re-pins the origin. Prints the preview
195
- * first (next version, new + changed aliases, the bundled-knowledge delta,
196
- * findings); applies only with `--yes`, else exits 1 so a review step can't be
197
- * skipped. An `error` finding blocks the apply.
198
- *
199
- * Run from the pulled app project, the manifest's `lotics.knowledge` (alias →
200
- * doc_id) is the bundle DECLARATION — it re-declares which docs the package owns
201
- * (add/drop/re-snapshot). Forwarded only when non-empty; empty (or a bare id from
202
- * elsewhere) sends nothing, so the current corpus is reconstructed from the pin
203
- * (never silently dropped).
204
- */
205
- export declare function appRelease(client: LoticsClient, args: {
206
- app_id?: string;
207
- changelog: string;
208
- yes: boolean;
209
- projectDir?: string;
210
- }): Promise<void>;
211
- /**
212
- * `lotics package yank <package_id> <version> [--undo]` — mark a published
213
- * version uninstallable (or restore it). New installs/upgrades/adopts refuse a
214
- * yanked version and "latest" skips it; installations already pinned keep
215
- * running. Owner-org admin-only.
216
- */
217
- export declare function packageYank(client: LoticsClient, args: {
218
- package_id: string;
219
- version: number;
220
- undo: boolean;
221
- }): Promise<void>;