aindy-runtime 2.29.2__tar.gz → 2.31.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (490) hide show
  1. aindy_runtime-2.31.0/AINDY/_version.py +1 -0
  2. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/tool_registry.py +38 -6
  3. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/effect_compensation.py +53 -1
  4. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/condition_codes.py +2 -1
  5. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/effect_ledger.py +90 -3
  6. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/syscall_dispatcher.py +25 -13
  7. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/syscall_registry.py +75 -0
  8. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/async_job_service.py +58 -0
  9. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/metrics.py +1 -1
  10. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/runtime_agent_defaults.py +1 -0
  11. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/scheduler_service.py +2 -2
  12. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/memory/orchestrator.py +8 -8
  13. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/nodus_execution_service.py +13 -6
  14. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime_only.py +70 -0
  15. {aindy_runtime-2.29.2/aindy_runtime.egg-info → aindy_runtime-2.31.0}/PKG-INFO +2 -2
  16. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/README.md +1 -1
  17. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0/aindy_runtime.egg-info}/PKG-INFO +2 -2
  18. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/DECISION_LOG.md +40 -0
  19. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/RELEASE_CHECKLIST.md +3 -1
  20. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/SANDBOX_ESCAPE_AUDIT.md +63 -1
  21. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/SYSCALL_REFERENCE.md +2 -0
  22. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/SYSCALL_SYSTEM.md +166 -48
  23. aindy_runtime-2.29.2/AINDY/_version.py +0 -1
  24. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/__init__.py +0 -0
  25. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/agent_coordinator.py +0 -0
  26. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/agent_event_service.py +0 -0
  27. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/agent_event_types.py +0 -0
  28. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/agent_message_bus.py +0 -0
  29. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/agent_runtime/__init__.py +0 -0
  30. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/agent_runtime/approvals.py +0 -0
  31. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/agent_runtime/creation.py +0 -0
  32. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/agent_runtime/execution.py +0 -0
  33. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/agent_runtime/planner_backends.py +0 -0
  34. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/agent_runtime/planning.py +0 -0
  35. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/agent_runtime/presentation.py +0 -0
  36. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/agent_runtime/replay.py +0 -0
  37. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/agent_runtime/shared.py +0 -0
  38. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/agent_runtime.py +0 -0
  39. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/agent_tools.py +0 -0
  40. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/authority_negotiation.py +0 -0
  41. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/autonomous_controller.py +0 -0
  42. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/autonomous_window.py +0 -0
  43. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/capability_policy.py +0 -0
  44. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/capability_service.py +0 -0
  45. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/dead_letter_service.py +0 -0
  46. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/runtime_api.py +0 -0
  47. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/runtime_guardrails.py +0 -0
  48. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/step_references.py +0 -0
  49. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/stuck_run_service.py +0 -0
  50. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/stuck_run_watchdog.py +0 -0
  51. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/tool_session.py +0 -0
  52. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/tool_syscalls.py +0 -0
  53. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/agents/tool_worker.py +0 -0
  54. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/apscheduler/__init__.py +0 -0
  55. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/apscheduler/events.py +0 -0
  56. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/apscheduler/executors/__init__.py +0 -0
  57. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/apscheduler/executors/pool.py +0 -0
  58. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/apscheduler/jobstores/__init__.py +0 -0
  59. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/apscheduler/jobstores/base.py +0 -0
  60. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/apscheduler/schedulers/__init__.py +0 -0
  61. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/apscheduler/schedulers/background.py +0 -0
  62. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/apscheduler/triggers/__init__.py +0 -0
  63. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/apscheduler/triggers/cron.py +0 -0
  64. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/apscheduler/triggers/date.py +0 -0
  65. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/apscheduler/triggers/interval.py +0 -0
  66. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/auth/__init__.py +0 -0
  67. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/auth/api_key_auth.py +0 -0
  68. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/cli.py +0 -0
  69. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/config.py +0 -0
  70. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/__init__.py +0 -0
  71. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/agent_continuation.py +0 -0
  72. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/agent_run_rehydration.py +0 -0
  73. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/distributed_queue.py +0 -0
  74. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_dispatcher.py +0 -0
  75. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_envelope.py +0 -0
  76. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_environment.py +0 -0
  77. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_gate.py +0 -0
  78. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_guard.py +0 -0
  79. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_helper.py +0 -0
  80. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_pipeline/__init__.py +0 -0
  81. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_pipeline/context.py +0 -0
  82. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_pipeline/pipeline.py +0 -0
  83. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_pipeline/resources.py +0 -0
  84. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_pipeline/runtime_state.py +0 -0
  85. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_pipeline/shared.py +0 -0
  86. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_pipeline/signals.py +0 -0
  87. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_recall.py +0 -0
  88. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_record_service.py +0 -0
  89. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_score.py +0 -0
  90. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_service.py +0 -0
  91. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_signal_helper.py +0 -0
  92. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/execution_unit_service.py +0 -0
  93. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/flow_continuation.py +0 -0
  94. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/flow_history_fold.py +0 -0
  95. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/flow_run_rehydration.py +0 -0
  96. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/health_liveness_signal.py +0 -0
  97. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/memory_capture_guard.py +0 -0
  98. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/next_action.py +0 -0
  99. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/next_action_dispatch.py +0 -0
  100. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/observability_events.py +0 -0
  101. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/pending_request.py +0 -0
  102. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/reasoning_signal.py +0 -0
  103. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/request_metric_writer.py +0 -0
  104. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/response_adapter.py +0 -0
  105. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/result_path.py +0 -0
  106. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/resume_reconstruction.py +0 -0
  107. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/resume_watchdog.py +0 -0
  108. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/retry_policy.py +0 -0
  109. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/route_execution_guard.py +0 -0
  110. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/router_guard.py +0 -0
  111. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/scheduler_queue_signal.py +0 -0
  112. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/system_event_retention.py +0 -0
  113. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/system_event_service.py +0 -0
  114. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/system_event_types.py +0 -0
  115. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/verifier.py +0 -0
  116. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/wait_condition.py +0 -0
  117. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/core/wait_rehydration.py +0 -0
  118. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/__init__.py +0 -0
  119. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/alembic_head.py +0 -0
  120. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/base.py +0 -0
  121. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/create_all.py +0 -0
  122. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/dao/__init__.py +0 -0
  123. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/dao/memory_node_dao.py +0 -0
  124. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/dao/memory_trace_dao.py +0 -0
  125. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/database.py +0 -0
  126. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/model_registry.py +0 -0
  127. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/__init__.py +0 -0
  128. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/agent.py +0 -0
  129. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/agent_event.py +0 -0
  130. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/agent_registry.py +0 -0
  131. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/agent_run.py +0 -0
  132. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/api_key.py +0 -0
  133. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/background_task_lease.py +0 -0
  134. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/capability.py +0 -0
  135. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/dynamic_flow.py +0 -0
  136. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/dynamic_node.py +0 -0
  137. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/effect_record.py +0 -0
  138. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/effect_reversal.py +0 -0
  139. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/event_edge.py +0 -0
  140. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/execution_unit.py +0 -0
  141. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/flow_run.py +0 -0
  142. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/job_log.py +0 -0
  143. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/memory_metrics.py +0 -0
  144. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/memory_node_history.py +0 -0
  145. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/memory_trace.py +0 -0
  146. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/memory_trace_node.py +0 -0
  147. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/nodus_scheduled_job.py +0 -0
  148. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/nodus_workflow.py +0 -0
  149. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/request_metric.py +0 -0
  150. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/system_event.py +0 -0
  151. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/system_health_log.py +0 -0
  152. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/system_state_snapshot.py +0 -0
  153. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/user.py +0 -0
  154. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/user_identity.py +0 -0
  155. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/waiting_flow_run.py +0 -0
  156. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/models/webhook_subscription.py +0 -0
  157. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/mongo_setup.py +0 -0
  158. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/schema_contract.py +0 -0
  159. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/db/schema_ops.py +0 -0
  160. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/deepseek_config.json +0 -0
  161. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/exception_handlers.py +0 -0
  162. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/__init__.py +0 -0
  163. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/cancellation.py +0 -0
  164. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/circuit_breaker.py +0 -0
  165. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/clock.py +0 -0
  166. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/errors.py +0 -0
  167. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/event_bus.py +0 -0
  168. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/payload_identity.py +0 -0
  169. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/redis_wait_registry.py +0 -0
  170. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/resource_manager.py +0 -0
  171. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/resume_spec.py +0 -0
  172. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/scheduler/__init__.py +0 -0
  173. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/scheduler/common.py +0 -0
  174. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/scheduler/core.py +0 -0
  175. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/scheduler/cross_instance.py +0 -0
  176. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/scheduler/dispatch.py +0 -0
  177. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/scheduler/engine.py +0 -0
  178. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/scheduler/persistence.py +0 -0
  179. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/scheduler/recovery.py +0 -0
  180. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/scheduler/waits.py +0 -0
  181. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/scheduler_engine.py +0 -0
  182. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/syscall_handlers.py +0 -0
  183. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/syscall_outcome.py +0 -0
  184. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/syscall_versioning.py +0 -0
  185. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/kernel/tenant_context.py +0 -0
  186. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/llms-full.txt +0 -0
  187. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/llms.txt +0 -0
  188. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/main.py +0 -0
  189. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/__init__.py +0 -0
  190. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/bridge.py +0 -0
  191. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/cascade_cleanup.py +0 -0
  192. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/embedding_jobs.py +0 -0
  193. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/embedding_migration.py +0 -0
  194. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/embedding_providers.py +0 -0
  195. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/embedding_service.py +0 -0
  196. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/ingest_queue.py +0 -0
  197. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/memory_address_space.py +0 -0
  198. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/memory_capture_engine.py +0 -0
  199. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/memory_helpers.py +0 -0
  200. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/memory_ingest_service.py +0 -0
  201. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/memory_persistence.py +0 -0
  202. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/memory_scoring_service.py +0 -0
  203. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/native/memory_bridge_rs/Cargo.lock +0 -0
  204. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/native/memory_bridge_rs/Cargo.toml +0 -0
  205. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/native/memory_bridge_rs/build.rs +0 -0
  206. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/native/memory_bridge_rs/src/cpp_bridge.rs +0 -0
  207. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/native/memory_bridge_rs/src/lib.rs +0 -0
  208. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/native_bridge.py +0 -0
  209. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/memory/nodus_memory_bridge.py +0 -0
  210. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/middleware.py +0 -0
  211. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/nodus/__init__.py +0 -0
  212. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/nodus/runtime/__init__.py +0 -0
  213. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/nodus/runtime/aindy_runtime.py +0 -0
  214. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/nodus/runtime/embedding.py +0 -0
  215. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/nodus/runtime/memory_bridge.py +0 -0
  216. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/nodus/stdlib/.nodus/deps.json +0 -0
  217. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/AdminApiErrorBoundary-B5wptpSZ.js +0 -0
  218. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/AdminUsersPanel-BUlTE9Y-.js +0 -0
  219. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/AgentApprovalInbox-BpjmqlH0.js +0 -0
  220. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/AgentConsole-CoahvZo1.js +0 -0
  221. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/AgentRegistry-DlhiRy7t.js +0 -0
  222. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/BarChart-BARu4anf.js +0 -0
  223. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/DeadLetterQueuePanel-D-YmUULx.js +0 -0
  224. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/EmptyState-B5wptpSZ.js +0 -0
  225. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/ExecutionConsole-DtBvEcLo.js +0 -0
  226. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/FlowEngineConsole-DvFeabWY.js +0 -0
  227. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/HealthDashboard-CMnm3vy9.js +0 -0
  228. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/LoadingPanel-B5wptpSZ.js +0 -0
  229. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/ObservabilityDashboard-D62qwI90.js +0 -0
  230. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/RippleTraceViewer-Bl97x1HW.js +0 -0
  231. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/SurfacePrimitives-Hxo830zO.js +0 -0
  232. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/Toast-B5wptpSZ.js +0 -0
  233. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/WebhooksPanel-BipVUPG4.js +0 -0
  234. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/_core-B5wptpSZ.js +0 -0
  235. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/agent-0UTI_rvD.js +0 -0
  236. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/index-CX2b1AQf.js +0 -0
  237. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/index-D3fHGGwp.css +0 -0
  238. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/assets/operator-DYpSxaty.js +0 -0
  239. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform/dist/index.html +0 -0
  240. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/__init__.py +0 -0
  241. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/agent_plugin_contracts.py +0 -0
  242. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/anthropic_client.py +0 -0
  243. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/api_key_service.py +0 -0
  244. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/app_runtime.py +0 -0
  245. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/async_execution_context.py +0 -0
  246. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/azure_openai_client.py +0 -0
  247. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/bootstrap_contract.py +0 -0
  248. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/bootstrap_graph.py +0 -0
  249. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/cache_backend.py +0 -0
  250. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/connector_service.py +0 -0
  251. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/deepseek_client.py +0 -0
  252. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/deployment_contract.py +0 -0
  253. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/domain_health.py +0 -0
  254. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/egress_guard.py +0 -0
  255. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/email_channel.py +0 -0
  256. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/event_service.py +0 -0
  257. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/event_trace_service.py +0 -0
  258. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/extension_abi.py +0 -0
  259. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/extension_boundary.py +0 -0
  260. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/extension_capabilities.py +0 -0
  261. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/extension_execution_model.py +0 -0
  262. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/extension_policy.py +0 -0
  263. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/extension_provenance.py +0 -0
  264. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/extension_provenance_inventory.py +0 -0
  265. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/extension_runtime_api.py +0 -0
  266. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/extension_runtime_inventory.py +0 -0
  267. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/extension_signing.py +0 -0
  268. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/extension_worker.py +0 -0
  269. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/external_call_service.py +0 -0
  270. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/fs_guard.py +0 -0
  271. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/genai_telemetry.py +0 -0
  272. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/health_service.py +0 -0
  273. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/job_recovery.py +0 -0
  274. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/kernel_proc_reader.py +0 -0
  275. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/leadership.py +0 -0
  276. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/llm_budget.py +0 -0
  277. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/llm_client.py +0 -0
  278. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/log_config.py +0 -0
  279. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/mcp_client.py +0 -0
  280. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/mcp_server.py +0 -0
  281. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/memory_runtime.py +0 -0
  282. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/node_registry.py +0 -0
  283. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/nodus_script_store.py +0 -0
  284. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/openai_client.py +0 -0
  285. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/otel.py +0 -0
  286. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/outbound_http.py +0 -0
  287. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/platform_loader.py +0 -0
  288. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/plugin_artifacts.py +0 -0
  289. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/plugin_host.py +0 -0
  290. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/public_contract.py +0 -0
  291. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/rate_limiter.py +0 -0
  292. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/recovery_jobs.py +0 -0
  293. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/registry.py +0 -0
  294. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/registry_contracts.py +0 -0
  295. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/response_adapters.py +0 -0
  296. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/runtime_callback_host.py +0 -0
  297. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/runtime_callback_worker.py +0 -0
  298. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/runtime_compatibility.py +0 -0
  299. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/sandbox_certification.py +0 -0
  300. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/sandbox_runner.py +0 -0
  301. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/secret_broker.py +0 -0
  302. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/support_metrics_service.py +0 -0
  303. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/system_state_service.py +0 -0
  304. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/token_meter.py +0 -0
  305. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/trace_context.py +0 -0
  306. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/user_ids.py +0 -0
  307. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/watcher_contract.py +0 -0
  308. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/platform_layer/watcher_service.py +0 -0
  309. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/plugins/nodes/__init__.py +0 -0
  310. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/route_inventory.json +0 -0
  311. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/__init__.py +0 -0
  312. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/agent_router.py +0 -0
  313. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/auth_router.py +0 -0
  314. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/automation_router.py +0 -0
  315. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/coordination_router.py +0 -0
  316. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/db_verify_router.py +0 -0
  317. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/flow_router.py +0 -0
  318. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/health_router.py +0 -0
  319. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/memory_metrics_router.py +0 -0
  320. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/memory_router.py +0 -0
  321. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/memory_trace_router.py +0 -0
  322. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/observability_router.py +0 -0
  323. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/path_params.py +0 -0
  324. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/platform/__init__.py +0 -0
  325. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/platform/admin_router.py +0 -0
  326. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/platform/agents_router.py +0 -0
  327. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/platform/effects_router.py +0 -0
  328. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/platform/flows_router.py +0 -0
  329. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/platform/keys_router.py +0 -0
  330. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/platform/nodes_router.py +0 -0
  331. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/platform/nodus_flow_router.py +0 -0
  332. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/platform/nodus_router.py +0 -0
  333. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/platform/nodus_schedule_router.py +0 -0
  334. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/platform/nodus_shared.py +0 -0
  335. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/platform/platform_ops_router.py +0 -0
  336. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/platform/queue_router.py +0 -0
  337. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/platform/schemas.py +0 -0
  338. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/platform/webhooks_router.py +0 -0
  339. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/platform_router.py +0 -0
  340. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/version_router.py +0 -0
  341. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routes/watcher_router.py +0 -0
  342. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/routing.py +0 -0
  343. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/__init__.py +0 -0
  344. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/agent_plan_compiler.py +0 -0
  345. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/execution_loop.py +0 -0
  346. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/execution_registry.py +0 -0
  347. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_definitions.py +0 -0
  348. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_definitions_engine.py +0 -0
  349. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_definitions_extended.py +0 -0
  350. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_definitions_memory.py +0 -0
  351. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_definitions_observability.py +0 -0
  352. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_engine/__init__.py +0 -0
  353. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_engine/entrypoints.py +0 -0
  354. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_engine/event_router.py +0 -0
  355. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_engine/fan_out.py +0 -0
  356. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_engine/graph_signature.py +0 -0
  357. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_engine/node_executor.py +0 -0
  358. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_engine/registry.py +0 -0
  359. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_engine/runner.py +0 -0
  360. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_engine/runner_completion.py +0 -0
  361. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_engine/runner_failure.py +0 -0
  362. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_engine/runner_steps.py +0 -0
  363. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_engine/serialization.py +0 -0
  364. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_engine/shared.py +0 -0
  365. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_engine/state_merge.py +0 -0
  366. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_helpers.py +0 -0
  367. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/flow_registry.py +0 -0
  368. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/memory/__init__.py +0 -0
  369. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/memory/context_builder.py +0 -0
  370. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/memory/filters.py +0 -0
  371. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/memory/memory_feedback.py +0 -0
  372. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/memory/memory_learning.py +0 -0
  373. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/memory/memory_metrics.py +0 -0
  374. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/memory/metrics_store.py +0 -0
  375. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/memory/native_scorer.py +0 -0
  376. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/memory/query_expander.py +0 -0
  377. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/memory/scorer.py +0 -0
  378. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/memory/strategies.py +0 -0
  379. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/memory/types.py +0 -0
  380. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/memory_loop.py +0 -0
  381. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/nodus_adapter.py +0 -0
  382. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/nodus_flow_compiler.py +0 -0
  383. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/nodus_runtime_adapter.py +0 -0
  384. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/nodus_schedule_service.py +0 -0
  385. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/nodus_security.py +0 -0
  386. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/nodus_worker.py +0 -0
  387. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/nodus_worker_pool.py +0 -0
  388. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/nodus_workflow_registry.py +0 -0
  389. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime/tool_simulation.py +0 -0
  390. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/runtime_plugins.json +0 -0
  391. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/schemas/__init__.py +0 -0
  392. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/schemas/auth_schemas.py +0 -0
  393. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/services/auth_service.py +0 -0
  394. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/spa_fallback.py +0 -0
  395. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/startup.py +0 -0
  396. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/system_manifest.json +0 -0
  397. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/utils/__init__.py +0 -0
  398. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/utils/normalize_encoding.py +0 -0
  399. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/utils/sanitize_text.py +0 -0
  400. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/utils/text_constraints.py +0 -0
  401. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/utils/uuid_utils.py +0 -0
  402. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/version.json +0 -0
  403. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/watcher/__init__.py +0 -0
  404. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/watcher/constants.py +0 -0
  405. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/worker/__init__.py +0 -0
  406. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/worker/__main__.py +0 -0
  407. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/worker/health_server.py +0 -0
  408. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/worker/memory_ingest_worker.py +0 -0
  409. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/worker/metric_writer_worker.py +0 -0
  410. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/worker/worker_loop.py +0 -0
  411. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/AINDY/worker.py +0 -0
  412. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/CONTRIBUTORS.md +0 -0
  413. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/LICENSE +0 -0
  414. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/MANIFEST.in +0 -0
  415. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/aindy_runtime.egg-info/SOURCES.txt +0 -0
  416. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/aindy_runtime.egg-info/dependency_links.txt +0 -0
  417. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/aindy_runtime.egg-info/entry_points.txt +0 -0
  418. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/aindy_runtime.egg-info/requires.txt +0 -0
  419. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/aindy_runtime.egg-info/top_level.txt +0 -0
  420. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/AGENT_WORKING_RULES.md +0 -0
  421. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/CHANGE_IMPACT_MATRIX.md +0 -0
  422. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/CI_OWNERSHIP.md +0 -0
  423. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/COMPARATIVE_RESEARCH_INDEX.md +0 -0
  424. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/CROSS_REPO_COMPATIBILITY.md +0 -0
  425. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/DOCSET_CHANGELOG.md +0 -0
  426. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/ERROR_HANDLING_POLICY.md +0 -0
  427. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/GITHUB_SETTINGS_CHECKLIST.md +0 -0
  428. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/INVARIANTS.md +0 -0
  429. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/INVARIANT_TEST_MAPPING.md +0 -0
  430. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/MODEL_OWNERSHIP_POLICY.md +0 -0
  431. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/RELEASE_GATES.md +0 -0
  432. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/RELEASE_STAGING.md +0 -0
  433. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/REPO_COMPATIBILITY_POLICY.md +0 -0
  434. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/RUNTIME_DOCSET_GOVERNANCE.md +0 -0
  435. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/SECURITY_POLICY.md +0 -0
  436. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/TEST_STRATEGY.md +0 -0
  437. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/governance/TRUSTING_A_GREEN_CHECK.md +0 -0
  438. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/operations/CONDITION_CODES.md +0 -0
  439. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/operations/DEGRADED_MODE_MATRIX.md +0 -0
  440. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/operations/DEGRADED_RUNTIME_MODES.md +0 -0
  441. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/operations/DEPENDENCY_CRITICALITY_MATRIX.md +0 -0
  442. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/operations/DEPLOYMENT_PROFILES.md +0 -0
  443. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/operations/DEPLOYMENT_TARGETS.md +0 -0
  444. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/operations/INCIDENT_CLASSIFICATION.md +0 -0
  445. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/operations/MACOS_CONTAINER_POLICY.md +0 -0
  446. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/operations/OPERATOR_RUNBOOK.md +0 -0
  447. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/operations/PROFILE_SUPPORT_MATRIX.md +0 -0
  448. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/operations/QUICKSTART.md +0 -0
  449. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/operations/RUNTIME_ONLY_DEPLOYMENT.md +0 -0
  450. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/AGENT_RUNTIME.md +0 -0
  451. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/APP_AGENT_REGISTRATION.md +0 -0
  452. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/ARCHITECTURE.md +0 -0
  453. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/CONNECTOR_CONTRACT.md +0 -0
  454. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/DATA_MODEL_MAP.md +0 -0
  455. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/DB_OWNERSHIP_CONTRACT.md +0 -0
  456. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/DURABLE_STATE_OWNERSHIP_CONTRACT.md +0 -0
  457. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/ECOSYSTEM_CAPABILITY_GAPS.md +0 -0
  458. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/EXECUTION_CONTRACT.md +0 -0
  459. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/EXECUTION_INVARIANTS.md +0 -0
  460. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/EXTENSION_ABI.md +0 -0
  461. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/EXTENSION_CAPABILITIES.md +0 -0
  462. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/EXTENSION_PROVENANCE.md +0 -0
  463. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/EXTENSION_TRUST_MODEL.md +0 -0
  464. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/FOUNDATIONAL_PATTERN.md +0 -0
  465. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/IDEMPOTENCY_CONTRACT.md +0 -0
  466. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/MCP_INTEGRATION.md +0 -0
  467. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/MEMORY_ADDRESS_SPACE.md +0 -0
  468. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/MEMORY_BRIDGE.md +0 -0
  469. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/MEMORY_BRIDGE_CONTRACT.md +0 -0
  470. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/NATIVE_MEMORY_BRIDGE.md +0 -0
  471. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/NODUS_DEVELOPER_GUIDE.md +0 -0
  472. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/NODUS_WORKFLOW_CONTRACT.md +0 -0
  473. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/OS_ISOLATION_LAYER.md +0 -0
  474. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/PUBLIC_API_CONTRACT.md +0 -0
  475. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/PUBLIC_RUNTIME_SURFACES.md +0 -0
  476. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/RETRY_POLICY.md +0 -0
  477. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/ROUTE_OWNERSHIP_INVENTORY.md +0 -0
  478. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/RUNTIME_BEHAVIOR.md +0 -0
  479. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/RUNTIME_BOUNDARY.md +0 -0
  480. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/RUNTIME_MODULE_MAP.md +0 -0
  481. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/RUNTIME_STABILITY_INDEX.md +0 -0
  482. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/SANDBOX_CONTRACT.md +0 -0
  483. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/SCHEMA_LIFECYCLE.md +0 -0
  484. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/SDK_CONTRACT.md +0 -0
  485. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/SECURITY_MATRIX.md +0 -0
  486. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/SECURITY_POSTURE.md +0 -0
  487. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/UI_CONTRACT.md +0 -0
  488. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/docs/runtime/WHAT_THE_RUNTIME_IS.md +0 -0
  489. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/pyproject.toml +0 -0
  490. {aindy_runtime-2.29.2 → aindy_runtime-2.31.0}/setup.cfg +0 -0
@@ -0,0 +1 @@
1
+ __version__ = "2.31.0"
@@ -156,9 +156,13 @@ def register_tool(
156
156
  on_denial: str = ON_DENIAL_FAIL,
157
157
  args_schema: Optional[dict] = None,
158
158
  result_schema: Optional[dict] = None,
159
+ effect_syscall: Optional[str] = None,
159
160
  ):
160
161
  """Register an agent tool implementation with platform metadata.
161
162
 
163
+ effect_syscall (DEC-108): the syscall whose ledger row records this tool's effect, for a tool
164
+ that only wraps one. The tool's own row then stays unlinked, so undo sees one effect once.
165
+
162
166
  args_schema (FR-33): the tool's ARGUMENT CONTRACT — a JSON-Schema-shaped object
163
167
  (``{"type": "object", "properties": {...}, "required": [...]}``) in the dispatcher's own
164
168
  dialect (`syscall_versioning.validate_payload`: ``required`` + ``properties[].type``; other
@@ -329,6 +333,7 @@ def register_tool(
329
333
  "on_denial": on_denial,
330
334
  "args_schema": dict(args_schema) if args_schema else None,
331
335
  "result_schema": dict(result_schema) if result_schema else None,
336
+ "effect_syscall": effect_syscall,
332
337
  }
333
338
  return fn
334
339
 
@@ -1222,7 +1227,29 @@ def execute_tool(
1222
1227
  ``step_index`` is the plan's tool-step index when the caller is an agent backend. It scopes
1223
1228
  the idempotency key to ONE step of the run (IDEM-14, DEC-076). Callers with no step (syscalls,
1224
1229
  MCP, extensions, direct calls) omit it and keep the run scope.
1230
+
1231
+ Effects written while the tool runs are attributed to ``run_id`` (DEC-108), which is what lets
1232
+ ``sys.v1.agent.undo`` find them.
1225
1233
  """
1234
+ from AINDY.kernel.effect_ledger import effect_run_scope
1235
+
1236
+ with effect_run_scope(run_id):
1237
+ return _execute_tool_for_run(
1238
+ tool_name, args, user_id, db,
1239
+ run_id=run_id, execution_token=execution_token, step_index=step_index,
1240
+ )
1241
+
1242
+
1243
+ def _execute_tool_for_run(
1244
+ tool_name: str,
1245
+ args: dict,
1246
+ user_id: str,
1247
+ db,
1248
+ run_id: str = None,
1249
+ execution_token: dict = None,
1250
+ step_index: int | None = None,
1251
+ ) -> dict:
1252
+ """The body of ``execute_tool``, inside the run's effect attribution."""
1226
1253
  _ensure_tools_loaded()
1227
1254
  entry = TOOL_REGISTRY.get(tool_name)
1228
1255
  if not entry:
@@ -1463,14 +1490,19 @@ def execute_tool(
1463
1490
  "AT_LEAST_ONCE", tool_name, _tool_idempotency_strict_wait_seconds(),
1464
1491
  )
1465
1492
  if _idempotent:
1466
- from AINDY.kernel.effect_ledger import resolve_effect_record
1493
+ import contextlib
1494
+
1495
+ from AINDY.kernel.effect_ledger import resolve_effect_record, unlinked_effect_scope
1467
1496
 
1497
+ # DEC-108 — a tool that wraps a syscall records its effect on the syscall's row.
1498
+ _link_scope = unlinked_effect_scope() if entry.get("effect_syscall") else contextlib.nullcontext()
1468
1499
  try:
1469
- _already, _cached = resolve_effect_record(
1470
- db, _action_id, tool_name, args or {},
1471
- # MEB-3b — attribute the effect to the caller (tenant_id == user_id).
1472
- tenant_id=str(user_id) if user_id else None,
1473
- )
1500
+ with _link_scope:
1501
+ _already, _cached = resolve_effect_record(
1502
+ db, _action_id, tool_name, args or {},
1503
+ # MEB-3b — attribute the effect to the caller (tenant_id == user_id).
1504
+ tenant_id=str(user_id) if user_id else None,
1505
+ )
1474
1506
  except Exception as exc:
1475
1507
  if _at_most_once:
1476
1508
  # DEC-089 — an unguarded run could be the second one: refuse instead.
@@ -23,6 +23,7 @@ post-conditions fail. Replay (``agent_runtime/replay.py``) *re-does*; this *undo
23
23
  from __future__ import annotations
24
24
 
25
25
  import logging
26
+ import os
26
27
  from typing import Any, Optional
27
28
 
28
29
  from sqlalchemy.orm import Session
@@ -31,6 +32,40 @@ logger = logging.getLogger(__name__)
31
32
 
32
33
  REVERSAL_STATUSES = ("reversed", "irreversible", "failed")
33
34
 
35
+ # Undo's own ledger row is linked to the run it reverses, but it is not one of that run's effects.
36
+ _UNDO_SYSCALL = "sys.v1.agent.undo"
37
+
38
+ VERIFY_FAILED_AUTO_UNDO_ENV = "AINDY_VERIFY_FAILED_AUTO_UNDO"
39
+
40
+
41
+ def verify_failed_auto_undo_enabled() -> bool:
42
+ """DEC-110 — may the Verifier reverse effects by itself? **Default OFF.**
43
+
44
+ A failed check would otherwise delete data with nobody looking, so the Verifier reports what
45
+ it could reverse and an explicit ``sys.v1.agent.undo`` does the reversing.
46
+ """
47
+ return os.getenv(VERIFY_FAILED_AUTO_UNDO_ENV, "").strip().lower() in {"1", "true", "yes", "on"}
48
+
49
+
50
+ def _compensation_context(context: Any, *, db: Session, eu: Any, record: Any, run_id: str):
51
+ """The context a compensator runs under: undo's own session, and the effect's owner.
52
+
53
+ The Verifier calls with no context, and a compensator needs both. It gets a copy, because the
54
+ session is added for this call and the caller's metadata is not ours to change.
55
+ """
56
+ from AINDY.kernel.syscall_registry import SyscallContext
57
+
58
+ metadata = dict(getattr(context, "metadata", None) or {})
59
+ metadata["_db"] = db
60
+ user_id = getattr(context, "user_id", None) or record.tenant_id or eu.user_id
61
+ return SyscallContext(
62
+ execution_unit_id=str(eu.id),
63
+ user_id=str(user_id or ""),
64
+ capabilities=list(getattr(context, "capabilities", None) or []),
65
+ trace_id=str(getattr(context, "trace_id", None) or run_id),
66
+ metadata=metadata,
67
+ )
68
+
34
69
 
35
70
  def _lookup_compensator(action_type: str):
36
71
  """Return the (compensate_callable, entry) for a syscall name, or (None, None)."""
@@ -97,9 +132,13 @@ def undo_run_effects(
97
132
  db: Session,
98
133
  context: Any = None,
99
134
  source_type: str = "agent_run",
135
+ report_only: bool = False,
100
136
  ) -> dict:
101
137
  """Reverse a run's reversible effects; surface irreversible ones.
102
138
 
139
+ With ``report_only`` nothing changes: no compensator runs, no audit row is written, and the
140
+ summary gains ``reversible``, the effects an explicit undo would attempt (DEC-110).
141
+
103
142
  Resolves the run's ``ExecutionUnit`` (by ``source_type``/``run_id``), walks its
104
143
  successful ``EffectRecord``s newest-first, and for each invokes the syscall's
105
144
  ``compensate`` hook if one is declared. Returns a summary and writes one
@@ -121,6 +160,8 @@ def undo_run_effects(
121
160
  "irreversible": [],
122
161
  "failed": [],
123
162
  }
163
+ if report_only:
164
+ summary["reversible"] = []
124
165
 
125
166
  eu = ExecutionUnitService(db).get_by_source(source_type, str(run_id))
126
167
  if eu is None:
@@ -132,6 +173,7 @@ def undo_run_effects(
132
173
  .filter(
133
174
  EffectRecord.execution_id == eu.id,
134
175
  EffectRecord.status == "success",
176
+ EffectRecord.action_type != _UNDO_SYSCALL,
135
177
  )
136
178
  .order_by(EffectRecord.created_at.desc(), EffectRecord.id.desc())
137
179
  .all()
@@ -147,6 +189,9 @@ def undo_run_effects(
147
189
  summary["already_reversed"].append(rec.action_type)
148
190
  continue
149
191
  compensator, _entry = _lookup_compensator(rec.action_type)
192
+ if report_only:
193
+ summary["reversible" if compensator is not None else "irreversible"].append(rec.action_type)
194
+ continue
150
195
  effect = {
151
196
  "effect_record_id": str(rec.id),
152
197
  "action_type": rec.action_type,
@@ -167,7 +212,12 @@ def undo_run_effects(
167
212
  continue
168
213
 
169
214
  try:
170
- receipt = compensator(effect, context)
215
+ # A savepoint, so a compensator that fails part-way leaves nothing behind and the
216
+ # session stays usable for its audit row and for every other effect.
217
+ with db.begin_nested():
218
+ receipt = compensator(
219
+ effect, _compensation_context(context, db=db, eu=eu, record=rec, run_id=str(run_id))
220
+ )
171
221
  _record_reversal(
172
222
  db, effect_record=rec, run_id=run_id, execution_id=eu.id,
173
223
  status="reversed",
@@ -185,6 +235,8 @@ def undo_run_effects(
185
235
  )
186
236
  summary["failed"].append({"action_type": rec.action_type, "error": str(exc)})
187
237
 
238
+ if report_only:
239
+ return summary
188
240
  # Durable: the audit log and compensator side effects must survive session close.
189
241
  db.commit()
190
242
  return summary
@@ -128,7 +128,8 @@ class AgentRunStatus(str, Enum):
128
128
 
129
129
  VERIFY_FAILED (AGENT-HARDEN-6): a run whose plan ran to completion but whose
130
130
  declared post-conditions did not hold. The Verifier stage marks it terminal
131
- and rolls back its reversible effects (AGENT-HARDEN-3 compensators).
131
+ and reports its reversible effects; it reverses them only when an operator
132
+ sets AINDY_VERIFY_FAILED_AUTO_UNDO (DEC-110).
132
133
  """
133
134
 
134
135
  PENDING_APPROVAL = "pending_approval"
@@ -23,6 +23,7 @@ import contextvars
23
23
  import hashlib
24
24
  import json
25
25
  import logging
26
+ import uuid
26
27
  from datetime import timedelta
27
28
  from typing import Any, Optional
28
29
 
@@ -99,6 +100,83 @@ def durable_effects_active() -> bool:
99
100
  return _durable_effects.get()
100
101
 
101
102
 
103
+ # UNDO-COMPENSATORS-1 / DEC-108 — the run an effect belongs to. `undo_run_effects` selects on
104
+ # `EffectRecord.execution_id`, and an agent tool's inner syscall dispatches under a freshly minted
105
+ # unit, so its scope cannot name the run. `execute_tool` always knows its `run_id`, including inside
106
+ # a Nodus worker subprocess, where the LLM attribution span is absent. Attribution only, like the
107
+ # tenant and session above: never part of the action_id dedup hash.
108
+ _UNLINKED = object()
109
+ _effect_run: contextvars.ContextVar[Any] = contextvars.ContextVar("aindy_effect_run", default=None)
110
+
111
+
112
+ @contextlib.contextmanager
113
+ def effect_run_scope(run_id: Any):
114
+ """Attribute effects written in this context to ``run_id``. A no-op when there is no run."""
115
+ if not run_id:
116
+ yield
117
+ return
118
+ token = _effect_run.set(str(run_id))
119
+ try:
120
+ yield
121
+ finally:
122
+ _effect_run.reset(token)
123
+
124
+
125
+ @contextlib.contextmanager
126
+ def unlinked_effect_scope():
127
+ """Leave effects written in this context unlinked from any execution unit.
128
+
129
+ For a wrapper's own ledger row when the effect it wraps records itself: linking both would
130
+ show undo one effect twice, once as reversible and once as irreversible.
131
+ """
132
+ token = _effect_run.set(_UNLINKED)
133
+ try:
134
+ yield
135
+ finally:
136
+ _effect_run.reset(token)
137
+
138
+
139
+ def _linked_execution_id(db, execution_ref: Optional[str]) -> Optional[uuid.UUID]:
140
+ """The ``execution_units.id`` an effect belongs to, or ``None``. Never raises.
141
+
142
+ The ambient run wins, then the LLM attribution span, then the caller's scope. A scope may be
143
+ the unit's own id or a run id, so one query matches either. Only a row that exists is returned,
144
+ so the foreign key cannot fail, and a text or UUID comparison cannot poison the transaction.
145
+ """
146
+ ambient = _effect_run.get()
147
+ if ambient is _UNLINKED:
148
+ return None
149
+ try:
150
+ from sqlalchemy import or_
151
+
152
+ from AINDY.db.models.execution_unit import ExecutionUnit
153
+ from AINDY.kernel.cancellation import current_run_id
154
+
155
+ ref = ambient or current_run_id() or execution_ref
156
+ if not ref:
157
+ return None
158
+ ref = str(ref)
159
+ matches = [
160
+ (ExecutionUnit.source_type.in_(("agent_run", "flow_run")))
161
+ & (ExecutionUnit.source_id == ref)
162
+ ]
163
+ try:
164
+ matches.append(ExecutionUnit.id == uuid.UUID(ref))
165
+ except ValueError:
166
+ pass
167
+ row = (
168
+ db.query(ExecutionUnit.id)
169
+ .filter(or_(*matches))
170
+ .order_by(ExecutionUnit.created_at.desc())
171
+ .first()
172
+ )
173
+ linked = row[0] if row else None
174
+ return linked if isinstance(linked, uuid.UUID) else None
175
+ except Exception as exc:
176
+ logger.warning("[effect_ledger] could not link effect to its execution unit: %s", exc)
177
+ return None
178
+
179
+
102
180
  def _count_gate(outcome: str) -> None:
103
181
  """Record a gate resolution (IDEM-11).
104
182
 
@@ -211,7 +289,7 @@ def acquire_effect_lock(db, action_id: str, *, wait_seconds: float = 300.0):
211
289
  DEGRADED = object()
212
290
 
213
291
 
214
- def _resolve_existing_row(db, record, action_id, eff_tenant, eff_session):
292
+ def _resolve_existing_row(db, record, action_id, eff_tenant, eff_session, execution_ref=None):
215
293
  """Decide what to do about an EffectRecord row that already exists.
216
294
 
217
295
  ★ Extracted 2026-08-22 because this decision existed in only ONE of the two places that
@@ -270,6 +348,9 @@ def _resolve_existing_row(db, record, action_id, eff_tenant, eff_session):
270
348
  record.created_at = utcnow()
271
349
  record.tenant_id = eff_tenant
272
350
  record.session_id = eff_session
351
+ if record.execution_id is None:
352
+ # DEC-108 — a row written before the link existed gains it when its effect re-runs.
353
+ record.execution_id = _linked_execution_id(db, execution_ref)
273
354
  db.commit()
274
355
  _count_gate("reclaimed")
275
356
  return False, None
@@ -283,9 +364,13 @@ def resolve_effect_record(
283
364
  *,
284
365
  tenant_id: Optional[str] = None,
285
366
  session_id: Optional[str] = None,
367
+ execution_ref: Optional[str] = None,
286
368
  ) -> tuple[bool, Any]:
287
369
  """Claim or replay an effect slot. Returns ``(already_succeeded, cached_result)``.
288
370
 
371
+ ``execution_ref`` is the caller's scope (an execution unit id or a run id), used to link the
372
+ row to its execution unit when no ambient run names one (DEC-108). It is never hashed.
373
+
289
374
  ``(True, cached)`` — this ``action_id`` already completed successfully; the caller
290
375
  must NOT re-execute and should return ``cached``.
291
376
  ``(False, None)`` — the slot is claimed ``pending`` (or degraded to AT_LEAST_ONCE
@@ -305,18 +390,20 @@ def resolve_effect_record(
305
390
  if record is not None:
306
391
  # ★ Every existing-row outcome goes through the shared decision — including the
307
392
  # non-success ones, which used to fall through to `return False, None` uncounted.
308
- return _resolve_existing_row(db, record, action_id, eff_tenant, eff_session)
393
+ return _resolve_existing_row(db, record, action_id, eff_tenant, eff_session, execution_ref)
309
394
  if record is None:
310
395
  payload_bytes = json.dumps(
311
396
  dict(payload or {}), sort_keys=True, separators=(",", ":")
312
397
  ).encode()
313
398
  input_hash = hashlib.sha256(payload_bytes).hexdigest()
399
+ execution_id = _linked_execution_id(db, execution_ref)
314
400
  try:
315
401
  db.add(
316
402
  EffectRecord(
317
403
  action_id=action_id,
318
404
  action_type=action_type,
319
405
  input_hash=input_hash,
406
+ execution_id=execution_id,
320
407
  status="pending",
321
408
  tenant_id=eff_tenant,
322
409
  session_id=eff_session,
@@ -336,7 +423,7 @@ def resolve_effect_record(
336
423
  )
337
424
  if record is None:
338
425
  raise
339
- return _resolve_existing_row(db, record, action_id, eff_tenant, eff_session)
426
+ return _resolve_existing_row(db, record, action_id, eff_tenant, eff_session, execution_ref)
340
427
  return False, None
341
428
 
342
429
 
@@ -6,13 +6,21 @@ All sys.v{N}.{domain}.{action} calls route through dispatch(). The dispatcher:
6
6
  1. Parses version and action from the syscall name.
7
7
  2. Validates the syscall name exists in the registry.
8
8
  3. Enforces the required capability against the caller's SyscallContext.
9
- 4. Validates input payload against the entry's input_schema (if present).
10
- 5. Checks tenant isolation and resource quota.
11
- 6. Executes the registered handler.
12
- 7. Validates output against output_schema (non-fatal â€" logs warning only).
13
- 8. Emits deprecation warning if the syscall is marked deprecated.
14
- 9. Wraps the result in the standard response envelope.
15
- 10. Emits a SYSCALL_EXECUTED SystemEvent (non-fatal, swallowed on failure).
9
+ 4. Checks caller identity: a non-empty user_id, a payload user_id that matches it, and
10
+ extension-call tenant metadata. Row-level ownership is the handler's job.
11
+ 5. Checks the resource quota.
12
+ 6. Validates the payload against the entry's input_schema (required fields and top-level
13
+ types only; see kernel/syscall_versioning.py::validate_payload).
14
+ 7. Sets a deprecation warning if the syscall is marked deprecated.
15
+ 8. Runs the idempotency gate when it engages (may replay or refuse without running the handler).
16
+ 9. Refuses if the current run has already ended.
17
+ 10. Executes the registered handler.
18
+ 11. Validates output against output_schema: an error envelope for a stable syscall, a logged
19
+ warning for an experimental one.
20
+ 12. Records usage and emits a SYSCALL_EXECUTED SystemEvent (both non-fatal).
21
+ 13. Wraps the result in the standard response envelope.
22
+
23
+ docs/runtime/SYSCALL_SYSTEM.md is the full contract.
16
24
 
17
25
  Standard response envelope
18
26
  --------------------------
@@ -28,18 +36,20 @@ All calls return::
28
36
  "version": str, # parsed ABI version (e.g. "v1")
29
37
  "duration_ms": int,
30
38
  "error": str | None,
31
- "warning": str | None # set when syscall is deprecated
39
+ "warning": str | None, # set when syscall is deprecated
40
+ "failure_class": str, # on error and unknown envelopes only
32
41
  }
33
42
 
34
43
  ``status`` gained ``partial`` and ``unknown`` in `EFFECT-PARTIAL-1`. **A consumer must treat
35
44
  any unrecognised status as *not success* and reconcile** — a batched effect that half-applied is
36
- neither of the two original values, and forcing it into one is either a lie or a waste. Nothing
37
- emits the new values until a handler opts in via `AINDY.kernel.syscall_outcome`; see that module
38
- for why widening the set was safe to land.
45
+ neither of the two original values, and forcing it into one is either a lie or a waste. A handler
46
+ opts in via `AINDY.kernel.syscall_outcome`; see that module for why widening the set was safe to
47
+ land.
39
48
 
40
49
  The dispatcher never raises for transient or expected errors — every such path
41
50
  returns the envelope. The one exception is SyscallContractViolation, which is
42
- raised when an EXACTLY_ONCE handler returns a non-dict value. This is a
51
+ raised when a handler returns a non-dict value while the idempotency gate is engaged
52
+ for the call (with no gate engaged, the same mistake is a `fatal` error envelope). This is a
43
53
  programming error and callers must not catch it silently.
44
54
 
45
55
  Usage
@@ -510,7 +520,7 @@ class SyscallDispatcher:
510
520
  ) -> dict[str, Any]:
511
521
  """Execute a syscall and return the standard response envelope.
512
522
 
513
- This method never raises. All errors â€" unknown syscall, permission
523
+ Raises only SyscallContractViolation (see the module docstring). All other errorsâ€" unknown syscall, permission
514
524
  denial, handler failure â€" are captured in the returned envelope.
515
525
 
516
526
  Trace propagation
@@ -846,6 +856,8 @@ class SyscallDispatcher:
846
856
  # ambiently from the effect-attribution contextvar (e.g. a multi-tenant
847
857
  # MCP session set in the auth_hook).
848
858
  tenant_id=str(context.user_id) if context.user_id else None,
859
+ # DEC-108 — links the row to its unit so `sys.v1.agent.undo` can find it.
860
+ execution_ref=str(context.execution_unit_id),
849
861
  )
850
862
  except Exception as _gate_exc:
851
863
  if _at_most_once:
@@ -524,6 +524,80 @@ def _handle_memory_delete(payload: dict, context: SyscallContext) -> dict:
524
524
  return result
525
525
 
526
526
 
527
+ def _memory_write_reversal_refusal(db: Any, node_id: str, recorded: dict, current: dict) -> str | None:
528
+ """Why a written node must not be deleted, or ``None`` when it may be (DEC-109).
529
+
530
+ The delete cascades, so it is refused when anything has been built on the node. Reads and
531
+ feedback do not refuse: they change counters, not the node. Causal edges do not refuse either:
532
+ they record where the node came from, and they go with it.
533
+ """
534
+ import uuid as _uuid
535
+
536
+ from AINDY.db.models.memory_node_history import MemoryNodeHistory
537
+ from AINDY.db.models.memory_trace_node import MemoryTraceNode
538
+ from AINDY.memory.memory_persistence import MemoryLinkModel
539
+
540
+ for key in ("content", "tags", "node_type"):
541
+ if recorded.get(key) != current.get(key):
542
+ return f"its {key} changed after the write"
543
+ node_uuid = _uuid.UUID(str(node_id))
544
+ if db.query(MemoryNodeHistory.id).filter(MemoryNodeHistory.node_id == node_uuid).first():
545
+ return "it has been edited since the write"
546
+ linked = (
547
+ db.query(MemoryLinkModel.id)
548
+ .filter(
549
+ (MemoryLinkModel.source_node_id == node_uuid)
550
+ | (MemoryLinkModel.target_node_id == node_uuid)
551
+ )
552
+ .first()
553
+ )
554
+ if linked:
555
+ return "another node links to it or from it"
556
+ if db.query(MemoryTraceNode.id).filter(MemoryTraceNode.node_id == node_uuid).first():
557
+ return "it belongs to a memory trace"
558
+ return None
559
+
560
+
561
+ def _compensate_memory_write(effect: dict, context: SyscallContext) -> dict:
562
+ """Reverse ``sys.v1.memory.write`` by deleting the node it wrote (UNDO-COMPENSATORS-1, DEC-109).
563
+
564
+ Raising records the effect as ``failed``, which stays retryable, and leaves the node in place.
565
+ A node that is already gone counts as reversed. The delete is scoped to the caller, so another
566
+ tenant's node reads as gone and is never touched.
567
+ """
568
+ from AINDY.db.dao.memory_node_dao import MemoryNodeDAO
569
+
570
+ result = effect.get("result_payload")
571
+ recorded = result.get("node") if isinstance(result, dict) else None
572
+ node_id = recorded.get("id") if isinstance(recorded, dict) else None
573
+ if not node_id:
574
+ raise ValueError("the effect record holds no node id to reverse")
575
+ user_id = str(getattr(context, "user_id", "") or "")
576
+ if not user_id:
577
+ raise ValueError("reversing a memory write requires the owner's tenant context")
578
+
579
+ db, owns_session = _acquire_handler_db(context)
580
+ try:
581
+ dao = MemoryNodeDAO(db)
582
+ current = dao.get_by_id(str(node_id), user_id=user_id)
583
+ if current is None:
584
+ receipt = {"node_id": str(node_id), "deleted": False}
585
+ else:
586
+ refusal = _memory_write_reversal_refusal(db, str(node_id), recorded, current)
587
+ if refusal:
588
+ raise ValueError(f"memory node {node_id} was not deleted: {refusal}")
589
+ receipt = {"node_id": str(node_id), "deleted": bool(dao.delete_by_id(str(node_id), user_id=user_id))}
590
+ except Exception:
591
+ # A caller-owned session belongs to `undo_run_effects`, whose savepoint unwinds this. A
592
+ # rollback here would also discard the audit rows of the effects already processed.
593
+ if owns_session:
594
+ _finish_handler_write(db, owns_session=True, success=False)
595
+ raise
596
+ if owns_session:
597
+ _finish_handler_write(db, owns_session=True, success=True)
598
+ return receipt
599
+
600
+
527
601
  def _handle_memory_search(payload: dict, context: SyscallContext) -> dict:
528
602
  """sys.v1.memory.search — semantic search over the user's memory nodes.
529
603
 
@@ -1473,6 +1547,7 @@ SYSCALL_REGISTRY["sys.v1.memory.write"] = SyscallEntry(
1473
1547
  # JSON-safe (MemoryNodeDAO._node_to_dict stringifies ids/timestamps), so the gate can
1474
1548
  # cache it as JSONB for replay.
1475
1549
  execution_guarantee="EXACTLY_ONCE",
1550
+ compensate=_compensate_memory_write, # DEC-109
1476
1551
  )
1477
1552
  SYSCALL_REGISTRY["sys.v1.memory.link"] = SyscallEntry(
1478
1553
  handler=_handle_memory_link,
@@ -48,6 +48,9 @@ except ImportError:
48
48
 
49
49
  logger = logging.getLogger(__name__)
50
50
 
51
+ STALE_JOB_ERROR = "Stale: never started within 1 hour of creation"
52
+ STALE_UNITS_BATCH_SIZE = 500
53
+
51
54
 
52
55
  def _job_log_model():
53
56
  return JobLog
@@ -1085,6 +1088,61 @@ def _ensure_root_execution_event_id(db, trace_id: str) -> str | None:
1085
1088
  return str(created_id) if created_id else None
1086
1089
 
1087
1090
 
1091
+ def settle_stale_job_units(
1092
+ db,
1093
+ *,
1094
+ dry_run: bool = False,
1095
+ batch_size: int = STALE_UNITS_BATCH_SIZE,
1096
+ ) -> dict[str, Any]:
1097
+ """Fail the execution units `_cleanup_stale_logs` left `pending` before DEC-105 (one-time).
1098
+
1099
+ A unit qualifies only when it is a `job_log` unit still ``pending`` whose JobLog row is
1100
+ ``failed`` with exactly the stale cleanup's message. The row already says the job never
1101
+ started, so the unit goes ``failed`` to match; the row is not touched. ``dry_run`` reports
1102
+ and changes nothing.
1103
+ """
1104
+ from AINDY.core.execution_unit_service import ExecutionUnitService
1105
+ from AINDY.db.models.execution_unit import ExecutionUnit
1106
+
1107
+ if batch_size < 1:
1108
+ raise ValueError("batch_size must be >= 1")
1109
+ report = {"examined": 0, "settled": 0, "not_moved": 0, "dry_run": dry_run}
1110
+ query = (
1111
+ db.query(ExecutionUnit.id)
1112
+ .join(JobLog, ExecutionUnit.source_id == JobLog.id)
1113
+ .filter(
1114
+ ExecutionUnit.source_type == "job_log",
1115
+ ExecutionUnit.status == "pending",
1116
+ JobLog.status == "failed",
1117
+ JobLog.error_message == STALE_JOB_ERROR,
1118
+ )
1119
+ .order_by(ExecutionUnit.id.asc())
1120
+ )
1121
+
1122
+ # Keyset pages on the primary key: a settled unit leaves the predicate, an unmoved one stays,
1123
+ # so an OFFSET would skip units and re-reading from the start would loop.
1124
+ units = ExecutionUnitService(db)
1125
+ last_id = None
1126
+ while True:
1127
+ page = query if last_id is None else query.filter(ExecutionUnit.id > last_id)
1128
+ unit_ids = [row[0] for row in page.limit(batch_size).all()]
1129
+ if not unit_ids:
1130
+ break
1131
+ last_id = unit_ids[-1]
1132
+ for unit_id in unit_ids:
1133
+ report["examined"] += 1
1134
+ if dry_run or units.update_status(unit_id, "failed"):
1135
+ report["settled"] += 1
1136
+ else:
1137
+ report["not_moved"] += 1
1138
+ if not dry_run:
1139
+ db.commit() # release the connection between batches
1140
+ if len(unit_ids) < batch_size:
1141
+ break
1142
+
1143
+ return report
1144
+
1145
+
1088
1146
  def _emit_job_log_written(log_id: str) -> None:
1089
1147
  try:
1090
1148
  from AINDY.platform_layer.registry import emit_event
@@ -158,7 +158,7 @@ tool_args_validation_total = Counter(
158
158
  # none); `stage` is `recall` (the recall itself failed and returned an empty context),
159
159
  # `own_session` (AINDY_MEMORY_RECALL_OWN_SESSION could not open its session and fell back to the
160
160
  # caller's; the recall still ran) or `setup` (the pipeline failed before the recall started).
161
- # Zero across a soak window is the absence signal for flipping AINDY_MEMORY_RECALL_OWN_SESSION.
161
+ # Zero across a soak window was the absence signal for flipping AINDY_MEMORY_RECALL_OWN_SESSION (DEC-083, DEC-106).
162
162
  memory_recall_failures_total = Counter(
163
163
  "aindy_memory_recall_failures_total",
164
164
  "Memory recalls that failed or degraded, by calling site and stage (recall | own_session | setup).",
@@ -241,6 +241,7 @@ def register() -> None:
241
241
  required_capability="write_memory",
242
242
  category="memory",
243
243
  egress_scope="internal",
244
+ effect_syscall="sys.v1.memory.write",
244
245
  )(memory_write)
245
246
  if "runtime.selftest" not in TOOL_REGISTRY:
246
247
  register_tool(
@@ -518,7 +518,7 @@ def _cleanup_stale_logs() -> None:
518
518
  try:
519
519
  from AINDY.core.execution_unit_service import ExecutionUnitService
520
520
  from AINDY.db.database import SessionLocal
521
- from AINDY.platform_layer.async_job_service import _emit_job_log_written
521
+ from AINDY.platform_layer.async_job_service import STALE_JOB_ERROR, _emit_job_log_written
522
522
  from datetime import timedelta
523
523
 
524
524
  db = SessionLocal()
@@ -535,7 +535,7 @@ def _cleanup_stale_logs() -> None:
535
535
  stale_ids = []
536
536
  for log in stale:
537
537
  log.status = "failed"
538
- log.error_message = "Stale: never started within 1 hour of creation"
538
+ log.error_message = STALE_JOB_ERROR
539
539
  stale_ids.append(log.id)
540
540
  unit = units.get_by_source("job_log", log.id)
541
541
  if unit is not None:
@@ -113,17 +113,17 @@ class MemoryOrchestrator:
113
113
  transaction, we never start one: the read gets its own short-lived session and
114
114
  returns the connection immediately.
115
115
 
116
- Opt-in (`AINDY_MEMORY_RECALL_OWN_SESSION`, default off) because this is a core
117
- read path — a caller relying on seeing its own uncommitted writes through recall
118
- would change behaviour. Any failure to obtain a session falls back to the caller's,
119
- so this can never make recall unavailable.
116
+ Default ON (DEC-106); only `AINDY_MEMORY_RECALL_OWN_SESSION` = `0` / `false` / `no` /
117
+ `off` disables it. Recall does not see the caller's uncommitted writes. Any failure to
118
+ obtain a session falls back to the caller's, so this can never make recall unavailable.
120
119
  """
121
120
  import os
122
121
 
123
- if os.getenv("AINDY_MEMORY_RECALL_OWN_SESSION", "").strip().lower() not in {
124
- "1",
125
- "true",
126
- "yes",
122
+ if os.getenv("AINDY_MEMORY_RECALL_OWN_SESSION", "").strip().lower() in {
123
+ "0",
124
+ "false",
125
+ "no",
126
+ "off",
127
127
  }:
128
128
  return db, False
129
129
  try: