@rfany/rf 0.20.0 → 0.20.2
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/package.json +1 -1
- package/rf.mjs +11 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rfany/rf",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.2",
|
|
4
4
|
"description": "rollforward's command line for people: what its page does, from a shell or a desktop agent, as you",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": { "type": "git", "url": "git+https://github.com/spoj/rollforward.git", "directory": "cli" },
|
package/rf.mjs
CHANGED
|
@@ -128,7 +128,7 @@ rf indexes [--json] each index of a source you index, all for admi
|
|
|
128
128
|
rf runs [PATH] [--since DATE] [--failed] [--running] [--long MIN] [-d SECONDS] [--json]
|
|
129
129
|
a table, a row per run: start, path, run, outcome, time, cost, what started it, and any error;
|
|
130
130
|
the outcome is done, interrupted by a person, cut, by a restart or a change that broke its
|
|
131
|
-
lease, running, or failed, for credits, policy, time limit or other
|
|
131
|
+
lease, running, or failed, for credits, policy, time limit, memory or other
|
|
132
132
|
rf costs [PATH] [--since DATE] [--by workspace|series|person|day|outcome] [--daily] [--json] totals, runs and cost per run,
|
|
133
133
|
plus server calls and OpenRouter key usage for admins; --daily lists each day by workspace,
|
|
134
134
|
person, run and server; runs leave out those that were cut, as the next run carries each on
|
|
@@ -160,7 +160,7 @@ rf internal [remove HOST] [--json] the hosts at internal addresses admins let
|
|
|
160
160
|
which everyone's websites at it wait for an admin again
|
|
161
161
|
rf connection set NAME TYPE an outside system runs reach as their series owner, by a login each person makes: graph,
|
|
162
162
|
Microsoft 365, or databricks, Azure Databricks, as each person adds what their login
|
|
163
|
-
offers; service --url http://HOST:PORT --paths 'AP/,GL/2026/' [--key KEY]
|
|
163
|
+
offers; service --url http://HOST:PORT --paths 'AP/,GL/2026/' [--key KEY] delegates paths
|
|
164
164
|
through a deployment's service at https://NAME.rf.internal/; websites are rf site's
|
|
165
165
|
rf connection remove NAME
|
|
166
166
|
rf brand [--text TEXT] [--logo FILE] [--clear] the deployment's text and logo, a .png, .jpg, .gif, .webp or .svg, which top
|
|
@@ -662,7 +662,13 @@ else if (cmd === 'comment' && args.length < 2) {
|
|
|
662
662
|
// The run that saw the comment, and what it said from then on: a run ending as it came may not have.
|
|
663
663
|
await new Promise(r => setTimeout(r, 5000));
|
|
664
664
|
const { doc, log } = await get(at);
|
|
665
|
-
const done = log.find(e =>
|
|
665
|
+
const done = log.find(e => {
|
|
666
|
+
if (e.op !== 'done') return false;
|
|
667
|
+
if (e.seen >= seq) return true;
|
|
668
|
+
if (!(e.seq > seq && (e.error || e.aborted))) return false;
|
|
669
|
+
const cut = log.find(x => x.seq > e.seq && (x.op === 'interrupt' || x.op === 'authority'))?.seq ?? Infinity;
|
|
670
|
+
return !log.some(w => w.seq > e.seq && ((w.op === 'wake' && w.cause === e.seq && cut === Infinity) || (w.op === 'run' && w.seq < cut)));
|
|
671
|
+
});
|
|
666
672
|
if (done) {
|
|
667
673
|
const from = Math.max(seq, log.find(e => e.op === 'run' && e.run === done.run)?.seq ?? 0);
|
|
668
674
|
for (const e of log.filter(e => e.seq > from && e.seq < done.seq && e.op === 'comment' && e.by === 'agent' && !e.see)) console.log(`${e.ask === 'proposal' ? 'Proposes' : e.ask ? 'Asks' : 'Says'} in ${e.thread}:\n${e.text}\n`);
|
|
@@ -914,6 +920,7 @@ else if (cmd === 'comment' && args.length < 2) {
|
|
|
914
920
|
const asks = s.asks.filter(a => !a.legacyNotice);
|
|
915
921
|
if (flags.json) return JSON.stringify({ ...s, asks, indexes: ix }, null, 1);
|
|
916
922
|
else {
|
|
923
|
+
const creditErrLine = s.credit_error ? `OpenRouter credits exhausted (402): ${s.credit_error.message}` : '';
|
|
917
924
|
const lowLine = s.low_credit ? `Low OpenRouter credit: ${usd(s.low_credit.remaining)} remaining${s.low_credit.limit !== null ? ` of ${usd(s.low_credit.limit)} limit` : ''}${s.low_credit.reset ? ` (resets ${s.low_credit.reset})` : ''}${s.low_credit.key === 'fallback' ? ', on the fallback key, the first being low too' : ''}` : '';
|
|
918
925
|
// What waits, by whom it waits on, oldest first, at most WAITING each unless --all.
|
|
919
926
|
const waiting = [
|
|
@@ -943,7 +950,7 @@ else if (cmd === 'comment' && args.length < 2) {
|
|
|
943
950
|
['Indexes crawling or failing', failing.length, table(['INDEX', 'PERSON', 'STATE', 'ERROR'], failing)],
|
|
944
951
|
].filter(([, n]) => n) ;
|
|
945
952
|
const body = sections.map(([title, n, rows]) => `${title} (${n})\n${rows}`).join('\n\n');
|
|
946
|
-
return [lowLine, body].filter(Boolean).join('\n\n') || 'Nothing is running, queued, waiting or failed.';
|
|
953
|
+
return [creditErrLine, lowLine, body].filter(Boolean).join('\n\n') || 'Nothing is running, queued, waiting or failed.';
|
|
947
954
|
}
|
|
948
955
|
});
|
|
949
956
|
else if (cmd === 'indexes' && !args.length) {
|