@edspencer/paddock 0.59.1 → 0.61.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.
- package/LICENSE +21 -0
- package/README.md +31 -1
- package/package.json +4 -3
- package/packages/server/dist/adoptable.d.ts +108 -5
- package/packages/server/dist/adoptable.js +279 -33
- package/packages/server/dist/app.js +15 -0
- package/packages/server/dist/claude-home.d.ts +125 -0
- package/packages/server/dist/claude-home.js +276 -0
- package/packages/server/dist/cli/import-chats.js +9 -6
- package/packages/server/dist/cli/paddock.js +9 -31
- package/packages/server/dist/config.d.ts +75 -12
- package/packages/server/dist/config.js +58 -11
- package/packages/server/dist/herdctl-agent-config.d.ts +15 -7
- package/packages/server/dist/herdctl-agent-config.js +21 -9
- package/packages/server/dist/herdctl.d.ts +95 -0
- package/packages/server/dist/herdctl.js +209 -6
- package/packages/server/dist/hook-config.d.ts +17 -15
- package/packages/server/dist/hook-config.js +11 -9
- package/packages/server/dist/routes/chats.js +92 -9
- package/packages/server/dist/run-provenance.d.ts +11 -0
- package/packages/server/dist/run-provenance.js +18 -0
- package/packages/server/dist/transcripts.d.ts +25 -6
- package/packages/server/dist/transcripts.js +12 -24
- package/packages/server/dist/trigger-config.d.ts +18 -8
- package/packages/server/dist/trigger-config.js +18 -8
- package/packages/server/dist/ws-turn.d.ts +0 -13
- package/packages/server/dist/ws-turn.js +50 -0
- package/packages/server/dist/ws.js +43 -11
- package/packages/server/package.json +1 -1
- package/packages/web/dist/assets/{InstanceConfigPage-CAwSnyga.js → InstanceConfigPage-CzMqTdUU.js} +1 -1
- package/packages/web/dist/assets/{MarkdownRenderer-DpGpkMzG.js → MarkdownRenderer-YSEZHWDe.js} +1 -1
- package/packages/web/dist/assets/{ProjectRedirect-D1ipv4jr.js → ProjectRedirect-DLWxZbqK.js} +1 -1
- package/packages/web/dist/assets/ProjectView-BFX8ff2n.js +13 -0
- package/packages/web/dist/assets/{ProjectsGrid-Dwngb-m1.js → ProjectsGrid-DLOeY_ww.js} +1 -1
- package/packages/web/dist/assets/{arc-BZh6Z9_D.js → arc-BwC1ik-b.js} +1 -1
- package/packages/web/dist/assets/{architectureDiagram-3BPJPVTR-iCtJiW4k.js → architectureDiagram-3BPJPVTR-CsVvXQWw.js} +1 -1
- package/packages/web/dist/assets/{blockDiagram-GPEHLZMM-BeI9Wi0h.js → blockDiagram-GPEHLZMM-DXQk2bIa.js} +1 -1
- package/packages/web/dist/assets/{c4Diagram-AAUBKEIU-D_j2LKZ-.js → c4Diagram-AAUBKEIU-DXiA26It.js} +1 -1
- package/packages/web/dist/assets/channel-DDgTXrGP.js +2 -0
- package/packages/web/dist/assets/{chunk-2J33WTMH-DRlfPROq.js → chunk-2J33WTMH-Dt5nC02A.js} +1 -1
- package/packages/web/dist/assets/{chunk-4BX2VUAB-BMY66MLs.js → chunk-4BX2VUAB-DcjnWvl6.js} +1 -1
- package/packages/web/dist/assets/{chunk-55IACEB6-BAQ92trf.js → chunk-55IACEB6-CRa3LkU4.js} +1 -1
- package/packages/web/dist/assets/{chunk-727SXJPM-Dxgb_nNN.js → chunk-727SXJPM-H3V-11qu.js} +1 -1
- package/packages/web/dist/assets/{chunk-AQP2D5EJ-D5cqv3Jv.js → chunk-AQP2D5EJ-DPCrENYV.js} +1 -1
- package/packages/web/dist/assets/{chunk-FMBD7UC4-BOEqxzyA.js → chunk-FMBD7UC4-C4UO0ZTc.js} +1 -1
- package/packages/web/dist/assets/{chunk-ND2GUHAM-CkTZgv_W.js → chunk-ND2GUHAM-BtI37CnI.js} +1 -1
- package/packages/web/dist/assets/{chunk-QZHKN3VN-DIr8TL7M.js → chunk-QZHKN3VN-C5bTaK5j.js} +1 -1
- package/packages/web/dist/assets/classDiagram-4FO5ZUOK-DU1kd_Vu.js +2 -0
- package/packages/web/dist/assets/classDiagram-v2-Q7XG4LA2-DU1kd_Vu.js +2 -0
- package/packages/web/dist/assets/{core-DyOZ2e1O.js → core-DB3cpm5N.js} +1 -1
- package/packages/web/dist/assets/{cose-bilkent-S5V4N54A-D8Muyf4o.js → cose-bilkent-S5V4N54A-q-cjTZO4.js} +1 -1
- package/packages/web/dist/assets/{dagre-BM42HDAG-B_EUbUz6.js → dagre-BM42HDAG-DYEV5HFo.js} +1 -1
- package/packages/web/dist/assets/{diagram-2AECGRRQ-DpAM0K6Q.js → diagram-2AECGRRQ-D16XCw78.js} +1 -1
- package/packages/web/dist/assets/{diagram-5GNKFQAL-Dhs9RMKk.js → diagram-5GNKFQAL-CeztryYE.js} +1 -1
- package/packages/web/dist/assets/{diagram-KO2AKTUF-LBeTHReu.js → diagram-KO2AKTUF-D5SLIMDS.js} +1 -1
- package/packages/web/dist/assets/{diagram-LMA3HP47-CxboRwue.js → diagram-LMA3HP47-Bw-sVPxM.js} +1 -1
- package/packages/web/dist/assets/{diagram-OG6HWLK6-BK_P-OSi.js → diagram-OG6HWLK6-DsRMITgx.js} +1 -1
- package/packages/web/dist/assets/{erDiagram-TEJ5UH35-CPSKRHI5.js → erDiagram-TEJ5UH35-T8Qqc_ku.js} +1 -1
- package/packages/web/dist/assets/{flowDiagram-I6XJVG4X-CbUumAP5.js → flowDiagram-I6XJVG4X-Cyx47UWU.js} +1 -1
- package/packages/web/dist/assets/{format-DDL0Q7H2.js → format-D2I0duZa.js} +1 -1
- package/packages/web/dist/assets/{ganttDiagram-6RSMTGT7-l-p25ckA.js → ganttDiagram-6RSMTGT7-DxYJmG9o.js} +1 -1
- package/packages/web/dist/assets/{gitGraphDiagram-PVQCEYII-i8kDIgga.js → gitGraphDiagram-PVQCEYII-COK5YOTD.js} +1 -1
- package/packages/web/dist/assets/index-B6etJCHf.css +1 -0
- package/packages/web/dist/assets/index-wBXQMkGI.js +71 -0
- package/packages/web/dist/assets/{infoDiagram-5YYISTIA-CbyLnHIe.js → infoDiagram-5YYISTIA-BamRN_Nn.js} +1 -1
- package/packages/web/dist/assets/{ishikawaDiagram-YF4QCWOH-C1_3z8-9.js → ishikawaDiagram-YF4QCWOH-DuOHdpEH.js} +1 -1
- package/packages/web/dist/assets/{journeyDiagram-JHISSGLW-BzyAtQdy.js → journeyDiagram-JHISSGLW-Bri7GKTW.js} +1 -1
- package/packages/web/dist/assets/{kanban-definition-UN3LZRKU-Fp2VVm-b.js → kanban-definition-UN3LZRKU-BdkgUnzI.js} +1 -1
- package/packages/web/dist/assets/{linear-6ZKEeWQ5.js → linear-DOcNPCpB.js} +1 -1
- package/packages/web/dist/assets/{mermaid.core-Dorg4Dl2.js → mermaid.core-D9SbVBpN.js} +4 -4
- package/packages/web/dist/assets/{mindmap-definition-RKZ34NQL-Bk4Ax0bI.js → mindmap-definition-RKZ34NQL-CVmLm7zn.js} +1 -1
- package/packages/web/dist/assets/{pieDiagram-4H26LBE5-DoTn5jHm.js → pieDiagram-4H26LBE5-D0N10eVU.js} +1 -1
- package/packages/web/dist/assets/{quadrantDiagram-W4KKPZXB-ClNmIKCj.js → quadrantDiagram-W4KKPZXB-B5gnYdTa.js} +1 -1
- package/packages/web/dist/assets/{requirementDiagram-4Y6WPE33-DMF7i5KW.js → requirementDiagram-4Y6WPE33-CwtxezNZ.js} +1 -1
- package/packages/web/dist/assets/{sankeyDiagram-5OEKKPKP-C-ALbVLg.js → sankeyDiagram-5OEKKPKP-D79O3cux.js} +1 -1
- package/packages/web/dist/assets/{sequenceDiagram-3UESZ5HK-DsUxj8IQ.js → sequenceDiagram-3UESZ5HK-xhKcI6tI.js} +1 -1
- package/packages/web/dist/assets/{stateDiagram-AJRCARHV-OCZiRRsz.js → stateDiagram-AJRCARHV-DBYMAjcX.js} +1 -1
- package/packages/web/dist/assets/stateDiagram-v2-BHNVJYJU-CZtr9Jvq.js +2 -0
- package/packages/web/dist/assets/{timeline-definition-PNZ67QCA-5ifjxa-s.js → timeline-definition-PNZ67QCA-e-MYF4lm.js} +1 -1
- package/packages/web/dist/assets/{vennDiagram-CIIHVFJN-Bqvqpot5.js → vennDiagram-CIIHVFJN-B8UsvRDM.js} +1 -1
- package/packages/web/dist/assets/{wardley-L42UT6IY-DwgnVd48.js → wardley-L42UT6IY-1ucACjTl.js} +1 -1
- package/packages/web/dist/assets/{wardleyDiagram-YWT4CUSO-F-VCH-oE.js → wardleyDiagram-YWT4CUSO-DJufLd_u.js} +1 -1
- package/packages/web/dist/assets/{xychartDiagram-2RQKCTM6-L4q6oV_7.js → xychartDiagram-2RQKCTM6-qqaZNlu9.js} +1 -1
- package/packages/web/dist/index.html +2 -2
- package/packages/web/dist/sw.js +1 -1
- package/packages/web/dist/assets/ProjectView-BI1TtrOK.js +0 -13
- package/packages/web/dist/assets/channel-DszBVZgr.js +0 -2
- package/packages/web/dist/assets/classDiagram-4FO5ZUOK-DuGqlnbT.js +0 -2
- package/packages/web/dist/assets/classDiagram-v2-Q7XG4LA2-DuGqlnbT.js +0 -2
- package/packages/web/dist/assets/index-CvGiQddO.css +0 -1
- package/packages/web/dist/assets/index-DKDgTDXa.js +0 -71
- package/packages/web/dist/assets/stateDiagram-v2-BHNVJYJU-BwcJspgG.js +0 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ed Spencer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -9,6 +9,8 @@ npx @edspencer/paddock
|
|
|
9
9
|
|
|
10
10
|
Then open <http://127.0.0.1:4000>.
|
|
11
11
|
|
|
12
|
+
Or point it at work you've already done — see [Open your own project](#open-your-own-project).
|
|
13
|
+
|
|
12
14
|
> **First run downloads ~250 MB.** Paddock drives Claude Code, and the Claude
|
|
13
15
|
> Agent SDK ships a per-platform binary of that size. It cannot be skipped —
|
|
14
16
|
> installing with `--omit=optional` produces a Paddock whose chats all fail.
|
|
@@ -27,17 +29,45 @@ export ANTHROPIC_API_KEY=sk-ant-… # or API billing
|
|
|
27
29
|
If you already use Claude Code on this machine, your existing login is picked up
|
|
28
30
|
automatically and there is nothing to do.
|
|
29
31
|
|
|
32
|
+
## Open your own project
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
cd ~/code/some-project # somewhere you've used Claude Code
|
|
36
|
+
npx @edspencer/paddock --here
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
`--here` opens **that directory** as Paddock's workspace: Claude works in your files,
|
|
40
|
+
and any Claude Code sessions you already have for the directory are offered for
|
|
41
|
+
import. It's the fastest way to see what Paddock does with real history instead of an
|
|
42
|
+
empty instance. Later runs in the same directory resume it — no flag needed.
|
|
43
|
+
|
|
44
|
+
The flag is the consent, so here is everything it does:
|
|
45
|
+
|
|
46
|
+
- creates **`.paddock/`** for the workspace's state and **`.chats/`** for transcripts
|
|
47
|
+
- appends those two entries to **`.gitignore`**
|
|
48
|
+
- **links** `~/.claude/projects/<encoded-dir>` at the workspace — your Claude Code
|
|
49
|
+
history is linked, never moved or copied
|
|
50
|
+
|
|
51
|
+
To undo it: `rm -rf .paddock .chats` and drop the two `.gitignore` lines.
|
|
52
|
+
|
|
53
|
+
Without `--here`, Paddock never touches the directory you ran it from.
|
|
54
|
+
|
|
30
55
|
## Options
|
|
31
56
|
|
|
32
57
|
```
|
|
33
58
|
-p, --port <port> HTTP/WS port (default 4000)
|
|
34
59
|
--host <host> Bind address (default 127.0.0.1)
|
|
35
60
|
-d, --data-dir <path> Projects + state (default ~/.paddock)
|
|
61
|
+
--here Open the CURRENT directory as the workspace
|
|
62
|
+
-o, --open Open the app in your browser once it is listening
|
|
63
|
+
--verbose Show the server's own logs (quiet by default)
|
|
36
64
|
-v, --version Print the version
|
|
37
65
|
-h, --help Show help
|
|
38
66
|
```
|
|
39
67
|
|
|
40
|
-
Your projects, chats and settings
|
|
68
|
+
Your projects, chats and settings persist between runs in `~/.paddock` — or in
|
|
69
|
+
`<dir>/.paddock` when you use `--here`. Either way it's one directory: move it to
|
|
70
|
+
move your instance, delete it to start over.
|
|
41
71
|
|
|
42
72
|
## Security
|
|
43
73
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edspencer/paddock",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.61.0",
|
|
4
4
|
"description": "Project-first launchpad for Claude Code: server-hosted, persistent, resumable sessions organized by project.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@fastify/swagger-ui": "4.2.0",
|
|
38
38
|
"@fastify/websocket": "10.0.1",
|
|
39
39
|
"@herdctl/chat": "0.8.0",
|
|
40
|
-
"@herdctl/core": "5.
|
|
40
|
+
"@herdctl/core": "5.31.0",
|
|
41
41
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
42
42
|
"fastify": "4.28.1",
|
|
43
43
|
"jose": "6.2.3",
|
|
@@ -53,7 +53,8 @@
|
|
|
53
53
|
"packages/server/package.json",
|
|
54
54
|
"packages/web/dist",
|
|
55
55
|
"install-notice.mjs",
|
|
56
|
-
"README.md"
|
|
56
|
+
"README.md",
|
|
57
|
+
"LICENSE"
|
|
57
58
|
],
|
|
58
59
|
"publishConfig": {
|
|
59
60
|
"access": "public",
|
|
@@ -1,11 +1,52 @@
|
|
|
1
1
|
import { type AdoptableSession } from "@herdctl/core";
|
|
2
2
|
import type { Project } from "./projects.js";
|
|
3
|
+
/**
|
|
4
|
+
* One session on offer, with enough about it to decide (#660).
|
|
5
|
+
*
|
|
6
|
+
* The import used to be a single unconfirmed click, so an id was all the count
|
|
7
|
+
* needed. A confirmation dialog has to show the user WHAT it is about to import —
|
|
8
|
+
* and on the instance that prompted this, three quarters of the offer was things
|
|
9
|
+
* the user would have declined on sight. Every field here is already computed by
|
|
10
|
+
* the engine's scan; none of it costs an extra transcript parse.
|
|
11
|
+
*/
|
|
12
|
+
export interface AdoptableCandidate {
|
|
13
|
+
sessionId: string;
|
|
14
|
+
/** ISO 8601 last-modified time of the transcript (also the sort order). */
|
|
15
|
+
mtime: string;
|
|
16
|
+
/** First user message, truncated by the engine at 100 chars. */
|
|
17
|
+
preview?: string;
|
|
18
|
+
/** Auto-generated session name, when the transcript carries a summary. */
|
|
19
|
+
autoName?: string;
|
|
20
|
+
sizeBytes: number;
|
|
21
|
+
}
|
|
3
22
|
/** One working directory that has adoptable sessions, and which ones. */
|
|
4
23
|
export interface AdoptableSource {
|
|
5
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* The working directory whose transcript folder holds these sessions — the
|
|
26
|
+
* DISPLAY identity, and the value a client round-trips back to import one
|
|
27
|
+
* source. Always a directory the user would recognise.
|
|
28
|
+
*/
|
|
6
29
|
sourceCwd: string;
|
|
7
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* The path the ENGINE must be handed to read this source, when that differs
|
|
32
|
+
* from {@link sourceCwd} (#620).
|
|
33
|
+
*
|
|
34
|
+
* It differs for the user's own `~/.claude` history, which paddock reaches
|
|
35
|
+
* through a mirror named for a synthetic path — see
|
|
36
|
+
* `mirrorLegacyTranscriptFolders`. Server-internal: absent means "same as
|
|
37
|
+
* sourceCwd", and clients neither send it nor need to know it exists.
|
|
38
|
+
*/
|
|
39
|
+
importFrom?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Adoptable session ids, newest transcript first.
|
|
42
|
+
*
|
|
43
|
+
* Exactly the ids of {@link sessions}, both built from one array at one site
|
|
44
|
+
* below so they cannot drift. Kept because it is the documented response shape
|
|
45
|
+
* and the narrower thing most callers want.
|
|
46
|
+
*/
|
|
8
47
|
sessionIds: string[];
|
|
48
|
+
/** The same sessions, with what a confirmation dialog needs to describe them. */
|
|
49
|
+
sessions: AdoptableCandidate[];
|
|
9
50
|
}
|
|
10
51
|
/** A candidate that detection deliberately did NOT offer, and why. */
|
|
11
52
|
export interface FilteredSession {
|
|
@@ -14,11 +55,11 @@ export interface FilteredSession {
|
|
|
14
55
|
reason: FilterReason;
|
|
15
56
|
}
|
|
16
57
|
/**
|
|
17
|
-
* Why a candidate was withheld.
|
|
58
|
+
* Why a candidate was withheld. All three values are OURS (paddock-side noise
|
|
18
59
|
* filtering); the engine's own exclusions (sidechain / already-adopted /
|
|
19
60
|
* attributed-to-run) never reach us as candidates at all.
|
|
20
61
|
*/
|
|
21
|
-
export type FilterReason = "too-small" | "slash-command-only";
|
|
62
|
+
export type FilterReason = "too-small" | "slash-command-only" | "sweeper-run";
|
|
22
63
|
/** What a project could import right now. */
|
|
23
64
|
export interface AdoptableSummary {
|
|
24
65
|
/** Total adoptable sessions across every source, after de-dup and filtering. */
|
|
@@ -55,6 +96,33 @@ export declare const MIN_TRANSCRIPT_BYTES = 256;
|
|
|
55
96
|
* more than a command plus its output, comfortably less than a conversation.
|
|
56
97
|
*/
|
|
57
98
|
export declare const SLASH_COMMAND_MAX_BYTES = 4096;
|
|
99
|
+
/**
|
|
100
|
+
* Does this transcript preview look like paddock's own sweeper run (#658)?
|
|
101
|
+
*
|
|
102
|
+
* Exported so `sweeper-prompt-contract.test.ts` can assert it against the prompt
|
|
103
|
+
* `SweepService` REALLY builds. The wording has drifted once already; a copy of
|
|
104
|
+
* it pasted into a test here would go stale silently and take the filter with it.
|
|
105
|
+
*/
|
|
106
|
+
export declare function isSweeperPrompt(preview: string): boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Reduce a git remote URL to a comparable `host/path` identity (#659).
|
|
109
|
+
*
|
|
110
|
+
* The same repo is written many ways, and a project's `repo` field and a clone's
|
|
111
|
+
* configured remote routinely disagree on form while naming the same thing:
|
|
112
|
+
*
|
|
113
|
+
* https://github.com/edspencer/hushpod.git ┐
|
|
114
|
+
* git@github.com:edspencer/hushpod ├─ all → github.com/edspencer/hushpod
|
|
115
|
+
* ssh://git@github.com/edspencer/hushpod/ ┘
|
|
116
|
+
*
|
|
117
|
+
* So: drop any scheme, drop `user@`, turn the scp-style `host:path` colon into a
|
|
118
|
+
* slash, drop a trailing `.git` and any trailing slashes, and lowercase. A local
|
|
119
|
+
* path remote (`/srv/git/foo.git`) normalises to `/srv/git/foo` and still
|
|
120
|
+
* compares correctly against itself.
|
|
121
|
+
*
|
|
122
|
+
* Returns `""` for anything that reduces to nothing, which never compares equal
|
|
123
|
+
* to a real remote — the caller does not have to special-case it.
|
|
124
|
+
*/
|
|
125
|
+
export declare function normalizeRemote(url: string): string;
|
|
58
126
|
/** The engine surface this module needs — narrowed so tests can fake it. */
|
|
59
127
|
export interface AdoptableFleet {
|
|
60
128
|
listAdoptableSessions(agentName: string, fromWorkingDir?: string): Promise<AdoptableSession[]>;
|
|
@@ -88,11 +156,38 @@ export interface AdoptableFleet {
|
|
|
88
156
|
export declare class AdoptableIndex {
|
|
89
157
|
private readonly claudeHomePath;
|
|
90
158
|
private readonly stateDir;
|
|
159
|
+
/**
|
|
160
|
+
* The user's own `~/.claude` (#620). Now that paddock owns its Claude home,
|
|
161
|
+
* the user's CLI history — the entire point of adoption — is no longer under
|
|
162
|
+
* `claudeHomePath`, and the engine resolves every adoption path against the
|
|
163
|
+
* one home the FleetManager was built with, with no per-call override.
|
|
164
|
+
* {@link scanFolders} therefore mirrors the legacy folders in first,
|
|
165
|
+
* read-only. Defaults to `claudeHomePath` (i.e. no mirroring at all) for
|
|
166
|
+
* callers still running in the user's own home.
|
|
167
|
+
*/
|
|
168
|
+
private readonly legacyClaudeHomePath;
|
|
91
169
|
/** folder name → last-seen entry, reused while its `key` is unchanged. */
|
|
92
170
|
private readonly folders;
|
|
171
|
+
/**
|
|
172
|
+
* checkout dir → its normalised remotes, memoised on the git config's own
|
|
173
|
+
* mtime+size (#659). Keyed on the config rather than the transcript folder
|
|
174
|
+
* because that is the file whose CHANGE would change the answer: adding or
|
|
175
|
+
* re-pointing a remote must be picked up, and it does not touch `~/.claude`.
|
|
176
|
+
*/
|
|
177
|
+
private readonly remotes;
|
|
93
178
|
/** project key → cached summary + the composite key it was computed under. */
|
|
94
179
|
private readonly summaries;
|
|
95
|
-
constructor(claudeHomePath: string, stateDir: string
|
|
180
|
+
constructor(claudeHomePath: string, stateDir: string,
|
|
181
|
+
/**
|
|
182
|
+
* The user's own `~/.claude` (#620). Now that paddock owns its Claude home,
|
|
183
|
+
* the user's CLI history — the entire point of adoption — is no longer under
|
|
184
|
+
* `claudeHomePath`, and the engine resolves every adoption path against the
|
|
185
|
+
* one home the FleetManager was built with, with no per-call override.
|
|
186
|
+
* {@link scanFolders} therefore mirrors the legacy folders in first,
|
|
187
|
+
* read-only. Defaults to `claudeHomePath` (i.e. no mirroring at all) for
|
|
188
|
+
* callers still running in the user's own home.
|
|
189
|
+
*/
|
|
190
|
+
legacyClaudeHomePath?: string);
|
|
96
191
|
/**
|
|
97
192
|
* Drop a project's cached summary (or every project's, with no argument).
|
|
98
193
|
* Called after an import, which changes the adoptable set in a way the caller
|
|
@@ -108,6 +203,14 @@ export declare class AdoptableIndex {
|
|
|
108
203
|
* folders whose file set changed since last time.
|
|
109
204
|
*/
|
|
110
205
|
private scanFolders;
|
|
206
|
+
/**
|
|
207
|
+
* A checkout's normalised git remotes, memoised on its config's mtime+size.
|
|
208
|
+
*
|
|
209
|
+
* The memo is keyed by directory and re-validated on every call, so a remote
|
|
210
|
+
* added or re-pointed after the last scan is picked up without waiting for
|
|
211
|
+
* anything in `~/.claude` to change.
|
|
212
|
+
*/
|
|
213
|
+
private remotesFor;
|
|
111
214
|
/**
|
|
112
215
|
* The candidate source working directories for a project, de-duplicated by the
|
|
113
216
|
* transcript folder they resolve to.
|