observability-toolkit-hooks 1.0.0 → 1.0.3

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 (140) hide show
  1. package/LICENSE +95 -0
  2. package/dist/hook-runner.js +1 -1
  3. package/dist/lib/core/config-dir-recovery.js +2 -2
  4. package/dist/lib/core/constants.js +3 -1
  5. package/dist/lib/core/load-envrc.js +3 -4
  6. package/dist/runner/{agent-context-4XTCLMLZ.js → agent-context-4HKRF6ZJ.js} +4 -4
  7. package/dist/runner/{agent-file-budget-Q33ESBBE.js → agent-file-budget-MGYZEBEW.js} +3 -3
  8. package/dist/runner/{agent-transcript-metrics-W5CZZFMI.js → agent-transcript-metrics-56XNPBWS.js} +5 -5
  9. package/dist/runner/{chunk-UW3GQZSM.js → chunk-2PQCUHOU.js} +3 -3
  10. package/dist/runner/{chunk-DGB4NSSD.js → chunk-2XKE4E7E.js} +6 -6
  11. package/dist/runner/{chunk-LHWRXY2G.js → chunk-2YXDQERF.js} +3 -3
  12. package/dist/runner/{chunk-4KWBQTTG.js → chunk-34O6HVAQ.js} +2 -2
  13. package/dist/runner/{chunk-M4R4QIQH.js → chunk-3DZNNATE.js} +2 -2
  14. package/dist/runner/{chunk-XSO3B4QN.js → chunk-3IC2KNJ4.js} +3 -3
  15. package/dist/runner/{chunk-LYY6RCIE.js → chunk-5GJLO6EX.js} +3 -3
  16. package/dist/runner/{chunk-C3WHUMU5.js → chunk-67K2WTSP.js} +6 -6
  17. package/dist/runner/{chunk-IY7AP7NA.js → chunk-6QFGAAUD.js} +3 -3
  18. package/dist/runner/{chunk-AGSGKELQ.js → chunk-6RSOKWNG.js} +4 -4
  19. package/dist/runner/{chunk-YGFN3LN2.js → chunk-BOZSNQGU.js} +2 -2
  20. package/dist/runner/{chunk-WU7ANGCW.js → chunk-C3NW5R45.js} +4 -4
  21. package/dist/runner/{chunk-2NTNAJZE.js → chunk-D626UD7P.js} +3 -3
  22. package/dist/runner/{chunk-GG2I4TGI.js → chunk-E3YCQK2D.js} +12 -27
  23. package/dist/runner/{chunk-GG2I4TGI.js.map → chunk-E3YCQK2D.js.map} +4 -4
  24. package/dist/runner/{chunk-PJHWHJ3K.js → chunk-EAA5QNOB.js} +4 -4
  25. package/dist/runner/{chunk-MC75VXMX.js → chunk-EZL3KMMB.js} +5 -5
  26. package/dist/runner/{chunk-LBCZAYFR.js → chunk-H4M6YEDJ.js} +3 -3
  27. package/dist/runner/{chunk-VVGOPPEN.js → chunk-JJHQOX5Q.js} +3 -3
  28. package/dist/runner/{chunk-DNSTWC26.js → chunk-LFCMGDJC.js} +2 -2
  29. package/dist/runner/{chunk-KGSA5JYP.js → chunk-LK6UFBC5.js} +3 -3
  30. package/dist/runner/{chunk-52RY6LQT.js → chunk-N6435YLW.js} +26 -9
  31. package/dist/runner/chunk-N6435YLW.js.map +7 -0
  32. package/dist/runner/{chunk-JRNNLOPR.js → chunk-OJWQCABS.js} +4 -4
  33. package/dist/runner/{chunk-VOV4Y5VU.js → chunk-OWXBKC5K.js} +6 -6
  34. package/dist/runner/{chunk-WJHNCOUF.js → chunk-PPDN7VWX.js} +3 -3
  35. package/dist/runner/{chunk-7OM5CYES.js → chunk-QD52DSVB.js} +7 -9
  36. package/dist/runner/chunk-QD52DSVB.js.map +7 -0
  37. package/dist/runner/{chunk-FDJJ3TYU.js → chunk-QESRH3ED.js} +7 -7
  38. package/dist/runner/{chunk-UEXDE3WP.js → chunk-S2B2J6ZB.js} +5 -5
  39. package/dist/runner/{chunk-LQ2LGUYJ.js → chunk-SA4ZNI3N.js} +2 -2
  40. package/dist/runner/{chunk-I7TD2QVR.js → chunk-SGL5GFKY.js} +3 -3
  41. package/dist/runner/{chunk-X7XLMSZX.js → chunk-VAX5JACX.js} +2 -2
  42. package/dist/runner/{chunk-NKZU4RRG.js → chunk-WVVJE7ZI.js} +2 -2
  43. package/dist/runner/{chunk-RIGVYJ2O.js → chunk-XFKV6REH.js} +4 -4
  44. package/dist/runner/{chunk-TRMFD36J.js → chunk-XYINMMHR.js} +3 -3
  45. package/dist/runner/{chunk-J3F3Z3EQ.js → chunk-YDN63WUY.js} +5 -5
  46. package/dist/runner/{chunk-V2GSP6VR.js → chunk-YZDEUJOZ.js} +3 -3
  47. package/dist/runner/{chunk-SRMAJQMV.js → chunk-ZCZUJKZD.js} +2 -2
  48. package/dist/runner/{chunk-VT5T6OEI.js → chunk-ZEYUSIMT.js} +3 -3
  49. package/dist/runner/{chunk-FGKYDQHZ.js → chunk-ZHCBXQ5O.js} +6 -6
  50. package/dist/runner/{compact-36NP3PKT.js → compact-PH4S4MIT.js} +7 -7
  51. package/dist/runner/{git-commit-BA53DOJQ.js → git-commit-67MX3SQY.js} +7 -7
  52. package/dist/runner/{hook-runner-JHH6PGKE.js → hook-runner-O345UBIB.js} +25 -26
  53. package/dist/runner/{hook-runner-JHH6PGKE.js.map → hook-runner-O345UBIB.js.map} +1 -1
  54. package/dist/runner/{mcp-status-QEUH2KGX.js → mcp-status-XWMUEEAB.js} +11 -11
  55. package/dist/runner/{notification-FKMBCSXF.js → notification-3WY33IIL.js} +8 -8
  56. package/dist/runner/{post-tool-3MRHTBKH.js → post-tool-AIQSU3VH.js} +28 -28
  57. package/dist/runner/{post-tool-agent-BB34MNHI.js → post-tool-agent-O3U4FP2R.js} +15 -15
  58. package/dist/runner/{post-tool-changelog-sync-OP2TT2I7.js → post-tool-changelog-sync-EZSRRRDR.js} +9 -9
  59. package/dist/runner/{post-tool-code-structure-LE7J2SC2.js → post-tool-code-structure-TERICHXZ.js} +9 -9
  60. package/dist/runner/{post-tool-edit-ledger-IJMEYHKF.js → post-tool-edit-ledger-B7QKW2UY.js} +7 -7
  61. package/dist/runner/{post-tool-failure-XTH2I2Z7.js → post-tool-failure-GDKD57FZ.js} +15 -15
  62. package/dist/runner/{post-tool-git-E46HZGZO.js → post-tool-git-GGHJFPBQ.js} +11 -11
  63. package/dist/runner/{post-tool-mcp-AMCDY5GH.js → post-tool-mcp-GH7MQJHG.js} +15 -15
  64. package/dist/runner/{post-tool-task-state-TLDOI33H.js → post-tool-task-state-PNE63AUM.js} +10 -10
  65. package/dist/runner/{pre-tool-SQE2FZQO.js → pre-tool-6UBCNWIJ.js} +18 -18
  66. package/dist/runner/{pre-tool-agent-OZUPVFUI.js → pre-tool-agent-CBX55CM6.js} +16 -16
  67. package/dist/runner/{quality-evaluator-XYNDKDRG.js → quality-evaluator-SPT3LTR6.js} +19 -19
  68. package/dist/runner/{session-end-3MJTDLLA.js → session-end-NQ7HY5C2.js} +10 -10
  69. package/dist/runner/{session-start-5ZMCLKBS.js → session-start-EPMNSIX6.js} +18 -18
  70. package/dist/runner/{shipper-status-MADX6SPG.js → shipper-status-FLIPBYTK.js} +3 -3
  71. package/dist/runner/{span-shipper-4HQDHC47.js → span-shipper-H6XGJPUR.js} +7 -7
  72. package/dist/runner/{stop-RTKSIYJV.js → stop-3WZ3HHMG.js} +24 -24
  73. package/dist/runner/{subagent-CBCG4OLZ.js → subagent-GU56QFXI.js} +12 -12
  74. package/dist/runner/{token-metrics-AD2RAFGM.js → token-metrics-3KQXGOYX.js} +10 -10
  75. package/dist/runner/{user-prompt-T5NZ2UJD.js → user-prompt-RV3N24AN.js} +15 -15
  76. package/package.json +4 -2
  77. package/dist/runner/chunk-52RY6LQT.js.map +0 -7
  78. package/dist/runner/chunk-7OM5CYES.js.map +0 -7
  79. /package/dist/runner/{agent-context-4XTCLMLZ.js.map → agent-context-4HKRF6ZJ.js.map} +0 -0
  80. /package/dist/runner/{agent-file-budget-Q33ESBBE.js.map → agent-file-budget-MGYZEBEW.js.map} +0 -0
  81. /package/dist/runner/{agent-transcript-metrics-W5CZZFMI.js.map → agent-transcript-metrics-56XNPBWS.js.map} +0 -0
  82. /package/dist/runner/{chunk-UW3GQZSM.js.map → chunk-2PQCUHOU.js.map} +0 -0
  83. /package/dist/runner/{chunk-DGB4NSSD.js.map → chunk-2XKE4E7E.js.map} +0 -0
  84. /package/dist/runner/{chunk-LHWRXY2G.js.map → chunk-2YXDQERF.js.map} +0 -0
  85. /package/dist/runner/{chunk-4KWBQTTG.js.map → chunk-34O6HVAQ.js.map} +0 -0
  86. /package/dist/runner/{chunk-M4R4QIQH.js.map → chunk-3DZNNATE.js.map} +0 -0
  87. /package/dist/runner/{chunk-XSO3B4QN.js.map → chunk-3IC2KNJ4.js.map} +0 -0
  88. /package/dist/runner/{chunk-LYY6RCIE.js.map → chunk-5GJLO6EX.js.map} +0 -0
  89. /package/dist/runner/{chunk-C3WHUMU5.js.map → chunk-67K2WTSP.js.map} +0 -0
  90. /package/dist/runner/{chunk-IY7AP7NA.js.map → chunk-6QFGAAUD.js.map} +0 -0
  91. /package/dist/runner/{chunk-AGSGKELQ.js.map → chunk-6RSOKWNG.js.map} +0 -0
  92. /package/dist/runner/{chunk-YGFN3LN2.js.map → chunk-BOZSNQGU.js.map} +0 -0
  93. /package/dist/runner/{chunk-WU7ANGCW.js.map → chunk-C3NW5R45.js.map} +0 -0
  94. /package/dist/runner/{chunk-2NTNAJZE.js.map → chunk-D626UD7P.js.map} +0 -0
  95. /package/dist/runner/{chunk-PJHWHJ3K.js.map → chunk-EAA5QNOB.js.map} +0 -0
  96. /package/dist/runner/{chunk-MC75VXMX.js.map → chunk-EZL3KMMB.js.map} +0 -0
  97. /package/dist/runner/{chunk-LBCZAYFR.js.map → chunk-H4M6YEDJ.js.map} +0 -0
  98. /package/dist/runner/{chunk-VVGOPPEN.js.map → chunk-JJHQOX5Q.js.map} +0 -0
  99. /package/dist/runner/{chunk-DNSTWC26.js.map → chunk-LFCMGDJC.js.map} +0 -0
  100. /package/dist/runner/{chunk-KGSA5JYP.js.map → chunk-LK6UFBC5.js.map} +0 -0
  101. /package/dist/runner/{chunk-JRNNLOPR.js.map → chunk-OJWQCABS.js.map} +0 -0
  102. /package/dist/runner/{chunk-VOV4Y5VU.js.map → chunk-OWXBKC5K.js.map} +0 -0
  103. /package/dist/runner/{chunk-WJHNCOUF.js.map → chunk-PPDN7VWX.js.map} +0 -0
  104. /package/dist/runner/{chunk-FDJJ3TYU.js.map → chunk-QESRH3ED.js.map} +0 -0
  105. /package/dist/runner/{chunk-UEXDE3WP.js.map → chunk-S2B2J6ZB.js.map} +0 -0
  106. /package/dist/runner/{chunk-LQ2LGUYJ.js.map → chunk-SA4ZNI3N.js.map} +0 -0
  107. /package/dist/runner/{chunk-I7TD2QVR.js.map → chunk-SGL5GFKY.js.map} +0 -0
  108. /package/dist/runner/{chunk-X7XLMSZX.js.map → chunk-VAX5JACX.js.map} +0 -0
  109. /package/dist/runner/{chunk-NKZU4RRG.js.map → chunk-WVVJE7ZI.js.map} +0 -0
  110. /package/dist/runner/{chunk-RIGVYJ2O.js.map → chunk-XFKV6REH.js.map} +0 -0
  111. /package/dist/runner/{chunk-TRMFD36J.js.map → chunk-XYINMMHR.js.map} +0 -0
  112. /package/dist/runner/{chunk-J3F3Z3EQ.js.map → chunk-YDN63WUY.js.map} +0 -0
  113. /package/dist/runner/{chunk-V2GSP6VR.js.map → chunk-YZDEUJOZ.js.map} +0 -0
  114. /package/dist/runner/{chunk-SRMAJQMV.js.map → chunk-ZCZUJKZD.js.map} +0 -0
  115. /package/dist/runner/{chunk-VT5T6OEI.js.map → chunk-ZEYUSIMT.js.map} +0 -0
  116. /package/dist/runner/{chunk-FGKYDQHZ.js.map → chunk-ZHCBXQ5O.js.map} +0 -0
  117. /package/dist/runner/{compact-36NP3PKT.js.map → compact-PH4S4MIT.js.map} +0 -0
  118. /package/dist/runner/{git-commit-BA53DOJQ.js.map → git-commit-67MX3SQY.js.map} +0 -0
  119. /package/dist/runner/{mcp-status-QEUH2KGX.js.map → mcp-status-XWMUEEAB.js.map} +0 -0
  120. /package/dist/runner/{notification-FKMBCSXF.js.map → notification-3WY33IIL.js.map} +0 -0
  121. /package/dist/runner/{post-tool-3MRHTBKH.js.map → post-tool-AIQSU3VH.js.map} +0 -0
  122. /package/dist/runner/{post-tool-agent-BB34MNHI.js.map → post-tool-agent-O3U4FP2R.js.map} +0 -0
  123. /package/dist/runner/{post-tool-changelog-sync-OP2TT2I7.js.map → post-tool-changelog-sync-EZSRRRDR.js.map} +0 -0
  124. /package/dist/runner/{post-tool-code-structure-LE7J2SC2.js.map → post-tool-code-structure-TERICHXZ.js.map} +0 -0
  125. /package/dist/runner/{post-tool-edit-ledger-IJMEYHKF.js.map → post-tool-edit-ledger-B7QKW2UY.js.map} +0 -0
  126. /package/dist/runner/{post-tool-failure-XTH2I2Z7.js.map → post-tool-failure-GDKD57FZ.js.map} +0 -0
  127. /package/dist/runner/{post-tool-git-E46HZGZO.js.map → post-tool-git-GGHJFPBQ.js.map} +0 -0
  128. /package/dist/runner/{post-tool-mcp-AMCDY5GH.js.map → post-tool-mcp-GH7MQJHG.js.map} +0 -0
  129. /package/dist/runner/{post-tool-task-state-TLDOI33H.js.map → post-tool-task-state-PNE63AUM.js.map} +0 -0
  130. /package/dist/runner/{pre-tool-SQE2FZQO.js.map → pre-tool-6UBCNWIJ.js.map} +0 -0
  131. /package/dist/runner/{pre-tool-agent-OZUPVFUI.js.map → pre-tool-agent-CBX55CM6.js.map} +0 -0
  132. /package/dist/runner/{quality-evaluator-XYNDKDRG.js.map → quality-evaluator-SPT3LTR6.js.map} +0 -0
  133. /package/dist/runner/{session-end-3MJTDLLA.js.map → session-end-NQ7HY5C2.js.map} +0 -0
  134. /package/dist/runner/{session-start-5ZMCLKBS.js.map → session-start-EPMNSIX6.js.map} +0 -0
  135. /package/dist/runner/{shipper-status-MADX6SPG.js.map → shipper-status-FLIPBYTK.js.map} +0 -0
  136. /package/dist/runner/{span-shipper-4HQDHC47.js.map → span-shipper-H6XGJPUR.js.map} +0 -0
  137. /package/dist/runner/{stop-RTKSIYJV.js.map → stop-3WZ3HHMG.js.map} +0 -0
  138. /package/dist/runner/{subagent-CBCG4OLZ.js.map → subagent-GU56QFXI.js.map} +0 -0
  139. /package/dist/runner/{token-metrics-AD2RAFGM.js.map → token-metrics-3KQXGOYX.js.map} +0 -0
  140. /package/dist/runner/{user-prompt-T5NZ2UJD.js.map → user-prompt-RV3N24AN.js.map} +0 -0
package/LICENSE ADDED
@@ -0,0 +1,95 @@
1
+ Copyright 2026 Integrity Studio
2
+
3
+ Elastic License 2.0
4
+
5
+ URL: https://www.elastic.co/licensing/elastic-license
6
+
7
+ Acceptance
8
+
9
+ By using the software, you agree to all of the terms and conditions below.
10
+
11
+ Copyright License
12
+
13
+ The licensor grants you a non-exclusive, royalty-free, worldwide,
14
+ non-sublicensable, non-transferable license to use, copy, distribute, make
15
+ available, and prepare derivative works of the software, in each case subject to
16
+ the limitations and conditions below.
17
+
18
+ Limitations
19
+
20
+ You may not provide the software to third parties as a hosted or managed
21
+ service, where the service provides users with access to any substantial set of
22
+ the features or functionality of the software.
23
+
24
+ You may not move, change, disable, or circumvent the license key functionality
25
+ in the software, and you may not remove or obscure any functionality in the
26
+ software that is protected by the license key.
27
+
28
+ You may not alter, remove, or obscure any licensing, copyright, or other notices
29
+ of the licensor in the software. Any use of the licensor’s trademarks is subject
30
+ to applicable law.
31
+
32
+ Patents
33
+
34
+ The licensor grants you a license, under any patent claims the licensor can
35
+ license, or becomes able to license, to make, have made, use, sell, offer for
36
+ sale, import and have imported the software, in each case subject to the
37
+ limitations and conditions in this license. This license does not cover any
38
+ patent claims that you cause to be infringed by modifications or additions to
39
+ the software. If you or your company make any written claim that the software
40
+ infringes or contributes to infringement of any patent, your patent license for
41
+ the software granted under these terms ends immediately. If your company makes
42
+ such a claim, your patent license ends immediately for work on behalf of your
43
+ company.
44
+
45
+ Notices
46
+
47
+ You must ensure that anyone who gets a copy of any part of the software from you
48
+ also gets a copy of these terms.
49
+
50
+ If you modify the software, you must include in any modified copies of the
51
+ software prominent notices stating that you have modified the software.
52
+
53
+ ## No Other Rights
54
+
55
+ These terms do not imply any licenses other than those expressly granted in
56
+ these terms.
57
+
58
+ Termination
59
+
60
+ If you use the software in violation of these terms, such use is not licensed,
61
+ and your licenses will automatically terminate. If the licensor provides you
62
+ with a notice of your violation, and you cease all violation of this license no
63
+ later than 30 days after you receive that notice, your licenses will be
64
+ reinstated retroactively. However, if you violate these terms after such
65
+ reinstatement, any additional violation of these terms will cause your licenses
66
+ to terminate automatically and permanently.
67
+
68
+ No Liability
69
+
70
+ As far as the law allows, the software comes as is, without any warranty or
71
+ condition, and the licensor will not be liable to you for any damages arising
72
+ out of these terms or the use or nature of the software, under any kind of
73
+ legal claim.
74
+
75
+ Definitions
76
+
77
+ The licensor is the entity offering these terms, and the software is the
78
+ software the licensor makes available under these terms, including any portion
79
+ of it.
80
+
81
+ you refers to the individual or entity agreeing to these terms.
82
+
83
+ your company is any legal entity, sole proprietorship, or other kind of
84
+ organization that you work for, plus all organizations that have control over,
85
+ are under the control of, or are under common control with that
86
+ organization. control means ownership of substantially all the assets of an
87
+ entity, or the power to direct its management and policies by vote, contract, or
88
+ otherwise. Control can be direct or indirect.
89
+
90
+ your licenses are all the licenses granted to you for the software under
91
+ these terms.
92
+
93
+ use means anything you do with the software requiring one of your licenses.
94
+
95
+ trademark means trademarks, service marks, and similar rights.
@@ -5,6 +5,6 @@ const require = __hookRunnerCreateRequire(import.meta.url);
5
5
  // runner-entry.ts
6
6
  import * as nodeModule from "node:module";
7
7
  nodeModule.enableCompileCache?.();
8
- var { main } = await import("./runner/hook-runner-JHH6PGKE.js");
8
+ var { main } = await import("./runner/hook-runner-O345UBIB.js");
9
9
  void main();
10
10
  //# sourceMappingURL=hook-runner.js.map
@@ -1,9 +1,9 @@
1
1
  /** Config-dir helpers with no hooks/lib imports, safe for hot path and shipper alike. */
2
2
  import { homedir } from 'node:os';
3
3
  import { join } from 'node:path';
4
- /** The Claude Code config directory; `CLAUDE_CONFIG_DIR` wins. */
4
+ /** The Claude Code config directory; a non-empty `CLAUDE_CONFIG_DIR` wins, as an empty one would resolve against cwd. */
5
5
  export function claudeConfigDir() {
6
- return process.env.CLAUDE_CONFIG_DIR ?? join(homedir(), '.claude');
6
+ return process.env.CLAUDE_CONFIG_DIR || join(homedir(), '.claude');
7
7
  }
8
8
  const PROJECTS_SEPARATOR = '/projects/';
9
9
  /**
@@ -1,7 +1,9 @@
1
1
  import { join } from 'node:path';
2
+ import { claudeConfigDir } from './config-dir-recovery.js';
2
3
  import { BYTES, DURATION_MS, TIME_MS } from './units.js';
3
4
  // ---- Paths and entry points ----
4
- export const CLAUDE_HOME = join(process.env.HOME ?? '', '.claude');
5
+ /** Read at load, so a `CLAUDE_CONFIG_DIR` the runner recovers from `transcript_path` later is not seen here. */
6
+ export const CLAUDE_HOME = claudeConfigDir();
5
7
  export const TELEMETRY_DIR = process.env.TELEMETRY_DIR || join(process.env.HOME ?? '', '.claude-history', 'telemetry');
6
8
  /** `process.argv` index of the first argument after the script path, for every CLI entry point here. */
7
9
  export const FIRST_CLI_ARG_INDEX = 2;
@@ -1,10 +1,11 @@
1
1
  /** Side-effect import: loads a bash-style .envrc into process.env with `$VAR` expansion. */
2
2
  import * as fs from 'node:fs';
3
3
  import * as path from 'node:path';
4
+ import { claudeConfigDir } from './config-dir-recovery.js';
4
5
  import { SHELL_IDENTIFIER_SOURCE } from './regex.js';
5
6
  // NOT constants.CLAUDE_HOME: otel.ts imports this before constants.js so
6
7
  // TELEMETRY_DIR is set before constants.TELEMETRY_DIR is computed.
7
- const ENVRC_PATH = path.join(process.env.HOME ?? '', '.claude', '.envrc');
8
+ const ENVRC_PATH = path.join(claudeConfigDir(), '.envrc');
8
9
  const EXPORT_LINE_PATTERN = new RegExp(`^export\\s+(${SHELL_IDENTIFIER_SOURCE})=(.*)$`);
9
10
  const BRACED_VARIABLE_PATTERN = new RegExp(`\\$\\{(${SHELL_IDENTIFIER_SOURCE})\\}`, 'g');
10
11
  const BARE_VARIABLE_PATTERN = new RegExp(`\\$(${SHELL_IDENTIFIER_SOURCE})`, 'g');
@@ -13,10 +14,8 @@ let loaded = false;
13
14
  export function loadEnvrc(envrcPath = ENVRC_PATH) {
14
15
  if (loaded)
15
16
  return;
16
- if (!fs.existsSync(envrcPath)) {
17
- console.warn(`[load-envrc] File not found: ${envrcPath}`);
17
+ if (!fs.existsSync(envrcPath))
18
18
  return;
19
- }
20
19
  const content = fs.readFileSync(envrcPath, 'utf-8');
21
20
  const lines = content.split('\n');
22
21
  for (const line of lines) {
@@ -7,9 +7,9 @@ import {
7
7
  getAgentStateSizes,
8
8
  popPendingAgent,
9
9
  savePendingAgent
10
- } from "./chunk-I7TD2QVR.js";
11
- import "./chunk-DNSTWC26.js";
12
- import "./chunk-52RY6LQT.js";
10
+ } from "./chunk-SGL5GFKY.js";
11
+ import "./chunk-LFCMGDJC.js";
12
+ import "./chunk-N6435YLW.js";
13
13
  import "./chunk-RWRGC7ZK.js";
14
14
  import "./chunk-GNNKUMRF.js";
15
15
  export {
@@ -20,4 +20,4 @@ export {
20
20
  popPendingAgent,
21
21
  savePendingAgent
22
22
  };
23
- //# sourceMappingURL=agent-context-4XTCLMLZ.js.map
23
+ //# sourceMappingURL=agent-context-4HKRF6ZJ.js.map
@@ -2,12 +2,12 @@ import { createRequire as __hookRunnerCreateRequire } from 'node:module';
2
2
  const require = __hookRunnerCreateRequire(import.meta.url);
3
3
  import {
4
4
  sessionStateDir
5
- } from "./chunk-DNSTWC26.js";
5
+ } from "./chunk-LFCMGDJC.js";
6
6
  import {
7
7
  loadJson,
8
8
  withFileLock,
9
9
  writeJsonAtomic
10
- } from "./chunk-52RY6LQT.js";
10
+ } from "./chunk-N6435YLW.js";
11
11
  import "./chunk-RWRGC7ZK.js";
12
12
  import "./chunk-GNNKUMRF.js";
13
13
 
@@ -65,4 +65,4 @@ export {
65
65
  checkAndRecordFilePath,
66
66
  resetAgentFileBudget
67
67
  };
68
- //# sourceMappingURL=agent-file-budget-Q33ESBBE.js.map
68
+ //# sourceMappingURL=agent-file-budget-MGYZEBEW.js.map
@@ -4,13 +4,13 @@ import {
4
4
  INITIAL_MODEL,
5
5
  emptyAccumulator,
6
6
  foldTranscriptFrom
7
- } from "./chunk-AGSGKELQ.js";
8
- import "./chunk-VT5T6OEI.js";
9
- import "./chunk-4KWBQTTG.js";
7
+ } from "./chunk-6RSOKWNG.js";
8
+ import "./chunk-ZEYUSIMT.js";
9
+ import "./chunk-34O6HVAQ.js";
10
10
  import "./chunk-YHYDBLVB.js";
11
11
  import {
12
12
  THRESHOLDS
13
- } from "./chunk-52RY6LQT.js";
13
+ } from "./chunk-N6435YLW.js";
14
14
  import "./chunk-RWRGC7ZK.js";
15
15
  import "./chunk-GNNKUMRF.js";
16
16
 
@@ -36,4 +36,4 @@ function readAgentTranscriptMeasures(path) {
36
36
  export {
37
37
  readAgentTranscriptMeasures
38
38
  };
39
- //# sourceMappingURL=agent-transcript-metrics-W5CZZFMI.js.map
39
+ //# sourceMappingURL=agent-transcript-metrics-56XNPBWS.js.map
@@ -5,12 +5,12 @@ import {
5
5
  POST_TOOL_HANDLER_ATTRS,
6
6
  POST_TOOL_METRICS,
7
7
  recordMetric
8
- } from "./chunk-7OM5CYES.js";
8
+ } from "./chunk-QD52DSVB.js";
9
9
  import {
10
10
  errorMessage,
11
11
  errorTypeName,
12
12
  writeStderr
13
- } from "./chunk-52RY6LQT.js";
13
+ } from "./chunk-N6435YLW.js";
14
14
  import {
15
15
  UNITS
16
16
  } from "./chunk-RWRGC7ZK.js";
@@ -47,4 +47,4 @@ export {
47
47
  lazy,
48
48
  runHandlers
49
49
  };
50
- //# sourceMappingURL=chunk-UW3GQZSM.js.map
50
+ //# sourceMappingURL=chunk-2PQCUHOU.js.map
@@ -2,21 +2,21 @@ import { createRequire as __hookRunnerCreateRequire } from 'node:module';
2
2
  const require = __hookRunnerCreateRequire(import.meta.url);
3
3
  import {
4
4
  resolveAgentName
5
- } from "./chunk-LHWRXY2G.js";
5
+ } from "./chunk-2YXDQERF.js";
6
6
  import {
7
7
  readString
8
- } from "./chunk-NKZU4RRG.js";
8
+ } from "./chunk-WVVJE7ZI.js";
9
9
  import {
10
10
  promptLinkAttrs
11
- } from "./chunk-WU7ANGCW.js";
11
+ } from "./chunk-C3NW5R45.js";
12
12
  import {
13
13
  AGENT_ATTRS,
14
14
  GENAI_AGENT_ATTRIBUTES
15
- } from "./chunk-7OM5CYES.js";
15
+ } from "./chunk-QD52DSVB.js";
16
16
  import {
17
17
  CLAUDE_HOME,
18
18
  readdirOrEmpty
19
- } from "./chunk-52RY6LQT.js";
19
+ } from "./chunk-N6435YLW.js";
20
20
 
21
21
  // lib/agent/agent-sources.ts
22
22
  import { existsSync, readdirSync } from "node:fs";
@@ -154,4 +154,4 @@ export {
154
154
  toolEventAttributes,
155
155
  agentInvocationAttributes
156
156
  };
157
- //# sourceMappingURL=chunk-DGB4NSSD.js.map
157
+ //# sourceMappingURL=chunk-2XKE4E7E.js.map
@@ -4,11 +4,11 @@ import {
4
4
  AGENT_FILE_PREFIX,
5
5
  projectDirPaths,
6
6
  subagentsDir
7
- } from "./chunk-LQ2LGUYJ.js";
7
+ } from "./chunk-SA4ZNI3N.js";
8
8
  import {
9
9
  CLAUDE_HOME,
10
10
  loadJson
11
- } from "./chunk-52RY6LQT.js";
11
+ } from "./chunk-N6435YLW.js";
12
12
 
13
13
  // lib/session/forked-skill.ts
14
14
  import { dirname, join } from "node:path";
@@ -38,4 +38,4 @@ function resolveAgentName(input, home = CLAUDE_HOME) {
38
38
  export {
39
39
  resolveAgentName
40
40
  };
41
- //# sourceMappingURL=chunk-LHWRXY2G.js.map
41
+ //# sourceMappingURL=chunk-2YXDQERF.js.map
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  SYNTHETIC_MODEL,
8
8
  isJsonObject
9
- } from "./chunk-52RY6LQT.js";
9
+ } from "./chunk-N6435YLW.js";
10
10
 
11
11
  // lib/transcript/transcript-entry.ts
12
12
  var SYSTEM_RECORD_TYPE = "system";
@@ -75,4 +75,4 @@ export {
75
75
  usageCounts,
76
76
  promptTokens
77
77
  };
78
- //# sourceMappingURL=chunk-4KWBQTTG.js.map
78
+ //# sourceMappingURL=chunk-34O6HVAQ.js.map
@@ -3,7 +3,7 @@ const require = __hookRunnerCreateRequire(import.meta.url);
3
3
  import {
4
4
  THRESHOLDS,
5
5
  memoizeIn
6
- } from "./chunk-52RY6LQT.js";
6
+ } from "./chunk-N6435YLW.js";
7
7
 
8
8
  // lib/runtime/tool-output.ts
9
9
  var ResponseTooLarge = class extends Error {
@@ -38,4 +38,4 @@ function resolveOutputText(input) {
38
38
  export {
39
39
  resolveOutputText
40
40
  };
41
- //# sourceMappingURL=chunk-M4R4QIQH.js.map
41
+ //# sourceMappingURL=chunk-3DZNNATE.js.map
@@ -4,10 +4,10 @@ import {
4
4
  hasLargeContextTag,
5
5
  longestFirst,
6
6
  matchFamily
7
- } from "./chunk-X7XLMSZX.js";
7
+ } from "./chunk-VAX5JACX.js";
8
8
  import {
9
9
  inputTokensIncludingCache
10
- } from "./chunk-4KWBQTTG.js";
10
+ } from "./chunk-34O6HVAQ.js";
11
11
 
12
12
  // lib/transcript/model-pricing.ts
13
13
  var CACHE_WRITE_5M_MULTIPLIER = 1.25;
@@ -121,4 +121,4 @@ export {
121
121
  usageCostUsd,
122
122
  contextWindowForModel
123
123
  };
124
- //# sourceMappingURL=chunk-XSO3B4QN.js.map
124
+ //# sourceMappingURL=chunk-3IC2KNJ4.js.map
@@ -2,14 +2,14 @@ import { createRequire as __hookRunnerCreateRequire } from 'node:module';
2
2
  const require = __hookRunnerCreateRequire(import.meta.url);
3
3
  import {
4
4
  UNKNOWN_ERROR_TYPE
5
- } from "./chunk-7OM5CYES.js";
5
+ } from "./chunk-QD52DSVB.js";
6
6
  import {
7
7
  BUILTIN_TOOLS_BY_CATEGORY,
8
8
  EDIT_TOOLS,
9
9
  TASK_TOOLS,
10
10
  THRESHOLDS,
11
11
  countNonEmptyLines
12
- } from "./chunk-52RY6LQT.js";
12
+ } from "./chunk-N6435YLW.js";
13
13
 
14
14
  // lib/runtime/output-analyzer.ts
15
15
  var TIMEOUT_PATTERN = /\btimeout\b|\btimed?\s*out\b/i;
@@ -155,4 +155,4 @@ export {
155
155
  analyzeOutput,
156
156
  analyzeBuiltinOutput
157
157
  };
158
- //# sourceMappingURL=chunk-LYY6RCIE.js.map
158
+ //# sourceMappingURL=chunk-5GJLO6EX.js.map
@@ -7,23 +7,23 @@ import {
7
7
  } from "./chunk-JLEO5OHU.js";
8
8
  import {
9
9
  resolveOutputText
10
- } from "./chunk-M4R4QIQH.js";
10
+ } from "./chunk-3DZNNATE.js";
11
11
  import {
12
12
  getStringField
13
- } from "./chunk-NKZU4RRG.js";
13
+ } from "./chunk-WVVJE7ZI.js";
14
14
  import {
15
15
  classifyExecError,
16
16
  git
17
- } from "./chunk-SRMAJQMV.js";
17
+ } from "./chunk-ZCZUJKZD.js";
18
18
  import {
19
19
  sessionStateDir
20
- } from "./chunk-DNSTWC26.js";
20
+ } from "./chunk-LFCMGDJC.js";
21
21
  import {
22
22
  GIT_COMMIT_SUBCOMMAND,
23
23
  GIT_TIMEOUT_MS,
24
24
  loadJson,
25
25
  writeJsonAtomic
26
- } from "./chunk-52RY6LQT.js";
26
+ } from "./chunk-N6435YLW.js";
27
27
 
28
28
  // lib/git/git-commit.ts
29
29
  import { createHash } from "node:crypto";
@@ -175,4 +175,4 @@ export {
175
175
  getCommittedFiles,
176
176
  resolveCommitEvent
177
177
  };
178
- //# sourceMappingURL=chunk-C3WHUMU5.js.map
178
+ //# sourceMappingURL=chunk-67K2WTSP.js.map
@@ -5,10 +5,10 @@ import {
5
5
  sessionMarkerPath,
6
6
  sessionStateDir,
7
7
  sessionStateRoot
8
- } from "./chunk-DNSTWC26.js";
8
+ } from "./chunk-LFCMGDJC.js";
9
9
  import {
10
10
  toSafeFilename
11
- } from "./chunk-52RY6LQT.js";
11
+ } from "./chunk-N6435YLW.js";
12
12
 
13
13
  // lib/mcp/mcp-failure-latch.ts
14
14
  import { mkdirSync, rmSync } from "node:fs";
@@ -29,4 +29,4 @@ export {
29
29
  claimFailureReport,
30
30
  resetFailureTracking
31
31
  };
32
- //# sourceMappingURL=chunk-IY7AP7NA.js.map
32
+ //# sourceMappingURL=chunk-6QFGAAUD.js.map
@@ -3,13 +3,13 @@ const require = __hookRunnerCreateRequire(import.meta.url);
3
3
  import {
4
4
  collectToolCalls,
5
5
  markTurnBoundary
6
- } from "./chunk-VT5T6OEI.js";
6
+ } from "./chunk-ZEYUSIMT.js";
7
7
  import {
8
8
  SYSTEM_RECORD_TYPE,
9
9
  TURN_DURATION_SUBTYPE,
10
10
  responseUsage,
11
11
  tokenCount
12
- } from "./chunk-4KWBQTTG.js";
12
+ } from "./chunk-34O6HVAQ.js";
13
13
  import {
14
14
  THRESHOLDS,
15
15
  byteMarkers,
@@ -17,7 +17,7 @@ import {
17
17
  hasAnyMarker,
18
18
  parseJsonLine,
19
19
  readLinesFrom
20
- } from "./chunk-52RY6LQT.js";
20
+ } from "./chunk-N6435YLW.js";
21
21
 
22
22
  // lib/transcript/transcript-fold.ts
23
23
  var RELEVANT_LINE_KEYS = ['"usage"', '"tool_use"', '"tool_result"', '"turn_duration"'];
@@ -123,4 +123,4 @@ export {
123
123
  emptyAccumulator,
124
124
  foldTranscriptFrom
125
125
  };
126
- //# sourceMappingURL=chunk-AGSGKELQ.js.map
126
+ //# sourceMappingURL=chunk-6RSOKWNG.js.map
@@ -11,7 +11,7 @@ import {
11
11
  loadJson,
12
12
  truncate,
13
13
  writeJson
14
- } from "./chunk-52RY6LQT.js";
14
+ } from "./chunk-N6435YLW.js";
15
15
  import {
16
16
  DURATION_MS
17
17
  } from "./chunk-RWRGC7ZK.js";
@@ -171,4 +171,4 @@ export {
171
171
  readShipperStatus,
172
172
  formatShipperWarning
173
173
  };
174
- //# sourceMappingURL=chunk-YGFN3LN2.js.map
174
+ //# sourceMappingURL=chunk-BOZSNQGU.js.map
@@ -17,11 +17,11 @@ import {
17
17
  recordMetric,
18
18
  startLinkedSpan,
19
19
  withSpan
20
- } from "./chunk-7OM5CYES.js";
20
+ } from "./chunk-QD52DSVB.js";
21
21
  import {
22
22
  projectStateDir,
23
23
  sessionStateDir
24
- } from "./chunk-DNSTWC26.js";
24
+ } from "./chunk-LFCMGDJC.js";
25
25
  import {
26
26
  FILE_LOCK,
27
27
  THRESHOLDS,
@@ -29,7 +29,7 @@ import {
29
29
  withFileLock,
30
30
  writeJson,
31
31
  writeJsonAtomic
32
- } from "./chunk-52RY6LQT.js";
32
+ } from "./chunk-N6435YLW.js";
33
33
  import {
34
34
  TIME_MS,
35
35
  UNITS
@@ -266,4 +266,4 @@ export {
266
266
  instrumentHook,
267
267
  persistSpanContext
268
268
  };
269
- //# sourceMappingURL=chunk-WU7ANGCW.js.map
269
+ //# sourceMappingURL=chunk-C3NW5R45.js.map
@@ -2,11 +2,11 @@ import { createRequire as __hookRunnerCreateRequire } from 'node:module';
2
2
  const require = __hookRunnerCreateRequire(import.meta.url);
3
3
  import {
4
4
  getHookTrigger
5
- } from "./chunk-WU7ANGCW.js";
5
+ } from "./chunk-C3NW5R45.js";
6
6
  import {
7
7
  HOOK_EXIT,
8
8
  writeStderr
9
- } from "./chunk-52RY6LQT.js";
9
+ } from "./chunk-N6435YLW.js";
10
10
 
11
11
  // lib/runtime/hook-output.ts
12
12
  var sections = [];
@@ -46,4 +46,4 @@ export {
46
46
  flushAdditionalContext,
47
47
  denyToolUse
48
48
  };
49
- //# sourceMappingURL=chunk-2NTNAJZE.js.map
49
+ //# sourceMappingURL=chunk-D626UD7P.js.map
@@ -5,14 +5,15 @@ import {
5
5
  git,
6
6
  gitSync,
7
7
  settledValue
8
- } from "./chunk-SRMAJQMV.js";
8
+ } from "./chunk-ZCZUJKZD.js";
9
9
  import {
10
10
  hostStateDir
11
- } from "./chunk-DNSTWC26.js";
11
+ } from "./chunk-LFCMGDJC.js";
12
12
  import {
13
13
  GIT_TIMEOUT_MS,
14
14
  TELEMETRY_DIR,
15
15
  THRESHOLDS,
16
+ claudeConfigDir,
16
17
  countNonEmptyLines,
17
18
  isJsonObject,
18
19
  loadJson,
@@ -22,7 +23,7 @@ import {
22
23
  readTextOrNull,
23
24
  stringValues,
24
25
  writeJson
25
- } from "./chunk-52RY6LQT.js";
26
+ } from "./chunk-N6435YLW.js";
26
27
  import {
27
28
  DURATION_MS,
28
29
  TIME_MS
@@ -97,21 +98,6 @@ var init_esm = __esm({
97
98
  }
98
99
  });
99
100
 
100
- // lib/core/config-dir-recovery.ts
101
- import { homedir } from "node:os";
102
- import { join } from "node:path";
103
- function claudeConfigDir() {
104
- return process.env.CLAUDE_CONFIG_DIR ?? join(homedir(), ".claude");
105
- }
106
- var PROJECTS_SEPARATOR = "/projects/";
107
- function configDirFromTranscriptPath(transcriptPath, defaultConfigDir) {
108
- if (!transcriptPath) return void 0;
109
- const idx = transcriptPath.lastIndexOf(PROJECTS_SEPARATOR);
110
- if (idx <= 0) return void 0;
111
- const candidate = transcriptPath.slice(0, idx);
112
- return candidate !== defaultConfigDir ? candidate : void 0;
113
- }
114
-
115
101
  // lib/git/git-cache.ts
116
102
  import { createHash } from "node:crypto";
117
103
  import * as fs from "node:fs";
@@ -241,7 +227,7 @@ function getGitHubRepo(cwd = process.cwd(), now = Date.now(), dir = GIT_DISK_CAC
241
227
  }
242
228
 
243
229
  // lib/core/settings-env.ts
244
- import { join as join3 } from "node:path";
230
+ import { join as join2 } from "node:path";
245
231
  var OTLP_ENV = {
246
232
  ENDPOINT: "OTEL_EXPORTER_OTLP_ENDPOINT",
247
233
  HEADERS: "OTEL_EXPORTER_OTLP_HEADERS",
@@ -249,7 +235,7 @@ var OTLP_ENV = {
249
235
  };
250
236
  var cache = null;
251
237
  function loadSettingsEnv() {
252
- const env = loadJsonObject(join3(claudeConfigDir(), "settings.json"))?.env;
238
+ const env = loadJsonObject(join2(claudeConfigDir(), "settings.json"))?.env;
253
239
  return isJsonObject(env) ? stringValues(env) : {};
254
240
  }
255
241
  function settingsEnv(name) {
@@ -263,8 +249,8 @@ function resolveOtlpEndpoint(env = process.env) {
263
249
  // lib/core/identity-key-resolver.ts
264
250
  import { execFileSync } from "node:child_process";
265
251
  import { statSync as statSync2 } from "node:fs";
266
- import { homedir as homedir2 } from "node:os";
267
- import { join as join4 } from "node:path";
252
+ import { homedir } from "node:os";
253
+ import { join as join3 } from "node:path";
268
254
  var DOPPLER_BIN = "/opt/homebrew/bin/doppler";
269
255
  var DOPPLER_PROJECT = "integrity-studio";
270
256
  var DOPPLER_CONFIGS = {
@@ -273,14 +259,14 @@ var DOPPLER_CONFIGS = {
273
259
  };
274
260
  function claudeJsonPath() {
275
261
  const configDir = process.env.CLAUDE_CONFIG_DIR;
276
- return configDir ? join4(configDir, ".claude.json") : join4(homedir2(), ".claude.json");
262
+ return configDir ? join3(configDir, ".claude.json") : join3(homedir(), ".claude.json");
277
263
  }
278
264
  function identityMapPath() {
279
- return join4(claudeConfigDir(), "config", "identity-key-map.json");
265
+ return join3(claudeConfigDir(), "config", "identity-key-map.json");
280
266
  }
281
267
  var EMAIL_CACHE_FILE = "email-cache.json";
282
268
  function emailCachePath() {
283
- return join4(hostStateDir(), EMAIL_CACHE_FILE);
269
+ return join3(hostStateDir(), EMAIL_CACHE_FILE);
284
270
  }
285
271
  function readEmailFromSidecar(jsonPath) {
286
272
  const r = loadJsonObject(emailCachePath());
@@ -547,7 +533,6 @@ function getServiceName() {
547
533
  }
548
534
 
549
535
  export {
550
- configDirFromTranscriptPath,
551
536
  SeverityNumber,
552
537
  createNoopLogger,
553
538
  logs,
@@ -579,4 +564,4 @@ export {
579
564
  SERVICE_VERSION,
580
565
  getServiceName
581
566
  };
582
- //# sourceMappingURL=chunk-GG2I4TGI.js.map
567
+ //# sourceMappingURL=chunk-E3YCQK2D.js.map