Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`add agent --type byo` ignores `--language TypeScript`

オープン 初心者向け
#2,075 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
86/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
cli

調査の方向性

src/cli/primitives/AgentPrimitive.tsx の handleByoPath から始め、ランタイムとエントリポイントの処理を、src/cli/operations/agent/generate/schema-mapper.ts の DEFAULT_RUNTIME_BY_LANGUAGE および DEFAULT_ENTRYPOINT_BY_LANGUAGE と比較します。BYO TypeScript agent が NODE_22 と main.js を記録し、既存の Other の動作を維持していることを確認してから、パッケージングで Python CodeZip パスが選択されなくなっていることを確認します。

索引モデルが issue の本文から書いたものです。

説明

bug
Description

agentcore add agent --type byo --language TypeScript registers the agent with "runtimeVersion": "PYTHON_3_14" in agentcore.json, ignoring --language. Packaging then selects the Python CodeZip packager and fails looking for pyproject.toml, so the BYO + TypeScript combination advertised by the --language help text (Python (create), or Python/TypeScript/Other (BYO)) cannot succeed with CLI flags alone.

Steps to Reproduce
  1. Create a project and add a BYO TypeScript agent:
    agentcore create --name ByoRepro --no-agent
    cd ByoRepro
    agentcore add agent --name ByoRepro --type byo --code-location app/ByoRepro --entrypoint main.ts --language TypeScript --build CodeZip --framework Strands --model-provider Bedrock --memory none
    
  2. Put a TypeScript agent in app/ByoRepro/ (main.ts + package.json, npm install run).
  3. Run agentcore package (or agentcore deploy) and observe the Python packager error. Inspect agentcore/agentcore.json to see the registered runtimeVersion.
Expected Behavior

With --language TypeScript, the BYO path writes "runtimeVersion": "NODE_22" and defaults the entrypoint to main.js, the way the create path does via DEFAULT_RUNTIME_BY_LANGUAGE / DEFAULT_ENTRYPOINT_BY_LANGUAGE. (main.js because the Node CodeZip packager bundles the main.ts source into main.js, and the service rejects a .ts entrypoint for Node runtimes: Entrypoint file type does not match your selected runtime. For NODE_22 runtime, your file should end with .js extension.)

Actual Behavior
  1. agentcore/agentcore.json gets a Python runtime despite --language TypeScript:
    {
      "name": "ByoRepro",
      "build": "CodeZip",
      "entrypoint": "main.ts",
      "codeLocation": "app/ByoRepro/",
      "runtimeVersion": "PYTHON_3_14",
      "networkMode": "PUBLIC",
      "protocol": "HTTP"
    }
    
  2. Packaging fails: Required project file not found: .../app/ByoRepro/pyproject.toml.
CLI Version

0.27.1

Operating System

Linux

Additional Context

Root cause: handleByoPath in src/cli/primitives/AgentPrimitive.tsx hardcodes runtimeVersion: DEFAULT_PYTHON_VERSION and never consults options.language, while the create path maps language through DEFAULT_RUNTIME_BY_LANGUAGE / DEFAULT_ENTRYPOINT_BY_LANGUAGE (src/cli/operations/agent/generate/schema-mapper.ts).

Verified workaround: hand-editing agentcore.json after add agent ("runtimeVersion": "NODE_22", "entrypoint": "main.js") makes the same project deploy and invoke successfully, so the defect is confined to what the BYO path writes.

--language Other is BYO-only and has no entry in DEFAULT_RUNTIME_BY_LANGUAGE; this report is only about TypeScript silently mapping to Python.

I'm happy to send a PR applying the two language maps in handleByoPath (Python/TypeScript only, current behavior preserved for Other).

主要言語
TypeScript
スター
291
フォーク
96
平均マージ
20時間 50分
マージ済み PR(30日)
214

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws/agentcore-cli のほかの issue

aws/agentcore-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。