@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.
Files changed (148) hide show
  1. package/LICENSE +21 -0
  2. package/THIRD-PARTY-NOTICES.md +800 -0
  3. package/dist/chunks/browser-0byq2fja.js +50 -0
  4. package/dist/chunks/browser-0ebnhqs2.js +36 -0
  5. package/dist/chunks/browser-0g0z3617.js +47 -0
  6. package/dist/chunks/browser-0khex2b1.js +33 -0
  7. package/dist/chunks/browser-1sfp0bcx.js +73 -0
  8. package/dist/chunks/browser-40enyw9r.js +75 -0
  9. package/dist/chunks/browser-48g24pes.js +106 -0
  10. package/dist/chunks/browser-4et7qtz3.js +7 -0
  11. package/dist/chunks/browser-5n1dh580.js +66 -0
  12. package/dist/chunks/browser-5pvw8svn.js +243 -0
  13. package/dist/chunks/browser-6e1madxa.js +83 -0
  14. package/dist/chunks/browser-6yby604e.js +96 -0
  15. package/dist/chunks/browser-7195qf3t.js +14 -0
  16. package/dist/chunks/browser-7gjnxy9m.js +172 -0
  17. package/dist/chunks/browser-8t9anqfc.js +113 -0
  18. package/dist/chunks/browser-9ystjh78.js +0 -0
  19. package/dist/chunks/browser-ad9yebg7.js +101 -0
  20. package/dist/chunks/browser-b519jtez.js +102 -0
  21. package/dist/chunks/browser-bg1esaw0.js +82 -0
  22. package/dist/chunks/browser-bxz3z1v6.js +181 -0
  23. package/dist/chunks/browser-e5xgzd28.js +82 -0
  24. package/dist/chunks/browser-ebr6k189.js +120 -0
  25. package/dist/chunks/browser-ekbecx9r.js +73 -0
  26. package/dist/chunks/browser-fd3accdr.js +159 -0
  27. package/dist/chunks/browser-fth801bw.js +50 -0
  28. package/dist/chunks/browser-g5khdcap.js +170 -0
  29. package/dist/chunks/browser-gchr2880.js +135 -0
  30. package/dist/chunks/browser-h86zs54a.js +65 -0
  31. package/dist/chunks/browser-hq5q56sf.js +79 -0
  32. package/dist/chunks/browser-j629a6wa.js +17 -0
  33. package/dist/chunks/browser-k20f6cvv.js +0 -0
  34. package/dist/chunks/browser-m0wzr0g8.js +5 -0
  35. package/dist/chunks/browser-mnejgne0.js +125 -0
  36. package/dist/chunks/browser-mzfc0v5j.js +58 -0
  37. package/dist/chunks/browser-pdv675va.js +135 -0
  38. package/dist/chunks/browser-pdx38ng3.js +301 -0
  39. package/dist/chunks/browser-qkxe0fwp.js +6 -0
  40. package/dist/chunks/browser-r00v3vwv.js +238 -0
  41. package/dist/chunks/browser-r87w64mz.js +32 -0
  42. package/dist/chunks/browser-s7907azt.js +118 -0
  43. package/dist/chunks/browser-sgwxbek9.js +37 -0
  44. package/dist/chunks/browser-v70eq512.js +215 -0
  45. package/dist/chunks/browser-vapnjwp3.js +35 -0
  46. package/dist/chunks/browser-vkh2tpmf.js +283 -0
  47. package/dist/chunks/browser-vzc3r2r3.js +64 -0
  48. package/dist/chunks/browser-ypez6s7v.js +52 -0
  49. package/dist/src/browser.d.ts +64 -0
  50. package/dist/src/browser.js +26 -0
  51. package/dist/src/configuration.d.ts +26 -0
  52. package/dist/src/configuration.js +17 -0
  53. package/dist/src/connection.d.ts +189 -0
  54. package/dist/src/connection.js +35 -0
  55. package/dist/src/declaration.d.ts +12 -0
  56. package/dist/src/declaration.js +1 -0
  57. package/dist/src/errors.d.ts +56 -0
  58. package/dist/src/errors.js +23 -0
  59. package/dist/src/events.d.ts +1750 -0
  60. package/dist/src/events.js +36 -0
  61. package/dist/src/files.d.ts +130 -0
  62. package/dist/src/files.js +49 -0
  63. package/dist/src/git.d.ts +271 -0
  64. package/dist/src/git.js +64 -0
  65. package/dist/src/github.d.ts +174 -0
  66. package/dist/src/github.js +31 -0
  67. package/dist/src/heads.d.ts +255 -0
  68. package/dist/src/heads.js +48 -0
  69. package/dist/src/hooks.d.ts +201 -0
  70. package/dist/src/hooks.js +28 -0
  71. package/dist/src/host.d.ts +137 -0
  72. package/dist/src/host.js +49 -0
  73. package/dist/src/ids.d.ts +66 -0
  74. package/dist/src/ids.js +67 -0
  75. package/dist/src/index.d.ts +30 -0
  76. package/dist/src/index.js +779 -0
  77. package/dist/src/jobs.d.ts +152 -0
  78. package/dist/src/jobs.js +34 -0
  79. package/dist/src/json.d.ts +24 -0
  80. package/dist/src/json.js +21 -0
  81. package/dist/src/mcp.d.ts +212 -0
  82. package/dist/src/mcp.js +34 -0
  83. package/dist/src/messages.d.ts +114 -0
  84. package/dist/src/messages.js +28 -0
  85. package/dist/src/model/index.d.ts +6 -0
  86. package/dist/src/model/index.js +61 -0
  87. package/dist/src/model/message.d.ts +178 -0
  88. package/dist/src/model/message.js +7 -0
  89. package/dist/src/model/model.d.ts +154 -0
  90. package/dist/src/model/model.js +11 -0
  91. package/dist/src/model/text.d.ts +6 -0
  92. package/dist/src/model/text.js +10 -0
  93. package/dist/src/model/tool.d.ts +36 -0
  94. package/dist/src/model/tool.js +1 -0
  95. package/dist/src/model/transcript.d.ts +34 -0
  96. package/dist/src/model/transcript.js +37 -0
  97. package/dist/src/model/typed.d.ts +6 -0
  98. package/dist/src/model/typed.js +8 -0
  99. package/dist/src/models.d.ts +195 -0
  100. package/dist/src/models.js +45 -0
  101. package/dist/src/parts.d.ts +364 -0
  102. package/dist/src/parts.js +35 -0
  103. package/dist/src/patch.d.ts +21 -0
  104. package/dist/src/patch.js +11 -0
  105. package/dist/src/plugins.d.ts +36 -0
  106. package/dist/src/plugins.js +9 -0
  107. package/dist/src/primitives.d.ts +83 -0
  108. package/dist/src/primitives.js +26 -0
  109. package/dist/src/runs.d.ts +433 -0
  110. package/dist/src/runs.js +39 -0
  111. package/dist/src/schema.d.ts +14 -0
  112. package/dist/src/schema.js +8 -0
  113. package/dist/src/serial.d.ts +18 -0
  114. package/dist/src/serial.js +39 -0
  115. package/dist/src/sessions.d.ts +578 -0
  116. package/dist/src/sessions.js +74 -0
  117. package/dist/src/store.d.ts +831 -0
  118. package/dist/src/store.js +33 -0
  119. package/dist/src/tools.d.ts +76 -0
  120. package/dist/src/tools.js +24 -0
  121. package/dist/src/views.d.ts +2737 -0
  122. package/dist/src/views.js +50 -0
  123. package/dist/src/wire/base64.d.ts +2 -0
  124. package/dist/src/wire/base64.js +6 -0
  125. package/dist/src/wire/nullable.d.ts +2 -0
  126. package/dist/src/wire/nullable.js +6 -0
  127. package/dist/src/wire/operations/browser.d.ts +535 -0
  128. package/dist/src/wire/operations/browser.js +12 -0
  129. package/dist/src/wire/operations/fields.d.ts +54 -0
  130. package/dist/src/wire/operations/fields.js +30 -0
  131. package/dist/src/wire/operations/files.d.ts +244 -0
  132. package/dist/src/wire/operations/files.js +13 -0
  133. package/dist/src/wire/operations/git.d.ts +513 -0
  134. package/dist/src/wire/operations/git.js +15 -0
  135. package/dist/src/wire/operations/github.d.ts +172 -0
  136. package/dist/src/wire/operations/github.js +12 -0
  137. package/dist/src/wire/operations/host.d.ts +1011 -0
  138. package/dist/src/wire/operations/host.js +27 -0
  139. package/dist/src/wire/operations/index.d.ts +6703 -0
  140. package/dist/src/wire/operations/index.js +40 -0
  141. package/dist/src/wire/operations/session.d.ts +3411 -0
  142. package/dist/src/wire/operations/session.js +25 -0
  143. package/dist/src/wire/operations/workspace.d.ts +830 -0
  144. package/dist/src/wire/operations/workspace.js +24 -0
  145. package/dist/src/workspaces.d.ts +119 -0
  146. package/dist/src/workspaces.js +38 -0
  147. package/package.json +51 -3
  148. package/README.md +0 -3
@@ -0,0 +1,50 @@
1
+ import {
2
+ standard2
3
+ } from "./browser-vzc3r2r3.js";
4
+ import {
5
+ idSchema2
6
+ } from "./browser-ypez6s7v.js";
7
+ import {
8
+ withJson2
9
+ } from "./browser-sgwxbek9.js";
10
+ import {
11
+ nullable2
12
+ } from "./browser-4et7qtz3.js";
13
+
14
+ // src/primitives.ts
15
+ import { Type } from "typebox";
16
+ function pagedSchema2(item) {
17
+ return standard2(withJson2(Type.Object({ items: Type.Array(item), next: nullable2(idSchema2()) })));
18
+ }
19
+ var ParentFilterType2 = Type.Union([
20
+ Type.Object({ kind: Type.Literal("all") }),
21
+ Type.Object({ kind: Type.Literal("roots") }),
22
+ Type.Object({ kind: Type.Literal("children"), session: idSchema2() })
23
+ ]);
24
+ var CapabilityWireType2 = Type.Union([
25
+ Type.Object({ kind: Type.Literal("available") }),
26
+ Type.Object({ kind: Type.Literal("unsupported"), reason: Type.String() }),
27
+ Type.Object({ kind: Type.Literal("denied"), reason: Type.String() }),
28
+ Type.Object({
29
+ kind: Type.Literal("unavailable"),
30
+ retry: Type.Enum(["allowed", "manual"]),
31
+ reason: Type.String()
32
+ })
33
+ ]);
34
+ var IdentityChallengeType2 = Type.Object({
35
+ hostId: idSchema2(),
36
+ nonce: Type.String(),
37
+ signature: Type.String(),
38
+ publicKey: Type.String()
39
+ });
40
+ var HostDescriptionType2 = Type.Object({
41
+ name: Type.String(),
42
+ platform: Type.String(),
43
+ version: Type.String()
44
+ });
45
+ var ParentFilterSchema2 = standard2(ParentFilterType2);
46
+ var CapabilityWireSchema2 = standard2(CapabilityWireType2);
47
+ var IdentityChallengeSchema2 = standard2(IdentityChallengeType2);
48
+ var HostDescriptionSchema2 = standard2(HostDescriptionType2);
49
+
50
+ export { pagedSchema2, ParentFilterType2, CapabilityWireType2, IdentityChallengeType2, HostDescriptionType2, ParentFilterSchema2, CapabilityWireSchema2, IdentityChallengeSchema2, HostDescriptionSchema2 };
@@ -0,0 +1,36 @@
1
+ import {
2
+ BROWSER_OPERATIONS2
3
+ } from "./browser-fd3accdr.js";
4
+ import {
5
+ FILE_OPERATIONS2
6
+ } from "./browser-pdv675va.js";
7
+ import {
8
+ GIT_OPERATIONS2
9
+ } from "./browser-48g24pes.js";
10
+ import {
11
+ GITHUB_OPERATIONS2
12
+ } from "./browser-0g0z3617.js";
13
+ import {
14
+ HOST_OPERATIONS2,
15
+ MAINTENANCE_OPERATIONS2
16
+ } from "./browser-vkh2tpmf.js";
17
+ import {
18
+ SESSION_OPERATIONS2
19
+ } from "./browser-pdx38ng3.js";
20
+ import {
21
+ WORKSPACE_OPERATIONS2
22
+ } from "./browser-5pvw8svn.js";
23
+
24
+ // src/wire/operations/index.ts
25
+ var OPERATIONS2 = {
26
+ ...HOST_OPERATIONS2,
27
+ ...SESSION_OPERATIONS2,
28
+ ...WORKSPACE_OPERATIONS2,
29
+ ...FILE_OPERATIONS2,
30
+ ...GIT_OPERATIONS2,
31
+ ...GITHUB_OPERATIONS2,
32
+ ...BROWSER_OPERATIONS2,
33
+ ...MAINTENANCE_OPERATIONS2
34
+ };
35
+
36
+ export { OPERATIONS2 };
@@ -0,0 +1,47 @@
1
+ import {
2
+ GitHubPullRequestInputType2,
3
+ GitHubStateSchema2,
4
+ GitHubAccountStateSchema2,
5
+ GitHubPullRequestOutcomeSchema2
6
+ } from "./browser-ekbecx9r.js";
7
+ import {
8
+ wireObject2,
9
+ WORKSPACE2,
10
+ ON_WORKSPACE2
11
+ } from "./browser-r87w64mz.js";
12
+
13
+ // src/wire/operations/github.ts
14
+ var READ = { authority: "participant", scope: "workspace", capability: "github" };
15
+ var WRITE = { authority: "owner", scope: "workspace", capability: "github" };
16
+ var ACCOUNT = { authority: "participant", scope: "host" };
17
+ var ACCOUNT_WRITE = { authority: "owner", scope: "host" };
18
+ var NO_INPUT = wireObject2({});
19
+ var GITHUB_OPERATIONS2 = {
20
+ "github.account": {
21
+ ...ACCOUNT,
22
+ kind: "query",
23
+ input: NO_INPUT,
24
+ output: GitHubAccountStateSchema2
25
+ },
26
+ "github.signIn": {
27
+ ...ACCOUNT_WRITE,
28
+ kind: "command",
29
+ input: NO_INPUT,
30
+ output: GitHubAccountStateSchema2
31
+ },
32
+ "github.signOut": {
33
+ ...ACCOUNT_WRITE,
34
+ kind: "command",
35
+ input: NO_INPUT,
36
+ output: GitHubAccountStateSchema2
37
+ },
38
+ "github.state": { ...READ, kind: "query", input: ON_WORKSPACE2, output: GitHubStateSchema2 },
39
+ "github.createPullRequest": {
40
+ ...WRITE,
41
+ kind: "command",
42
+ input: wireObject2({ ...WORKSPACE2, input: GitHubPullRequestInputType2 }),
43
+ output: GitHubPullRequestOutcomeSchema2
44
+ }
45
+ };
46
+
47
+ export { GITHUB_OPERATIONS2 };
@@ -0,0 +1,33 @@
1
+ // src/model/text.ts
2
+ function contentText2(content, separator = `
3
+ `) {
4
+ if (typeof content === "string")
5
+ return content;
6
+ return content.filter((block) => block.type === "text").map((block) => block.text).join(separator);
7
+ }
8
+ function getSystemMessageText2(message) {
9
+ const parts = [contentText2(message.content)];
10
+ for (const text of Object.values(message.sections ?? {})) {
11
+ if (text !== null)
12
+ parts.push(text);
13
+ }
14
+ return parts.filter((part) => part.length > 0).join(`
15
+
16
+ `);
17
+ }
18
+ function renderSystemMessageUpdate2(message) {
19
+ const parts = [];
20
+ const text = contentText2(message.content);
21
+ if (text.length > 0)
22
+ parts.push(text);
23
+ for (const [name, value] of Object.entries(message.sections ?? {})) {
24
+ parts.push(value === null ? `Removed system prompt section "${name}".` : `Updated system prompt section "${name}":
25
+
26
+ ${value}`);
27
+ }
28
+ return parts.join(`
29
+
30
+ `);
31
+ }
32
+
33
+ export { contentText2, getSystemMessageText2, renderSystemMessageUpdate2 };
@@ -0,0 +1,73 @@
1
+ import {
2
+ standard2
3
+ } from "./browser-vzc3r2r3.js";
4
+ import {
5
+ idSchema2
6
+ } from "./browser-ypez6s7v.js";
7
+ import {
8
+ nullable2
9
+ } from "./browser-4et7qtz3.js";
10
+
11
+ // src/errors.ts
12
+ import { Type } from "typebox";
13
+ var ValidationIssueType2 = Type.Object({
14
+ severity: Type.Enum(["error", "warning"]),
15
+ path: Type.Array(Type.Union([Type.String(), Type.Number()])),
16
+ message: Type.String(),
17
+ source: Type.Optional(Type.Object({
18
+ plugin: Type.String(),
19
+ file: Type.Optional(Type.String()),
20
+ line: Type.Optional(Type.Number())
21
+ }))
22
+ });
23
+ var FailureClassType2 = Type.Enum([
24
+ "rate_limit",
25
+ "auth",
26
+ "quota",
27
+ "context_window",
28
+ "overloaded",
29
+ "network",
30
+ "aborted",
31
+ "provider",
32
+ "runner"
33
+ ]);
34
+ var FailureType2 = Type.Object({
35
+ class: FailureClassType2,
36
+ message: Type.String(),
37
+ retryAfterMs: Type.Optional(Type.Number())
38
+ });
39
+ var SdkErrorWireType2 = Type.Object({
40
+ code: Type.Enum([
41
+ "unauthenticated",
42
+ "denied",
43
+ "unknown",
44
+ "invalid",
45
+ "stale",
46
+ "unavailable",
47
+ "internal"
48
+ ]),
49
+ message: Type.String(),
50
+ hostId: nullable2(idSchema2()),
51
+ issues: Type.Array(ValidationIssueType2),
52
+ correlation: nullable2(Type.String())
53
+ });
54
+
55
+ class SdkError2 extends Error {
56
+ name = "SdkError";
57
+ code;
58
+ hostId;
59
+ issues;
60
+ correlation;
61
+ constructor(code, message, options) {
62
+ super(message);
63
+ this.code = code;
64
+ this.hostId = options?.hostId ?? null;
65
+ this.issues = options?.issues ?? [];
66
+ this.correlation = options?.correlation ?? null;
67
+ }
68
+ }
69
+ var ValidationIssueSchema2 = standard2(ValidationIssueType2);
70
+ var FailureSchema2 = standard2(FailureType2);
71
+ var SdkErrorWireSchema2 = standard2(SdkErrorWireType2);
72
+
73
+ export { ValidationIssueType2, FailureClassType2, FailureType2, SdkErrorWireType2, SdkError2, ValidationIssueSchema2, FailureSchema2, SdkErrorWireSchema2 };
@@ -0,0 +1,75 @@
1
+ import {
2
+ standard2
3
+ } from "./browser-vzc3r2r3.js";
4
+ import {
5
+ idSchema2
6
+ } from "./browser-ypez6s7v.js";
7
+ import {
8
+ base64Bytes2
9
+ } from "./browser-m0wzr0g8.js";
10
+ import {
11
+ nullable2
12
+ } from "./browser-4et7qtz3.js";
13
+
14
+ // src/jobs.ts
15
+ import { Type } from "typebox";
16
+ var EndReasonType2 = Type.Enum(["exited", "terminated", "expired", "host-lost"]);
17
+ var JobEndType2 = Type.Union([
18
+ Type.Object({
19
+ kind: Type.Literal("exited"),
20
+ code: nullable2(Type.Number()),
21
+ reason: EndReasonType2
22
+ }),
23
+ Type.Object({ kind: Type.Literal("lost") })
24
+ ]);
25
+ var JobStateType2 = Type.Union([
26
+ Type.Object({ kind: Type.Literal("running") }),
27
+ JobEndType2
28
+ ]);
29
+ var JobViewType2 = Type.Object({
30
+ id: idSchema2(),
31
+ command: Type.String(),
32
+ title: Type.String(),
33
+ session: nullable2(idSchema2()),
34
+ pty: nullable2(Type.Object({ columns: Type.Number(), rows: Type.Number(), shell: Type.String() })),
35
+ state: JobStateType2,
36
+ startedAt: Type.Number(),
37
+ endedAt: nullable2(Type.Number()),
38
+ tail: Type.String()
39
+ });
40
+ var JobMovedType = Type.Object({ kind: Type.Literal("job"), job: JobViewType2 });
41
+ var JobForgottenType = Type.Object({ kind: Type.Literal("forgotten"), id: idSchema2() });
42
+ var JobChangeType2 = Type.Union([JobMovedType, JobForgottenType]);
43
+ var JobsChangeType2 = Type.Union([
44
+ Type.Object({ kind: Type.Literal("jobs"), jobs: Type.Array(JobViewType2) }),
45
+ JobMovedType,
46
+ JobForgottenType
47
+ ]);
48
+ function foldJobChange2(jobs, change) {
49
+ switch (change.kind) {
50
+ case "jobs":
51
+ return change.jobs;
52
+ case "forgotten":
53
+ return jobs.filter((job) => job.id !== change.id);
54
+ case "job": {
55
+ const moved = change.job;
56
+ return jobs.some((job) => job.id === moved.id) ? jobs.map((job) => job.id === moved.id ? moved : job) : [...jobs, moved];
57
+ }
58
+ }
59
+ }
60
+ var OutputFrameType2 = Type.Union([
61
+ Type.Object({
62
+ kind: Type.Literal("bytes"),
63
+ data: base64Bytes2,
64
+ stream: Type.Optional(Type.Literal("stderr"))
65
+ }),
66
+ Type.Object({ kind: Type.Literal("gap") }),
67
+ Type.Object({ kind: Type.Literal("exit"), code: nullable2(Type.Number()) })
68
+ ]);
69
+ var EndReasonSchema2 = standard2(EndReasonType2);
70
+ var JobEndSchema2 = standard2(JobEndType2);
71
+ var JobStateSchema2 = standard2(JobStateType2);
72
+ var JobViewSchema2 = standard2(JobViewType2);
73
+ var OutputFrameSchema2 = standard2(OutputFrameType2);
74
+
75
+ export { EndReasonType2, JobEndType2, JobStateType2, JobViewType2, JobChangeType2, JobsChangeType2, foldJobChange2, OutputFrameType2, EndReasonSchema2, JobEndSchema2, JobStateSchema2, JobViewSchema2, OutputFrameSchema2 };
@@ -0,0 +1,106 @@
1
+ import {
2
+ idSchema2
3
+ } from "./browser-ypez6s7v.js";
4
+ import {
5
+ GitCommitViewType2,
6
+ GitScopeType2,
7
+ DiffOptionsType2,
8
+ GitWriteType2,
9
+ GitStatusSchema2,
10
+ GitRefsViewSchema2,
11
+ GitFileSidesSchema2,
12
+ BlameViewSchema2,
13
+ ChangeSetSchema2,
14
+ PatchSetWireSchema2,
15
+ GitOutcomeSchema2
16
+ } from "./browser-gchr2880.js";
17
+ import {
18
+ pagedSchema2
19
+ } from "./browser-0byq2fja.js";
20
+ import {
21
+ wireObject2,
22
+ WORKSPACE2,
23
+ PATH2,
24
+ ON_WORKSPACE2,
25
+ ON_PATH2
26
+ } from "./browser-r87w64mz.js";
27
+
28
+ // src/wire/operations/git.ts
29
+ import { Type } from "typebox";
30
+ var READ = { authority: "participant", scope: "workspace", capability: "git" };
31
+ var WRITE = { authority: "owner", scope: "workspace", capability: "git" };
32
+ var GIT_COMPARE = { ...WORKSPACE2, scope: GitScopeType2, options: Type.Optional(DiffOptionsType2) };
33
+ var GIT_PATHS_INPUT = wireObject2({
34
+ ...WORKSPACE2,
35
+ paths: Type.Array(Type.String()),
36
+ options: Type.Optional(GitWriteType2)
37
+ });
38
+ var GIT_COMPARE_INPUT = wireObject2(GIT_COMPARE);
39
+ var GIT_OPERATIONS2 = {
40
+ "git.status": { ...READ, kind: "query", input: ON_WORKSPACE2, output: GitStatusSchema2 },
41
+ "git.watch": { ...READ, kind: "watch", input: ON_WORKSPACE2, output: GitStatusSchema2 },
42
+ "git.changes": { ...READ, kind: "query", input: GIT_COMPARE_INPUT, output: ChangeSetSchema2 },
43
+ "git.watchChanges": { ...READ, kind: "watch", input: GIT_COMPARE_INPUT, output: ChangeSetSchema2 },
44
+ "git.patches": {
45
+ ...READ,
46
+ kind: "stream",
47
+ input: wireObject2({ ...GIT_COMPARE, paths: Type.Array(Type.String()) }),
48
+ output: PatchSetWireSchema2
49
+ },
50
+ "git.contents": {
51
+ ...READ,
52
+ kind: "query",
53
+ input: wireObject2({ ...PATH2, scope: GitScopeType2 }),
54
+ output: GitFileSidesSchema2
55
+ },
56
+ "git.log": {
57
+ ...READ,
58
+ kind: "query",
59
+ input: wireObject2({
60
+ ...WORKSPACE2,
61
+ cursor: Type.Optional(idSchema2()),
62
+ limit: Type.Optional(Type.Number())
63
+ }),
64
+ output: pagedSchema2(GitCommitViewType2)
65
+ },
66
+ "git.refs": { ...READ, kind: "query", input: ON_WORKSPACE2, output: GitRefsViewSchema2 },
67
+ "git.blame": { ...READ, kind: "query", input: ON_PATH2, output: BlameViewSchema2 },
68
+ "git.stage": { ...WRITE, kind: "command", input: GIT_PATHS_INPUT, output: GitOutcomeSchema2 },
69
+ "git.unstage": { ...WRITE, kind: "command", input: GIT_PATHS_INPUT, output: GitOutcomeSchema2 },
70
+ "git.discard": { ...WRITE, kind: "command", input: GIT_PATHS_INPUT, output: GitOutcomeSchema2 },
71
+ "git.commit": {
72
+ ...WRITE,
73
+ kind: "command",
74
+ input: wireObject2({
75
+ ...WORKSPACE2,
76
+ input: Type.Object({
77
+ message: Type.String(),
78
+ files: Type.Union([Type.Literal("staged"), Type.Literal("all"), Type.Array(Type.String())])
79
+ }),
80
+ options: Type.Optional(GitWriteType2)
81
+ }),
82
+ output: GitOutcomeSchema2
83
+ },
84
+ "git.branch": {
85
+ ...WRITE,
86
+ kind: "command",
87
+ input: wireObject2({
88
+ ...WORKSPACE2,
89
+ input: Type.Object({ name: Type.String(), checkout: Type.Boolean() }),
90
+ options: Type.Optional(GitWriteType2)
91
+ }),
92
+ output: GitOutcomeSchema2
93
+ },
94
+ "git.push": {
95
+ ...WRITE,
96
+ kind: "command",
97
+ input: wireObject2({
98
+ ...WORKSPACE2,
99
+ input: Type.Optional(Type.Object({ setUpstream: Type.Optional(Type.Boolean()) })),
100
+ options: Type.Optional(GitWriteType2)
101
+ }),
102
+ output: GitOutcomeSchema2
103
+ }
104
+ };
105
+
106
+ export { GIT_OPERATIONS2 };
@@ -0,0 +1,7 @@
1
+ // src/wire/nullable.ts
2
+ import { Type } from "typebox";
3
+ function nullable2(schema) {
4
+ return Type.Union([schema, Type.Null()]);
5
+ }
6
+
7
+ export { nullable2 };
@@ -0,0 +1,66 @@
1
+ import {
2
+ standard2
3
+ } from "./browser-vzc3r2r3.js";
4
+ import {
5
+ JsonType2,
6
+ withJson2
7
+ } from "./browser-sgwxbek9.js";
8
+ import {
9
+ idSchema2
10
+ } from "./browser-ypez6s7v.js";
11
+ import {
12
+ nullable2
13
+ } from "./browser-4et7qtz3.js";
14
+ import {
15
+ ModelRefType2,
16
+ ThinkingType2
17
+ } from "./browser-8t9anqfc.js";
18
+ import {
19
+ ConfigurationPatchType2,
20
+ ConfigurationType2
21
+ } from "./browser-vapnjwp3.js";
22
+ import {
23
+ DeliveryType2,
24
+ UserContentType2,
25
+ MessageSourceType2
26
+ } from "./browser-hq5q56sf.js";
27
+ import {
28
+ ToolClassType2
29
+ } from "./browser-h86zs54a.js";
30
+
31
+ // src/hooks.ts
32
+ import { Type } from "typebox";
33
+ var SubmissionType2 = Type.Object({
34
+ content: UserContentType2,
35
+ source: MessageSourceType2,
36
+ delivery: DeliveryType2,
37
+ configuration: nullable2(Type.Union([ConfigurationType2, ConfigurationPatchType2])),
38
+ replace: nullable2(idSchema2())
39
+ });
40
+ var ModelRequestType2 = Type.Object({
41
+ model: ModelRefType2,
42
+ thinking: ThinkingType2,
43
+ step: Type.Enum(["assistant", "compaction", "summary"]),
44
+ attempt: Type.Number(),
45
+ options: Type.Object({
46
+ sampling: Type.Record(Type.String(), JsonType2),
47
+ headers: Type.Record(Type.String(), Type.String())
48
+ })
49
+ });
50
+ var ToolCallType2 = Type.Object({
51
+ call: idSchema2(),
52
+ name: Type.String(),
53
+ args: JsonType2,
54
+ class: ToolClassType2
55
+ });
56
+ var SubmitDraftType2 = Type.Object({
57
+ content: UserContentType2,
58
+ delivery: DeliveryType2,
59
+ session: nullable2(idSchema2())
60
+ });
61
+ var SubmissionSchema2 = standard2(withJson2(SubmissionType2));
62
+ var ModelRequestSchema2 = standard2(withJson2(ModelRequestType2));
63
+ var ToolCallSchema2 = standard2(withJson2(ToolCallType2));
64
+ var SubmitDraftSchema2 = standard2(SubmitDraftType2);
65
+
66
+ export { SubmissionType2, ModelRequestType2, ToolCallType2, SubmitDraftType2, SubmissionSchema2, ModelRequestSchema2, ToolCallSchema2, SubmitDraftSchema2 };