gamealgo-cli 0.3.8 → 0.3.9

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # GameAlgo CLI
2
2
 
3
- `gamealgo-cli` is the independently released command-line client for GameAlgo. It is intended for AI coding agents and game developers to manage integration plans, event dictionaries, reports, scripts, configuration, keys, and experiments.
3
+ `gamealgo-cli` is the independently released command-line client for GameAlgo. It is intended for AI coding agents and game developers to manage integration plans, event dictionaries, reports, scripts, configuration, keys, experiments, and game diagnosis.
4
4
 
5
5
  Source repository: <https://github.com/sunyuhao-code/GameAlgoCli>
6
6
 
@@ -51,8 +51,11 @@ The skill uses the project-bound CLI and live Server content. It can discover th
51
51
  ```bash
52
52
  gamealgo optimize list --json
53
53
  gamealgo optimize get ad-monetization --json
54
+ gamealgo diagnosis --json
54
55
  ```
55
56
 
57
+ `gamealgo diagnosis` returns the same structured competition, monetization, and retention diagnosis shown in the dashboard. It requires a Game Admin Key with `reports:read` and an account-verified Maker game binding; save the complete result with `--out diagnosis.json` when an agent needs to use it in a local workflow.
58
+
56
59
  Adjust S2S event forwarding can be configured with an explicit event allowlist:
57
60
 
58
61
  ```bash
package/dist/client.js CHANGED
@@ -209,6 +209,9 @@ export class GameAlgoAdminClient {
209
209
  const params = new URLSearchParams({ environment, platform });
210
210
  return await this.get(`/admin/v1/games/${encodeURIComponent(await this.gameId())}/integration/plan?${params.toString()}`);
211
211
  }
212
+ async getGameDiagnosis() {
213
+ return await this.get(`/admin/v1/games/${encodeURIComponent(await this.gameId())}/diagnosis`);
214
+ }
212
215
  async listOptimizationTasks() {
213
216
  return await this.get(`/admin/v1/games/${encodeURIComponent(await this.gameId())}/optimization/tasks`);
214
217
  }
@@ -0,0 +1,17 @@
1
+ import { parseFlags } from "../args.js";
2
+ import { printResult } from "../output.js";
3
+ import { writeTextFile } from "../resources.js";
4
+ export async function handleDiagnosis(client, args, global) {
5
+ const flags = parseFlags(args);
6
+ if (args.length)
7
+ throw new Error("usage: gamealgo diagnosis [--out diagnosis.json]");
8
+ if (flags.out === true)
9
+ throw new Error("--out requires a file path");
10
+ const diagnosis = await client.getGameDiagnosis();
11
+ if (typeof flags.out === "string") {
12
+ await writeTextFile(flags.out, `${JSON.stringify(diagnosis, null, 2)}\n`);
13
+ await printResult({ ok: true, out: flags.out }, global);
14
+ return;
15
+ }
16
+ await printResult(diagnosis, global);
17
+ }
package/dist/main.js CHANGED
@@ -13,6 +13,7 @@ import { handleSkill } from "./commands/skill.js";
13
13
  import { loadPackageMetadata } from "./config.js";
14
14
  import { handleDocs, handleHelp } from "./docs.js";
15
15
  import { handleDynamicConfig } from "./commands/dynamic-config.js";
16
+ import { handleDiagnosis } from "./commands/diagnosis.js";
16
17
  import { cliErrorPayload } from "./http.js";
17
18
  import { printResult } from "./output.js";
18
19
  export async function main() {
@@ -98,6 +99,10 @@ export async function main() {
98
99
  await handleIntegration(client, args, global);
99
100
  return;
100
101
  }
102
+ if (command === "diagnosis" || command === "diagnose") {
103
+ await handleDiagnosis(client, args, global);
104
+ return;
105
+ }
101
106
  if (command === "marketing") {
102
107
  await handleMarketing(client, args, global);
103
108
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gamealgo-cli",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "GameAlgo command-line client for AI agents and game developers",
5
5
  "repository": {
6
6
  "type": "git",
@@ -20,10 +20,11 @@ Run commands from the game repository that owns the integration. Before any game
20
20
  When the user asks what GameAlgo can do, asks for ongoing iteration, or names a broad optimization goal:
21
21
 
22
22
  1. Run `gamealgo optimize list --json` to load the complete current task catalog from the Server.
23
- 2. Treat the result as an unranked capability catalog. Do not claim that a task is recommended or ready until its prerequisites have been checked against the current game.
24
- 3. Once the user selects a task, or their request clearly identifies one, run `gamealgo optimize get <task-id> --json`.
25
- 4. For each topic named in the task's `docs` field, run `gamealgo docs <topic> --list --json`, then read the sections relevant to the selected task with `gamealgo docs <topic> --section <section-id>` before implementation.
26
- 5. Follow the returned `agentSteps` and use `deliverables` as the completion checklist.
23
+ 2. When making a recommendation for the current game, run `gamealgo diagnosis --json` as well. It returns the same structured competition, monetization, and retention diagnosis used by the dashboard. If it is unavailable, treat the diagnosis as an unmet prerequisite rather than fabricating a conclusion; it is available only to account-verified Maker games.
24
+ 3. Treat the result as an unranked capability catalog. Do not claim that a task is recommended or ready until its prerequisites have been checked against the current game.
25
+ 4. Once the user selects a task, or their request clearly identifies one, run `gamealgo optimize get <task-id> --json`.
26
+ 5. For each topic named in the task's `docs` field, run `gamealgo docs <topic> --list --json`, then read the sections relevant to the selected task with `gamealgo docs <topic> --section <section-id>` before implementation.
27
+ 6. Follow the returned `agentSteps` and use `deliverables` as the completion checklist.
27
28
 
28
29
  Do not run every catalog task in sequence. Complete the selected task and report unmet prerequisites instead of manufacturing missing data.
29
30