openclaw-codex-feishu 0.1.1
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 +49 -0
- package/dist/commands/codex.schema.d.ts +103 -0
- package/dist/commands/codex.schema.js +42 -0
- package/dist/config.d.ts +24 -0
- package/dist/config.js +24 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +66 -0
- package/dist/render/rawChunkRenderer.d.ts +12 -0
- package/dist/render/rawChunkRenderer.js +37 -0
- package/dist/render/transcriptNormalizer.d.ts +1 -0
- package/dist/render/transcriptNormalizer.js +12 -0
- package/dist/runtime/bridgeRuntime.d.ts +40 -0
- package/dist/runtime/bridgeRuntime.js +303 -0
- package/dist/state/bindingStore.d.ts +19 -0
- package/dist/state/bindingStore.js +58 -0
- package/dist/state/journalStore.d.ts +8 -0
- package/dist/state/journalStore.js +21 -0
- package/dist/state/schemas.d.ts +30 -0
- package/dist/state/schemas.js +1 -0
- package/dist/transport/appServerClient.d.ts +20 -0
- package/dist/transport/appServerClient.js +46 -0
- package/dist/transport/protocol.d.ts +22 -0
- package/dist/transport/protocol.js +1 -0
- package/dist/transport/stdioTransport.d.ts +17 -0
- package/dist/transport/stdioTransport.js +97 -0
- package/dist/utils/ids.d.ts +1 -0
- package/dist/utils/ids.js +4 -0
- package/dist/utils/keyedQueue.d.ts +4 -0
- package/dist/utils/keyedQueue.js +16 -0
- package/dist/utils/logger.d.ts +7 -0
- package/dist/utils/logger.js +6 -0
- package/docs/cards/approval-card.json +21 -0
- package/docs/cards/control-card.json +26 -0
- package/docs/cards/turn-live-card.json +15 -0
- package/openclaw.plugin.json +122 -0
- package/package.json +49 -0
- package/scripts/install.mjs +34 -0
- package/skills/codex-bridge/SKILL.md +14 -0
package/README.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# OpenClaw × Codex × Feishu Plugin
|
|
2
|
+
|
|
3
|
+
该仓库现在提供了可运行的生产实现骨架(不仅是文档草图),核心能力包括:
|
|
4
|
+
|
|
5
|
+
- `/codex` 命令路由(`new/resume/status/detach/stop/steer/plan/raw/model/permissions/review/approve/replay/log`)
|
|
6
|
+
- `codex_bridge_send` 工具(给主 agent 做轻量 handoff)
|
|
7
|
+
- `codex app-server` `stdio` transport 与 JSON-RPC 请求/通知处理(当前仅 stdio)
|
|
8
|
+
- 绑定状态持久化(`bindings/*.json`)
|
|
9
|
+
- turn 级 JSONL journal 落盘(`threads/<threadId>/turns/*.jsonl`)
|
|
10
|
+
- raw chunk 渲染与 ANSI/`\r` 规范化
|
|
11
|
+
|
|
12
|
+
## 运行环境
|
|
13
|
+
|
|
14
|
+
- Node.js **>= 22.12**(OpenClaw CLI 要求)
|
|
15
|
+
- npm 10+
|
|
16
|
+
|
|
17
|
+
## 安装与试用
|
|
18
|
+
|
|
19
|
+
### 一行命令安装(推荐)
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx openclaw-codex-feishu install
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
该命令会自动执行插件安装与启用。
|
|
26
|
+
|
|
27
|
+
### 本地开发安装
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm install
|
|
31
|
+
npm run typecheck
|
|
32
|
+
npm run build
|
|
33
|
+
npm run validate:json
|
|
34
|
+
openclaw plugins install .
|
|
35
|
+
openclaw plugins enable codex-feishu
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## 快速验证
|
|
39
|
+
|
|
40
|
+
1. 在 Feishu 聊天发送 `/codex new /path/to/workspace`
|
|
41
|
+
2. 发送普通任务文本(attached 模式会转为 `turn/start`)
|
|
42
|
+
3. 发送 `/codex status` 查看绑定状态
|
|
43
|
+
4. 发送 `/codex stop` 中断当前 turn
|
|
44
|
+
5. 查看 `.openclaw-codex-feishu/threads/*/turns/*.jsonl` 确认日志落盘
|
|
45
|
+
|
|
46
|
+
## 当前实现范围
|
|
47
|
+
|
|
48
|
+
已实现生产必需基础链路:会话绑定、transport、命令路由、日志先写后渲染。
|
|
49
|
+
若需要进一步增强,可继续补充:Feishu 卡片 API 实发、审批卡按钮回传、diff 文件上传等 UI 细节。
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
export declare const codexCommandSchema: {
|
|
2
|
+
readonly name: "codex";
|
|
3
|
+
readonly description: "Manage Codex sessions bridged to the current Feishu conversation.";
|
|
4
|
+
readonly subcommands: readonly [{
|
|
5
|
+
readonly name: "new";
|
|
6
|
+
readonly args: readonly [{
|
|
7
|
+
readonly name: "workspaceOrProject";
|
|
8
|
+
readonly required: false;
|
|
9
|
+
}];
|
|
10
|
+
}, {
|
|
11
|
+
readonly name: "resume";
|
|
12
|
+
readonly args: readonly [{
|
|
13
|
+
readonly name: "queryOrThreadId";
|
|
14
|
+
readonly required: false;
|
|
15
|
+
}];
|
|
16
|
+
}, {
|
|
17
|
+
readonly name: "detach";
|
|
18
|
+
readonly args: readonly [];
|
|
19
|
+
}, {
|
|
20
|
+
readonly name: "stop";
|
|
21
|
+
readonly args: readonly [];
|
|
22
|
+
}, {
|
|
23
|
+
readonly name: "steer";
|
|
24
|
+
readonly args: readonly [{
|
|
25
|
+
readonly name: "text";
|
|
26
|
+
readonly required: true;
|
|
27
|
+
readonly variadic: true;
|
|
28
|
+
}];
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "plan";
|
|
31
|
+
readonly args: readonly [{
|
|
32
|
+
readonly name: "goal";
|
|
33
|
+
readonly required: false;
|
|
34
|
+
readonly variadic: true;
|
|
35
|
+
}];
|
|
36
|
+
}, {
|
|
37
|
+
readonly name: "review";
|
|
38
|
+
readonly args: readonly [{
|
|
39
|
+
readonly name: "focus";
|
|
40
|
+
readonly required: false;
|
|
41
|
+
readonly variadic: true;
|
|
42
|
+
}];
|
|
43
|
+
}, {
|
|
44
|
+
readonly name: "raw";
|
|
45
|
+
readonly args: readonly [{
|
|
46
|
+
readonly name: "mode";
|
|
47
|
+
readonly required: true;
|
|
48
|
+
readonly enum: readonly ["off", "cli", "all"];
|
|
49
|
+
}];
|
|
50
|
+
}, {
|
|
51
|
+
readonly name: "model";
|
|
52
|
+
readonly args: readonly [{
|
|
53
|
+
readonly name: "name";
|
|
54
|
+
readonly required: true;
|
|
55
|
+
}];
|
|
56
|
+
}, {
|
|
57
|
+
readonly name: "permissions";
|
|
58
|
+
readonly args: readonly [{
|
|
59
|
+
readonly name: "mode";
|
|
60
|
+
readonly required: true;
|
|
61
|
+
readonly enum: readonly ["default", "full"];
|
|
62
|
+
}];
|
|
63
|
+
}, {
|
|
64
|
+
readonly name: "log";
|
|
65
|
+
readonly args: readonly [{
|
|
66
|
+
readonly name: "turnId";
|
|
67
|
+
readonly required: false;
|
|
68
|
+
}];
|
|
69
|
+
}, {
|
|
70
|
+
readonly name: "replay";
|
|
71
|
+
readonly args: readonly [{
|
|
72
|
+
readonly name: "turnId";
|
|
73
|
+
readonly required: false;
|
|
74
|
+
}];
|
|
75
|
+
}, {
|
|
76
|
+
readonly name: "status";
|
|
77
|
+
readonly args: readonly [];
|
|
78
|
+
}, {
|
|
79
|
+
readonly name: "approve";
|
|
80
|
+
readonly args: readonly [{
|
|
81
|
+
readonly name: "requestId";
|
|
82
|
+
readonly required: true;
|
|
83
|
+
}, {
|
|
84
|
+
readonly name: "action";
|
|
85
|
+
readonly required: true;
|
|
86
|
+
readonly enum: readonly ["allow-once", "allow-always", "deny", "cancel", "amend"];
|
|
87
|
+
}, {
|
|
88
|
+
readonly name: "amendedCommand";
|
|
89
|
+
readonly required: false;
|
|
90
|
+
readonly variadic: true;
|
|
91
|
+
}];
|
|
92
|
+
}];
|
|
93
|
+
readonly aliases: {
|
|
94
|
+
readonly cas_resume: "codex resume";
|
|
95
|
+
readonly cas_status: "codex status";
|
|
96
|
+
readonly cas_stop: "codex stop";
|
|
97
|
+
readonly cas_steer: "codex steer";
|
|
98
|
+
readonly cas_plan: "codex plan";
|
|
99
|
+
readonly cas_review: "codex review";
|
|
100
|
+
readonly cas_detach: "codex detach";
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
export type CodexCommandSchema = typeof codexCommandSchema;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export const codexCommandSchema = {
|
|
2
|
+
name: "codex",
|
|
3
|
+
description: "Manage Codex sessions bridged to the current Feishu conversation.",
|
|
4
|
+
subcommands: [
|
|
5
|
+
{ name: "new", args: [{ name: "workspaceOrProject", required: false }] },
|
|
6
|
+
{ name: "resume", args: [{ name: "queryOrThreadId", required: false }] },
|
|
7
|
+
{ name: "detach", args: [] },
|
|
8
|
+
{ name: "stop", args: [] },
|
|
9
|
+
{ name: "steer", args: [{ name: "text", required: true, variadic: true }] },
|
|
10
|
+
{ name: "plan", args: [{ name: "goal", required: false, variadic: true }] },
|
|
11
|
+
{ name: "review", args: [{ name: "focus", required: false, variadic: true }] },
|
|
12
|
+
{
|
|
13
|
+
name: "raw",
|
|
14
|
+
args: [{ name: "mode", required: true, enum: ["off", "cli", "all"] }]
|
|
15
|
+
},
|
|
16
|
+
{ name: "model", args: [{ name: "name", required: true }] },
|
|
17
|
+
{
|
|
18
|
+
name: "permissions",
|
|
19
|
+
args: [{ name: "mode", required: true, enum: ["default", "full"] }]
|
|
20
|
+
},
|
|
21
|
+
{ name: "log", args: [{ name: "turnId", required: false }] },
|
|
22
|
+
{ name: "replay", args: [{ name: "turnId", required: false }] },
|
|
23
|
+
{ name: "status", args: [] },
|
|
24
|
+
{
|
|
25
|
+
name: "approve",
|
|
26
|
+
args: [
|
|
27
|
+
{ name: "requestId", required: true },
|
|
28
|
+
{ name: "action", required: true, enum: ["allow-once", "allow-always", "deny", "cancel", "amend"] },
|
|
29
|
+
{ name: "amendedCommand", required: false, variadic: true }
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
aliases: {
|
|
34
|
+
cas_resume: "codex resume",
|
|
35
|
+
cas_status: "codex status",
|
|
36
|
+
cas_stop: "codex stop",
|
|
37
|
+
cas_steer: "codex steer",
|
|
38
|
+
cas_plan: "codex plan",
|
|
39
|
+
cas_review: "codex review",
|
|
40
|
+
cas_detach: "codex detach"
|
|
41
|
+
}
|
|
42
|
+
};
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type AttachMode = "attached" | "toolOnly";
|
|
2
|
+
export type RawMode = "off" | "cli" | "all";
|
|
3
|
+
export interface PluginConfig {
|
|
4
|
+
transport: "stdio";
|
|
5
|
+
command: string;
|
|
6
|
+
args: string[];
|
|
7
|
+
defaultWorkspaceDir?: string;
|
|
8
|
+
defaultModel?: string;
|
|
9
|
+
attachModeDefault?: AttachMode;
|
|
10
|
+
rawModeDefault?: RawMode;
|
|
11
|
+
feishu?: {
|
|
12
|
+
pinControlCard?: boolean;
|
|
13
|
+
rotateControlCardAfterDays?: number;
|
|
14
|
+
controlCardEditMinIntervalMs?: number;
|
|
15
|
+
streamFlushMs?: number;
|
|
16
|
+
streamChunkChars?: number;
|
|
17
|
+
liveTailChars?: number;
|
|
18
|
+
sendJsonlOnTurnComplete?: boolean;
|
|
19
|
+
sendReadableTranscriptOnTurnComplete?: boolean;
|
|
20
|
+
buttonsOnly?: boolean;
|
|
21
|
+
};
|
|
22
|
+
dataDir?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function resolveConfig(raw: unknown): Required<PluginConfig>;
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export function resolveConfig(raw) {
|
|
2
|
+
const input = (raw ?? {});
|
|
3
|
+
return {
|
|
4
|
+
transport: input.transport ?? "stdio",
|
|
5
|
+
command: input.command ?? "codex",
|
|
6
|
+
args: input.args ?? ["app-server", "--listen", "stdio://"],
|
|
7
|
+
defaultWorkspaceDir: input.defaultWorkspaceDir ?? process.cwd(),
|
|
8
|
+
defaultModel: input.defaultModel ?? "gpt-5.4",
|
|
9
|
+
attachModeDefault: input.attachModeDefault ?? "attached",
|
|
10
|
+
rawModeDefault: input.rawModeDefault ?? "cli",
|
|
11
|
+
dataDir: input.dataDir ?? ".openclaw-codex-feishu",
|
|
12
|
+
feishu: {
|
|
13
|
+
pinControlCard: input.feishu?.pinControlCard ?? true,
|
|
14
|
+
rotateControlCardAfterDays: input.feishu?.rotateControlCardAfterDays ?? 12,
|
|
15
|
+
controlCardEditMinIntervalMs: input.feishu?.controlCardEditMinIntervalMs ?? 1000,
|
|
16
|
+
streamFlushMs: input.feishu?.streamFlushMs ?? 750,
|
|
17
|
+
streamChunkChars: input.feishu?.streamChunkChars ?? 1500,
|
|
18
|
+
liveTailChars: input.feishu?.liveTailChars ?? 1200,
|
|
19
|
+
sendJsonlOnTurnComplete: input.feishu?.sendJsonlOnTurnComplete ?? true,
|
|
20
|
+
sendReadableTranscriptOnTurnComplete: input.feishu?.sendReadableTranscriptOnTurnComplete ?? false,
|
|
21
|
+
buttonsOnly: input.feishu?.buttonsOnly ?? true
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
configSchema: import("openclaw/plugin-sdk/plugin-entry").OpenClawPluginConfigSchema;
|
|
6
|
+
register: NonNullable<import("openclaw/plugin-sdk/plugin-entry").OpenClawPluginDefinition["register"]>;
|
|
7
|
+
} & Pick<import("openclaw/plugin-sdk/plugin-entry").OpenClawPluginDefinition, "kind">;
|
|
8
|
+
export default _default;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
3
|
+
import { BridgeRuntime } from "./runtime/bridgeRuntime.js";
|
|
4
|
+
import { noopLogger } from "./utils/logger.js";
|
|
5
|
+
let runtime;
|
|
6
|
+
function resolveIdentity(ctx) {
|
|
7
|
+
return {
|
|
8
|
+
channel: String(ctx?.channel ?? "feishu"),
|
|
9
|
+
accountId: String(ctx?.senderId ?? "unknown"),
|
|
10
|
+
peerKey: String(ctx?.senderId ?? "unknown")
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export default definePluginEntry({
|
|
14
|
+
id: "codex-feishu",
|
|
15
|
+
name: "OpenClaw Codex Feishu Bridge",
|
|
16
|
+
description: "Production bridge for Codex app-server sessions in Feishu with journaling and command routing.",
|
|
17
|
+
register(api) {
|
|
18
|
+
const logger = api?.logger ?? noopLogger;
|
|
19
|
+
runtime = new BridgeRuntime(api?.config, logger, {
|
|
20
|
+
async sendText(identity, text) {
|
|
21
|
+
logger.info(`[codex-feishu][${identity.channel}:${identity.accountId}:${identity.peerKey}] ${text}`);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
api.registerService({
|
|
25
|
+
id: "codex-feishu-runtime",
|
|
26
|
+
start: async () => {
|
|
27
|
+
await runtime?.start();
|
|
28
|
+
},
|
|
29
|
+
stop: () => {
|
|
30
|
+
runtime?.stop();
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
api.registerCommand({
|
|
34
|
+
name: "codex",
|
|
35
|
+
description: "Manage Codex session binding and runtime operations.",
|
|
36
|
+
acceptsArgs: true,
|
|
37
|
+
requireAuth: true,
|
|
38
|
+
handler: async (ctx) => {
|
|
39
|
+
const identity = resolveIdentity(ctx);
|
|
40
|
+
const text = await runtime?.handleCodexCommand(identity, ctx?.args ?? "");
|
|
41
|
+
return { text: text ?? "runtime not ready" };
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
api.registerTool({
|
|
45
|
+
name: "codex_bridge_send",
|
|
46
|
+
label: "Codex Bridge Send",
|
|
47
|
+
description: "Send a task to the bound Codex thread and return an ACK.",
|
|
48
|
+
parameters: Type.Object({
|
|
49
|
+
task: Type.String({ minLength: 1, description: "Task goal or user instruction for Codex." }),
|
|
50
|
+
context: Type.Optional(Type.String({ description: "Optional context excerpt." }))
|
|
51
|
+
}),
|
|
52
|
+
async execute(_id, params) {
|
|
53
|
+
const identity = { channel: "feishu", accountId: "tool", peerKey: "tool" };
|
|
54
|
+
const ack = await runtime?.handleCodexToolTask(identity, params.task, params.context);
|
|
55
|
+
return {
|
|
56
|
+
content: [{ type: "text", text: ack ?? "Codex runtime unavailable" }],
|
|
57
|
+
details: {
|
|
58
|
+
accepted: Boolean(ack),
|
|
59
|
+
taskPreview: params.task.slice(0, 120),
|
|
60
|
+
hasContext: Boolean(params.context)
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ChunkSink {
|
|
2
|
+
sendChunk(bindingKey: string, chunk: string): Promise<void>;
|
|
3
|
+
}
|
|
4
|
+
export declare class RawChunkRenderer {
|
|
5
|
+
private readonly sink;
|
|
6
|
+
private readonly chunkSize;
|
|
7
|
+
private readonly buffers;
|
|
8
|
+
constructor(sink: ChunkSink, chunkSize: number);
|
|
9
|
+
push(bindingKey: string, text: string, forceFlush?: boolean): Promise<void>;
|
|
10
|
+
flush(bindingKey: string): Promise<void>;
|
|
11
|
+
private flushCombined;
|
|
12
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { normalizeTranscriptChunk } from "./transcriptNormalizer.js";
|
|
2
|
+
export class RawChunkRenderer {
|
|
3
|
+
sink;
|
|
4
|
+
chunkSize;
|
|
5
|
+
buffers = new Map();
|
|
6
|
+
constructor(sink, chunkSize) {
|
|
7
|
+
this.sink = sink;
|
|
8
|
+
this.chunkSize = chunkSize;
|
|
9
|
+
}
|
|
10
|
+
async push(bindingKey, text, forceFlush = false) {
|
|
11
|
+
const normalized = normalizeTranscriptChunk(text);
|
|
12
|
+
const current = this.buffers.get(bindingKey) ?? "";
|
|
13
|
+
const combined = `${current}${normalized}`;
|
|
14
|
+
if (!forceFlush && combined.length < this.chunkSize) {
|
|
15
|
+
this.buffers.set(bindingKey, combined);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
await this.flushCombined(bindingKey, combined);
|
|
19
|
+
}
|
|
20
|
+
async flush(bindingKey) {
|
|
21
|
+
const combined = this.buffers.get(bindingKey);
|
|
22
|
+
if (!combined)
|
|
23
|
+
return;
|
|
24
|
+
await this.flushCombined(bindingKey, combined);
|
|
25
|
+
}
|
|
26
|
+
async flushCombined(bindingKey, combined) {
|
|
27
|
+
this.buffers.set(bindingKey, "");
|
|
28
|
+
let offset = 0;
|
|
29
|
+
while (offset < combined.length) {
|
|
30
|
+
const chunk = combined.slice(offset, offset + this.chunkSize);
|
|
31
|
+
offset += this.chunkSize;
|
|
32
|
+
if (!chunk)
|
|
33
|
+
continue;
|
|
34
|
+
await this.sink.sendChunk(bindingKey, chunk);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalizeTranscriptChunk(input: string): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const ANSI_RE = /\u001B\[[0-?]*[ -/]*[@-~]/g;
|
|
2
|
+
export function normalizeTranscriptChunk(input) {
|
|
3
|
+
const noAnsi = input.replace(ANSI_RE, "");
|
|
4
|
+
// Handle carriage-return overwrite behavior from terminals.
|
|
5
|
+
return noAnsi
|
|
6
|
+
.split("\n")
|
|
7
|
+
.map((line) => {
|
|
8
|
+
const lastCarriageReturn = line.lastIndexOf("\r");
|
|
9
|
+
return lastCarriageReturn >= 0 ? line.slice(lastCarriageReturn + 1) : line;
|
|
10
|
+
})
|
|
11
|
+
.join("\n");
|
|
12
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type ChunkSink } from "../render/rawChunkRenderer.js";
|
|
2
|
+
import { type BindingIdentity } from "../state/bindingStore.js";
|
|
3
|
+
import type { LoggerLike } from "../utils/logger.js";
|
|
4
|
+
export interface ChatSink {
|
|
5
|
+
sendText(identity: BindingIdentity, text: string): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export declare class BridgeRuntime implements ChunkSink {
|
|
8
|
+
private readonly logger;
|
|
9
|
+
private readonly chatSink;
|
|
10
|
+
private readonly config;
|
|
11
|
+
private readonly bindingStore;
|
|
12
|
+
private readonly journalStore;
|
|
13
|
+
private readonly renderer;
|
|
14
|
+
private readonly queue;
|
|
15
|
+
private readonly client;
|
|
16
|
+
constructor(rawConfig: unknown, logger: LoggerLike, chatSink: ChatSink);
|
|
17
|
+
start(): Promise<void>;
|
|
18
|
+
stop(): void;
|
|
19
|
+
sendChunk(bindingKey: string, chunk: string): Promise<void>;
|
|
20
|
+
handleCodexToolTask(identity: BindingIdentity, task: string, context?: string): Promise<string>;
|
|
21
|
+
handleCodexCommand(identity: BindingIdentity, argsRaw: string): Promise<string>;
|
|
22
|
+
private handleSteer;
|
|
23
|
+
private handlePlan;
|
|
24
|
+
private handleNew;
|
|
25
|
+
private handleResume;
|
|
26
|
+
private handleStatus;
|
|
27
|
+
private handleDetach;
|
|
28
|
+
private handleStop;
|
|
29
|
+
private handleRaw;
|
|
30
|
+
private handleModel;
|
|
31
|
+
private handlePermissions;
|
|
32
|
+
private handleReview;
|
|
33
|
+
private handleApprove;
|
|
34
|
+
private handleReplay;
|
|
35
|
+
private dispatchUserInput;
|
|
36
|
+
private handleNotification;
|
|
37
|
+
private identityFromBindingKey;
|
|
38
|
+
private shouldRenderRaw;
|
|
39
|
+
private extractRenderableText;
|
|
40
|
+
}
|