@leanandmean/coding-agent 0.74.1-scramjet.67 → 0.74.1-scramjet.68

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/docs/sdk.md CHANGED
@@ -96,6 +96,9 @@ interface AgentSession {
96
96
  // Harness-originated tool execution (resolves after the tool-result is persisted)
97
97
  invokeHarnessTool(name: string, args: unknown, options?: { toolCallId?: string }): Promise<void>;
98
98
 
99
+ // Whole-journal assistant/tool costs plus live reports awaiting final append
100
+ getRecordedSessionCost(): number;
101
+
99
102
  // State access
100
103
  agent: Agent;
101
104
  model: Model | undefined;
@@ -97,6 +97,7 @@ interface ToolResultMessage {
97
97
  toolName: string;
98
98
  content: (TextContent | ImageContent)[];
99
99
  details?: any; // Tool-specific metadata
100
+ cost?: number; // Cumulative reported invocation USD, including descendants
100
101
  isError: boolean;
101
102
  timestamp: number;
102
103
  }
@@ -117,6 +118,8 @@ interface Usage {
117
118
  }
118
119
  ```
119
120
 
121
+ Tool-result `cost` is optional additive metadata: it excludes the requesting assistant's usage and is independent of `details` and error status. Valid amounts are finite and nonnegative; explicit zero is authoritative, while absence means no generic cost was recorded, not that execution was free. This addition does not change the session format version or rewrite older records. Closed-schema readers must allow the optional field.
122
+
120
123
  ### Extended Message Types (from `@leanandmean/coding-agent`)
121
124
 
122
125
  ```typescript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leanandmean/coding-agent",
3
- "version": "0.74.1-scramjet.67",
3
+ "version": "0.74.1-scramjet.68",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,9 +37,9 @@
37
37
  "test": "vitest --run --passWithNoTests"
38
38
  },
39
39
  "dependencies": {
40
- "@leanandmean/agent": "0.74.1-scramjet.46",
41
- "@leanandmean/ai": "0.74.1-scramjet.42",
42
- "@leanandmean/tui": "0.74.1-scramjet.39",
40
+ "@leanandmean/agent": "0.74.1-scramjet.47",
41
+ "@leanandmean/ai": "0.74.1-scramjet.43",
42
+ "@leanandmean/tui": "0.74.1-scramjet.40",
43
43
  "@silvia-odwyer/photon-node": "^0.3.4",
44
44
  "chalk": "^5.5.0",
45
45
  "dictionary-en": "^4.0.0",