gigabuddy 0.7.0 → 0.8.1
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/README.md +13 -13
- package/bin/cli.js +34 -29
- package/index.js +34 -33
- package/package.json +1 -1
- package/src/lib/commands.d.ts +49 -10
package/package.json
CHANGED
package/src/lib/commands.d.ts
CHANGED
|
@@ -41,6 +41,19 @@ export declare function loginCommand(env: Env, options?: {
|
|
|
41
41
|
* proves who you are.
|
|
42
42
|
*/
|
|
43
43
|
export declare function npmLoginCommand(env: Env, account?: string): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* `gigabuddy login --npm --renew` — keep an EXISTING npm credential alive.
|
|
46
|
+
*
|
|
47
|
+
* npm can only send a fixed token, so the ~30-day registry credential can't
|
|
48
|
+
* refresh itself; this re-mints it from the live sign-in once it is within
|
|
49
|
+
* a week of expiring (or already expired). The agent runs it in the background
|
|
50
|
+
* at startup, so nobody has to notice the 30 days.
|
|
51
|
+
*
|
|
52
|
+
* Never signs in, never prompts, and never ADDS npm access: no sign-in or no
|
|
53
|
+
* credential in `.npmrc` (the user never opted in) means nothing to do.
|
|
54
|
+
* Silent unless it renewed something or failed.
|
|
55
|
+
*/
|
|
56
|
+
export declare function npmRenewCommand(env: Env, account?: string, now?: number): Promise<void>;
|
|
44
57
|
export declare function npmLogoutCommand(env: Env, account?: string): void;
|
|
45
58
|
export declare function logoutCommand(env: Env, account?: string): Promise<void>;
|
|
46
59
|
/**
|
|
@@ -49,23 +62,45 @@ export declare function logoutCommand(env: Env, account?: string): Promise<void>
|
|
|
49
62
|
* Exits non-zero when it found something wrong, so CI can gate on it.
|
|
50
63
|
*/
|
|
51
64
|
export declare function doctorCommand(env: Env, packageName?: string): Promise<void>;
|
|
65
|
+
export type Harness = 'claude' | 'codex';
|
|
66
|
+
export declare const HARNESSES: readonly Harness[];
|
|
52
67
|
export interface SetupRunner {
|
|
68
|
+
/** Whether this harness's CLI is on this machine. */
|
|
69
|
+
has(harness: Harness): boolean;
|
|
53
70
|
/** Run `claude <args>` with output flowing straight to the user. Returns the
|
|
54
71
|
* exit code, or 'missing' when there is no `claude` binary to run. */
|
|
55
72
|
runClaude(args: string[]): number | 'missing';
|
|
73
|
+
/** Same for `codex`. */
|
|
74
|
+
runCodex(args: string[]): number | 'missing';
|
|
75
|
+
/** The Codex version (`0.160.0`), or null when there is no Codex or it doesn't say. */
|
|
76
|
+
codexVersion(): string | null;
|
|
77
|
+
/** `npm install -g @gigabuddy/agent@latest`, output to the user. Returns the exit code. */
|
|
78
|
+
installAgent(): number;
|
|
79
|
+
/** `gigabuddy-agent warm` (caches the door's tool menu). Exit code, or 'missing' when not on PATH. */
|
|
80
|
+
warmAgent(): number | 'missing';
|
|
56
81
|
}
|
|
57
82
|
/**
|
|
58
|
-
*
|
|
59
|
-
* the
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* `
|
|
83
|
+
* The oldest Codex the plugin works in. Its prompt hook is an `mcp_tool` hook
|
|
84
|
+
* (it must reach the thread's own agent, which a `command` hook can't), and
|
|
85
|
+
* Codex parses those from 0.148.0. Older Codex rejects the plugin's whole
|
|
86
|
+
* hooks file: "unknown variant `mcp_tool`, expected one of `command`,
|
|
87
|
+
* `prompt`, `agent`" (checked against the released binaries, 2026-10-03).
|
|
88
|
+
*/
|
|
89
|
+
export declare const MIN_CODEX_VERSION = "0.148.0";
|
|
90
|
+
/** True when `version` is at least `min` (dotted numbers; pre-release tags ignored). */
|
|
91
|
+
export declare function versionAtLeast(version: string, min: string): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* `gigabuddy setup [claude|codex]` — put Gigabuddy into a coding agent without
|
|
94
|
+
* the user knowing the plugin incantations. With no harness named, sets up
|
|
95
|
+
* every one it finds on this machine. Shells out to each harness's own headless
|
|
96
|
+
* plugin commands rather than editing its config by hand: those commands are
|
|
97
|
+
* the supported surface, and re-running setup just refreshes.
|
|
63
98
|
*
|
|
64
99
|
* This stays within the client's "no tool implementations" rule — it installs
|
|
65
100
|
* the AGENT client's delivery vehicle, it does not become it. The agent
|
|
66
101
|
* custodies its own credential; our sign-in is neither needed nor offered here.
|
|
67
102
|
*/
|
|
68
|
-
export declare function setupCommand(runner?: SetupRunner): void;
|
|
103
|
+
export declare function setupCommand(harness?: Harness, runner?: SetupRunner): void;
|
|
69
104
|
export interface UpdateRunner {
|
|
70
105
|
/** The latest published version on npm, or null when it can't be read. */
|
|
71
106
|
latestVersion(): string | null;
|
|
@@ -73,13 +108,17 @@ export interface UpdateRunner {
|
|
|
73
108
|
installLatest(): number;
|
|
74
109
|
/** Re-run the idempotent plugin refresh. Returns exit code, or 'missing' with no claude binary. */
|
|
75
110
|
refreshPlugin(): number | 'missing';
|
|
111
|
+
/** Refresh the Codex marketplace and reinstall the plugin. Exit code, or 'missing' when Codex or its Gigabuddy marketplace isn't set up. */
|
|
112
|
+
refreshCodexPlugin(): number | 'missing';
|
|
113
|
+
/** Reinstall `@gigabuddy/agent@latest` if it is installed globally. Exit code, or 'not-installed'. */
|
|
114
|
+
updateAgent(): number | 'not-installed';
|
|
76
115
|
}
|
|
77
116
|
/**
|
|
78
117
|
* `gigabuddy update` — bring everything gigabuddy on this machine current.
|
|
79
|
-
* Doctor DIAGNOSES and never mutates; this is the verb that acts
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* the
|
|
118
|
+
* Doctor DIAGNOSES and never mutates; this is the verb that acts: this CLI
|
|
119
|
+
* (npm global), the Claude Code and Codex plugin shells (marketplace refresh),
|
|
120
|
+
* and the installed agent the Codex plugin launches. The Claude plugin runs
|
|
121
|
+
* the agent through `npx @latest`, so that copy needs nothing.
|
|
83
122
|
*/
|
|
84
123
|
export declare function updateCommand(current: string, runner?: UpdateRunner): Promise<void>;
|
|
85
124
|
export declare function statusCommand(account?: string): Promise<void>;
|