Loading...
Loading...
Monitors TrueFoundry deployment rollouts after deploy/apply. Polls status, checks pod health and readiness, fetches logs on failure, and reports a final summary. Use after deploying or applying a manifest to track rollout progress.
npx skill4agent add truefoundry/tfy-deploy-skills truefoundry-monitor<objective>Routing note: For ambiguous user intents, use the shared clarification templates in references/intent-clarification.md.
tfy applytfy deploydeploydeployapplicationslogsRULE 1: Once monitoring starts, you MUST poll until a terminal state or timeout. Do NOT stop early. Do NOT ask the user "should I keep checking?" — just keep checking.RULE 2: Do NOT end your response while the deployment is in a non-terminal state (BUILDING, INITIALIZED, ROLLOUT_STARTED). If you are about to stop and the status is non-terminal, you are violating this rule — continue polling.RULE 3: Between each poll, briefly tell the user what you're waiting for. Do NOT silently loop, but also do NOT ask for permission to continue.
TFY_WORKSPACE_FQNtfy_applications_list(filters={"workspace_fqn": "WORKSPACE_FQN", "application_name": "APP_NAME"})tfy-api.shTFY_API_SHscripts/tfy-api.shreferences/tfy-api-setup.mdTFY_API_SH=~/.claude/skills/truefoundry-monitor/scripts/tfy-api.sh
bash $TFY_API_SH GET '/api/svc/v1/apps?workspaceFqn=WORKSPACE_FQN&applicationName=APP_NAME'data[0]deployment.currentStatus.statusdeployment.currentStatus.transitionBUILDINGDEPLOYINGdeployment.currentStatus.state.isTerminalStatedeployment.currentStatus.state.displaystatustransitionstate.isTerminalStatedeployment.currentStatus.status| Status | Terminal? | Action |
|---|---|---|
| No | Report "Deployment initialized, waiting...", continue polling |
| No | Report "Build in progress", continue polling |
| No | Report "Build succeeded, deploying...", continue polling |
| Yes | Fetch build logs, report failure |
| No | Report "Rollout started", continue polling |
| Yes | Report success with endpoint URL |
| Yes | Fetch pod logs, diagnose failure |
| No | Report "Deploy failed, retrying...", continue polling |
| Yes | Report paused/stopped |
| Yes | Report general failure |
| Yes | Report cancelled |
deployment.currentStatus.transition| Transition | Meaning |
|---|---|
| Image build is in progress |
| Pods are being created/updated |
| Skipping build, reusing cached image |
| Multi-component deployment in progress |
| Waiting for resources |
Best practice: Always checkto decide whether to stop polling, rather than matching individual status strings. Thedeployment.currentStatus.state.isTerminalState === truefield gives a human-friendly label.state.display
state.isTerminalStatetrueDEPLOY_SUCCESS# Only if the service exposes an HTTP port
curl -sf -o /dev/null -w '%{http_code}' "https://ENDPOINT_URL/health" || trueBUILD_FAILEDDEPLOY_FAILEDFAILEDCANCELLEDlogs# Get the app ID first from the status response
TFY_API_SH=~/.claude/skills/truefoundry-monitor/scripts/tfy-api.sh
# Fetch recent logs (last 5 minutes)
bash $TFY_API_SH GET '/api/svc/v1/logs/WORKSPACE_ID/download?applicationFqn=APP_FQN&startTs=START_TS&endTs=END_TS'| Error Pattern | Suggested Fix |
|---|---|
| Increase |
| Check startup command and logs for crash reason |
| Verify image URI and registry credentials |
| Port mismatch | Ensure manifest port matches what the app listens on |
| Check health probe path and startup time |
| Build error | Check Dockerfile and build logs |
Monitoring: my-service in cluster:workspace
Status: ROLLOUT_STARTED | Transition: DEPLOYING
Display: Deploying (1/2 replicas ready)
Elapsed: 45s
Next check in 15s...Deployment complete: my-service
Status: DEPLOY_SUCCESS
Replicas: 2/2 ready
Endpoint: https://my-service-ws.example.com
Health check: 200 OK
Total time: 1m 32sDeployment failed: my-service
Status: DEPLOY_FAILED
Error: CrashLoopBackOff — container exited with code 1
Log excerpt:
> ModuleNotFoundError: No module named 'flask'
Suggested fix: Add 'flask' to requirements.txt and redeploydeploylogsapplicationsdeployApplication "APP_NAME" not found in workspace "WORKSPACE_FQN".
Check:
- Application name is spelled correctly
- The deploy/apply command completed successfully
- You're checking the correct workspaceMonitoring timed out after 10 minutes.
Current status: ROLLOUT_STARTED | Transition: DEPLOYING
The deployment is still in progress. Check manually:
- TrueFoundry dashboard: TFY_BASE_URL
- Or run this skill again to resume monitoringCannot access this application. Check your API key permissions for this workspace.