heartcode 0.1.102 → 0.1.104
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 +13 -0
- package/README.md +1 -1
- package/bin/heartcode.js +2 -1
- package/package.json +1 -1
- package/src/acp.js +1 -1
- package/src/headless.js +1 -1
- package/src/tools.js +5 -4
- package/src/ui.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
What changed in each version of HeartCode, newest first.
|
|
4
4
|
|
|
5
|
+
## 0.1.104 (2026-11-28)
|
|
6
|
+
|
|
7
|
+
- **"Runs everything" now really runs everything: it never asks.** Writing the folder's HeartCode or
|
|
8
|
+
git settings (`.heartcode/hooks.json`, `mcp.json`, `format.json`, `prompts/`, `skills/`, `.git/`)
|
|
9
|
+
no longer stops to ask, and neither does a folder's own HeartCode setup at start (it's used). The
|
|
10
|
+
same holds headless (`-p`) and in editors. The other modes still ask about those files.
|
|
11
|
+
|
|
12
|
+
## 0.1.103 (2026-11-28)
|
|
13
|
+
|
|
14
|
+
- **"Runs everything" no longer stops to ask about a model's own files in `.heartcode/`** (a test
|
|
15
|
+
script it keeps there, say). The question is kept for what can run commands or steer HeartCode:
|
|
16
|
+
`.heartcode/hooks.json`, `mcp.json`, `format.json`, `prompts/`, `skills/`, and git's `.git/`.
|
|
17
|
+
|
|
5
18
|
## 0.1.102 (2026-11-27)
|
|
6
19
|
|
|
7
20
|
- **Import & export your settings** (`/settings` → Advanced → Import & export): tick what goes in the
|
package/README.md
CHANGED
|
@@ -323,6 +323,6 @@ Contributions are very welcome, thank you! Before you start on a pull request, p
|
|
|
323
323
|
|
|
324
324
|
## You might also like
|
|
325
325
|
|
|
326
|
-
<a href="https://openstore.pfay.workers.dev/
|
|
326
|
+
<p><a href="https://openstore.pfay.workers.dev/more/p32929/heartcode/personal/0"><picture><source media="(prefers-color-scheme: dark)" srcset="https://openstore.pfay.workers.dev/more/p32929/heartcode/personal/0-dark.svg"><img src="https://openstore.pfay.workers.dev/more/p32929/heartcode/personal/0-light.svg" width="50%" align="top" alt="More apps by p32929 on OpenStore (1)"></picture></a><a href="https://openstore.pfay.workers.dev/more/p32929/heartcode/personal/1"><picture><source media="(prefers-color-scheme: dark)" srcset="https://openstore.pfay.workers.dev/more/p32929/heartcode/personal/1-dark.svg"><img src="https://openstore.pfay.workers.dev/more/p32929/heartcode/personal/1-light.svg" width="50%" align="top" alt="More apps by p32929 on OpenStore (2)"></picture></a><br><a href="https://openstore.pfay.workers.dev/more/p32929/heartcode/personal/2"><picture><source media="(prefers-color-scheme: dark)" srcset="https://openstore.pfay.workers.dev/more/p32929/heartcode/personal/2-dark.svg"><img src="https://openstore.pfay.workers.dev/more/p32929/heartcode/personal/2-light.svg" width="50%" align="top" alt="More apps by p32929 on OpenStore (3)"></picture></a><a href="https://openstore.pfay.workers.dev/more/p32929/heartcode/personal/3"><picture><source media="(prefers-color-scheme: dark)" srcset="https://openstore.pfay.workers.dev/more/p32929/heartcode/personal/3-dark.svg"><img src="https://openstore.pfay.workers.dev/more/p32929/heartcode/personal/3-light.svg" width="50%" align="top" alt="More apps by p32929 on OpenStore (4)"></picture></a></p>
|
|
327
327
|
|
|
328
328
|
<p><a href="https://p32929.github.io/share/?repo=HeartCode"><picture><source media="(prefers-color-scheme: dark)" srcset="https://p32929.github.io/readme/footer-share-dark.svg"><img src="https://p32929.github.io/readme/footer-share-light.svg" width="50%" align="top" alt="Share this project with your friends in one click"></picture></a><a href="https://p32929.github.io/support/"><picture><source media="(prefers-color-scheme: dark)" srcset="https://p32929.github.io/readme/footer-support-dark.svg"><img src="https://p32929.github.io/readme/footer-support-light.svg" width="50%" align="top" alt="If you like my work and want to support me, feel free to support"></picture></a><br><a href="https://openstore.pfay.workers.dev/add"><picture><source media="(prefers-color-scheme: dark)" srcset="https://p32929.github.io/readme/footer-join-dark.svg"><img src="https://p32929.github.io/readme/footer-join-light.svg" width="100%" align="top" alt="Put your own apps on OpenStore: free, your listing lives in your own repo"></picture></a></p>
|
package/bin/heartcode.js
CHANGED
|
@@ -1982,7 +1982,8 @@ async function repl(app, f = {}) {
|
|
|
1982
1982
|
})
|
|
1983
1983
|
.catch(() => {})
|
|
1984
1984
|
// this folder's own setup (a cloned repo's hooks and MCP servers run commands): used once you say so
|
|
1985
|
-
if (!trusted(app.root))
|
|
1985
|
+
if (!trusted(app.root) && ui.permission === 'all') trust(app.root), reloadPrompts() // runs everything: used without asking
|
|
1986
|
+
else if (!trusted(app.root)) {
|
|
1986
1987
|
const files = setupFiles(app.root)
|
|
1987
1988
|
const yes = await ui.pick(`This folder has its own HeartCode setup (${files.join(', ')}). Its hooks and MCP servers run commands on this computer. Use it?`, [
|
|
1988
1989
|
{ label: 'Yes, use it', desc: 'for these files as they are now; asked again if they change', use: true },
|
package/package.json
CHANGED
package/src/acp.js
CHANGED
|
@@ -40,7 +40,7 @@ class AcpUI extends HeadlessUI {
|
|
|
40
40
|
async confirm(question, kind = 'edit') {
|
|
41
41
|
if (kind === 'read' && this.permission === 'plan') return true
|
|
42
42
|
const mode = this.permission === 'plan' ? (this.beforePlan ?? 'ask') : this.permission // plan mode asks as the mode before it did (as the full screen's)
|
|
43
|
-
if (
|
|
43
|
+
if (mode === 'all' || (mode === 'commands' && kind === 'edit')) return true // runs everything: never asks; otherwise setup is always asked
|
|
44
44
|
const toolCallId = runningCall.getStore() ?? this.calls[0] ?? `ask_${Date.now()}` // the call asking
|
|
45
45
|
const r = await this.conn
|
|
46
46
|
.request('session/request_permission', {
|
package/src/headless.js
CHANGED
|
@@ -86,7 +86,7 @@ export class HeadlessUI {
|
|
|
86
86
|
this.said = null
|
|
87
87
|
}
|
|
88
88
|
async confirm(question, kind = 'edit') {
|
|
89
|
-
if (
|
|
89
|
+
if (this.permission === 'all' || (kind !== 'setup' && ((this.permission === 'commands' && kind === 'edit') || (this.permission === 'plan' && kind === 'read')))) return true // runs everything: everything; plan: only reading; setup (HeartCode's or git's settings here): otherwise never without someone to ask
|
|
90
90
|
log('headless', `declined: ${question}`)
|
|
91
91
|
return `Not allowed: HeartCode runs headless with permission mode "${this.permission}", so this can't be approved. Don't retry it; say in your reply what you would have done.`
|
|
92
92
|
}
|
package/src/tools.js
CHANGED
|
@@ -464,10 +464,11 @@ const PLACEHOLDER = /(\.\.\.|…)\s*(rest|existing|remaining|unchanged|other)|re
|
|
|
464
464
|
// model choice. A model never writes them (a small one once wrote its notes over this conversation).
|
|
465
465
|
const OWN_DATA = /^\.heartcode\/(?:sessions|outputs|worktrees)(?:\/|$)|^\.heartcode\/models\.json$/
|
|
466
466
|
|
|
467
|
-
// HeartCode's settings for this folder (hooks
|
|
468
|
-
// git's (its hooks run commands):
|
|
469
|
-
// telling the model to write one would run its commands next time)
|
|
470
|
-
|
|
467
|
+
// HeartCode's settings for this folder (hooks, MCP servers and formatters run commands, prompts and
|
|
468
|
+
// skills steer it) and git's (its hooks run commands): asked about in every mode but runs everything
|
|
469
|
+
// (a file or page telling the model to write one would run its commands next time). The rest of
|
|
470
|
+
// .heartcode (a model's own scripts and notes there) is written like any project file.
|
|
471
|
+
const SETUP_FILES = /^\.git(?:\/|$)|^\.heartcode\/(?:(?:hooks|mcp|format)\.json$|(?:prompts|skills)(?:\/|$))/
|
|
471
472
|
|
|
472
473
|
export async function proposeWrite(s, rel, old, next) {
|
|
473
474
|
if (old === next) return { status: 'unchanged' }
|
package/src/ui.js
CHANGED
|
@@ -2310,7 +2310,7 @@ export class UI {
|
|
|
2310
2310
|
async confirm(question, kind = 'edit') {
|
|
2311
2311
|
if (kind === 'read' && this.permission === 'plan') return true
|
|
2312
2312
|
const mode = this.permission === 'plan' ? (this.beforePlan ?? 'ask') : this.permission
|
|
2313
|
-
if (
|
|
2313
|
+
if (mode === 'all' || (mode === 'commands' && kind === 'edit')) return true // runs everything: never asks, setup files too; otherwise setup is always asked (tools.js SETUP_FILES)
|
|
2314
2314
|
if (this.full) {
|
|
2315
2315
|
this.askAbout = true // the dialog shows what it's about (the diff, the command) above the choices
|
|
2316
2316
|
try {
|