adaptive-memory-multi-model-router 2.15.5 → 2.16.1
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.
- package/.github/workflows/auto-submit-sitemap.yml +41 -0
- package/.github/workflows/mcp-pypi-publish.yml +34 -0
- package/.github/workflows/pypi-publish.yml +61 -17
- package/.github/workflows/tmlpd-publish.yml +23 -0
- package/README.md +181 -207
- package/RELEASE_v2.16.0.md +149 -0
- package/TECHNICAL_README.md +253 -0
- package/discoverability-diagnosis.md +280 -0
- package/dist/analytics/costAnalytics.d.ts.map +1 -1
- package/dist/benchmark/reproducible.d.ts.map +1 -1
- package/dist/cache/semanticCache.d.ts.map +1 -1
- package/dist/cli/setupWizard.d.ts +257 -50
- package/dist/cli/setupWizard.d.ts.map +1 -1
- package/dist/cli/setupWizard.js +419 -109
- package/dist/cli/setupWizard.js.map +1 -1
- package/dist/cli/tui.js +96 -67
- package/dist/cli.js +9 -0
- package/dist/cost/budgetEnforcer.d.ts.map +1 -1
- package/dist/cost/costTracker.d.ts.map +1 -1
- package/dist/ensemble/multiRoundDialog.d.ts.map +1 -1
- package/dist/ensemble/shapleyValue.d.ts.map +1 -1
- package/dist/ensemble.d.ts +1 -1
- package/dist/ensemble.js +141 -0
- package/dist/integrations/langchainAdapter.d.ts.map +1 -1
- package/dist/integrations/langchainAdapter.js +3 -3
- package/dist/integrations/langchainAdapter.js.map +1 -1
- package/dist/integrations/oauth.d.ts.map +1 -1
- package/dist/integrations/scienceAdapter.d.ts.map +1 -1
- package/dist/memory/autoFetch.d.ts.map +1 -1
- package/dist/memory/hybridMemory.d.ts.map +1 -1
- package/dist/memory/memoryTree.d.ts.map +1 -1
- package/dist/memory/obsidianVault.d.ts.map +1 -1
- package/dist/memory/reasoningBank.d.ts.map +1 -1
- package/dist/observability/metrics.d.ts.map +1 -1
- package/dist/observability/tracer.d.ts.map +1 -1
- package/dist/providers/providerConfig.d.ts.map +1 -1
- package/dist/providers/providerConfig.js +32 -17
- package/dist/providers/providerConfig.js.map +1 -1
- package/dist/routing/advancedRouter.d.ts.map +1 -1
- package/dist/routing/advancedRouter.js +106 -14
- package/dist/routing/advancedRouter.js.map +1 -1
- package/dist/routing/providerHealth.d.ts.map +1 -1
- package/dist/routing/providerRetry.d.ts.map +1 -1
- package/dist/routing/shadowSampler.js.map +1 -1
- package/dist/security/guardrails.d.ts.map +1 -1
- package/dist/server/handlers/chatHandler.d.ts.map +1 -1
- package/dist/server/handlers/completionsHandler.d.ts.map +1 -1
- package/dist/server/handlers/embeddingsHandler.d.ts.map +1 -1
- package/dist/server/handlers/healthHandler.d.ts.map +1 -1
- package/dist/server/handlers/metricsHandler.d.ts.map +1 -1
- package/dist/server/handlers/modelsHandler.d.ts.map +1 -1
- package/dist/server/metrics.d.ts.map +1 -1
- package/dist/server/proxyServer.d.ts.map +1 -1
- package/dist/server/router.d.ts.map +1 -1
- package/dist/server/state.d.ts.map +1 -1
- package/dist/skills/__tests__/skill_manager.test.js +5 -265
- package/dist/skills/__tests__/skill_manager.test.js.map +1 -1
- package/dist/utils/tokenUtils.d.ts.map +1 -1
- package/docs/ARTICLE_Biology_Inspired_Routing.md +208 -0
- package/docs/ARTICLE_Master.md +78 -0
- package/docs/ARTICLE_Master_CN.md +78 -0
- package/docs/ARTICLE_OpenRouter_Stripe.md +140 -0
- package/docs/DEVPTO_ARTICLE.md +84 -0
- package/docs/HUMAN_STYLE_GUIDE.md +75 -0
- package/docs/IMPRINT_PLAN.md +88 -0
- package/docs/OPENROUTER_ALTERNATIVE.md +184 -0
- package/docs/SOCIAL_CAMPAIGN.md +316 -0
- package/docs/anthropic.html +45 -0
- package/docs/best-llm-routers-2025.html +157 -0
- package/docs/cerebras.html +43 -0
- package/docs/cli-cheatsheet.md +286 -212
- package/docs/deepseek.html +44 -0
- package/docs/google.html +47 -0
- package/docs/groq.html +44 -0
- package/docs/mistral.html +43 -0
- package/docs/ollama.html +50 -0
- package/docs/openai.html +57 -0
- package/docs/sitemap.xml +69 -57
- package/docs-site/blog/best-llm-routers-2025.html +157 -0
- package/docs-site/index.html +59 -0
- package/docs-site/providers/anthropic.html +45 -0
- package/docs-site/providers/cerebras.html +43 -0
- package/docs-site/providers/deepseek.html +44 -0
- package/docs-site/providers/google.html +47 -0
- package/docs-site/providers/groq.html +44 -0
- package/docs-site/providers/index.html +41 -0
- package/docs-site/providers/mistral.html +43 -0
- package/docs-site/providers/ollama.html +50 -0
- package/docs-site/providers/openai.html +57 -0
- package/docs-site/sitemap.xml +69 -0
- package/package.json +36 -124
- package/python/README.md +33 -106
- package/python/mcp-server/a3m_mcp/__init__.py +20 -10
- package/python/mcp-server/a3m_mcp/server.py +172 -306
- package/python/pyproject.toml +6 -3
- package/scripts/submit-sitemap.sh +52 -0
- package/src/__types__/registry.d.ts +14 -0
- package/src/cli/setupWizard.ts +443 -112
- package/src/cli/tui.ts +159 -0
- package/src/ensemble.ts +154 -1
- package/src/integrations/langchainAdapter.ts +2 -2
- package/src/providers/providerConfig.ts +32 -17
- package/src/providers/registry.js +27 -0
- package/src/routing/advancedRouter.ts +99 -14
- package/src/routing/shadowSampler.ts +1 -1
- package/test-install/package.json +12 -0
- package/tests/tsconfig.json +0 -1
- package/tmlpd-pi-extension/README.md +105 -44
- package/tmlpd-pi-extension/docs/demo.svg +33 -0
- package/tmlpd-pi-extension/package.json +35 -106
- package/tmlpd-pi-extension/src/tokenOptimization/contextStratifier.ts +163 -0
- package/tmlpd-pi-extension/src/tokenOptimization/fetchOnceLocal.ts +136 -0
- package/tmlpd-pi-extension/src/tokenOptimization/index.ts +197 -0
- package/tmlpd-pi-extension/src/tokenOptimization/interAgentCompression.ts +157 -0
- package/tmlpd-pi-extension/src/tokenOptimization/schemaContract.ts +101 -0
- package/tmlpd-pi-extension/src/tokenOptimization/semanticCache.ts +248 -0
- package/tmlpd-pi-extension/src/tokenOptimization/tokenAwareFallback.ts +192 -0
- package/tmlpd-pi-extension/test/verify.js +21 -0
- package/tsconfig.build.json +2 -0
- package/packages/a3m-vercel-ai/dist/a3m-language-model.d.ts +0 -12
- package/packages/a3m-vercel-ai/dist/a3m-language-model.d.ts.map +0 -1
- package/packages/a3m-vercel-ai/dist/a3m-language-model.js +0 -289
- package/packages/a3m-vercel-ai/dist/a3m-language-model.js.map +0 -1
- package/packages/a3m-vercel-ai/dist/index.d.ts +0 -82
- package/packages/a3m-vercel-ai/dist/index.d.ts.map +0 -1
- package/packages/a3m-vercel-ai/dist/index.js +0 -79
- package/packages/a3m-vercel-ai/dist/index.js.map +0 -1
- package/packages/a3m-vercel-ai/dist/types.d.ts +0 -97
- package/packages/a3m-vercel-ai/dist/types.d.ts.map +0 -1
- package/packages/a3m-vercel-ai/dist/types.js +0 -5
- package/packages/a3m-vercel-ai/dist/types.js.map +0 -1
- package/python/a3m_router.egg-info/PKG-INFO +0 -172
- package/python/a3m_router.egg-info/SOURCES.txt +0 -17
- package/python/a3m_router.egg-info/dependency_links.txt +0 -1
- package/python/a3m_router.egg-info/requires.txt +0 -24
- package/python/a3m_router.egg-info/top_level.txt +0 -1
- package/python/dist/a3m_router-2.2.1-py3-none-any.whl +0 -0
- package/python/dist/a3m_router-2.2.1.tar.gz +0 -0
- package/python/dist/a3m_router-2.2.2-py3-none-any.whl +0 -0
- package/python/dist/a3m_router-2.2.2.tar.gz +0 -0
- package/src/skills/__tests__/skill_manager.test.ts +0 -328
- package/tmlpd-pi-extension/dist/cache/prefixCache.d.ts +0 -114
- package/tmlpd-pi-extension/dist/cache/prefixCache.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/cache/prefixCache.js +0 -285
- package/tmlpd-pi-extension/dist/cache/prefixCache.js.map +0 -1
- package/tmlpd-pi-extension/dist/cache/responseCache.d.ts +0 -58
- package/tmlpd-pi-extension/dist/cache/responseCache.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/cache/responseCache.js +0 -153
- package/tmlpd-pi-extension/dist/cache/responseCache.js.map +0 -1
- package/tmlpd-pi-extension/dist/cli.js +0 -59
- package/tmlpd-pi-extension/dist/cost/costTracker.d.ts +0 -95
- package/tmlpd-pi-extension/dist/cost/costTracker.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/cost/costTracker.js +0 -240
- package/tmlpd-pi-extension/dist/cost/costTracker.js.map +0 -1
- package/tmlpd-pi-extension/dist/index.d.ts +0 -723
- package/tmlpd-pi-extension/dist/index.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/index.js +0 -239
- package/tmlpd-pi-extension/dist/index.js.map +0 -1
- package/tmlpd-pi-extension/dist/memory/episodicMemory.d.ts +0 -82
- package/tmlpd-pi-extension/dist/memory/episodicMemory.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/memory/episodicMemory.js +0 -145
- package/tmlpd-pi-extension/dist/memory/episodicMemory.js.map +0 -1
- package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.d.ts +0 -102
- package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.js +0 -207
- package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.js.map +0 -1
- package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.d.ts +0 -85
- package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.js +0 -210
- package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.js.map +0 -1
- package/tmlpd-pi-extension/dist/providers/localProvider.d.ts +0 -102
- package/tmlpd-pi-extension/dist/providers/localProvider.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/providers/localProvider.js +0 -338
- package/tmlpd-pi-extension/dist/providers/localProvider.js.map +0 -1
- package/tmlpd-pi-extension/dist/providers/registry.d.ts +0 -55
- package/tmlpd-pi-extension/dist/providers/registry.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/providers/registry.js +0 -138
- package/tmlpd-pi-extension/dist/providers/registry.js.map +0 -1
- package/tmlpd-pi-extension/dist/routing/advancedRouter.d.ts +0 -68
- package/tmlpd-pi-extension/dist/routing/advancedRouter.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/routing/advancedRouter.js +0 -332
- package/tmlpd-pi-extension/dist/routing/advancedRouter.js.map +0 -1
- package/tmlpd-pi-extension/dist/tools/tmlpdTools.d.ts +0 -101
- package/tmlpd-pi-extension/dist/tools/tmlpdTools.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/tools/tmlpdTools.js +0 -368
- package/tmlpd-pi-extension/dist/tools/tmlpdTools.js.map +0 -1
- package/tmlpd-pi-extension/dist/utils/batchProcessor.d.ts +0 -96
- package/tmlpd-pi-extension/dist/utils/batchProcessor.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/utils/batchProcessor.js +0 -170
- package/tmlpd-pi-extension/dist/utils/batchProcessor.js.map +0 -1
- package/tmlpd-pi-extension/dist/utils/compression.d.ts +0 -61
- package/tmlpd-pi-extension/dist/utils/compression.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/utils/compression.js +0 -281
- package/tmlpd-pi-extension/dist/utils/compression.js.map +0 -1
- package/tmlpd-pi-extension/dist/utils/reliability.d.ts +0 -74
- package/tmlpd-pi-extension/dist/utils/reliability.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/utils/reliability.js +0 -177
- package/tmlpd-pi-extension/dist/utils/reliability.js.map +0 -1
- package/tmlpd-pi-extension/dist/utils/speculativeDecoding.d.ts +0 -117
- package/tmlpd-pi-extension/dist/utils/speculativeDecoding.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/utils/speculativeDecoding.js +0 -246
- package/tmlpd-pi-extension/dist/utils/speculativeDecoding.js.map +0 -1
- package/tmlpd-pi-extension/dist/utils/tokenUtils.d.ts +0 -50
- package/tmlpd-pi-extension/dist/utils/tokenUtils.d.ts.map +0 -1
- package/tmlpd-pi-extension/dist/utils/tokenUtils.js +0 -124
- package/tmlpd-pi-extension/dist/utils/tokenUtils.js.map +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Auto-Submit Sitemap
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
# Run every Monday at 4 AM UTC
|
|
6
|
+
- cron: '0 4 * * 1'
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
sitemap:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Submit sitemap to search engines
|
|
14
|
+
run: |
|
|
15
|
+
SITEMAP_URL="https://a3m-router.com/sitemap.xml"
|
|
16
|
+
echo "=== Sitemap Submission ==="
|
|
17
|
+
|
|
18
|
+
# Google
|
|
19
|
+
echo "[1/3] Submitting to Google..."
|
|
20
|
+
curl -s -o /dev/null -w "Google: HTTP %{http_code}\n" \
|
|
21
|
+
"https://www.google.com/ping?sitemap=$SITEMAP_URL"
|
|
22
|
+
|
|
23
|
+
# Bing
|
|
24
|
+
echo "[2/3] Submitting to Bing..."
|
|
25
|
+
curl -s -o /dev/null -w "Bing: HTTP %{http_code}\n" \
|
|
26
|
+
"https://www.bing.com/ping?sitemap=$SITEMAP_URL"
|
|
27
|
+
|
|
28
|
+
# IndexNow (if key configured)
|
|
29
|
+
if [ -n "${{ vars.INDEXNOW_KEY }}" ]; then
|
|
30
|
+
echo "[3/3] Submitting to IndexNow..."
|
|
31
|
+
curl -s "$SITEMAP_URL" | grep -oP '(?<=<loc>)[^<]+' | while read -r url; do
|
|
32
|
+
curl -s -o /dev/null -w "IndexNow: $url → HTTP %{http_code}\n" -X POST \
|
|
33
|
+
"https://indexnow.org/ping" \
|
|
34
|
+
-H "Content-Type: text/plain" \
|
|
35
|
+
-d "url=$url&key=${{ vars.INDEXNOW_KEY }}"
|
|
36
|
+
done
|
|
37
|
+
else
|
|
38
|
+
echo "[3/3] Skipped: INDEXNOW_KEY not configured"
|
|
39
|
+
fi
|
|
40
|
+
env:
|
|
41
|
+
SITEMAP_URL: https://a3m-router.com/sitemap.xml
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Publish MCP Server to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [created]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
|
|
14
|
+
- name: Set up Python
|
|
15
|
+
uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: '3.11'
|
|
18
|
+
|
|
19
|
+
- name: Install dependencies
|
|
20
|
+
run: |
|
|
21
|
+
python -m pip install build twine
|
|
22
|
+
|
|
23
|
+
- name: Build MCP Server package
|
|
24
|
+
run: |
|
|
25
|
+
cd python/mcp-server
|
|
26
|
+
python -m build
|
|
27
|
+
|
|
28
|
+
- name: Publish to PyPI
|
|
29
|
+
env:
|
|
30
|
+
TWINE_USERNAME: __token__
|
|
31
|
+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
32
|
+
run: |
|
|
33
|
+
cd python/mcp-server
|
|
34
|
+
python -m twine upload --verbose dist/*
|
|
@@ -21,25 +21,43 @@ jobs:
|
|
|
21
21
|
environment:
|
|
22
22
|
name: testpypi
|
|
23
23
|
url: https://test.pypi.org/projects/a3m-router
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
steps:
|
|
26
26
|
- uses: actions/checkout@v4
|
|
27
|
-
|
|
27
|
+
|
|
28
28
|
- name: Set up Python
|
|
29
29
|
uses: actions/setup-python@v5
|
|
30
30
|
with:
|
|
31
31
|
python-version: '3.11'
|
|
32
|
-
|
|
32
|
+
|
|
33
33
|
- name: Install dependencies
|
|
34
34
|
run: |
|
|
35
|
-
python -m pip install build twine
|
|
36
|
-
|
|
35
|
+
python -m pip install build twine toml
|
|
36
|
+
|
|
37
|
+
- name: Get version
|
|
38
|
+
id: version
|
|
39
|
+
run: |
|
|
40
|
+
VERSION=$(python -c "import toml; print(toml.load('python/pyproject.toml')['project']['version'])")
|
|
41
|
+
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
42
|
+
|
|
43
|
+
- name: Check if version exists on Test PyPI
|
|
44
|
+
id: exists-testpypi
|
|
45
|
+
run: |
|
|
46
|
+
EXISTS=$(curl -s "https://test.pypi.org/pypi/a3m-router/${{ steps.version.outputs.version }}/json" | python3 -c "import sys,json; d=json.load(sys.stdin); print('yes' if d.get('info',{}).get('version') == '${{ steps.version.outputs.version }}' else 'no')" 2>/dev/null || echo "no")
|
|
47
|
+
echo "exists=$EXISTS" >> $GITHUB_OUTPUT
|
|
48
|
+
echo "Version ${{ steps.version.outputs.version }} on Test PyPI: $EXISTS"
|
|
49
|
+
if [ "$EXISTS" == "yes" ]; then
|
|
50
|
+
echo "SKIP_UPLOAD=true" >> $GITHUB_OUTPUT
|
|
51
|
+
fi
|
|
52
|
+
|
|
37
53
|
- name: Build package
|
|
54
|
+
if: steps.exists-testpypi.outputs.SKIP_UPLOAD != 'true'
|
|
38
55
|
run: |
|
|
39
56
|
cd python
|
|
40
57
|
python -m build
|
|
41
|
-
|
|
58
|
+
|
|
42
59
|
- name: Publish to Test PyPI
|
|
60
|
+
if: steps.exists-testpypi.outputs.SKIP_UPLOAD != 'true'
|
|
43
61
|
env:
|
|
44
62
|
TWINE_USERNAME: __token__
|
|
45
63
|
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_TOKEN }}
|
|
@@ -47,56 +65,82 @@ jobs:
|
|
|
47
65
|
cd python
|
|
48
66
|
python -m twine upload --repository testpypi dist/*
|
|
49
67
|
|
|
68
|
+
- name: Already published notice
|
|
69
|
+
if: steps.exists-testpypi.outputs.SKIP_UPLOAD == 'true'
|
|
70
|
+
run: echo "Version ${{ steps.version.outputs.version }} already exists on Test PyPI — skipping upload"
|
|
71
|
+
|
|
50
72
|
publish-pypi:
|
|
51
73
|
if: github.event.inputs.environment == 'prod' || github.event_name == 'release'
|
|
52
74
|
runs-on: ubuntu-latest
|
|
53
75
|
environment:
|
|
54
76
|
name: pypi
|
|
55
77
|
url: https://pypi.org/projects/a3m-router
|
|
56
|
-
|
|
78
|
+
|
|
57
79
|
steps:
|
|
58
80
|
- uses: actions/checkout@v4
|
|
59
|
-
|
|
81
|
+
|
|
60
82
|
- name: Set up Python
|
|
61
83
|
uses: actions/setup-python@v5
|
|
62
84
|
with:
|
|
63
85
|
python-version: '3.11'
|
|
64
|
-
|
|
86
|
+
|
|
65
87
|
- name: Install dependencies
|
|
66
88
|
run: |
|
|
67
|
-
python -m pip install build twine
|
|
68
|
-
|
|
89
|
+
python -m pip install build twine toml
|
|
90
|
+
|
|
91
|
+
- name: Get version
|
|
92
|
+
id: version
|
|
93
|
+
run: |
|
|
94
|
+
VERSION=$(python -c "import toml; print(toml.load('python/pyproject.toml')['project']['version'])")
|
|
95
|
+
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
96
|
+
|
|
97
|
+
- name: Check if version exists on PyPI
|
|
98
|
+
id: exists-pypi
|
|
99
|
+
run: |
|
|
100
|
+
EXISTS=$(curl -s "https://pypi.org/pypi/a3m-router/${{ steps.version.outputs.version }}/json" | python3 -c "import sys,json; d=json.load(sys.stdin); print('yes' if d.get('info',{}).get('version') == '${{ steps.version.outputs.version }}' else 'no')" 2>/dev/null || echo "no")
|
|
101
|
+
echo "exists=$EXISTS" >> $GITHUB_OUTPUT
|
|
102
|
+
echo "Version ${{ steps.version.outputs.version }} on PyPI: $EXISTS"
|
|
103
|
+
if [ "$EXISTS" == "yes" ]; then
|
|
104
|
+
echo "SKIP_UPLOAD=true" >> $GITHUB_OUTPUT
|
|
105
|
+
fi
|
|
106
|
+
|
|
69
107
|
- name: Build package
|
|
108
|
+
if: steps.exists-pypi.outputs.SKIP_UPLOAD != 'true'
|
|
70
109
|
run: |
|
|
71
110
|
cd python
|
|
72
111
|
python -m build
|
|
73
|
-
|
|
112
|
+
|
|
74
113
|
- name: Publish to PyPI
|
|
114
|
+
if: steps.exists-pypi.outputs.SKIP_UPLOAD != 'true'
|
|
75
115
|
env:
|
|
76
116
|
TWINE_USERNAME: __token__
|
|
77
117
|
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
|
78
118
|
run: |
|
|
79
119
|
cd python
|
|
80
|
-
python -m twine upload
|
|
120
|
+
python -m twine upload dist/*
|
|
121
|
+
|
|
122
|
+
- name: Already published notice
|
|
123
|
+
if: steps.exists-pypi.outputs.SKIP_UPLOAD == 'true'
|
|
124
|
+
run: echo "Version ${{ steps.version.outputs.version }} already exists on PyPI — skipping upload"
|
|
81
125
|
|
|
82
126
|
test-package:
|
|
83
127
|
runs-on: ubuntu-latest
|
|
84
128
|
needs: publish-testpypi
|
|
85
|
-
|
|
129
|
+
|
|
86
130
|
steps:
|
|
87
131
|
- uses: actions/checkout@v4
|
|
88
|
-
|
|
132
|
+
|
|
89
133
|
- name: Set up Python
|
|
90
134
|
uses: actions/setup-python@v5
|
|
91
135
|
with:
|
|
92
136
|
python-version: '3.11'
|
|
93
|
-
|
|
137
|
+
|
|
94
138
|
- name: Install from Test PyPI
|
|
95
139
|
env:
|
|
96
140
|
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_TOKEN }}
|
|
97
141
|
run: |
|
|
98
142
|
pip install --index-url https://test.pypi.org/simple/ a3m-router
|
|
99
|
-
|
|
143
|
+
|
|
100
144
|
- name: Test import
|
|
101
145
|
run: |
|
|
102
146
|
python -c "from a3m import A3MRouter, __version__; print(f'A3M Router SDK v{__version__} installed successfully!')"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: tmlpd-pi Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
release:
|
|
6
|
+
types: [created]
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish-tmlpd:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: actions/setup-node@v4
|
|
14
|
+
with:
|
|
15
|
+
node-version: 20
|
|
16
|
+
registry-url: https://registry.npmjs.org/
|
|
17
|
+
- name: Publish tmlpd-pi
|
|
18
|
+
working-directory: ./tmlpd-pi-extension
|
|
19
|
+
run: |
|
|
20
|
+
node -e "const p=require('./package.json'); console.log('Publishing tmlpd-pi@'+p.version)"
|
|
21
|
+
npm publish
|
|
22
|
+
env:
|
|
23
|
+
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
|