@docyrus/docyrus 0.0.42 → 0.0.43

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/agent-loader.js CHANGED
@@ -2892,6 +2892,15 @@ async function main() {
2892
2892
  if (pipedStdin !== void 0 && !request.print) {
2893
2893
  request.print = true;
2894
2894
  }
2895
+ const runtime = new pi.AgentSessionRuntime(session, {
2896
+ cwd,
2897
+ agentDir,
2898
+ authStorage,
2899
+ modelRegistry,
2900
+ resourceLoader,
2901
+ settingsManager,
2902
+ sessionManager
2903
+ });
2895
2904
  if (request.print || pipedStdin !== void 0) {
2896
2905
  if (!session.model) {
2897
2906
  throw new Error(`No models available.
@@ -2903,14 +2912,14 @@ Or create ${modelsJsonPath}`);
2903
2912
  }
2904
2913
  const initialMessage = pipedStdin || request.prompt;
2905
2914
  const initialMessages = pipedStdin && request.prompt ? [request.prompt] : void 0;
2906
- await pi.runPrintMode(session, {
2915
+ await pi.runPrintMode(runtime, {
2907
2916
  mode: request.mode || "text",
2908
2917
  initialMessage,
2909
2918
  messages: initialMessages
2910
2919
  });
2911
2920
  return;
2912
2921
  }
2913
- const interactiveMode = new pi.InteractiveMode(session, {
2922
+ const interactiveMode = new pi.InteractiveMode(runtime, {
2914
2923
  initialMessage: request.prompt,
2915
2924
  modelFallbackMessage,
2916
2925
  verbose: request.verbose