惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Recorded Future
Recorded Future
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
T
Troy Hunt's Blog
S
Security Archives - TechRepublic
S
Security @ Cisco Blogs
AI
AI
Schneier on Security
Schneier on Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
CERT Recently Published Vulnerability Notes
Spread Privacy
Spread Privacy
Help Net Security
Help Net Security
L
Lohrmann on Cybersecurity
The Hacker News
The Hacker News
Google DeepMind News
Google DeepMind News
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Security Latest
Security Latest
T
Tor Project blog
P
Privacy International News Feed
The Last Watchdog
The Last Watchdog
L
LINUX DO - 最新话题
D
DataBreaches.Net
W
WeLiveSecurity
H
Help Net Security
L
LangChain Blog
B
Blog RSS Feed
Scott Helme
Scott Helme
Hacker News: Ask HN
Hacker News: Ask HN
C
Cisco Blogs
Cloudbric
Cloudbric
Application and Cybersecurity Blog
Application and Cybersecurity Blog
O
OpenAI News
I
InfoQ
GbyAI
GbyAI
Project Zero
Project Zero
Blog — PlanetScale
Blog — PlanetScale
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
G
GRAHAM CLULEY
T
The Blog of Author Tim Ferriss
酷 壳 – CoolShell
酷 壳 – CoolShell
Jina AI
Jina AI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园 - 聂微东
美团技术团队
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

Show HN

暂无文章

GitHub - treenix-io/treenix: Treenix is the typed runtime for human-and-agents software.
treenix_io · 2026-06-15 · via Show HN

Treenix - Fullstack AI-ready Platform

Treenix 3.0.12 Node.js 22 or newer Discord chat

Fullstack Platform.
ECS-style tree of typed components with context-aware rendering.

Early Beta. Bugs are expected — please report them so we can fix and stabilize. Open an issue on GitHub or ping us on Discord.

Docs: Introduction · Composition · Components · Quickstart & Setup · Tutorial · Thinking in Treenix · React Views · API

Write a class. Attach it to a node. Treenix turns it into stored data, editable forms, rendered views, server actions, MCP tools, access rules, realtime updates, and audit events.

Treenix is for building applications as a shared tree of composable nodes. Humans use the app and admin interface. Agents use the same tree through typed actions. Your business logic stays in one place instead of being copied across schema, API, UI, permissions, and agent tools.

Three Primitives

Node      = { $path, $type, ...components }
Component = { $type, ...data }
Context   = (Type, context) => handler

In ECS terms, a Node is the entity, a Component is a typed aspect attached to that entity, and Contexts provide the systems around it: React views, actions, services, validation, ACL, text rendering, and agent tools.

Treenix borrows ECS composition without forcing everything into a global game loop. A service can behave like a scoped system over a subtree, a React context can render the same component as a card or editor, and an action can mutate the same node through the validated server pipeline.

Create an App

npm create treenix my-app
cd my-app
npm run dev

Open http://localhost:3210.

Core Idea

One class defines a component's data and actions:

// mods/todo/types.ts
import { getCtx, registerType } from '@treenx/core/comp';

export class TodoItem {
  title = '';
  done = false;
  priority: 'low' | 'normal' | 'high' = 'normal';

  toggle() {
    this.done = !this.done;
  }

  remove() {
    const { node, tree } = getCtx();
    tree.remove(node.$path);
  }
}

registerType('todo.item', TodoItem);

Register a React view for the same type:

// mods/todo/view.tsx
import { useActions, view } from '@treenx/react';
import { TodoItem } from './types';

view(TodoItem, ({ value }) => {
  const { toggle, remove } = useActions(value);

  return (
    <div>
      <button onClick={() => toggle()}>
        {value.done ? 'Done' : 'Open'}
      </button>
      <span>{value.title}</span>
      <button onClick={() => remove()}>Remove</button>
    </div>
  );
});

The type and the view work on the same node. The view reads typed data from value and calls typed server actions through useActions(value).

ECS Composition

Model by attaching capabilities to nodes instead of building inheritance trees or join tables. A task can also be a discussion thread, an AI assignment, a calendar item, and a billing unit because those are separate components on the same addressable entity:

{
  $path: '/work/q2-launch',
  $type: 'todo.task',

  // Main component fields live at node level because $type === 'todo.task'.
  title: 'Ship Q2 launch',
  done: false,
  priority: 'high',

  // Additional components attach under named keys.
  thread: {
    $type: 'forum.thread',
    messages: [],
  },
  ai: {
    $type: 'metatron.assignment',
    agent: '/agents/release-manager',
  },
  schedule: {
    $type: 'calendar.entry',
    dueDate: '2026-05-15',
  },
}

Each component has its own type, schema, actions, views, and permissions. The node gives them shared identity (/work/q2-launch), shared realtime updates, shared audit history, and shared tree placement.

This is the main modeling rule:

  • If two pieces of data describe one thing and share lifecycle, put them on one

    node as components.

  • If they can live or be deleted independently, make them separate nodes and

    connect them with refs or child paths.

  • Add a capability by adding a component. Do not create a subclass just to say

    "task with chat" or "order with AI".

The node itself is its main component. getComponent(node, TodoItem) returns the node when node.$type === 'todo.task'; named keys are for additional components with their own $type.

Runtime Model

Treenix keeps the same object moving through one pipeline:

Layer What happens
Type A class defines fields, validation metadata, and actions for a component.
Component Typed aspects attach to nodes by key and can render or react independently.
Node Data lives at a path in the tree, such as /todos/ship-readme, with one main component and any number of extras.
Context React views, text renderers, services, ACL, schema, and action handlers resolve by (Type, context).
Action Class methods execute as server-side mutations from UI, services, workflows, or MCP clients.
Security ACL and validation run on reads, writes, subscriptions, and action calls.
Realtime Mutations stream patches to subscribed views and child queries.
Audit The runtime can record who changed what, when, and through which path.

Modules

Modules are Types + Views + Services packaged together. A module may define a workflow, a document editor, an MCP adapter, a board, or a domain-specific app.

Current module areas:

Area Examples
Ops Flow, Board, Brahman, Jitsi
Content Mindmap, Blocks, Doc, Table
AI Tagger, Agent, Whisper, Memory
Infra Row-layout, Backup, MCP, Query
Experimental Org, Grove, Resim

Next Steps

  • Quickstart & Setup — create a project and run it locally.
  • Tutorial — build a bookmark manager from a Type, actions, seed data, and views.
  • Create a Mod — package Types, Views, and Services into a reusable module.
  • React Views — register typed views and render children through contexts.

Community

  • GitHub: treenix/treenix-io
  • Discord: discord.gg/peX8CwHQPz
  • Telegram: t.me/treenix_io
  • X: x.com/treenix

License

FSL-1.1-MIT — Fair Source. Read, use, modify, and redistribute for non-competing purposes. Each version becomes MIT two years after release.