tenjin-cli 0.1.0-alpha.26 → 0.1.0-alpha.28

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 (139) hide show
  1. package/README.md +9 -20
  2. package/dist/alive-3J3CHOQP.js +21 -0
  3. package/dist/{chunk-WT7DHJNJ.js → chunk-3QJREVMX.js} +5 -7
  4. package/dist/{chunk-WT7DHJNJ.js.map → chunk-3QJREVMX.js.map} +1 -1
  5. package/dist/{chunk-BOAI23CX.js → chunk-6KA4HFX5.js} +21 -15
  6. package/dist/chunk-6KA4HFX5.js.map +1 -0
  7. package/dist/chunk-6W5GYG3W.js +128 -0
  8. package/dist/chunk-6W5GYG3W.js.map +1 -0
  9. package/dist/{chunk-W36HL4TB.js → chunk-7H3RN4WJ.js} +7 -9
  10. package/dist/{chunk-W36HL4TB.js.map → chunk-7H3RN4WJ.js.map} +1 -1
  11. package/dist/{chunk-4HAV6IFE.js → chunk-7R37M6WV.js} +5 -7
  12. package/dist/{chunk-4HAV6IFE.js.map → chunk-7R37M6WV.js.map} +1 -1
  13. package/dist/{chunk-LAIZ2AQA.js → chunk-A5H3E5QA.js} +2 -2
  14. package/dist/{update-QXVH2DE7.js → chunk-AO54FM4H.js} +147 -35
  15. package/dist/chunk-AO54FM4H.js.map +1 -0
  16. package/dist/{chunk-XMIVHQ35.js → chunk-B2L53TMK.js} +17 -2
  17. package/dist/{chunk-XMIVHQ35.js.map → chunk-B2L53TMK.js.map} +1 -1
  18. package/dist/{chunk-YTM7OURD.js → chunk-BRHREK7E.js} +2 -2
  19. package/dist/{chunk-YLCWI6ZR.js → chunk-DJYAPACT.js} +79 -36
  20. package/dist/chunk-DJYAPACT.js.map +1 -0
  21. package/dist/{chunk-OBPZ36HG.js → chunk-DYSDQE7S.js} +92 -5
  22. package/dist/chunk-DYSDQE7S.js.map +1 -0
  23. package/dist/{chunk-EJXIK6WY.js → chunk-FQ6DHINU.js} +80 -48
  24. package/dist/chunk-FQ6DHINU.js.map +1 -0
  25. package/dist/chunk-FZTSGQVK.js +52 -0
  26. package/dist/chunk-FZTSGQVK.js.map +1 -0
  27. package/dist/{chunk-QF4SSCQV.js → chunk-KAMRYUK2.js} +5 -4
  28. package/dist/chunk-KAMRYUK2.js.map +1 -0
  29. package/dist/{chunk-ALJRB7NG.js → chunk-MNTQMZJB.js} +8 -8
  30. package/dist/{chunk-XICKN3CH.js → chunk-QTND6XWJ.js} +160 -80
  31. package/dist/chunk-QTND6XWJ.js.map +1 -0
  32. package/dist/chunk-RLPLYUME.js +115 -0
  33. package/dist/chunk-RLPLYUME.js.map +1 -0
  34. package/dist/{chunk-ZLD6MJVJ.js → chunk-S4SAZ7OD.js} +1 -1
  35. package/dist/chunk-S4SAZ7OD.js.map +1 -0
  36. package/dist/{chunk-5HS54CLI.js → chunk-UEOWNDQG.js} +8 -10
  37. package/dist/{chunk-5HS54CLI.js.map → chunk-UEOWNDQG.js.map} +1 -1
  38. package/dist/{chunk-5INS5ZZF.js → chunk-UOW5JXYY.js} +5 -7
  39. package/dist/{chunk-5INS5ZZF.js.map → chunk-UOW5JXYY.js.map} +1 -1
  40. package/dist/chunk-VSUHGRVB.js +1455 -0
  41. package/dist/chunk-VSUHGRVB.js.map +1 -0
  42. package/dist/{chunk-Z7R2QDX2.js → chunk-W6JX4LYF.js} +50 -7
  43. package/dist/chunk-W6JX4LYF.js.map +1 -0
  44. package/dist/{chunk-UDWGT4FX.js → chunk-XVTD7UWR.js} +14 -8
  45. package/dist/chunk-XVTD7UWR.js.map +1 -0
  46. package/dist/{chunk-6JIYGYRB.js → chunk-YFJJYHVG.js} +2 -2
  47. package/dist/{chunk-DI7WHXOZ.js → chunk-ZG6ZZLO7.js} +898 -521
  48. package/dist/chunk-ZG6ZZLO7.js.map +1 -0
  49. package/dist/{chunk-OZ3LWLCI.js → chunk-ZO3X5NPG.js} +4 -6
  50. package/dist/{chunk-OZ3LWLCI.js.map → chunk-ZO3X5NPG.js.map} +1 -1
  51. package/dist/{chunk-5NUF4BHR.js → chunk-ZP5PV3JB.js} +4 -4
  52. package/dist/{chunk-HII5HOQV.js → chunk-ZP7AHN7Z.js} +6 -6
  53. package/dist/{cli-2U5JB7OQ.js → cli-234DNHN6.js} +53 -51
  54. package/dist/{cli-2U5JB7OQ.js.map → cli-234DNHN6.js.map} +1 -1
  55. package/dist/{config-44EGO636.js → config-IY2OJCAK.js} +11 -13
  56. package/dist/{doctor-BD42BBEG.js → doctor-2UZZF44A.js} +275 -250
  57. package/dist/doctor-2UZZF44A.js.map +1 -0
  58. package/dist/{env-proxy-KEGEMWKX.js → env-proxy-XL4P73MZ.js} +2 -2
  59. package/dist/{fund-WQOOUESE.js → fund-RZ2QFULK.js} +92 -36
  60. package/dist/{fund-WQOOUESE.js.map → fund-RZ2QFULK.js.map} +1 -1
  61. package/dist/hook-command-PZHKS7ES.js +31 -0
  62. package/dist/hosts/claude/.claude-plugin/marketplace.json +19 -0
  63. package/dist/hosts/claude/tenjin/.claude-plugin/plugin.json +14 -0
  64. package/dist/hosts/claude/tenjin/.mcp.json +11 -0
  65. package/dist/hosts/claude/tenjin/hooks/hooks.json +206 -0
  66. package/dist/index.js +15 -6
  67. package/dist/index.js.map +1 -1
  68. package/dist/install-O5FJ5EP3.js +48 -0
  69. package/dist/{install-identity-4RDWTLJ2.js → install-identity-QM44IQ6Z.js} +7 -7
  70. package/dist/{install-wallet-USHWL7AX.js → install-wallet-Z52EDLPB.js} +14 -14
  71. package/dist/{mcp-T5SYCLP7.js → mcp-33HAADDF.js} +557 -118
  72. package/dist/mcp-33HAADDF.js.map +1 -0
  73. package/dist/package-RT24HTTP.js +37 -0
  74. package/dist/{pay-276DSSYG.js → pay-IR2V76FX.js} +16 -16
  75. package/dist/{payments-TZYLJXK3.js → payments-GFV4HU5R.js} +10 -10
  76. package/dist/{send-YHDKZPED.js → send-PI4NUA7I.js} +13 -13
  77. package/dist/{status-X2INT6VD.js → status-ZUHTJK46.js} +10 -9
  78. package/dist/{status-X2INT6VD.js.map → status-ZUHTJK46.js.map} +1 -1
  79. package/dist/{status-line-QKDJYZGV.js → status-line-2G5JPQAE.js} +6 -6
  80. package/dist/uninstall-THKUH5ZT.js +136 -0
  81. package/dist/uninstall-THKUH5ZT.js.map +1 -0
  82. package/dist/update-NPZDP24E.js +18 -0
  83. package/dist/update-NPZDP24E.js.map +1 -0
  84. package/dist/{wallet-CKKB23D5.js → wallet-53EFH4M5.js} +11 -11
  85. package/dist/wallet-53EFH4M5.js.map +1 -0
  86. package/docs/agent-permissions.md +32 -21
  87. package/package.json +3 -3
  88. package/dist/chunk-65EJJVT3.js +0 -172
  89. package/dist/chunk-65EJJVT3.js.map +0 -1
  90. package/dist/chunk-BOAI23CX.js.map +0 -1
  91. package/dist/chunk-DI7WHXOZ.js.map +0 -1
  92. package/dist/chunk-EJXIK6WY.js.map +0 -1
  93. package/dist/chunk-GHR4BTNJ.js +0 -87
  94. package/dist/chunk-GHR4BTNJ.js.map +0 -1
  95. package/dist/chunk-H4BOQLWW.js +0 -99
  96. package/dist/chunk-H4BOQLWW.js.map +0 -1
  97. package/dist/chunk-JLEF5WHM.js +0 -132
  98. package/dist/chunk-JLEF5WHM.js.map +0 -1
  99. package/dist/chunk-OBPZ36HG.js.map +0 -1
  100. package/dist/chunk-PM2MOXJ3.js +0 -66
  101. package/dist/chunk-PM2MOXJ3.js.map +0 -1
  102. package/dist/chunk-QF4SSCQV.js.map +0 -1
  103. package/dist/chunk-TGLKKLQG.js +0 -11
  104. package/dist/chunk-TGLKKLQG.js.map +0 -1
  105. package/dist/chunk-UDWGT4FX.js.map +0 -1
  106. package/dist/chunk-VNT3CQFV.js +0 -940
  107. package/dist/chunk-VNT3CQFV.js.map +0 -1
  108. package/dist/chunk-XICKN3CH.js.map +0 -1
  109. package/dist/chunk-YHWBDCGS.js +0 -753
  110. package/dist/chunk-YHWBDCGS.js.map +0 -1
  111. package/dist/chunk-YLCWI6ZR.js.map +0 -1
  112. package/dist/chunk-Z7R2QDX2.js.map +0 -1
  113. package/dist/chunk-ZLD6MJVJ.js.map +0 -1
  114. package/dist/doctor-BD42BBEG.js.map +0 -1
  115. package/dist/hook-command-23LC5NRN.js +0 -32
  116. package/dist/install-REPLHNU7.js +0 -72
  117. package/dist/mcp-T5SYCLP7.js.map +0 -1
  118. package/dist/status-line-wiring-LW4HFRHB.js +0 -31
  119. package/dist/uninstall-NVTGU7JD.js +0 -175
  120. package/dist/uninstall-NVTGU7JD.js.map +0 -1
  121. package/dist/update-QXVH2DE7.js.map +0 -1
  122. /package/dist/{config-44EGO636.js.map → alive-3J3CHOQP.js.map} +0 -0
  123. /package/dist/{chunk-LAIZ2AQA.js.map → chunk-A5H3E5QA.js.map} +0 -0
  124. /package/dist/{chunk-YTM7OURD.js.map → chunk-BRHREK7E.js.map} +0 -0
  125. /package/dist/{chunk-ALJRB7NG.js.map → chunk-MNTQMZJB.js.map} +0 -0
  126. /package/dist/{chunk-6JIYGYRB.js.map → chunk-YFJJYHVG.js.map} +0 -0
  127. /package/dist/{chunk-5NUF4BHR.js.map → chunk-ZP5PV3JB.js.map} +0 -0
  128. /package/dist/{chunk-HII5HOQV.js.map → chunk-ZP7AHN7Z.js.map} +0 -0
  129. /package/dist/{env-proxy-KEGEMWKX.js.map → config-IY2OJCAK.js.map} +0 -0
  130. /package/dist/{hook-command-23LC5NRN.js.map → env-proxy-XL4P73MZ.js.map} +0 -0
  131. /package/dist/{install-REPLHNU7.js.map → hook-command-PZHKS7ES.js.map} +0 -0
  132. /package/dist/{install-identity-4RDWTLJ2.js.map → install-O5FJ5EP3.js.map} +0 -0
  133. /package/dist/{pay-276DSSYG.js.map → install-identity-QM44IQ6Z.js.map} +0 -0
  134. /package/dist/{install-wallet-USHWL7AX.js.map → install-wallet-Z52EDLPB.js.map} +0 -0
  135. /package/dist/{status-line-wiring-LW4HFRHB.js.map → package-RT24HTTP.js.map} +0 -0
  136. /package/dist/{wallet-CKKB23D5.js.map → pay-IR2V76FX.js.map} +0 -0
  137. /package/dist/{payments-TZYLJXK3.js.map → payments-GFV4HU5R.js.map} +0 -0
  138. /package/dist/{send-YHDKZPED.js.map → send-PI4NUA7I.js.map} +0 -0
  139. /package/dist/{status-line-QKDJYZGV.js.map → status-line-2G5JPQAE.js.map} +0 -0
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "tenjin",
3
+ "owner": {
4
+ "name": "Tenjin",
5
+ "url": "https://tenjin.sh"
6
+ },
7
+ "description": "Tenjin's tool router for Claude Code, installed by `tenjin install`.",
8
+ "metadata": {
9
+ "version": "0.1.0-alpha.28"
10
+ },
11
+ "plugins": [
12
+ {
13
+ "name": "tenjin",
14
+ "source": "./tenjin",
15
+ "description": "Tenjin picks the right tool when your agent needs one, and one wallet on this machine pays for every call.",
16
+ "version": "0.1.0-alpha.28"
17
+ }
18
+ ]
19
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "tenjin",
3
+ "version": "0.1.0-alpha.28",
4
+ "description": "Tenjin picks the right tool when your agent needs one, and one wallet on this machine pays for every call.",
5
+ "author": {
6
+ "name": "Tenjin",
7
+ "url": "https://tenjin.sh"
8
+ },
9
+ "homepage": "https://tenjin.sh/agents",
10
+ "repository": "https://github.com/BackTrackCo/tenjin-agent",
11
+ "metadata": {
12
+ "tenjin-cli": "0.1.0-alpha.28"
13
+ }
14
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "mcpServers": {
3
+ "router": {
4
+ "command": "tenjin",
5
+ "args": [
6
+ "mcp",
7
+ "--plugin"
8
+ ]
9
+ }
10
+ }
11
+ }
@@ -0,0 +1,206 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "hooks": [
6
+ {
7
+ "type": "command",
8
+ "command": "tenjin hook alive",
9
+ "timeout": 5
10
+ }
11
+ ]
12
+ }
13
+ ],
14
+ "UserPromptSubmit": [
15
+ {
16
+ "hooks": [
17
+ {
18
+ "type": "mcp_tool",
19
+ "server": "plugin:tenjin:router",
20
+ "tool": "hook",
21
+ "input": {
22
+ "kind": "prompt",
23
+ "hook_event_name": "${hook_event_name}",
24
+ "session_id": "${session_id}",
25
+ "transcript_path": "${transcript_path}",
26
+ "cwd": "${cwd}",
27
+ "prompt": "${prompt}"
28
+ },
29
+ "timeout": 5
30
+ }
31
+ ]
32
+ }
33
+ ],
34
+ "PreToolUse": [
35
+ {
36
+ "matcher": "WebSearch|WebFetch",
37
+ "hooks": [
38
+ {
39
+ "type": "mcp_tool",
40
+ "server": "plugin:tenjin:router",
41
+ "tool": "hook",
42
+ "input": {
43
+ "kind": "native",
44
+ "hook_event_name": "${hook_event_name}",
45
+ "session_id": "${session_id}",
46
+ "transcript_path": "${transcript_path}",
47
+ "cwd": "${cwd}",
48
+ "tool_name": "${tool_name}",
49
+ "tool_input": "${tool_input}",
50
+ "tool_use_id": "${tool_use_id}",
51
+ "agent_id": "${agent_id}",
52
+ "agent_type": "${agent_type}"
53
+ },
54
+ "timeout": 5
55
+ }
56
+ ]
57
+ },
58
+ {
59
+ "matcher": "Agent|Task",
60
+ "hooks": [
61
+ {
62
+ "type": "mcp_tool",
63
+ "server": "plugin:tenjin:router",
64
+ "tool": "hook",
65
+ "input": {
66
+ "kind": "agent",
67
+ "hook_event_name": "${hook_event_name}",
68
+ "session_id": "${session_id}",
69
+ "transcript_path": "${transcript_path}",
70
+ "cwd": "${cwd}",
71
+ "tool_name": "${tool_name}",
72
+ "tool_input": "${tool_input}",
73
+ "tool_use_id": "${tool_use_id}",
74
+ "agent_id": "${agent_id}",
75
+ "agent_type": "${agent_type}"
76
+ },
77
+ "timeout": 5
78
+ }
79
+ ]
80
+ },
81
+ {
82
+ "matcher": "AskUserQuestion",
83
+ "hooks": [
84
+ {
85
+ "type": "mcp_tool",
86
+ "server": "plugin:tenjin:router",
87
+ "tool": "hook",
88
+ "input": {
89
+ "kind": "ask",
90
+ "hook_event_name": "${hook_event_name}",
91
+ "session_id": "${session_id}",
92
+ "transcript_path": "${transcript_path}",
93
+ "cwd": "${cwd}",
94
+ "tool_name": "${tool_name}",
95
+ "tool_input": "${tool_input}",
96
+ "tool_use_id": "${tool_use_id}",
97
+ "agent_id": "${agent_id}",
98
+ "agent_type": "${agent_type}"
99
+ },
100
+ "timeout": 5
101
+ }
102
+ ]
103
+ },
104
+ {
105
+ "matcher": "mcp__plugin_tenjin_router__hook",
106
+ "hooks": [
107
+ {
108
+ "type": "command",
109
+ "command": "echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"deny\",\"permissionDecisionReason\":\"Only the Tenjin hooks call this tool. To make a lookup, call mcp__plugin_tenjin_router__request.\"}}'",
110
+ "timeout": 5
111
+ }
112
+ ]
113
+ },
114
+ {
115
+ "matcher": "mcp__plugin_tenjin_router__request",
116
+ "hooks": [
117
+ {
118
+ "type": "command",
119
+ "command": "echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"allow\",\"permissionDecisionReason\":\"Tenjin lookup\"}}'",
120
+ "timeout": 5
121
+ }
122
+ ]
123
+ }
124
+ ],
125
+ "PostToolUse": [
126
+ {
127
+ "matcher": "WebSearch|WebFetch",
128
+ "hooks": [
129
+ {
130
+ "type": "mcp_tool",
131
+ "server": "plugin:tenjin:router",
132
+ "tool": "hook",
133
+ "input": {
134
+ "kind": "shortfall",
135
+ "hook_event_name": "${hook_event_name}",
136
+ "session_id": "${session_id}",
137
+ "transcript_path": "${transcript_path}",
138
+ "cwd": "${cwd}",
139
+ "tool_name": "${tool_name}",
140
+ "tool_input": "${tool_input}",
141
+ "tool_use_id": "${tool_use_id}",
142
+ "agent_id": "${agent_id}",
143
+ "agent_type": "${agent_type}",
144
+ "tool_response": "${tool_response}",
145
+ "error": "${error}",
146
+ "is_interrupt": "${is_interrupt}"
147
+ },
148
+ "timeout": 15
149
+ }
150
+ ]
151
+ },
152
+ {
153
+ "matcher": "AskUserQuestion",
154
+ "hooks": [
155
+ {
156
+ "type": "mcp_tool",
157
+ "server": "plugin:tenjin:router",
158
+ "tool": "hook",
159
+ "input": {
160
+ "kind": "answer",
161
+ "hook_event_name": "${hook_event_name}",
162
+ "session_id": "${session_id}",
163
+ "transcript_path": "${transcript_path}",
164
+ "cwd": "${cwd}",
165
+ "tool_name": "${tool_name}",
166
+ "tool_input": "${tool_input}",
167
+ "tool_use_id": "${tool_use_id}",
168
+ "agent_id": "${agent_id}",
169
+ "agent_type": "${agent_type}",
170
+ "tool_response": "${tool_response}"
171
+ },
172
+ "timeout": 5
173
+ }
174
+ ]
175
+ }
176
+ ],
177
+ "PostToolUseFailure": [
178
+ {
179
+ "matcher": "WebSearch|WebFetch",
180
+ "hooks": [
181
+ {
182
+ "type": "mcp_tool",
183
+ "server": "plugin:tenjin:router",
184
+ "tool": "hook",
185
+ "input": {
186
+ "kind": "shortfall",
187
+ "hook_event_name": "${hook_event_name}",
188
+ "session_id": "${session_id}",
189
+ "transcript_path": "${transcript_path}",
190
+ "cwd": "${cwd}",
191
+ "tool_name": "${tool_name}",
192
+ "tool_input": "${tool_input}",
193
+ "tool_use_id": "${tool_use_id}",
194
+ "agent_id": "${agent_id}",
195
+ "agent_type": "${agent_type}",
196
+ "tool_response": "${tool_response}",
197
+ "error": "${error}",
198
+ "is_interrupt": "${is_interrupt}"
199
+ },
200
+ "timeout": 15
201
+ }
202
+ ]
203
+ }
204
+ ]
205
+ }
206
+ }
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
3
3
 
4
4
  // src/index.ts
5
- var MIN_NODE_MAJOR = 24;
5
+ var MIN_NODE_MAJOR = 22;
6
6
  var nodeMajor = Number.parseInt(process.versions.node.split(".")[0] ?? "", 10);
7
7
  if (Number.isNaN(nodeMajor) || nodeMajor < MIN_NODE_MAJOR) {
8
8
  const envelope = {
@@ -12,7 +12,7 @@ if (Number.isNaN(nodeMajor) || nodeMajor < MIN_NODE_MAJOR) {
12
12
  error: {
13
13
  code: "NODE_UNSUPPORTED",
14
14
  message: `Tenjin CLI requires Node ${MIN_NODE_MAJOR} or newer (found ${process.versions.node}).`,
15
- fix: "Install Node 24 or newer"
15
+ fix: `Install Node ${MIN_NODE_MAJOR} or newer`
16
16
  }
17
17
  };
18
18
  process.stdout.write(`${JSON.stringify(envelope, null, 2)}
@@ -22,14 +22,23 @@ if (Number.isNaN(nodeMajor) || nodeMajor < MIN_NODE_MAJOR) {
22
22
  process.exit(1);
23
23
  }
24
24
  if (process.argv.length === 3 && process.argv[2] === "status-line") {
25
- const { statusLineMain } = await import("./status-line-QKDJYZGV.js");
25
+ const { statusLineMain } = await import("./status-line-2G5JPQAE.js");
26
26
  await statusLineMain();
27
27
  process.exit(0);
28
28
  }
29
- var { useEnvProxy } = await import("./env-proxy-KEGEMWKX.js");
29
+ if (process.argv.length === 4 && process.argv[2] === "hook" && process.argv[3] === "alive") {
30
+ const [{ aliveMain }, { dataDir: dataDir2 }, { default: pkg }] = await Promise.all([
31
+ import("./alive-3J3CHOQP.js"),
32
+ import("./paths-MUXHUOCM.js"),
33
+ import("./package-RT24HTTP.js")
34
+ ]);
35
+ await aliveMain({ dataDir: dataDir2(process.env), version: pkg.version });
36
+ process.exit(0);
37
+ }
38
+ var { useEnvProxy } = await import("./env-proxy-XL4P73MZ.js");
30
39
  useEnvProxy(process.env);
31
- var { main } = await import("./cli-2U5JB7OQ.js");
32
- var { enableCliIdentity } = await import("./install-identity-4RDWTLJ2.js");
40
+ var { main } = await import("./cli-234DNHN6.js");
41
+ var { enableCliIdentity } = await import("./install-identity-QM44IQ6Z.js");
33
42
  var { dataDir } = await import("./paths-MUXHUOCM.js");
34
43
  enableCliIdentity(dataDir(process.env));
35
44
  process.exit(await main(process.argv.slice(2)));
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n// Bin entry. The Node version guard runs BEFORE importing anything else — no\n// static imports above it — so an out-of-support runtime gets one JSON error\n// envelope plus a human stderr line instead of a syntax/parse crash from a\n// lazily-loaded module written in newer syntax. Kept in conservative syntax.\nconst MIN_NODE_MAJOR = 24;\n\nconst nodeMajor = Number.parseInt(process.versions.node.split('.')[0] ?? '', 10);\n\nif (Number.isNaN(nodeMajor) || nodeMajor < MIN_NODE_MAJOR) {\n const envelope = {\n schemaVersion: 1,\n command: 'preflight',\n ok: false,\n error: {\n code: 'NODE_UNSUPPORTED',\n message: `Tenjin CLI requires Node ${MIN_NODE_MAJOR} or newer (found ${process.versions.node}).`,\n fix: 'Install Node 24 or newer',\n },\n };\n process.stdout.write(`${JSON.stringify(envelope, null, 2)}\\n`);\n process.stderr.write(`error: Node ${MIN_NODE_MAJOR}+ required, found ${process.versions.node}\\n`);\n process.exit(1);\n}\n\n// THE STATUS LINE NEVER LOADS THE CLI. Claude Code runs it once a second for as\n// long as a session is open, and commander, zod and the command tree are parse\n// cost it has no use for. Only the bare invocation is diverted; `--help` and\n// every flag fall through to the command tree, which registers it like any verb.\nif (process.argv.length === 3 && process.argv[2] === 'status-line') {\n const { statusLineMain } = await import('./router/status-line');\n await statusLineMain();\n process.exit(0);\n}\n\n// After the status line, which sends no request: every other process from this\n// bin (the CLI, the hooks, `tenjin mcp`) honours HTTPS_PROXY and NO_PROXY.\nconst { useEnvProxy } = await import('./lib/env-proxy');\nuseEnvProxy(process.env);\n\nconst { main } = await import('./cli');\n// Here and not in `main`, so an in-process test of the command tree sends no\n// telemetry and mints no install id; see lib/install-identity.\nconst { enableCliIdentity } = await import('./lib/install-identity');\nconst { dataDir } = await import('./lib/paths');\nenableCliIdentity(dataDir(process.env));\nprocess.exit(await main(process.argv.slice(2)));\n\n// Marks this file a module so top-level await is legal; emits nothing.\nexport {};\n"],"mappings":";;;;AAKA,IAAM,iBAAiB;AAEvB,IAAM,YAAY,OAAO,SAAS,QAAQ,SAAS,KAAK,MAAM,GAAG,EAAE,CAAC,KAAK,IAAI,EAAE;AAE/E,IAAI,OAAO,MAAM,SAAS,KAAK,YAAY,gBAAgB;AACzD,QAAM,WAAW;AAAA,IACf,eAAe;AAAA,IACf,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS,4BAA4B,cAAc,oBAAoB,QAAQ,SAAS,IAAI;AAAA,MAC5F,KAAK;AAAA,IACP;AAAA,EACF;AACA,UAAQ,OAAO,MAAM,GAAG,KAAK,UAAU,UAAU,MAAM,CAAC,CAAC;AAAA,CAAI;AAC7D,UAAQ,OAAO,MAAM,eAAe,cAAc,qBAAqB,QAAQ,SAAS,IAAI;AAAA,CAAI;AAChG,UAAQ,KAAK,CAAC;AAChB;AAMA,IAAI,QAAQ,KAAK,WAAW,KAAK,QAAQ,KAAK,CAAC,MAAM,eAAe;AAClE,QAAM,EAAE,eAAe,IAAI,MAAM,OAAO,2BAAsB;AAC9D,QAAM,eAAe;AACrB,UAAQ,KAAK,CAAC;AAChB;AAIA,IAAM,EAAE,YAAY,IAAI,MAAM,OAAO,yBAAiB;AACtD,YAAY,QAAQ,GAAG;AAEvB,IAAM,EAAE,KAAK,IAAI,MAAM,OAAO,mBAAO;AAGrC,IAAM,EAAE,kBAAkB,IAAI,MAAM,OAAO,gCAAwB;AACnE,IAAM,EAAE,QAAQ,IAAI,MAAM,OAAO,qBAAa;AAC9C,kBAAkB,QAAQ,QAAQ,GAAG,CAAC;AACtC,QAAQ,KAAK,MAAM,KAAK,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\n// Bin entry. The Node version guard runs BEFORE importing anything else — no\n// static imports above it — so an out-of-support runtime gets one JSON error\n// envelope plus a human stderr line instead of a syntax/parse crash from a\n// lazily-loaded module written in newer syntax. Kept in conservative syntax.\nconst MIN_NODE_MAJOR = 22;\n\nconst nodeMajor = Number.parseInt(process.versions.node.split('.')[0] ?? '', 10);\n\nif (Number.isNaN(nodeMajor) || nodeMajor < MIN_NODE_MAJOR) {\n const envelope = {\n schemaVersion: 1,\n command: 'preflight',\n ok: false,\n error: {\n code: 'NODE_UNSUPPORTED',\n message: `Tenjin CLI requires Node ${MIN_NODE_MAJOR} or newer (found ${process.versions.node}).`,\n fix: `Install Node ${MIN_NODE_MAJOR} or newer`,\n },\n };\n process.stdout.write(`${JSON.stringify(envelope, null, 2)}\\n`);\n process.stderr.write(`error: Node ${MIN_NODE_MAJOR}+ required, found ${process.versions.node}\\n`);\n process.exit(1);\n}\n\n// THE STATUS LINE NEVER LOADS THE CLI. Claude Code runs it once a second for as\n// long as a session is open, and commander, zod and the command tree are parse\n// cost it has no use for. Only the bare invocation is diverted; `--help` and\n// every flag fall through to the command tree, which registers it like any verb.\nif (process.argv.length === 3 && process.argv[2] === 'status-line') {\n const { statusLineMain } = await import('./router/status-line');\n await statusLineMain();\n process.exit(0);\n}\n\n// THE PLUGIN'S SessionStart LEG NEVER LOADS THE CLI EITHER. It runs before\n// every session starts, writes two small files and prints nothing, so it\n// takes the same shortcut. A flag falls through to the command tree.\nif (process.argv.length === 4 && process.argv[2] === 'hook' && process.argv[3] === 'alive') {\n const [{ aliveMain }, { dataDir }, { default: pkg }] = await Promise.all([\n import('./router/alive'),\n import('./lib/paths'),\n import('../package.json'),\n ]);\n await aliveMain({ dataDir: dataDir(process.env), version: pkg.version });\n process.exit(0);\n}\n\n// After the status line, which sends no request: every other process from this\n// bin (the CLI, the hooks, `tenjin mcp`) honours HTTPS_PROXY and NO_PROXY.\nconst { useEnvProxy } = await import('./lib/env-proxy');\nuseEnvProxy(process.env);\n\nconst { main } = await import('./cli');\n// Here and not in `main`, so an in-process test of the command tree sends no\n// telemetry and mints no install id; see lib/install-identity.\nconst { enableCliIdentity } = await import('./lib/install-identity');\nconst { dataDir } = await import('./lib/paths');\nenableCliIdentity(dataDir(process.env));\nprocess.exit(await main(process.argv.slice(2)));\n\n// Marks this file a module so top-level await is legal; emits nothing.\nexport {};\n"],"mappings":";;;;AAKA,IAAM,iBAAiB;AAEvB,IAAM,YAAY,OAAO,SAAS,QAAQ,SAAS,KAAK,MAAM,GAAG,EAAE,CAAC,KAAK,IAAI,EAAE;AAE/E,IAAI,OAAO,MAAM,SAAS,KAAK,YAAY,gBAAgB;AACzD,QAAM,WAAW;AAAA,IACf,eAAe;AAAA,IACf,SAAS;AAAA,IACT,IAAI;AAAA,IACJ,OAAO;AAAA,MACL,MAAM;AAAA,MACN,SAAS,4BAA4B,cAAc,oBAAoB,QAAQ,SAAS,IAAI;AAAA,MAC5F,KAAK,gBAAgB,cAAc;AAAA,IACrC;AAAA,EACF;AACA,UAAQ,OAAO,MAAM,GAAG,KAAK,UAAU,UAAU,MAAM,CAAC,CAAC;AAAA,CAAI;AAC7D,UAAQ,OAAO,MAAM,eAAe,cAAc,qBAAqB,QAAQ,SAAS,IAAI;AAAA,CAAI;AAChG,UAAQ,KAAK,CAAC;AAChB;AAMA,IAAI,QAAQ,KAAK,WAAW,KAAK,QAAQ,KAAK,CAAC,MAAM,eAAe;AAClE,QAAM,EAAE,eAAe,IAAI,MAAM,OAAO,2BAAsB;AAC9D,QAAM,eAAe;AACrB,UAAQ,KAAK,CAAC;AAChB;AAKA,IAAI,QAAQ,KAAK,WAAW,KAAK,QAAQ,KAAK,CAAC,MAAM,UAAU,QAAQ,KAAK,CAAC,MAAM,SAAS;AAC1F,QAAM,CAAC,EAAE,UAAU,GAAG,EAAE,SAAAA,SAAQ,GAAG,EAAE,SAAS,IAAI,CAAC,IAAI,MAAM,QAAQ,IAAI;AAAA,IACvE,OAAO,qBAAgB;AAAA,IACvB,OAAO,qBAAa;AAAA,IACpB,OAAO,uBAAiB;AAAA,EAC1B,CAAC;AACD,QAAM,UAAU,EAAE,SAASA,SAAQ,QAAQ,GAAG,GAAG,SAAS,IAAI,QAAQ,CAAC;AACvE,UAAQ,KAAK,CAAC;AAChB;AAIA,IAAM,EAAE,YAAY,IAAI,MAAM,OAAO,yBAAiB;AACtD,YAAY,QAAQ,GAAG;AAEvB,IAAM,EAAE,KAAK,IAAI,MAAM,OAAO,mBAAO;AAGrC,IAAM,EAAE,kBAAkB,IAAI,MAAM,OAAO,gCAAwB;AACnE,IAAM,EAAE,QAAQ,IAAI,MAAM,OAAO,qBAAa;AAC9C,kBAAkB,QAAQ,QAAQ,GAAG,CAAC;AACtC,QAAQ,KAAK,MAAM,KAAK,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC;","names":["dataDir"]}
@@ -0,0 +1,48 @@
1
+ import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
+ import {
3
+ AFTER_CALL_TIMEOUT_SECONDS,
4
+ DISCLOSURE,
5
+ NEW_SESSION_STEP,
6
+ RELOAD_STEP,
7
+ ROUTE_HOOK_TIMEOUT_SECONDS,
8
+ loadStep,
9
+ migrateSettingsInstall,
10
+ pluginProof,
11
+ runRouterInstall,
12
+ settingsInstallPaths
13
+ } from "./chunk-VSUHGRVB.js";
14
+ import "./chunk-W6JX4LYF.js";
15
+ import "./chunk-ZG6ZZLO7.js";
16
+ import "./chunk-AKWGE6JQ.js";
17
+ import "./chunk-DYSDQE7S.js";
18
+ import "./chunk-A36LQPHV.js";
19
+ import "./chunk-P7LABKCW.js";
20
+ import "./chunk-MEFB5KHA.js";
21
+ import "./chunk-B2L53TMK.js";
22
+ import "./chunk-AO54FM4H.js";
23
+ import "./chunk-7H3RN4WJ.js";
24
+ import "./chunk-XVTD7UWR.js";
25
+ import "./chunk-ZO3X5NPG.js";
26
+ import "./chunk-6W5GYG3W.js";
27
+ import "./chunk-S4SAZ7OD.js";
28
+ import "./chunk-UOW5JXYY.js";
29
+ import "./chunk-2I4QTOLB.js";
30
+ import "./chunk-ZP7AHN7Z.js";
31
+ import "./chunk-FZTSGQVK.js";
32
+ import "./chunk-QTND6XWJ.js";
33
+ import "./chunk-K6AXXYCG.js";
34
+ import "./chunk-RLPLYUME.js";
35
+ import "./chunk-ZXTAQYNA.js";
36
+ export {
37
+ AFTER_CALL_TIMEOUT_SECONDS,
38
+ DISCLOSURE,
39
+ NEW_SESSION_STEP,
40
+ RELOAD_STEP,
41
+ ROUTE_HOOK_TIMEOUT_SECONDS,
42
+ loadStep,
43
+ migrateSettingsInstall,
44
+ pluginProof,
45
+ runRouterInstall,
46
+ settingsInstallPaths
47
+ };
48
+ //# sourceMappingURL=install-O5FJ5EP3.js.map
@@ -6,14 +6,14 @@ import {
6
6
  noteBaseUrlFlag,
7
7
  readOrCreateInstallId,
8
8
  tenjinOrigins
9
- } from "./chunk-WT7DHJNJ.js";
10
- import "./chunk-5INS5ZZF.js";
11
- import "./chunk-GHR4BTNJ.js";
9
+ } from "./chunk-3QJREVMX.js";
10
+ import "./chunk-UOW5JXYY.js";
12
11
  import "./chunk-2I4QTOLB.js";
13
- import "./chunk-HII5HOQV.js";
14
- import "./chunk-XICKN3CH.js";
15
- import "./chunk-JLEF5WHM.js";
12
+ import "./chunk-ZP7AHN7Z.js";
13
+ import "./chunk-FZTSGQVK.js";
14
+ import "./chunk-QTND6XWJ.js";
16
15
  import "./chunk-K6AXXYCG.js";
16
+ import "./chunk-RLPLYUME.js";
17
17
  import "./chunk-ZXTAQYNA.js";
18
18
  export {
19
19
  enableCliIdentity,
@@ -23,4 +23,4 @@ export {
23
23
  readOrCreateInstallId,
24
24
  tenjinOrigins
25
25
  };
26
- //# sourceMappingURL=install-identity-4RDWTLJ2.js.map
26
+ //# sourceMappingURL=install-identity-QM44IQ6Z.js.map
@@ -1,17 +1,22 @@
1
1
  import { createRequire as __tenjinCreateRequire } from 'node:module'; const require = __tenjinCreateRequire(import.meta.url);
2
2
  import {
3
3
  runWalletCreate
4
- } from "./chunk-ALJRB7NG.js";
4
+ } from "./chunk-MNTQMZJB.js";
5
5
  import "./chunk-PZ5N6BAL.js";
6
- import "./chunk-YTM7OURD.js";
6
+ import "./chunk-BRHREK7E.js";
7
7
  import {
8
8
  describeWallet,
9
9
  resolveWalletProvider,
10
10
  walletFileExists
11
- } from "./chunk-4HAV6IFE.js";
12
- import "./chunk-5NUF4BHR.js";
13
- import "./chunk-6JIYGYRB.js";
14
- import "./chunk-UDWGT4FX.js";
11
+ } from "./chunk-7R37M6WV.js";
12
+ import "./chunk-ZP5PV3JB.js";
13
+ import "./chunk-YFJJYHVG.js";
14
+ import {
15
+ confirmChoice
16
+ } from "./chunk-P7LABKCW.js";
17
+ import "./chunk-MEFB5KHA.js";
18
+ import "./chunk-B2L53TMK.js";
19
+ import "./chunk-XVTD7UWR.js";
15
20
  import "./chunk-AWQPGIR6.js";
16
21
  import "./chunk-N35E6CM2.js";
17
22
  import "./chunk-JRGFKVAZ.js";
@@ -20,16 +25,11 @@ import "./chunk-EGELTSPU.js";
20
25
  import "./chunk-KG3D7FIF.js";
21
26
  import "./chunk-RBJPAZFI.js";
22
27
  import "./chunk-BPMWXTFX.js";
23
- import {
24
- confirmChoice
25
- } from "./chunk-P7LABKCW.js";
26
- import "./chunk-MEFB5KHA.js";
27
- import "./chunk-XMIVHQ35.js";
28
28
  import "./chunk-2I4QTOLB.js";
29
- import "./chunk-XICKN3CH.js";
29
+ import "./chunk-FZTSGQVK.js";
30
30
  import {
31
31
  CliError
32
- } from "./chunk-JLEF5WHM.js";
32
+ } from "./chunk-QTND6XWJ.js";
33
33
  import "./chunk-K6AXXYCG.js";
34
34
  import "./chunk-ZXTAQYNA.js";
35
35
 
@@ -104,4 +104,4 @@ export {
104
104
  resolveWallet,
105
105
  walletValue
106
106
  };
107
- //# sourceMappingURL=install-wallet-USHWL7AX.js.map
107
+ //# sourceMappingURL=install-wallet-Z52EDLPB.js.map