diff --git a/package.json b/package.json index 2513205..0e5bda8 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "test-results:warnings": "./node_modules/.bin/jest-results warnings" }, "dependencies": { - "@agent-ix/ix-cli-core": ">=0.10.5", + "@agent-ix/ix-cli-core": ">=0.11.0", "@agent-ix/ts-plugin-kit": ">=0.1.3", "yaml": "^2.9.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 08982d8..5200f69 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@agent-ix/ix-cli-core': - specifier: '>=0.10.5' - version: 0.10.5(@oclif/core@4.11.4) + specifier: '>=0.11.0' + version: 0.11.0(@oclif/core@4.11.4) '@agent-ix/ts-plugin-kit': specifier: '>=0.1.3' version: 0.1.3 @@ -63,8 +63,8 @@ importers: packages: - '@agent-ix/ix-cli-core@0.10.5': - resolution: {integrity: sha512-Twe+we1yy7rcXAaZQd3mOVi/gfPc34BTmw8dLLjsUqiNdGp0tPYASi5kKcqkN4q6OEw0CPbPBpw9SVFaNXyS+A==} + '@agent-ix/ix-cli-core@0.11.0': + resolution: {integrity: sha512-/QKQIxIroscYIzEEf8HO4xX+WtDIKjyWTarWwiCZOH252K3VFqWrPmTbric9cjZyoAWZUSZ43Dj1As/TmsDqbA==} peerDependencies: '@oclif/core': '>=4.11.4' @@ -1677,7 +1677,7 @@ packages: snapshots: - '@agent-ix/ix-cli-core@0.10.5(@oclif/core@4.11.4)': + '@agent-ix/ix-cli-core@0.11.0(@oclif/core@4.11.4)': dependencies: '@agent-ix/ix-ui-cli': 0.4.10 '@agent-ix/ts-plugin-kit': 0.1.3 diff --git a/src/cli.ts b/src/cli.ts index fa7a1d2..c2f7c86 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -2,7 +2,11 @@ import { readFileSync } from "node:fs"; import { dirname, join } from "node:path"; import { fileURLToPath } from "node:url"; -import { configureRuntimeContext, runSelfUpdate } from "@agent-ix/ix-cli-core"; +import { + configureRuntimeContext, + maybeOfferUpdate, + runSelfUpdate, +} from "@agent-ix/ix-cli-core"; import { findCatalogEntry, ixHome, loadCatalog } from "./catalog.js"; import { ensureDefaultModules } from "./modules.js"; @@ -133,9 +137,11 @@ Supported install sources: github:/ Clone a GitHub repository (manifest at root) github:/@ Pin to a tag, branch, or sha github:/// Manifest in a monorepo subdirectory (@ ok) + package: Install a module from an npm package (manifest at root) + package:@ Pin to an npm version Usage: - quoin plugin install + quoin plugin install quoin plugin list quoin plugin remove quoin plugin ensure-defaults @@ -144,6 +150,7 @@ Examples: quoin plugin install path:../spec-objects-custom quoin plugin install github:agent-ix/spec-objects-custom quoin plugin install github:agent-ix/spec-objects-security//spec_objects_security@v0.1.1 + quoin plugin install package:@agent-ix/spec-objects-security@0.4.0 quoin plugin list quoin plugin ensure-defaults `; @@ -216,6 +223,15 @@ export async function main(argv: string[]): Promise { projectConfigEnabled: parsed.flags["no-project-config"] !== true, }); + // Nudge toward a newer published quoin (throttled, interactive-only, silent in + // CI / under --json / for the update command itself). Never blocks or throws. + if (parsed.command !== "update" && parsed.flags.json !== true) { + await maybeOfferUpdate({ + packageName: "@agent-ix/quoin", + currentVersion: packageVersion(), + }); + } + if (parsed.command === "update") return runUpdate(parsed); if (parsed.command === "catalog") return runCatalog(parsed); if (parsed.command === "plugin") return runPlugin(parsed);