Skip to content

Commit 35cfc70

Browse files
ref(configuration): Change channel and Space configuration with one tool
setConfiguration replaces setSpaceConfiguration and the `config set` and `config unset` bash commands. It sets or removes a value everywhere the Conversation gets its configuration: its Slack channel, its Space, or both. It checks every place before it writes any, so a person who is not a member of the Space changes neither. `config get` and `config list` now read the Space's values too, with the Space's value first, the same as a Turn resolves its configuration. Co-Authored-By: David Cramer <[email protected]>
1 parent 253b4b4 commit 35cfc70

25 files changed

Lines changed: 463 additions & 585 deletions

File tree

‎packages/docs/src/content/docs/extend/_plugin-template.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ splitting them across setup sections.
5353

5454
Start with the ways readers can define values:
5555

56-
- Conversation config: `jr-rpc config set <plugin>.<key> <value>`
56+
- Conversation config: ask Junior to set `<plugin>.<key>` in a Slack channel or Space
5757
- Install-wide conversation defaults: `createApp({ configDefaults: { "<plugin>.<key>": "<value>" } })`
5858
- Plugin options: pass values to `<plugin>Plugin({ ... })` in `plugins.ts`
5959
- Environment variables: set them in the deployment environment, then redeploy
@@ -75,7 +75,7 @@ easy to scan on desktop and mobile:
7575

7676
Default project when a request does not name one.
7777

78-
- **Define:** `jr-rpc config set example.project <project>`
78+
- **Define:** ask Junior to set `example.project`
7979
- **Install-wide default:** `configDefaults["example.project"]`
8080
- **Required:** No
8181
- **Environment override:** None

‎packages/docs/src/content/docs/extend/cloudflare-plugin.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const plugins = defineJuniorPlugins(["@sentry/junior-cloudflare"]);
4040

4141
## Config
4242

43-
Set conversation config with `jr-rpc config set`, or define the same keys for every conversation with `createApp({ configDefaults })`. An explicit account, zone, or Worker in a request always wins.
43+
Ask Junior to set conversation config in a Slack channel or Space, or define the same keys for every conversation with `createApp({ configDefaults })`. An explicit account, zone, or Worker in a request always wins.
4444

4545
### Conversation defaults
4646

@@ -49,7 +49,7 @@ Set conversation config with `jr-rpc config set`, or define the same keys for ev
4949

5050
Default Cloudflare account when a request does not identify one.
5151

52-
- **Define:** `jr-rpc config set cloudflare.account.id <account_id>`
52+
- **Define:** ask Junior to set `cloudflare.account.id`
5353
- **Install-wide default:** `configDefaults["cloudflare.account.id"]`
5454
- **Required:** No; Junior can discover it with Account Resources: Read
5555
- **Environment override:** None
@@ -61,7 +61,7 @@ Default Cloudflare account when a request does not identify one.
6161

6262
Default Cloudflare zone when a request does not identify one.
6363

64-
- **Define:** `jr-rpc config set cloudflare.zone.id <zone_id>`
64+
- **Define:** ask Junior to set `cloudflare.zone.id`
6565
- **Install-wide default:** `configDefaults["cloudflare.zone.id"]`
6666
- **Required:** No
6767
- **Environment override:** None
@@ -73,7 +73,7 @@ Default Cloudflare zone when a request does not identify one.
7373

7474
Default Worker for requests such as “check the latest errors” or “show the recent deploy.”
7575

76-
- **Define:** `jr-rpc config set cloudflare.worker.name <worker_name>`
76+
- **Define:** ask Junior to set `cloudflare.worker.name`
7777
- **Install-wide default:** `configDefaults["cloudflare.worker.name"]`
7878
- **Required:** No
7979
- **Environment override:** None

‎packages/docs/src/content/docs/extend/datadog-plugin.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const plugins = defineJuniorPlugins(["@sentry/junior-datadog"]);
3535

3636
## Config
3737

38-
Set conversation config with `jr-rpc config set`, or define the same keys for every conversation with `createApp({ configDefaults })`. Set deployment variables in the Junior environment, then redeploy. Explicit values in a request always win over conversation defaults.
38+
Ask Junior to set conversation config in a Slack channel or Space, or define the same keys for every conversation with `createApp({ configDefaults })`. Set deployment variables in the Junior environment, then redeploy. Explicit values in a request always win over conversation defaults.
3939

4040
### Conversation defaults
4141

@@ -44,7 +44,7 @@ Set conversation config with `jr-rpc config set`, or define the same keys for ev
4444

4545
Default Datadog environment filter when a request does not name one.
4646

47-
- **Define:** `jr-rpc config set datadog.env <environment>`
47+
- **Define:** ask Junior to set `datadog.env`
4848
- **Install-wide default:** `configDefaults["datadog.env"]`
4949
- **Required:** No
5050
- **Environment override:** None
@@ -56,7 +56,7 @@ Default Datadog environment filter when a request does not name one.
5656

5757
Default Datadog service filter when a request does not name one.
5858

59-
- **Define:** `jr-rpc config set datadog.service <service>`
59+
- **Define:** ask Junior to set `datadog.service`
6060
- **Install-wide default:** `configDefaults["datadog.service"]`
6161
- **Required:** No
6262
- **Environment override:** None

‎packages/docs/src/content/docs/extend/github-plugin.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ installation ID.
9090

9191
## Config
9292

93-
Set conversation config with `jr-rpc config set`, or define the same keys for every conversation with `createApp({ configDefaults })`. Pass factory options to `githubPlugin({ ... })` in `plugins.ts`. Set the named deployment variables, then redeploy. Explicit repositories in requests always win over defaults.
93+
Ask Junior to set conversation config in a Slack channel or Space, or define the same keys for every conversation with `createApp({ configDefaults })`. Pass factory options to `githubPlugin({ ... })` in `plugins.ts`. Set the named deployment variables, then redeploy. Explicit repositories in requests always win over defaults.
9494

9595
### Conversation defaults
9696

@@ -99,7 +99,7 @@ Set conversation config with `jr-rpc config set`, or define the same keys for ev
9999

100100
Default GitHub organization or owner when a request does not name one.
101101

102-
- **Define:** `jr-rpc config set github.org <owner>`
102+
- **Define:** ask Junior to set `github.org`
103103
- **Install-wide default:** `configDefaults["github.org"]`
104104
- **Required:** No
105105
- **Environment override:** None
@@ -111,7 +111,7 @@ Default GitHub organization or owner when a request does not name one.
111111

112112
Default repository in `owner/repo` form when a request does not name one.
113113

114-
- **Define:** `jr-rpc config set github.repo <owner/repo>`
114+
- **Define:** ask Junior to set `github.repo`
115115
- **Install-wide default:** `configDefaults["github.repo"]`
116116
- **Required:** No
117117
- **Environment override:** None

‎packages/docs/src/content/docs/extend/linear-plugin.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ it. Without it, action review treats Linear as an internal destination.
105105

106106
## Config
107107

108-
Set conversation config with `jr-rpc config set`, or define the same keys for every conversation with `createApp({ configDefaults })`. Set deployment variables in the Junior environment, then redeploy. Explicit values in a request always win over conversation defaults.
108+
Ask Junior to set conversation config in a Slack channel or Space, or define the same keys for every conversation with `createApp({ configDefaults })`. Set deployment variables in the Junior environment, then redeploy. Explicit values in a request always win over conversation defaults.
109109

110110
### Conversation defaults
111111

@@ -114,7 +114,7 @@ Set conversation config with `jr-rpc config set`, or define the same keys for ev
114114

115115
Default owning team for issue creation when a request does not name one.
116116

117-
- **Define:** `jr-rpc config set linear.team <team>`
117+
- **Define:** ask Junior to set `linear.team`
118118
- **Install-wide default:** `configDefaults["linear.team"]`
119119
- **Required:** No
120120
- **Environment override:** None
@@ -126,7 +126,7 @@ Default owning team for issue creation when a request does not name one.
126126

127127
Default project for issue creation when a request does not name one. Use it only when the conversation is genuinely centered on one project.
128128

129-
- **Define:** `jr-rpc config set linear.project <project>`
129+
- **Define:** ask Junior to set `linear.project`
130130
- **Install-wide default:** `configDefaults["linear.project"]`
131131
- **Required:** No
132132
- **Environment override:** None

‎packages/docs/src/content/docs/extend/sentry-plugin.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Register `sentryPlugin()` so Junior loads the webhook route.
3131

3232
## Config
3333

34-
Set conversation config with `jr-rpc config set`, or define the same keys for every conversation with `createApp({ configDefaults })`. Set deployment variables in the Junior environment, then redeploy. Explicit values in a request always win over conversation defaults.
34+
Ask Junior to set conversation config in a Slack channel or Space, or define the same keys for every conversation with `createApp({ configDefaults })`. Set deployment variables in the Junior environment, then redeploy. Explicit values in a request always win over conversation defaults.
3535

3636
### Conversation defaults
3737

@@ -40,7 +40,7 @@ Set conversation config with `jr-rpc config set`, or define the same keys for ev
4040

4141
Default Sentry organization slug when a request does not name one.
4242

43-
- **Define:** `jr-rpc config set sentry.org <organization>`
43+
- **Define:** ask Junior to set `sentry.org`
4444
- **Install-wide default:** `configDefaults["sentry.org"]`
4545
- **Required:** No
4646
- **Environment override:** None
@@ -52,7 +52,7 @@ Default Sentry organization slug when a request does not name one.
5252

5353
Default Sentry project slug when a request does not name one. With `sentry.org`, Junior also links the issue short ids of this project in its replies, such as `JUNIOR-3ZK` for the `junior` project.
5454

55-
- **Define:** `jr-rpc config set sentry.project <project>`
55+
- **Define:** ask Junior to set `sentry.project`
5656
- **Install-wide default:** `configDefaults["sentry.project"]`
5757
- **Required:** No
5858
- **Environment override:** None

‎packages/docs/src/content/docs/extend/vercel-plugin.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Register `vercelPlugin()` so Junior loads the webhook route.
3434

3535
## Config
3636

37-
Set conversation config with `jr-rpc config set`, or define the same keys for every conversation with `createApp({ configDefaults })`. Set deployment variables in the Junior environment, then redeploy. Explicit values in a request always win over conversation defaults.
37+
Ask Junior to set conversation config in a Slack channel or Space, or define the same keys for every conversation with `createApp({ configDefaults })`. Set deployment variables in the Junior environment, then redeploy. Explicit values in a request always win over conversation defaults.
3838

3939
### Conversation defaults
4040

@@ -43,7 +43,7 @@ Set conversation config with `jr-rpc config set`, or define the same keys for ev
4343

4444
Default Vercel project for investigations and deployment watches when a request does not name one.
4545

46-
- **Define:** `jr-rpc config set vercel.project <project>`
46+
- **Define:** ask Junior to set `vercel.project`
4747
- **Install-wide default:** `configDefaults["vercel.project"]`
4848
- **Required:** No
4949
- **Environment override:** None
@@ -55,7 +55,7 @@ Default Vercel project for investigations and deployment watches when a request
5555

5656
Default Vercel team slug or ID used to resolve projects.
5757

58-
- **Define:** `jr-rpc config set vercel.team <team>`
58+
- **Define:** ask Junior to set `vercel.team`
5959
- **Install-wide default:** `configDefaults["vercel.team"]`
6060
- **Required:** No
6161
- **Environment override:** None

‎packages/docs/src/content/docs/reference/config-and-env.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ const app = await createApp({
453453
});
454454
```
455455

456-
Keys should be registered plugin config keys. Junior retains unregistered defaults but warns at startup because they usually indicate missing plugin wiring. Channel-scoped overrides (`jr-rpc config set`) take precedence.
456+
Keys should be registered plugin config keys. Junior retains unregistered defaults but warns at startup because they usually indicate missing plugin wiring. Values that Junior sets for a Slack channel or a Space take precedence, and a Space's value wins over a channel's.
457457

458458
## Sandbox configuration
459459

‎packages/junior-github/skills/github-issues/references/api-surface.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ Treat explicit repo flags as command-targeting safety rails, not as a credential
3838

3939
```bash
4040
jr-rpc config get github.repo
41-
jr-rpc config set github.repo owner/repo
4241
```
4342

43+
Change `github.repo` with the `setConfiguration` tool.
44+
4445
## Behavior notes
4546

4647
- Prefer `--json` output for machine-readable parsing where available.

‎packages/junior/skills/jr-rpc/SKILL.md‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
name: jr-rpc
3-
description: Manage low-level config and plugin introspection flows via jr-rpc bash commands. Use only when the user explicitly asks to read or update provider defaults/config or list installed plugins. Do not use for PR, branch, push, or auth-order questions; load the matching provider skill instead.
3+
description: Read low-level config and list installed plugins via jr-rpc bash commands. Use only when the user explicitly asks to read provider defaults/config or list installed plugins. Do not use for PR, branch, push, or auth-order questions; load the matching provider skill instead.
44
allowed-tools: bash
55
---
66

77
# jr-rpc
88

9-
Manage low-level config and plugin introspection flows for the current agent turn.
9+
Read low-level config and list installed plugins for the current agent turn.
1010

1111
## Plugins
1212

@@ -18,13 +18,11 @@ Command syntax:
1818

1919
## Configuration
2020

21-
`jr-rpc config get|set|unset|list` — read and write channel-scoped configuration values.
21+
`jr-rpc config get|list` — read the configuration of the conversation's Slack channel and Space. A Space's value wins over the channel's. Change a value with the `setConfiguration` tool.
2222

2323
Command syntax:
2424

2525
- `jr-rpc config get <key>`
26-
- `jr-rpc config set <key> <value> [--json]`
27-
- `jr-rpc config unset <key>`
2826
- `jr-rpc config list [--prefix <value>]`
2927

3028
Rules:

0 commit comments

Comments
 (0)