acstack 0.49.1 → 0.49.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "acstack",
3
3
  "description": "Agentic coding stack where planning grows only as far as needed: a map of decisions, tasks, checks, and handoffs behind a pluggable tracker.",
4
- "version": "0.49.1",
4
+ "version": "0.49.2",
5
5
  "author": {
6
6
  "name": "ac8318740"
7
7
  },
@@ -58,6 +58,13 @@ acstack_tw_main() {
58
58
  for id in "$PI_ACSTACK" $(version_table | awk -F'\t' '$2=="pi" && $3=="npm" && $1!="pi"{print $1}' | while read -r name; do pi_npm_package "$name"; done); do
59
59
  src=$(pi_state pkg "$id") && say "pi package: $src" || say "pi package: $id not installed"
60
60
  done
61
+ if [ -e "$PI_QUESTION_BRIDGE" ] || [ -L "$PI_QUESTION_BRIDGE" ]; then
62
+ pi_state owns file "$PI_QUESTION_BRIDGE" \
63
+ && say "pi question blocked bridge: managed ($PI_QUESTION_BRIDGE)" \
64
+ || say "pi question blocked bridge: user-owned path ($PI_QUESTION_BRIDGE)"
65
+ else
66
+ say "pi question blocked bridge: absent ($PI_QUESTION_BRIDGE)"
67
+ fi
61
68
  [ -e "$PI_RETRO_EXT" ] && say "pi agentic-retro extension: present" \
62
69
  || say "pi agentic-retro extension: absent"
63
70
  grep -qsF "$PI_MD_BEGIN" "$PI_DIR"/AGENTS.override.md "$PI_DIR"/AGENTS.md "$PI_DIR"/AGENTS.MD \
@@ -140,6 +140,32 @@ bili_client() { # bili_client install|remove <client>
140
140
  fi
141
141
  }
142
142
 
143
+ pi_question_bridge() { # pi_question_bridge install|remove
144
+ local fresh=0 rc
145
+ if [ "$1" = "install" ]; then
146
+ if { [ -e "$PI_QUESTION_BRIDGE" ] || [ -L "$PI_QUESTION_BRIDGE" ]; } \
147
+ && ! pi_state owns file "$PI_QUESTION_BRIDGE"; then
148
+ say "pi: $PI_QUESTION_BRIDGE already exists, so the question bridge was left alone"
149
+ return 0
150
+ fi
151
+ [ -e "$PI_QUESTION_BRIDGE" ] || [ -L "$PI_QUESTION_BRIDGE" ] || fresh=1
152
+ mkdir -p "$(dirname "$PI_QUESTION_BRIDGE")" \
153
+ && cp "$SCRIPT_DIR/pi/acstack-question-blocked.ts" "$PI_QUESTION_BRIDGE" || return $?
154
+ if pi_state own file "$PI_QUESTION_BRIDGE"; then
155
+ say "pi: question blocked bridge written to $PI_QUESTION_BRIDGE"
156
+ else
157
+ rc=$?
158
+ [ "$fresh" = 1 ] && rm -f "$PI_QUESTION_BRIDGE"
159
+ say "pi: question blocked bridge ownership registration failed for $PI_QUESTION_BRIDGE"
160
+ return "$rc"
161
+ fi
162
+ elif pi_state owns file "$PI_QUESTION_BRIDGE"; then
163
+ rm -f "$PI_QUESTION_BRIDGE" \
164
+ && pi_state disown file "$PI_QUESTION_BRIDGE" \
165
+ && say "pi: question blocked bridge removed"
166
+ fi
167
+ }
168
+
143
169
  apply_pi() {
144
170
  find_pi
145
171
  if ! have pi; then
@@ -195,7 +221,9 @@ apply_pi() {
195
221
  fi
196
222
  if [ "$(cfg_get pi.question_tool true)" = "true" ]; then
197
223
  pi_add npm:@juicesharp/rpiv-ask-user-question npm:@juicesharp/rpiv-ask-user-question
224
+ pi_question_bridge install
198
225
  else
226
+ pi_question_bridge remove
199
227
  pi_drop npm:@juicesharp/rpiv-ask-user-question
200
228
  fi
201
229
  if [ "$(cfg_get pi.web_access true)" = "true" ]; then
@@ -283,6 +311,7 @@ apply_pi() {
283
311
  # and leaves the pi binary, its logins and its sessions alone.
284
312
  remove_pi() {
285
313
  find_pi
314
+ pi_question_bridge remove
286
315
  if pi_state parses "$PI_SETTINGS"; then
287
316
  pi_unpin "$PI_ACSTACK"
288
317
  pi_drop "$PI_ACSTACK"
@@ -0,0 +1,31 @@
1
+ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
2
+
3
+ export default function (pi: ExtensionAPI) {
4
+ let pending: { active: boolean; native: boolean } | undefined;
5
+ let forwarding = false;
6
+
7
+ pi.events.on("herdr:blocked", (event: unknown) => {
8
+ if (!forwarding && pending && (event as { active?: unknown } | null)?.active === pending.active) {
9
+ pending.native = true;
10
+ pending = undefined;
11
+ }
12
+ });
13
+
14
+ pi.events.on("rpiv:ask-user:blocked", (event: unknown) => {
15
+ const active = (event as { active?: unknown } | null)?.active;
16
+ if (typeof active !== "boolean") return;
17
+ const transition = { active, native: false };
18
+ pending = transition;
19
+ // shortcut: dual producers emit public then herdr synchronously; async pairs need an upstream source ID
20
+ queueMicrotask(() => {
21
+ if (pending === transition) pending = undefined;
22
+ if (transition.native) return;
23
+ forwarding = true;
24
+ try {
25
+ pi.events.emit("herdr:blocked", { active });
26
+ } finally {
27
+ forwarding = false;
28
+ }
29
+ });
30
+ });
31
+ }
@@ -41,6 +41,7 @@ END="# <<< acstack terminal-workspace <<<"
41
41
  PI_DIR="${PI_CODING_AGENT_DIR:-$HOME/.pi/agent}"
42
42
  PI_SETTINGS="$PI_DIR/settings.json"
43
43
  PI_KEYBINDINGS="$PI_DIR/keybindings.json"
44
+ PI_QUESTION_BRIDGE="$PI_DIR/extensions/acstack-question-blocked.ts"
44
45
  PI_SUBAGENT_CFG="$PI_DIR/extensions/subagent/config.json"
45
46
  # agentic-retro install-pi picks its own directory, from $PI_HOME rather than
46
47
  # pi's override, so look where it writes.
package/cli/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "acstack-cli",
3
- "version": "0.49.1",
3
+ "version": "0.49.2",
4
4
  "description": "CLI for the ACStack agentic coding stack",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -365,7 +365,14 @@ What `apply` does:
365
365
  - ACStack uses it because decisions can include markdown, code and artifact previews
366
366
  - It accepts freeform answers and notes, and needs no full-event telemetry environment variable
367
367
  - This setup still keeps pi's install telemetry disabled through `pi.settings.install_telemetry: false`
368
- - Set `pi.question_tool: false` to leave it out, or to remove it later if this setup installed it
368
+ - Setup installs a managed question bridge under pi's agent directory, honoring `PI_CODING_AGENT_DIR`
369
+ - The bridge translates `rpiv:ask-user:blocked` into `herdr:blocked`, so herdr shows the question's input wait
370
+ - Answer, cancellation, and error completion release the question's blocker while other herdr blockers stay active
371
+ - A producer that also emits the matching herdr event synchronously contributes only one blocker
372
+ - Events carry no source ID, so the bridge treats a matching synchronous herdr event as the producer's own
373
+ - Reapply refreshes the owned bridge, but preserves a pre-existing file at the same path
374
+ - `pi.question_tool: false`, `disable pi`, and `uninstall` remove only the owned bridge and leave user workarounds alone
375
+ - Set `pi.question_tool: false` to leave the package out, or remove it later if this setup installed it
369
376
  - It installs `pi-web-access` by default for Pi web search and web access
370
377
  - The package is `pi-web-access` from `nicobailon/pi-web-access`
371
378
  - It adds web search, URL fetching, GitHub repo cloning, PDF extraction and media understanding tools to pi
@@ -402,6 +409,8 @@ How it treats pi's files:
402
409
  - `apply` never touches `auth.json`
403
410
  - Run `pi`, then `/login`, yourself
404
411
  - `setup.sh status` reports pi's version, its packages, the delegation line, `toolActivation`, and whether `auth.json` exists
412
+ - The question bridge line reports a managed asset, a user-owned path, or an absent asset
413
+ - Start a new pi session or run `/reload` after setup changes extensions
405
414
  - `setup.sh outdated` and `setup.sh upgrade` include `billion-context`, `@juicesharp/rpiv-todo`, `pi-plugin-manager`, `@juicesharp/rpiv-ask-user-question`, `pi-web-access`, `pi-lens`, and `pi-slash-anywhere` like pi's other npm packages
406
415
 
407
416
  ## 4. How you attach
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "acstack",
3
- "version": "0.49.1",
3
+ "version": "0.49.2",
4
4
  "private": false,
5
5
  "description": "Agentic coding stack with first-class Claude Code and pi support: skills, orchestrator instructions, and verification agents.",
6
6
  "license": "MIT",