@linkshell/wire 0.2.21 → 0.2.22
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/dist/envelopes.d.ts +53 -0
- package/dist/envelopes.js +251 -0
- package/dist/envelopes.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/live-activity.d.ts +6 -6
- package/dist/model.d.ts +32 -0
- package/dist/model.js +24 -0
- package/dist/model.js.map +1 -1
- package/dist/rpc-mcp.d.ts +199 -0
- package/dist/rpc-mcp.js +78 -0
- package/dist/rpc-mcp.js.map +1 -0
- package/dist/rpc.d.ts +494 -4
- package/dist/rpc.js +30 -2
- package/dist/rpc.js.map +1 -1
- package/dist/updates.d.ts +211 -0
- package/dist/updates.js +14 -1
- package/dist/updates.js.map +1 -1
- package/dist/watch.d.ts +16 -16
- package/package.json +1 -1
- package/src/envelopes.ts +278 -0
- package/src/index.ts +2 -0
- package/src/model.ts +24 -0
- package/src/rpc-mcp.ts +81 -0
- package/src/rpc.ts +30 -2
- package/src/updates.ts +15 -1
package/dist/updates.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"updates.js","sourceRoot":"","sources":["../src/updates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,cAAc,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACzK,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAC/F,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,wBAAwB,E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AG,CAAC,CAAC,MAAM,CAAC;IACzC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAChC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,MAAM,EAAE,mBAAmB;CAC5B,CAAC,CAAC"}
|
package/dist/watch.d.ts
CHANGED
|
@@ -105,8 +105,8 @@ export declare const watchActionSchema: z.ZodObject<{
|
|
|
105
105
|
kind: "permission" | "answer" | "async-answer";
|
|
106
106
|
optionId: string;
|
|
107
107
|
requestId: string;
|
|
108
|
-
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
109
108
|
sessionId: string;
|
|
109
|
+
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
110
110
|
computerKey: string;
|
|
111
111
|
questionId?: string | undefined;
|
|
112
112
|
}, {
|
|
@@ -115,8 +115,8 @@ export declare const watchActionSchema: z.ZodObject<{
|
|
|
115
115
|
kind: "permission" | "answer" | "async-answer";
|
|
116
116
|
optionId: string;
|
|
117
117
|
requestId: string;
|
|
118
|
-
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
119
118
|
sessionId: string;
|
|
119
|
+
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
120
120
|
computerKey: string;
|
|
121
121
|
questionId?: string | undefined;
|
|
122
122
|
}>;
|
|
@@ -280,8 +280,8 @@ export declare const watchSessionSchema: z.ZodObject<{
|
|
|
280
280
|
kind: "permission" | "answer" | "async-answer";
|
|
281
281
|
optionId: string;
|
|
282
282
|
requestId: string;
|
|
283
|
-
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
284
283
|
sessionId: string;
|
|
284
|
+
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
285
285
|
computerKey: string;
|
|
286
286
|
questionId?: string | undefined;
|
|
287
287
|
}, {
|
|
@@ -290,8 +290,8 @@ export declare const watchSessionSchema: z.ZodObject<{
|
|
|
290
290
|
kind: "permission" | "answer" | "async-answer";
|
|
291
291
|
optionId: string;
|
|
292
292
|
requestId: string;
|
|
293
|
-
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
294
293
|
sessionId: string;
|
|
294
|
+
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
295
295
|
computerKey: string;
|
|
296
296
|
questionId?: string | undefined;
|
|
297
297
|
}>, "many">>;
|
|
@@ -374,8 +374,8 @@ export declare const watchSessionSchema: z.ZodObject<{
|
|
|
374
374
|
kind: "permission" | "answer" | "async-answer";
|
|
375
375
|
optionId: string;
|
|
376
376
|
requestId: string;
|
|
377
|
-
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
378
377
|
sessionId: string;
|
|
378
|
+
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
379
379
|
computerKey: string;
|
|
380
380
|
questionId?: string | undefined;
|
|
381
381
|
}[] | undefined;
|
|
@@ -445,8 +445,8 @@ export declare const watchSessionSchema: z.ZodObject<{
|
|
|
445
445
|
kind: "permission" | "answer" | "async-answer";
|
|
446
446
|
optionId: string;
|
|
447
447
|
requestId: string;
|
|
448
|
-
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
449
448
|
sessionId: string;
|
|
449
|
+
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
450
450
|
computerKey: string;
|
|
451
451
|
questionId?: string | undefined;
|
|
452
452
|
}[] | undefined;
|
|
@@ -670,8 +670,8 @@ export declare const watchSnapshotSchema: z.ZodObject<{
|
|
|
670
670
|
kind: "permission" | "answer" | "async-answer";
|
|
671
671
|
optionId: string;
|
|
672
672
|
requestId: string;
|
|
673
|
-
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
674
673
|
sessionId: string;
|
|
674
|
+
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
675
675
|
computerKey: string;
|
|
676
676
|
questionId?: string | undefined;
|
|
677
677
|
}, {
|
|
@@ -680,8 +680,8 @@ export declare const watchSnapshotSchema: z.ZodObject<{
|
|
|
680
680
|
kind: "permission" | "answer" | "async-answer";
|
|
681
681
|
optionId: string;
|
|
682
682
|
requestId: string;
|
|
683
|
-
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
684
683
|
sessionId: string;
|
|
684
|
+
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
685
685
|
computerKey: string;
|
|
686
686
|
questionId?: string | undefined;
|
|
687
687
|
}>, "many">>;
|
|
@@ -764,8 +764,8 @@ export declare const watchSnapshotSchema: z.ZodObject<{
|
|
|
764
764
|
kind: "permission" | "answer" | "async-answer";
|
|
765
765
|
optionId: string;
|
|
766
766
|
requestId: string;
|
|
767
|
-
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
768
767
|
sessionId: string;
|
|
768
|
+
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
769
769
|
computerKey: string;
|
|
770
770
|
questionId?: string | undefined;
|
|
771
771
|
}[] | undefined;
|
|
@@ -835,8 +835,8 @@ export declare const watchSnapshotSchema: z.ZodObject<{
|
|
|
835
835
|
kind: "permission" | "answer" | "async-answer";
|
|
836
836
|
optionId: string;
|
|
837
837
|
requestId: string;
|
|
838
|
-
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
839
838
|
sessionId: string;
|
|
839
|
+
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
840
840
|
computerKey: string;
|
|
841
841
|
questionId?: string | undefined;
|
|
842
842
|
}[] | undefined;
|
|
@@ -946,8 +946,8 @@ export declare const watchSnapshotSchema: z.ZodObject<{
|
|
|
946
946
|
kind: "permission" | "answer" | "async-answer";
|
|
947
947
|
optionId: string;
|
|
948
948
|
requestId: string;
|
|
949
|
-
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
950
949
|
sessionId: string;
|
|
950
|
+
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
951
951
|
computerKey: string;
|
|
952
952
|
questionId?: string | undefined;
|
|
953
953
|
}[] | undefined;
|
|
@@ -1055,8 +1055,8 @@ export declare const watchSnapshotSchema: z.ZodObject<{
|
|
|
1055
1055
|
kind: "permission" | "answer" | "async-answer";
|
|
1056
1056
|
optionId: string;
|
|
1057
1057
|
requestId: string;
|
|
1058
|
-
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
1059
1058
|
sessionId: string;
|
|
1059
|
+
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
1060
1060
|
computerKey: string;
|
|
1061
1061
|
questionId?: string | undefined;
|
|
1062
1062
|
}[] | undefined;
|
|
@@ -1167,8 +1167,8 @@ export declare const watchCommandSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
|
|
|
1167
1167
|
kind: "permission" | "answer" | "async-answer";
|
|
1168
1168
|
optionId: string;
|
|
1169
1169
|
requestId: string;
|
|
1170
|
-
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
1171
1170
|
sessionId: string;
|
|
1171
|
+
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
1172
1172
|
computerKey: string;
|
|
1173
1173
|
questionId?: string | undefined;
|
|
1174
1174
|
}, {
|
|
@@ -1177,8 +1177,8 @@ export declare const watchCommandSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
|
|
|
1177
1177
|
kind: "permission" | "answer" | "async-answer";
|
|
1178
1178
|
optionId: string;
|
|
1179
1179
|
requestId: string;
|
|
1180
|
-
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
1181
1180
|
sessionId: string;
|
|
1181
|
+
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
1182
1182
|
computerKey: string;
|
|
1183
1183
|
questionId?: string | undefined;
|
|
1184
1184
|
}>;
|
|
@@ -1190,8 +1190,8 @@ export declare const watchCommandSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
|
|
|
1190
1190
|
kind: "permission" | "answer" | "async-answer";
|
|
1191
1191
|
optionId: string;
|
|
1192
1192
|
requestId: string;
|
|
1193
|
-
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
1194
1193
|
sessionId: string;
|
|
1194
|
+
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
1195
1195
|
computerKey: string;
|
|
1196
1196
|
questionId?: string | undefined;
|
|
1197
1197
|
};
|
|
@@ -1204,8 +1204,8 @@ export declare const watchCommandSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodO
|
|
|
1204
1204
|
kind: "permission" | "answer" | "async-answer";
|
|
1205
1205
|
optionId: string;
|
|
1206
1206
|
requestId: string;
|
|
1207
|
-
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
1208
1207
|
sessionId: string;
|
|
1208
|
+
role: "choice" | "stop" | "reject" | "allow" | "always";
|
|
1209
1209
|
computerKey: string;
|
|
1210
1210
|
questionId?: string | undefined;
|
|
1211
1211
|
};
|
package/package.json
CHANGED
package/src/envelopes.ts
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
// What agents and their desktop clients wrap around a person's words. Claude Code adds reminders
|
|
2
|
+
// and IDE state, the Claude app adds session events and peer mail, Codex Desktop adds the files,
|
|
3
|
+
// selection and browser state it attached: context for the model, not what the person typed.
|
|
4
|
+
// Readers show the words, and the context as a chip or an event line where it means something to
|
|
5
|
+
// them, the way Claude's and Codex's own apps do. Shared by the host (titles, previews, what it
|
|
6
|
+
// keeps from Claude's transcripts) and every client.
|
|
7
|
+
|
|
8
|
+
/** Tags whose whole content is for the model only: the Claude app's own list, then Codex's. */
|
|
9
|
+
const HIDDEN_TAGS = [
|
|
10
|
+
"system-reminder",
|
|
11
|
+
"task-notification",
|
|
12
|
+
"slack_context",
|
|
13
|
+
"uploaded_files",
|
|
14
|
+
"available-deferred-tools",
|
|
15
|
+
"new-diagnostics",
|
|
16
|
+
"critical_user_preferences_reminder",
|
|
17
|
+
"persisted-output",
|
|
18
|
+
"local-command-caveat",
|
|
19
|
+
"tick",
|
|
20
|
+
"goal",
|
|
21
|
+
"mcp-resource",
|
|
22
|
+
"mcp-resource-update",
|
|
23
|
+
"mcp-polling-update",
|
|
24
|
+
"teammate-message",
|
|
25
|
+
"cross-session-message",
|
|
26
|
+
"launch-selected-element",
|
|
27
|
+
"connected_office_files",
|
|
28
|
+
"thinking",
|
|
29
|
+
"ide_opened_file",
|
|
30
|
+
"ide_selection",
|
|
31
|
+
"ide_diagnostics",
|
|
32
|
+
"browser_instruction",
|
|
33
|
+
"cell",
|
|
34
|
+
"cell_type",
|
|
35
|
+
"language",
|
|
36
|
+
"command-message",
|
|
37
|
+
"command-args",
|
|
38
|
+
"no-action-needed",
|
|
39
|
+
"comprehensive-mode-instructions",
|
|
40
|
+
"cu_window_hints",
|
|
41
|
+
"widget_context_hint",
|
|
42
|
+
"preview-annotation-context",
|
|
43
|
+
"terminal-selection",
|
|
44
|
+
"environment_context",
|
|
45
|
+
"user_instructions",
|
|
46
|
+
"turn_aborted",
|
|
47
|
+
"subagent_notification",
|
|
48
|
+
"external_codex_apps_open_page",
|
|
49
|
+
];
|
|
50
|
+
|
|
51
|
+
const hiddenPattern = (tags: string[]) => new RegExp(`<(${tags.join("|")})(?:\\s[^>]*)?>[\\s\\S]*?</\\1>`, "gi");
|
|
52
|
+
const HIDDEN = hiddenPattern(HIDDEN_TAGS);
|
|
53
|
+
/** Mail between sessions and agents: hidden in a person's bubble, but a message of its own when it is the whole message. */
|
|
54
|
+
const PEER_TAGS = ["teammate-message", "cross-session-message"];
|
|
55
|
+
const HIDDEN_BUT_PEERS = hiddenPattern(HIDDEN_TAGS.filter((tag) => !PEER_TAGS.includes(tag)));
|
|
56
|
+
|
|
57
|
+
/** Something attached to a message, shown as a chip beside the words. */
|
|
58
|
+
export interface UserContext {
|
|
59
|
+
kind: "file" | "image" | "pasted" | "selection" | "comments" | "checks" | "annotations" | "browser" | "review" | "pull-request" | "merge" | "history" | "other";
|
|
60
|
+
label: string;
|
|
61
|
+
/** A path, or the start of the attached text. */
|
|
62
|
+
detail?: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** A message that is an event, not something said: one line in the conversation. */
|
|
66
|
+
export type UserEvent =
|
|
67
|
+
| { kind: "ci"; count: number }
|
|
68
|
+
| { kind: "github"; count: number }
|
|
69
|
+
| { kind: "sessions"; sessions: { id?: string; title: string }[] }
|
|
70
|
+
| { kind: "scheduled"; name: string; detail?: string };
|
|
71
|
+
|
|
72
|
+
export interface UserTextView {
|
|
73
|
+
/** The words to show; empty when the message is only context, an event or a command's output. */
|
|
74
|
+
text: string;
|
|
75
|
+
context: UserContext[];
|
|
76
|
+
/** A shell command run from the prompt (Claude's `!` mode), and what it printed. */
|
|
77
|
+
shell?: { command?: string; stdout?: string; stderr?: string };
|
|
78
|
+
/** What a local slash command printed (`/cost`, `/context`). */
|
|
79
|
+
output?: string;
|
|
80
|
+
event?: UserEvent;
|
|
81
|
+
/** Nothing in it is for a reader. */
|
|
82
|
+
hidden: boolean;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** The text without what is for the model only; `keepPeers` keeps mail from other sessions and agents. */
|
|
86
|
+
export function stripHiddenContext(text: string, { keepPeers = false }: { keepPeers?: boolean } = {}): string {
|
|
87
|
+
return text
|
|
88
|
+
.replace(/\r\n/g, "\n")
|
|
89
|
+
.replace(keepPeers ? HIDDEN_BUT_PEERS : HIDDEN, "")
|
|
90
|
+
.replace(/<\/?tool_use_error>/g, "")
|
|
91
|
+
// Claude's pointers to a background task's files, for itself.
|
|
92
|
+
.replace(/^(?:Full transcript available at|Read the output file to retrieve the result):.*$/gm, "")
|
|
93
|
+
.replace(/\s*\[event:[\da-f-]{36}\]\s*$/i, "")
|
|
94
|
+
.replace(/\n{3,}/g, "\n\n")
|
|
95
|
+
.trim();
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const ANSI = /\u001b\[[\d;?]*[ -/]*[@-~]/g;
|
|
99
|
+
|
|
100
|
+
function tagText(source: string, tag: string): string | undefined {
|
|
101
|
+
const match = new RegExp(`<${tag}(?:\\s[^>]*)?>([\\s\\S]*?)</${tag}>`, "i").exec(source);
|
|
102
|
+
return match ? match[1]! : undefined;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function attribute(attrs: string, name: string): string | undefined {
|
|
106
|
+
const match = new RegExp(`\\b${name}\\s*=\\s*(?:"([^"]*)"|'([^']*)')`, "i").exec(attrs);
|
|
107
|
+
return match ? (match[1] ?? match[2]) : undefined;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const EVENT_TAGS = ["side-sessions-event", "ci-monitor-event", "github-webhook-activity"] as const;
|
|
111
|
+
const EVENT_PATTERNS = new Map(EVENT_TAGS.map((tag) => [tag, new RegExp(`<${tag}\\b[^>]*>[\\s\\S]*?</${tag}>`, "gi")]));
|
|
112
|
+
|
|
113
|
+
/** A message made only of one kind of tag, repeated: the count, else undefined. */
|
|
114
|
+
function only(text: string, tag: (typeof EVENT_TAGS)[number]): number | undefined {
|
|
115
|
+
if (!text.startsWith(`<${tag}`)) return undefined;
|
|
116
|
+
const pattern = EVENT_PATTERNS.get(tag)!;
|
|
117
|
+
const all = text.match(pattern);
|
|
118
|
+
if (!all) return undefined;
|
|
119
|
+
return text.replace(pattern, "").trim() ? undefined : all.length;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/** Codex Desktop's sections before "## My request:", by heading. */
|
|
123
|
+
const CONTEXT_SECTIONS: Record<string, UserContext["kind"]> = {
|
|
124
|
+
"Files mentioned by the user": "file",
|
|
125
|
+
"Files pasted by the user": "pasted",
|
|
126
|
+
"Selected text": "selection",
|
|
127
|
+
"Diff comments": "comments",
|
|
128
|
+
"Browser comments": "comments",
|
|
129
|
+
"Failing PR checks": "checks",
|
|
130
|
+
"Response annotations": "annotations",
|
|
131
|
+
};
|
|
132
|
+
const MODES: Record<string, [UserContext["kind"], string]> = {
|
|
133
|
+
"Code review guidelines": ["review", "审查模式"],
|
|
134
|
+
"Pull request fix": ["pull-request", "PR 修复"],
|
|
135
|
+
"Auto resolve merge": ["merge", "自动解决冲突"],
|
|
136
|
+
"Prior conversation with Codex": ["history", "参考历史对话"],
|
|
137
|
+
};
|
|
138
|
+
const SECTION_LABELS: Record<string, string> = {
|
|
139
|
+
"Selected text": "选中的文本",
|
|
140
|
+
"Diff comments": "差异评论",
|
|
141
|
+
"Browser comments": "浏览器评论",
|
|
142
|
+
"Failing PR checks": "失败的 PR 检查",
|
|
143
|
+
"Response annotations": "回复批注",
|
|
144
|
+
};
|
|
145
|
+
const REQUEST = /^## My request(?: for Codex)?:[ \t]*$/gm;
|
|
146
|
+
|
|
147
|
+
const baseName = (path: string) => path.split(/[\\/]/).filter(Boolean).at(-1) ?? path;
|
|
148
|
+
|
|
149
|
+
function codexContext(text: string, images: number): { text: string; context: UserContext[] } | undefined {
|
|
150
|
+
const start = /^(#{1,2}) ([^\n:]+):[ \t]*$/m.exec(text);
|
|
151
|
+
// Only an envelope Codex wrote: it opens the message with one of its own headings.
|
|
152
|
+
if (!start || start.index !== 0) return undefined;
|
|
153
|
+
const heading = start[2]!;
|
|
154
|
+
if (!(start[1] === "#" ? heading in CONTEXT_SECTIONS : heading in MODES || /^My request(?: for Codex)?$/.test(heading))) return undefined;
|
|
155
|
+
let cut = -1;
|
|
156
|
+
let after = 0;
|
|
157
|
+
for (const match of text.matchAll(REQUEST)) {
|
|
158
|
+
cut = match.index!;
|
|
159
|
+
after = match.index! + match[0].length;
|
|
160
|
+
}
|
|
161
|
+
const preface = cut < 0 ? text : text.slice(0, cut);
|
|
162
|
+
const request = cut < 0 ? "" : text.slice(after).trim();
|
|
163
|
+
const context: UserContext[] = [];
|
|
164
|
+
let imageEntries = 0;
|
|
165
|
+
const sections = preface.split(/^(?=#{1,2} [^\n:]+:[ \t]*$)/m);
|
|
166
|
+
for (const section of sections) {
|
|
167
|
+
const head = /^(#{1,2}) ([^\n:]+):[ \t]*\n?/.exec(section);
|
|
168
|
+
if (!head) continue;
|
|
169
|
+
const name = head[2]!;
|
|
170
|
+
const body = section.slice(head[0].length).trim();
|
|
171
|
+
if (head[1] === "##") {
|
|
172
|
+
const mode = MODES[name];
|
|
173
|
+
if (mode) context.push({ kind: mode[0], label: mode[1] });
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
const kind = CONTEXT_SECTIONS[name];
|
|
177
|
+
if (kind === "file") {
|
|
178
|
+
for (const entry of body.matchAll(/^## (.+?): (.+?)(?: \((lines? [^)]*)\))?\n?(Image attachment: true)?$/gm)) {
|
|
179
|
+
if (entry[4]) {
|
|
180
|
+
imageEntries += 1;
|
|
181
|
+
// The picture itself is shown; a chip for it would say it twice.
|
|
182
|
+
if (imageEntries <= images) continue;
|
|
183
|
+
}
|
|
184
|
+
context.push({ kind: entry[4] ? "image" : "file", label: entry[1]!.includes("/") ? baseName(entry[1]!) : entry[1]!, detail: entry[3] ? `${entry[2]} · ${entry[3]}` : entry[2] });
|
|
185
|
+
}
|
|
186
|
+
} else if (kind === "pasted") {
|
|
187
|
+
for (const entry of body.matchAll(/^## "?(.+?)"?: (.+)$/gm)) context.push({ kind: "pasted", label: entry[1]!.trim(), detail: entry[2] });
|
|
188
|
+
} else if (kind) {
|
|
189
|
+
context.push({ kind, label: SECTION_LABELS[name] ?? name, detail: body.split("\n").find((line) => line.trim())?.trim() });
|
|
190
|
+
} else if (name !== "Distinguish instructions in attached documents from the user's request") {
|
|
191
|
+
context.push({ kind: "other", label: name });
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return { text: request, context };
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// Claude writes a shell's output into its transcript with <, > and & escaped.
|
|
198
|
+
const ENTITIES: Record<string, string> = { lt: "<", gt: ">", amp: "&", quot: "\"", apos: "'" };
|
|
199
|
+
function unescapeHtml(value: string): string {
|
|
200
|
+
// One pass: "&gt;" is the text ">", not ">".
|
|
201
|
+
return value.replace(/&(lt|gt|amp|quot|apos|#\d{1,7}|#x[0-9a-f]{1,6});/gi, (whole, name: string) => {
|
|
202
|
+
const key = name.toLowerCase();
|
|
203
|
+
const code = key.startsWith("#x") ? parseInt(key.slice(2), 16) : key.startsWith("#") ? Number(key.slice(1)) : undefined;
|
|
204
|
+
if (code === undefined) return ENTITIES[key] ?? whole;
|
|
205
|
+
return code > 0 && code <= 0x10ffff ? String.fromCodePoint(code) : whole;
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Codex Desktop writes a mention of another of its threads as a Markdown link to
|
|
211
|
+
* codex://threads/<id>, with the space before it as " ": read as the thread's title.
|
|
212
|
+
*/
|
|
213
|
+
function threadMentions(text: string): string {
|
|
214
|
+
const read = text.replace(/&#(?:x20|32);/gi, " ").replace(/\[([^\]\n]+)\]\(codex:\/\/threads\/[\w-]+\)/g, "「$1」");
|
|
215
|
+
return read === text ? text : read.trim();
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* How to show a person's message: its words, what came with it, or the one event it is. `images`
|
|
220
|
+
* is how many pictures the message carries besides its text, so an envelope naming them doesn't
|
|
221
|
+
* also chip them.
|
|
222
|
+
*/
|
|
223
|
+
export function readUserText(raw: string, { images = 0 }: { images?: number } = {}): UserTextView {
|
|
224
|
+
let text = raw.replace(/\r\n/g, "\n");
|
|
225
|
+
const context: UserContext[] = [];
|
|
226
|
+
const view = (rest: Partial<UserTextView>): UserTextView => ({ text: "", context, hidden: false, ...rest });
|
|
227
|
+
|
|
228
|
+
// The Claude app tells a session about the sessions it started in a reminder beside the event.
|
|
229
|
+
const sessions = [...text.matchAll(/The session "([^"\n]+)" you started \((local_[\w-]+)\)/g)].map((match) => ({ title: match[1]!, id: match[2] }));
|
|
230
|
+
const browser = /<in-app-browser-context\b[^>]*>[\s\S]*?<\/in-app-browser-context>/gi;
|
|
231
|
+
const withoutBrowser = text.replace(browser, "");
|
|
232
|
+
if (withoutBrowser !== text) {
|
|
233
|
+
context.push({ kind: "browser", label: "浏览器上下文" });
|
|
234
|
+
text = withoutBrowser;
|
|
235
|
+
}
|
|
236
|
+
text = stripHiddenContext(text);
|
|
237
|
+
|
|
238
|
+
if (only(text, "side-sessions-event")) return view({ event: { kind: "sessions", sessions } });
|
|
239
|
+
if (!text) return view({ hidden: images === 0 && context.length === 0 });
|
|
240
|
+
if (/^\[Request interrupted by user(?: for tool use)?\]$/.test(text)) return view({ hidden: true });
|
|
241
|
+
const ci = only(text, "ci-monitor-event");
|
|
242
|
+
if (ci) return view({ event: { kind: "ci", count: ci } });
|
|
243
|
+
const github = only(text, "github-webhook-activity");
|
|
244
|
+
if (github) return view({ event: { kind: "github", count: github } });
|
|
245
|
+
const scheduled = /^<scheduled-task\b([^>]*)>([\s\S]*?)<\/scheduled-task>$/i.exec(text);
|
|
246
|
+
if (scheduled) {
|
|
247
|
+
const name = attribute(scheduled[1]!, "name") ?? baseName(attribute(scheduled[1]!, "file") ?? "").replace(/\.md$/i, "");
|
|
248
|
+
return view({ event: { kind: "scheduled", name: name || "定时任务", detail: scheduled[2]!.trim() || undefined } });
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (/^<bash-(?:input|stdout|stderr)>/.test(text)) {
|
|
252
|
+
const clean = (value?: string) => (value === undefined ? undefined : unescapeHtml(value).replace(ANSI, "").replace(/\n+$/, "")) || undefined;
|
|
253
|
+
const command = clean(tagText(text, "bash-input"))?.trim();
|
|
254
|
+
const stdout = clean(tagText(text, "bash-stdout"));
|
|
255
|
+
const stderr = clean(tagText(text, "bash-stderr"));
|
|
256
|
+
const rest = text.replace(/<(bash-(?:input|stdout|stderr|exit-code))>[\s\S]*?<\/\1>/g, "").trim();
|
|
257
|
+
return view({ shell: { command, stdout, stderr }, text: rest, hidden: !command && !stdout && !stderr && !rest });
|
|
258
|
+
}
|
|
259
|
+
if (/^<local-command-(?:stdout|stderr)>/.test(text)) {
|
|
260
|
+
const raw = [tagText(text, "local-command-stdout"), tagText(text, "local-command-stderr")]
|
|
261
|
+
.filter((part): part is string => !!part?.trim())
|
|
262
|
+
.join("\n")
|
|
263
|
+
.replace(ANSI, "");
|
|
264
|
+
const output = unescapeHtml(raw).trim();
|
|
265
|
+
// /model's confirmation: the Claude app doesn't show the switch as a line either.
|
|
266
|
+
return view({ output: output || undefined, hidden: !output || /^Set model to\b/.test(output) });
|
|
267
|
+
}
|
|
268
|
+
// Slash-command plumbing the host couldn't read as a command, and notifications it didn't match.
|
|
269
|
+
if (/^<(?:command-name|local-command-|task-notification)/.test(text)) return view({ hidden: true });
|
|
270
|
+
|
|
271
|
+
const codex = codexContext(text, images);
|
|
272
|
+
if (codex) {
|
|
273
|
+
context.push(...codex.context);
|
|
274
|
+
const words = threadMentions(codex.text);
|
|
275
|
+
return view({ text: words, hidden: !words && images === 0 && context.length === 0 });
|
|
276
|
+
}
|
|
277
|
+
return view({ text: threadMentions(text) });
|
|
278
|
+
}
|
package/src/index.ts
CHANGED
package/src/model.ts
CHANGED
|
@@ -254,6 +254,25 @@ export const sessionSummarySchema = z.object({
|
|
|
254
254
|
* (the project the session belongs to).
|
|
255
255
|
*/
|
|
256
256
|
worktree: z.object({ branch: z.string(), source: z.string() }).optional(),
|
|
257
|
+
/**
|
|
258
|
+
* The LinkShell session that started this one (e.g. a Claude desktop
|
|
259
|
+
* session's start_session or hand-off): the sidebar nests it there. Set
|
|
260
|
+
* only when this host has that session too. Absent from older hosts.
|
|
261
|
+
*/
|
|
262
|
+
parentId: z.string().optional(),
|
|
263
|
+
/**
|
|
264
|
+
* The LinkShell session this one was forked from (made here with
|
|
265
|
+
* `sessions.fork`, or recorded by the agent), when this host has it. Kept
|
|
266
|
+
* apart from `parentId`: a fork is a copy, not something that session
|
|
267
|
+
* started, so whether it nests is the list's choice.
|
|
268
|
+
*/
|
|
269
|
+
forkedFrom: z.string().optional(),
|
|
270
|
+
/**
|
|
271
|
+
* The id an app of the agent's knows the session by (the Claude desktop
|
|
272
|
+
* app's `local_…`): mail between its sessions names the sender by it, so a
|
|
273
|
+
* client can open the sender. Absent from older hosts.
|
|
274
|
+
*/
|
|
275
|
+
appId: z.string().optional(),
|
|
257
276
|
/** Live only, for sessions that started sub-agents: how many, and how many are working now (`sessions.subagents` lists them). */
|
|
258
277
|
subagents: z.object({ total: z.number().int(), running: z.number().int() }).optional(),
|
|
259
278
|
/** Live only, for sessions that left commands running: how many, and how many still run (`sessions.tasks` lists them). */
|
|
@@ -363,6 +382,11 @@ export const terminalInfoSchema = z.object({
|
|
|
363
382
|
exitCode: z.number().int().nullable().optional(),
|
|
364
383
|
/** Ended without an exit code: the host stopped while it ran. */
|
|
365
384
|
interrupted: z.boolean().optional(),
|
|
385
|
+
/**
|
|
386
|
+
* The session it was opened for. Such a terminal belongs to the session: it closes when its
|
|
387
|
+
* shell exits or the session is archived or deleted, and isn't kept across a host restart.
|
|
388
|
+
*/
|
|
389
|
+
sessionId: z.string().optional(),
|
|
366
390
|
});
|
|
367
391
|
export type TerminalInfo = z.infer<typeof terminalInfoSchema>;
|
|
368
392
|
|
package/src/rpc-mcp.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { mcpAppDisplayModeSchema } from "./updates.js";
|
|
3
|
+
|
|
4
|
+
// MCP Apps: an MCP tool can declare a page of its own (a `ui://` HTML
|
|
5
|
+
// resource) that the client shows in a sandboxed frame, and that page can call
|
|
6
|
+
// its server's tools back. Codex sessions only: Codex is the agent that tells
|
|
7
|
+
// the host which tools have pages and lets a client read and call them. Other
|
|
8
|
+
// agents' sessions are refused with `not_supported`; a Codex that isn't
|
|
9
|
+
// running with `agent_unavailable`. Hosts older than these methods answer
|
|
10
|
+
// "method not found".
|
|
11
|
+
|
|
12
|
+
/** A tool Codex offers as an app of the thread (what its "插件和 MCP" menu lists). */
|
|
13
|
+
export const mcpAppSchema = z.object({
|
|
14
|
+
server: z.string(),
|
|
15
|
+
tool: z.string(),
|
|
16
|
+
/** The plugin's or connector's name where there is one, else the tool's. */
|
|
17
|
+
title: z.string(),
|
|
18
|
+
description: z.string().optional(),
|
|
19
|
+
/** Always `ui://…`. */
|
|
20
|
+
resourceUri: z.string(),
|
|
21
|
+
/** Where Codex offers it (`openai/ui.entrypoints[].type`): always includes "thread". */
|
|
22
|
+
entrypoints: z.array(z.string()),
|
|
23
|
+
/** Who may call the tool (`ui.visibility`: "model", "app"); absent: both. */
|
|
24
|
+
visibility: z.array(z.string()).optional(),
|
|
25
|
+
displayMode: mcpAppDisplayModeSchema.optional(),
|
|
26
|
+
/** The Codex connector (server `codex_apps`): `mcp.call` needs it there. */
|
|
27
|
+
connector: z.string().optional(),
|
|
28
|
+
});
|
|
29
|
+
export type McpApp = z.infer<typeof mcpAppSchema>;
|
|
30
|
+
|
|
31
|
+
export const mcpMethods = {
|
|
32
|
+
/** The apps the session's Codex can open in the thread. */
|
|
33
|
+
"mcp.apps": {
|
|
34
|
+
params: z.object({ sessionId: z.string().min(1) }),
|
|
35
|
+
result: z.object({ apps: z.array(mcpAppSchema) }),
|
|
36
|
+
},
|
|
37
|
+
/**
|
|
38
|
+
* A page's HTML (its first content), as the MCP server gives it. Only `ui://`
|
|
39
|
+
* URIs (`invalid_params` otherwise); one over 4 MB is refused (`too_large`).
|
|
40
|
+
* `meta` is the content's `_meta`: CSP domains, display modes, border.
|
|
41
|
+
*/
|
|
42
|
+
"mcp.resource": {
|
|
43
|
+
params: z.object({
|
|
44
|
+
sessionId: z.string().min(1),
|
|
45
|
+
server: z.string().min(1),
|
|
46
|
+
uri: z.string().min(1),
|
|
47
|
+
/** The page's connector (`detail.app.connector`, `McpApp.connector`), for server `codex_apps`. */
|
|
48
|
+
connector: z.string().optional(),
|
|
49
|
+
}),
|
|
50
|
+
result: z.object({
|
|
51
|
+
mimeType: z.string().optional(),
|
|
52
|
+
text: z.string().optional(),
|
|
53
|
+
blob: z.string().optional(),
|
|
54
|
+
meta: z.unknown().optional(),
|
|
55
|
+
}),
|
|
56
|
+
},
|
|
57
|
+
/**
|
|
58
|
+
* A page calls one of its server's tools, in the session's thread. Refused
|
|
59
|
+
* (`forbidden`) for a server without a page, a tool the page may not call
|
|
60
|
+
* (`ui.visibility` without "app", `openai/fileParams`), or, on `codex_apps`, a
|
|
61
|
+
* tool of another connector than `connector` (required there:
|
|
62
|
+
* `invalid_params` without it); `not_found` for a tool the server doesn't
|
|
63
|
+
* have. Codex's own failure is `agent_error`; a tool that ran and failed is
|
|
64
|
+
* `isError` in the result.
|
|
65
|
+
*/
|
|
66
|
+
"mcp.call": {
|
|
67
|
+
params: z.object({
|
|
68
|
+
sessionId: z.string().min(1),
|
|
69
|
+
server: z.string().min(1),
|
|
70
|
+
tool: z.string().min(1),
|
|
71
|
+
arguments: z.record(z.unknown()).optional(),
|
|
72
|
+
connector: z.string().optional(),
|
|
73
|
+
}),
|
|
74
|
+
result: z.object({
|
|
75
|
+
content: z.array(z.unknown()),
|
|
76
|
+
structuredContent: z.unknown().optional(),
|
|
77
|
+
isError: z.boolean().optional(),
|
|
78
|
+
meta: z.unknown().optional(),
|
|
79
|
+
}),
|
|
80
|
+
},
|
|
81
|
+
} as const;
|