insightfactory-cli 1.2.0__tar.gz → 1.3.0.dev37__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 (76) hide show
  1. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/.github/workflows/claude.yml +65 -1
  2. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/CHANGELOG.md +8 -0
  3. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/PKG-INFO +1 -1
  4. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/pyproject.toml +1 -1
  5. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/uv.lock +1 -1
  6. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/.github/workflows/ci.yml +0 -0
  7. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/.github/workflows/release.yml +0 -0
  8. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/.gitignore +0 -0
  9. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/.python-version +0 -0
  10. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/AGENTS.md +0 -0
  11. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/CLAUDE.md +0 -0
  12. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/LICENSE +0 -0
  13. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/README.md +0 -0
  14. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/__init__.py +0 -0
  15. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/__main__.py +0 -0
  16. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/assets/__init__.py +0 -0
  17. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/assets/insightfactoryai-logo.svg +0 -0
  18. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/attribution.py +0 -0
  19. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/cache.py +0 -0
  20. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/callback_page.py +0 -0
  21. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/cli.py +0 -0
  22. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/colour.py +0 -0
  23. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/commands/__init__.py +0 -0
  24. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/commands/api.py +0 -0
  25. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/commands/config.py +0 -0
  26. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/commands/login.py +0 -0
  27. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/commands/logout.py +0 -0
  28. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/commands/mcp.py +0 -0
  29. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/commands/profiles.py +0 -0
  30. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/commands/set_token.py +0 -0
  31. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/commands/token.py +0 -0
  32. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/config.py +0 -0
  33. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/constants.py +0 -0
  34. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/http.py +0 -0
  35. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/main.py +0 -0
  36. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/oauth.py +0 -0
  37. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/router/__init__.py +0 -0
  38. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/router/catalog.py +0 -0
  39. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/router/content.py +0 -0
  40. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/router/log.py +0 -0
  41. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/router/policy.py +0 -0
  42. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/router/server.py +0 -0
  43. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/router/upstream.py +0 -0
  44. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/src/if_cli/runtime.py +0 -0
  45. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/__init__.py +0 -0
  46. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/cache_writer.py +0 -0
  47. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/conftest.py +0 -0
  48. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/helpers.py +0 -0
  49. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/servers.py +0 -0
  50. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_api.py +0 -0
  51. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_api_command.py +0 -0
  52. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_attribution.py +0 -0
  53. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_cache.py +0 -0
  54. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_cli.py +0 -0
  55. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_config.py +0 -0
  56. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_config_command.py +0 -0
  57. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_login.py +0 -0
  58. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_mcp_command.py +0 -0
  59. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_oauth.py +0 -0
  60. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_oauth_flow.py +0 -0
  61. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_oauth_force_refresh.py +0 -0
  62. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_profiles.py +0 -0
  63. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_programmatic_api.py +0 -0
  64. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_release_tools.py +0 -0
  65. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_router_catalog.py +0 -0
  66. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_router_content.py +0 -0
  67. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_router_log.py +0 -0
  68. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_router_policy.py +0 -0
  69. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_router_resources.py +0 -0
  70. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_router_server.py +0 -0
  71. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_router_upstream.py +0 -0
  72. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_runtime.py +0 -0
  73. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_set_token.py +0 -0
  74. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tests/test_token.py +0 -0
  75. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tools/check_release.py +0 -0
  76. {insightfactory_cli-1.2.0 → insightfactory_cli-1.3.0.dev37}/tools/release_notes.py +0 -0
@@ -4,7 +4,8 @@
4
4
  # Purpose: AI-powered code review and assistance, on demand only.
5
5
  # Triggered by mentioning @claude in a PR comment, an issue
6
6
  # comment, or an inline PR review comment (e.g. `@claude review`).
7
- # There is no automatic review on PR open.
7
+ # @agent-review on a PR runs Claude and Codex together through the
8
+ # shared agent review instead. There is no automatic review on PR open.
8
9
  #
9
10
  # =======================================================
10
11
 
@@ -76,3 +77,66 @@ jobs:
76
77
  Tests:
77
78
  - `tests/` uses isolated config dirs via `INSIGHTFACTORY_CONFIG_DIR`; never smoke-test
78
79
  against `~/.insightfactory`.
80
+
81
+ agent-review:
82
+ # Claude and Codex review the PR together, one matrix job each. The shared
83
+ # workflow's request check refuses anything but a PR comment from someone with
84
+ # write access that names @agent-review as a whole word.
85
+ if: >-
86
+ contains(github.event.comment.body, '@agent-review')
87
+ && (github.event_name == 'pull_request_review_comment' || github.event.issue.pull_request)
88
+ permissions:
89
+ id-token: write
90
+ contents: read
91
+ pull-requests: write
92
+ issues: write
93
+ actions: read
94
+ checks: read
95
+ statuses: read
96
+ uses: insightfactory-ai/if_sre_github_actions/.github/workflows/if_s_agent_review.yml@main
97
+ secrets: inherit
98
+ with:
99
+ # A reviewer approves only an approved verdict with no P0, P1 or P2, and a
100
+ # person from the required team still approves every PR (the Approvers
101
+ # ruleset on develop, test and main).
102
+ allow_agent_approval: true
103
+ # The same instructions as the @claude job above; keep the two in step.
104
+ append_system_prompt: |
105
+ This repository (insightfactory-cli) is the production Python `if-cli`, published to public
106
+ PyPI. Read CLAUDE.md and README.md before reviewing; the rules below are the ones that get
107
+ violated most often.
108
+
109
+ Runtime and layout:
110
+ - Runtime code is stdlib-only. Flag any new runtime dependency in pyproject.toml or any
111
+ import outside the standard library.
112
+ - Keep one module per CLI command under `src/if_cli/commands/`.
113
+ - Do not suggest third-party HTTP, OAuth, or CLI frameworks; the codebase uses urllib and
114
+ argparse deliberately.
115
+
116
+ Security and auth:
117
+ - A profile's bearer token must never be sent outside that profile's factory origin. Flag
118
+ any code path that could forward a token to another host.
119
+ - OAuth uses authorization-code flow with PKCE and a loopback-only (`127.0.0.1`) callback.
120
+ The CLI is a public client with no client secret.
121
+ - Do not commit credentials, access tokens, refresh tokens, or client secrets in code,
122
+ tests, or fixtures. Fixtures must use neutral hostnames such as `factory.example`.
123
+
124
+ On-disk compatibility:
125
+ - Profiles and tokens must be written only through the atomic private-file helpers
126
+ (`write_private_file` in config.py): `0o600` files, `0o700` directories, atomic replace
127
+ via temp file.
128
+ - On-disk profile and token-cache paths, JSON shapes, and file permissions must stay
129
+ byte-compatible with the Node `@insightfactory-ai/if-cli` so users can switch
130
+ implementations without re-authenticating.
131
+
132
+ Programmatic API (breaking-change surface):
133
+ - These four symbols are a supported in-process surface documented in README.md:
134
+ `if_cli.config.load_config`, `if_cli.config.get_profile`, `if_cli.oauth.get_valid_token`,
135
+ `if_cli.runtime.CliError`.
136
+ - They must raise `CliError` on failure (never `SystemExit`), never write to stdout, never
137
+ launch a browser or block on interactive input, and use only bounded waits.
138
+ - Changing signatures, behaviour, or removing any of them requires a major version bump.
139
+
140
+ Tests:
141
+ - `tests/` uses isolated config dirs via `INSIGHTFACTORY_CONFIG_DIR`; never smoke-test
142
+ against `~/.insightfactory`.
@@ -11,6 +11,14 @@ that: every PR into `develop` must add an entry here, and a tag whose version ha
11
11
  section fails rather than releasing an empty page. The version only moves when the
12
12
  last one has been released, so a cycle's PRs share a section.
13
13
 
14
+ ## 1.3.0
15
+
16
+ ### Changed
17
+
18
+ - Internal only: a PR comment naming `@agent-review` runs the shared Claude and
19
+ Codex review, which can approve a PR that a person from the required team
20
+ still approves. The CLI itself is unchanged.
21
+
14
22
  ## 1.2.0
15
23
 
16
24
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: insightfactory-cli
3
- Version: 1.2.0
3
+ Version: 1.3.0.dev37
4
4
  Summary: Profile-based authentication CLI for the InsightFactory Interfaces API
5
5
  Project-URL: Homepage, https://insightfactory.ai
6
6
  Author-email: "insightfactory.ai Support" <support@insightfactory.ai>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "insightfactory-cli"
3
- version = "1.2.0"
3
+ version = "1.3.0.dev37"
4
4
  description = "Profile-based authentication CLI for the InsightFactory Interfaces API"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -305,7 +305,7 @@ wheels = [
305
305
 
306
306
  [[package]]
307
307
  name = "insightfactory-cli"
308
- version = "1.2.0"
308
+ version = "1.3.0"
309
309
  source = { editable = "." }
310
310
 
311
311
  [package.optional-dependencies]