npcsh 1.0.18__tar.gz → 1.0.19__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: npcsh
3
- Version: 1.0.18
3
+ Version: 1.0.19
4
4
  Summary: npcsh is a command-line toolkit for using AI agents in novel ways.
5
5
  Home-page: https://github.com/NPC-Worldwide/npcsh
6
6
  Author: Christopher Agostino
@@ -2203,7 +2203,7 @@ def execute_command(
2203
2203
  for i, cmd_segment in enumerate(commands):
2204
2204
  render_markdown(f'- executing command {i+1}/{len(commands)}')
2205
2205
  is_last_command = (i == len(commands) - 1)
2206
- stream_this_segment = state.stream_output and is_last_command
2206
+ stream_this_segment = state.stream_output and not is_last_command
2207
2207
  try:
2208
2208
  current_state, output = process_pipeline_command(
2209
2209
  cmd_segment.strip(),
@@ -2222,12 +2222,13 @@ def execute_command(
2222
2222
  if stream_this_segment:
2223
2223
  full_stream_output = print_and_process_stream_with_markdown(output,
2224
2224
  state.npc.model,
2225
- state.npc.provider, show=True)
2225
+ state.npc.provider,
2226
+ show=True)
2226
2227
  stdin_for_next = full_stream_output
2227
2228
  if is_last_command:
2228
2229
  final_output = full_stream_output
2229
2230
  except:
2230
- if output is not None: # Try converting other types to string
2231
+ if output is not None:
2231
2232
  try:
2232
2233
  stdin_for_next = str(output)
2233
2234
  except Exception:
@@ -2451,6 +2452,7 @@ def process_result(
2451
2452
  result_state: ShellState,
2452
2453
  output: Any,
2453
2454
  command_history: CommandHistory,
2455
+
2454
2456
 
2455
2457
  ):
2456
2458
 
@@ -2487,12 +2489,10 @@ def process_result(
2487
2489
  render_markdown(output.get('output'))
2488
2490
  elif result_state.stream_output:
2489
2491
 
2490
-
2491
2492
  final_output_str = print_and_process_stream_with_markdown(output_content,
2492
- model_for_stream,
2493
- provider_for_stream,
2494
- show=True)
2495
-
2493
+ model_for_stream,
2494
+ provider_for_stream,
2495
+ show=True)
2496
2496
  elif output_content is not None:
2497
2497
  final_output_str = str(output_content)
2498
2498
  render_markdown(final_output_str)
@@ -2523,7 +2523,6 @@ def process_result(
2523
2523
  pdb.set_trace()
2524
2524
  try:
2525
2525
  if not should_skip_kg_processing(user_input, final_output_str):
2526
-
2527
2526
  npc_kg = load_kg_from_db(engine, team_name, npc_name, result_state.current_path)
2528
2527
  evolved_npc_kg, _ = kg_evolve_incremental(
2529
2528
  existing_kg=npc_kg,
@@ -2533,9 +2532,7 @@ def process_result(
2533
2532
  get_concepts=True,
2534
2533
  link_concepts_facts = False,
2535
2534
  link_concepts_concepts = False,
2536
- link_facts_facts = False,
2537
-
2538
-
2535
+ link_facts_facts = False,
2539
2536
  )
2540
2537
  save_kg_to_db(engine,
2541
2538
  evolved_npc_kg,
@@ -2572,7 +2569,9 @@ def process_result(
2572
2569
 
2573
2570
  Respond with JSON: {{"suggestion": "Your sentence."
2574
2571
  }}"""
2575
- response = get_llm_response(prompt, npc=active_npc, format="json")
2572
+ response = get_llm_response(prompt,
2573
+ npc=active_npc,
2574
+ format="json")
2576
2575
  suggestion = response.get("response", {}).get("suggestion")
2577
2576
 
2578
2577
  if suggestion:
@@ -206,7 +206,8 @@ def run_repl(command_history: CommandHistory, initial_state: ShellState):
206
206
  process_result(user_input,
207
207
  state,
208
208
  output,
209
- command_history)
209
+ command_history,
210
+ already_printed=False)
210
211
 
211
212
  except KeyboardInterrupt:
212
213
  if is_windows:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: npcsh
3
- Version: 1.0.18
3
+ Version: 1.0.19
4
4
  Summary: npcsh is a command-line toolkit for using AI agents in novel ways.
5
5
  Home-page: https://github.com/NPC-Worldwide/npcsh
6
6
  Author: Christopher Agostino
@@ -78,7 +78,7 @@ extra_files = package_files("npcpy/npc_team/")
78
78
 
79
79
  setup(
80
80
  name="npcsh",
81
- version="1.0.18",
81
+ version="1.0.19",
82
82
  packages=find_packages(exclude=["tests*"]),
83
83
  install_requires=base_requirements, # Only install base requirements by default
84
84
  extras_require={
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes