@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,113 @@
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/models.ts
12
+ import { Type } from "typebox";
13
+ var ModelRefType2 = Type.Object({ provider: Type.String(), id: Type.String() });
14
+ var ThinkingType2 = Type.Enum(["off", "minimal", "low", "medium", "high", "xhigh", "max"]);
15
+ var UsageType2 = Type.Object({
16
+ input: Type.Number(),
17
+ output: Type.Number(),
18
+ cacheRead: Type.Number(),
19
+ cacheWrite: Type.Number(),
20
+ reasoning: nullable2(Type.Number()),
21
+ total: Type.Number(),
22
+ cost: Type.Object({
23
+ input: Type.Number(),
24
+ output: Type.Number(),
25
+ cacheRead: Type.Number(),
26
+ cacheWrite: Type.Number(),
27
+ total: Type.Number()
28
+ })
29
+ });
30
+ var ContextViewType2 = Type.Object({
31
+ tokens: Type.Number(),
32
+ window: Type.Number(),
33
+ lastRequest: nullable2(UsageType2)
34
+ });
35
+ var LoginMethodType2 = Type.Union([
36
+ Type.Object({ kind: Type.Literal("oauth") }),
37
+ Type.Object({ kind: Type.Literal("key") })
38
+ ]);
39
+ var PROVIDER_LIMITS = Type.Array(Type.Object({
40
+ label: Type.String(),
41
+ used: Type.Number(),
42
+ limit: Type.Number(),
43
+ resetsAt: nullable2(Type.Number())
44
+ }));
45
+ var ModelAccountType2 = Type.Object({
46
+ provider: Type.String(),
47
+ id: Type.String(),
48
+ label: Type.String(),
49
+ method: LoginMethodType2,
50
+ active: Type.Boolean()
51
+ });
52
+ var ProviderUsageType2 = Type.Object({
53
+ provider: Type.String(),
54
+ name: Type.String(),
55
+ account: nullable2(ModelAccountType2),
56
+ state: Type.Union([
57
+ Type.Object({
58
+ kind: Type.Literal("ready"),
59
+ limits: PROVIDER_LIMITS,
60
+ observedAt: Type.Number(),
61
+ stale: Type.Boolean(),
62
+ error: nullable2(Type.String())
63
+ }),
64
+ Type.Object({
65
+ kind: Type.Literal("unavailable"),
66
+ reason: Type.Enum(["unsupported", "unconfigured", "failed"]),
67
+ message: Type.String()
68
+ })
69
+ ])
70
+ });
71
+ var ModelCapabilitiesType2 = Type.Object({ steer: Type.Boolean() });
72
+ var ModelInfoType2 = Type.Object({
73
+ ref: ModelRefType2,
74
+ name: Type.String(),
75
+ reasoning: Type.Boolean(),
76
+ thinking: Type.Array(ThinkingType2),
77
+ defaultThinking: ThinkingType2,
78
+ fast: nullable2(ModelRefType2),
79
+ contextWindow: Type.Number(),
80
+ compactAt: Type.Number(),
81
+ maxOutput: Type.Number(),
82
+ input: Type.Array(Type.Enum(["text", "image"])),
83
+ capabilities: ModelCapabilitiesType2,
84
+ cost: Type.Object({
85
+ input: Type.Number(),
86
+ output: Type.Number(),
87
+ cacheRead: Type.Number(),
88
+ cacheWrite: Type.Number()
89
+ })
90
+ });
91
+ var ModelCatalogViewType2 = Type.Object({
92
+ generation: idSchema2(),
93
+ default: nullable2(ModelRefType2),
94
+ providers: Type.Array(Type.Object({
95
+ id: Type.String(),
96
+ name: Type.String(),
97
+ credential: Type.Enum(["unknown", "missing", "configured", "verified", "failed"]),
98
+ methods: Type.Array(LoginMethodType2),
99
+ limits: PROVIDER_LIMITS,
100
+ models: Type.Array(ModelInfoType2)
101
+ }))
102
+ });
103
+ var ModelRefSchema2 = standard2(ModelRefType2);
104
+ var ThinkingSchema2 = standard2(ThinkingType2);
105
+ var UsageSchema2 = standard2(UsageType2);
106
+ var ContextViewSchema2 = standard2(ContextViewType2);
107
+ var LoginMethodSchema2 = standard2(LoginMethodType2);
108
+ var ModelAccountSchema2 = standard2(ModelAccountType2);
109
+ var ProviderUsageSchema2 = standard2(ProviderUsageType2);
110
+ var ModelInfoSchema2 = standard2(ModelInfoType2);
111
+ var ModelCatalogViewSchema2 = standard2(ModelCatalogViewType2);
112
+
113
+ export { ModelRefType2, ThinkingType2, UsageType2, ContextViewType2, LoginMethodType2, ModelAccountType2, ProviderUsageType2, ModelCapabilitiesType2, ModelInfoType2, ModelCatalogViewType2, ModelRefSchema2, ThinkingSchema2, UsageSchema2, ContextViewSchema2, LoginMethodSchema2, ModelAccountSchema2, ProviderUsageSchema2, ModelInfoSchema2, ModelCatalogViewSchema2 };
File without changes
@@ -0,0 +1,101 @@
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
+ import {
11
+ FailureType2
12
+ } from "./browser-1sfp0bcx.js";
13
+ import {
14
+ JsonType2,
15
+ withJson2
16
+ } from "./browser-sgwxbek9.js";
17
+ import {
18
+ WaitTargetType2
19
+ } from "./browser-s7907azt.js";
20
+ import {
21
+ ToolClassType2,
22
+ ToolOutcomeType2,
23
+ ToolProgressType2
24
+ } from "./browser-h86zs54a.js";
25
+
26
+ // src/parts.ts
27
+ import { Type } from "typebox";
28
+ var SignatureType2 = nullable2(JsonType2);
29
+ var PlacementType2 = Type.Union([
30
+ Type.Object({ kind: Type.Literal("transcript"), role: Type.Enum(["step", "answer", "note"]) }),
31
+ Type.Object({ kind: Type.Literal("modal") }),
32
+ Type.Intersect([Type.Object({ kind: Type.String() }), Type.Record(Type.String(), JsonType2)])
33
+ ]);
34
+ var PartStatusType2 = Type.Union([
35
+ Type.Object({
36
+ kind: Type.Literal("live"),
37
+ run: nullable2(idSchema2()),
38
+ waiting: Type.Optional(idSchema2()),
39
+ answer: Type.Optional(Type.Object({ action: Type.String(), input: JsonType2 }))
40
+ }),
41
+ Type.Object({ kind: Type.Literal("waiting"), run: idSchema2(), on: WaitTargetType2 }),
42
+ Type.Object({
43
+ kind: Type.Literal("settled"),
44
+ commit: idSchema2(),
45
+ endedAt: Type.Number()
46
+ }),
47
+ Type.Object({
48
+ kind: Type.Literal("failed"),
49
+ run: nullable2(idSchema2()),
50
+ failure: FailureType2
51
+ })
52
+ ]);
53
+ var PartViewType2 = Type.Object({
54
+ id: idSchema2(),
55
+ partKind: Type.String(),
56
+ placement: PlacementType2,
57
+ state: JsonType2,
58
+ version: Type.Number(),
59
+ status: PartStatusType2,
60
+ owner: nullable2(Type.String())
61
+ });
62
+ var TOOL_CALL = {
63
+ call: idSchema2(),
64
+ name: Type.String(),
65
+ args: JsonType2,
66
+ class: ToolClassType2
67
+ };
68
+ var ToolPartStateType2 = Type.Union([
69
+ Type.Object({ ...TOOL_CALL, phase: Type.Literal("calling") }),
70
+ Type.Object({
71
+ ...TOOL_CALL,
72
+ phase: Type.Literal("running"),
73
+ progress: nullable2(ToolProgressType2)
74
+ }),
75
+ Type.Object({
76
+ ...TOOL_CALL,
77
+ phase: Type.Literal("settled"),
78
+ outcome: ToolOutcomeType2,
79
+ changes: nullable2(Type.Object({
80
+ added: Type.Number(),
81
+ removed: Type.Number(),
82
+ paths: Type.Array(Type.String())
83
+ }))
84
+ })
85
+ ]);
86
+ function actOutcomeSchema2(output) {
87
+ return standard2(withJson2(Type.Union([
88
+ Type.Object({ kind: Type.Literal("ok"), output }),
89
+ Type.Object({ kind: Type.Literal("rejected"), reason: Type.String() }),
90
+ Type.Object({ kind: Type.Literal("unknown-action") }),
91
+ Type.Object({ kind: Type.Literal("closed") }),
92
+ Type.Object({ kind: Type.Literal("no-owner") }),
93
+ Type.Object({ kind: Type.Literal("failed"), message: Type.String() })
94
+ ])));
95
+ }
96
+ var PlacementSchema2 = standard2(withJson2(PlacementType2));
97
+ var PartStatusSchema2 = standard2(withJson2(PartStatusType2));
98
+ var PartViewSchema2 = standard2(withJson2(PartViewType2));
99
+ var ToolPartStateSchema2 = standard2(withJson2(ToolPartStateType2));
100
+
101
+ export { SignatureType2, PlacementType2, PartStatusType2, PartViewType2, ToolPartStateType2, actOutcomeSchema2, PlacementSchema2, PartStatusSchema2, PartViewSchema2, ToolPartStateSchema2 };
@@ -0,0 +1,102 @@
1
+ import {
2
+ standard2
3
+ } from "./browser-vzc3r2r3.js";
4
+ import {
5
+ nullable2
6
+ } from "./browser-4et7qtz3.js";
7
+ import {
8
+ ValidationIssueType2
9
+ } from "./browser-1sfp0bcx.js";
10
+
11
+ // src/mcp.ts
12
+ import { Type } from "typebox";
13
+ var McpExposureType2 = Type.Enum(["model", "deferred", "code", "hidden"]);
14
+ var McpScopeType2 = Type.Enum(["user", "project"]);
15
+ var McpToolViewType2 = Type.Object({
16
+ name: Type.String(),
17
+ description: Type.String(),
18
+ exposure: McpExposureType2
19
+ });
20
+ var McpServerStateType2 = Type.Union([
21
+ Type.Object({ kind: Type.Literal("disabled") }),
22
+ Type.Object({ kind: Type.Literal("connecting") }),
23
+ Type.Object({ kind: Type.Literal("connected"), tools: Type.Array(McpToolViewType2) }),
24
+ Type.Object({ kind: Type.Literal("needs-sign-in") }),
25
+ Type.Object({
26
+ kind: Type.Literal("failed"),
27
+ message: Type.String(),
28
+ stderr: nullable2(Type.String())
29
+ })
30
+ ]);
31
+ var McpServerViewType2 = Type.Object({
32
+ name: Type.String(),
33
+ scope: McpScopeType2,
34
+ path: Type.String(),
35
+ override: nullable2(Type.String()),
36
+ transport: Type.Union([
37
+ Type.Object({
38
+ kind: Type.Literal("stdio"),
39
+ command: Type.String(),
40
+ args: Type.Array(Type.String())
41
+ }),
42
+ Type.Object({ kind: Type.Literal("http"), url: Type.String() })
43
+ ]),
44
+ exposure: McpExposureType2,
45
+ description: nullable2(Type.String()),
46
+ state: McpServerStateType2
47
+ });
48
+ var McpViewType2 = Type.Object({
49
+ servers: Type.Array(McpServerViewType2),
50
+ issues: Type.Array(ValidationIssueType2)
51
+ });
52
+ var McpExposureNameType2 = Type.Enum([
53
+ "direct",
54
+ "deferred",
55
+ "codemode",
56
+ "codemode-deferred",
57
+ "hidden"
58
+ ]);
59
+ var McpOAuthConfigType2 = Type.Object({
60
+ clientId: Type.Optional(Type.String()),
61
+ clientSecret: Type.Optional(Type.String()),
62
+ callbackPort: Type.Optional(Type.Integer({ minimum: 1, maximum: 65535 })),
63
+ callbackUrl: Type.Optional(Type.String()),
64
+ clientName: Type.Optional(Type.String()),
65
+ scope: Type.Optional(Type.String()),
66
+ authServerMetadataUrl: Type.Optional(Type.String())
67
+ });
68
+ var StringMap = Type.Record(Type.String(), Type.String());
69
+ var OPTIONS = {
70
+ enabled: Type.Optional(Type.Boolean()),
71
+ timeout: Type.Optional(Type.Number({ exclusiveMinimum: 0 })),
72
+ description: Type.Optional(Type.String()),
73
+ exposure: Type.Optional(McpExposureNameType2),
74
+ toolExposure: Type.Optional(Type.Record(Type.String(), McpExposureNameType2))
75
+ };
76
+ var McpServerConfigType2 = Type.Union([
77
+ Type.Object({
78
+ ...OPTIONS,
79
+ type: Type.Optional(Type.Literal("stdio")),
80
+ command: Type.String({ minLength: 1 }),
81
+ args: Type.Optional(Type.Array(Type.String())),
82
+ env: Type.Optional(StringMap),
83
+ cwd: Type.Optional(Type.String())
84
+ }),
85
+ Type.Object({
86
+ ...OPTIONS,
87
+ type: Type.Optional(Type.Enum(["http", "streamable-http"])),
88
+ url: Type.String({ minLength: 1 }),
89
+ headers: Type.Optional(StringMap),
90
+ oauth: Type.Optional(McpOAuthConfigType2)
91
+ })
92
+ ]);
93
+ var McpChangeType2 = Type.Union([
94
+ Type.Object({ kind: Type.Literal("updated") }),
95
+ Type.Object({ kind: Type.Literal("missing") }),
96
+ Type.Object({ kind: Type.Literal("invalid"), message: Type.String() })
97
+ ]);
98
+ var McpViewSchema2 = standard2(McpViewType2);
99
+ var McpServerConfigSchema2 = standard2(McpServerConfigType2);
100
+ var McpChangeSchema2 = standard2(McpChangeType2);
101
+
102
+ export { McpExposureType2, McpScopeType2, McpToolViewType2, McpServerStateType2, McpServerViewType2, McpViewType2, McpExposureNameType2, McpOAuthConfigType2, McpServerConfigType2, McpChangeType2, McpViewSchema2, McpServerConfigSchema2, McpChangeSchema2 };
@@ -0,0 +1,82 @@
1
+ import {
2
+ standard2
3
+ } from "./browser-vzc3r2r3.js";
4
+ import {
5
+ idSchema2
6
+ } from "./browser-ypez6s7v.js";
7
+ import {
8
+ JsonType2,
9
+ withJson2
10
+ } from "./browser-sgwxbek9.js";
11
+ import {
12
+ nullable2
13
+ } from "./browser-4et7qtz3.js";
14
+
15
+ // src/workspaces.ts
16
+ import { Type } from "typebox";
17
+ var UNAVAILABLE_REASON = Type.Enum(["unsupported", "unreachable"]);
18
+ var AvailabilityType2 = Type.Union([
19
+ Type.Object({ kind: Type.Literal("available") }),
20
+ Type.Object({ kind: Type.Literal("unavailable"), reason: UNAVAILABLE_REASON })
21
+ ]);
22
+ var WorkspaceTargetType2 = Type.Union([
23
+ Type.Object({ kind: Type.Literal("local"), path: Type.String() }),
24
+ Type.Object({ kind: Type.String(), locator: JsonType2 })
25
+ ]);
26
+ var ActivationType2 = Type.Union([
27
+ Type.Object({ kind: Type.Literal("active") }),
28
+ Type.Object({ kind: Type.Literal("inactive") }),
29
+ Type.Object({
30
+ kind: Type.Literal("unavailable"),
31
+ reason: UNAVAILABLE_REASON,
32
+ workspace: idSchema2()
33
+ }),
34
+ Type.Object({ kind: Type.Literal("failed"), message: Type.String() })
35
+ ]);
36
+ var AddOutcomeType2 = Type.Union([
37
+ Type.Object({ kind: Type.Literal("added"), workspace: idSchema2() }),
38
+ Type.Object({ kind: Type.Literal("exists"), workspace: idSchema2() }),
39
+ Type.Object({ kind: Type.Literal("stale"), identity: idSchema2() }),
40
+ Type.Object({ kind: Type.Literal("unavailable"), reason: UNAVAILABLE_REASON })
41
+ ]);
42
+ var ForgetOutcomeType2 = Type.Union([
43
+ Type.Object({ kind: Type.Literal("forgotten") }),
44
+ Type.Object({ kind: Type.Literal("busy"), sessions: Type.Array(idSchema2()) }),
45
+ Type.Object({ kind: Type.Literal("missing") })
46
+ ]);
47
+ var WorkspaceInspectionType2 = Type.Object({
48
+ target: WorkspaceTargetType2,
49
+ identity: idSchema2(),
50
+ availability: AvailabilityType2,
51
+ projectSources: Type.Array(Type.String()),
52
+ registered: nullable2(idSchema2())
53
+ });
54
+ var WorktreeIsolationType2 = Type.Object({
55
+ kind: Type.Literal("worktree"),
56
+ source: idSchema2(),
57
+ session: idSchema2(),
58
+ branch: Type.String(),
59
+ base: Type.String()
60
+ });
61
+ var WorkspaceInfoType2 = Type.Object({
62
+ id: idSchema2(),
63
+ target: WorkspaceTargetType2,
64
+ identity: idSchema2(),
65
+ availability: AvailabilityType2,
66
+ projectResources: nullable2(Type.Boolean()),
67
+ trusted: nullable2(Type.Boolean()),
68
+ projectSources: Type.Array(Type.String()),
69
+ addedBy: idSchema2(),
70
+ sessions: Type.Number(),
71
+ writers: Type.Array(idSchema2()),
72
+ isolation: nullable2(WorktreeIsolationType2)
73
+ });
74
+ var AvailabilitySchema2 = standard2(AvailabilityType2);
75
+ var WorkspaceTargetSchema2 = standard2(withJson2(WorkspaceTargetType2));
76
+ var ActivationSchema2 = standard2(ActivationType2);
77
+ var AddOutcomeSchema2 = standard2(AddOutcomeType2);
78
+ var ForgetOutcomeSchema2 = standard2(ForgetOutcomeType2);
79
+ var WorkspaceInspectionSchema2 = standard2(withJson2(WorkspaceInspectionType2));
80
+ var WorkspaceInfoSchema2 = standard2(withJson2(WorkspaceInfoType2));
81
+
82
+ export { AvailabilityType2, WorkspaceTargetType2, ActivationType2, AddOutcomeType2, ForgetOutcomeType2, WorkspaceInspectionType2, WorktreeIsolationType2, WorkspaceInfoType2, AvailabilitySchema2, WorkspaceTargetSchema2, ActivationSchema2, AddOutcomeSchema2, ForgetOutcomeSchema2, WorkspaceInspectionSchema2, WorkspaceInfoSchema2 };
@@ -0,0 +1,181 @@
1
+ import {
2
+ standard2
3
+ } from "./browser-vzc3r2r3.js";
4
+ import {
5
+ withJson2
6
+ } from "./browser-sgwxbek9.js";
7
+ import {
8
+ idSchema2,
9
+ SeqType2
10
+ } from "./browser-ypez6s7v.js";
11
+ import {
12
+ nullable2
13
+ } from "./browser-4et7qtz3.js";
14
+ import {
15
+ UsageType2,
16
+ ContextViewType2
17
+ } from "./browser-8t9anqfc.js";
18
+ import {
19
+ ConfigurationType2
20
+ } from "./browser-vapnjwp3.js";
21
+ import {
22
+ FileChangeType2
23
+ } from "./browser-ebr6k189.js";
24
+ import {
25
+ DeliveryType2,
26
+ UserContentType2,
27
+ MessageSourceType2,
28
+ ScheduleType2
29
+ } from "./browser-hq5q56sf.js";
30
+ import {
31
+ RunEndType2,
32
+ WaitTargetType2,
33
+ ExecutionType2,
34
+ BackgroundItemType2
35
+ } from "./browser-s7907azt.js";
36
+ import {
37
+ PartStatusType2,
38
+ PartViewType2
39
+ } from "./browser-ad9yebg7.js";
40
+ import {
41
+ ActivationType2
42
+ } from "./browser-bg1esaw0.js";
43
+ import {
44
+ HeadInfoType2,
45
+ SessionCatalogViewType2
46
+ } from "./browser-7gjnxy9m.js";
47
+
48
+ // src/views.ts
49
+ import { Type } from "typebox";
50
+ var CLASS_SUMMARY = Type.Object({ count: Type.Number(), paths: Type.Array(Type.String()) });
51
+ var MESSAGE = { id: idSchema2(), turn: idSchema2(), at: Type.Number() };
52
+ var ViewOptionsType2 = Type.Object({ tail: Type.Optional(Type.Number()) });
53
+ var UserStatusType2 = Type.Union([
54
+ Type.Object({
55
+ kind: Type.Literal("unsent"),
56
+ attempts: Type.Number(),
57
+ retrying: nullable2(Type.Object({ at: Type.Number(), reason: Type.String() }))
58
+ }),
59
+ Type.Object({ kind: Type.Literal("pending"), schedule: ScheduleType2, covered: Type.Boolean() }),
60
+ Type.Object({
61
+ kind: Type.Literal("landed"),
62
+ commit: idSchema2(),
63
+ run: nullable2(idSchema2()),
64
+ replaced: nullable2(Type.Object({ previous: idSchema2(), stopped: nullable2(idSchema2()) }))
65
+ })
66
+ ]);
67
+ var MessageType2 = Type.Union([
68
+ Type.Object({
69
+ ...MESSAGE,
70
+ kind: Type.Literal("user"),
71
+ content: UserContentType2,
72
+ source: MessageSourceType2,
73
+ delivery: DeliveryType2,
74
+ status: UserStatusType2,
75
+ siblings: Type.Object({
76
+ index: Type.Number(),
77
+ count: Type.Number(),
78
+ ids: Type.Array(idSchema2())
79
+ })
80
+ }),
81
+ Type.Object({
82
+ ...MESSAGE,
83
+ kind: Type.Literal("part"),
84
+ part: idSchema2(),
85
+ partKind: Type.String(),
86
+ role: Type.Enum(["step", "answer", "note"]),
87
+ state: Type.Unknown(),
88
+ version: Type.Number(),
89
+ status: PartStatusType2
90
+ })
91
+ ]);
92
+ var TurnInfoType2 = Type.Object({
93
+ id: idSchema2(),
94
+ run: nullable2(idSchema2()),
95
+ prompt: nullable2(idSchema2()),
96
+ state: Type.Union([
97
+ Type.Object({ kind: Type.Literal("working"), activity: nullable2(Type.String()) }),
98
+ Type.Object({ kind: Type.Literal("waiting"), on: WaitTargetType2 }),
99
+ Type.Object({ kind: Type.Literal("ended"), end: RunEndType2 })
100
+ ]),
101
+ startedAt: Type.Number(),
102
+ endedAt: nullable2(Type.Number()),
103
+ steps: Type.Number(),
104
+ thinkingOnly: Type.Boolean(),
105
+ summary: Type.Object({
106
+ byClass: Type.Object({
107
+ read: CLASS_SUMMARY,
108
+ list: CLASS_SUMMARY,
109
+ edit: CLASS_SUMMARY,
110
+ shell: CLASS_SUMMARY,
111
+ delegate: CLASS_SUMMARY,
112
+ custom: CLASS_SUMMARY
113
+ }),
114
+ failed: Type.Number(),
115
+ stopped: Type.Number(),
116
+ added: Type.Number(),
117
+ removed: Type.Number()
118
+ })
119
+ });
120
+ var SessionViewType2 = Type.Object({
121
+ revision: nullable2(idSchema2()),
122
+ seq: SeqType2,
123
+ activation: ActivationType2,
124
+ messages: Type.Array(MessageType2),
125
+ parts: Type.Array(PartViewType2),
126
+ turns: Type.Array(TurnInfoType2),
127
+ usage: UsageType2,
128
+ execution: ExecutionType2,
129
+ background: Type.Array(BackgroundItemType2),
130
+ configuration: Type.Object({
131
+ selected: nullable2(ConfigurationType2),
132
+ effective: nullable2(ConfigurationType2)
133
+ }),
134
+ context: ContextViewType2,
135
+ heads: Type.Array(HeadInfoType2),
136
+ changes: Type.Array(FileChangeType2),
137
+ catalog: SessionCatalogViewType2
138
+ });
139
+ var HistoryPageType2 = Type.Object({
140
+ messages: Type.Array(MessageType2),
141
+ turns: Type.Array(TurnInfoType2)
142
+ });
143
+ var VIEW = SessionViewType2.properties;
144
+ function viewSplice(item) {
145
+ return Type.Object({ runs: Type.Array(Type.Number()), items: Type.Array(item) });
146
+ }
147
+ var ViewAppendType2 = Type.Object({
148
+ at: Type.Number(),
149
+ append: Type.String(),
150
+ version: Type.Number()
151
+ });
152
+ var ViewFrameType2 = Type.Union([
153
+ Type.Object({ kind: Type.Literal("view"), view: SessionViewType2 }),
154
+ Type.Object({
155
+ kind: Type.Literal("delta"),
156
+ seq: SeqType2,
157
+ revision: Type.Optional(VIEW.revision),
158
+ activation: Type.Optional(VIEW.activation),
159
+ messages: Type.Optional(viewSplice(MessageType2)),
160
+ appends: Type.Optional(Type.Array(ViewAppendType2)),
161
+ parts: Type.Optional(viewSplice(PartViewType2)),
162
+ turns: Type.Optional(viewSplice(TurnInfoType2)),
163
+ usage: Type.Optional(VIEW.usage),
164
+ execution: Type.Optional(VIEW.execution),
165
+ background: Type.Optional(viewSplice(BackgroundItemType2)),
166
+ configuration: Type.Optional(VIEW.configuration),
167
+ context: Type.Optional(VIEW.context),
168
+ heads: Type.Optional(viewSplice(HeadInfoType2)),
169
+ changes: Type.Optional(viewSplice(FileChangeType2)),
170
+ catalog: Type.Optional(VIEW.catalog)
171
+ })
172
+ ]);
173
+ var ViewOptionsSchema2 = standard2(ViewOptionsType2);
174
+ var UserStatusSchema2 = standard2(UserStatusType2);
175
+ var MessageSchema2 = standard2(MessageType2);
176
+ var TurnInfoSchema2 = standard2(TurnInfoType2);
177
+ var SessionViewSchema2 = standard2(withJson2(SessionViewType2));
178
+ var HistoryPageSchema2 = standard2(withJson2(HistoryPageType2));
179
+ var ViewFrameSchema2 = standard2(withJson2(ViewFrameType2));
180
+
181
+ export { ViewOptionsType2, UserStatusType2, MessageType2, TurnInfoType2, SessionViewType2, HistoryPageType2, ViewAppendType2, ViewFrameType2, ViewOptionsSchema2, UserStatusSchema2, MessageSchema2, TurnInfoSchema2, SessionViewSchema2, HistoryPageSchema2, ViewFrameSchema2 };
@@ -0,0 +1,82 @@
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
+ import {
11
+ ValidationIssueType2
12
+ } from "./browser-1sfp0bcx.js";
13
+ import {
14
+ withJson2
15
+ } from "./browser-sgwxbek9.js";
16
+ import {
17
+ UserContentType2
18
+ } from "./browser-hq5q56sf.js";
19
+ import {
20
+ SendOptionsType2
21
+ } from "./browser-mnejgne0.js";
22
+ import {
23
+ AuthorityType2
24
+ } from "./browser-6e1madxa.js";
25
+ import {
26
+ SettingInfoType2
27
+ } from "./browser-7gjnxy9m.js";
28
+
29
+ // src/connection.ts
30
+ import { Type } from "typebox";
31
+ var HostViewWireType2 = Type.Object({
32
+ id: idSchema2(),
33
+ link: Type.Union([
34
+ Type.Object({ kind: Type.Literal("connected") }),
35
+ Type.Object({
36
+ kind: Type.Literal("reconnecting"),
37
+ since: Type.Number(),
38
+ attempts: Type.Number()
39
+ }),
40
+ Type.Object({
41
+ kind: Type.Literal("closed"),
42
+ reason: Type.Enum(["client", "revoked", "host-gone"])
43
+ })
44
+ ]),
45
+ name: Type.String(),
46
+ platform: Type.String(),
47
+ version: Type.String(),
48
+ catalog: idSchema2(),
49
+ plugins: Type.Array(Type.Object({
50
+ id: Type.String(),
51
+ source: Type.Enum(["builtin", "user", "project", "inline"]),
52
+ path: nullable2(Type.String()),
53
+ issues: Type.Array(ValidationIssueType2)
54
+ })),
55
+ settings: Type.Array(SettingInfoType2),
56
+ defaultWorkspace: nullable2(idSchema2()),
57
+ authority: Type.Array(AuthorityType2),
58
+ principal: idSchema2()
59
+ });
60
+ var CredentialSourceWireType2 = Type.Union([
61
+ Type.Object({ kind: Type.Literal("token"), token: Type.String() }),
62
+ Type.Object({ kind: Type.Literal("pairing"), code: Type.String() })
63
+ ]);
64
+ var JournalEntryType2 = Type.Object({
65
+ id: idSchema2(),
66
+ session: idSchema2(),
67
+ head: idSchema2(),
68
+ content: UserContentType2,
69
+ options: SendOptionsType2,
70
+ at: Type.Number()
71
+ });
72
+ var SettingOutcomeType2 = Type.Union([
73
+ Type.Object({ kind: Type.Literal("applied") }),
74
+ Type.Object({ kind: Type.Literal("invalid"), issues: Type.Array(ValidationIssueType2) }),
75
+ Type.Object({ kind: Type.Literal("unknown") })
76
+ ]);
77
+ var HostViewWireSchema2 = standard2(withJson2(HostViewWireType2));
78
+ var CredentialSourceWireSchema2 = standard2(CredentialSourceWireType2);
79
+ var JournalEntrySchema2 = standard2(withJson2(JournalEntryType2));
80
+ var SettingOutcomeSchema2 = standard2(SettingOutcomeType2);
81
+
82
+ export { HostViewWireType2, CredentialSourceWireType2, JournalEntryType2, SettingOutcomeType2, HostViewWireSchema2, CredentialSourceWireSchema2, JournalEntrySchema2, SettingOutcomeSchema2 };