tracehub 0.5.9 → 0.5.11
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/README.md +19 -266
- package/dist/cli/commands/hook.js +9 -5
- package/dist/cli/commands/show.js +262 -0
- package/dist/cli/usage.js +13 -0
- package/dist/cli.js +2 -0
- package/dist/client/tracehub.js +21 -8
- package/dist/client/upload.js +4 -3
- package/dist/git/git.js +53 -20
- package/dist/git/markers.js +11 -2
- package/dist/protocol/harness.js +56 -0
- package/dist/protocol/pages.js +1 -0
- package/dist/protocol/trace.js +18 -1
- package/dist/trace/build.js +129 -36
- package/dist/transcript/parseClaude.js +10 -4
- package/dist/transcript/parseCodex.js +4 -0
- package/dist/transcript/parseOpencode.js +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,79 +6,11 @@ Attach the conversations behind coding-agent work (Claude Code, Codex, OpenCode)
|
|
|
6
6
|
|
|
7
7
|
A commit made while an agent session is active gets an `Assisted-by: https://tracehub.aui.dev/t/<owner>/<repo>/<trace id>` trailer: a link to its trace, under a random trace id that says nothing about the session. The commit also records where each session stood when it was made. On push, the CLI turns each session into its trace at that commit, fetches the context conversations the session names from their providers, redacts everything and uploads it; TraceHub keeps one self-contained document per commit.
|
|
8
8
|
|
|
9
|
-
## Design
|
|
10
|
-
|
|
11
|
-
A trace is everything that produced one commit, in one JSON document:
|
|
12
|
-
|
|
13
|
-
1. **Context conversations.** The conversations that asked for the work: a nomOS thread, a Slack thread, an issue, pasted prompts. A **provider** (a local command registered with `tracehub providers add`) returns all messages of a conversation by its id. A session names its conversation with a `tracehub-context: <provider>:<id>` line in its first message (an agent's brief to a subagent), or the commit with `TRACEHUB_CONTEXT=<provider>:<id>`; `tracehub context add --pr <n>` attaches one to a pull request by hand. See [Context conversations](#context-conversations).
|
|
14
|
-
2. **Sessions.** For each agent session attached to the commit, the part of it that made the commit (see [What a trace holds](#what-a-trace-holds)): the user's messages and the agent's text replies, grouped into turns (a turn starts at a user prompt). Each turn lists the files it changed (`path`, lines added, lines removed). A subagent the turn launched is a **run** nested under it, with its own turns: the prompt the parent gave it, its replies, its changes. Tool calls, tool results, thinking, token metrics and local paths never leave the machine.
|
|
15
|
-
3. **A sourcemap** (optional). For each line the commit adds, the turn that last wrote it, blame-style.
|
|
16
|
-
|
|
17
|
-
Everything is computed on the developer's machine, redacted there, checked again by the API (detectors and the sensitivity model), and shown only to the uploader and the repository's maintainers.
|
|
18
|
-
|
|
19
|
-
| piece | where |
|
|
20
|
-
| --- | --- |
|
|
21
|
-
| upload | `PUT /repos/:owner/:repo/traces/:trace/sessions/:name`, one session of a commit with its context conversations, replaced on re-upload |
|
|
22
|
-
| trace document | R2 `<owner>/<repo>/commits/<trace id>.json`: the commit's context conversations and sessions, rebuilt from the uploaded sessions on every upload |
|
|
23
|
-
| pull request context | `PUT` (attach) and `DELETE` (detach) `/repos/:owner/:repo/pulls/:number/context`, R2 `<owner>/<repo>/context/<number>/<user id>`, merged by conversation and message id |
|
|
24
|
-
| audience | the uploader and maintainers (GitHub write, maintain or admin); everyone else sees nothing |
|
|
25
|
-
|
|
26
|
-
### The trace document
|
|
27
|
-
|
|
28
|
-
```json
|
|
29
|
-
{
|
|
30
|
-
"version": 1,
|
|
31
|
-
"owner": "assistant-ui",
|
|
32
|
-
"repo": "tracehub",
|
|
33
|
-
"traceId": "0123456789abcdef",
|
|
34
|
-
"updatedAt": "2026-10-28T08:00:00.000Z",
|
|
35
|
-
"context": [
|
|
36
|
-
{
|
|
37
|
-
"ref": "nomos:t_16da1c327635",
|
|
38
|
-
"title": "S3 attachment backend and setup guide",
|
|
39
|
-
"url": "https://home.simonfarshid.com/?thread=t_16da1c327635",
|
|
40
|
-
"sessions": ["claude-agent-a1b2.jsonl"],
|
|
41
|
-
"messages": [
|
|
42
|
-
{ "id": "nomos:t_16da1c327635:m_1", "author": "Simon", "text": "…", "at": "2026-10-28T06:48:09.441Z" }
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"sessions": [
|
|
47
|
-
{
|
|
48
|
-
"name": "claude-agent-a1b2.jsonl",
|
|
49
|
-
"agent": "claude",
|
|
50
|
-
"id": "agent-a1b2",
|
|
51
|
-
"title": "…",
|
|
52
|
-
"model": "…",
|
|
53
|
-
"committedAt": "…",
|
|
54
|
-
"uploader": { "id": "1", "login": "simon", "name": "Simon" },
|
|
55
|
-
"uploadedAt": "…",
|
|
56
|
-
"turns": [{ "at": "…", "messages": [{ "role": "user", "at": "…", "text": "…" }], "changes": [{ "path": "src/a.ts", "added": 3, "removed": 1 }], "runs": [] }],
|
|
57
|
-
"sourcemap": { "src/a.ts": { "<line hash>": "0" } }
|
|
58
|
-
}
|
|
59
|
-
]
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
- `context`: each conversation once, its messages deduplicated by id and in time order; `sessions` names the sessions that attached it, so a reader shows a conversation to who may see one of them. A message `withheld: true` has an empty text (see Privacy); a message has its own `url` only when it differs from the conversation's.
|
|
64
|
-
- `sessions`: each a session of the commit, as uploaded; the uploader's identity decides who sees it.
|
|
65
|
-
|
|
66
|
-
### The sourcemap
|
|
67
|
-
|
|
68
|
-
`{ "<path>": { "<line hash>": "<turn path>" } }`, for the lines the commit adds (`git show` of the commit against its first parent).
|
|
69
|
-
|
|
70
|
-
- The line hash is FNV-1a 64 of the line with surrounding whitespace removed, as 16 hex characters; blank lines are left out. Hashes, not text, so the map says nothing the diff doesn't.
|
|
71
|
-
- The turn path is the turn's index in the trace, `"3"`; a subagent's turn adds the run and its turn, `"3.0.1"` (turn 3, its first run, that run's second turn), so the deepest turn that wrote a line is named, with the path up to the user's prompt.
|
|
72
|
-
- A line is attributed to the last edit, by time, whose new text contains it: Claude Code's `Write`, `Edit` and `MultiEdit`, Codex's `apply_patch` and OpenCode's `write`, `edit` and `patch`, parsed from the transcript up to the commit. Edits from before the session's previous commits count too, since a line written in turn 2 can be committed in turn 5.
|
|
73
|
-
- Why tool inputs and not snapshots of the working tree: the hooks only run at commit and push, so there is no snapshot of the tree at each turn boundary to diff, while every edit tool records exactly what it wrote and when. Lines no edit tool wrote (a formatter, a shell command, a hand edit) stay unattributed.
|
|
74
|
-
- A trace page's **Line map** lists, per file, the prompts that wrote the commit's lines and how many.
|
|
75
|
-
|
|
76
9
|
## Install
|
|
77
|
-
|
|
78
|
-
Set it up once with `setup` (the other commands are under [Commands](#commands)). Run it in your terminal:
|
|
10
|
+
Set it up once with `setup` (`tracehub --help` lists the other commands). Run it in your terminal:
|
|
79
11
|
|
|
80
12
|
```sh
|
|
81
|
-
npx --yes tracehub@0.5.
|
|
13
|
+
npx --yes tracehub@0.5.11 setup
|
|
82
14
|
```
|
|
83
15
|
|
|
84
16
|
Setup is a form of three steps. Each step saves what you chose before the next one starts; cancelling (Ctrl-C) keeps the steps already done.
|
|
@@ -87,14 +19,12 @@ Setup is a form of three steps. Each step saves what you chose before the next o
|
|
|
87
19
|
2. **Permission rules.** Lists your rules, then lets you add or revoke them. A rule allows uploads for a GitHub organization (`owner`, every repository of it, including future ones) or for one repository (`owner/repo`). Inside a clone, setup offers the current repository and its organization; any other owner or `owner/repo` can be typed, or a pasted GitHub URL. Before a rule is added, setup shows what an upload shares and asks to confirm.
|
|
88
20
|
3. **Git hooks.** Explains the global Git hooks, then installs them, or, when they are installed, keeps or removes them.
|
|
89
21
|
|
|
90
|
-
It ends with a summary of the account, the allowed rules and the hooks, and what is left to do. Setup needs an interactive terminal; without one it exits 1.
|
|
22
|
+
Setup and uninstall open with a title and close with an outro, and each setup step has a "Step N of 3" header. It ends with a summary of the account, the allowed rules and the hooks, and what is left to do. Setup needs an interactive terminal; without one it exits 1.
|
|
91
23
|
|
|
92
|
-
To skip npx on every commit, install it globally instead: `npm install -g tracehub@0.5.
|
|
24
|
+
To skip npx on every commit, install it globally instead: `npm install -g tracehub@0.5.11`, then `tracehub setup`.
|
|
93
25
|
|
|
94
26
|
### Git hooks
|
|
95
27
|
|
|
96
|
-
Setup installs global Git hooks: it points the global `core.hooksPath` at `~/.config/tracehub/hooks`, which holds a dispatcher for every standard Git hook. Two of them run the CLI: the same Node and `cli.js` that ran setup, by absolute path, so a global install or `npm link` needs no network on commit. A setup run through npx installs hooks that run `npx --yes --prefer-offline --registry=https://registry.npmjs.org tracehub@<version> hook …`, pinned to that published version. They run npx from your home directory, so a repository's own `.npmrc` or `node_modules` never decides what runs. Every dispatcher then runs the hook you had before: from your previous global or inherited system hooks directory, or else the repository's own `.git/hooks`. Hook files, arguments, pre-push input, failure status and warnings are preserved.
|
|
97
|
-
|
|
98
28
|
| hook | does |
|
|
99
29
|
| --- | --- |
|
|
100
30
|
| `prepare-commit-msg` | in an allowed repository, adds the trailer and records a marker per session |
|
|
@@ -107,30 +37,20 @@ Setup installs global Git hooks: it points the global `core.hooksPath` at `~/.co
|
|
|
107
37
|
- A hook that can't run tracehub (a deleted checkout, npx offline) prints one line, `tracehub: … run "tracehub setup" to repair the hooks`, and lets the commit or push go on.
|
|
108
38
|
- Running setup again and keeping the hooks points them at the tracehub that runs it, rewriting hooks of another version or of earlier releases, which always ran npx.
|
|
109
39
|
|
|
110
|
-
|
|
40
|
+
How the hooks run, and what they leave alone: [Architecture](ARCHITECTURE.md#git-hooks).
|
|
111
41
|
|
|
42
|
+
### Uninstall
|
|
112
43
|
```sh
|
|
113
|
-
npx --yes tracehub@0.5.
|
|
44
|
+
npx --yes tracehub@0.5.11 uninstall
|
|
114
45
|
```
|
|
115
46
|
|
|
116
|
-
Lists what it removes and asks first (default no); with nothing set up it says so and asks nothing. Then it removes the global Git hooks and restores your previous global `core.hooksPath` setting, deletes the permission rules (`consent.json`) and signs you out (`auth.json`). It asks before deleting the deny list and the current repository's `.git/tracehub` (its markers, including ones not uploaded yet). Other repositories keep their `.git/tracehub`; delete it by hand if you want. Before signing out it asks TraceHub to forget this machine's rules (see [Consent registry](#consent-registry)); when TraceHub can't be reached it says that TraceHub still lists them, and goes on. If the global hooks setting was changed by another tool since setup, uninstall leaves the hooks alone, still removes the rest, and exits 1.
|
|
117
|
-
|
|
118
|
-
### Upload scope
|
|
119
|
-
|
|
120
|
-
Uploads are restricted to repositories verified as owned by the GitHub organization **`assistant-ui`** (CLI 0.4.0 and later).
|
|
121
|
-
|
|
122
|
-
- The repository is `origin`'s: all of its effective fetch and push URLs must name the same repository on `github.com`, with the exact owner `assistant-ui` (case insensitive). HTTPS, GitHub SSH URLs and `git@github.com:…` are accepted. A missing `origin`, or one with unknown or conflicting URLs, blocks uploads. A personal fork as `origin` with an organization upstream is blocked. Other remotes, such as contributors' forks kept for reviewing their pull requests, play no part.
|
|
123
|
-
- Git's URL rewrites are resolved. A push uploads when it goes to `origin`'s repository or to a fork of it, such as a contributor's pull request branch a maintainer pushes to: the destination URL Git passes to the hook, and the pushed remote's own URLs, must name one repository on `github.com`. A push anywhere else uploads nothing and the traces stay pending. The hooks forward `"$@"` and Git's stdin ref updates; missing arguments or ref input block upload, even if the configured origin is eligible. The commit hook skips trace markers for ineligible remotes; it makes no network request. When `TRACEHUB_ID` names a session but `origin` is not eligible, the commit hook says so in one line instead of skipping silently.
|
|
124
|
-
- Before sending any trace or marker, the upload run asks GitHub for the canonical repository owner using the signed-in user's token. The returned owner must be the `assistant-ui` organization and the canonical repository name must match the remotes. Redirects, transfers, renames, missing fields, access failures and network failures block uploads. Update remotes after a rename. An organization-owned fork remains eligible as `origin`; a fork owned elsewhere does not. A push to a fork also asks GitHub for the pushed repository, which must be a fork whose parent is `origin`'s repository; anything else blocks the upload.
|
|
125
|
-
- This applies to every upload of the pre-push hook, including previously pending markers. Upload methods also verify ownership themselves. A refused hook still exits 0, preserving pending work for a later push.
|
|
126
|
-
- A permission rule and a sign-in remain required. This check does not grant access, change trace visibility, or send traces to GitHub; it runs fresh at upload time.
|
|
47
|
+
Lists what it removes and asks first (default no); with nothing set up it says so and asks nothing. Then it removes the global Git hooks and restores your previous global `core.hooksPath` setting, deletes the permission rules (`consent.json`) and signs you out (`auth.json`). It asks before deleting the deny list and the current repository's `.git/tracehub` (its markers, including ones not uploaded yet). Other repositories keep their `.git/tracehub`; delete it by hand if you want. Before signing out it asks TraceHub to forget this machine's rules (see [Consent registry](ARCHITECTURE.md#consent-registry)); when TraceHub can't be reached it says that TraceHub still lists them, and goes on. If the global hooks setting was changed by another tool since setup, uninstall leaves the hooks alone, still removes the rest, and exits 1.
|
|
127
48
|
|
|
128
49
|
## Sign in
|
|
129
|
-
|
|
130
50
|
Setup's first step signs you in with the device flow of GitHub.
|
|
131
51
|
|
|
132
52
|
- The credentials go to `~/.config/tracehub/auth.json` (mode `0600`). A replacement is saved only after GitHub confirms the new account; cancelling keeps the current one. The access token is refreshed when needed; a refresh that GitHub refuses removes the file.
|
|
133
|
-
- The GitHub App TraceHub Bot (`tracehub-bot`, formerly `assisted-by-bot`) must be installed. Uploads require current push access and verified `assistant-ui` organization ownership. Reading traces
|
|
53
|
+
- The GitHub App TraceHub Bot (`tracehub-bot`, formerly `assisted-by-bot`) must be installed. Uploads require current push access and verified `assistant-ui` organization ownership. Reading traces follows [who sees a trace](PRIVACY.md#who-sees-a-trace); maintainers have current GitHub write, maintain or admin access to the repository.
|
|
134
54
|
- A hook that finds no sign-in leaves its work pending and says so; the first push after signing in uploads it.
|
|
135
55
|
|
|
136
56
|
| setting | environment | default |
|
|
@@ -139,10 +59,9 @@ Setup's first step signs you in with the device flow of GitHub.
|
|
|
139
59
|
| client id of the GitHub App | `TRACEHUB_GITHUB_CLIENT_ID` | `Iv23limQrRDTbi0xJG3f` |
|
|
140
60
|
|
|
141
61
|
## Permission rules
|
|
142
|
-
|
|
143
62
|
Nothing is attached until a permission rule allows the repository. Setup's second step adds and revokes the rules; a rule is scoped to a GitHub organization or to one repository, nothing else.
|
|
144
63
|
|
|
145
|
-
An allowed repository means: the traces of the agent sessions that ran in it (their messages, per-turn changes and sourcemaps; never tool calls, results or thinking) are uploaded, redacted, to Tracehub, for you and the repository's maintainers with GitHub write, maintain or admin access; everyone else sees nothing. On the way in, the Tracehub API sends the redacted messages to TypeSafe's Jev model to find what the patterns missed (see Privacy).
|
|
64
|
+
An allowed repository means: the traces of the agent sessions that ran in it (their messages, per-turn changes and sourcemaps; never tool calls, results or thinking) are uploaded, redacted, to Tracehub, for you and the repository's maintainers with GitHub write, maintain or admin access; everyone else sees nothing. On the way in, the Tracehub API sends the redacted messages to TypeSafe's Jev model to find what the patterns missed (see [Privacy](PRIVACY.md)).
|
|
146
65
|
|
|
147
66
|
The rules are kept in `~/.config/tracehub/consent.json` under normalized GitHub keys: `github.com/owner/*` for an organization, `github.com/owner/repo` for a repository. Every clone and worktree shares them; filesystem paths never identify a rule. A repository's rule wins over its organization's.
|
|
148
67
|
|
|
@@ -155,87 +74,13 @@ The rules are kept in `~/.config/tracehub/consent.json` under normalized GitHub
|
|
|
155
74
|
| declined (older consents) | is left alone |
|
|
156
75
|
| none | is left alone, with a hint to run `tracehub setup` |
|
|
157
76
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
TraceHub keeps a copy of your rules (`_consent/users/<your id>`).
|
|
161
|
-
|
|
162
|
-
- At the end of step 2, setup sends this machine's rules, all of them, as `{machine, rules: [{scope, upload, at}]}` to `PUT /consent`, signed in as you. Sending the same rules again changes nothing, so every setup sends them, and rules from before the registry are registered on the next setup or push. Revoking a rule and continuing sends the rest.
|
|
163
|
-
- Each machine has its own id in `~/.config/tracehub/consent-sync.json`; TraceHub merges the machines, so a second machine without rules takes nothing away. A scope one machine allows counts as allowed.
|
|
164
|
-
- Offline, signed out, or refused: the rules still work on this machine. Setup says the registration is pending, and `consent-sync.json` keeps it pending until a push (which tries again quietly, for 5 seconds) or the next setup sends it.
|
|
165
|
-
- `uninstall` sends an empty set for this machine before it signs out. Offline, TraceHub keeps the machine's rules; run setup, revoke them and continue to remove them.
|
|
166
|
-
|
|
167
|
-
## How it works
|
|
168
|
-
|
|
169
|
-
1. **Commit.** `prepare-commit-msg` finds the sessions of the commit (see Discovery). If the message has no `Assisted-by` trailer yet, it uses a new 16-hex trace id and adds the trailer once at least one session's marker is recorded; a commit whose sessions are all missing from this machine gets no trailer. For each session found it appends a marker to `.git/tracehub/markers.jsonl` (in the repository's common git directory, so a linked worktree's markers outlive the worktree): `{traceId, session, line, ts, context?, file?, committer?, commit?, uploaded}`, where `line` is the number of complete lines the session file had, `context` the references of `TRACEHUB_CONTEXT`, `file` the session file it was found in, `committer` that the session made the commit with a call of its own, and `commit` the SHA of a backfilled commit whose message does not name the trace (see Discovery). The marker never leaves the machine. Merge and squash commits are skipped.
|
|
170
|
-
2. **Amend, rebase, squash.** The message keeps its trailer, so the commit keeps its trace id. A new marker for the same trace id and session replaces the old one. A squash merge on GitHub runs no hook and keeps no trailer by itself; whoever merges writes the body. One line, `Assisted-by: https://tracehub.aui.dev/pr/<owner>/<repo>/<number>`, stands for every trace of the pull request's commits: the commit's page and its check resolve it through the pull request.
|
|
171
|
-
3. **Push.** `pre-push` reads Git's ref updates and uploads only the traces of commits being pushed. New branches exclude commits already known on that remote. Deletions upload nothing; an unavailable remote base leaves traces pending with a recovery warning. For each pending marker the CLI builds the trace (below) from the marker's `file`, or the session's file wherever the push's environment keeps it when that one is gone, so a push from a plain terminal uploads what an agent with its own `CLAUDE_CONFIG_DIR` committed; fetches its context conversations from their providers and `PUT`s it; each success is recorded before the next. A later push also retries the pending traces of earlier commits in its history. When the 15 s run out, the push says so and a detached `tracehub hook upload` goes on with the same traces for up to 10 minutes, writing to `.git/tracehub/upload.log`.
|
|
172
|
-
4. **Pull request.** The GitHub App receives the `pull_request` event, reads the trace ids from the commit messages, and writes a link at the bottom of the description, between `<!-- tracehub:start -->` and `<!-- tracehub:end -->`: an "Agent traces" badge, next to Rupic's "Track in Rupic" badge when there is one. A pull request with attached context gets the link too.
|
|
173
|
-
5. **Reading.** The badge links to `/pr/<owner>/<repo>/<number>`: the intent and effort at a glance (first prompt, wall-clock time, prompts, commits, agents), then its context conversations and the sessions of its commits, listed in a rail and read one at a time, each in time order with the commits it made; each message is clamped to three lines and subagent runs fold to one line. A trace is at `/t/<owner>/<repo>/<trace id>`, a commit's traces at `/c/<owner>/<repo>/<sha>`. Add `.json` to any of them for the data (sign-in cookie or `Authorization: Bearer <token>` with the token `tracehub setup` keeps). Each authorized request renders the page from storage.
|
|
174
|
-
6. **Without a pull request.** A push prints a link per commit it marked, `/t/<owner>/<repo>/<trace id>`.
|
|
175
|
-
|
|
176
|
-
### What a trace holds
|
|
177
|
-
|
|
178
|
-
The trace of a session at a commit, built from the session's file up to the marker's line and scoped to that commit, so a session that commits many times (a coordinator working through several pull requests) shows each commit its own part:
|
|
179
|
-
|
|
180
|
-
- **Scope.** A turn is kept when it or one of its runs wrote a line the commit adds (by the sourcemap), or when it has messages since the session's previous commit in the repository; the commit's turn is always kept. A run is kept when it wrote one of the commit's lines; when no line is attributed, the runs active since the previous commit are kept instead. A turn kept only for a run keeps its prompt and its messages since the previous commit. A session's first commit has no previous one, so every turn before it is in scope; its runs still follow the rule above.
|
|
181
|
-
|
|
182
|
-
- **Turns.** A turn starts at each user prompt; its messages are the user's (the prompt, then any steering) and the agent's text replies. The replies after the commit that finish the commit's turn are included; the next prompt is not.
|
|
183
|
-
- **Changes.** Each turn lists the files its edit tools changed, as paths in the repository with lines added and removed. Edits outside the repository are left out.
|
|
184
|
-
- **Runs.** A subagent (a Claude Code subagent, a Codex sub-thread, an OpenCode task) is a run under the turn whose call launched it, else under the last turn that started before it did. A run has its own turns: the prompt the parent gave it, its replies and its changes.
|
|
185
|
-
- **Delegated sessions.** A session or subagent whose output contains a line `<agent>-session: <id>` (where agent is claude, codex or opencode) shows that session's turns as a run inside it when the session is on the uploading machine.
|
|
186
|
-
- **The sourcemap** of the commit's added lines (see [The sourcemap](#the-sourcemap)).
|
|
187
|
-
- **Context conversations** the session's first message, its subagents' briefs or the marker name (see [Context conversations](#context-conversations)).
|
|
188
|
-
- The title Claude Code gave the session, the model, and when the commit was made.
|
|
189
|
-
|
|
190
|
-
Nothing else leaves the machine: no tool calls or results, no thinking, no token counts or timings, no working directory or other local paths, no subagent internals beyond their messages.
|
|
191
|
-
|
|
192
|
-
The upload replaces the trace of that commit and session, and the API rebuilds the commit's trace document from its sessions; sending it again changes nothing. Only who uploaded a trace may replace it.
|
|
193
|
-
|
|
194
|
-
## Discovery
|
|
195
|
-
|
|
196
|
-
The sessions of a commit, by precedence:
|
|
197
|
-
|
|
198
|
-
1. `TRACEHUB_ID=<claude|codex|opencode>:<id>` in the environment (comma-separated for several).
|
|
199
|
-
2. The session the agent's own environment names. Claude Code gives every command it runs `CLAUDE_CODE_SESSION_ID`, Codex `CODEX_THREAD_ID`, so the hook of a commit an agent makes inherits the id of the session making it. Each one whose file is on this machine is attached:
|
|
200
|
-
- when it has the open `git commit` call, as the session that made the commit, wherever it ran (an app that runs its threads in a project's directory and commits with `cd <worktree> && git commit`);
|
|
201
|
-
- else, for Claude Code, when one of its subagents has the open call (a subagent's commands carry its parent's id): the parent when it ran in the repository, with the subagent as a run of its trace, else the subagent alone (as below). Of several subagents with an open call, those whose call names this checkout;
|
|
202
|
-
- else only when it ran in the repository, like discovery. A session elsewhere that commits nothing (a terminal that inherited the id) leaves the commit to the next rule.
|
|
203
|
-
3. Recently active sessions with an open agent tool call executing `git commit`. This preserves several sessions when several commit calls are active.
|
|
204
|
-
4. If no committing session is found, the sessions of the repository written to since the last commit (the last 24 hours in a repository without a commit). This fallback preserves sessions for commits made manually.
|
|
205
|
-
|
|
206
|
-
A session belongs to the repository only when its working directory is inside the repository's checkout: discovery never attaches a session that ran elsewhere, for example a coordinator agent in `~/.nomos/coordinator` whose subagents commit in a worktree. A session that ran outside the repository (or one of its worktrees), even one named by `TRACEHUB_ID`, shares nothing of its own: its trace holds only the subagent runs that changed files of the repository, without the parent's messages or title, and when no subagent changed any, nothing is uploaded and the marker is settled. The one exception is the session rule 2 found making the commit: it shares its own turns as a session in the repository would.
|
|
207
|
-
|
|
208
|
-
Such a coordinator's subagents are found on their own. Claude Code files a subagent's transcript under its parent's project, and its lines carry the parent's `cwd`, so discovery also reads the subagent transcripts of the last 24 hours (and since the last commit) under `~/.claude/projects/*/*/subagents/` (or `$CLAUDE_CONFIG_DIR/projects/*/*/subagents/`) whose parent ran outside the repository, and tells by what each one did whether it worked in the checkout being committed (the worktree, when the commit is in one):
|
|
209
|
-
|
|
210
|
-
- for rule 2, an open `git commit` call whose command names the checkout (`cd <checkout> && git commit`, `git -C <checkout> commit`, `~/…` spellings included), or a plain `git commit` from a subagent whose own `cwd` is inside it (a worktree-isolated agent);
|
|
211
|
-
- for rule 3, an edit of a file in the checkout since the last commit, or a `cwd` inside it.
|
|
212
|
-
|
|
213
|
-
Such a subagent is attached as `claude:agent-<id>` and uploaded alone: the prompt its parent gave it as its first message, its text replies, its per-turn changes and its sourcemap, titled with the description from its `agent-<id>.meta.json`, redacted like any trace. Its parent's messages and title, and its sibling subagents that didn't work in the checkout, are never read into it. A subagent of a session inside the repository stays a run of that session's trace. Codex sub-threads are sessions of their own with their own `cwd`, so the usual rule finds them when they ran in the repository; an OpenCode task's session shares its parent's `directory` and is not found on its own.
|
|
214
|
-
|
|
215
|
-
Where the sessions are, read where the agent of the commit's environment writes them:
|
|
216
|
-
|
|
217
|
-
- Claude Code: `~/.claude/projects/<encoded cwd>/<session id>.jsonl`, or `$CLAUDE_CONFIG_DIR/projects/…` when `CLAUDE_CONFIG_DIR` is set. Claude Code then writes nothing to `~/.claude`, so only that directory is read: an app that runs one Claude Code per account (T3 Code gives each provider instance its own) is read by the commits its agents make, and a commit from a plain terminal reads `~/.claude`. The cwd is encoded by replacing every character outside `[A-Za-z0-9-]` with `-`. The `cwd` of its first line that has one has to be inside the repository. Subagents are in `<session id>/subagents/agent-<id>.jsonl`, with an optional `agent-<id>.meta.json`; one found on its own is `claude:agent-<id>`, and `TRACEHUB_ID` can name it so too.
|
|
218
|
-
- Codex: `~/.codex/sessions/YYYY/MM/DD/rollout-<time>-<thread id>.jsonl`, or under `$CODEX_HOME/sessions` when `CODEX_HOME` is set. The first line (`session_meta`) has the `cwd`, which has to be inside the repository. A sub-thread names its parent in `parent_thread_id`.
|
|
219
|
-
- OpenCode: the database `~/.local/share/opencode/opencode.db`. A session has the `directory` it was started in, which has to be inside the repository. The session a task started names its parent in `parent_id`. The CLI reads the database with `node:sqlite`, so it needs Node 22.13 or newer.
|
|
77
|
+
Uploads go only to repositories owned by the `assistant-ui` organization; [Architecture](ARCHITECTURE.md#upload-scope) says how that is checked, and [Consent registry](ARCHITECTURE.md#consent-registry) what TraceHub keeps of your rules.
|
|
220
78
|
|
|
221
79
|
## Commands
|
|
222
80
|
|
|
223
|
-
|
|
224
|
-
| --- | --- |
|
|
225
|
-
| `setup` | the form: account, permission rules, Git hooks |
|
|
226
|
-
| `uninstall` | removes the global Git hooks, the permission rules and the sign-in; asks about local data |
|
|
227
|
-
| `providers add <name> [--timeout <ms>] -- <command> … {id} …` | registers a context provider |
|
|
228
|
-
| `providers list` | prints the registered providers |
|
|
229
|
-
| `providers remove <name>` | removes a provider |
|
|
230
|
-
| `context add --pr <n> (<provider>:<id> … \| --from <file\|->) [--dry-run]` | attaches context conversations to a pull request |
|
|
231
|
-
| `context remove --pr <n> <provider>:<id>…` | detaches context conversations from a pull request |
|
|
232
|
-
| `backfill --pr <n> [--repo <owner/repo>] [--session <agent:id>,…] [--dry-run]` | finds and uploads the agent sessions behind a pull request's untraced commits |
|
|
233
|
-
| `backfill <commit>… [--session <agent:id>,…] [--dry-run]` | the same for commits named |
|
|
234
|
-
|
|
235
|
-
The hooks run `tracehub hook prepare-commit-msg` and `tracehub hook pre-push`, an internal entry point that `--help` leaves out. `docs/pages/cli-reference.mdx` renders the reference from `src/cli/usage.ts`, as `--help` does.
|
|
81
|
+
`tracehub --help` lists every command, and `tracehub <command> --help` explains one with examples; both are rendered from `src/cli/usage.ts`. The hooks run `tracehub hook prepare-commit-msg` and `tracehub hook pre-push`, an internal entry point that `--help` leaves out.
|
|
236
82
|
|
|
237
83
|
## Backfill
|
|
238
|
-
|
|
239
84
|
Commits made before `tracehub setup`, or whose trace never reached TraceHub (a lost push), have no trace, and their pull request's check fails. `tracehub backfill` finds the agent sessions behind them on this machine and uploads them, so the check passes:
|
|
240
85
|
|
|
241
86
|
```sh
|
|
@@ -263,6 +108,7 @@ Only what the session did before the commit counts (author time for a rebased or
|
|
|
263
108
|
An upload is a normal one: the session cut where the commit was made, redacted on this machine (the detectors, the deny list, the home directory), checked again by the API, with the context its briefs name. The trace is then linked to the commit (`PUT /repos/:owner/:repo/commits/:sha/traces/:trace`), and the pull request's check is run again. Running it again reuses each commit's trace id, so it replaces rather than adds.
|
|
264
109
|
|
|
265
110
|
### For coding agents
|
|
111
|
+
Before changing a line, read the prompt that wrote it with `npx --yes tracehub show <path>:<line>`, or the conversations behind a commit with `npx --yes tracehub show <commit>`.
|
|
266
112
|
|
|
267
113
|
Asked to "upload traces for these PRs":
|
|
268
114
|
|
|
@@ -272,11 +118,9 @@ Asked to "upload traces for these PRs":
|
|
|
272
118
|
4. Never name a session from another repository or unrelated work, and never backfill someone else's pull request.
|
|
273
119
|
|
|
274
120
|
## Context conversations
|
|
275
|
-
|
|
276
121
|
A context conversation is what asked for the work. TraceHub gets it from a provider, by reference: `<provider>:<id>`, for example `nomos:t_16da1c327635`.
|
|
277
122
|
|
|
278
123
|
### Providers
|
|
279
|
-
|
|
280
124
|
A provider is a local command that prints the messages of a conversation. Providers are registered in `~/.config/tracehub/providers.json`:
|
|
281
125
|
|
|
282
126
|
```json
|
|
@@ -287,7 +131,7 @@ A provider is a local command that prints the messages of a conversation. Provid
|
|
|
287
131
|
tracehub providers add nomos -- nomos thread export {id} --format tracehub
|
|
288
132
|
```
|
|
289
133
|
|
|
290
|
-
- `command` is an argv array, run without a shell; every `{id}` in it is replaced by the conversation's id. A provider name is `[a-z][a-z0-9-]
|
|
134
|
+
- `command` is an argv array, run without a shell; every `{id}` in it is replaced by the conversation's id. A provider name is `[a-z][a-z0-9-]*`, at most 40 characters; an id is up to 200 characters of `[A-Za-z0-9._:/#@-]` and does not start with `-`.
|
|
291
135
|
- `timeoutMs` (default 10 000) bounds a run; the process is killed after it. Output over 8 MB is refused.
|
|
292
136
|
- It prints a JSON list of messages, oldest first, at most 1000:
|
|
293
137
|
|
|
@@ -308,115 +152,24 @@ tracehub providers add nomos -- nomos thread export {id} --format tracehub
|
|
|
308
152
|
- A provider that fails, times out or prints something invalid is reported in one line (`tracehub: context nomos:t_1: …`); the trace is uploaded without that conversation, and the commit or push goes on. Each conversation is fetched once per upload run.
|
|
309
153
|
|
|
310
154
|
### Naming the conversation
|
|
311
|
-
|
|
312
155
|
- **In a brief.** `tracehub-context: <provider>:<id>` (several separated by commas) anywhere in the first user message of a session or of a subagent (the prompt its parent gave it), or `<provider>-thread: <id>` for a registered provider, names a conversation. Later messages are not read for tags, and a coordinator that ran outside the repository contributes only its subagents' briefs. A coordinator that spawns a subagent for a thread's work puts the line into the brief; the subagent's trace then carries the thread.
|
|
313
156
|
- **At commit.** `TRACEHUB_CONTEXT=<provider>:<id>[,…]` in the commit's environment names conversations for every session of the commit; the marker keeps them until the push.
|
|
314
157
|
- A reference to an unregistered provider is reported and skipped.
|
|
315
158
|
|
|
316
159
|
### Attaching to a pull request
|
|
317
|
-
|
|
318
160
|
`tracehub context add --pr <n> nomos:t_1` fetches the conversation from its provider and attaches it to the pull request of the current clone's repository. `--from <file|->` reads the messages, in a provider's format, from a file or stdin instead. Attaching needs the same sign-in, permission rule and `assistant-ui` ownership checks as traces, and push access. Each uploader's are kept apart, merged by conversation and message id, so running the same command again changes nothing. `--dry-run` checks the permission rule, fetches and redacts, prints what would be attached and sends nothing.
|
|
319
161
|
|
|
320
162
|
`tracehub context remove --pr <n> <provider>:<id>…` detaches conversations from the pull request, whoever attached them (a pasted one's ref is `manual:<id>`; the pull request's `.json` lists them), and the page renders again without them. It needs a sign-in with push access to the repository, as attaching does (so the uploader or any maintainer), but no permission rule: nothing is fetched or sent. A ref that is not attached is reported; when none is, it fails.
|
|
321
163
|
|
|
322
164
|
### nomOS
|
|
323
|
-
|
|
324
165
|
nomOS registers itself as the provider `nomos` (`nomos thread export <thread> --format tracehub` prints all messages of a thread), and nom puts `tracehub-context: nomos:<thread id>` into the brief of each subagent it spawns for a thread's work. A subagent's commits then carry the whole thread.
|
|
325
166
|
|
|
326
167
|
## Privacy
|
|
327
168
|
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
1. Only messages and changes: the user's and the agent's text, per-turn file paths with added/removed counts, line hashes (see What a trace holds), and the messages of the context conversations the providers returned.
|
|
331
|
-
2. Every string is run through the detectors below; a match becomes `[redacted]`.
|
|
332
|
-
3. The home directory becomes `~`.
|
|
169
|
+
Only the user's and the agent's messages, per-turn file changes and line hashes leave the machine, redacted on it and checked again by the API, and only the uploader and the repository's maintainers see them. [Privacy](PRIVACY.md) lists what is sent where, the detectors and the deny list.
|
|
333
170
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
| detector | matches |
|
|
337
|
-
| --- | --- |
|
|
338
|
-
| `deny_list` | a literal of the deny list |
|
|
339
|
-
| `url_credentials` | the password in `scheme://user:password@host` |
|
|
340
|
-
| `pem_block` | `-----BEGIN …-----` to its end, or to the end of the text |
|
|
341
|
-
| `openai_key`, `stripe_key`, `webhook_secret`, `github_token`, `gitlab_token`, `aws_key`, `slack_token`, `google_api_key`, `neon_key`, `pat_token`, `square_token`, `dotted_token` | the token formats of those services, by prefix |
|
|
342
|
-
| `jwt` | `eyJ….….…` |
|
|
343
|
-
| `authorization_header`, `bearer_token`, `basic_auth` | what follows `Authorization:`, `Bearer`, `Basic` |
|
|
344
|
-
| `keyed_assignment` | the value of `<name>_key=`, `token:`, `password=`, `SECRET=` and the like |
|
|
345
|
-
| `json_secret_assignment` | the quoted value of a JSON property whose name contains `password`, `secret`, `token`, `api_key`, `apikey`, `private_key` or `credential` |
|
|
346
|
-
| `long_hex` | 64 or more hex characters |
|
|
347
|
-
| `keyed_hex` | 32 to 63 hex characters with `token`, `secret`, `key`, `password`, `bearer`, `auth` or `api` in the 40 characters before them; a bare git sha is left alone |
|
|
348
|
-
| `high_entropy` | 32 or more characters of `[A-Za-z0-9_\-+/=.]` with two digits or more, two character classes or more, and an entropy above 3.8 bits per character; not hex, a UUID, a hostname or a path |
|
|
349
|
-
|
|
350
|
-
### What the Tracehub API does with a trace or context
|
|
351
|
-
|
|
352
|
-
1. It runs the detectors once more, and anonymizes home directories (`/Users/alice`, `/home/bob`, `C:\Users\carol`) to `~`.
|
|
353
|
-
2. It asks [Jev](https://typesafe.ai), TypeSafe's decision model, whether each message holds a secret or personal data that the patterns cannot see: a password in a sentence, a person's address, a company secret.
|
|
354
|
-
3. A message Jev finds sensitive is stored empty and marked withheld. The hook says how many: `tracehub: claude:<id>: tracehub withheld 2 message(s) that look sensitive`.
|
|
355
|
-
4. When Jev cannot be reached, the Tracehub API stores nothing and answers 503; the next push tries again.
|
|
356
|
-
|
|
357
|
-
Messages are asked in windows of 4000 characters; a window that is sensitive is asked again message by message. The redacted messages leave the Tracehub API for TypeSafe's API. Without `TYPESAFE_API_KEY` the Tracehub API skips steps 2 to 4.
|
|
358
|
-
|
|
359
|
-
### Deny list
|
|
360
|
-
|
|
361
|
-
Literals in `~/.config/tracehub/deny.txt`, one per line, are always redacted. Edit the file by hand (keep it mode `0600`); lines under 6 characters are ignored. The file holds the literals themselves, so treat it like the secrets.
|
|
362
|
-
|
|
363
|
-
For Worker routes, GitHub App setup, check behavior and translation, see [the Worker documentation](tracehub/README.md).
|
|
364
|
-
|
|
365
|
-
## Trying it end to end
|
|
366
|
-
|
|
367
|
-
Do not try it with the session you are working in: what is uploaded stays in the bucket. Use a throwaway session and force it:
|
|
368
|
-
|
|
369
|
-
```sh
|
|
370
|
-
gh repo create assistant-ui/tracehub-playground --private --clone && cd tracehub-playground
|
|
371
|
-
npx --yes tracehub@0.5.9 setup # allow this repository, install the hooks
|
|
372
|
-
|
|
373
|
-
# open a fresh agent session in this directory, ask it for something harmless
|
|
374
|
-
export TRACEHUB_ID=claude:<throwaway session id>
|
|
375
|
-
|
|
376
|
-
git commit --allow-empty -m "trial"
|
|
377
|
-
git push -u origin main # uploads the trace
|
|
378
|
-
unset TRACEHUB_ID
|
|
379
|
-
```
|
|
380
|
-
|
|
381
|
-
## Why a random trailer
|
|
382
|
-
|
|
383
|
-
- A sha changes under amend, rebase and squash-merge, and a squash-merge happens on GitHub, where no hook runs.
|
|
384
|
-
- A session id is stable, but it would publish which session each contributor ran, and one session spans several commits.
|
|
385
|
-
- A random id is stable, says nothing, and git carries it along in the message.
|
|
386
|
-
|
|
387
|
-
## Develop
|
|
388
|
-
|
|
389
|
-
Needs Node.js 26.13.0 (pinned in `.node-version`).
|
|
390
|
-
|
|
391
|
-
Development on `main` is allowed; feature branches and pull requests are optional. Preserve other contributors' changes and validate before pushing. Use a separate checkout when the working tree contains unrelated edits.
|
|
392
|
-
|
|
393
|
-
```sh
|
|
394
|
-
pnpm install
|
|
395
|
-
pnpm run format:fix && pnpm run typecheck && pnpm test
|
|
396
|
-
cd tracehub && pnpm test
|
|
397
|
-
```
|
|
398
|
-
|
|
399
|
-
Tests are in `test/` and `tracehub/test/`, fixtures in `fixtures/`, and run on Vitest; `pnpm run test:coverage` also checks the coverage thresholds in `vitest.config.ts`. The end-to-end tests run the built CLI against the real Tracehub API over an in-memory bucket (`test/support/fakeTracehub.ts`); nothing in the tests reads a real session. The CLI and the fake Tracehub run outside Vitest, so `pnpm test` compiles them to `dist-test` first. The test setup file clears the agent variables (`CLAUDE_CONFIG_DIR`, `CODEX_HOME`, `CLAUDE_CODE_SESSION_ID`, `CODEX_THREAD_ID`, `TRACEHUB_ID`) a suite run by an agent inherits.
|
|
400
|
-
|
|
401
|
-
The CLI is published to npm as [`tracehub`](https://www.npmjs.com/package/tracehub). `pnpm pack` builds a fresh `dist` (`prepack`) and ships only `dist`, `README.md` and `package.json`. A clone needs `pnpm run build` after pulling; `pnpm install` doesn't build.
|
|
402
|
-
|
|
403
|
-
A release is a tag:
|
|
404
|
-
|
|
405
|
-
1. Set the version in `package.json` (`npm version <x.y.z> --no-git-tag-version`), and the `tracehub@<version>` commands in this README.
|
|
406
|
-
2. Commit and push to `main`, and wait for CI.
|
|
407
|
-
3. `git tag v<version> && git push origin v<version>`.
|
|
408
|
-
|
|
409
|
-
`.github/workflows/npm-publish.yaml` checks that the tag matches `package.json`, runs the tests, packs the tarball and publishes it with provenance as the package's trusted publisher (GitHub OIDC, no npm token), from the `npm` environment. Optionally add release notes: `gh release create v<version> --generate-notes`. On npmjs.com the package's trusted publisher is GitHub Actions, organization `assistant-ui`, repository `tracehub`, workflow `npm-publish.yaml`, environment `npm`.
|
|
410
|
-
|
|
411
|
-
## Audiences and data handling
|
|
412
|
-
|
|
413
|
-
A trace and the context of a pull request are for their uploader and the repository's maintainers: current GitHub **write, maintain or admin** access to the exact repository, including outside collaborators. Organization membership alone and read/triage access do not qualify; everyone else, signed in or not, sees nothing. Tracehub asks GitHub, as its App, for the repository's collaborators with push access; that list is cached for a minute (served up to 10 minutes while it refreshes), and lookup errors fail closed.
|
|
414
|
-
|
|
415
|
-
| Destination | Sent | Omitted / protected |
|
|
416
|
-
| --- | --- | --- |
|
|
417
|
-
| GitHub | Ordinary pushed commits/code, random `Assisted-by` trace ID trailer, bot PR-link block, authentication/access requests | No trace or prompt is sent to GitHub; GitHub still contains the actual committed code |
|
|
418
|
-
| Tracehub storage | Redacted messages per turn, per-turn file paths and counts, subagent runs' messages and changes, line-hash sourcemaps, context conversations from providers | Tool calls and results, thinking, metrics, local paths, the parent of a session that ran outside the repository; detected secrets masked, sensitive messages withheld |
|
|
419
|
-
| Maintainers | Messages, changes, context conversations, the line map | Nothing else is stored to show |
|
|
420
|
-
| TypeSafe sensitivity service, when configured | Already pattern-redacted messages and context messages | Its retention/access terms need operational review |
|
|
171
|
+
## More
|
|
421
172
|
|
|
422
|
-
|
|
173
|
+
- [Architecture](ARCHITECTURE.md): how a commit becomes a trace, the trace document and the sourcemap.
|
|
174
|
+
- [The Worker](tracehub/README.md): pages, routes, the GitHub App and its check, translation.
|
|
175
|
+
- [Contributing](CONTRIBUTING.md) and [Releasing](RELEASING.md).
|
|
@@ -9,8 +9,8 @@ import { consentFile } from "../../local/paths.js";
|
|
|
9
9
|
import { firstLine } from "../../client/errors.js";
|
|
10
10
|
import { uploadMarkers } from "../../client/upload.js";
|
|
11
11
|
import { UPLOAD_OWNER, UPLOAD_POLICY_ERROR, } from "../../client/uploadPolicy.js";
|
|
12
|
-
import { git,
|
|
13
|
-
import { pendingMarkers, readMarkers, recordMarkers, } from "../../git/markers.js";
|
|
12
|
+
import { git, pushedTraces, repoRoot, tracesInPushedHistory, } from "../../git/git.js";
|
|
13
|
+
import { appendMarkers, pendingMarkers, readMarkers, recordMarkers, } from "../../git/markers.js";
|
|
14
14
|
import { interpretTrailersArgs, hooksDisabled, newTraceId, shouldSkipCommit, } from "../../git/trailers.js";
|
|
15
15
|
import { traceIds } from "../../protocol/trailers.js";
|
|
16
16
|
import { formatContextRef, parseContextRef } from "../../protocol/context.js";
|
|
@@ -95,14 +95,17 @@ async function hookPrePush(args, cwd) {
|
|
|
95
95
|
warn("pre-push received no pushed refs; traces stay pending until the next push");
|
|
96
96
|
return;
|
|
97
97
|
}
|
|
98
|
-
const
|
|
98
|
+
const commits = pushedTraces(cwd, args.positional[2], input);
|
|
99
99
|
const all = readMarkers(dir);
|
|
100
100
|
// A trace left pending by an earlier push is retried once a push carries
|
|
101
101
|
// its commit's history.
|
|
102
102
|
const earlier = tracesInPushedHistory(cwd, input, [
|
|
103
103
|
...new Set(all.filter((marker) => !marker.uploaded).map((m) => m.traceId)),
|
|
104
|
-
].filter((id) => !
|
|
105
|
-
const markers = all.
|
|
104
|
+
].filter((id) => !commits.has(id)));
|
|
105
|
+
const markers = all.flatMap((marker) => {
|
|
106
|
+
const commit = commits.get(marker.traceId) ?? earlier.get(marker.traceId);
|
|
107
|
+
return commit ? [{ ...marker, commit }] : [];
|
|
108
|
+
});
|
|
106
109
|
if (!markers.length)
|
|
107
110
|
return;
|
|
108
111
|
const pending = pendingMarkers(markers);
|
|
@@ -125,6 +128,7 @@ function continueInBackground(cwd, dir, pushedUrl, pending) {
|
|
|
125
128
|
const ids = [...new Set(pending.map((marker) => marker.traceId))];
|
|
126
129
|
if (!ids.length || !process.argv[1])
|
|
127
130
|
return undefined;
|
|
131
|
+
appendMarkers(dir, pending);
|
|
128
132
|
const log = join(dir, UPLOAD_LOG);
|
|
129
133
|
const fd = openSync(log, "w");
|
|
130
134
|
try {
|