@zhin.js/plugin-lottery 1.1.0 → 1.1.2

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.
Files changed (35) hide show
  1. package/AGENTS.md +8 -0
  2. package/commands/lottery/{[[game]].js → [[game]]/index.js} +3 -3
  3. package/commands/lottery/{[[game]].ts → [[game]]/index.ts} +3 -3
  4. package/commands/lottery-backtest/{[[game]].js → [[game]]/index.js} +5 -5
  5. package/commands/lottery-backtest/{[[game]].ts → [[game]]/index.ts} +5 -5
  6. package/commands/lottery-history/{[game].js → [game]/index.js} +3 -3
  7. package/commands/lottery-history/{[game].ts → [game]/index.ts} +4 -4
  8. package/commands/lottery-stats/{[game].js → [game]/index.js} +7 -7
  9. package/commands/lottery-stats/{[game].ts → [game]/index.ts} +7 -7
  10. package/commands/{lottery-today.js → lottery-today/index.js} +2 -2
  11. package/commands/{lottery-today.ts → lottery-today/index.ts} +3 -3
  12. package/commands/lottery-train/{[[game]].js → [[game]]/index.js} +5 -5
  13. package/commands/lottery-train/{[[game]].ts → [[game]]/index.ts} +5 -5
  14. package/lib/memory-db.d.ts +1 -1
  15. package/lib/memory-db.js +1 -1
  16. package/package.json +14 -8
  17. package/{agent/skills/lottery.md → skills/lottery/SKILL.md} +8 -0
  18. package/{tools/compute-recommend.js → skills/lottery/tools/compute-recommend/index.js} +2 -2
  19. package/{tools/compute-recommend.ts → skills/lottery/tools/compute-recommend/index.ts} +2 -2
  20. package/{tools/get-model-state.js → skills/lottery/tools/get-model-state/index.js} +2 -2
  21. package/{tools/get-model-state.ts → skills/lottery/tools/get-model-state/index.ts} +2 -2
  22. package/{tools/history.js → skills/lottery/tools/history/index.js} +3 -3
  23. package/{tools/history.ts → skills/lottery/tools/history/index.ts} +3 -3
  24. package/{tools/list-pending.js → skills/lottery/tools/list-pending/index.js} +2 -2
  25. package/{tools/list-pending.ts → skills/lottery/tools/list-pending/index.ts} +2 -2
  26. package/{tools/save-prediction.js → skills/lottery/tools/save-prediction/index.js} +2 -2
  27. package/{tools/save-prediction.ts → skills/lottery/tools/save-prediction/index.ts} +2 -2
  28. package/{tools/stats-snapshot.js → skills/lottery/tools/stats-snapshot/index.js} +2 -2
  29. package/{tools/stats-snapshot.ts → skills/lottery/tools/stats-snapshot/index.ts} +2 -2
  30. package/{tools/sync.js → skills/lottery/tools/sync/index.js} +3 -3
  31. package/{tools/sync.ts → skills/lottery/tools/sync/index.ts} +3 -3
  32. package/src/memory-db.ts +1 -1
  33. package/agent/agent.ts +0 -6
  34. package/agent/instructions.md +0 -2
  35. /package/evals/{pipeline_smoke.eval.ts → $pipeline_smoke.eval.ts} +0 -0
package/AGENTS.md ADDED
@@ -0,0 +1,8 @@
1
+ # Lottery Agent Guidance
2
+
3
+ This plugin provides a multi-game lottery analysis pipeline for synchronization, review, recommendation, and publication.
4
+
5
+ - Use the typed lottery tools for sync, statistics, recommendations, and reviews.
6
+ - Prefer exact numbers returned by tools over estimates or guesses.
7
+ - Include the standard disclaimer in every published report.
8
+ - Follow the repository root `AGENTS.md`; this file only adds lottery-specific guidance.
@@ -1,8 +1,8 @@
1
1
  // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
2
  import { defineCommand } from 'zhin.js/command';
3
- import { parseGameId } from "../../lib/games/registry.js";
4
- import { buildPipelineDeps, formatPipelineReply, runLotteryPipeline, resolveLotteryConfig, } from "../../lib/command-helpers.js";
5
- import { lotteryRuntimeToken } from "../../lib/runtime-state.js";
3
+ import { parseGameId } from "../../../lib/games/registry.js";
4
+ import { buildPipelineDeps, formatPipelineReply, runLotteryPipeline, resolveLotteryConfig, } from "../../../lib/command-helpers.js";
5
+ import { lotteryRuntimeToken } from "../../../lib/runtime-state.js";
6
6
  export default defineCommand({
7
7
  description: 'Run full pipeline: sync → review → recommend (manual, no push)',
8
8
  params: { game: { type: 'string', default: '' } },
@@ -1,13 +1,13 @@
1
1
  import { defineCommand } from 'zhin.js/command';
2
- import { parseGameId } from '../../src/games/registry.js';
2
+ import { parseGameId } from '../../../src/games/registry.js';
3
3
  import {
4
4
  buildPipelineDeps,
5
5
  formatPipelineReply,
6
6
  runLotteryPipeline,
7
7
  resolveLotteryConfig,
8
8
  type LotteryConfig,
9
- } from '../../src/command-helpers.js';
10
- import { lotteryRuntimeToken } from '../../src/runtime-state.js';
9
+ } from '../../../src/command-helpers.js';
10
+ import { lotteryRuntimeToken } from '../../../src/runtime-state.js';
11
11
 
12
12
  export default defineCommand<LotteryConfig>({
13
13
  description: 'Run full pipeline: sync → review → recommend (manual, no push)',
@@ -1,10 +1,10 @@
1
1
  // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
2
  import { defineCommand } from 'zhin.js/command';
3
- import { parseGameId } from "../../lib/games/registry.js";
4
- import { formatBacktestSection, runBacktestForGames, } from "../../lib/evaluate/backtest.js";
5
- import { resolveLotteryConfig, } from "../../lib/command-helpers.js";
6
- import { lotteryEnabledGames } from "../../lib/config.js";
7
- import { lotteryRuntimeToken } from "../../lib/runtime-state.js";
3
+ import { parseGameId } from "../../../lib/games/registry.js";
4
+ import { formatBacktestSection, runBacktestForGames, } from "../../../lib/evaluate/backtest.js";
5
+ import { resolveLotteryConfig, } from "../../../lib/command-helpers.js";
6
+ import { lotteryEnabledGames } from "../../../lib/config.js";
7
+ import { lotteryRuntimeToken } from "../../../lib/runtime-state.js";
8
8
  export default defineCommand({
9
9
  description: 'Walk-forward backtest vs random baseline',
10
10
  params: { game: { type: 'string', default: '' } },
@@ -1,15 +1,15 @@
1
1
  import { defineCommand } from 'zhin.js/command';
2
- import { parseGameId } from '../../src/games/registry.js';
2
+ import { parseGameId } from '../../../src/games/registry.js';
3
3
  import {
4
4
  formatBacktestSection,
5
5
  runBacktestForGames,
6
- } from '../../src/evaluate/backtest.js';
6
+ } from '../../../src/evaluate/backtest.js';
7
7
  import {
8
8
  resolveLotteryConfig,
9
9
  type LotteryConfig,
10
- } from '../../src/command-helpers.js';
11
- import { lotteryEnabledGames } from '../../src/config.js';
12
- import { lotteryRuntimeToken } from '../../src/runtime-state.js';
10
+ } from '../../../src/command-helpers.js';
11
+ import { lotteryEnabledGames } from '../../../src/config.js';
12
+ import { lotteryRuntimeToken } from '../../../src/runtime-state.js';
13
13
 
14
14
  export default defineCommand<LotteryConfig>({
15
15
  description: 'Walk-forward backtest vs random baseline',
@@ -1,8 +1,8 @@
1
1
  // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
2
  import { defineCommand } from 'zhin.js/command';
3
- import { parseGameId } from "../../lib/games/registry.js";
4
- import { loadDraws } from "../../lib/db.js";
5
- import { lotteryRuntimeToken } from "../../lib/runtime-state.js";
3
+ import { parseGameId } from "../../../lib/games/registry.js";
4
+ import { loadDraws } from "../../../lib/db.js";
5
+ import { lotteryRuntimeToken } from "../../../lib/runtime-state.js";
6
6
  export default defineCommand({
7
7
  description: 'List historical draw results',
8
8
  params: { game: { type: 'string' } },
@@ -1,8 +1,8 @@
1
1
  import { defineCommand } from 'zhin.js/command';
2
- import { parseGameId } from '../../src/games/registry.js';
3
- import { loadDraws } from '../../src/db.js';
4
- import type { LotteryConfig } from '../../src/command-helpers.js';
5
- import { lotteryRuntimeToken } from '../../src/runtime-state.js';
2
+ import { parseGameId } from '../../../src/games/registry.js';
3
+ import { loadDraws } from '../../../src/db.js';
4
+ import type { LotteryConfig } from '../../../src/command-helpers.js';
5
+ import { lotteryRuntimeToken } from '../../../src/runtime-state.js';
6
6
 
7
7
  export default defineCommand<LotteryConfig>({
8
8
  description: 'List historical draw results',
@@ -1,12 +1,12 @@
1
1
  // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
2
  import { defineCommand } from 'zhin.js/command';
3
- import { parseGameId } from "../../lib/games/registry.js";
4
- import { loadDraws } from "../../lib/db.js";
5
- import { recommendGame, formatPickLine, formatPickStats } from "../../lib/recommend/game-pick.js";
6
- import { loadAccuracySnapshot, loadGameWeights } from "../../lib/evaluate/tracker.js";
7
- import { resolveLotteryConfig, } from "../../lib/command-helpers.js";
8
- import { lotteryKl8 } from "../../lib/config.js";
9
- import { lotteryRuntimeToken } from "../../lib/runtime-state.js";
3
+ import { parseGameId } from "../../../lib/games/registry.js";
4
+ import { loadDraws } from "../../../lib/db.js";
5
+ import { recommendGame, formatPickLine, formatPickStats } from "../../../lib/recommend/game-pick.js";
6
+ import { loadAccuracySnapshot, loadGameWeights } from "../../../lib/evaluate/tracker.js";
7
+ import { resolveLotteryConfig, } from "../../../lib/command-helpers.js";
8
+ import { lotteryKl8 } from "../../../lib/config.js";
9
+ import { lotteryRuntimeToken } from "../../../lib/runtime-state.js";
10
10
  export default defineCommand({
11
11
  description: 'Single-game stats snapshot',
12
12
  params: { game: { type: 'string' } },
@@ -1,14 +1,14 @@
1
1
  import { defineCommand } from 'zhin.js/command';
2
- import { parseGameId } from '../../src/games/registry.js';
3
- import { loadDraws } from '../../src/db.js';
4
- import { recommendGame, formatPickLine, formatPickStats } from '../../src/recommend/game-pick.js';
5
- import { loadAccuracySnapshot, loadGameWeights } from '../../src/evaluate/tracker.js';
2
+ import { parseGameId } from '../../../src/games/registry.js';
3
+ import { loadDraws } from '../../../src/db.js';
4
+ import { recommendGame, formatPickLine, formatPickStats } from '../../../src/recommend/game-pick.js';
5
+ import { loadAccuracySnapshot, loadGameWeights } from '../../../src/evaluate/tracker.js';
6
6
  import {
7
7
  resolveLotteryConfig,
8
8
  type LotteryConfig,
9
- } from '../../src/command-helpers.js';
10
- import { lotteryKl8 } from '../../src/config.js';
11
- import { lotteryRuntimeToken } from '../../src/runtime-state.js';
9
+ } from '../../../src/command-helpers.js';
10
+ import { lotteryKl8 } from '../../../src/config.js';
11
+ import { lotteryRuntimeToken } from '../../../src/runtime-state.js';
12
12
 
13
13
  export default defineCommand<LotteryConfig>({
14
14
  description: 'Single-game stats snapshot',
@@ -1,7 +1,7 @@
1
1
  // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
2
  import { defineCommand } from 'zhin.js/command';
3
- import { formatDailyReportText, loadTodayReport } from "../lib/recommend/report.js";
4
- import { lotteryRuntimeToken } from "../lib/runtime-state.js";
3
+ import { formatDailyReportText, loadTodayReport } from "../../lib/recommend/report.js";
4
+ import { lotteryRuntimeToken } from "../../lib/runtime-state.js";
5
5
  export default defineCommand({
6
6
  description: 'Show today published recommendation report',
7
7
  async execute({ use }) {
@@ -1,7 +1,7 @@
1
1
  import { defineCommand } from 'zhin.js/command';
2
- import { formatDailyReportText, loadTodayReport } from '../src/recommend/report.js';
3
- import type { LotteryConfig } from '../src/command-helpers.js';
4
- import { lotteryRuntimeToken } from '../src/runtime-state.js';
2
+ import { formatDailyReportText, loadTodayReport } from '../../src/recommend/report.js';
3
+ import type { LotteryConfig } from '../../src/command-helpers.js';
4
+ import { lotteryRuntimeToken } from '../../src/runtime-state.js';
5
5
 
6
6
  export default defineCommand<LotteryConfig>({
7
7
  description: 'Show today published recommendation report',
@@ -1,10 +1,10 @@
1
1
  // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
2
  import { defineCommand } from 'zhin.js/command';
3
- import { parseGameId } from "../../lib/games/registry.js";
4
- import { formatTrainReport, trainAllGameWeights, } from "../../lib/evaluate/backtest.js";
5
- import { resolveLotteryConfig, } from "../../lib/command-helpers.js";
6
- import { lotteryEnabledGames } from "../../lib/config.js";
7
- import { lotteryRuntimeToken } from "../../lib/runtime-state.js";
3
+ import { parseGameId } from "../../../lib/games/registry.js";
4
+ import { formatTrainReport, trainAllGameWeights, } from "../../../lib/evaluate/backtest.js";
5
+ import { resolveLotteryConfig, } from "../../../lib/command-helpers.js";
6
+ import { lotteryEnabledGames } from "../../../lib/config.js";
7
+ import { lotteryRuntimeToken } from "../../../lib/runtime-state.js";
8
8
  export default defineCommand({
9
9
  description: 'Full-history weight training',
10
10
  params: { game: { type: 'string', default: '' } },
@@ -1,15 +1,15 @@
1
1
  import { defineCommand } from 'zhin.js/command';
2
- import { parseGameId } from '../../src/games/registry.js';
2
+ import { parseGameId } from '../../../src/games/registry.js';
3
3
  import {
4
4
  formatTrainReport,
5
5
  trainAllGameWeights,
6
- } from '../../src/evaluate/backtest.js';
6
+ } from '../../../src/evaluate/backtest.js';
7
7
  import {
8
8
  resolveLotteryConfig,
9
9
  type LotteryConfig,
10
- } from '../../src/command-helpers.js';
11
- import { lotteryEnabledGames } from '../../src/config.js';
12
- import { lotteryRuntimeToken } from '../../src/runtime-state.js';
10
+ } from '../../../src/command-helpers.js';
11
+ import { lotteryEnabledGames } from '../../../src/config.js';
12
+ import { lotteryRuntimeToken } from '../../../src/runtime-state.js';
13
13
 
14
14
  export default defineCommand<LotteryConfig>({
15
15
  description: 'Full-history weight training',
@@ -1,6 +1,6 @@
1
1
  import type { LotteryDb } from './db.js';
2
2
  /**
3
- * Slice-2 fallback while Plugin Runtime has no DatabaseFeature Resource path.
3
+ * In-memory fallback for runtimes without a DatabaseHost.
4
4
  * Enough for smoke: today/history/stats/train/backtest/pipeline no longer return「数据库未就绪」.
5
5
  */
6
6
  export declare function createInMemoryLotteryDb(): LotteryDb;
package/lib/memory-db.js CHANGED
@@ -32,7 +32,7 @@ const TABLE_NAMES = [
32
32
  MEMORY_TABLE,
33
33
  ];
34
34
  /**
35
- * Slice-2 fallback while Plugin Runtime has no DatabaseFeature Resource path.
35
+ * In-memory fallback for runtimes without a DatabaseHost.
36
36
  * Enough for smoke: today/history/stats/train/backtest/pipeline no longer return「数据库未就绪」.
37
37
  */
38
38
  export function createInMemoryLotteryDb() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/plugin-lottery",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "description": "Multi-game lottery analysis for Zhin.js (Plugin Runtime)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -19,8 +19,9 @@
19
19
  "commands",
20
20
  "src",
21
21
  "lib",
22
- "agent",
22
+ "AGENTS.md",
23
23
  "tools",
24
+ "skills",
24
25
  "evals",
25
26
  "README.md"
26
27
  ],
@@ -43,18 +44,19 @@
43
44
  "license": "MIT",
44
45
  "dependencies": {
45
46
  "zod": "^4.4.3",
46
- "@zhin.js/tool": "1.1.0"
47
+ "@zhin.js/tool": "1.1.2",
48
+ "@zhin.js/skill": "1.1.2"
47
49
  },
48
50
  "devDependencies": {
49
51
  "typescript": "^6.0.3",
50
52
  "vitest": "^4.1.10",
51
- "@zhin.js/agent": "1.1.23",
52
- "zhin.js": "1.1.0"
53
+ "@zhin.js/agent": "1.1.27",
54
+ "zhin.js": "1.1.3"
53
55
  },
54
56
  "peerDependencies": {
55
- "@zhin.js/agent": "^1.1.23",
56
- "@zhin.js/command": "^1.1.0",
57
- "zhin.js": "^1.1.0"
57
+ "@zhin.js/agent": "^1.1.27",
58
+ "@zhin.js/command": "^1.1.2",
59
+ "zhin.js": "^1.1.3"
58
60
  },
59
61
  "peerDependenciesMeta": {
60
62
  "@zhin.js/agent": {
@@ -90,6 +92,10 @@
90
92
  {
91
93
  "package": "@zhin.js/tool",
92
94
  "api": "^1.0.0"
95
+ },
96
+ {
97
+ "package": "@zhin.js/skill",
98
+ "api": "^1.0.0"
93
99
  }
94
100
  ],
95
101
  "plugins": []
@@ -1,5 +1,13 @@
1
1
  ---
2
2
  description: Automated daily pipeline — sync, review, recommend, publish
3
+ tools:
4
+ - "compute-recommend"
5
+ - "get-model-state"
6
+ - "history"
7
+ - "list-pending"
8
+ - "save-prediction"
9
+ - "stats-snapshot"
10
+ - "sync"
3
11
  ---
4
12
 
5
13
  # Lottery pipeline skill
@@ -1,8 +1,8 @@
1
1
  // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
2
  import { defineAgentTool } from '@zhin.js/tool';
3
3
  import { z } from 'zod';
4
- import { handleComputeRecommend } from "../lib/lottery-tool-handlers.js";
5
- import { lotteryRuntimeToken } from "../lib/runtime-state.js";
4
+ import { handleComputeRecommend } from "../../../../lib/lottery-tool-handlers.js";
5
+ import { lotteryRuntimeToken } from "../../../../lib/runtime-state.js";
6
6
  export default defineAgentTool({
7
7
  description: 'Compute lottery recommendation numbers via F/O/T stats engine',
8
8
  inputSchema: z.object({ game: z.string().min(1) }),
@@ -1,7 +1,7 @@
1
1
  import { defineAgentTool } from '@zhin.js/tool';
2
2
  import { z } from 'zod';
3
- import { handleComputeRecommend } from '../src/lottery-tool-handlers.js';
4
- import { lotteryRuntimeToken } from '../src/runtime-state.js';
3
+ import { handleComputeRecommend } from '../../../../src/lottery-tool-handlers.js';
4
+ import { lotteryRuntimeToken } from '../../../../src/runtime-state.js';
5
5
 
6
6
  export default defineAgentTool<{ game: string }>({
7
7
  description: 'Compute lottery recommendation numbers via F/O/T stats engine',
@@ -1,8 +1,8 @@
1
1
  // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
2
  import { defineAgentTool } from '@zhin.js/tool';
3
3
  import { z } from 'zod';
4
- import { handleGetModelState } from "../lib/lottery-tool-handlers.js";
5
- import { lotteryRuntimeToken } from "../lib/runtime-state.js";
4
+ import { handleGetModelState } from "../../../../lib/lottery-tool-handlers.js";
5
+ import { lotteryRuntimeToken } from "../../../../lib/runtime-state.js";
6
6
  export default defineAgentTool({
7
7
  description: 'Query model weights and historical hit rate per game',
8
8
  inputSchema: z.object({ game: z.string().min(1).optional() }),
@@ -1,7 +1,7 @@
1
1
  import { defineAgentTool } from '@zhin.js/tool';
2
2
  import { z } from 'zod';
3
- import { handleGetModelState } from '../src/lottery-tool-handlers.js';
4
- import { lotteryRuntimeToken } from '../src/runtime-state.js';
3
+ import { handleGetModelState } from '../../../../src/lottery-tool-handlers.js';
4
+ import { lotteryRuntimeToken } from '../../../../src/runtime-state.js';
5
5
 
6
6
  export default defineAgentTool<{ game?: string }>({
7
7
  description: 'Query model weights and historical hit rate per game',
@@ -1,9 +1,9 @@
1
1
  // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
2
  import { defineAgentTool } from '@zhin.js/tool';
3
3
  import { z } from 'zod';
4
- import { parseGameId } from "../lib/games/registry.js";
5
- import { loadDraws } from "../lib/db.js";
6
- import { lotteryRuntimeToken } from "../lib/runtime-state.js";
4
+ import { parseGameId } from "../../../../lib/games/registry.js";
5
+ import { loadDraws } from "../../../../lib/db.js";
6
+ import { lotteryRuntimeToken } from "../../../../lib/runtime-state.js";
7
7
  export default defineAgentTool({
8
8
  description: 'Query historical lottery draws',
9
9
  inputSchema: z.object({ game: z.string().min(1), count: z.number().int().positive().optional() }),
@@ -1,8 +1,8 @@
1
1
  import { defineAgentTool } from '@zhin.js/tool';
2
2
  import { z } from 'zod';
3
- import { parseGameId } from '../src/games/registry.js';
4
- import { loadDraws } from '../src/db.js';
5
- import { lotteryRuntimeToken } from '../src/runtime-state.js';
3
+ import { parseGameId } from '../../../../src/games/registry.js';
4
+ import { loadDraws } from '../../../../src/db.js';
5
+ import { lotteryRuntimeToken } from '../../../../src/runtime-state.js';
6
6
 
7
7
  export default defineAgentTool<{ game: string; count?: number }>({
8
8
  description: 'Query historical lottery draws',
@@ -1,8 +1,8 @@
1
1
  // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
2
  import { defineAgentTool } from '@zhin.js/tool';
3
3
  import { z } from 'zod';
4
- import { handleListPending } from "../lib/lottery-tool-handlers.js";
5
- import { lotteryRuntimeToken } from "../lib/runtime-state.js";
4
+ import { handleListPending } from "../../../../lib/lottery-tool-handlers.js";
5
+ import { lotteryRuntimeToken } from "../../../../lib/runtime-state.js";
6
6
  export default defineAgentTool({
7
7
  description: 'List pending lottery predictions awaiting review',
8
8
  inputSchema: z.object({ game: z.string().min(1).optional() }),
@@ -1,7 +1,7 @@
1
1
  import { defineAgentTool } from '@zhin.js/tool';
2
2
  import { z } from 'zod';
3
- import { handleListPending } from '../src/lottery-tool-handlers.js';
4
- import { lotteryRuntimeToken } from '../src/runtime-state.js';
3
+ import { handleListPending } from '../../../../src/lottery-tool-handlers.js';
4
+ import { lotteryRuntimeToken } from '../../../../src/runtime-state.js';
5
5
 
6
6
  export default defineAgentTool<{ game?: string }>({
7
7
  description: 'List pending lottery predictions awaiting review',
@@ -1,8 +1,8 @@
1
1
  // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
2
  import { defineAgentTool } from '@zhin.js/tool';
3
3
  import { z } from 'zod';
4
- import { handleSavePrediction } from "../lib/lottery-tool-handlers.js";
5
- import { lotteryRuntimeToken } from "../lib/runtime-state.js";
4
+ import { handleSavePrediction } from "../../../../lib/lottery-tool-handlers.js";
5
+ import { lotteryRuntimeToken } from "../../../../lib/runtime-state.js";
6
6
  export default defineAgentTool({
7
7
  description: 'Save a pending lottery prediction',
8
8
  inputSchema: z.object({ game: z.string().min(1), numbers_json: z.string().min(1) }),
@@ -1,7 +1,7 @@
1
1
  import { defineAgentTool } from '@zhin.js/tool';
2
2
  import { z } from 'zod';
3
- import { handleSavePrediction } from '../src/lottery-tool-handlers.js';
4
- import { lotteryRuntimeToken } from '../src/runtime-state.js';
3
+ import { handleSavePrediction } from '../../../../src/lottery-tool-handlers.js';
4
+ import { lotteryRuntimeToken } from '../../../../src/runtime-state.js';
5
5
 
6
6
  export default defineAgentTool<{ game: string; numbers_json: string }>({
7
7
  description: 'Save a pending lottery prediction',
@@ -1,8 +1,8 @@
1
1
  // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
2
  import { defineAgentTool } from '@zhin.js/tool';
3
3
  import { z } from 'zod';
4
- import { handleStatsSnapshot } from "../lib/lottery-tool-handlers.js";
5
- import { lotteryRuntimeToken } from "../lib/runtime-state.js";
4
+ import { handleStatsSnapshot } from "../../../../lib/lottery-tool-handlers.js";
5
+ import { lotteryRuntimeToken } from "../../../../lib/runtime-state.js";
6
6
  export default defineAgentTool({
7
7
  description: 'Get stats snapshot for a lottery game',
8
8
  inputSchema: z.object({ game: z.string().min(1) }),
@@ -1,7 +1,7 @@
1
1
  import { defineAgentTool } from '@zhin.js/tool';
2
2
  import { z } from 'zod';
3
- import { handleStatsSnapshot } from '../src/lottery-tool-handlers.js';
4
- import { lotteryRuntimeToken } from '../src/runtime-state.js';
3
+ import { handleStatsSnapshot } from '../../../../src/lottery-tool-handlers.js';
4
+ import { lotteryRuntimeToken } from '../../../../src/runtime-state.js';
5
5
 
6
6
  export default defineAgentTool<{ game: string }>({
7
7
  description: 'Get stats snapshot for a lottery game',
@@ -1,9 +1,9 @@
1
1
  // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
2
  import { defineAgentTool } from '@zhin.js/tool';
3
3
  import { z } from 'zod';
4
- import { parseGameId } from "../lib/games/registry.js";
5
- import { lotteryRuntimeToken } from "../lib/runtime-state.js";
6
- import { runDataSync } from "../lib/sync/run-sync.js";
4
+ import { parseGameId } from "../../../../lib/games/registry.js";
5
+ import { lotteryRuntimeToken } from "../../../../lib/runtime-state.js";
6
+ import { runDataSync } from "../../../../lib/sync/run-sync.js";
7
7
  export default defineAgentTool({
8
8
  description: 'Sync official lottery draws into DB',
9
9
  inputSchema: z.object({ game: z.string().min(1).optional() }),
@@ -1,8 +1,8 @@
1
1
  import { defineAgentTool } from '@zhin.js/tool';
2
2
  import { z } from 'zod';
3
- import { parseGameId } from '../src/games/registry.js';
4
- import { lotteryRuntimeToken } from '../src/runtime-state.js';
5
- import { runDataSync } from '../src/sync/run-sync.js';
3
+ import { parseGameId } from '../../../../src/games/registry.js';
4
+ import { lotteryRuntimeToken } from '../../../../src/runtime-state.js';
5
+ import { runDataSync } from '../../../../src/sync/run-sync.js';
6
6
 
7
7
  export default defineAgentTool<{ game?: string }>({
8
8
  description: 'Sync official lottery draws into DB',
package/src/memory-db.ts CHANGED
@@ -44,7 +44,7 @@ const TABLE_NAMES = [
44
44
  ] as const;
45
45
 
46
46
  /**
47
- * Slice-2 fallback while Plugin Runtime has no DatabaseFeature Resource path.
47
+ * In-memory fallback for runtimes without a DatabaseHost.
48
48
  * Enough for smoke: today/history/stats/train/backtest/pipeline no longer return「数据库未就绪」.
49
49
  */
50
50
  export function createInMemoryLotteryDb(): LotteryDb {
package/agent/agent.ts DELETED
@@ -1,6 +0,0 @@
1
- import { defineAgent } from '@zhin.js/agent';
2
-
3
- export default defineAgent({
4
- description: 'Multi-game lottery analysis pipeline: sync, review, recommend, publish.',
5
- keywords: ['lottery', 'caipiao', 'kl8', 'ssq'],
6
- });
@@ -1,2 +0,0 @@
1
- You are the lottery plugin agent. Use typed tools for sync, stats, recommendations, and reviews.
2
- Always include the standard disclaimer in published reports. Prefer exact numbers from tools over guessing.