refactor: make user_id a required input, drop hardcoded jsahn default
user_id is now a required workflow_dispatch input (no default) and the runner validates it is non-empty before doing anything. Removed the 'jsahn' default from the script arg and replaced jsahn with <user_id> placeholders throughout TEST_WORKFLOW.md so the workflow is not pinned to one account. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -46,9 +46,8 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
user_id:
|
user_id:
|
||||||
description: 'AgentBackend user_id'
|
description: 'AgentBackend user_id (필수)'
|
||||||
required: false
|
required: true
|
||||||
default: 'jsahn'
|
|
||||||
type: string
|
type: string
|
||||||
workspace_name:
|
workspace_name:
|
||||||
description: '작업실 이름 (예: 팬아웃 테스트). GET /workspaces/lookup 으로 UUID 자동 해석'
|
description: '작업실 이름 (예: 팬아웃 테스트). GET /workspaces/lookup 으로 UUID 자동 해석'
|
||||||
|
|||||||
+5
-5
@@ -34,7 +34,7 @@ GITEA_TOKEN=<Gitea Personal Access Token>
|
|||||||
`.env` 의 토큰을 읽어 `workflow_dispatch` 를 호출한다. **토큰을 화면에 출력하지 말 것.**
|
`.env` 의 토큰을 읽어 `workflow_dispatch` 를 호출한다. **토큰을 화면에 출력하지 말 것.**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /Users/jsahn/Works/Liti-agent-Development
|
cd <repo root> # 이 저장소 루트
|
||||||
set -a; . ./.env; set +a # .env 로드 ($GITEA_TOKEN)
|
set -a; . ./.env; set +a # .env 로드 ($GITEA_TOKEN)
|
||||||
|
|
||||||
curl -s -X POST \
|
curl -s -X POST \
|
||||||
@@ -46,7 +46,7 @@ curl -s -X POST \
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"yaml_path": "Case_02_Comparison_Research/YAML_Prompts/1. Stage_1/v.5/Stage_1_Part_1.yml",
|
"yaml_path": "Case_02_Comparison_Research/YAML_Prompts/1. Stage_1/v.5/Stage_1_Part_1.yml",
|
||||||
"workspace_name": "팬아웃 테스트",
|
"workspace_name": "팬아웃 테스트",
|
||||||
"user_id": "jsahn"
|
"user_id": "<user_id>"
|
||||||
}
|
}
|
||||||
}'
|
}'
|
||||||
# 성공 시 HTTP 204 (본문 없음)
|
# 성공 시 HTTP 204 (본문 없음)
|
||||||
@@ -88,7 +88,7 @@ pip install httpx httpx-sse
|
|||||||
python scripts/run_agent_api.py \
|
python scripts/run_agent_api.py \
|
||||||
--yaml-path="Case_02_Comparison_Research/YAML_Prompts/1. Stage_1/v.5/Stage_1_Part_1.yml" \
|
--yaml-path="Case_02_Comparison_Research/YAML_Prompts/1. Stage_1/v.5/Stage_1_Part_1.yml" \
|
||||||
--workspace-name="팬아웃 테스트" \
|
--workspace-name="팬아웃 테스트" \
|
||||||
--user-id="jsahn" \
|
--user-id="<user_id>" \
|
||||||
--api-base="http://100.93.221.71:8800" \
|
--api-base="http://100.93.221.71:8800" \
|
||||||
--output-dir=agent_run_output
|
--output-dir=agent_run_output
|
||||||
```
|
```
|
||||||
@@ -106,7 +106,7 @@ python scripts/run_agent_api.py \
|
|||||||
| `yaml_path` | ✅ | — | 실행할 Agent YAML 의 repo 상대경로 |
|
| `yaml_path` | ✅ | — | 실행할 Agent YAML 의 repo 상대경로 |
|
||||||
| `workspace_name` | △ | `""` | 작업실 이름 → `GET /workspaces/lookup` 으로 UUID 해석 |
|
| `workspace_name` | △ | `""` | 작업실 이름 → `GET /workspaces/lookup` 으로 UUID 해석 |
|
||||||
| `workspace_id` | △ | `""` | 작업실 UUID 직접 지정(override). 비우면 name 으로 해석 |
|
| `workspace_id` | △ | `""` | 작업실 UUID 직접 지정(override). 비우면 name 으로 해석 |
|
||||||
| `user_id` | | `jsahn` | AgentBackend user_id |
|
| `user_id` | ✅ | — | AgentBackend user_id (실행 계정) |
|
||||||
| `user_input` | | `""` | Agent 에 전달할 user_input |
|
| `user_input` | | `""` | Agent 에 전달할 user_input |
|
||||||
| `start_stage_index` | | `0` | 시작 stage 인덱스 |
|
| `start_stage_index` | | `0` | 시작 stage 인덱스 |
|
||||||
| `api_base` | | `http://agent-backend:8000` | 내부 컨테이너 주소 (/api 접두사 없음) |
|
| `api_base` | | `http://agent-backend:8000` | 내부 컨테이너 주소 (/api 접두사 없음) |
|
||||||
@@ -116,7 +116,7 @@ python scripts/run_agent_api.py \
|
|||||||
|
|
||||||
작업실 이름↔UUID 목록 확인:
|
작업실 이름↔UUID 목록 확인:
|
||||||
```bash
|
```bash
|
||||||
curl -s "http://100.93.221.71:8800/workspaces/lookup?user_id=jsahn" | python3 -m json.tool
|
curl -s "http://100.93.221.71:8800/workspaces/lookup?user_id=<user_id>" | python3 -m json.tool
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -340,6 +340,8 @@ class AgentRunner:
|
|||||||
|
|
||||||
def run(self) -> int:
|
def run(self) -> int:
|
||||||
try:
|
try:
|
||||||
|
if not self.user_id:
|
||||||
|
raise SystemExit("ERROR: user_id 를 지정해야 합니다 (--user-id).")
|
||||||
self.resolve_workspace()
|
self.resolve_workspace()
|
||||||
self.upload()
|
self.upload()
|
||||||
|
|
||||||
@@ -446,7 +448,7 @@ def parse_args() -> argparse.Namespace:
|
|||||||
p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||||
p.add_argument("--yaml-path", required=True, help="실행할 Agent YAML 경로 (repo 상대/절대)")
|
p.add_argument("--yaml-path", required=True, help="실행할 Agent YAML 경로 (repo 상대/절대)")
|
||||||
p.add_argument("--api-base", default="https://legalpoc.eroomai.com/api")
|
p.add_argument("--api-base", default="https://legalpoc.eroomai.com/api")
|
||||||
p.add_argument("--user-id", default="jsahn")
|
p.add_argument("--user-id", default="", help="AgentBackend user_id (필수)")
|
||||||
p.add_argument("--workspace-name", default="",
|
p.add_argument("--workspace-name", default="",
|
||||||
help="작업실 이름. GET /workspaces/lookup 으로 UUID 해석 (workspace-id 미지정 시)")
|
help="작업실 이름. GET /workspaces/lookup 으로 UUID 해석 (workspace-id 미지정 시)")
|
||||||
p.add_argument("--workspace-id", default="",
|
p.add_argument("--workspace-id", default="",
|
||||||
|
|||||||
Reference in New Issue
Block a user