feat: surface codex thread collaboration capabilities
This commit is contained in:
@@ -28,7 +28,7 @@ if (args.includes("--version")) {
|
||||
}
|
||||
if (args[0] === "app-server" && args.includes("--help")) {
|
||||
console.log("Usage: codex app-server [OPTIONS]");
|
||||
console.log("--listen <URL> stdio:// unix:// ws://IP:PORT off");
|
||||
console.log("--listen <URL> stdio:// unix:// ws://IP:PORT off ");
|
||||
process.exit(0);
|
||||
}
|
||||
if (args[0] === "app-server" && args[1] === "generate-json-schema") {
|
||||
@@ -36,6 +36,9 @@ if (args[0] === "app-server" && args[1] === "generate-json-schema") {
|
||||
writeGenerated(out, "codex_app_server_protocol.schemas.json", JSON.stringify({
|
||||
anyOf: [
|
||||
{ properties: { method: { const: "thread/start" } } },
|
||||
{ properties: { method: { const: "thread/resume" } } },
|
||||
{ properties: { method: { const: "thread/read" } } },
|
||||
{ properties: { method: { const: "thread/turns/list" } } },
|
||||
{ properties: { method: { const: "thread/inject_items" } } },
|
||||
{ properties: { method: { const: "thread/archive" } } },
|
||||
{ properties: { method: { const: "thread/archived" } } },
|
||||
@@ -93,6 +96,11 @@ if (args[0] === "app-server" && args[1] === "generate-json-schema") {
|
||||
{ properties: { method: { const: "marketplace/upgrade" } } },
|
||||
{ properties: { method: { const: "experimentalFeature/list" } } },
|
||||
{ properties: { method: { const: "experimentalFeature/enablement/set" } } },
|
||||
{ properties: { method: { const: "app/list" } } },
|
||||
{ properties: { method: { const: "app/list/updated" } } },
|
||||
{ properties: { method: { const: "collaborationMode/list" } } },
|
||||
{ properties: { method: { const: "configRequirements/read" } } },
|
||||
{ properties: { method: { const: "mcpServerStatus/list" } } },
|
||||
{ properties: { method: { const: "review/start" } } },
|
||||
{ properties: { method: { const: "windowsSandbox/readiness" } } },
|
||||
{ properties: { method: { const: "windowsSandbox/setupStart" } } },
|
||||
@@ -123,13 +131,22 @@ if (args[0] === "app-server" && args[1] === "generate-json-schema") {
|
||||
{ properties: { method: { const: "hooks/list" } } },
|
||||
{ properties: { method: { const: "turn/interrupt" } } },
|
||||
{ properties: { method: { const: "turn/start" } } }
|
||||
]
|
||||
],
|
||||
definitions: {
|
||||
ThreadItem: {
|
||||
anyOf: [
|
||||
{ properties: { type: { const: "agentMessage" } } },
|
||||
{ properties: { type: { const: "collabToolCall" } } },
|
||||
{ properties: { type: { const: "contextCompaction" } } }
|
||||
]
|
||||
}
|
||||
}
|
||||
}, null, 2));
|
||||
process.exit(0);
|
||||
}
|
||||
if (args[0] === "app-server" && args[1] === "generate-ts") {
|
||||
const out = args[args.indexOf("--out") + 1];
|
||||
writeGenerated(out, "ClientRequest.ts", 'export type ClientRequest = { "method": "thread/start" } | { "method": "skills/extraRoots/set" } | { "method": "hooks/list" } | { "method": "turn/start" };\\n');
|
||||
writeGenerated(out, "ClientRequest.ts", 'export type ClientRequest = { "method": "thread/start" } | { "method": "app/list" } | { "method": "collaborationMode/list" } | { "method": "mcpServerStatus/list" } | { "method": "configRequirements/read" } | { "method": "skills/extraRoots/set" } | { "method": "hooks/list" } | { "method": "turn/start" }; export type ThreadItem = { type: "collabToolCall" } | { type: "contextCompaction" };\\n');
|
||||
process.exit(0);
|
||||
}
|
||||
console.error("unexpected args " + args.join(" "));
|
||||
@@ -160,6 +177,10 @@ process.exit(2);
|
||||
assert.equal(manifest.codexVersion, "0.135.0-alpha.1");
|
||||
assert.equal(manifest.supports.wsTransport, true);
|
||||
assert.equal(manifest.supports.unixTransport, true);
|
||||
assert.equal(manifest.supports.threadStart, true);
|
||||
assert.equal(manifest.supports.threadResume, true);
|
||||
assert.equal(manifest.supports.threadRead, true);
|
||||
assert.equal(manifest.supports.threadTurnHistory, true);
|
||||
assert.equal(manifest.supports.threadInjectItems, true);
|
||||
assert.equal(manifest.supports.skillsExtraRoots, true);
|
||||
assert.equal(manifest.supports.hooksList, true);
|
||||
@@ -198,6 +219,13 @@ process.exit(2);
|
||||
assert.equal(manifest.supports.marketplaceRemove, true);
|
||||
assert.equal(manifest.supports.marketplaceUpgrade, true);
|
||||
assert.equal(manifest.supports.experimentalFeatureEnablementSet, true);
|
||||
assert.equal(manifest.supports.appList, true);
|
||||
assert.equal(manifest.supports.appListUpdated, true);
|
||||
assert.equal(manifest.supports.collaborationModeList, true);
|
||||
assert.equal(manifest.supports.configRequirementsRead, true);
|
||||
assert.equal(manifest.supports.mcpServerStatusList, true);
|
||||
assert.equal(manifest.supports.threadCollaborationItems, true);
|
||||
assert.equal(manifest.supports.contextCompactionItem, true);
|
||||
assert.equal(manifest.supports.reviewStart, true);
|
||||
assert.equal(manifest.supports.windowsSandboxReadiness, true);
|
||||
assert.equal(manifest.supports.windowsSandboxSetupStart, true);
|
||||
@@ -228,6 +256,9 @@ process.exit(2);
|
||||
"account/login/start",
|
||||
"account/logout",
|
||||
"account/sendAddCreditsNudgeEmail",
|
||||
"app/list",
|
||||
"app/list/updated",
|
||||
"collaborationMode/list",
|
||||
"command/exec",
|
||||
"command/exec/outputDelta",
|
||||
"command/exec/resize",
|
||||
@@ -236,6 +267,7 @@ process.exit(2);
|
||||
"config/batchWrite",
|
||||
"config/mcpServer/reload",
|
||||
"config/value/write",
|
||||
"configRequirements/read",
|
||||
"experimentalFeature/enablement/set",
|
||||
"experimentalFeature/list",
|
||||
"externalAgentConfig/detect",
|
||||
@@ -271,6 +303,7 @@ process.exit(2);
|
||||
"mcpServer/oauthLogin/completed",
|
||||
"mcpServer/resource/read",
|
||||
"mcpServer/tool/call",
|
||||
"mcpServerStatus/list",
|
||||
"plugin/install",
|
||||
"plugin/installed",
|
||||
"plugin/read",
|
||||
@@ -298,10 +331,13 @@ process.exit(2);
|
||||
"thread/metadata/update",
|
||||
"thread/name/set",
|
||||
"thread/name/updated",
|
||||
"thread/read",
|
||||
"thread/resume",
|
||||
"thread/rollback",
|
||||
"thread/shellCommand",
|
||||
"thread/start",
|
||||
"thread/started",
|
||||
"thread/turns/list",
|
||||
"thread/unarchive",
|
||||
"thread/unarchived",
|
||||
"thread/unsubscribe",
|
||||
@@ -311,10 +347,9 @@ process.exit(2);
|
||||
"windowsSandbox/setupCompleted",
|
||||
"windowsSandbox/setupStart",
|
||||
]);
|
||||
assert.match(
|
||||
await readFile(path.join(outDir, "0.135.0-alpha.1", "app-server-help.txt"), "utf8"),
|
||||
/ws:\/\/IP:PORT/,
|
||||
);
|
||||
const helpText = await readFile(path.join(outDir, "0.135.0-alpha.1", "app-server-help.txt"), "utf8");
|
||||
assert.match(helpText, /ws:\/\/IP:PORT/);
|
||||
assert.doesNotMatch(helpText, /[ \t]$/m);
|
||||
} finally {
|
||||
await rm(runtimeRoot, { recursive: true, force: true });
|
||||
}
|
||||
|
||||
@@ -163,6 +163,14 @@ test("device detail exposes Codex App Server discovered model and extension summ
|
||||
userInitiatedOnly: true,
|
||||
labels: ["归档", "恢复", "分叉", "压缩", "回滚", "改名", "元数据", "活跃干预", "中断", "Shell", "取消订阅"],
|
||||
},
|
||||
threadCollaborationSummary: {
|
||||
bossBrokerAvailable: true,
|
||||
collabToolCallHandlerAvailable: true,
|
||||
directThreadChatSupported: false,
|
||||
collaborationModeCount: 2,
|
||||
userInitiatedOnly: true,
|
||||
labels: ["源线程读取", "上下文注入", "目标线程执行", "协作事件"],
|
||||
},
|
||||
pluginGovernanceSummary: {
|
||||
actionCount: 9,
|
||||
lifecycleActionCount: 2,
|
||||
@@ -321,6 +329,7 @@ test("device detail exposes Codex App Server discovered model and extension summ
|
||||
assert.equal(cards.capabilities.items.codexThreads, "线程:3 个 · 已加载 2 个 · 活跃 1 个 · 最新 2026-06-03 16:20");
|
||||
assert.equal(cards.capabilities.items.codexTurns, "轮次:3 个 · 运行中 1 个 · 完成 2 个 · 最新 2026-06-03 16:21");
|
||||
assert.equal(cards.capabilities.items.codexThreadActions, "线程操作:11 项 · 生命周期 5 项 · 活跃干预 2 项 · Shell 可用");
|
||||
assert.equal(cards.capabilities.items.codexThreadCollaboration, "线程协作:Boss Broker 可用 · 协作事件可处理 · 2 种模式 · 非原生私聊");
|
||||
assert.equal(cards.capabilities.items.codexPluginGovernance, "插件治理:9 项 · 安装/卸载 2 项 · 共享 4 项 · Skill 读取可用");
|
||||
assert.equal(cards.capabilities.items.codexAccountGovernance, "账号治理:6 项 · 登录 3 项 · 令牌刷新可用 · 额度提醒可用");
|
||||
assert.equal(cards.capabilities.items.codexConfigGovernance, "配置治理:5 项 · 写入 3 项 · 重载 1 项 · 读取可用");
|
||||
|
||||
@@ -131,6 +131,14 @@ test("codex app-server discovery includes governance and MCP summaries without l
|
||||
userInitiatedOnly: true,
|
||||
labels: ["归档", "恢复", "分叉", "压缩", "回滚", "改名", "元数据", "活跃干预", "中断", "Shell", "取消订阅"],
|
||||
});
|
||||
assert.deepEqual(metadata.threadCollaborationSummary, {
|
||||
bossBrokerAvailable: true,
|
||||
collabToolCallHandlerAvailable: true,
|
||||
directThreadChatSupported: false,
|
||||
collaborationModeCount: 2,
|
||||
userInitiatedOnly: true,
|
||||
labels: ["源线程读取", "上下文注入", "目标线程执行", "协作事件"],
|
||||
});
|
||||
assert.deepEqual(metadata.pluginGovernanceSummary, {
|
||||
actionCount: 9,
|
||||
lifecycleActionCount: 2,
|
||||
|
||||
Reference in New Issue
Block a user