@wrongstack/core 0.291.0 → 0.291.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 (52) hide show
  1. package/dist/boot.d.ts.map +1 -1
  2. package/dist/chronicle/index.js +20 -1
  3. package/dist/chronicle/index.js.map +2 -2
  4. package/dist/chronicle/tool-adapter.d.ts.map +1 -1
  5. package/dist/coordination/director.d.ts +18 -0
  6. package/dist/coordination/director.d.ts.map +1 -1
  7. package/dist/coordination/fleet-spawn.d.ts.map +1 -1
  8. package/dist/coordination/index.js +37 -15
  9. package/dist/coordination/index.js.map +2 -2
  10. package/dist/core/agent-response.d.ts.map +1 -1
  11. package/dist/defaults/index.js +660 -391
  12. package/dist/defaults/index.js.map +4 -4
  13. package/dist/execution/index.js +61 -12
  14. package/dist/execution/index.js.map +3 -3
  15. package/dist/execution/tool-executor.d.ts.map +1 -1
  16. package/dist/hq/index.js +17 -0
  17. package/dist/hq/index.js.map +2 -2
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +1304 -882
  21. package/dist/index.js.map +4 -4
  22. package/dist/infrastructure/index.js +15 -10
  23. package/dist/infrastructure/index.js.map +2 -2
  24. package/dist/kernel/events/tool-events.d.ts +24 -0
  25. package/dist/kernel/events/tool-events.d.ts.map +1 -1
  26. package/dist/plugins/auto-review-plugin.d.ts +10 -0
  27. package/dist/plugins/auto-review-plugin.d.ts.map +1 -1
  28. package/dist/security/index.js +148 -0
  29. package/dist/security/index.js.map +3 -3
  30. package/dist/security/permission-policy.d.ts +8 -1
  31. package/dist/security/permission-policy.d.ts.map +1 -1
  32. package/dist/storage/config-loader.d.ts +8 -0
  33. package/dist/storage/config-loader.d.ts.map +1 -1
  34. package/dist/storage/index.js +457 -379
  35. package/dist/storage/index.js.map +4 -4
  36. package/dist/storage/provider-config-watcher.d.ts +6 -0
  37. package/dist/storage/provider-config-watcher.d.ts.map +1 -1
  38. package/dist/types/permission.d.ts +38 -0
  39. package/dist/types/permission.d.ts.map +1 -1
  40. package/dist/utils/config-backup.d.ts +20 -0
  41. package/dist/utils/config-backup.d.ts.map +1 -0
  42. package/dist/utils/index.d.ts +2 -1
  43. package/dist/utils/index.d.ts.map +1 -1
  44. package/dist/utils/index.js +172 -106
  45. package/dist/utils/index.js.map +4 -4
  46. package/dist/utils/message-invariants.d.ts +12 -9
  47. package/dist/utils/message-invariants.d.ts.map +1 -1
  48. package/dist/utils/term.d.ts +6 -0
  49. package/dist/utils/term.d.ts.map +1 -1
  50. package/dist/utils/wstack-paths.d.ts +10 -0
  51. package/dist/utils/wstack-paths.d.ts.map +1 -1
  52. package/package.json +2 -2
@@ -666,16 +666,6 @@ function expectDefined(value, label) {
666
666
  }
667
667
 
668
668
  // src/utils/message-invariants.ts
669
- function hasMeaningfulContent(content) {
670
- if (typeof content === "string") return content.trim().length > 0;
671
- return content.some((block) => {
672
- if (block.type === "text") return block.text.trim().length > 0;
673
- if (block.type === "thinking") {
674
- return block.thinking.trim().length > 0 || Boolean(block.signature);
675
- }
676
- return true;
677
- });
678
- }
679
669
  function repairToolUseAdjacency(messages) {
680
670
  const removedToolUses = [];
681
671
  const removedToolResults = [];
@@ -762,6 +752,21 @@ function mapContent(msg, fn) {
762
752
  }
763
753
  return { ...msg, content: next };
764
754
  }
755
+ function hasMeaningfulContent(content) {
756
+ if (typeof content === "string") return content.trim().length > 0;
757
+ for (const block of content) {
758
+ if (block.type === "text") {
759
+ if (block.text.trim().length > 0) return true;
760
+ continue;
761
+ }
762
+ if (block.type === "thinking") {
763
+ if (block.thinking.trim().length > 0 || block.signature) return true;
764
+ continue;
765
+ }
766
+ return true;
767
+ }
768
+ return false;
769
+ }
765
770
  function isEmptyMessage(msg) {
766
771
  return !hasMeaningfulContent(msg.content);
767
772
  }