@treeport/treeport 0.2.2 → 0.3.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as TERMINAL_SELECTION_RESTORE_SEQUENCE, C as repositoryTerminalPresetsFileSchema, D as updateTerminalPresetSchema, E as updateProjectSchema, G as terminalBellAcknowledgementSchema, H as TERMINAL_SELECTION_STOP_SEQUENCE, J as terminalLegacyTakeControlSchema, K as terminalBinarySchema, L as TERMINAL_OUTPUT_STALL_TIMEOUT_MS, M as TERMINAL_CONTROLLER_GRACE_MS, N as TERMINAL_MAX_CLIENT_MESSAGE_BYTES, O as updateTerminalSchema, Q as terminalTakeControlSchema, R as TERMINAL_SCROLL_EXIT_SEQUENCE, S as repositoryTerminalPresetSchema, T as terminalCaptureQuerySchema, U as parseTerminalAuth, V as TERMINAL_SELECTION_START_SEQUENCE, W as parseTerminalProgress, X as terminalResizeSchema, Y as terminalOutputAckSchema, Z as terminalSizeSchema, _ as packageReloadSchema, b as registerProjectSchema, c as createTerminalSchema, d as deleteTerminalPresetSchema, f as deleteWebPanelStorageSchema, g as packageProjectQuerySchema, h as packageInstallSchema, i as TERMINAL_MAX_UPLOAD_BYTES, j as SOCKET_IO_PATH, l as createWebPanelSchema, m as openWebPanelSchema, n as parseDurationMs, o as browseDirectoryQuerySchema, p as getWebPanelStorageSchema, q as terminalInputSchema, s as createTerminalPresetSchema, t as assertLoopbackHost, u as createWorktreeSchema, v as packageRemoveSchema, w as setWebPanelStorageSchema, x as removeWorktreeSchema, y as packageUpdateSchema, z as TERMINAL_SELECTION_CLEAR_SEQUENCE } from "../../loopback-
|
|
1
|
+
import { B as TERMINAL_SELECTION_RESTORE_SEQUENCE, C as repositoryTerminalPresetsFileSchema, D as updateTerminalPresetSchema, E as updateProjectSchema, G as terminalBellAcknowledgementSchema, H as TERMINAL_SELECTION_STOP_SEQUENCE, J as terminalLegacyTakeControlSchema, K as terminalBinarySchema, L as TERMINAL_OUTPUT_STALL_TIMEOUT_MS, M as TERMINAL_CONTROLLER_GRACE_MS, N as TERMINAL_MAX_CLIENT_MESSAGE_BYTES, O as updateTerminalSchema, Q as terminalTakeControlSchema, R as TERMINAL_SCROLL_EXIT_SEQUENCE, S as repositoryTerminalPresetSchema, T as terminalCaptureQuerySchema, U as parseTerminalAuth, V as TERMINAL_SELECTION_START_SEQUENCE, W as parseTerminalProgress, X as terminalResizeSchema, Y as terminalOutputAckSchema, Z as terminalSizeSchema, _ as packageReloadSchema, b as registerProjectSchema, c as createTerminalSchema, d as deleteTerminalPresetSchema, f as deleteWebPanelStorageSchema, g as packageProjectQuerySchema, h as packageInstallSchema, i as TERMINAL_MAX_UPLOAD_BYTES, j as SOCKET_IO_PATH, l as createWebPanelSchema, m as openWebPanelSchema, n as parseDurationMs, o as browseDirectoryQuerySchema, p as getWebPanelStorageSchema, q as terminalInputSchema, s as createTerminalPresetSchema, t as assertLoopbackHost, u as createWorktreeSchema, v as packageRemoveSchema, w as setWebPanelStorageSchema, x as removeWorktreeSchema, y as packageUpdateSchema, z as TERMINAL_SELECTION_CLEAR_SEQUENCE } from "../../loopback-Dyv_owrb.js";
|
|
2
2
|
import { n as prepareShellIntegration } from "../../shell-integration-7aBNr-p0.js";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import path from "node:path";
|
|
@@ -322,7 +322,7 @@ function loadConfig(env = process.env) {
|
|
|
322
322
|
const dataDir = path.resolve(expandHome(env.TREEPORT_DATA_DIR?.trim() || defaultDataDir(env)));
|
|
323
323
|
const runtimeDir = path.resolve(expandHome(env.TREEPORT_RUNTIME_DIR?.trim() || defaultRuntimeDir(env)));
|
|
324
324
|
const daemonLifecycle = env.TREEPORT_DAEMON_LIFECYCLE?.trim() || "treeport";
|
|
325
|
-
if (daemonLifecycle !== "treeport" && daemonLifecycle !== "external") throw new Error("TREEPORT_DAEMON_LIFECYCLE must be
|
|
325
|
+
if (daemonLifecycle !== "treeport" && daemonLifecycle !== "service" && daemonLifecycle !== "external") throw new Error("TREEPORT_DAEMON_LIFECYCLE must be treeport, service, or external");
|
|
326
326
|
return {
|
|
327
327
|
host,
|
|
328
328
|
port: portValue,
|
|
@@ -7900,7 +7900,8 @@ async function acquireDaemonOwnership(config) {
|
|
|
7900
7900
|
apiUrl: config.apiUrl,
|
|
7901
7901
|
dataDir: config.dataDir,
|
|
7902
7902
|
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
7903
|
-
installationMethod: config.installationMethod ?? "development"
|
|
7903
|
+
installationMethod: config.installationMethod ?? "development",
|
|
7904
|
+
daemonLifecycle: config.daemonLifecycle
|
|
7904
7905
|
};
|
|
7905
7906
|
const openLock = () => fs.open(lockPath, "wx", 384).then(async (file) => {
|
|
7906
7907
|
await file.writeFile(`${JSON.stringify(record)}\n`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@treeport/treeport",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "A worktree-first terminal driver for persistent development workspaces.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"socket.io-client": "4.8.3",
|
|
52
52
|
"vite": "8.1.5",
|
|
53
53
|
"zod": "^4.3.6",
|
|
54
|
-
"@treeport/panel-sdk": "0.
|
|
54
|
+
"@treeport/panel-sdk": "0.3.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@fontsource-variable/inter": "^5.2.8",
|
package/skills/treeport/SKILL.md
CHANGED
|
@@ -17,7 +17,7 @@ Treeport does not define task sources, planning or approval states, agent tool p
|
|
|
17
17
|
- Do not use `eval` or an implicit `sh -lc`. Launch a shell explicitly only when the caller intentionally requests shell semantics.
|
|
18
18
|
- Do not place untrusted titles, prompts, or other external text into interpolated shell fragments. Pass each value as one argument or use a caller-managed file when the child supports file arguments.
|
|
19
19
|
- Never delete a terminal or remove a worktree unless the user explicitly asks.
|
|
20
|
-
- Obey the daemon lifecycle reported by `treeport context`. When it is `external`, never run `treeport
|
|
20
|
+
- Obey the daemon lifecycle reported by `treeport context`. When it is `external`, never run `treeport start`, `treeport stop`, or `treeport remote enable`; the parent process owns startup, shutdown, and remote exposure. When it is `service`, normal `start` and `stop` delegate to the OS manager and can require the printed administrator action.
|
|
21
21
|
- Do not restrict a launched agent's normal tools or make it ephemeral unless the caller explicitly asks. The persistent interactive session is intended to remain useful when the user takes over.
|
|
22
22
|
|
|
23
23
|
## Understand the current context
|
|
@@ -28,7 +28,7 @@ Run:
|
|
|
28
28
|
treeport context
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
Inside a managed terminal, this reports the current project, worktree, terminal, paths, statuses, IDs, daemon URL, and whether the daemon lifecycle is managed by Treeport or by an external process. It resolves the injected IDs strictly; it does not guess identity from the current path.
|
|
31
|
+
Inside a managed terminal, this reports the current project, worktree, terminal, paths, statuses, IDs, daemon URL, and whether the daemon lifecycle is managed by Treeport, by the OS service, or by an external process. It resolves the injected IDs strictly; it does not guess identity from the current path.
|
|
32
32
|
|
|
33
33
|
Outside Treeport it reports that the terminal is not managed and exits successfully. `TREEPORT_API_URL` may be configured outside a managed terminal; if any context ID is present, however, all injected values are required. Partial IDs or IDs that no longer belong together fail instead of falling back to path inference.
|
|
34
34
|
|