allye-pi 1.6.0 → 1.6.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/README.md CHANGED
@@ -81,8 +81,8 @@ Prefer the paste-into-agent or marketplace routes below? They still work — the
81
81
  After installing, you get:
82
82
  - **OAuth authentication** — browser-based login, no tokens to manage
83
83
  - **Bootstrap hook** — injects workflow methodology at session start
84
- - **5 dispatched subagents** — reviewer-standards, reviewer-spec, deep-search, code-analyzer, executor, delegated via the Agent tool for phases that don't need to pause and ask you anything (executor only runs this way if you opt into automatic mode — manual is the default)
85
- - **17 skills** — Sandbox, Planning, Technical Planning, Orchestrator, and Delivery run as skills loaded directly into your conversation, loaded on-demand by the bootstrap, so they can ask you questions when something's ambiguous
84
+ - **Optional delegation** — bounded research, review, or execution subagents may be used when the runtime supports them and delegation is beneficial; local execution remains valid
85
+ - **17 composable skills** — discovery, planning, execution, review, delivery, memory, verification, and delegation playbooks loaded as needed; no universal phase chain is required
86
86
  - **Parallel delivery, when a runtime is detected** — the Orchestrator can drive several independent stories at once, each in its own git worktree and its own watchable agent process; without a detected runtime, delivery degrades to the existing manual and automatic-subagent modes
87
87
 
88
88
  #### Multiple Allye accounts (multi-tenant)
@@ -113,7 +113,7 @@ The agent will configure the MCP server via OAuth and install the `allye-opencod
113
113
 
114
114
  After installing, you get:
115
115
  - **6 agents in the picker** — Allye, Allye Plan, Allye Orchestrator, Allye Build, Allye Review, Allye Deliver (Ctrl+T to switch)
116
- - **Auto-loaded context** — your profile and team info injected before every conversation
116
+ - **Adaptive context** — profile, team info, and relevant memories loaded when Allye is available and useful
117
117
  - **Dynamic skill discovery** — agents search for your team's standards via MCP
118
118
 
119
119
  **To update:** Paste this into your agent:
@@ -263,7 +263,7 @@ How multi-phase workflow support is implemented differs by platform, because not
263
263
  - **OpenCode** ships 6 agent-picker personas (Ctrl+T to switch) — Allye, Allye Plan, Allye Orchestrator, Allye Build, Allye Review, Allye Deliver — OpenCode's agent model supports switching personas interactively within a session, so all 6 can be full agents. The automatic-Executor dispatch mode is Claude-Code-only for now; OpenCode always runs Executor (Allye Build) as an interactive agent.
264
264
  - **Cursor, Codex, Gemini CLI** — a single agent handles all phases with the same workflow knowledge (no multi-agent picker on these platforms).
265
265
  - **Hermes Agent** reads skills from a directory (`~/.hermes/skills/allye/`) rather than fetching them over MCP, and gets the `using-allye` bootstrap injected by a small Python plugin at session start instead of a hook — otherwise the same single-agent, same-workflow-knowledge shape as Cursor/Codex/Gemini CLI.
266
- - **Pi** loads the canonical repository skills through a native Pi package, injects Allye context through the configured MCP adapter, and exposes an adaptive toolkit. Herdr delegation is optional and capability-detected; tasks are recommended rather than mandatory.
266
+ - **Pi** loads the canonical repository skills through a native Pi package, reads `using-allye` into the first prompt, injects Allye context through the configured MCP adapter, and exposes an adaptive toolkit. Herdr delegation is optional and capability-detected; tasks are recommended rather than mandatory.
267
267
 
268
268
  Every phase, on every platform:
269
269
  - Responds in **your language** (detected from your messages, falling back to your profile only before you've said anything)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "allye-pi",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "Pi package adapter for the canonical Allye workflow",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -71,7 +71,6 @@ export type DelegationState = {
71
71
  panes: OwnedPane[];
72
72
  waits: Set<string>;
73
73
  };
74
- const DELEGATION_TOOL_NAME = "allye_herdr";
75
74
  const WAIT_EVENT_TYPE = "allye-herdr-wait";
76
75
  const RUNTIME_TOOL_NAME = "allye_herdr";
77
76
 
@@ -88,10 +87,17 @@ function limitText(text: string, maxChars: number): string {
88
87
  return text.length <= maxChars ? text : `${text.slice(0, maxChars)}\n[context truncated]`;
89
88
  }
90
89
 
91
- export function describeCapabilities(env: NodeJS.ProcessEnv = process.env): AllyeCapabilities {
90
+ type McpBridgeRuntime = typeof globalThis & {
91
+ __piMcpAdapterActiveToolCaller?: ActiveMcpToolCaller | null;
92
+ };
93
+
94
+ export function describeCapabilities(
95
+ env: NodeJS.ProcessEnv = process.env,
96
+ mcpAvailable = Boolean((globalThis as McpBridgeRuntime).__piMcpAdapterActiveToolCaller),
97
+ ): AllyeCapabilities {
92
98
  return {
93
99
  piSession: true,
94
- allyeMcp: env.ALLYE_PI_MCP !== "0",
100
+ allyeMcp: env.ALLYE_PI_MCP !== "0" && mcpAvailable,
95
101
  filesystem: true,
96
102
  subagents: env.ALLYE_PI_SUBAGENTS === "1",
97
103
  herdr: env.HERDR_ENV === "1",
@@ -134,9 +140,7 @@ async function configuredMcpCall(toolName: string, args: Record<string, unknown>
134
140
  // the in-process runtime. There is no public callMcpTool export in the
135
141
  // supported package version, so do not dynamically import its TypeScript
136
142
  // source from node_modules. A missing bridge is a hard bootstrap failure.
137
- const globalBridge = (globalThis as typeof globalThis & {
138
- __piMcpAdapterActiveToolCaller?: ActiveMcpToolCaller | null;
139
- }).__piMcpAdapterActiveToolCaller;
143
+ const globalBridge = (globalThis as McpBridgeRuntime).__piMcpAdapterActiveToolCaller;
140
144
  if (!globalBridge) throw new Error("pi-mcp-adapter is not initialized; start the configured MCP adapter before using Allye");
141
145
  return globalBridge(MCP_SERVER, toolName, args);
142
146
  }
@@ -256,8 +260,8 @@ export function deliverWaitEvent(
256
260
 
257
261
  export function invalidStartupContext(message: string): StartupContext {
258
262
  return {
259
- text: `## Allye bootstrap blocked\n${message}\nDo not call team-scoped work_items or intelligence operations. Resolve Allye connectivity and explicitly select a team with allye_team action team_switch before continuing.`,
260
- teamSelectionRequired: true,
263
+ text: `## Allye optional context unavailable\n${message}\nDo not call team-scoped work_items or intelligence operations until Allye connectivity and team context are available. Continue with local, non-team-scoped work when appropriate.`,
264
+ teamSelectionRequired: false,
261
265
  allyeUnavailable: true,
262
266
  teams: [],
263
267
  };
@@ -267,7 +271,8 @@ export function canUseOwnedPane(state: DelegationState, paneId: string): boolean
267
271
  return state.panes.some((pane) => pane.paneId === paneId);
268
272
  }
269
273
 
270
- async function loadStartupContext(): Promise<StartupContext> {
274
+ async function loadStartupContext(allyeMcp = true): Promise<StartupContext> {
275
+ if (!allyeMcp) return invalidStartupContext("Allye/MCP is disabled for this Pi session.");
271
276
  const sections: string[] = [];
272
277
  try {
273
278
  const initialization = await callAllye("allye_initialize", {
@@ -452,7 +457,10 @@ async function runtimeOperation(capabilities: AllyeCapabilities, params: Record<
452
457
  const newPane = collectValues(afterLayout, "pane_id").find((id) => !beforePanes.has(id));
453
458
  if (!newPane) throw new Error("Herdr split completed but no new pane id was returned");
454
459
  const paneRecords = collectPaneRecords(afterLayout);
455
- const record = paneRecords.find((candidate) => candidate.paneId === newPane && candidate.workspaceId === String((afterLayout as Record<string, unknown>).workspace_id ?? candidate.workspaceId) && candidate.tabId === String((afterLayout as Record<string, unknown>).tab_id ?? candidate.tabId));
460
+ const layoutMetadata = afterLayout as Record<string, unknown>;
461
+ const record = paneRecords.find((candidate) => candidate.paneId === newPane
462
+ && candidate.workspaceId === String(layoutMetadata.workspace_id ?? candidate.workspaceId)
463
+ && candidate.tabId === String(layoutMetadata.tab_id ?? candidate.tabId));
456
464
  if (!record) throw new Error("Herdr returned a pane without workspace/tab ownership metadata");
457
465
  ownership.panes.push(record);
458
466
  await waitForInteractiveShell(newPane);
@@ -643,7 +651,7 @@ export default function allyePiAdapter(pi: ExtensionAPI): void {
643
651
  usingAllyeBootstrap = loadUsingAllyeSkill();
644
652
  syncCapabilityTools();
645
653
  if (ctx.hasUI) ctx.ui.setStatus("allye-pi", "loading Allye context…");
646
- if (process.env.ALLYE_PI_NATIVE_BOOTSTRAP !== "0") startupContext = await loadStartupContext();
654
+ if (process.env.ALLYE_PI_NATIVE_BOOTSTRAP !== "0") startupContext = await loadStartupContext(capabilities.allyeMcp);
647
655
  if (startupContext.teamSelectionRequired && ctx.hasUI) {
648
656
  ctx.ui.notify("Allye has multiple teams and no active team. Use /allye-team <name|prefix|id> before team-scoped work.", "warning");
649
657
  }