snipara-companion 1.3.6 → 1.3.7
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/README.md +25 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +5567 -5422
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -59,6 +59,19 @@ yarn global add snipara-companion
|
|
|
59
59
|
snipara-companion
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
+
## New In 1.3.7
|
|
63
|
+
|
|
64
|
+
- Hardens `memory-guard check` with `--confirmed-by-user "<confirmation>"`
|
|
65
|
+
for explicit, auditable overrides after the user has reviewed destructive or
|
|
66
|
+
contradictory signals.
|
|
67
|
+
- Adds stable guard exit codes in strict mode: `20` for confirmation required,
|
|
68
|
+
`21` for unavailable memory/context guidance, and `22` for invalid guard
|
|
69
|
+
options.
|
|
70
|
+
- Validates destructive checks before hosted calls so vague commands such as
|
|
71
|
+
`--destructive` without `--intent` or `--command` fail fast.
|
|
72
|
+
- Extends `snipara-companion init --with-hooks` so it also installs local code
|
|
73
|
+
overlay Git hooks (`post-commit` sync and `pre-push` promotion/reindex).
|
|
74
|
+
|
|
62
75
|
## New In 1.3.6
|
|
63
76
|
|
|
64
77
|
- Adds `snipara-companion memory audit` for a read-only memory hygiene pass that
|
|
@@ -661,6 +674,11 @@ snipara-companion memory-guard check \
|
|
|
661
674
|
--intent "npm publish snipara-companion" \
|
|
662
675
|
--destructive \
|
|
663
676
|
--strict
|
|
677
|
+
snipara-companion memory-guard check \
|
|
678
|
+
--intent "npm publish snipara-companion" \
|
|
679
|
+
--destructive \
|
|
680
|
+
--strict \
|
|
681
|
+
--confirmed-by-user "User confirmed npm publish after reviewing guard output"
|
|
664
682
|
```
|
|
665
683
|
|
|
666
684
|
When memory or source context contradicts the requested action, the JSON output
|
|
@@ -668,6 +686,13 @@ sets `requiresConfirmation=true`, includes `contradictions`, and provides a
|
|
|
668
686
|
`confirmationPrompt`. In `--strict` mode the command exits non-zero until the
|
|
669
687
|
operator has explicitly confirmed the override.
|
|
670
688
|
|
|
689
|
+
Strict mode exit codes:
|
|
690
|
+
|
|
691
|
+
- `20`: confirmation is required before continuing.
|
|
692
|
+
- `21`: memory/context guidance was unavailable for a triggered guard.
|
|
693
|
+
- `22`: guard options were invalid, for example `--destructive` without a
|
|
694
|
+
specific `--intent` or `--command`.
|
|
695
|
+
|
|
671
696
|
### Commit Memory Policy
|
|
672
697
|
|
|
673
698
|
Companion separates two concepts:
|
package/dist/index.d.ts
CHANGED
|
@@ -1000,6 +1000,7 @@ interface MemoryGuardFinding {
|
|
|
1000
1000
|
code: "recent_failure" | "release_surface" | "manual" | "destructive_intent" | "contradiction";
|
|
1001
1001
|
message: string;
|
|
1002
1002
|
}
|
|
1003
|
+
type MemoryGuardBlockReason = "confirmation_required" | "guidance_unavailable";
|
|
1003
1004
|
interface MemoryGuardContradiction {
|
|
1004
1005
|
source: "memory" | "context";
|
|
1005
1006
|
reason: string;
|
|
@@ -1020,6 +1021,7 @@ interface MemoryGuardCheckOptions {
|
|
|
1020
1021
|
status?: string;
|
|
1021
1022
|
destructive?: boolean;
|
|
1022
1023
|
requireConfirmation?: boolean;
|
|
1024
|
+
confirmedByUser?: string;
|
|
1023
1025
|
strict?: boolean;
|
|
1024
1026
|
json?: boolean;
|
|
1025
1027
|
limit?: number;
|
|
@@ -1027,9 +1029,18 @@ interface MemoryGuardCheckOptions {
|
|
|
1027
1029
|
includeContext?: boolean;
|
|
1028
1030
|
recentFailures?: boolean;
|
|
1029
1031
|
}
|
|
1032
|
+
interface MemoryGuardConfirmation {
|
|
1033
|
+
required: boolean;
|
|
1034
|
+
confirmed: boolean;
|
|
1035
|
+
note?: string;
|
|
1036
|
+
overridesDestructive: boolean;
|
|
1037
|
+
overridesContradictions: boolean;
|
|
1038
|
+
}
|
|
1030
1039
|
interface MemoryGuardCheckResult {
|
|
1031
1040
|
triggered: boolean;
|
|
1032
1041
|
shouldBlock: boolean;
|
|
1042
|
+
blockReason?: MemoryGuardBlockReason;
|
|
1043
|
+
exitCode: number;
|
|
1033
1044
|
trigger: MemoryGuardTrigger;
|
|
1034
1045
|
findings: MemoryGuardFinding[];
|
|
1035
1046
|
files: string[];
|
|
@@ -1047,6 +1058,7 @@ interface MemoryGuardCheckResult {
|
|
|
1047
1058
|
destructive: boolean;
|
|
1048
1059
|
contradictions: MemoryGuardContradiction[];
|
|
1049
1060
|
requiresConfirmation: boolean;
|
|
1061
|
+
confirmation: MemoryGuardConfirmation;
|
|
1050
1062
|
confirmationPrompt?: string;
|
|
1051
1063
|
memoryAvailable: boolean;
|
|
1052
1064
|
contextAvailable: boolean;
|