@glrs-dev/assume 0.10.4 → 0.12.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/CHANGELOG.md CHANGED
@@ -1,5 +1,50 @@
1
1
  # @glrs-dev/assume
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#286](https://github.com/iceglober/glrs/pull/286) [`2b2c469`](https://github.com/iceglober/glrs/commit/2b2c469421b75cc8d59fed966cb2e591380b1ad2) Thanks [@iceglober](https://github.com/iceglober)! - Restore ambient credentials and make them robust across providers and re-logins.
8
+
9
+ - **Per-provider ambient defaults.** AWS and GCP each hold their own machine-global default context, both served in every shell at once. Replaces the single `active.json` with a per-provider default store (`defaults/<provider>.json`); a transparent one-time migration folds any existing `active.json` forward.
10
+ - **`gsa login` preserves your default.** A re-login after SSO expiry no longer drops you to "no context" — it keeps the prior default when still valid, ending the "must `gsa exec` for everything after every re-login" regression.
11
+ - **`gsa use` is a per-shell override**; new `--default` flag also sets the machine default. `gsa exec` with no `-c`/`--provider` injects every provider's default.
12
+ - **Always-on prompt.** Renders one `[provider:ctx]` bracket per provider (`*` marks a per-shell override), seeded from defaults so a brand-new shell shows the ambient default, and a dim `[gsa]` when nothing is active. New `prompt.layout = "above" | "inline"` (default two-line).
13
+ - **Stale-daemon recovery.** The daemon records its version; CLI commands cycle a running-but-outdated daemon left behind by an auto-upgrade.
14
+ - **Dead-session is surfaced loudly.** When a provider you use ambiently has an expired refresh token, the next command prints an actionable re-login hint instead of relying on a desktop notification.
15
+
16
+ ## 0.11.0
17
+
18
+ ### Minor Changes
19
+
20
+ - [#283](https://github.com/iceglober/glrs/pull/283) [`d10a642`](https://github.com/iceglober/glrs/commit/d10a6427e538ada504cdd87e3b0797b57b48c7bf) Thanks [@iceglober](https://github.com/iceglober)! - fix(assume): run the npm shim under Bun so `gsa` works on Bun-only machines
21
+
22
+ The bin shim shebang was `#!/usr/bin/env node`, so `gsa` died with
23
+ `env: node: No such file or directory` on the Bun-only machines this tool
24
+ targets — even though the package declares `engines.bun` and is driven by
25
+ `@glrs-dev/cli` (itself `#!/usr/bin/env bun`). Changed to `#!/usr/bin/env bun`;
26
+ the shim logic is unchanged and runs as-is under Bun.
27
+
28
+ feat(assume): auto-install shell integration so `gsa use`/`gsa login` work out of the box
29
+
30
+ `gsa use` and `gsa login` need a shell wrapper (the `eval "$(gsa shell-init …)"`
31
+ line) to set per-shell context — but nothing ever wrote it, so a fresh install
32
+ left those commands unable to mutate the shell until the user hand-edited their
33
+ rc file.
34
+
35
+ - `gsa init` now offers a confirmed step (after MCP wiring) that appends the
36
+ integration to the detected shell's rc file (`~/.zshrc`, `~/.bashrc`, or
37
+ `~/.config/fish/config.fish`).
38
+ - New `gsa shell-init --install [shell]` flag does the same non-interactively;
39
+ the shell auto-detects from `$SHELL` when omitted. Re-runnable and scriptable.
40
+ - Idempotent: a guarded `# >>> glrs-assume >>>` marker block is appended once;
41
+ re-running leaves an already-installed rc untouched.
42
+ - `gsa status` nudges when integration is missing, so auto-upgraded installs
43
+ (which don't re-run init) get pointed at `gsa shell-init --install`.
44
+
45
+ The rc line invokes `gsa` by name (not an absolute path), so it survives
46
+ upgrades that relocate the binary inside the versioned package dir.
47
+
3
48
  ## 0.10.4
4
49
 
5
50
  ### Patch Changes
package/README.md CHANGED
@@ -10,9 +10,9 @@ Docs: **[glrs.dev/assume](https://glrs.dev/assume)**
10
10
  glrs assume init
11
11
  ```
12
12
 
13
- Installs the latest binary (clearing the deprecated `@glorious/assume`), migrates any legacy `gs-assume` config forward, logs you in, approves agent contexts, and has you pick a default context. Re-run any time to repair a broken install. Until init completes, gsa is inert — every command except `init`, `upgrade`, `shell-init`, `status`, and `config` refuses.
13
+ Installs the latest binary (clearing the deprecated `@glorious/assume`), migrates any legacy `gs-assume` config forward, logs you in, approves agent contexts, has you pick a default context, and offers to wire shell integration into your rc file. Re-run any time to repair a broken install. Until init completes, gsa is inert — every command except `init`, `upgrade`, `shell-init`, `status`, and `config` refuses.
14
14
 
15
- Or standalone: `npm i -g @glrs-dev/assume` (then `gsa init`).
15
+ Or standalone: `bun add -g @glrs-dev/assume` (then `gsa init`). The package targets Bun (`engines.bun`); `glrs assume` also accepts npm/pnpm/yarn.
16
16
 
17
17
  ## Usage
18
18
 
@@ -24,6 +24,22 @@ gsa status # token expiry, daemon health
24
24
  gsa contexts # list available contexts
25
25
  ```
26
26
 
27
+ ## Shell integration
28
+
29
+ `gsa use` and `gsa login` set credentials for the current shell, so they need a
30
+ wrapper in your rc file (it evals the context into the live shell and adds a
31
+ prompt tag). `gsa init` offers to install it; to (re)install non-interactively:
32
+
33
+ ```bash
34
+ gsa shell-init --install # detects your shell from $SHELL
35
+ gsa shell-init --install zsh # or name it explicitly (bash, zsh, fish)
36
+ ```
37
+
38
+ This appends a guarded `# >>> glrs-assume >>>` block to `~/.zshrc`,
39
+ `~/.bashrc`, or `~/.config/fish/config.fish`. It's idempotent — re-running
40
+ leaves an already-installed rc untouched. Restart your shell (or `source` the
41
+ rc) to pick it up. `gsa status` flags when integration is missing.
42
+
27
43
  ## Agent integration
28
44
 
29
45
  ```bash
package/dist/cli.d.ts CHANGED
@@ -1 +1 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env bun
package/dist/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env bun
2
2
  import {
3
3
  getBinaryPath
4
4
  } from "./chunk-CGS5UTSO.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glrs-dev/assume",
3
- "version": "0.10.4",
3
+ "version": "0.12.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -51,9 +51,9 @@
51
51
  "typescript": "^5"
52
52
  },
53
53
  "optionalDependencies": {
54
- "@glrs-dev/assume-darwin-arm64": "0.10.4",
55
- "@glrs-dev/assume-darwin-x64": "0.10.4",
56
- "@glrs-dev/assume-linux-x64": "0.10.4",
57
- "@glrs-dev/assume-linux-arm64": "0.10.4"
54
+ "@glrs-dev/assume-darwin-arm64": "0.12.0",
55
+ "@glrs-dev/assume-darwin-x64": "0.12.0",
56
+ "@glrs-dev/assume-linux-x64": "0.12.0",
57
+ "@glrs-dev/assume-linux-arm64": "0.12.0"
58
58
  }
59
59
  }