@dugleelabs/copair 1.4.4 → 1.5.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/api.d.ts +8 -1
- package/dist/api.js +11 -14
- package/dist/api.js.map +1 -1
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/api.d.ts
CHANGED
|
@@ -569,6 +569,13 @@ interface CopairPlugin {
|
|
|
569
569
|
name: string;
|
|
570
570
|
/** Plugin version (informational, not enforced) */
|
|
571
571
|
version: string;
|
|
572
|
+
/**
|
|
573
|
+
* Optional override for the `--version` output string. When set, replaces
|
|
574
|
+
* the default `copair <version> (community)` identifier. First registered
|
|
575
|
+
* plugin that declares this wins. Used by editions (e.g. Pro) to brand the
|
|
576
|
+
* CLI without requiring community to know about them.
|
|
577
|
+
*/
|
|
578
|
+
versionIdentifier?: string;
|
|
572
579
|
/**
|
|
573
580
|
* Called once during bootstrap, after config is loaded.
|
|
574
581
|
* Use for setup: register custom providers, tools, commands.
|
|
@@ -726,7 +733,7 @@ declare class SessionManager {
|
|
|
726
733
|
static cleanup(sessionsDir: string, maxSessions: number): Promise<void>;
|
|
727
734
|
}
|
|
728
735
|
|
|
729
|
-
declare function getVersionString(
|
|
736
|
+
declare function getVersionString(): string;
|
|
730
737
|
interface BootstrapOptions {
|
|
731
738
|
edition?: 'community' | 'pro';
|
|
732
739
|
editionVersion?: string;
|
package/dist/api.js
CHANGED
|
@@ -2705,9 +2705,9 @@ var pkg = (() => {
|
|
|
2705
2705
|
}
|
|
2706
2706
|
return { name: "copair", version: process.env["COPAIR_VERSION"] ?? "0.0.0-dev" };
|
|
2707
2707
|
})();
|
|
2708
|
-
function parseArgs(argv = process.argv) {
|
|
2708
|
+
function parseArgs(argv = process.argv, versionString) {
|
|
2709
2709
|
const program = new Command();
|
|
2710
|
-
program.name("copair").description("Model-agnostic AI coding agent for the terminal").version(pkg.version, "-v, --version").option("-m, --model <name>", "Model to use (overrides config default)").option("-c, --config <path>", "Path to config file").option("--verbose", "Enable verbose logging (WARN + INFO)", false).option("--debug", "Enable debug logging (all levels)", false).option("--resume [identifier]", 'Resume a previous session (use "latest" for most recent)').parse(argv);
|
|
2710
|
+
program.name("copair").description("Model-agnostic AI coding agent for the terminal").version(versionString ?? pkg.version, "-v, --version").option("-m, --model <name>", "Model to use (overrides config default)").option("-c, --config <path>", "Path to config file").option("--verbose", "Enable verbose logging (WARN + INFO)", false).option("--debug", "Enable debug logging (all levels)", false).option("--resume [identifier]", 'Resume a previous session (use "latest" for most recent)').parse(argv);
|
|
2711
2711
|
const opts = program.opts();
|
|
2712
2712
|
return {
|
|
2713
2713
|
model: opts.model,
|
|
@@ -6541,7 +6541,7 @@ import chalk6 from "chalk";
|
|
|
6541
6541
|
// package.json
|
|
6542
6542
|
var package_default = {
|
|
6543
6543
|
name: "@dugleelabs/copair",
|
|
6544
|
-
version: "1.
|
|
6544
|
+
version: "1.5.0",
|
|
6545
6545
|
description: "Model-agnostic AI coding agent for the terminal",
|
|
6546
6546
|
type: "module",
|
|
6547
6547
|
main: "dist/api.js",
|
|
@@ -6636,11 +6636,12 @@ var LOGO = `
|
|
|
6636
6636
|
\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557
|
|
6637
6637
|
\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551
|
|
6638
6638
|
\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D`.trimStart();
|
|
6639
|
-
function printBanner(modelName) {
|
|
6639
|
+
function printBanner(modelName, versionString) {
|
|
6640
|
+
const display = (versionString ?? `copair ${package_default.version} (community)`).replace(/^copair\s+/, "");
|
|
6640
6641
|
process.stdout.write("\n");
|
|
6641
6642
|
process.stdout.write(chalk6.cyan(LOGO) + "\n");
|
|
6642
6643
|
process.stdout.write(
|
|
6643
|
-
chalk6.gray(` ${package_default.description}`) + chalk6.dim(" \xB7 ") + chalk6.gray(`v${
|
|
6644
|
+
chalk6.gray(` ${package_default.description}`) + chalk6.dim(" \xB7 ") + chalk6.gray(`v${display}`) + "\n"
|
|
6644
6645
|
);
|
|
6645
6646
|
process.stdout.write(
|
|
6646
6647
|
chalk6.dim(" Model: ") + chalk6.white(modelName) + chalk6.dim(" \xB7 /help for commands \xB7 Ctrl+D to exit") + "\n\n"
|
|
@@ -7403,13 +7404,8 @@ var _pkg = (() => {
|
|
|
7403
7404
|
}
|
|
7404
7405
|
return { version: process.env["COPAIR_VERSION"] ?? "0.0.0-dev" };
|
|
7405
7406
|
})();
|
|
7406
|
-
function getVersionString(
|
|
7407
|
-
|
|
7408
|
-
const edition = options.edition ?? "community";
|
|
7409
|
-
if (edition === "pro" && options.editionVersion) {
|
|
7410
|
-
return `copair ${coreVersion} (Pro ${options.editionVersion})`;
|
|
7411
|
-
}
|
|
7412
|
-
return `copair ${coreVersion} (Community)`;
|
|
7407
|
+
function getVersionString() {
|
|
7408
|
+
return `copair ${_pkg.version} (community)`;
|
|
7413
7409
|
}
|
|
7414
7410
|
function detectTestFramework(cwd) {
|
|
7415
7411
|
const patterns = [
|
|
@@ -7486,7 +7482,8 @@ async function bootstrapCLI(options = {}) {
|
|
|
7486
7482
|
await runAuditCommand(rawArgv.slice(3));
|
|
7487
7483
|
return;
|
|
7488
7484
|
}
|
|
7489
|
-
const
|
|
7485
|
+
const versionString = options.plugins?.find((p) => p.versionIdentifier)?.versionIdentifier ?? getVersionString();
|
|
7486
|
+
const cliOpts = parseArgs(options.argv, versionString);
|
|
7490
7487
|
if (cliOpts.debug) {
|
|
7491
7488
|
logger.setLevel(3 /* DEBUG */);
|
|
7492
7489
|
} else if (cliOpts.verbose) {
|
|
@@ -7653,7 +7650,7 @@ Environment:
|
|
|
7653
7650
|
cmdNames.set("model", "Switch model");
|
|
7654
7651
|
completionEngine.addProvider(new SlashCommandProvider(cmdNames));
|
|
7655
7652
|
completionEngine.addProvider(new FilePathProvider(cwd));
|
|
7656
|
-
printBanner(modelAlias);
|
|
7653
|
+
printBanner(modelAlias, versionString);
|
|
7657
7654
|
await new Promise((r) => setTimeout(r, 50));
|
|
7658
7655
|
let appHandle = null;
|
|
7659
7656
|
const doExit = async () => {
|