@stacknet/rackutils 0.3.2 → 0.3.4
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/components/index.cjs +7 -7
- package/dist/components/index.js +7 -7
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.cts +18 -4
- package/dist/hooks/index.d.ts +18 -4
- package/dist/hooks/index.js +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -5
- package/dist/types/index.d.cts +96 -2
- package/dist/types/index.d.ts +96 -2
- package/package.json +18 -13
package/dist/types/index.d.cts
CHANGED
|
@@ -201,6 +201,97 @@ interface TensorRegistrationResult {
|
|
|
201
201
|
tensor_size_mb: number | null;
|
|
202
202
|
lode_fingerprint: string | null;
|
|
203
203
|
}
|
|
204
|
+
interface LooopRuntimeConfig {
|
|
205
|
+
entrypoint: string;
|
|
206
|
+
language: 'python' | 'node' | 'rust' | 'shell';
|
|
207
|
+
dependencies?: string[];
|
|
208
|
+
timeout_seconds?: number;
|
|
209
|
+
memory_mb?: number;
|
|
210
|
+
cpu_cores?: number;
|
|
211
|
+
}
|
|
212
|
+
interface LooopDisplayConfig {
|
|
213
|
+
kind: 'markdown' | 'slideshow' | 'code' | 'iframe' | 'terminal';
|
|
214
|
+
streaming?: boolean;
|
|
215
|
+
}
|
|
216
|
+
interface LooopHitlConfig {
|
|
217
|
+
checkpoints?: string[];
|
|
218
|
+
allowFreeform?: boolean;
|
|
219
|
+
}
|
|
220
|
+
interface LooopMeta {
|
|
221
|
+
looop_id: string;
|
|
222
|
+
name: string;
|
|
223
|
+
description?: string;
|
|
224
|
+
creator: string;
|
|
225
|
+
content_type?: string;
|
|
226
|
+
category?: string;
|
|
227
|
+
tags?: string[];
|
|
228
|
+
version?: string;
|
|
229
|
+
runtime: LooopRuntimeConfig;
|
|
230
|
+
display?: LooopDisplayConfig;
|
|
231
|
+
inputs?: Record<string, {
|
|
232
|
+
type: string;
|
|
233
|
+
required?: boolean;
|
|
234
|
+
default?: any;
|
|
235
|
+
values?: string[];
|
|
236
|
+
description?: string;
|
|
237
|
+
}>;
|
|
238
|
+
skills?: string[];
|
|
239
|
+
hitl?: LooopHitlConfig;
|
|
240
|
+
published_at?: string;
|
|
241
|
+
lode?: {
|
|
242
|
+
fingerprint: string;
|
|
243
|
+
};
|
|
244
|
+
registration?: {
|
|
245
|
+
total_bytes: number;
|
|
246
|
+
base_tokens: number;
|
|
247
|
+
multiplier: number;
|
|
248
|
+
registration_cost_tokens: number;
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
interface LooopStats {
|
|
252
|
+
meta: LooopMeta | null;
|
|
253
|
+
fileCount: number | null;
|
|
254
|
+
}
|
|
255
|
+
interface LooopRegistrationInput {
|
|
256
|
+
name: string;
|
|
257
|
+
description?: string;
|
|
258
|
+
files: Array<{
|
|
259
|
+
path: string;
|
|
260
|
+
content: string;
|
|
261
|
+
}>;
|
|
262
|
+
content_type?: string;
|
|
263
|
+
category?: string;
|
|
264
|
+
tags?: string[];
|
|
265
|
+
version?: string;
|
|
266
|
+
runtime: LooopRuntimeConfig;
|
|
267
|
+
display?: LooopDisplayConfig;
|
|
268
|
+
inputs?: Record<string, any>;
|
|
269
|
+
skills?: string[];
|
|
270
|
+
hitl?: LooopHitlConfig;
|
|
271
|
+
}
|
|
272
|
+
interface LooopRegistrationResult {
|
|
273
|
+
looop_id: string;
|
|
274
|
+
rack_repo_id: string | null;
|
|
275
|
+
rack_pinned: boolean;
|
|
276
|
+
attributed_to: string;
|
|
277
|
+
registration_cost_tokens: number | null;
|
|
278
|
+
lode_fingerprint: string | null;
|
|
279
|
+
}
|
|
280
|
+
/** SSE event emitted by a running looop */
|
|
281
|
+
interface LooopEvent {
|
|
282
|
+
type: 'progress' | 'output' | 'display' | 'checkpoint' | 'tool' | 'error' | 'complete';
|
|
283
|
+
[key: string]: any;
|
|
284
|
+
}
|
|
285
|
+
interface LooopCheckpoint {
|
|
286
|
+
id: string;
|
|
287
|
+
message: string;
|
|
288
|
+
options?: Array<{
|
|
289
|
+
id: string;
|
|
290
|
+
label: string;
|
|
291
|
+
action?: string;
|
|
292
|
+
}>;
|
|
293
|
+
allowFreeform?: boolean;
|
|
294
|
+
}
|
|
204
295
|
interface StarResult {
|
|
205
296
|
success: boolean;
|
|
206
297
|
starred: boolean;
|
|
@@ -217,6 +308,7 @@ interface NetworkStats {
|
|
|
217
308
|
repos: number;
|
|
218
309
|
skills: number;
|
|
219
310
|
tensors: number;
|
|
311
|
+
looops: number;
|
|
220
312
|
stacks: number;
|
|
221
313
|
agents: number;
|
|
222
314
|
stars: number;
|
|
@@ -249,9 +341,11 @@ interface PaginationParams {
|
|
|
249
341
|
limit?: number;
|
|
250
342
|
/** Opaque cursor from a previous response's next_cursor */
|
|
251
343
|
cursor?: string;
|
|
344
|
+
/** Filter by category (skills, looops, tensors, imaginations, images) */
|
|
345
|
+
category?: string;
|
|
252
346
|
}
|
|
253
347
|
interface CostEstimate {
|
|
254
|
-
type: 'skill' | 'tensor';
|
|
348
|
+
type: 'skill' | 'tensor' | 'looop';
|
|
255
349
|
totalBytes: number;
|
|
256
350
|
totalMegabytes: number;
|
|
257
351
|
baseCost: number;
|
|
@@ -259,4 +353,4 @@ interface CostEstimate {
|
|
|
259
353
|
registrationCostTokens: number;
|
|
260
354
|
}
|
|
261
355
|
|
|
262
|
-
export type { CostEstimate, DiffEntry, InitResult, NetworkStats, PaginatedResult, PaginationInfo, PaginationParams, PushResult, RackConfig, RackSession, RepoCommit, RepoFile, RepoInfo, RepoTree, SkillMeta, SkillRegistrationInput, SkillRegistrationResult, SkillStats, StarInfo, StarResult, TensorMeta, TensorRegistrationInput, TensorRegistrationResult, TensorStats, TokenBudget, TreeEntry, TrendingRepo };
|
|
356
|
+
export type { CostEstimate, DiffEntry, InitResult, LooopCheckpoint, LooopDisplayConfig, LooopEvent, LooopHitlConfig, LooopMeta, LooopRegistrationInput, LooopRegistrationResult, LooopRuntimeConfig, LooopStats, NetworkStats, PaginatedResult, PaginationInfo, PaginationParams, PushResult, RackConfig, RackSession, RepoCommit, RepoFile, RepoInfo, RepoTree, SkillMeta, SkillRegistrationInput, SkillRegistrationResult, SkillStats, StarInfo, StarResult, TensorMeta, TensorRegistrationInput, TensorRegistrationResult, TensorStats, TokenBudget, TreeEntry, TrendingRepo };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -201,6 +201,97 @@ interface TensorRegistrationResult {
|
|
|
201
201
|
tensor_size_mb: number | null;
|
|
202
202
|
lode_fingerprint: string | null;
|
|
203
203
|
}
|
|
204
|
+
interface LooopRuntimeConfig {
|
|
205
|
+
entrypoint: string;
|
|
206
|
+
language: 'python' | 'node' | 'rust' | 'shell';
|
|
207
|
+
dependencies?: string[];
|
|
208
|
+
timeout_seconds?: number;
|
|
209
|
+
memory_mb?: number;
|
|
210
|
+
cpu_cores?: number;
|
|
211
|
+
}
|
|
212
|
+
interface LooopDisplayConfig {
|
|
213
|
+
kind: 'markdown' | 'slideshow' | 'code' | 'iframe' | 'terminal';
|
|
214
|
+
streaming?: boolean;
|
|
215
|
+
}
|
|
216
|
+
interface LooopHitlConfig {
|
|
217
|
+
checkpoints?: string[];
|
|
218
|
+
allowFreeform?: boolean;
|
|
219
|
+
}
|
|
220
|
+
interface LooopMeta {
|
|
221
|
+
looop_id: string;
|
|
222
|
+
name: string;
|
|
223
|
+
description?: string;
|
|
224
|
+
creator: string;
|
|
225
|
+
content_type?: string;
|
|
226
|
+
category?: string;
|
|
227
|
+
tags?: string[];
|
|
228
|
+
version?: string;
|
|
229
|
+
runtime: LooopRuntimeConfig;
|
|
230
|
+
display?: LooopDisplayConfig;
|
|
231
|
+
inputs?: Record<string, {
|
|
232
|
+
type: string;
|
|
233
|
+
required?: boolean;
|
|
234
|
+
default?: any;
|
|
235
|
+
values?: string[];
|
|
236
|
+
description?: string;
|
|
237
|
+
}>;
|
|
238
|
+
skills?: string[];
|
|
239
|
+
hitl?: LooopHitlConfig;
|
|
240
|
+
published_at?: string;
|
|
241
|
+
lode?: {
|
|
242
|
+
fingerprint: string;
|
|
243
|
+
};
|
|
244
|
+
registration?: {
|
|
245
|
+
total_bytes: number;
|
|
246
|
+
base_tokens: number;
|
|
247
|
+
multiplier: number;
|
|
248
|
+
registration_cost_tokens: number;
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
interface LooopStats {
|
|
252
|
+
meta: LooopMeta | null;
|
|
253
|
+
fileCount: number | null;
|
|
254
|
+
}
|
|
255
|
+
interface LooopRegistrationInput {
|
|
256
|
+
name: string;
|
|
257
|
+
description?: string;
|
|
258
|
+
files: Array<{
|
|
259
|
+
path: string;
|
|
260
|
+
content: string;
|
|
261
|
+
}>;
|
|
262
|
+
content_type?: string;
|
|
263
|
+
category?: string;
|
|
264
|
+
tags?: string[];
|
|
265
|
+
version?: string;
|
|
266
|
+
runtime: LooopRuntimeConfig;
|
|
267
|
+
display?: LooopDisplayConfig;
|
|
268
|
+
inputs?: Record<string, any>;
|
|
269
|
+
skills?: string[];
|
|
270
|
+
hitl?: LooopHitlConfig;
|
|
271
|
+
}
|
|
272
|
+
interface LooopRegistrationResult {
|
|
273
|
+
looop_id: string;
|
|
274
|
+
rack_repo_id: string | null;
|
|
275
|
+
rack_pinned: boolean;
|
|
276
|
+
attributed_to: string;
|
|
277
|
+
registration_cost_tokens: number | null;
|
|
278
|
+
lode_fingerprint: string | null;
|
|
279
|
+
}
|
|
280
|
+
/** SSE event emitted by a running looop */
|
|
281
|
+
interface LooopEvent {
|
|
282
|
+
type: 'progress' | 'output' | 'display' | 'checkpoint' | 'tool' | 'error' | 'complete';
|
|
283
|
+
[key: string]: any;
|
|
284
|
+
}
|
|
285
|
+
interface LooopCheckpoint {
|
|
286
|
+
id: string;
|
|
287
|
+
message: string;
|
|
288
|
+
options?: Array<{
|
|
289
|
+
id: string;
|
|
290
|
+
label: string;
|
|
291
|
+
action?: string;
|
|
292
|
+
}>;
|
|
293
|
+
allowFreeform?: boolean;
|
|
294
|
+
}
|
|
204
295
|
interface StarResult {
|
|
205
296
|
success: boolean;
|
|
206
297
|
starred: boolean;
|
|
@@ -217,6 +308,7 @@ interface NetworkStats {
|
|
|
217
308
|
repos: number;
|
|
218
309
|
skills: number;
|
|
219
310
|
tensors: number;
|
|
311
|
+
looops: number;
|
|
220
312
|
stacks: number;
|
|
221
313
|
agents: number;
|
|
222
314
|
stars: number;
|
|
@@ -249,9 +341,11 @@ interface PaginationParams {
|
|
|
249
341
|
limit?: number;
|
|
250
342
|
/** Opaque cursor from a previous response's next_cursor */
|
|
251
343
|
cursor?: string;
|
|
344
|
+
/** Filter by category (skills, looops, tensors, imaginations, images) */
|
|
345
|
+
category?: string;
|
|
252
346
|
}
|
|
253
347
|
interface CostEstimate {
|
|
254
|
-
type: 'skill' | 'tensor';
|
|
348
|
+
type: 'skill' | 'tensor' | 'looop';
|
|
255
349
|
totalBytes: number;
|
|
256
350
|
totalMegabytes: number;
|
|
257
351
|
baseCost: number;
|
|
@@ -259,4 +353,4 @@ interface CostEstimate {
|
|
|
259
353
|
registrationCostTokens: number;
|
|
260
354
|
}
|
|
261
355
|
|
|
262
|
-
export type { CostEstimate, DiffEntry, InitResult, NetworkStats, PaginatedResult, PaginationInfo, PaginationParams, PushResult, RackConfig, RackSession, RepoCommit, RepoFile, RepoInfo, RepoTree, SkillMeta, SkillRegistrationInput, SkillRegistrationResult, SkillStats, StarInfo, StarResult, TensorMeta, TensorRegistrationInput, TensorRegistrationResult, TensorStats, TokenBudget, TreeEntry, TrendingRepo };
|
|
356
|
+
export type { CostEstimate, DiffEntry, InitResult, LooopCheckpoint, LooopDisplayConfig, LooopEvent, LooopHitlConfig, LooopMeta, LooopRegistrationInput, LooopRegistrationResult, LooopRuntimeConfig, LooopStats, NetworkStats, PaginatedResult, PaginationInfo, PaginationParams, PushResult, RackConfig, RackSession, RepoCommit, RepoFile, RepoInfo, RepoTree, SkillMeta, SkillRegistrationInput, SkillRegistrationResult, SkillStats, StarInfo, StarResult, TensorMeta, TensorRegistrationInput, TensorRegistrationResult, TensorStats, TokenBudget, TreeEntry, TrendingRepo };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacknet/rackutils",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "React hooks and components for reading and writing StackNet Racks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -28,22 +28,17 @@
|
|
|
28
28
|
"require": "./dist/components/index.cjs"
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
|
-
"files": [
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
"dev": "tsup --watch",
|
|
36
|
-
"clean": "rm -rf dist",
|
|
37
|
-
"typecheck": "tsc --noEmit",
|
|
38
|
-
"prepublishOnly": "pnpm run clean && pnpm run typecheck && pnpm run build:publish",
|
|
39
|
-
"release": "pnpm run prepublishOnly && npm publish --access public"
|
|
40
|
-
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"README.md"
|
|
34
|
+
],
|
|
41
35
|
"dependencies": {
|
|
42
36
|
"clsx": "^2.1.1",
|
|
43
37
|
"tailwind-merge": "^2.5.4",
|
|
44
38
|
"lucide-react": "^0.460.0"
|
|
45
39
|
},
|
|
46
40
|
"devDependencies": {
|
|
41
|
+
"@types/bun": "latest",
|
|
47
42
|
"@types/react": "^19.0.0",
|
|
48
43
|
"@types/react-dom": "^19.0.0",
|
|
49
44
|
"react": "^19.0.0",
|
|
@@ -55,5 +50,15 @@
|
|
|
55
50
|
"react": ">=18.0.0",
|
|
56
51
|
"react-dom": ">=18.0.0"
|
|
57
52
|
},
|
|
58
|
-
"license": "MIT"
|
|
59
|
-
|
|
53
|
+
"license": "MIT",
|
|
54
|
+
"scripts": {
|
|
55
|
+
"build": "tsup",
|
|
56
|
+
"build:publish": "tsup --no-sourcemap --minify",
|
|
57
|
+
"dev": "tsup --watch",
|
|
58
|
+
"clean": "rm -rf dist",
|
|
59
|
+
"typecheck": "tsc --noEmit",
|
|
60
|
+
"release": "pnpm run prepublishOnly && npm publish --access public",
|
|
61
|
+
"test": "bun test",
|
|
62
|
+
"coverage": "bun test --coverage"
|
|
63
|
+
}
|
|
64
|
+
}
|