augint-shell 0.90.2__tar.gz → 0.92.0__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.
Files changed (38) hide show
  1. {augint_shell-0.90.2 → augint_shell-0.92.0}/PKG-INFO +1 -1
  2. {augint_shell-0.90.2 → augint_shell-0.92.0}/pyproject.toml +1 -1
  3. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/__init__.py +1 -1
  4. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/cli/commands/tools.py +22 -26
  5. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/config.py +4 -0
  6. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/templates/ai-shell.yaml +2 -1
  7. {augint_shell-0.90.2 → augint_shell-0.92.0}/README.md +0 -0
  8. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/assets/__init__.py +0 -0
  9. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/assets/comfyui/__init__.py +0 -0
  10. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/assets/comfyui/provision.sh +0 -0
  11. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/cli/__init__.py +0 -0
  12. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/cli/__main__.py +0 -0
  13. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/cli/commands/__init__.py +0 -0
  14. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/cli/commands/llm.py +0 -0
  15. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/cli/commands/manage.py +0 -0
  16. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/container.py +0 -0
  17. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/defaults.py +0 -0
  18. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/exceptions.py +0 -0
  19. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/gpu.py +0 -0
  20. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/interactive.py +0 -0
  21. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/local_chrome.py +0 -0
  22. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/models.py +0 -0
  23. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/scaffold.py +0 -0
  24. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/selector.py +0 -0
  25. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/templates/__init__.py +0 -0
  26. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/templates/ai-shell.toml +0 -0
  27. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/templates/aider/__init__.py +0 -0
  28. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/templates/claude/__init__.py +0 -0
  29. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/templates/claude/settings.json +0 -0
  30. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/templates/codex/__init__.py +0 -0
  31. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/templates/n8n/workflows/chat_with_ollama.json +0 -0
  32. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/templates/n8n/workflows/text_to_speech.json +0 -0
  33. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/templates/n8n/workflows/transcribe_audio.json +0 -0
  34. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/templates/opencode/__init__.py +0 -0
  35. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/templates/pi/__init__.py +0 -0
  36. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/templates/pi/models.json +0 -0
  37. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/tmux.py +0 -0
  38. {augint_shell-0.90.2 → augint_shell-0.92.0}/src/ai_shell/typeahead.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: augint-shell
3
- Version: 0.90.2
3
+ Version: 0.92.0
4
4
  Summary: Launch AI coding tools and local LLMs in Docker containers
5
5
  Author: svange
6
6
  Requires-Dist: docker>=7.0.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "augint-shell"
3
- version = "0.90.2"
3
+ version = "0.92.0"
4
4
  description = "Launch AI coding tools and local LLMs in Docker containers"
5
5
  authors = [{name = "svange"}]
6
6
  readme = "README.md"
@@ -1,6 +1,6 @@
1
1
  """augint-shell (ai-shell) - Launch AI coding tools and local LLMs in Docker containers."""
2
2
 
3
- __version__ = "0.90.2"
3
+ __version__ = "0.92.0"
4
4
 
5
5
  __all__ = [
6
6
  "__version__",
@@ -152,46 +152,35 @@ def _inject_mcp_config(
152
152
  def _check_bedrock_access(
153
153
  container_name: str,
154
154
  exec_env: dict[str, str],
155
+ model_id: str = "",
155
156
  ) -> None:
156
157
  """Verify Bedrock is reachable before launching a tool.
157
158
 
158
- Sends a minimal 1-token ``invoke-model`` request inside the container to
159
- validate the full path: AWS credentials, SCP policies, and model access.
159
+ Sends a minimal ``converse`` request inside the container to validate
160
+ the full path: AWS credentials, SCP policies, and model access.
160
161
  Raises :class:`click.ClickException` with an actionable message on failure.
161
162
  """
162
163
  from ai_shell.defaults import DEFAULT_BEDROCK_MODEL
163
164
 
165
+ model = model_id or DEFAULT_BEDROCK_MODEL
164
166
  region = exec_env.get("AWS_REGION", "us-east-1")
165
167
  profile = exec_env.get("AWS_PROFILE", "")
166
168
 
167
- # Build a tiny invoke-model call to test the full auth chain.
168
- # Use printf (no trailing newline) and fileb:// (binary blob) -- required by AWS CLI.
169
- body = (
170
- '{"anthropic_version":"bedrock-2023-05-31",'
171
- '"max_tokens":10,'
172
- '"messages":[{"role":"user","content":"ping"}]}'
173
- )
174
-
175
- # Write the body to a temp file inside the container, invoke, then clean up
176
- write_cmd = f"printf '%s' '{body}' > /tmp/_bedrock_check.json"
177
169
  invoke_cmd = (
178
- f"aws bedrock-runtime invoke-model"
179
- f" --model-id {DEFAULT_BEDROCK_MODEL}"
170
+ f"aws bedrock-runtime converse"
171
+ f" --model-id {model}"
180
172
  f" --region {region}"
181
- f" --content-type application/json"
182
- f" --accept application/json"
183
- f" --body fileb:///tmp/_bedrock_check.json"
184
- f" /tmp/_bedrock_check_out.json"
173
+ f' --messages \'[{{"role":"user","content":[{{"text":"ping"}}]}}]\''
174
+ f" --inference-config '{{\"maxTokens\":1}}'"
175
+ f" --output json --no-cli-pager"
185
176
  )
186
177
  if profile:
187
178
  invoke_cmd += f" --profile {profile}"
188
- cleanup_cmd = "rm -f /tmp/_bedrock_check.json /tmp/_bedrock_check_out.json"
189
- shell_cmd = f"{write_cmd} && {invoke_cmd}; rc=$?; {cleanup_cmd}; exit $rc"
190
179
 
191
180
  args = ["docker", "exec"]
192
181
  for key, value in exec_env.items():
193
182
  args.extend(["-e", f"{key}={value}"])
194
- args.extend([container_name, "bash", "-c", shell_cmd])
183
+ args.extend([container_name, "bash", "-c", invoke_cmd])
195
184
 
196
185
  logger.debug("bedrock preflight: %s", " ".join(args))
197
186
  result = subprocess.run(args, capture_output=True, text=True, timeout=30)
@@ -200,7 +189,7 @@ def _check_bedrock_access(
200
189
  stderr = result.stderr.strip()
201
190
  raise click.ClickException(
202
191
  f"Bedrock access check failed (profile={profile or 'default'}, "
203
- f"region={region}, model={DEFAULT_BEDROCK_MODEL}).\n"
192
+ f"region={region}, model={model}).\n"
204
193
  f" {stderr}\n\n"
205
194
  "Possible causes:\n"
206
195
  f" - AWS SSO session expired: run 'aws sso login --profile {profile or '<profile>'}' on the host\n"
@@ -1367,7 +1356,7 @@ def pi(ctx, use_aws, cli_profile, openai_profile, do_login):
1367
1356
  with capture_typeahead() as typeahead:
1368
1357
  project = ctx.obj.get("project") if ctx.obj else None
1369
1358
  config = load_config(project_override=project, project_dir=Path.cwd())
1370
- use_bedrock = use_aws
1359
+ use_bedrock = use_aws or bool(cli_profile) or bool(config.bedrock_profile)
1371
1360
 
1372
1361
  manager, name, exec_env, config = _get_manager(
1373
1362
  ctx,
@@ -1381,14 +1370,19 @@ def pi(ctx, use_aws, cli_profile, openai_profile, do_login):
1381
1370
  manager.exec_interactive(name, ["pi", "login"], extra_env=exec_env)
1382
1371
 
1383
1372
  if use_bedrock:
1373
+ bedrock_model = config.bedrock_model
1384
1374
  profile_label = exec_env.get("AWS_PROFILE", "default")
1385
1375
  region_label = exec_env.get("AWS_REGION", "us-east-1")
1386
- bedrock_label = f" via Bedrock (profile={profile_label}, region={region_label})"
1376
+ bedrock_label = (
1377
+ f" via Bedrock (profile={profile_label},"
1378
+ f" region={region_label}, model={bedrock_model})"
1379
+ )
1387
1380
  console.print(
1388
1381
  f"Checking Bedrock access (profile={profile_label}, region={region_label})..."
1389
1382
  )
1390
- _check_bedrock_access(name, exec_env)
1383
+ _check_bedrock_access(name, exec_env, model_id=bedrock_model)
1391
1384
  else:
1385
+ bedrock_model = ""
1392
1386
  bedrock_label = ""
1393
1387
  _check_ollama_running(name)
1394
1388
 
@@ -1400,7 +1394,9 @@ def pi(ctx, use_aws, cli_profile, openai_profile, do_login):
1400
1394
  manager.ensure_tool_fresh(name, "pi")
1401
1395
 
1402
1396
  cmd = ["pi"]
1403
- if not use_bedrock and not resolved_openai_profile:
1397
+ if use_bedrock:
1398
+ cmd.extend(["--provider", "amazon-bedrock", "--model", bedrock_model])
1399
+ elif not resolved_openai_profile:
1404
1400
  _ensure_pi_ollama_provider(name, config)
1405
1401
  pi_config = Path(config.project_dir) / ".pi" / "settings.json"
1406
1402
  if not pi_config.is_file():
@@ -197,6 +197,7 @@ class AiShellConfig:
197
197
  ai_profile: str = "" # AWS profile for infra (sets AWS_PROFILE in container)
198
198
  aws_region: str = "" # Override AWS_REGION
199
199
  bedrock_profile: str = "" # AWS profile for Bedrock LLM API calls
200
+ bedrock_model: str = "meta.llama3-3-70b-instruct-v1:0"
200
201
 
201
202
  # OpenAI
202
203
  openai_profile: str = "" # Suffixed .env key name for multi-account switching
@@ -483,6 +484,8 @@ def _apply_config(config: AiShellConfig, path: Path) -> None:
483
484
  config.aws_region = aws["region"]
484
485
  if "bedrock_profile" in aws:
485
486
  config.bedrock_profile = aws["bedrock_profile"]
487
+ if "bedrock_model" in aws:
488
+ config.bedrock_model = aws["bedrock_model"]
486
489
 
487
490
  # [openai] section
488
491
  openai = data.get("openai", {})
@@ -536,6 +539,7 @@ def _apply_env_vars(config: AiShellConfig) -> None:
536
539
  "AI_SHELL_AI_PROFILE": ("ai_profile", str),
537
540
  "AI_SHELL_AWS_REGION": ("aws_region", str),
538
541
  "AI_SHELL_BEDROCK_PROFILE": ("bedrock_profile", str),
542
+ "AI_SHELL_BEDROCK_MODEL": ("bedrock_model", str),
539
543
  "AI_SHELL_OPENAI_PROFILE": ("openai_profile", str),
540
544
  "AI_SHELL_CLAUDE_PROVIDER": ("claude_provider", str),
541
545
  "AI_SHELL_LOCAL_CHROME": ("local_chrome", bool),
@@ -98,7 +98,8 @@ llm:
98
98
  #
99
99
  # aws:
100
100
  # ai_profile: my-infra-account
101
- # bedrock_profile: my-ai-account
101
+ # bedrock_profile: sandbox
102
+ # bedrock_model: meta.llama3-3-70b-instruct-v1:0
102
103
  # region: us-east-1
103
104
 
104
105
  # -----------------------------------------------------------------------------
File without changes