@ultrst-armada/kloks 1.6.0 → 1.7.1
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/.krusbl-release-attestation.json +3 -3
- package/package.json +1 -1
- package/packages/backend/dist/{BaseStorageAdapter-tosOoSUg.d.ts → BaseStorageAdapter-6x_BQiB3.d.ts} +6 -1
- package/packages/backend/dist/{chunk-OZDYAEH4.js → chunk-3IUA66RS.js} +219 -3
- package/packages/backend/dist/{chunk-E72GXBXF.js → chunk-6K75XXFD.js} +9 -200
- package/packages/backend/dist/{chunk-GPXV4GBD.js → chunk-6W7OAGNV.js} +59 -75
- package/packages/backend/dist/{chunk-GQUNN7SA.js → chunk-7ZT2ZPPH.js} +7 -5
- package/packages/backend/dist/{chunk-DBZVGMJ7.js → chunk-F6IDQLC2.js} +2 -2
- package/packages/backend/dist/chunk-JUPWFW7V.js +134 -0
- package/packages/backend/dist/{chunk-J2J24JVC.js → chunk-R45CEV46.js} +210 -153
- package/packages/backend/dist/{chunk-3HZYAZF4.js → chunk-SQGBAWZN.js} +97 -7
- package/packages/backend/dist/chunk-VAFCR2MS.js +203 -0
- package/packages/backend/dist/{chunk-VDROUXFT.js → chunk-XHADDA75.js} +19 -13
- package/packages/backend/dist/development/index.d.ts +54 -1
- package/packages/backend/dist/development/index.js +7 -1
- package/packages/backend/dist/index.d.ts +5 -5
- package/packages/backend/dist/index.js +38 -211
- package/packages/backend/dist/krnl-services.js +6 -5
- package/packages/backend/dist/services/index.js +4 -3
- package/packages/backend/dist/srkl/index.d.ts +55 -2
- package/packages/backend/dist/srkl/index.js +3 -2
- package/packages/backend/dist/storage/index.d.ts +35 -3
- package/packages/backend/dist/storage/index.js +12 -3
- package/packages/backend/dist/workspace/index.d.ts +27 -33
- package/packages/backend/dist/workspace/index.js +3 -2
- package/packages/backend/kloks.manifest.json +25 -0
- package/packages/client/dist/index.d.ts +34 -1
- package/packages/client/dist/index.js +116 -0
- package/packages/backend/dist/chunk-LS3HWJBX.js +0 -0
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
// src/core/unifiedDb.ts
|
|
2
|
+
var neon;
|
|
3
|
+
function cleanDbUrl(url) {
|
|
4
|
+
if (!url || typeof url !== "string") return "";
|
|
5
|
+
return url.trim().replace(/^["']|["']$/g, "");
|
|
6
|
+
}
|
|
7
|
+
function getUnifiedDbUrl(env) {
|
|
8
|
+
const fromEnv = cleanDbUrl(env?.SYSTEM_DATABASE_URL_1) || cleanDbUrl(env?.DATABASE_URL) || cleanDbUrl(env?.SYSTEM_DATABASE_URL_2);
|
|
9
|
+
if (fromEnv) return fromEnv;
|
|
10
|
+
if (typeof process !== "undefined" && process.env) {
|
|
11
|
+
return cleanDbUrl(process.env.SYSTEM_DATABASE_URL_1) || cleanDbUrl(process.env.DATABASE_URL) || cleanDbUrl(process.env.SYSTEM_DATABASE_URL_2) || cleanDbUrl(process.env.SYSTEM_DATABASE_URL_3) || "";
|
|
12
|
+
}
|
|
13
|
+
return "";
|
|
14
|
+
}
|
|
15
|
+
async function queryUnifiedDb(sqlText, params = [], env) {
|
|
16
|
+
const dbUrl = getUnifiedDbUrl(env);
|
|
17
|
+
if (!dbUrl) {
|
|
18
|
+
throw new Error("[UnifiedDB] No database URL configured in environment.");
|
|
19
|
+
}
|
|
20
|
+
if (!neon) {
|
|
21
|
+
const mod = await import("@neondatabase/serverless");
|
|
22
|
+
neon = mod.neon;
|
|
23
|
+
}
|
|
24
|
+
const sql = neon(dbUrl);
|
|
25
|
+
try {
|
|
26
|
+
const rows = await (sql.query ? sql.query(sqlText, params) : sql(sqlText, params));
|
|
27
|
+
return {
|
|
28
|
+
rows: Array.isArray(rows) ? rows : [],
|
|
29
|
+
rowCount: Array.isArray(rows) ? rows.length : 0
|
|
30
|
+
};
|
|
31
|
+
} catch (err) {
|
|
32
|
+
console.error("[UnifiedDB] Query execution error:", err.message);
|
|
33
|
+
throw err;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// src/core/b2DirectCore.ts
|
|
38
|
+
var authCache = /* @__PURE__ */ new Map();
|
|
39
|
+
var bucketIdCache = /* @__PURE__ */ new Map();
|
|
40
|
+
async function authorizeB2(keyId, applicationKey) {
|
|
41
|
+
const cacheKey = `${keyId.trim()}:${applicationKey.trim()}`;
|
|
42
|
+
const cached = authCache.get(cacheKey);
|
|
43
|
+
if (cached && Date.now() < cached.expiresAt) return cached.auth;
|
|
44
|
+
const authHeader = typeof Buffer !== "undefined" ? Buffer.from(`${keyId.trim()}:${applicationKey.trim()}`).toString("base64") : btoa(`${keyId.trim()}:${applicationKey.trim()}`);
|
|
45
|
+
let res = await fetch("https://api.backblazeb2.com/b2api/v2/b2_authorize_account", {
|
|
46
|
+
headers: { Authorization: `Basic ${authHeader}` },
|
|
47
|
+
signal: AbortSignal.timeout(1e4)
|
|
48
|
+
});
|
|
49
|
+
if (!res.ok) {
|
|
50
|
+
res = await fetch("https://api.backblazeb2.com/b2api/v4/b2_authorize_account", {
|
|
51
|
+
headers: { Authorization: `Basic ${authHeader}` },
|
|
52
|
+
signal: AbortSignal.timeout(1e4)
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
if (!res.ok) {
|
|
56
|
+
const errText = await res.text();
|
|
57
|
+
throw new Error(`Backblaze B2 authorization failed (${res.status}): ${errText}`);
|
|
58
|
+
}
|
|
59
|
+
const data = await res.json();
|
|
60
|
+
const auth = {
|
|
61
|
+
accountId: data.accountId,
|
|
62
|
+
authorizationToken: data.authorizationToken,
|
|
63
|
+
apiUrl: (data.apiInfo?.storageApi?.apiUrl || data.apiUrl || "https://api.backblazeb2.com").replace(/\/+$/, ""),
|
|
64
|
+
downloadUrl: (data.apiInfo?.storageApi?.downloadUrl || data.downloadUrl || data.apiUrl || "https://f003.backblazeb2.com").replace(/\/+$/, ""),
|
|
65
|
+
s3ApiUrl: data.apiInfo?.storageApi?.s3ApiUrl || data.s3ApiUrl,
|
|
66
|
+
allowed: data.apiInfo?.storageApi?.allowed || data.allowed
|
|
67
|
+
};
|
|
68
|
+
authCache.set(cacheKey, { auth, expiresAt: Date.now() + 20 * 60 * 1e3 });
|
|
69
|
+
return auth;
|
|
70
|
+
}
|
|
71
|
+
async function b2ListBuckets(keyId, applicationKey, bucketId, bucketName) {
|
|
72
|
+
const auth = await authorizeB2(keyId, applicationKey);
|
|
73
|
+
const rBucketId = bucketId || auth.allowed?.bucketId || auth.allowed?.buckets?.[0]?.bucketId;
|
|
74
|
+
const rBucketName = bucketName || auth.allowed?.bucketName || auth.allowed?.buckets?.[0]?.bucketName;
|
|
75
|
+
if (!auth.allowed?.bucketId && !auth.allowed?.bucketName) {
|
|
76
|
+
try {
|
|
77
|
+
const res = await fetch(`${auth.apiUrl}/b2api/v2/b2_list_buckets`, {
|
|
78
|
+
method: "POST",
|
|
79
|
+
headers: { Authorization: auth.authorizationToken, "Content-Type": "application/json" },
|
|
80
|
+
body: JSON.stringify({ accountId: auth.accountId }),
|
|
81
|
+
signal: AbortSignal.timeout(8e3)
|
|
82
|
+
});
|
|
83
|
+
if (res.ok) {
|
|
84
|
+
const data = await res.json();
|
|
85
|
+
if (Array.isArray(data.buckets) && data.buckets.length > 0) return data.buckets;
|
|
86
|
+
}
|
|
87
|
+
} catch (err) {
|
|
88
|
+
console.warn("[B2DirectCore] list_buckets query failed:", err.message);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (rBucketId || rBucketName) {
|
|
92
|
+
const body = { accountId: auth.accountId };
|
|
93
|
+
if (rBucketId) body.bucketId = rBucketId;
|
|
94
|
+
else if (rBucketName) body.bucketName = rBucketName;
|
|
95
|
+
try {
|
|
96
|
+
const res = await fetch(`${auth.apiUrl}/b2api/v2/b2_list_buckets`, {
|
|
97
|
+
method: "POST",
|
|
98
|
+
headers: { Authorization: auth.authorizationToken, "Content-Type": "application/json" },
|
|
99
|
+
body: JSON.stringify(body),
|
|
100
|
+
signal: AbortSignal.timeout(8e3)
|
|
101
|
+
});
|
|
102
|
+
if (res.ok) {
|
|
103
|
+
const data = await res.json();
|
|
104
|
+
if (Array.isArray(data.buckets) && data.buckets.length > 0) return data.buckets;
|
|
105
|
+
}
|
|
106
|
+
} catch {
|
|
107
|
+
}
|
|
108
|
+
return [{
|
|
109
|
+
accountId: auth.accountId,
|
|
110
|
+
bucketId: rBucketId || "restricted",
|
|
111
|
+
bucketName: rBucketName || (bucketName || "default-bucket"),
|
|
112
|
+
bucketType: "allPrivate"
|
|
113
|
+
}];
|
|
114
|
+
}
|
|
115
|
+
return [];
|
|
116
|
+
}
|
|
117
|
+
async function getB2BucketId(keyId, applicationKey, bucketName) {
|
|
118
|
+
const cacheKey = `${keyId.trim()}:${bucketName.trim()}`;
|
|
119
|
+
if (bucketIdCache.has(cacheKey)) return bucketIdCache.get(cacheKey);
|
|
120
|
+
const buckets = await b2ListBuckets(keyId, applicationKey, void 0, bucketName);
|
|
121
|
+
const match = buckets.find((b) => b.bucketName === bucketName);
|
|
122
|
+
if (!match) throw new Error(`B2 bucket "${bucketName}" not found in account`);
|
|
123
|
+
bucketIdCache.set(cacheKey, match.bucketId);
|
|
124
|
+
return match.bucketId;
|
|
125
|
+
}
|
|
126
|
+
async function b2UploadFile(keyId, applicationKey, bucketName, fileName, buffer, contentType = "b2/x-auto") {
|
|
127
|
+
const auth = await authorizeB2(keyId, applicationKey);
|
|
128
|
+
const bucketId = await getB2BucketId(keyId, applicationKey, bucketName);
|
|
129
|
+
const urlRes = await fetch(`${auth.apiUrl}/b2api/v2/b2_get_upload_url`, {
|
|
130
|
+
method: "POST",
|
|
131
|
+
headers: { Authorization: auth.authorizationToken, "Content-Type": "application/json" },
|
|
132
|
+
body: JSON.stringify({ bucketId })
|
|
133
|
+
});
|
|
134
|
+
if (!urlRes.ok) throw new Error(`B2 get upload url failed (${urlRes.status})`);
|
|
135
|
+
const { uploadUrl, authorizationToken } = await urlRes.json();
|
|
136
|
+
const encodedFileName = encodeURIComponent(fileName).replace(/%2F/g, "/");
|
|
137
|
+
const uploadRes = await fetch(uploadUrl, {
|
|
138
|
+
method: "POST",
|
|
139
|
+
headers: {
|
|
140
|
+
Authorization: authorizationToken,
|
|
141
|
+
"X-Bz-File-Name": encodedFileName,
|
|
142
|
+
"Content-Type": contentType,
|
|
143
|
+
"Content-Length": String(buffer.byteLength),
|
|
144
|
+
"X-Bz-Content-Sha1": "do_not_verify"
|
|
145
|
+
},
|
|
146
|
+
body: buffer
|
|
147
|
+
});
|
|
148
|
+
if (!uploadRes.ok) throw new Error(`B2 upload failed for ${fileName} (${uploadRes.status}): ${await uploadRes.text()}`);
|
|
149
|
+
return uploadRes.json();
|
|
150
|
+
}
|
|
151
|
+
async function b2DownloadFile(keyId, applicationKey, bucketName, fileName) {
|
|
152
|
+
const auth = await authorizeB2(keyId, applicationKey);
|
|
153
|
+
const encodedName = encodeURIComponent(fileName).replace(/%2F/g, "/");
|
|
154
|
+
const res = await fetch(`${auth.downloadUrl}/file/${bucketName}/${encodedName}`, { headers: { Authorization: auth.authorizationToken } });
|
|
155
|
+
if (res.status === 404) return null;
|
|
156
|
+
if (!res.ok) throw new Error(`B2 download failed for ${fileName} (${res.status})`);
|
|
157
|
+
return new Uint8Array(await res.arrayBuffer());
|
|
158
|
+
}
|
|
159
|
+
async function b2ListFileNames(keyId, applicationKey, bucketName, prefix = "") {
|
|
160
|
+
const auth = await authorizeB2(keyId, applicationKey);
|
|
161
|
+
const bucketId = await getB2BucketId(keyId, applicationKey, bucketName);
|
|
162
|
+
const res = await fetch(`${auth.apiUrl}/b2api/v2/b2_list_file_names`, {
|
|
163
|
+
method: "POST",
|
|
164
|
+
headers: { Authorization: auth.authorizationToken, "Content-Type": "application/json" },
|
|
165
|
+
body: JSON.stringify({ bucketId, prefix, maxFileCount: 1e3 })
|
|
166
|
+
});
|
|
167
|
+
if (!res.ok) throw new Error(`B2 list files failed (${res.status})`);
|
|
168
|
+
const data = await res.json();
|
|
169
|
+
return data.files || [];
|
|
170
|
+
}
|
|
171
|
+
async function b2DeleteFileVersion(keyId, applicationKey, fileName, fileId) {
|
|
172
|
+
const auth = await authorizeB2(keyId, applicationKey);
|
|
173
|
+
const res = await fetch(`${auth.apiUrl}/b2api/v2/b2_delete_file_version`, {
|
|
174
|
+
method: "POST",
|
|
175
|
+
headers: { Authorization: auth.authorizationToken, "Content-Type": "application/json" },
|
|
176
|
+
body: JSON.stringify({ fileName, fileId })
|
|
177
|
+
});
|
|
178
|
+
if (!res.ok) throw new Error(`B2 delete file version failed (${res.status})`);
|
|
179
|
+
return res.json();
|
|
180
|
+
}
|
|
181
|
+
async function b2DeleteFolder(keyId, applicationKey, bucketName, folderPrefix) {
|
|
182
|
+
const cleanPrefix = folderPrefix.replace(/\/+$/, "") + "/";
|
|
183
|
+
const files = await b2ListFileNames(keyId, applicationKey, bucketName, cleanPrefix);
|
|
184
|
+
let deletedCount = 0;
|
|
185
|
+
for (const file of files) {
|
|
186
|
+
await b2DeleteFileVersion(keyId, applicationKey, file.fileName, file.fileId);
|
|
187
|
+
deletedCount++;
|
|
188
|
+
}
|
|
189
|
+
return { success: true, deletedCount };
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export {
|
|
193
|
+
cleanDbUrl,
|
|
194
|
+
getUnifiedDbUrl,
|
|
195
|
+
queryUnifiedDb,
|
|
196
|
+
b2ListBuckets,
|
|
197
|
+
getB2BucketId,
|
|
198
|
+
b2UploadFile,
|
|
199
|
+
b2DownloadFile,
|
|
200
|
+
b2ListFileNames,
|
|
201
|
+
b2DeleteFileVersion,
|
|
202
|
+
b2DeleteFolder
|
|
203
|
+
};
|
|
@@ -33,16 +33,16 @@ async function getSrklAccounts(userId, service, queryDb) {
|
|
|
33
33
|
const uRes = await queryDb(`SELECT app_profiles FROM "ultrst-users" WHERE id = $1 LIMIT 1`, [userId]);
|
|
34
34
|
if (uRes.rows.length > 0) {
|
|
35
35
|
const p = typeof uRes.rows[0].app_profiles === "string" ? JSON.parse(uRes.rows[0].app_profiles) : uRes.rows[0].app_profiles || {};
|
|
36
|
-
const pool = [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
const pool = [];
|
|
37
|
+
for (const app of Object.values(p)) {
|
|
38
|
+
if (app && typeof app === "object" && Array.isArray(app.storage_connections)) {
|
|
39
|
+
pool.push(...app.storage_connections);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
42
|
for (const conn of pool) {
|
|
43
43
|
if (service && !conn.provider?.toLowerCase().includes(service.toLowerCase())) continue;
|
|
44
|
-
const kId = (conn.b2KeyId || conn.keyId || conn.accessKeyId || "").trim();
|
|
45
|
-
const key = kId ? `key:${kId}` : `id:${conn.id}`;
|
|
44
|
+
const kId = (conn.b2KeyId || conn.keyId || conn.accessKeyId || conn.googleEmail || "").trim();
|
|
45
|
+
const key = kId ? `key:${kId}:${conn.googleRootFolderId || conn.b2BucketName || ""}` : `id:${conn.id}`;
|
|
46
46
|
if (!seenKeys.has(key)) {
|
|
47
47
|
seenKeys.add(key);
|
|
48
48
|
accounts.push({
|
|
@@ -55,7 +55,13 @@ async function getSrklAccounts(userId, service, queryDb) {
|
|
|
55
55
|
applicationKey: conn.b2ApplicationKey || conn.appKey,
|
|
56
56
|
bucketName: conn.b2BucketName || conn.bucketName,
|
|
57
57
|
region: conn.b2Region || conn.region,
|
|
58
|
-
endpoint: conn.b2Endpoint || conn.endpoint
|
|
58
|
+
endpoint: conn.b2Endpoint || conn.endpoint,
|
|
59
|
+
email: conn.googleEmail,
|
|
60
|
+
rootFolderId: conn.googleRootFolderId,
|
|
61
|
+
rootFolderName: conn.googleRootFolderName,
|
|
62
|
+
accessToken: conn.googleAccessToken,
|
|
63
|
+
accessTokenExpiresAt: conn.googleAccessTokenExpiresAt,
|
|
64
|
+
refreshToken: conn.googleRefreshToken
|
|
59
65
|
}
|
|
60
66
|
});
|
|
61
67
|
}
|
|
@@ -87,12 +93,12 @@ async function getSrklAccounts(userId, service, queryDb) {
|
|
|
87
93
|
}
|
|
88
94
|
return { success: true, deploymentUrl: srklUrl, count: accounts.length, accounts };
|
|
89
95
|
}
|
|
90
|
-
async function srklListBackblazeBuckets(keyId, applicationKey, _bucketId, _bucketName, userId, queryDb) {
|
|
96
|
+
async function srklListBackblazeBuckets(keyId, applicationKey, _bucketId, _bucketName, userId, queryDb, accountId) {
|
|
91
97
|
let resolvedKeyId = (keyId || "").trim();
|
|
92
98
|
let resolvedAppKey = (applicationKey || "").trim();
|
|
93
|
-
if ((!resolvedKeyId || !resolvedAppKey) && userId
|
|
94
|
-
const accountsRes = await getSrklAccounts(userId, "backblaze", queryDb);
|
|
95
|
-
const matched = accountsRes.accounts.find((a) => (a.credentials?.keyId || a.credentials?.b2KeyId) === resolvedKeyId) || accountsRes.accounts[0];
|
|
99
|
+
if ((!resolvedKeyId || !resolvedAppKey) && (userId || accountId)) {
|
|
100
|
+
const accountsRes = await getSrklAccounts(userId || "", "backblaze", queryDb);
|
|
101
|
+
const matched = accountsRes.accounts.find((a) => accountId && a.id === accountId || resolvedKeyId && (a.credentials?.keyId || a.credentials?.b2KeyId) === resolvedKeyId) || accountsRes.accounts[0];
|
|
96
102
|
if (matched) {
|
|
97
103
|
resolvedKeyId = matched.credentials?.keyId || matched.credentials?.b2KeyId || resolvedKeyId;
|
|
98
104
|
resolvedAppKey = matched.credentials?.applicationKey || matched.credentials?.b2ApplicationKey || resolvedAppKey;
|
|
@@ -245,4 +245,57 @@ declare const TypeScriptLanguageServerServiceFacade: {
|
|
|
245
245
|
execute: <TIn = unknown, TOut = unknown>(op: string, input?: TIn) => Promise<TOut>;
|
|
246
246
|
};
|
|
247
247
|
|
|
248
|
-
|
|
248
|
+
type AgentHarnessProvider = 'deepseek' | 'openai' | 'google';
|
|
249
|
+
interface AgentHarnessRunInput {
|
|
250
|
+
provider: AgentHarnessProvider;
|
|
251
|
+
prompt: string;
|
|
252
|
+
cwd?: string;
|
|
253
|
+
profile?: string;
|
|
254
|
+
timeoutMs?: number;
|
|
255
|
+
env?: Record<string, string>;
|
|
256
|
+
}
|
|
257
|
+
interface AgentHarnessResult {
|
|
258
|
+
provider: AgentHarnessProvider;
|
|
259
|
+
ok: boolean;
|
|
260
|
+
exitCode: number;
|
|
261
|
+
output: string;
|
|
262
|
+
durationMs: number;
|
|
263
|
+
command?: string;
|
|
264
|
+
}
|
|
265
|
+
interface AgentHarnessProviderInfo {
|
|
266
|
+
id: AgentHarnessProvider;
|
|
267
|
+
name: string;
|
|
268
|
+
package: string;
|
|
269
|
+
capabilities: string[];
|
|
270
|
+
implemented: boolean;
|
|
271
|
+
}
|
|
272
|
+
interface AgentHarnessServiceContract {
|
|
273
|
+
providers(): AgentHarnessProviderInfo[];
|
|
274
|
+
run(input: AgentHarnessRunInput): Promise<AgentHarnessResult>;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
declare class AgentHarnessRuntime {
|
|
278
|
+
private readonly runtime;
|
|
279
|
+
constructor(runtime?: WebContainerRuntime);
|
|
280
|
+
providers(): {
|
|
281
|
+
capabilities: string[];
|
|
282
|
+
id: AgentHarnessProvider;
|
|
283
|
+
name: string;
|
|
284
|
+
package: string;
|
|
285
|
+
implemented: boolean;
|
|
286
|
+
}[];
|
|
287
|
+
run(input: AgentHarnessRunInput): Promise<AgentHarnessResult>;
|
|
288
|
+
}
|
|
289
|
+
declare const AgentHarnessServiceDefinition: ServiceDefinition;
|
|
290
|
+
declare const AgentHarnessServiceFacade: {
|
|
291
|
+
id: string;
|
|
292
|
+
name: string;
|
|
293
|
+
version: string;
|
|
294
|
+
runtime: "client";
|
|
295
|
+
deployment: "local";
|
|
296
|
+
definition: ServiceDefinition<Record<string, unknown>, Record<string, unknown>>;
|
|
297
|
+
createInstance: () => _ultrst_armada_krnl.ServiceInstance<Record<string, unknown>, Record<string, unknown>>;
|
|
298
|
+
execute: <TIn = unknown, TOut = unknown>(op: string, input?: TIn) => Promise<TOut>;
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
export { type AgentHarnessProvider, type AgentHarnessProviderInfo, type AgentHarnessResult, type AgentHarnessRunInput, AgentHarnessRuntime, type AgentHarnessServiceContract, AgentHarnessServiceDefinition, AgentHarnessServiceFacade, type CodeDiagnosticsInput, type CodeDiagnosticsResult, CodeDiagnosticsService, type CodeValidationInput, type CodeValidationResult, CodeValidationRuntime, CodeValidationServiceDefinition, CodeValidationServiceFacade, type DevelopmentProvider, type DevelopmentRequest, type DevelopmentResult, DevelopmentRuntime, type DevelopmentServiceContract, DevelopmentServiceDefinition, DevelopmentServiceFacade, type DevelopmentTask, GitHubActionsClient, type GitHubActionsConfig, GitHubActionsServiceDefinition, GitHubActionsServiceFacade, TYPESCRIPT_LANGUAGE_SERVER_PACKAGE, TYPESCRIPT_LANGUAGE_SERVER_VERSION, type TypeScriptLanguageServerNotificationInput, type TypeScriptLanguageServerRequestInput, type TypeScriptLanguageServerResponse, TypeScriptLanguageServerServiceDefinition, TypeScriptLanguageServerServiceFacade, type TypeScriptLanguageServerStartInput, type TypeScriptLanguageServerStatus, type ValidationDiagnostic, type ValidationLayer, type WebContainerCommand, type WebContainerRunCommandInput, WebContainerRuntime, WebContainerServiceDefinition, WebContainerServiceFacade, type WorkflowRun, codeDiagnosticsService, resolveDevelopmentCommand };
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
AgentHarnessRuntime,
|
|
3
|
+
AgentHarnessServiceDefinition,
|
|
4
|
+
AgentHarnessServiceFacade,
|
|
2
5
|
CodeDiagnosticsService,
|
|
3
6
|
CodeValidationRuntime,
|
|
4
7
|
CodeValidationServiceDefinition,
|
|
@@ -18,9 +21,12 @@ import {
|
|
|
18
21
|
WebContainerServiceFacade,
|
|
19
22
|
codeDiagnosticsService,
|
|
20
23
|
resolveDevelopmentCommand
|
|
21
|
-
} from "../chunk-
|
|
24
|
+
} from "../chunk-SQGBAWZN.js";
|
|
22
25
|
import "../chunk-TY32TUNI.js";
|
|
23
26
|
export {
|
|
27
|
+
AgentHarnessRuntime,
|
|
28
|
+
AgentHarnessServiceDefinition,
|
|
29
|
+
AgentHarnessServiceFacade,
|
|
24
30
|
CodeDiagnosticsService,
|
|
25
31
|
CodeValidationRuntime,
|
|
26
32
|
CodeValidationServiceDefinition,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { A as AuthCredentials, a as AuthSession, B as BaseAccountProvider, C as CreateUserData, R as RateLimiter, S as SessionManager, b as SignupInput, U as User, c as UserRole } from './BaseAccountProvider-DduKf5HG.js';
|
|
2
2
|
export { AdminGuard, LocalAccountProvider, PasswordHasher, SystemUser, loginSystemUser, resolveUserFromToken } from './auth/index.js';
|
|
3
|
-
export { B as BaseStorageAdapter, C as ConnectionTestResult, D as DeleteFolderResult, F as FileInfo, R as RenameFolderResult, S as StorageConfig, a as StorageMode, b as StorageProviderType, U as UploadResult } from './BaseStorageAdapter-
|
|
4
|
-
export { B2AuthToken, BackblazeB2Adapter, LocalFSAdapter, S3Adapter, StorageAdapterFactory, SupabaseStorageAdapter, authorizeB2, b2DownloadFile, b2ListBuckets, b2ListFileNames, b2UploadFile, ensureS3DirectoryMarker, isSecretMasked, normalizeBackblazeCredentials, permanentDeleteS3Folder, permanentDeleteS3Object, renameS3Folder, resolveBackblazeEndpoint } from './storage/index.js';
|
|
3
|
+
export { B as BaseStorageAdapter, C as ConnectionTestResult, D as DeleteFolderResult, F as FileInfo, R as RenameFolderResult, S as StorageConfig, a as StorageMode, b as StorageProviderType, U as UploadResult } from './BaseStorageAdapter-6x_BQiB3.js';
|
|
4
|
+
export { B2AuthToken, BackblazeB2Adapter, GoogleDriveAdapter, GoogleDriveOAuthConfig, GoogleDriveTokenSet, LocalFSAdapter, S3Adapter, StorageAdapterFactory, SupabaseStorageAdapter, authorizeB2, b2DownloadFile, b2ListBuckets, b2ListFileNames, b2UploadFile, createGoogleDriveAuthorizationUrl, ensureS3DirectoryMarker, exchangeGoogleDriveCode, isSecretMasked, normalizeBackblazeCredentials, permanentDeleteS3Folder, permanentDeleteS3Object, refreshGoogleDriveAccessToken, renameS3Folder, resolveBackblazeEndpoint } from './storage/index.js';
|
|
5
5
|
export { CloneReplicationResult, ConflictPolicy, RemoteWorkspaceService, SyncEngine, SyncState, WorkingWorkspaceService, WorkspaceCloneSyncEngine, WorkspaceConfig, WorkspaceDescriptor, WorkspaceFS, WorkspaceFileEntry, WorkspaceListResult, WorkspaceLookupResult, WorkspaceMutationResult, WorkspaceSecondaryClone, WorkspaceService, WorkspaceSyncSummary, formatCanonicalWorkspaceFolderName, remoteWorkspaceService, sanitizeWorkspaceName, workingWorkspaceService } from './workspace/index.js';
|
|
6
6
|
export { AuditEvent, AuditLogger, ClusterConfig, ControlPlaneManager, DatabaseClusterManager, HealthStatus, detectDatabaseEngine, getSystemDatabaseUrls, resolveSystemDatabaseClusterNodes } from './control-plane/index.js';
|
|
7
7
|
export { ApiError, ApiResponse, BaseApiRoute, Middleware, RouteConfig, createSSEResponse, withAuth, withCors } from './api/index.js';
|
|
@@ -13,7 +13,7 @@ export { AdaptedStorageConnection, AppAccountManifest, AppServiceDeclaration, CA
|
|
|
13
13
|
export { CompositeBackend, EndpointGenerator, GeneratedEndpointSummary, LOCAL_STORAGE_GRAPHS_PREFIX, LocalService, NodeGraphPersistenceService, NodeGraphValidationResult, RemoteServiceProxy, SaveGraphOptions, UniversalAppEntity, UniversalGraphEdge, UniversalGraphNode, UniversalNodeGraphDocument, UniversalStorageConnection, WorkspaceGraphDocument, WorkspaceGraphSummary, createBackend, createCompositeService, createLocalService, createRemoteService, exportGraphAsJsonFile, nodeGraphPersistence, parseGraphJsonFile, validateGraphDocument, workspaceGraphService } from './services/index.js';
|
|
14
14
|
import { AssetDataType as AssetDataType$1, AssetChannelType as AssetChannelType$1, GraphFolderInfo as GraphFolderInfo$1, GraphAssetItem as GraphAssetItem$1, SpaceNode, NodeConnection, DawProject } from '@ultrst-armada/kloks/state-graph';
|
|
15
15
|
export { AuthServiceDefinition, AuthServiceFacade, ControlPlaneServiceDefinition, ControlPlaneServiceFacade, DatabaseServiceDefinition, DatabaseServiceFacade, GeminiServiceDefinition, GeminiServiceFacade, SrklServiceDefinition, SrklServiceFacade, StorageServiceDefinition, StorageServiceFacade, WorkspaceGraphServiceDefinition, WorkspaceGraphServiceFacade, WorkspaceServiceDefinition, WorkspaceServiceFacade, krnlAuthServiceDefinition, krnlAuthServiceFacade, krnlControlPlaneServiceDefinition, krnlControlPlaneServiceFacade, krnlDatabaseServiceDefinition, krnlDatabaseServiceFacade, krnlGeminiServiceDefinition, krnlGeminiServiceFacade, krnlSrklServiceDefinition, krnlSrklServiceFacade, krnlStorageServiceDefinition, krnlStorageServiceFacade, krnlWorkspaceGraphServiceDefinition, krnlWorkspaceGraphServiceFacade, krnlWorkspaceServiceDefinition, krnlWorkspaceServiceFacade } from './krnl-services.js';
|
|
16
|
-
export { CodeDiagnosticsInput, CodeDiagnosticsResult, CodeDiagnosticsService, CodeValidationInput, CodeValidationResult, CodeValidationRuntime, CodeValidationServiceDefinition, CodeValidationServiceFacade, DevelopmentProvider, DevelopmentRequest, DevelopmentResult, DevelopmentRuntime, DevelopmentServiceContract, DevelopmentServiceDefinition, DevelopmentServiceFacade, DevelopmentTask, GitHubActionsClient, GitHubActionsConfig, GitHubActionsServiceDefinition, GitHubActionsServiceFacade, TYPESCRIPT_LANGUAGE_SERVER_PACKAGE, TYPESCRIPT_LANGUAGE_SERVER_VERSION, TypeScriptLanguageServerNotificationInput, TypeScriptLanguageServerRequestInput, TypeScriptLanguageServerResponse, TypeScriptLanguageServerServiceDefinition, TypeScriptLanguageServerServiceFacade, TypeScriptLanguageServerStartInput, TypeScriptLanguageServerStatus, ValidationDiagnostic, ValidationLayer, WebContainerCommand, WebContainerRunCommandInput, WebContainerRuntime, WebContainerServiceDefinition, WebContainerServiceFacade, WorkflowRun, codeDiagnosticsService, resolveDevelopmentCommand } from './development/index.js';
|
|
16
|
+
export { AgentHarnessProvider, AgentHarnessProviderInfo, AgentHarnessResult, AgentHarnessRunInput, AgentHarnessRuntime, AgentHarnessServiceContract, AgentHarnessServiceDefinition, AgentHarnessServiceFacade, CodeDiagnosticsInput, CodeDiagnosticsResult, CodeDiagnosticsService, CodeValidationInput, CodeValidationResult, CodeValidationRuntime, CodeValidationServiceDefinition, CodeValidationServiceFacade, DevelopmentProvider, DevelopmentRequest, DevelopmentResult, DevelopmentRuntime, DevelopmentServiceContract, DevelopmentServiceDefinition, DevelopmentServiceFacade, DevelopmentTask, GitHubActionsClient, GitHubActionsConfig, GitHubActionsServiceDefinition, GitHubActionsServiceFacade, TYPESCRIPT_LANGUAGE_SERVER_PACKAGE, TYPESCRIPT_LANGUAGE_SERVER_VERSION, TypeScriptLanguageServerNotificationInput, TypeScriptLanguageServerRequestInput, TypeScriptLanguageServerResponse, TypeScriptLanguageServerServiceDefinition, TypeScriptLanguageServerServiceFacade, TypeScriptLanguageServerStartInput, TypeScriptLanguageServerStatus, ValidationDiagnostic, ValidationLayer, WebContainerCommand, WebContainerRunCommandInput, WebContainerRuntime, WebContainerServiceDefinition, WebContainerServiceFacade, WorkflowRun, codeDiagnosticsService, resolveDevelopmentCommand } from './development/index.js';
|
|
17
17
|
export { EndpointDescriptor, IService, ProtocolAdapter, ServiceDefinition } from '@ultrst-armada/krnl';
|
|
18
18
|
import 'react';
|
|
19
19
|
|
|
@@ -211,7 +211,7 @@ interface WorkingWorkspaceConfig {
|
|
|
211
211
|
declare function getDefaultWorkingWorkspaceDir(): string;
|
|
212
212
|
declare function getWorkingWorkspaceConfig(): WorkingWorkspaceConfig;
|
|
213
213
|
declare function setWorkingWorkspaceConfig(cfg: Partial<WorkingWorkspaceConfig>): WorkingWorkspaceConfig;
|
|
214
|
-
declare function getWorkingWorkspaceDir(): string;
|
|
214
|
+
declare function getWorkingWorkspaceDir(workspaceId?: string): string;
|
|
215
215
|
declare function findWorkspaceRecord(workspaceId: string): Promise<{
|
|
216
216
|
user: any;
|
|
217
217
|
workspace: any;
|
|
@@ -291,7 +291,7 @@ declare function listBackblazeBuckets(payload: any, rawUserId?: string, env?: Re
|
|
|
291
291
|
buckets?: any[];
|
|
292
292
|
error?: string;
|
|
293
293
|
}>;
|
|
294
|
-
declare const srklListBackblazeBuckets: (keyId?: string, applicationKey?: string, bucketId?: string, bucketName?: string, userId?: string) => Promise<{
|
|
294
|
+
declare const srklListBackblazeBuckets: (keyId?: string, applicationKey?: string, bucketId?: string, bucketName?: string, userId?: string, accountId?: string) => Promise<{
|
|
295
295
|
success: boolean;
|
|
296
296
|
buckets?: any[];
|
|
297
297
|
error?: string;
|