@tractorscorch/clank 1.5.8 → 1.5.9

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/CHANGELOG.md CHANGED
@@ -6,6 +6,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).
6
6
 
7
7
  ---
8
8
 
9
+ ## [1.5.9] — 2026-03-23
10
+
11
+ ### Changed
12
+ - **Workspace defaults to current directory** — the agent's workspace is now the directory you run `clank` from, not a hidden `%APPDATA%/Clank/workspace` folder. This means the agent works with your actual project files out of the box
13
+ - **Full file system access** — the path guard no longer blocks reads/writes outside the workspace. Clank is a dev tool and needs to access the full system. Added security notice to README recommending dedicated hardware
14
+
15
+ ### Fixed
16
+ - **Telegram `/new` and `/reset` were no-ops** — these commands returned a "session started" message but never actually reset the session. The model kept its full conversation history. Now properly clears session store, context engine, and destroys the old engine instance
17
+ - **Security notice added to README** — recommends running Clank on dedicated hardware since it gives agents full system access
18
+
19
+ ---
20
+
9
21
  ## [1.5.8] — 2026-03-23
10
22
 
11
23
  ### Added
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
- <a href="https://github.com/ItsTrag1c/Clank/releases/latest"><img src="https://img.shields.io/badge/version-1.5.8-blue.svg" alt="Version" /></a>
12
+ <a href="https://github.com/ItsTrag1c/Clank/releases/latest"><img src="https://img.shields.io/badge/version-1.5.9-blue.svg" alt="Version" /></a>
13
13
  <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License" /></a>
14
14
  <a href="https://www.npmjs.com/package/@tractorscorch/clank"><img src="https://img.shields.io/npm/v/@tractorscorch/clank.svg" alt="npm" /></a>
15
15
  <a href="https://github.com/ItsTrag1c/Clank/stargazers"><img src="https://img.shields.io/github/stars/ItsTrag1c/Clank.svg" alt="Stars" /></a>
@@ -75,7 +75,13 @@ That's it. Setup auto-detects your local models, configures the gateway, and get
75
75
  | Platform | Download |
76
76
  |----------|----------|
77
77
  | **npm** (all platforms) | `npm install -g @tractorscorch/clank` |
78
- | **macOS** (Apple Silicon) | [Clank_1.5.8_macos](https://github.com/ItsTrag1c/Clank/releases/latest/download/Clank_1.5.8_macos) |
78
+ | **macOS** (Apple Silicon) | [Clank_1.5.9_macos](https://github.com/ItsTrag1c/Clank/releases/latest/download/Clank_1.5.9_macos) |
79
+
80
+ ## Security Notice
81
+
82
+ Clank is a **developer tool** that gives AI agents full access to your file system, shell, and connected services. The agent can read, write, and execute on your behalf.
83
+
84
+ **We strongly recommend running Clank on dedicated hardware** (a dev machine, VM, or container) rather than on a system with sensitive personal files, credentials, or accounts you don't want the agent to access. Treat it like giving someone SSH access to your box.
79
85
 
80
86
  ## Features
81
87
 
package/dist/index.js CHANGED
@@ -1044,6 +1044,7 @@ var init_agent = __esm({
1044
1044
  this.emit("tool-start", { id: tc.id, name: tc.name, arguments: tc.arguments });
1045
1045
  const toolCtx = {
1046
1046
  projectRoot: this.identity.workspace,
1047
+ allowExternal: true,
1047
1048
  autoApprove: this.autoApprove,
1048
1049
  agentId: this.identity.id,
1049
1050
  signal
@@ -2099,7 +2100,7 @@ function defaultConfig() {
2099
2100
  agents: {
2100
2101
  defaults: {
2101
2102
  model: { primary: "ollama/qwen3.5" },
2102
- workspace: join6(getConfigDir(), "workspace"),
2103
+ workspace: process.cwd(),
2103
2104
  toolTier: "auto",
2104
2105
  temperature: 0.7
2105
2106
  },
@@ -5697,9 +5698,15 @@ You can read this file with the read_file tool.`
5697
5698
  return "Use /new to start a fresh session, or /reset to clear the current one.";
5698
5699
  }
5699
5700
  case "new":
5700
- return "New session started. Send a message to begin.";
5701
5701
  case "reset":
5702
- return "Session reset. History cleared.";
5702
+ if (this.gateway) {
5703
+ await this.gateway.resetSession({
5704
+ channel: "telegram",
5705
+ peerId: chatId,
5706
+ peerKind: isGroup ? "group" : "dm"
5707
+ });
5708
+ }
5709
+ return command === "new" ? "New session started. Send a message to begin." : "Session reset. History cleared.";
5703
5710
  case "model": {
5704
5711
  const model = this.config?.agents?.defaults?.model?.primary || "unknown";
5705
5712
  return `Current model: \`${model}\``;
@@ -6134,6 +6141,20 @@ var init_server = __esm({
6134
6141
  }
6135
6142
  }
6136
6143
  }
6144
+ /**
6145
+ * Reset a session — clear its history and context.
6146
+ * Used by channel adapters (Telegram /new, /reset commands).
6147
+ */
6148
+ async resetSession(context) {
6149
+ const sessionKey = deriveSessionKey(context);
6150
+ await this.sessionStore.reset(sessionKey);
6151
+ const engine = this.engines.get(sessionKey);
6152
+ if (engine) {
6153
+ engine.getContextEngine().clear();
6154
+ engine.destroy();
6155
+ this.engines.delete(sessionKey);
6156
+ }
6157
+ }
6137
6158
  /**
6138
6159
  * Handle an inbound message from any channel adapter.
6139
6160
  * This is the main entry point for all non-WebSocket messages.
@@ -6245,7 +6266,7 @@ var init_server = __esm({
6245
6266
  res.writeHead(200, { "Content-Type": "application/json" });
6246
6267
  res.end(JSON.stringify({
6247
6268
  status: "ok",
6248
- version: "1.5.8",
6269
+ version: "1.5.9",
6249
6270
  uptime: process.uptime(),
6250
6271
  clients: this.clients.size,
6251
6272
  agents: this.engines.size
@@ -6357,7 +6378,7 @@ var init_server = __esm({
6357
6378
  const hello = {
6358
6379
  type: "hello",
6359
6380
  protocol: PROTOCOL_VERSION,
6360
- version: "1.5.8",
6381
+ version: "1.5.9",
6361
6382
  agents: this.config.agents.list.map((a) => ({
6362
6383
  id: a.id,
6363
6384
  name: a.name || a.id,
@@ -7753,7 +7774,7 @@ async function runTui(opts) {
7753
7774
  ws.on("open", () => {
7754
7775
  ws.send(JSON.stringify({
7755
7776
  type: "connect",
7756
- params: { auth: { token }, mode: "tui", version: "1.5.8" }
7777
+ params: { auth: { token }, mode: "tui", version: "1.5.9" }
7757
7778
  }));
7758
7779
  });
7759
7780
  ws.on("message", (data) => {
@@ -8182,7 +8203,7 @@ import { fileURLToPath as fileURLToPath5 } from "url";
8182
8203
  import { dirname as dirname5, join as join19 } from "path";
8183
8204
  var __filename3 = fileURLToPath5(import.meta.url);
8184
8205
  var __dirname3 = dirname5(__filename3);
8185
- var version = "1.5.8";
8206
+ var version = "1.5.9";
8186
8207
  try {
8187
8208
  const pkg = JSON.parse(readFileSync(join19(__dirname3, "..", "package.json"), "utf-8"));
8188
8209
  version = pkg.version;