archgraph-argo-beta 0.27.0-beta.13 → 0.27.0-beta.14
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.
|
@@ -760,8 +760,24 @@ function budgetTruncationBase(result, maxBytes, fullBytes, ids) {
|
|
|
760
760
|
// real loss of a listed id.
|
|
761
761
|
function trimManifestToBudget(result, maxBytes) {
|
|
762
762
|
const truncation = result.truncation;
|
|
763
|
-
const arrays = ['includedElementIds', 'includedRelationshipIds', 'includedViewIds'];
|
|
764
763
|
const focusId = result.focusElementId;
|
|
764
|
+
// If the FOCUS element alone already exceeds the budget, trimming the (cheap)
|
|
765
|
+
// id manifest cannot get us under it — and dropping ids would only lose
|
|
766
|
+
// navigation for nothing. Keep the COMPLETE manifest and say why.
|
|
767
|
+
const focusOnly = {
|
|
768
|
+
...result,
|
|
769
|
+
truncation: {
|
|
770
|
+
...truncation,
|
|
771
|
+
includedElementIds: focusId ? [focusId] : [],
|
|
772
|
+
includedRelationshipIds: [],
|
|
773
|
+
includedViewIds: [],
|
|
774
|
+
},
|
|
775
|
+
};
|
|
776
|
+
if (focusId && payloadByteLength(focusOnly) > maxBytes) {
|
|
777
|
+
truncation.overBudgetByFocus = true;
|
|
778
|
+
return;
|
|
779
|
+
}
|
|
780
|
+
const arrays = ['includedElementIds', 'includedRelationshipIds', 'includedViewIds'];
|
|
765
781
|
for (let ratio = 0.9; ratio >= 0; ratio -= 0.1) {
|
|
766
782
|
for (const key of arrays) {
|
|
767
783
|
const full = truncation[key] || [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "archgraph-argo-beta",
|
|
3
|
-
"version": "0.27.0-beta.
|
|
3
|
+
"version": "0.27.0-beta.14",
|
|
4
4
|
"description": "Deploy the ArchGraph ARGO toolchain, skills, and rules (schema, scripts, argo-init skill, global rule) with one command.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|