faces-cli 1.6.6 → 1.6.8
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/billing/{checkout.d.ts → subscription/activate.d.ts} +2 -2
- package/dist/commands/billing/subscription/activate.js +75 -0
- package/dist/commands/billing/subscription/cancel.d.ts +12 -0
- package/dist/commands/billing/subscription/cancel.js +68 -0
- package/dist/commands/billing/subscription/index.d.ts +10 -0
- package/dist/commands/billing/subscription/index.js +24 -0
- package/oclif.manifest.json +262 -201
- package/package.json +1 -1
- package/dist/commands/billing/checkout.js +0 -30
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseCommand } from '
|
|
2
|
-
export default class
|
|
1
|
+
import { BaseCommand } from '../../../base.js';
|
|
2
|
+
export default class BillingSubscriptionActivate extends BaseCommand {
|
|
3
3
|
static description: string;
|
|
4
4
|
static flags: {
|
|
5
5
|
plan: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { BaseCommand } from '../../../base.js';
|
|
3
|
+
import { FacesAPIError } from '../../../client.js';
|
|
4
|
+
export default class BillingSubscriptionActivate extends BaseCommand {
|
|
5
|
+
static description = 'Activate or reactivate a subscription plan';
|
|
6
|
+
static flags = {
|
|
7
|
+
...BaseCommand.baseFlags,
|
|
8
|
+
plan: Flags.string({
|
|
9
|
+
description: 'Plan to activate',
|
|
10
|
+
options: ['connect'],
|
|
11
|
+
default: 'connect',
|
|
12
|
+
}),
|
|
13
|
+
};
|
|
14
|
+
async run() {
|
|
15
|
+
const { flags } = await this.parse(BillingSubscriptionActivate);
|
|
16
|
+
const client = this.makeClient(flags);
|
|
17
|
+
const json = this.jsonEnabled();
|
|
18
|
+
// Fetch current state
|
|
19
|
+
let sub;
|
|
20
|
+
try {
|
|
21
|
+
sub = await client.get('/v1/billing/subscription');
|
|
22
|
+
}
|
|
23
|
+
catch (err) {
|
|
24
|
+
if (err instanceof FacesAPIError)
|
|
25
|
+
this.error(`Error (${err.statusCode}): ${err.message}`);
|
|
26
|
+
throw err;
|
|
27
|
+
}
|
|
28
|
+
const plan = sub.plan;
|
|
29
|
+
const cancelAtPeriodEnd = sub.cancel_at_period_end;
|
|
30
|
+
// Already active Connect, not pending cancel
|
|
31
|
+
if (plan === 'connect' && !cancelAtPeriodEnd) {
|
|
32
|
+
if (!json)
|
|
33
|
+
this.log('Already on the Connect plan.');
|
|
34
|
+
return { status: 'already_active', plan: 'connect' };
|
|
35
|
+
}
|
|
36
|
+
// Pending cancel — reactivate instead of creating a new checkout
|
|
37
|
+
if (plan === 'connect' && cancelAtPeriodEnd) {
|
|
38
|
+
let data;
|
|
39
|
+
try {
|
|
40
|
+
data = await client.post('/v1/billing/subscription/reactivate');
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
if (err instanceof FacesAPIError)
|
|
44
|
+
this.error(`Error (${err.statusCode}): ${err.message}`);
|
|
45
|
+
throw err;
|
|
46
|
+
}
|
|
47
|
+
const result = data;
|
|
48
|
+
if (!json) {
|
|
49
|
+
this.log(`Reactivated. Connect plan continues — next renewal: ${result.current_period_end ?? 'unknown'}.`);
|
|
50
|
+
}
|
|
51
|
+
return { status: 'reactivated', ...result };
|
|
52
|
+
}
|
|
53
|
+
// Free plan — create checkout
|
|
54
|
+
let data;
|
|
55
|
+
try {
|
|
56
|
+
data = await client.post(`/v1/billing/checkout?plan=${flags.plan}&source=cli`);
|
|
57
|
+
}
|
|
58
|
+
catch (err) {
|
|
59
|
+
if (err instanceof FacesAPIError)
|
|
60
|
+
this.error(`Error (${err.statusCode}): ${err.message}`);
|
|
61
|
+
throw err;
|
|
62
|
+
}
|
|
63
|
+
const result = data;
|
|
64
|
+
const url = result.checkout_url;
|
|
65
|
+
if (!json) {
|
|
66
|
+
this.log('Subscription Connect — $17/month');
|
|
67
|
+
this.log('');
|
|
68
|
+
this.log('Complete payment at this link:');
|
|
69
|
+
this.log(` ${url}`);
|
|
70
|
+
this.log('');
|
|
71
|
+
this.log('After payment, verify with: faces billing:subscription');
|
|
72
|
+
}
|
|
73
|
+
return { status: 'checkout_created', checkout_url: url };
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base.js';
|
|
2
|
+
export default class BillingSubscriptionCancel extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
yes: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
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
|
+
private confirm;
|
|
12
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Flags } from '@oclif/core';
|
|
2
|
+
import { createInterface } from 'node:readline';
|
|
3
|
+
import { BaseCommand } from '../../../base.js';
|
|
4
|
+
import { FacesAPIError } from '../../../client.js';
|
|
5
|
+
export default class BillingSubscriptionCancel extends BaseCommand {
|
|
6
|
+
static description = 'Cancel your subscription (keeps access until period end)';
|
|
7
|
+
static flags = {
|
|
8
|
+
...BaseCommand.baseFlags,
|
|
9
|
+
yes: Flags.boolean({ description: 'Skip confirmation', default: false }),
|
|
10
|
+
};
|
|
11
|
+
async run() {
|
|
12
|
+
const { flags } = await this.parse(BillingSubscriptionCancel);
|
|
13
|
+
const client = this.makeClient(flags);
|
|
14
|
+
const json = this.jsonEnabled();
|
|
15
|
+
// Fetch current state
|
|
16
|
+
let sub;
|
|
17
|
+
try {
|
|
18
|
+
sub = await client.get('/v1/billing/subscription');
|
|
19
|
+
}
|
|
20
|
+
catch (err) {
|
|
21
|
+
if (err instanceof FacesAPIError)
|
|
22
|
+
this.error(`Error (${err.statusCode}): ${err.message}`);
|
|
23
|
+
throw err;
|
|
24
|
+
}
|
|
25
|
+
const plan = sub.plan;
|
|
26
|
+
if (plan === 'free') {
|
|
27
|
+
if (!json)
|
|
28
|
+
this.log('No active subscription to cancel (currently on pay-per-token plan).');
|
|
29
|
+
return { status: 'no_subscription' };
|
|
30
|
+
}
|
|
31
|
+
if (sub.cancel_at_period_end) {
|
|
32
|
+
if (!json)
|
|
33
|
+
this.log(`Already canceled. Connect access ends ${sub.current_period_end ?? 'at period end'}.`);
|
|
34
|
+
return { status: 'already_canceled', current_period_end: sub.current_period_end };
|
|
35
|
+
}
|
|
36
|
+
// Confirm
|
|
37
|
+
if (!flags.yes) {
|
|
38
|
+
const periodEnd = sub.current_period_end ?? 'period end';
|
|
39
|
+
const confirmed = await this.confirm(`Cancel Connect plan? You'll keep access until ${periodEnd}.`);
|
|
40
|
+
if (!confirmed)
|
|
41
|
+
this.error('Aborted.');
|
|
42
|
+
}
|
|
43
|
+
let data;
|
|
44
|
+
try {
|
|
45
|
+
data = await client.post('/v1/billing/subscription/cancel');
|
|
46
|
+
}
|
|
47
|
+
catch (err) {
|
|
48
|
+
if (err instanceof FacesAPIError)
|
|
49
|
+
this.error(`Error (${err.statusCode}): ${err.message}`);
|
|
50
|
+
throw err;
|
|
51
|
+
}
|
|
52
|
+
const result = data;
|
|
53
|
+
if (!json) {
|
|
54
|
+
this.log(`Canceled. Connect access continues until ${result.current_period_end ?? 'period end'}.`);
|
|
55
|
+
this.log('To reactivate before then: faces billing:subscription:activate');
|
|
56
|
+
}
|
|
57
|
+
return { status: 'canceled', ...result };
|
|
58
|
+
}
|
|
59
|
+
confirm(message) {
|
|
60
|
+
return new Promise((resolve) => {
|
|
61
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
62
|
+
rl.question(`${message} [y/N] `, (answer) => {
|
|
63
|
+
rl.close();
|
|
64
|
+
resolve(answer.toLowerCase() === 'y');
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base.js';
|
|
2
|
+
export default class BillingSubscription extends BaseCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static flags: {
|
|
5
|
+
'base-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
6
|
+
token: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
7
|
+
'api-key': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
};
|
|
9
|
+
run(): Promise<unknown>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseCommand } from '../../../base.js';
|
|
2
|
+
import { FacesAPIError } from '../../../client.js';
|
|
3
|
+
export default class BillingSubscription extends BaseCommand {
|
|
4
|
+
static description = 'Show current plan, face count, and renewal date';
|
|
5
|
+
static flags = {
|
|
6
|
+
...BaseCommand.baseFlags,
|
|
7
|
+
};
|
|
8
|
+
async run() {
|
|
9
|
+
const { flags } = await this.parse(BillingSubscription);
|
|
10
|
+
const client = this.makeClient(flags);
|
|
11
|
+
let data;
|
|
12
|
+
try {
|
|
13
|
+
data = await client.get('/v1/billing/subscription');
|
|
14
|
+
}
|
|
15
|
+
catch (err) {
|
|
16
|
+
if (err instanceof FacesAPIError)
|
|
17
|
+
this.error(`Error (${err.statusCode}): ${err.message}`);
|
|
18
|
+
throw err;
|
|
19
|
+
}
|
|
20
|
+
if (!this.jsonEnabled())
|
|
21
|
+
this.printHuman(data);
|
|
22
|
+
return data;
|
|
23
|
+
}
|
|
24
|
+
}
|
package/oclif.manifest.json
CHANGED
|
@@ -638,10 +638,10 @@
|
|
|
638
638
|
"whoami.js"
|
|
639
639
|
]
|
|
640
640
|
},
|
|
641
|
-
"
|
|
641
|
+
"billing:balance": {
|
|
642
642
|
"aliases": [],
|
|
643
643
|
"args": {},
|
|
644
|
-
"description": "
|
|
644
|
+
"description": "Show credit balance and payment method status",
|
|
645
645
|
"flags": {
|
|
646
646
|
"json": {
|
|
647
647
|
"description": "Format output as json.",
|
|
@@ -677,7 +677,7 @@
|
|
|
677
677
|
},
|
|
678
678
|
"hasDynamicHelp": false,
|
|
679
679
|
"hiddenAliases": [],
|
|
680
|
-
"id": "
|
|
680
|
+
"id": "billing:balance",
|
|
681
681
|
"pluginAlias": "faces-cli",
|
|
682
682
|
"pluginName": "faces-cli",
|
|
683
683
|
"pluginType": "core",
|
|
@@ -687,14 +687,14 @@
|
|
|
687
687
|
"relativePath": [
|
|
688
688
|
"dist",
|
|
689
689
|
"commands",
|
|
690
|
-
"
|
|
691
|
-
"
|
|
690
|
+
"billing",
|
|
691
|
+
"balance.js"
|
|
692
692
|
]
|
|
693
693
|
},
|
|
694
|
-
"
|
|
694
|
+
"billing:card-setup": {
|
|
695
695
|
"aliases": [],
|
|
696
696
|
"args": {},
|
|
697
|
-
"description": "
|
|
697
|
+
"description": "Get a Stripe card setup URL to save a payment method",
|
|
698
698
|
"flags": {
|
|
699
699
|
"json": {
|
|
700
700
|
"description": "Format output as json.",
|
|
@@ -726,23 +726,11 @@
|
|
|
726
726
|
"hasDynamicHelp": false,
|
|
727
727
|
"multiple": false,
|
|
728
728
|
"type": "option"
|
|
729
|
-
},
|
|
730
|
-
"fix": {
|
|
731
|
-
"description": "Rebuild missing or stale catalog entries from API",
|
|
732
|
-
"name": "fix",
|
|
733
|
-
"allowNo": false,
|
|
734
|
-
"type": "boolean"
|
|
735
|
-
},
|
|
736
|
-
"generate": {
|
|
737
|
-
"description": "Fix + generate missing descriptions via LLM",
|
|
738
|
-
"name": "generate",
|
|
739
|
-
"allowNo": false,
|
|
740
|
-
"type": "boolean"
|
|
741
729
|
}
|
|
742
730
|
},
|
|
743
731
|
"hasDynamicHelp": false,
|
|
744
732
|
"hiddenAliases": [],
|
|
745
|
-
"id": "
|
|
733
|
+
"id": "billing:card-setup",
|
|
746
734
|
"pluginAlias": "faces-cli",
|
|
747
735
|
"pluginName": "faces-cli",
|
|
748
736
|
"pluginType": "core",
|
|
@@ -752,14 +740,14 @@
|
|
|
752
740
|
"relativePath": [
|
|
753
741
|
"dist",
|
|
754
742
|
"commands",
|
|
755
|
-
"
|
|
756
|
-
"
|
|
743
|
+
"billing",
|
|
744
|
+
"card-setup.js"
|
|
757
745
|
]
|
|
758
746
|
},
|
|
759
|
-
"
|
|
747
|
+
"billing:llm-costs": {
|
|
760
748
|
"aliases": [],
|
|
761
749
|
"args": {},
|
|
762
|
-
"description": "List
|
|
750
|
+
"description": "List available LLMs and their per-token costs",
|
|
763
751
|
"flags": {
|
|
764
752
|
"json": {
|
|
765
753
|
"description": "Format output as json.",
|
|
@@ -791,11 +779,18 @@
|
|
|
791
779
|
"hasDynamicHelp": false,
|
|
792
780
|
"multiple": false,
|
|
793
781
|
"type": "option"
|
|
782
|
+
},
|
|
783
|
+
"provider": {
|
|
784
|
+
"description": "Filter by provider (e.g. openai, anthropic)",
|
|
785
|
+
"name": "provider",
|
|
786
|
+
"hasDynamicHelp": false,
|
|
787
|
+
"multiple": false,
|
|
788
|
+
"type": "option"
|
|
794
789
|
}
|
|
795
790
|
},
|
|
796
791
|
"hasDynamicHelp": false,
|
|
797
792
|
"hiddenAliases": [],
|
|
798
|
-
"id": "
|
|
793
|
+
"id": "billing:llm-costs",
|
|
799
794
|
"pluginAlias": "faces-cli",
|
|
800
795
|
"pluginName": "faces-cli",
|
|
801
796
|
"pluginType": "core",
|
|
@@ -805,14 +800,14 @@
|
|
|
805
800
|
"relativePath": [
|
|
806
801
|
"dist",
|
|
807
802
|
"commands",
|
|
808
|
-
"
|
|
809
|
-
"
|
|
803
|
+
"billing",
|
|
804
|
+
"llm-costs.js"
|
|
810
805
|
]
|
|
811
806
|
},
|
|
812
|
-
"
|
|
807
|
+
"billing:quota": {
|
|
813
808
|
"aliases": [],
|
|
814
809
|
"args": {},
|
|
815
|
-
"description": "
|
|
810
|
+
"description": "Show compilation stats per face (deprecated — use compile:stats)",
|
|
816
811
|
"flags": {
|
|
817
812
|
"json": {
|
|
818
813
|
"description": "Format output as json.",
|
|
@@ -844,38 +839,11 @@
|
|
|
844
839
|
"hasDynamicHelp": false,
|
|
845
840
|
"multiple": false,
|
|
846
841
|
"type": "option"
|
|
847
|
-
},
|
|
848
|
-
"skill": {
|
|
849
|
-
"description": "Show details for a specific skill",
|
|
850
|
-
"name": "skill",
|
|
851
|
-
"hasDynamicHelp": false,
|
|
852
|
-
"multiple": false,
|
|
853
|
-
"type": "option"
|
|
854
|
-
},
|
|
855
|
-
"install": {
|
|
856
|
-
"description": "Install a skill by name",
|
|
857
|
-
"name": "install",
|
|
858
|
-
"hasDynamicHelp": false,
|
|
859
|
-
"multiple": false,
|
|
860
|
-
"type": "option"
|
|
861
|
-
},
|
|
862
|
-
"skills-dir": {
|
|
863
|
-
"description": "Directory to install skills into (required for --install)",
|
|
864
|
-
"name": "skills-dir",
|
|
865
|
-
"hasDynamicHelp": false,
|
|
866
|
-
"multiple": false,
|
|
867
|
-
"type": "option"
|
|
868
|
-
},
|
|
869
|
-
"refresh": {
|
|
870
|
-
"description": "Force refresh the skill index (ignore cache)",
|
|
871
|
-
"name": "refresh",
|
|
872
|
-
"allowNo": false,
|
|
873
|
-
"type": "boolean"
|
|
874
842
|
}
|
|
875
843
|
},
|
|
876
844
|
"hasDynamicHelp": false,
|
|
877
845
|
"hiddenAliases": [],
|
|
878
|
-
"id": "
|
|
846
|
+
"id": "billing:quota",
|
|
879
847
|
"pluginAlias": "faces-cli",
|
|
880
848
|
"pluginName": "faces-cli",
|
|
881
849
|
"pluginType": "core",
|
|
@@ -885,19 +853,14 @@
|
|
|
885
853
|
"relativePath": [
|
|
886
854
|
"dist",
|
|
887
855
|
"commands",
|
|
888
|
-
"
|
|
889
|
-
"
|
|
856
|
+
"billing",
|
|
857
|
+
"quota.js"
|
|
890
858
|
]
|
|
891
859
|
},
|
|
892
|
-
"
|
|
860
|
+
"billing:subscription": {
|
|
893
861
|
"aliases": [],
|
|
894
|
-
"args": {
|
|
895
|
-
|
|
896
|
-
"description": "Backup file path (default: most recent in ~/.faces/backups/)",
|
|
897
|
-
"name": "file"
|
|
898
|
-
}
|
|
899
|
-
},
|
|
900
|
-
"description": "Restore faces, teams, and source material from a backup snapshot",
|
|
862
|
+
"args": {},
|
|
863
|
+
"description": "Show current plan, face count, and renewal date",
|
|
901
864
|
"flags": {
|
|
902
865
|
"json": {
|
|
903
866
|
"description": "Format output as json.",
|
|
@@ -929,17 +892,11 @@
|
|
|
929
892
|
"hasDynamicHelp": false,
|
|
930
893
|
"multiple": false,
|
|
931
894
|
"type": "option"
|
|
932
|
-
},
|
|
933
|
-
"compile": {
|
|
934
|
-
"description": "Run compile:all after restoring",
|
|
935
|
-
"name": "compile",
|
|
936
|
-
"allowNo": false,
|
|
937
|
-
"type": "boolean"
|
|
938
895
|
}
|
|
939
896
|
},
|
|
940
897
|
"hasDynamicHelp": false,
|
|
941
898
|
"hiddenAliases": [],
|
|
942
|
-
"id": "
|
|
899
|
+
"id": "billing:subscription",
|
|
943
900
|
"pluginAlias": "faces-cli",
|
|
944
901
|
"pluginName": "faces-cli",
|
|
945
902
|
"pluginType": "core",
|
|
@@ -949,14 +906,14 @@
|
|
|
949
906
|
"relativePath": [
|
|
950
907
|
"dist",
|
|
951
908
|
"commands",
|
|
952
|
-
"
|
|
953
|
-
"
|
|
909
|
+
"billing",
|
|
910
|
+
"subscription.js"
|
|
954
911
|
]
|
|
955
912
|
},
|
|
956
|
-
"billing:
|
|
913
|
+
"billing:topup": {
|
|
957
914
|
"aliases": [],
|
|
958
915
|
"args": {},
|
|
959
|
-
"description": "
|
|
916
|
+
"description": "Top up credit balance using saved payment method",
|
|
960
917
|
"flags": {
|
|
961
918
|
"json": {
|
|
962
919
|
"description": "Format output as json.",
|
|
@@ -988,56 +945,18 @@
|
|
|
988
945
|
"hasDynamicHelp": false,
|
|
989
946
|
"multiple": false,
|
|
990
947
|
"type": "option"
|
|
991
|
-
}
|
|
992
|
-
},
|
|
993
|
-
"hasDynamicHelp": false,
|
|
994
|
-
"hiddenAliases": [],
|
|
995
|
-
"id": "billing:balance",
|
|
996
|
-
"pluginAlias": "faces-cli",
|
|
997
|
-
"pluginName": "faces-cli",
|
|
998
|
-
"pluginType": "core",
|
|
999
|
-
"strict": true,
|
|
1000
|
-
"enableJsonFlag": true,
|
|
1001
|
-
"isESM": true,
|
|
1002
|
-
"relativePath": [
|
|
1003
|
-
"dist",
|
|
1004
|
-
"commands",
|
|
1005
|
-
"billing",
|
|
1006
|
-
"balance.js"
|
|
1007
|
-
]
|
|
1008
|
-
},
|
|
1009
|
-
"billing:card-setup": {
|
|
1010
|
-
"aliases": [],
|
|
1011
|
-
"args": {},
|
|
1012
|
-
"description": "Get a Stripe card setup URL to save a payment method",
|
|
1013
|
-
"flags": {
|
|
1014
|
-
"json": {
|
|
1015
|
-
"description": "Format output as json.",
|
|
1016
|
-
"helpGroup": "GLOBAL",
|
|
1017
|
-
"name": "json",
|
|
1018
|
-
"allowNo": false,
|
|
1019
|
-
"type": "boolean"
|
|
1020
|
-
},
|
|
1021
|
-
"base-url": {
|
|
1022
|
-
"description": "API base URL",
|
|
1023
|
-
"env": "FACES_BASE_URL",
|
|
1024
|
-
"name": "base-url",
|
|
1025
|
-
"hasDynamicHelp": false,
|
|
1026
|
-
"multiple": false,
|
|
1027
|
-
"type": "option"
|
|
1028
948
|
},
|
|
1029
|
-
"
|
|
1030
|
-
"description": "
|
|
1031
|
-
"
|
|
1032
|
-
"
|
|
949
|
+
"amount": {
|
|
950
|
+
"description": "Top-up amount in USD (min $1)",
|
|
951
|
+
"name": "amount",
|
|
952
|
+
"required": true,
|
|
1033
953
|
"hasDynamicHelp": false,
|
|
1034
954
|
"multiple": false,
|
|
1035
955
|
"type": "option"
|
|
1036
956
|
},
|
|
1037
|
-
"
|
|
1038
|
-
"description": "
|
|
1039
|
-
"
|
|
1040
|
-
"name": "api-key",
|
|
957
|
+
"payment-ref": {
|
|
958
|
+
"description": "Payment reference (admin/test path)",
|
|
959
|
+
"name": "payment-ref",
|
|
1041
960
|
"hasDynamicHelp": false,
|
|
1042
961
|
"multiple": false,
|
|
1043
962
|
"type": "option"
|
|
@@ -1045,7 +964,7 @@
|
|
|
1045
964
|
},
|
|
1046
965
|
"hasDynamicHelp": false,
|
|
1047
966
|
"hiddenAliases": [],
|
|
1048
|
-
"id": "billing:
|
|
967
|
+
"id": "billing:topup",
|
|
1049
968
|
"pluginAlias": "faces-cli",
|
|
1050
969
|
"pluginName": "faces-cli",
|
|
1051
970
|
"pluginType": "core",
|
|
@@ -1056,13 +975,13 @@
|
|
|
1056
975
|
"dist",
|
|
1057
976
|
"commands",
|
|
1058
977
|
"billing",
|
|
1059
|
-
"
|
|
978
|
+
"topup.js"
|
|
1060
979
|
]
|
|
1061
980
|
},
|
|
1062
|
-
"billing:
|
|
981
|
+
"billing:usage": {
|
|
1063
982
|
"aliases": [],
|
|
1064
983
|
"args": {},
|
|
1065
|
-
"description": "
|
|
984
|
+
"description": "Aggregated usage analytics",
|
|
1066
985
|
"flags": {
|
|
1067
986
|
"json": {
|
|
1068
987
|
"description": "Format output as json.",
|
|
@@ -1095,21 +1014,37 @@
|
|
|
1095
1014
|
"multiple": false,
|
|
1096
1015
|
"type": "option"
|
|
1097
1016
|
},
|
|
1098
|
-
"
|
|
1099
|
-
"description": "
|
|
1100
|
-
"name": "
|
|
1101
|
-
"default": "connect",
|
|
1017
|
+
"group-by": {
|
|
1018
|
+
"description": "Group results",
|
|
1019
|
+
"name": "group-by",
|
|
1102
1020
|
"hasDynamicHelp": false,
|
|
1103
1021
|
"multiple": false,
|
|
1104
1022
|
"options": [
|
|
1105
|
-
"
|
|
1023
|
+
"api_key",
|
|
1024
|
+
"model",
|
|
1025
|
+
"llm",
|
|
1026
|
+
"date"
|
|
1106
1027
|
],
|
|
1107
1028
|
"type": "option"
|
|
1029
|
+
},
|
|
1030
|
+
"from": {
|
|
1031
|
+
"description": "Start date (YYYY-MM-DD)",
|
|
1032
|
+
"name": "from",
|
|
1033
|
+
"hasDynamicHelp": false,
|
|
1034
|
+
"multiple": false,
|
|
1035
|
+
"type": "option"
|
|
1036
|
+
},
|
|
1037
|
+
"to": {
|
|
1038
|
+
"description": "End date (YYYY-MM-DD)",
|
|
1039
|
+
"name": "to",
|
|
1040
|
+
"hasDynamicHelp": false,
|
|
1041
|
+
"multiple": false,
|
|
1042
|
+
"type": "option"
|
|
1108
1043
|
}
|
|
1109
1044
|
},
|
|
1110
1045
|
"hasDynamicHelp": false,
|
|
1111
1046
|
"hiddenAliases": [],
|
|
1112
|
-
"id": "billing:
|
|
1047
|
+
"id": "billing:usage",
|
|
1113
1048
|
"pluginAlias": "faces-cli",
|
|
1114
1049
|
"pluginName": "faces-cli",
|
|
1115
1050
|
"pluginType": "core",
|
|
@@ -1120,13 +1055,13 @@
|
|
|
1120
1055
|
"dist",
|
|
1121
1056
|
"commands",
|
|
1122
1057
|
"billing",
|
|
1123
|
-
"
|
|
1058
|
+
"usage.js"
|
|
1124
1059
|
]
|
|
1125
1060
|
},
|
|
1126
|
-
"
|
|
1061
|
+
"catalog:backup": {
|
|
1127
1062
|
"aliases": [],
|
|
1128
1063
|
"args": {},
|
|
1129
|
-
"description": "
|
|
1064
|
+
"description": "Snapshot all faces, teams, and source material for migration",
|
|
1130
1065
|
"flags": {
|
|
1131
1066
|
"json": {
|
|
1132
1067
|
"description": "Format output as json.",
|
|
@@ -1158,18 +1093,11 @@
|
|
|
1158
1093
|
"hasDynamicHelp": false,
|
|
1159
1094
|
"multiple": false,
|
|
1160
1095
|
"type": "option"
|
|
1161
|
-
},
|
|
1162
|
-
"provider": {
|
|
1163
|
-
"description": "Filter by provider (e.g. openai, anthropic)",
|
|
1164
|
-
"name": "provider",
|
|
1165
|
-
"hasDynamicHelp": false,
|
|
1166
|
-
"multiple": false,
|
|
1167
|
-
"type": "option"
|
|
1168
1096
|
}
|
|
1169
1097
|
},
|
|
1170
1098
|
"hasDynamicHelp": false,
|
|
1171
1099
|
"hiddenAliases": [],
|
|
1172
|
-
"id": "
|
|
1100
|
+
"id": "catalog:backup",
|
|
1173
1101
|
"pluginAlias": "faces-cli",
|
|
1174
1102
|
"pluginName": "faces-cli",
|
|
1175
1103
|
"pluginType": "core",
|
|
@@ -1179,14 +1107,14 @@
|
|
|
1179
1107
|
"relativePath": [
|
|
1180
1108
|
"dist",
|
|
1181
1109
|
"commands",
|
|
1182
|
-
"
|
|
1183
|
-
"
|
|
1110
|
+
"catalog",
|
|
1111
|
+
"backup.js"
|
|
1184
1112
|
]
|
|
1185
1113
|
},
|
|
1186
|
-
"
|
|
1114
|
+
"catalog:doctor": {
|
|
1187
1115
|
"aliases": [],
|
|
1188
1116
|
"args": {},
|
|
1189
|
-
"description": "
|
|
1117
|
+
"description": "Diagnose and repair the local face and team catalog",
|
|
1190
1118
|
"flags": {
|
|
1191
1119
|
"json": {
|
|
1192
1120
|
"description": "Format output as json.",
|
|
@@ -1218,11 +1146,23 @@
|
|
|
1218
1146
|
"hasDynamicHelp": false,
|
|
1219
1147
|
"multiple": false,
|
|
1220
1148
|
"type": "option"
|
|
1149
|
+
},
|
|
1150
|
+
"fix": {
|
|
1151
|
+
"description": "Rebuild missing or stale catalog entries from API",
|
|
1152
|
+
"name": "fix",
|
|
1153
|
+
"allowNo": false,
|
|
1154
|
+
"type": "boolean"
|
|
1155
|
+
},
|
|
1156
|
+
"generate": {
|
|
1157
|
+
"description": "Fix + generate missing descriptions via LLM",
|
|
1158
|
+
"name": "generate",
|
|
1159
|
+
"allowNo": false,
|
|
1160
|
+
"type": "boolean"
|
|
1221
1161
|
}
|
|
1222
1162
|
},
|
|
1223
1163
|
"hasDynamicHelp": false,
|
|
1224
1164
|
"hiddenAliases": [],
|
|
1225
|
-
"id": "
|
|
1165
|
+
"id": "catalog:doctor",
|
|
1226
1166
|
"pluginAlias": "faces-cli",
|
|
1227
1167
|
"pluginName": "faces-cli",
|
|
1228
1168
|
"pluginType": "core",
|
|
@@ -1232,14 +1172,14 @@
|
|
|
1232
1172
|
"relativePath": [
|
|
1233
1173
|
"dist",
|
|
1234
1174
|
"commands",
|
|
1235
|
-
"
|
|
1236
|
-
"
|
|
1175
|
+
"catalog",
|
|
1176
|
+
"doctor.js"
|
|
1237
1177
|
]
|
|
1238
1178
|
},
|
|
1239
|
-
"
|
|
1179
|
+
"catalog:list": {
|
|
1240
1180
|
"aliases": [],
|
|
1241
1181
|
"args": {},
|
|
1242
|
-
"description": "
|
|
1182
|
+
"description": "List all faces in the local catalog",
|
|
1243
1183
|
"flags": {
|
|
1244
1184
|
"json": {
|
|
1245
1185
|
"description": "Format output as json.",
|
|
@@ -1275,7 +1215,7 @@
|
|
|
1275
1215
|
},
|
|
1276
1216
|
"hasDynamicHelp": false,
|
|
1277
1217
|
"hiddenAliases": [],
|
|
1278
|
-
"id": "
|
|
1218
|
+
"id": "catalog:list",
|
|
1279
1219
|
"pluginAlias": "faces-cli",
|
|
1280
1220
|
"pluginName": "faces-cli",
|
|
1281
1221
|
"pluginType": "core",
|
|
@@ -1285,14 +1225,14 @@
|
|
|
1285
1225
|
"relativePath": [
|
|
1286
1226
|
"dist",
|
|
1287
1227
|
"commands",
|
|
1288
|
-
"
|
|
1289
|
-
"
|
|
1228
|
+
"catalog",
|
|
1229
|
+
"list.js"
|
|
1290
1230
|
]
|
|
1291
1231
|
},
|
|
1292
|
-
"
|
|
1232
|
+
"catalog:manyfaced": {
|
|
1293
1233
|
"aliases": [],
|
|
1294
1234
|
"args": {},
|
|
1295
|
-
"description": "
|
|
1235
|
+
"description": "Browse and install community manyfaced skills from github.com/facessh/manyfaced",
|
|
1296
1236
|
"flags": {
|
|
1297
1237
|
"json": {
|
|
1298
1238
|
"description": "Format output as json.",
|
|
@@ -1325,25 +1265,37 @@
|
|
|
1325
1265
|
"multiple": false,
|
|
1326
1266
|
"type": "option"
|
|
1327
1267
|
},
|
|
1328
|
-
"
|
|
1329
|
-
"description": "
|
|
1330
|
-
"name": "
|
|
1331
|
-
"required": true,
|
|
1268
|
+
"skill": {
|
|
1269
|
+
"description": "Show details for a specific skill",
|
|
1270
|
+
"name": "skill",
|
|
1332
1271
|
"hasDynamicHelp": false,
|
|
1333
1272
|
"multiple": false,
|
|
1334
1273
|
"type": "option"
|
|
1335
1274
|
},
|
|
1336
|
-
"
|
|
1337
|
-
"description": "
|
|
1338
|
-
"name": "
|
|
1275
|
+
"install": {
|
|
1276
|
+
"description": "Install a skill by name",
|
|
1277
|
+
"name": "install",
|
|
1278
|
+
"hasDynamicHelp": false,
|
|
1279
|
+
"multiple": false,
|
|
1280
|
+
"type": "option"
|
|
1281
|
+
},
|
|
1282
|
+
"skills-dir": {
|
|
1283
|
+
"description": "Directory to install skills into (required for --install)",
|
|
1284
|
+
"name": "skills-dir",
|
|
1339
1285
|
"hasDynamicHelp": false,
|
|
1340
1286
|
"multiple": false,
|
|
1341
1287
|
"type": "option"
|
|
1288
|
+
},
|
|
1289
|
+
"refresh": {
|
|
1290
|
+
"description": "Force refresh the skill index (ignore cache)",
|
|
1291
|
+
"name": "refresh",
|
|
1292
|
+
"allowNo": false,
|
|
1293
|
+
"type": "boolean"
|
|
1342
1294
|
}
|
|
1343
1295
|
},
|
|
1344
1296
|
"hasDynamicHelp": false,
|
|
1345
1297
|
"hiddenAliases": [],
|
|
1346
|
-
"id": "
|
|
1298
|
+
"id": "catalog:manyfaced",
|
|
1347
1299
|
"pluginAlias": "faces-cli",
|
|
1348
1300
|
"pluginName": "faces-cli",
|
|
1349
1301
|
"pluginType": "core",
|
|
@@ -1353,14 +1305,19 @@
|
|
|
1353
1305
|
"relativePath": [
|
|
1354
1306
|
"dist",
|
|
1355
1307
|
"commands",
|
|
1356
|
-
"
|
|
1357
|
-
"
|
|
1308
|
+
"catalog",
|
|
1309
|
+
"manyfaced.js"
|
|
1358
1310
|
]
|
|
1359
1311
|
},
|
|
1360
|
-
"
|
|
1312
|
+
"catalog:restore": {
|
|
1361
1313
|
"aliases": [],
|
|
1362
|
-
"args": {
|
|
1363
|
-
|
|
1314
|
+
"args": {
|
|
1315
|
+
"file": {
|
|
1316
|
+
"description": "Backup file path (default: most recent in ~/.faces/backups/)",
|
|
1317
|
+
"name": "file"
|
|
1318
|
+
}
|
|
1319
|
+
},
|
|
1320
|
+
"description": "Restore faces, teams, and source material from a backup snapshot",
|
|
1364
1321
|
"flags": {
|
|
1365
1322
|
"json": {
|
|
1366
1323
|
"description": "Format output as json.",
|
|
@@ -1393,37 +1350,16 @@
|
|
|
1393
1350
|
"multiple": false,
|
|
1394
1351
|
"type": "option"
|
|
1395
1352
|
},
|
|
1396
|
-
"
|
|
1397
|
-
"description": "
|
|
1398
|
-
"name": "
|
|
1399
|
-
"
|
|
1400
|
-
"
|
|
1401
|
-
"options": [
|
|
1402
|
-
"api_key",
|
|
1403
|
-
"model",
|
|
1404
|
-
"llm",
|
|
1405
|
-
"date"
|
|
1406
|
-
],
|
|
1407
|
-
"type": "option"
|
|
1408
|
-
},
|
|
1409
|
-
"from": {
|
|
1410
|
-
"description": "Start date (YYYY-MM-DD)",
|
|
1411
|
-
"name": "from",
|
|
1412
|
-
"hasDynamicHelp": false,
|
|
1413
|
-
"multiple": false,
|
|
1414
|
-
"type": "option"
|
|
1415
|
-
},
|
|
1416
|
-
"to": {
|
|
1417
|
-
"description": "End date (YYYY-MM-DD)",
|
|
1418
|
-
"name": "to",
|
|
1419
|
-
"hasDynamicHelp": false,
|
|
1420
|
-
"multiple": false,
|
|
1421
|
-
"type": "option"
|
|
1353
|
+
"compile": {
|
|
1354
|
+
"description": "Run compile:all after restoring",
|
|
1355
|
+
"name": "compile",
|
|
1356
|
+
"allowNo": false,
|
|
1357
|
+
"type": "boolean"
|
|
1422
1358
|
}
|
|
1423
1359
|
},
|
|
1424
1360
|
"hasDynamicHelp": false,
|
|
1425
1361
|
"hiddenAliases": [],
|
|
1426
|
-
"id": "
|
|
1362
|
+
"id": "catalog:restore",
|
|
1427
1363
|
"pluginAlias": "faces-cli",
|
|
1428
1364
|
"pluginName": "faces-cli",
|
|
1429
1365
|
"pluginType": "core",
|
|
@@ -1433,8 +1369,8 @@
|
|
|
1433
1369
|
"relativePath": [
|
|
1434
1370
|
"dist",
|
|
1435
1371
|
"commands",
|
|
1436
|
-
"
|
|
1437
|
-
"
|
|
1372
|
+
"catalog",
|
|
1373
|
+
"restore.js"
|
|
1438
1374
|
]
|
|
1439
1375
|
},
|
|
1440
1376
|
"chat:chat": {
|
|
@@ -3916,6 +3852,131 @@
|
|
|
3916
3852
|
"update.js"
|
|
3917
3853
|
]
|
|
3918
3854
|
},
|
|
3855
|
+
"billing:subscription:activate": {
|
|
3856
|
+
"aliases": [],
|
|
3857
|
+
"args": {},
|
|
3858
|
+
"description": "Activate or reactivate a subscription plan",
|
|
3859
|
+
"flags": {
|
|
3860
|
+
"json": {
|
|
3861
|
+
"description": "Format output as json.",
|
|
3862
|
+
"helpGroup": "GLOBAL",
|
|
3863
|
+
"name": "json",
|
|
3864
|
+
"allowNo": false,
|
|
3865
|
+
"type": "boolean"
|
|
3866
|
+
},
|
|
3867
|
+
"base-url": {
|
|
3868
|
+
"description": "API base URL",
|
|
3869
|
+
"env": "FACES_BASE_URL",
|
|
3870
|
+
"name": "base-url",
|
|
3871
|
+
"hasDynamicHelp": false,
|
|
3872
|
+
"multiple": false,
|
|
3873
|
+
"type": "option"
|
|
3874
|
+
},
|
|
3875
|
+
"token": {
|
|
3876
|
+
"description": "JWT bearer token",
|
|
3877
|
+
"env": "FACES_TOKEN",
|
|
3878
|
+
"name": "token",
|
|
3879
|
+
"hasDynamicHelp": false,
|
|
3880
|
+
"multiple": false,
|
|
3881
|
+
"type": "option"
|
|
3882
|
+
},
|
|
3883
|
+
"api-key": {
|
|
3884
|
+
"description": "API key",
|
|
3885
|
+
"env": "FACES_API_KEY",
|
|
3886
|
+
"name": "api-key",
|
|
3887
|
+
"hasDynamicHelp": false,
|
|
3888
|
+
"multiple": false,
|
|
3889
|
+
"type": "option"
|
|
3890
|
+
},
|
|
3891
|
+
"plan": {
|
|
3892
|
+
"description": "Plan to activate",
|
|
3893
|
+
"name": "plan",
|
|
3894
|
+
"default": "connect",
|
|
3895
|
+
"hasDynamicHelp": false,
|
|
3896
|
+
"multiple": false,
|
|
3897
|
+
"options": [
|
|
3898
|
+
"connect"
|
|
3899
|
+
],
|
|
3900
|
+
"type": "option"
|
|
3901
|
+
}
|
|
3902
|
+
},
|
|
3903
|
+
"hasDynamicHelp": false,
|
|
3904
|
+
"hiddenAliases": [],
|
|
3905
|
+
"id": "billing:subscription:activate",
|
|
3906
|
+
"pluginAlias": "faces-cli",
|
|
3907
|
+
"pluginName": "faces-cli",
|
|
3908
|
+
"pluginType": "core",
|
|
3909
|
+
"strict": true,
|
|
3910
|
+
"enableJsonFlag": true,
|
|
3911
|
+
"isESM": true,
|
|
3912
|
+
"relativePath": [
|
|
3913
|
+
"dist",
|
|
3914
|
+
"commands",
|
|
3915
|
+
"billing",
|
|
3916
|
+
"subscription",
|
|
3917
|
+
"activate.js"
|
|
3918
|
+
]
|
|
3919
|
+
},
|
|
3920
|
+
"billing:subscription:cancel": {
|
|
3921
|
+
"aliases": [],
|
|
3922
|
+
"args": {},
|
|
3923
|
+
"description": "Cancel your subscription (keeps access until period end)",
|
|
3924
|
+
"flags": {
|
|
3925
|
+
"json": {
|
|
3926
|
+
"description": "Format output as json.",
|
|
3927
|
+
"helpGroup": "GLOBAL",
|
|
3928
|
+
"name": "json",
|
|
3929
|
+
"allowNo": false,
|
|
3930
|
+
"type": "boolean"
|
|
3931
|
+
},
|
|
3932
|
+
"base-url": {
|
|
3933
|
+
"description": "API base URL",
|
|
3934
|
+
"env": "FACES_BASE_URL",
|
|
3935
|
+
"name": "base-url",
|
|
3936
|
+
"hasDynamicHelp": false,
|
|
3937
|
+
"multiple": false,
|
|
3938
|
+
"type": "option"
|
|
3939
|
+
},
|
|
3940
|
+
"token": {
|
|
3941
|
+
"description": "JWT bearer token",
|
|
3942
|
+
"env": "FACES_TOKEN",
|
|
3943
|
+
"name": "token",
|
|
3944
|
+
"hasDynamicHelp": false,
|
|
3945
|
+
"multiple": false,
|
|
3946
|
+
"type": "option"
|
|
3947
|
+
},
|
|
3948
|
+
"api-key": {
|
|
3949
|
+
"description": "API key",
|
|
3950
|
+
"env": "FACES_API_KEY",
|
|
3951
|
+
"name": "api-key",
|
|
3952
|
+
"hasDynamicHelp": false,
|
|
3953
|
+
"multiple": false,
|
|
3954
|
+
"type": "option"
|
|
3955
|
+
},
|
|
3956
|
+
"yes": {
|
|
3957
|
+
"description": "Skip confirmation",
|
|
3958
|
+
"name": "yes",
|
|
3959
|
+
"allowNo": false,
|
|
3960
|
+
"type": "boolean"
|
|
3961
|
+
}
|
|
3962
|
+
},
|
|
3963
|
+
"hasDynamicHelp": false,
|
|
3964
|
+
"hiddenAliases": [],
|
|
3965
|
+
"id": "billing:subscription:cancel",
|
|
3966
|
+
"pluginAlias": "faces-cli",
|
|
3967
|
+
"pluginName": "faces-cli",
|
|
3968
|
+
"pluginType": "core",
|
|
3969
|
+
"strict": true,
|
|
3970
|
+
"enableJsonFlag": true,
|
|
3971
|
+
"isESM": true,
|
|
3972
|
+
"relativePath": [
|
|
3973
|
+
"dist",
|
|
3974
|
+
"commands",
|
|
3975
|
+
"billing",
|
|
3976
|
+
"subscription",
|
|
3977
|
+
"cancel.js"
|
|
3978
|
+
]
|
|
3979
|
+
},
|
|
3919
3980
|
"compile:doc:create": {
|
|
3920
3981
|
"aliases": [],
|
|
3921
3982
|
"args": {
|
|
@@ -5833,5 +5894,5 @@
|
|
|
5833
5894
|
]
|
|
5834
5895
|
}
|
|
5835
5896
|
},
|
|
5836
|
-
"version": "1.6.
|
|
5897
|
+
"version": "1.6.8"
|
|
5837
5898
|
}
|
package/package.json
CHANGED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Flags } from '@oclif/core';
|
|
2
|
-
import { BaseCommand } from '../../base.js';
|
|
3
|
-
import { FacesAPIError } from '../../client.js';
|
|
4
|
-
export default class BillingCheckout extends BaseCommand {
|
|
5
|
-
static description = 'Get a Stripe checkout URL to upgrade your subscription plan';
|
|
6
|
-
static flags = {
|
|
7
|
-
...BaseCommand.baseFlags,
|
|
8
|
-
plan: Flags.string({
|
|
9
|
-
description: 'Plan to subscribe to',
|
|
10
|
-
options: ['connect'],
|
|
11
|
-
default: 'connect',
|
|
12
|
-
}),
|
|
13
|
-
};
|
|
14
|
-
async run() {
|
|
15
|
-
const { flags } = await this.parse(BillingCheckout);
|
|
16
|
-
const client = this.makeClient(flags);
|
|
17
|
-
let data;
|
|
18
|
-
try {
|
|
19
|
-
data = await client.post(`/v1/billing/checkout?plan=${flags.plan}&source=cli`);
|
|
20
|
-
}
|
|
21
|
-
catch (err) {
|
|
22
|
-
if (err instanceof FacesAPIError)
|
|
23
|
-
this.error(`Error (${err.statusCode}): ${err.message}`);
|
|
24
|
-
throw err;
|
|
25
|
-
}
|
|
26
|
-
if (!this.jsonEnabled())
|
|
27
|
-
this.printHuman(data);
|
|
28
|
-
return data;
|
|
29
|
-
}
|
|
30
|
-
}
|