@lucid-agents/taskmarket 1.17.2 → 1.18.1

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.
@@ -0,0 +1,65 @@
1
+ import { createRequire as __tmCreateRequire } from 'node:module'; import { fileURLToPath as __tmFileURLToPath } from 'node:url'; import { dirname as __tmDirname } from 'node:path'; const require = __tmCreateRequire(import.meta.url); const __tmFilename = __tmFileURLToPath(import.meta.url); const __tmDirnameValue = __tmDirname(__tmFilename);
2
+ import {
3
+ AgentLaunchError
4
+ } from "./chunk-YM4S6IE4.js";
5
+
6
+ // src/lib/agent/prompter.ts
7
+ import { createInterface } from "readline";
8
+ function cancelled() {
9
+ return new AgentLaunchError(
10
+ "setup_cancelled",
11
+ "Setup was cancelled; nothing more was written or bought"
12
+ );
13
+ }
14
+ function terminalPrompter(input = process.stdin, output = process.stderr) {
15
+ let readline;
16
+ let closed = false;
17
+ let reject;
18
+ const open = () => {
19
+ if (readline) return readline;
20
+ readline = createInterface({ input, output, terminal: true });
21
+ readline.on("SIGINT", () => {
22
+ output.write("\n");
23
+ reject?.(cancelled());
24
+ });
25
+ readline.on("close", () => {
26
+ closed = true;
27
+ reject?.(cancelled());
28
+ });
29
+ return readline;
30
+ };
31
+ const question = (text) => new Promise((resolve, fail) => {
32
+ if (closed) {
33
+ fail(cancelled());
34
+ return;
35
+ }
36
+ reject = fail;
37
+ open().question(text, (answer) => {
38
+ reject = void 0;
39
+ resolve(answer);
40
+ });
41
+ });
42
+ return {
43
+ say(lines) {
44
+ output.write(`${lines.join("\n")}
45
+ `);
46
+ },
47
+ async ask(text, fallback) {
48
+ const answer = (await question(`${text} [${fallback}]: `)).trim();
49
+ return answer === "" ? fallback : answer;
50
+ },
51
+ async confirm(text) {
52
+ const answer = await question(`${text} Type yes to approve: `);
53
+ return answer.trim().toLowerCase() === "yes";
54
+ },
55
+ close() {
56
+ reject = void 0;
57
+ readline?.close();
58
+ readline = void 0;
59
+ }
60
+ };
61
+ }
62
+
63
+ export {
64
+ terminalPrompter
65
+ };
@@ -6,26 +6,29 @@ import {
6
6
  } from "./chunk-OKZ2NRYZ.js";
7
7
  import {
8
8
  listSandboxes
9
- } from "./chunk-XXD7TWLP.js";
10
- import "./chunk-LDCFKFF6.js";
11
- import "./chunk-52Q2DCZN.js";
9
+ } from "./chunk-RHUDL5WA.js";
10
+ import "./chunk-3FF6JAMK.js";
11
+ import "./chunk-ONYTKAHC.js";
12
+ import "./chunk-3LNZ766H.js";
12
13
  import {
13
14
  channelView,
14
15
  loadAgentPolicy,
15
16
  openAgentChannels
16
- } from "./chunk-GJQUALXN.js";
17
+ } from "./chunk-LEVAZYR5.js";
17
18
  import {
18
- apiUrl,
19
19
  getX402PolicyPath,
20
- keystoreExists,
21
- loadKeystore,
22
20
  loadX402Policy,
23
21
  rpcUrlForNetwork
24
- } from "./chunk-FRV3ZHUR.js";
25
- import "./chunk-YM4S6IE4.js";
22
+ } from "./chunk-5VMWXDNO.js";
23
+ import {
24
+ apiUrl,
25
+ keystoreExists,
26
+ loadKeystore
27
+ } from "./chunk-YB2B5DPR.js";
26
28
  import {
27
29
  AGENT_VIEW_VERSION
28
- } from "./chunk-73RXOYME.js";
30
+ } from "./chunk-EB6OJBF5.js";
31
+ import "./chunk-YM4S6IE4.js";
29
32
  import "./chunk-S7SJMJ2I.js";
30
33
 
31
34
  // src/lib/agent/doctor.ts