@opencode-ai/schema
Advanced tools
| import { Schema } from "effect"; | ||
| /** | ||
| * Host-supplied session annotations, durable from creation and opaque to | ||
| * core. Keys are arbitrary; values must be JSON-serializable. Children and | ||
| * forks inherit the parent's metadata unless the creator supplies its own. | ||
| */ | ||
| export declare const SessionMetadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>; | ||
| export type SessionMetadata = typeof SessionMetadata.Type; |
| import { Schema } from "effect"; | ||
| /** | ||
| * Host-supplied session annotations, durable from creation and opaque to | ||
| * core. Keys are arbitrary; values must be JSON-serializable. Children and | ||
| * forks inherit the parent's metadata unless the creator supplies its own. | ||
| */ | ||
| export const SessionMetadata = Schema.Record(Schema.String, Schema.Json).annotate({ | ||
| identifier: "Session.Metadata", | ||
| }); |
@@ -11,2 +11,3 @@ export * as SessionEvent from "./session-event.js"; | ||
| import { SessionID } from "./session-id.js"; | ||
| import { SessionMetadata } from "./session-metadata.js"; | ||
| import { Location } from "./location.js"; | ||
@@ -57,2 +58,4 @@ import { SessionMessage } from "./session-message.js"; | ||
| model: Model.Ref.pipe(optional), | ||
| /** Host-supplied annotations resolved at creation, including any inherited from a parent. */ | ||
| metadata: SessionMetadata.pipe(optional), | ||
| version: Schema.String, | ||
@@ -59,0 +62,0 @@ }, |
@@ -136,2 +136,3 @@ export * as SessionTransfer from "./session-transfer.js"; | ||
| readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>; | ||
| readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>; | ||
| readonly revert: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{ | ||
@@ -138,0 +139,0 @@ readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & { |
@@ -5,2 +5,3 @@ export * as Session from "./session.js"; | ||
| import { SessionID } from "./session-id.js"; | ||
| import { SessionMetadata } from "./session-metadata.js"; | ||
| import { Revert } from "./session-revert.js"; | ||
@@ -13,2 +14,4 @@ import { SessionFork } from "./session-fork.js"; | ||
| export type ID = SessionID; | ||
| export declare const Metadata: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>; | ||
| export type Metadata = SessionMetadata; | ||
| export declare const Event: typeof SessionEvent; | ||
@@ -173,2 +176,3 @@ export { Revert }; | ||
| readonly subpath: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "RelativePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "RelativePath">>, never, never>; | ||
| readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>, never, never>; | ||
| readonly revert: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{ | ||
@@ -175,0 +179,0 @@ readonly messageID: Schema.brand<Schema.String, "Session.Message.ID"> & { |
+3
-0
@@ -10,2 +10,3 @@ export * as Session from "./session.js"; | ||
| import { SessionID } from "./session-id.js"; | ||
| import { SessionMetadata } from "./session-metadata.js"; | ||
| import { Money } from "./money.js"; | ||
@@ -16,2 +17,3 @@ import { TokenUsage } from "./token-usage.js"; | ||
| export const ID = SessionID; | ||
| export const Metadata = SessionMetadata; | ||
| export const Event = SessionEvent; | ||
@@ -45,2 +47,3 @@ export { Revert }; | ||
| subpath: RelativePath.pipe(optional), | ||
| metadata: Metadata.pipe(optional), | ||
| revert: Revert.pipe(optional), | ||
@@ -47,0 +50,0 @@ }).annotate({ identifier: "Session.Info" }); |
+1
-1
| { | ||
| "$schema": "https://json.schemastore.org/package.json", | ||
| "name": "@opencode-ai/schema", | ||
| "version": "0.0.0-dev-18494", | ||
| "version": "0.0.0-dev-18508", | ||
| "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
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
3742316
0.18%197
1.03%59129
0.12%