@pencil-agent/nano-pencil 1.11.13 → 1.11.14
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.
|
@@ -9,6 +9,7 @@ import { existsSync, readFileSync } from "fs";
|
|
|
9
9
|
import { join } from "path";
|
|
10
10
|
import { getAgentDir } from "../../config.js";
|
|
11
11
|
import { AuthStorage } from "../config/auth-storage.js";
|
|
12
|
+
import { getMCPConfigPath } from "./mcp-config.js";
|
|
12
13
|
// Log level control: DEBUG shows all MCP messages, RELEASE only shows summary
|
|
13
14
|
// Check if running from installed location (production) vs development
|
|
14
15
|
const isProductionBuild = typeof import.meta.url === "string" && import.meta.url.includes("node_modules");
|
|
@@ -45,8 +46,7 @@ export class MCPClient {
|
|
|
45
46
|
* Load MCP server configurations from config file
|
|
46
47
|
*/
|
|
47
48
|
loadServersFromConfig() {
|
|
48
|
-
const
|
|
49
|
-
const configPath = join(configDir, "mcp.json");
|
|
49
|
+
const configPath = getMCPConfigPath();
|
|
50
50
|
if (!existsSync(configPath)) {
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
@@ -21,7 +21,7 @@ export function buildSystemPrompt(options = {}) {
|
|
|
21
21
|
second: "2-digit",
|
|
22
22
|
timeZoneName: "short",
|
|
23
23
|
});
|
|
24
|
-
const timeReasoningInstruction = "\nFor exact current time or date-sensitive reasoning, use the `time` tool
|
|
24
|
+
const timeReasoningInstruction = "\nFor exact current time or any date-sensitive reasoning, you must use the `time` tool before answering. This includes questions about the current time, current date, today, tomorrow, yesterday, this week, deadlines, elapsed time, or anything that depends on the real system clock. Do not rely only on this prompt timestamp for those answers.";
|
|
25
25
|
const appendSection = appendSystemPrompt ? `\n\n${appendSystemPrompt}` : "";
|
|
26
26
|
const contextFiles = providedContextFiles ?? [];
|
|
27
27
|
const skills = providedSkills ?? [];
|
package/dist/core/tools/index.js
CHANGED
|
@@ -80,7 +80,7 @@ export const toolGuidance = {
|
|
|
80
80
|
ls: "列出目录内容。",
|
|
81
81
|
};
|
|
82
82
|
toolGuidance.time =
|
|
83
|
-
"Get the real current system time.
|
|
83
|
+
"Get the real current system time. You must use this for current time/date questions, today/tomorrow/yesterday, deadlines, schedules, or any temporal reasoning that depends on the live system clock.";
|
|
84
84
|
/**
|
|
85
85
|
* Get guidance for a specific tool
|
|
86
86
|
*/
|
package/dist/core/tools/time.js
CHANGED
|
@@ -34,7 +34,7 @@ export function createTimeTool() {
|
|
|
34
34
|
return {
|
|
35
35
|
name: "time",
|
|
36
36
|
label: "time",
|
|
37
|
-
description: "Get the current system time.
|
|
37
|
+
description: "Get the current system time. You must use this for time-sensitive questions such as 'what time is it', 'what day is it', 'today', 'tomorrow', 'yesterday', deadlines, schedules, elapsed time, or any request that depends on the real current date/time instead of prompt context.",
|
|
38
38
|
parameters: timeSchema,
|
|
39
39
|
execute: async (_toolCallId, { timeZone, locale }) => {
|
|
40
40
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pencil-agent/nano-pencil",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.14",
|
|
4
4
|
"description": "CLI writing agent with read, bash, edit, write tools and session management. Based on pi; supports DashScope Coding Plan. Soul enabled by default for AI personality evolution.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|