@wasabeef/agentnote 0.1.2 → 0.1.4

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.
Files changed (2) hide show
  1. package/dist/cli.js +11 -15
  2. package/package.json +3 -3
package/dist/cli.js CHANGED
@@ -66,7 +66,7 @@ import { readFile, writeFile, mkdir } from "node:fs/promises";
66
66
  import { existsSync, readdirSync } from "node:fs";
67
67
  import { join as join2 } from "node:path";
68
68
  import { homedir } from "node:os";
69
- var HOOK_COMMAND = "$(npm bin 2>/dev/null)/agentnote hook 2>/dev/null || agentnote hook 2>/dev/null || npx --yes @wasabeef/agentnote hook";
69
+ var HOOK_COMMAND = "npx --yes @wasabeef/agentnote hook";
70
70
  var HOOKS_CONFIG = {
71
71
  SessionStart: [
72
72
  { hooks: [{ type: "command", command: HOOK_COMMAND, async: true }] }
@@ -80,7 +80,7 @@ var HOOKS_CONFIG = {
80
80
  PreToolUse: [
81
81
  {
82
82
  matcher: "Bash",
83
- hooks: [{ type: "command", if: "Bash(git commit *)", command: HOOK_COMMAND }]
83
+ hooks: [{ type: "command", if: "Bash(*git commit*)", command: HOOK_COMMAND }]
84
84
  }
85
85
  ],
86
86
  PostToolUse: [
@@ -254,21 +254,25 @@ var claudeCode = {
254
254
  };
255
255
 
256
256
  // src/commands/init.ts
257
- var WORKFLOW_TEMPLATE = `name: Agentnote
257
+ var WORKFLOW_TEMPLATE = `name: Agent Note
258
258
  on:
259
259
  pull_request:
260
260
  types: [opened, synchronize]
261
+ concurrency:
262
+ group: agentnote-\${{ github.event.pull_request.number }}
263
+ cancel-in-progress: true
261
264
  permissions:
262
265
  contents: read
263
266
  pull-requests: write
264
267
  jobs:
265
268
  report:
266
269
  runs-on: ubuntu-latest
270
+ timeout-minutes: 5
267
271
  steps:
268
272
  - uses: actions/checkout@v4
269
273
  with:
270
274
  fetch-depth: 0
271
- - uses: wasabeef/agentnote@v1
275
+ - uses: wasabeef/agentnote@v0
272
276
  `;
273
277
  async function init(args2) {
274
278
  const skipHooks = args2.includes("--no-hooks");
@@ -881,7 +885,7 @@ async function collectReport(base) {
881
885
  }
882
886
  function renderMarkdown(report) {
883
887
  const lines = [];
884
- lines.push("## \u{1F916} Agentnote \u2014 AI Session Report");
888
+ lines.push("## \u{1F916} Agent Note \u2014 AI Session Report");
885
889
  lines.push("");
886
890
  lines.push(
887
891
  `**Overall AI ratio: ${report.overall_ai_ratio}%** (${report.tracked_commits}/${report.total_commits} commits tracked, ${report.total_prompts} prompts)`
@@ -925,7 +929,7 @@ function renderMarkdown(report) {
925
929
  }
926
930
  function renderChat(report) {
927
931
  const lines = [];
928
- lines.push("## \u{1F916} Agentnote \u2014 Session Transcript");
932
+ lines.push("## \u{1F916} Agent Note \u2014 Session Transcript");
929
933
  lines.push("");
930
934
  lines.push(
931
935
  `**Overall AI ratio: ${report.overall_ai_ratio}%** (${report.tracked_commits}/${report.total_commits} commits tracked, ${report.total_prompts} prompts)`
@@ -1099,18 +1103,10 @@ var HELP = `
1099
1103
  agentnote \u2014 remember why your code changed
1100
1104
 
1101
1105
  usage:
1102
- agentnote init [options] set up hooks, workflow, and notes auto-fetch
1103
- --hooks hooks only
1104
- --action workflow only
1105
- --no-action skip workflow
1106
+ agentnote init set up hooks, workflow, and notes auto-fetch
1106
1107
  agentnote show [commit] show session details for a commit
1107
1108
  agentnote log [n] list recent commits with session info
1108
- agentnote pr [base] [options] generate report for a PR
1109
- --json structured JSON
1110
- --format chat chat-style transcript
1111
- --update <pr#> insert into PR description
1112
1109
  agentnote status show current tracking state
1113
- agentnote commit [args] git commit with session context (optional)
1114
1110
  agentnote version print version
1115
1111
  agentnote help show this help
1116
1112
  `.trim();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wasabeef/agentnote",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Remember why your code changed. Link AI agent sessions to git commits.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,8 +10,8 @@
10
10
  "build": "esbuild src/cli.ts --bundle --platform=node --format=esm --outfile=dist/cli.js --banner:js='#!/usr/bin/env node'",
11
11
  "dev": "tsx src/cli.ts",
12
12
  "lint": "tsc --noEmit",
13
- "test": "node --import tsx/esm --test 'src/**/*.test.ts'",
14
- "test:coverage": "node --import tsx/esm --test --experimental-test-coverage 'src/**/*.test.ts'",
13
+ "test": "find src -name '*.test.ts' | xargs node --import tsx/esm --test",
14
+ "test:coverage": "find src -name '*.test.ts' | xargs node --import tsx/esm --test --experimental-test-coverage",
15
15
  "prepublishOnly": "npm run build"
16
16
  },
17
17
  "files": [