passepartout: v0.5.0 — File Reorganization & Token Economics
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s

File Reorganization:
- Extracted core-context → symbolic-awareness (skill)
- Extracted heartbeat → symbolic-events (skill)
- Relocated 6 utility fragments, renamed 23 files, deleted system-model.lisp
- Renamed gateway-* → channel-*, split gateway-messaging → 4 channel-* files
- Renamed defskill/defpackage names to match new file prefixes
- Deleted gateway-messaging.org/.lisp, removed core-context filter
- Documented self-repair criterion, added AGENTS.md core boundary rule

Token Economics (v0.5.0, skills not core):
- tokenizer.lisp: count-tokens, model-token-ratio, token-cost, provider-token-cost (11 tests)
- cost-tracker.lisp: cost-track-call, cost-session-total, cost-by-provider (6 tests)
- token-economics.lisp: prompt-prefix-cached, context-assemble-cached,
  enforce-token-budget with CONTEXT_MAX_TOKENS env var (9 tests)

Bug Fixes:
- Fixed DeepSeek 400 (removed malformed tools from cascade)
- Fixed UNDEFINED-FUNCTION crash (fboundp guards in think())
- Fixed gate-trace duplication (setf replaces list* in cognitive-verify)
- Tightened dexador connect-timeout 10s→5s

Test suite: 116/116 (100%)
This commit is contained in:
2026-05-08 08:36:41 -04:00
parent 0b1fbc36bb
commit c86d079418
49 changed files with 2360 additions and 1583 deletions

View File

@@ -58,7 +58,6 @@ SILENT_ACTUATORS="cli,system-message,emacs"
# =============================================================================
# SECURITY
# =============================================================================
SAFETY_BLOCK_SHELL=true
PROTOCOL_ENFORCE_HMAC=false
PROTOCOL_HMAC_SECRET="change-this-to-a-secure-random-string"
@@ -100,3 +99,14 @@ RESOURCES_DIR="$HOME/memex/resources"
ARCHIVES_DIR="$HOME/memex/archives"
SYSTEM_DIR="$HOME/memex/system"
LLM_REQUEST_TIMEOUT=30
# =============================================================================
# TOKEN ECONOMICS (v0.5.0)
# =============================================================================
# Max tokens for the combined system prompt + context + user prompt.
# Default: 16384 (half of a 32K context window, leaves room for model response).
CONTEXT_MAX_TOKENS=16384
# Soft daily cost cap in USD. Warning injected into system prompt when
# approaching budget.
COST_BUDGET_DAILY=1.00