privateer-agent 0.15.4 → 0.15.6
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.md +11 -0
- package/bin/boot-bundle.d.mts +2 -0
- package/bin/boot-bundle.mjs +44 -0
- package/bin/fresh-supervisor.d.mts +5 -1
- package/bin/fresh-supervisor.mjs +47 -10
- package/bin/privateer-launch.mjs +27 -3
- package/bin/privateer-subagent.mjs +5 -2
- package/bin/privateer-verify.mjs +12 -0
- package/bin/session-recovery.d.mts +53 -0
- package/bin/session-recovery.mjs +240 -0
- package/bin/session-seal-preload.mjs +17 -0
- package/bin/session-seal.d.mts +25 -0
- package/bin/session-seal.mjs +242 -0
- package/dist-boot/boot.mjs +3 -0
- package/dist-boot/c-27JKSMWL.mjs +1460 -0
- package/dist-boot/c-2BMRFV24.mjs +269 -0
- package/dist-boot/c-2CTF6JA3.mjs +166 -0
- package/dist-boot/c-2G3BBHRJ.mjs +84 -0
- package/dist-boot/c-2IDLKXX6.mjs +250 -0
- package/dist-boot/c-2NJD5VYM.mjs +8 -0
- package/dist-boot/c-2S5EEQPW.mjs +1602 -0
- package/dist-boot/c-2WRDCUVI.mjs +25 -0
- package/dist-boot/c-2YN3M256.mjs +14 -0
- package/dist-boot/c-37GM3GMU.mjs +187 -0
- package/dist-boot/c-3STKRSVO.mjs +2480 -0
- package/dist-boot/c-3TPV6TQQ.mjs +2320 -0
- package/dist-boot/c-3UVHLQDJ.mjs +225 -0
- package/dist-boot/c-42PUUZYC.mjs +697 -0
- package/dist-boot/c-4D5UMWVW.mjs +683 -0
- package/dist-boot/c-4ETZRMTA.mjs +46 -0
- package/dist-boot/c-4QT25BD5.mjs +1482 -0
- package/dist-boot/c-4WVR32AP.mjs +2579 -0
- package/dist-boot/c-5EMM567G.mjs +152 -0
- package/dist-boot/c-5FA4CV63.mjs +145 -0
- package/dist-boot/c-5GV3X3RB.mjs +14 -0
- package/dist-boot/c-5JCEPRIY.mjs +52 -0
- package/dist-boot/c-5NDKIIWT.mjs +16 -0
- package/dist-boot/c-5QL3AR26.mjs +4665 -0
- package/dist-boot/c-5XY6MFKN.mjs +5142 -0
- package/dist-boot/c-65UZIZC7.mjs +2897 -0
- package/dist-boot/c-6FUXKHOK.mjs +1969 -0
- package/dist-boot/c-6JHWQE4V.mjs +18242 -0
- package/dist-boot/c-6LOBR4I6.mjs +5280 -0
- package/dist-boot/c-6QHOZXKQ.mjs +14394 -0
- package/dist-boot/c-6ZO2SADQ.mjs +178 -0
- package/dist-boot/c-6ZORVVZP.mjs +1449 -0
- package/dist-boot/c-76QH4UCP.mjs +2441 -0
- package/dist-boot/c-77GO5L5Y.mjs +20982 -0
- package/dist-boot/c-7M23XFTN.mjs +5052 -0
- package/dist-boot/c-7TC367E2.mjs +32 -0
- package/dist-boot/c-7UOG7POX.mjs +1524 -0
- package/dist-boot/c-7VHP3FLN.mjs +376 -0
- package/dist-boot/c-A73JHZP2.mjs +13207 -0
- package/dist-boot/c-ABXULAFL.mjs +71 -0
- package/dist-boot/c-ANDD2AQO.mjs +74 -0
- package/dist-boot/c-AOY77AZL.mjs +1430 -0
- package/dist-boot/c-AXEPZ22I.mjs +108 -0
- package/dist-boot/c-B2Y7VNHU.mjs +427 -0
- package/dist-boot/c-B7VJUH73.mjs +77 -0
- package/dist-boot/c-BFW6CDVL.mjs +24 -0
- package/dist-boot/c-BHNIF2AR.mjs +188 -0
- package/dist-boot/c-BKF2O6BL.mjs +23 -0
- package/dist-boot/c-BOZXFTZN.mjs +8 -0
- package/dist-boot/c-BRNYJWZL.mjs +28 -0
- package/dist-boot/c-C3N4Z2HO.mjs +93 -0
- package/dist-boot/c-C4IV7ZFG.mjs +717 -0
- package/dist-boot/c-C5NK6UYV.mjs +793 -0
- package/dist-boot/c-C67644MB.mjs +1659 -0
- package/dist-boot/c-C6S2YB53.mjs +620 -0
- package/dist-boot/c-CDBEJSBF.mjs +37 -0
- package/dist-boot/c-CG47HBKU.mjs +435 -0
- package/dist-boot/c-CKCTWCT5.mjs +51 -0
- package/dist-boot/c-CN77DCGF.mjs +60 -0
- package/dist-boot/c-CRBXNKFO.mjs +1795 -0
- package/dist-boot/c-CRIHASQ6.mjs +973 -0
- package/dist-boot/c-CU4NGAUO.mjs +3786 -0
- package/dist-boot/c-CWRFLGQU.mjs +1883 -0
- package/dist-boot/c-CYQB2USO.mjs +32 -0
- package/dist-boot/c-DEE67DJO.mjs +379 -0
- package/dist-boot/c-DIFDBYOP.mjs +1258 -0
- package/dist-boot/c-DOSGVXDZ.mjs +34879 -0
- package/dist-boot/c-DR7XQI32.mjs +381 -0
- package/dist-boot/c-DTGPSB46.mjs +14666 -0
- package/dist-boot/c-DTHDNA4P.mjs +320 -0
- package/dist-boot/c-E4Z3Y5B5.mjs +3864 -0
- package/dist-boot/c-E66Z2TI7.mjs +203 -0
- package/dist-boot/c-EBU6RLRV.mjs +1527 -0
- package/dist-boot/c-EBZZNGSF.mjs +432 -0
- package/dist-boot/c-EC3LJ2KF.mjs +1032 -0
- package/dist-boot/c-EQBKXWNX.mjs +15829 -0
- package/dist-boot/c-EUEPIW4S.mjs +574 -0
- package/dist-boot/c-EX4YVWAT.mjs +378 -0
- package/dist-boot/c-EYZGSAJU.mjs +98 -0
- package/dist-boot/c-F75VRKY4.mjs +172 -0
- package/dist-boot/c-FH4NXKHV.mjs +177 -0
- package/dist-boot/c-FHNUCTEM.mjs +140 -0
- package/dist-boot/c-FJ5T42DS.mjs +5349 -0
- package/dist-boot/c-FPCNRL7G.mjs +1728 -0
- package/dist-boot/c-G4DLN7Q4.mjs +8 -0
- package/dist-boot/c-G56GYQFZ.mjs +2507 -0
- package/dist-boot/c-GLIOERDQ.mjs +1200 -0
- package/dist-boot/c-GMJ5HUBM.mjs +14 -0
- package/dist-boot/c-H3HSGMAQ.mjs +461 -0
- package/dist-boot/c-HIKTO6P7.mjs +275 -0
- package/dist-boot/c-I2MCJ34O.mjs +464 -0
- package/dist-boot/c-I3C6LBW4.mjs +765 -0
- package/dist-boot/c-I54OKQHW.mjs +387 -0
- package/dist-boot/c-IFSP3R4D.mjs +80 -0
- package/dist-boot/c-IZK77VB7.mjs +171 -0
- package/dist-boot/c-J3Y25UGE.mjs +54 -0
- package/dist-boot/c-J5IESS7W.mjs +27750 -0
- package/dist-boot/c-JJWZBY7L.mjs +254 -0
- package/dist-boot/c-JKTFXTGF.mjs +463 -0
- package/dist-boot/c-JN57AXQ4.mjs +77 -0
- package/dist-boot/c-KFIO6LUW.mjs +1096 -0
- package/dist-boot/c-KIEMEFWW.mjs +478 -0
- package/dist-boot/c-KIVXWBYD.mjs +28 -0
- package/dist-boot/c-KP6CRIP4.mjs +580 -0
- package/dist-boot/c-L26VOJX4.mjs +11558 -0
- package/dist-boot/c-L5GHWG5G.mjs +5988 -0
- package/dist-boot/c-M7NSQAKK.mjs +353 -0
- package/dist-boot/c-MCEWOPBW.mjs +56 -0
- package/dist-boot/c-MGPIEG7I.mjs +20 -0
- package/dist-boot/c-NREXJV3M.mjs +393 -0
- package/dist-boot/c-O5PP6CTX.mjs +162 -0
- package/dist-boot/c-OBQDHSXM.mjs +1774 -0
- package/dist-boot/c-OLQHHDD4.mjs +21 -0
- package/dist-boot/c-OXW4JQQH.mjs +319 -0
- package/dist-boot/c-P3D7ZUWN.mjs +1288 -0
- package/dist-boot/c-P4PQZVV5.mjs +948 -0
- package/dist-boot/c-P63T3XL2.mjs +26373 -0
- package/dist-boot/c-P6N5DQGZ.mjs +194 -0
- package/dist-boot/c-P7MLKQFC.mjs +58 -0
- package/dist-boot/c-PB3PZJL5.mjs +1276 -0
- package/dist-boot/c-PTN4S6G2.mjs +1259 -0
- package/dist-boot/c-PYCE5J7U.mjs +1083 -0
- package/dist-boot/c-Q4HYCRLB.mjs +19410 -0
- package/dist-boot/c-QUXMETGG.mjs +68 -0
- package/dist-boot/c-RDMJZCOX.mjs +356 -0
- package/dist-boot/c-ROGJK76M.mjs +17 -0
- package/dist-boot/c-RQJJ26T4.mjs +708 -0
- package/dist-boot/c-RSKCUPJF.mjs +7559 -0
- package/dist-boot/c-RVJU4O6P.mjs +37 -0
- package/dist-boot/c-S2RVHR3M.mjs +165 -0
- package/dist-boot/c-SKMK3PEE.mjs +91120 -0
- package/dist-boot/c-TI7SM4EG.mjs +20 -0
- package/dist-boot/c-TILJ6GXD.mjs +1235 -0
- package/dist-boot/c-TT6BCUJD.mjs +114 -0
- package/dist-boot/c-U4ITOXAN.mjs +2107 -0
- package/dist-boot/c-UGERXVO2.mjs +7120 -0
- package/dist-boot/c-UPBH5AXY.mjs +1363 -0
- package/dist-boot/c-US2PUNZL.mjs +597 -0
- package/dist-boot/c-UU4WZPPE.mjs +20 -0
- package/dist-boot/c-UWVIYPQS.mjs +39 -0
- package/dist-boot/c-V4RHQBPQ.mjs +17683 -0
- package/dist-boot/c-V5MRVK47.mjs +351 -0
- package/dist-boot/c-V6CL266R.mjs +1755 -0
- package/dist-boot/c-VJTMFKYE.mjs +14975 -0
- package/dist-boot/c-VJTRUKIB.mjs +773 -0
- package/dist-boot/c-W4IFSHPW.mjs +43 -0
- package/dist-boot/c-WETGB2CF.mjs +113 -0
- package/dist-boot/c-WO3QSZUU.mjs +1337 -0
- package/dist-boot/c-WQLH73TY.mjs +242 -0
- package/dist-boot/c-XL735JW5.mjs +500 -0
- package/dist-boot/c-Y7HADL5B.mjs +1107 -0
- package/dist-boot/c-YGQHSVSK.mjs +41 -0
- package/dist-boot/c-YMP2AMEB.mjs +10350 -0
- package/dist-boot/c-YRDO2WEF.mjs +12012 -0
- package/dist-boot/c-YUSTRATJ.mjs +8 -0
- package/dist-boot/c-Z2262R22.mjs +2697 -0
- package/dist-boot/c-Z4ALQMJC.mjs +709 -0
- package/dist-boot/c-Z5ZUQVUY.mjs +62 -0
- package/dist-boot/c-ZDZUKXF7.mjs +874 -0
- package/dist-boot/c-ZJYLGIC3.mjs +32 -0
- package/dist-boot/c-ZNA5CDMI.mjs +77 -0
- package/dist-boot/c-ZSO6DI3M.mjs +204 -0
- package/dist-boot/c-ZWUVHKMK.mjs +100 -0
- package/dist-boot/c-ZY4MESEW.mjs +832 -0
- package/dist-boot/c-ZZ5REI4L.mjs +329 -0
- package/dist-boot/cli.mjs +51 -0
- package/dist-boot/ext-anthropic-attribution.mjs +207 -0
- package/dist-boot/ext-pi-background-tasks.mjs +7234 -0
- package/dist-boot/ext-pi-subagents.mjs +37 -0
- package/dist-boot/ext-privateer-account.mjs +4426 -0
- package/dist-boot/ext-privateer-brand.mjs +5274 -0
- package/dist-boot/ext-privateer-codemode.mjs +37 -0
- package/dist-boot/ext-privateer-computer.mjs +626 -0
- package/dist-boot/ext-privateer-connect.mjs +1862 -0
- package/dist-boot/ext-privateer-context.mjs +323 -0
- package/dist-boot/ext-privateer-desktop.mjs +92 -0
- package/dist-boot/ext-privateer-final-audit.mjs +48 -0
- package/dist-boot/ext-privateer-fresh.mjs +81 -0
- package/dist-boot/ext-privateer-gate.mjs +5959 -0
- package/dist-boot/ext-privateer-hints.mjs +236 -0
- package/dist-boot/ext-privateer-media.mjs +2626 -0
- package/dist-boot/ext-privateer-models.mjs +3397 -0
- package/dist-boot/ext-privateer-posture.mjs +3006 -0
- package/dist-boot/ext-privateer-privacy.mjs +4578 -0
- package/dist-boot/ext-privateer-recovery.mjs +287 -0
- package/dist-boot/ext-privateer-speak.mjs +4754 -0
- package/dist-boot/ext-privateer-terminals.mjs +725 -0
- package/dist-boot/ext-privateer-tools.mjs +528 -0
- package/dist-boot/ext-privateer-truncation.mjs +74 -0
- package/dist-boot/ext-privateer-update.mjs +210 -0
- package/dist-boot/ext-privateer-vision.mjs +148 -0
- package/dist-boot/ext-privateer-web.mjs +543 -0
- package/dist-boot/ext-rpiv-ask-user-question.mjs +710 -0
- package/dist-boot/manifest.json +9 -0
- package/extensions/privateer-brand.ts +3 -1
- package/extensions/privateer-context.ts +4 -2
- package/extensions/privateer-final-audit.ts +17 -0
- package/extensions/privateer-gate.ts +55 -9
- package/extensions/privateer-recovery.ts +175 -0
- package/extensions/privateer-web.ts +4 -4
- package/package.json +3 -1
- package/patches/@earendil-works+pi-coding-agent+1.3.0.patch +199 -2
- package/patches/pi-background-tasks+2.6.10.patch +91 -7
- package/src/cli/chat.ts +7 -1
- package/src/config/moatManifest.json +2 -0
- package/src/config/whatsNew.json +4 -4
- package/src/context.ts +33 -5
- package/src/engine/finalAudit.ts +38 -0
- package/src/engine/stallWatchdog.ts +8 -1
- package/src/providers/account.ts +34 -3
- package/src/remote/attentionPush.ts +40 -0
- package/src/remote/liveTaskSession.ts +7 -1
- package/src/remote/relayClient.ts +38 -4
- package/src/remote/remoteBridge.ts +17 -0
- package/src/remote/transcriptSnapshot.ts +104 -0
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import{createRequire as __pvCR}from"node:module";import{fileURLToPath as __pvF}from"node:url";import{dirname as __pvD}from"node:path";const require=__pvCR(import.meta.url);const __pvUrl=(r)=>new URL(r,import.meta.url).href;const __pvFile=(r)=>__pvF(new URL(r,import.meta.url));
|
|
2
|
+
import {
|
|
3
|
+
typebox_exports
|
|
4
|
+
} from "./c-RQJJ26T4.mjs";
|
|
5
|
+
import {
|
|
6
|
+
__name
|
|
7
|
+
} from "./c-CN77DCGF.mjs";
|
|
8
|
+
|
|
9
|
+
// node_modules/@juicesharp/rpiv-config/config.ts?ext=rpiv-ask-user-question
|
|
10
|
+
import { chmodSync, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
11
|
+
import { homedir } from "node:os";
|
|
12
|
+
import { dirname, isAbsolute, join } from "node:path";
|
|
13
|
+
function expandTilde(p) {
|
|
14
|
+
if (p === "~") return homedir();
|
|
15
|
+
if (p.startsWith("~/")) return join(homedir(), p.slice(2));
|
|
16
|
+
return p;
|
|
17
|
+
}
|
|
18
|
+
__name(expandTilde, "expandTilde");
|
|
19
|
+
function defaultConfigDir() {
|
|
20
|
+
return join(homedir(), ".config");
|
|
21
|
+
}
|
|
22
|
+
__name(defaultConfigDir, "defaultConfigDir");
|
|
23
|
+
function resolveConfigDir() {
|
|
24
|
+
const xdg = readEnvVar("XDG_CONFIG_HOME");
|
|
25
|
+
if (!xdg) return defaultConfigDir();
|
|
26
|
+
const expanded = expandTilde(xdg);
|
|
27
|
+
return isAbsolute(expanded) ? expanded : defaultConfigDir();
|
|
28
|
+
}
|
|
29
|
+
__name(resolveConfigDir, "resolveConfigDir");
|
|
30
|
+
function legacyConfigPath(name, file = "config.json") {
|
|
31
|
+
return join(defaultConfigDir(), name, file);
|
|
32
|
+
}
|
|
33
|
+
__name(legacyConfigPath, "legacyConfigPath");
|
|
34
|
+
function configPath(name, file = "config.json") {
|
|
35
|
+
return join(resolveConfigDir(), name, file);
|
|
36
|
+
}
|
|
37
|
+
__name(configPath, "configPath");
|
|
38
|
+
function loadJsonConfig(path) {
|
|
39
|
+
if (!existsSync(path)) return {};
|
|
40
|
+
try {
|
|
41
|
+
const parsed = JSON.parse(readFileSync(path, "utf-8"));
|
|
42
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) return {};
|
|
43
|
+
return parsed;
|
|
44
|
+
} catch (err) {
|
|
45
|
+
console.warn(`rpiv-config: invalid JSON at ${path}, using default ({}) \u2014 ${err.message}`);
|
|
46
|
+
return {};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
__name(loadJsonConfig, "loadJsonConfig");
|
|
50
|
+
function loadJsonConfigWithLegacyFallback(name, file = "config.json") {
|
|
51
|
+
const xdgPath = configPath(name, file);
|
|
52
|
+
if (existsSync(xdgPath)) {
|
|
53
|
+
return loadJsonConfig(xdgPath);
|
|
54
|
+
}
|
|
55
|
+
return loadJsonConfig(legacyConfigPath(name, file));
|
|
56
|
+
}
|
|
57
|
+
__name(loadJsonConfigWithLegacyFallback, "loadJsonConfigWithLegacyFallback");
|
|
58
|
+
var GuidanceFieldsSchema = typebox_exports.Object(
|
|
59
|
+
{
|
|
60
|
+
promptSnippet: typebox_exports.Optional(typebox_exports.String()),
|
|
61
|
+
promptGuidelines: typebox_exports.Optional(typebox_exports.Array(typebox_exports.String())),
|
|
62
|
+
description: typebox_exports.Optional(typebox_exports.String())
|
|
63
|
+
},
|
|
64
|
+
{ additionalProperties: true }
|
|
65
|
+
);
|
|
66
|
+
function validateGuidanceFields(fields) {
|
|
67
|
+
if (!fields || typeof fields !== "object") return {};
|
|
68
|
+
const g = fields;
|
|
69
|
+
const result = {};
|
|
70
|
+
if (typeof g.promptSnippet === "string" && g.promptSnippet.length > 0) {
|
|
71
|
+
result.promptSnippet = g.promptSnippet;
|
|
72
|
+
}
|
|
73
|
+
if (Array.isArray(g.promptGuidelines) && g.promptGuidelines.length > 0 && g.promptGuidelines.every((s) => typeof s === "string" && s.length > 0)) {
|
|
74
|
+
result.promptGuidelines = g.promptGuidelines;
|
|
75
|
+
}
|
|
76
|
+
if (typeof g.description === "string" && g.description.length > 0) {
|
|
77
|
+
result.description = g.description;
|
|
78
|
+
}
|
|
79
|
+
return result;
|
|
80
|
+
}
|
|
81
|
+
__name(validateGuidanceFields, "validateGuidanceFields");
|
|
82
|
+
function readEnvVar(key, fallback) {
|
|
83
|
+
return process.env[key]?.trim() || fallback;
|
|
84
|
+
}
|
|
85
|
+
__name(readEnvVar, "readEnvVar");
|
|
86
|
+
|
|
87
|
+
// node_modules/@juicesharp/rpiv-ask-user-question/config.ts?ext=rpiv-ask-user-question
|
|
88
|
+
var DEFAULT_COLLAPSE_KEY = "ctrl+]";
|
|
89
|
+
var COLLAPSE_KEY_OFF = "off";
|
|
90
|
+
var SPECIAL_KEYS = /* @__PURE__ */ new Set([
|
|
91
|
+
"escape",
|
|
92
|
+
"esc",
|
|
93
|
+
"enter",
|
|
94
|
+
"return",
|
|
95
|
+
"tab",
|
|
96
|
+
"space",
|
|
97
|
+
"backspace",
|
|
98
|
+
"delete",
|
|
99
|
+
"insert",
|
|
100
|
+
"clear",
|
|
101
|
+
"home",
|
|
102
|
+
"end",
|
|
103
|
+
"pageup",
|
|
104
|
+
"pagedown",
|
|
105
|
+
"up",
|
|
106
|
+
"down",
|
|
107
|
+
"left",
|
|
108
|
+
"right",
|
|
109
|
+
...Array.from({ length: 12 }, (_, i) => `f${i + 1}`)
|
|
110
|
+
]);
|
|
111
|
+
var MODIFIERS = /* @__PURE__ */ new Set(["ctrl", "shift", "alt", "super"]);
|
|
112
|
+
function isValidCollapseKeySpec(spec) {
|
|
113
|
+
if (!spec) return false;
|
|
114
|
+
if (spec.startsWith("+") || spec.endsWith("+") || spec.includes("++")) return false;
|
|
115
|
+
const parts = spec.split("+");
|
|
116
|
+
const base = parts[parts.length - 1] ?? "";
|
|
117
|
+
const modifiers = parts.slice(0, -1);
|
|
118
|
+
if (modifiers.length !== new Set(modifiers).size) return false;
|
|
119
|
+
if (!modifiers.every((m) => MODIFIERS.has(m))) return false;
|
|
120
|
+
return base.length === 1 ? /[a-z0-9_\-!@#$%^&*()|~`'":;,./<>?[\]{}=\\]/.test(base) : SPECIAL_KEYS.has(base);
|
|
121
|
+
}
|
|
122
|
+
__name(isValidCollapseKeySpec, "isValidCollapseKeySpec");
|
|
123
|
+
function resolveCollapseKey(config) {
|
|
124
|
+
const raw = config.collapseKey?.trim().toLowerCase();
|
|
125
|
+
if (raw === void 0 || raw === "") return DEFAULT_COLLAPSE_KEY;
|
|
126
|
+
if (raw === COLLAPSE_KEY_OFF) return COLLAPSE_KEY_OFF;
|
|
127
|
+
return isValidCollapseKeySpec(raw) ? raw : DEFAULT_COLLAPSE_KEY;
|
|
128
|
+
}
|
|
129
|
+
__name(resolveCollapseKey, "resolveCollapseKey");
|
|
130
|
+
var COMPOUND_KEY_DISPLAY = {
|
|
131
|
+
pageup: "PageUp",
|
|
132
|
+
pagedown: "PageDown"
|
|
133
|
+
};
|
|
134
|
+
function formatKeySpecForDisplay(spec) {
|
|
135
|
+
return spec.split("+").map(
|
|
136
|
+
(part) => COMPOUND_KEY_DISPLAY[part] ?? (part.length <= 1 ? part.toUpperCase() : part.charAt(0).toUpperCase() + part.slice(1))
|
|
137
|
+
).join("+");
|
|
138
|
+
}
|
|
139
|
+
__name(formatKeySpecForDisplay, "formatKeySpecForDisplay");
|
|
140
|
+
function loadConfig() {
|
|
141
|
+
return loadJsonConfigWithLegacyFallback("rpiv-ask-user-question");
|
|
142
|
+
}
|
|
143
|
+
__name(loadConfig, "loadConfig");
|
|
144
|
+
|
|
145
|
+
// node_modules/@juicesharp/rpiv-ask-user-question/state/row-intent.ts?ext=rpiv-ask-user-question
|
|
146
|
+
var SENTINEL_KINDS = ["other", "next"];
|
|
147
|
+
var ROW_INTENT_META = {
|
|
148
|
+
option: {
|
|
149
|
+
label: "",
|
|
150
|
+
reserved: false,
|
|
151
|
+
livesInMainList: true,
|
|
152
|
+
numbered: true,
|
|
153
|
+
activatesInputMode: false,
|
|
154
|
+
blocksMultiToggle: false,
|
|
155
|
+
autoSubmitsInMulti: false,
|
|
156
|
+
autoAppendOnSingleSelect: false,
|
|
157
|
+
autoAppendOnMultiSelect: false
|
|
158
|
+
},
|
|
159
|
+
other: {
|
|
160
|
+
label: "Type something.",
|
|
161
|
+
reserved: true,
|
|
162
|
+
livesInMainList: true,
|
|
163
|
+
numbered: true,
|
|
164
|
+
activatesInputMode: true,
|
|
165
|
+
blocksMultiToggle: false,
|
|
166
|
+
autoSubmitsInMulti: false,
|
|
167
|
+
autoAppendOnSingleSelect: true,
|
|
168
|
+
autoAppendOnMultiSelect: true
|
|
169
|
+
},
|
|
170
|
+
next: {
|
|
171
|
+
label: "Next",
|
|
172
|
+
reserved: true,
|
|
173
|
+
livesInMainList: true,
|
|
174
|
+
numbered: false,
|
|
175
|
+
activatesInputMode: false,
|
|
176
|
+
blocksMultiToggle: true,
|
|
177
|
+
autoSubmitsInMulti: true,
|
|
178
|
+
autoAppendOnSingleSelect: false,
|
|
179
|
+
autoAppendOnMultiSelect: true
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
var LABELS_BY_KIND = {
|
|
183
|
+
other: ROW_INTENT_META.other.label,
|
|
184
|
+
next: ROW_INTENT_META.next.label
|
|
185
|
+
};
|
|
186
|
+
var RESERVED_LABEL_SET = /* @__PURE__ */ new Set([
|
|
187
|
+
"Other",
|
|
188
|
+
...SENTINEL_KINDS.filter((k) => ROW_INTENT_META[k].reserved).map((k) => ROW_INTENT_META[k].label)
|
|
189
|
+
]);
|
|
190
|
+
function sentinelsToAppend(question) {
|
|
191
|
+
const out = [];
|
|
192
|
+
for (const k of SENTINEL_KINDS) {
|
|
193
|
+
const meta = ROW_INTENT_META[k];
|
|
194
|
+
if (!meta.livesInMainList) continue;
|
|
195
|
+
if (question.multiSelect === true) {
|
|
196
|
+
if (meta.autoAppendOnMultiSelect) out.push(k);
|
|
197
|
+
} else {
|
|
198
|
+
if (meta.autoAppendOnSingleSelect) out.push(k);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
return out;
|
|
202
|
+
}
|
|
203
|
+
__name(sentinelsToAppend, "sentinelsToAppend");
|
|
204
|
+
|
|
205
|
+
// node_modules/@juicesharp/rpiv-ask-user-question/state/i18n-bridge.ts?ext=rpiv-ask-user-question
|
|
206
|
+
var I18N_NAMESPACE = "@juicesharp/rpiv-ask-user-question";
|
|
207
|
+
var scopeImpl;
|
|
208
|
+
try {
|
|
209
|
+
const sdk = await import("@juicesharp/rpiv-i18n");
|
|
210
|
+
scopeImpl = sdk.scope(I18N_NAMESPACE);
|
|
211
|
+
} catch {
|
|
212
|
+
scopeImpl = /* @__PURE__ */ __name((_key, fallback) => fallback, "scopeImpl");
|
|
213
|
+
}
|
|
214
|
+
var t = scopeImpl;
|
|
215
|
+
function displayLabel(kind) {
|
|
216
|
+
return t(`sentinel.${kind}`, ROW_INTENT_META[kind].label);
|
|
217
|
+
}
|
|
218
|
+
__name(displayLabel, "displayLabel");
|
|
219
|
+
|
|
220
|
+
// node_modules/@juicesharp/rpiv-ask-user-question/tool/format-answer.ts?ext=rpiv-ask-user-question
|
|
221
|
+
var NO_INPUT_PLACEHOLDER = "(no input)";
|
|
222
|
+
function formatAnswerScalar(a, _variant) {
|
|
223
|
+
switch (a.kind) {
|
|
224
|
+
case "multi": {
|
|
225
|
+
const values = [...a.selected ?? []];
|
|
226
|
+
if (a.answer && a.answer.length > 0) values.push(a.answer);
|
|
227
|
+
return values.length > 0 ? values.join(", ") : NO_INPUT_PLACEHOLDER;
|
|
228
|
+
}
|
|
229
|
+
case "custom":
|
|
230
|
+
return a.answer && a.answer.length > 0 ? a.answer : NO_INPUT_PLACEHOLDER;
|
|
231
|
+
case "option":
|
|
232
|
+
return a.answer ?? NO_INPUT_PLACEHOLDER;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
__name(formatAnswerScalar, "formatAnswerScalar");
|
|
236
|
+
|
|
237
|
+
export {
|
|
238
|
+
validateGuidanceFields,
|
|
239
|
+
DEFAULT_COLLAPSE_KEY,
|
|
240
|
+
COLLAPSE_KEY_OFF,
|
|
241
|
+
resolveCollapseKey,
|
|
242
|
+
formatKeySpecForDisplay,
|
|
243
|
+
loadConfig,
|
|
244
|
+
ROW_INTENT_META,
|
|
245
|
+
sentinelsToAppend,
|
|
246
|
+
I18N_NAMESPACE,
|
|
247
|
+
t,
|
|
248
|
+
displayLabel,
|
|
249
|
+
formatAnswerScalar
|
|
250
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{createRequire as __pvCR}from"node:module";import{fileURLToPath as __pvF}from"node:url";import{dirname as __pvD}from"node:path";const require=__pvCR(import.meta.url);const __pvUrl=(r)=>new URL(r,import.meta.url).href;const __pvFile=(r)=>__pvF(new URL(r,import.meta.url));
|
|
2
|
+
import "./c-CN77DCGF.mjs";
|
|
3
|
+
|
|
4
|
+
// node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/jiti-static-loader.js
|
|
5
|
+
import { createJiti } from "jiti/static";
|
|
6
|
+
export {
|
|
7
|
+
createJiti
|
|
8
|
+
};
|