blun-king-cli 9.1.563 → 9.1.565
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/agent-spine-plugin/.claude-plugin/marketplace.json +20 -20
- package/agent-spine-plugin/.claude-plugin/plugin.json +14 -14
- package/agent-spine-plugin/.codex-plugin/plugin.json +34 -34
- package/agent-spine-plugin/.mcp.json +8 -8
- package/agent-spine-plugin/CONTRIBUTING.md +52 -0
- package/agent-spine-plugin/LICENSE +186 -186
- package/agent-spine-plugin/README.md +394 -0
- package/agent-spine-plugin/SECURITY.md +47 -0
- package/agent-spine-plugin/assets/agentspine-banner.svg +32 -32
- package/agent-spine-plugin/bin/agentspine-mcp.js +4 -4
- package/agent-spine-plugin/bin/agentspine.js +7 -7
- package/agent-spine-plugin/blun.plugin.json +33 -33
- package/agent-spine-plugin/hooks/codex.json +47 -47
- package/agent-spine-plugin/hooks/hooks.json +106 -106
- package/agent-spine-plugin/hooks/version.json +5 -5
- package/agent-spine-plugin/package.json +69 -69
- package/agent-spine-plugin/scripts/check-hosts.js +199 -199
- package/agent-spine-plugin/skill/SKILL.md +76 -76
- package/agent-spine-plugin/skills/agent-spine/SKILL.md +85 -85
- package/agent-spine-plugin/src/cli.js +1488 -1442
- package/agent-spine-plugin/src/hook.js +886 -812
- package/agent-spine-plugin/src/index.js +93 -93
- package/agent-spine-plugin/src/lib/acceptance.js +333 -333
- package/agent-spine-plugin/src/lib/attention.js +755 -755
- package/agent-spine-plugin/src/lib/audit.js +351 -342
- package/agent-spine-plugin/src/lib/authentication.js +515 -515
- package/agent-spine-plugin/src/lib/briefing.js +317 -317
- package/agent-spine-plugin/src/lib/catalog.js +167 -167
- package/agent-spine-plugin/src/lib/channel-runtime.js +665 -665
- package/agent-spine-plugin/src/lib/context.js +154 -154
- package/agent-spine-plugin/src/lib/continuity.js +338 -338
- package/agent-spine-plugin/src/lib/coordination.js +577 -577
- package/agent-spine-plugin/src/lib/documents.js +217 -217
- package/agent-spine-plugin/src/lib/feed-transport.js +499 -499
- package/agent-spine-plugin/src/lib/filesystem-retry.js +32 -32
- package/agent-spine-plugin/src/lib/gateway-runtime.js +1119 -760
- package/agent-spine-plugin/src/lib/graph.js +337 -337
- package/agent-spine-plugin/src/lib/hook-audit.js +29 -0
- package/agent-spine-plugin/src/lib/https-transport.js +392 -392
- package/agent-spine-plugin/src/lib/indexed-memory-offline.js +40 -40
- package/agent-spine-plugin/src/lib/indexed-memory.js +281 -281
- package/agent-spine-plugin/src/lib/learning.js +6923 -6466
- package/agent-spine-plugin/src/lib/object-transport.js +206 -206
- package/agent-spine-plugin/src/lib/owned-file-lock.js +143 -143
- package/agent-spine-plugin/src/lib/paths.js +109 -109
- package/agent-spine-plugin/src/lib/peer-transport.js +283 -283
- package/agent-spine-plugin/src/lib/persona-runtime.js +581 -581
- package/agent-spine-plugin/src/lib/preflight.js +702 -702
- package/agent-spine-plugin/src/lib/runtime.js +13 -13
- package/agent-spine-plugin/src/lib/selfstarter.js +892 -819
- package/agent-spine-plugin/src/lib/sharing.js +969 -969
- package/agent-spine-plugin/src/lib/source-roots.js +529 -482
- package/agent-spine-plugin/src/lib/sqlite-transport.js +501 -501
- package/agent-spine-plugin/src/lib/telegram-adapter.js +119 -119
- package/agent-spine-plugin/src/lib/voice-runtime.js +39 -39
- package/agent-spine-plugin/src/mcp.js +597 -572
- package/agent-spine-plugin/src/version.js +1 -1
- package/agent-spine-plugin/src/worker.js +202 -195
- package/bin/active-steer-priority-policy.cjs +24 -0
- package/bin/launcher-runtime.js +8 -1
- package/bin/mnemo-tool-agent-policy.cjs +22 -0
- package/bin/thinking-activity-status-policy.cjs +132 -0
- package/bin/thinking-only-guard.cjs +75 -0
- package/bin/tool-call-loop-policy.cjs +53 -0
- package/bin/turn-thinking-policy.cjs +25 -1
- package/blun.mjs +554 -64
- package/package.json +4 -1
- package/standard-skills/translate-native/LICENSE +21 -21
- package/standard-skills/translate-native/references/evaluation-protocol.md +95 -95
- package/standard-skills/translate-native/references/native-orthography.md +79 -79
- package/standard-skills/translate-native/references/native-translation-standard.md +94 -94
- package/standard-skills/translate-native/references/structured-content.md +72 -72
- package/standard-skills/translate-native/references/translationese-review.md +77 -77
- package/standard-skills/translate-native/scripts/blun_language_guard.py +697 -697
- package/standard-skills/translate-native/scripts/check_diacritics.py +353 -353
- package/standard-skills/translate-native/scripts/guard_service_client.py +264 -264
- package/standard-skills/translate-native/scripts/language_gateway.py +62 -62
- package/standard-skills/translate-native/scripts/language_quality.py +377 -377
- package/standard-skills/translate-native/scripts/pre_output_guard.py +64 -64
- package/standard-skills/translate-native/scripts/translation_guard.py +916 -916
- package/standard-tools/language-guard/blun_language_guard.py +697 -697
- package/standard-tools/language-guard/check_diacritics.py +353 -353
- package/standard-tools/language-guard/guard_service_client.py +264 -264
- package/standard-tools/language-guard/language_quality.py +377 -377
- package/standard-tools/language-guard/translation_guard.py +916 -916
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""Installed-skill hook that verifies an exact current V6 release receipt."""
|
|
3
|
-
|
|
4
|
-
from __future__ import annotations
|
|
5
|
-
|
|
6
|
-
import hashlib
|
|
7
|
-
import importlib.util
|
|
8
|
-
import json
|
|
9
|
-
import os
|
|
10
|
-
import sys
|
|
11
|
-
from pathlib import Path
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
QUALITY_PATH = Path(__file__).with_name("language_quality.py")
|
|
15
|
-
SPEC = importlib.util.spec_from_file_location("blun_installed_hook_quality", QUALITY_PATH)
|
|
16
|
-
assert SPEC and SPEC.loader
|
|
17
|
-
QUALITY = importlib.util.module_from_spec(SPEC)
|
|
18
|
-
SPEC.loader.exec_module(QUALITY)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def load_verification_key(path: Path) -> bytes:
|
|
22
|
-
"""Load an existing verifier key without creating or replacing trust state."""
|
|
23
|
-
environment_key = os.environ.get("BLUN_LANGUAGE_GUARD_KEY")
|
|
24
|
-
if environment_key:
|
|
25
|
-
return hashlib.sha256(environment_key.encode("utf-8")).digest()
|
|
26
|
-
try:
|
|
27
|
-
return QUALITY.load_existing_key(path)
|
|
28
|
-
except FileNotFoundError as error:
|
|
29
|
-
raise ValueError("signing key is missing; verification fails closed") from error
|
|
30
|
-
except OSError as error:
|
|
31
|
-
raise ValueError("signing key cannot be read") from error
|
|
32
|
-
except ValueError as error:
|
|
33
|
-
if "permissions" in str(error):
|
|
34
|
-
raise ValueError("signing key permissions are broader than owner-only") from error
|
|
35
|
-
raise ValueError("signing key is invalid") from error
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
def main() -> int:
|
|
39
|
-
try:
|
|
40
|
-
request = json.loads(sys.stdin.read().lstrip("\ufeff"))
|
|
41
|
-
task_kind = request["task_kind"]
|
|
42
|
-
source = request.get("source_text", "")
|
|
43
|
-
if task_kind not in {"translation", "response"}:
|
|
44
|
-
raise ValueError("task_kind must be translation or response")
|
|
45
|
-
if task_kind == "translation" and not source.strip():
|
|
46
|
-
raise ValueError("translation receipts require source_text")
|
|
47
|
-
if task_kind == "response" and source.strip():
|
|
48
|
-
raise ValueError("response receipts cannot carry source_text")
|
|
49
|
-
key_path = Path(os.environ.get("BLUN_LANGUAGE_GUARD_KEY_FILE", Path.home() / ".config" / "blun-language-guard" / "signing.key"))
|
|
50
|
-
result = QUALITY.verify_receipt(
|
|
51
|
-
request["release_token"], source, request["target_text"],
|
|
52
|
-
request["language"], load_verification_key(key_path),
|
|
53
|
-
request.get("content_type", "prose"), request.get("short_text_reviewed") is True,
|
|
54
|
-
purpose=task_kind,
|
|
55
|
-
)
|
|
56
|
-
except (KeyError, ValueError, json.JSONDecodeError, OSError) as error:
|
|
57
|
-
print(json.dumps({"allow": False, "error": str(error)}))
|
|
58
|
-
return 1
|
|
59
|
-
print(json.dumps({"allow": result["valid"], "verification": result}))
|
|
60
|
-
return 0 if result["valid"] else 1
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
if __name__ == "__main__":
|
|
64
|
-
raise SystemExit(main())
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Installed-skill hook that verifies an exact current V6 release receipt."""
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
import hashlib
|
|
7
|
+
import importlib.util
|
|
8
|
+
import json
|
|
9
|
+
import os
|
|
10
|
+
import sys
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
QUALITY_PATH = Path(__file__).with_name("language_quality.py")
|
|
15
|
+
SPEC = importlib.util.spec_from_file_location("blun_installed_hook_quality", QUALITY_PATH)
|
|
16
|
+
assert SPEC and SPEC.loader
|
|
17
|
+
QUALITY = importlib.util.module_from_spec(SPEC)
|
|
18
|
+
SPEC.loader.exec_module(QUALITY)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def load_verification_key(path: Path) -> bytes:
|
|
22
|
+
"""Load an existing verifier key without creating or replacing trust state."""
|
|
23
|
+
environment_key = os.environ.get("BLUN_LANGUAGE_GUARD_KEY")
|
|
24
|
+
if environment_key:
|
|
25
|
+
return hashlib.sha256(environment_key.encode("utf-8")).digest()
|
|
26
|
+
try:
|
|
27
|
+
return QUALITY.load_existing_key(path)
|
|
28
|
+
except FileNotFoundError as error:
|
|
29
|
+
raise ValueError("signing key is missing; verification fails closed") from error
|
|
30
|
+
except OSError as error:
|
|
31
|
+
raise ValueError("signing key cannot be read") from error
|
|
32
|
+
except ValueError as error:
|
|
33
|
+
if "permissions" in str(error):
|
|
34
|
+
raise ValueError("signing key permissions are broader than owner-only") from error
|
|
35
|
+
raise ValueError("signing key is invalid") from error
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def main() -> int:
|
|
39
|
+
try:
|
|
40
|
+
request = json.loads(sys.stdin.read().lstrip("\ufeff"))
|
|
41
|
+
task_kind = request["task_kind"]
|
|
42
|
+
source = request.get("source_text", "")
|
|
43
|
+
if task_kind not in {"translation", "response"}:
|
|
44
|
+
raise ValueError("task_kind must be translation or response")
|
|
45
|
+
if task_kind == "translation" and not source.strip():
|
|
46
|
+
raise ValueError("translation receipts require source_text")
|
|
47
|
+
if task_kind == "response" and source.strip():
|
|
48
|
+
raise ValueError("response receipts cannot carry source_text")
|
|
49
|
+
key_path = Path(os.environ.get("BLUN_LANGUAGE_GUARD_KEY_FILE", Path.home() / ".config" / "blun-language-guard" / "signing.key"))
|
|
50
|
+
result = QUALITY.verify_receipt(
|
|
51
|
+
request["release_token"], source, request["target_text"],
|
|
52
|
+
request["language"], load_verification_key(key_path),
|
|
53
|
+
request.get("content_type", "prose"), request.get("short_text_reviewed") is True,
|
|
54
|
+
purpose=task_kind,
|
|
55
|
+
)
|
|
56
|
+
except (KeyError, ValueError, json.JSONDecodeError, OSError) as error:
|
|
57
|
+
print(json.dumps({"allow": False, "error": str(error)}))
|
|
58
|
+
return 1
|
|
59
|
+
print(json.dumps({"allow": result["valid"], "verification": result}))
|
|
60
|
+
return 0 if result["valid"] else 1
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
if __name__ == "__main__":
|
|
64
|
+
raise SystemExit(main())
|