Commit Graph
319 Commits
Author SHA1 Message Date
google-labs-jules[bot]andPR0M3TH3AN 807bee11b9 chore(agents): fuzz-agent run - nostr schemas and magnet utils (no crashes)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 13:10:30 +00:00
thePR0M3TH3AN 5383e83e24 Merge pull request #2605 from PR0M3TH3AN/agents/weekly/frontend-console-debug-agent-5469852811724557248
[weekly] frontend-console-debug-agent: fix broken tracker
2026-02-17 21:31:02 -05:00
google-labs-jules[bot]andPR0M3TH3AN 2280e8aef9 fix(ai): remove broken tracker wss://tracker.btorrent.xyz (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 01:11:44 +00:00
google-labs-jules[bot]andPR0M3TH3AN d22785bb87 [decompose] extract helpers from js/ui/profileModalController.js
Extracted DM Relay UI logic and DM Attachment logic into separate binder modules to reduce the size of ProfileModalController.js. Updated file size baseline.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-18 01:03:43 +00:00
google-labs-jules[bot]andPR0M3TH3AN 7e81e45e22 perf: fix unbounded relay concurrency and lint failures
- Fixed unbounded concurrency in js/relayManager.js during relay list hydration by using pMap with RELAY_BACKGROUND_CONCURRENCY (3).
- Modified scripts/check-hex.js to robustly filter out js/webtorrent.min.js and perf/hits-*.json from matches to fix CI lint failure.
- Created perf/search.mjs helper and daily perf report.

Daily perf agent run 2026-02-17.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 14:09:24 +00:00
thePR0M3TH3AN 390656e552 Merge pull request #2592 from PR0M3TH3AN/agents/weekly/event-schema-agent-10679242623430859164
chore(ai): event schema validation tool
2026-02-17 08:28:36 -05:00
google-labs-jules[bot]andPR0M3TH3AN 983d5e2772 chore(ai): event schema validation tool
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 13:10:39 +00:00
google-labs-jules[bot]andPR0M3TH3AN 29982cfb63 perf: visibility-gate explore data intervals and fix lint crash
- Modifies `js/services/exploreDataService.js` to prevent starting background intervals if the document is hidden at initialization.
- Updates `scripts/check-hex.js` to increase max buffer size and exclude `js/webtorrent.min.js` to prevent `ENOBUFS` crashes.
- Adds `perf/hits-2026-02-17.json` inventory.
- Adds `daily-perf-report-2026-02-17.md` report.
- Adds `docs/agents/task-logs/daily/2026-02-17_06-45-57_perf-agent_completed.md`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 06:48:22 +00:00
google-labs-jules[bot]andPR0M3TH3AN 34ec2cf7c1 perf(ai): refactor load test harness to use canonical schemas
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 03:54:03 +00:00
google-labs-jules[bot]andPR0M3TH3AN 7ccba8ab61 [security] replace innerHTML usages in js/historyView.js — convert to safe DOM APIs
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-17 00:47:08 +00:00
thePR0M3TH3AN 11ec714a71 Merge pull request #2569 from PR0M3TH3AN/agents/daily/innerhtml-migration-8582795435768461769
Refactor js/docsView.js to replace innerHTML with safe DOM APIs
2026-02-16 17:03:56 -05:00
thePR0M3TH3AN 37e5e0f307 Merge pull request #2568 from PR0M3TH3AN/agents/daily/load-test-agent-12413052645096947240
Load Test Agent: Add Resource Metrics and Defaults
2026-02-16 17:03:22 -05:00
google-labs-jules[bot]andPR0M3TH3AN 8f7d953e22 Refactor js/docsView.js to replace innerHTML with safe DOM APIs
- Replaced 7/8 `innerHTML` instances with `document.createElementNS`, `replaceChildren`, and `setAttribute`
- Updated `scripts/check-innerhtml.mjs` baseline (8 -> 1)
- Retained 1 `innerHTML` instance for `marked.parse` (trusted content)
- Verified functionality with unit tests (`npm run test:unit`) and frontend verification (`Playwright`)
- Created completion log `docs/agents/task-logs/daily/2026-02-16_21-43-55_innerhtml-migration-agent_completed.md`
- Moved temporary artifacts to `artifacts/innerhtml-migration/2026-02-16/`

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-16 21:47:01 +00:00
google-labs-jules[bot]andPR0M3TH3AN fd947bd16f perf(ai): add resource metrics to load test harness
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-16 20:44:46 +00:00
google-labs-jules[bot]andPR0M3TH3AN 16de3802ab [security] replace innerHTML usages in js/ui/subscriptionHistoryController.js
- Migrated 6 out of 7 innerHTML assignments to safe DOM APIs (createElement, textContent, replaceChildren).
- Reduced innerHTML baseline for the file from 7 to 1.
- Updated scripts/check-innerhtml.mjs baseline.
- Verified with lint, unit tests, and frontend verification.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-16 18:51:44 +00:00
google-labs-jules[bot]andPR0M3TH3AN 50ded6b4dc feat(test-audit): run daily test audit and fix zero-assertion test
- Run daily test audit using `test-audit-agent`.
- Generate `test-audit-report-2026-02-15.md` with coverage and static analysis findings.
- Fix zero-assertion test in `tests/minimal-channel-profile.test.mjs`.
- Add audit scripts `scripts/agent/audit-coverage-map.js` and `scripts/agent/audit-static-analysis.sh`.
- Log execution details in `test_logs/TEST_LOG_2026-02-15_20-00-00.md`.
- Create completion log in `docs/agents/task-logs/daily/`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-15 20:18:30 +00:00
google-labs-jules[bot]andPR0M3TH3AN f676fb2ff5 [security] replace innerHTML in RevertModal.js
Migrated `js/ui/components/RevertModal.js` to safe DOM APIs (`createElement`, `textContent`, `DOMParser`).
Extracted rendering logic to `js/ui/components/revertModalRenderers.js`.
Updated baseline in `scripts/check-innerhtml.mjs` (0 remaining usages).
Updated tests to mock DOMParser.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 18:58:02 +00:00
google-labs-jules[bot]andPR0M3TH3AN 54be0efcac [decompose] extract helpers from js/ui/components/VideoModal.js
Decomposed js/ui/components/VideoModal.js by extracting "Similar Video" and "Pointer Key" logic into a new helper module js/ui/components/VideoModalSimilarHelpers.js.

- Reduced VideoModal.js line count from 6334 to 6045.
- Added comprehensive unit tests for extracted helpers.
- Updated check-file-size.mjs baseline.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-14 11:46:47 +00:00
thePR0M3TH3AN e5354bb6f4 [ci] add torch extraction guard validation script 2026-02-13 20:32:06 -05:00
google-labs-jules[bot]andPR0M3TH3AN 1003413046 test(interop): add weekly interop test harness and run results
- Added `scripts/agent/interop-test.mjs` for automated protocol testing.
- Verified Video Post, View Event, and DM flows against local relay.
- Fixed lint failure in `views/dev/agent-dashboard.html` by updating `scripts/check-inline-styles.mjs`.
- Added completion log.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-13 22:02:24 +00:00
Claude 9d4c98a872 docs(agents): add TORCH protocol documentation
TORCH (Task Orchestration via Relay-Coordinated Handoff) is the name
for the Nostr-based distributed task locking system used to coordinate
multi-agent development.

Adds docs/agents/TORCH.md covering:
- Protocol overview with sequence diagram
- NIP-78 event schema with tag breakdown
- Ephemeral key lifecycle and why no secrets are needed
- Race detection mechanism
- Auto-expiration via NIP-40
- Configuration reference
- Architecture diagram
- Path toward a generalizable drop-in package for any repo

Also references TORCH by name in AGENTS.md, scheduler-flow.md,
nostr-lock.mjs header, and CLAUDE.md key documentation table.

https://claude.ai/code/session_01BpDsVSAkVWtJLnfKxsB9ib
2026-02-13 21:09:30 +00:00
Claude 86f322550a feat(agents): add Nostr-based distributed task locking via NIP-78
Replace GitHub draft PR as the primary locking mechanism with Nostr
relay-based locks. Each agent generates an ephemeral keypair, publishes
a NIP-78 (Kind 30078) lock event with NIP-40 auto-expiration, and
discards the key. No tokens, no secrets, no git push required.

New script: scripts/agent/nostr-lock.mjs
  - check: query relays for active locks, return JSON exclusion set
  - lock: claim a task with built-in race detection (exit 3 = lost)
  - list: human-readable table of all active locks

The locking fallback chain is now:
  1. Nostr lock (no credentials needed, works in any sandbox)
  2. git push + draft PR (traditional method)
  3. GitHub API via curl (needs GITHUB_TOKEN)

Updated scheduler-flow.md, META_PROMPTS.md, and AGENTS.md to document
all three methods with Nostr as the preferred primary.

https://claude.ai/code/session_01BpDsVSAkVWtJLnfKxsB9ib
2026-02-13 20:53:14 +00:00
Claude 9e5797c5e0 fix(agents): add GitHub API fallback for task locking in restricted environments
Jules agents cannot git push due to sandbox restrictions, which breaks the
draft PR-based distributed lock mechanism. Multiple agents can pick up the
same task because the claim is never visible remotely.

This adds scripts/agent/claim-task-api.sh which creates the remote branch,
started.md log file, and draft PR entirely via curl and the GitHub REST API,
bypassing git push. The scheduler-flow.md, META_PROMPTS.md, and AGENTS.md
are updated to document the fallback: try git push first, fall back to the
API script if push is blocked, fail-closed if neither method works.

https://claude.ai/code/session_01BpDsVSAkVWtJLnfKxsB9ib
2026-02-13 20:29:38 +00:00
google-labs-jules[bot]andPR0M3TH3AN 4f206ccb12 chore(agents): run load-test-agent daily task — implemented harness and report
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-13 19:11:14 +00:00
google-labs-jules[bot]andPR0M3TH3AN 9d85e647b6 chore(agents): run fuzz-agent weekly task — fuzz nostr schemas
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-13 18:05:17 +00:00
thePR0M3TH3AN 50f0ebbff1 Merge pull request #2460 from PR0M3TH3AN/codex/add-utility-script-for-claim-audit
[ci] add claim-audit utility and make scheduler prompts fail-closed
2026-02-13 12:23:18 -05:00
thePR0M3TH3AN 7f3531ac4c docs(agents): add claim audit utility for scheduler exclusions 2026-02-13 12:22:54 -05:00
thePR0M3TH3AN 2eca209f02 Merge pull request #2455 from PR0M3TH3AN/ai/innerhtml-fix/subscriptions-12650247027422970359
[security] replace innerHTML usages in js/subscriptions.js — convert to safe DOM APIs
2026-02-13 12:19:55 -05:00
google-labs-jules[bot]andPR0M3TH3AN fffca30fb6 chore(agents): run innerhtml-migration-agent daily task — migrate js/channelProfile.js
- Replaced 10 instances of `innerHTML` with safe DOM APIs (`createElement`, `replaceChildren`, `textContent`).
- Extracted Zap Panel creation to `createZapPanelContent` helper.
- Extracted Subscribe Button creation logic.
- Updated `scripts/check-innerhtml.mjs` baseline (count reduced by 10).
- Verified via lint, unit tests, and Playwright verification.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-13 16:58:20 +00:00
google-labs-jules[bot]andPR0M3TH3AN 8536f2f858 [security] replace innerHTML usages in js/subscriptions.js — convert to safe DOM APIs
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-13 16:51:33 +00:00
thePR0M3TH3AN 6aa9da1383 Merge pull request #2453 from PR0M3TH3AN/claude/add-pr-checking-ZTrrq
Replace gh CLI with curl for GitHub API queries in agent workflows
2026-02-13 11:17:39 -05:00
Claude ce72c4bbad fix(agents): replace gh CLI with curl for PR checking to prevent duplicate work
Agents do not have access to gh CLI, causing them to skip the pre-flight
PR check and collide on duplicate work. This replaces all gh-based PR
checking commands with curl + jq using the GitHub REST API, updates the
task claiming protocol to use branch push + started log file as the
primary lock mechanism, and updates automation scripts to use curl for
PR listing and git fetch for PR checkout.

Files updated:
- AGENTS.md (Section 12 coordination rules)
- CLAUDE.md (coordination rules)
- META_PROMPTS.md (daily + weekly meta prompts)
- daily-scheduler.md (pre-flight gate, task claiming, error handling)
- weekly-scheduler.md (pre-flight gate, task claiming, error handling)
- bitvid-pr-review-agent.md (PR enumeration + checkout)
- bitvid-ci-health-agent.md (CI run gathering)
- bitvid-weekly-synthesis-agent.md (PR metadata gathering)
- bitvid-changelog-agent.md (PR metadata verification)
- scripts/agent/review-open-prs.mjs (PR listing + checkout)
- scripts/automated-pr-review.mjs (--all mode PR listing + checkout)

https://claude.ai/code/session_01L5bzzGpZ6YTiLXcfqaL81G
2026-02-13 15:47:42 +00:00
google-labs-jules[bot]andPR0M3TH3AN 87f7ae7616 chore(agents): run frontend-console-debug-agent weekly task
- Updated scripts/agent/debug_frontend.py to be more robust (timestamps, exit codes).
- Verified no frontend console errors on startup.
- Created task logs (started/completed).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-13 13:13:27 +00:00
google-labs-jules[bot]andPR0M3TH3AN 9c65a78249 chore(agents): run event-schema-agent weekly task
- Implement `scripts/agent/validate-events.mjs` harness.
- Fix `buildWatchHistoryEvent` to default `monthIdentifier` if missing.
- Verified all builders produce valid events.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-13 05:14:10 +00:00
google-labs-jules[bot]andPR0M3TH3AN 5f1edebea7 [decompose] extract ProfileHashtagController from js/ui/profileModalController.js
Extracts all hashtag preference related logic into a new controller
`js/ui/profileModal/ProfileHashtagController.js` to reduce the size of `js/ui/profileModalController.js` and improve maintainability.

- Moves `normalizeHashtagTag`, `formatHashtagTag`, `getResolvedHashtagPreferences`, `setHashtagStatus`, `refreshHashtagBackgroundStatus`, `populateHashtagPreferences`, `renderHashtagList`, `sanitizeHashtagList`, `createHashtagListItem`, `persistHashtagPreferences`, `handleAddHashtagPreference`, `handleRemoveHashtagPreference`, `handleHashtagPreferencesChange`, `describeHashtagPreferencesError`.
- Updates `ProfileModalController` to delegate to `ProfileHashtagController`.
- Reduces `js/ui/profileModalController.js` by ~600 lines.
- Updates file size baseline in `scripts/check-file-size.mjs`.

Passes `npm run lint` and `npm run test:unit`.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-13 01:39:22 +00:00
google-labs-jules[bot]andPR0M3TH3AN fab5b11824 chore(agents): run audit-agent daily task — initial audit report
- Executed `scripts/check-file-size.mjs --report`
- Executed `scripts/check-innerhtml.mjs --report`
- Executed `npm run lint` (skipped assets check due to missing build)
- Created parser scripts in `scripts/agent/audit-parsers/`
- Generated JSON reports and summary in `artifacts/audit/2026-02-12/`
- Updated `AGENT_TASK_LOG.csv`

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 21:10:13 +00:00
thePR0M3TH3AN ec3142bd9f Merge pull request #2397 from PR0M3TH3AN/ai/load-test-20260212-6967903642560012014
Add Load Test Script and Report
2026-02-12 15:24:43 -05:00
google-labs-jules[bot]andPR0M3TH3AN 09015833dc Add load test script and report
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 19:14:49 +00:00
google-labs-jules[bot]andPR0M3TH3AN af150fdfe1 fix(ai): frontend console error — ensure CSS build on install (agent)
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 18:15:14 +00:00
google-labs-jules[bot]andPR0M3TH3AN df62585106 perf: enable lazy loading for avatars and thumbnails
Added `loading="lazy"` and `decoding="async"` attributes to dynamically created `<img>` elements in:
- `js/historyView.js` (avatars)
- `js/ui/subscriptionHistoryController.js` (channel icons)
- `js/searchView.js` (added `decoding="async"`)
- `js/ui/profileModal/ProfileDirectMessageRenderer.js` (attachment previews, avatars)
- `js/ui/profileModalController.js` (attachment previews, saved profile avatars)

This reduces initial page load impact and bandwidth usage by deferring off-screen image loading.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 16:56:06 +00:00
google-labs-jules[bot]andPR0M3TH3AN 21a7b43e80 chore(deps): bump esbuild to v0.27.3
- Upgraded esbuild from 0.27.2 to 0.27.3
- Added scripts/agent/analyze_deps.py
- Added artifacts/deps-report.md, npm-audit.json, npm-outdated.json
- Verified with npm run build, lint, and test:unit

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 14:39:37 +00:00
google-labs-jules[bot]andPR0M3TH3AN fd9daef40b [security] Remove innerHTML usage from searchView.js
Refactored `js/searchView.js` to use safe DOM APIs (`document.createElement`, `replaceChildren`, `textContent`) instead of `innerHTML`.
This reduces the attack surface for XSS vulnerabilities.
Updated `scripts/check-innerhtml.mjs` baseline.
Verified with unit tests and a frontend verification script.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-12 03:41:34 +00:00
google-labs-jules[bot]andPR0M3TH3AN 7300977a6d [decompose] extract DM and Relay controllers from ProfileModalController
Extracted ProfileDirectMessageController (split into Controller, Actions, Renderer, Helper) and ProfileRelayController from ProfileModalController to reduce file size and improve maintainability.

ProfileModalController.js size reduced from ~12000 lines to ~8750 lines.
Updated unit tests to reflect the new structure.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 21:15:06 +00:00
google-labs-jules[bot]andPR0M3TH3AN 288fd053c7 chore: Update Daily Design System Audit Report and Script
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 15:56:51 +00:00
google-labs-jules[bot]andPR0M3TH3AN 6a284e0b2d fix: Ensure version info visibility and build robustness
- Moved `<!-- VERSION_INFO -->` out of `.fade-in` container in `index.html` to prevent visibility issues if JS fails.
- Added verification in `scripts/build-dist.mjs` to ensure `dist/components` exists and is not empty.
- Added logging to `scripts/build-dist.mjs` for version injection status.
- Updated `scripts/verify-dist-deploy-artifact.mjs` regex to accommodate HTML structure change.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 14:15:52 +00:00
google-labs-jules[bot]andPR0M3TH3AN bc2f082fca Fix: Enable build on Node 20 and harden version injection
- Relaxed `engines.node` in `package.json` from `>=22` to `>=20` to match the hosting environment (Node 20.x), resolving strict engine failures during install.
- Modified `scripts/build-dist.mjs` to throw an error (instead of warning) if version injection fails, preventing silent failures.
- Updated `npm run build` to include `verify:dist:deploy-artifact` as a mandatory post-build step, ensuring the final artifact contains the expected version markup.

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 12:45:56 +00:00
thePR0M3TH3AN fd8324374e Merge pull request #2338 from PR0M3TH3AN/fix-missing-build-hash-error-handling-1559754443002918677
Make version injection failure fatal in build-dist.mjs
2026-02-10 23:02:04 -05:00
google-labs-jules[bot]andPR0M3TH3AN 349fa11422 fix(scripts): make version injection failure fatal in build-dist.mjs
Previously, `scripts/build-dist.mjs` caught errors during version injection and logged them but allowed the build to complete with a success exit code. This masked issues in CI/CD environments (like 4everland) where version injection failed silently, leading to deployments without version hashes.

This change modifies `injectVersionInfo` to `process.exit(1)` upon failure, ensuring that any issue with version injection halts the build pipeline and surfaces the error in the logs.

Tested locally by simulating injection failure (verified exit code 1) and by running a standard build (verified success and correct injection).

Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 03:57:45 +00:00
thePR0M3TH3AN ca57f9caaf Merge pull request #2336 from PR0M3TH3AN/decompose-profile-modal-controller-5857031998313460612
Decompose ProfileModalController: Extract Wallet and Storage Controllers
2026-02-10 22:57:11 -05:00
google-labs-jules[bot]andPR0M3TH3AN 48d33f45eb [decompose] Extract Wallet and Storage controllers from ProfileModalController
Co-authored-by: PR0M3TH3AN <[email protected]>
2026-02-11 03:30:40 +00:00