@xbibzlibrary/telebibz 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/CODE_OF_CONDUCT.md +37 -0
  3. package/CONTRIBUTING.md +54 -0
  4. package/CONTRIBUTION_RULES.md +41 -0
  5. package/GOVERNANCE.md +47 -0
  6. package/NOTICE.md +7 -0
  7. package/README.id.md +16 -2
  8. package/README.md +15 -3
  9. package/README.zh-CN.md +16 -2
  10. package/SECURITY.md +36 -4
  11. package/SUPPORT.md +30 -0
  12. package/dist/src/approval/approval.d.ts.map +1 -1
  13. package/dist/src/approval/approval.js +3 -1
  14. package/dist/src/approval/approval.js.map +1 -1
  15. package/dist/src/branding/branding.d.ts +17 -0
  16. package/dist/src/branding/branding.d.ts.map +1 -0
  17. package/dist/src/branding/branding.js +35 -0
  18. package/dist/src/branding/branding.js.map +1 -0
  19. package/dist/src/core/bot.d.ts +3 -0
  20. package/dist/src/core/bot.d.ts.map +1 -1
  21. package/dist/src/core/bot.js +15 -3
  22. package/dist/src/core/bot.js.map +1 -1
  23. package/dist/src/index.d.ts +2 -0
  24. package/dist/src/index.d.ts.map +1 -1
  25. package/dist/src/index.js +2 -0
  26. package/dist/src/index.js.map +1 -1
  27. package/dist/src/observability/logger.d.ts +45 -0
  28. package/dist/src/observability/logger.d.ts.map +1 -0
  29. package/dist/src/observability/logger.js +111 -0
  30. package/dist/src/observability/logger.js.map +1 -0
  31. package/dist-cjs/src/approval/approval.js +3 -1
  32. package/dist-cjs/src/branding/branding.js +39 -0
  33. package/dist-cjs/src/core/bot.js +15 -3
  34. package/dist-cjs/src/index.js +2 -0
  35. package/dist-cjs/src/observability/logger.js +117 -0
  36. package/docs/API.id.md +4 -4
  37. package/docs/API.md +4 -4
  38. package/docs/API.zh-CN.md +4 -4
  39. package/docs/README.md +9 -1
  40. package/package.json +8 -2
package/CHANGELOG.md CHANGED
@@ -14,6 +14,7 @@
14
14
  - JSON-file, Redis, SQL-driver, Mongo-driver, and persistent approval storage adapters.
15
15
  - Storage-backed conversations, full five-field cron parsing, scheduler error hooks, permission-aware menus, `MenuController`, Web App init-data validation, PaymentsClient, and vendored Telegram declarations.
16
16
  - Callback-update test fixtures and expanded failure-path/regression coverage.
17
+ - Code of Conduct, Contributing Guide, Contribution Rules, Governance, Support Policy, expanded Security Policy, third-party Notice, CODEOWNERS, Dependabot configuration, and complete GitHub issue/PR templates.
17
18
 
18
19
  ## 0.1.2 — 2026-08-19
19
20
 
@@ -0,0 +1,37 @@
1
+ # Code of Conduct
2
+
3
+ ## Our pledge
4
+
5
+ We are committed to making participation in the telebibz community welcoming, respectful, technically rigorous, and safe for everyone. Contributors, maintainers, reviewers, users, and other participants are expected to act in good faith and to prioritize constructive collaboration.
6
+
7
+ ## Expected behavior
8
+
9
+ Participants should communicate clearly and respectfully, assume good intent while discussing technical disagreements, provide actionable feedback, document relevant context, respect privacy and confidentiality, and accept that maintainers may make decisions based on project scope, security, compatibility, and release risk.
10
+
11
+ When reporting a defect or security issue, include reproducible technical information without publishing secrets, personal data, or exploit details that could put users at risk. When reviewing code, focus on the implementation and its consequences rather than the person who wrote it.
12
+
13
+ ## Unacceptable behavior
14
+
15
+ Harassment, discrimination, threats, intimidation, personal attacks, doxxing, deliberate disruption, sexualized conduct in project spaces, impersonation, publishing private information without consent, spam, and knowingly submitting malicious or deceptive changes are not acceptable. Attempts to bypass project security controls, expose credentials, poison dependencies, or manipulate release automation are treated as serious violations.
16
+
17
+ ## Scope
18
+
19
+ This Code of Conduct applies to repository issues, pull requests, discussions, reviews, commits, releases, documentation, official project channels, and any interaction where a participant is representing telebibz or its maintainers.
20
+
21
+ ## Enforcement
22
+
23
+ Maintainers may remove or edit content, close discussions, restrict participation, reject contributions, revoke project permissions, or take other proportionate action. Serious or repeated violations may result in a permanent ban from project spaces. Enforcement decisions consider the severity, intent, impact, recurrence, and available evidence.
24
+
25
+ ## Reporting
26
+
27
+ Report conduct concerns privately to the maintainers through the repository's private security/contact channel. Do not open a public issue for sensitive reports. Include links, dates, relevant usernames, and a concise description of what occurred. Do not include credentials or unnecessary personal information.
28
+
29
+ Security vulnerabilities must be reported according to [SECURITY.md](SECURITY.md), not through a public issue.
30
+
31
+ ## Appeals
32
+
33
+ A participant may request a review of an enforcement decision by providing relevant context privately. Appeals are reviewed by a maintainer who was not the sole decision-maker for the original action where practical. Retaliation against a good-faith report or appeal is prohibited.
34
+
35
+ ## Attribution
36
+
37
+ This policy is informed by the [Contributor Covenant](https://www.contributor-covenant.org/version/2/1/code_of_conduct/), adapted for the technical and security needs of this project.
@@ -0,0 +1,54 @@
1
+ # Contributing to telebibz
2
+
3
+ Thank you for helping improve telebibz. Contributions are welcome when they are focused, reproducible, tested, documented, and compatible with the project's security and release policies.
4
+
5
+ ## Before you start
6
+
7
+ Read [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md), [CONTRIBUTION_RULES.md](CONTRIBUTION_RULES.md), [SECURITY.md](SECURITY.md), and [RELEASE_POLICY.md](RELEASE_POLICY.md). Do not open a public issue for a security vulnerability or include tokens, private chat identifiers, production payloads, or other sensitive data in an issue, pull request, test, log, screenshot, or commit.
8
+
9
+ Check existing issues and pull requests before opening a new one. For a defect, use the bug template and include a minimal reproduction. For a new capability, use the feature template and explain the public API, behavior, compatibility, and testing implications.
10
+
11
+ ## Local setup
12
+
13
+ The project requires Node.js `>=20` and uses npm for release-compatible commands. Install dependencies and run the baseline checks:
14
+
15
+ ```bash
16
+ npm ci
17
+ npm run typecheck
18
+ npm run test:types
19
+ npm run lint
20
+ npm test
21
+ npm run build
22
+ npm run security
23
+ npm run release:check
24
+ ```
25
+
26
+ The credential-gated Telegram E2E suite is skipped unless the required test environment variables are provided. Never use production credentials in tests. Use `MockTransport`, `createTestBot()`, `createMockUpdate()`, and the integration fixtures for deterministic tests.
27
+
28
+ ## Branches and commits
29
+
30
+ Create a focused branch from `main`. Keep unrelated refactors out of a feature or bug-fix pull request. Use an imperative Conventional Commit-style message, for example `fix: isolate polling handler failures` or `docs: expand storage adapter reference`. Include `[skip release]` only when a change must not trigger the GitHub-to-npm release workflow; maintainers may remove that marker when a release is appropriate.
31
+
32
+ ## Implementation expectations
33
+
34
+ Public behavior must be implemented in TypeScript with strict typing. Do not add fake responses, silent stubs, undocumented breaking behavior, or untested branches. Preserve ESM and CommonJS builds, zero runtime vendor dependencies in the core package, Node.js `>=20` compatibility, and the existing package export map.
35
+
36
+ Changes to routing, context, lifecycle, transport, storage, queue, scheduler, approval, generated API declarations, or release automation require regression tests. Changes to a public function, class, method, option, error, event, or generated method require a corresponding API documentation update. Changes that affect package contents must pass `release:check` and `npm pack --dry-run`.
37
+
38
+ ## Pull request process
39
+
40
+ Open a pull request against `main` and complete the pull request template. Explain the problem, solution, compatibility impact, test evidence, documentation changes, and security implications. Keep the diff reviewable. Maintainers may request changes, split a pull request, or ask for a follow-up issue when scope is too broad.
41
+
42
+ Every pull request must pass the CI workflow. A maintainer reviews API compatibility, error handling, tests, documentation, package contents, and release impact before approval. Do not merge while required checks are failing or unresolved security concerns remain.
43
+
44
+ ## Documentation and translations
45
+
46
+ English is the default README language. Keep `README.id.md`, `README.zh-CN.md`, `docs/API.id.md`, and `docs/API.zh-CN.md` synchronized when public behavior changes. Code signatures, method names, package names, environment variables, and command names must remain exact in every translation.
47
+
48
+ ## Release process
49
+
50
+ Normal pushes to `main` can trigger the protected auto-publish workflow. The workflow runs quality gates, computes an unused patch version, publishes the package, commits the version, creates a tag, and creates a GitHub Release. See [RELEASE_AUTOMATION.md](RELEASE_AUTOMATION.md) for the required `NPM_TOKEN` secret and private-source provenance constraint. Contributors must not publish directly to npm unless explicitly authorized by the maintainers.
51
+
52
+ ## Questions
53
+
54
+ Use the question/support template for usage questions and consult the [English API reference](docs/API.md) first. Keep support requests free of credentials and private user data.
@@ -0,0 +1,41 @@
1
+ # Contribution Rules
2
+
3
+ These rules are the operational requirements for contributions to telebibz. They complement [CONTRIBUTING.md](CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
4
+
5
+ ## Scope and ownership
6
+
7
+ A contribution must have a clear owner, a stated problem, and a bounded outcome. Large changes should be split into reviewable pull requests. Maintainers may reject work that is technically correct but outside the package scope, duplicates an existing design, introduces unnecessary dependencies, or creates disproportionate maintenance cost.
8
+
9
+ ## API and compatibility rules
10
+
11
+ Public exports, constructor options, method signatures, event names, error classes, generated method names, package entrypoints, and persisted data formats are compatibility-sensitive. A breaking change requires an explicit migration note, a versioning decision, updated type-level tests, and maintainer approval.
12
+
13
+ New public APIs must have strict TypeScript types, runtime validation where input can be unsafe, deterministic error behavior, examples, and API reference documentation. Avoid `any` in public signatures. When a Telegram type is not specialized in the core method map, use the vendored `TelegramTypes` declarations or an honest generic boundary rather than inventing an inaccurate shape.
14
+
15
+ ## Runtime and error-handling rules
16
+
17
+ Network operations must honor timeout and cancellation behavior. Retry logic must be bounded and must not retry authentication or validation failures blindly. Update handlers must not terminate polling because one update failed. Background tasks must surface errors through documented hooks or events and must not create unhandled promise rejections.
18
+
19
+ Callback-query handling must work for both message-backed and inline callbacks. Router behavior must state whether first-match or all-match is used. Nested middleware must not execute terminal handlers twice. Persistent state must use the `Storage` abstraction and must document consistency, TTL, and driver assumptions.
20
+
21
+ ## Testing rules
22
+
23
+ A pull request must add or update tests for every changed behavior. Use unit tests for pure logic, integration tests for module boundaries, type-level tests for public signatures, and credential-gated E2E tests only for real Telegram behavior that cannot be represented safely by mocks. Tests must be deterministic and must clean up timers, temporary files, listeners, and network resources.
24
+
25
+ A bug fix is incomplete without a regression test that fails against the old behavior. A feature is incomplete without tests for success, invalid input, cancellation, retry/failure, and boundary behavior where applicable.
26
+
27
+ ## Documentation rules
28
+
29
+ Documentation must describe the implementation that exists in source, not a planned feature. Every documented limitation must remain accurate. English is canonical; Indonesian and Simplified Chinese translations must preserve signatures, code blocks, URLs, environment variables, and command names exactly.
30
+
31
+ ## Dependency and security rules
32
+
33
+ Do not add a runtime dependency without a written justification, license review, bundle/package impact analysis, and maintainer approval. Never commit credentials, private keys, Telegram tokens, npm tokens, test secrets, or real user data. Security-sensitive changes require review of [SECURITY.md](SECURITY.md) and must not be disclosed publicly before a fix or coordinated disclosure decision.
34
+
35
+ ## Release and repository rules
36
+
37
+ Do not edit or overwrite an already published npm version. Do not manually create a release tag that conflicts with the protected workflow. Do not bypass required checks, disable security audit, weaken release checks, or modify workflow permissions without maintainer approval. Use `[skip release]` only for changes that must not publish a package.
38
+
39
+ ## Review standards
40
+
41
+ Reviewers should verify correctness, compatibility, tests, documentation, security, package contents, and operational behavior. Approval is not a guarantee that no defect exists; it confirms that the change meets the current project acceptance criteria and is safe to merge based on the available evidence.
package/GOVERNANCE.md ADDED
@@ -0,0 +1,47 @@
1
+ # Governance
2
+
3
+ ## Project purpose
4
+
5
+ telebibz is a TypeScript Telegram Bot Framework. Governance exists to preserve a stable public API, honest feature scope, secure release automation, and a respectful contributor community.
6
+
7
+ ## Roles
8
+
9
+ | Role | Responsibility |
10
+ |---|---|
11
+ | Users | Report reproducible defects, explain use cases, and provide feedback without publishing secrets. |
12
+ | Contributors | Submit focused code, tests, documentation, and issue reports that follow the project rules. |
13
+ | Reviewers | Examine correctness, compatibility, security, tests, documentation, and operational risk. |
14
+ | Maintainers | Set project direction, review and merge changes, manage releases, triage issues, and protect the repository. |
15
+ | Release maintainers | Control npm credentials, GitHub Actions environments, version tags, npm publication, and release verification. |
16
+
17
+ One person may hold multiple roles, but security-sensitive actions should use separation of duties whenever practical.
18
+
19
+ ## Decision-making
20
+
21
+ Routine decisions are made by maintainers through pull request review and documented issue discussion. Decisions should be based on user benefit, implementation quality, compatibility, security, maintenance cost, and evidence from tests or production reports.
22
+
23
+ For controversial or breaking changes, maintainers should document alternatives, migration impact, and the reason for the selected approach. A maintainer may request a design note before implementation. Silence is not approval for a breaking change.
24
+
25
+ ## Triage
26
+
27
+ New issues are initially classified as bug, feature, documentation, security, support, or duplicate. Maintainers may request a reproduction, reduce sensitive details, split scope, mark a report as blocked, or close it when the requested behavior conflicts with the documented project contract.
28
+
29
+ Security reports are handled privately according to [SECURITY.md](SECURITY.md). Public issues must not contain exploit instructions, credentials, or personal data.
30
+
31
+ ## Pull requests
32
+
33
+ A pull request requires a passing CI workflow and at least one maintainer review. Changes affecting authentication, transport, update dispatch, persistence, release automation, package exports, or security policy may require additional review. Maintainers can require a regression test, API documentation, migration note, or threat-model explanation before merge.
34
+
35
+ ## Releases
36
+
37
+ The protected GitHub Actions workflow is the canonical release path. It runs quality gates, computes a new immutable npm version, publishes the package, creates a version commit and tag, and creates a GitHub Release. Direct npm publication is restricted to authorized release maintainers. Release credentials must remain in GitHub or npm secret storage and must be rotated after exposure.
38
+
39
+ Because the source repository is private, the workflow uses npm publish without provenance. If the repository becomes public and provenance is enabled, the policy and workflow must be reviewed together before the next release.
40
+
41
+ ## Repository protection
42
+
43
+ Required CI checks, branch protection, environment approvals, workflow permissions, package scope, and immutable release rules must not be weakened casually. Any change to these controls requires a pull request, a written rationale, and maintainer approval.
44
+
45
+ ## Amendments
46
+
47
+ Governance changes are proposed through a pull request that explains the current problem, proposed rule, affected roles, and migration plan. The updated governance document becomes effective when the pull request merges.
package/NOTICE.md ADDED
@@ -0,0 +1,7 @@
1
+ # Third-party notices
2
+
3
+ ## Vendored Telegram declarations
4
+
5
+ The declaration files under `src/api/telegram-types/` and the corresponding published `dist` paths are derived from [`@grammyjs/types`](https://www.npmjs.com/package/@grammyjs/types), version `4.0.0`, released under the MIT License.
6
+
7
+ The original license text is preserved at `src/api/telegram-types/LICENSE`. These files are type-only declarations used to expose Telegram Bot API object, union, enum, and method types. They do not add a runtime dependency to telebibz.
package/README.id.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # telebibz
2
2
 
3
- ![telebibz logo](https://cdn.jsdelivr.net/npm/@xbibzlibrary/telebibz@0.1.2/assets/telebibz-logo.png)
3
+ ![telebibz logo](https://raw.githubusercontent.com/XbibzOfficial777/telebibz/main/assets/telebibz-logo.png)
4
4
 
5
5
  **`@xbibzlibrary/telebibz`** adalah SDK dan framework Telegram Bot untuk Node.js dan TypeScript. Paket ini menyediakan API client, polling, router, middleware, context, keyboard builder, state/session, webhook handler, queue, scheduler, cache, plugin lifecycle, CLI, dan utilitas pengujian.
6
6
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  Referensi API lengkap: [English](docs/API.md) · **Indonesia** · [中文](docs/API.zh-CN.md)
10
10
 
11
- ![overview telebibz](assets/telebibz-readme-preview.png)
11
+ ![overview telebibz](https://raw.githubusercontent.com/XbibzOfficial777/telebibz/main/assets/telebibz-readme-preview.png)
12
12
 
13
13
  ## Instalasi
14
14
 
@@ -149,6 +149,20 @@ Daftar method dihasilkan dari dokumentasi Telegram Bot API saat skema diperbarui
149
149
 
150
150
  Repository GitHub menyediakan CI dan workflow auto-publish. Setiap push ke `main` menjalankan quality gates, memilih patch version yang belum dipakai, membuat commit dan tag, menerbitkan package ke npm, lalu membuat GitHub Release. Karena source repository bersifat private, workflow menggunakan `--provenance=false`, sesuai batasan npm untuk source private. Konfigurasikan secret `NPM_TOKEN` pada GitHub Actions sebelum mengandalkan publish otomatis. Lihat [RELEASE_AUTOMATION.md](RELEASE_AUTOMATION.md).
151
151
 
152
+ ## Policy project dan kontribusi
153
+
154
+ | Dokumen | Tujuan |
155
+ |---|---|
156
+ | [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) | Perilaku komunitas, penegakan, pelaporan, dan banding. |
157
+ | [CONTRIBUTING.md](CONTRIBUTING.md) | Setup lokal, branch/commit, test, review, dan release workflow. |
158
+ | [CONTRIBUTION_RULES.md](CONTRIBUTION_RULES.md) | Aturan API, compatibility, testing, dependency, security, dan release. |
159
+ | [GOVERNANCE.md](GOVERNANCE.md) | Peran, pengambilan keputusan, triage, perlindungan repository, dan perubahan aturan. |
160
+ | [SECURITY.md](SECURITY.md) | Pelaporan vulnerability privat, batas security, dan rotasi credential. |
161
+ | [SUPPORT.md](SUPPORT.md) | Channel support, aturan laporan aman, dan ekspektasi response. |
162
+ | [RELEASE_AUTOMATION.md](RELEASE_AUTOMATION.md) | Automation GitHub-to-npm dan setup `NPM_TOKEN`. |
163
+ | [RELEASE_POLICY.md](RELEASE_POLICY.md) | Kontrol immutable release dan hardening. |
164
+ | [NOTICE.md](NOTICE.md) | Atribusi declaration pihak ketiga. |
165
+
152
166
  ## Keamanan
153
167
 
154
168
  Jangan commit token Telegram atau npm. Gunakan variabel lingkungan atau secret manager. Untuk kebijakan keamanan dan peningkatan keamanan rilis, lihat [SECURITY.md](SECURITY.md) dan [RELEASE_POLICY.md](RELEASE_POLICY.md).
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # telebibz
2
2
 
3
- ![telebibz logo](https://cdn.jsdelivr.net/npm/@xbibzlibrary/telebibz@0.1.2/assets/telebibz-logo.png)
3
+ ![telebibz logo](https://raw.githubusercontent.com/XbibzOfficial777/telebibz/main/assets/telebibz-logo.png)
4
4
 
5
5
  [![CI](https://github.com/XbibzOfficial777/telebibz/actions/workflows/ci.yml/badge.svg)](https://github.com/XbibzOfficial777/telebibz/actions/workflows/ci.yml)
6
6
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  Complete API references: [English](docs/API.md) · [Indonesia](docs/API.id.md) · [中文](docs/API.zh-CN.md)
14
14
 
15
- ![telebibz overview](assets/telebibz-readme-preview.png)
15
+ ![telebibz overview](https://raw.githubusercontent.com/XbibzOfficial777/telebibz/main/assets/telebibz-readme-preview.png)
16
16
 
17
17
  ## Installation
18
18
 
@@ -153,7 +153,19 @@ For every exported class, function, method, type, error, lifecycle hook, CLI com
153
153
 
154
154
  The GitHub repository includes CI and an auto-publish workflow. A push to `main` runs the quality gates, chooses the next unused patch version, commits the version, creates a tag, publishes to npm, and creates a GitHub Release. Because the source repository is private, the workflow uses `--provenance=false`, which npm requires for private source repositories. Configure the `NPM_TOKEN` GitHub Actions secret before relying on automatic publication. See [RELEASE_AUTOMATION.md](RELEASE_AUTOMATION.md).
155
155
 
156
- ## Security
156
+ ## Project policies and contribution
157
+
158
+ | Document | Purpose |
159
+ |---|---|
160
+ | [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) | Community behavior, enforcement, reporting, and appeals. |
161
+ | [CONTRIBUTING.md](CONTRIBUTING.md) | Local setup, branch/commit rules, tests, review, and release workflow. |
162
+ | [CONTRIBUTION_RULES.md](CONTRIBUTION_RULES.md) | API, compatibility, testing, dependency, security, and release requirements. |
163
+ | [GOVERNANCE.md](GOVERNANCE.md) | Roles, decision-making, triage, repository protection, and amendments. |
164
+ | [SECURITY.md](SECURITY.md) | Private vulnerability reporting, threat boundaries, and credential rotation. |
165
+ | [SUPPORT.md](SUPPORT.md) | Support channels, safe-reporting rules, and request expectations. |
166
+ | [RELEASE_AUTOMATION.md](RELEASE_AUTOMATION.md) | GitHub-to-npm automation and required `NPM_TOKEN` setup. |
167
+ | [RELEASE_POLICY.md](RELEASE_POLICY.md) | Immutable release and hardening controls. |
168
+ | [NOTICE.md](NOTICE.md) | Third-party declaration attribution. |
157
169
 
158
170
  Never commit Telegram tokens or npm credentials. Use environment variables or a secret manager. See [SECURITY.md](SECURITY.md) and [RELEASE_POLICY.md](RELEASE_POLICY.md) for security and release hardening policies.
159
171
 
package/README.zh-CN.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # telebibz
2
2
 
3
- ![telebibz 徽标](https://cdn.jsdelivr.net/npm/@xbibzlibrary/telebibz@0.1.2/assets/telebibz-logo.png)
3
+ ![telebibz 徽标](https://raw.githubusercontent.com/XbibzOfficial777/telebibz/main/assets/telebibz-logo.png)
4
4
 
5
5
  **`@xbibzlibrary/telebibz`** 是一个面向 Node.js 和 TypeScript 的 Telegram Bot SDK 和框架。该包提供 API 客户端、轮询、路由器、中间件、上下文、键盘构造器、状态/会话、Webhook 处理、队列、调度器、缓存、插件生命周期、CLI 以及测试工具。
6
6
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  完整 API 参考:[English](docs/API.md) · [Indonesia](docs/API.id.md) · **中文**
10
10
 
11
- ![telebibz 概览](assets/telebibz-readme-preview.png)
11
+ ![telebibz 概览](https://raw.githubusercontent.com/XbibzOfficial777/telebibz/main/assets/telebibz-readme-preview.png)
12
12
 
13
13
  ## 安装
14
14
 
@@ -149,6 +149,20 @@ npm run release:check
149
149
 
150
150
  GitHub repository 提供 CI 和自动发布 workflow。每次推送到 `main` 都会运行 quality gates,选择尚未使用的 patch version,创建 commit 和 tag,发布 npm package,然后创建 GitHub Release。由于 source repository 是 private,workflow 使用 `--provenance=false`,符合 npm 对 private source 的限制。依赖自动发布前,请在 GitHub Actions 中配置 `NPM_TOKEN` secret。请参阅 [RELEASE_AUTOMATION.md](RELEASE_AUTOMATION.md)。
151
151
 
152
+ ## 项目 policy 和贡献
153
+
154
+ | 文档 | 用途 |
155
+ |---|---|
156
+ | [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) | 社区行为、执行、报告和申诉。 |
157
+ | [CONTRIBUTING.md](CONTRIBUTING.md) | 本地 setup、branch/commit、测试、review 和 release workflow。 |
158
+ | [CONTRIBUTION_RULES.md](CONTRIBUTION_RULES.md) | API、兼容性、测试、依赖、安全和 release 规则。 |
159
+ | [GOVERNANCE.md](GOVERNANCE.md) | 角色、决策、triage、repository protection 和规则修改。 |
160
+ | [SECURITY.md](SECURITY.md) | 私密漏洞报告、security boundary 和 credential rotation。 |
161
+ | [SUPPORT.md](SUPPORT.md) | Support channel、安全报告规则和 response 预期。 |
162
+ | [RELEASE_AUTOMATION.md](RELEASE_AUTOMATION.md) | GitHub-to-npm automation 和 `NPM_TOKEN` setup。 |
163
+ | [RELEASE_POLICY.md](RELEASE_POLICY.md) | Immutable release 和 hardening 控制。 |
164
+ | [NOTICE.md](NOTICE.md) | 第三方 declaration attribution。 |
165
+
152
166
  ## 安全
153
167
 
154
168
  不要将 Telegram token 或 npm 凭证提交到版本控制。使用环境变量或机密管理器。有关安全策略和发布加固,请参见 [SECURITY.md](SECURITY.md) 和 [RELEASE_POLICY.md](RELEASE_POLICY.md)。
package/SECURITY.md CHANGED
@@ -2,14 +2,46 @@
2
2
 
3
3
  ## Supported versions
4
4
 
5
- Security fixes target the latest development branch and the latest published stable release.
5
+ Security fixes target the latest development branch and the latest published stable release. Older versions may not receive backports. Upgrade to the latest release before requesting a fix unless the issue prevents upgrading.
6
+
7
+ | Version | Supported |
8
+ |---|---|
9
+ | `main` | Yes, subject to current development changes |
10
+ | Latest `0.x` release | Yes |
11
+ | Older releases | Best effort only |
6
12
 
7
13
  ## Reporting a vulnerability
8
14
 
9
- Jangan publikasikan token bot, payload sensitif, atau detail eksploit pada issue terbuka. Kirim laporan privat kepada maintainer package dengan deskripsi reproduksi minimal, impact, versi Node.js, versi `telebibz`, dan apakah masalah terjadi pada transport, webhook, routing, storage, atau CLI.
15
+ Do not publish tokens, sensitive payloads, exploit instructions, private chat content, or personal data in a public issue, pull request, discussion, or commit.
16
+
17
+ Use GitHub's private vulnerability reporting or Security Advisory flow for this repository when available: [Report a private vulnerability](https://github.com/XbibzOfficial777/telebibz/security/advisories/new). If that flow is unavailable, contact the repository maintainers privately through an authenticated GitHub channel and request a secure reporting path. Do not create a public issue to ask where to report a vulnerability.
18
+
19
+ A useful report includes the affected version or commit, Node.js version, impact, attack prerequisites, a minimal safe reproduction, affected subsystem, and a proposed mitigation if known. Redact credentials, personal information, private Telegram identifiers, and production payloads. Attachments should be sanitized before submission.
20
+
21
+ ## What to report privately
22
+
23
+ Report authentication bypasses, secret exposure, webhook verification failures, unsafe file or URL handling, arbitrary code execution, injection, cross-user state leakage, approval-gate bypasses, dependency supply-chain issues, release-workflow compromise, and vulnerabilities that can cause unauthorized Telegram actions or data disclosure.
24
+
25
+ Ordinary bugs without a security impact should use the public [Bug Report template](.github/ISSUE_TEMPLATE/bug_report.yml). Documentation and support requests should use their dedicated templates.
26
+
27
+ ## Response process
28
+
29
+ Maintainers acknowledge a private report when practical, reproduce it in an isolated environment, assess severity and affected versions, coordinate a fix, and publish a security advisory or release note when disclosure is appropriate. Timelines depend on severity, reproducibility, maintainer availability, and coordination with affected users or upstream providers.
30
+
31
+ Reporters should allow reasonable time for remediation and coordinated disclosure. Do not publicly disclose a vulnerability, proof of exploit, or affected production target before maintainers confirm that disclosure is safe.
10
32
 
11
33
  ## Security boundaries
12
34
 
13
- `telebibz` tidak mengirim telemetry ke third party secara otomatis. Token harus diberikan melalui environment atau secret manager dan tidak boleh dimasukkan ke source control. Aplikasi pengguna bertanggung jawab untuk membatasi akses server webhook, mengelola secret rotation, memvalidasi authorization domain Mini App, dan memilih adapter storage yang aman.
35
+ telebibz does not send telemetry to third parties automatically. Tokens must be supplied through environment variables or a secret manager and must never be committed to source control, issue text, logs, screenshots, package archives, or workflow output.
36
+
37
+ Telegram input is untrusted. Callback data, file paths, URLs, JSON payloads, and user-provided text must be validated before being used as filesystem, network, database, shell, or authorization input. Webhook deployments must restrict access, verify the Telegram secret token, enforce body-size limits, and apply infrastructure-level rate limiting where appropriate.
38
+
39
+ Storage adapters are security boundaries owned by the application. Configure Redis, SQL, Mongo, and file permissions according to the deployment threat model. Do not store secrets or unnecessary personal data in sessions, conversations, caches, queues, or approval records.
40
+
41
+ ## Credential exposure and rotation
42
+
43
+ If a Telegram or npm credential is exposed, revoke or rotate it immediately through the relevant provider, remove it from uncommitted files and logs, invalidate affected sessions, inspect release history, and report the exposure privately. Removing a secret from the latest commit does not remove it from history or external logs.
44
+
45
+ ## Security updates
14
46
 
15
- Input dari Telegram dianggap tidak tepercaya. Callback data, file path, URL, JSON payload, dan user-provided text harus divalidasi sebelum digunakan sebagai perintah filesystem, network, atau database.
47
+ Security fixes may change behavior or require a new immutable npm version. Follow [RELEASE_POLICY.md](RELEASE_POLICY.md) and [RELEASE_AUTOMATION.md](RELEASE_AUTOMATION.md) for the protected release path.
package/SUPPORT.md ADDED
@@ -0,0 +1,30 @@
1
+ # Support Policy
2
+
3
+ ## Before requesting support
4
+
5
+ Read the [English API reference](docs/API.md), the localized API references, [CONTRIBUTING.md](CONTRIBUTING.md), and the relevant release or security policy. Search existing issues and discussions before opening a new request.
6
+
7
+ ## Where to ask
8
+
9
+ | Need | Channel |
10
+ |---|---|
11
+ | Usage question or configuration help | GitHub issue using the Question/Support template |
12
+ | Reproducible defect | GitHub issue using the Bug Report template |
13
+ | New capability | GitHub issue using the Feature Request template |
14
+ | Documentation error | GitHub issue using the Documentation template |
15
+ | Security vulnerability | Private process described in [SECURITY.md](SECURITY.md); never a public issue |
16
+ | Contribution or patch | Pull request following [CONTRIBUTING.md](CONTRIBUTING.md) |
17
+
18
+ ## Information to include
19
+
20
+ Provide the telebibz version, Node.js version, operating system where relevant, module system, minimal reproduction, expected behavior, actual behavior, stack trace with secrets removed, and the result of relevant quality gates. Include whether the behavior occurs with ESM, CommonJS, mocks, or a real Telegram environment.
21
+
22
+ Never include Telegram bot tokens, npm tokens, private keys, cookies, authorization headers, real user identifiers, private chat content, or unredacted production payloads. Replace sensitive values with placeholders before posting.
23
+
24
+ ## Response expectations
25
+
26
+ This is a community-maintained project. Maintainers prioritize security reports, release blockers, data-loss risks, regressions, and reproducible runtime failures. Response and fix times are not guaranteed. A support request may be closed when it lacks a reproduction after reasonable follow-up, duplicates an existing issue, or asks for behavior outside the documented scope.
27
+
28
+ ## Support boundaries
29
+
30
+ Support does not include operating a user's production infrastructure, recovering deleted credentials, guaranteeing Telegram availability, or bypassing npm/GitHub permission controls. For Telegram platform behavior, verify the official Telegram Bot API documentation as well as the telebibz API reference.
@@ -1 +1 @@
1
- {"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../../../src/approval/approval.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAW,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAGrD,MA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CAAC,QAAQ,CAAC,OAAO,CAAU;gBACL,GAAG,EAAE,SAAS,EAAmB,OAAO,EAAE,eAAe;IAMhF,KAAK,CAAC,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAAC;IAiCzD,cAAc,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,cAAc,CAAA;KAAE,CAAC;IAwB/F,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAC1C,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAC7C,OAAO,CAAC,GAAG;IACX,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,aAAa;YACP,qBAAqB;CACpC"}
@@ -1,5 +1,6 @@
1
1
  import { randomBytes } from "node:crypto";
2
2
  import { InlineKeyboard } from "../keyboard/index.js";
3
+ import { buildApprovalNotification } from "../branding/branding.js";
3
4
  export class MemoryApprovalStore {
4
5
  records = new Map();
5
6
  async get(key) { const value = this.records.get(key); return value ? { ...value } : undefined; }
@@ -56,7 +57,8 @@ export class ApprovalGate {
56
57
  .build();
57
58
  const message = await this.api.methods.sendMessage({
58
59
  chat_id: this.options.ownerChatId,
59
- text: `Haloo ${ownerLabel}, ada yang memakai library telebibz nihh\n\n${botLine}\n${ownerIdLine}\nStatus: menunggu izin owner.`,
60
+ text: buildApprovalNotification({ ownerLabel, botLine, ownerIdLine }),
61
+ parse_mode: "HTML",
60
62
  reply_markup: keyboard,
61
63
  });
62
64
  record.notificationMessageId = message.message_id;
@@ -1 +1 @@
1
- {"version":3,"file":"approval.js","sourceRoot":"","sources":["../../../src/approval/approval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI1C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AA2CtD,MAAM,OAAO,mBAAmB;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,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAE,EAAE,CAAC,CAAC,CAAC;IACzT,KAAK,CAAC,qBAAqB,CAAC,OAAgB,EAAE,MAAsB,EAAE,MAAsB,IAAmB,MAAM,UAAU,GAAG,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,MAAM,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,0CAA0C,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,aAAa,UAAU,sBAAsB,MAAM,CAAC,SAAS,IAAI,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;CAC/e"}
@@ -0,0 +1,17 @@
1
+ export declare const TELEBIBZ_BRAND_TEXT = "Library Bot Telegram By @xbibzofficial";
2
+ export interface BrandingBoxOptions {
3
+ title?: string;
4
+ footer?: string;
5
+ }
6
+ /**
7
+ * Telegram does not support arbitrary font colors. Colored square markers and a
8
+ * monospace Unicode box provide a portable colored/boxed treatment in clients.
9
+ */
10
+ export declare function buildBrandingBox(options?: BrandingBoxOptions): string;
11
+ export interface ApprovalBrandingDetails {
12
+ ownerLabel: string;
13
+ botLine: string;
14
+ ownerIdLine: string;
15
+ }
16
+ export declare function buildApprovalNotification(details: ApprovalBrandingDetails): string;
17
+ //# sourceMappingURL=branding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branding.d.ts","sourceRoot":"","sources":["../../../src/branding/branding.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,2CAA2C,CAAC;AAE5E,MAAM,WAAW,kBAAkB;IAAG,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;AAEvE;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,kBAAuB,GAAG,MAAM,CAYzE;AAED,MAAM,WAAW,uBAAuB;IAAG,UAAU,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE;AAErG,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,uBAAuB,GAAG,MAAM,CAUlF"}
@@ -0,0 +1,35 @@
1
+ export const TELEBIBZ_BRAND_TEXT = "Library Bot Telegram By @xbibzofficial";
2
+ /**
3
+ * Telegram does not support arbitrary font colors. Colored square markers and a
4
+ * monospace Unicode box provide a portable colored/boxed treatment in clients.
5
+ */
6
+ export function buildBrandingBox(options = {}) {
7
+ const title = options.title ?? "TELEBIBZ";
8
+ const footer = options.footer ?? TELEBIBZ_BRAND_TEXT;
9
+ const safeFooter = escapeHtml(footer);
10
+ const innerWidth = Math.max(32, [...safeFooter].length);
11
+ const horizontal = "─".repeat(innerWidth + 2);
12
+ return [
13
+ `🟦 <b>${escapeHtml(title)}</b> 🟪`,
14
+ `<pre>┌${horizontal}┐`,
15
+ `│ ${padBox(safeFooter, innerWidth)} │`,
16
+ `└${horizontal}┘</pre>`,
17
+ ].join("\n");
18
+ }
19
+ export function buildApprovalNotification(details) {
20
+ return [
21
+ buildBrandingBox(),
22
+ "",
23
+ `Haloo ${escapeHtml(details.ownerLabel)}, ada yang memakai library telebibz nihh`,
24
+ "",
25
+ escapeHtml(details.botLine),
26
+ escapeHtml(details.ownerIdLine),
27
+ "Status: menunggu izin owner.",
28
+ ].join("\n");
29
+ }
30
+ function padBox(value, width) {
31
+ const safe = [...value].slice(0, width).join("");
32
+ return `${safe}${" ".repeat(Math.max(0, width - [...safe].length))}`;
33
+ }
34
+ function escapeHtml(value) { return value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;"); }
35
+ //# sourceMappingURL=branding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"branding.js","sourceRoot":"","sources":["../../../src/branding/branding.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,wCAAwC,CAAC;AAI5E;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,UAA8B,EAAE;IAC/D,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,UAAU,CAAC;IAC1C,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,mBAAmB,CAAC;IACrD,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IACtC,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;IACxD,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC;IAC9C,OAAO;QACL,SAAS,UAAU,CAAC,KAAK,CAAC,SAAS;QACnC,SAAS,UAAU,GAAG;QACtB,KAAK,MAAM,CAAC,UAAU,EAAE,UAAU,CAAC,IAAI;QACvC,IAAI,UAAU,SAAS;KACxB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAID,MAAM,UAAU,yBAAyB,CAAC,OAAgC;IACxE,OAAO;QACL,gBAAgB,EAAE;QAClB,EAAE;QACF,SAAS,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,0CAA0C;QACjF,EAAE;QACF,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC;QAC3B,UAAU,CAAC,OAAO,CAAC,WAAW,CAAC;QAC/B,8BAA8B;KAC/B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,SAAS,MAAM,CAAC,KAAa,EAAE,KAAa;IAC1C,MAAM,IAAI,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACjD,OAAO,GAAG,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;AACvE,CAAC;AAED,SAAS,UAAU,CAAC,KAAa,IAAY,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC"}
@@ -8,6 +8,7 @@ import { EventBus, type EventMap } from "./events.js";
8
8
  import { type Storage } from "../storage/storage.js";
9
9
  import { PluginManager, type Plugin } from "../plugins/plugin.js";
10
10
  import { ApprovalGate, type ApprovalOptions } from "../approval/approval.js";
11
+ import { Logger, type LoggerOptions } from "../observability/logger.js";
11
12
  export type BotStatus = "created" | "initialized" | "awaiting-approval" | "starting" | "running" | "stopping" | "stopped" | "error";
12
13
  export type BotContext<S extends object = Record<string, unknown>> = Context<S>;
13
14
  export interface BotOptions<S extends object = Record<string, unknown>> {
@@ -26,6 +27,7 @@ export interface BotOptions<S extends object = Record<string, unknown>> {
26
27
  };
27
28
  approval?: ApprovalOptions;
28
29
  router?: RouterOptions;
30
+ logger?: Logger | LoggerOptions;
29
31
  }
30
32
  export interface HealthStatus {
31
33
  status: BotStatus;
@@ -43,6 +45,7 @@ export declare class Bot<S extends object = Record<string, unknown>> {
43
45
  readonly services: Record<string, unknown>;
44
46
  readonly approval: ApprovalGate | undefined;
45
47
  readonly token: string;
48
+ readonly logger: Logger;
46
49
  private readonly middlewares;
47
50
  private readonly pollingOptions;
48
51
  private statusValue;
@@ -1 +1 @@
1
- {"version":3,"file":"bot.d.ts","sourceRoot":"","sources":["../../../src/core/bot.ts"],"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