Skip to content

Commit 3a73eae

Browse files
committed
Update windows setup
1 parent 744e36a commit 3a73eae

12 files changed

Lines changed: 323 additions & 62 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ python3 agents/agent_creator/agent.py --update agents/<your_workflow>
8383
| Flag | Default | Description |
8484
|------|---------|-------------|
8585
| `--streaming-url URL` | *(required)* | AppStream streaming URL for the desktop session |
86-
| `--model-id ID` | `us.anthropic.claude-sonnet-4-6` | Bedrock model ID |
86+
| `--model-id ID` | `global.anthropic.claude-sonnet-4-6` | Bedrock model ID |
8787
| `--no-computer-use-tool` | off | Disable Claude's computer-use training optimizations |
8888
| `--mcp-timeout SECS` | `180` | MCP client startup timeout |
8989
| `--mcp-retries N` | `3` | Number of MCP connection retries |

THIRD_PARTY_LICENSES

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5920,3 +5920,103 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTI
59205920
USE OR OTHER DEALINGS IN THE SOFTWARE.
59215921

59225922

5923+
5924+
colorama
5925+
0.4.6
5926+
BSD-3-Clause
5927+
BSD 3-Clause License
5928+
5929+
Copyright (c) 2010 Jonathan Hartley
5930+
All rights reserved.
5931+
5932+
Redistribution and use in source and binary forms, with or without
5933+
modification, are permitted provided that the following conditions are met:
5934+
5935+
* Redistributions of source code must retain the above copyright notice, this
5936+
list of conditions and the following disclaimer.
5937+
5938+
* Redistributions in binary form must reproduce the above copyright notice,
5939+
this list of conditions and the following disclaimer in the documentation
5940+
and/or other materials provided with the distribution.
5941+
5942+
* Neither the name of the copyright holders, nor those of its contributors
5943+
may be used to endorse or promote products derived from this software without
5944+
specific prior written permission.
5945+
5946+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
5947+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5948+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5949+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
5950+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5951+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
5952+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5953+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
5954+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5955+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5956+
5957+
5958+
pywin32
5959+
311
5960+
PSF-2.0
5961+
Unless stated in the specific source file, this work is
5962+
Copyright (c) 1994-2008, Mark Hammond
5963+
All rights reserved.
5964+
5965+
Redistribution and use in source and binary forms, with or without
5966+
modification, are permitted provided that the following conditions are met:
5967+
5968+
Redistributions of source code must retain the above copyright
5969+
notice, this list of conditions and the following disclaimer.
5970+
5971+
Redistributions in binary form must reproduce the above copyright
5972+
notice, this list of conditions and the following disclaimer in
5973+
the documentation and/or other materials provided with the distribution.
5974+
5975+
Neither name of Mark Hammond nor the name of contributors may be used
5976+
to endorse or promote products derived from this software without
5977+
specific prior written permission.
5978+
5979+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5980+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5981+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
5982+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
5983+
REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
5984+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
5985+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
5986+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
5987+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
5988+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5989+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5990+
5991+
5992+
pywin32-ctypes
5993+
0.2.3
5994+
BSD-3-Clause
5995+
Copyright (c) 2014, Enthought, Inc.
5996+
All rights reserved.
5997+
5998+
Redistribution and use in source and binary forms, with or without
5999+
modification, are permitted provided that the following conditions are met:
6000+
6001+
* Redistributions of source code must retain the above copyright notice, this
6002+
list of conditions and the following disclaimer.
6003+
6004+
* Redistributions in binary form must reproduce the above copyright notice,
6005+
this list of conditions and the following disclaimer in the documentation
6006+
and/or other materials provided with the distribution.
6007+
6008+
* Neither the name of Enthought, Inc. nor the names of its contributors may be
6009+
used to endorse or promote products derived from this software without
6010+
specific prior written permission.
6011+
6012+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
6013+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
6014+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
6015+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
6016+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
6017+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
6018+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
6019+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
6020+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
6021+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6022+

agents/agent_creator/agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,8 @@ def progress_handler(**kwargs):
490490

491491
def main():
492492
parser = argparse.ArgumentParser(description='Workspace Agent Creator')
493-
parser.add_argument('--model-id', default='us.anthropic.claude-sonnet-4-6',
494-
help='Bedrock model ID (default: us.anthropic.claude-sonnet-4-6)')
493+
parser.add_argument('--model-id', default='global.anthropic.claude-sonnet-4-6',
494+
help='Bedrock model ID (default: global.anthropic.claude-sonnet-4-6)')
495495
parser.add_argument('--no-prompt', action='store_true',
496496
help='Skip interview and read from stdin as JSON')
497497
parser.add_argument('--update', metavar='AGENT_DIR',

agents/generic_cua/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ python3 agents/generic_cua/agent.py --streaming-url "<STREAMING_URL>" \
2424

2525
# With a specific model and region
2626
python3 agents/generic_cua/agent.py --streaming-url "<STREAMING_URL>" \
27-
--model-id us.anthropic.claude-sonnet-4-6 \
27+
--model-id global.anthropic.claude-sonnet-4-6 \
2828
--region us-east-1
2929
```
3030

@@ -36,7 +36,7 @@ python3 agents/generic_cua/agent.py --streaming-url "<STREAMING_URL>" \
3636
| `--system-prompt` | No | `prompts/system_prompt.md` | Path to a custom system prompt markdown file |
3737
| `--task-prompt` | No | None | Path to a task prompt file; triggers single-shot mode |
3838
| `--skill` | No | None | Path to a skill JSON file to append to the system prompt |
39-
| `--model-id` | No | `us.anthropic.claude-sonnet-4-6` | Bedrock model ID |
39+
| `--model-id` | No | `global.anthropic.claude-sonnet-4-6` | Bedrock model ID |
4040
| `--region` | No | `us-west-2` | AWS region for Bedrock |
4141
| `--no-computer-use-tool` | No | off | Disable Claude's computer-use training optimizations |
4242
| `--mcp-timeout` | No | `180` | MCP client startup timeout in seconds |

lib/agent_common.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ def create_base_parser(description):
128128
parser = argparse.ArgumentParser(description=description)
129129
parser.add_argument('--streaming-url',
130130
help='AppStream streaming URL for the desktop session')
131-
parser.add_argument('--model-id', default='us.anthropic.claude-sonnet-4-6',
132-
help='Bedrock model ID (default: us.anthropic.claude-sonnet-4-6)')
131+
parser.add_argument('--model-id', default='global.anthropic.claude-sonnet-4-6',
132+
help='Bedrock model ID (default: global.anthropic.claude-sonnet-4-6)')
133133
parser.add_argument('--mcp-timeout', type=int, default=180,
134134
help='MCP client startup timeout in seconds (default: 180)')
135135
parser.add_argument('--mcp-retries', type=int, default=3,
@@ -184,10 +184,10 @@ def resolve_streaming_url(parser, args):
184184
# work out of the box, but reject anything unexpected so a caller-supplied
185185
# `model_id` can't steer the agent toward an unreviewed model or region.
186186
ALLOWED_MODELS = frozenset({
187-
"us.anthropic.claude-sonnet-4-6",
188-
"us.anthropic.claude-sonnet-4-5",
189-
"us.anthropic.claude-opus-4-6",
190-
"us.anthropic.claude-opus-4-7",
187+
"global.anthropic.claude-sonnet-4-6",
188+
"global.anthropic.claude-sonnet-4-5",
189+
"global.anthropic.claude-opus-4-6",
190+
"global.anthropic.claude-opus-4-7",
191191
})
192192
ALLOWED_REGIONS = frozenset({
193193
# Americas

requirements.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,10 @@ click==8.3.3 \
218218
--hash=sha256:398329ad4837b2ff7cbe1dd166a4c0f8900c3ca3a218de04466f38f6497f18a2 \
219219
--hash=sha256:a2bf429bb3033c89fa4936ffb35d5cb471e3719e1f3c8a7c3fff0b8314305613
220220
# via uvicorn
221+
colorama==0.4.6 ; sys_platform == "win32" \
222+
--hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
223+
--hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
224+
# via click
221225
cryptography==46.0.7 \
222226
--hash=sha256:04959522f938493042d595a736e7dbdff6eb6cc2339c11465b3ff89343b65f65 \
223227
--hash=sha256:128c5edfe5e5938b86b03941e94fac9ee793a94452ad1365c9fc3f4f62216832 \
@@ -614,6 +618,32 @@ pyperclip==1.11.0 \
614618
--hash=sha256:244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6 \
615619
--hash=sha256:299403e9ff44581cb9ba2ffeed69c7aa96a008622ad0c46cb575ca75b5b84273
616620
# via fastmcp
621+
pywin32==311 ; sys_platform == "win32" \
622+
--hash=sha256:0502d1facf1fed4839a9a51ccbcc63d952cf318f78ffc00a7e78528ac27d7a2b \
623+
--hash=sha256:184eb5e436dea364dcd3d2316d577d625c0351bf237c4e9a5fabbcfa5a58b151 \
624+
--hash=sha256:3aca44c046bd2ed8c90de9cb8427f581c479e594e99b5c0bb19b29c10fd6cb87 \
625+
--hash=sha256:3ce80b34b22b17ccbd937a6e78e7225d80c52f5ab9940fe0506a1a16f3dab503 \
626+
--hash=sha256:62ea666235135fee79bb154e695f3ff67370afefd71bd7fea7512fc70ef31e3d \
627+
--hash=sha256:6c6f2969607b5023b0d9ce2541f8d2cbb01c4f46bc87456017cf63b73f1e2d8c \
628+
--hash=sha256:718a38f7e5b058e76aee1c56ddd06908116d35147e133427e59a3983f703a20d \
629+
--hash=sha256:750ec6e621af2b948540032557b10a2d43b0cee2ae9758c54154d711cc852d31 \
630+
--hash=sha256:797c2772017851984b97180b0bebe4b620bb86328e8a884bb626156295a63b3b \
631+
--hash=sha256:7b4075d959648406202d92a2310cb990fea19b535c7f4a78d3f5e10b926eeb8a \
632+
--hash=sha256:a508e2d9025764a8270f93111a970e1d0fbfc33f4153b388bb649b7eec4f9b42 \
633+
--hash=sha256:a733f1388e1a842abb67ffa8e7aad0e70ac519e09b0f6a784e65a136ec7cefd2 \
634+
--hash=sha256:aba8f82d551a942cb20d4a83413ccbac30790b50efb89a75e4f586ac0bb8056b \
635+
--hash=sha256:b7a2c10b93f8986666d0c803ee19b5990885872a7de910fc460f9b0c2fbf92ee \
636+
--hash=sha256:b8c095edad5c211ff31c05223658e71bf7116daa0ecf3ad85f3201ea3190d067 \
637+
--hash=sha256:c8015b09fb9a5e188f83b7b04de91ddca4658cee2ae6f3bc483f0b21a77ef6cd \
638+
--hash=sha256:d03ff496d2a0cd4a5893504789d4a15399133fe82517455e78bad62efbb7f0a3 \
639+
--hash=sha256:e0c4cfb0621281fe40387df582097fd796e80430597cb9944f0ae70447bacd91 \
640+
--hash=sha256:e286f46a9a39c4a18b319c28f59b61de793654af2f395c102b4f819e584b5852 \
641+
--hash=sha256:f95ba5a847cba10dd8c4d8fefa9f2a6cf283b8b88ed6178fa8a6c1ab16054d0d
642+
# via mcp
643+
pywin32-ctypes==0.2.3 ; sys_platform == "win32" \
644+
--hash=sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8 \
645+
--hash=sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755
646+
# via keyring
617647
python-dateutil==2.9.0.post0 \
618648
--hash=sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3 \
619649
--hash=sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427

scripts/analyze_prompts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# experimentation without editing the script.
2424
ANALYSIS_MODEL_ID = os.environ.get(
2525
"ANALYSIS_MODEL_ID",
26-
"us.anthropic.claude-sonnet-4-20250514-v1:0",
26+
"global.anthropic.claude-sonnet-4-6",
2727
)
2828

2929

scripts/deploy.sh

Lines changed: 63 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ set -euo pipefail
1313
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1414
CONFIG="$SCRIPT_DIR/config.json"
1515

16+
# Under MSYS/Cygwin (Git Bash), bash paths like /d/Users/... are not
17+
# understood by native Windows Python. Convert to a Windows path so
18+
# tools we invoke can actually open the file.
19+
if command -v cygpath &>/dev/null; then
20+
CONFIG="$(cygpath -w "$CONFIG")"
21+
fi
22+
1623
if [ ! -f "$CONFIG" ]; then
1724
echo "ERROR: config.json not found at $CONFIG" >&2
1825
exit 1
@@ -23,16 +30,46 @@ if ! command -v aws &>/dev/null; then
2330
exit 1
2431
fi
2532

26-
if ! command -v python3 &>/dev/null && ! command -v jq &>/dev/null; then
27-
echo "ERROR: Need either python3 or jq to parse config.json." >&2
33+
if ! command -v python3 &>/dev/null && ! command -v python &>/dev/null && ! command -v jq &>/dev/null; then
34+
echo "ERROR: Need python3, python, or jq to parse config.json." >&2
35+
exit 1
36+
fi
37+
38+
# Pick a usable Python: prefer python3, fall back to python (common on Windows
39+
# where the python.org installer only provides `python.exe`). We also skip
40+
# anything under WindowsApps since those are the Microsoft Store stubs that
41+
# print "Python was not found" to stderr instead of running.
42+
_find_python() {
43+
for c in python3 python; do
44+
local path
45+
path=$(command -v "$c" 2>/dev/null || true)
46+
[ -z "$path" ] && continue
47+
case "$path" in
48+
*WindowsApps*|*windowsapps*) continue ;;
49+
esac
50+
if "$c" -c 'import sys; sys.exit(0 if sys.version_info>=(3,8) else 1)' &>/dev/null; then
51+
echo "$c"
52+
return 0
53+
fi
54+
done
55+
return 1
56+
}
57+
PYTHON_BIN=$(_find_python || true)
58+
if [ -z "$PYTHON_BIN" ]; then
59+
echo "ERROR: No working Python 3.8+ found on PATH." >&2
60+
echo " If you are on Windows, install Python from https://www.python.org/" >&2
61+
echo " or disable the Microsoft Store 'python' alias under Settings >" >&2
62+
echo " Manage App Execution Aliases." >&2
2863
exit 1
2964
fi
3065

3166
# ── Helper: read config values ────────────────────────────────
67+
# We pass CONFIG through sys.argv (not interpolated into the Python source) so
68+
# paths with backslashes or special chars don't break the Python string literal.
3269
cfg() {
33-
python3 -c "
70+
"$PYTHON_BIN" -c "
3471
import json,re,sys
35-
raw=open('$CONFIG').read()
72+
raw=open(sys.argv[1]).read()
3673
raw=re.sub(r'(?m)^\s*//.*$','',raw)
3774
raw=re.sub(r',\s*//[^\n]*','',raw)
3875
d=json.loads(raw)
@@ -43,7 +80,7 @@ elif isinstance(v, bool):
4380
print(str(v))
4481
else:
4582
print(v)
46-
" 2>/dev/null || echo ""
83+
" "$CONFIG" 2>/dev/null || echo ""
4784
}
4885

4986
# ── Read config ───────────────────────────────────────────────
@@ -57,12 +94,12 @@ if [ "$USE_EXISTING" = "True" ]; then
5794
REGION="${ENV_REGION:-${CFG_REGION:-us-east-1}}"
5895
VPC_ID=$(cfg '["vpc"]["existing"]["vpcId"]')
5996
SUBNET_ID=$(cfg '["vpc"]["existing"]["subnetId"]')
60-
SG_IDS=$(python3 -c "
61-
import json
62-
cfg=json.load(open('$CONFIG'))
97+
SG_IDS=$("$PYTHON_BIN" -c "
98+
import json, sys
99+
cfg=json.load(open(sys.argv[1]))
63100
sgs=cfg['vpc']['existing'].get('securityGroupIds',[])
64101
print(sgs[0] if sgs else '')
65-
")
102+
" "$CONFIG")
66103
else
67104
CFG_REGION=$(cfg '["vpc"]["new"]["region"]')
68105
REGION="${ENV_REGION:-${CFG_REGION:-us-east-1}}"
@@ -345,10 +382,26 @@ if [ "$STACK_EXISTS" != "None" ] && [ -n "$STACK_EXISTS" ]; then
345382
else
346383
# AgentAccessConfig is not yet in the public AWS CLI, so we send a
347384
# SigV4-signed PhotonAdminProxyService.CreateStack request directly.
385+
# This requires botocore. Prefer a project venv Python if available
386+
# (install.sh/.ps1 put it there); otherwise fall back to $PYTHON_BIN.
387+
SIGV4_PYTHON="$PYTHON_BIN"
388+
_venv_python_unix="$SCRIPT_DIR/../venv/bin/python"
389+
_venv_python_win="$SCRIPT_DIR/../venv/Scripts/python.exe"
390+
if [ -x "$_venv_python_unix" ]; then
391+
SIGV4_PYTHON="$_venv_python_unix"
392+
elif [ -x "$_venv_python_win" ]; then
393+
SIGV4_PYTHON="$_venv_python_win"
394+
fi
395+
if ! "$SIGV4_PYTHON" -c 'import botocore' &>/dev/null; then
396+
echo "ERROR: botocore is not importable by $SIGV4_PYTHON." >&2
397+
echo " Run scripts/install.sh (or install.ps1) first to create the project venv." >&2
398+
exit 1
399+
fi
400+
348401
# We fail hard on any error: creating a stack without AgentAccessConfig
349402
# would silently break the Agent Access MCP flow at runtime.
350403
echo "Creating agent stack with AgentAccessConfig..."
351-
python3 -c "
404+
"$SIGV4_PYTHON" -c "
352405
import json, sys, urllib.request, urllib.error
353406
from botocore.auth import SigV4Auth
354407
from botocore.awsrequest import AWSRequest

scripts/deploy_agentcore.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ def _build_agent(body):
349349
except ValueError as e:
350350
raise ValueError(f"invalid endpoint/region: {e}") from e
351351
task_prompt_override = body.get("task_prompt") or body.get("prompt")
352-
model_id = body.get("model_id", "us.anthropic.claude-sonnet-4-6")
352+
model_id = body.get("model_id", "global.anthropic.claude-sonnet-4-6")
353353
354354
if not streaming_url:
355355
raise ValueError(
@@ -613,12 +613,14 @@ if [ -n "$EXEC_ROLE" ] && [ "$EXEC_ROLE" != "None" ]; then
613613

614614
# Scope Bedrock / AppStream / logs actions to the specific resources this
615615
# runtime needs. Operators should export these before running the deploy:
616-
# ALLOWED_MODEL_ARNS = "arn:aws:bedrock:...::foundation-model/us.anthropic.claude-sonnet-4-6,..."
616+
# ALLOWED_MODEL_ARNS = "arn:aws:bedrock:...::foundation-model/global.anthropic.claude-sonnet-4-6,..."
617617
# STACK_ARN = "arn:aws:appstream:us-west-2:123:stack/WorkspacesAgentDemo"
618618
# FLEET_ARN = "arn:aws:appstream:us-west-2:123:fleet/WorkspacesAgentDemo"
619619
# Defaults below are permissive to keep the demo working out of the box;
620-
# harden them before any production use.
621-
ALLOWED_MODEL_ARNS="${ALLOWED_MODEL_ARNS:-arn:aws:bedrock:*::foundation-model/us.anthropic.claude-*}"
620+
# harden them before any production use. We allow both the global.* and us.*
621+
# inference-profile prefixes plus the underlying foundation-model ARNs so
622+
# Bedrock can resolve the profile to a target model in any routed region.
623+
ALLOWED_MODEL_ARNS="${ALLOWED_MODEL_ARNS:-arn:aws:bedrock:*::foundation-model/anthropic.claude-*,arn:aws:bedrock:*:*:inference-profile/global.anthropic.claude-*,arn:aws:bedrock:*:*:inference-profile/us.anthropic.claude-*}"
622624
STACK_ARN="${STACK_ARN:-arn:aws:appstream:*:*:stack/*}"
623625
FLEET_ARN="${FLEET_ARN:-arn:aws:appstream:*:*:fleet/*}"
624626
LOG_GROUP_ARN="${LOG_GROUP_ARN:-arn:aws:logs:*:*:log-group:/aws/bedrock-agentcore/runtimes/*:*}"

scripts/install.ps1

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,16 @@ $PythonCmd = $null
2727
foreach ($candidate in @('python3.12', 'python3.11', 'python3.10', 'python3', 'python')) {
2828
$cmd = Get-Command $candidate -ErrorAction SilentlyContinue
2929
if ($cmd) {
30-
$versionOutput = & $candidate --version 2>&1
30+
# Skip Microsoft Store python stubs — they print "not found" to stderr.
31+
if ($cmd.Source -and $cmd.Source -match '\\WindowsApps\\') {
32+
continue
33+
}
34+
$versionOutput = ''
35+
try {
36+
$versionOutput = & $candidate --version 2>&1 | Out-String
37+
} catch {
38+
continue
39+
}
3140
if ($versionOutput -match 'Python\s+(\d+)\.(\d+)') {
3241
$major = [int]$Matches[1]
3342
$minor = [int]$Matches[2]
@@ -62,7 +71,9 @@ if (-not (Test-Path $VenvPython)) {
6271
}
6372

6473
& $VenvPython -m pip install --upgrade pip *> $null
65-
& $VenvPython -m pip install -r requirements.txt *> $null
74+
# Run pip with output visible so any failures (missing hashes, network, etc.)
75+
# surface to the user instead of being swallowed.
76+
& $VenvPython -m pip install -r requirements.txt
6677
if ($LASTEXITCODE -ne 0) { Write-Fail "Failed to install Python dependencies" }
6778
Write-Ok "Python dependencies installed"
6879

0 commit comments

Comments
 (0)