@withone/cli 2.5.0 → 2.6.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.md +2 -0
- package/dist/{chunk-MRQ47KSZ.js → chunk-4KX5ZERS.js} +783 -116
- package/dist/{chunk-7FPQOAQ4.js → chunk-O3HDWHHS.js} +5 -3
- package/dist/{chunk-XKUTG7JD.js → chunk-PUQKTRYC.js} +5 -3
- package/dist/chunk-Q6PWTATS.js +79 -0
- package/dist/{chunk-NOFJ4NYD.js → chunk-VMFWA43Q.js} +5 -77
- package/dist/{flow-runner-4A5ANCTT.js → flow-runner-FME4AVVN.js} +2 -1
- package/dist/index.js +692 -1316
- package/dist/{migrate-3LSEIPRF.js → migrate-KWEEEQ3E.js} +3 -2
- package/dist/{schema-FICQRMZ7.js → schema-YJ7JTGFL.js} +5 -3
- package/dist/{sql-AKQSXRV2.js → sql-NDMMFQP6.js} +3 -2
- package/package.json +1 -1
|
@@ -2,11 +2,13 @@ import {
|
|
|
2
2
|
getByDotPath
|
|
3
3
|
} from "./chunk-44CV5IMX.js";
|
|
4
4
|
import {
|
|
5
|
-
isAgentMode,
|
|
6
|
-
note,
|
|
7
5
|
okJson,
|
|
8
6
|
requireMemoryInit
|
|
9
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VMFWA43Q.js";
|
|
8
|
+
import {
|
|
9
|
+
isAgentMode,
|
|
10
|
+
note
|
|
11
|
+
} from "./chunk-Q6PWTATS.js";
|
|
10
12
|
import {
|
|
11
13
|
getBackend,
|
|
12
14
|
upsertRecord
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// src/lib/output.ts
|
|
2
|
+
import * as p from "@clack/prompts";
|
|
3
|
+
var _agentMode = false;
|
|
4
|
+
function setAgentMode(value) {
|
|
5
|
+
_agentMode = value;
|
|
6
|
+
}
|
|
7
|
+
function isAgentMode() {
|
|
8
|
+
return _agentMode || process.env.ONE_AGENT === "1";
|
|
9
|
+
}
|
|
10
|
+
function silenceWarningsInAgentMode() {
|
|
11
|
+
const agent = process.argv.includes("--agent") || process.env.ONE_AGENT === "1";
|
|
12
|
+
if (!agent) return;
|
|
13
|
+
process.env.NODE_NO_WARNINGS = "1";
|
|
14
|
+
process.removeAllListeners("warning");
|
|
15
|
+
process.emitWarning = (() => {
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
var SPINNER_CHROME = 6;
|
|
19
|
+
function fitSpinnerMessage(msg, columns) {
|
|
20
|
+
if (!columns || columns <= 0) return msg;
|
|
21
|
+
const room = columns - SPINNER_CHROME;
|
|
22
|
+
const chars = Array.from(msg);
|
|
23
|
+
if (chars.length <= room) return msg;
|
|
24
|
+
return room > 1 ? `${chars.slice(0, room - 1).join("")}\u2026` : "";
|
|
25
|
+
}
|
|
26
|
+
function createSpinner() {
|
|
27
|
+
if (isAgentMode()) {
|
|
28
|
+
return { start() {
|
|
29
|
+
}, stop() {
|
|
30
|
+
} };
|
|
31
|
+
}
|
|
32
|
+
if (!process.stdout.isTTY) {
|
|
33
|
+
return {
|
|
34
|
+
start: (msg) => p.log.step(msg),
|
|
35
|
+
stop: (msg) => p.log.message(msg)
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
const spinner2 = p.spinner();
|
|
39
|
+
return {
|
|
40
|
+
start: (msg) => spinner2.start(fitSpinnerMessage(msg, process.stdout.columns)),
|
|
41
|
+
stop: (msg) => spinner2.stop(msg)
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function intro2(msg) {
|
|
45
|
+
if (!isAgentMode()) p.intro(msg);
|
|
46
|
+
}
|
|
47
|
+
function outro2(msg) {
|
|
48
|
+
if (!isAgentMode()) p.outro(msg);
|
|
49
|
+
}
|
|
50
|
+
function note2(msg, title) {
|
|
51
|
+
if (!isAgentMode()) p.note(msg, title);
|
|
52
|
+
}
|
|
53
|
+
function cancel2(msg) {
|
|
54
|
+
if (!isAgentMode()) p.cancel(msg);
|
|
55
|
+
}
|
|
56
|
+
function json(data) {
|
|
57
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
58
|
+
}
|
|
59
|
+
function error(message, exitCode = 1) {
|
|
60
|
+
if (isAgentMode()) {
|
|
61
|
+
json({ error: message });
|
|
62
|
+
} else {
|
|
63
|
+
p.cancel(message);
|
|
64
|
+
}
|
|
65
|
+
process.exit(exitCode);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export {
|
|
69
|
+
setAgentMode,
|
|
70
|
+
isAgentMode,
|
|
71
|
+
silenceWarningsInAgentMode,
|
|
72
|
+
createSpinner,
|
|
73
|
+
intro2 as intro,
|
|
74
|
+
outro2 as outro,
|
|
75
|
+
note2 as note,
|
|
76
|
+
cancel2 as cancel,
|
|
77
|
+
json,
|
|
78
|
+
error
|
|
79
|
+
};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
error,
|
|
3
|
+
isAgentMode,
|
|
4
|
+
json
|
|
5
|
+
} from "./chunk-Q6PWTATS.js";
|
|
1
6
|
import {
|
|
2
7
|
getMemoryConfigOrDefault
|
|
3
8
|
} from "./chunk-3HRC3IPE.js";
|
|
@@ -6,73 +11,6 @@ import {
|
|
|
6
11
|
readConfig
|
|
7
12
|
} from "./chunk-HTXZZQ6U.js";
|
|
8
13
|
|
|
9
|
-
// src/lib/output.ts
|
|
10
|
-
import * as p from "@clack/prompts";
|
|
11
|
-
var _agentMode = false;
|
|
12
|
-
function setAgentMode(value) {
|
|
13
|
-
_agentMode = value;
|
|
14
|
-
}
|
|
15
|
-
function isAgentMode() {
|
|
16
|
-
return _agentMode || process.env.ONE_AGENT === "1";
|
|
17
|
-
}
|
|
18
|
-
function silenceWarningsInAgentMode() {
|
|
19
|
-
const agent = process.argv.includes("--agent") || process.env.ONE_AGENT === "1";
|
|
20
|
-
if (!agent) return;
|
|
21
|
-
process.env.NODE_NO_WARNINGS = "1";
|
|
22
|
-
process.removeAllListeners("warning");
|
|
23
|
-
process.emitWarning = (() => {
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
var SPINNER_CHROME = 6;
|
|
27
|
-
function fitSpinnerMessage(msg, columns) {
|
|
28
|
-
if (!columns || columns <= 0) return msg;
|
|
29
|
-
const room = columns - SPINNER_CHROME;
|
|
30
|
-
const chars = Array.from(msg);
|
|
31
|
-
if (chars.length <= room) return msg;
|
|
32
|
-
return room > 1 ? `${chars.slice(0, room - 1).join("")}\u2026` : "";
|
|
33
|
-
}
|
|
34
|
-
function createSpinner() {
|
|
35
|
-
if (isAgentMode()) {
|
|
36
|
-
return { start() {
|
|
37
|
-
}, stop() {
|
|
38
|
-
} };
|
|
39
|
-
}
|
|
40
|
-
if (!process.stdout.isTTY) {
|
|
41
|
-
return {
|
|
42
|
-
start: (msg) => p.log.step(msg),
|
|
43
|
-
stop: (msg) => p.log.message(msg)
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
const spinner2 = p.spinner();
|
|
47
|
-
return {
|
|
48
|
-
start: (msg) => spinner2.start(fitSpinnerMessage(msg, process.stdout.columns)),
|
|
49
|
-
stop: (msg) => spinner2.stop(msg)
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
function intro2(msg) {
|
|
53
|
-
if (!isAgentMode()) p.intro(msg);
|
|
54
|
-
}
|
|
55
|
-
function outro2(msg) {
|
|
56
|
-
if (!isAgentMode()) p.outro(msg);
|
|
57
|
-
}
|
|
58
|
-
function note2(msg, title) {
|
|
59
|
-
if (!isAgentMode()) p.note(msg, title);
|
|
60
|
-
}
|
|
61
|
-
function cancel2(msg) {
|
|
62
|
-
if (!isAgentMode()) p.cancel(msg);
|
|
63
|
-
}
|
|
64
|
-
function json(data) {
|
|
65
|
-
process.stdout.write(JSON.stringify(data) + "\n");
|
|
66
|
-
}
|
|
67
|
-
function error(message, exitCode = 1) {
|
|
68
|
-
if (isAgentMode()) {
|
|
69
|
-
json({ error: message });
|
|
70
|
-
} else {
|
|
71
|
-
p.cancel(message);
|
|
72
|
-
}
|
|
73
|
-
process.exit(exitCode);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
14
|
// src/commands/mem/util.ts
|
|
77
15
|
function requireMemoryInit() {
|
|
78
16
|
if (!readConfig()) {
|
|
@@ -165,16 +103,6 @@ function semanticSearchUpgradeLine(opts = {}) {
|
|
|
165
103
|
}
|
|
166
104
|
|
|
167
105
|
export {
|
|
168
|
-
setAgentMode,
|
|
169
|
-
isAgentMode,
|
|
170
|
-
silenceWarningsInAgentMode,
|
|
171
|
-
createSpinner,
|
|
172
|
-
intro2 as intro,
|
|
173
|
-
outro2 as outro,
|
|
174
|
-
note2 as note,
|
|
175
|
-
cancel2 as cancel,
|
|
176
|
-
json,
|
|
177
|
-
error,
|
|
178
106
|
requireMemoryInit,
|
|
179
107
|
parseJsonArg,
|
|
180
108
|
parseCsv,
|
|
@@ -12,8 +12,9 @@ import {
|
|
|
12
12
|
stripStepsAlias,
|
|
13
13
|
summarizeFlowInputs,
|
|
14
14
|
walkSteps
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-4KX5ZERS.js";
|
|
16
16
|
import "./chunk-44CV5IMX.js";
|
|
17
|
+
import "./chunk-Q6PWTATS.js";
|
|
17
18
|
import "./chunk-HTXZZQ6U.js";
|
|
18
19
|
export {
|
|
19
20
|
FlowRunner,
|