{"id":51691341,"url":"https://github.com/langgenius/mosoo-connector","last_synced_at":"2026-07-16T02:33:30.096Z","repository":{"id":365490804,"uuid":"1272336604","full_name":"langgenius/mosoo-connector","owner":"langgenius","description":null,"archived":false,"fork":false,"pushed_at":"2026-07-14T13:17:43.000Z","size":407,"stargazers_count":2,"open_issues_count":6,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-16T02:33:28.200Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/langgenius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-17T14:08:43.000Z","updated_at":"2026-07-14T13:18:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/langgenius/mosoo-connector","commit_stats":null,"previous_names":["langgenius/mosoo-cli-go","langgenius/mosoo-connector"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/langgenius/mosoo-connector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langgenius%2Fmosoo-connector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langgenius%2Fmosoo-connector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langgenius%2Fmosoo-connector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langgenius%2Fmosoo-connector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/langgenius","download_url":"https://codeload.github.com/langgenius/mosoo-connector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langgenius%2Fmosoo-connector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35528482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-16T02:00:06.687Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-07-16T02:33:29.401Z","updated_at":"2026-07-16T02:33:30.091Z","avatar_url":"https://github.com/langgenius.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mosoo-connector\n\nGenerated Go CLI for Mosoo integrators: Public Thread API, Console GraphQL, and console REST.\n\n## Build\n\n```sh\nmake build\n```\n\nThis clones or updates the Mosoo repository under `.cache/mosoo`, exports OpenAPI / GraphQL\nspecs, renders `specs/sources.yaml` and `overlays/*.yaml`, runs Lathe code generation, and\nbuilds `bin/mosoo`. Generated CLI command indexes are rendered into\n`publish/skills/mosoo/references/cli/`; the CLI guide at\n`publish/skills/mosoo/references/cli.md` is rendered from Lathe Skill include\nresources under `publish/skills/mosoo/lathe-include/`; and the top-level Mosoo\nSkill entrypoint lives at `publish/skills/mosoo/SKILL.md`.\n\nLathe is managed by this repository. `make build` first compiles the pinned Lathe CLI from\n`go.mod` into `.cache/bin/lathe`, then uses that local binary for code generation.\n\nBuilds inject deterministic CLI version metadata from Git into Lathe's standard\n`Version`, `Commit`, and `Date` fields:\n\n```text\nVERSION=$(git describe --tags --always --dirty)\nCOMMIT=$(git rev-parse --short=12 HEAD)\nBUILD_DATE=$(git show -s --format=%cI HEAD)\n```\n\nOverride `VERSION`, `COMMIT`, or `BUILD_DATE` for release builds when the\nrelease pipeline has already computed those values.\n\nOverride the API host base baked into per-module defaults:\n\n```sh\nmake build MOSOO_HOST_BASE=https://api.example.com\n```\n\n## Install\n\nInstall the latest published Go module without cloning the repository:\n\n```sh\ngo install github.com/langgenius/mosoo-connector/cmd/mosoo@latest\n```\n\nInstall a specific release:\n\n```sh\ngo install github.com/langgenius/mosoo-connector/cmd/mosoo@vX.Y.Z\n```\n\n`go install` downloads the module source and compiles it locally. It does not\nrun `make build`, so release tags include the generated CLI manifest and Go\ncommand sources needed by `cmd/mosoo`. Make sure `go env GOBIN`, or\n`$(go env GOPATH)/bin` when `GOBIN` is empty, is on `PATH`.\n\nInstall from a local checkout:\n\n```sh\nmake install\n```\n\nBy default, installation uses `go env GOBIN`, or `$(go env GOPATH)/bin` when\n`GOBIN` is empty. Override the destination with `BINDIR`:\n\n```sh\nmake install BINDIR=\"$HOME/.bin\"\n```\n\n`make install` runs `make verify-install`, which checks that the installed\nbinary's `mosoo --version` output exactly matches the build metadata.\n\n### Homebrew\n\nAfter a release's generated Homebrew formula pull request is merged, tap this\nrepository and install the formula:\n\n```sh\nbrew tap langgenius/mosoo-connector https://github.com/langgenius/mosoo-connector\nbrew install langgenius/mosoo-connector/mosoo\n```\n\nRelease automation opens a GoReleaser pull request to add or update the\nformula. Merged formula revisions install the matching prebuilt `mosoo` archive\nfrom GitHub Releases.\n\n## Installer\n\nThe source for the Mosoo installer lives at `publish/installers/install.sh`.\nThe current stable public entrypoint is:\n\n```sh\ncurl -fsSL https://install.mosoo.ai/install.sh | bash\n```\n\nThe installer is interactive by default and asks for `y` or `n` before high-impact\nsteps. Use `--yes` for automation and `--dry-run` to preview the plan.\n\n## Published Skill layout\n\nThe publishable Mosoo Skill is rooted at `publish/skills/mosoo`.\n\n```text\npublish/skills/mosoo/\n|-- SKILL.md\n`-- references/\n    |-- setup.md\n    |-- cli.md\n    |-- api.md\n    `-- cli/\n        |-- catalog.md\n        `-- modules/\n```\n\n`references/cli.md`, `references/cli/catalog.md`, and\n`references/cli/modules/*.md` are generated from Lathe's CLI Skill output during\n`make build`. To change the guide text in `references/cli.md`, edit the matching\nLathe include file under `lathe-include/`. Treat the module files as CLI command\nindexes, not as the top-level Mosoo Skill.\n\n## Command layout\n\n`cli.command_path` is `namespaced`: every generated command lives under its source module\n(`console`, `console-rest`, or `public-thread-api`). Root-level flat mounting is not used\nbecause the CLI ships three API surfaces.\n\nHelp text, examples, and error hints for generated commands come from `overlays/*.yaml`\n(regenerated by `scripts/render-overlays.ts` during `make build`). The generated\ncatalog is the complete control-plane surface; overlays are usability polish, and\nthe Mosoo Skill reference explains high-frequency workflows.\n\nHigh-frequency root commands such as `mosoo ls`, `mosoo run`, `mosoo add-key`,\nand `mosoo create-agent` are Lathe overlay `shortcuts` for generated operations.\nThey execute the same generated command specs as their canonical paths and are\nreported in the generated command catalog.\n\n## Hostnames and auth\n\nThree API surfaces share one deployment but use different URL bases:\n\n| CLI module | Default hostname (from `MOSOO_HOST_BASE`) | Example paths |\n|------------|-------------------------------------------|---------------|\n| `console`, `console-rest` | `{base}/api` | `/graphql`, `/access-tokens`, `/files` |\n| `public-thread-api` | `{base}/api/v1` | `/agents/{id}/files`, `/agents/{id}/threads`, `/threads/{id}/events` |\n\nDefaults are baked at codegen time (`MOSOO_HOST_BASE`, default `http://127.0.0.1:8787`).\nOverride any command with `--hostname` or `$MOSOO_HOST`.\n\n## Target resolution\n\nGenerated API commands resolve a default target before falling back to baked-in hostnames.\nExplicit hostname overrides always win:\n\n```text\n--hostname\n  -\u003e MOSOO_HOST\n  -\u003e --target / --base-url\n  -\u003e MOSOO_TARGET / MOSOO_BASE_URL\n  -\u003e project config .mosoo/config.json\n  -\u003e global config in the OS config dir (or $MOSOO_CONFIG_DIR/config.json)\n  -\u003e current directory looks like the Mosoo source repo\n  -\u003e default local target\n```\n\nGenerated API commands still default to the local Mosoo development stack when\nno target config exists:\n\n```json\n{\n  \"target\": \"local\",\n  \"baseUrl\": \"http://127.0.0.1:8787\"\n}\n```\n\nFirst-time cloud users should use the zero-config setup and login path:\n\n```sh\nmosoo setup\nmosoo auth login\n```\n\n`mosoo setup` stores the root target (`https://try.mosoo.ai`) in config. The CLI\nderives the console API (`/api`) and Public API (`/api/v1`) hosts internally.\n`mosoo auth login` defaults to Mosoo Cloud when no config exists, validates the\ntoken against the console API, and stores the same credential for both derived\nAPI hosts.\n\nSelf-hosted and local targets use explicit setup subcommands:\n\n```sh\nmosoo setup self-host --base-url https://mosoo.example.com\nmosoo setup custom --api-url https://mosoo.example.com/api\nmosoo setup local\n```\n\nCloud and custom targets are also supported with explicit command flags:\n\n```sh\nmosoo doctor --json --target cloud\nmosoo console user viewer --target custom --base-url https://example.com\n```\n\nCheck the resolved target and readiness:\n\n```sh\nmosoo doctor --json\n```\n\nThe JSON output is versioned with `schemaVersion` and groups machine-readable\nreadiness data under `target`, `auth`, `install`, `checks`, and `failures`.\nFailure entries include stable `code` and `action` fields so automation can\nbranch without parsing human messages.\n\nFor local development targets, the installer can sign in through the local development\nbackdoor with an `@mosoo.ai` email, create a personal access token, and write the\nCLI credentials for both hostname bases. This only works against a loopback Mosoo\nAPI with the development backdoor enabled.\n\nFor cloud and custom targets, sign in at `https://try.mosoo.ai` or the configured\nweb app, use a Mosoo API token from that logged-in web session, then run\n`mosoo auth login`. `--hostname` remains available as an advanced override for\none-off host selection.\nThe generated `mosoo console-rest access create` command maps to `POST /access-tokens`,\nbut it still needs viewer-level authentication; it is not a first-login mechanism by itself.\n\n## Common commands\n\n```sh\nmosoo console user viewer\nmosoo ls --app-limit 20 --agent-limit 20 --credential-limit 20 -o json\nmosoo add-key --input-app-id \u003capp-id\u003e --input-vendor-id openai --input-name OpenAI --input-api-key-env OPENAI_API_KEY -o json\nmosoo create-agent --file agent-create.json -o json\nmosoo console agents publish --input-app-id \u003capp-id\u003e --input-agent-id \u003cagent-id\u003e -o json\nmosoo run --input-app-id \u003capp-id\u003e --input-agent-id \u003cagent-id\u003e --input-prompt \"Summarize this repository\" -o json\nmosoo console sessions events --app-id \u003capp-id\u003e --session-id \u003csession-id\u003e --limit 100 -o json\nmosoo search \"run agent\" --json\nmosoo commands show run --json\n```\n\nUse `commands show` before executing an unfamiliar generated command so flags,\nbody shape, auth, and output format are explicit.\n\n### Public Thread file uploads\n\nThe Public API uses one multipart upload before a Thread references the file.\nUpload a local file to the Agent endpoint and save `file.id` from the response:\n\n```sh\nmosoo public-thread-api files upload \\\n  --agent-id \u003cagent-id\u003e \\\n  --file ./brief.txt \\\n  -o json\n```\n\nThen put that ID in `resources[].file_id` when creating a Thread or sending a\nfollow-up `user_message` event:\n\n```json\n{\n  \"input\": {\n    \"content\": [{ \"type\": \"text\", \"text\": \"Summarize the attachment.\" }],\n    \"type\": \"user.message\"\n  },\n  \"resources\": [{ \"type\": \"file\", \"file_id\": \"\u003cfile-id\u003e\" }]\n}\n```\n\nThere is no public create-upload, PUT, complete, or post-create attach step.\n`GET /threads/{threadId}/files` lists claimed attachments and artifacts;\nmetadata, content download, and deletion are exposed under `/files/{fileId}`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flanggenius%2Fmosoo-connector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flanggenius%2Fmosoo-connector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flanggenius%2Fmosoo-connector/lists"}