@todoforai/cli 0.1.60 → 0.1.61
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/dist/todoforai-cli.js +8 -15
- package/package.json +1 -1
package/dist/todoforai-cli.js
CHANGED
|
@@ -46135,7 +46135,7 @@ import { parseArgs } from "util";
|
|
|
46135
46135
|
// package.json
|
|
46136
46136
|
var package_default = {
|
|
46137
46137
|
name: "@todoforai/cli",
|
|
46138
|
-
version: "0.1.
|
|
46138
|
+
version: "0.1.61",
|
|
46139
46139
|
type: "module",
|
|
46140
46140
|
bin: {
|
|
46141
46141
|
"todoforai-cli": "bin/todoforai-cli.js",
|
|
@@ -46314,7 +46314,6 @@ function parseCliArgs() {
|
|
|
46314
46314
|
link: { type: "boolean", default: false },
|
|
46315
46315
|
direction: { type: "string" },
|
|
46316
46316
|
url: { type: "string" },
|
|
46317
|
-
"pasted-file": { type: "string" },
|
|
46318
46317
|
account: { type: "string" },
|
|
46319
46318
|
"from-company": { type: "boolean", default: false },
|
|
46320
46319
|
"dry-run": { type: "boolean", default: false },
|
|
@@ -49499,7 +49498,7 @@ var ADAPTERS = { Gmail: gmail, Outlook: outlook, Chat: chat };
|
|
|
49499
49498
|
var DEVICE_CHANNELS = Object.keys(ADAPTERS);
|
|
49500
49499
|
function checkChannel(channel) {
|
|
49501
49500
|
const a = ADAPTERS[channel];
|
|
49502
|
-
return a ? a.check() : `${channel} is not read on the device (server-side: pass --url
|
|
49501
|
+
return a ? a.check() : `${channel} is not read on the device (server-side: pass --url)`;
|
|
49503
49502
|
}
|
|
49504
49503
|
function collectChannel(channel, max = 40) {
|
|
49505
49504
|
const a = ADAPTERS[channel];
|
|
@@ -49779,12 +49778,12 @@ Usage:
|
|
|
49779
49778
|
tfa-cli brand rename <name>
|
|
49780
49779
|
tfa-cli brand voice Learned profile + sources
|
|
49781
49780
|
tfa-cli brand voice answers [<q>=<a>…] Show / set the Manual source: answers to the style questions
|
|
49782
|
-
tfa-cli brand voice collect <channel> [--url U | --
|
|
49781
|
+
tfa-cli brand voice collect <channel> [--url U | --max N]
|
|
49783
49782
|
Add a writing sample source.
|
|
49784
49783
|
On this device (signed-in CLI, reply pairs):
|
|
49785
49784
|
Gmail (zele) Outlook (outlook-api) Chat (tfa-memory)
|
|
49786
|
-
Server-side (--url
|
|
49787
|
-
X LinkedIn Facebook Instagram
|
|
49785
|
+
Server-side (--url):
|
|
49786
|
+
X LinkedIn Facebook Instagram
|
|
49788
49787
|
--dry-run print the samples as JSONL, store nothing
|
|
49789
49788
|
tfa-cli brand voice check [<channel>|--all] Can this device read the channel? tool, login, sample count
|
|
49790
49789
|
tfa-cli brand voice remove <channel>
|
|
@@ -49792,7 +49791,6 @@ Usage:
|
|
|
49792
49791
|
tfa-cli brand voice correct "<what is off>" Tell the learner what it got wrong; profile is updated
|
|
49793
49792
|
in one pass and the correction is kept for every re-learn
|
|
49794
49793
|
|
|
49795
|
-
--pasted-file - reads stdin. Delete is UI-only.
|
|
49796
49794
|
|
|
49797
49795
|
Questions the UI asks (keys for 'answers'):
|
|
49798
49796
|
"What makes you different from competitors?"
|
|
@@ -49892,7 +49890,7 @@ async function voiceDeviceCommand(rest, args) {
|
|
|
49892
49890
|
async function voiceCommand(api, projectId, rest, args) {
|
|
49893
49891
|
const [verb, ...vargs] = rest;
|
|
49894
49892
|
if (verb === "collect" && !vargs[0])
|
|
49895
|
-
fail("Usage: tfa-cli brand voice collect <channel> [--url U | --
|
|
49893
|
+
fail("Usage: tfa-cli brand voice collect <channel> [--url U | --account <page-id> | --max N] [--dry-run]");
|
|
49896
49894
|
if (verb === "answers") {
|
|
49897
49895
|
const answers = manualAnswersOf((await api.listVoiceSources(projectId)).sources);
|
|
49898
49896
|
if (vargs.length) {
|
|
@@ -49938,12 +49936,7 @@ ${DIM}match ${profile.match}/100 · source ${profile.source}${RESET}
|
|
|
49938
49936
|
}
|
|
49939
49937
|
if (verb === "collect") {
|
|
49940
49938
|
const channel = vargs[0];
|
|
49941
|
-
|
|
49942
|
-
if (args["pasted-file"]) {
|
|
49943
|
-
const { readFileSync: readFileSync3 } = await import("node:fs");
|
|
49944
|
-
pasted = readFileSync3(args["pasted-file"] === "-" ? 0 : args["pasted-file"], "utf8");
|
|
49945
|
-
}
|
|
49946
|
-
const onDevice = !pasted && !args.url && ADAPTERS[channel];
|
|
49939
|
+
const onDevice = !args.url && ADAPTERS[channel];
|
|
49947
49940
|
if (onDevice) {
|
|
49948
49941
|
const reason = checkChannel(channel);
|
|
49949
49942
|
if (reason)
|
|
@@ -49958,7 +49951,7 @@ ${DIM}match ${profile.match}/100 · source ${profile.source}${RESET}
|
|
|
49958
49951
|
`);
|
|
49959
49952
|
return;
|
|
49960
49953
|
}
|
|
49961
|
-
const { sources } = await api.collectVoiceSource(projectId, channel, { url: args.url,
|
|
49954
|
+
const { sources } = await api.collectVoiceSource(projectId, channel, { url: args.url, account: args.account });
|
|
49962
49955
|
process.stderr.write(`${GREEN}✅ ${channel} collected (${sources.length} source(s))${RESET}
|
|
49963
49956
|
`);
|
|
49964
49957
|
return;
|