@opencode/schema 2.2.2 → 2.2.4
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/agent.d.ts +2 -0
- package/dist/artifact.d.ts +160 -0
- package/dist/artifact.js +54 -0
- package/dist/config/experimental.d.ts +14 -5
- package/dist/config/experimental.js +4 -1
- package/dist/config/policy.d.ts +18 -3
- package/dist/config/policy.js +41 -3
- package/dist/config/provider.d.ts +2 -0
- package/dist/config.d.ts +13 -5
- package/dist/event-manifest.d.ts +284 -0
- package/dist/event-manifest.js +2 -1
- package/dist/generate.d.ts +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/model.d.ts +4 -0
- package/dist/persistent-pty.d.ts +292 -2
- package/dist/persistent-pty.js +5 -2
- package/dist/provider.d.ts +4 -0
- package/dist/provider.js +1 -0
- package/dist/schedule.d.ts +87 -9
- package/dist/schedule.js +46 -13
- package/dist/session-event.d.ts +80 -0
- package/dist/session-message.d.ts +20 -0
- package/dist/session-stats.d.ts +2 -0
- package/dist/session-transfer.d.ts +8 -0
- package/dist/session.d.ts +2 -0
- package/dist/usage-limits.d.ts +3 -0
- package/dist/v1/session.d.ts +45 -0
- package/package.json +1 -1
package/dist/agent.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export declare const Info: Schema.Struct<{
|
|
|
20
20
|
google: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
21
21
|
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
22
22
|
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
23
|
+
claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
23
24
|
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
24
25
|
azure: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
25
26
|
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
@@ -42,6 +43,7 @@ export declare const Info: Schema.Struct<{
|
|
|
42
43
|
google: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
43
44
|
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
44
45
|
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
46
|
+
claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
45
47
|
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
46
48
|
azure: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
47
49
|
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
export * as Artifact from "./artifact.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
export declare const ID: Schema.brand<Schema.String, "Artifact.ID"> & {
|
|
4
|
+
create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
|
|
5
|
+
};
|
|
6
|
+
export type ID = typeof ID.Type;
|
|
7
|
+
export declare const ProviderID: Schema.brand<Schema.Trim, "Artifact.ProviderID">;
|
|
8
|
+
export type ProviderID = typeof ProviderID.Type;
|
|
9
|
+
export declare const Capability: Schema.Literals<readonly ["static", "server-code", "sqlite", "durable-objects"]>;
|
|
10
|
+
export type Capability = typeof Capability.Type;
|
|
11
|
+
export interface Provider extends Schema.Schema.Type<typeof Provider> {
|
|
12
|
+
}
|
|
13
|
+
export declare const Provider: Schema.Struct<{
|
|
14
|
+
readonly id: Schema.brand<Schema.Trim, "Artifact.ProviderID">;
|
|
15
|
+
readonly name: Schema.String;
|
|
16
|
+
readonly capabilities: Schema.$Array<Schema.Literals<readonly ["static", "server-code", "sqlite", "durable-objects"]>>;
|
|
17
|
+
readonly default: Schema.Boolean;
|
|
18
|
+
}>;
|
|
19
|
+
export interface Time extends Schema.Schema.Type<typeof Time> {
|
|
20
|
+
}
|
|
21
|
+
export declare const Time: Schema.Struct<{
|
|
22
|
+
readonly created: Schema.Finite;
|
|
23
|
+
readonly updated: Schema.Finite;
|
|
24
|
+
}>;
|
|
25
|
+
export interface Info extends Schema.Schema.Type<typeof Info> {
|
|
26
|
+
}
|
|
27
|
+
export declare const Info: Schema.Struct<{
|
|
28
|
+
readonly id: Schema.brand<Schema.String, "Artifact.ID"> & {
|
|
29
|
+
create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
|
|
30
|
+
};
|
|
31
|
+
readonly provider: Schema.brand<Schema.Trim, "Artifact.ProviderID">;
|
|
32
|
+
readonly sessionID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
|
|
33
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
34
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
|
|
35
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
36
|
+
}>, never, never>;
|
|
37
|
+
readonly title: Schema.String;
|
|
38
|
+
readonly entry: Schema.String;
|
|
39
|
+
readonly url: Schema.String;
|
|
40
|
+
readonly time: Schema.Struct<{
|
|
41
|
+
readonly created: Schema.Finite;
|
|
42
|
+
readonly updated: Schema.Finite;
|
|
43
|
+
}>;
|
|
44
|
+
}>;
|
|
45
|
+
export interface Content extends Schema.Schema.Type<typeof Content> {
|
|
46
|
+
}
|
|
47
|
+
export declare const Content: Schema.Struct<{
|
|
48
|
+
readonly info: Schema.Struct<{
|
|
49
|
+
readonly id: Schema.brand<Schema.String, "Artifact.ID"> & {
|
|
50
|
+
create: () => string & import("effect/Brand").Brand<"Artifact.ID">;
|
|
51
|
+
};
|
|
52
|
+
readonly provider: Schema.brand<Schema.Trim, "Artifact.ProviderID">;
|
|
53
|
+
readonly sessionID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
|
|
54
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
55
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
|
|
56
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
57
|
+
}>, never, never>;
|
|
58
|
+
readonly title: Schema.String;
|
|
59
|
+
readonly entry: Schema.String;
|
|
60
|
+
readonly url: Schema.String;
|
|
61
|
+
readonly time: Schema.Struct<{
|
|
62
|
+
readonly created: Schema.Finite;
|
|
63
|
+
readonly updated: Schema.Finite;
|
|
64
|
+
}>;
|
|
65
|
+
}>;
|
|
66
|
+
readonly files: Schema.$Record<Schema.String, Schema.String>;
|
|
67
|
+
}>;
|
|
68
|
+
export interface CreateInput extends Schema.Schema.Type<typeof CreateInput> {
|
|
69
|
+
}
|
|
70
|
+
export declare const CreateInput: Schema.Struct<{
|
|
71
|
+
readonly title: Schema.String;
|
|
72
|
+
readonly files: Schema.$Record<Schema.String, Schema.String>;
|
|
73
|
+
readonly entry: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
74
|
+
readonly provider: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.Trim, "Artifact.ProviderID">>>, Schema.optionalKey<Schema.brand<Schema.Trim, "Artifact.ProviderID">>, never, never>;
|
|
75
|
+
readonly sessionID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
|
|
76
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
77
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
|
|
78
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
79
|
+
}>, never, never>;
|
|
80
|
+
}>;
|
|
81
|
+
export interface UpdateInput extends Schema.Schema.Type<typeof UpdateInput> {
|
|
82
|
+
}
|
|
83
|
+
export declare const UpdateInput: Schema.Struct<{
|
|
84
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
85
|
+
readonly files: Schema.$Record<Schema.String, Schema.String>;
|
|
86
|
+
readonly entry: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
87
|
+
readonly sessionID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "SessionID"> & {
|
|
88
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
89
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "SessionID"> & {
|
|
90
|
+
create: () => string & import("effect/Brand").Brand<"SessionID">;
|
|
91
|
+
}>, never, never>;
|
|
92
|
+
}>;
|
|
93
|
+
export declare const Event: {
|
|
94
|
+
Updated: Schema.Struct<{
|
|
95
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
96
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
97
|
+
};
|
|
98
|
+
readonly created: Schema.Finite;
|
|
99
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
100
|
+
readonly type: Schema.Literal<"artifact.updated">;
|
|
101
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
102
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
103
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
104
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
105
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
106
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
107
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
108
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
109
|
+
}>, never, never>;
|
|
110
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
111
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
112
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
113
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
114
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
115
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
116
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
117
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
118
|
+
}>, never, never>;
|
|
119
|
+
}>>, never, never>;
|
|
120
|
+
readonly data: Schema.Struct<{}>;
|
|
121
|
+
}> & {
|
|
122
|
+
type: "artifact.updated";
|
|
123
|
+
durability: "ephemeral";
|
|
124
|
+
durable: undefined;
|
|
125
|
+
data: Schema.Struct<{}>;
|
|
126
|
+
};
|
|
127
|
+
Definitions: readonly [Schema.Struct<{
|
|
128
|
+
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
129
|
+
create: () => string & import("effect/Brand").Brand<"Event.ID">;
|
|
130
|
+
};
|
|
131
|
+
readonly created: Schema.Finite;
|
|
132
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
133
|
+
readonly type: Schema.Literal<"artifact.updated">;
|
|
134
|
+
readonly location: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Struct<{
|
|
135
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
136
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
137
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
138
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
139
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
140
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
141
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
142
|
+
}>, never, never>;
|
|
143
|
+
}>>>, Schema.optionalKey<Schema.Struct<{
|
|
144
|
+
readonly directory: Schema.brand<Schema.String, "AbsolutePath">;
|
|
145
|
+
readonly workspaceID: Schema.decodeTo<Schema.optional<Schema.toType<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
146
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
147
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
148
|
+
}>>, Schema.optionalKey<Schema.brand<Schema.String, "Workspace.ID"> & {
|
|
149
|
+
ascending: (id?: string) => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
150
|
+
create: () => string & import("effect/Brand").Brand<"Workspace.ID">;
|
|
151
|
+
}>, never, never>;
|
|
152
|
+
}>>, never, never>;
|
|
153
|
+
readonly data: Schema.Struct<{}>;
|
|
154
|
+
}> & {
|
|
155
|
+
type: "artifact.updated";
|
|
156
|
+
durability: "ephemeral";
|
|
157
|
+
durable: undefined;
|
|
158
|
+
data: Schema.Struct<{}>;
|
|
159
|
+
}];
|
|
160
|
+
};
|
package/dist/artifact.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export * as Artifact from "./artifact.js";
|
|
2
|
+
import { Schema } from "effect";
|
|
3
|
+
import { ephemeral, inventory } from "./event.js";
|
|
4
|
+
import { ascending } from "./identifier.js";
|
|
5
|
+
import { optional, statics } from "./schema.js";
|
|
6
|
+
import { SessionID } from "./session-id.js";
|
|
7
|
+
export const ID = Schema.String.check(Schema.isStartingWith("art_")).pipe(Schema.brand("Artifact.ID"), Schema.annotate({ identifier: "Artifact.ID" }), statics((schema) => ({
|
|
8
|
+
create: () => schema.make("art_" + ascending()),
|
|
9
|
+
})));
|
|
10
|
+
export const ProviderID = Schema.Trim.check(Schema.isNonEmpty()).pipe(Schema.brand("Artifact.ProviderID"), Schema.annotate({ identifier: "Artifact.ProviderID" }));
|
|
11
|
+
export const Capability = Schema.Literals(["static", "server-code", "sqlite", "durable-objects"]).annotate({
|
|
12
|
+
identifier: "Artifact.Capability",
|
|
13
|
+
});
|
|
14
|
+
export const Provider = Schema.Struct({
|
|
15
|
+
id: ProviderID,
|
|
16
|
+
name: Schema.String,
|
|
17
|
+
capabilities: Schema.Array(Capability),
|
|
18
|
+
default: Schema.Boolean,
|
|
19
|
+
}).annotate({ identifier: "Artifact.Provider" });
|
|
20
|
+
export const Time = Schema.Struct({
|
|
21
|
+
created: Schema.Finite,
|
|
22
|
+
updated: Schema.Finite,
|
|
23
|
+
}).annotate({ identifier: "Artifact.Time" });
|
|
24
|
+
export const Info = Schema.Struct({
|
|
25
|
+
id: ID,
|
|
26
|
+
provider: ProviderID,
|
|
27
|
+
sessionID: SessionID.pipe(optional),
|
|
28
|
+
title: Schema.String,
|
|
29
|
+
entry: Schema.String,
|
|
30
|
+
url: Schema.String,
|
|
31
|
+
time: Time,
|
|
32
|
+
}).annotate({ identifier: "Artifact.Info" });
|
|
33
|
+
export const Content = Schema.Struct({
|
|
34
|
+
info: Info,
|
|
35
|
+
files: Schema.Record(Schema.String, Schema.String),
|
|
36
|
+
}).annotate({ identifier: "Artifact.Content" });
|
|
37
|
+
export const CreateInput = Schema.Struct({
|
|
38
|
+
title: Schema.String,
|
|
39
|
+
files: Schema.Record(Schema.String, Schema.String),
|
|
40
|
+
entry: Schema.String.pipe(optional),
|
|
41
|
+
provider: ProviderID.pipe(optional),
|
|
42
|
+
sessionID: SessionID.pipe(optional),
|
|
43
|
+
}).annotate({ identifier: "Artifact.CreateInput" });
|
|
44
|
+
export const UpdateInput = Schema.Struct({
|
|
45
|
+
title: Schema.String.pipe(optional),
|
|
46
|
+
files: Schema.Record(Schema.String, Schema.String),
|
|
47
|
+
entry: Schema.String.pipe(optional),
|
|
48
|
+
sessionID: SessionID.pipe(optional),
|
|
49
|
+
}).annotate({ identifier: "Artifact.UpdateInput" });
|
|
50
|
+
const Updated = ephemeral({
|
|
51
|
+
type: "artifact.updated",
|
|
52
|
+
schema: {},
|
|
53
|
+
});
|
|
54
|
+
export const Event = { Updated, Definitions: inventory(Updated) };
|
|
@@ -43,17 +43,26 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
|
|
|
43
43
|
}>]>, never, never>>, never, never>;
|
|
44
44
|
}>]>>, never, never>;
|
|
45
45
|
readonly schedules: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
46
|
+
readonly artifacts: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
46
47
|
readonly subagent_depth: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
47
48
|
readonly location_idle_timeout: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Union<readonly [Schema.DurationFromString, Schema.Literal<false>]>>>, Schema.optionalKey<Schema.Union<readonly [Schema.DurationFromString, Schema.Literal<false>]>>, never, never>;
|
|
48
|
-
readonly policies: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|
|
49
|
-
readonly action: Schema.Literals<readonly ["provider.use", "tool.use", "integration.use"]>;
|
|
49
|
+
readonly policies: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.decodeTo<Schema.toType<Schema.Struct<{
|
|
50
|
+
readonly action: Schema.Literals<readonly ["provider.use", "tool.use", "integration.connect", "integration.use", "mcp.use", "skill.use", "plugin.use"]>;
|
|
50
51
|
readonly resource: Schema.String;
|
|
51
52
|
readonly effect: Schema.Literals<readonly ["allow", "deny"]>;
|
|
52
|
-
}
|
|
53
|
-
readonly action: Schema.Literals<readonly ["provider.use", "tool.use", "integration.use"]>;
|
|
53
|
+
}>>, Schema.Struct<{
|
|
54
|
+
readonly action: Schema.Literals<readonly ["provider.use", "tool.use", "integration.connect", "integration.use", "mcp.use", "skill.use", "plugin.use"]>;
|
|
54
55
|
readonly resource: Schema.String;
|
|
55
56
|
readonly effect: Schema.Literals<readonly ["allow", "deny"]>;
|
|
56
|
-
}
|
|
57
|
+
}>, never, never>>>>, Schema.optionalKey<Schema.$Array<Schema.decodeTo<Schema.toType<Schema.Struct<{
|
|
58
|
+
readonly action: Schema.Literals<readonly ["provider.use", "tool.use", "integration.connect", "integration.use", "mcp.use", "skill.use", "plugin.use"]>;
|
|
59
|
+
readonly resource: Schema.String;
|
|
60
|
+
readonly effect: Schema.Literals<readonly ["allow", "deny"]>;
|
|
61
|
+
}>>, Schema.Struct<{
|
|
62
|
+
readonly action: Schema.Literals<readonly ["provider.use", "tool.use", "integration.connect", "integration.use", "mcp.use", "skill.use", "plugin.use"]>;
|
|
63
|
+
readonly resource: Schema.String;
|
|
64
|
+
readonly effect: Schema.Literals<readonly ["allow", "deny"]>;
|
|
65
|
+
}>, never, never>>>, never, never>;
|
|
57
66
|
}>, {}>;
|
|
58
67
|
export declare class Info extends Info_base {
|
|
59
68
|
}
|
|
@@ -5,7 +5,7 @@ import { ConfigModel } from "./model.js";
|
|
|
5
5
|
import { ConfigPolicy } from "./policy.js";
|
|
6
6
|
export class Info extends Schema.Class("ConfigExperimental.Info")({
|
|
7
7
|
portable_shell_scanner: Schema.Boolean.pipe(optional).annotate({
|
|
8
|
-
description: "
|
|
8
|
+
description: "Deprecated: the built-in shell permission scanner is now always enabled.",
|
|
9
9
|
}),
|
|
10
10
|
todo: Schema.Boolean.pipe(optional).annotate({
|
|
11
11
|
description: "Enable the experimental todowrite tool. Defaults to false.",
|
|
@@ -31,6 +31,9 @@ export class Info extends Schema.Class("ConfigExperimental.Info")({
|
|
|
31
31
|
schedules: Schema.Boolean.pipe(optional).annotate({
|
|
32
32
|
description: "Enable experimental scheduled tasks that wake a session with a prompt. Defaults to false.",
|
|
33
33
|
}),
|
|
34
|
+
artifacts: Schema.Boolean.pipe(optional).annotate({
|
|
35
|
+
description: "Enable experimental artifacts backed by pluggable providers. Defaults to false.",
|
|
36
|
+
}),
|
|
34
37
|
subagent_depth: NonNegativeInt.pipe(optional).annotate({
|
|
35
38
|
description: "Maximum subagent nesting depth. Defaults to 1.",
|
|
36
39
|
}),
|
package/dist/config/policy.d.ts
CHANGED
|
@@ -2,9 +2,24 @@ export * as ConfigPolicy from "./policy.js";
|
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
export declare const Effect: Schema.Literals<readonly ["allow", "deny"]>;
|
|
4
4
|
export type Effect = typeof Effect.Type;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* - `provider.use`: resource is a provider ID.
|
|
7
|
+
* - `tool.use`: resource is `<tool>:<input>`, such as `shell:git *`.
|
|
8
|
+
* - `integration.connect`: resource is an integration ID; controls which integrations can be listed and connected.
|
|
9
|
+
* - `integration.use`: resource is `<integration>#<account>`, or the bare integration ID when the providers, models,
|
|
10
|
+
* web search, MCP servers, or config an integration supplies come from no account (env keys, local config, the
|
|
11
|
+
* signed-out free tier).
|
|
12
|
+
* - `mcp.use`, `skill.use`, `plugin.use`: resource is an MCP server name, skill ID, or plugin target.
|
|
13
|
+
*/
|
|
14
|
+
export declare const Action: Schema.Literals<readonly ["provider.use", "tool.use", "integration.connect", "integration.use", "mcp.use", "skill.use", "plugin.use"]>;
|
|
15
|
+
export type Action = typeof Action.Type;
|
|
16
|
+
export declare const Info: Schema.decodeTo<Schema.toType<Schema.Struct<{
|
|
17
|
+
readonly action: Schema.Literals<readonly ["provider.use", "tool.use", "integration.connect", "integration.use", "mcp.use", "skill.use", "plugin.use"]>;
|
|
7
18
|
readonly resource: Schema.String;
|
|
8
19
|
readonly effect: Schema.Literals<readonly ["allow", "deny"]>;
|
|
9
|
-
}
|
|
20
|
+
}>>, Schema.Struct<{
|
|
21
|
+
readonly action: Schema.Literals<readonly ["provider.use", "tool.use", "integration.connect", "integration.use", "mcp.use", "skill.use", "plugin.use"]>;
|
|
22
|
+
readonly resource: Schema.String;
|
|
23
|
+
readonly effect: Schema.Literals<readonly ["allow", "deny"]>;
|
|
24
|
+
}>, never, never>;
|
|
10
25
|
export type Info = typeof Info.Type;
|
package/dist/config/policy.js
CHANGED
|
@@ -1,8 +1,46 @@
|
|
|
1
1
|
export * as ConfigPolicy from "./policy.js";
|
|
2
|
-
import { Schema } from "effect";
|
|
2
|
+
import { Schema, SchemaGetter } from "effect";
|
|
3
3
|
export const Effect = Schema.Literals(["allow", "deny"]);
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* - `provider.use`: resource is a provider ID.
|
|
6
|
+
* - `tool.use`: resource is `<tool>:<input>`, such as `shell:git *`.
|
|
7
|
+
* - `integration.connect`: resource is an integration ID; controls which integrations can be listed and connected.
|
|
8
|
+
* - `integration.use`: resource is `<integration>#<account>`, or the bare integration ID when the providers, models,
|
|
9
|
+
* web search, MCP servers, or config an integration supplies come from no account (env keys, local config, the
|
|
10
|
+
* signed-out free tier).
|
|
11
|
+
* - `mcp.use`, `skill.use`, `plugin.use`: resource is an MCP server name, skill ID, or plugin target.
|
|
12
|
+
*/
|
|
13
|
+
export const Action = Schema.Literals([
|
|
14
|
+
"provider.use",
|
|
15
|
+
"tool.use",
|
|
16
|
+
"integration.connect",
|
|
17
|
+
"integration.use",
|
|
18
|
+
"mcp.use",
|
|
19
|
+
"skill.use",
|
|
20
|
+
"plugin.use",
|
|
21
|
+
]);
|
|
22
|
+
const Statement = Schema.Struct({
|
|
23
|
+
action: Action,
|
|
6
24
|
resource: Schema.String,
|
|
7
25
|
effect: Effect,
|
|
8
26
|
});
|
|
27
|
+
// Before `mcp.use`, `skill.use` and `plugin.use` existed, `integration.use` covered them with a resource prefix.
|
|
28
|
+
// Every policy source decodes through this schema, so this is the only place that knows the legacy form. Only prefixed
|
|
29
|
+
// resources convert: a bare `integration.use` `*` keeps its action and now covers providers and accounts.
|
|
30
|
+
const legacy = new Map([
|
|
31
|
+
["mcp", "mcp.use"],
|
|
32
|
+
["skill", "skill.use"],
|
|
33
|
+
["plugin", "plugin.use"],
|
|
34
|
+
]);
|
|
35
|
+
export const Info = Statement.pipe(Schema.decodeTo(Schema.toType(Statement), {
|
|
36
|
+
decode: SchemaGetter.transform((policy) => {
|
|
37
|
+
if (policy.action !== "integration.use")
|
|
38
|
+
return policy;
|
|
39
|
+
const separator = policy.resource.indexOf(":");
|
|
40
|
+
const action = separator === -1 ? undefined : legacy.get(policy.resource.slice(0, separator));
|
|
41
|
+
if (!action)
|
|
42
|
+
return policy;
|
|
43
|
+
return { ...policy, action, resource: policy.resource.slice(separator + 1) };
|
|
44
|
+
}),
|
|
45
|
+
encode: SchemaGetter.passthrough(),
|
|
46
|
+
}));
|
|
@@ -390,6 +390,7 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
|
|
|
390
390
|
google: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
391
391
|
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
392
392
|
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
393
|
+
claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
393
394
|
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
394
395
|
azure: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
395
396
|
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
@@ -402,6 +403,7 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
|
|
|
402
403
|
google: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
403
404
|
googleVertex: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
404
405
|
githubCopilot: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
406
|
+
claudeAgent: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
405
407
|
amazonBedrock: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
406
408
|
azure: string & import("effect/Brand").Brand<"Provider.ID">;
|
|
407
409
|
openrouter: string & import("effect/Brand").Brand<"Provider.ID">;
|
package/dist/config.d.ts
CHANGED
|
@@ -54,15 +54,23 @@ declare const Info_base: Schema.Class<Info, Schema.Struct<{
|
|
|
54
54
|
readonly resource: Schema.String;
|
|
55
55
|
readonly effect: Schema.Literals<readonly ["allow", "deny", "ask"]>;
|
|
56
56
|
}>>>, never, never>;
|
|
57
|
-
readonly policies: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|
|
58
|
-
readonly action: Schema.Literals<readonly ["provider.use", "tool.use", "integration.use"]>;
|
|
57
|
+
readonly policies: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.decodeTo<Schema.toType<Schema.Struct<{
|
|
58
|
+
readonly action: Schema.Literals<readonly ["provider.use", "tool.use", "integration.connect", "integration.use", "mcp.use", "skill.use", "plugin.use"]>;
|
|
59
59
|
readonly resource: Schema.String;
|
|
60
60
|
readonly effect: Schema.Literals<readonly ["allow", "deny"]>;
|
|
61
|
-
}
|
|
62
|
-
readonly action: Schema.Literals<readonly ["provider.use", "tool.use", "integration.use"]>;
|
|
61
|
+
}>>, Schema.Struct<{
|
|
62
|
+
readonly action: Schema.Literals<readonly ["provider.use", "tool.use", "integration.connect", "integration.use", "mcp.use", "skill.use", "plugin.use"]>;
|
|
63
63
|
readonly resource: Schema.String;
|
|
64
64
|
readonly effect: Schema.Literals<readonly ["allow", "deny"]>;
|
|
65
|
-
}
|
|
65
|
+
}>, never, never>>>>, Schema.optionalKey<Schema.$Array<Schema.decodeTo<Schema.toType<Schema.Struct<{
|
|
66
|
+
readonly action: Schema.Literals<readonly ["provider.use", "tool.use", "integration.connect", "integration.use", "mcp.use", "skill.use", "plugin.use"]>;
|
|
67
|
+
readonly resource: Schema.String;
|
|
68
|
+
readonly effect: Schema.Literals<readonly ["allow", "deny"]>;
|
|
69
|
+
}>>, Schema.Struct<{
|
|
70
|
+
readonly action: Schema.Literals<readonly ["provider.use", "tool.use", "integration.connect", "integration.use", "mcp.use", "skill.use", "plugin.use"]>;
|
|
71
|
+
readonly resource: Schema.String;
|
|
72
|
+
readonly effect: Schema.Literals<readonly ["allow", "deny"]>;
|
|
73
|
+
}>, never, never>>>, never, never>;
|
|
66
74
|
readonly agents: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, typeof ConfigAgent.Info>>>, Schema.optionalKey<Schema.$Record<Schema.String, typeof ConfigAgent.Info>>, never, never>;
|
|
67
75
|
readonly snapshots: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
68
76
|
readonly watcher: Schema.decodeTo<Schema.optional<Schema.toType<typeof ConfigWatcher.Info>>, Schema.optionalKey<typeof ConfigWatcher.Info>, never, never>;
|