@x-otto/coding 0.0.1-alpha.9 → 0.1.0-alpha.10

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.
package/README.md CHANGED
@@ -9,9 +9,9 @@ The application assembly layer, wiring subsystems together into the complete ott
9
9
  | Module | Function |
10
10
  | -------------------- | ------------------------------------------------ |
11
11
  | App | Dependency-injection container, assembles all subsystems |
12
- | AgentSession | Conversation lifecycle: message persistence + event stream forwarding + tool gateway |
13
- | CodingSessionManager | Multi-session container (InMemory / Disk / Remote) |
14
- | Runner | 4 run modes (Print / JSON / RPC / Interactive) |
12
+ | AgentSession | Conversation lifecycle (re-exported from `@x-otto/runtime`) |
13
+ | CodingSessionPool | Session pool (InMemory / Disk / Remote, re-exported from `@x-otto/runtime`) |
14
+ | AgentJobService | Background agent job lifecycle (isolated worktrees, diff apply) |
15
15
 
16
16
  ## Installation
17
17
 
@@ -25,14 +25,14 @@ pnpm add @x-otto/coding
25
25
  import { App } from '@x-otto/coding'
26
26
 
27
27
  const app = new App({
28
- model: 'claude-sonnet-4-5-20250929',
28
+ modelId: 'claude-sonnet-4-5-20250929',
29
29
  workspaceDir: process.cwd(),
30
- apiKey: process.env.ANTHROPIC_API_KEY,
30
+ logger: { name: 'app', level: 'info', destination: 'stderr' },
31
31
  })
32
32
 
33
33
  const session = await app.createSession()
34
34
  await session.prompt('Write a fibonacci function')
35
- await app.dispose()
35
+ await app.stop()
36
36
  ```
37
37
 
38
38
  ## API
@@ -40,30 +40,33 @@ await app.dispose()
40
40
  | Export | Type | Description |
41
41
  |---|---|---|
42
42
  | `App` | `class` | Dependency-injection container, assembles all subsystems |
43
- | `AgentSession` | `class` | Conversation lifecycle management |
44
- | `CodingSessionManager` | `class` | Multi-session container |
45
- | `createPrintRunner` | `function` | Print-mode runner |
46
- | `createInteractiveRunner` | `function` | Interactive-mode runner |
47
- | `createJsonRunner` | `function` | JSON-mode runner |
48
- | `createRpcRunner` | `function` | RPC-mode runner |
43
+ | `createApp` | `function` | App factory (from `./app/app`) |
44
+ | `createFrontendPort` | `function` | Frontend port factory |
45
+ | `ExtensionManager` | `class` | Bundled/user extension management |
46
+ | `AgentSession` | `class` | Conversation lifecycle (re-exported from `@x-otto/runtime`) |
47
+ | `CodingSessionPool` | `class` | Session pool alias (re-exported from `@x-otto/runtime`) |
48
+ | `AgentJobService` | `class` | Background agent job lifecycle |
49
+ | `readSkillLoopStatus` | `function` | Skill loop status query (RFC-318) |
50
+
51
+ Full export surface is dominated by plugin lifecycle utilities (manifest parsing, discovery, panel compilation, module loading) — see `src/index.ts`.
49
52
 
50
53
  ## Directory Overview
51
54
 
52
55
  ```
53
56
  src/
54
- types.ts # core types
55
- app.ts # application container
56
- agent-session.ts # conversation lifecycle
57
- coding-session-manager.ts # multi-session management
58
- run/
59
- print.ts # Print mode
60
- json.ts # JSON mode
61
- rpc.ts # RPC mode
62
- interactive.ts # interactive REPL
63
- index.ts
64
- tests/ # 29 test files
65
- example/
66
- docs/
57
+ index.ts # barrel export
58
+ types.ts # AppOptions / AppContext / StorageOptions
59
+ engine-main.ts # engine 独立进程入口 (RFC-091)
60
+ app/ # App composition root (app.ts / storage-wiring.ts / tool-callbacks.ts / sandbox-controller.ts / ...)
61
+ agent/ # declarative agents/teams + swarm runtime
62
+ session/ # session config resolution + task runner
63
+ hooks/ # coding business hooks (tool-guidance / lesson / skill-catalog / phase / session-learning)
64
+ input/ # sigil input system (builtin-resolvers / sigil-expand / sigil-resolver-registry)
65
+ plugin/ # plugin lifecycle / panel compiler / module loader / esbuild lifecycle
66
+ skill-loop/ # skill loop status (RFC-318)
67
+ feedback/ # pulse survey sink
68
+ vision/ # vision delegate service
69
+ tests/ # unit + e2e test suite (mirrors src/ modules)
67
70
  ```
68
71
 
69
72
  ## Development Commands