chain multi-step requests across known skills
Add the run-ledger chained-run path and make a compound request run its known skills in order instead of authoring one monolithic skill. - scheduler/skill: `assess:outcome` gains a `continue` verdict; a continued step is re-dispatched with a bounded run ledger (max_reentries + a monotonic-progress guard), and the ledger is rendered into the routing and assessment state. - navigation leaf guard (`confirm_skill_fit`) becomes same/part/different and is ledger-aware, so the first step of a compound request runs instead of being rejected into `create_skill` (a real run picked calculator.calculate at 0.99 and was rejected into create_skill). - results flow forward through `request.run_ledger` (`last_result` helper); `simplex.send_message` sends the prior step's result rather than asking the LLM bridge to recompute it. Documented in CODEGEN.md. - `assess:outcome` stays the sole continuation authority: the guard only decides whether a skill contributes, never forces a continuation (a forced continue on `part` overrode a correct `done` on the final step and authored a spurious category). - verbosity levels, structured SchedulerReply fields, and a send_message hermetic test for the chained-result path.
This commit is contained in:
1 parent
9ba14fdab0
commit
ab0defca1e
20 files changed
+1046
-324
No files matched your search
@@ -13,7 +13,7 @@ import urllib.error
|
||||
import urllib.request
|
||||
|
||||
from semif_agent.decisions import DecisionRequest, Option
|
||||
from semif_agent.skills import ActionResult
|
||||
from semif_agent.skills import ActionResult, last_result
|
||||
|
||||
INTEGRATION = {
|
||||
"service": "simplex",
|
||||
@@ -383,9 +383,14 @@ def act(ctx, request) -> ActionResult:
|
||||
display_name = _display(chosen) or recipient
|
||||
|
||||
# --- resolve the message text -----------------------------------------
|
||||
# Prefer the literal text the user dictated; then the result of the previous
|
||||
# step of a chain (never re-derive a computed value with the LLM); only then
|
||||
# ask the LLM bridge for genuinely new text.
|
||||
message_text = _message_from_query(query)
|
||||
if not message_text and user_input and not used_input_for_contact:
|
||||
message_text = user_input
|
||||
if not message_text:
|
||||
message_text = last_result(request)
|
||||
if not message_text:
|
||||
written, reason = _llm_message_text(ctx, query)
|
||||
if written:
|
||||
|
||||
Reference in new issue
Block a user