@mercury-fw/kit 0.39.0 → 0.41.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,34 @@
1
1
  # @mercury-fw/kit
2
2
 
3
+ ## 0.41.0
4
+
5
+ ### Patch Changes
6
+
7
+ - @mercury-fw/plugin-types@0.41.0
8
+ - @mercury-fw/channel-types@0.41.0
9
+
10
+ ## 0.40.0
11
+
12
+ ### Minor Changes
13
+
14
+ - 0739f77: A plugin acts as the person Mercury is talking to, who logs in to the service through Mercury.
15
+
16
+ - Plugin contract version 4: a plugin declares `actsAs: "person" | "mercury"`, and one acting as the person contributes a `login`; its tools get the turn's `person` and `requireLogin` in their context.
17
+ - A person is offered only the plugins acting as the person: their prompt fragments, skills and tools. A plugin acting as Mercury, or declaring nothing, is offered on the terminal only until people can be allowed to make Mercury act as itself; the startup log names it.
18
+ - `createCliTool` adds `--user` with the person's id to every command, staged confirmations included, and when the CLI exits with code 3 (not logged in) returns their login instead. `createCliPersonLogin` builds a plugin's `login` on a CLI's two-step remote login. A failed `runCli` carries `exitCode`.
19
+ - Channel contract version 4: channels get `logins` (`accept` a callback URL, `complete` a login) and `detectLoginRequired`.
20
+ - The HTTP channel, with `HTTP_SURFACE_PUBLIC_URL` set, streams a `login` event with the link to open and takes the person back at `GET /login/callback`, public and protected by the single-use state.
21
+ - `mercury.cliCredentials` can declare `userSetup`, run by `mfw credentials setup <plugin> --user-app`: the app people log in through, set up without logging anyone in.
22
+ - plugin-jira and plugin-bitbucket act as the person, on CLIs 2.3.0: set up their people's app with `--user-app` and register `<HTTP_SURFACE_PUBLIC_URL>/login/callback` on it. Jira's skill now says `currentUser()` is the person.
23
+ - plugin-atlassian-admin acts as Mercury, on CLI 0.2.0, whose `init` asks for the key without echoing it: until permissions exist it's available on the terminal only.
24
+ - A third-party plugin needs `apiVersion: 4` to load, and `actsAs: "person"` with a `login` to be offered to people.
25
+
26
+ ### Patch Changes
27
+
28
+ - Updated dependencies [0739f77]
29
+ - @mercury-fw/plugin-types@0.40.0
30
+ - @mercury-fw/channel-types@0.40.0
31
+
3
32
  ## 0.39.0
4
33
 
5
34
  ### Minor Changes
package/README.md CHANGED
@@ -17,10 +17,12 @@ A plugin whose CLI keeps its login in a folder under the home, reading it from t
17
17
  }
18
18
  ```
19
19
 
20
- or anywhere else under the home, with `{ "path": ".my-cli" }` instead of `folder` (relative to the home, inside it). Each command is a binary on the container's PATH followed by its arguments: `setup` sets up the identity the agent runs as and is required, `check` and `logout` (of that identity, or of one person with `--user <id>`) are optional.
20
+ or anywhere else under the home, with `{ "path": ".my-cli" }` instead of `folder` (relative to the home, inside it). Each command is a binary on the container's PATH followed by its arguments: `setup` sets up the identity the agent runs as and is required, `userSetup` (the app people log in through, logging nobody in), `check` and `logout` (of that identity, or of one person with `--user <id>`) are optional.
21
21
 
22
22
  An app then runs `mfw credentials setup <plugin>`, which runs `setup` in a one-off container on the user's terminal, so the CLI asks for what it needs and writes its login straight onto a volume that keeps what the CLI writes back (a folder outside `~/.config` gets a link from its usual place to the volume). A CLI that authenticates any other way isn't covered by this, and neither is one that deletes its own folder and makes it again.
23
23
 
24
+ A plugin also says whose identity its tools act with (`actsAs`). `"person"`: the person the turn is for, who logs in to the service through Mercury; the plugin contributes a `login` (`start` and `complete`, which `createCliPersonLogin` from `@mercury-fw/cli-engine` builds for a CLI with a two-step remote login), and its tools get the person and `requireLogin` in their context (`createCliTool` takes both, adds `--user` to every command and asks for the login when the CLI exits with code 3). `"mercury"`, or nothing declared: Mercury's own identity, whoever asks, which only someone allowed to make Mercury act as itself may use; that permission doesn't exist yet, so such a plugin is offered on the terminal only.
25
+
24
26
  A proper workflow for writing plugins, with an SDK on top of these contracts, is planned ([#27](https://github.com/lucabro81/mercury-fw/issues/27)).
25
27
 
26
28
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mercury-fw/kit",
3
- "version": "0.39.0",
3
+ "version": "0.41.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -27,8 +27,8 @@
27
27
  "typecheck": "tsc --noEmit"
28
28
  },
29
29
  "dependencies": {
30
- "@mercury-fw/channel-types": "0.39.0",
31
- "@mercury-fw/plugin-types": "0.39.0"
30
+ "@mercury-fw/channel-types": "0.41.0",
31
+ "@mercury-fw/plugin-types": "0.41.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@mercury-fw/typescript-config": "*",