botinabox 0.5.2 → 0.5.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.
@@ -0,0 +1,6 @@
1
+ import {
2
+ GoogleGmailConnector
3
+ } from "./chunk-3X3YKI4T.js";
4
+ export {
5
+ GoogleGmailConnector
6
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ GoogleGmailConnector
3
+ } from "./chunk-UACT2WXX.js";
4
+ export {
5
+ GoogleGmailConnector
6
+ };
@@ -0,0 +1,6 @@
1
+ import {
2
+ GoogleGmailConnector
3
+ } from "./chunk-D47AIFOD.js";
4
+ export {
5
+ GoogleGmailConnector
6
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "botinabox",
3
- "version": "0.5.2",
3
+ "version": "0.5.5",
4
4
  "description": "Bot in a Box — framework for building multi-agent bots",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -42,10 +42,18 @@
42
42
  "bin": {
43
43
  "botinabox": "./bin/botinabox.mjs"
44
44
  },
45
+ "files": [
46
+ "dist",
47
+ "bin"
48
+ ],
49
+ "engines": {
50
+ "node": ">=18"
51
+ },
45
52
  "scripts": {
46
53
  "build": "tsup",
47
54
  "test": "vitest run",
48
- "typecheck": "tsc --noEmit"
55
+ "typecheck": "tsc --noEmit",
56
+ "prepublishOnly": "npm run build && npm run typecheck && npm test"
49
57
  },
50
58
  "dependencies": {
51
59
  "@types/uuid": "^10.0.0",
package/CHANGELOG.md DELETED
@@ -1,76 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to `botinabox` are documented here.
4
-
5
- Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versioning: [SemVer](https://semver.org/).
6
-
7
- ---
8
-
9
- ## [0.5.2] — 2026-04-04
10
-
11
- ### Added
12
-
13
- - **`authenticate()` method on Connector interface** — optional method for connectors that require OAuth or other auth flows. Accepts a `codeProvider` callback for interactive or programmatic authorization.
14
- - **Google connectors implement `authenticate()`** — `GoogleGmailConnector` and `GoogleCalendarConnector` now support self-authentication: generate consent URL, exchange code for tokens, persist via tokenSaver callback.
15
- - **`botinabox auth google` CLI** — native CLI command for Google OAuth setup: `botinabox auth google <account-email> --client-id=... --client-secret=...`. Stores tokens in the secrets table.
16
-
17
- ## [0.5.1] — 2026-04-04
18
-
19
- ### Fixed
20
-
21
- - **cron-parser ESM import** — cron-parser v4 is CommonJS-only; fixed named import to default import (`import cronParser from "cron-parser"`).
22
-
23
- ## [0.5.0] — 2026-04-04
24
-
25
- ### Added
26
-
27
- - **Connector interface** — Generic `Connector<T>` abstraction for external service integrations (Gmail, Calendar, Trello, Jira, Salesforce, etc.). Pull-based `sync()` returns typed records; optional `push()` writes back. Connectors produce data — consumers decide where to store it. New `connectors` config key in `BotConfig`.
28
- - **Google connectors** — `GoogleGmailConnector` and `GoogleCalendarConnector` implementing `Connector<EmailRecord>` and `Connector<CalendarEventRecord>`. Incremental sync (Gmail historyId, Calendar syncToken), full sync with pagination, email sending via `push()`. OAuth2 helpers with callback-based token persistence. Exported from `botinabox/google`. `googleapis` as optional peer dependency.
29
- - **Scheduler** — Database-backed `Scheduler` class with `schedules` core table. Supports recurring (cron expressions via `cron-parser`) and one-time schedules. Hook-based actions: when a schedule fires, it emits the configured action as a hook event. Methods: `register()`, `update()`, `unregister()`, `list()`, `tick()`.
30
- - **`schedules` core table** — id, name, type (recurring/one_time), cron, run_at, timezone, enabled, action, action_config, last_fired_at, next_fire_at.
31
-
32
- ### Deprecated
33
-
34
- - **HeartbeatScheduler** — Replaced by `Scheduler`. HeartbeatScheduler uses in-memory `setInterval` which loses state on restart. Kept for backward compatibility but marked `@deprecated`.
35
-
36
- ### Dependencies
37
-
38
- - Added `cron-parser` ^4.9.0.
39
- - Added `googleapis` >=140.0.0 as optional peer dependency.
40
-
41
- ## [0.3.0] — 2026-04-03
42
-
43
- ### Added
44
-
45
- - **Domain tables** — `defineDomainTables(db, options?)` creates standard multi-agent app tables: org, project, client, invoice, repository, file, channel, rule, event + junction tables. Configurable: disable clients, repos, files, channels, rules, or events.
46
- - **Domain entity contexts** — `defineDomainEntityContexts(db, options?)` renders per-entity context directories for all domain tables. Projects get REPOS.md + RULES.md. Clients get REPOS.md + AGENTS.md + INVOICES.md.
47
- - **Claude stream parser** — `parseClaudeStream(stdout)` parses Claude CLI NDJSON output into structured results (session, model, cost, tokens, text, errors). Plus `isMaxTurns()`, `isLoginRequired()`, `deactivateLocalImagePaths()`.
48
- - **Process env builder** — `buildProcessEnv(allowedKeys?, inject?)` creates a clean subprocess environment with only safe variables. Strips all secrets.
49
-
50
- ## [0.2.0] — 2026-04-03
51
-
52
- ### Added
53
-
54
- - **Users primitive** — `users` and `user_identities` core tables. Users are protected objects (never auto-rendered into other entities' context). `UserRegistry` class: `register()`, `getById()`, `getByEmail()`, `resolveByIdentity()`, `resolveOrCreate()`, `addIdentity()`.
55
- - **Secrets primitive** — `secrets` core table for encrypted credential storage. Protected by default. `SecretStore` class: `set()`, `get()`, `getMeta()`, `list()`, `rotate()`, `delete()`.
56
- - **Message pipeline user resolution** — `MessagePipeline` accepts optional `UserRegistry`. When provided, resolves `InboundMessage.from` to a user ID via `resolveOrCreate()` before task creation. `InboundMessage.userId` field added.
57
- - **`user_id` on messages table** — Tracks resolved user alongside raw `peer_id`.
58
- - **Protected/encrypted passthrough** — `EntityContextDef` now supports `protected` and `encrypted` fields, passed through to Lattice's entity context system.
59
-
60
- ### Changed
61
-
62
- - Core table count: 15 → 18 (added `users`, `user_identities`, `secrets`).
63
- - `messages` table gains `user_id` column.
64
-
65
- ## [0.1.1] — 2026-03-28
66
-
67
- ### Fixed
68
-
69
- - Initial release bug fixes and stability improvements.
70
-
71
- ## [0.1.0] — 2026-03-25
72
-
73
- ### Added
74
-
75
- - Initial release: DataStore, HookBus, AgentRegistry, TaskQueue, RunManager, WakeupQueue, BudgetController, WorkflowEngine, SessionManager, ChannelRegistry, MessagePipeline.
76
- - 15 core tables, LLM provider routing, channel adapters (Slack, Discord, Webhook).
package/CONTRIBUTING.md DELETED
@@ -1,92 +0,0 @@
1
- # Contributing
2
-
3
- Thanks for your interest in contributing to Bot in a Box.
4
-
5
- ## Development Setup
6
-
7
- ```bash
8
- git clone https://github.com/automated-industries/botinabox.git
9
- cd botinabox
10
- pnpm install
11
- pnpm build
12
- ```
13
-
14
- ## Project Structure
15
-
16
- This is a pnpm monorepo. Packages are in `packages/`:
17
-
18
- - `shared/` — Types and constants (zero dependencies)
19
- - `core/` — Core framework
20
- - `cli/` — CLI scaffolding tool
21
- - `providers/` — LLM provider adapters
22
- - `channels/` — Messaging channel adapters
23
-
24
- ## Running Tests
25
-
26
- ```bash
27
- # All packages
28
- pnpm test:run
29
-
30
- # Single package
31
- cd packages/core && pnpm test
32
- ```
33
-
34
- Tests use [Vitest](https://vitest.dev/). Each package has its own `vitest.config.ts`.
35
-
36
- ## Building
37
-
38
- ```bash
39
- # All packages
40
- pnpm build
41
-
42
- # Single package
43
- cd packages/core && pnpm build
44
- ```
45
-
46
- Build uses [tsup](https://tsup.egoist.dev/) targeting ESM with declaration files.
47
-
48
- ## Type Checking
49
-
50
- ```bash
51
- pnpm typecheck
52
- ```
53
-
54
- ## Code Style
55
-
56
- - TypeScript with strict mode
57
- - ESM modules (`"type": "module"`)
58
- - ES2022 target
59
- - No default exports except for provider/channel factory functions
60
-
61
- ## Making Changes
62
-
63
- 1. Create a branch from `main`
64
- 2. Make your changes
65
- 3. Add or update tests
66
- 4. Run `pnpm test:run` and `pnpm typecheck`
67
- 5. Open a pull request
68
-
69
- ## Adding a Provider
70
-
71
- 1. Create `packages/providers/your-provider/`
72
- 2. Implement the `LLMProvider` interface from `@botinabox/shared`
73
- 3. Export a default factory function
74
- 4. Add `"botinabox": { "type": "provider" }` to `package.json`
75
- 5. Add tests
76
-
77
- ## Adding a Channel Adapter
78
-
79
- 1. Create `packages/channels/your-channel/`
80
- 2. Implement the `ChannelAdapter` interface from `@botinabox/shared`
81
- 3. Export a default factory function
82
- 4. Add `"botinabox": { "type": "channel" }` to `package.json`
83
- 5. Add tests
84
-
85
- ## Reporting Issues
86
-
87
- Open an issue on GitHub with:
88
-
89
- - Steps to reproduce
90
- - Expected behavior
91
- - Actual behavior
92
- - Node.js and pnpm versions