@aexol/spectral 0.9.254 → 0.9.255
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/extensions/dataset-uploader/analyzer.d.ts +103 -0
- package/dist/extensions/dataset-uploader/analyzer.d.ts.map +1 -0
- package/dist/extensions/dataset-uploader/analyzer.js +266 -0
- package/dist/extensions/dataset-uploader/cleaner.d.ts +59 -0
- package/dist/extensions/dataset-uploader/cleaner.d.ts.map +1 -0
- package/dist/extensions/dataset-uploader/cleaner.js +118 -0
- package/dist/extensions/dataset-uploader/exporter.d.ts +147 -0
- package/dist/extensions/dataset-uploader/exporter.d.ts.map +1 -0
- package/dist/extensions/dataset-uploader/exporter.js +313 -0
- package/dist/extensions/dataset-uploader/extra-values.d.ts +17 -0
- package/dist/extensions/dataset-uploader/extra-values.d.ts.map +1 -0
- package/dist/extensions/dataset-uploader/extra-values.js +51 -0
- package/dist/extensions/dataset-uploader/index.d.ts +22 -0
- package/dist/extensions/dataset-uploader/index.d.ts.map +1 -0
- package/dist/extensions/dataset-uploader/index.js +247 -0
- package/dist/extensions/dataset-uploader/scrubber.d.ts +34 -0
- package/dist/extensions/dataset-uploader/scrubber.d.ts.map +1 -0
- package/dist/extensions/dataset-uploader/scrubber.js +91 -0
- package/dist/extensions/dataset-uploader/upload.d.ts +105 -0
- package/dist/extensions/dataset-uploader/upload.d.ts.map +1 -0
- package/dist/extensions/dataset-uploader/upload.js +274 -0
- package/dist/generated/zeus/const.d.ts.map +1 -1
- package/dist/generated/zeus/const.js +32 -0
- package/dist/generated/zeus/index.d.ts +166 -0
- package/dist/generated/zeus/index.d.ts.map +1 -1
- package/dist/mcp/commands.d.ts.map +1 -1
- package/dist/mcp/commands.js +3 -0
- package/dist/mcp/direct-tools.d.ts.map +1 -1
- package/dist/mcp/direct-tools.js +4 -3
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +5 -1
- package/dist/mcp/mcp-auth-flow.d.ts +1 -1
- package/dist/mcp/mcp-auth-flow.d.ts.map +1 -1
- package/dist/mcp/mcp-auth-flow.js +13 -0
- package/dist/mcp/mcp-auth-start.d.ts +64 -0
- package/dist/mcp/mcp-auth-start.d.ts.map +1 -0
- package/dist/mcp/mcp-auth-start.js +136 -0
- package/dist/mcp/proxy-modes.d.ts +7 -0
- package/dist/mcp/proxy-modes.d.ts.map +1 -1
- package/dist/mcp/proxy-modes.js +71 -11
- package/dist/mcp/server-manager.d.ts +2 -1
- package/dist/mcp/server-manager.d.ts.map +1 -1
- package/dist/mcp/server-manager.js +8 -4
- package/dist/sdk/coding-agent/core/extensions/native-extensions.d.ts.map +1 -1
- package/dist/sdk/coding-agent/core/extensions/native-extensions.js +10 -0
- package/dist/server/handlers/mcp-auth.d.ts +7 -4
- package/dist/server/handlers/mcp-auth.d.ts.map +1 -1
- package/dist/server/handlers/mcp-auth.js +15 -80
- package/package.json +1 -1
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chunked dataset upload to the team dataset vault (Dataset-uploader.md §3.2 —
|
|
3
|
+
* the `dataset_upload` tool's core).
|
|
4
|
+
*
|
|
5
|
+
* Loads a (cleaned) sharegpt JSONL, validates each line, groups it into
|
|
6
|
+
* batches of `batchSize` and calls the backend MCP tool
|
|
7
|
+
* `upload_dataset_samples` (JSON-RPC tools/call, Bearer auth) per batch,
|
|
8
|
+
* then sums the per-batch `DatasetUploadResult` ({accepted, duplicates,
|
|
9
|
+
* rejected}).
|
|
10
|
+
*
|
|
11
|
+
* Auth/URL resolution mirrors `aexol-mcp.ts`: `~/.spectral/config.json`
|
|
12
|
+
* (`readConfig()`), token = `teamApiKey || userJwt`, URL via `getApiUrl()`,
|
|
13
|
+
* and a single `ensureAuthenticated()` OAuth retry on 401/403.
|
|
14
|
+
*
|
|
15
|
+
* projectId: the Studio binding (`.aexol/aexol.jsonc`) supplies a single
|
|
16
|
+
* batch-level projectId for ALL batches — the exporter does not persist
|
|
17
|
+
* per-sample project provenance in the JSONL, so per-project grouping is not
|
|
18
|
+
* possible without exporter rework (documented in the result notes).
|
|
19
|
+
*
|
|
20
|
+
* Testability: the backend call lives behind `callBackendTool`, overridable
|
|
21
|
+
* per-call (`options.callBackendTool`) or via `setCallBackendToolForTesting`
|
|
22
|
+
* (module-level), so tests can stub the network entirely.
|
|
23
|
+
*/
|
|
24
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
25
|
+
import { getApiUrl, readConfig } from "../../config.js";
|
|
26
|
+
import { AexolMcpClient, AexolMcpError } from "../../mcp-client.js";
|
|
27
|
+
import { ensureAuthenticated } from "../../auth-helper.js";
|
|
28
|
+
import { readStudioBinding } from "../../studio-binding.js";
|
|
29
|
+
import { renderContentToString } from "../aexol-backend-client.js";
|
|
30
|
+
import { loadJsonl } from "./analyzer.js";
|
|
31
|
+
import { scrub } from "./scrubber.js";
|
|
32
|
+
export const DEFAULT_BATCH_SIZE = 50;
|
|
33
|
+
/** Backend MCP tool that ingests one batch of samples. */
|
|
34
|
+
export const BACKEND_UPLOAD_TOOL = "upload_dataset_samples";
|
|
35
|
+
/** Backend MCP tool returning vault stats (best-effort, post-upload). */
|
|
36
|
+
export const BACKEND_VAULT_STATS_TOOL = "dataset_vault_stats";
|
|
37
|
+
export const DATASET_FORMAT = "sharegpt";
|
|
38
|
+
// ---------------------------------------------------------------------------
|
|
39
|
+
// Default backend call (real network path)
|
|
40
|
+
// ---------------------------------------------------------------------------
|
|
41
|
+
let testOverride = null;
|
|
42
|
+
/**
|
|
43
|
+
* Test hook: override the backend call for the whole module. Pass null to
|
|
44
|
+
* restore the real implementation. Prefer `options.callBackendTool` for
|
|
45
|
+
* per-call injection; this exists so tests that drive code through other
|
|
46
|
+
* entry points (e.g. the extension index) can stub the network too.
|
|
47
|
+
*/
|
|
48
|
+
export function setCallBackendToolForTesting(fn) {
|
|
49
|
+
testOverride = fn;
|
|
50
|
+
}
|
|
51
|
+
function resolveCallBackendTool(options) {
|
|
52
|
+
return options.callBackendTool ?? testOverride ?? defaultCallBackendTool;
|
|
53
|
+
}
|
|
54
|
+
function firstJsonContent(content) {
|
|
55
|
+
if (content.length === 0)
|
|
56
|
+
return null;
|
|
57
|
+
const first = content[0];
|
|
58
|
+
if (first.json !== undefined)
|
|
59
|
+
return first.json;
|
|
60
|
+
if (typeof first.text === "string") {
|
|
61
|
+
try {
|
|
62
|
+
return JSON.parse(first.text);
|
|
63
|
+
}
|
|
64
|
+
catch {
|
|
65
|
+
return first.text;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Real backend call: config → token → AexolMcpClient.tools/call, with a
|
|
72
|
+
* single OAuth re-auth retry on 401/403 (same flow as aexol-mcp.ts).
|
|
73
|
+
*/
|
|
74
|
+
async function defaultCallBackendTool(tool, args) {
|
|
75
|
+
const cfg = await readConfig();
|
|
76
|
+
if (!cfg) {
|
|
77
|
+
throw new Error("No Spectral config found — run `spectral login` before uploading. No data was sent.");
|
|
78
|
+
}
|
|
79
|
+
const apiUrl = getApiUrl(cfg.apiUrl);
|
|
80
|
+
let token = cfg.teamApiKey || cfg.userJwt || "";
|
|
81
|
+
if (!token) {
|
|
82
|
+
throw new Error("No auth token in Spectral config — run `spectral login` before uploading. No data was sent.");
|
|
83
|
+
}
|
|
84
|
+
let client = new AexolMcpClient(apiUrl, token);
|
|
85
|
+
try {
|
|
86
|
+
const res = await client.callTool(tool, args);
|
|
87
|
+
if (res.isError === true) {
|
|
88
|
+
throw new Error(`Backend tool "${tool}" reported an error: ${renderContentToString(res.content)}`);
|
|
89
|
+
}
|
|
90
|
+
return firstJsonContent(res.content);
|
|
91
|
+
}
|
|
92
|
+
catch (err) {
|
|
93
|
+
if (err instanceof AexolMcpError && (err.status === 401 || err.status === 403)) {
|
|
94
|
+
const auth = await ensureAuthenticated();
|
|
95
|
+
if (auth.ok && auth.config) {
|
|
96
|
+
const newToken = auth.config.teamApiKey || auth.config.userJwt || "";
|
|
97
|
+
if (newToken && newToken !== token) {
|
|
98
|
+
client = new AexolMcpClient(apiUrl, newToken);
|
|
99
|
+
const res = await client.callTool(tool, args);
|
|
100
|
+
if (res.isError === true) {
|
|
101
|
+
throw new Error(`Backend tool "${tool}" reported an error after re-auth: ${renderContentToString(res.content)}`);
|
|
102
|
+
}
|
|
103
|
+
return firstJsonContent(res.content);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
throw new Error(`Authentication failed (HTTP ${err.status}) and re-authentication did not produce a working token. ` +
|
|
107
|
+
`Run \`spectral login\`. Original error: ${err.message}`);
|
|
108
|
+
}
|
|
109
|
+
throw err;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
// ---------------------------------------------------------------------------
|
|
113
|
+
// Upload
|
|
114
|
+
// ---------------------------------------------------------------------------
|
|
115
|
+
function toInt(value, fallback) {
|
|
116
|
+
return typeof value === "number" && Number.isFinite(value) ? Math.trunc(value) : fallback;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Upload a dataset JSONL to the team vault in chunks.
|
|
120
|
+
*
|
|
121
|
+
* dryRun: parse + validate only — no backend call, `wouldUpload` carries the
|
|
122
|
+
* count, totals stay zero.
|
|
123
|
+
*/
|
|
124
|
+
export async function uploadDataset(options) {
|
|
125
|
+
if (!existsSync(options.inputPath)) {
|
|
126
|
+
throw new Error(`Dataset file not found: ${options.inputPath}`);
|
|
127
|
+
}
|
|
128
|
+
const batchSize = typeof options.batchSize === "number" && options.batchSize > 0
|
|
129
|
+
? Math.trunc(options.batchSize)
|
|
130
|
+
: DEFAULT_BATCH_SIZE;
|
|
131
|
+
const { samples, malformedLines } = loadJsonl(options.inputPath);
|
|
132
|
+
const notes = [];
|
|
133
|
+
// ---- team / project resolution (single projectId for all batches) ------
|
|
134
|
+
const cwd = options.cwd ?? process.cwd();
|
|
135
|
+
let binding = null;
|
|
136
|
+
try {
|
|
137
|
+
binding = await readStudioBinding(cwd);
|
|
138
|
+
}
|
|
139
|
+
catch {
|
|
140
|
+
binding = null;
|
|
141
|
+
}
|
|
142
|
+
const teamId = options.teamId ?? binding?.teamId ?? null;
|
|
143
|
+
const projectId = binding?.projectId ?? null;
|
|
144
|
+
if (projectId) {
|
|
145
|
+
notes.push(`All batches use Studio binding projectId ${projectId} (batch-level provenance).`);
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
notes.push("No Studio binding found — batches are sent without projectId (sessions without a bound project).");
|
|
149
|
+
}
|
|
150
|
+
notes.push("Per-project batching is not supported by the exporter JSONL (no per-sample project provenance); " +
|
|
151
|
+
"a single projectId from the binding is used for all batches.");
|
|
152
|
+
const validSamples = samples.map((s) => JSON.stringify(s));
|
|
153
|
+
const invalidLines = malformedLines;
|
|
154
|
+
// ---- pre-upload residue warning (pattern-only dry-run scrub) ------------
|
|
155
|
+
// Runs in BOTH dry-run and real uploads, before the first network batch.
|
|
156
|
+
// Pattern rules only (no extraValues) — counts only, never values.
|
|
157
|
+
let residueWarning = null;
|
|
158
|
+
try {
|
|
159
|
+
const rawContent = readFileSync(options.inputPath, "utf8");
|
|
160
|
+
const scrubResult = scrub(rawContent);
|
|
161
|
+
const totalRedactions = scrubResult.redactions.reduce((sum, r) => sum + r.count, 0);
|
|
162
|
+
if (totalRedactions > 0) {
|
|
163
|
+
residueWarning = {
|
|
164
|
+
totalRedactions,
|
|
165
|
+
kinds: scrubResult.redactions.map((r) => r.kind),
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
catch {
|
|
170
|
+
// Non-fatal — the warning is advisory.
|
|
171
|
+
}
|
|
172
|
+
const chunkCount = Math.ceil(validSamples.length / batchSize);
|
|
173
|
+
const batches = [];
|
|
174
|
+
const totals = { accepted: 0, duplicates: 0, rejected: 0 };
|
|
175
|
+
let vaultStats;
|
|
176
|
+
if (options.dryRun === true) {
|
|
177
|
+
for (let i = 0; i < chunkCount; i++) {
|
|
178
|
+
const chunk = validSamples.slice(i * batchSize, (i + 1) * batchSize);
|
|
179
|
+
batches.push({ projectId, sent: chunk.length, accepted: 0, duplicates: 0, rejected: 0 });
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
const call = resolveCallBackendTool(options);
|
|
184
|
+
for (let i = 0; i < chunkCount; i++) {
|
|
185
|
+
const chunk = validSamples.slice(i * batchSize, (i + 1) * batchSize);
|
|
186
|
+
const args = {
|
|
187
|
+
format: DATASET_FORMAT,
|
|
188
|
+
samples: chunk,
|
|
189
|
+
};
|
|
190
|
+
if (teamId)
|
|
191
|
+
args.teamId = teamId;
|
|
192
|
+
if (projectId)
|
|
193
|
+
args.projectId = projectId;
|
|
194
|
+
const payload = await call(BACKEND_UPLOAD_TOOL, args);
|
|
195
|
+
const result = (payload && typeof payload === "object" ? payload : {});
|
|
196
|
+
const accepted = toInt(result.accepted, 0);
|
|
197
|
+
const duplicates = toInt(result.duplicates, 0);
|
|
198
|
+
const rejected = toInt(result.rejected, 0);
|
|
199
|
+
batches.push({ projectId, sent: chunk.length, accepted, duplicates, rejected });
|
|
200
|
+
totals.accepted += accepted;
|
|
201
|
+
totals.duplicates += duplicates;
|
|
202
|
+
totals.rejected += rejected;
|
|
203
|
+
}
|
|
204
|
+
// Best-effort vault stats — a failure here never fails the upload.
|
|
205
|
+
try {
|
|
206
|
+
const statsArgs = {};
|
|
207
|
+
if (teamId)
|
|
208
|
+
statsArgs.teamId = teamId;
|
|
209
|
+
vaultStats = await call(BACKEND_VAULT_STATS_TOOL, statsArgs);
|
|
210
|
+
}
|
|
211
|
+
catch {
|
|
212
|
+
vaultStats = undefined;
|
|
213
|
+
notes.push("Vault stats could not be fetched (non-fatal).");
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return {
|
|
217
|
+
inputPath: options.inputPath,
|
|
218
|
+
dryRun: options.dryRun === true,
|
|
219
|
+
totalLines: validSamples.length + invalidLines,
|
|
220
|
+
validSamples: validSamples.length,
|
|
221
|
+
invalidLines,
|
|
222
|
+
batchSize,
|
|
223
|
+
teamId,
|
|
224
|
+
projectId,
|
|
225
|
+
batches,
|
|
226
|
+
totals,
|
|
227
|
+
wouldUpload: validSamples.length,
|
|
228
|
+
...(vaultStats !== undefined ? { vaultStats } : {}),
|
|
229
|
+
...(residueWarning !== null ? { residueWarning } : {}),
|
|
230
|
+
notes,
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
// ---------------------------------------------------------------------------
|
|
234
|
+
// Markdown rendering
|
|
235
|
+
// ---------------------------------------------------------------------------
|
|
236
|
+
/** Render an upload result as a markdown summary for the agent. */
|
|
237
|
+
export function renderUploadMarkdown(result) {
|
|
238
|
+
const lines = [];
|
|
239
|
+
lines.push(`# Dataset upload ${result.dryRun ? "(dry run)" : ""} — ${result.inputPath}`);
|
|
240
|
+
if (result.residueWarning) {
|
|
241
|
+
lines.push("");
|
|
242
|
+
lines.push(`⚠️ residue detected (${result.residueWarning.totalRedactions} redactions across kinds: ${result.residueWarning.kinds.join(", ")}) — run dataset_clean before uploading`);
|
|
243
|
+
}
|
|
244
|
+
lines.push("");
|
|
245
|
+
lines.push(`- Samples: **${result.validSamples}** valid` +
|
|
246
|
+
(result.invalidLines > 0 ? ` (${result.invalidLines} invalid line(s) skipped)` : "") +
|
|
247
|
+
`, batch size ${result.batchSize}`);
|
|
248
|
+
lines.push(`- Scope: team ${result.teamId ?? "(resolved by backend)"} / project ${result.projectId ?? "none"}`);
|
|
249
|
+
if (result.dryRun) {
|
|
250
|
+
lines.push(`- Dry run: **${result.wouldUpload} sample(s) would be uploaded in ${result.batches.length} batch(es)** — no data was sent.`);
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
lines.push(`- Totals: accepted **${result.totals.accepted}**, duplicates **${result.totals.duplicates}**, rejected **${result.totals.rejected}**`);
|
|
254
|
+
lines.push("");
|
|
255
|
+
lines.push("| Batch | Sent | Accepted | Duplicates | Rejected |");
|
|
256
|
+
lines.push("| ---: | ---: | ---: | ---: | ---: |");
|
|
257
|
+
result.batches.forEach((b, i) => {
|
|
258
|
+
lines.push(`| ${i + 1} | ${b.sent} | ${b.accepted} | ${b.duplicates} | ${b.rejected} |`);
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
if (result.vaultStats !== undefined) {
|
|
262
|
+
lines.push("");
|
|
263
|
+
lines.push("## Vault stats");
|
|
264
|
+
lines.push("");
|
|
265
|
+
lines.push("```json");
|
|
266
|
+
lines.push(JSON.stringify(result.vaultStats, null, 2));
|
|
267
|
+
lines.push("```");
|
|
268
|
+
}
|
|
269
|
+
lines.push("");
|
|
270
|
+
lines.push("## Notes");
|
|
271
|
+
for (const note of result.notes)
|
|
272
|
+
lines.push(`- ${note}`);
|
|
273
|
+
return lines.join("\n");
|
|
274
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../src/generated/zeus/const.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"const.d.ts","sourceRoot":"","sources":["../../../src/generated/zeus/const.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAC,GAAG,CAw7B5C,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAC,GAAG,CAw3C1C,CAAA;AAED,eAAO,MAAM,GAAG;;;;CAIf,CAAA"}
|
|
@@ -207,6 +207,8 @@ export const AllTypesProps = {
|
|
|
207
207
|
syntheticDataset: {},
|
|
208
208
|
fineTuneJobs: {},
|
|
209
209
|
fineTuneJob: {},
|
|
210
|
+
datasetSamples: {},
|
|
211
|
+
datasetVaultStats: {},
|
|
210
212
|
dedicatedUsage: {},
|
|
211
213
|
seoSearchAnalytics: {
|
|
212
214
|
input: "SeoSearchAnalyticsInput"
|
|
@@ -480,6 +482,10 @@ export const AllTypesProps = {
|
|
|
480
482
|
cancelFineTuneJob: {},
|
|
481
483
|
deleteFineTuneJob: {},
|
|
482
484
|
deleteSyntheticDataset: {},
|
|
485
|
+
uploadDatasetSamples: {
|
|
486
|
+
input: "UploadDatasetSamplesInput"
|
|
487
|
+
},
|
|
488
|
+
deleteDatasetSample: {},
|
|
483
489
|
deployDedicated: {
|
|
484
490
|
input: "DeployDedicatedInput"
|
|
485
491
|
},
|
|
@@ -538,6 +544,7 @@ export const AllTypesProps = {
|
|
|
538
544
|
GenerateSyntheticDatasetInput: {},
|
|
539
545
|
ImportSyntheticDatasetInput: {},
|
|
540
546
|
StartFineTuneJobInput: {},
|
|
547
|
+
UploadDatasetSamplesInput: {},
|
|
541
548
|
AdminCreateBillingPlanInput: {},
|
|
542
549
|
AdminUpdateBillingPlanInput: {},
|
|
543
550
|
AdminCreateCreditPackInput: {},
|
|
@@ -1108,6 +1115,8 @@ export const ReturnTypes = {
|
|
|
1108
1115
|
syntheticDataset: "SyntheticDataset",
|
|
1109
1116
|
fineTuneJobs: "FineTuneJob",
|
|
1110
1117
|
fineTuneJob: "FineTuneJob",
|
|
1118
|
+
datasetSamples: "DatasetSample",
|
|
1119
|
+
datasetVaultStats: "DatasetVaultStats",
|
|
1111
1120
|
dedicatedHardwareOptions: "DedicatedHardware",
|
|
1112
1121
|
dedicatedUsage: "DedicatedUsageSummary",
|
|
1113
1122
|
latestSpectralRelease: "SpectralRelease",
|
|
@@ -1271,6 +1280,8 @@ export const ReturnTypes = {
|
|
|
1271
1280
|
cancelFineTuneJob: "Boolean",
|
|
1272
1281
|
deleteFineTuneJob: "Boolean",
|
|
1273
1282
|
deleteSyntheticDataset: "Boolean",
|
|
1283
|
+
uploadDatasetSamples: "DatasetUploadResult",
|
|
1284
|
+
deleteDatasetSample: "Boolean",
|
|
1274
1285
|
deployDedicated: "UserModel",
|
|
1275
1286
|
updateDedicated: "UserModel",
|
|
1276
1287
|
destroyDedicated: "UserModel",
|
|
@@ -1470,6 +1481,27 @@ export const ReturnTypes = {
|
|
|
1470
1481
|
message: "String",
|
|
1471
1482
|
outputModelName: "String"
|
|
1472
1483
|
},
|
|
1484
|
+
DatasetSample: {
|
|
1485
|
+
id: "ID",
|
|
1486
|
+
teamId: "ID",
|
|
1487
|
+
projectId: "ID",
|
|
1488
|
+
contentHash: "String",
|
|
1489
|
+
format: "String",
|
|
1490
|
+
sampleCount: "Int",
|
|
1491
|
+
sourceSessionId: "String",
|
|
1492
|
+
createdAt: "DateTime"
|
|
1493
|
+
},
|
|
1494
|
+
DatasetUploadResult: {
|
|
1495
|
+
accepted: "Int",
|
|
1496
|
+
duplicates: "Int",
|
|
1497
|
+
rejected: "Int",
|
|
1498
|
+
sampleIds: "ID"
|
|
1499
|
+
},
|
|
1500
|
+
DatasetVaultStats: {
|
|
1501
|
+
count: "Int",
|
|
1502
|
+
totalBytes: "Int",
|
|
1503
|
+
topTools: "String"
|
|
1504
|
+
},
|
|
1473
1505
|
DedicatedHardware: {
|
|
1474
1506
|
id: "String",
|
|
1475
1507
|
name: "String",
|
|
@@ -1390,6 +1390,14 @@ export type ValueTypes = {
|
|
|
1390
1390
|
id: ValueTypes["ID"] | Variable<any, string>;
|
|
1391
1391
|
teamId: ValueTypes["ID"] | Variable<any, string>;
|
|
1392
1392
|
}, ValueTypes["FineTuneJob"]];
|
|
1393
|
+
datasetSamples?: [{
|
|
1394
|
+
teamId?: ValueTypes["ID"] | undefined | null | Variable<any, string>;
|
|
1395
|
+
limit?: number | undefined | null | Variable<any, string>;
|
|
1396
|
+
offset?: number | undefined | null | Variable<any, string>;
|
|
1397
|
+
}, ValueTypes["DatasetSample"]];
|
|
1398
|
+
datasetVaultStats?: [{
|
|
1399
|
+
teamId?: ValueTypes["ID"] | undefined | null | Variable<any, string>;
|
|
1400
|
+
}, ValueTypes["DatasetVaultStats"]];
|
|
1393
1401
|
dedicatedHardwareOptions?: ValueTypes["DedicatedHardware"];
|
|
1394
1402
|
dedicatedUsage?: [{
|
|
1395
1403
|
userModelId: string | Variable<any, string>;
|
|
@@ -1917,6 +1925,13 @@ export type ValueTypes = {
|
|
|
1917
1925
|
id: ValueTypes["ID"] | Variable<any, string>;
|
|
1918
1926
|
teamId: ValueTypes["ID"] | Variable<any, string>;
|
|
1919
1927
|
}, boolean | `@${string}`];
|
|
1928
|
+
uploadDatasetSamples?: [{
|
|
1929
|
+
input: ValueTypes["UploadDatasetSamplesInput"] | Variable<any, string>;
|
|
1930
|
+
}, ValueTypes["DatasetUploadResult"]];
|
|
1931
|
+
deleteDatasetSample?: [{
|
|
1932
|
+
id: ValueTypes["ID"] | Variable<any, string>;
|
|
1933
|
+
teamId: ValueTypes["ID"] | Variable<any, string>;
|
|
1934
|
+
}, boolean | `@${string}`];
|
|
1920
1935
|
deployDedicated?: [{
|
|
1921
1936
|
input: ValueTypes["DeployDedicatedInput"] | Variable<any, string>;
|
|
1922
1937
|
}, ValueTypes["UserModel"]];
|
|
@@ -2291,6 +2306,33 @@ export type ValueTypes = {
|
|
|
2291
2306
|
__typename?: boolean | `@${string}`;
|
|
2292
2307
|
['...on FineTuneJobEvent']?: Omit<ValueTypes["FineTuneJobEvent"], "...on FineTuneJobEvent">;
|
|
2293
2308
|
}>;
|
|
2309
|
+
["DatasetSample"]: AliasType<{
|
|
2310
|
+
id?: boolean | `@${string}`;
|
|
2311
|
+
teamId?: boolean | `@${string}`;
|
|
2312
|
+
projectId?: boolean | `@${string}`;
|
|
2313
|
+
contentHash?: boolean | `@${string}`;
|
|
2314
|
+
format?: boolean | `@${string}`;
|
|
2315
|
+
sampleCount?: boolean | `@${string}`;
|
|
2316
|
+
sourceSessionId?: boolean | `@${string}`;
|
|
2317
|
+
createdAt?: boolean | `@${string}`;
|
|
2318
|
+
__typename?: boolean | `@${string}`;
|
|
2319
|
+
['...on DatasetSample']?: Omit<ValueTypes["DatasetSample"], "...on DatasetSample">;
|
|
2320
|
+
}>;
|
|
2321
|
+
["DatasetUploadResult"]: AliasType<{
|
|
2322
|
+
accepted?: boolean | `@${string}`;
|
|
2323
|
+
duplicates?: boolean | `@${string}`;
|
|
2324
|
+
rejected?: boolean | `@${string}`;
|
|
2325
|
+
sampleIds?: boolean | `@${string}`;
|
|
2326
|
+
__typename?: boolean | `@${string}`;
|
|
2327
|
+
['...on DatasetUploadResult']?: Omit<ValueTypes["DatasetUploadResult"], "...on DatasetUploadResult">;
|
|
2328
|
+
}>;
|
|
2329
|
+
["DatasetVaultStats"]: AliasType<{
|
|
2330
|
+
count?: boolean | `@${string}`;
|
|
2331
|
+
totalBytes?: boolean | `@${string}`;
|
|
2332
|
+
topTools?: boolean | `@${string}`;
|
|
2333
|
+
__typename?: boolean | `@${string}`;
|
|
2334
|
+
['...on DatasetVaultStats']?: Omit<ValueTypes["DatasetVaultStats"], "...on DatasetVaultStats">;
|
|
2335
|
+
}>;
|
|
2294
2336
|
["DedicatedHardware"]: AliasType<{
|
|
2295
2337
|
id?: boolean | `@${string}`;
|
|
2296
2338
|
name?: boolean | `@${string}`;
|
|
@@ -2353,6 +2395,13 @@ export type ValueTypes = {
|
|
|
2353
2395
|
loraAlpha?: number | undefined | null | Variable<any, string>;
|
|
2354
2396
|
autoCreateUserModel?: boolean | undefined | null | Variable<any, string>;
|
|
2355
2397
|
};
|
|
2398
|
+
["UploadDatasetSamplesInput"]: {
|
|
2399
|
+
teamId?: ValueTypes["ID"] | undefined | null | Variable<any, string>;
|
|
2400
|
+
projectId?: ValueTypes["ID"] | undefined | null | Variable<any, string>;
|
|
2401
|
+
format?: string | undefined | null | Variable<any, string>;
|
|
2402
|
+
samples: Array<string> | Variable<any, string>;
|
|
2403
|
+
sourceSessionId?: string | undefined | null | Variable<any, string>;
|
|
2404
|
+
};
|
|
2356
2405
|
["AdminBillingPlan"]: AliasType<{
|
|
2357
2406
|
id?: boolean | `@${string}`;
|
|
2358
2407
|
planId?: boolean | `@${string}`;
|
|
@@ -4127,6 +4176,14 @@ export type ResolverInputTypes = {
|
|
|
4127
4176
|
id: ResolverInputTypes["ID"];
|
|
4128
4177
|
teamId: ResolverInputTypes["ID"];
|
|
4129
4178
|
}, ResolverInputTypes["FineTuneJob"]];
|
|
4179
|
+
datasetSamples?: [{
|
|
4180
|
+
teamId?: ResolverInputTypes["ID"] | undefined | null;
|
|
4181
|
+
limit?: number | undefined | null;
|
|
4182
|
+
offset?: number | undefined | null;
|
|
4183
|
+
}, ResolverInputTypes["DatasetSample"]];
|
|
4184
|
+
datasetVaultStats?: [{
|
|
4185
|
+
teamId?: ResolverInputTypes["ID"] | undefined | null;
|
|
4186
|
+
}, ResolverInputTypes["DatasetVaultStats"]];
|
|
4130
4187
|
dedicatedHardwareOptions?: ResolverInputTypes["DedicatedHardware"];
|
|
4131
4188
|
dedicatedUsage?: [{
|
|
4132
4189
|
userModelId: string;
|
|
@@ -4653,6 +4710,13 @@ export type ResolverInputTypes = {
|
|
|
4653
4710
|
id: ResolverInputTypes["ID"];
|
|
4654
4711
|
teamId: ResolverInputTypes["ID"];
|
|
4655
4712
|
}, boolean | `@${string}`];
|
|
4713
|
+
uploadDatasetSamples?: [{
|
|
4714
|
+
input: ResolverInputTypes["UploadDatasetSamplesInput"];
|
|
4715
|
+
}, ResolverInputTypes["DatasetUploadResult"]];
|
|
4716
|
+
deleteDatasetSample?: [{
|
|
4717
|
+
id: ResolverInputTypes["ID"];
|
|
4718
|
+
teamId: ResolverInputTypes["ID"];
|
|
4719
|
+
}, boolean | `@${string}`];
|
|
4656
4720
|
deployDedicated?: [{
|
|
4657
4721
|
input: ResolverInputTypes["DeployDedicatedInput"];
|
|
4658
4722
|
}, ResolverInputTypes["UserModel"]];
|
|
@@ -5012,6 +5076,30 @@ export type ResolverInputTypes = {
|
|
|
5012
5076
|
outputModelName?: boolean | `@${string}`;
|
|
5013
5077
|
__typename?: boolean | `@${string}`;
|
|
5014
5078
|
}>;
|
|
5079
|
+
["DatasetSample"]: AliasType<{
|
|
5080
|
+
id?: boolean | `@${string}`;
|
|
5081
|
+
teamId?: boolean | `@${string}`;
|
|
5082
|
+
projectId?: boolean | `@${string}`;
|
|
5083
|
+
contentHash?: boolean | `@${string}`;
|
|
5084
|
+
format?: boolean | `@${string}`;
|
|
5085
|
+
sampleCount?: boolean | `@${string}`;
|
|
5086
|
+
sourceSessionId?: boolean | `@${string}`;
|
|
5087
|
+
createdAt?: boolean | `@${string}`;
|
|
5088
|
+
__typename?: boolean | `@${string}`;
|
|
5089
|
+
}>;
|
|
5090
|
+
["DatasetUploadResult"]: AliasType<{
|
|
5091
|
+
accepted?: boolean | `@${string}`;
|
|
5092
|
+
duplicates?: boolean | `@${string}`;
|
|
5093
|
+
rejected?: boolean | `@${string}`;
|
|
5094
|
+
sampleIds?: boolean | `@${string}`;
|
|
5095
|
+
__typename?: boolean | `@${string}`;
|
|
5096
|
+
}>;
|
|
5097
|
+
["DatasetVaultStats"]: AliasType<{
|
|
5098
|
+
count?: boolean | `@${string}`;
|
|
5099
|
+
totalBytes?: boolean | `@${string}`;
|
|
5100
|
+
topTools?: boolean | `@${string}`;
|
|
5101
|
+
__typename?: boolean | `@${string}`;
|
|
5102
|
+
}>;
|
|
5015
5103
|
["DedicatedHardware"]: AliasType<{
|
|
5016
5104
|
id?: boolean | `@${string}`;
|
|
5017
5105
|
name?: boolean | `@${string}`;
|
|
@@ -5071,6 +5159,13 @@ export type ResolverInputTypes = {
|
|
|
5071
5159
|
loraAlpha?: number | undefined | null;
|
|
5072
5160
|
autoCreateUserModel?: boolean | undefined | null;
|
|
5073
5161
|
};
|
|
5162
|
+
["UploadDatasetSamplesInput"]: {
|
|
5163
|
+
teamId?: ResolverInputTypes["ID"] | undefined | null;
|
|
5164
|
+
projectId?: ResolverInputTypes["ID"] | undefined | null;
|
|
5165
|
+
format?: string | undefined | null;
|
|
5166
|
+
samples: Array<string>;
|
|
5167
|
+
sourceSessionId?: string | undefined | null;
|
|
5168
|
+
};
|
|
5074
5169
|
["AdminBillingPlan"]: AliasType<{
|
|
5075
5170
|
id?: boolean | `@${string}`;
|
|
5076
5171
|
planId?: boolean | `@${string}`;
|
|
@@ -6556,6 +6651,8 @@ export type ModelTypes = {
|
|
|
6556
6651
|
syntheticDataset?: ModelTypes["SyntheticDataset"] | undefined | null;
|
|
6557
6652
|
fineTuneJobs: Array<ModelTypes["FineTuneJob"]>;
|
|
6558
6653
|
fineTuneJob?: ModelTypes["FineTuneJob"] | undefined | null;
|
|
6654
|
+
datasetSamples: Array<ModelTypes["DatasetSample"]>;
|
|
6655
|
+
datasetVaultStats: ModelTypes["DatasetVaultStats"];
|
|
6559
6656
|
dedicatedHardwareOptions: Array<ModelTypes["DedicatedHardware"]>;
|
|
6560
6657
|
dedicatedUsage: ModelTypes["DedicatedUsageSummary"];
|
|
6561
6658
|
latestSpectralRelease?: ModelTypes["SpectralRelease"] | undefined | null;
|
|
@@ -6719,6 +6816,8 @@ export type ModelTypes = {
|
|
|
6719
6816
|
cancelFineTuneJob: boolean;
|
|
6720
6817
|
deleteFineTuneJob: boolean;
|
|
6721
6818
|
deleteSyntheticDataset: boolean;
|
|
6819
|
+
uploadDatasetSamples: ModelTypes["DatasetUploadResult"];
|
|
6820
|
+
deleteDatasetSample: boolean;
|
|
6722
6821
|
deployDedicated: ModelTypes["UserModel"];
|
|
6723
6822
|
updateDedicated: ModelTypes["UserModel"];
|
|
6724
6823
|
destroyDedicated: ModelTypes["UserModel"];
|
|
@@ -6993,6 +7092,27 @@ export type ModelTypes = {
|
|
|
6993
7092
|
message?: string | undefined | null;
|
|
6994
7093
|
outputModelName?: string | undefined | null;
|
|
6995
7094
|
};
|
|
7095
|
+
["DatasetSample"]: {
|
|
7096
|
+
id: ModelTypes["ID"];
|
|
7097
|
+
teamId: ModelTypes["ID"];
|
|
7098
|
+
projectId?: ModelTypes["ID"] | undefined | null;
|
|
7099
|
+
contentHash: string;
|
|
7100
|
+
format: string;
|
|
7101
|
+
sampleCount: number;
|
|
7102
|
+
sourceSessionId?: string | undefined | null;
|
|
7103
|
+
createdAt: ModelTypes["DateTime"];
|
|
7104
|
+
};
|
|
7105
|
+
["DatasetUploadResult"]: {
|
|
7106
|
+
accepted: number;
|
|
7107
|
+
duplicates: number;
|
|
7108
|
+
rejected: number;
|
|
7109
|
+
sampleIds: Array<ModelTypes["ID"]>;
|
|
7110
|
+
};
|
|
7111
|
+
["DatasetVaultStats"]: {
|
|
7112
|
+
count: number;
|
|
7113
|
+
totalBytes: number;
|
|
7114
|
+
topTools: Array<string>;
|
|
7115
|
+
};
|
|
6996
7116
|
["DedicatedHardware"]: {
|
|
6997
7117
|
id: string;
|
|
6998
7118
|
name: string;
|
|
@@ -7049,6 +7169,13 @@ export type ModelTypes = {
|
|
|
7049
7169
|
loraAlpha?: number | undefined | null;
|
|
7050
7170
|
autoCreateUserModel?: boolean | undefined | null;
|
|
7051
7171
|
};
|
|
7172
|
+
["UploadDatasetSamplesInput"]: {
|
|
7173
|
+
teamId?: ModelTypes["ID"] | undefined | null;
|
|
7174
|
+
projectId?: ModelTypes["ID"] | undefined | null;
|
|
7175
|
+
format?: string | undefined | null;
|
|
7176
|
+
samples: Array<string>;
|
|
7177
|
+
sourceSessionId?: string | undefined | null;
|
|
7178
|
+
};
|
|
7052
7179
|
["AdminBillingPlan"]: {
|
|
7053
7180
|
id: string;
|
|
7054
7181
|
planId: string;
|
|
@@ -8602,6 +8729,8 @@ export type GraphQLTypes = {
|
|
|
8602
8729
|
syntheticDataset?: GraphQLTypes["SyntheticDataset"] | undefined | null;
|
|
8603
8730
|
fineTuneJobs: Array<GraphQLTypes["FineTuneJob"]>;
|
|
8604
8731
|
fineTuneJob?: GraphQLTypes["FineTuneJob"] | undefined | null;
|
|
8732
|
+
datasetSamples: Array<GraphQLTypes["DatasetSample"]>;
|
|
8733
|
+
datasetVaultStats: GraphQLTypes["DatasetVaultStats"];
|
|
8605
8734
|
dedicatedHardwareOptions: Array<GraphQLTypes["DedicatedHardware"]>;
|
|
8606
8735
|
dedicatedUsage: GraphQLTypes["DedicatedUsageSummary"];
|
|
8607
8736
|
latestSpectralRelease?: GraphQLTypes["SpectralRelease"] | undefined | null;
|
|
@@ -8767,6 +8896,8 @@ export type GraphQLTypes = {
|
|
|
8767
8896
|
cancelFineTuneJob: boolean;
|
|
8768
8897
|
deleteFineTuneJob: boolean;
|
|
8769
8898
|
deleteSyntheticDataset: boolean;
|
|
8899
|
+
uploadDatasetSamples: GraphQLTypes["DatasetUploadResult"];
|
|
8900
|
+
deleteDatasetSample: boolean;
|
|
8770
8901
|
deployDedicated: GraphQLTypes["UserModel"];
|
|
8771
8902
|
updateDedicated: GraphQLTypes["UserModel"];
|
|
8772
8903
|
destroyDedicated: GraphQLTypes["UserModel"];
|
|
@@ -9076,6 +9207,33 @@ export type GraphQLTypes = {
|
|
|
9076
9207
|
outputModelName?: string | undefined | null;
|
|
9077
9208
|
['...on FineTuneJobEvent']: Omit<GraphQLTypes["FineTuneJobEvent"], "...on FineTuneJobEvent">;
|
|
9078
9209
|
};
|
|
9210
|
+
["DatasetSample"]: {
|
|
9211
|
+
__typename: "DatasetSample";
|
|
9212
|
+
id: GraphQLTypes["ID"];
|
|
9213
|
+
teamId: GraphQLTypes["ID"];
|
|
9214
|
+
projectId?: GraphQLTypes["ID"] | undefined | null;
|
|
9215
|
+
contentHash: string;
|
|
9216
|
+
format: string;
|
|
9217
|
+
sampleCount: number;
|
|
9218
|
+
sourceSessionId?: string | undefined | null;
|
|
9219
|
+
createdAt: GraphQLTypes["DateTime"];
|
|
9220
|
+
['...on DatasetSample']: Omit<GraphQLTypes["DatasetSample"], "...on DatasetSample">;
|
|
9221
|
+
};
|
|
9222
|
+
["DatasetUploadResult"]: {
|
|
9223
|
+
__typename: "DatasetUploadResult";
|
|
9224
|
+
accepted: number;
|
|
9225
|
+
duplicates: number;
|
|
9226
|
+
rejected: number;
|
|
9227
|
+
sampleIds: Array<GraphQLTypes["ID"]>;
|
|
9228
|
+
['...on DatasetUploadResult']: Omit<GraphQLTypes["DatasetUploadResult"], "...on DatasetUploadResult">;
|
|
9229
|
+
};
|
|
9230
|
+
["DatasetVaultStats"]: {
|
|
9231
|
+
__typename: "DatasetVaultStats";
|
|
9232
|
+
count: number;
|
|
9233
|
+
totalBytes: number;
|
|
9234
|
+
topTools: Array<string>;
|
|
9235
|
+
['...on DatasetVaultStats']: Omit<GraphQLTypes["DatasetVaultStats"], "...on DatasetVaultStats">;
|
|
9236
|
+
};
|
|
9079
9237
|
["DedicatedHardware"]: {
|
|
9080
9238
|
__typename: "DedicatedHardware";
|
|
9081
9239
|
id: string;
|
|
@@ -9138,6 +9296,13 @@ export type GraphQLTypes = {
|
|
|
9138
9296
|
loraAlpha?: number | undefined | null;
|
|
9139
9297
|
autoCreateUserModel?: boolean | undefined | null;
|
|
9140
9298
|
};
|
|
9299
|
+
["UploadDatasetSamplesInput"]: {
|
|
9300
|
+
teamId?: GraphQLTypes["ID"] | undefined | null;
|
|
9301
|
+
projectId?: GraphQLTypes["ID"] | undefined | null;
|
|
9302
|
+
format?: string | undefined | null;
|
|
9303
|
+
samples: Array<string>;
|
|
9304
|
+
sourceSessionId?: string | undefined | null;
|
|
9305
|
+
};
|
|
9141
9306
|
["AdminBillingPlan"]: {
|
|
9142
9307
|
__typename: "AdminBillingPlan";
|
|
9143
9308
|
id: string;
|
|
@@ -10076,6 +10241,7 @@ type ZEUS_VARIABLES = {
|
|
|
10076
10241
|
["GenerateSyntheticDatasetInput"]: ValueTypes["GenerateSyntheticDatasetInput"];
|
|
10077
10242
|
["ImportSyntheticDatasetInput"]: ValueTypes["ImportSyntheticDatasetInput"];
|
|
10078
10243
|
["StartFineTuneJobInput"]: ValueTypes["StartFineTuneJobInput"];
|
|
10244
|
+
["UploadDatasetSamplesInput"]: ValueTypes["UploadDatasetSamplesInput"];
|
|
10079
10245
|
["AdminCreateBillingPlanInput"]: ValueTypes["AdminCreateBillingPlanInput"];
|
|
10080
10246
|
["AdminUpdateBillingPlanInput"]: ValueTypes["AdminUpdateBillingPlanInput"];
|
|
10081
10247
|
["AdminCreateCreditPackInput"]: ValueTypes["AdminCreateCreditPackInput"];
|