gigabuddy 0.3.1 → 0.4.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": "gigabuddy",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "Command-line sign-in for Gigabuddy. Authenticates your machine and configures npm for @gigabuddy packages.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,4 +1,4 @@
1
- import { type UserCredentials } from '@gigabuddy/client-core';
1
+ import { type ResolvedAccount, type UserCredentials } from '@gigabuddy/client-core';
2
2
  export declare const PRODUCTION_AUTH_URL = "https://auth.gigabuddy.com";
3
3
  export declare const PRODUCTION_API_URL = "https://api.gigabuddy.com";
4
4
  export declare const STAGING_AUTH_URL = "https://auth.staging.gigabuddy.com";
@@ -13,7 +13,12 @@ export declare function resolveEnv(options: {
13
13
  authUrl?: string;
14
14
  apiUrl?: string;
15
15
  }): Env;
16
- export declare function signIn(env: Env): Promise<UserCredentials>;
16
+ /**
17
+ * Which account a command acts on: an explicit `--account` wins, otherwise the
18
+ * resolved one (env var → repo pin → configured default → 'default').
19
+ */
20
+ export declare function activeAccount(explicit?: string): ResolvedAccount;
21
+ export declare function signIn(env: Env, account?: string): Promise<UserCredentials>;
17
22
  /**
18
23
  * `gigabuddy login` — sign in AND set npm up, because for this client they are
19
24
  * one act. Installing `@gigabuddy` packages is what the CLI is for: nothing
@@ -30,6 +35,7 @@ export declare function signIn(env: Env): Promise<UserCredentials>;
30
35
  */
31
36
  export declare function loginCommand(env: Env, options?: {
32
37
  npm?: boolean;
38
+ account?: string;
33
39
  }): Promise<void>;
34
40
  /**
35
41
  * `gigabuddy login --npm` — make `npm install @gigabuddy/…` work as you.
@@ -39,13 +45,44 @@ export declare function loginCommand(env: Env, options?: {
39
45
  * can install is still decided per install, against your own access; this only
40
46
  * proves who you are.
41
47
  */
42
- export declare function npmLoginCommand(env: Env): Promise<void>;
43
- export declare function npmLogoutCommand(env: Env): void;
44
- export declare function logoutCommand(env: Env): Promise<void>;
48
+ export declare function npmLoginCommand(env: Env, account?: string): Promise<void>;
49
+ export declare function npmLogoutCommand(env: Env, account?: string): void;
50
+ export declare function logoutCommand(env: Env, account?: string): Promise<void>;
45
51
  /**
46
52
  * `gigabuddy doctor [package]` — why isn't this working?
47
53
  *
48
54
  * Exits non-zero when it found something wrong, so CI can gate on it.
49
55
  */
50
56
  export declare function doctorCommand(env: Env, packageName?: string): Promise<void>;
51
- export declare function statusCommand(): Promise<void>;
57
+ export interface SetupRunner {
58
+ /** Run `claude <args>` with output flowing straight to the user. Returns the
59
+ * exit code, or 'missing' when there is no `claude` binary to run. */
60
+ runClaude(args: string[]): number | 'missing';
61
+ }
62
+ /**
63
+ * `gigabuddy setup` — put Gigabuddy into Claude Code without the user knowing
64
+ * the /plugin incantations. Shells out to Claude Code's own headless plugin
65
+ * commands (`claude plugin marketplace add` / `claude plugin install`) rather
66
+ * than editing ~/.claude by hand: those commands are the supported surface, and
67
+ * `marketplace add` is idempotent, so re-running setup just refreshes.
68
+ *
69
+ * This stays within the client's "no tool implementations" rule — it installs
70
+ * the AGENT client's delivery vehicle, it does not become it. The agent
71
+ * custodies its own credential; our sign-in is neither needed nor offered here.
72
+ */
73
+ export declare function setupCommand(runner?: SetupRunner): void;
74
+ export declare function statusCommand(account?: string): Promise<void>;
75
+ /**
76
+ * `gigabuddy accounts` — every account on this machine, who each is signed in
77
+ * as, and which one is active right here (and why).
78
+ */
79
+ export declare function accountsCommand(): Promise<void>;
80
+ /**
81
+ * `gigabuddy use <name>` — pin the enclosing repository to an account, so every
82
+ * client of client-core resolves it there from now on. `--default` sets the
83
+ * machine-wide fallback instead; `--unpin` removes this repo's pin.
84
+ */
85
+ export declare function useCommand(name: string | undefined, options?: {
86
+ default?: boolean;
87
+ unpin?: boolean;
88
+ }, cwd?: string): void;