@applica-software-guru/persona-sdk 0.1.111 → 0.1.112

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.
@@ -0,0 +1,26 @@
1
+ name: CI
2
+
3
+ # Validate su PR: lint + test (il test include la build).
4
+ # Il publish avviene solo al push su main (deploy.yml).
5
+ # Il pipeline Bitbucket non aveva validate su PR: aggiunta in migrazione.
6
+
7
+ on:
8
+ pull_request:
9
+ branches: [main]
10
+
11
+ concurrency:
12
+ group: ci-${{ github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ jobs:
16
+ validate:
17
+ name: Validate
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ - uses: actions/setup-node@v4
22
+ with:
23
+ node-version: 22
24
+ - run: npm ci
25
+ - run: npm run lint
26
+ - run: npm test
@@ -0,0 +1,81 @@
1
+ name: Deploy
2
+
3
+ # Push su main: versione riconciliata su NPM (dist della serie 0.1.x,
4
+ # lo stesso algoritmo della pipeline Bitbucket: patch-max su npm +1)
5
+ # → lint/test (miglioria: il BB non li eseguiva) → build → publish su
6
+ # npm tramite TRUSTED PUBLISHING OIDC (nessun token: GitHub firma ogni
7
+ # publish, configurato su npmjs.com → package → Trusted Publisher)
8
+ # → tag di versione. npm stesso è la guard anti-collisione: rifiuta
9
+ # (403) una versione già pubblicata, il run fallisce senza side-effect.
10
+
11
+ on:
12
+ push:
13
+ branches: [main]
14
+
15
+ concurrency:
16
+ group: npm-publish-persona-sdk-js
17
+ cancel-in-progress: false
18
+
19
+ permissions:
20
+ contents: write # push del tag di versione con GITHUB_TOKEN
21
+ id-token: write # OIDC → npm trusted publishing
22
+
23
+ jobs:
24
+ version:
25
+ name: Calcola versione (riconciliazione su npm, serie 0.1.x)
26
+ runs-on: ubuntu-latest
27
+ outputs:
28
+ version: ${{ steps.v.outputs.version }}
29
+ steps:
30
+ - id: v
31
+ run: |
32
+ PKG="@applica-software-guru/persona-sdk"
33
+ # patch-max sulla serie 0.1 (esclude prerelease), +1 —
34
+ # identico all'algoritmo della pipeline Bitbucket
35
+ NEXT=$(npm view "$PKG" versions --json | node -e '
36
+ const versions = JSON.parse(require("fs").readFileSync(0, "utf8"));
37
+ const prefix = "0.1.";
38
+ const patches = versions
39
+ .filter(v => v.startsWith(prefix) && !v.includes("-"))
40
+ .map(v => Number(v.slice(prefix.length)))
41
+ .filter(Number.isFinite);
42
+ console.log(prefix + (Math.max(...patches, 0) + 1));')
43
+ echo "Prossima versione: ${NEXT}"
44
+ echo "version=${NEXT}" >> "$GITHUB_OUTPUT"
45
+
46
+ publish:
47
+ name: Lint, test, build & publish su npm (OIDC)
48
+ runs-on: ubuntu-latest
49
+ needs: version
50
+ steps:
51
+ - uses: actions/checkout@v4
52
+ - uses: actions/setup-node@v4
53
+ with:
54
+ node-version: 22
55
+ registry-url: 'https://registry.npmjs.org'
56
+ # niente cache npm nei rilasci (recommendation npm per trusted publishing)
57
+ - name: Assicura npm >= 11.5.1 (richiesto per trusted publishing OIDC)
58
+ run: npm install -g npm@^11
59
+ - name: Versiona il package
60
+ run: npm version "${{ needs.version.outputs.version }}" --no-git-tag-version
61
+ - run: npm ci
62
+ - run: npm run lint
63
+ - run: npm test
64
+ - name: Publish su npm (OIDC trusted publishing, nessun token)
65
+ run: npm publish --access public
66
+
67
+ tag-release:
68
+ name: Tag di versione
69
+ runs-on: ubuntu-latest
70
+ needs: [version, publish]
71
+ if: always() && needs.publish.result == 'success'
72
+ steps:
73
+ - uses: actions/checkout@v4
74
+ - name: Crea e pusha il tag
75
+ env:
76
+ VERSION: ${{ needs.version.outputs.version }}
77
+ run: |
78
+ git config user.name "RoBYCoNTe"
79
+ git config user.email "2301162+RoBYCoNTe@users.noreply.github.com"
80
+ git tag -a "${VERSION}" -m "Version ${VERSION}"
81
+ git push origin "${VERSION}"
@@ -0,0 +1,45 @@
1
+ # Migrazione Bitbucket → GitHub Actions
2
+
3
+ Repo migrato da `applicaguru/persona-sdk-js` (Bitbucket) a
4
+ `applica-software-guru/persona-sdk-js` (GitHub, privato) il
5
+ **2026-09-24**.
6
+
7
+ ## Fasi
8
+
9
+ 1. **Validazione locale** — lint (0 errori) + `npm test` (4/4,
10
+ build inclusa). Il pipeline BB non eseguiva test né lint sul push:
11
+ aggiunti in migrazione come miglioramento.
12
+ 2. **Repo GitHub** — creato privato; `main` (`74dc185`) + 46 tag
13
+ (serie `0.1.*` fino a `0.1.111`) + 2 rami WIP pushati tali quali:
14
+ `feature/sip-protocol` (SIP trunks/call-control, 3 commit) e
15
+ `refactor/litellm-model-config` (rimozione union `ModelName`,
16
+ 3 commit). I rami mergiati `feature/harness` e
17
+ `feature/voice-latency` non sono stati ripushati. Invariante
18
+ verificata: Bitbucket ⊆ GitHub (0 commit, 0 tag mancanti).
19
+ 3. **Pipeline** — `deploy.yml` (npm OIDC) + `ci.yml`, cutover.
20
+ 4. **Verifica** — run verde, `0.1.112` su npm, tag git.
21
+
22
+ ## Versioning
23
+
24
+ Alla migrazione le fonti erano **allineate**: npm latest = `0.1.111`
25
+ = tag git max. La formula replica l'algoritmo della pipeline BB
26
+ (patch-max sulla serie `0.1` da `npm view versions` +1; prerelease
27
+ escluse). Prima release GitHub: **`0.1.112`**. npm stesso è la guard
28
+ anti-collisione (rifiuta versioni duplicate). Il consumer principale
29
+ (`persona-cp`, dep `^0.1.110`) resta compatibile.
30
+
31
+ ## Pipeline decisionale (npm)
32
+
33
+ - **push su main** → version (riconciliazione npm) → lint/test →
34
+ **publish OIDC trusted publishing** (nessun token; configurato su
35
+ npmjs.com → package → Trusted Publisher, repo + workflow
36
+ `deploy.yml`) → tag di versione. Come il BB: ogni push su main è
37
+ una release.
38
+ - **PR** → `ci.yml`: validate (lint + test). Nuovo rispetto al BB.
39
+
40
+ ## Decisioni
41
+
42
+ - **Test**: suite esistente (`node --test`, 2 file) eseguita al
43
+ push — il BB la ignorava.
44
+ - **Segreti**: nessuno — OIDC trusted publishing.
45
+ - **Rimosso dal tree nel cutover**: `bitbucket-pipelines.yml`.
package/README.md CHANGED
@@ -1,3 +1,9 @@
1
+ <div align="center">
2
+
3
+ [![Deploy](https://github.com/applica-software-guru/persona-sdk-js/actions/workflows/deploy.yml/badge.svg)](https://github.com/applica-software-guru/persona-sdk-js/actions/workflows/deploy.yml)
4
+
5
+ </div>
6
+
1
7
  # Persona SDK
2
8
 
3
9
  [![npm version](https://img.shields.io/npm/v/@applica-software-guru/persona-sdk)](https://www.npmjs.com/package/@applica-software-guru/persona-sdk)
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@applica-software-guru/persona-sdk",
3
3
  "description": "Official TypeScript SDK for the Persona API — manage agents, sessions, projects, knowledge bases, workflows, triggers and more.",
4
4
  "private": false,
5
- "version": "0.1.111",
5
+ "version": "0.1.112",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "dev": "vite",
@@ -1,20 +0,0 @@
1
- image: node:22
2
-
3
- pipelines:
4
- branches:
5
- main:
6
- - step:
7
- name: Deploy
8
- deployment: Production
9
- script:
10
- - export VERSION_PREFIX=0.1
11
- - export PACKAGE_VERSION=$(npm view @applica-software-guru/persona-sdk versions --json | node -e "const versions = JSON.parse(require('fs').readFileSync(0, 'utf8')); const prefix = process.env.VERSION_PREFIX + '.'; const patches = versions.filter(v => v.startsWith(prefix) && !v.includes('-')).map(v => Number(v.slice(prefix.length))).filter(Number.isFinite); console.log(process.env.VERSION_PREFIX + '.' + (Math.max(...patches, 0) + 1));")
12
- - npm --no-git-tag-version version "$PACKAGE_VERSION" -m "Upgrade to new version"
13
- - npm install
14
- - npm run build
15
- - pipe: atlassian/npm-publish:0.3.2
16
- variables:
17
- NPM_TOKEN: $NPM_TOKEN
18
- EXTRA_ARGS: '--access public'
19
- - git tag -a "$PACKAGE_VERSION" -m "Version $PACKAGE_VERSION"
20
- - git push origin "$PACKAGE_VERSION"