78 Commits
Author SHA1 Message Date
BillyOutlast a127e0c064 ci: add reusable OpenCodeReview PR workflow 2026-10-19 15:29:53 -04:00
BillyOutlast 117bb6fbe2 feat(mcp,skills): native GDevelop MCP server + progressive-disclosure skills
- packages/opencode-provider/mcp-server.mjs: Stdio JSON-RPC 2.0 server
  (protocol 2024-11-05), 16 tools (10 gd_* native + 6 legacy aliases),
  8 resources/templates, SecurityEngine (ask-policy, path containment,
  null-byte + zero-egress gates), zero npm dependencies
- tests/integration/mcp-server.test.mjs: 9 live loopback/stdio tests
- .opencode/skills/: 4 domain skills (eventsheet-codegen,
  extension-wrapper, scenegraph-manipulation, asset-injection) with
  schemas + templates; .opencode/semgrep/gdevelop-rules.yaml gates
- packages/opencode-gdevelop/gdevelop-skills.d.ts + skills tests (15 green)
- docs: PERFECT_AI_IMPLEMENTATION_PLAN.md, OPENCODE_COORDINATOR_HANDOFF.md
- 258/258 green; seam gate green; fixture pristine at 8301cdca
2026-10-13 11:27:13 -04:00
BillyOutlast 26f6c869d8 fix(ai-studio): resolve undefined parent global that broke release builds
customCreateSubAgentAiRequest computed hasOpenProject with a bare `parent`
identifier that does not exist in scope (it resolved to the `window.parent`
global), so CRA's no-restricted-globals rule failed `npm run build` on all
three OS jobs of release run 38344881723. Fall back to the parent request in
localAiRequestsCache[parentAiRequestId], mirroring the continue-turn path's
`existing.gameProjectJson`.

Add tests/unit/tier2-restricted-globals.test.mjs: a targeted guard for this
regression class, which `npm test` could not see because it never runs
eslint. Verified red on the pre-fix source (reports 5182:27 / 5182:37, exactly
matching the CI eslint output) and green after the fix.

Refresh the MANIFEST.json pin for CustomAIClient.js (219717 bytes).

Suite: 241/241. Seam gate green. Patched-tree apply verified on a scratch copy.
2026-10-13 06:57:42 -04:00
BillyOutlast 7586180f5d feat(ai-studio): client-side store search, parameter aliases, and engine reflection
- Wire client-side asset and resource store search in BYOK mode using listAllPublicAssets and listAllResources
- Add parameter aliasing for add_or_edit_variable (name -> variable_name_or_path, type -> variable_type, default value)
- Normalize put_2d_instances (default layer_name and brush_kind, support direct batch instance placement)
- Implement engine reflection for search_docs via gd.getAllPlatformExtensions()
- Filter initialize_project when project is open and document full gameplay test harness API
- Update MANIFEST.json, patches/14-ai-utils.patch, and expand test suite to 240 tests
- Sanitize machine-local paths for CI hygiene checks
2026-10-13 00:05:43 -04:00
BillyOutlast 6feadfa517 feat(observability): forward renderer debug logs over IPC and capture AI agent telemetry
- IPC debug logger bridge:
  - Add IPC bridge from launcher/preload-unlock.cjs to launcher/heretek-hook.cjs via 'heretek:debug-log'
  - Support customSource in launcher/debug-logger.cjs to record renderer events (source: 'renderer') directly to JSONL disk logs
  - Prevent losing renderer errors, warnings, and turn events previously buffered only in-memory

- AI Agent request & telemetry capture:
  - Instrument sendChatCompletion in packages/ai-studio/AI/CustomAIClient.js to emit ai-request-sent, ai-response-received, and ai-request-error
  - Record endpointUrl, model, prompt messages, tools, durationMs, and provider token usage
  - Instrument LoopGuard.js with [TOOL_CALL] and [TOOL_RESULT] carrying callId, arguments, repeat counts, and error counts
  - Add safeFormatMessagesForDebug helper for bounded, safe message serialization

- Tool audit & diagnostics:
  - Add standalone parser scripts/audit_agent_log.py and comprehensive report AUDIT_AGENT_LOG_REPORT.md auditing 67 agent interaction rows

- Verification & tests:
  - Update packages/ai-studio/MANIFEST.json sha256 checksums and byte counts
  - Add unit tests in tests/launcher/debug-logger.test.cjs covering IPC event forwarding and disk serialization
  - Full test suite passes: 237/237 passing (+2 new tests)
2026-10-12 21:53:52 -04:00
BillyOutlast b927b49460 chore(formula): pin release v5.6.283 download URL and SHA-256 2026-10-12 20:58:17 -04:00
BillyOutlast 25e26939d1 fix(release): repack distribution zip with hardened fuses and wire TAP_GITHUB_TOKEN secret 2026-10-12 19:43:06 -04:00
BillyOutlast 6a17790914 feat(hardening): deploy hardening, MCP server, harness adapters, and Homebrew tap
- Deployment hardening:
  - Harden .github/workflows/release.yml with minimal permissions and SLSA provenance attestation
  - Compute dual SHA-256 and SHA-512 release checksum matrices
  - Implement zero-dep wire-level Electron fuse patcher (scripts/configure-electron-fuses.mjs)
  - Harden launcher/preload-unlock.cjs against prototype pollution
  - Add Linux artifact permissions and ELF header verification gate (scripts/verify-linux-artifacts.mjs)

- Harness & agentic expansion:
  - Add Model Context Protocol (MCP) STDIO JSON-RPC 2.0 server (packages/opencode-provider/mcp-server.mjs)
  - Add cross-harness tool adapters for OpenAI, Anthropic, MCP, and OpenCode (packages/opencode-gdevelop/tools.mjs)
  - Add YaRN RoPE context extension headers and context window guardrails to provider daemon

- Linuxbrew Homebrew tap:
  - Author standalone Linux formula with Wayland & unprivileged userns detection (Formula/gdevelop-unlocked.rb)
  - Add automated formula bumper (scripts/bump-homebrew-formula.mjs) and release dispatch step

- Test suite:
  - Expand test suite to 235/235 passing (+22 tests across 5 new suites)
2026-10-12 19:35:04 -04:00
BillyOutlast 72ee1a85b2 Merge pull request #25 from Heretek-AI/chore/standardize
chore: hygiene check, CodeRabbit config, repo-relative paths in research prompt
2026-10-12 11:19:37 -04:00
BillyOutlast feb0d1a6ce Merge pull request #32 from Heretek-AI/ticket-31-resume-steer-shape
#31 resume steer: emit AiRequestUserMessage array shape
2026-10-12 10:53:45 -04:00
BillyOutlast 192a8c697c #31 resume steer: emit AiRequestUserMessage array shape so the chat renderer survives Resume 2026-10-12 10:52:31 -04:00
BillyOutlast 019eafe194 Merge pull request #30 from Heretek-AI/ticket-29-hygiene
#29 hygiene: gitignore .worktrees/, disposition root session notes
2026-10-12 01:14:14 -04:00
BillyOutlast 8950916187 #29 hygiene: gitignore .worktrees/, archive swarm notes to docs/archive/, commit .env.example 2026-10-12 01:08:23 -04:00
BillyOutlast 68d06e2bc2 Merge integration/v0.2: v0.2.0 milestone (debug logging, AI Studio remediation #21-#24, OpenCode v2 integration #16-#19, hardening)
Suite 213/213 green (62 suites) + test:opencode 60/60 + test:e2e 5/5.
Seam gate + rebase gate CLEAN at upstream 8301cdcaa4. Fixture untouched.
2026-10-12 01:00:41 -04:00
BillyOutlast a5760bb7f8 Merge ticket-T13 (T13 Milestone Gate Audit #11 #8 #6 #7 #20) into integration/v0.2 2026-10-12 00:55:42 -04:00
BillyOutlast 6fde551945 T13 (Milestone Gate Audit #11 #8 #6 #7 #20): §10 gate addendum + README usage/status 2026-10-12 00:55:40 -04:00
BillyOutlast b08959ea0a Merge ticket-T12 (T12 CI Hardening & Rebase Runbook #10 #13) into integration/v0.2 2026-10-12 00:54:49 -04:00
BillyOutlast e33daf5fce T12 (CI Hardening & Rebase Runbook #10 #13): verify-upstream-rebase gate + runner-health docs + CI rebase step 2026-10-12 00:54:46 -04:00
BillyOutlast 1448927eee Merge ticket-T11 (T11 E2E BYOK Loop #19 #12) into integration/v0.2 2026-10-12 00:53:43 -04:00
BillyOutlast 3160fda2af T11 (E2E BYOK Loop #19 #12): live provider<->shim loop test + test:e2e/test:opencode scripts 2026-10-12 00:53:40 -04:00
BillyOutlast 2e80035c49 Merge ticket-T10 (T10 Architect Agent #17) into integration/v0.2 2026-10-12 00:51:51 -04:00
BillyOutlast 8fa3f43e7e feat(plugin): add gdevelop-architect agent persona (T10, #17) 2026-10-12 00:51:49 -04:00
BillyOutlast bc77e107d5 Merge ticket-T09 (T09 Plugin Core & Tools #17) into integration/v0.2 2026-10-12 00:50:56 -04:00
BillyOutlast 8b04336814 feat(plugin): add @heretek-ai/opencode-gdevelop tools (T09, #17) 2026-10-12 00:50:52 -04:00
BillyOutlast 12f12e6893 Merge ticket-T08 (T08 Provider Bridge #18) into integration/v0.2 2026-10-12 00:48:08 -04:00
BillyOutlast b44fd9bd81 T08 (Provider Bridge #18): OpenAI-compatible local provider daemon + integration suite 2026-10-12 00:48:05 -04:00
BillyOutlast 619013652b Merge ticket-T07 (T07 Control Shim #16) into integration/v0.2 2026-10-12 00:45:07 -04:00
BillyOutlast ef7ded4125 T07 (Control Shim #16): zero-dep ESM project control shim + unit suite 2026-10-12 00:45:06 -04:00
BillyOutlast e862a0087f Merge ticket-T06 (T06 Storm Guard Isolation #23) into integration/v0.2 2026-10-12 00:42:02 -04:00
BillyOutlast 07fc266598 T06: Storm Guard Isolation (#23) - child failure never suspends parent
- LoopGuard: single-request scope marker + isolation note (repeat-without-progress)
- Patch 14: parent guard feeds editor-only results; spawn startup fails only its call
- Tests: 3 new multi-agent isolation assertions + MANIFEST recompute
2026-10-12 00:42:01 -04:00
BillyOutlast 4e8c09303f Merge ticket-T05 (T05 Suspended UI and Resume #22) into integration/v0.2 2026-10-12 00:40:46 -04:00
BillyOutlast aa21084b52 T05: Suspended UI and Resume (#22) - terminal status card
- UseStudioRuntime: terminal helpers (Suspended/Stopped by Loop Guard badge, reason, timestamp, resume steer, clear stalled)
- Patch 11: mount terminal card with Resume/Retry + Clear Stalled, preserve marker + anti-revert
- Tests: 3 new T05 assertions + MANIFEST recompute
2026-10-12 00:40:44 -04:00
BillyOutlast 1d884d12c2 Merge ticket-T04 (T04 No-Project Fix #21) into integration/v0.2 2026-10-12 00:39:10 -04:00
BillyOutlast fe67e63e7a T04: No-Project Fix (#21) - deterministic initialize_project self-remedy
- CustomAIClient: NO_PROJECT helpers + system-prompt remedy when no project JSON
- Roles: initialize_project first in manager manifest + first-action prompt rule
- Patch 14: null-project pre-pass failing project-dependent tools closed with remedy
- Tests: 3 new null-project assertions + MANIFEST recompute
2026-10-12 00:39:08 -04:00
BillyOutlast 22f8df947d Merge ticket-T03 (T03 Tool Manifest Pruning #24) into integration/v0.2 2026-10-12 00:37:47 -04:00
BillyOutlast 0276353b64 T03: Tool Manifest Pruning (#24) - offline docs fail-closed + PlanStore plan routing
- CustomAIClient: search_docs/read_full_docs offline suffix + OFFLINE_DOCS helpers
- Patch 14: local pre-pass for docs (offline:true, no network) + create_or_update_plan via PlanStore validate/merge
- Tests: 3 new assertions in ai-byok-flow.test.mjs proving no dead tool calls
- MANIFEST: recompute CustomAIClient hash/bytes
2026-10-12 00:37:45 -04:00
BillyOutlast 67a4be1b29 Merge ticket-T02 (T02 Client Debug Logging Subsystem) into integration/v0.2 2026-10-12 00:32:21 -04:00
BillyOutlast bbc3d4c2a5 T02: client debug logging subsystem
- launcher/debug-logger.cjs (new): sync JSONL appender, activates on
  --heretek-debug-log <path> / HERETEK_DEBUG_LOG, schema
  {ts,iso,source,level,event,data}; invalid paths disable gracefully.
- heretek-hook.cjs: init logger in installPreloadHook, log window
  creation/load/navigation, uncaughtException/unhandledRejection, flag
  non-spoofed api.gdevelop.io attempts (filter widens only when active).
- preload-unlock.cjs: expose window.__HERETEK_LOGGER__ (capped ring
  buffer), hook error/unhandledrejection, intercept console.error/warn
  (pass-through); fallback-source embedding extended.
- ai-studio: DebugEvents.js emitter + LoopGuard turn/guard events
  ([AI_REQUEST_START],[TOOL_CALL],[TOOL_RESULT],[GUARD_EVALUATE],
  [REQUEST_STATE_CHANGE]); MANIFEST hashes updated; TIER2_FILES extended.
- scripts/dump-debug-log.mjs (new): filter by event/level/request id.
- tests/launcher/debug-logger.test.cjs (new, 15 tests); inject.test
  3->4 launcher files. npm test 146/146 green.
2026-10-12 00:31:19 -04:00
BillyOutlast f35beecb60 Merge ticket-T01 (T01 Governance & LICENSE, #26 #14) into integration/v0.2 2026-10-12 00:18:07 -04:00
BillyOutlast b62921a76e T01: MIT LICENSE + package.json license field + SonarCloud triage note
- LICENSE (MIT, Heretek-AI 2026) with scope note: covers this repo's
  original files; upstream GDevelop (Core/GDJS/newIDE/Extensions) stays
  under its own MIT licenses, never vendored (closes #26).
- package.json: add "license": "MIT".
- docs/sonar-triage.md: SonarCloud advisory-only, no properties file
  added (default-branch effect only); 6 MAJOR residuals documented as
  accepted/owner-UI-action (closes SonarCloud box of #14).
- npm test 131/131 green.
2026-10-12 00:18:05 -04:00
Swarm Director 20d43bbd6c chore: ignore .env (local LLM credentials, never commit) 2026-10-12 00:16:41 -04:00
John SmithandClaude Opus 5.5 9fd4c3a490 chore: pin the hygiene workflow by commit
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 20:47:12 -04:00
John SmithandClaude Opus 5.5 1d2959e6b4 chore: hygiene check, CodeRabbit config, repo-relative paths in research prompt
- Hygiene calls the org workflow that rejects machine-local paths.
- CodeRabbit skips patches/, which tests/patches/ already pins.
- CLAUDE_CODE_RESEARCH_PROMPT.md named five absolute paths under one
  developer's home directory; they are now repo-relative.

No patch, launcher, pinned runtime or test file is touched.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 20:38:11 -04:00
BillyOutlast 6b1ac2f530 Merge pull request #15 from Heretek-AI/handoff/verify-and-tracker-2026-10-11
Fix release blockers, add Windows/macOS builds, close the hygiene tail
unlocked-8301cdcaa48b496f48a28a6e3a56fa833eaeddff
2026-10-11 17:13:49 -04:00
BillyOutlastandClaude Opus 5.5 5131080a66 Release: per-OS checksum files; no persisted checkout credentials
Raised in review:
- A run-wide SHA256SUMS.txt went stale as soon as one OS was published
  into an existing release. Each build job now writes SHA256SUMS-<os>.txt
  for exactly the files it uploads; the publish job re-verifies them.
- Workflows that run repository code no longer leave the checkout token
  on disk, and seam-tests/e2e get an explicit read-only token.
- docs/release-signing.md claimed signing needed no workflow change. For
  macOS that is wrong: the ad-hoc step would replace a Developer ID
  signature. Corrected.
- AUDIT_REPORT.md: say up front that it is append-only and §9 is current.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 16:51:37 -04:00
BillyOutlastandClaude Opus 5.5 2017aee1d3 Contract test: require the offline-user branch, catch stray hosted calls
Two holes raised in review, each now with a negative control:
- an endpoint route could lose its local-* user branch and still pass;
  sites that take a userId must now carry both conditions.
- discovery was by declaration shape, so a hosted request in a function
  declaration or method would have gone unclassified. Every hosted
  request must now sit inside a classified call site.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 16:51:37 -04:00
BillyOutlastandClaude Opus 5.5 becd5a2306 Launcher: a reused XHR no longer keeps the spoofed response state
open() re-initializes an XHR, but the per-instance shadows from a spoofed
response stayed and a later real request would read back the old 200.
Remove them on open(). Raised in review; red test first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 16:51:37 -04:00
BillyOutlastandClaude Opus 5.5 ab3c4055cd strip-updater-feed: one descriptor for the read-modify-write
CodeQL flagged a check-then-write race (js/file-system-race) on the build
config: existsSync, then read and write by path. Open the file once and
read, truncate and write through that descriptor. Same edit, same exit
codes (2 missing, 1 refused).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 16:45:18 -04:00
BillyOutlastandClaude Opus 5.5 38fce1a07d Patch 07: refuse attachment uploads in BYOK mode (audit A2)
Upstream added chat attachments after the fork diverged, so the forward-
ported Generation.js had no BYOK branch for them: with a custom endpoint
enabled, a logged-in user's attachment was still uploaded to GDevelop's
storage (logged out, the UI already refuses before uploading).

- createAiAttachmentUploads throws before any hosted call when the custom
  endpoint is enabled or the user is local-* — the same rule the presigned
  project-JSON upload already uses. The caller turns it into the existing
  'upload failed' chip.
- createAiAttachmentDownloads returns not-found entries for a local-* user.
  Attachments of a hosted chat are hosted data and are still read there.

Patch 07 was re-derived, not hand-edited: a plain diff -U3 of pristine vs
patched reproduces the previous patch byte-for-byte, and the new one
differs from it only by these two insertions (minus-line count unchanged
at 66). The contract test asserted the gap; it now asserts the guards
(red before, green after). REBASE.md records these as post-fork additions
and switches the rebase recipe to use our own patched file as the third
side, since the donor is retired.

Not verified live: reaching the guard needs a logged-in session.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 16:28:38 -04:00
BillyOutlastandClaude Opus 5.5 c83a1cb84f Audit report §9: record the green three-OS validation run
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 16:16:00 -04:00