Skip to content

Packages

projects/omega-lisp/ is a pnpm workspace. The root package.json declares workspaces: ["packages/*"]. Every directory under packages/ is its own package with its own package.json and Lisp library files.

Workspace layout (snapshot)

projects/omega-lisp/
├── package.json
├── pnpm-workspace.yaml
├── src/                      # the main `omega-lisp` package source
│   ├── core/
│   ├── frameir/
│   ├── runtime.ts
│   └── index.ts
├── packages/
│   ├── agents/               # `agents` Lisp package
│   ├── aliases/              # `aliases/clojure` etc.
│   ├── continuation-calculus/
│   ├── core/                 # @omega/core (narrow facade for Matrix)
│   ├── document-search/
│   ├── emacs/
│   ├── examples/
│   ├── middleware/
│   ├── monad/
│   ├── opr/                  # OPR protocol kernels
│   ├── oracle/               # oracle adapters and protocol
│   ├── problem-recognizer/
│   ├── repl/                 # @omega/repl
│   ├── self-healing/
│   ├── solve/                # the `solve` language
│   ├── strategies/
│   ├── tools/
│   └── workflow/             # workflow DSL
└── lib/                      # core Lisp library files (loaded by `require`)

Two kinds of packages

KindLocationFormat
TypeScript packagespackages/<name>/src/*.tsnpm-style; build with node build.mjs
Lisp packagespackages/<name>/lib/*.lisp (with a manifest.json)Lisp source loaded via require

A single workspace package can be both — for example packages/oracle/ ships TypeScript adapters AND lib/*.lisp user-facing primitives.

Lisp package manifest

A Lisp package has a manifest.json and a lib/<name>.lisp entry point. Example (from packages/agents/manifest.json, conceptually):

json
{
  "name": "agents",
  "version": "0.1.0",
  "description": "Agent delegation with amb-based selection",
  "entry": "lib/agents.lisp",
  "exports": ["agents"],
  "effects": ["agent.spawn.op", "agent.run.op"],
  "requires": []
}

The matching (define-package "agents" ...) form at the top of lib/agents.lisp mirrors this metadata.

Adding a new Lisp package

  1. Create packages/<name>/.
  2. Write manifest.json.
  3. Write lib/<name>.lisp with (define-package ...) at the top and (provide '<name>) at the bottom.
  4. Optionally create help/<name>.help.md for :help <name> content.
  5. From the REPL: (require '<name>).

The convention used by existing packages is enforced by code review, not by a linter. The reference example is packages/agents/.

Adding a new TypeScript package

  1. Create packages/<name>/ with package.json (set "name": "@omega/<name>").
  2. Write src/index.ts.
  3. Optionally write build.mjs (most packages copy the existing pattern).
  4. Run pnpm install from the workspace root.
  5. Other packages can now import { ... } from '@omega/<name>'.

See also

Source: projects/omega-lisp/pnpm-workspace.yaml, projects/omega-lisp/package.json (workspaces array), projects/omega-lisp/packages/agents/ (canonical example).