ci: frozen uv sync (#138)
* ci: frozen uv sync * fix: add missing authorization parameter to get_agent_stats in CLI The generated Rust client was updated with an authorization header parameter for get_agent_stats, but the CLI code wasn't updated.
This commit is contained in:
parent
eb2702bcba
commit
4135a6cee5
6 changed files with 53 additions and 18 deletions
30
.github/workflows/test.yml
vendored
30
.github/workflows/test.yml
vendored
|
|
@ -222,7 +222,7 @@ jobs:
|
||||||
|
|
||||||
- name: Install API dependencies
|
- name: Install API dependencies
|
||||||
working-directory: ./hindsight-api
|
working-directory: ./hindsight-api
|
||||||
run: uv sync --no-install-project --index-strategy unsafe-best-match
|
run: uv sync --frozen --no-install-project --index-strategy unsafe-best-match
|
||||||
|
|
||||||
- name: Create .env file
|
- name: Create .env file
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -352,7 +352,7 @@ jobs:
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
working-directory: ./hindsight-api
|
working-directory: ./hindsight-api
|
||||||
run: uv sync --extra test --no-install-project --index-strategy unsafe-best-match
|
run: uv sync --frozen --extra test --no-install-project --index-strategy unsafe-best-match
|
||||||
|
|
||||||
- name: Cache HuggingFace models
|
- name: Cache HuggingFace models
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
|
|
@ -413,11 +413,11 @@ jobs:
|
||||||
|
|
||||||
- name: Install client test dependencies
|
- name: Install client test dependencies
|
||||||
working-directory: ./hindsight-clients/python
|
working-directory: ./hindsight-clients/python
|
||||||
run: uv sync --extra test --index-strategy unsafe-best-match
|
run: uv sync --frozen --extra test --index-strategy unsafe-best-match
|
||||||
|
|
||||||
- name: Install API dependencies
|
- name: Install API dependencies
|
||||||
working-directory: ./hindsight-api
|
working-directory: ./hindsight-api
|
||||||
run: uv sync --no-install-project --index-strategy unsafe-best-match
|
run: uv sync --frozen --no-install-project --index-strategy unsafe-best-match
|
||||||
|
|
||||||
- name: Create .env file
|
- name: Create .env file
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -490,7 +490,7 @@ jobs:
|
||||||
|
|
||||||
- name: Install API dependencies
|
- name: Install API dependencies
|
||||||
working-directory: ./hindsight-api
|
working-directory: ./hindsight-api
|
||||||
run: uv sync --no-install-project --index-strategy unsafe-best-match
|
run: uv sync --frozen --no-install-project --index-strategy unsafe-best-match
|
||||||
|
|
||||||
- name: Install TypeScript client dependencies
|
- name: Install TypeScript client dependencies
|
||||||
working-directory: ./hindsight-clients/typescript
|
working-directory: ./hindsight-clients/typescript
|
||||||
|
|
@ -578,7 +578,7 @@ jobs:
|
||||||
|
|
||||||
- name: Install API dependencies
|
- name: Install API dependencies
|
||||||
working-directory: ./hindsight-api
|
working-directory: ./hindsight-api
|
||||||
run: uv sync --no-install-project --index-strategy unsafe-best-match
|
run: uv sync --frozen --no-install-project --index-strategy unsafe-best-match
|
||||||
|
|
||||||
- name: Create .env file
|
- name: Create .env file
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -645,11 +645,11 @@ jobs:
|
||||||
|
|
||||||
- name: Install API dependencies
|
- name: Install API dependencies
|
||||||
working-directory: ./hindsight-api
|
working-directory: ./hindsight-api
|
||||||
run: uv sync --no-install-project --index-strategy unsafe-best-match
|
run: uv sync --frozen --no-install-project --index-strategy unsafe-best-match
|
||||||
|
|
||||||
- name: Install integration test dependencies
|
- name: Install integration test dependencies
|
||||||
working-directory: ./hindsight-integration-tests
|
working-directory: ./hindsight-integration-tests
|
||||||
run: uv sync
|
run: uv sync --frozen
|
||||||
|
|
||||||
- name: Cache HuggingFace models
|
- name: Cache HuggingFace models
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
|
|
@ -729,7 +729,7 @@ jobs:
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
working-directory: ./hindsight-integrations/litellm
|
working-directory: ./hindsight-integrations/litellm
|
||||||
run: uv sync --extra dev
|
run: uv sync --frozen --extra dev
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
working-directory: ./hindsight-integrations/litellm
|
working-directory: ./hindsight-integrations/litellm
|
||||||
|
|
@ -760,7 +760,7 @@ jobs:
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
working-directory: ./hindsight-embed
|
working-directory: ./hindsight-embed
|
||||||
run: uv sync --index-strategy unsafe-best-match
|
run: uv sync --frozen --index-strategy unsafe-best-match
|
||||||
|
|
||||||
- name: Cache HuggingFace models
|
- name: Cache HuggingFace models
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
|
|
@ -820,11 +820,11 @@ jobs:
|
||||||
working-directory: ./hindsight-api
|
working-directory: ./hindsight-api
|
||||||
run: |
|
run: |
|
||||||
uv build
|
uv build
|
||||||
uv sync --no-install-project --index-strategy unsafe-best-match
|
uv sync --frozen --no-install-project --index-strategy unsafe-best-match
|
||||||
|
|
||||||
- name: Install Python client dependencies
|
- name: Install Python client dependencies
|
||||||
working-directory: ./hindsight-clients/python
|
working-directory: ./hindsight-clients/python
|
||||||
run: uv sync --extra test --index-strategy unsafe-best-match
|
run: uv sync --frozen --extra test --index-strategy unsafe-best-match
|
||||||
|
|
||||||
- name: Install TypeScript client
|
- name: Install TypeScript client
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -928,9 +928,9 @@ jobs:
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: |
|
run: |
|
||||||
cd hindsight-dev && uv sync --index-strategy unsafe-best-match
|
cd hindsight-dev && uv sync --frozen --index-strategy unsafe-best-match
|
||||||
cd ../hindsight-api && uv sync --index-strategy unsafe-best-match
|
cd ../hindsight-api && uv sync --frozen --index-strategy unsafe-best-match
|
||||||
cd ../hindsight-embed && uv sync --index-strategy unsafe-best-match
|
cd ../hindsight-embed && uv sync --frozen --index-strategy unsafe-best-match
|
||||||
|
|
||||||
- name: Run generate-openapi
|
- name: Run generate-openapi
|
||||||
run: ./scripts/generate-openapi.sh
|
run: ./scripts/generate-openapi.sh
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ impl ApiClient {
|
||||||
|
|
||||||
pub fn get_stats(&self, agent_id: &str, _verbose: bool) -> Result<AgentStats> {
|
pub fn get_stats(&self, agent_id: &str, _verbose: bool) -> Result<AgentStats> {
|
||||||
self.runtime.block_on(async {
|
self.runtime.block_on(async {
|
||||||
let response = self.client.get_agent_stats(agent_id).await?;
|
let response = self.client.get_agent_stats(agent_id, None).await?;
|
||||||
let value = response.into_inner();
|
let value = response.into_inner();
|
||||||
// Convert to JSON Value first, then parse into our type
|
// Convert to JSON Value first, then parse into our type
|
||||||
let json_value = serde_json::to_value(&value)?;
|
let json_value = serde_json::to_value(&value)?;
|
||||||
|
|
|
||||||
|
|
@ -939,6 +939,7 @@ class BanksApi:
|
||||||
async def get_agent_stats(
|
async def get_agent_stats(
|
||||||
self,
|
self,
|
||||||
bank_id: StrictStr,
|
bank_id: StrictStr,
|
||||||
|
authorization: Optional[StrictStr] = None,
|
||||||
_request_timeout: Union[
|
_request_timeout: Union[
|
||||||
None,
|
None,
|
||||||
Annotated[StrictFloat, Field(gt=0)],
|
Annotated[StrictFloat, Field(gt=0)],
|
||||||
|
|
@ -958,6 +959,8 @@ class BanksApi:
|
||||||
|
|
||||||
:param bank_id: (required)
|
:param bank_id: (required)
|
||||||
:type bank_id: str
|
:type bank_id: str
|
||||||
|
:param authorization:
|
||||||
|
:type authorization: str
|
||||||
:param _request_timeout: timeout setting for this request. If one
|
:param _request_timeout: timeout setting for this request. If one
|
||||||
number provided, it will be total request
|
number provided, it will be total request
|
||||||
timeout. It can also be a pair (tuple) of
|
timeout. It can also be a pair (tuple) of
|
||||||
|
|
@ -982,6 +985,7 @@ class BanksApi:
|
||||||
|
|
||||||
_param = self._get_agent_stats_serialize(
|
_param = self._get_agent_stats_serialize(
|
||||||
bank_id=bank_id,
|
bank_id=bank_id,
|
||||||
|
authorization=authorization,
|
||||||
_request_auth=_request_auth,
|
_request_auth=_request_auth,
|
||||||
_content_type=_content_type,
|
_content_type=_content_type,
|
||||||
_headers=_headers,
|
_headers=_headers,
|
||||||
|
|
@ -1007,6 +1011,7 @@ class BanksApi:
|
||||||
async def get_agent_stats_with_http_info(
|
async def get_agent_stats_with_http_info(
|
||||||
self,
|
self,
|
||||||
bank_id: StrictStr,
|
bank_id: StrictStr,
|
||||||
|
authorization: Optional[StrictStr] = None,
|
||||||
_request_timeout: Union[
|
_request_timeout: Union[
|
||||||
None,
|
None,
|
||||||
Annotated[StrictFloat, Field(gt=0)],
|
Annotated[StrictFloat, Field(gt=0)],
|
||||||
|
|
@ -1026,6 +1031,8 @@ class BanksApi:
|
||||||
|
|
||||||
:param bank_id: (required)
|
:param bank_id: (required)
|
||||||
:type bank_id: str
|
:type bank_id: str
|
||||||
|
:param authorization:
|
||||||
|
:type authorization: str
|
||||||
:param _request_timeout: timeout setting for this request. If one
|
:param _request_timeout: timeout setting for this request. If one
|
||||||
number provided, it will be total request
|
number provided, it will be total request
|
||||||
timeout. It can also be a pair (tuple) of
|
timeout. It can also be a pair (tuple) of
|
||||||
|
|
@ -1050,6 +1057,7 @@ class BanksApi:
|
||||||
|
|
||||||
_param = self._get_agent_stats_serialize(
|
_param = self._get_agent_stats_serialize(
|
||||||
bank_id=bank_id,
|
bank_id=bank_id,
|
||||||
|
authorization=authorization,
|
||||||
_request_auth=_request_auth,
|
_request_auth=_request_auth,
|
||||||
_content_type=_content_type,
|
_content_type=_content_type,
|
||||||
_headers=_headers,
|
_headers=_headers,
|
||||||
|
|
@ -1075,6 +1083,7 @@ class BanksApi:
|
||||||
async def get_agent_stats_without_preload_content(
|
async def get_agent_stats_without_preload_content(
|
||||||
self,
|
self,
|
||||||
bank_id: StrictStr,
|
bank_id: StrictStr,
|
||||||
|
authorization: Optional[StrictStr] = None,
|
||||||
_request_timeout: Union[
|
_request_timeout: Union[
|
||||||
None,
|
None,
|
||||||
Annotated[StrictFloat, Field(gt=0)],
|
Annotated[StrictFloat, Field(gt=0)],
|
||||||
|
|
@ -1094,6 +1103,8 @@ class BanksApi:
|
||||||
|
|
||||||
:param bank_id: (required)
|
:param bank_id: (required)
|
||||||
:type bank_id: str
|
:type bank_id: str
|
||||||
|
:param authorization:
|
||||||
|
:type authorization: str
|
||||||
:param _request_timeout: timeout setting for this request. If one
|
:param _request_timeout: timeout setting for this request. If one
|
||||||
number provided, it will be total request
|
number provided, it will be total request
|
||||||
timeout. It can also be a pair (tuple) of
|
timeout. It can also be a pair (tuple) of
|
||||||
|
|
@ -1118,6 +1129,7 @@ class BanksApi:
|
||||||
|
|
||||||
_param = self._get_agent_stats_serialize(
|
_param = self._get_agent_stats_serialize(
|
||||||
bank_id=bank_id,
|
bank_id=bank_id,
|
||||||
|
authorization=authorization,
|
||||||
_request_auth=_request_auth,
|
_request_auth=_request_auth,
|
||||||
_content_type=_content_type,
|
_content_type=_content_type,
|
||||||
_headers=_headers,
|
_headers=_headers,
|
||||||
|
|
@ -1138,6 +1150,7 @@ class BanksApi:
|
||||||
def _get_agent_stats_serialize(
|
def _get_agent_stats_serialize(
|
||||||
self,
|
self,
|
||||||
bank_id,
|
bank_id,
|
||||||
|
authorization,
|
||||||
_request_auth,
|
_request_auth,
|
||||||
_content_type,
|
_content_type,
|
||||||
_headers,
|
_headers,
|
||||||
|
|
@ -1163,6 +1176,8 @@ class BanksApi:
|
||||||
_path_params['bank_id'] = bank_id
|
_path_params['bank_id'] = bank_id
|
||||||
# process the query parameters
|
# process the query parameters
|
||||||
# process the header parameters
|
# process the header parameters
|
||||||
|
if authorization is not None:
|
||||||
|
_header_params['authorization'] = authorization
|
||||||
# process the form parameters
|
# process the form parameters
|
||||||
# process the body parameter
|
# process the body parameter
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -169,8 +169,6 @@ export const createSseClient = <TData = unknown>({
|
||||||
const { done, value } = await reader.read();
|
const { done, value } = await reader.read();
|
||||||
if (done) break;
|
if (done) break;
|
||||||
buffer += value;
|
buffer += value;
|
||||||
// Normalize line endings: CRLF -> LF, then CR -> LF
|
|
||||||
buffer = buffer.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
|
|
||||||
|
|
||||||
const chunks = buffer.split("\n\n");
|
const chunks = buffer.split("\n\n");
|
||||||
buffer = chunks.pop() ?? "";
|
buffer = chunks.pop() ?? "";
|
||||||
|
|
|
||||||
|
|
@ -1320,6 +1320,12 @@ export type ListBanksResponse = ListBanksResponses[keyof ListBanksResponses];
|
||||||
|
|
||||||
export type GetAgentStatsData = {
|
export type GetAgentStatsData = {
|
||||||
body?: never;
|
body?: never;
|
||||||
|
headers?: {
|
||||||
|
/**
|
||||||
|
* Authorization
|
||||||
|
*/
|
||||||
|
authorization?: string | null;
|
||||||
|
};
|
||||||
path: {
|
path: {
|
||||||
/**
|
/**
|
||||||
* Bank Id
|
* Bank Id
|
||||||
|
|
|
||||||
|
|
@ -454,6 +454,22 @@
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"title": "Bank Id"
|
"title": "Bank Id"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "authorization",
|
||||||
|
"in": "header",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"anyOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "Authorization"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue