@osolmaz/pi-workflows 0.13.0 → 0.13.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.
Files changed (45) hide show
  1. package/README.md +7 -5
  2. package/dist/builtins/autodoc.workflow.d.ts +191 -4
  3. package/dist/builtins/autodoc.workflow.js +156 -30
  4. package/dist/builtins/autodoc.workflow.js.map +1 -1
  5. package/dist/builtins/autoimplement-command-batches.d.ts +1 -0
  6. package/dist/builtins/autoimplement-command-batches.js +29 -31
  7. package/dist/builtins/autoimplement-command-batches.js.map +1 -1
  8. package/dist/builtins/autoimplement.workflow.d.ts +1255 -29
  9. package/dist/builtins/autoimplement.workflow.js +416 -153
  10. package/dist/builtins/autoimplement.workflow.js.map +1 -1
  11. package/dist/builtins/catalog.js +2 -2
  12. package/dist/builtins/catalog.js.map +1 -1
  13. package/dist/builtins/change-verification.workflow.d.ts +110 -0
  14. package/dist/builtins/change-verification.workflow.js +860 -0
  15. package/dist/builtins/change-verification.workflow.js.map +1 -0
  16. package/dist/builtins/monitor.workflow.js +4 -3
  17. package/dist/builtins/monitor.workflow.js.map +1 -1
  18. package/dist/builtins/plan-change.workflow.d.ts +359 -6
  19. package/dist/builtins/plan-change.workflow.js +26 -0
  20. package/dist/builtins/plan-change.workflow.js.map +1 -1
  21. package/dist/builtins/workspace-preparation.workflow.d.ts +75 -0
  22. package/dist/builtins/workspace-preparation.workflow.js +498 -0
  23. package/dist/builtins/workspace-preparation.workflow.js.map +1 -0
  24. package/dist/extension/executor.js +1 -4
  25. package/dist/extension/executor.js.map +1 -1
  26. package/dist/extension/index.js +0 -14
  27. package/dist/extension/index.js.map +1 -1
  28. package/docs/WORKFLOW_COMPOSITION.md +8 -0
  29. package/docs/plans/2026-08-23-assistant-agent-completion-plan.md +1 -1
  30. package/docs/plans/2026-08-24-change-scoped-verification-plan.md +419 -0
  31. package/docs/workflows.md +8 -13
  32. package/herdr-plugin.toml +1 -1
  33. package/package.json +1 -1
  34. package/skills/autodoc/SKILL.md +7 -0
  35. package/skills/autoimplement/SKILL.md +4 -0
  36. package/src/builtins/autodoc.workflow.ts +184 -33
  37. package/src/builtins/autoimplement-command-batches.ts +39 -33
  38. package/src/builtins/autoimplement.workflow.ts +483 -175
  39. package/src/builtins/catalog.ts +2 -2
  40. package/src/builtins/change-verification.workflow.ts +1143 -0
  41. package/src/builtins/monitor.workflow.ts +6 -3
  42. package/src/builtins/plan-change.workflow.ts +35 -0
  43. package/src/builtins/workspace-preparation.workflow.ts +668 -0
  44. package/src/extension/executor.ts +1 -4
  45. package/src/extension/index.ts +0 -14
@@ -560,7 +560,6 @@ export default function piWorkflows(pi: ExtensionAPI) {
560
560
  };
561
561
  let activeRun: ActiveRun | null = null;
562
562
  let systemTurnAbort: { contract: AgentStepContract; intentId?: string } | null = null;
563
- let suppressWorkflowAssistantTail = false;
564
563
  let lastExpiredAttempt: { contract: AgentStepContract; reason: string } | null = null;
565
564
  // The interactive run currently parked at a checkpoint, if any.
566
565
  let lastWaitingRunId: string | null = null;
@@ -999,7 +998,6 @@ export default function piWorkflows(pi: ExtensionAPI) {
999
998
  resolution: "presentation",
1000
999
  send: (turnIntentId) => {
1001
1000
  presentationPending = run.generation;
1002
- suppressWorkflowAssistantTail = false;
1003
1001
  pi.sendMessage(
1004
1002
  {
1005
1003
  customType: PRESENTATION_MESSAGE_TYPE,
@@ -2916,7 +2914,6 @@ export default function piWorkflows(pi: ExtensionAPI) {
2916
2914
  if (!result.accepted) {
2917
2915
  throw new Error(result.message);
2918
2916
  }
2919
- suppressWorkflowAssistantTail = true;
2920
2917
  return {
2921
2918
  content: [{ type: "text", text: result.message }],
2922
2919
  details: { action: "submit", step: params.step, accepted: true },
@@ -2994,7 +2991,6 @@ export default function piWorkflows(pi: ExtensionAPI) {
2994
2991
  });
2995
2992
 
2996
2993
  pi.on("agent_start", () => {
2997
- suppressWorkflowAssistantTail = false;
2998
2994
  if (!activeRun && presentationPending === null && presentationAbort) {
2999
2995
  // A normal user turn started while an async presentation prompt was
3000
2996
  // still resolving. The user's new request supersedes that old result.
@@ -3005,7 +3001,6 @@ export default function piWorkflows(pi: ExtensionAPI) {
3005
3001
  });
3006
3002
 
3007
3003
  pi.on("agent_end", (event, ctx) => {
3008
- suppressWorkflowAssistantTail = false;
3009
3004
  const aborted = event.messages.some(
3010
3005
  (message) =>
3011
3006
  typeof message === "object" &&
@@ -3057,14 +3052,6 @@ export default function piWorkflows(pi: ExtensionAPI) {
3057
3052
  });
3058
3053
 
3059
3054
  pi.on("message_end", (event) => {
3060
- if (suppressWorkflowAssistantTail && event.message.role === "assistant") {
3061
- const message = {
3062
- ...event.message,
3063
- content: event.message.content.filter((part) => part.type !== "text"),
3064
- };
3065
- activeRun?.recorder?.handleMessageEnd({ ...event, message });
3066
- return { message };
3067
- }
3068
3055
  activeRun?.recorder?.handleMessageEnd(event);
3069
3056
  });
3070
3057
 
@@ -3127,7 +3114,6 @@ export default function piWorkflows(pi: ExtensionAPI) {
3127
3114
  sessionClosed = true;
3128
3115
  herdrProbeGeneration += 1;
3129
3116
  systemTurnAbort = null;
3130
- suppressWorkflowAssistantTail = false;
3131
3117
  turnCoordinator.clearDeferred();
3132
3118
  supersedePresentation();
3133
3119
  const run = activeRun;