@runtypelabs/sdk 1.7.3 → 1.8.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.
- package/dist/index.cjs +239 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +49 -1
- package/dist/index.d.ts +49 -1
- package/dist/index.js +238 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -327,6 +327,7 @@ __export(index_exports, {
|
|
|
327
327
|
defaultWorkflow: () => defaultWorkflow,
|
|
328
328
|
deployWorkflow: () => deployWorkflow,
|
|
329
329
|
evaluateGeneratedRuntimeToolProposal: () => evaluateGeneratedRuntimeToolProposal,
|
|
330
|
+
gameWorkflow: () => gameWorkflow,
|
|
330
331
|
getDefaultPlanPath: () => getDefaultPlanPath,
|
|
331
332
|
getLikelySupportingCandidatePaths: () => getLikelySupportingCandidatePaths,
|
|
332
333
|
isDiscoveryToolName: () => isDiscoveryToolName,
|
|
@@ -2909,8 +2910,8 @@ var scaffoldPhase = {
|
|
|
2909
2910
|
].join("\n");
|
|
2910
2911
|
},
|
|
2911
2912
|
interceptToolCall(toolName, _args, _ctx) {
|
|
2912
|
-
const
|
|
2913
|
-
if (
|
|
2913
|
+
const blockedTools2 = ["write_file", "read_file", "search_repo", "glob_files", "tree_directory", "list_directory", "restore_file_checkpoint"];
|
|
2914
|
+
if (blockedTools2.includes(toolName)) {
|
|
2914
2915
|
return [
|
|
2915
2916
|
`Blocked: ${toolName} is not available in deploy mode.`,
|
|
2916
2917
|
"Use deploy_sandbox to deploy your code to a live sandbox instead of writing files to the local repo."
|
|
@@ -2949,6 +2950,7 @@ var deployPhase = {
|
|
|
2949
2950
|
"",
|
|
2950
2951
|
"deploy_sandbox takes:",
|
|
2951
2952
|
" - code: The full source code (written to main.ts/main.js/main.py)",
|
|
2953
|
+
' - files: Additional files (path \u2192 content), e.g. { "public/index.html": "<html>..." }',
|
|
2952
2954
|
' - packageJson: Dependencies as a JSON object, e.g. { "dependencies": { "express": "^4.18.2" } }',
|
|
2953
2955
|
' - language: "typescript" (default), "javascript", or "python"',
|
|
2954
2956
|
" - port: The port your server listens on (default: 3000)",
|
|
@@ -2962,7 +2964,8 @@ var deployPhase = {
|
|
|
2962
2964
|
" 3. Include ALL dependencies in packageJson \u2014 nothing is pre-installed except Node.js built-ins.",
|
|
2963
2965
|
" 4. If the deploy fails, read the error output, fix the code, and call deploy_sandbox again.",
|
|
2964
2966
|
" 5. The sandbox is persistent \u2014 subsequent calls reuse the same sandbox.",
|
|
2965
|
-
" 6. When the deploy succeeds and the preview URL is live, tell the user and end with TASK_COMPLETE."
|
|
2967
|
+
" 6. When the deploy succeeds and the preview URL is live, tell the user and end with TASK_COMPLETE.",
|
|
2968
|
+
" 7. For apps with HTML frontends, use the `files` parameter to write HTML/CSS/JS to separate files and serve them with express.static, rather than embedding HTML in template literals."
|
|
2966
2969
|
].join("\n");
|
|
2967
2970
|
},
|
|
2968
2971
|
buildToolGuidance(_state) {
|
|
@@ -2977,8 +2980,8 @@ var deployPhase = {
|
|
|
2977
2980
|
return false;
|
|
2978
2981
|
},
|
|
2979
2982
|
interceptToolCall(toolName, _args, _ctx) {
|
|
2980
|
-
const
|
|
2981
|
-
if (
|
|
2983
|
+
const blockedTools2 = ["write_file", "read_file", "search_repo", "glob_files", "tree_directory", "list_directory", "restore_file_checkpoint"];
|
|
2984
|
+
if (blockedTools2.includes(toolName)) {
|
|
2982
2985
|
return [
|
|
2983
2986
|
`Blocked: ${toolName} is not available in deploy mode.`,
|
|
2984
2987
|
"Use deploy_sandbox to deploy your code to a live sandbox instead of writing files to the local repo."
|
|
@@ -2986,8 +2989,13 @@ var deployPhase = {
|
|
|
2986
2989
|
}
|
|
2987
2990
|
return void 0;
|
|
2988
2991
|
},
|
|
2989
|
-
canAcceptCompletion(
|
|
2990
|
-
|
|
2992
|
+
canAcceptCompletion(state, trace) {
|
|
2993
|
+
if (trace.entries.some((entry) => entry.startsWith("deploy_sandbox"))) {
|
|
2994
|
+
return true;
|
|
2995
|
+
}
|
|
2996
|
+
return state.sessions.some(
|
|
2997
|
+
(s) => s.actionKeys?.some((key) => key.startsWith("deploy_sandbox"))
|
|
2998
|
+
);
|
|
2991
2999
|
},
|
|
2992
3000
|
buildRecoveryMessage(state) {
|
|
2993
3001
|
const recent = state.sessions.slice(-2);
|
|
@@ -3058,6 +3066,204 @@ var deployWorkflow = {
|
|
|
3058
3066
|
}
|
|
3059
3067
|
};
|
|
3060
3068
|
|
|
3069
|
+
// src/workflows/game-workflow.ts
|
|
3070
|
+
var blockedTools = ["write_file", "read_file", "search_repo", "glob_files", "tree_directory", "list_directory", "restore_file_checkpoint"];
|
|
3071
|
+
function blockLocalTools(toolName) {
|
|
3072
|
+
if (blockedTools.includes(toolName)) {
|
|
3073
|
+
return [
|
|
3074
|
+
`Blocked: ${toolName} is not available in game deploy mode.`,
|
|
3075
|
+
"Use deploy_sandbox to deploy your game to a live sandbox instead of writing files to the local repo."
|
|
3076
|
+
].join(" ");
|
|
3077
|
+
}
|
|
3078
|
+
return void 0;
|
|
3079
|
+
}
|
|
3080
|
+
var designPhase = {
|
|
3081
|
+
name: "design",
|
|
3082
|
+
description: "Understand game requirements and plan the approach",
|
|
3083
|
+
buildInstructions(_state) {
|
|
3084
|
+
return [
|
|
3085
|
+
"--- Workflow Phase: Design ---",
|
|
3086
|
+
"This is a game development task. You will build a game and deploy it to a live sandbox \u2014 you are NOT editing files in the local repository.",
|
|
3087
|
+
"Quickly determine:",
|
|
3088
|
+
" 1. What type of game (3D, 2D, platformer, racing, puzzle, etc.)",
|
|
3089
|
+
" 2. Theme and visual style",
|
|
3090
|
+
" 3. Core game mechanics (controls, scoring, win/lose conditions)",
|
|
3091
|
+
" 4. Tech stack (Three.js, Phaser, vanilla Canvas/WebGL, etc.)",
|
|
3092
|
+
" 5. Any specific dependencies needed",
|
|
3093
|
+
"",
|
|
3094
|
+
"Do NOT inspect the local repo or search for files to edit.",
|
|
3095
|
+
"Do NOT write a plan file.",
|
|
3096
|
+
"Once you understand the requirements, proceed to build and deploy."
|
|
3097
|
+
].join("\n");
|
|
3098
|
+
},
|
|
3099
|
+
buildToolGuidance(_state) {
|
|
3100
|
+
return [
|
|
3101
|
+
"This is a sandbox deploy task \u2014 do NOT use write_file, read_file, search_repo, glob_files, tree_directory, or list_directory.",
|
|
3102
|
+
"Your primary tool is deploy_sandbox. Use it to deploy code to a persistent sandbox and get a live preview URL."
|
|
3103
|
+
];
|
|
3104
|
+
},
|
|
3105
|
+
isComplete(ctx) {
|
|
3106
|
+
return ctx.state.sessions.length >= 1 || ctx.trace.entries.some((entry) => entry.startsWith("deploy_sandbox"));
|
|
3107
|
+
},
|
|
3108
|
+
buildTransitionSummary(_state, _nextPhaseName) {
|
|
3109
|
+
return [
|
|
3110
|
+
"Automatic phase transition: design \u2192 build.",
|
|
3111
|
+
"Requirements understood. Build the game and deploy it using deploy_sandbox with the files parameter."
|
|
3112
|
+
].join("\n");
|
|
3113
|
+
},
|
|
3114
|
+
interceptToolCall(toolName, _args, _ctx) {
|
|
3115
|
+
return blockLocalTools(toolName);
|
|
3116
|
+
},
|
|
3117
|
+
shouldForceEndTurn(snapshot, _ctx) {
|
|
3118
|
+
if (snapshot.pauseCount >= 12) {
|
|
3119
|
+
return "design phase is looping without progressing \u2014 end the turn so the system can advance to build";
|
|
3120
|
+
}
|
|
3121
|
+
return void 0;
|
|
3122
|
+
}
|
|
3123
|
+
};
|
|
3124
|
+
var buildPhase = {
|
|
3125
|
+
name: "build",
|
|
3126
|
+
description: "Build the game and deploy to sandbox with live preview",
|
|
3127
|
+
buildInstructions(_state) {
|
|
3128
|
+
return [
|
|
3129
|
+
"--- Workflow Phase: Build ---",
|
|
3130
|
+
"Build the game and deploy it using the deploy_sandbox tool.",
|
|
3131
|
+
"",
|
|
3132
|
+
"CRITICAL: Multi-file deployment pattern",
|
|
3133
|
+
" You MUST use the `files` parameter for the game HTML/JS/CSS.",
|
|
3134
|
+
" NEVER embed HTML inside a JavaScript template literal in Express `res.send()` \u2014 this WILL break",
|
|
3135
|
+
" because game code uses backticks (template literals) which cause nested backtick corruption.",
|
|
3136
|
+
"",
|
|
3137
|
+
" Correct pattern:",
|
|
3138
|
+
" - code: A minimal Express static file server (~5 lines):",
|
|
3139
|
+
" ```",
|
|
3140
|
+
' const express = require("express");',
|
|
3141
|
+
" const app = express();",
|
|
3142
|
+
' app.use(express.static("public"));',
|
|
3143
|
+
' app.listen(3000, () => console.log("Server running on port 3000"));',
|
|
3144
|
+
" ```",
|
|
3145
|
+
" - files: Your game assets as separate files:",
|
|
3146
|
+
" {",
|
|
3147
|
+
' "public/index.html": "<!DOCTYPE html>...",',
|
|
3148
|
+
' "public/game.js": "// game logic...",',
|
|
3149
|
+
' "public/style.css": "body { margin: 0; }"',
|
|
3150
|
+
" }",
|
|
3151
|
+
"",
|
|
3152
|
+
" WRONG pattern (DO NOT DO THIS):",
|
|
3153
|
+
' - code: `app.get("/", (req, res) => res.send(\\`<html>...game code with backticks...\\`))`',
|
|
3154
|
+
" - This breaks because game code uses template literals inside the res.send template literal.",
|
|
3155
|
+
"",
|
|
3156
|
+
"deploy_sandbox takes:",
|
|
3157
|
+
" - code: The server source code (written to main.ts/main.js/main.py)",
|
|
3158
|
+
' - files: Additional files (path \u2192 content), e.g. { "public/index.html": "<html>..." }',
|
|
3159
|
+
' - packageJson: Dependencies as a JSON object, e.g. { "dependencies": { "express": "^4.18.2", "three": "^0.170.0" } }',
|
|
3160
|
+
' - language: "javascript" (recommended for games), "typescript", or "python"',
|
|
3161
|
+
" - port: The port your server listens on (default: 3000)",
|
|
3162
|
+
" - startCommand: Custom start command (auto-detected by default)",
|
|
3163
|
+
"",
|
|
3164
|
+
"Guidelines:",
|
|
3165
|
+
' 1. Use `language: "javascript"` \u2014 simpler for static file servers.',
|
|
3166
|
+
" 2. The `code` param should be a minimal Express static server. ALL game code goes in `files`.",
|
|
3167
|
+
" 3. Include ALL dependencies in packageJson (express, three, phaser, etc.).",
|
|
3168
|
+
" 4. If the deploy fails, read the error output, fix the code, and call deploy_sandbox again.",
|
|
3169
|
+
" 5. The sandbox is persistent \u2014 subsequent calls reuse the same sandbox.",
|
|
3170
|
+
" 6. Load game libraries from CDN in your HTML (e.g., Three.js from unpkg/cdnjs) OR include them in packageJson.",
|
|
3171
|
+
" 7. Make the game fullscreen by default (width: 100vw, height: 100vh, no margin/padding on body)."
|
|
3172
|
+
].join("\n");
|
|
3173
|
+
},
|
|
3174
|
+
buildToolGuidance(_state) {
|
|
3175
|
+
return [
|
|
3176
|
+
"Your primary tool is deploy_sandbox. Call it with code (Express static server), files (game HTML/JS/CSS), and packageJson.",
|
|
3177
|
+
"ALWAYS use the `files` parameter for game HTML, JavaScript, and CSS \u2014 NEVER embed them in template literals.",
|
|
3178
|
+
"Do NOT use write_file, read_file, search_repo, glob_files, tree_directory, or list_directory.",
|
|
3179
|
+
"You may use run_sandbox_code for quick one-off tests if needed."
|
|
3180
|
+
];
|
|
3181
|
+
},
|
|
3182
|
+
isComplete() {
|
|
3183
|
+
return false;
|
|
3184
|
+
},
|
|
3185
|
+
interceptToolCall(toolName, _args, _ctx) {
|
|
3186
|
+
return blockLocalTools(toolName);
|
|
3187
|
+
},
|
|
3188
|
+
canAcceptCompletion(_state, trace) {
|
|
3189
|
+
return trace.entries.some((entry) => entry.startsWith("deploy_sandbox"));
|
|
3190
|
+
},
|
|
3191
|
+
buildRecoveryMessage(state) {
|
|
3192
|
+
const recent = state.sessions.slice(-2);
|
|
3193
|
+
if (recent.length < 2) return void 0;
|
|
3194
|
+
const noProgress = recent.every(
|
|
3195
|
+
(s) => s.hadTextOutput === false && s.wroteFiles === false
|
|
3196
|
+
);
|
|
3197
|
+
if (!noProgress) return void 0;
|
|
3198
|
+
return [
|
|
3199
|
+
"Recovery instruction:",
|
|
3200
|
+
"You should be deploying the game using deploy_sandbox with the `files` parameter.",
|
|
3201
|
+
"Use `code` for a minimal Express static server and `files` for game HTML/JS/CSS.",
|
|
3202
|
+
"NEVER embed HTML in a JavaScript template literal \u2014 use separate files."
|
|
3203
|
+
].join("\n");
|
|
3204
|
+
},
|
|
3205
|
+
shouldForceEndTurn(snapshot, _ctx) {
|
|
3206
|
+
if (snapshot.consecutiveDiscoveryPauseCount >= 8) {
|
|
3207
|
+
return "build phase is looping on discovery tools instead of calling deploy_sandbox";
|
|
3208
|
+
}
|
|
3209
|
+
if (snapshot.actionKeyCount >= 4) {
|
|
3210
|
+
return `the same action repeated ${snapshot.actionKeyCount} times \u2014 try a different approach`;
|
|
3211
|
+
}
|
|
3212
|
+
return void 0;
|
|
3213
|
+
}
|
|
3214
|
+
};
|
|
3215
|
+
var verifyPhase = {
|
|
3216
|
+
name: "verify",
|
|
3217
|
+
description: "Verify the game is running and playable",
|
|
3218
|
+
buildInstructions(_state) {
|
|
3219
|
+
return [
|
|
3220
|
+
"--- Workflow Phase: Verify ---",
|
|
3221
|
+
"The game has been deployed. Verify it is working:",
|
|
3222
|
+
" 1. Check the server log for errors. If there are errors, fix and redeploy using deploy_sandbox.",
|
|
3223
|
+
" 2. Tell the user the preview URL so they can play the game.",
|
|
3224
|
+
" 3. End with TASK_COMPLETE.",
|
|
3225
|
+
"",
|
|
3226
|
+
"If the user reports issues, fix the code and redeploy."
|
|
3227
|
+
].join("\n");
|
|
3228
|
+
},
|
|
3229
|
+
buildToolGuidance(_state) {
|
|
3230
|
+
return [
|
|
3231
|
+
"Use deploy_sandbox to redeploy if fixes are needed.",
|
|
3232
|
+
"Do NOT use local file system tools.",
|
|
3233
|
+
"When the game is working, tell the user the preview URL and end with TASK_COMPLETE."
|
|
3234
|
+
];
|
|
3235
|
+
},
|
|
3236
|
+
isComplete() {
|
|
3237
|
+
return false;
|
|
3238
|
+
},
|
|
3239
|
+
interceptToolCall(toolName, _args, _ctx) {
|
|
3240
|
+
return blockLocalTools(toolName);
|
|
3241
|
+
},
|
|
3242
|
+
canAcceptCompletion(_state, trace) {
|
|
3243
|
+
return trace.entries.some((entry) => entry.startsWith("deploy_sandbox"));
|
|
3244
|
+
},
|
|
3245
|
+
shouldForceEndTurn(snapshot, _ctx) {
|
|
3246
|
+
if (snapshot.actionKeyCount >= 4) {
|
|
3247
|
+
return `the same action repeated ${snapshot.actionKeyCount} times \u2014 try a different approach`;
|
|
3248
|
+
}
|
|
3249
|
+
return void 0;
|
|
3250
|
+
}
|
|
3251
|
+
};
|
|
3252
|
+
function classifyVariant3() {
|
|
3253
|
+
return "game";
|
|
3254
|
+
}
|
|
3255
|
+
var gameWorkflow = {
|
|
3256
|
+
name: "game",
|
|
3257
|
+
phases: [designPhase, buildPhase, verifyPhase],
|
|
3258
|
+
classifyVariant: classifyVariant3,
|
|
3259
|
+
async generateBootstrapContext() {
|
|
3260
|
+
return void 0;
|
|
3261
|
+
},
|
|
3262
|
+
buildCandidateBlock() {
|
|
3263
|
+
return "";
|
|
3264
|
+
}
|
|
3265
|
+
};
|
|
3266
|
+
|
|
3061
3267
|
// src/endpoints.ts
|
|
3062
3268
|
var FlowsEndpoint = class {
|
|
3063
3269
|
constructor(client) {
|
|
@@ -5313,13 +5519,15 @@ var _AgentsEndpoint = class _AgentsEndpoint {
|
|
|
5313
5519
|
maxSessions,
|
|
5314
5520
|
localToolNames,
|
|
5315
5521
|
continuationContext,
|
|
5316
|
-
workflow
|
|
5522
|
+
workflow,
|
|
5523
|
+
options.toolIds
|
|
5317
5524
|
);
|
|
5318
5525
|
let sessionResult;
|
|
5319
5526
|
const sessionData = {
|
|
5320
5527
|
messages,
|
|
5321
5528
|
debugMode: options.debugMode,
|
|
5322
|
-
model: options.model
|
|
5529
|
+
model: options.model,
|
|
5530
|
+
...options.toolIds?.length ? { tools: { toolIds: options.toolIds } } : {}
|
|
5323
5531
|
};
|
|
5324
5532
|
let sessionToolMessages = [];
|
|
5325
5533
|
if (useStream && options.localTools) {
|
|
@@ -5343,6 +5551,7 @@ var _AgentsEndpoint = class _AgentsEndpoint {
|
|
|
5343
5551
|
result: completeEvent.finalOutput || "",
|
|
5344
5552
|
iterations: completeEvent.iterations,
|
|
5345
5553
|
totalCost: completeEvent.totalCost || 0,
|
|
5554
|
+
totalTokens: completeEvent.totalTokens,
|
|
5346
5555
|
stopReason: completeEvent.stopReason,
|
|
5347
5556
|
error: completeEvent.error
|
|
5348
5557
|
};
|
|
@@ -5360,6 +5569,7 @@ var _AgentsEndpoint = class _AgentsEndpoint {
|
|
|
5360
5569
|
result: completeEvent.finalOutput || "",
|
|
5361
5570
|
iterations: completeEvent.iterations,
|
|
5362
5571
|
totalCost: completeEvent.totalCost || 0,
|
|
5572
|
+
totalTokens: completeEvent.totalTokens,
|
|
5363
5573
|
stopReason: completeEvent.stopReason,
|
|
5364
5574
|
error: completeEvent.error
|
|
5365
5575
|
};
|
|
@@ -5372,8 +5582,15 @@ var _AgentsEndpoint = class _AgentsEndpoint {
|
|
|
5372
5582
|
toolTraceSummary
|
|
5373
5583
|
);
|
|
5374
5584
|
const sessionCost = sessionResult.totalCost;
|
|
5585
|
+
const sessionTokens = sessionResult.totalTokens;
|
|
5375
5586
|
state.sessionCount = session + 1;
|
|
5376
5587
|
state.totalCost += sessionCost;
|
|
5588
|
+
if (sessionTokens) {
|
|
5589
|
+
state.totalTokens = {
|
|
5590
|
+
input: (state.totalTokens?.input || 0) + sessionTokens.input,
|
|
5591
|
+
output: (state.totalTokens?.output || 0) + sessionTokens.output
|
|
5592
|
+
};
|
|
5593
|
+
}
|
|
5377
5594
|
state.lastOutput = effectiveSessionOutput;
|
|
5378
5595
|
state.lastError = sessionResult.stopReason === "error" ? sessionResult.error || "Agent session ended with an error." : void 0;
|
|
5379
5596
|
state.lastStopReason = sessionResult.stopReason;
|
|
@@ -5381,6 +5598,7 @@ var _AgentsEndpoint = class _AgentsEndpoint {
|
|
|
5381
5598
|
state.sessions.push({
|
|
5382
5599
|
index: session + 1,
|
|
5383
5600
|
cost: sessionCost,
|
|
5601
|
+
totalTokens: sessionTokens,
|
|
5384
5602
|
iterations: sessionResult.iterations,
|
|
5385
5603
|
stopReason: sessionResult.stopReason,
|
|
5386
5604
|
outputPreview: effectiveSessionOutput.slice(0, 300),
|
|
@@ -5494,6 +5712,7 @@ var _AgentsEndpoint = class _AgentsEndpoint {
|
|
|
5494
5712
|
status: state.status,
|
|
5495
5713
|
sessionCount: state.sessionCount,
|
|
5496
5714
|
totalCost: state.totalCost,
|
|
5715
|
+
totalTokens: state.totalTokens,
|
|
5497
5716
|
lastOutput: state.lastOutput,
|
|
5498
5717
|
sessions: state.sessions,
|
|
5499
5718
|
recordId
|
|
@@ -5540,12 +5759,12 @@ var _AgentsEndpoint = class _AgentsEndpoint {
|
|
|
5540
5759
|
* Build messages for a session, injecting progress context for continuation sessions.
|
|
5541
5760
|
* Optionally accepts continuation context for marathon resume scenarios.
|
|
5542
5761
|
*/
|
|
5543
|
-
buildSessionMessages(originalMessage, state, sessionIndex, maxSessions, localToolNames, continuationContext, workflow) {
|
|
5762
|
+
buildSessionMessages(originalMessage, state, sessionIndex, maxSessions, localToolNames, continuationContext, workflow, builtinToolIds) {
|
|
5544
5763
|
const wf = workflow ?? defaultWorkflow;
|
|
5545
5764
|
const currentPhase = wf.phases.find((p) => p.name === state.workflowPhase);
|
|
5546
5765
|
const toolGuidanceLines = currentPhase?.buildToolGuidance(state) ?? [];
|
|
5547
5766
|
const isDeployWorkflow = wf.name === "deploy";
|
|
5548
|
-
const
|
|
5767
|
+
const localToolsBlock = localToolNames?.length ? [
|
|
5549
5768
|
"",
|
|
5550
5769
|
"--- Local Tools ---",
|
|
5551
5770
|
`You have access to tools (${localToolNames.join(", ")}) that execute directly on the user's machine.`,
|
|
@@ -5555,6 +5774,14 @@ var _AgentsEndpoint = class _AgentsEndpoint {
|
|
|
5555
5774
|
...toolGuidanceLines,
|
|
5556
5775
|
...isDeployWorkflow ? [] : ["Always use write_file to save your output so the user can run it immediately."]
|
|
5557
5776
|
].join("\n") : "";
|
|
5777
|
+
const builtinToolNames = builtinToolIds?.map((id) => id.replace(/^builtin:/, ""));
|
|
5778
|
+
const builtinToolsBlock = builtinToolNames?.length ? [
|
|
5779
|
+
"",
|
|
5780
|
+
"--- Built-in Tools ---",
|
|
5781
|
+
`You have access to built-in tools (${builtinToolNames.join(", ")}) for web search, web scraping, image generation, and other capabilities.`,
|
|
5782
|
+
"Use these tools when the task requires information from the web, generating images, or other capabilities beyond local file operations."
|
|
5783
|
+
].join("\n") : "";
|
|
5784
|
+
const toolsBlock = localToolsBlock + builtinToolsBlock;
|
|
5558
5785
|
const bootstrapBlock = state.bootstrapContext ? ["", "--- Initial Repository Discovery ---", state.bootstrapContext].join("\n") : "";
|
|
5559
5786
|
const phaseBlock = ["", this.buildPhaseInstructions(state, wf)].join("\n");
|
|
5560
5787
|
const candidateBlock = wf.buildCandidateBlock?.(state) ?? "";
|
|
@@ -7011,6 +7238,7 @@ var ClientEvalBuilder = class extends EvalBuilder {
|
|
|
7011
7238
|
defaultWorkflow,
|
|
7012
7239
|
deployWorkflow,
|
|
7013
7240
|
evaluateGeneratedRuntimeToolProposal,
|
|
7241
|
+
gameWorkflow,
|
|
7014
7242
|
getDefaultPlanPath,
|
|
7015
7243
|
getLikelySupportingCandidatePaths,
|
|
7016
7244
|
isDiscoveryToolName,
|