{"id":50056149,"url":"https://github.com/mininglamp-oss/octo-lib","last_synced_at":"2026-05-21T13:18:23.426Z","repository":{"id":357536848,"uuid":"1235491459","full_name":"Mininglamp-OSS/octo-lib","owner":"Mininglamp-OSS","description":"The Go foundation library for the OCTO platform — protocol types, crypto primitives, storage adapters, HTTP framework, event bus, and worker pool.","archived":false,"fork":false,"pushed_at":"2026-05-20T06:32:45.000Z","size":424,"stargazers_count":7,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-20T10:08:51.790Z","etag":null,"topics":["aes","apache-2","crypto","curve25519","event-bus","go","golang","grpc","http-framework","im","instant-messaging","library","mysql","octo","protobuf","redis","rsa","sqlite","worker-pool"],"latest_commit_sha":null,"homepage":"https://github.com/Mininglamp-OSS","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mininglamp-OSS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["Mininglamp-OSS"]}},"created_at":"2026-05-11T11:28:38.000Z","updated_at":"2026-05-20T06:32:49.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Mininglamp-OSS/octo-lib","commit_stats":null,"previous_names":["mininglamp-oss/octo-lib"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Mininglamp-OSS/octo-lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mininglamp-OSS%2Focto-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mininglamp-OSS%2Focto-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mininglamp-OSS%2Focto-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mininglamp-OSS%2Focto-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mininglamp-OSS","download_url":"https://codeload.github.com/Mininglamp-OSS/octo-lib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mininglamp-OSS%2Focto-lib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33301982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"ssl_error","status_checked_at":"2026-05-21T12:22:11.673Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["aes","apache-2","crypto","curve25519","event-bus","go","golang","grpc","http-framework","im","instant-messaging","library","mysql","octo","protobuf","redis","rsa","sqlite","worker-pool"],"created_at":"2026-05-21T13:18:22.083Z","updated_at":"2026-05-21T13:18:23.419Z","avatar_url":"https://github.com/Mininglamp-OSS.png","language":"Go","funding_links":["https://github.com/sponsors/Mininglamp-OSS"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./docs/assets/logo-light.png#gh-light-mode-only\" width=\"200\" alt=\"OCTO\"\u003e\n  \u003cimg src=\"./docs/assets/logo-dark.png#gh-dark-mode-only\" width=\"200\" alt=\"OCTO\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eOCTO — the open workplace built for humans × AI agents.\u003c/b\u003e\u003cbr/\u003e\n  \u003csub\u003eLet \u003cb\u003eLobsters\u003c/b\u003e (OpenClaw-powered digital doubles) do the \u003ci\u003ethinking\u003c/i\u003e and \u003ci\u003edoing\u003c/i\u003e. You focus on \u003ci\u003etaste\u003c/i\u003e.\u003c/sub\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/Mininglamp-OSS\"\u003e\u003cb\u003e🏠 OCTO Home\u003c/b\u003e\u003c/a\u003e ·\n  \u003ca href=\"#-quickstart\"\u003e\u003cb\u003e🚀 Quickstart\u003c/b\u003e\u003c/a\u003e ·\n  \u003ca href=\"#-octo-ecosystem\"\u003e\u003cb\u003e📦 Ecosystem\u003c/b\u003e\u003c/a\u003e ·\n  \u003ca href=\"./CONTRIBUTING.md\"\u003e\u003cb\u003e🤝 Contributing\u003c/b\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"./LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-Apache_2.0-blue.svg\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"./README.zh.md\"\u003e\u003cimg src=\"https://img.shields.io/badge/lang-简体中文-red.svg\" alt=\"简体中文\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n\u003e 🌐 **Read in**: **English** · [简体中文](README.zh.md)\n\n# OCTO Lib\n\n\u003e The **Go foundation library** that every OCTO backend service builds on — protocol, crypto, storage, HTTP, logging, event bus.\n\n`octo-lib` is the shared Go module at the bottom of the OCTO backend stack. It\ncontains the protocol types, cryptographic primitives, storage adapters, HTTP\nhelpers, worker pool, and event-bus code that `octo-server`, `octo-matter`, and\nthe adapters layer all import rather than re-implement.\n\n## 🌟 Why OCTO Lib\n\n- **One protocol surface.** All OCTO services speak the same message / channel / stream types — defined once, here. No silent drift between services.\n- **Batteries included, dependencies minimal.** RSA / AES / DH / SHA crypto, SSRF-safe URL validation, MySQL / Redis / SQLite adapters, a zap-based structured logger, and a Webhook gRPC client are all a single `import` away.\n- **Stable, versioned Go module.** Consumed as a regular `go get` dependency; SemVer-tagged; no vendoring required, no magic code generation at build time.\n\n## 🚀 Quickstart\n\n```bash\ngo get github.com/Mininglamp-OSS/octo-lib\n```\n\nThen in your Go code:\n\n```go\nimport (\n    \"github.com/Mininglamp-OSS/octo-lib/pkg/log\"\n    \"github.com/Mininglamp-OSS/octo-lib/pkg/util\"\n)\n\nfunc main() {\n    log.Info(\"hello octo\")\n    id := util.GenUUID()\n    log.Info(\"new id: \" + id)\n}\n```\n\nSee [`pkg/`](./pkg) for the full package catalogue.\n\n## 📦 Modules / Architecture\n\nTop-level packages in this module:\n\n| Path | Purpose |\n|---|---|\n| `common/` | Cache, pagination, message types, constants |\n| `config/` | App context, config loader, message / group / channel / stream / RTC configs, ES \u0026 tracer init |\n| `model/` | Shared data models (channel, response) |\n| `module/` | Module registration primitives |\n| `server/` | HTTP server bootstrap |\n| `testutil/` | Test helpers |\n| `pkg/cache/` | In-memory cache |\n| `pkg/db/` | MySQL / Redis / SQLite adapters |\n| `pkg/keylock/` | Per-key lock |\n| `pkg/log/` | Structured logger (zap-based) |\n| `pkg/markdown/` | Markdown rendering |\n| `pkg/network/` | HTTP client helpers |\n| `pkg/pool/` | Worker pool / job dispatcher |\n| `pkg/redis/` | Redis client helpers |\n| `pkg/register/` | API \u0026 task router registration |\n| `pkg/util/` | Crypto (AES / RSA / DH / SHA / MD5), base62, decimal, IP, SSRF-safe URL validation, reflection, time, UUID, string / json utils |\n| `pkg/wait/` | Wait-group helpers |\n| `pkg/wkevent/` | Event bus |\n| `pkg/wkhook/` | Webhook gRPC service (proto + generated code) |\n| `pkg/wkhttp/` | HTTP handler framework |\n| `pkg/wkrsa/` | RSA utilities |\n\n## 🔗 OCTO Ecosystem\n\n\u003c!-- shared snippet: OCTO repo matrix. Keep identical across all 9 repos. --\u003e\n\n```mermaid\ngraph TD\n  subgraph Clients[Clients]\n    Web[octo-web\u003cbr/\u003eWeb / PC]\n    Android[octo-android\u003cbr/\u003eAndroid]\n    iOS[octo-ios\u003cbr/\u003eiOS]\n  end\n\n  subgraph Core[Core Services]\n    Server[octo-server\u003cbr/\u003eBackend API]\n    Matter[octo-matter\u003cbr/\u003eTask / Todo]\n    Summary[octo-smart-summary\u003cbr/\u003eAI Summary]\n    Admin[octo-admin\u003cbr/\u003eAdmin Console]\n  end\n\n  subgraph Shared[Shared Libraries \u0026 Integrations]\n    Lib[octo-lib\u003cbr/\u003eCore Go Library]\n    Adapters[octo-adapters\u003cbr/\u003eThird-party Adapters]\n  end\n\n  Web --\u003e Server\n  Android --\u003e Server\n  iOS --\u003e Server\n  Admin --\u003e Server\n  Server --\u003e Matter\n  Server --\u003e Summary\n  Server --\u003e Adapters\n  Server -.uses.-\u003e Lib\n  Matter -.uses.-\u003e Lib\n  Adapters -.uses.-\u003e Lib\n```\n\n| Repository | Language | Role |\n|---|---|---|\n| [`octo-server`](https://github.com/Mininglamp-OSS/octo-server) | Go | Backend API · business orchestration · Lobster agent scheduling |\n| [`octo-matter`](https://github.com/Mininglamp-OSS/octo-matter) | Go | Task / Todo / Matter micro-service |\n| [`octo-smart-summary`](https://github.com/Mininglamp-OSS/octo-smart-summary) | Go | LLM-powered conversation summarisation |\n| [`octo-web`](https://github.com/Mininglamp-OSS/octo-web) | TypeScript / React | Web \u0026 PC (Electron) client |\n| [`octo-android`](https://github.com/Mininglamp-OSS/octo-android) | Kotlin / Java | Native Android client |\n| [`octo-ios`](https://github.com/Mininglamp-OSS/octo-ios) | Swift / Objective-C | Native iOS client |\n| [`octo-admin`](https://github.com/Mininglamp-OSS/octo-admin) | TypeScript / React | Admin console (tenant / org / user / channel management) |\n| [`octo-lib`](https://github.com/Mininglamp-OSS/octo-lib) | Go | Shared core library (protocol, crypto, storage, HTTP) |\n| [`octo-adapters`](https://github.com/Mininglamp-OSS/octo-adapters) | TypeScript / Python | Third-party integrations (IM bridges, AI channels) |\n\n## 🧭 Philosophy\n\nOCTO ships under three shared principles that apply to every repository in this matrix:\n\n1. **Local-first.** Anything that can run on the user's own box — chats, embeddings, agents — should. Your data stays yours; cloud is a choice, not a requirement.\n2. **Humans judge, AI thinks and acts.** Humans focus on *taste* (what matters, what's right, what to ship). Lobster agents — OpenClaw-powered digital doubles — carry the *thinking* and *execution* load.\n3. **Release-as-product.** Every open-source cut is shipped as a self-contained product, not a code dump: one squash per release, Apache 2.0, no internal baggage, reproducible from this repo alone.\n\n## 🤝 Contributing\n\nWe love pull requests! Before you open one, please read:\n\n- [CONTRIBUTING.md](CONTRIBUTING.md) — workflow, branch model, commit style\n- [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) — community expectations\n\nFor security issues please follow [SECURITY.md](SECURITY.md) instead of the public tracker.\n\n## 📄 License\n\nApache License 2.0 — see [LICENSE](LICENSE) for the full text and [NOTICE](NOTICE) for third-party attributions.\n\n## 🙏 Acknowledgments\n\nOCTO is built on the excellent work of the open-source community. We'd like to especially thank:\n\n- **[TangSengDaoDaoServerLib](https://github.com/TangSengDaoDao/TangSengDaoDaoServerLib)** — our upstream project, by the TangSengDaoDao team.\n- **[WuKongIM](https://github.com/WuKongIM/WuKongIM)** — the underlying real-time messaging core.\n\nSee [NOTICE](NOTICE) for the full attribution list and third-party Go module licenses.\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003csub\u003eMade with 🐙 by \u003cb\u003eOCTO Contributors\u003c/b\u003e · \u003ca href=\"https://github.com/Mininglamp-OSS\"\u003eMininglamp-OSS\u003c/a\u003e\u003c/sub\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmininglamp-oss%2Focto-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmininglamp-oss%2Focto-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmininglamp-oss%2Focto-lib/lists"}