opencode-llmstack 0.7.1__py3-none-any.whl → 0.7.2__py3-none-any.whl
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.
- llmstack/commands/activate.py +42 -6
- llmstack/commands/setup.py +15 -6
- llmstack/shell_env.py +114 -33
- {opencode_llmstack-0.7.1.dist-info → opencode_llmstack-0.7.2.dist-info}/METADATA +10 -5
- {opencode_llmstack-0.7.1.dist-info → opencode_llmstack-0.7.2.dist-info}/RECORD +8 -8
- {opencode_llmstack-0.7.1.dist-info → opencode_llmstack-0.7.2.dist-info}/WHEEL +0 -0
- {opencode_llmstack-0.7.1.dist-info → opencode_llmstack-0.7.2.dist-info}/entry_points.txt +0 -0
- {opencode_llmstack-0.7.1.dist-info → opencode_llmstack-0.7.2.dist-info}/top_level.txt +0 -0
llmstack/commands/activate.py
CHANGED
|
@@ -28,20 +28,42 @@ def _print_help() -> None:
|
|
|
28
28
|
print("usage: llmstack activate <zsh|bash|powershell>", file=sys.stderr)
|
|
29
29
|
|
|
30
30
|
|
|
31
|
+
def _is_powershell(shell: str) -> bool:
|
|
32
|
+
return shell in ("powershell", "pwsh")
|
|
33
|
+
|
|
34
|
+
|
|
31
35
|
def _hook_path(shell: str) -> Path:
|
|
32
36
|
"""``~/.<shell>_llmstack_hook`` -- ``pwsh`` is normalised to ``powershell``
|
|
33
|
-
so the user doesn't end up with two redundant files.
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
so the user doesn't end up with two redundant files.
|
|
38
|
+
|
|
39
|
+
PowerShell additionally needs a ``.ps1`` suffix or the host won't
|
|
40
|
+
dot-source it -- without the extension Windows hands the file to
|
|
41
|
+
the OS shell file-association (Notepad, etc.) instead of running
|
|
42
|
+
it as a script.
|
|
43
|
+
"""
|
|
44
|
+
if _is_powershell(shell):
|
|
45
|
+
return Path.home() / ".powershell_llmstack_hook.ps1"
|
|
46
|
+
return Path.home() / f".{shell}_llmstack_hook"
|
|
36
47
|
|
|
37
48
|
|
|
38
49
|
def _source_line(shell: str, path: Path) -> str:
|
|
39
50
|
"""Shell-specific incantation to load the hook file."""
|
|
40
|
-
if shell
|
|
51
|
+
if _is_powershell(shell):
|
|
41
52
|
return f". '{path}'"
|
|
42
53
|
return f'source "{path}"'
|
|
43
54
|
|
|
44
55
|
|
|
56
|
+
def eval_line(shell: str) -> str:
|
|
57
|
+
"""The one-shot the user pastes / adds to their rc to install the hook.
|
|
58
|
+
|
|
59
|
+
POSIX shells use ``eval "$(...)"``; PowerShell has no ``eval`` and
|
|
60
|
+
needs ``Invoke-Expression`` over the captured stdout.
|
|
61
|
+
"""
|
|
62
|
+
if _is_powershell(shell):
|
|
63
|
+
return f"llmstack activate {shell} | Out-String | Invoke-Expression"
|
|
64
|
+
return f'eval "$(llmstack activate {shell})"'
|
|
65
|
+
|
|
66
|
+
|
|
45
67
|
def write_hook(shell: str) -> tuple[Path, str]:
|
|
46
68
|
"""Render the hook for ``shell``, write it to disk, return ``(path, source_line)``.
|
|
47
69
|
|
|
@@ -62,10 +84,24 @@ def run(args: list[str]) -> int:
|
|
|
62
84
|
|
|
63
85
|
path, src = write_hook(shell)
|
|
64
86
|
|
|
65
|
-
|
|
87
|
+
line = eval_line(shell)
|
|
66
88
|
print(f"[OK] hook written: {path}", file=sys.stderr)
|
|
67
89
|
print( " activate in this shell now (and for every new shell:", file=sys.stderr)
|
|
68
|
-
print(f" paste into your rc): {
|
|
90
|
+
print(f" paste into your rc): {line}", file=sys.stderr)
|
|
91
|
+
if _is_powershell(shell):
|
|
92
|
+
# PowerShell's default `Restricted` policy on Windows blocks
|
|
93
|
+
# dot-sourcing any .ps1; surface the one-time fix so the
|
|
94
|
+
# `Invoke-Expression` line above doesn't fail with "running
|
|
95
|
+
# scripts is disabled on this system".
|
|
96
|
+
print(
|
|
97
|
+
" PowerShell execution policy must allow local scripts; "
|
|
98
|
+
"if dot-sourcing fails, run once:",
|
|
99
|
+
file=sys.stderr,
|
|
100
|
+
)
|
|
101
|
+
print(
|
|
102
|
+
" Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned",
|
|
103
|
+
file=sys.stderr,
|
|
104
|
+
)
|
|
69
105
|
|
|
70
106
|
print(src)
|
|
71
107
|
return 0
|
llmstack/commands/setup.py
CHANGED
|
@@ -18,7 +18,7 @@ import shutil
|
|
|
18
18
|
import subprocess
|
|
19
19
|
|
|
20
20
|
from llmstack._platform import IS_WINDOWS, shell_family
|
|
21
|
-
from llmstack.commands.activate import write_hook
|
|
21
|
+
from llmstack.commands.activate import eval_line, write_hook
|
|
22
22
|
from llmstack.download.binary import install_llama_swap
|
|
23
23
|
from llmstack.download.ggufs import download_all, wait_for_downloads
|
|
24
24
|
from llmstack.paths import is_remote, remote_url
|
|
@@ -86,16 +86,25 @@ def run(args: list[str]) -> int:
|
|
|
86
86
|
rc_hint = "your shell rc file"
|
|
87
87
|
hook_arg = None
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
activate_line: str | None = None
|
|
90
90
|
if hook_arg is not None:
|
|
91
91
|
path, _src = write_hook(hook_arg)
|
|
92
|
-
|
|
92
|
+
activate_line = eval_line(hook_arg)
|
|
93
93
|
print(f"[OK] hook installed: {path}")
|
|
94
94
|
print()
|
|
95
95
|
print("To turn it on in this shell now (and persist across new shells, paste")
|
|
96
96
|
print(f"the same line into {rc_hint}):")
|
|
97
97
|
print()
|
|
98
|
-
print(f" {
|
|
98
|
+
print(f" {activate_line}")
|
|
99
|
+
if family == "powershell":
|
|
100
|
+
# PowerShell needs script execution allowed before
|
|
101
|
+
# dot-sourcing the .ps1; flag the one-time fix here so the
|
|
102
|
+
# Invoke-Expression line above doesn't silently fail.
|
|
103
|
+
print()
|
|
104
|
+
print(" PowerShell execution policy must allow local scripts;")
|
|
105
|
+
print(" if dot-sourcing fails with \"running scripts is disabled\", run once:")
|
|
106
|
+
print()
|
|
107
|
+
print(" Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned")
|
|
99
108
|
|
|
100
109
|
print()
|
|
101
110
|
print("[5/5] checking opencode...")
|
|
@@ -134,8 +143,8 @@ def run(args: list[str]) -> int:
|
|
|
134
143
|
print("[OK] setup complete.")
|
|
135
144
|
print()
|
|
136
145
|
print("Next steps:")
|
|
137
|
-
if
|
|
138
|
-
print(f" 1. Run (and paste into {rc_hint} for persistence): {
|
|
146
|
+
if activate_line is not None:
|
|
147
|
+
print(f" 1. Run (and paste into {rc_hint} for persistence): {activate_line}")
|
|
139
148
|
else:
|
|
140
149
|
print(" 1. Source the generated hook in your shell rc (see above)")
|
|
141
150
|
print(" 2. llmstack install # generate .llmstack/ configs for this project")
|
llmstack/shell_env.py
CHANGED
|
@@ -261,14 +261,15 @@ _ZSH_HOOK = r"""# --- llmstack auto-activation hook (zsh) ----------------------
|
|
|
261
261
|
#
|
|
262
262
|
# Tool-availability gate: before activating, we verify the tools needed
|
|
263
263
|
# for this channel are present:
|
|
264
|
-
# - `llmstack`
|
|
265
|
-
# - `llama-swap`
|
|
266
|
-
# - `llama-server`
|
|
267
|
-
#
|
|
268
|
-
#
|
|
269
|
-
#
|
|
270
|
-
#
|
|
271
|
-
#
|
|
264
|
+
# - `llmstack` (always required -- blocker)
|
|
265
|
+
# - `llama-swap` (only for local channels: current / next -- blocker)
|
|
266
|
+
# - `llama-server` / `llama-cli` (local-only, *warning* not blocker --
|
|
267
|
+
# a Bedrock-only models.ini activates fine without llama-server;
|
|
268
|
+
# local GGUF rows would fail to start, hence the heads-up)
|
|
269
|
+
# external-mode projects skip all local-tool checks because llama-swap
|
|
270
|
+
# and llama-server live on the remote. Blockers print "folder detected
|
|
271
|
+
# but tool not available" + install hints and skip activation; warnings
|
|
272
|
+
# print a one-shot hint and activate anyway.
|
|
272
273
|
#
|
|
273
274
|
# Marker file format (one line):
|
|
274
275
|
# <channel>[ <url>]
|
|
@@ -322,13 +323,18 @@ _llmstack_find_swap() {
|
|
|
322
323
|
}
|
|
323
324
|
|
|
324
325
|
_llmstack_check_tools() {
|
|
325
|
-
# Populates _llmstack_missing
|
|
326
|
+
# Populates _llmstack_missing (blockers) and _llmstack_warnings
|
|
327
|
+
# (non-blockers). Returns 0 iff there are no blockers; warnings
|
|
328
|
+
# never block activation.
|
|
326
329
|
_llmstack_missing=()
|
|
330
|
+
_llmstack_warnings=()
|
|
327
331
|
command -v llmstack >/dev/null 2>&1 || _llmstack_missing+=("llmstack")
|
|
328
332
|
if [[ "${1:-current}" != "external" ]]; then
|
|
329
333
|
_llmstack_find_swap || _llmstack_missing+=("llama-swap")
|
|
334
|
+
# llama-server is a soft requirement: bedrock-only models.ini
|
|
335
|
+
# files don't need it, so missing == warn-and-continue.
|
|
330
336
|
if ! command -v llama-server >/dev/null 2>&1 && ! command -v llama-cli >/dev/null 2>&1; then
|
|
331
|
-
|
|
337
|
+
_llmstack_warnings+=("llama-server")
|
|
332
338
|
fi
|
|
333
339
|
fi
|
|
334
340
|
(( ${#_llmstack_missing[@]} == 0 ))
|
|
@@ -343,7 +349,7 @@ _llmstack_install_hint() {
|
|
|
343
349
|
}
|
|
344
350
|
|
|
345
351
|
_llmstack_warn_missing() {
|
|
346
|
-
# $1 = project root; uses _llmstack_missing.
|
|
352
|
+
# $1 = project root; uses _llmstack_missing (blockers only).
|
|
347
353
|
print -r -- ""
|
|
348
354
|
print -P -- "%F{220}[llmstack]%f detected $1/.llmstack but missing local tool(s):"
|
|
349
355
|
local t
|
|
@@ -354,6 +360,19 @@ _llmstack_warn_missing() {
|
|
|
354
360
|
print -r -- ""
|
|
355
361
|
}
|
|
356
362
|
|
|
363
|
+
_llmstack_warn_optional() {
|
|
364
|
+
# $1 = project root; uses _llmstack_warnings. One-shot per activation
|
|
365
|
+
# (the LLMSTACK_WORK_DIR idempotency guard suppresses repeats).
|
|
366
|
+
print -r -- ""
|
|
367
|
+
print -P -- "%F{220}[llmstack]%f $1: activating without optional local tool(s):"
|
|
368
|
+
local t
|
|
369
|
+
for t in "${_llmstack_warnings[@]}"; do
|
|
370
|
+
_llmstack_install_hint "$t"
|
|
371
|
+
done
|
|
372
|
+
print -r -- " bedrock-only models.ini works fine; local GGUF rows will fail to start."
|
|
373
|
+
print -r -- ""
|
|
374
|
+
}
|
|
375
|
+
|
|
357
376
|
_llmstack_deactivate() {
|
|
358
377
|
if [[ -n "${LLMSTACK_WORK_DIR:-}" ]]; then
|
|
359
378
|
unset OPENCODE_CONFIG LLMSTACK_WORK_DIR LLMSTACK_ACTIVE LLMSTACK_CHANNEL LLMSTACK_REMOTE_URL
|
|
@@ -393,12 +412,17 @@ _llmstack_activate() {
|
|
|
393
412
|
fi
|
|
394
413
|
: "${_ch:=current}"
|
|
395
414
|
|
|
396
|
-
# Tool gate -- bail before exporting anything if
|
|
415
|
+
# Tool gate -- bail before exporting anything if a *blocker* is
|
|
416
|
+
# missing. Non-blocking warnings (e.g. llama-server for a
|
|
417
|
+
# bedrock-only setup) print a hint but proceed.
|
|
397
418
|
if ! _llmstack_check_tools "$_ch"; then
|
|
398
419
|
_llmstack_warn_missing "$found"
|
|
399
420
|
export _LLMSTACK_WARNED_FOR="$found"
|
|
400
421
|
return 0
|
|
401
422
|
fi
|
|
423
|
+
if (( ${#_llmstack_warnings[@]} > 0 )); then
|
|
424
|
+
_llmstack_warn_optional "$found"
|
|
425
|
+
fi
|
|
402
426
|
|
|
403
427
|
export OPENCODE_CONFIG="$found/.llmstack/opencode.json"
|
|
404
428
|
export LLMSTACK_WORK_DIR="$found"
|
|
@@ -441,14 +465,15 @@ _BASH_HOOK = r"""# --- llmstack auto-activation hook (bash) --------------------
|
|
|
441
465
|
#
|
|
442
466
|
# Tool-availability gate: before activating we verify the tools needed
|
|
443
467
|
# for this channel are present:
|
|
444
|
-
# - `llmstack`
|
|
445
|
-
# - `llama-swap`
|
|
446
|
-
# - `llama-server`
|
|
447
|
-
#
|
|
448
|
-
#
|
|
449
|
-
#
|
|
450
|
-
#
|
|
451
|
-
#
|
|
468
|
+
# - `llmstack` (always required -- blocker)
|
|
469
|
+
# - `llama-swap` (only for local channels: current / next -- blocker)
|
|
470
|
+
# - `llama-server` / `llama-cli` (local-only, *warning* not blocker --
|
|
471
|
+
# a Bedrock-only models.ini activates fine without llama-server;
|
|
472
|
+
# local GGUF rows would fail to start, hence the heads-up)
|
|
473
|
+
# Blockers print a one-shot "folder detected but tool not available"
|
|
474
|
+
# warning + install hints and DON'T activate (env stays clean). Warnings
|
|
475
|
+
# print a hint and activate anyway. The _LLMSTACK_WARNED_FOR guard
|
|
476
|
+
# suppresses repeat warnings on subsequent PROMPT_COMMAND ticks.
|
|
452
477
|
#
|
|
453
478
|
# Marker file format (one line):
|
|
454
479
|
# <channel>[ <url>]
|
|
@@ -501,12 +526,17 @@ _llmstack_find_swap() {
|
|
|
501
526
|
}
|
|
502
527
|
|
|
503
528
|
_llmstack_check_tools() {
|
|
529
|
+
# Populates _llmstack_missing (blockers) and _llmstack_warnings
|
|
530
|
+
# (non-blockers). Returns 0 iff there are no blockers.
|
|
504
531
|
_llmstack_missing=()
|
|
532
|
+
_llmstack_warnings=()
|
|
505
533
|
command -v llmstack >/dev/null 2>&1 || _llmstack_missing+=("llmstack")
|
|
506
534
|
if [[ "${1:-current}" != "external" ]]; then
|
|
507
535
|
_llmstack_find_swap || _llmstack_missing+=("llama-swap")
|
|
536
|
+
# llama-server is a soft requirement: bedrock-only models.ini
|
|
537
|
+
# files don't need it, so missing == warn-and-continue.
|
|
508
538
|
if ! command -v llama-server >/dev/null 2>&1 && ! command -v llama-cli >/dev/null 2>&1; then
|
|
509
|
-
|
|
539
|
+
_llmstack_warnings+=("llama-server")
|
|
510
540
|
fi
|
|
511
541
|
fi
|
|
512
542
|
[[ ${#_llmstack_missing[@]} -eq 0 ]]
|
|
@@ -530,6 +560,18 @@ _llmstack_warn_missing() {
|
|
|
530
560
|
printf ' not activating. install the missing tool(s) and `cd` back in to retry.\n\n'
|
|
531
561
|
}
|
|
532
562
|
|
|
563
|
+
_llmstack_warn_optional() {
|
|
564
|
+
# $1 = project root; uses _llmstack_warnings. One-shot per
|
|
565
|
+
# activation thanks to LLMSTACK_WORK_DIR idempotency.
|
|
566
|
+
printf '\n'
|
|
567
|
+
printf '\033[38;5;220m[llmstack]\033[0m %s: activating without optional local tool(s):\n' "$1"
|
|
568
|
+
local t
|
|
569
|
+
for t in "${_llmstack_warnings[@]}"; do
|
|
570
|
+
_llmstack_install_hint "$t"
|
|
571
|
+
done
|
|
572
|
+
printf ' bedrock-only models.ini works fine; local GGUF rows will fail to start.\n\n'
|
|
573
|
+
}
|
|
574
|
+
|
|
533
575
|
_llmstack_deactivate() {
|
|
534
576
|
if [[ -n "${LLMSTACK_WORK_DIR:-}" ]]; then
|
|
535
577
|
unset OPENCODE_CONFIG LLMSTACK_WORK_DIR LLMSTACK_ACTIVE LLMSTACK_CHANNEL LLMSTACK_REMOTE_URL
|
|
@@ -565,11 +607,16 @@ _llmstack_activate() {
|
|
|
565
607
|
fi
|
|
566
608
|
: "${_ch:=current}"
|
|
567
609
|
|
|
610
|
+
# Blockers only -- non-blocking warnings (e.g. llama-server for a
|
|
611
|
+
# bedrock-only setup) print a hint but don't skip activation.
|
|
568
612
|
if ! _llmstack_check_tools "$_ch"; then
|
|
569
613
|
_llmstack_warn_missing "$found"
|
|
570
614
|
export _LLMSTACK_WARNED_FOR="$found"
|
|
571
615
|
return 0
|
|
572
616
|
fi
|
|
617
|
+
if [[ ${#_llmstack_warnings[@]} -gt 0 ]]; then
|
|
618
|
+
_llmstack_warn_optional "$found"
|
|
619
|
+
fi
|
|
573
620
|
|
|
574
621
|
export OPENCODE_CONFIG="$found/.llmstack/opencode.json"
|
|
575
622
|
export LLMSTACK_WORK_DIR="$found"
|
|
@@ -618,12 +665,25 @@ _POWERSHELL_HOOK = r"""# --- llmstack auto-activation hook (PowerShell) --------
|
|
|
618
665
|
#
|
|
619
666
|
# Tool-availability gate: before activating we verify the tools needed
|
|
620
667
|
# for this channel are present:
|
|
621
|
-
# - llmstack
|
|
622
|
-
# - llama-swap (only for local channels: current / next)
|
|
623
|
-
# - llama-server
|
|
624
|
-
#
|
|
625
|
-
#
|
|
626
|
-
#
|
|
668
|
+
# - llmstack (always required -- blocker)
|
|
669
|
+
# - llama-swap (only for local channels: current / next -- blocker)
|
|
670
|
+
# - llama-server / llama-cli (local-only, *warning* not blocker --
|
|
671
|
+
# a Bedrock-only models.ini activates fine without llama-server;
|
|
672
|
+
# local GGUF rows would fail to start, hence the heads-up)
|
|
673
|
+
# Blockers print a one-shot warning + install hints and DON'T activate.
|
|
674
|
+
# Warnings print a hint and activate anyway. The _LLMSTACK_WARNED_FOR
|
|
675
|
+
# guard suppresses repeats on subsequent prompts in the same project.
|
|
676
|
+
#
|
|
677
|
+
# Note: this hook file MUST be saved with a `.ps1` extension or
|
|
678
|
+
# PowerShell won't dot-source it (it'll try to open the file via the
|
|
679
|
+
# Windows shell file-association instead). `llmstack activate
|
|
680
|
+
# powershell` writes ~/.powershell_llmstack_hook.ps1 for that reason.
|
|
681
|
+
#
|
|
682
|
+
# Note: PowerShell's default execution policy on Windows (`Restricted`)
|
|
683
|
+
# blocks loading any .ps1 from disk. If you see "running scripts is
|
|
684
|
+
# disabled on this system", allow signed local scripts once with:
|
|
685
|
+
# Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
|
|
686
|
+
# (or `-ExecutionPolicy Bypass` for an even looser policy).
|
|
627
687
|
#
|
|
628
688
|
# Add to your $PROFILE (one time):
|
|
629
689
|
# llmstack activate powershell | Out-String | Invoke-Expression
|
|
@@ -691,16 +751,20 @@ function global:_LlmstackFindSwap {
|
|
|
691
751
|
|
|
692
752
|
function global:_LlmstackCheckTools {
|
|
693
753
|
param([string]$Channel)
|
|
694
|
-
|
|
754
|
+
# Returns @{ missing = <blockers>; warnings = <non-blockers> }.
|
|
755
|
+
$missing = @()
|
|
756
|
+
$warnings = @()
|
|
695
757
|
if (-not (Get-Command llmstack -ErrorAction SilentlyContinue)) { $missing += "llmstack" }
|
|
696
758
|
if ($Channel -ne "external") {
|
|
697
759
|
if (-not (_LlmstackFindSwap)) { $missing += "llama-swap" }
|
|
760
|
+
# llama-server is a soft requirement: bedrock-only models.ini
|
|
761
|
+
# files don't need it, so missing == warn-and-continue.
|
|
698
762
|
if (-not (Get-Command llama-server -ErrorAction SilentlyContinue) -and `
|
|
699
763
|
-not (Get-Command llama-cli -ErrorAction SilentlyContinue)) {
|
|
700
|
-
$
|
|
764
|
+
$warnings += "llama-server"
|
|
701
765
|
}
|
|
702
766
|
}
|
|
703
|
-
return ,$missing
|
|
767
|
+
return @{ missing = ,$missing; warnings = ,$warnings }
|
|
704
768
|
}
|
|
705
769
|
|
|
706
770
|
function global:_LlmstackInstallHint {
|
|
@@ -723,6 +787,20 @@ function global:_LlmstackWarnMissing {
|
|
|
723
787
|
Write-Host ""
|
|
724
788
|
}
|
|
725
789
|
|
|
790
|
+
function global:_LlmstackWarnOptional {
|
|
791
|
+
# Non-blocking: tool isn't on PATH but a bedrock-only models.ini
|
|
792
|
+
# would still work. One-shot per activation thanks to the
|
|
793
|
+
# LLMSTACK_WORK_DIR idempotency guard.
|
|
794
|
+
param([string]$Found, [string[]]$Warnings)
|
|
795
|
+
Write-Host ""
|
|
796
|
+
$esc = [char]27
|
|
797
|
+
Write-Host -NoNewline "${esc}[38;5;220m[llmstack]${esc}[0m "
|
|
798
|
+
Write-Host "${Found}: activating without optional local tool(s):"
|
|
799
|
+
foreach ($t in $Warnings) { Write-Host (_LlmstackInstallHint $t) }
|
|
800
|
+
Write-Host " bedrock-only models.ini works fine; local GGUF rows will fail to start."
|
|
801
|
+
Write-Host ""
|
|
802
|
+
}
|
|
803
|
+
|
|
726
804
|
function global:_LlmstackDeactivate {
|
|
727
805
|
if ($env:LLMSTACK_WORK_DIR) {
|
|
728
806
|
Remove-Item Env:OPENCODE_CONFIG -ErrorAction SilentlyContinue
|
|
@@ -751,12 +829,15 @@ function global:_LlmstackActivate {
|
|
|
751
829
|
$marker = if (Test-Path -LiteralPath $live) { _LlmstackReadMarker $live } else { _LlmstackReadMarker $intent }
|
|
752
830
|
$channel = if ($marker.channel) { $marker.channel } else { "current" }
|
|
753
831
|
|
|
754
|
-
$
|
|
755
|
-
if ($missing.Count -gt 0) {
|
|
756
|
-
_LlmstackWarnMissing $found $missing
|
|
832
|
+
$tools = _LlmstackCheckTools $channel
|
|
833
|
+
if ($tools.missing.Count -gt 0) {
|
|
834
|
+
_LlmstackWarnMissing $found $tools.missing
|
|
757
835
|
$env:_LLMSTACK_WARNED_FOR = $found
|
|
758
836
|
return
|
|
759
837
|
}
|
|
838
|
+
if ($tools.warnings.Count -gt 0) {
|
|
839
|
+
_LlmstackWarnOptional $found $tools.warnings
|
|
840
|
+
}
|
|
760
841
|
|
|
761
842
|
$env:OPENCODE_CONFIG = Join-Path $found ".llmstack/opencode.json"
|
|
762
843
|
$env:LLMSTACK_WORK_DIR = $found
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: opencode-llmstack
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.2
|
|
4
4
|
Summary: Multi-tier local LLM stack: llama-swap + FastAPI auto-router + opencode wiring.
|
|
5
5
|
Author: llmstack
|
|
6
6
|
License: MIT
|
|
@@ -313,10 +313,15 @@ py -3 -m venv .venv
|
|
|
313
313
|
# `start` falls back to spawning a PowerShell subshell.
|
|
314
314
|
.venv\Scripts\llmstack start
|
|
315
315
|
|
|
316
|
-
# 4. Auto-activate per project from any new PowerShell window
|
|
317
|
-
|
|
318
|
-
#
|
|
319
|
-
|
|
316
|
+
# 4. Auto-activate per project from any new PowerShell window. The hook
|
|
317
|
+
# file is a .ps1 (PowerShell won't dot-source it without that
|
|
318
|
+
# extension) and dot-sourcing it requires script execution to be
|
|
319
|
+
# allowed -- if you see "running scripts is disabled on this
|
|
320
|
+
# system", run once:
|
|
321
|
+
# Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
|
|
322
|
+
llmstack activate powershell | Out-String | Invoke-Expression
|
|
323
|
+
# or persist (writes ~/.powershell_llmstack_hook.ps1 + sources it on every shell):
|
|
324
|
+
"llmstack activate powershell | Out-String | Invoke-Expression" | Add-Content $PROFILE
|
|
320
325
|
```
|
|
321
326
|
|
|
322
327
|
Notes:
|
|
@@ -7,20 +7,20 @@ llmstack/check_models.py,sha256=WvTS2Td4acp-Q0-yWXUgXAgAgFOmpxiaeSDuAoivirw,4559
|
|
|
7
7
|
llmstack/cli.py,sha256=Om70PzHrmU81y2Mw1sB6eeUs1fRHP0PnsCEVNC0UNvI,11341
|
|
8
8
|
llmstack/models.ini,sha256=seGda3LWEREWBHnyVCv8f07XBtjkWFK9iBbKhu5yAl0,15351
|
|
9
9
|
llmstack/paths.py,sha256=A8q4-tpwIt5UMGG5ZDESKSuViMGLbPIAL1VoONopJqU,11512
|
|
10
|
-
llmstack/shell_env.py,sha256=
|
|
10
|
+
llmstack/shell_env.py,sha256=MJSW0PP15q-fsppIZ98WZ7XoqYMZmDy4k8N0gzEA6wU,39362
|
|
11
11
|
llmstack/tiers.py,sha256=et738dWftsc74ZElZ3Vt9eEF_SzgJCDuH9kBhzH-scI,14697
|
|
12
12
|
llmstack/backends/__init__.py,sha256=-85sQz0R94OdbM2bUHGyyA5WaMnI9bHywPOaELeQHX0,777
|
|
13
13
|
llmstack/backends/bedrock.py,sha256=_UFBWR7R2Q4BPAsskXemjgPnu0dyJLSXel86smo9mSc,30015
|
|
14
14
|
llmstack/commands/__init__.py,sha256=eVO-YUxh1fSfdq72KggC-NrTYMtN6zIykgjyRgOCAt4,406
|
|
15
15
|
llmstack/commands/_helpers.py,sha256=UKADaNXrnuoDi_JG0W2Tph7rWFB0cXvQh8YknZBw56I,2660
|
|
16
|
-
llmstack/commands/activate.py,sha256=
|
|
16
|
+
llmstack/commands/activate.py,sha256=zCdEmyVv5qZUdhfez6hZ5Y46N_yjPwfKbPTwCJXnA3o,3663
|
|
17
17
|
llmstack/commands/check.py,sha256=5fKJdZauURNqxpZ7d2YcoVjjsustNanxjca8XbLj2_Q,356
|
|
18
18
|
llmstack/commands/download.py,sha256=_bBi9I8HZJjE62W3gVBGe8hDAYWnHnhRUyw4DQHZmeQ,755
|
|
19
19
|
llmstack/commands/install.py,sha256=J06Em9GWx9EriPDatmNqBaBmf3U50LqjwhMs1gwHrF8,14131
|
|
20
20
|
llmstack/commands/install_llama_swap.py,sha256=c6iedl-DjnOc7jMVzy_M0aIWSgygzAgYUqbcycobBqw,1097
|
|
21
21
|
llmstack/commands/reload.py,sha256=Z7ceZQX2fkHpZiWxov8YwidR72Xw0-qMFFV_RRXpkwI,2016
|
|
22
22
|
llmstack/commands/restart.py,sha256=Bp6lSAnLhR2Nd7eA5BlD9J_TeGlzRfWS_Z3DdxP-eq4,294
|
|
23
|
-
llmstack/commands/setup.py,sha256=
|
|
23
|
+
llmstack/commands/setup.py,sha256=ZBPXas7jswfYL6IwAJhReR0BVGn4LWaf-0ZhR8lQG6I,5381
|
|
24
24
|
llmstack/commands/start.py,sha256=V9BDZeCQS_NL2bJmJANHVE2J1rqoYBUDYcjK9O_PNYM,15693
|
|
25
25
|
llmstack/commands/status.py,sha256=TOHoDSyu04lZtepJH4bFmIk694RyaUYeFMpUejyUPe0,10403
|
|
26
26
|
llmstack/commands/stop.py,sha256=vntZ1n8wpY9zgix1xGHDNJqEacaUpw9haSKgOnMg73k,2474
|
|
@@ -30,8 +30,8 @@ llmstack/download/ggufs.py,sha256=2hCr-svUiPIV2I3ruwTbXo6lPn9m-VBOqa3DFbvdIcA,54
|
|
|
30
30
|
llmstack/generators/__init__.py,sha256=LfbcReuyYBCdVuT9J5RKo7-f8n585YBU3Hus6DsxqTs,1189
|
|
31
31
|
llmstack/generators/llama_swap.py,sha256=KdYH9N6TJECotZvyxvAjaa3kRyzn4YOi2T6D2UdyVKw,14785
|
|
32
32
|
llmstack/generators/opencode.py,sha256=If7opOQyMWSSbHTj7M9dndsA3BmskSTUsTggMKV0VWM,10669
|
|
33
|
-
opencode_llmstack-0.7.
|
|
34
|
-
opencode_llmstack-0.7.
|
|
35
|
-
opencode_llmstack-0.7.
|
|
36
|
-
opencode_llmstack-0.7.
|
|
37
|
-
opencode_llmstack-0.7.
|
|
33
|
+
opencode_llmstack-0.7.2.dist-info/METADATA,sha256=Uxw4Ln5LWGpBnBuejQfZM0K18JCYuHiez0hN1J-NgkM,34815
|
|
34
|
+
opencode_llmstack-0.7.2.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
35
|
+
opencode_llmstack-0.7.2.dist-info/entry_points.txt,sha256=soomjpqvl4KzFScgpQbu96vgcLriOtkB9MbiSC0rvZ8,47
|
|
36
|
+
opencode_llmstack-0.7.2.dist-info/top_level.txt,sha256=tMv9sDWp8RW_DNNY8cuM4Uy4sND-KwTLcsScl5gdcEQ,9
|
|
37
|
+
opencode_llmstack-0.7.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|