@arbidocs/cli 0.5.165 → 0.5.166

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 CHANGED
@@ -1,5 +1,58 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.5.166
4
+
5
+ [compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.5.165...HEAD)
6
+
7
+ ### 🚀 Enhancements
8
+
9
+ - **chat:** Render full-width DMs with quiet content links ([65f415249](https://github.com/arbicity/ARBI-frontend/commit/65f415249))
10
+ - **support:** Record short videos and give persona fixers focused issue clips ([46b9a56fe](https://github.com/arbicity/ARBI-frontend/commit/46b9a56fe))
11
+ - **support:** Record short videos and give persona fixers focused issue clips ([d0cb861a8](https://github.com/arbicity/ARBI-frontend/commit/d0cb861a8))
12
+ - **media:** Synchronize imported video with a linked transcript ([d6b394666](https://github.com/arbicity/ARBI-frontend/commit/d6b394666))
13
+ - **media:** Synchronize imported video with a linked transcript ([50dc7bb57](https://github.com/arbicity/ARBI-frontend/commit/50dc7bb57))
14
+ - **ui:** Show saved sandbox outputs and PDF versions in threads ([dcdea8d7a](https://github.com/arbicity/ARBI-frontend/commit/dcdea8d7a))
15
+ - **chat:** Add minimal floating conversations and efficient outline dragging ([799a9920d](https://github.com/arbicity/ARBI-frontend/commit/799a9920d))
16
+
17
+ ### 🩹 Fixes
18
+
19
+ - **chat:** Preserve document link previews (persona dm-links-smoke I02) ([79e9fa764](https://github.com/arbicity/ARBI-frontend/commit/79e9fa764))
20
+ - **entities:** Expose shared menus and align reference styling checks ([7bd75f96f](https://github.com/arbicity/ARBI-frontend/commit/7bd75f96f))
21
+ - **entities:** Expose shared menus and align reference styling checks ([d3e795090](https://github.com/arbicity/ARBI-frontend/commit/d3e795090))
22
+ - **chat:** Resolve appointment addresses as in-platform content links ([08a8a0e72](https://github.com/arbicity/ARBI-frontend/commit/08a8a0e72))
23
+ - **links:** Recognize workspace-qualified appointment references ([becfc93aa](https://github.com/arbicity/ARBI-frontend/commit/becfc93aa))
24
+ - **entities:** Expose shared menus and align reference styling checks ([87ea65e9e](https://github.com/arbicity/ARBI-frontend/commit/87ea65e9e))
25
+ - **chat:** Resolve appointment addresses as in-platform content links ([636123276](https://github.com/arbicity/ARBI-frontend/commit/636123276))
26
+ - **links:** Recognize workspace-qualified appointment references ([0d8bd13cb](https://github.com/arbicity/ARBI-frontend/commit/0d8bd13cb))
27
+ - **support:** Retain playable preview URLs across dialog remounts ([557b6c3cb](https://github.com/arbicity/ARBI-frontend/commit/557b6c3cb))
28
+ - **support:** Retain playable preview URLs across dialog remounts ([1c4e997f3](https://github.com/arbicity/ARBI-frontend/commit/1c4e997f3))
29
+ - **ci:** Align content-reference tests with current types and link styling ([43f35d744](https://github.com/arbicity/ARBI-frontend/commit/43f35d744))
30
+ - **chat:** Preserve floating agent conversations across temporary panels ([805766db7](https://github.com/arbicity/ARBI-frontend/commit/805766db7))
31
+ - **personas:** Wait for browser readiness and preserve literal captions ([#2526](https://github.com/arbicity/ARBI-frontend/pull/2526))
32
+
33
+ ### 💅 Refactors
34
+
35
+ - **agents:** Share CLI capability execution and unify persona support intake ([9d2a795cf](https://github.com/arbicity/ARBI-frontend/commit/9d2a795cf))
36
+ - **agents:** Share CLI capability execution and unify persona support intake ([51c76701b](https://github.com/arbicity/ARBI-frontend/commit/51c76701b))
37
+
38
+ ### 🏡 Chore
39
+
40
+ - **examples:** Align human review with the current SDK version ([2c0e446eb](https://github.com/arbicity/ARBI-frontend/commit/2c0e446eb))
41
+
42
+ ### ✅ Tests
43
+
44
+ - **speech:** Keep composer transcription in plain-text mode ([77c15c12a](https://github.com/arbicity/ARBI-frontend/commit/77c15c12a))
45
+ - **support:** Verify recorded video playback before submission ([3fb203f08](https://github.com/arbicity/ARBI-frontend/commit/3fb203f08))
46
+ - **speech:** Keep composer transcription in plain-text mode ([f2b605b4e](https://github.com/arbicity/ARBI-frontend/commit/f2b605b4e))
47
+ - **support:** Verify recorded video playback before submission ([be6f41ee1](https://github.com/arbicity/ARBI-frontend/commit/be6f41ee1))
48
+ - **annotations:** Serve the harness pages built, not through the dev server ([#2525](https://github.com/arbicity/ARBI-frontend/pull/2525))
49
+ - **chat:** Assert floating agent navigation and retained overlays ([164f44f82](https://github.com/arbicity/ARBI-frontend/commit/164f44f82))
50
+ - Dock assistant before inspecting calendar events ([564ab4fdf](https://github.com/arbicity/ARBI-frontend/commit/564ab4fdf))
51
+
52
+ ### 🤖 CI
53
+
54
+ - Open an auto-merge Clarum bump PR for each @arbidocs publish ([#2519](https://github.com/arbicity/ARBI-frontend/pull/2519))
55
+
3
56
  ## v0.5.165
4
57
 
5
58
  [compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.5.164...HEAD)
package/SKILL.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ARBI is an enterprise document intelligence platform with E2E encrypted communication. Use the `arbi` CLI to query documents, manage workspaces, and communicate securely on behalf of your user.
4
4
 
5
+ ## Discover capabilities
6
+
7
+ Use `arbi capabilities list` for the deployment's current commands, skills and platform domains. Use `arbi capabilities show <domain> [action]` for live operation names and input schemas; do not assume a copied list is current.
8
+
9
+ Run `arbi skills run <slug> [input...]` to invoke a discovered skill in the current workspace thread, or `arbi capabilities run <command> [input...]` for a command. Both use the normal assistant turn and support `--workspace`, `--continue`, `--new` and `--background`. Normal queries still use `arbi ask`. Workflow operations manage saved workflows and their schedule/event hooks through the existing workflow system.
10
+
5
11
  ## Getting Started
6
12
 
7
13
  1. Install: `npm install -g @arbidocs/cli`
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.165";
3703
+ return "0.5.166";
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.165") return;
3756
+ if (!latest || latest === "0.5.166") return;
3757
3757
  if (autoUpdate) {
3758
3758
  warn(`
3759
- Your arbi version is out of date (${"0.5.165"} \u2192 ${latest}). Updating...`);
3759
+ Your arbi version is out of date (${"0.5.166"} \u2192 ${latest}). Updating...`);
3760
3760
  child_process.execSync("npm install -g @arbidocs/cli@latest", { stdio: "inherit" });
3761
- showChangelog("0.5.165", latest);
3761
+ showChangelog("0.5.166", 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.165"} \u2192 ${latest}).
3766
+ Your arbi version is out of date (${"0.5.166"} \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.165") return;
3798
+ if (!cached || cached.latest === "0.5.166") return;
3799
3799
  if (!shouldShowNag(cached.latest)) return;
3800
3800
  warn(
3801
- `Your arbi version is out of date (${"0.5.165"} \u2192 ${cached.latest}). Run "arbi update".`
3801
+ `Your arbi version is out of date (${"0.5.166"} \u2192 ${cached.latest}). Run "arbi update".`
3802
3802
  );
3803
3803
  markNagShown(cached.latest);
3804
3804
  } catch {
@@ -7776,179 +7776,180 @@ function registerSignaturesCommand(program2) {
7776
7776
  );
7777
7777
  }
7778
7778
  }
7779
- function registerAskCommand(program2) {
7780
- program2.command("ask <question...>").description("Ask the RAG assistant a question (no quotes needed)").option("-w, --workspace <id>", "Workspace ID (defaults to selected workspace)").option("-c, --continue <msg-id>", "Continue from a specific message ID").option("--config <id>", "Config ext_id to use (e.g. cfg-xxx)").option("-n, --new", "Start a new conversation (ignore previous context)").option("-b, --background", "Submit as background task \u2014 fetch result with `arbi task result`").option("-q, --quiet", "Suppress agent steps and tool calls").option("--json", "Output in JSON format (background mode only)").option(
7779
+ function addAskOptions(command) {
7780
+ return command.option("-w, --workspace <id>", "Workspace ID (defaults to selected workspace)").option("-c, --continue <msg-id>", "Continue from a specific message ID").option("--config <id>", "Config ext_id to use (e.g. cfg-xxx)").option("-n, --new", "Start a new conversation (ignore previous context)").option("-b, --background", "Submit as background task \u2014 fetch result with `arbi task result`").option("-q, --quiet", "Suppress agent steps and tool calls").option("--json", "Output in JSON format (background mode only)").option(
7781
7781
  "--raw-citations",
7782
7782
  "Keep raw `[text](#cite-N)` markdown links instead of the cleaner `text[N]` form"
7783
- ).action(
7784
- (words, opts) => runAction(async () => {
7785
- if (opts.json && !opts.background) {
7786
- console.error(
7787
- "Error: --json only works with -b/--background. Streaming mode emits prose, not JSON.\nRun: arbi ask -b --json <question> (then `arbi task result`)"
7788
- );
7789
- process.exit(1);
7790
- }
7791
- const question = words.join(" ");
7792
- const { arbi, accessToken, workspaceId, config } = await resolveWorkspace(opts.workspace);
7793
- let previousResponseId = null;
7794
- if (opts.continue) {
7795
- previousResponseId = opts.continue;
7796
- } else if (opts.new) {
7783
+ );
7784
+ }
7785
+ function registerAskCommand(program2) {
7786
+ addAskOptions(
7787
+ program2.command("ask <question...>").description("Ask the RAG assistant a question (no quotes needed)")
7788
+ ).action((words, opts) => runAsk(words.join(" "), opts));
7789
+ }
7790
+ function runAsk(question, opts) {
7791
+ return runAction(async () => {
7792
+ if (opts.json && !opts.background) {
7793
+ console.error(
7794
+ "Error: --json only works with -b/--background. Streaming mode emits prose, not JSON.\nRun: arbi ask -b --json <question> (then `arbi task result`)"
7795
+ );
7796
+ process.exit(1);
7797
+ }
7798
+ const { arbi, accessToken, workspaceId, config } = await resolveWorkspace(opts.workspace);
7799
+ let previousResponseId = null;
7800
+ if (opts.continue) {
7801
+ previousResponseId = opts.continue;
7802
+ } else if (opts.new) {
7803
+ clearChatSession();
7804
+ } else {
7805
+ const session = getChatSession();
7806
+ const workspaceChanged = session.lastMessageExtId && session.workspaceId && session.workspaceId !== workspaceId;
7807
+ if (workspaceChanged) {
7797
7808
  clearChatSession();
7798
- } else {
7799
- const session = getChatSession();
7800
- const workspaceChanged = session.lastMessageExtId && session.workspaceId && session.workspaceId !== workspaceId;
7801
- if (workspaceChanged) {
7802
- clearChatSession();
7803
- } else if (session.lastMessageExtId) {
7804
- previousResponseId = session.lastMessageExtId;
7805
- }
7806
- }
7807
- const docs = await sdk.documents.listDocuments(arbi);
7808
- const docIds = docs.map((d) => d.external_id);
7809
- const docNames = sdk.buildDocNameMap(docs);
7810
- if (opts.background) {
7811
- const result2 = await sdk.responses.submitBackgroundQuery({
7812
- baseUrl: config.baseUrl,
7813
- accessToken,
7814
- workspaceId,
7815
- question,
7816
- docIds,
7817
- previousResponseId: null,
7818
- model: opts.config
7819
- });
7820
- addTask({
7821
- id: result2.id,
7822
- question: question.slice(0, 200),
7823
- workspaceId,
7824
- submittedAt: (/* @__PURE__ */ new Date()).toISOString(),
7825
- status: "queued",
7826
- model: result2.model
7827
- });
7828
- if (opts.json) {
7829
- console.log(JSON.stringify({ id: result2.id, status: result2.status }));
7830
- } else {
7831
- console.log(`Task queued: ${chalk2__default.default.cyan(result2.id)}`);
7832
- console.log(
7833
- chalk2__default.default.dim("Use `arbi task status` or `arbi task result` to check progress.")
7834
- );
7835
- }
7836
- return;
7809
+ } else if (session.lastMessageExtId) {
7810
+ previousResponseId = session.lastMessageExtId;
7837
7811
  }
7838
- let res;
7839
- try {
7840
- res = await sdk.assistant.queryAssistant({
7841
- baseUrl: config.baseUrl,
7842
- accessToken,
7843
- workspaceId,
7844
- question,
7845
- docIds,
7846
- previousResponseId,
7847
- model: opts.config
7848
- });
7849
- } catch (err) {
7850
- const isStaleParent = previousResponseId && err instanceof Error && (err.message.includes("404") || err.message.includes("Parent message not found"));
7851
- if (!isStaleParent) throw err;
7852
- clearChatSession();
7853
- res = await sdk.assistant.queryAssistant({
7854
- baseUrl: config.baseUrl,
7855
- accessToken,
7856
- workspaceId,
7857
- question,
7858
- docIds,
7859
- previousResponseId: null,
7860
- model: opts.config
7861
- });
7812
+ }
7813
+ const docs = await sdk.documents.listDocuments(arbi);
7814
+ const docIds = docs.map((d) => d.external_id);
7815
+ const docNames = sdk.buildDocNameMap(docs);
7816
+ if (opts.background) {
7817
+ const result2 = await sdk.responses.submitBackgroundQuery({
7818
+ baseUrl: config.baseUrl,
7819
+ accessToken,
7820
+ workspaceId,
7821
+ question,
7822
+ docIds,
7823
+ previousResponseId: null,
7824
+ model: opts.config
7825
+ });
7826
+ addTask({
7827
+ id: result2.id,
7828
+ question: question.slice(0, 200),
7829
+ workspaceId,
7830
+ submittedAt: (/* @__PURE__ */ new Date()).toISOString(),
7831
+ status: "queued",
7832
+ model: result2.model
7833
+ });
7834
+ if (opts.json) {
7835
+ console.log(JSON.stringify({ id: result2.id, status: result2.status }));
7836
+ } else {
7837
+ console.log(`Task queued: ${chalk2__default.default.cyan(result2.id)}`);
7838
+ console.log(chalk2__default.default.dim("Use `arbi task status` or `arbi task result` to check progress."));
7862
7839
  }
7863
- const verbose = opts.quiet === true ? false : getConfig()?.verbose !== false;
7864
- let elapsedTime = null;
7865
- let firstToken = true;
7866
- let lastItemId = null;
7867
- let lastStepLabel = "";
7868
- let buf = "";
7869
- const transform = opts.rawCitations ? (s) => s : sdk.stripCitationMarkdown;
7870
- const flush = (final) => {
7871
- const cut = final ? buf.length : Math.max(0, buf.length - 32);
7872
- if (cut === 0) return;
7873
- const out = transform(buf.slice(0, cut));
7874
- buf = buf.slice(cut);
7875
- if (out) process.stdout.write(out);
7876
- };
7877
- const result = await sdk.streamSSE(res, {
7878
- onToken: (content) => {
7879
- if (firstToken) {
7880
- process.stderr.write(chalk2__default.default.dim("[ARBI] "));
7881
- firstToken = false;
7882
- }
7883
- buf += content;
7884
- flush(false);
7885
- },
7886
- onOutputItemDone: (ev) => {
7887
- if (verbose) {
7888
- const item = ev.item;
7889
- if (item.type !== "function_call" && item.type !== "reasoning") return;
7890
- const label2 = sdk.formatItemLabel(item, docNames);
7891
- if (label2) {
7892
- const isDuplicate = item.id === lastItemId && label2 === lastStepLabel;
7893
- if (!isDuplicate) {
7894
- console.error(chalk2__default.default.dim(`
7840
+ return;
7841
+ }
7842
+ let res;
7843
+ try {
7844
+ res = await sdk.assistant.queryAssistant({
7845
+ baseUrl: config.baseUrl,
7846
+ accessToken,
7847
+ workspaceId,
7848
+ question,
7849
+ docIds,
7850
+ previousResponseId,
7851
+ model: opts.config
7852
+ });
7853
+ } catch (err) {
7854
+ const isStaleParent = previousResponseId && err instanceof Error && (err.message.includes("404") || err.message.includes("Parent message not found"));
7855
+ if (!isStaleParent) throw err;
7856
+ clearChatSession();
7857
+ res = await sdk.assistant.queryAssistant({
7858
+ baseUrl: config.baseUrl,
7859
+ accessToken,
7860
+ workspaceId,
7861
+ question,
7862
+ docIds,
7863
+ previousResponseId: null,
7864
+ model: opts.config
7865
+ });
7866
+ }
7867
+ const verbose = opts.quiet === true ? false : getConfig()?.verbose !== false;
7868
+ let elapsedTime = null;
7869
+ let firstToken = true;
7870
+ let lastItemId = null;
7871
+ let lastStepLabel = "";
7872
+ let buf = "";
7873
+ const transform = opts.rawCitations ? (s) => s : sdk.stripCitationMarkdown;
7874
+ const flush = (final) => {
7875
+ const cut = final ? buf.length : Math.max(0, buf.length - 32);
7876
+ if (cut === 0) return;
7877
+ const out = transform(buf.slice(0, cut));
7878
+ buf = buf.slice(cut);
7879
+ if (out) process.stdout.write(out);
7880
+ };
7881
+ const result = await sdk.streamSSE(res, {
7882
+ onToken: (content) => {
7883
+ if (firstToken) {
7884
+ process.stderr.write(chalk2__default.default.dim("[ARBI] "));
7885
+ firstToken = false;
7886
+ }
7887
+ buf += content;
7888
+ flush(false);
7889
+ },
7890
+ onOutputItemDone: (ev) => {
7891
+ if (verbose) {
7892
+ const item = ev.item;
7893
+ if (item.type !== "function_call" && item.type !== "reasoning") return;
7894
+ const label2 = sdk.formatItemLabel(item, docNames);
7895
+ if (label2) {
7896
+ const isDuplicate = item.id === lastItemId && label2 === lastStepLabel;
7897
+ if (!isDuplicate) {
7898
+ console.error(chalk2__default.default.dim(`
7895
7899
  [ARBI] ${label2}`));
7896
- lastItemId = item.id ?? null;
7897
- lastStepLabel = label2;
7898
- }
7900
+ lastItemId = item.id ?? null;
7901
+ lastStepLabel = label2;
7899
7902
  }
7900
7903
  }
7901
- },
7902
- onElapsedTime: (t) => {
7903
- elapsedTime = t;
7904
- },
7905
- onError: (message) => console.error(chalk2__default.default.red(`
7906
- Error: ${message}`))
7907
- });
7908
- if (firstToken && result.text) {
7909
- process.stderr.write(chalk2__default.default.dim("[ARBI] "));
7910
- firstToken = false;
7911
- buf += result.text;
7912
- }
7913
- flush(true);
7914
- process.stdout.write("\n");
7915
- if (result.metadata) {
7916
- saveLastMetadata(result.metadata);
7917
- }
7918
- const refs = sdk.countCitations(result.metadata);
7919
- const summary2 = opts.quiet !== true ? sdk.formatStreamSummary(result, elapsedTime) : "";
7920
- if (summary2) {
7921
- const refSuffix = refs > 0 ? ` \xB7 ${refs} ref${refs === 1 ? "" : "s"}` : "";
7922
- const text = `[${summary2}${refSuffix}]`;
7923
- const cols = process.stderr.columns || 80;
7924
- const pad = Math.max(0, cols - text.length);
7925
- console.error(chalk2__default.default.dim(" ".repeat(pad) + text));
7926
- }
7927
- if (refs > 0 && opts.quiet !== true) {
7928
- console.error(
7929
- chalk2__default.default.dim(`[${refs} citation${refs === 1 ? "" : "s"} \u2014 arbi cite to browse]`)
7930
- );
7931
- }
7932
- const assistantId = result.assistantMessageExtId ?? result.metadata?.external_id;
7933
- if (assistantId) {
7934
- const updates = {
7935
- lastMessageExtId: assistantId,
7936
- workspaceId
7937
- };
7938
- const conversationExtId = result.userMessage?.conversation_ext_id ?? result.metadata?.conversation_ext_id;
7939
- if (conversationExtId) {
7940
- updates.conversationExtId = conversationExtId;
7941
7904
  }
7942
- updateChatSession(updates);
7943
- } else if (opts.quiet !== true) {
7944
- console.error(
7945
- chalk2__default.default.yellow(
7946
- "[warn] No assistant message ID received \u2014 session not saved. The next `arbi ask` will start a new conversation."
7947
- )
7948
- );
7949
- }
7950
- })()
7951
- );
7905
+ },
7906
+ onElapsedTime: (t) => {
7907
+ elapsedTime = t;
7908
+ },
7909
+ onError: (message) => console.error(chalk2__default.default.red(`
7910
+ Error: ${message}`))
7911
+ });
7912
+ if (firstToken && result.text) {
7913
+ process.stderr.write(chalk2__default.default.dim("[ARBI] "));
7914
+ firstToken = false;
7915
+ buf += result.text;
7916
+ }
7917
+ flush(true);
7918
+ process.stdout.write("\n");
7919
+ if (result.metadata) {
7920
+ saveLastMetadata(result.metadata);
7921
+ }
7922
+ const refs = sdk.countCitations(result.metadata);
7923
+ const summary2 = opts.quiet !== true ? sdk.formatStreamSummary(result, elapsedTime) : "";
7924
+ if (summary2) {
7925
+ const refSuffix = refs > 0 ? ` \xB7 ${refs} ref${refs === 1 ? "" : "s"}` : "";
7926
+ const text = `[${summary2}${refSuffix}]`;
7927
+ const cols = process.stderr.columns || 80;
7928
+ const pad = Math.max(0, cols - text.length);
7929
+ console.error(chalk2__default.default.dim(" ".repeat(pad) + text));
7930
+ }
7931
+ if (refs > 0 && opts.quiet !== true) {
7932
+ console.error(chalk2__default.default.dim(`[${refs} citation${refs === 1 ? "" : "s"} \u2014 arbi cite to browse]`));
7933
+ }
7934
+ const assistantId = result.assistantMessageExtId ?? result.metadata?.external_id;
7935
+ if (assistantId) {
7936
+ const updates = {
7937
+ lastMessageExtId: assistantId,
7938
+ workspaceId
7939
+ };
7940
+ const conversationExtId = result.userMessage?.conversation_ext_id ?? result.metadata?.conversation_ext_id;
7941
+ if (conversationExtId) {
7942
+ updates.conversationExtId = conversationExtId;
7943
+ }
7944
+ updateChatSession(updates);
7945
+ } else if (opts.quiet !== true) {
7946
+ console.error(
7947
+ chalk2__default.default.yellow(
7948
+ "[warn] No assistant message ID received \u2014 session not saved. The next `arbi ask` will start a new conversation."
7949
+ )
7950
+ );
7951
+ }
7952
+ })();
7952
7953
  }
7953
7954
  function hashUtf8(s) {
7954
7955
  return crypto.createHash("sha256").update(s, "utf8").digest("hex");
@@ -12443,7 +12444,31 @@ async function loadSkillSource(source) {
12443
12444
  return fs7.readFileSync(source, "utf8");
12444
12445
  }
12445
12446
  function registerSkillsCommand(program2) {
12446
- const skills = program2.command("skills").description("Skills: list, show");
12447
+ const skills = program2.command("skills").description("Skills: list, show, run, install");
12448
+ addAskOptions(
12449
+ skills.command("run <slug> [input...]").description(
12450
+ "Run a skill in the normal workspace thread; supports continuation and background tasks"
12451
+ )
12452
+ ).action(
12453
+ (slug, input2, opts) => runAction(async () => {
12454
+ if (!/^[a-z0-9_-]+$/.test(slug))
12455
+ throw new Error("Use the exact skill slug from arbi skills list.");
12456
+ const { arbi, workspaceId } = await resolveWorkspace(opts.workspace);
12457
+ const [visible, commands] = await Promise.all([
12458
+ sdk.assistant.listSkills(arbi, { workspaceExtId: workspaceId, includeHidden: true }),
12459
+ sdk.assistant.listCommands(arbi)
12460
+ ]);
12461
+ if (!visible.some((skill) => skill.slug === slug)) throw new Error(`Unknown skill: ${slug}`);
12462
+ if (commands.some((command) => command.name === slug))
12463
+ throw new Error(
12464
+ `/${slug} resolves to a built-in command. Rename this skill before invoking it.`
12465
+ );
12466
+ await runAsk(`/${slug}${input2.length ? ` ${input2.join(" ")}` : ""}`, {
12467
+ ...opts,
12468
+ workspace: workspaceId
12469
+ });
12470
+ })()
12471
+ );
12447
12472
  skills.command("list").description("List user-invocable skills in the active workspace").option("--json", "Output as JSON").option("--include-hidden", "Include skills with user-invocable: false").action(
12448
12473
  (opts) => runAction(async () => {
12449
12474
  const { arbi, workspaceId } = await resolveWorkspace();
@@ -12561,6 +12586,37 @@ function registerSkillsCommand(program2) {
12561
12586
  })()
12562
12587
  );
12563
12588
  }
12589
+ function registerCapabilitiesCommand(program2) {
12590
+ const capabilities = program2.command("capabilities").description("Discover the same commands, skills and actions as the in-app agent");
12591
+ capabilities.command("list", { isDefault: true }).description("List live commands, skills and platform domains").option("-w, --workspace <id>", "Workspace ID (defaults to selected workspace)").action(
12592
+ (opts) => runAction(async () => {
12593
+ const { arbi, workspaceId } = await resolveWorkspace(opts.workspace);
12594
+ const [commands, skills, platform] = await Promise.all([
12595
+ sdk.assistant.listCommands(arbi),
12596
+ sdk.assistant.listSkills(arbi, { workspaceExtId: workspaceId, includeHidden: true }),
12597
+ sdk.assistant.getPlatformActions(arbi)
12598
+ ]);
12599
+ console.log(JSON.stringify({ workspace: workspaceId, commands, skills, platform }, null, 2));
12600
+ })()
12601
+ );
12602
+ capabilities.command("show <domain> [action]").description("Show live operation names or an operation\u2019s current input schema").action(
12603
+ (domain, action) => runAction(async () => {
12604
+ const { arbi } = await resolveAuth();
12605
+ console.log(
12606
+ JSON.stringify(await sdk.assistant.getPlatformActions(arbi, { domain, action }), null, 2)
12607
+ );
12608
+ })()
12609
+ );
12610
+ addAskOptions(
12611
+ capabilities.command("run <command> [input...]").description("Invoke a command or skill in its normal workspace thread")
12612
+ ).action(
12613
+ (command, input2, opts) => runAction(async () => {
12614
+ if (!/^[a-z0-9_-]+$/.test(command))
12615
+ throw new Error("Use a command or skill name from arbi capabilities list.");
12616
+ await runAsk(`/${command}${input2.length ? ` ${input2.join(" ")}` : ""}`, opts);
12617
+ })()
12618
+ );
12619
+ }
12564
12620
  function activitySubject(entry) {
12565
12621
  if (entry.source === "document") {
12566
12622
  const name = entry.document_name ?? entry.document_ext_id ?? "";
@@ -12686,7 +12742,7 @@ console.info = (...args) => {
12686
12742
  _origInfo(...args);
12687
12743
  };
12688
12744
  var program = new commander.Command();
12689
- program.name("arbi").description("ARBI CLI \u2014 interact with ARBI from the terminal").version("0.5.165").showHelpAfterError(true).showSuggestionAfterError(true);
12745
+ program.name("arbi").description("ARBI CLI \u2014 interact with ARBI from the terminal").version("0.5.166").showHelpAfterError(true).showSuggestionAfterError(true);
12690
12746
  registerConfigCommand(program);
12691
12747
  registerLoginCommand(program);
12692
12748
  registerRegisterCommand(program);
@@ -12731,6 +12787,7 @@ registerFilesCommand(program);
12731
12787
  registerUsageCommand(program);
12732
12788
  registerAuthCommand(program);
12733
12789
  registerSkillsCommand(program);
12790
+ registerCapabilitiesCommand(program);
12734
12791
  registerRelevanceCommands(program);
12735
12792
  applyHelpGroups(program, {
12736
12793
  "Getting started:": [