Files
hanfuit 645b64fe21 DNF90 服务端与启动器完整源码(含 GM 工具功能增强)
服务端(Go):
- GM 塞背包/带属性装备发放:在线角色推送 op14 增量物品行,背包实时刷新,无需回角色选择界面
- GM 改金币/改等级:去掉在线拒绝,落库后推送 op14 钱包/op37 等级状态,在线实时刷新
- 等级端点统一切换到新版 GMSetCharacterLevel(自带在线刷新)
- 无限/锁死疲劳模式 + 燃烧疲劳:每房间消耗 2 点、打怪与通关经验双倍
- 燃烧疲劳开关时给所有在线角色推送系统提示(op12 mode 0)
- 深渊史诗掉率:GM 全局倍率 + 城镇增益药剂窗口倍率,真实接入掉落结算

启动器(Python/JS):
- 标题栏自绘、窗口 1204x717、禁止拖拽改大小、仅最小化/关闭
- GM 工具:疲劳与燃烧、深渊史诗掉率、拍卖行上架(单一定价对齐)
- 拍卖行上架前端对齐服务端单一价格语义,修复 400 报错
2026-11-04 14:31:55 +08:00

1491 lines
34 KiB
TypeScript

// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
// This file is automatically generated. DO NOT EDIT
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as mod$0 from "../internal/mod/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as pvf$0 from "../internal/pvf/models.js";
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore: Unused imports
import * as ruleconfig$0 from "../internal/ruleconfig/models.js";
/**
* AdvancedSearchDetail explains why a file matched the query.
*/
export interface AdvancedSearchDetail {
"kind": string;
"value"?: string;
"pool"?: string;
"poolOffset"?: number;
"occurrences": number;
"tokenTypes"?: number[] | null;
"fileFields"?: string[] | null;
"byteOffsets"?: number[] | null;
"tokenOffsets"?: number[] | null;
"hex"?: string;
"offsetsTruncated"?: boolean;
}
/**
* AdvancedSearchHit is one file-level advanced-search result.
*/
export interface AdvancedSearchHit {
"name"?: string;
"path": string;
"size": number;
"dataType": number;
"fileIndex": number;
"details"?: (AdvancedSearchDetail | null)[] | null;
}
/**
* AdvancedSearchIndexStatus describes the lazy string reverse-index state.
*/
export interface AdvancedSearchIndexStatus {
"state": string;
"stage": string;
"done": number;
"total": number;
"error": string;
}
/**
* AdvancedSearchResult is a paged file-level advanced-search response.
*/
export interface AdvancedSearchResult {
"hits": (AdvancedSearchHit | null)[] | null;
"nextCursor": number;
"scanned": number;
}
/**
* AniPreviewDocument is the structured preview model returned for .ani text.
*/
export interface AniPreviewDocument {
"valid": boolean;
"loop": boolean;
"shadow": boolean;
"frameMax": number;
"frames": AniPreviewFrame[] | null;
"issues": PreviewIssue[] | null;
}
/**
* AniPreviewFrame is one decoded ANI frame.
*/
export interface AniPreviewFrame {
"index": number;
"delayMs": number;
"layers": AniPreviewLayer[] | null;
}
/**
* AniPreviewLayer is one image layer in an ANI frame.
*/
export interface AniPreviewLayer {
"image": ImageReference;
"x": number;
"y": number;
}
export interface AnnotationReloadResult {
"ruleCount": number;
"relationCount": number;
}
export interface AppSettings {
/**
* CacheLimitGiB is the soft disk budget; zero disables automatic eviction.
*/
"cacheLimitGiB": number;
"annotationTagPlacement": string;
"explorerOpenMode": string;
"vimMode": boolean;
"backupSourceOnSave": boolean;
"npkDirectory": string;
"theme": string;
/**
* AutosaveEnabled turns the timed workspace snapshot on. It is off by
* default: the snapshot rewrites a whole PVF, so the user opts in.
*/
"autosaveEnabled": boolean;
/**
* AutosavePath is the single-slot snapshot file. Empty means the platform
* cache directory resolved by DefaultAutosavePath.
*/
"autosavePath": string;
"autosaveIntervalSeconds": number;
/**
* ShortcutOverrides stores only bindings changed by the user. An empty
* value explicitly disables a command's default binding.
*/
"shortcutOverrides": { [_ in string]?: string } | null;
"maxEditableSizeMB": number;
}
export interface ArchiveDiffDraft {
"fileIndex": number;
"path": string;
"text": string;
}
export interface ArchiveDiffFile {
"path": string;
"operation": string;
"beforeHash": string;
"afterHash": string;
"beforeType": number;
"afterType": number;
"beforeSize": number;
"afterSize": number;
"beforeExists": boolean;
"afterExists": boolean;
"beforeText": string;
"afterText": string;
"textAvailable": boolean;
"message": string;
}
/**
* ArchiveDiffMergeResult 记录批量合并操作的结果汇总
*/
export interface ArchiveDiffMergeResult {
"successCount": number;
"failedCount": number;
"mergedPaths": string[] | null;
"errors"?: string[] | null;
}
export interface ArchiveDiffNode {
"path": string;
"name": string;
"isDir": boolean;
"operation": string;
"count": number;
}
export interface ArchiveDiffRequest {
"path": string;
"drafts": ArchiveDiffDraft[] | null;
}
export interface ArchiveDiffStatus {
"id": string;
"state": string;
"currentPath": string;
"otherPath": string;
"processed": number;
"total": number;
"added": number;
"modified": number;
"deleted": number;
"error": string;
}
/**
* ArchiveInfo 是前端可观察的归档状态快照。
*/
export type ArchiveInfo = pvf$0.ArchiveInfoView;
/**
* AutosaveStatus is the UI-facing state of the backup slot.
*/
export interface AutosaveStatus {
"enabled": boolean;
"path": string;
"defaultPath": string;
"exists": boolean;
"cachedAt": number;
"sourcePath": string;
"sizeBytes": number;
"running": boolean;
"lastError": string;
}
export interface BatchApplyResult {
"appliedFiles": number;
"fileIndexes": number[] | null;
"modifiedCount": number;
"revision": number;
}
export interface BatchDiffLine {
"kind": string;
"text": string;
"oldLine": number;
"newLine": number;
}
export interface BatchFilePreview {
"fileIndex": number;
"path": string;
"status": string;
"matchCount": number;
"reason"?: string;
"warnings"?: string[] | null;
"diff"?: (BatchDiffLine | null)[] | null;
"diffTruncated"?: boolean;
}
export interface BatchPreviewPage {
"planId": string;
"nextCursor": number;
"requestedFiles": number;
"matchedFiles": number;
"matchedOccurrences": number;
"changedFiles": number;
"rows": (BatchFilePreview | null)[] | null;
}
export interface BatchRequest {
"mode": string;
"paths": string[] | null;
"text"?: TextReplaceSpec | null;
"operations"?: StructuredOperation[] | null;
}
/**
* BookmarkBook is a runtime bookmark book. Builtin books are read-only in
* packaged applications and editable when running from the repository.
*/
export interface BookmarkBook {
"id": string;
"name": string;
"builtin": boolean;
"editable": boolean;
"groups"?: BookmarkGroup[] | null;
"entries"?: BookmarkEntry[] | null;
}
/**
* BookmarkBookFile is the portable JSON representation of one bookmark book.
* IDs and runtime flags are intentionally omitted so imports always receive
* fresh local identities and are treated as editable books.
*/
export interface BookmarkBookFile {
"version": number;
"name": string;
"groups"?: BookmarkGroup[] | null;
"entries"?: BookmarkEntry[] | null;
}
/**
* BookmarkDocument is the complete runtime bookmark state.
*/
export interface BookmarkDocument {
"version": number;
"activeBookId": string;
"books": BookmarkBook[] | null;
}
/**
* BookmarkEntry is one PVF-internal file bookmark.
*/
export interface BookmarkEntry {
"path": string;
"name": string;
}
/**
* BookmarkGroup is a recursively nested bookmark group.
*/
export interface BookmarkGroup {
"id": string;
"name": string;
"groups"?: BookmarkGroup[] | null;
"entries"?: BookmarkEntry[] | null;
}
export interface BuiltinSkill {
"id": string;
"title": string;
"description": string;
}
/**
* CacheClearResult reports what one clear pass removed.
*/
export interface CacheClearResult {
"freedBytes": number;
"usage": CacheUsage;
}
/**
* CacheUsage is the disk footprint reported to the settings page.
*/
export interface CacheUsage {
"limitBytes": number;
"indexBytes": number;
"backupBytes": number;
"reclaimableBytes": number;
"overBudget": boolean;
"path": string;
"files": number;
"totalBytes": number;
/**
* InUseBytes covers the indexes the running session holds open. They are
* rebuilt once the archive is closed, so a clear pass has to skip them.
*/
"inUseBytes": number;
}
/**
* DropRateApplyRequest applies the complete editor snapshot atomically.
*/
export interface DropRateApplyRequest {
"revision": number;
"sections": (DropRateSection | null)[] | null;
}
/**
* DropRateApplyResult reports the in-memory archive state after applying.
*/
export interface DropRateApplyResult {
"revision": number;
"fileIndexes": number[] | null;
"modifiedCount": number;
}
/**
* DropRateDocument is the structured view consumed by the drop-rate editor.
* Rates are percentage hundredths: 1234 means 12.34%.
*/
export interface DropRateDocument {
"pvfVersion": string;
"revision": number;
"sections": (DropRateSection | null)[] | null;
}
/**
* DropRateGroup contains five rarity probabilities in percentage hundredths.
*/
export interface DropRateGroup {
"rates": number[] | null;
}
/**
* DropRateSection identifies one of the four supported drop files.
*/
export interface DropRateSection {
"key": string;
"groups": (DropRateGroup | null)[] | null;
}
export interface EditorAnnotation {
"start": number;
"end": number;
"title": string;
"content": string;
"type": string;
"targetFileIndex": number;
"ruleIds"?: string[] | null;
"image"?: ImageReference | null;
"inlineImage"?: boolean;
"placeholder"?: PlaceholderRef | null;
"rarity": number;
}
export interface EffectParticle {
"life": number;
"frequency": number;
"maximum": number;
"maximumTime": number;
"gravity": number;
"position": number[] | null;
"area": number[] | null;
"alpha": number[] | null;
"velocity": number[] | null;
"acceleration": number[] | null;
}
/**
* EquipmentPreviewAttribute is one visible line in an equipment tooltip.
*/
export interface EquipmentPreviewAttribute {
"label": string;
"value": string;
"negative": boolean;
}
/**
* EquipmentPreviewDocument is the game-style data model rendered by the
* frontend. Optional sections are represented by empty strings/slices.
*/
export interface EquipmentPreviewDocument {
"icon": ImageReference | null;
"name": string;
"name2": string;
"rarity": number;
"rarityLabel": string;
"qualityText": string;
"equipmentType": string;
"itemGroupName": string;
"attachType": string;
"minimumLevelText": string;
"usableJobs": string[] | null;
"fameText": string;
"baseAttributes": EquipmentPreviewAttribute[] | null;
"fourDimensions": EquipmentPreviewAttribute[] | null;
"otherAttributes": EquipmentPreviewAttribute[] | null;
"skillLevelups": EquipmentSkillLevelup[] | null;
"baseExplain": string;
"detailExplain": string;
"buffBasicExplain": string;
"flavorText": string;
"durabilityText": string;
"weightText": string;
"priceText": string;
"partSet"?: EquipmentSetPreviewDocument | null;
"issues": PreviewIssue[] | null;
}
/**
* EquipmentSetAbility is one bonus unlocked by wearing a number of set pieces.
*/
export interface EquipmentSetAbility {
"pieces": number;
"baseExplain": string;
"detailExplain": string;
}
/**
* EquipmentSetPreviewDocument is the set tooltip associated with an equipment.
*/
export interface EquipmentSetPreviewDocument {
"name": string;
"parts": string[] | null;
"abilities": EquipmentSetAbility[] | null;
}
/**
* EquipmentSkillLevelup is one profession-aware skill level bonus.
*/
export interface EquipmentSkillLevelup {
"job": string;
"skill": string;
"level": number;
}
export interface ExportMergeSource {
"path": string;
"name": string;
"version": string;
"versionNotice": string;
}
export interface ExportPreview {
"id": string;
"fileCount": number;
"dependencyCount": number;
"skippedDeletes": number;
"warnings": string[] | null;
"files": ExportPreviewFile[] | null;
}
export interface ExportPreviewFile {
"path": string;
"required": boolean;
"dependencyCount": number;
}
export interface ExportRequest {
"source": string;
"diffId"?: string;
"reverse"?: boolean;
"scopes": string[] | null;
"commitId": string;
"mode": string;
"format": string;
"name": string;
"version": string;
"modId": string;
"includeDependencies": boolean;
"mergePath"?: string;
}
/**
* FileMeta 返回给前端的单个文件视图。
*/
export interface FileMeta {
"index": number;
"path": string;
"dataType": number;
"size": number;
"tags"?: TreeTag[] | null;
"editable": boolean;
"text": string;
"modified": boolean;
"annotations"?: EditorAnnotation[] | null;
"icon"?: ImageReference | null;
"fieldImage"?: ImageReference | null;
}
/**
* FileRegistration describes one indexed id/path entry in an archive list.
*/
export interface FileRegistration {
"id": string;
"category": string;
"fileIndex": number;
"filePath": string;
"listFileIndex": number;
"listPath": string;
"entryPath": string;
}
/**
* FileRegistrationOptions contains the list choices for the current file.
*/
export interface FileRegistrationOptions {
"fileIndex": number;
"filePath": string;
"targets": (ListRegistrationTarget | null)[] | null;
}
/**
* FileSetDocument 是全部文件集的持久化文档,与当前打开的 PVF 无关。
*/
export interface FileSetDocument {
"version": number;
"fileSets": StoredFileSet[] | null;
"activeSetId": string;
}
export interface ForgeDocument {
/**
* Rows use the shared four-field editing contract. Six-column source rows
* retain their two additional read-only coefficients in FieldsT2.
*/
"rows": UpgradeRow[] | null;
"grades": UpgradeRow[] | null;
"grades100": UpgradeRow[] | null;
"maximum": SkillNumber;
"extras": ForgeSection[] | null;
}
export interface ForgeSection {
"name": string;
"fields": SkillNumber[] | null;
}
/**
* ImageBatchResult corresponds to the request at the same array position.
* A corrupt frame does not prevent other frames in the batch from loading.
*/
export interface ImageBatchResult {
"data": ImageData | null;
"error": string;
}
/**
* ImageData is always a PNG data URL. The source NPK path is intentionally
* never exposed to the frontend.
*/
export interface ImageData {
"dataUrl": string;
"width": number;
"height": number;
}
/**
* ImageIndexStatus is emitted while the NPK directory is being scanned.
*/
export interface ImageIndexStatus {
"state": string;
"stage": string;
"directory": string;
"done": number;
"total": number;
"npkFiles": number;
"imgFiles": number;
"imageCount": number;
"skipped": number;
"duplicates": number;
"error": string;
"generation": number;
"buildDurationMs": number;
}
/**
* ImageReference is the PVF path plus zero-based frame index stored in an
* [icon] or [field image] section.
*/
export interface ImageReference {
"path": string;
"index": number;
}
/**
* ImportPreview describes the validated changes without modifying the live
* archive. Entries is capped for large directory imports; the counters remain
* complete.
*/
export interface ImportPreview {
"targetDir": string;
"mode": string;
"totalFiles": number;
"importedCount": number;
"overwrittenCount": number;
"entries": (ImportPreviewEntry | null)[] | null;
"entriesTruncated": boolean;
"convertedCount": number;
}
/**
* ImportPreviewEntry is one validated source-to-archive mapping.
*/
export interface ImportPreviewEntry {
"sourcePath": string;
"targetPath": string;
"dataType": number;
"size": number;
"overwrite": boolean;
"sourceEncoding": string;
}
/**
* ImportResult describes one atomically applied import operation.
*/
export interface ImportResult {
"targetDir": string;
"mode": string;
"importedCount": number;
"overwrittenCount": number;
"changedPaths"?: string[] | null;
}
export interface IndependentDropDocument {
"version": string;
"rows": IndependentDropRow[] | null;
"lists": IndependentDropList[] | null;
"balance": SkillNumber[] | null;
"bodyEnd": number;
"isList": boolean;
"issues": string[] | null;
}
export interface IndependentDropItem {
"fields": SkillNumber[] | null;
"name": string;
}
export interface IndependentDropList {
"id": string;
"path": string;
"fileIndex": number;
}
export interface IndependentDropRow {
"listTagStart": number;
"fields": SkillNumber[] | null;
"items": IndependentDropItem[] | null;
"monsterName": string;
"itemName": string;
"start": number;
"end": number;
"listStart": number;
"listEnd": number;
"hasExtensions": boolean;
}
/**
* IndexHashRegistrationResult summarizes a batch hash registration.
*/
export interface IndexHashRegistrationResult {
"listPath": string;
"indexHashPath": string;
"requested": number;
"added": number;
"existing": number;
"invalidIds"?: string[] | null;
}
/**
* IndexHashTarget describes a list whose companion index-hash file exists.
*/
export interface IndexHashTarget {
"listPath": string;
"indexHashPath": string;
}
/**
* IndexStatus is the current state of the semantic search index.
*/
export interface IndexStatus {
"state": string;
"stage": string;
"done": number;
"total": number;
"skipped": number;
"error": string;
/**
* Refreshing means an older ready snapshot is still serving queries while
* a newer candidate is being built in the background.
*/
"refreshing": boolean;
"refreshError": string;
"cacheHit": boolean;
"openDurationMs": number;
"buildDurationMs": number;
"stringTableIndex"?: pvf$0.StringTableIndexStats | null;
}
/**
* ItemAppearance shares the item rarity and icon metadata used by shop views.
*/
export interface ItemAppearance {
"icon": ImageReference | null;
"rarity": number;
}
/**
* ItemCreateRequest carries all relevant editor drafts, so unsaved list entries
* participate in collision checks and survive registration.
*/
export interface ItemCreateRequest {
"path": string;
"id": string;
"name": string;
"text": string;
"revision": number;
"drafts": ShopDraft[] | null;
}
export interface ItemCreateResult {
"fileIndex": number;
"path": string;
"id": string;
"files": ShopEditedFile[] | null;
}
export interface ItemCreationCheck {
"revision": number;
"listPath": string;
"entryPath": string;
"conflicts": string[] | null;
}
export interface ItemEffectLayer {
"path": string;
"animation": AniPreviewDocument | null;
"particle"?: EffectParticle | null;
}
export interface ItemEffectPreview {
"objectPath": string;
"layers": ItemEffectLayer[] | null;
"issues": string[] | null;
}
/**
* ListRegistrationTarget describes a list that can register one archive file.
*/
export interface ListRegistrationTarget {
"listPath": string;
"category": string;
"entryPath": string;
"suggestedId": string;
"hasIndexHash": boolean;
}
export interface MCPStatus {
"enabled": boolean;
"port": number;
"endpoint": string;
"error"?: string;
"busy": boolean;
}
export interface ModImportFile {
"path": string;
"operation": string;
"overwrite": boolean;
"pairs": ModImportPair[] | null;
}
export interface ModImportPair {
"key": string;
"value": string;
"previous": string;
"overwrite": boolean;
}
export interface ModImportPreview {
"id": string;
"name": string;
"version": string;
"format": string;
"importedCount": number;
"overwrittenCount": number;
"files": ModImportFile[] | null;
"components": mod$0.Component[] | null;
"selectedComponents": string[] | null;
"warnings": string[] | null;
}
/**
* PlaceholderRef identifies the string-table entry a placeholder annotation
* resolves through, so the editor can offer to rewrite — or create — that text.
*/
export interface PlaceholderRef {
"tableIndex": number;
"key": string;
"fallback"?: boolean;
/**
* Missing reports a placeholder no table answers yet: the editor offers to
* create the entry, which is how a new file gets its display text.
*/
"missing"?: boolean;
}
/**
* PreviewIssue is a recoverable problem reported by a preview parser.
*/
export interface PreviewIssue {
"severity": string;
"line": number;
"section"?: string;
"message": string;
}
/**
* RecoveryInfo describes a backup that can be restored on startup.
*/
export interface RecoveryInfo {
"sourcePath": string;
"sourceName": string;
"cachedAt": number;
"sizeBytes": number;
"pendingFiles": number;
"sourceExists": boolean;
"sourceChanged": boolean;
}
/**
* RenderingReloadResult describes the renderer that was activated.
*/
export interface RenderingReloadResult {
"ruleCount": number;
}
export interface RuleQueryResult {
"revision": string;
"development": boolean;
"entries": ruleconfig$0.Entry[] | null;
"relations": string[] | null;
}
export interface RuleTarget {
"category": string;
"path": string;
"section": string;
"directory": boolean;
}
/**
* SafeUpgradeRow preserves eight source fields. Column 2 is failure probability
* with denominator 100000; 3 is correction, 5/6 are material ID/count, 7 is gold.
* Columns 1/4 remain unidentified and are preserved by GUI edits.
*/
export interface SafeUpgradeRow {
"fields": SkillNumber[] | null;
"costName": string;
}
export interface ScriptApplyResult {
"appliedFiles": number;
"fileIndexes": number[] | null;
"modifiedCount": number;
"revision": number;
/**
* Structural reports whether the commit changed the entry table, which
* means every previously previewed file index is now stale.
*/
"structural": boolean;
/**
* AppliedFileSets counts the file set mutations written to user config.
*/
"appliedFileSets": number;
}
export interface ScriptCompileResult {
"valid": boolean;
"diagnostics": (ScriptDiagnostic | null)[] | null;
}
export interface ScriptDiagnostic {
"kind": string;
"message": string;
"stack"?: string;
"line"?: number;
"column"?: number;
}
export interface ScriptError {
"kind": string;
"message": string;
"stack"?: string;
"line"?: number;
"column"?: number;
}
export interface ScriptFile {
"name": string;
"size": number;
"modifiedAt": string;
}
export interface ScriptFilePreview {
/**
* ChangeKey is the stable selection key. Structural changes shift entry
* indexes, so the frontend must select rows by this key, not FileIndex.
*/
"changeKey": string;
"fileIndex": number;
"path": string;
"status": string;
"matchCount": number;
"reason"?: string;
"warnings"?: string[] | null;
"diff"?: (BatchDiffLine | null)[] | null;
"diffTruncated"?: boolean;
}
/**
* ScriptFileSetPreview describes one staged file set mutation.
*/
export interface ScriptFileSetPreview {
"changeKey": string;
"name": string;
"status": string;
/**
* Added and Removed are the path-level difference against the persisted set,
* so the UI can show what a setAll actually changed.
*/
"added"?: string[] | null;
"removed"?: string[] | null;
/**
* Count is the resulting entry total after the change.
*/
"count": number;
}
export interface ScriptLog {
"level": string;
"message": string;
}
export interface ScriptPreviewPage {
"planId": string;
"nextCursor": number;
/**
* Filter echoes the path filter this page was built with.
*/
"filter"?: string;
/**
* MatchedFiles counts every row matching the filter across all pages, so
* the UI can report an accurate total instead of only what is loaded.
*/
"matchedFiles": number;
"scannedFiles": number;
"modifiedFiles": number;
"rows": (ScriptFilePreview | null)[] | null;
/**
* FileSetRows lists the staged file set mutations. They are not diffed rows,
* but the apply step must show and select them alongside archive changes.
*/
"fileSetRows"?: (ScriptFileSetPreview | null)[] | null;
/**
* FileSetSelectKey is the change key the frontend selects to apply every
* file set mutation, mirroring how archive rows use ChangeKey.
*/
"fileSetSelectKey"?: string;
}
export interface ScriptRunRequest {
"name"?: string;
"source": string;
}
export interface ScriptRunResult {
"runId": string;
"status": string;
"planId"?: string;
"scannedFiles": number;
"modifiedFiles": number;
"fileSetChanges": number;
"durationMs": number;
"logs": (ScriptLog | null)[] | null;
"error"?: ScriptError | null;
}
/**
* ScriptSession is the script editor state handed between the main window and
* the detached script window. Every webview has its own Pinia store, so the
* content has to travel explicitly.
*/
export interface ScriptSession {
"name": string;
"source": string;
"savedSource": string;
}
/**
* SearchHit is one searchable file/list record.
*/
export interface SearchHit {
"name": string;
"id": string;
"path": string;
"category": string;
"size": number;
"dataType": number;
"fileIndex": number;
"rarity": number;
"changeKind"?: string;
"annotations"?: TreeAnnotation[] | null;
"pathAnnotations"?: { [_ in string]?: TreeAnnotation[] | null } | null;
"icon"?: ImageReference | null;
"fieldImage"?: ImageReference | null;
}
/**
* SearchResult 是一页搜索命中;NextCursor < 0 表示已扫完。
*/
export interface SearchResult {
"hits": (SearchHit | null)[] | null;
"nextCursor": number;
"scanned": number;
}
export interface ShopCategory {
"id": string;
"name": string;
}
export interface ShopCost {
"kind": string;
"itemId": string;
"quantity": string;
"name": string;
"icon": ImageReference | null;
}
export interface ShopDocument {
"revision": number;
"name": string;
"categoryType": string;
"categories": ShopCategory[] | null;
"tabs": ShopTab[] | null;
"issues": PreviewIssue[] | null;
}
export interface ShopDraft {
"fileIndex": number;
"path": string;
"text": string;
}
export interface ShopEditRequest {
"fileIndex": number;
"path": string;
"text": string;
"revision": number;
"action": string;
"tabIndex": number;
"sourceStart": number;
"categoryId": string;
"itemId": string;
"name": string;
"setGold": boolean;
/**
* empty removes [price], "0" is an explicit zero
*/
"gold": string;
"setMaterials": boolean;
"materials": ShopMaterialInput[] | null;
"drafts": ShopDraft[] | null;
}
export interface ShopEditResult {
"revision": number;
"files": ShopEditedFile[] | null;
"affectedItems": number;
"modifiedCount": number;
}
export interface ShopEditedFile {
"fileIndex": number;
"path": string;
"beforeText": string;
"text": string;
}
export interface ShopEntry {
"item": ShopItem;
"sourceStart": number;
"sourceEnd": number;
"hasLocalCosts": boolean;
}
export interface ShopGroup {
"categoryId": string;
"sourceStart": number;
"items": ShopEntry[] | null;
}
export interface ShopItem {
"fileIndex": number;
"path": string;
"id": string;
"name": string;
"rarity": number;
"icon": ImageReference | null;
"costs": ShopCost[] | null;
}
export interface ShopMaterialInput {
"itemId": string;
"quantity": string;
}
export interface ShopTab {
"name": string;
"sourceStart": number;
"groups": ShopGroup[] | null;
"implicit": boolean;
}
export interface SkillDocument {
"name": string;
"modes": SkillMode[] | null;
}
export interface SkillEntry {
"fileIndex": number;
"path": string;
"name": string;
"job": string;
}
export interface SkillInstallResult {
"id": string;
"path": string;
"status": string;
"message": string;
}
export interface SkillMode {
"id": string;
"static": SkillNumber[] | null;
"width": number;
"levels": (SkillNumber[] | null)[] | null;
"properties": SkillProperty[] | null;
"issues": string[] | null;
}
/**
* SkillNumber retains exact UTF-16 source positions so GUI edits preserve all
* unrelated tags, formatting, and numeric token types in the editor draft.
*/
export interface SkillNumber {
"value": number;
"start": number;
"end": number;
"tokenType": number;
}
export interface SkillProperty {
"template": string;
"bindings": SkillPropertyBinding[] | null;
}
export interface SkillPropertyBinding {
"dynamic": boolean;
"index": number;
"multiplier": number;
}
export interface SkillTreeBranch {
"insertOffset": number;
"job": string;
"name": string;
"nodes": SkillTreeNode[] | null;
}
export interface SkillTreeDocument {
"text": string;
"fileIndex": number;
"path": string;
"common": SkillTreeNode[] | null;
"branches": SkillTreeBranch[] | null;
"issues": string[] | null;
}
export interface SkillTreeNode {
"sourceStart": number;
"sourceClose": number;
"positionTokens": SkillNumber[] | null;
"nextTokens": SkillNumber[] | null;
"id": number;
"x": number;
"y": number;
"positionKind": string;
"position": number[] | null;
"next": number[] | null;
"name": string;
"explain": string;
"path": string;
"fileIndex": number;
"icon": ImageReference | null;
"requiredLevel": number | null;
}
/**
* SkillTreeRegistration retains the job token: skill IDs are local to this job.
*/
export interface SkillTreeRegistration {
"job": string;
"kind": string;
"path": string;
}
export interface SkillTreeSkill {
"id": number;
"name": string;
"path": string;
"fileIndex": number;
}
export interface StoredFileSet {
"id": string;
"name": string;
"entries": StoredFileSetEntry[] | null;
}
/**
* StoredFileSetEntry 是文件集落盘格式。fileIndex 不持久化,因为它只对当前 PVF 有效。
*/
export interface StoredFileSetEntry {
"path": string;
"name": string;
"ids"?: string[] | null;
"size": number;
"dataType": number;
}
export interface StructuredOperation {
"kind": string;
"section": string;
"tokenIndex": number;
"value": string;
"createIfMissing": boolean;
"operator": string;
"operand": string;
"operandEnd": string;
"anchorSection": string;
"hasEndTag": boolean;
}
export interface TextReplaceSpec {
"find": string;
"replacement": string;
"regex": boolean;
}
/**
* TreeAnnotation is one annotation attached to a path in the explorer.
*/
export interface TreeAnnotation {
"title": string;
"content": string;
"type": string;
"ruleIds"?: string[] | null;
}
/**
* TreeNode is one entry in the explorer tree: either a directory or a file.
*/
export interface TreeNode {
"name": string;
"path": string;
"isDir": boolean;
"size": number;
"dataType": number;
"childCount": number;
/**
* -1 for directories
*/
"fileIndex": number;
"changeKind"?: string;
"tags"?: TreeTag[] | null;
"annotations"?: TreeAnnotation[] | null;
"icon"?: ImageReference | null;
"fieldImage"?: ImageReference | null;
}
/**
* TreeTag is one list mapping displayed after a file name in the explorer.
*/
export interface TreeTag {
"id": string;
"name": string;
"category": string;
/**
* Rarity is the target file's [rarity] value, or pvf.RarityUnknown when the
* file declares none. The explorer colors the tag with it.
*/
"rarity": number;
}
export interface UpgradeDocument {
"rows": UpgradeRow[] | null;
"safeRows": SafeUpgradeRow[] | null;
"safeIssue": string;
}
/**
* UpgradeRow exposes only the five editable columns. Level follows the source
* tool's row order. Fields holds weapon settings and shared materials;
* FieldsT2 holds armor probability, failure operation, and downgrade parameter.
* All other table parameters retain their source text.
*/
export interface UpgradeRow {
"level": number;
"fields": SkillNumber[] | null;
"fieldsT2": SkillNumber[] | null;
"costName": string;
}
export interface VendingDocument {
"groups": VendingGroup[] | null;
}
export interface VendingGroup {
"start": number;
"end": number;
"number": SkillNumber;
"material": SkillNumber[] | null;
"materialName": string;
"rewards": VendingReward[] | null;
"outputClose": number;
}
export interface VendingReward {
"fields": SkillNumber[] | null;
"name": string;
}
/**
* VersionChange is a path-level worktree or commit change.
*/
export interface VersionChange {
"path": string;
"operation": string;
"beforeHash"?: string;
"afterHash"?: string;
"beforeType"?: number;
"afterType"?: number;
}
export interface VersionChangePage {
"changes": (VersionChange | null)[] | null;
"nextCursor": number;
"total": number;
}
export interface VersionCommit {
"id": string;
"parentId": string;
"message": string;
"createdAt": number;
"changeCount": number;
}
/**
* VersionFileDiff contains one commit change and its logical text values
* when the underlying PVF type is editable.
*/
export interface VersionFileDiff {
"path": string;
"operation": string;
"beforeHash"?: string;
"afterHash"?: string;
"beforeType"?: number;
"afterType"?: number;
"beforeText"?: string;
"afterText"?: string;
"textAvailable": boolean;
}
export interface VersionHistoryPage {
"commits": (VersionCommit | null)[] | null;
"nextCursor": number;
}
/**
* VersionStatus is the UI-facing version session state.
*/
export interface VersionStatus {
"enabled": boolean;
"loading": boolean;
"repositoryPath": string;
"branch": string;
"headId": string;
"headMessage": string;
"changedFiles": number;
"pendingChangeSets": number;
"needsSave": boolean;
"viewCommitId": string;
"error": string;
}
export interface WorldDropDocument {
"revision": number;
"levels": WorldDropLevel[] | null;
}
export interface WorldDropEditRequest {
"fileIndex": number;
"path": string;
"text": string;
"revision": number;
"levels": WorldDropLevel[] | null;
}
export interface WorldDropEditResult {
"revision": number;
"files": ShopEditedFile[] | null;
"modifiedCount": number;
}
export interface WorldDropItem {
"id": number;
"weight": number;
"name": string;
}
export interface WorldDropLevel {
"level": number;
"items": WorldDropItem[] | null;
}