@myhpmp/core 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
1
  export declare function calcTokenExp(tokens: number): number;
2
- export declare function calcSessionExp(): number;
2
+ export declare const DAILY_SESSION_CAP = 30;
3
+ export declare function calcSessionExp(dailySessionCount?: number): number;
3
4
  export declare function calcStreakBonus(streakDays: number): number;
4
5
  export declare function calcWeeklyBonus(weeklyUsagePercent: number): number;
@@ -1,7 +1,10 @@
1
1
  export function calcTokenExp(tokens) {
2
2
  return Math.floor(tokens / 1000);
3
3
  }
4
- export function calcSessionExp() {
4
+ export const DAILY_SESSION_CAP = 30;
5
+ export function calcSessionExp(dailySessionCount = 0) {
6
+ if (dailySessionCount >= DAILY_SESSION_CAP)
7
+ return 0;
5
8
  return 25;
6
9
  }
7
10
  export function calcStreakBonus(streakDays) {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { getLevelInfo, getTierForLevel, getStars, TIERS } from './level-system.js';
2
2
  export type { Tier, LevelInfo } from './level-system.js';
3
- export { calcTokenExp, calcSessionExp, calcStreakBonus, calcWeeklyBonus } from './exp-calculator.js';
3
+ export { calcTokenExp, calcSessionExp, calcStreakBonus, calcWeeklyBonus, DAILY_SESSION_CAP } from './exp-calculator.js';
4
4
  export { getTierEmoji, getTierTitle, TIER_EMOJIS, TIER_TITLES, TIER_TITLE_KEYS } from './tier.js';
5
5
  export type { TierTitle } from './tier.js';
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export { getLevelInfo, getTierForLevel, getStars, TIERS } from './level-system.js';
2
- export { calcTokenExp, calcSessionExp, calcStreakBonus, calcWeeklyBonus } from './exp-calculator.js';
2
+ export { calcTokenExp, calcSessionExp, calcStreakBonus, calcWeeklyBonus, DAILY_SESSION_CAP } from './exp-calculator.js';
3
3
  export { getTierEmoji, getTierTitle, TIER_EMOJIS, TIER_TITLES, TIER_TITLE_KEYS } from './tier.js';
package/dist/tier.js CHANGED
@@ -2,8 +2,8 @@
2
2
  export const TIER_EMOJIS = {
3
3
  0: '🌱',
4
4
  1: '⚔️',
5
- 2: '🛡️',
6
- 3: '🧙',
5
+ 2: '🛠️',
6
+ 3: '🏗️',
7
7
  4: '🔮',
8
8
  5: '👑',
9
9
  6: '🐉',
@@ -13,14 +13,14 @@ export const TIER_EMOJIS = {
13
13
  export const TIER_TITLE_KEYS = [1, 6, 11, 16, 21, 31, 41, 51];
14
14
  /** Complete tier title data */
15
15
  export const TIER_TITLES = {
16
- 0: { ko: '초보 모험가', en: 'Novice Adventurer', emoji: '🌱' },
17
- 1: { ko: '견습 전사', en: 'Apprentice Warrior', emoji: '⚔️' },
18
- 2: { ko: '숙련 기사', en: 'Skilled Knight', emoji: '🛡️' },
19
- 3: { ko: '마법사', en: 'Mage', emoji: '🧙' },
20
- 4: { ko: '대마법사', en: 'Archmage', emoji: '🔮' },
21
- 5: { ko: '아크메이지', en: 'Grand Archmage', emoji: '👑' },
22
- 6: { ko: '전설의 코드드래곤', en: 'Legendary Code Dragon', emoji: '🐉' },
23
- 7: { ko: '초월자', en: 'Transcendent', emoji: '⚡' },
16
+ 0: { ko: '프롬프트 뉴비', en: 'Prompt Newbie', emoji: '🌱' },
17
+ 1: { ko: '토큰 익스플로러', en: 'Token Explorer', emoji: '⚔️' },
18
+ 2: { ko: '프롬프트 엔지니어', en: 'Prompt Engineer', emoji: '🛠️' },
19
+ 3: { ko: '컨텍스트 아키텍트', en: 'Context Architect', emoji: '🏗️' },
20
+ 4: { ko: '프롬프트 소서러', en: 'Prompt Sorcerer', emoji: '🔮' },
21
+ 5: { ko: '모델 마스터', en: 'Model Master', emoji: '👑' },
22
+ 6: { ko: '컨텍스트 오버로드', en: 'Context Overlord', emoji: '🐉' },
23
+ 7: { ko: '신서틱 마인드', en: 'Synthetic Mind', emoji: '⚡' },
24
24
  };
25
25
  export function getTierEmoji(tierIndex) {
26
26
  return TIER_EMOJIS[tierIndex] ?? '🌱';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myhpmp/core",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Shared core logic for My HP/MP — level system, EXP calculator, tier data, i18n",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -10,7 +10,7 @@
10
10
  ],
11
11
  "scripts": {
12
12
  "build": "tsc",
13
- "test": "vitest run",
13
+ "test": "vitest run --passWithNoTests",
14
14
  "prepublishOnly": "npm run build"
15
15
  },
16
16
  "keywords": [