@easynet/agent-runtime 1.0.2 → 1.0.3
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.
|
@@ -43,25 +43,33 @@ jobs:
|
|
|
43
43
|
grep -q '@wallee:registry=' .npmrc || echo "@wallee:registry=https://registry.npmjs.org/" >> .npmrc
|
|
44
44
|
|
|
45
45
|
- name: Use @easynet deps from npm (CI has no file:../)
|
|
46
|
+
env:
|
|
47
|
+
AGENT_SKILL_READ_TOKEN: ${{ secrets.AGENT_SKILL_READ_TOKEN }}
|
|
48
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
46
49
|
run: |
|
|
47
50
|
node -e "
|
|
48
51
|
const fs = require('fs');
|
|
49
52
|
const pkgPath = 'package.json';
|
|
50
53
|
const p = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
54
|
+
const deps = { ...p.dependencies, ...p.devDependencies };
|
|
55
|
+
const token = process.env.AGENT_SKILL_READ_TOKEN || process.env.GITHUB_TOKEN || '';
|
|
56
|
+
if (!token) {
|
|
57
|
+
console.error('Missing AGENT_SKILL_READ_TOKEN (or GITHUB_TOKEN) for @easynet/agent-skill private dependency.');
|
|
58
|
+
process.exit(1);
|
|
59
|
+
}
|
|
51
60
|
let changed = false;
|
|
52
|
-
for (const
|
|
53
|
-
if (
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
61
|
+
for (const [name, v] of Object.entries(deps)) {
|
|
62
|
+
if (name.startsWith('@easynet/') && typeof v === 'string' && v.startsWith('file:')) {
|
|
63
|
+
const resolved = name === '@easynet/agent-skill'
|
|
64
|
+
? ('git+https://x-access-token:' + token + '@github.com/easynet-world/agent-skill.git#master')
|
|
65
|
+
: 'latest';
|
|
66
|
+
if (p.dependencies[name]) { p.dependencies[name] = resolved; changed = true; }
|
|
67
|
+
if (p.devDependencies[name]) { p.devDependencies[name] = resolved; changed = true; }
|
|
59
68
|
}
|
|
60
69
|
}
|
|
61
70
|
if (changed) fs.writeFileSync(pkgPath, JSON.stringify(p, null, 2) + '\n');
|
|
62
71
|
"
|
|
63
|
-
|
|
64
|
-
- name: Remove lockfile to avoid stale local/git refs
|
|
72
|
+
- name: Remove lockfile to avoid stale ssh git refs
|
|
65
73
|
run: rm -f package-lock.json
|
|
66
74
|
|
|
67
75
|
- name: Install dependencies
|
|
@@ -83,3 +91,28 @@ jobs:
|
|
|
83
91
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
84
92
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
85
93
|
run: npx semantic-release
|
|
94
|
+
|
|
95
|
+
notify-itermbot:
|
|
96
|
+
name: Trigger botbotgo/iTermBot
|
|
97
|
+
runs-on: ubuntu-latest
|
|
98
|
+
needs: release
|
|
99
|
+
if: success()
|
|
100
|
+
steps:
|
|
101
|
+
- name: Dispatch iTermBot rebuild/release
|
|
102
|
+
env:
|
|
103
|
+
DOWNSTREAM_DISPATCH_TOKEN: ${{ secrets.DOWNSTREAM_DISPATCH_TOKEN }}
|
|
104
|
+
run: |
|
|
105
|
+
set -euo pipefail
|
|
106
|
+
if [ -z "${DOWNSTREAM_DISPATCH_TOKEN:-}" ]; then
|
|
107
|
+
echo "Skipping downstream dispatch: DOWNSTREAM_DISPATCH_TOKEN not set."
|
|
108
|
+
exit 0
|
|
109
|
+
fi
|
|
110
|
+
|
|
111
|
+
payload=$(printf '{"event_type":"easynet-package-updated","client_payload":{"source_repo":"%s","source_ref":"%s","source_sha":"%s","source_run_id":"%s"}}' "${{ github.repository }}" "${{ github.ref_name }}" "${{ github.sha }}" "${{ github.run_id }}")
|
|
112
|
+
|
|
113
|
+
curl -fsSL -X POST \
|
|
114
|
+
-H "Accept: application/vnd.github+json" \
|
|
115
|
+
-H "Authorization: Bearer ${DOWNSTREAM_DISPATCH_TOKEN}" \
|
|
116
|
+
-H "X-GitHub-Api-Version: 2022-11-28" \
|
|
117
|
+
"https://api.github.com/repos/botbotgo/iTermBot/dispatches" \
|
|
118
|
+
-d "${payload}"
|