mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-17 20:32:20 +02:00
feat(harness): authority, turn contract, tools, clean_agent_preview
Chat/agent harness work: request-authority model, turn contract, tool
policy/parsing/execution, clean_agent_preview streaming/thinking, ask_user
persistence, session probes, and scheduler.
Source: vendor/photocraft (ad1cff44) harness files, 3-way merged onto
upstream/dev (a8c147b2). Harness core files were independently developed
in both lineages; resolution policy documented in pr_work/C_conflicts.md
(vendor kept where ahead, upstream kept where vendor is behind; full delta
preserved in pr_work/C_upstream_delta.patch).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a8c147b238
commit
364229f2dc
@@ -496,6 +496,7 @@ def _create_pdf_text_derivative(db, *, source_doc, content: str, owner: Optional
|
||||
"content": clean,
|
||||
"version": 1,
|
||||
"source_doc_id": getattr(source_doc, "id", None),
|
||||
"exit_code": 0,
|
||||
}
|
||||
|
||||
|
||||
@@ -618,6 +619,7 @@ class CreateDocumentTool:
|
||||
"language": language,
|
||||
"content": content,
|
||||
"version": 1,
|
||||
"exit_code": 0,
|
||||
}
|
||||
except Exception as e:
|
||||
db.rollback()
|
||||
@@ -708,6 +710,7 @@ class UpdateDocumentTool:
|
||||
"language": doc.language,
|
||||
"content": new_content,
|
||||
"version": new_ver,
|
||||
"exit_code": 0,
|
||||
}
|
||||
except Exception as e:
|
||||
db.rollback()
|
||||
@@ -863,6 +866,7 @@ class EditDocumentTool:
|
||||
"version": new_ver,
|
||||
"applied": applied,
|
||||
"skipped": skipped,
|
||||
"exit_code": 0,
|
||||
}
|
||||
return {"error": "No edits applied — FIND text cannot be blank"}
|
||||
|
||||
@@ -968,6 +972,7 @@ class EditDocumentTool:
|
||||
"version": new_ver,
|
||||
"applied": applied,
|
||||
"skipped": skipped,
|
||||
"exit_code": 0,
|
||||
}
|
||||
if partial_edits:
|
||||
result.update({
|
||||
@@ -1059,6 +1064,7 @@ class SuggestDocumentTool:
|
||||
"partial": bool(invalid),
|
||||
"rejected": len(invalid),
|
||||
"invalid_suggestions": invalid,
|
||||
"exit_code": 0,
|
||||
}
|
||||
finally:
|
||||
db.close()
|
||||
|
||||
Reference in New Issue
Block a user