A comprehensive, production-grade technical manual and operational guide for the modular web terminal toolset. This document provides step-by-step breakdowns, architecture blueprints, syntax rules, execution pipelines, and error handling for all registered tools.
Studio routes application API traffic through the centralized network-security.js gateway. API requests are restricted to the documented Studio service origins, require HTTPS, omit browser credentials, send no referrer, reject redirects, and use a hard-bounded timeout: callers may request a smaller timeout, but the effective timeout can never exceed 20 seconds. The generic external-navigation validator accepts http://localhost, 127.0.0.1, or [::1] for local development; the API gateway still requires an explicitly allowlisted origin, so localhost HTTP is not an allowed API origin by default.
External browser navigation from the open command is handled separately through the same security module. It rejects non-web URL schemes, embedded credentials, and non-local HTTP destinations before opening a new tab. The navigation target is opened with an opener severed before external navigation is committed.
The HTML Content Security Policy keeps application API traffic on the documented allowlist, while repository previews use a separate child CSP. Editor and GitHub previews both flow through preview-security.js: the wrapper embeds repository HTML in a sandbox="allow-scripts" iframe without allow-same-origin, forms, popups, downloads, or top-navigation privileges. The child CSP is placed before all repository-controlled bytes, including hostile markup that places <script> before <head>, and blocks arbitrary connections, frames, workers, objects, and remote executable resources while preserving inline HTML/CSS/JavaScript plus local data:/blob: resources. The preview child has an opaque origin and no Studio opener, preventing access to Studio DOM, cookies, storage, or session state.
GitHub workspace state is consolidated into the encrypted session envelope. The application does not persist repository or github_active as standalone plaintext GitHub state. Unlocking verifies the token at unlock/first-use time against GitHub /user and requires both the immutable numeric user ID and login name to match the encrypted session. A mismatch immediately locks the vault and clears Studio's in-memory GitHub workspace/navigation state. This is unlock-time/first-use validation, not continuous background token validation; an unlocked token remains in memory until lock/logout or an explicit failure path.
GitHub session key derivation runs inside a dedicated same-origin Web Worker. The worker enforces Argon2id v1.3 with the production policy below; the caller cannot weaken these parameters:
Algorithm: Argon2id
Version: 0x13 / Argon2 v1.3
Memory: 131072 KiB / 128 MiB
Iterations: 4
Parallelism: 1
Output: 32 bytes
Salt: 32 bytes
The worker loads only the same-origin vendor/argon2.umd.min.js provider from hash-wasm@4.12.0 and verifies that hashwasm.argon2id is callable. There is no CDN fallback; if the local provider cannot be loaded or verified, derivation fails closed. The verified provider artifact SHA-256 is dcec617a2e1b700fa132d1583a186cb70611113395e869f2dd6cc82b415d3094. The worker also wipes password, salt, provider-result, and failed handoff buffers on its side. The key handoff is made from a separate copy: the worker wipes the provider-owned result before transferring the copy, then the transferred buffer is detached from the worker.
Verified local provider provenance: package hash-wasm, version 4.12.0, artifact vendor/argon2.umd.min.js sourced from dist/argon2.umd.min.js. The checked-in manifest vendor/argon2.umd.min.js.sha256 records SHA-256 dcec617a2e1b700fa132d1583a186cb70611113395e869f2dd6cc82b415d3094. Provider: local. CDN fallback: none. Fail-closed behavior: enabled. The local-provider integration test verifies the artifact and requires the runtime provider source to be local.
The session vault wipes temporary plaintext byte arrays after AES-GCM encryption/decryption and clears its in-memory session key and session object on lock. Browser JavaScript cannot guarantee zeroization of immutable strings or copies held by the browser/runtime, so these measures are best-effort memory hygiene rather than a hardware-enforced memory isolation guarantee.
The system operates as an interactive, multi-context web terminal. Each tool registers into a central command registry using registerTool() and controls context transitions through setMode().
┌─────────────────────────────────────────────────────────────────────────────────┐
│ CENTRAL TERMINAL RUNTIME │
│ (main.js) │
└───────┬───────────────┬─────────────────┬────────────────┬──────────────────────┘
│ │ │ │
▼ ▼ ▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌───────────────┐ ┌──────────────┐ ┌──────────────────┐
│ bhagvad │ │ bible │ │ calculator │ │ cat │ │ github │
└──────────────┘ └──────────────┘ └───────────────┘ └──────────────┘ └──────────────────┘
The Bhagavad Geeta Reader allows users to explore chapters and individual shloks (verses) from the Bhagavad Gita along with transliterations, translations, and commentaries by authorized scholars.
- Tool Keyword:
bhagvad - Default Prompt Context:
${username}/bhagvad/geeta>orbhagvad/geeta> - Upstream Data API:
https://vedicscriptures.github.io/slok/${chapter}/${shlok}
- Command:
bhagvad(invoked from main prompt) - Description: Enters the Bhagavad Geeta interactive sub-terminal mode.
- Step-by-Step Execution Flow:
onEnter()lifecycle hook is triggered by the terminal runtime.- Resolves the active user identity from the unlocked encrypted Studio session (defaults to
'guest'while locked). - Updates prompt context via
setMode('bhagvad', getGeetaPrompt()). - Displays system initialization headers and usage instructions.
- Command Syntax:
[chapter]/[shlok](e.g.,1/1,2/47,18/66) - Description: Queries and renders a specific verse including original Sanskrit text, Roman transliteration, and filtered commentary.
- Step-by-Step Execution Flow:
- Input Normalization: Trims whitespace and extracts the command string.
- Sub-string Filter: Bypasses processing if input equals root keywords like
'geeta','bhagvad', or trailing slash variations. - Format Validation: Splits input by
/. Validates that exactly two numeric components exist using the regex/^\d+$/. - API Request: Performs an asynchronous
secureFetch()request tohttps://vedicscriptures.github.io/slok/${chapter}/${shlok}. - Payload Validation: Verifies HTTP response status (
res.ok) and confirms presence ofdata.slok. - Text Formatting Engine:
- Applies
cleanWrap()to format Sanskrit text and transliteration into clean, fixed-width blocks (max 74 characters wide) with uniform line indentation. - Applies
chunkAndWrap()to split long commentaries into continuous two-sentence readable paragraphs wrapped at 70 characters.
- Applies
- Scholar Filter Pipeline: Iterates through response keys and filters commentaries to display only authorized authors:
- Swami Adidevananda
- Shri Purohit Swami
- A.C. Bhaktivedanta Swami Prabhupada
- Terminal Render: Outputs structured ASCII banners separating original verse, transliteration, and author commentaries.
- Command:
help - Description: Outputs command maps and usage examples for the Bhagavad Geeta reader.
- Step-by-Step Execution Flow:
- Input is lowercased and matched against
'help'. - Invokes
printGeetaHelp(), which outputs formatted help lines to the terminal.
- Input is lowercased and matched against
- Command:
exit - Description: Leaves the Bhagavad Geeta sub-terminal and returns to the root context.
- Step-by-Step Execution Flow:
- Input matched against
'exit'. - Calls
setMode('main', getSystemPrompt())to reset the terminal prompt.
- Input matched against
The Holy Bible Reader enables fetching specific verses across various translations and books using a structured book/chapter:verse query format.
- Tool Keyword:
bible - Default Prompt Context:
${username}/bible>orbible> - Upstream Data API:
https://bible-api.com/${encodedBook}+${chapter}:${verse}
- Command:
bible - Description: Switches session context to the Bible Reader mode.
- Step-by-Step Execution Flow:
- Executes
onEnter()hook. - Resolves the active username from the unlocked encrypted Studio session to generate the interactive prompt string.
- Sets active mode using
setMode('bible', getBiblePrompt()). - Displays welcome banner and command help hints.
- Executes
- Command Syntax:
[book]/[chapter]:[verse](e.g.,john/3:16,genesis/1:1,psalms/23:1) - Description: Fetches and renders scripture text based on book name, chapter number, and verse number.
- Step-by-Step Execution Flow:
- Input Trimming & Guards: Trims leading/trailing whitespace. Ignores empty strings or standalone mode keywords (
'bible','scripture'). - Primary Split: Splits input string across the
/character intobookandchapter:versestring segments. - Secondary Partition: Splits the second segment across the
:character to isolatechapterandversenumbers. - Syntax Validation: Validates that both chapter and verse match numeric pattern
/^\d+$/. - URL Encoding: Encodes the book name using
encodeURIComponent()to safely handle multi-word books (e.g., "1 john"). - Network Request: Issues a
secureFetch()GET request tohttps://bible-api.com/${encodedBook}+${chapter}:${verse}. - Error Verification: Evaluates standard HTTP errors (e.g., 404 for invalid references) and gracefully logs status failures.
- Text Formatting & Rendering:
- Extracts reference string (
data.reference) and scripture passage (data.text). - Runs text through
cleanWrap()to ensure lines do not exceed 74 characters. - Renders scripture content inside an ASCII double-line border box.
- Extracts reference string (
- Input Trimming & Guards: Trims leading/trailing whitespace. Ignores empty strings or standalone mode keywords (
- Command:
help - Description: Prints interactive operational guide.
- Command:
exit - Description: Leaves Bible Reader context and restores primary system prompt.
A full scientific calculator emulator replicating the operations of the Casio fx-570ES Plus engineering calculator. Supports complex numbers, multi-base conversions, numerical calculus, matrix arithmetic, vector space operations, linear system solvers, statistical regression, and functional table generation.
- Prompt Context:
calc> - Storage Persistence:
calc_variables: Stores system registers (A,B,C,D,X,Y,M,ANS) as complex structure objects{ re: Number, im: Number }.calculator: Caches terminal input/output history buffers inlocalStorage.
- Syntax:
REGISTER = expression(e.g.,X = 5 * pi,A = 3 + 4i,B = sqrt(-16)) - Supported Registers:
A,B,C,D,X,Y,M,ANS - Step-by-Step Execution:
- Intercepts inputs matching pattern
/^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/. - Verifies register name against system registers.
- Tokenizes and evaluates the right-hand expression using
parseAndEvaluate(). - Stores complex result
{ re, im }into variable register table and syncs tolocalStorage.
- Intercepts inputs matching pattern
-
Syntax Examples:
-
(2 + 3i) * (1 - 2i)-> Evaluates to8 - i -
sqrt(-4)-> Evaluates to2i -
i^i-> Evaluates to0.2078795764($e^{-\pi/2}$ ) -
pol(3, 4)-> Transforms rectangular coordinates$(3, 4)$ into polar representation ($r\angle\theta\text{ rad}$ )
-
-
Mathematical Operations:
- Complex Addition/Subtraction:
$(a + bi) \pm (c + di) = (a \pm c) + (b \pm d)i$ - Complex Multiplication:
$(a + bi)(c + di) = (ac - bd) + (ad + bc)i$ - Complex Division:
$\frac{a + bi}{c + di} = \frac{(ac + bd) + (bc - ad)i}{c^2 + d^2}$ - Complex Exponentiation:
$a^b = e^{b \ln(a)}$ where$\ln(z) = \ln|z| + i \arg(z)$
- Complex Addition/Subtraction:
-
Commands:
-
base:bin(expr): Evaluates expression and outputs 32-bit unsigned binary (0b...). -
base:hex(expr): Evaluates expression and outputs hexadecimal (0x...). -
base:oct(expr): Evaluates expression and outputs octal (0o...). -
base:dec(expr): Evaluates expression and outputs decimal integer string. -
base:and(valA, valB): Performs bitwise AND ($A \land B$ ). -
base:or(valA, valB): Performs bitwise OR ($A \lor B$ ). -
base:xor(valA, valB): Performs bitwise XOR ($A \oplus B$ ). -
base:not(val): Performs bitwise NOT ($\sim A$ ).
-
-
Step-by-Step Execution:
- Identifies
base:prefix. - Parses inner arguments and evaluates expression scalar real component.
- Truncates value to integer using
Math.floor(). - Performs bitwise shift/operation (
>>> 0for unsigned representations) and prints formatted string.
- Identifies
-
Syntax:
solve:quadratic(a, b, c) -
Mathematical Algorithm: Solves
$ax^2 + bx + c = 0$ using the quadratic formula:
-
Step-by-Step Execution:
- Extracts
$a, b, c$ values. - Computes discriminant
$\Delta = b^2 - 4ac$ . - If
$\Delta \ge 0$ , computes two real roots. - If
$\Delta < 0$ , computes complex conjugate pair$x = -\frac{b}{2a} \pm \frac{\sqrt{-\Delta}}{2a}i$ .
- Extracts
- 2x2 Linear Solver Syntax:
solve:linear([[a1,b1,c1], [a2,b2,c2]])- Solves system:
-
Applies Cramer's Rule:
$D = a_1 b_2 - b_1 a_2$ ,$X = \frac{c_1 b_2 - b_1 c_2}{D}$ ,$Y = \frac{a_1 c_2 - c_1 a_2}{D}$ . -
3x3 Linear Solver Syntax:
solve:linear([[a1,b1,c1,d1], [a2,b2,c2,d2], [a3,b3,c3,d3]])- Solves 3D spatial vector intersection system using 3x3 Cramer's Rule determinants.
-
Syntax:
table(algebraic_expression, start_X, end_X, incremental_step) -
Example:
table(X^2 + 1, 1, 3, 0.5) -
Step-by-Step Execution:
- Parses algebraic expression containing independent variable
X. - Evaluates start, end, and step scalar values.
- Loops
$x$ fromstart_Xtoend_Xincrementing byincremental_step. - Evaluates
$f(x)$ dynamically passing custom$X$ value context to the parser. - Renders formatted ASCII table grid.
- Parses algebraic expression containing independent variable
-
Descriptive Summary Syntax:
stat:summary([x1, x2, x3...])- Computes count (
$n$ ), mean ($\bar{x}$ ), sample standard deviation ($s$ ), minimum, and maximum.
- Computes count (
-
Linear Regression Syntax:
stat:reg([[x1, y1], [x2, y2]...])- Fits coordinate pairs to linear trendline
$Y = mX + b$ using least-squares formulas:
- Fits coordinate pairs to linear trendline
-
Numerical Differentiation:
-
Syntax:
diff(expression, target_value)(e.g.,diff(X^3, 2)) -
Algorithm: Central finite difference method with step size
$h = 10^{-5}$ :
-
Syntax:
-
Numerical Definite Integration:
-
Syntax:
int(expression, start, end)(e.g.,int(X^2, 0, 3)) -
Algorithm: Composite Simpson's
$1/3$ Rule over$N = 1000$ sub-intervals:
-
Syntax:
| Command Category | Command Syntax | Description & Operation |
| : | : | : |
| Matrix Determinant | mat:det([[a,b],[c,d]]) | Computes mat:inv([[a,b],[c,d]]) | Computes inverted matrix mat:add(matA, matB) | Performs element-wise sum mat:mul(matA, matB) | Computes matrix product vec:mag([x, y, z]) | Calculates Euclidean length vec:dot(vA, vB) | Computes scalar product vec:cross(vA, vB) | Computes 3D vector cross product
Provides access to random cat facts and paginated cat breed information using the CatFact Ninja API.
- Tool Keyword:
cat - Default Prompt Context:
cat> - Upstream Data API:
https://catfact.ninja
- Command:
cat - Step-by-Step Execution Flow:
- Triggers
onEnter()lifecycle event. - Displays system banner instructing user on valid subcommand formats.
- Triggers
- Command Syntax:
randomorcat/random - Step-by-Step Execution:
- Trims input and strips optional
cat/prefix. - Issues asynchronous GET request to
https://catfact.ninja/fact. - Parses JSON payload response object.
- Renders string value from
data.factkey.
- Trims input and strips optional
- Command Syntax:
breedsorbreeds/2orcat/breeds/3 - Step-by-Step Execution:
- Normalizes command string and extracts target page parameter (defaults to page
1if omitted). - Queries
https://catfact.ninja/breeds?page=${page}. - Iterates over returned array
data.data. - Renders each entry displaying breed name (
item.breed) and country of origin (item.country).
- Normalizes command string and extracts target page parameter (defaults to page
- Exits
cat>mode prompt.
A full virtual filesystem interface and cloud sync manager integrated with the official GitHub REST API. Supports remote workspace navigation, file editing, buffer management, repository provisioning, interactive deletions/renames, issue tracking, and sandbox application rendering.
-
Context Prompt:
${username}/github${repository}${path}> -
State Registers:
- Encrypted session envelope: stores the GitHub token, verified identity, session ID, repository binding, activity state, and creation metadata.
- In-memory session: holds the decrypted session only while unlocked; locking clears the token-bearing session object and cryptographic key from Studio memory.
- Active GitHub workspace state (
repository+githubActive) is stored inside the encrypted session envelope; no GitHub credential or workspace-binding flag is kept in plaintext browser storage. -
fileBuffers: In-memory volatile dictionary caching active local file modifications. -
virtualDirectories: Set tracking locally created directory paths.
To prevent accidental data loss, structural modifications (deletion, renaming, visibility adjustments) trigger interactive confirmation states that pause routine command parsing.
┌────────────────────────────────────────────────────────┐
│ COMMAND ISSUED BY USER │
│ (e.g., delete/app.js or rename/old) │
└───────────────────────────┬────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────┐
│ SET INTERACTIVE STATE REGISTERS │
│ (pendingDeleteTarget, pendingRenameTarget) │
└───────────────────────────┬────────────────────────────┘
│
▼
┌────────────────────────────────────────────────────────┐
│ PROMPT MODIFIED TO: "> " │
│ Awaits administrative confirmation [Yes/no] │
└───────────────────────────┬────────────────────────────┘
│
┌───────────────┴───────────────┐
▼ ▼
User responds "Yes" User responds "No"
│ │
▼ ▼
Execute GitHub API operation Abort action sequence
Reset prompt mode context Reset prompt mode context
- Description: Descends into a sub-directory node within the workspace.
- Step-by-Step Execution:
- If no repository is active, verifies remote repository existence via
verifyRemotePath(targetRepo, ''). Sets active repository on success. - If inside a repository, checks directory existence via GitHub API (
/contents/${path}). - Appends directory segment to
currentPathand updates prompt.
- If no repository is active, verifies remote repository existence via
- Description: Pulls and displays a read-only preview of a target file.
- Step-by-Step Execution:
- Detects
.in target string. - Checks for cached version in
fileBuffers. - If missing, calls
pullFileFromGitHub(fullPath)to retrieve content. - Renders file text directly to console between ASCII boundaries.
- Detects
- Description: Ascends upward to parent directory or unbinds repository if at root level.
- Description: Instantly unbinds active repository and resets working directory to root GitHub workspace context.
- Description: Lists all repositories under the logged-in GitHub account when no repository is bound.
- Step-by-Step Execution:
- Fetches repository array from
https://api.github.com/user/repos?per_page=100&sort=updated. - Renders list indicating repository name and privacy status (
(private)).
- Fetches repository array from
- Description: Fetches remote directory contents.
- Step-by-Step Execution:
- Issues GET request to repository contents endpoint
/contents/${path}. - Renders subdirectories (
-- dir/) and files (-- file.ext). - Populates local
virtualDirectoriesandfileBufferscaches.
- Issues GET request to repository contents endpoint
- Description: Downloads and displays full raw file contents.
-
Syntax Examples:
-
create/my-new-repo(when no repo bound): Provisions a new private GitHub repository. -
create/index.html: Allocates a new file in active workspace. -
create/components: Creates a virtual directory with a.gitkeepplaceholder file.
-
-
Step-by-Step Execution (File Creation):
- Parses file extension against allowed format list (
VALID_EXTENSIONS). - Initializes local entry in
fileBuffers[target]. - Converts payload content string to UTF-8 base64 encoding.
- Issues HTTP
PUTrequest to/repos/${user}/${repo}/contents/${path}.
- Parses file extension against allowed format list (
- Description: Opens the target file in the universal plaintext editor.
- Step-by-Step Execution:
- Pulls remote contents from GitHub if not already cached in local memory.
- Splits text into line arrays stored in
fileBuffers[target]. - Switches mode to
editor.
- Description: Force-refreshes local workspace memory buffer with remote content from GitHub.
- Description: Serializes local line buffer and commits/pushes changes to GitHub.
- Step-by-Step Execution:
- Reads line buffer array from
fileBuffers[target]and joins with. - Encodes binary text string into Base64 format.
- Fetches target SHA hash from GitHub to determine if operation is an update or creation.
- Issues HTTP
PUTrequest with updated commit message and Base64 body.
- Reads line buffer array from
- Description: Triggers interactive deletion sequence for files, directories, or entire repositories.
- Step-by-Step Execution:
- Sets
pendingDeleteTargetandpendingDeleteType(repository,file, ordirectory). - Prompts user:
Are you sure you want to delete the [type] '[target]', [Yes/no]? - On user confirmation (
yes/y):- Repository: Unbinds local context and clears path state.
- File: Obtains file SHA hash via GET request, then issues HTTP
DELETEpayload request. - Directory: Executes recursive deletion by listing directory tree nodes and deleting each child file.
- Sets
- Description: Interactively renames a file, directory, or repository.
- Step-by-Step Execution (File Rename):
- Prompts for new file name and validates target extension.
- Reads source file content.
- Pushes file content to new path location (
pushFileToGitHub). - On successful creation, deletes original file node (
deletePathFromGitHub).
- Description: Packages workspace files and launches an isolated visual rendering tab in the browser.
- Step-by-Step Execution:
- Retrieves file text buffer from
fileBuffers[target]. - Base64 encodes content payload using
btoa(unescape(encodeURIComponent(code))). - Constructs sandbox HTML wrapper document:
- HTML Files (
.html): Wraps content inside a sandboxed<iframe>enforcing Content Security Policy (script-src 'none'). - Other Text Files: Wraps content in styled terminal preview code block.
- HTML Files (
- Generates dynamic Blob URL via
URL.createObjectURL(blob)and opens it in a new browser tab (window.open).
- Retrieves file text buffer from
| Command Syntax | Operation & Execution Flow |
| : | : |
| issues | Queries https://api.github.com/repos/.../issues?state=all. Renders list with state indicators (++ for open, -- for closed). |
| issues/[number_or_title] | Fetches detailed view for specific issue including body, author, and timestamp metadata. |
| issues/close/[number] | Sends PATCH request setting issue state to 'closed'. |
| issues/reopen/[number] | Sends PATCH request setting issue state to 'open'. |
| issues/comment/[num]/"msg" | Sends POST request to create a new comment on target issue. |
| issues/fixed/[num]/"msg" | Posts comment to target issue, then sends PATCH request marking it closed. |
- Renders settings command menu.
- Interactively prompts user and sends PATCH request updating repository
nameattribute.
- Sends PATCH request setting default repository branch (
default_branch).
- Issues DELETE request to
/interaction-limitsendpoint to remove interaction restrictions.
- Issues PUT request to
/interaction-limitssetting access restriction tocollaborators_onlyfor six months.
- Checks for
.github/FUNDING.ymlconfiguration and toggles funding file presence.
- Interactively prompts user, then sends PATCH request setting
private: true/false.
===================================================================================================
TOOL CONTEXT COMMAND SYNTAX DESCRIPTION / FUNCTION
===================================================================================================
bhagvad [chapter]/[shlok] Fetch Gita verse, transliteration & commentary
bhagvad help Display Gita command help menu
bhagvad exit Return to primary prompt
bible [book]/[chapter]:[verse] Fetch Bible passage by reference
bible help Display Bible command help menu
bible exit Return to primary prompt
calculator REGISTER = [expression] Assign expression result to register (A,B,C,X,Y,M)
calculator base:[bin|hex|oct|dec](expr) Evaluate expression in specified number base
calculator base:[and|or|xor](A, B) Bitwise binary operation between two values
calculator solve:quadratic(a, b, c) Solve quadratic polynomial roots
calculator solve:linear([matrix]) Solve 2x2 or 3x3 linear system via Cramer's Rule
calculator table(expr, start, end, step) Generate functional value trace grid
calculator stat:summary([data_array]) Compute mean, std dev, min, max summary
calculator stat:reg([[x1,y1], [x2,y2]]) Compute linear regression equation Y = mX + b
calculator diff(expr, value) Compute central difference numerical derivative
calculator int(expr, start, end) Compute definite integral via Simpson's Rule
calculator mat:[det|inv|add|mul](...) Matrix determinant, inverse, sum, or product
calculator vec:[mag|dot|cross](...) Vector length, dot product, or cross product
cat random Fetch random cat fact
cat breeds/[page_number] List cat breeds by catalog page
github github Enter GitHub workspace context mode
github fletch List user repositories or directory tree
github cd [dir|file|..] Navigate directory tree or preview file
github create/[target] Create repository, workspace file, or folder
github edit/[file_name] Open plaintext file editor
github save/[file_name] Commit and push local memory buffer to GitHub
github pull/[file_name] Refresh local buffer with remote GitHub content
github delete/[target] Interactively purge file, folder, or repo
github rename/[target] Interactively rename file, folder, or repo
github run/[file_name] Launch isolated sandbox visualizer tab
github issues List repository issues
github issues/fixed/[num]/"msg" Post comment and close issue
github settings/[action] Configure repository branch, visibility, etc.
github vscode Open vscode.dev in a new browser tab
github exit / [username]/ Unbind repository / exit workspace
===================================================================================================
| System Module | Error Condition / Log Message | Root Cause | Resolution Sequence |
|---|---|---|---|
| Bhagavad Geeta | error: invalid format. please use chapter/shlok |
Command string contains invalid parameters or non-numeric inputs. | Format as [chapter]/[shlok] using valid digits (e.g., 2/47). |
| Bhagavad Geeta | error: unable to retrieve chapter... status 404 |
Requested chapter or verse does not exist in the payload. | Verify parameters match bounds (18 chapters, valid verse count per chapter). |
| Bible Reader | error: invalid format. please use book/chapter:verse |
Missing colon (:) or missing chapter/verse segment. |
Format passage reference as [book]/[chapter]:[verse] (e.g., john/3:16). |
| Calculator | division by zero complex boundaries |
Attempted division where denominator magnitude equals zero ( |
Check input expression limits and complex boundary values. |
| Calculator | quadratic systems require exactly three scalar coefficient variables |
solve:quadratic() received an incorrect number of coefficients. |
Provide exactly three numeric coefficients: solve:quadratic(a, b, c). |
| GitHub | error: authentication token signature missing |
No unlocked verified authorization session is available. | Use github and authenticate with login/token, then unlock the encrypted session when prompted. |
| GitHub | error: layout configuration rejected. extension... breaks systemic syntax rule maps |
Target file extension is not listed in VALID_EXTENSIONS. |
Save or rename the file using a supported plaintext format extension. |
Run scripts/vendor-argon2-provider.sh on a network-enabled development machine to fetch the exact hash-wasm@4.12.0 npm package and install only its dist/argon2.umd.min.js provider. The script checks the package version and records the provider SHA-256 in vendor/argon2.umd.min.js.sha256.
The production local-provider integration test verifies the exact vendored artifact, its SHA-256 manifest, provider = local, and the Argon2id v1.3 production vector. The worker has no CDN fallback and fails closed if the local provider cannot be loaded or verified.
Studio exposes no privileged message channel from the repository preview to the trusted application. The preview wrapper is opened with a severed opener, and preview-security.js contains no message receiver. The only production-window message receiver is the map workspace channel in map.js; it accepts only the fixed studio.map v1 close schema, requires the exact currently tracked popup WindowProxy as event.source, and requires the expected HTTPS popup origin before changing Studio mode or closing the map workspace. Malformed, replayed, wrong-origin, origin-less, and preview-style messages are ignored. The Argon2 worker message boundary remains request-bound: session-vault accepts only the active request ID, a successful ok flag, and an ArrayBuffer key, while argon2-worker.js accepts only requests matching the fixed production KDF policy. No BroadcastChannel, MessageChannel, storage-event, SharedWorker, or ServiceWorker communication channel exists in production Studio code. Runtime coverage in tests/message-channel-security.py exercises the real Chromium message event path and the real Worker boundary; tests/message-channel-security.mjs scans the complete production JavaScript tree for message-channel receivers and unrestricted dispatch patterns.
Repository-controlled filenames, paths, descriptions, commit messages, file contents, and other metadata do not enter the trusted Studio document as HTML. The common print() sink in main.js assigns values through textContent, while Editor and GitHub repository UI paths use that sink rather than innerHTML, outerHTML, insertAdjacentHTML, document.write, or DOMParser. The HTML preview path intentionally keeps raw repository markup inside the already-isolated sandboxed preview document; text previews HTML-escape repository filenames and content before wrapper generation. Runtime coverage in tests/dom-injection-security.py exercises hostile HTML/attribute/protocol payloads in the trusted output path and verifies they remain text, while legitimate text preview rendering remains functional. tests/dom-injection-audit.mjs performs a complete application-source sink audit for the high-risk HTML parsing/injection APIs.
GitHub credentials are stored only inside the encrypted Studio session envelope while locked. The vault exposes unlockAndValidateStoredSession(validate) for operational stored-session unlock and rejects a missing validator. Decryption remains temporary until the GitHub path performs GET /user validation and matches both the immutable numeric GitHub user ID and the stored login name; only then is the session and key committed to operational memory.
GitHub API requests are routed through the centralized network security gateway. An HTTP 401 response from an operational GitHub request immediately locks the session and clears in-memory authorization/navigation state. This is unlock-time validation plus failure-triggered invalidation, not continuous background token validation.
Repository previews are rendered inside sandbox="allow-scripts" iframes without allow-same-origin, allow-forms, allow-popups, allow-downloads, or top-navigation permissions. Editor and GitHub share this boundary through preview-security.js. The child CSP is installed before repository-controlled content can execute and blocks network connections, external executable resources, frames, workers, and objects while preserving inline HTML/CSS/JavaScript and local data:/blob: resources.
Run permissions inside the GitHub workspace to perform safe read-only capability probes and display the fine-grained permission profile required by Studio. Runtime probes are GET-only and report the repository role plus GitHub X-Accepted-GitHub-Permissions metadata when available. Write requirements are documented rather than proven by mutation: repository contents writes use Contents: write; workflow files require Contents: write plus Workflows: write; issue writes use Issues: write, while shared issue/Pull Request comment operations may use Issues: write or Pull requests: write; repository administration/update uses Administration: write; repository creation for Studio uses POST /user/repos and accepts Administration: write OR Repository creation: write. General GitHub endpoints may document additional permission alternatives separately; those are not part of Studio’s capability matrix. The command never performs write operations merely to test a token.
Phase 7D integrates the previously approved preview-isolation, repository-content injection, cross-context messaging, session-boundary, GitHub permission, and local-Argon2 controls into one adversarial validation layer. The production JavaScript tree is statically audited and the hostile repository test executes the real preview-security.js builder and sandboxed child in Chromium.
The integrated hostile preview attempts to reach Studio DOM/state, storage/cookies/session sentinels, privileged message receivers, external network APIs and resources, workers, popups, forms, downloads, navigation, custom protocols, javascript: URLs, <base>, and meta refresh. The test also verifies that legitimate inline HTML/CSS/JavaScript and local data/blob resources continue to function.
Runtime result: PASS in real Chromium. Contained preview self-navigation remains possible as an intentionally accepted boundary: it can replace the preview child document, but the sandbox prevents top-level Studio navigation, opener access, Studio-origin privileges, and other auxiliary browsing-context escape.