feat: Deploy scaffolding, PTY system terminal and AI transcript fixes#142
Merged
Conversation
The file manager's hidden files default is now a persisted agent setting exposed through the key based config API. It defaults to enabled, and an explicit off choice survives agent restarts.
Deployments created from a custom image can now reference an app template. The user's image is kept while the template contributes its default container port and bind mounts; required mounts are included when no explicit selection is made. Combined with the existing template scaffolding, image and compose deploys get pre-created directories, default environment files and correct ownership.
Deployments created from a custom image or compose file can now select an app template. The user's image and compose content are kept while the template contributes its container port, default bind mounts, pre-created directories and ownership. Required mounts apply by default and explicit selections override them entirely. Templates can also declare how a platform's environment file is produced: preferring the example shipped inside the deployed image, falling back to template-provided content, generating fresh secrets per deployment and filling in database credentials. The Laravel template uses this for its environment file, full storage directory tree and bootstrap cache. Bind mounts can declare their host path, single-file mounts stay files, and ownership is applied recursively so nested directories belong to the container user. On-disk template copies are refreshed whenever the binary's embedded set changes, so upgrades take effect without a manual refresh.
Entry points that open the assistant with a canned prompt (log analysis, operation diagnosis) no longer show that prompt as if the operator typed it. The model still receives the full prompt and its context; the visible conversation starts with the assistant's answer. Only messages the operator actually types are displayed.
The agent container runs as root and leaves root-owned files in the shared test directories. Teardown could not remove them and the next run silently started on stale state, failing unrelated tests in confusing ways. The suite now refuses to start until the leftover directories are removed.
The system terminal could not run anything that needs a tty: terminal-control commands (reset, tput, stty) failed and full-screen interactive programs (top, htop, vim, less, watch) had no way to receive keystrokes. A new interactive websocket endpoint runs the host shell under a PTY with the same stream protocol as the container terminal: binary frames for raw bytes, JSON text frames for resizes, first-message token auth. Global protected command rules are enforced per submitted line; a blocked line is cancelled and the operator notified. Disabling the terminal through global protected mode is honored. The JSON command endpoint stays unchanged as the programmatic surface. Closes #137
Code Review SummaryThis PR introduces version 0.3.0 with significant enhancements to deployment scaffolding, a new interactive system PTY, and improved AI session handling. 🚀 Key Improvements
💡 Minor Suggestions
|
| case "alphanumeric": | ||
| const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" | ||
| out := make([]byte, n) | ||
| for i, b := range buf { |
There was a problem hiding this comment.
Using int(b) % len(charset) introduces a modulo bias because 256 is not a multiple of 62. This makes some characters slightly more likely to appear than others. For cryptographic secrets, consider using a rejection sampling method or a larger power-of-two charset.
Suggested change
| for i, b := range buf { | |
| for i := 0; i < n; i++ { | |
| out[i] = charset[int(buf[i])%len(charset)] // Consider rejection sampling for absolute uniformity | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #137, closes #138.
Notes