mftsccs-node 0.0.71 → 0.0.73

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.
@@ -38,10 +38,19 @@ export declare class ConceptsData {
38
38
  /** Legacy array storage for concepts (deprecated in favor of tree structures) */
39
39
  static conceptsArray: Concept[];
40
40
  /**
41
- * NPC (Non-Persistent Concepts) cache for temporarily tracking accessed concept IDs.
42
- * Limited to 10 entries for memory management.
41
+ * NPC (Non-Persistent Concepts) cache for concept IDs that are currently in cooldown.
43
42
  */
44
43
  static NPC: number[];
44
+ /**
45
+ * Per-NPC cooldown state. Each failed backend lookup increases the cooldown by
46
+ * 30 seconds: first miss = 30s, second miss = 60s, third miss = 90s, etc.
47
+ */
48
+ static NPCMeta: Map<number, {
49
+ attempts: number;
50
+ expiresAt: number;
51
+ }>;
52
+ static NPC_BACKOFF_SECONDS: number;
53
+ static RemoveExpiredNpc(now?: number): void;
45
54
  /** Dictionary-style storage for quick concept lookups by ID */
46
55
  static conceptDictionary: Concept[];
47
56
  /**
@@ -61,7 +70,7 @@ export declare class ConceptsData {
61
70
  static CheckContains(concept: Concept): boolean;
62
71
  /**
63
72
  * Adds a concept ID to the Non-Persistent Concepts (NPC) cache.
64
- * Used for tracking recently accessed concepts. Automatically clears when exceeding 10 entries.
73
+ * Used for tracking recently missed concepts with a growing retry cooldown.
65
74
  *
66
75
  * @param {number} id - The concept ID to add to NPC cache
67
76
  *
@@ -72,10 +81,10 @@ export declare class ConceptsData {
72
81
  */
73
82
  static AddNpc(id: number): void;
74
83
  /**
75
- * Checks if a concept ID exists in the NPC cache.
84
+ * Checks if a concept ID exists in the NPC cache and is still inside its cooldown.
76
85
  *
77
86
  * @param {number} id - The concept ID to check
78
- * @returns {boolean} True if the ID is in the NPC cache, false otherwise
87
+ * @returns {boolean} True if the ID is currently in NPC cooldown, false otherwise
79
88
  *
80
89
  * @example
81
90
  * ```typescript
@@ -23,6 +23,7 @@ export { storeToDatabase, getFromDatabaseWithType, getFromDatabaseWithTypeOld }
23
23
  export { default as GetConceptByCharacter } from './Services/GetConceptByCharacter';
24
24
  export { GetLink, GetLinkRaw } from './Services/GetLink';
25
25
  export { CreateDefaultConcept } from './Services/CreateDefaultConcept';
26
+ export { CreateDefaultLConcept } from './Services/Local/CreateDefaultLConcept';
26
27
  export { MakeTheTypeConcept } from './Services/MakeTheTypeConcept';
27
28
  export { MakeTheTypeConceptApi } from './Api/MakeTheTypeConceptApi';
28
29
  export { GetLinkerConnectionFromConcepts, GetLinkerConnectionToConcepts } from './Services/GetLinkerConnectionFromConcept';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mftsccs-node",
3
- "version": "0.0.71",
3
+ "version": "0.0.73",
4
4
  "environment": "production",
5
5
  "description": "Full Pack of concept and connection system",
6
6
  "main": "dist/bundle.js",