@celljs/ta-host 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 +5 -5
- package/README.md +5 -5
- package/esm/node/client-tool-broker.d.ts +6 -2
- package/esm/node/client-tool-broker.js +11 -4
- package/esm/node/event-log.d.ts +2 -1
- package/esm/node/event-log.js +3 -2
- package/esm/node/exec-environment-factory.d.ts +7 -0
- package/esm/node/exec-environment-factory.js +30 -7
- package/esm/node/host-protocol.d.ts +24 -10
- package/esm/node/index.d.ts +2 -0
- package/esm/node/index.js +2 -0
- package/esm/node/package-hosts.d.ts +6 -0
- package/esm/node/package-hosts.js +36 -1
- package/esm/node/package-server-impl.d.ts +0 -1
- package/esm/node/package-server-impl.js +0 -3
- package/esm/node/relay-bridge.d.ts +12 -2
- package/esm/node/relay-bridge.js +93 -3
- package/esm/node/remote/remote-hosts.d.ts +1 -3
- package/esm/node/remote/remote-hosts.js +0 -15
- package/esm/node/remote/remote-protocol.d.ts +0 -2
- package/esm/node/remote/remote-server-impl.js +1 -1
- package/esm/node/remote-ui-context.d.ts +1 -1
- package/esm/node/remote-ui-context.js +3 -1
- package/esm/node/rooms-bridge.d.ts +60 -0
- package/esm/node/rooms-bridge.js +155 -0
- package/esm/node/session-catalog.d.ts +7 -3
- package/esm/node/session-catalog.js +15 -4
- package/esm/node/session-handles.d.ts +32 -0
- package/esm/node/session-handles.js +86 -0
- package/esm/node/session-info-util.d.ts +7 -0
- package/esm/node/session-info-util.js +63 -4
- package/esm/node/session-list-feed.d.ts +28 -0
- package/esm/node/session-list-feed.js +62 -0
- package/esm/node/sign-in/sign-in-flow.d.ts +2 -0
- package/esm/node/sign-in/sign-in-flow.js +9 -0
- package/esm/node/sign-in/sign-in-provider.js +3 -2
- package/esm/node/slash-command-util.d.ts +43 -0
- package/esm/node/slash-command-util.js +105 -0
- package/esm/node/ta-access.d.ts +11 -0
- package/esm/node/ta-access.js +29 -3
- package/esm/node/ta-errors.js +17 -2
- package/esm/node/ta-event-util.d.ts +19 -2
- package/esm/node/ta-event-util.js +97 -3
- package/esm/node/ta-server-impl.d.ts +13 -7
- package/esm/node/ta-server-impl.js +43 -24
- package/esm/node/ta-session-factory.d.ts +26 -2
- package/esm/node/ta-session-factory.js +64 -16
- package/esm/node/ta-session-registry.d.ts +16 -2
- package/esm/node/ta-session-registry.js +79 -20
- package/esm/node/ta-session.d.ts +16 -6
- package/esm/node/ta-session.js +59 -14
- package/esm/node/web-extension-catalog.d.ts +5 -1
- package/esm/node/web-extension-catalog.js +15 -19
- package/esm/node/web-extension-util.js +7 -3
- package/esm/node/workspace-files.d.ts +19 -5
- package/esm/node/workspace-files.js +26 -15
- package/esm/node/workspace-protocol.d.ts +1 -1
- package/esm/node/workspace-util.d.ts +2 -0
- package/esm/node/workspace-util.js +8 -3
- package/lib/node/client-tool-broker.d.ts +6 -2
- package/lib/node/client-tool-broker.js +11 -4
- package/lib/node/event-log.d.ts +2 -1
- package/lib/node/event-log.js +3 -2
- package/lib/node/exec-environment-factory.d.ts +7 -0
- package/lib/node/exec-environment-factory.js +30 -7
- package/lib/node/host-protocol.d.ts +24 -10
- package/lib/node/index.d.ts +2 -0
- package/lib/node/index.js +2 -0
- package/lib/node/package-hosts.d.ts +6 -0
- package/lib/node/package-hosts.js +35 -0
- package/lib/node/package-server-impl.d.ts +0 -1
- package/lib/node/package-server-impl.js +0 -3
- package/lib/node/relay-bridge.d.ts +12 -2
- package/lib/node/relay-bridge.js +91 -1
- package/lib/node/remote/remote-hosts.d.ts +1 -3
- package/lib/node/remote/remote-hosts.js +0 -15
- package/lib/node/remote/remote-protocol.d.ts +0 -2
- package/lib/node/remote/remote-server-impl.js +1 -1
- package/lib/node/remote-ui-context.d.ts +1 -1
- package/lib/node/remote-ui-context.js +3 -1
- package/lib/node/rooms-bridge.d.ts +61 -0
- package/lib/node/rooms-bridge.js +158 -0
- package/lib/node/session-catalog.d.ts +7 -3
- package/lib/node/session-catalog.js +15 -4
- package/lib/node/session-handles.d.ts +33 -0
- package/lib/node/session-handles.js +89 -0
- package/lib/node/session-info-util.d.ts +7 -0
- package/lib/node/session-info-util.js +62 -3
- package/lib/node/session-list-feed.d.ts +29 -0
- package/lib/node/session-list-feed.js +66 -0
- package/lib/node/sign-in/sign-in-flow.d.ts +2 -0
- package/lib/node/sign-in/sign-in-flow.js +10 -1
- package/lib/node/sign-in/sign-in-provider.js +3 -2
- package/lib/node/slash-command-util.d.ts +44 -0
- package/lib/node/slash-command-util.js +108 -0
- package/lib/node/ta-access.d.ts +11 -0
- package/lib/node/ta-access.js +29 -3
- package/lib/node/ta-errors.js +17 -2
- package/lib/node/ta-event-util.d.ts +19 -2
- package/lib/node/ta-event-util.js +97 -3
- package/lib/node/ta-server-impl.d.ts +13 -7
- package/lib/node/ta-server-impl.js +41 -22
- package/lib/node/ta-session-factory.d.ts +26 -2
- package/lib/node/ta-session-factory.js +65 -17
- package/lib/node/ta-session-registry.d.ts +16 -2
- package/lib/node/ta-session-registry.js +79 -20
- package/lib/node/ta-session.d.ts +16 -6
- package/lib/node/ta-session.js +59 -14
- package/lib/node/web-extension-catalog.d.ts +5 -1
- package/lib/node/web-extension-catalog.js +15 -19
- package/lib/node/web-extension-util.js +7 -3
- package/lib/node/workspace-files.d.ts +19 -5
- package/lib/node/workspace-files.js +26 -15
- package/lib/node/workspace-protocol.d.ts +1 -1
- package/lib/node/workspace-util.d.ts +2 -0
- package/lib/node/workspace-util.js +8 -3
- package/package.json +12 -12
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { TaSlashCommand } from '@celljs/ta-protocol';
|
|
2
|
+
type Descriptions = Readonly<Record<string, string>>;
|
|
3
|
+
type SourceInfo = TaSlashCommand['sourceInfo'];
|
|
4
|
+
/** What the `/` menu lists, as pi has them: commands of extensions by the names they are run by, prompt templates, skills. */
|
|
5
|
+
export interface SlashCommandSources {
|
|
6
|
+
commands: readonly {
|
|
7
|
+
invocationName: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
sourceInfo: SourceInfo;
|
|
10
|
+
}[];
|
|
11
|
+
prompts: readonly {
|
|
12
|
+
name: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
sourceInfo: SourceInfo;
|
|
15
|
+
}[];
|
|
16
|
+
skills: readonly {
|
|
17
|
+
name: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
sourceInfo: SourceInfo;
|
|
20
|
+
}[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The descriptions in other languages of the commands of the `/` menu: `pi.descriptions` of the package.json
|
|
24
|
+
* of the package each command or skill comes from, by its name there (`loop`, `skill:ta-game`), each a
|
|
25
|
+
* string by language (`{ "zh-CN": "…" }`). The package is the nearest directory up from its file with a package.json.
|
|
26
|
+
*/
|
|
27
|
+
export declare namespace SlashCommandUtil {
|
|
28
|
+
/** The commands of the `/` menu, in pi's order (its `get_commands`), with their descriptions in other languages. */
|
|
29
|
+
function list({ commands, prompts, skills }: SlashCommandSources): TaSlashCommand[];
|
|
30
|
+
/**
|
|
31
|
+
* The names the commands of extensions are run by, as pi's extension runner gives them: a name two
|
|
32
|
+
* extensions register is `name:1`, `name:2`, in the order the extensions loaded.
|
|
33
|
+
*/
|
|
34
|
+
function invocationNames<C extends {
|
|
35
|
+
name: string;
|
|
36
|
+
}>(commands: readonly C[]): (C & {
|
|
37
|
+
invocationName: string;
|
|
38
|
+
})[];
|
|
39
|
+
function withDescriptions(commands: readonly TaSlashCommand[]): TaSlashCommand[];
|
|
40
|
+
/** `pi.descriptions` of the package `directory` is in, with only what is text. */
|
|
41
|
+
function descriptionsOf(directory: string): Record<string, Descriptions> | undefined;
|
|
42
|
+
}
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=slash-command-util.d.ts.map
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlashCommandUtil = void 0;
|
|
4
|
+
const node_fs_1 = require("node:fs");
|
|
5
|
+
const node_path_1 = require("node:path");
|
|
6
|
+
/**
|
|
7
|
+
* The descriptions in other languages of the commands of the `/` menu: `pi.descriptions` of the package.json
|
|
8
|
+
* of the package each command or skill comes from, by its name there (`loop`, `skill:ta-game`), each a
|
|
9
|
+
* string by language (`{ "zh-CN": "…" }`). The package is the nearest directory up from its file with a package.json.
|
|
10
|
+
*/
|
|
11
|
+
var SlashCommandUtil;
|
|
12
|
+
(function (SlashCommandUtil) {
|
|
13
|
+
/** The commands of the `/` menu, in pi's order (its `get_commands`), with their descriptions in other languages. */
|
|
14
|
+
function list({ commands, prompts, skills }) {
|
|
15
|
+
return withDescriptions([
|
|
16
|
+
...commands.map(c => ({ name: c.invocationName, description: c.description, source: 'extension', sourceInfo: c.sourceInfo })),
|
|
17
|
+
...prompts.map(p => ({ name: p.name, description: p.description, source: 'prompt', sourceInfo: p.sourceInfo })),
|
|
18
|
+
...skills.map(s => ({ name: `skill:${s.name}`, description: s.description, source: 'skill', sourceInfo: s.sourceInfo })),
|
|
19
|
+
]);
|
|
20
|
+
}
|
|
21
|
+
SlashCommandUtil.list = list;
|
|
22
|
+
/**
|
|
23
|
+
* The names the commands of extensions are run by, as pi's extension runner gives them: a name two
|
|
24
|
+
* extensions register is `name:1`, `name:2`, in the order the extensions loaded.
|
|
25
|
+
*/
|
|
26
|
+
function invocationNames(commands) {
|
|
27
|
+
var _a;
|
|
28
|
+
const counts = new Map();
|
|
29
|
+
for (const command of commands) {
|
|
30
|
+
counts.set(command.name, ((_a = counts.get(command.name)) !== null && _a !== void 0 ? _a : 0) + 1);
|
|
31
|
+
}
|
|
32
|
+
const seen = new Map();
|
|
33
|
+
const taken = new Set();
|
|
34
|
+
return commands.map(command => {
|
|
35
|
+
var _a, _b;
|
|
36
|
+
const occurrence = ((_a = seen.get(command.name)) !== null && _a !== void 0 ? _a : 0) + 1;
|
|
37
|
+
seen.set(command.name, occurrence);
|
|
38
|
+
let invocationName = ((_b = counts.get(command.name)) !== null && _b !== void 0 ? _b : 0) > 1 ? `${command.name}:${occurrence}` : command.name;
|
|
39
|
+
for (let suffix = occurrence; taken.has(invocationName);) {
|
|
40
|
+
suffix++;
|
|
41
|
+
invocationName = `${command.name}:${suffix}`;
|
|
42
|
+
}
|
|
43
|
+
taken.add(invocationName);
|
|
44
|
+
return { ...command, invocationName };
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
SlashCommandUtil.invocationNames = invocationNames;
|
|
48
|
+
function withDescriptions(commands) {
|
|
49
|
+
const packages = new Map();
|
|
50
|
+
return commands.map(command => {
|
|
51
|
+
var _a;
|
|
52
|
+
const { path } = command.sourceInfo;
|
|
53
|
+
if (!(0, node_path_1.isAbsolute)(path)) {
|
|
54
|
+
return command;
|
|
55
|
+
}
|
|
56
|
+
const directory = (0, node_path_1.dirname)(path);
|
|
57
|
+
if (!packages.has(directory)) {
|
|
58
|
+
packages.set(directory, descriptionsOf(directory));
|
|
59
|
+
}
|
|
60
|
+
const descriptions = (_a = packages.get(directory)) === null || _a === void 0 ? void 0 : _a[command.name];
|
|
61
|
+
return descriptions ? { ...command, descriptions } : command;
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
SlashCommandUtil.withDescriptions = withDescriptions;
|
|
65
|
+
/** `pi.descriptions` of the package `directory` is in, with only what is text. */
|
|
66
|
+
function descriptionsOf(directory) {
|
|
67
|
+
var _a, _b;
|
|
68
|
+
const root = packageRoot(directory);
|
|
69
|
+
if (!root) {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
let declared;
|
|
73
|
+
try {
|
|
74
|
+
declared = (_b = (_a = JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.join)(root, 'package.json'), 'utf8'))) === null || _a === void 0 ? void 0 : _a.pi) === null || _b === void 0 ? void 0 : _b.descriptions;
|
|
75
|
+
}
|
|
76
|
+
catch (_c) {
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
if (!isRecord(declared)) {
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
const byName = {};
|
|
83
|
+
for (const [name, texts] of Object.entries(declared)) {
|
|
84
|
+
const languages = isRecord(texts)
|
|
85
|
+
? Object.entries(texts).filter((entry) => typeof entry[1] === 'string' && entry[1].trim() !== '')
|
|
86
|
+
: [];
|
|
87
|
+
if (languages.length > 0) {
|
|
88
|
+
byName[name] = Object.fromEntries(languages);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return byName;
|
|
92
|
+
}
|
|
93
|
+
SlashCommandUtil.descriptionsOf = descriptionsOf;
|
|
94
|
+
function packageRoot(directory) {
|
|
95
|
+
for (let current = directory;; current = (0, node_path_1.dirname)(current)) {
|
|
96
|
+
if ((0, node_fs_1.existsSync)((0, node_path_1.join)(current, 'package.json'))) {
|
|
97
|
+
return current;
|
|
98
|
+
}
|
|
99
|
+
if ((0, node_path_1.dirname)(current) === current) {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function isRecord(value) {
|
|
105
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
106
|
+
}
|
|
107
|
+
})(SlashCommandUtil || (exports.SlashCommandUtil = SlashCommandUtil = {}));
|
|
108
|
+
//# sourceMappingURL=slash-command-util.js.map
|
package/lib/node/ta-access.d.ts
CHANGED
|
@@ -21,6 +21,14 @@ export declare namespace TaAccessUtil {
|
|
|
21
21
|
* calls on its WebSocket only, where a call knows its connection (attach, terminals) and gets pushes.
|
|
22
22
|
*/
|
|
23
23
|
function isHttpCall(request: IncomingMessage): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* What starts this ta serve (`ta serve --host --port --exec`, the desktop app, the gateway) and is read
|
|
26
|
+
* once it listens. Left in its environment, every program of its sessions and terminals would take it: a
|
|
27
|
+
* `ta serve` or a Cell app run there would listen on this one's port, a Ta reached from there would take its token.
|
|
28
|
+
*/
|
|
29
|
+
const SERVE_ENV: string[];
|
|
30
|
+
/** Removes {@link SERVE_ENV} from `env`, for what this process starts. */
|
|
31
|
+
function releaseServeEnv(env: NodeJS.ProcessEnv): void;
|
|
24
32
|
/** The token goes in the fragment, which the browser does not send to the server or in `Referer`. */
|
|
25
33
|
function webUrl(httpUrl: string, token: string): string;
|
|
26
34
|
/**
|
|
@@ -40,6 +48,9 @@ export declare namespace TaAccessUtil {
|
|
|
40
48
|
export declare class TaAccess implements RpcWebSocketGuard, Middleware, ServerAware, ApplicationLifecycle<Application> {
|
|
41
49
|
readonly priority = 10000;
|
|
42
50
|
readonly token: string;
|
|
51
|
+
/** Read before the environment lets them go (TaAccessUtil.releaseServeEnv). */
|
|
52
|
+
protected readonly chosenToken: boolean;
|
|
53
|
+
protected readonly openWeb: boolean;
|
|
43
54
|
protected readonly host?: string;
|
|
44
55
|
protected readonly sessions: TaSessionRegistry;
|
|
45
56
|
protected readonly signIn: TaSignIn;
|
package/lib/node/ta-access.js
CHANGED
|
@@ -68,6 +68,27 @@ var TaAccessUtil;
|
|
|
68
68
|
return request.method === 'POST' && path.startsWith(`${API_PATH}/`);
|
|
69
69
|
}
|
|
70
70
|
TaAccessUtil.isHttpCall = isHttpCall;
|
|
71
|
+
/**
|
|
72
|
+
* What starts this ta serve (`ta serve --host --port --exec`, the desktop app, the gateway) and is read
|
|
73
|
+
* once it listens. Left in its environment, every program of its sessions and terminals would take it: a
|
|
74
|
+
* `ta serve` or a Cell app run there would listen on this one's port, a Ta reached from there would take its token.
|
|
75
|
+
*/
|
|
76
|
+
TaAccessUtil.SERVE_ENV = [
|
|
77
|
+
'CELL_SERVER__HOST',
|
|
78
|
+
'CELL_SERVER__PORT',
|
|
79
|
+
'CELL_TA__EXEC__URL',
|
|
80
|
+
'CELL_TA__EXEC__TOKEN',
|
|
81
|
+
'TA_EXEC_TOKEN',
|
|
82
|
+
'TA_SERVE_TOKEN',
|
|
83
|
+
'TA_SERVE_OPEN_WEB',
|
|
84
|
+
];
|
|
85
|
+
/** Removes {@link SERVE_ENV} from `env`, for what this process starts. */
|
|
86
|
+
function releaseServeEnv(env) {
|
|
87
|
+
for (const key of TaAccessUtil.SERVE_ENV) {
|
|
88
|
+
delete env[key];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
TaAccessUtil.releaseServeEnv = releaseServeEnv;
|
|
71
92
|
/** The token goes in the fragment, which the browser does not send to the server or in `Referer`. */
|
|
72
93
|
function webUrl(httpUrl, token) {
|
|
73
94
|
return `${httpUrl}/#token=${token}`;
|
|
@@ -109,6 +130,9 @@ let TaAccess = class TaAccess {
|
|
|
109
130
|
constructor() {
|
|
110
131
|
this.priority = exports.ACCESS_MIDDLEWARE_PRIORITY;
|
|
111
132
|
this.token = process.env.TA_SERVE_TOKEN || serve_state_1.TaServeStateUtil.read().token || (0, node_crypto_1.randomBytes)(32).toString('base64url');
|
|
133
|
+
/** Read before the environment lets them go (TaAccessUtil.releaseServeEnv). */
|
|
134
|
+
this.chosenToken = !!process.env.TA_SERVE_TOKEN;
|
|
135
|
+
this.openWeb = !!process.env.TA_SERVE_OPEN_WEB;
|
|
112
136
|
this.infoFile = (0, node_path_1.join)(ta_brand_1.TaBrand.agentDir(), ta_protocol_1.TA_SERVE_FILE);
|
|
113
137
|
}
|
|
114
138
|
allows(request) {
|
|
@@ -162,16 +186,18 @@ let TaAccess = class TaAccess {
|
|
|
162
186
|
(0, node_fs_1.chmodSync)(this.infoFile, 0o600);
|
|
163
187
|
// A token that a parent process chose is its to keep.
|
|
164
188
|
const kept = serve_state_1.TaServeStateUtil.read().token;
|
|
165
|
-
serve_state_1.TaServeStateUtil.write({ port, token:
|
|
189
|
+
serve_state_1.TaServeStateUtil.write({ port, token: this.chosenToken ? kept : this.token });
|
|
190
|
+
// Read: what the sessions and terminals start does not take it.
|
|
191
|
+
TaAccessUtil.releaseServeEnv(process.env);
|
|
166
192
|
console.log(`ta serve: ${info.url} (token in ${this.infoFile})`);
|
|
167
|
-
if (
|
|
193
|
+
if (this.openWeb) {
|
|
168
194
|
const url = TaAccessUtil.webUrl(`http://${origin}`, this.token);
|
|
169
195
|
console.log(`ta serve: web client at ${url}`);
|
|
170
196
|
TaAccessUtil.openBrowser(url);
|
|
171
197
|
}
|
|
172
198
|
else if (!TaAccessUtil.isLoopbackHost(this.host)) {
|
|
173
199
|
// Reached from elsewhere (a container, a server): whoever started it opens the link to sign in.
|
|
174
|
-
for (const line of TaAccessUtil.signInLines(this.signIn, port,
|
|
200
|
+
for (const line of TaAccessUtil.signInLines(this.signIn, port, this.chosenToken ? undefined : this.token)) {
|
|
175
201
|
console.log(`ta serve: ${line}`);
|
|
176
202
|
}
|
|
177
203
|
}
|
package/lib/node/ta-errors.js
CHANGED
|
@@ -8,7 +8,18 @@ const TaError = core_1.ApplicationError.declare(ta_protocol_1.TA_RPC_ERROR_CODE,
|
|
|
8
8
|
data: { code, hint },
|
|
9
9
|
}));
|
|
10
10
|
/** What pi says when no provider is signed in for the model, or no model can be used. */
|
|
11
|
-
const NOT_SIGNED_IN = /^No (API key found for|model selected|models available)\b/;
|
|
11
|
+
const NOT_SIGNED_IN = /^(No (API key found for|model selected|models available)|Authentication failed for)\b/;
|
|
12
|
+
/** What else pi says that a client words for the user by its code, as pi's messages are English. */
|
|
13
|
+
const KNOWN = [
|
|
14
|
+
{ pattern: /^Nothing to compact\b/, code: ta_protocol_1.TaErrorCode.NOTHING_TO_COMPACT, hint: 'Compact once the conversation is longer.' },
|
|
15
|
+
{ pattern: /^Already compacted$/, code: ta_protocol_1.TaErrorCode.ALREADY_COMPACTED, hint: 'Compact again once more has been said.' },
|
|
16
|
+
{
|
|
17
|
+
pattern: /^(Cannot submit a prompt while compaction is in progress|Wait for the current (response|compaction))\b/,
|
|
18
|
+
code: ta_protocol_1.TaErrorCode.SESSION_BUSY,
|
|
19
|
+
hint: 'Try again once the session is idle.',
|
|
20
|
+
},
|
|
21
|
+
{ pattern: /^Compaction cancelled$/, code: ta_protocol_1.TaErrorCode.CANCELLED, hint: 'It was stopped; nothing to do.' },
|
|
22
|
+
];
|
|
12
23
|
/** The failures of calls of the services of ta serve ({@link TaServer} and the others), which reach the client with their message and code. */
|
|
13
24
|
var TaErrors;
|
|
14
25
|
(function (TaErrors) {
|
|
@@ -54,7 +65,11 @@ var TaErrors;
|
|
|
54
65
|
const message = cause instanceof Error ? cause.message : String(cause);
|
|
55
66
|
if (NOT_SIGNED_IN.test(message)) {
|
|
56
67
|
// pi's own words go on about its /login and the paths of its documents, which a client does not have.
|
|
57
|
-
return TaError(ta_protocol_1.TaErrorCode.NOT_SIGNED_IN, message.split(/\n| Use \/login/)[0].trim(), 'Sign in to a provider of models (TaAuthServer.login), then send it again.');
|
|
68
|
+
return TaError(ta_protocol_1.TaErrorCode.NOT_SIGNED_IN, message.split(/\n| (Use |Run ')\/login/)[0].trim(), 'Sign in to a provider of models (TaAuthServer.login), then send it again.');
|
|
69
|
+
}
|
|
70
|
+
const known = KNOWN.find(({ pattern }) => pattern.test(message));
|
|
71
|
+
if (known) {
|
|
72
|
+
return TaError(known.code, message, known.hint);
|
|
58
73
|
}
|
|
59
74
|
return TaError(ta_protocol_1.TaErrorCode.COMMAND_FAILED, message, 'The message comes from the agent; fix what it says and send the command again.');
|
|
60
75
|
}
|
|
@@ -1,12 +1,29 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type TaConversation, type TaEvent, type TaMessage } from '@celljs/ta-protocol';
|
|
2
2
|
type AgentSessionEvent = import('@earendil-works/pi-coding-agent', { with: { 'resolution-mode': 'import' } }).AgentSessionEvent;
|
|
3
3
|
export declare namespace TaEventUtil {
|
|
4
4
|
/**
|
|
5
5
|
* An event of pi as it goes on the wire, the JSON form of pi's RPC and JSON modes (pi does not export
|
|
6
6
|
* its function). pi's `message_update` holds the whole message so far: sent as is, a reply would cost
|
|
7
|
-
* the square of its length.
|
|
7
|
+
* the square of its length. The images of tool results go without their bytes (`leanMessage`).
|
|
8
8
|
*/
|
|
9
9
|
function toWire(event: AgentSessionEvent): TaEvent;
|
|
10
|
+
/**
|
|
11
|
+
* A message as clients get it: a tool's result keeps its images' kind but not their bytes (`data` is
|
|
12
|
+
* empty). Clients do not show them (the model reads them), and screenshots are most of the bytes of a
|
|
13
|
+
* conversation that has them: on a slow network a page of it would be one picture nobody sees.
|
|
14
|
+
*/
|
|
15
|
+
function leanMessage(message: TaMessage): TaMessage;
|
|
16
|
+
/** The result of a tool, or a message of one, without the bytes of its images. */
|
|
17
|
+
function leanResult<T>(result: T): T;
|
|
18
|
+
/**
|
|
19
|
+
* A conversation as clients get it: its messages and the results of its calls lean, and the images of the
|
|
20
|
+
* messages of the user without their bytes but with their size (`TaShownImage`): they come with
|
|
21
|
+
* `getMessageImage` once shown, and a conversation with pictures opens as fast as one without. Events keep
|
|
22
|
+
* them: a message just sent shows on every device at once.
|
|
23
|
+
*/
|
|
24
|
+
function leanConversation(conversation: TaConversation): TaConversation;
|
|
25
|
+
/** A message as a page of the conversation gives it: `leanMessage`, and the images of the user's without their bytes. */
|
|
26
|
+
function leanShown(message: TaMessage): TaMessage;
|
|
10
27
|
}
|
|
11
28
|
export {};
|
|
12
29
|
//# sourceMappingURL=ta-event-util.d.ts.map
|
|
@@ -1,17 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TaEventUtil = void 0;
|
|
4
|
+
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
5
|
+
/** The lean form of each message and result met, made once: the pages of a conversation measure it by its object. */
|
|
6
|
+
const leaned = new WeakMap();
|
|
4
7
|
var TaEventUtil;
|
|
5
8
|
(function (TaEventUtil) {
|
|
6
9
|
/**
|
|
7
10
|
* An event of pi as it goes on the wire, the JSON form of pi's RPC and JSON modes (pi does not export
|
|
8
11
|
* its function). pi's `message_update` holds the whole message so far: sent as is, a reply would cost
|
|
9
|
-
* the square of its length.
|
|
12
|
+
* the square of its length. The images of tool results go without their bytes (`leanMessage`).
|
|
10
13
|
*/
|
|
11
14
|
function toWire(event) {
|
|
12
15
|
var _a;
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
switch (event.type) {
|
|
17
|
+
case 'message_update':
|
|
18
|
+
break;
|
|
19
|
+
case 'message_start':
|
|
20
|
+
case 'message_end':
|
|
21
|
+
return withLean(event, 'message', leanMessage(event.message));
|
|
22
|
+
case 'tool_execution_update':
|
|
23
|
+
return withLean(event, 'partialResult', leanResult(event.partialResult));
|
|
24
|
+
case 'tool_execution_end':
|
|
25
|
+
return withLean(event, 'result', leanResult(event.result));
|
|
26
|
+
case 'turn_end': {
|
|
27
|
+
const message = leanMessage(event.message);
|
|
28
|
+
const toolResults = leanAll(event.toolResults);
|
|
29
|
+
return (message === event.message && toolResults === event.toolResults ? event : { ...event, message, toolResults });
|
|
30
|
+
}
|
|
31
|
+
case 'agent_end':
|
|
32
|
+
return withLean(event, 'messages', leanAll(event.messages));
|
|
33
|
+
default:
|
|
34
|
+
return event;
|
|
15
35
|
}
|
|
16
36
|
const { partial, ...delta } = event.assistantMessageEvent;
|
|
17
37
|
const block = delta.type === 'toolcall_start' ? partial === null || partial === void 0 ? void 0 : partial.content[(_a = delta.contentIndex) !== null && _a !== void 0 ? _a : -1] : undefined;
|
|
@@ -19,5 +39,79 @@ var TaEventUtil;
|
|
|
19
39
|
return { type: 'message_update', usage: event.message.usage, assistantMessageEvent };
|
|
20
40
|
}
|
|
21
41
|
TaEventUtil.toWire = toWire;
|
|
42
|
+
/**
|
|
43
|
+
* A message as clients get it: a tool's result keeps its images' kind but not their bytes (`data` is
|
|
44
|
+
* empty). Clients do not show them (the model reads them), and screenshots are most of the bytes of a
|
|
45
|
+
* conversation that has them: on a slow network a page of it would be one picture nobody sees.
|
|
46
|
+
*/
|
|
47
|
+
function leanMessage(message) {
|
|
48
|
+
return (message === null || message === void 0 ? void 0 : message.role) === 'toolResult' ? leanResult(message) : message;
|
|
49
|
+
}
|
|
50
|
+
TaEventUtil.leanMessage = leanMessage;
|
|
51
|
+
/** The result of a tool, or a message of one, without the bytes of its images. */
|
|
52
|
+
function leanResult(result) {
|
|
53
|
+
const content = result === null || result === void 0 ? void 0 : result.content;
|
|
54
|
+
if (!result || typeof result !== 'object' || !Array.isArray(content)) {
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
const known = leaned.get(result);
|
|
58
|
+
if (known) {
|
|
59
|
+
return known;
|
|
60
|
+
}
|
|
61
|
+
const heavy = content.some(block => (block === null || block === void 0 ? void 0 : block.type) === 'image' && block.data);
|
|
62
|
+
const lean = heavy
|
|
63
|
+
? {
|
|
64
|
+
...result,
|
|
65
|
+
content: content.map(block => (block === null || block === void 0 ? void 0 : block.type) === 'image' ? { type: 'image', mimeType: block.mimeType, data: '' } : block),
|
|
66
|
+
}
|
|
67
|
+
: result;
|
|
68
|
+
leaned.set(result, lean);
|
|
69
|
+
return lean;
|
|
70
|
+
}
|
|
71
|
+
TaEventUtil.leanResult = leanResult;
|
|
72
|
+
/**
|
|
73
|
+
* A conversation as clients get it: its messages and the results of its calls lean, and the images of the
|
|
74
|
+
* messages of the user without their bytes but with their size (`TaShownImage`): they come with
|
|
75
|
+
* `getMessageImage` once shown, and a conversation with pictures opens as fast as one without. Events keep
|
|
76
|
+
* them: a message just sent shows on every device at once.
|
|
77
|
+
*/
|
|
78
|
+
function leanConversation(conversation) {
|
|
79
|
+
const tools = {};
|
|
80
|
+
for (const [id, run] of Object.entries(conversation.tools)) {
|
|
81
|
+
tools[id] = run.result === undefined ? run : { ...run, result: leanResult(run.result) };
|
|
82
|
+
}
|
|
83
|
+
return { ...conversation, messages: leanAll(conversation.messages, leanShown), tools };
|
|
84
|
+
}
|
|
85
|
+
TaEventUtil.leanConversation = leanConversation;
|
|
86
|
+
/** A message as a page of the conversation gives it: `leanMessage`, and the images of the user's without their bytes. */
|
|
87
|
+
function leanShown(message) {
|
|
88
|
+
const { role, content } = message;
|
|
89
|
+
if (role !== 'user' || !Array.isArray(content)) {
|
|
90
|
+
return leanMessage(message);
|
|
91
|
+
}
|
|
92
|
+
const known = leaned.get(message);
|
|
93
|
+
if (known) {
|
|
94
|
+
return known;
|
|
95
|
+
}
|
|
96
|
+
const heavy = content.some(block => (block === null || block === void 0 ? void 0 : block.type) === 'image' && block.data);
|
|
97
|
+
const lean = heavy ? { ...message, content: content.map(block => ((block === null || block === void 0 ? void 0 : block.type) === 'image' ? shown(block) : block)) } : message;
|
|
98
|
+
leaned.set(message, lean);
|
|
99
|
+
return lean;
|
|
100
|
+
}
|
|
101
|
+
TaEventUtil.leanShown = leanShown;
|
|
102
|
+
function shown(block) {
|
|
103
|
+
var _a;
|
|
104
|
+
return { type: 'image', mimeType: (_a = block.mimeType) !== null && _a !== void 0 ? _a : '', data: '', ...(block.data ? ta_protocol_1.TaImageSize.of(block.data) : undefined) };
|
|
105
|
+
}
|
|
106
|
+
function leanAll(messages, lean = leanMessage) {
|
|
107
|
+
if (!Array.isArray(messages)) {
|
|
108
|
+
return messages;
|
|
109
|
+
}
|
|
110
|
+
const leant = messages.map(lean);
|
|
111
|
+
return leant.every((message, index) => message === messages[index]) ? messages : leant;
|
|
112
|
+
}
|
|
113
|
+
function withLean(event, key, value) {
|
|
114
|
+
return (value === event[key] ? event : { ...event, [key]: value });
|
|
115
|
+
}
|
|
22
116
|
})(TaEventUtil || (exports.TaEventUtil = TaEventUtil = {}));
|
|
23
117
|
//# sourceMappingURL=ta-event-util.js.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ExecEnvironmentFactory } from '@celljs/ta-exec';
|
|
2
|
-
import { type RpcExtensionUIResponse, type TaAttachOptions, type TaAttachResult, type TaClientToolResult, type TaCommandResult, type TaForkFileResult, type TaMessagePage, type TaNavigateResult, type TaOpenSessionOptions, type TaPromptInput, type TaPromptReceipt, type TaSavedSessionInfo, TaServer, type TaServerInfo, type TaSessionInfo, type ThinkingLevel } from '@celljs/ta-protocol';
|
|
3
|
-
import { TaSessionCatalog, TaSessionRegistry } from './host-protocol';
|
|
4
|
-
import { RemoteHosts } from './remote/remote-protocol';
|
|
2
|
+
import { type ImageContent, type RpcExtensionUIResponse, type TaAttachOptions, type TaAttachResult, type TaClientToolResult, type TaCommandResult, type TaForkFileResult, type TaMessagePage, type TaNavigateResult, type TaOpenedSession, type TaOpenSessionOptions, type TaPromptInput, type TaPromptReceipt, type TaSavedSessionInfo, type TaSavedSessionQuery, TaServer, type TaServerInfo, type TaSessionInfo, type TaSlashCommand, type ThinkingLevel } from '@celljs/ta-protocol';
|
|
3
|
+
import { TaSessionCatalog, TaSessionFactory, TaSessionRegistry } from './host-protocol';
|
|
5
4
|
import type { TaSession } from './ta-session';
|
|
6
5
|
import { TaWorkingDirectory } from './working-directory';
|
|
7
6
|
/**
|
|
@@ -13,16 +12,18 @@ export declare class TaServerImpl implements TaServer {
|
|
|
13
12
|
protected readonly sessions: TaSessionRegistry;
|
|
14
13
|
protected readonly environments: ExecEnvironmentFactory;
|
|
15
14
|
protected readonly workingDirectory: TaWorkingDirectory;
|
|
16
|
-
protected readonly remoteHosts: RemoteHosts;
|
|
17
15
|
protected readonly catalog: TaSessionCatalog;
|
|
16
|
+
protected readonly factory: TaSessionFactory;
|
|
18
17
|
getServerInfo(): Promise<TaServerInfo>;
|
|
19
18
|
setWorkingDirectory(cwd: string): Promise<TaServerInfo>;
|
|
20
|
-
openSession(options: TaOpenSessionOptions): Promise<
|
|
19
|
+
openSession({ attach, ...options }: TaOpenSessionOptions): Promise<TaOpenedSession>;
|
|
21
20
|
closeSession(sessionId: string): Promise<void>;
|
|
22
21
|
listSessions(): Promise<TaSessionInfo[]>;
|
|
23
|
-
|
|
22
|
+
watchSessions(): Promise<TaSessionInfo[]>;
|
|
23
|
+
listSavedSessions(query?: TaSavedSessionQuery): Promise<TaSavedSessionInfo[]>;
|
|
24
24
|
attach(sessionId: string, afterSeq?: number, options?: TaAttachOptions): Promise<TaAttachResult>;
|
|
25
25
|
getEarlierMessages(sessionId: string, before: number | undefined, timestamp: number | undefined, budget: number): Promise<TaMessagePage>;
|
|
26
|
+
getMessageImage(sessionId: string, timestamp: number, index: number): Promise<ImageContent | undefined>;
|
|
26
27
|
detach(sessionId: string): Promise<void>;
|
|
27
28
|
respondUi(sessionId: string, response: RpcExtensionUIResponse): Promise<boolean>;
|
|
28
29
|
claimClientTool(sessionId: string, id: string): Promise<boolean>;
|
|
@@ -62,7 +63,12 @@ export declare class TaServerImpl implements TaServer {
|
|
|
62
63
|
getLastAssistantText(sessionId: string): Promise<TaCommandResult<'get_last_assistant_text'>>;
|
|
63
64
|
setSessionName(sessionId: string, name: string): Promise<void>;
|
|
64
65
|
getMessages(sessionId: string): Promise<TaCommandResult<'get_messages'>>;
|
|
65
|
-
getCommands(sessionId: string): Promise<
|
|
66
|
+
getCommands(sessionId: string): Promise<{
|
|
67
|
+
commands: TaSlashCommand[];
|
|
68
|
+
}>;
|
|
69
|
+
getDirectoryCommands(cwd: string): Promise<{
|
|
70
|
+
commands: TaSlashCommand[];
|
|
71
|
+
}>;
|
|
66
72
|
reload(sessionId: string): Promise<void>;
|
|
67
73
|
protected on<T>(sessionId: string, command: (session: TaSession) => T | Promise<T>): Promise<T>;
|
|
68
74
|
protected guard<T>(command: () => Promise<T>): Promise<T>;
|
|
@@ -20,8 +20,8 @@ const ta_exec_1 = require("@celljs/ta-exec");
|
|
|
20
20
|
const ta_brand_1 = require("@celljs/ta-harness/lib/node/ta-brand");
|
|
21
21
|
const ta_protocol_1 = require("@celljs/ta-protocol");
|
|
22
22
|
const host_protocol_1 = require("./host-protocol");
|
|
23
|
-
const remote_protocol_1 = require("./remote/remote-protocol");
|
|
24
23
|
const session_info_util_1 = require("./session-info-util");
|
|
24
|
+
const slash_command_util_1 = require("./slash-command-util");
|
|
25
25
|
const ta_errors_1 = require("./ta-errors");
|
|
26
26
|
const working_directory_1 = require("./working-directory");
|
|
27
27
|
/**
|
|
@@ -36,12 +36,13 @@ let TaServerImpl = class TaServerImpl {
|
|
|
36
36
|
cwd: await this.environments.defaultCwd(),
|
|
37
37
|
user: (0, node_os_1.userInfo)().username,
|
|
38
38
|
host: (0, node_os_1.hostname)().replace(/\.local$/, ''),
|
|
39
|
+
home: (0, node_os_1.homedir)(),
|
|
39
40
|
}));
|
|
40
41
|
}
|
|
41
42
|
async setWorkingDirectory(cwd) {
|
|
42
43
|
return this.guard(async () => {
|
|
43
44
|
var _a;
|
|
44
|
-
const path = typeof cwd === 'string' && cwd.trim() ? await this.
|
|
45
|
+
const path = typeof cwd === 'string' && cwd.trim() ? await this.environments.resolve(cwd.trim()) : '';
|
|
45
46
|
const env = path ? this.environments.create(path) : undefined;
|
|
46
47
|
if (!env || !((_a = (await env.stat(env.cwd))) === null || _a === void 0 ? void 0 : _a.isDirectory)) {
|
|
47
48
|
throw ta_errors_1.TaErrors.invalidArgument(`${cwd} is not a directory.`, 'Pass the absolute path of a directory that exists on the server, or an ssh:// location.');
|
|
@@ -50,8 +51,15 @@ let TaServerImpl = class TaServerImpl {
|
|
|
50
51
|
return this.getServerInfo();
|
|
51
52
|
});
|
|
52
53
|
}
|
|
53
|
-
async openSession(options) {
|
|
54
|
-
return this.guard(async () =>
|
|
54
|
+
async openSession({ attach, ...options }) {
|
|
55
|
+
return this.guard(async () => {
|
|
56
|
+
const session = await this.sessions.open(options);
|
|
57
|
+
if (!attach) {
|
|
58
|
+
return session.info();
|
|
59
|
+
}
|
|
60
|
+
const attached = session.attach(this.sessions.channel(node_1.RpcContext.requireConnection()), undefined, attach);
|
|
61
|
+
return { ...attached.info, attachment: attached };
|
|
62
|
+
});
|
|
55
63
|
}
|
|
56
64
|
closeSession(sessionId) {
|
|
57
65
|
return this.guard(() => this.sessions.close(sessionId));
|
|
@@ -59,10 +67,13 @@ let TaServerImpl = class TaServerImpl {
|
|
|
59
67
|
async listSessions() {
|
|
60
68
|
return this.sessions.list().map(session => session.info());
|
|
61
69
|
}
|
|
62
|
-
|
|
70
|
+
async watchSessions() {
|
|
71
|
+
return this.sessions.watch(node_1.RpcContext.requireConnection());
|
|
72
|
+
}
|
|
73
|
+
listSavedSessions(query) {
|
|
63
74
|
return this.guard(async () => {
|
|
64
75
|
const open = new Set(this.sessions.list().flatMap(session => { var _a; return (_a = session.pi.sessionFile) !== null && _a !== void 0 ? _a : []; }));
|
|
65
|
-
return this.catalog.list(open);
|
|
76
|
+
return this.catalog.list(open, query !== null && query !== void 0 ? query : undefined);
|
|
66
77
|
});
|
|
67
78
|
}
|
|
68
79
|
attach(sessionId, afterSeq, options) {
|
|
@@ -71,8 +82,17 @@ let TaServerImpl = class TaServerImpl {
|
|
|
71
82
|
getEarlierMessages(sessionId, before, timestamp, budget) {
|
|
72
83
|
return this.on(sessionId, session => session.earlierMessages(before !== null && before !== void 0 ? before : undefined, timestamp !== null && timestamp !== void 0 ? timestamp : undefined, budget));
|
|
73
84
|
}
|
|
85
|
+
getMessageImage(sessionId, timestamp, index) {
|
|
86
|
+
return this.on(sessionId, session => session.messageImage(timestamp, index));
|
|
87
|
+
}
|
|
74
88
|
detach(sessionId) {
|
|
75
|
-
|
|
89
|
+
// Not opened again to be left: a session closed meanwhile has no client.
|
|
90
|
+
return this.guard(async () => {
|
|
91
|
+
var _a;
|
|
92
|
+
(_a = this.sessions
|
|
93
|
+
.list()
|
|
94
|
+
.find(session => session.id === sessionId)) === null || _a === void 0 ? void 0 : _a.detach(this.sessions.channel(node_1.RpcContext.requireConnection()));
|
|
95
|
+
});
|
|
76
96
|
}
|
|
77
97
|
respondUi(sessionId, response) {
|
|
78
98
|
return this.on(sessionId, session => session.respondUi(response));
|
|
@@ -81,7 +101,7 @@ let TaServerImpl = class TaServerImpl {
|
|
|
81
101
|
return this.on(sessionId, session => session.claimClientTool(this.sessions.channel(node_1.RpcContext.requireConnection()), id));
|
|
82
102
|
}
|
|
83
103
|
respondClientTool(sessionId, result) {
|
|
84
|
-
return this.on(sessionId, session => session.respondClientTool(result));
|
|
104
|
+
return this.on(sessionId, session => session.respondClientTool(this.sessions.channel(node_1.RpcContext.requireConnection()), result));
|
|
85
105
|
}
|
|
86
106
|
prompt(sessionId, input) {
|
|
87
107
|
return this.on(sessionId, session => session.prompt(input));
|
|
@@ -264,17 +284,16 @@ let TaServerImpl = class TaServerImpl {
|
|
|
264
284
|
}
|
|
265
285
|
getCommands(sessionId) {
|
|
266
286
|
return this.on(sessionId, ({ pi }) => ({
|
|
267
|
-
commands:
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
...pi.resourceLoader
|
|
273
|
-
.getSkills()
|
|
274
|
-
.skills.map(s => ({ name: `skill:${s.name}`, description: s.description, source: 'skill', sourceInfo: s.sourceInfo })),
|
|
275
|
-
],
|
|
287
|
+
commands: slash_command_util_1.SlashCommandUtil.list({
|
|
288
|
+
commands: pi.extensionRunner.getRegisteredCommands(),
|
|
289
|
+
prompts: pi.promptTemplates,
|
|
290
|
+
skills: pi.resourceLoader.getSkills().skills,
|
|
291
|
+
}),
|
|
276
292
|
}));
|
|
277
293
|
}
|
|
294
|
+
getDirectoryCommands(cwd) {
|
|
295
|
+
return this.guard(async () => ({ commands: await this.factory.commands(cwd) }));
|
|
296
|
+
}
|
|
278
297
|
reload(sessionId) {
|
|
279
298
|
return this.on(sessionId, session => {
|
|
280
299
|
if (session.pi.isStreaming) {
|
|
@@ -284,7 +303,7 @@ let TaServerImpl = class TaServerImpl {
|
|
|
284
303
|
});
|
|
285
304
|
}
|
|
286
305
|
on(sessionId, command) {
|
|
287
|
-
return this.guard(async () => command(this.sessions.
|
|
306
|
+
return this.guard(async () => command(await this.sessions.resolve(sessionId)));
|
|
288
307
|
}
|
|
289
308
|
guard(command) {
|
|
290
309
|
return ta_errors_1.TaErrors.guard(command);
|
|
@@ -303,14 +322,14 @@ __decorate([
|
|
|
303
322
|
(0, core_1.Autowired)(working_directory_1.TaWorkingDirectory),
|
|
304
323
|
__metadata("design:type", Object)
|
|
305
324
|
], TaServerImpl.prototype, "workingDirectory", void 0);
|
|
306
|
-
__decorate([
|
|
307
|
-
(0, core_1.Autowired)(remote_protocol_1.RemoteHosts),
|
|
308
|
-
__metadata("design:type", Object)
|
|
309
|
-
], TaServerImpl.prototype, "remoteHosts", void 0);
|
|
310
325
|
__decorate([
|
|
311
326
|
(0, core_1.Autowired)(host_protocol_1.TaSessionCatalog),
|
|
312
327
|
__metadata("design:type", Object)
|
|
313
328
|
], TaServerImpl.prototype, "catalog", void 0);
|
|
329
|
+
__decorate([
|
|
330
|
+
(0, core_1.Autowired)(host_protocol_1.TaSessionFactory),
|
|
331
|
+
__metadata("design:type", Object)
|
|
332
|
+
], TaServerImpl.prototype, "factory", void 0);
|
|
314
333
|
exports.TaServerImpl = TaServerImpl = __decorate([
|
|
315
334
|
(0, rpc_1.Rpc)(ta_protocol_1.TaServer)
|
|
316
335
|
], TaServerImpl);
|