arkitekt-next 0.9.3__py3-none-any.whl → 0.10.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of arkitekt-next might be problematic. Click here for more details.

Files changed (35) hide show
  1. arkitekt_next/__blok__.py +2 -2
  2. arkitekt_next/__init__.py +38 -37
  3. arkitekt_next/apps/__init__.py +1 -1
  4. arkitekt_next/apps/{types.py → protocols.py} +22 -9
  5. arkitekt_next/apps/service/fakts_next.py +15 -30
  6. arkitekt_next/base_models.py +3 -3
  7. arkitekt_next/bloks/admin.py +0 -2
  8. arkitekt_next/bloks/base.py +2 -0
  9. arkitekt_next/bloks/channel.py +27 -0
  10. arkitekt_next/bloks/minio.py +1 -1
  11. arkitekt_next/bloks/services/channel.py +12 -0
  12. arkitekt_next/builders.py +9 -8
  13. arkitekt_next/cli/commands/call/main.py +2 -1
  14. arkitekt_next/cli/commands/call/remote.py +4 -1
  15. arkitekt_next/cli/commands/inspect/requirements.py +3 -8
  16. arkitekt_next/cli/commands/inspect/templates.py +6 -9
  17. arkitekt_next/cli/commands/run/dev.py +3 -4
  18. arkitekt_next/cli/commands/run/utils.py +1 -1
  19. arkitekt_next/cli/ui.py +2 -4
  20. arkitekt_next/cli/utils.py +1 -1
  21. arkitekt_next/constants.py +0 -2
  22. arkitekt_next/init_registry.py +16 -92
  23. arkitekt_next/qt/builders.py +2 -2
  24. arkitekt_next/qt/magic_bar.py +1 -1
  25. arkitekt_next/qt/types.py +1 -1
  26. arkitekt_next/service_registry.py +52 -46
  27. arkitekt_next/tqdm.py +68 -7
  28. arkitekt_next/utils.py +7 -6
  29. {arkitekt_next-0.9.3.dist-info → arkitekt_next-0.10.1.dist-info}/METADATA +39 -39
  30. {arkitekt_next-0.9.3.dist-info → arkitekt_next-0.10.1.dist-info}/RECORD +46 -45
  31. {arkitekt_next-0.9.3.dist-info → arkitekt_next-0.10.1.dist-info}/WHEEL +1 -1
  32. arkitekt_next-0.10.1.dist-info/entry_points.txt +2 -0
  33. arkitekt_next/cli/configs/base.yaml +0 -867
  34. arkitekt_next-0.9.3.dist-info/entry_points.txt +0 -3
  35. {arkitekt_next-0.9.3.dist-info → arkitekt_next-0.10.1.dist-info/licenses}/LICENSE +0 -0
arkitekt_next/__blok__.py CHANGED
@@ -23,9 +23,10 @@ from arkitekt_next.bloks.self_signed import SelfSignedBlok
23
23
  from arkitekt_next.bloks.kraph import KraphBlok
24
24
  from arkitekt_next.bloks.local_sign import LocalSignBlok
25
25
  from arkitekt_next.bloks.elektro import ElektroBlok
26
+ from blok.blok import Blok
26
27
 
27
28
 
28
- def get_bloks():
29
+ def get_bloks() -> list[Blok]:
29
30
  return [
30
31
  AdminBlok(),
31
32
  ArkitektBlok(),
@@ -53,4 +54,3 @@ def get_bloks():
53
54
  LocalSignBlok(),
54
55
  ElektroBlok(),
55
56
  ]
56
-
arkitekt_next/__init__.py CHANGED
@@ -1,3 +1,14 @@
1
+ from .builders import easy, interactive
2
+ from .apps.protocols import App
3
+ from fakts_next.helpers import afakt, fakt
4
+ from .init_registry import init, InitHookRegisty, get_current_init_hook_registry
5
+ from .service_registry import (
6
+ require,
7
+ ServiceBuilderRegistry,
8
+ get_default_service_registry,
9
+ )
10
+
11
+
1
12
  def missing_install(name: str, error: Exception):
2
13
  def real_missing_install(*args, **kwargs):
3
14
  raise ImportError(
@@ -8,27 +19,34 @@ def missing_install(name: str, error: Exception):
8
19
 
9
20
 
10
21
  try:
11
- from rekuest_next.register import register, register_structure
12
- from rekuest_next.agents.hooks import background
13
- from rekuest_next.agents.hooks import startup
22
+ from rekuest_next.register import register
23
+ from rekuest_next.agents.hooks.background import background
24
+ from rekuest_next.agents.hooks.startup import startup
14
25
  from rekuest_next.agents.context import context
15
- from rekuest_next.state.state import state
16
- from rekuest_next.actors.reactive.api import abreakpoint, breakpoint
17
- from rekuest_next.actors.reactive.api import progress, aprogress
18
- from rekuest_next.actors.reactive.api import log, alog
19
- from rekuest_next.register import test, benchmark
26
+ from rekuest_next.state.decorator import state
27
+ from rekuest_next.actors.context import abreakpoint, breakpoint
28
+ from rekuest_next.actors.context import progress, aprogress
29
+ from rekuest_next.actors.context import log, alog
20
30
  from rekuest_next.structures.model import model
21
- from rekuest_next.utils import call, call_raw, acall, acall_raw, find, afind
22
- from rekuest_next.define import define
31
+ from rekuest_next.remote import (
32
+ call,
33
+ acall,
34
+ acall_raw,
35
+ iterate,
36
+ aiterate,
37
+ aiterate_raw,
38
+ find,
39
+ )
23
40
  except ImportError as e:
24
41
  raise e
25
- register_structure = missing_install("rekuest_next", e)
42
+ structure = missing_install("rekuest_next", e)
26
43
  register = missing_install("rekuest_next", e)
27
44
  background = missing_install("rekuest_next", e)
28
45
  abreakpoint = missing_install("rekuest_next", e)
29
46
  breakpoint = missing_install("rekuest_next", e)
30
47
  startup = missing_install("rekuest_next", e)
31
48
  context = missing_install("rekuest_next", e)
49
+ find = missing_install("rekuest_next", e)
32
50
  state = missing_install("rekuest_next", e)
33
51
  progress = missing_install("rekuest_next", e)
34
52
  aprogress = missing_install("rekuest_next", e)
@@ -40,16 +58,9 @@ except ImportError as e:
40
58
  acall_raw = missing_install("rekuest_next", e)
41
59
  find = missing_install("rekuest_next", e)
42
60
  afind = missing_install("rekuest_next", e)
43
-
44
- from .builders import easy, interactive
45
- from .apps.types import App
46
- from fakts_next.helpers import afakt, fakt
47
- from .init_registry import init, InitHookRegisty, get_current_init_hook_registry
48
- from .service_registry import (
49
- require,
50
- ServiceBuilderRegistry,
51
- get_current_service_registry,
52
- )
61
+ aiterate_raw = missing_install("rekuest_next", e)
62
+ aiterate = missing_install("rekuest_next", e)
63
+ iterate = missing_install("rekuest_next", e)
53
64
 
54
65
 
55
66
  __all__ = [
@@ -57,39 +68,29 @@ __all__ = [
57
68
  "require",
58
69
  "easy",
59
70
  "interactive",
60
- "publicqt",
61
- "jupy",
62
71
  "log",
63
72
  "alog",
64
73
  "afakt",
65
74
  "fakt",
66
75
  "progress",
67
76
  "aprogress",
68
- "scheduler",
69
- "register_structure",
70
- "requirement",
71
77
  "ServiceBuilderRegistry",
72
- "get_current_service_registry",
78
+ "get_default_service_registry",
73
79
  "register",
74
- "group",
75
- "useGuardian",
76
- "useInstanceID",
77
80
  "find",
78
- "afind",
81
+ "breakpoint",
82
+ "abreakpoint",
83
+ "aiterate",
84
+ "iterate",
85
+ "aiterate_raw",
79
86
  "call",
80
- "call_raw",
81
87
  "acall",
82
88
  "acall_raw",
83
89
  "model",
84
- "test",
85
- "benchmark",
86
- "useUser",
87
- "next",
88
90
  "state",
89
91
  "context",
90
92
  "background",
91
93
  "startup",
92
- "register_next",
93
94
  "init",
94
95
  "InitHookRegisty",
95
96
  "get_current_init_hook_registry",
@@ -1,3 +1,3 @@
1
- from .types import App
1
+ from .protocols import App
2
2
 
3
3
  __all__ = ["App"]
@@ -1,7 +1,6 @@
1
1
  """
2
2
  This module contains the types for the apps
3
3
  depending on the builder used.
4
-
5
4
  This module imports all the apps and their types
6
5
  and sets them as attributes on the App class, if they are available.
7
6
  If they are not available, they are set to Any, so that we can add
@@ -11,12 +10,17 @@ an import exception to the app.
11
10
  """
12
11
 
13
12
  import logging
14
- from typing import TYPE_CHECKING, Any, Dict
13
+ from typing import Any, Dict, TYPE_CHECKING
14
+ from koil import unkoil
15
15
  from arkitekt_next.base_models import Manifest
16
16
  from koil.composition import Composition
17
17
  from fakts_next import Fakts
18
18
  from herre_next import Herre
19
- from koil.helpers import KoilTask
19
+
20
+
21
+ if TYPE_CHECKING:
22
+ from rekuest_next.rekuest import RekuestNext
23
+
20
24
 
21
25
  logger = logging.getLogger(__name__)
22
26
 
@@ -29,18 +33,27 @@ class App(Composition):
29
33
  manifest: Manifest
30
34
  services: Dict[str, Any]
31
35
 
36
+ @property
37
+ def rekuest(self) -> "RekuestNext":
38
+ """Get the rekuest service"""
39
+ if "rekuest" not in self.services:
40
+ raise ValueError("Rekuest service is not available")
41
+ return self.services["rekuest"]
42
+
32
43
  def run(self):
33
- """Run the app"""
34
- return self.services["rekuest"].run()
44
+ return unkoil(self.rekuest.arun)
35
45
 
36
- def run_detached(self) -> KoilTask:
37
- """Run the app detached"""
46
+ async def arun(self):
47
+ return await self.rekuest.arun()
38
48
 
39
- return self.services["rekuest"].run_detached()
49
+ def run_detached(self):
50
+ """Run the app detached"""
51
+ return self.rekuest.run_detached()
40
52
 
41
53
  def register(self, *args, **kwargs):
42
54
  """Register a service"""
43
- self.services["rekuest"].register(*args, **kwargs)
55
+
56
+ self.rekuest.register(*args, **kwargs)
44
57
 
45
58
  async def __aenter__(self):
46
59
  await super().__aenter__()
@@ -4,41 +4,35 @@ from fakts_next.fakts import Fakts
4
4
  from fakts_next.grants.hard import HardFakts
5
5
  from fakts_next.grants.remote import RemoteGrant
6
6
  from fakts_next.grants.remote.discovery.well_known import WellKnownDiscovery
7
- from fakts_next.grants.remote import RemoteGrant
8
7
  from fakts_next.grants.remote.demanders.static import StaticDemander
9
- from fakts_next.grants.remote.demanders.device_code import DeviceCodeDemander
8
+ from fakts_next.grants.remote.demanders.device_code import (
9
+ ClientKind,
10
+ DeviceCodeDemander,
11
+ )
10
12
  from fakts_next.grants.remote.claimers.post import ClaimEndpointClaimer
11
13
  from fakts_next.grants.remote.demanders.redeem import RedeemDemander
12
14
  from fakts_next.cache.file import FileCache
13
15
  from arkitekt_next.base_models import Manifest
14
16
 
15
17
 
16
- class ArkitektNextFaktsQt(Fakts):
17
- grant: RemoteGrant
18
-
19
-
20
- class ArkitektNextFaktsNext(Fakts):
21
- pass
22
-
23
-
24
18
  def build_arkitekt_next_fakts_next(
25
19
  manifest: Manifest,
26
20
  url: Optional[str] = None,
27
21
  no_cache: bool = False,
28
22
  headless: bool = False,
29
- client_kind: str = "development",
30
- ) -> ArkitektNextFaktsNext:
23
+ ) -> Fakts:
31
24
  identifier = manifest.identifier
32
25
  version = manifest.version
26
+ if url is None:
27
+ raise ValueError("URL must be provided")
33
28
 
34
29
  demander = DeviceCodeDemander(
35
30
  manifest=manifest,
36
- redirect_uri="http://127.0.0.1:6767",
37
31
  open_browser=not headless,
38
- requested_client_kind=client_kind,
32
+ requested_client_kind=ClientKind.DEVELOPMENT,
39
33
  )
40
34
 
41
- return ArkitektNextFaktsNext(
35
+ return Fakts(
42
36
  grant=RemoteGrant(
43
37
  demander=demander,
44
38
  discovery=WellKnownDiscovery(url=url, auto_protocols=["https", "http"]),
@@ -47,22 +41,15 @@ def build_arkitekt_next_fakts_next(
47
41
  cache=FileCache(
48
42
  cache_file=f".arkitekt_next/cache/{identifier}-{version}_fakts_cache.json",
49
43
  hash=manifest.hash() + url,
50
- skip_cache=no_cache,
51
44
  ),
52
45
  )
53
46
 
54
47
 
55
- def build_arkitekt_next_redeem_fakts_next(
56
- manifest: Manifest,
57
- redeem_token: str,
58
- url,
59
- no_cache: Optional[bool] = False,
60
- headless=False,
61
- ):
48
+ def build_arkitekt_next_redeem_fakts_next(manifest: Manifest, redeem_token: str, url):
62
49
  identifier = manifest.identifier
63
50
  version = manifest.version
64
51
 
65
- return ArkitektNextFaktsNext(
52
+ return Fakts(
66
53
  grant=RemoteGrant(
67
54
  demander=RedeemDemander(token=redeem_token, manifest=manifest),
68
55
  discovery=WellKnownDiscovery(url=url, auto_protocols=["https", "http"]),
@@ -83,9 +70,9 @@ def build_arkitekt_next_token_fakts_next(
83
70
  identifier = manifest.identifier
84
71
  version = manifest.version
85
72
 
86
- return ArkitektNextFaktsNext(
73
+ return Fakts(
87
74
  grant=RemoteGrant(
88
- demander=StaticDemander(token=token),
75
+ demander=StaticDemander(token=token), # type: ignore
89
76
  discovery=WellKnownDiscovery(url=url, auto_protocols=["https", "http"]),
90
77
  claimer=ClaimEndpointClaimer(),
91
78
  ),
@@ -97,11 +84,9 @@ def build_arkitekt_next_token_fakts_next(
97
84
 
98
85
 
99
86
  def build_local_fakts(manifest, fakts):
100
-
101
87
  identifier = manifest.identifier
102
88
  version = manifest.version
103
89
 
104
- return ArkitektNextFaktsNext(
90
+ return Fakts(
105
91
  grant=HardFakts(fakts=fakts),
106
-
107
- )
92
+ )
@@ -43,7 +43,7 @@ class Manifest(BaseModel):
43
43
  requirements: Optional[List[Requirement]] = Field(default_factory=list)
44
44
  """ Requirements that this app has TODO: What are the requirements? """
45
45
  model_config = ConfigDict(extra="forbid")
46
-
46
+
47
47
  description: Optional[str] = None
48
48
  """ A human readable description of the app """
49
49
 
@@ -74,8 +74,8 @@ class Manifest(BaseModel):
74
74
  # Hash the JSON encoded dictionary
75
75
  return sha256(json_dd.encode()).hexdigest()
76
76
 
77
- @field_validator("identifier")
78
- def check_identifier(cls, v):
77
+ @field_validator("identifier", mode="after")
78
+ def check_identifier(cls, v: str) -> str:
79
79
  assert "/" not in v, "The identifier should not contain a /"
80
80
  assert len(v) > 0, "The identifier should not be empty"
81
81
  assert len(v) < 256, "The identifier should not be longer than 256 characters"
@@ -1,5 +1,3 @@
1
- from pydantic import BaseModel
2
- from typing import Dict, Any
3
1
  from blok import blok, InitContext, Option
4
2
  from arkitekt_next.bloks.services.admin import AdminService, AdminCredentials
5
3
 
@@ -1,3 +1,4 @@
1
+ from arkitekt_next.bloks.services.channel import ChannelService
1
2
  from blok import blok, InitContext, Option
2
3
  from blok.tree import YamlFile, Repo
3
4
  from typing import Any, Optional, Protocol
@@ -62,6 +63,7 @@ class BaseArkitektService:
62
63
  redis: RedisService,
63
64
  s3: S3Service,
64
65
  config: ConfigService,
66
+ channel: ChannelService,
65
67
  mount: MountService,
66
68
  admin: AdminService,
67
69
  secret: SecretService,
@@ -0,0 +1,27 @@
1
+ from pydantic import BaseModel
2
+ from typing import Dict, Any
3
+ from blok import blok, InitContext, Option
4
+ from arkitekt_next.bloks.services.channel import ChannelService
5
+
6
+
7
+ @blok(ChannelService, description="The current channel of the application")
8
+ class ChannelBlok:
9
+ def __init__(self) -> None:
10
+ self.name = "default"
11
+
12
+ def preflight(self, init: InitContext):
13
+ for key, value in init.kwargs.items():
14
+ setattr(self, key, value)
15
+
16
+ def retrieve(self):
17
+ return self.name
18
+
19
+ def get_options(self):
20
+ with_name = Option(
21
+ subcommand="name",
22
+ help="Which channel name to use",
23
+ default=self.name,
24
+ show_default=True,
25
+ )
26
+
27
+ return [with_name]
@@ -49,7 +49,7 @@ class MinioBlok:
49
49
  self.port = 9000
50
50
  self.skip = False
51
51
  self.scopes = {}
52
- self.init_image = "jhnnsrs/init:paper"
52
+ self.init_image = "jhnnsrs/init:nightly"
53
53
  self.minio_image = "minio/minio:RELEASE.2025-02-18T16-25-55Z"
54
54
  self.buckets = []
55
55
  self.registered_clients = []
@@ -0,0 +1,12 @@
1
+ from typing import Dict, Any, Protocol
2
+ from blok import blok, InitContext, Option
3
+ from blok import service
4
+ from dataclasses import dataclass
5
+
6
+
7
+
8
+ @service("live.arkitekt.channel")
9
+ class ChannelService(Protocol):
10
+
11
+ def retrieve_channel(self) -> str:
12
+ return str
arkitekt_next/builders.py CHANGED
@@ -11,14 +11,14 @@ from arkitekt_next.apps.service.fakts_next import (
11
11
  from arkitekt_next.apps.service.herre import build_arkitekt_next_herre_next
12
12
  from .utils import create_arkitekt_next_folder
13
13
  from .base_models import Manifest
14
- from .apps.types import App
15
- from .service_registry import ServiceBuilderRegistry, get_current_service_registry
14
+ from .apps.protocols import App
15
+ from .service_registry import ServiceBuilderRegistry, get_default_service_registry
16
16
  from .init_registry import InitHookRegisty, get_current_init_hook_registry
17
17
  from arkitekt_next.constants import DEFAULT_ARKITEKT_URL
18
18
 
19
19
 
20
20
  def easy(
21
- identifier: str = None,
21
+ identifier: str | None = None,
22
22
  version: str = "0.0.1",
23
23
  logo: Optional[str] = None,
24
24
  scopes: Optional[List[str]] = None,
@@ -28,7 +28,6 @@ def easy(
28
28
  token: Optional[str] = None,
29
29
  no_cache: bool = False,
30
30
  redeem_token: Optional[str] = None,
31
- app_kind: str = "development",
32
31
  service_registry: Optional[ServiceBuilderRegistry] = None,
33
32
  init_hook_registry: Optional[InitHookRegisty] = None,
34
33
  fakts: Optional[str] = None,
@@ -100,9 +99,14 @@ def easy(
100
99
  NextApp
101
100
  A built app, that can be used to interact with the ArkitektNext server
102
101
  """
103
- service_registry = service_registry or get_current_service_registry()
102
+ service_registry = service_registry or get_default_service_registry()
104
103
  init_hook_registry = init_hook_registry or get_current_init_hook_registry()
105
104
 
105
+ if init_hook_registry is None:
106
+ raise ValueError(
107
+ "No init hook registry found. Please provide a init hook registry or use the default one."
108
+ )
109
+
106
110
  if identifier is None:
107
111
  identifier = __file__.split("/")[-1].replace(".py", "")
108
112
 
@@ -135,8 +139,6 @@ def easy(
135
139
  manifest=manifest,
136
140
  redeem_token=redeem_token,
137
141
  url=url,
138
- no_cache=no_cache,
139
- headless=headless,
140
142
  )
141
143
  else:
142
144
  fakts_next = build_arkitekt_next_fakts_next(
@@ -144,7 +146,6 @@ def easy(
144
146
  url=url,
145
147
  no_cache=no_cache,
146
148
  headless=headless,
147
- client_kind=app_kind,
148
149
  )
149
150
 
150
151
  herre_next = build_arkitekt_next_herre_next(fakts_next=fakts_next)
@@ -1,3 +1,4 @@
1
+ from click import Context
1
2
  import rich_click as click
2
3
 
3
4
 
@@ -7,7 +8,7 @@ from .remote import remote
7
8
 
8
9
  @click.group()
9
10
  @click.pass_context
10
- def call(ctx):
11
+ def call(ctx: Context) -> None:
11
12
  """Inspects your arkitekt_next app
12
13
 
13
14
  Inspects various parts of your arkitekt_next app. This is useful for debugging
@@ -1,3 +1,4 @@
1
+ from click import Context
1
2
  import rich_click as click
2
3
  from arkitekt_next.cli.options import *
3
4
  import asyncio
@@ -49,7 +50,9 @@ async def call_app(
49
50
  help="The hash of the node to run",
50
51
  type=str,
51
52
  )
52
- def remote(ctx, entrypoint=None, builder=None, args=None, hash=str, **builder_kwargs):
53
+ def remote(
54
+ ctx: Context, entrypoint=None, builder=None, args=None, hash=str, **builder_kwargs
55
+ ):
53
56
  """ALlows you to run a get the output of a node in a remote app.
54
57
 
55
58
  This is useful for debugging and testing. In this mode the app itself will not
@@ -1,7 +1,7 @@
1
- from arkitekt_next import get_current_service_registry
1
+ from arkitekt_next import get_default_service_registry
2
2
  import rich_click as click
3
3
  from importlib import import_module
4
- from arkitekt_next.apps.types import App
4
+ from arkitekt_next.apps.protocols import App
5
5
  from arkitekt_next.cli.commands.run.utils import import_builder
6
6
  from arkitekt_next.cli.vars import get_console, get_manifest
7
7
  from arkitekt_next.cli.options import with_builder
@@ -48,7 +48,6 @@ def requirements(
48
48
  entrypoint_file = f"{manifest.entrypoint}.py"
49
49
  os.path.realpath(entrypoint_file)
50
50
 
51
-
52
51
  entrypoint = manifest.entrypoint
53
52
 
54
53
  with console.status("Loading entrypoint module..."):
@@ -58,13 +57,9 @@ def requirements(
58
57
  console.print(f"Could not find entrypoint module {entrypoint}")
59
58
  raise e
60
59
 
61
-
62
- service_registry = get_current_service_registry()
63
-
64
-
60
+ service_registry = get_default_service_registry()
65
61
 
66
62
  x = [item.model_dump(by_alias=True) for item in service_registry.get_requirements()]
67
-
68
63
 
69
64
  if machine_readable:
70
65
  print("--START_REQUIREMENTS--" + json.dumps(x) + "--END_REQUIREMENTS--")
@@ -2,7 +2,7 @@ import asyncio
2
2
  from pydantic import BaseModel
3
3
  import rich_click as click
4
4
  from importlib import import_module
5
- from arkitekt_next.apps.types import App
5
+ from arkitekt_next.apps.protocols import App
6
6
  from arkitekt_next.cli.commands.run.utils import import_builder
7
7
  from arkitekt_next.cli.vars import get_console, get_manifest
8
8
  from arkitekt_next.cli.options import with_builder
@@ -18,7 +18,6 @@ except ImportError:
18
18
  pass
19
19
 
20
20
 
21
-
22
21
  @click.command("prod")
23
22
  @click.pass_context
24
23
  @click.option(
@@ -77,17 +76,15 @@ def templates(
77
76
  )
78
77
 
79
78
  rekuest = app.services.get("rekuest")
80
-
81
- registry = get_default_definition_registry()
79
+
80
+ registry = get_default_definition_registry()
82
81
  global_list = []
83
82
  if registry is None:
84
83
  raise Exception("No default registry found")
85
-
86
- to_be_created_templates = tuple(
87
- x.model_dump() for x in registry.templates.values()
88
- )
84
+
85
+ to_be_created_templates = tuple(x.model_dump() for x in registry.templates.values())
89
86
  global_list.extend(to_be_created_templates)
90
-
87
+
91
88
  console.print(f"Templates to be created: {len(global_list)}")
92
89
 
93
90
  if rekuest is None:
@@ -9,14 +9,13 @@ import os
9
9
  import sys
10
10
  import inspect
11
11
  from rekuest_next.definition.registry import get_default_definition_registry
12
- from rekuest_next.agents.hooks import get_default_hook_registry
12
+ from rekuest_next.agents.hooks.registry import get_default_hook_registry
13
13
  from typing import MutableSet, Tuple, Any, Set
14
14
  from arkitekt_next.cli.ui import construct_changes_group, construct_app_group
15
15
  from arkitekt_next.cli.commands.run.utils import import_builder
16
16
  from arkitekt_next.cli.types import Manifest
17
- from arkitekt_next.apps.types import App
17
+ from arkitekt_next.apps.protocols import App
18
18
  import rich_click as click
19
- import os
20
19
  from arkitekt_next.cli.options import (
21
20
  with_fakts_next_url,
22
21
  with_builder,
@@ -105,7 +104,7 @@ async def run_app(app: App) -> None:
105
104
  raise Exception("No rekuest service found. We need this to run the app.")
106
105
 
107
106
  async with app:
108
- await rekuest.run()
107
+ await rekuest.arun()
109
108
 
110
109
 
111
110
  def reload_modules(reloadable_modules) -> None:
@@ -1,6 +1,6 @@
1
1
  from importlib import import_module
2
2
  from typing import Callable
3
- from arkitekt_next.apps.types import App
3
+ from arkitekt_next.apps.protocols import App
4
4
 
5
5
 
6
6
  def import_builder(builder: str) -> Callable[..., App]:
arkitekt_next/cli/ui.py CHANGED
@@ -11,7 +11,6 @@ try:
11
11
  except ImportError:
12
12
  get_default_definition_registry = lambda: None
13
13
  pass
14
-
15
14
 
16
15
 
17
16
  def construct_codegen_welcome_panel() -> Panel:
@@ -71,12 +70,11 @@ def construct_app_group(app: App) -> Group:
71
70
  rekuest = app.services.get("rekuest")
72
71
  if rekuest is None:
73
72
  return Group(panel_header, service_tree)
74
-
73
+
75
74
  default = get_default_definition_registry()
76
75
  if default is not None:
77
- for key, template in default.templates.items():
76
+ for key, template in default.implementations.items():
78
77
  actor_tree.add(key + "-" + template.definition.name)
79
-
80
78
 
81
79
  panel_group = Group(panel_header, service_tree, actor_tree)
82
80
 
@@ -1,6 +1,6 @@
1
1
  from importlib import import_module
2
2
  from typing import Callable
3
- from arkitekt_next.apps.types import App
3
+ from arkitekt_next.apps.protocols import App
4
4
  import os
5
5
 
6
6
 
@@ -1,4 +1,2 @@
1
1
  REPO_URL = "https://arkitekt.live/repo.json"
2
-
3
-
4
2
  DEFAULT_ARKITEKT_URL = "http://127.0.0.1"