@easynet/agent-runtime 1.0.1 → 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.
@@ -5,6 +5,9 @@ on:
5
5
  branches: ['**']
6
6
  pull_request:
7
7
  branches: ['**']
8
+ repository_dispatch:
9
+ types:
10
+ - easynet-package-updated
8
11
 
9
12
  concurrency:
10
13
  group: ${{ github.workflow }}-${{ github.ref }}
@@ -5,6 +5,9 @@ on:
5
5
  branches:
6
6
  - master
7
7
  workflow_dispatch:
8
+ repository_dispatch:
9
+ types:
10
+ - easynet-package-updated
8
11
 
9
12
  concurrency:
10
13
  group: ${{ github.workflow }}-${{ github.ref }}
@@ -40,25 +43,33 @@ jobs:
40
43
  grep -q '@wallee:registry=' .npmrc || echo "@wallee:registry=https://registry.npmjs.org/" >> .npmrc
41
44
 
42
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 }}
43
49
  run: |
44
50
  node -e "
45
51
  const fs = require('fs');
46
52
  const pkgPath = 'package.json';
47
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
+ }
48
60
  let changed = false;
49
- for (const section of ['dependencies', 'devDependencies']) {
50
- if (!p[section]) continue;
51
- for (const [name, v] of Object.entries(p[section])) {
52
- if (name.startsWith('@easynet/') && typeof v === 'string' && v.startsWith('file:')) {
53
- p[section][name] = 'latest';
54
- changed = true;
55
- }
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; }
56
68
  }
57
69
  }
58
70
  if (changed) fs.writeFileSync(pkgPath, JSON.stringify(p, null, 2) + '\n');
59
71
  "
60
-
61
- - name: Remove lockfile to avoid stale local/git refs
72
+ - name: Remove lockfile to avoid stale ssh git refs
62
73
  run: rm -f package-lock.json
63
74
 
64
75
  - name: Install dependencies
@@ -80,3 +91,28 @@ jobs:
80
91
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81
92
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
82
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}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easynet/agent-runtime",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Agent runtime factories: ReAct (LangChain), Deep (DeepAgents), sub-agent, and CLI runner",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",