chore: rename to @soulcraftlabs/brainy for Open Brainy on The Source
Prepares the repo for its new home at soulcraftlabs/open-brainy ahead of the Forgejo transfer: package name, publish registry, release script, and every install/import reference across docs, src, tests, examples, and integrations now point at @soulcraftlabs/brainy on The Source. The npmjs storefront leg and byte-identity pair verification are stripped from the release script — The Source is now the only publish target. README gains an Open Brainy explainer and a registry note for consumers. @soulcraft/brainy 10.4.2 was the last release under the old name.
This commit is contained in:
parent
1f34fc6ce4
commit
a99b1e83c4
74 changed files with 230 additions and 284 deletions
|
|
@ -71,9 +71,9 @@ Let's build a projection that organizes files by priority (high, medium, low):
|
|||
### Step 1: Create the Strategy Class
|
||||
|
||||
```typescript
|
||||
import { BaseProjectionStrategy } from '@soulcraft/brainy/vfs/semantic'
|
||||
import { Brainy } from '@soulcraft/brainy'
|
||||
import { VirtualFileSystem, VFSEntity } from '@soulcraft/brainy/vfs'
|
||||
import { BaseProjectionStrategy } from '@soulcraftlabs/brainy/vfs/semantic'
|
||||
import { Brainy } from '@soulcraftlabs/brainy'
|
||||
import { VirtualFileSystem, VFSEntity } from '@soulcraftlabs/brainy/vfs'
|
||||
|
||||
export class PriorityProjection extends BaseProjectionStrategy {
|
||||
readonly name = 'priority'
|
||||
|
|
@ -141,7 +141,7 @@ export class PriorityProjection extends BaseProjectionStrategy {
|
|||
### Step 2: Register the Strategy
|
||||
|
||||
```typescript
|
||||
import { Brainy } from '@soulcraft/brainy'
|
||||
import { Brainy } from '@soulcraftlabs/brainy'
|
||||
import { PriorityProjection } from './PriorityProjection'
|
||||
|
||||
const brain = new Brainy()
|
||||
|
|
@ -537,7 +537,7 @@ Use the projection's resolve cache:
|
|||
|
||||
```typescript
|
||||
import { describe, it, expect, beforeAll } from 'vitest'
|
||||
import { Brainy } from '@soulcraft/brainy'
|
||||
import { Brainy } from '@soulcraftlabs/brainy'
|
||||
import { PriorityProjection } from './PriorityProjection'
|
||||
|
||||
describe('PriorityProjection', () => {
|
||||
|
|
@ -714,7 +714,7 @@ async resolve(brain, vfs, value: string) {
|
|||
3. Use appropriate limits: Don't fetch more than needed
|
||||
|
||||
### Type errors
|
||||
1. Import correct types: `import { Brainy, VirtualFileSystem } from '@soulcraft/brainy'`
|
||||
1. Import correct types: `import { Brainy, VirtualFileSystem } from '@soulcraftlabs/brainy'`
|
||||
2. Use `as VFSEntity` when mapping results
|
||||
3. Check BaseProjectionStrategy import
|
||||
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@ A file explorer that:
|
|||
## ⚡ Step 1: Basic Setup (1 minute)
|
||||
|
||||
```bash
|
||||
npm install @soulcraft/brainy
|
||||
npm install @soulcraftlabs/brainy
|
||||
```
|
||||
|
||||
```typescript
|
||||
import { Brainy } from '@soulcraft/brainy'
|
||||
import { Brainy } from '@soulcraftlabs/brainy'
|
||||
|
||||
// ✅ CORRECT: Use filesystem storage for production
|
||||
const brain = new Brainy({
|
||||
|
|
@ -115,7 +115,7 @@ Here's a complete React component using the correct patterns:
|
|||
|
||||
```tsx
|
||||
import React, { useState, useEffect } from 'react'
|
||||
import { Brainy } from '@soulcraft/brainy'
|
||||
import { Brainy } from '@soulcraftlabs/brainy'
|
||||
|
||||
export function FileExplorer() {
|
||||
const [brain, setBrain] = useState(null)
|
||||
|
|
@ -288,8 +288,8 @@ Your file explorer is now working! Here's what to explore next:
|
|||
### "Module not found" errors
|
||||
```bash
|
||||
# Make sure you're using the right import
|
||||
npm ls @soulcraft/brainy # Check version
|
||||
npm install @soulcraft/brainy@latest # Update if needed
|
||||
npm ls @soulcraftlabs/brainy # Check version
|
||||
npm install @soulcraftlabs/brainy@latest # Update if needed
|
||||
```
|
||||
|
||||
### "VFS not initialized" errors
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Brainy VFS is a revolutionary virtual filesystem that runs on top of Brainy's ne
|
|||
## Quick Start
|
||||
|
||||
```javascript
|
||||
import { VirtualFileSystem } from '@soulcraft/brainy/vfs'
|
||||
import { VirtualFileSystem } from '@soulcraftlabs/brainy/vfs'
|
||||
|
||||
// Initialize the VFS
|
||||
const vfs = new VirtualFileSystem({
|
||||
|
|
@ -381,7 +381,7 @@ Brainy VFS fully leverages Brainy's revolutionary Triple Intelligence system:
|
|||
## Installation
|
||||
|
||||
```bash
|
||||
npm install @soulcraft/brainy
|
||||
npm install @soulcraftlabs/brainy
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ Mount VFS as a native filesystem on Linux/Mac/Windows.
|
|||
|
||||
```typescript
|
||||
// Planned (research phase)
|
||||
import { mountVFS } from '@soulcraft/brainy/vfs/fuse'
|
||||
import { mountVFS } from '@soulcraftlabs/brainy/vfs/fuse'
|
||||
|
||||
await mountVFS(vfs, {
|
||||
mountPoint: '/mnt/brainy',
|
||||
|
|
@ -160,7 +160,7 @@ These features would benefit from community contributions. If you're interested
|
|||
### Express.js Static Middleware
|
||||
```typescript
|
||||
// Wanted: Community contribution
|
||||
import { createStaticMiddleware } from '@soulcraft/brainy/vfs/express'
|
||||
import { createStaticMiddleware } from '@soulcraftlabs/brainy/vfs/express'
|
||||
|
||||
app.use('/files', createStaticMiddleware(vfs, {
|
||||
index: ['index.html', 'index.md'],
|
||||
|
|
@ -172,7 +172,7 @@ app.use('/files', createStaticMiddleware(vfs, {
|
|||
### VSCode Extension
|
||||
```typescript
|
||||
// Wanted: Community contribution
|
||||
import { VFSProvider } from '@soulcraft/brainy/vfs/vscode'
|
||||
import { VFSProvider } from '@soulcraftlabs/brainy/vfs/vscode'
|
||||
|
||||
const provider = new VFSProvider(vfs)
|
||||
vscode.workspace.registerFileSystemProvider('brainy', provider)
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ console.log(id1 === id2 && id2 === id3) // true
|
|||
Create your own semantic dimensions:
|
||||
|
||||
```typescript
|
||||
import { BaseProjectionStrategy } from '@soulcraft/brainy/vfs/semantic'
|
||||
import { BaseProjectionStrategy } from '@soulcraftlabs/brainy/vfs/semantic'
|
||||
|
||||
class PriorityProjection extends BaseProjectionStrategy {
|
||||
readonly name = 'priority'
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ Brainy's Virtual Filesystem (VFS) provides a POSIX-like filesystem interface tha
|
|||
## Quick Start
|
||||
|
||||
```typescript
|
||||
import { Brainy } from '@soulcraft/brainy'
|
||||
import { Brainy } from '@soulcraftlabs/brainy'
|
||||
|
||||
// Initialize Brainy
|
||||
const brain = new Brainy({
|
||||
|
|
@ -598,7 +598,7 @@ const user = await store.findById('users', 'user123')
|
|||
VFS uses standard POSIX-style errors:
|
||||
|
||||
```typescript
|
||||
import { VFSError, VFSErrorCode } from '@soulcraft/brainy'
|
||||
import { VFSError, VFSErrorCode } from '@soulcraftlabs/brainy'
|
||||
|
||||
try {
|
||||
await vfs.readFile('/nonexistent.txt')
|
||||
|
|
|
|||
|
|
@ -280,7 +280,7 @@ GitBridge provides Git import/export capabilities:
|
|||
#### GitBridge Usage
|
||||
```javascript
|
||||
// Import and instantiate GitBridge
|
||||
import { GitBridge } from '@soulcraft/brainy'
|
||||
import { GitBridge } from '@soulcraftlabs/brainy'
|
||||
const gitBridge = new GitBridge(vfs, brain)
|
||||
|
||||
// Export VFS to Git repository structure
|
||||
|
|
@ -452,7 +452,7 @@ This ordering prevents race conditions where file writes might fail because pare
|
|||
## Complete Example
|
||||
|
||||
```javascript
|
||||
import { Brainy } from '@soulcraft/brainy'
|
||||
import { Brainy } from '@soulcraftlabs/brainy'
|
||||
|
||||
async function vfsExample() {
|
||||
// Initialize
|
||||
|
|
|
|||
|
|
@ -196,5 +196,5 @@ await brain.relate({
|
|||
Always import and use the type enums:
|
||||
|
||||
```javascript
|
||||
import { NounType, VerbType } from '@soulcraft/brainy'
|
||||
import { NounType, VerbType } from '@soulcraftlabs/brainy'
|
||||
```
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
The Brainy VFS is automatically initialized during `brain.init()`. No separate initialization needed!
|
||||
|
||||
```javascript
|
||||
import { Brainy } from '@soulcraft/brainy'
|
||||
import { Brainy } from '@soulcraftlabs/brainy'
|
||||
|
||||
// Create and initialize Brainy
|
||||
const brain = new Brainy({
|
||||
|
|
@ -71,7 +71,7 @@ VFS stores files as entities and relationships in the same graph as everything e
|
|||
## Complete Example
|
||||
|
||||
```javascript
|
||||
import { Brainy } from '@soulcraft/brainy'
|
||||
import { Brainy } from '@soulcraftlabs/brainy'
|
||||
|
||||
async function useVFS() {
|
||||
// Initialize Brainy
|
||||
|
|
@ -100,7 +100,7 @@ useVFS().catch(console.error)
|
|||
## TypeScript Usage
|
||||
|
||||
```typescript
|
||||
import { Brainy, VirtualFileSystem } from '@soulcraft/brainy'
|
||||
import { Brainy, VirtualFileSystem } from '@soulcraftlabs/brainy'
|
||||
|
||||
class FileManager {
|
||||
private brain: Brainy
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ Brainy VFS provides safe, tree-aware methods that prevent these issues:
|
|||
### Method 1: Use `getDirectChildren()` (Recommended)
|
||||
|
||||
```typescript
|
||||
import { Brainy, VirtualFileSystem } from '@soulcraft/brainy'
|
||||
import { Brainy, VirtualFileSystem } from '@soulcraftlabs/brainy'
|
||||
|
||||
const brain = new Brainy()
|
||||
await brain.init()
|
||||
|
|
@ -97,7 +97,7 @@ Here's a complete example using React:
|
|||
|
||||
```tsx
|
||||
import React, { useState, useEffect } from 'react'
|
||||
import { VirtualFileSystem } from '@soulcraft/brainy'
|
||||
import { VirtualFileSystem } from '@soulcraftlabs/brainy'
|
||||
|
||||
interface FileNode {
|
||||
name: string
|
||||
|
|
@ -177,7 +177,7 @@ function TreeView({ node, onToggle, expanded }) {
|
|||
If you must build trees manually from flat lists, use the `VFSTreeUtils`:
|
||||
|
||||
```typescript
|
||||
import { VFSTreeUtils } from '@soulcraft/brainy/vfs'
|
||||
import { VFSTreeUtils } from '@soulcraftlabs/brainy/vfs'
|
||||
|
||||
// Get all entities somehow
|
||||
const allEntities = await vfs.getDescendants('/root')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue