Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ DETERMINISTIC_PKGS := \
./cmd/agency \
./cmd/memory \
./internal/agency \
./internal/agencyclient \
./internal/attach \
./internal/authority \
./internal/artifact \
./internal/embed \
./internal/graph \
./internal/importdraft \
./internal/model \
./internal/search \
./internal/setup \
./internal/setup/assets \
./internal/store \
./internal/agency/client \
./internal/agency/attach \
./internal/agency/authority \
./internal/agency/artifact \
./internal/memory/embed \
./internal/memory/graph \
./internal/memory/importdraft \
./internal/memory/model \
./internal/memory/search \
./internal/memory/setup \
./internal/memory/setup/assets \
./internal/memory/store \
./test/mnemond/architecture \
./test/mnemond/observer \
./test/mnemond/domainops/trace
Expand Down
2 changes: 1 addition & 1 deletion cmd/agency/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package agency
import (
"errors"

"github.com/mnemon-dev/mnemon/internal/agencyclient"
"github.com/mnemon-dev/mnemon/internal/agency/client"
"github.com/mnemon-dev/mnemon/internal/daemon"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/agency/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os"
"strings"

"github.com/mnemon-dev/mnemon/internal/attach"
"github.com/mnemon-dev/mnemon/internal/agency/attach"
"github.com/mnemon-dev/mnemon/internal/daemon"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/memory/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"os"

"github.com/mnemon-dev/mnemon/internal/embed"
"github.com/mnemon-dev/mnemon/internal/memory/embed"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/memory/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"os"

"github.com/mnemon-dev/mnemon/internal/store"
"github.com/mnemon-dev/mnemon/internal/memory/store"
"github.com/spf13/cobra"
)

Expand Down
12 changes: 6 additions & 6 deletions cmd/memory/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import (
"time"

"github.com/google/uuid"
"github.com/mnemon-dev/mnemon/internal/embed"
"github.com/mnemon-dev/mnemon/internal/graph"
"github.com/mnemon-dev/mnemon/internal/importdraft"
"github.com/mnemon-dev/mnemon/internal/model"
"github.com/mnemon-dev/mnemon/internal/search"
"github.com/mnemon-dev/mnemon/internal/store"
"github.com/mnemon-dev/mnemon/internal/memory/embed"
"github.com/mnemon-dev/mnemon/internal/memory/graph"
"github.com/mnemon-dev/mnemon/internal/memory/importdraft"
"github.com/mnemon-dev/mnemon/internal/memory/model"
"github.com/mnemon-dev/mnemon/internal/memory/search"
"github.com/mnemon-dev/mnemon/internal/memory/store"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/memory/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"testing"
"time"

"github.com/mnemon-dev/mnemon/internal/model"
"github.com/mnemon-dev/mnemon/internal/store"
"github.com/mnemon-dev/mnemon/internal/memory/model"
"github.com/mnemon-dev/mnemon/internal/memory/store"
)

func TestImportRepairsBackdatedTemporalBackbone(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/memory/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"time"

"github.com/mnemon-dev/mnemon/internal/model"
"github.com/mnemon-dev/mnemon/internal/memory/model"
"github.com/spf13/cobra"
)

Expand Down
8 changes: 4 additions & 4 deletions cmd/memory/recall.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"os"
"strings"

"github.com/mnemon-dev/mnemon/internal/embed"
"github.com/mnemon-dev/mnemon/internal/graph"
"github.com/mnemon-dev/mnemon/internal/search"
"github.com/mnemon-dev/mnemon/internal/store"
"github.com/mnemon-dev/mnemon/internal/memory/embed"
"github.com/mnemon-dev/mnemon/internal/memory/graph"
"github.com/mnemon-dev/mnemon/internal/memory/search"
"github.com/mnemon-dev/mnemon/internal/memory/store"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/memory/recall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"testing"
"time"

"github.com/mnemon-dev/mnemon/internal/model"
"github.com/mnemon-dev/mnemon/internal/search"
"github.com/mnemon-dev/mnemon/internal/memory/model"
"github.com/mnemon-dev/mnemon/internal/memory/search"
)

func makeTestRecallResponse() search.RecallResponse {
Expand Down
2 changes: 1 addition & 1 deletion cmd/memory/receipt.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os"
"time"

"github.com/mnemon-dev/mnemon/internal/store"
"github.com/mnemon-dev/mnemon/internal/memory/store"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/memory/receipt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"testing"
"time"

"github.com/mnemon-dev/mnemon/internal/store"
"github.com/mnemon-dev/mnemon/internal/memory/store"
)

func TestBuildReceiptOmitsRawDetails(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions cmd/memory/related.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"fmt"
"os"

"github.com/mnemon-dev/mnemon/internal/graph"
"github.com/mnemon-dev/mnemon/internal/model"
"github.com/mnemon-dev/mnemon/internal/store"
"github.com/mnemon-dev/mnemon/internal/memory/graph"
"github.com/mnemon-dev/mnemon/internal/memory/model"
"github.com/mnemon-dev/mnemon/internal/memory/store"
"github.com/spf13/cobra"
)

Expand Down
10 changes: 5 additions & 5 deletions cmd/memory/remember.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"time"

"github.com/google/uuid"
"github.com/mnemon-dev/mnemon/internal/embed"
"github.com/mnemon-dev/mnemon/internal/graph"
"github.com/mnemon-dev/mnemon/internal/model"
"github.com/mnemon-dev/mnemon/internal/search"
"github.com/mnemon-dev/mnemon/internal/store"
"github.com/mnemon-dev/mnemon/internal/memory/embed"
"github.com/mnemon-dev/mnemon/internal/memory/graph"
"github.com/mnemon-dev/mnemon/internal/memory/model"
"github.com/mnemon-dev/mnemon/internal/memory/search"
"github.com/mnemon-dev/mnemon/internal/memory/store"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/memory/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"os"

"github.com/mnemon-dev/mnemon/internal/embed"
"github.com/mnemon-dev/mnemon/internal/store"
"github.com/mnemon-dev/mnemon/internal/memory/embed"
"github.com/mnemon-dev/mnemon/internal/memory/store"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/memory/root_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"strings"
"testing"

"github.com/mnemon-dev/mnemon/internal/embed"
"github.com/mnemon-dev/mnemon/internal/memory/embed"
)

func TestNewReturnsComposableMemoryRoot(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/memory/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"strings"

"github.com/mnemon-dev/mnemon/internal/search"
"github.com/mnemon-dev/mnemon/internal/memory/search"
"github.com/spf13/cobra"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/memory/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"strings"

"github.com/mnemon-dev/mnemon/internal/setup"
"github.com/mnemon-dev/mnemon/internal/setup/assets"
"github.com/mnemon-dev/mnemon/internal/store"
"github.com/mnemon-dev/mnemon/internal/memory/setup"
"github.com/mnemon-dev/mnemon/internal/memory/setup/assets"
"github.com/mnemon-dev/mnemon/internal/memory/store"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/memory/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

"github.com/mnemon-dev/mnemon/internal/store"
"github.com/mnemon-dev/mnemon/internal/memory/store"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/memory/viz.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"strings"

"github.com/mnemon-dev/mnemon/internal/model"
"github.com/mnemon-dev/mnemon/internal/memory/model"
"github.com/spf13/cobra"
)

Expand Down
18 changes: 9 additions & 9 deletions docs/mnemond/protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,19 @@ The two nodes never share a canonical Task or Handling. Consequently:
## Package ownership

```text
internal/agency immutable protocol values and canonical projections
internal/authority sealed View, Intent binding, admission, Handling and Reference state
internal/artifact immutable content bytes and digest verification
internal/peerlink replaceable authenticated transport only
internal/daemon process composition and lifecycle
internal/agencyclient Runtime-facing local terminal and replay journal
internal/attach host Hook, guide, and tool projection
internal/agency immutable protocol values and canonical projections
internal/agency/authority sealed View, Intent binding, admission, Handling and Reference state
internal/agency/artifact immutable content bytes and digest verification
internal/agency/peerlink replaceable authenticated transport only
internal/agency/client Runtime-facing local terminal and replay journal
internal/agency/attach host Hook, guide, and tool projection
internal/daemon process composition and lifecycle
```

`internal/authority` is the only durable fact writer. Runtime adapters and
`internal/agency/authority` is the only durable fact writer. Runtime adapters and
transport may present candidates or observations but do not own protocol
state. `internal/agency` validates immutable values; policy that resolves View
handles or decides durable consequences belongs to `internal/authority`.
handles or decides durable consequences belongs to `internal/agency/authority`.

## Capability boundary

Expand Down
18 changes: 9 additions & 9 deletions docs/zh/mnemond/protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,18 @@ Node A 收到 candidate
## Package 权责

```text
internal/agency 不可变协议值与 canonical projection
internal/authority sealed View、Intent binding、admission、Handling/Reference state
internal/artifact 不可变内容字节与 digest 验证
internal/peerlink 可替换的认证传输
internal/daemon 进程组合与生命周期
internal/agencyclient Runtime 面向的本地 terminal 与 replay journal
internal/attach Host Hook、guide 和工具投影
internal/agency 不可变协议值与 canonical projection
internal/agency/authority sealed View、Intent binding、admission、Handling/Reference state
internal/agency/artifact 不可变内容字节与 digest 验证
internal/agency/peerlink 可替换的认证传输
internal/agency/client Runtime 面向的本地 terminal 与 replay journal
internal/agency/attach Host Hook、guide 和工具投影
internal/daemon 进程组合与生命周期
```

`internal/authority` 是唯一持久事实 writer。Runtime adapter 和 transport
`internal/agency/authority` 是唯一持久事实 writer。Runtime adapter 和 transport
只能提供 candidate 或 observation。`internal/agency` 校验不可变值;解析
View handle、选择持久 consequence 等 policy 必须属于 `internal/authority`。
View handle、选择持久 consequence 等 policy 必须属于 `internal/agency/authority`。

## 能力边界

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

"github.com/mnemon-dev/mnemon/internal/agency"
"github.com/mnemon-dev/mnemon/internal/artifact"
"github.com/mnemon-dev/mnemon/internal/agency/artifact"
)

const (
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"unicode/utf8"

"github.com/mnemon-dev/mnemon/internal/agency"
"github.com/mnemon-dev/mnemon/internal/artifact"
"github.com/mnemon-dev/mnemon/internal/agency/artifact"
)

const (
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"sync"
"time"

"github.com/mnemon-dev/mnemon/internal/artifact"
"github.com/mnemon-dev/mnemon/internal/agency/artifact"
)

// DeliveryHandler receives opaque candidate bytes only after the TLS key has
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"

"github.com/mnemon-dev/mnemon/internal/agency"
artifactstore "github.com/mnemon-dev/mnemon/internal/artifact"
artifactstore "github.com/mnemon-dev/mnemon/internal/agency/artifact"
)

func TestTCPRoundTripAuthenticatesDeliveryAndSeparatesACKReceiptAndArtifact(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/daemon/control.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http"

"github.com/mnemon-dev/mnemon/internal/agency"
"github.com/mnemon-dev/mnemon/internal/artifact"
"github.com/mnemon-dev/mnemon/internal/agency/artifact"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions internal/daemon/control_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"strings"

"github.com/mnemon-dev/mnemon/internal/agency"
"github.com/mnemon-dev/mnemon/internal/artifact"
"github.com/mnemon-dev/mnemon/internal/authority"
"github.com/mnemon-dev/mnemon/internal/agency/artifact"
"github.com/mnemon-dev/mnemon/internal/agency/authority"
)

type controlErrorCode string
Expand Down
4 changes: 2 additions & 2 deletions internal/daemon/control_parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"strings"

"github.com/mnemon-dev/mnemon/internal/agency"
"github.com/mnemon-dev/mnemon/internal/artifact"
"github.com/mnemon-dev/mnemon/internal/authority"
"github.com/mnemon-dev/mnemon/internal/agency/artifact"
"github.com/mnemon-dev/mnemon/internal/agency/authority"
)

func prepareControlRequest(request *http.Request, readOnly, requireAttachment,
Expand Down
4 changes: 2 additions & 2 deletions internal/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"time"

"github.com/mnemon-dev/mnemon/internal/agency"
"github.com/mnemon-dev/mnemon/internal/artifact"
"github.com/mnemon-dev/mnemon/internal/authority"
"github.com/mnemon-dev/mnemon/internal/agency/artifact"
"github.com/mnemon-dev/mnemon/internal/agency/authority"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions internal/daemon/daemon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"time"

"github.com/mnemon-dev/mnemon/internal/agency"
"github.com/mnemon-dev/mnemon/internal/artifact"
"github.com/mnemon-dev/mnemon/internal/authority"
"github.com/mnemon-dev/mnemon/internal/agency/artifact"
"github.com/mnemon-dev/mnemon/internal/agency/authority"
)

func TestDaemonServesCompleteLocalLoopOverOwnerUnix(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion internal/daemon/ensure.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"syscall"
"time"

"github.com/mnemon-dev/mnemon/internal/authority"
"github.com/mnemon-dev/mnemon/internal/agency/authority"
"golang.org/x/sys/unix"
)

Expand Down
Loading
Loading