@nyte-ai/schema 0.0.0-stage → 0.0.18
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/LICENSE +21 -0
- package/THIRD-PARTY-NOTICES.md +800 -0
- package/dist/chunks/browser-0byq2fja.js +50 -0
- package/dist/chunks/browser-0ebnhqs2.js +36 -0
- package/dist/chunks/browser-0g0z3617.js +47 -0
- package/dist/chunks/browser-0khex2b1.js +33 -0
- package/dist/chunks/browser-1sfp0bcx.js +73 -0
- package/dist/chunks/browser-40enyw9r.js +75 -0
- package/dist/chunks/browser-48g24pes.js +106 -0
- package/dist/chunks/browser-4et7qtz3.js +7 -0
- package/dist/chunks/browser-5n1dh580.js +66 -0
- package/dist/chunks/browser-5pvw8svn.js +243 -0
- package/dist/chunks/browser-6e1madxa.js +83 -0
- package/dist/chunks/browser-6yby604e.js +96 -0
- package/dist/chunks/browser-7195qf3t.js +14 -0
- package/dist/chunks/browser-7gjnxy9m.js +172 -0
- package/dist/chunks/browser-8t9anqfc.js +113 -0
- package/dist/chunks/browser-9ystjh78.js +0 -0
- package/dist/chunks/browser-ad9yebg7.js +101 -0
- package/dist/chunks/browser-b519jtez.js +102 -0
- package/dist/chunks/browser-bg1esaw0.js +82 -0
- package/dist/chunks/browser-bxz3z1v6.js +181 -0
- package/dist/chunks/browser-e5xgzd28.js +82 -0
- package/dist/chunks/browser-ebr6k189.js +120 -0
- package/dist/chunks/browser-ekbecx9r.js +73 -0
- package/dist/chunks/browser-fd3accdr.js +159 -0
- package/dist/chunks/browser-fth801bw.js +50 -0
- package/dist/chunks/browser-g5khdcap.js +170 -0
- package/dist/chunks/browser-gchr2880.js +135 -0
- package/dist/chunks/browser-h86zs54a.js +65 -0
- package/dist/chunks/browser-hq5q56sf.js +79 -0
- package/dist/chunks/browser-j629a6wa.js +17 -0
- package/dist/chunks/browser-k20f6cvv.js +0 -0
- package/dist/chunks/browser-m0wzr0g8.js +5 -0
- package/dist/chunks/browser-mnejgne0.js +125 -0
- package/dist/chunks/browser-mzfc0v5j.js +58 -0
- package/dist/chunks/browser-pdv675va.js +135 -0
- package/dist/chunks/browser-pdx38ng3.js +301 -0
- package/dist/chunks/browser-qkxe0fwp.js +6 -0
- package/dist/chunks/browser-r00v3vwv.js +238 -0
- package/dist/chunks/browser-r87w64mz.js +32 -0
- package/dist/chunks/browser-s7907azt.js +118 -0
- package/dist/chunks/browser-sgwxbek9.js +37 -0
- package/dist/chunks/browser-v70eq512.js +215 -0
- package/dist/chunks/browser-vapnjwp3.js +35 -0
- package/dist/chunks/browser-vkh2tpmf.js +283 -0
- package/dist/chunks/browser-vzc3r2r3.js +64 -0
- package/dist/chunks/browser-ypez6s7v.js +52 -0
- package/dist/src/browser.d.ts +64 -0
- package/dist/src/browser.js +26 -0
- package/dist/src/configuration.d.ts +26 -0
- package/dist/src/configuration.js +17 -0
- package/dist/src/connection.d.ts +189 -0
- package/dist/src/connection.js +35 -0
- package/dist/src/declaration.d.ts +12 -0
- package/dist/src/declaration.js +1 -0
- package/dist/src/errors.d.ts +56 -0
- package/dist/src/errors.js +23 -0
- package/dist/src/events.d.ts +1750 -0
- package/dist/src/events.js +36 -0
- package/dist/src/files.d.ts +130 -0
- package/dist/src/files.js +49 -0
- package/dist/src/git.d.ts +271 -0
- package/dist/src/git.js +64 -0
- package/dist/src/github.d.ts +174 -0
- package/dist/src/github.js +31 -0
- package/dist/src/heads.d.ts +255 -0
- package/dist/src/heads.js +48 -0
- package/dist/src/hooks.d.ts +201 -0
- package/dist/src/hooks.js +28 -0
- package/dist/src/host.d.ts +137 -0
- package/dist/src/host.js +49 -0
- package/dist/src/ids.d.ts +66 -0
- package/dist/src/ids.js +67 -0
- package/dist/src/index.d.ts +30 -0
- package/dist/src/index.js +779 -0
- package/dist/src/jobs.d.ts +152 -0
- package/dist/src/jobs.js +34 -0
- package/dist/src/json.d.ts +24 -0
- package/dist/src/json.js +21 -0
- package/dist/src/mcp.d.ts +212 -0
- package/dist/src/mcp.js +34 -0
- package/dist/src/messages.d.ts +114 -0
- package/dist/src/messages.js +28 -0
- package/dist/src/model/index.d.ts +6 -0
- package/dist/src/model/index.js +61 -0
- package/dist/src/model/message.d.ts +178 -0
- package/dist/src/model/message.js +7 -0
- package/dist/src/model/model.d.ts +154 -0
- package/dist/src/model/model.js +11 -0
- package/dist/src/model/text.d.ts +6 -0
- package/dist/src/model/text.js +10 -0
- package/dist/src/model/tool.d.ts +36 -0
- package/dist/src/model/tool.js +1 -0
- package/dist/src/model/transcript.d.ts +34 -0
- package/dist/src/model/transcript.js +37 -0
- package/dist/src/model/typed.d.ts +6 -0
- package/dist/src/model/typed.js +8 -0
- package/dist/src/models.d.ts +195 -0
- package/dist/src/models.js +45 -0
- package/dist/src/parts.d.ts +364 -0
- package/dist/src/parts.js +35 -0
- package/dist/src/patch.d.ts +21 -0
- package/dist/src/patch.js +11 -0
- package/dist/src/plugins.d.ts +36 -0
- package/dist/src/plugins.js +9 -0
- package/dist/src/primitives.d.ts +83 -0
- package/dist/src/primitives.js +26 -0
- package/dist/src/runs.d.ts +433 -0
- package/dist/src/runs.js +39 -0
- package/dist/src/schema.d.ts +14 -0
- package/dist/src/schema.js +8 -0
- package/dist/src/serial.d.ts +18 -0
- package/dist/src/serial.js +39 -0
- package/dist/src/sessions.d.ts +578 -0
- package/dist/src/sessions.js +74 -0
- package/dist/src/store.d.ts +831 -0
- package/dist/src/store.js +33 -0
- package/dist/src/tools.d.ts +76 -0
- package/dist/src/tools.js +24 -0
- package/dist/src/views.d.ts +2737 -0
- package/dist/src/views.js +50 -0
- package/dist/src/wire/base64.d.ts +2 -0
- package/dist/src/wire/base64.js +6 -0
- package/dist/src/wire/nullable.d.ts +2 -0
- package/dist/src/wire/nullable.js +6 -0
- package/dist/src/wire/operations/browser.d.ts +535 -0
- package/dist/src/wire/operations/browser.js +12 -0
- package/dist/src/wire/operations/fields.d.ts +54 -0
- package/dist/src/wire/operations/fields.js +30 -0
- package/dist/src/wire/operations/files.d.ts +244 -0
- package/dist/src/wire/operations/files.js +13 -0
- package/dist/src/wire/operations/git.d.ts +513 -0
- package/dist/src/wire/operations/git.js +15 -0
- package/dist/src/wire/operations/github.d.ts +172 -0
- package/dist/src/wire/operations/github.js +12 -0
- package/dist/src/wire/operations/host.d.ts +1011 -0
- package/dist/src/wire/operations/host.js +27 -0
- package/dist/src/wire/operations/index.d.ts +6703 -0
- package/dist/src/wire/operations/index.js +40 -0
- package/dist/src/wire/operations/session.d.ts +3411 -0
- package/dist/src/wire/operations/session.js +25 -0
- package/dist/src/wire/operations/workspace.d.ts +830 -0
- package/dist/src/wire/operations/workspace.js +24 -0
- package/dist/src/workspaces.d.ts +119 -0
- package/dist/src/workspaces.js +38 -0
- package/package.json +51 -3
- package/README.md +0 -3
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
2
|
+
import type { Decoded, Schema } from "./schema.ts";
|
|
3
|
+
export declare const PageInfoType: Type.TObject<{
|
|
4
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"page">>;
|
|
5
|
+
url: Type.TString;
|
|
6
|
+
title: Type.TString;
|
|
7
|
+
holders: Type.TNumber;
|
|
8
|
+
}>;
|
|
9
|
+
export type PageInfo = Decoded<typeof PageInfoType>;
|
|
10
|
+
export declare const PageViewType: Type.TObject<{
|
|
11
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"page">>;
|
|
12
|
+
url: Type.TString;
|
|
13
|
+
title: Type.TString;
|
|
14
|
+
loading: Type.TBoolean;
|
|
15
|
+
revision: Type.TUnsafe<import("./ids.ts").Id<"document-revision">>;
|
|
16
|
+
canGoBack: Type.TBoolean;
|
|
17
|
+
canGoForward: Type.TBoolean;
|
|
18
|
+
}>;
|
|
19
|
+
export type PageView = Decoded<typeof PageViewType>;
|
|
20
|
+
export declare const PageSnapshotType: Type.TObject<{
|
|
21
|
+
revision: Type.TUnsafe<import("./ids.ts").Id<"document-revision">>;
|
|
22
|
+
nodes: Type.TArray<Type.TObject<{
|
|
23
|
+
ref: Type.TString;
|
|
24
|
+
role: Type.TString;
|
|
25
|
+
name: Type.TString;
|
|
26
|
+
editable: Type.TBoolean;
|
|
27
|
+
depth: Type.TNumber;
|
|
28
|
+
}>>;
|
|
29
|
+
}>;
|
|
30
|
+
export type PageSnapshot = Decoded<typeof PageSnapshotType>;
|
|
31
|
+
export declare const ConsoleEntryType: Type.TObject<{
|
|
32
|
+
level: Type.TEnum<["log", "info", "warn", "error"]>;
|
|
33
|
+
text: Type.TString;
|
|
34
|
+
at: Type.TNumber;
|
|
35
|
+
}>;
|
|
36
|
+
export type ConsoleEntry = Decoded<typeof ConsoleEntryType>;
|
|
37
|
+
export declare const PageOutcomeType: Type.TUnion<[Type.TObject<{
|
|
38
|
+
kind: Type.TLiteral<"applied">;
|
|
39
|
+
snapshot: Type.TObject<{
|
|
40
|
+
revision: Type.TUnsafe<import("./ids.ts").Id<"document-revision">>;
|
|
41
|
+
nodes: Type.TArray<Type.TObject<{
|
|
42
|
+
ref: Type.TString;
|
|
43
|
+
role: Type.TString;
|
|
44
|
+
name: Type.TString;
|
|
45
|
+
editable: Type.TBoolean;
|
|
46
|
+
depth: Type.TNumber;
|
|
47
|
+
}>>;
|
|
48
|
+
}>;
|
|
49
|
+
}>, Type.TObject<{
|
|
50
|
+
kind: Type.TLiteral<"stale">;
|
|
51
|
+
revision: Type.TUnsafe<import("./ids.ts").Id<"document-revision">>;
|
|
52
|
+
}>, Type.TObject<{
|
|
53
|
+
kind: Type.TLiteral<"refused">;
|
|
54
|
+
reason: Type.TEnum<["unknown-ref", "occluded", "not-visible", "policy"]>;
|
|
55
|
+
}>, Type.TObject<{
|
|
56
|
+
kind: Type.TLiteral<"closed">;
|
|
57
|
+
reason: Type.TEnum<["released", "reclaimed", "crashed"]>;
|
|
58
|
+
}>]>;
|
|
59
|
+
export type PageOutcome = Decoded<typeof PageOutcomeType>;
|
|
60
|
+
export declare const PageInfoSchema: Schema<PageInfo>;
|
|
61
|
+
export declare const PageViewSchema: Schema<PageView>;
|
|
62
|
+
export declare const PageSnapshotSchema: Schema<PageSnapshot>;
|
|
63
|
+
export declare const ConsoleEntrySchema: Schema<ConsoleEntry>;
|
|
64
|
+
export declare const PageOutcomeSchema: Schema<PageOutcome>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
PageInfoType2,
|
|
3
|
+
PageViewType2,
|
|
4
|
+
PageSnapshotType2,
|
|
5
|
+
ConsoleEntryType2,
|
|
6
|
+
PageOutcomeType2,
|
|
7
|
+
PageInfoSchema2,
|
|
8
|
+
PageViewSchema2,
|
|
9
|
+
PageSnapshotSchema2,
|
|
10
|
+
ConsoleEntrySchema2,
|
|
11
|
+
PageOutcomeSchema2
|
|
12
|
+
} from "../chunks/browser-mzfc0v5j.js";
|
|
13
|
+
import"../chunks/browser-ypez6s7v.js";
|
|
14
|
+
import"../chunks/browser-vzc3r2r3.js";
|
|
15
|
+
export {
|
|
16
|
+
ConsoleEntrySchema2 as ConsoleEntrySchema,
|
|
17
|
+
ConsoleEntryType2 as ConsoleEntryType,
|
|
18
|
+
PageInfoSchema2 as PageInfoSchema,
|
|
19
|
+
PageInfoType2 as PageInfoType,
|
|
20
|
+
PageOutcomeSchema2 as PageOutcomeSchema,
|
|
21
|
+
PageOutcomeType2 as PageOutcomeType,
|
|
22
|
+
PageSnapshotSchema2 as PageSnapshotSchema,
|
|
23
|
+
PageSnapshotType2 as PageSnapshotType,
|
|
24
|
+
PageViewSchema2 as PageViewSchema,
|
|
25
|
+
PageViewType2 as PageViewType
|
|
26
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
2
|
+
import type { Decoded, Schema } from "./schema.ts";
|
|
3
|
+
export declare const ConfigurationPatchType: Type.TObject<{
|
|
4
|
+
model: Type.TOptional<Type.TObject<{
|
|
5
|
+
provider: Type.TString;
|
|
6
|
+
id: Type.TString;
|
|
7
|
+
}>>;
|
|
8
|
+
thinking: Type.TOptional<Type.TUnion<[Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>, Type.TNull]>>;
|
|
9
|
+
agent: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
10
|
+
settings: Type.TOptional<Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>>;
|
|
11
|
+
}>;
|
|
12
|
+
export type ConfigurationPatch = Decoded<typeof ConfigurationPatchType>;
|
|
13
|
+
export declare const ConfigurationType: Type.TObject<{
|
|
14
|
+
kind: Type.TLiteral<"exact">;
|
|
15
|
+
model: Type.TObject<{
|
|
16
|
+
provider: Type.TString;
|
|
17
|
+
id: Type.TString;
|
|
18
|
+
}>;
|
|
19
|
+
thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
20
|
+
agent: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
21
|
+
settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
22
|
+
settingsVersion: Type.TString;
|
|
23
|
+
}>;
|
|
24
|
+
export type Configuration = Decoded<typeof ConfigurationType>;
|
|
25
|
+
export declare const ConfigurationPatchSchema: Schema<ConfigurationPatch>;
|
|
26
|
+
export declare const ConfigurationSchema: Schema<Configuration>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ConfigurationPatchType2,
|
|
3
|
+
ConfigurationType2,
|
|
4
|
+
ConfigurationPatchSchema2,
|
|
5
|
+
ConfigurationSchema2
|
|
6
|
+
} from "../chunks/browser-vapnjwp3.js";
|
|
7
|
+
import"../chunks/browser-8t9anqfc.js";
|
|
8
|
+
import"../chunks/browser-sgwxbek9.js";
|
|
9
|
+
import"../chunks/browser-4et7qtz3.js";
|
|
10
|
+
import"../chunks/browser-ypez6s7v.js";
|
|
11
|
+
import"../chunks/browser-vzc3r2r3.js";
|
|
12
|
+
export {
|
|
13
|
+
ConfigurationPatchSchema2 as ConfigurationPatchSchema,
|
|
14
|
+
ConfigurationPatchType2 as ConfigurationPatchType,
|
|
15
|
+
ConfigurationSchema2 as ConfigurationSchema,
|
|
16
|
+
ConfigurationType2 as ConfigurationType
|
|
17
|
+
};
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
2
|
+
import type { Authority } from "./host.ts";
|
|
3
|
+
import type { Awaitable } from "./primitives.ts";
|
|
4
|
+
import type { Decoded, Schema } from "./schema.ts";
|
|
5
|
+
export declare const HostViewWireType: Type.TObject<{
|
|
6
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"host">>;
|
|
7
|
+
link: Type.TUnion<[Type.TObject<{
|
|
8
|
+
kind: Type.TLiteral<"connected">;
|
|
9
|
+
}>, Type.TObject<{
|
|
10
|
+
kind: Type.TLiteral<"reconnecting">;
|
|
11
|
+
since: Type.TNumber;
|
|
12
|
+
attempts: Type.TNumber;
|
|
13
|
+
}>, Type.TObject<{
|
|
14
|
+
kind: Type.TLiteral<"closed">;
|
|
15
|
+
reason: Type.TEnum<["client", "revoked", "host-gone"]>;
|
|
16
|
+
}>]>;
|
|
17
|
+
name: Type.TString;
|
|
18
|
+
platform: Type.TString;
|
|
19
|
+
version: Type.TString;
|
|
20
|
+
catalog: Type.TUnsafe<import("./ids.ts").Id<"catalog-generation">>;
|
|
21
|
+
plugins: Type.TArray<Type.TObject<{
|
|
22
|
+
id: Type.TString;
|
|
23
|
+
source: Type.TEnum<["builtin", "user", "project", "inline"]>;
|
|
24
|
+
path: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
25
|
+
issues: Type.TArray<Type.TObject<{
|
|
26
|
+
severity: Type.TEnum<["error", "warning"]>;
|
|
27
|
+
path: Type.TArray<Type.TUnion<[Type.TString, Type.TNumber]>>;
|
|
28
|
+
message: Type.TString;
|
|
29
|
+
source: Type.TOptional<Type.TObject<{
|
|
30
|
+
plugin: Type.TString;
|
|
31
|
+
file: Type.TOptional<Type.TString>;
|
|
32
|
+
line: Type.TOptional<Type.TNumber>;
|
|
33
|
+
}>>;
|
|
34
|
+
}>>;
|
|
35
|
+
}>>;
|
|
36
|
+
settings: Type.TArray<Type.TObject<{
|
|
37
|
+
id: Type.TString;
|
|
38
|
+
owner: Type.TString;
|
|
39
|
+
scope: Type.TEnum<["host", "session"]>;
|
|
40
|
+
label: Type.TString;
|
|
41
|
+
schema: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
42
|
+
choices: Type.TUnion<[Type.TArray<Type.TObject<{
|
|
43
|
+
value: Type.TUnsafe<import("./json.ts").Json>;
|
|
44
|
+
label: Type.TString;
|
|
45
|
+
badge: Type.TOptional<Type.TString>;
|
|
46
|
+
}>>, Type.TNull]>;
|
|
47
|
+
value: Type.TUnsafe<import("./json.ts").Json>;
|
|
48
|
+
from: Type.TEnum<["default", "host", "session"]>;
|
|
49
|
+
}>>;
|
|
50
|
+
/** The workspace a session created without one runs in (Home), or null when the host has none. */
|
|
51
|
+
defaultWorkspace: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"workspace">>, Type.TNull]>;
|
|
52
|
+
authority: Type.TArray<Type.TEnum<["participant", "owner", "maintenance"]>>;
|
|
53
|
+
principal: Type.TUnsafe<import("./ids.ts").Id<"principal">>;
|
|
54
|
+
}>;
|
|
55
|
+
export type HostViewWire = Decoded<typeof HostViewWireType>;
|
|
56
|
+
export declare const CredentialSourceWireType: Type.TUnion<[Type.TObject<{
|
|
57
|
+
kind: Type.TLiteral<"token">;
|
|
58
|
+
token: Type.TString;
|
|
59
|
+
}>, Type.TObject<{
|
|
60
|
+
kind: Type.TLiteral<"pairing">;
|
|
61
|
+
code: Type.TString;
|
|
62
|
+
}>]>;
|
|
63
|
+
export type CredentialSourceWire = Decoded<typeof CredentialSourceWireType>;
|
|
64
|
+
export declare const JournalEntryType: Type.TObject<{
|
|
65
|
+
id: Type.TUnsafe<import("./ids.ts").Id<"receipt">>;
|
|
66
|
+
session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
|
|
67
|
+
head: Type.TUnsafe<import("./ids.ts").Id<"head">>;
|
|
68
|
+
content: Type.TUnion<[Type.TString, Type.TArray<Type.TUnion<[Type.TObject<{
|
|
69
|
+
kind: Type.TLiteral<"text">;
|
|
70
|
+
text: Type.TString;
|
|
71
|
+
}>, Type.TObject<{
|
|
72
|
+
kind: Type.TLiteral<"file">;
|
|
73
|
+
blob: Type.TUnsafe<import("./ids.ts").Id<"blob">>;
|
|
74
|
+
mime: Type.TString;
|
|
75
|
+
name: Type.TString;
|
|
76
|
+
}>, Type.TObject<{
|
|
77
|
+
kind: Type.TLiteral<"reference">;
|
|
78
|
+
path: Type.TString;
|
|
79
|
+
blob: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"blob">>>;
|
|
80
|
+
}>, Type.TObject<{
|
|
81
|
+
kind: Type.TLiteral<"skill">;
|
|
82
|
+
name: Type.TString;
|
|
83
|
+
location: Type.TString;
|
|
84
|
+
}>, Type.TObject<{
|
|
85
|
+
kind: Type.TLiteral<"excerpt">;
|
|
86
|
+
source: Type.TUnion<[Type.TObject<{
|
|
87
|
+
kind: Type.TLiteral<"diff">;
|
|
88
|
+
path: Type.TString;
|
|
89
|
+
side: Type.TEnum<["old", "new"]>;
|
|
90
|
+
start: Type.TNumber;
|
|
91
|
+
end: Type.TNumber;
|
|
92
|
+
}>, Type.TObject<{
|
|
93
|
+
kind: Type.TLiteral<"terminal">;
|
|
94
|
+
command: Type.TOptional<Type.TString>;
|
|
95
|
+
}>, Type.TObject<{
|
|
96
|
+
kind: Type.TLiteral<"browser">;
|
|
97
|
+
url: Type.TString;
|
|
98
|
+
selector: Type.TString;
|
|
99
|
+
}>]>;
|
|
100
|
+
text: Type.TString;
|
|
101
|
+
}>]>>]>;
|
|
102
|
+
options: Type.TObject<{
|
|
103
|
+
delivery: Type.TOptional<Type.TEnum<["steer", "queue", "attach"]>>;
|
|
104
|
+
replace: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"message">>>;
|
|
105
|
+
running: Type.TOptional<Type.TEnum<["refuse", "stop"]>>;
|
|
106
|
+
abandoned: Type.TOptional<Type.TUnion<[Type.TLiteral<"keep">, Type.TObject<{
|
|
107
|
+
summarize: Type.TObject<{
|
|
108
|
+
instructions: Type.TOptional<Type.TString>;
|
|
109
|
+
}>;
|
|
110
|
+
}>]>>;
|
|
111
|
+
expect: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"revision">>>;
|
|
112
|
+
position: Type.TOptional<Type.TUnion<[Type.TObject<{
|
|
113
|
+
kind: Type.TLiteral<"last">;
|
|
114
|
+
}>, Type.TObject<{
|
|
115
|
+
kind: Type.TLiteral<"before">;
|
|
116
|
+
message: Type.TUnsafe<import("./ids.ts").Id<"message">>;
|
|
117
|
+
}>]>>;
|
|
118
|
+
source: Type.TOptional<Type.TUnion<[Type.TObject<{
|
|
119
|
+
kind: Type.TLiteral<"user">;
|
|
120
|
+
}>, Type.TObject<{
|
|
121
|
+
kind: Type.TLiteral<"child">;
|
|
122
|
+
session: Type.TUnsafe<import("./ids.ts").Id<"session">>;
|
|
123
|
+
end: Type.TEnum<["completed", "stopped", "failed"]>;
|
|
124
|
+
}>, Type.TObject<{
|
|
125
|
+
kind: Type.TLiteral<"job">;
|
|
126
|
+
job: Type.TUnsafe<import("./ids.ts").Id<"job">>;
|
|
127
|
+
}>, Type.TObject<{
|
|
128
|
+
kind: Type.TLiteral<"shell">;
|
|
129
|
+
}>, Type.TObject<{
|
|
130
|
+
kind: Type.TLiteral<"action">;
|
|
131
|
+
label: Type.TString;
|
|
132
|
+
command: Type.TOptional<Type.TString>;
|
|
133
|
+
}>]>>;
|
|
134
|
+
configuration: Type.TOptional<Type.TUnion<[Type.TObject<{
|
|
135
|
+
kind: Type.TLiteral<"exact">;
|
|
136
|
+
model: Type.TObject<{
|
|
137
|
+
provider: Type.TString;
|
|
138
|
+
id: Type.TString;
|
|
139
|
+
}>;
|
|
140
|
+
thinking: Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
|
|
141
|
+
agent: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
142
|
+
settings: Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>;
|
|
143
|
+
settingsVersion: Type.TString;
|
|
144
|
+
}>, Type.TObject<{
|
|
145
|
+
model: Type.TOptional<Type.TObject<{
|
|
146
|
+
provider: Type.TString;
|
|
147
|
+
id: Type.TString;
|
|
148
|
+
}>>;
|
|
149
|
+
thinking: Type.TOptional<Type.TUnion<[Type.TEnum<["off", "minimal", "low", "medium", "high", "xhigh", "max"]>, Type.TNull]>>;
|
|
150
|
+
agent: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
151
|
+
settings: Type.TOptional<Type.TRecord<"^.*$", Type.TUnsafe<import("./json.ts").Json>>>;
|
|
152
|
+
}>]>>;
|
|
153
|
+
id: Type.TOptional<Type.TUnsafe<import("./ids.ts").Id<"receipt">>>;
|
|
154
|
+
}>;
|
|
155
|
+
at: Type.TNumber;
|
|
156
|
+
}>;
|
|
157
|
+
export type JournalEntry = Decoded<typeof JournalEntryType>;
|
|
158
|
+
export declare const SettingOutcomeType: Type.TUnion<[Type.TObject<{
|
|
159
|
+
kind: Type.TLiteral<"applied">;
|
|
160
|
+
}>, Type.TObject<{
|
|
161
|
+
kind: Type.TLiteral<"invalid">;
|
|
162
|
+
issues: Type.TArray<Type.TObject<{
|
|
163
|
+
severity: Type.TEnum<["error", "warning"]>;
|
|
164
|
+
path: Type.TArray<Type.TUnion<[Type.TString, Type.TNumber]>>;
|
|
165
|
+
message: Type.TString;
|
|
166
|
+
source: Type.TOptional<Type.TObject<{
|
|
167
|
+
plugin: Type.TString;
|
|
168
|
+
file: Type.TOptional<Type.TString>;
|
|
169
|
+
line: Type.TOptional<Type.TNumber>;
|
|
170
|
+
}>>;
|
|
171
|
+
}>>;
|
|
172
|
+
}>, Type.TObject<{
|
|
173
|
+
kind: Type.TLiteral<"unknown">;
|
|
174
|
+
}>]>;
|
|
175
|
+
export type SettingOutcome = Decoded<typeof SettingOutcomeType>;
|
|
176
|
+
export declare const HostViewWireSchema: Schema<HostViewWire>;
|
|
177
|
+
export declare const CredentialSourceWireSchema: Schema<CredentialSourceWire>;
|
|
178
|
+
export declare const JournalEntrySchema: Schema<JournalEntry>;
|
|
179
|
+
export declare const SettingOutcomeSchema: Schema<SettingOutcome>;
|
|
180
|
+
/** A host as the client holds it: the wire view, its authority as a set and without the connection's principal. */
|
|
181
|
+
export type HostView = Omit<HostViewWire, "authority" | "principal"> & {
|
|
182
|
+
readonly authority: ReadonlySet<Authority>;
|
|
183
|
+
readonly operations: string | null;
|
|
184
|
+
};
|
|
185
|
+
/** How the client proves who it is: a credential the wire carries, or headers a `custom` source computes. */
|
|
186
|
+
export type CredentialSource = CredentialSourceWire | {
|
|
187
|
+
readonly kind: "custom";
|
|
188
|
+
headers(): Awaitable<Readonly<Record<string, string>>>;
|
|
189
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
HostViewWireType2,
|
|
3
|
+
CredentialSourceWireType2,
|
|
4
|
+
JournalEntryType2,
|
|
5
|
+
SettingOutcomeType2,
|
|
6
|
+
HostViewWireSchema2,
|
|
7
|
+
CredentialSourceWireSchema2,
|
|
8
|
+
JournalEntrySchema2,
|
|
9
|
+
SettingOutcomeSchema2
|
|
10
|
+
} from "../chunks/browser-e5xgzd28.js";
|
|
11
|
+
import"../chunks/browser-mnejgne0.js";
|
|
12
|
+
import"../chunks/browser-6e1madxa.js";
|
|
13
|
+
import"../chunks/browser-7gjnxy9m.js";
|
|
14
|
+
import"../chunks/browser-bg1esaw0.js";
|
|
15
|
+
import"../chunks/browser-s7907azt.js";
|
|
16
|
+
import"../chunks/browser-hq5q56sf.js";
|
|
17
|
+
import"../chunks/browser-40enyw9r.js";
|
|
18
|
+
import"../chunks/browser-m0wzr0g8.js";
|
|
19
|
+
import"../chunks/browser-vapnjwp3.js";
|
|
20
|
+
import"../chunks/browser-8t9anqfc.js";
|
|
21
|
+
import"../chunks/browser-sgwxbek9.js";
|
|
22
|
+
import"../chunks/browser-1sfp0bcx.js";
|
|
23
|
+
import"../chunks/browser-4et7qtz3.js";
|
|
24
|
+
import"../chunks/browser-ypez6s7v.js";
|
|
25
|
+
import"../chunks/browser-vzc3r2r3.js";
|
|
26
|
+
export {
|
|
27
|
+
CredentialSourceWireSchema2 as CredentialSourceWireSchema,
|
|
28
|
+
CredentialSourceWireType2 as CredentialSourceWireType,
|
|
29
|
+
HostViewWireSchema2 as HostViewWireSchema,
|
|
30
|
+
HostViewWireType2 as HostViewWireType,
|
|
31
|
+
JournalEntrySchema2 as JournalEntrySchema,
|
|
32
|
+
JournalEntryType2 as JournalEntryType,
|
|
33
|
+
SettingOutcomeSchema2 as SettingOutcomeSchema,
|
|
34
|
+
SettingOutcomeType2 as SettingOutcomeType
|
|
35
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Authority } from "./host.ts";
|
|
2
|
+
import type { Schema } from "./schema.ts";
|
|
3
|
+
export type Declaration<Input, Output> = {
|
|
4
|
+
readonly input: Schema<Input>;
|
|
5
|
+
readonly output: Schema<Output>;
|
|
6
|
+
readonly kind: "query" | "watch" | "command" | "receipt" | "stream";
|
|
7
|
+
readonly authority: Authority;
|
|
8
|
+
readonly scope: "host" | "session" | "workspace";
|
|
9
|
+
readonly capability?: "files" | "git" | "github" | "browser";
|
|
10
|
+
readonly recovery?: "replay" | "never";
|
|
11
|
+
readonly wait?: true;
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../chunks/browser-k20f6cvv.js";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
2
|
+
import type { HostId } from "./ids.ts";
|
|
3
|
+
import type { Decoded, Schema } from "./schema.ts";
|
|
4
|
+
export declare const ValidationIssueType: Type.TObject<{
|
|
5
|
+
severity: Type.TEnum<["error", "warning"]>;
|
|
6
|
+
path: Type.TArray<Type.TUnion<[Type.TString, Type.TNumber]>>;
|
|
7
|
+
message: Type.TString;
|
|
8
|
+
source: Type.TOptional<Type.TObject<{
|
|
9
|
+
plugin: Type.TString;
|
|
10
|
+
file: Type.TOptional<Type.TString>;
|
|
11
|
+
line: Type.TOptional<Type.TNumber>;
|
|
12
|
+
}>>;
|
|
13
|
+
}>;
|
|
14
|
+
export type ValidationIssue = Decoded<typeof ValidationIssueType>;
|
|
15
|
+
export declare const FailureClassType: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
|
|
16
|
+
export type FailureClass = Decoded<typeof FailureClassType>;
|
|
17
|
+
export declare const FailureType: Type.TObject<{
|
|
18
|
+
class: Type.TEnum<["rate_limit", "auth", "quota", "context_window", "overloaded", "network", "aborted", "provider", "runner"]>;
|
|
19
|
+
message: Type.TString;
|
|
20
|
+
retryAfterMs: Type.TOptional<Type.TNumber>;
|
|
21
|
+
}>;
|
|
22
|
+
export type Failure = Decoded<typeof FailureType>;
|
|
23
|
+
export declare const SdkErrorWireType: Type.TObject<{
|
|
24
|
+
code: Type.TEnum<["unauthenticated", "denied", "unknown", "invalid", "stale", "unavailable", "internal"]>;
|
|
25
|
+
message: Type.TString;
|
|
26
|
+
hostId: Type.TUnion<[Type.TUnsafe<import("./ids.ts").Id<"host">>, Type.TNull]>;
|
|
27
|
+
issues: Type.TArray<Type.TObject<{
|
|
28
|
+
severity: Type.TEnum<["error", "warning"]>;
|
|
29
|
+
path: Type.TArray<Type.TUnion<[Type.TString, Type.TNumber]>>;
|
|
30
|
+
message: Type.TString;
|
|
31
|
+
source: Type.TOptional<Type.TObject<{
|
|
32
|
+
plugin: Type.TString;
|
|
33
|
+
file: Type.TOptional<Type.TString>;
|
|
34
|
+
line: Type.TOptional<Type.TNumber>;
|
|
35
|
+
}>>;
|
|
36
|
+
}>>;
|
|
37
|
+
correlation: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
38
|
+
}>;
|
|
39
|
+
export type SdkErrorWire = Decoded<typeof SdkErrorWireType>;
|
|
40
|
+
export type SdkErrorCode = SdkErrorWire["code"];
|
|
41
|
+
/** The error every Nyte API throws: a `code` a client branches on, a message for people, the host it came from, the issues behind an `invalid`, and a correlation id the host logged it under. On the wire it is an `SdkErrorWire`. */
|
|
42
|
+
export declare class SdkError extends Error {
|
|
43
|
+
readonly name = "SdkError";
|
|
44
|
+
readonly code: SdkErrorCode;
|
|
45
|
+
readonly hostId: HostId | null;
|
|
46
|
+
readonly issues: readonly ValidationIssue[];
|
|
47
|
+
readonly correlation: string | null;
|
|
48
|
+
constructor(code: SdkErrorCode, message: string, options?: {
|
|
49
|
+
readonly hostId?: HostId | null;
|
|
50
|
+
readonly issues?: readonly ValidationIssue[];
|
|
51
|
+
readonly correlation?: string | null;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
export declare const ValidationIssueSchema: Schema<ValidationIssue>;
|
|
55
|
+
export declare const FailureSchema: Schema<Failure>;
|
|
56
|
+
export declare const SdkErrorWireSchema: Schema<SdkErrorWire>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ValidationIssueType2,
|
|
3
|
+
FailureClassType2,
|
|
4
|
+
FailureType2,
|
|
5
|
+
SdkErrorWireType2,
|
|
6
|
+
SdkError2,
|
|
7
|
+
ValidationIssueSchema2,
|
|
8
|
+
FailureSchema2,
|
|
9
|
+
SdkErrorWireSchema2
|
|
10
|
+
} from "../chunks/browser-1sfp0bcx.js";
|
|
11
|
+
import"../chunks/browser-4et7qtz3.js";
|
|
12
|
+
import"../chunks/browser-ypez6s7v.js";
|
|
13
|
+
import"../chunks/browser-vzc3r2r3.js";
|
|
14
|
+
export {
|
|
15
|
+
FailureClassType2 as FailureClassType,
|
|
16
|
+
FailureSchema2 as FailureSchema,
|
|
17
|
+
FailureType2 as FailureType,
|
|
18
|
+
SdkError2 as SdkError,
|
|
19
|
+
SdkErrorWireSchema2 as SdkErrorWireSchema,
|
|
20
|
+
SdkErrorWireType2 as SdkErrorWireType,
|
|
21
|
+
ValidationIssueSchema2 as ValidationIssueSchema,
|
|
22
|
+
ValidationIssueType2 as ValidationIssueType
|
|
23
|
+
};
|