nisse-core: group modules into packages by architecture section
A pure move; behaviour unchanged. - models (L9, L7): llm, catalog, probe, render, render_anthropic, context - log (L7, L6): canonical, views - state (L8): store (was state), reconcile, worker, cancel, dump - knowledge (L10, L6.4): vault, memory - conversation (L5): transport, matrix - execution (L13): ssh (was execution), testing - authority (P3, P4, L4): actions - gitea, oplog, envfile stay at the top until each gains a second module. Every import, monkeypatch target, script and doc reference rewritten. 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:
1 parent
06759d5d70
commit
e351d0a74e
117 files changed
+291
-265
No files matched your search
@@ -11,7 +11,8 @@ from datetime import UTC, datetime
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from nisse_core.canonical import (
|
||||
from nisse_core.execution.ssh import SSHHost
|
||||
from nisse_core.log.canonical import (
|
||||
CanonicalEvent,
|
||||
Fact,
|
||||
StoredEvent,
|
||||
@@ -19,8 +20,7 @@ from nisse_core.canonical import (
|
||||
ToolResult,
|
||||
UserMessage,
|
||||
)
|
||||
from nisse_core.catalog import ModelFacts
|
||||
from nisse_core.execution import SSHHost
|
||||
from nisse_core.models.catalog import ModelFacts
|
||||
from nisse_core.oplog import OpLog
|
||||
from nisse_dev.bench.tasks import Task
|
||||
from nisse_dev.config import Tuning
|
||||
|
||||
@@ -23,9 +23,13 @@ from typing import Any
|
||||
|
||||
import yaml
|
||||
|
||||
from nisse_core.llm import DEFAULT_MAX_OUTPUT_TOKENS, DEFAULT_REQUEST_TIMEOUT_S, RoleMap
|
||||
from nisse_core.matrix import MatrixConfig
|
||||
from nisse_core.vault import ACCESS, DEFAULT_IGNORE
|
||||
from nisse_core.conversation.matrix import MatrixConfig
|
||||
from nisse_core.knowledge.vault import ACCESS, DEFAULT_IGNORE
|
||||
from nisse_core.models.llm import (
|
||||
DEFAULT_MAX_OUTPUT_TOKENS,
|
||||
DEFAULT_REQUEST_TIMEOUT_S,
|
||||
RoleMap,
|
||||
)
|
||||
|
||||
DEFAULT_CONFIG_FILE = "nisse-dev.yaml"
|
||||
|
||||
|
||||
@@ -28,8 +28,7 @@ from collections.abc import Callable
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Any, Literal
|
||||
|
||||
from nisse_core.cancel import Cancel, skip_calls
|
||||
from nisse_core.canonical import (
|
||||
from nisse_core.log.canonical import (
|
||||
AssistantText,
|
||||
DelegationCompleted,
|
||||
DelegationStarted,
|
||||
@@ -39,9 +38,10 @@ from nisse_core.canonical import (
|
||||
ToolCall,
|
||||
ToolResult,
|
||||
)
|
||||
from nisse_core.llm import LLMClient, LLMError, UpstreamUnavailable
|
||||
from nisse_core.reconcile import Reconciler
|
||||
from nisse_core.state import Intent, Transcript
|
||||
from nisse_core.models.llm import LLMClient, LLMError, UpstreamUnavailable
|
||||
from nisse_core.state.cancel import Cancel, skip_calls
|
||||
from nisse_core.state.reconcile import Reconciler
|
||||
from nisse_core.state.store import Intent, Transcript
|
||||
from nisse_dev.git import GitError, GitRepo
|
||||
from nisse_dev.state import StateStore
|
||||
from nisse_dev.tools import EXECUTION_TOOLS, MUTATING_TOOLS, Workspace
|
||||
|
||||
@@ -15,7 +15,7 @@ from collections.abc import Iterable
|
||||
from dataclasses import asdict, dataclass
|
||||
from typing import Any
|
||||
|
||||
from nisse_core.canonical import (
|
||||
from nisse_core.log.canonical import (
|
||||
ActionVerdict,
|
||||
DelegationCompleted,
|
||||
DelegationStarted,
|
||||
|
||||
@@ -26,14 +26,14 @@ import json
|
||||
import re
|
||||
from dataclasses import dataclass
|
||||
|
||||
from nisse_core.canonical import (
|
||||
from nisse_core.log.canonical import (
|
||||
DelegationCompleted,
|
||||
DelegationStarted,
|
||||
StoredEvent,
|
||||
UserMessage,
|
||||
)
|
||||
from nisse_core.llm import LLMClient, LLMError, RoleMap
|
||||
from nisse_core.state import Transcript
|
||||
from nisse_core.models.llm import LLMClient, LLMError, RoleMap
|
||||
from nisse_core.state.store import Transcript
|
||||
|
||||
EXPERT_ROLE = "expert"
|
||||
DEFAULT_BUDGET = 3
|
||||
|
||||
@@ -21,7 +21,7 @@ import shlex
|
||||
from dataclasses import dataclass, field
|
||||
from pathlib import Path
|
||||
|
||||
from nisse_core.execution import HostUnavailable, SSHHost
|
||||
from nisse_core.execution.ssh import HostUnavailable, SSHHost
|
||||
|
||||
TIMEOUT_S = 120
|
||||
|
||||
|
||||
@@ -17,13 +17,13 @@ do, judged by code before anything runs.
|
||||
and is logged.
|
||||
|
||||
A rule never makes a command less severe than its worst part; what can't be
|
||||
read statically is unknown (nisse_core.actions).
|
||||
read statically is unknown (nisse_core.authority.actions).
|
||||
"""
|
||||
|
||||
import posixpath
|
||||
from collections.abc import Callable
|
||||
|
||||
from nisse_core.actions import (
|
||||
from nisse_core.authority.actions import (
|
||||
CONTAINED,
|
||||
DANGEROUS,
|
||||
HARMLESS,
|
||||
|
||||
@@ -26,7 +26,7 @@ from dataclasses import dataclass, replace
|
||||
from datetime import UTC, datetime
|
||||
from typing import Any
|
||||
|
||||
from nisse_core.actions import (
|
||||
from nisse_core.authority.actions import (
|
||||
CONTAINED,
|
||||
DANGEROUS,
|
||||
REFUSED,
|
||||
@@ -34,8 +34,12 @@ from nisse_core.actions import (
|
||||
Action,
|
||||
Verdict,
|
||||
)
|
||||
from nisse_core.cancel import Cancel
|
||||
from nisse_core.canonical import (
|
||||
from nisse_core.conversation.transport import InboundMessage, Transport
|
||||
from nisse_core.execution.ssh import HostKeyChanged, HostUnavailable
|
||||
from nisse_core.gitea import GiteaClient, GiteaError, Issue, PullRequest
|
||||
from nisse_core.knowledge.memory import Memory
|
||||
from nisse_core.knowledge.vault import Vault, VaultError
|
||||
from nisse_core.log.canonical import (
|
||||
ActionVerdict,
|
||||
DelegationCompleted,
|
||||
DelegationStarted,
|
||||
@@ -46,15 +50,11 @@ from nisse_core.canonical import (
|
||||
ToolResult,
|
||||
UserMessage,
|
||||
)
|
||||
from nisse_core.execution import HostKeyChanged, HostUnavailable
|
||||
from nisse_core.gitea import GiteaClient, GiteaError, Issue, PullRequest
|
||||
from nisse_core.llm import LLMError, RoleMap
|
||||
from nisse_core.memory import Memory
|
||||
from nisse_core.models.llm import LLMError, RoleMap
|
||||
from nisse_core.oplog import OpLog
|
||||
from nisse_core.state import WorkItem
|
||||
from nisse_core.transport import InboundMessage, Transport
|
||||
from nisse_core.vault import Vault, VaultError
|
||||
from nisse_core.worker import Worker
|
||||
from nisse_core.state.cancel import Cancel
|
||||
from nisse_core.state.store import WorkItem
|
||||
from nisse_core.state.worker import Worker
|
||||
from nisse_dev.config import GENERAL
|
||||
from nisse_dev.delegation import DELEGATION_INTENT, Delegation
|
||||
from nisse_dev.expert import BudgetExhausted, ExpertDesk
|
||||
|
||||
@@ -7,17 +7,17 @@ import threading
|
||||
from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
|
||||
from nisse_core.cancel import Cancel
|
||||
from nisse_core.catalog import ModelCatalog, select_client
|
||||
from nisse_core.context import BudgetedClient
|
||||
from nisse_core.execution import SSHHost
|
||||
from nisse_core.conversation.matrix import MatrixTransport
|
||||
from nisse_core.execution.ssh import SSHHost
|
||||
from nisse_core.gitea import GiteaClient
|
||||
from nisse_core.llm import AnthropicPassthroughClient, LiteLLMClient
|
||||
from nisse_core.matrix import MatrixTransport
|
||||
from nisse_core.memory import Memory
|
||||
from nisse_core.knowledge.memory import Memory
|
||||
from nisse_core.knowledge.vault import Vault
|
||||
from nisse_core.models.catalog import ModelCatalog, select_client
|
||||
from nisse_core.models.context import BudgetedClient
|
||||
from nisse_core.models.llm import AnthropicPassthroughClient, LiteLLMClient
|
||||
from nisse_core.oplog import OpLog
|
||||
from nisse_core.vault import Vault
|
||||
from nisse_core.worker import SerialWorker
|
||||
from nisse_core.state.cancel import Cancel
|
||||
from nisse_core.state.worker import SerialWorker
|
||||
from nisse_dev.config import AgentConfig, ConfigError
|
||||
from nisse_dev.config import Project as ProjectEntry
|
||||
from nisse_dev.delegation import Caps
|
||||
|
||||
@@ -16,9 +16,9 @@ from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
from typing import Any
|
||||
|
||||
from nisse_core.actions import CONTAINED, DANGEROUS, Action, Verdict
|
||||
from nisse_core.canonical import StoredEvent, ToolCall, UserMessage
|
||||
from nisse_core.llm import LLMClient, LLMError
|
||||
from nisse_core.authority.actions import CONTAINED, DANGEROUS, Action, Verdict
|
||||
from nisse_core.log.canonical import StoredEvent, ToolCall, UserMessage
|
||||
from nisse_core.models.llm import LLMClient, LLMError
|
||||
|
||||
SAFE = "safe"
|
||||
IN_SCOPE = "in_scope"
|
||||
|
||||
@@ -11,10 +11,10 @@ from collections.abc import Callable, Mapping
|
||||
from dataclasses import dataclass
|
||||
from typing import Any, Literal
|
||||
|
||||
from nisse_core.cancel import Cancel, skip_calls
|
||||
from nisse_core.canonical import AssistantText, Fact, ToolCall, ToolResult
|
||||
from nisse_core.llm import LLMClient, LLMError
|
||||
from nisse_core.state import Transcript
|
||||
from nisse_core.log.canonical import AssistantText, Fact, ToolCall, ToolResult
|
||||
from nisse_core.models.llm import LLMClient, LLMError
|
||||
from nisse_core.state.cancel import Cancel, skip_calls
|
||||
from nisse_core.state.store import Transcript
|
||||
from nisse_dev.loop.tools import WAITING, names
|
||||
from nisse_dev.tools import Workspace
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ half-edited tree).
|
||||
from collections.abc import Callable, Mapping
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
from nisse_core.llm import LLMClient, RoleMap
|
||||
from nisse_core.models.llm import LLMClient, RoleMap
|
||||
from nisse_dev.config import Profile
|
||||
from nisse_dev.delegation import Caps
|
||||
from nisse_dev.expert import DEFAULT_BUDGET
|
||||
|
||||
@@ -8,7 +8,7 @@ agreement, what it is waiting for) is in ``data["loop"]``.
|
||||
from dataclasses import asdict, dataclass
|
||||
from typing import Any
|
||||
|
||||
from nisse_core.state import WorkItem
|
||||
from nisse_core.state.store import WorkItem
|
||||
from nisse_dev.state import StateStore
|
||||
|
||||
READY = "ready"
|
||||
|
||||
@@ -20,8 +20,8 @@ import shlex
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Any
|
||||
|
||||
from nisse_core.actions import split_shell, unwrap
|
||||
from nisse_core.execution import SSHHost
|
||||
from nisse_core.authority.actions import split_shell, unwrap
|
||||
from nisse_core.execution.ssh import SSHHost
|
||||
|
||||
# What the harness itself runs on a build VM (L13, D4): part of the
|
||||
# template, never of a project's toolchain.
|
||||
|
||||
@@ -10,8 +10,8 @@ The driver's model reads for now; the classifier role takes over in M2.6.
|
||||
|
||||
from typing import Any
|
||||
|
||||
from nisse_core.canonical import StoredEvent, ToolCall, UserMessage
|
||||
from nisse_core.llm import LLMClient, LLMError
|
||||
from nisse_core.log.canonical import StoredEvent, ToolCall, UserMessage
|
||||
from nisse_core.models.llm import LLMClient, LLMError
|
||||
|
||||
|
||||
def command_form(text: str) -> str:
|
||||
|
||||
@@ -5,8 +5,8 @@ import sqlite3
|
||||
from collections.abc import Mapping
|
||||
from dataclasses import dataclass
|
||||
|
||||
from nisse_core import state
|
||||
from nisse_core.state import Migration, utc_now
|
||||
from nisse_core.state import store as state
|
||||
from nisse_core.state.store import Migration, utc_now
|
||||
|
||||
_VM_BLOCKS = """
|
||||
CREATE TABLE vm_blocks (
|
||||
@@ -48,7 +48,7 @@ class StateStore(state.StateStore):
|
||||
"toolchain", # the toolchain step (D3): the driver's model, apart
|
||||
"memory", # the memory pass at an item's close (L6.4), apart too
|
||||
}
|
||||
# What each role is shown of the others' work (``nisse_core.views``).
|
||||
# What each role is shown of the others' work (``nisse_core.log.views``).
|
||||
SHOWN: Mapping[str, Mapping[str, str]] = {
|
||||
"driver": {"helper": "report"},
|
||||
"helper": {"driver": "narrate"},
|
||||
|
||||
@@ -20,8 +20,8 @@ from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from nisse_core.context import head_and_tail
|
||||
from nisse_core.execution import HostUnavailable, Result, SSHHost
|
||||
from nisse_core.execution.ssh import HostUnavailable, Result, SSHHost
|
||||
from nisse_core.models.context import head_and_tail
|
||||
|
||||
# Tools that change or verify something. Reading a file or listing a
|
||||
# directory is a model looking around, not doing the work, so neither counts
|
||||
|
||||
@@ -10,8 +10,8 @@ unit tests and be rejected live; this makes it fail here.
|
||||
|
||||
from typing import Any
|
||||
|
||||
from nisse_core.render import OpenAIChatRenderer
|
||||
from nisse_core.render_anthropic import AnthropicMessagesRenderer
|
||||
from nisse_core.models.render import OpenAIChatRenderer
|
||||
from nisse_core.models.render_anthropic import AnthropicMessagesRenderer
|
||||
|
||||
|
||||
def assert_renderable(events: list[Any]) -> None:
|
||||
|
||||
@@ -11,9 +11,9 @@ import httpx
|
||||
import pytest
|
||||
from test_config import SECRETS, P, tree
|
||||
|
||||
from nisse_core.catalog import ModelCatalog, UnknownModel
|
||||
from nisse_core.execution import SSHHost
|
||||
from nisse_core.llm import AnthropicPassthroughClient, LiteLLMClient
|
||||
from nisse_core.execution.ssh import SSHHost
|
||||
from nisse_core.models.catalog import ModelCatalog, UnknownModel
|
||||
from nisse_core.models.llm import AnthropicPassthroughClient, LiteLLMClient
|
||||
from nisse_core.oplog import OpLog
|
||||
from nisse_dev.config import AgentConfig
|
||||
from nisse_dev.loop.build import RunningLoop, build_loop_agent, discover_models
|
||||
@@ -143,7 +143,7 @@ def offline(monkeypatch: Any, origins: dict[str, str] | str, catalog=None) -> No
|
||||
"""Only the network boundaries faked: Gitea, LiteLLM's model list, Matrix."""
|
||||
# The proxy here doesn't exist: a call to it fails at once rather than
|
||||
# waiting out an outage's backoff (L5).
|
||||
monkeypatch.setattr("nisse_core.llm.OUTAGE_BACKOFF_S", ())
|
||||
monkeypatch.setattr("nisse_core.models.llm.OUTAGE_BACKOFF_S", ())
|
||||
monkeypatch.setattr(
|
||||
"nisse_dev.loop.build.GiteaClient.whoami", lambda self: "nisse-dev-testing"
|
||||
)
|
||||
|
||||
@@ -7,9 +7,9 @@ from typing import Any
|
||||
|
||||
import pytest
|
||||
|
||||
from nisse_core.canonical import AssistantText, ToolCall
|
||||
from nisse_core.catalog import ModelFacts
|
||||
from nisse_core.execution import SSHHost
|
||||
from nisse_core.execution.ssh import SSHHost
|
||||
from nisse_core.log.canonical import AssistantText, ToolCall
|
||||
from nisse_core.models.catalog import ModelFacts
|
||||
from nisse_dev.bench.results import (
|
||||
append,
|
||||
load,
|
||||
|
||||
@@ -5,7 +5,7 @@ from typing import Any
|
||||
|
||||
import pytest
|
||||
|
||||
from nisse_core.llm import DEFAULT_REQUEST_TIMEOUT_S
|
||||
from nisse_core.models.llm import DEFAULT_REQUEST_TIMEOUT_S
|
||||
from nisse_dev.config import AgentConfig, ConfigError, Project
|
||||
|
||||
# A complete config as the YAML file would give it, with secrets by reference.
|
||||
@@ -142,7 +142,7 @@ def test_request_timeout_is_configurable_and_checked() -> None:
|
||||
|
||||
|
||||
def test_the_request_timeout_reaches_both_clients() -> None:
|
||||
from nisse_core.catalog import ModelCatalog
|
||||
from nisse_core.models.catalog import ModelCatalog
|
||||
from nisse_dev.loop.build import make_llm_clients
|
||||
|
||||
normalized, passthrough = make_llm_clients(
|
||||
|
||||
@@ -4,8 +4,8 @@ from typing import Any
|
||||
|
||||
import pytest
|
||||
|
||||
from nisse_core.cancel import STOPPED_RESULT, Cancel
|
||||
from nisse_core.canonical import (
|
||||
from nisse_core.execution.ssh import SSHHost
|
||||
from nisse_core.log.canonical import (
|
||||
AssistantText,
|
||||
CanonicalEvent,
|
||||
DelegationCompleted,
|
||||
@@ -14,10 +14,10 @@ from nisse_core.canonical import (
|
||||
ToolCall,
|
||||
ToolResult,
|
||||
)
|
||||
from nisse_core.execution import SSHHost
|
||||
from nisse_core.llm import BudgetExhausted, LLMError, UpstreamUnavailable
|
||||
from nisse_core.models.llm import BudgetExhausted, LLMError, UpstreamUnavailable
|
||||
from nisse_core.oplog import OpLog
|
||||
from nisse_core.state import Transcript
|
||||
from nisse_core.state.cancel import STOPPED_RESULT, Cancel
|
||||
from nisse_core.state.store import Transcript
|
||||
from nisse_dev.delegation import (
|
||||
DELEGATE_TOOLS,
|
||||
DELEGATION_INTENT,
|
||||
|
||||
@@ -5,8 +5,8 @@ from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from nisse_core.canonical import ToolCall
|
||||
from nisse_core.state import StateStore as CoreStore
|
||||
from nisse_core.log.canonical import ToolCall
|
||||
from nisse_core.state.store import StateStore as CoreStore
|
||||
from nisse_dev.state import StateStore
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from nisse_core.canonical import (
|
||||
from nisse_core.log.canonical import (
|
||||
AssistantText,
|
||||
DelegationCompleted,
|
||||
DelegationStarted,
|
||||
|
||||
@@ -4,16 +4,16 @@ from typing import Any
|
||||
|
||||
import pytest
|
||||
|
||||
from nisse_core.canonical import (
|
||||
from nisse_core.log.canonical import (
|
||||
AssistantText,
|
||||
CanonicalEvent,
|
||||
DelegationCompleted,
|
||||
DelegationStarted,
|
||||
StoredEvent,
|
||||
)
|
||||
from nisse_core.llm import LLMError, RoleMap
|
||||
from nisse_core.models.llm import LLMError, RoleMap
|
||||
from nisse_core.oplog import OpLog
|
||||
from nisse_core.state import Transcript
|
||||
from nisse_core.state.store import Transcript
|
||||
from nisse_dev.expert import (
|
||||
DEFAULT_BUDGET,
|
||||
BudgetExhausted,
|
||||
|
||||
@@ -6,7 +6,7 @@ from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from nisse_core.execution import SSHHost
|
||||
from nisse_core.execution.ssh import SSHHost
|
||||
from nisse_dev.git import GitError, GitRepo, HTTPSToken, SSHKey
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ class RecordingHost:
|
||||
self.calls: list[dict] = []
|
||||
|
||||
def execute(self, command: str, **kwargs):
|
||||
from nisse_core.execution import Result
|
||||
from nisse_core.execution.ssh import Result
|
||||
|
||||
self.calls.append({"command": command, **kwargs})
|
||||
return Result(0, "", "")
|
||||
|
||||
@@ -8,19 +8,19 @@ from typing import Any
|
||||
import pytest
|
||||
from model_contract import assert_renderable
|
||||
|
||||
from nisse_core.cancel import Cancel
|
||||
from nisse_core.canonical import (
|
||||
from nisse_core.conversation.transport import InMemoryTransport
|
||||
from nisse_core.gitea import Issue
|
||||
from nisse_core.log.canonical import (
|
||||
AssistantText,
|
||||
CanonicalEvent,
|
||||
Fact,
|
||||
ToolCall,
|
||||
ToolResult,
|
||||
)
|
||||
from nisse_core.gitea import Issue
|
||||
from nisse_core.llm import LLMError
|
||||
from nisse_core.models.llm import LLMError
|
||||
from nisse_core.oplog import OpLog
|
||||
from nisse_core.transport import InMemoryTransport
|
||||
from nisse_core.worker import InlineWorker
|
||||
from nisse_core.state.cancel import Cancel
|
||||
from nisse_core.state.worker import InlineWorker
|
||||
from nisse_dev.loop.agent import LoopAgent
|
||||
from nisse_dev.loop.driver import Driver
|
||||
from nisse_dev.loop.items import CLOSED, GO_AHEAD, READY, RUNNING, WAITING, loop_of
|
||||
@@ -250,7 +250,7 @@ def test_a_go_for_an_earlier_revision_is_not_applied(h: Harness) -> None:
|
||||
h.say("put it in its own module") # changes, so the driver restates rev-2
|
||||
assert loop_of(h.item()).rev == 2
|
||||
# A go sent while rev-1 was on screen, arriving now.
|
||||
from nisse_core.transport import InboundMessage
|
||||
from nisse_core.conversation.transport import InboundMessage
|
||||
|
||||
h.agent.handle(InboundMessage(DON, "go", thread=h.thread()), about=1)
|
||||
assert not loop_of(h.item()).started
|
||||
|
||||
@@ -11,8 +11,8 @@ from test_loop_milestones import RESTATE, ScriptedModel, call, loop_agent, say
|
||||
from test_loop_milestones import item as the_item
|
||||
from test_loop_milestones import world as world # noqa: PLC0414 -- the fixture
|
||||
|
||||
from nisse_core.actions import Action
|
||||
from nisse_core.canonical import ActionVerdict, ToolCall, ToolResult
|
||||
from nisse_core.authority.actions import Action
|
||||
from nisse_core.log.canonical import ActionVerdict, ToolCall, ToolResult
|
||||
from nisse_dev.loop.actions import classify, commits
|
||||
from nisse_dev.loop.items import ANSWER, loop_of
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ from test_loop_milestones import ScriptedModel, call, loop_agent, say
|
||||
from test_loop_milestones import item as the_item
|
||||
from test_loop_milestones import world as world # noqa: PLC0414 -- the fixture
|
||||
|
||||
from nisse_core.actions import Action
|
||||
from nisse_core.canonical import ActionVerdict, ToolCall
|
||||
from nisse_core.llm import LLMError
|
||||
from nisse_core.authority.actions import Action
|
||||
from nisse_core.log.canonical import ActionVerdict, ToolCall
|
||||
from nisse_core.models.llm import LLMError
|
||||
from nisse_dev.loop.classifier import ActionClassifier, Scope
|
||||
from nisse_dev.loop.items import ANSWER, loop_of
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ from typing import Any
|
||||
from test_loop_milestones import DON, Forge, ScriptedModel, call, loop_agent
|
||||
from test_loop_milestones import world as world # noqa: PLC0414 -- the fixture
|
||||
|
||||
from nisse_core.canonical import Fact, ToolResult
|
||||
from nisse_core.gitea import Issue
|
||||
from nisse_core.log.canonical import Fact, ToolResult
|
||||
from nisse_dev.loop.agent import FILE_ISSUE
|
||||
from nisse_dev.loop.items import CHAT, GO_AHEAD, MERGE, WAITING, loop_of
|
||||
|
||||
|
||||
@@ -18,14 +18,14 @@ from test_loop_milestones import (
|
||||
)
|
||||
from test_loop_milestones import world as world # noqa: PLC0414 -- the fixture
|
||||
|
||||
from nisse_core.canonical import (
|
||||
from nisse_core.log.canonical import (
|
||||
AssistantText,
|
||||
DelegationStarted,
|
||||
Fact,
|
||||
ToolCall,
|
||||
ToolResult,
|
||||
)
|
||||
from nisse_core.llm import RoleMap
|
||||
from nisse_core.models.llm import RoleMap
|
||||
from nisse_dev.config import Profile
|
||||
from nisse_dev.delegation import DELEGATION_INTENT, Caps
|
||||
from nisse_dev.loop.help import Helpers
|
||||
|
||||
@@ -9,8 +9,8 @@ import pytest
|
||||
from test_loop import DON, RESTATED, FakeGitea, Harness, ScriptedModel, call, issue
|
||||
from test_loop import h as h # noqa: PLC0414 -- the fixture
|
||||
|
||||
from nisse_core.canonical import Fact, ToolCall
|
||||
from nisse_core.llm import LLMError
|
||||
from nisse_core.log.canonical import Fact, ToolCall
|
||||
from nisse_core.models.llm import LLMError
|
||||
from nisse_dev.loop.items import ANSWER, GO_AHEAD, READY, WAITING, loop_of
|
||||
from nisse_dev.loop.reader import GoAheadReader
|
||||
|
||||
@@ -284,7 +284,7 @@ def test_an_unlabelled_issue_waits_for_go_with_no_countdown(h: Harness) -> None:
|
||||
|
||||
|
||||
def _msg(text: str, thread: str) -> Any:
|
||||
from nisse_core.transport import InboundMessage
|
||||
from nisse_core.conversation.transport import InboundMessage
|
||||
|
||||
return InboundMessage(DON, text, thread=thread)
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ from test_loop_milestones import RESTATE, Forge, loop_agent, say
|
||||
from test_loop_milestones import item as the_item
|
||||
from test_loop_milestones import world as world # noqa: PLC0414 -- the fixture
|
||||
|
||||
from nisse_core.canonical import AssistantText, Fact
|
||||
from nisse_core.gitea import Comment
|
||||
from nisse_core.log.canonical import AssistantText, Fact
|
||||
from nisse_dev.delegation import Caps
|
||||
from nisse_dev.loop.help import Helpers
|
||||
from nisse_dev.loop.items import GO_AHEAD, MERGE, WAITING, loop_of
|
||||
|
||||
@@ -12,10 +12,10 @@ from test_loop_milestones import item as the_item
|
||||
from test_loop_milestones import world as world # noqa: PLC0414 -- the fixture
|
||||
from test_loop_notes import Spy
|
||||
|
||||
from nisse_core.canonical import AssistantText, Fact
|
||||
from nisse_core.llm import RoleMap
|
||||
from nisse_core.memory import Memory
|
||||
from nisse_core.vault import Vault
|
||||
from nisse_core.knowledge.memory import Memory
|
||||
from nisse_core.knowledge.vault import Vault
|
||||
from nisse_core.log.canonical import AssistantText, Fact
|
||||
from nisse_core.models.llm import RoleMap
|
||||
|
||||
FOLDER = "memory/nisse-dev"
|
||||
|
||||
|
||||
@@ -10,9 +10,8 @@ from typing import Any
|
||||
import pytest
|
||||
from model_contract import assert_renderable
|
||||
|
||||
from nisse_core.cancel import Cancel
|
||||
from nisse_core.canonical import ToolCall
|
||||
from nisse_core.execution import SSHHost
|
||||
from nisse_core.conversation.transport import InMemoryTransport
|
||||
from nisse_core.execution.ssh import SSHHost
|
||||
from nisse_core.gitea import (
|
||||
Approval,
|
||||
Comment,
|
||||
@@ -21,9 +20,10 @@ from nisse_core.gitea import (
|
||||
PullRequest,
|
||||
ReviewNote,
|
||||
)
|
||||
from nisse_core.log.canonical import ToolCall
|
||||
from nisse_core.oplog import OpLog
|
||||
from nisse_core.transport import InMemoryTransport
|
||||
from nisse_core.worker import InlineWorker
|
||||
from nisse_core.state.cancel import Cancel
|
||||
from nisse_core.state.worker import InlineWorker
|
||||
from nisse_dev.git import GitRepo
|
||||
from nisse_dev.loop.agent import LoopAgent
|
||||
from nisse_dev.loop.driver import Driver
|
||||
|
||||
@@ -18,8 +18,8 @@ from test_loop_milestones import (
|
||||
)
|
||||
from test_loop_milestones import world as world # noqa: PLC0414 -- the fixture
|
||||
|
||||
from nisse_core.canonical import ToolCall, ToolResult
|
||||
from nisse_core.gitea import Issue
|
||||
from nisse_core.log.canonical import ToolCall, ToolResult
|
||||
from nisse_dev.loop.items import MERGE, WAITING, loop_of
|
||||
|
||||
|
||||
|
||||
@@ -14,11 +14,11 @@ import yaml
|
||||
from test_loop_milestones import DON, Forge, ScriptedModel, call, make_world
|
||||
from test_loop_projects import Router
|
||||
|
||||
from nisse_core.cancel import Cancel
|
||||
from nisse_core.execution import SSHHost
|
||||
from nisse_core.conversation.transport import InMemoryTransport
|
||||
from nisse_core.execution.ssh import SSHHost
|
||||
from nisse_core.oplog import OpLog
|
||||
from nisse_core.transport import InMemoryTransport
|
||||
from nisse_core.worker import InlineWorker
|
||||
from nisse_core.state.cancel import Cancel
|
||||
from nisse_core.state.worker import InlineWorker
|
||||
from nisse_dev.config import _parse_projects
|
||||
from nisse_dev.loop.agent import LoopAgent, Project
|
||||
from nisse_dev.loop.driver import Driver
|
||||
|
||||
@@ -11,8 +11,8 @@ from test_loop_milestones import DON, RESTATE, ScriptedModel, call, loop_agent
|
||||
from test_loop_milestones import item as the_item
|
||||
from test_loop_milestones import world as world # noqa: PLC0414 -- the fixture
|
||||
|
||||
from nisse_core.canonical import ToolResult
|
||||
from nisse_core.vault import Vault
|
||||
from nisse_core.knowledge.vault import Vault
|
||||
from nisse_core.log.canonical import ToolResult
|
||||
from nisse_dev.loop.items import GO_AHEAD, loop_of
|
||||
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@ from typing import Any
|
||||
import pytest
|
||||
from test_loop_milestones import DON, Forge, ScriptedModel, call, git, make_world
|
||||
|
||||
from nisse_core.cancel import Cancel
|
||||
from nisse_core.execution import SSHHost
|
||||
from nisse_core.conversation.transport import InMemoryTransport
|
||||
from nisse_core.execution.ssh import SSHHost
|
||||
from nisse_core.oplog import OpLog
|
||||
from nisse_core.transport import InMemoryTransport
|
||||
from nisse_core.worker import InlineWorker
|
||||
from nisse_core.state.cancel import Cancel
|
||||
from nisse_core.state.worker import InlineWorker
|
||||
from nisse_dev.loop.agent import LoopAgent, Project
|
||||
from nisse_dev.loop.driver import Driver
|
||||
from nisse_dev.loop.items import ANSWER, GO_AHEAD, MERGE, item_for_issue, loop_of
|
||||
|
||||
@@ -24,8 +24,12 @@ from test_loop_milestones import DON, Forge, call, make_world
|
||||
from test_loop_milestones import world as world # noqa: PLC0414 -- the fixture
|
||||
from test_loop_projects import Router
|
||||
|
||||
from nisse_core.cancel import Cancel
|
||||
from nisse_core.canonical import (
|
||||
from nisse_core.conversation.transport import InboundMessage, InMemoryTransport
|
||||
from nisse_core.execution.ssh import HostUnavailable, SSHHost
|
||||
from nisse_core.gitea import Comment, Issue
|
||||
from nisse_core.knowledge.memory import Memory
|
||||
from nisse_core.knowledge.vault import Vault, split_frontmatter
|
||||
from nisse_core.log.canonical import (
|
||||
ActionVerdict,
|
||||
AssistantText,
|
||||
Fact,
|
||||
@@ -34,14 +38,10 @@ from nisse_core.canonical import (
|
||||
ToolResult,
|
||||
UserMessage,
|
||||
)
|
||||
from nisse_core.execution import HostUnavailable, SSHHost
|
||||
from nisse_core.gitea import Comment, Issue
|
||||
from nisse_core.llm import LLMError, RoleMap
|
||||
from nisse_core.memory import Memory
|
||||
from nisse_core.models.llm import LLMError, RoleMap
|
||||
from nisse_core.oplog import OpLog
|
||||
from nisse_core.transport import InboundMessage, InMemoryTransport
|
||||
from nisse_core.vault import Vault, split_frontmatter
|
||||
from nisse_core.worker import InlineWorker
|
||||
from nisse_core.state.cancel import Cancel
|
||||
from nisse_core.state.worker import InlineWorker
|
||||
from nisse_dev.delegation import DELEGATION_INTENT, Caps
|
||||
from nisse_dev.loop.agent import LoopAgent, Project
|
||||
from nisse_dev.loop.classifier import ActionClassifier
|
||||
|
||||
@@ -7,8 +7,8 @@ from typing import Any
|
||||
from test_loop_milestones import DON, Forge, ScriptedModel, call, git, loop_agent
|
||||
from test_loop_milestones import world as world # noqa: PLC0414 -- the fixture
|
||||
|
||||
from nisse_core.conversation.transport import InboundMessage, InMemoryTransport
|
||||
from nisse_core.gitea import Comment, Issue
|
||||
from nisse_core.transport import InboundMessage, InMemoryTransport
|
||||
from nisse_dev.loop.items import (
|
||||
ANSWER,
|
||||
BLOCKED,
|
||||
|
||||
@@ -8,7 +8,7 @@ from typing import Any
|
||||
|
||||
from test_loop import DON, RESTATED, FakeGitea, Harness, ScriptedModel, call, issue
|
||||
|
||||
from nisse_core.canonical import AssistantText
|
||||
from nisse_core.log.canonical import AssistantText
|
||||
from nisse_dev.loop.items import ANSWER, GO_AHEAD, WAITING, loop_of
|
||||
|
||||
|
||||
|
||||
@@ -26,13 +26,13 @@ from test_loop_milestones import (
|
||||
from test_loop_milestones import item as the_item
|
||||
from test_loop_milestones import world as world # noqa: PLC0414 -- the fixture
|
||||
|
||||
from nisse_core.cancel import Cancel
|
||||
from nisse_core.canonical import Fact, ToolResult
|
||||
from nisse_core.execution import HostKeyChanged
|
||||
from nisse_core.conversation.transport import InMemoryTransport
|
||||
from nisse_core.execution.ssh import HostKeyChanged
|
||||
from nisse_core.gitea import Issue
|
||||
from nisse_core.log.canonical import Fact, ToolResult
|
||||
from nisse_core.oplog import OpLog
|
||||
from nisse_core.transport import InMemoryTransport
|
||||
from nisse_core.worker import InlineWorker
|
||||
from nisse_core.state.cancel import Cancel
|
||||
from nisse_core.state.worker import InlineWorker
|
||||
from nisse_dev.loop import preflight
|
||||
from nisse_dev.loop.agent import LoopAgent, Project
|
||||
from nisse_dev.loop.driver import Driver
|
||||
@@ -194,7 +194,7 @@ def test_what_was_installed_or_is_missing_is_said(
|
||||
def test_an_unfinished_step_is_said_and_work_goes_on(
|
||||
world: dict[str, Any], project: str
|
||||
) -> None:
|
||||
from nisse_core.canonical import AssistantText
|
||||
from nisse_core.log.canonical import AssistantText
|
||||
|
||||
prose = [AssistantText(text="hmm", model="m")]
|
||||
model = ScriptedModel(prose, prose, RESTATE)
|
||||
|
||||
@@ -19,10 +19,10 @@ from test_loop_milestones import (
|
||||
from test_loop_milestones import item as the_item
|
||||
from test_loop_milestones import world as world # noqa: PLC0414 -- the fixture
|
||||
|
||||
from nisse_core.cancel import Cancel
|
||||
from nisse_core.conversation.transport import InMemoryTransport
|
||||
from nisse_core.oplog import OpLog
|
||||
from nisse_core.transport import InMemoryTransport
|
||||
from nisse_core.worker import InlineWorker
|
||||
from nisse_core.state.cancel import Cancel
|
||||
from nisse_core.state.worker import InlineWorker
|
||||
from nisse_dev.loop.agent import LoopAgent, Project
|
||||
from nisse_dev.loop.driver import Driver
|
||||
from nisse_dev.loop.items import MERGE, loop_of
|
||||
|
||||
@@ -19,9 +19,9 @@ from test_loop_toolchain import (
|
||||
)
|
||||
from test_loop_toolchain import project as project # noqa: PLC0414 -- the fixture
|
||||
|
||||
from nisse_core.canonical import ToolResult
|
||||
from nisse_core.execution import HostKeyChanged, HostUnavailable
|
||||
from nisse_core.execution.ssh import HostKeyChanged, HostUnavailable
|
||||
from nisse_core.gitea import Issue
|
||||
from nisse_core.log.canonical import ToolResult
|
||||
from nisse_dev.loop.items import GO_AHEAD, READY, loop_of
|
||||
|
||||
RETRY, SETTLE = 300.0, 180.0
|
||||
|
||||
@@ -5,7 +5,7 @@ import uuid
|
||||
|
||||
import pytest
|
||||
|
||||
from nisse_core.execution import SSHHost
|
||||
from nisse_core.execution.ssh import SSHHost
|
||||
from nisse_dev.loop import preflight
|
||||
from nisse_dev.loop.preflight import Tool
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from nisse_core.execution import REDACTED, SSHHost
|
||||
from nisse_core.execution.ssh import REDACTED, SSHHost
|
||||
from nisse_dev.tools import EXECUTION_TOOLS, MAX_OUTPUT_CHARS, Workspace
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user