primethink-cli 1.7.0__tar.gz → 1.7.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 (52) hide show
  1. {primethink_cli-1.7.0/primethink_cli.egg-info → primethink_cli-1.7.1}/PKG-INFO +1 -1
  2. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/USER_GUIDE.md +1 -1
  3. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/docs/agent-tools.md +1 -1
  4. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/docs/cli-reference.md +2 -2
  5. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/primethink.py +21 -2
  6. {primethink_cli-1.7.0 → primethink_cli-1.7.1/primethink_cli.egg-info}/PKG-INFO +1 -1
  7. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/pyproject.toml +1 -1
  8. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/tests/test_cli.py +1 -1
  9. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/tests/test_suite.py +18 -0
  10. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/DEVELOPER.md +0 -0
  11. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/LICENSE +0 -0
  12. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/MANIFEST.in +0 -0
  13. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/README.md +0 -0
  14. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/SPECS.md +0 -0
  15. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/docs/install.md +0 -0
  16. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/docs/primethink_help_llms.txt +0 -0
  17. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/install/homebrew/primethink-cli.rb +0 -0
  18. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/install/install.cmd +0 -0
  19. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/install/install.ps1 +0 -0
  20. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/install/install.sh +0 -0
  21. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/primethink_agent_tools/__init__.py +0 -0
  22. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/primethink_agent_tools/client.py +0 -0
  23. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/primethink_agent_tools/settings.py +0 -0
  24. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/primethink_agent_tools/tools.py +0 -0
  25. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/primethink_cli.egg-info/SOURCES.txt +0 -0
  26. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/primethink_cli.egg-info/dependency_links.txt +0 -0
  27. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/primethink_cli.egg-info/entry_points.txt +0 -0
  28. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/primethink_cli.egg-info/requires.txt +0 -0
  29. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/primethink_cli.egg-info/top_level.txt +0 -0
  30. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/primethink_mcp.py +0 -0
  31. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/pytest.ini +0 -0
  32. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/scripts/build.sh +0 -0
  33. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/scripts/deploy.sh +0 -0
  34. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/scripts/publish.sh +0 -0
  35. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/setup.cfg +0 -0
  36. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/setup.py +0 -0
  37. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/skills/__init__.py +0 -0
  38. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/skills/primethink-cli/SKILL.md +0 -0
  39. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/tests/__init__.py +0 -0
  40. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/tests/conftest.py +0 -0
  41. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/tests/test_agent_commands.py +0 -0
  42. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/tests/test_agent_tools.py +0 -0
  43. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/tests/test_env_config.py +0 -0
  44. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/tests/test_install_developer_skill.py +0 -0
  45. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/tests/test_install_skill.py +0 -0
  46. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/tests/test_live_app.py +0 -0
  47. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/tests/test_mcp_server.py +0 -0
  48. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/tests/test_packaging.py +0 -0
  49. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/tests/test_project_workflows.py +0 -0
  50. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/tests/test_search_commands.py +0 -0
  51. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/tests/test_task_commands.py +0 -0
  52. {primethink_cli-1.7.0 → primethink_cli-1.7.1}/tests/test_whoami.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: primethink-cli
3
- Version: 1.7.0
3
+ Version: 1.7.1
4
4
  Summary: PrimeThink CLI - A powerful tool for interacting with PrimeThink AI API
5
5
  Author-email: PrimeThink <support@primethink.ai>
6
6
  License-Expression: MIT
@@ -78,7 +78,7 @@ pt version
78
78
 
79
79
  You should see output like:
80
80
  ```
81
- PrimeThink CLI v1.7.0
81
+ PrimeThink CLI v1.7.1
82
82
  ```
83
83
 
84
84
  ## Getting Started
@@ -60,7 +60,7 @@ resolve on 3.8. The `dev` extra installs the plugin's test dependencies only on
60
60
 
61
61
  ```bash
62
62
  # In the API image (production): one pinned line in requirements.txt
63
- primethink-cli[agent-tools]==1.7.0
63
+ primethink-cli[agent-tools]==1.7.1
64
64
 
65
65
  # From a checkout (dev): the dev extra already includes langchain-core
66
66
  pip install -e ".[dev]"
@@ -1,6 +1,6 @@
1
1
  # PrimeThink CLI — Command Reference
2
2
 
3
- Complete reference for every command in the PrimeThink CLI (`pt`), version 1.7.0.
3
+ Complete reference for every command in the PrimeThink CLI (`pt`), version 1.7.1.
4
4
 
5
5
  Commands are organized into noun groups: `profile`, `live-app`, `chat`, `collection`, `agent`, `task`, `search`, and `image`.
6
6
 
@@ -229,7 +229,7 @@ Display the CLI version.
229
229
 
230
230
  ```bash
231
231
  pt version
232
- # PrimeThink CLI v1.7.0
232
+ # PrimeThink CLI v1.7.1
233
233
  ```
234
234
 
235
235
  ### `pt whoami`
@@ -38,7 +38,7 @@ ENV_DEBUG = 'PRIMETHINK_DEBUG'
38
38
 
39
39
  # Default timeout for HTTP requests (seconds)
40
40
  # scripts/publish.sh rewrites the literal "PrimeThink CLI v…" below; CLI_VERSION follows it.
41
- _CLI_BANNER = "PrimeThink CLI v1.7.0"
41
+ _CLI_BANNER = "PrimeThink CLI v1.7.1"
42
42
  CLI_VERSION = _CLI_BANNER.rsplit('v', 1)[1]
43
43
  REQUEST_TIMEOUT = 30
44
44
 
@@ -6705,6 +6705,7 @@ class _SuiteInstaller:
6705
6705
  def phase_tags(self):
6706
6706
  self.tag_ids = {} # tag key → id
6707
6707
  self.suite_tag = {} # model → id of the suite:<id> tag
6708
+ self.tags_denied = False
6708
6709
  needed = {}
6709
6710
  for t in self.suite['tags']:
6710
6711
  needed[(t['model'], t['name'])] = t['key']
@@ -6731,8 +6732,26 @@ class _SuiteInstaller:
6731
6732
  elif self.dry:
6732
6733
  tid = self.new_id(ref)
6733
6734
  self.record('tags', ref, name, 'create')
6735
+ elif self.tags_denied:
6736
+ self.record('tags', ref, name, 'skip', note='tags need a super admin here')
6737
+ continue
6734
6738
  else:
6735
- tid = self.write('POST', '/api/v1/tags', json={'model': model, 'name': name}).get('id')
6739
+ response, error = _api_call('POST', f"{self.api_url}/api/v1/tags", self.token,
6740
+ json={'model': model, 'name': name})
6741
+ if error is None and response.status_code in (401, 403):
6742
+ # Creating tags is super-admin only (POST /api/v1/tags). Tags are a
6743
+ # convenience here (filtering, one provenance signal among three), so a
6744
+ # regular admin's install goes on without the ones that do not exist yet.
6745
+ self.tags_denied = True
6746
+ self.warnings.append(
6747
+ "tags: this account cannot create tags (super admin only); the install goes on "
6748
+ "without the missing ones. Resources are still found again by their "
6749
+ "extra.ptsuite provenance, their name and the lock file.")
6750
+ self.record('tags', ref, name, 'skip', note='tags need a super admin here')
6751
+ continue
6752
+ if error is not None or not 200 <= response.status_code < 300:
6753
+ raise SuiteError(f"POST /api/v1/tags: {error or f'{response.status_code} - {response.text[:400]}'}")
6754
+ tid = (response.json() if response.content and response.content.strip() else {}).get('id')
6736
6755
  self.created.add(ref)
6737
6756
  self.record('tags', ref, name, 'create', tid)
6738
6757
  if key:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: primethink-cli
3
- Version: 1.7.0
3
+ Version: 1.7.1
4
4
  Summary: PrimeThink CLI - A powerful tool for interacting with PrimeThink AI API
5
5
  Author-email: PrimeThink <support@primethink.ai>
6
6
  License-Expression: MIT
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "primethink-cli"
9
- version = "1.7.0"
9
+ version = "1.7.1"
10
10
  description = "PrimeThink CLI - A powerful tool for interacting with PrimeThink AI API"
11
11
  readme = "README.md"
12
12
  license = "MIT"
@@ -105,7 +105,7 @@ def test_version_command(runner):
105
105
  """Test version command."""
106
106
  result = runner.invoke(cli, ["version"])
107
107
  assert result.exit_code == 0
108
- assert result.output == "PrimeThink CLI v1.7.0\n"
108
+ assert result.output == "PrimeThink CLI v1.7.1\n"
109
109
 
110
110
  @patch('primethink.CONFIG_DIR', Path('/tmp/.primethink'))
111
111
  @patch('primethink.CONFIG_FILE', Path('/tmp/.primethink/config.json'))
@@ -87,6 +87,8 @@ class FakePT:
87
87
  if p == '/api/v1/tags' and m == 'GET':
88
88
  return self.ok([t for t in self.tags if t['model'] == q.get('model')])
89
89
  if p == '/api/v1/tags' and m == 'POST':
90
+ if getattr(self, 'deny_tags', False):
91
+ return FakeResponse(403, text='{"detail":"You don\'t have permission to access this resource"}')
90
92
  row = {'id': self.id(), **body}
91
93
  self.tags.append(row)
92
94
  return self.ok(row, 201)
@@ -733,3 +735,19 @@ def test_capability_resolve_sees_every_page(fake, runner):
733
735
  r = runner.invoke(cli, ['capability', 'resolve', 'base', 'settings'])
734
736
  assert r.exit_code == 0, r.output
735
737
  assert json.loads(r.output) == {'ids': [1, 13], 'unresolved': []} # 'settings' is on page 2
738
+
739
+
740
+ def test_install_goes_on_when_the_account_cannot_create_tags(fake, pkg, runner):
741
+ """POST /api/v1/tags is super-admin only; a group admin must still be able to install."""
742
+ fake.deny_tags = True
743
+ r = install(runner, pkg)
744
+ assert r.exit_code == 0, r.output
745
+ assert 'Installed demo.suite 1.0.0' in r.output
746
+ assert 'cannot create tags' in r.output
747
+ assert fake.tags == []
748
+ assert not any(p == '/api/v1/tags/assignments' for _, p in fake.writes)
749
+ agent = next(iter(fake.agents.values()))
750
+ assert agent['extra']['ptsuite']['key'] == 'agents/core' # provenance still recorded
751
+ again = install(runner, pkg) # and a re-install still finds everything
752
+ assert again.exit_code == 0, again.output
753
+ assert len(fake.agents) == 1 and len([t for t in fake.tasks.values() if t['name'] == 'Demo Board']) == 1
File without changes
File without changes
File without changes
File without changes
File without changes