@dtlabs/ai-toolkit 0.17.0 → 0.17.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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
1
  ## 0.1.4 (2026-07-21)
2
+ ## [0.17.1](https://github.com/dtlab-tech/ai-toolkit/compare/v0.17.0...v0.17.1) (2026-10-08)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * **task-executor:** persist the reviewer's raw response on its receipt ([487b267](https://github.com/dtlab-tech/ai-toolkit/commit/487b2676467b72d4f6649c784b9fc6311d7819ac))
8
+ * **task-executor:** persist the reviewer's raw response on its receipt ([1ca8491](https://github.com/dtlab-tech/ai-toolkit/commit/1ca8491e81ea35cc27a5f5b9f2b970fe85b1aeef))
9
+
2
10
  ## [0.17.0](https://github.com/dtlab-tech/ai-toolkit/compare/v0.16.9...v0.17.0) (2026-10-08)
3
11
 
4
12
 
@@ -715,7 +715,7 @@ function _extractReviewVerdict(spawnResult) {
715
715
  : null;
716
716
 
717
717
  if (text === null) {
718
- return { passed: null, criticalFindings: [] };
718
+ return { passed: null, criticalFindings: [], responseText: null };
719
719
  }
720
720
 
721
721
  const verdictMatch = text.match(/Verdict:\s*(PASS|FAIL)/i);
@@ -754,7 +754,16 @@ function _extractReviewVerdict(spawnResult) {
754
754
  }
755
755
  }
756
756
 
757
- return { passed: passed, criticalFindings: criticalFindings };
757
+ // Persisted verbatim on the review receipt (persistVerificationReviewOutcome)
758
+ // so a FAIL this function cannot fully explain — any future template
759
+ // variation neither the CRITICAL section nor the Build/Tests fold-in
760
+ // above recognizes — is still diagnosable from the receipt itself,
761
+ // instead of requiring the diff to be reconstructed and re-judged by hand
762
+ // after the fact (confirmed necessary against a real run: this exact
763
+ // "reviewPassed:false, criticalFindings:[]" shape recurred on a THIRD,
764
+ // previously-clean task, meaning the Build/Tests fold-in does not cover
765
+ // every real cause of an unexplained FAIL).
766
+ return { passed: passed, criticalFindings: criticalFindings, responseText: text };
758
767
  }
759
768
 
760
769
  /**
@@ -824,7 +833,8 @@ function _extractReviewVerdict(spawnResult) {
824
833
  * runId: string, taskId: string, attemptNumber: number,
825
834
  * agentId: string, nativeAgentName: string,
826
835
  * ledgerOperationId: string, spawnResult: object,
827
- * reviewPassed: (boolean|null), criticalFindings: string[]
836
+ * reviewPassed: (boolean|null), criticalFindings: string[],
837
+ * responseText: (string|null)
828
838
  * }>}
829
839
  * @throws {Error} NO_LOCK_HELD, AGENT_NOT_VERIFIED, DEFINITION_HASH_MISMATCH,
830
840
  * DISPATCH_VALIDATION_ERROR, or any error surfaced by spawnClaudeAgent
@@ -918,6 +928,7 @@ async function runReview(args) {
918
928
  spawnResult: spawnResult,
919
929
  reviewPassed: verdict.passed,
920
930
  criticalFindings: verdict.criticalFindings,
931
+ responseText: verdict.responseText,
921
932
  };
922
933
  }
923
934
 
@@ -777,6 +777,14 @@ function persistVerificationReviewOutcome(executionRoot, runId, taskId, attemptN
777
777
  attemptNumber: attemptNumber,
778
778
  reviewPassed: review.reviewPassed === undefined ? null : review.reviewPassed,
779
779
  criticalFindings: review.criticalFindings,
780
+ // Verbatim review-solution reply, persisted so a FAIL neither the
781
+ // CRITICAL section nor the Build/Tests fold-in can explain
782
+ // (_extractReviewVerdict's own criticalFindings: [] either way) is
783
+ // still diagnosable from this receipt — never requires reconstructing
784
+ // and re-judging the diff by hand after the fact. null (never '') when
785
+ // the reply had no readable envelope at all — see
786
+ // _extractReviewVerdict's own null-compatibility.
787
+ responseText: review.responseText === undefined ? null : review.responseText,
780
788
  authoritative: verificationPassed === true,
781
789
  });
782
790
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dtlabs/ai-toolkit",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "description": "AI Toolkit — reusable agents and procedures for developers to build AI-powered applications.",
5
5
  "files": [
6
6
  "docs/",