rbxstudio-mcp 2.3.1 → 2.4.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/README.md +67 -14
- package/dist/__tests__/bridge-service.test.js +25 -13
- package/dist/__tests__/bridge-service.test.js.map +1 -1
- package/dist/__tests__/bridge-session.test.d.ts +2 -0
- package/dist/__tests__/bridge-session.test.d.ts.map +1 -0
- package/dist/__tests__/bridge-session.test.js +171 -0
- package/dist/__tests__/bridge-session.test.js.map +1 -0
- package/dist/__tests__/chunker.test.d.ts +2 -0
- package/dist/__tests__/chunker.test.d.ts.map +1 -0
- package/dist/__tests__/chunker.test.js +201 -0
- package/dist/__tests__/chunker.test.js.map +1 -0
- package/dist/__tests__/docs-core.test.d.ts +2 -0
- package/dist/__tests__/docs-core.test.d.ts.map +1 -0
- package/dist/__tests__/docs-core.test.js +137 -0
- package/dist/__tests__/docs-core.test.js.map +1 -0
- package/dist/__tests__/docs-fetcher.test.d.ts +2 -0
- package/dist/__tests__/docs-fetcher.test.d.ts.map +1 -0
- package/dist/__tests__/docs-fetcher.test.js +173 -0
- package/dist/__tests__/docs-fetcher.test.js.map +1 -0
- package/dist/__tests__/helpers.d.ts +8 -0
- package/dist/__tests__/helpers.d.ts.map +1 -0
- package/dist/__tests__/helpers.js +23 -0
- package/dist/__tests__/helpers.js.map +1 -0
- package/dist/__tests__/http-routes.test.d.ts +2 -0
- package/dist/__tests__/http-routes.test.d.ts.map +1 -0
- package/dist/__tests__/http-routes.test.js +233 -0
- package/dist/__tests__/http-routes.test.js.map +1 -0
- package/dist/__tests__/http-server.test.js +13 -6
- package/dist/__tests__/http-server.test.js.map +1 -1
- package/dist/__tests__/integration.test.js +9 -4
- package/dist/__tests__/integration.test.js.map +1 -1
- package/dist/__tests__/semantic-search.test.d.ts +2 -0
- package/dist/__tests__/semantic-search.test.d.ts.map +1 -0
- package/dist/__tests__/semantic-search.test.js +202 -0
- package/dist/__tests__/semantic-search.test.js.map +1 -0
- package/dist/__tests__/smoke.test.js +7 -3
- package/dist/__tests__/smoke.test.js.map +1 -1
- package/dist/__tests__/studio-client.test.d.ts +2 -0
- package/dist/__tests__/studio-client.test.d.ts.map +1 -0
- package/dist/__tests__/studio-client.test.js +25 -0
- package/dist/__tests__/studio-client.test.js.map +1 -0
- package/dist/__tests__/tool-nudges.test.d.ts +2 -0
- package/dist/__tests__/tool-nudges.test.d.ts.map +1 -0
- package/dist/__tests__/tool-nudges.test.js +60 -0
- package/dist/__tests__/tool-nudges.test.js.map +1 -0
- package/dist/__tests__/tool-registry.test.d.ts +2 -0
- package/dist/__tests__/tool-registry.test.d.ts.map +1 -0
- package/dist/__tests__/tool-registry.test.js +365 -0
- package/dist/__tests__/tool-registry.test.js.map +1 -0
- package/dist/__tests__/tools-bridge.test.d.ts +2 -0
- package/dist/__tests__/tools-bridge.test.d.ts.map +1 -0
- package/dist/__tests__/tools-bridge.test.js +396 -0
- package/dist/__tests__/tools-bridge.test.js.map +1 -0
- package/dist/__tests__/tools-docs.test.d.ts +2 -0
- package/dist/__tests__/tools-docs.test.d.ts.map +1 -0
- package/dist/__tests__/tools-docs.test.js +112 -0
- package/dist/__tests__/tools-docs.test.js.map +1 -0
- package/dist/__tests__/tools-guards.test.d.ts +2 -0
- package/dist/__tests__/tools-guards.test.d.ts.map +1 -0
- package/dist/__tests__/tools-guards.test.js +131 -0
- package/dist/__tests__/tools-guards.test.js.map +1 -0
- package/dist/__tests__/tools-runtime.test.d.ts +2 -0
- package/dist/__tests__/tools-runtime.test.d.ts.map +1 -0
- package/dist/__tests__/tools-runtime.test.js +214 -0
- package/dist/__tests__/tools-runtime.test.js.map +1 -0
- package/dist/__tests__/tools-visual.test.d.ts +2 -0
- package/dist/__tests__/tools-visual.test.d.ts.map +1 -0
- package/dist/__tests__/tools-visual.test.js +149 -0
- package/dist/__tests__/tools-visual.test.js.map +1 -0
- package/dist/bridge-service.d.ts +99 -12
- package/dist/bridge-service.d.ts.map +1 -1
- package/dist/bridge-service.js +238 -21
- package/dist/bridge-service.js.map +1 -1
- package/dist/docs/cache.d.ts +50 -0
- package/dist/docs/cache.d.ts.map +1 -0
- package/dist/docs/cache.js +123 -0
- package/dist/docs/cache.js.map +1 -0
- package/dist/docs/embeddings/chunker.d.ts +120 -0
- package/dist/docs/embeddings/chunker.d.ts.map +1 -0
- package/dist/docs/embeddings/chunker.js +395 -0
- package/dist/docs/embeddings/chunker.js.map +1 -0
- package/dist/docs/embeddings/embedder.d.ts +41 -0
- package/dist/docs/embeddings/embedder.d.ts.map +1 -0
- package/dist/docs/embeddings/embedder.js +113 -0
- package/dist/docs/embeddings/embedder.js.map +1 -0
- package/dist/docs/embeddings/index.d.ts +102 -0
- package/dist/docs/embeddings/index.d.ts.map +1 -0
- package/dist/docs/embeddings/index.js +250 -0
- package/dist/docs/embeddings/index.js.map +1 -0
- package/dist/docs/embeddings/manager.d.ts +68 -0
- package/dist/docs/embeddings/manager.d.ts.map +1 -0
- package/dist/docs/embeddings/manager.js +97 -0
- package/dist/docs/embeddings/manager.js.map +1 -0
- package/dist/docs/fetcher.d.ts +29 -0
- package/dist/docs/fetcher.d.ts.map +1 -0
- package/dist/docs/fetcher.js +244 -0
- package/dist/docs/fetcher.js.map +1 -0
- package/dist/docs/reference.d.ts +37 -0
- package/dist/docs/reference.d.ts.map +1 -0
- package/dist/docs/reference.js +108 -0
- package/dist/docs/reference.js.map +1 -0
- package/dist/docs/search.d.ts +194 -0
- package/dist/docs/search.d.ts.map +1 -0
- package/dist/docs/search.js +733 -0
- package/dist/docs/search.js.map +1 -0
- package/dist/http-server.d.ts.map +1 -1
- package/dist/http-server.js +52 -5
- package/dist/http-server.js.map +1 -1
- package/dist/index.d.ts +8 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +35 -1035
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.ts +15 -0
- package/dist/instructions.d.ts.map +1 -0
- package/dist/instructions.js +26 -0
- package/dist/instructions.js.map +1 -0
- package/dist/tools/defs/attributes.d.ts +6 -0
- package/dist/tools/defs/attributes.d.ts.map +1 -0
- package/dist/tools/defs/attributes.js +85 -0
- package/dist/tools/defs/attributes.js.map +1 -0
- package/dist/tools/defs/docs.d.ts +17 -0
- package/dist/tools/defs/docs.d.ts.map +1 -0
- package/dist/tools/defs/docs.js +151 -0
- package/dist/tools/defs/docs.js.map +1 -0
- package/dist/tools/defs/execute.d.ts +6 -0
- package/dist/tools/defs/execute.d.ts.map +1 -0
- package/dist/tools/defs/execute.js +21 -0
- package/dist/tools/defs/execute.js.map +1 -0
- package/dist/tools/defs/inspection.d.ts +7 -0
- package/dist/tools/defs/inspection.d.ts.map +1 -0
- package/dist/tools/defs/inspection.js +202 -0
- package/dist/tools/defs/inspection.js.map +1 -0
- package/dist/tools/defs/objects.d.ts +6 -0
- package/dist/tools/defs/objects.d.ts.map +1 -0
- package/dist/tools/defs/objects.js +111 -0
- package/dist/tools/defs/objects.js.map +1 -0
- package/dist/tools/defs/properties.d.ts +6 -0
- package/dist/tools/defs/properties.d.ts.map +1 -0
- package/dist/tools/defs/properties.js +71 -0
- package/dist/tools/defs/properties.js.map +1 -0
- package/dist/tools/defs/runtime.d.ts +6 -0
- package/dist/tools/defs/runtime.d.ts.map +1 -0
- package/dist/tools/defs/runtime.js +145 -0
- package/dist/tools/defs/runtime.js.map +1 -0
- package/dist/tools/defs/scripts.d.ts +18 -0
- package/dist/tools/defs/scripts.d.ts.map +1 -0
- package/dist/tools/defs/scripts.js +163 -0
- package/dist/tools/defs/scripts.js.map +1 -0
- package/dist/tools/defs/tags.d.ts +6 -0
- package/dist/tools/defs/tags.d.ts.map +1 -0
- package/dist/tools/defs/tags.js +74 -0
- package/dist/tools/defs/tags.js.map +1 -0
- package/dist/tools/defs/visual.d.ts +7 -0
- package/dist/tools/defs/visual.d.ts.map +1 -0
- package/dist/tools/defs/visual.js +208 -0
- package/dist/tools/defs/visual.js.map +1 -0
- package/dist/tools/index.d.ts +101 -25
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +580 -63
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/nudges.d.ts +25 -0
- package/dist/tools/nudges.d.ts.map +1 -0
- package/dist/tools/nudges.js +34 -0
- package/dist/tools/nudges.js.map +1 -0
- package/dist/tools/registry.d.ts +20 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +65 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/types.d.ts +24 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +2 -0
- package/dist/tools/types.js.map +1 -0
- package/package.json +7 -6
- package/studio-plugin/MCPPlugin.rbxmx +3 -238
- package/studio-plugin/plugin.luau +2041 -365
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read-only inspection tools: place info, services, instance/class/project
|
|
3
|
+
* structure, current selection, and Studio output buffer.
|
|
4
|
+
*/
|
|
5
|
+
export const inspectionTools = [
|
|
6
|
+
{
|
|
7
|
+
name: 'get_place_info',
|
|
8
|
+
description: 'Get place ID, name, and game settings',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {},
|
|
12
|
+
},
|
|
13
|
+
handler: (_args, { tools }) => tools.getPlaceInfo(),
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'get_services',
|
|
17
|
+
description: 'Get available Roblox services and their children',
|
|
18
|
+
inputSchema: {
|
|
19
|
+
type: 'object',
|
|
20
|
+
properties: {
|
|
21
|
+
serviceName: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
description: 'Optional specific service name to query',
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
handler: (args, { tools }) => tools.getServices(args?.serviceName),
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'get_instance_properties',
|
|
31
|
+
description: 'Get all properties of a specific Roblox instance in Studio',
|
|
32
|
+
inputSchema: {
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {
|
|
35
|
+
instancePath: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
description: 'Roblox instance path using dot notation (e.g., "game.Workspace.Part", "game.ServerScriptService.MainScript", "game.ReplicatedStorage.ModuleScript")',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
required: ['instancePath'],
|
|
41
|
+
},
|
|
42
|
+
handler: (args, { tools }) => tools.getInstanceProperties(args?.instancePath),
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'get_class_info',
|
|
46
|
+
description: 'Get available properties/methods for a Roblox class via live Studio reflection (what this engine build actually exposes). For canonical docs with descriptions and deprecation notes, use get_roblox_api_reference instead.',
|
|
47
|
+
inputSchema: {
|
|
48
|
+
type: 'object',
|
|
49
|
+
properties: {
|
|
50
|
+
className: {
|
|
51
|
+
type: 'string',
|
|
52
|
+
description: 'Roblox class name',
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
required: ['className'],
|
|
56
|
+
},
|
|
57
|
+
handler: (args, { tools }) => tools.getClassInfo(args?.className),
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'get_project_structure',
|
|
61
|
+
description: 'Get complete game hierarchy. IMPORTANT: Use maxDepth parameter (default: 3) to explore deeper levels of the hierarchy. Set higher values like 5-10 for comprehensive exploration',
|
|
62
|
+
inputSchema: {
|
|
63
|
+
type: 'object',
|
|
64
|
+
properties: {
|
|
65
|
+
path: {
|
|
66
|
+
type: 'string',
|
|
67
|
+
description: 'Optional path to start from (defaults to workspace root)',
|
|
68
|
+
default: '',
|
|
69
|
+
},
|
|
70
|
+
maxDepth: {
|
|
71
|
+
type: 'number',
|
|
72
|
+
description: 'Maximum depth to traverse (default: 3). RECOMMENDED: Use 5-10 for thorough exploration. Higher values provide more complete structure',
|
|
73
|
+
default: 3,
|
|
74
|
+
},
|
|
75
|
+
scriptsOnly: {
|
|
76
|
+
type: 'boolean',
|
|
77
|
+
description: 'Show only scripts and script containers',
|
|
78
|
+
default: false,
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
handler: (args, { tools }) => tools.getProjectStructure(args?.path, args?.maxDepth, args?.scriptsOnly),
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'get_selection',
|
|
86
|
+
description: 'Get all currently selected objects',
|
|
87
|
+
inputSchema: {
|
|
88
|
+
type: 'object',
|
|
89
|
+
properties: {},
|
|
90
|
+
},
|
|
91
|
+
handler: (_args, { tools }) => tools.getSelection(),
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'grep',
|
|
95
|
+
description: "Powerful grep over the Roblox instance tree — like Claude Code's Grep, but for the explorer instead of the filesystem. " +
|
|
96
|
+
'Walks descendants of `path` (default `game`), filters by `glob` (Name pattern) and `type` (ClassName / IsA), then searches script `Source` for `pattern`. ' +
|
|
97
|
+
'Use this FIRST when the user mentions a script/instance you have not seen — much faster than browsing get_project_structure.\n\n' +
|
|
98
|
+
'`output_mode` controls the shape: "files_with_matches" (default) = instance paths with hits; "content" = matching lines with numbers + optional context (-A/-B/-C); "count" = per-instance counts. -i, head_limit, and multiline behave like Claude Code Grep.\n\n' +
|
|
99
|
+
'Notes: `pattern` is a Luau string pattern (NOT PCRE — use `%.` for a literal dot). Default `type` is ["LuaSourceContainer"] (all script kinds); Source is only read for those, so to search non-script instances by Name pass a `type` like ["Part"] plus `glob`, and for a Name-only search pass `pattern: ".*"` with a `glob`.',
|
|
100
|
+
inputSchema: {
|
|
101
|
+
type: 'object',
|
|
102
|
+
properties: {
|
|
103
|
+
pattern: {
|
|
104
|
+
type: 'string',
|
|
105
|
+
description: 'The Luau pattern to search for in script Source. Matched line-by-line by default, or against the whole source if `multiline` is true. To do a name-only search, pass ".*" here and use `glob` to filter by Name.',
|
|
106
|
+
},
|
|
107
|
+
path: {
|
|
108
|
+
type: 'string',
|
|
109
|
+
description: 'Instance path to scope the search to (e.g. "game.ServerScriptService"). Defaults to "game" (the entire DataModel).',
|
|
110
|
+
},
|
|
111
|
+
glob: {
|
|
112
|
+
type: 'string',
|
|
113
|
+
description: 'Filter which instances to even consider by their Name (Luau pattern, e.g. "Damage.*", "PlayerHandler"). Analogous to glob in Claude Code Grep.',
|
|
114
|
+
},
|
|
115
|
+
type: {
|
|
116
|
+
type: 'array',
|
|
117
|
+
items: { type: 'string' },
|
|
118
|
+
description: 'Filter by ClassName(s) or IsA group(s). E.g. ["Script", "LocalScript"], or ["LuaSourceContainer"] (matches all script kinds), or ["GuiObject"] for any UI element. Defaults to ["LuaSourceContainer"]. Each entry is tested with `instance:IsA(name)` so abstract types work.',
|
|
119
|
+
},
|
|
120
|
+
'-i': {
|
|
121
|
+
type: 'boolean',
|
|
122
|
+
description: 'Case-insensitive matching. Applies to both `pattern` (Source) and `glob` (Name). Default false.',
|
|
123
|
+
default: false,
|
|
124
|
+
},
|
|
125
|
+
'-A': {
|
|
126
|
+
type: 'number',
|
|
127
|
+
description: 'Lines of context AFTER each match (like grep -A). Requires output_mode="content".',
|
|
128
|
+
default: 0,
|
|
129
|
+
},
|
|
130
|
+
'-B': {
|
|
131
|
+
type: 'number',
|
|
132
|
+
description: 'Lines of context BEFORE each match (like grep -B). Requires output_mode="content".',
|
|
133
|
+
default: 0,
|
|
134
|
+
},
|
|
135
|
+
'-C': {
|
|
136
|
+
type: 'number',
|
|
137
|
+
description: 'Lines of context BEFORE AND AFTER each match (like grep -C). Requires output_mode="content". Overrides -A/-B.',
|
|
138
|
+
default: 0,
|
|
139
|
+
},
|
|
140
|
+
output_mode: {
|
|
141
|
+
type: 'string',
|
|
142
|
+
enum: ['files_with_matches', 'content', 'count'],
|
|
143
|
+
description: 'Output format. "files_with_matches" (default) = paths only, like `grep -l`. "content" = matching lines with line numbers and context. "count" = match count per instance.',
|
|
144
|
+
default: 'files_with_matches',
|
|
145
|
+
},
|
|
146
|
+
head_limit: {
|
|
147
|
+
type: 'number',
|
|
148
|
+
description: 'Limit output to first N entries across all modes (like `| head -N`). 0 = unlimited (default).',
|
|
149
|
+
default: 0,
|
|
150
|
+
},
|
|
151
|
+
multiline: {
|
|
152
|
+
type: 'boolean',
|
|
153
|
+
description: 'When true, match the pattern against the entire source as one string (so `.` matches newlines, patterns can span lines). When false (default), match line-by-line.',
|
|
154
|
+
default: false,
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
required: ['pattern'],
|
|
158
|
+
},
|
|
159
|
+
handler: (args, { tools }) => tools.grep(args?.pattern, {
|
|
160
|
+
path: args?.path,
|
|
161
|
+
glob: args?.glob,
|
|
162
|
+
type: args?.type,
|
|
163
|
+
caseInsensitive: args?.['-i'] ?? false,
|
|
164
|
+
after: args?.['-A'] ?? 0,
|
|
165
|
+
before: args?.['-B'] ?? 0,
|
|
166
|
+
context: args?.['-C'] ?? 0,
|
|
167
|
+
outputMode: args?.output_mode ?? 'files_with_matches',
|
|
168
|
+
headLimit: args?.head_limit ?? 0,
|
|
169
|
+
multiline: args?.multiline ?? false,
|
|
170
|
+
}),
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: 'get_output',
|
|
174
|
+
description: 'Read the Output window content from Roblox Studio. Captures print(), warn(), and error() messages. Use after play_solo to debug scripts.',
|
|
175
|
+
inputSchema: {
|
|
176
|
+
type: 'object',
|
|
177
|
+
properties: {
|
|
178
|
+
limit: {
|
|
179
|
+
type: 'number',
|
|
180
|
+
description: 'Maximum number of messages to return (default: 100)',
|
|
181
|
+
default: 100,
|
|
182
|
+
},
|
|
183
|
+
since: {
|
|
184
|
+
type: 'number',
|
|
185
|
+
description: 'Only return messages after this Unix timestamp',
|
|
186
|
+
},
|
|
187
|
+
messageTypes: {
|
|
188
|
+
type: 'array',
|
|
189
|
+
items: { type: 'string' },
|
|
190
|
+
description: 'Filter by message type: MessageOutput, MessageInfo, MessageWarning, MessageError',
|
|
191
|
+
},
|
|
192
|
+
clear: {
|
|
193
|
+
type: 'boolean',
|
|
194
|
+
description: 'Clear the output buffer after reading (default: false)',
|
|
195
|
+
default: false,
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
handler: (args, { tools }) => tools.getOutput(args?.limit, args?.since, args?.messageTypes, args?.clear),
|
|
200
|
+
},
|
|
201
|
+
];
|
|
202
|
+
//# sourceMappingURL=inspection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspection.js","sourceRoot":"","sources":["../../../src/tools/defs/inspection.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAc;IACxC;QACE,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,uCAAuC;QACpD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE;SACf;QACD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE;KACpD;IAED;QACE,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,kDAAkD;QAC/D,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,yCAAyC;iBACvD;aACF;SACF;QACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,WAAW,CAAC;KACnE;IAED;QACE,IAAI,EAAE,yBAAyB;QAC/B,WAAW,EAAE,4DAA4D;QACzE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,qJAAqJ;iBACxJ;aACF;YACD,QAAQ,EAAE,CAAC,cAAc,CAAC;SAC3B;QACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,K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AAS;oBACf,WAAW,EAAE,wDAAwD;oBACrE,OAAO,EAAE,KAAK;iBACf;aACF;SACF;QACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAC3B,KAAK,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,KAAK,CAAC;KAC7E;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objects.d.ts","sourceRoot":"","sources":["../../../src/tools/defs/objects.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,OAAO,EAqHhC,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Object lifecycle tools: create, delete, clone, move, insert from Creator Store.
|
|
3
|
+
*/
|
|
4
|
+
export const objectTools = [
|
|
5
|
+
{
|
|
6
|
+
name: 'create_object',
|
|
7
|
+
description: 'Create a new Roblox object instance (basic, without properties)',
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
className: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
description: 'Roblox class name (e.g., "Part", "Script", "Folder")',
|
|
14
|
+
},
|
|
15
|
+
parent: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
description: 'Path to the parent instance (e.g., "game.Workspace")',
|
|
18
|
+
},
|
|
19
|
+
name: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
description: 'Optional name for the new object',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
required: ['className', 'parent'],
|
|
25
|
+
},
|
|
26
|
+
handler: (args, { tools }) => tools.createObject(args?.className, args?.parent, args?.name),
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'delete_object',
|
|
30
|
+
description: 'Delete a Roblox object instance',
|
|
31
|
+
inputSchema: {
|
|
32
|
+
type: 'object',
|
|
33
|
+
properties: {
|
|
34
|
+
instancePath: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
description: 'Path to the instance to delete',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
required: ['instancePath'],
|
|
40
|
+
},
|
|
41
|
+
handler: (args, { tools }) => tools.deleteObject(args?.instancePath),
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'clone_instance',
|
|
45
|
+
description: 'Clone (copy) a Roblox instance to a new parent location. Creates a deep copy including all children and properties.',
|
|
46
|
+
inputSchema: {
|
|
47
|
+
type: 'object',
|
|
48
|
+
properties: {
|
|
49
|
+
sourcePath: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
description: 'Path to the instance to clone (e.g., "game.Workspace.walkietalkie")',
|
|
52
|
+
},
|
|
53
|
+
targetParent: {
|
|
54
|
+
type: 'string',
|
|
55
|
+
description: 'Path to the new parent (e.g., "game.ReplicatedStorage")',
|
|
56
|
+
},
|
|
57
|
+
newName: {
|
|
58
|
+
type: 'string',
|
|
59
|
+
description: 'Optional new name for the cloned instance',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
required: ['sourcePath', 'targetParent'],
|
|
63
|
+
},
|
|
64
|
+
handler: (args, { tools }) => tools.cloneInstance(args?.sourcePath, args?.targetParent, args?.newName),
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'move_instance',
|
|
68
|
+
description: 'Move a Roblox instance to a new parent location. Changes the Parent property.',
|
|
69
|
+
inputSchema: {
|
|
70
|
+
type: 'object',
|
|
71
|
+
properties: {
|
|
72
|
+
instancePath: {
|
|
73
|
+
type: 'string',
|
|
74
|
+
description: 'Path to the instance to move (e.g., "game.Workspace.Tool")',
|
|
75
|
+
},
|
|
76
|
+
newParent: {
|
|
77
|
+
type: 'string',
|
|
78
|
+
description: 'Path to the new parent (e.g., "game.StarterPack")',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
required: ['instancePath', 'newParent'],
|
|
82
|
+
},
|
|
83
|
+
handler: (args, { tools }) => tools.moveInstance(args?.instancePath, args?.newParent),
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'insert_asset',
|
|
87
|
+
description: 'Download and insert a Creator Store asset (model, package, etc.) into Roblox Studio for reference. Uses game:GetObjects() which works with any free/public asset. Perfect for loading reference code, example implementations, or asset libraries that the AI can then read and analyze using get_instance_children and get_script_source.',
|
|
88
|
+
inputSchema: {
|
|
89
|
+
type: 'object',
|
|
90
|
+
properties: {
|
|
91
|
+
assetId: {
|
|
92
|
+
type: 'number',
|
|
93
|
+
description: 'The Creator Store asset ID (the number from the asset URL, e.g., 104116977416770)',
|
|
94
|
+
},
|
|
95
|
+
folderName: {
|
|
96
|
+
type: 'string',
|
|
97
|
+
description: 'Name of the folder to create/use for storing assets (default: "AIReferences")',
|
|
98
|
+
default: 'AIReferences',
|
|
99
|
+
},
|
|
100
|
+
targetParent: {
|
|
101
|
+
type: 'string',
|
|
102
|
+
description: 'Parent path where the folder should be created (default: "game.Workspace"). Use "game.ReplicatedStorage" or "game.ServerStorage" to keep assets out of the visible workspace.',
|
|
103
|
+
default: 'game.Workspace',
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
required: ['assetId'],
|
|
107
|
+
},
|
|
108
|
+
handler: (args, { tools }) => tools.insertAsset(args?.assetId, args?.folderName, args?.targetParent),
|
|
109
|
+
},
|
|
110
|
+
];
|
|
111
|
+
//# sourceMappingURL=objects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objects.js","sourceRoot":"","sources":["../../../src/tools/defs/objects.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAc;IACpC;QACE,IAAI,EAAE,eAAe;QACrB,WAAW,EAAE,iEAAiE;QAC9E,WAAW,EAAE;YACX,IAAI,EAAE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EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,CAAC;KACzE;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../../../src/tools/defs/properties.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,OAAO,EAsElC,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property modification tools: single-instance and bulk set/get.
|
|
3
|
+
*/
|
|
4
|
+
export const propertyTools = [
|
|
5
|
+
{
|
|
6
|
+
name: 'set_property',
|
|
7
|
+
description: 'Set a property on any Roblox instance',
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: 'object',
|
|
10
|
+
properties: {
|
|
11
|
+
instancePath: {
|
|
12
|
+
type: 'string',
|
|
13
|
+
description: 'Path to the instance (e.g., "game.Workspace.Part")',
|
|
14
|
+
},
|
|
15
|
+
propertyName: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
description: 'Name of the property to set',
|
|
18
|
+
},
|
|
19
|
+
propertyValue: {
|
|
20
|
+
description: 'Value to set the property to (any type)',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
required: ['instancePath', 'propertyName', 'propertyValue'],
|
|
24
|
+
},
|
|
25
|
+
handler: (args, { tools }) => tools.setProperty(args?.instancePath, args?.propertyName, args?.propertyValue),
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'mass_set_property',
|
|
29
|
+
description: 'Set the same property on multiple instances at once',
|
|
30
|
+
inputSchema: {
|
|
31
|
+
type: 'object',
|
|
32
|
+
properties: {
|
|
33
|
+
paths: {
|
|
34
|
+
type: 'array',
|
|
35
|
+
items: { type: 'string' },
|
|
36
|
+
description: 'Array of instance paths to modify',
|
|
37
|
+
},
|
|
38
|
+
propertyName: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'Name of the property to set',
|
|
41
|
+
},
|
|
42
|
+
propertyValue: {
|
|
43
|
+
description: 'Value to set the property to (any type)',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
required: ['paths', 'propertyName', 'propertyValue'],
|
|
47
|
+
},
|
|
48
|
+
handler: (args, { tools }) => tools.massSetProperty(args?.paths, args?.propertyName, args?.propertyValue),
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'mass_get_property',
|
|
52
|
+
description: 'Get the same property from multiple instances at once',
|
|
53
|
+
inputSchema: {
|
|
54
|
+
type: 'object',
|
|
55
|
+
properties: {
|
|
56
|
+
paths: {
|
|
57
|
+
type: 'array',
|
|
58
|
+
items: { type: 'string' },
|
|
59
|
+
description: 'Array of instance paths to read from',
|
|
60
|
+
},
|
|
61
|
+
propertyName: {
|
|
62
|
+
type: 'string',
|
|
63
|
+
description: 'Name of the property to get',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
required: ['paths', 'propertyName'],
|
|
67
|
+
},
|
|
68
|
+
handler: (args, { tools }) => tools.massGetProperty(args?.paths, args?.propertyName),
|
|
69
|
+
},
|
|
70
|
+
];
|
|
71
|
+
//# sourceMappingURL=properties.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../src/tools/defs/properties.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAc;IACtC;QACE,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,uCAAuC;QACpD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,oDAAoD;iBAClE;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,6BAA6B;iBAC3C;gBACD,aAAa,E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ACD,QAAQ,EAAE,CAAC,OAAO,EAAE,cAAc,CAAC;SACpC;QACD,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC;KACrF;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/tools/defs/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG3C;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,OAAO,EA0KjC,CAAC"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { INSTRUMENT_OVER_PLAYTEST, RUN_LIVE_LUA_NUDGE } from '../nudges.js';
|
|
2
|
+
/**
|
|
3
|
+
* Studio runtime tools: undo/redo and Play Solo session control.
|
|
4
|
+
*/
|
|
5
|
+
export const runtimeTools = [
|
|
6
|
+
{
|
|
7
|
+
name: 'undo',
|
|
8
|
+
description: 'Undo the last MCP mutation(s) in Roblox Studio. All MCP mutation tools (create, delete, set_property, edit_script, execute_lua, etc.) are automatically wrapped in ChangeHistoryService recordings, so each tool call = one Ctrl+Z. Pass `count` to undo multiple steps in one round-trip; stops early at the bottom of Studio\'s undo stack and reports `stopped_early: true` in that case. The response\'s `entries` array describes each action undone (most-recent first). Call `get_history` first if you want to peek without committing.',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
count: {
|
|
13
|
+
type: 'number',
|
|
14
|
+
description: 'How many steps to undo (default 1, max 100). Each step is one MCP tool call worth of changes — e.g. mass_create_objects of 100 parts is ONE step. Stops early at the bottom of the undo stack.',
|
|
15
|
+
default: 1,
|
|
16
|
+
minimum: 1,
|
|
17
|
+
maximum: 100,
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
handler: (args, { tools }) => tools.undo(args?.count),
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'redo',
|
|
25
|
+
description: 'Redo previously undone change(s) in Roblox Studio. Mirrors `undo`: pass `count` to redo multiple steps; stops early at the top of the redo stack and reports `stopped_early`. The redo stack is cleared whenever a new mutation is made (standard undo/redo semantics).',
|
|
26
|
+
inputSchema: {
|
|
27
|
+
type: 'object',
|
|
28
|
+
properties: {
|
|
29
|
+
count: {
|
|
30
|
+
type: 'number',
|
|
31
|
+
description: 'How many steps to redo (default 1, max 100).',
|
|
32
|
+
default: 1,
|
|
33
|
+
minimum: 1,
|
|
34
|
+
maximum: 100,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
handler: (args, { tools }) => tools.redo(args?.count),
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'get_history',
|
|
42
|
+
description: "Read-only view of the recent MCP undo/redo stacks. Use it to peek at what `undo` would revert, to recover awareness after a session resume, or to choose how far back to roll an `undo`.\n\nReturns Studio's `can_undo`/`can_redo` flags plus both stacks (most-recent first; index 0 is what undo/redo consumes next). Each entry has action, target, summary, timestamp, age_seconds; pass include_details:true for the per-action payload (off by default to keep responses small). Note: the undo stack is shared with the user's own Ctrl+Z, so can_undo may be true even when tracked_undo_count is 0.",
|
|
43
|
+
inputSchema: {
|
|
44
|
+
type: 'object',
|
|
45
|
+
properties: {
|
|
46
|
+
limit: {
|
|
47
|
+
type: 'number',
|
|
48
|
+
description: 'Max entries to return per stack (default 20, max 100). The plugin retains the last 100 MCP actions.',
|
|
49
|
+
default: 20,
|
|
50
|
+
minimum: 1,
|
|
51
|
+
maximum: 100,
|
|
52
|
+
},
|
|
53
|
+
include_details: {
|
|
54
|
+
type: 'boolean',
|
|
55
|
+
description: 'Include the per-action `details` payload (e.g. property values, batch counts). Off by default to save context — turn on when you actually need the granular data.',
|
|
56
|
+
default: false,
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
handler: (args, { tools }) => tools.getHistory(args?.limit, args?.include_details),
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'play_solo',
|
|
64
|
+
description: 'Start a play test (Play Solo) in Roblox Studio via StudioTestService:ExecutePlayModeAsync. Automatically injects an in-test companion script so stop_play and get_playtest_output work. If a previous test is still tracked, stops it first. Returns a sessionId that ties together start, stop, and output reads.',
|
|
65
|
+
inputSchema: {
|
|
66
|
+
type: 'object',
|
|
67
|
+
properties: {},
|
|
68
|
+
},
|
|
69
|
+
nudge: INSTRUMENT_OVER_PLAYTEST,
|
|
70
|
+
handler: (_args, { tools }) => tools.playSolo(),
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: 'stop_play',
|
|
74
|
+
description: 'Stop the current play test cleanly via StudioTestService:EndTest (called from inside the test by an injected companion script). Restores pre-play state — unlike RunService:Stop, this is the proper way to end a Play Solo session. Idempotent: returns successfully if no test is running.',
|
|
75
|
+
inputSchema: {
|
|
76
|
+
type: 'object',
|
|
77
|
+
properties: {},
|
|
78
|
+
},
|
|
79
|
+
handler: (_args, { tools }) => tools.stopPlay(),
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: 'get_playtest_output',
|
|
83
|
+
description: "Read script output (print/warn/error) captured DURING a play test session. Streamed live from the test's Server DataModel by the injected companion. Survives after the test ends so you can debug post-hoc. For non-playtest output (Edit-mode plugin output, build messages), use get_output instead. Use the sinceSeq cursor returned in nextSinceSeq to tail incrementally.",
|
|
84
|
+
inputSchema: {
|
|
85
|
+
type: 'object',
|
|
86
|
+
properties: {
|
|
87
|
+
sinceSeq: {
|
|
88
|
+
type: 'number',
|
|
89
|
+
description: 'Only return entries with seq > this value. Pass back nextSinceSeq from a prior call to avoid re-reading.',
|
|
90
|
+
},
|
|
91
|
+
limit: {
|
|
92
|
+
type: 'number',
|
|
93
|
+
description: 'Max entries to return (default 500, max 5000).',
|
|
94
|
+
default: 500,
|
|
95
|
+
},
|
|
96
|
+
messageTypes: {
|
|
97
|
+
type: 'array',
|
|
98
|
+
items: { type: 'string' },
|
|
99
|
+
description: 'Filter by MessageType: MessageOutput, MessageInfo, MessageWarning, MessageError.',
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
nudge: INSTRUMENT_OVER_PLAYTEST,
|
|
104
|
+
handler: (args, { tools }) => tools.getPlaytestOutput(args?.sinceSeq, args?.limit, args?.messageTypes),
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: 'run_live_lua',
|
|
108
|
+
description: 'Execute Lua/Luau INSIDE a running play test (call play_solo first). Runs in the test\'s live DataModel with full access to running game state — fire RemoteEvents, query Players, read Workspace at the current physics tick, mutate the world. Different from execute_lua, which runs in the Edit-mode plugin context.\n\ntarget="server" (default) is the primary mode and needs `Game Settings → Security → LoadString` enabled (execution uses loadstring). target="client" is currently engine-blocked (Roblox disables loadstring in LocalScripts) and always returns loadstring_disabled — drive client behavior from the server via Remotes instead.\n\nNever throws: failures come back as { success: false, error, message } with an error enum (e.g. no_playtest, loadstring_disabled, compile_error, runtime_error, timeout). On success returns ALL Lua returns in `values` (array), plus `logs` when captureLogs=true and a `traceback` on error. Avoid `while true do end` without a task.wait() — it wedges the companion; bound long work with task.wait or timeoutMs.',
|
|
109
|
+
inputSchema: {
|
|
110
|
+
type: 'object',
|
|
111
|
+
properties: {
|
|
112
|
+
code: {
|
|
113
|
+
type: 'string',
|
|
114
|
+
description: 'Lua/Luau source to execute. Has access to the full Roblox API in the test DataModel: game, workspace, all services (Players, ReplicatedStorage, etc.), Instance, Vector3, CFrame, Color3, etc., plus loadstring, require, debug. Use `return` to send values back to the caller (multi-return supported).',
|
|
115
|
+
},
|
|
116
|
+
target: {
|
|
117
|
+
type: 'string',
|
|
118
|
+
enum: ['server', 'client'],
|
|
119
|
+
description: 'Where to run the code. "server" runs in the test\'s Server DataModel (full Game/RemoteEvent/DataStore access; needs LoadStringEnabled=true in place settings). "client" runs in a Player\'s LocalPlayer context (PlayerGui, ContextActionService, LocalPlayer.Character). Defaults to "server".',
|
|
120
|
+
default: 'server',
|
|
121
|
+
},
|
|
122
|
+
playerName: {
|
|
123
|
+
type: 'string',
|
|
124
|
+
description: 'Only used when target="client" and multiple clients are connected. The display name (or username) of the Player to run the code on. If omitted and exactly one client is connected, that one is used.',
|
|
125
|
+
},
|
|
126
|
+
timeoutMs: {
|
|
127
|
+
type: 'number',
|
|
128
|
+
description: 'Max time the code may run before the watchdog fires with errorType="timeout". Range 1000–30000ms, default 5000ms.',
|
|
129
|
+
default: 5000,
|
|
130
|
+
minimum: 1000,
|
|
131
|
+
maximum: 30000,
|
|
132
|
+
},
|
|
133
|
+
captureLogs: {
|
|
134
|
+
type: 'boolean',
|
|
135
|
+
description: 'When true (default), capture print()/warn()/error() output emitted by the code and return it in `logs`. Set to false if your code is chatty and you only care about return values.',
|
|
136
|
+
default: true,
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
required: ['code'],
|
|
140
|
+
},
|
|
141
|
+
nudge: RUN_LIVE_LUA_NUDGE,
|
|
142
|
+
handler: (args, { tools }) => tools.runLiveLua(args?.code, args?.target ?? 'server', args?.playerName, args?.timeoutMs, args?.captureLogs),
|
|
143
|
+
},
|
|
144
|
+
];
|
|
145
|
+
//# sourceMappingURL=runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../../src/tools/defs/runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAE5E;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAc;IACrC;QACE,IAAI,EAAE,MAAM;QACZ,WAAW,EACT,ihBAAihB;QACnhB,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,KAAK,EAAE;oBACL,IAAI,EAAE,Q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AA2S;iBAC9S;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;oBAC1B,WAAW,EACT,iSAAiS;oBACnS,OAAO,EAAE,QAAQ;iBAClB;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,uMAAuM;iBAC1M;gBACD,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,mHAAmH;oBACrH,OAAO,EAAE,IAAI;oBACb,OAAO,EAAE,IAAI;oBACb,OAAO,EAAE,KAAK;iBACf;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,SAAS;oBACf,WAAW,EACT,oLAAoL;oBACtL,OAAO,EAAE,IAAI;iBACd;aACF;YACD,QAAQ,EAAE,CAAC,MAAM,CAAC;SACnB;QACD,KAAK,EAAE,kBAAkB;QACzB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAC3B,KAAK,CAAC,UAAU,CACd,IAAI,EAAE,IAAI,EACT,IAAI,EAAE,MAA8B,IAAI,QAAQ,EACjD,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,WAAW,CAClB;KACJ;CACF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ToolDef } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Script editing tools — string-based (Claude Code-style) only.
|
|
4
|
+
*
|
|
5
|
+
* The legacy line-based partial editors (edit_script_lines /
|
|
6
|
+
* insert_script_lines / delete_script_lines) were removed: line numbers
|
|
7
|
+
* shift on every edit, the model has to count manually, and `edit_script`
|
|
8
|
+
* does the same job more reliably with exact string matching + automatic
|
|
9
|
+
* syntax validation.
|
|
10
|
+
*
|
|
11
|
+
* `search_script` was also removed: the `grep` tool (inspection.ts)
|
|
12
|
+
* supersedes it — passing a single script path as `grep`'s `path` does
|
|
13
|
+
* the exact same single-script search, plus everything `grep` adds
|
|
14
|
+
* (cross-file, glob/type filters, output modes, head limits). Keeping
|
|
15
|
+
* two near-identical tools just creates choice paralysis for the LLM.
|
|
16
|
+
*/
|
|
17
|
+
export declare const scriptTools: ToolDef[];
|
|
18
|
+
//# sourceMappingURL=scripts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scripts.d.ts","sourceRoot":"","sources":["../../../src/tools/defs/scripts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW,EAAE,OAAO,EAsLhC,CAAC"}
|