blun-king-cli 9.1.587 → 9.1.588
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/CHANGELOG.md +11 -185
- package/LIESMICH.txt +51 -13
- package/README.md +44 -47
- package/agent-spine-plugin/.codex-plugin/plugin.json +16 -4
- package/agent-spine-plugin/CHANGELOG.md +37 -5
- package/agent-spine-plugin/README.md +3 -3
- package/agent-spine-plugin/blun.plugin.json +45 -10
- package/agent-spine-plugin/docs/artifact-evaluation.md +93 -0
- package/agent-spine-plugin/docs/host-integration.md +42 -27
- package/agent-spine-plugin/docs/preflight-recall.md +4 -2
- package/agent-spine-plugin/docs/session-timeline.md +97 -236
- package/agent-spine-plugin/docs/world-model.md +25 -0
- package/agent-spine-plugin/hooks/codex.json +1 -1
- package/agent-spine-plugin/hooks/hooks.json +1 -1
- package/agent-spine-plugin/package.json +1 -3
- package/agent-spine-plugin/scripts/check-hosts.js +3 -3
- package/agent-spine-plugin/scripts/release-check.js +10 -5
- package/agent-spine-plugin/scripts/run-checks.js +4 -1
- package/agent-spine-plugin/scripts/run-tests-hermetic.js +32 -6
- package/agent-spine-plugin/src/cli-learning.js +15 -0
- package/agent-spine-plugin/src/cli.js +2 -0
- package/agent-spine-plugin/src/hook.js +32 -32
- package/agent-spine-plugin/src/lib/action-lesson-recall.js +73 -8
- package/agent-spine-plugin/src/lib/briefing.js +146 -36
- package/agent-spine-plugin/src/lib/channel-continuity.js +19 -0
- package/agent-spine-plugin/src/lib/delivery-agent-usage.js +14 -7
- package/agent-spine-plugin/src/lib/gateway-group-response.js +128 -0
- package/agent-spine-plugin/src/lib/gateway-runs.js +24 -15
- package/agent-spine-plugin/src/lib/hook-briefing-use.js +13 -3
- package/agent-spine-plugin/src/lib/hook-context.js +16 -3
- package/agent-spine-plugin/src/lib/hook-output.js +129 -5
- package/agent-spine-plugin/src/lib/hook-timeline.js +5 -3
- package/agent-spine-plugin/src/lib/indexed-memory.js +2 -2
- package/agent-spine-plugin/src/lib/learning-artifact-evaluator.js +114 -0
- package/agent-spine-plugin/src/lib/learning-context.js +11 -4
- package/agent-spine-plugin/src/lib/learning-measurements.js +2 -2
- package/agent-spine-plugin/src/lib/mcp-runtime.js +89 -3
- package/agent-spine-plugin/src/lib/mcp-source-context.js +12 -2
- package/agent-spine-plugin/src/lib/mcp-timeline-tools.js +91 -8
- package/agent-spine-plugin/src/lib/mcp-world-tools.js +2 -2
- package/agent-spine-plugin/src/lib/owned-file-lock.js +20 -1
- package/agent-spine-plugin/src/lib/persona-runtime.js +2 -2
- package/agent-spine-plugin/src/lib/preflight-delivery-id.js +27 -0
- package/agent-spine-plugin/src/lib/preflight.js +4 -4
- package/agent-spine-plugin/src/lib/session-timeline-codex.js +15 -0
- package/agent-spine-plugin/src/lib/session-timeline-contract.js +12 -4
- package/agent-spine-plugin/src/lib/session-timeline-event-extract.js +36 -7
- package/agent-spine-plugin/src/lib/session-timeline-host-origin.js +13 -10
- package/agent-spine-plugin/src/lib/session-timeline-invocation.js +1 -1
- package/agent-spine-plugin/src/lib/session-timeline-king.js +14 -0
- package/agent-spine-plugin/src/lib/session-timeline-prior.js +18 -12
- package/agent-spine-plugin/src/lib/session-timeline-provider.js +5 -0
- package/agent-spine-plugin/src/lib/session-timeline-query.js +2 -0
- package/agent-spine-plugin/src/lib/session-timeline-results.js +35 -10
- package/agent-spine-plugin/src/lib/session-timeline-source-open.js +30 -0
- package/agent-spine-plugin/src/lib/session-timeline.js +122 -75
- package/agent-spine-plugin/src/lib/source-roots.js +3 -2
- package/agent-spine-plugin/src/lib/task-knowledge-context.js +22 -1
- package/agent-spine-plugin/src/lib/timeline-continuation-update.js +100 -0
- package/agent-spine-plugin/src/lib/timeline-tool-guard.js +30 -7
- package/agent-spine-plugin/src/lib/timeline-user-feedback.js +217 -0
- package/agent-spine-plugin/src/lib/timeline-world-capture.js +233 -0
- package/agent-spine-plugin/src/lib/world-knowledge.js +59 -2
- package/agent-spine-plugin/src/lib/world-model.js +64 -9
- package/agent-spine-plugin/src/worker.js +13 -1
- package/bin/blun.js +43 -28
- package/bin/core-bootstrap.js +5 -4
- package/bin/king.js +43 -28
- package/bin/launcher-mode.js +1 -10
- package/bin/launcher-runtime.js +128 -295
- package/bin/managed-node.js +0 -0
- package/bin/managed-plugin-selection.cjs +0 -1
- package/bin/native-module-repair.js +0 -0
- package/bin/node-runtime.js +0 -0
- package/bin/node-version.js +0 -0
- package/bin/plugin-bootstrap.js +56 -120
- package/bin/private-paths.js +11 -34
- package/bin/standard-tools-bootstrap.js +34 -114
- package/bin/turn-thinking-policy.cjs +3 -11
- package/bin/update-copy.js +200 -0
- package/bin/update-lease.js +0 -0
- package/bin/update-notice.js +136 -289
- package/bin/verify-agent-behavior.cjs +122 -0
- package/bin/verify-agent-components.cjs +104 -0
- package/bin/verify-bundled-agent-sources.cjs +57 -0
- package/blun.mjs +143076 -135288
- package/bundled-agent-sources.json +701 -0
- package/package.json +12 -15
- package/standard-skills/translate-native/README.md +1293 -0
- package/standard-skills/translate-native/SKILL.md +172 -22
- package/standard-skills/translate-native/VERSION +1 -1
- package/standard-skills/translate-native/agents/openai.yaml +18 -0
- package/standard-skills/translate-native/assets/icon.svg +8 -0
- package/standard-skills/translate-native/docs/BLUN_CODE_INTEGRATION.md +76 -0
- package/standard-skills/translate-native/docs/PREMORTEM.md +489 -0
- package/standard-skills/translate-native/docs/WEBSITE_LOCALIZATION.md +2035 -0
- package/standard-skills/translate-native/docs/WEBSITE_LOCALIZATION_API.md +1302 -0
- package/standard-skills/translate-native/docs/WEBSITE_LOCALIZATION_EVIDENCE_HTTP.md +136 -0
- package/standard-skills/translate-native/docs/WEBSITE_LOCALIZATION_HEALTH_HTTP.md +130 -0
- package/standard-skills/translate-native/docs/WEBSITE_LOCALIZATION_HTTP_PROVIDER.md +175 -0
- package/standard-skills/translate-native/docs/WEBSITE_LOCALIZATION_RECEIPT_VERIFIER_HTTP.md +86 -0
- package/standard-skills/translate-native/integrations/AGENT_RULES.md +32 -0
- package/standard-skills/translate-native/integrations/adapters/blun-code-language-guard.js +514 -0
- package/standard-skills/translate-native/integrations/adapters/node-language-guard.js +230 -0
- package/standard-skills/translate-native/integrations/audit_log.py +327 -0
- package/standard-skills/translate-native/integrations/claude_language_hook.js +1536 -0
- package/standard-skills/translate-native/integrations/commercial_localization_profile.py +42 -0
- package/standard-skills/translate-native/integrations/delivery-policy.example.json +28 -0
- package/standard-skills/translate-native/integrations/enforced_delivery.py +543 -0
- package/standard-skills/translate-native/integrations/guard_service.py +435 -0
- package/standard-skills/translate-native/integrations/language_gateway.py +67 -0
- package/standard-skills/translate-native/integrations/mcp_auth_headers.py +198 -0
- package/standard-skills/translate-native/integrations/mcp_http_gateway.py +429 -0
- package/standard-skills/translate-native/integrations/non_language_html_entities.js +1485 -0
- package/standard-skills/translate-native/integrations/pre_output_guard.py +65 -0
- package/standard-skills/translate-native/integrations/task_router.py +101 -0
- package/standard-skills/translate-native/integrations/website_localization.py +401 -0
- package/standard-skills/translate-native/integrations/website_localization_api.py +581 -0
- package/standard-skills/translate-native/integrations/website_localization_benchmark.py +1885 -0
- package/standard-skills/translate-native/integrations/website_localization_benchmark_campaign.py +1772 -0
- package/standard-skills/translate-native/integrations/website_localization_benchmark_candidate.py +506 -0
- package/standard-skills/translate-native/integrations/website_localization_benchmark_http.py +400 -0
- package/standard-skills/translate-native/integrations/website_localization_benchmark_review_store.py +781 -0
- package/standard-skills/translate-native/integrations/website_localization_benchmark_reviewer_http.py +500 -0
- package/standard-skills/translate-native/integrations/website_localization_benchmark_runtime.py +1107 -0
- package/standard-skills/translate-native/integrations/website_localization_benchmark_suite.py +463 -0
- package/standard-skills/translate-native/integrations/website_localization_cms.py +2835 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_client.py +875 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_dispatch.py +805 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_http.py +588 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_lifecycle_monitor.py +991 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_receiver.py +1441 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_receiver_runtime.py +414 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_receiver_store.py +1073 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_removal_dispatch.py +865 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_source_client.py +583 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_source_delivery.py +964 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_source_delivery_runtime.py +665 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_source_http.py +1153 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_source_runtime.py +675 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_source_service.py +1125 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_terminal_notification.py +674 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_terminal_notification_http.py +444 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_terminal_notification_receiver.py +1469 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_terminal_notification_receiver_runtime.py +1142 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_terminal_processing_monitor.py +634 -0
- package/standard-skills/translate-native/integrations/website_localization_cms_terminal_receiver_client.py +804 -0
- package/standard-skills/translate-native/integrations/website_localization_deepl_baseline.py +922 -0
- package/standard-skills/translate-native/integrations/website_localization_evidence_http.py +482 -0
- package/standard-skills/translate-native/integrations/website_localization_health.py +1541 -0
- package/standard-skills/translate-native/integrations/website_localization_health_http.py +372 -0
- package/standard-skills/translate-native/integrations/website_localization_http_provider.py +297 -0
- package/standard-skills/translate-native/integrations/website_localization_native_reference_http.py +479 -0
- package/standard-skills/translate-native/integrations/website_localization_native_reference_intake.py +363 -0
- package/standard-skills/translate-native/integrations/website_localization_native_reference_queue.py +1449 -0
- package/standard-skills/translate-native/integrations/website_localization_native_reference_store.py +420 -0
- package/standard-skills/translate-native/integrations/website_localization_quality_profiles.py +235 -0
- package/standard-skills/translate-native/integrations/website_localization_queue.py +671 -0
- package/standard-skills/translate-native/integrations/website_localization_receipt_verifier_http.py +516 -0
- package/standard-skills/translate-native/integrations/website_localization_release.py +928 -0
- package/standard-skills/translate-native/integrations/website_localization_release_coordinator.py +1008 -0
- package/standard-skills/translate-native/integrations/website_localization_runner.py +276 -0
- package/standard-skills/translate-native/integrations/website_localization_runtime.py +862 -0
- package/standard-skills/translate-native/integrations/website_localization_service.py +350 -0
- package/standard-skills/translate-native/integrations/website_localization_supervisor.py +511 -0
- package/standard-skills/translate-native/integrations/website_localization_worker.py +663 -0
- package/standard-skills/translate-native/provenance.json +3 -4
- package/standard-skills/translate-native/references/commercial-localization.md +177 -0
- package/standard-skills/translate-native/scripts/blun_language_guard.py +7 -1
- package/standard-skills/translate-native/scripts/check_commercial_review.py +80 -0
- package/standard-skills/translate-native/scripts/commercial_localization_profile.py +333 -0
- package/standard-tools/language-guard/LICENSE +21 -0
- package/standard-tools/language-guard/VERSION +1 -0
- package/standard-tools/language-guard/blun_language_guard.py +7 -1
- package/standard-tools/language-guard/check_commercial_review.py +80 -0
- package/standard-tools/language-guard/commercial_localization_profile.py +333 -0
- package/standard-tools/language-guard/language_gateway.py +62 -0
- package/standard-tools/language-guard/pre_output_guard.py +64 -0
- package/standard-tools/language-guard/provenance.json +4 -11
- package/standard-tools/manifest.json +34 -11
- package/telegram-plugin/commands/access.md +2 -10
- package/telegram-plugin/dist/bridge.mjs +64041 -687
- package/telegram-plugin/dist/mcp-server.mjs +72810 -9027
- package/telegram-plugin/dist/noise.mjs +28 -63511
- package/agent-spine-plugin/CONTRIBUTING.md +0 -52
- package/agent-spine-plugin/SECURITY.md +0 -47
- package/agent-spine-plugin/docs/assignment-continuation.md +0 -48
- package/agent-spine-plugin/docs/releasing.md +0 -85
- package/agent-spine-plugin/docs/structured-completion.md +0 -67
- package/bin/abort-listener-policy.cjs +0 -43
- package/bin/active-steer-priority-policy.cjs +0 -24
- package/bin/agent-api-http-adapter.mjs +0 -446
- package/bin/agent-api-private-http-server.mjs +0 -288
- package/bin/agent-api-runtime.mjs +0 -252
- package/bin/agent-api-service-environment.mjs +0 -236
- package/bin/agent-api-service-host.mjs +0 -209
- package/bin/agent-api-service-process.mjs +0 -171
- package/bin/agent-api-session-registry.mjs +0 -428
- package/bin/agent-api-tool-broker.cjs +0 -248
- package/bin/agent-api-turn-controller.mjs +0 -461
- package/bin/agent-api-usage-journal.cjs +0 -259
- package/bin/agent-resume-snapshot.cjs +0 -241
- package/bin/agentspine-king-goal-inbox.mjs +0 -111
- package/bin/agentspine-king-goal-intake.mjs +0 -106
- package/bin/approval-rejection-stop.cjs +0 -15
- package/bin/assistant-message-offload-policy.cjs +0 -284
- package/bin/baseline-skill-performance-policy.cjs +0 -39
- package/bin/bash-search-scope-policy.cjs +0 -49
- package/bin/codebase-search-runtime.cjs +0 -23
- package/bin/cognitive-action-checkpoint.cjs +0 -1104
- package/bin/cognitive-attention-delivery.cjs +0 -76
- package/bin/cognitive-attention-policy.cjs +0 -143
- package/bin/cognitive-attention-runtime.cjs +0 -91
- package/bin/cognitive-context-projection.cjs +0 -73
- package/bin/cognitive-cross-portal-acceptance.cjs +0 -443
- package/bin/cognitive-effective-view.cjs +0 -77
- package/bin/cognitive-focus-projection.cjs +0 -206
- package/bin/cognitive-focus-scope.cjs +0 -37
- package/bin/cognitive-goal-autostart-policy.cjs +0 -72
- package/bin/cognitive-goal-time-trigger-controller.cjs +0 -146
- package/bin/cognitive-memory-adapter.cjs +0 -282
- package/bin/cognitive-memory-command.cjs +0 -293
- package/bin/cognitive-memory-provider.cjs +0 -92
- package/bin/cognitive-salience-policy.cjs +0 -159
- package/bin/cognitive-state-store.cjs +0 -508
- package/bin/cognitive-turn-lifecycle.cjs +0 -624
- package/bin/cognitive-work-focus.cjs +0 -180
- package/bin/compaction-history-archive.cjs +0 -166
- package/bin/compaction-history-startup.cjs +0 -50
- package/bin/compaction-model-policy.cjs +0 -31
- package/bin/compaction-stage-policy.cjs +0 -21
- package/bin/compaction-transaction-policy.cjs +0 -122
- package/bin/config-write-dedup-policy.cjs +0 -27
- package/bin/context-budget-ledger.cjs +0 -31
- package/bin/context-doctor-policy.cjs +0 -70
- package/bin/context-insight-policy.cjs +0 -36
- package/bin/context-performance-policy.cjs +0 -19
- package/bin/context-pressure-policy.cjs +0 -20
- package/bin/cron-run-output.cjs +0 -45
- package/bin/cron-run-store.cjs +0 -145
- package/bin/curiosity-scout-policy.cjs +0 -49
- package/bin/default-model-output-budget-policy.cjs +0 -28
- package/bin/durable-task-resume-policy.cjs +0 -130
- package/bin/durable-task-resume-runtime.cjs +0 -117
- package/bin/durable-task-resume-store.cjs +0 -88
- package/bin/editable-tool-approval-policy.cjs +0 -540
- package/bin/editable-tool-approval-runtime.cjs +0 -99
- package/bin/effective-system-prompt-cache-policy.cjs +0 -33
- package/bin/error-memory-performance-policy.cjs +0 -113
- package/bin/file-observation-policy.cjs +0 -133
- package/bin/foreground-output-capture-policy.cjs +0 -41
- package/bin/generated-source-health.cjs +0 -142
- package/bin/glob-pattern-policy.cjs +0 -13
- package/bin/goal-completion-evidence-policy.cjs +0 -120
- package/bin/grep-output-limit-policy.cjs +0 -39
- package/bin/historical-media-projection-policy.cjs +0 -48
- package/bin/history-offload-pressure-policy.cjs +0 -33
- package/bin/html-to-research-markdown.cjs +0 -147
- package/bin/identity-context-policy.cjs +0 -764
- package/bin/identity-journal-policy.cjs +0 -107
- package/bin/input-draft-persistence.cjs +0 -77
- package/bin/king-tui-function-contract.json +0 -33
- package/bin/launcher-restart-policy.cjs +0 -150
- package/bin/live-response-repetition-guard.cjs +0 -196
- package/bin/llm-config-log-dedup-policy.cjs +0 -76
- package/bin/loop-event-record-policy.cjs +0 -174
- package/bin/managed-context-startup-policy.cjs +0 -27
- package/bin/media-activity-layout-policy.cjs +0 -34
- package/bin/media-auto-retrieval-policy.cjs +0 -90
- package/bin/media-result-policy.cjs +0 -59
- package/bin/micro-compaction-policy.cjs +0 -145
- package/bin/mistake-relevance-policy.cjs +0 -319
- package/bin/model-retry-progress-policy.cjs +0 -46
- package/bin/native-large-file-io.cjs +0 -42
- package/bin/native-runtime-cache.cjs +0 -76
- package/bin/natural-presence-policy.cjs +0 -28
- package/bin/noninteractive-shell-env-policy.cjs +0 -19
- package/bin/observer-hooks.cjs +0 -14
- package/bin/outbound-claim-provenance.cjs +0 -150
- package/bin/oversized-context-offload-policy.cjs +0 -86
- package/bin/pending-media-policy.cjs +0 -182
- package/bin/pending-token-estimate-policy.cjs +0 -41
- package/bin/personal-memory-consent-policy.cjs +0 -72
- package/bin/personal-memory-performance-policy.cjs +0 -12
- package/bin/personality-choice-policy.cjs +0 -101
- package/bin/personality-memory-adapter.cjs +0 -379
- package/bin/personality-mode.cjs +0 -46
- package/bin/personality-setup-policy.cjs +0 -197
- package/bin/proactive-compaction-policy.cjs +0 -25
- package/bin/profile-identity-resolution.cjs +0 -136
- package/bin/profile-runtime.cjs +0 -318
- package/bin/profile-tool-exclusion-policy.cjs +0 -37
- package/bin/programmatic-context-isolation.cjs +0 -25
- package/bin/programmatic-tool-runtime.mjs +0 -627
- package/bin/provider-idle-timeout-policy.cjs +0 -14
- package/bin/provider-model-refresh-deadline.cjs +0 -53
- package/bin/provider-model-refresh-policy.cjs +0 -107
- package/bin/rate-limit-recovery-policy.cjs +0 -47
- package/bin/read-batch-policy.cjs +0 -32
- package/bin/read-continuation-policy.cjs +0 -59
- package/bin/recurring-cron-history-policy.cjs +0 -124
- package/bin/relationship-continuity-policy.cjs +0 -143
- package/bin/relationship-curiosity-policy.cjs +0 -107
- package/bin/relationship-learning-policy.cjs +0 -168
- package/bin/release-artifact-freeze-policy.cjs +0 -30
- package/bin/reload-plugin-bootstrap.cjs +0 -18
- package/bin/reload-queue-policy.cjs +0 -38
- package/bin/repeated-assistant-response-policy.cjs +0 -232
- package/bin/repeated-injection-projection.cjs +0 -107
- package/bin/repeated-user-message-projection.cjs +0 -8
- package/bin/research-page-result.cjs +0 -74
- package/bin/retry-checkpoint-policy.cjs +0 -13
- package/bin/runtime-exit-ledger.cjs +0 -144
- package/bin/scoped-cron-run-policy.cjs +0 -358
- package/bin/session-checkpoint-policy.cjs +0 -25
- package/bin/session-compaction-policy.cjs +0 -84
- package/bin/session-replay-policy.cjs +0 -20
- package/bin/session-replay-window-policy.cjs +0 -40
- package/bin/session-resume-checkpoint.cjs +0 -254
- package/bin/session-scrollback-archive.cjs +0 -229
- package/bin/skill-activation-performance-policy.cjs +0 -69
- package/bin/skill-listing-performance-policy.cjs +0 -92
- package/bin/soul-organization-policy.cjs +0 -78
- package/bin/soul-preservation-policy.cjs +0 -20
- package/bin/startup-preferences.cjs +0 -131
- package/bin/streaming-flush-performance-policy.cjs +0 -28
- package/bin/structured-agent-swarm-output.cjs +0 -325
- package/bin/structured-subagent-output.cjs +0 -252
- package/bin/subagent-context-fork-policy.cjs +0 -155
- package/bin/subagent-max-tokens-handoff-policy.cjs +0 -69
- package/bin/subagent-parent-responsiveness.cjs +0 -19
- package/bin/subagent-skill-policy.cjs +0 -206
- package/bin/subagent-timeout-policy.cjs +0 -182
- package/bin/subagent-tool-policy.cjs +0 -60
- package/bin/subagent-usage-rollup-policy.cjs +0 -29
- package/bin/system-prompt-context-policy.cjs +0 -124
- package/bin/system-prompt-token-cache-policy.cjs +0 -60
- package/bin/telegram-addressed-focus.cjs +0 -55
- package/bin/telegram-addressed-priority.cjs +0 -12
- package/bin/telegram-approval-relay.cjs +0 -290
- package/bin/telegram-bot-priority.cjs +0 -17
- package/bin/telegram-console-status-policy.cjs +0 -174
- package/bin/telegram-context-projection-policy.cjs +0 -141
- package/bin/telegram-delivery-lifecycle.cjs +0 -125
- package/bin/telegram-direct-focus-policy.cjs +0 -273
- package/bin/telegram-mcp-compatibility.cjs +0 -49
- package/bin/telegram-media-delivery-policy.cjs +0 -42
- package/bin/telegram-private-conversation-policy.cjs +0 -185
- package/bin/telegram-queue-handoff-policy.cjs +0 -73
- package/bin/telegram-remote-status-policy.cjs +0 -120
- package/bin/telegram-session-queue-runtime.mjs +0 -306
- package/bin/telegram-text-chunk-policy.cjs +0 -63
- package/bin/telegram-truncated-reply-policy.cjs +0 -37
- package/bin/telegram-urgent-policy.cjs +0 -45
- package/bin/telemetry-spool-policy.cjs +0 -57
- package/bin/thinking-activity-status-policy.cjs +0 -132
- package/bin/thinking-only-guard.cjs +0 -80
- package/bin/todo-list-turn-policy.cjs +0 -131
- package/bin/tool-call-loop-policy.cjs +0 -51
- package/bin/tool-file-persistence.cjs +0 -141
- package/bin/tool-result-offload-policy.cjs +0 -359
- package/bin/tool-result-offload-telemetry.cjs +0 -12
- package/bin/tool-schema-token-cache-policy.cjs +0 -41
- package/bin/tool-stream-preview-policy.cjs +0 -9
- package/bin/tui-functional-contract.cjs +0 -55
- package/bin/turn-tool-performance-policy.cjs +0 -486
- package/bin/usage-cache-efficiency-policy.cjs +0 -26
- package/bin/user-home-path-policy.cjs +0 -13
- package/bin/user-message-offload-policy.cjs +0 -103
- package/bin/user-prompt-hook-origin-policy.cjs +0 -34
- package/bin/user-tool-record-policy.cjs +0 -7
- package/bin/validated-learning-insight-policy.cjs +0 -58
- package/bin/validated-learning-outcome-trace.cjs +0 -107
- package/bin/validated-learning-performance-policy.cjs +0 -53
- package/bin/validated-learning-signal.cjs +0 -463
- package/bin/windows-bash-dialect-policy.cjs +0 -25
- package/bin/windows-node-crash-dump.cjs +0 -110
- package/bin/write-continuation-policy.cjs +0 -69
- package/codebase-index/README.md +0 -82
- package/codebase-index/codebase_index.py +0 -470
- package/standard-skills/agent-browser/SKILL.md +0 -19
- package/standard-skills/agent-browser/references/runtime.md +0 -8
- package/standard-skills/blun-session-inspector/SKILL.md +0 -41
- package/standard-skills/blun-session-inspector/scripts/inspect-session.cjs +0 -437
- package/standard-skills/design-taste-frontend/SKILL.md +0 -1206
- package/standard-skills/full-output-enforcement/SKILL.md +0 -49
- package/standard-skills/high-end-visual-design/SKILL.md +0 -98
- package/standard-skills/image-to-code/SKILL.md +0 -1228
- package/standard-skills/industrial-brutalist-ui/SKILL.md +0 -92
- package/standard-skills/minimalist-ui/SKILL.md +0 -85
- package/standard-skills/motion-design-taste/SKILL.md +0 -74
- package/standard-skills/playwright-testing/SKILL.md +0 -19
- package/standard-skills/playwright-testing/references/runtime.md +0 -7
- package/standard-skills/premortem/SKILL.md +0 -148
- package/standard-skills/redesign-existing-projects/SKILL.md +0 -178
- package/standard-skills/research-evidence/SKILL.md +0 -39
- package/standard-skills/research-evidence/references/evidence-format.md +0 -104
- package/standard-skills/research-evidence/scripts/evidence-collection.cjs +0 -260
- package/standard-skills/research-evidence/scripts/score-report.cjs +0 -130
- package/standard-skills/screenshot-lesen/SKILL.md +0 -52
- package/standard-skills/stitch-design-taste/DESIGN.md +0 -121
- package/standard-skills/stitch-design-taste/SKILL.md +0 -184
- package/standard-skills/telegram-channel/SKILL.md +0 -18
- package/standard-skills/telegram-channel/references/runtime.md +0 -7
- package/standard-skills/venture-flywheel/SKILL.md +0 -32
- package/standard-skills/venture-flywheel/identity/project-identity.cjs +0 -146
- package/standard-skills/venture-flywheel/policy/capability-engine.cjs +0 -114
- package/standard-skills/venture-flywheel/policy/repository-trust.cjs +0 -229
- package/standard-skills/venture-flywheel/references/BEISPIELE-phase0.md +0 -146
- package/standard-skills/venture-flywheel/references/CAPABILITY-MAP.md +0 -34
- package/standard-skills/venture-flywheel/references/SPEC-phase0-identity-trust.md +0 -77
- package/standard-skills/venture-flywheel/references/SPEC-phase0-state-events.md +0 -93
- package/standard-skills/venture-flywheel/schemas/capability-decision.schema.json +0 -13
- package/standard-skills/venture-flywheel/schemas/execution-event.schema.json +0 -44
- package/standard-skills/venture-flywheel/schemas/project-identity.schema.json +0 -32
- package/standard-skills/venture-flywheel/schemas/repository-trust.schema.json +0 -57
- package/standard-skills/venture-flywheel/schemas/run-transition.schema.json +0 -59
- package/standard-skills/venture-flywheel/state/execution-event.cjs +0 -191
- package/standard-skills/venture-flywheel/state/task-state-machine.cjs +0 -190
- package/standard-skills/web-lesen/SKILL.md +0 -73
- package/standard-skills/web-lesen/scripts/crawl_public.py +0 -379
- package/standard-skills/windows-mcp/SKILL.md +0 -19
- package/standard-skills/windows-mcp/references/runtime.md +0 -9
- package/telegram-plugin/DELIVERY.md +0 -36
- package/telegram-plugin/bin/telegram-approval-relay.cjs +0 -290
- package/telegram-plugin/bin/telegram-console-status-policy.cjs +0 -175
- package/telegram-plugin/bin/telegram-delivery-lifecycle.cjs +0 -125
- package/telegram-plugin/bin/telegram-direct-reply-policy.cjs +0 -48
- package/telegram-plugin/bin/telegram-launcher-status-queue.cjs +0 -122
- package/telegram-plugin/bin/telegram-private-conversation-policy.cjs +0 -186
- package/telegram-plugin/bin/telegram-remote-status-policy.cjs +0 -121
- package/telegram-plugin/bin/telegram-reply-parts.cjs +0 -149
- package/telegram-plugin/bin/telegram-text-chunk-policy.cjs +0 -63
- package/telegram-plugin/bin/telegram-typing-keepalive.cjs +0 -89
- package/telegram-plugin/compat/mcp-server-fa511cd1.mjs +0 -73825
- /package/{bin → scripts}/fix-node-pty-perms.js +0 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Website localization quality-evidence HTTP contract
|
|
2
|
+
|
|
3
|
+
`integrations/website_localization_evidence_http.py` connects the production
|
|
4
|
+
release coordinator to a host-owned quality service without choosing a model,
|
|
5
|
+
review vendor, or credential format. It performs exactly one HTTP attempt for
|
|
6
|
+
one already leased locale-evidence job. The durable
|
|
7
|
+
`QualityEvidenceStateStore` remains the only retry and crash-recovery owner.
|
|
8
|
+
|
|
9
|
+
Transport conformance proves request integrity and fail-closed behavior. It
|
|
10
|
+
does not prove that a translation is native, publishable, or better than an
|
|
11
|
+
external baseline.
|
|
12
|
+
|
|
13
|
+
## Host configuration
|
|
14
|
+
|
|
15
|
+
Construct `HTTPEvidenceProviderAdapter` with:
|
|
16
|
+
|
|
17
|
+
- one fixed HTTPS endpoint;
|
|
18
|
+
- a callback returning authentication headers at call time;
|
|
19
|
+
- an optional host transport and timeout;
|
|
20
|
+
- `allow_loopback_http=True` only for an explicit `localhost`, `127.0.0.1`, or
|
|
21
|
+
`::1` development endpoint.
|
|
22
|
+
|
|
23
|
+
The endpoint cannot contain user information, a query, or a fragment.
|
|
24
|
+
Redirects are never followed, so credentials cannot be forwarded to another
|
|
25
|
+
origin. Authentication values must be ASCII control-free strings. The host
|
|
26
|
+
cannot override `Host`, framing, content, idempotency, or binding headers.
|
|
27
|
+
Neither credentials nor remote response prose appears in adapter errors.
|
|
28
|
+
|
|
29
|
+
## Request
|
|
30
|
+
|
|
31
|
+
The adapter accepts only the coordinator's exact immutable
|
|
32
|
+
`blun.localization-quality-evidence-request.v5` object. It validates the
|
|
33
|
+
complete field set, request ID, SHA-256 values, locale profile, model identity,
|
|
34
|
+
confidence decisions, optional commercial profile and its exact content-free
|
|
35
|
+
targeted-review summary, UTF-8 size, Unicode NFC, and the source and target text
|
|
36
|
+
hashes before authentication or transport.
|
|
37
|
+
|
|
38
|
+
It sends one canonical UTF-8 JSON document:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"schema": "blun.localization-quality-evidence-http-request.v1",
|
|
43
|
+
"request_id": "blun-l10n-evidence-<64 lowercase hexadecimal characters>",
|
|
44
|
+
"request_sha256": "<SHA-256 of the canonical inner request>",
|
|
45
|
+
"request": {
|
|
46
|
+
"schema": "blun.localization-quality-evidence-request.v5",
|
|
47
|
+
"request_id": "<same request ID>",
|
|
48
|
+
"source_locale": "en-IE",
|
|
49
|
+
"target_locale": "fi-FI",
|
|
50
|
+
"source_text": "<complete source>",
|
|
51
|
+
"target_text": "<complete candidate>",
|
|
52
|
+
"result_sha256": "<validated durable worker-result hash>",
|
|
53
|
+
"source_sha256": "<source-text hash>",
|
|
54
|
+
"target_sha256": "<target-text hash>",
|
|
55
|
+
"content_type": "headline",
|
|
56
|
+
"quality_profile": {
|
|
57
|
+
"locale": "fi-FI",
|
|
58
|
+
"version": "<locale profile version>",
|
|
59
|
+
"sha256": "<locale profile hash>"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The abbreviated example omits other required inner fields for readability.
|
|
66
|
+
Production requests always contain exactly the full v5 field set. Commercial
|
|
67
|
+
requests include `commercial_profile` and the matching `commercial_review`
|
|
68
|
+
summary; non-commercial requests require both fields to be `null`. Source and
|
|
69
|
+
target text are intentionally present because this external step verifies the
|
|
70
|
+
existing source-blind native review and the separate source-aware fidelity
|
|
71
|
+
review. The service must preserve their confidentiality.
|
|
72
|
+
|
|
73
|
+
The adapter adds:
|
|
74
|
+
|
|
75
|
+
```text
|
|
76
|
+
Content-Type: application/json; charset=utf-8
|
|
77
|
+
Accept: application/json
|
|
78
|
+
Idempotency-Key: <request_id>
|
|
79
|
+
X-Localization-Evidence-Request-Id: <request_id>
|
|
80
|
+
X-Localization-Evidence-Request-Sha256: <request_sha256>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The receiver must treat the idempotency key and canonical request digest as one
|
|
84
|
+
immutable operation. Reusing the ID for different bytes must fail closed.
|
|
85
|
+
|
|
86
|
+
## Response
|
|
87
|
+
|
|
88
|
+
A successful service returns HTTP 200, JSON content type, and exactly:
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"schema": "blun.localization-quality-evidence-http-response.v1",
|
|
93
|
+
"request_id": "<same request ID>",
|
|
94
|
+
"request_sha256": "<same canonical request hash>",
|
|
95
|
+
"result_sha256": "<same validated worker-result hash>",
|
|
96
|
+
"evidence": {
|
|
97
|
+
"schema": "blun.localization-quality-evidence-response.v2",
|
|
98
|
+
"request_id": "<same request ID>",
|
|
99
|
+
"result_sha256": "<same validated worker-result hash>",
|
|
100
|
+
"quality_receipt": "<host-verifiable purpose-bound receipt>",
|
|
101
|
+
"human_review_receipt": null,
|
|
102
|
+
"independent_model_review": null
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The adapter rejects extra or missing fields, duplicate JSON keys, non-finite
|
|
108
|
+
numbers, a UTF-8 byte-order mark, wrong bindings, ambiguous content types,
|
|
109
|
+
incorrect lengths, and oversized bodies. The release coordinator then applies
|
|
110
|
+
its existing independent receipt checks. Each opaque receipt must verify
|
|
111
|
+
against the complete canonical
|
|
112
|
+
`blun.localization-quality-receipt-binding.v2` object supplied by the release
|
|
113
|
+
coordinator, including the review purpose, job and result hashes, both texts
|
|
114
|
+
and locales, content type, glossary and policy versions, provider/model and
|
|
115
|
+
software identities, locale quality and commercial profiles, the exact
|
|
116
|
+
commercial review scope, confidence, and escalation requirements. Reuse across
|
|
117
|
+
a changed field or between quality,
|
|
118
|
+
qualified-human, and independent-model review purposes must fail closed.
|
|
119
|
+
Legal content still requires a
|
|
120
|
+
separately verified qualified-human receipt. Low-confidence non-legal content
|
|
121
|
+
still requires exactly one qualified-human receipt or a differently identified
|
|
122
|
+
and independently verified second model review.
|
|
123
|
+
|
|
124
|
+
## Failure and retry contract
|
|
125
|
+
|
|
126
|
+
The adapter raises only stable, content-free `HTTPEvidenceProviderFailed`
|
|
127
|
+
codes. Network errors, HTTP 408/425/429, HTTP 5xx, malformed transport data,
|
|
128
|
+
and response parsing failures are retryable. Redirects, other HTTP statuses,
|
|
129
|
+
unsafe requests, and binding mismatches are permanent. Every invocation makes
|
|
130
|
+
at most one transport attempt.
|
|
131
|
+
|
|
132
|
+
The coordinator records the stable code, releases or terminates the exact
|
|
133
|
+
token-bound evidence lease, and applies its configured bounded exponential
|
|
134
|
+
backoff. A retry uses the same deterministic request ID. A last known good
|
|
135
|
+
translation is never replaced, and no publication is prepared until all
|
|
136
|
+
policy-required locales hold valid signed approvals.
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# Authenticated localization health HTTP contract
|
|
2
|
+
|
|
3
|
+
`WebsiteLocalizationHealthHTTPApplication` exposes the composed runtime's
|
|
4
|
+
existing read-only health monitor to an explicitly authorized operator. It is
|
|
5
|
+
provider-neutral and returns identifiers, lifecycle states, stable reasons,
|
|
6
|
+
and counts only. It never repairs state, advances a lease, retries work, signs
|
|
7
|
+
an approval, calls a model, publishes content, or returns source text, target
|
|
8
|
+
text, reviewer prose, credentials, receipts, or transport exceptions.
|
|
9
|
+
An explicitly configured publisher probe may make one content-free callback
|
|
10
|
+
challenge as part of the read.
|
|
11
|
+
|
|
12
|
+
This is an operator endpoint, not a tenant CMS status endpoint. Its response
|
|
13
|
+
can contain site and website-version identifiers from the complete configured
|
|
14
|
+
runtime. Do not grant a normal site credential access. Tenant-scoped progress
|
|
15
|
+
continues to use the separately signed endpoint documented in
|
|
16
|
+
[`WEBSITE_LOCALIZATION_API.md`](WEBSITE_LOCALIZATION_API.md).
|
|
17
|
+
|
|
18
|
+
## Runtime configuration
|
|
19
|
+
|
|
20
|
+
Pass a callable `health_http_authenticator` to
|
|
21
|
+
`WebsiteLocalizationRuntime`. The runtime then exposes `runtime.health_http`.
|
|
22
|
+
Without that explicit capability the attribute is `None` and no operator
|
|
23
|
+
reader exists. Optional `health_provider_probe` and `health_publisher_probe`
|
|
24
|
+
values must implement `check` and are accepted only together with the
|
|
25
|
+
authenticator. Invalid or partial settings block before any SQLite schema is
|
|
26
|
+
created or migrated. The publisher probe must be the exact same capability as
|
|
27
|
+
the runtime's delivery publisher. The built-in HTTPS publisher implements it
|
|
28
|
+
with a fresh probe ID and the exact advertised callback-contract digest; its signed
|
|
29
|
+
response contains no website or locale data.
|
|
30
|
+
|
|
31
|
+
Mount the WSGI callable behind a production server and trusted TLS terminator.
|
|
32
|
+
The application requires `wsgi.url_scheme == "https"`; only the trusted server
|
|
33
|
+
may derive that value. It accepts one empty, query-free request:
|
|
34
|
+
|
|
35
|
+
```http
|
|
36
|
+
GET /v2/localization/health HTTP/1.1
|
|
37
|
+
Authorization: <operator-owned credential>
|
|
38
|
+
Content-Length: 0
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Bodies, transfer encoding, duplicate or malformed headers, plaintext
|
|
42
|
+
transport, queries, other methods, and other paths are rejected before the
|
|
43
|
+
authenticator or monitor runs. Request headers are bounded and passed only to
|
|
44
|
+
the host authenticator in this canonical envelope:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"schema": "blun.localization-health-http-auth-request.v1",
|
|
49
|
+
"method": "GET",
|
|
50
|
+
"path": "/v2/localization/health",
|
|
51
|
+
"headers": [["authorization", "<operator-owned credential>"]],
|
|
52
|
+
"body_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The host owns credential lookup, rotation, rate limiting, network policy, and
|
|
57
|
+
audit redaction. On success it returns exactly:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"schema": "blun.localization-health-reader-principal.v1",
|
|
62
|
+
"reader_id": "operations-1",
|
|
63
|
+
"credential_id": "health-reader-1",
|
|
64
|
+
"credential_version": "2026-09-09",
|
|
65
|
+
"scope": "service-health"
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The adapter validates every field and requires the exact `service-health`
|
|
70
|
+
scope. It does not include principal or credential values in the response.
|
|
71
|
+
Invalid principals return `401`; an authenticator outage returns a retryable
|
|
72
|
+
`503`, with no exception text.
|
|
73
|
+
|
|
74
|
+
## Response and status semantics
|
|
75
|
+
|
|
76
|
+
A valid report is wrapped without changing the monitor's signed-state
|
|
77
|
+
decisions:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"schema": "blun.website-localization-health-http.v1",
|
|
82
|
+
"report": {
|
|
83
|
+
"schema": "blun.website-localization-health.v1",
|
|
84
|
+
"checked_at": 1788962400.0,
|
|
85
|
+
"status": "degraded",
|
|
86
|
+
"components": [{
|
|
87
|
+
"component": "supervisor",
|
|
88
|
+
"status": "degraded",
|
|
89
|
+
"reasons": ["supervisor.heartbeat_stale"],
|
|
90
|
+
"counts": {"consecutive_blocked": 0}
|
|
91
|
+
}],
|
|
92
|
+
"providers": [],
|
|
93
|
+
"website_versions": []
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The real monitor supplies non-empty component data. `healthy` and `degraded`
|
|
99
|
+
reports return HTTP `200`; a structurally valid `blocked` report returns HTTP
|
|
100
|
+
`503` while retaining the complete content-free report for diagnosis. Thus a
|
|
101
|
+
load balancer cannot mistake known corruption for health, while an operator
|
|
102
|
+
can distinguish a valid blocked assessment from an unavailable monitor.
|
|
103
|
+
|
|
104
|
+
Before delivery, the HTTP boundary independently validates the exact report
|
|
105
|
+
schema, finite check time, overall and component states, unique component and
|
|
106
|
+
event identities, non-negative counts, provider bindings, website lifecycle
|
|
107
|
+
states, locale failures, stable reason grammar, exact current check time, and a
|
|
108
|
+
four-megabyte response ceiling. Extra fields, free-form
|
|
109
|
+
reason prose, duplicate identities, impossible approval counts, invalid
|
|
110
|
+
provider output, malformed reports, or serialization failures produce only:
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"schema": "blun.website-localization-health-http-error.v1",
|
|
115
|
+
"error_code": "health.http.response_invalid",
|
|
116
|
+
"retryable": true
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
All responses use `Cache-Control: no-store`, `X-Content-Type-Options: nosniff`,
|
|
121
|
+
and `Referrer-Policy: no-referrer`. The host must additionally prevent access
|
|
122
|
+
logs from retaining operator credentials.
|
|
123
|
+
|
|
124
|
+
Premortem: an unauthenticated probe could enumerate sites, a malformed monitor
|
|
125
|
+
could leak customer prose, a blocked report could be returned as an ordinary
|
|
126
|
+
healthy response, authentication failure could fall through to state access,
|
|
127
|
+
or an external probe could be enabled without an operator boundary. Explicit
|
|
128
|
+
service-wide scope, authentication-before-monitor ordering, strict output
|
|
129
|
+
revalidation, HTTP `503` for blocked state, and pre-schema runtime validation
|
|
130
|
+
keep those paths fail-closed.
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# HTTP localization-provider contract
|
|
2
|
+
|
|
3
|
+
`integrations/website_localization_http_provider.py` connects the
|
|
4
|
+
provider-neutral website worker to a host-owned model gateway. It does not
|
|
5
|
+
assume a particular vendor, SDK, model, or authentication scheme. A deployment
|
|
6
|
+
can place its own LLM, a commercial provider, or an internal routing service
|
|
7
|
+
behind the same endpoint.
|
|
8
|
+
|
|
9
|
+
This adapter is a transport boundary, not a quality certificate. Its tests
|
|
10
|
+
prove request isolation, integrity binding, parsing, and failure behavior. They
|
|
11
|
+
do not prove that any connected model writes native-quality translations.
|
|
12
|
+
|
|
13
|
+
## Security and retry model
|
|
14
|
+
|
|
15
|
+
- Use HTTPS. Plain HTTP is accepted only for an explicitly enabled loopback
|
|
16
|
+
endpoint such as `127.0.0.1`.
|
|
17
|
+
- Supply authentication headers through a host callback. Do not put secrets in
|
|
18
|
+
the endpoint URL, source content, repository, job, or model response.
|
|
19
|
+
- The adapter performs exactly one HTTP request for one worker phase. The
|
|
20
|
+
durable queue owns bounded retries and crash recovery, preventing hidden
|
|
21
|
+
retry multiplication and uncontrolled provider cost.
|
|
22
|
+
- Redirects are never followed. A redirect is a non-retryable failure because
|
|
23
|
+
it could send customer content or credentials to an untrusted destination.
|
|
24
|
+
- Response bodies are bounded, UTF-8 without a byte-order mark, strict JSON,
|
|
25
|
+
and free of duplicate keys or non-finite numbers.
|
|
26
|
+
- Every response must echo the exact request ID and canonical request hash.
|
|
27
|
+
Network, status, parser, header, size, or binding failures return only stable
|
|
28
|
+
error codes; provider prose and credentials are not exposed.
|
|
29
|
+
- Failure is closed per locale. No failed call produces a candidate, approval,
|
|
30
|
+
publication, or replacement for a last-known-good translation.
|
|
31
|
+
|
|
32
|
+
## Host configuration
|
|
33
|
+
|
|
34
|
+
The authentication callback is invoked immediately before each request, so a
|
|
35
|
+
host can rotate short-lived credentials without rebuilding jobs:
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
from integrations.website_localization_http_provider import HTTPProviderAdapter
|
|
39
|
+
|
|
40
|
+
provider = HTTPProviderAdapter(
|
|
41
|
+
"https://model-gateway.example/v1/localize",
|
|
42
|
+
authentication_headers=lambda: {
|
|
43
|
+
"Authorization": load_short_lived_authorization_header()
|
|
44
|
+
},
|
|
45
|
+
timeout=60,
|
|
46
|
+
)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
The callback must return at least one header. It cannot replace transport or
|
|
50
|
+
binding headers such as `Host`, `Content-Type`, `Content-Length`,
|
|
51
|
+
`Idempotency-Key`, or `X-Localization-Request-Sha256`. Header names and values
|
|
52
|
+
containing control characters are rejected before any network call.
|
|
53
|
+
|
|
54
|
+
A deployment that uses mutual TLS can implement the small `HTTPTransport`
|
|
55
|
+
protocol and inject a transport configured with its own trusted certificate
|
|
56
|
+
context. Custom transports must still make one request and return `HTTPResult`;
|
|
57
|
+
all response validation remains inside the adapter.
|
|
58
|
+
|
|
59
|
+
## Request
|
|
60
|
+
|
|
61
|
+
Each locale has its own queue job. Each of its three stages—`transcreation`,
|
|
62
|
+
`target_native`, and `source_fidelity`—makes a separate request. No request asks
|
|
63
|
+
for several target languages.
|
|
64
|
+
|
|
65
|
+
The adapter sends canonical UTF-8 JSON with these headers:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
Accept: application/json
|
|
69
|
+
Content-Type: application/json; charset=utf-8
|
|
70
|
+
Idempotency-Key: <request_id>
|
|
71
|
+
X-Localization-Request-Id: <request_id>
|
|
72
|
+
X-Localization-Request-Sha256: <request_sha256>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The JSON envelope has exactly four fields:
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"schema": "blun.localization-provider-request.v1",
|
|
80
|
+
"request_id": "<deterministic phase request ID>",
|
|
81
|
+
"request_sha256": "<SHA-256 of canonical request JSON>",
|
|
82
|
+
"request": {
|
|
83
|
+
"schema": "blun.website-localization-worker.v4",
|
|
84
|
+
"request_id": "<same deterministic phase request ID>",
|
|
85
|
+
"phase": "transcreation",
|
|
86
|
+
"provider_id": "customer-llm",
|
|
87
|
+
"model_id": "configured-model",
|
|
88
|
+
"model_version": "configured-model-version",
|
|
89
|
+
"system_instruction": "<versioned phase instruction>",
|
|
90
|
+
"input": {}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The gateway must treat `system_instruction` as the instruction and every value
|
|
96
|
+
inside `input` as untrusted data. It must not combine phases. In particular,
|
|
97
|
+
the `target_native` input intentionally excludes the source text and
|
|
98
|
+
source-language glossary terms; reconstructing or fetching that source would
|
|
99
|
+
invalidate the independent, source-blind review.
|
|
100
|
+
|
|
101
|
+
`request_sha256` is the lowercase hexadecimal SHA-256 of `request` encoded as
|
|
102
|
+
UTF-8 JSON with keys sorted, no insignificant whitespace, native Unicode
|
|
103
|
+
characters unescaped, and non-finite numbers forbidden. The bundled adapter
|
|
104
|
+
computes it. A gateway only needs to echo the received value after associating
|
|
105
|
+
it with the processed request.
|
|
106
|
+
|
|
107
|
+
For an exact replay, the gateway should return the already completed exact
|
|
108
|
+
response or safely resume its own in-progress operation. If it has previously
|
|
109
|
+
seen the same `request_id` with a different request hash, it must reject the
|
|
110
|
+
call. It must never silently reuse output from another source, locale, phase,
|
|
111
|
+
policy, glossary, provider, model, or software version.
|
|
112
|
+
|
|
113
|
+
## Response
|
|
114
|
+
|
|
115
|
+
A successful endpoint returns HTTP `200`, `Content-Type: application/json`
|
|
116
|
+
(optionally with `charset=utf-8`), and this exact envelope:
|
|
117
|
+
|
|
118
|
+
```json
|
|
119
|
+
{
|
|
120
|
+
"schema": "blun.localization-provider-response.v1",
|
|
121
|
+
"request_id": "<exact request ID>",
|
|
122
|
+
"request_sha256": "<exact request hash>",
|
|
123
|
+
"response": {}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
The `response` value is passed to the existing worker validator. For
|
|
128
|
+
`transcreation`, it must be exactly:
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"schema": "blun.website-localization-candidate.v1",
|
|
133
|
+
"phase": "transcreation",
|
|
134
|
+
"locale": "fi-FI",
|
|
135
|
+
"candidate": "<complete localized content>"
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
For either review, it must be exactly:
|
|
140
|
+
|
|
141
|
+
```json
|
|
142
|
+
{
|
|
143
|
+
"schema": "blun.website-localization-review.v2",
|
|
144
|
+
"phase": "target_native",
|
|
145
|
+
"locale": "fi-FI",
|
|
146
|
+
"status": "PASS",
|
|
147
|
+
"confidence": "high",
|
|
148
|
+
"blocking_defects": [],
|
|
149
|
+
"major_defects": []
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Use `phase: source_fidelity` for the second review. A `PASS` requires both
|
|
154
|
+
defect arrays to be empty. A failed review must report structured defects in
|
|
155
|
+
the worker's existing schema; the pipeline hashes those findings instead of
|
|
156
|
+
retaining reviewer prose in queue status. The worker independently validates
|
|
157
|
+
the exact phase, locale, shape, Unicode NFC, protected syntax, completeness,
|
|
158
|
+
and review ordering.
|
|
159
|
+
|
|
160
|
+
## Status behavior
|
|
161
|
+
|
|
162
|
+
HTTP `408`, `425`, `429`, and `5xx` responses are retryable by the queue.
|
|
163
|
+
Other non-`200` statuses and redirects are non-retryable. Transport exceptions
|
|
164
|
+
and malformed successful responses are retryable because a later bounded queue
|
|
165
|
+
attempt may reach a healthy gateway; a request/response binding mismatch is
|
|
166
|
+
non-retryable because repeating an untrusted or incorrectly implemented
|
|
167
|
+
endpoint is unsafe.
|
|
168
|
+
|
|
169
|
+
Premortem: assume a production gateway leaked an authorization token, followed
|
|
170
|
+
a redirect, charged three times for one transient failure, or returned a good
|
|
171
|
+
Finnish answer for the wrong request. Host-only headers, rejected redirects,
|
|
172
|
+
one-attempt transport, queue-owned retries, deterministic idempotency, and the
|
|
173
|
+
exact echoed request hash are the corresponding preventive controls. End-to-end
|
|
174
|
+
deployment tests should additionally stop the gateway mid-stage, replay the
|
|
175
|
+
same ID, rotate credentials, and return deliberately stale locale output.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Localization receipt-verifier HTTPS contract
|
|
2
|
+
|
|
3
|
+
`integrations/website_localization_receipt_verifier_http.py` is a
|
|
4
|
+
provider-neutral network implementation of the release store's receipt
|
|
5
|
+
verifier boundary. It does not issue evidence, choose a model, hold a signing
|
|
6
|
+
key, approve a locale, or publish content. It asks one host-configured service
|
|
7
|
+
whether one opaque receipt authenticates one exact canonical release binding.
|
|
8
|
+
|
|
9
|
+
## Host configuration
|
|
10
|
+
|
|
11
|
+
Construct `HTTPReceiptVerifierAdapter` with:
|
|
12
|
+
|
|
13
|
+
- one fixed absolute HTTPS endpoint;
|
|
14
|
+
- a callback returning authentication headers at call time;
|
|
15
|
+
- an optional transport implementation; and
|
|
16
|
+
- a timeout from 0 to 300 seconds.
|
|
17
|
+
|
|
18
|
+
Plain HTTP is rejected except for an explicitly enabled loopback endpoint used
|
|
19
|
+
for local development. User information, fragments, queries, control
|
|
20
|
+
characters, ambiguous paths, unsafe authentication headers, redirects, and
|
|
21
|
+
authentication attempts to replace protocol headers are rejected. The adapter
|
|
22
|
+
makes exactly one transport attempt. Durable release coordination owns every
|
|
23
|
+
retry and its attempt limit.
|
|
24
|
+
|
|
25
|
+
## Request
|
|
26
|
+
|
|
27
|
+
The adapter canonicalizes the complete
|
|
28
|
+
`blun.localization-quality-receipt-binding.v2` object and validates its native
|
|
29
|
+
Unicode text, hashes, locales, content type, glossary and policy versions,
|
|
30
|
+
provider/model identities, software version, two-pass confidence, locale
|
|
31
|
+
quality profile, optional commercial profile and exact targeted-review summary,
|
|
32
|
+
escalation requirements, and review purpose. It then sends HTTP POST with JSON content type and these
|
|
33
|
+
protected headers:
|
|
34
|
+
|
|
35
|
+
- `Idempotency-Key`;
|
|
36
|
+
- `X-Localization-Receipt-Request-Id`; and
|
|
37
|
+
- `X-Localization-Receipt-Request-Sha256`.
|
|
38
|
+
|
|
39
|
+
The body is exactly:
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"schema": "blun.localization-receipt-verification-http-request.v1",
|
|
44
|
+
"request_id": "blun-l10n-receipt-<sha256>",
|
|
45
|
+
"binding_sha256": "<canonical binding hash>",
|
|
46
|
+
"receipt_sha256": "<opaque receipt hash>",
|
|
47
|
+
"binding": {"schema": "blun.localization-quality-receipt-binding.v2"},
|
|
48
|
+
"receipt": "<opaque receipt>"
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The deterministic request ID is derived from both hashes. Identical retries
|
|
53
|
+
therefore address the same verification operation, while any changed receipt
|
|
54
|
+
or binding dimension receives a different identity. The remote service must
|
|
55
|
+
treat an idempotency-key collision with different bytes as a terminal error.
|
|
56
|
+
|
|
57
|
+
## Response
|
|
58
|
+
|
|
59
|
+
Success uses HTTP 200 and JSON content type with exactly:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"schema": "blun.localization-receipt-verification-http-response.v1",
|
|
64
|
+
"request_id": "<same request ID>",
|
|
65
|
+
"request_sha256": "<exact request-body hash>",
|
|
66
|
+
"binding_sha256": "<same binding hash>",
|
|
67
|
+
"receipt_sha256": "<same receipt hash>",
|
|
68
|
+
"verified": true
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
`verified: false` is a valid negative decision and permanently blocks release.
|
|
73
|
+
Wrong bindings, duplicate keys, non-finite values, a UTF-8 byte-order mark,
|
|
74
|
+
incorrect content lengths, oversized bodies, extra fields, redirects, and
|
|
75
|
+
terminal HTTP statuses fail closed. Responses never carry reviewer prose.
|
|
76
|
+
|
|
77
|
+
Network failures, HTTP 408/425/429 and HTTP 5xx, malformed successful response
|
|
78
|
+
transport, and temporary parser failures are classified as retryable but are
|
|
79
|
+
not retried inside the adapter. The release coordinator records only a stable,
|
|
80
|
+
content-free failure code and applies its existing durable backoff and maximum
|
|
81
|
+
attempt policy. Authentication, invalid requests, redirects, other HTTP
|
|
82
|
+
statuses, binding mismatches, and explicit negative verdicts are terminal.
|
|
83
|
+
|
|
84
|
+
The same adapter can be configured separately for quality, qualified-human,
|
|
85
|
+
and independent-model receipts. Purpose is part of the signed binding, so a
|
|
86
|
+
receipt accepted for one route cannot satisfy another route.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# BLUN Language Guard — mandatory agent rules
|
|
2
|
+
|
|
3
|
+
Apply these rules as always-on instructions in `AGENTS.md`, `CLAUDE.md`, or the equivalent global instruction file of the host CLI.
|
|
4
|
+
|
|
5
|
+
1. Treat every user-visible natural-language answer—including ordinary chat—as an untrusted candidate.
|
|
6
|
+
2. For an agent's own answer, call `release_response` with the complete final text, the exact host-supplied language tag, and truthful nativeness and orthography attestations.
|
|
7
|
+
3. Load `translate-native/SKILL.md` for every translation, localization, transcreation, translated rewrite, translation review, or user-visible i18n edit.
|
|
8
|
+
4. For a translation, never call `release_response`. Call `release_translation` with the complete source, complete target, exact language tag, and seven truthful attestations.
|
|
9
|
+
5. Never claim an attestation passed unless that pass was actually performed. Never fabricate, reuse, edit, or switch the purpose of a release token.
|
|
10
|
+
6. If either gate returns `BLOCK`, revise the candidate and call the correct gate again. Do not release blocked text.
|
|
11
|
+
7. Release text only when `verify_release_token` confirms the signed receipt for the exact current text, task kind, source when applicable, locale, version, and expiry.
|
|
12
|
+
8. Do not print the internal release token to the user unless debugging was explicitly requested.
|
|
13
|
+
9. Never choose `task_kind`, omit a translation source, or substitute `auto`, `all`, or another language to obtain a pass. Those values belong to the trusted host adapter.
|
|
14
|
+
10. If mandatory mode is enabled and the gateway is unavailable, fail closed. A direct MCP call without a host output interceptor is advisory because an agent can skip it.
|
|
15
|
+
11. When `BLUN_LANGUAGE_GUARD_MANDATORY=1`, write exactly one JSON object to final stdout with only `target_text` and the valid `release_token`. Do not add Markdown fences, commentary, logs, host policy, source text, language, or task kind. The trusted host unwraps and delivers the verified target.
|
|
16
|
+
12. Never call Telegram, email, HTTP response, queue, publishing, deployment, or another user-visible sender directly in mandatory mode. Return the signed envelope to the host-owned adapter instead.
|
|
17
|
+
13. Read the host-supplied `BLUN_LANGUAGE_GUARD_TASK_KIND`, `BLUN_LANGUAGE_GUARD_LANGUAGE`, and `BLUN_LANGUAGE_GUARD_CONTENT_TYPE` values when present. Use them for the MCP release call, but never echo them into the final envelope.
|
|
18
|
+
14. The isolated guard service owns signing and verification. Never read its token file, connect to its socket directly, or retry through local-key mode when the host requires the service.
|
|
19
|
+
15. Streaming candidate prose is delivery. In mandatory mode the host buffers `text-delta` and `done` events until the complete envelope has been verified; agents must not place candidate text in tool progress, logs, reasoning, or error fields.
|
|
20
|
+
16. In Claude Code, use the installed user-scoped HTTP `blun-language-guard`. If it reconnects or reports unavailable, retry only through the same guarded MCP after health is restored. Never switch to raw output or an unguarded local signer.
|
|
21
|
+
|
|
22
|
+
The server injects the same policy through MCP initialization instructions and exposes a `translate-native` prompt. Hosts that support an installed skill/plugin must activate it for translations. Hosts that do not support skills still receive the MCP workflow, but deterministic checks alone cannot prove fidelity or fluency.
|
|
23
|
+
# Mandatory BLUN Language Gateway
|
|
24
|
+
|
|
25
|
+
- Route every user-visible natural-language answer through the host's BLUN Language Gateway.
|
|
26
|
+
- Set `task_kind: response` for an agent's own answer and `task_kind: translation` for every translation, localization, transcreation, target-language rewrite, or user-visible i18n change.
|
|
27
|
+
- For translations, supply the complete source and activate the installed `translate-native` skill/plugin before drafting. Never downgrade a translation to `response`.
|
|
28
|
+
- Do not print, save, commit, publish, or deploy a candidate until the gateway returns `release_allowed: true` for the exact target, task kind, locale, and source when applicable.
|
|
29
|
+
- Treat an unavailable gateway as `BLOCK` whenever mandatory mode is enabled.
|
|
30
|
+
- Never read, request, log, or handle the gateway signing key.
|
|
31
|
+
- In mandatory mode, accept that raw text or an unsigned envelope is discarded. Do not retry through an alternate delivery channel.
|
|
32
|
+
- Never fabricate attestations. The host—not the agent—controls final release.
|