@opencode-ai/sdk 0.0.0-next-15716 → 0.0.0-next-15718

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.
@@ -4637,7 +4637,27 @@ export type SessionRevertCommitted = {
4637
4637
  to: string;
4638
4638
  };
4639
4639
  };
4640
- export type SessionEventDurable = SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionDeleted | SessionForked | SessionInputPromoted | SessionInputAdmitted | SessionExecutionStarted | SessionExecutionSucceeded | SessionExecutionFailed | SessionExecutionInterrupted | SessionInstructionsUpdated | SessionSynthetic | SessionSkillActivated | SessionShellStarted | SessionShellEnded | SessionStepStarted | SessionStepEnded | SessionStepFailed | SessionTextStarted | SessionTextEnded | SessionReasoningStarted | SessionReasoningEnded | SessionToolInputStarted | SessionToolInputEnded | SessionToolCalled | SessionToolProgress | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionAdmitted | SessionCompactionStarted | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted;
4640
+ export type SessionUsageRecorded = {
4641
+ id: string;
4642
+ created: number;
4643
+ metadata?: {
4644
+ [key: string]: unknown;
4645
+ };
4646
+ type: "session.usage.recorded";
4647
+ durable: {
4648
+ aggregateID: string;
4649
+ seq: number;
4650
+ version: 1;
4651
+ };
4652
+ location?: LocationRef;
4653
+ data: {
4654
+ sessionID: string;
4655
+ source: "title" | "compaction";
4656
+ cost: MoneyUsd;
4657
+ tokens: TokenUsageInfo;
4658
+ };
4659
+ };
4660
+ export type SessionEventDurable = SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionDeleted | SessionForked | SessionInputPromoted | SessionInputAdmitted | SessionExecutionStarted | SessionExecutionSucceeded | SessionExecutionFailed | SessionExecutionInterrupted | SessionInstructionsUpdated | SessionSynthetic | SessionSkillActivated | SessionShellStarted | SessionShellEnded | SessionStepStarted | SessionStepEnded | SessionStepFailed | SessionTextStarted | SessionTextEnded | SessionReasoningStarted | SessionReasoningEnded | SessionToolInputStarted | SessionToolInputEnded | SessionToolCalled | SessionToolProgress | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionAdmitted | SessionCompactionStarted | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | SessionUsageRecorded;
4641
4661
  export type EventLogSynced = {
4642
4662
  type: "log.synced";
4643
4663
  aggregateID: string;
@@ -8430,6 +8450,26 @@ export type SessionRevertCommittedV2 = {
8430
8450
  to: string;
8431
8451
  };
8432
8452
  };
8453
+ export type SessionUsageRecordedV2 = {
8454
+ id: string;
8455
+ created: number;
8456
+ metadata?: {
8457
+ [key: string]: unknown;
8458
+ };
8459
+ type: "session.usage.recorded";
8460
+ durable: {
8461
+ aggregateID: string;
8462
+ seq: number;
8463
+ version: 1;
8464
+ };
8465
+ location?: LocationRefV2;
8466
+ data: {
8467
+ sessionID: string;
8468
+ source: "title" | "compaction";
8469
+ cost: MoneyUsd;
8470
+ tokens: TokenUsageInfo;
8471
+ };
8472
+ };
8433
8473
  /**
8434
8474
  * Marker emitted once when a log read reaches its captured watermark. The reader holds every event committed at or below seq.
8435
8475
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode-ai/sdk",
4
- "version": "0.0.0-next-15716",
4
+ "version": "0.0.0-next-15718",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {