@arbidocs/cli 0.5.198 → 0.5.200
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 +29 -0
- package/dist/index.js +35 -26
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.5.200
|
|
4
|
+
|
|
5
|
+
[compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.5.199...HEAD)
|
|
6
|
+
|
|
7
|
+
### 🚀 Enhancements
|
|
8
|
+
|
|
9
|
+
- **workflows:** Timed authorization replaces keep access ([da34ddeec](https://github.com/arbicity/ARBI-frontend/commit/da34ddeec))
|
|
10
|
+
|
|
11
|
+
### 🏡 Chore
|
|
12
|
+
|
|
13
|
+
- Release v0.5.198 [skip ci] ([add404235](https://github.com/arbicity/ARBI-frontend/commit/add404235))
|
|
14
|
+
- Release v0.5.199 [skip ci] ([2dc9713d6](https://github.com/arbicity/ARBI-frontend/commit/2dc9713d6))
|
|
15
|
+
|
|
16
|
+
### ✅ Tests
|
|
17
|
+
|
|
18
|
+
- Fixtures for the regenerated schema (identity-verification flags, no keep access) ([d74ddd862](https://github.com/arbicity/ARBI-frontend/commit/d74ddd862))
|
|
19
|
+
|
|
20
|
+
### 🤖 CI
|
|
21
|
+
|
|
22
|
+
- The three ~5.8 GB browser jobs run on 8 GB runners (ci-vm-small), not 6 GB mid ([e4301db8b](https://github.com/arbicity/ARBI-frontend/commit/e4301db8b))
|
|
23
|
+
|
|
24
|
+
## v0.5.199
|
|
25
|
+
|
|
26
|
+
[compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.5.198...HEAD)
|
|
27
|
+
|
|
28
|
+
### 🚀 Enhancements
|
|
29
|
+
|
|
30
|
+
- **blocks:** Expandable steps and thinking in the workflow run thread ([#2639](https://github.com/arbicity/ARBI-frontend/pull/2639))
|
|
31
|
+
|
|
3
32
|
## v0.5.198
|
|
4
33
|
|
|
5
34
|
[compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.5.197...HEAD)
|
package/dist/index.js
CHANGED
|
@@ -3700,7 +3700,7 @@ function getLatestVersion(skipCache = false) {
|
|
|
3700
3700
|
}
|
|
3701
3701
|
}
|
|
3702
3702
|
function getCurrentVersion() {
|
|
3703
|
-
return "0.5.
|
|
3703
|
+
return "0.5.200";
|
|
3704
3704
|
}
|
|
3705
3705
|
function readChangelog(fromVersion, toVersion) {
|
|
3706
3706
|
try {
|
|
@@ -3753,17 +3753,17 @@ function showChangelog(fromVersion, toVersion) {
|
|
|
3753
3753
|
async function checkForUpdates(autoUpdate) {
|
|
3754
3754
|
try {
|
|
3755
3755
|
const latest = getLatestVersion();
|
|
3756
|
-
if (!latest || latest === "0.5.
|
|
3756
|
+
if (!latest || latest === "0.5.200") return;
|
|
3757
3757
|
if (autoUpdate) {
|
|
3758
3758
|
warn(`
|
|
3759
|
-
Your arbi version is out of date (${"0.5.
|
|
3759
|
+
Your arbi version is out of date (${"0.5.200"} \u2192 ${latest}). Updating...`);
|
|
3760
3760
|
child_process.execSync("npm install -g @arbidocs/cli@latest", { stdio: "inherit" });
|
|
3761
|
-
showChangelog("0.5.
|
|
3761
|
+
showChangelog("0.5.200", latest);
|
|
3762
3762
|
console.log(`Updated to ${latest}.`);
|
|
3763
3763
|
} else {
|
|
3764
3764
|
warn(
|
|
3765
3765
|
`
|
|
3766
|
-
Your arbi version is out of date (${"0.5.
|
|
3766
|
+
Your arbi version is out of date (${"0.5.200"} \u2192 ${latest}).
|
|
3767
3767
|
Run "arbi update" to upgrade, or "arbi update auto" to always stay up to date.`
|
|
3768
3768
|
);
|
|
3769
3769
|
}
|
|
@@ -3795,10 +3795,10 @@ function markNagShown(latest) {
|
|
|
3795
3795
|
function hintUpdateOnError() {
|
|
3796
3796
|
try {
|
|
3797
3797
|
const cached = readCache();
|
|
3798
|
-
if (!cached || cached.latest === "0.5.
|
|
3798
|
+
if (!cached || cached.latest === "0.5.200") return;
|
|
3799
3799
|
if (!shouldShowNag(cached.latest)) return;
|
|
3800
3800
|
warn(
|
|
3801
|
-
`Your arbi version is out of date (${"0.5.
|
|
3801
|
+
`Your arbi version is out of date (${"0.5.200"} \u2192 ${cached.latest}). Run "arbi update".`
|
|
3802
3802
|
);
|
|
3803
3803
|
markNagShown(cached.latest);
|
|
3804
3804
|
} catch {
|
|
@@ -10625,22 +10625,29 @@ function registerTaskCommand(program2) {
|
|
|
10625
10625
|
})()
|
|
10626
10626
|
);
|
|
10627
10627
|
}
|
|
10628
|
-
async function
|
|
10629
|
-
if (data.on_demand
|
|
10630
|
-
if (data.auth_mode !== "
|
|
10628
|
+
async function authorizeIfTimed(data) {
|
|
10629
|
+
if (data.on_demand) return;
|
|
10630
|
+
if (data.auth_mode !== "scheduled_grant") {
|
|
10631
10631
|
dim(
|
|
10632
|
-
"Each unattended run asks you for workspace access first. Use --auth-mode
|
|
10632
|
+
"Each unattended run asks you for workspace access first. Use --auth-mode scheduled_grant to authorize it for a fixed time."
|
|
10633
10633
|
);
|
|
10634
10634
|
return;
|
|
10635
10635
|
}
|
|
10636
|
+
if (!sdk.workflows.needsAuthorization(data)) {
|
|
10637
|
+
dim(`Authorized until ${data.access_expires_at}.`);
|
|
10638
|
+
return;
|
|
10639
|
+
}
|
|
10636
10640
|
const { arbi } = await resolveWorkspace(data.workspace_ext_id ?? void 0);
|
|
10637
|
-
const
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
(agentEmail) => sdk.workspaces.addWorkspaceUsers(arbi, [agentEmail], "collaborator")
|
|
10641
|
+
const authorized = await sdk.workflows.authorizeWorkflow(arbi, data.external_id);
|
|
10642
|
+
dim(
|
|
10643
|
+
`Authorized until ${authorized.access_expires_at}: unattended runs start on their own until then.`
|
|
10641
10644
|
);
|
|
10642
|
-
|
|
10643
|
-
|
|
10645
|
+
}
|
|
10646
|
+
function accessSeconds(days) {
|
|
10647
|
+
const n = Number(days);
|
|
10648
|
+
if (!Number.isInteger(n) || n < 1 || n > 90)
|
|
10649
|
+
throw new Error(`Invalid --access-days "${days}": a whole number of days from 1 to 90`);
|
|
10650
|
+
return n * 24 * 60 * 60;
|
|
10644
10651
|
}
|
|
10645
10652
|
function signalTrigger(name, eventKind, eventFilter) {
|
|
10646
10653
|
if (name === void 0) return void 0;
|
|
@@ -10683,8 +10690,11 @@ function registerWorkflowCommand(program2) {
|
|
|
10683
10690
|
"Trigger: when a step of another run raises this signal (event_kind=workflow_signal, filter {signal})"
|
|
10684
10691
|
).option("--after <con-id>", "Trigger: when this task (conversation) is done").option("--timezone <tz>", "IANA timezone for --rrule", "UTC").option("--action <type>", "Action: annotate_documents or email_documents").option("--documents <ids>", "Comma-separated document IDs").option("--labels <ids>", "Select documents matching these label IDs at execution time").option("--latest", "Select documents uploaded since the previous successful run").option("--tags <ids>", "Annotation field IDs for AI review").option("--overwrite", "Regenerate existing annotation answers").option(
|
|
10685
10692
|
"--auth-mode <mode>",
|
|
10686
|
-
"scheduled_require_auth or
|
|
10693
|
+
"scheduled_require_auth (ask each run) or scheduled_grant (authorized for --access-days)",
|
|
10687
10694
|
"scheduled_require_auth"
|
|
10695
|
+
).option(
|
|
10696
|
+
"--access-days <days>",
|
|
10697
|
+
"scheduled_grant: how long it is authorized for (1-90, default 30)"
|
|
10688
10698
|
).option("--event-filter <json>", "Notification attribute filters as a JSON object").option("--prompt <text>", "Instruction the agent runs").option("--skill <ref>", "Skill reference to run").option(
|
|
10689
10699
|
"--input <name=value>",
|
|
10690
10700
|
"The skill's inputs (repeatable), e.g. --input language=English --input layout=translation-only",
|
|
@@ -10709,14 +10719,13 @@ function registerWorkflowCommand(program2) {
|
|
|
10709
10719
|
on_demand: !opts.rrule && !opts.runAt && !opts.eventKind && !opts.after,
|
|
10710
10720
|
timezone: opts.timezone,
|
|
10711
10721
|
prompt: opts.prompt ?? "",
|
|
10712
|
-
// Unattended runs ask the owner for access each time unless the workflow is
|
|
10722
|
+
// Unattended runs ask the owner for access each time unless the workflow is authorized for a fixed time.
|
|
10713
10723
|
auth_mode: opts.authMode,
|
|
10724
|
+
...opts.accessDays ? { access_seconds: accessSeconds(opts.accessDays) } : {},
|
|
10714
10725
|
workspace_ext_id: opts.workspace ?? workspaceId
|
|
10715
10726
|
};
|
|
10716
|
-
if (!["scheduled_require_auth", "
|
|
10717
|
-
throw new Error(
|
|
10718
|
-
"Invalid --auth-mode: use scheduled_require_auth or scheduled_permanent"
|
|
10719
|
-
);
|
|
10727
|
+
if (!["scheduled_require_auth", "scheduled_grant"].includes(opts.authMode)) {
|
|
10728
|
+
throw new Error("Invalid --auth-mode: use scheduled_require_auth or scheduled_grant");
|
|
10720
10729
|
}
|
|
10721
10730
|
if (opts.action) {
|
|
10722
10731
|
if (!["annotate_documents", "email_documents"].includes(opts.action)) {
|
|
@@ -10753,7 +10762,7 @@ function registerWorkflowCommand(program2) {
|
|
|
10753
10762
|
if (opts.agent) body.agent_ext_id = opts.agent;
|
|
10754
10763
|
if (steps) body.plan = sdk.workflowSteps.stepsPlan(steps);
|
|
10755
10764
|
const data = await sdk.workflows.createWorkflow(arbi, body);
|
|
10756
|
-
await
|
|
10765
|
+
await authorizeIfTimed(data);
|
|
10757
10766
|
if (opts.json) {
|
|
10758
10767
|
printJson(data);
|
|
10759
10768
|
return;
|
|
@@ -10877,7 +10886,7 @@ function registerWorkflowCommand(program2) {
|
|
|
10877
10886
|
});
|
|
10878
10887
|
const { arbi } = await resolveAuth();
|
|
10879
10888
|
const data = await sdk.workflows.updateWorkflow(arbi, id, body);
|
|
10880
|
-
await
|
|
10889
|
+
await authorizeIfTimed(data);
|
|
10881
10890
|
if (opts.json) printJson(data);
|
|
10882
10891
|
else success(`Updated workflow ${ref(id)}${steps ? ` \u2014 ${steps.length} steps` : ""}`);
|
|
10883
10892
|
})()
|
|
@@ -12742,7 +12751,7 @@ console.info = (...args) => {
|
|
|
12742
12751
|
_origInfo(...args);
|
|
12743
12752
|
};
|
|
12744
12753
|
var program = new commander.Command();
|
|
12745
|
-
program.name("arbi").description("ARBI CLI \u2014 interact with ARBI from the terminal").version("0.5.
|
|
12754
|
+
program.name("arbi").description("ARBI CLI \u2014 interact with ARBI from the terminal").version("0.5.200").showHelpAfterError(true).showSuggestionAfterError(true);
|
|
12746
12755
|
registerConfigCommand(program);
|
|
12747
12756
|
registerLoginCommand(program);
|
|
12748
12757
|
registerRegisterCommand(program);
|