@tt-a1i/openpi 0.6.0 → 0.6.1
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 +13 -11
- package/SETUP.md +2 -2
- package/extensions/ai-providers/README.md +12 -6
- package/extensions/ai-providers/cursor/input-images.ts +2 -3
- package/extensions/ai-providers/cursor/proto.ts +218 -11
- package/extensions/ai-providers/cursor/protobuf.ts +12 -2
- package/extensions/ai-providers/cursor/provider.ts +276 -20
- package/extensions/ai-providers/cursor/tool-bridge.ts +68 -0
- package/extensions/ai-providers/index.ts +3 -3
- package/extensions/shared/child-session.ts +14 -0
- package/extensions/subagents/index.ts +20 -3
- package/extensions/subagents/src/agent-types.ts +5 -17
- package/extensions/subagents/src/backends/pi.ts +70 -59
- package/extensions/subagents/src/backends/tool-preview.ts +29 -0
- package/extensions/subagents/src/manager.ts +2 -71
- package/extensions/subagents/src/prompt.ts +2 -2
- package/extensions/subagents/src/runtime.ts +10 -3
- package/extensions/workflows/dashboard.ts +139 -21
- package/extensions/workflows/index.ts +62 -20
- package/extensions/workflows/progress-projection.ts +7 -1
- package/extensions/workflows/runner.ts +5 -162
- package/extensions/workflows/sandbox.ts +4 -0
- package/package.json +1 -1
- package/skills/subagents/REFERENCE.md +6 -7
- package/skills/subagents/SKILL.md +1 -1
- package/skills/workflows/REFERENCE.md +3 -1
|
@@ -35,6 +35,7 @@ export interface SandboxAgentOptions {
|
|
|
35
35
|
provider?: unknown;
|
|
36
36
|
effort?: unknown;
|
|
37
37
|
isolation?: unknown;
|
|
38
|
+
working_dir?: unknown;
|
|
38
39
|
operator?: unknown;
|
|
39
40
|
inputs?: unknown;
|
|
40
41
|
}
|
|
@@ -110,6 +111,9 @@ function sanitizeAgentOptions(value: unknown): SandboxAgentOptions {
|
|
|
110
111
|
...(value.provider !== undefined ? { provider: value.provider } : {}),
|
|
111
112
|
...(value.effort !== undefined ? { effort: value.effort } : {}),
|
|
112
113
|
...(value.isolation !== undefined ? { isolation: value.isolation } : {}),
|
|
114
|
+
...(value.working_dir !== undefined
|
|
115
|
+
? { working_dir: value.working_dir }
|
|
116
|
+
: {}),
|
|
113
117
|
...(value.operator !== undefined ? { operator: value.operator } : {}),
|
|
114
118
|
...(value.inputs !== undefined ? { inputs: value.inputs } : {}),
|
|
115
119
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tt-a1i/openpi",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "OpenPI — a Pi-native multi-agent workbench with background execution, isolated subagents, replay-safe workflows, goals, tasks, and observable TUI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "tt-a1i",
|
|
@@ -32,7 +32,7 @@ file:line references. You cannot modify files — do not attempt to.
|
|
|
32
32
|
| ------------------ | -------- | ------------------------------------------------------------------------------------ |
|
|
33
33
|
| `name` | yes | `[a-z0-9-]`, ≤64 chars, and must equal the filename stem. |
|
|
34
34
|
| `description` | yes | Shown to the parent model when it picks a type. ≤1024 chars. |
|
|
35
|
-
| `tools` | no | Tool allowlist. **Omit to inherit
|
|
35
|
+
| `tools` | no | Tool allowlist. **Omit to inherit active parent child-eligible tools.** |
|
|
36
36
|
| `model` | no | `provider/model-id`, or a bare id resolved against the current provider; ≤256 chars. |
|
|
37
37
|
| `reasoning_effort` | no | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`. |
|
|
38
38
|
| body | no | Appended to the child's system prompt. ≤16384 chars. |
|
|
@@ -50,16 +50,15 @@ file with the same name.
|
|
|
50
50
|
|
|
51
51
|
| Role | Tools | Relative effort guidance | Purpose |
|
|
52
52
|
| ------------- | ------------------------------------------------------------------- | ------------------------ | ------------------------------------------------------ |
|
|
53
|
-
| `explorer` |
|
|
54
|
-
| `implementer` |
|
|
55
|
-
| `reviewer` |
|
|
56
|
-
| `advisor` |
|
|
53
|
+
| `explorer` | Active parent child-eligible tools | Moderate | Read-only codebase tracing; increase for harder tasks. |
|
|
54
|
+
| `implementer` | Active parent child-eligible tools | Medium-high | Focused implementation; adjust for scope and risk. |
|
|
55
|
+
| `reviewer` | Active parent child-eligible tools | High | Read-only correctness, safety, and regression review. |
|
|
56
|
+
| `advisor` | Active parent child-eligible tools | High | Deep read-only analysis and technical advice. |
|
|
57
57
|
|
|
58
58
|
These are relative selection hints, not fixed Pi thinking levels. Built-ins set
|
|
59
59
|
no model or reasoning-effort default. An explicit user requirement takes
|
|
60
60
|
priority; otherwise the parent model chooses from levels supported by the
|
|
61
|
-
resolved child model according to the role and task difficulty.
|
|
62
|
-
allowlists still intersect with plan mode and the child denylist.
|
|
61
|
+
resolved child model according to the role and task difficulty. Custom role allowlists intersect with active parent tools, Plan Mode, and the child denylist. Built-in read-only task guidance is a role instruction, not a filesystem sandbox. Existing custom role files are never widened automatically.
|
|
63
62
|
|
|
64
63
|
## Discovery
|
|
65
64
|
|
|
@@ -10,7 +10,7 @@ The tool definitions are canonical for parameters, limits, model syntax, isolati
|
|
|
10
10
|
- Delegate substantial independent work, not a lookup or edit the parent can do directly.
|
|
11
11
|
- Give the child a standalone prompt with paths, constraints, relevant context, and the expected report; it cannot see the parent conversation or ask the user.
|
|
12
12
|
- Inherit the parent model by default. When choosing the child's reasoning effort, honor an explicit user requirement first; otherwise use the selected role's relative guidance and the task's difficulty, choosing from levels supported by the resolved child model.
|
|
13
|
-
- Prefer a matching agent type when one exists;
|
|
13
|
+
- Prefer a matching agent type when one exists; built-ins inherit active parent tools, while an explicit custom tool list is enforced as a narrowing restriction. Model precedence is explicit spawn override, selected type-file model, configured built-in role model, then parent model. Reasoning precedence is explicit spawn override, selected type default, then parent effort. Types live in `~/.pi/agent/agents/*.md` and, for trusted projects, `.pi/agents/*.md`; see [Agent types](REFERENCE.md).
|
|
14
14
|
- Isolate concurrent writers in worktrees according to the `subagent_spawn` schema so they cannot overwrite one checkout or git index. While Plan Mode is active, use only read-only exploration types (or no type); worktree isolation and types narrowed by Plan Mode are rejected.
|
|
15
15
|
- After spawning, continue useful parent work. In an interactive session, if none remains, tell the user the child is still running and end the turn; automatic result delivery will re-invoke the parent when it settles. Do not block merely because the next step depends on the result or because there is nothing else to do. Use `subagent_wait` only when the user explicitly asks to keep the current response open for the result, or when non-interactive automation must return it in the same invocation.
|
|
16
16
|
- Use optional `output_schema` when downstream work needs a machine-validated result rather than prose. The child then receives one terminating `structured_output` tool, and the run fails if it finishes without submitting a matching value. Keep schemas small and task-specific; the validated JSON is delivered to the parent and preserved in a private content-addressed artifact. Omit the option for ordinary text reports.
|
|
@@ -14,8 +14,10 @@ The `workflow` script is an async JavaScript function body executed in a restric
|
|
|
14
14
|
|
|
15
15
|
`await agent(prompt, options)` runs one child and always resolves to `{ ok, output, structured?, ref?, acceptance?, acceptanceWarning?, error? }`. Check `ok` before reading output. Children receive normal trust-aware resources but cannot recursively orchestrate or ask the user.
|
|
16
16
|
|
|
17
|
-
Useful options include `agent_type`, `label`, `phase`, `schema`, `model`, `provider`, `effort`, `isolation`, `operator`, and `inputs`. The legacy `acceptance` option remains readable only during the 0.x migration window described below.
|
|
17
|
+
Useful options include `agent_type`, `label`, `phase`, `schema`, `model`, `provider`, `effort`, `working_dir`, `isolation`, `operator`, and `inputs`. The legacy `acceptance` option remains readable only during the 0.x migration window described below.
|
|
18
18
|
|
|
19
|
+
- Set `working_dir` when tools must run in another repository. Relative paths resolve against the parent cwd; prompt text alone does not change it. The directory must exist. Project resource trust is checked for the target independently.
|
|
20
|
+
- Built-in roles inherit currently active parent child-eligible tools, including shell/network when available. Explicit custom tool lists only narrow this surface. Built-ins with inherited tools execute for real on resume; custom bounded read-only calls retain the replay filesystem boundary below.
|
|
19
21
|
- Prefer a matching `agent_type`. Model precedence is explicit model/provider, type file, configured built-in role, then parent. Effort precedence is explicit effort, type default, then parent.
|
|
20
22
|
- `schema` validates structured output. Use it whenever later workflow logic branches on fields.
|
|
21
23
|
- `acceptance` is deprecated since OpenPI 0.5 and scheduled for removal in 1.0. Compatibility calls still return the child-authored ledger with `authority: "model-self-attestation"` and a migration warning, but it never determines `ok`. Use ordinary `schema` for findings, then let the parent evaluate them alongside runtime-observed exit codes, test receipts, file fingerprints, and tool results. Old DSL, journals, and artifacts remain readable during 0.x.
|