@paxnax/berliner 0.10.0 → 0.10.2

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Panta Dev EOOD
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
@@ -14,7 +14,7 @@ With Bun, run `bunx --bun @paxnax/berliner@latest setup`. To install only the co
14
14
 
15
15
  ## Quickstart
16
16
 
17
- 1. Sign in at https://berliner.app with GitHub.
17
+ 1. Sign in at https://berliner.app with GitHub and choose a plan.
18
18
  2. Run setup:
19
19
 
20
20
  ```sh
@@ -132,3 +132,21 @@ Other commands:
132
132
  - `berliner hook <tool>`: run by the hooks setup installs, with the tool's payload on stdin. It never fails and never makes the agent wait, and prints only the reminder when a session starts; errors go to `${XDG_STATE_HOME:-~/.local/state}/berliner/hook.log`.
133
133
 
134
134
  `report` and `update` exit 0 even when something fails, printing a warning that starts with `berliner:` to stderr, so reporting never breaks an agent's pipeline. Pass `--strict` to make them exit 1 on failure, including a file that could not be uploaded or made public; the session is still saved. The other commands exit 1 on failure.
135
+
136
+ ## Export format
137
+
138
+ **Download your data** in Settings saves everything Berliner holds about your account as one JSON file, `berliner-export-<login>-<date>.json`. The same file comes from `GET /v1/me/export` with a token: `curl -H "Authorization: Bearer $BERLINER_TOKEN" https://berliner.app/v1/me/export`. A team's owner gets the team's file, `berliner-team-<name>-<date>.json`, from **Download team data** on the team's settings.
139
+
140
+ Your file, `"format": "berliner-export/1"`:
141
+
142
+ - `account`: GitHub id and login, email, avatar, plan, when you signed up and last signed in, review cards on or off, and how you found Berliner.
143
+ - `billing`: your Berliner plan's interval, status and renewal or trial end; `null` without one.
144
+ - `subscriptions`, `api_tokens` (name, prefix and dates, never the secret), `installations`, `repository_projects`, `repository_card_costs`.
145
+ - `teams` and `team_invites`: the teams you own or belong to, and invites waiting for you.
146
+ - `sessions`: every session you reported, personal and team, in the shape `GET /v1/sessions` returns, with its pull requests.
147
+ - `evidence`: one entry per screenshot or video, with its `session_id`, file details, `sha256`, and a `url` that downloads it while you are signed in or send your token.
148
+ - `refusals` and `events`: reports Berliner refused, and your account's sign-up and plan events.
149
+
150
+ A team's file, `"format": "berliner-team-export/1"`, has `team`, `members`, `invites`, `sessions` (each with the reporting `member`) and `evidence` (with `member`), the same shapes as above. Members' personal work is not in it.
151
+
152
+ The files leave out token secrets and hashes, sign-in sessions and internal storage ids. Payment details stay with Link and Stripe.
@@ -5,7 +5,8 @@ import { promisify } from "node:util";
5
5
  import { testCommand } from "./command.js";
6
6
  import { claudeRuns, codexRuns } from "./runs.js";
7
7
  const run = promisify(execFile);
8
- const DOCS = /^docs\/|\.(?:md|mdx|txt)$/i;
8
+ // Files that can't change a test result: docs, hidden tool folders (.playwright-mcp, .agent-run), media, fonts, archives and logs.
9
+ const SKIPPED = /^(?:docs|\.[^/]+)\/|\.(?:md|mdx|txt|log|err|jsonl|sha256|png|jpe?g|gif|webp|svg|ico|mp4|webm|wav|mp3|woff2?|ttf|otf|eot|zip|tar|gz|pdf)$/i;
9
10
  // Best effort like git.ts, within what is left of the budget: a git error or no time left gives null.
10
11
  async function git(cwd, args, deadline) {
11
12
  const timeout = deadline - Date.now();
@@ -56,13 +57,13 @@ async function changedFiles(root, startedAt, start, deadline) {
56
57
  }
57
58
  const files = [];
58
59
  for (const file of new Set([...uncommitted, ...committed.keys()])) {
59
- if (DOCS.test(file))
60
+ if (SKIPPED.test(file))
60
61
  continue;
61
62
  const at = mtime(path.join(root, file)) ?? (uncommitted.has(file) ? removedAt(root, file) : committed.get(file));
62
63
  if (at !== undefined && at >= start)
63
64
  files.push({ path: file, at });
64
65
  }
65
- return { files: files.sort((a, b) => b.at - a.at), dirty: [...uncommitted].some((f) => !DOCS.test(f)) };
66
+ return { files: files.sort((a, b) => b.at - a.at), dirty: [...uncommitted].some((f) => !SKIPPED.test(f)) };
66
67
  }
67
68
  // The session's test runs against its changes, or null when there is nothing to say. Quick mode reads only the runs since
68
69
  // the newest change, so a pass before it gives unchecked, not stale.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@paxnax/berliner",
3
- "version": "0.10.0",
4
- "description": "Report coding-agent sessions to Berliner",
3
+ "version": "0.10.2",
4
+ "description": "The receipt for agent work: reports coding-agent sessions to Berliner",
5
5
  "keywords": [
6
6
  "claude-code",
7
7
  "codex",
@@ -11,6 +11,7 @@
11
11
  "cli"
12
12
  ],
13
13
  "homepage": "https://berliner.app",
14
+ "license": "MIT",
14
15
  "type": "module",
15
16
  "engines": {
16
17
  "node": ">=22"