@wasabeef/agentnote 0.1.3 → 0.1.5

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 +8 -12
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -254,16 +254,20 @@ 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:
@@ -394,26 +398,18 @@ async function readNote(commitSha) {
394
398
 
395
399
  // src/core/entry.ts
396
400
  var SCHEMA_VERSION = 1;
397
- var RESPONSE_MAX_LENGTH = 2e3;
398
401
  function calcAiRatio(commitFiles, aiFiles) {
399
402
  if (commitFiles.length === 0) return 0;
400
403
  const aiSet = new Set(aiFiles);
401
404
  const matched = commitFiles.filter((f) => aiSet.has(f));
402
405
  return Math.round(matched.length / commitFiles.length * 100);
403
406
  }
404
- function truncate(text, maxLen) {
405
- if (text.length <= maxLen) return text;
406
- return text.slice(0, maxLen) + "\u2026";
407
- }
408
407
  function buildEntry(opts) {
409
408
  return {
410
409
  v: SCHEMA_VERSION,
411
410
  session_id: opts.sessionId,
412
411
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
413
- interactions: opts.interactions.map((i) => ({
414
- prompt: i.prompt,
415
- response: i.response ? truncate(i.response, RESPONSE_MAX_LENGTH) : null
416
- })),
412
+ interactions: opts.interactions,
417
413
  files_in_commit: opts.commitFiles,
418
414
  files_by_ai: opts.aiFiles,
419
415
  ai_ratio: calcAiRatio(opts.commitFiles, opts.aiFiles)
@@ -881,7 +877,7 @@ async function collectReport(base) {
881
877
  }
882
878
  function renderMarkdown(report) {
883
879
  const lines = [];
884
- lines.push("## \u{1F916} Agentnote \u2014 AI Session Report");
880
+ lines.push("## \u{1F916} Agent Note \u2014 AI Session Report");
885
881
  lines.push("");
886
882
  lines.push(
887
883
  `**Overall AI ratio: ${report.overall_ai_ratio}%** (${report.tracked_commits}/${report.total_commits} commits tracked, ${report.total_prompts} prompts)`
@@ -925,7 +921,7 @@ function renderMarkdown(report) {
925
921
  }
926
922
  function renderChat(report) {
927
923
  const lines = [];
928
- lines.push("## \u{1F916} Agentnote \u2014 Session Transcript");
924
+ lines.push("## \u{1F916} Agent Note \u2014 Session Transcript");
929
925
  lines.push("");
930
926
  lines.push(
931
927
  `**Overall AI ratio: ${report.overall_ai_ratio}%** (${report.tracked_commits}/${report.total_commits} commits tracked, ${report.total_prompts} prompts)`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wasabeef/agentnote",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "Remember why your code changed. Link AI agent sessions to git commits.",
5
5
  "type": "module",
6
6
  "bin": {