@celljs/ta-secrets 4.27.0 → 4.29.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/extension/index.mjs +34 -0
- package/host/index.mjs +2 -2
- package/package.json +3 -3
- package/web/index.js +8 -0
package/extension/index.mjs
CHANGED
|
@@ -464,6 +464,40 @@ var TaAgentSummary;
|
|
|
464
464
|
}
|
|
465
465
|
TaAgentSummary2.strip = strip;
|
|
466
466
|
})(TaAgentSummary || (TaAgentSummary = {}));
|
|
467
|
+
var TaPictureNote;
|
|
468
|
+
(function(TaPictureNote2) {
|
|
469
|
+
TaPictureNote2.OPEN = "<pictures>";
|
|
470
|
+
TaPictureNote2.CLOSE = "</pictures>";
|
|
471
|
+
const BLOCK = /[ \t]*<pictures>([\s\S]*?)(?:<\/pictures>|$)|<p(?:i(?:c(?:t(?:u(?:r(?:es?)?)?)?)?)?)?$/gi;
|
|
472
|
+
const ROW = /(?:^|\s)[-*]?\s*p(\d+)\s*[::]\s*/gi;
|
|
473
|
+
function take(text) {
|
|
474
|
+
const told = new Map;
|
|
475
|
+
if (!/<p/i.test(text)) {
|
|
476
|
+
return { said: text, told };
|
|
477
|
+
}
|
|
478
|
+
const said = text.replace(BLOCK, (_all, body) => {
|
|
479
|
+
const rows = [...(body !== null && body !== undefined ? body : "").matchAll(ROW)];
|
|
480
|
+
rows.forEach((row, index) => {
|
|
481
|
+
var _a;
|
|
482
|
+
var _b, _c;
|
|
483
|
+
const end = (_b = (_a = rows[index + 1]) === null || _a === undefined ? undefined : _a.index) !== null && _b !== undefined ? _b : body === null || body === undefined ? undefined : body.length;
|
|
484
|
+
const what = body === null || body === undefined ? undefined : body.slice(((_c = row.index) !== null && _c !== undefined ? _c : 0) + row[0].length, end).trim();
|
|
485
|
+
if (what) {
|
|
486
|
+
told.set(Number(row[1]), what);
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
return "";
|
|
490
|
+
});
|
|
491
|
+
return { said: said === text ? text : said.replace(/\n{3,}/g, `
|
|
492
|
+
|
|
493
|
+
`).trim(), told };
|
|
494
|
+
}
|
|
495
|
+
TaPictureNote2.take = take;
|
|
496
|
+
function strip(text) {
|
|
497
|
+
return take(text).said;
|
|
498
|
+
}
|
|
499
|
+
TaPictureNote2.strip = strip;
|
|
500
|
+
})(TaPictureNote || (TaPictureNote = {}));
|
|
467
501
|
var TaSkillUse;
|
|
468
502
|
(function(TaSkillUse2) {
|
|
469
503
|
const BLOCK = /^<skill name="([^"]+)" location="([^"]+)">\n([\s\S]*?)\n<\/skill>(?:\n\n([\s\S]+))?$/;
|
package/host/index.mjs
CHANGED
|
@@ -1050,7 +1050,7 @@ var VaultSync;
|
|
|
1050
1050
|
...kind === "sign-in" && signIn ? {
|
|
1051
1051
|
signIn: {
|
|
1052
1052
|
id: signIn.id,
|
|
1053
|
-
feature: signIn.feature === "bot" || signIn.feature === "relay" ? signIn.feature : "desktop",
|
|
1053
|
+
feature: signIn.feature === "bot" || signIn.feature === "relay" || signIn.feature === "store" ? signIn.feature : "desktop",
|
|
1054
1054
|
name: signIn.name,
|
|
1055
1055
|
...typeof signIn.user === "string" ? { user: signIn.user } : {}
|
|
1056
1056
|
}
|
|
@@ -1215,7 +1215,7 @@ class Vault {
|
|
|
1215
1215
|
hosts: [],
|
|
1216
1216
|
signIn: {
|
|
1217
1217
|
id,
|
|
1218
|
-
feature: about.feature === "bot" || about.feature === "relay" ? about.feature : "desktop",
|
|
1218
|
+
feature: about.feature === "bot" || about.feature === "relay" || about.feature === "store" ? about.feature : "desktop",
|
|
1219
1219
|
name: String(about.name).slice(0, 100),
|
|
1220
1220
|
...user
|
|
1221
1221
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@celljs/ta-secrets",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.29.0",
|
|
4
4
|
"description": "A pi package for Ta: a vault of secrets kept in the keychain, which Ta uses in commands by name without the model ever seeing them",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"watch": "tsc -b -w --preserveWatchOutput"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@celljs/ta-protocol": "4.
|
|
31
|
-
"@celljs/ta-web": "4.
|
|
30
|
+
"@celljs/ta-protocol": "4.29.0",
|
|
31
|
+
"@celljs/ta-web": "4.29.0",
|
|
32
32
|
"@types/react": "^19.3.0"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
package/web/index.js
CHANGED
|
@@ -57,6 +57,7 @@ var EN = {
|
|
|
57
57
|
kindPersonal: "Personal detail",
|
|
58
58
|
kindDesktop: "Remote desktop {name}",
|
|
59
59
|
kindRelay: "Operator of the relay {name}",
|
|
60
|
+
kindStore: "Sync store {name}",
|
|
60
61
|
kindBotWeixin: "WeChat bot",
|
|
61
62
|
kindBotWecom: "WeCom bot",
|
|
62
63
|
groupSignIns: "Sign-ins",
|
|
@@ -108,6 +109,7 @@ var ZH = {
|
|
|
108
109
|
kindPersonal: "个人信息",
|
|
109
110
|
kindDesktop: "远程桌面 {name}",
|
|
110
111
|
kindRelay: "中继运营 {name}",
|
|
112
|
+
kindStore: "同步存储 {name}",
|
|
111
113
|
kindBotWeixin: "微信机器人",
|
|
112
114
|
kindBotWecom: "企业微信机器人",
|
|
113
115
|
groupSignIns: "登录",
|
|
@@ -159,6 +161,7 @@ var ZH_TW = {
|
|
|
159
161
|
kindPersonal: "個人資訊",
|
|
160
162
|
kindDesktop: "遠端桌面 {name}",
|
|
161
163
|
kindRelay: "中繼營運 {name}",
|
|
164
|
+
kindStore: "同步儲存 {name}",
|
|
162
165
|
kindBotWeixin: "微信機器人",
|
|
163
166
|
kindBotWecom: "企業微信機器人",
|
|
164
167
|
groupSignIns: "登入",
|
|
@@ -210,6 +213,7 @@ var JA = {
|
|
|
210
213
|
kindPersonal: "個人情報",
|
|
211
214
|
kindDesktop: "リモートデスクトップ {name}",
|
|
212
215
|
kindRelay: "リレーの運営 {name}",
|
|
216
|
+
kindStore: "同期の保存先 {name}",
|
|
213
217
|
kindBotWeixin: "WeChat ボット",
|
|
214
218
|
kindBotWecom: "WeCom ボット",
|
|
215
219
|
groupSignIns: "サインイン",
|
|
@@ -427,6 +431,9 @@ function signInWords(words, entry) {
|
|
|
427
431
|
if (signIn.feature === "relay") {
|
|
428
432
|
return SecretsWords.format(words.kindRelay, { name: signIn.name });
|
|
429
433
|
}
|
|
434
|
+
if (signIn.feature === "store") {
|
|
435
|
+
return SecretsWords.format(words.kindStore, { name: signIn.name });
|
|
436
|
+
}
|
|
430
437
|
if (signIn.feature === "bot") {
|
|
431
438
|
return signIn.name.startsWith("weixin:") ? words.kindBotWeixin : words.kindBotWecom;
|
|
432
439
|
}
|
|
@@ -605,6 +612,7 @@ function vaultSettings(pi) {
|
|
|
605
612
|
title: () => words().settingsTitle,
|
|
606
613
|
icon: pi.ui.icons.KeyRound,
|
|
607
614
|
group: "privacy",
|
|
615
|
+
order: -10,
|
|
608
616
|
rows: [
|
|
609
617
|
{ key: "capture", label: () => words().captureLabel, description: () => words().captureHint, render: () => /* @__PURE__ */ React.createElement(CaptureSetting, {
|
|
610
618
|
pi
|