Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .aiox-core/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ const healthCheck = require('./health-check');
// External executor delegation
const externalExecutors = require('./external-executors');

// Resilience primitives
const resilience = require('./resilience');

/**
* Core module exports
*/
Expand Down Expand Up @@ -88,6 +91,9 @@ module.exports = {
// External executors
externalExecutors,

// Resilience
resilience,

// Version info
version: '2.0.0',
moduleName: 'core',
Expand Down
38 changes: 38 additions & 0 deletions .aiox-core/core/resilience/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# AIOX Resilience

Core resilience modules that preserve agent execution continuity after fatal failures.

## Agent Immortality Protocol

```js
const {
AgentImmortalityProtocol,
CauseOfDeath,
} = require('@aiox-squads/core/resilience');

const protocol = new AgentImmortalityProtocol(process.cwd());

const result = protocol.captureFailure({
agentState: {
id: 'dev-1',
lastGoal: 'Implement story 482.1',
lastSuccessfulStep: 'Created tests',
currentAction: 'retry failing tool call',
workingMemory: ['large history omitted', 'last useful step'],
criticalVariables: { storyId: '482.1' },
},
error: new Error('Tool execution failed: invalid schema'),
});

console.log(result.reincarnationContext);
console.log(result.report.cause === CauseOfDeath.TOOL_EXECUTION_FAILURE);
```
Comment thread
coderabbitai[bot] marked this conversation as resolved.

The protocol records:

- a compact autopsy report, without rehydrating the full failed context;
- a reincarnation queue item with prevention directives;
- a delta state commit that can be replayed later;
- an evolution event for repeated failure-pattern analysis.

Storage defaults to `.aiox/immortality/` inside the project root.
Loading
Loading