@x-otto/coding 0.0.1-alpha.2 → 0.0.1-alpha.20

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
@@ -1,72 +1,75 @@
1
1
  # @x-otto/coding
2
2
 
3
- ## 模块定位
3
+ ## Module Purpose
4
4
 
5
- 应用装配层,将各子系统组合成完整的 otto 编码助手。管理 App 容器和 AgentSession 对话周期。
5
+ The application assembly layer, wiring subsystems together into the complete otto coding assistant. Manages the App container and AgentSession conversation lifecycle.
6
6
 
7
- ## 核心功能
7
+ ## Core Features
8
8
 
9
- | 模块 | 功能 |
9
+ | Module | Function |
10
10
  | -------------------- | ------------------------------------------------ |
11
- | App | 依赖注入容器,装配所有子系统 |
12
- | AgentSession | 对话生命周期,消息持久化 + 事件流转发 + 工具网关 |
13
- | CodingSessionManager | 多会话容器(InMemory / Disk / Remote|
14
- | Runner | 4 种运行模式(Print / JSON / RPC / Interactive) |
11
+ | App | Dependency-injection container, assembles all subsystems |
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
 
18
18
  ```bash
19
19
  pnpm add @x-otto/coding
20
20
  ```
21
21
 
22
- ## 快速开始
22
+ ## Quick Start
23
23
 
24
24
  ```ts
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
39
39
 
40
- | 导出 | 类型 | 说明 |
40
+ | Export | Type | Description |
41
41
  |---|---|---|
42
- | `App` | `class` | 依赖注入容器,装配所有子系统 |
43
- | `AgentSession` | `class` | 对话生命周期管理 |
44
- | `CodingSessionManager` | `class` | 多会话容器 |
45
- | `createPrintRunner` | `function` | Print 模式运行器 |
46
- | `createInteractiveRunner` | `function` | Interactive 模式运行器 |
47
- | `createJsonRunner` | `function` | JSON 模式运行器 |
48
- | `createRpcRunner` | `function` | RPC 模式运行器 |
42
+ | `App` | `class` | Dependency-injection container, assembles all subsystems |
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) |
49
50
 
50
- ## 目录概览
51
+ Full export surface is dominated by plugin lifecycle utilities (manifest parsing, discovery, panel compilation, module loading) — see `src/index.ts`.
52
+
53
+ ## Directory Overview
51
54
 
52
55
  ```
53
56
  src/
54
- types.ts # 核心类型
55
- app.ts # 应用容器
56
- agent-session.ts # 对话生命周期
57
- coding-session-manager.ts # 多会话管理
58
- run/
59
- print.ts # Print 模式
60
- json.ts # JSON 模式
61
- rpc.ts # RPC 模式
62
- interactive.ts # 交互式 REPL
63
- index.ts
64
- tests/ # 29 个测试文件
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
70
73
 
71
74
  ```bash
72
75
  pnpm --filter @x-otto/coding build
@@ -74,6 +77,6 @@ pnpm --filter @x-otto/coding typecheck
74
77
  pnpm --filter @x-otto/coding clean
75
78
  ```
76
79
 
77
- ## 关联包
80
+ ## Related Packages
78
81
 
79
- 依赖几乎所有 `@x-otto/*` 子包,作为顶层组装。
82
+ Depends on nearly all `@x-otto/*` subpackages as the top-level assembly point.