@xn-intenton-z2a/agentic-lib 7.2.10 → 7.2.12
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.
|
@@ -2,15 +2,12 @@
|
|
|
2
2
|
# Copyright (C) 2025-2026 Polycode Limited
|
|
3
3
|
# .github/workflows/agentic-lib-init.yml
|
|
4
4
|
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
# In agentic-lib: schedule trigger is commented out.
|
|
10
|
-
# During init: #@dist restores the schedule.
|
|
5
|
+
# Init: delegates to agentic-lib-update.yml for the update step, then
|
|
6
|
+
# optionally reseeds or purges user content and configures schedule/model.
|
|
7
|
+
# Commits and pushes to main [skip ci].
|
|
11
8
|
|
|
12
9
|
name: agentic-lib-init
|
|
13
|
-
run-name: "agentic-lib-init [${{ github.ref_name }}]"
|
|
10
|
+
run-name: "agentic-lib-init ${{ inputs.mode || 'update' }} [${{ github.ref_name }}]"
|
|
14
11
|
|
|
15
12
|
on:
|
|
16
13
|
workflow_call:
|
|
@@ -120,49 +117,27 @@ on:
|
|
|
120
117
|
permissions: write-all
|
|
121
118
|
|
|
122
119
|
jobs:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
run: |
|
|
130
|
-
MODE='${{ inputs.mode }}'
|
|
131
|
-
echo "mode=${MODE:-update}" >> $GITHUB_OUTPUT
|
|
132
|
-
DRY_RUN='${{ inputs.dry-run }}'
|
|
133
|
-
echo "dry-run=${DRY_RUN:-false}" >> $GITHUB_OUTPUT
|
|
134
|
-
MISSION_SEED='${{ inputs.mission-seed }}'
|
|
135
|
-
echo "mission-seed=${MISSION_SEED:-hamming-distance}" >> $GITHUB_OUTPUT
|
|
136
|
-
MISSION_TEXT='${{ inputs.mission-text }}'
|
|
137
|
-
echo "mission-text=${MISSION_TEXT}" >> $GITHUB_OUTPUT
|
|
138
|
-
SCHEDULE='${{ inputs.schedule }}'
|
|
139
|
-
echo "schedule=${SCHEDULE}" >> $GITHUB_OUTPUT
|
|
140
|
-
MODEL='${{ inputs.model }}'
|
|
141
|
-
echo "model=${MODEL:-gpt-5-mini}" >> $GITHUB_OUTPUT
|
|
142
|
-
PROFILE='${{ inputs.profile }}'
|
|
143
|
-
echo "profile=${PROFILE}" >> $GITHUB_OUTPUT
|
|
144
|
-
outputs:
|
|
145
|
-
mode: ${{ steps.normalise.outputs.mode }}
|
|
146
|
-
dry-run: ${{ steps.normalise.outputs.dry-run }}
|
|
147
|
-
mission-seed: ${{ steps.normalise.outputs.mission-seed }}
|
|
148
|
-
mission-text: ${{ steps.normalise.outputs.mission-text }}
|
|
149
|
-
schedule: ${{ steps.normalise.outputs.schedule }}
|
|
150
|
-
model: ${{ steps.normalise.outputs.model }}
|
|
151
|
-
profile: ${{ steps.normalise.outputs.profile }}
|
|
120
|
+
# Step 1: Update agentic-lib and infrastructure (commits to main)
|
|
121
|
+
update:
|
|
122
|
+
uses: ./.github/workflows/agentic-lib-update.yml
|
|
123
|
+
with:
|
|
124
|
+
dry-run: ${{ inputs.dry-run || 'false' }}
|
|
125
|
+
secrets: inherit
|
|
152
126
|
|
|
127
|
+
# Step 2: Reseed/purge and configure (only if mode != update)
|
|
153
128
|
init:
|
|
154
|
-
needs:
|
|
129
|
+
needs: update
|
|
130
|
+
if: inputs.mode == 'reseed' || inputs.mode == 'purge'
|
|
155
131
|
runs-on: ubuntu-latest
|
|
156
132
|
env:
|
|
157
|
-
INIT_MODE: ${{
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
INIT_MISSION_TEXT: ${{ needs.params.outputs.mission-text }}
|
|
133
|
+
INIT_MODE: ${{ inputs.mode }}
|
|
134
|
+
INIT_MISSION_SEED: ${{ inputs.mission-seed || 'hamming-distance' }}
|
|
135
|
+
INIT_MISSION_TEXT: ${{ inputs.mission-text }}
|
|
161
136
|
steps:
|
|
162
137
|
- uses: actions/checkout@v6
|
|
163
|
-
if:
|
|
138
|
+
if: inputs.dry-run == 'true' || inputs.dry-run == true
|
|
164
139
|
- uses: actions/checkout@v6
|
|
165
|
-
if:
|
|
140
|
+
if: inputs.dry-run != 'true' && inputs.dry-run != true
|
|
166
141
|
with:
|
|
167
142
|
ref: main
|
|
168
143
|
token: ${{ secrets.WORKFLOW_TOKEN }}
|
|
@@ -172,11 +147,10 @@ jobs:
|
|
|
172
147
|
node-version: "24"
|
|
173
148
|
|
|
174
149
|
- name: Close hanging init PRs
|
|
175
|
-
if: github.repository != 'xn-intenton-z2a/agentic-lib' && env.INIT_MODE == 'purge' &&
|
|
150
|
+
if: github.repository != 'xn-intenton-z2a/agentic-lib' && env.INIT_MODE == 'purge' && inputs.dry-run != 'true' && inputs.dry-run != true
|
|
176
151
|
env:
|
|
177
152
|
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
|
|
178
153
|
run: |
|
|
179
|
-
# Close any open PRs from previous init runs
|
|
180
154
|
gh pr list --state open --json number,headRefName \
|
|
181
155
|
--jq '.[] | select(.headRefName | startswith("agentic-lib-init-")) | .number' \
|
|
182
156
|
| while read -r pr_num; do
|
|
@@ -184,18 +158,15 @@ jobs:
|
|
|
184
158
|
gh pr close "$pr_num" --delete-branch || true
|
|
185
159
|
done
|
|
186
160
|
|
|
187
|
-
- name:
|
|
188
|
-
run: npm update @xn-intenton-z2a/agentic-lib
|
|
189
|
-
|
|
190
|
-
- name: Run init
|
|
161
|
+
- name: Run init (reseed/purge)
|
|
191
162
|
env:
|
|
192
163
|
GH_TOKEN: ${{ github.token }}
|
|
193
164
|
run: |
|
|
194
165
|
FLAGS="init"
|
|
195
166
|
if [ "$INIT_MODE" = "reseed" ]; then FLAGS="$FLAGS --reseed"; fi
|
|
196
167
|
if [ "$INIT_MODE" = "purge" ]; then FLAGS="$FLAGS --purge --mission $INIT_MISSION_SEED"; fi
|
|
197
|
-
|
|
198
|
-
|
|
168
|
+
DRY_RUN='${{ inputs.dry-run }}'
|
|
169
|
+
if [ "$DRY_RUN" = "true" ]; then FLAGS="$FLAGS --dry-run"; fi
|
|
199
170
|
if [ -f "bin/agentic-lib.js" ]; then
|
|
200
171
|
node bin/agentic-lib.js $FLAGS
|
|
201
172
|
else
|
|
@@ -203,7 +174,7 @@ jobs:
|
|
|
203
174
|
fi
|
|
204
175
|
|
|
205
176
|
- name: Write mission text (if provided, overrides seed)
|
|
206
|
-
if: env.INIT_MISSION_TEXT != '' &&
|
|
177
|
+
if: env.INIT_MISSION_TEXT != '' && inputs.dry-run != 'true' && inputs.dry-run != true
|
|
207
178
|
run: |
|
|
208
179
|
printf '# Mission\n\n%s\n' "$INIT_MISSION_TEXT" > MISSION.md
|
|
209
180
|
echo "Wrote custom mission text to MISSION.md"
|
|
@@ -221,18 +192,16 @@ jobs:
|
|
|
221
192
|
- run: npm test
|
|
222
193
|
|
|
223
194
|
- name: Update model and profile (if requested)
|
|
224
|
-
if: github.repository != 'xn-intenton-z2a/agentic-lib' &&
|
|
195
|
+
if: github.repository != 'xn-intenton-z2a/agentic-lib' && inputs.dry-run != 'true' && inputs.dry-run != true && (inputs.model != '' || inputs.profile != '')
|
|
225
196
|
uses: actions/github-script@v8
|
|
226
197
|
with:
|
|
227
198
|
script: |
|
|
228
199
|
const fs = require('fs');
|
|
229
|
-
const model = '${{
|
|
230
|
-
const profile = '${{
|
|
200
|
+
const model = '${{ inputs.model }}';
|
|
201
|
+
const profile = '${{ inputs.profile }}';
|
|
231
202
|
const tomlPath = 'agentic-lib.toml';
|
|
232
203
|
if (!fs.existsSync(tomlPath)) return;
|
|
233
204
|
let toml = fs.readFileSync(tomlPath, 'utf8');
|
|
234
|
-
// Extract the [tuning] section, then replace within it.
|
|
235
|
-
// Previous regex [^\[]*? failed when comments contained '[' characters.
|
|
236
205
|
const tuningSectionRegex = /(\[tuning\])([\s\S]*?)(?=\n\[|$)/;
|
|
237
206
|
const tuningMatch = toml.match(tuningSectionRegex);
|
|
238
207
|
if (tuningMatch) {
|
|
@@ -256,13 +225,13 @@ jobs:
|
|
|
256
225
|
fs.writeFileSync(tomlPath, toml);
|
|
257
226
|
|
|
258
227
|
- name: Update schedule (if requested)
|
|
259
|
-
if: github.repository != 'xn-intenton-z2a/agentic-lib' &&
|
|
228
|
+
if: github.repository != 'xn-intenton-z2a/agentic-lib' && inputs.schedule != '' && inputs.dry-run != 'true' && inputs.dry-run != true
|
|
260
229
|
uses: actions/github-script@v8
|
|
261
230
|
with:
|
|
262
231
|
script: |
|
|
263
232
|
const fs = require('fs');
|
|
264
|
-
const frequency = '${{
|
|
265
|
-
const model = '${{
|
|
233
|
+
const frequency = '${{ inputs.schedule }}';
|
|
234
|
+
const model = '${{ inputs.model || 'gpt-5-mini' }}';
|
|
266
235
|
const workflowPath = '.github/workflows/agentic-lib-workflow.yml';
|
|
267
236
|
const tomlPath = 'agentic-lib.toml';
|
|
268
237
|
|
|
@@ -308,7 +277,7 @@ jobs:
|
|
|
308
277
|
}
|
|
309
278
|
|
|
310
279
|
- name: Commit and push to main [skip ci]
|
|
311
|
-
if: github.repository != 'xn-intenton-z2a/agentic-lib' &&
|
|
280
|
+
if: github.repository != 'xn-intenton-z2a/agentic-lib' && inputs.dry-run != 'true' && inputs.dry-run != true
|
|
312
281
|
env:
|
|
313
282
|
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
|
|
314
283
|
run: |
|
|
@@ -334,9 +303,8 @@ jobs:
|
|
|
334
303
|
fi
|
|
335
304
|
done
|
|
336
305
|
|
|
337
|
-
# W8: Create initial seed issues after purge so the pipeline has work to do
|
|
338
306
|
- name: Create initial seed issues
|
|
339
|
-
if: github.repository != 'xn-intenton-z2a/agentic-lib' && env.INIT_MODE == 'purge' &&
|
|
307
|
+
if: github.repository != 'xn-intenton-z2a/agentic-lib' && env.INIT_MODE == 'purge' && inputs.dry-run != 'true' && inputs.dry-run != true
|
|
340
308
|
uses: actions/github-script@v8
|
|
341
309
|
with:
|
|
342
310
|
script: |
|
|
@@ -345,7 +313,6 @@ jobs:
|
|
|
345
313
|
? fs.readFileSync('MISSION.md', 'utf8')
|
|
346
314
|
: '(no MISSION.md found)';
|
|
347
315
|
|
|
348
|
-
// Ensure labels exist
|
|
349
316
|
for (const label of ['automated', 'ready']) {
|
|
350
317
|
try {
|
|
351
318
|
await github.rest.issues.createLabel({
|
|
@@ -356,7 +323,6 @@ jobs:
|
|
|
356
323
|
} catch (e) { /* label already exists */ }
|
|
357
324
|
}
|
|
358
325
|
|
|
359
|
-
// W8a: Initial unit tests issue
|
|
360
326
|
const unitTestBody = [
|
|
361
327
|
'Create a unit test file for each of the major features in the mission ',
|
|
362
328
|
'and put a TODO in a trivial empty passing test in each.',
|
|
@@ -373,7 +339,6 @@ jobs:
|
|
|
373
339
|
});
|
|
374
340
|
core.info(`Created issue #${issue1.number}: Initial unit tests`);
|
|
375
341
|
|
|
376
|
-
// W8b: Initial web layout issue
|
|
377
342
|
const webLayoutBody = [
|
|
378
343
|
'Create the home page layout to showcase each of the major features in the mission ',
|
|
379
344
|
'and put a TODO in a trivial empty passing test in each.',
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# SPDX-License-Identifier: MIT
|
|
2
|
+
# Copyright (C) 2025-2026 Polycode Limited
|
|
3
|
+
# .github/workflows/agentic-lib-update.yml
|
|
4
|
+
#
|
|
5
|
+
# Update agentic-lib to latest, extract workflows/actions/scripts, run tests,
|
|
6
|
+
# commit and push to main [skip ci]. Does NOT reseed or purge user content.
|
|
7
|
+
#
|
|
8
|
+
# In agentic-lib: schedule trigger is commented out.
|
|
9
|
+
# During init: #@dist restores the schedule.
|
|
10
|
+
|
|
11
|
+
name: agentic-lib-update
|
|
12
|
+
run-name: "agentic-lib-update [${{ github.ref_name }}]"
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
workflow_call:
|
|
16
|
+
inputs:
|
|
17
|
+
dry-run:
|
|
18
|
+
type: string
|
|
19
|
+
required: false
|
|
20
|
+
default: "false"
|
|
21
|
+
#@dist schedule:
|
|
22
|
+
#@dist - cron: "15 6 * * *"
|
|
23
|
+
workflow_dispatch:
|
|
24
|
+
inputs:
|
|
25
|
+
dry-run:
|
|
26
|
+
description: "Preview changes without committing"
|
|
27
|
+
type: boolean
|
|
28
|
+
required: false
|
|
29
|
+
default: false
|
|
30
|
+
|
|
31
|
+
permissions: write-all
|
|
32
|
+
|
|
33
|
+
jobs:
|
|
34
|
+
update:
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v6
|
|
38
|
+
if: inputs.dry-run == 'true' || inputs.dry-run == true
|
|
39
|
+
- uses: actions/checkout@v6
|
|
40
|
+
if: inputs.dry-run != 'true' && inputs.dry-run != true
|
|
41
|
+
with:
|
|
42
|
+
ref: main
|
|
43
|
+
token: ${{ secrets.WORKFLOW_TOKEN }}
|
|
44
|
+
|
|
45
|
+
- uses: actions/setup-node@v6
|
|
46
|
+
with:
|
|
47
|
+
node-version: "24"
|
|
48
|
+
|
|
49
|
+
- name: Update agentic-lib to latest
|
|
50
|
+
run: npm update @xn-intenton-z2a/agentic-lib
|
|
51
|
+
|
|
52
|
+
- name: Run init (update mode)
|
|
53
|
+
env:
|
|
54
|
+
GH_TOKEN: ${{ github.token }}
|
|
55
|
+
run: |
|
|
56
|
+
# Use local CLI if available (agentic-lib dev), otherwise npx
|
|
57
|
+
if [ -f "bin/agentic-lib.js" ]; then
|
|
58
|
+
node bin/agentic-lib.js init
|
|
59
|
+
else
|
|
60
|
+
npx @xn-intenton-z2a/agentic-lib init
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
- run: npm install
|
|
64
|
+
|
|
65
|
+
- name: Install agentic-step deps
|
|
66
|
+
if: hashFiles('.github/agentic-lib/actions/agentic-step/package.json') != ''
|
|
67
|
+
run: cd .github/agentic-lib/actions/agentic-step && npm ci
|
|
68
|
+
|
|
69
|
+
- name: Install sub-project dependencies (agentic-lib dev only)
|
|
70
|
+
if: hashFiles('src/actions/agentic-step/package.json') != ''
|
|
71
|
+
run: cd src/actions/agentic-step && npm ci
|
|
72
|
+
|
|
73
|
+
- run: npm test
|
|
74
|
+
|
|
75
|
+
- name: Commit and push to main [skip ci]
|
|
76
|
+
if: github.repository != 'xn-intenton-z2a/agentic-lib' && inputs.dry-run != 'true' && inputs.dry-run != true
|
|
77
|
+
env:
|
|
78
|
+
GH_TOKEN: ${{ secrets.WORKFLOW_TOKEN }}
|
|
79
|
+
run: |
|
|
80
|
+
TOKEN_USER=$(gh api /user --jq '.login')
|
|
81
|
+
TOKEN_ID=$(gh api /user --jq '.id')
|
|
82
|
+
git config user.name "${TOKEN_USER}"
|
|
83
|
+
git config user.email "${TOKEN_ID}+${TOKEN_USER}@users.noreply.github.com"
|
|
84
|
+
git add -A
|
|
85
|
+
git diff --cached --quiet && echo "No changes" && exit 0
|
|
86
|
+
VERSION=$(npx @xn-intenton-z2a/agentic-lib version 2>/dev/null || echo "latest")
|
|
87
|
+
git commit -m "update agentic-lib@${VERSION} [skip ci]"
|
|
88
|
+
for attempt in 1 2 3; do
|
|
89
|
+
git push origin main && break
|
|
90
|
+
echo "Push failed (attempt $attempt) — pulling and retrying"
|
|
91
|
+
git pull --rebase origin main || {
|
|
92
|
+
echo "Rebase conflict — aborting rebase and retrying"
|
|
93
|
+
git rebase --abort 2>/dev/null || true
|
|
94
|
+
}
|
|
95
|
+
sleep $((attempt * 2))
|
|
96
|
+
if [ "$attempt" -eq 3 ]; then
|
|
97
|
+
echo "::error::Failed to push after 3 attempts"
|
|
98
|
+
exit 1
|
|
99
|
+
fi
|
|
100
|
+
done
|
package/bin/agentic-lib.js
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
// Copyright (C) 2025-2026 Polycode Limited
|
|
4
|
+
// scripts/build-web.cjs
|
|
5
|
+
// Usage: node .github/agentic-lib/scripts/build-web.cjs
|
|
6
|
+
//
|
|
7
|
+
// Builds the docs/ directory for web serving:
|
|
8
|
+
// 1. Creates docs/ and copies src/web/* into it
|
|
9
|
+
// 2. Generates docs/lib-meta.js with package metadata exports
|
|
10
|
+
// 3. Generates docs/lib-browser.js from src/lib/main.js (if it has named exports)
|
|
11
|
+
//
|
|
12
|
+
// This file is part of the Example Suite for `agentic-lib` see: https://github.com/xn-intenton-z2a/agentic-lib
|
|
13
|
+
// This file is licensed under the MIT License. For details, see LICENSE-MIT
|
|
14
|
+
|
|
15
|
+
const fs = require("fs");
|
|
16
|
+
const path = require("path");
|
|
17
|
+
|
|
18
|
+
const docsDir = path.resolve("docs");
|
|
19
|
+
|
|
20
|
+
// Step 1: Create docs/ and copy src/web/* if it exists
|
|
21
|
+
fs.mkdirSync(docsDir, { recursive: true });
|
|
22
|
+
fs.writeFileSync(path.join(docsDir, ".nojekyll"), "");
|
|
23
|
+
|
|
24
|
+
const webDir = path.resolve("src", "web");
|
|
25
|
+
if (fs.existsSync(webDir)) {
|
|
26
|
+
for (const entry of fs.readdirSync(webDir, { withFileTypes: true })) {
|
|
27
|
+
const src = path.join(webDir, entry.name);
|
|
28
|
+
const dest = path.join(docsDir, entry.name);
|
|
29
|
+
if (entry.isFile()) {
|
|
30
|
+
fs.copyFileSync(src, dest);
|
|
31
|
+
} else if (entry.isDirectory()) {
|
|
32
|
+
fs.cpSync(src, dest, { recursive: true });
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Step 2: Generate docs/lib-meta.js with package metadata
|
|
38
|
+
const pkg = JSON.parse(fs.readFileSync("package.json", "utf8"));
|
|
39
|
+
const metaLines = ["name", "version", "description"].map(
|
|
40
|
+
(k) => `export const ${k} = ${JSON.stringify(pkg[k])};`
|
|
41
|
+
);
|
|
42
|
+
fs.writeFileSync(path.join(docsDir, "lib-meta.js"), metaLines.join("\n") + "\n");
|
|
43
|
+
console.log("Wrote docs/lib-meta.js");
|
|
44
|
+
|
|
45
|
+
// Step 3: Generate docs/lib-browser.js from src/lib/main.js named exports
|
|
46
|
+
// Parse the main module for `export function` and `export async function` declarations
|
|
47
|
+
// and re-emit them as a standalone browser-compatible module.
|
|
48
|
+
const mainPath = path.resolve("src", "lib", "main.js");
|
|
49
|
+
if (fs.existsSync(mainPath)) {
|
|
50
|
+
const mainSrc = fs.readFileSync(mainPath, "utf8");
|
|
51
|
+
// Match named export functions: export function foo(...) { ... } or export async function foo(...)
|
|
52
|
+
const exportRegex = /^export\s+(async\s+)?function\s+(\w+)/gm;
|
|
53
|
+
const exportNames = [];
|
|
54
|
+
let match;
|
|
55
|
+
while ((match = exportRegex.exec(mainSrc)) !== null) {
|
|
56
|
+
exportNames.push(match[2]);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (exportNames.length > 0) {
|
|
60
|
+
// Extract the function bodies by finding each export function and copying it verbatim
|
|
61
|
+
const lines = mainSrc.split("\n");
|
|
62
|
+
const functionBodies = [];
|
|
63
|
+
for (let i = 0; i < lines.length; i++) {
|
|
64
|
+
if (/^export\s+(async\s+)?function\s+\w+/.test(lines[i])) {
|
|
65
|
+
// Collect lines until we find the closing brace at column 0
|
|
66
|
+
const fnLines = [lines[i]];
|
|
67
|
+
let braceDepth = 0;
|
|
68
|
+
for (let j = i; j < lines.length; j++) {
|
|
69
|
+
for (const ch of lines[j]) {
|
|
70
|
+
if (ch === "{") braceDepth++;
|
|
71
|
+
if (ch === "}") braceDepth--;
|
|
72
|
+
}
|
|
73
|
+
if (j > i) fnLines.push(lines[j]);
|
|
74
|
+
if (braceDepth === 0 && j >= i) {
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
functionBodies.push(fnLines.join("\n"));
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const header = [
|
|
83
|
+
"// docs/lib-browser.js",
|
|
84
|
+
"// Generated browser-compatible module exposing named exports from src/lib/main.js.",
|
|
85
|
+
"// Auto-generated by build-web.cjs — do not edit manually.",
|
|
86
|
+
"",
|
|
87
|
+
].join("\n");
|
|
88
|
+
|
|
89
|
+
fs.writeFileSync(
|
|
90
|
+
path.join(docsDir, "lib-browser.js"),
|
|
91
|
+
header + functionBodies.join("\n\n") + "\n"
|
|
92
|
+
);
|
|
93
|
+
console.log(
|
|
94
|
+
`Wrote docs/lib-browser.js (${exportNames.length} exports: ${exportNames.join(", ")})`
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"main": "src/lib/main.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "npm run build:web",
|
|
9
|
-
"build:web": "
|
|
9
|
+
"build:web": "node .github/agentic-lib/scripts/build-web.cjs",
|
|
10
10
|
"test": "vitest --run tests/unit/*.test.js",
|
|
11
11
|
"test:unit": "vitest --run --coverage tests/unit/*.test.js",
|
|
12
12
|
"test:behaviour": "npm run build:web && npx playwright test --config playwright.config.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"author": "",
|
|
18
18
|
"license": "MIT",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@xn-intenton-z2a/agentic-lib": "^7.2.
|
|
20
|
+
"@xn-intenton-z2a/agentic-lib": "^7.2.12"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@playwright/test": "^1.58.0",
|