@danypops/pi-papyrus 0.36.0 → 0.36.1

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.
@@ -671,10 +671,18 @@ export function registerPlaybooksTool(pi: ExtensionAPI): void {
671
671
  }),
672
672
  renderCall(args, theme) { return renderPapyrusToolCall("Playbooks", args, theme); },
673
673
  renderResult(result, options, theme, context) { return renderPapyrusToolResult(result, options, theme, context); },
674
- async execute(_id, rawParams) {
674
+ async execute(_id, rawParams, _signal, _onUpdate, ctx) {
675
675
  try {
676
676
  const params: Record<string, unknown> = { ...rawParams };
677
677
  const action = params.action;
678
+ // invoke ends by calling tasks.focus server-side -- that focus write must land in the
679
+ // SAME session scope the tasks tool reads from (ctx.sessionManager.getSessionId()),
680
+ // the same resolution the tasks tool itself always applies, or the entry task's focus
681
+ // is invisible to tasks(action=focused/active) despite invoke reporting it as focused.
682
+ if (action === "invoke") {
683
+ const resolvedSessionId = params.session_id ?? ctx.sessionManager.getSessionId();
684
+ Object.assign(params, { session_id: resolvedSessionId, ...sessionSecretField(resolvedSessionId as string) });
685
+ }
678
686
  const resolutionRequest = { project_root: params.project_root };
679
687
  await resolveNameFields(params, [
680
688
  { nameKey: "name", idKey: "id", listOperation: "playbooks.list", baseRequest: resolutionRequest },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danypops/pi-papyrus",
3
- "version": "0.36.0",
3
+ "version": "0.36.1",
4
4
  "description": "Pi host extension for Papyrus: native tools, TUI panels, and context injection over the daemon-backed graph store",
5
5
  "type": "module",
6
6
  "keywords": ["pi-package"],
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@danypops/daemon-kit": "^0.10.0",
21
- "@danypops/papyrus": "^0.36.0",
21
+ "@danypops/papyrus": "^0.36.1",
22
22
  "beautiful-mermaid": "1.1.3"
23
23
  },
24
24
  "devDependencies": {