@cad0p/pi-subagents-tintinweb 0.14.2-20260814.3

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/SECURITY.md ADDED
@@ -0,0 +1,95 @@
1
+ # Security Policy
2
+
3
+ This document explains the security model behind `@cad0p/pi-subagents-tintinweb` and
4
+ where the boundaries are.
5
+
6
+ `pi-subagents` is a [pi](https://pi.dev) extension. It spawns and orchestrates
7
+ autonomous sub-agents that run locally within the same security boundary as the
8
+ user running pi, and inherit pi's trust model. It is the responsibility of the
9
+ user to monitor those agents' operations or to contain them within a container,
10
+ virtual machine, or other sandbox solution.
11
+
12
+ Sub-agents run with the local user account's privileges and can use the tools
13
+ they are granted (reading and writing files, running commands, network access,
14
+ etc.). They treat the local user account and files writable by that account as
15
+ inside the same trust boundary as the pi process itself. If an attacker can
16
+ modify files under the user's home directory, workspace, shell startup files,
17
+ environment, pi configuration, or this extension's configuration, they can
18
+ generally influence pi, its sub-agents, or other local developer tools. Reports
19
+ that depend on such prior local write access are not security vulnerabilities
20
+ unless they demonstrate how `pi-subagents` grants that write access or crosses an
21
+ operating-system privilege boundary.
22
+
23
+ `pi-subagents` relies on the user only loading trustworthy agent definitions
24
+ (`.pi/agents/*.md`, `.agents/agents/*.md`, and global agents), skills, and
25
+ tools, and only using pi within trusted repositories. Files like `AGENTS.md`,
26
+ custom agent frontmatter/system prompts, preloaded skills, or instructions
27
+ embedded in repository content and comments can be used to prompt-inject the
28
+ coding agent and its sub-agents trivially, and this cannot be protected against.
29
+
30
+ ## Reporting a Vulnerability
31
+
32
+ If you believe you found a security vulnerability in `pi-subagents`, please
33
+ report it privately by opening a draft advisory through
34
+ [GitHub Security Advisories](https://github.com/tintinweb/pi-subagents/security/advisories/new)
35
+ for this repository.
36
+
37
+ Please include:
38
+
39
+ - A description of the issue and its impact
40
+ - Steps to reproduce, proof of concept, or relevant logs
41
+ - Affected version, commit, or configuration
42
+ - Any known mitigations
43
+
44
+ Do not open a public issue for security-sensitive reports. Reports will be
45
+ reviewed and disclosure coordinated as appropriate.
46
+
47
+ ## Scope
48
+
49
+ Security issues in the published npm package and the code in this repository are
50
+ in scope — for example, a flaw in `pi-subagents` that crosses an
51
+ operating-system privilege boundary, or that causes the extension to bypass a
52
+ tool restriction, denylist, or agent boundary it claims to enforce.
53
+
54
+ ## Out Of Scope
55
+
56
+ - Local code execution or sandboxing behavior (sub-agents intentionally do not
57
+ have a sandbox and run with the user's privileges)
58
+ - Behavior of pi itself, or of other pi extensions, skills, or tools installed by
59
+ the user (report those to their respective projects)
60
+ - Risks from working in untrusted repositories
61
+ - Risks from installing or loading untrusted agent definitions, skills,
62
+ extensions, packages, or tools
63
+ - Issues caused by non-trustworthy MITM proxies
64
+ - Public internet exposure of a pi installation
65
+ - Prompt injection attacks (including via `AGENTS.md`, agent frontmatter, custom
66
+ system prompts, preloaded skills, repository content, or context inheritance)
67
+ - Exposed secrets that are third-party/user-controlled credentials
68
+ - Reports requiring the ability to create, modify, delete, or replace files,
69
+ directories, symlinks, environment variables, shell configuration, or other
70
+ user-controlled local state on the target machine. This includes `.pi/agents/`,
71
+ `.agents/agents/`, agent and extension configuration, persistent agent memory,
72
+ workspace files, `AGENTS.md`, skills, dotfiles, and files synchronized through NFS, roaming
73
+ profiles, or dotfile managers, unless the report shows how `pi-subagents`
74
+ itself grants that access.
75
+ - Issues caused by intentionally weakened user configuration
76
+ - Resource/DOS claims that require trusted local input/config
77
+ - Reports about malicious model output
78
+ - User-approved or user-initiated local actions presented as vulnerabilities
79
+
80
+ ## Notes for Reporters
81
+
82
+ The most useful reports show a current, reproducible security boundary bypass
83
+ with demonstrated impact. Reports that only show expected local-agent behavior,
84
+ prompt injection, or a malicious trusted agent definition/skill are not security
85
+ vulnerabilities under this model.
86
+
87
+ For example, a report showing that malicious contents written to a trusted agent
88
+ definition or extension configuration cause a sub-agent to execute commands, load
89
+ attacker-controlled tools, or send credentials to an attacker-controlled endpoint
90
+ is out of scope.
91
+
92
+ When possible, include the exact affected path, package version or commit SHA,
93
+ configuration, and a proof of concept against the latest release or latest
94
+ `master`. For dependency reports, include evidence that the shipped dependency is
95
+ affected and that the issue is reachable through `pi-subagents`.
@@ -0,0 +1,41 @@
1
+ Launch a new agent to handle complex, multi-step tasks autonomously. Each agent type has specific capabilities and tools available to it.
2
+
3
+ Available agent types and the tools they have access to:
4
+ {{typeList}}
5
+
6
+ Custom agents can be defined in .pi/agents/<name>.md (project) or {{agentDir}}/agents/<name>.md (global) — they are picked up automatically. Project-level agents override global ones. Creating a .md file with the same name as a default agent overrides it.
7
+
8
+ When using the Agent tool, specify a subagent_type parameter to select which agent type to use.
9
+
10
+ ## When not to use
11
+
12
+ If the target is already known, use a direct tool — `read` for a known path, `grep`/`find` for a specific symbol or string. Reserve this tool for open-ended questions that span the codebase, or tasks that match an available agent type.
13
+
14
+ ## Usage notes
15
+
16
+ - Always include a short (3-5 word) description summarizing what the agent will do (shown in UI).
17
+ - When you launch multiple agents for independent work, send them in a single message with multiple tool uses, with run_in_background: true on each, so they run concurrently. If the user specifies that they want agents run "in parallel", you MUST send a single message with multiple tool calls. Foreground calls run sequentially — only one executes at a time.
18
+ - When the agent is done, it returns a single message back to you. The result is not visible to the user — to show the user, send a text message with a concise summary.
19
+ - Trust but verify: an agent's summary describes what it intended to do, not necessarily what it did. When an agent writes or edits code, check the actual changes before reporting work as done.
20
+ - Use run_in_background for work you don't need immediately. You will be notified when it completes — do NOT poll or sleep waiting for it. Continue with other work or respond to the user instead.
21
+ - Foreground vs background: use foreground (default) when you need the agent's results before you can proceed. Use background when you have genuinely independent work to do in parallel.
22
+ - Use resume with an agent ID to continue a previous agent's work. A new (non-resume) Agent call starts a fresh agent with no memory of prior runs, so the prompt must be self-contained.
23
+ - Use steer_subagent to send mid-run messages to a running background agent.
24
+ - Clearly tell the agent whether you expect it to write code or just to do research (search, file reads, etc.), since it is not aware of the user's intent.
25
+ - If an agent's description says it should be used proactively, try to use it without the user having to ask for it first.
26
+ - Use thinking to control extended thinking level.
27
+ - Use inherit_context if the agent needs the parent conversation history.
28
+ - Use isolation: "worktree" to run the agent in an isolated git worktree (safe parallel file modifications). The worktree is automatically cleaned up if the agent makes no changes; otherwise the path and branch are returned in the result.{{scheduleGuideline}}
29
+
30
+ ## Writing the prompt
31
+
32
+ Provide clear, detailed prompts so the agent can work autonomously. Brief it like a smart colleague who just walked into the room — it hasn't seen this conversation, doesn't know what you've tried, doesn't understand why this task matters.
33
+ - Explain what you're trying to accomplish and why.
34
+ - Describe what you've already learned or ruled out.
35
+ - Give enough context about the surrounding problem that the agent can make judgment calls rather than just following a narrow instruction.
36
+ - If you need a short response, say so ("report in under 200 words").
37
+ - Lookups: hand over the exact command. Investigations: hand over the question — prescribed steps become dead weight when the premise is wrong.
38
+
39
+ Terse command-style prompts produce shallow, generic work.
40
+
41
+ **Never delegate understanding.** Don't write "based on your findings, fix the bug" or "based on the research, implement it." Those phrases push synthesis onto the agent instead of doing it yourself. Write prompts that prove you understood: include file paths, line numbers, what specifically to change.
package/package.json ADDED
@@ -0,0 +1,61 @@
1
+ {
2
+ "name": "@cad0p/pi-subagents-tintinweb",
3
+ "version": "0.14.2-20260814.3",
4
+ "description": "A pi extension extension that brings smart Claude Code-style autonomous sub-agents to pi.",
5
+ "author": "tintinweb",
6
+ "publishConfig": {
7
+ "access": "public",
8
+ "registry": "https://registry.npmjs.org"
9
+ },
10
+ "license": "MIT",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/cad0p/pi-subagents-tintinweb.git"
14
+ },
15
+ "homepage": "https://github.com/cad0p/pi-subagents-tintinweb#readme",
16
+ "bugs": {
17
+ "url": "https://github.com/cad0p/pi-subagents-tintinweb/issues"
18
+ },
19
+ "keywords": [
20
+ "pi-package",
21
+ "pi",
22
+ "pi-extension",
23
+ "subagent",
24
+ "agent",
25
+ "autonomous"
26
+ ],
27
+ "peerDependencies": {
28
+ "@earendil-works/pi-ai": ">=0.80.0",
29
+ "@earendil-works/pi-coding-agent": ">=0.80.0",
30
+ "@earendil-works/pi-tui": ">=0.80.0"
31
+ },
32
+ "dependencies": {
33
+ "@sinclair/typebox": "^0.34.49",
34
+ "croner": "^10.0.1",
35
+ "nanoid": "^5.0.0"
36
+ },
37
+ "scripts": {
38
+ "build": "tsc",
39
+ "test": "vitest run",
40
+ "test:watch": "vitest",
41
+ "test:e2e": "vitest run e2e --reporter=verbose",
42
+ "typecheck": "tsc --noEmit",
43
+ "lint": "biome check src/ test/",
44
+ "lint:fix": "biome check --fix src/ test/"
45
+ },
46
+ "devDependencies": {
47
+ "@biomejs/biome": "^2.4.14",
48
+ "@types/node": "^25.5.0",
49
+ "typescript": "^6.0.0",
50
+ "vitest": "^4.0.18",
51
+ "@earendil-works/pi-ai": ">=0.80.0"
52
+ },
53
+ "pi": {
54
+ "extensions": [
55
+ "./src/index.ts"
56
+ ]
57
+ },
58
+ "engines": {
59
+ "node": ">=22.19.0"
60
+ }
61
+ }
@@ -0,0 +1,12 @@
1
+ # pnpm 11 blocks native build scripts by default and exits non-zero
2
+ # ([ERR_PNPM_IGNORED_BUILDS]) when any are unapproved. This package's
3
+ # transitive dependencies (pulled in through the @earendil-works/pi-* peers)
4
+ # ship install scripts; without an approval entry `pnpm install` returns a
5
+ # failing exit code, which breaks pi's git-package reconciliation
6
+ # (git clean -fdx -> pnpm install -> non-zero -> extension fails to load).
7
+ # Approving them here makes `pnpm install` exit 0.
8
+ allowBuilds:
9
+ "@google/genai": true
10
+ esbuild: true
11
+ koffi: false
12
+ protobufjs: true