@faces-sh/cli 1.2.0 → 1.3.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.
Files changed (53) hide show
  1. package/README.md +51 -33
  2. package/dist/chat-command.d.ts +2 -0
  3. package/dist/chat.d.ts +2 -0
  4. package/dist/choices.d.ts +9 -0
  5. package/dist/choices.js +17 -1
  6. package/dist/client.d.ts +8 -0
  7. package/dist/client.js +37 -0
  8. package/dist/commands/chat/chat.d.ts +2 -0
  9. package/dist/commands/chat/messages.d.ts +2 -0
  10. package/dist/commands/chat/responses.d.ts +2 -0
  11. package/dist/commands/chat/thread.d.ts +2 -0
  12. package/dist/commands/choices.d.ts +3 -0
  13. package/dist/commands/choices.js +36 -0
  14. package/dist/commands/conversation/add.d.ts +2 -0
  15. package/dist/commands/conversation/add.js +5 -2
  16. package/dist/commands/conversation/create.d.ts +2 -0
  17. package/dist/commands/conversation/create.js +4 -2
  18. package/dist/commands/decide.d.ts +31 -0
  19. package/dist/commands/decide.js +84 -4
  20. package/dist/commands/face/list.d.ts +2 -0
  21. package/dist/commands/face/list.js +23 -1
  22. package/dist/commands/premise/add.d.ts +30 -0
  23. package/dist/commands/premise/add.js +86 -0
  24. package/dist/commands/premise/choices.d.ts +21 -0
  25. package/dist/commands/premise/choices.js +68 -0
  26. package/dist/commands/premise/claim.d.ts +20 -0
  27. package/dist/commands/premise/claim.js +38 -0
  28. package/dist/commands/premise/decide.d.ts +18 -0
  29. package/dist/commands/premise/decide.js +36 -0
  30. package/dist/commands/premise/delete.d.ts +17 -0
  31. package/dist/commands/premise/delete.js +17 -0
  32. package/dist/commands/premise/edit.d.ts +28 -0
  33. package/dist/commands/premise/edit.js +51 -0
  34. package/dist/commands/premise/get.d.ts +22 -0
  35. package/dist/commands/premise/get.js +37 -0
  36. package/dist/commands/premise/refine.d.ts +20 -0
  37. package/dist/commands/premise/refine.js +80 -0
  38. package/dist/commands/state/create.d.ts +13 -2
  39. package/dist/commands/state/create.js +55 -2
  40. package/dist/commands/state/get.d.ts +19 -2
  41. package/dist/commands/state/get.js +30 -2
  42. package/dist/commands/state/use.d.ts +16 -0
  43. package/dist/commands/state/use.js +25 -0
  44. package/dist/conversation.d.ts +30 -3
  45. package/dist/conversation.js +202 -18
  46. package/dist/foreman.d.ts +47 -0
  47. package/dist/foreman.js +115 -0
  48. package/dist/refine.d.ts +106 -0
  49. package/dist/refine.js +601 -0
  50. package/dist/synopsis.d.ts +49 -0
  51. package/dist/synopsis.js +43 -0
  52. package/oclif.manifest.json +1415 -109
  53. package/package.json +5 -2
@@ -14,6 +14,8 @@
14
14
  "<%= config.bin %> <%= command.id %> @alice:maestro-1 --state \"A startup offers me a lead role at a lower salary.\" --question \"Should I take the offer?\"",
15
15
  "<%= config.bin %> <%= command.id %> @head~socrates:maestro-1 --state \"A chain bakery opened across the street.\"",
16
16
  "<%= config.bin %> <%= command.id %> @alice:maestro-1 --state-id fs_STATE_ID --question \"What should the shop do?\" --max-choices 3",
17
+ "<%= config.bin %> <%= command.id %> @alice:maestro-1 --state-id fs_STATE_ID --question \"How do we get there?\" --depends-on goal,budget",
18
+ "<%= config.bin %> <%= command.id %> @alice:maestro-1 --state-id fs_STATE_ID --question \"What does 'handle bad input' mean here?\" --into \"handle bad input\" --kind or",
17
19
  "<%= config.bin %> <%= command.id %> \"(@alice | @bob):maestro-1-flash\" --state-file situation.txt -q \"What next?\" --json"
18
20
  ],
19
21
  "flags": {
@@ -92,6 +94,41 @@
92
94
  "multiple": false,
93
95
  "type": "option"
94
96
  },
97
+ "depends-on": {
98
+ "dependsOn": [
99
+ "state-id"
100
+ ],
101
+ "description": "With --state-id, what these options rest on, comma separated: premise keys, decision ids, option ids (opt_...) and choices ids (cho_...) in the state, at most 200. The face is shown each of them, and the premises each directly depends on, in full. The options written into the state record it.",
102
+ "name": "depends-on",
103
+ "hasDynamicHelp": false,
104
+ "multiple": false,
105
+ "type": "option"
106
+ },
107
+ "into": {
108
+ "dependsOn": [
109
+ "state-id",
110
+ "question"
111
+ ],
112
+ "description": "With --state-id and --question: the premise these options are for. Each option is written into the state as a premise of its own (assumed, proposed by the face), and the premise rests on each through an edge of --kind. Weigh them next with faces decide --weigh <premise>.",
113
+ "name": "into",
114
+ "hasDynamicHelp": false,
115
+ "multiple": false,
116
+ "type": "option"
117
+ },
118
+ "kind": {
119
+ "dependsOn": [
120
+ "into"
121
+ ],
122
+ "description": "With --into: or (the default) when the options are alternatives, readings of an ambiguity or ways to do it, one of which holds; and when they are facets that must all hold.",
123
+ "name": "kind",
124
+ "hasDynamicHelp": false,
125
+ "multiple": false,
126
+ "options": [
127
+ "or",
128
+ "and"
129
+ ],
130
+ "type": "option"
131
+ },
95
132
  "max-choices": {
96
133
  "description": "The most options to return, 1 to 32. Default 8.",
97
134
  "name": "max-choices",
@@ -130,7 +167,8 @@
130
167
  "<%= config.bin %> <%= command.id %> @alice:maestro-1/jev-latest --state-file situation.txt --question \"Is the speaker irritated?\"",
131
168
  "<%= config.bin %> <%= command.id %> @alice:maestro-1-flash/clef --state-file situation.txt --question \"How firm is the reply?\" --level yields --level hedges --level firm",
132
169
  "<%= config.bin %> <%= command.id %> \"(@alice | @bob):maestro-1/jev-latest\" --state-file situation.json --questions-file questions.json --json",
133
- "<%= config.bin %> <%= command.id %> @alice:maestro-1/gpt-6-luna --state-file situation.txt --questions-file questions.json"
170
+ "<%= config.bin %> <%= command.id %> @alice:maestro-1/gpt-6-luna --state-file situation.txt --questions-file questions.json",
171
+ "<%= config.bin %> <%= command.id %> @alice:maestro-1/jev-latest --conversation fs_STATE_ID --weigh \"handle bad input\""
134
172
  ],
135
173
  "flags": {
136
174
  "json": {
@@ -272,7 +310,7 @@
272
310
  "type": "option"
273
311
  },
274
312
  "premise": {
275
- "description": "A premise, as key=value (repeatable): a named fact the face's answers depend on, kept on the state. The key is 1 to 64 letters, digits, _ or -. The value is read as JSON when it is JSON (50000, true, null, [\"a\",\"b\"], {\"max\":3}) and as text otherwise, so plan=annual is the text \"annual\". Quote it to keep a number as text: --premise 'code=\"007\"'. A newer value of a key replaces it from then on. A key used for the first time needs --premise-description. Needs --conversation.",
313
+ "description": "A premise, as key=value (repeatable): a named fact the face's answers depend on, kept on the state. The key is plain text, 1 to 120 characters, split from the value at the first =: --premise 'everyone can eat=yes'. A key that holds = goes in double quotes: --premise '\"a=b\"=yes'. The value is read as JSON when it is JSON (50000, true, null, [\"a\",\"b\"], {\"max\":3}) and as text otherwise, so plan=annual is the text \"annual\". Quote it to keep a number as text: --premise 'code=\"007\"'. A newer value of a key replaces it from then on. A key used for the first time needs --premise-description. Needs --conversation.",
276
314
  "name": "premise",
277
315
  "hasDynamicHelp": false,
278
316
  "multiple": true,
@@ -302,12 +340,32 @@
302
340
  "dependsOn": [
303
341
  "premise"
304
342
  ],
305
- "description": "What a --premise rests on, as key=a,b (repeatable, one per key): premise keys and decision ids already in the state or set in the same request, at most 200. key= with nothing after it clears it; left out, a newer value keeps what the key rested on before.",
343
+ "description": "What a --premise rests on, as key=a,b (repeatable, one per key): premise keys, decision ids and option ids (opt_..., or cho_... for all of a choices list, from faces choices --state-id) already in the state or set in the same request, at most 200, comma separated (a key that holds a comma goes in double quotes: key='\"x, y\",b'). key rests on each: each must hold for it to hold. Weigh an entry with :and or :or, then a weight from 0 to 1, then @ and the decision that set it: task=a,b:or:0.7,c:and:0.5@dec_x. An and entry is a child that must hold (its weight is importance); the or entries are alternatives, one of which holds (their weights are probabilities and sum to 1). A plain entry is an and with no weight. key= with nothing after it clears it; left out, a newer value keeps what the key rested on before.",
306
344
  "name": "premise-depends-on",
307
345
  "hasDynamicHelp": false,
308
346
  "multiple": true,
309
347
  "type": "option"
310
348
  },
349
+ "premise-role": {
350
+ "dependsOn": [
351
+ "premise"
352
+ ],
353
+ "description": "A --premise's role, as key=role (repeatable, one per key): goal or test. wanted marks a goal, the outcome the state is working toward (the work is done when every goal is achieved); test marks a check that must pass. key= with nothing after it clears it; left out, a newer value keeps the role the key had.",
354
+ "name": "premise-role",
355
+ "hasDynamicHelp": false,
356
+ "multiple": true,
357
+ "type": "option"
358
+ },
359
+ "premise-origin": {
360
+ "dependsOn": [
361
+ "premise"
362
+ ],
363
+ "description": "Who set a --premise, as key=origin (repeatable, one per key): human, agent, tool, web. key= with nothing after it clears it; left out, a newer value keeps the origin the key had.",
364
+ "name": "premise-origin",
365
+ "hasDynamicHelp": false,
366
+ "multiple": true,
367
+ "type": "option"
368
+ },
311
369
  "causes-visible": {
312
370
  "description": "Whether the face reads the other faces' causes on this turn, in a conversation with several faces. Leave it out to follow the state (see faces state:create --no-causes-visible). Needs --conversation.",
313
371
  "name": "causes-visible",
@@ -315,12 +373,48 @@
315
373
  "type": "boolean"
316
374
  },
317
375
  "depends-on": {
318
- "description": "In a state (--conversation), what this decision rests on, comma separated: premise keys and decision ids already in the state or set with --premise, at most 200. The decision is shown those, and is invalidated when one of them is. Left out, it rests on every premise in force.",
376
+ "description": "In a state (--conversation), what this decision rests on, comma separated: premise keys, decision ids and option ids (opt_..., or cho_... for all of a choices list, from faces choices --state-id) already in the state or set with --premise, at most 200 (a key that holds a comma goes in double quotes: '\"x, y\",dec_1'). The decision is shown those, and is invalidated when one of them is. Left out, it rests on every premise in force.",
319
377
  "name": "depends-on",
320
378
  "hasDynamicHelp": false,
321
379
  "multiple": false,
322
380
  "type": "option"
323
381
  },
382
+ "weigh": {
383
+ "description": "In a state (--conversation): weigh the edges of this premise. The face decides between the premises it rests on (one kind at a time, --weigh-kind), and each probability is written onto its edge with the decision that set it. For or edges, the alternatives outside --cutoff are set invalidated, with the reason. No --question: the question is the premise and its children. Sent in OpenAI's format.",
384
+ "exclusive": [
385
+ "question",
386
+ "questions-file",
387
+ "depends-on"
388
+ ],
389
+ "name": "weigh",
390
+ "hasDynamicHelp": false,
391
+ "multiple": false,
392
+ "type": "option"
393
+ },
394
+ "weigh-kind": {
395
+ "dependsOn": [
396
+ "weigh"
397
+ ],
398
+ "description": "With --weigh, when the premise rests on both kinds: which edges to weigh, or or and.",
399
+ "name": "weigh-kind",
400
+ "hasDynamicHelp": false,
401
+ "multiple": false,
402
+ "options": [
403
+ "or",
404
+ "and"
405
+ ],
406
+ "type": "option"
407
+ },
408
+ "cutoff": {
409
+ "dependsOn": [
410
+ "weigh"
411
+ ],
412
+ "description": "With --weigh: the probability mass to keep, above 0 and at most 1 (default 0.85). The likeliest or alternatives are kept until they reach it; the rest are pruned. and children are never pruned.",
413
+ "name": "cutoff",
414
+ "hasDynamicHelp": false,
415
+ "multiple": false,
416
+ "type": "option"
417
+ },
324
418
  "session": {
325
419
  "description": "The old name for --conversation, still accepted: add this turn to a session (a conversation), by id (from faces session:create or conversation:create). The session must be with this face.",
326
420
  "name": "session",
@@ -2198,7 +2292,7 @@
2198
2292
  "type": "option"
2199
2293
  },
2200
2294
  "premise": {
2201
- "description": "A premise, as key=value (repeatable): a named fact the face's answers depend on, kept on the state. The key is 1 to 64 letters, digits, _ or -. The value is read as JSON when it is JSON (50000, true, null, [\"a\",\"b\"], {\"max\":3}) and as text otherwise, so plan=annual is the text \"annual\". Quote it to keep a number as text: --premise 'code=\"007\"'. A newer value of a key replaces it from then on. A key used for the first time needs --premise-description. Needs --conversation.",
2295
+ "description": "A premise, as key=value (repeatable): a named fact the face's answers depend on, kept on the state. The key is plain text, 1 to 120 characters, split from the value at the first =: --premise 'everyone can eat=yes'. A key that holds = goes in double quotes: --premise '\"a=b\"=yes'. The value is read as JSON when it is JSON (50000, true, null, [\"a\",\"b\"], {\"max\":3}) and as text otherwise, so plan=annual is the text \"annual\". Quote it to keep a number as text: --premise 'code=\"007\"'. A newer value of a key replaces it from then on. A key used for the first time needs --premise-description. Needs --conversation.",
2202
2296
  "name": "premise",
2203
2297
  "hasDynamicHelp": false,
2204
2298
  "multiple": true,
@@ -2228,12 +2322,32 @@
2228
2322
  "dependsOn": [
2229
2323
  "premise"
2230
2324
  ],
2231
- "description": "What a --premise rests on, as key=a,b (repeatable, one per key): premise keys and decision ids already in the state or set in the same request, at most 200. key= with nothing after it clears it; left out, a newer value keeps what the key rested on before.",
2325
+ "description": "What a --premise rests on, as key=a,b (repeatable, one per key): premise keys, decision ids and option ids (opt_..., or cho_... for all of a choices list, from faces choices --state-id) already in the state or set in the same request, at most 200, comma separated (a key that holds a comma goes in double quotes: key='\"x, y\",b'). key rests on each: each must hold for it to hold. Weigh an entry with :and or :or, then a weight from 0 to 1, then @ and the decision that set it: task=a,b:or:0.7,c:and:0.5@dec_x. An and entry is a child that must hold (its weight is importance); the or entries are alternatives, one of which holds (their weights are probabilities and sum to 1). A plain entry is an and with no weight. key= with nothing after it clears it; left out, a newer value keeps what the key rested on before.",
2232
2326
  "name": "premise-depends-on",
2233
2327
  "hasDynamicHelp": false,
2234
2328
  "multiple": true,
2235
2329
  "type": "option"
2236
2330
  },
2331
+ "premise-role": {
2332
+ "dependsOn": [
2333
+ "premise"
2334
+ ],
2335
+ "description": "A --premise's role, as key=role (repeatable, one per key): goal or test. wanted marks a goal, the outcome the state is working toward (the work is done when every goal is achieved); test marks a check that must pass. key= with nothing after it clears it; left out, a newer value keeps the role the key had.",
2336
+ "name": "premise-role",
2337
+ "hasDynamicHelp": false,
2338
+ "multiple": true,
2339
+ "type": "option"
2340
+ },
2341
+ "premise-origin": {
2342
+ "dependsOn": [
2343
+ "premise"
2344
+ ],
2345
+ "description": "Who set a --premise, as key=origin (repeatable, one per key): human, agent, tool, web. key= with nothing after it clears it; left out, a newer value keeps the origin the key had.",
2346
+ "name": "premise-origin",
2347
+ "hasDynamicHelp": false,
2348
+ "multiple": true,
2349
+ "type": "option"
2350
+ },
2237
2351
  "causes-visible": {
2238
2352
  "description": "Whether the face reads the other faces' causes on this turn, in a conversation with several faces. Leave it out to follow the state (see faces state:create --no-causes-visible). Needs --conversation.",
2239
2353
  "name": "causes-visible",
@@ -2387,7 +2501,7 @@
2387
2501
  "type": "option"
2388
2502
  },
2389
2503
  "premise": {
2390
- "description": "A premise, as key=value (repeatable): a named fact the face's answers depend on, kept on the state. The key is 1 to 64 letters, digits, _ or -. The value is read as JSON when it is JSON (50000, true, null, [\"a\",\"b\"], {\"max\":3}) and as text otherwise, so plan=annual is the text \"annual\". Quote it to keep a number as text: --premise 'code=\"007\"'. A newer value of a key replaces it from then on. A key used for the first time needs --premise-description. Needs --conversation.",
2504
+ "description": "A premise, as key=value (repeatable): a named fact the face's answers depend on, kept on the state. The key is plain text, 1 to 120 characters, split from the value at the first =: --premise 'everyone can eat=yes'. A key that holds = goes in double quotes: --premise '\"a=b\"=yes'. The value is read as JSON when it is JSON (50000, true, null, [\"a\",\"b\"], {\"max\":3}) and as text otherwise, so plan=annual is the text \"annual\". Quote it to keep a number as text: --premise 'code=\"007\"'. A newer value of a key replaces it from then on. A key used for the first time needs --premise-description. Needs --conversation.",
2391
2505
  "name": "premise",
2392
2506
  "hasDynamicHelp": false,
2393
2507
  "multiple": true,
@@ -2417,12 +2531,32 @@
2417
2531
  "dependsOn": [
2418
2532
  "premise"
2419
2533
  ],
2420
- "description": "What a --premise rests on, as key=a,b (repeatable, one per key): premise keys and decision ids already in the state or set in the same request, at most 200. key= with nothing after it clears it; left out, a newer value keeps what the key rested on before.",
2534
+ "description": "What a --premise rests on, as key=a,b (repeatable, one per key): premise keys, decision ids and option ids (opt_..., or cho_... for all of a choices list, from faces choices --state-id) already in the state or set in the same request, at most 200, comma separated (a key that holds a comma goes in double quotes: key='\"x, y\",b'). key rests on each: each must hold for it to hold. Weigh an entry with :and or :or, then a weight from 0 to 1, then @ and the decision that set it: task=a,b:or:0.7,c:and:0.5@dec_x. An and entry is a child that must hold (its weight is importance); the or entries are alternatives, one of which holds (their weights are probabilities and sum to 1). A plain entry is an and with no weight. key= with nothing after it clears it; left out, a newer value keeps what the key rested on before.",
2421
2535
  "name": "premise-depends-on",
2422
2536
  "hasDynamicHelp": false,
2423
2537
  "multiple": true,
2424
2538
  "type": "option"
2425
2539
  },
2540
+ "premise-role": {
2541
+ "dependsOn": [
2542
+ "premise"
2543
+ ],
2544
+ "description": "A --premise's role, as key=role (repeatable, one per key): goal or test. wanted marks a goal, the outcome the state is working toward (the work is done when every goal is achieved); test marks a check that must pass. key= with nothing after it clears it; left out, a newer value keeps the role the key had.",
2545
+ "name": "premise-role",
2546
+ "hasDynamicHelp": false,
2547
+ "multiple": true,
2548
+ "type": "option"
2549
+ },
2550
+ "premise-origin": {
2551
+ "dependsOn": [
2552
+ "premise"
2553
+ ],
2554
+ "description": "Who set a --premise, as key=origin (repeatable, one per key): human, agent, tool, web. key= with nothing after it clears it; left out, a newer value keeps the origin the key had.",
2555
+ "name": "premise-origin",
2556
+ "hasDynamicHelp": false,
2557
+ "multiple": true,
2558
+ "type": "option"
2559
+ },
2426
2560
  "causes-visible": {
2427
2561
  "description": "Whether the face reads the other faces' causes on this turn, in a conversation with several faces. Leave it out to follow the state (see faces state:create --no-causes-visible). Needs --conversation.",
2428
2562
  "name": "causes-visible",
@@ -2571,7 +2705,7 @@
2571
2705
  "type": "option"
2572
2706
  },
2573
2707
  "premise": {
2574
- "description": "A premise, as key=value (repeatable): a named fact the face's answers depend on, kept on the state. The key is 1 to 64 letters, digits, _ or -. The value is read as JSON when it is JSON (50000, true, null, [\"a\",\"b\"], {\"max\":3}) and as text otherwise, so plan=annual is the text \"annual\". Quote it to keep a number as text: --premise 'code=\"007\"'. A newer value of a key replaces it from then on. A key used for the first time needs --premise-description. Needs --conversation.",
2708
+ "description": "A premise, as key=value (repeatable): a named fact the face's answers depend on, kept on the state. The key is plain text, 1 to 120 characters, split from the value at the first =: --premise 'everyone can eat=yes'. A key that holds = goes in double quotes: --premise '\"a=b\"=yes'. The value is read as JSON when it is JSON (50000, true, null, [\"a\",\"b\"], {\"max\":3}) and as text otherwise, so plan=annual is the text \"annual\". Quote it to keep a number as text: --premise 'code=\"007\"'. A newer value of a key replaces it from then on. A key used for the first time needs --premise-description. Needs --conversation.",
2575
2709
  "name": "premise",
2576
2710
  "hasDynamicHelp": false,
2577
2711
  "multiple": true,
@@ -2601,12 +2735,32 @@
2601
2735
  "dependsOn": [
2602
2736
  "premise"
2603
2737
  ],
2604
- "description": "What a --premise rests on, as key=a,b (repeatable, one per key): premise keys and decision ids already in the state or set in the same request, at most 200. key= with nothing after it clears it; left out, a newer value keeps what the key rested on before.",
2738
+ "description": "What a --premise rests on, as key=a,b (repeatable, one per key): premise keys, decision ids and option ids (opt_..., or cho_... for all of a choices list, from faces choices --state-id) already in the state or set in the same request, at most 200, comma separated (a key that holds a comma goes in double quotes: key='\"x, y\",b'). key rests on each: each must hold for it to hold. Weigh an entry with :and or :or, then a weight from 0 to 1, then @ and the decision that set it: task=a,b:or:0.7,c:and:0.5@dec_x. An and entry is a child that must hold (its weight is importance); the or entries are alternatives, one of which holds (their weights are probabilities and sum to 1). A plain entry is an and with no weight. key= with nothing after it clears it; left out, a newer value keeps what the key rested on before.",
2605
2739
  "name": "premise-depends-on",
2606
2740
  "hasDynamicHelp": false,
2607
2741
  "multiple": true,
2608
2742
  "type": "option"
2609
2743
  },
2744
+ "premise-role": {
2745
+ "dependsOn": [
2746
+ "premise"
2747
+ ],
2748
+ "description": "A --premise's role, as key=role (repeatable, one per key): goal or test. wanted marks a goal, the outcome the state is working toward (the work is done when every goal is achieved); test marks a check that must pass. key= with nothing after it clears it; left out, a newer value keeps the role the key had.",
2749
+ "name": "premise-role",
2750
+ "hasDynamicHelp": false,
2751
+ "multiple": true,
2752
+ "type": "option"
2753
+ },
2754
+ "premise-origin": {
2755
+ "dependsOn": [
2756
+ "premise"
2757
+ ],
2758
+ "description": "Who set a --premise, as key=origin (repeatable, one per key): human, agent, tool, web. key= with nothing after it clears it; left out, a newer value keeps the origin the key had.",
2759
+ "name": "premise-origin",
2760
+ "hasDynamicHelp": false,
2761
+ "multiple": true,
2762
+ "type": "option"
2763
+ },
2610
2764
  "causes-visible": {
2611
2765
  "description": "Whether the face reads the other faces' causes on this turn, in a conversation with several faces. Leave it out to follow the state (see faces state:create --no-causes-visible). Needs --conversation.",
2612
2766
  "name": "causes-visible",
@@ -2765,7 +2919,7 @@
2765
2919
  "type": "option"
2766
2920
  },
2767
2921
  "premise": {
2768
- "description": "A premise, as key=value (repeatable): a named fact the face's answers depend on, kept on the state. The key is 1 to 64 letters, digits, _ or -. The value is read as JSON when it is JSON (50000, true, null, [\"a\",\"b\"], {\"max\":3}) and as text otherwise, so plan=annual is the text \"annual\". Quote it to keep a number as text: --premise 'code=\"007\"'. A newer value of a key replaces it from then on. A key used for the first time needs --premise-description. Needs --conversation. For this turn only. Only the new message is sent: the state holds the rest.",
2922
+ "description": "A premise, as key=value (repeatable): a named fact the face's answers depend on, kept on the state. The key is plain text, 1 to 120 characters, split from the value at the first =: --premise 'everyone can eat=yes'. A key that holds = goes in double quotes: --premise '\"a=b\"=yes'. The value is read as JSON when it is JSON (50000, true, null, [\"a\",\"b\"], {\"max\":3}) and as text otherwise, so plan=annual is the text \"annual\". Quote it to keep a number as text: --premise 'code=\"007\"'. A newer value of a key replaces it from then on. A key used for the first time needs --premise-description. Needs --conversation. For this turn only. Only the new message is sent: the state holds the rest.",
2769
2923
  "name": "premise",
2770
2924
  "hasDynamicHelp": false,
2771
2925
  "multiple": true,
@@ -2795,12 +2949,32 @@
2795
2949
  "dependsOn": [
2796
2950
  "premise"
2797
2951
  ],
2798
- "description": "What a --premise rests on, as key=a,b (repeatable, one per key): premise keys and decision ids already in the state or set in the same request, at most 200. key= with nothing after it clears it; left out, a newer value keeps what the key rested on before. For this turn only. Only the new message is sent: the state holds the rest.",
2952
+ "description": "What a --premise rests on, as key=a,b (repeatable, one per key): premise keys, decision ids and option ids (opt_..., or cho_... for all of a choices list, from faces choices --state-id) already in the state or set in the same request, at most 200, comma separated (a key that holds a comma goes in double quotes: key='\"x, y\",b'). key rests on each: each must hold for it to hold. Weigh an entry with :and or :or, then a weight from 0 to 1, then @ and the decision that set it: task=a,b:or:0.7,c:and:0.5@dec_x. An and entry is a child that must hold (its weight is importance); the or entries are alternatives, one of which holds (their weights are probabilities and sum to 1). A plain entry is an and with no weight. key= with nothing after it clears it; left out, a newer value keeps what the key rested on before. For this turn only. Only the new message is sent: the state holds the rest.",
2799
2953
  "name": "premise-depends-on",
2800
2954
  "hasDynamicHelp": false,
2801
2955
  "multiple": true,
2802
2956
  "type": "option"
2803
2957
  },
2958
+ "premise-role": {
2959
+ "dependsOn": [
2960
+ "premise"
2961
+ ],
2962
+ "description": "A --premise's role, as key=role (repeatable, one per key): goal or test. wanted marks a goal, the outcome the state is working toward (the work is done when every goal is achieved); test marks a check that must pass. key= with nothing after it clears it; left out, a newer value keeps the role the key had. For this turn only. Only the new message is sent: the state holds the rest.",
2963
+ "name": "premise-role",
2964
+ "hasDynamicHelp": false,
2965
+ "multiple": true,
2966
+ "type": "option"
2967
+ },
2968
+ "premise-origin": {
2969
+ "dependsOn": [
2970
+ "premise"
2971
+ ],
2972
+ "description": "Who set a --premise, as key=origin (repeatable, one per key): human, agent, tool, web. key= with nothing after it clears it; left out, a newer value keeps the origin the key had. For this turn only. Only the new message is sent: the state holds the rest.",
2973
+ "name": "premise-origin",
2974
+ "hasDynamicHelp": false,
2975
+ "multiple": true,
2976
+ "type": "option"
2977
+ },
2804
2978
  "causes-visible": {
2805
2979
  "description": "Whether the face reads the other faces' causes on this turn, in a conversation with several faces. Leave it out to follow the state (see faces state:create --no-causes-visible). Needs --conversation. For this turn only. Only the new message is sent: the state holds the rest.",
2806
2980
  "name": "causes-visible",
@@ -3549,6 +3723,7 @@
3549
3723
  "<%= config.bin %> <%= command.id %> fs_STATE_ID --premise rent_rises=\"no rise\" --premise-status rent_rises=invalidated",
3550
3724
  "<%= config.bin %> <%= command.id %> fs_STATE_ID --premise can_afford=false --premise-description can_afford=\"we can carry the rent\" --premise-depends-on can_afford=rent_rises",
3551
3725
  "<%= config.bin %> <%= command.id %> fs_STATE_ID --premise budget_usd=50000 --premise-description budget_usd=\"the most we can spend this year\"",
3726
+ "<%= config.bin %> <%= command.id %> fs_STATE_ID --premise ship_by=friday --premise-description ship_by=\"when we want it shipped\" --premise-role ship_by=wanted --premise-origin ship_by=human",
3552
3727
  "<%= config.bin %> <%= command.id %> fs_STATE_ID -m \"The vendor sent their audit report.\""
3553
3728
  ],
3554
3729
  "flags": {
@@ -3601,7 +3776,7 @@
3601
3776
  "type": "option"
3602
3777
  },
3603
3778
  "premise": {
3604
- "description": "A premise, as key=value (repeatable): a named fact the face's answers depend on, kept on the state. The key is 1 to 64 letters, digits, _ or -. The value is read as JSON when it is JSON (50000, true, null, [\"a\",\"b\"], {\"max\":3}) and as text otherwise, so plan=annual is the text \"annual\". Quote it to keep a number as text: --premise 'code=\"007\"'. A newer value of a key replaces it from then on. A key used for the first time needs --premise-description.",
3779
+ "description": "A premise, as key=value (repeatable): a named fact the face's answers depend on, kept on the state. The key is plain text, 1 to 120 characters, split from the value at the first =: --premise 'everyone can eat=yes'. A key that holds = goes in double quotes: --premise '\"a=b\"=yes'. The value is read as JSON when it is JSON (50000, true, null, [\"a\",\"b\"], {\"max\":3}) and as text otherwise, so plan=annual is the text \"annual\". Quote it to keep a number as text: --premise 'code=\"007\"'. A newer value of a key replaces it from then on. A key used for the first time needs --premise-description.",
3605
3780
  "name": "premise",
3606
3781
  "hasDynamicHelp": false,
3607
3782
  "multiple": true,
@@ -3622,11 +3797,25 @@
3622
3797
  "type": "option"
3623
3798
  },
3624
3799
  "premise-depends-on": {
3625
- "description": "What a --premise rests on, as key=a,b (repeatable, one per key): premise keys and decision ids already in the state or set in the same request, at most 200. key= with nothing after it clears it; left out, a newer value keeps what the key rested on before.",
3800
+ "description": "What a --premise rests on, as key=a,b (repeatable, one per key): premise keys, decision ids and option ids (opt_..., or cho_... for all of a choices list, from faces choices --state-id) already in the state or set in the same request, at most 200, comma separated (a key that holds a comma goes in double quotes: key='\"x, y\",b'). key rests on each: each must hold for it to hold. Weigh an entry with :and or :or, then a weight from 0 to 1, then @ and the decision that set it: task=a,b:or:0.7,c:and:0.5@dec_x. An and entry is a child that must hold (its weight is importance); the or entries are alternatives, one of which holds (their weights are probabilities and sum to 1). A plain entry is an and with no weight. key= with nothing after it clears it; left out, a newer value keeps what the key rested on before.",
3626
3801
  "name": "premise-depends-on",
3627
3802
  "hasDynamicHelp": false,
3628
3803
  "multiple": true,
3629
3804
  "type": "option"
3805
+ },
3806
+ "premise-role": {
3807
+ "description": "A --premise's role, as key=role (repeatable, one per key): goal or test. wanted marks a goal, the outcome the state is working toward (the work is done when every goal is achieved); test marks a check that must pass. key= with nothing after it clears it; left out, a newer value keeps the role the key had.",
3808
+ "name": "premise-role",
3809
+ "hasDynamicHelp": false,
3810
+ "multiple": true,
3811
+ "type": "option"
3812
+ },
3813
+ "premise-origin": {
3814
+ "description": "Who set a --premise, as key=origin (repeatable, one per key): human, agent, tool, web. key= with nothing after it clears it; left out, a newer value keeps the origin the key had.",
3815
+ "name": "premise-origin",
3816
+ "hasDynamicHelp": false,
3817
+ "multiple": true,
3818
+ "type": "option"
3630
3819
  }
3631
3820
  },
3632
3821
  "hasDynamicHelp": false,
@@ -3871,7 +4060,7 @@
3871
4060
  "type": "option"
3872
4061
  },
3873
4062
  "premise": {
3874
- "description": "A premise, as key=value (repeatable): a named fact the face's answers depend on, kept on the state. The key is 1 to 64 letters, digits, _ or -. The value is read as JSON when it is JSON (50000, true, null, [\"a\",\"b\"], {\"max\":3}) and as text otherwise, so plan=annual is the text \"annual\". Quote it to keep a number as text: --premise 'code=\"007\"'. A newer value of a key replaces it from then on. A key used for the first time needs --premise-description.",
4063
+ "description": "A premise, as key=value (repeatable): a named fact the face's answers depend on, kept on the state. The key is plain text, 1 to 120 characters, split from the value at the first =: --premise 'everyone can eat=yes'. A key that holds = goes in double quotes: --premise '\"a=b\"=yes'. The value is read as JSON when it is JSON (50000, true, null, [\"a\",\"b\"], {\"max\":3}) and as text otherwise, so plan=annual is the text \"annual\". Quote it to keep a number as text: --premise 'code=\"007\"'. A newer value of a key replaces it from then on. A key used for the first time needs --premise-description.",
3875
4064
  "name": "premise",
3876
4065
  "hasDynamicHelp": false,
3877
4066
  "multiple": true,
@@ -3892,11 +4081,25 @@
3892
4081
  "type": "option"
3893
4082
  },
3894
4083
  "premise-depends-on": {
3895
- "description": "What a --premise rests on, as key=a,b (repeatable, one per key): premise keys and decision ids already in the state or set in the same request, at most 200. key= with nothing after it clears it; left out, a newer value keeps what the key rested on before.",
4084
+ "description": "What a --premise rests on, as key=a,b (repeatable, one per key): premise keys, decision ids and option ids (opt_..., or cho_... for all of a choices list, from faces choices --state-id) already in the state or set in the same request, at most 200, comma separated (a key that holds a comma goes in double quotes: key='\"x, y\",b'). key rests on each: each must hold for it to hold. Weigh an entry with :and or :or, then a weight from 0 to 1, then @ and the decision that set it: task=a,b:or:0.7,c:and:0.5@dec_x. An and entry is a child that must hold (its weight is importance); the or entries are alternatives, one of which holds (their weights are probabilities and sum to 1). A plain entry is an and with no weight. key= with nothing after it clears it; left out, a newer value keeps what the key rested on before.",
3896
4085
  "name": "premise-depends-on",
3897
4086
  "hasDynamicHelp": false,
3898
4087
  "multiple": true,
3899
4088
  "type": "option"
4089
+ },
4090
+ "premise-role": {
4091
+ "description": "A --premise's role, as key=role (repeatable, one per key): goal or test. wanted marks a goal, the outcome the state is working toward (the work is done when every goal is achieved); test marks a check that must pass. key= with nothing after it clears it; left out, a newer value keeps the role the key had.",
4092
+ "name": "premise-role",
4093
+ "hasDynamicHelp": false,
4094
+ "multiple": true,
4095
+ "type": "option"
4096
+ },
4097
+ "premise-origin": {
4098
+ "description": "Who set a --premise, as key=origin (repeatable, one per key): human, agent, tool, web. key= with nothing after it clears it; left out, a newer value keeps the origin the key had.",
4099
+ "name": "premise-origin",
4100
+ "hasDynamicHelp": false,
4101
+ "multiple": true,
4102
+ "type": "option"
3900
4103
  }
3901
4104
  },
3902
4105
  "hasDynamicHelp": false,
@@ -4840,6 +5043,20 @@
4840
5043
  "hasDynamicHelp": false,
4841
5044
  "multiple": false,
4842
5045
  "type": "option"
5046
+ },
5047
+ "for": {
5048
+ "description": "A task, in plain words: ranks the faces by how well their \"use me for\" line fits it, best first, each with its fit from 0 to 1. It ranks and never filters. Shows the best 10 unless --limit says otherwise.",
5049
+ "name": "for",
5050
+ "hasDynamicHelp": false,
5051
+ "multiple": false,
5052
+ "type": "option"
5053
+ },
5054
+ "limit": {
5055
+ "description": "The most faces to show, best first with --for; 0 shows all. Default: 10 with --for, all without.",
5056
+ "name": "limit",
5057
+ "hasDynamicHelp": false,
5058
+ "multiple": false,
5059
+ "type": "option"
4843
5060
  }
4844
5061
  },
4845
5062
  "hasDynamicHelp": false,
@@ -7220,18 +7437,26 @@
7220
7437
  "list.js"
7221
7438
  ]
7222
7439
  },
7223
- "session:close": {
7440
+ "premise:add": {
7224
7441
  "aliases": [],
7225
7442
  "args": {
7226
- "session_id": {
7227
- "description": "Session id (from session:create)",
7228
- "name": "session_id",
7229
- "required": true
7443
+ "key": {
7444
+ "description": "The premise key: plain text, 1 to 120 characters.",
7445
+ "name": "key",
7446
+ "required": false
7447
+ },
7448
+ "value": {
7449
+ "description": "Its value: JSON when it is JSON, text otherwise.",
7450
+ "name": "value",
7451
+ "required": false
7230
7452
  }
7231
7453
  },
7232
- "description": "Close a session. A closed session takes no more turns and cannot be compacted or read. Its compactions stay usable until they expire. Free. Sessions are now called states: see faces state:close.",
7454
+ "description": "Add a premise to the state; fails if the key exists (premise:edit changes one). --and: a sub-goal of that parent (it needs all its AND children). --or: a candidate for it (one proved candidate settles it). --on: inputs it reads (support, not refinement). No --role is a fact, a leaf. Free.",
7233
7455
  "examples": [
7234
- "<%= config.bin %> <%= command.id %> fs_SESSION_ID --yes"
7456
+ "<%= config.bin %> <%= command.id %> \"the dinner is planned\" \"A dinner party for six\" --role goal --said \"Plan a dinner party for six.\"",
7457
+ "<%= config.bin %> <%= command.id %> \"the guests\" \"Six, one vegan\" --and \"the dinner is planned\" --origin human",
7458
+ "<%= config.bin %> <%= command.id %> \"each guest can eat each dish\" \"Pass if ...\" --role test --and \"the dinner is planned\" --on \"the menu,the guests\"",
7459
+ "<%= config.bin %> <%= command.id %> --jsonl premises.jsonl"
7235
7460
  ],
7236
7461
  "flags": {
7237
7462
  "json": {
@@ -7274,42 +7499,144 @@
7274
7499
  "allowNo": false,
7275
7500
  "type": "boolean"
7276
7501
  },
7277
- "yes": {
7278
- "description": "Skip confirmation",
7279
- "name": "yes",
7280
- "allowNo": false,
7281
- "type": "boolean"
7502
+ "state-id": {
7503
+ "description": "The state (fs_...). Default: FACES_STATE_ID, else .faces/state.local or .faces/state here or above.",
7504
+ "env": "FACES_STATE_ID",
7505
+ "name": "state-id",
7506
+ "hasDynamicHelp": false,
7507
+ "multiple": false,
7508
+ "type": "option"
7509
+ },
7510
+ "as": {
7511
+ "description": "Who writes: your name, as a claim names it. A write into a branch another has claimed is refused (409) unless it is theirs.",
7512
+ "name": "as",
7513
+ "hasDynamicHelp": false,
7514
+ "multiple": false,
7515
+ "type": "option"
7516
+ },
7517
+ "key": {
7518
+ "description": "The premise key (instead of the first argument).",
7519
+ "name": "key",
7520
+ "hasDynamicHelp": false,
7521
+ "multiple": false,
7522
+ "type": "option"
7523
+ },
7524
+ "value": {
7525
+ "description": "Its value (instead of the second argument): JSON when it is JSON, text otherwise.",
7526
+ "name": "value",
7527
+ "hasDynamicHelp": false,
7528
+ "multiple": false,
7529
+ "type": "option"
7530
+ },
7531
+ "and": {
7532
+ "description": "The parent it is a sub-goal of (AND).",
7533
+ "exclusive": [
7534
+ "or"
7535
+ ],
7536
+ "name": "and",
7537
+ "hasDynamicHelp": false,
7538
+ "multiple": false,
7539
+ "type": "option"
7540
+ },
7541
+ "or": {
7542
+ "description": "The parent it is a candidate for (OR).",
7543
+ "exclusive": [
7544
+ "and"
7545
+ ],
7546
+ "name": "or",
7547
+ "hasDynamicHelp": false,
7548
+ "multiple": false,
7549
+ "type": "option"
7550
+ },
7551
+ "on": {
7552
+ "description": "Inputs it reads: premise keys, comma separated (repeatable). A key holding a comma goes in double quotes.",
7553
+ "name": "on",
7554
+ "hasDynamicHelp": false,
7555
+ "multiple": true,
7556
+ "type": "option"
7557
+ },
7558
+ "role": {
7559
+ "description": "goal or test. None: a fact, a leaf.",
7560
+ "name": "role",
7561
+ "hasDynamicHelp": false,
7562
+ "multiple": false,
7563
+ "options": [
7564
+ "goal",
7565
+ "test"
7566
+ ],
7567
+ "type": "option"
7568
+ },
7569
+ "status": {
7570
+ "description": "stated, verified, assumed, unresolved or invalidated.",
7571
+ "name": "status",
7572
+ "hasDynamicHelp": false,
7573
+ "multiple": false,
7574
+ "type": "option"
7575
+ },
7576
+ "origin": {
7577
+ "description": "Who it comes from: human, agent, tool or web. Default: human with --said, else agent.",
7578
+ "name": "origin",
7579
+ "hasDynamicHelp": false,
7580
+ "multiple": false,
7581
+ "type": "option"
7582
+ },
7583
+ "description": {
7584
+ "description": "What the premise is, in a line.",
7585
+ "name": "description",
7586
+ "hasDynamicHelp": false,
7587
+ "multiple": false,
7588
+ "type": "option"
7589
+ },
7590
+ "said": {
7591
+ "description": "The human's words it comes from, as they said them (stored once, linked).",
7592
+ "name": "said",
7593
+ "hasDynamicHelp": false,
7594
+ "multiple": false,
7595
+ "type": "option"
7596
+ },
7597
+ "await": {
7598
+ "description": "What it waits on: human, environment, a test's key, or none.",
7599
+ "name": "await",
7600
+ "hasDynamicHelp": false,
7601
+ "multiple": false,
7602
+ "type": "option"
7603
+ },
7604
+ "jsonl": {
7605
+ "description": "Add many: a file (or - for stdin) with one JSON object per line, each with the fields above (key, value, and, or, on, role, status, origin, description, said, await, as); on is a JSON array of keys or a comma list.",
7606
+ "name": "jsonl",
7607
+ "hasDynamicHelp": false,
7608
+ "multiple": false,
7609
+ "type": "option"
7282
7610
  }
7283
7611
  },
7284
7612
  "hasDynamicHelp": false,
7285
7613
  "hiddenAliases": [],
7286
- "id": "session:close",
7614
+ "id": "premise:add",
7287
7615
  "pluginAlias": "@faces-sh/cli",
7288
7616
  "pluginName": "@faces-sh/cli",
7289
7617
  "pluginType": "core",
7290
7618
  "strict": true,
7291
- "enableJsonFlag": true,
7292
7619
  "isESM": true,
7293
7620
  "relativePath": [
7294
7621
  "dist",
7295
7622
  "commands",
7296
- "session",
7297
- "close.js"
7623
+ "premise",
7624
+ "add.js"
7298
7625
  ]
7299
7626
  },
7300
- "session:compact": {
7627
+ "premise:choices": {
7301
7628
  "aliases": [],
7302
7629
  "args": {
7303
- "session_id": {
7304
- "description": "Session id (from session:create)",
7305
- "name": "session_id",
7630
+ "key": {
7631
+ "description": "The premise the candidates are for.",
7632
+ "name": "key",
7306
7633
  "required": true
7307
7634
  }
7308
7635
  },
7309
- "description": "Compact a session: the face's position over the session, kept on the server under a compaction id. Pass that id with --compaction on a later request with the same face, and send only the messages you still want read. Billed on the tokens it reads and writes; on Connect and Pro it counts against the plan's allowance. A failed compaction is not charged. A compaction expires 30 days after it is written. Sessions are now called states: see faces state:compact.",
7636
+ "description": "Propose candidates (OR children) for a premise: the face is shown the premise and its inputs, not what already refines it. With no --question the face asks its own first. Each candidate goes through the duplicate check. A test or the human's fact has no candidates. Billed per call.",
7310
7637
  "examples": [
7311
- "<%= config.bin %> <%= command.id %> fs_SESSION_ID",
7312
- "<%= config.bin %> <%= command.id %> fs_SESSION_ID --json"
7638
+ "<%= config.bin %> <%= command.id %> \"the menu\" --face @home-cook",
7639
+ "<%= config.bin %> <%= command.id %> \"the menu\" --face @home-cook --question \"Which three menus suit these guests?\""
7313
7640
  ],
7314
7641
  "flags": {
7315
7642
  "json": {
@@ -7351,19 +7678,900 @@
7351
7678
  "name": "toon",
7352
7679
  "allowNo": false,
7353
7680
  "type": "boolean"
7354
- }
7355
- },
7356
- "hasDynamicHelp": false,
7357
- "hiddenAliases": [],
7358
- "id": "session:compact",
7359
- "pluginAlias": "@faces-sh/cli",
7360
- "pluginName": "@faces-sh/cli",
7361
- "pluginType": "core",
7362
- "strict": true,
7363
- "enableJsonFlag": true,
7364
- "isESM": true,
7365
- "relativePath": [
7366
- "dist",
7681
+ },
7682
+ "state-id": {
7683
+ "description": "The state (fs_...). Default: FACES_STATE_ID, else .faces/state.local or .faces/state here or above.",
7684
+ "env": "FACES_STATE_ID",
7685
+ "name": "state-id",
7686
+ "hasDynamicHelp": false,
7687
+ "multiple": false,
7688
+ "type": "option"
7689
+ },
7690
+ "as": {
7691
+ "description": "Who writes: your name, as a claim names it. A write into a branch another has claimed is refused (409) unless it is theirs.",
7692
+ "name": "as",
7693
+ "hasDynamicHelp": false,
7694
+ "multiple": false,
7695
+ "type": "option"
7696
+ },
7697
+ "face": {
7698
+ "description": "The face that does it: @alias (faces face:list --for \"<the task>\" ranks them).",
7699
+ "name": "face",
7700
+ "required": true,
7701
+ "hasDynamicHelp": false,
7702
+ "multiple": false,
7703
+ "type": "option"
7704
+ },
7705
+ "question": {
7706
+ "description": "The question the candidates answer. Default: the face asks its own.",
7707
+ "name": "question",
7708
+ "hasDynamicHelp": false,
7709
+ "multiple": false,
7710
+ "type": "option"
7711
+ },
7712
+ "max": {
7713
+ "description": "At most this many candidates (default 8).",
7714
+ "name": "max",
7715
+ "hasDynamicHelp": false,
7716
+ "multiple": false,
7717
+ "type": "option"
7718
+ },
7719
+ "rank": {
7720
+ "description": "Then rank them (premise:decide).",
7721
+ "name": "rank",
7722
+ "allowNo": false,
7723
+ "type": "boolean"
7724
+ }
7725
+ },
7726
+ "hasDynamicHelp": false,
7727
+ "hiddenAliases": [],
7728
+ "id": "premise:choices",
7729
+ "pluginAlias": "@faces-sh/cli",
7730
+ "pluginName": "@faces-sh/cli",
7731
+ "pluginType": "core",
7732
+ "strict": true,
7733
+ "isESM": true,
7734
+ "relativePath": [
7735
+ "dist",
7736
+ "commands",
7737
+ "premise",
7738
+ "choices.js"
7739
+ ]
7740
+ },
7741
+ "premise:claim": {
7742
+ "aliases": [],
7743
+ "args": {
7744
+ "key": {
7745
+ "description": "The premise.",
7746
+ "name": "key",
7747
+ "required": false
7748
+ },
7749
+ "who": {
7750
+ "description": "Who claims it: the name their writes carry as --as.",
7751
+ "name": "who",
7752
+ "required": false
7753
+ }
7754
+ },
7755
+ "description": "Claim a premise's branch (it and everything AND/OR under it, never its inputs) for 30 minutes, or --ttl seconds; a write into it by anyone but <who> (their --as) is refused. Claiming it again renews it. --release releases the claims on it. The session-end hook releases the session's claims. Free.",
7756
+ "examples": [
7757
+ "<%= config.bin %> <%= command.id %> \"the menu\" builder-A",
7758
+ "<%= config.bin %> <%= command.id %> \"the menu\" --release",
7759
+ "<%= config.bin %> <%= command.id %> --release --session \"$FACES_SESSION\""
7760
+ ],
7761
+ "flags": {
7762
+ "json": {
7763
+ "description": "Format output as json.",
7764
+ "helpGroup": "GLOBAL",
7765
+ "name": "json",
7766
+ "allowNo": false,
7767
+ "type": "boolean"
7768
+ },
7769
+ "base-url": {
7770
+ "description": "API base URL",
7771
+ "env": "FACES_BASE_URL",
7772
+ "name": "base-url",
7773
+ "hasDynamicHelp": false,
7774
+ "multiple": false,
7775
+ "type": "option"
7776
+ },
7777
+ "token": {
7778
+ "description": "JWT bearer token",
7779
+ "env": "FACES_TOKEN",
7780
+ "name": "token",
7781
+ "hasDynamicHelp": false,
7782
+ "multiple": false,
7783
+ "type": "option"
7784
+ },
7785
+ "api-key": {
7786
+ "description": "API key",
7787
+ "env": "FACES_API_KEY",
7788
+ "name": "api-key",
7789
+ "hasDynamicHelp": false,
7790
+ "multiple": false,
7791
+ "type": "option"
7792
+ },
7793
+ "toon": {
7794
+ "description": "Format output as TOON instead of JSON: the same data and field names in a more compact encoding, for agents that pay for their input. Measured across this CLI it is about 40% fewer tokens than --json.",
7795
+ "exclusive": [
7796
+ "json"
7797
+ ],
7798
+ "name": "toon",
7799
+ "allowNo": false,
7800
+ "type": "boolean"
7801
+ },
7802
+ "state-id": {
7803
+ "description": "The state (fs_...). Default: FACES_STATE_ID, else .faces/state.local or .faces/state here or above.",
7804
+ "env": "FACES_STATE_ID",
7805
+ "name": "state-id",
7806
+ "hasDynamicHelp": false,
7807
+ "multiple": false,
7808
+ "type": "option"
7809
+ },
7810
+ "release": {
7811
+ "description": "Release the claims on it (only <who>'s, when given).",
7812
+ "name": "release",
7813
+ "allowNo": false,
7814
+ "type": "boolean"
7815
+ },
7816
+ "session": {
7817
+ "dependsOn": [
7818
+ "release"
7819
+ ],
7820
+ "description": "With --release and no key: release every claim this session took (what the session-end hook runs).",
7821
+ "name": "session",
7822
+ "hasDynamicHelp": false,
7823
+ "multiple": false,
7824
+ "type": "option"
7825
+ },
7826
+ "ttl": {
7827
+ "description": "How long it holds, in seconds (default 1800, at most 86400).",
7828
+ "name": "ttl",
7829
+ "hasDynamicHelp": false,
7830
+ "multiple": false,
7831
+ "type": "option"
7832
+ }
7833
+ },
7834
+ "hasDynamicHelp": false,
7835
+ "hiddenAliases": [],
7836
+ "id": "premise:claim",
7837
+ "pluginAlias": "@faces-sh/cli",
7838
+ "pluginName": "@faces-sh/cli",
7839
+ "pluginType": "core",
7840
+ "strict": true,
7841
+ "isESM": true,
7842
+ "relativePath": [
7843
+ "dist",
7844
+ "commands",
7845
+ "premise",
7846
+ "claim.js"
7847
+ ]
7848
+ },
7849
+ "premise:decide": {
7850
+ "aliases": [],
7851
+ "args": {
7852
+ "key": {
7853
+ "description": "The OR premise whose candidates to rank.",
7854
+ "name": "key",
7855
+ "required": true
7856
+ }
7857
+ },
7858
+ "description": "Rank a premise's candidates: a decision writes each one's p, which says which to try first. It never chooses or prunes: the top one is next to try, and its tests settle it; only a failed test run on a candidate, or the human, refutes one. Billed per call.",
7859
+ "examples": [
7860
+ "<%= config.bin %> <%= command.id %> \"the menu\" --face @home-cook"
7861
+ ],
7862
+ "flags": {
7863
+ "json": {
7864
+ "description": "Format output as json.",
7865
+ "helpGroup": "GLOBAL",
7866
+ "name": "json",
7867
+ "allowNo": false,
7868
+ "type": "boolean"
7869
+ },
7870
+ "base-url": {
7871
+ "description": "API base URL",
7872
+ "env": "FACES_BASE_URL",
7873
+ "name": "base-url",
7874
+ "hasDynamicHelp": false,
7875
+ "multiple": false,
7876
+ "type": "option"
7877
+ },
7878
+ "token": {
7879
+ "description": "JWT bearer token",
7880
+ "env": "FACES_TOKEN",
7881
+ "name": "token",
7882
+ "hasDynamicHelp": false,
7883
+ "multiple": false,
7884
+ "type": "option"
7885
+ },
7886
+ "api-key": {
7887
+ "description": "API key",
7888
+ "env": "FACES_API_KEY",
7889
+ "name": "api-key",
7890
+ "hasDynamicHelp": false,
7891
+ "multiple": false,
7892
+ "type": "option"
7893
+ },
7894
+ "toon": {
7895
+ "description": "Format output as TOON instead of JSON: the same data and field names in a more compact encoding, for agents that pay for their input. Measured across this CLI it is about 40% fewer tokens than --json.",
7896
+ "exclusive": [
7897
+ "json"
7898
+ ],
7899
+ "name": "toon",
7900
+ "allowNo": false,
7901
+ "type": "boolean"
7902
+ },
7903
+ "state-id": {
7904
+ "description": "The state (fs_...). Default: FACES_STATE_ID, else .faces/state.local or .faces/state here or above.",
7905
+ "env": "FACES_STATE_ID",
7906
+ "name": "state-id",
7907
+ "hasDynamicHelp": false,
7908
+ "multiple": false,
7909
+ "type": "option"
7910
+ },
7911
+ "as": {
7912
+ "description": "Who writes: your name, as a claim names it. A write into a branch another has claimed is refused (409) unless it is theirs.",
7913
+ "name": "as",
7914
+ "hasDynamicHelp": false,
7915
+ "multiple": false,
7916
+ "type": "option"
7917
+ },
7918
+ "face": {
7919
+ "description": "The face that does it: @alias (faces face:list --for \"<the task>\" ranks them).",
7920
+ "name": "face",
7921
+ "required": true,
7922
+ "hasDynamicHelp": false,
7923
+ "multiple": false,
7924
+ "type": "option"
7925
+ }
7926
+ },
7927
+ "hasDynamicHelp": false,
7928
+ "hiddenAliases": [],
7929
+ "id": "premise:decide",
7930
+ "pluginAlias": "@faces-sh/cli",
7931
+ "pluginName": "@faces-sh/cli",
7932
+ "pluginType": "core",
7933
+ "strict": true,
7934
+ "isESM": true,
7935
+ "relativePath": [
7936
+ "dist",
7937
+ "commands",
7938
+ "premise",
7939
+ "decide.js"
7940
+ ]
7941
+ },
7942
+ "premise:delete": {
7943
+ "aliases": [],
7944
+ "args": {
7945
+ "key": {
7946
+ "description": "The premise to remove.",
7947
+ "name": "key",
7948
+ "required": true
7949
+ }
7950
+ },
7951
+ "description": "Remove a premise and its edges. Its history keeps it; no status changes, nothing cascades. Free.",
7952
+ "examples": [
7953
+ "<%= config.bin %> <%= command.id %> \"the old menu\""
7954
+ ],
7955
+ "flags": {
7956
+ "json": {
7957
+ "description": "Format output as json.",
7958
+ "helpGroup": "GLOBAL",
7959
+ "name": "json",
7960
+ "allowNo": false,
7961
+ "type": "boolean"
7962
+ },
7963
+ "base-url": {
7964
+ "description": "API base URL",
7965
+ "env": "FACES_BASE_URL",
7966
+ "name": "base-url",
7967
+ "hasDynamicHelp": false,
7968
+ "multiple": false,
7969
+ "type": "option"
7970
+ },
7971
+ "token": {
7972
+ "description": "JWT bearer token",
7973
+ "env": "FACES_TOKEN",
7974
+ "name": "token",
7975
+ "hasDynamicHelp": false,
7976
+ "multiple": false,
7977
+ "type": "option"
7978
+ },
7979
+ "api-key": {
7980
+ "description": "API key",
7981
+ "env": "FACES_API_KEY",
7982
+ "name": "api-key",
7983
+ "hasDynamicHelp": false,
7984
+ "multiple": false,
7985
+ "type": "option"
7986
+ },
7987
+ "toon": {
7988
+ "description": "Format output as TOON instead of JSON: the same data and field names in a more compact encoding, for agents that pay for their input. Measured across this CLI it is about 40% fewer tokens than --json.",
7989
+ "exclusive": [
7990
+ "json"
7991
+ ],
7992
+ "name": "toon",
7993
+ "allowNo": false,
7994
+ "type": "boolean"
7995
+ },
7996
+ "state-id": {
7997
+ "description": "The state (fs_...). Default: FACES_STATE_ID, else .faces/state.local or .faces/state here or above.",
7998
+ "env": "FACES_STATE_ID",
7999
+ "name": "state-id",
8000
+ "hasDynamicHelp": false,
8001
+ "multiple": false,
8002
+ "type": "option"
8003
+ },
8004
+ "as": {
8005
+ "description": "Who writes: your name, as a claim names it. A write into a branch another has claimed is refused (409) unless it is theirs.",
8006
+ "name": "as",
8007
+ "hasDynamicHelp": false,
8008
+ "multiple": false,
8009
+ "type": "option"
8010
+ }
8011
+ },
8012
+ "hasDynamicHelp": false,
8013
+ "hiddenAliases": [],
8014
+ "id": "premise:delete",
8015
+ "pluginAlias": "@faces-sh/cli",
8016
+ "pluginName": "@faces-sh/cli",
8017
+ "pluginType": "core",
8018
+ "strict": true,
8019
+ "isESM": true,
8020
+ "relativePath": [
8021
+ "dist",
8022
+ "commands",
8023
+ "premise",
8024
+ "delete.js"
8025
+ ]
8026
+ },
8027
+ "premise:edit": {
8028
+ "aliases": [],
8029
+ "args": {
8030
+ "key": {
8031
+ "description": "The premise to change.",
8032
+ "name": "key",
8033
+ "required": true
8034
+ }
8035
+ },
8036
+ "description": "Change a premise; fails if the key does not exist. Only what you give changes. A test run is an edit: --status verified|invalidated --tested <candidate> --evidence \"<what the run showed>\". Filling a premise is --value with --await none. A goal's new value sets its refinement back to incomplete. Free.",
8037
+ "examples": [
8038
+ "<%= config.bin %> <%= command.id %> \"each guest can eat each dish\" --status verified --tested \"the vegan menu\" --evidence \"every dish checked\"",
8039
+ "<%= config.bin %> <%= command.id %> \"the budget\" --value \"60 euros\" --await none --said \"Sixty euros.\"",
8040
+ "<%= config.bin %> <%= command.id %> \"the menu\" --key \"what we serve\"",
8041
+ "<%= config.bin %> <%= command.id %> \"the menu\" --note \"ask about allergies too\""
8042
+ ],
8043
+ "flags": {
8044
+ "json": {
8045
+ "description": "Format output as json.",
8046
+ "helpGroup": "GLOBAL",
8047
+ "name": "json",
8048
+ "allowNo": false,
8049
+ "type": "boolean"
8050
+ },
8051
+ "base-url": {
8052
+ "description": "API base URL",
8053
+ "env": "FACES_BASE_URL",
8054
+ "name": "base-url",
8055
+ "hasDynamicHelp": false,
8056
+ "multiple": false,
8057
+ "type": "option"
8058
+ },
8059
+ "token": {
8060
+ "description": "JWT bearer token",
8061
+ "env": "FACES_TOKEN",
8062
+ "name": "token",
8063
+ "hasDynamicHelp": false,
8064
+ "multiple": false,
8065
+ "type": "option"
8066
+ },
8067
+ "api-key": {
8068
+ "description": "API key",
8069
+ "env": "FACES_API_KEY",
8070
+ "name": "api-key",
8071
+ "hasDynamicHelp": false,
8072
+ "multiple": false,
8073
+ "type": "option"
8074
+ },
8075
+ "toon": {
8076
+ "description": "Format output as TOON instead of JSON: the same data and field names in a more compact encoding, for agents that pay for their input. Measured across this CLI it is about 40% fewer tokens than --json.",
8077
+ "exclusive": [
8078
+ "json"
8079
+ ],
8080
+ "name": "toon",
8081
+ "allowNo": false,
8082
+ "type": "boolean"
8083
+ },
8084
+ "state-id": {
8085
+ "description": "The state (fs_...). Default: FACES_STATE_ID, else .faces/state.local or .faces/state here or above.",
8086
+ "env": "FACES_STATE_ID",
8087
+ "name": "state-id",
8088
+ "hasDynamicHelp": false,
8089
+ "multiple": false,
8090
+ "type": "option"
8091
+ },
8092
+ "as": {
8093
+ "description": "Who writes: your name, as a claim names it. A write into a branch another has claimed is refused (409) unless it is theirs.",
8094
+ "name": "as",
8095
+ "hasDynamicHelp": false,
8096
+ "multiple": false,
8097
+ "type": "option"
8098
+ },
8099
+ "value": {
8100
+ "description": "Its new value: JSON when it is JSON, text otherwise.",
8101
+ "name": "value",
8102
+ "hasDynamicHelp": false,
8103
+ "multiple": false,
8104
+ "type": "option"
8105
+ },
8106
+ "key": {
8107
+ "description": "Rename it to this key; its edges, claims and messages follow.",
8108
+ "name": "key",
8109
+ "hasDynamicHelp": false,
8110
+ "multiple": false,
8111
+ "type": "option"
8112
+ },
8113
+ "status": {
8114
+ "description": "stated, verified, assumed, unresolved or invalidated.",
8115
+ "name": "status",
8116
+ "hasDynamicHelp": false,
8117
+ "multiple": false,
8118
+ "type": "option"
8119
+ },
8120
+ "description": {
8121
+ "description": "What the premise is, in a line.",
8122
+ "name": "description",
8123
+ "hasDynamicHelp": false,
8124
+ "multiple": false,
8125
+ "type": "option"
8126
+ },
8127
+ "await": {
8128
+ "description": "What it waits on: human, environment, a test's key, or none.",
8129
+ "name": "await",
8130
+ "hasDynamicHelp": false,
8131
+ "multiple": false,
8132
+ "type": "option"
8133
+ },
8134
+ "tested": {
8135
+ "description": "With --status on a test: the candidate the run was on.",
8136
+ "name": "tested",
8137
+ "hasDynamicHelp": false,
8138
+ "multiple": false,
8139
+ "type": "option"
8140
+ },
8141
+ "evidence": {
8142
+ "description": "What a test run showed (stored as a message).",
8143
+ "name": "evidence",
8144
+ "hasDynamicHelp": false,
8145
+ "multiple": false,
8146
+ "type": "option"
8147
+ },
8148
+ "note": {
8149
+ "description": "A note linked to the premise.",
8150
+ "name": "note",
8151
+ "hasDynamicHelp": false,
8152
+ "multiple": false,
8153
+ "type": "option"
8154
+ },
8155
+ "on": {
8156
+ "description": "Replace the inputs it reads: premise keys, comma separated (repeatable).",
8157
+ "name": "on",
8158
+ "hasDynamicHelp": false,
8159
+ "multiple": true,
8160
+ "type": "option"
8161
+ },
8162
+ "refinement": {
8163
+ "description": "complete or incomplete: whether its refinement is sufficient (what premise:refine records).",
8164
+ "name": "refinement",
8165
+ "hasDynamicHelp": false,
8166
+ "multiple": false,
8167
+ "options": [
8168
+ "complete",
8169
+ "incomplete"
8170
+ ],
8171
+ "type": "option"
8172
+ },
8173
+ "said": {
8174
+ "description": "The human's words behind this change.",
8175
+ "name": "said",
8176
+ "hasDynamicHelp": false,
8177
+ "multiple": false,
8178
+ "type": "option"
8179
+ }
8180
+ },
8181
+ "hasDynamicHelp": false,
8182
+ "hiddenAliases": [],
8183
+ "id": "premise:edit",
8184
+ "pluginAlias": "@faces-sh/cli",
8185
+ "pluginName": "@faces-sh/cli",
8186
+ "pluginType": "core",
8187
+ "strict": true,
8188
+ "isESM": true,
8189
+ "relativePath": [
8190
+ "dist",
8191
+ "commands",
8192
+ "premise",
8193
+ "edit.js"
8194
+ ]
8195
+ },
8196
+ "premise:get": {
8197
+ "aliases": [],
8198
+ "args": {
8199
+ "key": {
8200
+ "description": "The premise.",
8201
+ "name": "key",
8202
+ "required": true
8203
+ }
8204
+ },
8205
+ "description": "One premise and its branch, numbered as in state:get, then every message linked to it in full (what the human said, notes, evidence). --depth N levels (default all); --up the path from its root down to it; --query a search by meaning limited to its branch. Free.",
8206
+ "examples": [
8207
+ "<%= config.bin %> <%= command.id %> \"the dinner is planned\" --depth 2",
8208
+ "<%= config.bin %> <%= command.id %> \"the menu\" --up",
8209
+ "<%= config.bin %> <%= command.id %> \"the menu\" --query \"allergies\""
8210
+ ],
8211
+ "flags": {
8212
+ "json": {
8213
+ "description": "Format output as json.",
8214
+ "helpGroup": "GLOBAL",
8215
+ "name": "json",
8216
+ "allowNo": false,
8217
+ "type": "boolean"
8218
+ },
8219
+ "base-url": {
8220
+ "description": "API base URL",
8221
+ "env": "FACES_BASE_URL",
8222
+ "name": "base-url",
8223
+ "hasDynamicHelp": false,
8224
+ "multiple": false,
8225
+ "type": "option"
8226
+ },
8227
+ "token": {
8228
+ "description": "JWT bearer token",
8229
+ "env": "FACES_TOKEN",
8230
+ "name": "token",
8231
+ "hasDynamicHelp": false,
8232
+ "multiple": false,
8233
+ "type": "option"
8234
+ },
8235
+ "api-key": {
8236
+ "description": "API key",
8237
+ "env": "FACES_API_KEY",
8238
+ "name": "api-key",
8239
+ "hasDynamicHelp": false,
8240
+ "multiple": false,
8241
+ "type": "option"
8242
+ },
8243
+ "toon": {
8244
+ "description": "Format output as TOON instead of JSON: the same data and field names in a more compact encoding, for agents that pay for their input. Measured across this CLI it is about 40% fewer tokens than --json.",
8245
+ "exclusive": [
8246
+ "json"
8247
+ ],
8248
+ "name": "toon",
8249
+ "allowNo": false,
8250
+ "type": "boolean"
8251
+ },
8252
+ "state-id": {
8253
+ "description": "The state (fs_...). Default: FACES_STATE_ID, else .faces/state.local or .faces/state here or above.",
8254
+ "env": "FACES_STATE_ID",
8255
+ "name": "state-id",
8256
+ "hasDynamicHelp": false,
8257
+ "multiple": false,
8258
+ "type": "option"
8259
+ },
8260
+ "problog": {
8261
+ "description": "The proof as runnable ProbLog.",
8262
+ "exclusive": [
8263
+ "dot"
8264
+ ],
8265
+ "name": "problog",
8266
+ "allowNo": false,
8267
+ "type": "boolean"
8268
+ },
8269
+ "dot": {
8270
+ "description": "The proof as Graphviz dot.",
8271
+ "exclusive": [
8272
+ "problog"
8273
+ ],
8274
+ "name": "dot",
8275
+ "allowNo": false,
8276
+ "type": "boolean"
8277
+ },
8278
+ "depth": {
8279
+ "description": "How many levels below it, 0 to 50. Default: all.",
8280
+ "name": "depth",
8281
+ "hasDynamicHelp": false,
8282
+ "multiple": false,
8283
+ "type": "option"
8284
+ },
8285
+ "up": {
8286
+ "description": "The path from its root down to it, instead of its branch.",
8287
+ "name": "up",
8288
+ "allowNo": false,
8289
+ "type": "boolean"
8290
+ },
8291
+ "query": {
8292
+ "description": "The premises in its branch that best match this text, by meaning.",
8293
+ "name": "query",
8294
+ "hasDynamicHelp": false,
8295
+ "multiple": false,
8296
+ "type": "option"
8297
+ },
8298
+ "all": {
8299
+ "description": "Also premises pruned by an earlier version.",
8300
+ "name": "all",
8301
+ "allowNo": false,
8302
+ "type": "boolean"
8303
+ }
8304
+ },
8305
+ "hasDynamicHelp": false,
8306
+ "hiddenAliases": [],
8307
+ "id": "premise:get",
8308
+ "pluginAlias": "@faces-sh/cli",
8309
+ "pluginName": "@faces-sh/cli",
8310
+ "pluginType": "core",
8311
+ "strict": true,
8312
+ "isESM": true,
8313
+ "relativePath": [
8314
+ "dist",
8315
+ "commands",
8316
+ "premise",
8317
+ "get.js"
8318
+ ]
8319
+ },
8320
+ "premise:refine": {
8321
+ "aliases": [],
8322
+ "args": {
8323
+ "key": {
8324
+ "description": "The premise to refine.",
8325
+ "name": "key",
8326
+ "required": true
8327
+ }
8328
+ },
8329
+ "description": "Break a goal into sub-goals: a fixed loop of billed /v1/choices and /v1/decisions calls. A decision judges what it needs (conditions that must all hold, meanings to pick from, one test, or the human); the face proposes; each condition must pass two judges; a gap check adds what they leave out. A goal rewritten since is checked again against its new value. -r refines what it refines into too, breadth first. Billed per model call; prints how many it made.",
8330
+ "examples": [
8331
+ "<%= config.bin %> <%= command.id %> \"the dinner is planned\" --face @home-cook",
8332
+ "<%= config.bin %> <%= command.id %> \"the dinner is planned\" --face @home-cook -r --depth 2"
8333
+ ],
8334
+ "flags": {
8335
+ "json": {
8336
+ "description": "Format output as json.",
8337
+ "helpGroup": "GLOBAL",
8338
+ "name": "json",
8339
+ "allowNo": false,
8340
+ "type": "boolean"
8341
+ },
8342
+ "base-url": {
8343
+ "description": "API base URL",
8344
+ "env": "FACES_BASE_URL",
8345
+ "name": "base-url",
8346
+ "hasDynamicHelp": false,
8347
+ "multiple": false,
8348
+ "type": "option"
8349
+ },
8350
+ "token": {
8351
+ "description": "JWT bearer token",
8352
+ "env": "FACES_TOKEN",
8353
+ "name": "token",
8354
+ "hasDynamicHelp": false,
8355
+ "multiple": false,
8356
+ "type": "option"
8357
+ },
8358
+ "api-key": {
8359
+ "description": "API key",
8360
+ "env": "FACES_API_KEY",
8361
+ "name": "api-key",
8362
+ "hasDynamicHelp": false,
8363
+ "multiple": false,
8364
+ "type": "option"
8365
+ },
8366
+ "toon": {
8367
+ "description": "Format output as TOON instead of JSON: the same data and field names in a more compact encoding, for agents that pay for their input. Measured across this CLI it is about 40% fewer tokens than --json.",
8368
+ "exclusive": [
8369
+ "json"
8370
+ ],
8371
+ "name": "toon",
8372
+ "allowNo": false,
8373
+ "type": "boolean"
8374
+ },
8375
+ "state-id": {
8376
+ "description": "The state (fs_...). Default: FACES_STATE_ID, else .faces/state.local or .faces/state here or above.",
8377
+ "env": "FACES_STATE_ID",
8378
+ "name": "state-id",
8379
+ "hasDynamicHelp": false,
8380
+ "multiple": false,
8381
+ "type": "option"
8382
+ },
8383
+ "as": {
8384
+ "description": "Who writes: your name, as a claim names it. A write into a branch another has claimed is refused (409) unless it is theirs.",
8385
+ "name": "as",
8386
+ "hasDynamicHelp": false,
8387
+ "multiple": false,
8388
+ "type": "option"
8389
+ },
8390
+ "face": {
8391
+ "description": "The face that does it: @alias (faces face:list --for \"<the task>\" ranks them).",
8392
+ "name": "face",
8393
+ "required": true,
8394
+ "hasDynamicHelp": false,
8395
+ "multiple": false,
8396
+ "type": "option"
8397
+ },
8398
+ "recursive": {
8399
+ "char": "r",
8400
+ "description": "Refine what it refines into too, breadth first: a branch stops at a test, the human's fact or an await; on an OR only the next candidate to try is refined.",
8401
+ "name": "recursive",
8402
+ "allowNo": false,
8403
+ "type": "boolean"
8404
+ },
8405
+ "depth": {
8406
+ "dependsOn": [
8407
+ "recursive"
8408
+ ],
8409
+ "description": "With -r: how many levels to refine, a whole number from 1, or all for no limit. Default 3. Every level's calls are billed.",
8410
+ "name": "depth",
8411
+ "hasDynamicHelp": false,
8412
+ "multiple": false,
8413
+ "type": "option"
8414
+ }
8415
+ },
8416
+ "hasDynamicHelp": false,
8417
+ "hiddenAliases": [],
8418
+ "id": "premise:refine",
8419
+ "pluginAlias": "@faces-sh/cli",
8420
+ "pluginName": "@faces-sh/cli",
8421
+ "pluginType": "core",
8422
+ "strict": true,
8423
+ "isESM": true,
8424
+ "relativePath": [
8425
+ "dist",
8426
+ "commands",
8427
+ "premise",
8428
+ "refine.js"
8429
+ ]
8430
+ },
8431
+ "session:close": {
8432
+ "aliases": [],
8433
+ "args": {
8434
+ "session_id": {
8435
+ "description": "Session id (from session:create)",
8436
+ "name": "session_id",
8437
+ "required": true
8438
+ }
8439
+ },
8440
+ "description": "Close a session. A closed session takes no more turns and cannot be compacted or read. Its compactions stay usable until they expire. Free. Sessions are now called states: see faces state:close.",
8441
+ "examples": [
8442
+ "<%= config.bin %> <%= command.id %> fs_SESSION_ID --yes"
8443
+ ],
8444
+ "flags": {
8445
+ "json": {
8446
+ "description": "Format output as json.",
8447
+ "helpGroup": "GLOBAL",
8448
+ "name": "json",
8449
+ "allowNo": false,
8450
+ "type": "boolean"
8451
+ },
8452
+ "base-url": {
8453
+ "description": "API base URL",
8454
+ "env": "FACES_BASE_URL",
8455
+ "name": "base-url",
8456
+ "hasDynamicHelp": false,
8457
+ "multiple": false,
8458
+ "type": "option"
8459
+ },
8460
+ "token": {
8461
+ "description": "JWT bearer token",
8462
+ "env": "FACES_TOKEN",
8463
+ "name": "token",
8464
+ "hasDynamicHelp": false,
8465
+ "multiple": false,
8466
+ "type": "option"
8467
+ },
8468
+ "api-key": {
8469
+ "description": "API key",
8470
+ "env": "FACES_API_KEY",
8471
+ "name": "api-key",
8472
+ "hasDynamicHelp": false,
8473
+ "multiple": false,
8474
+ "type": "option"
8475
+ },
8476
+ "toon": {
8477
+ "description": "Format output as TOON instead of JSON: the same data and field names in a more compact encoding, for agents that pay for their input. Measured across this CLI it is about 40% fewer tokens than --json.",
8478
+ "exclusive": [
8479
+ "json"
8480
+ ],
8481
+ "name": "toon",
8482
+ "allowNo": false,
8483
+ "type": "boolean"
8484
+ },
8485
+ "yes": {
8486
+ "description": "Skip confirmation",
8487
+ "name": "yes",
8488
+ "allowNo": false,
8489
+ "type": "boolean"
8490
+ }
8491
+ },
8492
+ "hasDynamicHelp": false,
8493
+ "hiddenAliases": [],
8494
+ "id": "session:close",
8495
+ "pluginAlias": "@faces-sh/cli",
8496
+ "pluginName": "@faces-sh/cli",
8497
+ "pluginType": "core",
8498
+ "strict": true,
8499
+ "enableJsonFlag": true,
8500
+ "isESM": true,
8501
+ "relativePath": [
8502
+ "dist",
8503
+ "commands",
8504
+ "session",
8505
+ "close.js"
8506
+ ]
8507
+ },
8508
+ "session:compact": {
8509
+ "aliases": [],
8510
+ "args": {
8511
+ "session_id": {
8512
+ "description": "Session id (from session:create)",
8513
+ "name": "session_id",
8514
+ "required": true
8515
+ }
8516
+ },
8517
+ "description": "Compact a session: the face's position over the session, kept on the server under a compaction id. Pass that id with --compaction on a later request with the same face, and send only the messages you still want read. Billed on the tokens it reads and writes; on Connect and Pro it counts against the plan's allowance. A failed compaction is not charged. A compaction expires 30 days after it is written. Sessions are now called states: see faces state:compact.",
8518
+ "examples": [
8519
+ "<%= config.bin %> <%= command.id %> fs_SESSION_ID",
8520
+ "<%= config.bin %> <%= command.id %> fs_SESSION_ID --json"
8521
+ ],
8522
+ "flags": {
8523
+ "json": {
8524
+ "description": "Format output as json.",
8525
+ "helpGroup": "GLOBAL",
8526
+ "name": "json",
8527
+ "allowNo": false,
8528
+ "type": "boolean"
8529
+ },
8530
+ "base-url": {
8531
+ "description": "API base URL",
8532
+ "env": "FACES_BASE_URL",
8533
+ "name": "base-url",
8534
+ "hasDynamicHelp": false,
8535
+ "multiple": false,
8536
+ "type": "option"
8537
+ },
8538
+ "token": {
8539
+ "description": "JWT bearer token",
8540
+ "env": "FACES_TOKEN",
8541
+ "name": "token",
8542
+ "hasDynamicHelp": false,
8543
+ "multiple": false,
8544
+ "type": "option"
8545
+ },
8546
+ "api-key": {
8547
+ "description": "API key",
8548
+ "env": "FACES_API_KEY",
8549
+ "name": "api-key",
8550
+ "hasDynamicHelp": false,
8551
+ "multiple": false,
8552
+ "type": "option"
8553
+ },
8554
+ "toon": {
8555
+ "description": "Format output as TOON instead of JSON: the same data and field names in a more compact encoding, for agents that pay for their input. Measured across this CLI it is about 40% fewer tokens than --json.",
8556
+ "exclusive": [
8557
+ "json"
8558
+ ],
8559
+ "name": "toon",
8560
+ "allowNo": false,
8561
+ "type": "boolean"
8562
+ }
8563
+ },
8564
+ "hasDynamicHelp": false,
8565
+ "hiddenAliases": [],
8566
+ "id": "session:compact",
8567
+ "pluginAlias": "@faces-sh/cli",
8568
+ "pluginName": "@faces-sh/cli",
8569
+ "pluginType": "core",
8570
+ "strict": true,
8571
+ "enableJsonFlag": true,
8572
+ "isESM": true,
8573
+ "relativePath": [
8574
+ "dist",
7367
8575
  "commands",
7368
8576
  "session",
7369
8577
  "compact.js"
@@ -7527,6 +8735,7 @@
7527
8735
  "<%= config.bin %> <%= command.id %> fs_STATE_ID --premise rent_rises=\"no rise\" --premise-status rent_rises=invalidated",
7528
8736
  "<%= config.bin %> <%= command.id %> fs_STATE_ID --premise can_afford=false --premise-description can_afford=\"we can carry the rent\" --premise-depends-on can_afford=rent_rises",
7529
8737
  "<%= config.bin %> <%= command.id %> fs_STATE_ID --premise budget_usd=50000 --premise-description budget_usd=\"the most we can spend this year\"",
8738
+ "<%= config.bin %> <%= command.id %> fs_STATE_ID --premise ship_by=friday --premise-description ship_by=\"when we want it shipped\" --premise-role ship_by=wanted --premise-origin ship_by=human",
7530
8739
  "<%= config.bin %> <%= command.id %> fs_STATE_ID -m \"The vendor sent their audit report.\""
7531
8740
  ],
7532
8741
  "flags": {
@@ -7579,7 +8788,7 @@
7579
8788
  "type": "option"
7580
8789
  },
7581
8790
  "premise": {
7582
- "description": "A premise, as key=value (repeatable): a named fact the face's answers depend on, kept on the state. The key is 1 to 64 letters, digits, _ or -. The value is read as JSON when it is JSON (50000, true, null, [\"a\",\"b\"], {\"max\":3}) and as text otherwise, so plan=annual is the text \"annual\". Quote it to keep a number as text: --premise 'code=\"007\"'. A newer value of a key replaces it from then on. A key used for the first time needs --premise-description.",
8791
+ "description": "A premise, as key=value (repeatable): a named fact the face's answers depend on, kept on the state. The key is plain text, 1 to 120 characters, split from the value at the first =: --premise 'everyone can eat=yes'. A key that holds = goes in double quotes: --premise '\"a=b\"=yes'. The value is read as JSON when it is JSON (50000, true, null, [\"a\",\"b\"], {\"max\":3}) and as text otherwise, so plan=annual is the text \"annual\". Quote it to keep a number as text: --premise 'code=\"007\"'. A newer value of a key replaces it from then on. A key used for the first time needs --premise-description.",
7583
8792
  "name": "premise",
7584
8793
  "hasDynamicHelp": false,
7585
8794
  "multiple": true,
@@ -7600,11 +8809,25 @@
7600
8809
  "type": "option"
7601
8810
  },
7602
8811
  "premise-depends-on": {
7603
- "description": "What a --premise rests on, as key=a,b (repeatable, one per key): premise keys and decision ids already in the state or set in the same request, at most 200. key= with nothing after it clears it; left out, a newer value keeps what the key rested on before.",
8812
+ "description": "What a --premise rests on, as key=a,b (repeatable, one per key): premise keys, decision ids and option ids (opt_..., or cho_... for all of a choices list, from faces choices --state-id) already in the state or set in the same request, at most 200, comma separated (a key that holds a comma goes in double quotes: key='\"x, y\",b'). key rests on each: each must hold for it to hold. Weigh an entry with :and or :or, then a weight from 0 to 1, then @ and the decision that set it: task=a,b:or:0.7,c:and:0.5@dec_x. An and entry is a child that must hold (its weight is importance); the or entries are alternatives, one of which holds (their weights are probabilities and sum to 1). A plain entry is an and with no weight. key= with nothing after it clears it; left out, a newer value keeps what the key rested on before.",
7604
8813
  "name": "premise-depends-on",
7605
8814
  "hasDynamicHelp": false,
7606
8815
  "multiple": true,
7607
8816
  "type": "option"
8817
+ },
8818
+ "premise-role": {
8819
+ "description": "A --premise's role, as key=role (repeatable, one per key): goal or test. wanted marks a goal, the outcome the state is working toward (the work is done when every goal is achieved); test marks a check that must pass. key= with nothing after it clears it; left out, a newer value keeps the role the key had.",
8820
+ "name": "premise-role",
8821
+ "hasDynamicHelp": false,
8822
+ "multiple": true,
8823
+ "type": "option"
8824
+ },
8825
+ "premise-origin": {
8826
+ "description": "Who set a --premise, as key=origin (repeatable, one per key): human, agent, tool, web. key= with nothing after it clears it; left out, a newer value keeps the origin the key had.",
8827
+ "name": "premise-origin",
8828
+ "hasDynamicHelp": false,
8829
+ "multiple": true,
8830
+ "type": "option"
7608
8831
  }
7609
8832
  },
7610
8833
  "hasDynamicHelp": false,
@@ -7779,19 +9002,12 @@
7779
9002
  },
7780
9003
  "state:create": {
7781
9004
  "aliases": [],
7782
- "args": {
7783
- "face": {
7784
- "description": "The face alone: @alice, @owner~alice, or a composite such as \"(@a | @b)\". No maestro or model. Leave it out for a state that takes any of your faces.",
7785
- "name": "face",
7786
- "required": false
7787
- }
7788
- },
7789
- "description": "Start a state (formerly a conversation). The server keeps the situation your agent builds: premises (named facts, each with a status and what it depends on), the decisions faces made, and your messages. Ask a face about it with faces choices --state-id, or pass its id with --conversation on chat or decide and send only what is new. Name a face and the state takes that face only; leave it out and it takes any of your faces. Opening one is free. A state expires 30 days after it was last used.",
9005
+ "args": {},
9006
+ "description": "Create a new, empty state: a proof in progress, built with premise:add and read with state:get. --use makes this directory use it (.faces/state, read by every faces call here or below). Free. A state expires 30 days after it was last used.",
7790
9007
  "examples": [
7791
- "<%= config.bin %> <%= command.id %> @alice",
7792
- "<%= config.bin %> <%= command.id %>",
7793
- "<%= config.bin %> <%= command.id %> --no-causes-visible --json",
7794
- "<%= config.bin %> <%= command.id %> @alice --premise budget_usd=50000 --premise-description budget_usd=\"the most we can spend this year\""
9008
+ "<%= config.bin %> <%= command.id %> --use",
9009
+ "<%= config.bin %> <%= command.id %> --use --local",
9010
+ "<%= config.bin %> <%= command.id %>"
7795
9011
  ],
7796
9012
  "flags": {
7797
9013
  "json": {
@@ -7834,66 +9050,150 @@
7834
9050
  "allowNo": false,
7835
9051
  "type": "boolean"
7836
9052
  },
7837
- "causes-visible": {
7838
- "description": "Whether each face reads the other faces' causes. On by default; --no-causes-visible keeps each face to its own. Matters only in a state with several faces.",
7839
- "name": "causes-visible",
7840
- "allowNo": true,
9053
+ "use": {
9054
+ "description": "Use it in this directory: write .faces/state, which every faces call here or below reads.",
9055
+ "name": "use",
9056
+ "allowNo": false,
7841
9057
  "type": "boolean"
7842
9058
  },
7843
- "message": {
7844
- "char": "m",
7845
- "description": "A first message of yours (repeatable, kept in order).",
7846
- "name": "message",
9059
+ "local": {
9060
+ "dependsOn": [
9061
+ "use"
9062
+ ],
9063
+ "description": "With --use: write .faces/state.local instead (overrides .faces/state, for you alone).",
9064
+ "name": "local",
9065
+ "allowNo": false,
9066
+ "type": "boolean"
9067
+ }
9068
+ },
9069
+ "hasDynamicHelp": false,
9070
+ "hiddenAliases": [],
9071
+ "id": "state:create",
9072
+ "pluginAlias": "@faces-sh/cli",
9073
+ "pluginName": "@faces-sh/cli",
9074
+ "pluginType": "core",
9075
+ "strict": true,
9076
+ "enableJsonFlag": true,
9077
+ "isESM": true,
9078
+ "relativePath": [
9079
+ "dist",
9080
+ "commands",
9081
+ "state",
9082
+ "create.js"
9083
+ ]
9084
+ },
9085
+ "state:get": {
9086
+ "aliases": [],
9087
+ "args": {
9088
+ "id": {
9089
+ "description": "The state (fs_...). Default: .faces/state here or above.",
9090
+ "name": "id",
9091
+ "required": false
9092
+ }
9093
+ },
9094
+ "description": "The whole proof: one line per premise, numbered (1, 1.2, 1.2.1), [x] proved, [ ] open, [-] refuted, the operator on each parent, candidates highest p first; then the last line: proved, refuted or open, the next candidate to try, and what would prove it. --query: the premises that best match a text, by meaning. Free.",
9095
+ "examples": [
9096
+ "<%= config.bin %> <%= command.id %>",
9097
+ "<%= config.bin %> <%= command.id %> --query \"dietary needs\"",
9098
+ "<%= config.bin %> <%= command.id %> --problog > proof.pl"
9099
+ ],
9100
+ "flags": {
9101
+ "json": {
9102
+ "description": "Format output as json.",
9103
+ "helpGroup": "GLOBAL",
9104
+ "name": "json",
9105
+ "allowNo": false,
9106
+ "type": "boolean"
9107
+ },
9108
+ "base-url": {
9109
+ "description": "API base URL",
9110
+ "env": "FACES_BASE_URL",
9111
+ "name": "base-url",
7847
9112
  "hasDynamicHelp": false,
7848
- "multiple": true,
9113
+ "multiple": false,
7849
9114
  "type": "option"
7850
9115
  },
7851
- "premise": {
7852
- "description": "A premise, as key=value (repeatable): a named fact the face's answers depend on, kept on the state. The key is 1 to 64 letters, digits, _ or -. The value is read as JSON when it is JSON (50000, true, null, [\"a\",\"b\"], {\"max\":3}) and as text otherwise, so plan=annual is the text \"annual\". Quote it to keep a number as text: --premise 'code=\"007\"'. A newer value of a key replaces it from then on. A key used for the first time needs --premise-description.",
7853
- "name": "premise",
9116
+ "token": {
9117
+ "description": "JWT bearer token",
9118
+ "env": "FACES_TOKEN",
9119
+ "name": "token",
7854
9120
  "hasDynamicHelp": false,
7855
- "multiple": true,
9121
+ "multiple": false,
7856
9122
  "type": "option"
7857
9123
  },
7858
- "premise-description": {
7859
- "description": "What a --premise means, in plain words, as key=\"text\" (repeatable, one per key), e.g. --premise-description budget_usd=\"the most we can spend this year\". Required the first time a key is used in a state, and kept after that.",
7860
- "name": "premise-description",
9124
+ "api-key": {
9125
+ "description": "API key",
9126
+ "env": "FACES_API_KEY",
9127
+ "name": "api-key",
7861
9128
  "hasDynamicHelp": false,
7862
- "multiple": true,
9129
+ "multiple": false,
7863
9130
  "type": "option"
7864
9131
  },
7865
- "premise-status": {
7866
- "description": "A --premise's status, as key=status (repeatable, one per key): stated, verified, assumed, unresolved, invalidated. Left out, a new premise is stated. An invalidated premise invalidates everything that depends on it; set it to another status to restore them.",
7867
- "name": "premise-status",
9132
+ "toon": {
9133
+ "description": "Format output as TOON instead of JSON: the same data and field names in a more compact encoding, for agents that pay for their input. Measured across this CLI it is about 40% fewer tokens than --json.",
9134
+ "exclusive": [
9135
+ "json"
9136
+ ],
9137
+ "name": "toon",
9138
+ "allowNo": false,
9139
+ "type": "boolean"
9140
+ },
9141
+ "state-id": {
9142
+ "description": "The state (fs_...). Default: FACES_STATE_ID, else .faces/state.local or .faces/state here or above.",
9143
+ "env": "FACES_STATE_ID",
9144
+ "name": "state-id",
7868
9145
  "hasDynamicHelp": false,
7869
- "multiple": true,
9146
+ "multiple": false,
7870
9147
  "type": "option"
7871
9148
  },
7872
- "premise-depends-on": {
7873
- "description": "What a --premise rests on, as key=a,b (repeatable, one per key): premise keys and decision ids already in the state or set in the same request, at most 200. key= with nothing after it clears it; left out, a newer value keeps what the key rested on before.",
7874
- "name": "premise-depends-on",
9149
+ "problog": {
9150
+ "description": "The proof as runnable ProbLog.",
9151
+ "exclusive": [
9152
+ "dot"
9153
+ ],
9154
+ "name": "problog",
9155
+ "allowNo": false,
9156
+ "type": "boolean"
9157
+ },
9158
+ "dot": {
9159
+ "description": "The proof as Graphviz dot.",
9160
+ "exclusive": [
9161
+ "problog"
9162
+ ],
9163
+ "name": "dot",
9164
+ "allowNo": false,
9165
+ "type": "boolean"
9166
+ },
9167
+ "query": {
9168
+ "description": "The premises that best match this text, by meaning.",
9169
+ "name": "query",
7875
9170
  "hasDynamicHelp": false,
7876
- "multiple": true,
9171
+ "multiple": false,
7877
9172
  "type": "option"
9173
+ },
9174
+ "all": {
9175
+ "description": "Also premises pruned by an earlier version.",
9176
+ "name": "all",
9177
+ "allowNo": false,
9178
+ "type": "boolean"
7878
9179
  }
7879
9180
  },
7880
9181
  "hasDynamicHelp": false,
7881
9182
  "hiddenAliases": [],
7882
- "id": "state:create",
9183
+ "id": "state:get",
7883
9184
  "pluginAlias": "@faces-sh/cli",
7884
9185
  "pluginName": "@faces-sh/cli",
7885
9186
  "pluginType": "core",
7886
9187
  "strict": true,
7887
- "enableJsonFlag": true,
7888
9188
  "isESM": true,
7889
9189
  "relativePath": [
7890
9190
  "dist",
7891
9191
  "commands",
7892
9192
  "state",
7893
- "create.js"
9193
+ "get.js"
7894
9194
  ]
7895
9195
  },
7896
- "state:get": {
9196
+ "state:items": {
7897
9197
  "aliases": [],
7898
9198
  "args": {
7899
9199
  "conversation_id": {
@@ -7902,9 +9202,10 @@
7902
9202
  "required": true
7903
9203
  }
7904
9204
  },
7905
- "description": "Read a state: its face (or any), status, how many turns and items it holds, whether faces read each other's causes, and when it expires. Free. See its items with faces state:items.",
9205
+ "description": "List a state's items in order: premises, decisions with their choice, cause and status, your messages and each face's reply. Ends with the premises in force now, each with its status. Free.",
7906
9206
  "examples": [
7907
- "<%= config.bin %> <%= command.id %> fs_STATE_ID"
9207
+ "<%= config.bin %> <%= command.id %> fs_STATE_ID",
9208
+ "<%= config.bin %> <%= command.id %> fs_STATE_ID --json"
7908
9209
  ],
7909
9210
  "flags": {
7910
9211
  "json": {
@@ -7950,7 +9251,7 @@
7950
9251
  },
7951
9252
  "hasDynamicHelp": false,
7952
9253
  "hiddenAliases": [],
7953
- "id": "state:get",
9254
+ "id": "state:items",
7954
9255
  "pluginAlias": "@faces-sh/cli",
7955
9256
  "pluginName": "@faces-sh/cli",
7956
9257
  "pluginType": "core",
@@ -7961,22 +9262,22 @@
7961
9262
  "dist",
7962
9263
  "commands",
7963
9264
  "state",
7964
- "get.js"
9265
+ "items.js"
7965
9266
  ]
7966
9267
  },
7967
- "state:items": {
9268
+ "state:use": {
7968
9269
  "aliases": [],
7969
9270
  "args": {
7970
- "conversation_id": {
7971
- "description": "State id (from state:create)",
7972
- "name": "conversation_id",
9271
+ "state_id": {
9272
+ "description": "The state (fs_...).",
9273
+ "name": "state_id",
7973
9274
  "required": true
7974
9275
  }
7975
9276
  },
7976
- "description": "List a state's items in order: premises, decisions with their choice, cause and status, your messages and each face's reply. Ends with the premises in force now, each with its status. Free.",
9277
+ "description": "Use a state in this directory: writes .faces/state (or .faces/state.local with --local, which overrides it), so every faces call run here or below finds it. Prints its synopsis. Free.",
7977
9278
  "examples": [
7978
9279
  "<%= config.bin %> <%= command.id %> fs_STATE_ID",
7979
- "<%= config.bin %> <%= command.id %> fs_STATE_ID --json"
9280
+ "<%= config.bin %> <%= command.id %> fs_STATE_ID --local"
7980
9281
  ],
7981
9282
  "flags": {
7982
9283
  "json": {
@@ -8018,22 +9319,27 @@
8018
9319
  "name": "toon",
8019
9320
  "allowNo": false,
8020
9321
  "type": "boolean"
9322
+ },
9323
+ "local": {
9324
+ "description": "Write .faces/state.local (yours, not shared) instead of .faces/state.",
9325
+ "name": "local",
9326
+ "allowNo": false,
9327
+ "type": "boolean"
8021
9328
  }
8022
9329
  },
8023
9330
  "hasDynamicHelp": false,
8024
9331
  "hiddenAliases": [],
8025
- "id": "state:items",
9332
+ "id": "state:use",
8026
9333
  "pluginAlias": "@faces-sh/cli",
8027
9334
  "pluginName": "@faces-sh/cli",
8028
9335
  "pluginType": "core",
8029
9336
  "strict": true,
8030
- "enableJsonFlag": true,
8031
9337
  "isESM": true,
8032
9338
  "relativePath": [
8033
9339
  "dist",
8034
9340
  "commands",
8035
9341
  "state",
8036
- "items.js"
9342
+ "use.js"
8037
9343
  ]
8038
9344
  },
8039
9345
  "style:delete": {
@@ -12159,5 +13465,5 @@
12159
13465
  ]
12160
13466
  }
12161
13467
  },
12162
- "version": "1.2.0"
13468
+ "version": "1.3.0"
12163
13469
  }