@glrs-dev/assume 0.10.3 → 0.11.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,61 @@
1
1
  # @glrs-dev/assume
2
2
 
3
+ ## 0.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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
8
+
9
+ The bin shim shebang was `#!/usr/bin/env node`, so `gsa` died with
10
+ `env: node: No such file or directory` on the Bun-only machines this tool
11
+ targets — even though the package declares `engines.bun` and is driven by
12
+ `@glrs-dev/cli` (itself `#!/usr/bin/env bun`). Changed to `#!/usr/bin/env bun`;
13
+ the shim logic is unchanged and runs as-is under Bun.
14
+
15
+ feat(assume): auto-install shell integration so `gsa use`/`gsa login` work out of the box
16
+
17
+ `gsa use` and `gsa login` need a shell wrapper (the `eval "$(gsa shell-init …)"`
18
+ line) to set per-shell context — but nothing ever wrote it, so a fresh install
19
+ left those commands unable to mutate the shell until the user hand-edited their
20
+ rc file.
21
+
22
+ - `gsa init` now offers a confirmed step (after MCP wiring) that appends the
23
+ integration to the detected shell's rc file (`~/.zshrc`, `~/.bashrc`, or
24
+ `~/.config/fish/config.fish`).
25
+ - New `gsa shell-init --install [shell]` flag does the same non-interactively;
26
+ the shell auto-detects from `$SHELL` when omitted. Re-runnable and scriptable.
27
+ - Idempotent: a guarded `# >>> glrs-assume >>>` marker block is appended once;
28
+ re-running leaves an already-installed rc untouched.
29
+ - `gsa status` nudges when integration is missing, so auto-upgraded installs
30
+ (which don't re-run init) get pointed at `gsa shell-init --install`.
31
+
32
+ The rc line invokes `gsa` by name (not an absolute path), so it survives
33
+ upgrades that relocate the binary inside the versioned package dir.
34
+
35
+ ## 0.10.4
36
+
37
+ ### Patch Changes
38
+
39
+ - [#273](https://github.com/iceglober/glrs/pull/273) [`a3728ef`](https://github.com/iceglober/glrs/commit/a3728ef1336cec91762e2f1d7cac6a85ddc2a166) Thanks [@iceglober](https://github.com/iceglober)! - fix(assume): stop fabricating the refresh-token lifetime; honest `gsa status`
40
+
41
+ `gsa status` showed "Refresh token: 6d 22h remaining" even right after auto-refresh
42
+ had failed and the SSO session ended — making it look like auto-refresh was broken.
43
+
44
+ Root cause: `refresh_expires_at` was hardcoded to `now + 7 days` and **reset on
45
+ every refresh** (AWS rotates the refresh token each time). AWS SSO never reports
46
+ the refresh token's real lifetime — it's capped by the org's IAM Identity Center
47
+ session limit (often hours), enforced server-side. So the 7-day number was pure
48
+ fiction, and the daemon also hammered refresh every tick near session end.
49
+
50
+ - `refresh()` no longer rolls `refresh_expires_at` forward on rotation; it
51
+ preserves the ceiling set at login.
52
+ - `gsa status` no longer prints a fabricated refresh-token countdown. While the
53
+ session is live it shows `Auto-refresh: on`; once the SSO token is expired
54
+ (auto-refresh couldn't renew it) it shows `SSO session ended — run: gsa login`.
55
+
56
+ Auto-refresh itself was working correctly the whole time — it just can't extend
57
+ past the org's SSO session limit, which is expected AWS behavior.
58
+
3
59
  ## 0.10.3
4
60
 
5
61
  ### 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.3",
3
+ "version": "0.11.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.3",
55
- "@glrs-dev/assume-darwin-x64": "0.10.3",
56
- "@glrs-dev/assume-linux-x64": "0.10.3",
57
- "@glrs-dev/assume-linux-arm64": "0.10.3"
54
+ "@glrs-dev/assume-darwin-arm64": "0.11.0",
55
+ "@glrs-dev/assume-darwin-x64": "0.11.0",
56
+ "@glrs-dev/assume-linux-x64": "0.11.0",
57
+ "@glrs-dev/assume-linux-arm64": "0.11.0"
58
58
  }
59
59
  }