@lotics/cli 0.74.0 → 0.75.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/cli.js CHANGED
@@ -14,7 +14,7 @@ import { LoticsClient, API_BASE_URL } from "./client.js";
14
14
  import { resolveContext, deleteConfig, getConfigPath, loadGlobalConfig, saveGlobalConfig, loadLocalConfig, upsertProfile, removeProfile, setActiveOrg, setSelectedWorkspace, resolveProfileByNameOrId, checkForUpdate, } from "./config.js";
15
15
  import { VERSION } from "./version.js";
16
16
  import { appCreate, appPull, appDeploy, appDev, appSetSubdomain, appRename, appVersions, appCodegen, appExecuteWorkflow, appWorkflowSet, appWorkflowPull, appWorkflowCheck, appQuerySet, appUiLink, } from "./app_commands.js";
17
- import { packageInstall, packageEject, packageDoctor, packageUpgrade, parseResolveFlags, packageNew, packageBuild, packagePublish, packageDev, packageSync, packageReset, packageExtract, packageAdopt, packageFleetUpgrade, } from "./package_commands.js";
17
+ import { packageInstall, packageEject, packageDoctor, packageUpgrade, parseResolveFlags, packageNew, packageBuild, packagePublish, packageDev, packageSync, packageReset, packageExtract, packageAdopt, packageFleetUpgrade, packageYank, } from "./package_commands.js";
18
18
  import { parseArgs } from "./args.js";
19
19
  import { ingestJsonArgs } from "./inputs.js";
20
20
  import { runXlsxCommand } from "./xlsx.js";
@@ -124,6 +124,7 @@ COMMANDS
124
124
  origin app (reads .lotics/adopt_binding.json;
125
125
  --version N pins a specific version)
126
126
  lotics package fleet-upgrade <package_id> [--version N]
127
+ lotics package yank <package_id> <version> [--undo]
127
128
  Upgrade EVERY installation of the package across
128
129
  your org: applies where the preview is clean,
129
130
  skips + reports findings (exit 1 unless all current)
@@ -707,6 +708,7 @@ async function main() {
707
708
  console.error(" lotics package extract <app_id> [path] Promote a bespoke app to a draft package project");
708
709
  console.error(" lotics package adopt <app_id> [path] Bind the published project onto the origin app");
709
710
  console.error(" lotics package fleet-upgrade <package_id> [--version N] Upgrade every org installation (clean ones apply; findings skip)");
711
+ console.error(" lotics package yank <package_id> <version> [--undo] Refuse new installs/upgrades of a broken published version (pinned installations keep running)");
710
712
  process.exit(1);
711
713
  }
712
714
  if (command === "run" && !subcommand) {
@@ -736,6 +738,16 @@ async function main() {
736
738
  const { client, ctx } = requireClient(flags);
737
739
  // lotics workspace / lotics workspace list / lotics workspace select <id>
738
740
  if (command === "workspace") {
741
+ if (subcommand === "yank") {
742
+ const [packageId, versionRaw, maybeUndo] = toolArgs ? toolArgs.split(/\s+/) : [];
743
+ const version = Number(versionRaw);
744
+ if (!packageId || !Number.isInteger(version) || version <= 0) {
745
+ console.error("Usage: lotics package yank <package_id> <version> [--undo]");
746
+ process.exit(1);
747
+ }
748
+ await packageYank(client, { package_id: packageId, version, undo: maybeUndo === "--undo" });
749
+ return;
750
+ }
739
751
  if (subcommand === "doctor") {
740
752
  // The workspace command family runs before the global workspace
741
753
  // resolution — doctor needs the same first-workspace fallback every
package/dist/client.d.ts CHANGED
@@ -287,6 +287,17 @@ export declare class LoticsClient {
287
287
  * per-installation consent flow. Backs `lotics package fleet-upgrade`.
288
288
  * Admin-only; org-scoped (no workspace header needed).
289
289
  */
290
+ /**
291
+ * Yank / unyank a published package version — refuses NEW installs/upgrades/
292
+ * adopts targeting it; pinned installations keep running. Owner-org
293
+ * admin-only. Backs `lotics package yank`.
294
+ */
295
+ yankAppPackageVersion(package_id: string, version: number, yanked: boolean): Promise<{
296
+ package_id: string;
297
+ version: number;
298
+ yanked_at: string | null;
299
+ latest_version: number;
300
+ }>;
290
301
  fleetUpgradeAppPackage(package_id: string, body: {
291
302
  version?: number;
292
303
  }): Promise<{
package/dist/client.js CHANGED
@@ -255,6 +255,14 @@ export class LoticsClient {
255
255
  * per-installation consent flow. Backs `lotics package fleet-upgrade`.
256
256
  * Admin-only; org-scoped (no workspace header needed).
257
257
  */
258
+ /**
259
+ * Yank / unyank a published package version — refuses NEW installs/upgrades/
260
+ * adopts targeting it; pinned installations keep running. Owner-org
261
+ * admin-only. Backs `lotics package yank`.
262
+ */
263
+ async yankAppPackageVersion(package_id, version, yanked) {
264
+ return this.request("POST", `/v1/app-packages/${encodeURIComponent(package_id)}/versions/${version}/yank`, { yanked });
265
+ }
258
266
  async fleetUpgradeAppPackage(package_id, body) {
259
267
  return this.request("POST", `/v1/app-packages/${encodeURIComponent(package_id)}/fleet-upgrade`, body);
260
268
  }
@@ -220,6 +220,17 @@ export declare function packageAdopt(client: LoticsClient, args: {
220
220
  * installations are reported per line and the process exits 1 so a release
221
221
  * script can gate on "fleet fully current".
222
222
  */
223
+ /**
224
+ * `lotics package yank <package_id> <version> [--undo]` — mark a published
225
+ * version uninstallable (or restore it). New installs/upgrades/adopts refuse a
226
+ * yanked version and "latest" skips it; installations already pinned keep
227
+ * running. Owner-org admin-only.
228
+ */
229
+ export declare function packageYank(client: LoticsClient, args: {
230
+ package_id: string;
231
+ version: number;
232
+ undo: boolean;
233
+ }): Promise<void>;
223
234
  export declare function packageFleetUpgrade(client: LoticsClient, args: {
224
235
  package_id: string;
225
236
  version?: number;
@@ -925,6 +925,23 @@ export async function packageAdopt(client, args) {
925
925
  * installations are reported per line and the process exits 1 so a release
926
926
  * script can gate on "fleet fully current".
927
927
  */
928
+ /**
929
+ * `lotics package yank <package_id> <version> [--undo]` — mark a published
930
+ * version uninstallable (or restore it). New installs/upgrades/adopts refuse a
931
+ * yanked version and "latest" skips it; installations already pinned keep
932
+ * running. Owner-org admin-only.
933
+ */
934
+ export async function packageYank(client, args) {
935
+ const result = await client.yankAppPackageVersion(args.package_id, args.version, !args.undo);
936
+ if (result.yanked_at !== null) {
937
+ console.error(`Yanked ${result.package_id} v${result.version} (${result.yanked_at}). ` +
938
+ `New installs/upgrades refuse it; pinned installations keep running.`);
939
+ }
940
+ else {
941
+ console.error(`Restored ${result.package_id} v${result.version} — installable again.`);
942
+ }
943
+ console.error(` Latest installable version: ${result.latest_version === 0 ? "none" : `v${result.latest_version}`}`);
944
+ }
928
945
  export async function packageFleetUpgrade(client, args) {
929
946
  const result = await client.fleetUpgradeAppPackage(args.package_id, {
930
947
  ...(args.version !== undefined ? { version: args.version } : {}),
package/dist/src/cli.js CHANGED
@@ -29818,6 +29818,18 @@ var LoticsClient = class {
29818
29818
  * per-installation consent flow. Backs `lotics package fleet-upgrade`.
29819
29819
  * Admin-only; org-scoped (no workspace header needed).
29820
29820
  */
29821
+ /**
29822
+ * Yank / unyank a published package version — refuses NEW installs/upgrades/
29823
+ * adopts targeting it; pinned installations keep running. Owner-org
29824
+ * admin-only. Backs `lotics package yank`.
29825
+ */
29826
+ async yankAppPackageVersion(package_id, version, yanked) {
29827
+ return this.request(
29828
+ "POST",
29829
+ `/v1/app-packages/${encodeURIComponent(package_id)}/versions/${version}/yank`,
29830
+ { yanked }
29831
+ );
29832
+ }
29821
29833
  async fleetUpgradeAppPackage(package_id, body) {
29822
29834
  return this.request(
29823
29835
  "POST",
@@ -34181,6 +34193,17 @@ async function packageAdopt(client, args) {
34181
34193
  );
34182
34194
  console.error(` Verify the installation: lotics package doctor ${app.id}`);
34183
34195
  }
34196
+ async function packageYank(client, args) {
34197
+ const result = await client.yankAppPackageVersion(args.package_id, args.version, !args.undo);
34198
+ if (result.yanked_at !== null) {
34199
+ console.error(
34200
+ `Yanked ${result.package_id} v${result.version} (${result.yanked_at}). New installs/upgrades refuse it; pinned installations keep running.`
34201
+ );
34202
+ } else {
34203
+ console.error(`Restored ${result.package_id} v${result.version} \u2014 installable again.`);
34204
+ }
34205
+ console.error(` Latest installable version: ${result.latest_version === 0 ? "none" : `v${result.latest_version}`}`);
34206
+ }
34184
34207
  async function packageFleetUpgrade(client, args) {
34185
34208
  const result = await client.fleetUpgradeAppPackage(args.package_id, {
34186
34209
  ...args.version !== void 0 ? { version: args.version } : {}
@@ -51008,6 +51031,7 @@ COMMANDS
51008
51031
  origin app (reads .lotics/adopt_binding.json;
51009
51032
  --version N pins a specific version)
51010
51033
  lotics package fleet-upgrade <package_id> [--version N]
51034
+ lotics package yank <package_id> <version> [--undo]
51011
51035
  Upgrade EVERY installation of the package across
51012
51036
  your org: applies where the preview is clean,
51013
51037
  skips + reports findings (exit 1 unless all current)
@@ -51538,6 +51562,7 @@ async function main() {
51538
51562
  console.error(" lotics package extract <app_id> [path] Promote a bespoke app to a draft package project");
51539
51563
  console.error(" lotics package adopt <app_id> [path] Bind the published project onto the origin app");
51540
51564
  console.error(" lotics package fleet-upgrade <package_id> [--version N] Upgrade every org installation (clean ones apply; findings skip)");
51565
+ console.error(" lotics package yank <package_id> <version> [--undo] Refuse new installs/upgrades of a broken published version (pinned installations keep running)");
51541
51566
  process.exit(1);
51542
51567
  }
51543
51568
  if (command === "run" && !subcommand) {
@@ -51566,6 +51591,16 @@ async function main() {
51566
51591
  }
51567
51592
  const { client, ctx } = requireClient(flags);
51568
51593
  if (command === "workspace") {
51594
+ if (subcommand === "yank") {
51595
+ const [packageId, versionRaw, maybeUndo] = toolArgs ? toolArgs.split(/\s+/) : [];
51596
+ const version = Number(versionRaw);
51597
+ if (!packageId || !Number.isInteger(version) || version <= 0) {
51598
+ console.error("Usage: lotics package yank <package_id> <version> [--undo]");
51599
+ process.exit(1);
51600
+ }
51601
+ await packageYank(client, { package_id: packageId, version, undo: maybeUndo === "--undo" });
51602
+ return;
51603
+ }
51569
51604
  if (subcommand === "doctor") {
51570
51605
  await resolveWorkspace(client, ctx);
51571
51606
  const dangling = await client.getWorkspaceDanglingReferences();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/cli",
3
- "version": "0.74.0",
3
+ "version": "0.75.0",
4
4
  "description": "Lotics SDK and CLI for AI agents",
5
5
  "type": "module",
6
6
  "bin": {