~kris/9p

llm9p

ref: 35c20f3e6e008970ccdc9ea460682c578bd6d35a llm9p/internal/llmfs/root.go -rw-r--r-- 903 bytes
35c20f3e — pdfinn fix(client): replace empty text content block with placeholder 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Package llmfs implements the LLM filesystem exposed via 9P.
package llmfs

import (
	"github.com/NERVsystems/llm9p/internal/llm"
	"github.com/NERVsystems/llm9p/internal/protocol"
)

// NewRoot creates the root directory of the LLM filesystem.
// This implements the clone-based session architecture (CSP compliant):
//
//	/n/llm/
//	├── new              # Read to create session, returns ID
//	├── 0/               # Session 0 (fully independent)
//	│   ├── ask
//	│   ├── context
//	│   ├── ctl
//	│   ├── model
//	│   ├── temperature
//	│   ├── system
//	│   ├── thinking
//	│   └── prefill
//	├── 1/               # Session 1 (fully independent)
//	└── ...
//
// No global files. Each session is isolated with its own settings.
func NewRoot(sm *llm.SessionManager) protocol.Dir {
	return NewSessionsDir(sm)
}