@openfairygui/backend 0.5.0 → 0.6.1

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/docs.cjs CHANGED
@@ -44,14 +44,6 @@ const write = {
44
44
  kind: "host-action",
45
45
  message: "Preserve the dirty session and inspect the error, actual target files and permissions with the host. Partial writes may have changed files: verify or recover them before a newly authorized save. Do not clear dirty state, discard memory or blindly retry."
46
46
  };
47
- const execution = {
48
- kind: "host-action",
49
- message: "Inspect the execution/cache failure and current session/revision. Preserve sources and unsaved work and report the cause to the host. Replan after resolution; failed execution or cache work is not a completed edit."
50
- };
51
- const job = {
52
- kind: "host-action",
53
- message: "Inspect the job ID and status with getJob/listJobs. Do not fabricate, restart or force-cancel a missing, terminal or non-cancellable job. Ask the host before scheduling new work; cancellation is not success."
54
- };
55
47
  /** Exhaustiveness and exact ownership are checked against the canonical unions. */
56
48
  const BACKEND_DIAGNOSTIC_GUIDES = [
57
49
  {
@@ -102,6 +94,14 @@ const BACKEND_DIAGNOSTIC_GUIDES = [
102
94
  message: "Ask the host to confirm the runtime and project, recover any unsaved state, then explicitly open a new session if appropriate. Session IDs are runtime-local. Read its new revision and replan; never reuse an expired session or assume disk contains unsaved changes."
103
95
  }
104
96
  },
97
+ {
98
+ code: "session_close_failed",
99
+ owners: ["backend"],
100
+ remediation: {
101
+ kind: "host-action",
102
+ message: "The session and lock ownership remain registered. Inspect the reported lock release failure, correct the storage problem, then retry closeSession with the same session ID. Do not remove the lock file or open a replacement session to bypass the owner."
103
+ }
104
+ },
105
105
  {
106
106
  code: "path_policy_violation",
107
107
  owners: ["backend"],
@@ -582,27 +582,10 @@ const BACKEND_DIAGNOSTIC_GUIDES = [
582
582
  {
583
583
  code: "execution_failure",
584
584
  owners: ["core.transaction"],
585
- remediation: execution
586
- },
587
- {
588
- code: "cache_refresh_failed",
589
- owners: ["backend"],
590
- remediation: execution
591
- },
592
- {
593
- code: "job_not_found",
594
- owners: ["backend"],
595
- remediation: job
596
- },
597
- {
598
- code: "job_not_cancellable",
599
- owners: ["backend"],
600
- remediation: job
601
- },
602
- {
603
- code: "job_cancelled",
604
- owners: ["backend"],
605
- remediation: job
585
+ remediation: {
586
+ kind: "host-action",
587
+ message: "Inspect the execution/cache failure and current session/revision. Preserve sources and unsaved work and report the cause to the host. Replan after resolution; failed execution or cache work is not a completed edit."
588
+ }
606
589
  }
607
590
  ];
608
591
  const BACKEND_DIAGNOSTICS_URI = "openfairygui://docs/diagnostics";
@@ -623,8 +606,8 @@ function getBackendDiagnosticGuide(code) {
623
606
  const CONTRACT_SNAPSHOT = {
624
607
  "schemaVersion": 1,
625
608
  "versions": {
626
- "BACKEND_CONTRACT_VERSION": "2.0.0-p3",
627
- "BACKEND_CAPABILITY_SCHEMA_VERSION": 11
609
+ "BACKEND_CONTRACT_VERSION": "3.0.0",
610
+ "BACKEND_CAPABILITY_SCHEMA_VERSION": 12
628
611
  },
629
612
  "operations": {
630
613
  "updateProjectSettings": { "$ref": "#/$defs/UpdateProjectSettingsOperation_3ec628dee7" },
@@ -1191,7 +1174,7 @@ const CONTRACT_SNAPSHOT = {
1191
1174
  },
1192
1175
  "output": {
1193
1176
  "type": "object",
1194
- "properties": { "backendResult": { "anyOf": [{ "$ref": "#/$defs/BackendResult_0bdb207dae" }, { "$ref": "#/$defs/McpUnhandledFailure_fcecd3763a" }] } },
1177
+ "properties": { "backendResult": { "anyOf": [{ "$ref": "#/$defs/BackendResult_01bd3005ba" }, { "$ref": "#/$defs/McpUnhandledFailure_fcecd3763a" }] } },
1195
1178
  "required": ["backendResult"],
1196
1179
  "additionalProperties": false
1197
1180
  },
@@ -1231,118 +1214,6 @@ const CONTRACT_SNAPSHOT = {
1231
1214
  },
1232
1215
  "bytePaths": []
1233
1216
  },
1234
- "getJob": {
1235
- "name": "openfairygui_backend_get_job",
1236
- "backendMethod": "getJob",
1237
- "title": "Get Runtime Job",
1238
- "description": "Return a backend runtime job snapshot by session and backend-local job id.",
1239
- "annotations": {
1240
- "readOnlyHint": true,
1241
- "idempotentHint": true,
1242
- "openWorldHint": false
1243
- },
1244
- "input": {
1245
- "type": "object",
1246
- "properties": {
1247
- "sessionId": {
1248
- "type": "string",
1249
- "minLength": 1
1250
- },
1251
- "jobId": {
1252
- "type": "string",
1253
- "minLength": 1
1254
- }
1255
- },
1256
- "required": ["sessionId", "jobId"],
1257
- "additionalProperties": false
1258
- },
1259
- "output": {
1260
- "type": "object",
1261
- "properties": { "backendResult": { "anyOf": [{ "$ref": "#/$defs/BackendResult_6867f7c186" }, { "$ref": "#/$defs/McpUnhandledFailure_fcecd3763a" }] } },
1262
- "required": ["backendResult"],
1263
- "additionalProperties": false
1264
- },
1265
- "bytePaths": []
1266
- },
1267
- "listJobs": {
1268
- "name": "openfairygui_backend_list_jobs",
1269
- "backendMethod": "listJobs",
1270
- "title": "List Runtime Jobs",
1271
- "description": "List backend runtime jobs for a session with backend P2 status/kind filters.",
1272
- "annotations": {
1273
- "readOnlyHint": true,
1274
- "idempotentHint": true,
1275
- "openWorldHint": false
1276
- },
1277
- "input": {
1278
- "type": "object",
1279
- "properties": {
1280
- "sessionId": {
1281
- "type": "string",
1282
- "minLength": 1
1283
- },
1284
- "status": { "enum": [
1285
- "failed",
1286
- "active",
1287
- "completed",
1288
- "running",
1289
- "queued",
1290
- "cancelled",
1291
- "terminal"
1292
- ] },
1293
- "kind": {
1294
- "type": "string",
1295
- "const": "cache.refresh"
1296
- },
1297
- "limit": {
1298
- "type": "integer",
1299
- "minimum": 0
1300
- }
1301
- },
1302
- "required": ["sessionId"],
1303
- "additionalProperties": false
1304
- },
1305
- "output": {
1306
- "type": "object",
1307
- "properties": { "backendResult": { "anyOf": [{ "$ref": "#/$defs/BackendResult_fea5a3c6da" }, { "$ref": "#/$defs/McpUnhandledFailure_fcecd3763a" }] } },
1308
- "required": ["backendResult"],
1309
- "additionalProperties": false
1310
- },
1311
- "bytePaths": []
1312
- },
1313
- "cancelJob": {
1314
- "name": "openfairygui_backend_cancel_job",
1315
- "backendMethod": "cancelJob",
1316
- "title": "Cancel Runtime Job",
1317
- "description": "Request cooperative cancellation for a backend runtime job.",
1318
- "annotations": {
1319
- "readOnlyHint": false,
1320
- "idempotentHint": false,
1321
- "openWorldHint": false
1322
- },
1323
- "input": {
1324
- "type": "object",
1325
- "properties": {
1326
- "sessionId": {
1327
- "type": "string",
1328
- "minLength": 1
1329
- },
1330
- "jobId": {
1331
- "type": "string",
1332
- "minLength": 1
1333
- }
1334
- },
1335
- "required": ["sessionId", "jobId"],
1336
- "additionalProperties": false
1337
- },
1338
- "output": {
1339
- "type": "object",
1340
- "properties": { "backendResult": { "anyOf": [{ "$ref": "#/$defs/BackendResult_fb76e59f94" }, { "$ref": "#/$defs/McpUnhandledFailure_fcecd3763a" }] } },
1341
- "required": ["backendResult"],
1342
- "additionalProperties": false
1343
- },
1344
- "bytePaths": []
1345
- },
1346
1217
  "getCacheSnapshot": {
1347
1218
  "name": "openfairygui_backend_get_cache_snapshot",
1348
1219
  "backendMethod": "getCacheSnapshot",
@@ -1374,7 +1245,7 @@ const CONTRACT_SNAPSHOT = {
1374
1245
  "name": "openfairygui_backend_refresh_cache",
1375
1246
  "backendMethod": "refreshCache",
1376
1247
  "title": "Refresh Cache",
1377
- "description": "Create a backend P2 cache.refresh job for the session cache snapshot.",
1248
+ "description": "Synchronously refresh the derived session cache and return its revision-bound snapshot.",
1378
1249
  "annotations": {
1379
1250
  "readOnlyHint": false,
1380
1251
  "idempotentHint": false,
@@ -1401,7 +1272,7 @@ const CONTRACT_SNAPSHOT = {
1401
1272
  },
1402
1273
  "output": {
1403
1274
  "type": "object",
1404
- "properties": { "backendResult": { "anyOf": [{ "$ref": "#/$defs/BackendResult_c0ff465141" }, { "$ref": "#/$defs/McpUnhandledFailure_fcecd3763a" }] } },
1275
+ "properties": { "backendResult": { "anyOf": [{ "$ref": "#/$defs/BackendResult_9ce39ecd14" }, { "$ref": "#/$defs/McpUnhandledFailure_fcecd3763a" }] } },
1405
1276
  "required": ["backendResult"],
1406
1277
  "additionalProperties": false
1407
1278
  },
@@ -1411,10 +1282,10 @@ const CONTRACT_SNAPSHOT = {
1411
1282
  "cli": {
1412
1283
  "publish": { "$ref": "#/$defs/CliEnvelope_605d1f5dcd" },
1413
1284
  "validate": { "$ref": "#/$defs/CliEnvelope_dde966be7c" },
1285
+ "restore": { "$ref": "#/$defs/CliEnvelope_a2522f4864" },
1414
1286
  "ofgui": { "$ref": "#/$defs/CliEnvelope_e114e8964e" },
1415
1287
  "docs": { "$ref": "#/$defs/CliEnvelope_9749346e3a" },
1416
1288
  "inspect": { "$ref": "#/$defs/CliEnvelope_54f391b1e9" },
1417
- "restore": { "$ref": "#/$defs/CliEnvelope_a2522f4864" },
1418
1289
  "doctor": { "$ref": "#/$defs/CliEnvelope_5faeabe7ff" },
1419
1290
  "backend-capabilities": { "$ref": "#/$defs/CliEnvelope_708c085e05" },
1420
1291
  "docs ls": { "$ref": "#/$defs/CliEnvelope_6fb21a60c4" },
@@ -7257,11 +7128,11 @@ const CONTRACT_SNAPSHOT = {
7257
7128
  ] },
7258
7129
  "contractVersion": {
7259
7130
  "type": "string",
7260
- "const": "2.0.0-p3"
7131
+ "const": "3.0.0"
7261
7132
  },
7262
7133
  "capabilitySchemaVersion": {
7263
7134
  "type": "number",
7264
- "const": 11
7135
+ "const": 12
7265
7136
  }
7266
7137
  },
7267
7138
  "required": [
@@ -7381,6 +7252,7 @@ const CONTRACT_SNAPSHOT = {
7381
7252
  "execution_failure",
7382
7253
  "path_policy_violation",
7383
7254
  "session_not_found",
7255
+ "session_close_failed",
7384
7256
  "transaction_preview_failed",
7385
7257
  "entity_query_failed",
7386
7258
  "session_read_failed",
@@ -7393,10 +7265,6 @@ const CONTRACT_SNAPSHOT = {
7393
7265
  "materialize_validation_failed",
7394
7266
  "write_failed",
7395
7267
  "event_cursor_invalid",
7396
- "job_not_found",
7397
- "job_not_cancellable",
7398
- "job_cancelled",
7399
- "cache_refresh_failed",
7400
7268
  "capability_unavailable",
7401
7269
  "project_root_not_allowed",
7402
7270
  "project_open_failed"
@@ -7531,11 +7399,11 @@ const CONTRACT_SNAPSHOT = {
7531
7399
  "properties": {
7532
7400
  "contractVersion": {
7533
7401
  "type": "string",
7534
- "const": "2.0.0-p3"
7402
+ "const": "3.0.0"
7535
7403
  },
7536
7404
  "capabilitySchemaVersion": {
7537
7405
  "type": "number",
7538
- "const": 11
7406
+ "const": 12
7539
7407
  },
7540
7408
  "transactionKernelOwner": {
7541
7409
  "type": "string",
@@ -7549,13 +7417,13 @@ const CONTRACT_SNAPSHOT = {
7549
7417
  "type": "string",
7550
7418
  "const": "@openfairygui/backend"
7551
7419
  },
7552
- "methods": { "$ref": "#/$defs/Shape_e30134abaa" },
7420
+ "methods": { "$ref": "#/$defs/Shape_ae72a55d5a" },
7553
7421
  "read": { "$ref": "#/$defs/__type_81b96969f6" },
7554
7422
  "authoring": { "$ref": "#/$defs/__type_cea960ae37" },
7555
7423
  "artifact": { "$ref": "#/$defs/__type_c24c67cf7f" },
7556
7424
  "manifest": { "$ref": "#/$defs/BackendCapabilityManifest_0ee177a0c0" },
7557
7425
  "compatibilityPolicy": { "$ref": "#/$defs/__object_c0c6c6fd1f" },
7558
- "runtime": { "$ref": "#/$defs/__type_6f3fcdb30d" }
7426
+ "runtime": { "$ref": "#/$defs/__type_b85cdf481a" }
7559
7427
  },
7560
7428
  "required": [
7561
7429
  "contractVersion",
@@ -7573,7 +7441,7 @@ const CONTRACT_SNAPSHOT = {
7573
7441
  ],
7574
7442
  "additionalProperties": false
7575
7443
  },
7576
- "Shape_e30134abaa": {
7444
+ "Shape_ae72a55d5a": {
7577
7445
  "type": "array",
7578
7446
  "prefixItems": [
7579
7447
  {
@@ -7636,18 +7504,6 @@ const CONTRACT_SNAPSHOT = {
7636
7504
  "type": "string",
7637
7505
  "const": "getEvents"
7638
7506
  },
7639
- {
7640
- "type": "string",
7641
- "const": "getJob"
7642
- },
7643
- {
7644
- "type": "string",
7645
- "const": "listJobs"
7646
- },
7647
- {
7648
- "type": "string",
7649
- "const": "cancelJob"
7650
- },
7651
7507
  {
7652
7508
  "type": "string",
7653
7509
  "const": "getCacheSnapshot"
@@ -7657,8 +7513,8 @@ const CONTRACT_SNAPSHOT = {
7657
7513
  "const": "refreshCache"
7658
7514
  }
7659
7515
  ],
7660
- "minItems": 20,
7661
- "maxItems": 20,
7516
+ "minItems": 17,
7517
+ "maxItems": 17,
7662
7518
  "items": false
7663
7519
  },
7664
7520
  "__type_81b96969f6": {
@@ -8182,7 +8038,7 @@ const CONTRACT_SNAPSHOT = {
8182
8038
  ],
8183
8039
  "additionalProperties": false
8184
8040
  },
8185
- "__type_6f3fcdb30d": {
8041
+ "__type_b85cdf481a": {
8186
8042
  "type": "object",
8187
8043
  "properties": {
8188
8044
  "sessionRuntime": {
@@ -8204,8 +8060,7 @@ const CONTRACT_SNAPSHOT = {
8204
8060
  },
8205
8061
  "pathPolicy": { "$ref": "#/$defs/__type_ac106f3246" },
8206
8062
  "events": { "$ref": "#/$defs/__type_95a4d6b6f7" },
8207
- "jobs": { "$ref": "#/$defs/__type_8501cb15df" },
8208
- "cache": { "$ref": "#/$defs/__type_b3bf9852d7" }
8063
+ "cache": { "$ref": "#/$defs/__type_5cd47c93eb" }
8209
8064
  },
8210
8065
  "required": [
8211
8066
  "sessionRuntime",
@@ -8215,7 +8070,6 @@ const CONTRACT_SNAPSHOT = {
8215
8070
  "staleRevisionProtection",
8216
8071
  "pathPolicy",
8217
8072
  "events",
8218
- "jobs",
8219
8073
  "cache"
8220
8074
  ],
8221
8075
  "additionalProperties": false
@@ -8281,51 +8135,7 @@ const CONTRACT_SNAPSHOT = {
8281
8135
  ],
8282
8136
  "additionalProperties": false
8283
8137
  },
8284
- "__type_8501cb15df": {
8285
- "type": "object",
8286
- "properties": {
8287
- "inMemory": {
8288
- "type": "boolean",
8289
- "const": true
8290
- },
8291
- "cooperativeCancel": {
8292
- "type": "boolean",
8293
- "const": true
8294
- },
8295
- "persistent": {
8296
- "type": "boolean",
8297
- "const": false
8298
- },
8299
- "supportedKinds": { "$ref": "#/$defs/Shape_d356aad25c" },
8300
- "artifactJobs": {
8301
- "type": "boolean",
8302
- "const": false
8303
- },
8304
- "completedRetentionLimit": {
8305
- "type": "number",
8306
- "const": 100
8307
- }
8308
- },
8309
- "required": [
8310
- "inMemory",
8311
- "cooperativeCancel",
8312
- "persistent",
8313
- "supportedKinds",
8314
- "artifactJobs",
8315
- "completedRetentionLimit"
8316
- ],
8317
- "additionalProperties": false
8318
- },
8319
- "Shape_d356aad25c": {
8320
- "type": "array",
8321
- "minItems": 1,
8322
- "maxItems": 1,
8323
- "items": {
8324
- "type": "string",
8325
- "const": "cache.refresh"
8326
- }
8327
- },
8328
- "__type_b3bf9852d7": {
8138
+ "__type_5cd47c93eb": {
8329
8139
  "type": "object",
8330
8140
  "properties": {
8331
8141
  "derivedReadOnly": {
@@ -8334,7 +8144,11 @@ const CONTRACT_SNAPSHOT = {
8334
8144
  },
8335
8145
  "keyedBy": {
8336
8146
  "type": "string",
8337
- "const": "canonicalPathKey"
8147
+ "const": "sessionId"
8148
+ },
8149
+ "refreshMode": {
8150
+ "type": "string",
8151
+ "const": "synchronous"
8338
8152
  },
8339
8153
  "sourceOfTruth": {
8340
8154
  "type": "boolean",
@@ -8348,6 +8162,7 @@ const CONTRACT_SNAPSHOT = {
8348
8162
  "required": [
8349
8163
  "derivedReadOnly",
8350
8164
  "keyedBy",
8165
+ "refreshMode",
8351
8166
  "sourceOfTruth",
8352
8167
  "refreshMethod"
8353
8168
  ],
@@ -8479,9 +8294,9 @@ const CONTRACT_SNAPSHOT = {
8479
8294
  },
8480
8295
  "message": { "type": "string" },
8481
8296
  "capability": { "enum": [
8482
- "fileSystem",
8483
8297
  "artifact.publish",
8484
- "artifact.restore"
8298
+ "artifact.restore",
8299
+ "fileSystem"
8485
8300
  ] },
8486
8301
  "requiredAdapter": {
8487
8302
  "type": "string",
@@ -9488,9 +9303,9 @@ const CONTRACT_SNAPSHOT = {
9488
9303
  "readComplete": { "type": "boolean" },
9489
9304
  "sessionId": { "type": "string" },
9490
9305
  "revision": { "type": "number" },
9491
- "uamFidelity": { "enum": ["full", "unsupported"] },
9492
9306
  "lastSavedRevision": { "type": "number" },
9493
- "dirty": { "type": "boolean" }
9307
+ "dirty": { "type": "boolean" },
9308
+ "uamFidelity": { "enum": ["full", "unsupported"] }
9494
9309
  },
9495
9310
  "required": [
9496
9311
  "project",
@@ -9498,9 +9313,9 @@ const CONTRACT_SNAPSHOT = {
9498
9313
  "readComplete",
9499
9314
  "sessionId",
9500
9315
  "revision",
9501
- "uamFidelity",
9502
9316
  "lastSavedRevision",
9503
- "dirty"
9317
+ "dirty",
9318
+ "uamFidelity"
9504
9319
  ],
9505
9320
  "additionalProperties": false
9506
9321
  },
@@ -10623,7 +10438,8 @@ const CONTRACT_SNAPSHOT = {
10623
10438
  "lastSavedRevision": { "type": "number" },
10624
10439
  "committedPaths": { "$ref": "#/$defs/Array_5444db1618" },
10625
10440
  "failedPaths": { "$ref": "#/$defs/Array_5444db1618" },
10626
- "diskMayBePartiallyUpdated": { "type": "boolean" }
10441
+ "diskMayBePartiallyUpdated": { "type": "boolean" },
10442
+ "recoveryPaths": { "$ref": "#/$defs/Array_5444db1618" }
10627
10443
  },
10628
10444
  "required": [
10629
10445
  "code",
@@ -10696,7 +10512,8 @@ const CONTRACT_SNAPSHOT = {
10696
10512
  "failedPaths": { "$ref": "#/$defs/Array_5444db1618" },
10697
10513
  "skippedPaths": { "$ref": "#/$defs/Array_5444db1618" },
10698
10514
  "diagnostics": { "$ref": "#/$defs/Array_ac22034604" },
10699
- "diskMayBePartiallyUpdated": { "type": "boolean" }
10515
+ "diskMayBePartiallyUpdated": { "type": "boolean" },
10516
+ "recoveryPaths": { "$ref": "#/$defs/Array_5444db1618" }
10700
10517
  },
10701
10518
  "required": [
10702
10519
  "code",
@@ -10759,7 +10576,45 @@ const CONTRACT_SNAPSHOT = {
10759
10576
  { "$ref": "#/$defs/MaterializeWriteFailedError_886435525e" },
10760
10577
  { "$ref": "#/$defs/BackendCapabilityUnavailableError_abe9cad766" }
10761
10578
  ] },
10762
- "BackendResult_0bdb207dae": { "anyOf": [{ "$ref": "#/$defs/BackendFailure_4a72809733" }, { "$ref": "#/$defs/BackendSuccess_a36da64ce4" }] },
10579
+ "BackendResult_01bd3005ba": { "anyOf": [{ "$ref": "#/$defs/BackendFailure_44bf2b498a" }, { "$ref": "#/$defs/BackendSuccess_a36da64ce4" }] },
10580
+ "BackendFailure_44bf2b498a": {
10581
+ "type": "object",
10582
+ "properties": {
10583
+ "ok": {
10584
+ "type": "boolean",
10585
+ "const": false
10586
+ },
10587
+ "meta": { "$ref": "#/$defs/BackendResponseMeta_bbbdb18c02" },
10588
+ "error": { "$ref": "#/$defs/Shape_387b06a626" },
10589
+ "session": { "$ref": "#/$defs/BackendSessionSnapshot_e59c685fc8" }
10590
+ },
10591
+ "required": [
10592
+ "ok",
10593
+ "meta",
10594
+ "error"
10595
+ ],
10596
+ "additionalProperties": false
10597
+ },
10598
+ "Shape_387b06a626": { "anyOf": [{ "$ref": "#/$defs/SessionNotFoundError_878fae4543" }, { "$ref": "#/$defs/SessionCloseFailedError_a32cd3d7ef" }] },
10599
+ "SessionCloseFailedError_a32cd3d7ef": {
10600
+ "type": "object",
10601
+ "properties": {
10602
+ "code": {
10603
+ "type": "string",
10604
+ "const": "session_close_failed"
10605
+ },
10606
+ "message": { "type": "string" },
10607
+ "sessionId": { "type": "string" },
10608
+ "lockFilePath": { "type": "string" }
10609
+ },
10610
+ "required": [
10611
+ "code",
10612
+ "message",
10613
+ "sessionId",
10614
+ "lockFilePath"
10615
+ ],
10616
+ "additionalProperties": false
10617
+ },
10763
10618
  "BackendSuccess_a36da64ce4": {
10764
10619
  "type": "object",
10765
10620
  "properties": {
@@ -10841,21 +10696,13 @@ const CONTRACT_SNAPSHOT = {
10841
10696
  "session.closeRequested",
10842
10697
  "session.closed",
10843
10698
  "cache.invalidated",
10844
- "cache.updated",
10845
- "job.created",
10846
- "job.started",
10847
- "job.progress",
10848
- "job.cancelRequested",
10849
- "job.cancelled",
10850
- "job.completed",
10851
- "job.failed"
10699
+ "cache.updated"
10852
10700
  ] },
10853
10701
  "timestamp": { "type": "string" },
10854
10702
  "sessionId": { "type": "string" },
10855
10703
  "canonicalPathKey": { "type": "string" },
10856
10704
  "revision": { "type": "number" },
10857
10705
  "cacheRevision": { "type": "number" },
10858
- "jobId": { "type": "string" },
10859
10706
  "diagnostics": { "$ref": "#/$defs/Array_ac22034604" },
10860
10707
  "payload": {}
10861
10708
  },
@@ -10905,8 +10752,8 @@ const CONTRACT_SNAPSHOT = {
10905
10752
  ],
10906
10753
  "additionalProperties": false
10907
10754
  },
10908
- "BackendResult_6867f7c186": { "anyOf": [{ "$ref": "#/$defs/BackendSuccess_18811b74a4" }, { "$ref": "#/$defs/BackendFailure_9d569392b6" }] },
10909
- "BackendSuccess_18811b74a4": {
10755
+ "BackendResult_9ce39ecd14": { "anyOf": [{ "$ref": "#/$defs/BackendFailure_4a72809733" }, { "$ref": "#/$defs/BackendSuccess_31cc9fb020" }] },
10756
+ "BackendSuccess_31cc9fb020": {
10910
10757
  "type": "object",
10911
10758
  "properties": {
10912
10759
  "ok": {
@@ -10914,7 +10761,7 @@ const CONTRACT_SNAPSHOT = {
10914
10761
  "const": true
10915
10762
  },
10916
10763
  "meta": { "$ref": "#/$defs/BackendResponseMeta_bbbdb18c02" },
10917
- "data": { "$ref": "#/$defs/BackendJobSnapshot_2b82742685" }
10764
+ "data": { "$ref": "#/$defs/BackendCacheSnapshot_e50c46374b" }
10918
10765
  },
10919
10766
  "required": [
10920
10767
  "ok",
@@ -10923,286 +10770,43 @@ const CONTRACT_SNAPSHOT = {
10923
10770
  ],
10924
10771
  "additionalProperties": false
10925
10772
  },
10926
- "BackendJobSnapshot_2b82742685": {
10773
+ "BackendCacheSnapshot_e50c46374b": {
10927
10774
  "type": "object",
10928
10775
  "properties": {
10929
- "jobId": { "type": "string" },
10930
- "kind": {
10931
- "type": "string",
10932
- "const": "cache.refresh"
10933
- },
10934
- "status": { "enum": [
10935
- "failed",
10936
- "completed",
10937
- "running",
10938
- "queued",
10939
- "cancelled"
10940
- ] },
10941
- "createdAt": { "type": "string" },
10942
- "startedAt": { "type": "string" },
10943
- "finishedAt": { "type": "string" },
10944
- "sessionId": { "type": "string" },
10945
- "canonicalPathKey": { "type": "string" },
10946
- "revision": { "type": "number" },
10947
10776
  "cacheRevision": { "type": "number" },
10948
- "diagnostics": { "$ref": "#/$defs/Array_ac22034604" },
10949
- "progress": { "$ref": "#/$defs/BackendJobProgress_f7c2c47d75" },
10950
- "result": {},
10951
- "error": { "$ref": "#/$defs/Shape_11316b9910" }
10777
+ "entries": { "$ref": "#/$defs/Array_d53b7552d7" }
10952
10778
  },
10953
- "required": [
10954
- "jobId",
10955
- "kind",
10956
- "status",
10957
- "createdAt",
10958
- "diagnostics"
10959
- ],
10779
+ "required": ["cacheRevision", "entries"],
10960
10780
  "additionalProperties": false
10961
10781
  },
10962
- "BackendJobProgress_f7c2c47d75": {
10963
- "type": "object",
10964
- "properties": {
10965
- "completed": { "type": "number" },
10966
- "total": { "type": "number" },
10967
- "message": { "type": "string" }
10968
- },
10969
- "required": ["completed"],
10970
- "additionalProperties": false
10782
+ "Array_d53b7552d7": {
10783
+ "type": "array",
10784
+ "items": { "$ref": "#/$defs/BackendCacheEntry_0eb97be767" }
10971
10785
  },
10972
- "Shape_11316b9910": { "anyOf": [
10973
- { "$ref": "#/$defs/ApplyUamTransactionAppError_af2a5ddf50" },
10974
- { "$ref": "#/$defs/PathPolicyViolationError_18840ac3f7" },
10975
- { "$ref": "#/$defs/SessionNotFoundError_878fae4543" },
10976
- { "$ref": "#/$defs/TransactionPreviewError_5424ca8f17" },
10977
- { "$ref": "#/$defs/EntityQueryError_5b50efde28" },
10978
- { "$ref": "#/$defs/SessionReadError_ae519948af" },
10979
- { "$ref": "#/$defs/SessionStaleReadError_ebb253f443" },
10980
- { "$ref": "#/$defs/SessionIdConflictError_e0a264826e" },
10981
- { "$ref": "#/$defs/SessionStaleWriteError_4120bade9d" },
10982
- { "$ref": "#/$defs/InProcessLockConflictError_8019d8ab87" },
10983
- { "$ref": "#/$defs/AdvisoryLockConflictError_babfc4d747" },
10984
- { "$ref": "#/$defs/SavePartialFailureError_ed894aecf1" },
10985
- { "$ref": "#/$defs/UamFidelityUnsupportedError_5d35d9b9da" },
10986
- { "$ref": "#/$defs/MaterializeValidationFailedError_8e1dfdb713" },
10987
- { "$ref": "#/$defs/MaterializeWriteFailedError_886435525e" },
10988
- { "$ref": "#/$defs/EventCursorInvalidError_a59b20e40d" },
10989
- { "$ref": "#/$defs/BackendJobNotFoundError_371ea4de62" },
10990
- { "$ref": "#/$defs/BackendJobNotCancellableError_e8ca5b5a59" },
10991
- { "$ref": "#/$defs/BackendJobCancelledError_78b983814a" },
10992
- { "$ref": "#/$defs/CacheRefreshFailedError_affe707933" },
10993
- { "$ref": "#/$defs/BackendCapabilityUnavailableError_abe9cad766" },
10994
- { "$ref": "#/$defs/ProjectRootNotAllowedError_91f44c66e5" },
10995
- { "$ref": "#/$defs/ProjectOpenFailedError_63603bdf5c" }
10996
- ] },
10997
- "BackendJobNotFoundError_371ea4de62": {
10786
+ "BackendCacheEntry_0eb97be767": {
10998
10787
  "type": "object",
10999
10788
  "properties": {
11000
- "code": {
11001
- "type": "string",
11002
- "const": "job_not_found"
11003
- },
11004
- "message": { "type": "string" },
10789
+ "canonicalPathKey": { "type": "string" },
11005
10790
  "sessionId": { "type": "string" },
11006
- "jobId": { "type": "string" }
10791
+ "revision": { "type": "number" },
10792
+ "lastSavedRevision": { "type": "number" },
10793
+ "dirty": { "type": "boolean" },
10794
+ "valid": { "type": "boolean" },
10795
+ "indexedAt": { "type": "string" },
10796
+ "summary": { "$ref": "#/$defs/__type_92b115253d" }
11007
10797
  },
11008
10798
  "required": [
11009
- "code",
11010
- "message",
11011
- "sessionId",
11012
- "jobId"
10799
+ "canonicalPathKey",
10800
+ "revision",
10801
+ "lastSavedRevision",
10802
+ "dirty",
10803
+ "valid",
10804
+ "indexedAt",
10805
+ "summary"
11013
10806
  ],
11014
10807
  "additionalProperties": false
11015
10808
  },
11016
- "BackendJobNotCancellableError_e8ca5b5a59": {
11017
- "type": "object",
11018
- "properties": {
11019
- "code": {
11020
- "type": "string",
11021
- "const": "job_not_cancellable"
11022
- },
11023
- "message": { "type": "string" },
11024
- "sessionId": { "type": "string" },
11025
- "jobId": { "type": "string" },
11026
- "status": { "enum": [
11027
- "failed",
11028
- "completed",
11029
- "cancelled"
11030
- ] }
11031
- },
11032
- "required": [
11033
- "code",
11034
- "message",
11035
- "sessionId",
11036
- "jobId",
11037
- "status"
11038
- ],
11039
- "additionalProperties": false
11040
- },
11041
- "BackendJobCancelledError_78b983814a": {
11042
- "type": "object",
11043
- "properties": {
11044
- "code": {
11045
- "type": "string",
11046
- "const": "job_cancelled"
11047
- },
11048
- "message": { "type": "string" },
11049
- "sessionId": { "type": "string" },
11050
- "jobId": { "type": "string" }
11051
- },
11052
- "required": [
11053
- "code",
11054
- "message",
11055
- "sessionId",
11056
- "jobId"
11057
- ],
11058
- "additionalProperties": false
11059
- },
11060
- "CacheRefreshFailedError_affe707933": {
11061
- "type": "object",
11062
- "properties": {
11063
- "code": {
11064
- "type": "string",
11065
- "const": "cache_refresh_failed"
11066
- },
11067
- "message": { "type": "string" },
11068
- "sessionId": { "type": "string" },
11069
- "jobId": { "type": "string" },
11070
- "causeCode": { "type": "string" }
11071
- },
11072
- "required": [
11073
- "code",
11074
- "message",
11075
- "sessionId",
11076
- "jobId"
11077
- ],
11078
- "additionalProperties": false
11079
- },
11080
- "BackendFailure_9d569392b6": {
11081
- "type": "object",
11082
- "properties": {
11083
- "ok": {
11084
- "type": "boolean",
11085
- "const": false
11086
- },
11087
- "meta": { "$ref": "#/$defs/BackendResponseMeta_bbbdb18c02" },
11088
- "error": { "$ref": "#/$defs/Shape_9759774074" },
11089
- "session": { "$ref": "#/$defs/BackendSessionSnapshot_e59c685fc8" }
11090
- },
11091
- "required": [
11092
- "ok",
11093
- "meta",
11094
- "error"
11095
- ],
11096
- "additionalProperties": false
11097
- },
11098
- "Shape_9759774074": { "anyOf": [{ "$ref": "#/$defs/SessionNotFoundError_878fae4543" }, { "$ref": "#/$defs/BackendJobNotFoundError_371ea4de62" }] },
11099
- "BackendResult_fea5a3c6da": { "anyOf": [{ "$ref": "#/$defs/BackendFailure_4a72809733" }, { "$ref": "#/$defs/BackendSuccess_a062422afa" }] },
11100
- "BackendSuccess_a062422afa": {
11101
- "type": "object",
11102
- "properties": {
11103
- "ok": {
11104
- "type": "boolean",
11105
- "const": true
11106
- },
11107
- "meta": { "$ref": "#/$defs/BackendResponseMeta_bbbdb18c02" },
11108
- "data": { "$ref": "#/$defs/BackendJobListSnapshot_f7668efb57" }
11109
- },
11110
- "required": [
11111
- "ok",
11112
- "meta",
11113
- "data"
11114
- ],
11115
- "additionalProperties": false
11116
- },
11117
- "BackendJobListSnapshot_f7668efb57": {
11118
- "type": "object",
11119
- "properties": { "jobs": { "$ref": "#/$defs/Array_0a293bd952" } },
11120
- "required": ["jobs"],
11121
- "additionalProperties": false
11122
- },
11123
- "Array_0a293bd952": {
11124
- "type": "array",
11125
- "items": { "$ref": "#/$defs/BackendJobSnapshot_2b82742685" }
11126
- },
11127
- "BackendResult_fb76e59f94": { "anyOf": [{ "$ref": "#/$defs/BackendSuccess_18811b74a4" }, { "$ref": "#/$defs/BackendFailure_618b0636be" }] },
11128
- "BackendFailure_618b0636be": {
11129
- "type": "object",
11130
- "properties": {
11131
- "ok": {
11132
- "type": "boolean",
11133
- "const": false
11134
- },
11135
- "meta": { "$ref": "#/$defs/BackendResponseMeta_bbbdb18c02" },
11136
- "error": { "$ref": "#/$defs/Shape_0c298f9d73" },
11137
- "session": { "$ref": "#/$defs/BackendSessionSnapshot_e59c685fc8" }
11138
- },
11139
- "required": [
11140
- "ok",
11141
- "meta",
11142
- "error"
11143
- ],
11144
- "additionalProperties": false
11145
- },
11146
- "Shape_0c298f9d73": { "anyOf": [
11147
- { "$ref": "#/$defs/SessionNotFoundError_878fae4543" },
11148
- { "$ref": "#/$defs/BackendJobNotFoundError_371ea4de62" },
11149
- { "$ref": "#/$defs/BackendJobNotCancellableError_e8ca5b5a59" }
11150
- ] },
11151
- "BackendResult_9ce39ecd14": { "anyOf": [{ "$ref": "#/$defs/BackendSuccess_31cc9fb020" }, { "$ref": "#/$defs/BackendFailure_4a72809733" }] },
11152
- "BackendSuccess_31cc9fb020": {
11153
- "type": "object",
11154
- "properties": {
11155
- "ok": {
11156
- "type": "boolean",
11157
- "const": true
11158
- },
11159
- "meta": { "$ref": "#/$defs/BackendResponseMeta_bbbdb18c02" },
11160
- "data": { "$ref": "#/$defs/BackendCacheSnapshot_e50c46374b" }
11161
- },
11162
- "required": [
11163
- "ok",
11164
- "meta",
11165
- "data"
11166
- ],
11167
- "additionalProperties": false
11168
- },
11169
- "BackendCacheSnapshot_e50c46374b": {
11170
- "type": "object",
11171
- "properties": {
11172
- "cacheRevision": { "type": "number" },
11173
- "entries": { "$ref": "#/$defs/Array_d53b7552d7" }
11174
- },
11175
- "required": ["cacheRevision", "entries"],
11176
- "additionalProperties": false
11177
- },
11178
- "Array_d53b7552d7": {
11179
- "type": "array",
11180
- "items": { "$ref": "#/$defs/BackendCacheEntry_0eb97be767" }
11181
- },
11182
- "BackendCacheEntry_0eb97be767": {
11183
- "type": "object",
11184
- "properties": {
11185
- "canonicalPathKey": { "type": "string" },
11186
- "sessionId": { "type": "string" },
11187
- "revision": { "type": "number" },
11188
- "lastSavedRevision": { "type": "number" },
11189
- "dirty": { "type": "boolean" },
11190
- "valid": { "type": "boolean" },
11191
- "indexedAt": { "type": "string" },
11192
- "summary": { "$ref": "#/$defs/__type_92b115253d" }
11193
- },
11194
- "required": [
11195
- "canonicalPathKey",
11196
- "revision",
11197
- "lastSavedRevision",
11198
- "dirty",
11199
- "valid",
11200
- "indexedAt",
11201
- "summary"
11202
- ],
11203
- "additionalProperties": false
11204
- },
11205
- "__type_92b115253d": {
10809
+ "__type_92b115253d": {
11206
10810
  "type": "object",
11207
10811
  "properties": {
11208
10812
  "resourceCount": { "type": "number" },
@@ -11212,7 +10816,6 @@ const CONTRACT_SNAPSHOT = {
11212
10816
  "required": ["resourceCount", "diagnostics"],
11213
10817
  "additionalProperties": false
11214
10818
  },
11215
- "BackendResult_c0ff465141": { "anyOf": [{ "$ref": "#/$defs/BackendFailure_4a72809733" }, { "$ref": "#/$defs/BackendSuccess_18811b74a4" }] },
11216
10819
  "BackendSessionProjectModel_6724369185_read": {
11217
10820
  "type": "object",
11218
10821
  "properties": {
@@ -14779,6 +14382,72 @@ const CONTRACT_SNAPSHOT = {
14779
14382
  ],
14780
14383
  "additionalProperties": false
14781
14384
  },
14385
+ "CliEnvelope_a2522f4864": { "anyOf": [{ "$ref": "#/$defs/__type_b6b531a0e9" }, { "$ref": "#/$defs/__type_215ae441f7" }] },
14386
+ "__type_b6b531a0e9": {
14387
+ "type": "object",
14388
+ "properties": {
14389
+ "schemaVersion": {
14390
+ "type": "number",
14391
+ "const": 1
14392
+ },
14393
+ "command": {
14394
+ "type": "string",
14395
+ "const": "restore"
14396
+ },
14397
+ "success": {
14398
+ "type": "boolean",
14399
+ "const": true
14400
+ },
14401
+ "result": { "$ref": "#/$defs/__type_2f01710413" }
14402
+ },
14403
+ "required": [
14404
+ "schemaVersion",
14405
+ "command",
14406
+ "success",
14407
+ "result"
14408
+ ],
14409
+ "additionalProperties": false
14410
+ },
14411
+ "__type_2f01710413": {
14412
+ "type": "object",
14413
+ "properties": {
14414
+ "projectPath": { "type": "string" },
14415
+ "packages": { "$ref": "#/$defs/Array_3ee146c367" },
14416
+ "warnings": { "$ref": "#/$defs/Array_5444db1618" }
14417
+ },
14418
+ "required": [
14419
+ "projectPath",
14420
+ "packages",
14421
+ "warnings"
14422
+ ],
14423
+ "additionalProperties": false
14424
+ },
14425
+ "__type_215ae441f7": {
14426
+ "type": "object",
14427
+ "properties": {
14428
+ "schemaVersion": {
14429
+ "type": "number",
14430
+ "const": 1
14431
+ },
14432
+ "command": {
14433
+ "type": "string",
14434
+ "const": "restore"
14435
+ },
14436
+ "success": {
14437
+ "type": "boolean",
14438
+ "const": false
14439
+ },
14440
+ "error": { "$ref": "#/$defs/CliError_53076daab4" },
14441
+ "result": { "$ref": "#/$defs/__type_2f01710413" }
14442
+ },
14443
+ "required": [
14444
+ "schemaVersion",
14445
+ "command",
14446
+ "success",
14447
+ "error"
14448
+ ],
14449
+ "additionalProperties": false
14450
+ },
14782
14451
  "CliEnvelope_e114e8964e": { "anyOf": [{ "$ref": "#/$defs/__type_5c642f8bd3" }, { "$ref": "#/$defs/__type_c094f5ecce" }] },
14783
14452
  "__type_5c642f8bd3": {
14784
14453
  "type": "object",
@@ -15067,72 +14736,6 @@ const CONTRACT_SNAPSHOT = {
15067
14736
  ],
15068
14737
  "additionalProperties": false
15069
14738
  },
15070
- "CliEnvelope_a2522f4864": { "anyOf": [{ "$ref": "#/$defs/__type_b6b531a0e9" }, { "$ref": "#/$defs/__type_215ae441f7" }] },
15071
- "__type_b6b531a0e9": {
15072
- "type": "object",
15073
- "properties": {
15074
- "schemaVersion": {
15075
- "type": "number",
15076
- "const": 1
15077
- },
15078
- "command": {
15079
- "type": "string",
15080
- "const": "restore"
15081
- },
15082
- "success": {
15083
- "type": "boolean",
15084
- "const": true
15085
- },
15086
- "result": { "$ref": "#/$defs/__type_2f01710413" }
15087
- },
15088
- "required": [
15089
- "schemaVersion",
15090
- "command",
15091
- "success",
15092
- "result"
15093
- ],
15094
- "additionalProperties": false
15095
- },
15096
- "__type_2f01710413": {
15097
- "type": "object",
15098
- "properties": {
15099
- "projectPath": { "type": "string" },
15100
- "packages": { "$ref": "#/$defs/Array_3ee146c367" },
15101
- "warnings": { "$ref": "#/$defs/Array_5444db1618" }
15102
- },
15103
- "required": [
15104
- "projectPath",
15105
- "packages",
15106
- "warnings"
15107
- ],
15108
- "additionalProperties": false
15109
- },
15110
- "__type_215ae441f7": {
15111
- "type": "object",
15112
- "properties": {
15113
- "schemaVersion": {
15114
- "type": "number",
15115
- "const": 1
15116
- },
15117
- "command": {
15118
- "type": "string",
15119
- "const": "restore"
15120
- },
15121
- "success": {
15122
- "type": "boolean",
15123
- "const": false
15124
- },
15125
- "error": { "$ref": "#/$defs/CliError_53076daab4" },
15126
- "result": { "$ref": "#/$defs/__type_2f01710413" }
15127
- },
15128
- "required": [
15129
- "schemaVersion",
15130
- "command",
15131
- "success",
15132
- "error"
15133
- ],
15134
- "additionalProperties": false
15135
- },
15136
14739
  "CliEnvelope_5faeabe7ff": { "anyOf": [{ "$ref": "#/$defs/__type_a23bb2b7d7" }, { "$ref": "#/$defs/__type_3fff4b68d6" }] },
15137
14740
  "__type_a23bb2b7d7": {
15138
14741
  "type": "object",
@@ -15731,6 +15334,14 @@ const CONTRACT_SNAPSHOT = {
15731
15334
  "message": "Ask the host to confirm the runtime and project, recover any unsaved state, then explicitly open a new session if appropriate. Session IDs are runtime-local. Read its new revision and replan; never reuse an expired session or assume disk contains unsaved changes."
15732
15335
  }
15733
15336
  },
15337
+ {
15338
+ "code": "session_close_failed",
15339
+ "owners": ["backend"],
15340
+ "remediation": {
15341
+ "kind": "host-action",
15342
+ "message": "The session and lock ownership remain registered. Inspect the reported lock release failure, correct the storage problem, then retry closeSession with the same session ID. Do not remove the lock file or open a replacement session to bypass the owner."
15343
+ }
15344
+ },
15734
15345
  {
15735
15346
  "code": "path_policy_violation",
15736
15347
  "owners": ["backend"],
@@ -16482,53 +16093,21 @@ const CONTRACT_SNAPSHOT = {
16482
16093
  "kind": "host-action",
16483
16094
  "message": "Inspect the execution/cache failure and current session/revision. Preserve sources and unsaved work and report the cause to the host. Replan after resolution; failed execution or cache work is not a completed edit."
16484
16095
  }
16485
- },
16486
- {
16487
- "code": "cache_refresh_failed",
16488
- "owners": ["backend"],
16489
- "remediation": {
16490
- "kind": "host-action",
16491
- "message": "Inspect the execution/cache failure and current session/revision. Preserve sources and unsaved work and report the cause to the host. Replan after resolution; failed execution or cache work is not a completed edit."
16492
- }
16493
- },
16494
- {
16495
- "code": "job_not_found",
16496
- "owners": ["backend"],
16497
- "remediation": {
16498
- "kind": "host-action",
16499
- "message": "Inspect the job ID and status with getJob/listJobs. Do not fabricate, restart or force-cancel a missing, terminal or non-cancellable job. Ask the host before scheduling new work; cancellation is not success."
16500
- }
16501
- },
16502
- {
16503
- "code": "job_not_cancellable",
16504
- "owners": ["backend"],
16505
- "remediation": {
16506
- "kind": "host-action",
16507
- "message": "Inspect the job ID and status with getJob/listJobs. Do not fabricate, restart or force-cancel a missing, terminal or non-cancellable job. Ask the host before scheduling new work; cancellation is not success."
16508
- }
16509
- },
16510
- {
16511
- "code": "job_cancelled",
16512
- "owners": ["backend"],
16513
- "remediation": {
16514
- "kind": "host-action",
16515
- "message": "Inspect the job ID and status with getJob/listJobs. Do not fabricate, restart or force-cancel a missing, terminal or non-cancellable job. Ask the host before scheduling new work; cancellation is not success."
16516
- }
16517
16096
  }
16518
16097
  ],
16519
- "digest": "cba5c0427b91c5d28c7c4277dcbb4a16f48e9fedf91fa1f66375495f8bfc71b0"
16098
+ "digest": "758763ae4b6724a25a82dc0edbe10c7c13478589bdabf84b847dd2d7b745331d"
16520
16099
  };
16521
16100
  //#endregion
16522
16101
  //#region src/generated/docs.ts
16523
16102
  const INSTALLED_DOCS = {
16524
16103
  "version": {
16525
16104
  "packageName": "@openfairygui/backend",
16526
- "packageVersion": "0.5.0",
16105
+ "packageVersion": "0.6.1",
16527
16106
  "nodeEngine": ">=22",
16528
- "documentationDigest": "243b04dd336b170a7b9b751ac476befa3187e6689d96cd0da33e3472b73fa3ad"
16107
+ "documentationDigest": "694d7761d2f8c2d98aafd826cc354f1909d4675ac86caf05a9bb329f2dd713b2"
16529
16108
  },
16530
16109
  "workflow": "# Installed OpenFairyGUI workflow\n\nThis is a minimal offline companion, not the full website. Read `ofgui docs ls --json` for the installed package version, contract version, capability schema version and digest. Use the project's installed `ofgui`/`ofgui-mcp`, not a global executable or an online latest-version lookup. A mismatched installation must be reconciled by the host before editing.\n\n## Discover the current contract\n\n- `ofgui docs find \"selector\" --json` searches this installed corpus.\n- `ofgui docs cat contracts --json` lists Core operations and Backend/MCP mappings.\n- `ofgui docs schema setDisplayNodeProps --json` reads one self-contained operation schema.\n- `ofgui docs schema cli/validate --json` reads the installed CLI output schema; `cli/docs cat` is a valid exact document ID for the nested command.\n- `ofgui docs cat methods/queryEntity --json` reads precise input/output wire schemas.\n- `ofgui docs diagnostic stale_write --json` reads recovery guidance.\n- MCP `resources/read` at `openfairygui://docs/index` provides the same index and content URIs. MCP is local stdio, not an assumed HTTP port.\n\nThe generated schemas describe JSON wire structure and input budgets, not semantic validity. Native SDK byte fields remain Uint8Array; MCP transports declared byte fields as integer arrays. Arbitrary extension data is not converted. Host objects/functions are omitted from MCP wire schemas; use SDK declarations for host injection, not guessed JSON fields.\n\nMCP allows up to 8 MiB of aggregate byte input at generated byte paths, without applying the general 10000-element array or per-byte node limits. Arbitrary metadata retains general limits. All value-bearing Gear defaults may be null, preserving the owner's initial state when no default override exists; component-instance controllerOverrides retains controller selections.\n\nAll CLI JSON uses `{schemaVersion:1,command,success:true,result}` or `{schemaVersion:1,command,success:false,error:{code,message},result?}`. Documentation version/index/body fields are inside `result`; read `result.text` for document content. Invalid/incomplete validate and doctor responses retain their full report under `result`. Help/version are text; other JSON-mode stdout contains exactly one document and human logs use stderr. Exit codes: 0 success, 1 workflow failure, 2 arguments, 3 incomplete validation. CLI owns envelopes, not new workflow semantics.\n\n## Edit safely\n\n1. Read capabilities. Existing projects use openSession (with host authorization and a lifetime lock); openProjectSession accepts a host-supplied authoritative UAM, not a shortcut around lossy file-session guards.\n2. Read getProjectOutline to discover exact identities, then queryEntity for the relevant current properties and actual revision. Capabilities list the supported read.entityQuery.kinds: project, package, resource, component, displayNode, controller and transition. Project queries use target {kind:\"project\"} without a selector; package queries use {kind:\"package\",selector:{packageId}}. Both return identity and complete entity.properties.settings. Controllers use packageId + componentResourceId + controllerName; transitions use packageId + componentResourceId + transitionName. Names are exact and component-scoped; duplicates fail as ambiguous. Controller snapshots include pages/actions; transition snapshots include items. Gears are already included in displayNode snapshots. Fixed projections exclude source bytes; budget failures require host inspection.\n3. Read the operation and method schemas. Plan the smallest authorized batch using current identifiers and expectedRevision.\n4. preflightTransaction executes on an isolated snapshot and discards it. Inspect projectedRevision, impact.entities (exact identities and changed fields, including reference normalization), impact.files (ProjectWriter model diff, not a disk write plan) and persistence.nextAction. The diff starts at the current revision, not the last save. It contains no source bytes. Summary overflow or serialization failure returns transaction_preview_failed without a partial result. No revision is reserved; writeVerified is always false. It does not save files or guarantee later apply/save/publish.\n5. Only when authorized, applyTransaction with the planned batch and expectedRevision. On stale_write, refresh and replan; never blindly substitute a newer revision.\n6. validateSession checks the new authoritative state. A successful response can contain an invalid or incomplete validation report; require status valid and complete true before treating validation as passed.\n7. When authorized, saveSession checks revision independently and writes the original project only. Keep path policy, UAM fidelity and rollback guards. Close the session only after handling unsaved changes. Read saved output again when disk round-trip is part of acceptance.\n\nPreview permits invalid references in the existing snapshot so a repair can be reviewed, but serializes that snapshot only into memory. The projected state and all persistence remain validated; unsupported or unrepresentable snapshots still fail explicitly.\n\nupdateProjectSettings and updatePackageSettings replace complete settings snapshots. Copy the corresponding query's entity.properties.settings, change only requested fields, retain other nested settings and optional fields, and submit the complete settings with the queried revision. Package updates also require the original packageId selector. Settings queries share the same response budgets as other entity kinds.\n\nupdateController and updateTransition replace complete snapshots, not partial patches. Copy the queried entity.properties, change only the requested fields, preserve page IDs/remarks/actions, item order/targets, settings and references, and submit the original selector with the queried revision. A stale_write requires refreshing and replanning the full snapshot for all these replacement operations. Querying does not validate references or grant permission to edit them.\n\n## Consume the committed session state\n\nFor complete public UAM consumption, use readSessionState({sessionId, expectedRevision?}); use queryEntity for targeted properties. The detached model excludes only asset resources' primary sourceBytes, retaining sourcePath and JSON extensions. It includes revision, dirty, lastSavedRevision, readComplete, readDiagnostics and uamFidelity. Only this read-model output schema accepts unnamed object fields; transaction input contracts remain unchanged.\n\nRead each asset with readResourceBytes({sessionId, expectedRevision: state.revision, selector:{packageId,resourceId}}). Bytes are detached Uint8Array values in the SDK and integer arrays in MCP, limited to the primary file already held in memory. There is no disk hydration or auxiliary-file discovery. Components are unsupported; unavailable bytes produce session_read_failed with reason bytes_unavailable.\n\nOn stale_read, discard the incomplete model/bytes collection and restart from readSessionState. Reads do not wait for uncommitted transactions, retain historical versions, or reserve revisions. Saving can update sourcePath and dirty without increasing the edit revision; the same revision does not identify permanently identical complete UAM. Completeness/fidelity flags preserve existing meaning and do not guarantee bytes, rendering or saving. Preserve failed reads as failures; never save or repair merely to obtain a read.\n\nCapabilities advertise a 4 MiB compact JSON data limit (depth 64, 500000 nodes) for the model and 1 MiB per primary resource. Both new MCP tools additionally limit the complete JSON CallToolResult, including compact text and structuredContent, to 16 MiB; excess returns mcp_response_budget_exceeded. Native model/buffer overflow returns session_read_failed with reason response_budget_exceeded, without truncation. Read the installed methods/readSessionState and methods/readResourceBytes schemas for precise inputs, results and errors.\n\n## Diagnose without repair\n\n`ofgui doctor --json` checks installed CLI/documentation versions, the Node Backend capability snapshot, in-memory Sharp PNG/JPEG encoding and pixel decoding, and temporary-directory access flags. `ofgui doctor <project-directory-or-fairy-file> --json` additionally runs existing Node project validation, including source reads and available image decoding. Optional `--output-dir <directory>` checks an explicit destination or its nearest existing ancestor, without creating it. Directory checks return the absolute requested `path`, link-resolved `inspectedPath` and `exists` (null when unknown); files, dangling links and access errors fail. The temporary directory must exist. It opens no Backend session, creates no lock, installs nothing, writes no probe files and changes no configuration.\n\nExit 0 means the requested checks completed; exit 1 means a detected error; exit 2 means invalid arguments; exit 3 means native image capability is unavailable/failed or project validation is incomplete. Inspect result.checks, result.errors and result.project. Without a project, its source bytes are not checked. Access flags do not prove effective ACL permissions, available space, later writes/rename/rollback or continued access. The capability manifest remains a declaration; a successful doctor does not prove publish/restore or runtime rendering. Plugins and configured output destinations are not executed or checked automatically; only explicit --output-dir is inspected. This product doctor does not inspect Git, pnpm, repository builds or fixture submodules; maintainers use pnpm repo:doctor for those.\n\nRead diagnostic guides for ownership and recovery boundaries. Every formal Core/Backend diagnostic code is covered; shared codes list all `owners`, while response `owner` identifies the actual source. Missing bytes/decoders, rejected paths and expired sessions require host action; do not invent repair/hydration tools, widen roots, discard unsaved work, or turn incomplete validation into success. Invalid/unsupported operations require schema-based replanning, live locks cannot be removed, and write failures require preserving dirty state and inspecting actual files.\n\n## Publish and recover trusted local artifacts\n\nPublishing and restoration are external Node-hosted workflows, not Backend session methods or general MCP editing tools. The host must authorize input and output directories independently. They require the native image capability; do not rename binary extensions to imitate a different target profile.\n\n- `ofgui publish <project> --output <release-directory> --project-type layabox --json` publishes the current saved project. `--output` overrides runtime artifact destinations; configured code generation still uses its own destinations and project plugins run as trusted local code.\n- The JSON document is `{schemaVersion:1,command:\"publish\",success:true,result:{files:[{path,size}]}}`. Paths are final absolute paths and sizes are bytes. The Node SDK `publishNode()` returns the same `result`. The manifest records actual successful filesystem/atlas writes, including code written through the supplied publish filesystem; it excludes pre-existing untouched files, deletions and arbitrary plugin I/O outside that filesystem. It is not an inventory of everything in the output directory. Explicit runtime output is staged and rolled back on failure; separately configured code outputs and arbitrary plugin effects are not covered by that directory transaction.\n- `ofgui restore <trusted-release-directory> --output <separate-project-directory> --project-type layabox --json` returns `{schemaVersion:1,command:\"restore\",success:true,result:{projectPath,packages:[{id,name}],warnings:[]}}`. Warnings are not a validation pass. Reread the returned projectPath and run `ofgui validate <projectPath> --json`; require valid and complete validation.\n- Both artifact commands exit 0 on workflow success, 1 on workflow failure, and 2 on command syntax errors. Errors are `{schemaVersion:1,command,success:false,error:{code,message}}`, with `publish_failed`, `restore_failed` or `invalid_arguments`. In JSON mode stdout contains only this document; human/plugin output goes to stderr. Help remains human-readable. Errors do not include a claimed successful file manifest.\n- Restore requires a separate directory, not a `.fairy` file. Do not force overwrite by default. `--force` replaces an existing nonempty target only after complete staged recovery; parse/image failures retain the previous target. Only trusted local artifacts are supported, not arbitrary third-party imports.\n- Read `ofgui docs cat restore-limits --json` or MCP resource `openfairygui://docs/restore-limits` for the installed version's full recovery boundary. Accept readable, structurally valid supported semantics and decoded assets, not original project IDs, workspace state, unpublished resources, original filenames/extensions, controller editor selection/export flags, float32 text precision or byte-identical XML.\n",
16531
- "restoreLimits": "# 受限发布产物恢复边界\n\n`restore` 只是一条受限的本地故障恢复路径,不是 FairyGUI 的常规创作入口、第三方发布物导入器或源码还原承诺。本文档记录其安全使用范围,以及当前仓库已经验证过、无法仅凭发布产物稳定恢复的内容。\n\n## 使用范围与安全边界\n\n| 项目 | 当前口径 |\n|---|---|\n| 输入 | 仅处理可信的本地发布目录;不把未知来源 `.fui` / `_fui.bytes` 视为安全输入 |\n| 输出 | 必须是独立工程目录,不接受 `.fairy` 单文件目标 |\n| 路径约束 | 拒绝资源路径、包名、分支名、文件名中的路径逃逸;发布目录内资源若解析到输入目录外也会失败 |\n| 覆盖行为 | 先在相邻暂存目录完成工程和资源写入,再替换目标;`--force` 不会在二进制解析或资源重建前删除旧输出 |\n| 不代表 | 不是恶意文件检测器,也不保证第三方产物能够安全或完整恢复 |\n\n这里的“不可还原”指:\n\n| 项目 | 含义 |\n|---|---|\n| 输入范围 | 仅使用发布目录中的 `.fui` / `_fui.bytes`、图集 PNG、以及同目录 loose 资源 |\n| 判定标准 | 不能稳定、通用、无外部辅助地恢复回原工程语义或原始 XML 文本 |\n| 不包含 | 仍可通过补协议、补 writer 规则、补测试继续收敛的普通实现问题 |\n\n## 总结\n\n| 结论 | 说明 |\n|---|---|\n| 受限恢复目标 | 在可信输入下生成一个可重读、可打开、结构自洽的 FairyGUI 工程 |\n| 不保证目标 | 还原成与原工程逐字节一致的源码工程 |\n| 主要原因 | 发布产物会丢失一部分编辑器阶段信息,或把原始值降精度到运行时格式 |\n\n## 当前已确认的不可还原项\n\n### 1. 发布包中根本不存在的资源或动作\n\n| 类别 | 不可还原内容 | 原因 | 当前样本证据 |\n|---|---|---|---|\n| 组件资源 | 原工程存在、但发布包未携带的组件 XML | 发布产物没有资源定义,restore 无法凭空生成真实内容 | `HitTest/component1.xml`、`PullToRefresh/Button1.xml`、`PullToRefresh/Button2.xml`、`TurnPage/Button3.xml` |\n| Transition item | 原工程存在、但二进制 transition block 未携带的 item | 二进制里没有对应时间轴项,无法可靠反推 | `Transition/BOSS.xml` 中 `target=\"n3\"` 的 6 个 item |\n\n说明:这类内容如果强行补出,只能生成占位内容,不能声称是“还原原工程”。\n\n### 2. 原始资源文件名与扩展名\n\n| 类别 | 不可还原内容 | 原因 | 当前样本证据 |\n|---|---|---|---|\n| 普通图片资源 | 原工程使用的真实文件扩展名与双后缀命名 | 发布包只保留运行时资源名,不稳定保留工程文件名 | `change.jpg -> change.png`、`Paper.jpg -> Paper.png`、`i3.png.png -> i3.png` |\n| 部分 loose 资源 | 若发布名与工程名完全脱钩,且缺少稳定映射线索 | 发布目录只提供发布后文件名,原工程命名信息已经丢失 | 仍可能出现少量发布名残留 |\n\n说明:当前实现已经尽量把“资源 id 命名”还原回工程名,但对原始扩展名并不能做通用、可靠的反推。\n\n### 3. Transition path 的原始文本精度\n\n| 类别 | 不可还原内容 | 原因 | 当前样本证据 |\n|---|---|---|---|\n| 路径字符串 | 编辑器 XML 中 path 的原始小数位数与文本格式 | 发布二进制只保存 float32 数值;写回时只能输出数值等价的字符串 | `Transition/PathDemo.xml` 的 `path` |\n\n说明:这类路径通常还能恢复到相同几何轨迹,但不能保证与原 XML 的字符串完全一致。\n\n### 4. 被降级为运行时默认值的编辑器信息\n\n| 类别 | 不可还原内容 | 原因 | 当前样本证据 |\n|---|---|---|---|\n| Transition easing | 原工程中的特定 ease 名称 | 当前样本对应二进制读出的就是默认 easing,无法证明原工程曾写过哪个非默认 ease | `Transition/BOSS.xml`、`TRAP.xml`、`GoodHit.xml` 中部分 `Expo.Out` / `Back.Out` / `Bounce.Out` |\n| 简单 Group 节点 | 仅用于编辑器分组、但没有额外运行时语义的 `GGroup` 节点 | 当前样本中的发布组件数据会直接裁掉这类 group,二进制 child list 里既没有 group 节点,也没有可稳定回推的 group 归属索引 | `Basics/Demo_Clip&Scroll.xml`、`Emoji/Main.xml`、`TurnPage/Book.xml` |\n| Group 高级模式 | 原工程 XML 中的 `group.advanced=\"true\"` | 发布 group block写出的是布局与间距等运行时数据,不单独保留编辑器里的高级模式开关;当前样本中二进制读回的 group 会直接落成 `advanced=false` | `Basics/Demo_Grid.xml`、`Transition/Main.xml`、`Transition/PowerUp.xml` |\n| Controller 当前选中页 | 原工程 XML 中的 `controller.selected` 当前页状态 | 发布 controller block稳定保存的是 `homePageType/homePage` 发布首页信息;当前样本中的二进制常写成 `default`,并不保留编辑器工程里当时的非零当前页 | `TurnPage/Main.xml` 的 `bookPos=\"2\"`、`TurnPage/Page.xml` 的 `style=\"1\"` / `side=\"1\"`、`FrontCover.xml` / `BackCover.xml` 的 `side=\"1\"` |\n| Controller 导出标记 | 原工程 XML 中的 `controller.exported=\"true\"` | 当前样本对应的 controller 发布 block只写 `name/pages/homePageType/homePage/actions`,没有独立写出 `exported` | `TurnPage/BackCover.xml`、`TurnPage/FrontCover.xml`、`TurnPage/Page.xml` |\n| 默认值显式性 | 原工程是否显式写出默认属性 | 发布包只保留语义值,不保留“这个默认值当时是否显式写在 XML 里” | 如 `xy=\"0,0\"`、空文本、默认布尔值等 |\n\n说明:这类信息恢复后通常仍然语义可用,但无法保证与原工程的编辑器写法逐项一致。\n\n### 5. 编辑器工程本地设置\n\n| 类别 | 不可还原内容 | 原因 |\n|---|---|---|\n| 工程标识 | 原始 `projectId` | restore 会生成新的工程标识 |\n| 工程设置 | 原始 `.objs` / workspace / 编辑器本地状态 | 发布目录不包含这些本地工程文件 |\n| 初始化设置之外的项目配置 | 原工程的非发布产物配置 | 当前 restore 按初始化默认值生成工程设置,而不是恢复源工程工作区状态 |\n\n说明:当前 restore 的目标是“重建可用工程”,不是恢复编辑器本地工作环境。\n\n### 6. 原工程 XML 的文本级细节\n\n| 类别 | 不可还原内容 | 原因 |\n|---|---|---|\n| 属性顺序 | 原标签属性排列顺序 | XML 语义不依赖属性顺序,发布产物也不保留该信息 |\n| 格式风格 | 换行、缩进、是否自闭合、空格风格 | 这是 writer 生成结果,不是发布产物协议内容 |\n| 大小写风格 | 某些颜色值、小数文本风格 | 发布包保留的是数值语义,不是原文本样式 |\n\n说明:当前实现会尽量贴近 FairyGUI 编辑器写法,但不会把这类文本风格视为“可从发布产物逆推出的正式数据”。\n\n## 当前恢复输出范围\n\n| 项目 | 当前口径 |\n|---|---|\n| 工程目标 | 在可信输入下生成可读、可打开、可继续编辑的 FairyGUI 工程 |\n| 资源目标 | 尽量恢复包内素材、组件 XML、字体派生图与 `.jta` / `.fnt` 等正式资源 |\n| 不承诺 | 与原工程一模一样的文件名、文本格式、局部编辑器状态 |\n\n## 何时需要外部辅助信息\n\n若目标不是“重建可用工程”,而是“尽量贴近原工程文本或命名”,则需要额外输入:\n\n| 额外输入 | 作用 |\n|---|---|\n| 原工程目录 | 作为命名、路径、缺失资源、文本样式的真实基准 |\n| 编辑器工作区文件 | 恢复 `.objs`、workspace、本地工程状态 |\n| 发布前清单或映射表 | 回填发布名与工程名之间的脱钩关系 |\n\n## 当前样本下仍然成立的判断\n\n| 判断 | 说明 |\n|---|---|\n| 可以从发布产物重建“可工作的工程” | 是 |\n| 可以从发布产物重建“原工程的源码真迹” | 否 |\n| 还原结果是否应该继续优化 | 可以,但应只优化“发布产物里确实有证据的部分” |\n",
16110
+ "restoreLimits": "# 受限发布产物恢复边界\n\n`restore` 只是一条受限的本地故障恢复路径,不是 FairyGUI 的常规创作入口、第三方发布物导入器或源码还原承诺。本文档记录其安全使用范围,以及当前仓库已经验证过、无法仅凭发布产物稳定恢复的内容。\n\n## 使用范围与安全边界\n\n| 项目 | 当前口径 |\n|---|---|\n| 输入 | 仅处理可信的本地发布目录;不把未知来源 `.fui` / `_fui.bytes` 视为安全输入 |\n| 输出 | 必须是独立工程目录,不接受 `.fairy` 单文件目标 |\n| 路径约束 | 拒绝资源路径、包名、分支名、文件名中的路径逃逸;发布目录内资源若解析到输入目录外也会失败 |\n| 覆盖行为 | 先在相邻暂存目录完成工程和资源写入,再替换目标;`--force` 不会在二进制解析或资源重建前删除旧输出 |\n| 不代表 | 不是恶意文件检测器,也不保证第三方产物能够安全或完整恢复 |\n\n这里的“不可还原”指:\n\n| 项目 | 含义 |\n|---|---|\n| 输入范围 | 仅使用发布目录中的 `.fui` / `_fui.bytes`、图集 PNG、以及同目录 loose 资源 |\n| 判定标准 | 不能稳定、通用、无外部辅助地恢复回原工程语义或原始 XML 文本 |\n| 不包含 | 仍可通过补协议、补 writer 规则、补测试继续收敛的普通实现问题 |\n\n## 总结\n\n| 结论 | 说明 |\n|---|---|\n| 受限恢复目标 | 在可信输入下生成一个可重读、可打开、结构自洽的 FairyGUI 工程 |\n| 不保证目标 | 还原成与原工程逐字节一致的源码工程 |\n| 主要原因 | 发布产物会丢失一部分编辑器阶段信息,或把原始值降精度到运行时格式 |\n\n## 当前已确认的不可还原项\n\n恢复时推导出的图片尺寸用于资源重建,但不作为原始声明尺寸写入 `package.xml`;生成的字体纹理和字形图片按顺序跟随对应字体。`RestoreResult.document` 保留尺寸省略与资源排序两种写入提示,交给新的 `ProjectWriter` 或 `NodeIO.writeProject()` 仍生效。提示属于内存中的序列化控制,不随 UAM 转换或重新读取传播。`ProjectWriter.setImageWriteHints(image, {})` 清除该图片的全部提示,恢复普通尺寸写回和资源排序;需要保留排序时,设置 `{ packageOrder: { afterId, weight } }`,其中目标是同包、同分支且未设置排序提示的资源。\n\n### 1. 发布包中根本不存在的资源或动作\n\n发布物中缺失独立资源项的字形图像使用稳定 glyph 图像 ID 的 UTF-8 十六进制生成 `images/glyph-<id>.png`,不同字体的不同图像 ID 不会因字符相同而重名。已有资源项保留发布物中的名称和路径;生成名称不代表原始源文件名,不依据示例包名或字体名称猜测。\n\n| 类别 | 不可还原内容 | 原因 | 当前样本证据 |\n|---|---|---|---|\n| 组件资源 | 原工程存在、但发布包未携带的组件 XML | 发布产物没有资源定义,restore 无法凭空生成真实内容 | `HitTest/component1.xml`、`PullToRefresh/Button1.xml`、`PullToRefresh/Button2.xml`、`TurnPage/Button3.xml` |\n| Transition item | 原工程存在、但二进制 transition block 未携带的 item | 二进制里没有对应时间轴项,无法可靠反推 | `Transition/BOSS.xml` 中 `target=\"n3\"` 的 6 个 item |\n\n说明:这类内容如果强行补出,只能生成占位内容,不能声称是“还原原工程”。\n\n### 2. 原始资源文件名与扩展名\n\n| 类别 | 不可还原内容 | 原因 | 当前样本证据 |\n|---|---|---|---|\n| 普通图片资源 | 原工程使用的真实文件扩展名与双后缀命名 | 发布包只保留运行时资源名,不稳定保留工程文件名 | `change.jpg -> change.png`、`Paper.jpg -> Paper.png`、`i3.png.png -> i3.png` |\n| 部分 loose 资源 | 若发布名与工程名完全脱钩,且缺少稳定映射线索 | 发布目录只提供发布后文件名,原工程命名信息已经丢失 | 仍可能出现少量发布名残留 |\n\n说明:当前实现已经尽量把“资源 id 命名”还原回工程名,但对原始扩展名并不能做通用、可靠的反推。\n\n### 3. Transition path 的原始文本精度\n\n| 类别 | 不可还原内容 | 原因 | 当前样本证据 |\n|---|---|---|---|\n| 路径字符串 | 编辑器 XML 中 path 的原始小数位数与文本格式 | 发布二进制只保存 float32 数值;写回时只能输出数值等价的字符串 | `Transition/PathDemo.xml` 的 `path` |\n\n说明:这类路径通常还能恢复到相同几何轨迹,但不能保证与原 XML 的字符串完全一致。\n\n### 4. 被降级为运行时默认值的编辑器信息\n\n| 类别 | 不可还原内容 | 原因 | 当前样本证据 |\n|---|---|---|---|\n| Transition easing | 原工程中的特定 ease 名称 | 当前样本对应二进制读出的就是默认 easing,无法证明原工程曾写过哪个非默认 ease | `Transition/BOSS.xml`、`TRAP.xml`、`GoodHit.xml` 中部分 `Expo.Out` / `Back.Out` / `Bounce.Out` |\n| 简单 Group 节点 | 仅用于编辑器分组、但没有额外运行时语义的 `GGroup` 节点 | 当前样本中的发布组件数据会直接裁掉这类 group,二进制 child list 里既没有 group 节点,也没有可稳定回推的 group 归属索引 | `Basics/Demo_Clip&Scroll.xml`、`Emoji/Main.xml`、`TurnPage/Book.xml` |\n| Group 高级模式 | 原工程 XML 中的 `group.advanced=\"true\"` | 发布 group block写出的是布局与间距等运行时数据,不单独保留编辑器里的高级模式开关;当前样本中二进制读回的 group 会直接落成 `advanced=false` | `Basics/Demo_Grid.xml`、`Transition/Main.xml`、`Transition/PowerUp.xml` |\n| Controller 当前选中页 | 原工程 XML 中的 `controller.selected` 当前页状态 | 发布 controller block稳定保存的是 `homePageType/homePage` 发布首页信息;当前样本中的二进制常写成 `default`,并不保留编辑器工程里当时的非零当前页 | `TurnPage/Main.xml` 的 `bookPos=\"2\"`、`TurnPage/Page.xml` 的 `style=\"1\"` / `side=\"1\"`、`FrontCover.xml` / `BackCover.xml` 的 `side=\"1\"` |\n| Controller 导出标记 | 原工程 XML 中的 `controller.exported=\"true\"` | 当前样本对应的 controller 发布 block只写 `name/pages/homePageType/homePage/actions`,没有独立写出 `exported` | `TurnPage/BackCover.xml`、`TurnPage/FrontCover.xml`、`TurnPage/Page.xml` |\n| 默认值显式性 | 原工程是否显式写出默认属性 | 发布包只保留语义值,不保留“这个默认值当时是否显式写在 XML 里” | 如 `xy=\"0,0\"`、空文本、默认布尔值等 |\n\n说明:这类信息恢复后通常仍然语义可用,但无法保证与原工程的编辑器写法逐项一致。\n\n### 5. 编辑器工程本地设置\n\n| 类别 | 不可还原内容 | 原因 |\n|---|---|---|\n| 工程标识 | 原始 `projectId` | restore 会生成新的工程标识 |\n| 工程设置 | 原始 `.objs` / workspace / 编辑器本地状态 | 发布目录不包含这些本地工程文件 |\n| 初始化设置之外的项目配置 | 原工程的非发布产物配置 | 当前 restore 按初始化默认值生成工程设置,而不是恢复源工程工作区状态 |\n\n说明:当前 restore 的目标是“重建可用工程”,不是恢复编辑器本地工作环境。\n\n### 6. 原工程 XML 的文本级细节\n\n| 类别 | 不可还原内容 | 原因 |\n|---|---|---|\n| 属性顺序 | 原标签属性排列顺序 | XML 语义不依赖属性顺序,发布产物也不保留该信息 |\n| 格式风格 | 换行、缩进、是否自闭合、空格风格 | 这是 writer 生成结果,不是发布产物协议内容 |\n| 大小写风格 | 某些颜色值、小数文本风格 | 发布包保留的是数值语义,不是原文本样式 |\n\n说明:当前实现会尽量贴近 FairyGUI 编辑器写法,但不会把这类文本风格视为“可从发布产物逆推出的正式数据”。\n\n## 当前恢复输出范围\n\n| 项目 | 当前口径 |\n|---|---|\n| 工程目标 | 在可信输入下生成可读、可打开、可继续编辑的 FairyGUI 工程 |\n| 资源目标 | 尽量恢复包内素材、组件 XML、字体派生图与 `.jta` / `.fnt` 等正式资源 |\n| 不承诺 | 与原工程一模一样的文件名、文本格式、局部编辑器状态 |\n\n## 何时需要外部辅助信息\n\n若目标不是“重建可用工程”,而是“尽量贴近原工程文本或命名”,则需要额外输入:\n\n| 额外输入 | 作用 |\n|---|---|\n| 原工程目录 | 作为命名、路径、缺失资源、文本样式的真实基准 |\n| 编辑器工作区文件 | 恢复 `.objs`、workspace、本地工程状态 |\n| 发布前清单或映射表 | 回填发布名与工程名之间的脱钩关系 |\n\n## 当前样本下仍然成立的判断\n\n| 判断 | 说明 |\n|---|---|\n| 可以从发布产物重建“可工作的工程” | 是 |\n| 可以从发布产物重建“原工程的源码真迹” | 否 |\n| 还原结果是否应该继续优化 | 可以,但应只优化“发布产物里确实有证据的部分” |\n",
16532
16111
  "skill": "---\nname: openfairygui\ndescription: Navigate an installed OpenFairyGUI SDK, CLI or MCP server for FairyGUI project inspection, precise queries, revision-checked authoring and diagnosis. Use the installed version's offline documentation and generated schemas before constructing operations.\n---\n\n# OpenFairyGUI installed-version navigation\n\nUse this skill for OpenFairyGUI project workflows, not unrelated GUI frameworks.\n\n1. Locate the intended project's installed `ofgui` binary (local `node_modules/.bin/ofgui`, `ofgui.cmd` on Windows) or its configured MCP server. Do not use `npx`, install, upgrade, or fall back to a global executable automatically. If missing, report the missing installation and ask the host to choose it.\n2. Read `ofgui --version` and `ofgui docs ls --json`; compare the CLI and documentation package versions. In MCP, read `openfairygui://docs/index` and the server's version. Report mismatches before authoring; do not use online latest-version docs as the installed contract.\n3. Read `ofgui docs cat workflow` or the index's workflow URI. Use `docs find`, `docs schema <kind>`, `docs cat methods/<method>` and `docs diagnostic <code>` (or the listed MCP URIs) for exact current inputs and recovery boundaries. Never copy or guess operation grammar from this skill.\n4. Follow outline → exact query → plan → preflight → authorized apply → validate → authorized save → reread. Revision changes require refreshing and replanning, not blind retries. Read-only requests do not authorize opening locked file sessions, mutations or repairs.\n5. Use `ofgui doctor [project] --json` for read-only installation/project diagnosis. Missing bytes/decoders and path/session failures may require host action. Preserve unsaved work and report incomplete checks honestly.\n\nThe commands above navigate this installed corpus; they do not grant permission to change projects, install dependencies or widen filesystem access.\n"
16533
16112
  };
16534
16113
  //#endregion