@celljs/ta-dash 4.43.0 → 4.45.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/host/index.mjs +103 -0
- package/package.json +4 -4
package/host/index.mjs
CHANGED
|
@@ -329,6 +329,49 @@ var TaAgentToolUtil;
|
|
|
329
329
|
return Object.fromEntries(Object.entries(input).filter(([key]) => !UNSHOWN.has(key)));
|
|
330
330
|
}
|
|
331
331
|
TaAgentToolUtil2.shownInput = shownInput;
|
|
332
|
+
function target(kind, input) {
|
|
333
|
+
var _a;
|
|
334
|
+
return (_a = byKind(kind, input)) !== null && _a !== undefined ? _a : TARGET_KEYS.map((key) => text(input[key])).find(Boolean);
|
|
335
|
+
}
|
|
336
|
+
TaAgentToolUtil2.target = target;
|
|
337
|
+
const TARGET_KEYS = [
|
|
338
|
+
"description",
|
|
339
|
+
"subject",
|
|
340
|
+
"summary",
|
|
341
|
+
"skill",
|
|
342
|
+
"image_path",
|
|
343
|
+
"file_path",
|
|
344
|
+
"filePath",
|
|
345
|
+
"path",
|
|
346
|
+
"url",
|
|
347
|
+
"query",
|
|
348
|
+
"recipient",
|
|
349
|
+
"prompt",
|
|
350
|
+
"task_id",
|
|
351
|
+
"id",
|
|
352
|
+
"toolName",
|
|
353
|
+
"message"
|
|
354
|
+
];
|
|
355
|
+
function byKind(kind, input) {
|
|
356
|
+
var _a, _b, _c, _d;
|
|
357
|
+
switch (kind) {
|
|
358
|
+
case "execute":
|
|
359
|
+
return text(input.command);
|
|
360
|
+
case "read":
|
|
361
|
+
case "edit":
|
|
362
|
+
case "delete":
|
|
363
|
+
case "move":
|
|
364
|
+
return (_b = (_a = text(input.file_path)) !== null && _a !== undefined ? _a : text(input.path)) !== null && _b !== undefined ? _b : text(input.filePath);
|
|
365
|
+
case "search":
|
|
366
|
+
return (_c = text(input.pattern)) !== null && _c !== undefined ? _c : text(input.query);
|
|
367
|
+
case "fetch":
|
|
368
|
+
return (_d = text(input.url)) !== null && _d !== undefined ? _d : text(input.query);
|
|
369
|
+
}
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
function text(value) {
|
|
373
|
+
return typeof value === "string" && value.trim() ? value.trim() : undefined;
|
|
374
|
+
}
|
|
332
375
|
function shownDetails(details) {
|
|
333
376
|
const input = details === null || details === undefined ? undefined : details.input;
|
|
334
377
|
if (!input || typeof input !== "object") {
|
|
@@ -991,6 +1034,11 @@ var TaCallSceneUtil;
|
|
|
991
1034
|
var MOVES = 40;
|
|
992
1035
|
// ../ta-protocol/esm/common/cloud-protocol.js
|
|
993
1036
|
var TaCloudServer = Symbol("TaCloudServer");
|
|
1037
|
+
var TaCloudTools;
|
|
1038
|
+
(function(TaCloudTools2) {
|
|
1039
|
+
TaCloudTools2.DIR = ".ta/tools";
|
|
1040
|
+
TaCloudTools2.BIN = `${TaCloudTools2.DIR}/bin`;
|
|
1041
|
+
})(TaCloudTools || (TaCloudTools = {}));
|
|
994
1042
|
var PATTERN = /^(\*|(\*\.)?[a-z0-9_]([a-z0-9_-]*[a-z0-9_])?(\.[a-z0-9_]([a-z0-9_-]*[a-z0-9_])?)*)(:(\d{1,5}|\*))?$/;
|
|
995
1043
|
var PORTS = [80, 443];
|
|
996
1044
|
var TaEgressHosts;
|
|
@@ -1070,6 +1118,61 @@ var TaEgressHosts;
|
|
|
1070
1118
|
}
|
|
1071
1119
|
TaEgressHosts2.refusal = refusal;
|
|
1072
1120
|
})(TaEgressHosts || (TaEgressHosts = {}));
|
|
1121
|
+
// ../ta-protocol/esm/common/command-prelude.js
|
|
1122
|
+
var CommandPrelude;
|
|
1123
|
+
(function(CommandPrelude2) {
|
|
1124
|
+
function quote(value) {
|
|
1125
|
+
return `'${value.replace(/'/g, `'\\''`)}'`;
|
|
1126
|
+
}
|
|
1127
|
+
CommandPrelude2.quote = quote;
|
|
1128
|
+
function usesGit(command) {
|
|
1129
|
+
return /(^|[\s;&|(`])git\s+-?[A-Za-z]/.test(command);
|
|
1130
|
+
}
|
|
1131
|
+
CommandPrelude2.usesGit = usesGit;
|
|
1132
|
+
function usesSsh(command) {
|
|
1133
|
+
return /(^|[\s;&|(`/])(ssh|scp|sftp|rsync|git)(\s|$)/.test(command);
|
|
1134
|
+
}
|
|
1135
|
+
CommandPrelude2.usesSsh = usesSsh;
|
|
1136
|
+
function gitHelper(name, user) {
|
|
1137
|
+
return `!f() { test "$1" = get || return 0; printf 'username=%s\\npassword=%s\\n' ${quote(user)} "$TA_SECRET_${name}"; }; f`;
|
|
1138
|
+
}
|
|
1139
|
+
CommandPrelude2.gitHelper = gitHelper;
|
|
1140
|
+
function script(parts) {
|
|
1141
|
+
const lines = [];
|
|
1142
|
+
for (const [name, value] of parts.env) {
|
|
1143
|
+
lines.push(`export TA_SECRET_${name}=${quote(value)}`);
|
|
1144
|
+
}
|
|
1145
|
+
if (parts.git.length) {
|
|
1146
|
+
lines.push("ta_git=${GIT_CONFIG_COUNT:-0}");
|
|
1147
|
+
const config = (key, value) => {
|
|
1148
|
+
lines.push(`export "GIT_CONFIG_KEY_$ta_git"=${quote(key)} "GIT_CONFIG_VALUE_$ta_git"=${quote(value)}`, "ta_git=$((ta_git + 1))");
|
|
1149
|
+
};
|
|
1150
|
+
for (const one of parts.git) {
|
|
1151
|
+
const key = `credential.https://${one.host}.helper`;
|
|
1152
|
+
config(key, "");
|
|
1153
|
+
config(key, gitHelper(one.name, one.user));
|
|
1154
|
+
}
|
|
1155
|
+
lines.push("export GIT_CONFIG_COUNT=$ta_git GIT_TERMINAL_PROMPT=0", "unset ta_git");
|
|
1156
|
+
}
|
|
1157
|
+
if (parts.proxy) {
|
|
1158
|
+
const url = quote(parts.proxy.url);
|
|
1159
|
+
const bundle = quote(parts.proxy.bundle);
|
|
1160
|
+
lines.push(`export HTTPS_PROXY=${url} https_proxy=${url} HTTP_PROXY=${url} http_proxy=${url} NODE_USE_ENV_PROXY=1`, "export NO_PROXY='localhost,127.0.0.1,::1' no_proxy='localhost,127.0.0.1,::1'", `export SSL_CERT_FILE=${bundle} CURL_CA_BUNDLE=${bundle} REQUESTS_CA_BUNDLE=${bundle} NODE_EXTRA_CA_CERTS=${bundle} GIT_SSL_CAINFO=${bundle} DENO_CERT=${bundle}`, "unset ALL_PROXY all_proxy");
|
|
1161
|
+
}
|
|
1162
|
+
if (parts.keys.length) {
|
|
1163
|
+
lines.push('eval "$(ssh-agent -s -t 1800)" >/dev/null');
|
|
1164
|
+
for (const key of parts.keys) {
|
|
1165
|
+
lines.push(`ssh-add -q ${quote(key)} </dev/null >/dev/null 2>&1`);
|
|
1166
|
+
}
|
|
1167
|
+
lines.push("trap 'ssh-agent -k >/dev/null 2>&1' EXIT");
|
|
1168
|
+
}
|
|
1169
|
+
lines.push("true");
|
|
1170
|
+
return `${lines.join(`
|
|
1171
|
+
`)}
|
|
1172
|
+
`;
|
|
1173
|
+
}
|
|
1174
|
+
CommandPrelude2.script = script;
|
|
1175
|
+
})(CommandPrelude || (CommandPrelude = {}));
|
|
1073
1176
|
// ../ta-protocol/esm/common/confine-protocol.js
|
|
1074
1177
|
var TA_CONFINED_MARK = "[ta:confined]";
|
|
1075
1178
|
var AT = String.raw`(?:^|[;&|(\`]|\$\()\s*(?:sudo\s+|env\s+(?:\S+=\S*\s+)*|npx\s+|bunx\s+|pnpm\s+(?:exec|dlx)\s+|yarn\s+dlx\s+|exec\s+|xargs\s+(?:-\S+\s+)*)*`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-dash",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.45.0",
|
|
4
4
|
"description": "A pi package for Ta: dashboards of replies whose numbers come from queries run on the user's computer, kept current, each showing the query behind it",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@celljs/core": "4.
|
|
31
|
-
"@celljs/ta-protocol": "4.
|
|
32
|
-
"@celljs/ta-web": "4.
|
|
30
|
+
"@celljs/core": "4.45.0",
|
|
31
|
+
"@celljs/ta-protocol": "4.45.0",
|
|
32
|
+
"@celljs/ta-web": "4.45.0",
|
|
33
33
|
"@types/node": "^24.0.0",
|
|
34
34
|
"@types/react": "^19.3.3"
|
|
35
35
|
},
|