@tuturuuu/internal-api 0.0.2 → 0.1.0
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/ai-memory.d.ts +76 -0
- package/dist/ai-memory.d.ts.map +1 -0
- package/dist/ai-memory.js +59 -0
- package/dist/ai.d.ts +67 -3
- package/dist/ai.d.ts.map +1 -1
- package/dist/ai.js +121 -0
- package/dist/auth.d.ts +121 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +111 -0
- package/dist/calendar.d.ts +17 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +9 -0
- package/dist/chat-conversations.d.ts +81 -0
- package/dist/chat-conversations.d.ts.map +1 -0
- package/dist/chat-conversations.js +384 -0
- package/dist/chat-internal.d.ts +11 -0
- package/dist/chat-internal.d.ts.map +1 -0
- package/dist/chat-internal.js +39 -0
- package/dist/chat-legacy.d.ts +23 -0
- package/dist/chat-legacy.d.ts.map +1 -0
- package/dist/chat-legacy.js +68 -0
- package/dist/chat-types.d.ts +262 -0
- package/dist/chat-types.d.ts.map +1 -0
- package/dist/chat-types.js +2 -0
- package/dist/chat.d.ts +3 -45
- package/dist/chat.d.ts.map +1 -1
- package/dist/chat.js +17 -65
- package/dist/client.d.ts +5 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +50 -5
- package/dist/education.d.ts +288 -2
- package/dist/education.d.ts.map +1 -1
- package/dist/education.js +176 -0
- package/dist/external-project-team.d.ts +51 -0
- package/dist/external-project-team.d.ts.map +1 -0
- package/dist/external-project-team.js +137 -0
- package/dist/external-projects.d.ts +98 -10
- package/dist/external-projects.d.ts.map +1 -1
- package/dist/external-projects.js +92 -33
- package/dist/finance.d.ts +491 -3
- package/dist/finance.d.ts.map +1 -1
- package/dist/finance.js +611 -1
- package/dist/hive.d.ts +739 -0
- package/dist/hive.d.ts.map +1 -0
- package/dist/hive.js +333 -0
- package/dist/index.d.ts +31 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +350 -8
- package/dist/infrastructure.d.ts +955 -1
- package/dist/infrastructure.d.ts.map +1 -1
- package/dist/infrastructure.js +595 -0
- package/dist/inventory.d.ts +355 -0
- package/dist/inventory.d.ts.map +1 -0
- package/dist/inventory.js +268 -0
- package/dist/mail.d.ts +125 -0
- package/dist/mail.d.ts.map +1 -1
- package/dist/mail.js +112 -1
- package/dist/meet.d.ts +54 -0
- package/dist/meet.d.ts.map +1 -0
- package/dist/meet.js +37 -0
- package/dist/mind.d.ts +55 -0
- package/dist/mind.d.ts.map +1 -0
- package/dist/mind.js +84 -0
- package/dist/posts.d.ts +33 -0
- package/dist/posts.d.ts.map +1 -1
- package/dist/posts.js +42 -0
- package/dist/promotions.d.ts +54 -0
- package/dist/promotions.d.ts.map +1 -1
- package/dist/promotions.js +52 -0
- package/dist/settings.d.ts +28 -1
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +68 -0
- package/dist/storage.d.ts +32 -21
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +52 -32
- package/dist/tasks.d.ts +222 -4
- package/dist/tasks.d.ts.map +1 -1
- package/dist/tasks.js +202 -0
- package/dist/teach.d.ts +130 -0
- package/dist/teach.d.ts.map +1 -0
- package/dist/teach.js +110 -0
- package/dist/topic-announcements.d.ts +235 -0
- package/dist/topic-announcements.d.ts.map +1 -0
- package/dist/topic-announcements.js +182 -0
- package/dist/tulearn.d.ts +223 -0
- package/dist/tulearn.d.ts.map +1 -0
- package/dist/tulearn.js +97 -0
- package/dist/tutoring.d.ts +152 -0
- package/dist/tutoring.d.ts.map +1 -0
- package/dist/tutoring.js +58 -0
- package/dist/user-group-activity.d.ts +54 -0
- package/dist/user-group-activity.d.ts.map +1 -0
- package/dist/user-group-activity.js +11 -0
- package/dist/user-groups.d.ts +35 -0
- package/dist/user-groups.d.ts.map +1 -0
- package/dist/user-groups.js +84 -0
- package/dist/users.d.ts +83 -1
- package/dist/users.d.ts.map +1 -1
- package/dist/users.js +137 -0
- package/dist/workspace-configs.d.ts +2 -0
- package/dist/workspace-configs.d.ts.map +1 -1
- package/dist/workspace-configs.js +3 -1
- package/dist/workspace-user-audit.d.ts +1 -0
- package/dist/workspace-user-audit.d.ts.map +1 -1
- package/dist/workspaces.d.ts +57 -0
- package/dist/workspaces.d.ts.map +1 -1
- package/dist/workspaces.js +58 -1
- package/package.json +59 -6
package/dist/hive.d.ts
ADDED
|
@@ -0,0 +1,739 @@
|
|
|
1
|
+
import type { AIModelUI, InternalApiWorkspaceSummary } from '@tuturuuu/types';
|
|
2
|
+
import type { Json } from '@tuturuuu/types/db';
|
|
3
|
+
import { type InternalApiClientOptions } from './client';
|
|
4
|
+
export type HiveJsonObject = {
|
|
5
|
+
[key: string]: Json | undefined;
|
|
6
|
+
};
|
|
7
|
+
export type HiveVector3 = {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
z: number;
|
|
11
|
+
};
|
|
12
|
+
export type HiveBlock = {
|
|
13
|
+
id: string;
|
|
14
|
+
type: string;
|
|
15
|
+
position: HiveVector3;
|
|
16
|
+
state?: HiveJsonObject;
|
|
17
|
+
};
|
|
18
|
+
export type HiveObject = {
|
|
19
|
+
id: string;
|
|
20
|
+
type: string;
|
|
21
|
+
position: HiveVector3;
|
|
22
|
+
rotation?: number;
|
|
23
|
+
state?: HiveJsonObject;
|
|
24
|
+
};
|
|
25
|
+
export type HiveWorldData = {
|
|
26
|
+
blocks: HiveBlock[];
|
|
27
|
+
objects: HiveObject[];
|
|
28
|
+
};
|
|
29
|
+
export type HiveServerSettings = {
|
|
30
|
+
autonomousNpcEnabled?: boolean;
|
|
31
|
+
cronEnabled?: boolean;
|
|
32
|
+
defaultCreditSource?: HiveCreditSource;
|
|
33
|
+
defaultCreditWsId?: string | null;
|
|
34
|
+
defaultModel?: string | null;
|
|
35
|
+
llmProvider?: 'disabled' | 'ollama' | 'mira';
|
|
36
|
+
maxAutonomousInteractionsPerTick?: number;
|
|
37
|
+
maxInteractionTurns?: number;
|
|
38
|
+
maxLlmSpendPerTick?: number;
|
|
39
|
+
maxTickBudget?: number;
|
|
40
|
+
minInteractionCooldownSeconds?: number;
|
|
41
|
+
ollamaEnabled?: boolean;
|
|
42
|
+
ollamaKeepAlive?: string;
|
|
43
|
+
ollamaModel?: 'gemma4';
|
|
44
|
+
simulationCronEnabled?: boolean;
|
|
45
|
+
tickIntervalSeconds?: number;
|
|
46
|
+
};
|
|
47
|
+
export type HiveServer = {
|
|
48
|
+
createdAt: string;
|
|
49
|
+
description: string | null;
|
|
50
|
+
enabled: boolean;
|
|
51
|
+
id: string;
|
|
52
|
+
maxPlayers: number;
|
|
53
|
+
name: string;
|
|
54
|
+
ollamaState?: HiveJsonObject;
|
|
55
|
+
settings?: HiveServerSettings;
|
|
56
|
+
slug: string;
|
|
57
|
+
totalCurrency?: number;
|
|
58
|
+
};
|
|
59
|
+
export type HiveWorldEvent = {
|
|
60
|
+
actorUserId: string | null;
|
|
61
|
+
createdAt: string;
|
|
62
|
+
eventType: string;
|
|
63
|
+
id: string;
|
|
64
|
+
payload: HiveJsonObject;
|
|
65
|
+
researchSessionId?: string | null;
|
|
66
|
+
revision: number;
|
|
67
|
+
serverId: string;
|
|
68
|
+
};
|
|
69
|
+
export type HiveNpc = {
|
|
70
|
+
backstory: string;
|
|
71
|
+
backstoryEnabled: boolean;
|
|
72
|
+
customPromptEnabled: boolean;
|
|
73
|
+
id: string;
|
|
74
|
+
memoryEnabled: boolean;
|
|
75
|
+
model: string;
|
|
76
|
+
name: string;
|
|
77
|
+
position: HiveVector3;
|
|
78
|
+
role: string;
|
|
79
|
+
serverId: string;
|
|
80
|
+
settings: HiveJsonObject;
|
|
81
|
+
status?: string;
|
|
82
|
+
systemPrompt: string;
|
|
83
|
+
};
|
|
84
|
+
export type HiveRealtimeAwareness = {
|
|
85
|
+
activeTool?: string;
|
|
86
|
+
avatarUrl?: string | null;
|
|
87
|
+
camera?: HiveVector3;
|
|
88
|
+
color: string;
|
|
89
|
+
cursor?: HiveVector3 | null;
|
|
90
|
+
displayName: string;
|
|
91
|
+
focus?: string;
|
|
92
|
+
lastSeenAt: string;
|
|
93
|
+
role: 'admin' | 'member' | 'researcher';
|
|
94
|
+
selection?: {
|
|
95
|
+
id: string;
|
|
96
|
+
kind: string;
|
|
97
|
+
} | null;
|
|
98
|
+
userId: string;
|
|
99
|
+
worldPosition?: HiveVector3 | null;
|
|
100
|
+
};
|
|
101
|
+
export type HiveEconomySnapshot = {
|
|
102
|
+
inventories?: Array<{
|
|
103
|
+
item_type: string;
|
|
104
|
+
owner_id: string;
|
|
105
|
+
owner_type: string;
|
|
106
|
+
quantity: number;
|
|
107
|
+
}>;
|
|
108
|
+
totalCurrency: number;
|
|
109
|
+
warehouses?: Array<{
|
|
110
|
+
capacity: number;
|
|
111
|
+
id: string;
|
|
112
|
+
name: string;
|
|
113
|
+
position: HiveJsonObject;
|
|
114
|
+
}>;
|
|
115
|
+
};
|
|
116
|
+
export type HiveCropSnapshot = Array<{
|
|
117
|
+
crop_type: string;
|
|
118
|
+
growth_stage: number;
|
|
119
|
+
health: number;
|
|
120
|
+
id: string;
|
|
121
|
+
max_growth_stage: number;
|
|
122
|
+
needs_water: boolean;
|
|
123
|
+
position: HiveJsonObject;
|
|
124
|
+
}>;
|
|
125
|
+
export type HiveNpcMemory = {
|
|
126
|
+
content: string;
|
|
127
|
+
enabled: boolean;
|
|
128
|
+
id: string;
|
|
129
|
+
importance: number;
|
|
130
|
+
npcId: string;
|
|
131
|
+
};
|
|
132
|
+
export type HiveNpcRun = {
|
|
133
|
+
actorUserId?: string | null;
|
|
134
|
+
autonomous?: boolean;
|
|
135
|
+
creditSource?: HiveCreditSource | null;
|
|
136
|
+
creditWsId?: string | null;
|
|
137
|
+
creditsDeducted?: number;
|
|
138
|
+
createdAt: string;
|
|
139
|
+
error?: string | null;
|
|
140
|
+
id: string;
|
|
141
|
+
inputContext: HiveJsonObject;
|
|
142
|
+
inputTokens?: number;
|
|
143
|
+
interactionId?: string | null;
|
|
144
|
+
llmCost?: number;
|
|
145
|
+
llmModel?: string | null;
|
|
146
|
+
llmProvider?: string | null;
|
|
147
|
+
npcId: string;
|
|
148
|
+
outputDecision: HiveJsonObject;
|
|
149
|
+
outputTokens?: number;
|
|
150
|
+
promptMode?: string;
|
|
151
|
+
researchSessionId?: string | null;
|
|
152
|
+
reasoningTokens?: number;
|
|
153
|
+
status?: HiveNpcRunStatus;
|
|
154
|
+
targetNpcId?: string | null;
|
|
155
|
+
trigger?: HiveNpcRunTrigger;
|
|
156
|
+
};
|
|
157
|
+
export type HiveCreditSource = 'personal' | 'workspace';
|
|
158
|
+
export type HiveNpcRunStatus = 'completed' | 'failed' | 'running' | 'skipped';
|
|
159
|
+
export type HiveNpcRunTrigger = 'autonomous' | 'cron' | 'manual' | 'simulation' | 'workflow';
|
|
160
|
+
export type HiveAiCreditStatus = {
|
|
161
|
+
allowedFeatures: string[];
|
|
162
|
+
allowedModels: string[];
|
|
163
|
+
balanceScope: 'user' | 'workspace';
|
|
164
|
+
bonusCredits: number;
|
|
165
|
+
dailyLimit: number | null;
|
|
166
|
+
dailyUsed: number;
|
|
167
|
+
defaultImageModel: string;
|
|
168
|
+
defaultLanguageModel: string;
|
|
169
|
+
maxOutputTokens: number | null;
|
|
170
|
+
payg?: {
|
|
171
|
+
nextExpiry: string | null;
|
|
172
|
+
remaining: number;
|
|
173
|
+
totalGranted: number;
|
|
174
|
+
totalUsed: number;
|
|
175
|
+
};
|
|
176
|
+
percentUsed: number;
|
|
177
|
+
periodEnd: string;
|
|
178
|
+
periodStart: string;
|
|
179
|
+
remaining: number;
|
|
180
|
+
seatCount: number | null;
|
|
181
|
+
tier: string;
|
|
182
|
+
totalAllocated: number;
|
|
183
|
+
totalUsed: number;
|
|
184
|
+
};
|
|
185
|
+
export type HiveMember = {
|
|
186
|
+
createdAt: string;
|
|
187
|
+
enabled: boolean;
|
|
188
|
+
id: string;
|
|
189
|
+
notes: string | null;
|
|
190
|
+
userId: string;
|
|
191
|
+
};
|
|
192
|
+
export type HiveAccessRequestStatus = 'approved' | 'none' | 'pending' | 'rejected';
|
|
193
|
+
export type HiveAccessRequest = {
|
|
194
|
+
createdAt: string;
|
|
195
|
+
email: string | null;
|
|
196
|
+
id: string;
|
|
197
|
+
note: string | null;
|
|
198
|
+
requestedAt: string;
|
|
199
|
+
resolutionNote: string | null;
|
|
200
|
+
resolvedAt: string | null;
|
|
201
|
+
resolvedBy: string | null;
|
|
202
|
+
status: Exclude<HiveAccessRequestStatus, 'none'>;
|
|
203
|
+
updatedAt: string;
|
|
204
|
+
userId: string;
|
|
205
|
+
};
|
|
206
|
+
export type HiveAccessRequestStatusResponse = {
|
|
207
|
+
hasAccess: boolean;
|
|
208
|
+
member: HiveMember | null;
|
|
209
|
+
request: HiveAccessRequest | null;
|
|
210
|
+
status: HiveAccessRequestStatus;
|
|
211
|
+
};
|
|
212
|
+
export type HiveAccessRequestPayload = {
|
|
213
|
+
note?: string | null;
|
|
214
|
+
};
|
|
215
|
+
export type HiveAccessRequestApprovalPayload = {
|
|
216
|
+
notes?: string | null;
|
|
217
|
+
};
|
|
218
|
+
export type HiveSnapshotResponse = {
|
|
219
|
+
crdt?: {
|
|
220
|
+
state: string | null;
|
|
221
|
+
stateVector: string | null;
|
|
222
|
+
};
|
|
223
|
+
crops?: HiveCropSnapshot;
|
|
224
|
+
economy?: HiveEconomySnapshot;
|
|
225
|
+
events: HiveWorldEvent[];
|
|
226
|
+
npcs: HiveNpc[];
|
|
227
|
+
revision: number;
|
|
228
|
+
server: HiveServer;
|
|
229
|
+
world: HiveWorldData;
|
|
230
|
+
};
|
|
231
|
+
export type HiveWorkspacesResponse = {
|
|
232
|
+
personalWorkspaceId: string | null;
|
|
233
|
+
workspaces: InternalApiWorkspaceSummary[];
|
|
234
|
+
};
|
|
235
|
+
export type HiveAiModelsResponse = {
|
|
236
|
+
models: AIModelUI[];
|
|
237
|
+
};
|
|
238
|
+
export type HiveTimelineEventItem = {
|
|
239
|
+
actorUserId: string | null;
|
|
240
|
+
createdAt: string;
|
|
241
|
+
eventType: string;
|
|
242
|
+
id: string;
|
|
243
|
+
kind: 'event';
|
|
244
|
+
payload: HiveJsonObject;
|
|
245
|
+
researchSessionId: string | null;
|
|
246
|
+
revision: number;
|
|
247
|
+
};
|
|
248
|
+
export type HiveTimelineRunItem = {
|
|
249
|
+
actorUserId: string | null;
|
|
250
|
+
autonomous: boolean;
|
|
251
|
+
creditSource: HiveCreditSource | null;
|
|
252
|
+
creditWsId: string | null;
|
|
253
|
+
creditsDeducted: number;
|
|
254
|
+
createdAt: string;
|
|
255
|
+
error: string | null;
|
|
256
|
+
id: string;
|
|
257
|
+
inputContext: HiveJsonObject;
|
|
258
|
+
inputTokens: number;
|
|
259
|
+
interactionId: string | null;
|
|
260
|
+
kind: 'run';
|
|
261
|
+
llmCost: number;
|
|
262
|
+
llmModel: string | null;
|
|
263
|
+
llmProvider: string | null;
|
|
264
|
+
npcId: string;
|
|
265
|
+
npcName: string | null;
|
|
266
|
+
outputDecision: HiveJsonObject;
|
|
267
|
+
outputTokens: number;
|
|
268
|
+
promptMode: string;
|
|
269
|
+
researchSessionId: string | null;
|
|
270
|
+
reasoningTokens: number;
|
|
271
|
+
status: HiveNpcRunStatus;
|
|
272
|
+
targetNpcId: string | null;
|
|
273
|
+
targetNpcName: string | null;
|
|
274
|
+
trigger: HiveNpcRunTrigger;
|
|
275
|
+
};
|
|
276
|
+
export type HiveTimelineInteractionItem = {
|
|
277
|
+
actorUserId: string | null;
|
|
278
|
+
autonomous: boolean;
|
|
279
|
+
createdAt: string;
|
|
280
|
+
creditSource: HiveCreditSource | null;
|
|
281
|
+
creditWsId: string | null;
|
|
282
|
+
creditsDeducted: number;
|
|
283
|
+
id: string;
|
|
284
|
+
interactionId: string;
|
|
285
|
+
kind: 'interaction';
|
|
286
|
+
llmCost: number;
|
|
287
|
+
llmModel: string | null;
|
|
288
|
+
llmProvider: string | null;
|
|
289
|
+
npcName: string | null;
|
|
290
|
+
researchSessionId: string | null;
|
|
291
|
+
runs: HiveTimelineRunItem[];
|
|
292
|
+
status: HiveNpcRunStatus;
|
|
293
|
+
targetNpcName: string | null;
|
|
294
|
+
trigger: HiveNpcRunTrigger;
|
|
295
|
+
};
|
|
296
|
+
export type HiveTimelineItem = HiveTimelineEventItem | HiveTimelineInteractionItem | HiveTimelineRunItem | HiveTimelineSessionEventItem | HiveTimelineSimulationTickItem | HiveTimelineWorkflowRunItem;
|
|
297
|
+
export type HiveTimelineResponse = {
|
|
298
|
+
items: HiveTimelineItem[];
|
|
299
|
+
};
|
|
300
|
+
export type HiveTimelineSessionEventItem = HiveResearchSessionEvent & {
|
|
301
|
+
kind: 'session_event';
|
|
302
|
+
researchSessionId: string;
|
|
303
|
+
};
|
|
304
|
+
export type HiveTimelineSimulationTickItem = {
|
|
305
|
+
actionsCount: number;
|
|
306
|
+
createdAt: string;
|
|
307
|
+
error: string | null;
|
|
308
|
+
finishedAt: string | null;
|
|
309
|
+
id: string;
|
|
310
|
+
kind: 'simulation_tick';
|
|
311
|
+
llmSpend: number;
|
|
312
|
+
researchSessionId: string | null;
|
|
313
|
+
serverId: string;
|
|
314
|
+
startedAt: string;
|
|
315
|
+
status: 'completed' | 'failed' | 'running' | 'skipped';
|
|
316
|
+
summary: Json;
|
|
317
|
+
};
|
|
318
|
+
export type HiveTimelineWorkflowRunItem = {
|
|
319
|
+
actorUserId: string | null;
|
|
320
|
+
createdAt: string;
|
|
321
|
+
error: string | null;
|
|
322
|
+
finishedAt: string | null;
|
|
323
|
+
id: string;
|
|
324
|
+
input: Json;
|
|
325
|
+
kind: 'workflow_run';
|
|
326
|
+
output: Json;
|
|
327
|
+
researchSessionId: string | null;
|
|
328
|
+
serverId: string;
|
|
329
|
+
startedAt: string;
|
|
330
|
+
status: HiveWorkflowRunStatus;
|
|
331
|
+
stepTrace: HiveWorkflowStepTrace[];
|
|
332
|
+
workflowId: string;
|
|
333
|
+
workflowName: string | null;
|
|
334
|
+
};
|
|
335
|
+
export type HiveServersResponse = {
|
|
336
|
+
isAdmin: boolean;
|
|
337
|
+
servers: HiveServer[];
|
|
338
|
+
};
|
|
339
|
+
export type HiveRealtimeTokenResponse = {
|
|
340
|
+
expiresAt: string;
|
|
341
|
+
token: string;
|
|
342
|
+
url: string;
|
|
343
|
+
};
|
|
344
|
+
export type HiveWorldEventPayload = {
|
|
345
|
+
eventType: string;
|
|
346
|
+
expectedRevision: number;
|
|
347
|
+
payload: HiveJsonObject;
|
|
348
|
+
researchSessionId?: string | null;
|
|
349
|
+
world: HiveWorldData;
|
|
350
|
+
};
|
|
351
|
+
export type HiveCrdtUpdatePayload = {
|
|
352
|
+
update: string;
|
|
353
|
+
world?: HiveWorldData;
|
|
354
|
+
};
|
|
355
|
+
export type HiveFarmingActionPayload = {
|
|
356
|
+
action: 'plant';
|
|
357
|
+
cropType?: string;
|
|
358
|
+
npcId?: string;
|
|
359
|
+
position: HiveVector3;
|
|
360
|
+
} | {
|
|
361
|
+
action: 'water';
|
|
362
|
+
cropId: string;
|
|
363
|
+
} | {
|
|
364
|
+
action: 'harvest';
|
|
365
|
+
cropId: string;
|
|
366
|
+
npcId?: string;
|
|
367
|
+
};
|
|
368
|
+
export type HiveWarehouseActionPayload = {
|
|
369
|
+
action: 'create';
|
|
370
|
+
capacity?: number;
|
|
371
|
+
name: string;
|
|
372
|
+
position: HiveVector3;
|
|
373
|
+
} | {
|
|
374
|
+
action: 'transfer';
|
|
375
|
+
fromOwnerId: string;
|
|
376
|
+
fromOwnerType: 'npc' | 'warehouse';
|
|
377
|
+
itemType: string;
|
|
378
|
+
quantity: number;
|
|
379
|
+
toOwnerId: string;
|
|
380
|
+
toOwnerType: 'npc' | 'warehouse';
|
|
381
|
+
};
|
|
382
|
+
export type HiveTradeActionPayload = {
|
|
383
|
+
action: 'create';
|
|
384
|
+
expiresAt?: string | null;
|
|
385
|
+
fromNpcId: string;
|
|
386
|
+
offeredCurrency?: number;
|
|
387
|
+
offeredItems?: Json[];
|
|
388
|
+
requestedCurrency?: number;
|
|
389
|
+
requestedItems?: Json[];
|
|
390
|
+
toNpcId?: string | null;
|
|
391
|
+
} | {
|
|
392
|
+
acceptingNpcId: string;
|
|
393
|
+
action: 'accept';
|
|
394
|
+
tradeId: string;
|
|
395
|
+
};
|
|
396
|
+
export type HiveWorkflowNodeType = 'agent_interaction' | 'condition' | 'context' | 'farming' | 'log' | 'manual_trigger' | 'npc_decision' | 'simulation_tick' | 'trade' | 'transform' | 'update_npc' | 'warehouse' | 'world_event';
|
|
397
|
+
export type HiveWorkflowNodePosition = {
|
|
398
|
+
x: number;
|
|
399
|
+
y: number;
|
|
400
|
+
};
|
|
401
|
+
export type HiveWorkflowNode = {
|
|
402
|
+
data: {
|
|
403
|
+
config?: HiveJsonObject;
|
|
404
|
+
description?: string;
|
|
405
|
+
label: string;
|
|
406
|
+
};
|
|
407
|
+
id: string;
|
|
408
|
+
position: HiveWorkflowNodePosition;
|
|
409
|
+
type: HiveWorkflowNodeType;
|
|
410
|
+
};
|
|
411
|
+
export type HiveWorkflowEdge = {
|
|
412
|
+
id: string;
|
|
413
|
+
label?: string;
|
|
414
|
+
source: string;
|
|
415
|
+
sourceHandle?: string | null;
|
|
416
|
+
target: string;
|
|
417
|
+
targetHandle?: string | null;
|
|
418
|
+
};
|
|
419
|
+
export type HiveWorkflowDefinition = {
|
|
420
|
+
edges: HiveWorkflowEdge[];
|
|
421
|
+
nodes: HiveWorkflowNode[];
|
|
422
|
+
version: 1;
|
|
423
|
+
};
|
|
424
|
+
export type HiveWorkflow = {
|
|
425
|
+
archivedAt: string | null;
|
|
426
|
+
createdAt: string;
|
|
427
|
+
createdBy: string | null;
|
|
428
|
+
definition: HiveWorkflowDefinition;
|
|
429
|
+
description: string | null;
|
|
430
|
+
enabled: boolean;
|
|
431
|
+
id: string;
|
|
432
|
+
name: string;
|
|
433
|
+
serverId: string;
|
|
434
|
+
updatedAt: string;
|
|
435
|
+
updatedBy: string | null;
|
|
436
|
+
version: number;
|
|
437
|
+
};
|
|
438
|
+
export type HiveWorkflowRunStatus = 'completed' | 'failed' | 'running';
|
|
439
|
+
export type HiveWorkflowStepTrace = {
|
|
440
|
+
durationMs?: number;
|
|
441
|
+
error?: string | null;
|
|
442
|
+
input?: Json;
|
|
443
|
+
nodeId: string;
|
|
444
|
+
nodeType: HiveWorkflowNodeType;
|
|
445
|
+
output?: Json;
|
|
446
|
+
status: HiveWorkflowRunStatus;
|
|
447
|
+
};
|
|
448
|
+
export type HiveWorkflowRun = {
|
|
449
|
+
actorUserId: string | null;
|
|
450
|
+
createdAt: string;
|
|
451
|
+
error: string | null;
|
|
452
|
+
finishedAt: string | null;
|
|
453
|
+
id: string;
|
|
454
|
+
input: Json;
|
|
455
|
+
output: Json;
|
|
456
|
+
researchSessionId?: string | null;
|
|
457
|
+
serverId: string;
|
|
458
|
+
startedAt: string;
|
|
459
|
+
status: HiveWorkflowRunStatus;
|
|
460
|
+
stepTrace: HiveWorkflowStepTrace[];
|
|
461
|
+
workflowId: string;
|
|
462
|
+
};
|
|
463
|
+
export type HiveWorkflowPayload = {
|
|
464
|
+
definition: HiveWorkflowDefinition;
|
|
465
|
+
description?: string | null;
|
|
466
|
+
enabled?: boolean;
|
|
467
|
+
name: string;
|
|
468
|
+
};
|
|
469
|
+
export type HiveWorkflowRunPayload = {
|
|
470
|
+
input?: HiveJsonObject;
|
|
471
|
+
researchSessionId?: string | null;
|
|
472
|
+
};
|
|
473
|
+
export type HiveNpcPayload = {
|
|
474
|
+
backstory?: string;
|
|
475
|
+
backstoryEnabled?: boolean;
|
|
476
|
+
customPromptEnabled?: boolean;
|
|
477
|
+
memoryEnabled?: boolean;
|
|
478
|
+
model?: string;
|
|
479
|
+
name: string;
|
|
480
|
+
position?: HiveVector3;
|
|
481
|
+
role?: string;
|
|
482
|
+
settings?: HiveJsonObject;
|
|
483
|
+
systemPrompt?: string;
|
|
484
|
+
};
|
|
485
|
+
export type HiveNpcRunPayload = {
|
|
486
|
+
creditSource?: HiveCreditSource;
|
|
487
|
+
creditWsId?: string;
|
|
488
|
+
expectedRevision: number;
|
|
489
|
+
maxTurns?: number;
|
|
490
|
+
model?: string;
|
|
491
|
+
promptMode: 'default' | 'enhanced' | 'custom';
|
|
492
|
+
prompt?: string | null;
|
|
493
|
+
researchSessionId?: string | null;
|
|
494
|
+
targetNpcId?: string | null;
|
|
495
|
+
trigger?: HiveNpcRunTrigger;
|
|
496
|
+
world: HiveWorldData;
|
|
497
|
+
};
|
|
498
|
+
export type HiveNpcInteractionPayload = {
|
|
499
|
+
creditSource?: HiveCreditSource;
|
|
500
|
+
creditWsId?: string;
|
|
501
|
+
expectedRevision: number;
|
|
502
|
+
maxTurns?: number;
|
|
503
|
+
model?: string;
|
|
504
|
+
prompt?: string | null;
|
|
505
|
+
researchSessionId?: string | null;
|
|
506
|
+
sourceNpcId: string;
|
|
507
|
+
targetNpcId: string;
|
|
508
|
+
trigger?: HiveNpcRunTrigger;
|
|
509
|
+
world: HiveWorldData;
|
|
510
|
+
};
|
|
511
|
+
export type HiveServerPayload = Pick<HiveServer, 'description' | 'enabled' | 'maxPlayers' | 'name'>;
|
|
512
|
+
export type HiveMemberPayload = {
|
|
513
|
+
enabled?: boolean;
|
|
514
|
+
notes?: string | null;
|
|
515
|
+
userId: string;
|
|
516
|
+
};
|
|
517
|
+
export type HiveResearchSessionStatus = 'archived' | 'completed' | 'paused' | 'running';
|
|
518
|
+
export type HiveResearchSession = {
|
|
519
|
+
createdAt: string;
|
|
520
|
+
createdBy: string | null;
|
|
521
|
+
description: string | null;
|
|
522
|
+
endedAt: string | null;
|
|
523
|
+
id: string;
|
|
524
|
+
metadata: Json;
|
|
525
|
+
name: string;
|
|
526
|
+
serverId: string;
|
|
527
|
+
startedAt: string;
|
|
528
|
+
status: HiveResearchSessionStatus;
|
|
529
|
+
updatedAt: string;
|
|
530
|
+
};
|
|
531
|
+
export type HiveResearchSessionEvent = {
|
|
532
|
+
actorUserId: string | null;
|
|
533
|
+
createdAt: string;
|
|
534
|
+
eventKind: string;
|
|
535
|
+
id: string;
|
|
536
|
+
payload: Json;
|
|
537
|
+
serverId: string;
|
|
538
|
+
sessionId: string;
|
|
539
|
+
sourceId: string | null;
|
|
540
|
+
sourceType: string;
|
|
541
|
+
};
|
|
542
|
+
export type HiveResearchSessionsResponse = {
|
|
543
|
+
activeSession: HiveResearchSession | null;
|
|
544
|
+
sessions: HiveResearchSession[];
|
|
545
|
+
};
|
|
546
|
+
export type HiveResearchSessionPayload = {
|
|
547
|
+
description?: string | null;
|
|
548
|
+
metadata?: HiveJsonObject;
|
|
549
|
+
name: string;
|
|
550
|
+
status?: Extract<HiveResearchSessionStatus, 'paused' | 'running'>;
|
|
551
|
+
};
|
|
552
|
+
export type HiveResearchSessionPatchPayload = Partial<Omit<HiveResearchSessionPayload, 'status'>> & {
|
|
553
|
+
status?: HiveResearchSessionStatus;
|
|
554
|
+
};
|
|
555
|
+
export type HivePairQueuePair = {
|
|
556
|
+
sourceNpcId: string;
|
|
557
|
+
targetNpcId: string;
|
|
558
|
+
};
|
|
559
|
+
export type HivePairQueuePayload = {
|
|
560
|
+
creditSource?: HiveCreditSource;
|
|
561
|
+
creditWsId?: string;
|
|
562
|
+
expectedRevision: number;
|
|
563
|
+
maxPairs?: number;
|
|
564
|
+
maxTurns?: number;
|
|
565
|
+
model?: string;
|
|
566
|
+
pairs: HivePairQueuePair[];
|
|
567
|
+
prompt?: string | null;
|
|
568
|
+
world: HiveWorldData;
|
|
569
|
+
};
|
|
570
|
+
export type HivePairQueueResult = {
|
|
571
|
+
error?: string;
|
|
572
|
+
event?: HiveWorldEvent | null;
|
|
573
|
+
index: number;
|
|
574
|
+
interactionId?: string;
|
|
575
|
+
ok: boolean;
|
|
576
|
+
pair: HivePairQueuePair;
|
|
577
|
+
runs: HiveNpcRun[];
|
|
578
|
+
};
|
|
579
|
+
export type HivePairQueueResponse = {
|
|
580
|
+
results: HivePairQueueResult[];
|
|
581
|
+
summary: {
|
|
582
|
+
completed: number;
|
|
583
|
+
failed: number;
|
|
584
|
+
total: number;
|
|
585
|
+
};
|
|
586
|
+
};
|
|
587
|
+
export type HiveMindSimulationPayload = {
|
|
588
|
+
boardId: string;
|
|
589
|
+
maxAgents?: number;
|
|
590
|
+
maxPairs?: number;
|
|
591
|
+
workspaceId: string;
|
|
592
|
+
};
|
|
593
|
+
export type HiveMindSimulationResponse = {
|
|
594
|
+
mindBoard: {
|
|
595
|
+
edgeCount: number;
|
|
596
|
+
id: string;
|
|
597
|
+
nodeCount: number;
|
|
598
|
+
title: string;
|
|
599
|
+
};
|
|
600
|
+
npcs: HiveNpc[];
|
|
601
|
+
summary: {
|
|
602
|
+
agents: number;
|
|
603
|
+
pairs: number;
|
|
604
|
+
};
|
|
605
|
+
workflow: HiveWorkflow;
|
|
606
|
+
};
|
|
607
|
+
export type HiveResearchExport = {
|
|
608
|
+
exportedAt: string;
|
|
609
|
+
formatVersion: 1;
|
|
610
|
+
serverId: string;
|
|
611
|
+
session: HiveResearchSession;
|
|
612
|
+
timeline: HiveTimelineItem[];
|
|
613
|
+
};
|
|
614
|
+
export declare function getMyHiveAccessRequestStatus(options?: InternalApiClientOptions): Promise<HiveAccessRequestStatusResponse>;
|
|
615
|
+
export declare function requestHiveAccess(payload?: HiveAccessRequestPayload, options?: InternalApiClientOptions): Promise<HiveAccessRequestStatusResponse>;
|
|
616
|
+
export declare function listHiveAccessRequests(options?: InternalApiClientOptions): Promise<{
|
|
617
|
+
requests: HiveAccessRequest[];
|
|
618
|
+
}>;
|
|
619
|
+
export declare function approveHiveAccessRequest(requestId: string, payload?: HiveAccessRequestApprovalPayload, options?: InternalApiClientOptions): Promise<{
|
|
620
|
+
member: HiveMember;
|
|
621
|
+
request: HiveAccessRequest;
|
|
622
|
+
}>;
|
|
623
|
+
export declare function listHiveServers(options?: InternalApiClientOptions): Promise<HiveServersResponse>;
|
|
624
|
+
export declare function listHiveWorkspaces(options?: InternalApiClientOptions): Promise<HiveWorkspacesResponse>;
|
|
625
|
+
export declare function getHiveAiCredits(workspaceId: string, options?: InternalApiClientOptions): Promise<HiveAiCreditStatus>;
|
|
626
|
+
export declare function listHiveAiModels(options?: InternalApiClientOptions): Promise<HiveAiModelsResponse>;
|
|
627
|
+
export declare function createHiveServer(payload: HiveServerPayload, options?: InternalApiClientOptions): Promise<{
|
|
628
|
+
server: HiveServer;
|
|
629
|
+
}>;
|
|
630
|
+
export declare function updateHiveServer(serverId: string, payload: Partial<HiveServerPayload>, options?: InternalApiClientOptions): Promise<{
|
|
631
|
+
server: HiveServer;
|
|
632
|
+
}>;
|
|
633
|
+
export declare function deleteHiveServer(serverId: string, options?: InternalApiClientOptions): Promise<{
|
|
634
|
+
ok: true;
|
|
635
|
+
}>;
|
|
636
|
+
export declare function getHiveSnapshot(serverId: string, options?: InternalApiClientOptions): Promise<HiveSnapshotResponse>;
|
|
637
|
+
export declare function listHiveTimeline(serverId: string, paramsOrOptions?: {
|
|
638
|
+
actorUserId?: string | null;
|
|
639
|
+
eventType?: string | null;
|
|
640
|
+
limit?: number;
|
|
641
|
+
npcId?: string | null;
|
|
642
|
+
researchSessionId?: string | null;
|
|
643
|
+
status?: string | null;
|
|
644
|
+
trigger?: string | null;
|
|
645
|
+
workflowId?: string | null;
|
|
646
|
+
} | InternalApiClientOptions, options?: InternalApiClientOptions): Promise<HiveTimelineResponse>;
|
|
647
|
+
export declare function listHiveResearchSessions(serverId: string, options?: InternalApiClientOptions): Promise<HiveResearchSessionsResponse>;
|
|
648
|
+
export declare function createHiveResearchSession(serverId: string, payload: HiveResearchSessionPayload, options?: InternalApiClientOptions): Promise<{
|
|
649
|
+
session: HiveResearchSession;
|
|
650
|
+
}>;
|
|
651
|
+
export declare function updateHiveResearchSession(serverId: string, sessionId: string, payload: HiveResearchSessionPatchPayload, options?: InternalApiClientOptions): Promise<{
|
|
652
|
+
session: HiveResearchSession;
|
|
653
|
+
}>;
|
|
654
|
+
export declare function exportHiveResearchSession(serverId: string, sessionId: string, format: 'jsonl', options?: InternalApiClientOptions): Promise<string>;
|
|
655
|
+
export declare function exportHiveResearchSession(serverId: string, sessionId: string, format?: 'json', options?: InternalApiClientOptions): Promise<HiveResearchExport>;
|
|
656
|
+
export declare function runHivePairQueue(serverId: string, sessionId: string, payload: HivePairQueuePayload, options?: InternalApiClientOptions): Promise<HivePairQueueResponse>;
|
|
657
|
+
export declare function createHiveWorldEvent(serverId: string, payload: HiveWorldEventPayload, options?: InternalApiClientOptions): Promise<{
|
|
658
|
+
event: HiveWorldEvent;
|
|
659
|
+
revision: number;
|
|
660
|
+
}>;
|
|
661
|
+
export declare function getHiveCrdtSnapshot(serverId: string, options?: InternalApiClientOptions): Promise<{
|
|
662
|
+
opSeq: number;
|
|
663
|
+
state: string | null;
|
|
664
|
+
stateVector: string | null;
|
|
665
|
+
world: HiveWorldData;
|
|
666
|
+
}>;
|
|
667
|
+
export declare function postHiveCrdtUpdate(serverId: string, payload: HiveCrdtUpdatePayload, options?: InternalApiClientOptions): Promise<{
|
|
668
|
+
opSeq: number;
|
|
669
|
+
stateVector: string | null;
|
|
670
|
+
world: HiveWorldData;
|
|
671
|
+
}>;
|
|
672
|
+
export declare function updateHiveServerSettings(serverId: string, payload: HiveServerSettings, options?: InternalApiClientOptions): Promise<{
|
|
673
|
+
server: HiveServer;
|
|
674
|
+
}>;
|
|
675
|
+
export declare function runHiveNpcInteraction(serverId: string, payload: HiveNpcInteractionPayload, options?: InternalApiClientOptions): Promise<{
|
|
676
|
+
event: HiveWorldEvent;
|
|
677
|
+
interactionId: string;
|
|
678
|
+
runs: HiveNpcRun[];
|
|
679
|
+
}>;
|
|
680
|
+
export declare function getHiveEconomy(serverId: string, options?: InternalApiClientOptions): Promise<{
|
|
681
|
+
economy: HiveEconomySnapshot & {
|
|
682
|
+
ledger?: Json[];
|
|
683
|
+
};
|
|
684
|
+
}>;
|
|
685
|
+
export declare function runHiveFarmingAction(serverId: string, payload: HiveFarmingActionPayload, options?: InternalApiClientOptions): Promise<Json>;
|
|
686
|
+
export declare function runHiveWarehouseAction(serverId: string, payload: HiveWarehouseActionPayload, options?: InternalApiClientOptions): Promise<Json>;
|
|
687
|
+
export declare function runHiveTradeAction(serverId: string, payload: HiveTradeActionPayload, options?: InternalApiClientOptions): Promise<Json>;
|
|
688
|
+
export declare function runHiveSimulationTick(serverId: string, options?: InternalApiClientOptions): Promise<{
|
|
689
|
+
result: {
|
|
690
|
+
actions: number;
|
|
691
|
+
serverId: string;
|
|
692
|
+
status: string;
|
|
693
|
+
};
|
|
694
|
+
}>;
|
|
695
|
+
export declare function createHiveNpc(serverId: string, payload: HiveNpcPayload, options?: InternalApiClientOptions): Promise<{
|
|
696
|
+
npc: HiveNpc;
|
|
697
|
+
}>;
|
|
698
|
+
export declare function updateHiveNpc(serverId: string, npcId: string, payload: Partial<HiveNpcPayload>, options?: InternalApiClientOptions): Promise<{
|
|
699
|
+
npc: HiveNpc;
|
|
700
|
+
}>;
|
|
701
|
+
export declare function deleteHiveNpc(serverId: string, npcId: string, options?: InternalApiClientOptions): Promise<{
|
|
702
|
+
ok: true;
|
|
703
|
+
}>;
|
|
704
|
+
export declare function getHiveRealtimeToken(serverId: string, options?: InternalApiClientOptions): Promise<HiveRealtimeTokenResponse>;
|
|
705
|
+
export declare function runHiveNpcDecision(serverId: string, npcId: string, payload: HiveNpcRunPayload, options?: InternalApiClientOptions): Promise<{
|
|
706
|
+
event: HiveWorldEvent | null;
|
|
707
|
+
interactionId?: string;
|
|
708
|
+
run: HiveNpcRun;
|
|
709
|
+
runs?: HiveNpcRun[];
|
|
710
|
+
}>;
|
|
711
|
+
export declare function listHiveMembers(options?: InternalApiClientOptions): Promise<{
|
|
712
|
+
members: HiveMember[];
|
|
713
|
+
}>;
|
|
714
|
+
export declare function upsertHiveMember(payload: HiveMemberPayload, options?: InternalApiClientOptions): Promise<{
|
|
715
|
+
member: HiveMember;
|
|
716
|
+
}>;
|
|
717
|
+
export declare function listHiveWorkflows(serverId: string, options?: InternalApiClientOptions): Promise<{
|
|
718
|
+
workflows: HiveWorkflow[];
|
|
719
|
+
}>;
|
|
720
|
+
export declare function createHiveWorkflow(serverId: string, payload: HiveWorkflowPayload, options?: InternalApiClientOptions): Promise<{
|
|
721
|
+
workflow: HiveWorkflow;
|
|
722
|
+
}>;
|
|
723
|
+
export declare function createHiveMindSimulation(serverId: string, payload: HiveMindSimulationPayload, options?: InternalApiClientOptions): Promise<HiveMindSimulationResponse>;
|
|
724
|
+
export declare function updateHiveWorkflow(serverId: string, workflowId: string, payload: Partial<HiveWorkflowPayload>, options?: InternalApiClientOptions): Promise<{
|
|
725
|
+
workflow: HiveWorkflow;
|
|
726
|
+
}>;
|
|
727
|
+
export declare function archiveHiveWorkflow(serverId: string, workflowId: string, options?: InternalApiClientOptions): Promise<{
|
|
728
|
+
ok: true;
|
|
729
|
+
}>;
|
|
730
|
+
export declare function runHiveWorkflow(serverId: string, workflowId: string, payload?: HiveWorkflowRunPayload, options?: InternalApiClientOptions): Promise<{
|
|
731
|
+
run: HiveWorkflowRun;
|
|
732
|
+
}>;
|
|
733
|
+
export declare function listHiveWorkflowRuns(serverId: string, workflowId: string, options?: InternalApiClientOptions): Promise<{
|
|
734
|
+
runs: HiveWorkflowRun[];
|
|
735
|
+
}>;
|
|
736
|
+
export declare function getHiveWorkflowRun(serverId: string, workflowId: string, runId: string, options?: InternalApiClientOptions): Promise<{
|
|
737
|
+
run: HiveWorkflowRun;
|
|
738
|
+
}>;
|
|
739
|
+
//# sourceMappingURL=hive.d.ts.map
|