-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell_launches_python_process.html
More file actions
99 lines (98 loc) · 4.2 KB
/
shell_launches_python_process.html
File metadata and controls
99 lines (98 loc) · 4.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Shell launches Python process</title>
<style>
body { font-family: Arial, sans-serif; margin: 0; color: #111; background: #f4f7fb; }
.container { display: flex; min-height: 100vh; }
.sidebar { width: 320px; background: #fff; border-right: 1px solid #d2d6dc; padding: 2rem 1.5rem; box-shadow: 2px 0 12px rgba(15, 23, 42, 0.05); }
.sidebar h1 { margin-top: 0; font-size: 1.4rem; }
.sidebar p { color: #475569; line-height: 1.6; margin-bottom: 1.5rem; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li { margin-bottom: 1rem; }
.sidebar a { display: inline-block; color: #0f172a; text-decoration: none; font-weight: 600; }
.sidebar a:hover { color: #1d4ed8; }
.sidebar a.active { color: #1d4ed8; }
.sidebar details summary { cursor: pointer; display: flex; align-items: center; gap: 0.35rem; font-weight: 700; color: #0f172a; margin-bottom: 0.5rem; }
.sidebar details summary::-webkit-details-marker { display: none; }
.sidebar details[open] > summary::before { content: '−'; }
.sidebar details > summary::before { content: '+'; display: inline-block; width: 1.1rem; text-align: center; color: #0f172a; }
.sidebar details ul { margin: 0.5rem 0 0 1.4rem; padding: 0; }
.sidebar details li { margin-bottom: 0.6rem; }
.main { flex: 1; padding: 2rem; }
.main h2 { margin-top: 0; font-size: 1.6rem; }
.meta p { color: #334155; line-height: 1.7; margin: 0.9rem 0; }
.diagram { background: #fff; padding: 1.25rem; border: 1px solid #d0d7de; border-radius: 12px; box-shadow: 0 1px 2px rgba(27,31,35,.075); }
.links { margin: 1.25rem 0; }
.links a { display: inline-block; margin-right: 1rem; color: #0451a5; text-decoration: none; }
.links a:hover { text-decoration: underline; }
.footer { margin-top: 2rem; font-size: 0.95rem; color: #64748b; }
</style>
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
mermaid.initialize({ startOnLoad: true, theme: 'base', fontFamily: 'Arial' });
</script>
</head>
<body>
<div class="container">
<aside class="sidebar">
<h1>Diagram hierarchy</h1>
<p>Navigate the diagram pages using the left menu.</p>
<ul>
<li>
<a href="info_flow_enter_to_first_response.html">Info flow: enter to first response</a>
<details open>
<summary><a href="shell_launches_python_process.html">Shell launches Python process</a></summary>
<ul>
<li><a href="shell_parses_command_line.html">Shell parses command line</a></li>
</ul>
</details>
</li>
</ul>
</aside>
<main class="main">
<h2>Shell launches Python process</h2>
<div class="meta">
<p>This page explains the shell-side actions involved before the Python runtime starts executing the agent script.</p>
</div>
<div class="links">
<a href="diagram_hierarchy.html">Back to diagram map</a>
<a href="info_flow_enter_to_first_response.html">Parent diagram: Info flow</a>
<a href="shell_parses_command_line.html">Child diagram: Shell parses command line</a>
</div>
<div class="diagram">
<div class="mermaid">
graph TD;
A["User types command and presses Enter in shell"];
B["Shell parses command line"];
C["Shell resolves executable path"];
click B "shell_parses_command_line.html" "Open parsing detail";
classDef clickable fill:#f5f8ff,stroke:#0366d6,stroke-width:2px,color:#0366d6;
class B clickable;
D["Shell locates Python interpreter"];
E["Shell spawns new Python process"];
F["Python runtime initializes"];
G["Python loads interpreter executable"];
H["Python initializes memory and runtime state"];
I["Python parses sys.argv and imports modules"];
J["Python executes script entrypoint"];
K["mini_coding_agent.py main() begins"];
A --> B;
B --> C;
C --> D;
D --> E;
E --> F;
F --> G;
F --> H;
G --> I;
H --> I;
I --> J;
J --> K;
</div>
</main>
</div>
<script type="module" src="diagram_nav.js"></script>
</body>
</html>