create-boringos 0.1.0
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.
- package/LICENSE +21 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +94 -0
- package/dist/index.js.map +1 -0
- package/dist/templates/full/.env.example.tmpl +23 -0
- package/dist/templates/full/.gitignore.tmpl +5 -0
- package/dist/templates/full/README.md.tmpl +38 -0
- package/dist/templates/full/package.json.tmpl +23 -0
- package/dist/templates/full/src/index.ts.tmpl +60 -0
- package/dist/templates/full/tsconfig.json.tmpl +15 -0
- package/dist/templates/minimal/.env.example.tmpl +10 -0
- package/dist/templates/minimal/.gitignore.tmpl +5 -0
- package/dist/templates/minimal/README.md.tmpl +26 -0
- package/dist/templates/minimal/package.json.tmpl +19 -0
- package/dist/templates/minimal/src/index.ts.tmpl +14 -0
- package/dist/templates/minimal/tsconfig.json.tmpl +15 -0
- package/dist/templates/templates/full/.env.example.tmpl +23 -0
- package/dist/templates/templates/full/.gitignore.tmpl +5 -0
- package/dist/templates/templates/full/README.md.tmpl +38 -0
- package/dist/templates/templates/full/package.json.tmpl +23 -0
- package/dist/templates/templates/full/src/index.ts.tmpl +60 -0
- package/dist/templates/templates/full/tsconfig.json.tmpl +15 -0
- package/dist/templates/templates/minimal/.env.example.tmpl +10 -0
- package/dist/templates/templates/minimal/.gitignore.tmpl +5 -0
- package/dist/templates/templates/minimal/README.md.tmpl +26 -0
- package/dist/templates/templates/minimal/package.json.tmpl +19 -0
- package/dist/templates/templates/minimal/src/index.ts.tmpl +14 -0
- package/dist/templates/templates/minimal/tsconfig.json.tmpl +15 -0
- package/package.json +35 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 BoringOS Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { mkdirSync, writeFileSync, readFileSync, readdirSync, existsSync, statSync } from "node:fs";
|
|
3
|
+
import { join, dirname, resolve } from "node:path";
|
|
4
|
+
import { execSync } from "node:child_process";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
function main() {
|
|
8
|
+
const args = process.argv.slice(2);
|
|
9
|
+
const name = args.find((a) => !a.startsWith("--"));
|
|
10
|
+
const template = args.includes("--template")
|
|
11
|
+
? args[args.indexOf("--template") + 1] ?? "minimal"
|
|
12
|
+
: args.includes("--full") ? "full" : "minimal";
|
|
13
|
+
if (!name || args.includes("--help") || args.includes("-h")) {
|
|
14
|
+
console.log(`
|
|
15
|
+
create-boringos — scaffold a new BoringOS project
|
|
16
|
+
|
|
17
|
+
Usage:
|
|
18
|
+
npx create-boringos <project-name> [options]
|
|
19
|
+
|
|
20
|
+
Options:
|
|
21
|
+
--template <minimal|full> Template to use (default: minimal)
|
|
22
|
+
--full Shorthand for --template full
|
|
23
|
+
--help Show this help
|
|
24
|
+
|
|
25
|
+
Examples:
|
|
26
|
+
npx create-boringos my-app
|
|
27
|
+
npx create-boringos my-app --full
|
|
28
|
+
`);
|
|
29
|
+
process.exit(name ? 0 : 1);
|
|
30
|
+
}
|
|
31
|
+
if (template !== "minimal" && template !== "full") {
|
|
32
|
+
console.error(`Unknown template: ${template}. Use "minimal" or "full".`);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
const projectDir = resolve(process.cwd(), name);
|
|
36
|
+
if (existsSync(projectDir)) {
|
|
37
|
+
console.error(`Directory already exists: ${projectDir}`);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
|
40
|
+
console.log(`\nCreating ${name} with ${template} template...\n`);
|
|
41
|
+
// Copy template files
|
|
42
|
+
const templateDir = join(__dirname, "templates", template);
|
|
43
|
+
copyTemplate(templateDir, projectDir, { name });
|
|
44
|
+
// Detect package manager
|
|
45
|
+
const pm = detectPackageManager();
|
|
46
|
+
// Install dependencies
|
|
47
|
+
console.log(`Installing dependencies with ${pm}...\n`);
|
|
48
|
+
try {
|
|
49
|
+
execSync(`${pm} install`, { cwd: projectDir, stdio: "inherit" });
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
console.log("\nDependency installation failed. Run it manually:");
|
|
53
|
+
console.log(` cd ${name} && ${pm} install`);
|
|
54
|
+
}
|
|
55
|
+
console.log(`
|
|
56
|
+
Done! Your BoringOS app is ready.
|
|
57
|
+
|
|
58
|
+
cd ${name}
|
|
59
|
+
${pm} run dev
|
|
60
|
+
|
|
61
|
+
Server starts on http://localhost:3000 with embedded Postgres.
|
|
62
|
+
Health check: http://localhost:3000/health
|
|
63
|
+
`);
|
|
64
|
+
}
|
|
65
|
+
function copyTemplate(src, dest, vars) {
|
|
66
|
+
mkdirSync(dest, { recursive: true });
|
|
67
|
+
for (const entry of readdirSync(src)) {
|
|
68
|
+
const srcPath = join(src, entry);
|
|
69
|
+
const stat = statSync(srcPath);
|
|
70
|
+
if (stat.isDirectory()) {
|
|
71
|
+
copyTemplate(srcPath, join(dest, entry), vars);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
let content = readFileSync(srcPath, "utf8");
|
|
75
|
+
// Replace template variables
|
|
76
|
+
for (const [key, value] of Object.entries(vars)) {
|
|
77
|
+
content = content.replaceAll(`{{${key}}}`, value);
|
|
78
|
+
}
|
|
79
|
+
// Remove .tmpl extension
|
|
80
|
+
const destName = entry.endsWith(".tmpl") ? entry.slice(0, -5) : entry;
|
|
81
|
+
writeFileSync(join(dest, destName), content);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function detectPackageManager() {
|
|
86
|
+
const userAgent = process.env.npm_config_user_agent ?? "";
|
|
87
|
+
if (userAgent.includes("pnpm"))
|
|
88
|
+
return "pnpm";
|
|
89
|
+
if (userAgent.includes("yarn"))
|
|
90
|
+
return "yarn";
|
|
91
|
+
return "npm";
|
|
92
|
+
}
|
|
93
|
+
main();
|
|
94
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACpG,OAAO,EAAE,IAAI,E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+
# Database (optional — embedded Postgres used if not set)
|
|
5
|
+
# DATABASE_URL=postgres://user:pass@localhost:5432/myapp
|
|
6
|
+
|
|
7
|
+
# Auth (set in production)
|
|
8
|
+
# AUTH_SECRET=change-me-in-production
|
|
9
|
+
|
|
10
|
+
# Memory (optional)
|
|
11
|
+
# HEBBS_ENDPOINT=https://api.hebbs.ai
|
|
12
|
+
# HEBBS_API_KEY=your-key
|
|
13
|
+
# HEBBS_WORKSPACE=your-workspace
|
|
14
|
+
|
|
15
|
+
# Slack connector (optional)
|
|
16
|
+
# SLACK_SIGNING_SECRET=your-signing-secret
|
|
17
|
+
|
|
18
|
+
# Google connector (optional)
|
|
19
|
+
# GOOGLE_CLIENT_ID=your-client-id
|
|
20
|
+
# GOOGLE_CLIENT_SECRET=your-client-secret
|
|
21
|
+
|
|
22
|
+
# Redis for BullMQ (optional — in-process queue used if not set)
|
|
23
|
+
# REDIS_URL=redis://localhost:6379
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# {{name}}
|
|
2
|
+
|
|
3
|
+
Built with [BoringOS](https://github.com/boringos/boringos).
|
|
4
|
+
|
|
5
|
+
## Run
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
cp .env.example .env # configure your environment
|
|
9
|
+
npm run dev # starts on http://localhost:3000
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## What's included
|
|
13
|
+
|
|
14
|
+
- Embedded PostgreSQL (zero setup)
|
|
15
|
+
- 6 runtime adapters (Claude, ChatGPT, Gemini, Ollama, command, webhook)
|
|
16
|
+
- 12 persona bundles
|
|
17
|
+
- Workflow engine with branching
|
|
18
|
+
- JWT-authenticated callback API
|
|
19
|
+
- Slack connector (configure SLACK_SIGNING_SECRET)
|
|
20
|
+
- Google Workspace connector (configure GOOGLE_CLIENT_ID)
|
|
21
|
+
- Hebbs memory (configure HEBBS_ENDPOINT)
|
|
22
|
+
- BullMQ queue (configure REDIS_URL)
|
|
23
|
+
- Custom context provider example
|
|
24
|
+
|
|
25
|
+
## Architecture
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
src/index.ts — app configuration and startup
|
|
29
|
+
.env — environment variables (secrets, API keys)
|
|
30
|
+
.data/ — embedded Postgres data + drive files (gitignored)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Next steps
|
|
34
|
+
|
|
35
|
+
1. Create agents and tasks via the callback API
|
|
36
|
+
2. Configure connectors in `.env`
|
|
37
|
+
3. Build custom workflow block handlers
|
|
38
|
+
4. Add more context providers for domain-specific knowledge
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{name}}",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "npx tsx src/index.ts",
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"start": "node dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@boringos/core": "^0.0.1",
|
|
13
|
+
"@boringos/memory": "^0.0.1",
|
|
14
|
+
"@boringos/connector-slack": "^0.0.1",
|
|
15
|
+
"@boringos/connector-google": "^0.0.1",
|
|
16
|
+
"@boringos/pipeline": "^0.0.1"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@types/node": "^22.0.0",
|
|
20
|
+
"tsx": "^4.0.0",
|
|
21
|
+
"typescript": "^5.7.3"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { BoringOS, createHebbsMemory } from "@boringos/core";
|
|
2
|
+
import { slack } from "@boringos/connector-slack";
|
|
3
|
+
import { google } from "@boringos/connector-google";
|
|
4
|
+
import { createBullMQQueue } from "@boringos/pipeline";
|
|
5
|
+
import type { ContextProvider } from "@boringos/core";
|
|
6
|
+
|
|
7
|
+
// ── Custom context provider example ─────────────────────────────────────────
|
|
8
|
+
|
|
9
|
+
const companyKnowledge: ContextProvider = {
|
|
10
|
+
name: "company-knowledge",
|
|
11
|
+
phase: "system",
|
|
12
|
+
priority: 25,
|
|
13
|
+
async provide(event) {
|
|
14
|
+
return `## Company Knowledge\n\nWelcome to {{name}}. Our agents follow these principles:\n- Ship fast, iterate faster\n- Always write tests\n- Document decisions`;
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// ── Build the app ───────────────────────────────────────────────────────────
|
|
19
|
+
|
|
20
|
+
const app = new BoringOS({
|
|
21
|
+
// database: { url: process.env.DATABASE_URL! }, // uncomment for external Postgres
|
|
22
|
+
// auth: { secret: process.env.AUTH_SECRET! },
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// Memory — cognitive recall for agents
|
|
26
|
+
if (process.env.HEBBS_ENDPOINT) {
|
|
27
|
+
app.memory(createHebbsMemory({
|
|
28
|
+
endpoint: process.env.HEBBS_ENDPOINT,
|
|
29
|
+
apiKey: process.env.HEBBS_API_KEY!,
|
|
30
|
+
workspace: process.env.HEBBS_WORKSPACE,
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Connectors — external service integrations
|
|
35
|
+
if (process.env.SLACK_SIGNING_SECRET) {
|
|
36
|
+
app.connector(slack({ signingSecret: process.env.SLACK_SIGNING_SECRET }));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (process.env.GOOGLE_CLIENT_ID) {
|
|
40
|
+
app.connector(google({
|
|
41
|
+
clientId: process.env.GOOGLE_CLIENT_ID,
|
|
42
|
+
clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Queue — opt-in BullMQ for production
|
|
47
|
+
if (process.env.REDIS_URL) {
|
|
48
|
+
app.queue(createBullMQQueue({ redis: process.env.REDIS_URL }));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Custom context
|
|
52
|
+
app.contextProvider(companyKnowledge);
|
|
53
|
+
|
|
54
|
+
// ── Start ───────────────────────────────────────────────────────────────────
|
|
55
|
+
|
|
56
|
+
const server = await app.listen(Number(process.env.PORT) || 3000);
|
|
57
|
+
|
|
58
|
+
console.log(`{{name}} running at ${server.url}`);
|
|
59
|
+
console.log(`Health: ${server.url}/health`);
|
|
60
|
+
console.log(`Connectors: ${server.url}/api/connectors/connectors`);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"lib": ["ES2022"],
|
|
7
|
+
"strict": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"declaration": true,
|
|
10
|
+
"outDir": "dist",
|
|
11
|
+
"rootDir": "src",
|
|
12
|
+
"esModuleInterop": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["src"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Database (optional — embedded Postgres used if not set)
|
|
2
|
+
# DATABASE_URL=postgres://user:pass@localhost:5432/myapp
|
|
3
|
+
|
|
4
|
+
# Memory (optional)
|
|
5
|
+
# HEBBS_ENDPOINT=https://api.hebbs.ai
|
|
6
|
+
# HEBBS_API_KEY=your-key
|
|
7
|
+
# HEBBS_WORKSPACE=your-workspace
|
|
8
|
+
|
|
9
|
+
# Auth (set in production)
|
|
10
|
+
# AUTH_SECRET=change-me-in-production
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# {{name}}
|
|
2
|
+
|
|
3
|
+
Built with [BoringOS](https://github.com/boringos/boringos).
|
|
4
|
+
|
|
5
|
+
## Run
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm run dev
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Server starts on http://localhost:3000 with embedded Postgres.
|
|
12
|
+
|
|
13
|
+
## What's included
|
|
14
|
+
|
|
15
|
+
- Embedded PostgreSQL (zero setup)
|
|
16
|
+
- 6 runtime adapters (Claude, ChatGPT, Gemini, Ollama, command, webhook)
|
|
17
|
+
- 12 persona bundles
|
|
18
|
+
- JWT-authenticated callback API
|
|
19
|
+
- Workflow engine
|
|
20
|
+
|
|
21
|
+
## Next steps
|
|
22
|
+
|
|
23
|
+
- Add agents and tasks via the callback API
|
|
24
|
+
- Configure memory: `app.memory(createHebbsMemory({...}))`
|
|
25
|
+
- Add connectors: `app.connector(slack({...}))`
|
|
26
|
+
- Build custom workflows
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{name}}",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "npx tsx src/index.ts",
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"start": "node dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@boringos/core": "^0.0.1"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@types/node": "^22.0.0",
|
|
16
|
+
"tsx": "^4.0.0",
|
|
17
|
+
"typescript": "^5.7.3"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BoringOS } from "@boringos/core";
|
|
2
|
+
|
|
3
|
+
const app = new BoringOS({
|
|
4
|
+
// database: { url: "postgres://..." }, // uncomment for external Postgres
|
|
5
|
+
// auth: { secret: "your-secret" }, // set in production
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
// app.memory(createHebbsMemory({ endpoint: "...", apiKey: "..." }));
|
|
9
|
+
// app.connector(slack({ signingSecret: "..." }));
|
|
10
|
+
|
|
11
|
+
const server = await app.listen(3000);
|
|
12
|
+
|
|
13
|
+
console.log(`{{name}} running at ${server.url}`);
|
|
14
|
+
console.log(`Health: ${server.url}/health`);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"lib": ["ES2022"],
|
|
7
|
+
"strict": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"declaration": true,
|
|
10
|
+
"outDir": "dist",
|
|
11
|
+
"rootDir": "src",
|
|
12
|
+
"esModuleInterop": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["src"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Server
|
|
2
|
+
PORT=3000
|
|
3
|
+
|
|
4
|
+
# Database (optional — embedded Postgres used if not set)
|
|
5
|
+
# DATABASE_URL=postgres://user:pass@localhost:5432/myapp
|
|
6
|
+
|
|
7
|
+
# Auth (set in production)
|
|
8
|
+
# AUTH_SECRET=change-me-in-production
|
|
9
|
+
|
|
10
|
+
# Memory (optional)
|
|
11
|
+
# HEBBS_ENDPOINT=https://api.hebbs.ai
|
|
12
|
+
# HEBBS_API_KEY=your-key
|
|
13
|
+
# HEBBS_WORKSPACE=your-workspace
|
|
14
|
+
|
|
15
|
+
# Slack connector (optional)
|
|
16
|
+
# SLACK_SIGNING_SECRET=your-signing-secret
|
|
17
|
+
|
|
18
|
+
# Google connector (optional)
|
|
19
|
+
# GOOGLE_CLIENT_ID=your-client-id
|
|
20
|
+
# GOOGLE_CLIENT_SECRET=your-client-secret
|
|
21
|
+
|
|
22
|
+
# Redis for BullMQ (optional — in-process queue used if not set)
|
|
23
|
+
# REDIS_URL=redis://localhost:6379
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# {{name}}
|
|
2
|
+
|
|
3
|
+
Built with [BoringOS](https://github.com/boringos/boringos).
|
|
4
|
+
|
|
5
|
+
## Run
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
cp .env.example .env # configure your environment
|
|
9
|
+
npm run dev # starts on http://localhost:3000
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## What's included
|
|
13
|
+
|
|
14
|
+
- Embedded PostgreSQL (zero setup)
|
|
15
|
+
- 6 runtime adapters (Claude, ChatGPT, Gemini, Ollama, command, webhook)
|
|
16
|
+
- 12 persona bundles
|
|
17
|
+
- Workflow engine with branching
|
|
18
|
+
- JWT-authenticated callback API
|
|
19
|
+
- Slack connector (configure SLACK_SIGNING_SECRET)
|
|
20
|
+
- Google Workspace connector (configure GOOGLE_CLIENT_ID)
|
|
21
|
+
- Hebbs memory (configure HEBBS_ENDPOINT)
|
|
22
|
+
- BullMQ queue (configure REDIS_URL)
|
|
23
|
+
- Custom context provider example
|
|
24
|
+
|
|
25
|
+
## Architecture
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
src/index.ts — app configuration and startup
|
|
29
|
+
.env — environment variables (secrets, API keys)
|
|
30
|
+
.data/ — embedded Postgres data + drive files (gitignored)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Next steps
|
|
34
|
+
|
|
35
|
+
1. Create agents and tasks via the callback API
|
|
36
|
+
2. Configure connectors in `.env`
|
|
37
|
+
3. Build custom workflow block handlers
|
|
38
|
+
4. Add more context providers for domain-specific knowledge
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{name}}",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "npx tsx src/index.ts",
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"start": "node dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@boringos/core": "^0.0.1",
|
|
13
|
+
"@boringos/memory": "^0.0.1",
|
|
14
|
+
"@boringos/connector-slack": "^0.0.1",
|
|
15
|
+
"@boringos/connector-google": "^0.0.1",
|
|
16
|
+
"@boringos/pipeline": "^0.0.1"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@types/node": "^22.0.0",
|
|
20
|
+
"tsx": "^4.0.0",
|
|
21
|
+
"typescript": "^5.7.3"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { BoringOS, createHebbsMemory } from "@boringos/core";
|
|
2
|
+
import { slack } from "@boringos/connector-slack";
|
|
3
|
+
import { google } from "@boringos/connector-google";
|
|
4
|
+
import { createBullMQQueue } from "@boringos/pipeline";
|
|
5
|
+
import type { ContextProvider } from "@boringos/core";
|
|
6
|
+
|
|
7
|
+
// ── Custom context provider example ─────────────────────────────────────────
|
|
8
|
+
|
|
9
|
+
const companyKnowledge: ContextProvider = {
|
|
10
|
+
name: "company-knowledge",
|
|
11
|
+
phase: "system",
|
|
12
|
+
priority: 25,
|
|
13
|
+
async provide(event) {
|
|
14
|
+
return `## Company Knowledge\n\nWelcome to {{name}}. Our agents follow these principles:\n- Ship fast, iterate faster\n- Always write tests\n- Document decisions`;
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// ── Build the app ───────────────────────────────────────────────────────────
|
|
19
|
+
|
|
20
|
+
const app = new BoringOS({
|
|
21
|
+
// database: { url: process.env.DATABASE_URL! }, // uncomment for external Postgres
|
|
22
|
+
// auth: { secret: process.env.AUTH_SECRET! },
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// Memory — cognitive recall for agents
|
|
26
|
+
if (process.env.HEBBS_ENDPOINT) {
|
|
27
|
+
app.memory(createHebbsMemory({
|
|
28
|
+
endpoint: process.env.HEBBS_ENDPOINT,
|
|
29
|
+
apiKey: process.env.HEBBS_API_KEY!,
|
|
30
|
+
workspace: process.env.HEBBS_WORKSPACE,
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Connectors — external service integrations
|
|
35
|
+
if (process.env.SLACK_SIGNING_SECRET) {
|
|
36
|
+
app.connector(slack({ signingSecret: process.env.SLACK_SIGNING_SECRET }));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (process.env.GOOGLE_CLIENT_ID) {
|
|
40
|
+
app.connector(google({
|
|
41
|
+
clientId: process.env.GOOGLE_CLIENT_ID,
|
|
42
|
+
clientSecret: process.env.GOOGLE_CLIENT_SECRET!,
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Queue — opt-in BullMQ for production
|
|
47
|
+
if (process.env.REDIS_URL) {
|
|
48
|
+
app.queue(createBullMQQueue({ redis: process.env.REDIS_URL }));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Custom context
|
|
52
|
+
app.contextProvider(companyKnowledge);
|
|
53
|
+
|
|
54
|
+
// ── Start ───────────────────────────────────────────────────────────────────
|
|
55
|
+
|
|
56
|
+
const server = await app.listen(Number(process.env.PORT) || 3000);
|
|
57
|
+
|
|
58
|
+
console.log(`{{name}} running at ${server.url}`);
|
|
59
|
+
console.log(`Health: ${server.url}/health`);
|
|
60
|
+
console.log(`Connectors: ${server.url}/api/connectors/connectors`);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"lib": ["ES2022"],
|
|
7
|
+
"strict": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"declaration": true,
|
|
10
|
+
"outDir": "dist",
|
|
11
|
+
"rootDir": "src",
|
|
12
|
+
"esModuleInterop": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["src"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Database (optional — embedded Postgres used if not set)
|
|
2
|
+
# DATABASE_URL=postgres://user:pass@localhost:5432/myapp
|
|
3
|
+
|
|
4
|
+
# Memory (optional)
|
|
5
|
+
# HEBBS_ENDPOINT=https://api.hebbs.ai
|
|
6
|
+
# HEBBS_API_KEY=your-key
|
|
7
|
+
# HEBBS_WORKSPACE=your-workspace
|
|
8
|
+
|
|
9
|
+
# Auth (set in production)
|
|
10
|
+
# AUTH_SECRET=change-me-in-production
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# {{name}}
|
|
2
|
+
|
|
3
|
+
Built with [BoringOS](https://github.com/boringos/boringos).
|
|
4
|
+
|
|
5
|
+
## Run
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm run dev
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Server starts on http://localhost:3000 with embedded Postgres.
|
|
12
|
+
|
|
13
|
+
## What's included
|
|
14
|
+
|
|
15
|
+
- Embedded PostgreSQL (zero setup)
|
|
16
|
+
- 6 runtime adapters (Claude, ChatGPT, Gemini, Ollama, command, webhook)
|
|
17
|
+
- 12 persona bundles
|
|
18
|
+
- JWT-authenticated callback API
|
|
19
|
+
- Workflow engine
|
|
20
|
+
|
|
21
|
+
## Next steps
|
|
22
|
+
|
|
23
|
+
- Add agents and tasks via the callback API
|
|
24
|
+
- Configure memory: `app.memory(createHebbsMemory({...}))`
|
|
25
|
+
- Add connectors: `app.connector(slack({...}))`
|
|
26
|
+
- Build custom workflows
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{name}}",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "npx tsx src/index.ts",
|
|
8
|
+
"build": "tsc",
|
|
9
|
+
"start": "node dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@boringos/core": "^0.0.1"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@types/node": "^22.0.0",
|
|
16
|
+
"tsx": "^4.0.0",
|
|
17
|
+
"typescript": "^5.7.3"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BoringOS } from "@boringos/core";
|
|
2
|
+
|
|
3
|
+
const app = new BoringOS({
|
|
4
|
+
// database: { url: "postgres://..." }, // uncomment for external Postgres
|
|
5
|
+
// auth: { secret: "your-secret" }, // set in production
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
// app.memory(createHebbsMemory({ endpoint: "...", apiKey: "..." }));
|
|
9
|
+
// app.connector(slack({ signingSecret: "..." }));
|
|
10
|
+
|
|
11
|
+
const server = await app.listen(3000);
|
|
12
|
+
|
|
13
|
+
console.log(`{{name}} running at ${server.url}`);
|
|
14
|
+
console.log(`Health: ${server.url}/health`);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "NodeNext",
|
|
5
|
+
"moduleResolution": "NodeNext",
|
|
6
|
+
"lib": ["ES2022"],
|
|
7
|
+
"strict": true,
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
"declaration": true,
|
|
10
|
+
"outDir": "dist",
|
|
11
|
+
"rootDir": "src",
|
|
12
|
+
"esModuleInterop": true
|
|
13
|
+
},
|
|
14
|
+
"include": ["src"]
|
|
15
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create-boringos",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"bin": {
|
|
6
|
+
"create-boringos": "dist/index.js"
|
|
7
|
+
},
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"@types/node": "^22.0.0",
|
|
12
|
+
"typescript": "^5.7.3"
|
|
13
|
+
},
|
|
14
|
+
"description": "Scaffold a new BoringOS project",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/BoringOS-dev/boringos.git"
|
|
18
|
+
},
|
|
19
|
+
"homepage": "https://boringos.dev",
|
|
20
|
+
"author": "BoringOS Contributors",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"README.md"
|
|
24
|
+
],
|
|
25
|
+
"keywords": [
|
|
26
|
+
"boringos",
|
|
27
|
+
"agentic",
|
|
28
|
+
"ai-agents",
|
|
29
|
+
"framework"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsc && cp -r src/templates dist/templates",
|
|
33
|
+
"typecheck": "tsc --noEmit"
|
|
34
|
+
}
|
|
35
|
+
}
|