vortex-cli 5.0.0__tar.gz → 5.0.1__tar.gz

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.
Files changed (59) hide show
  1. {vortex_cli-5.0.0/vortex_cli.egg-info → vortex_cli-5.0.1}/PKG-INFO +2 -1
  2. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/README.md +1 -0
  3. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/pyproject.toml +1 -1
  4. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/workspace.py +85 -13
  5. {vortex_cli-5.0.0 → vortex_cli-5.0.1/vortex_cli.egg-info}/PKG-INFO +2 -1
  6. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/LICENSE +0 -0
  7. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/setup.cfg +0 -0
  8. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/__init__.py +0 -0
  9. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/__main__.py +0 -0
  10. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/cli.py +0 -0
  11. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/colour.py +0 -0
  12. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/__init__.py +0 -0
  13. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/agent.py +0 -0
  14. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/clean.py +0 -0
  15. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/clone.py +0 -0
  16. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/code.py +0 -0
  17. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/compile.py +0 -0
  18. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/config.py +0 -0
  19. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/copy.py +0 -0
  20. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/db.py +0 -0
  21. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/delete.py +0 -0
  22. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/docs.py +0 -0
  23. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/execute.py +0 -0
  24. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/export.py +0 -0
  25. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/find.py +0 -0
  26. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/grep.py +0 -0
  27. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/import_.py +0 -0
  28. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/libs.py +0 -0
  29. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/list.py +0 -0
  30. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/log.py +0 -0
  31. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/new.py +0 -0
  32. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/schema.py +0 -0
  33. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/use.py +0 -0
  34. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/commands/watch.py +0 -0
  35. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/constants.py +0 -0
  36. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/docs/Blackbook v2.md +0 -0
  37. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/docs/Blackbook.pdf +0 -0
  38. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/docs/index.html +0 -0
  39. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/docs/marked.min.js +0 -0
  40. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/lib/puakma-6.0.40.jar +0 -0
  41. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/libs.py +0 -0
  42. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/logging.py +0 -0
  43. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/main.py +0 -0
  44. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/models.py +0 -0
  45. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/soap.py +0 -0
  46. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/spinner.py +0 -0
  47. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/templates/agent/AGENTS.md +0 -0
  48. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/templates/agent/skills/puakma-database/SKILL.md +0 -0
  49. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/templates/agent/skills/puakma-design-elements/SKILL.md +0 -0
  50. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/templates/agent/skills/puakma-overview/SKILL.md +0 -0
  51. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/templates/agent/skills/vortex-workflow/SKILL.md +0 -0
  52. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/templates/agent/vortex.code-snippets +0 -0
  53. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/util.py +0 -0
  54. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex/webdesign.py +0 -0
  55. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex_cli.egg-info/SOURCES.txt +0 -0
  56. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex_cli.egg-info/dependency_links.txt +0 -0
  57. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex_cli.egg-info/entry_points.txt +0 -0
  58. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex_cli.egg-info/requires.txt +0 -0
  59. {vortex_cli-5.0.0 → vortex_cli-5.0.1}/vortex_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vortex_cli
3
- Version: 5.0.0
3
+ Version: 5.0.1
4
4
  Summary: Vortex CLI
5
5
  Author-email: Jordan Amos <jordan.amos@gmail.com>
6
6
  License: MIT License
@@ -101,6 +101,7 @@ While it is possible to use without it, this software has been purposefully desi
101
101
  ; Optional
102
102
  clone_with_resources = html,css,js ; resources with these extensions are always cloned - 'clone --get-resources' still clones ALL resources
103
103
  lib_path = ; optional extra jars to add to the classpath (the server's own jars are downloaded automatically - see 'vortex libs')
104
+ workspace_folders = ~/dev/shared,notes ; extra folders to mount in the generated .code-workspace files. Relative paths resolve against the workspace root. Under [DEFAULT] they are added to every workspace; here they apply to this server's workspace (and the global one)
104
105
  java_home = /usr/lib/jvm/java-17-openjdk-amd64/ ; The local path to the JRE to use. Should be the same version running on your server
105
106
  java_environment_name = JavaSE-17 ; Java Execution Environment name https://docs.osgi.org/reference/eenames.html
106
107
  ```
@@ -57,6 +57,7 @@ While it is possible to use without it, this software has been purposefully desi
57
57
  ; Optional
58
58
  clone_with_resources = html,css,js ; resources with these extensions are always cloned - 'clone --get-resources' still clones ALL resources
59
59
  lib_path = ; optional extra jars to add to the classpath (the server's own jars are downloaded automatically - see 'vortex libs')
60
+ workspace_folders = ~/dev/shared,notes ; extra folders to mount in the generated .code-workspace files. Relative paths resolve against the workspace root. Under [DEFAULT] they are added to every workspace; here they apply to this server's workspace (and the global one)
60
61
  java_home = /usr/lib/jvm/java-17-openjdk-amd64/ ; The local path to the JRE to use. Should be the same version running on your server
61
62
  java_environment_name = JavaSE-17 ; Java Execution Environment name https://docs.osgi.org/reference/eenames.html
62
63
  ```
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
 
6
6
  [project]
7
7
  name = "vortex_cli"
8
- version = "5.0.0"
8
+ version = "5.0.1"
9
9
  description = "Vortex CLI"
10
10
  requires-python = ">=3.10"
11
11
  readme = { file = "README.md", content-type = "text/markdown" }
@@ -8,6 +8,7 @@ import os
8
8
  import pickle
9
9
  import shutil
10
10
  from collections.abc import Callable
11
+ from collections.abc import Collection
11
12
  from collections.abc import Generator
12
13
  from collections.abc import Iterable
13
14
  from pathlib import Path
@@ -60,6 +61,11 @@ lib_path =
60
61
  java_home =
61
62
  java_environment_name =
62
63
  protected = false
64
+ # Comma separated directories to mount as extra folders in the
65
+ # generated .code-workspace files. Relative paths are resolved against
66
+ # the workspace root. Set under [DEFAULT] to add them to every
67
+ # workspace, or per server for that server's workspace
68
+ workspace_folders =
63
69
  """
64
70
 
65
71
 
@@ -99,6 +105,7 @@ class Workspace:
99
105
  # credentials are only ever resolved once per server
100
106
  self._server_cache: dict[str, PuakmaServer] = {}
101
107
  self._warned_legacy_options = False
108
+ self._warned_missing_folders: set[str] = set()
102
109
  if init:
103
110
  self.init()
104
111
  if not self._path.is_dir():
@@ -591,6 +598,53 @@ class Workspace:
591
598
  folders.append({"path": str(docs_dir), "name": "docs"})
592
599
  return folders
593
600
 
601
+ def _custom_folders(
602
+ self, config: configparser.ConfigParser, section: str | None
603
+ ) -> list[dict[str, str]]:
604
+ """
605
+ The 'workspace_folders' config option as explorer folder entries:
606
+ comma separated directories, resolved against the workspace root
607
+ unless absolute. Under [DEFAULT] configparser applies the value
608
+ to every section; a section's own value overrides it. Directories
609
+ that don't exist are skipped with a warning (once per process) so
610
+ a typo can't put a broken root in the editor sidebar.
611
+ """
612
+ if section is not None and config.has_section(section):
613
+ raw = config.get(section, "workspace_folders", fallback="")
614
+ else:
615
+ raw = config.defaults().get("workspace_folders", "")
616
+ folders = []
617
+ for part in raw.split(","):
618
+ part = part.strip()
619
+ if not part:
620
+ continue
621
+ path = Path(os.path.expanduser(part))
622
+ if not path.is_absolute():
623
+ path = self.path / path
624
+ if not path.is_dir():
625
+ if part not in self._warned_missing_folders:
626
+ self._warned_missing_folders.add(part)
627
+ logger.warning(
628
+ f"Skipping workspace folder '{part}': not a directory"
629
+ )
630
+ continue
631
+ folders.append({"path": str(path)})
632
+ return folders
633
+
634
+ def _custom_folders_union(
635
+ self, config: configparser.ConfigParser
636
+ ) -> list[dict[str, str]]:
637
+ """Every configured custom folder, deduplicated, for the global
638
+ workspace: the [DEFAULT] entries plus each server's own."""
639
+ folders = self._custom_folders(config, None)
640
+ seen = {folder["path"] for folder in folders}
641
+ for section in config.sections():
642
+ for folder in self._custom_folders(config, section):
643
+ if folder["path"] not in seen:
644
+ seen.add(folder["path"])
645
+ folders.append(folder)
646
+ return folders
647
+
594
648
  def _app_blocks(
595
649
  self,
596
650
  ) -> list[tuple[str, str, list[tuple[PuakmaApplication, Path]]]]:
@@ -651,21 +705,29 @@ class Workspace:
651
705
  return []
652
706
  return [p for p in server_libs.split(",") if p]
653
707
 
654
- def _referenced_libs_union(self, config: configparser.ConfigParser) -> list[str]:
655
- """
656
- The global workspace's referencedLibraries: a union across every
657
- server. vscode-java's 'java.project.*' settings are WINDOW
658
- scoped - folder-level settings.json values are ignored (VS Code
659
- greys them out) - so a multi-root workspace can only carry ONE
660
- list for all folders. Version conflicts between servers are
661
- possible here; the per-server '<name>.code-workspace' files
662
- ('vortex code -s <server>') are the guaranteed-correct view.
708
+ def _referenced_libs_union(
709
+ self, config: configparser.ConfigParser, cloned_hosts: Collection[str]
710
+ ) -> list[str]:
711
+ """
712
+ The global workspaces referencedLibraries: a union across the
713
+ servers that actually have cloned apps in this workspace.
714
+ vscode-java's 'java.project.*' settings are WINDOW scoped -
715
+ folder-level settings.json values are ignored (VS Code greys
716
+ them out) - so a multi-root workspace can only carry ONE list
717
+ for all folders. Servers configured in servers.ini with no
718
+ clones here contribute nothing: their jars would only shadow
719
+ the jars of servers that are in the window (the JDT builder
720
+ does not honor entry order, so e.g. a legacy server's old POI
721
+ can silently break a modern server's build). Version conflicts
722
+ between cloned servers are still possible; the per-server
723
+ '<name>.code-workspace' files ('vortex code -s <server>') are
724
+ the guaranteed-correct view.
663
725
  """
664
726
  refs: list[str] = []
665
727
  hosts: list[tuple[str, str]] = []
666
728
  for section in config.sections():
667
729
  host = config.get(section, "host", fallback="").strip()
668
- if host:
730
+ if host and host in cloned_hosts:
669
731
  hosts.append((section, host))
670
732
  for _section, host in hosts:
671
733
  entries = libs.vscode_reference_entries(self.path, host)
@@ -726,13 +788,19 @@ class Workspace:
726
788
  blocks = self._app_blocks()
727
789
 
728
790
  # The global workspace: every server's block, union of all jars
729
- global_folders = self._utility_folders()
791
+ # and custom folders
792
+ global_folders = self._utility_folders() + self._custom_folders_union(config)
730
793
  for _label, _host, apps in blocks:
731
794
  global_folders.extend(self._server_block_folders(apps))
732
795
  self._write_workspace_file(
733
796
  self.code_workspace_file,
734
797
  global_folders,
735
- self._java_settings(config, self._referenced_libs_union(config)),
798
+ self._java_settings(
799
+ config,
800
+ self._referenced_libs_union(
801
+ config, {host for _label, host, _apps in blocks}
802
+ ),
803
+ ),
736
804
  reset,
737
805
  )
738
806
 
@@ -748,7 +816,11 @@ class Workspace:
748
816
  refs.extend(
749
817
  p for p in self._lib_path_entries(config, section) if p not in refs
750
818
  )
751
- folders = self._utility_folders() + self._server_block_folders(apps)
819
+ folders = (
820
+ self._utility_folders()
821
+ + self._custom_folders(config, section)
822
+ + self._server_block_folders(apps)
823
+ )
752
824
  self._write_workspace_file(
753
825
  file, folders, self._java_settings(config, refs), reset
754
826
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vortex_cli
3
- Version: 5.0.0
3
+ Version: 5.0.1
4
4
  Summary: Vortex CLI
5
5
  Author-email: Jordan Amos <jordan.amos@gmail.com>
6
6
  License: MIT License
@@ -101,6 +101,7 @@ While it is possible to use without it, this software has been purposefully desi
101
101
  ; Optional
102
102
  clone_with_resources = html,css,js ; resources with these extensions are always cloned - 'clone --get-resources' still clones ALL resources
103
103
  lib_path = ; optional extra jars to add to the classpath (the server's own jars are downloaded automatically - see 'vortex libs')
104
+ workspace_folders = ~/dev/shared,notes ; extra folders to mount in the generated .code-workspace files. Relative paths resolve against the workspace root. Under [DEFAULT] they are added to every workspace; here they apply to this server's workspace (and the global one)
104
105
  java_home = /usr/lib/jvm/java-17-openjdk-amd64/ ; The local path to the JRE to use. Should be the same version running on your server
105
106
  java_environment_name = JavaSE-17 ; Java Execution Environment name https://docs.osgi.org/reference/eenames.html
106
107
  ```
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes