@world-engines/protocol-ts 0.1.0-alpha.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/LICENSE +46 -0
- package/dist/entity-prop-envelope.d.ts +36 -0
- package/dist/entity-prop-envelope.js +50 -0
- package/dist/gen/v1/auth.d.ts +46 -0
- package/dist/gen/v1/auth.js +278 -0
- package/dist/gen/v1/billing.d.ts +71 -0
- package/dist/gen/v1/billing.js +521 -0
- package/dist/gen/v1/common.d.ts +65 -0
- package/dist/gen/v1/common.js +387 -0
- package/dist/gen/v1/llm.d.ts +317 -0
- package/dist/gen/v1/llm.js +3557 -0
- package/dist/gen/v1/mcp.d.ts +373 -0
- package/dist/gen/v1/mcp.js +3190 -0
- package/dist/gen/v1/moderation.d.ts +51 -0
- package/dist/gen/v1/moderation.js +368 -0
- package/dist/gen/v1/neutral_scenario_source.d.ts +80 -0
- package/dist/gen/v1/neutral_scenario_source.js +569 -0
- package/dist/gen/v1/relation_kind.d.ts +105 -0
- package/dist/gen/v1/relation_kind.js +562 -0
- package/dist/gen/v1/rest/admin.d.ts +432 -0
- package/dist/gen/v1/rest/admin.js +4957 -0
- package/dist/gen/v1/rest/asset.d.ts +205 -0
- package/dist/gen/v1/rest/asset.js +2200 -0
- package/dist/gen/v1/rest/auth.d.ts +275 -0
- package/dist/gen/v1/rest/auth.js +2896 -0
- package/dist/gen/v1/rest/billing.d.ts +101 -0
- package/dist/gen/v1/rest/billing.js +866 -0
- package/dist/gen/v1/rest/common.d.ts +179 -0
- package/dist/gen/v1/rest/common.js +1358 -0
- package/dist/gen/v1/rest/creator.d.ts +354 -0
- package/dist/gen/v1/rest/creator.js +4169 -0
- package/dist/gen/v1/rest/messaging.d.ts +190 -0
- package/dist/gen/v1/rest/messaging.js +2017 -0
- package/dist/gen/v1/rest/moderation.d.ts +61 -0
- package/dist/gen/v1/rest/moderation.js +569 -0
- package/dist/gen/v1/rest/pet.d.ts +98 -0
- package/dist/gen/v1/rest/pet.js +698 -0
- package/dist/gen/v1/rest/project_transfer.d.ts +470 -0
- package/dist/gen/v1/rest/project_transfer.js +5266 -0
- package/dist/gen/v1/rest/scenario.d.ts +756 -0
- package/dist/gen/v1/rest/scenario.js +8768 -0
- package/dist/gen/v1/rest/stock_bounty.d.ts +154 -0
- package/dist/gen/v1/rest/stock_bounty.js +1547 -0
- package/dist/gen/v1/rest/stocks.d.ts +465 -0
- package/dist/gen/v1/rest/stocks.js +5200 -0
- package/dist/gen/v1/rest/support_ticket.d.ts +61 -0
- package/dist/gen/v1/rest/support_ticket.js +511 -0
- package/dist/gen/v1/rest/users.d.ts +292 -0
- package/dist/gen/v1/rest/users.js +2879 -0
- package/dist/gen/v1/rest/violations.d.ts +52 -0
- package/dist/gen/v1/rest/violations.js +338 -0
- package/dist/gen/v1/sav.d.ts +987 -0
- package/dist/gen/v1/sav.js +12327 -0
- package/dist/gen/v1/save.d.ts +68 -0
- package/dist/gen/v1/save.js +595 -0
- package/dist/gen/v1/scenario_part_source.d.ts +94 -0
- package/dist/gen/v1/scenario_part_source.js +913 -0
- package/dist/gen/v1/session.d.ts +49 -0
- package/dist/gen/v1/session.js +311 -0
- package/dist/gen/v1/view_state.d.ts +267 -0
- package/dist/gen/v1/view_state.js +3239 -0
- package/dist/gen/v1/world.d.ts +82 -0
- package/dist/gen/v1/world.js +707 -0
- package/dist/gen/v1/world_memory.d.ts +545 -0
- package/dist/gen/v1/world_memory.js +5816 -0
- package/dist/gen/v1/world_memory_privacy.d.ts +96 -0
- package/dist/gen/v1/world_memory_privacy.js +994 -0
- package/dist/gen/v1/ws_frame.d.ts +1626 -0
- package/dist/gen/v1/ws_frame.js +18253 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -0
- package/dist/ladybug-extraction.d.ts +36 -0
- package/dist/ladybug-extraction.js +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1,987 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
import { ViewStateSnapshot } from "./view_state.js";
|
|
3
|
+
/** 玩家存档的 canonical section 类型。数值会进入 SAVBIN section table,禁止复用。 */
|
|
4
|
+
export declare enum SaveSectionKind {
|
|
5
|
+
SAVE_SECTION_KIND_UNSPECIFIED = 0,
|
|
6
|
+
SAVE_SECTION_KIND_MANIFEST = 1,
|
|
7
|
+
SAVE_SECTION_KIND_CONVERSATION_LEDGER = 2,
|
|
8
|
+
SAVE_SECTION_KIND_LADYBUG_OVERLAY_WAL = 3,
|
|
9
|
+
SAVE_SECTION_KIND_LADYBUG_OVERLAY_CHECKPOINT = 4,
|
|
10
|
+
SAVE_SECTION_KIND_PHYSICAL_INDEX_CHECKPOINT = 5,
|
|
11
|
+
SAVE_SECTION_KIND_TRIGGER_RUNTIME_STATE = 6,
|
|
12
|
+
SAVE_SECTION_KIND_VIEW_STATE_SNAPSHOT = 7,
|
|
13
|
+
SAVE_SECTION_KIND_SCENARIO_RUNTIME_STATE = 8,
|
|
14
|
+
SAVE_SECTION_KIND_ASSET_REFS = 9,
|
|
15
|
+
SAVE_SECTION_KIND_IN_FLIGHT_RECOVERY = 10,
|
|
16
|
+
SAVE_SECTION_KIND_INTEGRITY_CHECKPOINT = 11,
|
|
17
|
+
SAVE_SECTION_KIND_EXTENSION = 12,
|
|
18
|
+
SAVE_SECTION_KIND_WORLDLINE_CATALOG = 13,
|
|
19
|
+
SAVE_SECTION_KIND_WORLDLINE_OP_DAG = 14,
|
|
20
|
+
SAVE_SECTION_KIND_WORLDLINE_BLOB_STORE = 15,
|
|
21
|
+
SAVE_SECTION_KIND_PRESENTATION_PLAN_STORE = 16,
|
|
22
|
+
SAVE_SECTION_KIND_PRESENTATION_CURSOR = 17,
|
|
23
|
+
SAVE_SECTION_KIND_AUDIO_RUNTIME_SNAPSHOT = 18,
|
|
24
|
+
UNRECOGNIZED = -1
|
|
25
|
+
}
|
|
26
|
+
export declare function saveSectionKindFromJSON(object: any): SaveSectionKind;
|
|
27
|
+
export declare function saveSectionKindToJSON(object: SaveSectionKind): string;
|
|
28
|
+
export declare enum WorldlineOpKind {
|
|
29
|
+
WORLDLINE_OP_KIND_UNSPECIFIED = 0,
|
|
30
|
+
WORLDLINE_OP_KIND_MESSAGE = 1,
|
|
31
|
+
WORLDLINE_OP_KIND_DB_MUTATION = 2,
|
|
32
|
+
WORLDLINE_OP_KIND_VIEW_STATE = 3,
|
|
33
|
+
WORLDLINE_OP_KIND_TRIGGER_STATE = 4,
|
|
34
|
+
WORLDLINE_OP_KIND_SCENARIO_STATE = 5,
|
|
35
|
+
WORLDLINE_OP_KIND_EDIT = 6,
|
|
36
|
+
WORLDLINE_OP_KIND_REWIND = 7,
|
|
37
|
+
WORLDLINE_OP_KIND_REGENERATE = 8,
|
|
38
|
+
WORLDLINE_OP_KIND_CHECKPOINT = 9,
|
|
39
|
+
UNRECOGNIZED = -1
|
|
40
|
+
}
|
|
41
|
+
export declare function worldlineOpKindFromJSON(object: any): WorldlineOpKind;
|
|
42
|
+
export declare function worldlineOpKindToJSON(object: WorldlineOpKind): string;
|
|
43
|
+
export declare enum WorldlineBlobKind {
|
|
44
|
+
WORLDLINE_BLOB_KIND_UNSPECIFIED = 0,
|
|
45
|
+
WORLDLINE_BLOB_KIND_MESSAGE_CONTENT = 1,
|
|
46
|
+
WORLDLINE_BLOB_KIND_DB_OP_BATCH = 2,
|
|
47
|
+
WORLDLINE_BLOB_KIND_VIEW_STATE = 3,
|
|
48
|
+
WORLDLINE_BLOB_KIND_CUSTOM_STATE = 4,
|
|
49
|
+
WORLDLINE_BLOB_KIND_TRIGGER_STATE = 5,
|
|
50
|
+
WORLDLINE_BLOB_KIND_SCENARIO_STATE = 6,
|
|
51
|
+
WORLDLINE_BLOB_KIND_ASSET_REFS = 7,
|
|
52
|
+
WORLDLINE_BLOB_KIND_CHECKPOINT = 8,
|
|
53
|
+
UNRECOGNIZED = -1
|
|
54
|
+
}
|
|
55
|
+
export declare function worldlineBlobKindFromJSON(object: any): WorldlineBlobKind;
|
|
56
|
+
export declare function worldlineBlobKindToJSON(object: WorldlineBlobKind): string;
|
|
57
|
+
export declare enum AttributeOwnerKind {
|
|
58
|
+
ATTRIBUTE_OWNER_KIND_UNSPECIFIED = 0,
|
|
59
|
+
ATTRIBUTE_OWNER_KIND_ENTITY = 1,
|
|
60
|
+
ATTRIBUTE_OWNER_KIND_RELATION = 2,
|
|
61
|
+
UNRECOGNIZED = -1
|
|
62
|
+
}
|
|
63
|
+
export declare function attributeOwnerKindFromJSON(object: any): AttributeOwnerKind;
|
|
64
|
+
export declare function attributeOwnerKindToJSON(object: AttributeOwnerKind): string;
|
|
65
|
+
export declare enum ConversationRole {
|
|
66
|
+
CONVERSATION_ROLE_UNSPECIFIED = 0,
|
|
67
|
+
CONVERSATION_ROLE_SYSTEM = 1,
|
|
68
|
+
CONVERSATION_ROLE_USER = 2,
|
|
69
|
+
CONVERSATION_ROLE_ASSISTANT = 3,
|
|
70
|
+
CONVERSATION_ROLE_TOOL = 4,
|
|
71
|
+
UNRECOGNIZED = -1
|
|
72
|
+
}
|
|
73
|
+
export declare function conversationRoleFromJSON(object: any): ConversationRole;
|
|
74
|
+
export declare function conversationRoleToJSON(object: ConversationRole): string;
|
|
75
|
+
export declare enum ConversationRecordKind {
|
|
76
|
+
CONVERSATION_RECORD_KIND_UNSPECIFIED = 0,
|
|
77
|
+
CONVERSATION_RECORD_KIND_MESSAGE = 1,
|
|
78
|
+
CONVERSATION_RECORD_KIND_TOOL_CALL = 2,
|
|
79
|
+
CONVERSATION_RECORD_KIND_TOOL_RESULT = 3,
|
|
80
|
+
CONVERSATION_RECORD_KIND_EDIT = 4,
|
|
81
|
+
CONVERSATION_RECORD_KIND_SUPERSEDE = 5,
|
|
82
|
+
CONVERSATION_RECORD_KIND_TOMBSTONE = 6,
|
|
83
|
+
CONVERSATION_RECORD_KIND_REWIND = 7,
|
|
84
|
+
CONVERSATION_RECORD_KIND_FORK = 8,
|
|
85
|
+
CONVERSATION_RECORD_KIND_REGENERATE = 9,
|
|
86
|
+
UNRECOGNIZED = -1
|
|
87
|
+
}
|
|
88
|
+
export declare function conversationRecordKindFromJSON(object: any): ConversationRecordKind;
|
|
89
|
+
export declare function conversationRecordKindToJSON(object: ConversationRecordKind): string;
|
|
90
|
+
export declare enum ConversationRecordStatus {
|
|
91
|
+
CONVERSATION_RECORD_STATUS_UNSPECIFIED = 0,
|
|
92
|
+
CONVERSATION_RECORD_STATUS_STAGED = 1,
|
|
93
|
+
CONVERSATION_RECORD_STATUS_COMMITTED = 2,
|
|
94
|
+
CONVERSATION_RECORD_STATUS_SUPERSEDED = 3,
|
|
95
|
+
CONVERSATION_RECORD_STATUS_TOMBSTONED = 4,
|
|
96
|
+
UNRECOGNIZED = -1
|
|
97
|
+
}
|
|
98
|
+
export declare function conversationRecordStatusFromJSON(object: any): ConversationRecordStatus;
|
|
99
|
+
export declare function conversationRecordStatusToJSON(object: ConversationRecordStatus): string;
|
|
100
|
+
/**
|
|
101
|
+
* 记录的可审计来源。旧数据无法证明完整来源时必须使用
|
|
102
|
+
* LEGACY_UNVERIFIABLE,禁止伪装成实时 client ledger 记录。
|
|
103
|
+
*/
|
|
104
|
+
export declare enum ConversationProvenanceKind {
|
|
105
|
+
CONVERSATION_PROVENANCE_KIND_UNSPECIFIED = 0,
|
|
106
|
+
CONVERSATION_PROVENANCE_KIND_CLIENT_LEDGER = 1,
|
|
107
|
+
CONVERSATION_PROVENANCE_KIND_LEGACY_IMPORT = 2,
|
|
108
|
+
CONVERSATION_PROVENANCE_KIND_EDGE_ARCHIVE_BACKFILL = 3,
|
|
109
|
+
CONVERSATION_PROVENANCE_KIND_LEGACY_UNVERIFIABLE = 4,
|
|
110
|
+
UNRECOGNIZED = -1
|
|
111
|
+
}
|
|
112
|
+
export declare function conversationProvenanceKindFromJSON(object: any): ConversationProvenanceKind;
|
|
113
|
+
export declare function conversationProvenanceKindToJSON(object: ConversationProvenanceKind): string;
|
|
114
|
+
export declare enum RuntimeVariableScope {
|
|
115
|
+
RUNTIME_VARIABLE_SCOPE_UNSPECIFIED = 0,
|
|
116
|
+
RUNTIME_VARIABLE_SCOPE_PUBLIC = 1,
|
|
117
|
+
RUNTIME_VARIABLE_SCOPE_PROTECTED = 2,
|
|
118
|
+
UNRECOGNIZED = -1
|
|
119
|
+
}
|
|
120
|
+
export declare function runtimeVariableScopeFromJSON(object: any): RuntimeVariableScope;
|
|
121
|
+
export declare function runtimeVariableScopeToJSON(object: RuntimeVariableScope): string;
|
|
122
|
+
export declare enum RuntimeActionStatus {
|
|
123
|
+
RUNTIME_ACTION_STATUS_UNSPECIFIED = 0,
|
|
124
|
+
RUNTIME_ACTION_STATUS_QUEUED = 1,
|
|
125
|
+
RUNTIME_ACTION_STATUS_EXECUTING = 2,
|
|
126
|
+
RUNTIME_ACTION_STATUS_COMMITTED = 3,
|
|
127
|
+
RUNTIME_ACTION_STATUS_ROLLED_BACK = 4,
|
|
128
|
+
UNRECOGNIZED = -1
|
|
129
|
+
}
|
|
130
|
+
export declare function runtimeActionStatusFromJSON(object: any): RuntimeActionStatus;
|
|
131
|
+
export declare function runtimeActionStatusToJSON(object: RuntimeActionStatus): string;
|
|
132
|
+
export declare enum PlayerAssetKind {
|
|
133
|
+
PLAYER_ASSET_KIND_UNSPECIFIED = 0,
|
|
134
|
+
PLAYER_ASSET_KIND_IMAGE = 1,
|
|
135
|
+
PLAYER_ASSET_KIND_VOICE = 2,
|
|
136
|
+
PLAYER_ASSET_KIND_PUPPET = 3,
|
|
137
|
+
PLAYER_ASSET_KIND_CUSTOM = 4,
|
|
138
|
+
UNRECOGNIZED = -1
|
|
139
|
+
}
|
|
140
|
+
export declare function playerAssetKindFromJSON(object: any): PlayerAssetKind;
|
|
141
|
+
export declare function playerAssetKindToJSON(object: PlayerAssetKind): string;
|
|
142
|
+
export declare enum AssetLifecycleEventKind {
|
|
143
|
+
ASSET_LIFECYCLE_EVENT_KIND_UNSPECIFIED = 0,
|
|
144
|
+
ASSET_LIFECYCLE_EVENT_KIND_ADDED = 1,
|
|
145
|
+
ASSET_LIFECYCLE_EVENT_KIND_REMOVED = 2,
|
|
146
|
+
UNRECOGNIZED = -1
|
|
147
|
+
}
|
|
148
|
+
export declare function assetLifecycleEventKindFromJSON(object: any): AssetLifecycleEventKind;
|
|
149
|
+
export declare function assetLifecycleEventKindToJSON(object: AssetLifecycleEventKind): string;
|
|
150
|
+
export declare enum InFlightKind {
|
|
151
|
+
IN_FLIGHT_KIND_UNSPECIFIED = 0,
|
|
152
|
+
IN_FLIGHT_KIND_TURN_EXTRACTION = 1,
|
|
153
|
+
IN_FLIGHT_KIND_DB_TRANSACTION = 2,
|
|
154
|
+
IN_FLIGHT_KIND_TRIGGER_ACTION = 3,
|
|
155
|
+
IN_FLIGHT_KIND_VIEW_CAPTURE = 4,
|
|
156
|
+
IN_FLIGHT_KIND_SAVE_COMMIT = 5,
|
|
157
|
+
UNRECOGNIZED = -1
|
|
158
|
+
}
|
|
159
|
+
export declare function inFlightKindFromJSON(object: any): InFlightKind;
|
|
160
|
+
export declare function inFlightKindToJSON(object: InFlightKind): string;
|
|
161
|
+
export declare enum InFlightStatus {
|
|
162
|
+
IN_FLIGHT_STATUS_UNSPECIFIED = 0,
|
|
163
|
+
IN_FLIGHT_STATUS_STAGED = 1,
|
|
164
|
+
IN_FLIGHT_STATUS_EXECUTING = 2,
|
|
165
|
+
IN_FLIGHT_STATUS_PERSISTENCE_READY = 3,
|
|
166
|
+
IN_FLIGHT_STATUS_PERSISTENCE_BLOCKED = 4,
|
|
167
|
+
IN_FLIGHT_STATUS_COMMITTED = 5,
|
|
168
|
+
IN_FLIGHT_STATUS_ROLLED_BACK = 6,
|
|
169
|
+
UNRECOGNIZED = -1
|
|
170
|
+
}
|
|
171
|
+
export declare function inFlightStatusFromJSON(object: any): InFlightStatus;
|
|
172
|
+
export declare function inFlightStatusToJSON(object: InFlightStatus): string;
|
|
173
|
+
/** 某 section 在一个 immutable generation 内的已提交 head。 */
|
|
174
|
+
export interface SectionHead {
|
|
175
|
+
kind: SaveSectionKind;
|
|
176
|
+
section_id: string;
|
|
177
|
+
revision: string;
|
|
178
|
+
logical_head: string;
|
|
179
|
+
plaintext_sha256: Uint8Array;
|
|
180
|
+
plaintext_size: string;
|
|
181
|
+
ciphertext_sha256: Uint8Array;
|
|
182
|
+
ciphertext_size: string;
|
|
183
|
+
codec: string;
|
|
184
|
+
required: boolean;
|
|
185
|
+
_unknownFields?: {
|
|
186
|
+
[key: number]: Uint8Array[];
|
|
187
|
+
} | undefined;
|
|
188
|
+
}
|
|
189
|
+
/** 一个玩家存档 generation 的根绑定。不得携带 origin object key、密钥或作者明文。 */
|
|
190
|
+
export interface SaveManifest {
|
|
191
|
+
format_version: number;
|
|
192
|
+
save_id: string;
|
|
193
|
+
scenario_id: string;
|
|
194
|
+
active_release_id: string;
|
|
195
|
+
database_origin_sha256: Uint8Array;
|
|
196
|
+
view_pc_sha256: Uint8Array;
|
|
197
|
+
view_mobile_sha256: Uint8Array;
|
|
198
|
+
active_platform: string;
|
|
199
|
+
runtime_major: number;
|
|
200
|
+
last_resolved_runtime_patch: number;
|
|
201
|
+
sdk_schema_version: number;
|
|
202
|
+
generation: string;
|
|
203
|
+
branch_id: string;
|
|
204
|
+
parent_save_id: string;
|
|
205
|
+
forked_at_message_id: string;
|
|
206
|
+
last_committed_turn_bundle_id: string;
|
|
207
|
+
section_heads: SectionHead[];
|
|
208
|
+
created_at_ms: string;
|
|
209
|
+
updated_at_ms: string;
|
|
210
|
+
previous_generation_digest: Uint8Array;
|
|
211
|
+
canonical_generation_digest: Uint8Array;
|
|
212
|
+
/** SAV v3 单存档世界线。旧 format_version=2 读取时由 client 合成 root line。 */
|
|
213
|
+
active_worldline_id: string;
|
|
214
|
+
root_worldline_id: string;
|
|
215
|
+
worldline_catalog_sha256: Uint8Array;
|
|
216
|
+
_unknownFields?: {
|
|
217
|
+
[key: number]: Uint8Array[];
|
|
218
|
+
} | undefined;
|
|
219
|
+
}
|
|
220
|
+
/** 一条世界线只保存 head,不复制从 root 到 head 的操作或 payload。 */
|
|
221
|
+
export interface WorldlineDescriptor {
|
|
222
|
+
worldline_id: string;
|
|
223
|
+
title: string;
|
|
224
|
+
parent_worldline_id: string;
|
|
225
|
+
fork_anchor_op_id: string;
|
|
226
|
+
head_op_id: string;
|
|
227
|
+
created_at_ms: string;
|
|
228
|
+
updated_at_ms: string;
|
|
229
|
+
revision: string;
|
|
230
|
+
_unknownFields?: {
|
|
231
|
+
[key: number]: Uint8Array[];
|
|
232
|
+
} | undefined;
|
|
233
|
+
}
|
|
234
|
+
export interface WorldlineCatalog {
|
|
235
|
+
schema_version: number;
|
|
236
|
+
save_id: string;
|
|
237
|
+
scenario_id: string;
|
|
238
|
+
active_worldline_id: string;
|
|
239
|
+
root_worldline_id: string;
|
|
240
|
+
worldlines: WorldlineDescriptor[];
|
|
241
|
+
revision: string;
|
|
242
|
+
previous_catalog_sha256: Uint8Array;
|
|
243
|
+
catalog_sha256: Uint8Array;
|
|
244
|
+
_unknownFields?: {
|
|
245
|
+
[key: number]: Uint8Array[];
|
|
246
|
+
} | undefined;
|
|
247
|
+
}
|
|
248
|
+
/** section state 通过 content-addressed blob 引用,不在每条世界线做深拷贝。 */
|
|
249
|
+
export interface WorldlineStateRef {
|
|
250
|
+
section_kind: SaveSectionKind;
|
|
251
|
+
blob_sha256: Uint8Array;
|
|
252
|
+
revision: string;
|
|
253
|
+
logical_head: string;
|
|
254
|
+
_unknownFields?: {
|
|
255
|
+
[key: number]: Uint8Array[];
|
|
256
|
+
} | undefined;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* op_id 必须由 canonical 编码摘要派生。parent_op_ids 允许未来无损表达 merge,
|
|
260
|
+
* 普通提交与 fork head 均只有一个 parent。
|
|
261
|
+
*/
|
|
262
|
+
export interface WorldlineOp {
|
|
263
|
+
op_id: string;
|
|
264
|
+
parent_op_ids: string[];
|
|
265
|
+
kind: WorldlineOpKind;
|
|
266
|
+
message_id: string;
|
|
267
|
+
turn_bundle_id: string;
|
|
268
|
+
content_blob_sha256: Uint8Array;
|
|
269
|
+
db_ops_blob_sha256: Uint8Array;
|
|
270
|
+
state_refs: WorldlineStateRef[];
|
|
271
|
+
idempotency_key: string;
|
|
272
|
+
created_at_ms: string;
|
|
273
|
+
op_sha256: Uint8Array;
|
|
274
|
+
_unknownFields?: {
|
|
275
|
+
[key: number]: Uint8Array[];
|
|
276
|
+
} | undefined;
|
|
277
|
+
}
|
|
278
|
+
export interface WorldlineOpDag {
|
|
279
|
+
schema_version: number;
|
|
280
|
+
ops: WorldlineOp[];
|
|
281
|
+
dag_sha256: Uint8Array;
|
|
282
|
+
_unknownFields?: {
|
|
283
|
+
[key: number]: Uint8Array[];
|
|
284
|
+
} | undefined;
|
|
285
|
+
}
|
|
286
|
+
export interface WorldlineBlob {
|
|
287
|
+
sha256: Uint8Array;
|
|
288
|
+
kind: WorldlineBlobKind;
|
|
289
|
+
codec: string;
|
|
290
|
+
payload: Uint8Array;
|
|
291
|
+
plaintext_size: string;
|
|
292
|
+
_unknownFields?: {
|
|
293
|
+
[key: number]: Uint8Array[];
|
|
294
|
+
} | undefined;
|
|
295
|
+
}
|
|
296
|
+
export interface WorldlineBlobStore {
|
|
297
|
+
schema_version: number;
|
|
298
|
+
blobs: WorldlineBlob[];
|
|
299
|
+
store_sha256: Uint8Array;
|
|
300
|
+
_unknownFields?: {
|
|
301
|
+
[key: number]: Uint8Array[];
|
|
302
|
+
} | undefined;
|
|
303
|
+
}
|
|
304
|
+
/** 写入前置条件。upsert/delete 必须显式声明预期旧 revision/hash,防止静默覆盖。 */
|
|
305
|
+
export interface ExpectedPriorState {
|
|
306
|
+
revision: string;
|
|
307
|
+
state_sha256: Uint8Array;
|
|
308
|
+
must_exist: boolean;
|
|
309
|
+
incarnation: string;
|
|
310
|
+
_unknownFields?: {
|
|
311
|
+
[key: number]: Uint8Array[];
|
|
312
|
+
} | undefined;
|
|
313
|
+
}
|
|
314
|
+
/** 写入后的 canonical revision 与内容摘要。 */
|
|
315
|
+
export interface PostImageRevision {
|
|
316
|
+
revision: string;
|
|
317
|
+
incarnation: string;
|
|
318
|
+
state_sha256: Uint8Array;
|
|
319
|
+
_unknownFields?: {
|
|
320
|
+
[key: number]: Uint8Array[];
|
|
321
|
+
} | undefined;
|
|
322
|
+
}
|
|
323
|
+
/** 写操作溯源。node/edge/attr/trigger 可同时出现,表示一次跨对象原子抽取。 */
|
|
324
|
+
export interface WriteProvenance {
|
|
325
|
+
source_message_id: string;
|
|
326
|
+
assistant_message_id: string;
|
|
327
|
+
extraction_message_id: string;
|
|
328
|
+
turn_bundle_id: string;
|
|
329
|
+
node_id: string;
|
|
330
|
+
edge_id: string;
|
|
331
|
+
attr_path: string;
|
|
332
|
+
trigger_id: string;
|
|
333
|
+
model: string;
|
|
334
|
+
provider: string;
|
|
335
|
+
attempt_id: string;
|
|
336
|
+
input_sha256: Uint8Array;
|
|
337
|
+
output_sha256: Uint8Array;
|
|
338
|
+
_unknownFields?: {
|
|
339
|
+
[key: number]: Uint8Array[];
|
|
340
|
+
} | undefined;
|
|
341
|
+
}
|
|
342
|
+
/** 增量存档单条数据库操作。字段 1-5 与 10-12 为已发布编号,禁止变更语义。 */
|
|
343
|
+
export interface DbOpEntry {
|
|
344
|
+
entity_upsert?: EntityUpsertOp | undefined;
|
|
345
|
+
entity_remove?: EntityRemoveOp | undefined;
|
|
346
|
+
relation_upsert?: RelationUpsertOp | undefined;
|
|
347
|
+
relation_remove?: RelationRemoveOp | undefined;
|
|
348
|
+
vector_upsert?: VectorUpsertOp | undefined;
|
|
349
|
+
write_seq: string;
|
|
350
|
+
message_id: string;
|
|
351
|
+
turn_id: string;
|
|
352
|
+
_unknownFields?: {
|
|
353
|
+
[key: number]: Uint8Array[];
|
|
354
|
+
} | undefined;
|
|
355
|
+
}
|
|
356
|
+
export interface EntityUpsertOp {
|
|
357
|
+
entity_id: string;
|
|
358
|
+
entity_kind: string;
|
|
359
|
+
_unknownFields?: {
|
|
360
|
+
[key: number]: Uint8Array[];
|
|
361
|
+
} | undefined;
|
|
362
|
+
}
|
|
363
|
+
export interface EntityRemoveOp {
|
|
364
|
+
entity_id: string;
|
|
365
|
+
_unknownFields?: {
|
|
366
|
+
[key: number]: Uint8Array[];
|
|
367
|
+
} | undefined;
|
|
368
|
+
}
|
|
369
|
+
export interface RelationUpsertOp {
|
|
370
|
+
src: string;
|
|
371
|
+
dst: string;
|
|
372
|
+
relation_kind: string;
|
|
373
|
+
_unknownFields?: {
|
|
374
|
+
[key: number]: Uint8Array[];
|
|
375
|
+
} | undefined;
|
|
376
|
+
}
|
|
377
|
+
export interface RelationRemoveOp {
|
|
378
|
+
src: string;
|
|
379
|
+
dst: string;
|
|
380
|
+
_unknownFields?: {
|
|
381
|
+
[key: number]: Uint8Array[];
|
|
382
|
+
} | undefined;
|
|
383
|
+
}
|
|
384
|
+
export interface VectorUpsertOp {
|
|
385
|
+
entity_id: string;
|
|
386
|
+
vector: number[];
|
|
387
|
+
_unknownFields?: {
|
|
388
|
+
[key: number]: Uint8Array[];
|
|
389
|
+
} | undefined;
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* 兼容层保留上方已发布的 DbOp* 消息;正式保存协议使用 canonical 消息,
|
|
393
|
+
* 避免给 prost 生成的旧结构体增加必填初始化字段。
|
|
394
|
+
*/
|
|
395
|
+
export interface CanonicalDbOpEntry {
|
|
396
|
+
entity_upsert?: CanonicalEntityUpsertOp | undefined;
|
|
397
|
+
entity_remove?: EntityTombstoneOp | undefined;
|
|
398
|
+
relation_upsert?: CanonicalRelationUpsertOp | undefined;
|
|
399
|
+
relation_remove?: RelationTombstoneOp | undefined;
|
|
400
|
+
vector_upsert?: CanonicalVectorUpsertOp | undefined;
|
|
401
|
+
vector_remove?: VectorTombstoneOp | undefined;
|
|
402
|
+
attribute_upsert?: AttributeUpsertOp | undefined;
|
|
403
|
+
attribute_remove?: AttributeRemoveOp | undefined;
|
|
404
|
+
attribute_history_append?: AttributeHistoryAppendOp | undefined;
|
|
405
|
+
write_seq: string;
|
|
406
|
+
message_id: string;
|
|
407
|
+
turn_id: string;
|
|
408
|
+
idempotency_key: string;
|
|
409
|
+
provenance?: WriteProvenance | undefined;
|
|
410
|
+
schema_version: number;
|
|
411
|
+
occurred_at_ms: string;
|
|
412
|
+
_unknownFields?: {
|
|
413
|
+
[key: number]: Uint8Array[];
|
|
414
|
+
} | undefined;
|
|
415
|
+
}
|
|
416
|
+
/** 完整 entity post-image;canonical_props 不是 patch。 */
|
|
417
|
+
export interface CanonicalEntityUpsertOp {
|
|
418
|
+
entity_id: string;
|
|
419
|
+
entity_kind: string;
|
|
420
|
+
canonical_props: Uint8Array;
|
|
421
|
+
props_codec: string;
|
|
422
|
+
expected_prior?: ExpectedPriorState | undefined;
|
|
423
|
+
post_image?: PostImageRevision | undefined;
|
|
424
|
+
_unknownFields?: {
|
|
425
|
+
[key: number]: Uint8Array[];
|
|
426
|
+
} | undefined;
|
|
427
|
+
}
|
|
428
|
+
export interface EntityTombstoneOp {
|
|
429
|
+
entity_id: string;
|
|
430
|
+
expected_prior?: ExpectedPriorState | undefined;
|
|
431
|
+
tombstone_revision: string;
|
|
432
|
+
deleted_incarnation: string;
|
|
433
|
+
tombstone_sha256: Uint8Array;
|
|
434
|
+
_unknownFields?: {
|
|
435
|
+
[key: number]: Uint8Array[];
|
|
436
|
+
} | undefined;
|
|
437
|
+
}
|
|
438
|
+
/** relation_id 是跨 checkpoint/replay 稳定的关系身份;src/dst/kind 不能替代它。 */
|
|
439
|
+
export interface CanonicalRelationUpsertOp {
|
|
440
|
+
src: string;
|
|
441
|
+
dst: string;
|
|
442
|
+
relation_kind: string;
|
|
443
|
+
relation_id: string;
|
|
444
|
+
canonical_props: Uint8Array;
|
|
445
|
+
props_codec: string;
|
|
446
|
+
expected_prior?: ExpectedPriorState | undefined;
|
|
447
|
+
post_image?: PostImageRevision | undefined;
|
|
448
|
+
_unknownFields?: {
|
|
449
|
+
[key: number]: Uint8Array[];
|
|
450
|
+
} | undefined;
|
|
451
|
+
}
|
|
452
|
+
export interface RelationTombstoneOp {
|
|
453
|
+
src: string;
|
|
454
|
+
dst: string;
|
|
455
|
+
relation_id: string;
|
|
456
|
+
expected_prior?: ExpectedPriorState | undefined;
|
|
457
|
+
tombstone_revision: string;
|
|
458
|
+
deleted_incarnation: string;
|
|
459
|
+
tombstone_sha256: Uint8Array;
|
|
460
|
+
_unknownFields?: {
|
|
461
|
+
[key: number]: Uint8Array[];
|
|
462
|
+
} | undefined;
|
|
463
|
+
}
|
|
464
|
+
export interface CanonicalVectorUpsertOp {
|
|
465
|
+
entity_id: string;
|
|
466
|
+
vector: number[];
|
|
467
|
+
vector_space: string;
|
|
468
|
+
embedding_model: string;
|
|
469
|
+
dimension: number;
|
|
470
|
+
expected_prior?: ExpectedPriorState | undefined;
|
|
471
|
+
post_image?: PostImageRevision | undefined;
|
|
472
|
+
_unknownFields?: {
|
|
473
|
+
[key: number]: Uint8Array[];
|
|
474
|
+
} | undefined;
|
|
475
|
+
}
|
|
476
|
+
export interface VectorTombstoneOp {
|
|
477
|
+
entity_id: string;
|
|
478
|
+
vector_space: string;
|
|
479
|
+
expected_prior?: ExpectedPriorState | undefined;
|
|
480
|
+
tombstone_revision: string;
|
|
481
|
+
tombstone_sha256: Uint8Array;
|
|
482
|
+
_unknownFields?: {
|
|
483
|
+
[key: number]: Uint8Array[];
|
|
484
|
+
} | undefined;
|
|
485
|
+
}
|
|
486
|
+
export interface AttributeAddress {
|
|
487
|
+
owner_kind: AttributeOwnerKind;
|
|
488
|
+
owner_id: string;
|
|
489
|
+
attr_key: string;
|
|
490
|
+
_unknownFields?: {
|
|
491
|
+
[key: number]: Uint8Array[];
|
|
492
|
+
} | undefined;
|
|
493
|
+
}
|
|
494
|
+
/** 完整 attribute post-image;canonical_value 不允许仅携带局部 patch。 */
|
|
495
|
+
export interface AttributeUpsertOp {
|
|
496
|
+
address?: AttributeAddress | undefined;
|
|
497
|
+
canonical_value: Uint8Array;
|
|
498
|
+
value_codec: string;
|
|
499
|
+
expected_prior?: ExpectedPriorState | undefined;
|
|
500
|
+
post_image?: PostImageRevision | undefined;
|
|
501
|
+
_unknownFields?: {
|
|
502
|
+
[key: number]: Uint8Array[];
|
|
503
|
+
} | undefined;
|
|
504
|
+
}
|
|
505
|
+
export interface AttributeRemoveOp {
|
|
506
|
+
address?: AttributeAddress | undefined;
|
|
507
|
+
expected_prior?: ExpectedPriorState | undefined;
|
|
508
|
+
tombstone_revision: string;
|
|
509
|
+
tombstone_sha256: Uint8Array;
|
|
510
|
+
_unknownFields?: {
|
|
511
|
+
[key: number]: Uint8Array[];
|
|
512
|
+
} | undefined;
|
|
513
|
+
}
|
|
514
|
+
/** history_entry_id 为 append-only stable id,重复 replay 必须幂等。 */
|
|
515
|
+
export interface AttributeHistoryAppendOp {
|
|
516
|
+
history_entry_id: string;
|
|
517
|
+
address?: AttributeAddress | undefined;
|
|
518
|
+
canonical_value: Uint8Array;
|
|
519
|
+
value_codec: string;
|
|
520
|
+
history_revision: string;
|
|
521
|
+
previous_history_entry_sha256: Uint8Array;
|
|
522
|
+
history_entry_sha256: Uint8Array;
|
|
523
|
+
_unknownFields?: {
|
|
524
|
+
[key: number]: Uint8Array[];
|
|
525
|
+
} | undefined;
|
|
526
|
+
}
|
|
527
|
+
/** snapshot_delta_since 与 WAL section 共用的有序操作批次。 */
|
|
528
|
+
export interface DbOpBatch {
|
|
529
|
+
ops: DbOpEntry[];
|
|
530
|
+
_unknownFields?: {
|
|
531
|
+
[key: number]: Uint8Array[];
|
|
532
|
+
} | undefined;
|
|
533
|
+
}
|
|
534
|
+
/** snapshot_delta_since 与 WAL section 共用的有序 canonical 操作批次。 */
|
|
535
|
+
export interface CanonicalDbOpBatch {
|
|
536
|
+
ops: CanonicalDbOpEntry[];
|
|
537
|
+
first_write_seq: string;
|
|
538
|
+
last_write_seq: string;
|
|
539
|
+
previous_batch_sha256: Uint8Array;
|
|
540
|
+
batch_sha256: Uint8Array;
|
|
541
|
+
_unknownFields?: {
|
|
542
|
+
[key: number]: Uint8Array[];
|
|
543
|
+
} | undefined;
|
|
544
|
+
}
|
|
545
|
+
export interface ConversationRecordProvenance {
|
|
546
|
+
kind: ConversationProvenanceKind;
|
|
547
|
+
source_record_id: string;
|
|
548
|
+
source_message_id: string;
|
|
549
|
+
import_batch_id: string;
|
|
550
|
+
source_sha256: Uint8Array;
|
|
551
|
+
verifiable: boolean;
|
|
552
|
+
_unknownFields?: {
|
|
553
|
+
[key: number]: Uint8Array[];
|
|
554
|
+
} | undefined;
|
|
555
|
+
}
|
|
556
|
+
export interface ConversationRecord {
|
|
557
|
+
ledger_seq: string;
|
|
558
|
+
message_id: string;
|
|
559
|
+
turn_bundle_id: string;
|
|
560
|
+
turn_seq: string;
|
|
561
|
+
branch_id: string;
|
|
562
|
+
parent_message_id: string;
|
|
563
|
+
role: ConversationRole;
|
|
564
|
+
kind: ConversationRecordKind;
|
|
565
|
+
content: Uint8Array;
|
|
566
|
+
content_codec: string;
|
|
567
|
+
created_at_ms: string;
|
|
568
|
+
status: ConversationRecordStatus;
|
|
569
|
+
tool_call_id: string;
|
|
570
|
+
tool_name: string;
|
|
571
|
+
tool_arguments: Uint8Array;
|
|
572
|
+
tool_result: Uint8Array;
|
|
573
|
+
assistant_message_id: string;
|
|
574
|
+
extraction_message_id: string;
|
|
575
|
+
model: string;
|
|
576
|
+
provider: string;
|
|
577
|
+
target_message_id: string;
|
|
578
|
+
target_ledger_seq: string;
|
|
579
|
+
content_sha256: Uint8Array;
|
|
580
|
+
previous_record_sha256: Uint8Array;
|
|
581
|
+
record_sha256: Uint8Array;
|
|
582
|
+
idempotency_key: string;
|
|
583
|
+
/**
|
|
584
|
+
* v2 append-only fields。record_id 是跨 projection 的 canonical identity;
|
|
585
|
+
* turn_id 与 turn_bundle_id 分离,兼容旧记录只有 bundle identity 的情况。
|
|
586
|
+
*/
|
|
587
|
+
record_id: string;
|
|
588
|
+
turn_id: string;
|
|
589
|
+
canonical_meta: Uint8Array;
|
|
590
|
+
canonical_meta_codec: string;
|
|
591
|
+
message_status: string;
|
|
592
|
+
role_raw: string;
|
|
593
|
+
provenance?: ConversationRecordProvenance | undefined;
|
|
594
|
+
tool_arguments_codec: string;
|
|
595
|
+
tool_result_codec: string;
|
|
596
|
+
_unknownFields?: {
|
|
597
|
+
[key: number]: Uint8Array[];
|
|
598
|
+
} | undefined;
|
|
599
|
+
}
|
|
600
|
+
export interface ConversationLedger {
|
|
601
|
+
schema_version: number;
|
|
602
|
+
branch_id: string;
|
|
603
|
+
records: ConversationRecord[];
|
|
604
|
+
first_ledger_seq: string;
|
|
605
|
+
last_ledger_seq: string;
|
|
606
|
+
previous_ledger_sha256: Uint8Array;
|
|
607
|
+
ledger_sha256: Uint8Array;
|
|
608
|
+
/** v2 identity/backfill fields;schema_version=1 的历史 payload 仍可读取。 */
|
|
609
|
+
save_id: string;
|
|
610
|
+
scenario_id: string;
|
|
611
|
+
backfill_required: boolean;
|
|
612
|
+
updated_at_ms: string;
|
|
613
|
+
_unknownFields?: {
|
|
614
|
+
[key: number]: Uint8Array[];
|
|
615
|
+
} | undefined;
|
|
616
|
+
}
|
|
617
|
+
export interface LadybugOverlayWal {
|
|
618
|
+
schema_version: number;
|
|
619
|
+
active_release_id: string;
|
|
620
|
+
database_origin_sha256: Uint8Array;
|
|
621
|
+
batches: CanonicalDbOpBatch[];
|
|
622
|
+
first_write_seq: string;
|
|
623
|
+
last_write_seq: string;
|
|
624
|
+
wal_sha256: Uint8Array;
|
|
625
|
+
_unknownFields?: {
|
|
626
|
+
[key: number]: Uint8Array[];
|
|
627
|
+
} | undefined;
|
|
628
|
+
}
|
|
629
|
+
/** 当前 overlay shadow/tombstone 的逻辑 checkpoint,可由 origin + WAL 重建。 */
|
|
630
|
+
export interface LadybugOverlayCheckpoint {
|
|
631
|
+
schema_version: number;
|
|
632
|
+
active_release_id: string;
|
|
633
|
+
database_origin_sha256: Uint8Array;
|
|
634
|
+
checkpoint_head_write_seq: string;
|
|
635
|
+
entity_shadows: CanonicalEntityUpsertOp[];
|
|
636
|
+
entity_tombstones: EntityTombstoneOp[];
|
|
637
|
+
relation_shadows: CanonicalRelationUpsertOp[];
|
|
638
|
+
relation_tombstones: RelationTombstoneOp[];
|
|
639
|
+
attribute_shadows: AttributeUpsertOp[];
|
|
640
|
+
attribute_tombstones: AttributeRemoveOp[];
|
|
641
|
+
attribute_history: AttributeHistoryAppendOp[];
|
|
642
|
+
vectors: CanonicalVectorUpsertOp[];
|
|
643
|
+
vector_tombstones: VectorTombstoneOp[];
|
|
644
|
+
checkpoint_sha256: Uint8Array;
|
|
645
|
+
_unknownFields?: {
|
|
646
|
+
[key: number]: Uint8Array[];
|
|
647
|
+
} | undefined;
|
|
648
|
+
}
|
|
649
|
+
/** 纯加速缓存;任一版本/hash 不匹配即可丢弃并确定性重建。 */
|
|
650
|
+
export interface PhysicalIndexCheckpoint {
|
|
651
|
+
schema_version: number;
|
|
652
|
+
ladybug_version: string;
|
|
653
|
+
wasm_build: string;
|
|
654
|
+
index_config_sha256: Uint8Array;
|
|
655
|
+
logical_state_sha256: Uint8Array;
|
|
656
|
+
checkpoint_bytes: Uint8Array;
|
|
657
|
+
checkpoint_sha256: Uint8Array;
|
|
658
|
+
checkpoint_head_write_seq: string;
|
|
659
|
+
_unknownFields?: {
|
|
660
|
+
[key: number]: Uint8Array[];
|
|
661
|
+
} | undefined;
|
|
662
|
+
}
|
|
663
|
+
export interface RuntimeVariable {
|
|
664
|
+
name: string;
|
|
665
|
+
canonical_value: Uint8Array;
|
|
666
|
+
value_codec: string;
|
|
667
|
+
revision: string;
|
|
668
|
+
scope: RuntimeVariableScope;
|
|
669
|
+
authorized_user_ids: string[];
|
|
670
|
+
_unknownFields?: {
|
|
671
|
+
[key: number]: Uint8Array[];
|
|
672
|
+
} | undefined;
|
|
673
|
+
}
|
|
674
|
+
export interface RuntimeLatch {
|
|
675
|
+
latch_id: string;
|
|
676
|
+
latch_kind: string;
|
|
677
|
+
closed: boolean;
|
|
678
|
+
fired: boolean;
|
|
679
|
+
ordinal: string;
|
|
680
|
+
canonical_state: Uint8Array;
|
|
681
|
+
state_codec: string;
|
|
682
|
+
_unknownFields?: {
|
|
683
|
+
[key: number]: Uint8Array[];
|
|
684
|
+
} | undefined;
|
|
685
|
+
}
|
|
686
|
+
export interface RuntimeAction {
|
|
687
|
+
action_id: string;
|
|
688
|
+
trigger_id: string;
|
|
689
|
+
action_ordinal: string;
|
|
690
|
+
status: RuntimeActionStatus;
|
|
691
|
+
idempotency_key: string;
|
|
692
|
+
canonical_payload: Uint8Array;
|
|
693
|
+
payload_codec: string;
|
|
694
|
+
_unknownFields?: {
|
|
695
|
+
[key: number]: Uint8Array[];
|
|
696
|
+
} | undefined;
|
|
697
|
+
}
|
|
698
|
+
export interface RuntimeTransaction {
|
|
699
|
+
transaction_id: string;
|
|
700
|
+
entity_id: string;
|
|
701
|
+
state_id: string;
|
|
702
|
+
expires_at_world_time_ms: string;
|
|
703
|
+
status: RuntimeActionStatus;
|
|
704
|
+
idempotency_key: string;
|
|
705
|
+
canonical_state: Uint8Array;
|
|
706
|
+
state_codec: string;
|
|
707
|
+
_unknownFields?: {
|
|
708
|
+
[key: number]: Uint8Array[];
|
|
709
|
+
} | undefined;
|
|
710
|
+
}
|
|
711
|
+
export interface ScheduledRuntimeEvent {
|
|
712
|
+
event_id: string;
|
|
713
|
+
event_kind: string;
|
|
714
|
+
due_world_time_ms: string;
|
|
715
|
+
event_ordinal: string;
|
|
716
|
+
idempotency_key: string;
|
|
717
|
+
canonical_payload: Uint8Array;
|
|
718
|
+
payload_codec: string;
|
|
719
|
+
_unknownFields?: {
|
|
720
|
+
[key: number]: Uint8Array[];
|
|
721
|
+
} | undefined;
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* TriggerProgramRuntime 按脚本下标保存的 value_changed 比较基线。
|
|
725
|
+
* 该值不能只保存数量,否则恢复后的第一次 value_changed 会被误判为首次观察。
|
|
726
|
+
*/
|
|
727
|
+
export interface RuntimeLastValue {
|
|
728
|
+
script_index: number;
|
|
729
|
+
canonical_value: Uint8Array;
|
|
730
|
+
value_codec: string;
|
|
731
|
+
_unknownFields?: {
|
|
732
|
+
[key: number]: Uint8Array[];
|
|
733
|
+
} | undefined;
|
|
734
|
+
}
|
|
735
|
+
export interface TriggerRuntimeState {
|
|
736
|
+
schema_version: number;
|
|
737
|
+
trigger_definition_sha256: Uint8Array;
|
|
738
|
+
state_revision: string;
|
|
739
|
+
world_time_ms: string;
|
|
740
|
+
calendar_id: string;
|
|
741
|
+
rng_algorithm: string;
|
|
742
|
+
rng_version: number;
|
|
743
|
+
rng_state: Uint8Array;
|
|
744
|
+
rng_counter: string;
|
|
745
|
+
variables: RuntimeVariable[];
|
|
746
|
+
entity_states: RuntimeVariable[];
|
|
747
|
+
pending_transactions: RuntimeTransaction[];
|
|
748
|
+
latches: RuntimeLatch[];
|
|
749
|
+
fired_trigger_ids: string[];
|
|
750
|
+
fired_condition_ids: string[];
|
|
751
|
+
pending_events: ScheduledRuntimeEvent[];
|
|
752
|
+
active_global_events: ScheduledRuntimeEvent[];
|
|
753
|
+
last_value_ordinal: string;
|
|
754
|
+
event_ordinal: string;
|
|
755
|
+
action_ordinal: string;
|
|
756
|
+
recall_ordinal: string;
|
|
757
|
+
consumed_recall_ids: string[];
|
|
758
|
+
scheduled_timers: ScheduledRuntimeEvent[];
|
|
759
|
+
queued_actions: RuntimeAction[];
|
|
760
|
+
scheduler_paused: boolean;
|
|
761
|
+
state_sha256: Uint8Array;
|
|
762
|
+
last_values: RuntimeLastValue[];
|
|
763
|
+
receipt_ordinal: string;
|
|
764
|
+
action_journal: RuntimeAction[];
|
|
765
|
+
queued_runtime_events: ScheduledRuntimeEvent[];
|
|
766
|
+
fired_trigger_markers: RuntimeVariable[];
|
|
767
|
+
fired_condition_markers: RuntimeVariable[];
|
|
768
|
+
_unknownFields?: {
|
|
769
|
+
[key: number]: Uint8Array[];
|
|
770
|
+
} | undefined;
|
|
771
|
+
}
|
|
772
|
+
export interface ScenarioRuntimeState {
|
|
773
|
+
schema_version: number;
|
|
774
|
+
state_revision: string;
|
|
775
|
+
scene_id: string;
|
|
776
|
+
chapter_id: string;
|
|
777
|
+
progress: number;
|
|
778
|
+
unlocked_resource_ids: string[];
|
|
779
|
+
customization_state: Uint8Array;
|
|
780
|
+
customization_codec: string;
|
|
781
|
+
media_state: Uint8Array;
|
|
782
|
+
media_state_codec: string;
|
|
783
|
+
custom_state: RuntimeVariable[];
|
|
784
|
+
state_sha256: Uint8Array;
|
|
785
|
+
_unknownFields?: {
|
|
786
|
+
[key: number]: Uint8Array[];
|
|
787
|
+
} | undefined;
|
|
788
|
+
}
|
|
789
|
+
export interface PlayerAssetRef {
|
|
790
|
+
asset_id: string;
|
|
791
|
+
kind: PlayerAssetKind;
|
|
792
|
+
uri: string;
|
|
793
|
+
sha256: Uint8Array;
|
|
794
|
+
size_bytes: string;
|
|
795
|
+
mime_type: string;
|
|
796
|
+
source_message_id: string;
|
|
797
|
+
generation_metadata: Uint8Array;
|
|
798
|
+
metadata_codec: string;
|
|
799
|
+
_unknownFields?: {
|
|
800
|
+
[key: number]: Uint8Array[];
|
|
801
|
+
} | undefined;
|
|
802
|
+
}
|
|
803
|
+
export interface AssetLifecycleEvent {
|
|
804
|
+
event_seq: string;
|
|
805
|
+
kind: AssetLifecycleEventKind;
|
|
806
|
+
asset?: PlayerAssetRef | undefined;
|
|
807
|
+
message_id: string;
|
|
808
|
+
occurred_at_ms: string;
|
|
809
|
+
previous_event_sha256: Uint8Array;
|
|
810
|
+
event_sha256: Uint8Array;
|
|
811
|
+
_unknownFields?: {
|
|
812
|
+
[key: number]: Uint8Array[];
|
|
813
|
+
} | undefined;
|
|
814
|
+
}
|
|
815
|
+
export interface AssetRefs {
|
|
816
|
+
schema_version: number;
|
|
817
|
+
active_assets: PlayerAssetRef[];
|
|
818
|
+
events: AssetLifecycleEvent[];
|
|
819
|
+
last_event_seq: string;
|
|
820
|
+
section_sha256: Uint8Array;
|
|
821
|
+
_unknownFields?: {
|
|
822
|
+
[key: number]: Uint8Array[];
|
|
823
|
+
} | undefined;
|
|
824
|
+
}
|
|
825
|
+
export interface InFlightAttempt {
|
|
826
|
+
attempt_id: string;
|
|
827
|
+
extraction_message_id: string;
|
|
828
|
+
model: string;
|
|
829
|
+
provider: string;
|
|
830
|
+
validator_errors: string[];
|
|
831
|
+
input_sha256: Uint8Array;
|
|
832
|
+
output_sha256: Uint8Array;
|
|
833
|
+
cost_reservation_id: string;
|
|
834
|
+
status: InFlightStatus;
|
|
835
|
+
attempt_number: number;
|
|
836
|
+
_unknownFields?: {
|
|
837
|
+
[key: number]: Uint8Array[];
|
|
838
|
+
} | undefined;
|
|
839
|
+
}
|
|
840
|
+
export interface InFlightItem {
|
|
841
|
+
in_flight_id: string;
|
|
842
|
+
kind: InFlightKind;
|
|
843
|
+
status: InFlightStatus;
|
|
844
|
+
turn_bundle_id: string;
|
|
845
|
+
idempotency_key: string;
|
|
846
|
+
proposed_generation: string;
|
|
847
|
+
attempts: InFlightAttempt[];
|
|
848
|
+
recovery_payload: Uint8Array;
|
|
849
|
+
recovery_codec: string;
|
|
850
|
+
updated_at_ms: string;
|
|
851
|
+
_unknownFields?: {
|
|
852
|
+
[key: number]: Uint8Array[];
|
|
853
|
+
} | undefined;
|
|
854
|
+
}
|
|
855
|
+
export interface InFlightRecovery {
|
|
856
|
+
schema_version: number;
|
|
857
|
+
items: InFlightItem[];
|
|
858
|
+
section_sha256: Uint8Array;
|
|
859
|
+
_unknownFields?: {
|
|
860
|
+
[key: number]: Uint8Array[];
|
|
861
|
+
} | undefined;
|
|
862
|
+
}
|
|
863
|
+
export interface IntegrityCheckpoint {
|
|
864
|
+
schema_version: number;
|
|
865
|
+
generation: string;
|
|
866
|
+
section_heads: SectionHead[];
|
|
867
|
+
manifest_sha256: Uint8Array;
|
|
868
|
+
previous_generation_digest: Uint8Array;
|
|
869
|
+
canonical_generation_digest: Uint8Array;
|
|
870
|
+
last_committed_turn_bundle_id: string;
|
|
871
|
+
overlay_head_write_seq: string;
|
|
872
|
+
ledger_head_seq: string;
|
|
873
|
+
trigger_state_revision: string;
|
|
874
|
+
view_state_revision: string;
|
|
875
|
+
scenario_state_revision: string;
|
|
876
|
+
_unknownFields?: {
|
|
877
|
+
[key: number]: Uint8Array[];
|
|
878
|
+
} | undefined;
|
|
879
|
+
}
|
|
880
|
+
export interface ExtensionSection {
|
|
881
|
+
extension_id: string;
|
|
882
|
+
schema_version: number;
|
|
883
|
+
payload: Uint8Array;
|
|
884
|
+
codec: string;
|
|
885
|
+
payload_sha256: Uint8Array;
|
|
886
|
+
required: boolean;
|
|
887
|
+
_unknownFields?: {
|
|
888
|
+
[key: number]: Uint8Array[];
|
|
889
|
+
} | undefined;
|
|
890
|
+
}
|
|
891
|
+
/** 统一 generation 逻辑容器;物理 SAVBIN 可将各字段编码为独立 AEAD section。 */
|
|
892
|
+
export interface SaveGeneration {
|
|
893
|
+
manifest?: SaveManifest | undefined;
|
|
894
|
+
conversation_ledger?: ConversationLedger | undefined;
|
|
895
|
+
overlay_wal?: LadybugOverlayWal | undefined;
|
|
896
|
+
overlay_checkpoint?: LadybugOverlayCheckpoint | undefined;
|
|
897
|
+
physical_index_checkpoint?: PhysicalIndexCheckpoint | undefined;
|
|
898
|
+
trigger_runtime_state?: TriggerRuntimeState | undefined;
|
|
899
|
+
view_state_snapshot?: ViewStateSnapshot | undefined;
|
|
900
|
+
scenario_runtime_state?: ScenarioRuntimeState | undefined;
|
|
901
|
+
asset_refs?: AssetRefs | undefined;
|
|
902
|
+
in_flight_recovery?: InFlightRecovery | undefined;
|
|
903
|
+
integrity_checkpoint?: IntegrityCheckpoint | undefined;
|
|
904
|
+
extension_sections: ExtensionSection[];
|
|
905
|
+
worldline_catalog?: WorldlineCatalog | undefined;
|
|
906
|
+
worldline_op_dag?: WorldlineOpDag | undefined;
|
|
907
|
+
worldline_blob_store?: WorldlineBlobStore | undefined;
|
|
908
|
+
presentation_plan_store: Uint8Array;
|
|
909
|
+
presentation_cursor: Uint8Array;
|
|
910
|
+
audio_runtime_snapshot: Uint8Array;
|
|
911
|
+
_unknownFields?: {
|
|
912
|
+
[key: number]: Uint8Array[];
|
|
913
|
+
} | undefined;
|
|
914
|
+
}
|
|
915
|
+
export declare const SectionHead: MessageFns<SectionHead>;
|
|
916
|
+
export declare const SaveManifest: MessageFns<SaveManifest>;
|
|
917
|
+
export declare const WorldlineDescriptor: MessageFns<WorldlineDescriptor>;
|
|
918
|
+
export declare const WorldlineCatalog: MessageFns<WorldlineCatalog>;
|
|
919
|
+
export declare const WorldlineStateRef: MessageFns<WorldlineStateRef>;
|
|
920
|
+
export declare const WorldlineOp: MessageFns<WorldlineOp>;
|
|
921
|
+
export declare const WorldlineOpDag: MessageFns<WorldlineOpDag>;
|
|
922
|
+
export declare const WorldlineBlob: MessageFns<WorldlineBlob>;
|
|
923
|
+
export declare const WorldlineBlobStore: MessageFns<WorldlineBlobStore>;
|
|
924
|
+
export declare const ExpectedPriorState: MessageFns<ExpectedPriorState>;
|
|
925
|
+
export declare const PostImageRevision: MessageFns<PostImageRevision>;
|
|
926
|
+
export declare const WriteProvenance: MessageFns<WriteProvenance>;
|
|
927
|
+
export declare const DbOpEntry: MessageFns<DbOpEntry>;
|
|
928
|
+
export declare const EntityUpsertOp: MessageFns<EntityUpsertOp>;
|
|
929
|
+
export declare const EntityRemoveOp: MessageFns<EntityRemoveOp>;
|
|
930
|
+
export declare const RelationUpsertOp: MessageFns<RelationUpsertOp>;
|
|
931
|
+
export declare const RelationRemoveOp: MessageFns<RelationRemoveOp>;
|
|
932
|
+
export declare const VectorUpsertOp: MessageFns<VectorUpsertOp>;
|
|
933
|
+
export declare const CanonicalDbOpEntry: MessageFns<CanonicalDbOpEntry>;
|
|
934
|
+
export declare const CanonicalEntityUpsertOp: MessageFns<CanonicalEntityUpsertOp>;
|
|
935
|
+
export declare const EntityTombstoneOp: MessageFns<EntityTombstoneOp>;
|
|
936
|
+
export declare const CanonicalRelationUpsertOp: MessageFns<CanonicalRelationUpsertOp>;
|
|
937
|
+
export declare const RelationTombstoneOp: MessageFns<RelationTombstoneOp>;
|
|
938
|
+
export declare const CanonicalVectorUpsertOp: MessageFns<CanonicalVectorUpsertOp>;
|
|
939
|
+
export declare const VectorTombstoneOp: MessageFns<VectorTombstoneOp>;
|
|
940
|
+
export declare const AttributeAddress: MessageFns<AttributeAddress>;
|
|
941
|
+
export declare const AttributeUpsertOp: MessageFns<AttributeUpsertOp>;
|
|
942
|
+
export declare const AttributeRemoveOp: MessageFns<AttributeRemoveOp>;
|
|
943
|
+
export declare const AttributeHistoryAppendOp: MessageFns<AttributeHistoryAppendOp>;
|
|
944
|
+
export declare const DbOpBatch: MessageFns<DbOpBatch>;
|
|
945
|
+
export declare const CanonicalDbOpBatch: MessageFns<CanonicalDbOpBatch>;
|
|
946
|
+
export declare const ConversationRecordProvenance: MessageFns<ConversationRecordProvenance>;
|
|
947
|
+
export declare const ConversationRecord: MessageFns<ConversationRecord>;
|
|
948
|
+
export declare const ConversationLedger: MessageFns<ConversationLedger>;
|
|
949
|
+
export declare const LadybugOverlayWal: MessageFns<LadybugOverlayWal>;
|
|
950
|
+
export declare const LadybugOverlayCheckpoint: MessageFns<LadybugOverlayCheckpoint>;
|
|
951
|
+
export declare const PhysicalIndexCheckpoint: MessageFns<PhysicalIndexCheckpoint>;
|
|
952
|
+
export declare const RuntimeVariable: MessageFns<RuntimeVariable>;
|
|
953
|
+
export declare const RuntimeLatch: MessageFns<RuntimeLatch>;
|
|
954
|
+
export declare const RuntimeAction: MessageFns<RuntimeAction>;
|
|
955
|
+
export declare const RuntimeTransaction: MessageFns<RuntimeTransaction>;
|
|
956
|
+
export declare const ScheduledRuntimeEvent: MessageFns<ScheduledRuntimeEvent>;
|
|
957
|
+
export declare const RuntimeLastValue: MessageFns<RuntimeLastValue>;
|
|
958
|
+
export declare const TriggerRuntimeState: MessageFns<TriggerRuntimeState>;
|
|
959
|
+
export declare const ScenarioRuntimeState: MessageFns<ScenarioRuntimeState>;
|
|
960
|
+
export declare const PlayerAssetRef: MessageFns<PlayerAssetRef>;
|
|
961
|
+
export declare const AssetLifecycleEvent: MessageFns<AssetLifecycleEvent>;
|
|
962
|
+
export declare const AssetRefs: MessageFns<AssetRefs>;
|
|
963
|
+
export declare const InFlightAttempt: MessageFns<InFlightAttempt>;
|
|
964
|
+
export declare const InFlightItem: MessageFns<InFlightItem>;
|
|
965
|
+
export declare const InFlightRecovery: MessageFns<InFlightRecovery>;
|
|
966
|
+
export declare const IntegrityCheckpoint: MessageFns<IntegrityCheckpoint>;
|
|
967
|
+
export declare const ExtensionSection: MessageFns<ExtensionSection>;
|
|
968
|
+
export declare const SaveGeneration: MessageFns<SaveGeneration>;
|
|
969
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
970
|
+
type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
971
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
972
|
+
} : Partial<T>;
|
|
973
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
974
|
+
type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
975
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
976
|
+
} & {
|
|
977
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
978
|
+
};
|
|
979
|
+
interface MessageFns<T> {
|
|
980
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
981
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
982
|
+
fromJSON(object: any): T;
|
|
983
|
+
toJSON(message: T): unknown;
|
|
984
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
985
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
986
|
+
}
|
|
987
|
+
export {};
|