@operad-io/harness-radian 0.4.0 → 0.5.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 +6 -5
- package/skills/setup/SKILL.md +27 -0
- package/src/index.ts +10 -0
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@operad-io/harness-radian",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./src/index.ts"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@operad-io/access-match": "0.
|
|
10
|
-
"@operad-io/engine": "0.
|
|
11
|
-
"@operad-io/harness-process": "0.
|
|
9
|
+
"@operad-io/access-match": "0.5.0",
|
|
10
|
+
"@operad-io/engine": "0.5.0",
|
|
11
|
+
"@operad-io/harness-process": "0.5.0"
|
|
12
12
|
},
|
|
13
|
-
"description": "
|
|
13
|
+
"description": "chats and tasks run by the radian agent",
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
16
|
"url": "git+https://github.com/operad-io/operad.git",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"license": "MIT",
|
|
20
20
|
"files": [
|
|
21
21
|
"src",
|
|
22
|
+
"skills",
|
|
22
23
|
"README.md",
|
|
23
24
|
"LICENSE"
|
|
24
25
|
]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup-radian
|
|
3
|
+
description: Setup Radian. Get the radian agent working in operad, which means installing radian, logging in and checking again.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
I want operad's `radian` agent to work on this machine. Reply in the language I write to you
|
|
7
|
+
in. I do the installing and the logging in myself: give me the command, wait until I say it
|
|
8
|
+
is done, and do not run a login for me or ask me for a password, token or key. Do not edit
|
|
9
|
+
operad's `config.json`.
|
|
10
|
+
|
|
11
|
+
Take the steps for the missing items listed above, in this order.
|
|
12
|
+
|
|
13
|
+
- `enable` (the plugin is off): ask me to run `operad plugin enable radian`, or to turn it on
|
|
14
|
+
where I see operad's plugins.
|
|
15
|
+
- `agent` (radian is not on PATH): ask me to install radian so that the `radian` command is
|
|
16
|
+
on my `PATH`, then to run `radian login`. operad brings no radian of its own. If `radian`
|
|
17
|
+
works in my terminal and is still reported missing, `operad serve` has an older `PATH`: ask
|
|
18
|
+
me to stop it (`operad serve stop`) and start it again from that terminal.
|
|
19
|
+
- `check` (the check failed): read what it says. When it names a command that was not found,
|
|
20
|
+
ask me whether the `command` setting of the `radian` section of `config.json` is right.
|
|
21
|
+
|
|
22
|
+
The check does not cover the login. Once nothing is missing, ask me whether I have run
|
|
23
|
+
`radian login`.
|
|
24
|
+
|
|
25
|
+
After each step, check again: call the operad `command` tool with plugin `bot`, verb `setup`
|
|
26
|
+
and the arguments `{bot}` and `radian`. Stop when it says nothing is missing. If an item
|
|
27
|
+
stays, tell me what the check says and do not claim it is set up.
|
package/src/index.ts
CHANGED
|
@@ -429,6 +429,9 @@ function radianArgs(
|
|
|
429
429
|
return { args: argv, stdin };
|
|
430
430
|
}
|
|
431
431
|
|
|
432
|
+
/** The `SKILL.md` a bot follows to set this agent up (ADR 0010 D7). */
|
|
433
|
+
const SETUP_GUIDE = fileURLToPath(new URL("../skills/setup/SKILL.md", import.meta.url));
|
|
434
|
+
|
|
432
435
|
/**
|
|
433
436
|
* Creates the radian harness plugin. The prompt flow uses the settings for
|
|
434
437
|
* its limits; a direct `agent` step may override them.
|
|
@@ -472,6 +475,13 @@ export function createRadianHarnessPlugin(settings: RadianHarnessSettings = {})
|
|
|
472
475
|
models: RADIAN_MODELS,
|
|
473
476
|
efforts: RADIAN_EFFORTS,
|
|
474
477
|
signedIn: (_settings: Readonly<Record<string, unknown>>) => radianSignedIn(authPath),
|
|
478
|
+
// A command the owner set is the check's to judge.
|
|
479
|
+
agentMissing: (settings) =>
|
|
480
|
+
settings.command !== undefined || Bun.which(defaults.command, { PATH: process.env.PATH ?? "" }) !== null
|
|
481
|
+
? undefined
|
|
482
|
+
: `${defaults.command} is not on PATH; install it, then run \`${defaults.command} login\``,
|
|
483
|
+
// Setup Radian (ADR 0022 D14): the guide a bot follows for what the check reports missing.
|
|
484
|
+
guide: SETUP_GUIDE,
|
|
475
485
|
settings: PLUGIN_SETTINGS,
|
|
476
486
|
steps: [
|
|
477
487
|
{
|