@hasna/instructions 0.4.18 → 0.4.19
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/cli/index.js +102 -14
- package/dist/index.js +102 -14
- package/dist/lib/global-agent-rules-standard.d.ts +29 -10
- package/dist/lib/global-agent-rules-standard.d.ts.map +1 -1
- package/dist/lib/session-render-rule-currency-floor.test.d.ts +2 -0
- package/dist/lib/session-render-rule-currency-floor.test.d.ts.map +1 -0
- package/dist/lib/session-render.d.ts +5 -0
- package/dist/lib/session-render.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -10371,6 +10371,21 @@ function canonicalFingerprintValue(value) {
|
|
|
10371
10371
|
}
|
|
10372
10372
|
return value;
|
|
10373
10373
|
}
|
|
10374
|
+
function ruleAttestation(rule) {
|
|
10375
|
+
const metadata = rule.metadata ?? {};
|
|
10376
|
+
const read = (key) => {
|
|
10377
|
+
const value = metadata[key];
|
|
10378
|
+
return typeof value === "string" ? value : null;
|
|
10379
|
+
};
|
|
10380
|
+
const applied = metadata["payloadFloorApplied"];
|
|
10381
|
+
return {
|
|
10382
|
+
contentSha256: sha2563(rule.content ?? ""),
|
|
10383
|
+
payloadFloorApplied: typeof applied === "boolean" ? applied : null,
|
|
10384
|
+
flooredFromRulesVersion: read("flooredFromRulesVersion"),
|
|
10385
|
+
flooredFromPayloadSha256: read("flooredFromPayloadSha256"),
|
|
10386
|
+
payloadIntegrity: read("payloadIntegrity")
|
|
10387
|
+
};
|
|
10388
|
+
}
|
|
10374
10389
|
function sourceFingerprint(source) {
|
|
10375
10390
|
return {
|
|
10376
10391
|
id: source.id,
|
|
@@ -10469,6 +10484,27 @@ function applyAgentOperatingRulesFloor(source, content) {
|
|
|
10469
10484
|
metadata: { ...source.metadata ?? {}, ...payload.metadata, ...floored }
|
|
10470
10485
|
};
|
|
10471
10486
|
}
|
|
10487
|
+
function applyAgentOperatingRulesFloorToRule(source, rule, content) {
|
|
10488
|
+
const unchanged = { content, metadata: rule.metadata ?? null };
|
|
10489
|
+
if (!claimsAgentOperatingRulesPolicy(source, content))
|
|
10490
|
+
return unchanged;
|
|
10491
|
+
const payload = resolveAgentOperatingRulesPayload(content);
|
|
10492
|
+
if (payload.content === content) {
|
|
10493
|
+
return {
|
|
10494
|
+
content,
|
|
10495
|
+
metadata: { ...rule.metadata ?? {}, payloadIntegrity: payload.integrity }
|
|
10496
|
+
};
|
|
10497
|
+
}
|
|
10498
|
+
const floored = {
|
|
10499
|
+
payloadFloorApplied: true,
|
|
10500
|
+
flooredFromRulesVersion: parseAgentOperatingRulesVersion(content),
|
|
10501
|
+
flooredFromPayloadSha256: sha2563(content)
|
|
10502
|
+
};
|
|
10503
|
+
return {
|
|
10504
|
+
content: payload.content,
|
|
10505
|
+
metadata: { ...rule.metadata ?? {}, ...payload.metadata, ...floored }
|
|
10506
|
+
};
|
|
10507
|
+
}
|
|
10472
10508
|
function skippedSource(source, reason) {
|
|
10473
10509
|
return {
|
|
10474
10510
|
id: source.id,
|
|
@@ -10507,24 +10543,67 @@ function normalizeSources(sources, tool, allowEmptySources) {
|
|
|
10507
10543
|
rejectDuplicateRulePaths(ordered);
|
|
10508
10544
|
return { sources: ordered, skipped: deduplicated.skipped };
|
|
10509
10545
|
}
|
|
10546
|
+
function semanticPolicyIntegrity(body) {
|
|
10547
|
+
return sha2563(body) === AGENT_OPERATING_RULES_PAYLOAD_SHA256 ? "pinned-digest" : "unverified-self-declared";
|
|
10548
|
+
}
|
|
10549
|
+
function semanticPolicyDeclaration(source) {
|
|
10550
|
+
const normalize = (value) => value.replace(/\r\n/g, `
|
|
10551
|
+
`).trim();
|
|
10552
|
+
const sentinel = source.content.match(AGENT_OPERATING_RULES_SENTINEL_PATTERN);
|
|
10553
|
+
if (sentinel) {
|
|
10554
|
+
return {
|
|
10555
|
+
version: sentinel[1],
|
|
10556
|
+
normalizedContent: normalize(source.content),
|
|
10557
|
+
integrity: semanticPolicyIntegrity(source.content)
|
|
10558
|
+
};
|
|
10559
|
+
}
|
|
10560
|
+
for (const rule of source.resolvedRules) {
|
|
10561
|
+
const body = rule.content ?? "";
|
|
10562
|
+
if (!claimsAgentOperatingRulesPolicy(source, body))
|
|
10563
|
+
continue;
|
|
10564
|
+
const ruleSentinel = body.match(AGENT_OPERATING_RULES_SENTINEL_PATTERN);
|
|
10565
|
+
if (!ruleSentinel)
|
|
10566
|
+
continue;
|
|
10567
|
+
return {
|
|
10568
|
+
version: ruleSentinel[1],
|
|
10569
|
+
normalizedContent: normalize(body),
|
|
10570
|
+
integrity: semanticPolicyIntegrity(body)
|
|
10571
|
+
};
|
|
10572
|
+
}
|
|
10573
|
+
return null;
|
|
10574
|
+
}
|
|
10575
|
+
function withoutSemanticPolicyPayloads(source) {
|
|
10576
|
+
const content = AGENT_OPERATING_RULES_SENTINEL_PATTERN.test(source.content) ? "" : source.content;
|
|
10577
|
+
const resolvedRules = source.resolvedRules.filter((rule) => {
|
|
10578
|
+
const body = rule.content ?? "";
|
|
10579
|
+
return !(AGENT_OPERATING_RULES_SENTINEL_PATTERN.test(body) && claimsAgentOperatingRulesPolicy(source, body));
|
|
10580
|
+
});
|
|
10581
|
+
const hasPathReferences = (source.sourcePaths ?? []).length > 0;
|
|
10582
|
+
if (!content.trim() && resolvedRules.length === 0 && !hasPathReferences)
|
|
10583
|
+
return null;
|
|
10584
|
+
return { ...source, content, resolvedRules };
|
|
10585
|
+
}
|
|
10510
10586
|
function deduplicateSemanticPolicySources(sources) {
|
|
10511
10587
|
const selected = [];
|
|
10512
10588
|
const skipped = [];
|
|
10513
10589
|
const policySources = new Map;
|
|
10514
|
-
const collapseReason = (winner, key) => `superseded by "${winner.id}": sources declaring the semantic policy ${key} collapse to one so a single instruction home cannot carry two rule-set versions
|
|
10590
|
+
const collapseReason = (winner, key, partial, displacesVerified) => `superseded by "${winner.id}": sources declaring the semantic policy ${key} collapse to one so a single instruction home cannot carry two rule-set versions` + (partial ? "; only the policy payload was removed and this source's other instructions still render" : "") + (displacesVerified ? "; WARNING the surviving payload is unverified-self-declared and displaced a digest-verified one on its own version claim" : "");
|
|
10591
|
+
const discard = (loser, winner, key, displacesVerified) => {
|
|
10592
|
+
const remainder = withoutSemanticPolicyPayloads(loser);
|
|
10593
|
+
skipped.push(skippedSource(loser, collapseReason(winner, key, remainder !== null, displacesVerified)));
|
|
10594
|
+
return remainder;
|
|
10595
|
+
};
|
|
10515
10596
|
for (const source of sources) {
|
|
10516
|
-
const
|
|
10517
|
-
if (!
|
|
10597
|
+
const declaration = semanticPolicyDeclaration(source);
|
|
10598
|
+
if (!declaration) {
|
|
10518
10599
|
selected.push(source);
|
|
10519
10600
|
continue;
|
|
10520
10601
|
}
|
|
10521
|
-
const version =
|
|
10602
|
+
const { version, normalizedContent, integrity } = declaration;
|
|
10522
10603
|
const key = AGENT_OPERATING_RULES_SEMANTIC_POLICY_KEY;
|
|
10523
|
-
const normalizedContent = source.content.replace(/\r\n/g, `
|
|
10524
|
-
`).trim();
|
|
10525
10604
|
const existing = policySources.get(key);
|
|
10526
10605
|
if (!existing) {
|
|
10527
|
-
policySources.set(key, { index: selected.length, version, normalizedContent });
|
|
10606
|
+
policySources.set(key, { index: selected.length, version, normalizedContent, integrity });
|
|
10528
10607
|
selected.push(source);
|
|
10529
10608
|
continue;
|
|
10530
10609
|
}
|
|
@@ -10534,16 +10613,22 @@ function deduplicateSemanticPolicySources(sources) {
|
|
|
10534
10613
|
}
|
|
10535
10614
|
const current = selected[existing.index];
|
|
10536
10615
|
const priorityOrder = semanticPolicySourcePriority(source) - semanticPolicySourcePriority(current);
|
|
10537
|
-
|
|
10538
|
-
|
|
10616
|
+
const displacesVerified = existing.integrity === "pinned-digest" && integrity === "unverified-self-declared";
|
|
10617
|
+
const arrivingWins = priorityOrder > 0 || priorityOrder === 0 && versionOrder > 0;
|
|
10618
|
+
if (!arrivingWins) {
|
|
10619
|
+
const remainder2 = discard(source, current, key, false);
|
|
10620
|
+
if (remainder2)
|
|
10621
|
+
selected.push(remainder2);
|
|
10539
10622
|
continue;
|
|
10540
10623
|
}
|
|
10541
|
-
|
|
10624
|
+
const remainder = discard(current, source, key, displacesVerified);
|
|
10542
10625
|
selected[existing.index] = {
|
|
10543
10626
|
...source,
|
|
10544
10627
|
resolvedOrder: current.resolvedOrder
|
|
10545
10628
|
};
|
|
10546
|
-
|
|
10629
|
+
if (remainder)
|
|
10630
|
+
selected.push(remainder);
|
|
10631
|
+
policySources.set(key, { index: existing.index, version, normalizedContent, integrity });
|
|
10547
10632
|
}
|
|
10548
10633
|
return { selected, skipped };
|
|
10549
10634
|
}
|
|
@@ -10551,7 +10636,7 @@ function semanticPolicySourcePriority(source) {
|
|
|
10551
10636
|
let priority = 0;
|
|
10552
10637
|
if (source.nonOverridable)
|
|
10553
10638
|
priority += 4;
|
|
10554
|
-
if (source.id === GLOBAL_AGENT_RULES_STANDARD_SLUG)
|
|
10639
|
+
if (source.id === GLOBAL_AGENT_RULES_STANDARD_SLUG || source.id === AGENT_OPERATING_RULES_SOURCE_ID)
|
|
10555
10640
|
priority += 2;
|
|
10556
10641
|
if (source.metadata?.["role"] === AGENT_OPERATING_RULES_ROLE)
|
|
10557
10642
|
priority += 1;
|
|
@@ -11051,7 +11136,8 @@ function planSessionRender(input) {
|
|
|
11051
11136
|
label: rule.resolvedLabel,
|
|
11052
11137
|
path: rule.resolvedPath,
|
|
11053
11138
|
globs: rule.globs ?? [],
|
|
11054
|
-
hash: rule.hash ?? null
|
|
11139
|
+
hash: rule.hash ?? null,
|
|
11140
|
+
...ruleAttestation(rule)
|
|
11055
11141
|
})),
|
|
11056
11142
|
renderedPayloadSha256: sha2563(source.content),
|
|
11057
11143
|
provenance: source.provenance ?? null,
|
|
@@ -11172,7 +11258,8 @@ function normalizeInstructionRules(source, tool) {
|
|
|
11172
11258
|
return (source.rules ?? []).map((rule) => {
|
|
11173
11259
|
if (!rule.id.trim())
|
|
11174
11260
|
throw new Error(`Instruction rule id is required for source ${source.id}.`);
|
|
11175
|
-
const
|
|
11261
|
+
const floored = applyAgentOperatingRulesFloorToRule(source, rule, rule.content ?? "");
|
|
11262
|
+
const content = filterProviderOnlyBlocks(floored.content, tool);
|
|
11176
11263
|
if (!content.trim() && !rule.path)
|
|
11177
11264
|
throw new Error(`Instruction rule content or path is required for rule ${rule.id}.`);
|
|
11178
11265
|
const resolvedPath = normalizeRulePath(rule.path ?? `${slug(rule.id)}.md`);
|
|
@@ -11183,6 +11270,7 @@ function normalizeInstructionRules(source, tool) {
|
|
|
11183
11270
|
return {
|
|
11184
11271
|
...rule,
|
|
11185
11272
|
content,
|
|
11273
|
+
metadata: floored.metadata,
|
|
11186
11274
|
normalizedId: slug(rule.id),
|
|
11187
11275
|
resolvedLabel: rule.label ?? rule.id,
|
|
11188
11276
|
resolvedPath
|
package/dist/index.js
CHANGED
|
@@ -8442,6 +8442,21 @@ function canonicalFingerprintValue(value) {
|
|
|
8442
8442
|
}
|
|
8443
8443
|
return value;
|
|
8444
8444
|
}
|
|
8445
|
+
function ruleAttestation(rule) {
|
|
8446
|
+
const metadata = rule.metadata ?? {};
|
|
8447
|
+
const read = (key) => {
|
|
8448
|
+
const value = metadata[key];
|
|
8449
|
+
return typeof value === "string" ? value : null;
|
|
8450
|
+
};
|
|
8451
|
+
const applied = metadata["payloadFloorApplied"];
|
|
8452
|
+
return {
|
|
8453
|
+
contentSha256: sha2563(rule.content ?? ""),
|
|
8454
|
+
payloadFloorApplied: typeof applied === "boolean" ? applied : null,
|
|
8455
|
+
flooredFromRulesVersion: read("flooredFromRulesVersion"),
|
|
8456
|
+
flooredFromPayloadSha256: read("flooredFromPayloadSha256"),
|
|
8457
|
+
payloadIntegrity: read("payloadIntegrity")
|
|
8458
|
+
};
|
|
8459
|
+
}
|
|
8445
8460
|
function sourceFingerprint(source) {
|
|
8446
8461
|
return {
|
|
8447
8462
|
id: source.id,
|
|
@@ -8540,6 +8555,27 @@ function applyAgentOperatingRulesFloor(source, content) {
|
|
|
8540
8555
|
metadata: { ...source.metadata ?? {}, ...payload.metadata, ...floored }
|
|
8541
8556
|
};
|
|
8542
8557
|
}
|
|
8558
|
+
function applyAgentOperatingRulesFloorToRule(source, rule, content) {
|
|
8559
|
+
const unchanged = { content, metadata: rule.metadata ?? null };
|
|
8560
|
+
if (!claimsAgentOperatingRulesPolicy(source, content))
|
|
8561
|
+
return unchanged;
|
|
8562
|
+
const payload = resolveAgentOperatingRulesPayload(content);
|
|
8563
|
+
if (payload.content === content) {
|
|
8564
|
+
return {
|
|
8565
|
+
content,
|
|
8566
|
+
metadata: { ...rule.metadata ?? {}, payloadIntegrity: payload.integrity }
|
|
8567
|
+
};
|
|
8568
|
+
}
|
|
8569
|
+
const floored = {
|
|
8570
|
+
payloadFloorApplied: true,
|
|
8571
|
+
flooredFromRulesVersion: parseAgentOperatingRulesVersion(content),
|
|
8572
|
+
flooredFromPayloadSha256: sha2563(content)
|
|
8573
|
+
};
|
|
8574
|
+
return {
|
|
8575
|
+
content: payload.content,
|
|
8576
|
+
metadata: { ...rule.metadata ?? {}, ...payload.metadata, ...floored }
|
|
8577
|
+
};
|
|
8578
|
+
}
|
|
8543
8579
|
function skippedSource(source, reason) {
|
|
8544
8580
|
return {
|
|
8545
8581
|
id: source.id,
|
|
@@ -8578,24 +8614,67 @@ function normalizeSources(sources, tool, allowEmptySources) {
|
|
|
8578
8614
|
rejectDuplicateRulePaths(ordered);
|
|
8579
8615
|
return { sources: ordered, skipped: deduplicated.skipped };
|
|
8580
8616
|
}
|
|
8617
|
+
function semanticPolicyIntegrity(body) {
|
|
8618
|
+
return sha2563(body) === AGENT_OPERATING_RULES_PAYLOAD_SHA256 ? "pinned-digest" : "unverified-self-declared";
|
|
8619
|
+
}
|
|
8620
|
+
function semanticPolicyDeclaration(source) {
|
|
8621
|
+
const normalize = (value) => value.replace(/\r\n/g, `
|
|
8622
|
+
`).trim();
|
|
8623
|
+
const sentinel = source.content.match(AGENT_OPERATING_RULES_SENTINEL_PATTERN);
|
|
8624
|
+
if (sentinel) {
|
|
8625
|
+
return {
|
|
8626
|
+
version: sentinel[1],
|
|
8627
|
+
normalizedContent: normalize(source.content),
|
|
8628
|
+
integrity: semanticPolicyIntegrity(source.content)
|
|
8629
|
+
};
|
|
8630
|
+
}
|
|
8631
|
+
for (const rule of source.resolvedRules) {
|
|
8632
|
+
const body = rule.content ?? "";
|
|
8633
|
+
if (!claimsAgentOperatingRulesPolicy(source, body))
|
|
8634
|
+
continue;
|
|
8635
|
+
const ruleSentinel = body.match(AGENT_OPERATING_RULES_SENTINEL_PATTERN);
|
|
8636
|
+
if (!ruleSentinel)
|
|
8637
|
+
continue;
|
|
8638
|
+
return {
|
|
8639
|
+
version: ruleSentinel[1],
|
|
8640
|
+
normalizedContent: normalize(body),
|
|
8641
|
+
integrity: semanticPolicyIntegrity(body)
|
|
8642
|
+
};
|
|
8643
|
+
}
|
|
8644
|
+
return null;
|
|
8645
|
+
}
|
|
8646
|
+
function withoutSemanticPolicyPayloads(source) {
|
|
8647
|
+
const content = AGENT_OPERATING_RULES_SENTINEL_PATTERN.test(source.content) ? "" : source.content;
|
|
8648
|
+
const resolvedRules = source.resolvedRules.filter((rule) => {
|
|
8649
|
+
const body = rule.content ?? "";
|
|
8650
|
+
return !(AGENT_OPERATING_RULES_SENTINEL_PATTERN.test(body) && claimsAgentOperatingRulesPolicy(source, body));
|
|
8651
|
+
});
|
|
8652
|
+
const hasPathReferences = (source.sourcePaths ?? []).length > 0;
|
|
8653
|
+
if (!content.trim() && resolvedRules.length === 0 && !hasPathReferences)
|
|
8654
|
+
return null;
|
|
8655
|
+
return { ...source, content, resolvedRules };
|
|
8656
|
+
}
|
|
8581
8657
|
function deduplicateSemanticPolicySources(sources) {
|
|
8582
8658
|
const selected = [];
|
|
8583
8659
|
const skipped = [];
|
|
8584
8660
|
const policySources = new Map;
|
|
8585
|
-
const collapseReason = (winner, key) => `superseded by "${winner.id}": sources declaring the semantic policy ${key} collapse to one so a single instruction home cannot carry two rule-set versions
|
|
8661
|
+
const collapseReason = (winner, key, partial, displacesVerified) => `superseded by "${winner.id}": sources declaring the semantic policy ${key} collapse to one so a single instruction home cannot carry two rule-set versions` + (partial ? "; only the policy payload was removed and this source's other instructions still render" : "") + (displacesVerified ? "; WARNING the surviving payload is unverified-self-declared and displaced a digest-verified one on its own version claim" : "");
|
|
8662
|
+
const discard = (loser, winner, key, displacesVerified) => {
|
|
8663
|
+
const remainder = withoutSemanticPolicyPayloads(loser);
|
|
8664
|
+
skipped.push(skippedSource(loser, collapseReason(winner, key, remainder !== null, displacesVerified)));
|
|
8665
|
+
return remainder;
|
|
8666
|
+
};
|
|
8586
8667
|
for (const source of sources) {
|
|
8587
|
-
const
|
|
8588
|
-
if (!
|
|
8668
|
+
const declaration = semanticPolicyDeclaration(source);
|
|
8669
|
+
if (!declaration) {
|
|
8589
8670
|
selected.push(source);
|
|
8590
8671
|
continue;
|
|
8591
8672
|
}
|
|
8592
|
-
const version =
|
|
8673
|
+
const { version, normalizedContent, integrity } = declaration;
|
|
8593
8674
|
const key = AGENT_OPERATING_RULES_SEMANTIC_POLICY_KEY;
|
|
8594
|
-
const normalizedContent = source.content.replace(/\r\n/g, `
|
|
8595
|
-
`).trim();
|
|
8596
8675
|
const existing = policySources.get(key);
|
|
8597
8676
|
if (!existing) {
|
|
8598
|
-
policySources.set(key, { index: selected.length, version, normalizedContent });
|
|
8677
|
+
policySources.set(key, { index: selected.length, version, normalizedContent, integrity });
|
|
8599
8678
|
selected.push(source);
|
|
8600
8679
|
continue;
|
|
8601
8680
|
}
|
|
@@ -8605,16 +8684,22 @@ function deduplicateSemanticPolicySources(sources) {
|
|
|
8605
8684
|
}
|
|
8606
8685
|
const current = selected[existing.index];
|
|
8607
8686
|
const priorityOrder = semanticPolicySourcePriority(source) - semanticPolicySourcePriority(current);
|
|
8608
|
-
|
|
8609
|
-
|
|
8687
|
+
const displacesVerified = existing.integrity === "pinned-digest" && integrity === "unverified-self-declared";
|
|
8688
|
+
const arrivingWins = priorityOrder > 0 || priorityOrder === 0 && versionOrder > 0;
|
|
8689
|
+
if (!arrivingWins) {
|
|
8690
|
+
const remainder2 = discard(source, current, key, false);
|
|
8691
|
+
if (remainder2)
|
|
8692
|
+
selected.push(remainder2);
|
|
8610
8693
|
continue;
|
|
8611
8694
|
}
|
|
8612
|
-
|
|
8695
|
+
const remainder = discard(current, source, key, displacesVerified);
|
|
8613
8696
|
selected[existing.index] = {
|
|
8614
8697
|
...source,
|
|
8615
8698
|
resolvedOrder: current.resolvedOrder
|
|
8616
8699
|
};
|
|
8617
|
-
|
|
8700
|
+
if (remainder)
|
|
8701
|
+
selected.push(remainder);
|
|
8702
|
+
policySources.set(key, { index: existing.index, version, normalizedContent, integrity });
|
|
8618
8703
|
}
|
|
8619
8704
|
return { selected, skipped };
|
|
8620
8705
|
}
|
|
@@ -8622,7 +8707,7 @@ function semanticPolicySourcePriority(source) {
|
|
|
8622
8707
|
let priority = 0;
|
|
8623
8708
|
if (source.nonOverridable)
|
|
8624
8709
|
priority += 4;
|
|
8625
|
-
if (source.id === GLOBAL_AGENT_RULES_STANDARD_SLUG)
|
|
8710
|
+
if (source.id === GLOBAL_AGENT_RULES_STANDARD_SLUG || source.id === AGENT_OPERATING_RULES_SOURCE_ID)
|
|
8626
8711
|
priority += 2;
|
|
8627
8712
|
if (source.metadata?.["role"] === AGENT_OPERATING_RULES_ROLE)
|
|
8628
8713
|
priority += 1;
|
|
@@ -9122,7 +9207,8 @@ function planSessionRender(input) {
|
|
|
9122
9207
|
label: rule.resolvedLabel,
|
|
9123
9208
|
path: rule.resolvedPath,
|
|
9124
9209
|
globs: rule.globs ?? [],
|
|
9125
|
-
hash: rule.hash ?? null
|
|
9210
|
+
hash: rule.hash ?? null,
|
|
9211
|
+
...ruleAttestation(rule)
|
|
9126
9212
|
})),
|
|
9127
9213
|
renderedPayloadSha256: sha2563(source.content),
|
|
9128
9214
|
provenance: source.provenance ?? null,
|
|
@@ -9344,7 +9430,8 @@ function normalizeInstructionRules(source, tool) {
|
|
|
9344
9430
|
return (source.rules ?? []).map((rule) => {
|
|
9345
9431
|
if (!rule.id.trim())
|
|
9346
9432
|
throw new Error(`Instruction rule id is required for source ${source.id}.`);
|
|
9347
|
-
const
|
|
9433
|
+
const floored = applyAgentOperatingRulesFloorToRule(source, rule, rule.content ?? "");
|
|
9434
|
+
const content = filterProviderOnlyBlocks(floored.content, tool);
|
|
9348
9435
|
if (!content.trim() && !rule.path)
|
|
9349
9436
|
throw new Error(`Instruction rule content or path is required for rule ${rule.id}.`);
|
|
9350
9437
|
const resolvedPath = normalizeRulePath(rule.path ?? `${slug(rule.id)}.md`);
|
|
@@ -9355,6 +9442,7 @@ function normalizeInstructionRules(source, tool) {
|
|
|
9355
9442
|
return {
|
|
9356
9443
|
...rule,
|
|
9357
9444
|
content,
|
|
9445
|
+
metadata: floored.metadata,
|
|
9358
9446
|
normalizedId: slug(rule.id),
|
|
9359
9447
|
resolvedLabel: rule.label ?? rule.id,
|
|
9360
9448
|
resolvedPath
|
|
@@ -127,7 +127,17 @@ export declare function compareAgentOperatingRulesVersions(left: string, right:
|
|
|
127
127
|
* ties on priority in `deduplicateSemanticPolicySources` and then WINS on version,
|
|
128
128
|
* EVICTING the genuine baseline from the same render; the collapse happens before
|
|
129
129
|
* `rejectDuplicateSourceSlugs` runs, so the duplicate-slug guard never sees the
|
|
130
|
-
* collision.
|
|
130
|
+
* collision. That eviction was REACHABLE and is now narrowed, not closed: the managed
|
|
131
|
+
* source id `hasna-agent-operating-rules` earns precedence in
|
|
132
|
+
* `semanticPolicySourcePriority` alongside the managed slug, so the canonical source no
|
|
133
|
+
* longer merely ties with any export that sets `nonOverridable`, and an eviction by an
|
|
134
|
+
* unverified payload is reported in `skippedSources` and in `warnings` instead of
|
|
135
|
+
* passing as a routine collapse. An export that also mimics a canonical id still ties
|
|
136
|
+
* and still wins on version. Ordering by `payloadIntegrity` instead was tried and
|
|
137
|
+
* rejected: the pinned digest describes the EMBEDDED snapshot, so preferring it would
|
|
138
|
+
* freeze a home carrying that snapshot beside a newly published rules document — the
|
|
139
|
+
* same downgrade this floor exists to prevent, arriving by the selection path.
|
|
140
|
+
* Nothing in these bytes distinguishes a genuine future rules version from
|
|
131
141
|
* an inflated one. Rejecting
|
|
132
142
|
* above-baseline versions was considered and deliberately NOT done: the canonical
|
|
133
143
|
* rules document ships from `@hasna/identities`, which legitimately runs ahead of the
|
|
@@ -138,15 +148,24 @@ export declare function compareAgentOperatingRulesVersions(left: string, right:
|
|
|
138
148
|
* channel), not a comparison. Until then the choice is recorded rather than hidden:
|
|
139
149
|
* every payload carries `payloadIntegrity`, which is `unverified-self-declared`
|
|
140
150
|
* whenever bytes were accepted on their version claim alone.
|
|
141
|
-
* 2. This function guards only the payloads routed through it
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
151
|
+
* 2. This function guards only the payloads routed through it. The render pipeline routes
|
|
152
|
+
* BOTH `source.content` and `source.rules[].content`: `normalizeSources` floors the
|
|
153
|
+
* first and `normalizeInstructionRules` floors the second through
|
|
154
|
+
* `applyAgentOperatingRulesFloorToRule`, both before provider filtering, and
|
|
155
|
+
* `deduplicateSemanticPolicySources` reads a declaration from either field. A claiming
|
|
156
|
+
* source or rule is therefore covered whether it came from the config store, an
|
|
157
|
+
* identity export, or a file.
|
|
158
|
+
*
|
|
159
|
+
* The rule half was NOT covered until hasna/instructions#54, and this note used to say
|
|
160
|
+
* so in present tense. Until then a sentinel carried inside a RULE was neither floored
|
|
161
|
+
* nor deduped nor attested on the same untrusted export transport this floor otherwise
|
|
162
|
+
* defends, so an export installed a below-baseline NON-OVERRIDABLE rules document by
|
|
163
|
+
* putting it in `rules[]` instead of `content`.
|
|
164
|
+
*
|
|
165
|
+
* What remains uncovered is narrower and is stated so the choke point is not read as
|
|
166
|
+
* total: an unprivileged rule that merely QUOTES the rules mid-body is deliberately not
|
|
167
|
+
* floored (the F2 false positive), and a rule under a privileged parent IS floored even
|
|
168
|
+
* when it only quotes them.
|
|
150
169
|
*
|
|
151
170
|
* The attestation is also PER-RENDER, not durable: a repair is recorded in the manifest
|
|
152
171
|
* of the render that performed it, so fleet-wide auditing needs those manifests
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-agent-rules-standard.d.ts","sourceRoot":"","sources":["../../src/lib/global-agent-rules-standard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAsB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE/E,eAAO,MAAM,gCAAgC,gCAAgC,CAAC;AAE9E,eAAO,MAAM,mCAAmC,EAAG,mCAA4C,CAAC;AAChG,eAAO,MAAM,+BAA+B,EAAG,6BAAsC,CAAC;AACtF,yFAAyF;AACzF,eAAO,MAAM,0BAA0B,EAAG,uBAAgC,CAAC;AAC3E,eAAO,MAAM,6BAA6B,EAAG,OAAgB,CAAC;AAC9D,eAAO,MAAM,wCAAwC,EAAG,YAAqB,CAAC;AAC9E,eAAO,MAAM,8BAA8B,EAAG,8CAAuD,CAAC;AACtG;;;;;GAKG;AACH,eAAO,MAAM,yCAAyC,EAAG,6BAAsC,CAAC;AAChG,6FAA6F;AAC7F,eAAO,MAAM,sCAAsC,QAA2E,CAAC;AAC/H;;;;;;;GAOG;AACH,eAAO,MAAM,qCAAqC,QAAsG,CAAC;AACzJ,eAAO,MAAM,oCAAoC,EAAG,kEAA2E,CAAC;AAChI,eAAO,MAAM,oCAAoC,oEAAuC,CAAC;AACzF,eAAO,MAAM,0CAA0C,EAAG,kEAA2E,CAAC;AACtI,eAAO,MAAM,2CAA2C,EAAG,2DAAoE,CAAC;AAEhI,eAAO,MAAM,8BAA8B;;;;CAIjC,CAAC;AAEX,eAAO,MAAM,iCAAiC;;;;;;;CAOpC,CAAC;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BAAuB,EAAE,OAAO,CAAC;IACjC,gFAAgF;IAChF,SAAS,EAAE,mCAAmC,CAAC;IAC/C,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,2EAA2E;AAC3E,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAEjG;AAED,qDAAqD;AACrD,wBAAgB,kCAAkC,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAQtF;AAmBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,wBAAgB,iCAAiC,CAC/C,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACvC,0BAA0B,CA0E5B;AAwBD;;;;;;GAMG;AACH,wBAAsB,oCAAoC,CAAC,KAAK,GAAE,WAAkC,GAAG,OAAO,CAAC,MAAM,CAAC,CAsBrH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-render-rule-currency-floor.test.d.ts","sourceRoot":"","sources":["../../src/lib/session-render-rule-currency-floor.test.ts"],"names":[],"mappings":""}
|
|
@@ -150,6 +150,11 @@ export interface SessionRenderManifest {
|
|
|
150
150
|
path: string;
|
|
151
151
|
globs: string[];
|
|
152
152
|
hash: string | null;
|
|
153
|
+
contentSha256: string;
|
|
154
|
+
payloadFloorApplied: boolean | null;
|
|
155
|
+
flooredFromRulesVersion: string | null;
|
|
156
|
+
flooredFromPayloadSha256: string | null;
|
|
157
|
+
payloadIntegrity: string | null;
|
|
153
158
|
}>;
|
|
154
159
|
renderedPayloadSha256: string;
|
|
155
160
|
provenance: Record<string, unknown> | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-render.d.ts","sourceRoot":"","sources":["../../src/lib/session-render.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"session-render.d.ts","sourceRoot":"","sources":["../../src/lib/session-render.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAehD,OAAO,EAGL,KAAK,0BAA0B,EAChC,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAEL,0BAA0B,EAI1B,qBAAqB,EAEtB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,uCAAuC,EACvC,6BAA6B,EAC7B,gCAAgC,EAChC,qCAAqC,EACrC,qBAAqB,EACrB,oCAAoC,GACrC,MAAM,8BAA8B,CAAC;AACtC,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AACvD,eAAO,MAAM,gCAAgC,QAAS,CAAC;AACvD,eAAO,MAAM,yBAAyB,kCAAkC,CAAC;AAEzE,eAAO,MAAM,oBAAoB,oGASvB,CAAC;AAEX,eAAO,MAAM,kCAAkC,2GAKrC,CAAC;AACX,eAAO,MAAM,mCAAmC,0JAItC,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AACtE,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,GAAG,oBAAoB,GAAG,YAAY,GAAG,uBAAuB,GAAG,mBAAmB,CAAC;AACvI,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAClF,MAAM,MAAM,4BAA4B,GAAG,uBAAuB,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;AACzG,MAAM,MAAM,uBAAuB,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC3D,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAA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,CAAC;CACrC,GAAG,kBAAkB,CAqDrB;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,kBAAkB,GAAG,iBAAiB,CA0K9E;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,wBAAwB,CAUrG;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,aAAa,CAAC,EAC3E,KAAK,SAAI,EACT,KAAK,CAAC,EAAE,uBAAuB,GAC9B,wBAAwB,CA4B1B;AAED,wBAAgB,oCAAoC,CAClD,OAAO,EAAE,MAAM,EAAE,EACjB,IAAI,EAAE,iBAAiB,GACtB,6BAA6B,CAoF/B;AA2CD,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,OAAO,EACd,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO,GAC9E,wBAAwB,EAAE,CAmB5B"}
|
package/dist/mcp/index.js
CHANGED
|
@@ -6957,7 +6957,7 @@ var init_sync_dir = __esm(() => {
|
|
|
6957
6957
|
var require_package = __commonJS((exports, module) => {
|
|
6958
6958
|
module.exports = {
|
|
6959
6959
|
name: "@hasna/instructions",
|
|
6960
|
-
version: "0.4.
|
|
6960
|
+
version: "0.4.19",
|
|
6961
6961
|
description: "AI coding agent instruction & configuration manager \u2014 store, version, apply, and share all your AI coding configs. CLI + MCP + HTTP API (instructions-serve) + generated SDK + Dashboard.",
|
|
6962
6962
|
type: "module",
|
|
6963
6963
|
main: "dist/index.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/instructions",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.19",
|
|
4
4
|
"description": "AI coding agent instruction & configuration manager \u2014 store, version, apply, and share all your AI coding configs. CLI + MCP + HTTP API (instructions-serve) + generated SDK + Dashboard.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|