{"id":20198098,"url":"https://github.com/tideflow-io/tideflow-agent","last_synced_at":"2025-04-10T10:45:56.324Z","repository":{"id":39897779,"uuid":"168836133","full_name":"tideflow-io/tideflow-agent","owner":"tideflow-io","description":"Self-hosted runned to run workflow tasks in your own computers.","archived":false,"fork":false,"pushed_at":"2023-01-09T20:17:00.000Z","size":509,"stargazers_count":5,"open_issues_count":11,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T09:38:38.782Z","etag":null,"topics":["automate","automation","self-hosted","self-hosted-agent","self-hosted-runner","workflow"],"latest_commit_sha":null,"homepage":"https://docs.tideflow.io/docs/services-agent","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tideflow-io.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-02T13:47:11.000Z","updated_at":"2023-06-09T13:50:10.000Z","dependencies_parsed_at":"2023-02-08T13:55:10.994Z","dependency_job_id":null,"html_url":"https://github.com/tideflow-io/tideflow-agent","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tideflow-io%2Ftideflow-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tideflow-io%2Ftideflow-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tideflow-io%2Ftideflow-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tideflow-io%2Ftideflow-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tideflow-io","download_url":"https://codeload.github.com/tideflow-io/tideflow-agent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247918919,"owners_count":21018044,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automate","automation","self-hosted","self-hosted-agent","self-hosted-runner","workflow"],"created_at":"2024-11-14T04:29:23.220Z","updated_at":"2025-04-10T10:45:56.292Z","avatar_url":"https://github.com/tideflow-io.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tideflow's Self-hosted Runner \n\n\u003e With Tideflow's Self-hosted Runner, you can run workflow's task in your own server via [TideFlow](https://www.tideflow.io)\n\nFor more information, visit [TideFlow.io](https://www.tideflow.io)\n\n## Usage\n\n```bash\nnpx @tideflowio/tideflow-agent -t [token] -u tideflow.example.com\n```\n\n    $ tideflow-agent --help\n    Usage: index [options]\n\n    Options:\n      -v, --version                       output the version number\n      -c, --concurrency [concurrency]     Max number of jobs the agent should process concurrently\n      -t, --token [token]                 Authentication token\n      -u, --url [url]                     Tideflow url\n      --noupdate                          Opt-out of update version check\n      -h, --help                          output usage information\n\n    Examples:\n      $ tideflow-agent --help\n      $ tideflow-agent -h\n\n## Environment variables\n\n```bash\n# Specify authentication token.\n# Optional. Having the authentication token stored as an environment\n# variable allows users to run the agent without passing the -t parameter.\n# Example: d2a04f78-ff8a-4eb4-a12c-57fb7abf03a7\nTIDEFLOW_AGENT_TOKEN\n\n# Specify the URL to connect to the Tideflow's platform.\n# Optional. Having the URL stored as an environment\n# variable allows users to run the agent without passing the -u parameter.\n# Example: http://subdomain.example.com:3000\nTIDEFLOW_AGENT_URL\n```\n\n## How to process data from previous tasks\n\n- **type**: an string that defines the kind of data retuned by the previous\nstep (object, array, file, etc)\n- **data**: an object containing the task's result.\n\n### Command actions\n\nIt's possible that the agent will receive preivous tasks results. This is\ndefined in the workflow's task parameters.\n\nThe result from previous tasks are stored in a temporal file. This file's\nabsolute path is passed as a parameter called \"tideflow_previous_file\" to the\ncommand to be executed.\n\nFor example, if the command to run is `meow`, the agent will execute it as:\n\n`meow --tideflow_previous_file \"/tmp/random_file_name\"`\n\nThe content of such file is a JSON object, with a format similar to:\n\n```json\n{\n  \"execution\": {\n    \"_id\": \"neL9r33vm38txn9e6\"\n  },\n  \"tasks\": {\n    \"the-task-id\": {\n      \"_id\": \"iesFwrdTtBToRRBzB\",\n      \"stepIndex\": 1,\n      \"type\": \"file\",\n      \"event\": \"read-file\",\n      \"createdAt\": \"2020-10-03T15:55:08.637Z\",\n      \"status\": \"success\",\n      \"result\": {\n        \"files\": [\n          {\n            \"fileName\": \"my-first-workflow-ifg.json\",\n            \"url\": \"http://localhost:3000/download?type=actionFile\u0026token=eyJhbGciO2A\"\n          }\n        ]\n      },\n      \"updatedAt\": \"2020-10-03T15:55:08.650Z\"\n    },\n    \"trigger\": {\n      \"_id\": \"qJucoXaWaEJqcazoe\",\n      \"stepIndex\": \"trigger\",\n      \"type\": \"endpoint\",\n      \"event\": \"called\",\n      \"createdAt\": \"2020-10-03T15:55:08.629Z\",\n      \"status\": \"success\",\n      \"result\": {\n        \"data\": {\n          \"name\": \"Jose\",\n          \"location\": {\n            \"lat\": 42.8867647,\n            \"lon\": -9.2716399\n          }\n        }\n      },\n      \"updatedAt\": \"2020-10-03T15:55:08.633Z\"\n    }\n  }\n}\n```\n\n### NodeJS SFC actions\n\nThe result from previous tasks is passed as the handler's first argument.\n\n```javascript\nmodule.exports.handler = previousResults =\u003e {\n  // My logic here\n  return { greeting: 'hello world' }\n}\n```\n\n---\n\n## Contributing\n\nIf you would like to contribute to Tideflow, check out the\n[Contributing Guide](https://docs.tideflow.io/docs/contribute).\n\n## License\n\nGNU GENERAL PUBLIC LICENSE\n\n## Developer Resources\n\n- Documentation: https://docs.tideflow.io\n- Contribute: https://docs.tideflow.io/docs/contribute\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftideflow-io%2Ftideflow-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftideflow-io%2Ftideflow-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftideflow-io%2Ftideflow-agent/lists"}