@celljs/ta-protocol 4.9.1 → 4.11.0
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.en.md +2 -2
- package/README.md +3 -3
- package/esm/common/index.d.ts +1 -0
- package/esm/common/index.js +1 -0
- package/esm/common/location.d.ts +7 -0
- package/esm/common/location.js +20 -0
- package/esm/common/package-protocol.d.ts +16 -5
- package/esm/common/redactor.d.ts +18 -0
- package/esm/common/redactor.js +66 -0
- package/esm/common/relay-protocol.d.ts +60 -0
- package/esm/common/remote-protocol.d.ts +4 -1
- package/esm/common/room-protocol.d.ts +166 -0
- package/esm/common/room-protocol.js +36 -0
- package/esm/common/ta-extension-host.d.ts +28 -0
- package/esm/common/ta-extension-host.js +27 -0
- package/esm/common/ta-protocol.d.ts +135 -8
- package/esm/common/ta-protocol.js +138 -0
- package/esm/common/workspace-protocol.d.ts +2 -1
- package/lib/common/index.d.ts +1 -0
- package/lib/common/index.js +1 -0
- package/lib/common/location.d.ts +7 -0
- package/lib/common/location.js +20 -0
- package/lib/common/package-protocol.d.ts +16 -5
- package/lib/common/redactor.d.ts +19 -0
- package/lib/common/redactor.js +70 -0
- package/lib/common/relay-protocol.d.ts +60 -0
- package/lib/common/remote-protocol.d.ts +4 -1
- package/lib/common/room-protocol.d.ts +167 -0
- package/lib/common/room-protocol.js +39 -0
- package/lib/common/ta-extension-host.d.ts +28 -0
- package/lib/common/ta-extension-host.js +28 -1
- package/lib/common/ta-protocol.d.ts +135 -8
- package/lib/common/ta-protocol.js +139 -1
- package/lib/common/workspace-protocol.d.ts +2 -1
- package/package.json +5 -5
package/README.en.md
CHANGED
|
@@ -4,8 +4,8 @@ Protocol between `ta serve` and clients: types and constants only, with no pi or
|
|
|
4
4
|
|
|
5
5
|
- **Transport**: one WebSocket (`TA_WEBSOCKET_PATH`) with JSON-RPC 2.0 messages. Method names are `<service>/<method>`, and the server pushes `TaClient/onEvents` etc. HTTP-based calls are not offered; only workspace file bytes travel HTTP (`TA_FILES_PATH`, for images and iframes in pages to load via relative URLs).
|
|
6
6
|
- **Services**: `TaServer` (sessions—pi's RPC commands), `TaWorkspaceServer` (files and commands in directories), `TaTerminalServer` (terminals), `TaSettingsServer` (pi's `settings.json`), `TaPackageServer` (packages, web extensions, and package data), `TaAuthServer` (login to model services, same as pi's `/login` and `/logout`), `TaRelayServer` (paired devices via Relay, same as `ta pair`), `TaRemoteServer` (hosts for `ssh://` directories, ssh prompts, port forwarding). Capabilities outside sessions split into separate services by responsibility, not added to `TaServer`.
|
|
7
|
-
- **`TaServer` methods**: besides `openSession`, `closeSession`, `listSessions`, `attach`, `detach`, `respondUi`, and `respondClientTool`, the rest are pi RPC mode commands with the same name (snake_case → camelCase, see `PiCommandMethod`). The first parameter is `sessionId`, and return values match pi's; when pi adds an RPC command and `TaServer` lacks the method, this package's tests won't compile. `listSavedSessions` lists the conversations in pi's session files that are not open (closed while idle, or before a restart); `openSession` with their `sessionFile` opens them again. A session a package opened for its `group` gets a pi custom entry `ta-group` in its file, so the list carries its `group` and the package reopens it with its role; the role it was opened with (`appendSystemPrompt`) gets an entry `ta-role`, and opened again with only its `sessionFile` (a bot passing a message to a closed conversation of an agent) a session keeps the role and group written there. The page of the double keeps the session file of its conversation in the data `TA_DOUBLE_FILE` (`assistant.file` of `@celljs/ta-web`), by which packages on the server find the double. `setWorkingDirectory` sets ta serve's working directory (`TaServerInfo.cwd`, used when clients don't specify one, persists across restarts). Session operations not in pi RPC: `forkToFile` (saves the forked session to a file, current session untouched, then open with `openSession`), `navigateTree` (same as pi's `/tree`, returns `editorText`), `fork` has an optional `position` (`at` keeps the selected item, like pi's `/clone` but optional for any item).
|
|
8
|
-
- **Events**: `TaEventEnvelope { sessionId, seq, event }`, where `event` is a pi JSON/RPC mode event or `extension_ui_request`. Ta adds only `ui_request_resolved`, `extension_error`, `session_replaced`, `session_reloaded`, `session_closed`, and `client_tool_request` (reserved).
|
|
7
|
+
- **`TaServer` methods**: besides `openSession`, `closeSession`, `listSessions`, `attach`, `detach`, `respondUi`, and `respondClientTool`, the rest are pi RPC mode commands with the same name (snake_case → camelCase, see `PiCommandMethod`). The first parameter is `sessionId`, and return values match pi's; when pi adds an RPC command and `TaServer` lacks the method, this package's tests won't compile. `listSavedSessions` lists the conversations in pi's session files that are not open (closed while idle, or before a restart); `openSession` with their `sessionFile` opens them again (with the `sessionId` they had). A session closed while idle or by a restart also opens again by itself when any method is called with its old `sessionId`; only one closed with `closeSession`, or whose file is gone, gives `CELL_TA_SESSION_NOT_FOUND`. A session a package opened for its `group` gets a pi custom entry `ta-group` in its file, so the list carries its `group` and the package reopens it with its role; the role it was opened with (`appendSystemPrompt`) gets an entry `ta-role`, and opened again with only its `sessionFile` (a bot passing a message to a closed conversation of an agent) a session keeps the role and group written there. The page of the double keeps the session file of its conversation in the data `TA_DOUBLE_FILE` (`assistant.file` of `@celljs/ta-web`), by which packages on the server find the double. `setWorkingDirectory` sets ta serve's working directory (`TaServerInfo.cwd`, used when clients don't specify one, persists across restarts). Session operations not in pi RPC: `forkToFile` (saves the forked session to a file, current session untouched, then open with `openSession`), `navigateTree` (same as pi's `/tree`, returns `editorText`), `fork` has an optional `position` (`at` keeps the selected item, like pi's `/clone` but optional for any item).
|
|
8
|
+
- **Events**: `TaEventEnvelope { sessionId, seq, event }`, where `event` is a pi JSON/RPC mode event or `extension_ui_request`. Ta adds only `ui_request_resolved`, `extension_error`, `session_replaced`, `session_reloaded`, `session_closed`, `working_message` (what an extension says the agent does, with pi's `setWorkingMessage`), and `client_tool_request` (reserved).
|
|
9
9
|
- **`prompt` / `steer` / `followUp`**: carry client-generated `clientMessageId`. Retrying with the same ID returns `duplicate` and doesn't re-execute. Receipt only means accepted; the round end is marked by the `agent_settled` event.
|
|
10
10
|
- **Locations** (`cwd`): a path is either local or on another machine in the form `ssh://<host>/<absolute-path>` (`TaLocation` parses, handles parent/child, and names).
|
|
11
11
|
- **Errors**: the JSON-RPC error code is `TA_RPC_ERROR_CODE`. The `data` field includes a stable `code` (`TaErrorCode`, e.g., `CELL_TA_SESSION_LOCKED`) and a one-line handling hint. When no model is available or the model service isn't signed in, the code is `CELL_TA_NOT_SIGNED_IN`; clients open the login page accordingly. `CELL_TA_CONNECTION_LOST` is client-generated: the call didn't reach ta serve, or the connection dropped before the result arrived.
|
package/README.md
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
- 传输:一条 WebSocket(`TA_WEBSOCKET_PATH`)上的 JSON-RPC 2.0,方法名是 `<服务>/<方法>`,服务端推送 `TaClient/onEvents` 等。不提供 HTTP 形式的调用;只有工作区文件的字节走 HTTP(`TA_FILES_PATH`,供页面里的图片、iframe 用相对地址加载)。
|
|
6
6
|
- 服务:`TaServer`(会话,即 pi 的 RPC 命令)、`TaWorkspaceServer`(目录里的文件与命令)、`TaTerminalServer`(终端)、`TaSettingsServer`(pi 的 `settings.json`)、`TaPackageServer`(包、Web 扩展与包的数据)、`TaAuthServer`(登录模型服务,同 pi 的 `/login` `/logout`)、`TaRelayServer`(经 Relay 配对设备,同 `ta pair`)、`TaRemoteServer`(`ssh://` 目录的主机、ssh 的提问、端口转发)。会话之外的能力按职责各成一个服务,不往 `TaServer` 里加。
|
|
7
|
-
- `TaServer` 的方法除了 `openSession` `closeSession` `listSessions` `attach` `detach` `respondUi` `respondClientTool`,其余都是 pi RPC 模式的同名命令(snake_case 改 camelCase,见 `PiCommandMethod`),第一个参数是 `sessionId`,返回值与 pi 相同;pi 新增 RPC 命令而 `TaServer` 没有对应方法时,本包的测试编译不过。`listSavedSessions` 列出 pi 会话文件里没打开的对话(空闲回收或重启前关掉的),用其 `sessionFile` 调 `openSession`
|
|
8
|
-
- 事件:`TaEventEnvelope { sessionId, seq, event }`,`event` 是 pi JSON/RPC 模式的事件或 `extension_ui_request`;Ta 只多了 `ui_request_resolved`、`extension_error`、`session_replaced`、`session_reloaded`、`session_closed`、`client_tool_request`(预留)。
|
|
7
|
+
- `TaServer` 的方法除了 `openSession` `closeSession` `listSessions` `attach` `detach` `respondUi` `respondClientTool`,其余都是 pi RPC 模式的同名命令(snake_case 改 camelCase,见 `PiCommandMethod`),第一个参数是 `sessionId`,返回值与 pi 相同;pi 新增 RPC 命令而 `TaServer` 没有对应方法时,本包的测试编译不过。`listSavedSessions` 列出 pi 会话文件里没打开的对话(空闲回收或重启前关掉的),用其 `sessionFile` 调 `openSession` 即可重新打开(拿回它原来的 `sessionId`);空闲回收或重启关掉的会话,直接用原 `sessionId` 调任何方法也会自动重新打开,只有被 `closeSession` 关掉或会话文件已删的才报 `CELL_TA_SESSION_NOT_FOUND`;包按分组(`group`)打开的会话会在文件里记一条 pi 的自定义条目 `ta-group`,列表里带上 `group`,由该包自己带着角色重新打开;打开时给的角色(`appendSystemPrompt`)也记一条 `ta-role`,只给 `sessionFile` 重新打开时(如机器人把消息转进一个已关闭的智能体对话)沿用记下的角色和分组。分身的页面把分身对话的会话文件存在包数据 `TA_DOUBLE_FILE`(`@celljs/ta-web` 的 `assistant.file`)里,服务端的包据此找到分身。`setWorkingDirectory` 设置 ta serve 的工作目录(`TaServerInfo.cwd`,客户端没指定目录时在这里开对话,跨重启保留)。pi RPC 没有的会话操作:`forkToFile`(把 fork 出的对话另存成会话文件,当前会话不动,再用 `openSession` 打开),`navigateTree`(同 pi 的 `/tree`,返回 `editorText`),`fork` 多一个可选的 `position`(`at` 保留所选条目,同 pi 的 `/clone` 但可选任意条目)。
|
|
8
|
+
- 事件:`TaEventEnvelope { sessionId, seq, event }`,`event` 是 pi JSON/RPC 模式的事件或 `extension_ui_request`;Ta 只多了 `ui_request_resolved`、`extension_error`、`session_replaced`、`session_reloaded`、`session_closed`、`working_message`(扩展用 pi 的 `setWorkingMessage` 说明正在做什么)、`client_tool_request`(预留)。
|
|
9
9
|
- `prompt` / `steer` / `followUp` 带客户端生成的 `clientMessageId`:重发同一个 id 返回 `duplicate`,不会再执行;回执只表示已受理,回合结束以 `agent_settled` 事件为准。
|
|
10
10
|
- 目录(`cwd`)是位置:本机路径,或另一台机器的 `ssh://<host>/<绝对路径>`(`TaLocation` 解析、上下级、名字)。
|
|
11
|
-
- 失败时 JSON-RPC 错误码为 `TA_RPC_ERROR_CODE`,`data` 里有稳定的 `code`(`TaErrorCode`,如 `CELL_TA_SESSION_LOCKED`)和一句处理建议 `hint`。没有可用的模型或模型服务没登录时是 `CELL_TA_NOT_SIGNED_IN`,客户端据此打开登录页。`CELL_TA_CONNECTION_LOST` 由客户端产生:调用没能送到 ta serve,或连接断开时还没收到结果。
|
|
11
|
+
- 失败时 JSON-RPC 错误码为 `TA_RPC_ERROR_CODE`,`data` 里有稳定的 `code`(`TaErrorCode`,如 `CELL_TA_SESSION_LOCKED`)和一句处理建议 `hint`。没有可用的模型或模型服务没登录时是 `CELL_TA_NOT_SIGNED_IN`,客户端据此打开登录页。`CELL_TA_CONNECTION_LOST` 由客户端产生:调用没能送到 ta serve,或连接断开时还没收到结果。
|
package/esm/common/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './package-protocol.js';
|
|
|
6
6
|
export * from './pi-types.js';
|
|
7
7
|
export * from './relay-protocol.js';
|
|
8
8
|
export * from './remote-protocol.js';
|
|
9
|
+
export * from './room-protocol.js';
|
|
9
10
|
export * from './settings-protocol.js';
|
|
10
11
|
export * from './ta-extension-host.js';
|
|
11
12
|
export * from './ta-protocol.js';
|
package/esm/common/index.js
CHANGED
|
@@ -6,6 +6,7 @@ export * from './package-protocol.js';
|
|
|
6
6
|
export * from './pi-types.js';
|
|
7
7
|
export * from './relay-protocol.js';
|
|
8
8
|
export * from './remote-protocol.js';
|
|
9
|
+
export * from './room-protocol.js';
|
|
9
10
|
export * from './settings-protocol.js';
|
|
10
11
|
export * from './ta-extension-host.js';
|
|
11
12
|
export * from './ta-protocol.js';
|
package/esm/common/location.d.ts
CHANGED
|
@@ -47,4 +47,11 @@ export declare namespace TaLocation {
|
|
|
47
47
|
function child(location: string, name: string): string;
|
|
48
48
|
/** The last name of the path; the host for its home directory. */
|
|
49
49
|
function basename(location: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* What a location names under the home directory of its machine, as a shell and git read `~`: `~`,
|
|
52
|
+
* `~/src`, `ssh://<host>` and `ssh://<host>/~/src` are `''` and `'src'`; undefined for any other.
|
|
53
|
+
*/
|
|
54
|
+
function homeRelative(location: string): string | undefined;
|
|
55
|
+
/** Whether a location names its directory whole: not `~`, not relative, not the home of a host. */
|
|
56
|
+
function isAbsolute(location: string): boolean;
|
|
50
57
|
}
|
package/esm/common/location.js
CHANGED
|
@@ -165,6 +165,26 @@ export var TaLocation;
|
|
|
165
165
|
return name || (remote === null || remote === void 0 ? void 0 : remote.host) || location;
|
|
166
166
|
}
|
|
167
167
|
TaLocation.basename = basename;
|
|
168
|
+
/**
|
|
169
|
+
* What a location names under the home directory of its machine, as a shell and git read `~`: `~`,
|
|
170
|
+
* `~/src`, `ssh://<host>` and `ssh://<host>/~/src` are `''` and `'src'`; undefined for any other.
|
|
171
|
+
*/
|
|
172
|
+
function homeRelative(location) {
|
|
173
|
+
var _a;
|
|
174
|
+
const remote = parse(location);
|
|
175
|
+
const path = remote ? (remote.path ? remote.path.slice(1) : '~') : location;
|
|
176
|
+
const match = /^~(?:[\\/]+(.*))?$/.exec(path);
|
|
177
|
+
return match ? ((_a = match[1]) !== null && _a !== void 0 ? _a : '').replace(/[\\/]+$/, '') : undefined;
|
|
178
|
+
}
|
|
179
|
+
TaLocation.homeRelative = homeRelative;
|
|
180
|
+
/** Whether a location names its directory whole: not `~`, not relative, not the home of a host. */
|
|
181
|
+
function isAbsolute(location) {
|
|
182
|
+
if (homeRelative(location) !== undefined) {
|
|
183
|
+
return false;
|
|
184
|
+
}
|
|
185
|
+
return isRemote(location) || /^([\\/]|[A-Za-z]:)/.test(location);
|
|
186
|
+
}
|
|
187
|
+
TaLocation.isAbsolute = isAbsolute;
|
|
168
188
|
function parentPath(path) {
|
|
169
189
|
const trimmed = path.replace(/[\\/]+$/, '');
|
|
170
190
|
const at = Math.max(trimmed.lastIndexOf('/'), trimmed.lastIndexOf('\\'));
|
|
@@ -38,6 +38,16 @@ export interface TaWebExtensionInfo {
|
|
|
38
38
|
* opens, `pi.webActivation` of its package.json. A temporary one always on `open`.
|
|
39
39
|
*/
|
|
40
40
|
activation: 'startup' | 'open';
|
|
41
|
+
/**
|
|
42
|
+
* What kind of thing it is, `pi.category` of its package.json, for a page that lists those of a kind:
|
|
43
|
+
* `game` for games and what plays like one (the Games page of @celljs/ta-games lists them).
|
|
44
|
+
*/
|
|
45
|
+
category?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The kinds that a page of it lists, `pi.lists` of its package.json (`["game"]` for the Games page): the pages
|
|
48
|
+
* of extensions of those kinds are found there and in Quick open, not under Discover or in the navigation.
|
|
49
|
+
*/
|
|
50
|
+
lists?: string[];
|
|
41
51
|
/** For a temporary package. */
|
|
42
52
|
temporary?: TaTemporaryInfo;
|
|
43
53
|
}
|
|
@@ -100,12 +110,10 @@ export interface TaPackageServer {
|
|
|
100
110
|
/** The web extensions of the packages pi loads in `cwd` (default: the server's directory). */
|
|
101
111
|
listWebExtensions(cwd?: string): Promise<TaWebExtensionInfo[]>;
|
|
102
112
|
readWebExtension(id: string, cwd?: string): Promise<TaWebExtensionSource>;
|
|
103
|
-
/** Removes the package of a web extension: as `ta remove` for a package, deletes the directory for a directory. */
|
|
104
|
-
removeWebExtension(id: string, cwd?: string): Promise<void>;
|
|
105
113
|
/**
|
|
106
114
|
* Turns a package on or off, what pi loads of it and its web extension; sessions pick it up on reload.
|
|
107
|
-
* A built-in one by its name; another by its id of listPackages,
|
|
108
|
-
* resources on or off, in the settings of its scope.
|
|
115
|
+
* A built-in one by its name; another by its id (of listPackages, or of one of its web extensions), as
|
|
116
|
+
* `ta config` turns each of its resources on or off, in the settings of its scope.
|
|
109
117
|
*/
|
|
110
118
|
setPackageEnabled(nameOrId: string, enabled: boolean, cwd?: string): Promise<void>;
|
|
111
119
|
/** Every package pi loads in `cwd` (default: the server's directory), with a web extension or without. */
|
|
@@ -116,7 +124,10 @@ export interface TaPackageServer {
|
|
|
116
124
|
* project. Sessions pick it up on reload.
|
|
117
125
|
*/
|
|
118
126
|
installPackage(source: string, scope: TaSettingsScope, cwd?: string): Promise<void>;
|
|
119
|
-
/**
|
|
127
|
+
/**
|
|
128
|
+
* Removes a package by its id of listPackages or of one of its web extensions: as `ta remove` for a package of
|
|
129
|
+
* the setting, deletes the directory for a directory, drops a temporary one. A built-in one is turned off instead.
|
|
130
|
+
*/
|
|
120
131
|
removePackage(id: string, cwd?: string): Promise<void>;
|
|
121
132
|
/**
|
|
122
133
|
* Calls a method of what the module of `pi.host` of a package that comes with Ta returned
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** What a secret is replaced with. */
|
|
2
|
+
export declare const REDACTED = "[redacted]";
|
|
3
|
+
/**
|
|
4
|
+
* What looks like a secret in what is shared (docs/design/ta-link.md 2.8): keys of model services and code hosts,
|
|
5
|
+
* tokens, private keys, passwords in assignments and in URLs. It errs on hiding: a shared conversation is read
|
|
6
|
+
* by others, and what it hides by mistake costs a word.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Redactor {
|
|
9
|
+
/** How many places were hidden. */
|
|
10
|
+
count: number;
|
|
11
|
+
text(text: string): string;
|
|
12
|
+
/** Strings of a value, deep, each cut to `max` characters. */
|
|
13
|
+
value(value: unknown, max: number): unknown;
|
|
14
|
+
static cut(text: string, max: number): string;
|
|
15
|
+
protected hide(): string;
|
|
16
|
+
/** What is plainly not a secret: an environment variable, a placeholder, what was hidden already. */
|
|
17
|
+
protected static placeholder(value: string): boolean;
|
|
18
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/** What a secret is replaced with. */
|
|
2
|
+
export const REDACTED = '[redacted]';
|
|
3
|
+
/** Secrets that have a shape of their own: the whole match goes. */
|
|
4
|
+
const WHOLE = [
|
|
5
|
+
/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,
|
|
6
|
+
/\bsk-(?:ant-|proj-)?[A-Za-z0-9_-]{20,}/g,
|
|
7
|
+
/\bgh[pousr]_[A-Za-z0-9]{30,}\b/g,
|
|
8
|
+
/\bgithub_pat_[A-Za-z0-9_]{40,}\b/g,
|
|
9
|
+
/\bglpat-[A-Za-z0-9_-]{20,}\b/g,
|
|
10
|
+
/\bxox[abprs]-[A-Za-z0-9-]{10,}\b/g,
|
|
11
|
+
/\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g,
|
|
12
|
+
/\bAIza[0-9A-Za-z_-]{35}\b/g,
|
|
13
|
+
/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}/g,
|
|
14
|
+
];
|
|
15
|
+
/** Secrets named by what is before them: what is before stays. */
|
|
16
|
+
const NAMED = [
|
|
17
|
+
/(\bBearer\s+)[A-Za-z0-9._~+/-]{16,}=*/gi,
|
|
18
|
+
/(\b[A-Za-z0-9_.-]*(?:password|passwd|pwd|secret|token|api[_-]?key|access[_-]?key|private[_-]?key)[A-Za-z0-9_.-]*["']?\s*[:=]\s*["']?)([^\s"'`,;]{6,})/gi,
|
|
19
|
+
/(:\/\/[^\s:/@]+:)([^\s@/]{3,})(@)/g,
|
|
20
|
+
];
|
|
21
|
+
/**
|
|
22
|
+
* What looks like a secret in what is shared (docs/design/ta-link.md 2.8): keys of model services and code hosts,
|
|
23
|
+
* tokens, private keys, passwords in assignments and in URLs. It errs on hiding: a shared conversation is read
|
|
24
|
+
* by others, and what it hides by mistake costs a word.
|
|
25
|
+
*/
|
|
26
|
+
export class Redactor {
|
|
27
|
+
constructor() {
|
|
28
|
+
/** How many places were hidden. */
|
|
29
|
+
this.count = 0;
|
|
30
|
+
}
|
|
31
|
+
text(text) {
|
|
32
|
+
let out = text;
|
|
33
|
+
for (const pattern of WHOLE) {
|
|
34
|
+
out = out.replace(pattern, () => this.hide());
|
|
35
|
+
}
|
|
36
|
+
out = out.replace(NAMED[0], (_match, before) => before + this.hide());
|
|
37
|
+
out = out.replace(NAMED[1], (match, before, value) => (Redactor.placeholder(value) ? match : before + this.hide()));
|
|
38
|
+
out = out.replace(NAMED[2], (_match, before, _value, after) => before + this.hide() + after);
|
|
39
|
+
return out;
|
|
40
|
+
}
|
|
41
|
+
/** Strings of a value, deep, each cut to `max` characters. */
|
|
42
|
+
value(value, max) {
|
|
43
|
+
if (typeof value === 'string') {
|
|
44
|
+
return Redactor.cut(this.text(value), max);
|
|
45
|
+
}
|
|
46
|
+
if (Array.isArray(value)) {
|
|
47
|
+
return value.map(item => this.value(item, max));
|
|
48
|
+
}
|
|
49
|
+
if (value && typeof value === 'object') {
|
|
50
|
+
return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, this.value(item, max)]));
|
|
51
|
+
}
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
static cut(text, max) {
|
|
55
|
+
return text.length > max ? `${text.slice(0, max)}…` : text;
|
|
56
|
+
}
|
|
57
|
+
hide() {
|
|
58
|
+
this.count++;
|
|
59
|
+
return REDACTED;
|
|
60
|
+
}
|
|
61
|
+
/** What is plainly not a secret: an environment variable, a placeholder, what was hidden already. */
|
|
62
|
+
static placeholder(value) {
|
|
63
|
+
return /^(?:\$|<|\{|\[redacted|process\.env|os\.environ|xxx|\*{3})/i.test(value) || /^(?:true|false|null|undefined|none|string|number)$/i.test(value);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=redactor.js.map
|
|
@@ -43,3 +43,63 @@ export interface TaPackageShare {
|
|
|
43
43
|
/** The largest package that goes, in bytes. */
|
|
44
44
|
maxBytes: number;
|
|
45
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Who may open a link of content: anyone with it, anyone with it and its password, the one who shared it, or Ta friends of
|
|
48
|
+
* the one who shared it (`people`, TaRoomServer.listFriends), in their own Ta (docs/design/ta-link.md).
|
|
49
|
+
*/
|
|
50
|
+
export type TaShareAccess = 'link' | 'password' | 'self' | 'people';
|
|
51
|
+
/** What is shared by a link: a conversation (`ta-conversation`, JSON) or a file (`file`, with its media type). */
|
|
52
|
+
export interface TaShareInput {
|
|
53
|
+
kind: string;
|
|
54
|
+
title: string;
|
|
55
|
+
/** The media type of a file. */
|
|
56
|
+
type?: string;
|
|
57
|
+
data: Uint8Array;
|
|
58
|
+
access: TaShareAccess;
|
|
59
|
+
/** For `password`; not kept. */
|
|
60
|
+
password?: string;
|
|
61
|
+
/** For `people`: the ids of the Ta friends (TaFriend.id). */
|
|
62
|
+
people?: string[];
|
|
63
|
+
/** None or 0: until stopped. With `offline`, 30 at most. */
|
|
64
|
+
days?: number;
|
|
65
|
+
/** A copy sealed on the relay, for while this computer is off. */
|
|
66
|
+
offline?: boolean;
|
|
67
|
+
}
|
|
68
|
+
/** Content this ta serve shares. */
|
|
69
|
+
export interface TaShareInfo {
|
|
70
|
+
id: string;
|
|
71
|
+
kind: string;
|
|
72
|
+
title: string;
|
|
73
|
+
type?: string;
|
|
74
|
+
access: TaShareAccess;
|
|
75
|
+
size: number;
|
|
76
|
+
createdAt: number;
|
|
77
|
+
expiresAt?: number;
|
|
78
|
+
offline: boolean;
|
|
79
|
+
/** `https://<relay>/s#…`, its key in the fragment. */
|
|
80
|
+
link: string;
|
|
81
|
+
/** For `people`: the names of the Ta friends it is shared with. */
|
|
82
|
+
people?: string[];
|
|
83
|
+
}
|
|
84
|
+
/** What a link shares, opened. */
|
|
85
|
+
export interface TaSharedContent {
|
|
86
|
+
kind: string;
|
|
87
|
+
title: string;
|
|
88
|
+
type?: string;
|
|
89
|
+
createdAt: number;
|
|
90
|
+
data: Uint8Array;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Content shared by links, through the relay (TaExtensionHost.shares): made, listed and stopped here, and opened
|
|
94
|
+
* whoever shared it. `open` rejects with an error whose `reason` says why (RelayContentFailure of @celljs/ta-relay:
|
|
95
|
+
* `password`, `wrong`, `busy`, `gone`, `offline`, `self`, `people`, `invalid`, `timeout`, `large`).
|
|
96
|
+
*/
|
|
97
|
+
export interface TaShares {
|
|
98
|
+
create(input: TaShareInput): Promise<TaShareInfo>;
|
|
99
|
+
/** Those still on, the latest first. */
|
|
100
|
+
list(): Promise<TaShareInfo[]>;
|
|
101
|
+
/** Its link no longer works, at once, and its copy on the relay is deleted. False when there was none. */
|
|
102
|
+
remove(id: string): Promise<boolean>;
|
|
103
|
+
/** What a link shares: one of this ta serve read here (a link for `self` too), another fetched through the relay. */
|
|
104
|
+
open(link: string, password?: string): Promise<TaSharedContent>;
|
|
105
|
+
}
|
|
@@ -67,7 +67,10 @@ export interface TaRemoteServer {
|
|
|
67
67
|
addHost(host: string): Promise<void>;
|
|
68
68
|
/** Disconnects from a host and drops it from the list; one of ~/.ssh/config stays there. */
|
|
69
69
|
removeHost(host: string): Promise<void>;
|
|
70
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* A location as the user wrote it, whole: `~/src`, `ssh://<host>` (its home), `ssh://<host>/~/src`, or a path
|
|
72
|
+
* relative to the default directory; one already whole as it is. Connects to the host when it needs its home.
|
|
73
|
+
*/
|
|
71
74
|
resolveLocation(location: string): Promise<string>;
|
|
72
75
|
/**
|
|
73
76
|
* A port of the machine of `cwd` on the machine of ta serve, for a page served there: the same port
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
export declare const TaRoomServer: unique symbol;
|
|
2
|
+
export declare const TA_ROOM_SERVICE = "TaRoomServer";
|
|
3
|
+
/**
|
|
4
|
+
* Rooms of Ta (docs/design/ta-link.md 3): a place several Ta share, through the relay, end to end: they send each other
|
|
5
|
+
* messages and keep a shared state, which the relay keeps sealed. One makes a room and invites by a link; one with the
|
|
6
|
+
* link asks to join, and is in once the owner said so, in their own Ta.
|
|
7
|
+
*/
|
|
8
|
+
/** `member` in the room; `waiting` for the owner to answer; `refused` by the owner; `gone`: closed, removed, or the invitation no longer works. */
|
|
9
|
+
export type TaRoomStatus = 'member' | 'waiting' | 'refused' | 'gone';
|
|
10
|
+
/** Who a Ta is to others: the id of its keys, and the name it gives. */
|
|
11
|
+
export interface TaIdentity {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
}
|
|
15
|
+
export interface TaRoomMember {
|
|
16
|
+
/** Its id in this room alone: what messages say they are `from`, and `to` sends to. */
|
|
17
|
+
member: string;
|
|
18
|
+
/** The identity of its Ta. */
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
owner: boolean;
|
|
22
|
+
online: boolean;
|
|
23
|
+
self: boolean;
|
|
24
|
+
/** In a browser, without Ta (docs/design/ta-link.md 3.8): it only chats, and is no Ta friend. */
|
|
25
|
+
guest?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface TaRoomInfo {
|
|
28
|
+
id: string;
|
|
29
|
+
/** What the extension that made it calls such rooms (`ta-town`): it finds its rooms by it. */
|
|
30
|
+
kind: string;
|
|
31
|
+
title: string;
|
|
32
|
+
/** The view that shows it (`ui.showView`), as the extension that made it said. */
|
|
33
|
+
view?: string;
|
|
34
|
+
/** This Ta made it. */
|
|
35
|
+
owner: boolean;
|
|
36
|
+
ownerName: string;
|
|
37
|
+
status: TaRoomStatus;
|
|
38
|
+
/** Why it is `gone`: `closed` by the owner, `removed` by the owner, the `invite` no longer works. */
|
|
39
|
+
reason?: 'closed' | 'removed' | 'invite';
|
|
40
|
+
/** Connected to the room now. */
|
|
41
|
+
connected: boolean;
|
|
42
|
+
members: TaRoomMember[];
|
|
43
|
+
createdAt: number;
|
|
44
|
+
joinedAt?: number;
|
|
45
|
+
}
|
|
46
|
+
/** One asking to join a room of this Ta: for the user to answer. */
|
|
47
|
+
export interface TaRoomRequest {
|
|
48
|
+
room: string;
|
|
49
|
+
title: string;
|
|
50
|
+
ask: string;
|
|
51
|
+
/** Its identity, and the name it gives. */
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
/** Met before, in another room. */
|
|
55
|
+
friend: boolean;
|
|
56
|
+
/** Asks from a browser, without Ta: admitted, it only chats. */
|
|
57
|
+
guest?: boolean;
|
|
58
|
+
at: number;
|
|
59
|
+
}
|
|
60
|
+
/** One met in a room. */
|
|
61
|
+
export interface TaFriend extends TaIdentity {
|
|
62
|
+
/** Titles of rooms shared, the latest last. */
|
|
63
|
+
rooms: string[];
|
|
64
|
+
metAt: number;
|
|
65
|
+
seenAt: number;
|
|
66
|
+
}
|
|
67
|
+
export interface TaRoomValue {
|
|
68
|
+
value: unknown;
|
|
69
|
+
version: number;
|
|
70
|
+
/** The member who wrote it last. */
|
|
71
|
+
by: string;
|
|
72
|
+
}
|
|
73
|
+
/** What happens in the rooms, to the connections that called TaRoomServer.watch. */
|
|
74
|
+
export type TaRoomEvent =
|
|
75
|
+
/** The list, a room's members, who is online, or a room's status changed: read it again. */
|
|
76
|
+
{
|
|
77
|
+
type: 'rooms';
|
|
78
|
+
} | {
|
|
79
|
+
type: 'request';
|
|
80
|
+
request: TaRoomRequest;
|
|
81
|
+
} | {
|
|
82
|
+
type: 'message';
|
|
83
|
+
room: string;
|
|
84
|
+
from: string;
|
|
85
|
+
name: string;
|
|
86
|
+
data: unknown;
|
|
87
|
+
} | {
|
|
88
|
+
type: 'state';
|
|
89
|
+
room: string;
|
|
90
|
+
key: string;
|
|
91
|
+
value: unknown;
|
|
92
|
+
version: number;
|
|
93
|
+
by: string;
|
|
94
|
+
};
|
|
95
|
+
export interface TaRoomServer {
|
|
96
|
+
/** This Ta as others see it; made the first time. */
|
|
97
|
+
getIdentity(): Promise<TaIdentity>;
|
|
98
|
+
setName(name: string): Promise<TaIdentity>;
|
|
99
|
+
listRooms(): Promise<TaRoomInfo[]>;
|
|
100
|
+
createRoom(input: {
|
|
101
|
+
kind: string;
|
|
102
|
+
title: string;
|
|
103
|
+
view?: string;
|
|
104
|
+
}): Promise<TaRoomInfo>;
|
|
105
|
+
/**
|
|
106
|
+
* The link others ask to join by (the owner only): the one of before while it has a day left; else, or with `renew`,
|
|
107
|
+
* a new one for `days` (7 by default, 30 at most), and the links of before stop working.
|
|
108
|
+
*/
|
|
109
|
+
invite(room: string, options?: {
|
|
110
|
+
days?: number;
|
|
111
|
+
renew?: boolean;
|
|
112
|
+
}): Promise<{
|
|
113
|
+
link: string;
|
|
114
|
+
expiresAt: number;
|
|
115
|
+
}>;
|
|
116
|
+
/** Asks to join the room of a link: `waiting` till its owner answers. Ask the user first. */
|
|
117
|
+
join(link: string): Promise<TaRoomInfo>;
|
|
118
|
+
/** Those asking to join the rooms of this Ta. */
|
|
119
|
+
listRequests(): Promise<TaRoomRequest[]>;
|
|
120
|
+
/** The user's answer to one asking to join. Only ever on the user's word, never on an agent's. */
|
|
121
|
+
answer(room: string, ask: string, accept: boolean): Promise<void>;
|
|
122
|
+
/** The owner takes a member out. */
|
|
123
|
+
removeMember(room: string, member: string): Promise<void>;
|
|
124
|
+
/** Leaves the room; its owner closes it for everyone. A room asked to join, refused or gone is forgotten. */
|
|
125
|
+
leave(room: string): Promise<void>;
|
|
126
|
+
/** To every other member, or to one (`to`, its member id): JSON, 64 KB at most. */
|
|
127
|
+
send(room: string, data: unknown, to?: string): Promise<void>;
|
|
128
|
+
/** The shared state, by its keys; with `prefix`, only the keys that start with it (`chat:`), not all a game keeps. */
|
|
129
|
+
getState(room: string, prefix?: string): Promise<Record<string, TaRoomValue>>;
|
|
130
|
+
/**
|
|
131
|
+
* Sets a key (`null` clears it); with `version`, only if it is still that version (0: not set), else `ok` is false
|
|
132
|
+
* and `version` says what it is: read it again, and set it again. A value is 64 KB at most.
|
|
133
|
+
*/
|
|
134
|
+
setState(room: string, key: string, value: unknown, version?: number): Promise<{
|
|
135
|
+
ok: boolean;
|
|
136
|
+
version: number;
|
|
137
|
+
}>;
|
|
138
|
+
listFriends(): Promise<TaFriend[]>;
|
|
139
|
+
removeFriend(id: string): Promise<boolean>;
|
|
140
|
+
/**
|
|
141
|
+
* This connection hears TaRoomEvent (TaClient.onRoomEvent) from now on; again after it connected again. Without
|
|
142
|
+
* `messages`, only `rooms` and `request`: messages and the state come often (a game's), for a page that shows them;
|
|
143
|
+
* with `state`, also the state of the keys that start with one of them (`chat:`), not the messages, for a list
|
|
144
|
+
* that shows what was said last.
|
|
145
|
+
*/
|
|
146
|
+
watch(messages?: boolean, state?: string[]): Promise<void>;
|
|
147
|
+
/** No more: messages of rooms come often (a game's), and need not go to a page that shows none. */
|
|
148
|
+
unwatch(): Promise<void>;
|
|
149
|
+
}
|
|
150
|
+
/** What a connection or a listener hears of the rooms (TaRoomServer.watch). */
|
|
151
|
+
export interface TaRoomWatch {
|
|
152
|
+
messages: boolean;
|
|
153
|
+
/** Prefixes of keys whose state it hears without `messages`. */
|
|
154
|
+
state: string[];
|
|
155
|
+
}
|
|
156
|
+
export declare namespace TaRoomWatchUtil {
|
|
157
|
+
function of(messages: boolean | undefined, state: unknown): TaRoomWatch;
|
|
158
|
+
/** All that several want: messages if one does, the prefixes of all. */
|
|
159
|
+
function union(watches: Iterable<TaRoomWatch>): TaRoomWatch;
|
|
160
|
+
function same(a: TaRoomWatch | undefined, b: TaRoomWatch | undefined): boolean;
|
|
161
|
+
function hears(watch: TaRoomWatch, event: TaRoomEvent): boolean;
|
|
162
|
+
}
|
|
163
|
+
/** The rooms for the server side of packages (TaExtensionHost.rooms): TaRoomServer, its events heard directly. */
|
|
164
|
+
export interface TaRooms extends Omit<TaRoomServer, 'watch' | 'unwatch'> {
|
|
165
|
+
onEvent(listener: (event: TaRoomEvent) => void): () => void;
|
|
166
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export const TaRoomServer = Symbol('TaRoomServer');
|
|
2
|
+
export const TA_ROOM_SERVICE = 'TaRoomServer';
|
|
3
|
+
export var TaRoomWatchUtil;
|
|
4
|
+
(function (TaRoomWatchUtil) {
|
|
5
|
+
function of(messages, state) {
|
|
6
|
+
const prefixes = Array.isArray(state) ? state.filter((prefix) => typeof prefix === 'string' && prefix.length > 0) : [];
|
|
7
|
+
return { messages: messages !== false, state: [...new Set(prefixes)].sort() };
|
|
8
|
+
}
|
|
9
|
+
TaRoomWatchUtil.of = of;
|
|
10
|
+
/** All that several want: messages if one does, the prefixes of all. */
|
|
11
|
+
function union(watches) {
|
|
12
|
+
let messages = false;
|
|
13
|
+
const state = [];
|
|
14
|
+
for (const watch of watches) {
|
|
15
|
+
messages || (messages = watch.messages);
|
|
16
|
+
state.push(...watch.state);
|
|
17
|
+
}
|
|
18
|
+
return of(messages, messages ? [] : state);
|
|
19
|
+
}
|
|
20
|
+
TaRoomWatchUtil.union = union;
|
|
21
|
+
function same(a, b) {
|
|
22
|
+
return a === b || (!!a && !!b && a.messages === b.messages && a.state.join('\n') === b.state.join('\n'));
|
|
23
|
+
}
|
|
24
|
+
TaRoomWatchUtil.same = same;
|
|
25
|
+
function hears(watch, event) {
|
|
26
|
+
if (event.type === 'message') {
|
|
27
|
+
return watch.messages;
|
|
28
|
+
}
|
|
29
|
+
if (event.type === 'state') {
|
|
30
|
+
return watch.messages || watch.state.some(prefix => event.key.startsWith(prefix));
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
TaRoomWatchUtil.hears = hears;
|
|
35
|
+
})(TaRoomWatchUtil || (TaRoomWatchUtil = {}));
|
|
36
|
+
//# sourceMappingURL=room-protocol.js.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { TaPackageServer } from './package-protocol.js';
|
|
2
|
+
import type { TaShares } from './relay-protocol.js';
|
|
3
|
+
import type { TaRooms } from './room-protocol.js';
|
|
2
4
|
import type { TaServer } from './ta-protocol.js';
|
|
3
5
|
/**
|
|
4
6
|
* What `ta serve` gives the server side of a package: the sessions and the data of packages, in its own
|
|
@@ -10,6 +12,17 @@ export interface TaExtensionHost extends Pick<TaServer, 'getServerInfo' | 'listS
|
|
|
10
12
|
readonly agentDir: string;
|
|
11
13
|
/** Where the conversation of a session file works, as clients name it (a path or an `ssh://` location), without opening it; undefined when it cannot be read. */
|
|
12
14
|
sessionCwd(sessionFile: string): Promise<string | undefined>;
|
|
15
|
+
/** Content shared by links, through the relay (docs/design/ta-link.md). */
|
|
16
|
+
readonly shares: TaShares;
|
|
17
|
+
/** Rooms shared with other Ta, through the relay (docs/design/ta-link.md 3). */
|
|
18
|
+
readonly rooms: TaRooms;
|
|
19
|
+
/** pi's messages of a session file, of the branch it is on (its first message first), without opening it. */
|
|
20
|
+
sessionMessages(sessionFile: string): Promise<unknown[]>;
|
|
21
|
+
/**
|
|
22
|
+
* A new conversation of `cwd` holding these messages of pi (an assistant's among them), named `name`: its session
|
|
23
|
+
* file, to open with `openSession`. As a conversation brought from elsewhere (a link of another Ta).
|
|
24
|
+
*/
|
|
25
|
+
createSession(cwd: string, messages: readonly unknown[], name?: string): Promise<string>;
|
|
13
26
|
/** Keys of the data of a package that changed, by a page or by the server, as they change; `cwd` for a key of a directory. */
|
|
14
27
|
onExtensionData(listener: (name: string, key: string, cwd?: string) => void): () => void;
|
|
15
28
|
}
|
|
@@ -34,6 +47,21 @@ export type TaPackageHostFactory = (host: TaExtensionHost) => TaPackageService |
|
|
|
34
47
|
* and the extension should say its tools need `ta serve`.
|
|
35
48
|
*/
|
|
36
49
|
export declare const TA_HOST_EVENT = "ta:host";
|
|
50
|
+
/**
|
|
51
|
+
* How a pi extension reaches the host of its package. Import it from `@celljs/ta-protocol/lib/common/ta-extension-host`
|
|
52
|
+
* in a bundle: this file has nothing else to run, where the whole protocol would come along with its index.
|
|
53
|
+
*/
|
|
54
|
+
export declare namespace TaHostUtil {
|
|
55
|
+
/**
|
|
56
|
+
* Under `ta serve` the host answers at once; under `ta` alone nobody answers. The timer also keeps the process
|
|
57
|
+
* alive meanwhile: a tool waiting for the host in `ta -p` would otherwise end it.
|
|
58
|
+
*/
|
|
59
|
+
const WAIT_MS = 1000;
|
|
60
|
+
/** Asks for the host of the package `name` (TA_HOST_EVENT); undefined when nobody answers: not under `ta serve`. */
|
|
61
|
+
function reach(events: {
|
|
62
|
+
emit(event: string, data: unknown): void;
|
|
63
|
+
}, name: string, waitMs?: number): Promise<TaHostAnswer | undefined>;
|
|
64
|
+
}
|
|
37
65
|
/**
|
|
38
66
|
* The event of pi's `pi.events` by which an extension whose tools change files without pi's `edit` and
|
|
39
67
|
* `write` (another coding agent's own tools, ta-agents) says which, as soon as it knows and before the
|
|
@@ -5,6 +5,33 @@
|
|
|
5
5
|
* and the extension should say its tools need `ta serve`.
|
|
6
6
|
*/
|
|
7
7
|
export const TA_HOST_EVENT = 'ta:host';
|
|
8
|
+
/**
|
|
9
|
+
* How a pi extension reaches the host of its package. Import it from `@celljs/ta-protocol/lib/common/ta-extension-host`
|
|
10
|
+
* in a bundle: this file has nothing else to run, where the whole protocol would come along with its index.
|
|
11
|
+
*/
|
|
12
|
+
export var TaHostUtil;
|
|
13
|
+
(function (TaHostUtil) {
|
|
14
|
+
/**
|
|
15
|
+
* Under `ta serve` the host answers at once; under `ta` alone nobody answers. The timer also keeps the process
|
|
16
|
+
* alive meanwhile: a tool waiting for the host in `ta -p` would otherwise end it.
|
|
17
|
+
*/
|
|
18
|
+
TaHostUtil.WAIT_MS = 1000;
|
|
19
|
+
/** Asks for the host of the package `name` (TA_HOST_EVENT); undefined when nobody answers: not under `ta serve`. */
|
|
20
|
+
function reach(events, name, waitMs = TaHostUtil.WAIT_MS) {
|
|
21
|
+
return new Promise(resolve => {
|
|
22
|
+
const timer = setTimeout(() => resolve(undefined), waitMs);
|
|
23
|
+
const request = {
|
|
24
|
+
name,
|
|
25
|
+
resolve: answer => {
|
|
26
|
+
clearTimeout(timer);
|
|
27
|
+
resolve(answer);
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
events.emit(TA_HOST_EVENT, request);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
TaHostUtil.reach = reach;
|
|
34
|
+
})(TaHostUtil || (TaHostUtil = {}));
|
|
8
35
|
/**
|
|
9
36
|
* The event of pi's `pi.events` by which an extension whose tools change files without pi's `edit` and
|
|
10
37
|
* `write` (another coding agent's own tools, ta-agents) says which, as soon as it knows and before the
|