@arbidocs/sdk 0.3.18 → 0.3.19

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/dist/index.cjs CHANGED
@@ -592,23 +592,7 @@ async function resolveWorkspace(store, workspaceOpt) {
592
592
  }
593
593
 
594
594
  // src/sse.ts
595
- var TOOL_LABELS = {
596
- search_documents: "Searching documents",
597
- get_document_passages: "Reading document",
598
- get_table_of_contents: "Getting table of contents",
599
- view_document_pages: "Viewing document pages",
600
- get_full_document: "Reading full document",
601
- web_search: "Searching the web",
602
- read_url: "Reading web pages",
603
- ask_user: "Asking user",
604
- compaction: "Compacting conversation",
605
- personal_agent: "Running agent",
606
- create_artifact: "Creating artifact",
607
- create_plan: "Creating plan",
608
- save_skill: "Saving skill",
609
- run_code: "Running code"
610
- };
611
- var LIFECYCLE_LABELS = {
595
+ var LIFECYCLE_LABELS_FALLBACK = {
612
596
  evaluation: "Evaluating results",
613
597
  answering: "Writing answer",
614
598
  reviewing: "Reviewing answer",
@@ -617,18 +601,19 @@ var LIFECYCLE_LABELS = {
617
601
  };
618
602
  function formatAgentStepLabel(step) {
619
603
  if (step.focus) return step.focus;
604
+ if (step.label) return step.label;
620
605
  const detail = step.detail;
621
606
  if (step.step === "tool_progress" && detail && detail.length > 0) {
622
- const toolName = detail[0].tool;
623
- const label = toolName && TOOL_LABELS[toolName] || LIFECYCLE_LABELS.tool_progress;
607
+ const label = detail[0].label || LIFECYCLE_LABELS_FALLBACK.tool_progress;
624
608
  const message = detail[0].message;
625
609
  return message ? `${label}: ${message}` : label;
626
610
  }
627
611
  if (step.step) {
628
- return LIFECYCLE_LABELS[step.step] || step.step;
612
+ return LIFECYCLE_LABELS_FALLBACK[step.step] || step.step;
629
613
  }
630
- if (detail && detail.length > 0 && detail[0].tool) {
631
- return TOOL_LABELS[detail[0].tool] || detail[0].tool;
614
+ if (detail && detail.length > 0) {
615
+ if (detail[0].label) return detail[0].label;
616
+ if (detail[0].tool) return detail[0].tool;
632
617
  }
633
618
  return "";
634
619
  }
@@ -2217,8 +2202,6 @@ exports.Arbi = Arbi;
2217
2202
  exports.ArbiApiError = ArbiApiError;
2218
2203
  exports.ArbiError = ArbiError;
2219
2204
  exports.FileConfigStore = FileConfigStore;
2220
- exports.LIFECYCLE_LABELS = LIFECYCLE_LABELS;
2221
- exports.TOOL_LABELS = TOOL_LABELS;
2222
2205
  exports.agentconfig = agentconfig_exports;
2223
2206
  exports.assistant = assistant_exports;
2224
2207
  exports.authenticatedFetch = authenticatedFetch;