Files
aish/context.lua
T
claude-noether 4310207738 Phase 0: scaffold tree + manifest
- README, .gitignore, CLAUDE.md (project conventions)
- docs/PHASE0.md — full Phase 0 manifest (locked substrate)
- 10 root .lua modules + 4 ffi/ bindings, all stubs raising NotImplemented
  with module-scoped responsibilities matching the manifest
- config.lua wired to current dirac/hossenfelder endpoints (qwen-coder-7b
  snappy/32k + cloud via OpenRouter through hossenfelder)

File names match docs/PHASE0.md §4 exactly. Module bodies fill in across
later phases; the tree shape is locked.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 23:16:07 +00:00

29 lines
872 B
Lua

-- context.lua — in-memory conversation history + token budget.
-- Phase 0: ordered turn list, sliding window eviction.
-- Tokenization is char/4 heuristic in Phase 0; accurate count is Phase 2.
-- See docs/PHASE0.md §8.
local M = {}
-- Construct a Context table from config.context.
function M.new(opts)
error("context.new: not implemented (Phase 0 pending)")
end
-- Append a turn { role = ..., content = ... }.
function M:append(turn)
error("context:append: not implemented (Phase 0 pending)")
end
-- Render messages array suitable for broker.chat (system prompt prepended).
function M:to_messages()
error("context:to_messages: not implemented (Phase 0 pending)")
end
-- Apply max_turns eviction policy. Returns number of turns evicted.
function M:enforce_budget()
error("context:enforce_budget: not implemented (Phase 0 pending)")
end
return M