diff --git a/profile/README.md b/profile/README.md index fe6fb40..b92d4b3 100644 --- a/profile/README.md +++ b/profile/README.md @@ -1,49 +1,219 @@ -# Neuron + -![Neuron logo](https://raw.githubusercontent.com/neuron-runtime/.github/main/profile/brand.png) +

+ Neuron official angular emblem and NEURON wordmark, reproduced from the supplied brand lockup. +

-### Build. Connect. Run. +

+ Source repository + Documentation repository + Quickstart guide + Releases + Issues +

-**Neuron is an open-source platform for running software independently and composing it into larger applications.** +

Build. Connect. Run.

-It is designed to make software reusable across different programming languages and execution environments. +

+ A runtime for building and operating complex software systems from composable, executable capabilities. +

-> Neuron is under active development. +Neuron gives software a common composition model. Capabilities expose executable contracts. Assemblies connect those capabilities through explicit relationships. The runtime operates the resulting system without taking ownership of the business logic inside each capability. ---- +A capability can be implemented in a different language or execution environment from the Assembly that uses it. That separation lets teams compose software without forcing every implementation into one framework, process or technology stack. -## The Idea +## The model -Software components should be useful on their own and composable into larger systems. Neuron provides a common execution model for both. +### Capability -```mermaid -flowchart TD - A["Capability Runtime"] - A --> B["Independent Execution"] - A --> C["Assembly"] - C --> D["Larger Application"] +A Capability is an executable unit with a declared contract. It defines the parameters it accepts and the results it returns. Its implementation may run as a native process, a WebAssembly module, or an in process built in capability supplied by N.O.R.E. - E["Neuron Runtime"] -. "executes" .-> B - E -. "executes" .-> C +### Assembly - style A fill:#171717,stroke:#888,color:#fff - style B fill:#171717,stroke:#666,color:#fff - style C fill:#171717,stroke:#666,color:#fff - style D fill:#171717,stroke:#888,color:#fff - style E fill:#252525,stroke:#aaa,color:#fff +An Assembly defines the capabilities in a system and the relationships between them. Bindings connect inputs to values produced by other capabilities. Conditions can govern execution. Dependencies are derived from the data references in the composition. + +An Assembly is the composition. It is not the implementation of the capabilities it connects. + +### Capability Runtime + +A Capability Runtime provides the machinery needed to execute a capability. Neuron keeps this hosting boundary separate from the logical Assembly. Process and WebAssembly execution are supported today. + +### N.O.R.E. + +N.O.R.E. is the Neuron Operational Runtime Engine. It plans and operates registered Assemblies, schedules capability execution, manages runtime lifecycles and coordinates the execution boundaries. + +## How it fits together + +

+ Neuron conceptual model showing capability runtimes, independent execution, Assemblies, larger applications and the Neuron Runtime. +

+ +The Capability Runtime makes an executable capability available. That capability can run independently or become part of an Assembly. The Assembly expresses how capabilities work together and can itself become part of a larger application. The Neuron Runtime executes both independent capabilities and registered Assemblies. + +## Composition is explicit + +An Assembly is authored as a typed definition or as canonical YAML. TypeScript and YAML are the first class authoring surfaces today. Other languages can participate by producing the canonical Assembly manifest. + +The TypeScript SDK makes data relationships visible in the authoring code. A capability that reads a prior result depends on that capability. Two capabilities that read the same earlier result can execute as independent branches. A later capability that consumes both results creates the join. + +

+ TypeScript Assembly authoring beside the derived execution graph, with parallel risk and stock branches joining at dispatch. +

+ +A minimal TypeScript definition uses the published `@neuronruntime/sdk` package: + +```ts +import { Assembly, Capability, string } from "@neuronruntime/sdk"; + +const sayHello = Capability("say-hello") + .runtime({ name: "neuron:core:set" }) + .paramsSchema<{ message: string }>() + .resultSchema({ message: string() }); + +const manifest = Assembly() + .paramsSchema<{ message: string }>() + .resultSchema({ message: string() }) + .withParams((input) => + sayHello.withParams({ message: input.message }) + ) + .result({ + message: sayHello.result.message, + }) + .toManifest(); + +export default manifest; +``` + +The project configuration owns Assembly identity such as its name and version. The Assembly source defines the composition and exports its manifest. + +## Execution boundaries + +The Assembly does not need to know where a capability runs. N.O.R.E. dispatches work through the selected Capability Runtime host. + +

+ N.O.R.E. scheduling capability executions through native process and WebAssembly WASI hosts. +

+ +**Process hosting** runs an external capability as an operating system process and communicates through the Neuron capability runtime protocol. + +**WebAssembly hosting** runs a WASI module inside the embedded WebAssembly runtime. + +The `container` and `remote` runtime types are described in the module design as planned capabilities. They are not presented here as shipped hosting options. + +## Build, register and run + +Neuron has one user facing Go CLI, named `neuron`. It builds project sources, compiles the canonical Assembly representation, resolves capability runtime requirements, freezes the selected versions and registers the result with N.O.R.E. + +

+ Neuron Go CLI build and execution lifecycle, from TypeScript or YAML authoring through manifest, compilation, resolution, version freezing, registration, foreground runtime and synchronous execution. +

+ +Install the Go based `neuron` executable from the [release page](https://github.com/neuron-runtime/neuron/releases), then clone the source repository and prepare its TypeScript SDK dependencies before running the shipped example: + +```bash +git clone https://github.com/neuron-runtime/neuron.git +cd neuron +pnpm install +pnpm build:sdk +cd examples/hello +neuron +``` + +The bare `neuron` command performs the project build and registration, then starts the foreground project runtime. For TypeScript projects, it discovers and invokes the SDK builder as part of that build pipeline. Keep that terminal open. In another terminal, from the same project directory, execute the Assembly: + +```bash +cd neuron/examples/hello +neuron run --params '{"name":"World"}' +``` + +`neuron run` sends a synchronous execution request and prints the Assembly result. It does not stream execution events or return an execution handle. The advanced `neuron instance` commands provide execution inspection, signal delivery and cancellation. + +Use `neuron build` when the goal is to build and register without leaving the foreground project runtime running. + +## One build command + +The Go based `neuron` CLI owns the project build lifecycle. It detects the configured authoring language and selects the corresponding builder. For TypeScript projects, the Go builder locates the SDK build executable in the project's `node_modules/.bin` directory, then falls back to the system `PATH`. It invokes that builder internally and loads the generated manifest. + +The build package applies the Assembly identity from project configuration, canonicalizes and persists the manifest, then continues through compilation, Capability Runtime resolution, version freezing and registration with N.O.R.E. Developers use `neuron build`; they do not run or manage a separate `neuron-sdk` command. + +Install the project dependencies before building a TypeScript project: + +```bash +pnpm install +neuron build ``` -## Core Concepts +The TypeScript SDK remains the authoring API used in `assembly.ts`. Its build executable is an internal implementation detail of the Go CLI, not another project workflow. + +## Modules and version resolution + +Neuron separates the logical capability from the runtime package that implements it. + +**Built in modules** run in process inside N.O.R.E. They are always available and are not downloaded or installed. + +**External modules** are packaged Capability Runtimes. The CLI resolves their requirements against configured registries, verifies the package, installs it into the local immutable store and freezes the exact selected version into the build record. + +The current registry implementations are `github` and `local`. Version constraints use semantic versioning. A compatible installed version can satisfy a pinned requirement without another download. A floating requirement consults the registry to discover the current best match. + +The package manifest describes the module identity, runtime type, entry point, protocol, capabilities and platform artifacts. A declared digest is checked during installation. The module store is separate from the Assembly definition and from the runtime that executes it. + +## Waiting and signals + +A capability can complete in one invocation or, when the feature is enabled, suspend while waiting for a signal or timer. A later delivery resumes the same logical operation. + +

+ Neuron feature gated wait and resume lifecycle showing a signal or timer delivery, a stable logical operation ID and a new attempt ID. +

+ +Durable instances reconcile ready dispatch intents, elapsed timer waits and execution deadlines. A resumed or retried invocation receives a fresh attempt ID while retaining its logical operation ID. Signal delivery IDs provide an idempotency boundary. + +This is at least once delivery. It is not a guarantee of exactly once external side effects. Capability implementations must use the logical operation ID and delivery ID when deduplicating work. + +Waiting and signal resume are additive and feature gated. Non durable instances remain event driven. + +## Documentation + +The documentation is organized around the implementation and the interfaces used to work with Neuron. + +**Getting started** + +[Installation and platform support](https://github.com/neuron-runtime/neuron/blob/fix/sdk-runtime-durability-hardening/docs/INSTALLATION.md) + +[First Assembly walkthrough](https://github.com/neuron-runtime/neuron/blob/fix/sdk-runtime-durability-hardening/docs/GETTING_STARTED.md) + +**Architecture and composition** + +[Architecture and execution semantics](https://github.com/neuron-runtime/neuron/blob/fix/sdk-runtime-durability-hardening/docs/ARCHITECTURE.md) + +[Assemblies and Capability Runtimes](https://github.com/neuron-runtime/neuron/blob/fix/sdk-runtime-durability-hardening/docs/MODULES.md) + +[Built in capability contracts](https://github.com/neuron-runtime/neuron/blob/fix/sdk-runtime-durability-hardening/docs/BUILTINS.md) + +**Developer interfaces** + +[TypeScript SDK source and guide](https://github.com/neuron-runtime/neuron/tree/fix/sdk-runtime-durability-hardening/packages/assembly-sdks/typescript) + +[Go CLI reference](https://github.com/neuron-runtime/neuron/blob/fix/sdk-runtime-durability-hardening/application/README.md) + +[Go capability runtime SDK](https://github.com/neuron-runtime/neuron/tree/fix/sdk-runtime-durability-hardening/packages/executor-sdks/golang) + +[.NET capability runtime SDK](https://github.com/neuron-runtime/neuron/tree/fix/sdk-runtime-durability-hardening/packages/executor-sdks/dotnet) + +[Documentation site source](https://github.com/neuron-runtime/docs) -- **Capability Runtime** — A packaged unit of functionality that can be executed by Neuron. -- **Assembly** — A composition of capabilities and their relationships, defining how they work together. -- **Neuron Runtime** — The execution layer for Capability Runtimes and Assemblies. +## Project status -## Designed for Flexibility +Neuron is under active development. The core model for authoring, manifest validation, compilation, dependency resolution, version freezing, project runtimes and the current process and WebAssembly hosting boundaries is implemented and exercised by the repository test suite. -Neuron is designed to support components built with different languages and execution environments, without requiring an entire application to use the same technology. +The public surface continues to evolve. Waiting and signal resume are feature gated. Container and remote hosting remain planned. Check the source repository and release notes for the current state of each capability. -## Explore Neuron +

+ Source repository + Documentation repository + Releases + Issues +

-- **Source code:** [neuron-runtime/neuron](https://github.com/neuron-runtime/neuron) -- **Issues:** [Report a problem or follow development](https://github.com/neuron-runtime/neuron/issues) \ No newline at end of file +

+ Neuron · Build. Connect. Run. +

diff --git a/profile/assets/assembly-composition.svg b/profile/assets/assembly-composition.svg new file mode 100644 index 0000000..41f0b59 --- /dev/null +++ b/profile/assets/assembly-composition.svg @@ -0,0 +1,61 @@ + +Assembly authoring and dependency graph +A TypeScript Assembly defines an order capability. Its result is consumed by independent risk and stock branches. Dispatch joins the outputs of those branches. + + + + + + +ASSEMBLY / AUTHORING AND DEPENDENCY +Dependencies are derived from result references. + + + + +assembly.ts +01const order = Capability("order.load"); +02const risk = Capability("risk.review"); +03const stock = Capability("stock.reserve"); + +04Assembly() +05 .withParams(input => order +06 .bind(risk.withParams(order.result)) +07 .bind(stock.withParams(order.result))) +08 .toManifest(); + +RESULTING EXECUTION GRAPH + +order.load +source + + +risk.review +independent branch + + +stock.reserve +independent branch + + +dispatch +join both results + + + +fan out +fan in + +EXECUTION SEMANTICS +Risk and stock can proceed independently. Dispatch waits for both results. + \ No newline at end of file diff --git a/profile/assets/brand.svg b/profile/assets/brand.svg new file mode 100644 index 0000000..6177611 --- /dev/null +++ b/profile/assets/brand.svg @@ -0,0 +1,17 @@ + +Neuron +The official Neuron emblem and NEURON wordmark, traced from the supplied white-on-black brand lockup. + + + + + + + + + + + + + + \ No newline at end of file diff --git a/profile/assets/build-execution.svg b/profile/assets/build-execution.svg new file mode 100644 index 0000000..2d82f46 --- /dev/null +++ b/profile/assets/build-execution.svg @@ -0,0 +1,80 @@ + +Neuron project build and execution +The Go neuron CLI accepts TypeScript or YAML authoring. The TypeScript path invokes the SDK builder internally. The resulting manifest is canonicalized, compiled, resolved, version-frozen, and registered with N.O.R.E. A foreground project runtime can then execute Assemblies. + + + + + +PROJECT TOOLCHAIN / BUILD LIFECYCLE +One CLI owns the build lifecycle. + + +ENTRY POINT +$ neuron build +Go project CLI + + +AUTHORING INPUT + +TypeScript + +YAML + + +INTERNAL TYPESCRIPT STEP +SDK builder invocation +Discovered in node_modules/.bin, then PATH + + +CANONICAL MANIFEST +Validate · identify · persist +YAML enters this shared pipeline directly + + + + + +SHARED BUILD STAGES + + + 01Compile + Build the canonical representation + + + 02Resolve + Select compatible runtime packages + + + 03Freeze versions + Persist exact selected versions + + + 04Register with N.O.R.E. + Publish the compiled Assembly + + + + + +FOREGROUND PROJECT RUNTIME +$ neuron +Builds, registers, then keeps N.O.R.E. running + + +SYNCHRONOUS ASSEMBLY EXECUTION +$ neuron run --params '{...}' +Result to stdout + +The SDK builder is an implementation detail of the Go CLI, not a separate developer command. + \ No newline at end of file diff --git a/profile/assets/buttons/docs.svg b/profile/assets/buttons/docs.svg new file mode 100644 index 0000000..c6a624b --- /dev/null +++ b/profile/assets/buttons/docs.svg @@ -0,0 +1,17 @@ + +Documentation +Open Neuron documentation. + + + + + + + + + + + +DOCUMENTATION + + \ No newline at end of file diff --git a/profile/assets/buttons/issues.svg b/profile/assets/buttons/issues.svg new file mode 100644 index 0000000..fb06435 --- /dev/null +++ b/profile/assets/buttons/issues.svg @@ -0,0 +1,17 @@ + +Issues +Open Neuron issues. + + + + + + + + + + + +ISSUES + + \ No newline at end of file diff --git a/profile/assets/buttons/quickstart.svg b/profile/assets/buttons/quickstart.svg new file mode 100644 index 0000000..5a5fc6b --- /dev/null +++ b/profile/assets/buttons/quickstart.svg @@ -0,0 +1,17 @@ + +Quickstart +Open Neuron quickstart. + + + + + + + + + + + +QUICKSTART + + \ No newline at end of file diff --git a/profile/assets/buttons/releases.svg b/profile/assets/buttons/releases.svg new file mode 100644 index 0000000..ef7d987 --- /dev/null +++ b/profile/assets/buttons/releases.svg @@ -0,0 +1,17 @@ + +Releases +Open Neuron releases. + + + + + + + + + + + +RELEASES + + \ No newline at end of file diff --git a/profile/assets/buttons/source.svg b/profile/assets/buttons/source.svg new file mode 100644 index 0000000..1bdf160 --- /dev/null +++ b/profile/assets/buttons/source.svg @@ -0,0 +1,17 @@ + +Source +Open Neuron source. + + + + + + + + + + + +SOURCE + + \ No newline at end of file diff --git a/profile/assets/concept-model.svg b/profile/assets/concept-model.svg new file mode 100644 index 0000000..a739150 --- /dev/null +++ b/profile/assets/concept-model.svg @@ -0,0 +1,79 @@ + +Neuron composition and execution architecture +An architectural view of Neuron. Capability contracts are composed in an Assembly. N.O.R.E. operates the compiled Assembly and delegates capability execution to process or WebAssembly hosts. + + + + + + +NEURON / SYSTEM ARCHITECTURE +Composition is separate from execution. +The Assembly describes relationships. N.O.R.E. operates them through independent runtime hosts. + +01 / COMPOSITION MODEL + + +EXECUTABLE CONTRACT +Capability +Parameters · result · implementation + + + + + +DECLARATIVE COMPOSITION +Assembly + + + + + + + +Typed bindings · conditions · derived dependencies + + + + + +APPLICATION BOUNDARY +Larger system +Reusable Assemblies, composed as needed + + +02 / EXECUTION MODEL + + +OPERATIONAL CONTROL PLANE +N.O.R.E. +Plans · schedules · manages lifecycle + + + + + +HOST SELECTION +Capability Runtime +Execution boundary + + + + + +IMPLEMENTATION HOSTS +Process +and +WASM / WASI +One logical composition model. Distinct implementation and hosting boundaries. + \ No newline at end of file diff --git a/profile/assets/runtime-hosts.svg b/profile/assets/runtime-hosts.svg new file mode 100644 index 0000000..c75f146 --- /dev/null +++ b/profile/assets/runtime-hosts.svg @@ -0,0 +1,52 @@ + +Neuron capability runtime host comparison +Neuron currently supports two capability execution hosts: native processes communicating through the Neuron JSON protocol, and WebAssembly modules hosted under WASI. + + + + + +CAPABILITY RUNTIME / HOSTING OPTIONS +Two execution hosts. One capability contract. +The Assembly stays independent of the process or module that implements a capability. + + + +HOST / 01 +Native process +An executable managed as an operating-system process. + + + + + + +PROCESS PROTOCOL +neuron/capability-runtime-v1-json +stdin / stdout communication · external process lifecycle + + + +HOST / 02 +WebAssembly +A compiled module hosted inside the embedded WASI runtime. + + + + + + +WASI MODULE +wasm32-wasi +embedded runtime · module execution boundary + +HOSTING IS AN IMPLEMENTATION DETAIL, NOT AN ASSEMBLY DEPENDENCY + \ No newline at end of file diff --git a/profile/assets/waiting-signals.svg b/profile/assets/waiting-signals.svg new file mode 100644 index 0000000..ca98915 --- /dev/null +++ b/profile/assets/waiting-signals.svg @@ -0,0 +1,56 @@ + +Durable invocation and resume lifecycle +A capability invocation may suspend while waiting for a signal or timer. When resumed, it retains the same logical operation ID but receives a new attempt ID. Delivery is at least once. + + + + + +DURABLE EXECUTION / WAIT AND RESUME +The operation remains. The attempt changes. + + + + + + + + + + 01 / INVOCATION + attempt_03 + + 02 / SUSPENDED + Waiting + + 03 / RESUMED + attempt_04 + + 04 / COMPLETE + Result + + + + +RESUME CONDITION +Signal or timer + + +IDENTITY ACROSS ATTEMPTS +logical_operation_id op_17 +stable + +attempt_id attempt_03 → attempt_04 + + +Feature gated. Durable scheduling reconciles dispatch intents, timers and deadlines. Delivery is at least once, not exactly once. + \ No newline at end of file