@arbidocs/cli 0.4.15 → 0.4.17
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 +125 -0
- package/dist/index.js +70 -113
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,130 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.4.17
|
|
4
|
+
|
|
5
|
+
[compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.4.16...HEAD)
|
|
6
|
+
|
|
7
|
+
### 🚀 Enhancements
|
|
8
|
+
|
|
9
|
+
- **tasks:** Work-list UI with review, threads and task triggers ([fcba03259](https://github.com/arbicity/ARBI-frontend/commit/fcba03259))
|
|
10
|
+
- **tasks:** Ask who does it first (me or an agent), one way to add a task ([8b17ab63d](https://github.com/arbicity/ARBI-frontend/commit/8b17ab63d))
|
|
11
|
+
- **sdk:** Post conversation comments, assistant mode and query mentions ([9463280da](https://github.com/arbicity/ARBI-frontend/commit/9463280da))
|
|
12
|
+
- **blocks:** Mention autocomplete, mention chips and assistant mode toggle ([d52c95785](https://github.com/arbicity/ARBI-frontend/commit/d52c95785))
|
|
13
|
+
- @mentions and threads in conversations ([f29aeaa52](https://github.com/arbicity/ARBI-frontend/commit/f29aeaa52))
|
|
14
|
+
- **tasks:** Task list with selection, sub-tasks and private tasks ([cc6418b14](https://github.com/arbicity/ARBI-frontend/commit/cc6418b14))
|
|
15
|
+
- **tasks:** A task dialog that reads like a task, with the Task Assistant as its own card ([86092442c](https://github.com/arbicity/ARBI-frontend/commit/86092442c))
|
|
16
|
+
- **tasks:** Compact task dialog built from pills; every task has an assistant ([31b0854f7](https://github.com/arbicity/ARBI-frontend/commit/31b0854f7))
|
|
17
|
+
- **tasks:** Ask someone else to approve a task that is ready for review ([c53945015](https://github.com/arbicity/ARBI-frontend/commit/c53945015))
|
|
18
|
+
- **tasks:** Show the task list as a table with assigned to, sign-off and due columns ([ed495b191](https://github.com/arbicity/ARBI-frontend/commit/ed495b191))
|
|
19
|
+
- **tasks:** Fit the table to the screen with flexing columns and compact review actions ([4bab98348](https://github.com/arbicity/ARBI-frontend/commit/4bab98348))
|
|
20
|
+
- **conversations:** Sharing belongs to the conversation, and the owner can unshare it ([303e0f4d6](https://github.com/arbicity/ARBI-frontend/commit/303e0f4d6))
|
|
21
|
+
- **sdk:** Conversations.update, createWork, run, review and workflows replace the task operations ([69aeb26ca](https://github.com/arbicity/ARBI-frontend/commit/69aeb26ca))
|
|
22
|
+
- **react:** Work and workflow hooks replace the task hooks ([3d1e0366a](https://github.com/arbicity/ARBI-frontend/commit/3d1e0366a))
|
|
23
|
+
- **blocks:** The task table works on conversations, and a workflows table joins it ([27b3d9ffc](https://github.com/arbicity/ARBI-frontend/commit/27b3d9ffc))
|
|
24
|
+
- Tasks and Workflows pages on the conversation work API, one PATCH for sharing and titles ([096921718](https://github.com/arbicity/ARBI-frontend/commit/096921718))
|
|
25
|
+
- **cli,tui:** Arbi workflow replaces arbi schedule; share, unshare and title use the one PATCH ([1b7f1f01b](https://github.com/arbicity/ARBI-frontend/commit/1b7f1f01b))
|
|
26
|
+
- **workflows:** The workflow dialog runs now by default, asks what, when and who, and keeps the rest under More options ([68be2358e](https://github.com/arbicity/ARBI-frontend/commit/68be2358e))
|
|
27
|
+
- Tasks and Workflows are the two entries; the chats list is the tasks table, and templates live under Workflows ([f07dd40ae](https://github.com/arbicity/ARBI-frontend/commit/f07dd40ae))
|
|
28
|
+
- One Workflows list (skills and saved workflows), Active/Paused/On demand, and one permission rule for sharing and deleting ([de081e009](https://github.com/arbicity/ARBI-frontend/commit/de081e009))
|
|
29
|
+
- Threads with Threads and Tasks views, one Owner column, New thread; sharing is the creator's, rewording a fact the creator's or a workspace owner's ([1f8cbfc72](https://github.com/arbicity/ARBI-frontend/commit/1f8cbfc72))
|
|
30
|
+
- **work:** Inline artifact card survives reload; restore Outputs column in Tasks view ([cd0003a2b](https://github.com/arbicity/ARBI-frontend/commit/cd0003a2b))
|
|
31
|
+
- **work:** Task activity timeline, status tooltip, activity hook ([8773b971d](https://github.com/arbicity/ARBI-frontend/commit/8773b971d))
|
|
32
|
+
- **work:** Run now and New thread with task fields send an assistant query with task options ([ad2f2b7e2](https://github.com/arbicity/ARBI-frontend/commit/ad2f2b7e2))
|
|
33
|
+
- A task row has no Run now; a thread is continued by chatting in it ([53a539413](https://github.com/arbicity/ARBI-frontend/commit/53a539413))
|
|
34
|
+
- New thread asks for the prompt, and the title is made from it; sub-agent Open thread is a quiet icon ([f1b0995d8](https://github.com/arbicity/ARBI-frontend/commit/f1b0995d8))
|
|
35
|
+
- A task thread shows its status, owner, due date and Approve; tables fit the screen; the assistant gets the workspace files ([e2593bc81](https://github.com/arbicity/ARBI-frontend/commit/e2593bc81))
|
|
36
|
+
- Run now takes you to the thread it started instead of a toast ([2a0dd1660](https://github.com/arbicity/ARBI-frontend/commit/2a0dd1660))
|
|
37
|
+
- The actions column stays in view, and the lowest-value columns drop out as the grid narrows ([dd1b80f75](https://github.com/arbicity/ARBI-frontend/commit/dd1b80f75))
|
|
38
|
+
- On a phone the Tasks list is the title with its status beneath and a menu ([06cafe353](https://github.com/arbicity/ARBI-frontend/commit/06cafe353))
|
|
39
|
+
- The Run later dialog asks what and when; who runs it, access and naming sit in a folded Run options section ([fb22ad563](https://github.com/arbicity/ARBI-frontend/commit/fb22ad563))
|
|
40
|
+
- Due dates offer quick choices (today, tomorrow, next Monday, in a week) before the exact picker ([dfcd4bda1](https://github.com/arbicity/ARBI-frontend/commit/dfcd4bda1))
|
|
41
|
+
- New thread can just track a to-do: switch the assistant off and nothing is run ([5998f1e0c](https://github.com/arbicity/ARBI-frontend/commit/5998f1e0c))
|
|
42
|
+
- A task that needs you shows in the bell and opens its thread ([a64bb87f5](https://github.com/arbicity/ARBI-frontend/commit/a64bb87f5))
|
|
43
|
+
- One way to start a thread: the in-thread New thread button opens the same dialog as the list's ([bade355b5](https://github.com/arbicity/ARBI-frontend/commit/bade355b5))
|
|
44
|
+
- The dashboard's New thread opens the same dialog; e2e specs follow the Workflows / Threads UI (no Tasks page, /v1/tasks or Run now menu) ([30377f7d0](https://github.com/arbicity/ARBI-frontend/commit/30377f7d0))
|
|
45
|
+
- An edited workflow offers to show its stored plan ([b99b41695](https://github.com/arbicity/ARBI-frontend/commit/b99b41695))
|
|
46
|
+
- One Tasks list, and New starts a task by just typing ([b0ca314ef](https://github.com/arbicity/ARBI-frontend/commit/b0ca314ef))
|
|
47
|
+
- A Chat chip in the task list once there are plain chats ([766b5b63c](https://github.com/arbicity/ARBI-frontend/commit/766b5b63c))
|
|
48
|
+
|
|
49
|
+
### 🩹 Fixes
|
|
50
|
+
|
|
51
|
+
- **tasks:** Allow an agent's access from the task row and the request notification ([e626013cb](https://github.com/arbicity/ARBI-frontend/commit/e626013cb))
|
|
52
|
+
- **tasks:** Give the dialog's property pills a touch-sized hit area on phones ([310424761](https://github.com/arbicity/ARBI-frontend/commit/310424761))
|
|
53
|
+
- **tasks:** Describe the Tasks setting as a work list, not agent scheduling ([0962863f8](https://github.com/arbicity/ARBI-frontend/commit/0962863f8))
|
|
54
|
+
- **auth:** SSO first and last name come from one rule, so a surname is never counted twice ([1292edc7c](https://github.com/arbicity/ARBI-frontend/commit/1292edc7c))
|
|
55
|
+
- **tasks:** A past start time is refused in the form, and a failed create says why the server refused ([b527fc76c](https://github.com/arbicity/ARBI-frontend/commit/b527fc76c))
|
|
56
|
+
- The Tasks list says tasks, not chats, and the list sits directly under the page tabs ([adb60183f](https://github.com/arbicity/ARBI-frontend/commit/adb60183f))
|
|
57
|
+
- Collaborators can edit shared tasks and workflows; a new conversation opens as an empty thread ([8fe39fad1](https://github.com/arbicity/ARBI-frontend/commit/8fe39fad1))
|
|
58
|
+
- Skills work in the Run dialog; file fields render, scope picks resolve to document ids, and files can be added from the dialog ([263ba6e72](https://github.com/arbicity/ARBI-frontend/commit/263ba6e72))
|
|
59
|
+
- Tasks view column order, title priority, wording and an honest Updated column; Run dialog file list says All documents ([d2fb7f483](https://github.com/arbicity/ARBI-frontend/commit/d2fb7f483))
|
|
60
|
+
- **tasks:** A fresh grid per view, so the Tasks view keeps its own column order ([0ad0026c5](https://github.com/arbicity/ARBI-frontend/commit/0ad0026c5))
|
|
61
|
+
- A stale saved workspace no longer shows 'Unable to open link' after login ([0bc60ac34](https://github.com/arbicity/ARBI-frontend/commit/0bc60ac34))
|
|
62
|
+
- Run now returns at once via /v1/responses, finds its thread with a short retry, and the task list is polled by one shared timer ([a554cce0f](https://github.com/arbicity/ARBI-frontend/commit/a554cce0f))
|
|
63
|
+
- Tasks list header says Task; dates and owners fit; Approve is an outline button in the list; a failed run says Failed ([b2cd58d64](https://github.com/arbicity/ARBI-frontend/commit/b2cd58d64))
|
|
64
|
+
- Opening a thread by its link shows the thread, not the thread list ([228b7ba6a](https://github.com/arbicity/ARBI-frontend/commit/228b7ba6a))
|
|
65
|
+
- The task bar is pinned with the thread's tabs, not scrolled away ([060e41d49](https://github.com/arbicity/ARBI-frontend/commit/060e41d49))
|
|
66
|
+
- Approve is offered only to the sign-off person, failures say why; tests for the thread task bar ([d660e09a1](https://github.com/arbicity/ARBI-frontend/commit/d660e09a1))
|
|
67
|
+
- Workflows columns fit and read clearly; the run dialog is named for what it runs ([cbd3de7db](https://github.com/arbicity/ARBI-frontend/commit/cbd3de7db))
|
|
68
|
+
- The run dialog is named for the skill picked, not for the free-form entries ([ab1538b3f](https://github.com/arbicity/ARBI-frontend/commit/ab1538b3f))
|
|
69
|
+
- The thread's task bar settles when the run ends ([2745b6030](https://github.com/arbicity/ARBI-frontend/commit/2745b6030))
|
|
70
|
+
- Dollar amounts in an answer stay text; only real math is typeset ([8d5b4849d](https://github.com/arbicity/ARBI-frontend/commit/8d5b4849d))
|
|
71
|
+
- The phone-width actions column is sized in its definition ([9655bb2dd](https://github.com/arbicity/ARBI-frontend/commit/9655bb2dd))
|
|
72
|
+
- Restore the Tasks grid's sort, row animation and dimmed context rows ([638f15457](https://github.com/arbicity/ARBI-frontend/commit/638f15457))
|
|
73
|
+
- The custom-schedule control no longer says RRULE ([8e8a9f479](https://github.com/arbicity/ARBI-frontend/commit/8e8a9f479))
|
|
74
|
+
- A workflow's menu no longer repeats the Run button ([3e2f641ec](https://github.com/arbicity/ARBI-frontend/commit/3e2f641ec))
|
|
75
|
+
- Editing a plain to-do no longer shows a Task Assistant 'on standby' block ([acb2ff76f](https://github.com/arbicity/ARBI-frontend/commit/acb2ff76f))
|
|
76
|
+
- On a phone the Workflows header keeps its title; its two buttons are icons ([89c518d73](https://github.com/arbicity/ARBI-frontend/commit/89c518d73))
|
|
77
|
+
- One New thread button on the thread list ([ddd2e2f61](https://github.com/arbicity/ARBI-frontend/commit/ddd2e2f61))
|
|
78
|
+
- Conversations are Threads everywhere (entity names, workspace card, members table); package tests match the schema ([a3d666bc1](https://github.com/arbicity/ARBI-frontend/commit/a3d666bc1))
|
|
79
|
+
- The activity log says 'Asked for changes' for a follow-up, not 'Sent back' ([a514ffb41](https://github.com/arbicity/ARBI-frontend/commit/a514ffb41))
|
|
80
|
+
- A saved workflow can carry a plan: the dialog keeps Add a plan after Run later ([6706a201c](https://github.com/arbicity/ARBI-frontend/commit/6706a201c))
|
|
81
|
+
- A saved workflow's plan is sent with it ([8c1e7f968](https://github.com/arbicity/ARBI-frontend/commit/8c1e7f968))
|
|
82
|
+
- Never request the workspaces of an empty agent id ([0e0b99cbc](https://github.com/arbicity/ARBI-frontend/commit/0e0b99cbc))
|
|
83
|
+
- Saving waits while a plan is being drafted ([0ddf7ae42](https://github.com/arbicity/ARBI-frontend/commit/0ddf7ae42))
|
|
84
|
+
- The Threads entry opens the thread list, not a blank chat ([e99622b60](https://github.com/arbicity/ARBI-frontend/commit/e99622b60))
|
|
85
|
+
- The blank chat tab is Ask ARBI, and workspace-list tips stay out of a workspace ([5367060eb](https://github.com/arbicity/ARBI-frontend/commit/5367060eb))
|
|
86
|
+
- Workflows stays behind the experimental switch ([e33a0b050](https://github.com/arbicity/ARBI-frontend/commit/e33a0b050))
|
|
87
|
+
- A skill named like its slug reads as a title ([9852f7ec0](https://github.com/arbicity/ARBI-frontend/commit/9852f7ec0))
|
|
88
|
+
- The Assistant fills in when it arrives after Run later was picked ([6d46715c9](https://github.com/arbicity/ARBI-frontend/commit/6d46715c9))
|
|
89
|
+
|
|
90
|
+
### 💅 Refactors
|
|
91
|
+
|
|
92
|
+
- **tasks:** Build the task list on the standard grid, user pill and visibility toggle ([5b4453e63](https://github.com/arbicity/ARBI-frontend/commit/5b4453e63))
|
|
93
|
+
- **tasks:** Every task belongs to its workspace, and hosts use the shared request mapping ([d9d4e484c](https://github.com/arbicity/ARBI-frontend/commit/d9d4e484c))
|
|
94
|
+
|
|
95
|
+
### 🏡 Chore
|
|
96
|
+
|
|
97
|
+
- Update OpenAPI schema for conversation mentions ([abe586bbb](https://github.com/arbicity/ARBI-frontend/commit/abe586bbb))
|
|
98
|
+
- Update OpenAPI schema with conversation assistant mode on threads ([89e33e5c1](https://github.com/arbicity/ARBI-frontend/commit/89e33e5c1))
|
|
99
|
+
- Regenerate the API schema for the merged tasks, mentions and shared-only backend ([12b462d09](https://github.com/arbicity/ARBI-frontend/commit/12b462d09))
|
|
100
|
+
- Regenerate the API schema with npm run schema against the merged backend ([a4bcff080](https://github.com/arbicity/ARBI-frontend/commit/a4bcff080))
|
|
101
|
+
- Regenerate the API schema for the work-model backend and drop the temporary interfaces ([9a92cfaf1](https://github.com/arbicity/ARBI-frontend/commit/9a92cfaf1))
|
|
102
|
+
- **dev:** VITE_DEV_PROXY_TARGET points the dev proxy at another backend ([e465981dd](https://github.com/arbicity/ARBI-frontend/commit/e465981dd))
|
|
103
|
+
- **dev:** Proxy /dev-backend to VITE_DEV_PROXY_TARGET so a dev host can try another backend ([47cad94d2](https://github.com/arbicity/ARBI-frontend/commit/47cad94d2))
|
|
104
|
+
- **dev:** VITE_DEV_API_PREFIX lets the dev client reach another backend through the Vite proxy ([666c53d8d](https://github.com/arbicity/ARBI-frontend/commit/666c53d8d))
|
|
105
|
+
- **dev:** Every dev-time API base honors VITE_DEV_API_PREFIX ([b09b5ac5f](https://github.com/arbicity/ARBI-frontend/commit/b09b5ac5f))
|
|
106
|
+
- **dev:** The /dev-backend proxy tells nginx not to buffer, so streamed answers reach the browser live ([202555faa](https://github.com/arbicity/ARBI-frontend/commit/202555faa))
|
|
107
|
+
- Keep the currency helper private ([dd3ccc320](https://github.com/arbicity/ARBI-frontend/commit/dd3ccc320))
|
|
108
|
+
|
|
109
|
+
### ✅ Tests
|
|
110
|
+
|
|
111
|
+
- The dialog-title test uses a named skill ([04c85ad01](https://github.com/arbicity/ARBI-frontend/commit/04c85ad01))
|
|
112
|
+
- Give the lazily-loaded math bundle room on a busy machine ([4af427861](https://github.com/arbicity/ARBI-frontend/commit/4af427861))
|
|
113
|
+
- E2e helpers step into the New thread tab after opening Threads ([3fd5a275f](https://github.com/arbicity/ARBI-frontend/commit/3fd5a275f))
|
|
114
|
+
- **e2e:** The conversation specs follow the single Tasks list (New dialog, row test ids, share switch) ([9cd53a491](https://github.com/arbicity/ARBI-frontend/commit/9cd53a491))
|
|
115
|
+
|
|
116
|
+
## v0.4.16
|
|
117
|
+
|
|
118
|
+
[compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.4.15...HEAD)
|
|
119
|
+
|
|
120
|
+
### 🩹 Fixes
|
|
121
|
+
|
|
122
|
+
- **react:** Normalise citation links with bracketed text and bold closers inside a link ([#1354](https://github.com/arbicity/ARBI-frontend/pull/1354))
|
|
123
|
+
|
|
124
|
+
### ✅ Tests
|
|
125
|
+
|
|
126
|
+
- Skip developer-gated integration tests for non-developer accounts ([2c7104592](https://github.com/arbicity/ARBI-frontend/commit/2c7104592))
|
|
127
|
+
|
|
3
128
|
## v0.4.15
|
|
4
129
|
|
|
5
130
|
[compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.4.13...v0.4.15)
|
package/dist/index.js
CHANGED
|
@@ -3694,7 +3694,7 @@ function getLatestVersion(skipCache = false) {
|
|
|
3694
3694
|
}
|
|
3695
3695
|
}
|
|
3696
3696
|
function getCurrentVersion() {
|
|
3697
|
-
return "0.4.
|
|
3697
|
+
return "0.4.17";
|
|
3698
3698
|
}
|
|
3699
3699
|
function readChangelog(fromVersion, toVersion) {
|
|
3700
3700
|
try {
|
|
@@ -3747,17 +3747,17 @@ function showChangelog(fromVersion, toVersion) {
|
|
|
3747
3747
|
async function checkForUpdates(autoUpdate) {
|
|
3748
3748
|
try {
|
|
3749
3749
|
const latest = getLatestVersion();
|
|
3750
|
-
if (!latest || latest === "0.4.
|
|
3750
|
+
if (!latest || latest === "0.4.17") return;
|
|
3751
3751
|
if (autoUpdate) {
|
|
3752
3752
|
warn(`
|
|
3753
|
-
Your arbi version is out of date (${"0.4.
|
|
3753
|
+
Your arbi version is out of date (${"0.4.17"} \u2192 ${latest}). Updating...`);
|
|
3754
3754
|
child_process.execSync("npm install -g @arbidocs/cli@latest", { stdio: "inherit" });
|
|
3755
|
-
showChangelog("0.4.
|
|
3755
|
+
showChangelog("0.4.17", latest);
|
|
3756
3756
|
console.log(`Updated to ${latest}.`);
|
|
3757
3757
|
} else {
|
|
3758
3758
|
warn(
|
|
3759
3759
|
`
|
|
3760
|
-
Your arbi version is out of date (${"0.4.
|
|
3760
|
+
Your arbi version is out of date (${"0.4.17"} \u2192 ${latest}).
|
|
3761
3761
|
Run "arbi update" to upgrade, or "arbi update auto" to always stay up to date.`
|
|
3762
3762
|
);
|
|
3763
3763
|
}
|
|
@@ -3789,10 +3789,10 @@ function markNagShown(latest) {
|
|
|
3789
3789
|
function hintUpdateOnError() {
|
|
3790
3790
|
try {
|
|
3791
3791
|
const cached = readCache();
|
|
3792
|
-
if (!cached || cached.latest === "0.4.
|
|
3792
|
+
if (!cached || cached.latest === "0.4.17") return;
|
|
3793
3793
|
if (!shouldShowNag(cached.latest)) return;
|
|
3794
3794
|
warn(
|
|
3795
|
-
`Your arbi version is out of date (${"0.4.
|
|
3795
|
+
`Your arbi version is out of date (${"0.4.17"} \u2192 ${cached.latest}). Run "arbi update".`
|
|
3796
3796
|
);
|
|
3797
3797
|
markNagShown(cached.latest);
|
|
3798
3798
|
} catch {
|
|
@@ -8639,7 +8639,9 @@ function registerConversationsCommand(program2) {
|
|
|
8639
8639
|
{ header: "ID", width: 24, value: (r) => r.external_id },
|
|
8640
8640
|
{ header: "TITLE", width: 36, value: (r) => r.title ?? "Untitled" },
|
|
8641
8641
|
{ header: "MSGS", width: 6, value: (r) => String(r.message_count) },
|
|
8642
|
-
{ header: "SHARED", width: 8, value: (r) => r.is_shared ? "yes" : "no" }
|
|
8642
|
+
{ header: "SHARED", width: 8, value: (r) => r.is_shared ? "yes" : "no" },
|
|
8643
|
+
// A conversation with a status is a task; a plain chat has none.
|
|
8644
|
+
{ header: "STATUS", width: 18, value: (r) => r.status ?? "" }
|
|
8643
8645
|
],
|
|
8644
8646
|
data
|
|
8645
8647
|
);
|
|
@@ -8742,8 +8744,21 @@ function registerConversationsCommand(program2) {
|
|
|
8742
8744
|
const { arbi, workspaceId } = await resolveWorkspace();
|
|
8743
8745
|
if (!conversationId)
|
|
8744
8746
|
conversationId = await pickConversation(arbi, workspaceId, "Select conversation to share");
|
|
8745
|
-
|
|
8746
|
-
success(
|
|
8747
|
+
await sdk.work.updateConversation(arbi, conversationId, { shared: true });
|
|
8748
|
+
success(`Shared conversation ${conversationId}`);
|
|
8749
|
+
})()
|
|
8750
|
+
);
|
|
8751
|
+
conv.command("unshare [conversation-id]").description("Make a shared conversation private again (interactive picker if no ID given)").action(
|
|
8752
|
+
(conversationId) => runAction(async () => {
|
|
8753
|
+
const { arbi, workspaceId } = await resolveWorkspace();
|
|
8754
|
+
if (!conversationId)
|
|
8755
|
+
conversationId = await pickConversation(
|
|
8756
|
+
arbi,
|
|
8757
|
+
workspaceId,
|
|
8758
|
+
"Select conversation to unshare"
|
|
8759
|
+
);
|
|
8760
|
+
await sdk.work.updateConversation(arbi, conversationId, { shared: false });
|
|
8761
|
+
success(`Made conversation ${conversationId} private`);
|
|
8747
8762
|
})()
|
|
8748
8763
|
);
|
|
8749
8764
|
conv.command("title [conversation-id] [title]").description("Update conversation title (interactive if no args)").action(
|
|
@@ -8751,8 +8766,8 @@ function registerConversationsCommand(program2) {
|
|
|
8751
8766
|
const { arbi, workspaceId } = await resolveWorkspace();
|
|
8752
8767
|
if (!conversationId) conversationId = await pickConversation(arbi, workspaceId);
|
|
8753
8768
|
if (!title) title = await promptInput("New title");
|
|
8754
|
-
|
|
8755
|
-
success(
|
|
8769
|
+
await sdk.work.updateConversation(arbi, conversationId, { title });
|
|
8770
|
+
success(`Updated title to: ${title}`);
|
|
8756
8771
|
})()
|
|
8757
8772
|
);
|
|
8758
8773
|
conv.command("message <message-id>").description("Get message details (full decrypted JSON, useful for debugging)").action(
|
|
@@ -9659,143 +9674,85 @@ function registerTaskCommand(program2) {
|
|
|
9659
9674
|
})()
|
|
9660
9675
|
);
|
|
9661
9676
|
}
|
|
9662
|
-
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
function oneOf(value, allowed, flag) {
|
|
9666
|
-
if (allowed.includes(value)) return value;
|
|
9667
|
-
error(`${flag} must be one of: ${allowed.join(", ")} (got: ${value})`);
|
|
9668
|
-
process.exit(1);
|
|
9669
|
-
}
|
|
9670
|
-
function printTask(t) {
|
|
9671
|
-
label("ID:", ref(t.external_id));
|
|
9672
|
-
label("Name:", t.name);
|
|
9673
|
-
label("Trigger:", t.trigger_type);
|
|
9674
|
-
if (t.rrule) label("RRule:", t.rrule);
|
|
9675
|
-
if (t.run_at) label("Run at:", t.run_at);
|
|
9676
|
-
if (t.event_kind) label("Event:", t.event_kind);
|
|
9677
|
-
label("Timezone:", t.timezone);
|
|
9678
|
-
label("Action:", t.action_type);
|
|
9679
|
-
if (t.prompt) label("Prompt:", t.prompt);
|
|
9680
|
-
if (t.skill_ref) label("Skill:", t.skill_ref);
|
|
9681
|
-
if (t.agent_ext_id) label("Agent:", t.agent_ext_id);
|
|
9682
|
-
if (t.workspace_ext_id) label("Workspace:", t.workspace_ext_id);
|
|
9683
|
-
label("Status:", status(t.status));
|
|
9684
|
-
label("Notify on complete:", String(t.notify_on_complete));
|
|
9685
|
-
if (t.next_run_at) label("Next run:", t.next_run_at);
|
|
9686
|
-
if (t.last_run_at) label("Last run:", t.last_run_at);
|
|
9687
|
-
if (t.last_error) label("Last error:", t.last_error);
|
|
9688
|
-
}
|
|
9689
|
-
function registerScheduleCommand(program2) {
|
|
9690
|
-
const schedule = program2.command("schedule").description("Scheduled tasks (/v1/tasks): create, list, get, update, run, delete");
|
|
9691
|
-
schedule.command("create").description("Create a scheduled task").requiredOption("--name <name>", "Task name (required)").option("--trigger <one_time|recurring|event>", "Trigger type", "one_time").option("--rrule <RRULE>", "RFC-5545 recurrence rule (for --trigger recurring)").option("--run-at <ISO>", "When to run once (ISO-8601, for --trigger one_time)").option("--timezone <tz>", "IANA timezone", "UTC").option("--event-kind <kind>", "Event name to react to (for --trigger event)").option("--action <notify|agent_prompt|run_skill>", "What the task does", "notify").option("--prompt <text>", "Prompt/message for notify or agent_prompt actions").option("--skill <ref>", "Skill reference (for --action run_skill)").option("--agent <agt-id>", "Agent to run the prompt as (external id)").option("--workspace <wrk-id>", "Workspace to scope the task to (external id)").option("--notify-on-complete", "Send a notification when the task completes").option("--json", "Output as JSON").action(
|
|
9677
|
+
function registerWorkflowCommand(program2) {
|
|
9678
|
+
const workflow = program2.command("workflow").description("Workflows (/v1/workflow): create, list, resume, pause, run, delete");
|
|
9679
|
+
workflow.command("create").description("Create a workflow with exactly one trigger").requiredOption("--name <name>", "Workflow name (required)").option("--rrule <RRULE>", "Trigger: RFC-5545 recurrence rule").option("--run-at <ISO>", "Trigger: run once at this time (ISO-8601)").option("--event-kind <kind>", "Trigger: a notification type to react to").option("--after <con-id>", "Trigger: when this task (conversation) is done").option("--timezone <tz>", "IANA timezone for --rrule", "UTC").option("--prompt <text>", "Instruction the agent runs").option("--skill <ref>", "Skill reference to run").option("--agent <agt-id>", "Agent to run it as (external id)").option("--workspace <wrk-id>", "Workspace to scope the workflow to (default: the current one)").option("--shared", "Share it with the workspace").option("--json", "Output as JSON").action(
|
|
9692
9680
|
(opts) => runAction(async () => {
|
|
9693
|
-
const { arbi } = await
|
|
9681
|
+
const { arbi, workspaceId } = await resolveWorkspace();
|
|
9694
9682
|
const body = {
|
|
9695
9683
|
name: opts.name,
|
|
9696
|
-
|
|
9684
|
+
description: "",
|
|
9685
|
+
active: true,
|
|
9686
|
+
shared: Boolean(opts.shared),
|
|
9687
|
+
on_demand: !opts.rrule && !opts.runAt && !opts.eventKind && !opts.after,
|
|
9697
9688
|
timezone: opts.timezone,
|
|
9698
|
-
action_type: oneOf(opts.action, ACTIONS, "--action"),
|
|
9699
9689
|
prompt: opts.prompt ?? "",
|
|
9700
|
-
|
|
9690
|
+
// Unattended runs ask the owner for access each time unless the workflow is made permanent.
|
|
9691
|
+
auth_mode: "scheduled_require_auth",
|
|
9692
|
+
workspace_ext_id: opts.workspace ?? workspaceId
|
|
9701
9693
|
};
|
|
9702
9694
|
if (opts.rrule) body.rrule = opts.rrule;
|
|
9703
9695
|
if (opts.runAt) body.run_at = opts.runAt;
|
|
9704
9696
|
if (opts.eventKind) body.event_kind = opts.eventKind;
|
|
9697
|
+
if (opts.after) body.after_conversation_ext_id = opts.after;
|
|
9705
9698
|
if (opts.skill) body.skill_ref = opts.skill;
|
|
9706
9699
|
if (opts.agent) body.agent_ext_id = opts.agent;
|
|
9707
|
-
|
|
9708
|
-
if (opts.notifyOnComplete) body.notify_on_complete = true;
|
|
9709
|
-
const data = await sdk.tasks.createTask(arbi, body);
|
|
9700
|
+
const data = await sdk.workflows.createWorkflow(arbi, body);
|
|
9710
9701
|
if (opts.json) {
|
|
9711
9702
|
printJson(data);
|
|
9712
9703
|
return;
|
|
9713
9704
|
}
|
|
9714
|
-
success(`Created
|
|
9705
|
+
success(`Created workflow: ${data.name} (${ref(data.external_id)})`);
|
|
9715
9706
|
})()
|
|
9716
9707
|
);
|
|
9717
|
-
|
|
9708
|
+
workflow.command("list").description("List your workflows").option("--json", "Output as JSON").action(
|
|
9718
9709
|
(opts) => runAction(async () => {
|
|
9719
9710
|
const { arbi } = await resolveAuth();
|
|
9720
|
-
const data = await sdk.
|
|
9721
|
-
if (!emitListOrTable(data, opts, "No
|
|
9711
|
+
const data = await sdk.workflows.listWorkflows(arbi);
|
|
9712
|
+
if (!emitListOrTable(data, opts, "No workflows found.")) return;
|
|
9722
9713
|
printTable(
|
|
9723
9714
|
[
|
|
9724
9715
|
{ header: "ID", width: 22, value: (r) => r.external_id },
|
|
9725
|
-
{ header: "NAME", width:
|
|
9726
|
-
{ header: "
|
|
9727
|
-
{ header: "
|
|
9728
|
-
{ header: "
|
|
9729
|
-
{ header: "
|
|
9716
|
+
{ header: "NAME", width: 28, value: (r) => r.name ?? "" },
|
|
9717
|
+
{ header: "ACTIVE", width: 7, value: (r) => r.active ? "yes" : "no" },
|
|
9718
|
+
{ header: "SHARED", width: 8, value: (r) => r.shared ? "yes" : "no" },
|
|
9719
|
+
{ header: "NEXT RUN", width: 26, value: (r) => r.next_fire_at ?? "" },
|
|
9720
|
+
{ header: "LAST RUN", width: 26, value: (r) => r.last_fired_at ?? "" }
|
|
9730
9721
|
],
|
|
9731
9722
|
data
|
|
9732
9723
|
);
|
|
9733
9724
|
})()
|
|
9734
9725
|
);
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9740
|
-
|
|
9741
|
-
|
|
9742
|
-
|
|
9743
|
-
|
|
9744
|
-
|
|
9745
|
-
|
|
9746
|
-
|
|
9747
|
-
|
|
9748
|
-
const { arbi } = await resolveAuth();
|
|
9749
|
-
const body = {};
|
|
9750
|
-
if (opts.name !== void 0) body.name = opts.name;
|
|
9751
|
-
if (opts.rrule !== void 0) body.rrule = opts.rrule;
|
|
9752
|
-
if (opts.runAt !== void 0) body.run_at = opts.runAt;
|
|
9753
|
-
if (opts.timezone !== void 0) body.timezone = opts.timezone;
|
|
9754
|
-
if (opts.prompt !== void 0) body.prompt = opts.prompt;
|
|
9755
|
-
if (opts.skill !== void 0) body.skill_ref = opts.skill;
|
|
9756
|
-
if (opts.status !== void 0) body.status = oneOf(opts.status, STATUSES, "--status");
|
|
9757
|
-
if (opts.notifyOnComplete !== void 0) {
|
|
9758
|
-
body.notify_on_complete = /^(1|true|yes)$/i.test(opts.notifyOnComplete);
|
|
9759
|
-
}
|
|
9760
|
-
if (Object.keys(body).length === 0) {
|
|
9761
|
-
error("Nothing to update. Pass at least one field (e.g. --name, --status).");
|
|
9762
|
-
process.exit(1);
|
|
9763
|
-
}
|
|
9764
|
-
const data = await sdk.tasks.updateTask(arbi, id, body);
|
|
9765
|
-
if (opts.json) {
|
|
9766
|
-
printJson(data);
|
|
9767
|
-
return;
|
|
9768
|
-
}
|
|
9769
|
-
success(`Updated scheduled task: ${ref(id)}`);
|
|
9770
|
-
})()
|
|
9771
|
-
);
|
|
9772
|
-
schedule.command("run <id>").description("Fire a scheduled task now (does not advance its schedule)").option("--json", "Output as JSON").action(
|
|
9726
|
+
for (const [name, active] of [
|
|
9727
|
+
["resume", true],
|
|
9728
|
+
["pause", false]
|
|
9729
|
+
]) {
|
|
9730
|
+
workflow.command(`${name} <id>`).description(active ? "Make a workflow active again" : "Pause a workflow").action(
|
|
9731
|
+
(id) => runAction(async () => {
|
|
9732
|
+
const { arbi } = await resolveAuth();
|
|
9733
|
+
const data = await sdk.workflows.updateWorkflow(arbi, id, { active });
|
|
9734
|
+
success(`${active ? "Resumed" : "Paused"} workflow: ${data.name} (${ref(id)})`);
|
|
9735
|
+
})()
|
|
9736
|
+
);
|
|
9737
|
+
}
|
|
9738
|
+
workflow.command("run <id>").description("Run a workflow now (creates a task like its trigger would)").option("--json", "Output as JSON").action(
|
|
9773
9739
|
(id, opts) => runAction(async () => {
|
|
9774
9740
|
const { arbi } = await resolveAuth();
|
|
9775
|
-
const data = await sdk.
|
|
9741
|
+
const data = await sdk.workflows.runWorkflow(arbi, id);
|
|
9776
9742
|
if (opts.json) {
|
|
9777
9743
|
printJson(data);
|
|
9778
9744
|
return;
|
|
9779
9745
|
}
|
|
9780
|
-
success(`
|
|
9746
|
+
success(`Started workflow ${ref(id)}`);
|
|
9781
9747
|
})()
|
|
9782
9748
|
);
|
|
9783
|
-
|
|
9749
|
+
workflow.command("delete <id>").description("Delete a workflow (tasks it already created stay)").action(
|
|
9784
9750
|
(id) => runAction(async () => {
|
|
9785
9751
|
const { arbi } = await resolveAuth();
|
|
9786
|
-
await sdk.
|
|
9787
|
-
success(`Deleted
|
|
9752
|
+
await sdk.workflows.deleteWorkflow(arbi, id);
|
|
9753
|
+
success(`Deleted workflow ${ref(id)}`);
|
|
9788
9754
|
})()
|
|
9789
9755
|
);
|
|
9790
|
-
schedule.allowUnknownOption(true).allowExcessArguments(true).action(async () => {
|
|
9791
|
-
const tail = schedule.args ?? [];
|
|
9792
|
-
const subcommands = schedule.commands.map((c) => c.name());
|
|
9793
|
-
const firstNonFlag = tail.find((a) => !a.startsWith("-"));
|
|
9794
|
-
if (firstNonFlag && !subcommands.includes(firstNonFlag)) {
|
|
9795
|
-
suggestSubcommandAndExit("schedule", firstNonFlag, subcommands);
|
|
9796
|
-
}
|
|
9797
|
-
await schedule.commands.find((c) => c.name() === "list").parseAsync(tail, { from: "user" });
|
|
9798
|
-
});
|
|
9799
9756
|
}
|
|
9800
9757
|
var MARKER_START = "# arbi-cli completion start";
|
|
9801
9758
|
var MARKER_END = "# arbi-cli completion end";
|
|
@@ -10653,7 +10610,7 @@ console.info = (...args) => {
|
|
|
10653
10610
|
_origInfo(...args);
|
|
10654
10611
|
};
|
|
10655
10612
|
var program = new commander.Command();
|
|
10656
|
-
program.name("arbi").description("ARBI CLI \u2014 interact with ARBI from the terminal").version("0.4.
|
|
10613
|
+
program.name("arbi").description("ARBI CLI \u2014 interact with ARBI from the terminal").version("0.4.17").showHelpAfterError(true).showSuggestionAfterError(true);
|
|
10657
10614
|
registerConfigCommand(program);
|
|
10658
10615
|
registerLoginCommand(program);
|
|
10659
10616
|
registerRegisterCommand(program);
|
|
@@ -10682,7 +10639,7 @@ registerQuickstartCommand(program);
|
|
|
10682
10639
|
registerAgentCreateCommand(program);
|
|
10683
10640
|
registerAgentCommand(program);
|
|
10684
10641
|
registerTaskCommand(program);
|
|
10685
|
-
|
|
10642
|
+
registerWorkflowCommand(program);
|
|
10686
10643
|
registerCompletionCommand(program);
|
|
10687
10644
|
registerListenCommand(program);
|
|
10688
10645
|
registerSessionCommand(program);
|
|
@@ -10708,7 +10665,7 @@ applyHelpGroups(program, {
|
|
|
10708
10665
|
"Search & ask:": ["ask", "find", "cite", "watch"],
|
|
10709
10666
|
"Tagging:": ["tags", "doctags"],
|
|
10710
10667
|
"Conversations & messaging:": ["convo", "dm", "listen", "notifications", "contacts"],
|
|
10711
|
-
"Agents & tasks:": ["agent", "agent-create", "task", "
|
|
10668
|
+
"Agents & tasks:": ["agent", "agent-create", "task", "workflow", "agentconfig", "session"],
|
|
10712
10669
|
"Account:": ["auth", "usage", "files"],
|
|
10713
10670
|
"System:": ["health", "models", "settings", "tui", "local", "update"]
|
|
10714
10671
|
});
|