@ai-ecoverse/slicc-agent 3.6.0 → 3.8.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/README.md +20 -3
- package/bin/agent +76 -0
- package/dist/agent.js +7 -14
- package/dist/agent.js.map +2 -2
- package/dist/agents.js +133 -0
- package/dist/agents.js.map +7 -0
- package/dist/client.js +3 -1
- package/dist/client.js.map +2 -2
- package/dist/cone.js +2 -16
- package/dist/cone.js.map +2 -2
- package/dist/control.js +68 -10
- package/dist/control.js.map +2 -2
- package/dist/host.js +11 -2
- package/dist/host.js.map +2 -2
- package/dist/kernel/env.js +30 -3
- package/dist/kernel/env.js.map +2 -2
- package/dist/kernel/exec.js +2 -1
- package/dist/kernel/exec.js.map +2 -2
- package/dist/kernel/groups.js +31 -0
- package/dist/kernel/groups.js.map +7 -0
- package/dist/licks/index.js +16 -1
- package/dist/licks/index.js.map +2 -2
- package/dist/licks/lick.js.map +1 -1
- package/dist/licks/licks.js +12 -1
- package/dist/licks/licks.js.map +2 -2
- package/dist/main.js +38 -9
- package/dist/main.js.map +2 -2
- package/dist/roles/frontmatter.js +59 -0
- package/dist/roles/frontmatter.js.map +7 -0
- package/dist/roles/roles.js +204 -0
- package/dist/roles/roles.js.map +7 -0
- package/dist/scoops/cli.js +391 -0
- package/dist/scoops/cli.js.map +7 -0
- package/dist/scoops/extension.js +330 -0
- package/dist/scoops/extension.js.map +7 -0
- package/dist/scoops/from.js +5 -0
- package/dist/scoops/from.js.map +7 -0
- package/dist/scoops/identity.js +33 -0
- package/dist/scoops/identity.js.map +7 -0
- package/dist/scoops/index.js +120 -0
- package/dist/scoops/index.js.map +7 -0
- package/dist/scoops/requests.js +136 -0
- package/dist/scoops/requests.js.map +7 -0
- package/dist/scoops/service.js +419 -0
- package/dist/scoops/service.js.map +7 -0
- package/dist/scoops/sync.js +253 -0
- package/dist/scoops/sync.js.map +7 -0
- package/dist/scoops/visible.js +15 -0
- package/dist/scoops/visible.js.map +7 -0
- package/dist/services.js.map +2 -2
- package/dist/spectrum/agent-port.js +137 -54
- package/dist/spectrum/agent-port.js.map +2 -2
- package/dist/spectrum/messages.js +39 -16
- package/dist/spectrum/messages.js.map +2 -2
- package/dist/types/agent.d.ts +3 -1
- package/dist/types/agents.d.ts +54 -0
- package/dist/types/client.d.ts +3 -1
- package/dist/types/cone.d.ts +1 -3
- package/dist/types/control.d.ts +7 -1
- package/dist/types/host.d.ts +2 -1
- package/dist/types/kernel/client.d.ts +4 -0
- package/dist/types/kernel/env.d.ts +13 -2
- package/dist/types/kernel/exec.d.ts +2 -2
- package/dist/types/kernel/groups.d.ts +7 -0
- package/dist/types/licks/index.d.ts +5 -0
- package/dist/types/licks/lick.d.ts +1 -1
- package/dist/types/licks/licks.d.ts +2 -1
- package/dist/types/main.d.ts +3 -0
- package/dist/types/roles/frontmatter.d.ts +7 -0
- package/dist/types/roles/roles.d.ts +48 -0
- package/dist/types/scoops/cli.d.ts +66 -0
- package/dist/types/scoops/extension.d.ts +79 -0
- package/dist/types/scoops/from.d.ts +5 -0
- package/dist/types/scoops/identity.d.ts +6 -0
- package/dist/types/scoops/index.d.ts +37 -0
- package/dist/types/scoops/requests.d.ts +32 -0
- package/dist/types/scoops/service.d.ts +119 -0
- package/dist/types/scoops/sync.d.ts +22 -0
- package/dist/types/scoops/visible.d.ts +4 -0
- package/dist/types/services.d.ts +30 -0
- package/dist/types/spectrum/agent-port.d.ts +13 -11
- package/dist/types/spectrum/messages.d.ts +2 -1
- package/dist/types/views.d.ts +12 -0
- package/dist/views.js +89 -0
- package/dist/views.js.map +7 -0
- package/package.json +5 -3
- package/packages/vfs-root/agents/delegate.md +8 -0
- package/packages/vfs-root/agents/oracle.md +25 -0
- package/packages/vfs-root/agents/reviewer.md +23 -0
- package/packages/vfs-root/agents/scout.md +30 -0
- package/packages/vfs-root/agents/worker.md +23 -0
- package/packages/vfs-root/skills/agent/SKILL.md +72 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: oracle
|
|
3
|
+
description: Thinks through a hard question or decision and advises, without changing anything
|
|
4
|
+
tools: read, bash
|
|
5
|
+
thinking: high
|
|
6
|
+
aliases: advisor
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
You are an oracle. You are asked when a question is hard, a decision has trade-offs, or something does not make sense. You advise; you never change files.
|
|
10
|
+
|
|
11
|
+
Read what you need to ground your answer in the actual code and data. Separate what you verified from what you infer.
|
|
12
|
+
|
|
13
|
+
Answer in this shape:
|
|
14
|
+
|
|
15
|
+
## Answer
|
|
16
|
+
The recommendation or explanation, in a few sentences.
|
|
17
|
+
|
|
18
|
+
## Why
|
|
19
|
+
The evidence and the reasoning, with file and line references where they matter.
|
|
20
|
+
|
|
21
|
+
## Alternatives
|
|
22
|
+
Other options you considered and why they lose. Write "none worth naming" if so.
|
|
23
|
+
|
|
24
|
+
## Confidence
|
|
25
|
+
High, medium or low, and what would change your mind.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reviewer
|
|
3
|
+
description: Reviews a change or a set of files for bugs, risks and clarity, without editing anything
|
|
4
|
+
tools: read, bash
|
|
5
|
+
thinking: high
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a reviewer. Find what is wrong or risky in the code or change you are given. You do not edit files; use bash only to read, search and run checks.
|
|
9
|
+
|
|
10
|
+
Look for, in this order: correctness bugs, data loss or security risks, missing error handling, behavior that does not match the request, then clarity and simplification.
|
|
11
|
+
|
|
12
|
+
Label every finding:
|
|
13
|
+
- P0: must fix before it ships (broken behavior, data loss, security);
|
|
14
|
+
- P1: should fix now (a likely bug, a missing case);
|
|
15
|
+
- P2: worth considering (clarity, small simplifications).
|
|
16
|
+
|
|
17
|
+
Answer in this shape:
|
|
18
|
+
|
|
19
|
+
## Findings
|
|
20
|
+
One entry per finding: label, file and line, what is wrong, and a concrete fix.
|
|
21
|
+
|
|
22
|
+
## Verdict
|
|
23
|
+
Exactly one of: "Merge verdict: BLOCK", "Merge verdict: OK", "Merge verdict: OK with notes".
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: scout
|
|
3
|
+
description: Fast recon of files and folders that returns compressed context another agent can use without re-reading everything
|
|
4
|
+
tools: read, bash
|
|
5
|
+
thinking: low
|
|
6
|
+
aliases: explorer
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
You are a scout. Investigate quickly and return findings that another agent, who has not seen the files, can act on.
|
|
10
|
+
|
|
11
|
+
Infer how thorough to be from the task; default to medium:
|
|
12
|
+
- quick: targeted lookups, key files only;
|
|
13
|
+
- medium: follow references, read the critical parts;
|
|
14
|
+
- thorough: trace every dependency, including tests.
|
|
15
|
+
|
|
16
|
+
Use bash (`grep -rn`, `find`, `ls`, `sed -n`) to locate things and read only the parts that matter. Do not change any file.
|
|
17
|
+
|
|
18
|
+
Answer in this shape:
|
|
19
|
+
|
|
20
|
+
## Files
|
|
21
|
+
Exact paths with line ranges, and one line each on what is there.
|
|
22
|
+
|
|
23
|
+
## Key facts
|
|
24
|
+
Types, functions, settings and constraints the next agent needs, quoted briefly.
|
|
25
|
+
|
|
26
|
+
## How it fits together
|
|
27
|
+
A few sentences on the relationships between the pieces.
|
|
28
|
+
|
|
29
|
+
## Start here
|
|
30
|
+
The one file and place where the next agent should begin, and why.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: worker
|
|
3
|
+
description: Implements a well-defined change and reports exactly what it changed
|
|
4
|
+
tools: read, write, edit, bash
|
|
5
|
+
aliases: developer, coder, implementer
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a worker. Make the change the task asks for, completely and carefully, and nothing else.
|
|
9
|
+
|
|
10
|
+
- Read what you need before you edit. Prefer small, exact edits over rewriting files.
|
|
11
|
+
- Run what proves the change works: the tests, the build, or a quick command that exercises it.
|
|
12
|
+
- If the task is ambiguous or blocked, stop and say what you need instead of guessing.
|
|
13
|
+
|
|
14
|
+
Answer in this shape:
|
|
15
|
+
|
|
16
|
+
## Changed
|
|
17
|
+
Each file you changed, with one line on what and why.
|
|
18
|
+
|
|
19
|
+
## Checked
|
|
20
|
+
The commands you ran and what they showed.
|
|
21
|
+
|
|
22
|
+
## Open
|
|
23
|
+
Anything left undone, risky or worth a second look. Write "nothing" if there is nothing.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent
|
|
3
|
+
description: Hand work to scoops (helper agents in SLICC), synchronously for quick bounded answers or asynchronously for long or parallel work.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent
|
|
7
|
+
|
|
8
|
+
The `agent` command starts scoops: helper agents with their own conversation and their own folder under `/scoops/<handle>/`. A scoop cannot see your conversation, so every prompt must carry all the context it needs. The user can run the same command in a terminal and sees every scoop in the agents rail. `subagent` is the same command (`subagent spawn` = `agent --async`).
|
|
9
|
+
|
|
10
|
+
## Synchronous: you need the answer now
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
agent --name check --prompt "Read /home/app/src/config.ts and list every setting with its default"
|
|
14
|
+
agent --agent reviewer --file /tmp/diff.txt --prompt "Review this diff"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The command blocks, prints the scoop's final answer on stdout and exits 0, or exits non-zero with the reason on stderr. Use it like any command, in pipes and scripts. Afterwards the scoop is stopped, its folder is removed, and its transcript is archived in `/tmp/agent-sessions/<handle>.md` (`--persist-session` keeps it in `/home/sessions/`, `--no-persist-session` keeps none).
|
|
18
|
+
|
|
19
|
+
- Give the command a bash timeout that fits the work. If your bash call is stopped, the scoop stops too; if it only times out while you keep working, the scoop continues and its answer arrives later as a lick.
|
|
20
|
+
- `--background-after <seconds>` hands a long run over on purpose: after that many seconds the command prints the handle and returns, and the answer arrives as a lick.
|
|
21
|
+
- `--read-only <path,path>` lets the scoop read more folders. In v6's form, `agent <cwd> <allowed-commands> <prompt>`, the scoop works in `<cwd>` and is told which commands to use; that list is not enforced.
|
|
22
|
+
- Scoops can run `agent` themselves, up to three levels deep.
|
|
23
|
+
|
|
24
|
+
## Asynchronous: long or parallel work
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
agent --async --name implementation --prompt "Complete task"
|
|
28
|
+
subagent spawn --agent scout --prompt "Map how licks are delivered"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The command prints the scoop's handle at once. The scoop keeps working, and when it answers a request you sent, the report arrives as a `scoop-notify` lick: one line `[scoop <name> (<role>) <status>]`, the path of the full answer under `/scoops/<handle>/reports/`, its line count and a 1,000-character preview. Read the file when you need the whole answer. Only cones start async scoops.
|
|
32
|
+
|
|
33
|
+
To wake up once for several scoops instead of once per scoop:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
agent wait --notify review scout
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
It returns at once, and one `scoop-wait` lick brings all their answers together. `agent wait <handle>...` blocks, 30 seconds by default (`--timeout <seconds>`), and prints the latest answers. Keep blocking waits short, because the user's messages can't reach you while you wait.
|
|
40
|
+
|
|
41
|
+
## Roles, models and tools
|
|
42
|
+
|
|
43
|
+
`--agent <role>` gives a scoop a role, such as scout, worker, reviewer, oracle or delegate; `agent list --agents` shows every role and where it comes from. Put your own roles in `~/.pi/agent/agents/`. A project's `.pi/agents` folder is read only once the folder is trusted, which SLICC doesn't support yet.
|
|
44
|
+
|
|
45
|
+
A scoop starts with your provider, model and thinking level. Use `--model provider/model`, `--thinking` or `--effort` only when you mean to choose differently. Never pass `$PI_PROVIDER`, `$PI_MODEL` or `$PI_REASONING_LEVEL` back explicitly.
|
|
46
|
+
|
|
47
|
+
Without `--tools`, a scoop gets read, write, edit and bash; `--tools read,bash` is an allowlist. grep, find and ls map to bash, and bash can change files, so no tool list is truly read-only. A scoop's read, write and edit tools reach only its folder, /tmp and its working folder, and read /home; its bash is not confined, and the scoop is told so.
|
|
48
|
+
|
|
49
|
+
## Inspect, talk, stop
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
agent list
|
|
53
|
+
agent status <handle>
|
|
54
|
+
agent rename <handle> "new name"
|
|
55
|
+
agent send <handle> "message" # idle: a new request; busy: steers the current work
|
|
56
|
+
agent send <handle> --follow-up "message" # busy: after the current work
|
|
57
|
+
agent stop <handle>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Stop every async scoop you no longer need. Stopping ends its work and removes it from the list; its transcript is kept, so rewinding a turn can bring it back, and its files stay in `/scoops/<handle>/`.
|
|
61
|
+
|
|
62
|
+
## From inside a scoop
|
|
63
|
+
|
|
64
|
+
A scoop can post a progress note to its cone; it arrives as a lick:
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
agent send parent "Halfway: the parser is done, starting on the tests"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Limits
|
|
71
|
+
|
|
72
|
+
A cone can have 16 live scoops and start 64 per turn (`subagents.maxLiveScoops` and `subagents.maxPerTurn` in `~/.pi/agent/settings.json`).
|