@aigne/cli 1.58.1-beta.1 → 1.59.0-beta.2

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,54 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.59.0-beta.2](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.58.1-beta.2...cli-v1.59.0-beta.2) (2025-12-19)
4
+
5
+
6
+ ### Features
7
+
8
+ * add prompt caching for OpenAI/Gemini/Anthropic and cache token display ([#838](https://github.com/AIGNE-io/aigne-framework/issues/838)) ([46c628f](https://github.com/AIGNE-io/aigne-framework/commit/46c628f180572ea1b955d1a9888aad6145204842))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @aigne/afs-local-fs bumped to 1.4.0-beta.3
16
+ * @aigne/agent-library bumped to 1.24.0-beta.3
17
+ * @aigne/agentic-memory bumped to 1.1.6-beta.3
18
+ * @aigne/aigne-hub bumped to 0.10.16-beta.3
19
+ * @aigne/core bumped to 1.72.0-beta.3
20
+ * @aigne/default-memory bumped to 1.3.6-beta.3
21
+ * @aigne/observability-api bumped to 0.11.14-beta.1
22
+ * @aigne/openai bumped to 0.16.16-beta.3
23
+ * @aigne/secrets bumped to 0.1.6-beta.3
24
+ * devDependencies
25
+ * @aigne/test-utils bumped to 0.5.69-beta.3
26
+
27
+ ## [1.58.1-beta.2](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.58.1-beta.1...cli-v1.58.1-beta.2) (2025-12-19)
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * **core:** add creditPrefix field to usage tracking ([#837](https://github.com/AIGNE-io/aigne-framework/issues/837)) ([9ef25e0](https://github.com/AIGNE-io/aigne-framework/commit/9ef25e0687b4e7b4ba39a27a35805f377f0979eb))
33
+
34
+
35
+ ### Dependencies
36
+
37
+ * The following workspace dependencies were updated
38
+ * dependencies
39
+ * @aigne/afs bumped to 1.4.0-beta.2
40
+ * @aigne/afs-history bumped to 1.2.0-beta.2
41
+ * @aigne/afs-local-fs bumped to 1.4.0-beta.2
42
+ * @aigne/agent-library bumped to 1.24.0-beta.2
43
+ * @aigne/agentic-memory bumped to 1.1.6-beta.2
44
+ * @aigne/aigne-hub bumped to 0.10.16-beta.2
45
+ * @aigne/core bumped to 1.72.0-beta.2
46
+ * @aigne/default-memory bumped to 1.3.6-beta.2
47
+ * @aigne/openai bumped to 0.16.16-beta.2
48
+ * @aigne/secrets bumped to 0.1.6-beta.2
49
+ * devDependencies
50
+ * @aigne/test-utils bumped to 0.5.69-beta.2
51
+
3
52
  ## [1.58.1-beta.1](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.58.1-beta...cli-v1.58.1-beta.1) (2025-12-17)
4
53
 
5
54
 
@@ -20,6 +20,7 @@ export declare class TerminalTracer {
20
20
  private proxiedPrompts;
21
21
  private buyCreditsPromptPromise;
22
22
  private promptBuyCredits;
23
+ formatAigneHubCredits(credits: number, creditPrefix?: string): [string, string];
23
24
  formatTokenUsage(usage: Partial<ContextUsage>, extra?: {
24
25
  [key: string]: string;
25
26
  }): string;
@@ -118,7 +118,11 @@ export class TerminalTracer {
118
118
  taskWrapper.title = await this.formatTaskTitle(task.agent, {
119
119
  input: task.input,
120
120
  task,
121
- usage: Boolean(task.usage.inputTokens || task.usage.outputTokens || task.usage.aigneHubCredits),
121
+ usage: Boolean(task.usage.inputTokens ||
122
+ task.usage.outputTokens ||
123
+ task.usage.aigneHubCredits ||
124
+ task.usage.cacheCreationInputTokens ||
125
+ task.usage.cacheReadInputTokens),
122
126
  time: context.id === collapsed.ancestor.contextId,
123
127
  });
124
128
  if (context.id === collapsed.ancestor.contextId) {
@@ -242,12 +246,28 @@ export class TerminalTracer {
242
246
  this.buyCreditsPromptPromise = undefined;
243
247
  });
244
248
  }
249
+ formatAigneHubCredits(credits, creditPrefix) {
250
+ const hasDecimal = credits % 1 !== 0;
251
+ const formattedCredits = hasDecimal
252
+ ? parseFloat(credits.toFixed(6)).toString()
253
+ : credits.toFixed();
254
+ if (creditPrefix) {
255
+ return [chalk.grey("cost:"), chalk.blue(`${creditPrefix}${formattedCredits}`)];
256
+ }
257
+ return [chalk.blue(formattedCredits), chalk.grey("AIGNE Hub credits")];
258
+ }
245
259
  formatTokenUsage(usage, extra) {
246
260
  const items = [
247
261
  [chalk.yellow(usage.inputTokens), chalk.grey("input tokens")],
262
+ usage.cacheReadInputTokens
263
+ ? [chalk.green(usage.cacheReadInputTokens), chalk.grey("cached")]
264
+ : undefined,
265
+ usage.cacheCreationInputTokens
266
+ ? [chalk.yellow(usage.cacheCreationInputTokens), chalk.grey("cache write")]
267
+ : undefined,
248
268
  [chalk.cyan(usage.outputTokens), chalk.grey("output tokens")],
249
269
  usage.aigneHubCredits
250
- ? [chalk.blue(usage.aigneHubCredits.toFixed()), chalk.grey("AIGNE Hub credits")]
270
+ ? this.formatAigneHubCredits(usage.aigneHubCredits, usage.creditPrefix)
251
271
  : undefined,
252
272
  usage.agentCalls ? [chalk.magenta(usage.agentCalls), chalk.grey("agent calls")] : undefined,
253
273
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/cli",
3
- "version": "1.58.1-beta.1",
3
+ "version": "1.59.0-beta.2",
4
4
  "description": "Your command center for agent development",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -74,7 +74,7 @@
74
74
  "marked": "^16.3.0",
75
75
  "nunjucks": "^3.2.4",
76
76
  "open": "^10.2.0",
77
- "openai": "^6.6.0",
77
+ "openai": "^6.14.0",
78
78
  "p-wait-for": "^5.0.2",
79
79
  "prettier": "^3.6.2",
80
80
  "react": "^19.1.1",
@@ -89,17 +89,17 @@
89
89
  "yoctocolors-cjs": "^2.1.3",
90
90
  "zod": "^3.25.67",
91
91
  "zod-to-json-schema": "^3.24.6",
92
- "@aigne/afs": "^1.4.0-beta.1",
93
- "@aigne/agent-library": "^1.24.0-beta.1",
94
- "@aigne/afs-local-fs": "^1.4.0-beta.1",
95
- "@aigne/agentic-memory": "^1.1.6-beta.1",
96
- "@aigne/aigne-hub": "^0.10.16-beta.1",
97
- "@aigne/afs-history": "^1.2.0-beta.1",
98
- "@aigne/core": "^1.72.0-beta.1",
99
- "@aigne/default-memory": "^1.3.6-beta.1",
100
- "@aigne/observability-api": "^0.11.14-beta",
101
- "@aigne/openai": "^0.16.16-beta.1",
102
- "@aigne/secrets": "^0.1.6-beta.1"
92
+ "@aigne/afs": "^1.4.0-beta.2",
93
+ "@aigne/afs-local-fs": "^1.4.0-beta.3",
94
+ "@aigne/afs-history": "^1.2.0-beta.2",
95
+ "@aigne/agent-library": "^1.24.0-beta.3",
96
+ "@aigne/agentic-memory": "^1.1.6-beta.3",
97
+ "@aigne/core": "^1.72.0-beta.3",
98
+ "@aigne/default-memory": "^1.3.6-beta.3",
99
+ "@aigne/aigne-hub": "^0.10.16-beta.3",
100
+ "@aigne/observability-api": "^0.11.14-beta.1",
101
+ "@aigne/openai": "^0.16.16-beta.3",
102
+ "@aigne/secrets": "^0.1.6-beta.3"
103
103
  },
104
104
  "devDependencies": {
105
105
  "@inquirer/testing": "^2.1.50",
@@ -116,7 +116,7 @@
116
116
  "rimraf": "^6.0.1",
117
117
  "typescript": "^5.9.2",
118
118
  "ufo": "^1.6.1",
119
- "@aigne/test-utils": "^0.5.69-beta.1"
119
+ "@aigne/test-utils": "^0.5.69-beta.3"
120
120
  },
121
121
  "scripts": {
122
122
  "lint": "tsc --noEmit",