100 Commits
Author SHA1 Message Date
praisonai-triage-agent[bot] 97aaee119b Release v4.7.24 2026-11-05 19:47:08 +00:00
e41a23e040 fix: confine gateway operators to specific agents via auth_scopes (#6254)
* fix: confine gateway operators to specific agents via auth_scopes (fixes #6253)

A token's auth_scopes entry may now be {scopes: [...], agents: [...]}.
GatewayConfig.resolve_agents(token) returns the confinement (None =
every agent, so existing token -> [scopes] policies are unchanged). The
bot gateway enforces it where a WS client binds to an agent (hello/join,
including session resume via join) and withholds broadcast events
sourced from agents outside the grant.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: apply YAML operator policy at gateway startup; fail closed on unknown grant keys

- start_with_config now stamps gateway.auth_scopes / gateway.auth.tokens onto
  self.config, so YAML agent confinement (and scopes) actually take effect.
- Grant mappings reject unknown keys (core parser + typed OperatorGrantSchema),
  so a typo like 'agnts' cannot silently remove a confinement.
- Document that HTTP approval endpoints are not yet agent-filtered (#5151).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: expand ${VAR} auth_scopes keys at gateway startup; tolerate older core

- start_with_config(): load_gateway_config resolves ${VAR} in values only, so
  auth_scopes keys stayed literal placeholders. Expand them, drop keys that
  resolve to empty, and refuse to start if a declared policy ends up empty
  (an empty policy means "no policy" and would fail open).
- Guard the private _parse_auth_scopes import and the resolve_agents call so
  an older praisonaiagents keeps pre-#6253 behaviour instead of ImportError.
- Tests for placeholder expansion, all-unset fail-closed (both YAML forms)
  and the older-core fallback.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: reject scalar 'agents' in gateway operator grants (#6253)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: refuse gateway startup when declared operator policy cannot be enforced by older core (#6253)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: fail closed on unknown auth.tokens[] keys; check join agent reach before session resume (#6253)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: refuse attaching a confined operator to another agent's shared session (#6253)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-05 19:34:39 +00:00
a72f170a17 fix: guardrail without name=, OPENAI_TIMEOUT, visible rules notice (#6257) (#6258)
* fix: guardrail without name=, OPENAI_TIMEOUT for plain-model path, visible rules notice (fixes #6257)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: show rules notice by default and list only active rules (#6257)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-05 19:32:20 +00:00
praisonai-triage-agent[bot] c8d0dd3251 Merge pull request #6261 from MervinPraison/claude/issue-6260-20261105
fix: ImageAgent results gain .save() (no manual base64 decoding)
2026-11-05 17:58:00 +00:00
praisonai-triage-agent[bot] 749c6d868a Merge pull request #6262 from MervinPraison/claude/issue-6259-20261105
fix: replace retired dall-e defaults, forward quality for gpt-image, reject unsendable markup
2026-11-05 17:27:43 +00:00
praisonai-triage-agent[bot] 25d3b289ee Merge pull request #6251 from MervinPraison/claude/issue-6248-20261105
fix: session manifest with write-ahead run-in-flight marker (#6248)
2026-11-05 10:15:24 +00:00
praisonai-triage-agent[bot] 9a5824e0b9 Merge pull request #6250 from MervinPraison/claude/issue-6249-20261105
fix: durable FileStepCache for AgentFlow resume (fixes #6249)
2026-11-05 10:15:07 +00:00
praisonai-triage-agent[bot] 20d023a864 Merge pull request #6247 from MervinPraison/docs/readme-exam-wording
docs(readme): say what the handover test tests
2026-11-05 08:57:04 +00:00
praisonai-triage-agent[bot] b05518baed Merge pull request #6246 from MervinPraison/claude/issue-6245-20261105
fix: fail loudly on unknown provider prefix and dropped safety YAML fields
2026-11-05 08:49:45 +00:00
praisonai-triage-agent[bot] a362afc899 Merge pull request #6239 from MervinPraison/claude/issue-6238-20261105
fix: confine caller-supplied names to storage dirs and use shared async bridge
2026-11-05 08:31:38 +00:00
praisonai-triage-agent[bot] 4d9b514106 Merge pull request #6243 from MervinPraison/claude/issue-6241-20261105
fix: accept OpenAI-style 'messages' chat datasets in praisonai-train llm
2026-11-05 08:27:30 +00:00
praisonai-triage-agent[bot] d3ecf23533 Merge pull request #6244 from MervinPraison/claude/issue-6242-20261105
fix: add --no-push / ollama_push: false to keep Ollama exports local
2026-11-05 08:27:13 +00:00
praisonai-triage-agent[bot] fa738028d1 Merge pull request #6232 from MervinPraison/fix/edit-hint-nested-tool-dicts
fix: count only tool dicts in nested lists for the edit hint
2026-11-04 17:39:50 +00:00
praisonai-triage-agent[bot] e3074e5ac1 Merge pull request #6229 from MervinPraison/claude/issue-6228-20261104
fix: CLI keyless explicit ollama/ models and tolerant local probe
2026-11-04 13:53:48 +00:00
praisonai-triage-agent[bot] 29dd51cde1 Merge pull request #6221 from MervinPraison/fix/benchmark-scripts-fair-runs
fix(benchmarks): warm up, interleave and drop failed runs in execution benchmark
2026-11-04 12:38:43 +00:00
praisonai-triage-agent[bot] 3e314cf09b Merge pull request #6220 from MervinPraison/fix/system-prompt-only-relevant-hints
fix(agent): add the file-edit hint only when an edit tool is attached
2026-11-04 12:17:29 +00:00
praisonai-triage-agent[bot] 46263b2d76 Merge pull request #6225 from MervinPraison/claude/issue-6223-20261104
fix: add model-isolated 'secret' gateway request kind
2026-11-04 12:10:08 +00:00
praisonai-triage-agent[bot] 81aace69ec Merge pull request #6219 from MervinPraison/fix/litellm-route-duplicate-prompt
fix(agent): send the user turn once on the custom-LLM path
2026-11-04 12:00:16 +00:00
4e419c4f05 fix: keep tool turns intact across auto-save, compaction and history mutators (#6218)
* fix: keep tool turns intact across auto-save, compaction and history mutators (fixes #6217)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: save messages appended by history replacement and serialize it with auto-save (#6217)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-04 11:20:43 +01:00
7ae123e68d fix: deprecate You.com and Jira connectors in core in favour of PraisonAI-Tools (fixes #6168) (#6169)
Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-04 11:20:36 +01:00
praisonai-triage-agent[bot] ac94b9f8b7 Merge pull request #6216 from MervinPraison/claude/issue-6215-20261103
fix: optional per-user inbound request budget at bot/gateway admission
2026-11-03 11:56:00 +00:00
praisonai-triage-agent[bot] feae4f936d Merge pull request #6212 from MervinPraison/claude/issue-6208-20261103
fix: gateway single-instance guard is state-scoped, not only port-scoped
2026-11-03 11:32:32 +00:00
praisonai-triage-agent[bot] f16a6971bf Merge pull request #6211 from MervinPraison/claude/issue-6210-20261103
fix: BotOS.from_config rejects gateway.yaml sections instead of silently dropping them
2026-11-03 10:45:52 +00:00
praisonai-triage-agent[bot] 688bb55d51 Merge pull request #6205 from MervinPraison/claude/issue-6204-20261103
fix: crash-safe writes in praisonai.code edit tools
2026-11-03 09:56:01 +00:00
praisonai-triage-agent[bot] b5acce53be Merge pull request #6207 from MervinPraison/claude/issue-6206-20261103
fix: expose --max-budget on praisonai loop and pass YAML execution block through
2026-11-03 09:22:23 +00:00
praisonai-triage-agent[bot] 032e36891b Release v4.7.23 2026-11-03 08:02:47 +00:00
praisonai-triage-agent[bot] ce56db7991 Merge pull request #6203 from MervinPraison/claude/issue-6202-20261103
fix: no orphaned tool_calls on tool-call cap; correct tool name in Responses branch
2026-11-03 07:51:15 +00:00
praisonai-triage-agent[bot] 0bf0405b81 Merge pull request #6201 from MervinPraison/claude/issue-6200-20261102
fix: honour top-level YAML llm as crew default model
2026-11-02 09:45:41 +00:00
praisonai-triage-agent[bot] 99d47eed6e Merge pull request #6181 from MervinPraison/claude/issue-6179-20261101
fix: headless MCP OAuth consent + no callback port collision for concurrent flows
2026-11-01 12:00:51 +00:00
praisonai-triage-agent[bot] 90280d95d2 Merge pull request #6174 from MervinPraison/claude/issue-6173-20261101
fix: join wrapper exceptions to core PraisonAIError hierarchy
2026-11-01 10:45:04 +00:00
praisonai-triage-agent[bot] ebec19db1e Merge pull request #6176 from MervinPraison/claude/issue-6175-20261101
fix: self-correcting no-match errors in edit_file/apply_patch
2026-11-01 10:02:13 +00:00
praisonai-triage-agent[bot] 72044c1612 Merge pull request #6172 from MervinPraison/claude/issue-6171-20261101
fix: harden Agent.output_file, bound git calls, atomic learn archive
2026-11-01 07:42:38 +00:00
praisonai-triage-agent[bot] 9bf49b3bac Merge pull request #6170 from MervinPraison/claude/issue-6167-20261031
fix: lazy-load opt-in-only imports on the Agent import path
2026-10-31 18:54:54 +00:00
praisonai-triage-agent[bot] 1d68f23cfb Merge pull request #6163 from MervinPraison/claude/issue-6162-20261031
fix: textual status line for edit-less, reaction-less channels
2026-10-31 11:07:27 +00:00
praisonai-triage-agent[bot] edb2104f02 Merge pull request #6161 from MervinPraison/claude/issue-6160-20261031
fix: bind gateway outbound effects to originating turn liveness
2026-10-31 10:37:38 +00:00
praisonai-triage-agent[bot] af5d1667ad Merge pull request #6159 from MervinPraison/claude/issue-6158-20261031
fix: add local per-tool usage reporting (praisonai usage --by tool)
2026-10-31 09:23:25 +00:00
praisonai-triage-agent[bot] f226fe3b96 Merge pull request #6157 from MervinPraison/claude/issue-6156-20261031
fix: harden wrapper code exec, image save SSRF, schedule runner race
2026-10-31 08:38:46 +00:00
praisonai-triage-agent[bot] b8dfa106f9 Merge pull request #6155 from MervinPraison/claude/issue-6152-20261031
fix: stop async RAG/escalation/sub-question APIs from blocking the event loop
2026-10-31 07:43:24 +00:00
praisonai-triage-agent[bot] 48505de33b Merge pull request #6154 from MervinPraison/claude/issue-6151-20261031
fix: A2A message/stream blocks event loop, ignores task store, fails for AgentTeam
2026-10-31 07:42:18 +00:00
praisonai-triage-agent[bot] fd2dd4ac69 Merge pull request #6153 from MervinPraison/claude/issue-6150-20261031
fix: isolate AG-UI stream events per run to stop cross-user token leak
2026-10-31 07:38:17 +00:00
praisonai-triage-agent[bot] 95fb1b6c8c Merge pull request #6148 from MervinPraison/claude/issue-6146-20261031
fix: reject negative maxEntries in TS Memory/FileMemory (prevents add() hang)
2026-10-31 02:48:01 +00:00
praisonai-triage-agent[bot] 2bd1d5eef9 Release v4.7.22 2026-10-30 18:10:58 +00:00
praisonai-triage-agent[bot] 325ae1c8e9 Merge pull request #6145 from MervinPraison/claude/issue-6144-20261030
fix: remove unreferenced free wrappers in tools/registry.py
2026-10-30 17:52:43 +00:00
praisonai-triage-agent[bot] 04f9f4e69e Merge pull request #6141 from MervinPraison/claude/issue-6140-20261030
fix: config-only outbound lifecycle hooks for the gateway (gateway.hooks_outbound)
2026-10-30 10:43:20 +00:00
praisonai-triage-agent[bot] 1bee2c900f Merge pull request #6139 from MervinPraison/claude/issue-6138-20261030
fix: enforce notification policy (categories, quiet hours, detail) on proactive sends
2026-10-30 09:52:42 +00:00
praisonai-triage-agent[bot] 2a7b915a9a Merge pull request #6137 from MervinPraison/claude/issue-6136-20261030
fix: wrapper gaps — Replay AsyncBridge, tools LazyCache, sync provider offload
2026-10-30 09:41:49 +00:00
praisonai-triage-agent[bot] a30ab29540 Merge pull request #6135 from MervinPraison/claude/issue-6134-20261030
fix: import side effects, launch() source scanning, async MCP tool in running loop
2026-10-30 08:02:25 +00:00
praisonai-triage-agent[bot] 91b62a1b53 Merge pull request #6131 from MervinPraison/claude/issue-6128-20261030
fix: drop unsupported sampling params for reasoning models on native OpenAI client
2026-10-30 04:43:14 +00:00
23794e34be fix: input-guardrail rejection returns fixed string; lock learned-rule updates (#6104)
* fix: return fixed blocked string on input-guardrail rejection; lock learned-rule read-modify-write (fixes #5920)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: expose input-guardrail rejection reason via last_guardrail_error

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-30 05:35:28 +01:00
praisonai-triage-agent[bot] fd6d087a4a Merge pull request #6127 from MervinPraison/claude/issue-6126-20261029
fix: remove orphaned async helpers in praisonaiagents/agent (dead code)
2026-10-29 17:41:25 +00:00
praisonai-triage-agent[bot] 33a09d3f62 Merge pull request #6102 from MervinPraison/claude/issue-6032-20261028
fix: gateway Telegram resolves inline-button taps without a second getUpdates poller
2026-10-29 12:46:00 +00:00
praisonai-triage-agent[bot] c4c67744f7 Merge pull request #6124 from MervinPraison/claude/issue-6122-20261029
fix: queue instead of interrupt while a turn is mid-subagent or mid-compaction
2026-10-29 10:20:56 +00:00
praisonai-triage-agent[bot] 950c342cb3 Merge pull request #6125 from MervinPraison/claude/issue-6123-20261029
fix: gateway speaks systemd sd_notify (Type=notify, READY/WATCHDOG/STOPPING)
2026-10-29 10:16:48 +00:00
praisonai-triage-agent[bot] daacad88ef Merge pull request #6121 from MervinPraison/claude/issue-6119-20261029
fix: render platform-native @mention for a canonical identity (bots)
2026-10-29 09:43:19 +00:00
praisonai-triage-agent[bot] c2cc8c3e3c Merge pull request #6117 from MervinPraison/claude/issue-6116-20261029
fix: await async workflow steps, preserve user task graph in AgentTeam, surface failed-branch errors
2026-10-29 09:06:00 +00:00
praisonai-triage-agent[bot] abdc13439e Merge pull request #6114 from MervinPraison/claude/issue-5180-20261029
fix: replace deprecated video model IDs in recipe prompts
2026-10-29 00:47:33 +00:00
praisonai-triage-agent[bot] f85f5b05b4 Merge pull request #6113 from MervinPraison/claude/issue-5835-20261028
fix: trim per-construction import overhead from Agent.__init__ hot path
2026-10-29 00:31:13 +00:00
praisonai-triage-agent[bot] 2c6bdb9bca Merge pull request #6112 from MervinPraison/claude/issue-5051-20261028
fix: exclude compaction summary from session search scoring
2026-10-29 00:25:49 +00:00
praisonai-triage-agent[bot] 4a111a9584 Merge pull request #6108 from MervinPraison/claude/issue-5061-20261028
fix: let after_agent plugins block or rewrite the final response
2026-10-29 00:19:42 +00:00
praisonai-triage-agent[bot] d7d3a84e49 Merge pull request #6110 from MervinPraison/claude/issue-5744-20261028
fix: offline bot turns via LocalBot injectable stdin/stdout
2026-10-29 00:15:32 +00:00
praisonai-triage-agent[bot] c6f8b7b2be Merge pull request #6111 from MervinPraison/claude/issue-5741-20261028
fix: atomic RAG hierarchy save and warn on unreadable index state
2026-10-29 00:07:23 +00:00
praisonai-triage-agent[bot] 959e34691a Merge pull request #6109 from MervinPraison/claude/issue-6041-20261028
fix: raised tool exception ends the turn on achat() like chat()
2026-10-28 23:48:19 +00:00
praisonai-triage-agent[bot] 27de594308 Merge pull request #6107 from MervinPraison/claude/issue-6033-20261028
fix: stable memory identity for gateway agents across restarts and clones
2026-10-28 23:37:56 +00:00
praisonai-triage-agent[bot] 85483d7e87 Merge pull request #6105 from MervinPraison/claude/issue-6015-20261028
fix: replay step events keep each position's node_id when a step object is reused (fixes #6015)
2026-10-28 23:21:04 +00:00
praisonai-triage-agent[bot] 06a7467cbe Merge pull request #6103 from MervinPraison/claude/issue-5821-20261028
fix: fire BEFORE_LLM/AFTER_LLM hooks on the custom-LLM path
2026-10-28 23:14:02 +00:00
praisonai-triage-agent[bot] 7c1fbd767b Merge pull request #5996 from MervinPraison/claude/issue-5995-20261026
fix: price prompt-cache tokens and prefer provider-reported cost in spend accounting
2026-10-28 12:43:18 +00:00
25743d02de fix: doctor gateway security check respects unknown_user_policy (#6046)
* fix: make doctor gateway security check respect unknown_user_policy (fixes #5092)

The gateway_security doctor check reported 'bot responds to EVERYONE!'
for any channel without an allowlist, even under the default
unknown_user_policy=deny where unknown DMs are dropped. This is the
same misleading text #5112 removed from the startup banner. Flag
open access only for policy=allow; warn that DMs are dropped for deny.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: doctor treats any non-pair unknown_user_policy as deny, matching runtime

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-28 12:55:29 +01:00
b125811071 fix: recall stored facts on sqlite/chroma/mem0 memory backends (#6058)
* fix: recall stored facts on sqlite/chroma/mem0 memory backends (fixes #6040)

MemoryConfig.prefetch now defaults to None (auto): turn-start prefetch runs
for the full Memory class, whose system-prompt context is empty without a
query, and stays off for FileMemory. Explicit True/False still force it.
Memory.store_long_term/store_short_term stamp the store's user_id into
metadata so user-scoped recall finds facts saved via agent.store_memory().

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: share one sqlite store in cross-user recall isolation test

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: set project root in headless output_file test so contained writes land in tmp_path

The #5770 output_file containment rejects writes outside PRAISONAI_PROJECT_ROOT/cwd,
so this test failed on main too. The guard is unchanged; the test now points the
project root at tmp_path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-28 12:55:00 +01:00
1d9a51b3b7 fix: goal resume across processes, typed undo snapshot, honest durable-resume docs (#6050)
* fix: resume goals in a fresh process, type the undo snapshot, stop promising boot resume (fixes #6028)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: resume docs require durable=True and the same journal

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: scope headless YAML output_file test to its tmp project root

#5770 contains task output_file writes in PRAISONAI_PROJECT_ROOT (or cwd),
so the test's tmp_path writes were skipped and failed on main too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-28 12:50:30 +01:00
praisonai-triage-agent[bot] 7a7bcaceed Merge pull request #6051 from MervinPraison/claude/issue-6021-20261026
fix: PRAISON_SHELL=sandboxed contains every command, not only ones with operators
2026-10-28 11:39:41 +00:00
praisonai-triage-agent[bot] 605938ae4d Merge pull request #6049 from MervinPraison/claude/issue-6020-20261026
fix: safe mode no longer auto-approves edit_file/apply_patch
2026-10-28 11:39:39 +00:00
praisonai-triage-agent[bot] 753cb923b1 Merge pull request #6056 from MervinPraison/claude/issue-6044-20261026
fix: praisonai loop crashes with TypeError on timeout; loop now iterates by default
2026-10-28 11:39:00 +00:00
praisonai-triage-agent[bot] 1606b96080 Merge pull request #6055 from MervinPraison/claude/issue-6043-20261026
fix: real /cost totals in code TUI and correct model price matching
2026-10-28 11:38:16 +00:00
praisonai-triage-agent[bot] 5d1811d5dd Merge pull request #6100 from MervinPraison/claude/issue-6099-20261028
fix: let praisonai.channels plugins declare a standalone sender for gateway-less scheduled delivery
2026-10-28 10:13:25 +00:00
praisonai-triage-agent[bot] 24f13442d8 Merge pull request #6097 from MervinPraison/claude/issue-6096-20261028
fix: only send ImageAgent style when explicitly set
2026-10-28 08:57:36 +00:00
praisonai-triage-agent[bot] 3a2c0f1e5e Merge pull request #6095 from MervinPraison/claude/issue-6094-20261028
fix: never pair wildcard CORS origin with credentials (AgentOS, jobs server)
2026-10-28 08:43:23 +00:00
praisonai-triage-agent[bot] 15a11e73bd Merge pull request #6093 from MervinPraison/claude/issue-6092-20261028
fix: tool-pair safe handoff context and enforced delegate/telemetry timeouts
2026-10-28 07:55:25 +00:00
praisonai-triage-agent[bot] e67159e140 Merge pull request #6052 from MervinPraison/claude/issue-6036-20261026
fix(scheduler): don't delete one-shot jobs at claim time; record abandoned runs
2026-10-27 21:38:36 +00:00
praisonai-triage-agent[bot] 5e1401da9d Merge pull request #6061 from MervinPraison/claude/issue-6024-20261026
fix: distinct session ids must never share a session file
2026-10-27 21:07:27 +00:00
praisonai-triage-agent[bot] 741a41fb7d Merge pull request #6065 from MervinPraison/claude/issue-6037-20261026
fix: deliver background subagent results to the originating chat and list them in /tasks
2026-10-27 21:00:35 +00:00
a5dca259b0 fix: only forward style to dall-e-3 in ImageAgent OpenAI calls (#6077)
* fix: only forward style to dall-e-3 in ImageAgent OpenAI calls (fixes #6076)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: assert style key is absent for non-dall-e-3 models in ImageAgent test

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-27 19:56:48 +01:00
59fb20af8e fix: non-interactive per-channel gateway config lifecycle (#6082)
* fix: add non-interactive per-channel gateway config lifecycle (fixes #6079)

Adds 'praisonai gateway channels add|update|disable|remove' and an
importable edit_gateway_channel() helper. Each edit is a surgical
read-modify-write of channels:, validated against GatewayConfigSchema
before an atomic write, so invalid mutations are never persisted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: honour parent --config, legacy platform formats, env-resolved validation and last-channel guard in gateway channel edits

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: lock gateway channel edits and resolve ${VAR} platform before legacy conversion

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-27 19:56:43 +01:00
f9e058f939 fix: enforce max_budget and time caps on provider/model agents (#6062)
* fix: enforce max_budget and time caps on provider/model agents (fixes #6029)

- Count every call of the custom-LLM (provider/model) tool loop in the
  Agent's cost/token totals through one accounting helper, so max_budget,
  on_budget_exceeded and the autonomy spend caps fire mid-loop.
- Turn ExecutionConfig.max_execution_time and run_autonomous timeout_seconds
  into a deadline on the existing per-turn cancel token; the loop guard's
  per-turn limit follows max_execution_time (120s default kept).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: stop custom-LLM retries after budget exhaustion and report turn timeouts/budget stops in run_autonomous

- Refuse a provider/model turn before any request once max_budget is spent (stop mode).
- run_autonomous(_async): a turn cut by max_execution_time returns a failed timeout result.
- run_autonomous(_async): BudgetExceededError keeps the typed budget_exhausted result when an autonomy cap applies.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: stub the live litellm module in #6029 tests so evicted-module order cannot bypass the stub

tests/unit/embedding/test_embedding.py removes litellm from sys.modules.
LLM then imports a fresh module at call time, while these tests had patched
the module object bound at collection, so the real client ran and the
network guard failed them on CI. Resolve litellm inside the fixture instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: bill fallback_models spend to the agent's max_budget on the custom-LLM path

After rebasing onto main (#6053 fallback walk), the usage sink only matched
the primary LLM instance, so a turn answered by a fallback model escaped
cost tracking. Bind the sink per attempt to the LLM actually called.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: price fallback-model spend as the model that answered; isolate Agent default-model cache in #6029 tests

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-27 19:56:38 +01:00
e0bdf9648b fix: make inert GuardrailConfig.on_fail, ToolConfig line caps and rerank=True work or fail loud (#6060)
* fix: make inert GuardrailConfig.on_fail, ToolConfig line caps and rerank=True work or fail loud (fixes #6042)

- Agent() rejects GuardrailConfig.on_fail other than 'retry' (only policy
  implemented); presets no longer set on_fail; docstring no longer claims
  guardrails='strict' is a preset.
- ToolConfig.output_max_lines / output_direction now applied in the sync
  tool-output truncation block (line cap, then char cap).
- Agent.rag uses SimpleReranker when rerank=True without rerank_model;
  metadata['reranked'] reports whether a reranker actually ran.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: apply line cap to short lines, honour output_direction for dict results, rerank SearchResultItem hits

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: point headless YAML test's project root at tmp_path so contained output_file writes land

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: report backend (rerank_model) reranking in RAG metadata["reranked"]

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-27 19:56:32 +01:00
praisonai-triage-agent[bot] fbfe8fa13c Release v4.7.21 2026-10-27 12:12:34 +00:00
praisonai-triage-agent[bot] 4a9dcdcd8f Release v4.7.20 2026-10-27 11:18:32 +00:00
praisonai-triage-agent[bot] 8bd67b83bc Merge pull request #6085 from MervinPraison/claude/issue-6084-20261027
fix: refuse agent sends to unattested explicit chat destinations
2026-10-27 10:20:09 +00:00
praisonai-triage-agent[bot] b8fd43457d Merge pull request #6083 from MervinPraison/claude/issue-6080-20261027
fix: enforce allow-always grant TTL on the in-memory hot path
2026-10-27 10:01:33 +00:00
praisonai-triage-agent[bot] 274acbdca1 Merge pull request #6081 from MervinPraison/claude/issue-6078-20261027
fix: chunk over-cap streamed replies in DraftStreamer.finalize
2026-10-27 09:47:47 +00:00
praisonai-triage-agent[bot] ea1bca27b0 Merge pull request #5796 from MervinPraison/claude/issue-5795-20261013
fix: stop tool/MCP queue wait from timing out healthy calls
2026-10-27 09:32:36 +00:00
praisonai-triage-agent[bot] 78e7e59dbd Merge pull request #6073 from MervinPraison/claude/issue-6072-20261027
fix: harden backend stream bridge, async tool pool and tool circuit breaker
2026-10-27 08:40:39 +00:00
praisonai-triage-agent[bot] 2eea6c6dcc Merge pull request #6075 from MervinPraison/claude/issue-6074-20261027
fix: MongoDBStateStore reuses storage adapter driver and fixes TTL TypeError
2026-10-27 08:32:10 +00:00
praisonai-triage-agent[bot] e7076d0949 Release v4.7.19 2026-10-26 22:19:43 +00:00
153e4c8078 fix: make completion promise the only autonomy success signal (#6064)
* fix: make completion promise the only autonomy success signal (fixes #6027)

When a completion_promise is configured, the tool_completion, keyword,
direct-stage and no_tool_calls heuristics no longer end the run with
success=True in run_autonomous/run_autonomous_async. Promise-less runs are
unchanged. The async tool path now increments _autonomy_turn_tool_count for
sync/async parity, and `praisonai loop` sets mode="iterative" so
--completion-promise/--max-iterations take effect without --level full_auto.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: tell the model the completion promise and only count executed async tools

Addresses review on #6064: SDK autonomy loops now append the expected
<promise> tag to the prompt (unless already present in the prompt or
instructions), and the async per-turn tool count is incremented only after
the tool runs so BEFORE_TOOL-blocked calls cannot trigger tool_completion.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-26 22:20:59 +01:00
4be3be0797 fix: require approval for GitHub write tools and scope git to repo_path (#6063)
* fix: require approval for GitHub write tools and scope git to repo_path (fixes #6023)

- Register github_create_branch/commit_and_push/create_pull_request as
  high-risk and add them to the default deny preset, so unattended agents
  need an explicit allow (same as execute_command).
- Add optional repo_path (cwd for every git/gh call) and paths args.
- Stage with 'git add -u' (+ explicit paths) after the branch-safety
  checks, so untracked files are not swept in and a refusal leaves the
  index untouched.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: scope github_commit_and_push staging to the working directory

git add -u with no pathspec stages tracked edits across the whole
repository, so a call from a subdirectory could publish unrelated sibling
changes. Use 'git add -u -- .' and scope the no-changes status check the
same way.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-26 22:20:54 +01:00
ebf0a1b275 fix: run kanban dispatcher git work off the event loop (#6059)
* fix: run kanban dispatcher git work off the event loop (fixes #6039)

- dispatch_once / _spawn_worker / _shutdown hand _cleanup_completed_tasks
  and _prepare_worktree to a worker thread, serialised by a class-level
  lock so integrations never run git concurrently in the base checkout.
- Workers start in their own session; shutdown SIGTERMs every worker
  group first, waits for all of them off the loop, then SIGKILLs groups
  that are still alive.
- Sync helpers are unchanged, so the CLI one-shot dispatch path keeps
  working.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: clean up cancelled worktree prep and always SIGKILL worker groups on shutdown

- Cancelling dispatch during worktree preparation now waits for the git
  thread, discards the unused worktree/branch, closes the run and releases
  the claim before re-raising.
- Shutdown SIGKILLs every worker's process group even when the worker
  itself already exited, so SIGTERM-ignoring descendants cannot survive.
- Tests: new cancellation test; descendant test uses a marker file and a
  SIGTERM-ignoring child instead of os.kill(pid, 0), which zombies pass.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-26 22:20:46 +01:00
c25c5f042d fix: make loop-guard turn time limit configurable and raise the default (fixes #6026) (#6057)
* fix: make loop-guard turn time limit configurable via ExecutionConfig.max_execution_time (fixes #6026)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: clarify that only ExecutionConfig.max_execution_time=0 disables the turn time limit

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-26 22:20:41 +01:00
58fbee09e4 fix: walk fallback_models on the custom-LLM chat/achat path (#6053)
* fix: walk fallback_models on the custom-LLM chat/achat path (fixes #6030)

provider/model, dict, base_url and model-object agents call
LLM.get_response* directly and turned any primary-model outage into a
None turn without trying a single fallback model. Wrap that call so a
fallback-class error (per classify_llm_error) moves to the next entry in
fallback_models via a throwaway per-call LLM, emitting MODEL_FALLBACK.
self.llm_instance is never mutated, so concurrent turns keep the primary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: keep base_url for bare-name fallbacks and skip fallback after a tool ran

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-26 22:20:36 +01:00
7c64856641 fix: kanban dispatcher re-runs healthy long tasks and orphans workers (#6048)
* fix: kanban dispatcher heartbeats its live workers instead of re-running them (fixes #6025)

The dispatcher stamped a worker's heartbeat only at spawn, so any task
running longer than claim TTL + stale timeout (~30 min by default) was
reclaimed while healthy, re-dispatched, and the first worker orphaned.

- Renew lease/heartbeat for every live child before the reclaim sweep;
  terminate a child whose claim was lost.
- Never overwrite a running worker's handle in running_tasks.
- Close a reclaimed task's open run as 'crashed' and count the failure.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: close reclaimed kanban run atomically and keep lost-claim worktree tracking

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: log run_closed when reclaim closes a run; scope headless output_file test to its project root

The reclaim sweep now records the usual run_closed event in the same
transaction that closes the abandoned run. test_output_file_and_metrics_json
writes under tmp_path, which the #5770 project-root guard rejects; point
PRAISONAI_PROJECT_ROOT at tmp_path so the test checks the written files
without loosening the guard. This test already fails the same way on main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-26 22:20:32 +01:00
ee454013b0 fix: keep gateway scheduler tick alive on errors (#6047)
* fix: keep gateway scheduler tick alive on errors (fixes #6035)

A tick that raises (store lock I/O such as EMFILE, a malformed scheduler:
block) is now logged and retried with capped backoff instead of ending
_scheduler_task for good. _build_run_policy tolerates a non-mapping
scheduler: block by warning and using the fail-closed defaults.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: cap scheduler backoff exponent and scope headless output_file test to its project root

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix: whitespace in headless output_file test

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: MervinPraison <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-10-26 22:20:27 +01:00