@turingcode/cli 0.3.18 → 0.3.19
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.
|
@@ -3,15 +3,18 @@ import { ToolInfo } from '../../core/mcp.js';
|
|
|
3
3
|
/** A tool result larger than this many bytes is saved to a file instead of printed. */
|
|
4
4
|
export declare const SAVE_ABOVE_BYTES = 4096;
|
|
5
5
|
/**
|
|
6
|
-
* Formats tools as a
|
|
6
|
+
* Formats tools as a `Tools:` list, each `- <name>` then the first line of its description,
|
|
7
|
+
* followed by a hint to `tool describe`.
|
|
7
8
|
*
|
|
8
9
|
* @param {ToolInfo[]} tools - Tools from the gateway.
|
|
9
|
-
* @returns {string} The text, ending in a newline
|
|
10
|
+
* @returns {string} The text, ending in a newline.
|
|
10
11
|
*
|
|
11
12
|
* @example
|
|
12
|
-
* formatToolSummaries([{ name: "read_file", description: "Reads a file.\nMore." }]);
|
|
13
|
+
* formatToolSummaries([{ name: "read_file", description: "Reads a file.\nMore." }]);
|
|
14
|
+
* // "Tools:\n- read_file\nReads a file.\n\n---\nHint: ...\n"
|
|
13
15
|
*/
|
|
14
16
|
export declare function formatToolSummaries(tools: ToolInfo[]): string;
|
|
17
|
+
export declare const TOOL_LIST_HINT = "Hint: use \"turingcode tool describe <tool_name>\" to get its full description and parameters.";
|
|
15
18
|
/**
|
|
16
19
|
* Formats tools with their full description and arguments, one `## <name>` section per tool.
|
|
17
20
|
*
|
|
@@ -27,22 +27,26 @@ function schemaType(schema) {
|
|
|
27
27
|
return [schema.type ?? 'any'].flat().join(' | ');
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* Formats tools as a
|
|
30
|
+
* Formats tools as a `Tools:` list, each `- <name>` then the first line of its description,
|
|
31
|
+
* followed by a hint to `tool describe`.
|
|
31
32
|
*
|
|
32
33
|
* @param {ToolInfo[]} tools - Tools from the gateway.
|
|
33
|
-
* @returns {string} The text, ending in a newline
|
|
34
|
+
* @returns {string} The text, ending in a newline.
|
|
34
35
|
*
|
|
35
36
|
* @example
|
|
36
|
-
* formatToolSummaries([{ name: "read_file", description: "Reads a file.\nMore." }]);
|
|
37
|
+
* formatToolSummaries([{ name: "read_file", description: "Reads a file.\nMore." }]);
|
|
38
|
+
* // "Tools:\n- read_file\nReads a file.\n\n---\nHint: ...\n"
|
|
37
39
|
*/
|
|
38
40
|
export function formatToolSummaries(tools) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
if (tools.length === 0)
|
|
42
|
+
return 'No tools found.\n';
|
|
43
|
+
const items = tools.map((t) => {
|
|
41
44
|
const summary = t.description?.trim().split('\n')[0];
|
|
42
|
-
return
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
+
return `- ${t.name}\n` + (summary ? summary + '\n' : '');
|
|
46
|
+
});
|
|
47
|
+
return `Tools:\n${items.join('\n')}\n---\n${TOOL_LIST_HINT}\n`;
|
|
45
48
|
}
|
|
49
|
+
export const TOOL_LIST_HINT = 'Hint: use "turingcode tool describe <tool_name>" to get its full description and parameters.';
|
|
46
50
|
/**
|
|
47
51
|
* Formats tools with their full description and arguments, one `## <name>` section per tool.
|
|
48
52
|
*
|
|
@@ -28,7 +28,6 @@ Pins, clocks, `.ioc` edits, register lookup and the datasheet knowledge base (MC
|
|
|
28
28
|
- `turingcode tool call <name> --args '<json>' > result.md` runs one.
|
|
29
29
|
- On Windows PowerShell or cmd, inline JSON loses its quotes: write the JSON to a `.json` file and pass `--args args.json`.
|
|
30
30
|
|
|
31
|
-
|
|
32
31
|
## New project
|
|
33
32
|
|
|
34
33
|
Only when the user asks for a new project: follow [references/newproject.md](references/newproject.md).
|
package/mods/claude/turingcode-skills/skills/turingcode-firmware-code/references/init-pins.md
CHANGED
|
@@ -18,7 +18,11 @@ Finally you must include a consice report of the routed pins (wether you could s
|
|
|
18
18
|
|
|
19
19
|
## Help the user for connections
|
|
20
20
|
|
|
21
|
-
-
|
|
21
|
+
- help the user to connect the pins of the MCU to the ICs that they have on their project (if any), tell them what mcu pin to connect to which IC pin exactly in a table (dont forget to mention power pins too).
|
|
22
|
+
|
|
23
|
+
| MCU PIN | SENSOR_X PIN |
|
|
24
|
+
| --- | --- |
|
|
25
|
+
| pin B12 | sensor pin Y |
|
|
22
26
|
|
|
23
27
|
### Safety Rules if connections need changing
|
|
24
28
|
|
package/package.json
CHANGED