faces-cli 1.0.0 → 1.2.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/dist/commands/face/create.d.ts +1 -0
- package/dist/commands/face/create.js +19 -10
- package/dist/commands/face/diff.d.ts +11 -0
- package/dist/commands/face/diff.js +54 -0
- package/dist/commands/face/get.js +26 -2
- package/dist/commands/face/list.js +14 -2
- package/dist/commands/face/neighbors.d.ts +16 -0
- package/dist/commands/face/neighbors.js +62 -0
- package/dist/commands/face/update.d.ts +1 -0
- package/dist/commands/face/update.js +3 -0
- package/oclif.manifest.json +169 -1
- package/package.json +34 -12
|
@@ -4,6 +4,7 @@ export default class FaceCreate extends BaseCommand {
|
|
|
4
4
|
static flags: {
|
|
5
5
|
name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
6
|
username: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
formula: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
8
|
attr: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
9
|
tool: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -7,6 +7,7 @@ export default class FaceCreate extends BaseCommand {
|
|
|
7
7
|
...BaseCommand.baseFlags,
|
|
8
8
|
name: Flags.string({ description: 'Display name', required: true }),
|
|
9
9
|
username: Flags.string({ description: 'Unique username slug', required: true }),
|
|
10
|
+
formula: Flags.string({ description: 'Boolean formula over owned concrete face usernames (e.g. "a | b", "(a | b) - c"). Creates a synthetic face.' }),
|
|
10
11
|
attr: Flags.string({ description: 'Attribute KEY=VALUE (repeatable)', multiple: true }),
|
|
11
12
|
tool: Flags.string({ description: 'Tool name to enable (repeatable)', multiple: true }),
|
|
12
13
|
};
|
|
@@ -14,18 +15,26 @@ export default class FaceCreate extends BaseCommand {
|
|
|
14
15
|
async run() {
|
|
15
16
|
const { flags } = await this.parse(FaceCreate);
|
|
16
17
|
const client = this.makeClient(flags);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
if (!a.includes('='))
|
|
20
|
-
this.error(`Attributes must be KEY=VALUE, got: ${a}`);
|
|
21
|
-
const idx = a.indexOf('=');
|
|
22
|
-
parsedAttrs[a.slice(0, idx).trim()] = a.slice(idx + 1).trim();
|
|
18
|
+
if (flags.formula && (flags.attr?.length || flags.tool?.length)) {
|
|
19
|
+
this.error('--formula cannot be combined with --attr or --tool. Synthetic faces do not have compiled knowledge.');
|
|
23
20
|
}
|
|
24
21
|
const payload = { name: flags.name, username: flags.username };
|
|
25
|
-
if (
|
|
26
|
-
payload.
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
if (flags.formula) {
|
|
23
|
+
payload.formula = flags.formula;
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
const parsedAttrs = {};
|
|
27
|
+
for (const a of flags.attr ?? []) {
|
|
28
|
+
if (!a.includes('='))
|
|
29
|
+
this.error(`Attributes must be KEY=VALUE, got: ${a}`);
|
|
30
|
+
const idx = a.indexOf('=');
|
|
31
|
+
parsedAttrs[a.slice(0, idx).trim()] = a.slice(idx + 1).trim();
|
|
32
|
+
}
|
|
33
|
+
if (Object.keys(parsedAttrs).length > 0)
|
|
34
|
+
payload.facts = parsedAttrs;
|
|
35
|
+
if (flags.tool && flags.tool.length > 0)
|
|
36
|
+
payload.tools = flags.tool;
|
|
37
|
+
}
|
|
29
38
|
let data;
|
|
30
39
|
try {
|
|
31
40
|
data = await client.post('/v1/faces', { body: payload });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base.js';
|
|
2
|
+
export default class FaceDiff extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
face: import("@oclif/core/interfaces").OptionFlag<string[], import("@oclif/core/interfaces").CustomOptions>;
|
|
6
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
token: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
};
|
|
10
|
+
run(): Promise<unknown>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../base.js';
|
|
3
|
+
import { FacesAPIError } from '../../client.js';
|
|
4
|
+
export default class FaceDiff extends BaseCommand {
|
|
5
|
+
static description = 'Compare owned faces pairwise across all centroid components';
|
|
6
|
+
static flags = {
|
|
7
|
+
...BaseCommand.baseFlags,
|
|
8
|
+
face: Flags.string({
|
|
9
|
+
description: 'Face username to include (repeatable, min 2)',
|
|
10
|
+
multiple: true,
|
|
11
|
+
required: true,
|
|
12
|
+
}),
|
|
13
|
+
};
|
|
14
|
+
async run() {
|
|
15
|
+
const { flags } = await this.parse(FaceDiff);
|
|
16
|
+
const client = this.makeClient(flags);
|
|
17
|
+
if (flags.face.length < 2) {
|
|
18
|
+
this.error('At least 2 --face values are required');
|
|
19
|
+
}
|
|
20
|
+
const params = { faces: flags.face.join(',') };
|
|
21
|
+
let data;
|
|
22
|
+
try {
|
|
23
|
+
data = await client.get('/v1/faces/diff', { params });
|
|
24
|
+
}
|
|
25
|
+
catch (err) {
|
|
26
|
+
if (err instanceof FacesAPIError)
|
|
27
|
+
this.error(`Error (${err.statusCode}): ${err.message}`);
|
|
28
|
+
throw err;
|
|
29
|
+
}
|
|
30
|
+
if (!this.jsonEnabled()) {
|
|
31
|
+
const res = data;
|
|
32
|
+
const faces = res.faces;
|
|
33
|
+
const components = ['face', 'beta', 'delta', 'epsilon'];
|
|
34
|
+
for (let i = 0; i < faces.length; i++) {
|
|
35
|
+
for (let j = i + 1; j < faces.length; j++) {
|
|
36
|
+
const a = faces[i];
|
|
37
|
+
const b = faces[j];
|
|
38
|
+
const scores = res.similarity[a][b];
|
|
39
|
+
const parts = components.map(c => {
|
|
40
|
+
const v = scores[c];
|
|
41
|
+
return `${c}: ${v === null ? '—' : v.toFixed(2)}`;
|
|
42
|
+
});
|
|
43
|
+
this.log(`${a} ↔ ${b} ${parts.join(' ')}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
this.log('');
|
|
47
|
+
const updated = Object.entries(res.centroids_updated_at)
|
|
48
|
+
.map(([face, ts]) => `${face} ${new Date(ts * 1000).toISOString().slice(0, 10)}`)
|
|
49
|
+
.join(', ');
|
|
50
|
+
this.log(`Centroids updated: ${updated}`);
|
|
51
|
+
}
|
|
52
|
+
return data;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -21,8 +21,32 @@ export default class FaceGet extends BaseCommand {
|
|
|
21
21
|
this.error(`Error (${err.statusCode}): ${err.message}`);
|
|
22
22
|
throw err;
|
|
23
23
|
}
|
|
24
|
-
if (!this.jsonEnabled())
|
|
25
|
-
|
|
24
|
+
if (!this.jsonEnabled()) {
|
|
25
|
+
const f = data;
|
|
26
|
+
this.log(`id: ${f.id}`);
|
|
27
|
+
this.log(`uid: ${f.uid}`);
|
|
28
|
+
this.log(`name: ${f.name}`);
|
|
29
|
+
this.log(`owned_by: ${f.owned_by}`);
|
|
30
|
+
this.log(`created: ${new Date(f.created * 1000).toISOString().slice(0, 10)}`);
|
|
31
|
+
if (f.formula) {
|
|
32
|
+
this.log(`formula: ${f.formula}`);
|
|
33
|
+
this.log(`type: synthetic`);
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
this.log(`type: concrete`);
|
|
37
|
+
if (f.basic_facts && Object.keys(f.basic_facts).length > 0) {
|
|
38
|
+
this.log('basic_facts:');
|
|
39
|
+
for (const [k, v] of Object.entries(f.basic_facts)) {
|
|
40
|
+
const display = typeof v === 'object' ? JSON.stringify(v) : v;
|
|
41
|
+
this.log(` ${k}: ${display}`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (f.default_tools && f.default_tools.length > 0)
|
|
45
|
+
this.log(`default_tools: ${f.default_tools.join(', ')}`);
|
|
46
|
+
if (f.default_model)
|
|
47
|
+
this.log(`default_model: ${f.default_model}`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
26
50
|
return data;
|
|
27
51
|
}
|
|
28
52
|
}
|
|
@@ -17,8 +17,20 @@ export default class FaceList extends BaseCommand {
|
|
|
17
17
|
this.error(`Error (${err.statusCode}): ${err.message}`);
|
|
18
18
|
throw err;
|
|
19
19
|
}
|
|
20
|
-
if (!this.jsonEnabled())
|
|
21
|
-
|
|
20
|
+
if (!this.jsonEnabled()) {
|
|
21
|
+
const faces = (data.data) ?? data;
|
|
22
|
+
if (faces.length === 0) {
|
|
23
|
+
this.log('(no faces)');
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
const idWidth = Math.max(...faces.map(f => f.id.length));
|
|
27
|
+
const nameWidth = Math.max(...faces.map(f => f.name.length));
|
|
28
|
+
for (const f of faces) {
|
|
29
|
+
const synthetic = f.formula ? ` [synthetic: ${f.formula}]` : '';
|
|
30
|
+
this.log(`${f.id.padEnd(idWidth)} ${f.name.padEnd(nameWidth)}${synthetic}`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
22
34
|
return data;
|
|
23
35
|
}
|
|
24
36
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseCommand } from '../../base.js';
|
|
2
|
+
export default class FaceNeighbors extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
k: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
|
+
component: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
direction: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
token: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
static args: {
|
|
13
|
+
face_id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
14
|
+
};
|
|
15
|
+
run(): Promise<unknown>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Args, Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../base.js';
|
|
3
|
+
import { FacesAPIError } from '../../client.js';
|
|
4
|
+
export default class FaceNeighbors extends BaseCommand {
|
|
5
|
+
static description = 'Find the most similar or dissimilar owned faces to a given face';
|
|
6
|
+
static flags = {
|
|
7
|
+
...BaseCommand.baseFlags,
|
|
8
|
+
k: Flags.integer({
|
|
9
|
+
description: 'Number of results (1–20)',
|
|
10
|
+
default: 5,
|
|
11
|
+
min: 1,
|
|
12
|
+
max: 20,
|
|
13
|
+
}),
|
|
14
|
+
component: Flags.string({
|
|
15
|
+
description: 'Centroid component to rank on (beta, delta, epsilon are the principal components of a face; face is their composite)',
|
|
16
|
+
options: ['face', 'beta', 'delta', 'epsilon'],
|
|
17
|
+
default: 'face',
|
|
18
|
+
}),
|
|
19
|
+
direction: Flags.string({
|
|
20
|
+
description: 'nearest (most similar) or furthest (most dissimilar)',
|
|
21
|
+
options: ['nearest', 'furthest'],
|
|
22
|
+
default: 'nearest',
|
|
23
|
+
}),
|
|
24
|
+
};
|
|
25
|
+
static args = {
|
|
26
|
+
face_id: Args.string({ description: 'Face username', required: true }),
|
|
27
|
+
};
|
|
28
|
+
async run() {
|
|
29
|
+
const { args, flags } = await this.parse(FaceNeighbors);
|
|
30
|
+
const client = this.makeClient(flags);
|
|
31
|
+
const params = {
|
|
32
|
+
k: String(flags.k),
|
|
33
|
+
component: flags.component,
|
|
34
|
+
direction: flags.direction,
|
|
35
|
+
};
|
|
36
|
+
let data;
|
|
37
|
+
try {
|
|
38
|
+
data = await client.get(`/v1/faces/${args.face_id}/neighbors`, { params });
|
|
39
|
+
}
|
|
40
|
+
catch (err) {
|
|
41
|
+
if (err instanceof FacesAPIError)
|
|
42
|
+
this.error(`Error (${err.statusCode}): ${err.message}`);
|
|
43
|
+
throw err;
|
|
44
|
+
}
|
|
45
|
+
if (!this.jsonEnabled()) {
|
|
46
|
+
const res = data;
|
|
47
|
+
const label = res.direction === 'nearest' ? 'Nearest' : 'Most dissimilar';
|
|
48
|
+
this.log(`${label} neighbors to ${res.face} (by ${res.component}):`);
|
|
49
|
+
this.log('');
|
|
50
|
+
if (res.neighbors.length === 0) {
|
|
51
|
+
this.log(' (none)');
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
for (const [i, n] of res.neighbors.entries()) {
|
|
55
|
+
const updated = new Date(n.centroid_updated_at * 1000).toISOString().slice(0, 10);
|
|
56
|
+
this.log(` ${i + 1}. ${n.face.padEnd(20)} ${n.similarity.toFixed(2)} (centroid updated ${updated})`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return data;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -3,6 +3,7 @@ export default class FaceUpdate extends BaseCommand {
|
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
5
|
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
|
+
formula: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
7
|
attr: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
8
|
tool: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
9
|
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -6,6 +6,7 @@ export default class FaceUpdate extends BaseCommand {
|
|
|
6
6
|
static flags = {
|
|
7
7
|
...BaseCommand.baseFlags,
|
|
8
8
|
name: Flags.string({ description: 'New display name' }),
|
|
9
|
+
formula: Flags.string({ description: 'New boolean formula (synthetic faces only)' }),
|
|
9
10
|
attr: Flags.string({ description: 'Update attribute KEY=VALUE (repeatable)', multiple: true }),
|
|
10
11
|
tool: Flags.string({ description: 'Tool names to set (replaces list, repeatable)', multiple: true }),
|
|
11
12
|
};
|
|
@@ -18,6 +19,8 @@ export default class FaceUpdate extends BaseCommand {
|
|
|
18
19
|
const payload = {};
|
|
19
20
|
if (flags.name)
|
|
20
21
|
payload.name = flags.name;
|
|
22
|
+
if (flags.formula)
|
|
23
|
+
payload.formula = flags.formula;
|
|
21
24
|
if (flags.attr && flags.attr.length > 0) {
|
|
22
25
|
const parsed = {};
|
|
23
26
|
for (const a of flags.attr) {
|
package/oclif.manifest.json
CHANGED
|
@@ -1365,6 +1365,13 @@
|
|
|
1365
1365
|
"multiple": false,
|
|
1366
1366
|
"type": "option"
|
|
1367
1367
|
},
|
|
1368
|
+
"formula": {
|
|
1369
|
+
"description": "Boolean formula over owned concrete face usernames (e.g. \"a | b\", \"(a | b) - c\"). Creates a synthetic face.",
|
|
1370
|
+
"name": "formula",
|
|
1371
|
+
"hasDynamicHelp": false,
|
|
1372
|
+
"multiple": false,
|
|
1373
|
+
"type": "option"
|
|
1374
|
+
},
|
|
1368
1375
|
"attr": {
|
|
1369
1376
|
"description": "Attribute KEY=VALUE (repeatable)",
|
|
1370
1377
|
"name": "attr",
|
|
@@ -1461,6 +1468,67 @@
|
|
|
1461
1468
|
"delete.js"
|
|
1462
1469
|
]
|
|
1463
1470
|
},
|
|
1471
|
+
"face:diff": {
|
|
1472
|
+
"aliases": [],
|
|
1473
|
+
"args": {},
|
|
1474
|
+
"description": "Compare owned faces pairwise across all centroid components",
|
|
1475
|
+
"flags": {
|
|
1476
|
+
"json": {
|
|
1477
|
+
"description": "Format output as json.",
|
|
1478
|
+
"helpGroup": "GLOBAL",
|
|
1479
|
+
"name": "json",
|
|
1480
|
+
"allowNo": false,
|
|
1481
|
+
"type": "boolean"
|
|
1482
|
+
},
|
|
1483
|
+
"base-url": {
|
|
1484
|
+
"description": "API base URL",
|
|
1485
|
+
"env": "FACES_BASE_URL",
|
|
1486
|
+
"name": "base-url",
|
|
1487
|
+
"hasDynamicHelp": false,
|
|
1488
|
+
"multiple": false,
|
|
1489
|
+
"type": "option"
|
|
1490
|
+
},
|
|
1491
|
+
"token": {
|
|
1492
|
+
"description": "JWT bearer token",
|
|
1493
|
+
"env": "FACES_TOKEN",
|
|
1494
|
+
"name": "token",
|
|
1495
|
+
"hasDynamicHelp": false,
|
|
1496
|
+
"multiple": false,
|
|
1497
|
+
"type": "option"
|
|
1498
|
+
},
|
|
1499
|
+
"api-key": {
|
|
1500
|
+
"description": "API key",
|
|
1501
|
+
"env": "FACES_API_KEY",
|
|
1502
|
+
"name": "api-key",
|
|
1503
|
+
"hasDynamicHelp": false,
|
|
1504
|
+
"multiple": false,
|
|
1505
|
+
"type": "option"
|
|
1506
|
+
},
|
|
1507
|
+
"face": {
|
|
1508
|
+
"description": "Face username to include (repeatable, min 2)",
|
|
1509
|
+
"name": "face",
|
|
1510
|
+
"required": true,
|
|
1511
|
+
"hasDynamicHelp": false,
|
|
1512
|
+
"multiple": true,
|
|
1513
|
+
"type": "option"
|
|
1514
|
+
}
|
|
1515
|
+
},
|
|
1516
|
+
"hasDynamicHelp": false,
|
|
1517
|
+
"hiddenAliases": [],
|
|
1518
|
+
"id": "face:diff",
|
|
1519
|
+
"pluginAlias": "faces-cli",
|
|
1520
|
+
"pluginName": "faces-cli",
|
|
1521
|
+
"pluginType": "core",
|
|
1522
|
+
"strict": true,
|
|
1523
|
+
"enableJsonFlag": true,
|
|
1524
|
+
"isESM": true,
|
|
1525
|
+
"relativePath": [
|
|
1526
|
+
"dist",
|
|
1527
|
+
"commands",
|
|
1528
|
+
"face",
|
|
1529
|
+
"diff.js"
|
|
1530
|
+
]
|
|
1531
|
+
},
|
|
1464
1532
|
"face:get": {
|
|
1465
1533
|
"aliases": [],
|
|
1466
1534
|
"args": {
|
|
@@ -1573,6 +1641,99 @@
|
|
|
1573
1641
|
"list.js"
|
|
1574
1642
|
]
|
|
1575
1643
|
},
|
|
1644
|
+
"face:neighbors": {
|
|
1645
|
+
"aliases": [],
|
|
1646
|
+
"args": {
|
|
1647
|
+
"face_id": {
|
|
1648
|
+
"description": "Face username",
|
|
1649
|
+
"name": "face_id",
|
|
1650
|
+
"required": true
|
|
1651
|
+
}
|
|
1652
|
+
},
|
|
1653
|
+
"description": "Find the most similar or dissimilar owned faces to a given face",
|
|
1654
|
+
"flags": {
|
|
1655
|
+
"json": {
|
|
1656
|
+
"description": "Format output as json.",
|
|
1657
|
+
"helpGroup": "GLOBAL",
|
|
1658
|
+
"name": "json",
|
|
1659
|
+
"allowNo": false,
|
|
1660
|
+
"type": "boolean"
|
|
1661
|
+
},
|
|
1662
|
+
"base-url": {
|
|
1663
|
+
"description": "API base URL",
|
|
1664
|
+
"env": "FACES_BASE_URL",
|
|
1665
|
+
"name": "base-url",
|
|
1666
|
+
"hasDynamicHelp": false,
|
|
1667
|
+
"multiple": false,
|
|
1668
|
+
"type": "option"
|
|
1669
|
+
},
|
|
1670
|
+
"token": {
|
|
1671
|
+
"description": "JWT bearer token",
|
|
1672
|
+
"env": "FACES_TOKEN",
|
|
1673
|
+
"name": "token",
|
|
1674
|
+
"hasDynamicHelp": false,
|
|
1675
|
+
"multiple": false,
|
|
1676
|
+
"type": "option"
|
|
1677
|
+
},
|
|
1678
|
+
"api-key": {
|
|
1679
|
+
"description": "API key",
|
|
1680
|
+
"env": "FACES_API_KEY",
|
|
1681
|
+
"name": "api-key",
|
|
1682
|
+
"hasDynamicHelp": false,
|
|
1683
|
+
"multiple": false,
|
|
1684
|
+
"type": "option"
|
|
1685
|
+
},
|
|
1686
|
+
"k": {
|
|
1687
|
+
"description": "Number of results (1–20)",
|
|
1688
|
+
"name": "k",
|
|
1689
|
+
"default": 5,
|
|
1690
|
+
"hasDynamicHelp": false,
|
|
1691
|
+
"multiple": false,
|
|
1692
|
+
"type": "option"
|
|
1693
|
+
},
|
|
1694
|
+
"component": {
|
|
1695
|
+
"description": "Centroid component to rank on (beta, delta, epsilon are the principal components of a face; face is their composite)",
|
|
1696
|
+
"name": "component",
|
|
1697
|
+
"default": "face",
|
|
1698
|
+
"hasDynamicHelp": false,
|
|
1699
|
+
"multiple": false,
|
|
1700
|
+
"options": [
|
|
1701
|
+
"face",
|
|
1702
|
+
"beta",
|
|
1703
|
+
"delta",
|
|
1704
|
+
"epsilon"
|
|
1705
|
+
],
|
|
1706
|
+
"type": "option"
|
|
1707
|
+
},
|
|
1708
|
+
"direction": {
|
|
1709
|
+
"description": "nearest (most similar) or furthest (most dissimilar)",
|
|
1710
|
+
"name": "direction",
|
|
1711
|
+
"default": "nearest",
|
|
1712
|
+
"hasDynamicHelp": false,
|
|
1713
|
+
"multiple": false,
|
|
1714
|
+
"options": [
|
|
1715
|
+
"nearest",
|
|
1716
|
+
"furthest"
|
|
1717
|
+
],
|
|
1718
|
+
"type": "option"
|
|
1719
|
+
}
|
|
1720
|
+
},
|
|
1721
|
+
"hasDynamicHelp": false,
|
|
1722
|
+
"hiddenAliases": [],
|
|
1723
|
+
"id": "face:neighbors",
|
|
1724
|
+
"pluginAlias": "faces-cli",
|
|
1725
|
+
"pluginName": "faces-cli",
|
|
1726
|
+
"pluginType": "core",
|
|
1727
|
+
"strict": true,
|
|
1728
|
+
"enableJsonFlag": true,
|
|
1729
|
+
"isESM": true,
|
|
1730
|
+
"relativePath": [
|
|
1731
|
+
"dist",
|
|
1732
|
+
"commands",
|
|
1733
|
+
"face",
|
|
1734
|
+
"neighbors.js"
|
|
1735
|
+
]
|
|
1736
|
+
},
|
|
1576
1737
|
"face:stats": {
|
|
1577
1738
|
"aliases": [],
|
|
1578
1739
|
"args": {},
|
|
@@ -1675,6 +1836,13 @@
|
|
|
1675
1836
|
"multiple": false,
|
|
1676
1837
|
"type": "option"
|
|
1677
1838
|
},
|
|
1839
|
+
"formula": {
|
|
1840
|
+
"description": "New boolean formula (synthetic faces only)",
|
|
1841
|
+
"name": "formula",
|
|
1842
|
+
"hasDynamicHelp": false,
|
|
1843
|
+
"multiple": false,
|
|
1844
|
+
"type": "option"
|
|
1845
|
+
},
|
|
1678
1846
|
"attr": {
|
|
1679
1847
|
"description": "Update attribute KEY=VALUE (repeatable)",
|
|
1680
1848
|
"name": "attr",
|
|
@@ -2715,5 +2883,5 @@
|
|
|
2715
2883
|
]
|
|
2716
2884
|
}
|
|
2717
2885
|
},
|
|
2718
|
-
"version": "1.
|
|
2886
|
+
"version": "1.2.0"
|
|
2719
2887
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "faces-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "CLI for the Faces AI platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "sybileak <sybileak@proton.me>",
|
|
@@ -31,18 +31,40 @@
|
|
|
31
31
|
"bin": "faces",
|
|
32
32
|
"dirname": "faces",
|
|
33
33
|
"commands": "./dist/commands",
|
|
34
|
-
"plugins": [
|
|
34
|
+
"plugins": [
|
|
35
|
+
"@oclif/plugin-help"
|
|
36
|
+
],
|
|
35
37
|
"topics": {
|
|
36
|
-
"auth": {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
"
|
|
38
|
+
"auth": {
|
|
39
|
+
"description": "Login, logout, register, and identity"
|
|
40
|
+
},
|
|
41
|
+
"face": {
|
|
42
|
+
"description": "Create and manage face personas"
|
|
43
|
+
},
|
|
44
|
+
"chat": {
|
|
45
|
+
"description": "Run inference via a face"
|
|
46
|
+
},
|
|
47
|
+
"compile": {
|
|
48
|
+
"description": "Compile source texts into a face"
|
|
49
|
+
},
|
|
50
|
+
"compile doc": {
|
|
51
|
+
"description": "Document operations"
|
|
52
|
+
},
|
|
53
|
+
"compile thread": {
|
|
54
|
+
"description": "Thread operations"
|
|
55
|
+
},
|
|
56
|
+
"keys": {
|
|
57
|
+
"description": "Manage API keys (JWT required)"
|
|
58
|
+
},
|
|
59
|
+
"billing": {
|
|
60
|
+
"description": "Credits, subscription, and usage"
|
|
61
|
+
},
|
|
62
|
+
"account": {
|
|
63
|
+
"description": "Account-level operations"
|
|
64
|
+
},
|
|
65
|
+
"config": {
|
|
66
|
+
"description": "Local CLI configuration"
|
|
67
|
+
}
|
|
46
68
|
}
|
|
47
69
|
},
|
|
48
70
|
"files": [
|