@taptap/maker 0.0.38 → 0.0.39-beta.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.
@@ -0,0 +1,85 @@
1
+ # Maker Assets and Game Services
2
+
3
+ Read only for asset generation/editing, ads, test QR or online game feedback.
4
+
5
+ ## Maker Creative Asset Tool Policy
6
+
7
+ Maker MCP provides image, video, music, sound-effect, dialogue/voice, and 3D asset tools for Maker
8
+ projects. These tools keep generated files inside the project, record remote mappings for later
9
+ editing, and can forward resolvable local reference media as data URLs when the remote tool schema
10
+ supports it. Follow the selected tool schema when one of these tools is used.
11
+
12
+ - Use `generate_image` for one image.
13
+ - Use `batch_generate_images` for multiple images.
14
+ - Use `edit_image` for modifying project images.
15
+ - Use `create_video_task` for game videos and image/video referenced generation.
16
+ - Only call `create_video_task` after the user explicitly requests video generation. Do not generate
17
+ video proactively while implementing gameplay, filling asset gaps, or improving the game.
18
+ - Estimate video cost as duration times 200 credits per second for `model="2.0"`, 300 for
19
+ `model="2.5"`, and for `model="wan"` 42 at 480p, 84 at 720p, and 168 at 1080p. When resolution is
20
+ omitted, wan is billed as 1080p, so use 168 credits per second. If duration is omitted or `duration=-1`, estimate
21
+ at the model maximum. When the estimate exceeds 1000 credits, show the estimate and say actual
22
+ billing is determined at generation, wait for explicit confirmation, then repeat the same request
23
+ with `user_confirmed=true`. Do not pass `user_confirmed=true` before confirmation or at or below
24
+ 1000 credits.
25
+ - Use `query_video_task` to refresh video task status, release completed task quota, and fetch final videos.
26
+ - Use `text_to_music` for game music with Suno.
27
+ - Use `text_to_sound_effect` for one sound effect with Doubao Seed Audio.
28
+ - Use `batch_sound_effects` for multiple sound effects with Doubao Seed Audio.
29
+ - Use `text_to_dialogue` for final character dialogue with ElevenLabs Eleven v3.
30
+ - `text_to_dialogue` reuses confirmed local ElevenLabs voice mappings. After confirmation, pass only `character_name` and `text`.
31
+ - For ElevenLabs auditions, pass a detailed `character_description` and an `audition_line` of at least 100 characters. `candidate_count` is optional and accepts 1 to 3.
32
+ - After `audition_voices_for_character` returns previews, show them to the user and wait
33
+ for the user to choose. Do not select or confirm a voice automatically.
34
+ - Call `confirm_character_voice` only after the user explicitly chooses one preview.
35
+ - After confirmation, follow `next_step_hint`: call `text_to_dialogue` with the character name and
36
+ text only.
37
+ - Generated sound effects and dialogue are saved in the project.
38
+ - Voice audition previews are not saved to the project.
39
+ - Local MCP does not transcode generated audio to OGG.
40
+ - Follow each tool schema for supported local path, remote URL, and data URL inputs.
41
+ - Local proxy may convert resolvable local reference media to data URLs before forwarding.
42
+ - If a Maker proxy tool returns an error or `isError`, report the full remote result/error payload.
43
+ Include the server response payload so developers can diagnose the issue.
44
+ - Use `create_3d_asset` for the complete 3D asset lifecycle. Start with `action="start"`, poll
45
+ with `action="query"`, and use `action="continue"` only after explicit user approval of a
46
+ returned review step. Use `action="post_process"` for rigging, texturing, retopology, or format
47
+ conversion when supported by the remote schema.
48
+ - Preserve and inspect the complete remote 3D response. When `local_delivery.status` is `success`,
49
+ use the returned local model path. The local proxy materializes only the `model_files` copy/extract
50
+ instructions returned by the local runtime; report `delivery_failures` when no model can be delivered.
51
+ - For any ad-related request such as 广告, rewarded videos, play ads, ad ID, ad placement,
52
+ ad status, ad config, or `ShowRewardVideoAd`, first read `maker://ads-integration-guide`, then
53
+ follow it: confirm project -> `get_ad_config` -> verify remote/local configuration ->
54
+ project SDK docs -> implementation -> real-device validation.
55
+ - Keep the same explicit `target_dir` throughout. Remote success does not update local settings;
56
+ if local `@runtime.ad` is missing or differs, follow the guide before proceeding.
57
+ - Do not infer ad readiness from local SDK docs, `.maker-mcp/config.json`, or runtime callbacks.
58
+ If the primary local project configs are missing, keep ad config unavailable and do not call the
59
+ remote tool. Build only for an explicit user build/submit/remote Web preview request. If a successful build
60
+ still leaves local configs missing, explain the known limitation and do not automatically rebuild.
61
+ - Local window preview uses CLI and does not authorize commit or push.
62
+ - If `get_ad_config` reports missing `app_id` or `developer_id`, call `generate_test_qrcode` once
63
+ to generate test QR code metadata, then call `get_ad_config` again. Do not use publish-only tools
64
+ for this recovery path.
65
+ - If status or doctor reports `Maker project initialization` with `missing_project_json` or
66
+ `missing_taptap_identity`, follow that `next_action` before using tools that depend on remote
67
+ project config. `.project` directory presence alone is never proof of initialization; empty,
68
+ voice-mapping-only, and primary-config-incomplete directories remain buildable new-project state.
69
+ - For the current Maker game's online player feedback, including player-submitted game bug reports,
70
+ real-device game logs, or screenshots, or server/Lua logs for a specified game session,
71
+ call the Maker proxy `get_debug_feedbacks` tool only when it is exposed by the current Maker tool list.
72
+ This includes 当前 Maker 游戏的玩家反馈、
73
+ 玩家提交的游戏故障、真机游戏日志或截图、指定游戏会话的服务端/Lua 日志. It does not include
74
+ AI client, plugin, or other product feedback.
75
+ - Use local runtime log files only for the current local build/runtime session. Do not use local logs
76
+ as a substitute for remote player-submitted feedback.
77
+ - Before `edit_image`, resolve dragged or referenced images to a local project image path or CDN
78
+ URL. If the user references an attached/local image, inspect the attachment or workspace file path
79
+ first. If the image is under `assets/image`, pass that path. If only a file name is given, search
80
+ `assets/image` for the matching file.
81
+ - Do not call `edit_image` without an image path or CDN URL.
82
+
83
+ Generated assets should be saved by Maker MCP under `assets/image`, `assets/video`, or
84
+ `assets/audio`. `create_3d_asset` local runtime `model_files` instructions are materialized under
85
+ `assets/model`; use `local_delivery` for the usable model path and `preview_assets` for local review images.
@@ -0,0 +1,27 @@
1
+ # Local Console
2
+
3
+ Read only when opening, stopping or troubleshooting the console.
4
+
5
+ ## Local Web Console
6
+
7
+ Use the active Maker CLI/bundle for `console open`, not an unversioned npm package.
8
+ Opening the console only starts/reuses a loopback service, registers the explicit project
9
+ directory and opens its page. It does not authorize build, push, Runtime installation or preview.
10
+ Do not call init, build or preview just to open it. A missing/invalid directory is a selection
11
+ problem, not permission to clone a game. Without a known game directory, omit `--target-dir` so
12
+ the console shows the project list for the user to choose; never guess or choose the first project.
13
+
14
+ The Git page fast-forwards remote `main` only when the local branch has no unique commits and file
15
+ paths do not overlap. Uncommitted edits on other files stay in place. If local commits exist, or
16
+ the same files changed on both sides, the console does not rewrite history. Overlapping files open
17
+ a copyable prompt. Follow that prompt: explain both sides in plain language and wait for
18
+ confirmation before editing. Do not run pull, rebase, stash, reset, or checkout from that prompt,
19
+ and do not create a branch. If the page says the branch is not `main`, only tell the user Maker
20
+ uses `main`; do not switch branches unless the user asks.
21
+
22
+ The user selects the operation in the console. Each operation passes the selected project's
23
+ absolute target directory to the CLI. `console status --json` inspects the service;
24
+ `console stop --json` stops it only when no task is active. If a different Maker bundle owns
25
+ the running service, ask before stopping it. Never expose PAT or copy local session credentials
26
+ into project files. Console errors retain the CLI result; unknown results require verification,
27
+ not an automatic retry.
@@ -0,0 +1,45 @@
1
+ # AI Dev Kit Maintenance
2
+
3
+ Read only for missing/outdated dev-kit files or an explicit dev-kit update.
4
+
5
+ ## AI Dev Kit Preparation
6
+
7
+ `taptap-maker init` checks out the Maker project before preparing local development environment
8
+ files in the current working directory. Init reinstalls the dev kit after checkout and allows
9
+ dev-kit files to overwrite same-path local helper files; the managed `.gitignore` block keeps
10
+ those files local-only. The `.gitignore` file itself is a required Maker project file that should be
11
+ submitted to Maker Git.
12
+
13
+ `taptap-maker doctor`, `maker://status`, and `maker_status_lite` check the dev-kit top-level
14
+ entries and version state for an already bound Maker project. If `CLAUDE.md`, `examples/`,
15
+ `templates/`, or `urhox-libs/` are missing, or if the status reports `update_available: yes`, run
16
+ `taptap-maker dev-kit update` to refresh the managed dev kit files and the managed `.gitignore`
17
+ block. The update command replaces dev-kit managed entries so version metadata and local files stay
18
+ consistent. Do not call the version API directly from the skill; use the CLI/MCP status output.
19
+
20
+ The CLI checks the latest AI dev kit version for the current environment, downloads that version,
21
+ and records the installed version locally. If the version check is temporarily unavailable, the CLI
22
+ falls back to its built-in default download URL instead of blocking initialization.
23
+
24
+ After clone, use the bundled `taptap-maker-dev-kit-guide` skill to explain the installed dev-kit
25
+ resources to the local AI/Agent:
26
+
27
+ - `CLAUDE.md` is the AI development guide entry.
28
+ - `examples/` contains Maker development examples.
29
+ - `templates/` contains reusable templates.
30
+ - `urhox-libs/` contains engine APIs and capability references.
31
+
32
+ The CLI is responsible for deterministic file operations:
33
+
34
+ - extract the ZIP into the current directory after checkout
35
+ - skip the ZIP top-level `scripts` directory because it conflicts with Maker project code
36
+ - delete the downloaded `ai-dev-kit.zip` after extraction
37
+ - refresh the checked-out `.gitignore` managed block for installed dev-kit entries
38
+ - keep the dev-kit helper files ignored while submitting the `.gitignore` rules to Maker Git
39
+
40
+ Do not hand-write a custom download/unzip script while this CLI command is available.
41
+
42
+ If dev-kit network access is unavailable after clone succeeds, explain that the Maker project is
43
+ already checked out, but local AI development docs/API/demo support may be incomplete. Ask whether
44
+ the user wants to retry `taptap-maker init` for a full post-checkout dev-kit reinstall or continue
45
+ without the dev kit.
@@ -0,0 +1,141 @@
1
+ # MCP Diagnosis and Issue Reporting
2
+
3
+ Read only for MCP startup, missing tools, proxy failures or an authorized issue report.
4
+
5
+ ### Proxy Tools Missing From The Current Session
6
+
7
+ If Maker MCP is completely unavailable, tools are missing, the process exits immediately, or the
8
+ client reports `-32000`, `Connection closed`, or `command not found`, do not call Maker MCP tools
9
+ for the initial diagnosis. Work offline first:
10
+
11
+ 1. Find the MCP config file the current client actually reads and back it up.
12
+ 2. Attempt `taptap-maker mcp verify --json`. It verifies the stable self runtime by default; use
13
+ `--mode npx` only when diagnosing npm startup. If the command itself fails, keep that failure as
14
+ diagnostic evidence. If `taptap-maker` is not on PATH, reuse that config's absolute command and
15
+ ordered args, append `mcp verify --json`, and run the same argv directly.
16
+ 3. This command uses the same stable launcher as MCP install and completes MCP
17
+ initialize and tools/list, and returns launcher_kind, command, stage, tools, stderr, error, and
18
+ failure_type. It does not read the client's active config or validate WorkBuddy trust, client
19
+ config caching, or Roots.
20
+ In explicit npx mode, EPERM/EACCES or an unwritable npm cache is
21
+ `npm_environment_error`; prefer `mcp install --launcher self` instead of blindly changing
22
+ `~/.npm` ownership.
23
+ 4. First identify the active AI client from reliable evidence, then inspect and reproduce only that
24
+ client's active config path, command, ordered args, cwd, workspace/Roots, Node/npm/npx paths,
25
+ client PATH, exit status, and stderr.
26
+ 5. Only when the active client is confirmed to be WorkBuddy, verify both the `taptap-maker` server
27
+ entry and the account-level enable/trust state. Do not edit account trust storage automatically;
28
+ ask the user to enable it in WorkBuddy.
29
+ 6. Never use one client's configuration or trust state to diagnose another client. `doctor` does not
30
+ inspect the active AI client's loaded tools or configuration.
31
+ 7. On Windows, configs written by the CLI default to absolute Node plus the versioned self runtime.
32
+ Explicit npx mode uses absolute Node/npm. Treat existing `cmd.exe` or `npx.cmd` configs as legacy
33
+ diagnostic evidence; do not persist them as a repair. Never replace cwd with a
34
+ `cd /d "<project>" && npx.cmd ...` command string, including for Chinese project paths.
35
+ 8. For DSH, inspect `$DSH_HOME/cordis.patch.yml` (default `~/.dsh/cordis.patch.yml`) and any active
36
+ profile `cordis.yml`/`cordis.patch.yml`. The generated Maker plugin uses the stable self runtime,
37
+ `failOnStartupError: true`, and `toolCallTimeoutMs: 3600000`; DSH hot-reloads the patch without an
38
+ IDE restart. A new plugin row must be inside a Cordis `insert` patch; a bare top-level id patch
39
+ cannot create the row over an empty root. A fixed project `cwd` is invalid. If calls fail at about 60 seconds, repair the
40
+ active plugin config with `taptap-maker install` before diagnosing Maker server
41
+ latency.
42
+ 9. User-level MCP config must not contain a project cwd. If WorkBuddy or DSH does not expose Roots, pass
43
+ `target_dir` on the concrete Maker tool call and record the process actual cwd only as diagnostic
44
+ evidence.
45
+ If cwd fallback is unbound, project-related proxy calls return `evaluated_target_dir` and
46
+ `project_context_source` before remote access. Fix Roots or pass the correct `target_dir`.
47
+ 10. Do not assume Windows 8.3 short paths exist or differ from the original long path. Verify the
48
+ result first; an unchanged or missing short path is not a usable cwd workaround.
49
+ 11. Reproduce the configured Windows launch with the same direct argv boundary when possible.
50
+ Separate outer shell quoting or stderr decoding failures from the MCP child process result, and
51
+ record both without treating wrapper failures as server evidence.
52
+ 12. Remember that multiple AI conversations share user-level MCP config. One conversation can break
53
+ every other conversation by rewriting the shared command or manually adding a project cwd.
54
+ 13. Classify the root cause from evidence before repairing it. Do not automatically change trust
55
+ storage, PATH, cwd, credentials, or game code. Use `taptap-maker install` only after evidence
56
+ confirms that the active config entry is damaged; it auto-detects clients and keeps unchanged
57
+ entries untouched. Reconnect and verify again in both the current and a new conversation.
58
+
59
+ If the MCP connection is established but a tool or resource call fails, including `-32003`, use a
60
+ separate evidence-first runtime-error workflow. Do not assign a fixed meaning to `-32003`; preserve
61
+ the exact client error. `mcp verify` is not the primary check for an already connected session
62
+ because it tests only the local launcher and stdio MCP path. Collect the failed tool/resource, redacted
63
+ request parameters, current `tools/list`, exact error code/message/data, complete sanitized
64
+ `remote_result`, request/correlation IDs, timestamp with timezone, OS/architecture, AI client and
65
+ `@taptap/maker` package versions, and stable reproduction steps. Preserve useful nested error,
66
+ warning, debug, and remote status fields while removing credentials. Do not rewrite command, cwd,
67
+ PATH, trust state, credentials, or game code unless the collected evidence identifies that cause.
68
+
69
+ Only after the base Maker MCP connection works should you use the following MCP-based context checks.
70
+
71
+ If the user is in a bound Maker project but `generate_image`, `batch_generate_images`, `edit_image`,
72
+ `create_video_task`, `query_video_task`, `text_to_music`, `text_to_sound_effect`,
73
+ `batch_sound_effects`, `text_to_dialogue`, `audition_voices_for_character`,
74
+ `confirm_character_voice`, `create_3d_asset`,
75
+ `generate_test_qrcode`, `get_ad_config`, or `get_debug_feedbacks` are missing from the current AI
76
+ tool list, do not diagnose project cwd as the registration cause. Current Maker MCP registers every
77
+ whitelisted proxy tool from local definitions before resolving cwd, project binding, auth, or the
78
+ remote proxy:
79
+
80
+ 1. Capture the active client's exact `tools/list` and loaded `@taptap/maker` version.
81
+ 2. Verify the configured launcher with `taptap-maker mcp verify --json`; a successful current
82
+ launcher plus a stale active tool list indicates client/session caching, not missing project auth.
83
+ 3. Reconnect the active Maker MCP once from the client UI or start a new session so it loads the
84
+ current package. Do not rewrite a user-level cwd to make proxy tools appear.
85
+ 4. After the tools are present, read status. `MCP project context cwd` with `status: mismatch` means
86
+ calls without `target_dir` may select an unbound or wrong project; the tools remain registered.
87
+ Use the active workspace/MCP Roots or pass the real project directory as `target_dir` for that call.
88
+
89
+ When Maker proxy tools are missing, explain that this is likely a session/configuration problem and
90
+ that requests specifically requiring those tools cannot use them in the current session.
91
+
92
+ ### Maker MCP Issue Reporting
93
+
94
+ Use this flow only for likely Maker infrastructure or integration defects. Examples include MCP
95
+ startup failure, `Connection closed`, unexpected missing tools, proxy connection failure, request
96
+ timeout, repeated reconnect failure, HTTP 5xx/unavailable responses, or an unclassified internal
97
+ server error. Diagnose enough to distinguish these from expected user or project errors before
98
+ offering a report.
99
+
100
+ Do not propose issue reporting for expected user or project errors such as invalid parameters,
101
+ missing project files, expired login with a documented recovery, user cancellation, project Lua
102
+ compile errors, or other business validation errors with a concrete next action.
103
+
104
+ Ask once per distinct failure fingerprint in the current conversation. Use the failed operation,
105
+ error code, and stable error message as the fingerprint. If the user declines, do not ask again for
106
+ that fingerprint during the conversation. A materially different infrastructure failure may be
107
+ offered once separately.
108
+
109
+ Before collecting or submitting, ask in the user's language. Explain that the report contains the
110
+ sanitized error, only the active client's Maker MCP entry, local runtime/Maker status, and current
111
+ workspace context. State that it excludes PAT/token values, other MCP servers, project source, and
112
+ the complete conversation. A suitable Chinese prompt is:
113
+
114
+ > Maker MCP 似乎遇到了连接或服务异常。是否允许我收集已脱敏的报错、Maker MCP 配置和运行环境,
115
+ > 并提交到官方 GitHub Issue,帮助开发团队定位和修复?不会上传 PAT/token、完整聊天或项目源码。
116
+
117
+ Only after explicit consent, create a compact JSON object with the useful current-session evidence:
118
+ summary, exact sanitized error, failed operation, error code/data, sanitized `remote_result`,
119
+ request/correlation ID, reproduction steps, visible Maker tools, client version, and workspace roots.
120
+ Do not include the complete conversation. Send that JSON through stdin, never argv, while running:
121
+
122
+ ```text
123
+ npx -y --package @taptap/maker@0.0.39-beta.1 taptap-maker mcp report --ide <client> --target-dir <project> --context-stdin --consent --json
124
+ ```
125
+
126
+ Prefer the active client's exact Maker MCP `command` plus ordered `args`, then append the `mcp
127
+ report` arguments above. This preserves the installed beta/stable version and, on Windows, the
128
+ absolute `node.exe` plus `npm-cli.js` launcher. Use the npx fallback only when it contains the exact
129
+ installed Maker version. Never use an unversioned package spec,
130
+ assume `taptap-maker` or `npx` is on PATH, or build a `cmd /c`, `cd && npx`, or PowerShell wrapper.
131
+ For DSH, read only the active Maker plugin from the user/profile Cordis YAML and reuse its
132
+ `config.command` plus ordered `config.args`; do not upload other DSH plugins or environment values.
133
+ If neither an exact configured launcher nor an exact version is available, explain that automatic
134
+ collection cannot start, show the manual Issue URL, and continue the original task.
135
+
136
+ Do not ask for a second confirmation after the user consents. If the result is `created`, show the
137
+ returned Issue URL. If the result is `manual_required`, clearly tell the user that automatic GitHub
138
+ submission was unavailable, show the returned sanitized title/body, and provide the returned manual
139
+ Issue URL. This fallback is informational: it must not block troubleshooting or the user's original
140
+ Maker task. If the result is `consent_required`, do not submit; ask for consent because the required
141
+ authorization was not provided.
@@ -0,0 +1,239 @@
1
+ # Maker Git and Remote Build
2
+
3
+ Read only for sync, submit, push, remote build, conflict recovery or
4
+ `.project/settings.json` repair.
5
+
6
+ ## Maker Git Workflow Policy
7
+
8
+ This policy overrides generic local Git skills and generic Git workflows whenever the current
9
+ directory is a Maker project, which means `.maker-mcp/config.json` exists in the project or one of
10
+ its parents.
11
+
12
+ Use `maker_build_current_directory` for submit, push, build, explicitly remote Web preview, and remote game result
13
+ verification requests in a bound Maker project.
14
+ Do not treat generic code checks like "验证代码", "跑测试", "lint", or "检查实现" as Maker
15
+ remote build unless the user explicitly asks for the remote build workflow. Local preview uses CLI.
16
+ Do not create feature branches, task branches, PR/MR. Do not create task-id based Git flows for
17
+ Maker project submit/build work. Do not run generic Git commit/push helpers as a replacement for
18
+ the Maker MCP tool.
19
+
20
+ `maker_build_current_directory` owns the Maker safety gate. It checks remote sync before creating a
21
+ commit. When local `main` is only behind Maker remote, it fast-forwards before committing. When
22
+ local and remote both have new commits, it merges `origin/main` after the local commit. When the
23
+ push is rejected because the Maker cloud workspace has uncommitted changes (`Working directory has
24
+ unstaged changes` / `Could not update working tree to new HEAD`), it commits the cloud changes
25
+ through the cloud Git API, merges them, and pushes once more. Merge conflicts are aborted and
26
+ reported as `merge_conflict` with `conflict_files`; resolve them, commit, and retry. It stops when
27
+ the branch is not `main`, remote sync cannot be verified, or fast-forward would overwrite local
28
+ changes.
29
+
30
+ Maker Git CLI (all commands print JSON; `--target-dir` defaults to the current directory):
31
+
32
+ - `taptap-maker git status` - local state and ahead/behind against `origin/main` (fetches).
33
+ - `taptap-maker git sync` - fetch, then fast-forward or merge `origin/main`; aborts on conflicts.
34
+ - `taptap-maker git push [--message MSG]` - the same sync/commit/push/cloud-repair flow as the
35
+ build tool, without the remote build.
36
+ - `taptap-maker git cloud-status` / `cloud-diff [--path PATH] [--staged]` - read the Maker cloud
37
+ workspace state and diff. Untracked cloud files are not in the diff.
38
+ - `taptap-maker git cloud-commit --message MSG (--all | PATH...)` - commit cloud workspace changes
39
+ (project owner only). Run it only when the user explicitly asks; the web agent may still be
40
+ editing those files. The automatic cloud commit inside push needs no extra confirmation. Never retry it after a timeout or `outcomeUnknown`; run `cloud-status`
41
+ first, because the commit may already have succeeded.
42
+
43
+ The root `.gitignore` is a required Maker project file. If it changes after binding or dev-kit
44
+ updates, include it with the game changes and mention it in the submit summary. Do not omit it from
45
+ selected files.
46
+
47
+ ## Build Settings
48
+
49
+ For multiplayer builds, use `maker_build_current_directory` structured parameters instead of
50
+ editing project JSON directly. `entry_client` / `entry_server` map to `project.json`
51
+ `entry@client` / `entry@server`; `multiplayer.enabled`, `max_players`, `background_match`,
52
+ `match_info`, and `persistent_world` map to `.project/settings.json` `@runtime.multiplayer`.
53
+ On the first multiplayer build, pass `multiplayer.enabled=true` together with
54
+ `entry_client` / `entry_server`. Send multiplayer settings only when the user explicitly provides
55
+ them; missing local `.project/settings.json` must not inject `enabled=false`. The remote build keeps
56
+ omitted multiplayer fields unchanged on later builds.
57
+
58
+ Maker status, status_lite, and doctor run a lightweight `.project/settings.json` health check.
59
+ Normal `maker_build_current_directory` blocks before commit/push when settings JSON is invalid or
60
+ build-critical fields are damaged. `$schema`, `sources`, and `build` must keep the default build
61
+ shape; `sources.*.tag` must be `stable` for online user projects, and `build.asset_ignores` only
62
+ needs to exist. Do not edit settings build fields directly for feature work; restore only the
63
+ build-critical fields when the check fails, and preserve valid `@runtime` config.
64
+ The health checker itself is read-only. When repair is needed, prefer the exact
65
+ file from Git or an intact misplaced copy; only repair fixed fields in a parseable
66
+ settings object. Never synthesize project identity, entry, version, publish metadata,
67
+ or resource groups from defaults. With user confirmation, missing settings defaults may
68
+ be added without overwriting existing intent: `$schema`, `build.output_dir=../dist`,
69
+ `build.asset_dirs=["../assets","../scripts"]`, `build.generate_fs_path=true`,
70
+ `build.asset_ignores=[]`, `assets_7z_threshold=50`, `preload_include_refs=true`,
71
+ `trim_remote_refs=true`, `legacy_binary=false`, and `tags={}`. Do not invent locked
72
+ `sources.*.tag` values; recover them from Git or an intact copy. `entry=main.lua`
73
+ is only safe after confirming that the project uses that entry script.
74
+
75
+ ## Remote Sync Status
76
+
77
+ For a bound Maker project, detailed status includes `Maker remote sync`. Read the default local summary
78
+ before routine work; use `maker_status_lite` with `detail: true` before explicit sync diagnostics:
79
+
80
+ - For frequent polling or quick local-only status checks, call the default `maker_status_lite`; it is
81
+ already local-only. In detail mode, pass `skip_remote_sync: true` to avoid `git fetch origin` and
82
+ AI dev kit latest-version network round trips.
83
+ - `up_to_date`: continue development.
84
+ - For an explicit submit/build request, call `maker_build_current_directory` directly when status is
85
+ `needs_pull`. The tool attempts `git merge --ff-only origin/main` before creating the local commit.
86
+ If Git refuses because remote files overlap local edits, the tool stops and preserves the workspace.
87
+ - `needs_pull`: run `taptap-maker git sync --target-dir <PROJECT_DIR>` before editing. Local
88
+ uncommitted edits are kept; if remote changes touch the same files, Git refuses and keeps the
89
+ local files, so commit the local edits first and sync again.
90
+ - `diverged`: run `taptap-maker git sync`, or call `maker_build_current_directory` directly for a
91
+ submit/build request; both merge `origin/main`. On conflicts the merge is aborted and the
92
+ conflict files are listed.
93
+ - `branch_not_allowed`: Maker only accepts `main`; switch/migrate local commits to `main` before
94
+ build or submit.
95
+ - `remote_unavailable`: follow the failure classification and retry later only for temporary
96
+ 5xx/network/timeout failures.
97
+
98
+ ## Local Change Review
99
+
100
+ Before submitting, run local Git inspection when available:
101
+
102
+ ```bash
103
+ git status --short --branch
104
+ git diff --stat
105
+ ```
106
+
107
+ If the change set is small, inspect relevant diffs before summarizing. Do not paste large diffs
108
+ unless the user asks. Summaries should be understandable to non-programmers:
109
+
110
+ - what changed
111
+ - why these files are being submitted
112
+ - whether any generated or suspicious files are included
113
+
114
+ For normal remote build/Web-preview/game-result verification requests, a clean workspace still goes through
115
+ `maker_build_current_directory`; Maker MCP creates and pushes an empty
116
+ `chore: wake maker build server` commit before remote build to wake the Maker server.
117
+ Only skip submit/push when the user explicitly asks to build the committed remote version.
118
+
119
+ ## Submit And Push
120
+
121
+ For Maker projects, user words like "提交", "提交代码", "推送", "push", or "提交到 Maker"
122
+ mean:
123
+
124
+ ```text
125
+ commit + push + Maker build
126
+ ```
127
+
128
+ Use `maker_build_current_directory` for this path. Do not use generic Git task-id,
129
+ branch-creation, or PR rules inside Maker project repositories.
130
+
131
+ `maker_build_current_directory` owns the safety gate before commit/push. When local `main` is only
132
+ behind Maker remote, it automatically fast-forwards before creating a local commit. When history is
133
+ diverged, it merges `origin/main` after the local commit. When the Maker cloud workspace blocks the
134
+ push, it commits the cloud changes, merges them and pushes once more. It stops when the branch is
135
+ not `main`, remote sync cannot be verified, fast-forward would overwrite local changes, or a merge
136
+ conflicts (the merge is aborted). Do not work around this by creating a new branch,
137
+ requesting a task id, running generic Git commit/push, or opening a PR/MR.
138
+
139
+ If `.gitignore` changed after Maker binding or dev-kit update, include it in the submit summary.
140
+ The root `.gitignore` is a Maker project file generated/maintained by the local workflow and must
141
+ be submitted with the game changes; do not omit it from selected files.
142
+
143
+ If `maker_build_current_directory` returns a build failure after a successful push, report both:
144
+
145
+ - submit/push succeeded
146
+ - build failed, with the concrete build error
147
+
148
+ If `maker_build_current_directory` returns a successful remote build, check
149
+ `runtime_logs.watch_started`. The MCP starts the local watcher as a detached CLI process. The
150
+ standard command is:
151
+
152
+ ```bash
153
+ taptap-maker logs watch --target-dir <PROJECT_ROOT> --reset --interval 5s
154
+ ```
155
+
156
+ This CLI flow clears old local runtime logs before polling, then appends server-shaped rows to
157
+ `.maker/logs/runtime/runtime.log`. Do not start a second watcher unless the first one failed to
158
+ start. For gameplay/runtime diagnostics after a successful build, read
159
+ `runtime_logs.local_file`. To check whether the watcher is alive or failing, read
160
+ `runtime_logs.state_file`.
161
+
162
+ Watcher protection rules:
163
+
164
+ - The watcher owns `.maker/logs/runtime/watcher.pid`; a new watcher replaces the old watcher for
165
+ the same project before writing logs.
166
+ - Temporary poll failures are retried by default. Treat `logs_poll_error` as diagnostic output,
167
+ not as a final failure, unless the watcher exits.
168
+ - If server cursor metadata lags behind returned log timestamps, the local cursor is advanced past
169
+ the newest written log. Local log writing appends server-returned rows as-is.
170
+ - `.maker/logs/runtime/state.json` records heartbeat fields including `lastPollAt`,
171
+ `lastSuccessAt`, `lastWrittenLogs`, `consecutiveFailures`, and `lastError`.
172
+
173
+ If submit created a local commit but push failed because the Maker remote was temporarily
174
+ unavailable, do not run a manual generic `git push`. Fix the reported cause if needed, then retry
175
+ `maker_build_current_directory`. Maker MCP will detect committed-but-unpushed local commits and push
176
+ them before build.
177
+
178
+ If the user explicitly asks "不提交", "直接构建", or "构建云端版本", call
179
+ `maker_build_current_directory` with `confirm_remote_build_without_submit=true`. In that mode, Maker
180
+ MCP builds the committed remote version only and does not auto-open Maker pages.
181
+
182
+ For push failures, use the returned `classification`, `retryable`, `retry_reason`, and
183
+ `retry_attempts` fields. Temporary 5xx/network/timeout failures may be retried with the Maker build
184
+ tool; `remote_rejected` means run `taptap-maker git sync` and retry; `cloud_workspace_blocked` means
185
+ the automatic cloud commit did not finish (follow `next_action`); `merge_conflict` means resolve
186
+ `conflict_files`, commit, and retry; `auth` means refreshing PAT;
187
+ `branch_not_allowed` means Maker remote only accepts `main`; `forbidden_path` means the remote
188
+ pre-receive hook rejected one or more paths/directories and the forbidden pattern from stderr must
189
+ be removed from the unpushed commit before retrying.
190
+
191
+ When a Maker tool output contains `push_recovery`, follow it exactly:
192
+
193
+ - Tell the user the local commit is preserved but not yet on Maker remote.
194
+ - Do not ask for permission to run a generic `git push`.
195
+ - Retry with `maker_build_current_directory` for submit and build requests.
196
+ - If the failure is `remote_rejected`, run `taptap-maker git sync`, then retry; do not create a new
197
+ branch or PR.
198
+ - If the failure is `merge_conflict`, the merge was already aborted. Explain both sides of each
199
+ `conflict_files` entry, ask before editing, commit the resolution, then retry.
200
+ - If the failure is `branch_not_allowed`, do not sync or merge. Tell the user Maker only accepts
201
+ `main`, switch back to `main`, cherry-pick the preserved local commit there, then retry.
202
+ - If the failure is `forbidden_path`, do not refresh PAT. Read the forbidden pattern in stderr,
203
+ remove those paths from the unpushed commit while keeping local files, then retry after
204
+ `git status` is clean for them.
205
+
206
+ ## Pull And Conflict Handling
207
+
208
+ To pull, run `taptap-maker git sync --target-dir <PROJECT_DIR>`. It fetches, then fast-forwards or
209
+ merges `origin/main`, and keeps local uncommitted edits. If Git refuses because remote changes touch
210
+ locally edited files, commit the local edits first and sync again. Do not stash or rebase.
211
+
212
+ If sync returns `outcome: "conflict"`, the merge was already aborted. The working tree has no
213
+ conflict markers and `git status` will not show `UU`, `AA`, `DU`, or `UD`. Do not look for those
214
+ states.
215
+
216
+ 1. Use `conflictFiles` from the sync JSON. Do not invent paths that are not listed.
217
+ 2. For each path, compare the local file with `origin/main` (`git show origin/main:<path>`). The
218
+ local file is unchanged because the merge was aborted.
219
+ 3. Explain both sides and why they conflict, in plain language.
220
+ 4. Propose a resolution that keeps the needed parts of both sides.
221
+ 5. Ask for confirmation before editing files.
222
+ 6. After the user confirms, edit the files, commit the resolution, then run sync again.
223
+
224
+ If sync returns `outcome: "blocked"` because the merge could not be aborted, stop. Inspect
225
+ `git status` and ask the user; do not sync again and do not treat leftover markers as a normal
226
+ conflict result.
227
+
228
+ Do not hide unresolved conflicts. Only submit after the listed files are resolved and committed.
229
+
230
+ ## User Communication
231
+
232
+ Maker users may not understand Git terminology. Prefer concrete wording:
233
+
234
+ - "本地改动" instead of "working tree"
235
+ - "提交到 Maker" instead of "commit and push"
236
+ - "远端版本" instead of "origin/main"
237
+ - "冲突文件" instead of "unmerged paths"
238
+
239
+ Always explain the next irreversible step before taking it.