@nyte-ai/plugin 0.0.0-stage → 0.0.19
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 +866 -0
- package/dist/chunks/billing-0y7dfkp2.js +146 -0
- package/dist/chunks/billing-2v3g7rd9.js +190 -0
- package/dist/chunks/billing-3j77ss7y.js +86 -0
- package/dist/chunks/billing-3scqmkzb.js +559 -0
- package/dist/chunks/billing-4vz9pxyx.js +22 -0
- package/dist/chunks/billing-6z2kgtyt.js +51 -0
- package/dist/chunks/billing-8rjk35gr.js +444 -0
- package/dist/chunks/billing-9nn3yp18.js +176 -0
- package/dist/chunks/billing-9qc0eqh4.js +174 -0
- package/dist/chunks/billing-a9vqn66p.js +351 -0
- package/dist/chunks/billing-bv5zr32b.js +369 -0
- package/dist/chunks/billing-cy1rg619.js +302 -0
- package/dist/chunks/billing-ejx2hv52.js +323 -0
- package/dist/chunks/billing-h13r0byk.js +80 -0
- package/dist/chunks/billing-hg64tqf1.js +97 -0
- package/dist/chunks/billing-j643d12p.js +197 -0
- package/dist/chunks/billing-kn3d30b4.js +276 -0
- package/dist/chunks/billing-mvc33pv6.js +36 -0
- package/dist/chunks/billing-s4rrspsk.js +7 -0
- package/dist/chunks/billing-svrhh5a5.js +307 -0
- package/dist/chunks/billing-sxc70w72.js +161 -0
- package/dist/chunks/billing-t1qrxe16.js +41 -0
- package/dist/chunks/billing-tm34gm2p.js +528 -0
- package/dist/chunks/billing-tzr3cebf.js +20 -0
- package/dist/chunks/billing-v3hg5rc7.js +373 -0
- package/dist/chunks/billing-wmcbg6fw.js +52 -0
- package/dist/chunks/billing-ye3wk5r3.js +205 -0
- package/dist/chunks/billing-zfpm2rt0.js +29 -0
- package/dist/examples/claude-code/LICENSE +21 -0
- package/dist/examples/claude-code/billing.d.ts +7 -0
- package/dist/examples/claude-code/billing.js +11 -0
- package/dist/examples/claude-code/claude-cli.d.ts +35 -0
- package/dist/examples/claude-code/claude-cli.js +15 -0
- package/dist/examples/claude-code/env.d.ts +1 -0
- package/dist/examples/claude-code/env.js +6 -0
- package/dist/examples/claude-code/index.d.ts +24 -0
- package/dist/examples/claude-code/index.js +149 -0
- package/dist/examples/claude-code/inert-mcp.d.ts +1 -0
- package/dist/examples/claude-code/inert-mcp.js +6 -0
- package/dist/examples/claude-code/model-catalog.d.ts +27 -0
- package/dist/examples/claude-code/model-catalog.js +12 -0
- package/dist/examples/claude-code/process.d.ts +22 -0
- package/dist/examples/claude-code/process.js +25 -0
- package/dist/examples/claude-code/replay.d.ts +4 -0
- package/dist/examples/claude-code/replay.js +11 -0
- package/dist/examples/claude-code/stream.d.ts +3 -0
- package/dist/examples/claude-code/stream.js +16 -0
- package/dist/examples/claude-code/transcript.d.ts +83 -0
- package/dist/examples/claude-code/transcript.js +23 -0
- package/dist/examples/claude-code/turn-relay.d.ts +48 -0
- package/dist/examples/claude-code/turn-relay.js +9 -0
- package/dist/examples/claude-code/wire.d.ts +372 -0
- package/dist/examples/claude-code/wire.js +18 -0
- package/dist/src/acp/connection.d.ts +24 -0
- package/dist/src/acp/connection.js +8 -0
- package/dist/src/acp/index.d.ts +54 -0
- package/dist/src/acp/index.js +1005 -0
- package/dist/src/acp/registry.d.ts +18 -0
- package/dist/src/acp/registry.js +9 -0
- package/dist/src/acp/thread.d.ts +46 -0
- package/dist/src/acp/thread.js +7 -0
- package/dist/src/acp/transcript.d.ts +8 -0
- package/dist/src/acp/transcript.js +11 -0
- package/dist/src/acp/translate.d.ts +33 -0
- package/dist/src/acp/translate.js +20 -0
- package/dist/src/approvals/approvals.d.ts +189 -0
- package/dist/src/approvals/approvals.js +143 -0
- package/dist/src/approvals/schema.d.ts +169 -0
- package/dist/src/approvals/schema.js +18 -0
- package/dist/src/bash-description.d.ts +30 -0
- package/dist/src/bash-description.js +18 -0
- package/dist/src/browser-tools.d.ts +25 -0
- package/dist/src/browser-tools.js +246 -0
- package/dist/src/canvas/canvas-compile.d.ts +48 -0
- package/dist/src/canvas/canvas-compile.js +8 -0
- package/dist/src/canvas/canvas-libraries.d.ts +32 -0
- package/dist/src/canvas/canvas-libraries.js +6 -0
- package/dist/src/canvas/canvas-preview.d.ts +107 -0
- package/dist/src/canvas/canvas-preview.js +12 -0
- package/dist/src/canvas/canvas-protocol.d.ts +184 -0
- package/dist/src/canvas/canvas-protocol.js +75 -0
- package/dist/src/canvas/canvas.d.ts +50 -0
- package/dist/src/canvas/canvas.js +221 -0
- package/dist/src/canvas/schema.d.ts +47 -0
- package/dist/src/canvas/schema.js +8 -0
- package/dist/src/claude-code-sdk/index.d.ts +35 -0
- package/dist/src/claude-code-sdk/index.js +379 -0
- package/dist/src/claude-code-sdk/session.d.ts +50 -0
- package/dist/src/claude-code-sdk/session.js +7 -0
- package/dist/src/claude-code-sdk/transcript.d.ts +19 -0
- package/dist/src/claude-code-sdk/transcript.js +15 -0
- package/dist/src/claude-code-sdk/translate.d.ts +18 -0
- package/dist/src/claude-code-sdk/translate.js +20 -0
- package/dist/src/client/mount.d.ts +44 -0
- package/dist/src/client/mount.js +252 -0
- package/dist/src/client/notifications.d.ts +36 -0
- package/dist/src/client/notifications.js +24 -0
- package/dist/src/client/presentation.d.ts +362 -0
- package/dist/src/client/presentation.js +391 -0
- package/dist/src/client/transcript-tui.d.ts +23 -0
- package/dist/src/client/transcript-tui.js +20 -0
- package/dist/src/client/transcript.d.ts +23 -0
- package/dist/src/client/transcript.js +51 -0
- package/dist/src/client.d.ts +53 -0
- package/dist/src/client.js +22 -0
- package/dist/src/codemode-runtime.d.ts +11 -0
- package/dist/src/codemode-runtime.js +10 -0
- package/dist/src/codemode-worker.d.ts +1 -0
- package/dist/src/codemode-worker.js +2 -0
- package/dist/src/codemode.d.ts +21 -0
- package/dist/src/codemode.js +170 -0
- package/dist/src/core.d.ts +43 -0
- package/dist/src/core.js +11 -0
- package/dist/src/find-on-path.d.ts +4 -0
- package/dist/src/find-on-path.js +8 -0
- package/dist/src/openai-astra-context.d.ts +23 -0
- package/dist/src/openai-astra-context.js +14 -0
- package/dist/src/openai-compaction.d.ts +15 -0
- package/dist/src/openai-compaction.js +55 -0
- package/dist/src/question/client/questions-tui.d.ts +9 -0
- package/dist/src/question/client/questions-tui.js +19 -0
- package/dist/src/question/client/questions.d.ts +9 -0
- package/dist/src/question/client/questions.js +160 -0
- package/dist/src/question/question.d.ts +63 -0
- package/dist/src/question/question.js +9 -0
- package/dist/src/question/schema.d.ts +101 -0
- package/dist/src/question/schema.js +14 -0
- package/dist/src/rename.d.ts +79 -0
- package/dist/src/rename.js +91 -0
- package/dist/src/telemetry.d.ts +36 -0
- package/dist/src/telemetry.js +84 -0
- package/dist/src/web-search.d.ts +78 -0
- package/dist/src/web-search.js +219 -0
- package/package.json +190 -3
- package/README.md +0 -3
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
import { Type } from "typebox";
|
|
2
|
+
import type { Static } from "typebox";
|
|
3
|
+
declare const recordSchema: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
4
|
+
declare const usageSchema: Type.TObject<{
|
|
5
|
+
input_tokens: Type.TNumber;
|
|
6
|
+
output_tokens: Type.TNumber;
|
|
7
|
+
cache_read_input_tokens: Type.TOptional<Type.TNumber>;
|
|
8
|
+
cache_creation_input_tokens: Type.TOptional<Type.TNumber>;
|
|
9
|
+
cache_creation: Type.TOptional<Type.TObject<{
|
|
10
|
+
ephemeral_1h_input_tokens: Type.TOptional<Type.TNumber>;
|
|
11
|
+
}>>;
|
|
12
|
+
output_tokens_details: Type.TOptional<Type.TObject<{
|
|
13
|
+
thinking_tokens: Type.TOptional<Type.TNumber>;
|
|
14
|
+
}>>;
|
|
15
|
+
}>;
|
|
16
|
+
declare const contentSchema: Type.TUnion<[Type.TObject<{
|
|
17
|
+
type: Type.TLiteral<"text">;
|
|
18
|
+
text: Type.TString;
|
|
19
|
+
}>, Type.TObject<{
|
|
20
|
+
type: Type.TLiteral<"thinking">;
|
|
21
|
+
thinking: Type.TString;
|
|
22
|
+
signature: Type.TOptional<Type.TString>;
|
|
23
|
+
}>, Type.TObject<{
|
|
24
|
+
type: Type.TLiteral<"redacted_thinking">;
|
|
25
|
+
data: Type.TString;
|
|
26
|
+
}>, Type.TObject<{
|
|
27
|
+
type: Type.TLiteral<"tool_use">;
|
|
28
|
+
id: Type.TString;
|
|
29
|
+
name: Type.TString;
|
|
30
|
+
input: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
31
|
+
}>]>;
|
|
32
|
+
export declare const messageSchema: Type.TIntersect<[Type.TRecord<"^.*$", Type.TUnknown>, Type.TObject<{
|
|
33
|
+
id: Type.TOptional<Type.TString>;
|
|
34
|
+
role: Type.TLiteral<"assistant">;
|
|
35
|
+
content: Type.TArray<Type.TUnion<[Type.TObject<{
|
|
36
|
+
type: Type.TLiteral<"text">;
|
|
37
|
+
text: Type.TString;
|
|
38
|
+
}>, Type.TObject<{
|
|
39
|
+
type: Type.TLiteral<"thinking">;
|
|
40
|
+
thinking: Type.TString;
|
|
41
|
+
signature: Type.TOptional<Type.TString>;
|
|
42
|
+
}>, Type.TObject<{
|
|
43
|
+
type: Type.TLiteral<"redacted_thinking">;
|
|
44
|
+
data: Type.TString;
|
|
45
|
+
}>, Type.TObject<{
|
|
46
|
+
type: Type.TLiteral<"tool_use">;
|
|
47
|
+
id: Type.TString;
|
|
48
|
+
name: Type.TString;
|
|
49
|
+
input: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
50
|
+
}>]>>;
|
|
51
|
+
usage: Type.TOptional<Type.TObject<{
|
|
52
|
+
input_tokens: Type.TNumber;
|
|
53
|
+
output_tokens: Type.TNumber;
|
|
54
|
+
cache_read_input_tokens: Type.TOptional<Type.TNumber>;
|
|
55
|
+
cache_creation_input_tokens: Type.TOptional<Type.TNumber>;
|
|
56
|
+
cache_creation: Type.TOptional<Type.TObject<{
|
|
57
|
+
ephemeral_1h_input_tokens: Type.TOptional<Type.TNumber>;
|
|
58
|
+
}>>;
|
|
59
|
+
output_tokens_details: Type.TOptional<Type.TObject<{
|
|
60
|
+
thinking_tokens: Type.TOptional<Type.TNumber>;
|
|
61
|
+
}>>;
|
|
62
|
+
}>>;
|
|
63
|
+
stop_reason: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
64
|
+
stop_sequence: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
65
|
+
}>]>;
|
|
66
|
+
declare const streamEventSchema: Type.TUnion<[Type.TObject<{
|
|
67
|
+
type: Type.TLiteral<"message_start">;
|
|
68
|
+
message: Type.TIntersect<[Type.TRecord<"^.*$", Type.TUnknown>, Type.TObject<{
|
|
69
|
+
id: Type.TOptional<Type.TString>;
|
|
70
|
+
role: Type.TLiteral<"assistant">;
|
|
71
|
+
content: Type.TArray<Type.TUnion<[Type.TObject<{
|
|
72
|
+
type: Type.TLiteral<"text">;
|
|
73
|
+
text: Type.TString;
|
|
74
|
+
}>, Type.TObject<{
|
|
75
|
+
type: Type.TLiteral<"thinking">;
|
|
76
|
+
thinking: Type.TString;
|
|
77
|
+
signature: Type.TOptional<Type.TString>;
|
|
78
|
+
}>, Type.TObject<{
|
|
79
|
+
type: Type.TLiteral<"redacted_thinking">;
|
|
80
|
+
data: Type.TString;
|
|
81
|
+
}>, Type.TObject<{
|
|
82
|
+
type: Type.TLiteral<"tool_use">;
|
|
83
|
+
id: Type.TString;
|
|
84
|
+
name: Type.TString;
|
|
85
|
+
input: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
86
|
+
}>]>>;
|
|
87
|
+
usage: Type.TOptional<Type.TObject<{
|
|
88
|
+
input_tokens: Type.TNumber;
|
|
89
|
+
output_tokens: Type.TNumber;
|
|
90
|
+
cache_read_input_tokens: Type.TOptional<Type.TNumber>;
|
|
91
|
+
cache_creation_input_tokens: Type.TOptional<Type.TNumber>;
|
|
92
|
+
cache_creation: Type.TOptional<Type.TObject<{
|
|
93
|
+
ephemeral_1h_input_tokens: Type.TOptional<Type.TNumber>;
|
|
94
|
+
}>>;
|
|
95
|
+
output_tokens_details: Type.TOptional<Type.TObject<{
|
|
96
|
+
thinking_tokens: Type.TOptional<Type.TNumber>;
|
|
97
|
+
}>>;
|
|
98
|
+
}>>;
|
|
99
|
+
stop_reason: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
100
|
+
stop_sequence: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
101
|
+
}>]>;
|
|
102
|
+
}>, Type.TObject<{
|
|
103
|
+
type: Type.TLiteral<"content_block_start">;
|
|
104
|
+
index: Type.TInteger;
|
|
105
|
+
content_block: Type.TUnion<[Type.TObject<{
|
|
106
|
+
type: Type.TLiteral<"text">;
|
|
107
|
+
text: Type.TString;
|
|
108
|
+
}>, Type.TObject<{
|
|
109
|
+
type: Type.TLiteral<"thinking">;
|
|
110
|
+
thinking: Type.TString;
|
|
111
|
+
signature: Type.TOptional<Type.TString>;
|
|
112
|
+
}>, Type.TObject<{
|
|
113
|
+
type: Type.TLiteral<"redacted_thinking">;
|
|
114
|
+
data: Type.TString;
|
|
115
|
+
}>, Type.TObject<{
|
|
116
|
+
type: Type.TLiteral<"tool_use">;
|
|
117
|
+
id: Type.TString;
|
|
118
|
+
name: Type.TString;
|
|
119
|
+
input: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
120
|
+
}>]>;
|
|
121
|
+
}>, Type.TObject<{
|
|
122
|
+
type: Type.TLiteral<"content_block_delta">;
|
|
123
|
+
index: Type.TInteger;
|
|
124
|
+
delta: Type.TUnion<[Type.TObject<{
|
|
125
|
+
type: Type.TLiteral<"text_delta">;
|
|
126
|
+
text: Type.TString;
|
|
127
|
+
}>, Type.TObject<{
|
|
128
|
+
type: Type.TLiteral<"thinking_delta">;
|
|
129
|
+
thinking: Type.TString;
|
|
130
|
+
}>, Type.TObject<{
|
|
131
|
+
type: Type.TLiteral<"signature_delta">;
|
|
132
|
+
signature: Type.TString;
|
|
133
|
+
}>, Type.TObject<{
|
|
134
|
+
type: Type.TLiteral<"input_json_delta">;
|
|
135
|
+
partial_json: Type.TString;
|
|
136
|
+
}>]>;
|
|
137
|
+
}>, Type.TObject<{
|
|
138
|
+
type: Type.TLiteral<"content_block_stop">;
|
|
139
|
+
index: Type.TInteger;
|
|
140
|
+
}>, Type.TObject<{
|
|
141
|
+
type: Type.TLiteral<"message_delta">;
|
|
142
|
+
delta: Type.TObject<{
|
|
143
|
+
stop_reason: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
144
|
+
stop_sequence: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
145
|
+
}>;
|
|
146
|
+
usage: Type.TOptional<Type.TObject<{
|
|
147
|
+
input_tokens: Type.TOptional<Type.TNumber>;
|
|
148
|
+
output_tokens: Type.TOptional<Type.TNumber>;
|
|
149
|
+
cache_read_input_tokens: Type.TOptional<Type.TNumber>;
|
|
150
|
+
cache_creation_input_tokens: Type.TOptional<Type.TNumber>;
|
|
151
|
+
cache_creation: Type.TOptional<Type.TObject<{
|
|
152
|
+
ephemeral_1h_input_tokens: Type.TOptional<Type.TNumber>;
|
|
153
|
+
}>>;
|
|
154
|
+
output_tokens_details: Type.TOptional<Type.TObject<{
|
|
155
|
+
thinking_tokens: Type.TOptional<Type.TNumber>;
|
|
156
|
+
}>>;
|
|
157
|
+
}>>;
|
|
158
|
+
}>, Type.TObject<{
|
|
159
|
+
type: Type.TLiteral<"message_stop">;
|
|
160
|
+
}>, Type.TObject<{
|
|
161
|
+
type: Type.TLiteral<"error">;
|
|
162
|
+
error: Type.TOptional<Type.TObject<{
|
|
163
|
+
type: Type.TOptional<Type.TString>;
|
|
164
|
+
message: Type.TOptional<Type.TString>;
|
|
165
|
+
}>>;
|
|
166
|
+
}>]>;
|
|
167
|
+
declare const outputEventSchema: Type.TUnion<[Type.TObject<{
|
|
168
|
+
type: Type.TLiteral<"assistant">;
|
|
169
|
+
message: Type.TIntersect<[Type.TRecord<"^.*$", Type.TUnknown>, Type.TObject<{
|
|
170
|
+
id: Type.TOptional<Type.TString>;
|
|
171
|
+
role: Type.TLiteral<"assistant">;
|
|
172
|
+
content: Type.TArray<Type.TUnion<[Type.TObject<{
|
|
173
|
+
type: Type.TLiteral<"text">;
|
|
174
|
+
text: Type.TString;
|
|
175
|
+
}>, Type.TObject<{
|
|
176
|
+
type: Type.TLiteral<"thinking">;
|
|
177
|
+
thinking: Type.TString;
|
|
178
|
+
signature: Type.TOptional<Type.TString>;
|
|
179
|
+
}>, Type.TObject<{
|
|
180
|
+
type: Type.TLiteral<"redacted_thinking">;
|
|
181
|
+
data: Type.TString;
|
|
182
|
+
}>, Type.TObject<{
|
|
183
|
+
type: Type.TLiteral<"tool_use">;
|
|
184
|
+
id: Type.TString;
|
|
185
|
+
name: Type.TString;
|
|
186
|
+
input: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
187
|
+
}>]>>;
|
|
188
|
+
usage: Type.TOptional<Type.TObject<{
|
|
189
|
+
input_tokens: Type.TNumber;
|
|
190
|
+
output_tokens: Type.TNumber;
|
|
191
|
+
cache_read_input_tokens: Type.TOptional<Type.TNumber>;
|
|
192
|
+
cache_creation_input_tokens: Type.TOptional<Type.TNumber>;
|
|
193
|
+
cache_creation: Type.TOptional<Type.TObject<{
|
|
194
|
+
ephemeral_1h_input_tokens: Type.TOptional<Type.TNumber>;
|
|
195
|
+
}>>;
|
|
196
|
+
output_tokens_details: Type.TOptional<Type.TObject<{
|
|
197
|
+
thinking_tokens: Type.TOptional<Type.TNumber>;
|
|
198
|
+
}>>;
|
|
199
|
+
}>>;
|
|
200
|
+
stop_reason: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
201
|
+
stop_sequence: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
202
|
+
}>]>;
|
|
203
|
+
error: Type.TOptional<Type.TUnknown>;
|
|
204
|
+
}>, Type.TObject<{
|
|
205
|
+
type: Type.TLiteral<"result">;
|
|
206
|
+
subtype: Type.TOptional<Type.TString>;
|
|
207
|
+
is_error: Type.TOptional<Type.TBoolean>;
|
|
208
|
+
num_turns: Type.TOptional<Type.TNumber>;
|
|
209
|
+
usage: Type.TOptional<Type.TObject<{
|
|
210
|
+
input_tokens: Type.TNumber;
|
|
211
|
+
output_tokens: Type.TNumber;
|
|
212
|
+
cache_read_input_tokens: Type.TOptional<Type.TNumber>;
|
|
213
|
+
cache_creation_input_tokens: Type.TOptional<Type.TNumber>;
|
|
214
|
+
cache_creation: Type.TOptional<Type.TObject<{
|
|
215
|
+
ephemeral_1h_input_tokens: Type.TOptional<Type.TNumber>;
|
|
216
|
+
}>>;
|
|
217
|
+
output_tokens_details: Type.TOptional<Type.TObject<{
|
|
218
|
+
thinking_tokens: Type.TOptional<Type.TNumber>;
|
|
219
|
+
}>>;
|
|
220
|
+
}>>;
|
|
221
|
+
total_cost_usd: Type.TOptional<Type.TNumber>;
|
|
222
|
+
modelUsage: Type.TOptional<Type.TRecord<"^.*$", Type.TUnknown>>;
|
|
223
|
+
}>, Type.TObject<{
|
|
224
|
+
type: Type.TLiteral<"stream_event">;
|
|
225
|
+
event: Type.TUnion<[Type.TObject<{
|
|
226
|
+
type: Type.TLiteral<"message_start">;
|
|
227
|
+
message: Type.TIntersect<[Type.TRecord<"^.*$", Type.TUnknown>, Type.TObject<{
|
|
228
|
+
id: Type.TOptional<Type.TString>;
|
|
229
|
+
role: Type.TLiteral<"assistant">;
|
|
230
|
+
content: Type.TArray<Type.TUnion<[Type.TObject<{
|
|
231
|
+
type: Type.TLiteral<"text">;
|
|
232
|
+
text: Type.TString;
|
|
233
|
+
}>, Type.TObject<{
|
|
234
|
+
type: Type.TLiteral<"thinking">;
|
|
235
|
+
thinking: Type.TString;
|
|
236
|
+
signature: Type.TOptional<Type.TString>;
|
|
237
|
+
}>, Type.TObject<{
|
|
238
|
+
type: Type.TLiteral<"redacted_thinking">;
|
|
239
|
+
data: Type.TString;
|
|
240
|
+
}>, Type.TObject<{
|
|
241
|
+
type: Type.TLiteral<"tool_use">;
|
|
242
|
+
id: Type.TString;
|
|
243
|
+
name: Type.TString;
|
|
244
|
+
input: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
245
|
+
}>]>>;
|
|
246
|
+
usage: Type.TOptional<Type.TObject<{
|
|
247
|
+
input_tokens: Type.TNumber;
|
|
248
|
+
output_tokens: Type.TNumber;
|
|
249
|
+
cache_read_input_tokens: Type.TOptional<Type.TNumber>;
|
|
250
|
+
cache_creation_input_tokens: Type.TOptional<Type.TNumber>;
|
|
251
|
+
cache_creation: Type.TOptional<Type.TObject<{
|
|
252
|
+
ephemeral_1h_input_tokens: Type.TOptional<Type.TNumber>;
|
|
253
|
+
}>>;
|
|
254
|
+
output_tokens_details: Type.TOptional<Type.TObject<{
|
|
255
|
+
thinking_tokens: Type.TOptional<Type.TNumber>;
|
|
256
|
+
}>>;
|
|
257
|
+
}>>;
|
|
258
|
+
stop_reason: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
259
|
+
stop_sequence: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
260
|
+
}>]>;
|
|
261
|
+
}>, Type.TObject<{
|
|
262
|
+
type: Type.TLiteral<"content_block_start">;
|
|
263
|
+
index: Type.TInteger;
|
|
264
|
+
content_block: Type.TUnion<[Type.TObject<{
|
|
265
|
+
type: Type.TLiteral<"text">;
|
|
266
|
+
text: Type.TString;
|
|
267
|
+
}>, Type.TObject<{
|
|
268
|
+
type: Type.TLiteral<"thinking">;
|
|
269
|
+
thinking: Type.TString;
|
|
270
|
+
signature: Type.TOptional<Type.TString>;
|
|
271
|
+
}>, Type.TObject<{
|
|
272
|
+
type: Type.TLiteral<"redacted_thinking">;
|
|
273
|
+
data: Type.TString;
|
|
274
|
+
}>, Type.TObject<{
|
|
275
|
+
type: Type.TLiteral<"tool_use">;
|
|
276
|
+
id: Type.TString;
|
|
277
|
+
name: Type.TString;
|
|
278
|
+
input: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
279
|
+
}>]>;
|
|
280
|
+
}>, Type.TObject<{
|
|
281
|
+
type: Type.TLiteral<"content_block_delta">;
|
|
282
|
+
index: Type.TInteger;
|
|
283
|
+
delta: Type.TUnion<[Type.TObject<{
|
|
284
|
+
type: Type.TLiteral<"text_delta">;
|
|
285
|
+
text: Type.TString;
|
|
286
|
+
}>, Type.TObject<{
|
|
287
|
+
type: Type.TLiteral<"thinking_delta">;
|
|
288
|
+
thinking: Type.TString;
|
|
289
|
+
}>, Type.TObject<{
|
|
290
|
+
type: Type.TLiteral<"signature_delta">;
|
|
291
|
+
signature: Type.TString;
|
|
292
|
+
}>, Type.TObject<{
|
|
293
|
+
type: Type.TLiteral<"input_json_delta">;
|
|
294
|
+
partial_json: Type.TString;
|
|
295
|
+
}>]>;
|
|
296
|
+
}>, Type.TObject<{
|
|
297
|
+
type: Type.TLiteral<"content_block_stop">;
|
|
298
|
+
index: Type.TInteger;
|
|
299
|
+
}>, Type.TObject<{
|
|
300
|
+
type: Type.TLiteral<"message_delta">;
|
|
301
|
+
delta: Type.TObject<{
|
|
302
|
+
stop_reason: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
303
|
+
stop_sequence: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
304
|
+
}>;
|
|
305
|
+
usage: Type.TOptional<Type.TObject<{
|
|
306
|
+
input_tokens: Type.TOptional<Type.TNumber>;
|
|
307
|
+
output_tokens: Type.TOptional<Type.TNumber>;
|
|
308
|
+
cache_read_input_tokens: Type.TOptional<Type.TNumber>;
|
|
309
|
+
cache_creation_input_tokens: Type.TOptional<Type.TNumber>;
|
|
310
|
+
cache_creation: Type.TOptional<Type.TObject<{
|
|
311
|
+
ephemeral_1h_input_tokens: Type.TOptional<Type.TNumber>;
|
|
312
|
+
}>>;
|
|
313
|
+
output_tokens_details: Type.TOptional<Type.TObject<{
|
|
314
|
+
thinking_tokens: Type.TOptional<Type.TNumber>;
|
|
315
|
+
}>>;
|
|
316
|
+
}>>;
|
|
317
|
+
}>, Type.TObject<{
|
|
318
|
+
type: Type.TLiteral<"message_stop">;
|
|
319
|
+
}>, Type.TObject<{
|
|
320
|
+
type: Type.TLiteral<"error">;
|
|
321
|
+
error: Type.TOptional<Type.TObject<{
|
|
322
|
+
type: Type.TOptional<Type.TString>;
|
|
323
|
+
message: Type.TOptional<Type.TString>;
|
|
324
|
+
}>>;
|
|
325
|
+
}>]>;
|
|
326
|
+
}>, Type.TObject<{
|
|
327
|
+
type: Type.TLiteral<"rate_limit_event">;
|
|
328
|
+
rate_limit_info: Type.TOptional<Type.TObject<{
|
|
329
|
+
status: Type.TOptional<Type.TString>;
|
|
330
|
+
rateLimitType: Type.TOptional<Type.TString>;
|
|
331
|
+
resetsAt: Type.TOptional<Type.TNumber>;
|
|
332
|
+
isUsingOverage: Type.TOptional<Type.TBoolean>;
|
|
333
|
+
overageStatus: Type.TOptional<Type.TString>;
|
|
334
|
+
overageDisabledReason: Type.TOptional<Type.TString>;
|
|
335
|
+
}>>;
|
|
336
|
+
}>, Type.TObject<{
|
|
337
|
+
type: Type.TLiteral<"control_response">;
|
|
338
|
+
response: Type.TRecord<"^.*$", Type.TUnknown>;
|
|
339
|
+
}>]>;
|
|
340
|
+
export type JsonRecord = Static<typeof recordSchema>;
|
|
341
|
+
export type NativeUsage = Static<typeof usageSchema>;
|
|
342
|
+
export type NativeContentBlock = Static<typeof contentSchema>;
|
|
343
|
+
export type NativeMessage = Static<typeof messageSchema>;
|
|
344
|
+
export type AnthropicStreamEvent = Static<typeof streamEventSchema>;
|
|
345
|
+
export type NativeOutputEvent = Static<typeof outputEventSchema>;
|
|
346
|
+
export type NativeResult = Extract<NativeOutputEvent, {
|
|
347
|
+
type: "result";
|
|
348
|
+
}>;
|
|
349
|
+
export type NativeFrame = {
|
|
350
|
+
type: "user" | "assistant";
|
|
351
|
+
message: {
|
|
352
|
+
role: "user" | "assistant";
|
|
353
|
+
content: unknown[];
|
|
354
|
+
};
|
|
355
|
+
shouldQuery?: false;
|
|
356
|
+
};
|
|
357
|
+
export declare function matchesRecord(value: unknown): value is JsonRecord;
|
|
358
|
+
export declare function parseRecord(text: string): JsonRecord;
|
|
359
|
+
export declare function parseStreamEvent(text: string): AnthropicStreamEvent | undefined;
|
|
360
|
+
export declare function parseOutputEvent(text: string): NativeOutputEvent | undefined;
|
|
361
|
+
export declare function parseRequest(body: Buffer): Record<string, unknown> & {
|
|
362
|
+
system?: unknown;
|
|
363
|
+
messages: {
|
|
364
|
+
content?: unknown;
|
|
365
|
+
role?: string | undefined;
|
|
366
|
+
}[];
|
|
367
|
+
};
|
|
368
|
+
export declare function parseRequestMessages(value: unknown): {
|
|
369
|
+
content?: unknown;
|
|
370
|
+
role?: string | undefined;
|
|
371
|
+
}[];
|
|
372
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
messageSchema2,
|
|
3
|
+
matchesRecord2,
|
|
4
|
+
parseRecord2,
|
|
5
|
+
parseStreamEvent2,
|
|
6
|
+
parseOutputEvent2,
|
|
7
|
+
parseRequest2,
|
|
8
|
+
parseRequestMessages2
|
|
9
|
+
} from "../../chunks/billing-0y7dfkp2.js";
|
|
10
|
+
export {
|
|
11
|
+
matchesRecord2 as matchesRecord,
|
|
12
|
+
messageSchema2 as messageSchema,
|
|
13
|
+
parseOutputEvent2 as parseOutputEvent,
|
|
14
|
+
parseRecord2 as parseRecord,
|
|
15
|
+
parseRequest2 as parseRequest,
|
|
16
|
+
parseRequestMessages2 as parseRequestMessages,
|
|
17
|
+
parseStreamEvent2 as parseStreamEvent
|
|
18
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ExecutionEnv } from "@nyte-ai/core";
|
|
2
|
+
import type { AcpAgent } from "./registry.ts";
|
|
3
|
+
import { AcpThread } from "./thread.ts";
|
|
4
|
+
import type { AcpApprove } from "./thread.ts";
|
|
5
|
+
/**
|
|
6
|
+
* One agent process, started in a session's environment so the host's
|
|
7
|
+
* environment, sandbox and login-shell gate apply to it, and the ACP
|
|
8
|
+
* connection over its stdio. Each `open` starts an ACP session on it.
|
|
9
|
+
*/
|
|
10
|
+
export declare class AcpProcess {
|
|
11
|
+
#private;
|
|
12
|
+
readonly agent: AcpAgent;
|
|
13
|
+
private constructor();
|
|
14
|
+
/** Starts `agent` through `env.exec` with its stdio kept whole for the protocol, after the process environment is whole. */
|
|
15
|
+
static start(env: ExecutionEnv, agent: AcpAgent): Promise<AcpProcess>;
|
|
16
|
+
get closed(): boolean;
|
|
17
|
+
/** Whether the agent reads image blocks in a prompt. */
|
|
18
|
+
images(): Promise<boolean>;
|
|
19
|
+
/** Starts an ACP session in `cwd` whose permission asks go to `approve`; an agent that wants a sign-in first fails with how to give it one. */
|
|
20
|
+
open(cwd: string, approve: AcpApprove): Promise<AcpThread>;
|
|
21
|
+
/** Drops a thread Nyte no longer follows, cancelling its turn. */
|
|
22
|
+
forget(thread: AcpThread): void;
|
|
23
|
+
close(reason?: Error): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Api, Provider } from "@nyte-ai/ai";
|
|
2
|
+
import type { ExecutionEnv, ToolDefinition } from "@nyte-ai/core";
|
|
3
|
+
import type { AcpAgent } from "./registry.ts";
|
|
4
|
+
export type { AcpAgent } from "./registry.ts";
|
|
5
|
+
/**
|
|
6
|
+
* Agent Client Protocol agents as one model API: each ACP registry agent
|
|
7
|
+
* installed on this machine is a model of the `acp` provider, run as a
|
|
8
|
+
* process in the session's environment. Its text and thoughts stream as the
|
|
9
|
+
* assistant's, each of its tool calls is recorded as a hidden `acp` mirror
|
|
10
|
+
* call, and a permission it asks for waits until Nyte records that call and
|
|
11
|
+
* is then decided by `PluginApi.approve` under the call's ACP kind (a call
|
|
12
|
+
* Nyte settles without running is refused). A stopped run cancels the
|
|
13
|
+
* agent's turn. Which agents there are, and the command, arguments and
|
|
14
|
+
* environment each starts with, come from the registry list shipped in
|
|
15
|
+
* `registry-seed.json` alone, never from the network, so no remote entry
|
|
16
|
+
* picks what runs on this machine. An installed agent is listed but runs
|
|
17
|
+
* only once the user picks it, never as a default the host chooses.
|
|
18
|
+
* `agents`, when given, replaces the registry lookup, as tests do.
|
|
19
|
+
*/
|
|
20
|
+
export declare function acpAgents(options?: {
|
|
21
|
+
readonly agents?: () => Promise<readonly AcpAgent[]>;
|
|
22
|
+
}): {
|
|
23
|
+
provider: Provider<Api>;
|
|
24
|
+
plugin: {
|
|
25
|
+
id: string;
|
|
26
|
+
contribute: {
|
|
27
|
+
tools: ToolDefinition<{
|
|
28
|
+
id: string;
|
|
29
|
+
kind: string;
|
|
30
|
+
title: string;
|
|
31
|
+
input: Record<string, unknown>;
|
|
32
|
+
thread: string;
|
|
33
|
+
paths: string[];
|
|
34
|
+
}, unknown>[];
|
|
35
|
+
};
|
|
36
|
+
activate(api: {
|
|
37
|
+
readonly side: "core";
|
|
38
|
+
readonly sdk: import("@nyte-ai/core").Connection;
|
|
39
|
+
readonly contribute: import("@nyte-ai/core").Registries<"core">;
|
|
40
|
+
readonly storage: import("@nyte-ai/core").PluginStorage;
|
|
41
|
+
readonly signal: AbortSignal;
|
|
42
|
+
hook<N extends "session_activated" | "before_send" | "run_started" | "transform_transcript" | "before_compaction" | "before_request" | "before_tool" | "after_tool" | "after_request" | "run_ended">(name: N, entry: import("@nyte-ai/core").HookEntry<"core", N>): import("@nyte-ai/schema").Disposer;
|
|
43
|
+
report(issue: import("@nyte-ai/schema").ValidationIssue): void;
|
|
44
|
+
reload(): void;
|
|
45
|
+
} & {
|
|
46
|
+
readonly session: import("@nyte-ai/core").Session;
|
|
47
|
+
readonly env: ExecutionEnv;
|
|
48
|
+
wrapEnv(wrap: import("@nyte-ai/core").EnvironmentWrap): import("@nyte-ai/schema").Disposer;
|
|
49
|
+
readonly inputs: import("@nyte-ai/core").Resources;
|
|
50
|
+
request<T = string>(input: import("@nyte-ai/schema").ModelRequestInput<T>): Promise<import("@nyte-ai/schema").ModelRequestOutcome<T>>;
|
|
51
|
+
approve(call: import("@nyte-ai/core").RuntimeCall, signal: AbortSignal): Promise<import("@nyte-ai/core").RuntimeVerdict>;
|
|
52
|
+
}): void;
|
|
53
|
+
};
|
|
54
|
+
};
|