faces-cli 1.5.3 → 1.5.4

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/base.d.ts CHANGED
@@ -12,5 +12,8 @@ export declare abstract class BaseCommand extends Command {
12
12
  token?: string;
13
13
  'api-key'?: string;
14
14
  }, _requireJwt?: boolean): FacesClient;
15
+ catch(err: Error & {
16
+ exitCode?: number;
17
+ }): Promise<unknown>;
15
18
  protected printHuman(data: unknown, indent?: number): void;
16
19
  }
package/dist/base.js CHANGED
@@ -23,6 +23,16 @@ export class BaseCommand extends Command {
23
23
  const apiKey = resolveApiKey(flags['api-key']);
24
24
  return new FacesClient(baseUrl, token, apiKey);
25
25
  }
26
+ async catch(err) {
27
+ // When --json is enabled, oclif swallows error messages. Override to
28
+ // include the message in structured JSON output so agents can parse it.
29
+ if (this.jsonEnabled()) {
30
+ const code = err.exitCode ?? 1;
31
+ process.stdout.write(JSON.stringify({ error: { message: err.message, code } }) + '\n');
32
+ process.exit(code);
33
+ }
34
+ throw err;
35
+ }
26
36
  printHuman(data, indent = 0) {
27
37
  const prefix = ' '.repeat(indent);
28
38
  if (Array.isArray(data)) {
@@ -37,10 +37,11 @@ export default class CompileThreadEdit extends BaseCommand {
37
37
  if (!messages || messages.length === 0) {
38
38
  this.error('Thread has no messages to remap');
39
39
  }
40
- // Remap roles
40
+ // Remap roles — case-insensitive exact match against speaker label
41
41
  let remapped = 0;
42
+ const speakerLower = speaker.toLowerCase();
42
43
  const updated = messages.map((m) => {
43
- const isFace = m.name && m.name.toLowerCase() === speaker.toLowerCase();
44
+ const isFace = (m.name ?? '').toLowerCase() === speakerLower;
44
45
  const newRole = isFace ? 'user' : 'assistant';
45
46
  if (m.role !== newRole)
46
47
  remapped++;
@@ -2810,7 +2810,7 @@
2810
2810
  "update.js"
2811
2811
  ]
2812
2812
  },
2813
- "compile:thread:create": {
2813
+ "compile:doc:create": {
2814
2814
  "aliases": [],
2815
2815
  "args": {
2816
2816
  "face_id": {
@@ -2819,7 +2819,7 @@
2819
2819
  "required": true
2820
2820
  }
2821
2821
  },
2822
- "description": "Start a new thread for a face",
2822
+ "description": "Submit a document to a face",
2823
2823
  "flags": {
2824
2824
  "json": {
2825
2825
  "description": "Format output as json.",
@@ -2853,16 +2853,42 @@
2853
2853
  "type": "option"
2854
2854
  },
2855
2855
  "label": {
2856
- "description": "Thread label",
2856
+ "description": "Document label/title",
2857
2857
  "name": "label",
2858
2858
  "hasDynamicHelp": false,
2859
2859
  "multiple": false,
2860
2860
  "type": "option"
2861
+ },
2862
+ "content": {
2863
+ "description": "Inline text content",
2864
+ "name": "content",
2865
+ "hasDynamicHelp": false,
2866
+ "multiple": false,
2867
+ "type": "option"
2868
+ },
2869
+ "file": {
2870
+ "description": "Read content from file",
2871
+ "name": "file",
2872
+ "hasDynamicHelp": false,
2873
+ "multiple": false,
2874
+ "type": "option"
2875
+ },
2876
+ "perspective": {
2877
+ "description": "Perspective (first-person or third-person)",
2878
+ "name": "perspective",
2879
+ "default": "first-person",
2880
+ "hasDynamicHelp": false,
2881
+ "multiple": false,
2882
+ "options": [
2883
+ "first-person",
2884
+ "third-person"
2885
+ ],
2886
+ "type": "option"
2861
2887
  }
2862
2888
  },
2863
2889
  "hasDynamicHelp": false,
2864
2890
  "hiddenAliases": [],
2865
- "id": "compile:thread:create",
2891
+ "id": "compile:doc:create",
2866
2892
  "pluginAlias": "faces-cli",
2867
2893
  "pluginName": "faces-cli",
2868
2894
  "pluginType": "core",
@@ -2873,20 +2899,20 @@
2873
2899
  "dist",
2874
2900
  "commands",
2875
2901
  "compile",
2876
- "thread",
2902
+ "doc",
2877
2903
  "create.js"
2878
2904
  ]
2879
2905
  },
2880
- "compile:thread:delete": {
2906
+ "compile:doc:delete": {
2881
2907
  "aliases": [],
2882
2908
  "args": {
2883
- "thread_id": {
2884
- "description": "Thread ID",
2885
- "name": "thread_id",
2909
+ "doc_id": {
2910
+ "description": "Document ID",
2911
+ "name": "doc_id",
2886
2912
  "required": true
2887
2913
  }
2888
2914
  },
2889
- "description": "Delete a thread",
2915
+ "description": "Delete a document",
2890
2916
  "flags": {
2891
2917
  "json": {
2892
2918
  "description": "Format output as json.",
@@ -2918,17 +2944,11 @@
2918
2944
  "hasDynamicHelp": false,
2919
2945
  "multiple": false,
2920
2946
  "type": "option"
2921
- },
2922
- "yes": {
2923
- "description": "Skip confirmation",
2924
- "name": "yes",
2925
- "allowNo": false,
2926
- "type": "boolean"
2927
2947
  }
2928
2948
  },
2929
2949
  "hasDynamicHelp": false,
2930
2950
  "hiddenAliases": [],
2931
- "id": "compile:thread:delete",
2951
+ "id": "compile:doc:delete",
2932
2952
  "pluginAlias": "faces-cli",
2933
2953
  "pluginName": "faces-cli",
2934
2954
  "pluginType": "core",
@@ -2939,20 +2959,20 @@
2939
2959
  "dist",
2940
2960
  "commands",
2941
2961
  "compile",
2942
- "thread",
2962
+ "doc",
2943
2963
  "delete.js"
2944
2964
  ]
2945
2965
  },
2946
- "compile:thread:edit": {
2966
+ "compile:doc:edit": {
2947
2967
  "aliases": [],
2948
2968
  "args": {
2949
- "thread_id": {
2950
- "description": "Thread ID",
2951
- "name": "thread_id",
2969
+ "doc_id": {
2970
+ "description": "Document ID",
2971
+ "name": "doc_id",
2952
2972
  "required": true
2953
2973
  }
2954
2974
  },
2955
- "description": "Edit a thread (label and/or reassign face speaker)",
2975
+ "description": "Edit a document (label, content, or perspective)",
2956
2976
  "flags": {
2957
2977
  "json": {
2958
2978
  "description": "Format output as json.",
@@ -2986,23 +3006,41 @@
2986
3006
  "type": "option"
2987
3007
  },
2988
3008
  "label": {
2989
- "description": "New thread label",
3009
+ "description": "New label/title",
2990
3010
  "name": "label",
2991
3011
  "hasDynamicHelp": false,
2992
3012
  "multiple": false,
2993
3013
  "type": "option"
2994
3014
  },
2995
- "face-speaker": {
2996
- "description": "Reassign face speaker: set this speaker to role=user, all others to role=assistant",
2997
- "name": "face-speaker",
3015
+ "content": {
3016
+ "description": "New inline text content",
3017
+ "name": "content",
2998
3018
  "hasDynamicHelp": false,
2999
3019
  "multiple": false,
3000
3020
  "type": "option"
3021
+ },
3022
+ "file": {
3023
+ "description": "Read new content from file",
3024
+ "name": "file",
3025
+ "hasDynamicHelp": false,
3026
+ "multiple": false,
3027
+ "type": "option"
3028
+ },
3029
+ "perspective": {
3030
+ "description": "Perspective (first-person or third-person)",
3031
+ "name": "perspective",
3032
+ "hasDynamicHelp": false,
3033
+ "multiple": false,
3034
+ "options": [
3035
+ "first-person",
3036
+ "third-person"
3037
+ ],
3038
+ "type": "option"
3001
3039
  }
3002
3040
  },
3003
3041
  "hasDynamicHelp": false,
3004
3042
  "hiddenAliases": [],
3005
- "id": "compile:thread:edit",
3043
+ "id": "compile:doc:edit",
3006
3044
  "pluginAlias": "faces-cli",
3007
3045
  "pluginName": "faces-cli",
3008
3046
  "pluginType": "core",
@@ -3013,20 +3051,20 @@
3013
3051
  "dist",
3014
3052
  "commands",
3015
3053
  "compile",
3016
- "thread",
3054
+ "doc",
3017
3055
  "edit.js"
3018
3056
  ]
3019
3057
  },
3020
- "compile:thread:get": {
3058
+ "compile:doc:get": {
3021
3059
  "aliases": [],
3022
3060
  "args": {
3023
- "thread_id": {
3024
- "description": "Thread ID",
3025
- "name": "thread_id",
3061
+ "doc_id": {
3062
+ "description": "Document ID",
3063
+ "name": "doc_id",
3026
3064
  "required": true
3027
3065
  }
3028
3066
  },
3029
- "description": "Get a thread by ID",
3067
+ "description": "Get a document by ID",
3030
3068
  "flags": {
3031
3069
  "json": {
3032
3070
  "description": "Format output as json.",
@@ -3062,7 +3100,7 @@
3062
3100
  },
3063
3101
  "hasDynamicHelp": false,
3064
3102
  "hiddenAliases": [],
3065
- "id": "compile:thread:get",
3103
+ "id": "compile:doc:get",
3066
3104
  "pluginAlias": "faces-cli",
3067
3105
  "pluginName": "faces-cli",
3068
3106
  "pluginType": "core",
@@ -3073,11 +3111,11 @@
3073
3111
  "dist",
3074
3112
  "commands",
3075
3113
  "compile",
3076
- "thread",
3114
+ "doc",
3077
3115
  "get.js"
3078
3116
  ]
3079
3117
  },
3080
- "compile:thread:list": {
3118
+ "compile:doc": {
3081
3119
  "aliases": [],
3082
3120
  "args": {
3083
3121
  "face_id": {
@@ -3086,7 +3124,7 @@
3086
3124
  "required": true
3087
3125
  }
3088
3126
  },
3089
- "description": "List threads for a face",
3127
+ "description": "Compile a document into a face (create → make in one step)",
3090
3128
  "flags": {
3091
3129
  "json": {
3092
3130
  "description": "Format output as json.",
@@ -3118,67 +3156,40 @@
3118
3156
  "hasDynamicHelp": false,
3119
3157
  "multiple": false,
3120
3158
  "type": "option"
3121
- }
3122
- },
3123
- "hasDynamicHelp": false,
3124
- "hiddenAliases": [],
3125
- "id": "compile:thread:list",
3126
- "pluginAlias": "faces-cli",
3127
- "pluginName": "faces-cli",
3128
- "pluginType": "core",
3129
- "strict": true,
3130
- "enableJsonFlag": true,
3131
- "isESM": true,
3132
- "relativePath": [
3133
- "dist",
3134
- "commands",
3135
- "compile",
3136
- "thread",
3137
- "list.js"
3138
- ]
3139
- },
3140
- "compile:thread:make": {
3141
- "aliases": [],
3142
- "args": {
3143
- "thread_id": {
3144
- "description": "Thread ID",
3145
- "name": "thread_id",
3146
- "required": true
3147
- }
3148
- },
3149
- "description": "Compile an existing thread (prepare + sync in one step)",
3150
- "flags": {
3151
- "json": {
3152
- "description": "Format output as json.",
3153
- "helpGroup": "GLOBAL",
3154
- "name": "json",
3155
- "allowNo": false,
3156
- "type": "boolean"
3157
3159
  },
3158
- "base-url": {
3159
- "description": "API base URL",
3160
- "env": "FACES_BASE_URL",
3161
- "name": "base-url",
3160
+ "label": {
3161
+ "description": "Document label/title",
3162
+ "name": "label",
3162
3163
  "hasDynamicHelp": false,
3163
3164
  "multiple": false,
3164
3165
  "type": "option"
3165
3166
  },
3166
- "token": {
3167
- "description": "JWT bearer token",
3168
- "env": "FACES_TOKEN",
3169
- "name": "token",
3167
+ "content": {
3168
+ "description": "Inline text content",
3169
+ "name": "content",
3170
3170
  "hasDynamicHelp": false,
3171
3171
  "multiple": false,
3172
3172
  "type": "option"
3173
3173
  },
3174
- "api-key": {
3175
- "description": "API key",
3176
- "env": "FACES_API_KEY",
3177
- "name": "api-key",
3174
+ "file": {
3175
+ "description": "Read content from file",
3176
+ "name": "file",
3178
3177
  "hasDynamicHelp": false,
3179
3178
  "multiple": false,
3180
3179
  "type": "option"
3181
3180
  },
3181
+ "perspective": {
3182
+ "description": "Perspective",
3183
+ "name": "perspective",
3184
+ "default": "first-person",
3185
+ "hasDynamicHelp": false,
3186
+ "multiple": false,
3187
+ "options": [
3188
+ "first-person",
3189
+ "third-person"
3190
+ ],
3191
+ "type": "option"
3192
+ },
3182
3193
  "timeout": {
3183
3194
  "description": "Compile timeout in seconds (default: 600)",
3184
3195
  "name": "timeout",
@@ -3188,7 +3199,7 @@
3188
3199
  "type": "option"
3189
3200
  },
3190
3201
  "no-wait": {
3191
- "description": "Return immediately after triggering compilation. Prints the thread ID for manual polling.",
3202
+ "description": "Create and trigger compilation, then return immediately without polling.",
3192
3203
  "name": "no-wait",
3193
3204
  "allowNo": false,
3194
3205
  "type": "boolean"
@@ -3196,7 +3207,7 @@
3196
3207
  },
3197
3208
  "hasDynamicHelp": false,
3198
3209
  "hiddenAliases": [],
3199
- "id": "compile:thread:make",
3210
+ "id": "compile:doc",
3200
3211
  "pluginAlias": "faces-cli",
3201
3212
  "pluginName": "faces-cli",
3202
3213
  "pluginType": "core",
@@ -3207,20 +3218,20 @@
3207
3218
  "dist",
3208
3219
  "commands",
3209
3220
  "compile",
3210
- "thread",
3211
- "make.js"
3221
+ "doc",
3222
+ "index.js"
3212
3223
  ]
3213
3224
  },
3214
- "compile:thread:message": {
3225
+ "compile:doc:list": {
3215
3226
  "aliases": [],
3216
3227
  "args": {
3217
- "thread_id": {
3218
- "description": "Thread ID",
3219
- "name": "thread_id",
3228
+ "face_id": {
3229
+ "description": "Face alias",
3230
+ "name": "face_id",
3220
3231
  "required": true
3221
3232
  }
3222
3233
  },
3223
- "description": "Send a user message to a thread",
3234
+ "description": "List documents for a face",
3224
3235
  "flags": {
3225
3236
  "json": {
3226
3237
  "description": "Format output as json.",
@@ -3252,20 +3263,11 @@
3252
3263
  "hasDynamicHelp": false,
3253
3264
  "multiple": false,
3254
3265
  "type": "option"
3255
- },
3256
- "message": {
3257
- "char": "m",
3258
- "description": "User message to append",
3259
- "name": "message",
3260
- "required": true,
3261
- "hasDynamicHelp": false,
3262
- "multiple": false,
3263
- "type": "option"
3264
3266
  }
3265
3267
  },
3266
3268
  "hasDynamicHelp": false,
3267
3269
  "hiddenAliases": [],
3268
- "id": "compile:thread:message",
3270
+ "id": "compile:doc:list",
3269
3271
  "pluginAlias": "faces-cli",
3270
3272
  "pluginName": "faces-cli",
3271
3273
  "pluginType": "core",
@@ -3276,20 +3278,20 @@
3276
3278
  "dist",
3277
3279
  "commands",
3278
3280
  "compile",
3279
- "thread",
3280
- "message.js"
3281
+ "doc",
3282
+ "list.js"
3281
3283
  ]
3282
3284
  },
3283
- "compile:thread:sync": {
3285
+ "compile:doc:make": {
3284
3286
  "aliases": [],
3285
3287
  "args": {
3286
- "thread_id": {
3287
- "description": "Thread ID",
3288
- "name": "thread_id",
3288
+ "doc_id": {
3289
+ "description": "Document ID",
3290
+ "name": "doc_id",
3289
3291
  "required": true
3290
3292
  }
3291
3293
  },
3292
- "description": "Archive and sync a thread into a face",
3294
+ "description": "Compile an existing document (prepare + sync in one step)",
3293
3295
  "flags": {
3294
3296
  "json": {
3295
3297
  "description": "Format output as json.",
@@ -3321,11 +3323,25 @@
3321
3323
  "hasDynamicHelp": false,
3322
3324
  "multiple": false,
3323
3325
  "type": "option"
3326
+ },
3327
+ "timeout": {
3328
+ "description": "Compile timeout in seconds (default: 600)",
3329
+ "name": "timeout",
3330
+ "default": 600,
3331
+ "hasDynamicHelp": false,
3332
+ "multiple": false,
3333
+ "type": "option"
3334
+ },
3335
+ "no-wait": {
3336
+ "description": "Return immediately after triggering compilation. Prints the document ID for manual polling.",
3337
+ "name": "no-wait",
3338
+ "allowNo": false,
3339
+ "type": "boolean"
3324
3340
  }
3325
3341
  },
3326
3342
  "hasDynamicHelp": false,
3327
3343
  "hiddenAliases": [],
3328
- "id": "compile:thread:sync",
3344
+ "id": "compile:doc:make",
3329
3345
  "pluginAlias": "faces-cli",
3330
3346
  "pluginName": "faces-cli",
3331
3347
  "pluginType": "core",
@@ -3336,11 +3352,11 @@
3336
3352
  "dist",
3337
3353
  "commands",
3338
3354
  "compile",
3339
- "thread",
3340
- "sync.js"
3355
+ "doc",
3356
+ "make.js"
3341
3357
  ]
3342
3358
  },
3343
- "compile:doc:create": {
3359
+ "compile:thread:create": {
3344
3360
  "aliases": [],
3345
3361
  "args": {
3346
3362
  "face_id": {
@@ -3349,7 +3365,7 @@
3349
3365
  "required": true
3350
3366
  }
3351
3367
  },
3352
- "description": "Submit a document to a face",
3368
+ "description": "Start a new thread for a face",
3353
3369
  "flags": {
3354
3370
  "json": {
3355
3371
  "description": "Format output as json.",
@@ -3383,42 +3399,16 @@
3383
3399
  "type": "option"
3384
3400
  },
3385
3401
  "label": {
3386
- "description": "Document label/title",
3402
+ "description": "Thread label",
3387
3403
  "name": "label",
3388
3404
  "hasDynamicHelp": false,
3389
3405
  "multiple": false,
3390
3406
  "type": "option"
3391
- },
3392
- "content": {
3393
- "description": "Inline text content",
3394
- "name": "content",
3395
- "hasDynamicHelp": false,
3396
- "multiple": false,
3397
- "type": "option"
3398
- },
3399
- "file": {
3400
- "description": "Read content from file",
3401
- "name": "file",
3402
- "hasDynamicHelp": false,
3403
- "multiple": false,
3404
- "type": "option"
3405
- },
3406
- "perspective": {
3407
- "description": "Perspective (first-person or third-person)",
3408
- "name": "perspective",
3409
- "default": "first-person",
3410
- "hasDynamicHelp": false,
3411
- "multiple": false,
3412
- "options": [
3413
- "first-person",
3414
- "third-person"
3415
- ],
3416
- "type": "option"
3417
3407
  }
3418
3408
  },
3419
3409
  "hasDynamicHelp": false,
3420
3410
  "hiddenAliases": [],
3421
- "id": "compile:doc:create",
3411
+ "id": "compile:thread:create",
3422
3412
  "pluginAlias": "faces-cli",
3423
3413
  "pluginName": "faces-cli",
3424
3414
  "pluginType": "core",
@@ -3429,20 +3419,20 @@
3429
3419
  "dist",
3430
3420
  "commands",
3431
3421
  "compile",
3432
- "doc",
3422
+ "thread",
3433
3423
  "create.js"
3434
3424
  ]
3435
3425
  },
3436
- "compile:doc:delete": {
3426
+ "compile:thread:delete": {
3437
3427
  "aliases": [],
3438
3428
  "args": {
3439
- "doc_id": {
3440
- "description": "Document ID",
3441
- "name": "doc_id",
3429
+ "thread_id": {
3430
+ "description": "Thread ID",
3431
+ "name": "thread_id",
3442
3432
  "required": true
3443
3433
  }
3444
3434
  },
3445
- "description": "Delete a document",
3435
+ "description": "Delete a thread",
3446
3436
  "flags": {
3447
3437
  "json": {
3448
3438
  "description": "Format output as json.",
@@ -3474,11 +3464,17 @@
3474
3464
  "hasDynamicHelp": false,
3475
3465
  "multiple": false,
3476
3466
  "type": "option"
3467
+ },
3468
+ "yes": {
3469
+ "description": "Skip confirmation",
3470
+ "name": "yes",
3471
+ "allowNo": false,
3472
+ "type": "boolean"
3477
3473
  }
3478
3474
  },
3479
3475
  "hasDynamicHelp": false,
3480
3476
  "hiddenAliases": [],
3481
- "id": "compile:doc:delete",
3477
+ "id": "compile:thread:delete",
3482
3478
  "pluginAlias": "faces-cli",
3483
3479
  "pluginName": "faces-cli",
3484
3480
  "pluginType": "core",
@@ -3489,20 +3485,20 @@
3489
3485
  "dist",
3490
3486
  "commands",
3491
3487
  "compile",
3492
- "doc",
3488
+ "thread",
3493
3489
  "delete.js"
3494
3490
  ]
3495
3491
  },
3496
- "compile:doc:edit": {
3492
+ "compile:thread:edit": {
3497
3493
  "aliases": [],
3498
3494
  "args": {
3499
- "doc_id": {
3500
- "description": "Document ID",
3501
- "name": "doc_id",
3495
+ "thread_id": {
3496
+ "description": "Thread ID",
3497
+ "name": "thread_id",
3502
3498
  "required": true
3503
3499
  }
3504
3500
  },
3505
- "description": "Edit a document (label, content, or perspective)",
3501
+ "description": "Edit a thread (label and/or reassign face speaker)",
3506
3502
  "flags": {
3507
3503
  "json": {
3508
3504
  "description": "Format output as json.",
@@ -3536,41 +3532,23 @@
3536
3532
  "type": "option"
3537
3533
  },
3538
3534
  "label": {
3539
- "description": "New label/title",
3535
+ "description": "New thread label",
3540
3536
  "name": "label",
3541
3537
  "hasDynamicHelp": false,
3542
3538
  "multiple": false,
3543
3539
  "type": "option"
3544
3540
  },
3545
- "content": {
3546
- "description": "New inline text content",
3547
- "name": "content",
3548
- "hasDynamicHelp": false,
3549
- "multiple": false,
3550
- "type": "option"
3551
- },
3552
- "file": {
3553
- "description": "Read new content from file",
3554
- "name": "file",
3555
- "hasDynamicHelp": false,
3556
- "multiple": false,
3557
- "type": "option"
3558
- },
3559
- "perspective": {
3560
- "description": "Perspective (first-person or third-person)",
3561
- "name": "perspective",
3541
+ "face-speaker": {
3542
+ "description": "Reassign face speaker: set this speaker to role=user, all others to role=assistant",
3543
+ "name": "face-speaker",
3562
3544
  "hasDynamicHelp": false,
3563
3545
  "multiple": false,
3564
- "options": [
3565
- "first-person",
3566
- "third-person"
3567
- ],
3568
3546
  "type": "option"
3569
3547
  }
3570
3548
  },
3571
3549
  "hasDynamicHelp": false,
3572
3550
  "hiddenAliases": [],
3573
- "id": "compile:doc:edit",
3551
+ "id": "compile:thread:edit",
3574
3552
  "pluginAlias": "faces-cli",
3575
3553
  "pluginName": "faces-cli",
3576
3554
  "pluginType": "core",
@@ -3581,20 +3559,20 @@
3581
3559
  "dist",
3582
3560
  "commands",
3583
3561
  "compile",
3584
- "doc",
3562
+ "thread",
3585
3563
  "edit.js"
3586
3564
  ]
3587
3565
  },
3588
- "compile:doc:get": {
3566
+ "compile:thread:get": {
3589
3567
  "aliases": [],
3590
3568
  "args": {
3591
- "doc_id": {
3592
- "description": "Document ID",
3593
- "name": "doc_id",
3569
+ "thread_id": {
3570
+ "description": "Thread ID",
3571
+ "name": "thread_id",
3594
3572
  "required": true
3595
3573
  }
3596
3574
  },
3597
- "description": "Get a document by ID",
3575
+ "description": "Get a thread by ID",
3598
3576
  "flags": {
3599
3577
  "json": {
3600
3578
  "description": "Format output as json.",
@@ -3630,7 +3608,7 @@
3630
3608
  },
3631
3609
  "hasDynamicHelp": false,
3632
3610
  "hiddenAliases": [],
3633
- "id": "compile:doc:get",
3611
+ "id": "compile:thread:get",
3634
3612
  "pluginAlias": "faces-cli",
3635
3613
  "pluginName": "faces-cli",
3636
3614
  "pluginType": "core",
@@ -3641,11 +3619,11 @@
3641
3619
  "dist",
3642
3620
  "commands",
3643
3621
  "compile",
3644
- "doc",
3622
+ "thread",
3645
3623
  "get.js"
3646
3624
  ]
3647
3625
  },
3648
- "compile:doc": {
3626
+ "compile:thread:list": {
3649
3627
  "aliases": [],
3650
3628
  "args": {
3651
3629
  "face_id": {
@@ -3654,7 +3632,7 @@
3654
3632
  "required": true
3655
3633
  }
3656
3634
  },
3657
- "description": "Compile a document into a face (create → make in one step)",
3635
+ "description": "List threads for a face",
3658
3636
  "flags": {
3659
3637
  "json": {
3660
3638
  "description": "Format output as json.",
@@ -3686,38 +3664,65 @@
3686
3664
  "hasDynamicHelp": false,
3687
3665
  "multiple": false,
3688
3666
  "type": "option"
3667
+ }
3668
+ },
3669
+ "hasDynamicHelp": false,
3670
+ "hiddenAliases": [],
3671
+ "id": "compile:thread:list",
3672
+ "pluginAlias": "faces-cli",
3673
+ "pluginName": "faces-cli",
3674
+ "pluginType": "core",
3675
+ "strict": true,
3676
+ "enableJsonFlag": true,
3677
+ "isESM": true,
3678
+ "relativePath": [
3679
+ "dist",
3680
+ "commands",
3681
+ "compile",
3682
+ "thread",
3683
+ "list.js"
3684
+ ]
3685
+ },
3686
+ "compile:thread:make": {
3687
+ "aliases": [],
3688
+ "args": {
3689
+ "thread_id": {
3690
+ "description": "Thread ID",
3691
+ "name": "thread_id",
3692
+ "required": true
3693
+ }
3694
+ },
3695
+ "description": "Compile an existing thread (prepare + sync in one step)",
3696
+ "flags": {
3697
+ "json": {
3698
+ "description": "Format output as json.",
3699
+ "helpGroup": "GLOBAL",
3700
+ "name": "json",
3701
+ "allowNo": false,
3702
+ "type": "boolean"
3689
3703
  },
3690
- "label": {
3691
- "description": "Document label/title",
3692
- "name": "label",
3693
- "hasDynamicHelp": false,
3694
- "multiple": false,
3695
- "type": "option"
3696
- },
3697
- "content": {
3698
- "description": "Inline text content",
3699
- "name": "content",
3704
+ "base-url": {
3705
+ "description": "API base URL",
3706
+ "env": "FACES_BASE_URL",
3707
+ "name": "base-url",
3700
3708
  "hasDynamicHelp": false,
3701
3709
  "multiple": false,
3702
3710
  "type": "option"
3703
3711
  },
3704
- "file": {
3705
- "description": "Read content from file",
3706
- "name": "file",
3712
+ "token": {
3713
+ "description": "JWT bearer token",
3714
+ "env": "FACES_TOKEN",
3715
+ "name": "token",
3707
3716
  "hasDynamicHelp": false,
3708
3717
  "multiple": false,
3709
3718
  "type": "option"
3710
3719
  },
3711
- "perspective": {
3712
- "description": "Perspective",
3713
- "name": "perspective",
3714
- "default": "first-person",
3720
+ "api-key": {
3721
+ "description": "API key",
3722
+ "env": "FACES_API_KEY",
3723
+ "name": "api-key",
3715
3724
  "hasDynamicHelp": false,
3716
3725
  "multiple": false,
3717
- "options": [
3718
- "first-person",
3719
- "third-person"
3720
- ],
3721
3726
  "type": "option"
3722
3727
  },
3723
3728
  "timeout": {
@@ -3729,7 +3734,7 @@
3729
3734
  "type": "option"
3730
3735
  },
3731
3736
  "no-wait": {
3732
- "description": "Create and trigger compilation, then return immediately without polling.",
3737
+ "description": "Return immediately after triggering compilation. Prints the thread ID for manual polling.",
3733
3738
  "name": "no-wait",
3734
3739
  "allowNo": false,
3735
3740
  "type": "boolean"
@@ -3737,7 +3742,7 @@
3737
3742
  },
3738
3743
  "hasDynamicHelp": false,
3739
3744
  "hiddenAliases": [],
3740
- "id": "compile:doc",
3745
+ "id": "compile:thread:make",
3741
3746
  "pluginAlias": "faces-cli",
3742
3747
  "pluginName": "faces-cli",
3743
3748
  "pluginType": "core",
@@ -3748,20 +3753,20 @@
3748
3753
  "dist",
3749
3754
  "commands",
3750
3755
  "compile",
3751
- "doc",
3752
- "index.js"
3756
+ "thread",
3757
+ "make.js"
3753
3758
  ]
3754
3759
  },
3755
- "compile:doc:list": {
3760
+ "compile:thread:message": {
3756
3761
  "aliases": [],
3757
3762
  "args": {
3758
- "face_id": {
3759
- "description": "Face alias",
3760
- "name": "face_id",
3763
+ "thread_id": {
3764
+ "description": "Thread ID",
3765
+ "name": "thread_id",
3761
3766
  "required": true
3762
3767
  }
3763
3768
  },
3764
- "description": "List documents for a face",
3769
+ "description": "Send a user message to a thread",
3765
3770
  "flags": {
3766
3771
  "json": {
3767
3772
  "description": "Format output as json.",
@@ -3793,11 +3798,20 @@
3793
3798
  "hasDynamicHelp": false,
3794
3799
  "multiple": false,
3795
3800
  "type": "option"
3801
+ },
3802
+ "message": {
3803
+ "char": "m",
3804
+ "description": "User message to append",
3805
+ "name": "message",
3806
+ "required": true,
3807
+ "hasDynamicHelp": false,
3808
+ "multiple": false,
3809
+ "type": "option"
3796
3810
  }
3797
3811
  },
3798
3812
  "hasDynamicHelp": false,
3799
3813
  "hiddenAliases": [],
3800
- "id": "compile:doc:list",
3814
+ "id": "compile:thread:message",
3801
3815
  "pluginAlias": "faces-cli",
3802
3816
  "pluginName": "faces-cli",
3803
3817
  "pluginType": "core",
@@ -3808,20 +3822,20 @@
3808
3822
  "dist",
3809
3823
  "commands",
3810
3824
  "compile",
3811
- "doc",
3812
- "list.js"
3825
+ "thread",
3826
+ "message.js"
3813
3827
  ]
3814
3828
  },
3815
- "compile:doc:make": {
3829
+ "compile:thread:sync": {
3816
3830
  "aliases": [],
3817
3831
  "args": {
3818
- "doc_id": {
3819
- "description": "Document ID",
3820
- "name": "doc_id",
3832
+ "thread_id": {
3833
+ "description": "Thread ID",
3834
+ "name": "thread_id",
3821
3835
  "required": true
3822
3836
  }
3823
3837
  },
3824
- "description": "Compile an existing document (prepare + sync in one step)",
3838
+ "description": "Archive and sync a thread into a face",
3825
3839
  "flags": {
3826
3840
  "json": {
3827
3841
  "description": "Format output as json.",
@@ -3853,25 +3867,11 @@
3853
3867
  "hasDynamicHelp": false,
3854
3868
  "multiple": false,
3855
3869
  "type": "option"
3856
- },
3857
- "timeout": {
3858
- "description": "Compile timeout in seconds (default: 600)",
3859
- "name": "timeout",
3860
- "default": 600,
3861
- "hasDynamicHelp": false,
3862
- "multiple": false,
3863
- "type": "option"
3864
- },
3865
- "no-wait": {
3866
- "description": "Return immediately after triggering compilation. Prints the document ID for manual polling.",
3867
- "name": "no-wait",
3868
- "allowNo": false,
3869
- "type": "boolean"
3870
3870
  }
3871
3871
  },
3872
3872
  "hasDynamicHelp": false,
3873
3873
  "hiddenAliases": [],
3874
- "id": "compile:doc:make",
3874
+ "id": "compile:thread:sync",
3875
3875
  "pluginAlias": "faces-cli",
3876
3876
  "pluginName": "faces-cli",
3877
3877
  "pluginType": "core",
@@ -3882,10 +3882,10 @@
3882
3882
  "dist",
3883
3883
  "commands",
3884
3884
  "compile",
3885
- "doc",
3886
- "make.js"
3885
+ "thread",
3886
+ "sync.js"
3887
3887
  ]
3888
3888
  }
3889
3889
  },
3890
- "version": "1.5.3"
3890
+ "version": "1.5.4"
3891
3891
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "faces-cli",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "CLI for the Faces AI platform",
5
5
  "type": "module",
6
6
  "author": "sybileak <sybileak@proton.me>",