@wrongstack/core 0.291.0 → 0.291.2
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/dist/boot.d.ts.map +1 -1
- package/dist/chronicle/index.js +20 -1
- package/dist/chronicle/index.js.map +2 -2
- package/dist/chronicle/tool-adapter.d.ts.map +1 -1
- package/dist/coordination/director.d.ts +18 -0
- package/dist/coordination/director.d.ts.map +1 -1
- package/dist/coordination/fleet-spawn.d.ts.map +1 -1
- package/dist/coordination/index.js +37 -15
- package/dist/coordination/index.js.map +2 -2
- package/dist/core/agent-response.d.ts.map +1 -1
- package/dist/defaults/index.js +660 -391
- package/dist/defaults/index.js.map +4 -4
- package/dist/execution/index.js +61 -12
- package/dist/execution/index.js.map +3 -3
- package/dist/execution/tool-executor.d.ts.map +1 -1
- package/dist/hq/index.js +17 -0
- package/dist/hq/index.js.map +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1304 -882
- package/dist/index.js.map +4 -4
- package/dist/infrastructure/index.js +15 -10
- package/dist/infrastructure/index.js.map +2 -2
- package/dist/kernel/events/tool-events.d.ts +24 -0
- package/dist/kernel/events/tool-events.d.ts.map +1 -1
- package/dist/plugins/auto-review-plugin.d.ts +10 -0
- package/dist/plugins/auto-review-plugin.d.ts.map +1 -1
- package/dist/security/index.js +148 -0
- package/dist/security/index.js.map +3 -3
- package/dist/security/permission-policy.d.ts +8 -1
- package/dist/security/permission-policy.d.ts.map +1 -1
- package/dist/storage/config-loader.d.ts +8 -0
- package/dist/storage/config-loader.d.ts.map +1 -1
- package/dist/storage/index.js +457 -379
- package/dist/storage/index.js.map +4 -4
- package/dist/storage/provider-config-watcher.d.ts +6 -0
- package/dist/storage/provider-config-watcher.d.ts.map +1 -1
- package/dist/types/permission.d.ts +38 -0
- package/dist/types/permission.d.ts.map +1 -1
- package/dist/utils/config-backup.d.ts +20 -0
- package/dist/utils/config-backup.d.ts.map +1 -0
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +172 -106
- package/dist/utils/index.js.map +4 -4
- package/dist/utils/message-invariants.d.ts +12 -9
- package/dist/utils/message-invariants.d.ts.map +1 -1
- package/dist/utils/term.d.ts +6 -0
- package/dist/utils/term.d.ts.map +1 -1
- package/dist/utils/wstack-paths.d.ts +10 -0
- package/dist/utils/wstack-paths.d.ts.map +1 -1
- 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
|
}
|