shariq-pi-extensions 0.1.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.
Files changed (123) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +94 -0
  3. package/THIRD_PARTY_NOTICES.md +11 -0
  4. package/docs/ARCHITECTURE.md +54 -0
  5. package/docs/DEVELOPMENT.md +88 -0
  6. package/docs/EXTENSIONS.md +89 -0
  7. package/extensions/antigravity-provider/LICENSE +21 -0
  8. package/extensions/antigravity-provider/README.md +23 -0
  9. package/extensions/antigravity-provider/antigravity/cloud-code-assist.ts +519 -0
  10. package/extensions/antigravity-provider/antigravity/index.ts +67 -0
  11. package/extensions/antigravity-provider/antigravity/models.ts +184 -0
  12. package/extensions/antigravity-provider/antigravity/oauth.ts +499 -0
  13. package/extensions/antigravity-provider/index.ts +3 -0
  14. package/extensions/ask-user/README.md +21 -0
  15. package/extensions/ask-user/index.ts +417 -0
  16. package/extensions/background-terminals/README.md +43 -0
  17. package/extensions/background-terminals/index.ts +400 -0
  18. package/extensions/background-terminals/src/manager.ts +480 -0
  19. package/extensions/background-terminals/src/output-buffer.ts +110 -0
  20. package/extensions/background-terminals/src/presentation.ts +74 -0
  21. package/extensions/background-terminals/src/types.ts +47 -0
  22. package/extensions/background-terminals/src/ui.ts +478 -0
  23. package/extensions/context-usage/LICENSE +21 -0
  24. package/extensions/context-usage/README.md +20 -0
  25. package/extensions/context-usage/index.ts +2006 -0
  26. package/extensions/context-usage/lib/ansi.ts +60 -0
  27. package/extensions/context-usage/lib/boundary.ts +27 -0
  28. package/extensions/context-usage/lib/chat.ts +190 -0
  29. package/extensions/context-usage/lib/config.ts +30 -0
  30. package/extensions/context-usage/lib/fmt.ts +59 -0
  31. package/extensions/context-usage/lib/style.ts +260 -0
  32. package/extensions/copy-all/README.md +15 -0
  33. package/extensions/copy-all/index.ts +72 -0
  34. package/extensions/factory-provider/API_KEYS.md +17 -0
  35. package/extensions/factory-provider/AUTH.md +15 -0
  36. package/extensions/factory-provider/README.md +90 -0
  37. package/extensions/factory-provider/REFRESH_MODELS.md +185 -0
  38. package/extensions/factory-provider/UPDATING.md +97 -0
  39. package/extensions/factory-provider/factory/api-keys.ts +407 -0
  40. package/extensions/factory-provider/factory/auth.ts +132 -0
  41. package/extensions/factory-provider/factory/constants.ts +15 -0
  42. package/extensions/factory-provider/factory/dashboard.ts +363 -0
  43. package/extensions/factory-provider/factory/droid.ts +84 -0
  44. package/extensions/factory-provider/factory/limits.ts +342 -0
  45. package/extensions/factory-provider/factory/models.ts +283 -0
  46. package/extensions/factory-provider/factory/responses.ts +331 -0
  47. package/extensions/factory-provider/factory/warm-theme.ts +53 -0
  48. package/extensions/factory-provider/factory/websocket.ts +130 -0
  49. package/extensions/factory-provider/index.ts +204 -0
  50. package/extensions/factory-provider/scripts/audit-reasoning-efforts.py +84 -0
  51. package/extensions/firecrawl-web/README.md +31 -0
  52. package/extensions/firecrawl-web/auth.ts +92 -0
  53. package/extensions/firecrawl-web/client.ts +238 -0
  54. package/extensions/firecrawl-web/index.ts +96 -0
  55. package/extensions/firecrawl-web/output.ts +125 -0
  56. package/extensions/git-info/README.md +25 -0
  57. package/extensions/git-info/index.ts +162 -0
  58. package/extensions/git-info/src/git.ts +206 -0
  59. package/extensions/git-info/src/ui.ts +291 -0
  60. package/extensions/goal/README.md +44 -0
  61. package/extensions/goal/constants.ts +4 -0
  62. package/extensions/goal/extension.ts +1064 -0
  63. package/extensions/goal/index.ts +2 -0
  64. package/extensions/goal/types.ts +56 -0
  65. package/extensions/goal/ui.ts +334 -0
  66. package/extensions/orchestration/README.md +58 -0
  67. package/extensions/orchestration/dashboard.ts +192 -0
  68. package/extensions/orchestration/engine.ts +706 -0
  69. package/extensions/orchestration/index.ts +243 -0
  70. package/extensions/orchestration/prompts.ts +124 -0
  71. package/extensions/orchestration/protocol.ts +116 -0
  72. package/extensions/orchestration/settings-ui.ts +41 -0
  73. package/extensions/orchestration/settings.ts +59 -0
  74. package/extensions/orchestration/storage.ts +49 -0
  75. package/extensions/orchestration/types.ts +105 -0
  76. package/extensions/performance-status/README.md +5 -0
  77. package/extensions/performance-status/index.ts +171 -0
  78. package/extensions/pi-memory/README.md +53 -0
  79. package/extensions/pi-memory/index.ts +326 -0
  80. package/extensions/pi-memory/src/config.ts +75 -0
  81. package/extensions/pi-memory/src/database.ts +617 -0
  82. package/extensions/pi-memory/src/extraction.ts +178 -0
  83. package/extensions/pi-memory/src/project.ts +80 -0
  84. package/extensions/pi-memory/src/projection.ts +59 -0
  85. package/extensions/pi-memory/src/redaction.ts +60 -0
  86. package/extensions/pi-memory/src/retrieval.ts +30 -0
  87. package/extensions/pi-memory/src/service.ts +194 -0
  88. package/extensions/pi-memory/src/session.ts +146 -0
  89. package/extensions/pi-memory/src/types.ts +82 -0
  90. package/extensions/shared/README.md +18 -0
  91. package/extensions/shared/activity-status.ts +31 -0
  92. package/extensions/shared/child-session.ts +150 -0
  93. package/extensions/shared/context-utilization.ts +47 -0
  94. package/extensions/shared/dashboard-state.ts +99 -0
  95. package/extensions/shared/tool-call-timeout.ts +104 -0
  96. package/extensions/shared/tui-dashboard.ts +139 -0
  97. package/extensions/shell-shortcuts/README.md +17 -0
  98. package/extensions/shell-shortcuts/features/exit-alias.ts +10 -0
  99. package/extensions/shell-shortcuts/index.ts +6 -0
  100. package/extensions/subagents/README.md +89 -0
  101. package/extensions/subagents/index.ts +1386 -0
  102. package/extensions/subagents/src/backend.ts +69 -0
  103. package/extensions/subagents/src/backends/pi.ts +781 -0
  104. package/extensions/subagents/src/catalog.ts +85 -0
  105. package/extensions/subagents/src/config.ts +241 -0
  106. package/extensions/subagents/src/context.ts +57 -0
  107. package/extensions/subagents/src/coordinator.ts +64 -0
  108. package/extensions/subagents/src/domain.ts +294 -0
  109. package/extensions/subagents/src/format.ts +74 -0
  110. package/extensions/subagents/src/manager.ts +813 -0
  111. package/extensions/subagents/src/prompt.ts +94 -0
  112. package/extensions/subagents/src/result-delivery.ts +20 -0
  113. package/extensions/subagents/src/runtime.ts +48 -0
  114. package/extensions/subagents/src/ui/takeover.ts +695 -0
  115. package/extensions/subagents/src/ui/transcript.ts +182 -0
  116. package/extensions/subagents/src/worktree.ts +175 -0
  117. package/extensions/web-fetch/README.md +13 -0
  118. package/extensions/web-fetch/index.ts +441 -0
  119. package/package.json +117 -0
  120. package/skills/background-terminals/SKILL.md +42 -0
  121. package/skills/orchestration/SKILL.md +33 -0
  122. package/skills/subagents/SKILL.md +89 -0
  123. package/themes/ember-warm-dark.json +85 -0
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: subagents
3
+ description: Use only when the user explicitly asks Pi to use subagents, delegate work, run agents in parallel, or explicitly names this skill. Do not invoke merely because a task is large, complex, multi-domain, or potentially parallelizable, and do not use for Codex persistent-thread orchestration.
4
+ compatibility: Pi with the Pi-only subagents extension and its spawn, task, messaging, question, profile, dashboard, and worktree tools.
5
+ ---
6
+
7
+ # Pi subagents
8
+
9
+ Use Pi's flat child-agent system for explicitly authorized delegation. Each child has its own context window and session, cannot create more agents, and remains visible through `/subagents`.
10
+
11
+ ## Activation boundary
12
+
13
+ Delegation requires an explicit user request. Task size or convenience alone is not authorization. If the user asks only to set up or explain delegation, do not start productive work beyond that request.
14
+
15
+ This skill governs temporary Pi child agents. The `codex-thread-orchestrator` skill separately governs persistent Codex task rosters; do not substitute one topology for the other.
16
+
17
+ ## Choose the operation
18
+
19
+ - Use `spawn_agent` for one background child and `task` to start an atomic batch of independent background children. Both return immediately after startup.
20
+ - Use `send_message` to steer an existing child or start its next turn instead of spawning a duplicate.
21
+ - Use `check_agent` for one child’s current activity. `wait_agent` is also non-blocking: it collects results already available and reports the rest as pending.
22
+ - Use `close_agent` to interrupt exact running agents while preserving their partial transcripts.
23
+ - Use `list_agents` or `list_agent_profiles` only when live IDs, profiles, personas, or defaults are needed for an immediate decision.
24
+
25
+ ## Wait by notification; inspect progress only when justified
26
+
27
+ A successful `spawn_agent` or `task` call starts asynchronous work and returns control to the parent. When a child finishes, its completion notice automatically starts the next main-agent turn. The parent does not need to remain active or check once before ending its turn.
28
+
29
+ After dispatch:
30
+
31
+ 1. Continue only parent work that is independently useful to the requested result.
32
+ 2. If no such work remains, end the turn immediately. A short progress note is enough when the user needs one.
33
+ 3. Do not call `wait_agent`, `list_agents`, or `check_agent` in the same turn merely because the child was just launched. Ending the turn is the waiting mechanism.
34
+ 4. Resume when a child completion notice invokes the main agent. Collect the completed result, launch any intentionally queued work if capacity requires waves, and otherwise keep waiting through notifications.
35
+
36
+ A progress check is reasonable when the user asks for status, a child has run materially longer than expected for its task and model, an interruption left its state unclear, or current status will change an immediate coordination decision. Prefer `check_agent` for one known child and `list_agents` for a batch overview. Use `wait_agent` to collect results already expected to be available, not as a running-status probe.
37
+
38
+ Do not turn reasonable inspection into polling. Never repeat status calls every few seconds, call them merely to watch elapsed time or context use, or keep the parent turn open while waiting. After a progress snapshot, act on it or end the turn. Check again only when the user asks, new evidence suggests a failure or stall, or another meaningful task-sized interval has elapsed and the answer will affect a real decision.
39
+
40
+ Do not create a loop, timer, `sleep`, watcher, or background terminal to schedule a later subagent check. Background terminals manage real external processes; they are not a waiting mechanism for subagents.
41
+
42
+ ## Build complete assignments
43
+
44
+ When no parent context is forked, every child prompt must stand alone. State:
45
+
46
+ - the concrete objective and expected report or artifact;
47
+ - relevant paths, sources, and current facts;
48
+ - allowed scope and prohibited overlap;
49
+ - whether edits or execution are allowed;
50
+ - validation and evidence required before completion.
51
+
52
+ Even with `fork_turns`, keep the assignment explicit. Fork only the conversation needed for the task: `none` by default, a recent positive turn count when local history matters, and `all` only when the full sanitized conversation is materially necessary. Tool protocol and private reasoning are never inherited.
53
+
54
+ ## Profiles, access, and isolation
55
+
56
+ Choose the narrowest capability that can complete the assignment:
57
+
58
+ - `read-only` for allowlisted inspection tools without command execution;
59
+ - `execute` for allowlisted inspection plus shell/background-terminal diagnostics without direct edit tools;
60
+ - `read-write` for allowlisted inspection plus direct file edits without command execution;
61
+ - `all` only when implementation and validation require unclassified extension tools or unrestricted access.
62
+
63
+ Restrictive capabilities fail closed for unclassified extension tools; use `all` only when that broader authority is actually required.
64
+
65
+ Use an established profile or persona when it matches; do not invent names without checking the catalog. Omit model and thinking overrides unless the task needs a deliberate choice, so the child inherits the parent defaults. When an override is necessary, use only an exact model/provider exposed by the current Pi registry or profile—never copy provider examples from another harness or assume one is installed.
66
+
67
+ Keep `isolation=none` for read-only work and shared-checkout work with clear ownership. Use a worktree only when concurrent writes could overlap or interfere. Worktree isolation requires a clean source checkout because the child branch starts from `HEAD`; if the source is dirty, commit or stash first or use the shared workspace. Worktree isolation is not a reason to delegate, and it does not authorize publication.
68
+
69
+ ## Coordinate without losing ownership
70
+
71
+ Parallelize independent reads freely. Allow concurrent writes only across clearly separate surfaces. The parent remains responsible for resolving contradictions, inspecting actual changes, and validating the combined result.
72
+
73
+ Children can send updates, ask the parent a blocking question, and message peers. Answer a child question with `reply_question`; do not manufacture an answer when user authority is required. Keep peer messages scoped to concrete dependencies rather than broadcasting routine progress.
74
+
75
+ After starting background agents, follow the notification-driven waiting rule above. Do not manufacture parent work, status checks, commentary, timers, or terminal activity just to keep the turn open. When a batch result is required for the final answer, track the returned IDs and conclude only after every required completion notice and result has arrived.
76
+
77
+ ## Integrate isolated changes
78
+
79
+ For a completed worktree agent, inspect before integration. Prefer `patch` when the source checkout contains unrelated work. Use cherry-pick or merge only with a clean source checkout and after the extension's preflight succeeds. Permanently discard a worktree only when that exact loss is intended and confirmed.
80
+
81
+ ## Completion gate
82
+
83
+ A child report is evidence to review, not automatic proof of completion. Before answering the user:
84
+
85
+ 1. Read the complete relevant result.
86
+ 2. Inspect changed artifacts or live state.
87
+ 3. Reconcile the work with the original request and boundaries.
88
+ 4. Run proportionate parent-level validation when integration or interaction could introduce regressions.
89
+ 5. Report verified results separately from unresolved child claims or residual risk.
@@ -0,0 +1,85 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/earendil-works/pi/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
3
+ "name": "ember-warm-dark",
4
+ "vars": {
5
+ "accent": "#f2a956",
6
+ "focus": "#dc8440",
7
+ "text": "#f8ead3",
8
+ "muted": "#cfb191",
9
+ "dim": "#9e8067",
10
+ "border": "#8b6044",
11
+ "borderMuted": "#523b30",
12
+ "surface": "#2a1f1a",
13
+ "surfaceRaised": "#34251e",
14
+ "selected": "#483025",
15
+ "success": "#d8c27a",
16
+ "error": "#ef7060",
17
+ "warning": "#ef9157",
18
+ "rose": "#dba0a4",
19
+ "gold": "#e7bd73",
20
+ "string": "#ddbb84",
21
+ "code": "#efc77e"
22
+ },
23
+ "colors": {
24
+ "accent": "accent",
25
+ "border": "border",
26
+ "borderAccent": "focus",
27
+ "borderMuted": "borderMuted",
28
+ "success": "success",
29
+ "error": "error",
30
+ "warning": "warning",
31
+ "muted": "muted",
32
+ "dim": "dim",
33
+ "text": "text",
34
+ "thinkingText": "muted",
35
+ "selectedBg": "selected",
36
+ "scrollbarThumb": "#79513a",
37
+ "searchMatchBg": "#614124",
38
+ "searchMatchText": "#fff0cf",
39
+ "userMessageBg": "surfaceRaised",
40
+ "userMessageText": "text",
41
+ "customMessageBg": "surface",
42
+ "customMessageText": "text",
43
+ "customMessageLabel": "accent",
44
+ "toolPendingBg": "surface",
45
+ "toolSuccessBg": "#2d251b",
46
+ "toolErrorBg": "#351d19",
47
+ "toolTitle": "accent",
48
+ "toolOutput": "muted",
49
+ "mdHeading": "gold",
50
+ "mdLink": "accent",
51
+ "mdLinkUrl": "muted",
52
+ "mdCode": "code",
53
+ "mdCodeBlock": "text",
54
+ "mdCodeBlockBorder": "border",
55
+ "mdQuote": "muted",
56
+ "mdQuoteBorder": "border",
57
+ "mdHr": "borderMuted",
58
+ "mdListBullet": "warning",
59
+ "toolDiffAdded": "success",
60
+ "toolDiffRemoved": "error",
61
+ "toolDiffContext": "muted",
62
+ "syntaxComment": "#a18470",
63
+ "syntaxKeyword": "rose",
64
+ "syntaxFunction": "gold",
65
+ "syntaxVariable": "#f0a86c",
66
+ "syntaxString": "string",
67
+ "syntaxNumber": "#e9a77d",
68
+ "syntaxType": "#d7c28a",
69
+ "syntaxOperator": "accent",
70
+ "syntaxPunctuation": "dim",
71
+ "thinkingOff": "dim",
72
+ "thinkingMinimal": "muted",
73
+ "thinkingLow": "#d8b06c",
74
+ "thinkingMedium": "accent",
75
+ "thinkingHigh": "warning",
76
+ "thinkingXhigh": "#e27d5f",
77
+ "thinkingMax": "error",
78
+ "bashMode": "success"
79
+ },
80
+ "export": {
81
+ "pageBg": "#17110f",
82
+ "cardBg": "#211815",
83
+ "infoBg": "surface"
84
+ }
85
+ }