juno-code 1.0.30 → 1.0.32

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.
@@ -33,6 +33,13 @@ class ClaudeService:
33
33
  ":opus": "claude-opus-4-5-20251101",
34
34
  }
35
35
 
36
+ # Default allowed tools (used with --append-allowed-tools)
37
+ DEFAULT_ALLOWED_TOOLS = [
38
+ "Task", "Bash", "Glob", "Grep", "ExitPlanMode", "Read", "Edit", "Write",
39
+ "NotebookEdit", "WebFetch", "TodoWrite", "WebSearch", "BashOutput",
40
+ "KillShell", "Skill", "SlashCommand", "EnterPlanMode"
41
+ ]
42
+
36
43
  def __init__(self):
37
44
  self.model_name = self.DEFAULT_MODEL
38
45
  self.permission_mode = self.DEFAULT_PERMISSION_MODE
@@ -86,6 +93,14 @@ Examples:
86
93
  %(prog)s -p "Add tests" -m :opus --tool Bash --tool Edit
87
94
  %(prog)s -p "Quick task" -m :haiku --disallowed-tool Bash
88
95
  %(prog)s -p "Complex task" -m claude-opus-4-20250514 --tool Read --tool Write
96
+ %(prog)s -p "Multi-tool task" --allowed-tools Bash Edit Read Write
97
+ %(prog)s -p "Restricted task" --disallowed-tools Bash WebSearch
98
+ %(prog)s --continue -p "Continue previous conversation"
99
+ %(prog)s --resume abc123 -p "Resume session abc123"
100
+
101
+ Default Tools (enabled by default when no --allowed-tools specified):
102
+ Task, Bash, Glob, Grep, ExitPlanMode, Read, Edit, Write, NotebookEdit,
103
+ WebFetch, TodoWrite, WebSearch, BashOutput, KillShell, Skill, SlashCommand, EnterPlanMode
89
104
 
90
105
  Environment Variables:
91
106
  CLAUDE_PROJECT_PATH Project path (default: current directory)
@@ -133,17 +148,31 @@ Environment Variables:
133
148
  )
134
149
 
135
150
  parser.add_argument(
136
- "--tool",
151
+ "--tools",
152
+ action="append",
153
+ dest="tools",
154
+ help="Specify the list of available tools from the built-in set (only works with --print mode). Use \"\" to disable all tools, \"default\" to use all tools, or specify tool names (e.g. \"Bash\" \"Edit\" \"Read\"). Forwarded to claude CLI."
155
+ )
156
+
157
+ parser.add_argument(
158
+ "--allowedTools", "--allowed-tools",
137
159
  action="append",
138
160
  dest="allowed_tools",
139
- help="Allowed tools (can be used multiple times, e.g. 'Bash' 'Edit')"
161
+ help="Permission-based filtering of specific tool instances (e.g. 'Bash(git:*)' 'Edit'). Accepts both --allowedTools and --allowed-tools. Default when not specified: Task, Bash, Glob, Grep, ExitPlanMode, Read, Edit, Write, NotebookEdit, WebFetch, TodoWrite, WebSearch, BashOutput, KillShell, Skill, SlashCommand, EnterPlanMode"
140
162
  )
141
163
 
142
164
  parser.add_argument(
143
- "--disallowed-tool",
165
+ "--disallowedTools", "--disallowed-tools",
144
166
  action="append",
145
167
  dest="disallowed_tools",
146
- help="Disallowed tools (can be used multiple times, e.g. 'Bash' 'Edit'). Default: empty"
168
+ help="Disallowed tools (can be used multiple times, e.g. 'Bash' 'Edit'). Accepts both --disallowedTools and --disallowed-tools. By default, no tools are disallowed"
169
+ )
170
+
171
+ parser.add_argument(
172
+ "--appendAllowedTools", "--append-allowed-tools",
173
+ action="append",
174
+ dest="append_allowed_tools",
175
+ help="Append tools to the default allowed-tools list (mutually exclusive with --allowed-tools). Accepts both --appendAllowedTools and --append-allowed-tools."
147
176
  )
148
177
 
149
178
  parser.add_argument(
@@ -183,6 +212,14 @@ Environment Variables:
183
212
  help="Continue the most recent conversation"
184
213
  )
185
214
 
215
+ parser.add_argument(
216
+ "-r", "--resume",
217
+ type=str,
218
+ dest="resume_session",
219
+ metavar="SESSION_ID",
220
+ help="Resume a conversation by session ID (e.g., claude --resume abc123)"
221
+ )
222
+
186
223
  parser.add_argument(
187
224
  "--agents",
188
225
  type=str,
@@ -220,34 +257,49 @@ Environment Variables:
220
257
  ]
221
258
 
222
259
  # Build the full prompt (auto_instruction + user prompt)
223
- # IMPORTANT: Prompt must come BEFORE --allowed-tools
224
- # because --allowed-tools consumes all following arguments as tool names
260
+ # IMPORTANT: Prompt must come BEFORE tool-related flags
261
+ # because some flags consume all following arguments
225
262
  full_prompt = f"{self.auto_instruction}\n\n{self.prompt}"
226
263
  cmd.append(full_prompt)
227
264
 
228
- # Add allowed tools if specified (AFTER the prompt)
265
+ # Add available tools from built-in set if specified (AFTER the prompt)
266
+ # Note: --tools controls which built-in Claude tools are available (only works with --print mode)
267
+ if args.tools:
268
+ cmd.append("--tools")
269
+ cmd.extend(args.tools)
270
+ # No else block: By default Claude enables all tools
271
+
272
+ # Handle allowed tools (either --allowed-tools or --append-allowed-tools, but not both)
273
+ # These are mutually exclusive - validation already done above
274
+ # When neither is specified, use the default allowed-tools list
229
275
  if args.allowed_tools:
230
- cmd.append("--allowed-tools")
276
+ # Use the explicitly specified allowed tools (replaces default)
277
+ cmd.append("--allowedTools")
231
278
  cmd.extend(args.allowed_tools)
279
+ elif args.append_allowed_tools:
280
+ # Append specified tools to the default list
281
+ combined_tools = self.DEFAULT_ALLOWED_TOOLS + args.append_allowed_tools
282
+ cmd.append("--allowedTools")
283
+ cmd.extend(combined_tools)
232
284
  else:
233
- # Default allowed tools similar to claude_code.py
234
- default_tools = [
235
- "Read", "Write", "Edit", "MultiEdit",
236
- "Bash", "Glob", "Grep", "WebFetch",
237
- "WebSearch", "TodoWrite"
238
- ]
239
- cmd.append("--allowed-tools")
240
- cmd.extend(default_tools)
285
+ # Use default allowed-tools list when no explicit list is provided
286
+ cmd.append("--allowedTools")
287
+ cmd.extend(self.DEFAULT_ALLOWED_TOOLS)
241
288
 
242
289
  # Add disallowed tools if specified (AFTER the prompt)
290
+ # Note: claude CLI expects camelCase --disallowedTools (not kebab-case --disallowed-tools)
243
291
  if args.disallowed_tools:
244
- cmd.append("--disallowed-tools")
292
+ cmd.append("--disallowedTools")
245
293
  cmd.extend(args.disallowed_tools)
246
294
 
247
295
  # Add continue flag if specified
248
296
  if args.continue_conversation:
249
297
  cmd.append("--continue")
250
298
 
299
+ # Add resume flag if specified
300
+ if args.resume_session:
301
+ cmd.extend(["--resume", args.resume_session])
302
+
251
303
  # Add agents configuration if specified
252
304
  if args.agents:
253
305
  cmd.extend(["--agents", args.agents])
@@ -541,6 +593,14 @@ Environment Variables:
541
593
  # Parse arguments first to handle --help
542
594
  args = self.parse_arguments()
543
595
 
596
+ # Validate that --allowed-tools and --append-allowed-tools are mutually exclusive
597
+ if args.allowed_tools and args.append_allowed_tools:
598
+ print(
599
+ "Error: --allowed-tools and --append-allowed-tools are mutually exclusive. Use one or the other.",
600
+ file=sys.stderr
601
+ )
602
+ return 1
603
+
544
604
  # Check if prompt is provided
545
605
  if not args.prompt and not args.prompt_file:
546
606
  print(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "juno-code",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
4
4
  "description": "TypeScript CLI tool for AI subagent orchestration with code automation",
5
5
  "keywords": [
6
6
  "ai",