amigo_sdk 0.6.0__tar.gz → 0.8.0__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.

Potentially problematic release.


This version of amigo_sdk might be problematic. Click here for more details.

Files changed (44) hide show
  1. amigo_sdk-0.8.0/.github/workflows/auto-release.yml +149 -0
  2. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/PKG-INFO +1 -1
  3. amigo_sdk-0.8.0/src/amigo_sdk/__init__.py +1 -0
  4. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/src/amigo_sdk/generated/model.py +2 -2
  5. amigo_sdk-0.6.0/.github/workflows/auto-release.yml +0 -69
  6. amigo_sdk-0.6.0/src/amigo_sdk/__init__.py +0 -1
  7. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/.github/workflows/release.yml +0 -0
  8. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/.github/workflows/test.yml +0 -0
  9. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/.gitignore +0 -0
  10. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/CONTRIBUTING.md +0 -0
  11. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/LICENSE +0 -0
  12. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/README.md +0 -0
  13. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/openapi-new.json +0 -0
  14. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/pyproject.toml +0 -0
  15. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/scripts/__init__.py +0 -0
  16. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/scripts/aliases.json +0 -0
  17. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/scripts/check.py +0 -0
  18. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/scripts/gen_models.py +0 -0
  19. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/specs/openapi-baseline.json +0 -0
  20. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/src/amigo_sdk/auth.py +0 -0
  21. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/src/amigo_sdk/config.py +0 -0
  22. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/src/amigo_sdk/errors.py +0 -0
  23. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/src/amigo_sdk/http_client.py +0 -0
  24. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/src/amigo_sdk/resources/conversation.py +0 -0
  25. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/src/amigo_sdk/resources/organization.py +0 -0
  26. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/src/amigo_sdk/resources/service.py +0 -0
  27. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/src/amigo_sdk/resources/user.py +0 -0
  28. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/src/amigo_sdk/sdk_client.py +0 -0
  29. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/tests/__init__.py +0 -0
  30. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/tests/conftest.py +0 -0
  31. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/tests/integration/test_conversation_integration.py +0 -0
  32. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/tests/integration/test_organization_integration.py +0 -0
  33. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/tests/integration/test_user_integration.py +0 -0
  34. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/tests/resources/__init__.py +0 -0
  35. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/tests/resources/helpers.py +0 -0
  36. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/tests/resources/test_conversation.py +0 -0
  37. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/tests/resources/test_organization.py +0 -0
  38. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/tests/resources/test_service.py +0 -0
  39. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/tests/resources/test_user.py +0 -0
  40. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/tests/test_auth.py +0 -0
  41. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/tests/test_config.py +0 -0
  42. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/tests/test_errors.py +0 -0
  43. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/tests/test_http_client.py +0 -0
  44. {amigo_sdk-0.6.0 → amigo_sdk-0.8.0}/tests/test_sdk_client.py +0 -0
@@ -0,0 +1,149 @@
1
+ name: Auto Release (Backend API changes)
2
+
3
+ on:
4
+ repository_dispatch:
5
+ types: [openapi-updated]
6
+
7
+ permissions:
8
+ contents: write
9
+
10
+ jobs:
11
+ detect:
12
+ name: Detect OpenAPI change
13
+ runs-on: ubuntu-latest
14
+ outputs:
15
+ changed: ${{ steps.diff.outputs.changed }}
16
+ spec_url: ${{ steps.spec.outputs.spec_url }}
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Ensure jq
21
+ run: sudo apt-get update && sudo apt-get install -y jq
22
+
23
+ - name: Resolve spec URL
24
+ id: spec
25
+ run: |
26
+ SPEC_URL="${{ github.event.client_payload.spec_url }}"
27
+ if [ -z "$SPEC_URL" ]; then
28
+ SPEC_URL="https://api.amigo.ai/v1/openapi.json"
29
+ fi
30
+ echo "spec_url=$SPEC_URL" >> $GITHUB_OUTPUT
31
+
32
+ - name: Fetch current production spec
33
+ run: curl -fSL -o openapi-new.json "${{ steps.spec.outputs.spec_url }}"
34
+
35
+ - name: Check baseline presence
36
+ id: baseline
37
+ run: |
38
+ mkdir -p specs
39
+ if [ ! -f specs/openapi-baseline.json ]; then
40
+ echo "missing=true" >> $GITHUB_OUTPUT
41
+ else
42
+ echo "missing=false" >> $GITHUB_OUTPUT
43
+ fi
44
+
45
+ - name: Prepare baseline
46
+ run: |
47
+ mkdir -p specs
48
+ if [ ! -f specs/openapi-baseline.json ]; then
49
+ cp openapi-new.json specs/openapi-baseline.json
50
+ fi
51
+
52
+ - name: Diagnostics (spec and baseline)
53
+ run: |
54
+ echo "Resolved spec_url: ${{ steps.spec.outputs.spec_url }}"
55
+ echo "Baseline missing: ${{ steps.baseline.outputs.missing }}"
56
+ echo "jq version: $(jq --version)"
57
+ jq -S 'del(.info.version) | del(.servers)' specs/openapi-baseline.json > baseline.norm.json || true
58
+ jq -S 'del(.info.version) | del(.servers)' openapi-new.json > new.norm.json
59
+ if [ -f baseline.norm.json ]; then
60
+ echo "BASELINE_NORM_SHA=$(sha256sum baseline.norm.json | awk '{print $1}')"
61
+ else
62
+ echo "BASELINE_NORM_SHA=(none)"
63
+ fi
64
+ echo "NEW_NORM_SHA=$(sha256sum new.norm.json | awk '{print $1}')"
65
+ if [ -f baseline.norm.json ]; then
66
+ if diff -q baseline.norm.json new.norm.json >/dev/null 2>&1; then
67
+ echo "Quick diff: identical"
68
+ else
69
+ echo "Quick diff: differs"
70
+ fi
71
+ fi
72
+
73
+ # Section-level hashes and key diffs
74
+ echo "\n== Section-level hashes =="
75
+ if [ -f specs/openapi-baseline.json ]; then
76
+ BASELINE_PATHS_SHA=$(jq -cS '(.paths // {})' specs/openapi-baseline.json | sha256sum | awk '{print $1}')
77
+ BASELINE_SCHEMAS_SHA=$(jq -cS '(.components.schemas // {})' specs/openapi-baseline.json | sha256sum | awk '{print $1}')
78
+ BASELINE_PATHS_COUNT=$(jq -r '(.paths // {}) | keys | length' specs/openapi-baseline.json)
79
+ BASELINE_SCHEMAS_COUNT=$(jq -r '(.components.schemas // {}) | keys | length' specs/openapi-baseline.json)
80
+ else
81
+ BASELINE_PATHS_SHA=(none)
82
+ BASELINE_SCHEMAS_SHA=(none)
83
+ BASELINE_PATHS_COUNT=0
84
+ BASELINE_SCHEMAS_COUNT=0
85
+ fi
86
+ NEW_PATHS_SHA=$(jq -cS '(.paths // {})' openapi-new.json | sha256sum | awk '{print $1}')
87
+ NEW_SCHEMAS_SHA=$(jq -cS '(.components.schemas // {})' openapi-new.json | sha256sum | awk '{print $1}')
88
+ NEW_PATHS_COUNT=$(jq -r '(.paths // {}) | keys | length' openapi-new.json)
89
+ NEW_SCHEMAS_COUNT=$(jq -r '(.components.schemas // {}) | keys | length' openapi-new.json)
90
+ echo "BASELINE paths: count=$BASELINE_PATHS_COUNT sha=$BASELINE_PATHS_SHA"
91
+ echo "NEW paths: count=$NEW_PATHS_COUNT sha=$NEW_PATHS_SHA"
92
+ echo "BASELINE schemas: count=$BASELINE_SCHEMAS_COUNT sha=$BASELINE_SCHEMAS_SHA"
93
+ echo "NEW schemas: count=$NEW_SCHEMAS_COUNT sha=$NEW_SCHEMAS_SHA"
94
+
95
+ echo "\n== Key diffs (paths) =="
96
+ if [ -f specs/openapi-baseline.json ]; then
97
+ jq -r '(.paths // {}) | keys | sort[]' specs/openapi-baseline.json > baseline.paths.txt || true
98
+ else
99
+ : > baseline.paths.txt
100
+ fi
101
+ jq -r '(.paths // {}) | keys | sort[]' openapi-new.json > new.paths.txt
102
+ echo "Removed paths (in baseline, not in new):"; comm -23 baseline.paths.txt new.paths.txt || true
103
+ echo "Added paths (in new, not in baseline):"; comm -13 baseline.paths.txt new.paths.txt || true
104
+
105
+ echo "\n== Key diffs (components.schemas) =="
106
+ if [ -f specs/openapi-baseline.json ]; then
107
+ jq -r '(.components.schemas // {}) | keys | sort[]' specs/openapi-baseline.json > baseline.schemas.txt || true
108
+ else
109
+ : > baseline.schemas.txt
110
+ fi
111
+ jq -r '(.components.schemas // {}) | keys | sort[]' openapi-new.json > new.schemas.txt
112
+ echo "Removed schemas (in baseline, not in new):"; comm -23 baseline.schemas.txt new.schemas.txt || true
113
+ echo "Added schemas (in new, not in baseline):"; comm -13 baseline.schemas.txt new.schemas.txt || true
114
+
115
+ - name: Compare normalized specs
116
+ id: diff
117
+ run: |
118
+ if [ "${{ steps.baseline.outputs.missing }}" = "true" ]; then
119
+ echo "changed=true" >> $GITHUB_OUTPUT
120
+ exit 0
121
+ fi
122
+ jq -S 'del(.info.version) | del(.servers)' specs/openapi-baseline.json > baseline.norm.json
123
+ jq -S 'del(.info.version) | del(.servers)' openapi-new.json > new.norm.json
124
+ if diff -q baseline.norm.json new.norm.json >/dev/null 2>&1; then
125
+ echo "changed=false" >> $GITHUB_OUTPUT
126
+ else
127
+ echo "changed=true" >> $GITHUB_OUTPUT
128
+ fi
129
+
130
+ - name: Upload normalized specs
131
+ if: always()
132
+ uses: actions/upload-artifact@v4
133
+ with:
134
+ name: normalized-specs
135
+ path: |
136
+ baseline.norm.json
137
+ new.norm.json
138
+ retention-days: 7
139
+
140
+ release-on-dispatch:
141
+ name: Trigger SDK release (minor)
142
+ needs: detect
143
+ if: needs.detect.outputs.changed == 'true'
144
+ uses: ./.github/workflows/release.yml
145
+ with:
146
+ version_type: minor
147
+ dry_run: ${{ github.event.client_payload.dry_run == true }}
148
+ spec_url: ${{ needs.detect.outputs.spec_url }}
149
+ secrets: inherit
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: amigo_sdk
3
- Version: 0.6.0
3
+ Version: 0.8.0
4
4
  Summary: Amigo AI Python SDK
5
5
  Author: Amigo AI
6
6
  License-File: LICENSE
@@ -0,0 +1 @@
1
+ __version__ = "0.8.0"
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: <stdin>
3
- # timestamp: 2025-08-21T18:24:02+00:00
3
+ # timestamp: 2025-08-21T18:39:42+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -11646,7 +11646,7 @@ class GetConversationMessagesParametersQuery(BaseModel):
11646
11646
  [], description='The IDs of the messages to retrieve.', title='Id'
11647
11647
  )
11648
11648
  message_type: Optional[List[MessageType]] = Field(
11649
- ['agent-message', 'external-event', 'user-message'],
11649
+ ['agent-message', 'user-message', 'external-event'],
11650
11650
  description='The type of messages to retrieve.',
11651
11651
  title='Message Type',
11652
11652
  )
@@ -1,69 +0,0 @@
1
- name: Auto Release (Backend API changes)
2
-
3
- on:
4
- repository_dispatch:
5
- types: [openapi-updated]
6
-
7
- permissions:
8
- contents: write
9
-
10
- jobs:
11
- detect:
12
- name: Detect OpenAPI change
13
- runs-on: ubuntu-latest
14
- outputs:
15
- changed: ${{ steps.diff.outputs.changed }}
16
- spec_url: ${{ steps.spec.outputs.spec_url }}
17
- steps:
18
- - uses: actions/checkout@v4
19
-
20
- - name: Ensure jq
21
- run: sudo apt-get update && sudo apt-get install -y jq
22
-
23
- - name: Resolve spec URL
24
- id: spec
25
- run: |
26
- SPEC_URL="${{ github.event.client_payload.spec_url }}"
27
- if [ -z "$SPEC_URL" ]; then
28
- SPEC_URL="https://api.amigo.ai/v1/openapi.json"
29
- fi
30
- echo "spec_url=$SPEC_URL" >> $GITHUB_OUTPUT
31
-
32
- - name: Fetch current production spec
33
- run: curl -fSL -o openapi-new.json "${{ steps.spec.outputs.spec_url }}"
34
-
35
- - name: Check baseline presence
36
- id: baseline
37
- run: |
38
- mkdir -p specs
39
- if [ ! -f specs/openapi-baseline.json ]; then
40
- echo "missing=true" >> $GITHUB_OUTPUT
41
- else
42
- echo "missing=false" >> $GITHUB_OUTPUT
43
- fi
44
-
45
- - name: Compare normalized specs
46
- id: diff
47
- run: |
48
- if [ "${{ steps.baseline.outputs.missing }}" = "true" ]; then
49
- echo "changed=true" >> $GITHUB_OUTPUT
50
- exit 0
51
- fi
52
- jq -S 'del(.info.version) | del(.servers)' specs/openapi-baseline.json > baseline.norm.json
53
- jq -S 'del(.info.version) | del(.servers)' openapi-new.json > new.norm.json
54
- if diff -q baseline.norm.json new.norm.json >/dev/null 2>&1; then
55
- echo "changed=false" >> $GITHUB_OUTPUT
56
- else
57
- echo "changed=true" >> $GITHUB_OUTPUT
58
- fi
59
-
60
- release-on-dispatch:
61
- name: Trigger SDK release (minor)
62
- needs: detect
63
- if: needs.detect.outputs.changed == 'true'
64
- uses: ./.github/workflows/release.yml
65
- with:
66
- version_type: minor
67
- dry_run: ${{ github.event.client_payload.dry_run == true }}
68
- spec_url: ${{ needs.detect.outputs.spec_url }}
69
- secrets: inherit
@@ -1 +0,0 @@
1
- __version__ = "0.6.0"
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