Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ jobs:
run: |
cd packages/core && bun run build && cd ../..
cd packages/connector-sdk && bun run build && cd ../..
cd packages/sdk && bun run build && cd ../..
cd packages/embeddings && bun run build && cd ../..
cd packages/connector-worker && bun run build && cd ../..

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ typecheck:
# Build all TypeScript packages in dependency order
build-packages:
@echo "📦 Building all TypeScript packages..."
@for pkg in core pgvector-embedded connector-sdk client sdk agent-worker openclaw-plugin embeddings connector-worker promptfoo-provider; do \
@for pkg in core pgvector-embedded connector-sdk client agent-worker openclaw-plugin embeddings connector-worker promptfoo-provider; do \
echo " 📦 Building packages/$$pkg..."; \
( cd packages/$$pkg && bun run build ) || exit $$?; \
done
Expand Down
37 changes: 11 additions & 26 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions codex-skills/lobu-builder/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If you are inside the Lobu monorepo rather than a generated Lobu project, follow
## First Pass

1. Read `AGENTS.md` first. If it redirects to another file such as `@TESTING.md`, open that too.
2. Read `lobu.config.ts`. It is TypeScript: `defineConfig` from `@lobu/sdk` is the default export.
2. Read `lobu.config.ts`. It is TypeScript: `defineConfig` from `@lobu/cli/config` is the default export.
3. Enumerate agent directories under `agents/` and inspect the target agent's `IDENTITY.md`, `SOUL.md`, and `USER.md`.
4. Check whether the repo has shared `skills/` or agent-local `agents/<id>/skills/`.
5. Look for evals under `agents/<id>/evals/promptfooconfig.yaml` (the project may also have legacy YAML files — those don't run).
Expand All @@ -26,7 +26,7 @@ Do not assume there is only one agent or one platform connection.
- `IDENTITY.md`: who the agent is
- `SOUL.md`: rules, workflows, guardrails
- `USER.md`: user or tenant context
- `lobu.config.ts`: providers, connections, enabled skills, MCP servers, network allowlist (authored with `define*` from `@lobu/sdk`)
- `lobu.config.ts`: providers, connections, enabled skills, MCP servers, network allowlist (authored with `define*` from `@lobu/cli/config`)
- `skills/.../SKILL.md`: shared reusable capabilities
- `agents/<id>/skills/.../SKILL.md`: agent-specific capabilities
- `agents/<id>/evals/promptfooconfig.yaml`: promptfoo eval suite (runs via `bunx promptfoo eval` with `@lobu/promptfoo-provider`)
Expand Down
2 changes: 1 addition & 1 deletion examples/agent-community/lobu.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
defineRelationshipType,
defineWatcher,
secret,
} from "@lobu/sdk";
} from "@lobu/cli/config";

const agentCommunity = defineAgent({
id: "agent-community",
Expand Down
2 changes: 1 addition & 1 deletion examples/atlas/lobu.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
defineEntityType,
defineWatcher,
secret,
} from "@lobu/sdk";
} from "@lobu/cli/config";

const atlasCurator = defineAgent({
id: "atlas-curator",
Expand Down
2 changes: 1 addition & 1 deletion examples/delivery/lobu.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
defineRelationshipType,
defineWatcher,
secret,
} from "@lobu/sdk";
} from "@lobu/cli/config";

const delivery = defineAgent({
id: "delivery",
Expand Down
2 changes: 1 addition & 1 deletion examples/ecommerce/lobu.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
defineRelationshipType,
defineWatcher,
secret,
} from "@lobu/sdk";
} from "@lobu/cli/config";

const ecommerceOps = defineAgent({
id: "ecommerce-ops",
Expand Down
2 changes: 1 addition & 1 deletion examples/finance/lobu.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
defineRelationshipType,
defineWatcher,
secret,
} from "@lobu/sdk";
} from "@lobu/cli/config";

const finance = defineAgent({
id: "finance",
Expand Down
2 changes: 1 addition & 1 deletion examples/leadership/lobu.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
defineRelationshipType,
defineWatcher,
secret,
} from "@lobu/sdk";
} from "@lobu/cli/config";

const leadership = defineAgent({
id: "leadership",
Expand Down
2 changes: 1 addition & 1 deletion examples/legal/lobu.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
defineRelationshipType,
defineWatcher,
secret,
} from "@lobu/sdk";
} from "@lobu/cli/config";

const legalReview = defineAgent({
id: "legal-review",
Expand Down
2 changes: 1 addition & 1 deletion examples/lobu-crm/lobu.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
defineRelationshipType,
defineWatcher,
secret,
} from "@lobu/sdk";
} from "@lobu/cli/config";

const crm = defineAgent({
id: "crm",
Expand Down
2 changes: 1 addition & 1 deletion examples/market/lobu.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
defineRelationshipType,
defineWatcher,
secret,
} from "@lobu/sdk";
} from "@lobu/cli/config";

const SECTOR_ENUM = ["bio-health", "ai", "fintech", "crypto", "consumer"];

Expand Down
2 changes: 1 addition & 1 deletion examples/office-bot/lobu.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
defineEntityType,
defineWatcher,
secret,
} from "@lobu/sdk";
} from "@lobu/cli/config";

const DELIVEROO_JUDGE =
"Allow GET requests that read restaurant listings, menus, item details, and the\ncurrent basket. Allow POST/PUT requests whose effect is limited to building or\nmodifying a basket / group order (adding, removing, changing quantity of items;\ncreating a shareable group-order link). DENY anything that completes checkout,\nsubmits payment, reads or writes saved payment methods, changes the delivery\naddress, or modifies the account profile. If the request's effect is unclear,\nfail closed and deny with a reason.\n";
Expand Down
2 changes: 1 addition & 1 deletion examples/personal-finance/lobu.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
defineRelationshipType,
defineWatcher,
secret,
} from "@lobu/sdk";
} from "@lobu/cli/config";

const personal_finance = defineAgent({
id: "personal-finance",
Expand Down
2 changes: 1 addition & 1 deletion examples/sales/lobu.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
defineRelationshipType,
defineWatcher,
secret,
} from "@lobu/sdk";
} from "@lobu/cli/config";

const sales = defineAgent({
id: "sales",
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"check": "biome check --config-path config/biome.config.json .",
"check:fix": "biome check --config-path config/biome.config.json --write .",
"prepare": "husky || true",
"test": "bun test packages/core/src packages/client/src packages/sdk/src packages/agent-worker/src packages/landing/src",
"test:coverage": "bun test packages/core/src packages/client/src packages/sdk/src packages/agent-worker/src packages/landing/src --coverage",
"test": "bun test packages/core/src packages/client/src packages/agent-worker/src packages/landing/src",
"test:coverage": "bun test packages/core/src packages/client/src packages/agent-worker/src packages/landing/src --coverage",
"typecheck": "tsc --noEmit",
"dev": "./scripts/dev-native.sh",
"build:packages": "cd packages/core && bun run build && cd ../pgvector-embedded && bun run build && cd ../connector-sdk && bun run build && cd ../client && bun run build && cd ../sdk && bun run build && cd ../agent-worker && bun run build && cd ../openclaw-plugin && bun run build && cd ../embeddings && bun run build && cd ../connector-worker && bun run build && cd ../promptfoo-provider && bun run build && cd ../server && bun run build:server && cd .. && if [ -f owletto/package.json ]; then (cd owletto && bun run build); else echo '[build:packages] owletto submodule absent — CLI ships headless (API only)'; fi && cd cli && bun run build",
"build:packages": "cd packages/core && bun run build && cd ../pgvector-embedded && bun run build && cd ../connector-sdk && bun run build && cd ../client && bun run build && cd ../agent-worker && bun run build && cd ../openclaw-plugin && bun run build && cd ../embeddings && bun run build && cd ../connector-worker && bun run build && cd ../promptfoo-provider && bun run build && cd ../server && bun run build:server && cd .. && if [ -f owletto/package.json ]; then (cd owletto && bun run build); else echo '[build:packages] owletto submodule absent — CLI ships headless (API only)'; fi && cd cli && bun run build",
"build:lobu": "cd packages/embeddings && bun run build && cd ../..",
"watch:packages": "tsc -b --watch packages/core packages/agent-worker",
"test:packages": "cd packages/core && bun run test && cd ../agent-worker && bun run test",
Expand Down
16 changes: 14 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
"description": "CLI for deploying and managing AI agents on Lobu",
"type": "module",
"main": "dist/index.js",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
"./config": {
"types": "./dist/config/index.d.ts",
"bun": "./src/config/index.ts",
"import": "./dist/config/index.js"
},
"./package.json": "./package.json"
},
"bin": {
"lobu": "bin/lobu.js"
},
Expand Down Expand Up @@ -43,7 +55,6 @@
"@lobu/connector-worker": "workspace:*",
"@lobu/core": "workspace:*",
"@lobu/embeddings": "workspace:*",
"@lobu/sdk": "workspace:*",
"@lobu/worker": "workspace:*",
"@mariozechner/pi-ai": "^0.51.6",
"@modelcontextprotocol/sdk": "^1.27.1",
Expand Down Expand Up @@ -104,7 +115,8 @@
"files": [
"dist",
"bin",
"README.md"
"README.md",
"src/config"
],
"engines": {
"node": ">=22 <25"
Expand Down
14 changes: 7 additions & 7 deletions packages/cli/src/__tests__/cli-ux.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ describe("lobu init --yes", () => {
);
const env = readFileSync(join(proj, ".env"), "utf-8");
expect(env.includes("SENTRY_DSN=")).toBe(false);
// The generated lobu.config.ts imports @lobu/sdk, so the scaffolded
// package.json MUST declare it — else `lobu apply` (jiti) can't resolve it
// outside this monorepo. Regression guard for that blocker.
// The generated lobu.config.ts imports @lobu/cli/config, so the scaffolded
// package.json MUST declare @lobu/cli — else `lobu apply` (jiti) can't
// resolve it outside this monorepo. Regression guard for that blocker.
const pkg = JSON.parse(readFileSync(join(proj, "package.json"), "utf-8"));
expect(pkg.devDependencies["@lobu/sdk"]).toBeDefined();
expect(pkg.devDependencies["@lobu/cli"]).toBeDefined();
expect(pkg.devDependencies["@lobu/connector-sdk"]).toBeDefined();
const tsconfig = JSON.parse(
readFileSync(join(proj, "tsconfig.json"), "utf-8")
Expand All @@ -110,7 +110,7 @@ describe("lobu init --yes", () => {
});

test("scaffolded lobu.config.ts loads into desired state", async () => {
// jiti resolves the externalized `@lobu/sdk` import relative to the config
// jiti resolves the externalized `@lobu/cli/config` import relative to the config
// file, so scaffold inside the package tree (where node_modules is
// reachable), not the tmpdir() used by the other init tests.
const fixtureRoot = mkdtempSync(join(import.meta.dir, "init-load-"));
Expand Down Expand Up @@ -173,7 +173,7 @@ describe("agent scaffold", () => {
test("scaffolds the agent dir and prints a defineAgent block", async () => {
writeFileSync(
join(cwd, "lobu.config.ts"),
'import { defineConfig } from "@lobu/sdk";\nexport default defineConfig({ agents: [] });\n'
'import { defineConfig } from "@lobu/cli/config";\nexport default defineConfig({ agents: [] });\n'
);
const logs: string[] = [];
const original = console.log;
Expand All @@ -198,7 +198,7 @@ describe("agent scaffold", () => {
test("escapes quotes in --name so the printed snippet stays valid TS", async () => {
writeFileSync(
join(cwd, "lobu.config.ts"),
'import { defineConfig } from "@lobu/sdk";\nexport default defineConfig({ agents: [] });\n'
'import { defineConfig } from "@lobu/cli/config";\nexport default defineConfig({ agents: [] });\n'
);
const logs: string[] = [];
const original = console.log;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function silenceOutput() {
}

// Fixtures live under the worktree (next to this test) so the externalized
// `@lobu/sdk` import in the generated config bundle resolves from node_modules.
// `@lobu/cli/config` import in the generated config bundle resolves from node_modules.
function mkProject(config: string): string {
const dir = mkdtempSync(join(import.meta.dir, "fixture-"));
tempDirs.push(dir);
Expand All @@ -66,7 +66,7 @@ function minimalConfig(
]
.filter(Boolean)
.join("\n");
return `import { defineAgent, defineConfig } from "@lobu/sdk";
return `import { defineAgent, defineConfig } from "@lobu/cli/config";
export default defineConfig({
${extra ? `${extra}\n` : ""} agents: [defineAgent({ id: ${JSON.stringify(agentId)}, name: "Triage", dir: "./agents/${agentId}" })],
});
Expand Down
Loading
Loading