@opencode-ai/schema 0.0.0-dev-19121 → 0.0.0-dev-19127
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/dist/config/worktree.d.ts +7 -0
- package/dist/config/worktree.js +7 -0
- package/dist/config.d.ts +5 -0
- package/dist/config.js +4 -0
- package/dist/worktree.d.ts +11 -12
- package/dist/worktree.js +11 -8
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * as ConfigWorktree from "./worktree.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
export const Info = Schema.Struct({
|
|
4
|
+
directory: Schema.Trim.pipe(Schema.check(Schema.isNonEmpty())).annotate({
|
|
5
|
+
description: "Parent directory for new worktrees, relative to the declaring config file when not absolute",
|
|
6
|
+
}),
|
|
7
|
+
}).annotate({ identifier: "Config.Worktree" });
|
package/dist/config.d.ts
CHANGED
|
@@ -72,6 +72,11 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
|
|
|
72
72
|
readonly references: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, typeof ConfigReference.Git, typeof ConfigReference.Local]>>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, typeof ConfigReference.Git, typeof ConfigReference.Local]>>>, never, never>;
|
|
73
73
|
readonly websearch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Literal<false>, typeof ConfigWebSearch.Info]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Literal<false>, typeof ConfigWebSearch.Info]>>, never, never>;
|
|
74
74
|
readonly plugins: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Union<readonly [Schema.String, typeof ConfigPlugin.Entry]>>>>, Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.String, typeof ConfigPlugin.Entry]>>>, never, never>;
|
|
75
|
+
readonly worktree: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
76
|
+
readonly directory: Schema.Trim;
|
|
77
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
78
|
+
readonly directory: Schema.Trim;
|
|
79
|
+
}>>, never, never>;
|
|
75
80
|
readonly warming: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.Boolean, typeof ConfigWarming.Info]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.Boolean, typeof ConfigWarming.Info]>>, never, never>;
|
|
76
81
|
readonly providers: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, typeof ConfigProvider.Info>>>, Schema.optionalKey<Schema.$Record<Schema.String, typeof ConfigProvider.Info>>, never, never>;
|
|
77
82
|
readonly experimental: Schema.decodeTo<Schema.optional<Schema.toType<typeof ConfigExperimental.Info>>, Schema.optionalKey<typeof ConfigExperimental.Info>, never, never>;
|
package/dist/config.js
CHANGED
|
@@ -19,6 +19,7 @@ import { ConfigWebSearch } from "./config/websearch.js";
|
|
|
19
19
|
import { ConfigToolOutput } from "./config/tool-output.js";
|
|
20
20
|
import { ConfigWatcher } from "./config/watcher.js";
|
|
21
21
|
import { ConfigWarming } from "./config/warming.js";
|
|
22
|
+
import { ConfigWorktree } from "./config/worktree.js";
|
|
22
23
|
export class Info extends Schema.Class("Config.Info")({
|
|
23
24
|
$schema: optional(Schema.String).annotate({
|
|
24
25
|
description: "JSON schema reference for configuration validation",
|
|
@@ -96,6 +97,9 @@ export class Info extends Schema.Class("Config.Info")({
|
|
|
96
97
|
plugins: ConfigPlugin.Plugins.pipe(optional).annotate({
|
|
97
98
|
description: "Ordered plugin enablement directives and external package declarations",
|
|
98
99
|
}),
|
|
100
|
+
worktree: ConfigWorktree.Info.pipe(optional).annotate({
|
|
101
|
+
description: "Directory defaults for local worktree creation",
|
|
102
|
+
}),
|
|
99
103
|
warming: ConfigWarming.Warming.pipe(optional).annotate({
|
|
100
104
|
description: "Keep recently active sessions warm with transient model requests (default: false)",
|
|
101
105
|
}),
|
package/dist/worktree.d.ts
CHANGED
|
@@ -3,10 +3,7 @@ import { Schema } from "effect";
|
|
|
3
3
|
export declare const StrategyID: Schema.brand<Schema.Trim, "Worktree.StrategyID">;
|
|
4
4
|
export type StrategyID = typeof StrategyID.Type;
|
|
5
5
|
export declare const CreateInput: Schema.Struct<{
|
|
6
|
-
readonly
|
|
7
|
-
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
8
|
-
};
|
|
9
|
-
readonly strategy: Schema.brand<Schema.Trim, "Worktree.StrategyID">;
|
|
6
|
+
readonly strategy: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Trim, "Worktree.StrategyID">>>, Schema.optionalKey<Schema.brand<Schema.Trim, "Worktree.StrategyID">>, never, never>;
|
|
10
7
|
readonly from: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "AbsolutePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "AbsolutePath">>, never, never>;
|
|
11
8
|
readonly branch: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Trim>>, Schema.optionalKey<Schema.Trim>, never, never>;
|
|
12
9
|
readonly directory: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "AbsolutePath">>>, Schema.optionalKey<Schema.brand<Schema.String, "AbsolutePath">>, never, never>;
|
|
@@ -15,9 +12,6 @@ export declare const CreateInput: Schema.Struct<{
|
|
|
15
12
|
export interface CreateInput extends Schema.Schema.Type<typeof CreateInput> {
|
|
16
13
|
}
|
|
17
14
|
export declare const RemoveInput: Schema.Struct<{
|
|
18
|
-
readonly projectID: Schema.brand<Schema.String, "Project.ID"> & {
|
|
19
|
-
global: string & import("effect/Brand").Brand<"Project.ID">;
|
|
20
|
-
};
|
|
21
15
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
22
16
|
readonly force: Schema.Boolean;
|
|
23
17
|
}>;
|
|
@@ -34,12 +28,17 @@ export declare const Directory: Schema.Struct<{
|
|
|
34
28
|
}>;
|
|
35
29
|
export interface Directory extends Schema.Schema.Type<typeof Directory> {
|
|
36
30
|
}
|
|
37
|
-
export declare const
|
|
38
|
-
readonly
|
|
39
|
-
|
|
40
|
-
};
|
|
31
|
+
export declare const ListEntry: Schema.Struct<{
|
|
32
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
33
|
+
readonly type: Schema.Literals<readonly ["root", "worktree"]>;
|
|
41
34
|
}>;
|
|
42
|
-
export interface
|
|
35
|
+
export interface ListEntry extends Schema.Schema.Type<typeof ListEntry> {
|
|
36
|
+
}
|
|
37
|
+
declare const OperationError_base: Schema.Class<OperationError, Schema.TaggedStruct<"Worktree.OperationError", {
|
|
38
|
+
readonly message: Schema.String;
|
|
39
|
+
readonly forceRequired: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
40
|
+
}>, import("effect/Cause").YieldableError>;
|
|
41
|
+
export declare class OperationError extends OperationError_base {
|
|
43
42
|
}
|
|
44
43
|
export declare const List: Schema.$Array<Schema.Struct<{
|
|
45
44
|
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
package/dist/worktree.js
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
export * as Worktree from "./worktree.js";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { durable, ephemeral, inventory } from "./event.js";
|
|
4
|
-
import { ProjectID } from "./project-id.js";
|
|
5
4
|
import { AbsolutePath, optional } from "./schema.js";
|
|
6
5
|
import { Project } from "./project.js";
|
|
7
6
|
export const StrategyID = Schema.Trim.pipe(Schema.check(Schema.isNonEmpty()), Schema.brand("Worktree.StrategyID"));
|
|
8
7
|
export const CreateInput = Schema.Struct({
|
|
9
|
-
|
|
10
|
-
strategy: StrategyID,
|
|
8
|
+
strategy: optional(StrategyID),
|
|
11
9
|
from: optional(AbsolutePath),
|
|
12
10
|
branch: optional(Schema.Trim.pipe(Schema.check(Schema.isNonEmpty()))),
|
|
13
11
|
directory: optional(AbsolutePath).annotate({
|
|
14
|
-
description: "Parent directory for the new worktree.
|
|
12
|
+
description: "Parent directory for the new worktree. Uses the location's configuration, then defaults to the server's data directory under worktree/<first six project ID characters>.",
|
|
15
13
|
}),
|
|
16
14
|
name: optional(Schema.String),
|
|
17
15
|
}).annotate({ identifier: "Worktree.CreateInput" });
|
|
18
16
|
export const RemoveInput = Schema.Struct({
|
|
19
|
-
projectID: ProjectID,
|
|
20
17
|
directory: AbsolutePath,
|
|
21
18
|
force: Schema.Boolean,
|
|
22
19
|
}).annotate({ identifier: "Worktree.RemoveInput" });
|
|
@@ -27,9 +24,15 @@ export const Directory = Schema.Struct({
|
|
|
27
24
|
directory: AbsolutePath,
|
|
28
25
|
strategy: optional(Schema.String),
|
|
29
26
|
}).annotate({ identifier: "Worktree.Directory" });
|
|
30
|
-
export const
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
export const ListEntry = Schema.Struct({
|
|
28
|
+
directory: AbsolutePath,
|
|
29
|
+
type: Schema.Literals(["root", "worktree"]),
|
|
30
|
+
}).annotate({ identifier: "Worktree.ListEntry" });
|
|
31
|
+
export class OperationError extends Schema.TaggedError()("Worktree.OperationError", {
|
|
32
|
+
message: Schema.String,
|
|
33
|
+
forceRequired: optional(Schema.Boolean),
|
|
34
|
+
}) {
|
|
35
|
+
}
|
|
33
36
|
export const List = Schema.Array(Directory).annotate({ identifier: "Worktree.List" });
|
|
34
37
|
const Updated = ephemeral({
|
|
35
38
|
type: "worktree.updated",
|