Skip to content

Commit 43ed93d

Browse files
committed
docs: update all documentation for new directory structure after core/ flattening
1 parent 949c09d commit 43ed93d

7 files changed

Lines changed: 87 additions & 13 deletions

docs/ARCHITECTURE.md

Lines changed: 76 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,80 @@ Current runtime memory note:
1717

1818
## System Architecture Overview
1919

20+
### Source Directory Layout
21+
22+
After the `core/` flattening refactor, the `src/` tree is organized into domain-specific
23+
top-level directories. Only the foundational infrastructure modules remain under `core/`.
24+
25+
```
26+
src/
27+
├── core/ # Core infrastructure (7 dirs)
28+
│ ├── llm/ # LLM providers, routing, streaming
29+
│ ├── tools/ # ITool, ToolOrchestrator, permissions
30+
│ ├── conversation/ # ConversationManager
31+
│ ├── orchestration/ # IAgentOrchestrator, telemetry
32+
│ ├── streaming/ # StreamingManager
33+
│ ├── storage/ # IStorageAdapter, SqlStorageAdapter
34+
│ └── utils/ # Shared helpers, usage tracking
35+
36+
├── media/ # Media generation & processing
37+
│ ├── audio/ # TTS, music, SFX generation
38+
│ ├── images/ # Image generation (DALL-E, Stability, etc.)
39+
│ ├── video/ # Video generation & analysis
40+
│ └── vision/ # OCR, document AI, CLIP
41+
42+
├── provenance/ # Content provenance & blockchain anchoring
43+
44+
├── nlp/ # NLP: tokenizers, stemmers, sentiment, i18n
45+
│ ├── language/ # Language detection & translation
46+
│ └── ai_utilities/ # AI utility helpers
47+
48+
├── safety/ # Guardrails & runtime safety
49+
│ ├── guardrails/ # IGuardrailService, ParallelGuardrailDispatcher
50+
│ └── runtime/ # Runtime safety checks
51+
52+
├── agents/ # Agent definitions & multi-agent collectives
53+
│ ├── definitions/ # Agent type definitions
54+
│ └── agency/ # Multi-agent coordination
55+
56+
├── evaluation/ # Eval framework & observability
57+
│ └── observability/ # OpenTelemetry tracing & metrics
58+
59+
├── knowledge/ # Knowledge graph (interface + implementations)
60+
61+
├── planning/ # Planning engine, HITL, workflows
62+
│ ├── planner/ # PlanningEngine, ReAct loops
63+
│ ├── hitl/ # Human-in-the-loop approval
64+
│ └── workflows/ # Workflow definitions & execution
65+
66+
├── sandbox/ # Sandboxed execution & subprocess
67+
│ ├── executor/ # Sandboxed code execution
68+
│ └── subprocess/ # CLISubprocessBridge, CLIRegistry
69+
70+
├── structured/ # Structured output & prompt routing
71+
│ ├── output/ # StructuredOutputManager, JSON schema
72+
│ └── prompting/ # Prompt routing & construction
73+
74+
├── marketplace/ # Agent marketplace & workspace
75+
│ ├── store/ # Marketplace listings & search
76+
│ └── workspace/ # Workspace management
77+
78+
├── rag/ # Retrieval-augmented generation
79+
│ └── vector-search/ # HNSW, Pinecone, Qdrant, Postgres
80+
81+
├── api/ # Public API surface
82+
├── memory/ # Cognitive memory system
83+
├── channels/ # Messaging channel adapters (37 platforms)
84+
├── cognitive_substrate/ # GMI (Generalized Mind Instance)
85+
├── discovery/ # Capability discovery engine
86+
├── emergent/ # Emergent capabilities
87+
├── extensions/ # Extension system
88+
├── orchestration/ # Graph-based workflow DAG engine
89+
├── query-router/ # Query classification & routing
90+
├── social-posting/ # Social media post management
91+
└── ...
92+
```
93+
2094
### The Complete AgentOS Ecosystem
2195

2296
```mermaid
@@ -3988,7 +4062,7 @@ interface PlanStep {
39884062
### Usage Example
39894063

39904064
```typescript
3991-
import { PlanningEngine } from '@framers/agentos/core/planning';
4065+
import { PlanningEngine } from '@framers/agentos/planning/planner';
39924066

39934067
const planningEngine = new PlanningEngine(
39944068
promptEngine,
@@ -4137,7 +4211,7 @@ interface EscalationContext {
41374211
### Usage Example
41384212

41394213
```typescript
4140-
import { HumanInteractionManager } from '@framers/agentos/core/hitl';
4214+
import { HumanInteractionManager } from '@framers/agentos/planning/hitl';
41414215

41424216
const hitlManager = new HumanInteractionManager({
41434217
defaultTimeoutMs: 300000, // 5 minutes

docs/CLI_PROVIDERS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ ClaudeCodeProvider / GeminiCLIProvider ← message formatting, tool schema i
1616
ClaudeCodeCLIBridge / GeminiCLIBridge ← extends CLISubprocessBridge (flag assembly, error classification)
1717
1818
19-
CLISubprocessBridge (abstract base) ← core/subprocess/ — spawn, pipe, NDJSON parse, timeout/abort
19+
CLISubprocessBridge (abstract base) ← sandbox/subprocess/ — spawn, pipe, NDJSON parse, timeout/abort
2020
2121
2222
execa → local CLI binary ← user's authenticated CLI (claude, gemini, codex)
2323
```
2424

2525
### Core Subprocess Module
2626

27-
The generalized subprocess bridge lives at `packages/agentos/src/core/subprocess/`:
27+
The generalized subprocess bridge lives at `packages/agentos/src/sandbox/subprocess/`:
2828

2929
- **`CLISubprocessBridge`** — abstract base class (template method pattern). Owns process lifecycle: spawn, stdin pipe, NDJSON line splitting, timeout, abort signal. Subclasses implement `buildArgs()`, `classifyError()`, `parseStreamEvent()`.
3030
- **`CLISubprocessError`** — generic error with open string codes, `guidance` (user-facing fix instructions), and `recoverable` flag. Works for any binary, not just LLM CLIs.

docs/CREATING_GUARDRAILS.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ const mockServiceRegistry: ISharedServiceRegistry = {
12281228
To test how your guardrail behaves within the full two-phase pipeline:
12291229

12301230
```typescript
1231-
import { ParallelGuardrailDispatcher } from '@framers/agentos/core/guardrails';
1231+
import { ParallelGuardrailDispatcher } from '@framers/agentos/safety/guardrails';
12321232
12331233
describe('Integration: ParallelGuardrailDispatcher + MyGuardrail', () => {
12341234
it('should block input through the dispatcher', async () => {
@@ -1250,8 +1250,8 @@ describe('Integration: ParallelGuardrailDispatcher + MyGuardrail', () => {
12501250

12511251
### Reference test files
12521252

1253-
- `packages/agentos/tests/core/guardrails/ParallelGuardrailDispatcher.spec.ts` -- comprehensive dispatcher tests.
1254-
- `packages/agentos/tests/core/guardrails.integration.spec.ts` -- integration tests for the full guardrail pipeline.
1253+
- `packages/agentos/tests/safety/guardrails/ParallelGuardrailDispatcher.spec.ts` -- comprehensive dispatcher tests.
1254+
- `packages/agentos/tests/safety/guardrails.integration.spec.ts` -- integration tests for the full guardrail pipeline.
12551255

12561256
---
12571257

docs/GUARDRAILS_USAGE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import {
4747
type GuardrailInputPayload,
4848
type GuardrailOutputPayload,
4949
type GuardrailEvaluationResult,
50-
} from '@framers/agentos/core/guardrails';
50+
} from '@framers/agentos/safety/guardrails';
5151

5252
// Simple content filter
5353
class ContentFilter implements IGuardrailService {
@@ -245,7 +245,7 @@ import {
245245
GuardrailAction,
246246
type CrossAgentOutputPayload,
247247
type GuardrailEvaluationResult,
248-
} from '@framers/agentos/core/guardrails';
248+
} from '@framers/agentos/safety/guardrails';
249249

250250
class SupervisorGuardrail implements ICrossAgentGuardrailService {
251251
// Observe specific worker agents (empty = all agents)

docs/HUMAN_IN_THE_LOOP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ type ActionSeverity = 'low' | 'medium' | 'high' | 'critical';
4141
### 1. Initialize the Manager
4242

4343
```typescript
44-
import { HumanInteractionManager } from '@framers/agentos/core/hitl';
44+
import { HumanInteractionManager } from '@framers/agentos/planning/hitl';
4545

4646
const hitlManager = new HumanInteractionManager({
4747
// Default timeout: 5 minutes

docs/PLANNING_ENGINE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ const defaultOptions = {
124124
### Basic Plan Generation
125125

126126
```typescript
127-
import { PlanningEngine } from '@framers/agentos/core/planning';
127+
import { PlanningEngine } from '@framers/agentos/planning/planner';
128128

129129
const engine = new PlanningEngine({
130130
llmProvider: aiModelProviderManager,

docs/STRUCTURED_OUTPUT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The Structured Output Manager ensures LLM outputs conform to predefined JSON Sch
1818
### Basic Structured Generation
1919

2020
```typescript
21-
import { StructuredOutputManager, JSONSchema } from '@framers/agentos/core/structured';
21+
import { StructuredOutputManager, JSONSchema } from '@framers/agentos/structured/output';
2222

2323
const manager = new StructuredOutputManager({
2424
llmProviderManager,
@@ -322,7 +322,7 @@ manager.resetStatistics();
322322
## Error Handling
323323

324324
```typescript
325-
import { StructuredOutputError } from '@framers/agentos/core/structured';
325+
import { StructuredOutputError } from '@framers/agentos/structured/output';
326326

327327
try {
328328
const result = await manager.generate({

0 commit comments

Comments
 (0)