augure 0.6.0 → 0.6.1

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.
Files changed (2) hide show
  1. package/dist/bin.js +9 -1
  2. package/package.json +4 -4
package/dist/bin.js CHANGED
@@ -185,6 +185,7 @@ var OpenRouterClient = class {
185
185
  }
186
186
  async chat(messages, tools) {
187
187
  this.log.debug(`Request: model=${this.model} messages=${messages.length} tools=${tools?.length ?? 0}`);
188
+ const fetchStart = Date.now();
188
189
  const response = await fetch(`${this.baseUrl}/chat/completions`, {
189
190
  method: "POST",
190
191
  headers: {
@@ -218,7 +219,7 @@ var OpenRouterClient = class {
218
219
  }
219
220
  const data = await response.json();
220
221
  const choice = data.choices[0];
221
- this.log.debug(`Response: ${response.status} ${data.usage.prompt_tokens}+${data.usage.completion_tokens} tokens`);
222
+ this.log.debug(`Response: ${response.status} ${data.usage.prompt_tokens}+${data.usage.completion_tokens} tokens in ${Date.now() - fetchStart}ms`);
222
223
  return {
223
224
  content: choice.message.content ?? "",
224
225
  toolCalls: (choice.message.tool_calls ?? []).map((tc) => {
@@ -750,6 +751,9 @@ var Agent = class {
750
751
  }
751
752
  const maxLoops = this.config.maxToolLoops ?? 10;
752
753
  let loopCount = 0;
754
+ let totalInputTokens = 0;
755
+ let totalOutputTokens = 0;
756
+ let totalToolCalls = 0;
753
757
  const toolSchemas = this.config.tools.toFunctionSchemas();
754
758
  let effectiveSchemas = toolSchemas;
755
759
  let codeModeTool;
@@ -773,6 +777,8 @@ var Agent = class {
773
777
  });
774
778
  this.log.debug(`LLM call #${loopCount + 1} (${messages.length} messages)`);
775
779
  const response = await this.config.llm.chat(messages, effectiveSchemas);
780
+ totalInputTokens += response.usage.inputTokens;
781
+ totalOutputTokens += response.usage.outputTokens;
776
782
  if (response.toolCalls.length === 0) {
777
783
  history.push({
778
784
  role: "assistant",
@@ -795,6 +801,7 @@ var Agent = class {
795
801
  success: true
796
802
  });
797
803
  }
804
+ this.log.info(`\u2500\u2500 ${totalInputTokens}+${totalOutputTokens} tokens | ${loopCount + 1} LLM calls | ${totalToolCalls} tool calls | ${Date.now() - start}ms`);
798
805
  if (this.config.ingester) {
799
806
  this.config.ingester.ingest(history).catch((err2) => this.log.error("Ingestion error:", err2));
800
807
  }
@@ -805,6 +812,7 @@ var Agent = class {
805
812
  content: response.content || "",
806
813
  toolCalls: response.toolCalls
807
814
  });
815
+ totalToolCalls += response.toolCalls.length;
808
816
  for (const toolCall of response.toolCalls) {
809
817
  const toolStart = Date.now();
810
818
  this.log.debug(`Tool: ${toolCall.name}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "augure",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Augure — your proactive AI agent",
5
5
  "type": "module",
6
6
  "bin": {
@@ -30,12 +30,12 @@
30
30
  "tsup": "^8.5.1",
31
31
  "@augure/channels": "0.1.3",
32
32
  "@augure/core": "0.4.0",
33
- "@augure/sandbox": "0.1.2",
34
33
  "@augure/scheduler": "0.1.2",
35
34
  "@augure/memory": "0.0.5",
36
- "@augure/types": "0.3.0",
35
+ "@augure/sandbox": "0.1.2",
37
36
  "@augure/skills": "0.1.3",
38
- "@augure/tools": "0.1.1"
37
+ "@augure/tools": "0.1.1",
38
+ "@augure/types": "0.3.0"
39
39
  },
40
40
  "keywords": [
41
41
  "ai",