M7.1: extract nisse-core
CI / checks (push) Skipped
CI / checks (pull_request) Successful in 1m42s
CI / e2e (pull_request) Successful in 4m0s

What isn't the dev agent's moves to nisse-core, unchanged in behaviour,
with its tests: canonical, render, render_anthropic, llm, catalog, probe,
context, views, state, reconcile, worker, cancel, dump, transport, matrix,
execution, testing, vault, memory, oplog, envfile and gitea (whole).

- nisse_core.state.StateStore holds the tables every agent has; an
  agent's subclass adds its tables (version, migrations), roles and
  views. nisse_dev.state.StateStore adds the build VM blocks (v5).
- views.project takes what each role is shown, rather than a fixed table.
- Vault takes the agent's name (agent=), for provenance.
- A test that nisse_core never imports an agent.
- The loop, config, git, delegation, expert, tools and evals stay in
  nisse-dev until nisse-ops has a loop to share.

Docs: the Development Plan marks M7.1 done and notes that Phase 6 waits on
the agent host and Terraform; Architecture Part L names the package.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J5Utyfzw7gF7UhjRDEtjTk
This commit is contained in:
dongarandClaude Opus 5.5 committed 2026-10-13 18:37:01 +00:00
1 parent 4bbcb09c8e
commit 154a0c3fa8
119 files changed
+1086 -912

No files matched your search

+3 -3
View File
@@ -13,10 +13,10 @@ from pathlib import Path
import pytest
from nisse_core.envfile import load_env_file
from nisse_core.gitea import GiteaClient
from nisse_core.llm import AnthropicPassthroughClient, LiteLLMClient
from nisse_dev.config import AgentConfig
from nisse_dev.envfile import load_env_file
from nisse_dev.gitea import GiteaClient
from nisse_dev.llm import AnthropicPassthroughClient, LiteLLMClient
REPO = Path(__file__).resolve().parents[2]
TEST_CONFIG = Path(__file__).parent / "nisse-test.yaml"
+3 -3
View File
@@ -10,10 +10,10 @@ from collections.abc import Iterator
from dataclasses import dataclass
from pathlib import Path
from nisse_core.execution import SSHHost
from nisse_core.gitea import GiteaClient, GiteaError
from nisse_core.llm import RoleMap
from nisse_dev.config import BuildHost
from nisse_dev.execution import SSHHost
from nisse_dev.gitea import GiteaClient, GiteaError
from nisse_dev.llm import RoleMap
# The end-to-end tests run every role on a local model, which costs nothing
# per call; NISSE_E2E_MODEL overrides it (e.g. claude-haiku-5-5 for a quick,
+2 -2
View File
@@ -5,11 +5,11 @@ from pathlib import Path
import pytest
from nisse_core.catalog import ModelCatalog
from nisse_core.execution import SSHHost
from nisse_dev.bench.runner import run_task
from nisse_dev.bench.tasks import load_tasks
from nisse_dev.catalog import ModelCatalog
from nisse_dev.config import AgentConfig
from nisse_dev.execution import SSHHost
from nisse_dev.loop.build import make_llm_clients
pytestmark = pytest.mark.integration
+1 -1
View File
@@ -16,7 +16,7 @@ import pytest
import yaml
from nisse_core.actions import Action
from nisse_dev.llm import LiteLLMClient
from nisse_core.llm import LiteLLMClient
from nisse_dev.loop.classifier import ActionClassifier, Scope
pytestmark = pytest.mark.integration
+2 -2
View File
@@ -7,7 +7,7 @@ from pathlib import Path
import pytest
from nisse_dev.reconcile import reconcile_on_boot
from nisse_core.reconcile import reconcile_on_boot
from nisse_dev.state import StateStore
pytestmark = pytest.mark.integration
@@ -15,7 +15,7 @@ pytestmark = pytest.mark.integration
CRASH_SCRIPT = """
import os
import sys
from nisse_dev.canonical import UserMessage
from nisse_core.canonical import UserMessage
from nisse_dev.state import StateStore
store = StateStore(sys.argv[1])
+3 -3
View File
@@ -6,11 +6,11 @@ from pathlib import Path
import pytest
from nisse_core.execution import SSHHost
from nisse_core.llm import AnthropicPassthroughClient
from nisse_core.oplog import OpLog
from nisse_dev.delegation import Caps, Delegation
from nisse_dev.execution import SSHHost
from nisse_dev.git import GitRepo
from nisse_dev.llm import AnthropicPassthroughClient
from nisse_dev.oplog import OpLog
from nisse_dev.state import StateStore
from nisse_dev.tools import Workspace
+5 -5
View File
@@ -31,10 +31,11 @@ from e2e_support import (
task,
)
from nisse_dev.canonical import ActionVerdict
from nisse_core.canonical import ActionVerdict
from nisse_core.execution import SSHHost
from nisse_core.gitea import GiteaClient, GiteaError
from nisse_core.transport import InMemoryTransport
from nisse_dev.config import AgentConfig, LoopTuning
from nisse_dev.execution import SSHHost
from nisse_dev.gitea import GiteaClient, GiteaError
from nisse_dev.loop import preflight
from nisse_dev.loop.build import RunningLoop, build_loop_agent
from nisse_dev.loop.items import (
@@ -46,7 +47,6 @@ from nisse_dev.loop.items import (
item_for_issue,
loop_of,
)
from nisse_dev.transport import InMemoryTransport
pytestmark = [pytest.mark.integration, pytest.mark.e2e]
@@ -71,7 +71,7 @@ def running(
run = uuid.uuid4().hex[:8]
stack = contextlib.ExitStack()
# Kept outside pytest's temp directories, which pytest prunes, so a
# failed run's transcript can be read afterwards (nisse_dev.dump).
# failed run's transcript can be read afterwards (nisse_core.dump).
keep = Path(os.environ.get("NISSE_E2E_RUNS", "/tmp/nisse-e2e-runs")) / run
keep.mkdir(parents=True, exist_ok=True)
print(f"\ne2e run {run}: state store in {keep}")
+2 -2
View File
@@ -9,10 +9,10 @@ from pathlib import Path
import pytest
from nisse_core.llm import LiteLLMClient, RoleMap
from nisse_core.oplog import OpLog
from nisse_dev.evals import collect
from nisse_dev.expert import BudgetExhausted, ExpertDesk
from nisse_dev.llm import LiteLLMClient, RoleMap
from nisse_dev.oplog import OpLog
from nisse_dev.state import StateStore
pytestmark = pytest.mark.integration
+1 -1
View File
@@ -7,8 +7,8 @@ from pathlib import Path
import pytest
from e2e_support import fresh_repo, operator_gitea
from nisse_core.gitea import GiteaClient, GiteaError
from nisse_dev.config import AgentConfig
from nisse_dev.gitea import GiteaClient, GiteaError
pytestmark = pytest.mark.integration
+3 -3
View File
@@ -9,12 +9,12 @@ from pathlib import Path
import pytest
from e2e_support import fresh_repo, operator_gitea
from nisse_core.execution import SSHHost
from nisse_core.gitea import GiteaClient, pull_request_reconciler
from nisse_core.state import Intent
from nisse_dev.config import AgentConfig
from nisse_dev.execution import SSHHost
from nisse_dev.git import GitError, GitRepo, SSHKey
from nisse_dev.gitea import GiteaClient, pull_request_reconciler
from nisse_dev.loop.build import remote_url
from nisse_dev.state import Intent
pytestmark = pytest.mark.integration
+4 -4
View File
@@ -2,11 +2,11 @@
import pytest
from nisse_dev.canonical import AssistantText, StoredEvent, UserMessage
from nisse_dev.catalog import ModelCatalog
from nisse_core.canonical import AssistantText, StoredEvent, UserMessage
from nisse_core.catalog import ModelCatalog
from nisse_core.context import BudgetedClient
from nisse_core.llm import LiteLLMClient
from nisse_dev.config import AgentConfig
from nisse_dev.context import BudgetedClient
from nisse_dev.llm import LiteLLMClient
pytestmark = pytest.mark.integration
+1 -1
View File
@@ -5,8 +5,8 @@ import uuid
import pytest
from nisse_core.matrix import MatrixConfig, MatrixTransport
from nisse_dev.config import AgentConfig
from nisse_dev.matrix import MatrixConfig, MatrixTransport
pytestmark = pytest.mark.integration
+3 -3
View File
@@ -21,17 +21,17 @@ argument, not configuration.
import pytest
from nisse_dev.canonical import (
from nisse_core.canonical import (
AssistantText,
StoredEvent,
ToolCall,
ToolResult,
UserMessage,
)
from nisse_dev.catalog import ModelCatalog, select_client
from nisse_core.catalog import ModelCatalog, select_client
from nisse_core.llm import AnthropicPassthroughClient, LiteLLMClient, LLMError
from nisse_dev.config import AgentConfig
from nisse_dev.expert import parse_answer
from nisse_dev.llm import AnthropicPassthroughClient, LiteLLMClient, LLMError
from nisse_dev.loop.tools import ASK_HUMAN, FINISH_MILESTONE, RESTATE
from nisse_dev.tools import EXECUTION_TOOLS
+3 -3
View File
@@ -11,10 +11,10 @@ from pathlib import Path
import httpx
import pytest
from nisse_dev.canonical import AssistantText, ToolCall, ToolResult, UserMessage
from nisse_core.canonical import AssistantText, ToolCall, ToolResult, UserMessage
from nisse_core.llm import AnthropicPassthroughClient
from nisse_core.oplog import OpLog
from nisse_dev.config import AgentConfig
from nisse_dev.llm import AnthropicPassthroughClient
from nisse_dev.oplog import OpLog
from nisse_dev.state import StateStore
from nisse_dev.tools import EXECUTION_TOOLS
+1 -1
View File
@@ -10,8 +10,8 @@ from pathlib import Path
import pytest
from e2e_support import fresh_repo, operator_gitea
from nisse_core.gitea import GiteaClient, GiteaError
from nisse_dev.config import AgentConfig
from nisse_dev.gitea import GiteaClient, GiteaError
pytestmark = pytest.mark.integration