@akagilnc/pi-workflow-roles 0.1.2076 → 0.1.2081

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.
@@ -20720,13 +20720,11 @@ function auditIncompleteFromCandidate(candidate) {
20720
20720
  }
20721
20721
  function boundRetainedAuditResponse(entries, callIndex, resultIndex, auditToolName) {
20722
20722
  const matches = [];
20723
- let retainedResponseCount = 0;
20724
20723
  for (let index = callIndex + 1; index < resultIndex; index += 1) {
20725
20724
  const entry = entries[index];
20726
20725
  if (entry?.type !== "custom" || entry.customType !== COMPLIANCE_RESPONSE_ENTRY_TYPE) {
20727
20726
  continue;
20728
20727
  }
20729
- retainedResponseCount += 1;
20730
20728
  if (!isRecord5(entry.data) || !isRecord5(entry.data.response)) continue;
20731
20729
  const response = entry.data.response;
20732
20730
  if (!Array.isArray(response.content)) continue;
@@ -20736,7 +20734,7 @@ function boundRetainedAuditResponse(entries, callIndex, resultIndex, auditToolNa
20736
20734
  if (calls.length !== 1 || calls[0]?.name !== auditToolName) continue;
20737
20735
  matches.push({ candidate: calls[0]?.arguments });
20738
20736
  }
20739
- return retainedResponseCount === 1 && matches.length === 1 ? matches[0] : void 0;
20737
+ return matches.length === 1 ? matches[0] : void 0;
20740
20738
  }
20741
20739
  function extractComplianceAuditIncompleteRoleOutcome(entries, role, outputToolName) {
20742
20740
  if (outputToolName !== outputToolNameForAuditedRole(role)) return void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akagilnc/pi-workflow-roles",
3
- "version": "0.1.2076",
3
+ "version": "0.1.2081",
4
4
  "description": "Soul-bound workflow roles for Pi",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -1696,13 +1696,11 @@ function boundRetainedAuditResponse(
1696
1696
  auditToolName: string,
1697
1697
  ): BoundRetainedAuditResponse | undefined {
1698
1698
  const matches: BoundRetainedAuditResponse[] = [];
1699
- let retainedResponseCount = 0;
1700
1699
  for (let index = callIndex + 1; index < resultIndex; index += 1) {
1701
1700
  const entry = entries[index];
1702
1701
  if (entry?.type !== "custom" || entry.customType !== COMPLIANCE_RESPONSE_ENTRY_TYPE) {
1703
1702
  continue;
1704
1703
  }
1705
- retainedResponseCount += 1;
1706
1704
  if (!isRecord(entry.data) || !isRecord(entry.data.response)) continue;
1707
1705
  const response = entry.data.response;
1708
1706
  if (!Array.isArray(response.content)) continue;
@@ -1713,7 +1711,9 @@ function boundRetainedAuditResponse(
1713
1711
  if (calls.length !== 1 || calls[0]?.name !== auditToolName) continue;
1714
1712
  matches.push({ candidate: calls[0]?.arguments });
1715
1713
  }
1716
- return retainedResponseCount === 1 && matches.length === 1 ? matches[0] : undefined;
1714
+ // Unique seat-bound match binds even when multi-turn investigation retained
1715
+ // intermediate non-decision responses in the same call/result interval.
1716
+ return matches.length === 1 ? matches[0] : undefined;
1717
1717
  }
1718
1718
 
1719
1719
  export function extractComplianceAuditIncompleteRoleOutcome(