@ultrst-armada/kloks 2.2.5 → 2.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/.krusbl-release-attestation.json +8 -0
  2. package/package.json +1 -1
  3. package/packages/backend/dist/ai-models/index.js +2 -2
  4. package/packages/backend/dist/ai-routing/index.js +3 -3
  5. package/packages/backend/dist/{chunk-PECE5QKV.js → chunk-AMI5MY6E.js} +2 -2
  6. package/packages/backend/dist/{chunk-WPN3SMIT.js → chunk-FFQJ4USX.js} +1 -1
  7. package/packages/backend/dist/chunk-G6FLQJS6.js +496 -0
  8. package/packages/backend/dist/{chunk-DMBDZHJF.js → chunk-GIUAFRAA.js} +1 -1
  9. package/packages/backend/dist/{chunk-K5LKAEBJ.js → chunk-GZTZ376X.js} +1 -1
  10. package/packages/backend/dist/{chunk-26NAKO4V.js → chunk-H47NEPYG.js} +6 -6
  11. package/packages/backend/dist/{chunk-UVNKDM7N.js → chunk-LAKCKX3I.js} +1 -1
  12. package/packages/backend/dist/{chunk-PT6J6UEU.js → chunk-LMAU62ZG.js} +4 -4
  13. package/packages/backend/dist/{chunk-KQ6IWV3F.js → chunk-LPM5E2A2.js} +2 -2
  14. package/packages/backend/dist/{chunk-X57LLCAQ.js → chunk-MQ6AHJ6X.js} +6 -2
  15. package/packages/backend/dist/{chunk-F6CHRGJ6.js → chunk-QZDTABQX.js} +2 -2
  16. package/packages/backend/dist/{chunk-YZNQA3FU.js → chunk-RHW75K46.js} +1 -1
  17. package/packages/backend/dist/{chunk-SR3DALCH.js → chunk-U5VPYALB.js} +4 -4
  18. package/packages/backend/dist/chunk-UI7AYFAU.js +364 -0
  19. package/packages/backend/dist/{client-5SGUJCV5.js → client-R5FY5AP7.js} +2 -2
  20. package/packages/backend/dist/index.js +46 -12
  21. package/packages/backend/dist/krnl-ai-services.js +5 -5
  22. package/packages/backend/dist/node.js +30 -30
  23. package/packages/backend/dist/provider-services/compute-operations.d.ts +24 -0
  24. package/packages/backend/dist/provider-services/compute-operations.test.d.ts +1 -0
  25. package/packages/backend/dist/provider-services/compute-routing.d.ts +65 -0
  26. package/packages/backend/dist/provider-services/compute-routing.test.d.ts +1 -0
  27. package/packages/backend/dist/provider-services/fly-machines.d.ts +52 -0
  28. package/packages/backend/dist/provider-services/fly-machines.test.d.ts +1 -0
  29. package/packages/backend/dist/provider-services/free-compute.d.ts +5 -0
  30. package/packages/backend/dist/provider-services/free-compute.test.d.ts +1 -0
  31. package/packages/backend/dist/provider-services/google/cloud-run.js +1 -1
  32. package/packages/backend/dist/provider-services/google/cloud-shell.js +1 -1
  33. package/packages/backend/dist/provider-services/google/cloud-storage.js +1 -1
  34. package/packages/backend/dist/provider-services/google/drive.js +1 -1
  35. package/packages/backend/dist/provider-services/google/gemini.js +3 -3
  36. package/packages/backend/dist/provider-services/google/index.js +3 -3
  37. package/packages/backend/dist/provider-services/google/vertex-ai.js +1 -1
  38. package/packages/backend/dist/provider-services/index.d.ts +4 -0
  39. package/packages/backend/dist/provider-services/index.js +47 -13
  40. package/packages/backend/dist/provider-services/node.js +11 -11
  41. package/packages/backend/dist/provider-services/storage/dropbox.js +4 -4
  42. package/packages/backend/dist/provider-services/storage/github.js +4 -4
  43. package/packages/backend/dist/provider-services/storage/node.js +7 -7
  44. package/packages/backend/dist/provider-services/storage.js +6 -6
  45. package/packages/backend/dist/provider-services/types.d.ts +16 -2
  46. package/packages/state-graph/dist/browser.js +24 -24
  47. package/packages/state-graph/dist/index.js +24 -24
  48. package/packages/backend/dist/chunk-5SXOQAAX.js +0 -41
  49. package/packages/backend/dist/chunk-FKK23J2A.js +0 -363
  50. package/packages/backend/dist/{chunk-LMWXONZG.js → chunk-EREYT3WJ.js} +3 -3
  51. package/packages/state-graph/dist/{chunk-YUJC367F.js → chunk-UKTICGGV.js} +3 -3
@@ -1,13 +1,27 @@
1
1
  /** Canonical provider/service identity and quota contracts. No secrets are persisted here. */
2
2
  export type ProviderCategory = 'suite' | 'deployment' | 'cloud' | 'ai' | 'storage' | 'developer';
3
3
  export type ProviderStatus = 'ready' | 'catalogued' | 'excluded';
4
- export type CredentialMode = 'api-token' | 'api-key' | 'oauth2' | 'application-key';
5
- export type RenewalPolicy = 'daily' | 'monthly' | 'ongoing' | 'unknown' | 'trial';
4
+ export type CredentialMode = 'api-token' | 'api-key' | 'aws-sigv4' | 'oauth2' | 'application-key';
5
+ export type RenewalPolicy = 'daily' | 'weekly' | 'monthly' | 'ongoing' | 'unknown' | 'trial';
6
+ export interface FreeComputeOffer {
7
+ providerId: string;
8
+ allowance: string;
9
+ renewal: RenewalPolicy;
10
+ quotaScope: 'account' | 'workspace' | 'organization' | 'project' | 'billing-account' | 'subscription' | 'namespace';
11
+ workload: 'vm' | 'container' | 'function' | 'gpu' | 'sandbox' | 'ci' | 'notebook' | 'browser' | 'developer';
12
+ access: 'general' | 'restricted';
13
+ sourceUrl: string;
14
+ notes: string;
15
+ verifiedDate: string;
16
+ /** Catalogued allowance is NEVER proof of available account capacity. */
17
+ allocationEnabled: false;
18
+ }
6
19
  export interface ProviderDefinition {
7
20
  /** A suite groups related service adapters and can expose its own identity API. */
8
21
  kind?: 'suite' | 'service';
9
22
  id: string;
10
23
  name: string;
24
+ freeCompute?: FreeComputeOffer;
11
25
  category: ProviderCategory;
12
26
  status: ProviderStatus;
13
27
  parentId?: string;
@@ -252,7 +252,7 @@ import {
252
252
  validateProjectGraph,
253
253
  validateUniversalConnection,
254
254
  zoomAtPoint
255
- } from "./chunk-YUJC367F.js";
255
+ } from "./chunk-UKTICGGV.js";
256
256
  import {
257
257
  BaseHandle,
258
258
  DataHandle,
@@ -263,20 +263,14 @@ import {
263
263
  } from "./chunk-OXUDG6HE.js";
264
264
  import "./chunk-RHRXPY2U.js";
265
265
  import {
266
- AttractionEngine,
267
- GhostInferenceEngine,
268
- GhostLayoutResolver,
269
- GhostTracePathBuilder,
270
- calculateSocketCoordinates,
271
- getBeamPoints,
272
- useMagneticTraces
273
- } from "./chunk-JXDJZSFW.js";
274
- import {
275
- ConnectionRuleStore,
276
- HandleTypeRegistry,
277
- WireTypeRegistry,
278
- initializeDefaultGraphRules
279
- } from "./chunk-TZOL3RN7.js";
266
+ LifecycleCycleError,
267
+ LifecycleGraph,
268
+ SKIPO_STATE,
269
+ SkipoStateEngine,
270
+ useLifecycleScope,
271
+ useSkipoBind,
272
+ useSkipoState
273
+ } from "./chunk-EW4ACSZB.js";
280
274
  import {
281
275
  CommandApi,
282
276
  GhostStore,
@@ -291,6 +285,21 @@ import {
291
285
  CustomViewWindow,
292
286
  DEFAULT_GRAPH_SETTINGS
293
287
  } from "./chunk-5KP74NMF.js";
288
+ import {
289
+ AttractionEngine,
290
+ GhostInferenceEngine,
291
+ GhostLayoutResolver,
292
+ GhostTracePathBuilder,
293
+ calculateSocketCoordinates,
294
+ getBeamPoints,
295
+ useMagneticTraces
296
+ } from "./chunk-JXDJZSFW.js";
297
+ import {
298
+ ConnectionRuleStore,
299
+ HandleTypeRegistry,
300
+ WireTypeRegistry,
301
+ initializeDefaultGraphRules
302
+ } from "./chunk-TZOL3RN7.js";
294
303
  import {
295
304
  AutoSolidify,
296
305
  SpatialEngine,
@@ -304,15 +313,6 @@ import {
304
313
  import {
305
314
  CompatibilityMatrix
306
315
  } from "./chunk-ISFNY7EZ.js";
307
- import {
308
- LifecycleCycleError,
309
- LifecycleGraph,
310
- SKIPO_STATE,
311
- SkipoStateEngine,
312
- useLifecycleScope,
313
- useSkipoBind,
314
- useSkipoState
315
- } from "./chunk-EW4ACSZB.js";
316
316
  export {
317
317
  ALL_GRAPH_TYPES,
318
318
  ArrangementNodeModel,
@@ -252,7 +252,7 @@ import {
252
252
  validateProjectGraph,
253
253
  validateUniversalConnection,
254
254
  zoomAtPoint
255
- } from "./chunk-YUJC367F.js";
255
+ } from "./chunk-UKTICGGV.js";
256
256
  import {
257
257
  BaseHandle,
258
258
  DataHandle,
@@ -263,20 +263,14 @@ import {
263
263
  } from "./chunk-OXUDG6HE.js";
264
264
  import "./chunk-RHRXPY2U.js";
265
265
  import {
266
- AttractionEngine,
267
- GhostInferenceEngine,
268
- GhostLayoutResolver,
269
- GhostTracePathBuilder,
270
- calculateSocketCoordinates,
271
- getBeamPoints,
272
- useMagneticTraces
273
- } from "./chunk-JXDJZSFW.js";
274
- import {
275
- ConnectionRuleStore,
276
- HandleTypeRegistry,
277
- WireTypeRegistry,
278
- initializeDefaultGraphRules
279
- } from "./chunk-TZOL3RN7.js";
266
+ LifecycleCycleError,
267
+ LifecycleGraph,
268
+ SKIPO_STATE,
269
+ SkipoStateEngine,
270
+ useLifecycleScope,
271
+ useSkipoBind,
272
+ useSkipoState
273
+ } from "./chunk-EW4ACSZB.js";
280
274
  import {
281
275
  CommandApi,
282
276
  GhostStore,
@@ -291,6 +285,21 @@ import {
291
285
  CustomViewWindow,
292
286
  DEFAULT_GRAPH_SETTINGS
293
287
  } from "./chunk-5KP74NMF.js";
288
+ import {
289
+ AttractionEngine,
290
+ GhostInferenceEngine,
291
+ GhostLayoutResolver,
292
+ GhostTracePathBuilder,
293
+ calculateSocketCoordinates,
294
+ getBeamPoints,
295
+ useMagneticTraces
296
+ } from "./chunk-JXDJZSFW.js";
297
+ import {
298
+ ConnectionRuleStore,
299
+ HandleTypeRegistry,
300
+ WireTypeRegistry,
301
+ initializeDefaultGraphRules
302
+ } from "./chunk-TZOL3RN7.js";
294
303
  import {
295
304
  AutoSolidify,
296
305
  SpatialEngine,
@@ -304,15 +313,6 @@ import {
304
313
  import {
305
314
  CompatibilityMatrix
306
315
  } from "./chunk-ISFNY7EZ.js";
307
- import {
308
- LifecycleCycleError,
309
- LifecycleGraph,
310
- SKIPO_STATE,
311
- SkipoStateEngine,
312
- useLifecycleScope,
313
- useSkipoBind,
314
- useSkipoState
315
- } from "./chunk-EW4ACSZB.js";
316
316
 
317
317
  // src/index.ts
318
318
  import {
@@ -1,41 +0,0 @@
1
- // src/provider-services/capacity.ts
2
- function calculateProviderCapacity(snapshot, now = /* @__PURE__ */ new Date(), maxAgeMs = 10 * 6e4) {
3
- const checkedAt = now.toISOString();
4
- const unknown = (reason) => ({ status: "unknown", weight: 0, percentRemaining: null, bottleneck: null, reason, checkedAt });
5
- const timestamp = Date.parse(snapshot.capturedAt);
6
- if (!Number.isFinite(timestamp) || now.getTime() < timestamp - 3e4 || now.getTime() - timestamp > maxAgeMs) return unknown("Telemetry is stale or undated");
7
- if (snapshot.error || snapshot.coverage === "unavailable") {
8
- return unknown(snapshot.error || "Provider quota telemetry unavailable");
9
- }
10
- const enforced = snapshot.metrics.filter((m) => m.enforceable);
11
- if (!enforced.length) return unknown("No provider-confirmed renewable quota windows");
12
- if (snapshot.coverage !== "complete") return unknown("Required quota coverage is incomplete");
13
- let bottleneck = null;
14
- let minimum = 1;
15
- for (const metric of enforced) {
16
- if (metric.source !== "provider" || !validQuota(metric) || !metric.resetAt || Date.parse(metric.resetAt) <= now.getTime()) {
17
- return unknown("Quota metric missing, estimated, or outside its reset window: " + metric.id);
18
- }
19
- const remaining = Math.max(0, Math.min(1, (metric.limit - metric.used) / metric.limit));
20
- if (!bottleneck || remaining < minimum) {
21
- minimum = remaining;
22
- bottleneck = metric;
23
- }
24
- }
25
- const status = minimum === 0 ? "exhausted" : "eligible";
26
- return {
27
- status,
28
- weight: status === "eligible" ? Number(minimum.toFixed(4)) : 0,
29
- percentRemaining: Math.round(minimum * 100),
30
- bottleneck: bottleneck?.id ?? null,
31
- reason: status === "eligible" ? "Provider-measured quota remaining" : "A required quota is exhausted",
32
- checkedAt
33
- };
34
- }
35
- function validQuota(metric) {
36
- return metric.used !== null && metric.limit !== null && Number.isFinite(metric.used) && Number.isFinite(metric.limit) && metric.used >= 0 && metric.limit > 0 && typeof metric.resetAt === "string" && Number.isFinite(Date.parse(metric.resetAt));
37
- }
38
-
39
- export {
40
- calculateProviderCapacity
41
- };
@@ -1,363 +0,0 @@
1
- // src/provider-services/registry.ts
2
- var definitions = [
3
- {
4
- id: "cloudflare",
5
- name: "Cloudflare",
6
- category: "deployment",
7
- status: "ready",
8
- credentialModes: ["api-token"],
9
- capabilities: ["workers", "pages", "usage"],
10
- renewal: "daily",
11
- apiImplemented: true,
12
- usageImplemented: true,
13
- docsUrl: "https://developers.cloudflare.com/api/"
14
- },
15
- {
16
- id: "vercel",
17
- name: "Vercel",
18
- category: "deployment",
19
- status: "ready",
20
- credentialModes: ["api-token"],
21
- capabilities: ["projects", "deployments", "usage"],
22
- renewal: "monthly",
23
- apiImplemented: true,
24
- usageImplemented: true,
25
- docsUrl: "https://vercel.com/docs/rest-api"
26
- },
27
- {
28
- id: "google",
29
- name: "Google",
30
- kind: "suite",
31
- category: "suite",
32
- status: "ready",
33
- credentialModes: ["oauth2"],
34
- capabilities: ["identity"],
35
- renewal: "unknown",
36
- apiImplemented: true,
37
- usageImplemented: false,
38
- docsUrl: "https://developers.google.com/identity"
39
- },
40
- {
41
- id: "google-gemini",
42
- parentId: "google",
43
- name: "Gemini Developer API",
44
- category: "ai",
45
- status: "ready",
46
- credentialModes: ["api-key"],
47
- capabilities: ["models", "inference"],
48
- renewal: "daily",
49
- apiImplemented: true,
50
- usageImplemented: false,
51
- docsUrl: "https://ai.google.dev/gemini-api/docs"
52
- },
53
- {
54
- id: "google-drive",
55
- parentId: "google",
56
- name: "Google Drive",
57
- category: "storage",
58
- status: "ready",
59
- credentialModes: ["oauth2"],
60
- capabilities: ["files", "folders"],
61
- renewal: "ongoing",
62
- apiImplemented: true,
63
- usageImplemented: false,
64
- docsUrl: "https://developers.google.com/workspace/drive/api"
65
- },
66
- {
67
- id: "google-cloud-run",
68
- parentId: "google",
69
- name: "Google Cloud Run",
70
- category: "cloud",
71
- status: "catalogued",
72
- credentialModes: ["oauth2"],
73
- capabilities: ["services", "deployments"],
74
- renewal: "monthly",
75
- apiImplemented: false,
76
- usageImplemented: false,
77
- docsUrl: "https://cloud.google.com/run/docs"
78
- },
79
- {
80
- id: "google-cloud-storage",
81
- parentId: "google",
82
- name: "Google Cloud Storage",
83
- category: "storage",
84
- status: "catalogued",
85
- credentialModes: ["oauth2"],
86
- capabilities: ["buckets", "objects"],
87
- renewal: "ongoing",
88
- apiImplemented: false,
89
- usageImplemented: false,
90
- docsUrl: "https://cloud.google.com/storage/docs"
91
- },
92
- {
93
- id: "google-cloud-shell",
94
- parentId: "google",
95
- name: "Google Cloud Shell",
96
- category: "cloud",
97
- status: "catalogued",
98
- credentialModes: ["oauth2"],
99
- capabilities: ["terminal"],
100
- renewal: "unknown",
101
- apiImplemented: false,
102
- usageImplemented: false,
103
- docsUrl: "https://cloud.google.com/shell/docs"
104
- },
105
- {
106
- id: "google-vertex-ai",
107
- parentId: "google",
108
- name: "Vertex AI",
109
- category: "ai",
110
- status: "catalogued",
111
- credentialModes: ["oauth2"],
112
- capabilities: ["inference", "models"],
113
- renewal: "monthly",
114
- apiImplemented: false,
115
- usageImplemented: false,
116
- docsUrl: "https://cloud.google.com/vertex-ai/docs"
117
- },
118
- {
119
- id: "backblaze-b2",
120
- name: "Backblaze B2",
121
- category: "storage",
122
- status: "ready",
123
- credentialModes: ["application-key"],
124
- capabilities: ["buckets", "files"],
125
- renewal: "ongoing",
126
- apiImplemented: true,
127
- usageImplemented: false,
128
- docsUrl: "https://www.backblaze.com/docs/cloud-storage"
129
- },
130
- {
131
- id: "github",
132
- name: "GitHub",
133
- category: "storage",
134
- status: "ready",
135
- credentialModes: ["oauth2", "api-token"],
136
- capabilities: ["repositories", "contents"],
137
- renewal: "ongoing",
138
- apiImplemented: true,
139
- usageImplemented: false,
140
- docsUrl: "https://docs.github.com/en/rest"
141
- },
142
- {
143
- id: "gitlab",
144
- name: "GitLab.com",
145
- category: "storage",
146
- status: "ready",
147
- credentialModes: ["oauth2", "api-token"],
148
- capabilities: ["projects", "repository-tree"],
149
- renewal: "ongoing",
150
- apiImplemented: true,
151
- usageImplemented: false,
152
- docsUrl: "https://docs.gitlab.com/api/"
153
- },
154
- {
155
- id: "dropbox",
156
- name: "Dropbox",
157
- category: "storage",
158
- status: "ready",
159
- credentialModes: ["oauth2"],
160
- capabilities: ["list-folder", "pagination"],
161
- renewal: "ongoing",
162
- apiImplemented: true,
163
- usageImplemented: false,
164
- docsUrl: "https://www.dropbox.com/developers/documentation/http/documentation"
165
- },
166
- {
167
- id: "groq",
168
- name: "Groq",
169
- category: "ai",
170
- status: "catalogued",
171
- credentialModes: ["api-key"],
172
- capabilities: ["inference", "models"],
173
- renewal: "daily",
174
- apiImplemented: false,
175
- usageImplemented: false,
176
- docsUrl: "https://console.groq.com/docs/rate-limits"
177
- },
178
- {
179
- id: "cerebras",
180
- name: "Cerebras",
181
- category: "ai",
182
- status: "catalogued",
183
- credentialModes: ["api-key"],
184
- capabilities: ["inference", "models"],
185
- renewal: "daily",
186
- apiImplemented: false,
187
- usageImplemented: false,
188
- docsUrl: "https://inference-docs.cerebras.ai/"
189
- },
190
- {
191
- id: "huggingface",
192
- name: "Hugging Face",
193
- category: "ai",
194
- status: "catalogued",
195
- credentialModes: ["api-token"],
196
- capabilities: ["inference", "models"],
197
- renewal: "monthly",
198
- apiImplemented: false,
199
- usageImplemented: false,
200
- docsUrl: "https://huggingface.co/docs/inference-providers/pricing"
201
- },
202
- {
203
- id: "openrouter",
204
- name: "OpenRouter (free models)",
205
- category: "ai",
206
- status: "catalogued",
207
- credentialModes: ["api-key"],
208
- capabilities: ["inference", "models"],
209
- renewal: "daily",
210
- apiImplemented: false,
211
- usageImplemented: false,
212
- docsUrl: "https://openrouter.ai/collections/free-models"
213
- },
214
- {
215
- id: "render",
216
- name: "Render",
217
- category: "deployment",
218
- status: "catalogued",
219
- credentialModes: ["api-key"],
220
- capabilities: ["services", "deployments"],
221
- renewal: "monthly",
222
- apiImplemented: false,
223
- usageImplemented: false,
224
- docsUrl: "https://render.com/docs/free"
225
- },
226
- {
227
- id: "railway",
228
- name: "Railway",
229
- category: "deployment",
230
- status: "catalogued",
231
- credentialModes: ["api-token"],
232
- capabilities: ["projects", "deployments"],
233
- renewal: "monthly",
234
- apiImplemented: false,
235
- usageImplemented: false,
236
- docsUrl: "https://docs.railway.com/pricing/plans"
237
- },
238
- {
239
- id: "oracle-cloud",
240
- name: "Oracle Cloud Always Free",
241
- category: "cloud",
242
- status: "catalogued",
243
- credentialModes: ["api-key"],
244
- capabilities: ["instances"],
245
- renewal: "ongoing",
246
- apiImplemented: false,
247
- usageImplemented: false,
248
- docsUrl: "https://www.oracle.com/cloud/free/"
249
- },
250
- {
251
- id: "replit",
252
- name: "Replit",
253
- category: "developer",
254
- status: "catalogued",
255
- credentialModes: ["api-token"],
256
- capabilities: ["development"],
257
- renewal: "unknown",
258
- apiImplemented: false,
259
- usageImplemented: false,
260
- docsUrl: "https://docs.replit.com/"
261
- },
262
- {
263
- id: "fly",
264
- name: "Fly.io (one-time trial)",
265
- category: "cloud",
266
- status: "excluded",
267
- credentialModes: ["api-token"],
268
- capabilities: ["machines"],
269
- renewal: "trial",
270
- apiImplemented: false,
271
- usageImplemented: false,
272
- docsUrl: "https://fly.io/docs/about/free-trial/"
273
- },
274
- {
275
- id: "openai",
276
- name: "OpenAI API",
277
- category: "ai",
278
- status: "excluded",
279
- credentialModes: ["api-key"],
280
- capabilities: ["inference"],
281
- renewal: "unknown",
282
- apiImplemented: false,
283
- usageImplemented: false,
284
- docsUrl: "https://platform.openai.com/docs"
285
- },
286
- {
287
- id: "xai",
288
- name: "xAI Grok API",
289
- category: "ai",
290
- status: "excluded",
291
- credentialModes: ["api-key"],
292
- capabilities: ["inference"],
293
- renewal: "unknown",
294
- apiImplemented: false,
295
- usageImplemented: false,
296
- docsUrl: "https://docs.x.ai/"
297
- }
298
- ];
299
- var byId = new Map(definitions.map((def) => [def.id, def]));
300
- var aliases = {
301
- cloudflare_workers: "cloudflare",
302
- cloudflare_pages: "cloudflare",
303
- gemini: "google-gemini",
304
- google_ai_studio: "google-gemini",
305
- backblaze: "backblaze-b2",
306
- backblaze_b2: "backblaze-b2",
307
- google_drive: "google-drive",
308
- google_cloud_storage: "google-cloud-storage",
309
- github_repos: "github",
310
- gitlab_repos: "gitlab"
311
- };
312
- function resolveProviderServiceId(id) {
313
- const clean = String(id || "").trim().toLowerCase().replace(/-/g, "_");
314
- return aliases[clean] ?? clean.replace(/_/g, "-");
315
- }
316
- function getProviderService(id) {
317
- const item = byId.get(resolveProviderServiceId(id));
318
- return item && { ...item, credentialModes: [...item.credentialModes], capabilities: [...item.capabilities] };
319
- }
320
- function listProviderServices(category) {
321
- return definitions.filter((item) => !category || item.category === category).map((item) => getProviderService(item.id));
322
- }
323
- function listRecognizedAccountServices() {
324
- return listProviderServices().filter((item) => item.status === "ready" && item.apiImplemented);
325
- }
326
- function listProviderServiceChildren(parentId) {
327
- const id = resolveProviderServiceId(parentId);
328
- return listProviderServices().filter((service) => service.parentId === id);
329
- }
330
- function listProviderServiceTree() {
331
- const nodes = new Map(listProviderServices().map((service) => [
332
- service.id,
333
- { ...service, children: [] }
334
- ]));
335
- const roots = [];
336
- for (const node of nodes.values()) {
337
- const parent = node.parentId && nodes.get(node.parentId);
338
- if (parent && parent.id !== node.id) parent.children.push(node);
339
- else roots.push(node);
340
- }
341
- return roots;
342
- }
343
- function getProviderServicePath(id) {
344
- const path = [];
345
- const visited = /* @__PURE__ */ new Set();
346
- let current = getProviderService(id);
347
- while (current && !visited.has(current.id)) {
348
- visited.add(current.id);
349
- path.unshift(current);
350
- current = current.parentId ? getProviderService(current.parentId) : void 0;
351
- }
352
- return path;
353
- }
354
-
355
- export {
356
- resolveProviderServiceId,
357
- getProviderService,
358
- listProviderServices,
359
- listRecognizedAccountServices,
360
- listProviderServiceChildren,
361
- listProviderServiceTree,
362
- getProviderServicePath
363
- };
@@ -1,9 +1,9 @@
1
- import {
2
- keyStore
3
- } from "./chunk-P7H6TIEA.js";
4
1
  import {
5
2
  AITransportClient
6
3
  } from "./chunk-MAMK4GDH.js";
4
+ import {
5
+ keyStore
6
+ } from "./chunk-P7H6TIEA.js";
7
7
  import {
8
8
  getProviderMeta
9
9
  } from "./chunk-JSQZAFBU.js";
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  DataHandle
3
3
  } from "./chunk-OXUDG6HE.js";
4
+ import {
5
+ BaseNode
6
+ } from "./chunk-5KP74NMF.js";
4
7
  import {
5
8
  AttractionEngine
6
9
  } from "./chunk-JXDJZSFW.js";
@@ -8,9 +11,6 @@ import {
8
11
  HandleTypeRegistry,
9
12
  WireTypeRegistry
10
13
  } from "./chunk-TZOL3RN7.js";
11
- import {
12
- BaseNode
13
- } from "./chunk-5KP74NMF.js";
14
14
  import {
15
15
  AutoSolidify,
16
16
  TraceEngine