chainlesschain 0.43.1 → 0.43.2

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 (2) hide show
  1. package/README.md +56 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -833,6 +833,62 @@ chainlesschain cli-anything remove <name> # Remove registered tool
833
833
 
834
834
  ---
835
835
 
836
+ ## Sub-Agent Isolation v2
837
+
838
+ Introduced in v0.43.0: complex agent tasks are automatically decomposed into isolated **sub-agents**, each running in its own sandboxed context — namespaced memory, scoped context engineering, and full lifecycle tracking.
839
+
840
+ ### Architecture
841
+
842
+ | Component | Description |
843
+ | -------------------------- | ------------------------------------------------------------------------ |
844
+ | `SubAgentRegistry` | Singleton registry tracking active/completed sub-agents with stats |
845
+ | `NamespacedMemory` | Per-sub-agent memory namespace, isolated from main session |
846
+ | `ScopedContextEngineering` | Context window scoped to each sub-agent's task |
847
+ | `SubAgentContext` | Execution context carrying role, task, iteration count, and token budget |
848
+
849
+ ### Agent Slash Commands
850
+
851
+ Inside a `chainlesschain agent` session:
852
+
853
+ ```
854
+ /sub-agents Show active sub-agents, completed history, token usage, and avg duration
855
+ ```
856
+
857
+ ### How It Works
858
+
859
+ When the agent encounters a complex multi-step task, it spawns one or more sub-agents:
860
+
861
+ ```
862
+ Main Agent
863
+ ├── SubAgent [analyzer] — reads codebase, writes findings to namespaced memory
864
+ ├── SubAgent [planner] — reads findings, proposes implementation plan
865
+ └── SubAgent [executor] — implements plan with isolated context
866
+ ```
867
+
868
+ Each sub-agent:
869
+
870
+ - Has its own memory namespace (no cross-contamination with other sub-agents)
871
+ - Carries a scoped context slice (not the full conversation history)
872
+ - Is registered with `SubAgentRegistry` for observability
873
+ - Reports back to the main agent upon completion
874
+
875
+ ### Example Output of `/sub-agents`
876
+
877
+ ```
878
+ Sub-Agent Registry:
879
+ Active: 1 Completed: 3 Tokens: 4821 Avg Duration: 1243ms
880
+
881
+ Active Sub-Agents:
882
+ sa-7f3a [executor] Implement the authentication module (iter: 2)
883
+
884
+ Recent History (last 10):
885
+ ✓ sa-1a2b [analyzer] Analyzed 12 files, found 3 issues
886
+ ✓ sa-3c4d [planner] Generated 5-step implementation plan
887
+ ✗ sa-5e6f [executor] Failed: missing dependency crypto-utils
888
+ ```
889
+
890
+ ---
891
+
836
892
  ## WebSocket Server Interface
837
893
 
838
894
  ### `chainlesschain serve`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chainlesschain",
3
- "version": "0.43.1",
3
+ "version": "0.43.2",
4
4
  "description": "CLI for ChainlessChain - install, configure, and manage your personal AI management system",
5
5
  "type": "module",
6
6
  "bin": {