@oisin-ee/oisinpi 0.7.1 → 0.7.2
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 +9 -0
- package/README.md +4 -4
- package/node_modules/@oisin-ee/pi-guardrails/README.md +1 -1
- package/node_modules/@oisin-ee/pi-guardrails/dist/policies/shell.js +9 -9
- package/node_modules/@oisin-ee/pi-guardrails/package.json +1 -1
- package/node_modules/@oisin-ee/pi-guardrails/src/pi/tool-timeouts.ts +4 -4
- package/node_modules/@oisin-ee/pi-guardrails/src/policies/shell.ts +9 -9
- package/node_modules/@oisin-ee/pi-prewalk/README.md +1 -1
- package/node_modules/@oisin-ee/pi-prewalk/package.json +1 -1
- package/node_modules/@oisin-ee/pi-todo/README.md +4 -4
- package/node_modules/@oisin-ee/pi-todo/package.json +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @oisin-ee/oisinpi
|
|
2
2
|
|
|
3
|
+
## 0.7.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`f31e9a6`](https://github.com/oisin-ee/oisinpi/commit/f31e9a6043d5b7cbe351540b51f87eadf85c9af3)]:
|
|
8
|
+
- @oisin-ee/pi-guardrails@0.7.2
|
|
9
|
+
- @oisin-ee/pi-prewalk@0.7.2
|
|
10
|
+
- @oisin-ee/pi-todo@0.7.2
|
|
11
|
+
|
|
3
12
|
## 0.7.1
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -15,11 +15,11 @@ pi install npm:@oisin-ee/oisinpi
|
|
|
15
15
|
The collection bundles the three packages in its tarball and adds no code. No member imports another, so each one also
|
|
16
16
|
installs by itself.
|
|
17
17
|
|
|
18
|
-
pi-
|
|
19
|
-
([oisin-ee/
|
|
18
|
+
pi-dogsled is not in the collection. Install it on its own, at the same version as the `dogsled` binary
|
|
19
|
+
([oisin-ee/dogsled](https://github.com/oisin-ee/dogsled)):
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
pi install npm:@oisin-ee/pi-
|
|
22
|
+
pi install npm:@oisin-ee/pi-dogsled@<dogsled version>
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
When pi-
|
|
25
|
+
When pi-dogsled is active, its work widget hosts pi-todo's view. Without it, pi-todo keeps its own widget.
|
|
@@ -6,7 +6,7 @@ Agent guardrails for [pi](https://pi.dev), Claude Code, and Codex. One set of po
|
|
|
6
6
|
under `.worktrees/`, no on-the-fly identity.
|
|
7
7
|
- **Wait gate:** no `sleep`, `watch`, follow flags, `--wait`/`--watch`, or wait subcommands. Start long work in the
|
|
8
8
|
background instead.
|
|
9
|
-
- **Agent typing:** no `herdr agent prompt` or `pane send-*` into another agent's terminal. Use `
|
|
9
|
+
- **Agent typing:** no `herdr agent prompt` or `pane send-*` into another agent's terminal. Use `dogsled send`. For prompt answers, only `herdr agent send-keys` accepts `# dogsled: answer-prompt`; each use is recorded.
|
|
10
10
|
- **GitOps:** no imperative `kubectl`, `helm`, `argocd`, or `nix` mutations, and no `fsck`/`mkfs`.
|
|
11
11
|
- **Generated paths:** no hand-edits of lockfiles or generated files.
|
|
12
12
|
|
|
@@ -27,7 +27,7 @@ export const SHELL_MSG = {
|
|
|
27
27
|
branch: "git-gate: blocked creating or resetting a branch. Per rules/30-safety-and-delivery.md, create new branches with " +
|
|
28
28
|
"git worktree add -b <branch> .worktrees/<name> [<commit-ish>], or with git branch/switch -c/checkout -b " +
|
|
29
29
|
"inside an agent-owned linked worktree. For a delegated child's branch, run " +
|
|
30
|
-
"`
|
|
30
|
+
"`dogsled place --branch <branch> --base origin/main` instead (rules/20-delegation.md). " +
|
|
31
31
|
"Forced branch resets (-B, -C, -f) are never allowed.",
|
|
32
32
|
clean: 'git-gate: blocked "git clean -f" which permanently deletes untracked files. Per rules/30-safety-and-delivery.md, ' +
|
|
33
33
|
'never discard work on your own — preview with "git clean -n" or ask the user.',
|
|
@@ -51,13 +51,13 @@ export const SHELL_MSG = {
|
|
|
51
51
|
"unrelated working-tree changes can be lost or conflict on restore. Use a worktree or ask the user.",
|
|
52
52
|
worktree: "git-gate: blocked creating a worktree outside repo-local .worktrees/. Per rules/30-safety-and-delivery.md, " +
|
|
53
53
|
"worktrees must use git worktree add [-b <branch>] .worktrees/<name> [<commit-ish>]. For a delegated child's " +
|
|
54
|
-
"worktree, run `
|
|
54
|
+
"worktree, run `dogsled place --branch <branch> --base origin/main` instead (rules/20-delegation.md).",
|
|
55
55
|
};
|
|
56
56
|
export const TYPING_MSG = "agent-typing: blocked typing into another agent's terminal. Typed text lands in the user's draft and mixes " +
|
|
57
|
-
"with it. Message the agent through its
|
|
58
|
-
"`
|
|
59
|
-
"`#
|
|
60
|
-
const ANSWER_PROMPT = /#\s*
|
|
57
|
+
"with it. Message the agent through its dogsled inbox instead: the `send` tool (mcp__dogsled__send) or " +
|
|
58
|
+
"`dogsled send <name-or-pane> --message <text>`. To answer a prompt dialog in another pane with keys, add " +
|
|
59
|
+
"`# dogsled: answer-prompt` to `herdr agent send-keys`; each such use is recorded.";
|
|
60
|
+
const ANSWER_PROMPT = /#\s*dogsled:\s*answer-prompt\b/u, HERDR_VALUE_OPTIONS = new Set(["--session", "--machine", "--remote"]), PANE_TYPING = new Set(["send-text", "send-keys", "send-input"]);
|
|
61
61
|
// The herdr subcommand words after global options, through env, timeout, and shell wrappers.
|
|
62
62
|
function herdrWords(inputWords) {
|
|
63
63
|
const words = [...inputWords];
|
|
@@ -124,7 +124,7 @@ function shellPieces(words) {
|
|
|
124
124
|
}
|
|
125
125
|
// Typing into another agent's terminal: `herdr agent prompt`, `herdr agent send-keys`, and
|
|
126
126
|
// `herdr pane send-text|send-keys|send-input` aimed at a pane that runs an agent. `agent send-keys` with
|
|
127
|
-
// `#
|
|
127
|
+
// `# dogsled: answer-prompt` on the command line is allowed and recorded. The caller's own pane is not
|
|
128
128
|
// Another agent's. `isAgent` is the pane lookup; the second argument is the cwd every classifier receives.
|
|
129
129
|
export function classifyAgentTyping(command, cwd = process.cwd(), isAgent = paneRunsAgent, self = process.env["HERDR_PANE_ID"]) {
|
|
130
130
|
const marked = typeof command === "string" && ANSWER_PROMPT.test(command);
|
|
@@ -177,8 +177,8 @@ export const IMPERATIVE_MSG = {
|
|
|
177
177
|
};
|
|
178
178
|
export const WAIT_MSG = "wait-gate: blocked a command that waits instead of working (sleep, watch, a follow flag, a --watch or --wait " +
|
|
179
179
|
"flag, or a wait subcommand). Never hold a tool call to wait, and never re-read a log to check progress. " +
|
|
180
|
-
"For long work in pi, use
|
|
181
|
-
"Use `read` (
|
|
180
|
+
"For long work in pi, use Dogsled `run` (mcp__dogsled__run) and continue other work. " +
|
|
181
|
+
"Use `read` (mcp__dogsled__read) for output and `stop` (mcp__dogsled__stop) to cancel the job. " +
|
|
182
182
|
"Start long work so the host reports its exit: in Claude Code, `run_in_background` " +
|
|
183
183
|
"or Monitor (the exit arrives as a message); in Codex, exec_command, then empty write_stdin calls, which " +
|
|
184
184
|
"return when the process exits. " +
|
|
@@ -41,8 +41,8 @@ export function codeWaitViolation(
|
|
|
41
41
|
}
|
|
42
42
|
return CODE_WAITS.some((pattern) => pattern.test(code))
|
|
43
43
|
? "wait-gate: blocked a sleep or timer wait in sandbox code. Never hold a tool call to wait. Start long work with " +
|
|
44
|
-
"
|
|
45
|
-
"and `stop` (
|
|
44
|
+
"Dogsled `run` (mcp__dogsled__run) and continue other work. Use `read` (mcp__dogsled__read) for output " +
|
|
45
|
+
"and `stop` (mcp__dogsled__stop) to cancel the job."
|
|
46
46
|
: null;
|
|
47
47
|
}
|
|
48
48
|
|
|
@@ -62,8 +62,8 @@ function limitMessage(
|
|
|
62
62
|
return (
|
|
63
63
|
`timeout-gate: blocked ${toolName} ${field}=${value}. The ${field} unit is ${unit === "s" ? "seconds" : "milliseconds"} ` +
|
|
64
64
|
`and the limit is ${max} (${MAX_TIMEOUT_SECONDS / 60} minutes).${unitHint} ` +
|
|
65
|
-
"For a longer job, start it with
|
|
66
|
-
"Use `read` (
|
|
65
|
+
"For a longer job, start it with Dogsled `run` (mcp__dogsled__run) and continue other work. " +
|
|
66
|
+
"Use `read` (mcp__dogsled__read) for output and `stop` (mcp__dogsled__stop) to cancel the job. " +
|
|
67
67
|
"For CI, use the ci_find and ci_watch tools."
|
|
68
68
|
);
|
|
69
69
|
}
|
|
@@ -42,7 +42,7 @@ export const SHELL_MSG = {
|
|
|
42
42
|
"git-gate: blocked creating or resetting a branch. Per rules/30-safety-and-delivery.md, create new branches with " +
|
|
43
43
|
"git worktree add -b <branch> .worktrees/<name> [<commit-ish>], or with git branch/switch -c/checkout -b " +
|
|
44
44
|
"inside an agent-owned linked worktree. For a delegated child's branch, run " +
|
|
45
|
-
"`
|
|
45
|
+
"`dogsled place --branch <branch> --base origin/main` instead (rules/20-delegation.md). " +
|
|
46
46
|
"Forced branch resets (-B, -C, -f) are never allowed.",
|
|
47
47
|
clean:
|
|
48
48
|
'git-gate: blocked "git clean -f" which permanently deletes untracked files. Per rules/30-safety-and-delivery.md, ' +
|
|
@@ -74,16 +74,16 @@ export const SHELL_MSG = {
|
|
|
74
74
|
worktree:
|
|
75
75
|
"git-gate: blocked creating a worktree outside repo-local .worktrees/. Per rules/30-safety-and-delivery.md, " +
|
|
76
76
|
"worktrees must use git worktree add [-b <branch>] .worktrees/<name> [<commit-ish>]. For a delegated child's " +
|
|
77
|
-
"worktree, run `
|
|
77
|
+
"worktree, run `dogsled place --branch <branch> --base origin/main` instead (rules/20-delegation.md).",
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
export const TYPING_MSG =
|
|
81
81
|
"agent-typing: blocked typing into another agent's terminal. Typed text lands in the user's draft and mixes " +
|
|
82
|
-
"with it. Message the agent through its
|
|
83
|
-
"`
|
|
84
|
-
"`#
|
|
82
|
+
"with it. Message the agent through its dogsled inbox instead: the `send` tool (mcp__dogsled__send) or " +
|
|
83
|
+
"`dogsled send <name-or-pane> --message <text>`. To answer a prompt dialog in another pane with keys, add " +
|
|
84
|
+
"`# dogsled: answer-prompt` to `herdr agent send-keys`; each such use is recorded.";
|
|
85
85
|
|
|
86
|
-
const ANSWER_PROMPT = /#\s*
|
|
86
|
+
const ANSWER_PROMPT = /#\s*dogsled:\s*answer-prompt\b/u,
|
|
87
87
|
HERDR_VALUE_OPTIONS: ReadonlySet<string> = new Set(["--session", "--machine", "--remote"]),
|
|
88
88
|
PANE_TYPING: ReadonlySet<string> = new Set(["send-text", "send-keys", "send-input"]);
|
|
89
89
|
|
|
@@ -161,7 +161,7 @@ function shellPieces(words: Words): string | null {
|
|
|
161
161
|
|
|
162
162
|
// Typing into another agent's terminal: `herdr agent prompt`, `herdr agent send-keys`, and
|
|
163
163
|
// `herdr pane send-text|send-keys|send-input` aimed at a pane that runs an agent. `agent send-keys` with
|
|
164
|
-
// `#
|
|
164
|
+
// `# dogsled: answer-prompt` on the command line is allowed and recorded. The caller's own pane is not
|
|
165
165
|
// Another agent's. `isAgent` is the pane lookup; the second argument is the cwd every classifier receives.
|
|
166
166
|
export function classifyAgentTyping(
|
|
167
167
|
command: Command,
|
|
@@ -229,8 +229,8 @@ export const IMPERATIVE_MSG = {
|
|
|
229
229
|
export const WAIT_MSG =
|
|
230
230
|
"wait-gate: blocked a command that waits instead of working (sleep, watch, a follow flag, a --watch or --wait " +
|
|
231
231
|
"flag, or a wait subcommand). Never hold a tool call to wait, and never re-read a log to check progress. " +
|
|
232
|
-
"For long work in pi, use
|
|
233
|
-
"Use `read` (
|
|
232
|
+
"For long work in pi, use Dogsled `run` (mcp__dogsled__run) and continue other work. " +
|
|
233
|
+
"Use `read` (mcp__dogsled__read) for output and `stop` (mcp__dogsled__stop) to cancel the job. " +
|
|
234
234
|
"Start long work so the host reports its exit: in Claude Code, `run_in_background` " +
|
|
235
235
|
"or Monitor (the exit arrives as a message); in Codex, exec_command, then empty write_stdin calls, which " +
|
|
236
236
|
"return when the process exits. " +
|
|
@@ -27,7 +27,7 @@ The startup flags are `--prewalk`, `--no-prewalk`, and `--prewalk-into provider/
|
|
|
27
27
|
Do not combine `--no-prewalk` with either arming flag.
|
|
28
28
|
Flags affect only the startup session. New sessions use `enabled` from config. Resumed sessions do not arm automatically.
|
|
29
29
|
|
|
30
|
-
For a
|
|
30
|
+
For a dogsled child, add `"pi_args": ["--prewalk-into", "alias/luna"]` to its profile.
|
|
31
31
|
To suppress configured prewalk for that child, use `"pi_args": ["--no-prewalk"]`.
|
|
32
32
|
|
|
33
33
|
## State and context
|
|
@@ -82,14 +82,14 @@ Outside the terminal UI, `/todos` prints the list instead.
|
|
|
82
82
|
|
|
83
83
|
## Shared work display
|
|
84
84
|
|
|
85
|
-
When a compatible pi-
|
|
86
|
-
Tasks remain on the current Pi session branch.
|
|
87
|
-
Pi-todo owns the renderer in both standalone and shared views.
|
|
85
|
+
When a compatible pi-dogsled extension is active, its work widget replaces the standalone todo widget.
|
|
86
|
+
Tasks remain on the current Pi session branch. Dogsled receives a read-only presentation capability through `pi.events`.
|
|
87
|
+
Pi-todo owns the renderer in both standalone and shared views. Dogsled hosts it above the editor without opening a popup.
|
|
88
88
|
Alt+J/K scrolls the hosted rows. Alt+I toggles their expansion. Ordinary editor keys remain unchanged.
|
|
89
89
|
`/todos` and Alt+T request the shared Todos view. `/todos list` still prints the full list.
|
|
90
90
|
When shared presentation ends, the standalone widget returns without changing task state.
|
|
91
91
|
|
|
92
|
-
The [version 2 display contract](https://github.com/oisin-ee/
|
|
92
|
+
The [version 2 display contract](https://github.com/oisin-ee/dogsled/blob/main/docs/pi-work.md)
|
|
93
93
|
defines the snapshot request, acknowledgement, release, and read-only view events.
|
|
94
94
|
Incompatible versions leave the standalone widget available. Rendering failures restore it without changing saved tasks.
|
|
95
95
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oisin-ee/oisinpi",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "Oisin's pi packages in one install: prewalk, todo, and guardrails.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"guardrails",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
},
|
|
18
18
|
"type": "module",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@oisin-ee/pi-guardrails": "0.7.
|
|
21
|
-
"@oisin-ee/pi-prewalk": "0.7.
|
|
22
|
-
"@oisin-ee/pi-todo": "0.7.
|
|
20
|
+
"@oisin-ee/pi-guardrails": "0.7.2",
|
|
21
|
+
"@oisin-ee/pi-prewalk": "0.7.2",
|
|
22
|
+
"@oisin-ee/pi-todo": "0.7.2"
|
|
23
23
|
},
|
|
24
24
|
"bundleDependencies": [
|
|
25
25
|
"@oisin-ee/pi-guardrails",
|