@taptap/maker 0.0.6 → 0.0.8
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 +1 -1
- package/dist/maker.js +29 -96
- package/package.json +1 -1
- package/skills/taptap-maker-local/SKILL.md +14 -17
package/README.md
CHANGED
package/dist/maker.js
CHANGED
|
@@ -29436,7 +29436,7 @@ async function cloneMakerProject(options) {
|
|
|
29436
29436
|
});
|
|
29437
29437
|
await setOrigin(target, authUrl);
|
|
29438
29438
|
try {
|
|
29439
|
-
transientRetries += await runGitWithTransientRetry(["fetch", "origin"], {
|
|
29439
|
+
transientRetries += await runGitWithTransientRetry(["fetch", "--progress", "origin"], {
|
|
29440
29440
|
cwd: target,
|
|
29441
29441
|
onProgress: options.onProgress
|
|
29442
29442
|
});
|
|
@@ -29452,7 +29452,7 @@ async function cloneMakerProject(options) {
|
|
|
29452
29452
|
authUrl = makeAuthenticatedGitUrl(gitUrl, pat.token);
|
|
29453
29453
|
retriedWithNewPat = true;
|
|
29454
29454
|
await setOrigin(target, authUrl);
|
|
29455
|
-
transientRetries += await runGitWithTransientRetry(["fetch", "origin"], {
|
|
29455
|
+
transientRetries += await runGitWithTransientRetry(["fetch", "--progress", "origin"], {
|
|
29456
29456
|
cwd: target,
|
|
29457
29457
|
onProgress: options.onProgress
|
|
29458
29458
|
}).catch((retryError) => {
|
|
@@ -29789,7 +29789,7 @@ function getMakerRemoteSyncFailureNextAction(failure) {
|
|
|
29789
29789
|
return "暂时无法检查 Maker 远端是否有新提交。请把 failure 信息反馈给用户;如果只是 503、5xx、超时或网络中断,可稍后重新读取 maker://status。";
|
|
29790
29790
|
}
|
|
29791
29791
|
function isIgnoredBuildGuardChange(file2) {
|
|
29792
|
-
return file2 === ".
|
|
29792
|
+
return file2 === ".maker-mcp" || file2.startsWith(".maker-mcp/");
|
|
29793
29793
|
}
|
|
29794
29794
|
async function readRemoteAheadBehindCounts(cwd, remoteRef) {
|
|
29795
29795
|
try {
|
|
@@ -30123,7 +30123,7 @@ async function cloneOrInitializeTarget(target, authUrl, pat, onProgress) {
|
|
|
30123
30123
|
onProgress
|
|
30124
30124
|
});
|
|
30125
30125
|
await setOrigin(target, authUrl);
|
|
30126
|
-
transientRetries += await runGitWithTransientRetry(["fetch", "origin"], {
|
|
30126
|
+
transientRetries += await runGitWithTransientRetry(["fetch", "--progress", "origin"], {
|
|
30127
30127
|
cwd: target,
|
|
30128
30128
|
onProgress
|
|
30129
30129
|
});
|
|
@@ -30144,7 +30144,7 @@ async function cloneOrInitializeTarget(target, authUrl, pat, onProgress) {
|
|
|
30144
30144
|
return transientRetries;
|
|
30145
30145
|
}
|
|
30146
30146
|
emitFirstCloneWaitNotice(onProgress, "clone");
|
|
30147
|
-
return runGitCaptureWithTransientRetry(["clone", authUrl, target], {
|
|
30147
|
+
return runGitCaptureWithTransientRetry(["clone", "--progress", authUrl, target], {
|
|
30148
30148
|
sanitize: pat,
|
|
30149
30149
|
onProgress
|
|
30150
30150
|
});
|
|
@@ -30843,8 +30843,9 @@ function getBundledSkillSourceDir(skillName) {
|
|
|
30843
30843
|
import fs6 from "node:fs";
|
|
30844
30844
|
import path7 from "node:path";
|
|
30845
30845
|
var DEFAULT_RUNTIME_LOG_SINCE_SECONDS = 600;
|
|
30846
|
+
var DEFAULT_RUNTIME_LOG_IDLE_TIMEOUT_MS = 10 * 60 * 1e3;
|
|
30846
30847
|
var MAX_RUNTIME_LOG_WINDOW_SECONDS = 3600;
|
|
30847
|
-
var DEFAULT_RUNTIME_LOG_TOPICS = ["user_script", "server_user_script"];
|
|
30848
|
+
var DEFAULT_RUNTIME_LOG_TOPICS = ["engine", "user_script", "server_user_script"];
|
|
30848
30849
|
var MERGED_RUNTIME_LOG_FILE = "runtime.log";
|
|
30849
30850
|
var RUNTIME_LOG_FILES_TO_RESET = [
|
|
30850
30851
|
MERGED_RUNTIME_LOG_FILE,
|
|
@@ -30861,6 +30862,7 @@ async function watchRuntimeLogs(options) {
|
|
|
30861
30862
|
resetRuntimeLogs(options.projectRoot);
|
|
30862
30863
|
}
|
|
30863
30864
|
const intervalMs = options.intervalMs ?? 5e3;
|
|
30865
|
+
const idleTimeoutMs = options.idleTimeoutMs ?? DEFAULT_RUNTIME_LOG_IDLE_TIMEOUT_MS;
|
|
30864
30866
|
const maxConsecutiveFailures = options.maxConsecutiveFailures;
|
|
30865
30867
|
const sleep2 = options.sleep || defaultSleep;
|
|
30866
30868
|
const nowMs = options.nowMs || Date.now;
|
|
@@ -30868,6 +30870,7 @@ async function watchRuntimeLogs(options) {
|
|
|
30868
30870
|
let writtenLogs = 0;
|
|
30869
30871
|
let lastResult;
|
|
30870
30872
|
let consecutiveFailures = 0;
|
|
30873
|
+
let idleStartedAt = nowMs();
|
|
30871
30874
|
for (; ; ) {
|
|
30872
30875
|
try {
|
|
30873
30876
|
const previousCursor = lastResult == null ? void 0 : lastResult.nextStartTime;
|
|
@@ -30884,8 +30887,25 @@ async function watchRuntimeLogs(options) {
|
|
|
30884
30887
|
lastResult = result;
|
|
30885
30888
|
consecutiveFailures = 0;
|
|
30886
30889
|
await ((_a3 = options.onPoll) == null ? void 0 : _a3.call(options, result));
|
|
30890
|
+
if (result.writtenLogs > 0) {
|
|
30891
|
+
idleStartedAt = nowMs();
|
|
30892
|
+
} else if (nowMs() - idleStartedAt >= idleTimeoutMs) {
|
|
30893
|
+
return {
|
|
30894
|
+
projectRoot: options.projectRoot,
|
|
30895
|
+
polls,
|
|
30896
|
+
writtenLogs,
|
|
30897
|
+
lastResult,
|
|
30898
|
+
stopReason: "idle_timeout"
|
|
30899
|
+
};
|
|
30900
|
+
}
|
|
30887
30901
|
if (options.maxPolls !== void 0 && polls >= options.maxPolls) {
|
|
30888
|
-
return {
|
|
30902
|
+
return {
|
|
30903
|
+
projectRoot: options.projectRoot,
|
|
30904
|
+
polls,
|
|
30905
|
+
writtenLogs,
|
|
30906
|
+
lastResult,
|
|
30907
|
+
stopReason: "max_polls"
|
|
30908
|
+
};
|
|
30889
30909
|
}
|
|
30890
30910
|
const cursorProgressed = previousCursor === void 0 ? result.writtenLogs > 0 : result.nextStartTime !== previousCursor;
|
|
30891
30911
|
if (!result.hasMore || !cursorProgressed) {
|
|
@@ -30980,23 +31000,6 @@ function readRuntimeLogState(projectRoot) {
|
|
|
30980
31000
|
return null;
|
|
30981
31001
|
}
|
|
30982
31002
|
}
|
|
30983
|
-
function formatRuntimeLogPullResult(result) {
|
|
30984
|
-
return [
|
|
30985
|
-
"✓ Maker runtime logs pulled once",
|
|
30986
|
-
"",
|
|
30987
|
-
`- project_root: ${result.projectRoot}`,
|
|
30988
|
-
`- query_args: ${JSON.stringify(result.queryArgs)}`,
|
|
30989
|
-
`- written_logs: ${result.writtenLogs}`,
|
|
30990
|
-
`- files: ${result.files.length > 0 ? result.files.join(", ") : "(none)"}`,
|
|
30991
|
-
`- state: ${result.statePath}`,
|
|
30992
|
-
`- next_start_time: ${result.nextStartTime}`,
|
|
30993
|
-
`- server_time: ${result.serverTime}`,
|
|
30994
|
-
`- has_more: ${result.hasMore ? "yes" : "no"}`,
|
|
30995
|
-
result.cursorExpired ? "- cursor_expired: yes; old cursor exceeded 1 hour, used default since window" : "- cursor_expired: no",
|
|
30996
|
-
"",
|
|
30997
|
-
result.hasMore ? "next_action: 还有更多远端日志;可以再次调用 maker_pull_runtime_logs 继续拉取。" : "next_action: 日志已写入 .maker/logs/runtime/runtime.log,AI/skill 可直接读取这一份合并日志。"
|
|
30998
|
-
].join("\n");
|
|
30999
|
-
}
|
|
31000
31003
|
function normalizeRuntimeLogQueryResult(result) {
|
|
31001
31004
|
const payload = findRuntimeLogPayload(extractRemoteToolPayload(result));
|
|
31002
31005
|
if (!payload) {
|
|
@@ -31213,7 +31216,7 @@ function compactRuntimeLogEntry(entry) {
|
|
|
31213
31216
|
}
|
|
31214
31217
|
|
|
31215
31218
|
// src/maker/server/mcp.ts
|
|
31216
|
-
var VERSION = true ? "0.0.
|
|
31219
|
+
var VERSION = true ? "0.0.8" : "dev";
|
|
31217
31220
|
var DEFAULT_BUILD_TIMEOUT_MS = 10 * 60 * 1e3;
|
|
31218
31221
|
var PREVIEW_REFRESH_TIMEOUT_MS = 15 * 1e3;
|
|
31219
31222
|
var WATCHER_STOP_TIMEOUT_MS = 1500;
|
|
@@ -31304,44 +31307,6 @@ var tools = [
|
|
|
31304
31307
|
}
|
|
31305
31308
|
}
|
|
31306
31309
|
}
|
|
31307
|
-
},
|
|
31308
|
-
{
|
|
31309
|
-
name: "maker_pull_runtime_logs",
|
|
31310
|
-
description: "Pull Maker Lua runtime logs once from the remote Maker MCP query_runtime_logs tool and write user_script/server_user_script logs to .maker/logs/runtime/runtime.log. This is a one-shot fixed business flow for AI diagnostics; it does not start a watcher, does not keep a long-running MCP call open, and does not clear local logs.",
|
|
31311
|
-
inputSchema: {
|
|
31312
|
-
type: "object",
|
|
31313
|
-
properties: {
|
|
31314
|
-
target_dir: {
|
|
31315
|
-
type: "string",
|
|
31316
|
-
description: "Optional Maker project directory. Defaults to the MCP process cwd. Pass the user current working directory when it differs from the MCP process cwd."
|
|
31317
|
-
},
|
|
31318
|
-
start_time: {
|
|
31319
|
-
type: "number",
|
|
31320
|
-
description: "Optional Unix seconds cursor. If omitted, the tool uses a fresh local state cursor, otherwise defaults to since_seconds."
|
|
31321
|
-
},
|
|
31322
|
-
since_seconds: {
|
|
31323
|
-
type: "number",
|
|
31324
|
-
description: "Optional fallback lookback window in seconds when no fresh cursor exists. Defaults to 600 seconds and is capped by the remote server."
|
|
31325
|
-
},
|
|
31326
|
-
limit: {
|
|
31327
|
-
type: "number",
|
|
31328
|
-
description: "Optional maximum log entries returned by the remote query."
|
|
31329
|
-
},
|
|
31330
|
-
server_url: {
|
|
31331
|
-
type: "string",
|
|
31332
|
-
description: "Optional remote MCP server URL override. Defaults to the Maker endpoint table for TAPTAP_MCP_ENV."
|
|
31333
|
-
},
|
|
31334
|
-
env: {
|
|
31335
|
-
type: "string",
|
|
31336
|
-
enum: ["rnd", "production"],
|
|
31337
|
-
description: "Remote MCP environment. Defaults to TAPTAP_MCP_ENV."
|
|
31338
|
-
},
|
|
31339
|
-
timeout_ms: {
|
|
31340
|
-
type: "number",
|
|
31341
|
-
description: "Optional remote log query timeout in milliseconds. Defaults to 60 seconds."
|
|
31342
|
-
}
|
|
31343
|
-
}
|
|
31344
|
-
}
|
|
31345
31310
|
}
|
|
31346
31311
|
];
|
|
31347
31312
|
var resources = [
|
|
@@ -31439,30 +31404,6 @@ async function startMakerMcpServer() {
|
|
|
31439
31404
|
]
|
|
31440
31405
|
};
|
|
31441
31406
|
}
|
|
31442
|
-
if (name === "maker_pull_runtime_logs") {
|
|
31443
|
-
const args = request.params.arguments || {};
|
|
31444
|
-
const proxy = createRemoteProxyContext({
|
|
31445
|
-
targetDir: resolveMakerToolTargetDir(args.target_dir),
|
|
31446
|
-
serverUrl: args.server_url,
|
|
31447
|
-
env: args.env
|
|
31448
|
-
});
|
|
31449
|
-
const result = await pullRuntimeLogs({
|
|
31450
|
-
projectRoot: proxy.projectRoot,
|
|
31451
|
-
projectId: proxy.projectId,
|
|
31452
|
-
startTime: args.start_time,
|
|
31453
|
-
sinceSeconds: args.since_seconds,
|
|
31454
|
-
limit: args.limit,
|
|
31455
|
-
callRemoteRuntimeLogs: (queryArgs) => callRemoteRuntimeLogs(proxy, queryArgs, args.timeout_ms)
|
|
31456
|
-
});
|
|
31457
|
-
return {
|
|
31458
|
-
content: [
|
|
31459
|
-
{
|
|
31460
|
-
type: "text",
|
|
31461
|
-
text: formatRuntimeLogPullResult(result)
|
|
31462
|
-
}
|
|
31463
|
-
]
|
|
31464
|
-
};
|
|
31465
|
-
}
|
|
31466
31407
|
throw new McpError(ErrorCode.MethodNotFound, `Unknown Maker tool: ${name}`);
|
|
31467
31408
|
} catch (error2) {
|
|
31468
31409
|
return {
|
|
@@ -32379,14 +32320,6 @@ async function refreshMakerPreview(buildResult) {
|
|
|
32379
32320
|
clearTimeout(timeout);
|
|
32380
32321
|
}
|
|
32381
32322
|
}
|
|
32382
|
-
async function callRemoteRuntimeLogs(proxy, args, timeoutMs = 60 * 1e3) {
|
|
32383
|
-
const runtimeLogClient = createRemoteRuntimeLogClient(proxy, timeoutMs);
|
|
32384
|
-
try {
|
|
32385
|
-
return await runtimeLogClient.call(args);
|
|
32386
|
-
} finally {
|
|
32387
|
-
await runtimeLogClient.close();
|
|
32388
|
-
}
|
|
32389
|
-
}
|
|
32390
32323
|
function createRemoteRuntimeLogClient(proxy, timeoutMs = 60 * 1e3, options = {}) {
|
|
32391
32324
|
let client;
|
|
32392
32325
|
const createTransport = options.createTransport || (() => new HiddenStdioClientTransport({
|
|
@@ -33195,7 +33128,7 @@ async function runLogsWatch(parsed, ctx) {
|
|
|
33195
33128
|
...replacedWatcher,
|
|
33196
33129
|
reset: booleanOption(parsed, "reset"),
|
|
33197
33130
|
interval_ms: intervalMs,
|
|
33198
|
-
topics:
|
|
33131
|
+
topics: DEFAULT_RUNTIME_LOG_TOPICS
|
|
33199
33132
|
});
|
|
33200
33133
|
try {
|
|
33201
33134
|
const result = await watchRuntimeLogs({
|
package/package.json
CHANGED
|
@@ -34,9 +34,8 @@ Keep this split clear:
|
|
|
34
34
|
|
|
35
35
|
- Skill: user intent, step order, whether to ask the user, friendly explanations, failure recovery.
|
|
36
36
|
- CLI: save PAT, fetch app list, clone, prepare dev kit, install MCP config, verify local setup,
|
|
37
|
-
and run the local runtime log watcher.
|
|
38
|
-
- MCP tools/resources: inspect Maker status
|
|
39
|
-
one-shot runtime log pulls.
|
|
37
|
+
and run the local runtime log watcher, including runtime log polling.
|
|
38
|
+
- MCP tools/resources: inspect Maker status and run the combined commit/push/build path.
|
|
40
39
|
|
|
41
40
|
Do not reimplement Maker API calls or Git authentication in shell when the Maker CLI or MCP tool
|
|
42
41
|
exists.
|
|
@@ -136,7 +135,8 @@ Keep the user-facing explanation short:
|
|
|
136
135
|
`taptap-maker init` checks out the Maker project before preparing local development environment
|
|
137
136
|
files in the current working directory. Init reinstalls the dev kit after checkout and allows
|
|
138
137
|
dev-kit files to overwrite same-path local helper files; the managed `.gitignore` block keeps
|
|
139
|
-
those files local-only
|
|
138
|
+
those files local-only. The `.gitignore` file itself is a required Maker project file that should be
|
|
139
|
+
submitted to Maker Git.
|
|
140
140
|
|
|
141
141
|
`taptap-maker doctor` and `maker://status` check the dev-kit top-level entries for an already bound
|
|
142
142
|
Maker project. If `CLAUDE.md`, `examples/`, `templates/`, or `urhox-libs/` are missing, run
|
|
@@ -166,9 +166,8 @@ The CLI is responsible for deterministic file operations:
|
|
|
166
166
|
- extract the ZIP into the current directory after checkout
|
|
167
167
|
- skip the ZIP top-level `scripts` directory because it conflicts with Maker project code
|
|
168
168
|
- delete the downloaded `ai-dev-kit.zip` after extraction
|
|
169
|
-
-
|
|
170
|
-
-
|
|
171
|
-
- keep the dev-kit files local-only so they are not submitted to Maker Git
|
|
169
|
+
- refresh the checked-out `.gitignore` managed block for installed dev-kit entries
|
|
170
|
+
- keep the dev-kit helper files ignored while submitting the `.gitignore` rules to Maker Git
|
|
172
171
|
|
|
173
172
|
Do not hand-write a custom download/unzip script while this CLI command is available.
|
|
174
173
|
|
|
@@ -307,19 +306,17 @@ If `taptap-maker init` fails and returns `partial_state`, explain the state in p
|
|
|
307
306
|
Do not delete partial files automatically. For novice users, prefer recommending a new independent
|
|
308
307
|
directory over manual cleanup.
|
|
309
308
|
|
|
310
|
-
### `.gitignore`
|
|
309
|
+
### `.gitignore` Managed Block
|
|
311
310
|
|
|
312
|
-
The
|
|
313
|
-
|
|
314
|
-
preparation both succeed, the CLI merges that managed block into the checked-out `.gitignore` and
|
|
315
|
-
removes the temporary file.
|
|
311
|
+
The CLI refreshes the checked-out `.gitignore` managed block for local dev-kit files, Agent skill
|
|
312
|
+
discovery directories, and Maker runtime state.
|
|
316
313
|
|
|
317
|
-
If clone
|
|
318
|
-
|
|
319
|
-
|
|
314
|
+
If clone reports conflicts for project files, do not auto-merge them. Show the conflict list and
|
|
315
|
+
ask the user whether to move the local files, choose another directory, or let the local AI inspect
|
|
316
|
+
and resolve the conflict.
|
|
320
317
|
|
|
321
|
-
Explain to the user that this `.gitignore`
|
|
322
|
-
submitted to Maker Git.
|
|
318
|
+
Explain to the user that this `.gitignore` managed block prevents local dev-kit files from being
|
|
319
|
+
submitted to Maker Git, while the `.gitignore` file itself should be submitted.
|
|
323
320
|
|
|
324
321
|
## Bundled Skills
|
|
325
322
|
|