🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@opencode-ai/schema

Package Overview
Dependencies
Maintainers
2
Versions
432
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencode-ai/schema - npm Package Compare versions

Comparing version
0.0.0-next-15716
to
0.0.0-next-15718
+13
-2
dist/session-event.js

@@ -75,2 +75,12 @@ export * as SessionEvent from "./session-event.js";

});
export const UsageRecorded = Event.durable({
type: "session.usage.recorded",
...options,
schema: {
...Base,
source: Schema.Literals(["title", "compaction"]),
cost: Money.USD,
tokens: TokenUsage.Info,
},
});
export const UsageUpdated = Event.ephemeral({

@@ -450,6 +460,7 @@ type: "session.usage.updated",

export const Definitions = Event.inventory(AgentSelected, ModelSelected, Moved, Renamed, UsageUpdated, Deleted, Forked, InputPromoted, InputAdmitted, Execution.Started, Execution.Succeeded, Execution.Failed, Execution.Interrupted, InstructionsUpdated, Synthetic, Skill.Activated, Shell.Started, Shell.Ended, Step.Started, Step.Ended, Step.Failed, Text.Started, Text.Delta, Text.Ended, Reasoning.Started, Reasoning.Delta, Reasoning.Ended, Tool.Input.Started, Tool.Input.Delta, Tool.Input.Ended, Tool.Called, Tool.Progress, Tool.Success, Tool.Failed, RetryScheduled, Compaction.Admitted, Compaction.Started, Compaction.Delta, Compaction.Ended, Compaction.Failed, RevertEvent.Staged, RevertEvent.Cleared, RevertEvent.Committed);
export const DurableDefinitions = Event.inventory(...Definitions.filter((definition) => definition.durability === "durable"));
// UsageRecorded is durable but internal: excluded from Definitions so it never reaches the public manifest.
export const DurableDefinitions = Event.inventory(...Definitions.filter((definition) => definition.durability === "durable"), UsageRecorded);
export const Durable = Schema.Union(DurableDefinitions, { mode: "oneOf" })
.pipe(Schema.toTaggedUnion("type"))
.annotate({ identifier: "Session.Event.Durable" });
export const All = Schema.Union(Definitions, { mode: "oneOf" }).pipe(Schema.toTaggedUnion("type"));
export const All = Schema.Union(Event.inventory(...Definitions, UsageRecorded), { mode: "oneOf" }).pipe(Schema.toTaggedUnion("type"));
+1
-1
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@opencode-ai/schema",
"version": "0.0.0-next-15716",
"version": "0.0.0-next-15718",
"type": "module",

@@ -6,0 +6,0 @@ "license": "MIT",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display