@arbidocs/cli 0.4.104 → 0.4.105
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/CHANGELOG.md +8 -0
- package/SKILL.md +2 -2
- package/dist/index.js +19 -17
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.4.105
|
|
4
|
+
|
|
5
|
+
[compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.4.104...HEAD)
|
|
6
|
+
|
|
7
|
+
### 🚀 Enhancements
|
|
8
|
+
|
|
9
|
+
- Show AI as £ of AI usage instead of credits ([#1608](https://github.com/arbicity/ARBI-frontend/pull/1608))
|
|
10
|
+
|
|
3
11
|
## v0.4.104
|
|
4
12
|
|
|
5
13
|
[compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.4.103...HEAD)
|
package/SKILL.md
CHANGED
|
@@ -122,8 +122,8 @@ All list commands that summarize people or state support `--json`:
|
|
|
122
122
|
- **Projects**: `arbi project list` (and `create`, `refresh`) — projects are the tenancy unit above workspaces. Until this command existed the only way to discover a `projectExtId` was inside `arbi register`, blocking multi-project bootstrap from a fresh agent install.
|
|
123
123
|
- **Project details**: `arbi project set <prj> --budget 6000GBP --client 'Acme Ltd' --client-ref crm-1042 --stage Discovery --lead <usr-id|email> --field matter_type=dispute` (owner only; `none` clears a detail, `--field key=` removes a field; the budget is stored in minor units, so `6000GBP` is 600000 pence). The lead must be a member of one of the project's workspaces. `arbi project show <prj>` prints them; `arbi project events <prj> [--kind stage_changed|budget_changed] --json` lists stage and budget changes, newest first; `arbi project list --stage <label> --lead <usr-id|email>` filters. Projects are taken by id or unique name.
|
|
124
124
|
- **Files (Responses API attachments)**: `arbi files list/upload/get/delete/content` — ephemeral files for the OpenAI-compatible Responses path. Independent of the workspace document index; meant for short-lived attachments to single `arbi ask -b` requests.
|
|
125
|
-
- **Usage probe**: `arbi usage today --json` is the cheapest pre-flight check before launching a long batch. Returns whatever quota the project surfaces
|
|
126
|
-
- **Spend**: `arbi usage conversation <con-id>` shows what a thread's AI work cost this billing period by step, run (a send-back runs a step again), model and agent (`--json` adds `by_feature`); `arbi usage project <prj> --by-conversation [--months-back N]` shows a project's spend per conversation plus what no conversation accounts for. Spend is in
|
|
125
|
+
- **Usage probe**: `arbi usage today --json` is the cheapest pre-flight check before launching a long batch. Returns today's AI usage in £ (`used_gbp`) and whatever other quota the project surfaces so agents can budget.
|
|
126
|
+
- **Spend**: `arbi usage conversation <con-id>` shows what a thread's AI work cost this billing period by step, run (a send-back runs a step again), model and agent (`--json` adds `by_feature`); `arbi usage project <prj> --by-conversation [--months-back N]` shows a project's spend per conversation plus what no conversation accounts for. Spend is in £ (ex VAT).
|
|
127
127
|
- **Execution trace**: `arbi convo trace <message-id>` (alias of `arbi convo message`) returns the full decrypted reasoning + tool-call trail for one agent response. Post-mortem primitive for debugging failed steps.
|
|
128
128
|
- **Switch conversations**: `arbi convo switch <conv-id>` points the chat session at a different conversation so the next `arbi ask` resumes there. CLI equivalent of clicking a conversation in the web UI sidebar.
|
|
129
129
|
|
package/dist/index.js
CHANGED
|
@@ -3695,7 +3695,7 @@ function getLatestVersion(skipCache = false) {
|
|
|
3695
3695
|
}
|
|
3696
3696
|
}
|
|
3697
3697
|
function getCurrentVersion() {
|
|
3698
|
-
return "0.4.
|
|
3698
|
+
return "0.4.105";
|
|
3699
3699
|
}
|
|
3700
3700
|
function readChangelog(fromVersion, toVersion) {
|
|
3701
3701
|
try {
|
|
@@ -3748,17 +3748,17 @@ function showChangelog(fromVersion, toVersion) {
|
|
|
3748
3748
|
async function checkForUpdates(autoUpdate) {
|
|
3749
3749
|
try {
|
|
3750
3750
|
const latest = getLatestVersion();
|
|
3751
|
-
if (!latest || latest === "0.4.
|
|
3751
|
+
if (!latest || latest === "0.4.105") return;
|
|
3752
3752
|
if (autoUpdate) {
|
|
3753
3753
|
warn(`
|
|
3754
|
-
Your arbi version is out of date (${"0.4.
|
|
3754
|
+
Your arbi version is out of date (${"0.4.105"} \u2192 ${latest}). Updating...`);
|
|
3755
3755
|
child_process.execSync("npm install -g @arbidocs/cli@latest", { stdio: "inherit" });
|
|
3756
|
-
showChangelog("0.4.
|
|
3756
|
+
showChangelog("0.4.105", latest);
|
|
3757
3757
|
console.log(`Updated to ${latest}.`);
|
|
3758
3758
|
} else {
|
|
3759
3759
|
warn(
|
|
3760
3760
|
`
|
|
3761
|
-
Your arbi version is out of date (${"0.4.
|
|
3761
|
+
Your arbi version is out of date (${"0.4.105"} \u2192 ${latest}).
|
|
3762
3762
|
Run "arbi update" to upgrade, or "arbi update auto" to always stay up to date.`
|
|
3763
3763
|
);
|
|
3764
3764
|
}
|
|
@@ -3790,10 +3790,10 @@ function markNagShown(latest) {
|
|
|
3790
3790
|
function hintUpdateOnError() {
|
|
3791
3791
|
try {
|
|
3792
3792
|
const cached = readCache();
|
|
3793
|
-
if (!cached || cached.latest === "0.4.
|
|
3793
|
+
if (!cached || cached.latest === "0.4.105") return;
|
|
3794
3794
|
if (!shouldShowNag(cached.latest)) return;
|
|
3795
3795
|
warn(
|
|
3796
|
-
`Your arbi version is out of date (${"0.4.
|
|
3796
|
+
`Your arbi version is out of date (${"0.4.105"} \u2192 ${cached.latest}). Run "arbi update".`
|
|
3797
3797
|
);
|
|
3798
3798
|
markNagShown(cached.latest);
|
|
3799
3799
|
} catch {
|
|
@@ -11567,7 +11567,7 @@ function registerProjectCommand(program2) {
|
|
|
11567
11567
|
success(`Renamed project ${ref(id)} \u2192 ${data.name}`);
|
|
11568
11568
|
})()
|
|
11569
11569
|
);
|
|
11570
|
-
project.command("update").description("Update a project\u2019s name and/or per-user daily
|
|
11570
|
+
project.command("update").description("Update a project\u2019s name and/or per-user daily AI usage cap (\xA3)").option("-p, --project <id>", "Project id to update (default: your first project)").option("--name <name>", "New project name").option("--daily-cap <gbp>", "Per-user daily AI usage cap in \xA3 (a number, e.g. 2.5)").action(
|
|
11571
11571
|
(opts) => runAction(async () => {
|
|
11572
11572
|
const { arbi } = await resolveAuth();
|
|
11573
11573
|
const body = {};
|
|
@@ -11783,11 +11783,10 @@ function registerFilesCommand(program2) {
|
|
|
11783
11783
|
await files.commands.find((c) => c.name() === "list").parseAsync(tail, { from: "user" });
|
|
11784
11784
|
});
|
|
11785
11785
|
}
|
|
11786
|
-
var credits = (n) => `${n.toLocaleString("en", { maximumFractionDigits: 2 })} credits`;
|
|
11787
11786
|
function breakdownRows(breakdown, name = (k) => k) {
|
|
11788
11787
|
return Object.entries(breakdown).sort(([, a], [, b]) => b.spend - a.spend).map(([key, b]) => [
|
|
11789
11788
|
name(key),
|
|
11790
|
-
|
|
11789
|
+
sdk.formatGbp(b.spend),
|
|
11791
11790
|
b.total_tokens.toLocaleString("en"),
|
|
11792
11791
|
String(b.requests)
|
|
11793
11792
|
]);
|
|
@@ -11819,7 +11818,7 @@ function registerUsageCommand(program2) {
|
|
|
11819
11818
|
}
|
|
11820
11819
|
bold(`Conversation ${data.conversation_ext_id} (project ${data.project_ext_id})`);
|
|
11821
11820
|
label("Period:", `${data.period_start} \u2192 ${data.period_end}`);
|
|
11822
|
-
label("Spend:",
|
|
11821
|
+
label("Spend:", sdk.formatGbp(data.total_spend));
|
|
11823
11822
|
label("Tokens:", data.total_tokens.toLocaleString("en"));
|
|
11824
11823
|
label("Requests:", String(data.total_requests));
|
|
11825
11824
|
printBreakdown("By step", data.by_step);
|
|
@@ -11850,7 +11849,7 @@ function registerUsageCommand(program2) {
|
|
|
11850
11849
|
}
|
|
11851
11850
|
bold(`Project ${res.item.name} (${projectId})`);
|
|
11852
11851
|
label("Period:", `${data2.period_start} \u2192 ${data2.period_end}`);
|
|
11853
|
-
label("Spend:",
|
|
11852
|
+
label("Spend:", sdk.formatGbp(data2.total_spend));
|
|
11854
11853
|
label("Tokens:", data2.total_tokens.toLocaleString("en"));
|
|
11855
11854
|
dim(`By conversation: arbi usage project ${projectId} --by-conversation`);
|
|
11856
11855
|
return;
|
|
@@ -11870,7 +11869,7 @@ function registerUsageCommand(program2) {
|
|
|
11870
11869
|
}
|
|
11871
11870
|
bold(`Project ${res.item.name} (${projectId})`);
|
|
11872
11871
|
label("Period:", `${data.period_start} \u2192 ${data.period_end}`);
|
|
11873
|
-
label("Spend:",
|
|
11872
|
+
label("Spend:", sdk.formatGbp(data.total_spend));
|
|
11874
11873
|
printBreakdown(
|
|
11875
11874
|
"By conversation",
|
|
11876
11875
|
data.by_conversation,
|
|
@@ -11878,10 +11877,10 @@ function registerUsageCommand(program2) {
|
|
|
11878
11877
|
);
|
|
11879
11878
|
const u = data.unattributed;
|
|
11880
11879
|
if (u.spend || u.requests)
|
|
11881
|
-
dim(`Not in any conversation: ${
|
|
11880
|
+
dim(`Not in any conversation: ${sdk.formatGbp(u.spend)}, ${u.requests} requests`);
|
|
11882
11881
|
})()
|
|
11883
11882
|
);
|
|
11884
|
-
usage.command("today").description("Today's
|
|
11883
|
+
usage.command("today").description("Today's AI usage (\xA3) against the daily cap (for the current user)").option("--json", "Output as JSON").action(
|
|
11885
11884
|
(opts) => runAction(async () => {
|
|
11886
11885
|
const { arbi } = await resolveAuth();
|
|
11887
11886
|
const res = await arbi.fetch.GET("/v1/user/me/usage/today");
|
|
@@ -11894,7 +11893,10 @@ function registerUsageCommand(program2) {
|
|
|
11894
11893
|
return;
|
|
11895
11894
|
}
|
|
11896
11895
|
for (const [k, v] of Object.entries(data)) {
|
|
11897
|
-
label(
|
|
11896
|
+
label(
|
|
11897
|
+
`${k}:`,
|
|
11898
|
+
typeof v === "number" && k.endsWith("_gbp") ? sdk.formatGbp(v) : typeof v === "object" ? JSON.stringify(v) : String(v)
|
|
11899
|
+
);
|
|
11898
11900
|
}
|
|
11899
11901
|
dim("\nPass --json for machine-readable output.");
|
|
11900
11902
|
})()
|
|
@@ -12270,7 +12272,7 @@ console.info = (...args) => {
|
|
|
12270
12272
|
_origInfo(...args);
|
|
12271
12273
|
};
|
|
12272
12274
|
var program = new commander.Command();
|
|
12273
|
-
program.name("arbi").description("ARBI CLI \u2014 interact with ARBI from the terminal").version("0.4.
|
|
12275
|
+
program.name("arbi").description("ARBI CLI \u2014 interact with ARBI from the terminal").version("0.4.105").showHelpAfterError(true).showSuggestionAfterError(true);
|
|
12274
12276
|
registerConfigCommand(program);
|
|
12275
12277
|
registerLoginCommand(program);
|
|
12276
12278
|
registerRegisterCommand(program);
|